From 63a139c79f979766ed19ba6cc2f957b8ee3b4074 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Tue, 30 Jan 2024 16:55:02 +0000 Subject: [PATCH 01/49] feat(satp-Hermes): gateway refactor WIP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafael Belchior feat(bungee): add skeleton for bungee Signed-off-by: André Augusto refactor(plugin-satp-hermes): update messages formats SATP core version 2.0.0 OpenAPI * created new messages in openAPI definition feat(bungee): fix bungee dependencies Signed-off-by: André Augusto feat(SATP-Hermes): gateway coordinator feat(SATP-Hermes): gateway coordinator feat(SATP-Hermes): gateway coordinator WIP Signed-off-by: Rafael Belchior test(SATP-Hermes): enable decorators needed for gateway coordinator checks Signed-off-by: Rafael Belchior docs(SATP-Hermes): update package.json Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): remove kotlin sdk, add protobuffer Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure Signed-off-by: Rafael Belchior refactor(SATP-Hermes): refactor naming Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure improvements Signed-off-by: Rafael Belchior feat(SATP-Hermes): update yarn.lock and clean up Signed-off-by: André Augusto refactor(test-tooling): fix types of streams: use NodeJS.ReadableStream 1. The container management library that we use in the test infrastructure (called dockerode) is expecting streams that are defined in the global namespace of the `@types/node` library, e.g. the standard library of NodeJS itself. 2. Previously we were using the "streams" package to provide type information to the streams that we were passing around to dockerode and it was working fine, but after some changes that seem unrelated this has broken the compilation process. 3. The mentioned changes are not yet on the main branch, but we expect them to be there soon and so this change is laying the groundwork for that by pre-emptively fixing the broken build's root cause which is that the test-tooling package does not declare it's typings related dependencies correctly: It implicitly uses the NodeJS standard library's types but so far had not declared them on the package level. 4. This change is therefore to rectify the issue of the `@types/node` dependency missing from the test-tooling package and also the refactoring of some of the test ledger classes which were relying on the `streams` builtin package instead of correctly using the NodeJS.ReadableStream global. 5. Earlier the reasoning for this was that we try to avoid pulling in types from the global scope because we try to avoid any sort of dependency on the global scope in general. Once we have proof though that this is causing issues with the build, then we must give up the principle for practical reasons (and only in the minimum viable scope, e.g. this does not change the fact that everywhere else in the codebase we should still do our best to avoid using the global scoped classes, types, functions, etc..). Thank you to @AndreAugusto11 and @RafaelAPB for pointing out this issue through the pull request of his that is currently being worked on at the time of this writing: https://github.com/RafaelAPB/blockchain-integration-framework/pull/72 Related to but does not address #2811 Signed-off-by: Peter Somogyvari refactor(SATP-Hermes): remove unused packages * updated openapi version * updated bungee plugin version to 2.0.0-alpha.2 Co-authored-by: Peter Somogyvari Signed-off-by: André Augusto Signed-off-by: Peter Somogyvari --- .gitignore | 1 + .../src/main/typescript/cbdc-bridging-app.ts | 21 +- .../cbdc-bridging-app-dummy-infrastructure.ts | 12 +- .../satp-extension/besu-satp-gateway.ts | 10 +- .../satp-extension/client-helper.ts | 16 +- .../satp-extension/fabric-satp-gateway.ts | 10 +- .../satp-extension/server-helper.ts | 8 +- jest.config.js | 3 + packages/cactus-plugin-satp-hermes/README.md | 54 +- .../cactus-plugin-satp-hermes/package.json | 47 +- .../kotlin-client/.openapi-generator/FILES | 50 - .../kotlin-client/.openapi-generator/VERSION | 1 - .../generated/openapi/kotlin-client/README.md | 103 -- .../openapi/kotlin-client/build.gradle | 38 - .../generated/openapi/kotlin-client/gradlew | 245 --- .../openapi/kotlin-client/gradlew.bat | 92 -- .../openapi/kotlin-client/settings.gradle | 2 - .../openapitools/client/apis/DefaultApi.kt | 1313 ----------------- .../client/infrastructure/ApiAbstractions.kt | 23 - .../client/infrastructure/ApiClient.kt | 245 --- .../client/infrastructure/ApiResponse.kt | 43 - .../infrastructure/BigDecimalAdapter.kt | 17 - .../infrastructure/BigIntegerAdapter.kt | 17 - .../client/infrastructure/ByteArrayAdapter.kt | 12 - .../client/infrastructure/Errors.kt | 18 - .../client/infrastructure/LocalDateAdapter.kt | 19 - .../infrastructure/LocalDateTimeAdapter.kt | 19 - .../infrastructure/OffsetDateTimeAdapter.kt | 19 - .../client/infrastructure/PartConfig.kt | 11 - .../client/infrastructure/RequestConfig.kt | 18 - .../client/infrastructure/RequestMethod.kt | 8 - .../infrastructure/ResponseExtensions.kt | 24 - .../client/infrastructure/Serializer.kt | 23 - .../client/infrastructure/URIAdapter.kt | 13 - .../client/infrastructure/UUIDAdapter.kt | 13 - .../client/models/AssetProfile.kt | 79 - .../client/models/ClientV1Request.kt | 122 -- ...ientV1RequestClientGatewayConfiguration.kt | 35 - .../client/models/CommitFinalV1Request.kt | 71 - .../client/models/CommitFinalV1Response.kt | 71 - .../models/CommitPreparationV1Request.kt | 63 - .../models/CommitPreparationV1Response.kt | 63 - .../client/models/CredentialProfile.kt | 66 - .../org/openapitools/client/models/History.kt | 59 - .../openapitools/client/models/LocalLog.kt | 55 - .../client/models/LockEvidenceV1Request.kt | 79 - .../client/models/LockEvidenceV1Response.kt | 63 - .../client/models/PayloadProfile.kt | 40 - .../client/models/RecoverSuccessV1Message.kt | 43 - .../models/RecoverUpdateAckV1Message.kt | 47 - .../client/models/RecoverUpdateV1Message.kt | 44 - .../client/models/RecoverV1Message.kt | 63 - .../client/models/RollbackAckV1Message.kt | 43 - .../client/models/RollbackV1Message.kt | 51 - .../openapitools/client/models/SatpMessage.kt | 105 -- .../models/SatpMessageActionResponse.kt | 51 - .../openapitools/client/models/SessionData.kt | 291 ---- .../models/TransferCommenceV1Request.kt | 87 -- .../models/TransferCommenceV1Response.kt | 67 - .../models/TransferCompleteV1Request.kt | 67 - .../models/TransferInitializationV1Request.kt | 175 --- .../src/main/proto/LICENSE | 201 +++ .../src/main/proto/buf.gen.yaml | 12 + .../src/main/proto/buf.yaml | 24 + .../proto/cacti/satp/v02/common/message.proto | 22 + .../proto/cacti/satp/v02/common/session.proto | 30 + .../proto/cacti/satp/v02/crash_recovery.proto | 13 + .../main/proto/cacti/satp/v02/stage_0.proto | 34 + .../main/proto/cacti/satp/v02/stage_1.proto | 13 + .../main/proto/cacti/satp/v02/stage_2.proto | 13 + .../main/proto/cacti/satp/v02/stage_3.proto | 12 + .../proto/cacti/satp/v02/view/bungee.proto | 9 + .../src/main/proto/test/message.proto | 27 + .../{gateway => core}/besu-satp-gateway.ts | 12 +- .../{gateway/client => core}/client-helper.ts | 52 +- .../src/main/typescript/core/errors.ts | 15 + .../{gateway => core}/fabric-satp-gateway.ts | 12 +- .../{gateway/server => core}/server-helper.ts | 50 +- .../typescript/core/stage-services/stage0.ts | 0 .../typescript/core/stage-services/stage1.ts | 0 .../typescript/core/stage-services/stage2.ts | 0 .../typescript/core/stage-services/stage3.ts | 1 + .../core/stage-services/test-services.ts | 15 + .../src/main/typescript/core/types.ts | 66 + .../plugin-factory-besu-satp-gateway.ts | 20 + .../plugin-factory-fabric-satp-gateway.ts | 20 + .../plugin-factory-gateway-orchestrator.ts | 31 + .../src/main/typescript/gateway-refactor.ts | 320 ++++ .../plugin-factory-besu-satp-gateway.ts | 20 - .../plugin-factory-fabric-satp-gateway.ts | 20 - .../proto/cacti/satp/v02/common/message_pb.ts | 149 ++ .../cacti/satp/v02/common/session_connect.ts | 74 + .../proto/cacti/satp/v02/common/session_pb.ts | 94 ++ .../cacti/satp/v02/crash_recovery_connect.ts | 18 + .../proto/cacti/satp/v02/stage_0_connect.ts | 30 + .../proto/cacti/satp/v02/stage_0_pb.ts | 156 ++ .../proto/cacti/satp/v02/stage_1_connect.ts | 16 + .../proto/cacti/satp/v02/stage_2_connect.ts | 16 + .../proto/cacti/satp/v02/stage_3_connect.ts | 16 + .../proto/cacti/satp/v02/view/bungee_pb.ts | 45 + .../generated/proto/test/message_connect.ts | 62 + .../generated/proto/test/message_pb.ts | 119 ++ .../src/main/typescript/gol/config-service.ts | 0 .../typescript/gol/gateway-orchestrator.ts | 103 ++ .../{gateway => }/plugin-satp-gateway.ts | 61 +- .../src/main/typescript/public-api.ts | 22 +- .../{gateway => }/recovery/recover-success.ts | 12 +- .../recovery/recover-update-ack.ts | 12 +- .../{gateway => }/recovery/recover-update.ts | 12 +- .../{gateway => }/recovery/recover.ts | 12 +- .../{gateway => }/recovery/rollback-ack.ts | 12 +- .../{gateway => }/recovery/rollback.ts | 12 +- .../repository/interfaces/repository.ts | 0 .../repository/ipfs-remote-log-repository.ts | 0 .../repository/knex-local-log-repository.ts | 2 +- .../repository/knex-remote-log-repository.ts | 2 +- .../client-side/client-request-endpoint.ts | 4 +- .../commit-final-response-endpoint.ts | 4 +- .../commit-prepare-response-endpoint.ts | 4 +- .../lock-evidence-response-endpoint.ts | 4 +- .../transfer-commence-response-endpoint.ts | 4 +- .../transfer-initiation-response-endpoint.ts | 4 +- .../recovery/recover-message-endpoint.ts | 4 +- .../recover-success-message-endpoint.ts | 4 +- .../recover-update-ack-message-endpoint.ts | 4 +- .../recover-update-message-endpoint.ts | 4 +- .../recovery/rollback-ack-message-endpoint.ts | 4 +- .../recovery/rollback-message-endpoint.ts | 4 +- .../main/typescript/web-services/router.ts | 12 + .../commit-final-request-endpoint.ts | 4 +- .../commite-prepare-request-endpoint.ts | 4 +- .../lock-evidence-request-endpoint.ts | 4 +- .../transfer-commence-request-endpoint.ts | 4 +- .../transfer-complete-request-endpoint.ts | 4 +- .../transfer-initiation-request-endpoint.ts | 4 +- .../web-services/stage-0/dummy-step.ts | 0 .../stage-0/identity-verification.ts | 0 .../main/typescript/web-services/test/test.ts | 36 + .../typescript/web-services/test/test2.ts | 12 + .../backup-gateway-after-client-crash.test.ts | 34 +- .../client-crash-after-delete-asset.test.ts | 30 +- .../client-crash-after-lock-asset.test.ts | 30 +- ...nt-crash-after-transfer-initiation.test.ts | 22 +- .../gateway-coordinator-init.test.ts | 157 ++ ...dap-api-call-with-ledger-connector.test.ts | 28 +- .../integration/odap-api-call.test.ts | 20 +- .../integration/odap-rollback.test.ts | 30 +- .../test/typescript/integration/odap.test.ts | 19 +- .../server-crash-after-create-asset.test.ts | 30 +- ...er-crash-after-transfer-initiation.test.ts | 30 +- .../src/test/typescript/make-checks.ts | 52 +- .../unit/client/commit-final.test.ts | 26 +- .../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 | 40 +- .../unit/recovery/recover-success.test.ts | 24 +- .../unit/recovery/recover-update-ack.test.ts | 24 +- .../unit/recovery/recover-update.test.ts | 26 +- .../typescript/unit/recovery/recover.test.ts | 26 +- .../unit/server/commit-final.test.ts | 28 +- .../unit/server/commit-preparation.test.ts | 28 +- .../unit/server/lock-evidence.test.ts | 30 +- .../unit/server/transfer-commence.test.ts | 32 +- .../unit/server/transfer-complete.test.ts | 22 +- .../server/transfer-initialization.test.ts | 26 +- .../cactus-plugin-satp-hermes/tsconfig.json | 2 +- tsconfig.json | 4 +- yarn.lock | 505 ++++++- 170 files changed, 3170 insertions(+), 5080 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/LICENSE create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/buf.gen.yaml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/buf.yaml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/view/bungee.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => core}/besu-satp-gateway.ts (98%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway/client => core}/client-helper.ts (96%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => core}/fabric-satp-gateway.ts (98%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway/server => core}/server-helper.ts (96%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-fabric-satp-gateway.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/config-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/plugin-satp-gateway.ts (93%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/recovery/recover-success.ts (89%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/recovery/recover-update-ack.ts (89%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/recovery/recover-update.ts (93%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/recovery/recover.ts (93%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/recovery/rollback-ack.ts (89%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/recovery/rollback.ts (89%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/repository/interfaces/repository.ts (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/repository/ipfs-remote-log-repository.ts (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/repository/knex-local-log-repository.ts (96%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway => }/repository/knex-remote-log-repository.ts (93%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/dummy-step.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/identity-verification.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts diff --git a/.gitignore b/.gitignore index 3942ca6e40..fa8ef2403c 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ tools/docker/geth-testnet/data-geth1/ .history/ .manual-geth-artillery-config.yaml packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/chaincode-go +packages/cactus-plugin-satp-hermes/.config 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 526329cdf8..d349c35008 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 @@ -24,8 +24,8 @@ import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory import { CbdcBridgingAppDummyInfrastructure } from "./infrastructure/cbdc-bridging-app-dummy-infrastructure"; import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { FabricSatpGateway } from "./satp-extension/fabric-satp-gateway"; -import { BesuSatpGateway } from "./satp-extension/besu-satp-gateway"; +import { 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 { @@ -105,11 +105,12 @@ export class CbdcBridgingApp { const addressInfoB = httpApiB.address() as AddressInfo; const nodeApiHostB = `http://${this.options.apiHost}:${addressInfoB.port}`; - const fabricSatpGateway = await this.infrastructure.createClientGateway( + const FabricSATPGateway = await this.infrastructure.createClientGateway( nodeApiHostA, this.options.clientGatewayKeyPair, ); - const besuSatpGateway = await this.infrastructure.createServerGateway( + + const BesuSATPGateway = await this.infrastructure.createServerGateway( nodeApiHostB, this.options.serverGatewayKeyPair, ); @@ -134,10 +135,10 @@ export class CbdcBridgingApp { }); clientPluginRegistry.add(fabricPlugin); - clientPluginRegistry.add(fabricSatpGateway); + clientPluginRegistry.add(FabricSATPGateway); serverPluginRegistry.add(besuPlugin); - serverPluginRegistry.add(besuSatpGateway); + serverPluginRegistry.add(BesuSATPGateway); const crpcOptionsServer1 = { host: this.options.apiCrpcHost, @@ -190,8 +191,8 @@ export class CbdcBridgingApp { ), fabricApiClient, besuApiClient, - fabricSatpGateway, - besuSatpGateway, + FabricSATPGateway, + BesuSATPGateway, }; } @@ -254,6 +255,6 @@ export interface IStartInfo { readonly besuGatewayApi: SatpApi; readonly besuApiClient: BesuApi; readonly fabricApiClient: FabricApi; - readonly fabricSatpGateway: FabricSatpGateway; - readonly besuSatpGateway: BesuSatpGateway; + readonly FabricSATPGateway: FabricSATPGateway; + readonly BesuSATPGateway: 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 b1bef73046..6b5f92f18e 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 @@ -39,8 +39,8 @@ import { PluginRegistry } from "@hyperledger/cactus-core"; import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; import { IKeyPair } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSatpGateway } from "../satp-extension/fabric-satp-gateway"; -import { BesuSatpGateway } from "../satp-extension/besu-satp-gateway"; +import { FabricSATPGateway } from "../satp-extension/fabric-satp-gateway"; +import { BesuSATPGateway } from "../satp-extension/besu-satp-gateway"; import { PluginImportType } from "@hyperledger/cactus-core-api"; import CryptoMaterial from "../../../crypto-material/crypto-material.json"; import { ClientHelper } from "../satp-extension/client-helper"; @@ -248,9 +248,9 @@ export class CbdcBridgingAppDummyInfrastructure { public async createClientGateway( nodeApiHost: string, keyPair: IKeyPair, - ): Promise { + ): Promise { this.log.info(`Creating Source Gateway...`); - const pluginSourceGateway = new FabricSatpGateway({ + const pluginSourceGateway = new FabricSATPGateway({ name: "cactus-plugin-source#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), @@ -275,9 +275,9 @@ export class CbdcBridgingAppDummyInfrastructure { public async createServerGateway( nodeApiHost: string, keyPair: IKeyPair, - ): Promise { + ): Promise { this.log.info(`Creating Recipient Gateway...`); - const pluginRecipientGateway = new BesuSatpGateway({ + const pluginRecipientGateway = new BesuSATPGateway({ name: "cactus-plugin-recipient#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts index 5c3c0eb574..160220caad 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts @@ -8,11 +8,11 @@ import { } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import { IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, + PluginSATPGateway, } from "@hyperledger/cactus-plugin-satp-hermes"; import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; -export interface IBesuSatpGatewayConstructorOptions +export interface IBesuSATPGatewayConstructorOptions extends IPluginSatpGatewayConstructorOptions { besuContractName?: string; besuWeb3SigningCredential?: Web3SigningCredential; @@ -21,13 +21,13 @@ export interface IBesuSatpGatewayConstructorOptions besuPath?: string; } -export class BesuSatpGateway extends PluginSatpGateway { +export class BesuSATPGateway extends PluginSATPGateway { public besuApi?: BesuApi; public besuContractName?: string; public besuWeb3SigningCredential?: Web3SigningCredential; public besuKeychainId?: string; - public constructor(options: IBesuSatpGatewayConstructorOptions) { + public constructor(options: IBesuSATPGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -45,7 +45,7 @@ export class BesuSatpGateway extends PluginSatpGateway { } private defineBesuConnection( - options: IBesuSatpGatewayConstructorOptions, + options: IBesuSATPGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineBesuConnection()`; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts index 675e8de6a1..7e9649acb2 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts @@ -1,17 +1,17 @@ import { SHA256 } from "crypto-js"; import { - PluginSatpGateway, + PluginSATPGateway, TransferInitializationV1Request, ClientGatewayHelper, } from "@hyperledger/cactus-plugin-satp-hermes"; import { SatpMessageType } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSatpGateway } from "./fabric-satp-gateway"; -import { BesuSatpGateway } from "./besu-satp-gateway"; +import { FabricSATPGateway } from "./fabric-satp-gateway"; +import { BesuSATPGateway } from "./besu-satp-gateway"; export class ClientHelper extends ClientGatewayHelper { async sendTransferInitializationRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${this.className}#sendTransferInitializationRequest()`; @@ -82,7 +82,7 @@ export class ClientHelper extends ClientGatewayHelper { sourceLedgerAssetID: sessionData.sourceLedgerAssetID, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(initializationRequestMessage)), ); @@ -103,7 +103,7 @@ export class ClientHelper extends ClientGatewayHelper { data: JSON.stringify(sessionData), }); - if (gateway instanceof FabricSatpGateway) { + if (gateway instanceof FabricSATPGateway) { await gateway .isValidBridgeOutCBDC( sessionData.sourceLedgerAssetID, @@ -114,7 +114,7 @@ export class ClientHelper extends ClientGatewayHelper { .catch((err) => { throw new Error(`${err.response.data.error}`); }); - } else if (gateway instanceof BesuSatpGateway) { + } else if (gateway instanceof BesuSATPGateway) { await gateway .isValidBridgeBackCBDC( sessionData.sourceLedgerAssetID, @@ -134,7 +134,7 @@ export class ClientHelper extends ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase1TransferInitiationRequestV1(initializationRequestMessage), "TransferInitializationRequest", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts index 1dd7f57e6d..3799d400aa 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts @@ -8,11 +8,11 @@ import { } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; import { IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, + PluginSATPGateway, } from "@hyperledger/cactus-plugin-satp-hermes"; import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; -export interface IFabricSatpGatewayConstructorOptions +export interface IFabricSATPGatewayConstructorOptions extends IPluginSatpGatewayConstructorOptions { fabricPath?: string; fabricSigningCredential?: FabricSigningCredential; @@ -20,13 +20,13 @@ export interface IFabricSatpGatewayConstructorOptions fabricContractName?: string; } -export class FabricSatpGateway extends PluginSatpGateway { +export class FabricSATPGateway extends PluginSATPGateway { public fabricApi?: FabricApi; public fabricSigningCredential?: FabricSigningCredential; public fabricChannelName?: string; public fabricContractName?: string; - public constructor(options: IFabricSatpGatewayConstructorOptions) { + public constructor(options: IFabricSATPGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -44,7 +44,7 @@ export class FabricSatpGateway extends PluginSatpGateway { } private defineFabricConnection( - options: IFabricSatpGatewayConstructorOptions, + options: IFabricSATPGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineFabricConnection()`; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts index c6dee4d1e7..cb283c6c01 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts @@ -5,11 +5,11 @@ import { } from "@hyperledger/cactus-plugin-satp-hermes"; import { SatpMessageType, - PluginSatpGateway, + PluginSATPGateway, ServerGatewayHelper, } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSatpGateway } from "./fabric-satp-gateway"; +import { FabricSATPGateway } from "./fabric-satp-gateway"; import { LogLevelDesc } from "@hyperledger/cactus-common"; export interface IServerHelperOptions { @@ -30,7 +30,7 @@ export class ServerHelper extends ServerGatewayHelper { async checkValidInitializationRequest( request: TransferInitializationV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidInitializationRequest()`; @@ -124,7 +124,7 @@ export class ServerHelper extends ServerGatewayHelper { gateway.sessions.set(request.sessionID, sessionData); - if (gateway instanceof FabricSatpGateway) { + if (gateway instanceof FabricSATPGateway) { await gateway .isValidBridgeBackCBDC( request.payloadProfile.assetProfile.keyInformationLink[1].toString(), // FabricID diff --git a/jest.config.js b/jest.config.js index 1887b60017..c4cfe0b28d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,6 +10,9 @@ module.exports = { maxConcurrency: 1, setupFilesAfterEnv: ["jest-extended/all", "./jest.setup.console.logs.js"], testTimeout: 60 * 60 * 1000, + moduleNameMapper: { + "^(.+)/(.+)_pb\\.js$": "$1/$2_pb" + }, testMatch: [ `**/cactus-*/src/test/typescript/{unit,integration,benchmark}/**/*.test.ts`, `**/cacti-*/src/test/typescript/{unit,integration,benchmark}/**/*.test.ts`, diff --git a/packages/cactus-plugin-satp-hermes/README.md b/packages/cactus-plugin-satp-hermes/README.md index ebfb4b7ca9..f353eb76b1 100644 --- a/packages/cactus-plugin-satp-hermes/README.md +++ b/packages/cactus-plugin-satp-hermes/README.md @@ -1,8 +1,9 @@ # @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: +The package provides `Hyperledger Cacti` a way to standardize cross-chain transactions between ledgers. Using this we can perform: - A unidirectional atomic asset transfer between 2 parties in different ledgers. - Lock of the asset in the source ledger and proof is sent to the counterparty. - Extinguishment of the asset in the source blockchain and regeneration of the asset in the recipient blockchain. +- This package implements [Hermes as defined in the paper](https://www.sciencedirect.com/science/article/abs/pii/S0167739X21004337), namely the gateway paradigm and crash recovery. At the moment, we assume a crash-fault environment under some assumptions detailed in section [Assumptions](#assumptions) ## Summary @@ -23,6 +24,8 @@ Regarding the crash recovery procedure in place, at the moment we only support c - Gateways do not have byzantine behavior - Gateways are assumed to always recover from a crash +We will be working on reducing these assumptions and making the system more resilient to faults. + ## Getting Started Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on @@ -50,13 +53,16 @@ Firstly let us identify the different entities involved in the protocol and what - SQLite3 database: persistent log and proofs storage in each gateway. - IPFS connector: is exposed the API so that both gateways have access to the same structure. This is used to store the hashes and signatures of the logs and proofs, so that accountability is guaranteed. -The sequence diagram of ODAP is pictured below. +The sequence diagram of SATP is pictured below. + +![satp-sequence-diagram](https://i.imgur.com/SOdXFEt.png) -![odap-sequence-diagram](https://i.imgur.com/SOdXFEt.png) +### Application-to-Gateway API (API Type 1) +We -### API Endpoints +### Gateway-to-Gateway API (API Type 2) This plugin uses OpenAPI to generate the API paths. -There are Client and Server Endpoints for each type of message detailed in the ODAP protocol: +There are Client and Server Endpoints for each type of message detailed in the SATP protocol: - TransferInitializationV1Request - TransferInitializationV1Response @@ -79,31 +85,31 @@ There are also defined the endpoints for the crash recovery procedure (there is - RollbackV1Message ## Use case -Alice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run ODAP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B. +Alice and Bob, in blockchains A and B, respectively, want to make a transfer of an asset from one to the other. Gateway A represents the gateway connected to Alice's blockchain. Gateway B represents the gateway connected to Bob's blockchain. Alice and Bob will run SATP, which will execute the transfer of the asset from blockchain A to blockchain B. The above endpoints will be called in sequence. Notice that the asset will first be locked on blockchain A and a proof is sent to the server-side. Afterward, the asset on the original blockchain is extinguished, followed by its regeneration on blockchain B. ## Running the tests -[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts) +[A test of the entire protocol with manual calls to the methods, i.e. without ledger connectors and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp.test.ts) -[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts) +[A test of the entire protocol using Open API but with no ledger connectors.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-api-call.test.ts) -[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts) +[A test of the entire protocol with ledger connectors (Fabric and Besu) and Open API.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-api-call-with-ledger-connector.test.ts) -[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts) +[A test with a simulated crash of the client gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts) -[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts) +[A test with a simulated crash of the client gateway after the lock of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts) -[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts) +[A test with a simulated crash of the client gateway after the deletion of the asset in the source blockchain (Fabric).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts) -[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts) +[A test with a simulated crash of the server gateway after the creation of the the asset in the recipient blockchain (Besu).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts) -[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts) +[A test with a simulated crash of the server gateway after the transfer initiation flow.](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts) -[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts) +[A test with a rollback after a timeout (client crashed).](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-rollback.test.ts) -[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts) +[A test with a backup gateway resuming the protocol after the client gateway crashed.](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts) -For developers that want to test separate steps/phases of the ODAP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure). +For developers that want to test separate steps/phases of the SATP protocol, please refer to [these](https://github.com/hyperledger/cactus/blob/2e94ef8d3b34449c7b4d48e37d81245851477a3e/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/) test files (client and server side along with the recovery procedure). ## Usage @@ -112,12 +118,12 @@ Let us consider two gateways. The client gateway connected to Hyperledger Fabric - A Hyperledger Fabric API client on URL: http://localhost:8045 - A Hyperledger Besu API client on URL: http://localhost:8046 - An IPFS API client on URL: http://localhost:8047 - - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts) + - The local databases configuration provided in the file [knex.config.ts](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts) -Then the ODAP gateways should be created as follows: +Then the SATP gateways should be created as follows: ```typescript -const clientGatewayOptions: IFabricSatpGatewayConstructorOptions = { +const clientGatewayOptions: IFabricSATPGatewayConstructorOptions = { name: "cactus-plugin#clientOdapGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), @@ -130,7 +136,7 @@ const clientGatewayOptions: IFabricSatpGatewayConstructorOptions = { serverHelper: new ServerGatewayHelper(), }; -const serverGatewayOptions: IBesuSatpGatewayConstructorOptions = { +const serverGatewayOptions: IBesuSATPGatewayConstructorOptions = { name: "cactus-plugin#serverOdapGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), @@ -143,11 +149,11 @@ const serverGatewayOptions: IBesuSatpGatewayConstructorOptions = { serverHelper: new ServerGatewayHelper(), }; - const clientGateway = new FabricSatpGateway(clientGatewayOptions); - const serverGateway = new BesuSatpGateway(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-satp-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations. +Note that these gateways are extensions of the [default SATP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-satp-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-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 1f6333ffe6..a155fa6dbb 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -1,14 +1,12 @@ { "name": "@hyperledger/cactus-plugin-satp-hermes", "version": "2.0.0", - "description": "Proof of concept of ODAP", + "description": "SATP implementation, based on the papers 1) HERMES: Fault-Tolerant Middleware for Blockchain Interoperability and 2) CBDC bridging between Hyperledger Fabric and permissioned EVM-based blockchains", "keywords": [ - "Hyperledger", - "Cactus", - "Integration", - "Blockchain", + "Interoperability", "Distributed Ledger Technology", - "Open Digital Asset Protocol" + "IETF", + "Secure Asset Transfer Protocol" ], "repository": { "type": "git", @@ -16,7 +14,7 @@ }, "license": "Apache-2.0", "author": { - "name": "Hyperledger Cactus Contributors", + "name": "Hyperledger Cacti Contributors", "email": "cactus@lists.hyperledger.org", "url": "https://www.hyperledger.org/use/cacti" }, @@ -29,6 +27,10 @@ { "name": "Tzu-Shen, Wang", "url": "https://github.com/jscode017" + }, + { + "name": "Rafael Belchior", + "url": "https://github.com/RafaelAPB" } ], "main": "dist/lib/main/typescript/index.js", @@ -38,16 +40,25 @@ "dist/*" ], "scripts": { + "build": "run-p tsc codegen", + "build-proto": "buf build --path src/main/proto --verbose", "build:dev:backend:postbuild": "mkdir -p ./dist/lib/main/knex && cp -r ./knex/* ./dist/lib/main/knex", "codegen": "yarn run --top-level run-s 'codegen:*'", "codegen:openapi": "npm run generate-sdk", + "codegen:proto": "npm run generate-proto", + "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g go -o ./src/main/go/generated/openapi/go-client/ --git-user-id hyperledger --git-repo-id $(echo $npm_package_name | replace @hyperledger/ \"\" -z)/src/main/go/generated/openapi/go-client --package-name $(echo $npm_package_name | replace @hyperledger/ \"\" -z) --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "generate-sdk:kotlin": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g kotlin -o ./src/main/kotlin/generated/openapi/kotlin-client/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", + "lint": "npm-run-all 'buf lint' eslint '*/*/src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", + "lint-protobuf": "buf lint --path src/main/proto --verbose", "pretsc": "npm run generate-sdk", "tsc": "tsc --project ./tsconfig.json", - "watch": "npm-watch" + "watch": "tsc --build --watch" + }, + "jest": { + "moduleNameMapper": { + "(.+)\\.js": "$1" + } }, "dependencies": { "@hyperledger/cactus-cmd-api-server": "2.0.0", @@ -59,23 +70,39 @@ "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0", "@hyperledger/cactus-test-tooling": "2.0.0", + "@connectrpc/connect": "1.3.0", + "@connectrpc/connect-express": "1.3.0", + "@connectrpc/connect-node": "1.3.0", + "@connectrpc/protoc-gen-connect-es": "1.3.0", "axios": "1.7.7", + "body-parser": "1.20.2", + "class-transformer": "0.5.1", + "class-validator": "0.14.1", "crypto-js": "4.2.0", + "express": "4.17.2", + "fabric-network": "2.2.19", "fs-extra": "11.2.0", "knex": "2.4.0", + "kubo-rpc-client": "3.0.1", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", + "swagger-ui-express": "5.0.0", "typescript-optional": "2.0.1", "uuid": "10.0.0", "web3": "1.6.1", "web3-utils": "1.6.1" }, "devDependencies": { + "@bufbuild/buf": "1.29.0", + "@bufbuild/protobuf": "1.7.2", + "@bufbuild/protoc-gen-es": "1.7.2", "@types/body-parser": "1.19.4", "@types/crypto-js": "4.0.1", "@types/express": "5.0.0", "@types/fs-extra": "11.0.4", + "@types/node": "18.18.2", + "@types/swagger-ui-express": "4.1.6", "@types/tape": "4.13.4", "@types/uuid": "10.0.0", "body-parser": "1.20.3", diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES deleted file mode 100644 index 4f5a990219..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ /dev/null @@ -1,50 +0,0 @@ -README.md -build.gradle -gradlew -gradlew.bat -settings.gradle -src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt -src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt -src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt -src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt -src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt -src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt -src/main/kotlin/org/openapitools/client/models/AssetProfile.kt -src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt -src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt -src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt -src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt -src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt -src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt -src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt -src/main/kotlin/org/openapitools/client/models/History.kt -src/main/kotlin/org/openapitools/client/models/LocalLog.kt -src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt -src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt -src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt -src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt -src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt -src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt -src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt -src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt -src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt -src/main/kotlin/org/openapitools/client/models/SatpMessage.kt -src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt -src/main/kotlin/org/openapitools/client/models/SessionData.kt -src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt -src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt -src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt -src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt -src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md deleted file mode 100644 index b2679aa1bb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# org.openapitools.client - Kotlin client library for Hyperledger Cactus Plugin - Odap Hermes - -Implementation for Odap and Hermes - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client. - -- API version: 2.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.KotlinClientCodegen - -## Requires - -* Kotlin 1.7.21 -* Gradle 7.5 - -## Build - -First, create the gradle wrapper script: - -``` -gradle wrapper -``` - -Then, run: - -``` -./gradlew check assemble -``` - -This runs all tests and packages the library. - -## Features/Implementation Notes - -* Supports JSON inputs/outputs, File inputs, and Form inputs. -* Supports collection formats for query parameters: csv, tsv, ssv, pipes. -* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. -* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets. - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**clientRequestV1**](docs/DefaultApi.md#clientrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest | -*DefaultApi* | [**phase1TransferInitiationRequestV1**](docs/DefaultApi.md#phase1transferinitiationrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest | -*DefaultApi* | [**phase1TransferInitiationResponseV1**](docs/DefaultApi.md#phase1transferinitiationresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse | -*DefaultApi* | [**phase2LockEvidenceRequestV1**](docs/DefaultApi.md#phase2lockevidencerequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest | -*DefaultApi* | [**phase2LockEvidenceResponseV1**](docs/DefaultApi.md#phase2lockevidenceresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse | -*DefaultApi* | [**phase2TransferCommenceRequestV1**](docs/DefaultApi.md#phase2transfercommencerequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest | -*DefaultApi* | [**phase2TransferCommenceResponseV1**](docs/DefaultApi.md#phase2transfercommenceresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse | -*DefaultApi* | [**phase3CommitFinalRequestV1**](docs/DefaultApi.md#phase3commitfinalrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest | -*DefaultApi* | [**phase3CommitFinalResponseV1**](docs/DefaultApi.md#phase3commitfinalresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse | -*DefaultApi* | [**phase3CommitPreparationRequestV1**](docs/DefaultApi.md#phase3commitpreparationrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest | -*DefaultApi* | [**phase3CommitPreparationResponseV1**](docs/DefaultApi.md#phase3commitpreparationresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse | -*DefaultApi* | [**phase3TransferCompleteRequestV1**](docs/DefaultApi.md#phase3transfercompleterequestv1) | **GET** /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest | -*DefaultApi* | [**recoverUpdateAckV1Message**](docs/DefaultApi.md#recoverupdateackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage | -*DefaultApi* | [**recoverUpdateV1Message**](docs/DefaultApi.md#recoverupdatev1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage | -*DefaultApi* | [**recoverV1Message**](docs/DefaultApi.md#recoverv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage | -*DefaultApi* | [**recoverV1Success**](docs/DefaultApi.md#recoverv1success) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage | -*DefaultApi* | [**rollbackAckV1Message**](docs/DefaultApi.md#rollbackackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage | -*DefaultApi* | [**rollbackV1Message**](docs/DefaultApi.md#rollbackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage | - - - -## Documentation for Models - - - [org.openapitools.client.models.AssetProfile](docs/AssetProfile.md) - - [org.openapitools.client.models.ClientV1Request](docs/ClientV1Request.md) - - [org.openapitools.client.models.ClientV1RequestClientGatewayConfiguration](docs/ClientV1RequestClientGatewayConfiguration.md) - - [org.openapitools.client.models.CommitFinalV1Request](docs/CommitFinalV1Request.md) - - [org.openapitools.client.models.CommitFinalV1Response](docs/CommitFinalV1Response.md) - - [org.openapitools.client.models.CommitPreparationV1Request](docs/CommitPreparationV1Request.md) - - [org.openapitools.client.models.CommitPreparationV1Response](docs/CommitPreparationV1Response.md) - - [org.openapitools.client.models.CredentialProfile](docs/CredentialProfile.md) - - [org.openapitools.client.models.History](docs/History.md) - - [org.openapitools.client.models.LocalLog](docs/LocalLog.md) - - [org.openapitools.client.models.LockEvidenceV1Request](docs/LockEvidenceV1Request.md) - - [org.openapitools.client.models.LockEvidenceV1Response](docs/LockEvidenceV1Response.md) - - [org.openapitools.client.models.PayloadProfile](docs/PayloadProfile.md) - - [org.openapitools.client.models.RecoverSuccessV1Message](docs/RecoverSuccessV1Message.md) - - [org.openapitools.client.models.RecoverUpdateAckV1Message](docs/RecoverUpdateAckV1Message.md) - - [org.openapitools.client.models.RecoverUpdateV1Message](docs/RecoverUpdateV1Message.md) - - [org.openapitools.client.models.RecoverV1Message](docs/RecoverV1Message.md) - - [org.openapitools.client.models.RollbackAckV1Message](docs/RollbackAckV1Message.md) - - [org.openapitools.client.models.RollbackV1Message](docs/RollbackV1Message.md) - - [org.openapitools.client.models.SatpMessage](docs/SatpMessage.md) - - [org.openapitools.client.models.SatpMessageActionResponse](docs/SatpMessageActionResponse.md) - - [org.openapitools.client.models.SessionData](docs/SessionData.md) - - [org.openapitools.client.models.TransferCommenceV1Request](docs/TransferCommenceV1Request.md) - - [org.openapitools.client.models.TransferCommenceV1Response](docs/TransferCommenceV1Response.md) - - [org.openapitools.client.models.TransferCompleteV1Request](docs/TransferCompleteV1Request.md) - - [org.openapitools.client.models.TransferInitializationV1Request](docs/TransferInitializationV1Request.md) - - [org.openapitools.client.models.TransferInitializationV1Response](docs/TransferInitializationV1Response.md) - - - -## Documentation for Authorization - -Endpoints do not require authorization. - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle deleted file mode 100644 index 66a3c68b89..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -group 'org.openapitools' -version '1.0.0' - -wrapper { - gradleVersion = '7.5' - distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" -} - -buildscript { - ext.kotlin_version = '1.7.21' - - repositories { - maven { url "https://repo1.maven.org/maven2" } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'maven-publish' - -repositories { - maven { url "https://repo1.maven.org/maven2" } -} - -test { - useJUnitPlatform() -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation "com.squareup.moshi:moshi-kotlin:1.13.0" - implementation "com.squareup.moshi:moshi-adapters:1.13.0" - implementation "com.squareup.okhttp3:okhttp:4.10.0" - testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew deleted file mode 100644 index aeb74cbb43..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat deleted file mode 100644 index 93e3f59f13..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle deleted file mode 100644 index 391dcea81d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-client' \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt deleted file mode 100644 index 35526c0a9a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ /dev/null @@ -1,1313 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.apis - -import java.io.IOException -import okhttp3.OkHttpClient -import okhttp3.HttpUrl - -import org.openapitools.client.models.ClientV1Request -import org.openapitools.client.models.CommitFinalV1Request -import org.openapitools.client.models.CommitFinalV1Response -import org.openapitools.client.models.CommitPreparationV1Request -import org.openapitools.client.models.CommitPreparationV1Response -import org.openapitools.client.models.LockEvidenceV1Request -import org.openapitools.client.models.LockEvidenceV1Response -import org.openapitools.client.models.RecoverSuccessV1Message -import org.openapitools.client.models.RecoverUpdateAckV1Message -import org.openapitools.client.models.RecoverUpdateV1Message -import org.openapitools.client.models.RecoverV1Message -import org.openapitools.client.models.RollbackAckV1Message -import org.openapitools.client.models.RollbackV1Message -import org.openapitools.client.models.TransferCommenceV1Request -import org.openapitools.client.models.TransferCommenceV1Response -import org.openapitools.client.models.TransferCompleteV1Request -import org.openapitools.client.models.TransferInitializationV1Request -import org.openapitools.client.models.TransferInitializationV1Response - -import com.squareup.moshi.Json - -import org.openapitools.client.infrastructure.ApiClient -import org.openapitools.client.infrastructure.ApiResponse -import org.openapitools.client.infrastructure.ClientException -import org.openapitools.client.infrastructure.ClientError -import org.openapitools.client.infrastructure.ServerException -import org.openapitools.client.infrastructure.ServerError -import org.openapitools.client.infrastructure.MultiValueMap -import org.openapitools.client.infrastructure.PartConfig -import org.openapitools.client.infrastructure.RequestConfig -import org.openapitools.client.infrastructure.RequestMethod -import org.openapitools.client.infrastructure.ResponseType -import org.openapitools.client.infrastructure.Success -import org.openapitools.client.infrastructure.toMultiValue - -class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) { - companion object { - @JvmStatic - val defaultBasePath: String by lazy { - System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost") - } - } - - /** - * - * - * @param clientV1Request (optional) - * @return kotlin.Any - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun clientRequestV1(clientV1Request: ClientV1Request? = null) : kotlin.Any { - val localVarResponse = clientRequestV1WithHttpInfo(clientV1Request = clientV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Any - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param clientV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Suppress("UNCHECKED_CAST") - @Throws(IllegalStateException::class, IOException::class) - fun clientRequestV1WithHttpInfo(clientV1Request: ClientV1Request?) : ApiResponse { - val localVariableConfig = clientRequestV1RequestConfig(clientV1Request = clientV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation clientRequestV1 - * - * @param clientV1Request (optional) - * @return RequestConfig - */ - fun clientRequestV1RequestConfig(clientV1Request: ClientV1Request?) : RequestConfig { - val localVariableBody = clientV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - localVariableHeaders["Accept"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferInitializationV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase1TransferInitiationRequestV1(transferInitializationV1Request: TransferInitializationV1Request? = null) : Unit { - val localVarResponse = phase1TransferInitiationRequestV1WithHttpInfo(transferInitializationV1Request = transferInitializationV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferInitializationV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase1TransferInitiationRequestV1WithHttpInfo(transferInitializationV1Request: TransferInitializationV1Request?) : ApiResponse { - val localVariableConfig = phase1TransferInitiationRequestV1RequestConfig(transferInitializationV1Request = transferInitializationV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase1TransferInitiationRequestV1 - * - * @param transferInitializationV1Request (optional) - * @return RequestConfig - */ - fun phase1TransferInitiationRequestV1RequestConfig(transferInitializationV1Request: TransferInitializationV1Request?) : RequestConfig { - val localVariableBody = transferInitializationV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferInitializationV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase1TransferInitiationResponseV1(transferInitializationV1Response: TransferInitializationV1Response? = null) : Unit { - val localVarResponse = phase1TransferInitiationResponseV1WithHttpInfo(transferInitializationV1Response = transferInitializationV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferInitializationV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase1TransferInitiationResponseV1WithHttpInfo(transferInitializationV1Response: TransferInitializationV1Response?) : ApiResponse { - val localVariableConfig = phase1TransferInitiationResponseV1RequestConfig(transferInitializationV1Response = transferInitializationV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase1TransferInitiationResponseV1 - * - * @param transferInitializationV1Response (optional) - * @return RequestConfig - */ - fun phase1TransferInitiationResponseV1RequestConfig(transferInitializationV1Response: TransferInitializationV1Response?) : RequestConfig { - val localVariableBody = transferInitializationV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param lockEvidenceV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2LockEvidenceRequestV1(lockEvidenceV1Request: LockEvidenceV1Request? = null) : Unit { - val localVarResponse = phase2LockEvidenceRequestV1WithHttpInfo(lockEvidenceV1Request = lockEvidenceV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param lockEvidenceV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2LockEvidenceRequestV1WithHttpInfo(lockEvidenceV1Request: LockEvidenceV1Request?) : ApiResponse { - val localVariableConfig = phase2LockEvidenceRequestV1RequestConfig(lockEvidenceV1Request = lockEvidenceV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2LockEvidenceRequestV1 - * - * @param lockEvidenceV1Request (optional) - * @return RequestConfig - */ - fun phase2LockEvidenceRequestV1RequestConfig(lockEvidenceV1Request: LockEvidenceV1Request?) : RequestConfig { - val localVariableBody = lockEvidenceV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param lockEvidenceV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2LockEvidenceResponseV1(lockEvidenceV1Response: LockEvidenceV1Response? = null) : Unit { - val localVarResponse = phase2LockEvidenceResponseV1WithHttpInfo(lockEvidenceV1Response = lockEvidenceV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param lockEvidenceV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2LockEvidenceResponseV1WithHttpInfo(lockEvidenceV1Response: LockEvidenceV1Response?) : ApiResponse { - val localVariableConfig = phase2LockEvidenceResponseV1RequestConfig(lockEvidenceV1Response = lockEvidenceV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2LockEvidenceResponseV1 - * - * @param lockEvidenceV1Response (optional) - * @return RequestConfig - */ - fun phase2LockEvidenceResponseV1RequestConfig(lockEvidenceV1Response: LockEvidenceV1Response?) : RequestConfig { - val localVariableBody = lockEvidenceV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferCommenceV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2TransferCommenceRequestV1(transferCommenceV1Request: TransferCommenceV1Request? = null) : Unit { - val localVarResponse = phase2TransferCommenceRequestV1WithHttpInfo(transferCommenceV1Request = transferCommenceV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferCommenceV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2TransferCommenceRequestV1WithHttpInfo(transferCommenceV1Request: TransferCommenceV1Request?) : ApiResponse { - val localVariableConfig = phase2TransferCommenceRequestV1RequestConfig(transferCommenceV1Request = transferCommenceV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2TransferCommenceRequestV1 - * - * @param transferCommenceV1Request (optional) - * @return RequestConfig - */ - fun phase2TransferCommenceRequestV1RequestConfig(transferCommenceV1Request: TransferCommenceV1Request?) : RequestConfig { - val localVariableBody = transferCommenceV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferCommenceV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase2TransferCommenceResponseV1(transferCommenceV1Response: TransferCommenceV1Response? = null) : Unit { - val localVarResponse = phase2TransferCommenceResponseV1WithHttpInfo(transferCommenceV1Response = transferCommenceV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferCommenceV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase2TransferCommenceResponseV1WithHttpInfo(transferCommenceV1Response: TransferCommenceV1Response?) : ApiResponse { - val localVariableConfig = phase2TransferCommenceResponseV1RequestConfig(transferCommenceV1Response = transferCommenceV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase2TransferCommenceResponseV1 - * - * @param transferCommenceV1Response (optional) - * @return RequestConfig - */ - fun phase2TransferCommenceResponseV1RequestConfig(transferCommenceV1Response: TransferCommenceV1Response?) : RequestConfig { - val localVariableBody = transferCommenceV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitFinalV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitFinalRequestV1(commitFinalV1Request: CommitFinalV1Request? = null) : Unit { - val localVarResponse = phase3CommitFinalRequestV1WithHttpInfo(commitFinalV1Request = commitFinalV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitFinalV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitFinalRequestV1WithHttpInfo(commitFinalV1Request: CommitFinalV1Request?) : ApiResponse { - val localVariableConfig = phase3CommitFinalRequestV1RequestConfig(commitFinalV1Request = commitFinalV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitFinalRequestV1 - * - * @param commitFinalV1Request (optional) - * @return RequestConfig - */ - fun phase3CommitFinalRequestV1RequestConfig(commitFinalV1Request: CommitFinalV1Request?) : RequestConfig { - val localVariableBody = commitFinalV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitFinalV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitFinalResponseV1(commitFinalV1Response: CommitFinalV1Response? = null) : Unit { - val localVarResponse = phase3CommitFinalResponseV1WithHttpInfo(commitFinalV1Response = commitFinalV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitFinalV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitFinalResponseV1WithHttpInfo(commitFinalV1Response: CommitFinalV1Response?) : ApiResponse { - val localVariableConfig = phase3CommitFinalResponseV1RequestConfig(commitFinalV1Response = commitFinalV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitFinalResponseV1 - * - * @param commitFinalV1Response (optional) - * @return RequestConfig - */ - fun phase3CommitFinalResponseV1RequestConfig(commitFinalV1Response: CommitFinalV1Response?) : RequestConfig { - val localVariableBody = commitFinalV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitPreparationV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitPreparationRequestV1(commitPreparationV1Request: CommitPreparationV1Request? = null) : Unit { - val localVarResponse = phase3CommitPreparationRequestV1WithHttpInfo(commitPreparationV1Request = commitPreparationV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitPreparationV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitPreparationRequestV1WithHttpInfo(commitPreparationV1Request: CommitPreparationV1Request?) : ApiResponse { - val localVariableConfig = phase3CommitPreparationRequestV1RequestConfig(commitPreparationV1Request = commitPreparationV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitPreparationRequestV1 - * - * @param commitPreparationV1Request (optional) - * @return RequestConfig - */ - fun phase3CommitPreparationRequestV1RequestConfig(commitPreparationV1Request: CommitPreparationV1Request?) : RequestConfig { - val localVariableBody = commitPreparationV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param commitPreparationV1Response (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3CommitPreparationResponseV1(commitPreparationV1Response: CommitPreparationV1Response? = null) : Unit { - val localVarResponse = phase3CommitPreparationResponseV1WithHttpInfo(commitPreparationV1Response = commitPreparationV1Response) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param commitPreparationV1Response (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3CommitPreparationResponseV1WithHttpInfo(commitPreparationV1Response: CommitPreparationV1Response?) : ApiResponse { - val localVariableConfig = phase3CommitPreparationResponseV1RequestConfig(commitPreparationV1Response = commitPreparationV1Response) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3CommitPreparationResponseV1 - * - * @param commitPreparationV1Response (optional) - * @return RequestConfig - */ - fun phase3CommitPreparationResponseV1RequestConfig(commitPreparationV1Response: CommitPreparationV1Response?) : RequestConfig { - val localVariableBody = commitPreparationV1Response - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param transferCompleteV1Request (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun phase3TransferCompleteRequestV1(transferCompleteV1Request: TransferCompleteV1Request? = null) : Unit { - val localVarResponse = phase3TransferCompleteRequestV1WithHttpInfo(transferCompleteV1Request = transferCompleteV1Request) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param transferCompleteV1Request (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun phase3TransferCompleteRequestV1WithHttpInfo(transferCompleteV1Request: TransferCompleteV1Request?) : ApiResponse { - val localVariableConfig = phase3TransferCompleteRequestV1RequestConfig(transferCompleteV1Request = transferCompleteV1Request) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation phase3TransferCompleteRequestV1 - * - * @param transferCompleteV1Request (optional) - * @return RequestConfig - */ - fun phase3TransferCompleteRequestV1RequestConfig(transferCompleteV1Request: TransferCompleteV1Request?) : RequestConfig { - val localVariableBody = transferCompleteV1Request - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.GET, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverUpdateAckV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverUpdateAckV1Message(recoverUpdateAckV1Message: RecoverUpdateAckV1Message? = null) : Unit { - val localVarResponse = recoverUpdateAckV1MessageWithHttpInfo(recoverUpdateAckV1Message = recoverUpdateAckV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverUpdateAckV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverUpdateAckV1MessageWithHttpInfo(recoverUpdateAckV1Message: RecoverUpdateAckV1Message?) : ApiResponse { - val localVariableConfig = recoverUpdateAckV1MessageRequestConfig(recoverUpdateAckV1Message = recoverUpdateAckV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverUpdateAckV1Message - * - * @param recoverUpdateAckV1Message (optional) - * @return RequestConfig - */ - fun recoverUpdateAckV1MessageRequestConfig(recoverUpdateAckV1Message: RecoverUpdateAckV1Message?) : RequestConfig { - val localVariableBody = recoverUpdateAckV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverUpdateV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverUpdateV1Message(recoverUpdateV1Message: RecoverUpdateV1Message? = null) : Unit { - val localVarResponse = recoverUpdateV1MessageWithHttpInfo(recoverUpdateV1Message = recoverUpdateV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverUpdateV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverUpdateV1MessageWithHttpInfo(recoverUpdateV1Message: RecoverUpdateV1Message?) : ApiResponse { - val localVariableConfig = recoverUpdateV1MessageRequestConfig(recoverUpdateV1Message = recoverUpdateV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverUpdateV1Message - * - * @param recoverUpdateV1Message (optional) - * @return RequestConfig - */ - fun recoverUpdateV1MessageRequestConfig(recoverUpdateV1Message: RecoverUpdateV1Message?) : RequestConfig { - val localVariableBody = recoverUpdateV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverV1Message(recoverV1Message: RecoverV1Message? = null) : Unit { - val localVarResponse = recoverV1MessageWithHttpInfo(recoverV1Message = recoverV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverV1MessageWithHttpInfo(recoverV1Message: RecoverV1Message?) : ApiResponse { - val localVariableConfig = recoverV1MessageRequestConfig(recoverV1Message = recoverV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverV1Message - * - * @param recoverV1Message (optional) - * @return RequestConfig - */ - fun recoverV1MessageRequestConfig(recoverV1Message: RecoverV1Message?) : RequestConfig { - val localVariableBody = recoverV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param recoverSuccessV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun recoverV1Success(recoverSuccessV1Message: RecoverSuccessV1Message? = null) : Unit { - val localVarResponse = recoverV1SuccessWithHttpInfo(recoverSuccessV1Message = recoverSuccessV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param recoverSuccessV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun recoverV1SuccessWithHttpInfo(recoverSuccessV1Message: RecoverSuccessV1Message?) : ApiResponse { - val localVariableConfig = recoverV1SuccessRequestConfig(recoverSuccessV1Message = recoverSuccessV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation recoverV1Success - * - * @param recoverSuccessV1Message (optional) - * @return RequestConfig - */ - fun recoverV1SuccessRequestConfig(recoverSuccessV1Message: RecoverSuccessV1Message?) : RequestConfig { - val localVariableBody = recoverSuccessV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param rollbackAckV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun rollbackAckV1Message(rollbackAckV1Message: RollbackAckV1Message? = null) : Unit { - val localVarResponse = rollbackAckV1MessageWithHttpInfo(rollbackAckV1Message = rollbackAckV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param rollbackAckV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun rollbackAckV1MessageWithHttpInfo(rollbackAckV1Message: RollbackAckV1Message?) : ApiResponse { - val localVariableConfig = rollbackAckV1MessageRequestConfig(rollbackAckV1Message = rollbackAckV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation rollbackAckV1Message - * - * @param rollbackAckV1Message (optional) - * @return RequestConfig - */ - fun rollbackAckV1MessageRequestConfig(rollbackAckV1Message: RollbackAckV1Message?) : RequestConfig { - val localVariableBody = rollbackAckV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - /** - * - * - * @param rollbackV1Message (optional) - * @return void - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - * @throws UnsupportedOperationException If the API returns an informational or redirection response - * @throws ClientException If the API returns a client error response - * @throws ServerException If the API returns a server error response - */ - @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun rollbackV1Message(rollbackV1Message: RollbackV1Message? = null) : Unit { - val localVarResponse = rollbackV1MessageWithHttpInfo(rollbackV1Message = rollbackV1Message) - - return when (localVarResponse.responseType) { - ResponseType.Success -> Unit - ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") - ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") - ResponseType.ClientError -> { - val localVarError = localVarResponse as ClientError<*> - throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - ResponseType.ServerError -> { - val localVarError = localVarResponse as ServerError<*> - throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) - } - } - } - - /** - * - * - * @param rollbackV1Message (optional) - * @return ApiResponse - * @throws IllegalStateException If the request is not correctly configured - * @throws IOException Rethrows the OkHttp execute method exception - */ - @Throws(IllegalStateException::class, IOException::class) - fun rollbackV1MessageWithHttpInfo(rollbackV1Message: RollbackV1Message?) : ApiResponse { - val localVariableConfig = rollbackV1MessageRequestConfig(rollbackV1Message = rollbackV1Message) - - return request( - localVariableConfig - ) - } - - /** - * To obtain the request config of the operation rollbackV1Message - * - * @param rollbackV1Message (optional) - * @return RequestConfig - */ - fun rollbackV1MessageRequestConfig(rollbackV1Message: RollbackV1Message?) : RequestConfig { - val localVariableBody = rollbackV1Message - val localVariableQuery: MultiValueMap = mutableMapOf() - val localVariableHeaders: MutableMap = mutableMapOf() - localVariableHeaders["Content-Type"] = "application/json" - - return RequestConfig( - method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = false, - body = localVariableBody - ) - } - - - private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = - HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt deleted file mode 100644 index ef7a8f1e1a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -typealias MultiValueMap = MutableMap> - -fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { - "csv" -> "," - "tsv" -> "\t" - "pipe" -> "|" - "space" -> " " - else -> "" -} - -val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } - -fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) - = toMultiValue(items.asIterable(), collectionFormat, map) - -fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { - return when(collectionFormat) { - "multi" -> items.map(map) - else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt deleted file mode 100644 index ea4b7b6593..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ /dev/null @@ -1,245 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.OkHttpClient -import okhttp3.RequestBody -import okhttp3.RequestBody.Companion.asRequestBody -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.FormBody -import okhttp3.HttpUrl.Companion.toHttpUrlOrNull -import okhttp3.ResponseBody -import okhttp3.MediaType.Companion.toMediaTypeOrNull -import okhttp3.Request -import okhttp3.Headers -import okhttp3.Headers.Companion.toHeaders -import okhttp3.MultipartBody -import okhttp3.Call -import okhttp3.Callback -import okhttp3.Response -import okhttp3.internal.EMPTY_REQUEST -import java.io.BufferedWriter -import java.io.File -import java.io.FileWriter -import java.io.IOException -import java.net.URLConnection -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.OffsetDateTime -import java.time.OffsetTime -import java.util.Locale -import com.squareup.moshi.adapter - -open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { - companion object { - protected const val ContentType = "Content-Type" - protected const val Accept = "Accept" - protected const val Authorization = "Authorization" - protected const val JsonMediaType = "application/json" - protected const val FormDataMediaType = "multipart/form-data" - protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" - protected const val XmlMediaType = "application/xml" - - val apiKey: MutableMap = mutableMapOf() - val apiKeyPrefix: MutableMap = mutableMapOf() - var username: String? = null - var password: String? = null - var accessToken: String? = null - const val baseUrlKey = "org.openapitools.client.baseUrl" - - @JvmStatic - val defaultClient: OkHttpClient by lazy { - builder.build() - } - - @JvmStatic - val builder: OkHttpClient.Builder = OkHttpClient.Builder() - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - protected fun guessContentTypeFromFile(file: File): String { - val contentType = URLConnection.guessContentTypeFromName(file.name) - return contentType ?: "application/octet-stream" - } - - protected inline fun requestBody(content: T, mediaType: String?): RequestBody = - when { - content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) - mediaType == FormDataMediaType -> - MultipartBody.Builder() - .setType(MultipartBody.FORM) - .apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - if (part.body is File) { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") - val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() - addPart( - partHeaders.toHeaders(), - part.body.asRequestBody(fileMediaType) - ) - } else { - val partHeaders = part.headers.toMutableMap() + - ("Content-Disposition" to "form-data; name=\"$name\"") - addPart( - partHeaders.toHeaders(), - parameterToString(part.body).toRequestBody(null) - ) - } - } - }.build() - mediaType == FormUrlEncMediaType -> { - FormBody.Builder().apply { - // content's type *must* be Map> - @Suppress("UNCHECKED_CAST") - (content as Map>).forEach { (name, part) -> - add(name, parameterToString(part.body)) - } - }.build() - } - mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> - if (content == null) { - EMPTY_REQUEST - } else { - Serializer.moshi.adapter(T::class.java).toJson(content) - .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) - } - mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") - // TODO: this should be extended with other serializers - else -> throw UnsupportedOperationException("requestBody currently only supports JSON body and File body.") - } - - @OptIn(ExperimentalStdlibApi::class) - protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { - if(body == null) { - return null - } - if (T::class.java == File::class.java) { - // return tempFile - // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options - val tempFile = java.nio.file.Files.createTempFile("tmp.org.openapitools.client", null).toFile() - tempFile.deleteOnExit() - body.byteStream().use { inputStream -> - tempFile.outputStream().use { tempFileOutputStream -> - inputStream.copyTo(tempFileOutputStream) - } - } - return tempFile as T - } - val bodyContent = body.string() - if (bodyContent.isEmpty()) { - return null - } - return when { - mediaType==null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> - Serializer.moshi.adapter().fromJson(bodyContent) - else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") - } - } - - - protected inline fun request(requestConfig: RequestConfig): ApiResponse { - val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") - - val url = httpUrl.newBuilder() - .addEncodedPathSegments(requestConfig.path.trimStart('/')) - .apply { - requestConfig.query.forEach { query -> - query.value.forEach { queryValue -> - addQueryParameter(query.key, queryValue) - } - } - }.build() - - // take content-type/accept from spec or set to default (application/json) if not defined - if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { - requestConfig.headers[ContentType] = JsonMediaType - } - if (requestConfig.headers[Accept].isNullOrEmpty()) { - requestConfig.headers[Accept] = JsonMediaType - } - val headers = requestConfig.headers - - if (headers[Accept].isNullOrEmpty()) { - throw kotlin.IllegalStateException("Missing Accept header. This is required.") - } - - val contentType = if (headers[ContentType] != null) { - // TODO: support multiple contentType options here. - (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) - } else { - null - } - - val request = when (requestConfig.method) { - RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) - RequestMethod.GET -> Request.Builder().url(url) - RequestMethod.HEAD -> Request.Builder().url(url).head() - RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) - RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) - RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) - RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) - }.apply { - headers.forEach { header -> addHeader(header.key, header.value) } - }.build() - - val response = client.newCall(request).execute() - - val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) - - // TODO: handle specific mapping types. e.g. Map> - return when { - response.isRedirect -> Redirection( - response.code, - response.headers.toMultimap() - ) - response.isInformational -> Informational( - response.message, - response.code, - response.headers.toMultimap() - ) - response.isSuccessful -> Success( - responseBody(response.body, accept), - response.code, - response.headers.toMultimap() - ) - response.isClientError -> ClientError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - else -> ServerError( - response.message, - response.body?.string(), - response.code, - response.headers.toMultimap() - ) - } - } - - protected fun parameterToString(value: Any?): String = when (value) { - null -> "" - is Array<*> -> toMultiValue(value, "csv").toString() - is Iterable<*> -> toMultiValue(value, "csv").toString() - is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> - parseDateToQueryString(value) - else -> value.toString() - } - - protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt deleted file mode 100644 index cf2cfaa95d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.infrastructure - -enum class ResponseType { - Success, Informational, Redirection, ClientError, ServerError -} - -interface Response - -abstract class ApiResponse(val responseType: ResponseType): Response { - abstract val statusCode: Int - abstract val headers: Map> -} - -class Success( - val data: T, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -): ApiResponse(ResponseType.Success) - -class Informational( - val statusText: String, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Informational) - -class Redirection( - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.Redirection) - -class ClientError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> = mapOf() -) : ApiResponse(ResponseType.ClientError) - -class ServerError( - val message: String? = null, - val body: Any? = null, - override val statusCode: Int = -1, - override val headers: Map> -): ApiResponse(ResponseType.ServerError) diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt deleted file mode 100644 index 064b57fc6b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigDecimal - -class BigDecimalAdapter { - @ToJson - fun toJson(value: BigDecimal): String { - return value.toPlainString() - } - - @FromJson - fun fromJson(value: String): BigDecimal { - return BigDecimal(value) - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt deleted file mode 100644 index 7df6057b45..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.math.BigInteger - -class BigIntegerAdapter { - @ToJson - fun toJson(value: BigInteger): String { - return value.toString() - } - - @FromJson - fun fromJson(value: String): BigInteger { - return BigInteger(value) - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt deleted file mode 100644 index ff5e2a81ee..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt +++ /dev/null @@ -1,12 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson - -class ByteArrayAdapter { - @ToJson - fun toJson(data: ByteArray): String = String(data) - - @FromJson - fun fromJson(data: String): ByteArray = data.toByteArray() -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt deleted file mode 100644 index b5310e71f1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("unused") -package org.openapitools.client.infrastructure - -import java.lang.RuntimeException - -open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 123L - } -} - -open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { - - companion object { - private const val serialVersionUID: Long = 456L - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt deleted file mode 100644 index b2e1654479..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class LocalDateAdapter { - @ToJson - fun toJson(value: LocalDate): String { - return DateTimeFormatter.ISO_LOCAL_DATE.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDate { - return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) - } - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt deleted file mode 100644 index e082db9481..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter - -class LocalDateTimeAdapter { - @ToJson - fun toJson(value: LocalDateTime): String { - return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): LocalDateTime { - return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt deleted file mode 100644 index 87437871a3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.time.OffsetDateTime -import java.time.format.DateTimeFormatter - -class OffsetDateTimeAdapter { - @ToJson - fun toJson(value: OffsetDateTime): String { - return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) - } - - @FromJson - fun fromJson(value: String): OffsetDateTime { - return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) - } - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt deleted file mode 100644 index be00e38fba..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given part of a multi-part request. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class PartConfig( - val headers: MutableMap = mutableMapOf(), - val body: T? = null -) diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt deleted file mode 100644 index 625a19002b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Defines a config object for a given request. - * NOTE: This object doesn't include 'body' because it - * allows for caching of the constructed object - * for many request definitions. - * NOTE: Headers is a Map because rfc2616 defines - * multi-valued headers as csv-only. - */ -data class RequestConfig( - val method: RequestMethod, - val path: String, - val headers: MutableMap = mutableMapOf(), - val query: MutableMap> = mutableMapOf(), - val requiresAuthentication: Boolean, - val body: T? = null -) \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt deleted file mode 100644 index 931b12b8bd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.openapitools.client.infrastructure - -/** - * Provides enumerated HTTP verbs - */ -enum class RequestMethod { - GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt deleted file mode 100644 index 9bd2790dc1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt +++ /dev/null @@ -1,24 +0,0 @@ -package org.openapitools.client.infrastructure - -import okhttp3.Response - -/** - * Provides an extension to evaluation whether the response is a 1xx code - */ -val Response.isInformational : Boolean get() = this.code in 100..199 - -/** - * Provides an extension to evaluation whether the response is a 3xx code - */ -@Suppress("EXTENSION_SHADOWED_BY_MEMBER") -val Response.isRedirect : Boolean get() = this.code in 300..399 - -/** - * Provides an extension to evaluation whether the response is a 4xx code - */ -val Response.isClientError : Boolean get() = this.code in 400..499 - -/** - * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code - */ -val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt deleted file mode 100644 index e22592e47d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.Moshi -import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory - -object Serializer { - @JvmStatic - val moshiBuilder: Moshi.Builder = Moshi.Builder() - .add(OffsetDateTimeAdapter()) - .add(LocalDateTimeAdapter()) - .add(LocalDateAdapter()) - .add(UUIDAdapter()) - .add(ByteArrayAdapter()) - .add(URIAdapter()) - .add(KotlinJsonAdapterFactory()) - .add(BigDecimalAdapter()) - .add(BigIntegerAdapter()) - - @JvmStatic - val moshi: Moshi by lazy { - moshiBuilder.build() - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt deleted file mode 100644 index 927522757d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.net.URI - -class URIAdapter { - @ToJson - fun toJson(uri: URI) = uri.toString() - - @FromJson - fun fromJson(s: String): URI = URI.create(s) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt deleted file mode 100644 index 7ccf7dc25d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.openapitools.client.infrastructure - -import com.squareup.moshi.FromJson -import com.squareup.moshi.ToJson -import java.util.UUID - -class UUIDAdapter { - @ToJson - fun toJson(uuid: UUID) = uuid.toString() - - @FromJson - fun fromJson(s: String): UUID = UUID.fromString(s) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt deleted file mode 100644 index d3c7e00fa7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param expirationDate - * @param issuer - * @param assetCode - * @param assetCodeType - * @param issuanceDate - * @param verificationEndPoint - * @param digitalSignature - * @param prospectusLink - * @param keyInformationLink - * @param keyWord - * @param transferRestriction - * @param ledgerRequirements - */ - - -data class AssetProfile ( - - @Json(name = "expirationDate") - val expirationDate: kotlin.String, - - @Json(name = "issuer") - val issuer: kotlin.String? = null, - - @Json(name = "assetCode") - val assetCode: kotlin.String? = null, - - @Json(name = "assetCodeType") - val assetCodeType: kotlin.String? = null, - - @Json(name = "issuanceDate") - val issuanceDate: kotlin.String? = null, - - @Json(name = "verificationEndPoint") - val verificationEndPoint: kotlin.String? = null, - - @Json(name = "digitalSignature") - val digitalSignature: kotlin.String? = null, - - @Json(name = "prospectusLink") - val prospectusLink: kotlin.String? = null, - - @Json(name = "keyInformationLink") - val keyInformationLink: kotlin.collections.List? = null, - - @Json(name = "keyWord") - val keyWord: kotlin.collections.List? = null, - - @Json(name = "transferRestriction") - val transferRestriction: kotlin.collections.List? = null, - - @Json(name = "ledgerRequirements") - val ledgerRequirements: kotlin.collections.List? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt deleted file mode 100644 index bbf1fbb1a0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt +++ /dev/null @@ -1,122 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.AssetProfile -import org.openapitools.client.models.ClientV1RequestClientGatewayConfiguration -import org.openapitools.client.models.PayloadProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param version - * @param loggingProfile - * @param accessControlProfile - * @param assetControlProfile - * @param applicationProfile - * @param assetProfile - * @param payloadProfile - * @param sourceGatewayDltSystem - * @param recipientGatewayDltSystem - * @param recipientGatewayPubkey - * @param originatorPubkey - * @param beneficiaryPubkey - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param clientDltSystem - * @param serverDltSystem - * @param clientGatewayConfiguration - * @param serverGatewayConfiguration - * @param maxRetries - * @param maxTimeout - * @param sourceLedgerAssetID - * @param recipientLedgerAssetID - */ - - -data class ClientV1Request ( - - @Json(name = "version") - val version: kotlin.String, - - @Json(name = "loggingProfile") - val loggingProfile: kotlin.String, - - @Json(name = "accessControlProfile") - val accessControlProfile: kotlin.String, - - @Json(name = "assetControlProfile") - val assetControlProfile: kotlin.String, - - @Json(name = "applicationProfile") - val applicationProfile: kotlin.String, - - @Json(name = "assetProfile") - val assetProfile: AssetProfile, - - @Json(name = "payloadProfile") - val payloadProfile: PayloadProfile, - - @Json(name = "sourceGatewayDltSystem") - val sourceGatewayDltSystem: kotlin.String, - - @Json(name = "recipientGatewayDltSystem") - val recipientGatewayDltSystem: kotlin.String, - - @Json(name = "recipientGatewayPubkey") - val recipientGatewayPubkey: kotlin.String, - - @Json(name = "originatorPubkey") - val originatorPubkey: kotlin.String, - - @Json(name = "beneficiaryPubkey") - val beneficiaryPubkey: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "clientDltSystem") - val clientDltSystem: kotlin.String, - - @Json(name = "serverDltSystem") - val serverDltSystem: kotlin.String, - - @Json(name = "clientGatewayConfiguration") - val clientGatewayConfiguration: ClientV1RequestClientGatewayConfiguration, - - @Json(name = "serverGatewayConfiguration") - val serverGatewayConfiguration: ClientV1RequestClientGatewayConfiguration, - - @Json(name = "maxRetries") - val maxRetries: java.math.BigDecimal, - - @Json(name = "maxTimeout") - val maxTimeout: java.math.BigDecimal, - - @Json(name = "sourceLedgerAssetID") - val sourceLedgerAssetID: kotlin.String, - - @Json(name = "recipientLedgerAssetID") - val recipientLedgerAssetID: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt deleted file mode 100644 index ef6b9f8314..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param apiHost - */ - - -data class ClientV1RequestClientGatewayConfiguration ( - - @Json(name = "apiHost") - val apiHost: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt deleted file mode 100644 index 502356b737..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param commitFinalClaim - * @param hashCommitPrepareAck - * @param signature - * @param sequenceNumber - * @param commitFinalClaimFormat - * @param clientTransferNumber - */ - - -data class CommitFinalV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "commitFinalClaim") - val commitFinalClaim: kotlin.String, - - @Json(name = "hashCommitPrepareAck") - val hashCommitPrepareAck: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "commitFinalClaimFormat") - val commitFinalClaimFormat: kotlin.Any? = null, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt deleted file mode 100644 index 727afa6a98..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt +++ /dev/null @@ -1,71 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param commitAcknowledgementClaim - * @param hashCommitFinal - * @param signature - * @param sequenceNumber - * @param commitAcknowledgementClaimFormat - * @param serverTransferNumber - */ - - -data class CommitFinalV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "commitAcknowledgementClaim") - val commitAcknowledgementClaim: kotlin.String, - - @Json(name = "hashCommitFinal") - val hashCommitFinal: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "commitAcknowledgementClaimFormat") - val commitAcknowledgementClaimFormat: kotlin.Any? = null, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt deleted file mode 100644 index 8373145314..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashLockEvidenceAck - * @param signature - * @param sequenceNumber - * @param clientTransferNumber - */ - - -data class CommitPreparationV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashLockEvidenceAck") - val hashLockEvidenceAck: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt deleted file mode 100644 index fb5c974147..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashCommitPrep - * @param signature - * @param sequenceNumber - * @param serverTransferNumber - */ - - -data class CommitPreparationV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashCommitPrep") - val hashCommitPrep: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt deleted file mode 100644 index 3d99d1cf90..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt +++ /dev/null @@ -1,66 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * Values: sAML,oAUTH,x509 - */ - -@JsonClass(generateAdapter = false) -enum class CredentialProfile(val value: kotlin.String) { - - @Json(name = "SAML") - sAML("SAML"), - - @Json(name = "OAUTH") - oAUTH("OAUTH"), - - @Json(name = "X509") - x509("X509"); - - /** - * Override [toString()] to avoid using the enum variable name as the value, and instead use - * the actual value defined in the API spec file. - * - * This solves a problem when the variable name and its value are different, and ensures that - * the client sends the correct enum values to the server always. - */ - override fun toString(): String = value - - companion object { - /** - * Converts the provided [data] to a [String] on success, null otherwise. - */ - fun encode(data: kotlin.Any?): kotlin.String? = if (data is CredentialProfile) "$data" else null - - /** - * Returns a valid [CredentialProfile] for [data], null otherwise. - */ - fun decode(data: kotlin.Any?): CredentialProfile? = data?.let { - val normalizedData = "$it".lowercase() - values().firstOrNull { value -> - it == value || normalizedData == "$value".lowercase() - } - } - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt deleted file mode 100644 index 51eb5a02ad..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param transactions - * @param actions - * @param origin - * @param destination - * @param balance - * @param currentStatus - * @param applicationSpecificParameters - */ - - -data class History ( - - @Json(name = "Transactions") - val transactions: kotlin.collections.List? = null, - - @Json(name = "Actions") - val actions: kotlin.collections.List? = null, - - @Json(name = "Origin") - val origin: kotlin.String? = null, - - @Json(name = "Destination") - val destination: kotlin.String? = null, - - @Json(name = "Balance") - val balance: kotlin.String? = null, - - @Json(name = "CurrentStatus") - val currentStatus: kotlin.Any? = null, - - @Json(name = "ApplicationSpecificParameters") - val applicationSpecificParameters: kotlin.Any? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt deleted file mode 100644 index 2e97f18138..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param type - * @param operation - * @param key - * @param `data` - * @param timestamp - */ - - -data class LocalLog ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "type") - val type: kotlin.String, - - @Json(name = "operation") - val operation: kotlin.String, - - @Json(name = "key") - val key: kotlin.String? = null, - - @Json(name = "data") - val `data`: kotlin.String? = null, - - @Json(name = "timestamp") - val timestamp: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt deleted file mode 100644 index f16479bb7d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param lockEvidenceClaim - * @param lockEvidenceExpiration - * @param hashCommenceAckRequest - * @param signature - * @param messageType - * @param sequenceNumber - * @param lockEvidenceFormat - * @param clientTransferNumber - * @param messageHash - */ - - -data class LockEvidenceV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "lockEvidenceClaim") - val lockEvidenceClaim: kotlin.String, - - @Json(name = "lockEvidenceExpiration") - val lockEvidenceExpiration: kotlin.String, - - @Json(name = "hashCommenceAckRequest") - val hashCommenceAckRequest: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "lockEvidenceFormat") - val lockEvidenceFormat: kotlin.Any? = null, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null, - - @Json(name = "messageHash") - val messageHash: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt deleted file mode 100644 index d9eb294a3c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashLockEvidenceRequest - * @param signature - * @param messageType - * @param sequenceNumber - * @param serverTransferNumber - */ - - -data class LockEvidenceV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashLockEvidenceRequest") - val hashLockEvidenceRequest: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt deleted file mode 100644 index fdf0abc5ff..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.AssetProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param assetProfile - * @param capabilities - */ - - -data class PayloadProfile ( - - @Json(name = "assetProfile") - val assetProfile: AssetProfile, - - @Json(name = "capabilities") - val capabilities: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt deleted file mode 100644 index 276b2c241d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param signature - */ - - -data class RecoverSuccessV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt deleted file mode 100644 index 067d8d4584..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param changedEntriesHash - * @param signature - */ - - -data class RecoverUpdateAckV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "changedEntriesHash") - val changedEntriesHash: kotlin.collections.List, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt deleted file mode 100644 index 67ed45d0ce..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt +++ /dev/null @@ -1,44 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.LocalLog - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param recoveredLogs - * @param signature - */ - - -data class RecoverUpdateV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "recoveredLogs") - val recoveredLogs: kotlin.collections.List, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt deleted file mode 100644 index cc371150fb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param odapPhase - * @param sequenceNumber - * @param lastLogEntryTimestamp - * @param isBackup - * @param newBasePath - * @param signature - * @param newGatewayPubKey - */ - - -data class RecoverV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "odapPhase") - val odapPhase: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "lastLogEntryTimestamp") - val lastLogEntryTimestamp: kotlin.String, - - @Json(name = "isBackup") - val isBackup: kotlin.Boolean, - - @Json(name = "newBasePath") - val newBasePath: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "newGatewayPubKey") - val newGatewayPubKey: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt deleted file mode 100644 index e797025122..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt +++ /dev/null @@ -1,43 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param signature - */ - - -data class RollbackAckV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt deleted file mode 100644 index ddfee9c37b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param success - * @param actionPerformed - * @param proofs - * @param signature - */ - - -data class RollbackV1Message ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "success") - val success: kotlin.Boolean, - - @Json(name = "actionPerformed") - val actionPerformed: kotlin.collections.List, - - @Json(name = "proofs") - val proofs: kotlin.collections.List, - - @Json(name = "signature") - val signature: kotlin.String - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt deleted file mode 100644 index ac22e1499d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessage.kt +++ /dev/null @@ -1,105 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.PayloadProfile -import org.openapitools.client.models.SatpMessageActionResponse - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sequenceNumber - * @param phase - * @param resourceURL - * @param developerURN - * @param actionResponse - * @param credentialProfile - * @param credentialBlock - * @param credentialsProfile - * @param applicationProfile - * @param payload - * @param payloadHash - * @param messageSignature - */ - - -data class SatpMessage ( - - @Json(name = "SequenceNumber") - val sequenceNumber: java.math.BigDecimal? = null, - - @Json(name = "Phase") - val phase: SatpMessage.Phase? = null, - - @Json(name = "ResourceURL") - val resourceURL: kotlin.String? = null, - - @Json(name = "DeveloperURN") - val developerURN: kotlin.String? = null, - - @Json(name = "ActionResponse") - val actionResponse: SatpMessageActionResponse? = null, - - @Json(name = "CredentialProfile") - val credentialProfile: SatpMessage.CredentialProfile? = null, - - @Json(name = "CredentialBlock") - val credentialBlock: kotlin.collections.List? = null, - - @Json(name = "CredentialsProfile") - val credentialsProfile: PayloadProfile? = null, - - @Json(name = "ApplicationProfile") - val applicationProfile: kotlin.Any? = null, - - @Json(name = "Payload") - val payload: kotlin.Any? = null, - - @Json(name = "PayloadHash") - val payloadHash: kotlin.String? = null, - - @Json(name = "MessageSignature") - val messageSignature: kotlin.String? = null - -) { - - /** - * - * - * Values: transferInitialization,lockEvidenceVerification,commitmentEstablishment - */ - @JsonClass(generateAdapter = false) - enum class Phase(val value: kotlin.String) { - @Json(name = "TransferInitialization") transferInitialization("TransferInitialization"), - @Json(name = "LockEvidenceVerification") lockEvidenceVerification("LockEvidenceVerification"), - @Json(name = "CommitmentEstablishment") commitmentEstablishment("CommitmentEstablishment"); - } - /** - * - * - * Values: sAML,oAuth,x509 - */ - @JsonClass(generateAdapter = false) - enum class CredentialProfile(val value: kotlin.String) { - @Json(name = "SAML") sAML("SAML"), - @Json(name = "OAuth") oAuth("OAuth"), - @Json(name = "X509") x509("X509"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt deleted file mode 100644 index a636e823f0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SatpMessageActionResponse.kt +++ /dev/null @@ -1,51 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param responseCode - * @param arguments - */ - - -data class SatpMessageActionResponse ( - - @Json(name = "ResponseCode") - val responseCode: SatpMessageActionResponse.ResponseCode? = null, - - @Json(name = "Arguments") - val arguments: kotlin.collections.List? = null - -) { - - /** - * - * - * Values: OK,RESOURCE_NOT_FOUND - */ - @JsonClass(generateAdapter = false) - enum class ResponseCode(val value: kotlin.String) { - @Json(name = "200") OK("200"), - @Json(name = "404") RESOURCE_NOT_FOUND("404"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt deleted file mode 100644 index a8602e662f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt +++ /dev/null @@ -1,291 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.AssetProfile -import org.openapitools.client.models.PayloadProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param step - * @param version - * @param lastSequenceNumber - * @param loggingProfile - * @param accessControlProfile - * @param applicationProfile - * @param payloadProfile - * @param assetProfile - * @param allowedSourceBackupGateways - * @param allowedRecipientBackupGateways - * @param sourceBasePath - * @param recipientBasePath - * @param originatorPubkey - * @param beneficiaryPubkey - * @param sourceGatewayPubkey - * @param sourceGatewayDltSystem - * @param recipientGatewayPubkey - * @param recipientGatewayDltSystem - * @param initializationRequestMessageHash - * @param initializationResponseMessageHash - * @param initializationRequestMessageRcvTimeStamp - * @param initializationRequestMessageProcessedTimeStamp - * @param clientSignatureInitializationRequestMessage - * @param serverSignatureInitializationResponseMessage - * @param transferCommenceMessageRequestHash - * @param transferCommenceMessageResponseHash - * @param clientSignatureTransferCommenceRequestMessage - * @param serverSignatureTransferCommenceResponseMessage - * @param lockEvidenceRequestMessageHash - * @param lockEvidenceResponseMessageHash - * @param clientSignatureLockEvidenceRequestMessage - * @param serverSignatureLockEvidenceResponseMessage - * @param lockEvidenceClaim - * @param commitPrepareRequestMessageHash - * @param commitPrepareResponseMessageHash - * @param clientSignatureCommitPreparationRequestMessage - * @param serverSignatureCommitPreparationResponseMessage - * @param commitFinalRequestMessageHash - * @param commitFinalResponseMessageHash - * @param commitFinalClaim - * @param commitFinalClaimFormat - * @param commitAcknowledgementClaim - * @param commitAcknowledgementClaimFormat - * @param clientSignatureCommitFinalRequestMessage - * @param serverSignatureCommitFinalResponseMessage - * @param transferCompleteMessageHash - * @param clientSignatureTransferCompleteMessage - * @param maxRetries - * @param recipientLedgerAssetID - * @param sourceLedgerAssetID - * @param maxTimeout - * @param lastLogEntryTimestamp - * @param unlockAssetClaim - * @param recreateAssetClaim - * @param deleteAssetClaim - * @param lastMessageReceivedTimestamp - * @param rollback - * @param rollbackMessageHash - * @param rollbackProofs - * @param rollbackActionsPerformed - */ - - -data class SessionData ( - - @Json(name = "id") - val id: kotlin.String? = null, - - @Json(name = "step") - val step: java.math.BigDecimal? = null, - - @Json(name = "version") - val version: kotlin.String? = null, - - @Json(name = "lastSequenceNumber") - val lastSequenceNumber: java.math.BigDecimal? = null, - - @Json(name = "loggingProfile") - val loggingProfile: kotlin.String? = null, - - @Json(name = "accessControlProfile") - val accessControlProfile: kotlin.String? = null, - - @Json(name = "applicationProfile") - val applicationProfile: kotlin.String? = null, - - @Json(name = "payloadProfile") - val payloadProfile: PayloadProfile? = null, - - @Json(name = "assetProfile") - val assetProfile: AssetProfile? = null, - - @Json(name = "allowedSourceBackupGateways") - val allowedSourceBackupGateways: kotlin.collections.List? = null, - - @Json(name = "allowedRecipientBackupGateways") - val allowedRecipientBackupGateways: kotlin.collections.List? = null, - - @Json(name = "sourceBasePath") - val sourceBasePath: kotlin.String? = null, - - @Json(name = "recipientBasePath") - val recipientBasePath: kotlin.String? = null, - - @Json(name = "originatorPubkey") - val originatorPubkey: kotlin.String? = null, - - @Json(name = "beneficiaryPubkey") - val beneficiaryPubkey: kotlin.String? = null, - - @Json(name = "sourceGatewayPubkey") - val sourceGatewayPubkey: kotlin.String? = null, - - @Json(name = "sourceGatewayDltSystem") - val sourceGatewayDltSystem: kotlin.String? = null, - - @Json(name = "recipientGatewayPubkey") - val recipientGatewayPubkey: kotlin.String? = null, - - @Json(name = "recipientGatewayDltSystem") - val recipientGatewayDltSystem: kotlin.String? = null, - - @Json(name = "initializationRequestMessageHash") - val initializationRequestMessageHash: kotlin.String? = null, - - @Json(name = "initializationResponseMessageHash") - val initializationResponseMessageHash: kotlin.String? = null, - - @Json(name = "initializationRequestMessageRcvTimeStamp") - val initializationRequestMessageRcvTimeStamp: kotlin.String? = null, - - @Json(name = "initializationRequestMessageProcessedTimeStamp") - val initializationRequestMessageProcessedTimeStamp: kotlin.String? = null, - - @Json(name = "clientSignatureInitializationRequestMessage") - val clientSignatureInitializationRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureInitializationResponseMessage") - val serverSignatureInitializationResponseMessage: kotlin.String? = null, - - @Json(name = "transferCommenceMessageRequestHash") - val transferCommenceMessageRequestHash: kotlin.String? = null, - - @Json(name = "transferCommenceMessageResponseHash") - val transferCommenceMessageResponseHash: kotlin.String? = null, - - @Json(name = "clientSignatureTransferCommenceRequestMessage") - val clientSignatureTransferCommenceRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureTransferCommenceResponseMessage") - val serverSignatureTransferCommenceResponseMessage: kotlin.String? = null, - - @Json(name = "lockEvidenceRequestMessageHash") - val lockEvidenceRequestMessageHash: kotlin.String? = null, - - @Json(name = "lockEvidenceResponseMessageHash") - val lockEvidenceResponseMessageHash: kotlin.String? = null, - - @Json(name = "clientSignatureLockEvidenceRequestMessage") - val clientSignatureLockEvidenceRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureLockEvidenceResponseMessage") - val serverSignatureLockEvidenceResponseMessage: kotlin.String? = null, - - @Json(name = "lockEvidenceClaim") - val lockEvidenceClaim: kotlin.String? = null, - - @Json(name = "commitPrepareRequestMessageHash") - val commitPrepareRequestMessageHash: kotlin.String? = null, - - @Json(name = "commitPrepareResponseMessageHash") - val commitPrepareResponseMessageHash: kotlin.String? = null, - - @Json(name = "clientSignatureCommitPreparationRequestMessage") - val clientSignatureCommitPreparationRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureCommitPreparationResponseMessage") - val serverSignatureCommitPreparationResponseMessage: kotlin.String? = null, - - @Json(name = "commitFinalRequestMessageHash") - val commitFinalRequestMessageHash: kotlin.String? = null, - - @Json(name = "commitFinalResponseMessageHash") - val commitFinalResponseMessageHash: kotlin.String? = null, - - @Json(name = "commitFinalClaim") - val commitFinalClaim: kotlin.String? = null, - - @Json(name = "commitFinalClaimFormat") - val commitFinalClaimFormat: kotlin.String? = null, - - @Json(name = "commitAcknowledgementClaim") - val commitAcknowledgementClaim: kotlin.String? = null, - - @Json(name = "commitAcknowledgementClaimFormat") - val commitAcknowledgementClaimFormat: kotlin.String? = null, - - @Json(name = "clientSignatureCommitFinalRequestMessage") - val clientSignatureCommitFinalRequestMessage: kotlin.String? = null, - - @Json(name = "serverSignatureCommitFinalResponseMessage") - val serverSignatureCommitFinalResponseMessage: kotlin.String? = null, - - @Json(name = "transferCompleteMessageHash") - val transferCompleteMessageHash: kotlin.String? = null, - - @Json(name = "clientSignatureTransferCompleteMessage") - val clientSignatureTransferCompleteMessage: kotlin.String? = null, - - @Json(name = "maxRetries") - val maxRetries: java.math.BigDecimal? = null, - - @Json(name = "recipientLedgerAssetID") - val recipientLedgerAssetID: kotlin.String? = null, - - @Json(name = "sourceLedgerAssetID") - val sourceLedgerAssetID: kotlin.String? = null, - - @Json(name = "maxTimeout") - val maxTimeout: java.math.BigDecimal? = null, - - @Json(name = "lastLogEntryTimestamp") - val lastLogEntryTimestamp: kotlin.String? = null, - - @Json(name = "unlockAssetClaim") - val unlockAssetClaim: kotlin.String? = null, - - @Json(name = "recreateAssetClaim") - val recreateAssetClaim: kotlin.String? = null, - - @Json(name = "deleteAssetClaim") - val deleteAssetClaim: kotlin.String? = null, - - @Json(name = "lastMessageReceivedTimestamp") - val lastMessageReceivedTimestamp: kotlin.String? = null, - - @Json(name = "rollback") - val rollback: kotlin.Boolean? = null, - - @Json(name = "rollbackMessageHash") - val rollbackMessageHash: kotlin.String? = null, - - @Json(name = "rollbackProofs") - val rollbackProofs: kotlin.collections.List? = null, - - @Json(name = "rollbackActionsPerformed") - val rollbackActionsPerformed: kotlin.collections.List? = null - -) { - - /** - * - * - * Values: cREATE,dELETE,lOCK,uNLOCK - */ - @JsonClass(generateAdapter = false) - enum class RollbackActionsPerformed(val value: kotlin.String) { - @Json(name = "CREATE") cREATE("CREATE"), - @Json(name = "DELETE") dELETE("DELETE"), - @Json(name = "LOCK") lOCK("LOCK"), - @Json(name = "UNLOCK") uNLOCK("UNLOCK"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt deleted file mode 100644 index a2884109eb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt +++ /dev/null @@ -1,87 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param originatorPubkey - * @param beneficiaryPubkey - * @param senderDltSystem - * @param recipientDltSystem - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashAssetProfile - * @param hashPrevMessage - * @param signature - * @param sequenceNumber - * @param assetUnit - * @param clientTransferNumber - */ - - -data class TransferCommenceV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "originatorPubkey") - val originatorPubkey: kotlin.String, - - @Json(name = "beneficiaryPubkey") - val beneficiaryPubkey: kotlin.String, - - @Json(name = "senderDltSystem") - val senderDltSystem: kotlin.String, - - @Json(name = "recipientDltSystem") - val recipientDltSystem: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashAssetProfile") - val hashAssetProfile: kotlin.String, - - @Json(name = "hashPrevMessage") - val hashPrevMessage: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: kotlin.Int, - - @Json(name = "assetUnit") - val assetUnit: kotlin.Int? = null, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt deleted file mode 100644 index 20487e8c4a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashCommenceRequest - * @param signature - * @param messageType - * @param sequenceNumber - * @param serverTransferNumber - * @param messageHash - */ - - -data class TransferCommenceV1Response ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashCommenceRequest") - val hashCommenceRequest: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "serverTransferNumber") - val serverTransferNumber: kotlin.Int? = null, - - @Json(name = "messageHash") - val messageHash: kotlin.String? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt deleted file mode 100644 index 29e7088a28..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param sessionID - * @param messageType - * @param clientIdentityPubkey - * @param serverIdentityPubkey - * @param hashCommitFinalAck - * @param signature - * @param hashTransferCommence - * @param sequenceNumber - * @param clientTransferNumber - */ - - -data class TransferCompleteV1Request ( - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "clientIdentityPubkey") - val clientIdentityPubkey: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "hashCommitFinalAck") - val hashCommitFinalAck: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "hashTransferCommence") - val hashTransferCommence: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "clientTransferNumber") - val clientTransferNumber: kotlin.Int? = null - -) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt deleted file mode 100644 index bb9cc888d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt +++ /dev/null @@ -1,175 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - -import org.openapitools.client.models.CredentialProfile -import org.openapitools.client.models.History -import org.openapitools.client.models.PayloadProfile - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param messageType - * @param sessionID - * @param payloadProfile - * @param applicationProfile - * @param loggingProfile - * @param accessControlProfile - * @param signature - * @param sourceGatewayPubkey - * @param sourceGatewayDltSystem - * @param recipientGatewayPubkey - * @param recipientGatewayDltSystem - * @param sequenceNumber - * @param sourceBasePath - * @param recipientBasePath - * @param maxRetries - * @param maxTimeout - * @param backupGatewaysAllowed - * @param recipientLedgerAssetID - * @param sourceLedgerAssetID - * @param version - * @param developerURN - * @param credentialProfile - * @param escrowType - * @param expiryTime - * @param multipleClaimsAllowed - * @param multipleCancelsAllowed - * @param permissions - * @param origin - * @param destination - * @param subsequentCalls - * @param histories - */ - - -data class TransferInitializationV1Request ( - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "payloadProfile") - val payloadProfile: PayloadProfile, - - @Json(name = "applicationProfile") - val applicationProfile: kotlin.String, - - @Json(name = "loggingProfile") - val loggingProfile: kotlin.String, - - @Json(name = "accessControlProfile") - val accessControlProfile: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "sourceGatewayPubkey") - val sourceGatewayPubkey: kotlin.String, - - @Json(name = "sourceGatewayDltSystem") - val sourceGatewayDltSystem: kotlin.String, - - @Json(name = "recipientGatewayPubkey") - val recipientGatewayPubkey: kotlin.String, - - @Json(name = "recipientGatewayDltSystem") - val recipientGatewayDltSystem: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: kotlin.Int, - - @Json(name = "sourceBasePath") - val sourceBasePath: kotlin.String, - - @Json(name = "recipientBasePath") - val recipientBasePath: kotlin.String, - - @Json(name = "maxRetries") - val maxRetries: java.math.BigDecimal, - - @Json(name = "maxTimeout") - val maxTimeout: java.math.BigDecimal, - - @Json(name = "backupGatewaysAllowed") - val backupGatewaysAllowed: kotlin.collections.List, - - @Json(name = "recipientLedgerAssetID") - val recipientLedgerAssetID: kotlin.String, - - @Json(name = "sourceLedgerAssetID") - val sourceLedgerAssetID: kotlin.String, - - @Json(name = "version") - val version: kotlin.String? = null, - - @Json(name = "developerURN") - val developerURN: kotlin.String? = null, - - @Json(name = "credentialProfile") - val credentialProfile: CredentialProfile? = null, - - @Json(name = "escrowType") - val escrowType: TransferInitializationV1Request.EscrowType? = null, - - @Json(name = "expiryTime") - val expiryTime: kotlin.String? = null, - - @Json(name = "multipleClaimsAllowed") - val multipleClaimsAllowed: kotlin.Boolean? = null, - - @Json(name = "multipleCancelsAllowed") - val multipleCancelsAllowed: kotlin.Boolean? = null, - - @Json(name = "permissions") - val permissions: kotlin.Any? = null, - - @Json(name = "origin") - val origin: kotlin.String? = null, - - @Json(name = "destination") - val destination: kotlin.String? = null, - - @Json(name = "subsequentCalls") - val subsequentCalls: kotlin.Any? = null, - - @Json(name = "histories") - val histories: kotlin.collections.List? = null - -) { - - /** - * - * - * Values: fAUCET,tIMELOCK,hASHLOCK,hASHTIMELOCK,mULTICLAIMPC,dESTROY,bURN - */ - @JsonClass(generateAdapter = false) - enum class EscrowType(val value: kotlin.String) { - @Json(name = "FAUCET") fAUCET("FAUCET"), - @Json(name = "TIMELOCK") tIMELOCK("TIMELOCK"), - @Json(name = "HASHLOCK") hASHLOCK("HASHLOCK"), - @Json(name = "HASHTIMELOCK") hASHTIMELOCK("HASHTIMELOCK"), - @Json(name = "MULTICLAIMPC") mULTICLAIMPC("MULTICLAIMPC"), - @Json(name = "DESTROY") dESTROY("DESTROY"), - @Json(name = "BURN") bURN("BURN"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/LICENSE b/packages/cactus-plugin-satp-hermes/src/main/proto/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/buf.gen.yaml b/packages/cactus-plugin-satp-hermes/src/main/proto/buf.gen.yaml new file mode 100644 index 0000000000..3a771edb7a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/buf.gen.yaml @@ -0,0 +1,12 @@ +version: v1 +plugins: + - plugin: es + opt: target=ts + strategy: directory + out: ../typescript/generated/proto/ + - plugin: connect-es + opt: + - target=ts + - js_import_style=module + out: ../typescript/generated/proto/ + strategy: directory diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/buf.yaml b/packages/cactus-plugin-satp-hermes/src/main/proto/buf.yaml new file mode 100644 index 0000000000..1de3d3a888 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/buf.yaml @@ -0,0 +1,24 @@ +version: v1 +name: "buf.build/rafaelapb/cacti" +deps: [] +build: + excludes: [] +lint: + use: + - DEFAULT + except: [] + ignore: [] + ignore_only: {} + allow_comment_ignores: false + enum_zero_value_suffix: _UNSPECIFIED + rpc_allow_same_request_response: false + rpc_allow_google_protobuf_empty_requests: false + rpc_allow_google_protobuf_empty_responses: false + service_suffix: Service +breaking: + use: + - FILE + except: [] + ignore: [] + ignore_only: {} + ignore_unstable_packages: false \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto new file mode 100644 index 0000000000..c176ffe3af --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cacti.satp.v02.common; + +// TODO: define the common parameters to every protocol message +message MessageCore { + string message = 1; +} + +// TODO: define the common parameters to every rollback message +message RollbackMessageCore { + string message = 1; +} + +enum STATUS { + STATUS_UNSPECIFIED = 0; + STATUS_OK = 1; + STATUS_ERROR = 2; +}; + +message Ack { + STATUS status = 1; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto new file mode 100644 index 0000000000..27b1b1af44 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package cacti.satp.v02.common; + +import "google/protobuf/empty.proto"; + +// TODO: requires fully qualified path from buf.gen.yaml +import "cacti/satp/v02/common/message.proto"; + +message SendStatusRequest { + string status = 1; + bool hasBackup = 2; +} + +message SendStatusResponse { + string status = 1; + bool hasBackup = 2; +} + + +service SessionStatusService { + rpc GetStatus(google.protobuf.Empty) returns (SendStatusResponse) {} + rpc SendStatus(SendStatusRequest) returns (google.protobuf.Empty) {} +} + +// TODO: define common RPC methods for each step. This is a draft +service CommonService { + rpc Ping(google.protobuf.Empty) returns (cacti.satp.v02.common.MessageCore) {} + rpc Rollback(google.protobuf.Empty) returns (cacti.satp.v02.common.RollbackMessageCore) {} + rpc GetStageVersion(google.protobuf.Empty) returns (cacti.satp.v02.common.Ack) {}; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto new file mode 100644 index 0000000000..7f6f71c15c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto @@ -0,0 +1,13 @@ + +syntax = "proto3"; +package cacti.satp.v02.crash; + +import "google/protobuf/empty.proto"; + +// TODO: Rollback and crash-recovery related +service CrashRecovery { + // util RPCs + + // step RPCs + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto new file mode 100644 index 0000000000..6f675dc321 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto @@ -0,0 +1,34 @@ + +syntax = "proto3"; +package cacti.satp.v02.stage_0; + +import "google/protobuf/empty.proto"; + +service SATPStage0 { + // util RPCs + + // step RPCs + rpc TransferProposalClaims(TransferProposalClaimsRequest) returns (TransferProposalClaimsResponse) {}; + // todo other rpcs +} + +message TransferProposalClaimsRequest { + string message_type = 1; + string asset_asset_id = 2; + string asset_profile_id = 3; + string verified_originator_entity_id = 4; + string verified_beneficiary_entity_id = 5; + string originator_pubkey = 6; + string beneficiary_pubkey = 7; + string sender_gateway_network_id = 8; + string recipient_gateway_network_id = 9; + string client_identity_pubkey = 10; + string server_identity_pubkey = 11; + string sender_gateway_owner_id = 12; + string receiver_gateway_owner_id = 13; +} + +// TODO +message TransferProposalClaimsResponse { + string message_type = 1; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto new file mode 100644 index 0000000000..55ead8bcc6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto @@ -0,0 +1,13 @@ + +syntax = "proto3"; +package cacti.satp.v02.stage_1; + +import "google/protobuf/empty.proto"; + + +service SATPStage1 { + // util RPCs + + // step RPCs + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto new file mode 100644 index 0000000000..ac04ade64c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto @@ -0,0 +1,13 @@ + +syntax = "proto3"; +package cacti.satp.v02.stage_2; + +import "google/protobuf/empty.proto"; + + +service SATPStage2 { + // util RPCs + + // step RPCs + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto new file mode 100644 index 0000000000..1797bb8ca7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto @@ -0,0 +1,12 @@ + +syntax = "proto3"; +package cacti.satp.v02.stage_3; + +import "google/protobuf/empty.proto"; + +service SATPStage3 { + // util RPCs + + // step RPCs + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/view/bungee.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/view/bungee.proto new file mode 100644 index 0000000000..211f3a63ce --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/view/bungee.proto @@ -0,0 +1,9 @@ + +syntax = "proto3"; +package cacti.satp.v02.view.bungee; + +import "google/protobuf/empty.proto"; + +message BungeeView { + string message = 1; +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto new file mode 100644 index 0000000000..50c6b4fa8c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto @@ -0,0 +1,27 @@ + +syntax = "proto3"; +package test.message; + +import "google/protobuf/empty.proto"; + +message Message { + string content = 1; +} +message ModifyMessageResponse { + string content = 1; +} + +message ModifyMessageRequest { + string content = 1; +} + + +service TestService { + rpc GetMessage(google.protobuf.Empty) returns (Message) {} + rpc SendMessage(Message) returns (google.protobuf.Empty) {} + rpc ModifyMessage(ModifyMessageRequest) returns (ModifyMessageResponse) {} +} + +service TestService2 { + rpc GetMessage(google.protobuf.Empty) returns (Message) {} +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts similarity index 98% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts index 248b1b494a..7613681707 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts @@ -9,10 +9,10 @@ import { } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import { IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "./plugin-satp-gateway"; + PluginSATPGateway, +} from "../plugin-satp-gateway"; -export interface IBesuSatpGatewayConstructorOptions +export interface IBesuSATPGatewayConstructorOptions extends IPluginSatpGatewayConstructorOptions { besuPath?: string; besuContractName?: string; @@ -21,13 +21,13 @@ export interface IBesuSatpGatewayConstructorOptions besuAssetID?: string; } -export class BesuSatpGateway extends PluginSatpGateway { +export class BesuSATPGateway extends PluginSATPGateway { public besuApi?: BesuApi; public besuContractName?: string; public besuWeb3SigningCredential?: Web3SigningCredential; public besuKeychainId?: string; - public constructor(options: IBesuSatpGatewayConstructorOptions) { + public constructor(options: IBesuSATPGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -45,7 +45,7 @@ export class BesuSatpGateway extends PluginSatpGateway { } private defineBesuConnection( - options: IBesuSatpGatewayConstructorOptions, + options: IBesuSATPGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineBesuConnection()`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts index cd97907313..5d81f1a062 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts @@ -12,8 +12,8 @@ import { CommitFinalV1Request, CommitFinalV1Response, TransferCompleteV1Request, -} from "../../public-api"; -import { SatpMessageType, PluginSatpGateway } from "../plugin-satp-gateway"; +} from "../public-api"; +import { SatpMessageType, PluginSATPGateway } from "../plugin-satp-gateway"; export class ClientGatewayHelper { public static readonly CLASS_NAME = "ClientGatewayHelper"; @@ -35,7 +35,7 @@ export class ClientGatewayHelper { async sendTransferInitializationRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${this.className}#sendTransferInitializationRequest()`; @@ -104,7 +104,7 @@ export class ClientGatewayHelper { sourceLedgerAssetID: sessionData.sourceLedgerAssetID, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(initializationRequestMessage)), ); @@ -133,7 +133,7 @@ export class ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase1TransferInitiationRequestV1(initializationRequestMessage), "TransferInitializationRequest", @@ -142,7 +142,7 @@ export class ClientGatewayHelper { async checkValidInitializationResponse( response: TransferInitializationV1Response, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${this.className}#checkValidInitializationResponse`; @@ -208,7 +208,7 @@ export class ClientGatewayHelper { async sendTransferCommenceRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendTransferCommenceRequest()`; @@ -256,7 +256,7 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(transferCommenceRequestMessage)), ); @@ -286,7 +286,7 @@ export class ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase2TransferCommenceRequestV1(transferCommenceRequestMessage), "TransferCommenceRequest", @@ -295,7 +295,7 @@ export class ClientGatewayHelper { async checkValidTransferCommenceResponse( response: TransferCommenceV1Response, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidTransferCommenceResponse`; @@ -362,7 +362,7 @@ export class ClientGatewayHelper { async sendLockEvidenceRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendLockEvidenceRequest()`; @@ -399,7 +399,7 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -428,7 +428,7 @@ export class ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase2LockEvidenceRequestV1(lockEvidenceRequestMessage), "LockEvidenceRequest", @@ -437,7 +437,7 @@ export class ClientGatewayHelper { async checkValidLockEvidenceResponse( response: LockEvidenceV1Response, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidLockEvidenceResponse`; @@ -503,7 +503,7 @@ export class ClientGatewayHelper { async sendCommitPreparationRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendCommitPreparationRequest()`; @@ -534,7 +534,7 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -564,7 +564,7 @@ export class ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase3CommitPreparationRequestV1(commitPrepareRequestMessage), "CommitPreparationRequest", @@ -573,7 +573,7 @@ export class ClientGatewayHelper { async checkValidCommitPreparationResponse( response: CommitPreparationV1Response, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidCommitPreparationResponse`; @@ -641,7 +641,7 @@ export class ClientGatewayHelper { async sendCommitFinalRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendCommitFinalRequest()`; @@ -675,7 +675,7 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -704,7 +704,7 @@ export class ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase3CommitFinalRequestV1(commitFinalRequestMessage), "CommitFinalRequest", @@ -713,7 +713,7 @@ export class ClientGatewayHelper { async checkValidCommitFinalResponse( response: CommitFinalV1Response, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidCommitFinalResponse`; @@ -767,7 +767,7 @@ export class ClientGatewayHelper { const claimHash = SHA256(response.commitAcknowledgementClaim).toString(); const retrievedClaim = await gateway.getLogFromRemote( - PluginSatpGateway.getSatpLogKey(sessionID, "proof", "create"), + PluginSATPGateway.getSatpLogKey(sessionID, "proof", "create"), ); if (claimHash != retrievedClaim.hash) { @@ -802,7 +802,7 @@ export class ClientGatewayHelper { async sendTransferCompleteRequest( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendTransferCompleteRequest()`; @@ -835,7 +835,7 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginSatpGateway.bufArray2HexStr( + const messageSignature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(transferCompleteRequestMessage)), ); @@ -864,7 +864,7 @@ export class ClientGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.recipientBasePath, ).phase3TransferCompleteRequestV1(transferCompleteRequestMessage), "TransferCompleteRequest", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts new file mode 100644 index 0000000000..a2bd3c7f79 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts @@ -0,0 +1,15 @@ +export class BootstrapError extends Error { + constructor() { + super("Bootstrap already called in this Gateway Manager"); + this.name = this.constructor.name; + Object.setPrototypeOf(this, BootstrapError.prototype); + } +} + +export class NonExistantGatewayIdentity extends Error { + constructor(id: string) { + super(`Gateway with id ${id} does not exist`); + this.name = this.constructor.name; + Object.setPrototypeOf(this, BootstrapError.prototype); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts similarity index 98% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts index 05a4233ee1..7e7c629cc9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts @@ -8,11 +8,11 @@ import { } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; import { IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "./plugin-satp-gateway"; + PluginSATPGateway, +} from "../plugin-satp-gateway"; import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios"; -export interface IFabricSatpGatewayConstructorOptions +export interface IFabricSATPGatewayConstructorOptions extends IPluginSatpGatewayConstructorOptions { fabricPath?: string; fabricSigningCredential?: FabricSigningCredential; @@ -20,13 +20,13 @@ export interface IFabricSatpGatewayConstructorOptions fabricContractName?: string; } -export class FabricSatpGateway extends PluginSatpGateway { +export class FabricSATPGateway extends PluginSATPGateway { public fabricApi?: FabricApi; public fabricSigningCredential?: FabricSigningCredential; public fabricChannelName?: string; public fabricContractName?: string; - public constructor(options: IFabricSatpGatewayConstructorOptions) { + public constructor(options: IFabricSATPGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -44,7 +44,7 @@ export class FabricSatpGateway extends PluginSatpGateway { } private defineFabricConnection( - options: IFabricSatpGatewayConstructorOptions, + options: IFabricSATPGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineFabricConnection()`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts index 4a9a547cb3..2cd8353ced 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts @@ -13,8 +13,8 @@ import { CommitFinalV1Response, CommitFinalV1Request, TransferCompleteV1Request, -} from "../../public-api"; -import { SatpMessageType, PluginSatpGateway } from "../plugin-satp-gateway"; +} from "../public-api"; +import { SatpMessageType, PluginSATPGateway } from "../plugin-satp-gateway"; export class ServerGatewayHelper { public static readonly CLASS_NAME: string = "ServerGatewayHelper"; @@ -36,7 +36,7 @@ export class ServerGatewayHelper { async sendTransferInitializationResponse( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendTransferInitiationResponse()`; @@ -70,7 +70,7 @@ export class ServerGatewayHelper { }; transferInitializationResponse.signature = - PluginSatpGateway.bufArray2HexStr( + PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(transferInitializationResponse)), ); @@ -98,7 +98,7 @@ export class ServerGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.sourceBasePath, ).phase1TransferInitiationResponseV1(transferInitializationResponse), "TransferInitializationResponse", @@ -107,7 +107,7 @@ export class ServerGatewayHelper { async checkValidInitializationRequest( request: TransferInitializationV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidInitializationRequest()`; @@ -201,7 +201,7 @@ export class ServerGatewayHelper { async sendTransferCommenceResponse( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendTransferCommenceResponse()`; @@ -233,7 +233,7 @@ export class ServerGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(transferCommenceResponse)), ); @@ -259,7 +259,7 @@ export class ServerGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.sourceBasePath, ).phase2TransferCommenceResponseV1(transferCommenceResponse), "TransferCommenceResponse", @@ -268,7 +268,7 @@ export class ServerGatewayHelper { async checkValidtransferCommenceRequest( request: TransferCommenceV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidtransferCommenceRequest()`; @@ -362,7 +362,7 @@ export class ServerGatewayHelper { async sendLockEvidenceResponse( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendLockEvidenceResponse()`; @@ -394,7 +394,7 @@ export class ServerGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - lockEvidenceResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( await gateway.sign(JSON.stringify(lockEvidenceResponseMessage)), ); @@ -420,7 +420,7 @@ export class ServerGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.sourceBasePath, ).phase2LockEvidenceResponseV1(lockEvidenceResponseMessage), "LockEvidenceResponse", @@ -429,7 +429,7 @@ export class ServerGatewayHelper { async checkValidLockEvidenceRequest( request: LockEvidenceV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidLockEvidenceRequest()`; @@ -498,7 +498,7 @@ export class ServerGatewayHelper { const claimHash = SHA256(request.lockEvidenceClaim).toString(); const retrievedClaim = await gateway.getLogFromRemote( - PluginSatpGateway.getSatpLogKey(sessionID, "proof", "lock"), + PluginSATPGateway.getSatpLogKey(sessionID, "proof", "lock"), ); if (claimHash != retrievedClaim.hash) { @@ -540,7 +540,7 @@ export class ServerGatewayHelper { async sendCommitPreparationResponse( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendCommitPrepareResponse()`; @@ -572,7 +572,7 @@ export class ServerGatewayHelper { }; commitPreparationResponseMessage.signature = - PluginSatpGateway.bufArray2HexStr( + PluginSATPGateway.bufArray2HexStr( await gateway.sign(JSON.stringify(commitPreparationResponseMessage)), ); @@ -598,7 +598,7 @@ export class ServerGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.sourceBasePath, ).phase3CommitPreparationResponseV1(commitPreparationResponseMessage), "CommitPreparationResponse", @@ -607,7 +607,7 @@ export class ServerGatewayHelper { async checkValidCommitPreparationRequest( request: CommitPreparationV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidCommitPrepareRequest()`; @@ -692,7 +692,7 @@ export class ServerGatewayHelper { async sendCommitFinalResponse( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendCommitFinalResponse()`; @@ -724,7 +724,7 @@ export class ServerGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - commitFinalResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( await gateway.sign(JSON.stringify(commitFinalResponseMessage)), ); @@ -752,7 +752,7 @@ export class ServerGatewayHelper { await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( sessionData.sourceBasePath, ).phase3CommitFinalResponseV1(commitFinalResponseMessage), "CommitFinalResponse", @@ -761,7 +761,7 @@ export class ServerGatewayHelper { async checkValidCommitFinalRequest( request: CommitFinalV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidCommitFinalRequest()`; @@ -826,7 +826,7 @@ export class ServerGatewayHelper { const claimHash = SHA256(request.commitFinalClaim).toString(); const retrievedClaim = await gateway.getLogFromRemote( - PluginSatpGateway.getSatpLogKey(sessionID, "proof", "delete"), + PluginSATPGateway.getSatpLogKey(sessionID, "proof", "delete"), ); if (claimHash != retrievedClaim.hash) { @@ -867,7 +867,7 @@ export class ServerGatewayHelper { async checkValidTransferCompleteRequest( request: TransferCompleteV1Request, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidTransferCompleteRequest()`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts new file mode 100644 index 0000000000..991aa1a51e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts new file mode 100644 index 0000000000..4be9bb5653 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts @@ -0,0 +1,15 @@ +import { ConnectRouter } from "@connectrpc/connect"; +import { Message } from "../../generated/proto/test/message_pb"; +import { TestService } from "../../generated/proto/test/message_connect"; + +export const testRouter = (router: ConnectRouter) => + // registers connectrpc.eliza.v1.ElizaService + router.service(TestService, { + // implements rpc Say + async sendMessage(req) { + return { + sentence: `You said: ${req}` + } + }, + }); + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts new file mode 100644 index 0000000000..956150b24d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -0,0 +1,66 @@ +import { + Secp256k1Keys, + Logger, + Checks, + LoggerProvider, + JsObjectSigner, + IJsObjectSignerOptions, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { ValidatorOptions } from "class-validator"; + +export enum CurrentDrafts { + Core = "Core", + Architecture = "Architecture", + Crash = "Crash", +} + +export type DraftVersions = { + [K in CurrentDrafts]: string; +}; +export type ShutdownHook = () => Promise; + +export enum SupportedGatewayImplementations { + FABRIC = "FabricSATPGateway", + BESU = "BesuSATPGateway", +} + +export type GatewayChannel = { + id: string; +}; + +export type GatewayIdentity = { + id: string; + name?: string; + version: DraftVersions[]; + supportedChains: SupportedGatewayImplementations[]; + proofID?: string; + port?: number; + address?: + | `http://${string}` + | `https://${string}` + | `${number}.${number}.${number}.${number}.`; +}; + +export interface SATPGatewayConfig { + gid?: GatewayIdentity; + logLevel?: LogLevelDesc; + keys?: Secp256k1Keys; + environment?: "development" | "production"; + enableOpenAPI?: boolean; + validationOptions?: ValidatorOptions; +} +export type Immutable = { + readonly [K in keyof T]: Immutable; +}; + +export interface keyable { + [key: string]: unknown; +} + +export function isOfType( + obj: any, + type: new (...args: any[]) => T, +): obj is T { + return obj instanceof type; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts new file mode 100644 index 0000000000..b362a244b9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts @@ -0,0 +1,20 @@ +import { + IPluginFactoryOptions, + PluginFactory, +} from "@hyperledger/cactus-core-api"; +import { + IBesuSATPGatewayConstructorOptions, + BesuSATPGateway, +} from "../core/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/factory/plugin-factory-fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-fabric-satp-gateway.ts new file mode 100644 index 0000000000..1c4c48a657 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-fabric-satp-gateway.ts @@ -0,0 +1,20 @@ +import { + IPluginFactoryOptions, + PluginFactory, +} from "@hyperledger/cactus-core-api"; +import { + IFabricSATPGatewayConstructorOptions, + FabricSATPGateway, +} from "../core/fabric-satp-gateway"; + +export class PluginFactoryFabricSATPGateway extends PluginFactory< + FabricSATPGateway, + IFabricSATPGatewayConstructorOptions, + IPluginFactoryOptions +> { + async create( + pluginOptions: IFabricSATPGatewayConstructorOptions, + ): Promise { + return new FabricSATPGateway(pluginOptions); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts new file mode 100644 index 0000000000..e4b53d98e9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts @@ -0,0 +1,31 @@ +import { + IPluginFactoryOptions, + PluginFactory, +} from "@hyperledger/cactus-core-api"; +import { + SATPGateway, + SATPGatewayConfig, +} from "../gateway-refactor"; +import { validateOrReject } from "class-validator"; + +export class PluginFactorySATPGateway extends PluginFactory< + SATPGateway, + SATPGatewayConfig, + IPluginFactoryOptions +> { + async create( + pluginOptions: SATPGatewayConfig, + ): Promise { + const coordinator = new SATPGateway(pluginOptions); + + try { + const validationOptions = pluginOptions.validationOptions; + await validateOrReject(coordinator, validationOptions); + return coordinator; + } catch (errors) { + throw new Error( + `Caught promise rejection (validation failed). Errors: ${errors}`, + ); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts new file mode 100644 index 0000000000..2b3385119f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -0,0 +1,320 @@ +import { + Secp256k1Keys, + Logger, + Checks, + LoggerProvider, + JsObjectSigner, + IJsObjectSignerOptions, + ILoggerOptions, +} from "@hyperledger/cactus-common"; +import { v4 as uuidv4 } from "uuid"; + +import { + ICactusPlugin, + IPluginWebService, + IWebServiceEndpoint, + Configuration, +} from "@hyperledger/cactus-core-api"; + +import { + MinLength, + MaxLength, + IsNotEmpty, + ValidateNested, + IsDefined, + IsNotEmptyObject, + IsObject, + IsString, + Contains, +} from "class-validator"; +import { Type } from "class-transformer"; + +import fs from "fs"; +import path from "path"; +import swaggerUi = require("swagger-ui-express"); +import { + IPluginSatpGatewayConstructorOptions, + PluginSATPGateway, +} from "./plugin-satp-gateway"; +import { Server } from "node:http"; +import { + CurrentDrafts, + DraftVersions, + SATPGatewayConfig, + GatewayIdentity, + ShutdownHook, + SupportedGatewayImplementations, +} from "./core/types"; +import { pass } from "jest-extended"; +import { GatewayOrchestrator } from "./gol/gateway-orchestrator"; +import { log } from "console"; +export { SATPGatewayConfig }; +import express, { Express, Request, Response } from 'express'; +import { expressConnectMiddleware } from "@connectrpc/connect-express"; +import http from "http"; +import { configureRoutes } from "./web-services/router"; + +export class SATPGateway { + // todo more checks; example port from config is between 3000 and 9000 + @IsDefined() + @IsNotEmptyObject() + @IsObject() + private readonly logger: Logger; + + @IsDefined() + @IsNotEmptyObject() + @IsObject() + // todo add decorators that check all fields are defined + private readonly config: SATPGatewayConfig; + + @IsString() + @Contains("Gateway") + public readonly label = "SATPGateway"; + + private gatewayConnectionManager: GatewayOrchestrator; + private readonly shutdownHooks: ShutdownHook[]; + private server: any | undefined; + // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) + // private sessions: Map = new Map(); + + constructor(public readonly options: SATPGatewayConfig) { + const fnTag = `${this.label}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + this.config = SATPGateway.ProcessGatewayCoordinatorConfig(options); + this.shutdownHooks = []; + const level = options.logLevel || "INFO"; + const logOptions: ILoggerOptions = { + level: level, + label: this.label, + }; + this.logger = LoggerProvider.getOrCreate(logOptions); + this.logger.info("Initializing Gateway Coordinator"); + + if (options.enableOpenAPI) { + this.setupOpenAPI(); + } + this.logger.info("Gateway Coordinator initialized"); + const seedGateways = this.getGatewaySeeds(); + this.logger.info( + `Initializing gateway connection manager with ${seedGateways} seed gateways`, + ); + this.gatewayConnectionManager = new GatewayOrchestrator(seedGateways, { + logger: this.logger, + }); + } + + async startupServer(): Promise { + const fnTag = `${this.label}#startup()`; + this.logger.debug(`Entering ${fnTag}`); + if (!this.server) { + this.server = express(); + this.server.use(expressConnectMiddleware({ routes: configureRoutes })); + http.createServer(this.server).listen(this.options.gid?.port); + + } else { + this.logger.warn("Server already running"); + } + } +async shutdownServer(): Promise { + const fnTag = `${this.label}#shutdown()`; + this.logger.debug(`Entering ${fnTag}`); + if (this.server) { + try { + this.server.close(); + this.server = undefined; + this.logger.info("Server shut down"); + } catch (error) { + this.logger.error(`Error shutting down the server: ${error}`); + } + } else { + this.logger.warn("Server is not running."); + } +} + + + async addGateways(IDs: string[]): Promise { + const fnTag = `${this.label}#connectToGateway()`; + this.logger.debug(`Entering ${fnTag}`); + this.logger.info("Connecting to gateway"); + const gatewaysToAdd: GatewayIdentity[] = []; + const thisID = this.config.gid!.id; + const otherIDs = IDs.filter((id) => id !== thisID); + + for (const id of otherIDs) { + gatewaysToAdd.push(this.resolveGatewayID(id)); + } + + this.gatewayConnectionManager.addGateways(gatewaysToAdd); + + // todo connect to gateway + } + + // gets an ID, queries a repository, returns an address, port, and proof of identity + resolveGatewayID(ID: string): GatewayIdentity { + const fnTag = `${this.label}#resolveGatewayID()`; + this.logger.debug(`Entering ${fnTag}`); + this.logger.info(`Resolving gateway with ID: ${ID}`); + + const mockGatewayIdentity: GatewayIdentity[] = [ + { + id: "1", + name: "Gateway1", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + port: 3011, + address: "http://localhost", + }, + { + id: "2", + name: "Gateway2", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + port: 3012, + address: "http://localhost", + }, + ]; + return mockGatewayIdentity.filter((gateway) => gateway.id === ID)[0]; + } + + // todo load docs for gateway coordinator and expose them in a http server + setupOpenAPI(): void { + const fnTag = `${this.label}#setupOpenAPI()`; + this.logger.debug(`Entering ${fnTag}`); + + this.logger.error("OpenAPI setup not implemented"); + return; + const specPath = path.join(__dirname, "../../", "/json", "openapi.json"); + this.logger.debug(`Loading OpenAPI specification from ${specPath}`); + + const OpenAPISpec = JSON.parse(fs.readFileSync(specPath).toString()); + this.logger.info( + `OpenAPI docs and documentation set up at 📖: \n ${this.config.gid?.address}:${this.config.gid?.port}/api-docs`, + ); + + // todo bind to grpc gateway + // this._app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(OpenAPISpec)); + } + + getGatewaySeeds(): GatewayIdentity[] { + const fnTag = `${this.label}#getGatewaySeeds()`; + this.logger.debug(`Entering ${fnTag}`); + + const mockGatewayIdentity: GatewayIdentity[] = [ + { + id: "1", + name: "Gateway1", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + port: 3011, + address: "http://localhost", + }, + { + id: "2", + name: "Gateway2", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + port: 3012, + address: "http://localhost", + }, + ]; + return mockGatewayIdentity; + } + + static ProcessGatewayCoordinatorConfig( + pluginOptions: SATPGatewayConfig, + ): SATPGatewayConfig { + if (!pluginOptions.keys) { + pluginOptions.keys = Secp256k1Keys.generateKeyPairsBuffer(); + } + if (!pluginOptions.gid) { + const id = uuidv4(); + pluginOptions.gid = { + id: id, + name: id, + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + port: 3000, + address: "http://localhost", + }; + } + + if (!pluginOptions.logLevel) { + pluginOptions.logLevel = "DEBUG"; + } + + if (!pluginOptions.environment) { + pluginOptions.environment = "development"; + } + + if (!pluginOptions.enableOpenAPI) { + pluginOptions.enableOpenAPI = true; + } + + if (!pluginOptions.validationOptions) { + // do nothing + } + + return pluginOptions; + } + + // generate getter for identity + getIdentity(): GatewayIdentity { + return this.config.gid!; + } + + async shutdown(): Promise { + this.logger.info("Shutting down Gateway Coordinator"); + return await this.gatewayConnectionManager.disconnectAll(); + + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts deleted file mode 100644 index 2ba9be6d17..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "./besu-satp-gateway"; - -export class PluginFactoryBesuSatpGateway extends PluginFactory< - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IBesuSatpGatewayConstructorOptions, - ): Promise { - return new BesuSatpGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts deleted file mode 100644 index 30010f6ee6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "./fabric-satp-gateway"; - -export class PluginFactoryFabricSatpGateway extends PluginFactory< - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IFabricSatpGatewayConstructorOptions, - ): Promise { - return new FabricSatpGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts new file mode 100644 index 0000000000..38f10e65cc --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -0,0 +1,149 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/common/message.proto (package cacti.satp.v02.common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum cacti.satp.v02.common.STATUS + */ +export enum STATUS { + /** + * @generated from enum value: STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED = 0, + + /** + * @generated from enum value: STATUS_OK = 1; + */ + STATUS_OK = 1, + + /** + * @generated from enum value: STATUS_ERROR = 2; + */ + STATUS_ERROR = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(STATUS) +proto3.util.setEnumType(STATUS, "cacti.satp.v02.common.STATUS", [ + { no: 0, name: "STATUS_UNSPECIFIED" }, + { no: 1, name: "STATUS_OK" }, + { no: 2, name: "STATUS_ERROR" }, +]); + +/** + * TODO: define the common parameters to every protocol message + * + * @generated from message cacti.satp.v02.common.MessageCore + */ +export class MessageCore extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MessageCore"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MessageCore { + return new MessageCore().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MessageCore { + return new MessageCore().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MessageCore { + return new MessageCore().fromJsonString(jsonString, options); + } + + static equals(a: MessageCore | PlainMessage | undefined, b: MessageCore | PlainMessage | undefined): boolean { + return proto3.util.equals(MessageCore, a, b); + } +} + +/** + * TODO: define the common parameters to every rollback message + * + * @generated from message cacti.satp.v02.common.RollbackMessageCore + */ +export class RollbackMessageCore extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.RollbackMessageCore"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RollbackMessageCore { + return new RollbackMessageCore().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RollbackMessageCore { + return new RollbackMessageCore().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RollbackMessageCore { + return new RollbackMessageCore().fromJsonString(jsonString, options); + } + + static equals(a: RollbackMessageCore | PlainMessage | undefined, b: RollbackMessageCore | PlainMessage | undefined): boolean { + return proto3.util.equals(RollbackMessageCore, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Ack + */ +export class Ack extends Message { + /** + * @generated from field: cacti.satp.v02.common.STATUS status = 1; + */ + status = STATUS.STATUS_UNSPECIFIED; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Ack"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Ack { + return new Ack().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Ack { + return new Ack().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Ack { + return new Ack().fromJsonString(jsonString, options); + } + + static equals(a: Ack | PlainMessage | undefined, b: Ack | PlainMessage | undefined): boolean { + return proto3.util.equals(Ack, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts new file mode 100644 index 0000000000..cd60e5eb81 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts @@ -0,0 +1,74 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/common/session.proto (package cacti.satp.v02.common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Empty, MethodKind } from "@bufbuild/protobuf"; +import { SendStatusRequest, SendStatusResponse } from "./session_pb.js"; +import { Ack, MessageCore, RollbackMessageCore } from "./message_pb.js"; + +/** + * @generated from service cacti.satp.v02.common.SessionStatusService + */ +export const SessionStatusService = { + typeName: "cacti.satp.v02.common.SessionStatusService", + methods: { + /** + * @generated from rpc cacti.satp.v02.common.SessionStatusService.GetStatus + */ + getStatus: { + name: "GetStatus", + I: Empty, + O: SendStatusResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.common.SessionStatusService.SendStatus + */ + sendStatus: { + name: "SendStatus", + I: SendStatusRequest, + O: Empty, + kind: MethodKind.Unary, + }, + } +} as const; + +/** + * TODO: define common RPC methods for each step. This is a draft + * + * @generated from service cacti.satp.v02.common.CommonService + */ +export const CommonService = { + typeName: "cacti.satp.v02.common.CommonService", + methods: { + /** + * @generated from rpc cacti.satp.v02.common.CommonService.Ping + */ + ping: { + name: "Ping", + I: Empty, + O: MessageCore, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.common.CommonService.Rollback + */ + rollback: { + name: "Rollback", + I: Empty, + O: RollbackMessageCore, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.common.CommonService.GetStageVersion + */ + getStageVersion: { + name: "GetStageVersion", + I: Empty, + O: Ack, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts new file mode 100644 index 0000000000..7fa4974994 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -0,0 +1,94 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/common/session.proto (package cacti.satp.v02.common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message cacti.satp.v02.common.SendStatusRequest + */ +export class SendStatusRequest extends Message { + /** + * @generated from field: string status = 1; + */ + status = ""; + + /** + * @generated from field: bool hasBackup = 2; + */ + hasBackup = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.SendStatusRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "hasBackup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStatusRequest { + return new SendStatusRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStatusRequest { + return new SendStatusRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SendStatusRequest { + return new SendStatusRequest().fromJsonString(jsonString, options); + } + + static equals(a: SendStatusRequest | PlainMessage | undefined, b: SendStatusRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(SendStatusRequest, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.SendStatusResponse + */ +export class SendStatusResponse extends Message { + /** + * @generated from field: string status = 1; + */ + status = ""; + + /** + * @generated from field: bool hasBackup = 2; + */ + hasBackup = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.SendStatusResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "hasBackup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SendStatusResponse { + return new SendStatusResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SendStatusResponse { + return new SendStatusResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SendStatusResponse { + return new SendStatusResponse().fromJsonString(jsonString, options); + } + + static equals(a: SendStatusResponse | PlainMessage | undefined, b: SendStatusResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(SendStatusResponse, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts new file mode 100644 index 0000000000..5989c0b6ba --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts @@ -0,0 +1,18 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/crash_recovery.proto (package cacti.satp.v02.crash, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +/** + * TODO: Rollback and crash-recovery related + * + * util RPCs + * + * @generated from service cacti.satp.v02.crash.CrashRecovery + */ +export const CrashRecovery = { + typeName: "cacti.satp.v02.crash.CrashRecovery", + methods: { + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts new file mode 100644 index 0000000000..056b2b8058 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts @@ -0,0 +1,30 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02.stage_0, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { TransferProposalClaimsRequest, TransferProposalClaimsResponse } from "./stage_0_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * util RPCs + * + * @generated from service cacti.satp.v02.stage_0.SATPStage0 + */ +export const SATPStage0 = { + typeName: "cacti.satp.v02.stage_0.SATPStage0", + methods: { + /** + * step RPCs + * + * @generated from rpc cacti.satp.v02.stage_0.SATPStage0.TransferProposalClaims + */ + transferProposalClaims: { + name: "TransferProposalClaims", + I: TransferProposalClaimsRequest, + O: TransferProposalClaimsResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts new file mode 100644 index 0000000000..01bd2a9225 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -0,0 +1,156 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02.stage_0, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message cacti.satp.v02.stage_0.TransferProposalClaimsRequest + */ +export class TransferProposalClaimsRequest extends Message { + /** + * @generated from field: string message_type = 1; + */ + messageType = ""; + + /** + * @generated from field: string asset_asset_id = 2; + */ + assetAssetId = ""; + + /** + * @generated from field: string asset_profile_id = 3; + */ + assetProfileId = ""; + + /** + * @generated from field: string verified_originator_entity_id = 4; + */ + verifiedOriginatorEntityId = ""; + + /** + * @generated from field: string verified_beneficiary_entity_id = 5; + */ + verifiedBeneficiaryEntityId = ""; + + /** + * @generated from field: string originator_pubkey = 6; + */ + originatorPubkey = ""; + + /** + * @generated from field: string beneficiary_pubkey = 7; + */ + beneficiaryPubkey = ""; + + /** + * @generated from field: string sender_gateway_network_id = 8; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: string recipient_gateway_network_id = 9; + */ + recipientGatewayNetworkId = ""; + + /** + * @generated from field: string client_identity_pubkey = 10; + */ + clientIdentityPubkey = ""; + + /** + * @generated from field: string server_identity_pubkey = 11; + */ + serverIdentityPubkey = ""; + + /** + * @generated from field: string sender_gateway_owner_id = 12; + */ + senderGatewayOwnerId = ""; + + /** + * @generated from field: string receiver_gateway_owner_id = 13; + */ + receiverGatewayOwnerId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.stage_0.TransferProposalClaimsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "asset_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "originator_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "client_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "server_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalClaimsRequest { + return new TransferProposalClaimsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalClaimsRequest { + return new TransferProposalClaimsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferProposalClaimsRequest { + return new TransferProposalClaimsRequest().fromJsonString(jsonString, options); + } + + static equals(a: TransferProposalClaimsRequest | PlainMessage | undefined, b: TransferProposalClaimsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferProposalClaimsRequest, a, b); + } +} + +/** + * TODO + * + * @generated from message cacti.satp.v02.stage_0.TransferProposalClaimsResponse + */ +export class TransferProposalClaimsResponse extends Message { + /** + * @generated from field: string message_type = 1; + */ + messageType = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.stage_0.TransferProposalClaimsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalClaimsResponse { + return new TransferProposalClaimsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalClaimsResponse { + return new TransferProposalClaimsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferProposalClaimsResponse { + return new TransferProposalClaimsResponse().fromJsonString(jsonString, options); + } + + static equals(a: TransferProposalClaimsResponse | PlainMessage | undefined, b: TransferProposalClaimsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferProposalClaimsResponse, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts new file mode 100644 index 0000000000..c66c54ca67 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts @@ -0,0 +1,16 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02.stage_1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +/** + * util RPCs + * + * @generated from service cacti.satp.v02.stage_1.SATPStage1 + */ +export const SATPStage1 = { + typeName: "cacti.satp.v02.stage_1.SATPStage1", + methods: { + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts new file mode 100644 index 0000000000..d00165f0c4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts @@ -0,0 +1,16 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02.stage_2, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +/** + * util RPCs + * + * @generated from service cacti.satp.v02.stage_2.SATPStage2 + */ +export const SATPStage2 = { + typeName: "cacti.satp.v02.stage_2.SATPStage2", + methods: { + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts new file mode 100644 index 0000000000..ee19d09258 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts @@ -0,0 +1,16 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02.stage_3, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +/** + * util RPCs + * + * @generated from service cacti.satp.v02.stage_3.SATPStage3 + */ +export const SATPStage3 = { + typeName: "cacti.satp.v02.stage_3.SATPStage3", + methods: { + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts new file mode 100644 index 0000000000..e3147a8629 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts @@ -0,0 +1,45 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/view/bungee.proto (package cacti.satp.v02.view.bungee, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message cacti.satp.v02.view.bungee.BungeeView + */ +export class BungeeView extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.view.bungee.BungeeView"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BungeeView { + return new BungeeView().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BungeeView { + return new BungeeView().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BungeeView { + return new BungeeView().fromJsonString(jsonString, options); + } + + static equals(a: BungeeView | PlainMessage | undefined, b: BungeeView | PlainMessage | undefined): boolean { + return proto3.util.equals(BungeeView, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts new file mode 100644 index 0000000000..3672917b75 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts @@ -0,0 +1,62 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file test/message.proto (package test.message, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { Empty, MethodKind } from "@bufbuild/protobuf"; +import { Message, ModifyMessageRequest, ModifyMessageResponse } from "./message_pb.js"; + +/** + * @generated from service test.message.TestService + */ +export const TestService = { + typeName: "test.message.TestService", + methods: { + /** + * @generated from rpc test.message.TestService.GetMessage + */ + getMessage: { + name: "GetMessage", + I: Empty, + O: Message, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc test.message.TestService.SendMessage + */ + sendMessage: { + name: "SendMessage", + I: Message, + O: Empty, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc test.message.TestService.ModifyMessage + */ + modifyMessage: { + name: "ModifyMessage", + I: ModifyMessageRequest, + O: ModifyMessageResponse, + kind: MethodKind.Unary, + }, + } +} as const; + +/** + * @generated from service test.message.TestService2 + */ +export const TestService2 = { + typeName: "test.message.TestService2", + methods: { + /** + * @generated from rpc test.message.TestService2.GetMessage + */ + getMessage: { + name: "GetMessage", + I: Empty, + O: Message, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts new file mode 100644 index 0000000000..1a1ea00f89 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts @@ -0,0 +1,119 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file test/message.proto (package test.message, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message as Message$1, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message test.message.Message + */ +export class Message extends Message$1 { + /** + * @generated from field: string content = 1; + */ + content = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "test.message.Message"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Message { + return new Message().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Message { + return new Message().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Message { + return new Message().fromJsonString(jsonString, options); + } + + static equals(a: Message | PlainMessage | undefined, b: Message | PlainMessage | undefined): boolean { + return proto3.util.equals(Message, a, b); + } +} + +/** + * @generated from message test.message.ModifyMessageResponse + */ +export class ModifyMessageResponse extends Message$1 { + /** + * @generated from field: string content = 1; + */ + content = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "test.message.ModifyMessageResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ModifyMessageResponse { + return new ModifyMessageResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ModifyMessageResponse { + return new ModifyMessageResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ModifyMessageResponse { + return new ModifyMessageResponse().fromJsonString(jsonString, options); + } + + static equals(a: ModifyMessageResponse | PlainMessage | undefined, b: ModifyMessageResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ModifyMessageResponse, a, b); + } +} + +/** + * @generated from message test.message.ModifyMessageRequest + */ +export class ModifyMessageRequest extends Message$1 { + /** + * @generated from field: string content = 1; + */ + content = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "test.message.ModifyMessageRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ModifyMessageRequest { + return new ModifyMessageRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ModifyMessageRequest { + return new ModifyMessageRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ModifyMessageRequest { + return new ModifyMessageRequest().fromJsonString(jsonString, options); + } + + static equals(a: ModifyMessageRequest | PlainMessage | undefined, b: ModifyMessageRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ModifyMessageRequest, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/config-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/config-service.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts new file mode 100644 index 0000000000..b1b3031c64 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -0,0 +1,103 @@ +// a helper class to manage connections to counteryparty gateways + +import { Logger } from "@hyperledger/cactus-common"; +import { GatewayIdentity, GatewayChannel } from "../core/types"; +import { NonExistantGatewayIdentity } from "../core/errors"; +interface GatewayOrchestratorOptions { + logger: Logger; +} + +export class GatewayOrchestrator { + public readonly label = "GatewayOrchestrator"; + private gatewayIDs: string[] = []; + private gateways: Map = new Map(); + private channels: Map = new Map(); + private readonly logger: Logger; + + constructor( + public readonly identities: GatewayIdentity[], + options: GatewayOrchestratorOptions, + ) { + const fnTag = `${this.label}#constructor()`; + // add checks + this.logger = options.logger; + this.logger.info("Initializing Gateway Connection Manager"); + for (const identity of identities) { + this.gatewayIDs.push(identity.id); + this.gateways.set(identity.id, identity); + } + this.logger.info( + `Gateway Connection Manager bootstrapped with ${identities.length} gateways`, + ); + } + + async connectToCounterPartyGateways(): Promise { + const fnTag = `${this.label}#connectToCounterPartyGateways()`; + // add checks + this.logger.info(`Connecting to ${this.gatewayIDs.length} gateways`); + let connected = 0; + try { + for (const id of this.gatewayIDs) { + const guid = this.gateways.get(id); + if (!guid) { + throw new NonExistantGatewayIdentity(id); + } else if (!this.alreadyConnected) { + await this.createChannel(guid); + connected++; + } + } + } catch (ex) { + this.logger.error(`Failed to connect to gateway`); + this.logger.error(ex); + } + return connected; + } + + async addGateways(gateways: GatewayIdentity[]): Promise { + const fnTag = `${this.label}#addGateways()`; + // add checks + this.logger.info(`Adding ${gateways.length} gateways`); + for (const gateway of gateways) { + const id = gateway.id; + if (this.gatewayIDs.includes(id)) { + this.logger.info(`Gateway with id ${id} already exists, igonoring`); + continue; + } + this.gatewayIDs.push(id); + this.gateways.set(id, gateway); + } + return this.connectToCounterPartyGateways(); + } + + alreadyConnected(ID: string): boolean { + return this.channels.has(ID); + } + // make singleton + async createChannels(): Promise { + const fnTag = `${this.label}#boostrapChannels()`; + // Add checks and the rest of your logic here + const channels: GatewayChannel[] = []; + this.gateways.forEach(async (identity) => { + channels.push(await this.createChannel(identity)); + }); + } + + async createChannel(identity: GatewayIdentity): Promise { + const fnTag = `${this.label}#createChannel()`; + // add checks + const channel: GatewayChannel = { + id: identity.id, + }; + return channel; + } + + async disconnectAll(): Promise { + let counter = 0; + this.channels.forEach(async (channel) => { + this.logger.info(`Disconnecting from ${channel.id}`); + this.logger.error("Not implemented") + counter++; + }); + return counter; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts similarity index 93% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts index aa68b799a6..bf82655807 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts @@ -5,7 +5,7 @@ import { Optional } from "typescript-optional"; import type { Express } from "express"; import { v4 as uuidV4 } from "uuid"; import { Knex } from "knex"; -import OAS from "../../json/openapi.json"; +import OAS from "../json/openapi.json"; import { Secp256k1Keys, Logger, @@ -41,21 +41,21 @@ import { RecoverUpdateAckV1Message, RollbackV1Message, RollbackAckV1Message, -} from "../generated/openapi/typescript-axios"; -import { CommitFinalRequestEndpointV1 } from "../web-services/server-side/commit-final-request-endpoint"; -import { CommitFinalResponseEndpointV1 } from "../web-services/client-side/commit-final-response-endpoint"; -import { CommitPreparationResponseEndpointV1 } from "../web-services/client-side/commit-prepare-response-endpoint"; -import { LockEvidenceResponseEndpointV1 } from "../web-services/client-side/lock-evidence-response-endpoint"; -import { TransferCommenceResponseEndpointV1 } from "../web-services/client-side/transfer-commence-response-endpoint"; -import { TransferInitiationResponseEndpointV1 } from "../web-services/client-side/transfer-initiation-response-endpoint"; -import { LockEvidenceRequestEndpointV1 } from "../web-services/server-side/lock-evidence-request-endpoint"; -import { TransferCommenceRequestEndpointV1 } from "../web-services/server-side/transfer-commence-request-endpoint"; -import { TransferCompleteRequestEndpointV1 } from "../web-services/server-side/transfer-complete-request-endpoint"; -import { TransferInitiationRequestEndpointV1 } from "../web-services/server-side/transfer-initiation-request-endpoint"; -import { CommitPreparationRequestEndpointV1 } from "../web-services/server-side/commite-prepare-request-endpoint"; +} from "./generated/openapi/typescript-axios"; +import { CommitFinalRequestEndpointV1 } from "./web-services/server-side/commit-final-request-endpoint"; +import { CommitFinalResponseEndpointV1 } from "./web-services/client-side/commit-final-response-endpoint"; +import { CommitPreparationResponseEndpointV1 } from "./web-services/client-side/commit-prepare-response-endpoint"; +import { LockEvidenceResponseEndpointV1 } from "./web-services/client-side/lock-evidence-response-endpoint"; +import { TransferCommenceResponseEndpointV1 } from "./web-services/client-side/transfer-commence-response-endpoint"; +import { TransferInitiationResponseEndpointV1 } from "./web-services/client-side/transfer-initiation-response-endpoint"; +import { LockEvidenceRequestEndpointV1 } from "./web-services/server-side/lock-evidence-request-endpoint"; +import { TransferCommenceRequestEndpointV1 } from "./web-services/server-side/transfer-commence-request-endpoint"; +import { TransferCompleteRequestEndpointV1 } from "./web-services/server-side/transfer-complete-request-endpoint"; +import { TransferInitiationRequestEndpointV1 } from "./web-services/server-side/transfer-initiation-request-endpoint"; +import { CommitPreparationRequestEndpointV1 } from "./web-services/server-side/commite-prepare-request-endpoint"; import { randomInt } from "crypto"; -import { ClientGatewayHelper } from "./client/client-helper"; -import { ServerGatewayHelper } from "./server/server-helper"; +import { ClientGatewayHelper } from "./core/client-helper"; +import { ServerGatewayHelper } from "./core/server-helper"; import { checkValidRecoverMessage, sendRecoverMessage, @@ -73,11 +73,11 @@ import { sendRecoverSuccessMessage, } from "./recovery/recover-success"; import { SHA256 } from "crypto-js"; -import { RecoverMessageEndpointV1 } from "../web-services/recovery/recover-message-endpoint"; -import { RecoverUpdateMessageEndpointV1 } from "../web-services/recovery/recover-update-message-endpoint"; -import { RecoverUpdateAckMessageEndpointV1 } from "../web-services/recovery/recover-update-ack-message-endpoint"; -import { RecoverSuccessMessageEndpointV1 } from "../web-services/recovery/recover-success-message-endpoint"; -import { RollbackMessageEndpointV1 } from "../web-services/recovery/rollback-message-endpoint"; +import { RecoverMessageEndpointV1 } from "./web-services/recovery/recover-message-endpoint"; +import { RecoverUpdateMessageEndpointV1 } from "./web-services/recovery/recover-update-message-endpoint"; +import { RecoverUpdateAckMessageEndpointV1 } from "./web-services/recovery/recover-update-ack-message-endpoint"; +import { RecoverSuccessMessageEndpointV1 } from "./web-services/recovery/recover-success-message-endpoint"; +import { RollbackMessageEndpointV1 } from "./web-services/recovery/rollback-message-endpoint"; import { checkValidRollbackMessage, sendRollbackMessage, @@ -87,8 +87,8 @@ import { checkValidRollbackAckMessage, sendRollbackAckMessage, } from "./recovery/rollback-ack"; -import { ClientRequestEndpointV1 } from "../web-services/client-side/client-request-endpoint"; -import { RollbackAckMessageEndpointV1 } from "../web-services/recovery/rollback-ack-message-endpoint"; +import { ClientRequestEndpointV1 } from "./web-services/client-side/client-request-endpoint"; +import { RollbackAckMessageEndpointV1 } from "./web-services/recovery/rollback-ack-message-endpoint"; import { KnexLocalLogRepository as LocalLogRepository } from "./repository/knex-local-log-repository"; import { IPFSRemoteLogRepository } from "./repository/ipfs-remote-log-repository"; import { KnexRemoteLogRepository } from "./repository/knex-remote-log-repository"; @@ -147,10 +147,11 @@ export interface ILocalLog { timestamp?: string; } -export abstract class PluginSatpGateway +// todo implement factory +export abstract class PluginSATPGateway implements ICactusPlugin, IPluginWebService { - public static readonly CLASS_NAME = "SatpGateway"; + public static readonly CLASS_NAME = "SATPGateway"; private readonly instanceId: string; private readonly _log: Logger; @@ -190,8 +191,8 @@ export abstract class PluginSatpGateway const keyPairs = options.keyPair ? options.keyPair : Secp256k1Keys.generateKeyPairsBuffer(); - this._pubKey = PluginSatpGateway.bufArray2HexStr(keyPairs.publicKey); - this._privKey = PluginSatpGateway.bufArray2HexStr(keyPairs.privateKey); + this._pubKey = PluginSATPGateway.bufArray2HexStr(keyPairs.publicKey); + this._privKey = PluginSATPGateway.bufArray2HexStr(keyPairs.privateKey); const objectSignerOptions: IJsObjectSignerOptions = { privateKey: this._privKey, @@ -212,7 +213,7 @@ export abstract class PluginSatpGateway } public get className(): string { - return PluginSatpGateway.CLASS_NAME; + return PluginSATPGateway.CLASS_NAME; } public getOpenApiSpec(): unknown { @@ -485,7 +486,7 @@ export abstract class PluginSatpGateway signerPubKey: this.pubKey, }; - remoteLog.signature = PluginSatpGateway.bufArray2HexStr( + remoteLog.signature = PluginSATPGateway.bufArray2HexStr( this.sign(JSON.stringify(remoteLog)), ); @@ -501,7 +502,7 @@ export abstract class PluginSatpGateway } async storeLog(localLog: LocalLog): Promise { - localLog.key = PluginSatpGateway.getSatpLogKey( + localLog.key = PluginSATPGateway.getSatpLogKey( localLog.sessionID, localLog.type, localLog.operation, @@ -529,7 +530,7 @@ export abstract class PluginSatpGateway async storeProof(localLog: ILocalLog): Promise { if (localLog.data == undefined) return; - localLog.key = PluginSatpGateway.getSatpLogKey( + localLog.key = PluginSATPGateway.getSatpLogKey( localLog.sessionID, localLog.type, localLog.operation, 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 index 530de4eccc..3d3afb7425 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts @@ -2,26 +2,28 @@ export * from "./generated/openapi/typescript-axios/index"; export { IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, + PluginSATPGateway, SatpMessageType, IKeyPair, -} from "./gateway/plugin-satp-gateway"; +} from "./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"; +import { PluginFactoryFabricSATPGateway } from "./factory/plugin-factory-fabric-satp-gateway"; +import { PluginFactoryBesuSATPGateway } from "./factory/plugin-factory-besu-satp-gateway"; +import { fileURLToPath } from "url"; export async function createFabricPluginFactory( pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryFabricSatpGateway(pluginFactoryOptions); +): Promise { + return new PluginFactoryFabricSATPGateway(pluginFactoryOptions); } export async function createBesuPluginFactory( pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryBesuSatpGateway(pluginFactoryOptions); +): Promise { + return new PluginFactoryBesuSATPGateway(pluginFactoryOptions); } -export { ServerGatewayHelper } from "./gateway/server/server-helper"; -export { ClientGatewayHelper } from "./gateway/client/client-helper"; +export { ServerGatewayHelper } from "./core/server-helper"; +export { ClientGatewayHelper } from "./core/client-helper"; +// TODO! export new gateway diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts similarity index 89% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts index ce7fde8f88..0d01714677 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts @@ -1,6 +1,6 @@ -import { RecoverSuccessV1Message } from "../../generated/openapi/typescript-axios"; +import { RecoverSuccessV1Message } from "../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; +import { PluginSATPGateway } from "../plugin-satp-gateway"; const log = LoggerProvider.getOrCreate({ level: "INFO", @@ -9,7 +9,7 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverSuccessMessage( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendRecoverSuccessMessage()`; @@ -32,7 +32,7 @@ export async function sendRecoverSuccessMessage( signature: "", }; - const signature = PluginSatpGateway.bufArray2HexStr( + const signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(recoverSuccessMessage)), ); @@ -46,7 +46,7 @@ export async function sendRecoverSuccessMessage( await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, @@ -57,7 +57,7 @@ export async function sendRecoverSuccessMessage( export async function checkValidRecoverSuccessMessage( response: RecoverSuccessV1Message, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidRecoverSuccessMessage`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts similarity index 89% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts index b6233120fb..911f5b8495 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts @@ -1,6 +1,6 @@ -import { RecoverUpdateAckV1Message } from "../../generated/openapi/typescript-axios"; +import { RecoverUpdateAckV1Message } from "../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; +import { PluginSATPGateway } from "../plugin-satp-gateway"; // import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -10,7 +10,7 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverUpdateAckMessage( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendRecoverUpdateAckMessage()`; @@ -35,7 +35,7 @@ export async function sendRecoverUpdateAckMessage( signature: "", }; - const signature = PluginSatpGateway.bufArray2HexStr( + const signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(recoverUpdateMessage)), ); @@ -49,7 +49,7 @@ export async function sendRecoverUpdateAckMessage( await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, @@ -60,7 +60,7 @@ export async function sendRecoverUpdateAckMessage( export async function checkValidRecoverUpdateAckMessage( response: RecoverUpdateAckV1Message, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidRecoverUpdateAckMessage`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts similarity index 93% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts index 82c1d5e7ed..b6a915ac55 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts @@ -1,9 +1,9 @@ import { LocalLog, RecoverUpdateV1Message, -} from "../../generated/openapi/typescript-axios"; +} from "../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; +import { PluginSATPGateway } from "../plugin-satp-gateway"; import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -13,7 +13,7 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverUpdateMessage( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendRecoverUpdateMessage()`; @@ -43,7 +43,7 @@ export async function sendRecoverUpdateMessage( signature: "", }; - const signature = PluginSatpGateway.bufArray2HexStr( + const signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(recoverUpdateMessage)), ); @@ -57,7 +57,7 @@ export async function sendRecoverUpdateMessage( await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, @@ -68,7 +68,7 @@ export async function sendRecoverUpdateMessage( export async function checkValidRecoverUpdateMessage( response: RecoverUpdateV1Message, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidRecoverUpdateMessage`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts similarity index 93% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts index 1a0d0d4194..92263f424f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts @@ -1,6 +1,6 @@ -import { RecoverV1Message } from "../../generated/openapi/typescript-axios"; +import { RecoverV1Message } from "../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; +import { PluginSATPGateway } from "../plugin-satp-gateway"; const log = LoggerProvider.getOrCreate({ level: "INFO", @@ -9,7 +9,7 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverMessage( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, backup: boolean, remote: boolean, ): Promise { @@ -40,7 +40,7 @@ export async function sendRecoverMessage( signature: "", }; - const signature = PluginSatpGateway.bufArray2HexStr( + const signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(recoverMessage)), ); @@ -54,7 +54,7 @@ export async function sendRecoverMessage( await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, @@ -65,7 +65,7 @@ export async function sendRecoverMessage( export async function checkValidRecoverMessage( response: RecoverV1Message, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidRecoverMessage`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts similarity index 89% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts index b1126388fd..24ab040cce 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts @@ -1,6 +1,6 @@ -import { RollbackAckV1Message } from "../../generated/openapi/typescript-axios"; +import { RollbackAckV1Message } from "../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; +import { PluginSATPGateway } from "../plugin-satp-gateway"; // import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -10,7 +10,7 @@ const log = LoggerProvider.getOrCreate({ export async function sendRollbackAckMessage( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendRollbackAckMessage()`; @@ -35,7 +35,7 @@ export async function sendRollbackAckMessage( signature: "", }; - const signature = PluginSatpGateway.bufArray2HexStr( + const signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(rollbackAckMessage)), ); @@ -49,7 +49,7 @@ export async function sendRollbackAckMessage( await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, @@ -60,7 +60,7 @@ export async function sendRollbackAckMessage( export async function checkValidRollbackAckMessage( response: RollbackAckV1Message, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidRollbackAckMessage`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts similarity index 89% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts index 75f9782a09..e9b573af1d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts @@ -1,6 +1,6 @@ -import { RollbackV1Message } from "../../generated/openapi/typescript-axios"; +import { RollbackV1Message } from "../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSatpGateway } from "../plugin-satp-gateway"; +import { PluginSATPGateway } from "../plugin-satp-gateway"; // import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -10,7 +10,7 @@ const log = LoggerProvider.getOrCreate({ export async function sendRollbackMessage( sessionID: string, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, remote: boolean, ): Promise { const fnTag = `${gateway.className}#sendRollbackMessage()`; @@ -37,7 +37,7 @@ export async function sendRollbackMessage( signature: "", }; - const signature = PluginSatpGateway.bufArray2HexStr( + const signature = PluginSATPGateway.bufArray2HexStr( gateway.sign(JSON.stringify(rollbackMessage)), ); @@ -51,7 +51,7 @@ export async function sendRollbackMessage( await gateway.makeRequest( sessionID, - PluginSatpGateway.getSatpAPI( + PluginSATPGateway.getSatpAPI( gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, @@ -62,7 +62,7 @@ export async function sendRollbackMessage( export async function checkValidRollbackMessage( response: RollbackV1Message, - gateway: PluginSatpGateway, + gateway: PluginSATPGateway, ): Promise { const fnTag = `${gateway.className}#checkValidRollbackMessage`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/interfaces/repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/interfaces/repository.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/ipfs-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/ipfs-remote-log-repository.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-local-log-repository.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts index 65c07b10de..b977e3e111 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-local-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts @@ -7,7 +7,7 @@ export class KnexLocalLogRepository implements ILocalLogRepository { public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../knex/knexfile.ts")[ + const configFile = require("../../../../knex/knexfile.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts similarity index 93% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-remote-log-repository.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts index 8d064da275..9431076d0a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/repository/knex-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts @@ -10,7 +10,7 @@ export class KnexRemoteLogRepository implements IRemoteLogRepository { // simulating a remote log storage public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../knex/knexfile-remote.ts")[ + const configFile = require("../../../../knex/knexfile-remote.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts index 9ef597bf16..99a4124477 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IClientRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class ClientRequestEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts index c68f4864bd..e08e40a183 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitFinalResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class CommitFinalResponseEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts index f7d9f0fa24..6d7066a2b0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitPreparationResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class CommitPreparationResponseEndpointV1 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts index b59a2db14b..f61c7b6161 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ILockEvidenceResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class LockEvidenceResponseEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts index 4e0ab33676..0de0281eb2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferCommenceResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class TransferCommenceResponseEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts index b5155591de..dbe1929339 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferInitiationResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class TransferInitiationResponseEndpointV1 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts index 39b167e403..f2416f4894 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class RecoverMessageEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts index 9ce43e466a..09b5ad642e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverSuccessMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class RecoverSuccessMessageEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts index a9808d4922..aa0a36029d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverUpdateAckMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class RecoverUpdateAckMessageEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts index f10cff1b9f..a6d3aca96c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverUpdateMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class RecoverUpdateMessageEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts index 2857f12b5b..0e82229c07 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRollbackAckMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class RollbackAckMessageEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts index 3e09838d58..d7da7f1991 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRollbackMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class RollbackMessageEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts new file mode 100644 index 0000000000..9f0248e275 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts @@ -0,0 +1,12 @@ +import { ConnectRouter } from "@connectrpc/connect"; +import { TestService } from '../generated/proto/test/message_connect'; +import { TestService2 } from '../generated/proto/test/message_connect'; + +import { TestImplementation } from "./test/test"; +import { TestImplementation2 } from "./test/test2"; + +export const configureRoutes = (router: ConnectRouter): void => { + // TODO: add all services and respective implementations + router.service(TestService, TestImplementation); + router.service(TestService2, TestImplementation2); +}; \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts index cdf2004e8d..847d525a79 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitFinalRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class CommitFinalRequestEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts index 4c87695844..79e468e21f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitPreparationRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class CommitPreparationRequestEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts index 8265526059..e8b90a1344 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ILockEvidenceRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class LockEvidenceRequestEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts index 8853a65632..c3f9b2bb67 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferCommenceRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class TransferCommenceRequestEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts index f2d57b398a..86c19ca18d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferCompleteRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class TransferCompleteRequestEndpointV1 implements IWebServiceEndpoint { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts index 68c9e29d37..deed90e247 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferInitiationRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginSatpGateway; + gateway: PluginSATPGateway; } export class TransferInitiationRequestEndpointV1 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/dummy-step.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/dummy-step.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/identity-verification.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/identity-verification.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts new file mode 100644 index 0000000000..2ed4a41ecf --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts @@ -0,0 +1,36 @@ +import { Empty } from "@bufbuild/protobuf"; +import { Message, ModifyMessageRequest, ModifyMessageResponse } from '../../generated/proto/test/message_pb'; +import { HandlerContext } from '@connectrpc/connect'; + +// TODO: investigate how we can get type security, without doing the following: +/* +interface ITestServiceImplementation { + getMessage(req: Empty): Promise; + sendMessage(req: Message): Promise; + modifyMessage(req: ModifyMessageRequest): Promise; +} + +const TestImplementation: ITestServiceImplementation = { + + */ + +// TODO: inject logger from gateway? + +export const TestImplementation: any = { + async getMessage(req: Empty, context: HandlerContext): Promise { + console.log("Received request", req); + return new Message({ + content: "Hello, SATP!" + }); + }, + async sendMessage(req: Message): Promise { + console.log("Received request", req); + return new Empty(); + }, + async modifyMessage(req: ModifyMessageRequest): Promise { + console.log("Received request", req); + return new ModifyMessageResponse({ + content: "You said " + req.content + }); + }, +}; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts new file mode 100644 index 0000000000..44d134d2ba --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts @@ -0,0 +1,12 @@ +import { Empty } from "@bufbuild/protobuf"; +import { Message, ModifyMessageRequest, ModifyMessageResponse } from '../../generated/proto/test/message_pb'; +import { HandlerContext } from '@connectrpc/connect'; + +export const TestImplementation2: any = { + async getMessage(req: Empty, context: HandlerContext): Promise { + console.log("Received request", req); + return new Message({ + content: "Hello, SATP!" + "2" + }); + }, +}; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts index 56b53352a8..b51eb5dd6d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts @@ -30,7 +30,7 @@ import { PluginImportType, Constants, } from "@hyperledger/cactus-core-api"; -import { PluginSatpGateway } from "../../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../../main/typescript/plugin-satp-gateway"; import { ChainCodeProgrammingLanguage, DefaultEventHandlerStrategy, @@ -53,15 +53,15 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; + FabricSATPGateway, + IFabricSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/fabric-satp-gateway"; import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + BesuSATPGateway, + IBesuSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/besu-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -91,10 +91,10 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; let clientGatewayApiHost: string; let serverGatewayApiHost: string; @@ -509,7 +509,7 @@ beforeAll(async () => { // Gateways configuration const allowedGateways = []; allowedGateways.push( - PluginSatpGateway.bufArray2HexStr(backupGatewayKeys.publicKey), + PluginSATPGateway.bufArray2HexStr(backupGatewayKeys.publicKey), ); clientGatewayPluginOptions = { @@ -543,8 +543,8 @@ beforeAll(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect( @@ -767,7 +767,7 @@ test("client gateway crashes after lock fabric asset", async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts index fa5743855f..86c5984540 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts @@ -52,15 +52,15 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; + IFabricSATPGatewayConstructorOptions, + FabricSATPGateway, +} from "../../../main/typescript/core/fabric-satp-gateway"; import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + IBesuSATPGatewayConstructorOptions, + BesuSATPGateway, +} from "../../../main/typescript/core/besu-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -97,10 +97,10 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; let clientGatewayApiHost: string; let serverGatewayApiHost: string; @@ -540,8 +540,8 @@ beforeAll(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect( @@ -784,7 +784,7 @@ test("client gateway crashes after deleting fabric asset", async () => { await Servers.listen(listenOptions); - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(expressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts index 8ce74cc602..d8dae07561 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts @@ -52,15 +52,15 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; + BesuSATPGateway, + IBesuSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/besu-satp-gateway"; import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + FabricSATPGateway, + IFabricSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -97,10 +97,10 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; let clientGatewayApiHost: string; let serverGatewayApiHost: string; @@ -541,8 +541,8 @@ beforeAll(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect( @@ -721,7 +721,7 @@ test("client gateway crashes after lock fabric asset", async () => { await Servers.listen(listenOptions); - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(expressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts index 7222bbffd7..60a3521d69 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts @@ -11,18 +11,18 @@ import { } from "@hyperledger/cactus-common"; import { IPluginSatpGatewayConstructorOptions, - PluginSatpGateway, -} from "../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../main/typescript/plugin-satp-gateway"; import { AssetProfile, ClientV1Request, } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; -import { BesuSatpGateway } from "../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; +import { BesuSATPGateway } from "../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gateway"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; import { knexClientConnection, @@ -39,8 +39,8 @@ const BESU_ASSET_ID = uuidv4(); let serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; let clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sourceGatewayServer: Server; let recipientGatewayserver: Server; @@ -86,7 +86,7 @@ beforeAll(async () => { const { address, port } = addressInfo; serverGatewayApiHost = `http://${address}:${port}`; - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect( pluginRecipientGateway.localRepository?.database, @@ -125,7 +125,7 @@ beforeAll(async () => { const { address, port } = addressInfo; clientGatewayApiHost = `http://${address}:${port}`; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); if (pluginSourceGateway.localRepository?.database == undefined) { throw new Error("Database is not correctly initialized"); @@ -225,7 +225,7 @@ test("successful run ODAP after client gateway crashed after after receiving tra await Servers.listen(listenOptions); - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(clientExpressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts new file mode 100644 index 0000000000..7ddc8a62d9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts @@ -0,0 +1,157 @@ +import "jest-extended"; +import { + Containers, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, + BesuTestLedger, +} from "@hyperledger/cactus-test-tooling"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +// import coordinator factory, coordinator and coordinator options +import { SATPGateway, SATPGatewayConfig } from "../../../main/typescript/gateway-refactor"; +import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; +import { + IPluginFactoryOptions, PluginImportType, +} from "@hyperledger/cactus-core-api"; +import { SupportedGatewayImplementations } from './../../../main/typescript/core/types'; + +const logLevel: LogLevelDesc = "INFO"; +const log = LoggerProvider.getOrCreate({ + level: "INFO", + label: "satp-gateway-orchestrator-init-test", +}); +const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, +} +const factory = new PluginFactorySATPGateway(factoryOptions); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +describe("SATPGateway initialization", () => { + + it("initiates with default config", async () => { + const options: SATPGatewayConfig = {}; + const gateway = await factory.create(options); + + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.getIdentity(); + expect(identity).toBeDefined(); + expect(identity.id).toBeDefined(); + expect(identity.name).toBeDefined(); + expect(identity.version).toEqual([ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ]); + expect(identity.supportedChains).toEqual([ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]); + expect(identity.proofID).toBe("mockProofID1"); + expect(identity.port).toBe(3000); + expect(identity.address).toBe("http://localhost"); + }); + + test("initiates custom config Gateway Coordinator", async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + port: 3001, + address: "https://localhost", + }, + }; + const gateway = await factory.create(options); + + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.getIdentity(); + expect(identity).toBeDefined(); + expect(identity.id).toBeDefined(); + expect(identity.name).toBeDefined(); + expect(identity.version).toEqual([ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ]); + expect(identity.supportedChains).toEqual([ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]); + expect(identity.proofID).toBe("mockProofID10"); + expect(identity.port).toBe(3001); + expect(identity.address).toBe("https://localhost"); + }); + + test("Gateway Server launches", async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + port: 3010, + address: "https://localhost", + }, + }; + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.getIdentity(); + expect(identity.port).toBe(3010); + expect(identity.address).toBe("https://localhost"); + await gateway.startupServer(); + await gateway.shutdown(); + }); + +}); + +afterAll(async () => { + // shutdown channels + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts index 3a006161b4..51ce622134 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts @@ -52,15 +52,15 @@ import { import { makeSessionDataChecks } from "../make-checks"; import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; + FabricSATPGateway, + IFabricSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/fabric-satp-gateway"; import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + BesuSATPGateway, + IBesuSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/besu-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; /** @@ -91,8 +91,8 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; let clientGatewayApiHost: string; let serverGatewayApiHost: string; @@ -477,7 +477,7 @@ beforeAll(async () => { { // Gateways configuration - const clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions = { + const clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions = { name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), @@ -490,7 +490,7 @@ beforeAll(async () => { knexRemoteConfig: knexRemoteConnection, }; - const serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions = { + const serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions = { name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), @@ -503,8 +503,8 @@ beforeAll(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect( diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts index 7872b5517f..2f5ec22b1c 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts @@ -11,19 +11,19 @@ import { IListenOptions, Servers } from "@hyperledger/cactus-common"; import { Configuration } from "@hyperledger/cactus-core-api"; import { - PluginSatpGateway, + PluginSATPGateway, IPluginSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/plugin-satp-gateway"; +} from "../../../main/typescript/plugin-satp-gateway"; import { AssetProfile, ClientV1Request, } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; -import { BesuSatpGateway } from "../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; const MAX_RETRIES = 5; @@ -35,8 +35,8 @@ const BESU_ASSET_ID = uuidv4(); let sourceGatewayServer: Server; let recipientGatewayserver: Server; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; test("runs ODAP between two gateways via openApi", async () => { const clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { @@ -57,8 +57,8 @@ test("runs ODAP between two gateways via openApi", async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts index b932b4378b..af92b02d7d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts @@ -54,15 +54,15 @@ import { import Web3 from "web3"; import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; + IFabricSATPGatewayConstructorOptions, + FabricSATPGateway, +} from "../../../main/typescript/core/fabric-satp-gateway"; import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + IBesuSATPGatewayConstructorOptions, + BesuSATPGateway, +} from "../../../main/typescript/core/besu-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; /** @@ -97,10 +97,10 @@ let besuConnector: PluginLedgerConnectorBesu; let clientGatewayApiHost: string; let serverGatewayApiHost: string; -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -538,8 +538,8 @@ beforeAll(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect( @@ -817,7 +817,7 @@ test("client sends rollback message at the end of the protocol", async () => { await Servers.listen(listenOptions); - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(expressApp); await pluginSourceGateway.recoverOpenSessions(true); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts index 1ff28ee2f1..145762dd29 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts @@ -1,6 +1,6 @@ import "jest-extended"; import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../../main/typescript/plugin-satp-gateway"; import { AssetProfile, @@ -8,19 +8,20 @@ import { } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; -import { BesuSatpGateway } from "../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; test("successful run ODAP instance", async () => { + console.log(knexRemoteConnection) const sourceGatewayConstructor = { name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], @@ -38,8 +39,8 @@ test("successful run ODAP instance", async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts index beeda4d4b0..c0d496f64e 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts @@ -53,15 +53,15 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - BesuSatpGateway, - IBesuSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-satp-gateway"; + BesuSATPGateway, + IBesuSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/besu-satp-gateway"; import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + FabricSATPGateway, + IFabricSATPGatewayConstructorOptions, +} from "../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -98,9 +98,9 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; let clientGatewayApiHost: string; let serverGatewayApiHost: string; @@ -513,7 +513,7 @@ beforeAll(async () => { beforeEach(async () => { { // Gateways configuration - const clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions = { + const clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions = { name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), @@ -543,8 +543,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect( @@ -807,7 +807,7 @@ test("server gateway crashes after creating besu asset", async () => { await Servers.listen(listenOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); await pluginRecipientGateway.registerWebServices(expressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts index 7e22aa5441..92f0f6296a 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts @@ -16,15 +16,15 @@ import { } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; import { - IFabricSatpGatewayConstructorOptions, - FabricSatpGateway, -} from "../../../main/typescript/gateway/fabric-satp-gateway"; + IFabricSATPGatewayConstructorOptions, + FabricSATPGateway, +} from "../../../main/typescript/core/fabric-satp-gateway"; import { - IBesuSatpGatewayConstructorOptions, - BesuSatpGateway, -} from "../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; + IBesuSATPGatewayConstructorOptions, + BesuSATPGateway, +} from "../../../main/typescript/core/besu-satp-gateway"; +import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, knexRemoteConnection } from "../knex.config"; @@ -34,10 +34,10 @@ const MAX_TIMEOUT = 5000; const FABRIC_ASSET_ID = uuidv4(); const BESU_ASSET_ID = uuidv4(); -let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: FabricSatpGateway; -let pluginRecipientGateway: BesuSatpGateway; +let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; +let pluginSourceGateway: FabricSATPGateway; +let pluginRecipientGateway: BesuSATPGateway; let sourceGatewayServer: Server; let recipientGatewayserver: Server; @@ -82,7 +82,7 @@ beforeAll(async () => { const { address, port } = addressInfo; serverGatewayApiHost = `http://${address}:${port}`; - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); expect( pluginRecipientGateway.localRepository?.database, @@ -121,7 +121,7 @@ beforeAll(async () => { const { address, port } = addressInfo; clientGatewayApiHost = `http://${address}:${port}`; - pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); if (pluginSourceGateway.localRepository?.database == undefined) { throw new Error("Database is not correctly initialized"); @@ -204,7 +204,7 @@ test("server gateway crashes after transfer initiation flow", async () => { await Servers.listen(listenOptions); - pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); + pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); await pluginRecipientGateway.registerWebServices(serverExpressApp); // server gateway self-healed and is back online diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts index d82d6f39a1..863e166f6d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts @@ -1,8 +1,8 @@ -import { PluginSatpGateway } from "../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../main/typescript/plugin-satp-gateway"; export async function makeSessionDataChecks( - pluginSourceGateway: PluginSatpGateway, - pluginRecipientGateway: PluginSatpGateway, + 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( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "validate"), + PluginSATPGateway.getSatpLogKey(sessionId, "init", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "validate"), + PluginSATPGateway.getSatpLogKey(sessionId, "exec", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "validate"), + PluginSATPGateway.getSatpLogKey(sessionId, "done", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "validate"), + PluginSATPGateway.getSatpLogKey(sessionId, "ack", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "commence"), + PluginSATPGateway.getSatpLogKey(sessionId, "init", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "commence"), + PluginSATPGateway.getSatpLogKey(sessionId, "exec", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "commence"), + PluginSATPGateway.getSatpLogKey(sessionId, "done", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "commence"), + PluginSATPGateway.getSatpLogKey(sessionId, "ack", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "lock"), + PluginSATPGateway.getSatpLogKey(sessionId, "init", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "lock"), + PluginSATPGateway.getSatpLogKey(sessionId, "exec", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "lock"), + PluginSATPGateway.getSatpLogKey(sessionId, "done", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "lock"), + PluginSATPGateway.getSatpLogKey(sessionId, "ack", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "prepare"), + PluginSATPGateway.getSatpLogKey(sessionId, "init", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "prepare"), + PluginSATPGateway.getSatpLogKey(sessionId, "exec", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "prepare"), + PluginSATPGateway.getSatpLogKey(sessionId, "done", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "prepare"), + PluginSATPGateway.getSatpLogKey(sessionId, "ack", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "final"), + PluginSATPGateway.getSatpLogKey(sessionId, "init", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "final"), + PluginSATPGateway.getSatpLogKey(sessionId, "exec", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "final"), + PluginSATPGateway.getSatpLogKey(sessionId, "done", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "ack", "final"), + PluginSATPGateway.getSatpLogKey(sessionId, "ack", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "init", "complete"), + PluginSATPGateway.getSatpLogKey(sessionId, "init", "complete"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "exec", "complete"), + PluginSATPGateway.getSatpLogKey(sessionId, "exec", "complete"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginSatpGateway.getSatpLogKey(sessionId, "done", "complete"), + PluginSATPGateway.getSatpLogKey(sessionId, "done", "complete"), ), ).resolves.not.toBeUndefined(); } diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts index 5af9109a5d..af553bf07f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts @@ -3,17 +3,17 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidv4 } from "uuid"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { CommitFinalV1Response, SessionData, } from "../../../../main/typescript/public-api"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; import { knexRemoteConnection } from "../../knex.config"; const MAX_RETRIES = 5; @@ -24,8 +24,8 @@ const COMMIT_ACK_CLAIM = "dummyCommitAckClaim"; let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sequenceNumber: number; let sessionID: string; let step: number; @@ -48,8 +48,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -117,7 +117,7 @@ test("valid commit final response", async () => { sequenceNumber: sequenceNumber, }; - commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), ); @@ -154,7 +154,7 @@ test("commit final response invalid because of wrong previous message hash", asy sequenceNumber: sequenceNumber, }; - commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), ); @@ -182,7 +182,7 @@ test("commit final response invalid because of wrong signature", async () => { sequenceNumber: sequenceNumber, }; - commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts index 283c6d75d4..03494513f3 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts @@ -4,16 +4,16 @@ import { v4 as uuidV4 } from "uuid"; import { IPluginSatpGatewayConstructorOptions, SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { CommitPreparationV1Response, SessionData, } from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -23,8 +23,8 @@ const COMMIT_PREPARATION_REQUEST_MESSAGE_HASH = let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sequenceNumber: number; let sessionID: string; let step: number; @@ -45,8 +45,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -91,7 +91,7 @@ test("valid commit preparation response", async () => { sequenceNumber: sequenceNumber, }; - commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( + commitPreparationResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign( JSON.stringify(commitPreparationResponse), ), @@ -130,7 +130,7 @@ test("commit preparation response invalid because of wrong previous message hash sequenceNumber: sequenceNumber, }; - commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( + commitPreparationResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign( JSON.stringify(commitPreparationResponse), ), @@ -162,7 +162,7 @@ test("commit preparation response invalid because of wrong signature", async () sequenceNumber: sequenceNumber, }; - commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( + commitPreparationResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts index 03d28603a5..eec07d8763 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts @@ -3,16 +3,16 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { LockEvidenceV1Response, SessionData, } from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -22,8 +22,8 @@ const LOCK_EVIDENCE_REQUEST_MESSAGE_HASH = let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sequenceNumber: number; let sessionID: string; let step: number; @@ -44,8 +44,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -90,7 +90,7 @@ test("valid lock evidence response", async () => { sequenceNumber: sequenceNumber, }; - lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), ); @@ -125,7 +125,7 @@ test("lock evidence response invalid because of wrong previous message hash", as sequenceNumber: sequenceNumber, }; - lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), ); @@ -152,7 +152,7 @@ test("lock evidence response invalid because of wrong signature", async () => { sequenceNumber: sequenceNumber, }; - lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts index f695f62883..9a098ad4fa 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts @@ -3,17 +3,17 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { AssetProfile, SessionData, TransferCommenceV1Response, } from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -22,8 +22,8 @@ const COMMENCE_REQUEST_MESSAGE_HASH = "dummyCommenceRequestMessageHash"; let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sequenceNumber: number; let sessionID: string; let step: number; @@ -44,8 +44,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -90,7 +90,7 @@ test("valid transfer commence response", async () => { sequenceNumber: sequenceNumber, }; - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), ); @@ -127,7 +127,7 @@ test("transfer commence response invalid because of wrong previous message hash" sequenceNumber: sequenceNumber, }; - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), ); @@ -157,7 +157,7 @@ test("transfer commence response invalid because of wrong signature", async () = sequenceNumber: sequenceNumber, }; - transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts index d1f14ffc56..434e74777d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts @@ -3,17 +3,17 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { TransferInitializationV1Response, SessionData, AssetProfile, } from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -23,8 +23,8 @@ const INITIALIZATION_REQUEST_MESSAGE_HASH = let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sequenceNumber: number; let sessionID: string; let step: number; @@ -45,8 +45,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -93,7 +93,7 @@ test("valid transfer initiation response", async () => { backupGatewaysAllowed: [], }; - initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + initializationResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( await pluginRecipientGateway.sign( JSON.stringify(initializationResponseMessage), ), @@ -140,7 +140,7 @@ test("transfer initiation response invalid because of wrong previous message has backupGatewaysAllowed: [], }; - initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + initializationResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationResponseMessage), ), @@ -174,7 +174,7 @@ test("transfer initiation response invalid because it does not match transfer in backupGatewaysAllowed: [], }; - initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + initializationResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationResponseMessage), ), diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index 9bea4dc804..5087233c80 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -4,18 +4,18 @@ import { Secp256k1Keys } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; import { ILocalLog, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { SessionData } from "../../../../main/typescript/public-api"; import { SHA256 } from "crypto-js"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; import { - FabricSatpGateway, - IFabricSatpGatewayConstructorOptions, -} from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; + FabricSATPGateway, + IFabricSATPGatewayConstructorOptions, +} from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -23,10 +23,10 @@ import { knexServerConnection, } from "../../knex.config"; -let sourceGatewayConstructor: IFabricSatpGatewayConstructorOptions; +let sourceGatewayConstructor: IFabricSATPGatewayConstructorOptions; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sessionID: string; let step: number; let type: string; @@ -66,8 +66,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); sessionData = { id: sessionID, @@ -98,14 +98,14 @@ beforeEach(async () => { }); test("successful translation of log keys", async () => { - expect(PluginSatpGateway.getSatpLogKey(sessionID, type, operation)).toBe( + expect(PluginSATPGateway.getSatpLogKey(sessionID, type, operation)).toBe( `${sessionID}-${type}-${operation}`, ); }); test("successful logging of proof to ipfs and sqlite", async () => { const claim = "claim"; - const satpLogKey = PluginSatpGateway.getSatpLogKey( + const satpLogKey = PluginSATPGateway.getSatpLogKey( sessionID, "proof", "lock", @@ -141,7 +141,7 @@ test("successful logging of proof to ipfs and sqlite", async () => { }); test("successful logging to ipfs and sqlite", async () => { - const satpLogKey = PluginSatpGateway.getSatpLogKey( + const satpLogKey = PluginSATPGateway.getSatpLogKey( sessionID, type, operation, @@ -230,7 +230,7 @@ test("successful retrieval of last log", async () => { expect(lastLog.operation).toBe(satpLog3.operation); expect(lastLog.sessionID).toBe(satpLog3.sessionID); expect(lastLog.key).toBe( - PluginSatpGateway.getSatpLogKey(sessionID, type3, operation), + PluginSATPGateway.getSatpLogKey(sessionID, type3, operation), ); }); @@ -285,7 +285,7 @@ test("successful retrieval of logs more recent than another log", async () => { expect(moreRecentLogs[0].operation).toBe(satpLog.operation); expect(moreRecentLogs[0].sessionID).toBe(satpLog.sessionID); expect(moreRecentLogs[0].key).toBe( - PluginSatpGateway.getSatpLogKey(sessionID, type, operation), + PluginSATPGateway.getSatpLogKey(sessionID, type, operation), ); expect(moreRecentLogs[1].type).toBe(satpLog3.type); @@ -297,7 +297,7 @@ test("successful retrieval of logs more recent than another log", async () => { expect(moreRecentLogs[1].operation).toBe(satpLog3.operation); expect(moreRecentLogs[1].sessionID).toBe(satpLog3.sessionID); expect(moreRecentLogs[1].key).toBe( - PluginSatpGateway.getSatpLogKey(sessionID, type3, operation), + PluginSATPGateway.getSatpLogKey(sessionID, type3, operation), ); }); @@ -356,7 +356,7 @@ test("successful recover of sessions after crash", async () => { // simulate the crash of one gateway pluginSourceGateway.localRepository?.destroy(); - const newPluginSourceGateway = new FabricSatpGateway( + const newPluginSourceGateway = new FabricSATPGateway( sourceGatewayConstructor, ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts index 9ba8213ba8..f788ac6571 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts @@ -1,18 +1,18 @@ import { v4 as uuidv4 } from "uuid"; import "jest-extended"; import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; import { RecoverSuccessV1Message, SessionData, } from "../../../../main/typescript/public-api"; import { randomInt } from "crypto"; -import { checkValidRecoverSuccessMessage } from "../../../../main/typescript/gateway/recovery/recover-success"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { checkValidRecoverSuccessMessage } from "../../../../main/typescript/recovery/recover-success"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -20,8 +20,8 @@ import { knexServerConnection, } from "../../knex.config"; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sessionID: string; let sessionData: SessionData; @@ -47,8 +47,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -80,7 +80,7 @@ test("valid recover success message from client", async () => { success: true, }; - recoverSuccessMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverSuccessMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverSuccessMessage)), ); @@ -97,7 +97,7 @@ test("valid recover success message from server", async () => { success: true, }; - recoverSuccessMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverSuccessMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverSuccessMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts index 7aee41c579..d322274466 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts @@ -1,18 +1,18 @@ import { v4 as uuidv4 } from "uuid"; import "jest-extended"; import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; import { RecoverUpdateAckV1Message, SessionData, } from "../../../../main/typescript/public-api"; import { randomInt } from "crypto"; -import { checkValidRecoverUpdateAckMessage } from "../../../../main/typescript/gateway/recovery/recover-update-ack"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { checkValidRecoverUpdateAckMessage } from "../../../../main/typescript/recovery/recover-update-ack"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -20,8 +20,8 @@ import { knexServerConnection, } from "../../knex.config"; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sessionID: string; let sessionData: SessionData; @@ -47,8 +47,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -81,7 +81,7 @@ test("valid recover update ack message from client", async () => { changedEntriesHash: [], }; - recoverUpdateAckMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverUpdateAckMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverUpdateAckMessage)), ); @@ -99,7 +99,7 @@ test("valid recover update ack message from server", async () => { changedEntriesHash: [], }; - recoverUpdateAckMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverUpdateAckMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverUpdateAckMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts index 070154ea22..1f3ad2cc77 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts @@ -2,7 +2,7 @@ import { v4 as uuidv4 } from "uuid"; import "jest-extended"; import { Secp256k1Keys } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; import { RecoverUpdateV1Message, @@ -13,13 +13,13 @@ import { randomInt } from "crypto"; import { checkValidRecoverUpdateMessage, sendRecoverUpdateMessage, -} from "../../../../main/typescript/gateway/recovery/recover-update"; +} from "../../../../main/typescript/recovery/recover-update"; -import { checkValidRecoverMessage } from "../../../../main/typescript/gateway/recovery/recover"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { checkValidRecoverMessage } from "../../../../main/typescript/recovery/recover"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -30,8 +30,8 @@ import { const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sessionID: string; let sessionData: SessionData; @@ -59,8 +59,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -92,7 +92,7 @@ test("valid recover update message from server", async () => { signature: "", }; - recoverUpdateMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverUpdateMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverUpdateMessage)), ); @@ -172,7 +172,7 @@ test("check valid build of recover update message", async () => { newBasePath: "", }; - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts index ea25ec8b7c..ad76becf89 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts @@ -1,16 +1,16 @@ import "jest-extended"; import { Secp256k1Keys } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; -import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; +import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; import { RecoverV1Message } from "../../../../main/typescript/public-api"; import { randomInt } from "crypto"; -import { checkValidRecoverMessage } from "../../../../main/typescript/gateway/recovery/recover"; +import { checkValidRecoverMessage } from "../../../../main/typescript/recovery/recover"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexClientConnection, @@ -18,8 +18,8 @@ import { knexServerConnection, } from "../../knex.config"; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let sessionID: string; let sequenceNumber: number; @@ -49,8 +49,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); const sessionData = { lastSequenceNumber: sequenceNumber, @@ -90,7 +90,7 @@ test("valid recover message request from client", async () => { newBasePath: "", }; - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverMessage)), ); @@ -108,7 +108,7 @@ test("valid recover message request from server", async () => { newBasePath: "", }; - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverMessage)), ); @@ -130,7 +130,7 @@ test("recover message request from client with wrong signature", async () => { newBasePath: "", }; - recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( + recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify("wrongRecoverMessage")), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts index d2eeaf8f7d..68b49e8c2f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts @@ -3,19 +3,19 @@ import { v4 as uuidv4 } from "uuid"; import { SHA256 } from "crypto-js"; import { SatpMessageType, - PluginSatpGateway, + PluginSATPGateway, ILocalLog, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; +} from "../../../../main/typescript/plugin-satp-gateway"; import { CommitFinalV1Request, SessionData, } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; import { knexRemoteConnection } from "../../knex.config"; const MAX_RETRIES = 5; @@ -23,8 +23,8 @@ const MAX_TIMEOUT = 5000; const COMMIT_FINAL_CLAIM = "dummyCommitFinalClaim"; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let dummyCommitPreparationResponseMessageHash: string; let sessionData: SessionData; let sessionID: string; @@ -49,8 +49,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -117,7 +117,7 @@ test("valid commit final request", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -157,7 +157,7 @@ test("commit final request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -188,7 +188,7 @@ test("commit final request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -217,7 +217,7 @@ test("commit final request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts index 7a5fe43217..dfc48380da 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts @@ -1,24 +1,24 @@ import { randomInt } from "crypto"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { CommitPreparationV1Request, SessionData, } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; import { v4 as uuidV4 } from "uuid"; import { SHA256 } from "crypto-js"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let dummyLockEvidenceResponseMessageHash: string; let sessionData: SessionData; let sessionID: string; @@ -40,8 +40,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -90,7 +90,7 @@ test("valid commit prepare request", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -127,7 +127,7 @@ test("commit prepare request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -157,7 +157,7 @@ test("commit prepare request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -187,7 +187,7 @@ test("commit prepare request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts index fc23aeef54..093e73971e 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts @@ -1,8 +1,8 @@ import { randomInt } from "crypto"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { LockEvidenceV1Request, SessionData, @@ -10,10 +10,10 @@ import { import { v4 as uuidV4 } from "uuid"; import { SHA256 } from "crypto-js"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../../knex.config"; const MAX_RETRIES = 5; @@ -21,8 +21,8 @@ const MAX_TIMEOUT = 5000; const LOCK_EVIDENCE_CLAIM = "dummyLockEvidenceClaim"; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let dummyTransferCommenceResponseMessageHash: string; let sessionData: SessionData; let lockExpiryDate: string; @@ -47,8 +47,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -124,7 +124,7 @@ test("valid lock evidence request", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -164,7 +164,7 @@ test("lock evidence request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -196,7 +196,7 @@ test("lock evidence request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -226,7 +226,7 @@ test("lock evidence request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -256,7 +256,7 @@ test("transfer commence flow with invalid claim", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts index d1b4484278..59bbe0e80b 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts @@ -1,8 +1,8 @@ import { randomInt } from "crypto"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { TransferCommenceV1Request, AssetProfile, @@ -10,16 +10,16 @@ import { } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; import { v4 as uuidV4 } from "uuid"; import { SHA256 } from "crypto-js"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let dummyInitializationResponseMessageHash: string; let expiryDate: string; let assetProfile: AssetProfile; @@ -44,8 +44,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -109,7 +109,7 @@ test("valid transfer commence request", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -154,7 +154,7 @@ test("transfer commence request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -189,7 +189,7 @@ test("transfer commence request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -224,7 +224,7 @@ test("transfer commence request with wrong signature", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify("wrongData")), ); @@ -259,7 +259,7 @@ test("transfer commence request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -294,7 +294,7 @@ test("transfer commence request with wrong asset profile hash", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts index aab405e348..dbd97be6d9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts @@ -1,7 +1,7 @@ import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { SessionData, TransferCompleteV1Request, @@ -9,14 +9,14 @@ import { import { v4 as uuidV4 } from "uuid"; import { SHA256 } from "crypto-js"; import { randomInt } from "crypto"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../../knex.config"; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let dummyCommitFinalResponseMessageHash: string; let dummyTransferCommenceResponseMessageHash: string; let sessionData: SessionData; @@ -41,8 +41,8 @@ beforeEach(async () => { knexRemoteConfig: knexRemoteConnection, }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -98,7 +98,7 @@ test("dummy test for transfer complete flow", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCompleteRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + transferCompleteRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCompleteRequestMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts index 9615f80401..c32508dcd9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts @@ -3,23 +3,23 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { SatpMessageType, - PluginSatpGateway, -} from "../../../../main/typescript/gateway/plugin-satp-gateway"; + PluginSATPGateway, +} from "../../../../main/typescript/plugin-satp-gateway"; import { TransferInitializationV1Request, AssetProfile, SessionData, } from "../../../../main/typescript/public-api"; -import { BesuSatpGateway } from "../../../../main/typescript/gateway/besu-satp-gateway"; -import { FabricSatpGateway } from "../../../../main/typescript/gateway/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/gateway/client/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/gateway/server/server-helper"; +import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; +import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; +import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; +import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; -let pluginSourceGateway: PluginSatpGateway; -let pluginRecipientGateway: PluginSatpGateway; +let pluginSourceGateway: PluginSATPGateway; +let pluginRecipientGateway: PluginSATPGateway; let expiryDate: string; let assetProfile: AssetProfile; let sequenceNumber: number; @@ -41,8 +41,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); if ( pluginSourceGateway.localRepository?.database == undefined || @@ -88,7 +88,7 @@ test("valid transfer initiation request", async () => { sourceLedgerAssetID: "", }; - initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + initializationRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationRequestMessage), ), @@ -156,7 +156,7 @@ test("transfer initiation request invalid because of incompatible DLTs", async ( sourceLedgerAssetID: "", }; - initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + initializationRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationRequestMessage), ), @@ -207,7 +207,7 @@ test("transfer initiation request invalid because of asset expired", async () => sourceLedgerAssetID: "", }; - initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( + initializationRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(initializationRequestMessage)), ); diff --git a/packages/cactus-plugin-satp-hermes/tsconfig.json b/packages/cactus-plugin-satp-hermes/tsconfig.json index 9246809a97..430c7cd63a 100644 --- a/packages/cactus-plugin-satp-hermes/tsconfig.json +++ b/packages/cactus-plugin-satp-hermes/tsconfig.json @@ -9,7 +9,7 @@ "skipLibCheck": true, "rootDir": "./src/", "tsBuildInfoFile": "../../.build-cache/cactus-plugin-satp-hermes.tsbuildinfo", - "moduleResolution": "Node16" + "moduleResolution": "Node16", }, "ts-node": { "files": true diff --git a/tsconfig.json b/tsconfig.json index a29748bceb..dd286a11dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -231,6 +231,8 @@ "esModuleInterop": true, "inlineSourceMap": true, "forceConsistentCasingInFileNames": true, - "useUnknownInCatchVariables": false + "useUnknownInCatchVariables": false, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, } } diff --git a/yarn.lock b/yarn.lock index 93697f78b5..df806b6ae1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -816,6 +816,18 @@ __metadata: languageName: node linkType: hard +"@apidevtools/json-schema-ref-parser@npm:^9.1.2": + version: 9.1.2 + resolution: "@apidevtools/json-schema-ref-parser@npm:9.1.2" + dependencies: + "@jsdevtools/ono": "npm:^7.1.3" + "@types/json-schema": "npm:^7.0.6" + call-me-maybe: "npm:^1.0.1" + js-yaml: "npm:^4.1.0" + checksum: 10/7553f994974c5c6f99d14b9f47e9dccaedbcdd1565a099bbf7413494c71e1a246562bd6bfa394b6be026d176c734ff89aed87e2c3a92d01ff4350c64514bfb48 + languageName: node + linkType: hard + "@apollo/protobufjs@npm:1.2.6": version: 1.2.6 resolution: "@apollo/protobufjs@npm:1.2.6" @@ -5717,6 +5729,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf-darwin-arm64@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf-darwin-arm64@npm:1.29.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@bufbuild/buf-darwin-arm64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-darwin-arm64@npm:1.30.0" @@ -5724,6 +5743,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf-darwin-x64@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf-darwin-x64@npm:1.29.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@bufbuild/buf-darwin-x64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-darwin-x64@npm:1.30.0" @@ -5731,6 +5757,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf-linux-aarch64@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf-linux-aarch64@npm:1.29.0" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@bufbuild/buf-linux-aarch64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-linux-aarch64@npm:1.30.0" @@ -5738,6 +5771,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf-linux-x64@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf-linux-x64@npm:1.29.0" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + "@bufbuild/buf-linux-x64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-linux-x64@npm:1.30.0" @@ -5745,6 +5785,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf-win32-arm64@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf-win32-arm64@npm:1.29.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@bufbuild/buf-win32-arm64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-win32-arm64@npm:1.30.0" @@ -5752,6 +5799,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf-win32-x64@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf-win32-x64@npm:1.29.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@bufbuild/buf-win32-x64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-win32-x64@npm:1.30.0" @@ -5759,6 +5813,37 @@ __metadata: languageName: node linkType: hard +"@bufbuild/buf@npm:1.29.0": + version: 1.29.0 + resolution: "@bufbuild/buf@npm:1.29.0" + dependencies: + "@bufbuild/buf-darwin-arm64": "npm:1.29.0" + "@bufbuild/buf-darwin-x64": "npm:1.29.0" + "@bufbuild/buf-linux-aarch64": "npm:1.29.0" + "@bufbuild/buf-linux-x64": "npm:1.29.0" + "@bufbuild/buf-win32-arm64": "npm:1.29.0" + "@bufbuild/buf-win32-x64": "npm:1.29.0" + dependenciesMeta: + "@bufbuild/buf-darwin-arm64": + optional: true + "@bufbuild/buf-darwin-x64": + optional: true + "@bufbuild/buf-linux-aarch64": + optional: true + "@bufbuild/buf-linux-x64": + optional: true + "@bufbuild/buf-win32-arm64": + optional: true + "@bufbuild/buf-win32-x64": + optional: true + bin: + buf: bin/buf + protoc-gen-buf-breaking: bin/protoc-gen-buf-breaking + protoc-gen-buf-lint: bin/protoc-gen-buf-lint + checksum: 10/f966e764b9ef92d514361c6999c1633e57c79143317cf9d6dd3a12750e60e244c4e5d45bcf01fa3993a07d69a14011c95477ac365e889abeb742df51d2696294 + languageName: node + linkType: hard + "@bufbuild/buf@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf@npm:1.30.0" @@ -5790,13 +5875,20 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protobuf@npm:1.10.0": +"@bufbuild/protobuf@npm:1.10.0, @bufbuild/protobuf@npm:^1.6.0": version: 1.10.0 resolution: "@bufbuild/protobuf@npm:1.10.0" checksum: 10/1f120f72bbb40dd3d0f8c73f1474b001cfb9be09c38b7b0292e35fec98c5184a3db380a6feff7626fb3fff108c8a8aa7fc8cfea14904dc0a1174a01c8e637cc6 languageName: node linkType: hard +"@bufbuild/protobuf@npm:1.7.2": + version: 1.7.2 + resolution: "@bufbuild/protobuf@npm:1.7.2" + checksum: 10/f23ccc77066100157043cf36bd2506acdcb235f0a902f7662fbbb992e78df4202780aeb55bd2e3fd1945bd9e52a4fca759351f333f2ff779e32996e13eb56d34 + languageName: node + linkType: hard + "@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": version: 1.8.0 resolution: "@bufbuild/protobuf@npm:1.8.0" @@ -5804,6 +5896,23 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protoc-gen-es@npm:1.7.2": + version: 1.7.2 + resolution: "@bufbuild/protoc-gen-es@npm:1.7.2" + dependencies: + "@bufbuild/protobuf": "npm:^1.7.2" + "@bufbuild/protoplugin": "npm:1.7.2" + peerDependencies: + "@bufbuild/protobuf": 1.7.2 + peerDependenciesMeta: + "@bufbuild/protobuf": + optional: true + bin: + protoc-gen-es: bin/protoc-gen-es + checksum: 10/21898291c7239a61b7aa2fdbde7c2b40161d4e395783081bb9650840381764984075f405cd46e2f189df5b57d602a37796ae804b648338cf82a4ffecbef0de52 + languageName: node + linkType: hard + "@bufbuild/protoc-gen-es@npm:1.8.0": version: 1.8.0 resolution: "@bufbuild/protoc-gen-es@npm:1.8.0" @@ -5821,6 +5930,17 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protoplugin@npm:1.7.2": + version: 1.7.2 + resolution: "@bufbuild/protoplugin@npm:1.7.2" + dependencies: + "@bufbuild/protobuf": "npm:1.7.2" + "@typescript/vfs": "npm:^1.4.0" + typescript: "npm:4.5.2" + checksum: 10/412c35a04a60fed1979b62fedc570c128efa8995290005df8d84bbf84a9b35cc6a9bbea5646210ed7708fb8cd274aea8ba30720ccd25eb62c9133efda55ca733 + languageName: node + linkType: hard + "@bufbuild/protoplugin@npm:1.8.0, @bufbuild/protoplugin@npm:^1.7.2": version: 1.8.0 resolution: "@bufbuild/protoplugin@npm:1.8.0" @@ -5832,6 +5952,17 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protoplugin@npm:^1.6.0": + version: 1.10.0 + resolution: "@bufbuild/protoplugin@npm:1.10.0" + dependencies: + "@bufbuild/protobuf": "npm:1.10.0" + "@typescript/vfs": "npm:^1.4.0" + typescript: "npm:4.5.2" + checksum: 10/829a6d64076a16d7a89e732be39f1988b52b8babee215d91a5f692e0e6ac3e2b58ea4012bd7707c3cef4b6952cfcc36076b646aa09ed68888aedb2fb004d659f + languageName: node + linkType: hard + "@chainsafe/as-sha256@npm:^0.3.1": version: 0.3.1 resolution: "@chainsafe/as-sha256@npm:0.3.1" @@ -6098,6 +6229,19 @@ __metadata: languageName: node linkType: hard +"@connectrpc/connect-express@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/connect-express@npm:1.3.0" + dependencies: + "@types/express": "npm:^4.17.18" + peerDependencies: + "@bufbuild/protobuf": ^1.4.2 + "@connectrpc/connect": 1.3.0 + "@connectrpc/connect-node": 1.3.0 + checksum: 10/581495391477e2b8a2738bdc34dbf45a245d26cb4943a5b3d1813d80ae4f11d85e0d0f01d95e408e7b1cb7812a873218428d6b0cde9fc643747f06e8b7205627 + languageName: node + linkType: hard + "@connectrpc/connect-express@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect-express@npm:1.4.0" @@ -6123,6 +6267,18 @@ __metadata: languageName: node linkType: hard +"@connectrpc/connect-node@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/connect-node@npm:1.3.0" + dependencies: + undici: "npm:^5.28.2" + peerDependencies: + "@bufbuild/protobuf": ^1.4.2 + "@connectrpc/connect": 1.3.0 + checksum: 10/34b4903220881b39128bc31c79a0a006cb44c7cb9074fd0d77e853ff016f51c2a131811421c971c01210d4329068026c278cf64d349f2eb38126d0604710816a + languageName: node + linkType: hard + "@connectrpc/connect-node@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect-node@npm:1.4.0" @@ -6145,6 +6301,15 @@ __metadata: languageName: node linkType: hard +"@connectrpc/connect@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/connect@npm:1.3.0" + peerDependencies: + "@bufbuild/protobuf": ^1.4.2 + checksum: 10/7707d97ee6e4a83cc03371b1da1709c103f0338e85b2fbf49813053d96114818d34831b1c11715cc9badcc3ce5d4c9fbc423af4b6a8efa953bf0ef76cdc6e50d + languageName: node + linkType: hard + "@connectrpc/connect@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect@npm:1.4.0" @@ -6154,6 +6319,26 @@ __metadata: languageName: node linkType: hard +"@connectrpc/protoc-gen-connect-es@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/protoc-gen-connect-es@npm:1.3.0" + dependencies: + "@bufbuild/protobuf": "npm:^1.6.0" + "@bufbuild/protoplugin": "npm:^1.6.0" + peerDependencies: + "@bufbuild/protoc-gen-es": ^1.6.0 + "@connectrpc/connect": 1.3.0 + peerDependenciesMeta: + "@bufbuild/protoc-gen-es": + optional: true + "@connectrpc/connect": + optional: true + bin: + protoc-gen-connect-es: bin/protoc-gen-connect-es + checksum: 10/23a17bef378ac2fa414fb35fe50a7630134946a086f75f9201c5d0c3631f32e61445628b0420eac7353e88193e170059969bc83bad96a9f43cb98db30243aa1c + languageName: node + linkType: hard + "@connectrpc/protoc-gen-connect-es@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/protoc-gen-connect-es@npm:1.4.0" @@ -8831,6 +9016,16 @@ __metadata: languageName: node linkType: hard +"@grpc/grpc-js@npm:1.10.9": + version: 1.10.9 + resolution: "@grpc/grpc-js@npm:1.10.9" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/8991a997798f19ae849d0f274280f5fdba981048f77211744a301e22207620bb24661d0dfaea51ee6259c5c8e6c159b62fe2499c879d9f14decf20957c219124 + languageName: node + linkType: hard + "@grpc/grpc-js@npm:1.11.3": version: 1.11.3 resolution: "@grpc/grpc-js@npm:1.11.3" @@ -8885,6 +9080,21 @@ __metadata: languageName: node linkType: hard +"@grpc/proto-loader@npm:0.7.8": + version: 0.7.8 + resolution: "@grpc/proto-loader@npm:0.7.8" + dependencies: + "@types/long": "npm:^4.0.1" + lodash.camelcase: "npm:^4.3.0" + long: "npm:^4.0.0" + protobufjs: "npm:^7.2.4" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/a7dde023f8209e7a97eecad5f627c31b796c663e0bf4a3bc81b848a8bdf0c2ba5de712189e4b6f759a2a766599b2a0ea197cdd4a45ab9d091329ca9ffb053bb8 + languageName: node + linkType: hard + "@grpc/proto-loader@npm:^0.7.0": version: 0.7.7 resolution: "@grpc/proto-loader@npm:0.7.7" @@ -10729,10 +10939,14 @@ __metadata: "@types/crypto-js": "npm:4.0.1" "@types/express": "npm:5.0.0" "@types/fs-extra": "npm:11.0.4" + "@types/node": "npm:18.18.2" + "@types/swagger-ui-express": "npm:4.1.6" "@types/tape": "npm:4.13.4" "@types/uuid": "npm:10.0.0" axios: "npm:1.7.7" body-parser: "npm:1.20.3" + class-transformer: "npm:0.5.1" + class-validator: "npm:0.14.1" crypto-js: "npm:4.2.0" express: "npm:4.21.0" fabric-network: "npm:2.2.20" @@ -10742,6 +10956,7 @@ __metadata: secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" + swagger-ui-express: "npm:5.0.0" typescript: "npm:5.5.2" typescript-optional: "npm:2.0.1" uuid: "npm:10.0.0" @@ -17207,7 +17422,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.15": +"@types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.6": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 @@ -17430,6 +17645,15 @@ __metadata: languageName: node linkType: hard +"@types/multer@npm:^1.4.7": + version: 1.4.12 + resolution: "@types/multer@npm:1.4.12" + dependencies: + "@types/express": "npm:*" + checksum: 10/3d2b32da58ddd67f972d4ef1021492f78d65f33f936b6fb25dd461bb6cc7b03bfd1de1a11562c4310680dac8054e4398038db51767a0ffbf1fe62457b3706e95 + languageName: node + linkType: hard + "@types/node-fetch@npm:2.6.2": version: 2.6.2 resolution: "@types/node-fetch@npm:2.6.2" @@ -18034,6 +18258,16 @@ __metadata: languageName: node linkType: hard +"@types/swagger-ui-express@npm:4.1.6": + version: 4.1.6 + resolution: "@types/swagger-ui-express@npm:4.1.6" + dependencies: + "@types/express": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/c1c4b58b12f9261af70b6a7e6420649b4f0a0343071ae8b98483c5885cd596f4c25015991f91f3f7c7a0baa461e2d76029d64de79108a89d03f3f83abbe6bc58 + languageName: node + linkType: hard + "@types/tape-promise@npm:4.0.1": version: 4.0.1 resolution: "@types/tape-promise@npm:4.0.1" @@ -18128,6 +18362,13 @@ __metadata: languageName: node linkType: hard +"@types/validator@npm:^13.11.8": + version: 13.12.2 + resolution: "@types/validator@npm:13.12.2" + checksum: 10/564f60cfe112b45e1d747245d1f80db999bbc372b2b6a1c5454441b02c3d6bffbfff4365a10c3cd7874197f14ca5779b435794c7600bdcb541da948405a3b21a + languageName: node + linkType: hard + "@types/validator@npm:^13.7.10": version: 13.11.7 resolution: "@types/validator@npm:13.11.7" @@ -19508,7 +19749,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.14.0": +"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.11.2, ajv@npm:^8.14.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -21483,9 +21724,9 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" +"body-parser@npm:1.20.2, body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21495,17 +21736,17 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.13.0" + qs: "npm:6.11.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca + checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a languageName: node linkType: hard -"body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21515,11 +21756,11 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.11.0" + qs: "npm:6.13.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a + checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca languageName: node linkType: hard @@ -22360,6 +22601,13 @@ __metadata: languageName: node linkType: hard +"call-me-maybe@npm:^1.0.1": + version: 1.0.2 + resolution: "call-me-maybe@npm:1.0.2" + checksum: 10/3d375b6f810a82c751157b199daba60452876186c19ac653e81bfc5fc10d1e2ba7aedb8622367c3a8aca6879f0e6a29435a1193b35edb8f7fd8267a67ea32373 + languageName: node + linkType: hard + "caller-callsite@npm:^4.1.0": version: 4.1.0 resolution: "caller-callsite@npm:4.1.0" @@ -22982,6 +23230,17 @@ __metadata: languageName: node linkType: hard +"class-validator@npm:0.14.1": + version: 0.14.1 + resolution: "class-validator@npm:0.14.1" + dependencies: + "@types/validator": "npm:^13.11.8" + libphonenumber-js: "npm:^1.10.53" + validator: "npm:^13.9.0" + checksum: 10/0c34592a1cbdd5e9c35cd02f4babd94120339e875fc7627aa2bf5dffb45ecc373275e854389c6ff3d39781cddb85a18193b4e9e8f4d77d6d90e445fd0b8b8e11 + languageName: node + linkType: hard + "classic-level@npm:^1.2.0": version: 1.3.0 resolution: "classic-level@npm:1.3.0" @@ -29169,6 +29428,28 @@ __metadata: languageName: node linkType: hard +"express-openapi-validator@npm:5.0.4": + version: 5.0.4 + resolution: "express-openapi-validator@npm:5.0.4" + dependencies: + "@apidevtools/json-schema-ref-parser": "npm:^9.1.2" + "@types/multer": "npm:^1.4.7" + ajv: "npm:^8.11.2" + ajv-draft-04: "npm:^1.0.0" + ajv-formats: "npm:^2.1.1" + content-type: "npm:^1.0.5" + lodash.clonedeep: "npm:^4.5.0" + lodash.get: "npm:^4.4.2" + lodash.uniq: "npm:^4.5.0" + lodash.zipobject: "npm:^4.1.3" + media-typer: "npm:^1.1.0" + multer: "npm:^1.4.5-lts.1" + ono: "npm:^7.1.3" + path-to-regexp: "npm:^6.2.0" + checksum: 10/793f3bcd369f4f67a228c4965834cd649e891ca1aae7b13795d6569399d02c6638df96428d4c320e3d61146e78627a6b012b1461bdb9a69ea1c1b0ce4a1401dc + languageName: node + linkType: hard + "express-openapi-validator@npm:5.2.0": version: 5.2.0 resolution: "express-openapi-validator@npm:5.2.0" @@ -29229,6 +29510,45 @@ __metadata: languageName: node linkType: hard +"express@npm:4.19.2": + version: 4.19.2 + resolution: "express@npm:4.19.2" + dependencies: + accepts: "npm:~1.3.8" + array-flatten: "npm:1.1.1" + body-parser: "npm:1.20.2" + content-disposition: "npm:0.5.4" + content-type: "npm:~1.0.4" + cookie: "npm:0.6.0" + cookie-signature: "npm:1.0.6" + debug: "npm:2.6.9" + depd: "npm:2.0.0" + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + finalhandler: "npm:1.2.0" + fresh: "npm:0.5.2" + http-errors: "npm:2.0.0" + merge-descriptors: "npm:1.0.1" + methods: "npm:~1.1.2" + on-finished: "npm:2.4.1" + parseurl: "npm:~1.3.3" + path-to-regexp: "npm:0.1.7" + proxy-addr: "npm:~2.0.7" + qs: "npm:6.11.0" + range-parser: "npm:~1.2.1" + safe-buffer: "npm:5.2.1" + send: "npm:0.18.0" + serve-static: "npm:1.15.0" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + type-is: "npm:~1.6.18" + utils-merge: "npm:1.0.1" + vary: "npm:~1.1.2" + checksum: 10/3fcd792536f802c059789ef48db3851b87e78fba103423e524144d79af37da7952a2b8d4e1a007f423329c7377d686d9476ac42e7d9ea413b80345d495e30a3a + languageName: node + linkType: hard + "express@npm:4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" @@ -29732,6 +30052,30 @@ __metadata: languageName: node linkType: hard +"fastify@npm:4.26.2": + version: 4.26.2 + resolution: "fastify@npm:4.26.2" + dependencies: + "@fastify/ajv-compiler": "npm:^3.5.0" + "@fastify/error": "npm:^3.4.0" + "@fastify/fast-json-stringify-compiler": "npm:^4.3.0" + abstract-logging: "npm:^2.0.1" + avvio: "npm:^8.3.0" + fast-content-type-parse: "npm:^1.1.0" + fast-json-stringify: "npm:^5.8.0" + find-my-way: "npm:^8.0.0" + light-my-request: "npm:^5.11.0" + pino: "npm:^8.17.0" + process-warning: "npm:^3.0.0" + proxy-addr: "npm:^2.0.7" + rfdc: "npm:^1.3.0" + secure-json-parse: "npm:^2.7.0" + semver: "npm:^7.5.4" + toad-cache: "npm:^3.3.0" + checksum: 10/24ee6b1496bf0c3b6b266edef6654c547ea54ffe3a17a98afd0f2a8e7a69e0fea2b58eaebb81388fa36d20032e239e656fbfdfac539b4758483a438250f791ff + languageName: node + linkType: hard + "fastify@npm:4.28.1": version: 4.28.1 resolution: "fastify@npm:4.28.1" @@ -31770,6 +32114,20 @@ __metadata: languageName: node linkType: hard +"google-protobuf@npm:3.18.0-rc.2": + version: 3.18.0-rc.2 + resolution: "google-protobuf@npm:3.18.0-rc.2" + checksum: 10/71cc1d20fd52bba970a3485165f78cb453725ef5f4c1146e9a8c23d2850072867ad29e58ebf25da3f2a990f129f7b5d23f4aeea0476e827c4bf61d1cecc922cc + languageName: node + linkType: hard + +"google-protobuf@npm:3.21.2": + version: 3.21.2 + resolution: "google-protobuf@npm:3.21.2" + checksum: 10/b376c2e47fb0419b41b901e4da8f3827fe9594ffb7887708b9c241f36005d0b9f2edc7b3f05795f6793924a241e767f67831732eae0f23bdbb337b56a6ab4e26 + languageName: node + linkType: hard + "google-protobuf@npm:3.21.4": version: 3.21.4 resolution: "google-protobuf@npm:3.21.4" @@ -37670,6 +38028,13 @@ __metadata: languageName: node linkType: hard +"libphonenumber-js@npm:^1.10.53": + version: 1.11.11 + resolution: "libphonenumber-js@npm:1.11.11" + checksum: 10/c39de6d5922fef7ccdf09a11eb1da5b7d372afb20f6c5a3659e855ddd1ddc07bcc1162dfa021ba4d37fc971a087a6bde00fe9bfc904c2cd42d809d2d5a0d74ae + languageName: node + linkType: hard + "libtap@npm:^1.4.0": version: 1.4.1 resolution: "libtap@npm:1.4.1" @@ -38177,6 +38542,13 @@ __metadata: languageName: node linkType: hard +"lodash.zipobject@npm:^4.1.3": + version: 4.1.3 + resolution: "lodash.zipobject@npm:4.1.3" + checksum: 10/1ab635b665c0488a905779705a6683e9024115176e9e947d75d2a6b1e8673230fdb11c417788fbaf26d71e1cac5ad8e59a558924612cbf7d6615780836048883 + languageName: node + linkType: hard + "lodash@npm:>=4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -42950,6 +43322,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:^6.2.0": + version: 6.3.0 + resolution: "path-to-regexp@npm:6.3.0" + checksum: 10/6822f686f01556d99538b350722ef761541ec0ce95ca40ce4c29e20a5b492fe8361961f57993c71b2418de12e604478dcf7c430de34b2c31a688363a7a944d9c + languageName: node + linkType: hard + "path-to-regexp@npm:^6.2.2": version: 6.2.2 resolution: "path-to-regexp@npm:6.2.2" @@ -43204,6 +43583,13 @@ __metadata: languageName: node linkType: hard +"pino-std-serializers@npm:^6.0.0": + version: 6.2.2 + resolution: "pino-std-serializers@npm:6.2.2" + checksum: 10/a00cdff4e1fbc206da9bed047e6dc400b065f43e8b4cef1635b0192feab0e8f932cdeb0faaa38a5d93d2e777ba4cda939c2ed4c1a70f6839ff25f9aef97c27ff + languageName: node + linkType: hard + "pino-std-serializers@npm:^7.0.0": version: 7.0.0 resolution: "pino-std-serializers@npm:7.0.0" @@ -43211,6 +43597,27 @@ __metadata: languageName: node linkType: hard +"pino@npm:^8.17.0": + version: 8.21.0 + resolution: "pino@npm:8.21.0" + dependencies: + atomic-sleep: "npm:^1.0.0" + fast-redact: "npm:^3.1.1" + on-exit-leak-free: "npm:^2.1.0" + pino-abstract-transport: "npm:^1.2.0" + pino-std-serializers: "npm:^6.0.0" + process-warning: "npm:^3.0.0" + quick-format-unescaped: "npm:^4.0.3" + real-require: "npm:^0.2.0" + safe-stable-stringify: "npm:^2.3.1" + sonic-boom: "npm:^3.7.0" + thread-stream: "npm:^2.6.0" + bin: + pino: bin.js + checksum: 10/5a054eab533ab91b20f63497b86070f0a6b40e4688cde9de66d23e03d6046c4e95d69c3f526dea9f30bcbc5874c7fbf0f91660cded4753946fd02261ca8ac340 + languageName: node + linkType: hard + "pino@npm:^9.0.0": version: 9.4.0 resolution: "pino@npm:9.4.0" @@ -44878,6 +45285,15 @@ __metadata: languageName: node linkType: hard +"prom-client@npm:13.2.0": + version: 13.2.0 + resolution: "prom-client@npm:13.2.0" + dependencies: + tdigest: "npm:^0.1.1" + checksum: 10/46df22a933f35dc60480ef7139c2ea0f315a7f4b3018e9ac045572999a1c2ee92978ef0bfb124c111159718d98d8093de59b81bb3f6fd499f3d0ce576a987703 + languageName: node + linkType: hard + "prom-client@npm:15.1.3": version: 15.1.3 resolution: "prom-client@npm:15.1.3" @@ -48765,6 +49181,15 @@ __metadata: languageName: node linkType: hard +"sonic-boom@npm:^3.7.0": + version: 3.8.1 + resolution: "sonic-boom@npm:3.8.1" + dependencies: + atomic-sleep: "npm:^1.0.0" + checksum: 10/e03c9611e43fa81132cd2ce0fe4eb7fbcf19db267e9dec20dc6c586f82465c9c906e91a02f72150c740463ad9335536ea2131850307aaa6686d1fb5d4cc4be3e + languageName: node + linkType: hard + "sonic-boom@npm:^4.0.1": version: 4.1.0 resolution: "sonic-boom@npm:4.1.0" @@ -50258,6 +50683,24 @@ __metadata: languageName: node linkType: hard +"swagger-ui-dist@npm:>=5.0.0": + version: 5.17.14 + resolution: "swagger-ui-dist@npm:5.17.14" + checksum: 10/b9e62d7ecb64e837849252c9f82af654b26cae60ebd551cff96495d826166d3ed866ebae40f22a2c61d307330151945d79d995e50659ae17eea6cf4ece788f9d + languageName: node + linkType: hard + +"swagger-ui-express@npm:5.0.0": + version: 5.0.0 + resolution: "swagger-ui-express@npm:5.0.0" + dependencies: + swagger-ui-dist: "npm:>=5.0.0" + peerDependencies: + express: ">=4.0.0 || >=5.0.0-beta" + checksum: 10/e970d99cb33b8db235feb23d24b79d680cfbb8f9e920863990df5549ae56a35b12dfa761bbdde22cd8cbec2823b7d1078710b4a1970c9441b541917b56d197cc + languageName: node + linkType: hard + "swap-case@npm:^1.1.0": version: 1.1.2 resolution: "swap-case@npm:1.1.2" @@ -50943,6 +51386,15 @@ __metadata: languageName: node linkType: hard +"thread-stream@npm:^2.6.0": + version: 2.7.0 + resolution: "thread-stream@npm:2.7.0" + dependencies: + real-require: "npm:^0.2.0" + checksum: 10/03e743a2ccb2af5fa695d2e4369113336ee9b9f09c4453d50a222cbb4ae3af321bff658e0e5bf8bfbce9d7f5a7bf6262d12a2a365e160f4e76380ec624d32e7b + languageName: node + linkType: hard + "thread-stream@npm:^3.0.0": version: 3.1.0 resolution: "thread-stream@npm:3.1.0" @@ -52293,7 +52745,7 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.28.3": +"undici@npm:^5.28.2, undici@npm:^5.28.3": version: 5.28.4 resolution: "undici@npm:5.28.4" dependencies: @@ -52871,6 +53323,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:9.0.1, uuid@npm:^9.0.0, uuid@npm:^9.0.1": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 + languageName: node + linkType: hard + "uuid@npm:^3.3.2, uuid@npm:^3.3.3": version: 3.4.0 resolution: "uuid@npm:3.4.0" @@ -52880,15 +53341,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0, uuid@npm:^9.0.1": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 - languageName: node - linkType: hard - "v8-compile-cache-lib@npm:^3.0.0": version: 3.0.0 resolution: "v8-compile-cache-lib@npm:3.0.0" @@ -52958,6 +53410,13 @@ __metadata: languageName: node linkType: hard +"validator@npm:^13.9.0": + version: 13.12.0 + resolution: "validator@npm:13.12.0" + checksum: 10/db6eb0725e2b67d60d30073ae8573982713b5903195d031dc3c7db7e82df8b74e8c13baef8e2106d146d979599fd61a06cde1fec5c148e4abd53d52817ff0fd9 + languageName: node + linkType: hard + "value-or-promise@npm:1.0.11": version: 1.0.11 resolution: "value-or-promise@npm:1.0.11" From 364393207dd9b008f34789116518e3f6462e2ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Augusto?= Date: Mon, 4 Mar 2024 18:37:03 +0000 Subject: [PATCH 02/49] fix(satp-hermes): fix build bugs and hanging tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Augusto Co-authored-by: Peter Somogyvari Co-authored-by: Rafael Belchior Signed-off-by: Rafael Belchior test(satp-hermes): fix hanging tests Signed-off-by: Rafael Belchior refactor(SATP-Hermes): fix cspell and lint Signed-off-by: André Augusto --- .../cactus-plugin-satp-hermes/package.json | 4 +- .../{ => src}/knex/knexfile-remote.ts | 2 +- .../{ => src}/knex/knexfile.ts | 0 .../20220331132128_create_logs_table.js | 0 ...20240130234303_create_remote_logs_table.js | 0 .../src/main/typescript/core/constants.ts | 3 + .../typescript/core/stage-services/stage3.ts | 1 - .../core/stage-services/test-services.ts | 7 +- .../src/main/typescript/core/types.ts | 19 +- .../plugin-factory-gateway-orchestrator.ts | 9 +- .../src/main/typescript/gateway-refactor.ts | 372 ++++++++++++------ .../typescript/gol/gateway-orchestrator.ts | 29 +- .../src/main/typescript/public-api.ts | 1 - .../repository/knex-local-log-repository.ts | 2 +- .../repository/knex-remote-log-repository.ts | 2 +- .../main/typescript/web-services/router.ts | 12 +- .../main/typescript/web-services/test/test.ts | 30 +- .../typescript/web-services/test/test2.ts | 8 +- .../src/test/cucumber/placeholder | 1 + .../backup-gateway-after-client-crash.test.ts | 67 ++-- .../client-crash-after-delete-asset.test.ts | 67 ++-- .../client-crash-after-lock-asset.test.ts | 66 ++-- ...nt-crash-after-transfer-initiation.test.ts | 27 +- .../gateway-coordinator-init.test.ts | 102 ++++- ...dap-api-call-with-ledger-connector.test.ts | 64 ++- .../integration/odap-api-call.test.ts | 27 +- .../integration/odap-rollback.test.ts | 69 ++-- .../test/typescript/integration/odap.test.ts | 28 +- .../server-crash-after-create-asset.test.ts | 66 ++-- ...er-crash-after-transfer-initiation.test.ts | 39 +- .../src/test/typescript/knex.config.ts | 14 +- .../unit/client/commit-final.test.ts | 24 +- .../unit/client/commit-preparation.test.ts | 14 +- .../unit/client/lock-evidence.test.ts | 14 +- .../unit/client/transfer-commence.test.ts | 14 +- .../client/transfer-initialization.test.ts | 14 +- .../typescript/unit/recovery/logging.test.ts | 16 +- .../unit/recovery/recover-success.test.ts | 9 + .../unit/recovery/recover-update-ack.test.ts | 14 +- .../unit/recovery/recover-update.test.ts | 15 +- .../typescript/unit/recovery/recover.test.ts | 14 +- .../unit/server/commit-final.test.ts | 24 +- .../unit/server/commit-preparation.test.ts | 14 +- .../unit/server/lock-evidence.test.ts | 31 +- .../unit/server/transfer-commence.test.ts | 14 +- .../unit/server/transfer-complete.test.ts | 14 +- .../server/transfer-initialization.test.ts | 14 +- 47 files changed, 778 insertions(+), 619 deletions(-) rename packages/cactus-plugin-satp-hermes/{ => src}/knex/knexfile-remote.ts (76%) rename packages/cactus-plugin-satp-hermes/{ => src}/knex/knexfile.ts (100%) rename packages/cactus-plugin-satp-hermes/{ => src}/knex/migrations/20220331132128_create_logs_table.js (100%) rename packages/cactus-plugin-satp-hermes/{ => src}/knex/migrations/20240130234303_create_remote_logs_table.js (100%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/cucumber/placeholder diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index a155fa6dbb..d118e29079 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -42,8 +42,8 @@ "scripts": { "build": "run-p tsc codegen", "build-proto": "buf build --path src/main/proto --verbose", - "build:dev:backend:postbuild": "mkdir -p ./dist/lib/main/knex && cp -r ./knex/* ./dist/lib/main/knex", - "codegen": "yarn run --top-level run-s 'codegen:*'", + "build:dev:backend:postbuild": "mkdir -p ./dist/lib/knex && cp -r ./src/knex/* ./dist/lib/knex", + "codegen": "run-p 'codegen:*'", "codegen:openapi": "npm run generate-sdk", "codegen:proto": "npm run generate-proto", "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", diff --git a/packages/cactus-plugin-satp-hermes/knex/knexfile-remote.ts b/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts similarity index 76% rename from packages/cactus-plugin-satp-hermes/knex/knexfile-remote.ts rename to packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts index 7966df074d..6b36836510 100644 --- a/packages/cactus-plugin-satp-hermes/knex/knexfile-remote.ts +++ b/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts @@ -5,7 +5,7 @@ module.exports = { development: { client: "sqlite3", connection: { - filename: path.resolve(__dirname, ".dev-remote.sqlite3"), + filename: path.resolve(__dirname, ".dev.remote-" + uuidv4() + ".sqlite3"), }, migrations: { directory: path.resolve(__dirname, "migrations"), diff --git a/packages/cactus-plugin-satp-hermes/knex/knexfile.ts b/packages/cactus-plugin-satp-hermes/src/knex/knexfile.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/knex/knexfile.ts rename to packages/cactus-plugin-satp-hermes/src/knex/knexfile.ts diff --git a/packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.js similarity index 100% rename from packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js rename to packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.js diff --git a/packages/cactus-plugin-satp-hermes/knex/migrations/20240130234303_create_remote_logs_table.js b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.js similarity index 100% rename from packages/cactus-plugin-satp-hermes/knex/migrations/20240130234303_create_remote_logs_table.js rename to packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.js diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts new file mode 100644 index 0000000000..4c2a8ac472 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -0,0 +1,3 @@ +export const DEFAULT_PORT_GATEWAY_SERVER = 3010; +export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; +export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts index 991aa1a51e..e69de29bb2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts index 4be9bb5653..0cb18dc834 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts @@ -1,5 +1,5 @@ import { ConnectRouter } from "@connectrpc/connect"; -import { Message } from "../../generated/proto/test/message_pb"; +// import { Message } from "../../generated/proto/test/message_pb"; import { TestService } from "../../generated/proto/test/message_connect"; export const testRouter = (router: ConnectRouter) => @@ -8,8 +8,7 @@ export const testRouter = (router: ConnectRouter) => // implements rpc Say async sendMessage(req) { return { - sentence: `You said: ${req}` - } + sentence: `You said: ${req}`, + }; }, }); - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 956150b24d..e534679f3d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,12 +1,4 @@ -import { - Secp256k1Keys, - Logger, - Checks, - LoggerProvider, - JsObjectSigner, - IJsObjectSignerOptions, - LogLevelDesc, -} from "@hyperledger/cactus-common"; +import { Secp256k1Keys, LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; export enum CurrentDrafts { @@ -18,7 +10,11 @@ export enum CurrentDrafts { export type DraftVersions = { [K in CurrentDrafts]: string; }; -export type ShutdownHook = () => Promise; + +export type ShutdownHook = { + name: string; + hook: () => Promise; +}; export enum SupportedGatewayImplementations { FABRIC = "FabricSATPGateway", @@ -35,7 +31,8 @@ export type GatewayIdentity = { version: DraftVersions[]; supportedChains: SupportedGatewayImplementations[]; proofID?: string; - port?: number; + gatewayServerPort?: number; + gatewayClientPort?: number; address?: | `http://${string}` | `https://${string}` diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts index e4b53d98e9..cfbc9c20c5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts @@ -2,10 +2,7 @@ import { IPluginFactoryOptions, PluginFactory, } from "@hyperledger/cactus-core-api"; -import { - SATPGateway, - SATPGatewayConfig, -} from "../gateway-refactor"; +import { SATPGateway, SATPGatewayConfig } from "../gateway-refactor"; import { validateOrReject } from "class-validator"; export class PluginFactorySATPGateway extends PluginFactory< @@ -13,9 +10,7 @@ export class PluginFactorySATPGateway extends PluginFactory< SATPGatewayConfig, IPluginFactoryOptions > { - async create( - pluginOptions: SATPGatewayConfig, - ): Promise { + async create(pluginOptions: SATPGatewayConfig): Promise { const coordinator = new SATPGateway(pluginOptions); try { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts index 2b3385119f..3f23bbfbb4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -3,56 +3,33 @@ import { Logger, Checks, LoggerProvider, - JsObjectSigner, - IJsObjectSignerOptions, ILoggerOptions, } from "@hyperledger/cactus-common"; import { v4 as uuidv4 } from "uuid"; import { - ICactusPlugin, - IPluginWebService, - IWebServiceEndpoint, - Configuration, -} from "@hyperledger/cactus-core-api"; - -import { - MinLength, - MaxLength, - IsNotEmpty, - ValidateNested, IsDefined, IsNotEmptyObject, IsObject, IsString, Contains, } from "class-validator"; -import { Type } from "class-transformer"; -import fs from "fs"; import path from "path"; -import swaggerUi = require("swagger-ui-express"); -import { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, -} from "./plugin-satp-gateway"; -import { Server } from "node:http"; + import { - CurrentDrafts, - DraftVersions, SATPGatewayConfig, GatewayIdentity, ShutdownHook, SupportedGatewayImplementations, } from "./core/types"; -import { pass } from "jest-extended"; import { GatewayOrchestrator } from "./gol/gateway-orchestrator"; -import { log } from "console"; export { SATPGatewayConfig }; -import express, { Express, Request, Response } from 'express'; +import express, { Express } from 'express'; import { expressConnectMiddleware } from "@connectrpc/connect-express"; import http from "http"; import { configureRoutes } from "./web-services/router"; +import { DEFAULT_PORT_GATEWAY_CLIENT, DEFAULT_PORT_GATEWAY_SERVER } from "./core/constants"; export class SATPGateway { // todo more checks; example port from config is between 3000 and 9000 @@ -71,12 +48,17 @@ export class SATPGateway { @Contains("Gateway") public readonly label = "SATPGateway"; - private gatewayConnectionManager: GatewayOrchestrator; private readonly shutdownHooks: ShutdownHook[]; - private server: any | undefined; + private gatewayConnectionManager: GatewayOrchestrator; + + private gatewayApplication?: Express; + private gatewayServer?: http.Server; + private BOLApplication?: Express; + private BOLServer?: http.Server; + // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) // private sessions: Map = new Map(); - + constructor(public readonly options: SATPGatewayConfig) { const fnTag = `${this.label}#constructor()`; Checks.truthy(options, `${fnTag} arg options`); @@ -103,38 +85,173 @@ export class SATPGateway { }); } - async startupServer(): Promise { + // todo load docs for gateway coordinator and expose them in a http gatewayApplication + setupOpenAPI(): void { + const fnTag = `${this.label}#setupOpenAPI()`; + this.logger.trace(`Entering ${fnTag}`); + + this.logger.error("OpenAPI setup not implemented"); + return; + const specPath = path.join(__dirname, "../../", "/json", "openapi.json"); + this.logger.debug(`Loading OpenAPI specification from ${specPath}`); + + /*const OpenAPISpec = JSON.parse(fs.readFileSync(specPath).toString()); + this.logger.info( + `OpenAPI docs and documentation set up at 📖: \n ${this.config.gid?.address}:${this.config.gid?.gatewayServerPort}/api-docs`, + ); + */ + // todo bind to grpc gateway + // this._app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(OpenAPISpec)); + } + + + static ProcessGatewayCoordinatorConfig( + pluginOptions: SATPGatewayConfig, + ): SATPGatewayConfig { + if (!pluginOptions.keys) { + pluginOptions.keys = Secp256k1Keys.generateKeyPairsBuffer(); + } + + const id = uuidv4(); + if (!pluginOptions.gid) { + pluginOptions.gid = { + id: id, + name: id, + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, + gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, + address: "http://localhost", + }; + } else { + if (!pluginOptions.gid.id) { + pluginOptions.gid.id = id; + } + + if (!pluginOptions.gid.name) { + pluginOptions.gid.name = id; + } + + if (!pluginOptions.gid.version) { + pluginOptions.gid.version = [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ]; + } + + if (!pluginOptions.gid.supportedChains) { + pluginOptions.gid.supportedChains = [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]; + } + + if (!pluginOptions.gid.proofID) { + pluginOptions.gid.proofID = "mockProofID1"; + } + + if (!pluginOptions.gid.gatewayServerPort) { + pluginOptions.gid.gatewayServerPort = DEFAULT_PORT_GATEWAY_SERVER; + } + + if (!pluginOptions.gid.gatewayClientPort) { + pluginOptions.gid.gatewayClientPort = DEFAULT_PORT_GATEWAY_CLIENT; + } + + + if (!pluginOptions.logLevel) { + pluginOptions.logLevel = "DEBUG"; + } + + if (!pluginOptions.environment) { + pluginOptions.environment = "development"; + } + + if (!pluginOptions.enableOpenAPI) { + pluginOptions.enableOpenAPI = true; + } + + if (!pluginOptions.validationOptions) { + // do nothing + } + } + return pluginOptions; + } + + /** + * Startup Methods + * ---------------- + * This section includes methods responsible for starting up the server and its associated services. + * It ensures that both the GatewayServer and BOLServer are initiated concurrently for efficient launch. + */ + async startup(): Promise { const fnTag = `${this.label}#startup()`; - this.logger.debug(`Entering ${fnTag}`); - if (!this.server) { - this.server = express(); - this.server.use(expressConnectMiddleware({ routes: configureRoutes })); - http.createServer(this.server).listen(this.options.gid?.port); + this.logger.trace(`Entering ${fnTag}`); + + await Promise.all([ + this.startupGatewayServer(), + this.startupBOLServer(), + ]); - } else { + this.logger.info("Both GatewayServer and BOLServer have started"); + } + + async startupGatewayServer(): Promise { + const fnTag = `${this.label}#startupGatewayServer()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.info("Starting gateway server"); + const port = this.options.gid?.gatewayServerPort ?? DEFAULT_PORT_GATEWAY_SERVER; + + if (!this.gatewayApplication || !this.gatewayServer) { + this.gatewayApplication = express(); + this.gatewayApplication.use(expressConnectMiddleware({ routes: configureRoutes })); + this.gatewayServer = http.createServer(this.gatewayApplication).listen(port); + } else { this.logger.warn("Server already running"); } } -async shutdownServer(): Promise { - const fnTag = `${this.label}#shutdown()`; - this.logger.debug(`Entering ${fnTag}`); - if (this.server) { - try { - this.server.close(); - this.server = undefined; - this.logger.info("Server shut down"); - } catch (error) { - this.logger.error(`Error shutting down the server: ${error}`); + + + async startupBOLServer(): Promise { + const fnTag = `${this.label}#startupBOLServer()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.info("Starting BOL server"); + const port = (this.options.gid?.gatewayClientPort ?? DEFAULT_PORT_GATEWAY_CLIENT); + + if (!this.BOLApplication || !this.BOLServer) { + this.BOLApplication = express(); + // todo + // this.BOLApplication.use(expressConnectMiddleware()); + this.BOLServer = http.createServer(this.BOLApplication).listen(port); + } else { + this.logger.warn("Server already running"); } - } else { - this.logger.warn("Server is not running."); } -} + /** + * Gateway Connection Methods + * -------------------------- + * This section encompasses methods dedicated to establishing connections with gateways. + * It includes functionalities to add gateways based on provided IDs and resolve specific gateway identities. + * These operations are fundamental for setting up and managing gateway connections within the system. + */ - async addGateways(IDs: string[]): Promise { - const fnTag = `${this.label}#connectToGateway()`; - this.logger.debug(`Entering ${fnTag}`); + public async addGateways(IDs: string[]): Promise { + const fnTag = `${this.label}#addGateways()`; + this.logger.trace(`Entering ${fnTag}`); this.logger.info("Connecting to gateway"); const gatewaysToAdd: GatewayIdentity[] = []; const thisID = this.config.gid!.id; @@ -150,9 +267,9 @@ async shutdownServer(): Promise { } // gets an ID, queries a repository, returns an address, port, and proof of identity - resolveGatewayID(ID: string): GatewayIdentity { + private resolveGatewayID(ID: string): GatewayIdentity { const fnTag = `${this.label}#resolveGatewayID()`; - this.logger.debug(`Entering ${fnTag}`); + this.logger.trace(`Entering ${fnTag}`); this.logger.info(`Resolving gateway with ID: ${ID}`); const mockGatewayIdentity: GatewayIdentity[] = [ @@ -171,7 +288,7 @@ async shutdownServer(): Promise { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID1", - port: 3011, + gatewayServerPort: 3011, address: "http://localhost", }, { @@ -189,35 +306,16 @@ async shutdownServer(): Promise { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID1", - port: 3012, + gatewayServerPort: 3012, address: "http://localhost", }, ]; return mockGatewayIdentity.filter((gateway) => gateway.id === ID)[0]; } - // todo load docs for gateway coordinator and expose them in a http server - setupOpenAPI(): void { - const fnTag = `${this.label}#setupOpenAPI()`; - this.logger.debug(`Entering ${fnTag}`); - - this.logger.error("OpenAPI setup not implemented"); - return; - const specPath = path.join(__dirname, "../../", "/json", "openapi.json"); - this.logger.debug(`Loading OpenAPI specification from ${specPath}`); - - const OpenAPISpec = JSON.parse(fs.readFileSync(specPath).toString()); - this.logger.info( - `OpenAPI docs and documentation set up at 📖: \n ${this.config.gid?.address}:${this.config.gid?.port}/api-docs`, - ); - - // todo bind to grpc gateway - // this._app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(OpenAPISpec)); - } - - getGatewaySeeds(): GatewayIdentity[] { + private getGatewaySeeds(): GatewayIdentity[] { const fnTag = `${this.label}#getGatewaySeeds()`; - this.logger.debug(`Entering ${fnTag}`); + this.logger.trace(`Entering ${fnTag}`); const mockGatewayIdentity: GatewayIdentity[] = [ { @@ -235,7 +333,7 @@ async shutdownServer(): Promise { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID1", - port: 3011, + gatewayServerPort: 3011, address: "http://localhost", }, { @@ -253,68 +351,86 @@ async shutdownServer(): Promise { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID1", - port: 3012, + gatewayServerPort: 3014, address: "http://localhost", }, ]; return mockGatewayIdentity; } - static ProcessGatewayCoordinatorConfig( - pluginOptions: SATPGatewayConfig, - ): SATPGatewayConfig { - if (!pluginOptions.keys) { - pluginOptions.keys = Secp256k1Keys.generateKeyPairsBuffer(); - } - if (!pluginOptions.gid) { - const id = uuidv4(); - pluginOptions.gid = { - id: id, - name: id, - version: [ - { - Core: "v02", - Architecture: "v02", - Crash: "v02", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - port: 3000, - address: "http://localhost", - }; - } + public getIdentity(): GatewayIdentity { + const fnTag = `${this.label}#getIdentity()`; + this.logger.trace(`Entering ${fnTag}`); + return this.config.gid!; + } - if (!pluginOptions.logLevel) { - pluginOptions.logLevel = "DEBUG"; - } +/** + * Shutdown Methods + * ----------------- + * This section includes methods responsible for cleanly shutting down the server and its associated services. + */ + public onShutdown(hook: ShutdownHook): void { + const fnTag = `${this.label}#onShutdown()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.debug(`Adding shutdown hook: ${hook.name}`); + this.shutdownHooks.push(hook); + } - if (!pluginOptions.environment) { - pluginOptions.environment = "development"; - } + public async shutdown(): Promise { + const fnTag = `${this.label}#getGatewaySeeds()`; + this.logger.debug(`Entering ${fnTag}`); - if (!pluginOptions.enableOpenAPI) { - pluginOptions.enableOpenAPI = true; - } + this.logger.info("Shutting down Node server - Gateway"); + await this.shutdownGatewayServer(); + + this.logger.info("Shutting down Node server - BOL"); + await this.shutdownBOLServer(); - if (!pluginOptions.validationOptions) { - // do nothing + this.logger.debug("Running shutdown hooks"); + for (const hook of this.shutdownHooks) { + this.logger.debug(`Running shutdown hook: ${hook.name}`); + await hook.hook(); } - return pluginOptions; - } + this.logger.info("Shutting down Gateway Connection Manager") + const connectionsClosed = await this.gatewayConnectionManager.disconnectAll(); - // generate getter for identity - getIdentity(): GatewayIdentity { - return this.config.gid!; + this.logger.info(`Closed ${connectionsClosed} connections`); + this.logger.info("Gateway Coordinator shut down"); + return connectionsClosed; } - - async shutdown(): Promise { - this.logger.info("Shutting down Gateway Coordinator"); - return await this.gatewayConnectionManager.disconnectAll(); - + + private async shutdownGatewayServer(): Promise { + const fnTag = `${this.label}#shutdownServer()`; + this.logger.debug(`Entering ${fnTag}`); + if (this.gatewayServer) { + try { + await this.gatewayServer.close(); + this.gatewayServer = undefined; + this.logger.info("Server shut down"); + } catch (error) { + this.logger.error(`Error shutting down the gatewayApplication: ${error}`); + } + } else { + this.logger.warn("Server is not running."); + } } -} + + private async shutdownBOLServer(): Promise { + const fnTag = `${this.label}#shutdownBOLServer()`; + this.logger.debug(`Entering ${fnTag}`); + if (this.BOLServer) { + try { + await this.BOLServer.close(); + this.BOLServer = undefined; + this.logger.info("Server shut down"); + } catch (error) { + this.logger.error(`Error shutting down the gatewayApplication: ${error}`); + } + } else { + this.logger.warn("Server is not running."); + } + } + +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index b1b3031c64..28866805a3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -1,4 +1,4 @@ -// a helper class to manage connections to counteryparty gateways +// a helper class to manage connections to counterparty gateways import { Logger } from "@hyperledger/cactus-common"; import { GatewayIdentity, GatewayChannel } from "../core/types"; @@ -18,7 +18,6 @@ export class GatewayOrchestrator { public readonly identities: GatewayIdentity[], options: GatewayOrchestratorOptions, ) { - const fnTag = `${this.label}#constructor()`; // add checks this.logger = options.logger; this.logger.info("Initializing Gateway Connection Manager"); @@ -34,7 +33,9 @@ export class GatewayOrchestrator { async connectToCounterPartyGateways(): Promise { const fnTag = `${this.label}#connectToCounterPartyGateways()`; // add checks - this.logger.info(`Connecting to ${this.gatewayIDs.length} gateways`); + this.logger.info( + `${fnTag}, Connecting to ${this.gatewayIDs.length} gateways`, + ); let connected = 0; try { for (const id of this.gatewayIDs) { @@ -47,7 +48,7 @@ export class GatewayOrchestrator { } } } catch (ex) { - this.logger.error(`Failed to connect to gateway`); + this.logger.error(`${fnTag}, Failed to connect to gateway`); this.logger.error(ex); } return connected; @@ -56,17 +57,19 @@ export class GatewayOrchestrator { async addGateways(gateways: GatewayIdentity[]): Promise { const fnTag = `${this.label}#addGateways()`; // add checks - this.logger.info(`Adding ${gateways.length} gateways`); + this.logger.info(`${fnTag}, Adding ${gateways.length} gateways`); for (const gateway of gateways) { const id = gateway.id; if (this.gatewayIDs.includes(id)) { - this.logger.info(`Gateway with id ${id} already exists, igonoring`); + this.logger.info( + `${fnTag}, ${fnTag}, Gateway with id ${id} already exists, ignoring`, + ); continue; } this.gatewayIDs.push(id); this.gateways.set(id, gateway); } - return this.connectToCounterPartyGateways(); + return this.connectToCounterPartyGateways(); } alreadyConnected(ID: string): boolean { @@ -74,7 +77,6 @@ export class GatewayOrchestrator { } // make singleton async createChannels(): Promise { - const fnTag = `${this.label}#boostrapChannels()`; // Add checks and the rest of your logic here const channels: GatewayChannel[] = []; this.gateways.forEach(async (identity) => { @@ -83,7 +85,6 @@ export class GatewayOrchestrator { } async createChannel(identity: GatewayIdentity): Promise { - const fnTag = `${this.label}#createChannel()`; // add checks const channel: GatewayChannel = { id: identity.id, @@ -91,13 +92,17 @@ export class GatewayOrchestrator { return channel; } - async disconnectAll(): Promise { + async disconnectAll(): Promise { + const fnTag = `${this.label}#disconnectAll()`; + let counter = 0; this.channels.forEach(async (channel) => { - this.logger.info(`Disconnecting from ${channel.id}`); - this.logger.error("Not implemented") + this.logger.info(`${fnTag}, Disconnecting from ${channel.id}`); + // ! todo implement disconnect + this.logger.error("Not implemented"); counter++; }); + this.channels.clear(); return counter; } } 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 index 3d3afb7425..e55548a7dc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts @@ -10,7 +10,6 @@ export { import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; import { PluginFactoryFabricSATPGateway } from "./factory/plugin-factory-fabric-satp-gateway"; import { PluginFactoryBesuSATPGateway } from "./factory/plugin-factory-besu-satp-gateway"; -import { fileURLToPath } from "url"; export async function createFabricPluginFactory( pluginFactoryOptions: IPluginFactoryOptions, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts index b977e3e111..65c07b10de 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts @@ -7,7 +7,7 @@ export class KnexLocalLogRepository implements ILocalLogRepository { public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../../knex/knexfile.ts")[ + const configFile = require("../../../knex/knexfile.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts index 9431076d0a..8d064da275 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts @@ -10,7 +10,7 @@ export class KnexRemoteLogRepository implements IRemoteLogRepository { // simulating a remote log storage public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../../knex/knexfile-remote.ts")[ + const configFile = require("../../../knex/knexfile-remote.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts index 9f0248e275..781507d1cc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts @@ -1,12 +1,12 @@ import { ConnectRouter } from "@connectrpc/connect"; -import { TestService } from '../generated/proto/test/message_connect'; -import { TestService2 } from '../generated/proto/test/message_connect'; +import { TestService } from "../generated/proto/test/message_connect"; +import { TestService2 } from "../generated/proto/test/message_connect"; import { TestImplementation } from "./test/test"; import { TestImplementation2 } from "./test/test2"; export const configureRoutes = (router: ConnectRouter): void => { - // TODO: add all services and respective implementations - router.service(TestService, TestImplementation); - router.service(TestService2, TestImplementation2); -}; \ No newline at end of file + // TODO: add all services and respective implementations + router.service(TestService, TestImplementation); + router.service(TestService2, TestImplementation2); +}; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts index 2ed4a41ecf..6138e2c46a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts @@ -1,6 +1,10 @@ import { Empty } from "@bufbuild/protobuf"; -import { Message, ModifyMessageRequest, ModifyMessageResponse } from '../../generated/proto/test/message_pb'; -import { HandlerContext } from '@connectrpc/connect'; +import { + Message, + ModifyMessageRequest, + ModifyMessageResponse, +} from "../../generated/proto/test/message_pb"; +import { HandlerContext } from "@connectrpc/connect"; // TODO: investigate how we can get type security, without doing the following: /* @@ -18,19 +22,21 @@ const TestImplementation: ITestServiceImplementation = { export const TestImplementation: any = { async getMessage(req: Empty, context: HandlerContext): Promise { - console.log("Received request", req); + console.log("Received request", req, context); return new Message({ - content: "Hello, SATP!" + content: "Hello, SATP!", }); }, - async sendMessage(req: Message): Promise { - console.log("Received request", req); - return new Empty(); - }, - async modifyMessage(req: ModifyMessageRequest): Promise { - console.log("Received request", req); - return new ModifyMessageResponse({ - content: "You said " + req.content + async sendMessage(req: Message): Promise { + console.log("Received request", req); + return new Empty(); + }, + async modifyMessage( + req: ModifyMessageRequest, + ): Promise { + console.log("Received request", req); + return new ModifyMessageResponse({ + content: "You said " + req.content, }); }, }; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts index 44d134d2ba..8bea6562cf 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts @@ -1,12 +1,12 @@ import { Empty } from "@bufbuild/protobuf"; -import { Message, ModifyMessageRequest, ModifyMessageResponse } from '../../generated/proto/test/message_pb'; -import { HandlerContext } from '@connectrpc/connect'; +import { Message } from "../../generated/proto/test/message_pb"; +import { HandlerContext } from "@connectrpc/connect"; export const TestImplementation2: any = { async getMessage(req: Empty, context: HandlerContext): Promise { - console.log("Received request", req); + console.log("Received request", req, context); return new Message({ - content: "Hello, SATP!" + "2" + content: "Hello, SATP!" + "2", }); }, }; diff --git a/packages/cactus-plugin-satp-hermes/src/test/cucumber/placeholder b/packages/cactus-plugin-satp-hermes/src/test/cucumber/placeholder new file mode 100644 index 0000000000..8abb1dbfe4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/cucumber/placeholder @@ -0,0 +1 @@ +acceptance tests go here \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts index b51eb5dd6d..175229bdcf 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts @@ -20,6 +20,10 @@ import { FabricTestLedgerV1, pruneDockerAllIfGithubAction, BesuTestLedger, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, } from "@hyperledger/cactus-test-tooling"; import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; import { ClientV1Request } from "../../../main/typescript/public-api"; @@ -109,7 +113,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "satpTestWithBackupGateway", + label: "backup-gateway-after-client-crash", }); beforeAll(async () => { @@ -131,7 +135,8 @@ beforeAll(async () => { emitContainerLogs: true, publishAllPorts: true, imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), logLevel, }); @@ -167,50 +172,13 @@ beforeAll(async () => { asLocalhost: true, }; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", goBinary: "/usr/local/go/bin/go", pluginRegistry, - cliContainerEnv: org1Env, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, sshConfig, logLevel, connectionProfile, @@ -316,8 +284,12 @@ beforeAll(async () => { ccVersion: "1.0.0", sourceFiles, ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, ccLabel: "basic-asset-transfer-2", ccLang: ChainCodeProgrammingLanguage.Typescript, ccSequence: 1, @@ -551,8 +523,16 @@ beforeAll(async () => { pluginRecipientGateway.localRepository?.database, ).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); } { // Server Gateway configuration @@ -738,6 +718,7 @@ test("client gateway crashes after lock fabric asset", async () => { // now we simulate the crash of the client gateway pluginSourceGateway.localRepository?.destroy(); + pluginSourceGateway.remoteRepository?.destroy(); await Servers.shutdown(sourceGatewayServer); const expressApp = express(); @@ -798,7 +779,9 @@ afterAll(async () => { await besuTestLedger.destroy(); pluginSourceGateway.localRepository?.destroy(); + pluginSourceGateway.remoteRepository?.destroy(); pluginRecipientGateway.localRepository?.destroy(); + pluginRecipientGateway.remoteRepository?.destroy(); await Servers.shutdown(besuServer); await Servers.shutdown(fabricServer); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts index 86c5984540..37381f052d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts @@ -20,6 +20,10 @@ import { FabricTestLedgerV1, pruneDockerAllIfGithubAction, BesuTestLedger, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, } from "@hyperledger/cactus-test-tooling"; import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; import { ClientV1Request } from "../../../main/typescript/public-api"; @@ -112,8 +116,8 @@ const FABRIC_ASSET_ID = uuidv4(); const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", + level: logLevel, + label: "client-crash-after-delete-asset", }); beforeAll(async () => { @@ -135,7 +139,8 @@ beforeAll(async () => { emitContainerLogs: true, publishAllPorts: true, imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), logLevel, }); @@ -171,50 +176,13 @@ beforeAll(async () => { asLocalhost: true, }; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", goBinary: "/usr/local/go/bin/go", pluginRegistry, - cliContainerEnv: org1Env, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, sshConfig, logLevel, connectionProfile, @@ -320,8 +288,12 @@ beforeAll(async () => { ccVersion: "1.0.0", sourceFiles, ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, ccLabel: "basic-asset-transfer-2", ccLang: ChainCodeProgrammingLanguage.Typescript, ccSequence: 1, @@ -548,8 +520,16 @@ beforeAll(async () => { pluginRecipientGateway.localRepository?.database, ).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); } { // Server Gateway configuration @@ -771,6 +751,7 @@ test("client gateway crashes after deleting fabric asset", async () => { // now we simulate the crash of the client gateway pluginSourceGateway.localRepository?.destroy(); + pluginSourceGateway.remoteRepository?.destroy(); await Servers.shutdown(sourceGatewayServer); const expressApp = express(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts index d8dae07561..2902020270 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts @@ -20,6 +20,10 @@ import { FabricTestLedgerV1, pruneDockerAllIfGithubAction, BesuTestLedger, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, } from "@hyperledger/cactus-test-tooling"; import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; import { ClientV1Request } from "../../../main/typescript/public-api"; @@ -112,8 +116,8 @@ const FABRIC_ASSET_ID = uuidv4(); const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", + level: logLevel, + label: "client-crash-after-lock-asset", }); beforeAll(async () => { @@ -135,7 +139,8 @@ beforeAll(async () => { emitContainerLogs: true, publishAllPorts: true, imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), logLevel, }); @@ -171,50 +176,13 @@ beforeAll(async () => { asLocalhost: true, }; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", goBinary: "/usr/local/go/bin/go", pluginRegistry, - cliContainerEnv: org1Env, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, sshConfig, logLevel, connectionProfile, @@ -320,8 +288,12 @@ beforeAll(async () => { ccVersion: "1.0.0", sourceFiles, ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, ccLabel: "basic-asset-transfer-2", ccLang: ChainCodeProgrammingLanguage.Typescript, ccSequence: 1, @@ -549,8 +521,16 @@ beforeAll(async () => { pluginRecipientGateway.localRepository?.database, ).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); } { // Server Gateway configuration diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts index 60a3521d69..8c3a4f5ff0 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts @@ -6,6 +6,8 @@ import bodyParser from "body-parser"; import express, { Express } from "express"; import { IListenOptions, + LogLevelDesc, + LoggerProvider, Secp256k1Keys, Servers, } from "@hyperledger/cactus-common"; @@ -29,6 +31,9 @@ import { knexRemoteConnection, knexServerConnection, } from "../knex.config"; +import { Containers, pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; + +const logLevel: LogLevelDesc = "INFO"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -56,7 +61,21 @@ let serverListenOptions: IListenOptions; let clientExpressApp: Express; let clientListenOptions: IListenOptions; +const log = LoggerProvider.getOrCreate({ + level: "INFO", + label: "client-crash-after-transfer-initiation", +}); + beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { // Server Gateway configuration serverGatewayPluginOptions = { @@ -88,11 +107,11 @@ beforeAll(async () => { pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); + await pluginRecipientGateway.localRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); await pluginRecipientGateway.registerWebServices(serverExpressApp); } diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts index 7ddc8a62d9..e1ec6bbe27 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts @@ -1,33 +1,42 @@ import "jest-extended"; import { Containers, - FabricTestLedgerV1, pruneDockerAllIfGithubAction, - BesuTestLedger, } from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +import { + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; // import coordinator factory, coordinator and coordinator options -import { SATPGateway, SATPGatewayConfig } from "../../../main/typescript/gateway-refactor"; +import { + SATPGateway, + SATPGatewayConfig, +} from "../../../main/typescript/gateway-refactor"; import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; import { - IPluginFactoryOptions, PluginImportType, + IPluginFactoryOptions, + PluginImportType, } from "@hyperledger/cactus-core-api"; -import { SupportedGatewayImplementations } from './../../../main/typescript/core/types'; +import { + ShutdownHook, + SupportedGatewayImplementations, +} from "./../../../main/typescript/core/types"; const logLevel: LogLevelDesc = "INFO"; -const log = LoggerProvider.getOrCreate({ +const logger = LoggerProvider.getOrCreate({ level: "INFO", label: "satp-gateway-orchestrator-init-test", }); const factoryOptions: IPluginFactoryOptions = { pluginImportType: PluginImportType.Local, -} +}; const factory = new PluginFactorySATPGateway(factoryOptions); beforeAll(async () => { pruneDockerAllIfGithubAction({ logLevel }) .then(() => { - log.info("Pruning throw OK"); + logger.info("Pruning throw OK"); }) .catch(async () => { await Containers.logDiagnostics({ logLevel }); @@ -36,7 +45,6 @@ beforeAll(async () => { }); describe("SATPGateway initialization", () => { - it("initiates with default config", async () => { const options: SATPGatewayConfig = {}; const gateway = await factory.create(options); @@ -59,7 +67,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ]); expect(identity.proofID).toBe("mockProofID1"); - expect(identity.port).toBe(3000); + expect(identity.gatewayServerPort).toBe(3010); expect(identity.address).toBe("http://localhost"); }); @@ -81,7 +89,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID10", - port: 3001, + gatewayServerPort: 3010, address: "https://localhost", }, }; @@ -105,7 +113,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ]); expect(identity.proofID).toBe("mockProofID10"); - expect(identity.port).toBe(3001); + expect(identity.gatewayServerPort).toBe(3010); expect(identity.address).toBe("https://localhost"); }); @@ -127,7 +135,6 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID10", - port: 3010, address: "https://localhost", }, }; @@ -135,20 +142,77 @@ describe("SATPGateway initialization", () => { expect(gateway).toBeInstanceOf(SATPGateway); const identity = gateway.getIdentity(); - expect(identity.port).toBe(3010); + // default servers + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.gatewayClientPort).toBe(3011); expect(identity.address).toBe("https://localhost"); - await gateway.startupServer(); + await gateway.startup(); await gateway.shutdown(); }); + it("shutdown hooks work", async () => { + const options: SATPGatewayConfig = { + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + gatewayServerPort: 3014, + gatewayClientPort: 3015, + address: "https://localhost", + }, + }; + + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + // ensure logger is called with "mockHook" + const loggerSpy = jest.spyOn(logger, "info"); + + // ensure mockHookFn is called on shutdown + const mockHookFn = jest.fn(async () => { + logger.info("mockHook"); + }); + + const shutdownHook: ShutdownHook = { + name: "mockHook", + hook: async () => { + logger.info("mockHook"); + }, + }; + + const shutdownHookFn: ShutdownHook = { + name: "mockHookFn", + hook: mockHookFn, + }; + + gateway.onShutdown(shutdownHook); + gateway.onShutdown(shutdownHookFn); + await gateway.startup(); + await gateway.shutdown(); + + expect(loggerSpy).toHaveBeenCalledWith("mockHook"); + expect(mockHookFn).toHaveBeenCalled(); + + // for now, technically not needed. However if we use more tests with loggerSpy, conflicts could arise. This is a reminder to restore the spy after each test + loggerSpy.mockRestore(); + }); }); afterAll(async () => { - // shutdown channels - await pruneDockerAllIfGithubAction({ logLevel }) .then(() => { - log.info("Pruning throw OK"); + logger.info("Pruning throw OK"); }) .catch(async () => { await Containers.logDiagnostics({ logLevel }); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts index 51ce622134..3a42c977a9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts @@ -19,6 +19,10 @@ import { FabricTestLedgerV1, pruneDockerAllIfGithubAction, BesuTestLedger, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_AIO_FABRIC_VERSION, } from "@hyperledger/cactus-test-tooling"; import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; import { @@ -105,7 +109,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "satpTestWithLedgerConnectors", + label: "odap-api-call-with-ledger-connector", }); beforeAll(async () => { @@ -127,7 +131,8 @@ beforeAll(async () => { emitContainerLogs: true, publishAllPorts: true, imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), logLevel, }); @@ -163,50 +168,13 @@ beforeAll(async () => { asLocalhost: true, }; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", goBinary: "/usr/local/go/bin/go", pluginRegistry, - cliContainerEnv: org1Env, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, sshConfig, logLevel, connectionProfile, @@ -312,8 +280,12 @@ beforeAll(async () => { ccVersion: "1.0.0", sourceFiles, ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, ccLabel: "basic-asset-transfer-2", ccLang: ChainCodeProgrammingLanguage.Typescript, ccSequence: 1, @@ -511,8 +483,16 @@ beforeAll(async () => { pluginRecipientGateway.localRepository?.database, ).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); } { // Server Gateway configuration diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts index 2f5ec22b1c..e49f1b8b5f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts @@ -6,7 +6,7 @@ import bodyParser from "body-parser"; import express from "express"; import { DefaultApi as SatpApi } from "../../../main/typescript/public-api"; -import { IListenOptions, Servers } from "@hyperledger/cactus-common"; +import { IListenOptions, LogLevelDesc, LoggerProvider, Servers } from "@hyperledger/cactus-common"; import { Configuration } from "@hyperledger/cactus-core-api"; @@ -25,6 +25,9 @@ import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gat import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; +import { Containers, pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; + +const logLevel: LogLevelDesc = "INFO"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -38,6 +41,22 @@ let recipientGatewayserver: Server; let pluginSourceGateway: PluginSATPGateway; let pluginRecipientGateway: PluginSATPGateway; +const log = LoggerProvider.getOrCreate({ + level: "INFO", + label: "odap-api-call-with-ledger-connector", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + test("runs ODAP between two gateways via openApi", async () => { const clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { name: "cactus-plugin#satpGateway", @@ -62,9 +81,15 @@ test("runs ODAP between two gateways via openApi", async () => { expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); let serverGatewayApiHost: string; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts index af92b02d7d..10da0d1578 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts @@ -21,8 +21,10 @@ import { pruneDockerAllIfGithubAction, BesuTestLedger, DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - DEFAULT_FABRIC_2_AIO_FABRIC_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_AIO_FABRIC_VERSION, } from "@hyperledger/cactus-test-tooling"; import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; import { ClientV1Request } from "../../../main/typescript/public-api"; @@ -110,7 +112,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "odap-rollback-after-crash-test", + label: "odap-rollback", }); beforeAll(async () => { @@ -132,10 +134,8 @@ beforeAll(async () => { emitContainerLogs: true, publishAllPorts: true, imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: DEFAULT_FABRIC_2_AIO_IMAGE_VERSION, - envVars: new Map([ - ["FABRIC_VERSION", DEFAULT_FABRIC_2_AIO_FABRIC_VERSION], - ]), + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), logLevel, }); @@ -171,50 +171,13 @@ beforeAll(async () => { asLocalhost: true, }; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", goBinary: "/usr/local/go/bin/go", pluginRegistry, - cliContainerEnv: org1Env, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, sshConfig, logLevel, connectionProfile, @@ -320,8 +283,12 @@ beforeAll(async () => { ccVersion: "1.0.0", sourceFiles, ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, ccLabel: "basic-asset-transfer-2", ccLang: ChainCodeProgrammingLanguage.Typescript, ccSequence: 1, @@ -546,8 +513,16 @@ beforeAll(async () => { pluginRecipientGateway.localRepository?.database, ).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); } { // Server Gateway configuration diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts index 145762dd29..c09f08c65a 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts @@ -13,6 +13,8 @@ import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gat import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +import { pruneDockerAllIfGithubAction, Containers } from "@hyperledger/cactus-test-tooling"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -20,8 +22,26 @@ const MAX_TIMEOUT = 5000; let pluginSourceGateway: PluginSATPGateway; let pluginRecipientGateway: PluginSATPGateway; +const logLevel: LogLevelDesc = "INFO"; + +const log = LoggerProvider.getOrCreate({ + level: "INFO", + label: "odap", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + test("successful run ODAP instance", async () => { - console.log(knexRemoteConnection) + console.log(knexRemoteConnection); const sourceGatewayConstructor = { name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], @@ -44,9 +64,15 @@ test("successful run ODAP instance", async () => { expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); const dummyPath = { apiHost: "dummyPath" }; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts index c0d496f64e..a0ab3217f2 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts @@ -20,6 +20,10 @@ import { FabricTestLedgerV1, pruneDockerAllIfGithubAction, BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, } from "@hyperledger/cactus-test-tooling"; import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; import { ClientV1Request } from "../../../main/typescript/public-api"; @@ -112,8 +116,8 @@ const FABRIC_ASSET_ID = uuidv4(); const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satpTestWithLedgerConnectors", + level: logLevel, + label: "server-crash-after-create-asset", }); beforeAll(async () => { @@ -134,8 +138,9 @@ beforeAll(async () => { fabricLedger = new FabricTestLedgerV1({ emitContainerLogs: true, publishAllPorts: true, + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), logLevel, }); @@ -171,50 +176,13 @@ beforeAll(async () => { asLocalhost: true, }; - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - const pluginOptions: IPluginLedgerConnectorFabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", goBinary: "/usr/local/go/bin/go", pluginRegistry, - cliContainerEnv: org1Env, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, sshConfig, logLevel, connectionProfile, @@ -320,8 +288,12 @@ beforeAll(async () => { ccVersion: "1.0.0", sourceFiles, ccName: fabricContractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, ccLabel: "basic-asset-transfer-2", ccLang: ChainCodeProgrammingLanguage.Typescript, ccSequence: 1, @@ -551,8 +523,16 @@ beforeEach(async () => { pluginRecipientGateway.localRepository?.database, ).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); } { // Server Gateway configuration diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts index 92f0f6296a..ad3fd42083 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts @@ -6,6 +6,8 @@ import bodyParser from "body-parser"; import express, { Express } from "express"; import { IListenOptions, + LogLevelDesc, + LoggerProvider, Secp256k1Keys, Servers, } from "@hyperledger/cactus-common"; @@ -27,6 +29,9 @@ import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, knexRemoteConnection } from "../knex.config"; +import { pruneDockerAllIfGithubAction, Containers } from "@hyperledger/cactus-test-tooling"; + +const logLevel: LogLevelDesc = "INFO"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -53,7 +58,21 @@ let serverListenOptions: IListenOptions; let clientExpressApp: Express; let clientListenOptions: IListenOptions; +const log = LoggerProvider.getOrCreate({ + level: "INFO", + label: "server-crash-after-create-asset", +}); + beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { // Server Gateway configuration serverGatewayPluginOptions = { @@ -84,11 +103,11 @@ beforeAll(async () => { pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginRecipientGateway.localRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); await pluginRecipientGateway.registerWebServices(serverExpressApp); } @@ -123,11 +142,11 @@ beforeAll(async () => { pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - if (pluginSourceGateway.localRepository?.database == undefined) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); + await pluginSourceGateway.remoteRepository?.reset(); await pluginSourceGateway.registerWebServices(clientExpressApp); @@ -218,10 +237,10 @@ test("server gateway crashes after transfer initiation flow", async () => { }); afterAll(async () => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); + await pluginSourceGateway.localRepository?.destroy(); + await pluginRecipientGateway.localRepository?.destroy(); + await pluginSourceGateway.remoteRepository?.destroy(); + await pluginRecipientGateway.remoteRepository?.destroy(); await Servers.shutdown(sourceGatewayServer); await Servers.shutdown(recipientGatewayserver); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts index 3376a92c91..c533074692 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts @@ -1,10 +1,12 @@ +import { v4 as uuidv4 } from "uuid"; + export const knexClientConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.client.sqlite3", + filename: "./packages/cactus-plugin-satp-hermes/src/knex/.dev.client-" + uuidv4() + ".sqlite3", }, migrations: { - directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", + directory: "./packages/cactus-plugin-satp-hermes/src/knex/migrations", }, useNullAsDefault: true, }; @@ -12,10 +14,10 @@ export const knexClientConnection = { export const knexServerConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.server.sqlite3", + filename: "./packages/cactus-plugin-satp-hermes/src/knex/.dev.server-" + uuidv4() + ".sqlite3", }, migrations: { - directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", + directory: "./packages/cactus-plugin-satp-hermes/src/knex/migrations", }, useNullAsDefault: true, }; @@ -23,10 +25,10 @@ export const knexServerConnection = { export const knexRemoteConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.remote.sqlite3", + filename: "./packages/cactus-plugin-satp-hermes/src/knex/.dev.remote-" + uuidv4() + ".sqlite3", }, migrations: { - directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", + directory: "./packages/cactus-plugin-satp-hermes/src/knex/migrations", }, useNullAsDefault: true, }; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts index af553bf07f..9a5c2a23b7 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts @@ -51,15 +51,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sequenceNumber = randomInt(100); sessionID = uuidv4(); @@ -88,16 +90,6 @@ beforeEach(async () => { operation: "create", data: COMMIT_ACK_CLAIM, }); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); }); afterEach(async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts index 03494513f3..737549ed05 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts @@ -48,15 +48,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sequenceNumber = randomInt(100); sessionID = uuidV4(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts index eec07d8763..ac3aa68730 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts @@ -47,15 +47,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sequenceNumber = randomInt(100); sessionID = uuidV4(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts index 9a098ad4fa..81da65aef6 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts @@ -47,15 +47,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sequenceNumber = randomInt(100); sessionID = uuidV4(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts index 434e74777d..ca998bc95d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts @@ -48,15 +48,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sequenceNumber = randomInt(100); sessionID = uuidV4(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index 5087233c80..a867986cee 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -86,15 +86,19 @@ beforeEach(async () => { pluginSourceGateway.sessions.set(sessionID, sessionData); pluginRecipientGateway.sessions.set(sessionID, sessionData); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); }); test("successful translation of log keys", async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts index f788ac6571..a3e80345d0 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts @@ -57,8 +57,17 @@ beforeEach(async () => { throw new Error("Database is not correctly initialized"); } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); + await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sessionID = uuidv4(); sequenceNumber = randomInt(100); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts index d322274466..83154dcc84 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts @@ -50,15 +50,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sessionID = uuidv4(); sequenceNumber = randomInt(100); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts index 1f3ad2cc77..f56b917a08 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts @@ -62,15 +62,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); sessionID = uuidv4(); sequenceNumber = randomInt(100); @@ -185,7 +187,6 @@ test("check valid build of recover update message", async () => { throw new Error("Test Failed"); } - console.log(recoverUpdateMessage.recoveredLogs); expect(recoverUpdateMessage.recoveredLogs.length).toBe(3); await checkValidRecoverUpdateMessage( diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts index ad76becf89..f516efd817 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts @@ -68,15 +68,17 @@ beforeEach(async () => { pluginSourceGateway.sessions.set(sessionID, sessionData); pluginRecipientGateway.sessions.set(sessionID, sessionData); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); }); test("valid recover message request from client", async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts index 68b49e8c2f..fff1bf0a3a 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts @@ -52,15 +52,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); dummyCommitPreparationResponseMessageHash = SHA256( "commitPreparationResponseMessageData", @@ -93,16 +95,6 @@ beforeEach(async () => { operation: "delete", data: COMMIT_FINAL_CLAIM, } as ILocalLog); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); }); test("valid commit final request", async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts index dfc48380da..127ce29f9c 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts @@ -43,15 +43,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); dummyLockEvidenceResponseMessageHash = SHA256( "lockEvidenceResponseMessageData", diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts index 093e73971e..6c0552d18c 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts @@ -50,16 +50,18 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); + dummyTransferCommenceResponseMessageHash = SHA256( "transferCommenceResponseMessageData", ).toString(); @@ -94,21 +96,6 @@ beforeEach(async () => { operation: "lock", data: LOCK_EVIDENCE_CLAIM, }); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); }); test("valid lock evidence request", async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts index 59bbe0e80b..e23bd5b7a9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts @@ -47,15 +47,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); dummyInitializationResponseMessageHash = SHA256( "initializationResponseMessageData", diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts index dbd97be6d9..a2ad3a7cc1 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts @@ -44,15 +44,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); dummyCommitFinalResponseMessageHash = SHA256( "commitFinalResponseMessageData", diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts index c32508dcd9..b8d3d5a26b 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts @@ -44,15 +44,17 @@ beforeEach(async () => { pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } + expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); + + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); + + await pluginSourceGateway.remoteRepository?.reset(); + await pluginRecipientGateway.remoteRepository?.reset(); expiryDate = new Date(2060, 11, 24).toString(); assetProfile = { expirationDate: expiryDate }; From aa7af4430d6bda1b3f085647bd293d1342b7b4e7 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Tue, 12 Mar 2024 22:56:19 +0000 Subject: [PATCH 03/49] feat(satp-hermes): add API1 layer WIP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafael Belchior feat(satp-hermes): BLO API specification Signed-off-by: Rafael Belchior feat(satp-hermes): add BLO layer Signed-off-by: Rafael Belchior fix(satp-hermes): fix status endpoint and spec Signed-off-by: Rafael Belchior fix(satp-hermes): fix lint Signed-off-by: André Augusto ci(satp-hermes): rebase and update ci Signed-off-by: Rafael Belchior feat(satp-hermes): update BLO specification Signed-off-by: Rafael Belchior docs(satp-hermes): migrate BLO open api spec from json to yml Signed-off-by: Rafael Belchior feat(satp-hermes): update Go BLO SDK generation Signed-off-by: Rafael Belchior feat(satp-hermes): update BLO specification Signed-off-by: Rafael Belchior feat(satp-hermes): add health check endpoint to BLO spec Signed-off-by: Rafael Belchior fix(satp-hermes): re-add open-api json files The canonical source for the API definition are the yaml files located at packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml, due to its better readability compared to json. When yarn codegen is ran within the cactus-plugin-satp-hermes package, the json files are generated from the yaml. Signed-off-by: Rafael Belchior feat(satp-hermes): remove deprecated spec Signed-off-by: Rafael Belchior feat(SATP-Hermes): add gateway coordinator WIP Signed-off-by: Rafael Belchior feat(bungee): add skeleton for bungee Signed-off-by: André Augusto refactor(plugin-satp-hermes): update messages formats SATP core version 2.0.0 OpenAPI * created new messages in openAPI definition feat(bungee): fix bungee dependencies Signed-off-by: André Augusto feat(SATP-Hermes): gateway coordinator feat(SATP-Hermes): gateway coordinator feat(SATP-Hermes): gateway coordinator WIP Signed-off-by: Rafael Belchior test(SATP-Hermes): enable decorators needed for gateway coordinator checks Signed-off-by: Rafael Belchior docs(SATP-Hermes): update package.json Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): remove kotlin sdk, add protobuffer Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure Signed-off-by: Rafael Belchior refactor(SATP-Hermes): refactor naming Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure improvements Signed-off-by: Rafael Belchior feat(SATP-Hermes): update yarn.lock and clean up Signed-off-by: André Augusto refactor(test-tooling): fix types of streams: use NodeJS.ReadableStream 1. The container management library that we use in the test infrastructure (called dockerode) is expecting streams that are defined in the global namespace of the `@types/node` library, e.g. the standard library of NodeJS itself. 2. Previously we were using the "streams" package to provide type information to the streams that we were passing around to dockerode and it was working fine, but after some changes that seem unrelated this has broken the compilation process. 3. The mentioned changes are not yet on the main branch, but we expect them to be there soon and so this change is laying the groundwork for that by pre-emptively fixing the broken build's root cause which is that the test-tooling package does not declare it's typings related dependencies correctly: It implicitly uses the NodeJS standard library's types but so far had not declared them on the package level. 4. This change is therefore to rectify the issue of the `@types/node` dependency missing from the test-tooling package and also the refactoring of some of the test ledger classes which were relying on the `streams` builtin package instead of correctly using the NodeJS.ReadableStream global. 5. Earlier the reasoning for this was that we try to avoid pulling in types from the global scope because we try to avoid any sort of dependency on the global scope in general. Once we have proof though that this is causing issues with the build, then we must give up the principle for practical reasons (and only in the minimum viable scope, e.g. this does not change the fact that everywhere else in the codebase we should still do our best to avoid using the global scoped classes, types, functions, etc..). Thank you to @AndreAugusto11 and @RafaelAPB for pointing out this issue through the pull request of his that is currently being worked on at the time of this writing: https://github.com/RafaelAPB/blockchain-integration-framework/pull/72 Related to but does not address #2811 Signed-off-by: Peter Somogyvari refactor(SATP-Hermes): remove unused packages * updated openapi version * updated bungee plugin version to 2.0.0-alpha.2 Co-authored-by: Peter Somogyvari Signed-off-by: André Augusto Signed-off-by: Peter Somogyvari fix(satp-hermes): re-add open-api json files The canonical source for the API definition are the yaml files located at packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml, due to its better readability compared to json. When yarn codegen is ran within the cactus-plugin-satp-hermes package, the json files are generated from the yaml. Signed-off-by: Rafael Belchior ci(satp-hermes): re-activate satp-hermes ci Signed-off-by: Rafael Belchior fixup: update package json, ci, yarn lock Signed-off-by: Rafael Belchior feat(SATP-Hermes): add gateway coordinator WIP Signed-off-by: Rafael Belchior feat(bungee): add skeleton for bungee Signed-off-by: André Augusto refactor(plugin-satp-hermes): update messages formats SATP core version 2.0.0 OpenAPI * created new messages in openAPI definition feat(bungee): fix bungee dependencies Signed-off-by: André Augusto feat(SATP-Hermes): gateway coordinator feat(SATP-Hermes): gateway coordinator feat(SATP-Hermes): gateway coordinator WIP Signed-off-by: Rafael Belchior test(SATP-Hermes): enable decorators needed for gateway coordinator checks Signed-off-by: Rafael Belchior docs(SATP-Hermes): update package.json Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): re-estructure project Signed-off-by: Rafael Belchior refactor(SATP-Hermes): remove kotlin sdk, add protobuffer Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure Signed-off-by: Rafael Belchior refactor(SATP-Hermes): refactor naming Signed-off-by: Rafael Belchior feat(SATP-Hermes): protobuf structure improvements Signed-off-by: Rafael Belchior feat(SATP-Hermes): update yarn.lock and clean up Signed-off-by: André Augusto refactor(test-tooling): fix types of streams: use NodeJS.ReadableStream 1. The container management library that we use in the test infrastructure (called dockerode) is expecting streams that are defined in the global namespace of the `@types/node` library, e.g. the standard library of NodeJS itself. 2. Previously we were using the "streams" package to provide type information to the streams that we were passing around to dockerode and it was working fine, but after some changes that seem unrelated this has broken the compilation process. 3. The mentioned changes are not yet on the main branch, but we expect them to be there soon and so this change is laying the groundwork for that by pre-emptively fixing the broken build's root cause which is that the test-tooling package does not declare it's typings related dependencies correctly: It implicitly uses the NodeJS standard library's types but so far had not declared them on the package level. 4. This change is therefore to rectify the issue of the `@types/node` dependency missing from the test-tooling package and also the refactoring of some of the test ledger classes which were relying on the `streams` builtin package instead of correctly using the NodeJS.ReadableStream global. 5. Earlier the reasoning for this was that we try to avoid pulling in types from the global scope because we try to avoid any sort of dependency on the global scope in general. Once we have proof though that this is causing issues with the build, then we must give up the principle for practical reasons (and only in the minimum viable scope, e.g. this does not change the fact that everywhere else in the codebase we should still do our best to avoid using the global scoped classes, types, functions, etc..). Thank you to @AndreAugusto11 and @RafaelAPB for pointing out this issue through the pull request of his that is currently being worked on at the time of this writing: https://github.com/RafaelAPB/blockchain-integration-framework/pull/72 Related to but does not address #2811 Signed-off-by: Peter Somogyvari refactor(SATP-Hermes): remove unused packages * updated openapi version * updated bungee plugin version to 2.0.0-alpha.2 Co-authored-by: Peter Somogyvari Signed-off-by: André Augusto Signed-off-by: Peter Somogyvari --- .github/workflows/ci.yaml | 27 +- .../cactus-plugin-satp-hermes/package.json | 33 +- .../src/knex/knexfile-remote.ts | 1 + .../src/main/go/generated/api_chains.go | 147 + .../src/main/go/generated/docs/Chain.md | 114 + .../main/go/generated/docs/Chains1Inner.md | 114 + .../src/main/go/generated/docs/ChainsApi.md | 70 + .../go/generated/docs/Continue200Response.md | 51 + .../main/go/generated/docs/ContinueRequest.md | 72 + .../go/generated/docs/ContinueResponse.md | 51 + .../docs/GetChains200ResponseInner.md | 114 + .../docs/GetHealthCheck200Response.md | 56 + .../docs/GetIntegrations200ResponseInner.md | 114 + ...etRoutes200ResponseRoutesInnerFromToken.md | 265 + ...0ResponseRoutesInnerFromTokenExtensions.md | 82 + ...InnerFromTokenExtensionsBridgeInfoValue.md | 56 + .../go/generated/docs/HealthCheckResponse.md | 56 + .../go/generated/docs/Pause200Response.md | 51 + .../main/go/generated/docs/PauseRequest.md | 82 + .../main/go/generated/docs/PauseResponse.md | 51 + ...0ResponseStatusResponseDestinationChain.md | 102 + ...act200ResponseStatusResponseOriginChain.md | 102 + .../src/main/go/generated/model_chain.go | 202 + .../main/go/generated/model_chains_1_inner.go | 202 + .../generated/model_continue_200_response.go | 117 + .../go/generated/model_continue_request.go | 146 + .../go/generated/model_continue_response.go | 117 + .../model_get_chains_200_response_inner.go | 202 + .../model_get_health_check_200_response.go | 126 + ...del_get_integrations_200_response_inner.go | 202 + ...es_200_response_routes_inner_from_token.go | 414 ++ ...onse_routes_inner_from_token_extensions.go | 163 + ...from_token_extensions_bridge_info_value.go | 127 + ...esponse_routes_inner_steps_inner_action.go | 310 + .../generated/model_health_check_response.go | 126 + .../go/generated/model_pause_200_response.go | 117 + .../main/go/generated/model_pause_request.go | 162 + .../main/go/generated/model_pause_response.go | 117 + ...ponse_status_response_destination_chain.go | 164 + ...0_response_status_response_origin_chain.go | 164 + .../main/go/generated/test/api_chains_test.go | 37 + .../src/main/json/openapi-blo-bundled.json | 6114 +++++++++++++++++ .../main/json/openapi-gateway-bundled.json | 3259 +++++++++ .../blo/admin/get-audit-handler-service.ts | 1 + .../blo/admin/get-status-handler-service.ts | 62 + .../src/main/typescript/blo/dispatcher.ts | 72 + .../blo/transaction/cancel-handler-service.ts | 1 + .../blo/transaction/routes-handler-service.ts | 1 + .../transaction/transact-handler-service.ts | 1 + .../src/main/typescript/core/constants.ts | 4 +- .../src/main/typescript/core/errors.ts | 10 + .../typescript/core/stage-services/stage3.ts | 1 + .../src/main/typescript/core/types.ts | 15 +- .../src/main/typescript/gateway-refactor.ts | 173 +- .../typescript-axios-json/.gitignore | 4 + .../typescript-axios-json/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 8 + .../.openapi-generator/VERSION | 1 + .../openapi-blo/typescript-axios-json/api.ts | 2678 ++++++++ .../openapi-blo/typescript-axios-json/base.ts | 72 + .../typescript-axios-json/common.ts | 150 + .../typescript-axios-json/configuration.ts | 101 + .../typescript-axios-json/git_push.sh | 57 + .../typescript-axios-json/index.ts | 18 + .../typescript-axios/.openapi-generator/FILES | 5 + .../openapi-blo/typescript-axios/api.ts | 2678 ++++++++ .../openapi-blo/typescript-axios/base.ts | 72 + .../openapi-blo/typescript-axios/common.ts | 150 + .../typescript-axios/configuration.ts | 101 + .../openapi-blo/typescript-axios/index.ts | 18 + .../generated/openapi/typescript-axios/api.ts | 2005 +++++- .../main/typescript/plugin-satp-gateway.ts | 2 +- .../repository/knex-local-log-repository.ts | 2 +- .../repository/knex-remote-log-repository.ts | 2 +- .../web-services/blo/status-endpoint.ts | 102 + .../client-side/client-request-endpoint.ts | 2 +- .../commit-final-response-endpoint.ts | 2 +- .../commit-prepare-response-endpoint.ts | 2 +- .../lock-evidence-response-endpoint.ts | 2 +- .../transfer-commence-response-endpoint.ts | 2 +- .../transfer-initiation-response-endpoint.ts | 2 +- .../recovery/recover-message-endpoint.ts | 2 +- .../recover-success-message-endpoint.ts | 2 +- .../recover-update-ack-message-endpoint.ts | 2 +- .../recover-update-message-endpoint.ts | 2 +- .../recovery/rollback-ack-message-endpoint.ts | 2 +- .../recovery/rollback-message-endpoint.ts | 2 +- .../commit-final-request-endpoint.ts | 2 +- .../commite-prepare-request-endpoint.ts | 2 +- .../lock-evidence-request-endpoint.ts | 2 +- .../transfer-commence-request-endpoint.ts | 2 +- .../transfer-complete-request-endpoint.ts | 2 +- .../transfer-initiation-request-endpoint.ts | 2 +- .../src/main/yml/bol/openapi-blo-bundled.yml | 4689 +++++++++++++ .../src/main/yml/bol/openapi-blo.yml | 337 + .../src/main/yml/bol/schemas.yml | 696 ++ .../src/main/yml/openapi.yml | 1229 ++++ ...nt-crash-after-transfer-initiation.test.ts | 29 +- .../gateway-coordinator-init.test.ts | 102 +- .../integration/odap-api-call.test.ts | 16 +- .../test/typescript/integration/odap.test.ts | 9 +- .../refactor-gateway-get-status.test.ts | 108 + .../integration/refactor-gateway-init.test.ts | 217 + ...er-crash-after-transfer-initiation.test.ts | 17 +- .../src/test/typescript/knex.config.ts | 15 +- .../src/test/typescript/test-utils.ts | 38 + .../unit/client/commit-final.test.ts | 2 +- .../unit/client/commit-preparation.test.ts | 2 +- .../unit/client/lock-evidence.test.ts | 2 +- .../unit/client/transfer-commence.test.ts | 2 +- .../client/transfer-initialization.test.ts | 2 +- .../typescript/unit/recovery/logging.test.ts | 2 +- .../unit/recovery/recover-success.test.ts | 2 +- .../unit/recovery/recover-update-ack.test.ts | 2 +- .../unit/recovery/recover-update.test.ts | 2 +- .../typescript/unit/recovery/recover.test.ts | 2 +- .../unit/server/commit-final.test.ts | 2 +- .../unit/server/commit-preparation.test.ts | 2 +- .../unit/server/lock-evidence.test.ts | 4 +- .../unit/server/transfer-commence.test.ts | 2 +- .../unit/server/transfer-complete.test.ts | 2 +- .../server/transfer-initialization.test.ts | 2 +- yarn.lock | 434 +- 124 files changed, 30141 insertions(+), 855 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chain.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chains1Inner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Continue200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueRequest.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetHealthCheck200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromToken.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/HealthCheckResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Pause200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseRequest.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseDestinationChain.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseOriginChain.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chain.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chains_1_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_request.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_health_check_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_action.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_health_check_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_request.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_destination_chain.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_origin_chain.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json create mode 100644 packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/base.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/common.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/configuration.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/index.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-get-status.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5f3c1e4eff..f9deb6822e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1817,6 +1817,31 @@ jobs: with: name: coverage-reports-36 path: ./code-coverage-ts/**/ + cactus-plugin-bungee-hermes: + continue-on-error: false + env: + FULL_BUILD_DISABLED: true + JEST_TEST_RUNNER_DISABLED: false + JEST_TEST_PATTERN: packages/cactus-plugin-bungee-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts + TAPE_TEST_RUNNER_DISABLED: true + needs: build-dev + runs-on: ubuntu-22.04 + steps: + - name: Use Node.js ${{ env.NODEJS_VERSION }} + uses: actions/setup-node@v3.6.0 + with: + node-version: ${{ env.NODEJS_VERSION }} + - uses: actions/checkout@v3.5.2 + + - id: yarn-cache + name: Restore Yarn Cache + uses: actions/cache@v3.3.1 + with: + key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + path: ./.yarn/ + restore-keys: | + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + - run: ./tools/ci.sh ct-api-client: continue-on-error: false env: @@ -2300,4 +2325,4 @@ name: Cactus_CI push: branches: - main - - dev \ No newline at end of file + - dev diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index d118e29079..f754ac9c99 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -43,16 +43,23 @@ "build": "run-p tsc codegen", "build-proto": "buf build --path src/main/proto --verbose", "build:dev:backend:postbuild": "mkdir -p ./dist/lib/knex && cp -r ./src/knex/* ./dist/lib/knex", + "bundle-openapi-gateway-json": "swagger-cli bundle ./src/main/yml/openapi.yml -o ./src/main/json/openapi-gateway-bundled.json -r -t json", + "bundle-openapi-json": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/json/openapi-blo-bundled.json -r -t json", + "bundle-openapi-yaml": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/yml/bol/openapi-blo-bundled.yml -r -t yaml", "codegen": "run-p 'codegen:*'", "codegen:openapi": "npm run generate-sdk", "codegen:proto": "npm run generate-proto", "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", - "lint": "npm-run-all 'buf lint' eslint '*/*/src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", - "lint-protobuf": "buf lint --path src/main/proto --verbose", + "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", + "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/openapi-blo/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", + "generate-sdk:typescript-axios-gateway": "yarn bundle-openapi-gateway-json && openapi-generator-cli generate -i ./src/main/json/openapi-gateway-bundled.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", + "lint": "run-p 'lint:*'", + "lint:eslint": "eslint '*/*/src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", + "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", + "lint:protobuf": "buf lint --path src/main/proto --verbose", "pretsc": "npm run generate-sdk", - "tsc": "tsc --project ./tsconfig.json", + "tsc": "tsc --project ./tsconfig.yml", "watch": "tsc --build --watch" }, "jest": { @@ -74,6 +81,7 @@ "@connectrpc/connect-express": "1.3.0", "@connectrpc/connect-node": "1.3.0", "@connectrpc/protoc-gen-connect-es": "1.3.0", + "@bufbuild/protobuf": "1.10.0", "axios": "1.7.7", "body-parser": "1.20.2", "class-transformer": "0.5.1", @@ -94,9 +102,10 @@ "web3-utils": "1.6.1" }, "devDependencies": { + "@apidevtools/swagger-cli": "4.0.4", "@bufbuild/buf": "1.29.0", - "@bufbuild/protobuf": "1.7.2", - "@bufbuild/protoc-gen-es": "1.7.2", + "@bufbuild/protoc-gen-es": "1.8.0", + "@quobix/vacuum": "^0.9.10", "@types/body-parser": "1.19.4", "@types/crypto-js": "4.0.1", "@types/express": "5.0.0", @@ -109,6 +118,7 @@ "express": "4.21.0", "fabric-network": "2.2.20", "kubo-rpc-client": "3.0.1", + "swagger-cli": "^4.0.4", "typescript": "5.5.2" }, "engines": { @@ -118,18 +128,25 @@ "publishConfig": { "access": "public" }, + "customMetadata": { + "satp-draft-versions": { + "satp-core": "02", + "satp-architecture": "02", + "satp-crash": "02" + } + }, "watch": { "tsc": { "patterns": [ "src/", - "src/*/json/**/openapi*" + "src/*/yml/**/*" ], "ignore": [ "src/**/generated/*" ], "extensions": [ "ts", - "json" + "yml" ], "quiet": true, "verbose": false, diff --git a/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts b/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts index 6b36836510..d2a2e41600 100644 --- a/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts +++ b/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts @@ -1,4 +1,5 @@ import path from "path"; +import { v4 as uuidv4 } from "uuid"; // default configuration for knex module.exports = { diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go new file mode 100644 index 0000000000..8fa2d004e5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go @@ -0,0 +1,147 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: v0.0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type ChainsApi interface { + + /* + GetChains Get supported chains + + Retrieves metadata about each supported blockchain network. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetChainsRequest + */ + GetChains(ctx context.Context) ApiGetChainsRequest + + // GetChainsExecute executes the request + // @return []GetChains200ResponseInner + GetChainsExecute(r ApiGetChainsRequest) ([]GetChains200ResponseInner, *http.Response, error) +} + +// ChainsApiService ChainsApi service +type ChainsApiService service + +type ApiGetChainsRequest struct { + ctx context.Context + ApiService ChainsApi +} + +func (r ApiGetChainsRequest) Execute() ([]GetChains200ResponseInner, *http.Response, error) { + return r.ApiService.GetChainsExecute(r) +} + +/* +GetChains Get supported chains + +Retrieves metadata about each supported blockchain network. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetChainsRequest +*/ +func (a *ChainsApiService) GetChains(ctx context.Context) ApiGetChainsRequest { + return ApiGetChainsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []GetChains200ResponseInner +func (a *ChainsApiService) GetChainsExecute(r ApiGetChainsRequest) ([]GetChains200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetChains200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChainsApiService.GetChains") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/chains" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chain.md new file mode 100644 index 0000000000..07315d0b34 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chain.md @@ -0,0 +1,114 @@ +# Chain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainId** | **string** | A unique identifier for the blockchain network. | +**ChainName** | **string** | The name of the blockchain network. | +**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | +**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | + +## Methods + +### NewChain + +`func NewChain(chainId string, chainName string, chainType string, networkName string, ) *Chain` + +NewChain instantiates a new Chain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChainWithDefaults + +`func NewChainWithDefaults() *Chain` + +NewChainWithDefaults instantiates a new Chain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainId + +`func (o *Chain) GetChainId() string` + +GetChainId returns the ChainId field if non-nil, zero value otherwise. + +### GetChainIdOk + +`func (o *Chain) GetChainIdOk() (*string, bool)` + +GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainId + +`func (o *Chain) SetChainId(v string)` + +SetChainId sets ChainId field to given value. + + +### GetChainName + +`func (o *Chain) GetChainName() string` + +GetChainName returns the ChainName field if non-nil, zero value otherwise. + +### GetChainNameOk + +`func (o *Chain) GetChainNameOk() (*string, bool)` + +GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainName + +`func (o *Chain) SetChainName(v string)` + +SetChainName sets ChainName field to given value. + + +### GetChainType + +`func (o *Chain) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *Chain) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *Chain) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetNetworkName + +`func (o *Chain) GetNetworkName() string` + +GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. + +### GetNetworkNameOk + +`func (o *Chain) GetNetworkNameOk() (*string, bool)` + +GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkName + +`func (o *Chain) SetNetworkName(v string)` + +SetNetworkName sets NetworkName field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chains1Inner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chains1Inner.md new file mode 100644 index 0000000000..6946a5c6d4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chains1Inner.md @@ -0,0 +1,114 @@ +# Chains1Inner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainId** | **string** | A unique identifier for the blockchain network. | +**ChainName** | **string** | The name of the blockchain network. | +**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | +**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | + +## Methods + +### NewChains1Inner + +`func NewChains1Inner(chainId string, chainName string, chainType string, networkName string, ) *Chains1Inner` + +NewChains1Inner instantiates a new Chains1Inner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChains1InnerWithDefaults + +`func NewChains1InnerWithDefaults() *Chains1Inner` + +NewChains1InnerWithDefaults instantiates a new Chains1Inner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainId + +`func (o *Chains1Inner) GetChainId() string` + +GetChainId returns the ChainId field if non-nil, zero value otherwise. + +### GetChainIdOk + +`func (o *Chains1Inner) GetChainIdOk() (*string, bool)` + +GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainId + +`func (o *Chains1Inner) SetChainId(v string)` + +SetChainId sets ChainId field to given value. + + +### GetChainName + +`func (o *Chains1Inner) GetChainName() string` + +GetChainName returns the ChainName field if non-nil, zero value otherwise. + +### GetChainNameOk + +`func (o *Chains1Inner) GetChainNameOk() (*string, bool)` + +GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainName + +`func (o *Chains1Inner) SetChainName(v string)` + +SetChainName sets ChainName field to given value. + + +### GetChainType + +`func (o *Chains1Inner) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *Chains1Inner) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *Chains1Inner) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetNetworkName + +`func (o *Chains1Inner) GetNetworkName() string` + +GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. + +### GetNetworkNameOk + +`func (o *Chains1Inner) GetNetworkNameOk() (*string, bool)` + +GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkName + +`func (o *Chains1Inner) SetNetworkName(v string)` + +SetNetworkName sets NetworkName field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md new file mode 100644 index 0000000000..53a9881669 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md @@ -0,0 +1,70 @@ +# \ChainsApi + +All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetChains**](ChainsApi.md#GetChains) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/chains | Get supported chains + + + +## GetChains + +> []GetChains200ResponseInner GetChains(ctx).Execute() + +Get supported chains + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ChainsApi.GetChains(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetChains``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetChains`: []GetChains200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetChains`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetChainsRequest struct via the builder pattern + + +### Return type + +[**[]GetChains200ResponseInner**](GetChains200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Continue200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Continue200Response.md new file mode 100644 index 0000000000..90d4ab92af --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Continue200Response.md @@ -0,0 +1,51 @@ +# Continue200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | + +## Methods + +### NewContinue200Response + +`func NewContinue200Response(statusResponse Transact200ResponseStatusResponse, ) *Continue200Response` + +NewContinue200Response instantiates a new Continue200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContinue200ResponseWithDefaults + +`func NewContinue200ResponseWithDefaults() *Continue200Response` + +NewContinue200ResponseWithDefaults instantiates a new Continue200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusResponse + +`func (o *Continue200Response) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *Continue200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *Continue200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueRequest.md new file mode 100644 index 0000000000..1bdd7d3aeb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueRequest.md @@ -0,0 +1,72 @@ +# ContinueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionId** | **string** | A unique identifier for the transaction session to be continued. | +**ContextId** | **string** | A unique identifier for the transaction context. | + +## Methods + +### NewContinueRequest + +`func NewContinueRequest(sessionId string, contextId string, ) *ContinueRequest` + +NewContinueRequest instantiates a new ContinueRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContinueRequestWithDefaults + +`func NewContinueRequestWithDefaults() *ContinueRequest` + +NewContinueRequestWithDefaults instantiates a new ContinueRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionId + +`func (o *ContinueRequest) GetSessionId() string` + +GetSessionId returns the SessionId field if non-nil, zero value otherwise. + +### GetSessionIdOk + +`func (o *ContinueRequest) GetSessionIdOk() (*string, bool)` + +GetSessionIdOk returns a tuple with the SessionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionId + +`func (o *ContinueRequest) SetSessionId(v string)` + +SetSessionId sets SessionId field to given value. + + +### GetContextId + +`func (o *ContinueRequest) GetContextId() string` + +GetContextId returns the ContextId field if non-nil, zero value otherwise. + +### GetContextIdOk + +`func (o *ContinueRequest) GetContextIdOk() (*string, bool)` + +GetContextIdOk returns a tuple with the ContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContextId + +`func (o *ContinueRequest) SetContextId(v string)` + +SetContextId sets ContextId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueResponse.md new file mode 100644 index 0000000000..5be0f5d26f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueResponse.md @@ -0,0 +1,51 @@ +# ContinueResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | + +## Methods + +### NewContinueResponse + +`func NewContinueResponse(statusResponse Transact200ResponseStatusResponse, ) *ContinueResponse` + +NewContinueResponse instantiates a new ContinueResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContinueResponseWithDefaults + +`func NewContinueResponseWithDefaults() *ContinueResponse` + +NewContinueResponseWithDefaults instantiates a new ContinueResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusResponse + +`func (o *ContinueResponse) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *ContinueResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *ContinueResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md new file mode 100644 index 0000000000..7c96e73a17 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md @@ -0,0 +1,114 @@ +# GetChains200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainId** | **string** | A unique identifier for the blockchain network. | +**ChainName** | **string** | The name of the blockchain network. | +**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | +**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | + +## Methods + +### NewGetChains200ResponseInner + +`func NewGetChains200ResponseInner(chainId string, chainName string, chainType string, networkName string, ) *GetChains200ResponseInner` + +NewGetChains200ResponseInner instantiates a new GetChains200ResponseInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetChains200ResponseInnerWithDefaults + +`func NewGetChains200ResponseInnerWithDefaults() *GetChains200ResponseInner` + +NewGetChains200ResponseInnerWithDefaults instantiates a new GetChains200ResponseInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainId + +`func (o *GetChains200ResponseInner) GetChainId() string` + +GetChainId returns the ChainId field if non-nil, zero value otherwise. + +### GetChainIdOk + +`func (o *GetChains200ResponseInner) GetChainIdOk() (*string, bool)` + +GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainId + +`func (o *GetChains200ResponseInner) SetChainId(v string)` + +SetChainId sets ChainId field to given value. + + +### GetChainName + +`func (o *GetChains200ResponseInner) GetChainName() string` + +GetChainName returns the ChainName field if non-nil, zero value otherwise. + +### GetChainNameOk + +`func (o *GetChains200ResponseInner) GetChainNameOk() (*string, bool)` + +GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainName + +`func (o *GetChains200ResponseInner) SetChainName(v string)` + +SetChainName sets ChainName field to given value. + + +### GetChainType + +`func (o *GetChains200ResponseInner) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *GetChains200ResponseInner) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *GetChains200ResponseInner) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetNetworkName + +`func (o *GetChains200ResponseInner) GetNetworkName() string` + +GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. + +### GetNetworkNameOk + +`func (o *GetChains200ResponseInner) GetNetworkNameOk() (*string, bool)` + +GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkName + +`func (o *GetChains200ResponseInner) SetNetworkName(v string)` + +SetNetworkName sets NetworkName field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetHealthCheck200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetHealthCheck200Response.md new file mode 100644 index 0000000000..c8d4efc8cd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetHealthCheck200Response.md @@ -0,0 +1,56 @@ +# GetHealthCheck200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewGetHealthCheck200Response + +`func NewGetHealthCheck200Response() *GetHealthCheck200Response` + +NewGetHealthCheck200Response instantiates a new GetHealthCheck200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetHealthCheck200ResponseWithDefaults + +`func NewGetHealthCheck200ResponseWithDefaults() *GetHealthCheck200Response` + +NewGetHealthCheck200ResponseWithDefaults instantiates a new GetHealthCheck200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *GetHealthCheck200Response) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetHealthCheck200Response) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetHealthCheck200Response) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetHealthCheck200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md new file mode 100644 index 0000000000..585d83bcb7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md @@ -0,0 +1,114 @@ +# GetIntegrations200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainId** | **string** | A unique identifier for the blockchain network. | +**ChainName** | **string** | The name of the blockchain network. | +**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | +**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | + +## Methods + +### NewGetIntegrations200ResponseInner + +`func NewGetIntegrations200ResponseInner(chainId string, chainName string, chainType string, networkName string, ) *GetIntegrations200ResponseInner` + +NewGetIntegrations200ResponseInner instantiates a new GetIntegrations200ResponseInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetIntegrations200ResponseInnerWithDefaults + +`func NewGetIntegrations200ResponseInnerWithDefaults() *GetIntegrations200ResponseInner` + +NewGetIntegrations200ResponseInnerWithDefaults instantiates a new GetIntegrations200ResponseInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainId + +`func (o *GetIntegrations200ResponseInner) GetChainId() string` + +GetChainId returns the ChainId field if non-nil, zero value otherwise. + +### GetChainIdOk + +`func (o *GetIntegrations200ResponseInner) GetChainIdOk() (*string, bool)` + +GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainId + +`func (o *GetIntegrations200ResponseInner) SetChainId(v string)` + +SetChainId sets ChainId field to given value. + + +### GetChainName + +`func (o *GetIntegrations200ResponseInner) GetChainName() string` + +GetChainName returns the ChainName field if non-nil, zero value otherwise. + +### GetChainNameOk + +`func (o *GetIntegrations200ResponseInner) GetChainNameOk() (*string, bool)` + +GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainName + +`func (o *GetIntegrations200ResponseInner) SetChainName(v string)` + +SetChainName sets ChainName field to given value. + + +### GetChainType + +`func (o *GetIntegrations200ResponseInner) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *GetIntegrations200ResponseInner) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *GetIntegrations200ResponseInner) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetNetworkName + +`func (o *GetIntegrations200ResponseInner) GetNetworkName() string` + +GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. + +### GetNetworkNameOk + +`func (o *GetIntegrations200ResponseInner) GetNetworkNameOk() (*string, bool)` + +GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkName + +`func (o *GetIntegrations200ResponseInner) SetNetworkName(v string)` + +SetNetworkName sets NetworkName field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromToken.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromToken.md new file mode 100644 index 0000000000..b8964106e4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromToken.md @@ -0,0 +1,265 @@ +# GetRoutes200ResponseRoutesInnerFromToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainID** | **string** | The network of the DLT being interacted with. TODO: implement network identification draft | +**ChainType** | **string** | Supported DLT protocols. | +**Address** | **string** | A blockchain address. | +**Name** | Pointer to **string** | The name of the token. | [optional] +**Symbol** | **string** | The symbol of the token. | +**Decimals** | **int32** | How many decimals the token supports. | +**LogoURI** | Pointer to **string** | The logo of a token, chain, dex etc. | [optional] +**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] +**PriceUSD** | Pointer to **string** | The current price of the token in USD. | [optional] +**Extensions** | Pointer to [**GetRoutes200ResponseRoutesInnerFromTokenExtensions**](GetRoutes200ResponseRoutesInnerFromTokenExtensions.md) | | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerFromToken + +`func NewGetRoutes200ResponseRoutesInnerFromToken(chainID string, chainType string, address string, symbol string, decimals int32, ) *GetRoutes200ResponseRoutesInnerFromToken` + +NewGetRoutes200ResponseRoutesInnerFromToken instantiates a new GetRoutes200ResponseRoutesInnerFromToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults() *GetRoutes200ResponseRoutesInnerFromToken` + +NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainID + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainID() string` + +GetChainID returns the ChainID field if non-nil, zero value otherwise. + +### GetChainIDOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainIDOk() (*string, bool)` + +GetChainIDOk returns a tuple with the ChainID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainID + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainID(v string)` + +SetChainID sets ChainID field to given value. + + +### GetChainType + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetAddress + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetName + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSymbol + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbol() string` + +GetSymbol returns the Symbol field if non-nil, zero value otherwise. + +### GetSymbolOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbolOk() (*string, bool)` + +GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSymbol + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetSymbol(v string)` + +SetSymbol sets Symbol field to given value. + + +### GetDecimals + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimals() int32` + +GetDecimals returns the Decimals field if non-nil, zero value otherwise. + +### GetDecimalsOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimalsOk() (*int32, bool)` + +GetDecimalsOk returns a tuple with the Decimals field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDecimals + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetDecimals(v int32)` + +SetDecimals sets Decimals field to given value. + + +### GetLogoURI + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURI() string` + +GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. + +### GetLogoURIOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURIOk() (*string, bool)` + +GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogoURI + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetLogoURI(v string)` + +SetLogoURI sets LogoURI field to given value. + +### HasLogoURI + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasLogoURI() bool` + +HasLogoURI returns a boolean if a field has been set. + +### GetTags + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetPriceUSD + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSD() string` + +GetPriceUSD returns the PriceUSD field if non-nil, zero value otherwise. + +### GetPriceUSDOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSDOk() (*string, bool)` + +GetPriceUSDOk returns a tuple with the PriceUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriceUSD + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetPriceUSD(v string)` + +SetPriceUSD sets PriceUSD field to given value. + +### HasPriceUSD + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasPriceUSD() bool` + +HasPriceUSD returns a boolean if a field has been set. + +### GetExtensions + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions` + +GetExtensions returns the Extensions field if non-nil, zero value otherwise. + +### GetExtensionsOk + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool)` + +GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtensions + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions)` + +SetExtensions sets Extensions field to given value. + +### HasExtensions + +`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasExtensions() bool` + +HasExtensions returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md new file mode 100644 index 0000000000..99390587a8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md @@ -0,0 +1,82 @@ +# GetRoutes200ResponseRoutesInnerFromTokenExtensions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BridgeInfo** | Pointer to [**map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue**](GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md) | | [optional] +**Verified** | Pointer to **bool** | Indicates whether the token is verified. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerFromTokenExtensions + +`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensions() *GetRoutes200ResponseRoutesInnerFromTokenExtensions` + +NewGetRoutes200ResponseRoutesInnerFromTokenExtensions instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensions` + +NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBridgeInfo + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfo() map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue` + +GetBridgeInfo returns the BridgeInfo field if non-nil, zero value otherwise. + +### GetBridgeInfoOk + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfoOk() (*map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue, bool)` + +GetBridgeInfoOk returns a tuple with the BridgeInfo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBridgeInfo + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetBridgeInfo(v map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue)` + +SetBridgeInfo sets BridgeInfo field to given value. + +### HasBridgeInfo + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasBridgeInfo() bool` + +HasBridgeInfo returns a boolean if a field has been set. + +### GetVerified + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerified() bool` + +GetVerified returns the Verified field if non-nil, zero value otherwise. + +### GetVerifiedOk + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerifiedOk() (*bool, bool)` + +GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerified + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetVerified(v bool)` + +SetVerified sets Verified field to given value. + +### HasVerified + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasVerified() bool` + +HasVerified returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md new file mode 100644 index 0000000000..f46c000316 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md @@ -0,0 +1,56 @@ +# GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TokenAddress** | Pointer to **string** | The address of the token being transferred. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + +`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue` + +NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue` + +NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTokenAddress + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string` + +GetTokenAddress returns the TokenAddress field if non-nil, zero value otherwise. + +### GetTokenAddressOk + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool)` + +GetTokenAddressOk returns a tuple with the TokenAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenAddress + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string)` + +SetTokenAddress sets TokenAddress field to given value. + +### HasTokenAddress + +`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool` + +HasTokenAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/HealthCheckResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/HealthCheckResponse.md new file mode 100644 index 0000000000..b2b2c03b63 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/HealthCheckResponse.md @@ -0,0 +1,56 @@ +# HealthCheckResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthCheckResponse + +`func NewHealthCheckResponse() *HealthCheckResponse` + +NewHealthCheckResponse instantiates a new HealthCheckResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckResponseWithDefaults + +`func NewHealthCheckResponseWithDefaults() *HealthCheckResponse` + +NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *HealthCheckResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheckResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *HealthCheckResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthCheckResponse) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Pause200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Pause200Response.md new file mode 100644 index 0000000000..c18f13405d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Pause200Response.md @@ -0,0 +1,51 @@ +# Pause200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | + +## Methods + +### NewPause200Response + +`func NewPause200Response(statusResponse Transact200ResponseStatusResponse, ) *Pause200Response` + +NewPause200Response instantiates a new Pause200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPause200ResponseWithDefaults + +`func NewPause200ResponseWithDefaults() *Pause200Response` + +NewPause200ResponseWithDefaults instantiates a new Pause200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusResponse + +`func (o *Pause200Response) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *Pause200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *Pause200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseRequest.md new file mode 100644 index 0000000000..211f1a9dc6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseRequest.md @@ -0,0 +1,82 @@ +# PauseRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionId** | Pointer to **string** | | [optional] +**ContextId** | Pointer to **string** | | [optional] + +## Methods + +### NewPauseRequest + +`func NewPauseRequest() *PauseRequest` + +NewPauseRequest instantiates a new PauseRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPauseRequestWithDefaults + +`func NewPauseRequestWithDefaults() *PauseRequest` + +NewPauseRequestWithDefaults instantiates a new PauseRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionId + +`func (o *PauseRequest) GetSessionId() string` + +GetSessionId returns the SessionId field if non-nil, zero value otherwise. + +### GetSessionIdOk + +`func (o *PauseRequest) GetSessionIdOk() (*string, bool)` + +GetSessionIdOk returns a tuple with the SessionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionId + +`func (o *PauseRequest) SetSessionId(v string)` + +SetSessionId sets SessionId field to given value. + +### HasSessionId + +`func (o *PauseRequest) HasSessionId() bool` + +HasSessionId returns a boolean if a field has been set. + +### GetContextId + +`func (o *PauseRequest) GetContextId() string` + +GetContextId returns the ContextId field if non-nil, zero value otherwise. + +### GetContextIdOk + +`func (o *PauseRequest) GetContextIdOk() (*string, bool)` + +GetContextIdOk returns a tuple with the ContextId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContextId + +`func (o *PauseRequest) SetContextId(v string)` + +SetContextId sets ContextId field to given value. + +### HasContextId + +`func (o *PauseRequest) HasContextId() bool` + +HasContextId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseResponse.md new file mode 100644 index 0000000000..0a02a46c9c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseResponse.md @@ -0,0 +1,51 @@ +# PauseResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | + +## Methods + +### NewPauseResponse + +`func NewPauseResponse(statusResponse Transact200ResponseStatusResponse, ) *PauseResponse` + +NewPauseResponse instantiates a new PauseResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPauseResponseWithDefaults + +`func NewPauseResponseWithDefaults() *PauseResponse` + +NewPauseResponseWithDefaults instantiates a new PauseResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusResponse + +`func (o *PauseResponse) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *PauseResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *PauseResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseDestinationChain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseDestinationChain.md new file mode 100644 index 0000000000..fdff89f7a4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseDestinationChain.md @@ -0,0 +1,102 @@ +# Transact200ResponseStatusResponseDestinationChain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DltProtocol** | Pointer to **interface{}** | | [optional] +**DltSubnetworkID** | Pointer to **interface{}** | | [optional] + +## Methods + +### NewTransact200ResponseStatusResponseDestinationChain + +`func NewTransact200ResponseStatusResponseDestinationChain() *Transact200ResponseStatusResponseDestinationChain` + +NewTransact200ResponseStatusResponseDestinationChain instantiates a new Transact200ResponseStatusResponseDestinationChain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransact200ResponseStatusResponseDestinationChainWithDefaults + +`func NewTransact200ResponseStatusResponseDestinationChainWithDefaults() *Transact200ResponseStatusResponseDestinationChain` + +NewTransact200ResponseStatusResponseDestinationChainWithDefaults instantiates a new Transact200ResponseStatusResponseDestinationChain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDltProtocol + +`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocol() interface{}` + +GetDltProtocol returns the DltProtocol field if non-nil, zero value otherwise. + +### GetDltProtocolOk + +`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocolOk() (*interface{}, bool)` + +GetDltProtocolOk returns a tuple with the DltProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDltProtocol + +`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltProtocol(v interface{})` + +SetDltProtocol sets DltProtocol field to given value. + +### HasDltProtocol + +`func (o *Transact200ResponseStatusResponseDestinationChain) HasDltProtocol() bool` + +HasDltProtocol returns a boolean if a field has been set. + +### SetDltProtocolNil + +`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltProtocolNil(b bool)` + + SetDltProtocolNil sets the value for DltProtocol to be an explicit nil + +### UnsetDltProtocol +`func (o *Transact200ResponseStatusResponseDestinationChain) UnsetDltProtocol()` + +UnsetDltProtocol ensures that no value is present for DltProtocol, not even an explicit nil +### GetDltSubnetworkID + +`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkID() interface{}` + +GetDltSubnetworkID returns the DltSubnetworkID field if non-nil, zero value otherwise. + +### GetDltSubnetworkIDOk + +`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkIDOk() (*interface{}, bool)` + +GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDltSubnetworkID + +`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltSubnetworkID(v interface{})` + +SetDltSubnetworkID sets DltSubnetworkID field to given value. + +### HasDltSubnetworkID + +`func (o *Transact200ResponseStatusResponseDestinationChain) HasDltSubnetworkID() bool` + +HasDltSubnetworkID returns a boolean if a field has been set. + +### SetDltSubnetworkIDNil + +`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltSubnetworkIDNil(b bool)` + + SetDltSubnetworkIDNil sets the value for DltSubnetworkID to be an explicit nil + +### UnsetDltSubnetworkID +`func (o *Transact200ResponseStatusResponseDestinationChain) UnsetDltSubnetworkID()` + +UnsetDltSubnetworkID ensures that no value is present for DltSubnetworkID, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseOriginChain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseOriginChain.md new file mode 100644 index 0000000000..1c53906205 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseOriginChain.md @@ -0,0 +1,102 @@ +# Transact200ResponseStatusResponseOriginChain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DltProtocol** | Pointer to **interface{}** | | [optional] +**DltSubnetworkID** | Pointer to **interface{}** | | [optional] + +## Methods + +### NewTransact200ResponseStatusResponseOriginChain + +`func NewTransact200ResponseStatusResponseOriginChain() *Transact200ResponseStatusResponseOriginChain` + +NewTransact200ResponseStatusResponseOriginChain instantiates a new Transact200ResponseStatusResponseOriginChain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransact200ResponseStatusResponseOriginChainWithDefaults + +`func NewTransact200ResponseStatusResponseOriginChainWithDefaults() *Transact200ResponseStatusResponseOriginChain` + +NewTransact200ResponseStatusResponseOriginChainWithDefaults instantiates a new Transact200ResponseStatusResponseOriginChain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDltProtocol + +`func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocol() interface{}` + +GetDltProtocol returns the DltProtocol field if non-nil, zero value otherwise. + +### GetDltProtocolOk + +`func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocolOk() (*interface{}, bool)` + +GetDltProtocolOk returns a tuple with the DltProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDltProtocol + +`func (o *Transact200ResponseStatusResponseOriginChain) SetDltProtocol(v interface{})` + +SetDltProtocol sets DltProtocol field to given value. + +### HasDltProtocol + +`func (o *Transact200ResponseStatusResponseOriginChain) HasDltProtocol() bool` + +HasDltProtocol returns a boolean if a field has been set. + +### SetDltProtocolNil + +`func (o *Transact200ResponseStatusResponseOriginChain) SetDltProtocolNil(b bool)` + + SetDltProtocolNil sets the value for DltProtocol to be an explicit nil + +### UnsetDltProtocol +`func (o *Transact200ResponseStatusResponseOriginChain) UnsetDltProtocol()` + +UnsetDltProtocol ensures that no value is present for DltProtocol, not even an explicit nil +### GetDltSubnetworkID + +`func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkID() interface{}` + +GetDltSubnetworkID returns the DltSubnetworkID field if non-nil, zero value otherwise. + +### GetDltSubnetworkIDOk + +`func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkIDOk() (*interface{}, bool)` + +GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDltSubnetworkID + +`func (o *Transact200ResponseStatusResponseOriginChain) SetDltSubnetworkID(v interface{})` + +SetDltSubnetworkID sets DltSubnetworkID field to given value. + +### HasDltSubnetworkID + +`func (o *Transact200ResponseStatusResponseOriginChain) HasDltSubnetworkID() bool` + +HasDltSubnetworkID returns a boolean if a field has been set. + +### SetDltSubnetworkIDNil + +`func (o *Transact200ResponseStatusResponseOriginChain) SetDltSubnetworkIDNil(b bool)` + + SetDltSubnetworkIDNil sets the value for DltSubnetworkID to be an explicit nil + +### UnsetDltSubnetworkID +`func (o *Transact200ResponseStatusResponseOriginChain) UnsetDltSubnetworkID()` + +UnsetDltSubnetworkID ensures that no value is present for DltSubnetworkID, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chain.go new file mode 100644 index 0000000000..f2e7079574 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chain.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Chain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Chain{} + +// Chain struct for Chain +type Chain struct { + // A unique identifier for the blockchain network. + ChainId string `json:"chainId"` + // The name of the blockchain network. + ChainName string `json:"chainName"` + // The type of blockchain network (e.g., 'evm', 'fabric'). + ChainType string `json:"chainType"` + // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). + NetworkName string `json:"networkName"` +} + +// NewChain instantiates a new Chain object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChain(chainId string, chainName string, chainType string, networkName string) *Chain { + this := Chain{} + this.ChainId = chainId + this.ChainName = chainName + this.ChainType = chainType + this.NetworkName = networkName + return &this +} + +// NewChainWithDefaults instantiates a new Chain object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChainWithDefaults() *Chain { + this := Chain{} + return &this +} + +// GetChainId returns the ChainId field value +func (o *Chain) GetChainId() string { + if o == nil { + var ret string + return ret + } + + return o.ChainId +} + +// GetChainIdOk returns a tuple with the ChainId field value +// and a boolean to check if the value has been set. +func (o *Chain) GetChainIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainId, true +} + +// SetChainId sets field value +func (o *Chain) SetChainId(v string) { + o.ChainId = v +} + +// GetChainName returns the ChainName field value +func (o *Chain) GetChainName() string { + if o == nil { + var ret string + return ret + } + + return o.ChainName +} + +// GetChainNameOk returns a tuple with the ChainName field value +// and a boolean to check if the value has been set. +func (o *Chain) GetChainNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainName, true +} + +// SetChainName sets field value +func (o *Chain) SetChainName(v string) { + o.ChainName = v +} + +// GetChainType returns the ChainType field value +func (o *Chain) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *Chain) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *Chain) SetChainType(v string) { + o.ChainType = v +} + +// GetNetworkName returns the NetworkName field value +func (o *Chain) GetNetworkName() string { + if o == nil { + var ret string + return ret + } + + return o.NetworkName +} + +// GetNetworkNameOk returns a tuple with the NetworkName field value +// and a boolean to check if the value has been set. +func (o *Chain) GetNetworkNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NetworkName, true +} + +// SetNetworkName sets field value +func (o *Chain) SetNetworkName(v string) { + o.NetworkName = v +} + +func (o Chain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Chain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainId"] = o.ChainId + toSerialize["chainName"] = o.ChainName + toSerialize["chainType"] = o.ChainType + toSerialize["networkName"] = o.NetworkName + return toSerialize, nil +} + +type NullableChain struct { + value *Chain + isSet bool +} + +func (v NullableChain) Get() *Chain { + return v.value +} + +func (v *NullableChain) Set(val *Chain) { + v.value = val + v.isSet = true +} + +func (v NullableChain) IsSet() bool { + return v.isSet +} + +func (v *NullableChain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChain(val *Chain) *NullableChain { + return &NullableChain{value: val, isSet: true} +} + +func (v NullableChain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chains_1_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chains_1_inner.go new file mode 100644 index 0000000000..49d8379190 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chains_1_inner.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Chains1Inner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Chains1Inner{} + +// Chains1Inner struct for Chains1Inner +type Chains1Inner struct { + // A unique identifier for the blockchain network. + ChainId string `json:"chainId"` + // The name of the blockchain network. + ChainName string `json:"chainName"` + // The type of blockchain network (e.g., 'evm', 'fabric'). + ChainType string `json:"chainType"` + // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). + NetworkName string `json:"networkName"` +} + +// NewChains1Inner instantiates a new Chains1Inner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChains1Inner(chainId string, chainName string, chainType string, networkName string) *Chains1Inner { + this := Chains1Inner{} + this.ChainId = chainId + this.ChainName = chainName + this.ChainType = chainType + this.NetworkName = networkName + return &this +} + +// NewChains1InnerWithDefaults instantiates a new Chains1Inner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChains1InnerWithDefaults() *Chains1Inner { + this := Chains1Inner{} + return &this +} + +// GetChainId returns the ChainId field value +func (o *Chains1Inner) GetChainId() string { + if o == nil { + var ret string + return ret + } + + return o.ChainId +} + +// GetChainIdOk returns a tuple with the ChainId field value +// and a boolean to check if the value has been set. +func (o *Chains1Inner) GetChainIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainId, true +} + +// SetChainId sets field value +func (o *Chains1Inner) SetChainId(v string) { + o.ChainId = v +} + +// GetChainName returns the ChainName field value +func (o *Chains1Inner) GetChainName() string { + if o == nil { + var ret string + return ret + } + + return o.ChainName +} + +// GetChainNameOk returns a tuple with the ChainName field value +// and a boolean to check if the value has been set. +func (o *Chains1Inner) GetChainNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainName, true +} + +// SetChainName sets field value +func (o *Chains1Inner) SetChainName(v string) { + o.ChainName = v +} + +// GetChainType returns the ChainType field value +func (o *Chains1Inner) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *Chains1Inner) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *Chains1Inner) SetChainType(v string) { + o.ChainType = v +} + +// GetNetworkName returns the NetworkName field value +func (o *Chains1Inner) GetNetworkName() string { + if o == nil { + var ret string + return ret + } + + return o.NetworkName +} + +// GetNetworkNameOk returns a tuple with the NetworkName field value +// and a boolean to check if the value has been set. +func (o *Chains1Inner) GetNetworkNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NetworkName, true +} + +// SetNetworkName sets field value +func (o *Chains1Inner) SetNetworkName(v string) { + o.NetworkName = v +} + +func (o Chains1Inner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Chains1Inner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainId"] = o.ChainId + toSerialize["chainName"] = o.ChainName + toSerialize["chainType"] = o.ChainType + toSerialize["networkName"] = o.NetworkName + return toSerialize, nil +} + +type NullableChains1Inner struct { + value *Chains1Inner + isSet bool +} + +func (v NullableChains1Inner) Get() *Chains1Inner { + return v.value +} + +func (v *NullableChains1Inner) Set(val *Chains1Inner) { + v.value = val + v.isSet = true +} + +func (v NullableChains1Inner) IsSet() bool { + return v.isSet +} + +func (v *NullableChains1Inner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChains1Inner(val *Chains1Inner) *NullableChains1Inner { + return &NullableChains1Inner{value: val, isSet: true} +} + +func (v NullableChains1Inner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChains1Inner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_200_response.go new file mode 100644 index 0000000000..d9bea245da --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_200_response.go @@ -0,0 +1,117 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Continue200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Continue200Response{} + +// Continue200Response Response schema for a continue request, returning the status of the SATP session. +type Continue200Response struct { + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` +} + +// NewContinue200Response instantiates a new Continue200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContinue200Response(statusResponse Transact200ResponseStatusResponse) *Continue200Response { + this := Continue200Response{} + this.StatusResponse = statusResponse + return &this +} + +// NewContinue200ResponseWithDefaults instantiates a new Continue200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContinue200ResponseWithDefaults() *Continue200Response { + this := Continue200Response{} + return &this +} + +// GetStatusResponse returns the StatusResponse field value +func (o *Continue200Response) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *Continue200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *Continue200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +func (o Continue200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Continue200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statusResponse"] = o.StatusResponse + return toSerialize, nil +} + +type NullableContinue200Response struct { + value *Continue200Response + isSet bool +} + +func (v NullableContinue200Response) Get() *Continue200Response { + return v.value +} + +func (v *NullableContinue200Response) Set(val *Continue200Response) { + v.value = val + v.isSet = true +} + +func (v NullableContinue200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableContinue200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContinue200Response(val *Continue200Response) *NullableContinue200Response { + return &NullableContinue200Response{value: val, isSet: true} +} + +func (v NullableContinue200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContinue200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_request.go new file mode 100644 index 0000000000..672169e029 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_request.go @@ -0,0 +1,146 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the ContinueRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContinueRequest{} + +// ContinueRequest Schema for a request to continue a paused transaction session. +type ContinueRequest struct { + // A unique identifier for the transaction session to be continued. + SessionId string `json:"sessionId"` + // A unique identifier for the transaction context. + ContextId string `json:"contextId"` +} + +// NewContinueRequest instantiates a new ContinueRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContinueRequest(sessionId string, contextId string) *ContinueRequest { + this := ContinueRequest{} + this.SessionId = sessionId + this.ContextId = contextId + return &this +} + +// NewContinueRequestWithDefaults instantiates a new ContinueRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContinueRequestWithDefaults() *ContinueRequest { + this := ContinueRequest{} + return &this +} + +// GetSessionId returns the SessionId field value +func (o *ContinueRequest) GetSessionId() string { + if o == nil { + var ret string + return ret + } + + return o.SessionId +} + +// GetSessionIdOk returns a tuple with the SessionId field value +// and a boolean to check if the value has been set. +func (o *ContinueRequest) GetSessionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SessionId, true +} + +// SetSessionId sets field value +func (o *ContinueRequest) SetSessionId(v string) { + o.SessionId = v +} + +// GetContextId returns the ContextId field value +func (o *ContinueRequest) GetContextId() string { + if o == nil { + var ret string + return ret + } + + return o.ContextId +} + +// GetContextIdOk returns a tuple with the ContextId field value +// and a boolean to check if the value has been set. +func (o *ContinueRequest) GetContextIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContextId, true +} + +// SetContextId sets field value +func (o *ContinueRequest) SetContextId(v string) { + o.ContextId = v +} + +func (o ContinueRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContinueRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sessionId"] = o.SessionId + toSerialize["contextId"] = o.ContextId + return toSerialize, nil +} + +type NullableContinueRequest struct { + value *ContinueRequest + isSet bool +} + +func (v NullableContinueRequest) Get() *ContinueRequest { + return v.value +} + +func (v *NullableContinueRequest) Set(val *ContinueRequest) { + v.value = val + v.isSet = true +} + +func (v NullableContinueRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableContinueRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContinueRequest(val *ContinueRequest) *NullableContinueRequest { + return &NullableContinueRequest{value: val, isSet: true} +} + +func (v NullableContinueRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContinueRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_response.go new file mode 100644 index 0000000000..74f3b5d9d5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_response.go @@ -0,0 +1,117 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the ContinueResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContinueResponse{} + +// ContinueResponse Response schema for a continue request, returning the status of the SATP session. +type ContinueResponse struct { + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` +} + +// NewContinueResponse instantiates a new ContinueResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContinueResponse(statusResponse Transact200ResponseStatusResponse) *ContinueResponse { + this := ContinueResponse{} + this.StatusResponse = statusResponse + return &this +} + +// NewContinueResponseWithDefaults instantiates a new ContinueResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContinueResponseWithDefaults() *ContinueResponse { + this := ContinueResponse{} + return &this +} + +// GetStatusResponse returns the StatusResponse field value +func (o *ContinueResponse) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *ContinueResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *ContinueResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +func (o ContinueResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContinueResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statusResponse"] = o.StatusResponse + return toSerialize, nil +} + +type NullableContinueResponse struct { + value *ContinueResponse + isSet bool +} + +func (v NullableContinueResponse) Get() *ContinueResponse { + return v.value +} + +func (v *NullableContinueResponse) Set(val *ContinueResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContinueResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContinueResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContinueResponse(val *ContinueResponse) *NullableContinueResponse { + return &NullableContinueResponse{value: val, isSet: true} +} + +func (v NullableContinueResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContinueResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go new file mode 100644 index 0000000000..4023043d78 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: v0.0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetChains200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetChains200ResponseInner{} + +// GetChains200ResponseInner struct for GetChains200ResponseInner +type GetChains200ResponseInner struct { + // A unique identifier for the blockchain network. + ChainId string `json:"chainId"` + // The name of the blockchain network. + ChainName string `json:"chainName"` + // The type of blockchain network (e.g., 'evm', 'fabric'). + ChainType string `json:"chainType"` + // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). + NetworkName string `json:"networkName"` +} + +// NewGetChains200ResponseInner instantiates a new GetChains200ResponseInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetChains200ResponseInner(chainId string, chainName string, chainType string, networkName string) *GetChains200ResponseInner { + this := GetChains200ResponseInner{} + this.ChainId = chainId + this.ChainName = chainName + this.ChainType = chainType + this.NetworkName = networkName + return &this +} + +// NewGetChains200ResponseInnerWithDefaults instantiates a new GetChains200ResponseInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetChains200ResponseInnerWithDefaults() *GetChains200ResponseInner { + this := GetChains200ResponseInner{} + return &this +} + +// GetChainId returns the ChainId field value +func (o *GetChains200ResponseInner) GetChainId() string { + if o == nil { + var ret string + return ret + } + + return o.ChainId +} + +// GetChainIdOk returns a tuple with the ChainId field value +// and a boolean to check if the value has been set. +func (o *GetChains200ResponseInner) GetChainIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainId, true +} + +// SetChainId sets field value +func (o *GetChains200ResponseInner) SetChainId(v string) { + o.ChainId = v +} + +// GetChainName returns the ChainName field value +func (o *GetChains200ResponseInner) GetChainName() string { + if o == nil { + var ret string + return ret + } + + return o.ChainName +} + +// GetChainNameOk returns a tuple with the ChainName field value +// and a boolean to check if the value has been set. +func (o *GetChains200ResponseInner) GetChainNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainName, true +} + +// SetChainName sets field value +func (o *GetChains200ResponseInner) SetChainName(v string) { + o.ChainName = v +} + +// GetChainType returns the ChainType field value +func (o *GetChains200ResponseInner) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *GetChains200ResponseInner) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *GetChains200ResponseInner) SetChainType(v string) { + o.ChainType = v +} + +// GetNetworkName returns the NetworkName field value +func (o *GetChains200ResponseInner) GetNetworkName() string { + if o == nil { + var ret string + return ret + } + + return o.NetworkName +} + +// GetNetworkNameOk returns a tuple with the NetworkName field value +// and a boolean to check if the value has been set. +func (o *GetChains200ResponseInner) GetNetworkNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NetworkName, true +} + +// SetNetworkName sets field value +func (o *GetChains200ResponseInner) SetNetworkName(v string) { + o.NetworkName = v +} + +func (o GetChains200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetChains200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainId"] = o.ChainId + toSerialize["chainName"] = o.ChainName + toSerialize["chainType"] = o.ChainType + toSerialize["networkName"] = o.NetworkName + return toSerialize, nil +} + +type NullableGetChains200ResponseInner struct { + value *GetChains200ResponseInner + isSet bool +} + +func (v NullableGetChains200ResponseInner) Get() *GetChains200ResponseInner { + return v.value +} + +func (v *NullableGetChains200ResponseInner) Set(val *GetChains200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetChains200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetChains200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetChains200ResponseInner(val *GetChains200ResponseInner) *NullableGetChains200ResponseInner { + return &NullableGetChains200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetChains200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetChains200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_health_check_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_health_check_200_response.go new file mode 100644 index 0000000000..b25ba1ae46 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_health_check_200_response.go @@ -0,0 +1,126 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetHealthCheck200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetHealthCheck200Response{} + +// GetHealthCheck200Response struct for GetHealthCheck200Response +type GetHealthCheck200Response struct { + Status *string `json:"status,omitempty"` +} + +// NewGetHealthCheck200Response instantiates a new GetHealthCheck200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetHealthCheck200Response() *GetHealthCheck200Response { + this := GetHealthCheck200Response{} + return &this +} + +// NewGetHealthCheck200ResponseWithDefaults instantiates a new GetHealthCheck200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetHealthCheck200ResponseWithDefaults() *GetHealthCheck200Response { + this := GetHealthCheck200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetHealthCheck200Response) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetHealthCheck200Response) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetHealthCheck200Response) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *GetHealthCheck200Response) SetStatus(v string) { + o.Status = &v +} + +func (o GetHealthCheck200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetHealthCheck200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableGetHealthCheck200Response struct { + value *GetHealthCheck200Response + isSet bool +} + +func (v NullableGetHealthCheck200Response) Get() *GetHealthCheck200Response { + return v.value +} + +func (v *NullableGetHealthCheck200Response) Set(val *GetHealthCheck200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetHealthCheck200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetHealthCheck200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetHealthCheck200Response(val *GetHealthCheck200Response) *NullableGetHealthCheck200Response { + return &NullableGetHealthCheck200Response{value: val, isSet: true} +} + +func (v NullableGetHealthCheck200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetHealthCheck200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go new file mode 100644 index 0000000000..e5749a63e6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetIntegrations200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetIntegrations200ResponseInner{} + +// GetIntegrations200ResponseInner struct for GetIntegrations200ResponseInner +type GetIntegrations200ResponseInner struct { + // A unique identifier for the blockchain network. + ChainId string `json:"chainId"` + // The name of the blockchain network. + ChainName string `json:"chainName"` + // The type of blockchain network (e.g., 'evm', 'fabric'). + ChainType string `json:"chainType"` + // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). + NetworkName string `json:"networkName"` +} + +// NewGetIntegrations200ResponseInner instantiates a new GetIntegrations200ResponseInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetIntegrations200ResponseInner(chainId string, chainName string, chainType string, networkName string) *GetIntegrations200ResponseInner { + this := GetIntegrations200ResponseInner{} + this.ChainId = chainId + this.ChainName = chainName + this.ChainType = chainType + this.NetworkName = networkName + return &this +} + +// NewGetIntegrations200ResponseInnerWithDefaults instantiates a new GetIntegrations200ResponseInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetIntegrations200ResponseInnerWithDefaults() *GetIntegrations200ResponseInner { + this := GetIntegrations200ResponseInner{} + return &this +} + +// GetChainId returns the ChainId field value +func (o *GetIntegrations200ResponseInner) GetChainId() string { + if o == nil { + var ret string + return ret + } + + return o.ChainId +} + +// GetChainIdOk returns a tuple with the ChainId field value +// and a boolean to check if the value has been set. +func (o *GetIntegrations200ResponseInner) GetChainIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainId, true +} + +// SetChainId sets field value +func (o *GetIntegrations200ResponseInner) SetChainId(v string) { + o.ChainId = v +} + +// GetChainName returns the ChainName field value +func (o *GetIntegrations200ResponseInner) GetChainName() string { + if o == nil { + var ret string + return ret + } + + return o.ChainName +} + +// GetChainNameOk returns a tuple with the ChainName field value +// and a boolean to check if the value has been set. +func (o *GetIntegrations200ResponseInner) GetChainNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainName, true +} + +// SetChainName sets field value +func (o *GetIntegrations200ResponseInner) SetChainName(v string) { + o.ChainName = v +} + +// GetChainType returns the ChainType field value +func (o *GetIntegrations200ResponseInner) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *GetIntegrations200ResponseInner) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *GetIntegrations200ResponseInner) SetChainType(v string) { + o.ChainType = v +} + +// GetNetworkName returns the NetworkName field value +func (o *GetIntegrations200ResponseInner) GetNetworkName() string { + if o == nil { + var ret string + return ret + } + + return o.NetworkName +} + +// GetNetworkNameOk returns a tuple with the NetworkName field value +// and a boolean to check if the value has been set. +func (o *GetIntegrations200ResponseInner) GetNetworkNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NetworkName, true +} + +// SetNetworkName sets field value +func (o *GetIntegrations200ResponseInner) SetNetworkName(v string) { + o.NetworkName = v +} + +func (o GetIntegrations200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetIntegrations200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainId"] = o.ChainId + toSerialize["chainName"] = o.ChainName + toSerialize["chainType"] = o.ChainType + toSerialize["networkName"] = o.NetworkName + return toSerialize, nil +} + +type NullableGetIntegrations200ResponseInner struct { + value *GetIntegrations200ResponseInner + isSet bool +} + +func (v NullableGetIntegrations200ResponseInner) Get() *GetIntegrations200ResponseInner { + return v.value +} + +func (v *NullableGetIntegrations200ResponseInner) Set(val *GetIntegrations200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetIntegrations200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetIntegrations200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetIntegrations200ResponseInner(val *GetIntegrations200ResponseInner) *NullableGetIntegrations200ResponseInner { + return &NullableGetIntegrations200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetIntegrations200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetIntegrations200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token.go new file mode 100644 index 0000000000..6537a62963 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token.go @@ -0,0 +1,414 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerFromToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerFromToken{} + +// GetRoutes200ResponseRoutesInnerFromToken Metadata detailing a supported token +type GetRoutes200ResponseRoutesInnerFromToken struct { + // The network of the DLT being interacted with. TODO: implement network identification draft + ChainID string `json:"chainID"` + // Supported DLT protocols. + ChainType string `json:"chainType"` + // A blockchain address. + Address string `json:"address"` + // The name of the token. + Name *string `json:"name,omitempty"` + // The symbol of the token. + Symbol string `json:"symbol"` + // How many decimals the token supports. + Decimals int32 `json:"decimals"` + // The logo of a token, chain, dex etc. + LogoURI *string `json:"logoURI,omitempty"` + // List of tags identifiers providing additional context or categorization. + Tags []string `json:"tags,omitempty"` + // The current price of the token in USD. + PriceUSD *string `json:"priceUSD,omitempty"` + Extensions *GetRoutes200ResponseRoutesInnerFromTokenExtensions `json:"extensions,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerFromToken instantiates a new GetRoutes200ResponseRoutesInnerFromToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerFromToken(chainID string, chainType string, address string, symbol string, decimals int32) *GetRoutes200ResponseRoutesInnerFromToken { + this := GetRoutes200ResponseRoutesInnerFromToken{} + this.ChainID = chainID + this.ChainType = chainType + this.Address = address + this.Symbol = symbol + this.Decimals = decimals + return &this +} + +// NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults() *GetRoutes200ResponseRoutesInnerFromToken { + this := GetRoutes200ResponseRoutesInnerFromToken{} + return &this +} + +// GetChainID returns the ChainID field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainID() string { + if o == nil { + var ret string + return ret + } + + return o.ChainID +} + +// GetChainIDOk returns a tuple with the ChainID field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainID, true +} + +// SetChainID sets field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainID(v string) { + o.ChainID = v +} + +// GetChainType returns the ChainType field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainType(v string) { + o.ChainType = v +} + +// GetAddress returns the Address field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetAddress(v string) { + o.Address = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetName(v string) { + o.Name = &v +} + +// GetSymbol returns the Symbol field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbol() string { + if o == nil { + var ret string + return ret + } + + return o.Symbol +} + +// GetSymbolOk returns a tuple with the Symbol field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbolOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Symbol, true +} + +// SetSymbol sets field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetSymbol(v string) { + o.Symbol = v +} + +// GetDecimals returns the Decimals field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimals() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Decimals +} + +// GetDecimalsOk returns a tuple with the Decimals field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimalsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Decimals, true +} + +// SetDecimals sets field value +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetDecimals(v int32) { + o.Decimals = v +} + +// GetLogoURI returns the LogoURI field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURI() string { + if o == nil || IsNil(o.LogoURI) { + var ret string + return ret + } + return *o.LogoURI +} + +// GetLogoURIOk returns a tuple with the LogoURI field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURIOk() (*string, bool) { + if o == nil || IsNil(o.LogoURI) { + return nil, false + } + return o.LogoURI, true +} + +// HasLogoURI returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) HasLogoURI() bool { + if o != nil && !IsNil(o.LogoURI) { + return true + } + + return false +} + +// SetLogoURI gets a reference to the given string and assigns it to the LogoURI field. +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetLogoURI(v string) { + o.LogoURI = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetTags(v []string) { + o.Tags = v +} + +// GetPriceUSD returns the PriceUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSD() string { + if o == nil || IsNil(o.PriceUSD) { + var ret string + return ret + } + return *o.PriceUSD +} + +// GetPriceUSDOk returns a tuple with the PriceUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSDOk() (*string, bool) { + if o == nil || IsNil(o.PriceUSD) { + return nil, false + } + return o.PriceUSD, true +} + +// HasPriceUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) HasPriceUSD() bool { + if o != nil && !IsNil(o.PriceUSD) { + return true + } + + return false +} + +// SetPriceUSD gets a reference to the given string and assigns it to the PriceUSD field. +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetPriceUSD(v string) { + o.PriceUSD = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions { + if o == nil || IsNil(o.Extensions) { + var ret GetRoutes200ResponseRoutesInnerFromTokenExtensions + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromToken) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given GetRoutes200ResponseRoutesInnerFromTokenExtensions and assigns it to the Extensions field. +func (o *GetRoutes200ResponseRoutesInnerFromToken) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions) { + o.Extensions = &v +} + +func (o GetRoutes200ResponseRoutesInnerFromToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerFromToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainID"] = o.ChainID + toSerialize["chainType"] = o.ChainType + toSerialize["address"] = o.Address + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["symbol"] = o.Symbol + toSerialize["decimals"] = o.Decimals + if !IsNil(o.LogoURI) { + toSerialize["logoURI"] = o.LogoURI + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.PriceUSD) { + toSerialize["priceUSD"] = o.PriceUSD + } + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerFromToken struct { + value *GetRoutes200ResponseRoutesInnerFromToken + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromToken) Get() *GetRoutes200ResponseRoutesInnerFromToken { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromToken) Set(val *GetRoutes200ResponseRoutesInnerFromToken) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromToken) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerFromToken(val *GetRoutes200ResponseRoutesInnerFromToken) *NullableGetRoutes200ResponseRoutesInnerFromToken { + return &NullableGetRoutes200ResponseRoutesInnerFromToken{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions.go new file mode 100644 index 0000000000..a0099c3234 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions.go @@ -0,0 +1,163 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerFromTokenExtensions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerFromTokenExtensions{} + +// GetRoutes200ResponseRoutesInnerFromTokenExtensions struct for GetRoutes200ResponseRoutesInnerFromTokenExtensions +type GetRoutes200ResponseRoutesInnerFromTokenExtensions struct { + BridgeInfo *map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue `json:"bridgeInfo,omitempty"` + // Indicates whether the token is verified. + Verified *bool `json:"verified,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerFromTokenExtensions instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerFromTokenExtensions() *GetRoutes200ResponseRoutesInnerFromTokenExtensions { + this := GetRoutes200ResponseRoutesInnerFromTokenExtensions{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensions { + this := GetRoutes200ResponseRoutesInnerFromTokenExtensions{} + return &this +} + +// GetBridgeInfo returns the BridgeInfo field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfo() map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + if o == nil || IsNil(o.BridgeInfo) { + var ret map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + return ret + } + return *o.BridgeInfo +} + +// GetBridgeInfoOk returns a tuple with the BridgeInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfoOk() (*map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue, bool) { + if o == nil || IsNil(o.BridgeInfo) { + return nil, false + } + return o.BridgeInfo, true +} + +// HasBridgeInfo returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasBridgeInfo() bool { + if o != nil && !IsNil(o.BridgeInfo) { + return true + } + + return false +} + +// SetBridgeInfo gets a reference to the given map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue and assigns it to the BridgeInfo field. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetBridgeInfo(v map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) { + o.BridgeInfo = &v +} + +// GetVerified returns the Verified field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerified() bool { + if o == nil || IsNil(o.Verified) { + var ret bool + return ret + } + return *o.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerifiedOk() (*bool, bool) { + if o == nil || IsNil(o.Verified) { + return nil, false + } + return o.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasVerified() bool { + if o != nil && !IsNil(o.Verified) { + return true + } + + return false +} + +// SetVerified gets a reference to the given bool and assigns it to the Verified field. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetVerified(v bool) { + o.Verified = &v +} + +func (o GetRoutes200ResponseRoutesInnerFromTokenExtensions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerFromTokenExtensions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BridgeInfo) { + toSerialize["bridgeInfo"] = o.BridgeInfo + } + if !IsNil(o.Verified) { + toSerialize["verified"] = o.Verified + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions struct { + value *GetRoutes200ResponseRoutesInnerFromTokenExtensions + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) Get() *GetRoutes200ResponseRoutesInnerFromTokenExtensions { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) Set(val *GetRoutes200ResponseRoutesInnerFromTokenExtensions) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerFromTokenExtensions(val *GetRoutes200ResponseRoutesInnerFromTokenExtensions) *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions { + return &NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go new file mode 100644 index 0000000000..d6337f0003 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go @@ -0,0 +1,127 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{} + +// GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue Information about the bridge used for the token transfer. +type GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue struct { + // The address of the token being transferred. + TokenAddress *string `json:"tokenAddress,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + this := GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + this := GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{} + return &this +} + +// GetTokenAddress returns the TokenAddress field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string { + if o == nil || IsNil(o.TokenAddress) { + var ret string + return ret + } + return *o.TokenAddress +} + +// GetTokenAddressOk returns a tuple with the TokenAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool) { + if o == nil || IsNil(o.TokenAddress) { + return nil, false + } + return o.TokenAddress, true +} + +// HasTokenAddress returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool { + if o != nil && !IsNil(o.TokenAddress) { + return true + } + + return false +} + +// SetTokenAddress gets a reference to the given string and assigns it to the TokenAddress field. +func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string) { + o.TokenAddress = &v +} + +func (o GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TokenAddress) { + toSerialize["tokenAddress"] = o.TokenAddress + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue struct { + value *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) Get() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) Set(val *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue(val *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + return &NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_action.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_action.go new file mode 100644 index 0000000000..f1148a04fd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_action.go @@ -0,0 +1,310 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerStepsInnerAction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerAction{} + +// GetRoutes200ResponseRoutesInnerStepsInnerAction struct for GetRoutes200ResponseRoutesInnerStepsInnerAction +type GetRoutes200ResponseRoutesInnerStepsInnerAction struct { + FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` + // The amount of 'fromToken' to be transferred, specified as a string to maintain precision. + FromAmount *string `json:"fromAmount,omitempty"` + ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` + // The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + Slippage *float32 `json:"slippage,omitempty"` + // A blockchain address. + FromAddress *string `json:"fromAddress,omitempty"` + // A blockchain address. + ToAddress *string `json:"toAddress,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerAction instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerStepsInnerAction() *GetRoutes200ResponseRoutesInnerStepsInnerAction { + this := GetRoutes200ResponseRoutesInnerStepsInnerAction{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerAction { + this := GetRoutes200ResponseRoutesInnerStepsInnerAction{} + return &this +} + +// GetFromToken returns the FromToken field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.FromToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.FromToken +} + +// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.FromToken) { + return nil, false + } + return o.FromToken, true +} + +// HasFromToken returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromToken() bool { + if o != nil && !IsNil(o.FromToken) { + return true + } + + return false +} + +// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.FromToken = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetToToken returns the ToToken field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.ToToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.ToToken +} + +// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.ToToken) { + return nil, false + } + return o.ToToken, true +} + +// HasToToken returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToToken() bool { + if o != nil && !IsNil(o.ToToken) { + return true + } + + return false +} + +// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.ToToken = &v +} + +// GetSlippage returns the Slippage field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippage() float32 { + if o == nil || IsNil(o.Slippage) { + var ret float32 + return ret + } + return *o.Slippage +} + +// GetSlippageOk returns a tuple with the Slippage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippageOk() (*float32, bool) { + if o == nil || IsNil(o.Slippage) { + return nil, false + } + return o.Slippage, true +} + +// HasSlippage returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasSlippage() bool { + if o != nil && !IsNil(o.Slippage) { + return true + } + + return false +} + +// SetSlippage gets a reference to the given float32 and assigns it to the Slippage field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetSlippage(v float32) { + o.Slippage = &v +} + +// GetFromAddress returns the FromAddress field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddress() string { + if o == nil || IsNil(o.FromAddress) { + var ret string + return ret + } + return *o.FromAddress +} + +// GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddressOk() (*string, bool) { + if o == nil || IsNil(o.FromAddress) { + return nil, false + } + return o.FromAddress, true +} + +// HasFromAddress returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAddress() bool { + if o != nil && !IsNil(o.FromAddress) { + return true + } + + return false +} + +// SetFromAddress gets a reference to the given string and assigns it to the FromAddress field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAddress(v string) { + o.FromAddress = &v +} + +// GetToAddress returns the ToAddress field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddress() string { + if o == nil || IsNil(o.ToAddress) { + var ret string + return ret + } + return *o.ToAddress +} + +// GetToAddressOk returns a tuple with the ToAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddressOk() (*string, bool) { + if o == nil || IsNil(o.ToAddress) { + return nil, false + } + return o.ToAddress, true +} + +// HasToAddress returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToAddress() bool { + if o != nil && !IsNil(o.ToAddress) { + return true + } + + return false +} + +// SetToAddress gets a reference to the given string and assigns it to the ToAddress field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToAddress(v string) { + o.ToAddress = &v +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerAction) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerAction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FromToken) { + toSerialize["fromToken"] = o.FromToken + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.ToToken) { + toSerialize["toToken"] = o.ToToken + } + if !IsNil(o.Slippage) { + toSerialize["slippage"] = o.Slippage + } + if !IsNil(o.FromAddress) { + toSerialize["fromAddress"] = o.FromAddress + } + if !IsNil(o.ToAddress) { + toSerialize["toAddress"] = o.ToAddress + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerStepsInnerAction struct { + value *GetRoutes200ResponseRoutesInnerStepsInnerAction + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) Get() *GetRoutes200ResponseRoutesInnerStepsInnerAction { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerAction) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerAction(val *GetRoutes200ResponseRoutesInnerStepsInnerAction) *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction { + return &NullableGetRoutes200ResponseRoutesInnerStepsInnerAction{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_health_check_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_health_check_response.go new file mode 100644 index 0000000000..439a89681c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_health_check_response.go @@ -0,0 +1,126 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the HealthCheckResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckResponse{} + +// HealthCheckResponse struct for HealthCheckResponse +type HealthCheckResponse struct { + Status *string `json:"status,omitempty"` +} + +// NewHealthCheckResponse instantiates a new HealthCheckResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHealthCheckResponse() *HealthCheckResponse { + this := HealthCheckResponse{} + return &this +} + +// NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHealthCheckResponseWithDefaults() *HealthCheckResponse { + this := HealthCheckResponse{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthCheckResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *HealthCheckResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *HealthCheckResponse) SetStatus(v string) { + o.Status = &v +} + +func (o HealthCheckResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableHealthCheckResponse struct { + value *HealthCheckResponse + isSet bool +} + +func (v NullableHealthCheckResponse) Get() *HealthCheckResponse { + return v.value +} + +func (v *NullableHealthCheckResponse) Set(val *HealthCheckResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckResponse(val *HealthCheckResponse) *NullableHealthCheckResponse { + return &NullableHealthCheckResponse{value: val, isSet: true} +} + +func (v NullableHealthCheckResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_200_response.go new file mode 100644 index 0000000000..f8caa99058 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_200_response.go @@ -0,0 +1,117 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Pause200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pause200Response{} + +// Pause200Response Response for a pause transaction request. Returns the current status of the SATP session post-pause action. +type Pause200Response struct { + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` +} + +// NewPause200Response instantiates a new Pause200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPause200Response(statusResponse Transact200ResponseStatusResponse) *Pause200Response { + this := Pause200Response{} + this.StatusResponse = statusResponse + return &this +} + +// NewPause200ResponseWithDefaults instantiates a new Pause200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPause200ResponseWithDefaults() *Pause200Response { + this := Pause200Response{} + return &this +} + +// GetStatusResponse returns the StatusResponse field value +func (o *Pause200Response) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *Pause200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *Pause200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +func (o Pause200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pause200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statusResponse"] = o.StatusResponse + return toSerialize, nil +} + +type NullablePause200Response struct { + value *Pause200Response + isSet bool +} + +func (v NullablePause200Response) Get() *Pause200Response { + return v.value +} + +func (v *NullablePause200Response) Set(val *Pause200Response) { + v.value = val + v.isSet = true +} + +func (v NullablePause200Response) IsSet() bool { + return v.isSet +} + +func (v *NullablePause200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePause200Response(val *Pause200Response) *NullablePause200Response { + return &NullablePause200Response{value: val, isSet: true} +} + +func (v NullablePause200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePause200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_request.go new file mode 100644 index 0000000000..ca3360617b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_request.go @@ -0,0 +1,162 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the PauseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PauseRequest{} + +// PauseRequest Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. +type PauseRequest struct { + SessionId *string `json:"sessionId,omitempty"` + ContextId *string `json:"contextId,omitempty"` +} + +// NewPauseRequest instantiates a new PauseRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPauseRequest() *PauseRequest { + this := PauseRequest{} + return &this +} + +// NewPauseRequestWithDefaults instantiates a new PauseRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPauseRequestWithDefaults() *PauseRequest { + this := PauseRequest{} + return &this +} + +// GetSessionId returns the SessionId field value if set, zero value otherwise. +func (o *PauseRequest) GetSessionId() string { + if o == nil || IsNil(o.SessionId) { + var ret string + return ret + } + return *o.SessionId +} + +// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PauseRequest) GetSessionIdOk() (*string, bool) { + if o == nil || IsNil(o.SessionId) { + return nil, false + } + return o.SessionId, true +} + +// HasSessionId returns a boolean if a field has been set. +func (o *PauseRequest) HasSessionId() bool { + if o != nil && !IsNil(o.SessionId) { + return true + } + + return false +} + +// SetSessionId gets a reference to the given string and assigns it to the SessionId field. +func (o *PauseRequest) SetSessionId(v string) { + o.SessionId = &v +} + +// GetContextId returns the ContextId field value if set, zero value otherwise. +func (o *PauseRequest) GetContextId() string { + if o == nil || IsNil(o.ContextId) { + var ret string + return ret + } + return *o.ContextId +} + +// GetContextIdOk returns a tuple with the ContextId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PauseRequest) GetContextIdOk() (*string, bool) { + if o == nil || IsNil(o.ContextId) { + return nil, false + } + return o.ContextId, true +} + +// HasContextId returns a boolean if a field has been set. +func (o *PauseRequest) HasContextId() bool { + if o != nil && !IsNil(o.ContextId) { + return true + } + + return false +} + +// SetContextId gets a reference to the given string and assigns it to the ContextId field. +func (o *PauseRequest) SetContextId(v string) { + o.ContextId = &v +} + +func (o PauseRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PauseRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SessionId) { + toSerialize["sessionId"] = o.SessionId + } + if !IsNil(o.ContextId) { + toSerialize["contextId"] = o.ContextId + } + return toSerialize, nil +} + +type NullablePauseRequest struct { + value *PauseRequest + isSet bool +} + +func (v NullablePauseRequest) Get() *PauseRequest { + return v.value +} + +func (v *NullablePauseRequest) Set(val *PauseRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePauseRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePauseRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePauseRequest(val *PauseRequest) *NullablePauseRequest { + return &NullablePauseRequest{value: val, isSet: true} +} + +func (v NullablePauseRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePauseRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_response.go new file mode 100644 index 0000000000..7735d228c9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_response.go @@ -0,0 +1,117 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the PauseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PauseResponse{} + +// PauseResponse Response for a pause transaction request. Returns the current status of the SATP session post-pause action. +type PauseResponse struct { + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` +} + +// NewPauseResponse instantiates a new PauseResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPauseResponse(statusResponse Transact200ResponseStatusResponse) *PauseResponse { + this := PauseResponse{} + this.StatusResponse = statusResponse + return &this +} + +// NewPauseResponseWithDefaults instantiates a new PauseResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPauseResponseWithDefaults() *PauseResponse { + this := PauseResponse{} + return &this +} + +// GetStatusResponse returns the StatusResponse field value +func (o *PauseResponse) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *PauseResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *PauseResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +func (o PauseResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PauseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statusResponse"] = o.StatusResponse + return toSerialize, nil +} + +type NullablePauseResponse struct { + value *PauseResponse + isSet bool +} + +func (v NullablePauseResponse) Get() *PauseResponse { + return v.value +} + +func (v *NullablePauseResponse) Set(val *PauseResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePauseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePauseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePauseResponse(val *PauseResponse) *NullablePauseResponse { + return &NullablePauseResponse{value: val, isSet: true} +} + +func (v NullablePauseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePauseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_destination_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_destination_chain.go new file mode 100644 index 0000000000..44c5b50c76 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_destination_chain.go @@ -0,0 +1,164 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Transact200ResponseStatusResponseDestinationChain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Transact200ResponseStatusResponseDestinationChain{} + +// Transact200ResponseStatusResponseDestinationChain struct for Transact200ResponseStatusResponseDestinationChain +type Transact200ResponseStatusResponseDestinationChain struct { + DltProtocol interface{} `json:"dltProtocol,omitempty"` + DltSubnetworkID interface{} `json:"dltSubnetworkID,omitempty"` +} + +// NewTransact200ResponseStatusResponseDestinationChain instantiates a new Transact200ResponseStatusResponseDestinationChain object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransact200ResponseStatusResponseDestinationChain() *Transact200ResponseStatusResponseDestinationChain { + this := Transact200ResponseStatusResponseDestinationChain{} + return &this +} + +// NewTransact200ResponseStatusResponseDestinationChainWithDefaults instantiates a new Transact200ResponseStatusResponseDestinationChain object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransact200ResponseStatusResponseDestinationChainWithDefaults() *Transact200ResponseStatusResponseDestinationChain { + this := Transact200ResponseStatusResponseDestinationChain{} + return &this +} + +// GetDltProtocol returns the DltProtocol field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocol() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DltProtocol +} + +// GetDltProtocolOk returns a tuple with the DltProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocolOk() (*interface{}, bool) { + if o == nil || IsNil(o.DltProtocol) { + return nil, false + } + return &o.DltProtocol, true +} + +// HasDltProtocol returns a boolean if a field has been set. +func (o *Transact200ResponseStatusResponseDestinationChain) HasDltProtocol() bool { + if o != nil && IsNil(o.DltProtocol) { + return true + } + + return false +} + +// SetDltProtocol gets a reference to the given interface{} and assigns it to the DltProtocol field. +func (o *Transact200ResponseStatusResponseDestinationChain) SetDltProtocol(v interface{}) { + o.DltProtocol = v +} + +// GetDltSubnetworkID returns the DltSubnetworkID field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkID() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DltSubnetworkID +} + +// GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkIDOk() (*interface{}, bool) { + if o == nil || IsNil(o.DltSubnetworkID) { + return nil, false + } + return &o.DltSubnetworkID, true +} + +// HasDltSubnetworkID returns a boolean if a field has been set. +func (o *Transact200ResponseStatusResponseDestinationChain) HasDltSubnetworkID() bool { + if o != nil && IsNil(o.DltSubnetworkID) { + return true + } + + return false +} + +// SetDltSubnetworkID gets a reference to the given interface{} and assigns it to the DltSubnetworkID field. +func (o *Transact200ResponseStatusResponseDestinationChain) SetDltSubnetworkID(v interface{}) { + o.DltSubnetworkID = v +} + +func (o Transact200ResponseStatusResponseDestinationChain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Transact200ResponseStatusResponseDestinationChain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DltProtocol != nil { + toSerialize["dltProtocol"] = o.DltProtocol + } + if o.DltSubnetworkID != nil { + toSerialize["dltSubnetworkID"] = o.DltSubnetworkID + } + return toSerialize, nil +} + +type NullableTransact200ResponseStatusResponseDestinationChain struct { + value *Transact200ResponseStatusResponseDestinationChain + isSet bool +} + +func (v NullableTransact200ResponseStatusResponseDestinationChain) Get() *Transact200ResponseStatusResponseDestinationChain { + return v.value +} + +func (v *NullableTransact200ResponseStatusResponseDestinationChain) Set(val *Transact200ResponseStatusResponseDestinationChain) { + v.value = val + v.isSet = true +} + +func (v NullableTransact200ResponseStatusResponseDestinationChain) IsSet() bool { + return v.isSet +} + +func (v *NullableTransact200ResponseStatusResponseDestinationChain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransact200ResponseStatusResponseDestinationChain(val *Transact200ResponseStatusResponseDestinationChain) *NullableTransact200ResponseStatusResponseDestinationChain { + return &NullableTransact200ResponseStatusResponseDestinationChain{value: val, isSet: true} +} + +func (v NullableTransact200ResponseStatusResponseDestinationChain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransact200ResponseStatusResponseDestinationChain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_origin_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_origin_chain.go new file mode 100644 index 0000000000..c3429547bf --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_origin_chain.go @@ -0,0 +1,164 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Transact200ResponseStatusResponseOriginChain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Transact200ResponseStatusResponseOriginChain{} + +// Transact200ResponseStatusResponseOriginChain struct for Transact200ResponseStatusResponseOriginChain +type Transact200ResponseStatusResponseOriginChain struct { + DltProtocol interface{} `json:"dltProtocol,omitempty"` + DltSubnetworkID interface{} `json:"dltSubnetworkID,omitempty"` +} + +// NewTransact200ResponseStatusResponseOriginChain instantiates a new Transact200ResponseStatusResponseOriginChain object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransact200ResponseStatusResponseOriginChain() *Transact200ResponseStatusResponseOriginChain { + this := Transact200ResponseStatusResponseOriginChain{} + return &this +} + +// NewTransact200ResponseStatusResponseOriginChainWithDefaults instantiates a new Transact200ResponseStatusResponseOriginChain object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransact200ResponseStatusResponseOriginChainWithDefaults() *Transact200ResponseStatusResponseOriginChain { + this := Transact200ResponseStatusResponseOriginChain{} + return &this +} + +// GetDltProtocol returns the DltProtocol field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocol() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DltProtocol +} + +// GetDltProtocolOk returns a tuple with the DltProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocolOk() (*interface{}, bool) { + if o == nil || IsNil(o.DltProtocol) { + return nil, false + } + return &o.DltProtocol, true +} + +// HasDltProtocol returns a boolean if a field has been set. +func (o *Transact200ResponseStatusResponseOriginChain) HasDltProtocol() bool { + if o != nil && IsNil(o.DltProtocol) { + return true + } + + return false +} + +// SetDltProtocol gets a reference to the given interface{} and assigns it to the DltProtocol field. +func (o *Transact200ResponseStatusResponseOriginChain) SetDltProtocol(v interface{}) { + o.DltProtocol = v +} + +// GetDltSubnetworkID returns the DltSubnetworkID field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkID() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DltSubnetworkID +} + +// GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkIDOk() (*interface{}, bool) { + if o == nil || IsNil(o.DltSubnetworkID) { + return nil, false + } + return &o.DltSubnetworkID, true +} + +// HasDltSubnetworkID returns a boolean if a field has been set. +func (o *Transact200ResponseStatusResponseOriginChain) HasDltSubnetworkID() bool { + if o != nil && IsNil(o.DltSubnetworkID) { + return true + } + + return false +} + +// SetDltSubnetworkID gets a reference to the given interface{} and assigns it to the DltSubnetworkID field. +func (o *Transact200ResponseStatusResponseOriginChain) SetDltSubnetworkID(v interface{}) { + o.DltSubnetworkID = v +} + +func (o Transact200ResponseStatusResponseOriginChain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Transact200ResponseStatusResponseOriginChain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DltProtocol != nil { + toSerialize["dltProtocol"] = o.DltProtocol + } + if o.DltSubnetworkID != nil { + toSerialize["dltSubnetworkID"] = o.DltSubnetworkID + } + return toSerialize, nil +} + +type NullableTransact200ResponseStatusResponseOriginChain struct { + value *Transact200ResponseStatusResponseOriginChain + isSet bool +} + +func (v NullableTransact200ResponseStatusResponseOriginChain) Get() *Transact200ResponseStatusResponseOriginChain { + return v.value +} + +func (v *NullableTransact200ResponseStatusResponseOriginChain) Set(val *Transact200ResponseStatusResponseOriginChain) { + v.value = val + v.isSet = true +} + +func (v NullableTransact200ResponseStatusResponseOriginChain) IsSet() bool { + return v.isSet +} + +func (v *NullableTransact200ResponseStatusResponseOriginChain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransact200ResponseStatusResponseOriginChain(val *Transact200ResponseStatusResponseOriginChain) *NullableTransact200ResponseStatusResponseOriginChain { + return &NullableTransact200ResponseStatusResponseOriginChain{value: val, isSet: true} +} + +func (v NullableTransact200ResponseStatusResponseOriginChain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransact200ResponseStatusResponseOriginChain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go new file mode 100644 index 0000000000..2c39e87f1c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go @@ -0,0 +1,37 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +Testing ChainsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_generated_ChainsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ChainsApiService GetChains", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ChainsApi.GetChains(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json new file mode 100644 index 0000000000..3d121dfd3f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json @@ -0,0 +1,6114 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "SATP Gateway Client (Business Logic Orchestrator)", + "version": "0.0.2", + "description": "SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability.\n\nThis API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification.\n\n**Additional Resources**:\n- [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/)\n- [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core)\n- [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/)\n- [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/)\n- [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/)\n- [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing)\n- [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses)", + "contact": { + "name": "Hyperledger Cacti" + }, + "x-logo": { + "altText": "Cacti logo", + "backgroundColor": "#fafafa", + "url": "https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png" + } + }, + "externalDocs": { + "description": "For more information about the SATP Gateway Client, refer to the official documentation.", + "url": "https://github.com/hyperledger/cacti/tree/main/packages/cactus-plugin-satp-hermes/README.md" + }, + "servers": [ + { + "url": "http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes", + "description": "Development server", + "variables": { + "host": { + "default": "localhost" + }, + "port": { + "default": "3011" + } + } + } + ], + "tags": [ + { + "name": "transaction", + "description": "API endpoints for interacting with blockchains via gateways" + }, + { + "name": "admin", + "description": "API endpoints for fetching information on SATP sessions" + } + ], + "paths": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact": { + "post": { + "tags": [ + "transaction" + ], + "summary": "Submit a transaction intent", + "description": "Allows users to queue intents for transactions based on specified parameters.", + "operationId": "Transact", + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks.", + "type": "object", + "required": [ + "contextID", + "mode" + ], + "properties": { + "contextID": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "mode": { + "type": "string", + "enum": [ + "data", + "transfer" + ], + "example": "transfer" + }, + "payload": { + "type": "string", + "example": "{\"data\":\"example payload\"}" + }, + "fromDLTNetworkID": { + "type": "string", + "example": "network1" + }, + "toDLTNetworkID": { + "type": "string", + "example": "network2" + }, + "fromAmount": { + "type": "string", + "example": "100" + }, + "fromToken": { + "type": "string", + "example": "TOKEN1" + }, + "toAmount": { + "type": "string", + "example": "95" + }, + "toToken": { + "type": "string", + "example": "TOKEN2" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Transaction successfully queued", + "content": { + "application/json": { + "schema": { + "description": "Response schema for a transaction request. Includes the session ID and the current status of the transaction.", + "type": "object", + "properties": { + "sessionID": { + "x-category": "satp-core", + "type": "string", + "description": "Unique identifier (UUID) for the session.", + "example": "000003e8-e0b8-21ee-ba00-325096b39f47" + }, + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + }, + "required": [ + "sessionID", + "statusResponse" + ] + } + } + } + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel": { + "post": { + "tags": [ + "transaction" + ], + "summary": "Cancel a transaction session", + "description": "Attempts to cancel a previously submitted transaction intent using its session ID.", + "operationId": "Cancel", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Request to cancel an ongoing transaction session, identified by the session ID.", + "type": "object", + "properties": { + "sessionID": { + "x-category": "satp-core", + "type": "string", + "description": "Unique identifier (UUID) for the session.", + "example": "000003e8-e0b8-21ee-ba00-325096b39f47" + } + }, + "required": [ + "sessionID" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Transaction cancellation attempted", + "content": { + "application/json": { + "schema": { + "description": "Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status.", + "type": "object", + "properties": { + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + }, + "cancelSuccessful": { + "type": "boolean", + "description": "Indicates whether the cancel operation was successful.", + "example": true + } + }, + "required": [ + "statusResponse", + "cancelSuccessful" + ] + } + } + } + }, + "default": { + "description": "An error occurred or transaction cannot be cancelled", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/status": { + "get": { + "summary": "Get SATP current session data", + "description": "Retrieve the status of a SATP session", + "operationId": "GetStatus", + "tags": [ + "admin" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/status" + } + }, + "parameters": [ + { + "name": "SessionID", + "in": "query", + "schema": { + "x-category": "satp-core", + "type": "string", + "description": "Unique identifier (UUID) for the session.", + "example": "000003e8-e0b8-21ee-ba00-325096b39f47" + }, + "required": true, + "description": "Unique identifier for the session." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck": { + "get": { + "summary": "Health check endpoint", + "description": "Responds if SATP Hermes is on", + "operationId": "GetHealthCheck", + "tags": [ + "admin" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "OK" + } + } + } + } + } + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue": { + "post": { + "tags": [ + "admin" + ], + "summary": "Continue a paused transaction session", + "description": "Attempts to continue a previously paused transaction intent, resuming its execution.", + "operationId": "Continue", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the transaction session to be continued." + }, + "contextId": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the transaction context." + } + }, + "required": [ + "sessionId", + "contextId" + ], + "description": "Schema for a request to continue a paused transaction session." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Transaction continuation attempted", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Response schema for a continue request, returning the status of the SATP session.", + "properties": { + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + }, + "required": [ + "statusResponse" + ] + } + } + } + }, + "default": { + "description": "An error occurred or transaction cannot be continued", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause": { + "post": { + "tags": [ + "admin" + ], + "summary": "Pause a transaction session", + "description": "Attempts to pause a previously submitted transaction intent, temporarily halting its execution.", + "operationId": "Pause", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Request to temporarily pause an ongoing transaction session, identified by the session and context IDs.", + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "contextId": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174001" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Transaction pause attempted", + "content": { + "application/json": { + "schema": { + "description": "Response for a pause transaction request. Returns the current status of the SATP session post-pause action.", + "type": "object", + "properties": { + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + }, + "required": [ + "statusResponse" + ] + } + } + } + }, + "default": { + "description": "An error occurred or transaction cannot be paused", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations": { + "get": { + "tags": [ + "transaction" + ], + "summary": "Get supported integrations", + "description": "Retrieves metadata about each supported blockchain networks, chains, and other systems.", + "operationId": "GetIntegrations", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations" + } + }, + "responses": { + "200": { + "description": "A list of supported systems.", + "content": { + "application/json": { + "schema": { + "title": "Chains", + "type": "array", + "description": "List of chains and related metadata", + "items": { + "type": "object", + "properties": { + "chainId": { + "type": "string", + "description": "A unique identifier for the blockchain network." + }, + "chainName": { + "type": "string", + "description": "The name of the blockchain network." + }, + "chainType": { + "type": "string", + "description": "The type of blockchain network (e.g., 'evm', 'fabric')." + }, + "networkName": { + "type": "string", + "description": "The specific network name within the blockchain (e.g., 'mainnet', 'testnet')." + } + }, + "required": [ + "chainId", + "chainName", + "chainType", + "networkName" + ] + } + } + } + } + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes": { + "get": { + "description": "Get a list of possible routes for swapping one asset for another across multiple exchanges", + "summary": "Get a list of routes for a gateway-to-gateway asset transfer", + "tags": [ + "transaction" + ], + "operationId": "GetRoutes", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes" + } + }, + "parameters": [ + { + "name": "fromNetworkID", + "in": "query", + "schema": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "required": true, + "description": "The sending DLT Network." + }, + { + "name": "fromAmount", + "in": "query", + "schema": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "required": true, + "description": "The amount that should be sent including all decimals." + }, + { + "name": "fromToken", + "in": "query", + "schema": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "required": true, + "description": "The token that should be transferred. Can be the address or the symbol." + }, + { + "name": "toDLTNetwork", + "in": "query", + "schema": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "required": true, + "description": "The receiving DLT Network." + }, + { + "name": "toToken", + "in": "query", + "schema": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "required": true, + "description": "The token that should be transferred to. Can be the address or the symbol." + }, + { + "name": "fromAddress", + "in": "query", + "schema": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "required": true, + "description": "The sending wallet address." + }, + { + "name": "toAddress", + "in": "query", + "schema": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "required": true, + "description": "The receiving wallet address. If none is provided, the fromAddress will be used." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "A collection of available and unavailable routes", + "required": [ + "routes" + ], + "properties": { + "routes": { + "type": "array", + "description": "A collection of route objects", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of the route." + }, + "gatewayID": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the gateway." + }, + "mode": { + "type": "string", + "enum": [ + "data", + "transfer" + ], + "description": "The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer." + }, + "fromDLTNetworkID": { + "type": "string", + "description": "The ID of the DLT Network where the operation will originate." + }, + "fromAmountUSD": { + "type": "string", + "format": "double", + "description": "The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision." + }, + "fromAmount": { + "type": "string", + "description": "The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).", + "pattern": "^[1-9][0-9]*$" + }, + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "toDLTNetworkID": { + "type": "string", + "description": "The ID of the DLT Network where the operation will end." + }, + "toAmountUSD": { + "type": "string", + "description": "The expected amount to be received in USD." + }, + "toAmount": { + "type": "string", + "description": "The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals))." + }, + "toAmountMin": { + "type": "string", + "description": "The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals))." + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "gasCostUSD": { + "type": "string", + "description": "The expected gas cost in USD." + }, + "containsSwitchChain": { + "type": "boolean", + "description": "Whether chain switching is enabled or not." + }, + "steps": { + "type": "array", + "description": "List of steps involved in this route, adjusted for mode.", + "items": { + "type": "object", + "description": "Details a single step within a route including actions and estimates.", + "properties": { + "id": { + "type": "string", + "description": "Id of the step" + }, + "type": { + "type": "string", + "description": "Type of the step, typically describing the action, e.g., 'swap'." + }, + "tool": { + "type": "string", + "description": "Tool used in the step, e.g., 'stargate'." + }, + "action": { + "type": "object", + "properties": { + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "fromAmount": { + "type": "string", + "description": "The amount of 'fromToken' to be transferred, specified as a string to maintain precision.", + "example": "1000000000000000000", + "pattern": "^[1-9][0-9]*$" + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "slippage": { + "type": "number", + "format": "float", + "description": "The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer.", + "example": 0.005 + }, + "fromAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + } + } + }, + "estimate": { + "type": "object", + "description": "Provides an estimation for a transaction, including costs, amounts, and execution duration.", + "properties": { + "approvalAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAmountMin": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "fromAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "feeCosts": { + "type": "array", + "description": "A collection of fee costs associated with the transaction.", + "items": { + "type": "object", + "description": "Details about a specific fee cost associated with the transaction.", + "properties": { + "name": { + "type": "string", + "description": "Name of the fee cost.", + "example": "Network Fee" + }, + "amount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "amountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "token": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "included": { + "type": "boolean", + "description": "Indicates if the fee is included in the transaction amount." + } + } + } + }, + "gasCosts": { + "type": "array", + "description": "A collection of estimated gas costs for executing the transaction.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the gas cost.", + "example": "SEND" + }, + "price": { + "type": "string", + "description": "The gas price, specified as a string to maintain precision.", + "example": "19236858243" + }, + "estimate": { + "type": "string", + "description": "The estimated gas required, specified as a string to maintain precision.", + "example": "445393" + }, + "limit": { + "type": "string", + "description": "The gas limit for the transaction, specified as a string to maintain precision.", + "example": "579011", + "pattern": "^[1-9][0-9]*$" + }, + "amount": { + "type": "string", + "description": "The amount of gas required in the gas currency.", + "example": "8567962003424499", + "pattern": "^[1-9][0-9]*$" + }, + "amountUSD": { + "type": "string", + "description": "The amount of gas required in USD.", + "example": "16.05", + "pattern": "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + }, + "token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + } + } + } + }, + "executionDuration": { + "type": "integer", + "description": "The estimated duration for the transaction execution in seconds.", + "example": 30 + }, + "fromAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "tool": { + "type": "string", + "description": "The tool or service used to generate this estimate.", + "example": "satp" + } + } + }, + "toolDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "integrationDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "includedStepIds": { + "type": "array", + "description": "IDs of further steps included within this step, allowing for nested actions without direct recursion.", + "items": { + "type": "string" + } + } + } + } + }, + "insurance": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "The state of insurance applicability for the transaction.", + "example": "NOT_INSURABLE", + "enum": [ + "NOT_INSURABLE", + "INSURABLE", + "INSURED" + ] + }, + "feeAmountUsd": { + "type": "string", + "description": "The fee amount for insurance, represented in USD.", + "example": "10.00", + "pattern": "^(0|[1-9]\\d*)(\\.\\d+)?$" + } + } + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + } + }, + "required": [ + "id", + "gatewayID", + "mode" + ] + } + } + } + } + } + } + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit": { + "get": { + "tags": [ + "admin" + ], + "summary": "Audit transactions", + "description": "Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction.", + "operationId": "GetAudit", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit" + } + }, + "parameters": [ + { + "name": "auditStartDate", + "in": "query", + "description": "The start date for the audit period.", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "auditEndDate", + "in": "query", + "description": "The end date for the audit period.", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "includeProofs", + "in": "query", + "description": "Include proofs generated from each gateway transaction.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Audit results", + "content": { + "application/json": { + "schema": { + "description": "Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes.", + "type": "object", + "x-category": "response", + "properties": { + "proofs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of strings representing proofs.", + "example": [ + "proof1", + "proof2" + ] + }, + "auditStartTime": { + "type": "string", + "format": "date-time", + "description": "The start datetime of the audit period.", + "example": "2023-01-01T00:00:00Z" + }, + "auditEndTime": { + "type": "string", + "format": "date-time", + "description": "The end datetime of the audit period.", + "example": "2023-01-31T23:59:59Z" + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AuthzScope": { + "type": "string", + "enum": [ + "group:admin", + "group:user" + ], + "x-enum-descriptions": [ + "Identities with the group:admin scope are administrators of the system.", + "Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions." + ], + "x-enum-varnames": [ + "GroupAdmin", + "GroupUser" + ], + "example": "group:admin" + }, + "AuthzJwtClaim": { + "description": "Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1", + "type": "string", + "enum": [ + "Hyperledger Labs - Carbon Accounting Tool" + ], + "x-enum-descriptions": [ + "The \"iss\" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The \"iss\" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL." + ], + "x-enum-varnames": [ + "iss" + ], + "example": "Hyperledger Labs - Carbon Accounting Tool" + }, + "CredentialProfile": { + "type": "string", + "enum": [ + "SAML", + "OAUTH", + "X509" + ], + "example": "OAUTH" + }, + "getAuditRequest": { + "description": "Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs.", + "type": "object", + "x-category": "request", + "properties": { + "auditStartDate": { + "type": "string", + "format": "date-time", + "description": "The start datetime for the audit.", + "example": "2023-01-01T00:00:00Z" + }, + "auditEndDate": { + "type": "string", + "format": "date-time", + "description": "The end datetime for the audit.", + "example": "2023-01-31T23:59:59Z" + }, + "includeProofs": { + "type": "boolean", + "description": "Include proofs generated from each gateway transaction.", + "example": true + } + } + }, + "getAuditResponse": { + "description": "Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes.", + "type": "object", + "x-category": "response", + "properties": { + "proofs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of strings representing proofs.", + "example": [ + "proof1", + "proof2" + ] + }, + "auditStartTime": { + "type": "string", + "format": "date-time", + "description": "The start datetime of the audit period.", + "example": "2023-01-01T00:00:00Z" + }, + "auditEndTime": { + "type": "string", + "format": "date-time", + "description": "The end datetime of the audit period.", + "example": "2023-01-31T23:59:59Z" + } + } + }, + "StatusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + }, + "PauseRequest": { + "description": "Request to temporarily pause an ongoing transaction session, identified by the session and context IDs.", + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "contextId": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174001" + } + } + }, + "PauseResponse": { + "description": "Response for a pause transaction request. Returns the current status of the SATP session post-pause action.", + "type": "object", + "properties": { + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + }, + "required": [ + "statusResponse" + ] + }, + "StatusRequest": { + "description": "Request for retrieving the current status of a session, identified by the session ID.", + "type": "object", + "x-category": "request", + "required": [ + "sessionID" + ], + "properties": { + "sessionID": { + "type": "string", + "description": "The ID of the session for which the status is being requested." + } + }, + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "TransactRequest": { + "description": "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks.", + "type": "object", + "required": [ + "contextID", + "mode" + ], + "properties": { + "contextID": { + "type": "string", + "format": "uuid", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "mode": { + "type": "string", + "enum": [ + "data", + "transfer" + ], + "example": "transfer" + }, + "payload": { + "type": "string", + "example": "{\"data\":\"example payload\"}" + }, + "fromDLTNetworkID": { + "type": "string", + "example": "network1" + }, + "toDLTNetworkID": { + "type": "string", + "example": "network2" + }, + "fromAmount": { + "type": "string", + "example": "100" + }, + "fromToken": { + "type": "string", + "example": "TOKEN1" + }, + "toAmount": { + "type": "string", + "example": "95" + }, + "toToken": { + "type": "string", + "example": "TOKEN2" + } + } + }, + "TransactResponse": { + "description": "Response schema for a transaction request. Includes the session ID and the current status of the transaction.", + "type": "object", + "properties": { + "sessionID": { + "x-category": "satp-core", + "type": "string", + "description": "Unique identifier (UUID) for the session.", + "example": "000003e8-e0b8-21ee-ba00-325096b39f47" + }, + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + }, + "required": [ + "sessionID", + "statusResponse" + ] + }, + "CancelRequest": { + "description": "Request to cancel an ongoing transaction session, identified by the session ID.", + "type": "object", + "properties": { + "sessionID": { + "x-category": "satp-core", + "type": "string", + "description": "Unique identifier (UUID) for the session.", + "example": "000003e8-e0b8-21ee-ba00-325096b39f47" + } + }, + "required": [ + "sessionID" + ] + }, + "CancelResponse": { + "description": "Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status.", + "type": "object", + "properties": { + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + }, + "cancelSuccessful": { + "type": "boolean", + "description": "Indicates whether the cancel operation was successful.", + "example": true + } + }, + "required": [ + "statusResponse", + "cancelSuccessful" + ] + }, + "APIError": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + }, + "DLTProtocol": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "DLTNetworkID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "DLTSubnetworkID": { + "x-category": "satp-core", + "type": "string", + "description": "The subnetwork of the DLT being interacted with. TODO: implement network identification draft" + }, + "SessionID": { + "x-category": "satp-core", + "type": "string", + "description": "Unique identifier (UUID) for the session.", + "example": "000003e8-e0b8-21ee-ba00-325096b39f47" + }, + "Address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "AmountString": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "AmountDecimal": { + "type": "number", + "format": "float", + "description": "Amount value with decimal places", + "example": 100.33 + }, + "TokenSymbol": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "LogoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "RoutesResponse": { + "type": "object", + "description": "A collection of available and unavailable routes", + "required": [ + "routes" + ], + "properties": { + "routes": { + "type": "array", + "description": "A collection of route objects", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of the route." + }, + "gatewayID": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the gateway." + }, + "mode": { + "type": "string", + "enum": [ + "data", + "transfer" + ], + "description": "The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer." + }, + "fromDLTNetworkID": { + "type": "string", + "description": "The ID of the DLT Network where the operation will originate." + }, + "fromAmountUSD": { + "type": "string", + "format": "double", + "description": "The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision." + }, + "fromAmount": { + "type": "string", + "description": "The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).", + "pattern": "^[1-9][0-9]*$" + }, + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "toDLTNetworkID": { + "type": "string", + "description": "The ID of the DLT Network where the operation will end." + }, + "toAmountUSD": { + "type": "string", + "description": "The expected amount to be received in USD." + }, + "toAmount": { + "type": "string", + "description": "The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals))." + }, + "toAmountMin": { + "type": "string", + "description": "The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals))." + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "gasCostUSD": { + "type": "string", + "description": "The expected gas cost in USD." + }, + "containsSwitchChain": { + "type": "boolean", + "description": "Whether chain switching is enabled or not." + }, + "steps": { + "type": "array", + "description": "List of steps involved in this route, adjusted for mode.", + "items": { + "type": "object", + "description": "Details a single step within a route including actions and estimates.", + "properties": { + "id": { + "type": "string", + "description": "Id of the step" + }, + "type": { + "type": "string", + "description": "Type of the step, typically describing the action, e.g., 'swap'." + }, + "tool": { + "type": "string", + "description": "Tool used in the step, e.g., 'stargate'." + }, + "action": { + "type": "object", + "properties": { + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "fromAmount": { + "type": "string", + "description": "The amount of 'fromToken' to be transferred, specified as a string to maintain precision.", + "example": "1000000000000000000", + "pattern": "^[1-9][0-9]*$" + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "slippage": { + "type": "number", + "format": "float", + "description": "The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer.", + "example": 0.005 + }, + "fromAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + } + } + }, + "estimate": { + "type": "object", + "description": "Provides an estimation for a transaction, including costs, amounts, and execution duration.", + "properties": { + "approvalAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAmountMin": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "fromAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "feeCosts": { + "type": "array", + "description": "A collection of fee costs associated with the transaction.", + "items": { + "type": "object", + "description": "Details about a specific fee cost associated with the transaction.", + "properties": { + "name": { + "type": "string", + "description": "Name of the fee cost.", + "example": "Network Fee" + }, + "amount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "amountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "token": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "included": { + "type": "boolean", + "description": "Indicates if the fee is included in the transaction amount." + } + } + } + }, + "gasCosts": { + "type": "array", + "description": "A collection of estimated gas costs for executing the transaction.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the gas cost.", + "example": "SEND" + }, + "price": { + "type": "string", + "description": "The gas price, specified as a string to maintain precision.", + "example": "19236858243" + }, + "estimate": { + "type": "string", + "description": "The estimated gas required, specified as a string to maintain precision.", + "example": "445393" + }, + "limit": { + "type": "string", + "description": "The gas limit for the transaction, specified as a string to maintain precision.", + "example": "579011", + "pattern": "^[1-9][0-9]*$" + }, + "amount": { + "type": "string", + "description": "The amount of gas required in the gas currency.", + "example": "8567962003424499", + "pattern": "^[1-9][0-9]*$" + }, + "amountUSD": { + "type": "string", + "description": "The amount of gas required in USD.", + "example": "16.05", + "pattern": "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + }, + "token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + } + } + } + }, + "executionDuration": { + "type": "integer", + "description": "The estimated duration for the transaction execution in seconds.", + "example": 30 + }, + "fromAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "tool": { + "type": "string", + "description": "The tool or service used to generate this estimate.", + "example": "satp" + } + } + }, + "toolDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "integrationDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "includedStepIds": { + "type": "array", + "description": "IDs of further steps included within this step, allowing for nested actions without direct recursion.", + "items": { + "type": "string" + } + } + } + } + }, + "insurance": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "The state of insurance applicability for the transaction.", + "example": "NOT_INSURABLE", + "enum": [ + "NOT_INSURABLE", + "INSURABLE", + "INSURED" + ] + }, + "feeAmountUsd": { + "type": "string", + "description": "The fee amount for insurance, represented in USD.", + "example": "10.00", + "pattern": "^(0|[1-9]\\d*)(\\.\\d+)?$" + } + } + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + } + }, + "required": [ + "id", + "gatewayID", + "mode" + ] + } + } + } + }, + "Route": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier of the route." + }, + "gatewayID": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the gateway." + }, + "mode": { + "type": "string", + "enum": [ + "data", + "transfer" + ], + "description": "The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer." + }, + "fromDLTNetworkID": { + "type": "string", + "description": "The ID of the DLT Network where the operation will originate." + }, + "fromAmountUSD": { + "type": "string", + "format": "double", + "description": "The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision." + }, + "fromAmount": { + "type": "string", + "description": "The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).", + "pattern": "^[1-9][0-9]*$" + }, + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "toDLTNetworkID": { + "type": "string", + "description": "The ID of the DLT Network where the operation will end." + }, + "toAmountUSD": { + "type": "string", + "description": "The expected amount to be received in USD." + }, + "toAmount": { + "type": "string", + "description": "The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals))." + }, + "toAmountMin": { + "type": "string", + "description": "The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals))." + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "gasCostUSD": { + "type": "string", + "description": "The expected gas cost in USD." + }, + "containsSwitchChain": { + "type": "boolean", + "description": "Whether chain switching is enabled or not." + }, + "steps": { + "type": "array", + "description": "List of steps involved in this route, adjusted for mode.", + "items": { + "type": "object", + "description": "Details a single step within a route including actions and estimates.", + "properties": { + "id": { + "type": "string", + "description": "Id of the step" + }, + "type": { + "type": "string", + "description": "Type of the step, typically describing the action, e.g., 'swap'." + }, + "tool": { + "type": "string", + "description": "Tool used in the step, e.g., 'stargate'." + }, + "action": { + "type": "object", + "properties": { + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "fromAmount": { + "type": "string", + "description": "The amount of 'fromToken' to be transferred, specified as a string to maintain precision.", + "example": "1000000000000000000", + "pattern": "^[1-9][0-9]*$" + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "slippage": { + "type": "number", + "format": "float", + "description": "The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer.", + "example": 0.005 + }, + "fromAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + } + } + }, + "estimate": { + "type": "object", + "description": "Provides an estimation for a transaction, including costs, amounts, and execution duration.", + "properties": { + "approvalAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAmountMin": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "fromAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "feeCosts": { + "type": "array", + "description": "A collection of fee costs associated with the transaction.", + "items": { + "type": "object", + "description": "Details about a specific fee cost associated with the transaction.", + "properties": { + "name": { + "type": "string", + "description": "Name of the fee cost.", + "example": "Network Fee" + }, + "amount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "amountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "token": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "included": { + "type": "boolean", + "description": "Indicates if the fee is included in the transaction amount." + } + } + } + }, + "gasCosts": { + "type": "array", + "description": "A collection of estimated gas costs for executing the transaction.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the gas cost.", + "example": "SEND" + }, + "price": { + "type": "string", + "description": "The gas price, specified as a string to maintain precision.", + "example": "19236858243" + }, + "estimate": { + "type": "string", + "description": "The estimated gas required, specified as a string to maintain precision.", + "example": "445393" + }, + "limit": { + "type": "string", + "description": "The gas limit for the transaction, specified as a string to maintain precision.", + "example": "579011", + "pattern": "^[1-9][0-9]*$" + }, + "amount": { + "type": "string", + "description": "The amount of gas required in the gas currency.", + "example": "8567962003424499", + "pattern": "^[1-9][0-9]*$" + }, + "amountUSD": { + "type": "string", + "description": "The amount of gas required in USD.", + "example": "16.05", + "pattern": "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + }, + "token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + } + } + } + }, + "executionDuration": { + "type": "integer", + "description": "The estimated duration for the transaction execution in seconds.", + "example": 30 + }, + "fromAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "tool": { + "type": "string", + "description": "The tool or service used to generate this estimate.", + "example": "satp" + } + } + }, + "toolDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "integrationDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "includedStepIds": { + "type": "array", + "description": "IDs of further steps included within this step, allowing for nested actions without direct recursion.", + "items": { + "type": "string" + } + } + } + } + }, + "insurance": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "The state of insurance applicability for the transaction.", + "example": "NOT_INSURABLE", + "enum": [ + "NOT_INSURABLE", + "INSURABLE", + "INSURED" + ] + }, + "feeAmountUsd": { + "type": "string", + "description": "The fee amount for insurance, represented in USD.", + "example": "10.00", + "pattern": "^(0|[1-9]\\d*)(\\.\\d+)?$" + } + } + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + } + }, + "required": [ + "id", + "gatewayID", + "mode" + ] + }, + "ContinueRequest": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the transaction session to be continued." + }, + "contextId": { + "type": "string", + "format": "uuid", + "description": "A unique identifier for the transaction context." + } + }, + "required": [ + "sessionId", + "contextId" + ], + "description": "Schema for a request to continue a paused transaction session." + }, + "ContinueResponse": { + "type": "object", + "description": "Response schema for a continue request, returning the status of the SATP session.", + "properties": { + "statusResponse": { + "description": "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.", + "type": "object", + "x-category": "response", + "required": [ + "status", + "substatus", + "stage", + "step", + "startTime", + "originChain", + "destinationChain" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ], + "example": "DONE" + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "NOT_PROCESSABLE_REFUND_NEEDED" + ], + "example": "COMPLETED" + }, + "stage": { + "type": "string", + "enum": [ + "STAGE0", + "STAGE1", + "STAGE2", + "STAGE3" + ], + "example": "STAGE3" + }, + "step": { + "type": "string", + "enum": [ + "transfer-initialization-claims", + "conveyance-of-network-capabilities-and-parameters", + "transfer-proposal-message", + "transfer-proposal-receipt-message", + "transfer-proposal-reject-and-conditional-reject-message", + "transfer-commence-message", + "commence-response-message", + "lock-assertion-message", + "lock-assertion-receipt-message", + "commit-preparation-message", + "commit-ready-message", + "commit-final-assertion-message", + "commit-final-acknowledgement-receipt-message", + "transfer-complete-message", + "rollback-transfer-initialization-claims", + "rollback-conveyance-of-network-capabilities-and-parameters", + "rollback-transfer-proposal-message", + "rollback-transfer-proposal-receipt-message", + "rollback-transfer-proposal-reject-and-conditional-reject-message", + "rollback-transfer-commence-message", + "rollback-commence-response-message", + "rollback-lock-assertion-message", + "rollback-lock-assertion-receipt-message", + "rollback-commit-preparation-message", + "rollback-commit-ready-message", + "rollback-commit-final-assertion-message", + "rollback-commit-final-acknowledgement-receipt-message", + "rollback-transfer-complete-message" + ], + "example": "transfer-complete-message" + }, + "startTime": { + "type": "string", + "format": "date-time", + "example": "2023-01-01T00:00:00Z" + }, + "originChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerFabric" + }, + "dltSubnetworkID": { + "example": "subnetwork1" + } + } + }, + "destinationChain": { + "type": "object", + "properties": { + "dltProtocol": { + "example": "HyperledgerBesu" + }, + "dltSubnetworkID": { + "example": "subnetwork2" + } + } + } + } + } + }, + "required": [ + "statusResponse" + ] + }, + "Chain": { + "type": "object", + "properties": { + "chainId": { + "type": "string", + "description": "A unique identifier for the blockchain network." + }, + "chainName": { + "type": "string", + "description": "The name of the blockchain network." + }, + "chainType": { + "type": "string", + "description": "The type of blockchain network (e.g., 'evm', 'fabric')." + }, + "networkName": { + "type": "string", + "description": "The specific network name within the blockchain (e.g., 'mainnet', 'testnet')." + } + }, + "required": [ + "chainId", + "chainName", + "chainType", + "networkName" + ] + }, + "Chains": { + "title": "Chains", + "type": "array", + "description": "List of chains and related metadata", + "items": { + "type": "object", + "properties": { + "chainId": { + "type": "string", + "description": "A unique identifier for the blockchain network." + }, + "chainName": { + "type": "string", + "description": "The name of the blockchain network." + }, + "chainType": { + "type": "string", + "description": "The type of blockchain network (e.g., 'evm', 'fabric')." + }, + "networkName": { + "type": "string", + "description": "The specific network name within the blockchain (e.g., 'mainnet', 'testnet')." + } + }, + "required": [ + "chainId", + "chainName", + "chainType", + "networkName" + ] + } + }, + "Token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "Tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "HealthCheckResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "OK" + } + } + }, + "BridgeInfo": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + }, + "IncludedStep": { + "type": "object", + "description": "Details a single step within a route including actions and estimates.", + "properties": { + "id": { + "type": "string", + "description": "Id of the step" + }, + "type": { + "type": "string", + "description": "Type of the step, typically describing the action, e.g., 'swap'." + }, + "tool": { + "type": "string", + "description": "Tool used in the step, e.g., 'stargate'." + }, + "action": { + "type": "object", + "properties": { + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "fromAmount": { + "type": "string", + "description": "The amount of 'fromToken' to be transferred, specified as a string to maintain precision.", + "example": "1000000000000000000", + "pattern": "^[1-9][0-9]*$" + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "slippage": { + "type": "number", + "format": "float", + "description": "The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer.", + "example": 0.005 + }, + "fromAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + } + } + }, + "estimate": { + "type": "object", + "description": "Provides an estimation for a transaction, including costs, amounts, and execution duration.", + "properties": { + "approvalAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAmountMin": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "fromAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "feeCosts": { + "type": "array", + "description": "A collection of fee costs associated with the transaction.", + "items": { + "type": "object", + "description": "Details about a specific fee cost associated with the transaction.", + "properties": { + "name": { + "type": "string", + "description": "Name of the fee cost.", + "example": "Network Fee" + }, + "amount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "amountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "token": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "included": { + "type": "boolean", + "description": "Indicates if the fee is included in the transaction amount." + } + } + } + }, + "gasCosts": { + "type": "array", + "description": "A collection of estimated gas costs for executing the transaction.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the gas cost.", + "example": "SEND" + }, + "price": { + "type": "string", + "description": "The gas price, specified as a string to maintain precision.", + "example": "19236858243" + }, + "estimate": { + "type": "string", + "description": "The estimated gas required, specified as a string to maintain precision.", + "example": "445393" + }, + "limit": { + "type": "string", + "description": "The gas limit for the transaction, specified as a string to maintain precision.", + "example": "579011", + "pattern": "^[1-9][0-9]*$" + }, + "amount": { + "type": "string", + "description": "The amount of gas required in the gas currency.", + "example": "8567962003424499", + "pattern": "^[1-9][0-9]*$" + }, + "amountUSD": { + "type": "string", + "description": "The amount of gas required in USD.", + "example": "16.05", + "pattern": "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + }, + "token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + } + } + } + }, + "executionDuration": { + "type": "integer", + "description": "The estimated duration for the transaction execution in seconds.", + "example": 30 + }, + "fromAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "tool": { + "type": "string", + "description": "The tool or service used to generate this estimate.", + "example": "satp" + } + } + }, + "toolDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "integrationDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "includedStepIds": { + "type": "array", + "description": "IDs of further steps included within this step, allowing for nested actions without direct recursion.", + "items": { + "type": "string" + } + } + } + }, + "Insurance": { + "type": "object", + "properties": { + "state": { + "type": "string", + "description": "The state of insurance applicability for the transaction.", + "example": "NOT_INSURABLE", + "enum": [ + "NOT_INSURABLE", + "INSURABLE", + "INSURED" + ] + }, + "feeAmountUsd": { + "type": "string", + "description": "The fee amount for insurance, represented in USD.", + "example": "10.00", + "pattern": "^(0|[1-9]\\d*)(\\.\\d+)?$" + } + } + }, + "Action": { + "type": "object", + "properties": { + "fromToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "fromAmount": { + "type": "string", + "description": "The amount of 'fromToken' to be transferred, specified as a string to maintain precision.", + "example": "1000000000000000000", + "pattern": "^[1-9][0-9]*$" + }, + "toToken": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + }, + "slippage": { + "type": "number", + "format": "float", + "description": "The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer.", + "example": 0.005 + }, + "fromAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + } + } + }, + "IntegrationDetails": { + "type": "object", + "description": "Describes integration or tool details such as bridges or exchanges involved in the transaction.", + "required": [ + "key", + "name", + "logoURI" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique identifier for the integration or tool.", + "example": "1inch" + }, + "name": { + "type": "string", + "description": "The name of the integration or tool.", + "example": "1inch Exchange" + }, + "logoURI": { + "type": "string", + "format": "uri", + "description": "URL to the logo of the integration or tool.", + "example": "https://cdn.example.com/logos/1inch.png" + } + } + }, + "Estimate": { + "type": "object", + "description": "Provides an estimation for a transaction, including costs, amounts, and execution duration.", + "properties": { + "approvalAddress": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "toAmountMin": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "fromAmount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "feeCosts": { + "type": "array", + "description": "A collection of fee costs associated with the transaction.", + "items": { + "type": "object", + "description": "Details about a specific fee cost associated with the transaction.", + "properties": { + "name": { + "type": "string", + "description": "Name of the fee cost.", + "example": "Network Fee" + }, + "amount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "amountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "token": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "included": { + "type": "boolean", + "description": "Indicates if the fee is included in the transaction amount." + } + } + } + }, + "gasCosts": { + "type": "array", + "description": "A collection of estimated gas costs for executing the transaction.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the gas cost.", + "example": "SEND" + }, + "price": { + "type": "string", + "description": "The gas price, specified as a string to maintain precision.", + "example": "19236858243" + }, + "estimate": { + "type": "string", + "description": "The estimated gas required, specified as a string to maintain precision.", + "example": "445393" + }, + "limit": { + "type": "string", + "description": "The gas limit for the transaction, specified as a string to maintain precision.", + "example": "579011", + "pattern": "^[1-9][0-9]*$" + }, + "amount": { + "type": "string", + "description": "The amount of gas required in the gas currency.", + "example": "8567962003424499", + "pattern": "^[1-9][0-9]*$" + }, + "amountUSD": { + "type": "string", + "description": "The amount of gas required in USD.", + "example": "16.05", + "pattern": "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + }, + "token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + } + } + } + }, + "executionDuration": { + "type": "integer", + "description": "The estimated duration for the transaction execution in seconds.", + "example": 30 + }, + "fromAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "toAmountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "tool": { + "type": "string", + "description": "The tool or service used to generate this estimate.", + "example": "satp" + } + } + }, + "FeeCost": { + "type": "object", + "description": "Details about a specific fee cost associated with the transaction.", + "properties": { + "name": { + "type": "string", + "description": "Name of the fee cost.", + "example": "Network Fee" + }, + "amount": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "amountUSD": { + "type": "string", + "description": "The amount in string format including all decimals.", + "pattern": "^([1-9][0-9]*|0)(\\.[0-9]+)?$", + "example": "1000000000000000000" + }, + "token": { + "type": "string", + "description": "The symbol of a token", + "example": "ETH" + }, + "included": { + "type": "boolean", + "description": "Indicates if the fee is included in the transaction amount." + } + } + }, + "GasCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the gas cost.", + "example": "SEND" + }, + "price": { + "type": "string", + "description": "The gas price, specified as a string to maintain precision.", + "example": "19236858243" + }, + "estimate": { + "type": "string", + "description": "The estimated gas required, specified as a string to maintain precision.", + "example": "445393" + }, + "limit": { + "type": "string", + "description": "The gas limit for the transaction, specified as a string to maintain precision.", + "example": "579011", + "pattern": "^[1-9][0-9]*$" + }, + "amount": { + "type": "string", + "description": "The amount of gas required in the gas currency.", + "example": "8567962003424499", + "pattern": "^[1-9][0-9]*$" + }, + "amountUSD": { + "type": "string", + "description": "The amount of gas required in USD.", + "example": "16.05", + "pattern": "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + }, + "token": { + "type": "object", + "description": "Metadata detailing a supported token", + "required": [ + "chainID", + "chainType", + "address", + "symbol", + "decimals" + ], + "properties": { + "chainID": { + "x-category": "satp-core", + "type": "string", + "description": "The network of the DLT being interacted with. TODO: implement network identification draft" + }, + "chainType": { + "x-category": "satp-core", + "type": "string", + "enum": [ + "HyperledgerFabric", + "HyperledgerBesu" + ], + "description": "Supported DLT protocols." + }, + "address": { + "type": "string", + "description": "A blockchain address.", + "example": "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" + }, + "name": { + "type": "string", + "description": "The name of the token." + }, + "symbol": { + "type": "string", + "description": "The symbol of the token." + }, + "decimals": { + "type": "integer", + "description": "How many decimals the token supports.", + "minimum": 1 + }, + "logoURI": { + "type": "string", + "description": "The logo of a token, chain, dex etc.", + "format": "uri" + }, + "tags": { + "title": "Tags", + "type": "array", + "description": "List of tags identifiers providing additional context or categorization.", + "items": { + "type": "string" + }, + "example": [ + "satp", + "hyperledger" + ] + }, + "priceUSD": { + "type": "string", + "description": "The current price of the token in USD." + }, + "extensions": { + "type": "object", + "properties": { + "bridgeInfo": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "Information about the bridge used for the token transfer.", + "properties": { + "tokenAddress": { + "type": "string", + "description": "The address of the token being transferred.", + "example": "0x..." + } + } + } + }, + "verified": { + "type": "boolean", + "description": "Indicates whether the token is verified." + } + } + } + } + } + } + } + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json new file mode 100644 index 0000000000..a627a5dd37 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json @@ -0,0 +1,3259 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Hyperledger Cactus Plugin - Odap Hermes", + "description": "Implementation for Odap and Hermes", + "version": "v2.0.0-alpha.2", + "license": { + "name": "Apache-2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "components": { + "schemas": { + "CredentialProfile": { + "type": "string", + "enum": [ + "SAML", + "OAUTH", + "X509" + ] + }, + "PayloadProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "ApplicationProfile": { + "type": "object" + }, + "Payload": { + "type": "object" + }, + "AssetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "LoggingProfile": { + "type": "array", + "items": { + "type": "string" + } + }, + "AccessControlProfile": { + "type": "array", + "items": { + "type": "string" + } + }, + "Permissions": { + "type": "object" + }, + "Transaction": { + "type": "object" + }, + "ActionCategory": { + "type": "object" + }, + "History": { + "type": "object", + "properties": { + "Transactions": { + "type": "array", + "items": { + "type": "object" + } + }, + "Actions": { + "type": "array", + "items": { + "type": "object" + } + }, + "Origin": { + "type": "string" + }, + "Destination": { + "type": "string" + }, + "Balance": { + "type": "string" + }, + "CurrentStatus": { + "type": "object" + }, + "ApplicationSpecificParameters": { + "type": "object" + } + } + }, + "SenderDltSystem": { + "type": "object" + }, + "RecipientDltSystem": { + "type": "object" + }, + "LockEvidenceClaim": { + "type": "object" + }, + "LockClaimFormat": { + "type": "object" + }, + "CommitFinalClaim": { + "type": "object" + }, + "CommitFinalClaimFormat": { + "type": "object" + }, + "CommitAcknowledgementClaim": { + "type": "object" + }, + "CommitAcknowledgementClaimFormat": { + "type": "object" + }, + "SessionData": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "step": { + "type": "number" + }, + "version": { + "type": "string" + }, + "lastSequenceNumber": { + "type": "number" + }, + "loggingProfile": { + "type": "string" + }, + "accessControlProfile": { + "type": "string" + }, + "applicationProfile": { + "type": "string" + }, + "payloadProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "allowedSourceBackupGateways": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowedRecipientBackupGateways": { + "type": "array", + "items": { + "type": "string" + } + }, + "sourceBasePath": { + "type": "string" + }, + "recipientBasePath": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "beneficiaryPubkey": { + "type": "string" + }, + "sourceGatewayPubkey": { + "type": "string" + }, + "sourceGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayPubkey": { + "type": "string" + }, + "recipientGatewayDltSystem": { + "type": "string" + }, + "initializationRequestMessageHash": { + "type": "string" + }, + "initializationResponseMessageHash": { + "type": "string" + }, + "initializationRequestMessageRcvTimeStamp": { + "type": "string" + }, + "initializationRequestMessageProcessedTimeStamp": { + "type": "string" + }, + "clientSignatureInitializationRequestMessage": { + "type": "string" + }, + "serverSignatureInitializationResponseMessage": { + "type": "string" + }, + "transferCommenceMessageRequestHash": { + "type": "string" + }, + "transferCommenceMessageResponseHash": { + "type": "string" + }, + "clientSignatureTransferCommenceRequestMessage": { + "type": "string" + }, + "serverSignatureTransferCommenceResponseMessage": { + "type": "string" + }, + "lockEvidenceRequestMessageHash": { + "type": "string" + }, + "lockEvidenceResponseMessageHash": { + "type": "string" + }, + "clientSignatureLockEvidenceRequestMessage": { + "type": "string" + }, + "serverSignatureLockEvidenceResponseMessage": { + "type": "string" + }, + "lockEvidenceClaim": { + "type": "string" + }, + "commitPrepareRequestMessageHash": { + "type": "string" + }, + "commitPrepareResponseMessageHash": { + "type": "string" + }, + "clientSignatureCommitPreparationRequestMessage": { + "type": "string" + }, + "serverSignatureCommitPreparationResponseMessage": { + "type": "string" + }, + "commitFinalRequestMessageHash": { + "type": "string" + }, + "commitFinalResponseMessageHash": { + "type": "string" + }, + "commitFinalClaim": { + "type": "string" + }, + "commitFinalClaimFormat": { + "type": "string" + }, + "commitAcknowledgementClaim": { + "type": "string" + }, + "commitAcknowledgementClaimFormat": { + "type": "string" + }, + "clientSignatureCommitFinalRequestMessage": { + "type": "string" + }, + "serverSignatureCommitFinalResponseMessage": { + "type": "string" + }, + "transferCompleteMessageHash": { + "type": "string" + }, + "clientSignatureTransferCompleteMessage": { + "type": "string" + }, + "maxRetries": { + "type": "number" + }, + "recipientLedgerAssetID": { + "type": "string" + }, + "sourceLedgerAssetID": { + "type": "string" + }, + "maxTimeout": { + "type": "number" + }, + "lastLogEntryTimestamp": { + "type": "string" + }, + "unlockAssetClaim": { + "type": "string" + }, + "recreateAssetClaim": { + "type": "string" + }, + "deleteAssetClaim": { + "type": "string" + }, + "lastMessageReceivedTimestamp": { + "type": "string" + }, + "rollback": { + "type": "boolean" + }, + "rollbackMessageHash": { + "type": "string" + }, + "rollbackProofs": { + "type": "array", + "items": { + "type": "string" + } + }, + "rollbackActionsPerformed": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATE", + "DELETE", + "LOCK", + "UNLOCK" + ] + } + } + } + }, + "TransferInitializationV1Request": { + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "version": { + "type": "string" + }, + "developerURN": { + "type": "string" + }, + "credentialProfile": { + "type": "string", + "enum": [ + "SAML", + "OAUTH", + "X509" + ] + }, + "payloadProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "applicationProfile": { + "type": "string" + }, + "loggingProfile": { + "type": "string" + }, + "accessControlProfile": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "sourceGatewayPubkey": { + "type": "string" + }, + "sourceGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayPubkey": { + "type": "string" + }, + "recipientGatewayDltSystem": { + "type": "string" + }, + "escrowType": { + "type": "string", + "enum": [ + "FAUCET", + "TIMELOCK", + "HASHLOCK", + "HASHTIMELOCK", + "MULTICLAIMPC", + "DESTROY", + "BURN" + ] + }, + "expiryTime": { + "type": "string" + }, + "multipleClaimsAllowed": { + "type": "boolean" + }, + "multipleCancelsAllowed": { + "type": "boolean" + }, + "permissions": { + "type": "object" + }, + "origin": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "subsequentCalls": { + "type": "object" + }, + "histories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Transactions": { + "type": "array", + "items": { + "type": "object" + } + }, + "Actions": { + "type": "array", + "items": { + "type": "object" + } + }, + "Origin": { + "type": "string" + }, + "Destination": { + "type": "string" + }, + "Balance": { + "type": "string" + }, + "CurrentStatus": { + "type": "object" + }, + "ApplicationSpecificParameters": { + "type": "object" + } + } + } + }, + "sequenceNumber": { + "type": "integer" + }, + "sourceBasePath": { + "type": "string" + }, + "recipientBasePath": { + "type": "string" + }, + "maxRetries": { + "type": "number" + }, + "maxTimeout": { + "type": "number" + }, + "backupGatewaysAllowed": { + "type": "array", + "items": { + "type": "string" + } + }, + "recipientLedgerAssetID": { + "type": "string" + }, + "sourceLedgerAssetID": { + "type": "string" + } + }, + "required": [ + "messageType", + "sessionID", + "loggingProfile", + "accessControlProfile", + "payloadProfile", + "applicationProfile", + "signature", + "sourceGatewayPubkey", + "sourceGatewayDltSystem", + "recipientGatewayPubkey", + "recipientGatewayDltSystem", + "sequenceNumber", + "sourceBasePath", + "recipientBasePath", + "maxRetries", + "maxTimeout", + "backupGatewaysAllowed", + "recipientLedgerAssetID", + "sourceLedgerAssetID" + ] + }, + "TransferInitializationV1Response": { + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + }, + "odapPhase": { + "type": "string", + "enum": [ + "TransferInitialization", + "LockEvidenceVerification", + "CommitmentEstablishment" + ] + }, + "initialRequestMessageHash": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "timeStamp": { + "type": "string" + }, + "processedTimeStamp": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "backupGatewaysAllowed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messageType", + "initialRequestMessageHash", + "timeStamp", + "processedTimeStamp", + "sessionID", + "serverIdentityPubkey", + "sequenceNumber", + "signature", + "backupGatewaysAllowed" + ] + }, + "TransferCommenceV1Request": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "beneficiaryPubkey": { + "type": "string" + }, + "senderDltSystem": { + "type": "string" + }, + "recipientDltSystem": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashAssetProfile": { + "type": "string" + }, + "assetUnit": { + "type": "integer" + }, + "hashPrevMessage": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "integer" + } + }, + "required": [ + "sessionID", + "messageType", + "originatorPubkey", + "beneficiaryPubkey", + "senderDltSystem", + "recipientDltSystem", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashAssetProfile", + "hashPrevMessage", + "signature", + "sequenceNumber" + ] + }, + "TransferCommenceV1Response": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashCommenceRequest": { + "type": "string" + }, + "serverTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "messageHash": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "serverIdentityPubkey", + "clientIdentityPubkey", + "hashCommenceRequest", + "signature", + "sequenceNumber" + ] + }, + "LockEvidenceV1Request": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "lockEvidenceClaim": { + "type": "string" + }, + "lockEvidenceFormat": { + "nullable": true, + "type": "object" + }, + "lockEvidenceExpiration": { + "type": "string" + }, + "hashCommenceAckRequest": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "messageHash": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "lockEvidenceClaim", + "lockEvidenceExpiration", + "hashCommenceAckRequest", + "signature", + "sequenceNumber" + ] + }, + "LockEvidenceV1Response": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashLockEvidenceRequest": { + "type": "string" + }, + "serverTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashLockEvidenceRequest", + "signature", + "sequenceNumber" + ] + }, + "CommitPreparationV1Request": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashLockEvidenceAck": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashLockEvidenceAck", + "signature", + "sequenceNumber" + ] + }, + "CommitPreparationV1Response": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashCommitPrep": { + "type": "string" + }, + "serverTransferNumber": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashCommitPrep", + "signature", + "sequenceNumber" + ] + }, + "CommitFinalV1Request": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "commitFinalClaim": { + "type": "string" + }, + "commitFinalClaimFormat": { + "type": "object" + }, + "hashCommitPrepareAck": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "commitFinalClaim", + "hashCommitPrepareAck", + "signature", + "sequenceNumber" + ] + }, + "CommitFinalV1Response": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "commitAcknowledgementClaim": { + "type": "string" + }, + "commitAcknowledgementClaimFormat": { + "type": "object" + }, + "hashCommitFinal": { + "type": "string" + }, + "serverTransferNumber": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "commitAcknowledgementClaim", + "hashCommitFinal", + "signature", + "sequenceNumber" + ] + }, + "TransferCompleteV1Request": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashCommitFinalAck": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "hashTransferCommence": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashCommitFinalAck", + "signature", + "hashTransferCommence", + "sequenceNumber" + ] + }, + "ClientV1Request": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "loggingProfile": { + "type": "string" + }, + "accessControlProfile": { + "type": "string" + }, + "assetControlProfile": { + "type": "string" + }, + "applicationProfile": { + "type": "string" + }, + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "payloadProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "sourceGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayPubkey": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "beneficiaryPubkey": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "clientDltSystem": { + "type": "string" + }, + "serverDltSystem": { + "type": "string" + }, + "clientGatewayConfiguration": { + "type": "object", + "properties": { + "apiHost": { + "type": "string" + } + }, + "required": [ + "apiHost" + ] + }, + "serverGatewayConfiguration": { + "type": "object", + "properties": { + "apiHost": { + "type": "string" + } + }, + "required": [ + "apiHost" + ] + }, + "maxRetries": { + "type": "number" + }, + "maxTimeout": { + "type": "number" + }, + "sourceLedgerAssetID": { + "type": "string" + }, + "recipientLedgerAssetID": { + "type": "string" + } + }, + "required": [ + "version", + "loggingProfile", + "accessControlProfile", + "assetControlProfile", + "applicationProfile", + "assetProfile", + "payloadProfile", + "sourceGatewayDltSystem", + "recipientGatewayDltSystem", + "recipientGatewayPubkey", + "originatorPubkey", + "beneficiaryPubkey", + "clientIdentityPubkey", + "serverIdentityPubkey", + "clientDltSystem", + "serverDltSystem", + "clientGatewayConfiguration", + "serverGatewayConfiguration", + "maxRetries", + "maxTimeout", + "sourceLedgerAssetID", + "recipientLedgerAssetID" + ] + }, + "RecoverV1Message": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "odapPhase": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + }, + "lastLogEntryTimestamp": { + "type": "string" + }, + "isBackup": { + "type": "boolean" + }, + "newBasePath": { + "type": "string" + }, + "newGatewayPubKey": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "odapPhase", + "sequenceNumber", + "lastLogEntryTimestamp", + "isBackup", + "newBasePath", + "signature" + ] + }, + "RecoverUpdateV1Message": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "recoveredLogs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "data": { + "type": "string" + }, + "type": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "sessionID", + "type", + "operation" + ] + } + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "recoveredLogs", + "signature" + ] + }, + "RecoverUpdateAckV1Message": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "changedEntriesHash": { + "type": "array", + "items": { + "type": "string" + } + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "changedEntriesHash", + "signature" + ] + }, + "RecoverSuccessV1Message": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "signature" + ] + }, + "RollbackV1Message": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "actionPerformed": { + "type": "array", + "items": { + "type": "string" + } + }, + "proofs": { + "type": "array", + "items": { + "type": "string" + } + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "actionPerformed", + "proofs", + "signature" + ] + }, + "RollbackAckV1Message": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "signature" + ] + }, + "LocalLog": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "data": { + "type": "string" + }, + "type": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "sessionID", + "type", + "operation" + ] + }, + "SatpMessage": { + "type": "object", + "properties": { + "SequenceNumber": { + "type": "number" + }, + "Phase": { + "type": "string", + "enum": [ + "TransferInitialization", + "LockEvidenceVerification", + "CommitmentEstablishment" + ] + }, + "ResourceURL": { + "type": "string" + }, + "DeveloperURN": { + "type": "string" + }, + "ActionResponse": { + "type": "object", + "properties": { + "ResponseCode": { + "type": "string", + "enum": [ + "200", + "404" + ], + "x-enum-varnames": [ + "OK", + "RESOURCE_NOT_FOUND" + ] + }, + "Arguments": { + "type": "array", + "items": {} + } + } + }, + "CredentialProfile": { + "type": "string", + "enum": [ + "SAML", + "OAuth", + "X509" + ] + }, + "CredentialBlock": { + "type": "array", + "items": {} + }, + "CredentialsProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "ApplicationProfile": { + "type": "object" + }, + "Payload": { + "type": "object" + }, + "PayloadHash": { + "type": "string" + }, + "MessageSignature": { + "type": "string" + } + } + } + } + }, + "paths": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" + } + }, + "operationId": "phase1TransferInitiationRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "version": { + "type": "string" + }, + "developerURN": { + "type": "string" + }, + "credentialProfile": { + "type": "string", + "enum": [ + "SAML", + "OAUTH", + "X509" + ] + }, + "payloadProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "applicationProfile": { + "type": "string" + }, + "loggingProfile": { + "type": "string" + }, + "accessControlProfile": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "sourceGatewayPubkey": { + "type": "string" + }, + "sourceGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayPubkey": { + "type": "string" + }, + "recipientGatewayDltSystem": { + "type": "string" + }, + "escrowType": { + "type": "string", + "enum": [ + "FAUCET", + "TIMELOCK", + "HASHLOCK", + "HASHTIMELOCK", + "MULTICLAIMPC", + "DESTROY", + "BURN" + ] + }, + "expiryTime": { + "type": "string" + }, + "multipleClaimsAllowed": { + "type": "boolean" + }, + "multipleCancelsAllowed": { + "type": "boolean" + }, + "permissions": { + "type": "object" + }, + "origin": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "subsequentCalls": { + "type": "object" + }, + "histories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Transactions": { + "type": "array", + "items": { + "type": "object" + } + }, + "Actions": { + "type": "array", + "items": { + "type": "object" + } + }, + "Origin": { + "type": "string" + }, + "Destination": { + "type": "string" + }, + "Balance": { + "type": "string" + }, + "CurrentStatus": { + "type": "object" + }, + "ApplicationSpecificParameters": { + "type": "object" + } + } + } + }, + "sequenceNumber": { + "type": "integer" + }, + "sourceBasePath": { + "type": "string" + }, + "recipientBasePath": { + "type": "string" + }, + "maxRetries": { + "type": "number" + }, + "maxTimeout": { + "type": "number" + }, + "backupGatewaysAllowed": { + "type": "array", + "items": { + "type": "string" + } + }, + "recipientLedgerAssetID": { + "type": "string" + }, + "sourceLedgerAssetID": { + "type": "string" + } + }, + "required": [ + "messageType", + "sessionID", + "loggingProfile", + "accessControlProfile", + "payloadProfile", + "applicationProfile", + "signature", + "sourceGatewayPubkey", + "sourceGatewayDltSystem", + "recipientGatewayPubkey", + "recipientGatewayDltSystem", + "sequenceNumber", + "sourceBasePath", + "recipientBasePath", + "maxRetries", + "maxTimeout", + "backupGatewaysAllowed", + "recipientLedgerAssetID", + "sourceLedgerAssetID" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" + } + }, + "operationId": "phase2TransferCommenceRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "beneficiaryPubkey": { + "type": "string" + }, + "senderDltSystem": { + "type": "string" + }, + "recipientDltSystem": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashAssetProfile": { + "type": "string" + }, + "assetUnit": { + "type": "integer" + }, + "hashPrevMessage": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "integer" + } + }, + "required": [ + "sessionID", + "messageType", + "originatorPubkey", + "beneficiaryPubkey", + "senderDltSystem", + "recipientDltSystem", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashAssetProfile", + "hashPrevMessage", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" + } + }, + "operationId": "phase2LockEvidenceRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "lockEvidenceClaim": { + "type": "string" + }, + "lockEvidenceFormat": { + "nullable": true, + "type": "object" + }, + "lockEvidenceExpiration": { + "type": "string" + }, + "hashCommenceAckRequest": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "messageHash": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "lockEvidenceClaim", + "lockEvidenceExpiration", + "hashCommenceAckRequest", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" + } + }, + "operationId": "phase3CommitPreparationRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashLockEvidenceAck": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashLockEvidenceAck", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" + } + }, + "operationId": "phase3CommitFinalRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "commitFinalClaim": { + "type": "string" + }, + "commitFinalClaimFormat": { + "type": "object" + }, + "hashCommitPrepareAck": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "commitFinalClaim", + "hashCommitPrepareAck", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest": { + "get": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" + } + }, + "operationId": "phase3TransferCompleteRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashCommitFinalAck": { + "type": "string" + }, + "clientTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "hashTransferCommence": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashCommitFinalAck", + "signature", + "hashTransferCommence", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" + } + }, + "operationId": "clientRequestV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "loggingProfile": { + "type": "string" + }, + "accessControlProfile": { + "type": "string" + }, + "assetControlProfile": { + "type": "string" + }, + "applicationProfile": { + "type": "string" + }, + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "payloadProfile": { + "type": "object", + "properties": { + "assetProfile": { + "type": "object", + "properties": { + "issuer": { + "type": "string" + }, + "assetCode": { + "type": "string" + }, + "assetCodeType": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "verificationEndPoint": { + "type": "string" + }, + "digitalSignature": { + "type": "string" + }, + "prospectusLink": { + "type": "string" + }, + "keyInformationLink": { + "type": "array", + "items": {} + }, + "keyWord": { + "type": "array", + "items": {} + }, + "transferRestriction": { + "type": "array", + "items": {} + }, + "ledgerRequirements": { + "type": "array", + "items": {} + } + }, + "required": [ + "expirationDate" + ] + }, + "capabilities": { + "type": "string" + } + }, + "required": [ + "assetProfile" + ] + }, + "sourceGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayDltSystem": { + "type": "string" + }, + "recipientGatewayPubkey": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "beneficiaryPubkey": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "clientDltSystem": { + "type": "string" + }, + "serverDltSystem": { + "type": "string" + }, + "clientGatewayConfiguration": { + "type": "object", + "properties": { + "apiHost": { + "type": "string" + } + }, + "required": [ + "apiHost" + ] + }, + "serverGatewayConfiguration": { + "type": "object", + "properties": { + "apiHost": { + "type": "string" + } + }, + "required": [ + "apiHost" + ] + }, + "maxRetries": { + "type": "number" + }, + "maxTimeout": { + "type": "number" + }, + "sourceLedgerAssetID": { + "type": "string" + }, + "recipientLedgerAssetID": { + "type": "string" + } + }, + "required": [ + "version", + "loggingProfile", + "accessControlProfile", + "assetControlProfile", + "applicationProfile", + "assetProfile", + "payloadProfile", + "sourceGatewayDltSystem", + "recipientGatewayDltSystem", + "recipientGatewayPubkey", + "originatorPubkey", + "beneficiaryPubkey", + "clientIdentityPubkey", + "serverIdentityPubkey", + "clientDltSystem", + "serverDltSystem", + "clientGatewayConfiguration", + "serverGatewayConfiguration", + "maxRetries", + "maxTimeout", + "sourceLedgerAssetID", + "recipientLedgerAssetID" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" + } + }, + "operationId": "phase1TransferInitiationResponseV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + }, + "odapPhase": { + "type": "string", + "enum": [ + "TransferInitialization", + "LockEvidenceVerification", + "CommitmentEstablishment" + ] + }, + "initialRequestMessageHash": { + "type": "string" + }, + "destination": { + "type": "string" + }, + "timeStamp": { + "type": "string" + }, + "processedTimeStamp": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "backupGatewaysAllowed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "messageType", + "initialRequestMessageHash", + "timeStamp", + "processedTimeStamp", + "sessionID", + "serverIdentityPubkey", + "sequenceNumber", + "signature", + "backupGatewaysAllowed" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" + } + }, + "operationId": "phase2TransferCommenceResponseV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashCommenceRequest": { + "type": "string" + }, + "serverTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "messageHash": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "serverIdentityPubkey", + "clientIdentityPubkey", + "hashCommenceRequest", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" + } + }, + "operationId": "phase2LockEvidenceResponseV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashLockEvidenceRequest": { + "type": "string" + }, + "serverTransferNumber": { + "type": "integer", + "nullable": true + }, + "signature": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashLockEvidenceRequest", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" + } + }, + "operationId": "phase3CommitPreparationResponseV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "hashCommitPrep": { + "type": "string" + }, + "serverTransferNumber": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "hashCommitPrep", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" + } + }, + "operationId": "phase3CommitFinalResponseV1", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "messageType": { + "type": "string" + }, + "clientIdentityPubkey": { + "type": "string" + }, + "serverIdentityPubkey": { + "type": "string" + }, + "commitAcknowledgementClaim": { + "type": "string" + }, + "commitAcknowledgementClaimFormat": { + "type": "object" + }, + "hashCommitFinal": { + "type": "string" + }, + "serverTransferNumber": { + "type": "integer" + }, + "signature": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + } + }, + "required": [ + "sessionID", + "messageType", + "clientIdentityPubkey", + "serverIdentityPubkey", + "commitAcknowledgementClaim", + "hashCommitFinal", + "signature", + "sequenceNumber" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" + } + }, + "operationId": "RecoverV1Message", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "odapPhase": { + "type": "string" + }, + "sequenceNumber": { + "type": "number" + }, + "lastLogEntryTimestamp": { + "type": "string" + }, + "isBackup": { + "type": "boolean" + }, + "newBasePath": { + "type": "string" + }, + "newGatewayPubKey": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "odapPhase", + "sequenceNumber", + "lastLogEntryTimestamp", + "isBackup", + "newBasePath", + "signature" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" + } + }, + "operationId": "RecoverUpdateV1Message", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "recoveredLogs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "sessionID": { + "type": "string" + }, + "data": { + "type": "string" + }, + "type": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "sessionID", + "type", + "operation" + ] + } + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "recoveredLogs", + "signature" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" + } + }, + "operationId": "RecoverUpdateAckV1Message", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "changedEntriesHash": { + "type": "array", + "items": { + "type": "string" + } + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "changedEntriesHash", + "signature" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" + } + }, + "operationId": "RecoverV1Success", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "signature" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" + } + }, + "operationId": "RollbackV1Message", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "actionPerformed": { + "type": "array", + "items": { + "type": "string" + } + }, + "proofs": { + "type": "array", + "items": { + "type": "string" + } + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "actionPerformed", + "proofs", + "signature" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage": { + "post": { + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" + } + }, + "operationId": "RollbackAckV1Message", + "description": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionID": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "sessionID", + "success", + "signature" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts new file mode 100644 index 0000000000..65b3dba385 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts @@ -0,0 +1 @@ +// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts new file mode 100644 index 0000000000..68bffe6a9b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -0,0 +1,62 @@ +import { GetStatusError } from "../../core/errors"; +import { + StatusRequest, + StatusResponse, + Transact200ResponseStatusResponseOriginChain, +} from "../../generated/openapi-blo/typescript-axios"; +import { Logger } from "@hyperledger/cactus-common"; + +export async function GetStatusHandler( + logger: Logger, + req: StatusRequest, +): Promise { + const fnTag = `GetStatusHandler`; + logger.info(`${fnTag}, Obtaining status for sessionID=${req.sessionID}`); + + try { + const processedRequest = req; + const result = await GetStatusService(logger, processedRequest); + return result; + } catch (error) { + if (error instanceof GetStatusError) { + logger.error(`${fnTag}, Error getting status: ${error.message}`); + throw error; + } else { + logger.error(`${fnTag}, Unexpected error: ${error.message}`); + throw new Error("An unexpected error occurred while obtaining status."); + } + } +} + +// TODO call SATP core, use try catch to propagate errors +export async function GetStatusService( + logger: Logger, + req: StatusRequest, +): Promise { + // Implement the logic for getting status here; call core + const originChain: Transact200ResponseStatusResponseOriginChain = { + dltProtocol: "besu", + dltSubnetworkID: "v24.4.0-RC1", + }; + + const destinationChain: Transact200ResponseStatusResponseOriginChain = { + dltProtocol: "fabric", + dltSubnetworkID: "v2.0.0", + }; + + const mock: StatusResponse = { + status: "DONE", + substatus: "COMPLETED", + stage: "STAGE3", + step: "transfer-complete-message", + startTime: "2023-03-14T16:50:06.662Z", + originChain: originChain, + destinationChain: destinationChain, + }; + + logger.info(req); + // logger.error("GetStatusService not implemented"); + // throw new GetStatusError(req.sessionID, "GetStatusService not implemented"); + + return mock; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts new file mode 100644 index 0000000000..2510fb0a8d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -0,0 +1,72 @@ +import { + Logger, + Checks, + LogLevelDesc, + LoggerProvider, +} from "@hyperledger/cactus-common"; + +import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; + +//import { GatewayIdentity, GatewayChannel } from "../core/types"; +//import { GetStatusError, NonExistantGatewayIdentity } from "../core/errors"; +import { GetStatusEndpointV1 } from "../web-services/blo/status-endpoint"; + +//import { GetAuditRequest, GetAuditResponse } from "../generated/openapi-blo/typescript-axios"; +import { + StatusRequest, + StatusResponse, +} from "../generated/openapi-blo/typescript-axios"; +import { GetStatusHandler } from "./admin/get-status-handler-service"; + +export interface BLODispatcherOptions { + logger: Logger; + logLevel?: LogLevelDesc; + instanceId: string; +} + +export class BLODispatcher { + public static readonly CLASS_NAME = "BLODispatcher"; + private readonly logger: Logger; + private endpoints: IWebServiceEndpoint[] | undefined; + private readonly instanceId: string; + + constructor(public readonly options: BLODispatcherOptions) { + const fnTag = `${BLODispatcher.CLASS_NAME}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.logger = LoggerProvider.getOrCreate({ level, label }); + this.instanceId = options.instanceId; + this.logger.info(`Instantiated ${this.className} OK`); + } + + public get className(): string { + return BLODispatcher.CLASS_NAME; + } + + public async getOrCreateWebServices(): Promise { + const fnTag = `${BLODispatcher.CLASS_NAME}#getOrCreateWebServices()`; + this.logger.info( + `${fnTag}, Registering webservices on instanceId=${this.instanceId}`, + ); + + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + const getStatusEndpointV1 = new GetStatusEndpointV1({ + dispatcher: this, + logLevel: this.options.logLevel, + }); + + const theEndpoints = [getStatusEndpointV1]; + this.endpoints = theEndpoints; + return theEndpoints; + } + + public async GetStatus(req: StatusRequest): Promise { + return GetStatusHandler(this.logger, req); + } + + // TODO implement handlers GetAudit, Transact, Cancel, Routes +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts new file mode 100644 index 0000000000..65b3dba385 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts @@ -0,0 +1 @@ +// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts new file mode 100644 index 0000000000..65b3dba385 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts @@ -0,0 +1 @@ +// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts new file mode 100644 index 0000000000..65b3dba385 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts @@ -0,0 +1 @@ +// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts index 4c2a8ac472..10b525dcab 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -1,3 +1,3 @@ export const DEFAULT_PORT_GATEWAY_SERVER = 3010; -export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; -export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; \ No newline at end of file +export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; +export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts index a2bd3c7f79..d0d6599c9e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts @@ -13,3 +13,13 @@ export class NonExistantGatewayIdentity extends Error { Object.setPrototypeOf(this, BootstrapError.prototype); } } + +export class GetStatusError extends Error { + constructor(sessionID: string, message: string) { + super( + `Could not GetStatus at Session: with id ${sessionID}. Reason: ${message}`, + ); + this.name = this.constructor.name; + Object.setPrototypeOf(this, GetStatusError.prototype); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts index e69de29bb2..991aa1a51e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index e534679f3d..6c33f0ac0b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,11 +1,16 @@ import { Secp256k1Keys, LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; +import { BLODispatcher } from "../blo/dispatcher"; export enum CurrentDrafts { Core = "Core", Architecture = "Architecture", Crash = "Crash", } +export interface IRequestOptions { + logLevel?: LogLevelDesc; + dispatcher: BLODispatcher; +} export type DraftVersions = { [K in CurrentDrafts]: string; @@ -25,6 +30,11 @@ export type GatewayChannel = { id: string; }; +export type Address = + | `http://${string}` + | `https://${string}` + | `${number}.${number}.${number}.${number}.`; + export type GatewayIdentity = { id: string; name?: string; @@ -33,10 +43,7 @@ export type GatewayIdentity = { proofID?: string; gatewayServerPort?: number; gatewayClientPort?: number; - address?: - | `http://${string}` - | `https://${string}` - | `${number}.${number}.${number}.${number}.`; + address?: Address; }; export interface SATPGatewayConfig { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts index 3f23bbfbb4..2191fc0da2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -25,11 +25,15 @@ import { } from "./core/types"; import { GatewayOrchestrator } from "./gol/gateway-orchestrator"; export { SATPGatewayConfig }; -import express, { Express } from 'express'; +import express, { Express } from "express"; import { expressConnectMiddleware } from "@connectrpc/connect-express"; import http from "http"; import { configureRoutes } from "./web-services/router"; -import { DEFAULT_PORT_GATEWAY_CLIENT, DEFAULT_PORT_GATEWAY_SERVER } from "./core/constants"; +import { + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_SERVER, +} from "./core/constants"; +import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; export class SATPGateway { // todo more checks; example port from config is between 3000 and 9000 @@ -53,8 +57,9 @@ export class SATPGateway { private gatewayApplication?: Express; private gatewayServer?: http.Server; - private BOLApplication?: Express; - private BOLServer?: http.Server; + private BLOApplication?: Express; + private BLOServer?: http.Server; + private BLODispatcher?: BLODispatcher; // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) // private sessions: Map = new Map(); @@ -83,6 +88,18 @@ export class SATPGateway { this.gatewayConnectionManager = new GatewayOrchestrator(seedGateways, { logger: this.logger, }); + + const dispatcherOps: BLODispatcherOptions = { + logger: this.logger, + logLevel: this.config.logLevel, + instanceId: this.config.gid!.id, + }; + + if (!this.config.gid || !dispatcherOps.instanceId) { + throw new Error("Invalid configuration"); + } + + this.BLODispatcher = new BLODispatcher(dispatcherOps); } // todo load docs for gateway coordinator and expose them in a http gatewayApplication @@ -104,7 +121,6 @@ export class SATPGateway { // this._app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(OpenAPISpec)); } - static ProcessGatewayCoordinatorConfig( pluginOptions: SATPGatewayConfig, ): SATPGatewayConfig { @@ -137,7 +153,7 @@ export class SATPGateway { if (!pluginOptions.gid.id) { pluginOptions.gid.id = id; } - + if (!pluginOptions.gid.name) { pluginOptions.gid.name = id; } @@ -171,7 +187,6 @@ export class SATPGateway { pluginOptions.gid.gatewayClientPort = DEFAULT_PORT_GATEWAY_CLIENT; } - if (!pluginOptions.logLevel) { pluginOptions.logLevel = "DEBUG"; } @@ -195,50 +210,92 @@ export class SATPGateway { * Startup Methods * ---------------- * This section includes methods responsible for starting up the server and its associated services. - * It ensures that both the GatewayServer and BOLServer are initiated concurrently for efficient launch. + * It ensures that both the GatewayServer and BLOServer are initiated concurrently for efficient launch. */ async startup(): Promise { const fnTag = `${this.label}#startup()`; this.logger.trace(`Entering ${fnTag}`); await Promise.all([ + // TODO! need to add TLS support for Connect and gRPC to work this.startupGatewayServer(), this.startupBOLServer(), ]); - this.logger.info("Both GatewayServer and BOLServer have started"); + this.logger.info("Both GatewayServer and BLOServer have started"); } - async startupGatewayServer(): Promise { const fnTag = `${this.label}#startupGatewayServer()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Starting gateway server"); - const port = this.options.gid?.gatewayServerPort ?? DEFAULT_PORT_GATEWAY_SERVER; - - if (!this.gatewayApplication || !this.gatewayServer) { - this.gatewayApplication = express(); - this.gatewayApplication.use(expressConnectMiddleware({ routes: configureRoutes })); - this.gatewayServer = http.createServer(this.gatewayApplication).listen(port); - } else { - this.logger.warn("Server already running"); - } + const port = + this.options.gid?.gatewayServerPort ?? DEFAULT_PORT_GATEWAY_SERVER; + + return new Promise((resolve, reject) => { + if (!this.gatewayApplication || !this.gatewayServer) { + this.gatewayApplication = express(); + this.gatewayApplication.use( + expressConnectMiddleware({ routes: configureRoutes }), + ); + this.gatewayServer = http.createServer(this.gatewayApplication); + + this.gatewayServer.listen(port, () => { + this.logger.info( + `Gateway server started and listening on port ${port}`, + ); + resolve(); + }); + + this.gatewayServer.on("error", (error) => { + this.logger.error(`Gateway server failed to start: ${error}`); + reject(error); + }); + } else { + this.logger.warn("Server already running"); + resolve(); + } + }); } - async startupBOLServer(): Promise { const fnTag = `${this.label}#startupBOLServer()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Starting BOL server"); - const port = (this.options.gid?.gatewayClientPort ?? DEFAULT_PORT_GATEWAY_CLIENT); - - if (!this.BOLApplication || !this.BOLServer) { - this.BOLApplication = express(); - // todo - // this.BOLApplication.use(expressConnectMiddleware()); - this.BOLServer = http.createServer(this.BOLApplication).listen(port); - } else { - this.logger.warn("Server already running"); - } + const port = + this.options.gid?.gatewayClientPort ?? DEFAULT_PORT_GATEWAY_CLIENT; + + return new Promise(async (resolve, reject) => { + if (!this.BLOApplication || !this.BLOServer) { + if (!this.BLODispatcher) { + throw new Error("BLODispatcher is not defined"); + } + this.BLOApplication = express(); + try { + const webServices = await this.BLODispatcher.getOrCreateWebServices(); + for (const service of webServices) { + this.logger.debug(`Registering web service: ${service.getPath()}`); + await service.registerExpress(this.BLOApplication); + } + } catch (error) { + throw new Error(`Failed to register web services: ${error}`); + } + + this.BLOServer = http.createServer(this.BLOApplication); + + this.BLOServer.listen(port, () => { + this.logger.info(`BOL server started and listening on port ${port}`); + resolve(); + }); + + this.BLOServer.on("error", (error) => { + this.logger.error(`BOL server failed to start: ${error}`); + reject(error); + }); + } else { + this.logger.warn("BOL Server already running."); + resolve(); + } + }); } /** @@ -249,6 +306,7 @@ export class SATPGateway { * These operations are fundamental for setting up and managing gateway connections within the system. */ + // TODO: addGateways as an admin endpoint public async addGateways(IDs: string[]): Promise { const fnTag = `${this.label}#addGateways()`; this.logger.trace(`Entering ${fnTag}`); @@ -358,48 +416,53 @@ export class SATPGateway { return mockGatewayIdentity; } - public getIdentity(): GatewayIdentity { + // TODO: keep getter; add an admin endpoint to get identity of connected gateway to BLO + public get Identity(): GatewayIdentity { const fnTag = `${this.label}#getIdentity()`; this.logger.trace(`Entering ${fnTag}`); + if (!this.config.gid) { + throw new Error("GatewayIdentity is not defined"); + } return this.config.gid!; } -/** - * Shutdown Methods - * ----------------- - * This section includes methods responsible for cleanly shutting down the server and its associated services. - */ + /** + * Shutdown Methods + * ----------------- + * This section includes methods responsible for cleanly shutting down the server and its associated services. + */ public onShutdown(hook: ShutdownHook): void { const fnTag = `${this.label}#onShutdown()`; this.logger.trace(`Entering ${fnTag}`); - this.logger.debug(`Adding shutdown hook: ${hook.name}`); + this.logger.debug(`Adding shutdown hook: ${hook.name}`); this.shutdownHooks.push(hook); } public async shutdown(): Promise { const fnTag = `${this.label}#getGatewaySeeds()`; - this.logger.debug(`Entering ${fnTag}`); + this.logger.debug(`Entering ${fnTag}`); this.logger.info("Shutting down Node server - Gateway"); await this.shutdownGatewayServer(); this.logger.info("Shutting down Node server - BOL"); - await this.shutdownBOLServer(); + await this.shutdownBLOServer(); this.logger.debug("Running shutdown hooks"); - for (const hook of this.shutdownHooks) { + for (const hook of this.shutdownHooks) { this.logger.debug(`Running shutdown hook: ${hook.name}`); await hook.hook(); } - this.logger.info("Shutting down Gateway Connection Manager") - const connectionsClosed = await this.gatewayConnectionManager.disconnectAll(); + this.logger.info("Shutting down Gateway Connection Manager"); + const connectionsClosed = + await this.gatewayConnectionManager.disconnectAll(); this.logger.info(`Closed ${connectionsClosed} connections`); this.logger.info("Gateway Coordinator shut down"); return connectionsClosed; } - + private async shutdownGatewayServer(): Promise { const fnTag = `${this.label}#shutdownServer()`; this.logger.debug(`Entering ${fnTag}`); @@ -409,28 +472,30 @@ export class SATPGateway { this.gatewayServer = undefined; this.logger.info("Server shut down"); } catch (error) { - this.logger.error(`Error shutting down the gatewayApplication: ${error}`); + this.logger.error( + `Error shutting down the gatewayApplication: ${error}`, + ); } } else { this.logger.warn("Server is not running."); } } - - private async shutdownBOLServer(): Promise { - const fnTag = `${this.label}#shutdownBOLServer()`; + + private async shutdownBLOServer(): Promise { + const fnTag = `${this.label}#shutdownBLOServer()`; this.logger.debug(`Entering ${fnTag}`); - if (this.BOLServer) { + if (this.BLOServer) { try { - await this.BOLServer.close(); - this.BOLServer = undefined; + await this.BLOServer.close(); + this.BLOServer = undefined; this.logger.info("Server shut down"); } catch (error) { - this.logger.error(`Error shutting down the gatewayApplication: ${error}`); + this.logger.error( + `Error shutting down the gatewayApplication: ${error}`, + ); } } else { this.logger.warn("Server is not running."); } } - -} - +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore new file mode 100644 index 0000000000..149b576547 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore new file mode 100644 index 0000000000..999d88df69 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES new file mode 100644 index 0000000000..a80cd4f07b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES @@ -0,0 +1,8 @@ +.gitignore +.npmignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION new file mode 100644 index 0000000000..cd802a1ec4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts new file mode 100644 index 0000000000..5009672823 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts @@ -0,0 +1,2678 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; + +/** + * An Error + * @export + * @interface APIError + */ +export interface APIError { + /** + * HTTP error type + * @type {string} + * @memberof APIError + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof APIError + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof APIError + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof APIError + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof APIError + */ + 'timestamp': string; +} +/** + * + * @export + * @interface Action + */ +export interface Action { + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Action + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. + * @type {string} + * @memberof Action + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Action + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. + * @type {number} + * @memberof Action + */ + 'slippage'?: number; + /** + * A blockchain address. + * @type {string} + * @memberof Action + */ + 'fromAddress'?: string; + /** + * A blockchain address. + * @type {string} + * @memberof Action + */ + 'toAddress'?: string; +} +/** + * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 + * @export + * @enum {string} + */ + +export const AuthzJwtClaim = { + /** + * The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. + */ + iss: 'Hyperledger Labs - Carbon Accounting Tool' +} as const; + +export type AuthzJwtClaim = typeof AuthzJwtClaim[keyof typeof AuthzJwtClaim]; + + +/** + * + * @export + * @enum {string} + */ + +export const AuthzScope = { + /** + * Identities with the group:admin scope are administrators of the system. + */ + GroupAdmin: 'group:admin', + /** + * Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. + */ + GroupUser: 'group:user' +} as const; + +export type AuthzScope = typeof AuthzScope[keyof typeof AuthzScope]; + + +/** + * Information about the bridge used for the token transfer. + * @export + * @interface BridgeInfo + */ +export interface BridgeInfo { + /** + * The address of the token being transferred. + * @type {string} + * @memberof BridgeInfo + */ + 'tokenAddress'?: string; +} +/** + * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + * @export + * @interface Cancel200Response + */ +export interface Cancel200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Cancel200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; + /** + * Indicates whether the cancel operation was successful. + * @type {boolean} + * @memberof Cancel200Response + */ + 'cancelSuccessful': boolean; +} +/** + * Request to cancel an ongoing transaction session, identified by the session ID. + * @export + * @interface CancelRequest + */ +export interface CancelRequest { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof CancelRequest + */ + 'sessionID': string; +} +/** + * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + * @export + * @interface CancelResponse + */ +export interface CancelResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof CancelResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; + /** + * Indicates whether the cancel operation was successful. + * @type {boolean} + * @memberof CancelResponse + */ + 'cancelSuccessful': boolean; +} +/** + * + * @export + * @interface Chain + */ +export interface Chain { + /** + * A unique identifier for the blockchain network. + * @type {string} + * @memberof Chain + */ + 'chainId': string; + /** + * The name of the blockchain network. + * @type {string} + * @memberof Chain + */ + 'chainName': string; + /** + * The type of blockchain network (e.g., \'evm\', \'fabric\'). + * @type {string} + * @memberof Chain + */ + 'chainType': string; + /** + * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). + * @type {string} + * @memberof Chain + */ + 'networkName': string; +} +/** + * + * @export + * @interface Chains1Inner + */ +export interface Chains1Inner { + /** + * A unique identifier for the blockchain network. + * @type {string} + * @memberof Chains1Inner + */ + 'chainId': string; + /** + * The name of the blockchain network. + * @type {string} + * @memberof Chains1Inner + */ + 'chainName': string; + /** + * The type of blockchain network (e.g., \'evm\', \'fabric\'). + * @type {string} + * @memberof Chains1Inner + */ + 'chainType': string; + /** + * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). + * @type {string} + * @memberof Chains1Inner + */ + 'networkName': string; +} +/** + * Response schema for a continue request, returning the status of the SATP session. + * @export + * @interface Continue200Response + */ +export interface Continue200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Continue200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Schema for a request to continue a paused transaction session. + * @export + * @interface ContinueRequest + */ +export interface ContinueRequest { + /** + * A unique identifier for the transaction session to be continued. + * @type {string} + * @memberof ContinueRequest + */ + 'sessionId': string; + /** + * A unique identifier for the transaction context. + * @type {string} + * @memberof ContinueRequest + */ + 'contextId': string; +} +/** + * Response schema for a continue request, returning the status of the SATP session. + * @export + * @interface ContinueResponse + */ +export interface ContinueResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof ContinueResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * + * @export + * @enum {string} + */ + +export const CredentialProfile = { + Saml: 'SAML', + Oauth: 'OAUTH', + X509: 'X509' +} as const; + +export type CredentialProfile = typeof CredentialProfile[keyof typeof CredentialProfile]; + + +/** + * Supported DLT protocols. + * @export + * @enum {string} + */ + +export const DLTProtocol = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type DLTProtocol = typeof DLTProtocol[keyof typeof DLTProtocol]; + + +/** + * Provides an estimation for a transaction, including costs, amounts, and execution duration. + * @export + * @interface Estimate + */ +export interface Estimate { + /** + * A blockchain address. + * @type {string} + * @memberof Estimate + */ + 'approvalAddress'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmountMin'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'fromAmount'?: string; + /** + * A collection of fee costs associated with the transaction. + * @type {Array} + * @memberof Estimate + */ + 'feeCosts'?: Array; + /** + * A collection of estimated gas costs for executing the transaction. + * @type {Array} + * @memberof Estimate + */ + 'gasCosts'?: Array; + /** + * The estimated duration for the transaction execution in seconds. + * @type {number} + * @memberof Estimate + */ + 'executionDuration'?: number; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'fromAmountUSD'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmountUSD'?: string; + /** + * The tool or service used to generate this estimate. + * @type {string} + * @memberof Estimate + */ + 'tool'?: string; +} +/** + * Details about a specific fee cost associated with the transaction. + * @export + * @interface FeeCost + */ +export interface FeeCost { + /** + * Name of the fee cost. + * @type {string} + * @memberof FeeCost + */ + 'name'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof FeeCost + */ + 'amount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof FeeCost + */ + 'amountUSD'?: string; + /** + * The symbol of a token + * @type {string} + * @memberof FeeCost + */ + 'token'?: string; + /** + * Indicates if the fee is included in the transaction amount. + * @type {boolean} + * @memberof FeeCost + */ + 'included'?: boolean; +} +/** + * + * @export + * @interface GasCost + */ +export interface GasCost { + /** + * The type of the gas cost. + * @type {string} + * @memberof GasCost + */ + 'type'?: string; + /** + * The gas price, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'price'?: string; + /** + * The estimated gas required, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'estimate'?: string; + /** + * The gas limit for the transaction, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'limit'?: string; + /** + * The amount of gas required in the gas currency. + * @type {string} + * @memberof GasCost + */ + 'amount'?: string; + /** + * The amount of gas required in USD. + * @type {string} + * @memberof GasCost + */ + 'amountUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GasCost + */ + 'token'?: GetRoutes200ResponseRoutesInnerFromToken; +} +/** + * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + * @export + * @interface GetAudit200Response + */ +export interface GetAudit200Response { + /** + * An array of strings representing proofs. + * @type {Array} + * @memberof GetAudit200Response + */ + 'proofs'?: Array; + /** + * The start datetime of the audit period. + * @type {string} + * @memberof GetAudit200Response + */ + 'auditStartTime'?: string; + /** + * The end datetime of the audit period. + * @type {string} + * @memberof GetAudit200Response + */ + 'auditEndTime'?: string; +} +/** + * Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. + * @export + * @interface GetAuditRequest + */ +export interface GetAuditRequest { + /** + * The start datetime for the audit. + * @type {string} + * @memberof GetAuditRequest + */ + 'auditStartDate'?: string; + /** + * The end datetime for the audit. + * @type {string} + * @memberof GetAuditRequest + */ + 'auditEndDate'?: string; + /** + * Include proofs generated from each gateway transaction. + * @type {boolean} + * @memberof GetAuditRequest + */ + 'includeProofs'?: boolean; +} +/** + * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + * @export + * @interface GetAuditResponse + */ +export interface GetAuditResponse { + /** + * An array of strings representing proofs. + * @type {Array} + * @memberof GetAuditResponse + */ + 'proofs'?: Array; + /** + * The start datetime of the audit period. + * @type {string} + * @memberof GetAuditResponse + */ + 'auditStartTime'?: string; + /** + * The end datetime of the audit period. + * @type {string} + * @memberof GetAuditResponse + */ + 'auditEndTime'?: string; +} +/** + * + * @export + * @interface GetHealthCheck200Response + */ +export interface GetHealthCheck200Response { + /** + * + * @type {string} + * @memberof GetHealthCheck200Response + */ + 'status'?: string; +} +/** + * A collection of available and unavailable routes + * @export + * @interface GetRoutes200Response + */ +export interface GetRoutes200Response { + /** + * A collection of route objects + * @type {Array} + * @memberof GetRoutes200Response + */ + 'routes': Array; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInner + */ +export interface GetRoutes200ResponseRoutesInner { + /** + * A unique identifier of the route. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'id': string; + /** + * A unique identifier for the gateway. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'gatewayID': string; + /** + * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'mode': GetRoutes200ResponseRoutesInnerModeEnum; + /** + * The ID of the DLT Network where the operation will originate. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromDLTNetworkID'?: string; + /** + * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromAmountUSD'?: number; + /** + * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The ID of the DLT Network where the operation will end. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toDLTNetworkID'?: string; + /** + * The expected amount to be received in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmountUSD'?: string; + /** + * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmount'?: string; + /** + * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmountMin'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The expected gas cost in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'gasCostUSD'?: string; + /** + * Whether chain switching is enabled or not. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'containsSwitchChain'?: boolean; + /** + * List of steps involved in this route, adjusted for mode. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'steps'?: Array; + /** + * + * @type {GetRoutes200ResponseRoutesInnerInsurance} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'tags'?: Array; +} + +export const GetRoutes200ResponseRoutesInnerModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type GetRoutes200ResponseRoutesInnerModeEnum = typeof GetRoutes200ResponseRoutesInnerModeEnum[keyof typeof GetRoutes200ResponseRoutesInnerModeEnum]; + +/** + * Metadata detailing a supported token + * @export + * @interface GetRoutes200ResponseRoutesInnerFromToken + */ +export interface GetRoutes200ResponseRoutesInnerFromToken { + /** + * The network of the DLT being interacted with. TODO: implement network identification draft + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'chainID': string; + /** + * Supported DLT protocols. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'chainType': GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'address': string; + /** + * The name of the token. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'name'?: string; + /** + * The symbol of the token. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'symbol': string; + /** + * How many decimals the token supports. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'decimals': number; + /** + * The logo of a token, chain, dex etc. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'logoURI'?: string; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'tags'?: Array; + /** + * The current price of the token in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'priceUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; +} + +export const GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum[keyof typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum]; + +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ +export interface GetRoutes200ResponseRoutesInnerFromTokenExtensions { + /** + * + * @type {{ [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ + 'bridgeInfo'?: { [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }; + /** + * Indicates whether the token is verified. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ + 'verified'?: boolean; +} +/** + * Information about the bridge used for the token transfer. + * @export + * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + */ +export interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + /** + * The address of the token being transferred. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + */ + 'tokenAddress'?: string; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerInsurance + */ +export interface GetRoutes200ResponseRoutesInnerInsurance { + /** + * The state of insurance applicability for the transaction. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerInsurance + */ + 'state'?: GetRoutes200ResponseRoutesInnerInsuranceStateEnum; + /** + * The fee amount for insurance, represented in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerInsurance + */ + 'feeAmountUsd'?: string; +} + +export const GetRoutes200ResponseRoutesInnerInsuranceStateEnum = { + NotInsurable: 'NOT_INSURABLE', + Insurable: 'INSURABLE', + Insured: 'INSURED' +} as const; + +export type GetRoutes200ResponseRoutesInnerInsuranceStateEnum = typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum[keyof typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum]; + +/** + * Details a single step within a route including actions and estimates. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInner { + /** + * Id of the step + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'id'?: string; + /** + * Type of the step, typically describing the action, e.g., \'swap\'. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'type'?: string; + /** + * Tool used in the step, e.g., \'stargate\'. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'tool'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * IDs of further steps included within this step, allowing for nested actions without direct recursion. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'includedStepIds'?: Array; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerAction + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerAction { + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'slippage'?: number; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromAddress'?: string; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'toAddress'?: string; +} +/** + * Provides an estimation for a transaction, including costs, amounts, and execution duration. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'approvalAddress'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmountMin'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'fromAmount'?: string; + /** + * A collection of fee costs associated with the transaction. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'feeCosts'?: Array; + /** + * A collection of estimated gas costs for executing the transaction. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'gasCosts'?: Array; + /** + * The estimated duration for the transaction execution in seconds. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'executionDuration'?: number; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'fromAmountUSD'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmountUSD'?: string; + /** + * The tool or service used to generate this estimate. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'tool'?: string; +} +/** + * Details about a specific fee cost associated with the transaction. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + /** + * Name of the fee cost. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'name'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'amount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'amountUSD'?: string; + /** + * The symbol of a token + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'token'?: string; + /** + * Indicates if the fee is included in the transaction amount. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'included'?: boolean; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + /** + * The type of the gas cost. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'type'?: string; + /** + * The gas price, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'price'?: string; + /** + * The estimated gas required, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'estimate'?: string; + /** + * The gas limit for the transaction, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'limit'?: string; + /** + * The amount of gas required in the gas currency. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'amount'?: string; + /** + * The amount of gas required in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'amountUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'token'?: GetRoutes200ResponseRoutesInnerFromToken; +} +/** + * Describes integration or tool details such as bridges or exchanges involved in the transaction. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + /** + * A unique identifier for the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'key': string; + /** + * The name of the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'name': string; + /** + * URL to the logo of the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'logoURI': string; +} +/** + * + * @export + * @interface HealthCheckResponse + */ +export interface HealthCheckResponse { + /** + * + * @type {string} + * @memberof HealthCheckResponse + */ + 'status'?: string; +} +/** + * Details a single step within a route including actions and estimates. + * @export + * @interface IncludedStep + */ +export interface IncludedStep { + /** + * Id of the step + * @type {string} + * @memberof IncludedStep + */ + 'id'?: string; + /** + * Type of the step, typically describing the action, e.g., \'swap\'. + * @type {string} + * @memberof IncludedStep + */ + 'type'?: string; + /** + * Tool used in the step, e.g., \'stargate\'. + * @type {string} + * @memberof IncludedStep + */ + 'tool'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} + * @memberof IncludedStep + */ + 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} + * @memberof IncludedStep + */ + 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof IncludedStep + */ + 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof IncludedStep + */ + 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * IDs of further steps included within this step, allowing for nested actions without direct recursion. + * @type {Array} + * @memberof IncludedStep + */ + 'includedStepIds'?: Array; +} +/** + * + * @export + * @interface Insurance + */ +export interface Insurance { + /** + * The state of insurance applicability for the transaction. + * @type {string} + * @memberof Insurance + */ + 'state'?: InsuranceStateEnum; + /** + * The fee amount for insurance, represented in USD. + * @type {string} + * @memberof Insurance + */ + 'feeAmountUsd'?: string; +} + +export const InsuranceStateEnum = { + NotInsurable: 'NOT_INSURABLE', + Insurable: 'INSURABLE', + Insured: 'INSURED' +} as const; + +export type InsuranceStateEnum = typeof InsuranceStateEnum[keyof typeof InsuranceStateEnum]; + +/** + * Describes integration or tool details such as bridges or exchanges involved in the transaction. + * @export + * @interface IntegrationDetails + */ +export interface IntegrationDetails { + /** + * A unique identifier for the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'key': string; + /** + * The name of the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'name': string; + /** + * URL to the logo of the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'logoURI': string; +} +/** + * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + * @export + * @interface Pause200Response + */ +export interface Pause200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Pause200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. + * @export + * @interface PauseRequest + */ +export interface PauseRequest { + /** + * + * @type {string} + * @memberof PauseRequest + */ + 'sessionId'?: string; + /** + * + * @type {string} + * @memberof PauseRequest + */ + 'contextId'?: string; +} +/** + * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + * @export + * @interface PauseResponse + */ +export interface PauseResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof PauseResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * + * @export + * @interface Route + */ +export interface Route { + /** + * A unique identifier of the route. + * @type {string} + * @memberof Route + */ + 'id': string; + /** + * A unique identifier for the gateway. + * @type {string} + * @memberof Route + */ + 'gatewayID': string; + /** + * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. + * @type {string} + * @memberof Route + */ + 'mode': RouteModeEnum; + /** + * The ID of the DLT Network where the operation will originate. + * @type {string} + * @memberof Route + */ + 'fromDLTNetworkID'?: string; + /** + * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. + * @type {number} + * @memberof Route + */ + 'fromAmountUSD'?: number; + /** + * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Route + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The ID of the DLT Network where the operation will end. + * @type {string} + * @memberof Route + */ + 'toDLTNetworkID'?: string; + /** + * The expected amount to be received in USD. + * @type {string} + * @memberof Route + */ + 'toAmountUSD'?: string; + /** + * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'toAmount'?: string; + /** + * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'toAmountMin'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Route + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The expected gas cost in USD. + * @type {string} + * @memberof Route + */ + 'gasCostUSD'?: string; + /** + * Whether chain switching is enabled or not. + * @type {boolean} + * @memberof Route + */ + 'containsSwitchChain'?: boolean; + /** + * List of steps involved in this route, adjusted for mode. + * @type {Array} + * @memberof Route + */ + 'steps'?: Array; + /** + * + * @type {GetRoutes200ResponseRoutesInnerInsurance} + * @memberof Route + */ + 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof Route + */ + 'tags'?: Array; +} + +export const RouteModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type RouteModeEnum = typeof RouteModeEnum[keyof typeof RouteModeEnum]; + +/** + * A collection of available and unavailable routes + * @export + * @interface RoutesResponse + */ +export interface RoutesResponse { + /** + * A collection of route objects + * @type {Array} + * @memberof RoutesResponse + */ + 'routes': Array; +} +/** + * Request for retrieving the current status of a session, identified by the session ID. + * @export + * @interface StatusRequest + */ +export interface StatusRequest { + /** + * The ID of the session for which the status is being requested. + * @type {string} + * @memberof StatusRequest + */ + 'sessionID': string; +} +/** + * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. + * @export + * @interface StatusResponse + */ +export interface StatusResponse { + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'status': StatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'substatus': StatusResponseSubstatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'stage': StatusResponseStageEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'step': StatusResponseStepEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'startTime': string; + /** + * + * @type {Transact200ResponseStatusResponseOriginChain} + * @memberof StatusResponse + */ + 'originChain': Transact200ResponseStatusResponseOriginChain; + /** + * + * @type {Transact200ResponseStatusResponseDestinationChain} + * @memberof StatusResponse + */ + 'destinationChain': Transact200ResponseStatusResponseDestinationChain; +} + +export const StatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type StatusResponseStatusEnum = typeof StatusResponseStatusEnum[keyof typeof StatusResponseStatusEnum]; +export const StatusResponseSubstatusEnum = { + WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', + WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', + BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', + ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', + RefundInProgress: 'REFUND_IN_PROGRESS', + UnknownError: 'UNKNOWN_ERROR', + Completed: 'COMPLETED', + Partial: 'PARTIAL', + Refunded: 'REFUNDED', + NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' +} as const; + +export type StatusResponseSubstatusEnum = typeof StatusResponseSubstatusEnum[keyof typeof StatusResponseSubstatusEnum]; +export const StatusResponseStageEnum = { + Stage0: 'STAGE0', + Stage1: 'STAGE1', + Stage2: 'STAGE2', + Stage3: 'STAGE3' +} as const; + +export type StatusResponseStageEnum = typeof StatusResponseStageEnum[keyof typeof StatusResponseStageEnum]; +export const StatusResponseStepEnum = { + TransferInitializationClaims: 'transfer-initialization-claims', + ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', + TransferProposalMessage: 'transfer-proposal-message', + TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', + TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', + TransferCommenceMessage: 'transfer-commence-message', + CommenceResponseMessage: 'commence-response-message', + LockAssertionMessage: 'lock-assertion-message', + LockAssertionReceiptMessage: 'lock-assertion-receipt-message', + CommitPreparationMessage: 'commit-preparation-message', + CommitReadyMessage: 'commit-ready-message', + CommitFinalAssertionMessage: 'commit-final-assertion-message', + CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', + TransferCompleteMessage: 'transfer-complete-message', + RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', + RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', + RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', + RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', + RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', + RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', + RollbackCommenceResponseMessage: 'rollback-commence-response-message', + RollbackLockAssertionMessage: 'rollback-lock-assertion-message', + RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', + RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', + RollbackCommitReadyMessage: 'rollback-commit-ready-message', + RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', + RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', + RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' +} as const; + +export type StatusResponseStepEnum = typeof StatusResponseStepEnum[keyof typeof StatusResponseStepEnum]; + +/** + * Metadata detailing a supported token + * @export + * @interface Token + */ +export interface Token { + /** + * The network of the DLT being interacted with. TODO: implement network identification draft + * @type {string} + * @memberof Token + */ + 'chainID': string; + /** + * Supported DLT protocols. + * @type {string} + * @memberof Token + */ + 'chainType': TokenChainTypeEnum; + /** + * A blockchain address. + * @type {string} + * @memberof Token + */ + 'address': string; + /** + * The name of the token. + * @type {string} + * @memberof Token + */ + 'name'?: string; + /** + * The symbol of the token. + * @type {string} + * @memberof Token + */ + 'symbol': string; + /** + * How many decimals the token supports. + * @type {number} + * @memberof Token + */ + 'decimals': number; + /** + * The logo of a token, chain, dex etc. + * @type {string} + * @memberof Token + */ + 'logoURI'?: string; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof Token + */ + 'tags'?: Array; + /** + * The current price of the token in USD. + * @type {string} + * @memberof Token + */ + 'priceUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} + * @memberof Token + */ + 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; +} + +export const TokenChainTypeEnum = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type TokenChainTypeEnum = typeof TokenChainTypeEnum[keyof typeof TokenChainTypeEnum]; + +/** + * Response schema for a transaction request. Includes the session ID and the current status of the transaction. + * @export + * @interface Transact200Response + */ +export interface Transact200Response { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof Transact200Response + */ + 'sessionID': string; + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Transact200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. + * @export + * @interface Transact200ResponseStatusResponse + */ +export interface Transact200ResponseStatusResponse { + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'status': Transact200ResponseStatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'substatus': Transact200ResponseStatusResponseSubstatusEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'stage': Transact200ResponseStatusResponseStageEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'step': Transact200ResponseStatusResponseStepEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'startTime': string; + /** + * + * @type {Transact200ResponseStatusResponseOriginChain} + * @memberof Transact200ResponseStatusResponse + */ + 'originChain': Transact200ResponseStatusResponseOriginChain; + /** + * + * @type {Transact200ResponseStatusResponseDestinationChain} + * @memberof Transact200ResponseStatusResponse + */ + 'destinationChain': Transact200ResponseStatusResponseDestinationChain; +} + +export const Transact200ResponseStatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type Transact200ResponseStatusResponseStatusEnum = typeof Transact200ResponseStatusResponseStatusEnum[keyof typeof Transact200ResponseStatusResponseStatusEnum]; +export const Transact200ResponseStatusResponseSubstatusEnum = { + WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', + WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', + BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', + ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', + RefundInProgress: 'REFUND_IN_PROGRESS', + UnknownError: 'UNKNOWN_ERROR', + Completed: 'COMPLETED', + Partial: 'PARTIAL', + Refunded: 'REFUNDED', + NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' +} as const; + +export type Transact200ResponseStatusResponseSubstatusEnum = typeof Transact200ResponseStatusResponseSubstatusEnum[keyof typeof Transact200ResponseStatusResponseSubstatusEnum]; +export const Transact200ResponseStatusResponseStageEnum = { + Stage0: 'STAGE0', + Stage1: 'STAGE1', + Stage2: 'STAGE2', + Stage3: 'STAGE3' +} as const; + +export type Transact200ResponseStatusResponseStageEnum = typeof Transact200ResponseStatusResponseStageEnum[keyof typeof Transact200ResponseStatusResponseStageEnum]; +export const Transact200ResponseStatusResponseStepEnum = { + TransferInitializationClaims: 'transfer-initialization-claims', + ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', + TransferProposalMessage: 'transfer-proposal-message', + TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', + TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', + TransferCommenceMessage: 'transfer-commence-message', + CommenceResponseMessage: 'commence-response-message', + LockAssertionMessage: 'lock-assertion-message', + LockAssertionReceiptMessage: 'lock-assertion-receipt-message', + CommitPreparationMessage: 'commit-preparation-message', + CommitReadyMessage: 'commit-ready-message', + CommitFinalAssertionMessage: 'commit-final-assertion-message', + CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', + TransferCompleteMessage: 'transfer-complete-message', + RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', + RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', + RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', + RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', + RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', + RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', + RollbackCommenceResponseMessage: 'rollback-commence-response-message', + RollbackLockAssertionMessage: 'rollback-lock-assertion-message', + RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', + RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', + RollbackCommitReadyMessage: 'rollback-commit-ready-message', + RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', + RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', + RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' +} as const; + +export type Transact200ResponseStatusResponseStepEnum = typeof Transact200ResponseStatusResponseStepEnum[keyof typeof Transact200ResponseStatusResponseStepEnum]; + +/** + * + * @export + * @interface Transact200ResponseStatusResponseDestinationChain + */ +export interface Transact200ResponseStatusResponseDestinationChain { + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseDestinationChain + */ + 'dltProtocol'?: any; + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseDestinationChain + */ + 'dltSubnetworkID'?: any; +} +/** + * + * @export + * @interface Transact200ResponseStatusResponseOriginChain + */ +export interface Transact200ResponseStatusResponseOriginChain { + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseOriginChain + */ + 'dltProtocol'?: any; + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseOriginChain + */ + 'dltSubnetworkID'?: any; +} +/** + * An Error + * @export + * @interface TransactDefaultResponse + */ +export interface TransactDefaultResponse { + /** + * HTTP error type + * @type {string} + * @memberof TransactDefaultResponse + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof TransactDefaultResponse + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof TransactDefaultResponse + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof TransactDefaultResponse + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof TransactDefaultResponse + */ + 'timestamp': string; +} +/** + * Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. + * @export + * @interface TransactRequest + */ +export interface TransactRequest { + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'contextID': string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'mode': TransactRequestModeEnum; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'payload'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromDLTNetworkID'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toDLTNetworkID'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromAmount'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromToken'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toAmount'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toToken'?: string; +} + +export const TransactRequestModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; + +/** + * Response schema for a transaction request. Includes the session ID and the current status of the transaction. + * @export + * @interface TransactResponse + */ +export interface TransactResponse { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof TransactResponse + */ + 'sessionID': string; + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof TransactResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} + +/** + * AdminApi - axios parameter creator + * @export + */ +export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _continue: async (continueRequest: ContinueRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'continueRequest' is not null or undefined + assertParamExists('_continue', 'continueRequest', continueRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(continueRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAudit: async (auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (auditStartDate !== undefined) { + localVarQueryParameter['auditStartDate'] = (auditStartDate as any instanceof Date) ? + (auditStartDate as any).toISOString() : + auditStartDate; + } + + if (auditEndDate !== undefined) { + localVarQueryParameter['auditEndDate'] = (auditEndDate as any instanceof Date) ? + (auditEndDate as any).toISOString() : + auditEndDate; + } + + if (includeProofs !== undefined) { + localVarQueryParameter['includeProofs'] = includeProofs; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHealthCheck: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatus: async (sessionID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'sessionID' is not null or undefined + assertParamExists('getStatus', 'sessionID', sessionID) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (sessionID !== undefined) { + localVarQueryParameter['SessionID'] = sessionID; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pause: async (pauseRequest: PauseRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'pauseRequest' is not null or undefined + assertParamExists('pause', 'pauseRequest', pauseRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(pauseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AdminApi - functional programming interface + * @export + */ +export const AdminApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator._continue(continueRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAudit(auditStartDate, auditEndDate, includeProofs, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHealthCheck(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheck(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatus(sessionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatus(sessionID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.pause(pauseRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AdminApi - factory interface + * @export + */ +export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AdminApiFp(configuration) + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _continue(continueRequest: ContinueRequest, options?: any): AxiosPromise { + return localVarFp._continue(continueRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: any): AxiosPromise { + return localVarFp.getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(axios, basePath)); + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHealthCheck(options?: any): AxiosPromise { + return localVarFp.getHealthCheck(options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatus(sessionID: string, options?: any): AxiosPromise { + return localVarFp.getStatus(sessionID, options).then((request) => request(axios, basePath)); + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pause(pauseRequest: PauseRequest, options?: any): AxiosPromise { + return localVarFp.pause(pauseRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AdminApi - object-oriented interface + * @export + * @class AdminApi + * @extends {BaseAPI} + */ +export class AdminApi extends BaseAPI { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration)._continue(continueRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getHealthCheck(options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getHealthCheck(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getStatus(sessionID: string, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getStatus(sessionID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).pause(pauseRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * TransactionApi - axios parameter creator + * @export + */ +export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel: async (cancelRequest: CancelRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'cancelRequest' is not null or undefined + assertParamExists('cancel', 'cancelRequest', cancelRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cancelRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getIntegrations: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoutes: async (fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'fromNetworkID' is not null or undefined + assertParamExists('getRoutes', 'fromNetworkID', fromNetworkID) + // verify required parameter 'fromAmount' is not null or undefined + assertParamExists('getRoutes', 'fromAmount', fromAmount) + // verify required parameter 'fromToken' is not null or undefined + assertParamExists('getRoutes', 'fromToken', fromToken) + // verify required parameter 'toDLTNetwork' is not null or undefined + assertParamExists('getRoutes', 'toDLTNetwork', toDLTNetwork) + // verify required parameter 'toToken' is not null or undefined + assertParamExists('getRoutes', 'toToken', toToken) + // verify required parameter 'fromAddress' is not null or undefined + assertParamExists('getRoutes', 'fromAddress', fromAddress) + // verify required parameter 'toAddress' is not null or undefined + assertParamExists('getRoutes', 'toAddress', toAddress) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (fromNetworkID !== undefined) { + localVarQueryParameter['fromNetworkID'] = fromNetworkID; + } + + if (fromAmount !== undefined) { + localVarQueryParameter['fromAmount'] = fromAmount; + } + + if (fromToken !== undefined) { + localVarQueryParameter['fromToken'] = fromToken; + } + + if (toDLTNetwork !== undefined) { + localVarQueryParameter['toDLTNetwork'] = toDLTNetwork; + } + + if (toToken !== undefined) { + localVarQueryParameter['toToken'] = toToken; + } + + if (fromAddress !== undefined) { + localVarQueryParameter['fromAddress'] = fromAddress; + } + + if (toAddress !== undefined) { + localVarQueryParameter['toAddress'] = toAddress; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact: async (transactRequest: TransactRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactRequest' is not null or undefined + assertParamExists('transact', 'transactRequest', transactRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransactionApi - functional programming interface + * @export + */ +export const TransactionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration) + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(cancelRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getIntegrations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getIntegrations(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async transact(transactRequest: TransactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.transact(transactRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TransactionApi - factory interface + * @export + */ +export const TransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionApiFp(configuration) + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel(cancelRequest: CancelRequest, options?: any): AxiosPromise { + return localVarFp.cancel(cancelRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getIntegrations(options?: any): AxiosPromise> { + return localVarFp.getIntegrations(options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: any): AxiosPromise { + return localVarFp.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(axios, basePath)); + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact(transactRequest: TransactRequest, options?: any): AxiosPromise { + return localVarFp.transact(transactRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransactionApi - object-oriented interface + * @export + * @class TransactionApi + * @extends {BaseAPI} + */ +export class TransactionApi extends BaseAPI { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).cancel(cancelRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public getIntegrations(options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).getIntegrations(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public transact(transactRequest: TransactRequest, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).transact(transactRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts new file mode 100644 index 0000000000..59018f25b9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts new file mode 100644 index 0000000000..e2604cb54e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts new file mode 100644 index 0000000000..a444ba448f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts new file mode 100644 index 0000000000..d13fdacf7f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES new file mode 100644 index 0000000000..53250c0269 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES @@ -0,0 +1,5 @@ +api.ts +base.ts +common.ts +configuration.ts +index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts new file mode 100644 index 0000000000..d80bb5dc08 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts @@ -0,0 +1,2678 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; + +/** + * An Error + * @export + * @interface APIError + */ +export interface APIError { + /** + * HTTP error type + * @type {string} + * @memberof APIError + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof APIError + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof APIError + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof APIError + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof APIError + */ + 'timestamp': string; +} +/** + * + * @export + * @interface Action + */ +export interface Action { + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Action + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. + * @type {string} + * @memberof Action + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Action + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. + * @type {number} + * @memberof Action + */ + 'slippage'?: number; + /** + * A blockchain address. + * @type {string} + * @memberof Action + */ + 'fromAddress'?: string; + /** + * A blockchain address. + * @type {string} + * @memberof Action + */ + 'toAddress'?: string; +} +/** + * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 + * @export + * @enum {string} + */ + +export const AuthzJwtClaim = { + /** + * The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. + */ + iss: 'Hyperledger Labs - Carbon Accounting Tool' +} as const; + +export type AuthzJwtClaim = typeof AuthzJwtClaim[keyof typeof AuthzJwtClaim]; + + +/** + * + * @export + * @enum {string} + */ + +export const AuthzScope = { + /** + * Identities with the group:admin scope are administrators of the system. + */ + GroupAdmin: 'group:admin', + /** + * Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. + */ + GroupUser: 'group:user' +} as const; + +export type AuthzScope = typeof AuthzScope[keyof typeof AuthzScope]; + + +/** + * Information about the bridge used for the token transfer. + * @export + * @interface BridgeInfo + */ +export interface BridgeInfo { + /** + * The address of the token being transferred. + * @type {string} + * @memberof BridgeInfo + */ + 'tokenAddress'?: string; +} +/** + * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + * @export + * @interface Cancel200Response + */ +export interface Cancel200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Cancel200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; + /** + * Indicates whether the cancel operation was successful. + * @type {boolean} + * @memberof Cancel200Response + */ + 'cancelSuccessful': boolean; +} +/** + * Request to cancel an ongoing transaction session, identified by the session ID. + * @export + * @interface CancelRequest + */ +export interface CancelRequest { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof CancelRequest + */ + 'sessionID': string; +} +/** + * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + * @export + * @interface CancelResponse + */ +export interface CancelResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof CancelResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; + /** + * Indicates whether the cancel operation was successful. + * @type {boolean} + * @memberof CancelResponse + */ + 'cancelSuccessful': boolean; +} +/** + * + * @export + * @interface Chain + */ +export interface Chain { + /** + * A unique identifier for the blockchain network. + * @type {string} + * @memberof Chain + */ + 'chainId': string; + /** + * The name of the blockchain network. + * @type {string} + * @memberof Chain + */ + 'chainName': string; + /** + * The type of blockchain network (e.g., \'evm\', \'fabric\'). + * @type {string} + * @memberof Chain + */ + 'chainType': string; + /** + * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). + * @type {string} + * @memberof Chain + */ + 'networkName': string; +} +/** + * + * @export + * @interface Chains1Inner + */ +export interface Chains1Inner { + /** + * A unique identifier for the blockchain network. + * @type {string} + * @memberof Chains1Inner + */ + 'chainId': string; + /** + * The name of the blockchain network. + * @type {string} + * @memberof Chains1Inner + */ + 'chainName': string; + /** + * The type of blockchain network (e.g., \'evm\', \'fabric\'). + * @type {string} + * @memberof Chains1Inner + */ + 'chainType': string; + /** + * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). + * @type {string} + * @memberof Chains1Inner + */ + 'networkName': string; +} +/** + * Response schema for a continue request, returning the status of the SATP session. + * @export + * @interface Continue200Response + */ +export interface Continue200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Continue200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Schema for a request to continue a paused transaction session. + * @export + * @interface ContinueRequest + */ +export interface ContinueRequest { + /** + * A unique identifier for the transaction session to be continued. + * @type {string} + * @memberof ContinueRequest + */ + 'sessionId': string; + /** + * A unique identifier for the transaction context. + * @type {string} + * @memberof ContinueRequest + */ + 'contextId': string; +} +/** + * Response schema for a continue request, returning the status of the SATP session. + * @export + * @interface ContinueResponse + */ +export interface ContinueResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof ContinueResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * + * @export + * @enum {string} + */ + +export const CredentialProfile = { + Saml: 'SAML', + Oauth: 'OAUTH', + X509: 'X509' +} as const; + +export type CredentialProfile = typeof CredentialProfile[keyof typeof CredentialProfile]; + + +/** + * Supported DLT protocols. + * @export + * @enum {string} + */ + +export const DLTProtocol = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type DLTProtocol = typeof DLTProtocol[keyof typeof DLTProtocol]; + + +/** + * Provides an estimation for a transaction, including costs, amounts, and execution duration. + * @export + * @interface Estimate + */ +export interface Estimate { + /** + * A blockchain address. + * @type {string} + * @memberof Estimate + */ + 'approvalAddress'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmountMin'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'fromAmount'?: string; + /** + * A collection of fee costs associated with the transaction. + * @type {Array} + * @memberof Estimate + */ + 'feeCosts'?: Array; + /** + * A collection of estimated gas costs for executing the transaction. + * @type {Array} + * @memberof Estimate + */ + 'gasCosts'?: Array; + /** + * The estimated duration for the transaction execution in seconds. + * @type {number} + * @memberof Estimate + */ + 'executionDuration'?: number; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'fromAmountUSD'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmountUSD'?: string; + /** + * The tool or service used to generate this estimate. + * @type {string} + * @memberof Estimate + */ + 'tool'?: string; +} +/** + * Details about a specific fee cost associated with the transaction. + * @export + * @interface FeeCost + */ +export interface FeeCost { + /** + * Name of the fee cost. + * @type {string} + * @memberof FeeCost + */ + 'name'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof FeeCost + */ + 'amount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof FeeCost + */ + 'amountUSD'?: string; + /** + * The symbol of a token + * @type {string} + * @memberof FeeCost + */ + 'token'?: string; + /** + * Indicates if the fee is included in the transaction amount. + * @type {boolean} + * @memberof FeeCost + */ + 'included'?: boolean; +} +/** + * + * @export + * @interface GasCost + */ +export interface GasCost { + /** + * The type of the gas cost. + * @type {string} + * @memberof GasCost + */ + 'type'?: string; + /** + * The gas price, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'price'?: string; + /** + * The estimated gas required, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'estimate'?: string; + /** + * The gas limit for the transaction, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'limit'?: string; + /** + * The amount of gas required in the gas currency. + * @type {string} + * @memberof GasCost + */ + 'amount'?: string; + /** + * The amount of gas required in USD. + * @type {string} + * @memberof GasCost + */ + 'amountUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GasCost + */ + 'token'?: GetRoutes200ResponseRoutesInnerFromToken; +} +/** + * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + * @export + * @interface GetAudit200Response + */ +export interface GetAudit200Response { + /** + * An array of strings representing proofs. + * @type {Array} + * @memberof GetAudit200Response + */ + 'proofs'?: Array; + /** + * The start datetime of the audit period. + * @type {string} + * @memberof GetAudit200Response + */ + 'auditStartTime'?: string; + /** + * The end datetime of the audit period. + * @type {string} + * @memberof GetAudit200Response + */ + 'auditEndTime'?: string; +} +/** + * Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. + * @export + * @interface GetAuditRequest + */ +export interface GetAuditRequest { + /** + * The start datetime for the audit. + * @type {string} + * @memberof GetAuditRequest + */ + 'auditStartDate'?: string; + /** + * The end datetime for the audit. + * @type {string} + * @memberof GetAuditRequest + */ + 'auditEndDate'?: string; + /** + * Include proofs generated from each gateway transaction. + * @type {boolean} + * @memberof GetAuditRequest + */ + 'includeProofs'?: boolean; +} +/** + * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + * @export + * @interface GetAuditResponse + */ +export interface GetAuditResponse { + /** + * An array of strings representing proofs. + * @type {Array} + * @memberof GetAuditResponse + */ + 'proofs'?: Array; + /** + * The start datetime of the audit period. + * @type {string} + * @memberof GetAuditResponse + */ + 'auditStartTime'?: string; + /** + * The end datetime of the audit period. + * @type {string} + * @memberof GetAuditResponse + */ + 'auditEndTime'?: string; +} +/** + * + * @export + * @interface GetHealthCheck200Response + */ +export interface GetHealthCheck200Response { + /** + * + * @type {string} + * @memberof GetHealthCheck200Response + */ + 'status'?: string; +} +/** + * A collection of available and unavailable routes + * @export + * @interface GetRoutes200Response + */ +export interface GetRoutes200Response { + /** + * A collection of route objects + * @type {Array} + * @memberof GetRoutes200Response + */ + 'routes': Array; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInner + */ +export interface GetRoutes200ResponseRoutesInner { + /** + * A unique identifier of the route. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'id': string; + /** + * A unique identifier for the gateway. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'gatewayID': string; + /** + * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'mode': GetRoutes200ResponseRoutesInnerModeEnum; + /** + * The ID of the DLT Network where the operation will originate. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromDLTNetworkID'?: string; + /** + * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromAmountUSD'?: number; + /** + * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The ID of the DLT Network where the operation will end. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toDLTNetworkID'?: string; + /** + * The expected amount to be received in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmountUSD'?: string; + /** + * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmount'?: string; + /** + * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmountMin'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The expected gas cost in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'gasCostUSD'?: string; + /** + * Whether chain switching is enabled or not. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'containsSwitchChain'?: boolean; + /** + * List of steps involved in this route, adjusted for mode. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'steps'?: Array; + /** + * + * @type {GetRoutes200ResponseRoutesInnerInsurance} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'tags'?: Array; +} + +export const GetRoutes200ResponseRoutesInnerModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type GetRoutes200ResponseRoutesInnerModeEnum = typeof GetRoutes200ResponseRoutesInnerModeEnum[keyof typeof GetRoutes200ResponseRoutesInnerModeEnum]; + +/** + * Metadata detailing a supported token + * @export + * @interface GetRoutes200ResponseRoutesInnerFromToken + */ +export interface GetRoutes200ResponseRoutesInnerFromToken { + /** + * The network of the DLT being interacted with. TODO: implement network identification draft + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'chainID': string; + /** + * Supported DLT protocols. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'chainType': GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'address': string; + /** + * The name of the token. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'name'?: string; + /** + * The symbol of the token. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'symbol': string; + /** + * How many decimals the token supports. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'decimals': number; + /** + * The logo of a token, chain, dex etc. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'logoURI'?: string; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'tags'?: Array; + /** + * The current price of the token in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'priceUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; +} + +export const GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum[keyof typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum]; + +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ +export interface GetRoutes200ResponseRoutesInnerFromTokenExtensions { + /** + * + * @type {{ [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ + 'bridgeInfo'?: { [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }; + /** + * Indicates whether the token is verified. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ + 'verified'?: boolean; +} +/** + * Information about the bridge used for the token transfer. + * @export + * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + */ +export interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + /** + * The address of the token being transferred. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + */ + 'tokenAddress'?: string; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerInsurance + */ +export interface GetRoutes200ResponseRoutesInnerInsurance { + /** + * The state of insurance applicability for the transaction. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerInsurance + */ + 'state'?: GetRoutes200ResponseRoutesInnerInsuranceStateEnum; + /** + * The fee amount for insurance, represented in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerInsurance + */ + 'feeAmountUsd'?: string; +} + +export const GetRoutes200ResponseRoutesInnerInsuranceStateEnum = { + NotInsurable: 'NOT_INSURABLE', + Insurable: 'INSURABLE', + Insured: 'INSURED' +} as const; + +export type GetRoutes200ResponseRoutesInnerInsuranceStateEnum = typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum[keyof typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum]; + +/** + * Details a single step within a route including actions and estimates. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInner { + /** + * Id of the step + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'id'?: string; + /** + * Type of the step, typically describing the action, e.g., \'swap\'. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'type'?: string; + /** + * Tool used in the step, e.g., \'stargate\'. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'tool'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * IDs of further steps included within this step, allowing for nested actions without direct recursion. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'includedStepIds'?: Array; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerAction + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerAction { + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'slippage'?: number; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromAddress'?: string; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'toAddress'?: string; +} +/** + * Provides an estimation for a transaction, including costs, amounts, and execution duration. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'approvalAddress'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmountMin'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'fromAmount'?: string; + /** + * A collection of fee costs associated with the transaction. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'feeCosts'?: Array; + /** + * A collection of estimated gas costs for executing the transaction. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'gasCosts'?: Array; + /** + * The estimated duration for the transaction execution in seconds. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'executionDuration'?: number; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'fromAmountUSD'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmountUSD'?: string; + /** + * The tool or service used to generate this estimate. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'tool'?: string; +} +/** + * Details about a specific fee cost associated with the transaction. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + /** + * Name of the fee cost. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'name'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'amount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'amountUSD'?: string; + /** + * The symbol of a token + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'token'?: string; + /** + * Indicates if the fee is included in the transaction amount. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'included'?: boolean; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + /** + * The type of the gas cost. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'type'?: string; + /** + * The gas price, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'price'?: string; + /** + * The estimated gas required, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'estimate'?: string; + /** + * The gas limit for the transaction, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'limit'?: string; + /** + * The amount of gas required in the gas currency. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'amount'?: string; + /** + * The amount of gas required in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'amountUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'token'?: GetRoutes200ResponseRoutesInnerFromToken; +} +/** + * Describes integration or tool details such as bridges or exchanges involved in the transaction. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + /** + * A unique identifier for the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'key': string; + /** + * The name of the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'name': string; + /** + * URL to the logo of the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'logoURI': string; +} +/** + * + * @export + * @interface HealthCheckResponse + */ +export interface HealthCheckResponse { + /** + * + * @type {string} + * @memberof HealthCheckResponse + */ + 'status'?: string; +} +/** + * Details a single step within a route including actions and estimates. + * @export + * @interface IncludedStep + */ +export interface IncludedStep { + /** + * Id of the step + * @type {string} + * @memberof IncludedStep + */ + 'id'?: string; + /** + * Type of the step, typically describing the action, e.g., \'swap\'. + * @type {string} + * @memberof IncludedStep + */ + 'type'?: string; + /** + * Tool used in the step, e.g., \'stargate\'. + * @type {string} + * @memberof IncludedStep + */ + 'tool'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} + * @memberof IncludedStep + */ + 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} + * @memberof IncludedStep + */ + 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof IncludedStep + */ + 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof IncludedStep + */ + 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * IDs of further steps included within this step, allowing for nested actions without direct recursion. + * @type {Array} + * @memberof IncludedStep + */ + 'includedStepIds'?: Array; +} +/** + * + * @export + * @interface Insurance + */ +export interface Insurance { + /** + * The state of insurance applicability for the transaction. + * @type {string} + * @memberof Insurance + */ + 'state'?: InsuranceStateEnum; + /** + * The fee amount for insurance, represented in USD. + * @type {string} + * @memberof Insurance + */ + 'feeAmountUsd'?: string; +} + +export const InsuranceStateEnum = { + NotInsurable: 'NOT_INSURABLE', + Insurable: 'INSURABLE', + Insured: 'INSURED' +} as const; + +export type InsuranceStateEnum = typeof InsuranceStateEnum[keyof typeof InsuranceStateEnum]; + +/** + * Describes integration or tool details such as bridges or exchanges involved in the transaction. + * @export + * @interface IntegrationDetails + */ +export interface IntegrationDetails { + /** + * A unique identifier for the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'key': string; + /** + * The name of the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'name': string; + /** + * URL to the logo of the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'logoURI': string; +} +/** + * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + * @export + * @interface Pause200Response + */ +export interface Pause200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Pause200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. + * @export + * @interface PauseRequest + */ +export interface PauseRequest { + /** + * + * @type {string} + * @memberof PauseRequest + */ + 'sessionId'?: string; + /** + * + * @type {string} + * @memberof PauseRequest + */ + 'contextId'?: string; +} +/** + * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + * @export + * @interface PauseResponse + */ +export interface PauseResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof PauseResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * + * @export + * @interface Route + */ +export interface Route { + /** + * A unique identifier of the route. + * @type {string} + * @memberof Route + */ + 'id': string; + /** + * A unique identifier for the gateway. + * @type {string} + * @memberof Route + */ + 'gatewayID': string; + /** + * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. + * @type {string} + * @memberof Route + */ + 'mode': RouteModeEnum; + /** + * The ID of the DLT Network where the operation will originate. + * @type {string} + * @memberof Route + */ + 'fromDLTNetworkID'?: string; + /** + * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. + * @type {number} + * @memberof Route + */ + 'fromAmountUSD'?: number; + /** + * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Route + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The ID of the DLT Network where the operation will end. + * @type {string} + * @memberof Route + */ + 'toDLTNetworkID'?: string; + /** + * The expected amount to be received in USD. + * @type {string} + * @memberof Route + */ + 'toAmountUSD'?: string; + /** + * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'toAmount'?: string; + /** + * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'toAmountMin'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Route + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The expected gas cost in USD. + * @type {string} + * @memberof Route + */ + 'gasCostUSD'?: string; + /** + * Whether chain switching is enabled or not. + * @type {boolean} + * @memberof Route + */ + 'containsSwitchChain'?: boolean; + /** + * List of steps involved in this route, adjusted for mode. + * @type {Array} + * @memberof Route + */ + 'steps'?: Array; + /** + * + * @type {GetRoutes200ResponseRoutesInnerInsurance} + * @memberof Route + */ + 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof Route + */ + 'tags'?: Array; +} + +export const RouteModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type RouteModeEnum = typeof RouteModeEnum[keyof typeof RouteModeEnum]; + +/** + * A collection of available and unavailable routes + * @export + * @interface RoutesResponse + */ +export interface RoutesResponse { + /** + * A collection of route objects + * @type {Array} + * @memberof RoutesResponse + */ + 'routes': Array; +} +/** + * Request for retrieving the current status of a session, identified by the session ID. + * @export + * @interface StatusRequest + */ +export interface StatusRequest { + /** + * The ID of the session for which the status is being requested. + * @type {string} + * @memberof StatusRequest + */ + 'sessionID': string; +} +/** + * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. + * @export + * @interface StatusResponse + */ +export interface StatusResponse { + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'status': StatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'substatus': StatusResponseSubstatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'stage': StatusResponseStageEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'step': StatusResponseStepEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'startTime': string; + /** + * + * @type {Transact200ResponseStatusResponseOriginChain} + * @memberof StatusResponse + */ + 'originChain': Transact200ResponseStatusResponseOriginChain; + /** + * + * @type {Transact200ResponseStatusResponseDestinationChain} + * @memberof StatusResponse + */ + 'destinationChain': Transact200ResponseStatusResponseDestinationChain; +} + +export const StatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type StatusResponseStatusEnum = typeof StatusResponseStatusEnum[keyof typeof StatusResponseStatusEnum]; +export const StatusResponseSubstatusEnum = { + WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', + WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', + BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', + ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', + RefundInProgress: 'REFUND_IN_PROGRESS', + UnknownError: 'UNKNOWN_ERROR', + Completed: 'COMPLETED', + Partial: 'PARTIAL', + Refunded: 'REFUNDED', + NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' +} as const; + +export type StatusResponseSubstatusEnum = typeof StatusResponseSubstatusEnum[keyof typeof StatusResponseSubstatusEnum]; +export const StatusResponseStageEnum = { + Stage0: 'STAGE0', + Stage1: 'STAGE1', + Stage2: 'STAGE2', + Stage3: 'STAGE3' +} as const; + +export type StatusResponseStageEnum = typeof StatusResponseStageEnum[keyof typeof StatusResponseStageEnum]; +export const StatusResponseStepEnum = { + TransferInitializationClaims: 'transfer-initialization-claims', + ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', + TransferProposalMessage: 'transfer-proposal-message', + TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', + TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', + TransferCommenceMessage: 'transfer-commence-message', + CommenceResponseMessage: 'commence-response-message', + LockAssertionMessage: 'lock-assertion-message', + LockAssertionReceiptMessage: 'lock-assertion-receipt-message', + CommitPreparationMessage: 'commit-preparation-message', + CommitReadyMessage: 'commit-ready-message', + CommitFinalAssertionMessage: 'commit-final-assertion-message', + CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', + TransferCompleteMessage: 'transfer-complete-message', + RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', + RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', + RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', + RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', + RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', + RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', + RollbackCommenceResponseMessage: 'rollback-commence-response-message', + RollbackLockAssertionMessage: 'rollback-lock-assertion-message', + RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', + RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', + RollbackCommitReadyMessage: 'rollback-commit-ready-message', + RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', + RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', + RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' +} as const; + +export type StatusResponseStepEnum = typeof StatusResponseStepEnum[keyof typeof StatusResponseStepEnum]; + +/** + * Metadata detailing a supported token + * @export + * @interface Token + */ +export interface Token { + /** + * The network of the DLT being interacted with. TODO: implement network identification draft + * @type {string} + * @memberof Token + */ + 'chainID': string; + /** + * Supported DLT protocols. + * @type {string} + * @memberof Token + */ + 'chainType': TokenChainTypeEnum; + /** + * A blockchain address. + * @type {string} + * @memberof Token + */ + 'address': string; + /** + * The name of the token. + * @type {string} + * @memberof Token + */ + 'name'?: string; + /** + * The symbol of the token. + * @type {string} + * @memberof Token + */ + 'symbol': string; + /** + * How many decimals the token supports. + * @type {number} + * @memberof Token + */ + 'decimals': number; + /** + * The logo of a token, chain, dex etc. + * @type {string} + * @memberof Token + */ + 'logoURI'?: string; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof Token + */ + 'tags'?: Array; + /** + * The current price of the token in USD. + * @type {string} + * @memberof Token + */ + 'priceUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} + * @memberof Token + */ + 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; +} + +export const TokenChainTypeEnum = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type TokenChainTypeEnum = typeof TokenChainTypeEnum[keyof typeof TokenChainTypeEnum]; + +/** + * Response schema for a transaction request. Includes the session ID and the current status of the transaction. + * @export + * @interface Transact200Response + */ +export interface Transact200Response { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof Transact200Response + */ + 'sessionID': string; + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Transact200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. + * @export + * @interface Transact200ResponseStatusResponse + */ +export interface Transact200ResponseStatusResponse { + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'status': Transact200ResponseStatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'substatus': Transact200ResponseStatusResponseSubstatusEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'stage': Transact200ResponseStatusResponseStageEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'step': Transact200ResponseStatusResponseStepEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'startTime': string; + /** + * + * @type {Transact200ResponseStatusResponseOriginChain} + * @memberof Transact200ResponseStatusResponse + */ + 'originChain': Transact200ResponseStatusResponseOriginChain; + /** + * + * @type {Transact200ResponseStatusResponseDestinationChain} + * @memberof Transact200ResponseStatusResponse + */ + 'destinationChain': Transact200ResponseStatusResponseDestinationChain; +} + +export const Transact200ResponseStatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type Transact200ResponseStatusResponseStatusEnum = typeof Transact200ResponseStatusResponseStatusEnum[keyof typeof Transact200ResponseStatusResponseStatusEnum]; +export const Transact200ResponseStatusResponseSubstatusEnum = { + WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', + WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', + BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', + ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', + RefundInProgress: 'REFUND_IN_PROGRESS', + UnknownError: 'UNKNOWN_ERROR', + Completed: 'COMPLETED', + Partial: 'PARTIAL', + Refunded: 'REFUNDED', + NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' +} as const; + +export type Transact200ResponseStatusResponseSubstatusEnum = typeof Transact200ResponseStatusResponseSubstatusEnum[keyof typeof Transact200ResponseStatusResponseSubstatusEnum]; +export const Transact200ResponseStatusResponseStageEnum = { + Stage0: 'STAGE0', + Stage1: 'STAGE1', + Stage2: 'STAGE2', + Stage3: 'STAGE3' +} as const; + +export type Transact200ResponseStatusResponseStageEnum = typeof Transact200ResponseStatusResponseStageEnum[keyof typeof Transact200ResponseStatusResponseStageEnum]; +export const Transact200ResponseStatusResponseStepEnum = { + TransferInitializationClaims: 'transfer-initialization-claims', + ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', + TransferProposalMessage: 'transfer-proposal-message', + TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', + TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', + TransferCommenceMessage: 'transfer-commence-message', + CommenceResponseMessage: 'commence-response-message', + LockAssertionMessage: 'lock-assertion-message', + LockAssertionReceiptMessage: 'lock-assertion-receipt-message', + CommitPreparationMessage: 'commit-preparation-message', + CommitReadyMessage: 'commit-ready-message', + CommitFinalAssertionMessage: 'commit-final-assertion-message', + CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', + TransferCompleteMessage: 'transfer-complete-message', + RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', + RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', + RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', + RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', + RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', + RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', + RollbackCommenceResponseMessage: 'rollback-commence-response-message', + RollbackLockAssertionMessage: 'rollback-lock-assertion-message', + RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', + RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', + RollbackCommitReadyMessage: 'rollback-commit-ready-message', + RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', + RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', + RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' +} as const; + +export type Transact200ResponseStatusResponseStepEnum = typeof Transact200ResponseStatusResponseStepEnum[keyof typeof Transact200ResponseStatusResponseStepEnum]; + +/** + * + * @export + * @interface Transact200ResponseStatusResponseDestinationChain + */ +export interface Transact200ResponseStatusResponseDestinationChain { + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseDestinationChain + */ + 'dltProtocol'?: any; + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseDestinationChain + */ + 'dltSubnetworkID'?: any; +} +/** + * + * @export + * @interface Transact200ResponseStatusResponseOriginChain + */ +export interface Transact200ResponseStatusResponseOriginChain { + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseOriginChain + */ + 'dltProtocol'?: any; + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseOriginChain + */ + 'dltSubnetworkID'?: any; +} +/** + * An Error + * @export + * @interface TransactDefaultResponse + */ +export interface TransactDefaultResponse { + /** + * HTTP error type + * @type {string} + * @memberof TransactDefaultResponse + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof TransactDefaultResponse + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof TransactDefaultResponse + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof TransactDefaultResponse + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof TransactDefaultResponse + */ + 'timestamp': string; +} +/** + * Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. + * @export + * @interface TransactRequest + */ +export interface TransactRequest { + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'contextID': string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'mode': TransactRequestModeEnum; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'payload'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromDLTNetworkID'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toDLTNetworkID'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromAmount'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromToken'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toAmount'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toToken'?: string; +} + +export const TransactRequestModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; + +/** + * Response schema for a transaction request. Includes the session ID and the current status of the transaction. + * @export + * @interface TransactResponse + */ +export interface TransactResponse { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof TransactResponse + */ + 'sessionID': string; + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof TransactResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} + +/** + * AdminApi - axios parameter creator + * @export + */ +export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _continue: async (continueRequest: ContinueRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'continueRequest' is not null or undefined + assertParamExists('_continue', 'continueRequest', continueRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(continueRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAudit: async (auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (auditStartDate !== undefined) { + localVarQueryParameter['auditStartDate'] = (auditStartDate as any instanceof Date) ? + (auditStartDate as any).toISOString() : + auditStartDate; + } + + if (auditEndDate !== undefined) { + localVarQueryParameter['auditEndDate'] = (auditEndDate as any instanceof Date) ? + (auditEndDate as any).toISOString() : + auditEndDate; + } + + if (includeProofs !== undefined) { + localVarQueryParameter['includeProofs'] = includeProofs; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHealthCheck: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatus: async (sessionID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'sessionID' is not null or undefined + assertParamExists('getStatus', 'sessionID', sessionID) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (sessionID !== undefined) { + localVarQueryParameter['SessionID'] = sessionID; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pause: async (pauseRequest: PauseRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'pauseRequest' is not null or undefined + assertParamExists('pause', 'pauseRequest', pauseRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(pauseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AdminApi - functional programming interface + * @export + */ +export const AdminApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator._continue(continueRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAudit(auditStartDate, auditEndDate, includeProofs, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHealthCheck(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheck(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatus(sessionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatus(sessionID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.pause(pauseRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AdminApi - factory interface + * @export + */ +export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AdminApiFp(configuration) + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _continue(continueRequest: ContinueRequest, options?: any): AxiosPromise { + return localVarFp._continue(continueRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: any): AxiosPromise { + return localVarFp.getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(axios, basePath)); + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHealthCheck(options?: any): AxiosPromise { + return localVarFp.getHealthCheck(options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatus(sessionID: string, options?: any): AxiosPromise { + return localVarFp.getStatus(sessionID, options).then((request) => request(axios, basePath)); + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pause(pauseRequest: PauseRequest, options?: any): AxiosPromise { + return localVarFp.pause(pauseRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AdminApi - object-oriented interface + * @export + * @class AdminApi + * @extends {BaseAPI} + */ +export class AdminApi extends BaseAPI { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration)._continue(continueRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getHealthCheck(options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getHealthCheck(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getStatus(sessionID: string, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getStatus(sessionID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).pause(pauseRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * TransactionApi - axios parameter creator + * @export + */ +export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel: async (cancelRequest: CancelRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'cancelRequest' is not null or undefined + assertParamExists('cancel', 'cancelRequest', cancelRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cancelRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getIntegrations: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoutes: async (fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'fromNetworkID' is not null or undefined + assertParamExists('getRoutes', 'fromNetworkID', fromNetworkID) + // verify required parameter 'fromAmount' is not null or undefined + assertParamExists('getRoutes', 'fromAmount', fromAmount) + // verify required parameter 'fromToken' is not null or undefined + assertParamExists('getRoutes', 'fromToken', fromToken) + // verify required parameter 'toDLTNetwork' is not null or undefined + assertParamExists('getRoutes', 'toDLTNetwork', toDLTNetwork) + // verify required parameter 'toToken' is not null or undefined + assertParamExists('getRoutes', 'toToken', toToken) + // verify required parameter 'fromAddress' is not null or undefined + assertParamExists('getRoutes', 'fromAddress', fromAddress) + // verify required parameter 'toAddress' is not null or undefined + assertParamExists('getRoutes', 'toAddress', toAddress) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (fromNetworkID !== undefined) { + localVarQueryParameter['fromNetworkID'] = fromNetworkID; + } + + if (fromAmount !== undefined) { + localVarQueryParameter['fromAmount'] = fromAmount; + } + + if (fromToken !== undefined) { + localVarQueryParameter['fromToken'] = fromToken; + } + + if (toDLTNetwork !== undefined) { + localVarQueryParameter['toDLTNetwork'] = toDLTNetwork; + } + + if (toToken !== undefined) { + localVarQueryParameter['toToken'] = toToken; + } + + if (fromAddress !== undefined) { + localVarQueryParameter['fromAddress'] = fromAddress; + } + + if (toAddress !== undefined) { + localVarQueryParameter['toAddress'] = toAddress; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact: async (transactRequest: TransactRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactRequest' is not null or undefined + assertParamExists('transact', 'transactRequest', transactRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransactionApi - functional programming interface + * @export + */ +export const TransactionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration) + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(cancelRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getIntegrations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getIntegrations(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async transact(transactRequest: TransactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.transact(transactRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TransactionApi - factory interface + * @export + */ +export const TransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionApiFp(configuration) + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel(cancelRequest: CancelRequest, options?: any): AxiosPromise { + return localVarFp.cancel(cancelRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getIntegrations(options?: any): AxiosPromise> { + return localVarFp.getIntegrations(options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: any): AxiosPromise { + return localVarFp.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(axios, basePath)); + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact(transactRequest: TransactRequest, options?: any): AxiosPromise { + return localVarFp.transact(transactRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransactionApi - object-oriented interface + * @export + * @class TransactionApi + * @extends {BaseAPI} + */ +export class TransactionApi extends BaseAPI { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).cancel(cancelRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public getIntegrations(options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).getIntegrations(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public transact(transactRequest: TransactRequest, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).transact(transactRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/base.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/base.ts new file mode 100644 index 0000000000..59018f25b9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/base.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/common.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/common.ts new file mode 100644 index 0000000000..e2604cb54e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/configuration.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/configuration.ts new file mode 100644 index 0000000000..a444ba448f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/configuration.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/index.ts new file mode 100644 index 0000000000..d13fdacf7f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts index d83286b979..80f11aeb25 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -102,6 +102,158 @@ export interface AssetProfile { */ 'ledgerRequirements'?: Array; } +/** + * + * @export + * @interface ClientRequestV1Request + */ +export interface ClientRequestV1Request { + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'version': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'loggingProfile': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'accessControlProfile': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'assetControlProfile': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'applicationProfile': string; + /** + * + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile} + * @memberof ClientRequestV1Request + */ + 'assetProfile': Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile; + /** + * + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfile} + * @memberof ClientRequestV1Request + */ + 'payloadProfile': Phase1TransferInitiationRequestV1RequestPayloadProfile; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'sourceGatewayDltSystem': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'recipientGatewayDltSystem': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'recipientGatewayPubkey': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'originatorPubkey': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'beneficiaryPubkey': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'clientDltSystem': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'serverDltSystem': string; + /** + * + * @type {ClientRequestV1RequestClientGatewayConfiguration} + * @memberof ClientRequestV1Request + */ + 'clientGatewayConfiguration': ClientRequestV1RequestClientGatewayConfiguration; + /** + * + * @type {ClientRequestV1RequestClientGatewayConfiguration} + * @memberof ClientRequestV1Request + */ + 'serverGatewayConfiguration': ClientRequestV1RequestClientGatewayConfiguration; + /** + * + * @type {number} + * @memberof ClientRequestV1Request + */ + 'maxRetries': number; + /** + * + * @type {number} + * @memberof ClientRequestV1Request + */ + 'maxTimeout': number; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'sourceLedgerAssetID': string; + /** + * + * @type {string} + * @memberof ClientRequestV1Request + */ + 'recipientLedgerAssetID': string; +} +/** + * + * @export + * @interface ClientRequestV1RequestClientGatewayConfiguration + */ +export interface ClientRequestV1RequestClientGatewayConfiguration { + /** + * + * @type {string} + * @memberof ClientRequestV1RequestClientGatewayConfiguration + */ + 'apiHost': string; +} /** * * @export @@ -140,16 +292,16 @@ export interface ClientV1Request { 'applicationProfile': string; /** * - * @type {AssetProfile} + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile} * @memberof ClientV1Request */ - 'assetProfile': AssetProfile; + 'assetProfile': Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile; /** * - * @type {PayloadProfile} + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfile} * @memberof ClientV1Request */ - 'payloadProfile': PayloadProfile; + 'payloadProfile': Phase1TransferInitiationRequestV1RequestPayloadProfile; /** * * @type {string} @@ -206,16 +358,16 @@ export interface ClientV1Request { 'serverDltSystem': string; /** * - * @type {ClientV1RequestClientGatewayConfiguration} + * @type {ClientRequestV1RequestClientGatewayConfiguration} * @memberof ClientV1Request */ - 'clientGatewayConfiguration': ClientV1RequestClientGatewayConfiguration; + 'clientGatewayConfiguration': ClientRequestV1RequestClientGatewayConfiguration; /** * - * @type {ClientV1RequestClientGatewayConfiguration} + * @type {ClientRequestV1RequestClientGatewayConfiguration} * @memberof ClientV1Request */ - 'serverGatewayConfiguration': ClientV1RequestClientGatewayConfiguration; + 'serverGatewayConfiguration': ClientRequestV1RequestClientGatewayConfiguration; /** * * @type {number} @@ -241,19 +393,6 @@ export interface ClientV1Request { */ 'recipientLedgerAssetID': string; } -/** - * - * @export - * @interface ClientV1RequestClientGatewayConfiguration - */ -export interface ClientV1RequestClientGatewayConfiguration { - /** - * - * @type {string} - * @memberof ClientV1RequestClientGatewayConfiguration - */ - 'apiHost': string; -} /** * * @export @@ -622,195 +761,1259 @@ export interface LockEvidenceV1Request { * @type {string} * @memberof LockEvidenceV1Request */ - 'clientIdentityPubkey': string; + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'lockEvidenceClaim': string; + /** + * + * @type {object} + * @memberof LockEvidenceV1Request + */ + 'lockEvidenceFormat'?: object | null; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'lockEvidenceExpiration': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'hashCommenceAckRequest': string; + /** + * + * @type {number} + * @memberof LockEvidenceV1Request + */ + 'clientTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'signature': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Request + */ + 'messageHash'?: string; + /** + * + * @type {number} + * @memberof LockEvidenceV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface LockEvidenceV1Response + */ +export interface LockEvidenceV1Response { + /** + * + * @type {string} + * @memberof LockEvidenceV1Response + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Response + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Response + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Response + */ + 'hashLockEvidenceRequest': string; + /** + * + * @type {number} + * @memberof LockEvidenceV1Response + */ + 'serverTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof LockEvidenceV1Response + */ + 'signature': string; + /** + * + * @type {string} + * @memberof LockEvidenceV1Response + */ + 'messageType': string; + /** + * + * @type {number} + * @memberof LockEvidenceV1Response + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface PayloadProfile + */ +export interface PayloadProfile { + /** + * + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile} + * @memberof PayloadProfile + */ + 'assetProfile': Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile; + /** + * + * @type {string} + * @memberof PayloadProfile + */ + 'capabilities'?: string; +} +/** + * + * @export + * @interface Phase1TransferInitiationRequestV1Request + */ +export interface Phase1TransferInitiationRequestV1Request { + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'version'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'developerURN'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'credentialProfile'?: Phase1TransferInitiationRequestV1RequestCredentialProfileEnum; + /** + * + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfile} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'payloadProfile': Phase1TransferInitiationRequestV1RequestPayloadProfile; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'applicationProfile': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'loggingProfile': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'accessControlProfile': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'signature': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'sourceGatewayPubkey': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'sourceGatewayDltSystem': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'recipientGatewayPubkey': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'recipientGatewayDltSystem': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'escrowType'?: Phase1TransferInitiationRequestV1RequestEscrowTypeEnum; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'expiryTime'?: string; + /** + * + * @type {boolean} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'multipleClaimsAllowed'?: boolean; + /** + * + * @type {boolean} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'multipleCancelsAllowed'?: boolean; + /** + * + * @type {object} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'permissions'?: object; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'origin'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'destination'?: string; + /** + * + * @type {object} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'subsequentCalls'?: object; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'histories'?: Array; + /** + * + * @type {number} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'sequenceNumber': number; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'sourceBasePath': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'recipientBasePath': string; + /** + * + * @type {number} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'maxRetries': number; + /** + * + * @type {number} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'maxTimeout': number; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'backupGatewaysAllowed': Array; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'recipientLedgerAssetID': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1Request + */ + 'sourceLedgerAssetID': string; +} + +export const Phase1TransferInitiationRequestV1RequestCredentialProfileEnum = { + Saml: 'SAML', + Oauth: 'OAUTH', + X509: 'X509' +} as const; + +export type Phase1TransferInitiationRequestV1RequestCredentialProfileEnum = typeof Phase1TransferInitiationRequestV1RequestCredentialProfileEnum[keyof typeof Phase1TransferInitiationRequestV1RequestCredentialProfileEnum]; +export const Phase1TransferInitiationRequestV1RequestEscrowTypeEnum = { + Faucet: 'FAUCET', + Timelock: 'TIMELOCK', + Hashlock: 'HASHLOCK', + Hashtimelock: 'HASHTIMELOCK', + Multiclaimpc: 'MULTICLAIMPC', + Destroy: 'DESTROY', + Burn: 'BURN' +} as const; + +export type Phase1TransferInitiationRequestV1RequestEscrowTypeEnum = typeof Phase1TransferInitiationRequestV1RequestEscrowTypeEnum[keyof typeof Phase1TransferInitiationRequestV1RequestEscrowTypeEnum]; + +/** + * + * @export + * @interface Phase1TransferInitiationRequestV1RequestHistoriesInner + */ +export interface Phase1TransferInitiationRequestV1RequestHistoriesInner { + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'Transactions'?: Array; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'Actions'?: Array; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'Origin'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'Destination'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'Balance'?: string; + /** + * + * @type {object} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'CurrentStatus'?: object; + /** + * + * @type {object} + * @memberof Phase1TransferInitiationRequestV1RequestHistoriesInner + */ + 'ApplicationSpecificParameters'?: object; +} +/** + * + * @export + * @interface Phase1TransferInitiationRequestV1RequestPayloadProfile + */ +export interface Phase1TransferInitiationRequestV1RequestPayloadProfile { + /** + * + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfile + */ + 'assetProfile': Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfile + */ + 'capabilities'?: string; +} +/** + * + * @export + * @interface Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ +export interface Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile { + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'issuer'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'assetCode'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'assetCodeType'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'issuanceDate'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'expirationDate': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'verificationEndPoint'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'digitalSignature'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'prospectusLink'?: string; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'keyInformationLink'?: Array; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'keyWord'?: Array; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'transferRestriction'?: Array; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile + */ + 'ledgerRequirements'?: Array; +} +/** + * + * @export + * @interface Phase1TransferInitiationResponseV1Request + */ +export interface Phase1TransferInitiationResponseV1Request { + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'sessionID': string; + /** + * + * @type {number} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'sequenceNumber': number; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'odapPhase'?: Phase1TransferInitiationResponseV1RequestOdapPhaseEnum; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'initialRequestMessageHash': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'destination'?: string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'timeStamp': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'processedTimeStamp': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'signature': string; + /** + * + * @type {Array} + * @memberof Phase1TransferInitiationResponseV1Request + */ + 'backupGatewaysAllowed': Array; +} + +export const Phase1TransferInitiationResponseV1RequestOdapPhaseEnum = { + TransferInitialization: 'TransferInitialization', + LockEvidenceVerification: 'LockEvidenceVerification', + CommitmentEstablishment: 'CommitmentEstablishment' +} as const; + +export type Phase1TransferInitiationResponseV1RequestOdapPhaseEnum = typeof Phase1TransferInitiationResponseV1RequestOdapPhaseEnum[keyof typeof Phase1TransferInitiationResponseV1RequestOdapPhaseEnum]; + +/** + * + * @export + * @interface Phase2LockEvidenceRequestV1Request + */ +export interface Phase2LockEvidenceRequestV1Request { + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'lockEvidenceClaim': string; + /** + * + * @type {object} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'lockEvidenceFormat'?: object | null; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'lockEvidenceExpiration': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'hashCommenceAckRequest': string; + /** + * + * @type {number} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'clientTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'signature': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'messageHash'?: string; + /** + * + * @type {number} + * @memberof Phase2LockEvidenceRequestV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase2LockEvidenceResponseV1Request + */ +export interface Phase2LockEvidenceResponseV1Request { + /** + * + * @type {string} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'hashLockEvidenceRequest': string; + /** + * + * @type {number} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'serverTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'signature': string; + /** + * + * @type {string} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'messageType': string; + /** + * + * @type {number} + * @memberof Phase2LockEvidenceResponseV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase2TransferCommenceRequestV1Request + */ +export interface Phase2TransferCommenceRequestV1Request { + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'originatorPubkey': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'beneficiaryPubkey': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'senderDltSystem': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'recipientDltSystem': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'hashAssetProfile': string; + /** + * + * @type {number} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'assetUnit'?: number; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'hashPrevMessage': string; + /** + * + * @type {number} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'clientTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'signature': string; + /** + * + * @type {number} + * @memberof Phase2TransferCommenceRequestV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase2TransferCommenceResponseV1Request + */ +export interface Phase2TransferCommenceResponseV1Request { + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'hashCommenceRequest': string; + /** + * + * @type {number} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'serverTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'signature': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'messageHash'?: string; + /** + * + * @type {number} + * @memberof Phase2TransferCommenceResponseV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase3CommitFinalRequestV1Request + */ +export interface Phase3CommitFinalRequestV1Request { + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'commitFinalClaim': string; + /** + * + * @type {object} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'commitFinalClaimFormat'?: object; + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'hashCommitPrepareAck': string; + /** + * + * @type {number} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'clientTransferNumber'?: number | null; + /** + * + * @type {string} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'signature': string; + /** + * + * @type {number} + * @memberof Phase3CommitFinalRequestV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase3CommitFinalResponseV1Request + */ +export interface Phase3CommitFinalResponseV1Request { + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'commitAcknowledgementClaim': string; + /** + * + * @type {object} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'commitAcknowledgementClaimFormat'?: object; + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'hashCommitFinal': string; + /** + * + * @type {number} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'serverTransferNumber'?: number; + /** + * + * @type {string} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'signature': string; + /** + * + * @type {number} + * @memberof Phase3CommitFinalResponseV1Request + */ + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase3CommitPreparationRequestV1Request + */ +export interface Phase3CommitPreparationRequestV1Request { + /** + * + * @type {string} + * @memberof Phase3CommitPreparationRequestV1Request + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof Phase3CommitPreparationRequestV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase3CommitPreparationRequestV1Request + */ + 'clientIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase3CommitPreparationRequestV1Request + */ + 'serverIdentityPubkey': string; + /** + * + * @type {string} + * @memberof Phase3CommitPreparationRequestV1Request + */ + 'hashLockEvidenceAck': string; + /** + * + * @type {number} + * @memberof Phase3CommitPreparationRequestV1Request + */ + 'clientTransferNumber'?: number; /** * * @type {string} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationRequestV1Request */ - 'serverIdentityPubkey': string; + 'signature': string; /** * - * @type {string} - * @memberof LockEvidenceV1Request + * @type {number} + * @memberof Phase3CommitPreparationRequestV1Request */ - 'lockEvidenceClaim': string; + 'sequenceNumber': number; +} +/** + * + * @export + * @interface Phase3CommitPreparationResponseV1Request + */ +export interface Phase3CommitPreparationResponseV1Request { /** * - * @type {object} - * @memberof LockEvidenceV1Request + * @type {string} + * @memberof Phase3CommitPreparationResponseV1Request */ - 'lockEvidenceFormat'?: object; + 'sessionID': string; /** * * @type {string} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationResponseV1Request */ - 'lockEvidenceExpiration': string; + 'messageType': string; /** * * @type {string} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationResponseV1Request */ - 'hashCommenceAckRequest': string; + 'clientIdentityPubkey': string; /** * - * @type {number} - * @memberof LockEvidenceV1Request + * @type {string} + * @memberof Phase3CommitPreparationResponseV1Request */ - 'clientTransferNumber'?: number | null; + 'serverIdentityPubkey': string; /** * * @type {string} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationResponseV1Request */ - 'signature': string; + 'hashCommitPrep': string; /** * * @type {string} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationResponseV1Request */ - 'messageType': string; + 'serverTransferNumber'?: string; /** * * @type {string} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationResponseV1Request */ - 'messageHash'?: string; + 'signature': string; /** * * @type {number} - * @memberof LockEvidenceV1Request + * @memberof Phase3CommitPreparationResponseV1Request */ 'sequenceNumber': number; } /** * * @export - * @interface LockEvidenceV1Response + * @interface Phase3TransferCompleteRequestV1Request */ -export interface LockEvidenceV1Response { +export interface Phase3TransferCompleteRequestV1Request { /** * * @type {string} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ 'sessionID': string; /** * * @type {string} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request + */ + 'messageType': string; + /** + * + * @type {string} + * @memberof Phase3TransferCompleteRequestV1Request */ 'clientIdentityPubkey': string; /** * * @type {string} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ 'serverIdentityPubkey': string; /** * * @type {string} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ - 'hashLockEvidenceRequest': string; + 'hashCommitFinalAck': string; /** * * @type {number} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ - 'serverTransferNumber'?: number | null; + 'clientTransferNumber'?: number | null; /** * * @type {string} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ 'signature': string; /** * * @type {string} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ - 'messageType': string; + 'hashTransferCommence': string; /** * * @type {number} - * @memberof LockEvidenceV1Response + * @memberof Phase3TransferCompleteRequestV1Request */ 'sequenceNumber': number; } /** * * @export - * @interface PayloadProfile + * @interface RecoverSuccessV1Message */ -export interface PayloadProfile { +export interface RecoverSuccessV1Message { /** * - * @type {AssetProfile} - * @memberof PayloadProfile + * @type {string} + * @memberof RecoverSuccessV1Message + */ + 'sessionID': string; + /** + * + * @type {boolean} + * @memberof RecoverSuccessV1Message */ - 'assetProfile': AssetProfile; + 'success': boolean; /** * * @type {string} - * @memberof PayloadProfile + * @memberof RecoverSuccessV1Message */ - 'capabilities'?: string; + 'signature': string; } /** * * @export - * @interface RecoverSuccessV1Message + * @interface RecoverUpdateAckV1Message */ -export interface RecoverSuccessV1Message { +export interface RecoverUpdateAckV1Message { /** * * @type {string} - * @memberof RecoverSuccessV1Message + * @memberof RecoverUpdateAckV1Message */ 'sessionID': string; /** * * @type {boolean} - * @memberof RecoverSuccessV1Message + * @memberof RecoverUpdateAckV1Message */ 'success': boolean; + /** + * + * @type {Array} + * @memberof RecoverUpdateAckV1Message + */ + 'changedEntriesHash': Array; /** * * @type {string} - * @memberof RecoverSuccessV1Message + * @memberof RecoverUpdateAckV1Message */ 'signature': string; } /** * * @export - * @interface RecoverUpdateAckV1Message + * @interface RecoverUpdateAckV1MessageRequest */ -export interface RecoverUpdateAckV1Message { +export interface RecoverUpdateAckV1MessageRequest { /** * * @type {string} - * @memberof RecoverUpdateAckV1Message + * @memberof RecoverUpdateAckV1MessageRequest */ 'sessionID': string; /** * * @type {boolean} - * @memberof RecoverUpdateAckV1Message + * @memberof RecoverUpdateAckV1MessageRequest */ 'success': boolean; /** * * @type {Array} - * @memberof RecoverUpdateAckV1Message + * @memberof RecoverUpdateAckV1MessageRequest */ 'changedEntriesHash': Array; /** * * @type {string} - * @memberof RecoverUpdateAckV1Message + * @memberof RecoverUpdateAckV1MessageRequest */ 'signature': string; } @@ -828,10 +2031,10 @@ export interface RecoverUpdateV1Message { 'sessionID': string; /** * - * @type {Array} + * @type {Array} * @memberof RecoverUpdateV1Message */ - 'recoveredLogs': Array; + 'recoveredLogs': Array; /** * * @type {string} @@ -839,6 +2042,74 @@ export interface RecoverUpdateV1Message { */ 'signature': string; } +/** + * + * @export + * @interface RecoverUpdateV1MessageRequest + */ +export interface RecoverUpdateV1MessageRequest { + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequest + */ + 'sessionID': string; + /** + * + * @type {Array} + * @memberof RecoverUpdateV1MessageRequest + */ + 'recoveredLogs': Array; + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequest + */ + 'signature': string; +} +/** + * + * @export + * @interface RecoverUpdateV1MessageRequestRecoveredLogsInner + */ +export interface RecoverUpdateV1MessageRequestRecoveredLogsInner { + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequestRecoveredLogsInner + */ + 'key'?: string; + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequestRecoveredLogsInner + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequestRecoveredLogsInner + */ + 'data'?: string; + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequestRecoveredLogsInner + */ + 'type': string; + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequestRecoveredLogsInner + */ + 'operation': string; + /** + * + * @type {string} + * @memberof RecoverUpdateV1MessageRequestRecoveredLogsInner + */ + 'timestamp'?: string; +} /** * * @export @@ -894,6 +2165,86 @@ export interface RecoverV1Message { */ 'signature': string; } +/** + * + * @export + * @interface RecoverV1MessageRequest + */ +export interface RecoverV1MessageRequest { + /** + * + * @type {string} + * @memberof RecoverV1MessageRequest + */ + 'sessionID': string; + /** + * + * @type {string} + * @memberof RecoverV1MessageRequest + */ + 'odapPhase': string; + /** + * + * @type {number} + * @memberof RecoverV1MessageRequest + */ + 'sequenceNumber': number; + /** + * + * @type {string} + * @memberof RecoverV1MessageRequest + */ + 'lastLogEntryTimestamp': string; + /** + * + * @type {boolean} + * @memberof RecoverV1MessageRequest + */ + 'isBackup': boolean; + /** + * + * @type {string} + * @memberof RecoverV1MessageRequest + */ + 'newBasePath': string; + /** + * + * @type {string} + * @memberof RecoverV1MessageRequest + */ + 'newGatewayPubKey'?: string; + /** + * + * @type {string} + * @memberof RecoverV1MessageRequest + */ + 'signature': string; +} +/** + * + * @export + * @interface RecoverV1SuccessRequest + */ +export interface RecoverV1SuccessRequest { + /** + * + * @type {string} + * @memberof RecoverV1SuccessRequest + */ + 'sessionID': string; + /** + * + * @type {boolean} + * @memberof RecoverV1SuccessRequest + */ + 'success': boolean; + /** + * + * @type {string} + * @memberof RecoverV1SuccessRequest + */ + 'signature': string; +} /** * * @export @@ -956,6 +2307,43 @@ export interface RollbackV1Message { */ 'signature': string; } +/** + * + * @export + * @interface RollbackV1MessageRequest + */ +export interface RollbackV1MessageRequest { + /** + * + * @type {string} + * @memberof RollbackV1MessageRequest + */ + 'sessionID': string; + /** + * + * @type {boolean} + * @memberof RollbackV1MessageRequest + */ + 'success': boolean; + /** + * + * @type {Array} + * @memberof RollbackV1MessageRequest + */ + 'actionPerformed': Array; + /** + * + * @type {Array} + * @memberof RollbackV1MessageRequest + */ + 'proofs': Array; + /** + * + * @type {string} + * @memberof RollbackV1MessageRequest + */ + 'signature': string; +} /** * * @export @@ -1006,10 +2394,10 @@ export interface SatpMessage { 'CredentialBlock'?: Array; /** * - * @type {PayloadProfile} + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfile} * @memberof SatpMessage */ - 'CredentialsProfile'?: PayloadProfile; + 'CredentialsProfile'?: Phase1TransferInitiationRequestV1RequestPayloadProfile; /** * * @type {object} @@ -1128,16 +2516,16 @@ export interface SessionData { 'applicationProfile'?: string; /** * - * @type {PayloadProfile} + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfile} * @memberof SessionData */ - 'payloadProfile'?: PayloadProfile; + 'payloadProfile'?: Phase1TransferInitiationRequestV1RequestPayloadProfile; /** * - * @type {AssetProfile} + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile} * @memberof SessionData */ - 'assetProfile'?: AssetProfile; + 'assetProfile'?: Phase1TransferInitiationRequestV1RequestPayloadProfileAssetProfile; /** * * @type {Array} @@ -1706,16 +3094,16 @@ export interface TransferInitializationV1Request { 'developerURN'?: string; /** * - * @type {CredentialProfile} + * @type {string} * @memberof TransferInitializationV1Request */ - 'credentialProfile'?: CredentialProfile; + 'credentialProfile'?: TransferInitializationV1RequestCredentialProfileEnum; /** * - * @type {PayloadProfile} + * @type {Phase1TransferInitiationRequestV1RequestPayloadProfile} * @memberof TransferInitializationV1Request */ - 'payloadProfile': PayloadProfile; + 'payloadProfile': Phase1TransferInitiationRequestV1RequestPayloadProfile; /** * * @type {string} @@ -1814,10 +3202,10 @@ export interface TransferInitializationV1Request { 'subsequentCalls'?: object; /** * - * @type {Array} + * @type {Array} * @memberof TransferInitializationV1Request */ - 'histories'?: Array; + 'histories'?: Array; /** * * @type {number} @@ -1868,6 +3256,13 @@ export interface TransferInitializationV1Request { 'sourceLedgerAssetID': string; } +export const TransferInitializationV1RequestCredentialProfileEnum = { + Saml: 'SAML', + Oauth: 'OAUTH', + X509: 'X509' +} as const; + +export type TransferInitializationV1RequestCredentialProfileEnum = typeof TransferInitializationV1RequestCredentialProfileEnum[keyof typeof TransferInitializationV1RequestCredentialProfileEnum]; export const TransferInitializationV1RequestEscrowTypeEnum = { Faucet: 'FAUCET', Timelock: 'TIMELOCK', @@ -1971,11 +3366,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati return { /** * - * @param {ClientV1Request} [clientV1Request] + * @param {ClientRequestV1Request} [clientRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - clientRequestV1: async (clientV1Request?: ClientV1Request, options: AxiosRequestConfig = {}): Promise => { + clientRequestV1: async (clientRequestV1Request?: ClientRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -1995,7 +3390,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(clientV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(clientRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2004,11 +3399,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] + * @param {Phase1TransferInitiationRequestV1Request} [phase1TransferInitiationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase1TransferInitiationRequestV1: async (transferInitializationV1Request?: TransferInitializationV1Request, options: AxiosRequestConfig = {}): Promise => { + phase1TransferInitiationRequestV1: async (phase1TransferInitiationRequestV1Request?: Phase1TransferInitiationRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2028,7 +3423,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferInitializationV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase1TransferInitiationRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2037,11 +3432,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] + * @param {Phase1TransferInitiationResponseV1Request} [phase1TransferInitiationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase1TransferInitiationResponseV1: async (transferInitializationV1Response?: TransferInitializationV1Response, options: AxiosRequestConfig = {}): Promise => { + phase1TransferInitiationResponseV1: async (phase1TransferInitiationResponseV1Request?: Phase1TransferInitiationResponseV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2061,7 +3456,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferInitializationV1Response, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase1TransferInitiationResponseV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2070,11 +3465,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] + * @param {Phase2LockEvidenceRequestV1Request} [phase2LockEvidenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2LockEvidenceRequestV1: async (lockEvidenceV1Request?: LockEvidenceV1Request, options: AxiosRequestConfig = {}): Promise => { + phase2LockEvidenceRequestV1: async (phase2LockEvidenceRequestV1Request?: Phase2LockEvidenceRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2094,7 +3489,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(lockEvidenceV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase2LockEvidenceRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2103,11 +3498,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] + * @param {Phase2LockEvidenceResponseV1Request} [phase2LockEvidenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2LockEvidenceResponseV1: async (lockEvidenceV1Response?: LockEvidenceV1Response, options: AxiosRequestConfig = {}): Promise => { + phase2LockEvidenceResponseV1: async (phase2LockEvidenceResponseV1Request?: Phase2LockEvidenceResponseV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2127,7 +3522,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(lockEvidenceV1Response, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase2LockEvidenceResponseV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2136,11 +3531,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] + * @param {Phase2TransferCommenceRequestV1Request} [phase2TransferCommenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2TransferCommenceRequestV1: async (transferCommenceV1Request?: TransferCommenceV1Request, options: AxiosRequestConfig = {}): Promise => { + phase2TransferCommenceRequestV1: async (phase2TransferCommenceRequestV1Request?: Phase2TransferCommenceRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2160,7 +3555,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferCommenceV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase2TransferCommenceRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2169,11 +3564,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] + * @param {Phase2TransferCommenceResponseV1Request} [phase2TransferCommenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2TransferCommenceResponseV1: async (transferCommenceV1Response?: TransferCommenceV1Response, options: AxiosRequestConfig = {}): Promise => { + phase2TransferCommenceResponseV1: async (phase2TransferCommenceResponseV1Request?: Phase2TransferCommenceResponseV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2193,7 +3588,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferCommenceV1Response, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase2TransferCommenceResponseV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2202,11 +3597,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {CommitFinalV1Request} [commitFinalV1Request] + * @param {Phase3CommitFinalRequestV1Request} [phase3CommitFinalRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitFinalRequestV1: async (commitFinalV1Request?: CommitFinalV1Request, options: AxiosRequestConfig = {}): Promise => { + phase3CommitFinalRequestV1: async (phase3CommitFinalRequestV1Request?: Phase3CommitFinalRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2226,7 +3621,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitFinalV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase3CommitFinalRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2235,11 +3630,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {CommitFinalV1Response} [commitFinalV1Response] + * @param {Phase3CommitFinalResponseV1Request} [phase3CommitFinalResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitFinalResponseV1: async (commitFinalV1Response?: CommitFinalV1Response, options: AxiosRequestConfig = {}): Promise => { + phase3CommitFinalResponseV1: async (phase3CommitFinalResponseV1Request?: Phase3CommitFinalResponseV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2259,7 +3654,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitFinalV1Response, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase3CommitFinalResponseV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2268,11 +3663,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] + * @param {Phase3CommitPreparationRequestV1Request} [phase3CommitPreparationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitPreparationRequestV1: async (commitPreparationV1Request?: CommitPreparationV1Request, options: AxiosRequestConfig = {}): Promise => { + phase3CommitPreparationRequestV1: async (phase3CommitPreparationRequestV1Request?: Phase3CommitPreparationRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2292,7 +3687,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitPreparationV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase3CommitPreparationRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2301,11 +3696,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] + * @param {Phase3CommitPreparationResponseV1Request} [phase3CommitPreparationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitPreparationResponseV1: async (commitPreparationV1Response?: CommitPreparationV1Response, options: AxiosRequestConfig = {}): Promise => { + phase3CommitPreparationResponseV1: async (phase3CommitPreparationResponseV1Request?: Phase3CommitPreparationResponseV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2325,7 +3720,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(commitPreparationV1Response, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase3CommitPreparationResponseV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2334,11 +3729,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] + * @param {Phase3TransferCompleteRequestV1Request} [phase3TransferCompleteRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3TransferCompleteRequestV1: async (transferCompleteV1Request?: TransferCompleteV1Request, options: AxiosRequestConfig = {}): Promise => { + phase3TransferCompleteRequestV1: async (phase3TransferCompleteRequestV1Request?: Phase3TransferCompleteRequestV1Request, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2358,7 +3753,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transferCompleteV1Request, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(phase3TransferCompleteRequestV1Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2367,11 +3762,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] + * @param {RecoverUpdateAckV1MessageRequest} [recoverUpdateAckV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverUpdateAckV1Message: async (recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options: AxiosRequestConfig = {}): Promise => { + recoverUpdateAckV1Message: async (recoverUpdateAckV1MessageRequest?: RecoverUpdateAckV1MessageRequest, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2391,7 +3786,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverUpdateAckV1Message, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(recoverUpdateAckV1MessageRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2400,11 +3795,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] + * @param {RecoverUpdateV1MessageRequest} [recoverUpdateV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverUpdateV1Message: async (recoverUpdateV1Message?: RecoverUpdateV1Message, options: AxiosRequestConfig = {}): Promise => { + recoverUpdateV1Message: async (recoverUpdateV1MessageRequest?: RecoverUpdateV1MessageRequest, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2424,7 +3819,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverUpdateV1Message, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(recoverUpdateV1MessageRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2433,11 +3828,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {RecoverV1Message} [recoverV1Message] + * @param {RecoverV1MessageRequest} [recoverV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverV1Message: async (recoverV1Message?: RecoverV1Message, options: AxiosRequestConfig = {}): Promise => { + recoverV1Message: async (recoverV1MessageRequest?: RecoverV1MessageRequest, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2457,7 +3852,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverV1Message, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(recoverV1MessageRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2466,11 +3861,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverV1Success: async (recoverSuccessV1Message?: RecoverSuccessV1Message, options: AxiosRequestConfig = {}): Promise => { + recoverV1Success: async (recoverV1SuccessRequest?: RecoverV1SuccessRequest, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2490,7 +3885,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(recoverSuccessV1Message, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(recoverV1SuccessRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2499,11 +3894,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {RollbackAckV1Message} [rollbackAckV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rollbackAckV1Message: async (rollbackAckV1Message?: RollbackAckV1Message, options: AxiosRequestConfig = {}): Promise => { + rollbackAckV1Message: async (recoverV1SuccessRequest?: RecoverV1SuccessRequest, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2523,7 +3918,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rollbackAckV1Message, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(recoverV1SuccessRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2532,11 +3927,11 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }, /** * - * @param {RollbackV1Message} [rollbackV1Message] + * @param {RollbackV1MessageRequest} [rollbackV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rollbackV1Message: async (rollbackV1Message?: RollbackV1Message, options: AxiosRequestConfig = {}): Promise => { + rollbackV1Message: async (rollbackV1MessageRequest?: RollbackV1MessageRequest, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2556,7 +3951,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(rollbackV1Message, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(rollbackV1MessageRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2575,182 +3970,182 @@ export const DefaultApiFp = function(configuration?: Configuration) { return { /** * - * @param {ClientV1Request} [clientV1Request] + * @param {ClientRequestV1Request} [clientRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async clientRequestV1(clientV1Request?: ClientV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.clientRequestV1(clientV1Request, options); + async clientRequestV1(clientRequestV1Request?: ClientRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.clientRequestV1(clientRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] + * @param {Phase1TransferInitiationRequestV1Request} [phase1TransferInitiationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase1TransferInitiationRequestV1(transferInitializationV1Request?: TransferInitializationV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase1TransferInitiationRequestV1(transferInitializationV1Request, options); + async phase1TransferInitiationRequestV1(phase1TransferInitiationRequestV1Request?: Phase1TransferInitiationRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase1TransferInitiationRequestV1(phase1TransferInitiationRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] + * @param {Phase1TransferInitiationResponseV1Request} [phase1TransferInitiationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase1TransferInitiationResponseV1(transferInitializationV1Response?: TransferInitializationV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase1TransferInitiationResponseV1(transferInitializationV1Response, options); + async phase1TransferInitiationResponseV1(phase1TransferInitiationResponseV1Request?: Phase1TransferInitiationResponseV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase1TransferInitiationResponseV1(phase1TransferInitiationResponseV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] + * @param {Phase2LockEvidenceRequestV1Request} [phase2LockEvidenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase2LockEvidenceRequestV1(lockEvidenceV1Request?: LockEvidenceV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2LockEvidenceRequestV1(lockEvidenceV1Request, options); + async phase2LockEvidenceRequestV1(phase2LockEvidenceRequestV1Request?: Phase2LockEvidenceRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase2LockEvidenceRequestV1(phase2LockEvidenceRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] + * @param {Phase2LockEvidenceResponseV1Request} [phase2LockEvidenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase2LockEvidenceResponseV1(lockEvidenceV1Response?: LockEvidenceV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2LockEvidenceResponseV1(lockEvidenceV1Response, options); + async phase2LockEvidenceResponseV1(phase2LockEvidenceResponseV1Request?: Phase2LockEvidenceResponseV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase2LockEvidenceResponseV1(phase2LockEvidenceResponseV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] + * @param {Phase2TransferCommenceRequestV1Request} [phase2TransferCommenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase2TransferCommenceRequestV1(transferCommenceV1Request?: TransferCommenceV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2TransferCommenceRequestV1(transferCommenceV1Request, options); + async phase2TransferCommenceRequestV1(phase2TransferCommenceRequestV1Request?: Phase2TransferCommenceRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase2TransferCommenceRequestV1(phase2TransferCommenceRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] + * @param {Phase2TransferCommenceResponseV1Request} [phase2TransferCommenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase2TransferCommenceResponseV1(transferCommenceV1Response?: TransferCommenceV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase2TransferCommenceResponseV1(transferCommenceV1Response, options); + async phase2TransferCommenceResponseV1(phase2TransferCommenceResponseV1Request?: Phase2TransferCommenceResponseV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase2TransferCommenceResponseV1(phase2TransferCommenceResponseV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {CommitFinalV1Request} [commitFinalV1Request] + * @param {Phase3CommitFinalRequestV1Request} [phase3CommitFinalRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase3CommitFinalRequestV1(commitFinalV1Request?: CommitFinalV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitFinalRequestV1(commitFinalV1Request, options); + async phase3CommitFinalRequestV1(phase3CommitFinalRequestV1Request?: Phase3CommitFinalRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitFinalRequestV1(phase3CommitFinalRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {CommitFinalV1Response} [commitFinalV1Response] + * @param {Phase3CommitFinalResponseV1Request} [phase3CommitFinalResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase3CommitFinalResponseV1(commitFinalV1Response?: CommitFinalV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitFinalResponseV1(commitFinalV1Response, options); + async phase3CommitFinalResponseV1(phase3CommitFinalResponseV1Request?: Phase3CommitFinalResponseV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitFinalResponseV1(phase3CommitFinalResponseV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] + * @param {Phase3CommitPreparationRequestV1Request} [phase3CommitPreparationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase3CommitPreparationRequestV1(commitPreparationV1Request?: CommitPreparationV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitPreparationRequestV1(commitPreparationV1Request, options); + async phase3CommitPreparationRequestV1(phase3CommitPreparationRequestV1Request?: Phase3CommitPreparationRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitPreparationRequestV1(phase3CommitPreparationRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] + * @param {Phase3CommitPreparationResponseV1Request} [phase3CommitPreparationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase3CommitPreparationResponseV1(commitPreparationV1Response?: CommitPreparationV1Response, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitPreparationResponseV1(commitPreparationV1Response, options); + async phase3CommitPreparationResponseV1(phase3CommitPreparationResponseV1Request?: Phase3CommitPreparationResponseV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase3CommitPreparationResponseV1(phase3CommitPreparationResponseV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] + * @param {Phase3TransferCompleteRequestV1Request} [phase3TransferCompleteRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async phase3TransferCompleteRequestV1(transferCompleteV1Request?: TransferCompleteV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.phase3TransferCompleteRequestV1(transferCompleteV1Request, options); + async phase3TransferCompleteRequestV1(phase3TransferCompleteRequestV1Request?: Phase3TransferCompleteRequestV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.phase3TransferCompleteRequestV1(phase3TransferCompleteRequestV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] + * @param {RecoverUpdateAckV1MessageRequest} [recoverUpdateAckV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async recoverUpdateAckV1Message(recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverUpdateAckV1Message(recoverUpdateAckV1Message, options); + async recoverUpdateAckV1Message(recoverUpdateAckV1MessageRequest?: RecoverUpdateAckV1MessageRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recoverUpdateAckV1Message(recoverUpdateAckV1MessageRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] + * @param {RecoverUpdateV1MessageRequest} [recoverUpdateV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async recoverUpdateV1Message(recoverUpdateV1Message?: RecoverUpdateV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverUpdateV1Message(recoverUpdateV1Message, options); + async recoverUpdateV1Message(recoverUpdateV1MessageRequest?: RecoverUpdateV1MessageRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recoverUpdateV1Message(recoverUpdateV1MessageRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {RecoverV1Message} [recoverV1Message] + * @param {RecoverV1MessageRequest} [recoverV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async recoverV1Message(recoverV1Message?: RecoverV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverV1Message(recoverV1Message, options); + async recoverV1Message(recoverV1MessageRequest?: RecoverV1MessageRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recoverV1Message(recoverV1MessageRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async recoverV1Success(recoverSuccessV1Message?: RecoverSuccessV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.recoverV1Success(recoverSuccessV1Message, options); + async recoverV1Success(recoverV1SuccessRequest?: RecoverV1SuccessRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.recoverV1Success(recoverV1SuccessRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {RollbackAckV1Message} [rollbackAckV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async rollbackAckV1Message(rollbackAckV1Message?: RollbackAckV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rollbackAckV1Message(rollbackAckV1Message, options); + async rollbackAckV1Message(recoverV1SuccessRequest?: RecoverV1SuccessRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rollbackAckV1Message(recoverV1SuccessRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * - * @param {RollbackV1Message} [rollbackV1Message] + * @param {RollbackV1MessageRequest} [rollbackV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async rollbackV1Message(rollbackV1Message?: RollbackV1Message, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rollbackV1Message(rollbackV1Message, options); + async rollbackV1Message(rollbackV1MessageRequest?: RollbackV1MessageRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rollbackV1Message(rollbackV1MessageRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -2765,165 +4160,165 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa return { /** * - * @param {ClientV1Request} [clientV1Request] + * @param {ClientRequestV1Request} [clientRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - clientRequestV1(clientV1Request?: ClientV1Request, options?: any): AxiosPromise { - return localVarFp.clientRequestV1(clientV1Request, options).then((request) => request(axios, basePath)); + clientRequestV1(clientRequestV1Request?: ClientRequestV1Request, options?: any): AxiosPromise { + return localVarFp.clientRequestV1(clientRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] + * @param {Phase1TransferInitiationRequestV1Request} [phase1TransferInitiationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase1TransferInitiationRequestV1(transferInitializationV1Request?: TransferInitializationV1Request, options?: any): AxiosPromise { - return localVarFp.phase1TransferInitiationRequestV1(transferInitializationV1Request, options).then((request) => request(axios, basePath)); + phase1TransferInitiationRequestV1(phase1TransferInitiationRequestV1Request?: Phase1TransferInitiationRequestV1Request, options?: any): AxiosPromise { + return localVarFp.phase1TransferInitiationRequestV1(phase1TransferInitiationRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] + * @param {Phase1TransferInitiationResponseV1Request} [phase1TransferInitiationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase1TransferInitiationResponseV1(transferInitializationV1Response?: TransferInitializationV1Response, options?: any): AxiosPromise { - return localVarFp.phase1TransferInitiationResponseV1(transferInitializationV1Response, options).then((request) => request(axios, basePath)); + phase1TransferInitiationResponseV1(phase1TransferInitiationResponseV1Request?: Phase1TransferInitiationResponseV1Request, options?: any): AxiosPromise { + return localVarFp.phase1TransferInitiationResponseV1(phase1TransferInitiationResponseV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] + * @param {Phase2LockEvidenceRequestV1Request} [phase2LockEvidenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2LockEvidenceRequestV1(lockEvidenceV1Request?: LockEvidenceV1Request, options?: any): AxiosPromise { - return localVarFp.phase2LockEvidenceRequestV1(lockEvidenceV1Request, options).then((request) => request(axios, basePath)); + phase2LockEvidenceRequestV1(phase2LockEvidenceRequestV1Request?: Phase2LockEvidenceRequestV1Request, options?: any): AxiosPromise { + return localVarFp.phase2LockEvidenceRequestV1(phase2LockEvidenceRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] + * @param {Phase2LockEvidenceResponseV1Request} [phase2LockEvidenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2LockEvidenceResponseV1(lockEvidenceV1Response?: LockEvidenceV1Response, options?: any): AxiosPromise { - return localVarFp.phase2LockEvidenceResponseV1(lockEvidenceV1Response, options).then((request) => request(axios, basePath)); + phase2LockEvidenceResponseV1(phase2LockEvidenceResponseV1Request?: Phase2LockEvidenceResponseV1Request, options?: any): AxiosPromise { + return localVarFp.phase2LockEvidenceResponseV1(phase2LockEvidenceResponseV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] + * @param {Phase2TransferCommenceRequestV1Request} [phase2TransferCommenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2TransferCommenceRequestV1(transferCommenceV1Request?: TransferCommenceV1Request, options?: any): AxiosPromise { - return localVarFp.phase2TransferCommenceRequestV1(transferCommenceV1Request, options).then((request) => request(axios, basePath)); + phase2TransferCommenceRequestV1(phase2TransferCommenceRequestV1Request?: Phase2TransferCommenceRequestV1Request, options?: any): AxiosPromise { + return localVarFp.phase2TransferCommenceRequestV1(phase2TransferCommenceRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] + * @param {Phase2TransferCommenceResponseV1Request} [phase2TransferCommenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase2TransferCommenceResponseV1(transferCommenceV1Response?: TransferCommenceV1Response, options?: any): AxiosPromise { - return localVarFp.phase2TransferCommenceResponseV1(transferCommenceV1Response, options).then((request) => request(axios, basePath)); + phase2TransferCommenceResponseV1(phase2TransferCommenceResponseV1Request?: Phase2TransferCommenceResponseV1Request, options?: any): AxiosPromise { + return localVarFp.phase2TransferCommenceResponseV1(phase2TransferCommenceResponseV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {CommitFinalV1Request} [commitFinalV1Request] + * @param {Phase3CommitFinalRequestV1Request} [phase3CommitFinalRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitFinalRequestV1(commitFinalV1Request?: CommitFinalV1Request, options?: any): AxiosPromise { - return localVarFp.phase3CommitFinalRequestV1(commitFinalV1Request, options).then((request) => request(axios, basePath)); + phase3CommitFinalRequestV1(phase3CommitFinalRequestV1Request?: Phase3CommitFinalRequestV1Request, options?: any): AxiosPromise { + return localVarFp.phase3CommitFinalRequestV1(phase3CommitFinalRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {CommitFinalV1Response} [commitFinalV1Response] + * @param {Phase3CommitFinalResponseV1Request} [phase3CommitFinalResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitFinalResponseV1(commitFinalV1Response?: CommitFinalV1Response, options?: any): AxiosPromise { - return localVarFp.phase3CommitFinalResponseV1(commitFinalV1Response, options).then((request) => request(axios, basePath)); + phase3CommitFinalResponseV1(phase3CommitFinalResponseV1Request?: Phase3CommitFinalResponseV1Request, options?: any): AxiosPromise { + return localVarFp.phase3CommitFinalResponseV1(phase3CommitFinalResponseV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] + * @param {Phase3CommitPreparationRequestV1Request} [phase3CommitPreparationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitPreparationRequestV1(commitPreparationV1Request?: CommitPreparationV1Request, options?: any): AxiosPromise { - return localVarFp.phase3CommitPreparationRequestV1(commitPreparationV1Request, options).then((request) => request(axios, basePath)); + phase3CommitPreparationRequestV1(phase3CommitPreparationRequestV1Request?: Phase3CommitPreparationRequestV1Request, options?: any): AxiosPromise { + return localVarFp.phase3CommitPreparationRequestV1(phase3CommitPreparationRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] + * @param {Phase3CommitPreparationResponseV1Request} [phase3CommitPreparationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3CommitPreparationResponseV1(commitPreparationV1Response?: CommitPreparationV1Response, options?: any): AxiosPromise { - return localVarFp.phase3CommitPreparationResponseV1(commitPreparationV1Response, options).then((request) => request(axios, basePath)); + phase3CommitPreparationResponseV1(phase3CommitPreparationResponseV1Request?: Phase3CommitPreparationResponseV1Request, options?: any): AxiosPromise { + return localVarFp.phase3CommitPreparationResponseV1(phase3CommitPreparationResponseV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] + * @param {Phase3TransferCompleteRequestV1Request} [phase3TransferCompleteRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - phase3TransferCompleteRequestV1(transferCompleteV1Request?: TransferCompleteV1Request, options?: any): AxiosPromise { - return localVarFp.phase3TransferCompleteRequestV1(transferCompleteV1Request, options).then((request) => request(axios, basePath)); + phase3TransferCompleteRequestV1(phase3TransferCompleteRequestV1Request?: Phase3TransferCompleteRequestV1Request, options?: any): AxiosPromise { + return localVarFp.phase3TransferCompleteRequestV1(phase3TransferCompleteRequestV1Request, options).then((request) => request(axios, basePath)); }, /** * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] + * @param {RecoverUpdateAckV1MessageRequest} [recoverUpdateAckV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverUpdateAckV1Message(recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options?: any): AxiosPromise { - return localVarFp.recoverUpdateAckV1Message(recoverUpdateAckV1Message, options).then((request) => request(axios, basePath)); + recoverUpdateAckV1Message(recoverUpdateAckV1MessageRequest?: RecoverUpdateAckV1MessageRequest, options?: any): AxiosPromise { + return localVarFp.recoverUpdateAckV1Message(recoverUpdateAckV1MessageRequest, options).then((request) => request(axios, basePath)); }, /** * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] + * @param {RecoverUpdateV1MessageRequest} [recoverUpdateV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverUpdateV1Message(recoverUpdateV1Message?: RecoverUpdateV1Message, options?: any): AxiosPromise { - return localVarFp.recoverUpdateV1Message(recoverUpdateV1Message, options).then((request) => request(axios, basePath)); + recoverUpdateV1Message(recoverUpdateV1MessageRequest?: RecoverUpdateV1MessageRequest, options?: any): AxiosPromise { + return localVarFp.recoverUpdateV1Message(recoverUpdateV1MessageRequest, options).then((request) => request(axios, basePath)); }, /** * - * @param {RecoverV1Message} [recoverV1Message] + * @param {RecoverV1MessageRequest} [recoverV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverV1Message(recoverV1Message?: RecoverV1Message, options?: any): AxiosPromise { - return localVarFp.recoverV1Message(recoverV1Message, options).then((request) => request(axios, basePath)); + recoverV1Message(recoverV1MessageRequest?: RecoverV1MessageRequest, options?: any): AxiosPromise { + return localVarFp.recoverV1Message(recoverV1MessageRequest, options).then((request) => request(axios, basePath)); }, /** * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - recoverV1Success(recoverSuccessV1Message?: RecoverSuccessV1Message, options?: any): AxiosPromise { - return localVarFp.recoverV1Success(recoverSuccessV1Message, options).then((request) => request(axios, basePath)); + recoverV1Success(recoverV1SuccessRequest?: RecoverV1SuccessRequest, options?: any): AxiosPromise { + return localVarFp.recoverV1Success(recoverV1SuccessRequest, options).then((request) => request(axios, basePath)); }, /** * - * @param {RollbackAckV1Message} [rollbackAckV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rollbackAckV1Message(rollbackAckV1Message?: RollbackAckV1Message, options?: any): AxiosPromise { - return localVarFp.rollbackAckV1Message(rollbackAckV1Message, options).then((request) => request(axios, basePath)); + rollbackAckV1Message(recoverV1SuccessRequest?: RecoverV1SuccessRequest, options?: any): AxiosPromise { + return localVarFp.rollbackAckV1Message(recoverV1SuccessRequest, options).then((request) => request(axios, basePath)); }, /** * - * @param {RollbackV1Message} [rollbackV1Message] + * @param {RollbackV1MessageRequest} [rollbackV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rollbackV1Message(rollbackV1Message?: RollbackV1Message, options?: any): AxiosPromise { - return localVarFp.rollbackV1Message(rollbackV1Message, options).then((request) => request(axios, basePath)); + rollbackV1Message(rollbackV1MessageRequest?: RollbackV1MessageRequest, options?: any): AxiosPromise { + return localVarFp.rollbackV1Message(rollbackV1MessageRequest, options).then((request) => request(axios, basePath)); }, }; }; @@ -2937,200 +4332,200 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa export class DefaultApi extends BaseAPI { /** * - * @param {ClientV1Request} [clientV1Request] + * @param {ClientRequestV1Request} [clientRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public clientRequestV1(clientV1Request?: ClientV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).clientRequestV1(clientV1Request, options).then((request) => request(this.axios, this.basePath)); + public clientRequestV1(clientRequestV1Request?: ClientRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).clientRequestV1(clientRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {TransferInitializationV1Request} [transferInitializationV1Request] + * @param {Phase1TransferInitiationRequestV1Request} [phase1TransferInitiationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase1TransferInitiationRequestV1(transferInitializationV1Request?: TransferInitializationV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase1TransferInitiationRequestV1(transferInitializationV1Request, options).then((request) => request(this.axios, this.basePath)); + public phase1TransferInitiationRequestV1(phase1TransferInitiationRequestV1Request?: Phase1TransferInitiationRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase1TransferInitiationRequestV1(phase1TransferInitiationRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {TransferInitializationV1Response} [transferInitializationV1Response] + * @param {Phase1TransferInitiationResponseV1Request} [phase1TransferInitiationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase1TransferInitiationResponseV1(transferInitializationV1Response?: TransferInitializationV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase1TransferInitiationResponseV1(transferInitializationV1Response, options).then((request) => request(this.axios, this.basePath)); + public phase1TransferInitiationResponseV1(phase1TransferInitiationResponseV1Request?: Phase1TransferInitiationResponseV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase1TransferInitiationResponseV1(phase1TransferInitiationResponseV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {LockEvidenceV1Request} [lockEvidenceV1Request] + * @param {Phase2LockEvidenceRequestV1Request} [phase2LockEvidenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase2LockEvidenceRequestV1(lockEvidenceV1Request?: LockEvidenceV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2LockEvidenceRequestV1(lockEvidenceV1Request, options).then((request) => request(this.axios, this.basePath)); + public phase2LockEvidenceRequestV1(phase2LockEvidenceRequestV1Request?: Phase2LockEvidenceRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase2LockEvidenceRequestV1(phase2LockEvidenceRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {LockEvidenceV1Response} [lockEvidenceV1Response] + * @param {Phase2LockEvidenceResponseV1Request} [phase2LockEvidenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase2LockEvidenceResponseV1(lockEvidenceV1Response?: LockEvidenceV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2LockEvidenceResponseV1(lockEvidenceV1Response, options).then((request) => request(this.axios, this.basePath)); + public phase2LockEvidenceResponseV1(phase2LockEvidenceResponseV1Request?: Phase2LockEvidenceResponseV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase2LockEvidenceResponseV1(phase2LockEvidenceResponseV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {TransferCommenceV1Request} [transferCommenceV1Request] + * @param {Phase2TransferCommenceRequestV1Request} [phase2TransferCommenceRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase2TransferCommenceRequestV1(transferCommenceV1Request?: TransferCommenceV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2TransferCommenceRequestV1(transferCommenceV1Request, options).then((request) => request(this.axios, this.basePath)); + public phase2TransferCommenceRequestV1(phase2TransferCommenceRequestV1Request?: Phase2TransferCommenceRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase2TransferCommenceRequestV1(phase2TransferCommenceRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {TransferCommenceV1Response} [transferCommenceV1Response] + * @param {Phase2TransferCommenceResponseV1Request} [phase2TransferCommenceResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase2TransferCommenceResponseV1(transferCommenceV1Response?: TransferCommenceV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase2TransferCommenceResponseV1(transferCommenceV1Response, options).then((request) => request(this.axios, this.basePath)); + public phase2TransferCommenceResponseV1(phase2TransferCommenceResponseV1Request?: Phase2TransferCommenceResponseV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase2TransferCommenceResponseV1(phase2TransferCommenceResponseV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {CommitFinalV1Request} [commitFinalV1Request] + * @param {Phase3CommitFinalRequestV1Request} [phase3CommitFinalRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase3CommitFinalRequestV1(commitFinalV1Request?: CommitFinalV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitFinalRequestV1(commitFinalV1Request, options).then((request) => request(this.axios, this.basePath)); + public phase3CommitFinalRequestV1(phase3CommitFinalRequestV1Request?: Phase3CommitFinalRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase3CommitFinalRequestV1(phase3CommitFinalRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {CommitFinalV1Response} [commitFinalV1Response] + * @param {Phase3CommitFinalResponseV1Request} [phase3CommitFinalResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase3CommitFinalResponseV1(commitFinalV1Response?: CommitFinalV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitFinalResponseV1(commitFinalV1Response, options).then((request) => request(this.axios, this.basePath)); + public phase3CommitFinalResponseV1(phase3CommitFinalResponseV1Request?: Phase3CommitFinalResponseV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase3CommitFinalResponseV1(phase3CommitFinalResponseV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {CommitPreparationV1Request} [commitPreparationV1Request] + * @param {Phase3CommitPreparationRequestV1Request} [phase3CommitPreparationRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase3CommitPreparationRequestV1(commitPreparationV1Request?: CommitPreparationV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitPreparationRequestV1(commitPreparationV1Request, options).then((request) => request(this.axios, this.basePath)); + public phase3CommitPreparationRequestV1(phase3CommitPreparationRequestV1Request?: Phase3CommitPreparationRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase3CommitPreparationRequestV1(phase3CommitPreparationRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {CommitPreparationV1Response} [commitPreparationV1Response] + * @param {Phase3CommitPreparationResponseV1Request} [phase3CommitPreparationResponseV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase3CommitPreparationResponseV1(commitPreparationV1Response?: CommitPreparationV1Response, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3CommitPreparationResponseV1(commitPreparationV1Response, options).then((request) => request(this.axios, this.basePath)); + public phase3CommitPreparationResponseV1(phase3CommitPreparationResponseV1Request?: Phase3CommitPreparationResponseV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase3CommitPreparationResponseV1(phase3CommitPreparationResponseV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {TransferCompleteV1Request} [transferCompleteV1Request] + * @param {Phase3TransferCompleteRequestV1Request} [phase3TransferCompleteRequestV1Request] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public phase3TransferCompleteRequestV1(transferCompleteV1Request?: TransferCompleteV1Request, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).phase3TransferCompleteRequestV1(transferCompleteV1Request, options).then((request) => request(this.axios, this.basePath)); + public phase3TransferCompleteRequestV1(phase3TransferCompleteRequestV1Request?: Phase3TransferCompleteRequestV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).phase3TransferCompleteRequestV1(phase3TransferCompleteRequestV1Request, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {RecoverUpdateAckV1Message} [recoverUpdateAckV1Message] + * @param {RecoverUpdateAckV1MessageRequest} [recoverUpdateAckV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public recoverUpdateAckV1Message(recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverUpdateAckV1Message(recoverUpdateAckV1Message, options).then((request) => request(this.axios, this.basePath)); + public recoverUpdateAckV1Message(recoverUpdateAckV1MessageRequest?: RecoverUpdateAckV1MessageRequest, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).recoverUpdateAckV1Message(recoverUpdateAckV1MessageRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {RecoverUpdateV1Message} [recoverUpdateV1Message] + * @param {RecoverUpdateV1MessageRequest} [recoverUpdateV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public recoverUpdateV1Message(recoverUpdateV1Message?: RecoverUpdateV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverUpdateV1Message(recoverUpdateV1Message, options).then((request) => request(this.axios, this.basePath)); + public recoverUpdateV1Message(recoverUpdateV1MessageRequest?: RecoverUpdateV1MessageRequest, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).recoverUpdateV1Message(recoverUpdateV1MessageRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {RecoverV1Message} [recoverV1Message] + * @param {RecoverV1MessageRequest} [recoverV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public recoverV1Message(recoverV1Message?: RecoverV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverV1Message(recoverV1Message, options).then((request) => request(this.axios, this.basePath)); + public recoverV1Message(recoverV1MessageRequest?: RecoverV1MessageRequest, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).recoverV1Message(recoverV1MessageRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {RecoverSuccessV1Message} [recoverSuccessV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public recoverV1Success(recoverSuccessV1Message?: RecoverSuccessV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).recoverV1Success(recoverSuccessV1Message, options).then((request) => request(this.axios, this.basePath)); + public recoverV1Success(recoverV1SuccessRequest?: RecoverV1SuccessRequest, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).recoverV1Success(recoverV1SuccessRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {RollbackAckV1Message} [rollbackAckV1Message] + * @param {RecoverV1SuccessRequest} [recoverV1SuccessRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public rollbackAckV1Message(rollbackAckV1Message?: RollbackAckV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).rollbackAckV1Message(rollbackAckV1Message, options).then((request) => request(this.axios, this.basePath)); + public rollbackAckV1Message(recoverV1SuccessRequest?: RecoverV1SuccessRequest, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).rollbackAckV1Message(recoverV1SuccessRequest, options).then((request) => request(this.axios, this.basePath)); } /** * - * @param {RollbackV1Message} [rollbackV1Message] + * @param {RollbackV1MessageRequest} [rollbackV1MessageRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApi */ - public rollbackV1Message(rollbackV1Message?: RollbackV1Message, options?: AxiosRequestConfig) { - return DefaultApiFp(this.configuration).rollbackV1Message(rollbackV1Message, options).then((request) => request(this.axios, this.basePath)); + public rollbackV1Message(rollbackV1MessageRequest?: RollbackV1MessageRequest, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).rollbackV1Message(rollbackV1MessageRequest, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts index bf82655807..25de4a19ae 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts @@ -5,7 +5,7 @@ import { Optional } from "typescript-optional"; import type { Express } from "express"; import { v4 as uuidV4 } from "uuid"; import { Knex } from "knex"; -import OAS from "../json/openapi.json"; +import OAS from "../json/openapi-gateway-bundled.json"; import { Secp256k1Keys, Logger, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts index 65c07b10de..b977e3e111 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts @@ -7,7 +7,7 @@ export class KnexLocalLogRepository implements ILocalLogRepository { public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../knex/knexfile.ts")[ + const configFile = require("../../../../knex/knexfile.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts index 8d064da275..9431076d0a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts @@ -10,7 +10,7 @@ export class KnexRemoteLogRepository implements IRemoteLogRepository { // simulating a remote log storage public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../knex/knexfile-remote.ts")[ + const configFile = require("../../../../knex/knexfile-remote.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts new file mode 100644 index 0000000000..f7d80f722b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts @@ -0,0 +1,102 @@ +import type { Express, Request, Response } from "express"; + +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; +import { + Logger, + Checks, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; + +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; + +import OAS from "../../../json/openapi-blo-bundled.json"; +import { IRequestOptions } from "../../core/types"; +import { StatusRequest } from "../../generated/openapi-blo/typescript-axios"; + +export class GetStatusEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "GetStatusEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return GetStatusEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.dispatcher, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getPath(): string { + const apiPath = + OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/status"]; + return apiPath.get["x-hyperledger-cacti"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = + OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/status"]; + return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/status"] + .get.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + const sessionId = req.query.SessionID as string; + if (!sessionId) { + res + .status(400) + .json({ message: "SessionID query parameter is required." }); + return; + } + const statusRequest: StatusRequest = { + sessionID: sessionId, + }; + const result = await this.options.dispatcher.GetStatus(statusRequest); + res.status(200).json(result); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts index 99a4124477..333077cf7b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IClientRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts index e08e40a183..38c51152f6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ICommitFinalResponseEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts index 6d7066a2b0..673c4002c8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ICommitPreparationResponseEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts index f61c7b6161..0794db89fc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ILockEvidenceResponseEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts index 0de0281eb2..185f7d5673 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ITransferCommenceResponseEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts index dbe1929339..913446225c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ITransferInitiationResponseEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts index f2416f4894..95c828d25e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IRecoverMessageEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts index 09b5ad642e..0e2f7fee51 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IRecoverSuccessMessageEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts index aa0a36029d..a3e25fb740 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IRecoverUpdateAckMessageEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts index a6d3aca96c..eed087ac1f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IRecoverUpdateMessageEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts index 0e82229c07..b280b2e74b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IRollbackAckMessageEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts index d7da7f1991..65427e4e22 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts @@ -17,7 +17,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface IRollbackMessageEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts index 847d525a79..e5aea4fa1d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ICommitFinalRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts index 79e468e21f..e370deca37 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ICommitPreparationRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts index e8b90a1344..cc6af836ca 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ILockEvidenceRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts index c3f9b2bb67..2060011ad3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ITransferCommenceRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts index 86c19ca18d..0467d4f709 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ITransferCompleteRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts index deed90e247..400a309f4a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts @@ -16,7 +16,7 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi.json"; +import OAS from "../../../json/openapi-gateway-bundled.json"; export interface ITransferInitiationRequestEndpointOptions { logLevel?: LogLevelDesc; diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml new file mode 100644 index 0000000000..ae3f997a2d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml @@ -0,0 +1,4689 @@ +openapi: 3.0.3 +info: + title: SATP Gateway Client (Business Logic Orchestrator) + version: 0.0.2 + description: |- + SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. + + This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. + + **Additional Resources**: + - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) + - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) + - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) + - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) + - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) + - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) + - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + contact: + name: Hyperledger Cacti + x-logo: + altText: Cacti logo + backgroundColor: '#fafafa' + url: 'https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png' +externalDocs: + description: 'For more information about the SATP Gateway Client, refer to the official documentation.' + url: 'https://github.com/hyperledger/cacti/tree/main/packages/cactus-plugin-satp-hermes/README.md' +servers: + - url: 'http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes' + description: Development server + variables: + host: + default: localhost + port: + default: '3011' +tags: + - name: transaction + description: API endpoints for interacting with blockchains via gateways + - name: admin + description: API endpoints for fetching information on SATP sessions +paths: + /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact: + post: + tags: + - transaction + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Transact + requestBody: + content: + application/json: + schema: + description: 'Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks.' + type: object + required: + - contextID + - mode + properties: + contextID: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174000 + mode: + type: string + enum: + - data + - transfer + example: transfer + payload: + type: string + example: '{"data":"example payload"}' + fromDLTNetworkID: + type: string + example: network1 + toDLTNetworkID: + type: string + example: network2 + fromAmount: + type: string + example: '100' + fromToken: + type: string + example: TOKEN1 + toAmount: + type: string + example: '95' + toToken: + type: string + example: TOKEN2 + required: true + responses: + '200': + description: Transaction successfully queued + content: + application/json: + schema: + description: Response schema for a transaction request. Includes the session ID and the current status of the transaction. + type: object + properties: + sessionID: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + required: + - sessionID + - statusResponse + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel: + post: + tags: + - transaction + summary: Cancel a transaction session + description: Attempts to cancel a previously submitted transaction intent using its session ID. + operationId: Cancel + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel + requestBody: + content: + application/json: + schema: + description: 'Request to cancel an ongoing transaction session, identified by the session ID.' + type: object + properties: + sessionID: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + required: + - sessionID + required: true + responses: + '200': + description: Transaction cancellation attempted + content: + application/json: + schema: + description: Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + type: object + properties: + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + cancelSuccessful: + type: boolean + description: Indicates whether the cancel operation was successful. + example: true + required: + - statusResponse + - cancelSuccessful + default: + description: An error occurred or transaction cannot be cancelled + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-plugin-satp-hermes/status: + get: + summary: Get SATP current session data + description: Retrieve the status of a SATP session + operationId: GetStatus + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/status + parameters: + - name: SessionID + in: query + schema: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + required: true + description: Unique identifier for the session. + responses: + '200': + description: OK + content: + application/json: + schema: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck: + get: + summary: Health check endpoint + description: Responds if SATP Hermes is on + operationId: GetHealthCheck + tags: + - admin + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + status: + type: string + example: OK + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue: + post: + tags: + - admin + summary: Continue a paused transaction session + description: 'Attempts to continue a previously paused transaction intent, resuming its execution.' + operationId: Continue + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue + requestBody: + content: + application/json: + schema: + type: object + properties: + sessionId: + type: string + format: uuid + description: A unique identifier for the transaction session to be continued. + contextId: + type: string + format: uuid + description: A unique identifier for the transaction context. + required: + - sessionId + - contextId + description: Schema for a request to continue a paused transaction session. + required: true + responses: + '200': + description: Transaction continuation attempted + content: + application/json: + schema: + type: object + description: 'Response schema for a continue request, returning the status of the SATP session.' + properties: + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + required: + - statusResponse + default: + description: An error occurred or transaction cannot be continued + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause: + post: + tags: + - admin + summary: Pause a transaction session + description: 'Attempts to pause a previously submitted transaction intent, temporarily halting its execution.' + operationId: Pause + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause + requestBody: + content: + application/json: + schema: + description: 'Request to temporarily pause an ongoing transaction session, identified by the session and context IDs.' + type: object + properties: + sessionId: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174000 + contextId: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174001 + required: true + responses: + '200': + description: Transaction pause attempted + content: + application/json: + schema: + description: Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + type: object + properties: + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + required: + - statusResponse + default: + description: An error occurred or transaction cannot be paused + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations: + get: + tags: + - transaction + summary: Get supported integrations + description: 'Retrieves metadata about each supported blockchain networks, chains, and other systems.' + operationId: GetIntegrations + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations + responses: + '200': + description: A list of supported systems. + content: + application/json: + schema: + title: Chains + type: array + description: List of chains and related metadata + items: + type: object + properties: + chainId: + type: string + description: A unique identifier for the blockchain network. + chainName: + type: string + description: The name of the blockchain network. + chainType: + type: string + description: 'The type of blockchain network (e.g., ''evm'', ''fabric'').' + networkName: + type: string + description: 'The specific network name within the blockchain (e.g., ''mainnet'', ''testnet'').' + required: + - chainId + - chainName + - chainType + - networkName + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes: + get: + description: Get a list of possible routes for swapping one asset for another across multiple exchanges + summary: Get a list of routes for a gateway-to-gateway asset transfer + tags: + - transaction + operationId: GetRoutes + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes + parameters: + - name: fromNetworkID + in: query + schema: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + required: true + description: The sending DLT Network. + - name: fromAmount + in: query + schema: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + required: true + description: The amount that should be sent including all decimals. + - name: fromToken + in: query + schema: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + required: true + description: The token that should be transferred. Can be the address or the symbol. + - name: toDLTNetwork + in: query + schema: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + required: true + description: The receiving DLT Network. + - name: toToken + in: query + schema: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + required: true + description: The token that should be transferred to. Can be the address or the symbol. + - name: fromAddress + in: query + schema: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + required: true + description: The sending wallet address. + - name: toAddress + in: query + schema: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + required: true + description: 'The receiving wallet address. If none is provided, the fromAddress will be used.' + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + description: A collection of available and unavailable routes + required: + - routes + properties: + routes: + type: array + description: A collection of route objects + items: + type: object + properties: + id: + type: string + description: A unique identifier of the route. + gatewayID: + type: string + format: uuid + description: A unique identifier for the gateway. + mode: + type: string + enum: + - data + - transfer + description: 'The mode of operation for this route - ''data'' for arbitrary payload handling, ''transfer'' for asset transfer.' + fromDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will originate. + fromAmountUSD: + type: string + format: double + description: 'The amount of ''fromToken'' to be transferred in USD, specified as a string to maintain precision.' + fromAmount: + type: string + description: 'The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + pattern: '^[1-9][0-9]*$' + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + toDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will end. + toAmountUSD: + type: string + description: The expected amount to be received in USD. + toAmount: + type: string + description: 'The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + toAmountMin: + type: string + description: 'The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + gasCostUSD: + type: string + description: The expected gas cost in USD. + containsSwitchChain: + type: boolean + description: Whether chain switching is enabled or not. + steps: + type: array + description: 'List of steps involved in this route, adjusted for mode.' + items: + type: object + description: Details a single step within a route including actions and estimates. + properties: + id: + type: string + description: Id of the step + type: + type: string + description: 'Type of the step, typically describing the action, e.g., ''swap''.' + tool: + type: string + description: 'Tool used in the step, e.g., ''stargate''.' + action: + type: object + properties: + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + fromAmount: + type: string + description: 'The amount of ''fromToken'' to be transferred, specified as a string to maintain precision.' + example: '1000000000000000000' + pattern: '^[1-9][0-9]*$' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + slippage: + type: number + format: float + description: The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + example: 0.005 + fromAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + estimate: + type: object + description: 'Provides an estimation for a transaction, including costs, amounts, and execution duration.' + properties: + approvalAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAmountMin: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + fromAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + feeCosts: + type: array + description: A collection of fee costs associated with the transaction. + items: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + amountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + token: + type: string + description: The symbol of a token + example: ETH + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. + gasCosts: + type: array + description: A collection of estimated gas costs for executing the transaction. + items: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: 'The gas price, specified as a string to maintain precision.' + example: '19236858243' + estimate: + type: string + description: 'The estimated gas required, specified as a string to maintain precision.' + example: '445393' + limit: + type: string + description: 'The gas limit for the transaction, specified as a string to maintain precision.' + example: '579011' + pattern: '^[1-9][0-9]*$' + amount: + type: string + description: The amount of gas required in the gas currency. + example: '8567962003424499' + pattern: '^[1-9][0-9]*$' + amountUSD: + type: string + description: The amount of gas required in USD. + example: '16.05' + pattern: '^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$' + token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + executionDuration: + type: integer + description: The estimated duration for the transaction execution in seconds. + example: 30 + fromAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + tool: + type: string + description: The tool or service used to generate this estimate. + example: satp + toolDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + integrationDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + includedStepIds: + type: array + description: 'IDs of further steps included within this step, allowing for nested actions without direct recursion.' + items: + type: string + insurance: + type: object + properties: + state: + type: string + description: The state of insurance applicability for the transaction. + example: NOT_INSURABLE + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + feeAmountUsd: + type: string + description: 'The fee amount for insurance, represented in USD.' + example: '10.00' + pattern: '^(0|[1-9]\d*)(\.\d+)?$' + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + required: + - id + - gatewayID + - mode + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit: + get: + tags: + - admin + summary: Audit transactions + description: Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + operationId: GetAudit + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit + parameters: + - name: auditStartDate + in: query + description: The start date for the audit period. + required: false + schema: + type: string + format: date-time + - name: auditEndDate + in: query + description: The end date for the audit period. + required: false + schema: + type: string + format: date-time + - name: includeProofs + in: query + description: Include proofs generated from each gateway transaction. + required: false + schema: + type: boolean + responses: + '200': + description: Audit results + content: + application/json: + schema: + description: Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + type: object + x-category: response + properties: + proofs: + type: array + items: + type: string + description: An array of strings representing proofs. + example: + - proof1 + - proof2 + auditStartTime: + type: string + format: date-time + description: The start datetime of the audit period. + example: '2023-01-01T00:00:00Z' + auditEndTime: + type: string + format: date-time + description: The end datetime of the audit period. + example: '2023-01-31T23:59:59Z' +components: + schemas: + AuthzScope: + type: string + enum: + - 'group:admin' + - 'group:user' + x-enum-descriptions: + - 'Identities with the group:admin scope are administrators of the system.' + - 'Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions.' + x-enum-varnames: + - GroupAdmin + - GroupUser + example: 'group:admin' + AuthzJwtClaim: + description: 'Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1' + type: string + enum: + - Hyperledger Labs - Carbon Accounting Tool + x-enum-descriptions: + - The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. + x-enum-varnames: + - iss + example: Hyperledger Labs - Carbon Accounting Tool + CredentialProfile: + type: string + enum: + - SAML + - OAUTH + - X509 + example: OAUTH + getAuditRequest: + description: Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. + type: object + x-category: request + properties: + auditStartDate: + type: string + format: date-time + description: The start datetime for the audit. + example: '2023-01-01T00:00:00Z' + auditEndDate: + type: string + format: date-time + description: The end datetime for the audit. + example: '2023-01-31T23:59:59Z' + includeProofs: + type: boolean + description: Include proofs generated from each gateway transaction. + example: true + getAuditResponse: + description: Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + type: object + x-category: response + properties: + proofs: + type: array + items: + type: string + description: An array of strings representing proofs. + example: + - proof1 + - proof2 + auditStartTime: + type: string + format: date-time + description: The start datetime of the audit period. + example: '2023-01-01T00:00:00Z' + auditEndTime: + type: string + format: date-time + description: The end datetime of the audit period. + example: '2023-01-31T23:59:59Z' + StatusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + PauseRequest: + description: 'Request to temporarily pause an ongoing transaction session, identified by the session and context IDs.' + type: object + properties: + sessionId: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174000 + contextId: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174001 + PauseResponse: + description: Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + type: object + properties: + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + required: + - statusResponse + StatusRequest: + description: 'Request for retrieving the current status of a session, identified by the session ID.' + type: object + x-category: request + required: + - sessionID + properties: + sessionID: + type: string + description: The ID of the session for which the status is being requested. + example: 123e4567-e89b-12d3-a456-426614174000 + TransactRequest: + description: 'Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks.' + type: object + required: + - contextID + - mode + properties: + contextID: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174000 + mode: + type: string + enum: + - data + - transfer + example: transfer + payload: + type: string + example: '{"data":"example payload"}' + fromDLTNetworkID: + type: string + example: network1 + toDLTNetworkID: + type: string + example: network2 + fromAmount: + type: string + example: '100' + fromToken: + type: string + example: TOKEN1 + toAmount: + type: string + example: '95' + toToken: + type: string + example: TOKEN2 + TransactResponse: + description: Response schema for a transaction request. Includes the session ID and the current status of the transaction. + type: object + properties: + sessionID: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + required: + - sessionID + - statusResponse + CancelRequest: + description: 'Request to cancel an ongoing transaction session, identified by the session ID.' + type: object + properties: + sessionID: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + required: + - sessionID + CancelResponse: + description: Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + type: object + properties: + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + cancelSuccessful: + type: boolean + description: Indicates whether the cancel operation was successful. + example: true + required: + - statusResponse + - cancelSuccessful + APIError: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + DLTProtocol: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + DLTNetworkID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + DLTSubnetworkID: + x-category: satp-core + type: string + description: 'The subnetwork of the DLT being interacted with. TODO: implement network identification draft' + SessionID: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + Address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + AmountString: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + AmountDecimal: + type: number + format: float + description: Amount value with decimal places + example: 100.33 + TokenSymbol: + type: string + description: The symbol of a token + example: ETH + LogoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + RoutesResponse: + type: object + description: A collection of available and unavailable routes + required: + - routes + properties: + routes: + type: array + description: A collection of route objects + items: + type: object + properties: + id: + type: string + description: A unique identifier of the route. + gatewayID: + type: string + format: uuid + description: A unique identifier for the gateway. + mode: + type: string + enum: + - data + - transfer + description: 'The mode of operation for this route - ''data'' for arbitrary payload handling, ''transfer'' for asset transfer.' + fromDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will originate. + fromAmountUSD: + type: string + format: double + description: 'The amount of ''fromToken'' to be transferred in USD, specified as a string to maintain precision.' + fromAmount: + type: string + description: 'The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + pattern: '^[1-9][0-9]*$' + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + toDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will end. + toAmountUSD: + type: string + description: The expected amount to be received in USD. + toAmount: + type: string + description: 'The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + toAmountMin: + type: string + description: 'The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + gasCostUSD: + type: string + description: The expected gas cost in USD. + containsSwitchChain: + type: boolean + description: Whether chain switching is enabled or not. + steps: + type: array + description: 'List of steps involved in this route, adjusted for mode.' + items: + type: object + description: Details a single step within a route including actions and estimates. + properties: + id: + type: string + description: Id of the step + type: + type: string + description: 'Type of the step, typically describing the action, e.g., ''swap''.' + tool: + type: string + description: 'Tool used in the step, e.g., ''stargate''.' + action: + type: object + properties: + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + fromAmount: + type: string + description: 'The amount of ''fromToken'' to be transferred, specified as a string to maintain precision.' + example: '1000000000000000000' + pattern: '^[1-9][0-9]*$' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + slippage: + type: number + format: float + description: The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + example: 0.005 + fromAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + estimate: + type: object + description: 'Provides an estimation for a transaction, including costs, amounts, and execution duration.' + properties: + approvalAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAmountMin: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + fromAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + feeCosts: + type: array + description: A collection of fee costs associated with the transaction. + items: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + amountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + token: + type: string + description: The symbol of a token + example: ETH + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. + gasCosts: + type: array + description: A collection of estimated gas costs for executing the transaction. + items: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: 'The gas price, specified as a string to maintain precision.' + example: '19236858243' + estimate: + type: string + description: 'The estimated gas required, specified as a string to maintain precision.' + example: '445393' + limit: + type: string + description: 'The gas limit for the transaction, specified as a string to maintain precision.' + example: '579011' + pattern: '^[1-9][0-9]*$' + amount: + type: string + description: The amount of gas required in the gas currency. + example: '8567962003424499' + pattern: '^[1-9][0-9]*$' + amountUSD: + type: string + description: The amount of gas required in USD. + example: '16.05' + pattern: '^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$' + token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + executionDuration: + type: integer + description: The estimated duration for the transaction execution in seconds. + example: 30 + fromAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + tool: + type: string + description: The tool or service used to generate this estimate. + example: satp + toolDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + integrationDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + includedStepIds: + type: array + description: 'IDs of further steps included within this step, allowing for nested actions without direct recursion.' + items: + type: string + insurance: + type: object + properties: + state: + type: string + description: The state of insurance applicability for the transaction. + example: NOT_INSURABLE + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + feeAmountUsd: + type: string + description: 'The fee amount for insurance, represented in USD.' + example: '10.00' + pattern: '^(0|[1-9]\d*)(\.\d+)?$' + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + required: + - id + - gatewayID + - mode + Route: + type: object + properties: + id: + type: string + description: A unique identifier of the route. + gatewayID: + type: string + format: uuid + description: A unique identifier for the gateway. + mode: + type: string + enum: + - data + - transfer + description: 'The mode of operation for this route - ''data'' for arbitrary payload handling, ''transfer'' for asset transfer.' + fromDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will originate. + fromAmountUSD: + type: string + format: double + description: 'The amount of ''fromToken'' to be transferred in USD, specified as a string to maintain precision.' + fromAmount: + type: string + description: 'The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + pattern: '^[1-9][0-9]*$' + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + toDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will end. + toAmountUSD: + type: string + description: The expected amount to be received in USD. + toAmount: + type: string + description: 'The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + toAmountMin: + type: string + description: 'The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)).' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + gasCostUSD: + type: string + description: The expected gas cost in USD. + containsSwitchChain: + type: boolean + description: Whether chain switching is enabled or not. + steps: + type: array + description: 'List of steps involved in this route, adjusted for mode.' + items: + type: object + description: Details a single step within a route including actions and estimates. + properties: + id: + type: string + description: Id of the step + type: + type: string + description: 'Type of the step, typically describing the action, e.g., ''swap''.' + tool: + type: string + description: 'Tool used in the step, e.g., ''stargate''.' + action: + type: object + properties: + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + fromAmount: + type: string + description: 'The amount of ''fromToken'' to be transferred, specified as a string to maintain precision.' + example: '1000000000000000000' + pattern: '^[1-9][0-9]*$' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + slippage: + type: number + format: float + description: The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + example: 0.005 + fromAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + estimate: + type: object + description: 'Provides an estimation for a transaction, including costs, amounts, and execution duration.' + properties: + approvalAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAmountMin: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + fromAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + feeCosts: + type: array + description: A collection of fee costs associated with the transaction. + items: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + amountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + token: + type: string + description: The symbol of a token + example: ETH + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. + gasCosts: + type: array + description: A collection of estimated gas costs for executing the transaction. + items: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: 'The gas price, specified as a string to maintain precision.' + example: '19236858243' + estimate: + type: string + description: 'The estimated gas required, specified as a string to maintain precision.' + example: '445393' + limit: + type: string + description: 'The gas limit for the transaction, specified as a string to maintain precision.' + example: '579011' + pattern: '^[1-9][0-9]*$' + amount: + type: string + description: The amount of gas required in the gas currency. + example: '8567962003424499' + pattern: '^[1-9][0-9]*$' + amountUSD: + type: string + description: The amount of gas required in USD. + example: '16.05' + pattern: '^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$' + token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + executionDuration: + type: integer + description: The estimated duration for the transaction execution in seconds. + example: 30 + fromAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + tool: + type: string + description: The tool or service used to generate this estimate. + example: satp + toolDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + integrationDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + includedStepIds: + type: array + description: 'IDs of further steps included within this step, allowing for nested actions without direct recursion.' + items: + type: string + insurance: + type: object + properties: + state: + type: string + description: The state of insurance applicability for the transaction. + example: NOT_INSURABLE + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + feeAmountUsd: + type: string + description: 'The fee amount for insurance, represented in USD.' + example: '10.00' + pattern: '^(0|[1-9]\d*)(\.\d+)?$' + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + required: + - id + - gatewayID + - mode + ContinueRequest: + type: object + properties: + sessionId: + type: string + format: uuid + description: A unique identifier for the transaction session to be continued. + contextId: + type: string + format: uuid + description: A unique identifier for the transaction context. + required: + - sessionId + - contextId + description: Schema for a request to continue a paused transaction session. + ContinueResponse: + type: object + description: 'Response schema for a continue request, returning the status of the SATP session.' + properties: + statusResponse: + description: 'Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information.' + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: '2023-01-01T00:00:00Z' + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + required: + - statusResponse + Chain: + type: object + properties: + chainId: + type: string + description: A unique identifier for the blockchain network. + chainName: + type: string + description: The name of the blockchain network. + chainType: + type: string + description: 'The type of blockchain network (e.g., ''evm'', ''fabric'').' + networkName: + type: string + description: 'The specific network name within the blockchain (e.g., ''mainnet'', ''testnet'').' + required: + - chainId + - chainName + - chainType + - networkName + Chains: + title: Chains + type: array + description: List of chains and related metadata + items: + type: object + properties: + chainId: + type: string + description: A unique identifier for the blockchain network. + chainName: + type: string + description: The name of the blockchain network. + chainType: + type: string + description: 'The type of blockchain network (e.g., ''evm'', ''fabric'').' + networkName: + type: string + description: 'The specific network name within the blockchain (e.g., ''mainnet'', ''testnet'').' + required: + - chainId + - chainName + - chainType + - networkName + Token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + Tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + HealthCheckResponse: + type: object + properties: + status: + type: string + example: OK + BridgeInfo: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + IncludedStep: + type: object + description: Details a single step within a route including actions and estimates. + properties: + id: + type: string + description: Id of the step + type: + type: string + description: 'Type of the step, typically describing the action, e.g., ''swap''.' + tool: + type: string + description: 'Tool used in the step, e.g., ''stargate''.' + action: + type: object + properties: + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + fromAmount: + type: string + description: 'The amount of ''fromToken'' to be transferred, specified as a string to maintain precision.' + example: '1000000000000000000' + pattern: '^[1-9][0-9]*$' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + slippage: + type: number + format: float + description: The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + example: 0.005 + fromAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + estimate: + type: object + description: 'Provides an estimation for a transaction, including costs, amounts, and execution duration.' + properties: + approvalAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAmountMin: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + fromAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + feeCosts: + type: array + description: A collection of fee costs associated with the transaction. + items: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + amountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + token: + type: string + description: The symbol of a token + example: ETH + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. + gasCosts: + type: array + description: A collection of estimated gas costs for executing the transaction. + items: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: 'The gas price, specified as a string to maintain precision.' + example: '19236858243' + estimate: + type: string + description: 'The estimated gas required, specified as a string to maintain precision.' + example: '445393' + limit: + type: string + description: 'The gas limit for the transaction, specified as a string to maintain precision.' + example: '579011' + pattern: '^[1-9][0-9]*$' + amount: + type: string + description: The amount of gas required in the gas currency. + example: '8567962003424499' + pattern: '^[1-9][0-9]*$' + amountUSD: + type: string + description: The amount of gas required in USD. + example: '16.05' + pattern: '^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$' + token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + executionDuration: + type: integer + description: The estimated duration for the transaction execution in seconds. + example: 30 + fromAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + tool: + type: string + description: The tool or service used to generate this estimate. + example: satp + toolDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + integrationDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + includedStepIds: + type: array + description: 'IDs of further steps included within this step, allowing for nested actions without direct recursion.' + items: + type: string + Insurance: + type: object + properties: + state: + type: string + description: The state of insurance applicability for the transaction. + example: NOT_INSURABLE + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + feeAmountUsd: + type: string + description: 'The fee amount for insurance, represented in USD.' + example: '10.00' + pattern: '^(0|[1-9]\d*)(\.\d+)?$' + Action: + type: object + properties: + fromToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + fromAmount: + type: string + description: 'The amount of ''fromToken'' to be transferred, specified as a string to maintain precision.' + example: '1000000000000000000' + pattern: '^[1-9][0-9]*$' + toToken: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + slippage: + type: number + format: float + description: The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + example: 0.005 + fromAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + IntegrationDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: 'https://cdn.example.com/logos/1inch.png' + Estimate: + type: object + description: 'Provides an estimation for a transaction, including costs, amounts, and execution duration.' + properties: + approvalAddress: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + toAmountMin: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + fromAmount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + feeCosts: + type: array + description: A collection of fee costs associated with the transaction. + items: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + amountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + token: + type: string + description: The symbol of a token + example: ETH + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. + gasCosts: + type: array + description: A collection of estimated gas costs for executing the transaction. + items: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: 'The gas price, specified as a string to maintain precision.' + example: '19236858243' + estimate: + type: string + description: 'The estimated gas required, specified as a string to maintain precision.' + example: '445393' + limit: + type: string + description: 'The gas limit for the transaction, specified as a string to maintain precision.' + example: '579011' + pattern: '^[1-9][0-9]*$' + amount: + type: string + description: The amount of gas required in the gas currency. + example: '8567962003424499' + pattern: '^[1-9][0-9]*$' + amountUSD: + type: string + description: The amount of gas required in USD. + example: '16.05' + pattern: '^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$' + token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. + executionDuration: + type: integer + description: The estimated duration for the transaction execution in seconds. + example: 30 + fromAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + toAmountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + tool: + type: string + description: The tool or service used to generate this estimate. + example: satp + FeeCost: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + amountUSD: + type: string + description: The amount in string format including all decimals. + pattern: '^([1-9][0-9]*|0)(\.[0-9]+)?$' + example: '1000000000000000000' + token: + type: string + description: The symbol of a token + example: ETH + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. + GasCost: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: 'The gas price, specified as a string to maintain precision.' + example: '19236858243' + estimate: + type: string + description: 'The estimated gas required, specified as a string to maintain precision.' + example: '445393' + limit: + type: string + description: 'The gas limit for the transaction, specified as a string to maintain precision.' + example: '579011' + pattern: '^[1-9][0-9]*$' + amount: + type: string + description: The amount of gas required in the gas currency. + example: '8567962003424499' + pattern: '^[1-9][0-9]*$' + amountUSD: + type: string + description: The amount of gas required in USD. + example: '16.05' + pattern: '^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$' + token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + x-category: satp-core + type: string + description: 'The network of the DLT being interacted with. TODO: implement network identification draft' + chainType: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. + address: + type: string + description: A blockchain address. + example: '0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7' + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + type: string + description: 'The logo of a token, chain, dex etc.' + format: uri + tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... + verified: + type: boolean + description: Indicates whether the token is verified. diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml new file mode 100644 index 0000000000..83fbab2cb7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml @@ -0,0 +1,337 @@ +openapi: 3.0.3 +info: + title: SATP Gateway Client (Business Logic Orchestrator) + version: 0.0.2 + description: |- + SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. + + This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. + + **Additional Resources**: + - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) + - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) + - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) + - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) + - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) + - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) + - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + contact: + name: Hyperledger Cacti + x-logo: + altText: Cacti logo + backgroundColor: '#fafafa' + url: https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png +externalDocs: + description: For more information about the SATP Gateway Client, refer to the official documentation. + url: https://github.com/hyperledger/cacti/tree/main/packages/cactus-plugin-satp-hermes/README.md +servers: + - url: http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes + description: Development server + variables: + host: + default: localhost + port: + default: '3011' +tags: + - name: transaction + description: API endpoints for interacting with blockchains via gateways + - name: admin + description: API endpoints for fetching information on SATP sessions +paths: + /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact: + post: + tags: + - transaction + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Transact + requestBody: + content: + application/json: + schema: + $ref: ./schemas.yml#/TransactRequest + required: true + responses: + '200': + description: Transaction successfully queued + content: + application/json: + schema: + $ref: ./schemas.yml#/TransactResponse + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel: + post: + tags: + - transaction + summary: Cancel a transaction session + description: Attempts to cancel a previously submitted transaction intent using its session ID. + operationId: Cancel + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel + requestBody: + content: + application/json: + schema: + $ref: ./schemas.yml#/CancelRequest + required: true + responses: + '200': + description: Transaction cancellation attempted + content: + application/json: + schema: + $ref: ./schemas.yml#/CancelResponse + default: + description: An error occurred or transaction cannot be cancelled + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-plugin-satp-hermes/status: + get: + summary: Get SATP current session data + description: Retrieve the status of a SATP session + operationId: GetStatus + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/status + parameters: + - name: SessionID + in: query + schema: + $ref: ./schemas.yml#/SessionID + required: true + description: Unique identifier for the session. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: ./schemas.yml#/StatusResponse + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck: + get: + summary: Health check endpoint + description: Responds if SATP Hermes is on + operationId: GetHealthCheck + tags: + - admin + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: './schemas.yml#/HealthCheckResponse' + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue: + post: + tags: + - admin + summary: Continue a paused transaction session + description: Attempts to continue a previously paused transaction intent, resuming its execution. + operationId: Continue + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue + requestBody: + content: + application/json: + schema: + $ref: ./schemas.yml#/ContinueRequest + required: true + responses: + '200': + description: Transaction continuation attempted + content: + application/json: + schema: + $ref: ./schemas.yml#/ContinueResponse + default: + description: An error occurred or transaction cannot be continued + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause: + post: + tags: + - admin + summary: Pause a transaction session + description: Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + operationId: Pause + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause + requestBody: + content: + application/json: + schema: + $ref: ./schemas.yml#/PauseRequest + required: true + responses: + '200': + description: Transaction pause attempted + content: + application/json: + schema: + $ref: ./schemas.yml#/PauseResponse + default: + description: An error occurred or transaction cannot be paused + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + + /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations: + get: + tags: + - transaction + summary: Get supported integrations + description: Retrieves metadata about each supported blockchain networks, chains, and other systems. + operationId: GetIntegrations + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations + responses: + "200": + description: A list of supported systems. + content: + application/json: + schema: + $ref: ./schemas.yml#/Chains + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes: + get: + description: Get a list of possible routes for swapping one asset for another across multiple exchanges + summary: Get a list of routes for a gateway-to-gateway asset transfer + tags: + - transaction + operationId: GetRoutes + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes + parameters: + - name: fromNetworkID + in: query + schema: + $ref: ./schemas.yml#/DLTNetworkID + required: true + description: The sending DLT Network. + - name: fromAmount + in: query + schema: + $ref: ./schemas.yml#/AmountString + required: true + description: The amount that should be sent including all decimals. + - name: fromToken + in: query + schema: + $ref: ./schemas.yml#/Address + required: true + description: The token that should be transferred. Can be the address or the symbol. + - name: toDLTNetwork + in: query + schema: + $ref: ./schemas.yml#/DLTNetworkID + required: true + description: The receiving DLT Network. + - name: toToken + in: query + schema: + $ref: ./schemas.yml#/Address + required: true + description: The token that should be transferred to. Can be the address or the symbol. + - name: fromAddress + in: query + schema: + $ref: ./schemas.yml#/Address + required: true + description: The sending wallet address. + - name: toAddress + in: query + schema: + $ref: ./schemas.yml#/Address + required: true + description: The receiving wallet address. If none is provided, the fromAddress will be used. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: ./schemas.yml#/RoutesResponse + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit: + get: + tags: + - admin + summary: Audit transactions + description: Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + operationId: GetAudit + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit + parameters: + - name: auditStartDate + in: query + description: The start date for the audit period. + required: false + schema: + type: string + format: date-time + - name: auditEndDate + in: query + description: The end date for the audit period. + required: false + schema: + type: string + format: date-time + - name: includeProofs + in: query + description: Include proofs generated from each gateway transaction. + required: false + schema: + type: boolean + responses: + '200': + description: Audit results + content: + application/json: + schema: + $ref: ./schemas.yml#/getAuditResponse +components: + schemas: + $ref: ./schemas.yml diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml new file mode 100644 index 0000000000..ab79555139 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml @@ -0,0 +1,696 @@ +AuthzScope: + type: string + enum: + - group:admin + - group:user + x-enum-descriptions: + - Identities with the group:admin scope are administrators of the system. + - Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. + x-enum-varnames: + - GroupAdmin + - GroupUser + example: group:admin +AuthzJwtClaim: + description: "Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1" + type: string + enum: + - Hyperledger Labs - Carbon Accounting Tool + x-enum-descriptions: + - The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. + x-enum-varnames: + - iss + example: Hyperledger Labs - Carbon Accounting Tool +CredentialProfile: + type: string + enum: + - SAML + - OAUTH + - X509 + example: OAUTH +getAuditRequest: + description: "Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs." + type: object + x-category: request + properties: + auditStartDate: + type: string + format: date-time + description: The start datetime for the audit. + example: "2023-01-01T00:00:00Z" + auditEndDate: + type: string + format: date-time + description: The end datetime for the audit. + example: "2023-01-31T23:59:59Z" + includeProofs: + type: boolean + description: Include proofs generated from each gateway transaction. + example: true +getAuditResponse: + description: "Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes." + type: object + x-category: response + properties: + proofs: + type: array + items: + type: string + description: An array of strings representing proofs. + example: ["proof1", "proof2"] + auditStartTime: + type: string + format: date-time + description: The start datetime of the audit period. + example: "2023-01-01T00:00:00Z" + auditEndTime: + type: string + format: date-time + description: The end datetime of the audit period. + example: "2023-01-31T23:59:59Z" +StatusResponse: + description: "Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information." + type: object + x-category: response + required: + - status + - substatus + - stage + - step + - startTime + - originChain + - destinationChain + properties: + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + substatus: + type: string + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + stage: + type: string + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + step: + type: string + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + startTime: + type: string + format: date-time + example: "2023-01-01T00:00:00Z" + originChain: + type: object + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + destinationChain: + type: object + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 +PauseRequest: + description: "Request to temporarily pause an ongoing transaction session, identified by the session and context IDs." + type: object + properties: + sessionId: + type: string + format: uuid + example: "123e4567-e89b-12d3-a456-426614174000" + contextId: + type: string + format: uuid + example: "123e4567-e89b-12d3-a456-426614174001" + +PauseResponse: + description: "Response for a pause transaction request. Returns the current status of the SATP session post-pause action." + type: object + properties: + statusResponse: + $ref: ./schemas.yml#/StatusResponse + required: + - statusResponse +StatusRequest: + description: "Request for retrieving the current status of a session, identified by the session ID." + type: object + x-category: request + required: + - sessionID + properties: + sessionID: + type: string + description: The ID of the session for which the status is being requested. + example: "123e4567-e89b-12d3-a456-426614174000" +TransactRequest: + description: "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks." + type: object + required: + - contextID + - mode + properties: + contextID: + type: string + format: uuid + example: "123e4567-e89b-12d3-a456-426614174000" + mode: + type: string + enum: + - data + - transfer + example: transfer + payload: + type: string + example: '{"data":"example payload"}' + fromDLTNetworkID: + type: string + example: "network1" + toDLTNetworkID: + type: string + example: "network2" + fromAmount: + type: string + example: "100" + fromToken: + type: string + example: "TOKEN1" + toAmount: + type: string + example: "95" + toToken: + type: string + example: "TOKEN2" + +TransactResponse: + description: "Response schema for a transaction request. Includes the session ID and the current status of the transaction." + type: object + properties: + sessionID: + $ref: ./schemas.yml#/SessionID + statusResponse: + $ref: ./schemas.yml#/StatusResponse + required: + - sessionID + - statusResponse +CancelRequest: + description: "Request to cancel an ongoing transaction session, identified by the session ID." + type: object + properties: + sessionID: + $ref: ./schemas.yml#/SessionID + required: + - sessionID +CancelResponse: + description: "Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status." + type: object + properties: + statusResponse: + $ref: ./schemas.yml#/StatusResponse + cancelSuccessful: + type: boolean + description: Indicates whether the cancel operation was successful. + example: true + required: + - statusResponse + - cancelSuccessful +APIError: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: "2021-07-21T17:32:28Z" +DLTProtocol: + x-category: satp-core + type: string + enum: + - HyperledgerFabric + - HyperledgerBesu + description: Supported DLT protocols. +DLTNetworkID: + x-category: satp-core + type: string + description: "The network of the DLT being interacted with. TODO: implement network identification draft" +DLTSubnetworkID: + x-category: satp-core + type: string + description: "The subnetwork of the DLT being interacted with. TODO: implement network identification draft" +SessionID: + x-category: satp-core + type: string + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 +Address: + type: string + description: A blockchain address. + example: "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" +AmountString: + type: string + description: The amount in string format including all decimals. + pattern: ^([1-9][0-9]*|0)(\.[0-9]+)?$ + example: "1000000000000000000" +AmountDecimal: + type: number + format: float + description: Amount value with decimal places + example: 100.33 +TokenSymbol: + type: string + description: The symbol of a token + example: ETH +LogoURI: + type: string + description: The logo of a token, chain, dex etc. + format: uri +RoutesResponse: + type: object + description: A collection of available and unavailable routes + required: + - routes + properties: + routes: + type: array + description: A collection of route objects + items: + $ref: ./schemas.yml#/Route +Route: + type: object + properties: + id: + type: string + description: A unique identifier of the route. + gatewayID: + type: string + format: uuid + description: A unique identifier for the gateway. + mode: + type: string + enum: + - data + - transfer + description: The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. + fromDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will originate. + fromAmountUSD: + type: string + format: double + description: The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. + fromAmount: + type: string + description: The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + pattern: ^[1-9][0-9]*$ + fromToken: + $ref: ./schemas.yml#/Token + toDLTNetworkID: + type: string + description: The ID of the DLT Network where the operation will end. + toAmountUSD: + type: string + description: The expected amount to be received in USD. + toAmount: + type: string + description: The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + toAmountMin: + type: string + description: The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + toToken: + $ref: ./schemas.yml#/Token + gasCostUSD: + type: string + description: The expected gas cost in USD. + containsSwitchChain: + type: boolean + description: Whether chain switching is enabled or not. + steps: + type: array + description: List of steps involved in this route, adjusted for mode. + items: + $ref: ./schemas.yml#/IncludedStep + insurance: + $ref: ./schemas.yml#/Insurance + tags: + $ref: ./schemas.yml#/Tags + required: + - id + - gatewayID + - mode +ContinueRequest: + type: object + properties: + sessionId: + type: string + format: uuid + description: A unique identifier for the transaction session to be continued. + contextId: + type: string + format: uuid + description: A unique identifier for the transaction context. + required: + - sessionId + - contextId + description: Schema for a request to continue a paused transaction session. +ContinueResponse: + type: object + description: Response schema for a continue request, returning the status of the SATP session. + properties: + statusResponse: + $ref: ./schemas.yml#/StatusResponse + required: + - statusResponse +Chain: + type: object + properties: + chainId: + type: string + description: A unique identifier for the blockchain network. + chainName: + type: string + description: The name of the blockchain network. + chainType: + type: string + description: The type of blockchain network (e.g., 'evm', 'fabric'). + networkName: + type: string + description: The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). + required: + - chainId + - chainName + - chainType + - networkName +Chains: + title: Chains + type: array + description: List of chains and related metadata + items: + $ref: ./schemas.yml#/Chain +Token: + type: object + description: Metadata detailing a supported token + required: + - chainID + - chainType + - address + - symbol + - decimals + properties: + chainID: + $ref: ./schemas.yml#/DLTNetworkID + chainType: + $ref: ./schemas.yml#/DLTProtocol + address: + $ref: ./schemas.yml#/Address + name: + type: string + description: The name of the token. + symbol: + type: string + description: The symbol of the token. + decimals: + type: integer + description: How many decimals the token supports. + minimum: 1 + logoURI: + $ref: ./schemas.yml#/LogoURI + tags: + $ref: ./schemas.yml#/Tags + priceUSD: + type: string + description: The current price of the token in USD. + extensions: + type: object + properties: + bridgeInfo: + type: object + additionalProperties: + $ref: ./schemas.yml#/BridgeInfo + verified: + type: boolean + description: Indicates whether the token is verified. +Tags: + title: Tags + type: array + description: List of tags identifiers providing additional context or categorization. + items: + type: string + example: + - satp + - hyperledger +HealthCheckResponse: + type: object + properties: + status: + type: string + example: 'OK' +BridgeInfo: + type: object + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + type: string + description: The address of the token being transferred. + example: 0x... +IncludedStep: + type: object + description: Details a single step within a route including actions and estimates. + properties: + id: + type: string + description: Id of the step + type: + type: string + description: Type of the step, typically describing the action, e.g., 'swap'. + tool: + type: string + description: Tool used in the step, e.g., 'stargate'. + action: + $ref: ./schemas.yml#/Action + estimate: + $ref: ./schemas.yml#/Estimate + toolDetails: + $ref: ./schemas.yml#/IntegrationDetails + integrationDetails: + $ref: ./schemas.yml#/IntegrationDetails + includedStepIds: + type: array + description: IDs of further steps included within this step, allowing for nested actions without direct recursion. + items: + type: string +Insurance: + type: object + properties: + state: + type: string + description: The state of insurance applicability for the transaction. + example: NOT_INSURABLE + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + feeAmountUsd: + type: string + description: The fee amount for insurance, represented in USD. + example: "10.00" + pattern: ^(0|[1-9]\d*)(\.\d+)?$ +Action: + type: object + properties: + fromToken: + $ref: ./schemas.yml#/Token + fromAmount: + type: string + description: The amount of 'fromToken' to be transferred, specified as a string to maintain precision. + example: "1000000000000000000" + pattern: ^[1-9][0-9]*$ + toToken: + $ref: ./schemas.yml#/Token + slippage: + type: number + format: float + description: The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + example: 0.005 + fromAddress: + $ref: ./schemas.yml#/Address + toAddress: + $ref: ./schemas.yml#/Address +IntegrationDetails: + type: object + description: Describes integration or tool details such as bridges or exchanges involved in the transaction. + required: + - key + - name + - logoURI + properties: + key: + type: string + description: A unique identifier for the integration or tool. + example: 1inch + name: + type: string + description: The name of the integration or tool. + example: 1inch Exchange + logoURI: + type: string + format: uri + description: URL to the logo of the integration or tool. + example: https://cdn.example.com/logos/1inch.png +Estimate: + type: object + description: Provides an estimation for a transaction, including costs, amounts, and execution duration. + properties: + approvalAddress: + $ref: ./schemas.yml#/Address + toAmountMin: + $ref: ./schemas.yml#/AmountString + toAmount: + $ref: ./schemas.yml#/AmountString + fromAmount: + $ref: ./schemas.yml#/AmountString + feeCosts: + type: array + description: A collection of fee costs associated with the transaction. + items: + $ref: ./schemas.yml#/FeeCost + gasCosts: + type: array + description: A collection of estimated gas costs for executing the transaction. + items: + $ref: ./schemas.yml#/GasCost + executionDuration: + type: integer + description: The estimated duration for the transaction execution in seconds. + example: 30 + fromAmountUSD: + $ref: ./schemas.yml#/AmountString + toAmountUSD: + $ref: ./schemas.yml#/AmountString + tool: + type: string + description: The tool or service used to generate this estimate. + example: satp +FeeCost: + type: object + description: Details about a specific fee cost associated with the transaction. + properties: + name: + type: string + description: Name of the fee cost. + example: Network Fee + amount: + $ref: ./schemas.yml#/AmountString + amountUSD: + $ref: ./schemas.yml#/AmountString + token: + $ref: ./schemas.yml#/TokenSymbol + included: + type: boolean + description: Indicates if the fee is included in the transaction amount. +GasCost: + type: object + properties: + type: + type: string + description: The type of the gas cost. + example: SEND + price: + type: string + description: The gas price, specified as a string to maintain precision. + example: "19236858243" + estimate: + type: string + description: The estimated gas required, specified as a string to maintain precision. + example: "445393" + limit: + type: string + description: The gas limit for the transaction, specified as a string to maintain precision. + example: "579011" + pattern: ^[1-9][0-9]*$ + amount: + type: string + description: The amount of gas required in the gas currency. + example: "8567962003424499" + pattern: ^[1-9][0-9]*$ + amountUSD: + type: string + description: The amount of gas required in USD. + example: "16.05" + pattern: ^(0(\.[0-9]+)?|[1-9][0-9]*(\.[0-9]+)?)$ + token: + $ref: ./schemas.yml#/Token diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml new file mode 100644 index 0000000000..5027174a8d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml @@ -0,0 +1,1229 @@ +openapi: 3.0.3 +info: + title: Hyperledger Cactus Plugin - Odap Hermes + description: Implementation for Odap and Hermes + version: v2.0.0-alpha.2 + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html +components: + schemas: + CredentialProfile: + type: string + enum: + - SAML + - OAUTH + - X509 + PayloadProfile: + type: object + properties: + assetProfile: + $ref: '#/components/schemas/AssetProfile' + capabilities: + type: string + required: + - assetProfile + ApplicationProfile: + type: object + Payload: + type: object + AssetProfile: + type: object + properties: + issuer: + type: string + assetCode: + type: string + assetCodeType: + type: string + issuanceDate: + type: string + expirationDate: + type: string + verificationEndPoint: + type: string + digitalSignature: + type: string + prospectusLink: + type: string + keyInformationLink: + type: array + items: {} + keyWord: + type: array + items: {} + transferRestriction: + type: array + items: {} + ledgerRequirements: + type: array + items: {} + required: + - expirationDate + LoggingProfile: + type: array + items: + type: string + AccessControlProfile: + type: array + items: + type: string + Permissions: + type: object + Transaction: + type: object + ActionCategory: + type: object + History: + type: object + properties: + Transactions: + type: array + items: + $ref: '#/components/schemas/Transaction' + Actions: + type: array + items: + $ref: '#/components/schemas/ActionCategory' + Origin: + type: string + Destination: + type: string + Balance: + type: string + CurrentStatus: + type: object + ApplicationSpecificParameters: + type: object + SenderDltSystem: + type: object + RecipientDltSystem: + type: object + LockEvidenceClaim: + type: object + LockClaimFormat: + type: object + CommitFinalClaim: + type: object + CommitFinalClaimFormat: + type: object + CommitAcknowledgementClaim: + type: object + CommitAcknowledgementClaimFormat: + type: object + SessionData: + type: object + properties: + id: + type: string + step: + type: number + version: + type: string + lastSequenceNumber: + type: number + loggingProfile: + type: string + accessControlProfile: + type: string + applicationProfile: + type: string + payloadProfile: + $ref: '#/components/schemas/PayloadProfile' + assetProfile: + $ref: '#/components/schemas/AssetProfile' + allowedSourceBackupGateways: + type: array + items: + type: string + allowedRecipientBackupGateways: + type: array + items: + type: string + sourceBasePath: + type: string + recipientBasePath: + type: string + originatorPubkey: + type: string + beneficiaryPubkey: + type: string + sourceGatewayPubkey: + type: string + sourceGatewayDltSystem: + type: string + recipientGatewayPubkey: + type: string + recipientGatewayDltSystem: + type: string + initializationRequestMessageHash: + type: string + initializationResponseMessageHash: + type: string + initializationRequestMessageRcvTimeStamp: + type: string + initializationRequestMessageProcessedTimeStamp: + type: string + clientSignatureInitializationRequestMessage: + type: string + serverSignatureInitializationResponseMessage: + type: string + transferCommenceMessageRequestHash: + type: string + transferCommenceMessageResponseHash: + type: string + clientSignatureTransferCommenceRequestMessage: + type: string + serverSignatureTransferCommenceResponseMessage: + type: string + lockEvidenceRequestMessageHash: + type: string + lockEvidenceResponseMessageHash: + type: string + clientSignatureLockEvidenceRequestMessage: + type: string + serverSignatureLockEvidenceResponseMessage: + type: string + lockEvidenceClaim: + type: string + commitPrepareRequestMessageHash: + type: string + commitPrepareResponseMessageHash: + type: string + clientSignatureCommitPreparationRequestMessage: + type: string + serverSignatureCommitPreparationResponseMessage: + type: string + commitFinalRequestMessageHash: + type: string + commitFinalResponseMessageHash: + type: string + commitFinalClaim: + type: string + commitFinalClaimFormat: + type: string + commitAcknowledgementClaim: + type: string + commitAcknowledgementClaimFormat: + type: string + clientSignatureCommitFinalRequestMessage: + type: string + serverSignatureCommitFinalResponseMessage: + type: string + transferCompleteMessageHash: + type: string + clientSignatureTransferCompleteMessage: + type: string + maxRetries: + type: number + recipientLedgerAssetID: + type: string + sourceLedgerAssetID: + type: string + maxTimeout: + type: number + lastLogEntryTimestamp: + type: string + unlockAssetClaim: + type: string + recreateAssetClaim: + type: string + deleteAssetClaim: + type: string + lastMessageReceivedTimestamp: + type: string + rollback: + type: boolean + rollbackMessageHash: + type: string + rollbackProofs: + type: array + items: + type: string + rollbackActionsPerformed: + type: array + items: + type: string + enum: + - CREATE + - DELETE + - LOCK + - UNLOCK + TransferInitializationV1Request: + type: object + properties: + messageType: + type: string + sessionID: + type: string + version: + type: string + developerURN: + type: string + credentialProfile: + $ref: '#/components/schemas/CredentialProfile' + payloadProfile: + $ref: '#/components/schemas/PayloadProfile' + applicationProfile: + type: string + loggingProfile: + type: string + accessControlProfile: + type: string + signature: + type: string + sourceGatewayPubkey: + type: string + sourceGatewayDltSystem: + type: string + recipientGatewayPubkey: + type: string + recipientGatewayDltSystem: + type: string + escrowType: + type: string + enum: + - FAUCET + - TIMELOCK + - HASHLOCK + - HASHTIMELOCK + - MULTICLAIMPC + - DESTROY + - BURN + expiryTime: + type: string + multipleClaimsAllowed: + type: boolean + multipleCancelsAllowed: + type: boolean + permissions: + $ref: '#/components/schemas/Permissions' + origin: + type: string + destination: + type: string + subsequentCalls: + type: object + histories: + type: array + items: + $ref: '#/components/schemas/History' + sequenceNumber: + type: integer + sourceBasePath: + type: string + recipientBasePath: + type: string + maxRetries: + type: number + maxTimeout: + type: number + backupGatewaysAllowed: + type: array + items: + type: string + recipientLedgerAssetID: + type: string + sourceLedgerAssetID: + type: string + required: + - messageType + - sessionID + - loggingProfile + - accessControlProfile + - payloadProfile + - applicationProfile + - signature + - sourceGatewayPubkey + - sourceGatewayDltSystem + - recipientGatewayPubkey + - recipientGatewayDltSystem + - sequenceNumber + - sourceBasePath + - recipientBasePath + - maxRetries + - maxTimeout + - backupGatewaysAllowed + - recipientLedgerAssetID + - sourceLedgerAssetID + TransferInitializationV1Response: + type: object + properties: + messageType: + type: string + sessionID: + type: string + sequenceNumber: + type: number + odapPhase: + type: string + enum: + - TransferInitialization + - LockEvidenceVerification + - CommitmentEstablishment + initialRequestMessageHash: + type: string + destination: + type: string + timeStamp: + type: string + processedTimeStamp: + type: string + serverIdentityPubkey: + type: string + signature: + type: string + backupGatewaysAllowed: + type: array + items: + type: string + required: + - messageType + - initialRequestMessageHash + - timeStamp + - processedTimeStamp + - sessionID + - serverIdentityPubkey + - sequenceNumber + - signature + - backupGatewaysAllowed + TransferCommenceV1Request: + type: object + properties: + sessionID: + type: string + messageType: + type: string + originatorPubkey: + type: string + beneficiaryPubkey: + type: string + senderDltSystem: + type: string + recipientDltSystem: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + hashAssetProfile: + type: string + assetUnit: + type: integer + hashPrevMessage: + type: string + clientTransferNumber: + type: integer + nullable: true + signature: + type: string + sequenceNumber: + type: integer + required: + - sessionID + - messageType + - originatorPubkey + - beneficiaryPubkey + - senderDltSystem + - recipientDltSystem + - clientIdentityPubkey + - serverIdentityPubkey + - hashAssetProfile + - hashPrevMessage + - signature + - sequenceNumber + TransferCommenceV1Response: + type: object + properties: + sessionID: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + hashCommenceRequest: + type: string + serverTransferNumber: + type: integer + nullable: true + signature: + type: string + messageType: + type: string + messageHash: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - serverIdentityPubkey + - clientIdentityPubkey + - hashCommenceRequest + - signature + - sequenceNumber + LockEvidenceV1Request: + type: object + properties: + sessionID: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + lockEvidenceClaim: + type: string + lockEvidenceFormat: + $ref: '#/components/schemas/LockClaimFormat' + nullable: true + lockEvidenceExpiration: + type: string + hashCommenceAckRequest: + type: string + clientTransferNumber: + type: integer + nullable: true + signature: + type: string + messageType: + type: string + messageHash: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - lockEvidenceClaim + - lockEvidenceExpiration + - hashCommenceAckRequest + - signature + - sequenceNumber + LockEvidenceV1Response: + type: object + properties: + sessionID: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + hashLockEvidenceRequest: + type: string + serverTransferNumber: + type: integer + nullable: true + signature: + type: string + messageType: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - hashLockEvidenceRequest + - signature + - sequenceNumber + CommitPreparationV1Request: + type: object + properties: + sessionID: + type: string + messageType: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + hashLockEvidenceAck: + type: string + clientTransferNumber: + type: integer + signature: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - hashLockEvidenceAck + - signature + - sequenceNumber + CommitPreparationV1Response: + type: object + properties: + sessionID: + type: string + messageType: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + hashCommitPrep: + type: string + serverTransferNumber: + type: string + signature: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - hashCommitPrep + - signature + - sequenceNumber + CommitFinalV1Request: + type: object + properties: + sessionID: + type: string + messageType: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + commitFinalClaim: + type: string + commitFinalClaimFormat: + $ref: '#/components/schemas/CommitFinalClaimFormat' + hashCommitPrepareAck: + type: string + clientTransferNumber: + type: integer + nullable: true + signature: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - commitFinalClaim + - hashCommitPrepareAck + - signature + - sequenceNumber + CommitFinalV1Response: + type: object + properties: + sessionID: + type: string + messageType: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + commitAcknowledgementClaim: + type: string + commitAcknowledgementClaimFormat: + $ref: '#/components/schemas/CommitAcknowledgementClaimFormat' + hashCommitFinal: + type: string + serverTransferNumber: + type: integer + signature: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - commitAcknowledgementClaim + - hashCommitFinal + - signature + - sequenceNumber + TransferCompleteV1Request: + type: object + properties: + sessionID: + type: string + messageType: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + hashCommitFinalAck: + type: string + clientTransferNumber: + type: integer + nullable: true + signature: + type: string + hashTransferCommence: + type: string + sequenceNumber: + type: number + required: + - sessionID + - messageType + - clientIdentityPubkey + - serverIdentityPubkey + - hashCommitFinalAck + - signature + - hashTransferCommence + - sequenceNumber + ClientV1Request: + type: object + properties: + version: + type: string + loggingProfile: + type: string + accessControlProfile: + type: string + assetControlProfile: + type: string + applicationProfile: + type: string + assetProfile: + $ref: '#/components/schemas/AssetProfile' + payloadProfile: + $ref: '#/components/schemas/PayloadProfile' + sourceGatewayDltSystem: + type: string + recipientGatewayDltSystem: + type: string + recipientGatewayPubkey: + type: string + originatorPubkey: + type: string + beneficiaryPubkey: + type: string + clientIdentityPubkey: + type: string + serverIdentityPubkey: + type: string + clientDltSystem: + type: string + serverDltSystem: + type: string + clientGatewayConfiguration: + type: object + properties: + apiHost: + type: string + required: + - apiHost + serverGatewayConfiguration: + type: object + properties: + apiHost: + type: string + required: + - apiHost + maxRetries: + type: number + maxTimeout: + type: number + sourceLedgerAssetID: + type: string + recipientLedgerAssetID: + type: string + required: + - version + - loggingProfile + - accessControlProfile + - assetControlProfile + - applicationProfile + - assetProfile + - payloadProfile + - sourceGatewayDltSystem + - recipientGatewayDltSystem + - recipientGatewayPubkey + - originatorPubkey + - beneficiaryPubkey + - clientIdentityPubkey + - serverIdentityPubkey + - clientDltSystem + - serverDltSystem + - clientGatewayConfiguration + - serverGatewayConfiguration + - maxRetries + - maxTimeout + - sourceLedgerAssetID + - recipientLedgerAssetID + RecoverV1Message: + type: object + properties: + sessionID: + type: string + odapPhase: + type: string + sequenceNumber: + type: number + lastLogEntryTimestamp: + type: string + isBackup: + type: boolean + newBasePath: + type: string + newGatewayPubKey: + type: string + signature: + type: string + required: + - sessionID + - odapPhase + - sequenceNumber + - lastLogEntryTimestamp + - isBackup + - newBasePath + - signature + RecoverUpdateV1Message: + type: object + properties: + sessionID: + type: string + recoveredLogs: + type: array + items: + $ref: '#/components/schemas/LocalLog' + signature: + type: string + required: + - sessionID + - recoveredLogs + - signature + RecoverUpdateAckV1Message: + type: object + properties: + sessionID: + type: string + success: + type: boolean + changedEntriesHash: + type: array + items: + type: string + signature: + type: string + required: + - sessionID + - success + - changedEntriesHash + - signature + RecoverSuccessV1Message: + type: object + properties: + sessionID: + type: string + success: + type: boolean + signature: + type: string + required: + - sessionID + - success + - signature + RollbackV1Message: + type: object + properties: + sessionID: + type: string + success: + type: boolean + actionPerformed: + type: array + items: + type: string + proofs: + type: array + items: + type: string + signature: + type: string + required: + - sessionID + - success + - actionPerformed + - proofs + - signature + RollbackAckV1Message: + type: object + properties: + sessionID: + type: string + success: + type: boolean + signature: + type: string + required: + - sessionID + - success + - signature + LocalLog: + type: object + properties: + key: + type: string + sessionID: + type: string + data: + type: string + type: + type: string + operation: + type: string + timestamp: + type: string + required: + - sessionID + - type + - operation + SatpMessage: + type: object + properties: + SequenceNumber: + type: number + Phase: + type: string + enum: + - TransferInitialization + - LockEvidenceVerification + - CommitmentEstablishment + ResourceURL: + type: string + DeveloperURN: + type: string + ActionResponse: + type: object + properties: + ResponseCode: + type: string + enum: + - '200' + - '404' + x-enum-varnames: + - OK + - RESOURCE_NOT_FOUND + Arguments: + type: array + items: {} + CredentialProfile: + type: string + enum: + - SAML + - OAuth + - X509 + CredentialBlock: + type: array + items: {} + CredentialsProfile: + $ref: '#/components/schemas/PayloadProfile' + ApplicationProfile: + $ref: '#/components/schemas/ApplicationProfile' + Payload: + $ref: '#/components/schemas/Payload' + PayloadHash: + type: string + MessageSignature: + type: string +paths: + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest + operationId: phase1TransferInitiationRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferInitializationV1Request' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest + operationId: phase2TransferCommenceRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferCommenceV1Request' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest + operationId: phase2LockEvidenceRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LockEvidenceV1Request' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest + operationId: phase3CommitPreparationRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommitPreparationV1Request' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest + operationId: phase3CommitFinalRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommitFinalV1Request' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest: + get: + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest + operationId: phase3TransferCompleteRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferCompleteV1Request' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest + operationId: clientRequestV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientV1Request' + responses: + '200': + description: OK + content: + application/json: + schema: {} + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse + operationId: phase1TransferInitiationResponseV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferInitializationV1Response' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse + operationId: phase2TransferCommenceResponseV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferCommenceV1Response' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse + operationId: phase2LockEvidenceResponseV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LockEvidenceV1Response' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse + operationId: phase3CommitPreparationResponseV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommitPreparationV1Response' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse + operationId: phase3CommitFinalResponseV1 + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommitFinalV1Response' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage + operationId: RecoverV1Message + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecoverV1Message' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage + operationId: RecoverUpdateV1Message + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecoverUpdateV1Message' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage + operationId: RecoverUpdateAckV1Message + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecoverUpdateAckV1Message' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage + operationId: RecoverV1Success + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecoverSuccessV1Message' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage + operationId: RollbackV1Message + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RollbackV1Message' + responses: + '200': + description: OK + /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage: + post: + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage + operationId: RollbackAckV1Message + description: '' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RollbackAckV1Message' + responses: + '200': + description: OK diff --git a/packages/cactus-plugin-satp-hermes/src/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 index 8c3a4f5ff0..6e7a8fad98 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts @@ -31,7 +31,10 @@ import { knexRemoteConnection, knexServerConnection, } from "../knex.config"; -import { Containers, pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; const logLevel: LogLevelDesc = "INFO"; @@ -68,13 +71,13 @@ const log = LoggerProvider.getOrCreate({ beforeAll(async () => { pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); { // Server Gateway configuration @@ -107,9 +110,13 @@ beforeAll(async () => { pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - + expect( + pluginRecipientGateway.localRepository?.database, + ).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); + await pluginRecipientGateway.localRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts index e1ec6bbe27..7ddc8a62d9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts @@ -1,42 +1,33 @@ import "jest-extended"; import { Containers, + FabricTestLedgerV1, pruneDockerAllIfGithubAction, + BesuTestLedger, } from "@hyperledger/cactus-test-tooling"; -import { - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; // import coordinator factory, coordinator and coordinator options -import { - SATPGateway, - SATPGatewayConfig, -} from "../../../main/typescript/gateway-refactor"; +import { SATPGateway, SATPGatewayConfig } from "../../../main/typescript/gateway-refactor"; import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; import { - IPluginFactoryOptions, - PluginImportType, + IPluginFactoryOptions, PluginImportType, } from "@hyperledger/cactus-core-api"; -import { - ShutdownHook, - SupportedGatewayImplementations, -} from "./../../../main/typescript/core/types"; +import { SupportedGatewayImplementations } from './../../../main/typescript/core/types'; const logLevel: LogLevelDesc = "INFO"; -const logger = LoggerProvider.getOrCreate({ +const log = LoggerProvider.getOrCreate({ level: "INFO", label: "satp-gateway-orchestrator-init-test", }); const factoryOptions: IPluginFactoryOptions = { pluginImportType: PluginImportType.Local, -}; +} const factory = new PluginFactorySATPGateway(factoryOptions); beforeAll(async () => { pruneDockerAllIfGithubAction({ logLevel }) .then(() => { - logger.info("Pruning throw OK"); + log.info("Pruning throw OK"); }) .catch(async () => { await Containers.logDiagnostics({ logLevel }); @@ -45,6 +36,7 @@ beforeAll(async () => { }); describe("SATPGateway initialization", () => { + it("initiates with default config", async () => { const options: SATPGatewayConfig = {}; const gateway = await factory.create(options); @@ -67,7 +59,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ]); expect(identity.proofID).toBe("mockProofID1"); - expect(identity.gatewayServerPort).toBe(3010); + expect(identity.port).toBe(3000); expect(identity.address).toBe("http://localhost"); }); @@ -89,7 +81,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID10", - gatewayServerPort: 3010, + port: 3001, address: "https://localhost", }, }; @@ -113,7 +105,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ]); expect(identity.proofID).toBe("mockProofID10"); - expect(identity.gatewayServerPort).toBe(3010); + expect(identity.port).toBe(3001); expect(identity.address).toBe("https://localhost"); }); @@ -135,6 +127,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID10", + port: 3010, address: "https://localhost", }, }; @@ -142,77 +135,20 @@ describe("SATPGateway initialization", () => { expect(gateway).toBeInstanceOf(SATPGateway); const identity = gateway.getIdentity(); - // default servers - expect(identity.gatewayServerPort).toBe(3010); - expect(identity.gatewayClientPort).toBe(3011); + expect(identity.port).toBe(3010); expect(identity.address).toBe("https://localhost"); - await gateway.startup(); + await gateway.startupServer(); await gateway.shutdown(); }); - it("shutdown hooks work", async () => { - const options: SATPGatewayConfig = { - gid: { - id: "mockID", - name: "CustomGateway", - version: [ - { - Core: "v02", - Architecture: "v02", - Crash: "v02", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID10", - gatewayServerPort: 3014, - gatewayClientPort: 3015, - address: "https://localhost", - }, - }; - - const gateway = await factory.create(options); - expect(gateway).toBeInstanceOf(SATPGateway); - - // ensure logger is called with "mockHook" - const loggerSpy = jest.spyOn(logger, "info"); - - // ensure mockHookFn is called on shutdown - const mockHookFn = jest.fn(async () => { - logger.info("mockHook"); - }); - - const shutdownHook: ShutdownHook = { - name: "mockHook", - hook: async () => { - logger.info("mockHook"); - }, - }; - - const shutdownHookFn: ShutdownHook = { - name: "mockHookFn", - hook: mockHookFn, - }; - - gateway.onShutdown(shutdownHook); - gateway.onShutdown(shutdownHookFn); - await gateway.startup(); - await gateway.shutdown(); - - expect(loggerSpy).toHaveBeenCalledWith("mockHook"); - expect(mockHookFn).toHaveBeenCalled(); - - // for now, technically not needed. However if we use more tests with loggerSpy, conflicts could arise. This is a reminder to restore the spy after each test - loggerSpy.mockRestore(); - }); }); afterAll(async () => { + // shutdown channels + await pruneDockerAllIfGithubAction({ logLevel }) .then(() => { - logger.info("Pruning throw OK"); + log.info("Pruning throw OK"); }) .catch(async () => { await Containers.logDiagnostics({ logLevel }); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts index e49f1b8b5f..10355e7ccc 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts @@ -6,7 +6,12 @@ import bodyParser from "body-parser"; import express from "express"; import { DefaultApi as SatpApi } from "../../../main/typescript/public-api"; -import { IListenOptions, LogLevelDesc, LoggerProvider, Servers } from "@hyperledger/cactus-common"; +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; import { Configuration } from "@hyperledger/cactus-core-api"; @@ -25,7 +30,10 @@ import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gat import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; -import { Containers, pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; const logLevel: LogLevelDesc = "INFO"; @@ -81,13 +89,13 @@ test("runs ODAP between two gateways via openApi", async () => { expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts index c09f08c65a..8342f08a1d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts @@ -14,7 +14,10 @@ import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexRemoteConnection } from "../knex.config"; import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { pruneDockerAllIfGithubAction, Containers } from "@hyperledger/cactus-test-tooling"; +import { + pruneDockerAllIfGithubAction, + Containers, +} from "@hyperledger/cactus-test-tooling"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -64,13 +67,13 @@ test("successful run ODAP instance", async () => { expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-get-status.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-get-status.test.ts new file mode 100644 index 0000000000..e7b4b9f447 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-get-status.test.ts @@ -0,0 +1,108 @@ +import "jest-extended"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; + +import { + SATPGatewayConfig, + SupportedGatewayImplementations, +} from "../../../main/typescript/core/types"; +import { createClient } from "../test-utils"; + +const logLevel: LogLevelDesc = "DEBUG"; +const logger = LoggerProvider.getOrCreate({ + level: logLevel, + label: "satp-gateway-orchestrator-init-test", +}); +const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, +}; +const factory = new PluginFactorySATPGateway(factoryOptions); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +// TODO create unit tests of the services to test that GetStatus functionality works (access via BLODispatcher) +describe("GetStatus Endpoint and Functionality testing", () => { + test("GetStatus endpoint works - SDK call", async () => { + const options: SATPGatewayConfig = { + logLevel: logLevel, + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + gatewayServerPort: 3010, + gatewayClientPort: 3011, + address: "http://localhost", + }, + }; + + const gateway = await factory.create(options); + + try { + await gateway.startup(); + const address = options.gid!.address!; + const port = options.gid!.gatewayClientPort!; + //const apiType = "AdminApi"; + + const adminApiClient = createClient("AdminApi", address, port, logger); + + const statusRequest = { + sessionID: "test-session-id", + }; + + const response = await adminApiClient.getStatus(statusRequest.sessionID); + + // expect(response.status).toBe(200); + expect(response).toBeDefined(); + expect(response.status).toBeDefined(); + expect(response.status).toBe(200); + expect(response.data).toBeDefined(); + } catch (error) { + logger.error(`Error: ${error}`); + throw new Error(`Unexpected error during API call`); + } finally { + await gateway.shutdown(); + } + }); + + // TODO create integration tests of the services to test that GetStatus functionality works + test("GetStatus functionality works", async () => {}); +}); + +afterAll(async () => { + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts new file mode 100644 index 0000000000..1f4d195a8e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts @@ -0,0 +1,217 @@ +import "jest-extended"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +// import coordinator factory, coordinator and coordinator options +import { + SATPGateway, + SATPGatewayConfig, +} from "../../../main/typescript/gateway-refactor"; +import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import { + ShutdownHook, + SupportedGatewayImplementations, +} from "./../../../main/typescript/core/types"; + +const logLevel: LogLevelDesc = "INFO"; +const logger = LoggerProvider.getOrCreate({ + level: "INFO", + label: "satp-gateway-orchestrator-init-test", +}); +const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, +}; +const factory = new PluginFactorySATPGateway(factoryOptions); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +describe("SATPGateway initialization", () => { + it("should initiate gateway with default config", async () => { + const options: SATPGatewayConfig = {}; + const gateway = await factory.create(options); + + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + expect(identity).toBeDefined(); + expect(identity.id).toBeDefined(); + expect(identity.name).toBeDefined(); + expect(identity.version).toEqual([ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ]); + expect(identity.supportedChains).toEqual([ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]); + expect(identity.proofID).toBe("mockProofID1"); + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.address).toBe("http://localhost"); + }); + + it("should initiate gateway with custom config", async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + gatewayServerPort: 3010, + address: "https://localhost", + }, + }; + const gateway = await factory.create(options); + + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + expect(identity).toBeDefined(); + expect(identity.id).toBeDefined(); + expect(identity.name).toBeDefined(); + expect(identity.version).toEqual([ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ]); + expect(identity.supportedChains).toEqual([ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]); + expect(identity.proofID).toBe("mockProofID10"); + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.address).toBe("https://localhost"); + }); + + it("should launch gateway server", async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + address: "https://localhost", + }, + }; + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + // default servers + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.gatewayClientPort).toBe(3011); + expect(identity.address).toBe("https://localhost"); + await gateway.startup(); + await gateway.shutdown(); + }); + + it("shutdown hooks work", async () => { + const options: SATPGatewayConfig = { + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + gatewayServerPort: 3014, + gatewayClientPort: 3015, + address: "https://localhost", + }, + }; + + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + // ensure logger is called with "mockHook" + const loggerSpy = jest.spyOn(logger, "info"); + + // ensure mockHookFn is called on shutdown + const mockHookFn = jest.fn(async () => { + logger.info("mockHook"); + }); + + const shutdownHook: ShutdownHook = { + name: "mockHook", + hook: async () => { + logger.info("mockHook"); + }, + }; + + const shutdownHookFn: ShutdownHook = { + name: "mockHookFn", + hook: mockHookFn, + }; + + gateway.onShutdown(shutdownHook); + gateway.onShutdown(shutdownHookFn); + await gateway.startup(); + await gateway.shutdown(); + + expect(loggerSpy).toHaveBeenCalledWith("mockHook"); + expect(mockHookFn).toHaveBeenCalled(); + + // for now, technically not needed. However if we use more tests with loggerSpy, conflicts could arise. This is a reminder to restore the spy after each test + loggerSpy.mockRestore(); + }); +}); + +afterAll(async () => { + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts index ad3fd42083..115450c1d4 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts @@ -29,7 +29,10 @@ import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; import { knexClientConnection, knexRemoteConnection } from "../knex.config"; -import { pruneDockerAllIfGithubAction, Containers } from "@hyperledger/cactus-test-tooling"; +import { + pruneDockerAllIfGithubAction, + Containers, +} from "@hyperledger/cactus-test-tooling"; const logLevel: LogLevelDesc = "INFO"; @@ -72,7 +75,7 @@ beforeAll(async () => { await Containers.logDiagnostics({ logLevel }); fail("Pruning didn't throw OK"); }); - + { // Server Gateway configuration serverGatewayPluginOptions = { @@ -103,8 +106,12 @@ beforeAll(async () => { pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); + expect( + pluginRecipientGateway.localRepository?.database, + ).not.toBeUndefined(); + expect( + pluginRecipientGateway.remoteRepository?.database, + ).not.toBeUndefined(); await pluginRecipientGateway.localRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); @@ -143,7 +150,7 @@ beforeAll(async () => { pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); + expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); await pluginSourceGateway.localRepository?.reset(); await pluginSourceGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts index c533074692..c32d533a4b 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts @@ -3,7 +3,10 @@ import { v4 as uuidv4 } from "uuid"; export const knexClientConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-satp-hermes/src/knex/.dev.client-" + uuidv4() + ".sqlite3", + filename: + "./packages/cactus-plugin-satp-hermes/src/knex/.dev.client-" + + uuidv4() + + ".sqlite3", }, migrations: { directory: "./packages/cactus-plugin-satp-hermes/src/knex/migrations", @@ -14,7 +17,10 @@ export const knexClientConnection = { export const knexServerConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-satp-hermes/src/knex/.dev.server-" + uuidv4() + ".sqlite3", + filename: + "./packages/cactus-plugin-satp-hermes/src/knex/.dev.server-" + + uuidv4() + + ".sqlite3", }, migrations: { directory: "./packages/cactus-plugin-satp-hermes/src/knex/migrations", @@ -25,7 +31,10 @@ export const knexServerConnection = { export const knexRemoteConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-satp-hermes/src/knex/.dev.remote-" + uuidv4() + ".sqlite3", + filename: + "./packages/cactus-plugin-satp-hermes/src/knex/.dev.remote-" + + uuidv4() + + ".sqlite3", }, migrations: { directory: "./packages/cactus-plugin-satp-hermes/src/knex/migrations", diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts new file mode 100644 index 0000000000..8293a6586c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts @@ -0,0 +1,38 @@ +import { Logger } from "@hyperledger/cactus-common"; +import { + Configuration, + AdminApi, + TransactionApi, +} from "../../main/typescript/generated/openapi-blo/typescript-axios"; +//import { Api } from "@bufbuild/protobuf"; + +export function createClient( + type: "AdminApi", + address: string, + port: number, + logger: Logger, +): AdminApi; +export function createClient( + type: "TransactionApi", + address: string, + port: number, + logger: Logger, +): TransactionApi; + +export function createClient( + type: "AdminApi" | "TransactionApi", + address: string, + port: number, + logger: Logger, +): AdminApi | TransactionApi { + const config = new Configuration({ basePath: `${address}:${port}` }); + logger.debug(config); + + if (type === "AdminApi") { + return new AdminApi(config); + } else if (type === "TransactionApi") { + return new TransactionApi(config); + } else { + throw new Error("Invalid api type"); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts index 9a5c2a23b7..fc1d1c341b 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts @@ -59,7 +59,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts index 737549ed05..69fdd146ef 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts @@ -56,7 +56,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts index ac3aa68730..691229511a 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts @@ -55,7 +55,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts index 81da65aef6..6bcc36048f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts @@ -55,7 +55,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts index ca998bc95d..acfee70fe6 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts @@ -56,7 +56,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index a867986cee..3e8af87d5f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -94,7 +94,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); await pluginSourceGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts index a3e80345d0..63906805fe 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts @@ -65,7 +65,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts index 83154dcc84..52ad598046 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts @@ -58,7 +58,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts index f56b917a08..fc702e75a9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts @@ -70,7 +70,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts index f516efd817..66a248cfe6 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts @@ -76,7 +76,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); }); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts index fff1bf0a3a..f93dd989c8 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts @@ -60,7 +60,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts index 127ce29f9c..6df59514e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts @@ -51,7 +51,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts index 6c0552d18c..d5ba51bda4 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts @@ -58,10 +58,10 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); - + dummyTransferCommenceResponseMessageHash = SHA256( "transferCommenceResponseMessageData", ).toString(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts index e23bd5b7a9..d792f45ab5 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts @@ -55,7 +55,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts index a2ad3a7cc1..df206cffd4 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts @@ -52,7 +52,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts index b8d3d5a26b..0ed8286bde 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts @@ -52,7 +52,7 @@ beforeEach(async () => { await pluginSourceGateway.localRepository?.reset(); await pluginRecipientGateway.localRepository?.reset(); - + await pluginSourceGateway.remoteRepository?.reset(); await pluginRecipientGateway.remoteRepository?.reset(); diff --git a/yarn.lock b/yarn.lock index df806b6ae1..594166a6da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -805,6 +805,17 @@ __metadata: languageName: node linkType: hard +"@apidevtools/json-schema-ref-parser@npm:9.0.6": + version: 9.0.6 + resolution: "@apidevtools/json-schema-ref-parser@npm:9.0.6" + dependencies: + "@jsdevtools/ono": "npm:^7.1.3" + call-me-maybe: "npm:^1.0.1" + js-yaml: "npm:^3.13.1" + checksum: 10/bfdff3d3c54fac0e864322dfa62c018cbcf90f66df6cbe33868a0134bee5bc4d013f980aac0f3e83ffabf4b9c13ffedbf5bae3578ce7db7d4cb559e874b16950 + languageName: node + linkType: hard + "@apidevtools/json-schema-ref-parser@npm:^11.6.2": version: 11.6.4 resolution: "@apidevtools/json-schema-ref-parser@npm:11.6.4" @@ -816,15 +827,48 @@ __metadata: languageName: node linkType: hard -"@apidevtools/json-schema-ref-parser@npm:^9.1.2": - version: 9.1.2 - resolution: "@apidevtools/json-schema-ref-parser@npm:9.1.2" +"@apidevtools/openapi-schemas@npm:^2.1.0": + version: 2.1.0 + resolution: "@apidevtools/openapi-schemas@npm:2.1.0" + checksum: 10/4ca78f79ee2e5a162d16d140f939ca90d51265014ea2e500955286ad3acd11b75db4179b7b4bae245b09a981baeb8d80b81bc24c61d6c471a4a4707ed277ebf2 + languageName: node + linkType: hard + +"@apidevtools/swagger-cli@npm:4.0.4": + version: 4.0.4 + resolution: "@apidevtools/swagger-cli@npm:4.0.4" dependencies: + "@apidevtools/swagger-parser": "npm:^10.0.1" + chalk: "npm:^4.1.0" + js-yaml: "npm:^3.14.0" + yargs: "npm:^15.4.1" + bin: + swagger-cli: bin/swagger-cli.js + checksum: 10/7dd8cfd996a445052ba7d316ffa7b46343a9d463b7342e1511ddd5f547f34a6135a6a0dfb94d0bab6b0d561eb6c7795131acc61c7d058046b5f47d1431ab4677 + languageName: node + linkType: hard + +"@apidevtools/swagger-methods@npm:^3.0.2": + version: 3.0.2 + resolution: "@apidevtools/swagger-methods@npm:3.0.2" + checksum: 10/d06b1ac5c1956613c4c6be695612ef860cd4e962b93a509ca551735a328a856cae1e33399cac1dcbf8333ba22b231746f3586074769ef0e172cf549ec9e7eaae + languageName: node + linkType: hard + +"@apidevtools/swagger-parser@npm:^10.0.1": + version: 10.1.0 + resolution: "@apidevtools/swagger-parser@npm:10.1.0" + dependencies: + "@apidevtools/json-schema-ref-parser": "npm:9.0.6" + "@apidevtools/openapi-schemas": "npm:^2.1.0" + "@apidevtools/swagger-methods": "npm:^3.0.2" "@jsdevtools/ono": "npm:^7.1.3" - "@types/json-schema": "npm:^7.0.6" + ajv: "npm:^8.6.3" + ajv-draft-04: "npm:^1.0.0" call-me-maybe: "npm:^1.0.1" - js-yaml: "npm:^4.1.0" - checksum: 10/7553f994974c5c6f99d14b9f47e9dccaedbcdd1565a099bbf7413494c71e1a246562bd6bfa394b6be026d176c734ff89aed87e2c3a92d01ff4350c64514bfb48 + peerDependencies: + openapi-types: ">=7" + checksum: 10/24f7f6524334887ff3ef1c8c768698963f4a03e6824719fdbe98ba5444c9f1cdca9a11789e90362c882321dedec3e66f414e05035054084921fe1d2527724adb languageName: node linkType: hard @@ -5875,20 +5919,13 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protobuf@npm:1.10.0, @bufbuild/protobuf@npm:^1.6.0": +"@bufbuild/protobuf@npm:1.10.0": version: 1.10.0 resolution: "@bufbuild/protobuf@npm:1.10.0" checksum: 10/1f120f72bbb40dd3d0f8c73f1474b001cfb9be09c38b7b0292e35fec98c5184a3db380a6feff7626fb3fff108c8a8aa7fc8cfea14904dc0a1174a01c8e637cc6 languageName: node linkType: hard -"@bufbuild/protobuf@npm:1.7.2": - version: 1.7.2 - resolution: "@bufbuild/protobuf@npm:1.7.2" - checksum: 10/f23ccc77066100157043cf36bd2506acdcb235f0a902f7662fbbb992e78df4202780aeb55bd2e3fd1945bd9e52a4fca759351f333f2ff779e32996e13eb56d34 - languageName: node - linkType: hard - "@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": version: 1.8.0 resolution: "@bufbuild/protobuf@npm:1.8.0" @@ -5896,23 +5933,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protoc-gen-es@npm:1.7.2": - version: 1.7.2 - resolution: "@bufbuild/protoc-gen-es@npm:1.7.2" - dependencies: - "@bufbuild/protobuf": "npm:^1.7.2" - "@bufbuild/protoplugin": "npm:1.7.2" - peerDependencies: - "@bufbuild/protobuf": 1.7.2 - peerDependenciesMeta: - "@bufbuild/protobuf": - optional: true - bin: - protoc-gen-es: bin/protoc-gen-es - checksum: 10/21898291c7239a61b7aa2fdbde7c2b40161d4e395783081bb9650840381764984075f405cd46e2f189df5b57d602a37796ae804b648338cf82a4ffecbef0de52 - languageName: node - linkType: hard - "@bufbuild/protoc-gen-es@npm:1.8.0": version: 1.8.0 resolution: "@bufbuild/protoc-gen-es@npm:1.8.0" @@ -5930,17 +5950,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protoplugin@npm:1.7.2": - version: 1.7.2 - resolution: "@bufbuild/protoplugin@npm:1.7.2" - dependencies: - "@bufbuild/protobuf": "npm:1.7.2" - "@typescript/vfs": "npm:^1.4.0" - typescript: "npm:4.5.2" - checksum: 10/412c35a04a60fed1979b62fedc570c128efa8995290005df8d84bbf84a9b35cc6a9bbea5646210ed7708fb8cd274aea8ba30720ccd25eb62c9133efda55ca733 - languageName: node - linkType: hard - "@bufbuild/protoplugin@npm:1.8.0, @bufbuild/protoplugin@npm:^1.7.2": version: 1.8.0 resolution: "@bufbuild/protoplugin@npm:1.8.0" @@ -5952,17 +5961,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protoplugin@npm:^1.6.0": - version: 1.10.0 - resolution: "@bufbuild/protoplugin@npm:1.10.0" - dependencies: - "@bufbuild/protobuf": "npm:1.10.0" - "@typescript/vfs": "npm:^1.4.0" - typescript: "npm:4.5.2" - checksum: 10/829a6d64076a16d7a89e732be39f1988b52b8babee215d91a5f692e0e6ac3e2b58ea4012bd7707c3cef4b6952cfcc36076b646aa09ed68888aedb2fb004d659f - languageName: node - linkType: hard - "@chainsafe/as-sha256@npm:^0.3.1": version: 0.3.1 resolution: "@chainsafe/as-sha256@npm:0.3.1" @@ -6229,19 +6227,6 @@ __metadata: languageName: node linkType: hard -"@connectrpc/connect-express@npm:1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect-express@npm:1.3.0" - dependencies: - "@types/express": "npm:^4.17.18" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.3.0 - "@connectrpc/connect-node": 1.3.0 - checksum: 10/581495391477e2b8a2738bdc34dbf45a245d26cb4943a5b3d1813d80ae4f11d85e0d0f01d95e408e7b1cb7812a873218428d6b0cde9fc643747f06e8b7205627 - languageName: node - linkType: hard - "@connectrpc/connect-express@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect-express@npm:1.4.0" @@ -6267,18 +6252,6 @@ __metadata: languageName: node linkType: hard -"@connectrpc/connect-node@npm:1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect-node@npm:1.3.0" - dependencies: - undici: "npm:^5.28.2" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - "@connectrpc/connect": 1.3.0 - checksum: 10/34b4903220881b39128bc31c79a0a006cb44c7cb9074fd0d77e853ff016f51c2a131811421c971c01210d4329068026c278cf64d349f2eb38126d0604710816a - languageName: node - linkType: hard - "@connectrpc/connect-node@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect-node@npm:1.4.0" @@ -6301,15 +6274,6 @@ __metadata: languageName: node linkType: hard -"@connectrpc/connect@npm:1.3.0": - version: 1.3.0 - resolution: "@connectrpc/connect@npm:1.3.0" - peerDependencies: - "@bufbuild/protobuf": ^1.4.2 - checksum: 10/7707d97ee6e4a83cc03371b1da1709c103f0338e85b2fbf49813053d96114818d34831b1c11715cc9badcc3ce5d4c9fbc423af4b6a8efa953bf0ef76cdc6e50d - languageName: node - linkType: hard - "@connectrpc/connect@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect@npm:1.4.0" @@ -6319,26 +6283,6 @@ __metadata: languageName: node linkType: hard -"@connectrpc/protoc-gen-connect-es@npm:1.3.0": - version: 1.3.0 - resolution: "@connectrpc/protoc-gen-connect-es@npm:1.3.0" - dependencies: - "@bufbuild/protobuf": "npm:^1.6.0" - "@bufbuild/protoplugin": "npm:^1.6.0" - peerDependencies: - "@bufbuild/protoc-gen-es": ^1.6.0 - "@connectrpc/connect": 1.3.0 - peerDependenciesMeta: - "@bufbuild/protoc-gen-es": - optional: true - "@connectrpc/connect": - optional: true - bin: - protoc-gen-connect-es: bin/protoc-gen-connect-es - checksum: 10/23a17bef378ac2fa414fb35fe50a7630134946a086f75f9201c5d0c3631f32e61445628b0420eac7353e88193e170059969bc83bad96a9f43cb98db30243aa1c - languageName: node - linkType: hard - "@connectrpc/protoc-gen-connect-es@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/protoc-gen-connect-es@npm:1.4.0" @@ -9016,16 +8960,6 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:1.10.9": - version: 1.10.9 - resolution: "@grpc/grpc-js@npm:1.10.9" - dependencies: - "@grpc/proto-loader": "npm:^0.7.13" - "@js-sdsl/ordered-map": "npm:^4.4.2" - checksum: 10/8991a997798f19ae849d0f274280f5fdba981048f77211744a301e22207620bb24661d0dfaea51ee6259c5c8e6c159b62fe2499c879d9f14decf20957c219124 - languageName: node - linkType: hard - "@grpc/grpc-js@npm:1.11.3": version: 1.11.3 resolution: "@grpc/grpc-js@npm:1.11.3" @@ -9080,21 +9014,6 @@ __metadata: languageName: node linkType: hard -"@grpc/proto-loader@npm:0.7.8": - version: 0.7.8 - resolution: "@grpc/proto-loader@npm:0.7.8" - dependencies: - "@types/long": "npm:^4.0.1" - lodash.camelcase: "npm:^4.3.0" - long: "npm:^4.0.0" - protobufjs: "npm:^7.2.4" - yargs: "npm:^17.7.2" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/a7dde023f8209e7a97eecad5f627c31b796c663e0bf4a3bc81b848a8bdf0c2ba5de712189e4b6f759a2a766599b2a0ea197cdd4a45ab9d091329ca9ffb053bb8 - languageName: node - linkType: hard - "@grpc/proto-loader@npm:^0.7.0": version: 0.7.7 resolution: "@grpc/proto-loader@npm:0.7.7" @@ -10956,6 +10875,7 @@ __metadata: secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" + swagger-cli: "npm:^4.0.4" swagger-ui-express: "npm:5.0.0" typescript: "npm:5.5.2" typescript-optional: "npm:2.0.1" @@ -14928,6 +14848,18 @@ __metadata: languageName: node linkType: hard +"@quobix/vacuum@npm:^0.9.10": + version: 0.9.16 + resolution: "@quobix/vacuum@npm:0.9.16" + dependencies: + node-fetch: "npm:^3.2.10" + tar: "npm:^6.1.11" + bin: + vacuum: bin/vacuum.js + checksum: 10/0e9d717f8c8c2accf39e333d12e101e543229c41b9b3c8e7717e6b00de24e792392437dcb40700113033686b542643c10ebb25b4389b059a4a461af0b4e9aa44 + languageName: node + linkType: hard + "@redocly/ajv@npm:^8.11.0": version: 8.11.0 resolution: "@redocly/ajv@npm:8.11.0" @@ -17422,7 +17354,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.6": +"@types/json-schema@npm:^7.0.15": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 @@ -17645,15 +17577,6 @@ __metadata: languageName: node linkType: hard -"@types/multer@npm:^1.4.7": - version: 1.4.12 - resolution: "@types/multer@npm:1.4.12" - dependencies: - "@types/express": "npm:*" - checksum: 10/3d2b32da58ddd67f972d4ef1021492f78d65f33f936b6fb25dd461bb6cc7b03bfd1de1a11562c4310680dac8054e4398038db51767a0ffbf1fe62457b3706e95 - languageName: node - linkType: hard - "@types/node-fetch@npm:2.6.2": version: 2.6.2 resolution: "@types/node-fetch@npm:2.6.2" @@ -19749,7 +19672,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.11.2, ajv@npm:^8.14.0": +"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.14.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -21724,9 +21647,9 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.2, body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21736,17 +21659,17 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.11.0" + qs: "npm:6.13.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a + checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca languageName: node linkType: hard -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" +"body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21756,11 +21679,11 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.13.0" + qs: "npm:6.11.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca + checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a languageName: node linkType: hard @@ -29428,28 +29351,6 @@ __metadata: languageName: node linkType: hard -"express-openapi-validator@npm:5.0.4": - version: 5.0.4 - resolution: "express-openapi-validator@npm:5.0.4" - dependencies: - "@apidevtools/json-schema-ref-parser": "npm:^9.1.2" - "@types/multer": "npm:^1.4.7" - ajv: "npm:^8.11.2" - ajv-draft-04: "npm:^1.0.0" - ajv-formats: "npm:^2.1.1" - content-type: "npm:^1.0.5" - lodash.clonedeep: "npm:^4.5.0" - lodash.get: "npm:^4.4.2" - lodash.uniq: "npm:^4.5.0" - lodash.zipobject: "npm:^4.1.3" - media-typer: "npm:^1.1.0" - multer: "npm:^1.4.5-lts.1" - ono: "npm:^7.1.3" - path-to-regexp: "npm:^6.2.0" - checksum: 10/793f3bcd369f4f67a228c4965834cd649e891ca1aae7b13795d6569399d02c6638df96428d4c320e3d61146e78627a6b012b1461bdb9a69ea1c1b0ce4a1401dc - languageName: node - linkType: hard - "express-openapi-validator@npm:5.2.0": version: 5.2.0 resolution: "express-openapi-validator@npm:5.2.0" @@ -29510,45 +29411,6 @@ __metadata: languageName: node linkType: hard -"express@npm:4.19.2": - version: 4.19.2 - resolution: "express@npm:4.19.2" - dependencies: - accepts: "npm:~1.3.8" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.2" - content-disposition: "npm:0.5.4" - content-type: "npm:~1.0.4" - cookie: "npm:0.6.0" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:1.2.0" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.1" - methods: "npm:~1.1.2" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.7" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.11.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.2.1" - send: "npm:0.18.0" - serve-static: "npm:1.15.0" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10/3fcd792536f802c059789ef48db3851b87e78fba103423e524144d79af37da7952a2b8d4e1a007f423329c7377d686d9476ac42e7d9ea413b80345d495e30a3a - languageName: node - linkType: hard - "express@npm:4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" @@ -30052,30 +29914,6 @@ __metadata: languageName: node linkType: hard -"fastify@npm:4.26.2": - version: 4.26.2 - resolution: "fastify@npm:4.26.2" - dependencies: - "@fastify/ajv-compiler": "npm:^3.5.0" - "@fastify/error": "npm:^3.4.0" - "@fastify/fast-json-stringify-compiler": "npm:^4.3.0" - abstract-logging: "npm:^2.0.1" - avvio: "npm:^8.3.0" - fast-content-type-parse: "npm:^1.1.0" - fast-json-stringify: "npm:^5.8.0" - find-my-way: "npm:^8.0.0" - light-my-request: "npm:^5.11.0" - pino: "npm:^8.17.0" - process-warning: "npm:^3.0.0" - proxy-addr: "npm:^2.0.7" - rfdc: "npm:^1.3.0" - secure-json-parse: "npm:^2.7.0" - semver: "npm:^7.5.4" - toad-cache: "npm:^3.3.0" - checksum: 10/24ee6b1496bf0c3b6b266edef6654c547ea54ffe3a17a98afd0f2a8e7a69e0fea2b58eaebb81388fa36d20032e239e656fbfdfac539b4758483a438250f791ff - languageName: node - linkType: hard - "fastify@npm:4.28.1": version: 4.28.1 resolution: "fastify@npm:4.28.1" @@ -32114,20 +31952,6 @@ __metadata: languageName: node linkType: hard -"google-protobuf@npm:3.18.0-rc.2": - version: 3.18.0-rc.2 - resolution: "google-protobuf@npm:3.18.0-rc.2" - checksum: 10/71cc1d20fd52bba970a3485165f78cb453725ef5f4c1146e9a8c23d2850072867ad29e58ebf25da3f2a990f129f7b5d23f4aeea0476e827c4bf61d1cecc922cc - languageName: node - linkType: hard - -"google-protobuf@npm:3.21.2": - version: 3.21.2 - resolution: "google-protobuf@npm:3.21.2" - checksum: 10/b376c2e47fb0419b41b901e4da8f3827fe9594ffb7887708b9c241f36005d0b9f2edc7b3f05795f6793924a241e767f67831732eae0f23bdbb337b56a6ab4e26 - languageName: node - linkType: hard - "google-protobuf@npm:3.21.4": version: 3.21.4 resolution: "google-protobuf@npm:3.21.4" @@ -36644,7 +36468,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.1, js-yaml@npm:^3.5.1, js-yaml@npm:^3.9.1": +"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.0, js-yaml@npm:^3.14.1, js-yaml@npm:^3.5.1, js-yaml@npm:^3.9.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -38542,13 +38366,6 @@ __metadata: languageName: node linkType: hard -"lodash.zipobject@npm:^4.1.3": - version: 4.1.3 - resolution: "lodash.zipobject@npm:4.1.3" - checksum: 10/1ab635b665c0488a905779705a6683e9024115176e9e947d75d2a6b1e8673230fdb11c417788fbaf26d71e1cac5ad8e59a558924612cbf7d6615780836048883 - languageName: node - linkType: hard - "lodash@npm:>=4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -40887,7 +40704,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^3.3.2": +"node-fetch@npm:^3.2.10, node-fetch@npm:^3.3.2": version: 3.3.2 resolution: "node-fetch@npm:3.3.2" dependencies: @@ -43322,13 +43139,6 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^6.2.0": - version: 6.3.0 - resolution: "path-to-regexp@npm:6.3.0" - checksum: 10/6822f686f01556d99538b350722ef761541ec0ce95ca40ce4c29e20a5b492fe8361961f57993c71b2418de12e604478dcf7c430de34b2c31a688363a7a944d9c - languageName: node - linkType: hard - "path-to-regexp@npm:^6.2.2": version: 6.2.2 resolution: "path-to-regexp@npm:6.2.2" @@ -43583,13 +43393,6 @@ __metadata: languageName: node linkType: hard -"pino-std-serializers@npm:^6.0.0": - version: 6.2.2 - resolution: "pino-std-serializers@npm:6.2.2" - checksum: 10/a00cdff4e1fbc206da9bed047e6dc400b065f43e8b4cef1635b0192feab0e8f932cdeb0faaa38a5d93d2e777ba4cda939c2ed4c1a70f6839ff25f9aef97c27ff - languageName: node - linkType: hard - "pino-std-serializers@npm:^7.0.0": version: 7.0.0 resolution: "pino-std-serializers@npm:7.0.0" @@ -43597,27 +43400,6 @@ __metadata: languageName: node linkType: hard -"pino@npm:^8.17.0": - version: 8.21.0 - resolution: "pino@npm:8.21.0" - dependencies: - atomic-sleep: "npm:^1.0.0" - fast-redact: "npm:^3.1.1" - on-exit-leak-free: "npm:^2.1.0" - pino-abstract-transport: "npm:^1.2.0" - pino-std-serializers: "npm:^6.0.0" - process-warning: "npm:^3.0.0" - quick-format-unescaped: "npm:^4.0.3" - real-require: "npm:^0.2.0" - safe-stable-stringify: "npm:^2.3.1" - sonic-boom: "npm:^3.7.0" - thread-stream: "npm:^2.6.0" - bin: - pino: bin.js - checksum: 10/5a054eab533ab91b20f63497b86070f0a6b40e4688cde9de66d23e03d6046c4e95d69c3f526dea9f30bcbc5874c7fbf0f91660cded4753946fd02261ca8ac340 - languageName: node - linkType: hard - "pino@npm:^9.0.0": version: 9.4.0 resolution: "pino@npm:9.4.0" @@ -45285,15 +45067,6 @@ __metadata: languageName: node linkType: hard -"prom-client@npm:13.2.0": - version: 13.2.0 - resolution: "prom-client@npm:13.2.0" - dependencies: - tdigest: "npm:^0.1.1" - checksum: 10/46df22a933f35dc60480ef7139c2ea0f315a7f4b3018e9ac045572999a1c2ee92978ef0bfb124c111159718d98d8093de59b81bb3f6fd499f3d0ce576a987703 - languageName: node - linkType: hard - "prom-client@npm:15.1.3": version: 15.1.3 resolution: "prom-client@npm:15.1.3" @@ -49181,15 +48954,6 @@ __metadata: languageName: node linkType: hard -"sonic-boom@npm:^3.7.0": - version: 3.8.1 - resolution: "sonic-boom@npm:3.8.1" - dependencies: - atomic-sleep: "npm:^1.0.0" - checksum: 10/e03c9611e43fa81132cd2ce0fe4eb7fbcf19db267e9dec20dc6c586f82465c9c906e91a02f72150c740463ad9335536ea2131850307aaa6686d1fb5d4cc4be3e - languageName: node - linkType: hard - "sonic-boom@npm:^4.0.1": version: 4.1.0 resolution: "sonic-boom@npm:4.1.0" @@ -50683,6 +50447,17 @@ __metadata: languageName: node linkType: hard +"swagger-cli@npm:^4.0.4": + version: 4.0.4 + resolution: "swagger-cli@npm:4.0.4" + dependencies: + "@apidevtools/swagger-cli": "npm:4.0.4" + bin: + swagger-cli: swagger-cli.js + checksum: 10/2ac9557dd76014d109a6ad47b079fee0aa77f35941481626528e9e4a5d7d2051499381244eccee8521a495fc7d979f834bd69011438239185dcc95ce9f805ee2 + languageName: node + linkType: hard + "swagger-ui-dist@npm:>=5.0.0": version: 5.17.14 resolution: "swagger-ui-dist@npm:5.17.14" @@ -51386,15 +51161,6 @@ __metadata: languageName: node linkType: hard -"thread-stream@npm:^2.6.0": - version: 2.7.0 - resolution: "thread-stream@npm:2.7.0" - dependencies: - real-require: "npm:^0.2.0" - checksum: 10/03e743a2ccb2af5fa695d2e4369113336ee9b9f09c4453d50a222cbb4ae3af321bff658e0e5bf8bfbce9d7f5a7bf6262d12a2a365e160f4e76380ec624d32e7b - languageName: node - linkType: hard - "thread-stream@npm:^3.0.0": version: 3.1.0 resolution: "thread-stream@npm:3.1.0" @@ -52745,7 +52511,7 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.28.2, undici@npm:^5.28.3": +"undici@npm:^5.28.3": version: 5.28.4 resolution: "undici@npm:5.28.4" dependencies: @@ -53323,15 +53089,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:9.0.1, uuid@npm:^9.0.0, uuid@npm:^9.0.1": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 - languageName: node - linkType: hard - "uuid@npm:^3.3.2, uuid@npm:^3.3.3": version: 3.4.0 resolution: "uuid@npm:3.4.0" @@ -53341,6 +53098,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:^9.0.0, uuid@npm:^9.0.1": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 + languageName: node + linkType: hard + "v8-compile-cache-lib@npm:^3.0.0": version: 3.0.0 resolution: "v8-compile-cache-lib@npm:3.0.0" @@ -57322,7 +57088,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^15.0.2, yargs@npm:^15.3.1": +"yargs@npm:^15.0.2, yargs@npm:^15.3.1, yargs@npm:^15.4.1": version: 15.4.1 resolution: "yargs@npm:15.4.1" dependencies: From 5a8745084cc3c087aa05293fc0c3d21977f84982 Mon Sep 17 00:00:00 2001 From: Carlos Amaro <64661289+LordKubaya@users.noreply.github.com> Date: Sat, 23 Mar 2024 10:45:18 +0000 Subject: [PATCH 04/49] feat(satp-hermes): add protobuf gateway refactor Authored by: Carlos Amaro Signed-off-by: Rafael Belchior feat(satp-hermes): satp proto update (#3147) * feat(satp-hermes): update protos Signed-off-by: Carlos Amaro * feat(satp-hermes): protos Signed-off-by: Carlos Amaro * feat(satp-hermes): protos Signed-off-by: Carlos Amaro --------- Signed-off-by: Carlos Amaro feat(satp-hermes): update protos Signed-off-by: Carlos Amaro feat(satp-hermes): core stage services message names update Signed-off-by: Carlos Amaro feat(satp-hermes): gRPC server start implementation and gateway_refactor in handlers Signed-off-by: Carlos Amaro fix(satp-hermes): satp proto update also updates yarn lock Signed-off-by: Rafael Belchior fix(satp-hermes): update yarn, comment method fix(satp-hermes): update yarn ci(satp-hermes): fix bungee and satp ci Signed-off-by: Rafael Belchior --- .github/workflows/ci.yaml | 58 +- jest.config.js | 4 +- .../proto/cacti/satp/v02/common/message.proto | 22 - .../proto/cacti/satp/v02/common/session.proto | 146 +- .../main/proto/cacti/satp/v02/stage_0.proto | 42 +- .../main/proto/cacti/satp/v02/stage_1.proto | 35 +- .../main/proto/cacti/satp/v02/stage_2.proto | 25 +- .../main/proto/cacti/satp/v02/stage_3.proto | 48 +- .../src/main/proto/test/message.proto | 27 - .../src/main/typescript/core/constants.ts | 2 + .../src/main/typescript/core/dispatcher.ts | 52 + .../client/stage1-client-handler.ts | 373 ++++ .../client/stage2-client-handler.ts | 225 +++ .../client/stage3-client-handler.ts | 541 ++++++ .../server/stage1-server-handler.ts | 448 +++++ .../server/stage2-server-handler.ts | 224 +++ .../server/stage3-server-handler.ts | 366 ++++ .../typescript/core/stage-services/stage0.ts | 3 + .../core/stage-services/stage1-service.ts | 33 + .../typescript/core/stage-services/stage1.ts | 0 .../core/stage-services/stage2-service.ts | 20 + .../typescript/core/stage-services/stage2.ts | 0 .../core/stage-services/stage3-service.ts | 44 + .../typescript/core/stage-services/stage3.ts | 1 - .../core/stage-services/test-services.ts | 14 - .../src/main/typescript/core/types.ts | 21 +- .../src/main/typescript/gateway-refactor.ts | 138 +- .../src/main/typescript/gateway-utils.ts | 104 ++ .../satp/v02/common/common_messages_pb.ts | 1507 +++++++++++++++++ .../proto/cacti/satp/v02/common/message_pb.ts | 1360 ++++++++++++++- .../proto/cacti/satp/v02/common/session_pb.ts | 1002 ++++++++++- .../proto/cacti/satp/v02/stage_0_connect.ts | 16 +- .../proto/cacti/satp/v02/stage_0_pb.ts | 137 +- .../proto/cacti/satp/v02/stage_1_connect.ts | 31 +- .../proto/cacti/satp/v02/stage_1_pb.ts | 217 +++ .../proto/cacti/satp/v02/stage_2_connect.ts | 22 +- .../proto/cacti/satp/v02/stage_2_pb.ts | 125 ++ .../proto/cacti/satp/v02/stage_3_connect.ts | 40 +- .../proto/cacti/satp/v02/stage_3_pb.ts | 296 ++++ .../main/typescript/plugin-satp-gateway.ts | 44 +- .../repository/interfaces/repository.ts | 20 +- .../repository/ipfs-remote-log-repository.ts | 6 +- .../repository/knex-local-log-repository.ts | 12 +- .../repository/knex-remote-log-repository.ts | 6 +- .../gateway-coordinator-init.test.ts | 34 +- .../typescript/unit/recovery/logging.test.ts | 15 +- .../unit/server/commit-final.test.ts | 5 +- 47 files changed, 7544 insertions(+), 367 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9deb6822e..0dc11290db 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1753,33 +1753,33 @@ jobs: with: name: coverage-reports-35 path: ./code-coverage-ts/**/ - # cactus-plugin-satp-hermes: - # continue-on-error: false - # env: - # FULL_BUILD_DISABLED: true - # 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 - # runs-on: ubuntu-22.04 - # steps: - # - name: Use Node.js ${{ env.NODEJS_VERSION }} - # uses: actions/setup-node@v4.0.3 - # with: - # node-version: ${{ env.NODEJS_VERSION }} - # - uses: actions/checkout@v4.1.7 - # - id: yarn-cache-dir-path - # name: Get yarn cache directory path - # run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" - # - id: yarn-cache - # name: Restore Yarn Cache - # uses: actions/cache@v4.0.2 - # with: - # key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - # path: ./.yarn/ - # restore-keys: | - # ${{ runner.os }}-yarn- - # - run: ./tools/ci.sh + cactus-plugin-satp-hermes: + continue-on-error: false + env: + FULL_BUILD_DISABLED: true + 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 + runs-on: ubuntu-22.04 + steps: + - name: Use Node.js ${{ env.NODEJS_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.NODEJS_VERSION }} + - uses: actions/checkout@v4.1.1 + - id: yarn-cache-dir-path + name: Get yarn cache directory path + run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" + - id: yarn-cache + name: Restore Yarn Cache + uses: actions/cache@v4.0.1 + with: + key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + path: ./.yarn/ + restore-keys: | + ${{ runner.os }}-yarn- + - run: ./tools/ci.sh cp-bungee-hermes: continue-on-error: false env: @@ -1788,8 +1788,8 @@ jobs: # Free space left: 26 MB FREE_UP_GITHUB_RUNNER_DISK_SPACE_DISABLED: false FULL_BUILD_DISABLED: true + JEST_TEST_PATTERN: packages/cactus-plugin-satp-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts JEST_TEST_RUNNER_DISABLED: false - JEST_TEST_PATTERN: packages/cactus-plugin-bungee-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts JEST_TEST_COVERAGE_PATH: ./code-coverage-ts/cp-bungee-hermes JEST_TEST_CODE_COVERAGE_ENABLED: true TAPE_TEST_RUNNER_DISABLED: true @@ -1809,7 +1809,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + ${{ runner.os }}-yarn- - run: ./tools/ci.sh if: ${{ env.RUN_CODE_COVERAGE == 'true' }} - name: Upload coverage reports as artifacts diff --git a/jest.config.js b/jest.config.js index c4cfe0b28d..df76347651 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,8 +11,8 @@ module.exports = { setupFilesAfterEnv: ["jest-extended/all", "./jest.setup.console.logs.js"], testTimeout: 60 * 60 * 1000, moduleNameMapper: { - "^(.+)/(.+)_pb\\.js$": "$1/$2_pb" - }, + "^(.+)/(.+)_pb\\.js$": "$1/$2_pb", + }, testMatch: [ `**/cactus-*/src/test/typescript/{unit,integration,benchmark}/**/*.test.ts`, `**/cacti-*/src/test/typescript/{unit,integration,benchmark}/**/*.test.ts`, diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto deleted file mode 100644 index c176ffe3af..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cacti.satp.v02.common; - -// TODO: define the common parameters to every protocol message -message MessageCore { - string message = 1; -} - -// TODO: define the common parameters to every rollback message -message RollbackMessageCore { - string message = 1; -} - -enum STATUS { - STATUS_UNSPECIFIED = 0; - STATUS_OK = 1; - STATUS_ERROR = 2; -}; - -message Ack { - STATUS status = 1; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index 27b1b1af44..7cae6bf8dd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -3,17 +3,157 @@ package cacti.satp.v02.common; import "google/protobuf/empty.proto"; -// TODO: requires fully qualified path from buf.gen.yaml import "cacti/satp/v02/common/message.proto"; + + +message SessionData { + string id = 1; + string version = 2; + string transfer_context_id = 3; + MessageStagesHashes hashes = 4; + cacti.satp.v02.common.PayloadProfile payload_profile = 5; + MessageStagesSignatures signatures = 6; + string max_retries = 7; + string max_timeout = 8; + string logging_profile = 9; + string recipient_base_path = 10; + string source_base_path = 11; + string access_control_profile = 12; + string application_profile = 13; + int64 last_sequence_number = 14; + string sender_gateway_network_id = 15; + string recipient_gateway_network_id = 16; + string source_ledger_asset_id = 17; + string recipient_ledger_asset_id = 18; + string server_gateway_pubkey = 19; + string client_gateway_pubkey = 20; + string verified_originator_entity_id = 21; + string verified_beneficiary_entity_id = 22; + string asset_profile_id = 23; + string digital_asset_id = 24; + string originator_pubkey = 25; + string beneficiary_pubkey = 26; + string sender_gateway_owner_id = 27; + string receiver_gateway_owner_id = 28; + string hash_transfer_init_claims = 29; + cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 30; + cacti.satp.v02.common.LockType lock_type = 31; + uint64 lock_expiration_time = 32; + cacti.satp.v02.common.Permissions permitions = 33; + string developer_urn = 34; + cacti.satp.v02.common.CredentialProfile credential_profile = 35; + string subsequent_calls = 36; + string history = 37; + bool multiple_claims_allowed = 38; + bool multiple_cancels_allowed = 39; + string last_message_received_timestamp = 40; + MessageStagesTimestamps processed_timestamps = 41; + MessageStagesTimestamps received_timestamps = 42; + cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 43; + cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 44; + cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 45; + cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 46; + cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 47; + cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 48; + cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 49; + cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 50; +} + + + +message MessageStagesHashes { + Stage1Hashes stage1 = 1; + Stage2Hashes stage2 = 2; + Stage3Hashes stage3 = 3; +} + +message Stage1Hashes { + string transfer_proposal_request_message_hash = 1; + string transfer_proposal_receipt_message_hash = 2; + string transfer_proposal_reject_message_hash = 3; + string transfer_commence_request_message_hash = 4; + string transfer_commence_response_message_hash = 5; +} + +message Stage2Hashes { + string lock_assertion_request_message_hash = 1; + string lock_assertion_receipt_message_hash = 2; +} + +message Stage3Hashes { + string commit_preparation_request_message_hash = 1; + string commit_ready_response_message_hash = 2; + string commit_final_assertion_request_message_hash = 3; + string commit_final_acknowledgement_receipt_response_message_hash = 4; + string transfer_complete_request_message_hash = 5; + string transfer_complete_response_message_hash = 6; +} + +message MessageStagesSignatures { + Stage1Signatures stage1 = 1; + Stage2Signatures stage2 = 2; + Stage3Signatures stage3 = 3; +} + +message Stage1Signatures { + string transfer_proposal_request_message_client_signature = 1; + string transfer_proposal_receipt_message_server_signature = 2; + string transfer_proposal_reject_message_server_signature = 3; + string transfer_commence_request_message_client_signature = 4; + string transfer_commence_response_message_server_signature = 5; +} + +message Stage2Signatures { + string lock_assertion_request_message_client_signature = 1; + string lock_assertion_receipt_message_server_signature = 2; +} + +message Stage3Signatures { + string commit_preparation_request_message_client_signature = 1; + string commit_ready_response_message_server_signature = 2; + string commit_final_assertion_request_message_client_signature = 3; + string commit_final_acknowledgement_receipt_response_message_server_signature = 4; + string transfer_complete_request_message_client_signature = 5; + string transfer_complete_response_message_server_signature = 6; +} + +message MessageStagesTimestamps { + Stage1Timestamps stage1 = 1; + Stage2Timestamps stage2 = 2; + Stage3Timestamps stage3 = 3; +} + +message Stage1Timestamps { + string transfer_proposal_request_message_timestamp = 1; + string transfer_proposal_receipt_message_timestamp = 2; + string transfer_proposal_reject_message_timestamp = 3; + string transfer_commence_request_message_timestamp = 4; + string transfer_commence_response_message_timestamp = 5; +} + +message Stage2Timestamps { + string lock_assertion_request_message_timestamp = 1; + string lock_assertion_receipt_message_timestamp = 2; +} + +message Stage3Timestamps { + string commit_preparation_request_message_timestamp = 1; + string commit_ready_response_message_timestamp = 2; + string commit_final_assertion_request_message_timestamp = 3; + string commit_final_acknoledgement_receipt_response_message_timestamp = 4; + string transfer_complete_request_message_timestamp = 5; + string transfer_complete_response_message_timestamp = 6; +} + message SendStatusRequest { string status = 1; - bool hasBackup = 2; + bool has_backup = 2; } message SendStatusResponse { string status = 1; - bool hasBackup = 2; + bool has_backup = 2; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto index 6f675dc321..2b7e609776 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto @@ -1,34 +1,24 @@ syntax = "proto3"; -package cacti.satp.v02.stage_0; +package cacti.satp.v02; -import "google/protobuf/empty.proto"; +import "cacti/satp/v02/common/message.proto"; -service SATPStage0 { - // util RPCs - - // step RPCs - rpc TransferProposalClaims(TransferProposalClaimsRequest) returns (TransferProposalClaimsResponse) {}; - // todo other rpcs -} - -message TransferProposalClaimsRequest { - string message_type = 1; - string asset_asset_id = 2; - string asset_profile_id = 3; - string verified_originator_entity_id = 4; - string verified_beneficiary_entity_id = 5; - string originator_pubkey = 6; - string beneficiary_pubkey = 7; - string sender_gateway_network_id = 8; - string recipient_gateway_network_id = 9; - string client_identity_pubkey = 10; - string server_identity_pubkey = 11; - string sender_gateway_owner_id = 12; - string receiver_gateway_owner_id = 13; +message PreTransferVerificationAndContextEstablishmentRequest { + cacti.satp.v02.common.CommonSatp context = 1; + cacti.satp.v02.common.TransferClaims transferClaims = 2; + // todo other fields } // TODO -message TransferProposalClaimsResponse { - string message_type = 1; +message PreTransferVerificationAndContextEstablishmentResponse { + } + +service SatpStage0Service { + // util RPCs + + // step RPCs + rpc TransferProposalClaims(PreTransferVerificationAndContextEstablishmentRequest) returns (PreTransferVerificationAndContextEstablishmentResponse) {}; + // todo other rpcs +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto index 55ead8bcc6..4ea68757df 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto @@ -1,13 +1,36 @@ syntax = "proto3"; -package cacti.satp.v02.stage_1; +package cacti.satp.v02; -import "google/protobuf/empty.proto"; +import "cacti/satp/v02/common/message.proto"; - -service SATPStage1 { - // util RPCs +message TransferProposalRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + cacti.satp.v02.common.TransferClaims transfer_init_claims = 2; + cacti.satp.v02.common.TransferClaimsFormat transfer_init_claims_format = 3; + cacti.satp.v02.common.NetworkCapabilities network_capabilities = 4; + bool multiple_claims_allowed = 5; + bool multiple_cancels_allowed = 6; +} - // step RPCs +message TransferProposalReceiptRejectMessage { + cacti.satp.v02.common.CommonSatp common = 1; + string hash_transfer_init_claims = 2; + cacti.satp.v02.common.TransferClaims transfer_counter_claims = 3; + string timestamp = 4; +} +message TransferCommenceRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + string hash_transfer_init_claims = 2; + string client_transfer_number = 3; +} + +message TransferCommenceResponseMessage { + cacti.satp.v02.common.CommonSatp common = 1; +} + +service SatpStage1Service { + rpc TransferProposal(TransferProposalRequestMessage) returns (TransferProposalReceiptRejectMessage) {} + rpc TransferCommence(TransferCommenceRequestMessage) returns (TransferCommenceResponseMessage) {} } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto index ac04ade64c..27863c71c1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto @@ -1,13 +1,26 @@ syntax = "proto3"; -package cacti.satp.v02.stage_2; +package cacti.satp.v02; + +import "cacti/satp/v02/common/message.proto"; -import "google/protobuf/empty.proto"; - -service SATPStage2 { - // util RPCs - // step RPCs +message LockAssertionRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 2; + cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 3; + string lock_assertion_expiration = 4; + string client_transfer_number = 5; + string client_signature = 6; +} +message LockAssertionReceiptMessage { + cacti.satp.v02.common.CommonSatp common = 1; + string server_transfer_number = 2; + string server_signature = 3; +} + +service SatpStage2Service { + rpc LockAssertion(LockAssertionRequestMessage) returns (LockAssertionReceiptMessage) {} } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto index 1797bb8ca7..78edd2f1b3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto @@ -1,12 +1,50 @@ syntax = "proto3"; -package cacti.satp.v02.stage_3; +package cacti.satp.v02; +import "cacti/satp/v02/common/message.proto"; import "google/protobuf/empty.proto"; - -service SATPStage3 { - // util RPCs - // step RPCs +message CommitPreparationRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + string client_transfer_number = 2; + string client_signature = 3; +} + +message CommitReadyResponseMessage { + cacti.satp.v02.common.CommonSatp common = 1; + cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 2; + cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 3; + string server_transfer_number = 4; + string server_signature = 5; +} + +message CommitFinalAssertionRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 2; + cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 3; + string client_transfer_number = 4; + string client_signature = 5; } + +message CommitFinalAcknowledgementReceiptResponseMessage { + cacti.satp.v02.common.CommonSatp common = 1; + cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 2; + cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 3; + string server_transfer_number = 4; + string server_signature = 5; +} + +message TransferCompleteRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + string hash_transfer_commence = 2; + string client_transfer_number = 3; + string client_signature = 4; +} + +service SatpStage3Service { + rpc CommitPreparation(CommitPreparationRequestMessage) returns (CommitReadyResponseMessage) {} + rpc CommitFinalAssertion(CommitFinalAssertionRequestMessage) returns (CommitFinalAcknowledgementReceiptResponseMessage) {} + rpc TransferComplete(TransferCompleteRequestMessage) returns (google.protobuf.Empty) {} +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto deleted file mode 100644 index 50c6b4fa8c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/test/message.proto +++ /dev/null @@ -1,27 +0,0 @@ - -syntax = "proto3"; -package test.message; - -import "google/protobuf/empty.proto"; - -message Message { - string content = 1; -} -message ModifyMessageResponse { - string content = 1; -} - -message ModifyMessageRequest { - string content = 1; -} - - -service TestService { - rpc GetMessage(google.protobuf.Empty) returns (Message) {} - rpc SendMessage(Message) returns (google.protobuf.Empty) {} - rpc ModifyMessage(ModifyMessageRequest) returns (ModifyMessageResponse) {} -} - -service TestService2 { - rpc GetMessage(google.protobuf.Empty) returns (Message) {} -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts index 10b525dcab..9d3773228e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -1,3 +1,5 @@ export const DEFAULT_PORT_GATEWAY_SERVER = 3010; export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; +export const DEFAULT_PORT_GATEWAY_GRPC = 4010; +export const SATP_VERSION = "v02"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts new file mode 100644 index 0000000000..5ac543ca2d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts @@ -0,0 +1,52 @@ +import { + Checks, + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; + +import routesStage1 from "./stage-services/stage1-service"; +import routesStage2 from "./stage-services/stage2-service"; +import routesStage3 from "./stage-services/stage3-service"; + +export interface COREDispatcherOptions { + logger: Logger; + logLevel?: LogLevelDesc; + instanceId: string; +} + +export class COREDispatcher { + public static readonly CLASS_NAME = "COREDispacher"; + private readonly logger: Logger; + private readonly instanceId: string; + private endpoints: any[] | undefined; + + constructor(public readonly options: COREDispatcherOptions) { + const fnTag = `${COREDispatcher.CLASS_NAME}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.logger = LoggerProvider.getOrCreate({ level, label }); + this.instanceId = options.instanceId; + this.logger.info(`Instantiated ${this.className} OK`); + } + + public get className(): string { + return COREDispatcher.CLASS_NAME; + } + + getOrCreateServices() { + const fnTag = `${COREDispatcher.CLASS_NAME}#getOrCreateServices()`; + this.logger.info( + `${fnTag}, Registering gRPCservices on instanceId=${this.instanceId}`, + ); + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + + this.endpoints = [routesStage1, routesStage2, routesStage3]; + + return this.endpoints; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts new file mode 100644 index 0000000000..536acb2f16 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts @@ -0,0 +1,373 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SHA256 } from "crypto-js"; + +import { SATPGateway } from "../../../gateway-refactor"; +import { + TransferCommenceRequestMessage, + TransferProposalRequestMessage, + TransferProposalReceiptRejectMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { + MessageType, + CommonSatp, + TransferClaims, + NetworkCapabilities, +} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +import { + MessageStagesHashes, + MessageStagesSignatures, + SessionData, + Stage1Hashes, + Stage1Signatures, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SATP_VERSION } from "../../constants"; +import { + bufArray2HexStr, + sign, + storeLog, + verifySignature, +} from "../../../gateway-utils"; + +export class Stage1ClientHandler { + public static readonly CLASS_NAME = "Stage1Handler-Client"; + private _log: Logger; + + constructor() { + const level = "INFO"; + const label = Stage1ClientHandler.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public get className(): string { + return Stage1ClientHandler.CLASS_NAME; + } + + public get log(): Logger { + return this._log; + } + + async transferProposalRequest( + sessionID: string, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#transferProposalRequest()`; + + const sessionData = gateway.getSession(sessionID); + + if ( + sessionData == undefined || + sessionData.version == undefined || + sessionData.id == undefined || + //sessionData.transferContextId == undefined || + sessionData.digitalAssetId == undefined || + //sessionData.assetProfileId == undefined || + sessionData.originatorPubkey == undefined || + sessionData.beneficiaryPubkey == undefined || + sessionData.senderGatewayNetworkId == undefined || + sessionData.recipientGatewayNetworkId == undefined || + sessionData.clientGatewayPubkey == undefined || + sessionData.serverGatewayPubkey == undefined || + sessionData.senderGatewayOwnerId == undefined || + sessionData.receiverGatewayOwnerId == undefined || + // sessionData.maxRetries == undefined || + // sessionData.maxTimeout == undefined || + sessionData.senderGatewayNetworkId == undefined || + sessionData.signatureAlgorithm == undefined || + sessionData.lockType == undefined || + sessionData.lockExpirationTime == undefined || + //sessionData.permitions == undefined || + //sessionData.developerUrn == undefined || + sessionData.credentialProfile == undefined || + //sessionData.applicationProfile == undefined || + sessionData.loggingProfile == undefined || + sessionData.accessControlProfile == undefined || + sessionData.lastSequenceNumber == undefined //|| + //sessionData.subsequentCalls == undefined || + //sessionData.history == undefined || + //sessionData.multipleClaimsAllowed == undefined || + //sessionData.multipleCancelsAllowed == undefined + ) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + + if ( + !gateway.getSupportedDltIDs().includes(sessionData.senderGatewayNetworkId) + ) { + throw new Error( + `${fnTag}, recipient gateway dlt system is not supported by this gateway`, + ); + } + + if (sessionData.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.INIT_PROPOSAL; + commonBody.sessionId = sessionData.id; + // commonBody.transferContextId = sessionData.transferContextId; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.resourceUrl = ""; + + //commonBody.actionResponse = new ActionResponse(); + // commonBody.credentialBlock = sessionData.credentialBlock; + // commonBody.payloadProfile = sessionData.payloadProfile; + // commonBody.applicationProfile = sessionData.applicationProfile; + // commonBody.payload = new Payload(); + // commonBody.payloadHash = ""; + + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.hashPreviousMessage = ""; + + const transferInitClaims = new TransferClaims(); + transferInitClaims.digitalAssetId = sessionData.digitalAssetId; + transferInitClaims.assetProfileId = sessionData.assetProfileId; + transferInitClaims.verifiedOriginatorEntityId = + sessionData.verifiedOriginatorEntityId; + transferInitClaims.verifiedBeneficiaryEntityId = + sessionData.verifiedBeneficiaryEntityId; + transferInitClaims.originatorPubkey = sessionData.originatorPubkey; + transferInitClaims.beneficiaryPubkey = sessionData.beneficiaryPubkey; + transferInitClaims.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + transferInitClaims.recipientGatewayNetworkId = + sessionData.recipientGatewayNetworkId; + transferInitClaims.clientGatewayPubkey = sessionData.clientGatewayPubkey; + transferInitClaims.serverGatewayPubkey = sessionData.serverGatewayPubkey; + transferInitClaims.senderGatewayOwnerId = sessionData.senderGatewayOwnerId; + transferInitClaims.receiverGatewayOwnerId = + sessionData.receiverGatewayOwnerId; + + const networkCapabilities = new NetworkCapabilities(); + networkCapabilities.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + networkCapabilities.signatureAlgorithm = sessionData.signatureAlgorithm; + networkCapabilities.lockType = sessionData.lockType; + networkCapabilities.lockExpirationTime = sessionData.lockExpirationTime; + //networkCapabilities.permitions = sessionData.permitions; + //networkCapabilities.developerUrn = sessionData.developerUrn; + networkCapabilities.credentialProfile = sessionData.credentialProfile; + //networkCapabilities.applicationProfile = sessionData.applicationProfile; + networkCapabilities.loggingProfile = sessionData.loggingProfile; + networkCapabilities.accessControlProfile = sessionData.accessControlProfile; + //networkCapabilities.subsequentCalls = sessionData.subsequentCalls; + //networkCapabilities.history = sessionData.history; + + const transferProposalRequestMessage = new TransferProposalRequestMessage(); + transferProposalRequestMessage.common = commonBody; + transferProposalRequestMessage.transferInitClaims = transferInitClaims; + // transferProposalRequestMessage.transferInitClaimsFormat = sessionData.transferInitClaimsFormat; + transferProposalRequestMessage.networkCapabilities = networkCapabilities; + // transferProposalRequestMessage.multipleClaimsAllowed = sessionData.multipleClaimsAllowed; + // transferProposalRequestMessage.multipleCancelsAllowed = sessionData.multipleCancelsAllowed; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(transferProposalRequestMessage), + ), + ); + + transferProposalRequestMessage.common.signature = messageSignature; + + sessionData.signatures = new MessageStagesSignatures(); + sessionData.signatures.stage1 = new Stage1Signatures(); + sessionData.signatures.stage1.transferCommenceRequestMessageClientSignature = + messageSignature; + + sessionData.hashes = new MessageStagesHashes(); + sessionData.hashes.stage1 = new Stage1Hashes(); + + sessionData.hashes.stage1.transferCommenceRequestMessageHash = SHA256( + JSON.stringify(transferProposalRequestMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionID, + type: "transferProposalRequest", + operation: "validate", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending TransferProposalRequest...`); + + return transferProposalRequestMessage; + } + + async transferCommenceRequest( + response: TransferProposalReceiptRejectMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#transferCommenceRequest()`; + + if (!response || !response.common) { + throw new Error("Response or response.common is undefined"); + } + + //const sessionData = gateway.sessions.get(response.common.sessionId); + const sessionData = new SessionData(); //todo change + + if ( + sessionData == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined + ) { + throw new Error("Session data not loaded successfully"); + } + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; + commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage1.transferProposalReceiptMessageHash; //todo + + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.sessionId = sessionData.id; + + const transferCommenceRequestMessage = new TransferCommenceRequestMessage(); + transferCommenceRequestMessage.common = commonBody; + transferCommenceRequestMessage.hashTransferInitClaims = + sessionData.hashTransferInitClaims; + // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(transferCommenceRequestMessage), + ), + ); + + transferCommenceRequestMessage.common.signature = messageSignature; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferCommenceRequest", + operation: "validate", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending TransferCommenceRequest...`); + + return transferCommenceRequestMessage; + } + + async checkTransferProposalReceiptRejectMessage( + response: TransferProposalReceiptRejectMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#checkTransferProposalReceiptRejectMessage()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message has no satp common body`); + } + + if ( + response.common.version == undefined || + response.common.sequenceNumber == undefined || + response.common.hashPreviousMessage == undefined || + response.timestamp == undefined + ) { + throw new Error(`${fnTag}, satp common body is missing required fields`); + } + + const sessionId = response.common.sessionId; + + const sessionData = gateway.getSession(sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage1.transferProposalRequestMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined + ) { + throw new Error(`${fnTag}, session data was not loaded correctly`); + } + + if (response.common.version != sessionData.version) { + throw new Error(`${fnTag}, TransferCommenceRequest version mismatch`); + } + + if ( + response.common.messageType != MessageType.INIT_RECEIPT && + response.common.messageType != MessageType.INIT_REJECT + ) { + throw new Error( + `${fnTag}, wrong message type for TransferCommenceRequest()`, + ); + } + + if ( + response.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt Message sequence number is wrong`, + ); + } + + if ( + response.common.hashPreviousMessage == undefined || + response.common.hashPreviousMessage != + sessionData.hashes.stage1.transferProposalRequestMessageHash + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt Message previous message hash is wrong`, + ); + } + + if ( + response.common.hashPreviousMessage != + sessionData.hashes.stage1.transferProposalRequestMessageHash + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt previous message hash does not match the one that was sent`, + ); + } + + if ( + response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt serverIdentity public key does not match the one that was sent`, + ); + } + + if ( + response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + response, + sessionData.serverGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt message signature verification failed`, + ); + } + + this.log.info(`TransferProposalReceipt passed all checks.`); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts new file mode 100644 index 0000000000..92880531fa --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts @@ -0,0 +1,225 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { SATPGateway } from "../../../gateway-refactor"; +import { SATP_VERSION } from "../../constants"; +import { + CommonSatp, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { SHA256 } from "crypto-js"; +import { + Stage2Hashes, + Stage2Signatures, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { + bufArray2HexStr, + sign, + storeLog, + verifySignature, +} from "../../../gateway-utils"; + +export class Stage2ClientHandler { + public static readonly CLASS_NAME = "Stage2Handler-Client"; + private _log: Logger; + + constructor() { + const level = "INFO"; + const label = Stage2ClientHandler.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public get className(): string { + return Stage2ClientHandler.CLASS_NAME; + } + + public get log(): Logger { + return this._log; + } + + async lockAssertionRequest( + response: TransferCommenceResponseMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#lockAssertionRequest()`; + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = gateway.getSession(response.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + if ( + sessionData == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage1.transferCommenceRequestMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + sessionData.hashes.stage1.transferCommenceResponseMessageHash = SHA256( + JSON.stringify(response), + ).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.LOCK_ASSERT; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage1.transferCommenceResponseMessageHash; + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const lockAssertionRequestMessage = new LockAssertionRequestMessage(); + lockAssertionRequestMessage.common = commonBody; + + lockAssertionRequestMessage.lockAssertionClaim = + sessionData.lockAssertionClaim; + lockAssertionRequestMessage.lockAssertionFormat = + sessionData.lockAssertionFormat; //todo change this + + const messageSignature = bufArray2HexStr( + sign(gateway.gatewaySigner, JSON.stringify(lockAssertionRequestMessage)), + ); + + lockAssertionRequestMessage.common.signature = messageSignature; + + sessionData.signatures.stage2 = new Stage2Signatures(); + sessionData.signatures.stage2.lockAssertionRequestMessageClientSignature = + messageSignature; + + sessionData.hashes.stage2 = new Stage2Hashes(); + sessionData.hashes.stage2.lockAssertionRequestMessageHash = SHA256( + JSON.stringify(lockAssertionRequestMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "lockAssertionRequest", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending LockAssertionMessage...`); + + return lockAssertionRequestMessage; + } + + checkTransferCommenceResponseMessage( + response: TransferCommenceResponseMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#lockAssertionRequestMessage()`; + + if ( + response.common == undefined || + response.common.version == undefined || + response.common.messageType == undefined || + response.common.sessionId == undefined || + // request.common.transferContextId == undefined || + response.common.sequenceNumber == undefined || + response.common.resourceUrl == undefined || + // request.common.actionResponse == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + response.common.signature == undefined || + response.common.clientGatewayPubkey == undefined || + response.common.serverGatewayPubkey == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const sessionData = gateway.getSession(response.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage1.transferProposalRequestMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not load correctly`); + } + + if ( + response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, + ); + } + + if ( + response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse message signature verification failed`, + ); + } + + if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { + throw new Error( + `${fnTag}, wrong message type for TransferCommenceResponse `, + ); + } + + if ( + response.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse sequence number is wrong`, + ); + } + + if ( + response.common.hashPreviousMessage != + sessionData.hashes.stage1.transferCommenceResponseMessageHash //todo + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, + ); + } + + this.log.info(`TransferCommenceResponse passed all checks.`); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts new file mode 100644 index 0000000000..85f2000542 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts @@ -0,0 +1,541 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { SATPGateway } from "../../../gateway-refactor"; +import { + CommonSatp, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +import { SATP_VERSION } from "../../constants"; +import { + CommitFinalAcknowledgementReceiptResponseMessage, + CommitFinalAssertionRequestMessage, + CommitPreparationRequestMessage, + CommitReadyResponseMessage, + TransferCompleteRequestMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +import { SHA256 } from "crypto-js"; +import { + SessionData, + Stage3Hashes, + Stage3Signatures, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { + bufArray2HexStr, + sign, + storeLog, + verifySignature, +} from "../../../gateway-utils"; + +export class Stage3ClientHandler { + public static readonly CLASS_NAME = "Stage3Handler-Client"; + private _log: Logger; + + constructor() { + const level = "INFO"; + const label = Stage3ClientHandler.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public get className(): string { + return Stage3ClientHandler.CLASS_NAME; + } + + public get log(): Logger { + return this._log; + } + + async commitPreparation( + response: LockAssertionReceiptMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#commitPreparation()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = gateway.getSession(response.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage2 == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + sessionData.hashes.stage2.lockAssertionReceiptMessageHash = SHA256( + JSON.stringify(response), + ).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_PREPARE; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage2.lockAssertionReceiptMessageHash; + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitPreparationRequestMessage = + new CommitPreparationRequestMessage(); + commitPreparationRequestMessage.common = commonBody; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(commitPreparationRequestMessage), + ), + ); + + commitPreparationRequestMessage.common.signature = messageSignature; + + sessionData.signatures.stage3 = new Stage3Signatures(); + sessionData.signatures.stage3.commitPreparationRequestMessageClientSignature = + messageSignature; + + sessionData.hashes.stage3 = new Stage3Hashes(); + sessionData.hashes.stage3.commitPreparationRequestMessageHash = SHA256( + JSON.stringify(commitPreparationRequestMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitPreparation", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending CommitPreparationMessage...`); + + return commitPreparationRequestMessage; + } + + async commitFinalAssertion( + response: CommitReadyResponseMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#commitPreparation()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + //const sessionData = gateway.sessions.get(response.common.sessionId); + const sessionData = new SessionData(); //todo change + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage3 == undefined || + sessionData.signatures == undefined || + sessionData.signatures.stage3 == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + sessionData.hashes.stage3.commitReadyResponseMessageHash = SHA256( + JSON.stringify(response), + ).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_FINAL; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage3.commitReadyResponseMessageHash; + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitFinalAssertionRequestMessage = + new CommitFinalAssertionRequestMessage(); + commitFinalAssertionRequestMessage.common = commonBody; + + commitFinalAssertionRequestMessage.burnAssertionClaim = + sessionData.burnAssertionClaim; + commitFinalAssertionRequestMessage.burnAssertionClaimFormat = + sessionData.burnAssertionClaimFormat; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(commitFinalAssertionRequestMessage), + ), + ); + + commitFinalAssertionRequestMessage.common.signature = messageSignature; + + sessionData.signatures.stage3.commitFinalAssertionRequestMessageClientSignature = + messageSignature; + + sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash = SHA256( + JSON.stringify(commitFinalAssertionRequestMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitFinalAssertion", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); + + return commitFinalAssertionRequestMessage; + } + + async transferComplete( + response: CommitFinalAcknowledgementReceiptResponseMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#transferComplete()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + //const sessionData = gateway.sessions.get(response.common.sessionId); + const sessionData = new SessionData(); //todo change + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage3 == undefined || + sessionData.signatures == undefined || + sessionData.signatures.stage3 == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + sessionData.hashes.stage3.commitFinalAcknowledgementReceiptResponseMessageHash = + SHA256(JSON.stringify(response)).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage3.commitFinalAcknowledgementReceiptResponseMessageHash; + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); + transferCompleteRequestMessage.common = commonBody; + transferCompleteRequestMessage.hashTransferCommence = + sessionData.hashes.stage1.transferCommenceRequestMessageHash; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(transferCompleteRequestMessage), + ), + ); + + transferCompleteRequestMessage.common.signature = messageSignature; + + sessionData.signatures.stage3.transferCompleteRequestMessageClientSignature = + messageSignature; + + sessionData.hashes.stage3.transferCompleteRequestMessageHash = SHA256( + JSON.stringify(transferCompleteRequestMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferComplete", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending TransferCompleteMessage...`); + + return transferCompleteRequestMessage; + } + + checkLockAssertionReceiptMessage( + response: LockAssertionReceiptMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkLockAssertionReceiptMessage()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { + throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); + } + + const sessionData = gateway.getSession(response.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage2 == undefined || + sessionData.hashes.stage2.lockAssertionRequestMessageHash == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + response.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + sessionData.hashes.stage2.lockAssertionRequestMessageHash != + response.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey + ) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if ( + sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey + ) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + this.log.info(`LockAssertionReceiptMessage passed all checks.`); + } + + checkCommitReadyResponseMessage( + response: CommitReadyResponseMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkCommitReadyResponseMessage()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (response.common.messageType != MessageType.COMMIT_READY) { + throw new Error(`${fnTag}, message type is not COMMIT_READY`); + } + + const sessionData = gateway.getSession(response.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage3 == undefined || + sessionData.hashes.stage3.commitPreparationRequestMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + response.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + sessionData.hashes.stage3.commitPreparationRequestMessageHash != + response.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey + ) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if ( + sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey + ) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if (response.mintAssertionClaims == undefined) { + //todo + throw new Error(`${fnTag}, mintAssertionClaims is missing`); + } + + this.log.info(`CommitReadyResponseMessage passed all checks.`); + } + + checkCommitFinalAcknowledgementReceiptResponseMessage( + response: CommitFinalAcknowledgementReceiptResponseMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkCommitFinalAcknowledgementReceiptResponseMessage()`; + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { + throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); + } + + const sessionData = gateway.getSession(response.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage3 == undefined || + sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + response.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash != + response.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey + ) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if ( + sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey + ) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if (response.assignmentAssertionClaim == undefined) { + throw new Error(`${fnTag}, assignmentAssertionClaim is missing`); + } + + this.log.info( + `CommitFinalAcknowledgementReceiptResponseMessage passed all checks.`, + ); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts new file mode 100644 index 0000000000..b8f1daa767 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts @@ -0,0 +1,448 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SHA256 } from "crypto-js"; + +import { SATPGateway } from "../../../gateway-refactor"; +import { + TransferCommenceResponseMessage, + TransferCommenceRequestMessage, + TransferProposalRequestMessage, + TransferProposalReceiptRejectMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { + MessageType, + CommonSatp, +} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +import { + MessageStagesHashes, + MessageStagesSignatures, + MessageStagesTimestamps, + SessionData, + Stage1Hashes, + Stage1Signatures, + Stage1Timestamps, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SATP_VERSION } from "../../constants"; +import { + bufArray2HexStr, + sign, + storeLog, + verifySignature, +} from "../../../gateway-utils"; + +export class Stage1Handler { + public static readonly CLASS_NAME = "Stage1Handler-Server"; + private _log: Logger; + + constructor() { + const level = "INFO"; + const label = Stage1Handler.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public get className(): string { + return Stage1Handler.CLASS_NAME; + } + + public get log(): Logger { + return this._log; + } + + async transferProposalResponse( + request: TransferProposalRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#transferProposalResponse()`; + + const recvTimestamp: string = Date.now().toString(); + + if ( + request.common == undefined || + request.transferInitClaims == undefined || + request.networkCapabilities == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + const sessionData = new SessionData(); + sessionData.id = request.common.sessionId; + sessionData.version = request.common.version; + sessionData.digitalAssetId = request.transferInitClaims.digitalAssetId; + //sessionData.assetProfile = request.common.payloadProfile.assetProfile; + // sessionData.applicationProfile = request.networkCapabilities.applicationProfile; + sessionData.originatorPubkey = request.common.clientGatewayPubkey; + sessionData.beneficiaryPubkey = request.common.serverGatewayPubkey; + sessionData.senderGatewayNetworkId = + request.transferInitClaims.senderGatewayNetworkId; + sessionData.recipientGatewayNetworkId = + request.transferInitClaims.recipientGatewayNetworkId; + sessionData.clientGatewayPubkey = request.common.clientGatewayPubkey; + sessionData.serverGatewayPubkey = request.common.serverGatewayPubkey; + sessionData.receiverGatewayOwnerId = + request.transferInitClaims.receiverGatewayOwnerId; + sessionData.senderGatewayOwnerId = + request.transferInitClaims.senderGatewayOwnerId; + sessionData.signatureAlgorithm = + request.networkCapabilities.signatureAlgorithm; + sessionData.lockType = request.networkCapabilities.lockType; + sessionData.lockExpirationTime = + request.networkCapabilities.lockExpirationTime; + sessionData.credentialProfile = + request.networkCapabilities.credentialProfile; + sessionData.loggingProfile = request.networkCapabilities.loggingProfile; + sessionData.accessControlProfile = + request.networkCapabilities.accessControlProfile; + + // sessionData.maxRetries = request.transferInitClaims.maxRetries; + // sessionData.maxTimeout = request.transferInitClaims.maxTimeout; + + sessionData.signatures = new MessageStagesSignatures(); + sessionData.signatures.stage1 = new Stage1Signatures(); + sessionData.signatures.stage1.transferCommenceRequestMessageClientSignature = + request.common.signature; + + sessionData.lastMessageReceivedTimestamp = recvTimestamp; + + sessionData.sourceLedgerAssetId = + request.transferInitClaims.verifiedOriginatorEntityId; + sessionData.recipientLedgerAssetId = + request.transferInitClaims.verifiedBeneficiaryEntityId; // todo shouldn't be the server to create this id? + + sessionData.hashTransferInitClaims = SHA256( + JSON.stringify(request.transferInitClaims), + ).toString(); + + sessionData.hashes = new MessageStagesHashes(); + sessionData.hashes.stage1 = new Stage1Hashes(); + + sessionData.hashes.stage1.transferCommenceRequestMessageHash = SHA256( + JSON.stringify(request), + ).toString(); + + sessionData.lastSequenceNumber = request.common.sequenceNumber + BigInt(1); + + sessionData.processedTimestamps = new MessageStagesTimestamps(); + sessionData.processedTimestamps.stage1 = new Stage1Timestamps(); + + sessionData.receivedTimestamps = new MessageStagesTimestamps(); + sessionData.receivedTimestamps.stage1 = new Stage1Timestamps(); + + sessionData.receivedTimestamps.stage1.transferCommenceRequestMessageTimestamp = + recvTimestamp; + + gateway.addSession(request.common.sessionId, sessionData); + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.INIT_RECEIPT; + commonBody.sessionId = sessionData.id; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.resourceUrl = request.common.resourceUrl; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.hashPreviousMessage = sessionData.hashTransferInitClaims; + + //todo if rejection + const transferProposalReceiptMessage = + new TransferProposalReceiptRejectMessage(); + transferProposalReceiptMessage.common = commonBody; + + sessionData.processedTimestamps.stage1.transferCommenceRequestMessageTimestamp = + Date.now().toString(); + transferProposalReceiptMessage.timestamp = + sessionData.processedTimestamps.stage1.transferCommenceRequestMessageTimestamp; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(transferProposalReceiptMessage), + ), + ); + + transferProposalReceiptMessage.common.signature = messageSignature; + + sessionData.signatures.stage1.transferProposalReceiptMessageServerSignature = + messageSignature; + sessionData.hashes.stage1.transferProposalReceiptMessageHash = SHA256( + JSON.stringify(transferProposalReceiptMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferProposalResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending TransferProposalResponseMessage...`); + + return transferProposalReceiptMessage; + } + + async transferCommenceResponse( + request: TransferCommenceRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#transferCommenceResponse()`; + + const recvTimestamp: string = Date.now().toString(); + + if (request.common == undefined) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if ( + sessionData == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + sessionData.hashes.stage1.transferCommenceRequestMessageHash = SHA256( + JSON.stringify(request), + ).toString(); + + sessionData.lastMessageReceivedTimestamp = recvTimestamp; + this.log.info(`TransferCommenceRequest passed all checks.`); + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.TRANSFER_COMMENCE_RESPONSE; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage1.transferCommenceRequestMessageHash; //todo + + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.sessionId = sessionData.id; + + const transferCommenceResponseMessage = + new TransferCommenceResponseMessage(); + transferCommenceResponseMessage.common = commonBody; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + //sessionData.processedTimestamps.stage1.transferCommenceRequestMessageTimestamp = Date.now().toString(); + + sessionData.hashes.stage1.transferCommenceResponseMessageHash = SHA256( + JSON.stringify(transferCommenceResponseMessage), + ).toString(); + + //todo sign + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferCommenceResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending TransferCommenceResponseMessage...`); + + return transferCommenceResponseMessage; + } + + checkTransferProposalRequestMessage( + request: TransferProposalRequestMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkTransferProposalRequestMessage()`; + + if ( + request.common == undefined || + request.common.version == undefined || + request.common.messageType == undefined || + request.common.sessionId == undefined || + // request.common.transferContextId == undefined || + request.common.sequenceNumber == undefined || + request.common.resourceUrl == undefined || + // request.common.actionResponse == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + request.common.signature == undefined || + request.common.clientGatewayPubkey == undefined || + request.common.serverGatewayPubkey == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + //todo there is not a session data already here? + + if ( + !verifySignature( + gateway.gatewaySigner, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferProposalRequest message signature verification failed`, + ); + } + + if (request.common.messageType != MessageType.INIT_PROPOSAL) { + throw new Error( + `${fnTag}, wrong message type for TransferProposalRequest`, + ); + } + + if (request.transferInitClaims == undefined) { + throw new Error( + `${fnTag}, TransferProposalRequest message does not contain transfer initialization claims`, + ); + } + + if (request.networkCapabilities == undefined) { + throw new Error( + `${fnTag}, TransferProposalRequest message does not contain network capabilities and parameters`, + ); + } + + if ( + !gateway + .getSupportedDltIDs() + .includes(request.transferInitClaims.senderGatewayNetworkId) + ) { + throw new Error( + `${fnTag}, recipient gateway dlt system is not supported by this gateway`, + ); + } + + this.log.info(`TransferProposalRequest passed all checks.`); + } + + async checkTransferCommenceRequestMessage( + request: TransferCommenceRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#transferCommenceResponse()`; + + //const recvTimestamp: string = Date.now().toString(); + + if ( + request.common == undefined || + request.common.version == undefined || + request.common.messageType == undefined || + request.common.sessionId == undefined || + // request.common.transferContextId == undefined || + request.common.sequenceNumber == undefined || + request.common.resourceUrl == undefined || + // request.common.actionResponse == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + request.common.signature == undefined || + request.common.clientGatewayPubkey == undefined || + request.common.serverGatewayPubkey == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage1.transferProposalRequestMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not load correctly`); + } + + if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { + throw new Error( + `${fnTag}, TransferCommenceRequest serverIdentity public key does not match the one that was sent`, + ); + } + + if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { + throw new Error( + `${fnTag}, TransferCommenceRequest clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message signature verification failed`, + ); + } + + if (request.common.messageType != MessageType.TRANSFER_COMMENCE_REQUEST) { + throw new Error( + `${fnTag}, wrong message type for TransferCommenceRequest`, + ); + } + + if ( + request.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest Message sequence number is wrong`, + ); + } + + if ( + request.common.hashPreviousMessage != + sessionData.hashes.stage1.transferProposalReceiptMessageHash //todo + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, + ); + } + + if ( + request.hashTransferInitClaims == undefined || + request.hashTransferInitClaims != sessionData.hashTransferInitClaims + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message does not contain transfer claims`, + ); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + request, + sessionData.clientGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message signature verification failed`, + ); + } + + this.log.info(`TransferCommenceRequest passed all checks.`); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts new file mode 100644 index 0000000000..3914861540 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts @@ -0,0 +1,224 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { + LockAssertionReceiptMessage, + LockAssertionRequestMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { SATPGateway } from "../../../gateway-refactor"; +import { SATP_VERSION } from "../../constants"; +import { + CommonSatp, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +import { + Stage2Hashes, + Stage2Signatures, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SHA256 } from "crypto-js"; +import { + bufArray2HexStr, + sign, + storeLog, + verifySignature, +} from "../../../gateway-utils"; + +export class Stage2ServerHandler { + public static readonly CLASS_NAME = "Stage2Handler-Server"; + private _log: Logger; + + constructor() { + const level = "INFO"; + const label = Stage2ServerHandler.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public get className(): string { + return Stage2ServerHandler.CLASS_NAME; + } + + public get log(): Logger { + return this._log; + } + + async lockAssertionResponse( + request: LockAssertionRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#lockAssertionResponse()`; + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + if ( + sessionData == undefined || + sessionData.hashes == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + sessionData.hashes.stage2 = new Stage2Hashes(); + sessionData.hashes.stage2.lockAssertionRequestMessageHash = SHA256( + JSON.stringify(request), + ).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.ASSERTION_RECEIPT; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage2.lockAssertionRequestMessageHash; + commonBody.sessionId = request.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const lockAssertionReceiptMessage = new LockAssertionReceiptMessage(); + lockAssertionReceiptMessage.common = commonBody; + + const messageSignature = bufArray2HexStr( + sign(gateway.gatewaySigner, JSON.stringify(lockAssertionReceiptMessage)), + ); + + lockAssertionReceiptMessage.common.signature = messageSignature; + + sessionData.signatures.stage2 = new Stage2Signatures(); + sessionData.signatures.stage2.lockAssertionRequestMessageClientSignature = + messageSignature; + + sessionData.hashes.stage2 = new Stage2Hashes(); + sessionData.hashes.stage2.lockAssertionRequestMessageHash = SHA256( + JSON.stringify(lockAssertionReceiptMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "lockAssertionResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending LockAssertionResponseMessage...`); + + return lockAssertionReceiptMessage; + } + + checkLockAssertionRequestMessage( + request: LockAssertionRequestMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkLockAssertionRequestMessage()`; + + if ( + request.common == undefined || + request.common.version == undefined || + request.common.messageType == undefined || + request.common.sessionId == undefined || + // request.common.transferContextId == undefined || + request.common.sequenceNumber == undefined || + request.common.resourceUrl == undefined || + // request.common.actionrequest == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + request.common.signature == undefined || + request.common.clientGatewayPubkey == undefined || + request.common.serverGatewayPubkey == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage1.transferCommenceResponseMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not load correctly`); + } + + if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { + throw new Error( + `${fnTag}, LockAssertionRequest serverIdentity public key does not match the one that was sent`, + ); + } + + if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { + throw new Error( + `${fnTag}, LockAssertionRequest clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + request.common, + request.common.serverGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, LockAssertionRequest message signature verification failed`, + ); + } + + if (request.common.messageType != MessageType.LOCK_ASSERT) { + throw new Error(`${fnTag}, wrong message type for LockAssertionRequest`); + } + + if ( + request.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, LockAssertionRequest Message sequence number is wrong`, + ); + } + + if ( + request.common.hashPreviousMessage != + sessionData.hashes.stage1.transferCommenceResponseMessageHash + ) { + throw new Error( + `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, + ); + } + + if ( + request.lockAssertionFormat == undefined || + request.lockAssertionClaim == undefined + ) { + throw new Error( + `${fnTag}, LockAssertionRequest lockAssertionFormat or lockAssertionClaim is missing`, + ); + } + + this.log.info(`LockAssertionRequest passed all checks.`); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts new file mode 100644 index 0000000000..0d1b7febb6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts @@ -0,0 +1,366 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPGateway } from "../../../gateway-refactor"; +import { + CommitFinalAcknowledgementReceiptResponseMessage, + CommitFinalAssertionRequestMessage, + CommitPreparationRequestMessage, + CommitReadyResponseMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +import { SATP_VERSION } from "../../constants"; +import { + CommonSatp, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +import { + Stage3Hashes, + Stage3Signatures, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SHA256 } from "crypto-js"; +import { + bufArray2HexStr, + sign, + storeLog, + verifySignature, +} from "../../../gateway-utils"; + +export class Stage3ServerHandler { + public static readonly CLASS_NAME = "Stage3Handler-Server"; + private _log: Logger; + + constructor() { + const level = "INFO"; + const label = Stage3ServerHandler.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public get className(): string { + return Stage3ServerHandler.CLASS_NAME; + } + + public get log(): Logger { + return this._log; + } + + async commitReady( + request: CommitPreparationRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#commitReady()`; + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData == undefined || + sessionData.hashes == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + sessionData.hashes.stage3 = new Stage3Hashes(); + + sessionData.hashes.stage3.commitPreparationRequestMessageHash = SHA256( + JSON.stringify(request), + ).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_READY; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage3.commitPreparationRequestMessageHash; + commonBody.sessionId = request.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitReadyMessage = new CommitReadyResponseMessage(); + commitReadyMessage.common = commonBody; + + commitReadyMessage.mintAssertionClaims = sessionData.mintAssertionClaims; + commitReadyMessage.mintAssertionClaimsFormat = + sessionData.mintAssertionClaimsFormat; + + const messageSignature = bufArray2HexStr( + sign(gateway.gatewaySigner, JSON.stringify(commitReadyMessage)), + ); + + commitReadyMessage.common.signature = messageSignature; + + sessionData.signatures.stage3 = new Stage3Signatures(); + sessionData.signatures.stage3.commitReadyResponseMessageServerSignature = + messageSignature; + + sessionData.hashes.stage3.commitReadyResponseMessageHash = SHA256( + JSON.stringify(commitReadyMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitReady", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info(`${fnTag}, sending commitReadyMessage...`); + + return commitReadyMessage; + } + + async commitFinalAcknowledgementReceiptResponse( + request: CommitFinalAssertionRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#commitFinalAcknowledgementReceiptResponse()`; + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage3 == undefined || + sessionData.hashes.stage3.commitReadyResponseMessageHash == undefined || + sessionData.signatures == undefined || + sessionData.signatures.stage3 == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash = SHA256( + JSON.stringify(request), + ).toString(); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.ACK_COMMIT_FINAL; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = + sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash; + commonBody.sessionId = request.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitFinalAcknowledgementReceiptResponseMessage = + new CommitFinalAcknowledgementReceiptResponseMessage(); + commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; + + commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = + sessionData.assignmentAssertionClaim; + commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaimFormat = + sessionData.assignmentAssertionClaimFormat; + + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), + ), + ); + + commitFinalAcknowledgementReceiptResponseMessage.common.signature = + messageSignature; + + sessionData.signatures.stage3.commitFinalAcknowledgementReceiptResponseMessageServerSignature = + messageSignature; + + sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash = SHA256( + JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), + ).toString(); + + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitFinalAcknowledgementReceiptResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + + this.log.info( + `${fnTag}, sending commitFinalAcknowledgementReceiptResponseMessage...`, + ); + + return commitFinalAcknowledgementReceiptResponseMessage; + } + + checkCommitPreparationRequestMessage( + request: CommitPreparationRequestMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkCommitPreparationRequestMessage()`; + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (request.common.messageType != MessageType.COMMIT_PREPARE) { + throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage2 == undefined || + sessionData.hashes.stage2.lockAssertionReceiptMessageHash == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + request.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + sessionData.hashes.stage2.lockAssertionReceiptMessageHash != + request.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + this.log.info(`CommitPreparationRequestMessage passed all checks.`); + } + + checkCommitFinalAssertionRequestMessage( + request: CommitFinalAssertionRequestMessage, + gateway: SATPGateway, + ): void { + const fnTag = `${this.className}#checkCommitFinalAssertionRequestMessage()`; + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (request.common.messageType != MessageType.COMMIT_FINAL) { + throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); + } + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage3 == undefined || + sessionData.hashes.stage3.commitReadyResponseMessageHash == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + request.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + sessionData.hashes.stage3.commitReadyResponseMessageHash != + request.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if (request.burnAssertionClaim == undefined) { + throw new Error(`${fnTag}, mintAssertionClaims is missing`); + } + + this.log.info(`CommitFinalAssertionRequestMessage passed all checks.`); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts index e69de29bb2..69c7d8b514 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts @@ -0,0 +1,3 @@ +export class SatpStage0 { + public static readonly CLASS_NAME = "SatpStage0"; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts new file mode 100644 index 0000000000..516e2dcba4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts @@ -0,0 +1,33 @@ +import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; + +import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; +import { + TransferCommenceRequestMessage, + TransferCommenceResponseMessage, + TransferProposalReceiptRejectMessage, + TransferProposalRequestMessage, +} from "../../generated/proto/cacti/satp/v02/stage_1_pb"; + +export default (router: ConnectRouter) => + router.service(SatpStage1Service, { + async transferProposal( + req: TransferProposalRequestMessage, + context: HandlerContext, + ) { + console.log("Received request", req, context); + + //todo + + return new TransferProposalReceiptRejectMessage({}); + }, + async transferCommence( + req: TransferCommenceRequestMessage, + context: HandlerContext, + ) { + console.log("Received request", req, context); + + //todo + + return new TransferCommenceResponseMessage({}); + }, + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts new file mode 100644 index 0000000000..33983eabce --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts @@ -0,0 +1,20 @@ +import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; +import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; +import { + LockAssertionReceiptMessage, + LockAssertionRequestMessage, +} from "../../generated/proto/cacti/satp/v02/stage_2_pb"; + +export default (router: ConnectRouter) => + router.service(SatpStage2Service, { + async lockAssertion( + req: LockAssertionRequestMessage, + context: HandlerContext, + ) { + console.log("Received request", req, context); + + //todo + + return new LockAssertionReceiptMessage({}); + }, + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts new file mode 100644 index 0000000000..2639f01f0f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts @@ -0,0 +1,44 @@ +import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; +import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; +import { + CommitFinalAcknowledgementReceiptResponseMessage, + CommitFinalAssertionRequestMessage, + CommitPreparationRequestMessage, + CommitReadyResponseMessage, + TransferCompleteRequestMessage, +} from "../../generated/proto/cacti/satp/v02/stage_3_pb"; +import { Empty } from "@bufbuild/protobuf"; + +export default (router: ConnectRouter) => + router.service(SatpStage3Service, { + async commitPreparation( + req: CommitPreparationRequestMessage, + context: HandlerContext, + ) { + console.log("Received request", req, context); + + //todo + + return new CommitReadyResponseMessage({}); + }, + async commitFinalAssertion( + req: CommitFinalAssertionRequestMessage, + context: HandlerContext, + ) { + console.log("Received request", req, context); + + //todo + + return new CommitFinalAcknowledgementReceiptResponseMessage({}); + }, + async transferComplete( + req: TransferCompleteRequestMessage, + context: HandlerContext, + ) { + console.log("Received request", req, context); + + //todo + + return new Empty({}); + }, + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts deleted file mode 100644 index 991aa1a51e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3.ts +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts deleted file mode 100644 index 0cb18dc834..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/test-services.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ConnectRouter } from "@connectrpc/connect"; -// import { Message } from "../../generated/proto/test/message_pb"; -import { TestService } from "../../generated/proto/test/message_connect"; - -export const testRouter = (router: ConnectRouter) => - // registers connectrpc.eliza.v1.ElizaService - router.service(TestService, { - // implements rpc Say - async sendMessage(req) { - return { - sentence: `You said: ${req}`, - }; - }, - }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 6c33f0ac0b..b952bd6185 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,6 +1,7 @@ -import { Secp256k1Keys, LogLevelDesc } from "@hyperledger/cactus-common"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; +import { ISignerKeyPairs } from "@hyperledger/cactus-common/src/main/typescript/signer-key-pairs"; export enum CurrentDrafts { Core = "Core", @@ -43,13 +44,14 @@ export type GatewayIdentity = { proofID?: string; gatewayServerPort?: number; gatewayClientPort?: number; + gatewayGrpcPort?: number; address?: Address; }; export interface SATPGatewayConfig { gid?: GatewayIdentity; logLevel?: LogLevelDesc; - keys?: Secp256k1Keys; + keyPair?: ISignerKeyPairs; environment?: "development" | "production"; enableOpenAPI?: boolean; validationOptions?: ValidatorOptions; @@ -68,3 +70,18 @@ export function isOfType( ): obj is T { return obj instanceof type; } + +export interface LocalLog { + sessionID: string; + type: string; + key?: string; + operation: string; + timestamp?: string; + data: string; +} +export interface RemoteLog { + key: string; + hash: string; + signature: string; + signerPubKey: string; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts index 2191fc0da2..f983574a62 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -4,6 +4,8 @@ import { Checks, LoggerProvider, ILoggerOptions, + JsObjectSigner, + IJsObjectSignerOptions, } from "@hyperledger/cactus-common"; import { v4 as uuidv4 } from "uuid"; @@ -26,15 +28,22 @@ import { import { GatewayOrchestrator } from "./gol/gateway-orchestrator"; export { SATPGatewayConfig }; import express, { Express } from "express"; -import { expressConnectMiddleware } from "@connectrpc/connect-express"; import http from "http"; import { configureRoutes } from "./web-services/router"; import { DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_GRPC, DEFAULT_PORT_GATEWAY_SERVER, } from "./core/constants"; import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; - +import { SessionData } from "./generated/proto/cacti/satp/v02/common/session_pb"; +import { expressConnectMiddleware } from "@connectrpc/connect-express"; +import { bufArray2HexStr } from "./gateway-utils"; +import { COREDispatcher } from "./core/dispatcher"; +import { + ILocalLogRepository, + IRemoteLogRepository, +} from "./repository/interfaces/repository"; export class SATPGateway { // todo more checks; example port from config is between 3000 and 9000 @IsDefined() @@ -60,9 +69,20 @@ export class SATPGateway { private BLOApplication?: Express; private BLOServer?: http.Server; private BLODispatcher?: BLODispatcher; + private gRPCServer?: http.Server; + private gRPCApplication?: Express; + private COREDispatcher?: COREDispatcher; + + private objectSigner: JsObjectSigner; // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) - // private sessions: Map = new Map(); + private supportedDltIDs: SupportedGatewayImplementations[]; + private sessions: Map = new Map(); + private _pubKey: string; + private _privKey: string; + + public localRepository?: ILocalLogRepository; + public remoteRepository?: IRemoteLogRepository; constructor(public readonly options: SATPGatewayConfig) { const fnTag = `${this.label}#constructor()`; @@ -77,6 +97,21 @@ export class SATPGateway { this.logger = LoggerProvider.getOrCreate(logOptions); this.logger.info("Initializing Gateway Coordinator"); + if (this.config.keyPair == undefined) { + throw new Error("Key pair is undefined"); + } + + this._pubKey = bufArray2HexStr(this.config.keyPair.publicKey); + this._privKey = bufArray2HexStr(this.config.keyPair.privateKey); + + this.logger.info(`Gateway's public key: ${this._pubKey}`); + + const objectSignerOptions: IJsObjectSignerOptions = { + privateKey: this._privKey, + logLevel: "debug", + }; + this.objectSigner = new JsObjectSigner(objectSignerOptions); + if (options.enableOpenAPI) { this.setupOpenAPI(); } @@ -95,6 +130,8 @@ export class SATPGateway { instanceId: this.config.gid!.id, }; + this.supportedDltIDs = this.config.gid!.supportedChains; + if (!this.config.gid || !dispatcherOps.instanceId) { throw new Error("Invalid configuration"); } @@ -102,6 +139,30 @@ export class SATPGateway { this.BLODispatcher = new BLODispatcher(dispatcherOps); } + public getSessions(): Map { + return this.sessions; + } + + public getSession(sessionId: string): SessionData | undefined { + return this.sessions.get(sessionId); + } + + public getSupportedDltIDs(): string[] { + return this.supportedDltIDs; + } + + public addSession(sessionId: string, sessionData: SessionData): void { + this.sessions.set(sessionId, sessionData); + } + + public get gatewaySigner(): JsObjectSigner { + return this.objectSigner; + } + + public get pubKey(): string { + return this._pubKey; + } + // todo load docs for gateway coordinator and expose them in a http gatewayApplication setupOpenAPI(): void { const fnTag = `${this.label}#setupOpenAPI()`; @@ -124,8 +185,8 @@ export class SATPGateway { static ProcessGatewayCoordinatorConfig( pluginOptions: SATPGatewayConfig, ): SATPGatewayConfig { - if (!pluginOptions.keys) { - pluginOptions.keys = Secp256k1Keys.generateKeyPairsBuffer(); + if (!pluginOptions.keyPair) { + pluginOptions.keyPair = Secp256k1Keys.generateKeyPairsBuffer(); } const id = uuidv4(); @@ -217,13 +278,57 @@ export class SATPGateway { this.logger.trace(`Entering ${fnTag}`); await Promise.all([ - // TODO! need to add TLS support for Connect and gRPC to work + // grpc server does not start correctly + // this.startupGRPCServer(), this.startupGatewayServer(), this.startupBOLServer(), ]); this.logger.info("Both GatewayServer and BLOServer have started"); } + + async startupGRPCServer(): Promise { + const fnTag = `${this.label}#startupGRPCServer()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.info("Starting gRPC server"); + const port = this.options.gid?.gatewayGrpcPort ?? DEFAULT_PORT_GATEWAY_GRPC; + + return new Promise(async (resolve, reject) => { + if (this.gRPCApplication || !this.gRPCServer) { + if (!this.COREDispatcher) { + throw new Error("COREDispatcher is not defined"); + } + + this.gRPCApplication = express(); + + try { + const gRPCServices = await this.COREDispatcher.getOrCreateServices(); + for (const service of gRPCServices) { + this.logger.debug(`Registering web service: ${service.getPath()}`); + await service.registerExpress(this.COREDispatcher); + } + } catch (error) { + throw new Error(`Failed to register web services: ${error}`); + } + + this.gRPCServer = http.createServer(this.gRPCApplication); + + this.gRPCServer.listen(port, () => { + this.logger.info(`gRPC server started and listening on port ${port}`); + resolve(); + }); + + this.gRPCServer.on("error", (error) => { + this.logger.error(`gRPC server failed to start: ${error}`); + reject(error); + }); + } else { + this.logger.warn("Server already running"); + resolve(); + } + }); + } + async startupGatewayServer(): Promise { const fnTag = `${this.label}#startupGatewayServer()`; this.logger.trace(`Entering ${fnTag}`); @@ -442,6 +547,9 @@ export class SATPGateway { const fnTag = `${this.label}#getGatewaySeeds()`; this.logger.debug(`Entering ${fnTag}`); + this.logger.info("Shutting down Node server - gRPC"); + await this.shutdownGRPCServer(); + this.logger.info("Shutting down Node server - Gateway"); await this.shutdownGatewayServer(); @@ -498,4 +606,22 @@ export class SATPGateway { this.logger.warn("Server is not running."); } } + + private async shutdownGRPCServer(): Promise { + const fnTag = `${this.label}#shutdownGRPCServer()`; + this.logger.debug(`Entering ${fnTag}`); + if (this.gRPCServer) { + try { + await this.gRPCServer.close(); + this.gRPCServer = undefined; + this.logger.info("Server shut down"); + } catch (error) { + this.logger.error( + `Error shutting down the gatewayApplication: ${error}`, + ); + } + } else { + this.logger.warn("Server is not running."); + } + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts new file mode 100644 index 0000000000..22ee13a58f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -0,0 +1,104 @@ +import { JsObjectSigner } from "@hyperledger/cactus-common"; +import { LocalLog, RemoteLog } from "./core/types"; +import { SATPGateway } from "./gateway-refactor"; +import { SHA256 } from "crypto-js"; + +export function bufArray2HexStr(array: Uint8Array): string { + return Buffer.from(array).toString("hex"); +} + +export function sign(objectSigner: JsObjectSigner, msg: string): Uint8Array { + return objectSigner.sign(msg); +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function verifySignature( + objectSigner: JsObjectSigner, + obj: any, + pubKey: string, +): boolean { + const sourceSignature = new Uint8Array(Buffer.from(obj.signature, "hex")); + const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); + + const signature = obj.signature; + obj.signature = ""; + if ( + !objectSigner.verify(JSON.stringify(obj), sourceSignature, sourcePubkey) + ) { + return false; + } + + obj.signature = signature; + return true; +} + +export async function storeLog( + gateway: SATPGateway, + localLog: LocalLog, +): Promise { + localLog.key = getSatpLogKey( + localLog.sessionID, + localLog.type, + localLog.operation, + ); + localLog.timestamp = Date.now().toString(); + + await storeInDatabase(gateway, localLog); + + // Keep the order consistent with the order of the fields in the table + // so that the hash matches when retrieving from the database + const hash = SHA256( + JSON.stringify(localLog, [ + "sessionID", + "type", + "key", + "operation", + "timestamp", + "data", + ]), + ).toString(); + + await storeRemoteLog(gateway, localLog.key, hash); +} + +export async function storeInDatabase( + gateway: SATPGateway, + LocalLog: LocalLog, +) { + await gateway.localRepository?.create(LocalLog); +} + +export async function storeRemoteLog( + gateway: SATPGateway, + key: string, + hash: string, +) { + const fnTag = `${gateway.label}#storeInDatabase()`; + + const remoteLog: RemoteLog = { + key: key, + hash: hash, + signature: "", + signerPubKey: gateway.pubKey, + }; + + remoteLog.signature = bufArray2HexStr( + sign(gateway.gatewaySigner, JSON.stringify(remoteLog)), + ); + + const response = await gateway.remoteRepository?.create(remoteLog); + + if (response.status < 200 && response.status > 299) { + throw new Error( + `${fnTag}, got response ${response.status} when logging to remote`, + ); + } +} + +export function getSatpLogKey( + sessionID: string, + type: string, + operation: string, +): string { + return `${sessionID}-${type}-${operation}`; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts new file mode 100644 index 0000000000..be34c080ca --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts @@ -0,0 +1,1507 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/common/common_messages.proto (package cacti.satp.v02.common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; + +/** + * @generated from enum cacti.satp.v02.common.STATUS + */ +export enum STATUS { + /** + * @generated from enum value: STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED = 0, + + /** + * @generated from enum value: STATUS_OK = 1; + */ + STATUS_OK = 1, + + /** + * @generated from enum value: STATUS_ERROR = 2; + */ + STATUS_ERROR = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(STATUS) +proto3.util.setEnumType(STATUS, "cacti.satp.v02.common.STATUS", [ + { no: 0, name: "STATUS_UNSPECIFIED" }, + { no: 1, name: "STATUS_OK" }, + { no: 2, name: "STATUS_ERROR" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.MessageType + */ +export enum MessageType { + /** + * @generated from enum value: MESSAGE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: MESSAGE_TYPE_INIT_PROPOSAL = 1; + */ + INIT_PROPOSAL = 1, + + /** + * @generated from enum value: MESSAGE_TYPE_INIT_RECEIPT = 2; + */ + INIT_RECEIPT = 2, + + /** + * @generated from enum value: MESSAGE_TYPE_INIT_REJECT = 3; + */ + INIT_REJECT = 3, + + /** + * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 4; + */ + TRANSFER_COMMENCE_REQUEST = 4, + + /** + * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 5; + */ + TRANSFER_COMMENCE_RESPONSE = 5, + + /** + * @generated from enum value: MESSAGE_TYPE_LOCK_ASSERT = 6; + */ + LOCK_ASSERT = 6, + + /** + * @generated from enum value: MESSAGE_TYPE_ASSERTION_RECEIPT = 7; + */ + ASSERTION_RECEIPT = 7, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_PREPARE = 8; + */ + COMMIT_PREPARE = 8, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_READY = 9; + */ + COMMIT_READY = 9, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_FINAL = 10; + */ + COMMIT_FINAL = 10, + + /** + * @generated from enum value: MESSAGE_TYPE_ACK_COMMIT_FINAL = 11; + */ + ACK_COMMIT_FINAL = 11, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 12; + */ + COMMIT_TRANSFER_COMPLETE = 12, +} +// Retrieve enum metadata with: proto3.getEnumType(MessageType) +proto3.util.setEnumType(MessageType, "cacti.satp.v02.common.MessageType", [ + { no: 0, name: "MESSAGE_TYPE_UNSPECIFIED" }, + { no: 1, name: "MESSAGE_TYPE_INIT_PROPOSAL" }, + { no: 2, name: "MESSAGE_TYPE_INIT_RECEIPT" }, + { no: 3, name: "MESSAGE_TYPE_INIT_REJECT" }, + { no: 4, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST" }, + { no: 5, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE" }, + { no: 6, name: "MESSAGE_TYPE_LOCK_ASSERT" }, + { no: 7, name: "MESSAGE_TYPE_ASSERTION_RECEIPT" }, + { no: 8, name: "MESSAGE_TYPE_COMMIT_PREPARE" }, + { no: 9, name: "MESSAGE_TYPE_COMMIT_READY" }, + { no: 10, name: "MESSAGE_TYPE_COMMIT_FINAL" }, + { no: 11, name: "MESSAGE_TYPE_ACK_COMMIT_FINAL" }, + { no: 12, name: "MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.CredentialProfile + */ +export enum CredentialProfile { + /** + * @generated from enum value: CREDENTIAL_PROFILE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CREDENTIAL_PROFILE_SAML = 1; + */ + SAML = 1, + + /** + * @generated from enum value: CREDENTIAL_PROFILE_OAUTH = 2; + */ + OAUTH = 2, + + /** + * @generated from enum value: CREDENTIAL_PROFILE_X509 = 3; + */ + X509 = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(CredentialProfile) +proto3.util.setEnumType(CredentialProfile, "cacti.satp.v02.common.CredentialProfile", [ + { no: 0, name: "CREDENTIAL_PROFILE_UNSPECIFIED" }, + { no: 1, name: "CREDENTIAL_PROFILE_SAML" }, + { no: 2, name: "CREDENTIAL_PROFILE_OAUTH" }, + { no: 3, name: "CREDENTIAL_PROFILE_X509" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.SignatureAlgorithm + */ +export enum SignatureAlgorithm { + /** + * @generated from enum value: SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_RSA = 1; + */ + RSA = 1, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_ECDSA = 2; + */ + ECDSA = 2, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_DSA = 3; + */ + DSA = 3, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_HMAC = 4; + */ + HMAC = 4, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_RSASSA_PSS = 5; + */ + RSASSA_PSS = 5, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_EDDSA = 6; + */ + EDDSA = 6, +} +// Retrieve enum metadata with: proto3.getEnumType(SignatureAlgorithm) +proto3.util.setEnumType(SignatureAlgorithm, "cacti.satp.v02.common.SignatureAlgorithm", [ + { no: 0, name: "SIGNATURE_ALGORITHM_UNSPECIFIED" }, + { no: 1, name: "SIGNATURE_ALGORITHM_RSA" }, + { no: 2, name: "SIGNATURE_ALGORITHM_ECDSA" }, + { no: 3, name: "SIGNATURE_ALGORITHM_DSA" }, + { no: 4, name: "SIGNATURE_ALGORITHM_HMAC" }, + { no: 5, name: "SIGNATURE_ALGORITHM_RSASSA_PSS" }, + { no: 6, name: "SIGNATURE_ALGORITHM_EDDSA" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.LockType + */ +export enum LockType { + /** + * @generated from enum value: LOCK_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: LOCK_TYPE_FAUCET = 1; + */ + FAUCET = 1, + + /** + * @generated from enum value: LOCK_TYPE_TIMELOCK = 2; + */ + TIMELOCK = 2, + + /** + * @generated from enum value: LOCK_TYPE_HASHLOCK = 3; + */ + HASHLOCK = 3, + + /** + * @generated from enum value: LOCK_TYPE_HASHLOCKTIME = 4; + */ + HASHLOCKTIME = 4, + + /** + * @generated from enum value: LOCK_TYPE_MULTICLAIM = 5; + */ + MULTICLAIM = 5, + + /** + * @generated from enum value: LOCK_TYPE_DESTROYBURN = 6; + */ + DESTROYBURN = 6, +} +// Retrieve enum metadata with: proto3.getEnumType(LockType) +proto3.util.setEnumType(LockType, "cacti.satp.v02.common.LockType", [ + { no: 0, name: "LOCK_TYPE_UNSPECIFIED" }, + { no: 1, name: "LOCK_TYPE_FAUCET" }, + { no: 2, name: "LOCK_TYPE_TIMELOCK" }, + { no: 3, name: "LOCK_TYPE_HASHLOCK" }, + { no: 4, name: "LOCK_TYPE_HASHLOCKTIME" }, + { no: 5, name: "LOCK_TYPE_MULTICLAIM" }, + { no: 6, name: "LOCK_TYPE_DESTROYBURN" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.Error + */ +export enum Error { + /** + * @generated from enum value: ERROR_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE = 1; + */ + BADLY_FORMATED_MESSAGE = 1, + + /** + * @generated from enum value: ERROR_INCORRECT_PARAMETER = 2; + */ + INCORRECT_PARAMETER = 2, + + /** + * @generated from enum value: ERROR_ACK_MISMATCH = 3; + */ + ACK_MISMATCH = 3, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_CLAIM = 4; + */ + BADLY_FORMATED_MESSAGE_CLAIM = 4, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5; + */ + BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6; + */ + BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7; + */ + BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7, + + /** + * @generated from enum value: ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE = 8; + */ + EXPIRED_SIGNING_KEY_CERTIFICATE = 8, + + /** + * @generated from enum value: ERROR_EXPIRED_CLAIM = 9; + */ + EXPIRED_CLAIM = 9, + + /** + * @generated from enum value: ERROR_INCORRERCT_PARAMETER = 10; + */ + INCORRERCT_PARAMETER = 10, + + /** + * @generated from enum value: ERROR_MESSAGE_OUT_OF_SEQUENCE = 11; + */ + MESSAGE_OUT_OF_SEQUENCE = 11, +} +// Retrieve enum metadata with: proto3.getEnumType(Error) +proto3.util.setEnumType(Error, "cacti.satp.v02.common.Error", [ + { no: 0, name: "ERROR_UNSPECIFIED" }, + { no: 1, name: "ERROR_BADLY_FORMATED_MESSAGE" }, + { no: 2, name: "ERROR_INCORRECT_PARAMETER" }, + { no: 3, name: "ERROR_ACK_MISMATCH" }, + { no: 4, name: "ERROR_BADLY_FORMATED_MESSAGE_CLAIM" }, + { no: 5, name: "ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE" }, + { no: 6, name: "ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID" }, + { no: 7, name: "ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES" }, + { no: 8, name: "ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE" }, + { no: 9, name: "ERROR_EXPIRED_CLAIM" }, + { no: 10, name: "ERROR_INCORRERCT_PARAMETER" }, + { no: 11, name: "ERROR_MESSAGE_OUT_OF_SEQUENCE" }, +]); + +/** + * TODO: define the common parameters to every protocol message + * + * @generated from message cacti.satp.v02.common.MessageCore + */ +export class MessageCore extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MessageCore"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MessageCore { + return new MessageCore().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MessageCore { + return new MessageCore().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MessageCore { + return new MessageCore().fromJsonString(jsonString, options); + } + + static equals(a: MessageCore | PlainMessage | undefined, b: MessageCore | PlainMessage | undefined): boolean { + return proto3.util.equals(MessageCore, a, b); + } +} + +/** + * TODO: define the common parameters to every rollback message + * + * @generated from message cacti.satp.v02.common.RollbackMessageCore + */ +export class RollbackMessageCore extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.RollbackMessageCore"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RollbackMessageCore { + return new RollbackMessageCore().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RollbackMessageCore { + return new RollbackMessageCore().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RollbackMessageCore { + return new RollbackMessageCore().fromJsonString(jsonString, options); + } + + static equals(a: RollbackMessageCore | PlainMessage | undefined, b: RollbackMessageCore | PlainMessage | undefined): boolean { + return proto3.util.equals(RollbackMessageCore, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Ack + */ +export class Ack extends Message { + /** + * @generated from field: cacti.satp.v02.common.STATUS status = 1; + */ + status = STATUS.STATUS_UNSPECIFIED; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Ack"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Ack { + return new Ack().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Ack { + return new Ack().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Ack { + return new Ack().fromJsonString(jsonString, options); + } + + static equals(a: Ack | PlainMessage | undefined, b: Ack | PlainMessage | undefined): boolean { + return proto3.util.equals(Ack, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.TransferClaims + */ +export class TransferClaims extends Message { + /** + * @generated from field: string digital_asset_id = 1; + */ + digitalAssetId = ""; + + /** + * @generated from field: string asset_profile_id = 2; + */ + assetProfileId = ""; + + /** + * @generated from field: string verified_originator_entity_id = 3; + */ + verifiedOriginatorEntityId = ""; + + /** + * @generated from field: string verified_beneficiary_entity_id = 4; + */ + verifiedBeneficiaryEntityId = ""; + + /** + * @generated from field: string originator_pubkey = 5; + */ + originatorPubkey = ""; + + /** + * @generated from field: string beneficiary_pubkey = 6; + */ + beneficiaryPubkey = ""; + + /** + * @generated from field: string sender_gateway_network_id = 7; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: string recipient_gateway_network_id = 8; + */ + recipientGatewayNetworkId = ""; + + /** + * @generated from field: string client_gateway_pubkey = 9; + */ + clientGatewayPubkey = ""; + + /** + * @generated from field: string server_gateway_pubkey = 10; + */ + serverGatewayPubkey = ""; + + /** + * @generated from field: string sender_gateway_owner_id = 11; + */ + senderGatewayOwnerId = ""; + + /** + * @generated from field: string receiver_gateway_owner_id = 12; + */ + receiverGatewayOwnerId = ""; + + /** + * @generated from field: uint32 max_retries = 13; + */ + maxRetries = 0; + + /** + * @generated from field: uint64 max_timeout = 14; + */ + maxTimeout = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.TransferClaims"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "digital_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "originator_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "max_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 14, name: "max_timeout", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaims { + return new TransferClaims().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferClaims { + return new TransferClaims().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferClaims { + return new TransferClaims().fromJsonString(jsonString, options); + } + + static equals(a: TransferClaims | PlainMessage | undefined, b: TransferClaims | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferClaims, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.TransferClaimsFormat + */ +export class TransferClaimsFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.TransferClaimsFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaimsFormat { + return new TransferClaimsFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferClaimsFormat { + return new TransferClaimsFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferClaimsFormat { + return new TransferClaimsFormat().fromJsonString(jsonString, options); + } + + static equals(a: TransferClaimsFormat | PlainMessage | undefined, b: TransferClaimsFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferClaimsFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Permissions + */ +export class Permissions extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Permissions"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Permissions { + return new Permissions().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Permissions { + return new Permissions().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Permissions { + return new Permissions().fromJsonString(jsonString, options); + } + + static equals(a: Permissions | PlainMessage | undefined, b: Permissions | PlainMessage | undefined): boolean { + return proto3.util.equals(Permissions, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.SubsequentCalls + */ +export class SubsequentCalls extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.SubsequentCalls"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SubsequentCalls { + return new SubsequentCalls().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SubsequentCalls { + return new SubsequentCalls().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SubsequentCalls { + return new SubsequentCalls().fromJsonString(jsonString, options); + } + + static equals(a: SubsequentCalls | PlainMessage | undefined, b: SubsequentCalls | PlainMessage | undefined): boolean { + return proto3.util.equals(SubsequentCalls, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.History + */ +export class History extends Message { + /** + * @generated from field: repeated cacti.satp.v02.common.Transaction transactions = 1; + */ + transactions: Transaction[] = []; + + /** + * @generated from field: repeated cacti.satp.v02.common.ActionCategory action_categories = 2; + */ + actionCategories: ActionCategory[] = []; + + /** + * @generated from field: string origin = 3; + */ + origin = ""; + + /** + * @generated from field: string destination = 4; + */ + destination = ""; + + /** + * @generated from field: string balance = 5; + */ + balance = ""; + + /** + * @generated from field: cacti.satp.v02.common.STATUS status = 6; + */ + status = STATUS.STATUS_UNSPECIFIED; + + /** + * @generated from field: cacti.satp.v02.common.ApplicationParameters application_parameters = 7; + */ + applicationParameters?: ApplicationParameters; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.History"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "transactions", kind: "message", T: Transaction, repeated: true }, + { no: 2, name: "action_categories", kind: "message", T: ActionCategory, repeated: true }, + { no: 3, name: "origin", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "destination", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "balance", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, + { no: 7, name: "application_parameters", kind: "message", T: ApplicationParameters }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): History { + return new History().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): History { + return new History().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): History { + return new History().fromJsonString(jsonString, options); + } + + static equals(a: History | PlainMessage | undefined, b: History | PlainMessage | undefined): boolean { + return proto3.util.equals(History, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.ActionCategory + */ +export class ActionCategory extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.ActionCategory"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ActionCategory { + return new ActionCategory().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ActionCategory { + return new ActionCategory().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ActionCategory { + return new ActionCategory().fromJsonString(jsonString, options); + } + + static equals(a: ActionCategory | PlainMessage | undefined, b: ActionCategory | PlainMessage | undefined): boolean { + return proto3.util.equals(ActionCategory, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Transaction + */ +export class Transaction extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Transaction"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Transaction { + return new Transaction().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Transaction { + return new Transaction().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Transaction { + return new Transaction().fromJsonString(jsonString, options); + } + + static equals(a: Transaction | PlainMessage | undefined, b: Transaction | PlainMessage | undefined): boolean { + return proto3.util.equals(Transaction, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.ApplicationParameters + */ +export class ApplicationParameters extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.ApplicationParameters"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ApplicationParameters { + return new ApplicationParameters().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ApplicationParameters { + return new ApplicationParameters().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ApplicationParameters { + return new ApplicationParameters().fromJsonString(jsonString, options); + } + + static equals(a: ApplicationParameters | PlainMessage | undefined, b: ApplicationParameters | PlainMessage | undefined): boolean { + return proto3.util.equals(ApplicationParameters, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.NetworkCapabilities + */ +export class NetworkCapabilities extends Message { + /** + * @generated from field: string sender_gateway_network_id = 1; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 2; + */ + signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; + + /** + * @generated from field: repeated cacti.satp.v02.common.SignatureAlgorithm supported_signature_algorithms = 3; + */ + supportedSignatureAlgorithms: SignatureAlgorithm[] = []; + + /** + * @generated from field: cacti.satp.v02.common.LockType lock_type = 4; + */ + lockType = LockType.UNSPECIFIED; + + /** + * @generated from field: uint64 lock_expiration_time = 5; + */ + lockExpirationTime = protoInt64.zero; + + /** + * @generated from field: cacti.satp.v02.common.Permissions permissions = 6; + */ + permissions?: Permissions; + + /** + * @generated from field: string developer_urn = 7; + */ + developerUrn = ""; + + /** + * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 8; + */ + credentialProfile = CredentialProfile.UNSPECIFIED; + + /** + * @generated from field: string application_profile = 9; + */ + applicationProfile = ""; + + /** + * @generated from field: string logging_profile = 10; + */ + loggingProfile = ""; + + /** + * @generated from field: string access_control_profile = 11; + */ + accessControlProfile = ""; + + /** + * @generated from field: cacti.satp.v02.common.SubsequentCalls subsequent_calls = 12; + */ + subsequentCalls?: SubsequentCalls; + + /** + * @generated from field: repeated cacti.satp.v02.common.History history = 13; + */ + history: History[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.NetworkCapabilities"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, + { no: 3, name: "supported_signature_algorithms", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm), repeated: true }, + { no: 4, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, + { no: 5, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 6, name: "permissions", kind: "message", T: Permissions }, + { no: 7, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, + { no: 9, name: "application_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "logging_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "access_control_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "subsequent_calls", kind: "message", T: SubsequentCalls }, + { no: 13, name: "history", kind: "message", T: History, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): NetworkCapabilities { + return new NetworkCapabilities().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): NetworkCapabilities { + return new NetworkCapabilities().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): NetworkCapabilities { + return new NetworkCapabilities().fromJsonString(jsonString, options); + } + + static equals(a: NetworkCapabilities | PlainMessage | undefined, b: NetworkCapabilities | PlainMessage | undefined): boolean { + return proto3.util.equals(NetworkCapabilities, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.CommonSatp + */ +export class CommonSatp extends Message { + /** + * @generated from field: string version = 1; + */ + version = ""; + + /** + * @generated from field: cacti.satp.v02.common.MessageType message_type = 2; + */ + messageType = MessageType.UNSPECIFIED; + + /** + * @generated from field: string session_id = 3; + */ + sessionId = ""; + + /** + * @generated from field: string transfer_context_id = 4; + */ + transferContextId = ""; + + /** + * @generated from field: uint64 sequence_number = 5; + */ + sequenceNumber = protoInt64.zero; + + /** + * @generated from field: string resource_url = 6; + */ + resourceUrl = ""; + + /** + * @generated from field: cacti.satp.v02.common.ActionResponse action_response = 8; + */ + actionResponse?: ActionResponse; + + /** + * @generated from field: string credential_block = 10; + */ + credentialBlock = ""; + + /** + * @generated from field: cacti.satp.v02.common.PayloadProfile payload_profile = 11; + */ + payloadProfile?: PayloadProfile; + + /** + * @generated from field: cacti.satp.v02.common.Payload payload = 13; + */ + payload?: Payload; + + /** + * @generated from field: string payload_hash = 14; + */ + payloadHash = ""; + + /** + * @generated from field: string signature = 15; + */ + signature = ""; + + /** + * @generated from field: string client_gateway_pubkey = 16; + */ + clientGatewayPubkey = ""; + + /** + * @generated from field: string server_gateway_pubkey = 17; + */ + serverGatewayPubkey = ""; + + /** + * @generated from field: string hash_previous_message = 18; + */ + hashPreviousMessage = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.CommonSatp"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, + { no: 3, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "sequence_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 6, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "action_response", kind: "message", T: ActionResponse }, + { no: 10, name: "credential_block", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "payload_profile", kind: "message", T: PayloadProfile }, + { no: 13, name: "payload", kind: "message", T: Payload }, + { no: 14, name: "payload_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 15, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 16, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 17, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 18, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommonSatp { + return new CommonSatp().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommonSatp { + return new CommonSatp().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommonSatp { + return new CommonSatp().fromJsonString(jsonString, options); + } + + static equals(a: CommonSatp | PlainMessage | undefined, b: CommonSatp | PlainMessage | undefined): boolean { + return proto3.util.equals(CommonSatp, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.ActionResponse + */ +export class ActionResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.ActionResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ActionResponse { + return new ActionResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ActionResponse { + return new ActionResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ActionResponse { + return new ActionResponse().fromJsonString(jsonString, options); + } + + static equals(a: ActionResponse | PlainMessage | undefined, b: ActionResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ActionResponse, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.PayloadProfile + */ +export class PayloadProfile extends Message { + /** + * @generated from field: cacti.satp.v02.common.AssetProfile asset_profile = 1; + */ + assetProfile?: AssetProfile; + + /** + * @generated from field: string capabilities = 2; + */ + capabilities = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.PayloadProfile"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "asset_profile", kind: "message", T: AssetProfile }, + { no: 2, name: "capabilities", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PayloadProfile { + return new PayloadProfile().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PayloadProfile { + return new PayloadProfile().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PayloadProfile { + return new PayloadProfile().fromJsonString(jsonString, options); + } + + static equals(a: PayloadProfile | PlainMessage | undefined, b: PayloadProfile | PlainMessage | undefined): boolean { + return proto3.util.equals(PayloadProfile, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.AssetProfile + */ +export class AssetProfile extends Message { + /** + * @generated from field: string issuer = 1; + */ + issuer = ""; + + /** + * @generated from field: string asset_code = 2; + */ + assetCode = ""; + + /** + * @generated from field: string asset_code_type = 3; + */ + assetCodeType = ""; + + /** + * @generated from field: string issuance_date = 4; + */ + issuanceDate = ""; + + /** + * @generated from field: string expiration_date = 5; + */ + expirationDate = ""; + + /** + * @generated from field: string verification_end_point = 6; + */ + verificationEndPoint = ""; + + /** + * @generated from field: string digital_signature = 7; + */ + digitalSignature = ""; + + /** + * @generated from field: string prospectus_link = 8; + */ + prospectusLink = ""; + + /** + * @generated from field: repeated string key_information_link = 9; + */ + keyInformationLink: string[] = []; + + /** + * @generated from field: repeated string keywords = 10; + */ + keywords: string[] = []; + + /** + * @generated from field: repeated string transfer_restrictions = 11; + */ + transferRestrictions: string[] = []; + + /** + * @generated from field: repeated string ledger_requirements = 12; + */ + ledgerRequirements: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.AssetProfile"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "issuer", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "asset_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "asset_code_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "issuance_date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "expiration_date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "verification_end_point", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "digital_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "prospectus_link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "key_information_link", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 10, name: "keywords", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 11, name: "transfer_restrictions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 12, name: "ledger_requirements", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AssetProfile { + return new AssetProfile().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AssetProfile { + return new AssetProfile().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AssetProfile { + return new AssetProfile().fromJsonString(jsonString, options); + } + + static equals(a: AssetProfile | PlainMessage | undefined, b: AssetProfile | PlainMessage | undefined): boolean { + return proto3.util.equals(AssetProfile, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Payload + */ +export class Payload extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Payload"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Payload { + return new Payload().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Payload { + return new Payload().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Payload { + return new Payload().fromJsonString(jsonString, options); + } + + static equals(a: Payload | PlainMessage | undefined, b: Payload | PlainMessage | undefined): boolean { + return proto3.util.equals(Payload, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.LockAssertionClaim + */ +export class LockAssertionClaim extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.LockAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: LockAssertionClaim | PlainMessage | undefined, b: LockAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.LockAssertionFormat + */ +export class LockAssertionFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.LockAssertionFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionFormat { + return new LockAssertionFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionFormat { + return new LockAssertionFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LockAssertionFormat { + return new LockAssertionFormat().fromJsonString(jsonString, options); + } + + static equals(a: LockAssertionFormat | PlainMessage | undefined, b: LockAssertionFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MintAssertionClaims + */ +export class MintAssertionClaims extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MintAssertionClaims"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaims { + return new MintAssertionClaims().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaims { + return new MintAssertionClaims().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaims { + return new MintAssertionClaims().fromJsonString(jsonString, options); + } + + static equals(a: MintAssertionClaims | PlainMessage | undefined, b: MintAssertionClaims | PlainMessage | undefined): boolean { + return proto3.util.equals(MintAssertionClaims, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MintAssertionClaimsFormat + */ +export class MintAssertionClaimsFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MintAssertionClaimsFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaimsFormat { + return new MintAssertionClaimsFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaimsFormat { + return new MintAssertionClaimsFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaimsFormat { + return new MintAssertionClaimsFormat().fromJsonString(jsonString, options); + } + + static equals(a: MintAssertionClaimsFormat | PlainMessage | undefined, b: MintAssertionClaimsFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(MintAssertionClaimsFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.BurnAssertionClaim + */ +export class BurnAssertionClaim extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: BurnAssertionClaim | PlainMessage | undefined, b: BurnAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(BurnAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.BurnAssertionClaimFormat + */ +export class BurnAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaimFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromJsonString(jsonString, options); + } + + static equals(a: BurnAssertionClaimFormat | PlainMessage | undefined, b: BurnAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(BurnAssertionClaimFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.AssignmentAssertionClaim + */ +export class AssignmentAssertionClaim extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: AssignmentAssertionClaim | PlainMessage | undefined, b: AssignmentAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(AssignmentAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.AssignmentAssertionClaimFormat + */ +export class AssignmentAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaimFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromJsonString(jsonString, options); + } + + static equals(a: AssignmentAssertionClaimFormat | PlainMessage | undefined, b: AssignmentAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(AssignmentAssertionClaimFormat, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index 38f10e65cc..9d7fd15f6d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -4,7 +4,7 @@ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; /** * @generated from enum cacti.satp.v02.common.STATUS @@ -32,6 +32,304 @@ proto3.util.setEnumType(STATUS, "cacti.satp.v02.common.STATUS", [ { no: 2, name: "STATUS_ERROR" }, ]); +/** + * @generated from enum cacti.satp.v02.common.MessageType + */ +export enum MessageType { + /** + * @generated from enum value: MESSAGE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: MESSAGE_TYPE_INIT_PROPOSAL = 1; + */ + INIT_PROPOSAL = 1, + + /** + * @generated from enum value: MESSAGE_TYPE_INIT_RECEIPT = 2; + */ + INIT_RECEIPT = 2, + + /** + * @generated from enum value: MESSAGE_TYPE_INIT_REJECT = 3; + */ + INIT_REJECT = 3, + + /** + * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 4; + */ + TRANSFER_COMMENCE_REQUEST = 4, + + /** + * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 5; + */ + TRANSFER_COMMENCE_RESPONSE = 5, + + /** + * @generated from enum value: MESSAGE_TYPE_LOCK_ASSERT = 6; + */ + LOCK_ASSERT = 6, + + /** + * @generated from enum value: MESSAGE_TYPE_ASSERTION_RECEIPT = 7; + */ + ASSERTION_RECEIPT = 7, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_PREPARE = 8; + */ + COMMIT_PREPARE = 8, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_READY = 9; + */ + COMMIT_READY = 9, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_FINAL = 10; + */ + COMMIT_FINAL = 10, + + /** + * @generated from enum value: MESSAGE_TYPE_ACK_COMMIT_FINAL = 11; + */ + ACK_COMMIT_FINAL = 11, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 12; + */ + COMMIT_TRANSFER_COMPLETE = 12, +} +// Retrieve enum metadata with: proto3.getEnumType(MessageType) +proto3.util.setEnumType(MessageType, "cacti.satp.v02.common.MessageType", [ + { no: 0, name: "MESSAGE_TYPE_UNSPECIFIED" }, + { no: 1, name: "MESSAGE_TYPE_INIT_PROPOSAL" }, + { no: 2, name: "MESSAGE_TYPE_INIT_RECEIPT" }, + { no: 3, name: "MESSAGE_TYPE_INIT_REJECT" }, + { no: 4, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST" }, + { no: 5, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE" }, + { no: 6, name: "MESSAGE_TYPE_LOCK_ASSERT" }, + { no: 7, name: "MESSAGE_TYPE_ASSERTION_RECEIPT" }, + { no: 8, name: "MESSAGE_TYPE_COMMIT_PREPARE" }, + { no: 9, name: "MESSAGE_TYPE_COMMIT_READY" }, + { no: 10, name: "MESSAGE_TYPE_COMMIT_FINAL" }, + { no: 11, name: "MESSAGE_TYPE_ACK_COMMIT_FINAL" }, + { no: 12, name: "MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.CredentialProfile + */ +export enum CredentialProfile { + /** + * @generated from enum value: CREDENTIAL_PROFILE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CREDENTIAL_PROFILE_SAML = 1; + */ + SAML = 1, + + /** + * @generated from enum value: CREDENTIAL_PROFILE_OAUTH = 2; + */ + OAUTH = 2, + + /** + * @generated from enum value: CREDENTIAL_PROFILE_X509 = 3; + */ + X509 = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(CredentialProfile) +proto3.util.setEnumType(CredentialProfile, "cacti.satp.v02.common.CredentialProfile", [ + { no: 0, name: "CREDENTIAL_PROFILE_UNSPECIFIED" }, + { no: 1, name: "CREDENTIAL_PROFILE_SAML" }, + { no: 2, name: "CREDENTIAL_PROFILE_OAUTH" }, + { no: 3, name: "CREDENTIAL_PROFILE_X509" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.SignatureAlgorithm + */ +export enum SignatureAlgorithm { + /** + * @generated from enum value: SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_RSA = 1; + */ + RSA = 1, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_ECDSA = 2; + */ + ECDSA = 2, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_DSA = 3; + */ + DSA = 3, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_HMAC = 4; + */ + HMAC = 4, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_RSASSA_PSS = 5; + */ + RSASSA_PSS = 5, + + /** + * @generated from enum value: SIGNATURE_ALGORITHM_EDDSA = 6; + */ + EDDSA = 6, +} +// Retrieve enum metadata with: proto3.getEnumType(SignatureAlgorithm) +proto3.util.setEnumType(SignatureAlgorithm, "cacti.satp.v02.common.SignatureAlgorithm", [ + { no: 0, name: "SIGNATURE_ALGORITHM_UNSPECIFIED" }, + { no: 1, name: "SIGNATURE_ALGORITHM_RSA" }, + { no: 2, name: "SIGNATURE_ALGORITHM_ECDSA" }, + { no: 3, name: "SIGNATURE_ALGORITHM_DSA" }, + { no: 4, name: "SIGNATURE_ALGORITHM_HMAC" }, + { no: 5, name: "SIGNATURE_ALGORITHM_RSASSA_PSS" }, + { no: 6, name: "SIGNATURE_ALGORITHM_EDDSA" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.LockType + */ +export enum LockType { + /** + * @generated from enum value: LOCK_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: LOCK_TYPE_FAUCET = 1; + */ + FAUCET = 1, + + /** + * @generated from enum value: LOCK_TYPE_TIMELOCK = 2; + */ + TIMELOCK = 2, + + /** + * @generated from enum value: LOCK_TYPE_HASHLOCK = 3; + */ + HASHLOCK = 3, + + /** + * @generated from enum value: LOCK_TYPE_HASHLOCKTIME = 4; + */ + HASHLOCKTIME = 4, + + /** + * @generated from enum value: LOCK_TYPE_MULTICLAIM = 5; + */ + MULTICLAIM = 5, + + /** + * @generated from enum value: LOCK_TYPE_DESTROYBURN = 6; + */ + DESTROYBURN = 6, +} +// Retrieve enum metadata with: proto3.getEnumType(LockType) +proto3.util.setEnumType(LockType, "cacti.satp.v02.common.LockType", [ + { no: 0, name: "LOCK_TYPE_UNSPECIFIED" }, + { no: 1, name: "LOCK_TYPE_FAUCET" }, + { no: 2, name: "LOCK_TYPE_TIMELOCK" }, + { no: 3, name: "LOCK_TYPE_HASHLOCK" }, + { no: 4, name: "LOCK_TYPE_HASHLOCKTIME" }, + { no: 5, name: "LOCK_TYPE_MULTICLAIM" }, + { no: 6, name: "LOCK_TYPE_DESTROYBURN" }, +]); + +/** + * @generated from enum cacti.satp.v02.common.Error + */ +export enum Error { + /** + * @generated from enum value: ERROR_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE = 1; + */ + BADLY_FORMATED_MESSAGE = 1, + + /** + * @generated from enum value: ERROR_INCORRECT_PARAMETER = 2; + */ + INCORRECT_PARAMETER = 2, + + /** + * @generated from enum value: ERROR_ACK_MISMATCH = 3; + */ + ACK_MISMATCH = 3, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_CLAIM = 4; + */ + BADLY_FORMATED_MESSAGE_CLAIM = 4, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5; + */ + BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6; + */ + BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6, + + /** + * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7; + */ + BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7, + + /** + * @generated from enum value: ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE = 8; + */ + EXPIRED_SIGNING_KEY_CERTIFICATE = 8, + + /** + * @generated from enum value: ERROR_EXPIRED_CLAIM = 9; + */ + EXPIRED_CLAIM = 9, + + /** + * @generated from enum value: ERROR_INCORRERCT_PARAMETER = 10; + */ + INCORRERCT_PARAMETER = 10, + + /** + * @generated from enum value: ERROR_MESSAGE_OUT_OF_SEQUENCE = 11; + */ + MESSAGE_OUT_OF_SEQUENCE = 11, +} +// Retrieve enum metadata with: proto3.getEnumType(Error) +proto3.util.setEnumType(Error, "cacti.satp.v02.common.Error", [ + { no: 0, name: "ERROR_UNSPECIFIED" }, + { no: 1, name: "ERROR_BADLY_FORMATED_MESSAGE" }, + { no: 2, name: "ERROR_INCORRECT_PARAMETER" }, + { no: 3, name: "ERROR_ACK_MISMATCH" }, + { no: 4, name: "ERROR_BADLY_FORMATED_MESSAGE_CLAIM" }, + { no: 5, name: "ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE" }, + { no: 6, name: "ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID" }, + { no: 7, name: "ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES" }, + { no: 8, name: "ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE" }, + { no: 9, name: "ERROR_EXPIRED_CLAIM" }, + { no: 10, name: "ERROR_INCORRERCT_PARAMETER" }, + { no: 11, name: "ERROR_MESSAGE_OUT_OF_SEQUENCE" }, +]); + /** * TODO: define the common parameters to every protocol message * @@ -147,3 +445,1063 @@ export class Ack extends Message { } } +/** + * @generated from message cacti.satp.v02.common.TransferClaims + */ +export class TransferClaims extends Message { + /** + * @generated from field: string digital_asset_id = 1; + */ + digitalAssetId = ""; + + /** + * @generated from field: string asset_profile_id = 2; + */ + assetProfileId = ""; + + /** + * @generated from field: string verified_originator_entity_id = 3; + */ + verifiedOriginatorEntityId = ""; + + /** + * @generated from field: string verified_beneficiary_entity_id = 4; + */ + verifiedBeneficiaryEntityId = ""; + + /** + * @generated from field: string originator_pubkey = 5; + */ + originatorPubkey = ""; + + /** + * @generated from field: string beneficiary_pubkey = 6; + */ + beneficiaryPubkey = ""; + + /** + * @generated from field: string sender_gateway_network_id = 7; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: string recipient_gateway_network_id = 8; + */ + recipientGatewayNetworkId = ""; + + /** + * @generated from field: string client_gateway_pubkey = 9; + */ + clientGatewayPubkey = ""; + + /** + * @generated from field: string server_gateway_pubkey = 10; + */ + serverGatewayPubkey = ""; + + /** + * @generated from field: string sender_gateway_owner_id = 11; + */ + senderGatewayOwnerId = ""; + + /** + * @generated from field: string receiver_gateway_owner_id = 12; + */ + receiverGatewayOwnerId = ""; + + /** + * @generated from field: uint32 max_retries = 13; + */ + maxRetries = 0; + + /** + * @generated from field: uint64 max_timeout = 14; + */ + maxTimeout = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.TransferClaims"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "digital_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "originator_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "max_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 14, name: "max_timeout", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaims { + return new TransferClaims().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferClaims { + return new TransferClaims().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferClaims { + return new TransferClaims().fromJsonString(jsonString, options); + } + + static equals(a: TransferClaims | PlainMessage | undefined, b: TransferClaims | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferClaims, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.TransferClaimsFormat + */ +export class TransferClaimsFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.TransferClaimsFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaimsFormat { + return new TransferClaimsFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferClaimsFormat { + return new TransferClaimsFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferClaimsFormat { + return new TransferClaimsFormat().fromJsonString(jsonString, options); + } + + static equals(a: TransferClaimsFormat | PlainMessage | undefined, b: TransferClaimsFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferClaimsFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Permissions + */ +export class Permissions extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Permissions"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Permissions { + return new Permissions().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Permissions { + return new Permissions().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Permissions { + return new Permissions().fromJsonString(jsonString, options); + } + + static equals(a: Permissions | PlainMessage | undefined, b: Permissions | PlainMessage | undefined): boolean { + return proto3.util.equals(Permissions, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.SubsequentCalls + */ +export class SubsequentCalls extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.SubsequentCalls"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SubsequentCalls { + return new SubsequentCalls().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SubsequentCalls { + return new SubsequentCalls().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SubsequentCalls { + return new SubsequentCalls().fromJsonString(jsonString, options); + } + + static equals(a: SubsequentCalls | PlainMessage | undefined, b: SubsequentCalls | PlainMessage | undefined): boolean { + return proto3.util.equals(SubsequentCalls, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.History + */ +export class History extends Message { + /** + * @generated from field: repeated cacti.satp.v02.common.Transaction transactions = 1; + */ + transactions: Transaction[] = []; + + /** + * @generated from field: repeated cacti.satp.v02.common.ActionCategory action_categories = 2; + */ + actionCategories: ActionCategory[] = []; + + /** + * @generated from field: string origin = 3; + */ + origin = ""; + + /** + * @generated from field: string destination = 4; + */ + destination = ""; + + /** + * @generated from field: string balance = 5; + */ + balance = ""; + + /** + * @generated from field: cacti.satp.v02.common.STATUS status = 6; + */ + status = STATUS.STATUS_UNSPECIFIED; + + /** + * @generated from field: cacti.satp.v02.common.ApplicationParameters application_parameters = 7; + */ + applicationParameters?: ApplicationParameters; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.History"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "transactions", kind: "message", T: Transaction, repeated: true }, + { no: 2, name: "action_categories", kind: "message", T: ActionCategory, repeated: true }, + { no: 3, name: "origin", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "destination", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "balance", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, + { no: 7, name: "application_parameters", kind: "message", T: ApplicationParameters }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): History { + return new History().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): History { + return new History().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): History { + return new History().fromJsonString(jsonString, options); + } + + static equals(a: History | PlainMessage | undefined, b: History | PlainMessage | undefined): boolean { + return proto3.util.equals(History, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.ActionCategory + */ +export class ActionCategory extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.ActionCategory"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ActionCategory { + return new ActionCategory().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ActionCategory { + return new ActionCategory().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ActionCategory { + return new ActionCategory().fromJsonString(jsonString, options); + } + + static equals(a: ActionCategory | PlainMessage | undefined, b: ActionCategory | PlainMessage | undefined): boolean { + return proto3.util.equals(ActionCategory, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Transaction + */ +export class Transaction extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Transaction"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Transaction { + return new Transaction().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Transaction { + return new Transaction().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Transaction { + return new Transaction().fromJsonString(jsonString, options); + } + + static equals(a: Transaction | PlainMessage | undefined, b: Transaction | PlainMessage | undefined): boolean { + return proto3.util.equals(Transaction, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.ApplicationParameters + */ +export class ApplicationParameters extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.ApplicationParameters"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ApplicationParameters { + return new ApplicationParameters().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ApplicationParameters { + return new ApplicationParameters().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ApplicationParameters { + return new ApplicationParameters().fromJsonString(jsonString, options); + } + + static equals(a: ApplicationParameters | PlainMessage | undefined, b: ApplicationParameters | PlainMessage | undefined): boolean { + return proto3.util.equals(ApplicationParameters, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.NetworkCapabilities + */ +export class NetworkCapabilities extends Message { + /** + * @generated from field: string sender_gateway_network_id = 1; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 2; + */ + signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; + + /** + * @generated from field: repeated cacti.satp.v02.common.SignatureAlgorithm supported_signature_algorithms = 3; + */ + supportedSignatureAlgorithms: SignatureAlgorithm[] = []; + + /** + * @generated from field: cacti.satp.v02.common.LockType lock_type = 4; + */ + lockType = LockType.UNSPECIFIED; + + /** + * @generated from field: uint64 lock_expiration_time = 5; + */ + lockExpirationTime = protoInt64.zero; + + /** + * @generated from field: cacti.satp.v02.common.Permissions permissions = 6; + */ + permissions?: Permissions; + + /** + * @generated from field: string developer_urn = 7; + */ + developerUrn = ""; + + /** + * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 8; + */ + credentialProfile = CredentialProfile.UNSPECIFIED; + + /** + * @generated from field: string application_profile = 9; + */ + applicationProfile = ""; + + /** + * @generated from field: string logging_profile = 10; + */ + loggingProfile = ""; + + /** + * @generated from field: string access_control_profile = 11; + */ + accessControlProfile = ""; + + /** + * @generated from field: cacti.satp.v02.common.SubsequentCalls subsequent_calls = 12; + */ + subsequentCalls?: SubsequentCalls; + + /** + * @generated from field: repeated cacti.satp.v02.common.History history = 13; + */ + history: History[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.NetworkCapabilities"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, + { no: 3, name: "supported_signature_algorithms", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm), repeated: true }, + { no: 4, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, + { no: 5, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 6, name: "permissions", kind: "message", T: Permissions }, + { no: 7, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, + { no: 9, name: "application_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "logging_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "access_control_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "subsequent_calls", kind: "message", T: SubsequentCalls }, + { no: 13, name: "history", kind: "message", T: History, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): NetworkCapabilities { + return new NetworkCapabilities().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): NetworkCapabilities { + return new NetworkCapabilities().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): NetworkCapabilities { + return new NetworkCapabilities().fromJsonString(jsonString, options); + } + + static equals(a: NetworkCapabilities | PlainMessage | undefined, b: NetworkCapabilities | PlainMessage | undefined): boolean { + return proto3.util.equals(NetworkCapabilities, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.CommonSatp + */ +export class CommonSatp extends Message { + /** + * @generated from field: string version = 1; + */ + version = ""; + + /** + * @generated from field: cacti.satp.v02.common.MessageType message_type = 2; + */ + messageType = MessageType.UNSPECIFIED; + + /** + * @generated from field: string session_id = 3; + */ + sessionId = ""; + + /** + * @generated from field: string transfer_context_id = 4; + */ + transferContextId = ""; + + /** + * @generated from field: uint64 sequence_number = 5; + */ + sequenceNumber = protoInt64.zero; + + /** + * @generated from field: string resource_url = 6; + */ + resourceUrl = ""; + + /** + * @generated from field: cacti.satp.v02.common.ActionResponse action_response = 8; + */ + actionResponse?: ActionResponse; + + /** + * @generated from field: string credential_block = 10; + */ + credentialBlock = ""; + + /** + * @generated from field: cacti.satp.v02.common.PayloadProfile payload_profile = 11; + */ + payloadProfile?: PayloadProfile; + + /** + * @generated from field: cacti.satp.v02.common.Payload payload = 13; + */ + payload?: Payload; + + /** + * @generated from field: string payload_hash = 14; + */ + payloadHash = ""; + + /** + * @generated from field: string signature = 15; + */ + signature = ""; + + /** + * @generated from field: string client_gateway_pubkey = 16; + */ + clientGatewayPubkey = ""; + + /** + * @generated from field: string server_gateway_pubkey = 17; + */ + serverGatewayPubkey = ""; + + /** + * @generated from field: string hash_previous_message = 18; + */ + hashPreviousMessage = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.CommonSatp"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, + { no: 3, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "sequence_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 6, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "action_response", kind: "message", T: ActionResponse }, + { no: 10, name: "credential_block", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "payload_profile", kind: "message", T: PayloadProfile }, + { no: 13, name: "payload", kind: "message", T: Payload }, + { no: 14, name: "payload_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 15, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 16, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 17, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 18, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommonSatp { + return new CommonSatp().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommonSatp { + return new CommonSatp().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommonSatp { + return new CommonSatp().fromJsonString(jsonString, options); + } + + static equals(a: CommonSatp | PlainMessage | undefined, b: CommonSatp | PlainMessage | undefined): boolean { + return proto3.util.equals(CommonSatp, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.ActionResponse + */ +export class ActionResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.ActionResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ActionResponse { + return new ActionResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ActionResponse { + return new ActionResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ActionResponse { + return new ActionResponse().fromJsonString(jsonString, options); + } + + static equals(a: ActionResponse | PlainMessage | undefined, b: ActionResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ActionResponse, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.PayloadProfile + */ +export class PayloadProfile extends Message { + /** + * @generated from field: cacti.satp.v02.common.AssetProfile asset_profile = 1; + */ + assetProfile?: AssetProfile; + + /** + * @generated from field: string capabilities = 2; + */ + capabilities = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.PayloadProfile"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "asset_profile", kind: "message", T: AssetProfile }, + { no: 2, name: "capabilities", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PayloadProfile { + return new PayloadProfile().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PayloadProfile { + return new PayloadProfile().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PayloadProfile { + return new PayloadProfile().fromJsonString(jsonString, options); + } + + static equals(a: PayloadProfile | PlainMessage | undefined, b: PayloadProfile | PlainMessage | undefined): boolean { + return proto3.util.equals(PayloadProfile, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.AssetProfile + */ +export class AssetProfile extends Message { + /** + * @generated from field: string issuer = 1; + */ + issuer = ""; + + /** + * @generated from field: string asset_code = 2; + */ + assetCode = ""; + + /** + * @generated from field: string asset_code_type = 3; + */ + assetCodeType = ""; + + /** + * @generated from field: string issuance_date = 4; + */ + issuanceDate = ""; + + /** + * @generated from field: string expiration_date = 5; + */ + expirationDate = ""; + + /** + * @generated from field: string verification_end_point = 6; + */ + verificationEndPoint = ""; + + /** + * @generated from field: string digital_signature = 7; + */ + digitalSignature = ""; + + /** + * @generated from field: string prospectus_link = 8; + */ + prospectusLink = ""; + + /** + * @generated from field: repeated string key_information_link = 9; + */ + keyInformationLink: string[] = []; + + /** + * @generated from field: repeated string keywords = 10; + */ + keywords: string[] = []; + + /** + * @generated from field: repeated string transfer_restrictions = 11; + */ + transferRestrictions: string[] = []; + + /** + * @generated from field: repeated string ledger_requirements = 12; + */ + ledgerRequirements: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.AssetProfile"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "issuer", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "asset_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "asset_code_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "issuance_date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "expiration_date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "verification_end_point", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "digital_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "prospectus_link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "key_information_link", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 10, name: "keywords", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 11, name: "transfer_restrictions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 12, name: "ledger_requirements", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AssetProfile { + return new AssetProfile().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AssetProfile { + return new AssetProfile().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AssetProfile { + return new AssetProfile().fromJsonString(jsonString, options); + } + + static equals(a: AssetProfile | PlainMessage | undefined, b: AssetProfile | PlainMessage | undefined): boolean { + return proto3.util.equals(AssetProfile, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Payload + */ +export class Payload extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Payload"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Payload { + return new Payload().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Payload { + return new Payload().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Payload { + return new Payload().fromJsonString(jsonString, options); + } + + static equals(a: Payload | PlainMessage | undefined, b: Payload | PlainMessage | undefined): boolean { + return proto3.util.equals(Payload, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.LockAssertionClaim + */ +export class LockAssertionClaim extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.LockAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: LockAssertionClaim | PlainMessage | undefined, b: LockAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.LockAssertionFormat + */ +export class LockAssertionFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.LockAssertionFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionFormat { + return new LockAssertionFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionFormat { + return new LockAssertionFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LockAssertionFormat { + return new LockAssertionFormat().fromJsonString(jsonString, options); + } + + static equals(a: LockAssertionFormat | PlainMessage | undefined, b: LockAssertionFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MintAssertionClaims + */ +export class MintAssertionClaims extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MintAssertionClaims"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaims { + return new MintAssertionClaims().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaims { + return new MintAssertionClaims().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaims { + return new MintAssertionClaims().fromJsonString(jsonString, options); + } + + static equals(a: MintAssertionClaims | PlainMessage | undefined, b: MintAssertionClaims | PlainMessage | undefined): boolean { + return proto3.util.equals(MintAssertionClaims, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MintAssertionClaimsFormat + */ +export class MintAssertionClaimsFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MintAssertionClaimsFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaimsFormat { + return new MintAssertionClaimsFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaimsFormat { + return new MintAssertionClaimsFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaimsFormat { + return new MintAssertionClaimsFormat().fromJsonString(jsonString, options); + } + + static equals(a: MintAssertionClaimsFormat | PlainMessage | undefined, b: MintAssertionClaimsFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(MintAssertionClaimsFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.BurnAssertionClaim + */ +export class BurnAssertionClaim extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: BurnAssertionClaim | PlainMessage | undefined, b: BurnAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(BurnAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.BurnAssertionClaimFormat + */ +export class BurnAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaimFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromJsonString(jsonString, options); + } + + static equals(a: BurnAssertionClaimFormat | PlainMessage | undefined, b: BurnAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(BurnAssertionClaimFormat, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.AssignmentAssertionClaim + */ +export class AssignmentAssertionClaim extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: AssignmentAssertionClaim | PlainMessage | undefined, b: AssignmentAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(AssignmentAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.AssignmentAssertionClaimFormat + */ +export class AssignmentAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaimFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromJsonString(jsonString, options); + } + + static equals(a: AssignmentAssertionClaimFormat | PlainMessage | undefined, b: AssignmentAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(AssignmentAssertionClaimFormat, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 7fa4974994..7d1077b54d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -4,7 +4,999 @@ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, LockAssertionClaim, LockAssertionFormat, LockType, MintAssertionClaims, MintAssertionClaimsFormat, PayloadProfile, Permissions, SignatureAlgorithm } from "./message_pb.js"; + +/** + * @generated from message cacti.satp.v02.common.SessionData + */ +export class SessionData extends Message { + /** + * @generated from field: string id = 1; + */ + id = ""; + + /** + * @generated from field: string version = 2; + */ + version = ""; + + /** + * @generated from field: string transfer_context_id = 3; + */ + transferContextId = ""; + + /** + * @generated from field: cacti.satp.v02.common.MessageStagesHashes hashes = 4; + */ + hashes?: MessageStagesHashes; + + /** + * @generated from field: cacti.satp.v02.common.PayloadProfile payload_profile = 5; + */ + payloadProfile?: PayloadProfile; + + /** + * @generated from field: cacti.satp.v02.common.MessageStagesSignatures signatures = 6; + */ + signatures?: MessageStagesSignatures; + + /** + * @generated from field: string max_retries = 7; + */ + maxRetries = ""; + + /** + * @generated from field: string max_timeout = 8; + */ + maxTimeout = ""; + + /** + * @generated from field: string logging_profile = 9; + */ + loggingProfile = ""; + + /** + * @generated from field: string recipient_base_path = 10; + */ + recipientBasePath = ""; + + /** + * @generated from field: string source_base_path = 11; + */ + sourceBasePath = ""; + + /** + * @generated from field: string access_control_profile = 12; + */ + accessControlProfile = ""; + + /** + * @generated from field: string application_profile = 13; + */ + applicationProfile = ""; + + /** + * @generated from field: int64 last_sequence_number = 14; + */ + lastSequenceNumber = protoInt64.zero; + + /** + * @generated from field: string sender_gateway_network_id = 15; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: string recipient_gateway_network_id = 16; + */ + recipientGatewayNetworkId = ""; + + /** + * @generated from field: string source_ledger_asset_id = 17; + */ + sourceLedgerAssetId = ""; + + /** + * @generated from field: string recipient_ledger_asset_id = 18; + */ + recipientLedgerAssetId = ""; + + /** + * @generated from field: string server_gateway_pubkey = 19; + */ + serverGatewayPubkey = ""; + + /** + * @generated from field: string client_gateway_pubkey = 20; + */ + clientGatewayPubkey = ""; + + /** + * @generated from field: string verified_originator_entity_id = 21; + */ + verifiedOriginatorEntityId = ""; + + /** + * @generated from field: string verified_beneficiary_entity_id = 22; + */ + verifiedBeneficiaryEntityId = ""; + + /** + * @generated from field: string asset_profile_id = 23; + */ + assetProfileId = ""; + + /** + * @generated from field: string digital_asset_id = 24; + */ + digitalAssetId = ""; + + /** + * @generated from field: string originator_pubkey = 25; + */ + originatorPubkey = ""; + + /** + * @generated from field: string beneficiary_pubkey = 26; + */ + beneficiaryPubkey = ""; + + /** + * @generated from field: string sender_gateway_owner_id = 27; + */ + senderGatewayOwnerId = ""; + + /** + * @generated from field: string receiver_gateway_owner_id = 28; + */ + receiverGatewayOwnerId = ""; + + /** + * @generated from field: string hash_transfer_init_claims = 29; + */ + hashTransferInitClaims = ""; + + /** + * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 30; + */ + signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; + + /** + * @generated from field: cacti.satp.v02.common.LockType lock_type = 31; + */ + lockType = LockType.UNSPECIFIED; + + /** + * @generated from field: uint64 lock_expiration_time = 32; + */ + lockExpirationTime = protoInt64.zero; + + /** + * @generated from field: cacti.satp.v02.common.Permissions permitions = 33; + */ + permitions?: Permissions; + + /** + * @generated from field: string developer_urn = 34; + */ + developerUrn = ""; + + /** + * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 35; + */ + credentialProfile = CredentialProfile.UNSPECIFIED; + + /** + * @generated from field: string subsequent_calls = 36; + */ + subsequentCalls = ""; + + /** + * @generated from field: string history = 37; + */ + history = ""; + + /** + * @generated from field: bool multiple_claims_allowed = 38; + */ + multipleClaimsAllowed = false; + + /** + * @generated from field: bool multiple_cancels_allowed = 39; + */ + multipleCancelsAllowed = false; + + /** + * @generated from field: string last_message_received_timestamp = 40; + */ + lastMessageReceivedTimestamp = ""; + + /** + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps processed_timestamps = 41; + */ + processedTimestamps?: MessageStagesTimestamps; + + /** + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps received_timestamps = 42; + */ + receivedTimestamps?: MessageStagesTimestamps; + + /** + * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 43; + */ + lockAssertionClaim?: LockAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 44; + */ + lockAssertionFormat?: LockAssertionFormat; + + /** + * @generated from field: cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 45; + */ + mintAssertionClaims?: MintAssertionClaims; + + /** + * @generated from field: cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 46; + */ + mintAssertionClaimsFormat?: MintAssertionClaimsFormat; + + /** + * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 47; + */ + burnAssertionClaim?: BurnAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 48; + */ + burnAssertionClaimFormat?: BurnAssertionClaimFormat; + + /** + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 49; + */ + assignmentAssertionClaim?: AssignmentAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 50; + */ + assignmentAssertionClaimFormat?: AssignmentAssertionClaimFormat; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.SessionData"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "hashes", kind: "message", T: MessageStagesHashes }, + { no: 5, name: "payload_profile", kind: "message", T: PayloadProfile }, + { no: 6, name: "signatures", kind: "message", T: MessageStagesSignatures }, + { no: 7, name: "max_retries", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "max_timeout", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "logging_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "recipient_base_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "source_base_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "access_control_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "application_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 14, name: "last_sequence_number", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 15, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 16, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 17, name: "source_ledger_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 18, name: "recipient_ledger_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 19, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 20, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 21, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 22, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 23, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 24, name: "digital_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 25, name: "originator_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 26, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 27, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 28, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 29, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 30, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, + { no: 31, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, + { no: 32, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 33, name: "permitions", kind: "message", T: Permissions }, + { no: 34, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 35, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, + { no: 36, name: "subsequent_calls", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 37, name: "history", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 38, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 39, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 40, name: "last_message_received_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 41, name: "processed_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 42, name: "received_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 43, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, + { no: 44, name: "lock_assertion_format", kind: "message", T: LockAssertionFormat }, + { no: 45, name: "mint_assertion_claims", kind: "message", T: MintAssertionClaims }, + { no: 46, name: "mint_assertion_claims_format", kind: "message", T: MintAssertionClaimsFormat }, + { no: 47, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, + { no: 48, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, + { no: 49, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, + { no: 50, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { + return new SessionData().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SessionData { + return new SessionData().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SessionData { + return new SessionData().fromJsonString(jsonString, options); + } + + static equals(a: SessionData | PlainMessage | undefined, b: SessionData | PlainMessage | undefined): boolean { + return proto3.util.equals(SessionData, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MessageStagesHashes + */ +export class MessageStagesHashes extends Message { + /** + * @generated from field: cacti.satp.v02.common.Stage1Hashes stage1 = 1; + */ + stage1?: Stage1Hashes; + + /** + * @generated from field: cacti.satp.v02.common.Stage2Hashes stage2 = 2; + */ + stage2?: Stage2Hashes; + + /** + * @generated from field: cacti.satp.v02.common.Stage3Hashes stage3 = 3; + */ + stage3?: Stage3Hashes; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MessageStagesHashes"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "stage1", kind: "message", T: Stage1Hashes }, + { no: 2, name: "stage2", kind: "message", T: Stage2Hashes }, + { no: 3, name: "stage3", kind: "message", T: Stage3Hashes }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesHashes { + return new MessageStagesHashes().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MessageStagesHashes { + return new MessageStagesHashes().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MessageStagesHashes { + return new MessageStagesHashes().fromJsonString(jsonString, options); + } + + static equals(a: MessageStagesHashes | PlainMessage | undefined, b: MessageStagesHashes | PlainMessage | undefined): boolean { + return proto3.util.equals(MessageStagesHashes, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage1Hashes + */ +export class Stage1Hashes extends Message { + /** + * @generated from field: string transfer_proposal_request_message_hash = 1; + */ + transferProposalRequestMessageHash = ""; + + /** + * @generated from field: string transfer_proposal_receipt_message_hash = 2; + */ + transferProposalReceiptMessageHash = ""; + + /** + * @generated from field: string transfer_proposal_reject_message_hash = 3; + */ + transferProposalRejectMessageHash = ""; + + /** + * @generated from field: string transfer_commence_request_message_hash = 4; + */ + transferCommenceRequestMessageHash = ""; + + /** + * @generated from field: string transfer_commence_response_message_hash = 5; + */ + transferCommenceResponseMessageHash = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage1Hashes"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "transfer_proposal_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "transfer_proposal_receipt_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_proposal_reject_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_commence_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_commence_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage1Hashes { + return new Stage1Hashes().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage1Hashes { + return new Stage1Hashes().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage1Hashes { + return new Stage1Hashes().fromJsonString(jsonString, options); + } + + static equals(a: Stage1Hashes | PlainMessage | undefined, b: Stage1Hashes | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage1Hashes, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage2Hashes + */ +export class Stage2Hashes extends Message { + /** + * @generated from field: string lock_assertion_request_message_hash = 1; + */ + lockAssertionRequestMessageHash = ""; + + /** + * @generated from field: string lock_assertion_receipt_message_hash = 2; + */ + lockAssertionReceiptMessageHash = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage2Hashes"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "lock_assertion_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "lock_assertion_receipt_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage2Hashes { + return new Stage2Hashes().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage2Hashes { + return new Stage2Hashes().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage2Hashes { + return new Stage2Hashes().fromJsonString(jsonString, options); + } + + static equals(a: Stage2Hashes | PlainMessage | undefined, b: Stage2Hashes | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage2Hashes, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage3Hashes + */ +export class Stage3Hashes extends Message { + /** + * @generated from field: string commit_preparation_request_message_hash = 1; + */ + commitPreparationRequestMessageHash = ""; + + /** + * @generated from field: string commit_ready_response_message_hash = 2; + */ + commitReadyResponseMessageHash = ""; + + /** + * @generated from field: string commit_final_assertion_request_message_hash = 3; + */ + commitFinalAssertionRequestMessageHash = ""; + + /** + * @generated from field: string commit_final_acknowledgement_receipt_response_message_hash = 4; + */ + commitFinalAcknowledgementReceiptResponseMessageHash = ""; + + /** + * @generated from field: string transfer_complete_request_message_hash = 5; + */ + transferCompleteRequestMessageHash = ""; + + /** + * @generated from field: string transfer_complete_response_message_hash = 6; + */ + transferCompleteResponseMessageHash = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage3Hashes"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "commit_preparation_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "commit_ready_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "commit_final_assertion_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "commit_final_acknowledgement_receipt_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "transfer_complete_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Hashes { + return new Stage3Hashes().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage3Hashes { + return new Stage3Hashes().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage3Hashes { + return new Stage3Hashes().fromJsonString(jsonString, options); + } + + static equals(a: Stage3Hashes | PlainMessage | undefined, b: Stage3Hashes | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage3Hashes, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MessageStagesSignatures + */ +export class MessageStagesSignatures extends Message { + /** + * @generated from field: cacti.satp.v02.common.Stage1Signatures stage1 = 1; + */ + stage1?: Stage1Signatures; + + /** + * @generated from field: cacti.satp.v02.common.Stage2Signatures stage2 = 2; + */ + stage2?: Stage2Signatures; + + /** + * @generated from field: cacti.satp.v02.common.Stage3Signatures stage3 = 3; + */ + stage3?: Stage3Signatures; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MessageStagesSignatures"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "stage1", kind: "message", T: Stage1Signatures }, + { no: 2, name: "stage2", kind: "message", T: Stage2Signatures }, + { no: 3, name: "stage3", kind: "message", T: Stage3Signatures }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesSignatures { + return new MessageStagesSignatures().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MessageStagesSignatures { + return new MessageStagesSignatures().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MessageStagesSignatures { + return new MessageStagesSignatures().fromJsonString(jsonString, options); + } + + static equals(a: MessageStagesSignatures | PlainMessage | undefined, b: MessageStagesSignatures | PlainMessage | undefined): boolean { + return proto3.util.equals(MessageStagesSignatures, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage1Signatures + */ +export class Stage1Signatures extends Message { + /** + * @generated from field: string transfer_proposal_request_message_client_signature = 1; + */ + transferProposalRequestMessageClientSignature = ""; + + /** + * @generated from field: string transfer_proposal_receipt_message_server_signature = 2; + */ + transferProposalReceiptMessageServerSignature = ""; + + /** + * @generated from field: string transfer_proposal_reject_message_server_signature = 3; + */ + transferProposalRejectMessageServerSignature = ""; + + /** + * @generated from field: string transfer_commence_request_message_client_signature = 4; + */ + transferCommenceRequestMessageClientSignature = ""; + + /** + * @generated from field: string transfer_commence_response_message_server_signature = 5; + */ + transferCommenceResponseMessageServerSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage1Signatures"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "transfer_proposal_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "transfer_proposal_receipt_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_proposal_reject_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_commence_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_commence_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage1Signatures { + return new Stage1Signatures().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage1Signatures { + return new Stage1Signatures().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage1Signatures { + return new Stage1Signatures().fromJsonString(jsonString, options); + } + + static equals(a: Stage1Signatures | PlainMessage | undefined, b: Stage1Signatures | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage1Signatures, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage2Signatures + */ +export class Stage2Signatures extends Message { + /** + * @generated from field: string lock_assertion_request_message_client_signature = 1; + */ + lockAssertionRequestMessageClientSignature = ""; + + /** + * @generated from field: string lock_assertion_receipt_message_server_signature = 2; + */ + lockAssertionReceiptMessageServerSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage2Signatures"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "lock_assertion_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "lock_assertion_receipt_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage2Signatures { + return new Stage2Signatures().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage2Signatures { + return new Stage2Signatures().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage2Signatures { + return new Stage2Signatures().fromJsonString(jsonString, options); + } + + static equals(a: Stage2Signatures | PlainMessage | undefined, b: Stage2Signatures | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage2Signatures, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage3Signatures + */ +export class Stage3Signatures extends Message { + /** + * @generated from field: string commit_preparation_request_message_client_signature = 1; + */ + commitPreparationRequestMessageClientSignature = ""; + + /** + * @generated from field: string commit_ready_response_message_server_signature = 2; + */ + commitReadyResponseMessageServerSignature = ""; + + /** + * @generated from field: string commit_final_assertion_request_message_client_signature = 3; + */ + commitFinalAssertionRequestMessageClientSignature = ""; + + /** + * @generated from field: string commit_final_acknowledgement_receipt_response_message_server_signature = 4; + */ + commitFinalAcknowledgementReceiptResponseMessageServerSignature = ""; + + /** + * @generated from field: string transfer_complete_request_message_client_signature = 5; + */ + transferCompleteRequestMessageClientSignature = ""; + + /** + * @generated from field: string transfer_complete_response_message_server_signature = 6; + */ + transferCompleteResponseMessageServerSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage3Signatures"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "commit_preparation_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "commit_ready_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "commit_final_assertion_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "commit_final_acknowledgement_receipt_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "transfer_complete_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Signatures { + return new Stage3Signatures().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage3Signatures { + return new Stage3Signatures().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage3Signatures { + return new Stage3Signatures().fromJsonString(jsonString, options); + } + + static equals(a: Stage3Signatures | PlainMessage | undefined, b: Stage3Signatures | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage3Signatures, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.MessageStagesTimestamps + */ +export class MessageStagesTimestamps extends Message { + /** + * @generated from field: cacti.satp.v02.common.Stage1Timestamps stage1 = 1; + */ + stage1?: Stage1Timestamps; + + /** + * @generated from field: cacti.satp.v02.common.Stage2Timestamps stage2 = 2; + */ + stage2?: Stage2Timestamps; + + /** + * @generated from field: cacti.satp.v02.common.Stage3Timestamps stage3 = 3; + */ + stage3?: Stage3Timestamps; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.MessageStagesTimestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "stage1", kind: "message", T: Stage1Timestamps }, + { no: 2, name: "stage2", kind: "message", T: Stage2Timestamps }, + { no: 3, name: "stage3", kind: "message", T: Stage3Timestamps }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesTimestamps { + return new MessageStagesTimestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MessageStagesTimestamps { + return new MessageStagesTimestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MessageStagesTimestamps { + return new MessageStagesTimestamps().fromJsonString(jsonString, options); + } + + static equals(a: MessageStagesTimestamps | PlainMessage | undefined, b: MessageStagesTimestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(MessageStagesTimestamps, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage1Timestamps + */ +export class Stage1Timestamps extends Message { + /** + * @generated from field: string transfer_proposal_request_message_timestamp = 1; + */ + transferProposalRequestMessageTimestamp = ""; + + /** + * @generated from field: string transfer_proposal_receipt_message_timestamp = 2; + */ + transferProposalReceiptMessageTimestamp = ""; + + /** + * @generated from field: string transfer_proposal_reject_message_timestamp = 3; + */ + transferProposalRejectMessageTimestamp = ""; + + /** + * @generated from field: string transfer_commence_request_message_timestamp = 4; + */ + transferCommenceRequestMessageTimestamp = ""; + + /** + * @generated from field: string transfer_commence_response_message_timestamp = 5; + */ + transferCommenceResponseMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage1Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "transfer_proposal_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "transfer_proposal_receipt_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_proposal_reject_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_commence_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_commence_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage1Timestamps { + return new Stage1Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage1Timestamps { + return new Stage1Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage1Timestamps { + return new Stage1Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage1Timestamps | PlainMessage | undefined, b: Stage1Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage1Timestamps, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage2Timestamps + */ +export class Stage2Timestamps extends Message { + /** + * @generated from field: string lock_assertion_request_message_timestamp = 1; + */ + lockAssertionRequestMessageTimestamp = ""; + + /** + * @generated from field: string lock_assertion_receipt_message_timestamp = 2; + */ + lockAssertionReceiptMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage2Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "lock_assertion_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "lock_assertion_receipt_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage2Timestamps { + return new Stage2Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage2Timestamps { + return new Stage2Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage2Timestamps { + return new Stage2Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage2Timestamps | PlainMessage | undefined, b: Stage2Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage2Timestamps, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Stage3Timestamps + */ +export class Stage3Timestamps extends Message { + /** + * @generated from field: string commit_preparation_request_message_timestamp = 1; + */ + commitPreparationRequestMessageTimestamp = ""; + + /** + * @generated from field: string commit_ready_response_message_timestamp = 2; + */ + commitReadyResponseMessageTimestamp = ""; + + /** + * @generated from field: string commit_final_assertion_request_message_timestamp = 3; + */ + commitFinalAssertionRequestMessageTimestamp = ""; + + /** + * @generated from field: string commit_final_acknoledgement_receipt_response_message_timestamp = 4; + */ + commitFinalAcknoledgementReceiptResponseMessageTimestamp = ""; + + /** + * @generated from field: string transfer_complete_request_message_timestamp = 5; + */ + transferCompleteRequestMessageTimestamp = ""; + + /** + * @generated from field: string transfer_complete_response_message_timestamp = 6; + */ + transferCompleteResponseMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage3Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "commit_preparation_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "commit_ready_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "commit_final_assertion_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "commit_final_acknoledgement_receipt_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "transfer_complete_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Timestamps { + return new Stage3Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage3Timestamps { + return new Stage3Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage3Timestamps { + return new Stage3Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage3Timestamps | PlainMessage | undefined, b: Stage3Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage3Timestamps, a, b); + } +} /** * @generated from message cacti.satp.v02.common.SendStatusRequest @@ -16,7 +1008,7 @@ export class SendStatusRequest extends Message { status = ""; /** - * @generated from field: bool hasBackup = 2; + * @generated from field: bool has_backup = 2; */ hasBackup = false; @@ -29,7 +1021,7 @@ export class SendStatusRequest extends Message { static readonly typeName = "cacti.satp.v02.common.SendStatusRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "hasBackup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "has_backup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SendStatusRequest { @@ -59,7 +1051,7 @@ export class SendStatusResponse extends Message { status = ""; /** - * @generated from field: bool hasBackup = 2; + * @generated from field: bool has_backup = 2; */ hasBackup = false; @@ -72,7 +1064,7 @@ export class SendStatusResponse extends Message { static readonly typeName = "cacti.satp.v02.common.SendStatusResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "hasBackup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "has_backup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SendStatusResponse { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts index 056b2b8058..788bc328e8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts @@ -1,28 +1,28 @@ // @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" -// @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02.stage_0, syntax proto3) +// @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck -import { TransferProposalClaimsRequest, TransferProposalClaimsResponse } from "./stage_0_pb.js"; +import { PreTransferVerificationAndContextEstablishmentRequest, PreTransferVerificationAndContextEstablishmentResponse } from "./stage_0_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** * util RPCs * - * @generated from service cacti.satp.v02.stage_0.SATPStage0 + * @generated from service cacti.satp.v02.SatpStage0Service */ -export const SATPStage0 = { - typeName: "cacti.satp.v02.stage_0.SATPStage0", +export const SatpStage0Service = { + typeName: "cacti.satp.v02.SatpStage0Service", methods: { /** * step RPCs * - * @generated from rpc cacti.satp.v02.stage_0.SATPStage0.TransferProposalClaims + * @generated from rpc cacti.satp.v02.SatpStage0Service.TransferProposalClaims */ transferProposalClaims: { name: "TransferProposalClaims", - I: TransferProposalClaimsRequest, - O: TransferProposalClaimsResponse, + I: PreTransferVerificationAndContextEstablishmentRequest, + O: PreTransferVerificationAndContextEstablishmentResponse, kind: MethodKind.Unary, }, } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts index 01bd2a9225..6edec95886 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -1,156 +1,87 @@ // @generated by protoc-gen-es v1.7.2 with parameter "target=ts" -// @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02.stage_0, syntax proto3) +// @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; +import { CommonSatp, TransferClaims } from "./common/message_pb.js"; /** - * @generated from message cacti.satp.v02.stage_0.TransferProposalClaimsRequest + * @generated from message cacti.satp.v02.PreTransferVerificationAndContextEstablishmentRequest */ -export class TransferProposalClaimsRequest extends Message { +export class PreTransferVerificationAndContextEstablishmentRequest extends Message { /** - * @generated from field: string message_type = 1; + * @generated from field: cacti.satp.v02.common.CommonSatp context = 1; */ - messageType = ""; + context?: CommonSatp; /** - * @generated from field: string asset_asset_id = 2; + * todo other fields + * + * @generated from field: cacti.satp.v02.common.TransferClaims transferClaims = 2; */ - assetAssetId = ""; + transferClaims?: TransferClaims; - /** - * @generated from field: string asset_profile_id = 3; - */ - assetProfileId = ""; - - /** - * @generated from field: string verified_originator_entity_id = 4; - */ - verifiedOriginatorEntityId = ""; - - /** - * @generated from field: string verified_beneficiary_entity_id = 5; - */ - verifiedBeneficiaryEntityId = ""; - - /** - * @generated from field: string originator_pubkey = 6; - */ - originatorPubkey = ""; - - /** - * @generated from field: string beneficiary_pubkey = 7; - */ - beneficiaryPubkey = ""; - - /** - * @generated from field: string sender_gateway_network_id = 8; - */ - senderGatewayNetworkId = ""; - - /** - * @generated from field: string recipient_gateway_network_id = 9; - */ - recipientGatewayNetworkId = ""; - - /** - * @generated from field: string client_identity_pubkey = 10; - */ - clientIdentityPubkey = ""; - - /** - * @generated from field: string server_identity_pubkey = 11; - */ - serverIdentityPubkey = ""; - - /** - * @generated from field: string sender_gateway_owner_id = 12; - */ - senderGatewayOwnerId = ""; - - /** - * @generated from field: string receiver_gateway_owner_id = 13; - */ - receiverGatewayOwnerId = ""; - - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.stage_0.TransferProposalClaimsRequest"; + static readonly typeName = "cacti.satp.v02.PreTransferVerificationAndContextEstablishmentRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "asset_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "originator_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "client_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "server_identity_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 13, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "context", kind: "message", T: CommonSatp }, + { no: 2, name: "transferClaims", kind: "message", T: TransferClaims }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalClaimsRequest { - return new TransferProposalClaimsRequest().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { + return new PreTransferVerificationAndContextEstablishmentRequest().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalClaimsRequest { - return new TransferProposalClaimsRequest().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { + return new PreTransferVerificationAndContextEstablishmentRequest().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): TransferProposalClaimsRequest { - return new TransferProposalClaimsRequest().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { + return new PreTransferVerificationAndContextEstablishmentRequest().fromJsonString(jsonString, options); } - static equals(a: TransferProposalClaimsRequest | PlainMessage | undefined, b: TransferProposalClaimsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(TransferProposalClaimsRequest, a, b); + static equals(a: PreTransferVerificationAndContextEstablishmentRequest | PlainMessage | undefined, b: PreTransferVerificationAndContextEstablishmentRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(PreTransferVerificationAndContextEstablishmentRequest, a, b); } } /** * TODO * - * @generated from message cacti.satp.v02.stage_0.TransferProposalClaimsResponse + * @generated from message cacti.satp.v02.PreTransferVerificationAndContextEstablishmentResponse */ -export class TransferProposalClaimsResponse extends Message { - /** - * @generated from field: string message_type = 1; - */ - messageType = ""; - - constructor(data?: PartialMessage) { +export class PreTransferVerificationAndContextEstablishmentResponse extends Message { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.stage_0.TransferProposalClaimsResponse"; + static readonly typeName = "cacti.satp.v02.PreTransferVerificationAndContextEstablishmentResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalClaimsResponse { - return new TransferProposalClaimsResponse().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { + return new PreTransferVerificationAndContextEstablishmentResponse().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalClaimsResponse { - return new TransferProposalClaimsResponse().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { + return new PreTransferVerificationAndContextEstablishmentResponse().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): TransferProposalClaimsResponse { - return new TransferProposalClaimsResponse().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { + return new PreTransferVerificationAndContextEstablishmentResponse().fromJsonString(jsonString, options); } - static equals(a: TransferProposalClaimsResponse | PlainMessage | undefined, b: TransferProposalClaimsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(TransferProposalClaimsResponse, a, b); + static equals(a: PreTransferVerificationAndContextEstablishmentResponse | PlainMessage | undefined, b: PreTransferVerificationAndContextEstablishmentResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(PreTransferVerificationAndContextEstablishmentResponse, a, b); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts index c66c54ca67..1f51ca2bd2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts @@ -1,16 +1,35 @@ // @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" -// @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02.stage_1, syntax proto3) +// @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck +import { TransferCommenceRequestMessage, TransferCommenceResponseMessage, TransferProposalReceiptRejectMessage, TransferProposalRequestMessage } from "./stage_1_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + /** - * util RPCs - * - * @generated from service cacti.satp.v02.stage_1.SATPStage1 + * @generated from service cacti.satp.v02.SatpStage1Service */ -export const SATPStage1 = { - typeName: "cacti.satp.v02.stage_1.SATPStage1", +export const SatpStage1Service = { + typeName: "cacti.satp.v02.SatpStage1Service", methods: { + /** + * @generated from rpc cacti.satp.v02.SatpStage1Service.TransferProposal + */ + transferProposal: { + name: "TransferProposal", + I: TransferProposalRequestMessage, + O: TransferProposalReceiptRejectMessage, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.SatpStage1Service.TransferCommence + */ + transferCommence: { + name: "TransferCommence", + I: TransferCommenceRequestMessage, + O: TransferCommenceResponseMessage, + kind: MethodKind.Unary, + }, } } as const; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts new file mode 100644 index 0000000000..e59e1019c7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -0,0 +1,217 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import { CommonSatp, NetworkCapabilities, TransferClaims, TransferClaimsFormat } from "./common/message_pb.js"; + +/** + * @generated from message cacti.satp.v02.TransferProposalRequestMessage + */ +export class TransferProposalRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: cacti.satp.v02.common.TransferClaims transfer_init_claims = 2; + */ + transferInitClaims?: TransferClaims; + + /** + * @generated from field: cacti.satp.v02.common.TransferClaimsFormat transfer_init_claims_format = 3; + */ + transferInitClaimsFormat?: TransferClaimsFormat; + + /** + * @generated from field: cacti.satp.v02.common.NetworkCapabilities network_capabilities = 4; + */ + networkCapabilities?: NetworkCapabilities; + + /** + * @generated from field: bool multiple_claims_allowed = 5; + */ + multipleClaimsAllowed = false; + + /** + * @generated from field: bool multiple_cancels_allowed = 6; + */ + multipleCancelsAllowed = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.TransferProposalRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "transfer_init_claims", kind: "message", T: TransferClaims }, + { no: 3, name: "transfer_init_claims_format", kind: "message", T: TransferClaimsFormat }, + { no: 4, name: "network_capabilities", kind: "message", T: NetworkCapabilities }, + { no: 5, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalRequestMessage { + return new TransferProposalRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalRequestMessage { + return new TransferProposalRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferProposalRequestMessage { + return new TransferProposalRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: TransferProposalRequestMessage | PlainMessage | undefined, b: TransferProposalRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferProposalRequestMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.TransferProposalReceiptRejectMessage + */ +export class TransferProposalReceiptRejectMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: string hash_transfer_init_claims = 2; + */ + hashTransferInitClaims = ""; + + /** + * @generated from field: cacti.satp.v02.common.TransferClaims transfer_counter_claims = 3; + */ + transferCounterClaims?: TransferClaims; + + /** + * @generated from field: string timestamp = 4; + */ + timestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.TransferProposalReceiptRejectMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_counter_claims", kind: "message", T: TransferClaims }, + { no: 4, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalReceiptRejectMessage { + return new TransferProposalReceiptRejectMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalReceiptRejectMessage { + return new TransferProposalReceiptRejectMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferProposalReceiptRejectMessage { + return new TransferProposalReceiptRejectMessage().fromJsonString(jsonString, options); + } + + static equals(a: TransferProposalReceiptRejectMessage | PlainMessage | undefined, b: TransferProposalReceiptRejectMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferProposalReceiptRejectMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.TransferCommenceRequestMessage + */ +export class TransferCommenceRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: string hash_transfer_init_claims = 2; + */ + hashTransferInitClaims = ""; + + /** + * @generated from field: string client_transfer_number = 3; + */ + clientTransferNumber = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.TransferCommenceRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferCommenceRequestMessage { + return new TransferCommenceRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferCommenceRequestMessage { + return new TransferCommenceRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferCommenceRequestMessage { + return new TransferCommenceRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: TransferCommenceRequestMessage | PlainMessage | undefined, b: TransferCommenceRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferCommenceRequestMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.TransferCommenceResponseMessage + */ +export class TransferCommenceResponseMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.TransferCommenceResponseMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferCommenceResponseMessage { + return new TransferCommenceResponseMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferCommenceResponseMessage { + return new TransferCommenceResponseMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferCommenceResponseMessage { + return new TransferCommenceResponseMessage().fromJsonString(jsonString, options); + } + + static equals(a: TransferCommenceResponseMessage | PlainMessage | undefined, b: TransferCommenceResponseMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferCommenceResponseMessage, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts index d00165f0c4..1acc5ea289 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts @@ -1,16 +1,26 @@ // @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" -// @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02.stage_2, syntax proto3) +// @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck +import { LockAssertionReceiptMessage, LockAssertionRequestMessage } from "./stage_2_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + /** - * util RPCs - * - * @generated from service cacti.satp.v02.stage_2.SATPStage2 + * @generated from service cacti.satp.v02.SatpStage2Service */ -export const SATPStage2 = { - typeName: "cacti.satp.v02.stage_2.SATPStage2", +export const SatpStage2Service = { + typeName: "cacti.satp.v02.SatpStage2Service", methods: { + /** + * @generated from rpc cacti.satp.v02.SatpStage2Service.LockAssertion + */ + lockAssertion: { + name: "LockAssertion", + I: LockAssertionRequestMessage, + O: LockAssertionReceiptMessage, + kind: MethodKind.Unary, + }, } } as const; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts new file mode 100644 index 0000000000..a7e91edc78 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -0,0 +1,125 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import { CommonSatp, LockAssertionClaim, LockAssertionFormat } from "./common/message_pb.js"; + +/** + * @generated from message cacti.satp.v02.LockAssertionRequestMessage + */ +export class LockAssertionRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 2; + */ + lockAssertionClaim?: LockAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 3; + */ + lockAssertionFormat?: LockAssertionFormat; + + /** + * @generated from field: string lock_assertion_expiration = 4; + */ + lockAssertionExpiration = ""; + + /** + * @generated from field: string client_transfer_number = 5; + */ + clientTransferNumber = ""; + + /** + * @generated from field: string client_signature = 6; + */ + clientSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.LockAssertionRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, + { no: 3, name: "lock_assertion_format", kind: "message", T: LockAssertionFormat }, + { no: 4, name: "lock_assertion_expiration", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionRequestMessage { + return new LockAssertionRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionRequestMessage { + return new LockAssertionRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LockAssertionRequestMessage { + return new LockAssertionRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: LockAssertionRequestMessage | PlainMessage | undefined, b: LockAssertionRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionRequestMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.LockAssertionReceiptMessage + */ +export class LockAssertionReceiptMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: string server_transfer_number = 2; + */ + serverTransferNumber = ""; + + /** + * @generated from field: string server_signature = 3; + */ + serverSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.LockAssertionReceiptMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionReceiptMessage { + return new LockAssertionReceiptMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionReceiptMessage { + return new LockAssertionReceiptMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LockAssertionReceiptMessage { + return new LockAssertionReceiptMessage().fromJsonString(jsonString, options); + } + + static equals(a: LockAssertionReceiptMessage | PlainMessage | undefined, b: LockAssertionReceiptMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionReceiptMessage, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts index ee19d09258..d7e1779400 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts @@ -1,16 +1,44 @@ // @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" -// @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02.stage_3, syntax proto3) +// @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck +import { CommitFinalAcknowledgementReceiptResponseMessage, CommitFinalAssertionRequestMessage, CommitPreparationRequestMessage, CommitReadyResponseMessage, TransferCompleteRequestMessage } from "./stage_3_pb.js"; +import { Empty, MethodKind } from "@bufbuild/protobuf"; + /** - * util RPCs - * - * @generated from service cacti.satp.v02.stage_3.SATPStage3 + * @generated from service cacti.satp.v02.SatpStage3Service */ -export const SATPStage3 = { - typeName: "cacti.satp.v02.stage_3.SATPStage3", +export const SatpStage3Service = { + typeName: "cacti.satp.v02.SatpStage3Service", methods: { + /** + * @generated from rpc cacti.satp.v02.SatpStage3Service.CommitPreparation + */ + commitPreparation: { + name: "CommitPreparation", + I: CommitPreparationRequestMessage, + O: CommitReadyResponseMessage, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.SatpStage3Service.CommitFinalAssertion + */ + commitFinalAssertion: { + name: "CommitFinalAssertion", + I: CommitFinalAssertionRequestMessage, + O: CommitFinalAcknowledgementReceiptResponseMessage, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.SatpStage3Service.TransferComplete + */ + transferComplete: { + name: "TransferComplete", + I: TransferCompleteRequestMessage, + O: Empty, + kind: MethodKind.Unary, + }, } } as const; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts new file mode 100644 index 0000000000..7c4c0246fe --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts @@ -0,0 +1,296 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CommonSatp, MintAssertionClaims, MintAssertionClaimsFormat } from "./common/message_pb.js"; + +/** + * @generated from message cacti.satp.v02.CommitPreparationRequestMessage + */ +export class CommitPreparationRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: string client_transfer_number = 2; + */ + clientTransferNumber = ""; + + /** + * @generated from field: string client_signature = 3; + */ + clientSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.CommitPreparationRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommitPreparationRequestMessage { + return new CommitPreparationRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommitPreparationRequestMessage { + return new CommitPreparationRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommitPreparationRequestMessage { + return new CommitPreparationRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: CommitPreparationRequestMessage | PlainMessage | undefined, b: CommitPreparationRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(CommitPreparationRequestMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.CommitReadyResponseMessage + */ +export class CommitReadyResponseMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 2; + */ + mintAssertionClaims?: MintAssertionClaims; + + /** + * @generated from field: cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 3; + */ + mintAssertionClaimsFormat?: MintAssertionClaimsFormat; + + /** + * @generated from field: string server_transfer_number = 4; + */ + serverTransferNumber = ""; + + /** + * @generated from field: string server_signature = 5; + */ + serverSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.CommitReadyResponseMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "mint_assertion_claims", kind: "message", T: MintAssertionClaims }, + { no: 3, name: "mint_assertion_claims_format", kind: "message", T: MintAssertionClaimsFormat }, + { no: 4, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommitReadyResponseMessage { + return new CommitReadyResponseMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommitReadyResponseMessage { + return new CommitReadyResponseMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommitReadyResponseMessage { + return new CommitReadyResponseMessage().fromJsonString(jsonString, options); + } + + static equals(a: CommitReadyResponseMessage | PlainMessage | undefined, b: CommitReadyResponseMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(CommitReadyResponseMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.CommitFinalAssertionRequestMessage + */ +export class CommitFinalAssertionRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 2; + */ + burnAssertionClaim?: BurnAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 3; + */ + burnAssertionClaimFormat?: BurnAssertionClaimFormat; + + /** + * @generated from field: string client_transfer_number = 4; + */ + clientTransferNumber = ""; + + /** + * @generated from field: string client_signature = 5; + */ + clientSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.CommitFinalAssertionRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, + { no: 3, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, + { no: 4, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommitFinalAssertionRequestMessage { + return new CommitFinalAssertionRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommitFinalAssertionRequestMessage { + return new CommitFinalAssertionRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommitFinalAssertionRequestMessage { + return new CommitFinalAssertionRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: CommitFinalAssertionRequestMessage | PlainMessage | undefined, b: CommitFinalAssertionRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(CommitFinalAssertionRequestMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.CommitFinalAcknowledgementReceiptResponseMessage + */ +export class CommitFinalAcknowledgementReceiptResponseMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 2; + */ + assignmentAssertionClaim?: AssignmentAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 3; + */ + assignmentAssertionClaimFormat?: AssignmentAssertionClaimFormat; + + /** + * @generated from field: string server_transfer_number = 4; + */ + serverTransferNumber = ""; + + /** + * @generated from field: string server_signature = 5; + */ + serverSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.CommitFinalAcknowledgementReceiptResponseMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, + { no: 3, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, + { no: 4, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CommitFinalAcknowledgementReceiptResponseMessage { + return new CommitFinalAcknowledgementReceiptResponseMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CommitFinalAcknowledgementReceiptResponseMessage { + return new CommitFinalAcknowledgementReceiptResponseMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CommitFinalAcknowledgementReceiptResponseMessage { + return new CommitFinalAcknowledgementReceiptResponseMessage().fromJsonString(jsonString, options); + } + + static equals(a: CommitFinalAcknowledgementReceiptResponseMessage | PlainMessage | undefined, b: CommitFinalAcknowledgementReceiptResponseMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(CommitFinalAcknowledgementReceiptResponseMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.TransferCompleteRequestMessage + */ +export class TransferCompleteRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: string hash_transfer_commence = 2; + */ + hashTransferCommence = ""; + + /** + * @generated from field: string client_transfer_number = 3; + */ + clientTransferNumber = ""; + + /** + * @generated from field: string client_signature = 4; + */ + clientSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.TransferCompleteRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "hash_transfer_commence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TransferCompleteRequestMessage { + return new TransferCompleteRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TransferCompleteRequestMessage { + return new TransferCompleteRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TransferCompleteRequestMessage { + return new TransferCompleteRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: TransferCompleteRequestMessage | PlainMessage | undefined, b: TransferCompleteRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferCompleteRequestMessage, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts index 25de4a19ae..046b37d527 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts @@ -23,7 +23,6 @@ import { import { TransferInitializationV1Response, DefaultApi as SatpApi, - SessionData, ClientV1Request, TransferCommenceV1Request, TransferCommenceV1Response, @@ -35,12 +34,12 @@ import { CommitFinalV1Response, TransferCompleteV1Request, TransferInitializationV1Request, - LocalLog, RecoverV1Message, RecoverUpdateV1Message, RecoverUpdateAckV1Message, RollbackV1Message, RollbackAckV1Message, + SessionData } from "./generated/openapi/typescript-axios"; import { CommitFinalRequestEndpointV1 } from "./web-services/server-side/commit-final-request-endpoint"; import { CommitFinalResponseEndpointV1 } from "./web-services/client-side/commit-final-response-endpoint"; @@ -92,10 +91,7 @@ import { RollbackAckMessageEndpointV1 } from "./web-services/recovery/rollback-a import { KnexLocalLogRepository as LocalLogRepository } from "./repository/knex-local-log-repository"; import { IPFSRemoteLogRepository } from "./repository/ipfs-remote-log-repository"; import { KnexRemoteLogRepository } from "./repository/knex-remote-log-repository"; -import { - ILocalLogRepository, - IRemoteLogRepository, -} from "./repository/interfaces/repository"; +import { IRemoteLogRepository } from "./repository/interfaces/repository"; export enum SatpMessageType { InitializationRequest = "urn:ietf:satp:msgtype:init-transfer-msg", @@ -111,6 +107,7 @@ export enum SatpMessageType { TransferCompleteRequest = "urn:ietf:satp:msgtype:commit-transfer-complete-msg", } +import { LocalLog, RemoteLog } from "./core/types"; export interface IPluginSatpGatewayConstructorOptions { name: string; dltIDs: string[]; @@ -130,23 +127,6 @@ export interface IKeyPair { publicKey: Uint8Array; privateKey: Uint8Array; } - -export interface IRemoteLog { - key: string; - hash: string; - signature: string; - signerPubKey: string; -} - -export interface ILocalLog { - key?: string; - sessionID: string; - data?: string; - type: string; - operation: string; - timestamp?: string; -} - // todo implement factory export abstract class PluginSATPGateway implements ICactusPlugin, IPluginWebService @@ -159,7 +139,7 @@ export abstract class PluginSATPGateway private _pubKey: string; private _privKey: string; - public localRepository?: ILocalLogRepository; + public localRepository?: LocalLogRepository; public remoteRepository?: IRemoteLogRepository; private endpoints: IWebServiceEndpoint[] | undefined; @@ -469,7 +449,7 @@ export abstract class PluginSATPGateway } } - async storeInDatabase(LocalLog: ILocalLog) { + async storeInDatabase(LocalLog: LocalLog) { const fnTag = `${this.className}#storeInDatabase()`; this.log.info(`${fnTag}, Storing locally log: ${JSON.stringify(LocalLog)}`); @@ -479,7 +459,7 @@ export abstract class PluginSATPGateway async storeRemoteLog(key: string, hash: string) { const fnTag = `${this.className}#storeRemoteLog()`; - const remoteLog: IRemoteLog = { + const remoteLog: RemoteLog = { key: key, hash: hash, signature: "", @@ -527,7 +507,7 @@ export abstract class PluginSATPGateway await this.storeRemoteLog(localLog.key, hash); } - async storeProof(localLog: ILocalLog): Promise { + async storeProof(localLog: LocalLog): Promise { if (localLog.data == undefined) return; localLog.key = PluginSATPGateway.getSatpLogKey( @@ -544,7 +524,7 @@ export abstract class PluginSATPGateway await this.storeRemoteLog(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}`); @@ -566,13 +546,11 @@ export abstract class PluginSATPGateway }); } - async getLogsMoreRecentThanTimestamp( - timestamp: string, - ): Promise { + async getLogsMoreRecentThanTimestamp(timestamp: string): Promise { const fnTag = `${this.className}#getLogsMoreRecentThanTimestamp()`; this.log.info(`${fnTag}, retrieving logs more recent than ${timestamp}`); - const logs: ILocalLog[] | undefined = + const logs: LocalLog[] | undefined = await this.localRepository?.readLogsMoreRecentThanTimestamp(timestamp); if (logs == undefined) { @@ -584,7 +562,7 @@ export abstract class PluginSATPGateway return logs; } - async getLogFromRemote(logKey: string): Promise { + async getLogFromRemote(logKey: string): Promise { const fnTag = `${this.className}#getSatpLogFromIPFS()`; this.log.info(`Retrieving log with key: <${logKey}>`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts index 9526328bf5..8d1524398f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts @@ -1,4 +1,4 @@ -import { IRemoteLog, ILocalLog } from "../../plugin-satp-gateway"; +import { LocalLog, RemoteLog } from "../../core/types"; export interface IRepository { readById(id: K): Promise; @@ -7,22 +7,22 @@ export interface IRepository { reset(): any; } -export interface ILocalLogRepository extends IRepository { +export interface ILocalLogRepository extends IRepository { database: any; - readById(id: string): Promise; - readLogsNotProofs(): Promise; - readLogsMoreRecentThanTimestamp(timestamp: string): Promise; - readLastestLog(sessionID: string): Promise; - create(log: ILocalLog): Promise; + readById(id: string): Promise; + readLogsNotProofs(): Promise; + readLogsMoreRecentThanTimestamp(timestamp: string): Promise; + readLastestLog(sessionID: string): Promise; + create(log: LocalLog): Promise; deleteBySessionId(log: string): any; destroy(): any; reset(): any; } -export interface IRemoteLogRepository extends IRepository { +export interface IRemoteLogRepository extends IRepository { database: any; - readById(id: string): Promise; - create(log: IRemoteLog): any; + readById(id: string): Promise; + create(log: RemoteLog): any; destroy(): any; reset(): any; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts index aafc69ef34..ef4514f055 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts @@ -1,7 +1,7 @@ import { DefaultApi as ObjectStoreIpfsApi } from "@hyperledger/cactus-plugin-object-store-ipfs"; import { Configuration } from "@hyperledger/cactus-core-api"; import { IRemoteLogRepository } from "./interfaces/repository"; -import { IRemoteLog } from "../plugin-satp-gateway"; +import { RemoteLog } from "../core/types"; export class IPFSRemoteLogRepository implements IRemoteLogRepository { public static readonly CLASS_NAME = "IPFSRemoteLogRepository"; @@ -17,7 +17,7 @@ export class IPFSRemoteLogRepository implements IRemoteLogRepository { return IPFSRemoteLogRepository.CLASS_NAME; } - readById(logKey: string): Promise { + readById(logKey: string): Promise { const fnTag = `${this.className}#readById()`; return this.database @@ -32,7 +32,7 @@ export class IPFSRemoteLogRepository implements IRemoteLogRepository { }); } - create(log: IRemoteLog): any { + create(log: RemoteLog): any { const fnTag = `${this.className}#create()`; const logBase64 = Buffer.from(JSON.stringify(log)).toString("base64"); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts index b977e3e111..e74b027266 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts @@ -1,4 +1,4 @@ -import { ILocalLog } from "../plugin-satp-gateway"; +import { LocalLog } from "../core/types"; import { ILocalLogRepository } from "./interfaces/repository"; import knex, { Knex } from "knex"; @@ -18,24 +18,24 @@ export class KnexLocalLogRepository implements ILocalLogRepository { return this.database("logs"); } - readById(logKey: string): Promise { + readById(logKey: string): Promise { return this.getLogsTable().where({ key: logKey }).first(); } - readLastestLog(sessionID: string): Promise { + readLastestLog(sessionID: string): Promise { return this.getLogsTable() .orderBy("timestamp", "desc") .where({ sessionID: sessionID }) .first(); } - readLogsMoreRecentThanTimestamp(timestamp: string): Promise { + readLogsMoreRecentThanTimestamp(timestamp: string): Promise { return this.getLogsTable() .where("timestamp", ">", timestamp) .whereNot("type", "like", "%proof%"); } - create(log: ILocalLog): any { + create(log: LocalLog): any { return this.getLogsTable().insert(log); } @@ -43,7 +43,7 @@ export class KnexLocalLogRepository implements ILocalLogRepository { return this.database().where({ sessionID: sessionID }).del(); } - readLogsNotProofs(): Promise { + readLogsNotProofs(): Promise { return this.getLogsTable() .select( this.database.raw( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts index 9431076d0a..529eda61b5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts @@ -1,5 +1,5 @@ import { IRemoteLogRepository } from "./interfaces/repository"; -import { IRemoteLog } from "../plugin-satp-gateway"; +import { RemoteLog } from "../core/types"; import knex, { Knex } from "knex"; export class KnexRemoteLogRepository implements IRemoteLogRepository { @@ -21,11 +21,11 @@ export class KnexRemoteLogRepository implements IRemoteLogRepository { return this.database("remote-logs"); } - readById(logKey: string): Promise { + readById(logKey: string): Promise { return this.getLogsTable().where({ key: logKey }).first(); } - create(log: IRemoteLog): any { + create(log: RemoteLog): any { return this.getLogsTable().insert(log); } diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts index 7ddc8a62d9..f3f920b869 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts @@ -1,18 +1,20 @@ import "jest-extended"; import { Containers, - FabricTestLedgerV1, pruneDockerAllIfGithubAction, - BesuTestLedger, } from "@hyperledger/cactus-test-tooling"; import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; // import coordinator factory, coordinator and coordinator options -import { SATPGateway, SATPGatewayConfig } from "../../../main/typescript/gateway-refactor"; +import { + SATPGateway, + SATPGatewayConfig, +} from "../../../main/typescript/gateway-refactor"; import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; import { - IPluginFactoryOptions, PluginImportType, + IPluginFactoryOptions, + PluginImportType, } from "@hyperledger/cactus-core-api"; -import { SupportedGatewayImplementations } from './../../../main/typescript/core/types'; +import { SupportedGatewayImplementations } from "./../../../main/typescript/core/types"; const logLevel: LogLevelDesc = "INFO"; const log = LoggerProvider.getOrCreate({ @@ -21,7 +23,7 @@ const log = LoggerProvider.getOrCreate({ }); const factoryOptions: IPluginFactoryOptions = { pluginImportType: PluginImportType.Local, -} +}; const factory = new PluginFactorySATPGateway(factoryOptions); beforeAll(async () => { @@ -36,14 +38,13 @@ beforeAll(async () => { }); describe("SATPGateway initialization", () => { - it("initiates with default config", async () => { const options: SATPGatewayConfig = {}; const gateway = await factory.create(options); expect(gateway).toBeInstanceOf(SATPGateway); - const identity = gateway.getIdentity(); + const identity = gateway.Identity; expect(identity).toBeDefined(); expect(identity.id).toBeDefined(); expect(identity.name).toBeDefined(); @@ -59,7 +60,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ]); expect(identity.proofID).toBe("mockProofID1"); - expect(identity.port).toBe(3000); + expect(identity.gatewayClientPort).toBe(3011); expect(identity.address).toBe("http://localhost"); }); @@ -81,7 +82,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID10", - port: 3001, + gatewayClientPort: 3001, address: "https://localhost", }, }; @@ -89,7 +90,7 @@ describe("SATPGateway initialization", () => { expect(gateway).toBeInstanceOf(SATPGateway); - const identity = gateway.getIdentity(); + const identity = gateway.Identity; expect(identity).toBeDefined(); expect(identity.id).toBeDefined(); expect(identity.name).toBeDefined(); @@ -105,7 +106,7 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ]); expect(identity.proofID).toBe("mockProofID10"); - expect(identity.port).toBe(3001); + expect(identity.gatewayClientPort).toBe(3001); expect(identity.address).toBe("https://localhost"); }); @@ -127,20 +128,19 @@ describe("SATPGateway initialization", () => { SupportedGatewayImplementations.BESU, ], proofID: "mockProofID10", - port: 3010, + gatewayClientPort: 3010, address: "https://localhost", }, }; const gateway = await factory.create(options); expect(gateway).toBeInstanceOf(SATPGateway); - const identity = gateway.getIdentity(); - expect(identity.port).toBe(3010); + const identity = gateway.Identity; + expect(identity.gatewayClientPort).toBe(3010); expect(identity.address).toBe("https://localhost"); - await gateway.startupServer(); + await gateway.startupBOLServer(); await gateway.shutdown(); }); - }); afterAll(async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index 3e8af87d5f..e71bb32874 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -2,11 +2,8 @@ import { v4 as uuidv4 } from "uuid"; import "jest-extended"; import { Secp256k1Keys } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; -import { - ILocalLog, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; - +import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; +import { LocalLog } from "../../../../main/typescript/core/types"; import { SessionData } from "../../../../main/typescript/public-api"; import { SHA256 } from "crypto-js"; import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; @@ -34,10 +31,10 @@ let type2: string; let type3: string; let type4: string; let operation: string; -let satpLog: ILocalLog; -let satpLog2: ILocalLog; -let satpLog3: ILocalLog; -let satpLog4: ILocalLog; +let satpLog: LocalLog; +let satpLog2: LocalLog; +let satpLog3: LocalLog; +let satpLog4: LocalLog; let sessionData: SessionData; beforeEach(async () => { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts index f93dd989c8..8aa8aa03d7 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts @@ -4,9 +4,10 @@ import { SHA256 } from "crypto-js"; import { SatpMessageType, PluginSATPGateway, - ILocalLog, } from "../../../../main/typescript/plugin-satp-gateway"; +import { LocalLog } from "../../../../main/typescript/core/types"; + import { CommitFinalV1Request, SessionData, @@ -94,7 +95,7 @@ beforeEach(async () => { type: "proof", operation: "delete", data: COMMIT_FINAL_CLAIM, - } as ILocalLog); + } as LocalLog); }); test("valid commit final request", async () => { From 946f64c7230356f03a9c8c71735b93773d45bd71 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Sat, 23 Mar 2024 14:58:48 +0200 Subject: [PATCH 05/49] chore(satp-hermes): delete Kotlin SDK, add Go SDK Signed-off-by: Rafael Belchior build(satp-hermes): add gateway client Go SDK Signed-off-by: Rafael Belchior feat(satp-hermes): re-add message proto Signed-off-by: Rafael Belchior --- packages/cactus-plugin-satp-hermes/.gitignore | 6 + .../src/main/go/generated/.gitignore | 24 + .../go/generated/.openapi-generator-ignore | 23 + .../go/generated/.openapi-generator/FILES | 121 + .../go/generated/.openapi-generator/VERSION | 1 + .../src/main/go/generated/.travis.yml | 8 + .../src/main/go/generated/README.md | 183 + .../src/main/go/generated/api/openapi.yaml | 3109 +++++++++++++++++ .../src/main/go/generated/api_admin.go | 671 ++++ .../src/main/go/generated/api_transaction.go | 609 ++++ .../src/main/go/generated/client.go | 659 ++++ .../src/main/go/generated/configuration.go | 225 ++ .../src/main/go/generated/docs/APIError.md | 135 + .../src/main/go/generated/docs/Action.md | 186 + .../src/main/go/generated/docs/AdminApi.md | 343 ++ .../main/go/generated/docs/AuthzJwtClaim.md | 11 + .../src/main/go/generated/docs/AuthzScope.md | 13 + .../src/main/go/generated/docs/BridgeInfo.md | 56 + .../go/generated/docs/Cancel200Response.md | 72 + .../main/go/generated/docs/CancelRequest.md | 51 + .../main/go/generated/docs/CancelResponse.md | 72 + .../go/generated/docs/CredentialProfile.md | 15 + .../src/main/go/generated/docs/DLTProtocol.md | 13 + .../src/main/go/generated/docs/Estimate.md | 290 ++ .../src/main/go/generated/docs/FeeCost.md | 160 + .../src/main/go/generated/docs/GasCost.md | 212 ++ .../go/generated/docs/GetAudit200Response.md | 108 + .../main/go/generated/docs/GetAuditRequest.md | 108 + .../go/generated/docs/GetAuditResponse.md | 108 + .../go/generated/docs/GetRoutes200Response.md | 51 + .../docs/GetRoutes200ResponseRoutesInner.md | 457 +++ ...etRoutes200ResponseRoutesInnerInsurance.md | 82 + ...tRoutes200ResponseRoutesInnerStepsInner.md | 238 ++ ...s200ResponseRoutesInnerStepsInnerAction.md | 186 + ...00ResponseRoutesInnerStepsInnerEstimate.md | 290 ++ ...tesInnerStepsInnerEstimateFeeCostsInner.md | 160 + ...tesInnerStepsInnerEstimateGasCostsInner.md | 212 ++ ...esponseRoutesInnerStepsInnerToolDetails.md | 93 + .../main/go/generated/docs/IncludedStep.md | 238 ++ .../src/main/go/generated/docs/Insurance.md | 82 + .../go/generated/docs/IntegrationDetails.md | 93 + .../src/main/go/generated/docs/Route.md | 457 +++ .../main/go/generated/docs/RoutesResponse.md | 51 + .../main/go/generated/docs/StatusRequest.md | 51 + .../main/go/generated/docs/StatusResponse.md | 177 + .../src/main/go/generated/docs/Token.md | 265 ++ .../go/generated/docs/Transact200Response.md | 72 + .../docs/Transact200ResponseStatusResponse.md | 177 + .../generated/docs/TransactDefaultResponse.md | 135 + .../main/go/generated/docs/TransactRequest.md | 254 ++ .../docs/TransactRequestFromToken.md | 265 ++ .../TransactRequestFromTokenExtensions.md | 82 + ...questFromTokenExtensionsBridgeInfoValue.md | 56 + .../go/generated/docs/TransactResponse.md | 72 + .../main/go/generated/docs/TransactionApi.md | 283 ++ .../src/main/go/generated/git_push.sh | 57 + .../src/main/go/generated/go.mod | 6 + .../src/main/go/generated/go.sum | 11 + .../src/main/go/generated/model_action.go | 310 ++ .../src/main/go/generated/model_api_error.go | 230 ++ .../go/generated/model_authz_jwt_claim.go | 109 + .../main/go/generated/model_authz_scope.go | 111 + .../main/go/generated/model_bridge_info.go | 127 + .../go/generated/model_cancel_200_response.go | 145 + .../main/go/generated/model_cancel_request.go | 118 + .../go/generated/model_cancel_response.go | 145 + .../go/generated/model_credential_profile.go | 113 + .../main/go/generated/model_dlt_protocol.go | 111 + .../src/main/go/generated/model_estimate.go | 460 +++ .../src/main/go/generated/model_fee_cost.go | 275 ++ .../src/main/go/generated/model_gas_cost.go | 348 ++ .../generated/model_get_audit_200_response.go | 202 ++ .../go/generated/model_get_audit_request.go | 202 ++ .../go/generated/model_get_audit_response.go | 202 ++ .../model_get_routes_200_response.go | 118 + ...el_get_routes_200_response_routes_inner.go | 689 ++++ ...tes_200_response_routes_inner_insurance.go | 164 + ...s_200_response_routes_inner_steps_inner.go | 382 ++ ...ponse_routes_inner_steps_inner_estimate.go | 460 +++ ...er_steps_inner_estimate_fee_costs_inner.go | 275 ++ ...er_steps_inner_estimate_gas_costs_inner.go | 348 ++ ...e_routes_inner_steps_inner_tool_details.go | 174 + .../main/go/generated/model_included_step.go | 382 ++ .../src/main/go/generated/model_insurance.go | 164 + .../go/generated/model_integration_details.go | 174 + .../src/main/go/generated/model_route.go | 689 ++++ .../go/generated/model_routes_response.go | 118 + .../main/go/generated/model_status_request.go | 118 + .../go/generated/model_status_response.go | 280 ++ .../src/main/go/generated/model_token.go | 414 +++ .../generated/model_transact_200_response.go | 145 + ...l_transact_200_response_status_response.go | 280 ++ .../model_transact_default_response.go | 230 ++ .../go/generated/model_transact_request.go | 396 +++ .../model_transact_request_from_token.go | 414 +++ ..._transact_request_from_token_extensions.go | 163 + ...from_token_extensions_bridge_info_value.go | 127 + .../go/generated/model_transact_response.go | 145 + .../src/main/go/generated/response.go | 47 + .../main/go/generated/test/api_admin_test.go | 49 + .../go/generated/test/api_transaction_test.go | 61 + .../src/main/go/generated/utils.go | 347 ++ .../TransferInitializationV1Response.kt | 88 - .../proto/cacti/satp/v02/common/message.proto | 226 ++ .../typescript-axios/.openapi-generator/FILES | 3 + .../.openapi-generator/VERSION | 1 + .../openapi-blo/typescript-axios/api.ts | 2 +- 107 files changed, 23037 insertions(+), 89 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/.gitignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/.gitignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator-ignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/VERSION create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/.travis.yml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/README.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/api/openapi.yaml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/api_transaction.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/client.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/configuration.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/APIError.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Action.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AdminApi.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzJwtClaim.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzScope.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/BridgeInfo.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Cancel200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelRequest.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CredentialProfile.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/DLTProtocol.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Estimate.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/FeeCost.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GasCost.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAudit200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditRequest.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerInsurance.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IncludedStep.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Insurance.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IntegrationDetails.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Route.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/RoutesResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusRequest.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Token.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200Response.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactDefaultResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequest.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactResponse.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactionApi.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/git_push.sh create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/go.mod create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/go.sum create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_action.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_api_error.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_jwt_claim.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_scope.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_bridge_info.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_request.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_credential_profile.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_dlt_protocol.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_estimate.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_fee_cost.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_gas_cost.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_request.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_insurance.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_included_step.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_insurance.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_integration_details.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_route.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_routes_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_request.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_token.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_default_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/response.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/utils.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/VERSION diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore new file mode 100644 index 0000000000..f094fb5e99 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -0,0 +1,6 @@ +src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore +src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore +src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore +src/main/typescript/generated/openapi-blo/typescript-axios/api.ts +src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh +src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.gitignore new file mode 100644 index 0000000000..daf913b1b3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES new file mode 100644 index 0000000000..e101cc77cb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES @@ -0,0 +1,121 @@ +.gitignore +.travis.yml +README.md +api/openapi.yaml +api_admin.go +api_transaction.go +client.go +configuration.go +docs/APIError.md +docs/Action.md +docs/AdminApi.md +docs/AuthzJwtClaim.md +docs/AuthzScope.md +docs/BridgeInfo.md +docs/Cancel200Response.md +docs/CancelRequest.md +docs/CancelResponse.md +docs/Chain.md +docs/Chains1Inner.md +docs/Continue200Response.md +docs/ContinueRequest.md +docs/ContinueResponse.md +docs/CredentialProfile.md +docs/DLTProtocol.md +docs/Estimate.md +docs/FeeCost.md +docs/GasCost.md +docs/GetAudit200Response.md +docs/GetAuditRequest.md +docs/GetAuditResponse.md +docs/GetHealthCheck200Response.md +docs/GetRoutes200Response.md +docs/GetRoutes200ResponseRoutesInner.md +docs/GetRoutes200ResponseRoutesInnerFromToken.md +docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md +docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md +docs/GetRoutes200ResponseRoutesInnerInsurance.md +docs/GetRoutes200ResponseRoutesInnerStepsInner.md +docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md +docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md +docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md +docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md +docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md +docs/HealthCheckResponse.md +docs/IncludedStep.md +docs/Insurance.md +docs/IntegrationDetails.md +docs/Pause200Response.md +docs/PauseRequest.md +docs/PauseResponse.md +docs/Route.md +docs/RoutesResponse.md +docs/StatusRequest.md +docs/StatusResponse.md +docs/Token.md +docs/Transact200Response.md +docs/Transact200ResponseStatusResponse.md +docs/Transact200ResponseStatusResponseDestinationChain.md +docs/Transact200ResponseStatusResponseOriginChain.md +docs/TransactDefaultResponse.md +docs/TransactRequest.md +docs/TransactResponse.md +docs/TransactionApi.md +git_push.sh +go.mod +go.sum +model_action.go +model_api_error.go +model_authz_jwt_claim.go +model_authz_scope.go +model_bridge_info.go +model_cancel_200_response.go +model_cancel_request.go +model_cancel_response.go +model_chain.go +model_chains_1_inner.go +model_continue_200_response.go +model_continue_request.go +model_continue_response.go +model_credential_profile.go +model_dlt_protocol.go +model_estimate.go +model_fee_cost.go +model_gas_cost.go +model_get_audit_200_response.go +model_get_audit_request.go +model_get_audit_response.go +model_get_health_check_200_response.go +model_get_routes_200_response.go +model_get_routes_200_response_routes_inner.go +model_get_routes_200_response_routes_inner_from_token.go +model_get_routes_200_response_routes_inner_from_token_extensions.go +model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go +model_get_routes_200_response_routes_inner_insurance.go +model_get_routes_200_response_routes_inner_steps_inner.go +model_get_routes_200_response_routes_inner_steps_inner_action.go +model_get_routes_200_response_routes_inner_steps_inner_estimate.go +model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go +model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go +model_get_routes_200_response_routes_inner_steps_inner_tool_details.go +model_health_check_response.go +model_included_step.go +model_insurance.go +model_integration_details.go +model_pause_200_response.go +model_pause_request.go +model_pause_response.go +model_route.go +model_routes_response.go +model_status_request.go +model_status_response.go +model_token.go +model_transact_200_response.go +model_transact_200_response_status_response.go +model_transact_200_response_status_response_destination_chain.go +model_transact_200_response_status_response_origin_chain.go +model_transact_default_response.go +model_transact_request.go +model_transact_response.go +response.go +utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/VERSION new file mode 100644 index 0000000000..cd802a1ec4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.travis.yml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.travis.yml new file mode 100644 index 0000000000..f5cb2ce9a5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/README.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/README.md new file mode 100644 index 0000000000..da330b7e19 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/README.md @@ -0,0 +1,183 @@ +# Go API client for generated + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. + +This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. + +**Additional Resources**: +- [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) +- [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) +- [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) +- [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) +- [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) +- [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) +- [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 0.0.2 +- Package version: v0.0.1 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import generated "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), generated.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), generated.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +```golang +ctx := context.WithValue(context.Background(), generated.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), generated.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AdminApi* | [**CallContinue**](docs/AdminApi.md#callcontinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session +*AdminApi* | [**GetAudit**](docs/AdminApi.md#getaudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions +*AdminApi* | [**GetHealthCheck**](docs/AdminApi.md#gethealthcheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint +*AdminApi* | [**GetStatus**](docs/AdminApi.md#getstatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data +*AdminApi* | [**Pause**](docs/AdminApi.md#pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session +*TransactionApi* | [**Cancel**](docs/TransactionApi.md#cancel) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel | Cancel a transaction session +*TransactionApi* | [**GetIntegrations**](docs/TransactionApi.md#getintegrations) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations | Get supported integrations +*TransactionApi* | [**GetRoutes**](docs/TransactionApi.md#getroutes) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes | Get a list of routes for a gateway-to-gateway asset transfer +*TransactionApi* | [**Transact**](docs/TransactionApi.md#transact) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact | Submit a transaction intent + + +## Documentation For Models + + - [APIError](docs/APIError.md) + - [Action](docs/Action.md) + - [AuthzJwtClaim](docs/AuthzJwtClaim.md) + - [AuthzScope](docs/AuthzScope.md) + - [BridgeInfo](docs/BridgeInfo.md) + - [Cancel200Response](docs/Cancel200Response.md) + - [CancelRequest](docs/CancelRequest.md) + - [CancelResponse](docs/CancelResponse.md) + - [Chain](docs/Chain.md) + - [Chains1Inner](docs/Chains1Inner.md) + - [Continue200Response](docs/Continue200Response.md) + - [ContinueRequest](docs/ContinueRequest.md) + - [ContinueResponse](docs/ContinueResponse.md) + - [CredentialProfile](docs/CredentialProfile.md) + - [DLTProtocol](docs/DLTProtocol.md) + - [Estimate](docs/Estimate.md) + - [FeeCost](docs/FeeCost.md) + - [GasCost](docs/GasCost.md) + - [GetAudit200Response](docs/GetAudit200Response.md) + - [GetAuditRequest](docs/GetAuditRequest.md) + - [GetAuditResponse](docs/GetAuditResponse.md) + - [GetHealthCheck200Response](docs/GetHealthCheck200Response.md) + - [GetRoutes200Response](docs/GetRoutes200Response.md) + - [GetRoutes200ResponseRoutesInner](docs/GetRoutes200ResponseRoutesInner.md) + - [GetRoutes200ResponseRoutesInnerFromToken](docs/GetRoutes200ResponseRoutesInnerFromToken.md) + - [GetRoutes200ResponseRoutesInnerFromTokenExtensions](docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md) + - [GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue](docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md) + - [GetRoutes200ResponseRoutesInnerInsurance](docs/GetRoutes200ResponseRoutesInnerInsurance.md) + - [GetRoutes200ResponseRoutesInnerStepsInner](docs/GetRoutes200ResponseRoutesInnerStepsInner.md) + - [GetRoutes200ResponseRoutesInnerStepsInnerAction](docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md) + - [GetRoutes200ResponseRoutesInnerStepsInnerEstimate](docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md) + - [GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner](docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md) + - [GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner](docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md) + - [GetRoutes200ResponseRoutesInnerStepsInnerToolDetails](docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) + - [HealthCheckResponse](docs/HealthCheckResponse.md) + - [IncludedStep](docs/IncludedStep.md) + - [Insurance](docs/Insurance.md) + - [IntegrationDetails](docs/IntegrationDetails.md) + - [Pause200Response](docs/Pause200Response.md) + - [PauseRequest](docs/PauseRequest.md) + - [PauseResponse](docs/PauseResponse.md) + - [Route](docs/Route.md) + - [RoutesResponse](docs/RoutesResponse.md) + - [StatusRequest](docs/StatusRequest.md) + - [StatusResponse](docs/StatusResponse.md) + - [Token](docs/Token.md) + - [Transact200Response](docs/Transact200Response.md) + - [Transact200ResponseStatusResponse](docs/Transact200ResponseStatusResponse.md) + - [Transact200ResponseStatusResponseDestinationChain](docs/Transact200ResponseStatusResponseDestinationChain.md) + - [Transact200ResponseStatusResponseOriginChain](docs/Transact200ResponseStatusResponseOriginChain.md) + - [TransactDefaultResponse](docs/TransactDefaultResponse.md) + - [TransactRequest](docs/TransactRequest.md) + - [TransactResponse](docs/TransactResponse.md) + + +## Documentation For Authorization + +Endpoints do not require authorization. + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api/openapi.yaml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api/openapi.yaml new file mode 100644 index 0000000000..e16c9333cd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api/openapi.yaml @@ -0,0 +1,3109 @@ +openapi: 3.0.3 +info: + contact: + name: Hyperledger Cacti + description: |- + SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. + + This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. + + **Additional Resources**: + - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) + - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) + - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) + - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) + - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) + - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) + - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + title: SATP Gateway Client (Business Logic Orchestrator) + version: 0.0.2 + x-logo: + altText: Cacti logo + backgroundColor: '#fafafa' + url: https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png +externalDocs: + description: "For more information about the SATP Gateway Client, refer to the official\ + \ documentation." + url: https://github.com/hyperledger/cacti/tree/main/packages/cactus-plugin-satp-hermes/README.md +servers: +- description: Development server + url: "http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes" + variables: + host: + default: localhost + port: + default: "3011" +tags: +- description: API endpoints for interacting with blockchains via gateways + name: transaction +- description: API endpoints for fetching information on SATP sessions + name: admin +paths: + /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact: + post: + description: Allows users to queue intents for transactions based on specified + parameters. + operationId: Transact + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_200_response' + description: Transaction successfully queued + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_default_response' + description: An error occurred + summary: Submit a transaction intent + tags: + - transaction + /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel: + post: + description: Attempts to cancel a previously submitted transaction intent using + its session ID. + operationId: Cancel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cancel_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cancel_200_response' + description: Transaction cancellation attempted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_default_response' + description: An error occurred or transaction cannot be cancelled + summary: Cancel a transaction session + tags: + - transaction + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel + /api/v1/@hyperledger/cactus-plugin-satp-hermes/status: + get: + description: Retrieve the status of a SATP session + operationId: GetStatus + parameters: + - description: Unique identifier for the session. + explode: true + in: query + name: SessionID + required: true + schema: + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + type: string + x-category: satp-core + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + description: OK + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + summary: Get SATP current session data + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/status + /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck: + get: + description: Responds if SATP Hermes is on + operationId: GetHealthCheck + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetHealthCheck_200_response' + description: OK + "500": + description: Internal server error + summary: Health check endpoint + tags: + - admin + /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue: + post: + description: "Attempts to continue a previously paused transaction intent, resuming\ + \ its execution." + operationId: Continue + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Continue_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Continue_200_response' + description: Transaction continuation attempted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_default_response' + description: An error occurred or transaction cannot be continued + summary: Continue a paused transaction session + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue + /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause: + post: + description: "Attempts to pause a previously submitted transaction intent, temporarily\ + \ halting its execution." + operationId: Pause + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Pause_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pause_200_response' + description: Transaction pause attempted + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_default_response' + description: An error occurred or transaction cannot be paused + summary: Pause a transaction session + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause + /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations: + get: + description: "Retrieves metadata about each supported blockchain networks, chains,\ + \ and other systems." + operationId: GetIntegrations + responses: + "200": + content: + application/json: + schema: + description: List of chains and related metadata + items: + $ref: '#/components/schemas/Chains_1_inner' + title: Chains + type: array + description: A list of supported systems. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_default_response' + description: An error occurred + summary: Get supported integrations + tags: + - transaction + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations + /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes: + get: + description: Get a list of possible routes for swapping one asset for another + across multiple exchanges + operationId: GetRoutes + parameters: + - description: The sending DLT Network. + explode: true + in: query + name: fromNetworkID + required: true + schema: + description: "The network of the DLT being interacted with. TODO: implement\ + \ network identification draft" + type: string + x-category: satp-core + style: form + - description: The amount that should be sent including all decimals. + explode: true + in: query + name: fromAmount + required: true + schema: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + style: form + - description: The token that should be transferred. Can be the address or the + symbol. + explode: true + in: query + name: fromToken + required: true + schema: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + style: form + - description: The receiving DLT Network. + explode: true + in: query + name: toDLTNetwork + required: true + schema: + description: "The network of the DLT being interacted with. TODO: implement\ + \ network identification draft" + type: string + x-category: satp-core + style: form + - description: The token that should be transferred to. Can be the address or + the symbol. + explode: true + in: query + name: toToken + required: true + schema: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + style: form + - description: The sending wallet address. + explode: true + in: query + name: fromAddress + required: true + schema: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + style: form + - description: "The receiving wallet address. If none is provided, the fromAddress\ + \ will be used." + explode: true + in: query + name: toAddress + required: true + schema: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetRoutes_200_response' + description: OK + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Transact_default_response' + description: An error occurred + summary: Get a list of routes for a gateway-to-gateway asset transfer + tags: + - transaction + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes + /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit: + get: + description: Audits transactions based on provided filters such as start and + end dates. Optionally includes proofs generated from each gateway transaction. + operationId: GetAudit + parameters: + - description: The start date for the audit period. + explode: true + in: query + name: auditStartDate + required: false + schema: + format: date-time + type: string + style: form + - description: The end date for the audit period. + explode: true + in: query + name: auditEndDate + required: false + schema: + format: date-time + type: string + style: form + - description: Include proofs generated from each gateway transaction. + explode: true + in: query + name: includeProofs + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAudit_200_response' + description: Audit results + summary: Audit transactions + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit +components: + schemas: + AuthzScope: + enum: + - group:admin + - group:user + example: group:admin + type: string + x-enum-descriptions: + - Identities with the group:admin scope are administrators of the system. + - Identities with the group:user scope are end users of the system who only + have authorization to perform a limited set of actions. + x-enum-varnames: + - GroupAdmin + - GroupUser + AuthzJwtClaim: + description: "Stores global constants related to the authorization of the application.\ + \ Specifically enumerates the claims to validate for as per RFC 7519, section\ + \ 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1" + enum: + - Hyperledger Labs - Carbon Accounting Tool + example: Hyperledger Labs - Carbon Accounting Tool + type: string + x-enum-descriptions: + - The "iss" (issuer) claim identifies the principal that issued the JWT. The + processing of this claim is generally application specific. The "iss" value + is a case-sensitive string containing a StringOrURI value. Use of this claim + is OPTIONAL. + x-enum-varnames: + - iss + CredentialProfile: + enum: + - SAML + - OAUTH + - X509 + example: OAUTH + type: string + getAuditRequest: + description: Request schema for initiating an audit. Includes the start and + end dates for the audit period and an option to include proofs. + properties: + auditStartDate: + description: The start datetime for the audit. + example: 2023-01-01T00:00:00Z + format: date-time + type: string + auditEndDate: + description: The end datetime for the audit. + example: 2023-01-31T23:59:59Z + format: date-time + type: string + includeProofs: + description: Include proofs generated from each gateway transaction. + example: true + type: boolean + type: object + x-category: request + getAuditResponse: + description: Response schema for an audit request. Contains the proofs generated + during the audit period and the start and end datetimes. + properties: + proofs: + description: An array of strings representing proofs. + example: + - proof1 + - proof2 + items: + type: string + type: array + auditStartTime: + description: The start datetime of the audit period. + example: 2023-01-01T00:00:00Z + format: date-time + type: string + auditEndTime: + description: The end datetime of the audit period. + example: 2023-01-31T23:59:59Z + format: date-time + type: string + type: object + x-category: response + StatusResponse: + description: "Provides the current status of the SATP session including detailed\ + \ information on the progress, such as substatus, stage, and step, along with\ + \ the session start time and chain information." + properties: + status: + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + type: string + substatus: + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + type: string + stage: + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + type: string + step: + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + type: string + startTime: + example: 2023-01-01T00:00:00Z + format: date-time + type: string + originChain: + $ref: '#/components/schemas/Transact_200_response_statusResponse_originChain' + destinationChain: + $ref: '#/components/schemas/Transact_200_response_statusResponse_destinationChain' + required: + - destinationChain + - originChain + - stage + - startTime + - status + - step + - substatus + type: object + x-category: response + PauseRequest: + description: "Request to temporarily pause an ongoing transaction session, identified\ + \ by the session and context IDs." + example: + contextId: 123e4567-e89b-12d3-a456-426614174001 + sessionId: 123e4567-e89b-12d3-a456-426614174000 + properties: + sessionId: + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + contextId: + example: 123e4567-e89b-12d3-a456-426614174001 + format: uuid + type: string + type: object + PauseResponse: + description: Response for a pause transaction request. Returns the current status + of the SATP session post-pause action. + properties: + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + required: + - statusResponse + type: object + StatusRequest: + description: "Request for retrieving the current status of a session, identified\ + \ by the session ID." + example: 123e4567-e89b-12d3-a456-426614174000 + properties: + sessionID: + description: The ID of the session for which the status is being requested. + type: string + required: + - sessionID + type: object + x-category: request + TransactRequest: + description: "Request schema for initiating a transaction. Includes details\ + \ such as the transaction context, mode (data or transfer), payload, and information\ + \ about the source and destination DLT networks." + example: + mode: transfer + payload: "{\"data\":\"example payload\"}" + fromAmount: "100" + toAmount: "95" + contextID: 123e4567-e89b-12d3-a456-426614174000 + toDLTNetworkID: network2 + fromDLTNetworkID: network1 + fromToken: TOKEN1 + toToken: TOKEN2 + properties: + contextID: + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + mode: + enum: + - data + - transfer + example: transfer + type: string + payload: + example: "{\"data\":\"example payload\"}" + type: string + fromDLTNetworkID: + example: network1 + type: string + toDLTNetworkID: + example: network2 + type: string + fromAmount: + example: "100" + type: string + fromToken: + example: TOKEN1 + type: string + toAmount: + example: "95" + type: string + toToken: + example: TOKEN2 + type: string + required: + - contextID + - mode + type: object + TransactResponse: + description: Response schema for a transaction request. Includes the session + ID and the current status of the transaction. + properties: + sessionID: + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + type: string + x-category: satp-core + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + required: + - sessionID + - statusResponse + type: object + CancelRequest: + description: "Request to cancel an ongoing transaction session, identified by\ + \ the session ID." + example: + sessionID: 000003e8-e0b8-21ee-ba00-325096b39f47 + properties: + sessionID: + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + type: string + x-category: satp-core + required: + - sessionID + type: object + CancelResponse: + description: Response for a cancel transaction request. Indicates whether the + cancel action was successful and includes the current session status. + properties: + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + cancelSuccessful: + description: Indicates whether the cancel operation was successful. + example: true + type: boolean + required: + - cancelSuccessful + - statusResponse + type: object + APIError: + description: An Error + properties: + type: + description: HTTP error type + example: bad-request + type: string + code: + description: Numeric error code + example: 16384 + type: integer + status: + description: HTTP status of the error + example: 500 + type: integer + message: + description: Long error description + example: Oops there's been an internal error handling + type: string + timestamp: + description: Timestamp of the error + example: 2021-07-21T17:32:28Z + type: string + required: + - code + - message + - status + - timestamp + - type + type: object + x-category: response + x-go-type: ApiError + x-go-name: ApiError + DLTProtocol: + description: Supported DLT protocols. + enum: + - HyperledgerFabric + - HyperledgerBesu + type: string + x-category: satp-core + DLTNetworkID: + description: "The network of the DLT being interacted with. TODO: implement\ + \ network identification draft" + type: string + x-category: satp-core + DLTSubnetworkID: + description: "The subnetwork of the DLT being interacted with. TODO: implement\ + \ network identification draft" + type: string + x-category: satp-core + SessionID: + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + type: string + x-category: satp-core + Address: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + AmountString: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + AmountDecimal: + description: Amount value with decimal places + example: 100.33 + format: float + type: number + TokenSymbol: + description: The symbol of a token + example: ETH + type: string + LogoURI: + description: "The logo of a token, chain, dex etc." + format: uri + type: string + RoutesResponse: + description: A collection of available and unavailable routes + properties: + routes: + description: A collection of route objects + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner' + type: array + required: + - routes + type: object + Route: + properties: + id: + description: A unique identifier of the route. + type: string + gatewayID: + description: A unique identifier for the gateway. + format: uuid + type: string + mode: + description: "The mode of operation for this route - 'data' for arbitrary\ + \ payload handling, 'transfer' for asset transfer." + enum: + - data + - transfer + type: string + fromDLTNetworkID: + description: The ID of the DLT Network where the operation will originate. + type: string + fromAmountUSD: + description: "The amount of 'fromToken' to be transferred in USD, specified\ + \ as a string to maintain precision." + format: double + type: string + fromAmount: + description: "The amount that should be sent including all decimals (e.g.,\ + \ 1000000 for 1 USDC (6 decimals))." + pattern: "^[1-9][0-9]*$" + type: string + fromToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + toDLTNetworkID: + description: The ID of the DLT Network where the operation will end. + type: string + toAmountUSD: + description: The expected amount to be received in USD. + type: string + toAmount: + description: "The expected amount to be received including all decimals\ + \ (e.g., 1000000 for 1 USDC (6 decimals))." + type: string + toAmountMin: + description: "The minimum expected amount to be received including all decimals\ + \ (e.g., 1000000 for 1 USDC (6 decimals))." + type: string + toToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + gasCostUSD: + description: The expected gas cost in USD. + type: string + containsSwitchChain: + description: Whether chain switching is enabled or not. + type: boolean + steps: + description: "List of steps involved in this route, adjusted for mode." + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner' + type: array + insurance: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_insurance' + tags: + description: List of tags identifiers providing additional context or categorization. + example: + - satp + - hyperledger + items: + type: string + title: Tags + type: array + required: + - gatewayID + - id + - mode + type: object + ContinueRequest: + description: Schema for a request to continue a paused transaction session. + example: + contextId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + sessionId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + sessionId: + description: A unique identifier for the transaction session to be continued. + format: uuid + type: string + contextId: + description: A unique identifier for the transaction context. + format: uuid + type: string + required: + - contextId + - sessionId + type: object + ContinueResponse: + description: "Response schema for a continue request, returning the status of\ + \ the SATP session." + properties: + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + required: + - statusResponse + type: object + Chain: + properties: + chainId: + description: A unique identifier for the blockchain network. + type: string + chainName: + description: The name of the blockchain network. + type: string + chainType: + description: "The type of blockchain network (e.g., 'evm', 'fabric')." + type: string + networkName: + description: "The specific network name within the blockchain (e.g., 'mainnet',\ + \ 'testnet')." + type: string + required: + - chainId + - chainName + - chainType + - networkName + type: object + Chains: + description: List of chains and related metadata + items: + $ref: '#/components/schemas/Chains_1_inner' + title: Chains + type: array + Token: + description: Metadata detailing a supported token + properties: + chainID: + description: "The network of the DLT being interacted with. TODO: implement\ + \ network identification draft" + type: string + x-category: satp-core + chainType: + description: Supported DLT protocols. + enum: + - HyperledgerFabric + - HyperledgerBesu + type: string + x-category: satp-core + address: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + name: + description: The name of the token. + type: string + symbol: + description: The symbol of the token. + type: string + decimals: + description: How many decimals the token supports. + minimum: 1 + type: integer + logoURI: + description: "The logo of a token, chain, dex etc." + format: uri + type: string + tags: + description: List of tags identifiers providing additional context or categorization. + example: + - satp + - hyperledger + items: + type: string + title: Tags + type: array + priceUSD: + description: The current price of the token in USD. + type: string + extensions: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken_extensions' + required: + - address + - chainID + - chainType + - decimals + - symbol + type: object + Tags: + description: List of tags identifiers providing additional context or categorization. + example: + - satp + - hyperledger + items: + type: string + title: Tags + type: array + HealthCheckResponse: + properties: + status: + example: OK + type: string + type: object + BridgeInfo: + description: Information about the bridge used for the token transfer. + properties: + tokenAddress: + description: The address of the token being transferred. + example: 0x... + type: string + type: object + IncludedStep: + description: Details a single step within a route including actions and estimates. + properties: + id: + description: Id of the step + type: string + type: + description: "Type of the step, typically describing the action, e.g., 'swap'." + type: string + tool: + description: "Tool used in the step, e.g., 'stargate'." + type: string + action: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_action' + estimate: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_estimate' + toolDetails: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_toolDetails' + integrationDetails: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_toolDetails' + includedStepIds: + description: "IDs of further steps included within this step, allowing for\ + \ nested actions without direct recursion." + items: + type: string + type: array + type: object + Insurance: + properties: + state: + description: The state of insurance applicability for the transaction. + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + example: NOT_INSURABLE + type: string + feeAmountUsd: + description: "The fee amount for insurance, represented in USD." + example: "10.00" + pattern: "^(0|[1-9]\\d*)(\\.\\d+)?$" + type: string + type: object + Action: + properties: + fromToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + fromAmount: + description: "The amount of 'fromToken' to be transferred, specified as\ + \ a string to maintain precision." + example: "1000000000000000000" + pattern: "^[1-9][0-9]*$" + type: string + toToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + slippage: + description: The maximum acceptable difference between the expected price + of the 'toToken' and the price at the time of the transfer. + example: 0.005 + format: float + type: number + fromAddress: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + toAddress: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + type: object + IntegrationDetails: + description: Describes integration or tool details such as bridges or exchanges + involved in the transaction. + properties: + key: + description: A unique identifier for the integration or tool. + example: 1inch + type: string + name: + description: The name of the integration or tool. + example: 1inch Exchange + type: string + logoURI: + description: URL to the logo of the integration or tool. + example: https://cdn.example.com/logos/1inch.png + format: uri + type: string + required: + - key + - logoURI + - name + type: object + Estimate: + description: "Provides an estimation for a transaction, including costs, amounts,\ + \ and execution duration." + properties: + approvalAddress: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + toAmountMin: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + toAmount: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + fromAmount: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + feeCosts: + description: A collection of fee costs associated with the transaction. + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_estimate_feeCosts_inner' + type: array + gasCosts: + description: A collection of estimated gas costs for executing the transaction. + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_estimate_gasCosts_inner' + type: array + executionDuration: + description: The estimated duration for the transaction execution in seconds. + example: 30 + type: integer + fromAmountUSD: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + toAmountUSD: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + tool: + description: The tool or service used to generate this estimate. + example: satp + type: string + type: object + FeeCost: + description: Details about a specific fee cost associated with the transaction. + properties: + name: + description: Name of the fee cost. + example: Network Fee + type: string + amount: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + amountUSD: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + token: + description: The symbol of a token + example: ETH + type: string + included: + description: Indicates if the fee is included in the transaction amount. + type: boolean + type: object + GasCost: + properties: + type: + description: The type of the gas cost. + example: SEND + type: string + price: + description: "The gas price, specified as a string to maintain precision." + example: "19236858243" + type: string + estimate: + description: "The estimated gas required, specified as a string to maintain\ + \ precision." + example: "445393" + type: string + limit: + description: "The gas limit for the transaction, specified as a string to\ + \ maintain precision." + example: "579011" + pattern: "^[1-9][0-9]*$" + type: string + amount: + description: The amount of gas required in the gas currency. + example: "8567962003424499" + pattern: "^[1-9][0-9]*$" + type: string + amountUSD: + description: The amount of gas required in USD. + example: "16.05" + pattern: "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + type: string + token: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + type: object + Transact_request: + description: "Request schema for initiating a transaction. Includes details\ + \ such as the transaction context, mode (data or transfer), payload, and information\ + \ about the source and destination DLT networks." + properties: + contextID: + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + mode: + enum: + - data + - transfer + example: transfer + type: string + payload: + example: "{\"data\":\"example payload\"}" + type: string + fromDLTNetworkID: + example: network1 + type: string + toDLTNetworkID: + example: network2 + type: string + fromAmount: + example: "100" + type: string + fromToken: + example: TOKEN1 + type: string + toAmount: + example: "95" + type: string + toToken: + example: TOKEN2 + type: string + required: + - contextID + - mode + type: object + Transact_200_response_statusResponse_originChain: + example: + dltSubnetworkID: subnetwork1 + dltProtocol: HyperledgerFabric + properties: + dltProtocol: + example: HyperledgerFabric + dltSubnetworkID: + example: subnetwork1 + type: object + Transact_200_response_statusResponse_destinationChain: + example: + dltSubnetworkID: subnetwork2 + dltProtocol: HyperledgerBesu + properties: + dltProtocol: + example: HyperledgerBesu + dltSubnetworkID: + example: subnetwork2 + type: object + Transact_200_response_statusResponse: + description: "Provides the current status of the SATP session including detailed\ + \ information on the progress, such as substatus, stage, and step, along with\ + \ the session start time and chain information." + example: + stage: STAGE3 + substatus: COMPLETED + originChain: + dltSubnetworkID: subnetwork1 + dltProtocol: HyperledgerFabric + step: transfer-complete-message + startTime: 2023-01-01T00:00:00Z + destinationChain: + dltSubnetworkID: subnetwork2 + dltProtocol: HyperledgerBesu + status: DONE + properties: + status: + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + example: DONE + type: string + substatus: + enum: + - WAIT_SOURCE_CONFIRMATIONS + - WAIT_DESTINATION_TRANSACTION + - BRIDGE_NOT_AVAILABLE + - CHAIN_NOT_AVAILABLE + - REFUND_IN_PROGRESS + - UNKNOWN_ERROR + - COMPLETED + - PARTIAL + - REFUNDED + - NOT_PROCESSABLE_REFUND_NEEDED + example: COMPLETED + type: string + stage: + enum: + - STAGE0 + - STAGE1 + - STAGE2 + - STAGE3 + example: STAGE3 + type: string + step: + enum: + - transfer-initialization-claims + - conveyance-of-network-capabilities-and-parameters + - transfer-proposal-message + - transfer-proposal-receipt-message + - transfer-proposal-reject-and-conditional-reject-message + - transfer-commence-message + - commence-response-message + - lock-assertion-message + - lock-assertion-receipt-message + - commit-preparation-message + - commit-ready-message + - commit-final-assertion-message + - commit-final-acknowledgement-receipt-message + - transfer-complete-message + - rollback-transfer-initialization-claims + - rollback-conveyance-of-network-capabilities-and-parameters + - rollback-transfer-proposal-message + - rollback-transfer-proposal-receipt-message + - rollback-transfer-proposal-reject-and-conditional-reject-message + - rollback-transfer-commence-message + - rollback-commence-response-message + - rollback-lock-assertion-message + - rollback-lock-assertion-receipt-message + - rollback-commit-preparation-message + - rollback-commit-ready-message + - rollback-commit-final-assertion-message + - rollback-commit-final-acknowledgement-receipt-message + - rollback-transfer-complete-message + example: transfer-complete-message + type: string + startTime: + example: 2023-01-01T00:00:00Z + format: date-time + type: string + originChain: + $ref: '#/components/schemas/Transact_200_response_statusResponse_originChain' + destinationChain: + $ref: '#/components/schemas/Transact_200_response_statusResponse_destinationChain' + required: + - destinationChain + - originChain + - stage + - startTime + - status + - step + - substatus + type: object + x-category: response + Transact_200_response: + description: Response schema for a transaction request. Includes the session + ID and the current status of the transaction. + example: + statusResponse: + stage: STAGE3 + substatus: COMPLETED + originChain: + dltSubnetworkID: subnetwork1 + dltProtocol: HyperledgerFabric + step: transfer-complete-message + startTime: 2023-01-01T00:00:00Z + destinationChain: + dltSubnetworkID: subnetwork2 + dltProtocol: HyperledgerBesu + status: DONE + sessionID: 000003e8-e0b8-21ee-ba00-325096b39f47 + properties: + sessionID: + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + type: string + x-category: satp-core + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + required: + - sessionID + - statusResponse + type: object + Transact_default_response: + description: An Error + properties: + type: + description: HTTP error type + example: bad-request + type: string + code: + description: Numeric error code + example: 16384 + type: integer + status: + description: HTTP status of the error + example: 500 + type: integer + message: + description: Long error description + example: Oops there's been an internal error handling + type: string + timestamp: + description: Timestamp of the error + example: 2021-07-21T17:32:28Z + type: string + required: + - code + - message + - status + - timestamp + - type + type: object + x-category: response + x-go-type: ApiError + x-go-name: ApiError + Cancel_request: + description: "Request to cancel an ongoing transaction session, identified by\ + \ the session ID." + properties: + sessionID: + description: Unique identifier (UUID) for the session. + example: 000003e8-e0b8-21ee-ba00-325096b39f47 + type: string + x-category: satp-core + required: + - sessionID + type: object + Cancel_200_response: + description: Response for a cancel transaction request. Indicates whether the + cancel action was successful and includes the current session status. + example: + statusResponse: + stage: STAGE3 + substatus: COMPLETED + originChain: + dltSubnetworkID: subnetwork1 + dltProtocol: HyperledgerFabric + step: transfer-complete-message + startTime: 2023-01-01T00:00:00Z + destinationChain: + dltSubnetworkID: subnetwork2 + dltProtocol: HyperledgerBesu + status: DONE + cancelSuccessful: true + properties: + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + cancelSuccessful: + description: Indicates whether the cancel operation was successful. + example: true + type: boolean + required: + - cancelSuccessful + - statusResponse + type: object + GetHealthCheck_200_response: + example: + status: OK + properties: + status: + example: OK + type: string + type: object + Continue_request: + description: Schema for a request to continue a paused transaction session. + properties: + sessionId: + description: A unique identifier for the transaction session to be continued. + format: uuid + type: string + contextId: + description: A unique identifier for the transaction context. + format: uuid + type: string + required: + - contextId + - sessionId + type: object + Continue_200_response: + description: "Response schema for a continue request, returning the status of\ + \ the SATP session." + example: + statusResponse: + stage: STAGE3 + substatus: COMPLETED + originChain: + dltSubnetworkID: subnetwork1 + dltProtocol: HyperledgerFabric + step: transfer-complete-message + startTime: 2023-01-01T00:00:00Z + destinationChain: + dltSubnetworkID: subnetwork2 + dltProtocol: HyperledgerBesu + status: DONE + properties: + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + required: + - statusResponse + type: object + Pause_request: + description: "Request to temporarily pause an ongoing transaction session, identified\ + \ by the session and context IDs." + properties: + sessionId: + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + contextId: + example: 123e4567-e89b-12d3-a456-426614174001 + format: uuid + type: string + type: object + Pause_200_response: + description: Response for a pause transaction request. Returns the current status + of the SATP session post-pause action. + example: + statusResponse: + stage: STAGE3 + substatus: COMPLETED + originChain: + dltSubnetworkID: subnetwork1 + dltProtocol: HyperledgerFabric + step: transfer-complete-message + startTime: 2023-01-01T00:00:00Z + destinationChain: + dltSubnetworkID: subnetwork2 + dltProtocol: HyperledgerBesu + status: DONE + properties: + statusResponse: + $ref: '#/components/schemas/Transact_200_response_statusResponse' + required: + - statusResponse + type: object + Chains_1_inner: + example: + chainName: chainName + chainId: chainId + networkName: networkName + chainType: chainType + properties: + chainId: + description: A unique identifier for the blockchain network. + type: string + chainName: + description: The name of the blockchain network. + type: string + chainType: + description: "The type of blockchain network (e.g., 'evm', 'fabric')." + type: string + networkName: + description: "The specific network name within the blockchain (e.g., 'mainnet',\ + \ 'testnet')." + type: string + required: + - chainId + - chainName + - chainType + - networkName + type: object + GetRoutes_200_response_routes_inner_fromToken_extensions_bridgeInfo_value: + description: Information about the bridge used for the token transfer. + example: + tokenAddress: 0x... + properties: + tokenAddress: + description: The address of the token being transferred. + example: 0x... + type: string + type: object + GetRoutes_200_response_routes_inner_fromToken_extensions: + example: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + properties: + bridgeInfo: + additionalProperties: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken_extensions_bridgeInfo_value' + type: object + verified: + description: Indicates whether the token is verified. + type: boolean + type: object + GetRoutes_200_response_routes_inner_fromToken: + description: Metadata detailing a supported token + example: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + properties: + chainID: + description: "The network of the DLT being interacted with. TODO: implement\ + \ network identification draft" + type: string + x-category: satp-core + chainType: + description: Supported DLT protocols. + enum: + - HyperledgerFabric + - HyperledgerBesu + type: string + x-category: satp-core + address: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + name: + description: The name of the token. + type: string + symbol: + description: The symbol of the token. + type: string + decimals: + description: How many decimals the token supports. + minimum: 1 + type: integer + logoURI: + description: "The logo of a token, chain, dex etc." + format: uri + type: string + tags: + description: List of tags identifiers providing additional context or categorization. + example: + - satp + - hyperledger + items: + type: string + title: Tags + type: array + priceUSD: + description: The current price of the token in USD. + type: string + extensions: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken_extensions' + required: + - address + - chainID + - chainType + - decimals + - symbol + type: object + GetRoutes_200_response_routes_inner_steps_inner_action: + example: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + properties: + fromToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + fromAmount: + description: "The amount of 'fromToken' to be transferred, specified as\ + \ a string to maintain precision." + example: "1000000000000000000" + pattern: "^[1-9][0-9]*$" + type: string + toToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + slippage: + description: The maximum acceptable difference between the expected price + of the 'toToken' and the price at the time of the transfer. + example: 0.005 + format: float + type: number + fromAddress: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + toAddress: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + type: object + GetRoutes_200_response_routes_inner_steps_inner_estimate_feeCosts_inner: + description: Details about a specific fee cost associated with the transaction. + example: + amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + properties: + name: + description: Name of the fee cost. + example: Network Fee + type: string + amount: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + amountUSD: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + token: + description: The symbol of a token + example: ETH + type: string + included: + description: Indicates if the fee is included in the transaction amount. + type: boolean + type: object + GetRoutes_200_response_routes_inner_steps_inner_estimate_gasCosts_inner: + example: + amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + properties: + type: + description: The type of the gas cost. + example: SEND + type: string + price: + description: "The gas price, specified as a string to maintain precision." + example: "19236858243" + type: string + estimate: + description: "The estimated gas required, specified as a string to maintain\ + \ precision." + example: "445393" + type: string + limit: + description: "The gas limit for the transaction, specified as a string to\ + \ maintain precision." + example: "579011" + pattern: "^[1-9][0-9]*$" + type: string + amount: + description: The amount of gas required in the gas currency. + example: "8567962003424499" + pattern: "^[1-9][0-9]*$" + type: string + amountUSD: + description: The amount of gas required in USD. + example: "16.05" + pattern: "^(0(\\.[0-9]+)?|[1-9][0-9]*(\\.[0-9]+)?)$" + type: string + token: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + type: object + GetRoutes_200_response_routes_inner_steps_inner_estimate: + description: "Provides an estimation for a transaction, including costs, amounts,\ + \ and execution duration." + example: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + properties: + approvalAddress: + description: A blockchain address. + example: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + type: string + toAmountMin: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + toAmount: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + fromAmount: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + feeCosts: + description: A collection of fee costs associated with the transaction. + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_estimate_feeCosts_inner' + type: array + gasCosts: + description: A collection of estimated gas costs for executing the transaction. + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_estimate_gasCosts_inner' + type: array + executionDuration: + description: The estimated duration for the transaction execution in seconds. + example: 30 + type: integer + fromAmountUSD: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + toAmountUSD: + description: The amount in string format including all decimals. + example: "1000000000000000000" + pattern: "^([1-9][0-9]*|0)(\\.[0-9]+)?$" + type: string + tool: + description: The tool or service used to generate this estimate. + example: satp + type: string + type: object + GetRoutes_200_response_routes_inner_steps_inner_toolDetails: + description: Describes integration or tool details such as bridges or exchanges + involved in the transaction. + example: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + properties: + key: + description: A unique identifier for the integration or tool. + example: 1inch + type: string + name: + description: The name of the integration or tool. + example: 1inch Exchange + type: string + logoURI: + description: URL to the logo of the integration or tool. + example: https://cdn.example.com/logos/1inch.png + format: uri + type: string + required: + - key + - logoURI + - name + type: object + GetRoutes_200_response_routes_inner_steps_inner: + description: Details a single step within a route including actions and estimates. + example: + estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + properties: + id: + description: Id of the step + type: string + type: + description: "Type of the step, typically describing the action, e.g., 'swap'." + type: string + tool: + description: "Tool used in the step, e.g., 'stargate'." + type: string + action: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_action' + estimate: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_estimate' + toolDetails: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_toolDetails' + integrationDetails: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner_toolDetails' + includedStepIds: + description: "IDs of further steps included within this step, allowing for\ + \ nested actions without direct recursion." + items: + type: string + type: array + type: object + GetRoutes_200_response_routes_inner_insurance: + example: + feeAmountUsd: "10.00" + state: NOT_INSURABLE + properties: + state: + description: The state of insurance applicability for the transaction. + enum: + - NOT_INSURABLE + - INSURABLE + - INSURED + example: NOT_INSURABLE + type: string + feeAmountUsd: + description: "The fee amount for insurance, represented in USD." + example: "10.00" + pattern: "^(0|[1-9]\\d*)(\\.\\d+)?$" + type: string + type: object + GetRoutes_200_response_routes_inner: + example: + insurance: + feeAmountUsd: "10.00" + state: NOT_INSURABLE + fromAmount: fromAmount + toAmountMin: toAmountMin + toAmount: toAmount + toAmountUSD: toAmountUSD + steps: + - estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + - estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + tags: + - satp + - hyperledger + mode: data + gasCostUSD: gasCostUSD + fromAmountUSD: fromAmountUSD + toDLTNetworkID: toDLTNetworkID + id: id + containsSwitchChain: true + fromDLTNetworkID: fromDLTNetworkID + gatewayID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + properties: + id: + description: A unique identifier of the route. + type: string + gatewayID: + description: A unique identifier for the gateway. + format: uuid + type: string + mode: + description: "The mode of operation for this route - 'data' for arbitrary\ + \ payload handling, 'transfer' for asset transfer." + enum: + - data + - transfer + type: string + fromDLTNetworkID: + description: The ID of the DLT Network where the operation will originate. + type: string + fromAmountUSD: + description: "The amount of 'fromToken' to be transferred in USD, specified\ + \ as a string to maintain precision." + format: double + type: string + fromAmount: + description: "The amount that should be sent including all decimals (e.g.,\ + \ 1000000 for 1 USDC (6 decimals))." + pattern: "^[1-9][0-9]*$" + type: string + fromToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + toDLTNetworkID: + description: The ID of the DLT Network where the operation will end. + type: string + toAmountUSD: + description: The expected amount to be received in USD. + type: string + toAmount: + description: "The expected amount to be received including all decimals\ + \ (e.g., 1000000 for 1 USDC (6 decimals))." + type: string + toAmountMin: + description: "The minimum expected amount to be received including all decimals\ + \ (e.g., 1000000 for 1 USDC (6 decimals))." + type: string + toToken: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' + gasCostUSD: + description: The expected gas cost in USD. + type: string + containsSwitchChain: + description: Whether chain switching is enabled or not. + type: boolean + steps: + description: "List of steps involved in this route, adjusted for mode." + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_steps_inner' + type: array + insurance: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_insurance' + tags: + description: List of tags identifiers providing additional context or categorization. + example: + - satp + - hyperledger + items: + type: string + title: Tags + type: array + required: + - gatewayID + - id + - mode + type: object + GetRoutes_200_response: + description: A collection of available and unavailable routes + example: + routes: + - insurance: + feeAmountUsd: "10.00" + state: NOT_INSURABLE + fromAmount: fromAmount + toAmountMin: toAmountMin + toAmount: toAmount + toAmountUSD: toAmountUSD + steps: + - estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + - estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + tags: + - satp + - hyperledger + mode: data + gasCostUSD: gasCostUSD + fromAmountUSD: fromAmountUSD + toDLTNetworkID: toDLTNetworkID + id: id + containsSwitchChain: true + fromDLTNetworkID: fromDLTNetworkID + gatewayID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - insurance: + feeAmountUsd: "10.00" + state: NOT_INSURABLE + fromAmount: fromAmount + toAmountMin: toAmountMin + toAmount: toAmount + toAmountUSD: toAmountUSD + steps: + - estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + - estimate: + toAmountMin: "1000000000000000000" + fromAmount: "1000000000000000000" + toAmount: "1000000000000000000" + gasCosts: + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + - amount: "8567962003424499" + amountUSD: "16.05" + price: "19236858243" + estimate: "445393" + limit: "579011" + type: SEND + token: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + fromAmountUSD: "1000000000000000000" + approvalAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + feeCosts: + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + - amount: "1000000000000000000" + amountUSD: "1000000000000000000" + name: Network Fee + included: true + token: ETH + executionDuration: 30 + toAmountUSD: "1000000000000000000" + tool: satp + action: + fromAmount: "1000000000000000000" + fromAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + slippage: 0.005 + toAddress: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + id: id + type: type + tool: tool + integrationDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + includedStepIds: + - includedStepIds + - includedStepIds + toolDetails: + name: 1inch Exchange + logoURI: https://cdn.example.com/logos/1inch.png + key: 1inch + toToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + tags: + - satp + - hyperledger + mode: data + gasCostUSD: gasCostUSD + fromAmountUSD: fromAmountUSD + toDLTNetworkID: toDLTNetworkID + id: id + containsSwitchChain: true + fromDLTNetworkID: fromDLTNetworkID + gatewayID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fromToken: + symbol: symbol + extensions: + bridgeInfo: + key: + tokenAddress: 0x... + verified: true + address: 0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7 + priceUSD: priceUSD + chainID: chainID + decimals: 1 + name: name + chainType: HyperledgerFabric + logoURI: https://openapi-generator.tech + tags: + - satp + - hyperledger + properties: + routes: + description: A collection of route objects + items: + $ref: '#/components/schemas/GetRoutes_200_response_routes_inner' + type: array + required: + - routes + type: object + GetAudit_200_response: + description: Response schema for an audit request. Contains the proofs generated + during the audit period and the start and end datetimes. + example: + proofs: + - proof1 + - proof2 + auditEndTime: 2023-01-31T23:59:59Z + auditStartTime: 2023-01-01T00:00:00Z + properties: + proofs: + description: An array of strings representing proofs. + example: + - proof1 + - proof2 + items: + type: string + type: array + auditStartTime: + description: The start datetime of the audit period. + example: 2023-01-01T00:00:00Z + format: date-time + type: string + auditEndTime: + description: The end datetime of the audit period. + example: 2023-01-31T23:59:59Z + format: date-time + type: string + type: object + x-category: response diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go new file mode 100644 index 0000000000..9b9e6b64be --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go @@ -0,0 +1,671 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "time" +) + + +type AdminApi interface { + + /* + CallContinue Continue a paused transaction session + + Attempts to continue a previously paused transaction intent, resuming its execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCallContinueRequest + */ + CallContinue(ctx context.Context) ApiCallContinueRequest + + // CallContinueExecute executes the request + // @return Continue200Response + CallContinueExecute(r ApiCallContinueRequest) (*Continue200Response, *http.Response, error) + + /* + GetAudit Audit transactions + + Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAuditRequest + */ + GetAudit(ctx context.Context) ApiGetAuditRequest + + // GetAuditExecute executes the request + // @return GetAudit200Response + GetAuditExecute(r ApiGetAuditRequest) (*GetAudit200Response, *http.Response, error) + + /* + GetHealthCheck Health check endpoint + + Responds if SATP Hermes is on + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetHealthCheckRequest + */ + GetHealthCheck(ctx context.Context) ApiGetHealthCheckRequest + + // GetHealthCheckExecute executes the request + // @return GetHealthCheck200Response + GetHealthCheckExecute(r ApiGetHealthCheckRequest) (*GetHealthCheck200Response, *http.Response, error) + + /* + GetStatus Get SATP current session data + + Retrieve the status of a SATP session + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetStatusRequest + */ + GetStatus(ctx context.Context) ApiGetStatusRequest + + // GetStatusExecute executes the request + // @return Transact200ResponseStatusResponse + GetStatusExecute(r ApiGetStatusRequest) (*Transact200ResponseStatusResponse, *http.Response, error) + + /* + Pause Pause a transaction session + + Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPauseRequest + */ + Pause(ctx context.Context) ApiPauseRequest + + // PauseExecute executes the request + // @return Pause200Response + PauseExecute(r ApiPauseRequest) (*Pause200Response, *http.Response, error) +} + +// AdminApiService AdminApi service +type AdminApiService service + +type ApiCallContinueRequest struct { + ctx context.Context + ApiService AdminApi + continueRequest *ContinueRequest +} + +func (r ApiCallContinueRequest) ContinueRequest(continueRequest ContinueRequest) ApiCallContinueRequest { + r.continueRequest = &continueRequest + return r +} + +func (r ApiCallContinueRequest) Execute() (*Continue200Response, *http.Response, error) { + return r.ApiService.CallContinueExecute(r) +} + +/* +CallContinue Continue a paused transaction session + +Attempts to continue a previously paused transaction intent, resuming its execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCallContinueRequest +*/ +func (a *AdminApiService) CallContinue(ctx context.Context) ApiCallContinueRequest { + return ApiCallContinueRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Continue200Response +func (a *AdminApiService) CallContinueExecute(r ApiCallContinueRequest) (*Continue200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Continue200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.CallContinue") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.continueRequest == nil { + return localVarReturnValue, nil, reportError("continueRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.continueRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAuditRequest struct { + ctx context.Context + ApiService AdminApi + auditStartDate *time.Time + auditEndDate *time.Time + includeProofs *bool +} + +// The start date for the audit period. +func (r ApiGetAuditRequest) AuditStartDate(auditStartDate time.Time) ApiGetAuditRequest { + r.auditStartDate = &auditStartDate + return r +} + +// The end date for the audit period. +func (r ApiGetAuditRequest) AuditEndDate(auditEndDate time.Time) ApiGetAuditRequest { + r.auditEndDate = &auditEndDate + return r +} + +// Include proofs generated from each gateway transaction. +func (r ApiGetAuditRequest) IncludeProofs(includeProofs bool) ApiGetAuditRequest { + r.includeProofs = &includeProofs + return r +} + +func (r ApiGetAuditRequest) Execute() (*GetAudit200Response, *http.Response, error) { + return r.ApiService.GetAuditExecute(r) +} + +/* +GetAudit Audit transactions + +Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAuditRequest +*/ +func (a *AdminApiService) GetAudit(ctx context.Context) ApiGetAuditRequest { + return ApiGetAuditRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetAudit200Response +func (a *AdminApiService) GetAuditExecute(r ApiGetAuditRequest) (*GetAudit200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAudit200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetAudit") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.auditStartDate != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "auditStartDate", r.auditStartDate, "") + } + if r.auditEndDate != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "auditEndDate", r.auditEndDate, "") + } + if r.includeProofs != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeProofs", r.includeProofs, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetHealthCheckRequest struct { + ctx context.Context + ApiService AdminApi +} + +func (r ApiGetHealthCheckRequest) Execute() (*GetHealthCheck200Response, *http.Response, error) { + return r.ApiService.GetHealthCheckExecute(r) +} + +/* +GetHealthCheck Health check endpoint + +Responds if SATP Hermes is on + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetHealthCheckRequest +*/ +func (a *AdminApiService) GetHealthCheck(ctx context.Context) ApiGetHealthCheckRequest { + return ApiGetHealthCheckRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetHealthCheck200Response +func (a *AdminApiService) GetHealthCheckExecute(r ApiGetHealthCheckRequest) (*GetHealthCheck200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetHealthCheck200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetHealthCheck") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetStatusRequest struct { + ctx context.Context + ApiService AdminApi + sessionID *string +} + +// Unique identifier for the session. +func (r ApiGetStatusRequest) SessionID(sessionID string) ApiGetStatusRequest { + r.sessionID = &sessionID + return r +} + +func (r ApiGetStatusRequest) Execute() (*Transact200ResponseStatusResponse, *http.Response, error) { + return r.ApiService.GetStatusExecute(r) +} + +/* +GetStatus Get SATP current session data + +Retrieve the status of a SATP session + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetStatusRequest +*/ +func (a *AdminApiService) GetStatus(ctx context.Context) ApiGetStatusRequest { + return ApiGetStatusRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Transact200ResponseStatusResponse +func (a *AdminApiService) GetStatusExecute(r ApiGetStatusRequest) (*Transact200ResponseStatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Transact200ResponseStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/status" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sessionID == nil { + return localVarReturnValue, nil, reportError("sessionID is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "SessionID", r.sessionID, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPauseRequest struct { + ctx context.Context + ApiService AdminApi + pauseRequest *PauseRequest +} + +func (r ApiPauseRequest) PauseRequest(pauseRequest PauseRequest) ApiPauseRequest { + r.pauseRequest = &pauseRequest + return r +} + +func (r ApiPauseRequest) Execute() (*Pause200Response, *http.Response, error) { + return r.ApiService.PauseExecute(r) +} + +/* +Pause Pause a transaction session + +Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPauseRequest +*/ +func (a *AdminApiService) Pause(ctx context.Context) ApiPauseRequest { + return ApiPauseRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Pause200Response +func (a *AdminApiService) PauseExecute(r ApiPauseRequest) (*Pause200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Pause200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.Pause") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pauseRequest == nil { + return localVarReturnValue, nil, reportError("pauseRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pauseRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_transaction.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_transaction.go new file mode 100644 index 0000000000..ef1bdc66de --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_transaction.go @@ -0,0 +1,609 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type TransactionApi interface { + + /* + Cancel Cancel a transaction session + + Attempts to cancel a previously submitted transaction intent using its session ID. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCancelRequest + */ + Cancel(ctx context.Context) ApiCancelRequest + + // CancelExecute executes the request + // @return Cancel200Response + CancelExecute(r ApiCancelRequest) (*Cancel200Response, *http.Response, error) + + /* + GetIntegrations Get supported integrations + + Retrieves metadata about each supported blockchain networks, chains, and other systems. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetIntegrationsRequest + */ + GetIntegrations(ctx context.Context) ApiGetIntegrationsRequest + + // GetIntegrationsExecute executes the request + // @return []Chains1Inner + GetIntegrationsExecute(r ApiGetIntegrationsRequest) ([]Chains1Inner, *http.Response, error) + + /* + GetRoutes Get a list of routes for a gateway-to-gateway asset transfer + + Get a list of possible routes for swapping one asset for another across multiple exchanges + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRoutesRequest + */ + GetRoutes(ctx context.Context) ApiGetRoutesRequest + + // GetRoutesExecute executes the request + // @return GetRoutes200Response + GetRoutesExecute(r ApiGetRoutesRequest) (*GetRoutes200Response, *http.Response, error) + + /* + Transact Submit a transaction intent + + Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransactRequest + */ + Transact(ctx context.Context) ApiTransactRequest + + // TransactExecute executes the request + // @return Transact200Response + TransactExecute(r ApiTransactRequest) (*Transact200Response, *http.Response, error) +} + +// TransactionApiService TransactionApi service +type TransactionApiService service + +type ApiCancelRequest struct { + ctx context.Context + ApiService TransactionApi + cancelRequest *CancelRequest +} + +func (r ApiCancelRequest) CancelRequest(cancelRequest CancelRequest) ApiCancelRequest { + r.cancelRequest = &cancelRequest + return r +} + +func (r ApiCancelRequest) Execute() (*Cancel200Response, *http.Response, error) { + return r.ApiService.CancelExecute(r) +} + +/* +Cancel Cancel a transaction session + +Attempts to cancel a previously submitted transaction intent using its session ID. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCancelRequest +*/ +func (a *TransactionApiService) Cancel(ctx context.Context) ApiCancelRequest { + return ApiCancelRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Cancel200Response +func (a *TransactionApiService) CancelExecute(r ApiCancelRequest) (*Cancel200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Cancel200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.Cancel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cancelRequest == nil { + return localVarReturnValue, nil, reportError("cancelRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cancelRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetIntegrationsRequest struct { + ctx context.Context + ApiService TransactionApi +} + +func (r ApiGetIntegrationsRequest) Execute() ([]Chains1Inner, *http.Response, error) { + return r.ApiService.GetIntegrationsExecute(r) +} + +/* +GetIntegrations Get supported integrations + +Retrieves metadata about each supported blockchain networks, chains, and other systems. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetIntegrationsRequest +*/ +func (a *TransactionApiService) GetIntegrations(ctx context.Context) ApiGetIntegrationsRequest { + return ApiGetIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Chains1Inner +func (a *TransactionApiService) GetIntegrationsExecute(r ApiGetIntegrationsRequest) ([]Chains1Inner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Chains1Inner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.GetIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoutesRequest struct { + ctx context.Context + ApiService TransactionApi + fromNetworkID *string + fromAmount *string + fromToken *string + toDLTNetwork *string + toToken *string + fromAddress *string + toAddress *string +} + +// The sending DLT Network. +func (r ApiGetRoutesRequest) FromNetworkID(fromNetworkID string) ApiGetRoutesRequest { + r.fromNetworkID = &fromNetworkID + return r +} + +// The amount that should be sent including all decimals. +func (r ApiGetRoutesRequest) FromAmount(fromAmount string) ApiGetRoutesRequest { + r.fromAmount = &fromAmount + return r +} + +// The token that should be transferred. Can be the address or the symbol. +func (r ApiGetRoutesRequest) FromToken(fromToken string) ApiGetRoutesRequest { + r.fromToken = &fromToken + return r +} + +// The receiving DLT Network. +func (r ApiGetRoutesRequest) ToDLTNetwork(toDLTNetwork string) ApiGetRoutesRequest { + r.toDLTNetwork = &toDLTNetwork + return r +} + +// The token that should be transferred to. Can be the address or the symbol. +func (r ApiGetRoutesRequest) ToToken(toToken string) ApiGetRoutesRequest { + r.toToken = &toToken + return r +} + +// The sending wallet address. +func (r ApiGetRoutesRequest) FromAddress(fromAddress string) ApiGetRoutesRequest { + r.fromAddress = &fromAddress + return r +} + +// The receiving wallet address. If none is provided, the fromAddress will be used. +func (r ApiGetRoutesRequest) ToAddress(toAddress string) ApiGetRoutesRequest { + r.toAddress = &toAddress + return r +} + +func (r ApiGetRoutesRequest) Execute() (*GetRoutes200Response, *http.Response, error) { + return r.ApiService.GetRoutesExecute(r) +} + +/* +GetRoutes Get a list of routes for a gateway-to-gateway asset transfer + +Get a list of possible routes for swapping one asset for another across multiple exchanges + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRoutesRequest +*/ +func (a *TransactionApiService) GetRoutes(ctx context.Context) ApiGetRoutesRequest { + return ApiGetRoutesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRoutes200Response +func (a *TransactionApiService) GetRoutesExecute(r ApiGetRoutesRequest) (*GetRoutes200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRoutes200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.GetRoutes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fromNetworkID == nil { + return localVarReturnValue, nil, reportError("fromNetworkID is required and must be specified") + } + if r.fromAmount == nil { + return localVarReturnValue, nil, reportError("fromAmount is required and must be specified") + } + if r.fromToken == nil { + return localVarReturnValue, nil, reportError("fromToken is required and must be specified") + } + if r.toDLTNetwork == nil { + return localVarReturnValue, nil, reportError("toDLTNetwork is required and must be specified") + } + if r.toToken == nil { + return localVarReturnValue, nil, reportError("toToken is required and must be specified") + } + if r.fromAddress == nil { + return localVarReturnValue, nil, reportError("fromAddress is required and must be specified") + } + if r.toAddress == nil { + return localVarReturnValue, nil, reportError("toAddress is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "fromNetworkID", r.fromNetworkID, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "fromAmount", r.fromAmount, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "fromToken", r.fromToken, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "toDLTNetwork", r.toDLTNetwork, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "toToken", r.toToken, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "fromAddress", r.fromAddress, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "toAddress", r.toAddress, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTransactRequest struct { + ctx context.Context + ApiService TransactionApi + transactRequest *TransactRequest +} + +func (r ApiTransactRequest) TransactRequest(transactRequest TransactRequest) ApiTransactRequest { + r.transactRequest = &transactRequest + return r +} + +func (r ApiTransactRequest) Execute() (*Transact200Response, *http.Response, error) { + return r.ApiService.TransactExecute(r) +} + +/* +Transact Submit a transaction intent + +Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransactRequest +*/ +func (a *TransactionApiService) Transact(ctx context.Context) ApiTransactRequest { + return ApiTransactRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Transact200Response +func (a *TransactionApiService) TransactExecute(r ApiTransactRequest) (*Transact200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Transact200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.Transact") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.transactRequest == nil { + return localVarReturnValue, nil, reportError("transactRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.transactRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v TransactDefaultResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/client.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/client.go new file mode 100644 index 0000000000..1b530a6229 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/client.go @@ -0,0 +1,659 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the SATP Gateway Client (Business Logic Orchestrator) API v0.0.2 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AdminApi AdminApi + + TransactionApi TransactionApi +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AdminApi = (*AdminApiService)(&c.common) + c.TransactionApi = (*TransactionApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/configuration.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/configuration.go new file mode 100644 index 0000000000..1d5aa08091 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/configuration.go @@ -0,0 +1,225 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/v0.0.1/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes", + Description: "Development server", + Variables: map[string]ServerVariable{ + "host": ServerVariable{ + Description: "No description provided", + DefaultValue: "localhost", + }, + "port": ServerVariable{ + Description: "No description provided", + DefaultValue: "3011", + }, + }, + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/APIError.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/APIError.md new file mode 100644 index 0000000000..b5d4b45da5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/APIError.md @@ -0,0 +1,135 @@ +# APIError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | HTTP error type | +**Code** | **int32** | Numeric error code | +**Status** | **int32** | HTTP status of the error | +**Message** | **string** | Long error description | +**Timestamp** | **string** | Timestamp of the error | + +## Methods + +### NewAPIError + +`func NewAPIError(type_ string, code int32, status int32, message string, timestamp string, ) *APIError` + +NewAPIError instantiates a new APIError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAPIErrorWithDefaults + +`func NewAPIErrorWithDefaults() *APIError` + +NewAPIErrorWithDefaults instantiates a new APIError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *APIError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *APIError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *APIError) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCode + +`func (o *APIError) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *APIError) GetCodeOk() (*int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *APIError) SetCode(v int32)` + +SetCode sets Code field to given value. + + +### GetStatus + +`func (o *APIError) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *APIError) GetStatusOk() (*int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *APIError) SetStatus(v int32)` + +SetStatus sets Status field to given value. + + +### GetMessage + +`func (o *APIError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *APIError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *APIError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetTimestamp + +`func (o *APIError) GetTimestamp() string` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *APIError) GetTimestampOk() (*string, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *APIError) SetTimestamp(v string)` + +SetTimestamp sets Timestamp field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Action.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Action.md new file mode 100644 index 0000000000..c78ea1b6bb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Action.md @@ -0,0 +1,186 @@ +# Action + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**FromAmount** | Pointer to **string** | The amount of 'fromToken' to be transferred, specified as a string to maintain precision. | [optional] +**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**Slippage** | Pointer to **float32** | The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. | [optional] +**FromAddress** | Pointer to **string** | A blockchain address. | [optional] +**ToAddress** | Pointer to **string** | A blockchain address. | [optional] + +## Methods + +### NewAction + +`func NewAction() *Action` + +NewAction instantiates a new Action object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewActionWithDefaults + +`func NewActionWithDefaults() *Action` + +NewActionWithDefaults instantiates a new Action object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFromToken + +`func (o *Action) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetFromToken returns the FromToken field if non-nil, zero value otherwise. + +### GetFromTokenOk + +`func (o *Action) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromToken + +`func (o *Action) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetFromToken sets FromToken field to given value. + +### HasFromToken + +`func (o *Action) HasFromToken() bool` + +HasFromToken returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *Action) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *Action) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *Action) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *Action) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetToToken + +`func (o *Action) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetToToken returns the ToToken field if non-nil, zero value otherwise. + +### GetToTokenOk + +`func (o *Action) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToToken + +`func (o *Action) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetToToken sets ToToken field to given value. + +### HasToToken + +`func (o *Action) HasToToken() bool` + +HasToToken returns a boolean if a field has been set. + +### GetSlippage + +`func (o *Action) GetSlippage() float32` + +GetSlippage returns the Slippage field if non-nil, zero value otherwise. + +### GetSlippageOk + +`func (o *Action) GetSlippageOk() (*float32, bool)` + +GetSlippageOk returns a tuple with the Slippage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlippage + +`func (o *Action) SetSlippage(v float32)` + +SetSlippage sets Slippage field to given value. + +### HasSlippage + +`func (o *Action) HasSlippage() bool` + +HasSlippage returns a boolean if a field has been set. + +### GetFromAddress + +`func (o *Action) GetFromAddress() string` + +GetFromAddress returns the FromAddress field if non-nil, zero value otherwise. + +### GetFromAddressOk + +`func (o *Action) GetFromAddressOk() (*string, bool)` + +GetFromAddressOk returns a tuple with the FromAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAddress + +`func (o *Action) SetFromAddress(v string)` + +SetFromAddress sets FromAddress field to given value. + +### HasFromAddress + +`func (o *Action) HasFromAddress() bool` + +HasFromAddress returns a boolean if a field has been set. + +### GetToAddress + +`func (o *Action) GetToAddress() string` + +GetToAddress returns the ToAddress field if non-nil, zero value otherwise. + +### GetToAddressOk + +`func (o *Action) GetToAddressOk() (*string, bool)` + +GetToAddressOk returns a tuple with the ToAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAddress + +`func (o *Action) SetToAddress(v string)` + +SetToAddress sets ToAddress field to given value. + +### HasToAddress + +`func (o *Action) HasToAddress() bool` + +HasToAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AdminApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AdminApi.md new file mode 100644 index 0000000000..9cc592dde0 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AdminApi.md @@ -0,0 +1,343 @@ +# \AdminApi + +All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CallContinue**](AdminApi.md#CallContinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session +[**GetAudit**](AdminApi.md#GetAudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions +[**GetHealthCheck**](AdminApi.md#GetHealthCheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint +[**GetStatus**](AdminApi.md#GetStatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data +[**Pause**](AdminApi.md#Pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session + + + +## CallContinue + +> Continue200Response CallContinue(ctx).ContinueRequest(continueRequest).Execute() + +Continue a paused transaction session + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + continueRequest := *openapiclient.NewContinueRequest("SessionId_example", "ContextId_example") // ContinueRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AdminApi.CallContinue(context.Background()).ContinueRequest(continueRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.CallContinue``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CallContinue`: Continue200Response + fmt.Fprintf(os.Stdout, "Response from `AdminApi.CallContinue`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCallContinueRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **continueRequest** | [**ContinueRequest**](ContinueRequest.md) | | + +### Return type + +[**Continue200Response**](Continue200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAudit + +> GetAudit200Response GetAudit(ctx).AuditStartDate(auditStartDate).AuditEndDate(auditEndDate).IncludeProofs(includeProofs).Execute() + +Audit transactions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + auditStartDate := time.Now() // time.Time | The start date for the audit period. (optional) + auditEndDate := time.Now() // time.Time | The end date for the audit period. (optional) + includeProofs := true // bool | Include proofs generated from each gateway transaction. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AdminApi.GetAudit(context.Background()).AuditStartDate(auditStartDate).AuditEndDate(auditEndDate).IncludeProofs(includeProofs).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetAudit``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAudit`: GetAudit200Response + fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetAudit`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAuditRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auditStartDate** | **time.Time** | The start date for the audit period. | + **auditEndDate** | **time.Time** | The end date for the audit period. | + **includeProofs** | **bool** | Include proofs generated from each gateway transaction. | + +### Return type + +[**GetAudit200Response**](GetAudit200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetHealthCheck + +> GetHealthCheck200Response GetHealthCheck(ctx).Execute() + +Health check endpoint + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AdminApi.GetHealthCheck(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetHealthCheck``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHealthCheck`: GetHealthCheck200Response + fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetHealthCheck`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHealthCheckRequest struct via the builder pattern + + +### Return type + +[**GetHealthCheck200Response**](GetHealthCheck200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetStatus + +> Transact200ResponseStatusResponse GetStatus(ctx).SessionID(sessionID).Execute() + +Get SATP current session data + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + sessionID := "000003e8-e0b8-21ee-ba00-325096b39f47" // string | Unique identifier for the session. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AdminApi.GetStatus(context.Background()).SessionID(sessionID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetStatus`: Transact200ResponseStatusResponse + fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetStatus`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sessionID** | **string** | Unique identifier for the session. | + +### Return type + +[**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Pause + +> Pause200Response Pause(ctx).PauseRequest(pauseRequest).Execute() + +Pause a transaction session + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + pauseRequest := *openapiclient.NewPauseRequest() // PauseRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AdminApi.Pause(context.Background()).PauseRequest(pauseRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.Pause``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Pause`: Pause200Response + fmt.Fprintf(os.Stdout, "Response from `AdminApi.Pause`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPauseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pauseRequest** | [**PauseRequest**](PauseRequest.md) | | + +### Return type + +[**Pause200Response**](Pause200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzJwtClaim.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzJwtClaim.md new file mode 100644 index 0000000000..48c6263e1b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzJwtClaim.md @@ -0,0 +1,11 @@ +# AuthzJwtClaim + +## Enum + + +* `iss` (value: `"Hyperledger Labs - Carbon Accounting Tool"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzScope.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzScope.md new file mode 100644 index 0000000000..72eac21201 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzScope.md @@ -0,0 +1,13 @@ +# AuthzScope + +## Enum + + +* `GroupAdmin` (value: `"group:admin"`) + +* `GroupUser` (value: `"group:user"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/BridgeInfo.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/BridgeInfo.md new file mode 100644 index 0000000000..540060af18 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/BridgeInfo.md @@ -0,0 +1,56 @@ +# BridgeInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TokenAddress** | Pointer to **string** | The address of the token being transferred. | [optional] + +## Methods + +### NewBridgeInfo + +`func NewBridgeInfo() *BridgeInfo` + +NewBridgeInfo instantiates a new BridgeInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBridgeInfoWithDefaults + +`func NewBridgeInfoWithDefaults() *BridgeInfo` + +NewBridgeInfoWithDefaults instantiates a new BridgeInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTokenAddress + +`func (o *BridgeInfo) GetTokenAddress() string` + +GetTokenAddress returns the TokenAddress field if non-nil, zero value otherwise. + +### GetTokenAddressOk + +`func (o *BridgeInfo) GetTokenAddressOk() (*string, bool)` + +GetTokenAddressOk returns a tuple with the TokenAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenAddress + +`func (o *BridgeInfo) SetTokenAddress(v string)` + +SetTokenAddress sets TokenAddress field to given value. + +### HasTokenAddress + +`func (o *BridgeInfo) HasTokenAddress() bool` + +HasTokenAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Cancel200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Cancel200Response.md new file mode 100644 index 0000000000..3bc8510344 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Cancel200Response.md @@ -0,0 +1,72 @@ +# Cancel200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | +**CancelSuccessful** | **bool** | Indicates whether the cancel operation was successful. | + +## Methods + +### NewCancel200Response + +`func NewCancel200Response(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool, ) *Cancel200Response` + +NewCancel200Response instantiates a new Cancel200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCancel200ResponseWithDefaults + +`func NewCancel200ResponseWithDefaults() *Cancel200Response` + +NewCancel200ResponseWithDefaults instantiates a new Cancel200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusResponse + +`func (o *Cancel200Response) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *Cancel200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *Cancel200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + +### GetCancelSuccessful + +`func (o *Cancel200Response) GetCancelSuccessful() bool` + +GetCancelSuccessful returns the CancelSuccessful field if non-nil, zero value otherwise. + +### GetCancelSuccessfulOk + +`func (o *Cancel200Response) GetCancelSuccessfulOk() (*bool, bool)` + +GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCancelSuccessful + +`func (o *Cancel200Response) SetCancelSuccessful(v bool)` + +SetCancelSuccessful sets CancelSuccessful field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelRequest.md new file mode 100644 index 0000000000..bac0a72908 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelRequest.md @@ -0,0 +1,51 @@ +# CancelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionID** | **string** | Unique identifier (UUID) for the session. | + +## Methods + +### NewCancelRequest + +`func NewCancelRequest(sessionID string, ) *CancelRequest` + +NewCancelRequest instantiates a new CancelRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCancelRequestWithDefaults + +`func NewCancelRequestWithDefaults() *CancelRequest` + +NewCancelRequestWithDefaults instantiates a new CancelRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionID + +`func (o *CancelRequest) GetSessionID() string` + +GetSessionID returns the SessionID field if non-nil, zero value otherwise. + +### GetSessionIDOk + +`func (o *CancelRequest) GetSessionIDOk() (*string, bool)` + +GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionID + +`func (o *CancelRequest) SetSessionID(v string)` + +SetSessionID sets SessionID field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelResponse.md new file mode 100644 index 0000000000..e1feb007c4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelResponse.md @@ -0,0 +1,72 @@ +# CancelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | +**CancelSuccessful** | **bool** | Indicates whether the cancel operation was successful. | + +## Methods + +### NewCancelResponse + +`func NewCancelResponse(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool, ) *CancelResponse` + +NewCancelResponse instantiates a new CancelResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCancelResponseWithDefaults + +`func NewCancelResponseWithDefaults() *CancelResponse` + +NewCancelResponseWithDefaults instantiates a new CancelResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusResponse + +`func (o *CancelResponse) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *CancelResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *CancelResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + +### GetCancelSuccessful + +`func (o *CancelResponse) GetCancelSuccessful() bool` + +GetCancelSuccessful returns the CancelSuccessful field if non-nil, zero value otherwise. + +### GetCancelSuccessfulOk + +`func (o *CancelResponse) GetCancelSuccessfulOk() (*bool, bool)` + +GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCancelSuccessful + +`func (o *CancelResponse) SetCancelSuccessful(v bool)` + +SetCancelSuccessful sets CancelSuccessful field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CredentialProfile.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CredentialProfile.md new file mode 100644 index 0000000000..19497ed8b2 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CredentialProfile.md @@ -0,0 +1,15 @@ +# CredentialProfile + +## Enum + + +* `SAML` (value: `"SAML"`) + +* `OAUTH` (value: `"OAUTH"`) + +* `X509` (value: `"X509"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/DLTProtocol.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/DLTProtocol.md new file mode 100644 index 0000000000..c9590c4d54 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/DLTProtocol.md @@ -0,0 +1,13 @@ +# DLTProtocol + +## Enum + + +* `HYPERLEDGER_FABRIC` (value: `"HyperledgerFabric"`) + +* `HYPERLEDGER_BESU` (value: `"HyperledgerBesu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Estimate.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Estimate.md new file mode 100644 index 0000000000..d4bf934c4f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Estimate.md @@ -0,0 +1,290 @@ +# Estimate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApprovalAddress** | Pointer to **string** | A blockchain address. | [optional] +**ToAmountMin** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**ToAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**FromAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**FeeCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md) | A collection of fee costs associated with the transaction. | [optional] +**GasCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md) | A collection of estimated gas costs for executing the transaction. | [optional] +**ExecutionDuration** | Pointer to **int32** | The estimated duration for the transaction execution in seconds. | [optional] +**FromAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**ToAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**Tool** | Pointer to **string** | The tool or service used to generate this estimate. | [optional] + +## Methods + +### NewEstimate + +`func NewEstimate() *Estimate` + +NewEstimate instantiates a new Estimate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEstimateWithDefaults + +`func NewEstimateWithDefaults() *Estimate` + +NewEstimateWithDefaults instantiates a new Estimate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApprovalAddress + +`func (o *Estimate) GetApprovalAddress() string` + +GetApprovalAddress returns the ApprovalAddress field if non-nil, zero value otherwise. + +### GetApprovalAddressOk + +`func (o *Estimate) GetApprovalAddressOk() (*string, bool)` + +GetApprovalAddressOk returns a tuple with the ApprovalAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApprovalAddress + +`func (o *Estimate) SetApprovalAddress(v string)` + +SetApprovalAddress sets ApprovalAddress field to given value. + +### HasApprovalAddress + +`func (o *Estimate) HasApprovalAddress() bool` + +HasApprovalAddress returns a boolean if a field has been set. + +### GetToAmountMin + +`func (o *Estimate) GetToAmountMin() string` + +GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. + +### GetToAmountMinOk + +`func (o *Estimate) GetToAmountMinOk() (*string, bool)` + +GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountMin + +`func (o *Estimate) SetToAmountMin(v string)` + +SetToAmountMin sets ToAmountMin field to given value. + +### HasToAmountMin + +`func (o *Estimate) HasToAmountMin() bool` + +HasToAmountMin returns a boolean if a field has been set. + +### GetToAmount + +`func (o *Estimate) GetToAmount() string` + +GetToAmount returns the ToAmount field if non-nil, zero value otherwise. + +### GetToAmountOk + +`func (o *Estimate) GetToAmountOk() (*string, bool)` + +GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmount + +`func (o *Estimate) SetToAmount(v string)` + +SetToAmount sets ToAmount field to given value. + +### HasToAmount + +`func (o *Estimate) HasToAmount() bool` + +HasToAmount returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *Estimate) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *Estimate) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *Estimate) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *Estimate) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetFeeCosts + +`func (o *Estimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` + +GetFeeCosts returns the FeeCosts field if non-nil, zero value otherwise. + +### GetFeeCostsOk + +`func (o *Estimate) GetFeeCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool)` + +GetFeeCostsOk returns a tuple with the FeeCosts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeeCosts + +`func (o *Estimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner)` + +SetFeeCosts sets FeeCosts field to given value. + +### HasFeeCosts + +`func (o *Estimate) HasFeeCosts() bool` + +HasFeeCosts returns a boolean if a field has been set. + +### GetGasCosts + +`func (o *Estimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` + +GetGasCosts returns the GasCosts field if non-nil, zero value otherwise. + +### GetGasCostsOk + +`func (o *Estimate) GetGasCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool)` + +GetGasCostsOk returns a tuple with the GasCosts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGasCosts + +`func (o *Estimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner)` + +SetGasCosts sets GasCosts field to given value. + +### HasGasCosts + +`func (o *Estimate) HasGasCosts() bool` + +HasGasCosts returns a boolean if a field has been set. + +### GetExecutionDuration + +`func (o *Estimate) GetExecutionDuration() int32` + +GetExecutionDuration returns the ExecutionDuration field if non-nil, zero value otherwise. + +### GetExecutionDurationOk + +`func (o *Estimate) GetExecutionDurationOk() (*int32, bool)` + +GetExecutionDurationOk returns a tuple with the ExecutionDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionDuration + +`func (o *Estimate) SetExecutionDuration(v int32)` + +SetExecutionDuration sets ExecutionDuration field to given value. + +### HasExecutionDuration + +`func (o *Estimate) HasExecutionDuration() bool` + +HasExecutionDuration returns a boolean if a field has been set. + +### GetFromAmountUSD + +`func (o *Estimate) GetFromAmountUSD() string` + +GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. + +### GetFromAmountUSDOk + +`func (o *Estimate) GetFromAmountUSDOk() (*string, bool)` + +GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmountUSD + +`func (o *Estimate) SetFromAmountUSD(v string)` + +SetFromAmountUSD sets FromAmountUSD field to given value. + +### HasFromAmountUSD + +`func (o *Estimate) HasFromAmountUSD() bool` + +HasFromAmountUSD returns a boolean if a field has been set. + +### GetToAmountUSD + +`func (o *Estimate) GetToAmountUSD() string` + +GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. + +### GetToAmountUSDOk + +`func (o *Estimate) GetToAmountUSDOk() (*string, bool)` + +GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountUSD + +`func (o *Estimate) SetToAmountUSD(v string)` + +SetToAmountUSD sets ToAmountUSD field to given value. + +### HasToAmountUSD + +`func (o *Estimate) HasToAmountUSD() bool` + +HasToAmountUSD returns a boolean if a field has been set. + +### GetTool + +`func (o *Estimate) GetTool() string` + +GetTool returns the Tool field if non-nil, zero value otherwise. + +### GetToolOk + +`func (o *Estimate) GetToolOk() (*string, bool)` + +GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTool + +`func (o *Estimate) SetTool(v string)` + +SetTool sets Tool field to given value. + +### HasTool + +`func (o *Estimate) HasTool() bool` + +HasTool returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/FeeCost.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/FeeCost.md new file mode 100644 index 0000000000..688c101bbb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/FeeCost.md @@ -0,0 +1,160 @@ +# FeeCost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name of the fee cost. | [optional] +**Amount** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**AmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**Token** | Pointer to **string** | The symbol of a token | [optional] +**Included** | Pointer to **bool** | Indicates if the fee is included in the transaction amount. | [optional] + +## Methods + +### NewFeeCost + +`func NewFeeCost() *FeeCost` + +NewFeeCost instantiates a new FeeCost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeeCostWithDefaults + +`func NewFeeCostWithDefaults() *FeeCost` + +NewFeeCostWithDefaults instantiates a new FeeCost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FeeCost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FeeCost) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FeeCost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FeeCost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAmount + +`func (o *FeeCost) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *FeeCost) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *FeeCost) SetAmount(v string)` + +SetAmount sets Amount field to given value. + +### HasAmount + +`func (o *FeeCost) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### GetAmountUSD + +`func (o *FeeCost) GetAmountUSD() string` + +GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. + +### GetAmountUSDOk + +`func (o *FeeCost) GetAmountUSDOk() (*string, bool)` + +GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmountUSD + +`func (o *FeeCost) SetAmountUSD(v string)` + +SetAmountUSD sets AmountUSD field to given value. + +### HasAmountUSD + +`func (o *FeeCost) HasAmountUSD() bool` + +HasAmountUSD returns a boolean if a field has been set. + +### GetToken + +`func (o *FeeCost) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *FeeCost) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *FeeCost) SetToken(v string)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *FeeCost) HasToken() bool` + +HasToken returns a boolean if a field has been set. + +### GetIncluded + +`func (o *FeeCost) GetIncluded() bool` + +GetIncluded returns the Included field if non-nil, zero value otherwise. + +### GetIncludedOk + +`func (o *FeeCost) GetIncludedOk() (*bool, bool)` + +GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncluded + +`func (o *FeeCost) SetIncluded(v bool)` + +SetIncluded sets Included field to given value. + +### HasIncluded + +`func (o *FeeCost) HasIncluded() bool` + +HasIncluded returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GasCost.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GasCost.md new file mode 100644 index 0000000000..c42eecb7d9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GasCost.md @@ -0,0 +1,212 @@ +# GasCost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | The type of the gas cost. | [optional] +**Price** | Pointer to **string** | The gas price, specified as a string to maintain precision. | [optional] +**Estimate** | Pointer to **string** | The estimated gas required, specified as a string to maintain precision. | [optional] +**Limit** | Pointer to **string** | The gas limit for the transaction, specified as a string to maintain precision. | [optional] +**Amount** | Pointer to **string** | The amount of gas required in the gas currency. | [optional] +**AmountUSD** | Pointer to **string** | The amount of gas required in USD. | [optional] +**Token** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] + +## Methods + +### NewGasCost + +`func NewGasCost() *GasCost` + +NewGasCost instantiates a new GasCost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGasCostWithDefaults + +`func NewGasCostWithDefaults() *GasCost` + +NewGasCostWithDefaults instantiates a new GasCost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *GasCost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GasCost) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GasCost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GasCost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetPrice + +`func (o *GasCost) GetPrice() string` + +GetPrice returns the Price field if non-nil, zero value otherwise. + +### GetPriceOk + +`func (o *GasCost) GetPriceOk() (*string, bool)` + +GetPriceOk returns a tuple with the Price field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrice + +`func (o *GasCost) SetPrice(v string)` + +SetPrice sets Price field to given value. + +### HasPrice + +`func (o *GasCost) HasPrice() bool` + +HasPrice returns a boolean if a field has been set. + +### GetEstimate + +`func (o *GasCost) GetEstimate() string` + +GetEstimate returns the Estimate field if non-nil, zero value otherwise. + +### GetEstimateOk + +`func (o *GasCost) GetEstimateOk() (*string, bool)` + +GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEstimate + +`func (o *GasCost) SetEstimate(v string)` + +SetEstimate sets Estimate field to given value. + +### HasEstimate + +`func (o *GasCost) HasEstimate() bool` + +HasEstimate returns a boolean if a field has been set. + +### GetLimit + +`func (o *GasCost) GetLimit() string` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *GasCost) GetLimitOk() (*string, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *GasCost) SetLimit(v string)` + +SetLimit sets Limit field to given value. + +### HasLimit + +`func (o *GasCost) HasLimit() bool` + +HasLimit returns a boolean if a field has been set. + +### GetAmount + +`func (o *GasCost) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *GasCost) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *GasCost) SetAmount(v string)` + +SetAmount sets Amount field to given value. + +### HasAmount + +`func (o *GasCost) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### GetAmountUSD + +`func (o *GasCost) GetAmountUSD() string` + +GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. + +### GetAmountUSDOk + +`func (o *GasCost) GetAmountUSDOk() (*string, bool)` + +GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmountUSD + +`func (o *GasCost) SetAmountUSD(v string)` + +SetAmountUSD sets AmountUSD field to given value. + +### HasAmountUSD + +`func (o *GasCost) HasAmountUSD() bool` + +HasAmountUSD returns a boolean if a field has been set. + +### GetToken + +`func (o *GasCost) GetToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *GasCost) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *GasCost) SetToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *GasCost) HasToken() bool` + +HasToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAudit200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAudit200Response.md new file mode 100644 index 0000000000..39756787d6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAudit200Response.md @@ -0,0 +1,108 @@ +# GetAudit200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Proofs** | Pointer to **[]string** | An array of strings representing proofs. | [optional] +**AuditStartTime** | Pointer to **time.Time** | The start datetime of the audit period. | [optional] +**AuditEndTime** | Pointer to **time.Time** | The end datetime of the audit period. | [optional] + +## Methods + +### NewGetAudit200Response + +`func NewGetAudit200Response() *GetAudit200Response` + +NewGetAudit200Response instantiates a new GetAudit200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetAudit200ResponseWithDefaults + +`func NewGetAudit200ResponseWithDefaults() *GetAudit200Response` + +NewGetAudit200ResponseWithDefaults instantiates a new GetAudit200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetProofs + +`func (o *GetAudit200Response) GetProofs() []string` + +GetProofs returns the Proofs field if non-nil, zero value otherwise. + +### GetProofsOk + +`func (o *GetAudit200Response) GetProofsOk() (*[]string, bool)` + +GetProofsOk returns a tuple with the Proofs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProofs + +`func (o *GetAudit200Response) SetProofs(v []string)` + +SetProofs sets Proofs field to given value. + +### HasProofs + +`func (o *GetAudit200Response) HasProofs() bool` + +HasProofs returns a boolean if a field has been set. + +### GetAuditStartTime + +`func (o *GetAudit200Response) GetAuditStartTime() time.Time` + +GetAuditStartTime returns the AuditStartTime field if non-nil, zero value otherwise. + +### GetAuditStartTimeOk + +`func (o *GetAudit200Response) GetAuditStartTimeOk() (*time.Time, bool)` + +GetAuditStartTimeOk returns a tuple with the AuditStartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuditStartTime + +`func (o *GetAudit200Response) SetAuditStartTime(v time.Time)` + +SetAuditStartTime sets AuditStartTime field to given value. + +### HasAuditStartTime + +`func (o *GetAudit200Response) HasAuditStartTime() bool` + +HasAuditStartTime returns a boolean if a field has been set. + +### GetAuditEndTime + +`func (o *GetAudit200Response) GetAuditEndTime() time.Time` + +GetAuditEndTime returns the AuditEndTime field if non-nil, zero value otherwise. + +### GetAuditEndTimeOk + +`func (o *GetAudit200Response) GetAuditEndTimeOk() (*time.Time, bool)` + +GetAuditEndTimeOk returns a tuple with the AuditEndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuditEndTime + +`func (o *GetAudit200Response) SetAuditEndTime(v time.Time)` + +SetAuditEndTime sets AuditEndTime field to given value. + +### HasAuditEndTime + +`func (o *GetAudit200Response) HasAuditEndTime() bool` + +HasAuditEndTime returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditRequest.md new file mode 100644 index 0000000000..97898c53b7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditRequest.md @@ -0,0 +1,108 @@ +# GetAuditRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuditStartDate** | Pointer to **time.Time** | The start datetime for the audit. | [optional] +**AuditEndDate** | Pointer to **time.Time** | The end datetime for the audit. | [optional] +**IncludeProofs** | Pointer to **bool** | Include proofs generated from each gateway transaction. | [optional] + +## Methods + +### NewGetAuditRequest + +`func NewGetAuditRequest() *GetAuditRequest` + +NewGetAuditRequest instantiates a new GetAuditRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetAuditRequestWithDefaults + +`func NewGetAuditRequestWithDefaults() *GetAuditRequest` + +NewGetAuditRequestWithDefaults instantiates a new GetAuditRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAuditStartDate + +`func (o *GetAuditRequest) GetAuditStartDate() time.Time` + +GetAuditStartDate returns the AuditStartDate field if non-nil, zero value otherwise. + +### GetAuditStartDateOk + +`func (o *GetAuditRequest) GetAuditStartDateOk() (*time.Time, bool)` + +GetAuditStartDateOk returns a tuple with the AuditStartDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuditStartDate + +`func (o *GetAuditRequest) SetAuditStartDate(v time.Time)` + +SetAuditStartDate sets AuditStartDate field to given value. + +### HasAuditStartDate + +`func (o *GetAuditRequest) HasAuditStartDate() bool` + +HasAuditStartDate returns a boolean if a field has been set. + +### GetAuditEndDate + +`func (o *GetAuditRequest) GetAuditEndDate() time.Time` + +GetAuditEndDate returns the AuditEndDate field if non-nil, zero value otherwise. + +### GetAuditEndDateOk + +`func (o *GetAuditRequest) GetAuditEndDateOk() (*time.Time, bool)` + +GetAuditEndDateOk returns a tuple with the AuditEndDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuditEndDate + +`func (o *GetAuditRequest) SetAuditEndDate(v time.Time)` + +SetAuditEndDate sets AuditEndDate field to given value. + +### HasAuditEndDate + +`func (o *GetAuditRequest) HasAuditEndDate() bool` + +HasAuditEndDate returns a boolean if a field has been set. + +### GetIncludeProofs + +`func (o *GetAuditRequest) GetIncludeProofs() bool` + +GetIncludeProofs returns the IncludeProofs field if non-nil, zero value otherwise. + +### GetIncludeProofsOk + +`func (o *GetAuditRequest) GetIncludeProofsOk() (*bool, bool)` + +GetIncludeProofsOk returns a tuple with the IncludeProofs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeProofs + +`func (o *GetAuditRequest) SetIncludeProofs(v bool)` + +SetIncludeProofs sets IncludeProofs field to given value. + +### HasIncludeProofs + +`func (o *GetAuditRequest) HasIncludeProofs() bool` + +HasIncludeProofs returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditResponse.md new file mode 100644 index 0000000000..e4792d2d5e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditResponse.md @@ -0,0 +1,108 @@ +# GetAuditResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Proofs** | Pointer to **[]string** | An array of strings representing proofs. | [optional] +**AuditStartTime** | Pointer to **time.Time** | The start datetime of the audit period. | [optional] +**AuditEndTime** | Pointer to **time.Time** | The end datetime of the audit period. | [optional] + +## Methods + +### NewGetAuditResponse + +`func NewGetAuditResponse() *GetAuditResponse` + +NewGetAuditResponse instantiates a new GetAuditResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetAuditResponseWithDefaults + +`func NewGetAuditResponseWithDefaults() *GetAuditResponse` + +NewGetAuditResponseWithDefaults instantiates a new GetAuditResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetProofs + +`func (o *GetAuditResponse) GetProofs() []string` + +GetProofs returns the Proofs field if non-nil, zero value otherwise. + +### GetProofsOk + +`func (o *GetAuditResponse) GetProofsOk() (*[]string, bool)` + +GetProofsOk returns a tuple with the Proofs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProofs + +`func (o *GetAuditResponse) SetProofs(v []string)` + +SetProofs sets Proofs field to given value. + +### HasProofs + +`func (o *GetAuditResponse) HasProofs() bool` + +HasProofs returns a boolean if a field has been set. + +### GetAuditStartTime + +`func (o *GetAuditResponse) GetAuditStartTime() time.Time` + +GetAuditStartTime returns the AuditStartTime field if non-nil, zero value otherwise. + +### GetAuditStartTimeOk + +`func (o *GetAuditResponse) GetAuditStartTimeOk() (*time.Time, bool)` + +GetAuditStartTimeOk returns a tuple with the AuditStartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuditStartTime + +`func (o *GetAuditResponse) SetAuditStartTime(v time.Time)` + +SetAuditStartTime sets AuditStartTime field to given value. + +### HasAuditStartTime + +`func (o *GetAuditResponse) HasAuditStartTime() bool` + +HasAuditStartTime returns a boolean if a field has been set. + +### GetAuditEndTime + +`func (o *GetAuditResponse) GetAuditEndTime() time.Time` + +GetAuditEndTime returns the AuditEndTime field if non-nil, zero value otherwise. + +### GetAuditEndTimeOk + +`func (o *GetAuditResponse) GetAuditEndTimeOk() (*time.Time, bool)` + +GetAuditEndTimeOk returns a tuple with the AuditEndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuditEndTime + +`func (o *GetAuditResponse) SetAuditEndTime(v time.Time)` + +SetAuditEndTime sets AuditEndTime field to given value. + +### HasAuditEndTime + +`func (o *GetAuditResponse) HasAuditEndTime() bool` + +HasAuditEndTime returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200Response.md new file mode 100644 index 0000000000..8aa3a9d2a2 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200Response.md @@ -0,0 +1,51 @@ +# GetRoutes200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Routes** | [**[]GetRoutes200ResponseRoutesInner**](GetRoutes200ResponseRoutesInner.md) | A collection of route objects | + +## Methods + +### NewGetRoutes200Response + +`func NewGetRoutes200Response(routes []GetRoutes200ResponseRoutesInner, ) *GetRoutes200Response` + +NewGetRoutes200Response instantiates a new GetRoutes200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseWithDefaults + +`func NewGetRoutes200ResponseWithDefaults() *GetRoutes200Response` + +NewGetRoutes200ResponseWithDefaults instantiates a new GetRoutes200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoutes + +`func (o *GetRoutes200Response) GetRoutes() []GetRoutes200ResponseRoutesInner` + +GetRoutes returns the Routes field if non-nil, zero value otherwise. + +### GetRoutesOk + +`func (o *GetRoutes200Response) GetRoutesOk() (*[]GetRoutes200ResponseRoutesInner, bool)` + +GetRoutesOk returns a tuple with the Routes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoutes + +`func (o *GetRoutes200Response) SetRoutes(v []GetRoutes200ResponseRoutesInner)` + +SetRoutes sets Routes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInner.md new file mode 100644 index 0000000000..e5e2cf01e1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInner.md @@ -0,0 +1,457 @@ +# GetRoutes200ResponseRoutesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier of the route. | +**GatewayID** | **string** | A unique identifier for the gateway. | +**Mode** | **string** | The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. | +**FromDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will originate. | [optional] +**FromAmountUSD** | Pointer to **float64** | The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. | [optional] +**FromAmount** | Pointer to **string** | The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] +**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**ToDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will end. | [optional] +**ToAmountUSD** | Pointer to **string** | The expected amount to be received in USD. | [optional] +**ToAmount** | Pointer to **string** | The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] +**ToAmountMin** | Pointer to **string** | The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] +**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**GasCostUSD** | Pointer to **string** | The expected gas cost in USD. | [optional] +**ContainsSwitchChain** | Pointer to **bool** | Whether chain switching is enabled or not. | [optional] +**Steps** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInner**](GetRoutes200ResponseRoutesInnerStepsInner.md) | List of steps involved in this route, adjusted for mode. | [optional] +**Insurance** | Pointer to [**GetRoutes200ResponseRoutesInnerInsurance**](GetRoutes200ResponseRoutesInnerInsurance.md) | | [optional] +**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInner + +`func NewGetRoutes200ResponseRoutesInner(id string, gatewayID string, mode string, ) *GetRoutes200ResponseRoutesInner` + +NewGetRoutes200ResponseRoutesInner instantiates a new GetRoutes200ResponseRoutesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerWithDefaults() *GetRoutes200ResponseRoutesInner` + +NewGetRoutes200ResponseRoutesInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *GetRoutes200ResponseRoutesInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetRoutes200ResponseRoutesInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetRoutes200ResponseRoutesInner) SetId(v string)` + +SetId sets Id field to given value. + + +### GetGatewayID + +`func (o *GetRoutes200ResponseRoutesInner) GetGatewayID() string` + +GetGatewayID returns the GatewayID field if non-nil, zero value otherwise. + +### GetGatewayIDOk + +`func (o *GetRoutes200ResponseRoutesInner) GetGatewayIDOk() (*string, bool)` + +GetGatewayIDOk returns a tuple with the GatewayID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGatewayID + +`func (o *GetRoutes200ResponseRoutesInner) SetGatewayID(v string)` + +SetGatewayID sets GatewayID field to given value. + + +### GetMode + +`func (o *GetRoutes200ResponseRoutesInner) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *GetRoutes200ResponseRoutesInner) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *GetRoutes200ResponseRoutesInner) SetMode(v string)` + +SetMode sets Mode field to given value. + + +### GetFromDLTNetworkID + +`func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkID() string` + +GetFromDLTNetworkID returns the FromDLTNetworkID field if non-nil, zero value otherwise. + +### GetFromDLTNetworkIDOk + +`func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkIDOk() (*string, bool)` + +GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromDLTNetworkID + +`func (o *GetRoutes200ResponseRoutesInner) SetFromDLTNetworkID(v string)` + +SetFromDLTNetworkID sets FromDLTNetworkID field to given value. + +### HasFromDLTNetworkID + +`func (o *GetRoutes200ResponseRoutesInner) HasFromDLTNetworkID() bool` + +HasFromDLTNetworkID returns a boolean if a field has been set. + +### GetFromAmountUSD + +`func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSD() float64` + +GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. + +### GetFromAmountUSDOk + +`func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSDOk() (*float64, bool)` + +GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmountUSD + +`func (o *GetRoutes200ResponseRoutesInner) SetFromAmountUSD(v float64)` + +SetFromAmountUSD sets FromAmountUSD field to given value. + +### HasFromAmountUSD + +`func (o *GetRoutes200ResponseRoutesInner) HasFromAmountUSD() bool` + +HasFromAmountUSD returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *GetRoutes200ResponseRoutesInner) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *GetRoutes200ResponseRoutesInner) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *GetRoutes200ResponseRoutesInner) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *GetRoutes200ResponseRoutesInner) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetFromToken + +`func (o *GetRoutes200ResponseRoutesInner) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetFromToken returns the FromToken field if non-nil, zero value otherwise. + +### GetFromTokenOk + +`func (o *GetRoutes200ResponseRoutesInner) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromToken + +`func (o *GetRoutes200ResponseRoutesInner) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetFromToken sets FromToken field to given value. + +### HasFromToken + +`func (o *GetRoutes200ResponseRoutesInner) HasFromToken() bool` + +HasFromToken returns a boolean if a field has been set. + +### GetToDLTNetworkID + +`func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkID() string` + +GetToDLTNetworkID returns the ToDLTNetworkID field if non-nil, zero value otherwise. + +### GetToDLTNetworkIDOk + +`func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkIDOk() (*string, bool)` + +GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToDLTNetworkID + +`func (o *GetRoutes200ResponseRoutesInner) SetToDLTNetworkID(v string)` + +SetToDLTNetworkID sets ToDLTNetworkID field to given value. + +### HasToDLTNetworkID + +`func (o *GetRoutes200ResponseRoutesInner) HasToDLTNetworkID() bool` + +HasToDLTNetworkID returns a boolean if a field has been set. + +### GetToAmountUSD + +`func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSD() string` + +GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. + +### GetToAmountUSDOk + +`func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSDOk() (*string, bool)` + +GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountUSD + +`func (o *GetRoutes200ResponseRoutesInner) SetToAmountUSD(v string)` + +SetToAmountUSD sets ToAmountUSD field to given value. + +### HasToAmountUSD + +`func (o *GetRoutes200ResponseRoutesInner) HasToAmountUSD() bool` + +HasToAmountUSD returns a boolean if a field has been set. + +### GetToAmount + +`func (o *GetRoutes200ResponseRoutesInner) GetToAmount() string` + +GetToAmount returns the ToAmount field if non-nil, zero value otherwise. + +### GetToAmountOk + +`func (o *GetRoutes200ResponseRoutesInner) GetToAmountOk() (*string, bool)` + +GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmount + +`func (o *GetRoutes200ResponseRoutesInner) SetToAmount(v string)` + +SetToAmount sets ToAmount field to given value. + +### HasToAmount + +`func (o *GetRoutes200ResponseRoutesInner) HasToAmount() bool` + +HasToAmount returns a boolean if a field has been set. + +### GetToAmountMin + +`func (o *GetRoutes200ResponseRoutesInner) GetToAmountMin() string` + +GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. + +### GetToAmountMinOk + +`func (o *GetRoutes200ResponseRoutesInner) GetToAmountMinOk() (*string, bool)` + +GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountMin + +`func (o *GetRoutes200ResponseRoutesInner) SetToAmountMin(v string)` + +SetToAmountMin sets ToAmountMin field to given value. + +### HasToAmountMin + +`func (o *GetRoutes200ResponseRoutesInner) HasToAmountMin() bool` + +HasToAmountMin returns a boolean if a field has been set. + +### GetToToken + +`func (o *GetRoutes200ResponseRoutesInner) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetToToken returns the ToToken field if non-nil, zero value otherwise. + +### GetToTokenOk + +`func (o *GetRoutes200ResponseRoutesInner) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToToken + +`func (o *GetRoutes200ResponseRoutesInner) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetToToken sets ToToken field to given value. + +### HasToToken + +`func (o *GetRoutes200ResponseRoutesInner) HasToToken() bool` + +HasToToken returns a boolean if a field has been set. + +### GetGasCostUSD + +`func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSD() string` + +GetGasCostUSD returns the GasCostUSD field if non-nil, zero value otherwise. + +### GetGasCostUSDOk + +`func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSDOk() (*string, bool)` + +GetGasCostUSDOk returns a tuple with the GasCostUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGasCostUSD + +`func (o *GetRoutes200ResponseRoutesInner) SetGasCostUSD(v string)` + +SetGasCostUSD sets GasCostUSD field to given value. + +### HasGasCostUSD + +`func (o *GetRoutes200ResponseRoutesInner) HasGasCostUSD() bool` + +HasGasCostUSD returns a boolean if a field has been set. + +### GetContainsSwitchChain + +`func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChain() bool` + +GetContainsSwitchChain returns the ContainsSwitchChain field if non-nil, zero value otherwise. + +### GetContainsSwitchChainOk + +`func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChainOk() (*bool, bool)` + +GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainsSwitchChain + +`func (o *GetRoutes200ResponseRoutesInner) SetContainsSwitchChain(v bool)` + +SetContainsSwitchChain sets ContainsSwitchChain field to given value. + +### HasContainsSwitchChain + +`func (o *GetRoutes200ResponseRoutesInner) HasContainsSwitchChain() bool` + +HasContainsSwitchChain returns a boolean if a field has been set. + +### GetSteps + +`func (o *GetRoutes200ResponseRoutesInner) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner` + +GetSteps returns the Steps field if non-nil, zero value otherwise. + +### GetStepsOk + +`func (o *GetRoutes200ResponseRoutesInner) GetStepsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInner, bool)` + +GetStepsOk returns a tuple with the Steps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSteps + +`func (o *GetRoutes200ResponseRoutesInner) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner)` + +SetSteps sets Steps field to given value. + +### HasSteps + +`func (o *GetRoutes200ResponseRoutesInner) HasSteps() bool` + +HasSteps returns a boolean if a field has been set. + +### GetInsurance + +`func (o *GetRoutes200ResponseRoutesInner) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance` + +GetInsurance returns the Insurance field if non-nil, zero value otherwise. + +### GetInsuranceOk + +`func (o *GetRoutes200ResponseRoutesInner) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool)` + +GetInsuranceOk returns a tuple with the Insurance field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsurance + +`func (o *GetRoutes200ResponseRoutesInner) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance)` + +SetInsurance sets Insurance field to given value. + +### HasInsurance + +`func (o *GetRoutes200ResponseRoutesInner) HasInsurance() bool` + +HasInsurance returns a boolean if a field has been set. + +### GetTags + +`func (o *GetRoutes200ResponseRoutesInner) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *GetRoutes200ResponseRoutesInner) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *GetRoutes200ResponseRoutesInner) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *GetRoutes200ResponseRoutesInner) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerInsurance.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerInsurance.md new file mode 100644 index 0000000000..d79fefaa14 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerInsurance.md @@ -0,0 +1,82 @@ +# GetRoutes200ResponseRoutesInnerInsurance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | The state of insurance applicability for the transaction. | [optional] +**FeeAmountUsd** | Pointer to **string** | The fee amount for insurance, represented in USD. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerInsurance + +`func NewGetRoutes200ResponseRoutesInnerInsurance() *GetRoutes200ResponseRoutesInnerInsurance` + +NewGetRoutes200ResponseRoutesInnerInsurance instantiates a new GetRoutes200ResponseRoutesInnerInsurance object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults() *GetRoutes200ResponseRoutesInnerInsurance` + +NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerInsurance object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetFeeAmountUsd + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsd() string` + +GetFeeAmountUsd returns the FeeAmountUsd field if non-nil, zero value otherwise. + +### GetFeeAmountUsdOk + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsdOk() (*string, bool)` + +GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeeAmountUsd + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) SetFeeAmountUsd(v string)` + +SetFeeAmountUsd sets FeeAmountUsd field to given value. + +### HasFeeAmountUsd + +`func (o *GetRoutes200ResponseRoutesInnerInsurance) HasFeeAmountUsd() bool` + +HasFeeAmountUsd returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInner.md new file mode 100644 index 0000000000..746bfbaec8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInner.md @@ -0,0 +1,238 @@ +# GetRoutes200ResponseRoutesInnerStepsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | Id of the step | [optional] +**Type** | Pointer to **string** | Type of the step, typically describing the action, e.g., 'swap'. | [optional] +**Tool** | Pointer to **string** | Tool used in the step, e.g., 'stargate'. | [optional] +**Action** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerAction**](GetRoutes200ResponseRoutesInnerStepsInnerAction.md) | | [optional] +**Estimate** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerEstimate**](GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md) | | [optional] +**ToolDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] +**IntegrationDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] +**IncludedStepIds** | Pointer to **[]string** | IDs of further steps included within this step, allowing for nested actions without direct recursion. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerStepsInner + +`func NewGetRoutes200ResponseRoutesInnerStepsInner() *GetRoutes200ResponseRoutesInnerStepsInner` + +NewGetRoutes200ResponseRoutesInnerStepsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInner` + +NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetTool + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTool() string` + +GetTool returns the Tool field if non-nil, zero value otherwise. + +### GetToolOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolOk() (*string, bool)` + +GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTool + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetTool(v string)` + +SetTool sets Tool field to given value. + +### HasTool + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasTool() bool` + +HasTool returns a boolean if a field has been set. + +### GetAction + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetEstimate + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate` + +GetEstimate returns the Estimate field if non-nil, zero value otherwise. + +### GetEstimateOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool)` + +GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEstimate + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate)` + +SetEstimate sets Estimate field to given value. + +### HasEstimate + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasEstimate() bool` + +HasEstimate returns a boolean if a field has been set. + +### GetToolDetails + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` + +GetToolDetails returns the ToolDetails field if non-nil, zero value otherwise. + +### GetToolDetailsOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` + +GetToolDetailsOk returns a tuple with the ToolDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolDetails + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` + +SetToolDetails sets ToolDetails field to given value. + +### HasToolDetails + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasToolDetails() bool` + +HasToolDetails returns a boolean if a field has been set. + +### GetIntegrationDetails + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` + +GetIntegrationDetails returns the IntegrationDetails field if non-nil, zero value otherwise. + +### GetIntegrationDetailsOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` + +GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegrationDetails + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` + +SetIntegrationDetails sets IntegrationDetails field to given value. + +### HasIntegrationDetails + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIntegrationDetails() bool` + +HasIntegrationDetails returns a boolean if a field has been set. + +### GetIncludedStepIds + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIds() []string` + +GetIncludedStepIds returns the IncludedStepIds field if non-nil, zero value otherwise. + +### GetIncludedStepIdsOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIdsOk() (*[]string, bool)` + +GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludedStepIds + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIncludedStepIds(v []string)` + +SetIncludedStepIds sets IncludedStepIds field to given value. + +### HasIncludedStepIds + +`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIncludedStepIds() bool` + +HasIncludedStepIds returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md new file mode 100644 index 0000000000..47c505197c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md @@ -0,0 +1,186 @@ +# GetRoutes200ResponseRoutesInnerStepsInnerAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**FromAmount** | Pointer to **string** | The amount of 'fromToken' to be transferred, specified as a string to maintain precision. | [optional] +**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**Slippage** | Pointer to **float32** | The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. | [optional] +**FromAddress** | Pointer to **string** | A blockchain address. | [optional] +**ToAddress** | Pointer to **string** | A blockchain address. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerStepsInnerAction + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerAction() *GetRoutes200ResponseRoutesInnerStepsInnerAction` + +NewGetRoutes200ResponseRoutesInnerStepsInnerAction instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerAction` + +NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFromToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetFromToken returns the FromToken field if non-nil, zero value otherwise. + +### GetFromTokenOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetFromToken sets FromToken field to given value. + +### HasFromToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromToken() bool` + +HasFromToken returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetToToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetToToken returns the ToToken field if non-nil, zero value otherwise. + +### GetToTokenOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetToToken sets ToToken field to given value. + +### HasToToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToToken() bool` + +HasToToken returns a boolean if a field has been set. + +### GetSlippage + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippage() float32` + +GetSlippage returns the Slippage field if non-nil, zero value otherwise. + +### GetSlippageOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippageOk() (*float32, bool)` + +GetSlippageOk returns a tuple with the Slippage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlippage + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetSlippage(v float32)` + +SetSlippage sets Slippage field to given value. + +### HasSlippage + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasSlippage() bool` + +HasSlippage returns a boolean if a field has been set. + +### GetFromAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddress() string` + +GetFromAddress returns the FromAddress field if non-nil, zero value otherwise. + +### GetFromAddressOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddressOk() (*string, bool)` + +GetFromAddressOk returns a tuple with the FromAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAddress(v string)` + +SetFromAddress sets FromAddress field to given value. + +### HasFromAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAddress() bool` + +HasFromAddress returns a boolean if a field has been set. + +### GetToAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddress() string` + +GetToAddress returns the ToAddress field if non-nil, zero value otherwise. + +### GetToAddressOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddressOk() (*string, bool)` + +GetToAddressOk returns a tuple with the ToAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToAddress(v string)` + +SetToAddress sets ToAddress field to given value. + +### HasToAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToAddress() bool` + +HasToAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md new file mode 100644 index 0000000000..9840b2ea49 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md @@ -0,0 +1,290 @@ +# GetRoutes200ResponseRoutesInnerStepsInnerEstimate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApprovalAddress** | Pointer to **string** | A blockchain address. | [optional] +**ToAmountMin** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**ToAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**FromAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**FeeCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md) | A collection of fee costs associated with the transaction. | [optional] +**GasCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md) | A collection of estimated gas costs for executing the transaction. | [optional] +**ExecutionDuration** | Pointer to **int32** | The estimated duration for the transaction execution in seconds. | [optional] +**FromAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**ToAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**Tool** | Pointer to **string** | The tool or service used to generate this estimate. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate` + +NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate` + +NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApprovalAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddress() string` + +GetApprovalAddress returns the ApprovalAddress field if non-nil, zero value otherwise. + +### GetApprovalAddressOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddressOk() (*string, bool)` + +GetApprovalAddressOk returns a tuple with the ApprovalAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApprovalAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetApprovalAddress(v string)` + +SetApprovalAddress sets ApprovalAddress field to given value. + +### HasApprovalAddress + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasApprovalAddress() bool` + +HasApprovalAddress returns a boolean if a field has been set. + +### GetToAmountMin + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMin() string` + +GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. + +### GetToAmountMinOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMinOk() (*string, bool)` + +GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountMin + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountMin(v string)` + +SetToAmountMin sets ToAmountMin field to given value. + +### HasToAmountMin + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountMin() bool` + +HasToAmountMin returns a boolean if a field has been set. + +### GetToAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmount() string` + +GetToAmount returns the ToAmount field if non-nil, zero value otherwise. + +### GetToAmountOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountOk() (*string, bool)` + +GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmount(v string)` + +SetToAmount sets ToAmount field to given value. + +### HasToAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmount() bool` + +HasToAmount returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetFeeCosts + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` + +GetFeeCosts returns the FeeCosts field if non-nil, zero value otherwise. + +### GetFeeCostsOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool)` + +GetFeeCostsOk returns a tuple with the FeeCosts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeeCosts + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner)` + +SetFeeCosts sets FeeCosts field to given value. + +### HasFeeCosts + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFeeCosts() bool` + +HasFeeCosts returns a boolean if a field has been set. + +### GetGasCosts + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` + +GetGasCosts returns the GasCosts field if non-nil, zero value otherwise. + +### GetGasCostsOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool)` + +GetGasCostsOk returns a tuple with the GasCosts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGasCosts + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner)` + +SetGasCosts sets GasCosts field to given value. + +### HasGasCosts + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasGasCosts() bool` + +HasGasCosts returns a boolean if a field has been set. + +### GetExecutionDuration + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDuration() int32` + +GetExecutionDuration returns the ExecutionDuration field if non-nil, zero value otherwise. + +### GetExecutionDurationOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDurationOk() (*int32, bool)` + +GetExecutionDurationOk returns a tuple with the ExecutionDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionDuration + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetExecutionDuration(v int32)` + +SetExecutionDuration sets ExecutionDuration field to given value. + +### HasExecutionDuration + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasExecutionDuration() bool` + +HasExecutionDuration returns a boolean if a field has been set. + +### GetFromAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSD() string` + +GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. + +### GetFromAmountUSDOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSDOk() (*string, bool)` + +GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmountUSD(v string)` + +SetFromAmountUSD sets FromAmountUSD field to given value. + +### HasFromAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmountUSD() bool` + +HasFromAmountUSD returns a boolean if a field has been set. + +### GetToAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSD() string` + +GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. + +### GetToAmountUSDOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSDOk() (*string, bool)` + +GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountUSD(v string)` + +SetToAmountUSD sets ToAmountUSD field to given value. + +### HasToAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountUSD() bool` + +HasToAmountUSD returns a boolean if a field has been set. + +### GetTool + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetTool() string` + +GetTool returns the Tool field if non-nil, zero value otherwise. + +### GetToolOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToolOk() (*string, bool)` + +GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTool + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetTool(v string)` + +SetTool sets Tool field to given value. + +### HasTool + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasTool() bool` + +HasTool returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md new file mode 100644 index 0000000000..bb5e8d99ff --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md @@ -0,0 +1,160 @@ +# GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name of the fee cost. | [optional] +**Amount** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**AmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] +**Token** | Pointer to **string** | The symbol of a token | [optional] +**Included** | Pointer to **bool** | Indicates if the fee is included in the transaction amount. | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` + +NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` + +NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmount(v string)` + +SetAmount sets Amount field to given value. + +### HasAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### GetAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSD() string` + +GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. + +### GetAmountUSDOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSDOk() (*string, bool)` + +GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmountUSD(v string)` + +SetAmountUSD sets AmountUSD field to given value. + +### HasAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmountUSD() bool` + +HasAmountUSD returns a boolean if a field has been set. + +### GetToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetToken(v string)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasToken() bool` + +HasToken returns a boolean if a field has been set. + +### GetIncluded + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncluded() bool` + +GetIncluded returns the Included field if non-nil, zero value otherwise. + +### GetIncludedOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncludedOk() (*bool, bool)` + +GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncluded + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetIncluded(v bool)` + +SetIncluded sets Included field to given value. + +### HasIncluded + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasIncluded() bool` + +HasIncluded returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md new file mode 100644 index 0000000000..a13fec9594 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md @@ -0,0 +1,212 @@ +# GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | The type of the gas cost. | [optional] +**Price** | Pointer to **string** | The gas price, specified as a string to maintain precision. | [optional] +**Estimate** | Pointer to **string** | The estimated gas required, specified as a string to maintain precision. | [optional] +**Limit** | Pointer to **string** | The gas limit for the transaction, specified as a string to maintain precision. | [optional] +**Amount** | Pointer to **string** | The amount of gas required in the gas currency. | [optional] +**AmountUSD** | Pointer to **string** | The amount of gas required in USD. | [optional] +**Token** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] + +## Methods + +### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` + +NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` + +NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetPrice + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPrice() string` + +GetPrice returns the Price field if non-nil, zero value otherwise. + +### GetPriceOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPriceOk() (*string, bool)` + +GetPriceOk returns a tuple with the Price field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrice + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetPrice(v string)` + +SetPrice sets Price field to given value. + +### HasPrice + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasPrice() bool` + +HasPrice returns a boolean if a field has been set. + +### GetEstimate + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimate() string` + +GetEstimate returns the Estimate field if non-nil, zero value otherwise. + +### GetEstimateOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimateOk() (*string, bool)` + +GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEstimate + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetEstimate(v string)` + +SetEstimate sets Estimate field to given value. + +### HasEstimate + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasEstimate() bool` + +HasEstimate returns a boolean if a field has been set. + +### GetLimit + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimit() string` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimitOk() (*string, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetLimit(v string)` + +SetLimit sets Limit field to given value. + +### HasLimit + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasLimit() bool` + +HasLimit returns a boolean if a field has been set. + +### GetAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmount(v string)` + +SetAmount sets Amount field to given value. + +### HasAmount + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### GetAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSD() string` + +GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. + +### GetAmountUSDOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSDOk() (*string, bool)` + +GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmountUSD(v string)` + +SetAmountUSD sets AmountUSD field to given value. + +### HasAmountUSD + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmountUSD() bool` + +HasAmountUSD returns a boolean if a field has been set. + +### GetToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasToken() bool` + +HasToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md new file mode 100644 index 0000000000..253f051140 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md @@ -0,0 +1,93 @@ +# GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | A unique identifier for the integration or tool. | +**Name** | **string** | The name of the integration or tool. | +**LogoURI** | **string** | URL to the logo of the integration or tool. | + +## Methods + +### NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails(key string, name string, logoURI string, ) *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` + +NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults + +`func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` + +NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLogoURI + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURI() string` + +GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. + +### GetLogoURIOk + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURIOk() (*string, bool)` + +GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogoURI + +`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetLogoURI(v string)` + +SetLogoURI sets LogoURI field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IncludedStep.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IncludedStep.md new file mode 100644 index 0000000000..edadf54431 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IncludedStep.md @@ -0,0 +1,238 @@ +# IncludedStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | Id of the step | [optional] +**Type** | Pointer to **string** | Type of the step, typically describing the action, e.g., 'swap'. | [optional] +**Tool** | Pointer to **string** | Tool used in the step, e.g., 'stargate'. | [optional] +**Action** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerAction**](GetRoutes200ResponseRoutesInnerStepsInnerAction.md) | | [optional] +**Estimate** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerEstimate**](GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md) | | [optional] +**ToolDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] +**IntegrationDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] +**IncludedStepIds** | Pointer to **[]string** | IDs of further steps included within this step, allowing for nested actions without direct recursion. | [optional] + +## Methods + +### NewIncludedStep + +`func NewIncludedStep() *IncludedStep` + +NewIncludedStep instantiates a new IncludedStep object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncludedStepWithDefaults + +`func NewIncludedStepWithDefaults() *IncludedStep` + +NewIncludedStepWithDefaults instantiates a new IncludedStep object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *IncludedStep) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *IncludedStep) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *IncludedStep) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *IncludedStep) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *IncludedStep) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncludedStep) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IncludedStep) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IncludedStep) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetTool + +`func (o *IncludedStep) GetTool() string` + +GetTool returns the Tool field if non-nil, zero value otherwise. + +### GetToolOk + +`func (o *IncludedStep) GetToolOk() (*string, bool)` + +GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTool + +`func (o *IncludedStep) SetTool(v string)` + +SetTool sets Tool field to given value. + +### HasTool + +`func (o *IncludedStep) HasTool() bool` + +HasTool returns a boolean if a field has been set. + +### GetAction + +`func (o *IncludedStep) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *IncludedStep) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *IncludedStep) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *IncludedStep) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetEstimate + +`func (o *IncludedStep) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate` + +GetEstimate returns the Estimate field if non-nil, zero value otherwise. + +### GetEstimateOk + +`func (o *IncludedStep) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool)` + +GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEstimate + +`func (o *IncludedStep) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate)` + +SetEstimate sets Estimate field to given value. + +### HasEstimate + +`func (o *IncludedStep) HasEstimate() bool` + +HasEstimate returns a boolean if a field has been set. + +### GetToolDetails + +`func (o *IncludedStep) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` + +GetToolDetails returns the ToolDetails field if non-nil, zero value otherwise. + +### GetToolDetailsOk + +`func (o *IncludedStep) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` + +GetToolDetailsOk returns a tuple with the ToolDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolDetails + +`func (o *IncludedStep) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` + +SetToolDetails sets ToolDetails field to given value. + +### HasToolDetails + +`func (o *IncludedStep) HasToolDetails() bool` + +HasToolDetails returns a boolean if a field has been set. + +### GetIntegrationDetails + +`func (o *IncludedStep) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` + +GetIntegrationDetails returns the IntegrationDetails field if non-nil, zero value otherwise. + +### GetIntegrationDetailsOk + +`func (o *IncludedStep) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` + +GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegrationDetails + +`func (o *IncludedStep) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` + +SetIntegrationDetails sets IntegrationDetails field to given value. + +### HasIntegrationDetails + +`func (o *IncludedStep) HasIntegrationDetails() bool` + +HasIntegrationDetails returns a boolean if a field has been set. + +### GetIncludedStepIds + +`func (o *IncludedStep) GetIncludedStepIds() []string` + +GetIncludedStepIds returns the IncludedStepIds field if non-nil, zero value otherwise. + +### GetIncludedStepIdsOk + +`func (o *IncludedStep) GetIncludedStepIdsOk() (*[]string, bool)` + +GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludedStepIds + +`func (o *IncludedStep) SetIncludedStepIds(v []string)` + +SetIncludedStepIds sets IncludedStepIds field to given value. + +### HasIncludedStepIds + +`func (o *IncludedStep) HasIncludedStepIds() bool` + +HasIncludedStepIds returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Insurance.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Insurance.md new file mode 100644 index 0000000000..4c687611f5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Insurance.md @@ -0,0 +1,82 @@ +# Insurance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | The state of insurance applicability for the transaction. | [optional] +**FeeAmountUsd** | Pointer to **string** | The fee amount for insurance, represented in USD. | [optional] + +## Methods + +### NewInsurance + +`func NewInsurance() *Insurance` + +NewInsurance instantiates a new Insurance object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInsuranceWithDefaults + +`func NewInsuranceWithDefaults() *Insurance` + +NewInsuranceWithDefaults instantiates a new Insurance object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *Insurance) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *Insurance) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *Insurance) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *Insurance) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetFeeAmountUsd + +`func (o *Insurance) GetFeeAmountUsd() string` + +GetFeeAmountUsd returns the FeeAmountUsd field if non-nil, zero value otherwise. + +### GetFeeAmountUsdOk + +`func (o *Insurance) GetFeeAmountUsdOk() (*string, bool)` + +GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeeAmountUsd + +`func (o *Insurance) SetFeeAmountUsd(v string)` + +SetFeeAmountUsd sets FeeAmountUsd field to given value. + +### HasFeeAmountUsd + +`func (o *Insurance) HasFeeAmountUsd() bool` + +HasFeeAmountUsd returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IntegrationDetails.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IntegrationDetails.md new file mode 100644 index 0000000000..b4e531cbb6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IntegrationDetails.md @@ -0,0 +1,93 @@ +# IntegrationDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | A unique identifier for the integration or tool. | +**Name** | **string** | The name of the integration or tool. | +**LogoURI** | **string** | URL to the logo of the integration or tool. | + +## Methods + +### NewIntegrationDetails + +`func NewIntegrationDetails(key string, name string, logoURI string, ) *IntegrationDetails` + +NewIntegrationDetails instantiates a new IntegrationDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIntegrationDetailsWithDefaults + +`func NewIntegrationDetailsWithDefaults() *IntegrationDetails` + +NewIntegrationDetailsWithDefaults instantiates a new IntegrationDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *IntegrationDetails) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *IntegrationDetails) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *IntegrationDetails) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *IntegrationDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IntegrationDetails) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IntegrationDetails) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLogoURI + +`func (o *IntegrationDetails) GetLogoURI() string` + +GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. + +### GetLogoURIOk + +`func (o *IntegrationDetails) GetLogoURIOk() (*string, bool)` + +GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogoURI + +`func (o *IntegrationDetails) SetLogoURI(v string)` + +SetLogoURI sets LogoURI field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Route.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Route.md new file mode 100644 index 0000000000..6e9e5117c9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Route.md @@ -0,0 +1,457 @@ +# Route + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier of the route. | +**GatewayID** | **string** | A unique identifier for the gateway. | +**Mode** | **string** | The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. | +**FromDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will originate. | [optional] +**FromAmountUSD** | Pointer to **float64** | The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. | [optional] +**FromAmount** | Pointer to **string** | The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] +**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**ToDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will end. | [optional] +**ToAmountUSD** | Pointer to **string** | The expected amount to be received in USD. | [optional] +**ToAmount** | Pointer to **string** | The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] +**ToAmountMin** | Pointer to **string** | The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] +**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] +**GasCostUSD** | Pointer to **string** | The expected gas cost in USD. | [optional] +**ContainsSwitchChain** | Pointer to **bool** | Whether chain switching is enabled or not. | [optional] +**Steps** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInner**](GetRoutes200ResponseRoutesInnerStepsInner.md) | List of steps involved in this route, adjusted for mode. | [optional] +**Insurance** | Pointer to [**GetRoutes200ResponseRoutesInnerInsurance**](GetRoutes200ResponseRoutesInnerInsurance.md) | | [optional] +**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] + +## Methods + +### NewRoute + +`func NewRoute(id string, gatewayID string, mode string, ) *Route` + +NewRoute instantiates a new Route object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRouteWithDefaults + +`func NewRouteWithDefaults() *Route` + +NewRouteWithDefaults instantiates a new Route object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Route) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Route) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Route) SetId(v string)` + +SetId sets Id field to given value. + + +### GetGatewayID + +`func (o *Route) GetGatewayID() string` + +GetGatewayID returns the GatewayID field if non-nil, zero value otherwise. + +### GetGatewayIDOk + +`func (o *Route) GetGatewayIDOk() (*string, bool)` + +GetGatewayIDOk returns a tuple with the GatewayID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGatewayID + +`func (o *Route) SetGatewayID(v string)` + +SetGatewayID sets GatewayID field to given value. + + +### GetMode + +`func (o *Route) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *Route) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *Route) SetMode(v string)` + +SetMode sets Mode field to given value. + + +### GetFromDLTNetworkID + +`func (o *Route) GetFromDLTNetworkID() string` + +GetFromDLTNetworkID returns the FromDLTNetworkID field if non-nil, zero value otherwise. + +### GetFromDLTNetworkIDOk + +`func (o *Route) GetFromDLTNetworkIDOk() (*string, bool)` + +GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromDLTNetworkID + +`func (o *Route) SetFromDLTNetworkID(v string)` + +SetFromDLTNetworkID sets FromDLTNetworkID field to given value. + +### HasFromDLTNetworkID + +`func (o *Route) HasFromDLTNetworkID() bool` + +HasFromDLTNetworkID returns a boolean if a field has been set. + +### GetFromAmountUSD + +`func (o *Route) GetFromAmountUSD() float64` + +GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. + +### GetFromAmountUSDOk + +`func (o *Route) GetFromAmountUSDOk() (*float64, bool)` + +GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmountUSD + +`func (o *Route) SetFromAmountUSD(v float64)` + +SetFromAmountUSD sets FromAmountUSD field to given value. + +### HasFromAmountUSD + +`func (o *Route) HasFromAmountUSD() bool` + +HasFromAmountUSD returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *Route) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *Route) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *Route) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *Route) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetFromToken + +`func (o *Route) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetFromToken returns the FromToken field if non-nil, zero value otherwise. + +### GetFromTokenOk + +`func (o *Route) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromToken + +`func (o *Route) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetFromToken sets FromToken field to given value. + +### HasFromToken + +`func (o *Route) HasFromToken() bool` + +HasFromToken returns a boolean if a field has been set. + +### GetToDLTNetworkID + +`func (o *Route) GetToDLTNetworkID() string` + +GetToDLTNetworkID returns the ToDLTNetworkID field if non-nil, zero value otherwise. + +### GetToDLTNetworkIDOk + +`func (o *Route) GetToDLTNetworkIDOk() (*string, bool)` + +GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToDLTNetworkID + +`func (o *Route) SetToDLTNetworkID(v string)` + +SetToDLTNetworkID sets ToDLTNetworkID field to given value. + +### HasToDLTNetworkID + +`func (o *Route) HasToDLTNetworkID() bool` + +HasToDLTNetworkID returns a boolean if a field has been set. + +### GetToAmountUSD + +`func (o *Route) GetToAmountUSD() string` + +GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. + +### GetToAmountUSDOk + +`func (o *Route) GetToAmountUSDOk() (*string, bool)` + +GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountUSD + +`func (o *Route) SetToAmountUSD(v string)` + +SetToAmountUSD sets ToAmountUSD field to given value. + +### HasToAmountUSD + +`func (o *Route) HasToAmountUSD() bool` + +HasToAmountUSD returns a boolean if a field has been set. + +### GetToAmount + +`func (o *Route) GetToAmount() string` + +GetToAmount returns the ToAmount field if non-nil, zero value otherwise. + +### GetToAmountOk + +`func (o *Route) GetToAmountOk() (*string, bool)` + +GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmount + +`func (o *Route) SetToAmount(v string)` + +SetToAmount sets ToAmount field to given value. + +### HasToAmount + +`func (o *Route) HasToAmount() bool` + +HasToAmount returns a boolean if a field has been set. + +### GetToAmountMin + +`func (o *Route) GetToAmountMin() string` + +GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. + +### GetToAmountMinOk + +`func (o *Route) GetToAmountMinOk() (*string, bool)` + +GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmountMin + +`func (o *Route) SetToAmountMin(v string)` + +SetToAmountMin sets ToAmountMin field to given value. + +### HasToAmountMin + +`func (o *Route) HasToAmountMin() bool` + +HasToAmountMin returns a boolean if a field has been set. + +### GetToToken + +`func (o *Route) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` + +GetToToken returns the ToToken field if non-nil, zero value otherwise. + +### GetToTokenOk + +`func (o *Route) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` + +GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToToken + +`func (o *Route) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` + +SetToToken sets ToToken field to given value. + +### HasToToken + +`func (o *Route) HasToToken() bool` + +HasToToken returns a boolean if a field has been set. + +### GetGasCostUSD + +`func (o *Route) GetGasCostUSD() string` + +GetGasCostUSD returns the GasCostUSD field if non-nil, zero value otherwise. + +### GetGasCostUSDOk + +`func (o *Route) GetGasCostUSDOk() (*string, bool)` + +GetGasCostUSDOk returns a tuple with the GasCostUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGasCostUSD + +`func (o *Route) SetGasCostUSD(v string)` + +SetGasCostUSD sets GasCostUSD field to given value. + +### HasGasCostUSD + +`func (o *Route) HasGasCostUSD() bool` + +HasGasCostUSD returns a boolean if a field has been set. + +### GetContainsSwitchChain + +`func (o *Route) GetContainsSwitchChain() bool` + +GetContainsSwitchChain returns the ContainsSwitchChain field if non-nil, zero value otherwise. + +### GetContainsSwitchChainOk + +`func (o *Route) GetContainsSwitchChainOk() (*bool, bool)` + +GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainsSwitchChain + +`func (o *Route) SetContainsSwitchChain(v bool)` + +SetContainsSwitchChain sets ContainsSwitchChain field to given value. + +### HasContainsSwitchChain + +`func (o *Route) HasContainsSwitchChain() bool` + +HasContainsSwitchChain returns a boolean if a field has been set. + +### GetSteps + +`func (o *Route) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner` + +GetSteps returns the Steps field if non-nil, zero value otherwise. + +### GetStepsOk + +`func (o *Route) GetStepsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInner, bool)` + +GetStepsOk returns a tuple with the Steps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSteps + +`func (o *Route) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner)` + +SetSteps sets Steps field to given value. + +### HasSteps + +`func (o *Route) HasSteps() bool` + +HasSteps returns a boolean if a field has been set. + +### GetInsurance + +`func (o *Route) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance` + +GetInsurance returns the Insurance field if non-nil, zero value otherwise. + +### GetInsuranceOk + +`func (o *Route) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool)` + +GetInsuranceOk returns a tuple with the Insurance field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInsurance + +`func (o *Route) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance)` + +SetInsurance sets Insurance field to given value. + +### HasInsurance + +`func (o *Route) HasInsurance() bool` + +HasInsurance returns a boolean if a field has been set. + +### GetTags + +`func (o *Route) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Route) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Route) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *Route) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/RoutesResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/RoutesResponse.md new file mode 100644 index 0000000000..b4c5f64a92 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/RoutesResponse.md @@ -0,0 +1,51 @@ +# RoutesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Routes** | [**[]GetRoutes200ResponseRoutesInner**](GetRoutes200ResponseRoutesInner.md) | A collection of route objects | + +## Methods + +### NewRoutesResponse + +`func NewRoutesResponse(routes []GetRoutes200ResponseRoutesInner, ) *RoutesResponse` + +NewRoutesResponse instantiates a new RoutesResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRoutesResponseWithDefaults + +`func NewRoutesResponseWithDefaults() *RoutesResponse` + +NewRoutesResponseWithDefaults instantiates a new RoutesResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRoutes + +`func (o *RoutesResponse) GetRoutes() []GetRoutes200ResponseRoutesInner` + +GetRoutes returns the Routes field if non-nil, zero value otherwise. + +### GetRoutesOk + +`func (o *RoutesResponse) GetRoutesOk() (*[]GetRoutes200ResponseRoutesInner, bool)` + +GetRoutesOk returns a tuple with the Routes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoutes + +`func (o *RoutesResponse) SetRoutes(v []GetRoutes200ResponseRoutesInner)` + +SetRoutes sets Routes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusRequest.md new file mode 100644 index 0000000000..36168e81d1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusRequest.md @@ -0,0 +1,51 @@ +# StatusRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionID** | **string** | The ID of the session for which the status is being requested. | + +## Methods + +### NewStatusRequest + +`func NewStatusRequest(sessionID string, ) *StatusRequest` + +NewStatusRequest instantiates a new StatusRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusRequestWithDefaults + +`func NewStatusRequestWithDefaults() *StatusRequest` + +NewStatusRequestWithDefaults instantiates a new StatusRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionID + +`func (o *StatusRequest) GetSessionID() string` + +GetSessionID returns the SessionID field if non-nil, zero value otherwise. + +### GetSessionIDOk + +`func (o *StatusRequest) GetSessionIDOk() (*string, bool)` + +GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionID + +`func (o *StatusRequest) SetSessionID(v string)` + +SetSessionID sets SessionID field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusResponse.md new file mode 100644 index 0000000000..5fd67dade1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusResponse.md @@ -0,0 +1,177 @@ +# StatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | +**Substatus** | **string** | | +**Stage** | **string** | | +**Step** | **string** | | +**StartTime** | **time.Time** | | +**OriginChain** | [**Transact200ResponseStatusResponseOriginChain**](Transact200ResponseStatusResponseOriginChain.md) | | +**DestinationChain** | [**Transact200ResponseStatusResponseDestinationChain**](Transact200ResponseStatusResponseDestinationChain.md) | | + +## Methods + +### NewStatusResponse + +`func NewStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain, ) *StatusResponse` + +NewStatusResponse instantiates a new StatusResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusResponseWithDefaults + +`func NewStatusResponseWithDefaults() *StatusResponse` + +NewStatusResponseWithDefaults instantiates a new StatusResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *StatusResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *StatusResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *StatusResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetSubstatus + +`func (o *StatusResponse) GetSubstatus() string` + +GetSubstatus returns the Substatus field if non-nil, zero value otherwise. + +### GetSubstatusOk + +`func (o *StatusResponse) GetSubstatusOk() (*string, bool)` + +GetSubstatusOk returns a tuple with the Substatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubstatus + +`func (o *StatusResponse) SetSubstatus(v string)` + +SetSubstatus sets Substatus field to given value. + + +### GetStage + +`func (o *StatusResponse) GetStage() string` + +GetStage returns the Stage field if non-nil, zero value otherwise. + +### GetStageOk + +`func (o *StatusResponse) GetStageOk() (*string, bool)` + +GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStage + +`func (o *StatusResponse) SetStage(v string)` + +SetStage sets Stage field to given value. + + +### GetStep + +`func (o *StatusResponse) GetStep() string` + +GetStep returns the Step field if non-nil, zero value otherwise. + +### GetStepOk + +`func (o *StatusResponse) GetStepOk() (*string, bool)` + +GetStepOk returns a tuple with the Step field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStep + +`func (o *StatusResponse) SetStep(v string)` + +SetStep sets Step field to given value. + + +### GetStartTime + +`func (o *StatusResponse) GetStartTime() time.Time` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *StatusResponse) GetStartTimeOk() (*time.Time, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *StatusResponse) SetStartTime(v time.Time)` + +SetStartTime sets StartTime field to given value. + + +### GetOriginChain + +`func (o *StatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain` + +GetOriginChain returns the OriginChain field if non-nil, zero value otherwise. + +### GetOriginChainOk + +`func (o *StatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool)` + +GetOriginChainOk returns a tuple with the OriginChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginChain + +`func (o *StatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain)` + +SetOriginChain sets OriginChain field to given value. + + +### GetDestinationChain + +`func (o *StatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain` + +GetDestinationChain returns the DestinationChain field if non-nil, zero value otherwise. + +### GetDestinationChainOk + +`func (o *StatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool)` + +GetDestinationChainOk returns a tuple with the DestinationChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestinationChain + +`func (o *StatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain)` + +SetDestinationChain sets DestinationChain field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Token.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Token.md new file mode 100644 index 0000000000..89c2fe1484 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Token.md @@ -0,0 +1,265 @@ +# Token + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainID** | **string** | The network of the DLT being interacted with. TODO: implement network identification draft | +**ChainType** | **string** | Supported DLT protocols. | +**Address** | **string** | A blockchain address. | +**Name** | Pointer to **string** | The name of the token. | [optional] +**Symbol** | **string** | The symbol of the token. | +**Decimals** | **int32** | How many decimals the token supports. | +**LogoURI** | Pointer to **string** | The logo of a token, chain, dex etc. | [optional] +**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] +**PriceUSD** | Pointer to **string** | The current price of the token in USD. | [optional] +**Extensions** | Pointer to [**GetRoutes200ResponseRoutesInnerFromTokenExtensions**](GetRoutes200ResponseRoutesInnerFromTokenExtensions.md) | | [optional] + +## Methods + +### NewToken + +`func NewToken(chainID string, chainType string, address string, symbol string, decimals int32, ) *Token` + +NewToken instantiates a new Token object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenWithDefaults + +`func NewTokenWithDefaults() *Token` + +NewTokenWithDefaults instantiates a new Token object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainID + +`func (o *Token) GetChainID() string` + +GetChainID returns the ChainID field if non-nil, zero value otherwise. + +### GetChainIDOk + +`func (o *Token) GetChainIDOk() (*string, bool)` + +GetChainIDOk returns a tuple with the ChainID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainID + +`func (o *Token) SetChainID(v string)` + +SetChainID sets ChainID field to given value. + + +### GetChainType + +`func (o *Token) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *Token) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *Token) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetAddress + +`func (o *Token) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *Token) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *Token) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetName + +`func (o *Token) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Token) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Token) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Token) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSymbol + +`func (o *Token) GetSymbol() string` + +GetSymbol returns the Symbol field if non-nil, zero value otherwise. + +### GetSymbolOk + +`func (o *Token) GetSymbolOk() (*string, bool)` + +GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSymbol + +`func (o *Token) SetSymbol(v string)` + +SetSymbol sets Symbol field to given value. + + +### GetDecimals + +`func (o *Token) GetDecimals() int32` + +GetDecimals returns the Decimals field if non-nil, zero value otherwise. + +### GetDecimalsOk + +`func (o *Token) GetDecimalsOk() (*int32, bool)` + +GetDecimalsOk returns a tuple with the Decimals field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDecimals + +`func (o *Token) SetDecimals(v int32)` + +SetDecimals sets Decimals field to given value. + + +### GetLogoURI + +`func (o *Token) GetLogoURI() string` + +GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. + +### GetLogoURIOk + +`func (o *Token) GetLogoURIOk() (*string, bool)` + +GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogoURI + +`func (o *Token) SetLogoURI(v string)` + +SetLogoURI sets LogoURI field to given value. + +### HasLogoURI + +`func (o *Token) HasLogoURI() bool` + +HasLogoURI returns a boolean if a field has been set. + +### GetTags + +`func (o *Token) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Token) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Token) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *Token) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetPriceUSD + +`func (o *Token) GetPriceUSD() string` + +GetPriceUSD returns the PriceUSD field if non-nil, zero value otherwise. + +### GetPriceUSDOk + +`func (o *Token) GetPriceUSDOk() (*string, bool)` + +GetPriceUSDOk returns a tuple with the PriceUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriceUSD + +`func (o *Token) SetPriceUSD(v string)` + +SetPriceUSD sets PriceUSD field to given value. + +### HasPriceUSD + +`func (o *Token) HasPriceUSD() bool` + +HasPriceUSD returns a boolean if a field has been set. + +### GetExtensions + +`func (o *Token) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions` + +GetExtensions returns the Extensions field if non-nil, zero value otherwise. + +### GetExtensionsOk + +`func (o *Token) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool)` + +GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtensions + +`func (o *Token) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions)` + +SetExtensions sets Extensions field to given value. + +### HasExtensions + +`func (o *Token) HasExtensions() bool` + +HasExtensions returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200Response.md new file mode 100644 index 0000000000..385a3357a3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200Response.md @@ -0,0 +1,72 @@ +# Transact200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionID** | **string** | Unique identifier (UUID) for the session. | +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | + +## Methods + +### NewTransact200Response + +`func NewTransact200Response(sessionID string, statusResponse Transact200ResponseStatusResponse, ) *Transact200Response` + +NewTransact200Response instantiates a new Transact200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransact200ResponseWithDefaults + +`func NewTransact200ResponseWithDefaults() *Transact200Response` + +NewTransact200ResponseWithDefaults instantiates a new Transact200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionID + +`func (o *Transact200Response) GetSessionID() string` + +GetSessionID returns the SessionID field if non-nil, zero value otherwise. + +### GetSessionIDOk + +`func (o *Transact200Response) GetSessionIDOk() (*string, bool)` + +GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionID + +`func (o *Transact200Response) SetSessionID(v string)` + +SetSessionID sets SessionID field to given value. + + +### GetStatusResponse + +`func (o *Transact200Response) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *Transact200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *Transact200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponse.md new file mode 100644 index 0000000000..4db9ef1c76 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponse.md @@ -0,0 +1,177 @@ +# Transact200ResponseStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | +**Substatus** | **string** | | +**Stage** | **string** | | +**Step** | **string** | | +**StartTime** | **time.Time** | | +**OriginChain** | [**Transact200ResponseStatusResponseOriginChain**](Transact200ResponseStatusResponseOriginChain.md) | | +**DestinationChain** | [**Transact200ResponseStatusResponseDestinationChain**](Transact200ResponseStatusResponseDestinationChain.md) | | + +## Methods + +### NewTransact200ResponseStatusResponse + +`func NewTransact200ResponseStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain, ) *Transact200ResponseStatusResponse` + +NewTransact200ResponseStatusResponse instantiates a new Transact200ResponseStatusResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransact200ResponseStatusResponseWithDefaults + +`func NewTransact200ResponseStatusResponseWithDefaults() *Transact200ResponseStatusResponse` + +NewTransact200ResponseStatusResponseWithDefaults instantiates a new Transact200ResponseStatusResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *Transact200ResponseStatusResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Transact200ResponseStatusResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Transact200ResponseStatusResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetSubstatus + +`func (o *Transact200ResponseStatusResponse) GetSubstatus() string` + +GetSubstatus returns the Substatus field if non-nil, zero value otherwise. + +### GetSubstatusOk + +`func (o *Transact200ResponseStatusResponse) GetSubstatusOk() (*string, bool)` + +GetSubstatusOk returns a tuple with the Substatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubstatus + +`func (o *Transact200ResponseStatusResponse) SetSubstatus(v string)` + +SetSubstatus sets Substatus field to given value. + + +### GetStage + +`func (o *Transact200ResponseStatusResponse) GetStage() string` + +GetStage returns the Stage field if non-nil, zero value otherwise. + +### GetStageOk + +`func (o *Transact200ResponseStatusResponse) GetStageOk() (*string, bool)` + +GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStage + +`func (o *Transact200ResponseStatusResponse) SetStage(v string)` + +SetStage sets Stage field to given value. + + +### GetStep + +`func (o *Transact200ResponseStatusResponse) GetStep() string` + +GetStep returns the Step field if non-nil, zero value otherwise. + +### GetStepOk + +`func (o *Transact200ResponseStatusResponse) GetStepOk() (*string, bool)` + +GetStepOk returns a tuple with the Step field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStep + +`func (o *Transact200ResponseStatusResponse) SetStep(v string)` + +SetStep sets Step field to given value. + + +### GetStartTime + +`func (o *Transact200ResponseStatusResponse) GetStartTime() time.Time` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *Transact200ResponseStatusResponse) GetStartTimeOk() (*time.Time, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *Transact200ResponseStatusResponse) SetStartTime(v time.Time)` + +SetStartTime sets StartTime field to given value. + + +### GetOriginChain + +`func (o *Transact200ResponseStatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain` + +GetOriginChain returns the OriginChain field if non-nil, zero value otherwise. + +### GetOriginChainOk + +`func (o *Transact200ResponseStatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool)` + +GetOriginChainOk returns a tuple with the OriginChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginChain + +`func (o *Transact200ResponseStatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain)` + +SetOriginChain sets OriginChain field to given value. + + +### GetDestinationChain + +`func (o *Transact200ResponseStatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain` + +GetDestinationChain returns the DestinationChain field if non-nil, zero value otherwise. + +### GetDestinationChainOk + +`func (o *Transact200ResponseStatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool)` + +GetDestinationChainOk returns a tuple with the DestinationChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestinationChain + +`func (o *Transact200ResponseStatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain)` + +SetDestinationChain sets DestinationChain field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactDefaultResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactDefaultResponse.md new file mode 100644 index 0000000000..59b5689048 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactDefaultResponse.md @@ -0,0 +1,135 @@ +# TransactDefaultResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | HTTP error type | +**Code** | **int32** | Numeric error code | +**Status** | **int32** | HTTP status of the error | +**Message** | **string** | Long error description | +**Timestamp** | **string** | Timestamp of the error | + +## Methods + +### NewTransactDefaultResponse + +`func NewTransactDefaultResponse(type_ string, code int32, status int32, message string, timestamp string, ) *TransactDefaultResponse` + +NewTransactDefaultResponse instantiates a new TransactDefaultResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactDefaultResponseWithDefaults + +`func NewTransactDefaultResponseWithDefaults() *TransactDefaultResponse` + +NewTransactDefaultResponseWithDefaults instantiates a new TransactDefaultResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransactDefaultResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransactDefaultResponse) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransactDefaultResponse) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCode + +`func (o *TransactDefaultResponse) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *TransactDefaultResponse) GetCodeOk() (*int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *TransactDefaultResponse) SetCode(v int32)` + +SetCode sets Code field to given value. + + +### GetStatus + +`func (o *TransactDefaultResponse) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TransactDefaultResponse) GetStatusOk() (*int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *TransactDefaultResponse) SetStatus(v int32)` + +SetStatus sets Status field to given value. + + +### GetMessage + +`func (o *TransactDefaultResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *TransactDefaultResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *TransactDefaultResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetTimestamp + +`func (o *TransactDefaultResponse) GetTimestamp() string` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *TransactDefaultResponse) GetTimestampOk() (*string, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *TransactDefaultResponse) SetTimestamp(v string)` + +SetTimestamp sets Timestamp field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequest.md new file mode 100644 index 0000000000..5e7c595240 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequest.md @@ -0,0 +1,254 @@ +# TransactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContextID** | **string** | | +**Mode** | **string** | | +**Payload** | Pointer to **string** | | [optional] +**FromDLTNetworkID** | Pointer to **string** | | [optional] +**ToDLTNetworkID** | Pointer to **string** | | [optional] +**FromAmount** | Pointer to **string** | | [optional] +**FromToken** | Pointer to **string** | | [optional] +**ToAmount** | Pointer to **string** | | [optional] +**ToToken** | Pointer to **string** | | [optional] + +## Methods + +### NewTransactRequest + +`func NewTransactRequest(contextID string, mode string, ) *TransactRequest` + +NewTransactRequest instantiates a new TransactRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactRequestWithDefaults + +`func NewTransactRequestWithDefaults() *TransactRequest` + +NewTransactRequestWithDefaults instantiates a new TransactRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContextID + +`func (o *TransactRequest) GetContextID() string` + +GetContextID returns the ContextID field if non-nil, zero value otherwise. + +### GetContextIDOk + +`func (o *TransactRequest) GetContextIDOk() (*string, bool)` + +GetContextIDOk returns a tuple with the ContextID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContextID + +`func (o *TransactRequest) SetContextID(v string)` + +SetContextID sets ContextID field to given value. + + +### GetMode + +`func (o *TransactRequest) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *TransactRequest) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *TransactRequest) SetMode(v string)` + +SetMode sets Mode field to given value. + + +### GetPayload + +`func (o *TransactRequest) GetPayload() string` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *TransactRequest) GetPayloadOk() (*string, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayload + +`func (o *TransactRequest) SetPayload(v string)` + +SetPayload sets Payload field to given value. + +### HasPayload + +`func (o *TransactRequest) HasPayload() bool` + +HasPayload returns a boolean if a field has been set. + +### GetFromDLTNetworkID + +`func (o *TransactRequest) GetFromDLTNetworkID() string` + +GetFromDLTNetworkID returns the FromDLTNetworkID field if non-nil, zero value otherwise. + +### GetFromDLTNetworkIDOk + +`func (o *TransactRequest) GetFromDLTNetworkIDOk() (*string, bool)` + +GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromDLTNetworkID + +`func (o *TransactRequest) SetFromDLTNetworkID(v string)` + +SetFromDLTNetworkID sets FromDLTNetworkID field to given value. + +### HasFromDLTNetworkID + +`func (o *TransactRequest) HasFromDLTNetworkID() bool` + +HasFromDLTNetworkID returns a boolean if a field has been set. + +### GetToDLTNetworkID + +`func (o *TransactRequest) GetToDLTNetworkID() string` + +GetToDLTNetworkID returns the ToDLTNetworkID field if non-nil, zero value otherwise. + +### GetToDLTNetworkIDOk + +`func (o *TransactRequest) GetToDLTNetworkIDOk() (*string, bool)` + +GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToDLTNetworkID + +`func (o *TransactRequest) SetToDLTNetworkID(v string)` + +SetToDLTNetworkID sets ToDLTNetworkID field to given value. + +### HasToDLTNetworkID + +`func (o *TransactRequest) HasToDLTNetworkID() bool` + +HasToDLTNetworkID returns a boolean if a field has been set. + +### GetFromAmount + +`func (o *TransactRequest) GetFromAmount() string` + +GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. + +### GetFromAmountOk + +`func (o *TransactRequest) GetFromAmountOk() (*string, bool)` + +GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromAmount + +`func (o *TransactRequest) SetFromAmount(v string)` + +SetFromAmount sets FromAmount field to given value. + +### HasFromAmount + +`func (o *TransactRequest) HasFromAmount() bool` + +HasFromAmount returns a boolean if a field has been set. + +### GetFromToken + +`func (o *TransactRequest) GetFromToken() string` + +GetFromToken returns the FromToken field if non-nil, zero value otherwise. + +### GetFromTokenOk + +`func (o *TransactRequest) GetFromTokenOk() (*string, bool)` + +GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromToken + +`func (o *TransactRequest) SetFromToken(v string)` + +SetFromToken sets FromToken field to given value. + +### HasFromToken + +`func (o *TransactRequest) HasFromToken() bool` + +HasFromToken returns a boolean if a field has been set. + +### GetToAmount + +`func (o *TransactRequest) GetToAmount() string` + +GetToAmount returns the ToAmount field if non-nil, zero value otherwise. + +### GetToAmountOk + +`func (o *TransactRequest) GetToAmountOk() (*string, bool)` + +GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToAmount + +`func (o *TransactRequest) SetToAmount(v string)` + +SetToAmount sets ToAmount field to given value. + +### HasToAmount + +`func (o *TransactRequest) HasToAmount() bool` + +HasToAmount returns a boolean if a field has been set. + +### GetToToken + +`func (o *TransactRequest) GetToToken() string` + +GetToToken returns the ToToken field if non-nil, zero value otherwise. + +### GetToTokenOk + +`func (o *TransactRequest) GetToTokenOk() (*string, bool)` + +GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToToken + +`func (o *TransactRequest) SetToToken(v string)` + +SetToToken sets ToToken field to given value. + +### HasToToken + +`func (o *TransactRequest) HasToToken() bool` + +HasToToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md new file mode 100644 index 0000000000..26ea988095 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md @@ -0,0 +1,265 @@ +# TransactRequestFromToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChainID** | **string** | The network of the DLT being interacted with. TODO: implement network identification draft | +**ChainType** | **string** | Supported DLT protocols. | +**Address** | **string** | A blockchain address. | +**Name** | Pointer to **string** | The name of the token. | [optional] +**Symbol** | **string** | The symbol of the token. | +**Decimals** | **int32** | How many decimals the token supports. | +**LogoURI** | Pointer to **string** | The logo of a token, chain, dex etc. | [optional] +**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] +**PriceUSD** | Pointer to **string** | The current price of the token in USD. | [optional] +**Extensions** | Pointer to [**TransactRequestFromTokenExtensions**](TransactRequestFromTokenExtensions.md) | | [optional] + +## Methods + +### NewTransactRequestFromToken + +`func NewTransactRequestFromToken(chainID string, chainType string, address string, symbol string, decimals int32, ) *TransactRequestFromToken` + +NewTransactRequestFromToken instantiates a new TransactRequestFromToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactRequestFromTokenWithDefaults + +`func NewTransactRequestFromTokenWithDefaults() *TransactRequestFromToken` + +NewTransactRequestFromTokenWithDefaults instantiates a new TransactRequestFromToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChainID + +`func (o *TransactRequestFromToken) GetChainID() string` + +GetChainID returns the ChainID field if non-nil, zero value otherwise. + +### GetChainIDOk + +`func (o *TransactRequestFromToken) GetChainIDOk() (*string, bool)` + +GetChainIDOk returns a tuple with the ChainID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainID + +`func (o *TransactRequestFromToken) SetChainID(v string)` + +SetChainID sets ChainID field to given value. + + +### GetChainType + +`func (o *TransactRequestFromToken) GetChainType() string` + +GetChainType returns the ChainType field if non-nil, zero value otherwise. + +### GetChainTypeOk + +`func (o *TransactRequestFromToken) GetChainTypeOk() (*string, bool)` + +GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChainType + +`func (o *TransactRequestFromToken) SetChainType(v string)` + +SetChainType sets ChainType field to given value. + + +### GetAddress + +`func (o *TransactRequestFromToken) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *TransactRequestFromToken) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *TransactRequestFromToken) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetName + +`func (o *TransactRequestFromToken) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TransactRequestFromToken) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TransactRequestFromToken) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TransactRequestFromToken) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSymbol + +`func (o *TransactRequestFromToken) GetSymbol() string` + +GetSymbol returns the Symbol field if non-nil, zero value otherwise. + +### GetSymbolOk + +`func (o *TransactRequestFromToken) GetSymbolOk() (*string, bool)` + +GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSymbol + +`func (o *TransactRequestFromToken) SetSymbol(v string)` + +SetSymbol sets Symbol field to given value. + + +### GetDecimals + +`func (o *TransactRequestFromToken) GetDecimals() int32` + +GetDecimals returns the Decimals field if non-nil, zero value otherwise. + +### GetDecimalsOk + +`func (o *TransactRequestFromToken) GetDecimalsOk() (*int32, bool)` + +GetDecimalsOk returns a tuple with the Decimals field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDecimals + +`func (o *TransactRequestFromToken) SetDecimals(v int32)` + +SetDecimals sets Decimals field to given value. + + +### GetLogoURI + +`func (o *TransactRequestFromToken) GetLogoURI() string` + +GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. + +### GetLogoURIOk + +`func (o *TransactRequestFromToken) GetLogoURIOk() (*string, bool)` + +GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogoURI + +`func (o *TransactRequestFromToken) SetLogoURI(v string)` + +SetLogoURI sets LogoURI field to given value. + +### HasLogoURI + +`func (o *TransactRequestFromToken) HasLogoURI() bool` + +HasLogoURI returns a boolean if a field has been set. + +### GetTags + +`func (o *TransactRequestFromToken) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *TransactRequestFromToken) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *TransactRequestFromToken) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *TransactRequestFromToken) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetPriceUSD + +`func (o *TransactRequestFromToken) GetPriceUSD() string` + +GetPriceUSD returns the PriceUSD field if non-nil, zero value otherwise. + +### GetPriceUSDOk + +`func (o *TransactRequestFromToken) GetPriceUSDOk() (*string, bool)` + +GetPriceUSDOk returns a tuple with the PriceUSD field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriceUSD + +`func (o *TransactRequestFromToken) SetPriceUSD(v string)` + +SetPriceUSD sets PriceUSD field to given value. + +### HasPriceUSD + +`func (o *TransactRequestFromToken) HasPriceUSD() bool` + +HasPriceUSD returns a boolean if a field has been set. + +### GetExtensions + +`func (o *TransactRequestFromToken) GetExtensions() TransactRequestFromTokenExtensions` + +GetExtensions returns the Extensions field if non-nil, zero value otherwise. + +### GetExtensionsOk + +`func (o *TransactRequestFromToken) GetExtensionsOk() (*TransactRequestFromTokenExtensions, bool)` + +GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtensions + +`func (o *TransactRequestFromToken) SetExtensions(v TransactRequestFromTokenExtensions)` + +SetExtensions sets Extensions field to given value. + +### HasExtensions + +`func (o *TransactRequestFromToken) HasExtensions() bool` + +HasExtensions returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md new file mode 100644 index 0000000000..13b2ff90eb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md @@ -0,0 +1,82 @@ +# TransactRequestFromTokenExtensions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BridgeInfo** | Pointer to [**map[string]TransactRequestFromTokenExtensionsBridgeInfoValue**](TransactRequestFromTokenExtensionsBridgeInfoValue.md) | | [optional] +**Verified** | Pointer to **bool** | Indicates whether the token is verified. | [optional] + +## Methods + +### NewTransactRequestFromTokenExtensions + +`func NewTransactRequestFromTokenExtensions() *TransactRequestFromTokenExtensions` + +NewTransactRequestFromTokenExtensions instantiates a new TransactRequestFromTokenExtensions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactRequestFromTokenExtensionsWithDefaults + +`func NewTransactRequestFromTokenExtensionsWithDefaults() *TransactRequestFromTokenExtensions` + +NewTransactRequestFromTokenExtensionsWithDefaults instantiates a new TransactRequestFromTokenExtensions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBridgeInfo + +`func (o *TransactRequestFromTokenExtensions) GetBridgeInfo() map[string]TransactRequestFromTokenExtensionsBridgeInfoValue` + +GetBridgeInfo returns the BridgeInfo field if non-nil, zero value otherwise. + +### GetBridgeInfoOk + +`func (o *TransactRequestFromTokenExtensions) GetBridgeInfoOk() (*map[string]TransactRequestFromTokenExtensionsBridgeInfoValue, bool)` + +GetBridgeInfoOk returns a tuple with the BridgeInfo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBridgeInfo + +`func (o *TransactRequestFromTokenExtensions) SetBridgeInfo(v map[string]TransactRequestFromTokenExtensionsBridgeInfoValue)` + +SetBridgeInfo sets BridgeInfo field to given value. + +### HasBridgeInfo + +`func (o *TransactRequestFromTokenExtensions) HasBridgeInfo() bool` + +HasBridgeInfo returns a boolean if a field has been set. + +### GetVerified + +`func (o *TransactRequestFromTokenExtensions) GetVerified() bool` + +GetVerified returns the Verified field if non-nil, zero value otherwise. + +### GetVerifiedOk + +`func (o *TransactRequestFromTokenExtensions) GetVerifiedOk() (*bool, bool)` + +GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerified + +`func (o *TransactRequestFromTokenExtensions) SetVerified(v bool)` + +SetVerified sets Verified field to given value. + +### HasVerified + +`func (o *TransactRequestFromTokenExtensions) HasVerified() bool` + +HasVerified returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md new file mode 100644 index 0000000000..24f0871973 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md @@ -0,0 +1,56 @@ +# TransactRequestFromTokenExtensionsBridgeInfoValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TokenAddress** | Pointer to **string** | The address of the token being transferred. | [optional] + +## Methods + +### NewTransactRequestFromTokenExtensionsBridgeInfoValue + +`func NewTransactRequestFromTokenExtensionsBridgeInfoValue() *TransactRequestFromTokenExtensionsBridgeInfoValue` + +NewTransactRequestFromTokenExtensionsBridgeInfoValue instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults + +`func NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults() *TransactRequestFromTokenExtensionsBridgeInfoValue` + +NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTokenAddress + +`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string` + +GetTokenAddress returns the TokenAddress field if non-nil, zero value otherwise. + +### GetTokenAddressOk + +`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool)` + +GetTokenAddressOk returns a tuple with the TokenAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenAddress + +`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string)` + +SetTokenAddress sets TokenAddress field to given value. + +### HasTokenAddress + +`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool` + +HasTokenAddress returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactResponse.md new file mode 100644 index 0000000000..94b680f3bb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactResponse.md @@ -0,0 +1,72 @@ +# TransactResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionID** | **string** | Unique identifier (UUID) for the session. | +**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | + +## Methods + +### NewTransactResponse + +`func NewTransactResponse(sessionID string, statusResponse Transact200ResponseStatusResponse, ) *TransactResponse` + +NewTransactResponse instantiates a new TransactResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactResponseWithDefaults + +`func NewTransactResponseWithDefaults() *TransactResponse` + +NewTransactResponseWithDefaults instantiates a new TransactResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionID + +`func (o *TransactResponse) GetSessionID() string` + +GetSessionID returns the SessionID field if non-nil, zero value otherwise. + +### GetSessionIDOk + +`func (o *TransactResponse) GetSessionIDOk() (*string, bool)` + +GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionID + +`func (o *TransactResponse) SetSessionID(v string)` + +SetSessionID sets SessionID field to given value. + + +### GetStatusResponse + +`func (o *TransactResponse) GetStatusResponse() Transact200ResponseStatusResponse` + +GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. + +### GetStatusResponseOk + +`func (o *TransactResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` + +GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusResponse + +`func (o *TransactResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` + +SetStatusResponse sets StatusResponse field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactionApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactionApi.md new file mode 100644 index 0000000000..2321303ad9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactionApi.md @@ -0,0 +1,283 @@ +# \TransactionApi + +All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Cancel**](TransactionApi.md#Cancel) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel | Cancel a transaction session +[**GetIntegrations**](TransactionApi.md#GetIntegrations) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations | Get supported integrations +[**GetRoutes**](TransactionApi.md#GetRoutes) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes | Get a list of routes for a gateway-to-gateway asset transfer +[**Transact**](TransactionApi.md#Transact) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact | Submit a transaction intent + + + +## Cancel + +> Cancel200Response Cancel(ctx).CancelRequest(cancelRequest).Execute() + +Cancel a transaction session + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + cancelRequest := *openapiclient.NewCancelRequest("000003e8-e0b8-21ee-ba00-325096b39f47") // CancelRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransactionApi.Cancel(context.Background()).CancelRequest(cancelRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.Cancel``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Cancel`: Cancel200Response + fmt.Fprintf(os.Stdout, "Response from `TransactionApi.Cancel`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCancelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cancelRequest** | [**CancelRequest**](CancelRequest.md) | | + +### Return type + +[**Cancel200Response**](Cancel200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetIntegrations + +> []Chains1Inner GetIntegrations(ctx).Execute() + +Get supported integrations + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransactionApi.GetIntegrations(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.GetIntegrations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetIntegrations`: []Chains1Inner + fmt.Fprintf(os.Stdout, "Response from `TransactionApi.GetIntegrations`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetIntegrationsRequest struct via the builder pattern + + +### Return type + +[**[]Chains1Inner**](Chains1Inner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoutes + +> GetRoutes200Response GetRoutes(ctx).FromNetworkID(fromNetworkID).FromAmount(fromAmount).FromToken(fromToken).ToDLTNetwork(toDLTNetwork).ToToken(toToken).FromAddress(fromAddress).ToAddress(toAddress).Execute() + +Get a list of routes for a gateway-to-gateway asset transfer + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + fromNetworkID := "fromNetworkID_example" // string | The sending DLT Network. + fromAmount := "1000000000000000000" // string | The amount that should be sent including all decimals. + fromToken := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The token that should be transferred. Can be the address or the symbol. + toDLTNetwork := "toDLTNetwork_example" // string | The receiving DLT Network. + toToken := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The token that should be transferred to. Can be the address or the symbol. + fromAddress := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The sending wallet address. + toAddress := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The receiving wallet address. If none is provided, the fromAddress will be used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransactionApi.GetRoutes(context.Background()).FromNetworkID(fromNetworkID).FromAmount(fromAmount).FromToken(fromToken).ToDLTNetwork(toDLTNetwork).ToToken(toToken).FromAddress(fromAddress).ToAddress(toAddress).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.GetRoutes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoutes`: GetRoutes200Response + fmt.Fprintf(os.Stdout, "Response from `TransactionApi.GetRoutes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoutesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fromNetworkID** | **string** | The sending DLT Network. | + **fromAmount** | **string** | The amount that should be sent including all decimals. | + **fromToken** | **string** | The token that should be transferred. Can be the address or the symbol. | + **toDLTNetwork** | **string** | The receiving DLT Network. | + **toToken** | **string** | The token that should be transferred to. Can be the address or the symbol. | + **fromAddress** | **string** | The sending wallet address. | + **toAddress** | **string** | The receiving wallet address. If none is provided, the fromAddress will be used. | + +### Return type + +[**GetRoutes200Response**](GetRoutes200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Transact + +> Transact200Response Transact(ctx).TransactRequest(transactRequest).Execute() + +Submit a transaction intent + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + transactRequest := *openapiclient.NewTransactRequest("123e4567-e89b-12d3-a456-426614174000", "transfer") // TransactRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransactionApi.Transact(context.Background()).TransactRequest(transactRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.Transact``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Transact`: Transact200Response + fmt.Fprintf(os.Stdout, "Response from `TransactionApi.Transact`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransactRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transactRequest** | [**TransactRequest**](TransactRequest.md) | | + +### Return type + +[**Transact200Response**](Transact200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/go/generated/git_push.sh new file mode 100644 index 0000000000..caedee5072 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="hyperledger" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.mod b/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.mod new file mode 100644 index 0000000000..0f12e37626 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.mod @@ -0,0 +1,6 @@ +module github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated + +go 1.18 + +require ( +) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.sum b/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.sum new file mode 100644 index 0000000000..c966c8ddfd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_action.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_action.go new file mode 100644 index 0000000000..843bb4ba83 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_action.go @@ -0,0 +1,310 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Action type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Action{} + +// Action struct for Action +type Action struct { + FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` + // The amount of 'fromToken' to be transferred, specified as a string to maintain precision. + FromAmount *string `json:"fromAmount,omitempty"` + ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` + // The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. + Slippage *float32 `json:"slippage,omitempty"` + // A blockchain address. + FromAddress *string `json:"fromAddress,omitempty"` + // A blockchain address. + ToAddress *string `json:"toAddress,omitempty"` +} + +// NewAction instantiates a new Action object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAction() *Action { + this := Action{} + return &this +} + +// NewActionWithDefaults instantiates a new Action object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewActionWithDefaults() *Action { + this := Action{} + return &this +} + +// GetFromToken returns the FromToken field value if set, zero value otherwise. +func (o *Action) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.FromToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.FromToken +} + +// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.FromToken) { + return nil, false + } + return o.FromToken, true +} + +// HasFromToken returns a boolean if a field has been set. +func (o *Action) HasFromToken() bool { + if o != nil && !IsNil(o.FromToken) { + return true + } + + return false +} + +// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. +func (o *Action) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.FromToken = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *Action) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *Action) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *Action) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetToToken returns the ToToken field value if set, zero value otherwise. +func (o *Action) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.ToToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.ToToken +} + +// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.ToToken) { + return nil, false + } + return o.ToToken, true +} + +// HasToToken returns a boolean if a field has been set. +func (o *Action) HasToToken() bool { + if o != nil && !IsNil(o.ToToken) { + return true + } + + return false +} + +// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. +func (o *Action) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.ToToken = &v +} + +// GetSlippage returns the Slippage field value if set, zero value otherwise. +func (o *Action) GetSlippage() float32 { + if o == nil || IsNil(o.Slippage) { + var ret float32 + return ret + } + return *o.Slippage +} + +// GetSlippageOk returns a tuple with the Slippage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetSlippageOk() (*float32, bool) { + if o == nil || IsNil(o.Slippage) { + return nil, false + } + return o.Slippage, true +} + +// HasSlippage returns a boolean if a field has been set. +func (o *Action) HasSlippage() bool { + if o != nil && !IsNil(o.Slippage) { + return true + } + + return false +} + +// SetSlippage gets a reference to the given float32 and assigns it to the Slippage field. +func (o *Action) SetSlippage(v float32) { + o.Slippage = &v +} + +// GetFromAddress returns the FromAddress field value if set, zero value otherwise. +func (o *Action) GetFromAddress() string { + if o == nil || IsNil(o.FromAddress) { + var ret string + return ret + } + return *o.FromAddress +} + +// GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetFromAddressOk() (*string, bool) { + if o == nil || IsNil(o.FromAddress) { + return nil, false + } + return o.FromAddress, true +} + +// HasFromAddress returns a boolean if a field has been set. +func (o *Action) HasFromAddress() bool { + if o != nil && !IsNil(o.FromAddress) { + return true + } + + return false +} + +// SetFromAddress gets a reference to the given string and assigns it to the FromAddress field. +func (o *Action) SetFromAddress(v string) { + o.FromAddress = &v +} + +// GetToAddress returns the ToAddress field value if set, zero value otherwise. +func (o *Action) GetToAddress() string { + if o == nil || IsNil(o.ToAddress) { + var ret string + return ret + } + return *o.ToAddress +} + +// GetToAddressOk returns a tuple with the ToAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetToAddressOk() (*string, bool) { + if o == nil || IsNil(o.ToAddress) { + return nil, false + } + return o.ToAddress, true +} + +// HasToAddress returns a boolean if a field has been set. +func (o *Action) HasToAddress() bool { + if o != nil && !IsNil(o.ToAddress) { + return true + } + + return false +} + +// SetToAddress gets a reference to the given string and assigns it to the ToAddress field. +func (o *Action) SetToAddress(v string) { + o.ToAddress = &v +} + +func (o Action) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Action) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FromToken) { + toSerialize["fromToken"] = o.FromToken + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.ToToken) { + toSerialize["toToken"] = o.ToToken + } + if !IsNil(o.Slippage) { + toSerialize["slippage"] = o.Slippage + } + if !IsNil(o.FromAddress) { + toSerialize["fromAddress"] = o.FromAddress + } + if !IsNil(o.ToAddress) { + toSerialize["toAddress"] = o.ToAddress + } + return toSerialize, nil +} + +type NullableAction struct { + value *Action + isSet bool +} + +func (v NullableAction) Get() *Action { + return v.value +} + +func (v *NullableAction) Set(val *Action) { + v.value = val + v.isSet = true +} + +func (v NullableAction) IsSet() bool { + return v.isSet +} + +func (v *NullableAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAction(val *Action) *NullableAction { + return &NullableAction{value: val, isSet: true} +} + +func (v NullableAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_api_error.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_api_error.go new file mode 100644 index 0000000000..d2a4a01771 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_api_error.go @@ -0,0 +1,230 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the APIError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &APIError{} + +// APIError An Error +type APIError struct { + // HTTP error type + Type string `json:"type"` + // Numeric error code + Code int32 `json:"code"` + // HTTP status of the error + Status int32 `json:"status"` + // Long error description + Message string `json:"message"` + // Timestamp of the error + Timestamp string `json:"timestamp"` +} + +// NewAPIError instantiates a new APIError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAPIError(type_ string, code int32, status int32, message string, timestamp string) *APIError { + this := APIError{} + this.Type = type_ + this.Code = code + this.Status = status + this.Message = message + this.Timestamp = timestamp + return &this +} + +// NewAPIErrorWithDefaults instantiates a new APIError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAPIErrorWithDefaults() *APIError { + this := APIError{} + return &this +} + +// GetType returns the Type field value +func (o *APIError) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *APIError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *APIError) SetType(v string) { + o.Type = v +} + +// GetCode returns the Code field value +func (o *APIError) GetCode() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *APIError) GetCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *APIError) SetCode(v int32) { + o.Code = v +} + +// GetStatus returns the Status field value +func (o *APIError) GetStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *APIError) GetStatusOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *APIError) SetStatus(v int32) { + o.Status = v +} + +// GetMessage returns the Message field value +func (o *APIError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *APIError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *APIError) SetMessage(v string) { + o.Message = v +} + +// GetTimestamp returns the Timestamp field value +func (o *APIError) GetTimestamp() string { + if o == nil { + var ret string + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *APIError) GetTimestampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *APIError) SetTimestamp(v string) { + o.Timestamp = v +} + +func (o APIError) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o APIError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["code"] = o.Code + toSerialize["status"] = o.Status + toSerialize["message"] = o.Message + toSerialize["timestamp"] = o.Timestamp + return toSerialize, nil +} + +type NullableAPIError struct { + value *APIError + isSet bool +} + +func (v NullableAPIError) Get() *APIError { + return v.value +} + +func (v *NullableAPIError) Set(val *APIError) { + v.value = val + v.isSet = true +} + +func (v NullableAPIError) IsSet() bool { + return v.isSet +} + +func (v *NullableAPIError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAPIError(val *APIError) *NullableAPIError { + return &NullableAPIError{value: val, isSet: true} +} + +func (v NullableAPIError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAPIError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_jwt_claim.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_jwt_claim.go new file mode 100644 index 0000000000..f4678b2f82 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_jwt_claim.go @@ -0,0 +1,109 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "fmt" +) + +// AuthzJwtClaim Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 +type AuthzJwtClaim string + +// List of AuthzJwtClaim +const ( + iss AuthzJwtClaim = "Hyperledger Labs - Carbon Accounting Tool" +) + +// All allowed values of AuthzJwtClaim enum +var AllowedAuthzJwtClaimEnumValues = []AuthzJwtClaim{ + "Hyperledger Labs - Carbon Accounting Tool", +} + +func (v *AuthzJwtClaim) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AuthzJwtClaim(value) + for _, existing := range AllowedAuthzJwtClaimEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid AuthzJwtClaim", value) +} + +// NewAuthzJwtClaimFromValue returns a pointer to a valid AuthzJwtClaim +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAuthzJwtClaimFromValue(v string) (*AuthzJwtClaim, error) { + ev := AuthzJwtClaim(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AuthzJwtClaim: valid values are %v", v, AllowedAuthzJwtClaimEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AuthzJwtClaim) IsValid() bool { + for _, existing := range AllowedAuthzJwtClaimEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to AuthzJwtClaim value +func (v AuthzJwtClaim) Ptr() *AuthzJwtClaim { + return &v +} + +type NullableAuthzJwtClaim struct { + value *AuthzJwtClaim + isSet bool +} + +func (v NullableAuthzJwtClaim) Get() *AuthzJwtClaim { + return v.value +} + +func (v *NullableAuthzJwtClaim) Set(val *AuthzJwtClaim) { + v.value = val + v.isSet = true +} + +func (v NullableAuthzJwtClaim) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthzJwtClaim) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthzJwtClaim(val *AuthzJwtClaim) *NullableAuthzJwtClaim { + return &NullableAuthzJwtClaim{value: val, isSet: true} +} + +func (v NullableAuthzJwtClaim) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthzJwtClaim) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_scope.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_scope.go new file mode 100644 index 0000000000..598e3de1d5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_scope.go @@ -0,0 +1,111 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "fmt" +) + +// AuthzScope the model 'AuthzScope' +type AuthzScope string + +// List of AuthzScope +const ( + GroupAdmin AuthzScope = "group:admin" + GroupUser AuthzScope = "group:user" +) + +// All allowed values of AuthzScope enum +var AllowedAuthzScopeEnumValues = []AuthzScope{ + "group:admin", + "group:user", +} + +func (v *AuthzScope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AuthzScope(value) + for _, existing := range AllowedAuthzScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid AuthzScope", value) +} + +// NewAuthzScopeFromValue returns a pointer to a valid AuthzScope +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAuthzScopeFromValue(v string) (*AuthzScope, error) { + ev := AuthzScope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AuthzScope: valid values are %v", v, AllowedAuthzScopeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AuthzScope) IsValid() bool { + for _, existing := range AllowedAuthzScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to AuthzScope value +func (v AuthzScope) Ptr() *AuthzScope { + return &v +} + +type NullableAuthzScope struct { + value *AuthzScope + isSet bool +} + +func (v NullableAuthzScope) Get() *AuthzScope { + return v.value +} + +func (v *NullableAuthzScope) Set(val *AuthzScope) { + v.value = val + v.isSet = true +} + +func (v NullableAuthzScope) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthzScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthzScope(val *AuthzScope) *NullableAuthzScope { + return &NullableAuthzScope{value: val, isSet: true} +} + +func (v NullableAuthzScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthzScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_bridge_info.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_bridge_info.go new file mode 100644 index 0000000000..d92106add6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_bridge_info.go @@ -0,0 +1,127 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the BridgeInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BridgeInfo{} + +// BridgeInfo Information about the bridge used for the token transfer. +type BridgeInfo struct { + // The address of the token being transferred. + TokenAddress *string `json:"tokenAddress,omitempty"` +} + +// NewBridgeInfo instantiates a new BridgeInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBridgeInfo() *BridgeInfo { + this := BridgeInfo{} + return &this +} + +// NewBridgeInfoWithDefaults instantiates a new BridgeInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBridgeInfoWithDefaults() *BridgeInfo { + this := BridgeInfo{} + return &this +} + +// GetTokenAddress returns the TokenAddress field value if set, zero value otherwise. +func (o *BridgeInfo) GetTokenAddress() string { + if o == nil || IsNil(o.TokenAddress) { + var ret string + return ret + } + return *o.TokenAddress +} + +// GetTokenAddressOk returns a tuple with the TokenAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BridgeInfo) GetTokenAddressOk() (*string, bool) { + if o == nil || IsNil(o.TokenAddress) { + return nil, false + } + return o.TokenAddress, true +} + +// HasTokenAddress returns a boolean if a field has been set. +func (o *BridgeInfo) HasTokenAddress() bool { + if o != nil && !IsNil(o.TokenAddress) { + return true + } + + return false +} + +// SetTokenAddress gets a reference to the given string and assigns it to the TokenAddress field. +func (o *BridgeInfo) SetTokenAddress(v string) { + o.TokenAddress = &v +} + +func (o BridgeInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BridgeInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TokenAddress) { + toSerialize["tokenAddress"] = o.TokenAddress + } + return toSerialize, nil +} + +type NullableBridgeInfo struct { + value *BridgeInfo + isSet bool +} + +func (v NullableBridgeInfo) Get() *BridgeInfo { + return v.value +} + +func (v *NullableBridgeInfo) Set(val *BridgeInfo) { + v.value = val + v.isSet = true +} + +func (v NullableBridgeInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableBridgeInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBridgeInfo(val *BridgeInfo) *NullableBridgeInfo { + return &NullableBridgeInfo{value: val, isSet: true} +} + +func (v NullableBridgeInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBridgeInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_200_response.go new file mode 100644 index 0000000000..3f4a06dde0 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_200_response.go @@ -0,0 +1,145 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Cancel200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cancel200Response{} + +// Cancel200Response Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. +type Cancel200Response struct { + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` + // Indicates whether the cancel operation was successful. + CancelSuccessful bool `json:"cancelSuccessful"` +} + +// NewCancel200Response instantiates a new Cancel200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCancel200Response(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool) *Cancel200Response { + this := Cancel200Response{} + this.StatusResponse = statusResponse + this.CancelSuccessful = cancelSuccessful + return &this +} + +// NewCancel200ResponseWithDefaults instantiates a new Cancel200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCancel200ResponseWithDefaults() *Cancel200Response { + this := Cancel200Response{} + return &this +} + +// GetStatusResponse returns the StatusResponse field value +func (o *Cancel200Response) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *Cancel200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *Cancel200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +// GetCancelSuccessful returns the CancelSuccessful field value +func (o *Cancel200Response) GetCancelSuccessful() bool { + if o == nil { + var ret bool + return ret + } + + return o.CancelSuccessful +} + +// GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field value +// and a boolean to check if the value has been set. +func (o *Cancel200Response) GetCancelSuccessfulOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CancelSuccessful, true +} + +// SetCancelSuccessful sets field value +func (o *Cancel200Response) SetCancelSuccessful(v bool) { + o.CancelSuccessful = v +} + +func (o Cancel200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Cancel200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statusResponse"] = o.StatusResponse + toSerialize["cancelSuccessful"] = o.CancelSuccessful + return toSerialize, nil +} + +type NullableCancel200Response struct { + value *Cancel200Response + isSet bool +} + +func (v NullableCancel200Response) Get() *Cancel200Response { + return v.value +} + +func (v *NullableCancel200Response) Set(val *Cancel200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCancel200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCancel200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCancel200Response(val *Cancel200Response) *NullableCancel200Response { + return &NullableCancel200Response{value: val, isSet: true} +} + +func (v NullableCancel200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCancel200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_request.go new file mode 100644 index 0000000000..87e6e244be --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_request.go @@ -0,0 +1,118 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the CancelRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CancelRequest{} + +// CancelRequest Request to cancel an ongoing transaction session, identified by the session ID. +type CancelRequest struct { + // Unique identifier (UUID) for the session. + SessionID string `json:"sessionID"` +} + +// NewCancelRequest instantiates a new CancelRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCancelRequest(sessionID string) *CancelRequest { + this := CancelRequest{} + this.SessionID = sessionID + return &this +} + +// NewCancelRequestWithDefaults instantiates a new CancelRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCancelRequestWithDefaults() *CancelRequest { + this := CancelRequest{} + return &this +} + +// GetSessionID returns the SessionID field value +func (o *CancelRequest) GetSessionID() string { + if o == nil { + var ret string + return ret + } + + return o.SessionID +} + +// GetSessionIDOk returns a tuple with the SessionID field value +// and a boolean to check if the value has been set. +func (o *CancelRequest) GetSessionIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SessionID, true +} + +// SetSessionID sets field value +func (o *CancelRequest) SetSessionID(v string) { + o.SessionID = v +} + +func (o CancelRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CancelRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sessionID"] = o.SessionID + return toSerialize, nil +} + +type NullableCancelRequest struct { + value *CancelRequest + isSet bool +} + +func (v NullableCancelRequest) Get() *CancelRequest { + return v.value +} + +func (v *NullableCancelRequest) Set(val *CancelRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCancelRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCancelRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCancelRequest(val *CancelRequest) *NullableCancelRequest { + return &NullableCancelRequest{value: val, isSet: true} +} + +func (v NullableCancelRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCancelRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_response.go new file mode 100644 index 0000000000..e5c960e37a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_response.go @@ -0,0 +1,145 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the CancelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CancelResponse{} + +// CancelResponse Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. +type CancelResponse struct { + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` + // Indicates whether the cancel operation was successful. + CancelSuccessful bool `json:"cancelSuccessful"` +} + +// NewCancelResponse instantiates a new CancelResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCancelResponse(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool) *CancelResponse { + this := CancelResponse{} + this.StatusResponse = statusResponse + this.CancelSuccessful = cancelSuccessful + return &this +} + +// NewCancelResponseWithDefaults instantiates a new CancelResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCancelResponseWithDefaults() *CancelResponse { + this := CancelResponse{} + return &this +} + +// GetStatusResponse returns the StatusResponse field value +func (o *CancelResponse) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *CancelResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *CancelResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +// GetCancelSuccessful returns the CancelSuccessful field value +func (o *CancelResponse) GetCancelSuccessful() bool { + if o == nil { + var ret bool + return ret + } + + return o.CancelSuccessful +} + +// GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field value +// and a boolean to check if the value has been set. +func (o *CancelResponse) GetCancelSuccessfulOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CancelSuccessful, true +} + +// SetCancelSuccessful sets field value +func (o *CancelResponse) SetCancelSuccessful(v bool) { + o.CancelSuccessful = v +} + +func (o CancelResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CancelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statusResponse"] = o.StatusResponse + toSerialize["cancelSuccessful"] = o.CancelSuccessful + return toSerialize, nil +} + +type NullableCancelResponse struct { + value *CancelResponse + isSet bool +} + +func (v NullableCancelResponse) Get() *CancelResponse { + return v.value +} + +func (v *NullableCancelResponse) Set(val *CancelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCancelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCancelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCancelResponse(val *CancelResponse) *NullableCancelResponse { + return &NullableCancelResponse{value: val, isSet: true} +} + +func (v NullableCancelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCancelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_credential_profile.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_credential_profile.go new file mode 100644 index 0000000000..b6226e4217 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_credential_profile.go @@ -0,0 +1,113 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "fmt" +) + +// CredentialProfile the model 'CredentialProfile' +type CredentialProfile string + +// List of CredentialProfile +const ( + SAML CredentialProfile = "SAML" + OAUTH CredentialProfile = "OAUTH" + X509 CredentialProfile = "X509" +) + +// All allowed values of CredentialProfile enum +var AllowedCredentialProfileEnumValues = []CredentialProfile{ + "SAML", + "OAUTH", + "X509", +} + +func (v *CredentialProfile) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := CredentialProfile(value) + for _, existing := range AllowedCredentialProfileEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid CredentialProfile", value) +} + +// NewCredentialProfileFromValue returns a pointer to a valid CredentialProfile +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewCredentialProfileFromValue(v string) (*CredentialProfile, error) { + ev := CredentialProfile(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for CredentialProfile: valid values are %v", v, AllowedCredentialProfileEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v CredentialProfile) IsValid() bool { + for _, existing := range AllowedCredentialProfileEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to CredentialProfile value +func (v CredentialProfile) Ptr() *CredentialProfile { + return &v +} + +type NullableCredentialProfile struct { + value *CredentialProfile + isSet bool +} + +func (v NullableCredentialProfile) Get() *CredentialProfile { + return v.value +} + +func (v *NullableCredentialProfile) Set(val *CredentialProfile) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialProfile) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialProfile) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialProfile(val *CredentialProfile) *NullableCredentialProfile { + return &NullableCredentialProfile{value: val, isSet: true} +} + +func (v NullableCredentialProfile) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialProfile) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_dlt_protocol.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_dlt_protocol.go new file mode 100644 index 0000000000..10e52a3a8e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_dlt_protocol.go @@ -0,0 +1,111 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "fmt" +) + +// DLTProtocol Supported DLT protocols. +type DLTProtocol string + +// List of DLTProtocol +const ( + HYPERLEDGER_FABRIC DLTProtocol = "HyperledgerFabric" + HYPERLEDGER_BESU DLTProtocol = "HyperledgerBesu" +) + +// All allowed values of DLTProtocol enum +var AllowedDLTProtocolEnumValues = []DLTProtocol{ + "HyperledgerFabric", + "HyperledgerBesu", +} + +func (v *DLTProtocol) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DLTProtocol(value) + for _, existing := range AllowedDLTProtocolEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DLTProtocol", value) +} + +// NewDLTProtocolFromValue returns a pointer to a valid DLTProtocol +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDLTProtocolFromValue(v string) (*DLTProtocol, error) { + ev := DLTProtocol(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DLTProtocol: valid values are %v", v, AllowedDLTProtocolEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DLTProtocol) IsValid() bool { + for _, existing := range AllowedDLTProtocolEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DLTProtocol value +func (v DLTProtocol) Ptr() *DLTProtocol { + return &v +} + +type NullableDLTProtocol struct { + value *DLTProtocol + isSet bool +} + +func (v NullableDLTProtocol) Get() *DLTProtocol { + return v.value +} + +func (v *NullableDLTProtocol) Set(val *DLTProtocol) { + v.value = val + v.isSet = true +} + +func (v NullableDLTProtocol) IsSet() bool { + return v.isSet +} + +func (v *NullableDLTProtocol) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDLTProtocol(val *DLTProtocol) *NullableDLTProtocol { + return &NullableDLTProtocol{value: val, isSet: true} +} + +func (v NullableDLTProtocol) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDLTProtocol) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_estimate.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_estimate.go new file mode 100644 index 0000000000..6f6e4a4a37 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_estimate.go @@ -0,0 +1,460 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Estimate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Estimate{} + +// Estimate Provides an estimation for a transaction, including costs, amounts, and execution duration. +type Estimate struct { + // A blockchain address. + ApprovalAddress *string `json:"approvalAddress,omitempty"` + // The amount in string format including all decimals. + ToAmountMin *string `json:"toAmountMin,omitempty"` + // The amount in string format including all decimals. + ToAmount *string `json:"toAmount,omitempty"` + // The amount in string format including all decimals. + FromAmount *string `json:"fromAmount,omitempty"` + // A collection of fee costs associated with the transaction. + FeeCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner `json:"feeCosts,omitempty"` + // A collection of estimated gas costs for executing the transaction. + GasCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner `json:"gasCosts,omitempty"` + // The estimated duration for the transaction execution in seconds. + ExecutionDuration *int32 `json:"executionDuration,omitempty"` + // The amount in string format including all decimals. + FromAmountUSD *string `json:"fromAmountUSD,omitempty"` + // The amount in string format including all decimals. + ToAmountUSD *string `json:"toAmountUSD,omitempty"` + // The tool or service used to generate this estimate. + Tool *string `json:"tool,omitempty"` +} + +// NewEstimate instantiates a new Estimate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEstimate() *Estimate { + this := Estimate{} + return &this +} + +// NewEstimateWithDefaults instantiates a new Estimate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEstimateWithDefaults() *Estimate { + this := Estimate{} + return &this +} + +// GetApprovalAddress returns the ApprovalAddress field value if set, zero value otherwise. +func (o *Estimate) GetApprovalAddress() string { + if o == nil || IsNil(o.ApprovalAddress) { + var ret string + return ret + } + return *o.ApprovalAddress +} + +// GetApprovalAddressOk returns a tuple with the ApprovalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetApprovalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ApprovalAddress) { + return nil, false + } + return o.ApprovalAddress, true +} + +// HasApprovalAddress returns a boolean if a field has been set. +func (o *Estimate) HasApprovalAddress() bool { + if o != nil && !IsNil(o.ApprovalAddress) { + return true + } + + return false +} + +// SetApprovalAddress gets a reference to the given string and assigns it to the ApprovalAddress field. +func (o *Estimate) SetApprovalAddress(v string) { + o.ApprovalAddress = &v +} + +// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. +func (o *Estimate) GetToAmountMin() string { + if o == nil || IsNil(o.ToAmountMin) { + var ret string + return ret + } + return *o.ToAmountMin +} + +// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetToAmountMinOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountMin) { + return nil, false + } + return o.ToAmountMin, true +} + +// HasToAmountMin returns a boolean if a field has been set. +func (o *Estimate) HasToAmountMin() bool { + if o != nil && !IsNil(o.ToAmountMin) { + return true + } + + return false +} + +// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. +func (o *Estimate) SetToAmountMin(v string) { + o.ToAmountMin = &v +} + +// GetToAmount returns the ToAmount field value if set, zero value otherwise. +func (o *Estimate) GetToAmount() string { + if o == nil || IsNil(o.ToAmount) { + var ret string + return ret + } + return *o.ToAmount +} + +// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetToAmountOk() (*string, bool) { + if o == nil || IsNil(o.ToAmount) { + return nil, false + } + return o.ToAmount, true +} + +// HasToAmount returns a boolean if a field has been set. +func (o *Estimate) HasToAmount() bool { + if o != nil && !IsNil(o.ToAmount) { + return true + } + + return false +} + +// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. +func (o *Estimate) SetToAmount(v string) { + o.ToAmount = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *Estimate) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *Estimate) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *Estimate) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetFeeCosts returns the FeeCosts field value if set, zero value otherwise. +func (o *Estimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + if o == nil || IsNil(o.FeeCosts) { + var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + return ret + } + return o.FeeCosts +} + +// GetFeeCostsOk returns a tuple with the FeeCosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetFeeCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool) { + if o == nil || IsNil(o.FeeCosts) { + return nil, false + } + return o.FeeCosts, true +} + +// HasFeeCosts returns a boolean if a field has been set. +func (o *Estimate) HasFeeCosts() bool { + if o != nil && !IsNil(o.FeeCosts) { + return true + } + + return false +} + +// SetFeeCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner and assigns it to the FeeCosts field. +func (o *Estimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) { + o.FeeCosts = v +} + +// GetGasCosts returns the GasCosts field value if set, zero value otherwise. +func (o *Estimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + if o == nil || IsNil(o.GasCosts) { + var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + return ret + } + return o.GasCosts +} + +// GetGasCostsOk returns a tuple with the GasCosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetGasCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool) { + if o == nil || IsNil(o.GasCosts) { + return nil, false + } + return o.GasCosts, true +} + +// HasGasCosts returns a boolean if a field has been set. +func (o *Estimate) HasGasCosts() bool { + if o != nil && !IsNil(o.GasCosts) { + return true + } + + return false +} + +// SetGasCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner and assigns it to the GasCosts field. +func (o *Estimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) { + o.GasCosts = v +} + +// GetExecutionDuration returns the ExecutionDuration field value if set, zero value otherwise. +func (o *Estimate) GetExecutionDuration() int32 { + if o == nil || IsNil(o.ExecutionDuration) { + var ret int32 + return ret + } + return *o.ExecutionDuration +} + +// GetExecutionDurationOk returns a tuple with the ExecutionDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetExecutionDurationOk() (*int32, bool) { + if o == nil || IsNil(o.ExecutionDuration) { + return nil, false + } + return o.ExecutionDuration, true +} + +// HasExecutionDuration returns a boolean if a field has been set. +func (o *Estimate) HasExecutionDuration() bool { + if o != nil && !IsNil(o.ExecutionDuration) { + return true + } + + return false +} + +// SetExecutionDuration gets a reference to the given int32 and assigns it to the ExecutionDuration field. +func (o *Estimate) SetExecutionDuration(v int32) { + o.ExecutionDuration = &v +} + +// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. +func (o *Estimate) GetFromAmountUSD() string { + if o == nil || IsNil(o.FromAmountUSD) { + var ret string + return ret + } + return *o.FromAmountUSD +} + +// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetFromAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.FromAmountUSD) { + return nil, false + } + return o.FromAmountUSD, true +} + +// HasFromAmountUSD returns a boolean if a field has been set. +func (o *Estimate) HasFromAmountUSD() bool { + if o != nil && !IsNil(o.FromAmountUSD) { + return true + } + + return false +} + +// SetFromAmountUSD gets a reference to the given string and assigns it to the FromAmountUSD field. +func (o *Estimate) SetFromAmountUSD(v string) { + o.FromAmountUSD = &v +} + +// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. +func (o *Estimate) GetToAmountUSD() string { + if o == nil || IsNil(o.ToAmountUSD) { + var ret string + return ret + } + return *o.ToAmountUSD +} + +// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetToAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountUSD) { + return nil, false + } + return o.ToAmountUSD, true +} + +// HasToAmountUSD returns a boolean if a field has been set. +func (o *Estimate) HasToAmountUSD() bool { + if o != nil && !IsNil(o.ToAmountUSD) { + return true + } + + return false +} + +// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. +func (o *Estimate) SetToAmountUSD(v string) { + o.ToAmountUSD = &v +} + +// GetTool returns the Tool field value if set, zero value otherwise. +func (o *Estimate) GetTool() string { + if o == nil || IsNil(o.Tool) { + var ret string + return ret + } + return *o.Tool +} + +// GetToolOk returns a tuple with the Tool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Estimate) GetToolOk() (*string, bool) { + if o == nil || IsNil(o.Tool) { + return nil, false + } + return o.Tool, true +} + +// HasTool returns a boolean if a field has been set. +func (o *Estimate) HasTool() bool { + if o != nil && !IsNil(o.Tool) { + return true + } + + return false +} + +// SetTool gets a reference to the given string and assigns it to the Tool field. +func (o *Estimate) SetTool(v string) { + o.Tool = &v +} + +func (o Estimate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Estimate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApprovalAddress) { + toSerialize["approvalAddress"] = o.ApprovalAddress + } + if !IsNil(o.ToAmountMin) { + toSerialize["toAmountMin"] = o.ToAmountMin + } + if !IsNil(o.ToAmount) { + toSerialize["toAmount"] = o.ToAmount + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.FeeCosts) { + toSerialize["feeCosts"] = o.FeeCosts + } + if !IsNil(o.GasCosts) { + toSerialize["gasCosts"] = o.GasCosts + } + if !IsNil(o.ExecutionDuration) { + toSerialize["executionDuration"] = o.ExecutionDuration + } + if !IsNil(o.FromAmountUSD) { + toSerialize["fromAmountUSD"] = o.FromAmountUSD + } + if !IsNil(o.ToAmountUSD) { + toSerialize["toAmountUSD"] = o.ToAmountUSD + } + if !IsNil(o.Tool) { + toSerialize["tool"] = o.Tool + } + return toSerialize, nil +} + +type NullableEstimate struct { + value *Estimate + isSet bool +} + +func (v NullableEstimate) Get() *Estimate { + return v.value +} + +func (v *NullableEstimate) Set(val *Estimate) { + v.value = val + v.isSet = true +} + +func (v NullableEstimate) IsSet() bool { + return v.isSet +} + +func (v *NullableEstimate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEstimate(val *Estimate) *NullableEstimate { + return &NullableEstimate{value: val, isSet: true} +} + +func (v NullableEstimate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEstimate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_fee_cost.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_fee_cost.go new file mode 100644 index 0000000000..940490ec88 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_fee_cost.go @@ -0,0 +1,275 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the FeeCost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeeCost{} + +// FeeCost Details about a specific fee cost associated with the transaction. +type FeeCost struct { + // Name of the fee cost. + Name *string `json:"name,omitempty"` + // The amount in string format including all decimals. + Amount *string `json:"amount,omitempty"` + // The amount in string format including all decimals. + AmountUSD *string `json:"amountUSD,omitempty"` + // The symbol of a token + Token *string `json:"token,omitempty"` + // Indicates if the fee is included in the transaction amount. + Included *bool `json:"included,omitempty"` +} + +// NewFeeCost instantiates a new FeeCost object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFeeCost() *FeeCost { + this := FeeCost{} + return &this +} + +// NewFeeCostWithDefaults instantiates a new FeeCost object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFeeCostWithDefaults() *FeeCost { + this := FeeCost{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *FeeCost) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeeCost) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *FeeCost) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *FeeCost) SetName(v string) { + o.Name = &v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *FeeCost) GetAmount() string { + if o == nil || IsNil(o.Amount) { + var ret string + return ret + } + return *o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeeCost) GetAmountOk() (*string, bool) { + if o == nil || IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *FeeCost) HasAmount() bool { + if o != nil && !IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given string and assigns it to the Amount field. +func (o *FeeCost) SetAmount(v string) { + o.Amount = &v +} + +// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. +func (o *FeeCost) GetAmountUSD() string { + if o == nil || IsNil(o.AmountUSD) { + var ret string + return ret + } + return *o.AmountUSD +} + +// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeeCost) GetAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.AmountUSD) { + return nil, false + } + return o.AmountUSD, true +} + +// HasAmountUSD returns a boolean if a field has been set. +func (o *FeeCost) HasAmountUSD() bool { + if o != nil && !IsNil(o.AmountUSD) { + return true + } + + return false +} + +// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. +func (o *FeeCost) SetAmountUSD(v string) { + o.AmountUSD = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *FeeCost) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeeCost) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *FeeCost) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *FeeCost) SetToken(v string) { + o.Token = &v +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *FeeCost) GetIncluded() bool { + if o == nil || IsNil(o.Included) { + var ret bool + return ret + } + return *o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeeCost) GetIncludedOk() (*bool, bool) { + if o == nil || IsNil(o.Included) { + return nil, false + } + return o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *FeeCost) HasIncluded() bool { + if o != nil && !IsNil(o.Included) { + return true + } + + return false +} + +// SetIncluded gets a reference to the given bool and assigns it to the Included field. +func (o *FeeCost) SetIncluded(v bool) { + o.Included = &v +} + +func (o FeeCost) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeeCost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + if !IsNil(o.AmountUSD) { + toSerialize["amountUSD"] = o.AmountUSD + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Included) { + toSerialize["included"] = o.Included + } + return toSerialize, nil +} + +type NullableFeeCost struct { + value *FeeCost + isSet bool +} + +func (v NullableFeeCost) Get() *FeeCost { + return v.value +} + +func (v *NullableFeeCost) Set(val *FeeCost) { + v.value = val + v.isSet = true +} + +func (v NullableFeeCost) IsSet() bool { + return v.isSet +} + +func (v *NullableFeeCost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeeCost(val *FeeCost) *NullableFeeCost { + return &NullableFeeCost{value: val, isSet: true} +} + +func (v NullableFeeCost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeeCost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_gas_cost.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_gas_cost.go new file mode 100644 index 0000000000..328d136f2b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_gas_cost.go @@ -0,0 +1,348 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GasCost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GasCost{} + +// GasCost struct for GasCost +type GasCost struct { + // The type of the gas cost. + Type *string `json:"type,omitempty"` + // The gas price, specified as a string to maintain precision. + Price *string `json:"price,omitempty"` + // The estimated gas required, specified as a string to maintain precision. + Estimate *string `json:"estimate,omitempty"` + // The gas limit for the transaction, specified as a string to maintain precision. + Limit *string `json:"limit,omitempty"` + // The amount of gas required in the gas currency. + Amount *string `json:"amount,omitempty"` + // The amount of gas required in USD. + AmountUSD *string `json:"amountUSD,omitempty"` + Token *GetRoutes200ResponseRoutesInnerFromToken `json:"token,omitempty"` +} + +// NewGasCost instantiates a new GasCost object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGasCost() *GasCost { + this := GasCost{} + return &this +} + +// NewGasCostWithDefaults instantiates a new GasCost object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGasCostWithDefaults() *GasCost { + this := GasCost{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GasCost) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GasCost) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GasCost) SetType(v string) { + o.Type = &v +} + +// GetPrice returns the Price field value if set, zero value otherwise. +func (o *GasCost) GetPrice() string { + if o == nil || IsNil(o.Price) { + var ret string + return ret + } + return *o.Price +} + +// GetPriceOk returns a tuple with the Price field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetPriceOk() (*string, bool) { + if o == nil || IsNil(o.Price) { + return nil, false + } + return o.Price, true +} + +// HasPrice returns a boolean if a field has been set. +func (o *GasCost) HasPrice() bool { + if o != nil && !IsNil(o.Price) { + return true + } + + return false +} + +// SetPrice gets a reference to the given string and assigns it to the Price field. +func (o *GasCost) SetPrice(v string) { + o.Price = &v +} + +// GetEstimate returns the Estimate field value if set, zero value otherwise. +func (o *GasCost) GetEstimate() string { + if o == nil || IsNil(o.Estimate) { + var ret string + return ret + } + return *o.Estimate +} + +// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetEstimateOk() (*string, bool) { + if o == nil || IsNil(o.Estimate) { + return nil, false + } + return o.Estimate, true +} + +// HasEstimate returns a boolean if a field has been set. +func (o *GasCost) HasEstimate() bool { + if o != nil && !IsNil(o.Estimate) { + return true + } + + return false +} + +// SetEstimate gets a reference to the given string and assigns it to the Estimate field. +func (o *GasCost) SetEstimate(v string) { + o.Estimate = &v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *GasCost) GetLimit() string { + if o == nil || IsNil(o.Limit) { + var ret string + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetLimitOk() (*string, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *GasCost) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given string and assigns it to the Limit field. +func (o *GasCost) SetLimit(v string) { + o.Limit = &v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *GasCost) GetAmount() string { + if o == nil || IsNil(o.Amount) { + var ret string + return ret + } + return *o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetAmountOk() (*string, bool) { + if o == nil || IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *GasCost) HasAmount() bool { + if o != nil && !IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given string and assigns it to the Amount field. +func (o *GasCost) SetAmount(v string) { + o.Amount = &v +} + +// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. +func (o *GasCost) GetAmountUSD() string { + if o == nil || IsNil(o.AmountUSD) { + var ret string + return ret + } + return *o.AmountUSD +} + +// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.AmountUSD) { + return nil, false + } + return o.AmountUSD, true +} + +// HasAmountUSD returns a boolean if a field has been set. +func (o *GasCost) HasAmountUSD() bool { + if o != nil && !IsNil(o.AmountUSD) { + return true + } + + return false +} + +// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. +func (o *GasCost) SetAmountUSD(v string) { + o.AmountUSD = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *GasCost) GetToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.Token) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GasCost) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *GasCost) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the Token field. +func (o *GasCost) SetToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.Token = &v +} + +func (o GasCost) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GasCost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Price) { + toSerialize["price"] = o.Price + } + if !IsNil(o.Estimate) { + toSerialize["estimate"] = o.Estimate + } + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + if !IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + if !IsNil(o.AmountUSD) { + toSerialize["amountUSD"] = o.AmountUSD + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + return toSerialize, nil +} + +type NullableGasCost struct { + value *GasCost + isSet bool +} + +func (v NullableGasCost) Get() *GasCost { + return v.value +} + +func (v *NullableGasCost) Set(val *GasCost) { + v.value = val + v.isSet = true +} + +func (v NullableGasCost) IsSet() bool { + return v.isSet +} + +func (v *NullableGasCost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGasCost(val *GasCost) *NullableGasCost { + return &NullableGasCost{value: val, isSet: true} +} + +func (v NullableGasCost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGasCost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_200_response.go new file mode 100644 index 0000000000..f92c619e5e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_200_response.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "time" +) + +// checks if the GetAudit200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAudit200Response{} + +// GetAudit200Response Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. +type GetAudit200Response struct { + // An array of strings representing proofs. + Proofs []string `json:"proofs,omitempty"` + // The start datetime of the audit period. + AuditStartTime *time.Time `json:"auditStartTime,omitempty"` + // The end datetime of the audit period. + AuditEndTime *time.Time `json:"auditEndTime,omitempty"` +} + +// NewGetAudit200Response instantiates a new GetAudit200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetAudit200Response() *GetAudit200Response { + this := GetAudit200Response{} + return &this +} + +// NewGetAudit200ResponseWithDefaults instantiates a new GetAudit200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetAudit200ResponseWithDefaults() *GetAudit200Response { + this := GetAudit200Response{} + return &this +} + +// GetProofs returns the Proofs field value if set, zero value otherwise. +func (o *GetAudit200Response) GetProofs() []string { + if o == nil || IsNil(o.Proofs) { + var ret []string + return ret + } + return o.Proofs +} + +// GetProofsOk returns a tuple with the Proofs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAudit200Response) GetProofsOk() ([]string, bool) { + if o == nil || IsNil(o.Proofs) { + return nil, false + } + return o.Proofs, true +} + +// HasProofs returns a boolean if a field has been set. +func (o *GetAudit200Response) HasProofs() bool { + if o != nil && !IsNil(o.Proofs) { + return true + } + + return false +} + +// SetProofs gets a reference to the given []string and assigns it to the Proofs field. +func (o *GetAudit200Response) SetProofs(v []string) { + o.Proofs = v +} + +// GetAuditStartTime returns the AuditStartTime field value if set, zero value otherwise. +func (o *GetAudit200Response) GetAuditStartTime() time.Time { + if o == nil || IsNil(o.AuditStartTime) { + var ret time.Time + return ret + } + return *o.AuditStartTime +} + +// GetAuditStartTimeOk returns a tuple with the AuditStartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAudit200Response) GetAuditStartTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.AuditStartTime) { + return nil, false + } + return o.AuditStartTime, true +} + +// HasAuditStartTime returns a boolean if a field has been set. +func (o *GetAudit200Response) HasAuditStartTime() bool { + if o != nil && !IsNil(o.AuditStartTime) { + return true + } + + return false +} + +// SetAuditStartTime gets a reference to the given time.Time and assigns it to the AuditStartTime field. +func (o *GetAudit200Response) SetAuditStartTime(v time.Time) { + o.AuditStartTime = &v +} + +// GetAuditEndTime returns the AuditEndTime field value if set, zero value otherwise. +func (o *GetAudit200Response) GetAuditEndTime() time.Time { + if o == nil || IsNil(o.AuditEndTime) { + var ret time.Time + return ret + } + return *o.AuditEndTime +} + +// GetAuditEndTimeOk returns a tuple with the AuditEndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAudit200Response) GetAuditEndTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.AuditEndTime) { + return nil, false + } + return o.AuditEndTime, true +} + +// HasAuditEndTime returns a boolean if a field has been set. +func (o *GetAudit200Response) HasAuditEndTime() bool { + if o != nil && !IsNil(o.AuditEndTime) { + return true + } + + return false +} + +// SetAuditEndTime gets a reference to the given time.Time and assigns it to the AuditEndTime field. +func (o *GetAudit200Response) SetAuditEndTime(v time.Time) { + o.AuditEndTime = &v +} + +func (o GetAudit200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAudit200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Proofs) { + toSerialize["proofs"] = o.Proofs + } + if !IsNil(o.AuditStartTime) { + toSerialize["auditStartTime"] = o.AuditStartTime + } + if !IsNil(o.AuditEndTime) { + toSerialize["auditEndTime"] = o.AuditEndTime + } + return toSerialize, nil +} + +type NullableGetAudit200Response struct { + value *GetAudit200Response + isSet bool +} + +func (v NullableGetAudit200Response) Get() *GetAudit200Response { + return v.value +} + +func (v *NullableGetAudit200Response) Set(val *GetAudit200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetAudit200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAudit200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAudit200Response(val *GetAudit200Response) *NullableGetAudit200Response { + return &NullableGetAudit200Response{value: val, isSet: true} +} + +func (v NullableGetAudit200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAudit200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_request.go new file mode 100644 index 0000000000..fffc0b47d7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_request.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "time" +) + +// checks if the GetAuditRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAuditRequest{} + +// GetAuditRequest Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. +type GetAuditRequest struct { + // The start datetime for the audit. + AuditStartDate *time.Time `json:"auditStartDate,omitempty"` + // The end datetime for the audit. + AuditEndDate *time.Time `json:"auditEndDate,omitempty"` + // Include proofs generated from each gateway transaction. + IncludeProofs *bool `json:"includeProofs,omitempty"` +} + +// NewGetAuditRequest instantiates a new GetAuditRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetAuditRequest() *GetAuditRequest { + this := GetAuditRequest{} + return &this +} + +// NewGetAuditRequestWithDefaults instantiates a new GetAuditRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetAuditRequestWithDefaults() *GetAuditRequest { + this := GetAuditRequest{} + return &this +} + +// GetAuditStartDate returns the AuditStartDate field value if set, zero value otherwise. +func (o *GetAuditRequest) GetAuditStartDate() time.Time { + if o == nil || IsNil(o.AuditStartDate) { + var ret time.Time + return ret + } + return *o.AuditStartDate +} + +// GetAuditStartDateOk returns a tuple with the AuditStartDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuditRequest) GetAuditStartDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.AuditStartDate) { + return nil, false + } + return o.AuditStartDate, true +} + +// HasAuditStartDate returns a boolean if a field has been set. +func (o *GetAuditRequest) HasAuditStartDate() bool { + if o != nil && !IsNil(o.AuditStartDate) { + return true + } + + return false +} + +// SetAuditStartDate gets a reference to the given time.Time and assigns it to the AuditStartDate field. +func (o *GetAuditRequest) SetAuditStartDate(v time.Time) { + o.AuditStartDate = &v +} + +// GetAuditEndDate returns the AuditEndDate field value if set, zero value otherwise. +func (o *GetAuditRequest) GetAuditEndDate() time.Time { + if o == nil || IsNil(o.AuditEndDate) { + var ret time.Time + return ret + } + return *o.AuditEndDate +} + +// GetAuditEndDateOk returns a tuple with the AuditEndDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuditRequest) GetAuditEndDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.AuditEndDate) { + return nil, false + } + return o.AuditEndDate, true +} + +// HasAuditEndDate returns a boolean if a field has been set. +func (o *GetAuditRequest) HasAuditEndDate() bool { + if o != nil && !IsNil(o.AuditEndDate) { + return true + } + + return false +} + +// SetAuditEndDate gets a reference to the given time.Time and assigns it to the AuditEndDate field. +func (o *GetAuditRequest) SetAuditEndDate(v time.Time) { + o.AuditEndDate = &v +} + +// GetIncludeProofs returns the IncludeProofs field value if set, zero value otherwise. +func (o *GetAuditRequest) GetIncludeProofs() bool { + if o == nil || IsNil(o.IncludeProofs) { + var ret bool + return ret + } + return *o.IncludeProofs +} + +// GetIncludeProofsOk returns a tuple with the IncludeProofs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuditRequest) GetIncludeProofsOk() (*bool, bool) { + if o == nil || IsNil(o.IncludeProofs) { + return nil, false + } + return o.IncludeProofs, true +} + +// HasIncludeProofs returns a boolean if a field has been set. +func (o *GetAuditRequest) HasIncludeProofs() bool { + if o != nil && !IsNil(o.IncludeProofs) { + return true + } + + return false +} + +// SetIncludeProofs gets a reference to the given bool and assigns it to the IncludeProofs field. +func (o *GetAuditRequest) SetIncludeProofs(v bool) { + o.IncludeProofs = &v +} + +func (o GetAuditRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAuditRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AuditStartDate) { + toSerialize["auditStartDate"] = o.AuditStartDate + } + if !IsNil(o.AuditEndDate) { + toSerialize["auditEndDate"] = o.AuditEndDate + } + if !IsNil(o.IncludeProofs) { + toSerialize["includeProofs"] = o.IncludeProofs + } + return toSerialize, nil +} + +type NullableGetAuditRequest struct { + value *GetAuditRequest + isSet bool +} + +func (v NullableGetAuditRequest) Get() *GetAuditRequest { + return v.value +} + +func (v *NullableGetAuditRequest) Set(val *GetAuditRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGetAuditRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAuditRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAuditRequest(val *GetAuditRequest) *NullableGetAuditRequest { + return &NullableGetAuditRequest{value: val, isSet: true} +} + +func (v NullableGetAuditRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAuditRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_response.go new file mode 100644 index 0000000000..2bde4e9595 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_response.go @@ -0,0 +1,202 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "time" +) + +// checks if the GetAuditResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAuditResponse{} + +// GetAuditResponse Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. +type GetAuditResponse struct { + // An array of strings representing proofs. + Proofs []string `json:"proofs,omitempty"` + // The start datetime of the audit period. + AuditStartTime *time.Time `json:"auditStartTime,omitempty"` + // The end datetime of the audit period. + AuditEndTime *time.Time `json:"auditEndTime,omitempty"` +} + +// NewGetAuditResponse instantiates a new GetAuditResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetAuditResponse() *GetAuditResponse { + this := GetAuditResponse{} + return &this +} + +// NewGetAuditResponseWithDefaults instantiates a new GetAuditResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetAuditResponseWithDefaults() *GetAuditResponse { + this := GetAuditResponse{} + return &this +} + +// GetProofs returns the Proofs field value if set, zero value otherwise. +func (o *GetAuditResponse) GetProofs() []string { + if o == nil || IsNil(o.Proofs) { + var ret []string + return ret + } + return o.Proofs +} + +// GetProofsOk returns a tuple with the Proofs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuditResponse) GetProofsOk() ([]string, bool) { + if o == nil || IsNil(o.Proofs) { + return nil, false + } + return o.Proofs, true +} + +// HasProofs returns a boolean if a field has been set. +func (o *GetAuditResponse) HasProofs() bool { + if o != nil && !IsNil(o.Proofs) { + return true + } + + return false +} + +// SetProofs gets a reference to the given []string and assigns it to the Proofs field. +func (o *GetAuditResponse) SetProofs(v []string) { + o.Proofs = v +} + +// GetAuditStartTime returns the AuditStartTime field value if set, zero value otherwise. +func (o *GetAuditResponse) GetAuditStartTime() time.Time { + if o == nil || IsNil(o.AuditStartTime) { + var ret time.Time + return ret + } + return *o.AuditStartTime +} + +// GetAuditStartTimeOk returns a tuple with the AuditStartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuditResponse) GetAuditStartTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.AuditStartTime) { + return nil, false + } + return o.AuditStartTime, true +} + +// HasAuditStartTime returns a boolean if a field has been set. +func (o *GetAuditResponse) HasAuditStartTime() bool { + if o != nil && !IsNil(o.AuditStartTime) { + return true + } + + return false +} + +// SetAuditStartTime gets a reference to the given time.Time and assigns it to the AuditStartTime field. +func (o *GetAuditResponse) SetAuditStartTime(v time.Time) { + o.AuditStartTime = &v +} + +// GetAuditEndTime returns the AuditEndTime field value if set, zero value otherwise. +func (o *GetAuditResponse) GetAuditEndTime() time.Time { + if o == nil || IsNil(o.AuditEndTime) { + var ret time.Time + return ret + } + return *o.AuditEndTime +} + +// GetAuditEndTimeOk returns a tuple with the AuditEndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuditResponse) GetAuditEndTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.AuditEndTime) { + return nil, false + } + return o.AuditEndTime, true +} + +// HasAuditEndTime returns a boolean if a field has been set. +func (o *GetAuditResponse) HasAuditEndTime() bool { + if o != nil && !IsNil(o.AuditEndTime) { + return true + } + + return false +} + +// SetAuditEndTime gets a reference to the given time.Time and assigns it to the AuditEndTime field. +func (o *GetAuditResponse) SetAuditEndTime(v time.Time) { + o.AuditEndTime = &v +} + +func (o GetAuditResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAuditResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Proofs) { + toSerialize["proofs"] = o.Proofs + } + if !IsNil(o.AuditStartTime) { + toSerialize["auditStartTime"] = o.AuditStartTime + } + if !IsNil(o.AuditEndTime) { + toSerialize["auditEndTime"] = o.AuditEndTime + } + return toSerialize, nil +} + +type NullableGetAuditResponse struct { + value *GetAuditResponse + isSet bool +} + +func (v NullableGetAuditResponse) Get() *GetAuditResponse { + return v.value +} + +func (v *NullableGetAuditResponse) Set(val *GetAuditResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAuditResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAuditResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAuditResponse(val *GetAuditResponse) *NullableGetAuditResponse { + return &NullableGetAuditResponse{value: val, isSet: true} +} + +func (v NullableGetAuditResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAuditResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response.go new file mode 100644 index 0000000000..f58f5d0eda --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response.go @@ -0,0 +1,118 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200Response{} + +// GetRoutes200Response A collection of available and unavailable routes +type GetRoutes200Response struct { + // A collection of route objects + Routes []GetRoutes200ResponseRoutesInner `json:"routes"` +} + +// NewGetRoutes200Response instantiates a new GetRoutes200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200Response(routes []GetRoutes200ResponseRoutesInner) *GetRoutes200Response { + this := GetRoutes200Response{} + this.Routes = routes + return &this +} + +// NewGetRoutes200ResponseWithDefaults instantiates a new GetRoutes200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseWithDefaults() *GetRoutes200Response { + this := GetRoutes200Response{} + return &this +} + +// GetRoutes returns the Routes field value +func (o *GetRoutes200Response) GetRoutes() []GetRoutes200ResponseRoutesInner { + if o == nil { + var ret []GetRoutes200ResponseRoutesInner + return ret + } + + return o.Routes +} + +// GetRoutesOk returns a tuple with the Routes field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200Response) GetRoutesOk() ([]GetRoutes200ResponseRoutesInner, bool) { + if o == nil { + return nil, false + } + return o.Routes, true +} + +// SetRoutes sets field value +func (o *GetRoutes200Response) SetRoutes(v []GetRoutes200ResponseRoutesInner) { + o.Routes = v +} + +func (o GetRoutes200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["routes"] = o.Routes + return toSerialize, nil +} + +type NullableGetRoutes200Response struct { + value *GetRoutes200Response + isSet bool +} + +func (v NullableGetRoutes200Response) Get() *GetRoutes200Response { + return v.value +} + +func (v *NullableGetRoutes200Response) Set(val *GetRoutes200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200Response(val *GetRoutes200Response) *NullableGetRoutes200Response { + return &NullableGetRoutes200Response{value: val, isSet: true} +} + +func (v NullableGetRoutes200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner.go new file mode 100644 index 0000000000..affc059c9e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner.go @@ -0,0 +1,689 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInner{} + +// GetRoutes200ResponseRoutesInner struct for GetRoutes200ResponseRoutesInner +type GetRoutes200ResponseRoutesInner struct { + // A unique identifier of the route. + Id string `json:"id"` + // A unique identifier for the gateway. + GatewayID string `json:"gatewayID"` + // The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. + Mode string `json:"mode"` + // The ID of the DLT Network where the operation will originate. + FromDLTNetworkID *string `json:"fromDLTNetworkID,omitempty"` + // The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. + FromAmountUSD *float64 `json:"fromAmountUSD,omitempty"` + // The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + FromAmount *string `json:"fromAmount,omitempty"` + FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` + // The ID of the DLT Network where the operation will end. + ToDLTNetworkID *string `json:"toDLTNetworkID,omitempty"` + // The expected amount to be received in USD. + ToAmountUSD *string `json:"toAmountUSD,omitempty"` + // The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + ToAmount *string `json:"toAmount,omitempty"` + // The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + ToAmountMin *string `json:"toAmountMin,omitempty"` + ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` + // The expected gas cost in USD. + GasCostUSD *string `json:"gasCostUSD,omitempty"` + // Whether chain switching is enabled or not. + ContainsSwitchChain *bool `json:"containsSwitchChain,omitempty"` + // List of steps involved in this route, adjusted for mode. + Steps []GetRoutes200ResponseRoutesInnerStepsInner `json:"steps,omitempty"` + Insurance *GetRoutes200ResponseRoutesInnerInsurance `json:"insurance,omitempty"` + // List of tags identifiers providing additional context or categorization. + Tags []string `json:"tags,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInner instantiates a new GetRoutes200ResponseRoutesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInner(id string, gatewayID string, mode string) *GetRoutes200ResponseRoutesInner { + this := GetRoutes200ResponseRoutesInner{} + this.Id = id + this.GatewayID = gatewayID + this.Mode = mode + return &this +} + +// NewGetRoutes200ResponseRoutesInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerWithDefaults() *GetRoutes200ResponseRoutesInner { + this := GetRoutes200ResponseRoutesInner{} + return &this +} + +// GetId returns the Id field value +func (o *GetRoutes200ResponseRoutesInner) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetRoutes200ResponseRoutesInner) SetId(v string) { + o.Id = v +} + +// GetGatewayID returns the GatewayID field value +func (o *GetRoutes200ResponseRoutesInner) GetGatewayID() string { + if o == nil { + var ret string + return ret + } + + return o.GatewayID +} + +// GetGatewayIDOk returns a tuple with the GatewayID field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetGatewayIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GatewayID, true +} + +// SetGatewayID sets field value +func (o *GetRoutes200ResponseRoutesInner) SetGatewayID(v string) { + o.GatewayID = v +} + +// GetMode returns the Mode field value +func (o *GetRoutes200ResponseRoutesInner) GetMode() string { + if o == nil { + var ret string + return ret + } + + return o.Mode +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mode, true +} + +// SetMode sets field value +func (o *GetRoutes200ResponseRoutesInner) SetMode(v string) { + o.Mode = v +} + +// GetFromDLTNetworkID returns the FromDLTNetworkID field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkID() string { + if o == nil || IsNil(o.FromDLTNetworkID) { + var ret string + return ret + } + return *o.FromDLTNetworkID +} + +// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkIDOk() (*string, bool) { + if o == nil || IsNil(o.FromDLTNetworkID) { + return nil, false + } + return o.FromDLTNetworkID, true +} + +// HasFromDLTNetworkID returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasFromDLTNetworkID() bool { + if o != nil && !IsNil(o.FromDLTNetworkID) { + return true + } + + return false +} + +// SetFromDLTNetworkID gets a reference to the given string and assigns it to the FromDLTNetworkID field. +func (o *GetRoutes200ResponseRoutesInner) SetFromDLTNetworkID(v string) { + o.FromDLTNetworkID = &v +} + +// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSD() float64 { + if o == nil || IsNil(o.FromAmountUSD) { + var ret float64 + return ret + } + return *o.FromAmountUSD +} + +// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSDOk() (*float64, bool) { + if o == nil || IsNil(o.FromAmountUSD) { + return nil, false + } + return o.FromAmountUSD, true +} + +// HasFromAmountUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasFromAmountUSD() bool { + if o != nil && !IsNil(o.FromAmountUSD) { + return true + } + + return false +} + +// SetFromAmountUSD gets a reference to the given float64 and assigns it to the FromAmountUSD field. +func (o *GetRoutes200ResponseRoutesInner) SetFromAmountUSD(v float64) { + o.FromAmountUSD = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *GetRoutes200ResponseRoutesInner) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetFromToken returns the FromToken field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.FromToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.FromToken +} + +// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.FromToken) { + return nil, false + } + return o.FromToken, true +} + +// HasFromToken returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasFromToken() bool { + if o != nil && !IsNil(o.FromToken) { + return true + } + + return false +} + +// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. +func (o *GetRoutes200ResponseRoutesInner) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.FromToken = &v +} + +// GetToDLTNetworkID returns the ToDLTNetworkID field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkID() string { + if o == nil || IsNil(o.ToDLTNetworkID) { + var ret string + return ret + } + return *o.ToDLTNetworkID +} + +// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkIDOk() (*string, bool) { + if o == nil || IsNil(o.ToDLTNetworkID) { + return nil, false + } + return o.ToDLTNetworkID, true +} + +// HasToDLTNetworkID returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasToDLTNetworkID() bool { + if o != nil && !IsNil(o.ToDLTNetworkID) { + return true + } + + return false +} + +// SetToDLTNetworkID gets a reference to the given string and assigns it to the ToDLTNetworkID field. +func (o *GetRoutes200ResponseRoutesInner) SetToDLTNetworkID(v string) { + o.ToDLTNetworkID = &v +} + +// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSD() string { + if o == nil || IsNil(o.ToAmountUSD) { + var ret string + return ret + } + return *o.ToAmountUSD +} + +// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountUSD) { + return nil, false + } + return o.ToAmountUSD, true +} + +// HasToAmountUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasToAmountUSD() bool { + if o != nil && !IsNil(o.ToAmountUSD) { + return true + } + + return false +} + +// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. +func (o *GetRoutes200ResponseRoutesInner) SetToAmountUSD(v string) { + o.ToAmountUSD = &v +} + +// GetToAmount returns the ToAmount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetToAmount() string { + if o == nil || IsNil(o.ToAmount) { + var ret string + return ret + } + return *o.ToAmount +} + +// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetToAmountOk() (*string, bool) { + if o == nil || IsNil(o.ToAmount) { + return nil, false + } + return o.ToAmount, true +} + +// HasToAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasToAmount() bool { + if o != nil && !IsNil(o.ToAmount) { + return true + } + + return false +} + +// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. +func (o *GetRoutes200ResponseRoutesInner) SetToAmount(v string) { + o.ToAmount = &v +} + +// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetToAmountMin() string { + if o == nil || IsNil(o.ToAmountMin) { + var ret string + return ret + } + return *o.ToAmountMin +} + +// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetToAmountMinOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountMin) { + return nil, false + } + return o.ToAmountMin, true +} + +// HasToAmountMin returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasToAmountMin() bool { + if o != nil && !IsNil(o.ToAmountMin) { + return true + } + + return false +} + +// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. +func (o *GetRoutes200ResponseRoutesInner) SetToAmountMin(v string) { + o.ToAmountMin = &v +} + +// GetToToken returns the ToToken field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.ToToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.ToToken +} + +// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.ToToken) { + return nil, false + } + return o.ToToken, true +} + +// HasToToken returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasToToken() bool { + if o != nil && !IsNil(o.ToToken) { + return true + } + + return false +} + +// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. +func (o *GetRoutes200ResponseRoutesInner) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.ToToken = &v +} + +// GetGasCostUSD returns the GasCostUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSD() string { + if o == nil || IsNil(o.GasCostUSD) { + var ret string + return ret + } + return *o.GasCostUSD +} + +// GetGasCostUSDOk returns a tuple with the GasCostUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSDOk() (*string, bool) { + if o == nil || IsNil(o.GasCostUSD) { + return nil, false + } + return o.GasCostUSD, true +} + +// HasGasCostUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasGasCostUSD() bool { + if o != nil && !IsNil(o.GasCostUSD) { + return true + } + + return false +} + +// SetGasCostUSD gets a reference to the given string and assigns it to the GasCostUSD field. +func (o *GetRoutes200ResponseRoutesInner) SetGasCostUSD(v string) { + o.GasCostUSD = &v +} + +// GetContainsSwitchChain returns the ContainsSwitchChain field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChain() bool { + if o == nil || IsNil(o.ContainsSwitchChain) { + var ret bool + return ret + } + return *o.ContainsSwitchChain +} + +// GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChainOk() (*bool, bool) { + if o == nil || IsNil(o.ContainsSwitchChain) { + return nil, false + } + return o.ContainsSwitchChain, true +} + +// HasContainsSwitchChain returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasContainsSwitchChain() bool { + if o != nil && !IsNil(o.ContainsSwitchChain) { + return true + } + + return false +} + +// SetContainsSwitchChain gets a reference to the given bool and assigns it to the ContainsSwitchChain field. +func (o *GetRoutes200ResponseRoutesInner) SetContainsSwitchChain(v bool) { + o.ContainsSwitchChain = &v +} + +// GetSteps returns the Steps field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner { + if o == nil || IsNil(o.Steps) { + var ret []GetRoutes200ResponseRoutesInnerStepsInner + return ret + } + return o.Steps +} + +// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetStepsOk() ([]GetRoutes200ResponseRoutesInnerStepsInner, bool) { + if o == nil || IsNil(o.Steps) { + return nil, false + } + return o.Steps, true +} + +// HasSteps returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasSteps() bool { + if o != nil && !IsNil(o.Steps) { + return true + } + + return false +} + +// SetSteps gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInner and assigns it to the Steps field. +func (o *GetRoutes200ResponseRoutesInner) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner) { + o.Steps = v +} + +// GetInsurance returns the Insurance field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance { + if o == nil || IsNil(o.Insurance) { + var ret GetRoutes200ResponseRoutesInnerInsurance + return ret + } + return *o.Insurance +} + +// GetInsuranceOk returns a tuple with the Insurance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool) { + if o == nil || IsNil(o.Insurance) { + return nil, false + } + return o.Insurance, true +} + +// HasInsurance returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasInsurance() bool { + if o != nil && !IsNil(o.Insurance) { + return true + } + + return false +} + +// SetInsurance gets a reference to the given GetRoutes200ResponseRoutesInnerInsurance and assigns it to the Insurance field. +func (o *GetRoutes200ResponseRoutesInner) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance) { + o.Insurance = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInner) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInner) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInner) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *GetRoutes200ResponseRoutesInner) SetTags(v []string) { + o.Tags = v +} + +func (o GetRoutes200ResponseRoutesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["gatewayID"] = o.GatewayID + toSerialize["mode"] = o.Mode + if !IsNil(o.FromDLTNetworkID) { + toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID + } + if !IsNil(o.FromAmountUSD) { + toSerialize["fromAmountUSD"] = o.FromAmountUSD + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.FromToken) { + toSerialize["fromToken"] = o.FromToken + } + if !IsNil(o.ToDLTNetworkID) { + toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID + } + if !IsNil(o.ToAmountUSD) { + toSerialize["toAmountUSD"] = o.ToAmountUSD + } + if !IsNil(o.ToAmount) { + toSerialize["toAmount"] = o.ToAmount + } + if !IsNil(o.ToAmountMin) { + toSerialize["toAmountMin"] = o.ToAmountMin + } + if !IsNil(o.ToToken) { + toSerialize["toToken"] = o.ToToken + } + if !IsNil(o.GasCostUSD) { + toSerialize["gasCostUSD"] = o.GasCostUSD + } + if !IsNil(o.ContainsSwitchChain) { + toSerialize["containsSwitchChain"] = o.ContainsSwitchChain + } + if !IsNil(o.Steps) { + toSerialize["steps"] = o.Steps + } + if !IsNil(o.Insurance) { + toSerialize["insurance"] = o.Insurance + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInner struct { + value *GetRoutes200ResponseRoutesInner + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInner) Get() *GetRoutes200ResponseRoutesInner { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInner) Set(val *GetRoutes200ResponseRoutesInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInner(val *GetRoutes200ResponseRoutesInner) *NullableGetRoutes200ResponseRoutesInner { + return &NullableGetRoutes200ResponseRoutesInner{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_insurance.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_insurance.go new file mode 100644 index 0000000000..76404d4938 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_insurance.go @@ -0,0 +1,164 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerInsurance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerInsurance{} + +// GetRoutes200ResponseRoutesInnerInsurance struct for GetRoutes200ResponseRoutesInnerInsurance +type GetRoutes200ResponseRoutesInnerInsurance struct { + // The state of insurance applicability for the transaction. + State *string `json:"state,omitempty"` + // The fee amount for insurance, represented in USD. + FeeAmountUsd *string `json:"feeAmountUsd,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerInsurance instantiates a new GetRoutes200ResponseRoutesInnerInsurance object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerInsurance() *GetRoutes200ResponseRoutesInnerInsurance { + this := GetRoutes200ResponseRoutesInnerInsurance{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerInsurance object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults() *GetRoutes200ResponseRoutesInnerInsurance { + this := GetRoutes200ResponseRoutesInnerInsurance{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerInsurance) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerInsurance) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerInsurance) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *GetRoutes200ResponseRoutesInnerInsurance) SetState(v string) { + o.State = &v +} + +// GetFeeAmountUsd returns the FeeAmountUsd field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsd() string { + if o == nil || IsNil(o.FeeAmountUsd) { + var ret string + return ret + } + return *o.FeeAmountUsd +} + +// GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsdOk() (*string, bool) { + if o == nil || IsNil(o.FeeAmountUsd) { + return nil, false + } + return o.FeeAmountUsd, true +} + +// HasFeeAmountUsd returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerInsurance) HasFeeAmountUsd() bool { + if o != nil && !IsNil(o.FeeAmountUsd) { + return true + } + + return false +} + +// SetFeeAmountUsd gets a reference to the given string and assigns it to the FeeAmountUsd field. +func (o *GetRoutes200ResponseRoutesInnerInsurance) SetFeeAmountUsd(v string) { + o.FeeAmountUsd = &v +} + +func (o GetRoutes200ResponseRoutesInnerInsurance) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerInsurance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.FeeAmountUsd) { + toSerialize["feeAmountUsd"] = o.FeeAmountUsd + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerInsurance struct { + value *GetRoutes200ResponseRoutesInnerInsurance + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerInsurance) Get() *GetRoutes200ResponseRoutesInnerInsurance { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerInsurance) Set(val *GetRoutes200ResponseRoutesInnerInsurance) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerInsurance) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerInsurance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerInsurance(val *GetRoutes200ResponseRoutesInnerInsurance) *NullableGetRoutes200ResponseRoutesInnerInsurance { + return &NullableGetRoutes200ResponseRoutesInnerInsurance{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerInsurance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerInsurance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner.go new file mode 100644 index 0000000000..21523c9b17 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner.go @@ -0,0 +1,382 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerStepsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInner{} + +// GetRoutes200ResponseRoutesInnerStepsInner Details a single step within a route including actions and estimates. +type GetRoutes200ResponseRoutesInnerStepsInner struct { + // Id of the step + Id *string `json:"id,omitempty"` + // Type of the step, typically describing the action, e.g., 'swap'. + Type *string `json:"type,omitempty"` + // Tool used in the step, e.g., 'stargate'. + Tool *string `json:"tool,omitempty"` + Action *GetRoutes200ResponseRoutesInnerStepsInnerAction `json:"action,omitempty"` + Estimate *GetRoutes200ResponseRoutesInnerStepsInnerEstimate `json:"estimate,omitempty"` + ToolDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"toolDetails,omitempty"` + IntegrationDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"integrationDetails,omitempty"` + // IDs of further steps included within this step, allowing for nested actions without direct recursion. + IncludedStepIds []string `json:"includedStepIds,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerStepsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerStepsInner() *GetRoutes200ResponseRoutesInnerStepsInner { + this := GetRoutes200ResponseRoutesInnerStepsInner{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInner { + this := GetRoutes200ResponseRoutesInnerStepsInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetType(v string) { + o.Type = &v +} + +// GetTool returns the Tool field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTool() string { + if o == nil || IsNil(o.Tool) { + var ret string + return ret + } + return *o.Tool +} + +// GetToolOk returns a tuple with the Tool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolOk() (*string, bool) { + if o == nil || IsNil(o.Tool) { + return nil, false + } + return o.Tool, true +} + +// HasTool returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasTool() bool { + if o != nil && !IsNil(o.Tool) { + return true + } + + return false +} + +// SetTool gets a reference to the given string and assigns it to the Tool field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetTool(v string) { + o.Tool = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction { + if o == nil || IsNil(o.Action) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerAction + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerAction and assigns it to the Action field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction) { + o.Action = &v +} + +// GetEstimate returns the Estimate field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + if o == nil || IsNil(o.Estimate) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerEstimate + return ret + } + return *o.Estimate +} + +// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool) { + if o == nil || IsNil(o.Estimate) { + return nil, false + } + return o.Estimate, true +} + +// HasEstimate returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasEstimate() bool { + if o != nil && !IsNil(o.Estimate) { + return true + } + + return false +} + +// SetEstimate gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerEstimate and assigns it to the Estimate field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate) { + o.Estimate = &v +} + +// GetToolDetails returns the ToolDetails field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + if o == nil || IsNil(o.ToolDetails) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + return ret + } + return *o.ToolDetails +} + +// GetToolDetailsOk returns a tuple with the ToolDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { + if o == nil || IsNil(o.ToolDetails) { + return nil, false + } + return o.ToolDetails, true +} + +// HasToolDetails returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasToolDetails() bool { + if o != nil && !IsNil(o.ToolDetails) { + return true + } + + return false +} + +// SetToolDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the ToolDetails field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { + o.ToolDetails = &v +} + +// GetIntegrationDetails returns the IntegrationDetails field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + if o == nil || IsNil(o.IntegrationDetails) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + return ret + } + return *o.IntegrationDetails +} + +// GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { + if o == nil || IsNil(o.IntegrationDetails) { + return nil, false + } + return o.IntegrationDetails, true +} + +// HasIntegrationDetails returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIntegrationDetails() bool { + if o != nil && !IsNil(o.IntegrationDetails) { + return true + } + + return false +} + +// SetIntegrationDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the IntegrationDetails field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { + o.IntegrationDetails = &v +} + +// GetIncludedStepIds returns the IncludedStepIds field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIds() []string { + if o == nil || IsNil(o.IncludedStepIds) { + var ret []string + return ret + } + return o.IncludedStepIds +} + +// GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIdsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludedStepIds) { + return nil, false + } + return o.IncludedStepIds, true +} + +// HasIncludedStepIds returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIncludedStepIds() bool { + if o != nil && !IsNil(o.IncludedStepIds) { + return true + } + + return false +} + +// SetIncludedStepIds gets a reference to the given []string and assigns it to the IncludedStepIds field. +func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIncludedStepIds(v []string) { + o.IncludedStepIds = v +} + +func (o GetRoutes200ResponseRoutesInnerStepsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerStepsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Tool) { + toSerialize["tool"] = o.Tool + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Estimate) { + toSerialize["estimate"] = o.Estimate + } + if !IsNil(o.ToolDetails) { + toSerialize["toolDetails"] = o.ToolDetails + } + if !IsNil(o.IntegrationDetails) { + toSerialize["integrationDetails"] = o.IntegrationDetails + } + if !IsNil(o.IncludedStepIds) { + toSerialize["includedStepIds"] = o.IncludedStepIds + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerStepsInner struct { + value *GetRoutes200ResponseRoutesInnerStepsInner + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInner) Get() *GetRoutes200ResponseRoutesInnerStepsInner { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInner) Set(val *GetRoutes200ResponseRoutesInnerStepsInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerStepsInner(val *GetRoutes200ResponseRoutesInnerStepsInner) *NullableGetRoutes200ResponseRoutesInnerStepsInner { + return &NullableGetRoutes200ResponseRoutesInnerStepsInner{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate.go new file mode 100644 index 0000000000..62d15bf400 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate.go @@ -0,0 +1,460 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerStepsInnerEstimate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerEstimate{} + +// GetRoutes200ResponseRoutesInnerStepsInnerEstimate Provides an estimation for a transaction, including costs, amounts, and execution duration. +type GetRoutes200ResponseRoutesInnerStepsInnerEstimate struct { + // A blockchain address. + ApprovalAddress *string `json:"approvalAddress,omitempty"` + // The amount in string format including all decimals. + ToAmountMin *string `json:"toAmountMin,omitempty"` + // The amount in string format including all decimals. + ToAmount *string `json:"toAmount,omitempty"` + // The amount in string format including all decimals. + FromAmount *string `json:"fromAmount,omitempty"` + // A collection of fee costs associated with the transaction. + FeeCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner `json:"feeCosts,omitempty"` + // A collection of estimated gas costs for executing the transaction. + GasCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner `json:"gasCosts,omitempty"` + // The estimated duration for the transaction execution in seconds. + ExecutionDuration *int32 `json:"executionDuration,omitempty"` + // The amount in string format including all decimals. + FromAmountUSD *string `json:"fromAmountUSD,omitempty"` + // The amount in string format including all decimals. + ToAmountUSD *string `json:"toAmountUSD,omitempty"` + // The tool or service used to generate this estimate. + Tool *string `json:"tool,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + this := GetRoutes200ResponseRoutesInnerStepsInnerEstimate{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + this := GetRoutes200ResponseRoutesInnerStepsInnerEstimate{} + return &this +} + +// GetApprovalAddress returns the ApprovalAddress field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddress() string { + if o == nil || IsNil(o.ApprovalAddress) { + var ret string + return ret + } + return *o.ApprovalAddress +} + +// GetApprovalAddressOk returns a tuple with the ApprovalAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddressOk() (*string, bool) { + if o == nil || IsNil(o.ApprovalAddress) { + return nil, false + } + return o.ApprovalAddress, true +} + +// HasApprovalAddress returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasApprovalAddress() bool { + if o != nil && !IsNil(o.ApprovalAddress) { + return true + } + + return false +} + +// SetApprovalAddress gets a reference to the given string and assigns it to the ApprovalAddress field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetApprovalAddress(v string) { + o.ApprovalAddress = &v +} + +// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMin() string { + if o == nil || IsNil(o.ToAmountMin) { + var ret string + return ret + } + return *o.ToAmountMin +} + +// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMinOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountMin) { + return nil, false + } + return o.ToAmountMin, true +} + +// HasToAmountMin returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountMin() bool { + if o != nil && !IsNil(o.ToAmountMin) { + return true + } + + return false +} + +// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountMin(v string) { + o.ToAmountMin = &v +} + +// GetToAmount returns the ToAmount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmount() string { + if o == nil || IsNil(o.ToAmount) { + var ret string + return ret + } + return *o.ToAmount +} + +// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountOk() (*string, bool) { + if o == nil || IsNil(o.ToAmount) { + return nil, false + } + return o.ToAmount, true +} + +// HasToAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmount() bool { + if o != nil && !IsNil(o.ToAmount) { + return true + } + + return false +} + +// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmount(v string) { + o.ToAmount = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetFeeCosts returns the FeeCosts field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + if o == nil || IsNil(o.FeeCosts) { + var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + return ret + } + return o.FeeCosts +} + +// GetFeeCostsOk returns a tuple with the FeeCosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool) { + if o == nil || IsNil(o.FeeCosts) { + return nil, false + } + return o.FeeCosts, true +} + +// HasFeeCosts returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFeeCosts() bool { + if o != nil && !IsNil(o.FeeCosts) { + return true + } + + return false +} + +// SetFeeCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner and assigns it to the FeeCosts field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) { + o.FeeCosts = v +} + +// GetGasCosts returns the GasCosts field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + if o == nil || IsNil(o.GasCosts) { + var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + return ret + } + return o.GasCosts +} + +// GetGasCostsOk returns a tuple with the GasCosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool) { + if o == nil || IsNil(o.GasCosts) { + return nil, false + } + return o.GasCosts, true +} + +// HasGasCosts returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasGasCosts() bool { + if o != nil && !IsNil(o.GasCosts) { + return true + } + + return false +} + +// SetGasCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner and assigns it to the GasCosts field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) { + o.GasCosts = v +} + +// GetExecutionDuration returns the ExecutionDuration field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDuration() int32 { + if o == nil || IsNil(o.ExecutionDuration) { + var ret int32 + return ret + } + return *o.ExecutionDuration +} + +// GetExecutionDurationOk returns a tuple with the ExecutionDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDurationOk() (*int32, bool) { + if o == nil || IsNil(o.ExecutionDuration) { + return nil, false + } + return o.ExecutionDuration, true +} + +// HasExecutionDuration returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasExecutionDuration() bool { + if o != nil && !IsNil(o.ExecutionDuration) { + return true + } + + return false +} + +// SetExecutionDuration gets a reference to the given int32 and assigns it to the ExecutionDuration field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetExecutionDuration(v int32) { + o.ExecutionDuration = &v +} + +// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSD() string { + if o == nil || IsNil(o.FromAmountUSD) { + var ret string + return ret + } + return *o.FromAmountUSD +} + +// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.FromAmountUSD) { + return nil, false + } + return o.FromAmountUSD, true +} + +// HasFromAmountUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmountUSD() bool { + if o != nil && !IsNil(o.FromAmountUSD) { + return true + } + + return false +} + +// SetFromAmountUSD gets a reference to the given string and assigns it to the FromAmountUSD field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmountUSD(v string) { + o.FromAmountUSD = &v +} + +// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSD() string { + if o == nil || IsNil(o.ToAmountUSD) { + var ret string + return ret + } + return *o.ToAmountUSD +} + +// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountUSD) { + return nil, false + } + return o.ToAmountUSD, true +} + +// HasToAmountUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountUSD() bool { + if o != nil && !IsNil(o.ToAmountUSD) { + return true + } + + return false +} + +// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountUSD(v string) { + o.ToAmountUSD = &v +} + +// GetTool returns the Tool field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetTool() string { + if o == nil || IsNil(o.Tool) { + var ret string + return ret + } + return *o.Tool +} + +// GetToolOk returns a tuple with the Tool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToolOk() (*string, bool) { + if o == nil || IsNil(o.Tool) { + return nil, false + } + return o.Tool, true +} + +// HasTool returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasTool() bool { + if o != nil && !IsNil(o.Tool) { + return true + } + + return false +} + +// SetTool gets a reference to the given string and assigns it to the Tool field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetTool(v string) { + o.Tool = &v +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApprovalAddress) { + toSerialize["approvalAddress"] = o.ApprovalAddress + } + if !IsNil(o.ToAmountMin) { + toSerialize["toAmountMin"] = o.ToAmountMin + } + if !IsNil(o.ToAmount) { + toSerialize["toAmount"] = o.ToAmount + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.FeeCosts) { + toSerialize["feeCosts"] = o.FeeCosts + } + if !IsNil(o.GasCosts) { + toSerialize["gasCosts"] = o.GasCosts + } + if !IsNil(o.ExecutionDuration) { + toSerialize["executionDuration"] = o.ExecutionDuration + } + if !IsNil(o.FromAmountUSD) { + toSerialize["fromAmountUSD"] = o.FromAmountUSD + } + if !IsNil(o.ToAmountUSD) { + toSerialize["toAmountUSD"] = o.ToAmountUSD + } + if !IsNil(o.Tool) { + toSerialize["tool"] = o.Tool + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate struct { + value *GetRoutes200ResponseRoutesInnerStepsInnerEstimate + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) Get() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate { + return &NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go new file mode 100644 index 0000000000..36653106eb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go @@ -0,0 +1,275 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{} + +// GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner Details about a specific fee cost associated with the transaction. +type GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner struct { + // Name of the fee cost. + Name *string `json:"name,omitempty"` + // The amount in string format including all decimals. + Amount *string `json:"amount,omitempty"` + // The amount in string format including all decimals. + AmountUSD *string `json:"amountUSD,omitempty"` + // The symbol of a token + Token *string `json:"token,omitempty"` + // Indicates if the fee is included in the transaction amount. + Included *bool `json:"included,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetName(v string) { + o.Name = &v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmount() string { + if o == nil || IsNil(o.Amount) { + var ret string + return ret + } + return *o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountOk() (*string, bool) { + if o == nil || IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmount() bool { + if o != nil && !IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given string and assigns it to the Amount field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmount(v string) { + o.Amount = &v +} + +// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSD() string { + if o == nil || IsNil(o.AmountUSD) { + var ret string + return ret + } + return *o.AmountUSD +} + +// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.AmountUSD) { + return nil, false + } + return o.AmountUSD, true +} + +// HasAmountUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmountUSD() bool { + if o != nil && !IsNil(o.AmountUSD) { + return true + } + + return false +} + +// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmountUSD(v string) { + o.AmountUSD = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetToken(v string) { + o.Token = &v +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncluded() bool { + if o == nil || IsNil(o.Included) { + var ret bool + return ret + } + return *o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncludedOk() (*bool, bool) { + if o == nil || IsNil(o.Included) { + return nil, false + } + return o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasIncluded() bool { + if o != nil && !IsNil(o.Included) { + return true + } + + return false +} + +// SetIncluded gets a reference to the given bool and assigns it to the Included field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetIncluded(v bool) { + o.Included = &v +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + if !IsNil(o.AmountUSD) { + toSerialize["amountUSD"] = o.AmountUSD + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Included) { + toSerialize["included"] = o.Included + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner struct { + value *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) Get() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + return &NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go new file mode 100644 index 0000000000..a883fbf098 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go @@ -0,0 +1,348 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{} + +// GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner struct for GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner +type GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner struct { + // The type of the gas cost. + Type *string `json:"type,omitempty"` + // The gas price, specified as a string to maintain precision. + Price *string `json:"price,omitempty"` + // The estimated gas required, specified as a string to maintain precision. + Estimate *string `json:"estimate,omitempty"` + // The gas limit for the transaction, specified as a string to maintain precision. + Limit *string `json:"limit,omitempty"` + // The amount of gas required in the gas currency. + Amount *string `json:"amount,omitempty"` + // The amount of gas required in USD. + AmountUSD *string `json:"amountUSD,omitempty"` + Token *GetRoutes200ResponseRoutesInnerFromToken `json:"token,omitempty"` +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{} + return &this +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetType(v string) { + o.Type = &v +} + +// GetPrice returns the Price field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPrice() string { + if o == nil || IsNil(o.Price) { + var ret string + return ret + } + return *o.Price +} + +// GetPriceOk returns a tuple with the Price field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPriceOk() (*string, bool) { + if o == nil || IsNil(o.Price) { + return nil, false + } + return o.Price, true +} + +// HasPrice returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasPrice() bool { + if o != nil && !IsNil(o.Price) { + return true + } + + return false +} + +// SetPrice gets a reference to the given string and assigns it to the Price field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetPrice(v string) { + o.Price = &v +} + +// GetEstimate returns the Estimate field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimate() string { + if o == nil || IsNil(o.Estimate) { + var ret string + return ret + } + return *o.Estimate +} + +// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimateOk() (*string, bool) { + if o == nil || IsNil(o.Estimate) { + return nil, false + } + return o.Estimate, true +} + +// HasEstimate returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasEstimate() bool { + if o != nil && !IsNil(o.Estimate) { + return true + } + + return false +} + +// SetEstimate gets a reference to the given string and assigns it to the Estimate field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetEstimate(v string) { + o.Estimate = &v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimit() string { + if o == nil || IsNil(o.Limit) { + var ret string + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimitOk() (*string, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given string and assigns it to the Limit field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetLimit(v string) { + o.Limit = &v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmount() string { + if o == nil || IsNil(o.Amount) { + var ret string + return ret + } + return *o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountOk() (*string, bool) { + if o == nil || IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmount() bool { + if o != nil && !IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given string and assigns it to the Amount field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmount(v string) { + o.Amount = &v +} + +// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSD() string { + if o == nil || IsNil(o.AmountUSD) { + var ret string + return ret + } + return *o.AmountUSD +} + +// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.AmountUSD) { + return nil, false + } + return o.AmountUSD, true +} + +// HasAmountUSD returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmountUSD() bool { + if o != nil && !IsNil(o.AmountUSD) { + return true + } + + return false +} + +// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmountUSD(v string) { + o.AmountUSD = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.Token) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the Token field. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.Token = &v +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Price) { + toSerialize["price"] = o.Price + } + if !IsNil(o.Estimate) { + toSerialize["estimate"] = o.Estimate + } + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + if !IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + if !IsNil(o.AmountUSD) { + toSerialize["amountUSD"] = o.AmountUSD + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner struct { + value *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) Get() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + return &NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go new file mode 100644 index 0000000000..c321992456 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go @@ -0,0 +1,174 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the GetRoutes200ResponseRoutesInnerStepsInnerToolDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerToolDetails{} + +// GetRoutes200ResponseRoutesInnerStepsInnerToolDetails Describes integration or tool details such as bridges or exchanges involved in the transaction. +type GetRoutes200ResponseRoutesInnerStepsInnerToolDetails struct { + // A unique identifier for the integration or tool. + Key string `json:"key"` + // The name of the integration or tool. + Name string `json:"name"` + // URL to the logo of the integration or tool. + LogoURI string `json:"logoURI"` +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails(key string, name string, logoURI string) *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + this := GetRoutes200ResponseRoutesInnerStepsInnerToolDetails{} + this.Key = key + this.Name = name + this.LogoURI = logoURI + return &this +} + +// NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + this := GetRoutes200ResponseRoutesInnerStepsInnerToolDetails{} + return &this +} + +// GetKey returns the Key field value +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetName(v string) { + o.Name = v +} + +// GetLogoURI returns the LogoURI field value +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURI() string { + if o == nil { + var ret string + return ret + } + + return o.LogoURI +} + +// GetLogoURIOk returns a tuple with the LogoURI field value +// and a boolean to check if the value has been set. +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURIOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LogoURI, true +} + +// SetLogoURI sets field value +func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetLogoURI(v string) { + o.LogoURI = v +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + toSerialize["logoURI"] = o.LogoURI + return toSerialize, nil +} + +type NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails struct { + value *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + isSet bool +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) Get() *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + return v.value +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails(val *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + return &NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails{value: val, isSet: true} +} + +func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_included_step.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_included_step.go new file mode 100644 index 0000000000..086e0c91c2 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_included_step.go @@ -0,0 +1,382 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the IncludedStep type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IncludedStep{} + +// IncludedStep Details a single step within a route including actions and estimates. +type IncludedStep struct { + // Id of the step + Id *string `json:"id,omitempty"` + // Type of the step, typically describing the action, e.g., 'swap'. + Type *string `json:"type,omitempty"` + // Tool used in the step, e.g., 'stargate'. + Tool *string `json:"tool,omitempty"` + Action *GetRoutes200ResponseRoutesInnerStepsInnerAction `json:"action,omitempty"` + Estimate *GetRoutes200ResponseRoutesInnerStepsInnerEstimate `json:"estimate,omitempty"` + ToolDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"toolDetails,omitempty"` + IntegrationDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"integrationDetails,omitempty"` + // IDs of further steps included within this step, allowing for nested actions without direct recursion. + IncludedStepIds []string `json:"includedStepIds,omitempty"` +} + +// NewIncludedStep instantiates a new IncludedStep object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncludedStep() *IncludedStep { + this := IncludedStep{} + return &this +} + +// NewIncludedStepWithDefaults instantiates a new IncludedStep object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncludedStepWithDefaults() *IncludedStep { + this := IncludedStep{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *IncludedStep) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *IncludedStep) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *IncludedStep) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IncludedStep) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IncludedStep) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IncludedStep) SetType(v string) { + o.Type = &v +} + +// GetTool returns the Tool field value if set, zero value otherwise. +func (o *IncludedStep) GetTool() string { + if o == nil || IsNil(o.Tool) { + var ret string + return ret + } + return *o.Tool +} + +// GetToolOk returns a tuple with the Tool field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetToolOk() (*string, bool) { + if o == nil || IsNil(o.Tool) { + return nil, false + } + return o.Tool, true +} + +// HasTool returns a boolean if a field has been set. +func (o *IncludedStep) HasTool() bool { + if o != nil && !IsNil(o.Tool) { + return true + } + + return false +} + +// SetTool gets a reference to the given string and assigns it to the Tool field. +func (o *IncludedStep) SetTool(v string) { + o.Tool = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *IncludedStep) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction { + if o == nil || IsNil(o.Action) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerAction + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *IncludedStep) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerAction and assigns it to the Action field. +func (o *IncludedStep) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction) { + o.Action = &v +} + +// GetEstimate returns the Estimate field value if set, zero value otherwise. +func (o *IncludedStep) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + if o == nil || IsNil(o.Estimate) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerEstimate + return ret + } + return *o.Estimate +} + +// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool) { + if o == nil || IsNil(o.Estimate) { + return nil, false + } + return o.Estimate, true +} + +// HasEstimate returns a boolean if a field has been set. +func (o *IncludedStep) HasEstimate() bool { + if o != nil && !IsNil(o.Estimate) { + return true + } + + return false +} + +// SetEstimate gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerEstimate and assigns it to the Estimate field. +func (o *IncludedStep) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate) { + o.Estimate = &v +} + +// GetToolDetails returns the ToolDetails field value if set, zero value otherwise. +func (o *IncludedStep) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + if o == nil || IsNil(o.ToolDetails) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + return ret + } + return *o.ToolDetails +} + +// GetToolDetailsOk returns a tuple with the ToolDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { + if o == nil || IsNil(o.ToolDetails) { + return nil, false + } + return o.ToolDetails, true +} + +// HasToolDetails returns a boolean if a field has been set. +func (o *IncludedStep) HasToolDetails() bool { + if o != nil && !IsNil(o.ToolDetails) { + return true + } + + return false +} + +// SetToolDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the ToolDetails field. +func (o *IncludedStep) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { + o.ToolDetails = &v +} + +// GetIntegrationDetails returns the IntegrationDetails field value if set, zero value otherwise. +func (o *IncludedStep) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + if o == nil || IsNil(o.IntegrationDetails) { + var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + return ret + } + return *o.IntegrationDetails +} + +// GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { + if o == nil || IsNil(o.IntegrationDetails) { + return nil, false + } + return o.IntegrationDetails, true +} + +// HasIntegrationDetails returns a boolean if a field has been set. +func (o *IncludedStep) HasIntegrationDetails() bool { + if o != nil && !IsNil(o.IntegrationDetails) { + return true + } + + return false +} + +// SetIntegrationDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the IntegrationDetails field. +func (o *IncludedStep) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { + o.IntegrationDetails = &v +} + +// GetIncludedStepIds returns the IncludedStepIds field value if set, zero value otherwise. +func (o *IncludedStep) GetIncludedStepIds() []string { + if o == nil || IsNil(o.IncludedStepIds) { + var ret []string + return ret + } + return o.IncludedStepIds +} + +// GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedStep) GetIncludedStepIdsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludedStepIds) { + return nil, false + } + return o.IncludedStepIds, true +} + +// HasIncludedStepIds returns a boolean if a field has been set. +func (o *IncludedStep) HasIncludedStepIds() bool { + if o != nil && !IsNil(o.IncludedStepIds) { + return true + } + + return false +} + +// SetIncludedStepIds gets a reference to the given []string and assigns it to the IncludedStepIds field. +func (o *IncludedStep) SetIncludedStepIds(v []string) { + o.IncludedStepIds = v +} + +func (o IncludedStep) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IncludedStep) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Tool) { + toSerialize["tool"] = o.Tool + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Estimate) { + toSerialize["estimate"] = o.Estimate + } + if !IsNil(o.ToolDetails) { + toSerialize["toolDetails"] = o.ToolDetails + } + if !IsNil(o.IntegrationDetails) { + toSerialize["integrationDetails"] = o.IntegrationDetails + } + if !IsNil(o.IncludedStepIds) { + toSerialize["includedStepIds"] = o.IncludedStepIds + } + return toSerialize, nil +} + +type NullableIncludedStep struct { + value *IncludedStep + isSet bool +} + +func (v NullableIncludedStep) Get() *IncludedStep { + return v.value +} + +func (v *NullableIncludedStep) Set(val *IncludedStep) { + v.value = val + v.isSet = true +} + +func (v NullableIncludedStep) IsSet() bool { + return v.isSet +} + +func (v *NullableIncludedStep) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIncludedStep(val *IncludedStep) *NullableIncludedStep { + return &NullableIncludedStep{value: val, isSet: true} +} + +func (v NullableIncludedStep) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIncludedStep) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_insurance.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_insurance.go new file mode 100644 index 0000000000..c4ed1d8ef2 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_insurance.go @@ -0,0 +1,164 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Insurance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Insurance{} + +// Insurance struct for Insurance +type Insurance struct { + // The state of insurance applicability for the transaction. + State *string `json:"state,omitempty"` + // The fee amount for insurance, represented in USD. + FeeAmountUsd *string `json:"feeAmountUsd,omitempty"` +} + +// NewInsurance instantiates a new Insurance object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInsurance() *Insurance { + this := Insurance{} + return &this +} + +// NewInsuranceWithDefaults instantiates a new Insurance object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInsuranceWithDefaults() *Insurance { + this := Insurance{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *Insurance) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insurance) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *Insurance) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *Insurance) SetState(v string) { + o.State = &v +} + +// GetFeeAmountUsd returns the FeeAmountUsd field value if set, zero value otherwise. +func (o *Insurance) GetFeeAmountUsd() string { + if o == nil || IsNil(o.FeeAmountUsd) { + var ret string + return ret + } + return *o.FeeAmountUsd +} + +// GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Insurance) GetFeeAmountUsdOk() (*string, bool) { + if o == nil || IsNil(o.FeeAmountUsd) { + return nil, false + } + return o.FeeAmountUsd, true +} + +// HasFeeAmountUsd returns a boolean if a field has been set. +func (o *Insurance) HasFeeAmountUsd() bool { + if o != nil && !IsNil(o.FeeAmountUsd) { + return true + } + + return false +} + +// SetFeeAmountUsd gets a reference to the given string and assigns it to the FeeAmountUsd field. +func (o *Insurance) SetFeeAmountUsd(v string) { + o.FeeAmountUsd = &v +} + +func (o Insurance) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Insurance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.FeeAmountUsd) { + toSerialize["feeAmountUsd"] = o.FeeAmountUsd + } + return toSerialize, nil +} + +type NullableInsurance struct { + value *Insurance + isSet bool +} + +func (v NullableInsurance) Get() *Insurance { + return v.value +} + +func (v *NullableInsurance) Set(val *Insurance) { + v.value = val + v.isSet = true +} + +func (v NullableInsurance) IsSet() bool { + return v.isSet +} + +func (v *NullableInsurance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInsurance(val *Insurance) *NullableInsurance { + return &NullableInsurance{value: val, isSet: true} +} + +func (v NullableInsurance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInsurance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_integration_details.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_integration_details.go new file mode 100644 index 0000000000..bff096548e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_integration_details.go @@ -0,0 +1,174 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the IntegrationDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IntegrationDetails{} + +// IntegrationDetails Describes integration or tool details such as bridges or exchanges involved in the transaction. +type IntegrationDetails struct { + // A unique identifier for the integration or tool. + Key string `json:"key"` + // The name of the integration or tool. + Name string `json:"name"` + // URL to the logo of the integration or tool. + LogoURI string `json:"logoURI"` +} + +// NewIntegrationDetails instantiates a new IntegrationDetails object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIntegrationDetails(key string, name string, logoURI string) *IntegrationDetails { + this := IntegrationDetails{} + this.Key = key + this.Name = name + this.LogoURI = logoURI + return &this +} + +// NewIntegrationDetailsWithDefaults instantiates a new IntegrationDetails object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIntegrationDetailsWithDefaults() *IntegrationDetails { + this := IntegrationDetails{} + return &this +} + +// GetKey returns the Key field value +func (o *IntegrationDetails) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *IntegrationDetails) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *IntegrationDetails) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *IntegrationDetails) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IntegrationDetails) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IntegrationDetails) SetName(v string) { + o.Name = v +} + +// GetLogoURI returns the LogoURI field value +func (o *IntegrationDetails) GetLogoURI() string { + if o == nil { + var ret string + return ret + } + + return o.LogoURI +} + +// GetLogoURIOk returns a tuple with the LogoURI field value +// and a boolean to check if the value has been set. +func (o *IntegrationDetails) GetLogoURIOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LogoURI, true +} + +// SetLogoURI sets field value +func (o *IntegrationDetails) SetLogoURI(v string) { + o.LogoURI = v +} + +func (o IntegrationDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IntegrationDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + toSerialize["logoURI"] = o.LogoURI + return toSerialize, nil +} + +type NullableIntegrationDetails struct { + value *IntegrationDetails + isSet bool +} + +func (v NullableIntegrationDetails) Get() *IntegrationDetails { + return v.value +} + +func (v *NullableIntegrationDetails) Set(val *IntegrationDetails) { + v.value = val + v.isSet = true +} + +func (v NullableIntegrationDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableIntegrationDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIntegrationDetails(val *IntegrationDetails) *NullableIntegrationDetails { + return &NullableIntegrationDetails{value: val, isSet: true} +} + +func (v NullableIntegrationDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIntegrationDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_route.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_route.go new file mode 100644 index 0000000000..5266515586 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_route.go @@ -0,0 +1,689 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Route type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Route{} + +// Route struct for Route +type Route struct { + // A unique identifier of the route. + Id string `json:"id"` + // A unique identifier for the gateway. + GatewayID string `json:"gatewayID"` + // The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. + Mode string `json:"mode"` + // The ID of the DLT Network where the operation will originate. + FromDLTNetworkID *string `json:"fromDLTNetworkID,omitempty"` + // The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. + FromAmountUSD *float64 `json:"fromAmountUSD,omitempty"` + // The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + FromAmount *string `json:"fromAmount,omitempty"` + FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` + // The ID of the DLT Network where the operation will end. + ToDLTNetworkID *string `json:"toDLTNetworkID,omitempty"` + // The expected amount to be received in USD. + ToAmountUSD *string `json:"toAmountUSD,omitempty"` + // The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + ToAmount *string `json:"toAmount,omitempty"` + // The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + ToAmountMin *string `json:"toAmountMin,omitempty"` + ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` + // The expected gas cost in USD. + GasCostUSD *string `json:"gasCostUSD,omitempty"` + // Whether chain switching is enabled or not. + ContainsSwitchChain *bool `json:"containsSwitchChain,omitempty"` + // List of steps involved in this route, adjusted for mode. + Steps []GetRoutes200ResponseRoutesInnerStepsInner `json:"steps,omitempty"` + Insurance *GetRoutes200ResponseRoutesInnerInsurance `json:"insurance,omitempty"` + // List of tags identifiers providing additional context or categorization. + Tags []string `json:"tags,omitempty"` +} + +// NewRoute instantiates a new Route object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRoute(id string, gatewayID string, mode string) *Route { + this := Route{} + this.Id = id + this.GatewayID = gatewayID + this.Mode = mode + return &this +} + +// NewRouteWithDefaults instantiates a new Route object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRouteWithDefaults() *Route { + this := Route{} + return &this +} + +// GetId returns the Id field value +func (o *Route) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Route) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Route) SetId(v string) { + o.Id = v +} + +// GetGatewayID returns the GatewayID field value +func (o *Route) GetGatewayID() string { + if o == nil { + var ret string + return ret + } + + return o.GatewayID +} + +// GetGatewayIDOk returns a tuple with the GatewayID field value +// and a boolean to check if the value has been set. +func (o *Route) GetGatewayIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GatewayID, true +} + +// SetGatewayID sets field value +func (o *Route) SetGatewayID(v string) { + o.GatewayID = v +} + +// GetMode returns the Mode field value +func (o *Route) GetMode() string { + if o == nil { + var ret string + return ret + } + + return o.Mode +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *Route) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mode, true +} + +// SetMode sets field value +func (o *Route) SetMode(v string) { + o.Mode = v +} + +// GetFromDLTNetworkID returns the FromDLTNetworkID field value if set, zero value otherwise. +func (o *Route) GetFromDLTNetworkID() string { + if o == nil || IsNil(o.FromDLTNetworkID) { + var ret string + return ret + } + return *o.FromDLTNetworkID +} + +// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetFromDLTNetworkIDOk() (*string, bool) { + if o == nil || IsNil(o.FromDLTNetworkID) { + return nil, false + } + return o.FromDLTNetworkID, true +} + +// HasFromDLTNetworkID returns a boolean if a field has been set. +func (o *Route) HasFromDLTNetworkID() bool { + if o != nil && !IsNil(o.FromDLTNetworkID) { + return true + } + + return false +} + +// SetFromDLTNetworkID gets a reference to the given string and assigns it to the FromDLTNetworkID field. +func (o *Route) SetFromDLTNetworkID(v string) { + o.FromDLTNetworkID = &v +} + +// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. +func (o *Route) GetFromAmountUSD() float64 { + if o == nil || IsNil(o.FromAmountUSD) { + var ret float64 + return ret + } + return *o.FromAmountUSD +} + +// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetFromAmountUSDOk() (*float64, bool) { + if o == nil || IsNil(o.FromAmountUSD) { + return nil, false + } + return o.FromAmountUSD, true +} + +// HasFromAmountUSD returns a boolean if a field has been set. +func (o *Route) HasFromAmountUSD() bool { + if o != nil && !IsNil(o.FromAmountUSD) { + return true + } + + return false +} + +// SetFromAmountUSD gets a reference to the given float64 and assigns it to the FromAmountUSD field. +func (o *Route) SetFromAmountUSD(v float64) { + o.FromAmountUSD = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *Route) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *Route) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *Route) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetFromToken returns the FromToken field value if set, zero value otherwise. +func (o *Route) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.FromToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.FromToken +} + +// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.FromToken) { + return nil, false + } + return o.FromToken, true +} + +// HasFromToken returns a boolean if a field has been set. +func (o *Route) HasFromToken() bool { + if o != nil && !IsNil(o.FromToken) { + return true + } + + return false +} + +// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. +func (o *Route) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.FromToken = &v +} + +// GetToDLTNetworkID returns the ToDLTNetworkID field value if set, zero value otherwise. +func (o *Route) GetToDLTNetworkID() string { + if o == nil || IsNil(o.ToDLTNetworkID) { + var ret string + return ret + } + return *o.ToDLTNetworkID +} + +// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetToDLTNetworkIDOk() (*string, bool) { + if o == nil || IsNil(o.ToDLTNetworkID) { + return nil, false + } + return o.ToDLTNetworkID, true +} + +// HasToDLTNetworkID returns a boolean if a field has been set. +func (o *Route) HasToDLTNetworkID() bool { + if o != nil && !IsNil(o.ToDLTNetworkID) { + return true + } + + return false +} + +// SetToDLTNetworkID gets a reference to the given string and assigns it to the ToDLTNetworkID field. +func (o *Route) SetToDLTNetworkID(v string) { + o.ToDLTNetworkID = &v +} + +// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. +func (o *Route) GetToAmountUSD() string { + if o == nil || IsNil(o.ToAmountUSD) { + var ret string + return ret + } + return *o.ToAmountUSD +} + +// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetToAmountUSDOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountUSD) { + return nil, false + } + return o.ToAmountUSD, true +} + +// HasToAmountUSD returns a boolean if a field has been set. +func (o *Route) HasToAmountUSD() bool { + if o != nil && !IsNil(o.ToAmountUSD) { + return true + } + + return false +} + +// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. +func (o *Route) SetToAmountUSD(v string) { + o.ToAmountUSD = &v +} + +// GetToAmount returns the ToAmount field value if set, zero value otherwise. +func (o *Route) GetToAmount() string { + if o == nil || IsNil(o.ToAmount) { + var ret string + return ret + } + return *o.ToAmount +} + +// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetToAmountOk() (*string, bool) { + if o == nil || IsNil(o.ToAmount) { + return nil, false + } + return o.ToAmount, true +} + +// HasToAmount returns a boolean if a field has been set. +func (o *Route) HasToAmount() bool { + if o != nil && !IsNil(o.ToAmount) { + return true + } + + return false +} + +// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. +func (o *Route) SetToAmount(v string) { + o.ToAmount = &v +} + +// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. +func (o *Route) GetToAmountMin() string { + if o == nil || IsNil(o.ToAmountMin) { + var ret string + return ret + } + return *o.ToAmountMin +} + +// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetToAmountMinOk() (*string, bool) { + if o == nil || IsNil(o.ToAmountMin) { + return nil, false + } + return o.ToAmountMin, true +} + +// HasToAmountMin returns a boolean if a field has been set. +func (o *Route) HasToAmountMin() bool { + if o != nil && !IsNil(o.ToAmountMin) { + return true + } + + return false +} + +// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. +func (o *Route) SetToAmountMin(v string) { + o.ToAmountMin = &v +} + +// GetToToken returns the ToToken field value if set, zero value otherwise. +func (o *Route) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { + if o == nil || IsNil(o.ToToken) { + var ret GetRoutes200ResponseRoutesInnerFromToken + return ret + } + return *o.ToToken +} + +// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { + if o == nil || IsNil(o.ToToken) { + return nil, false + } + return o.ToToken, true +} + +// HasToToken returns a boolean if a field has been set. +func (o *Route) HasToToken() bool { + if o != nil && !IsNil(o.ToToken) { + return true + } + + return false +} + +// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. +func (o *Route) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { + o.ToToken = &v +} + +// GetGasCostUSD returns the GasCostUSD field value if set, zero value otherwise. +func (o *Route) GetGasCostUSD() string { + if o == nil || IsNil(o.GasCostUSD) { + var ret string + return ret + } + return *o.GasCostUSD +} + +// GetGasCostUSDOk returns a tuple with the GasCostUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetGasCostUSDOk() (*string, bool) { + if o == nil || IsNil(o.GasCostUSD) { + return nil, false + } + return o.GasCostUSD, true +} + +// HasGasCostUSD returns a boolean if a field has been set. +func (o *Route) HasGasCostUSD() bool { + if o != nil && !IsNil(o.GasCostUSD) { + return true + } + + return false +} + +// SetGasCostUSD gets a reference to the given string and assigns it to the GasCostUSD field. +func (o *Route) SetGasCostUSD(v string) { + o.GasCostUSD = &v +} + +// GetContainsSwitchChain returns the ContainsSwitchChain field value if set, zero value otherwise. +func (o *Route) GetContainsSwitchChain() bool { + if o == nil || IsNil(o.ContainsSwitchChain) { + var ret bool + return ret + } + return *o.ContainsSwitchChain +} + +// GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetContainsSwitchChainOk() (*bool, bool) { + if o == nil || IsNil(o.ContainsSwitchChain) { + return nil, false + } + return o.ContainsSwitchChain, true +} + +// HasContainsSwitchChain returns a boolean if a field has been set. +func (o *Route) HasContainsSwitchChain() bool { + if o != nil && !IsNil(o.ContainsSwitchChain) { + return true + } + + return false +} + +// SetContainsSwitchChain gets a reference to the given bool and assigns it to the ContainsSwitchChain field. +func (o *Route) SetContainsSwitchChain(v bool) { + o.ContainsSwitchChain = &v +} + +// GetSteps returns the Steps field value if set, zero value otherwise. +func (o *Route) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner { + if o == nil || IsNil(o.Steps) { + var ret []GetRoutes200ResponseRoutesInnerStepsInner + return ret + } + return o.Steps +} + +// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetStepsOk() ([]GetRoutes200ResponseRoutesInnerStepsInner, bool) { + if o == nil || IsNil(o.Steps) { + return nil, false + } + return o.Steps, true +} + +// HasSteps returns a boolean if a field has been set. +func (o *Route) HasSteps() bool { + if o != nil && !IsNil(o.Steps) { + return true + } + + return false +} + +// SetSteps gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInner and assigns it to the Steps field. +func (o *Route) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner) { + o.Steps = v +} + +// GetInsurance returns the Insurance field value if set, zero value otherwise. +func (o *Route) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance { + if o == nil || IsNil(o.Insurance) { + var ret GetRoutes200ResponseRoutesInnerInsurance + return ret + } + return *o.Insurance +} + +// GetInsuranceOk returns a tuple with the Insurance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool) { + if o == nil || IsNil(o.Insurance) { + return nil, false + } + return o.Insurance, true +} + +// HasInsurance returns a boolean if a field has been set. +func (o *Route) HasInsurance() bool { + if o != nil && !IsNil(o.Insurance) { + return true + } + + return false +} + +// SetInsurance gets a reference to the given GetRoutes200ResponseRoutesInnerInsurance and assigns it to the Insurance field. +func (o *Route) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance) { + o.Insurance = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Route) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Route) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Route) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *Route) SetTags(v []string) { + o.Tags = v +} + +func (o Route) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Route) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["gatewayID"] = o.GatewayID + toSerialize["mode"] = o.Mode + if !IsNil(o.FromDLTNetworkID) { + toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID + } + if !IsNil(o.FromAmountUSD) { + toSerialize["fromAmountUSD"] = o.FromAmountUSD + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.FromToken) { + toSerialize["fromToken"] = o.FromToken + } + if !IsNil(o.ToDLTNetworkID) { + toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID + } + if !IsNil(o.ToAmountUSD) { + toSerialize["toAmountUSD"] = o.ToAmountUSD + } + if !IsNil(o.ToAmount) { + toSerialize["toAmount"] = o.ToAmount + } + if !IsNil(o.ToAmountMin) { + toSerialize["toAmountMin"] = o.ToAmountMin + } + if !IsNil(o.ToToken) { + toSerialize["toToken"] = o.ToToken + } + if !IsNil(o.GasCostUSD) { + toSerialize["gasCostUSD"] = o.GasCostUSD + } + if !IsNil(o.ContainsSwitchChain) { + toSerialize["containsSwitchChain"] = o.ContainsSwitchChain + } + if !IsNil(o.Steps) { + toSerialize["steps"] = o.Steps + } + if !IsNil(o.Insurance) { + toSerialize["insurance"] = o.Insurance + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + return toSerialize, nil +} + +type NullableRoute struct { + value *Route + isSet bool +} + +func (v NullableRoute) Get() *Route { + return v.value +} + +func (v *NullableRoute) Set(val *Route) { + v.value = val + v.isSet = true +} + +func (v NullableRoute) IsSet() bool { + return v.isSet +} + +func (v *NullableRoute) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoute(val *Route) *NullableRoute { + return &NullableRoute{value: val, isSet: true} +} + +func (v NullableRoute) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoute) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_routes_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_routes_response.go new file mode 100644 index 0000000000..6ffcfb08f5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_routes_response.go @@ -0,0 +1,118 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the RoutesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RoutesResponse{} + +// RoutesResponse A collection of available and unavailable routes +type RoutesResponse struct { + // A collection of route objects + Routes []GetRoutes200ResponseRoutesInner `json:"routes"` +} + +// NewRoutesResponse instantiates a new RoutesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRoutesResponse(routes []GetRoutes200ResponseRoutesInner) *RoutesResponse { + this := RoutesResponse{} + this.Routes = routes + return &this +} + +// NewRoutesResponseWithDefaults instantiates a new RoutesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRoutesResponseWithDefaults() *RoutesResponse { + this := RoutesResponse{} + return &this +} + +// GetRoutes returns the Routes field value +func (o *RoutesResponse) GetRoutes() []GetRoutes200ResponseRoutesInner { + if o == nil { + var ret []GetRoutes200ResponseRoutesInner + return ret + } + + return o.Routes +} + +// GetRoutesOk returns a tuple with the Routes field value +// and a boolean to check if the value has been set. +func (o *RoutesResponse) GetRoutesOk() ([]GetRoutes200ResponseRoutesInner, bool) { + if o == nil { + return nil, false + } + return o.Routes, true +} + +// SetRoutes sets field value +func (o *RoutesResponse) SetRoutes(v []GetRoutes200ResponseRoutesInner) { + o.Routes = v +} + +func (o RoutesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RoutesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["routes"] = o.Routes + return toSerialize, nil +} + +type NullableRoutesResponse struct { + value *RoutesResponse + isSet bool +} + +func (v NullableRoutesResponse) Get() *RoutesResponse { + return v.value +} + +func (v *NullableRoutesResponse) Set(val *RoutesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRoutesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRoutesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoutesResponse(val *RoutesResponse) *NullableRoutesResponse { + return &NullableRoutesResponse{value: val, isSet: true} +} + +func (v NullableRoutesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoutesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_request.go new file mode 100644 index 0000000000..4656d4e051 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_request.go @@ -0,0 +1,118 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the StatusRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusRequest{} + +// StatusRequest Request for retrieving the current status of a session, identified by the session ID. +type StatusRequest struct { + // The ID of the session for which the status is being requested. + SessionID string `json:"sessionID"` +} + +// NewStatusRequest instantiates a new StatusRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStatusRequest(sessionID string) *StatusRequest { + this := StatusRequest{} + this.SessionID = sessionID + return &this +} + +// NewStatusRequestWithDefaults instantiates a new StatusRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStatusRequestWithDefaults() *StatusRequest { + this := StatusRequest{} + return &this +} + +// GetSessionID returns the SessionID field value +func (o *StatusRequest) GetSessionID() string { + if o == nil { + var ret string + return ret + } + + return o.SessionID +} + +// GetSessionIDOk returns a tuple with the SessionID field value +// and a boolean to check if the value has been set. +func (o *StatusRequest) GetSessionIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SessionID, true +} + +// SetSessionID sets field value +func (o *StatusRequest) SetSessionID(v string) { + o.SessionID = v +} + +func (o StatusRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sessionID"] = o.SessionID + return toSerialize, nil +} + +type NullableStatusRequest struct { + value *StatusRequest + isSet bool +} + +func (v NullableStatusRequest) Get() *StatusRequest { + return v.value +} + +func (v *NullableStatusRequest) Set(val *StatusRequest) { + v.value = val + v.isSet = true +} + +func (v NullableStatusRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusRequest(val *StatusRequest) *NullableStatusRequest { + return &NullableStatusRequest{value: val, isSet: true} +} + +func (v NullableStatusRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_response.go new file mode 100644 index 0000000000..11a0778d86 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_response.go @@ -0,0 +1,280 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "time" +) + +// checks if the StatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusResponse{} + +// StatusResponse Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. +type StatusResponse struct { + Status string `json:"status"` + Substatus string `json:"substatus"` + Stage string `json:"stage"` + Step string `json:"step"` + StartTime time.Time `json:"startTime"` + OriginChain Transact200ResponseStatusResponseOriginChain `json:"originChain"` + DestinationChain Transact200ResponseStatusResponseDestinationChain `json:"destinationChain"` +} + +// NewStatusResponse instantiates a new StatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain) *StatusResponse { + this := StatusResponse{} + this.Status = status + this.Substatus = substatus + this.Stage = stage + this.Step = step + this.StartTime = startTime + this.OriginChain = originChain + this.DestinationChain = destinationChain + return &this +} + +// NewStatusResponseWithDefaults instantiates a new StatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStatusResponseWithDefaults() *StatusResponse { + this := StatusResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *StatusResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *StatusResponse) SetStatus(v string) { + o.Status = v +} + +// GetSubstatus returns the Substatus field value +func (o *StatusResponse) GetSubstatus() string { + if o == nil { + var ret string + return ret + } + + return o.Substatus +} + +// GetSubstatusOk returns a tuple with the Substatus field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetSubstatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Substatus, true +} + +// SetSubstatus sets field value +func (o *StatusResponse) SetSubstatus(v string) { + o.Substatus = v +} + +// GetStage returns the Stage field value +func (o *StatusResponse) GetStage() string { + if o == nil { + var ret string + return ret + } + + return o.Stage +} + +// GetStageOk returns a tuple with the Stage field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetStageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stage, true +} + +// SetStage sets field value +func (o *StatusResponse) SetStage(v string) { + o.Stage = v +} + +// GetStep returns the Step field value +func (o *StatusResponse) GetStep() string { + if o == nil { + var ret string + return ret + } + + return o.Step +} + +// GetStepOk returns a tuple with the Step field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetStepOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Step, true +} + +// SetStep sets field value +func (o *StatusResponse) SetStep(v string) { + o.Step = v +} + +// GetStartTime returns the StartTime field value +func (o *StatusResponse) GetStartTime() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetStartTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *StatusResponse) SetStartTime(v time.Time) { + o.StartTime = v +} + +// GetOriginChain returns the OriginChain field value +func (o *StatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain { + if o == nil { + var ret Transact200ResponseStatusResponseOriginChain + return ret + } + + return o.OriginChain +} + +// GetOriginChainOk returns a tuple with the OriginChain field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool) { + if o == nil { + return nil, false + } + return &o.OriginChain, true +} + +// SetOriginChain sets field value +func (o *StatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain) { + o.OriginChain = v +} + +// GetDestinationChain returns the DestinationChain field value +func (o *StatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain { + if o == nil { + var ret Transact200ResponseStatusResponseDestinationChain + return ret + } + + return o.DestinationChain +} + +// GetDestinationChainOk returns a tuple with the DestinationChain field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool) { + if o == nil { + return nil, false + } + return &o.DestinationChain, true +} + +// SetDestinationChain sets field value +func (o *StatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain) { + o.DestinationChain = v +} + +func (o StatusResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["substatus"] = o.Substatus + toSerialize["stage"] = o.Stage + toSerialize["step"] = o.Step + toSerialize["startTime"] = o.StartTime + toSerialize["originChain"] = o.OriginChain + toSerialize["destinationChain"] = o.DestinationChain + return toSerialize, nil +} + +type NullableStatusResponse struct { + value *StatusResponse + isSet bool +} + +func (v NullableStatusResponse) Get() *StatusResponse { + return v.value +} + +func (v *NullableStatusResponse) Set(val *StatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusResponse(val *StatusResponse) *NullableStatusResponse { + return &NullableStatusResponse{value: val, isSet: true} +} + +func (v NullableStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_token.go new file mode 100644 index 0000000000..869f7c6801 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_token.go @@ -0,0 +1,414 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Token type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Token{} + +// Token Metadata detailing a supported token +type Token struct { + // The network of the DLT being interacted with. TODO: implement network identification draft + ChainID string `json:"chainID"` + // Supported DLT protocols. + ChainType string `json:"chainType"` + // A blockchain address. + Address string `json:"address"` + // The name of the token. + Name *string `json:"name,omitempty"` + // The symbol of the token. + Symbol string `json:"symbol"` + // How many decimals the token supports. + Decimals int32 `json:"decimals"` + // The logo of a token, chain, dex etc. + LogoURI *string `json:"logoURI,omitempty"` + // List of tags identifiers providing additional context or categorization. + Tags []string `json:"tags,omitempty"` + // The current price of the token in USD. + PriceUSD *string `json:"priceUSD,omitempty"` + Extensions *GetRoutes200ResponseRoutesInnerFromTokenExtensions `json:"extensions,omitempty"` +} + +// NewToken instantiates a new Token object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToken(chainID string, chainType string, address string, symbol string, decimals int32) *Token { + this := Token{} + this.ChainID = chainID + this.ChainType = chainType + this.Address = address + this.Symbol = symbol + this.Decimals = decimals + return &this +} + +// NewTokenWithDefaults instantiates a new Token object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenWithDefaults() *Token { + this := Token{} + return &this +} + +// GetChainID returns the ChainID field value +func (o *Token) GetChainID() string { + if o == nil { + var ret string + return ret + } + + return o.ChainID +} + +// GetChainIDOk returns a tuple with the ChainID field value +// and a boolean to check if the value has been set. +func (o *Token) GetChainIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainID, true +} + +// SetChainID sets field value +func (o *Token) SetChainID(v string) { + o.ChainID = v +} + +// GetChainType returns the ChainType field value +func (o *Token) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *Token) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *Token) SetChainType(v string) { + o.ChainType = v +} + +// GetAddress returns the Address field value +func (o *Token) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *Token) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *Token) SetAddress(v string) { + o.Address = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Token) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Token) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Token) SetName(v string) { + o.Name = &v +} + +// GetSymbol returns the Symbol field value +func (o *Token) GetSymbol() string { + if o == nil { + var ret string + return ret + } + + return o.Symbol +} + +// GetSymbolOk returns a tuple with the Symbol field value +// and a boolean to check if the value has been set. +func (o *Token) GetSymbolOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Symbol, true +} + +// SetSymbol sets field value +func (o *Token) SetSymbol(v string) { + o.Symbol = v +} + +// GetDecimals returns the Decimals field value +func (o *Token) GetDecimals() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Decimals +} + +// GetDecimalsOk returns a tuple with the Decimals field value +// and a boolean to check if the value has been set. +func (o *Token) GetDecimalsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Decimals, true +} + +// SetDecimals sets field value +func (o *Token) SetDecimals(v int32) { + o.Decimals = v +} + +// GetLogoURI returns the LogoURI field value if set, zero value otherwise. +func (o *Token) GetLogoURI() string { + if o == nil || IsNil(o.LogoURI) { + var ret string + return ret + } + return *o.LogoURI +} + +// GetLogoURIOk returns a tuple with the LogoURI field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetLogoURIOk() (*string, bool) { + if o == nil || IsNil(o.LogoURI) { + return nil, false + } + return o.LogoURI, true +} + +// HasLogoURI returns a boolean if a field has been set. +func (o *Token) HasLogoURI() bool { + if o != nil && !IsNil(o.LogoURI) { + return true + } + + return false +} + +// SetLogoURI gets a reference to the given string and assigns it to the LogoURI field. +func (o *Token) SetLogoURI(v string) { + o.LogoURI = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Token) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Token) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *Token) SetTags(v []string) { + o.Tags = v +} + +// GetPriceUSD returns the PriceUSD field value if set, zero value otherwise. +func (o *Token) GetPriceUSD() string { + if o == nil || IsNil(o.PriceUSD) { + var ret string + return ret + } + return *o.PriceUSD +} + +// GetPriceUSDOk returns a tuple with the PriceUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetPriceUSDOk() (*string, bool) { + if o == nil || IsNil(o.PriceUSD) { + return nil, false + } + return o.PriceUSD, true +} + +// HasPriceUSD returns a boolean if a field has been set. +func (o *Token) HasPriceUSD() bool { + if o != nil && !IsNil(o.PriceUSD) { + return true + } + + return false +} + +// SetPriceUSD gets a reference to the given string and assigns it to the PriceUSD field. +func (o *Token) SetPriceUSD(v string) { + o.PriceUSD = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *Token) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions { + if o == nil || IsNil(o.Extensions) { + var ret GetRoutes200ResponseRoutesInnerFromTokenExtensions + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Token) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *Token) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given GetRoutes200ResponseRoutesInnerFromTokenExtensions and assigns it to the Extensions field. +func (o *Token) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions) { + o.Extensions = &v +} + +func (o Token) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Token) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainID"] = o.ChainID + toSerialize["chainType"] = o.ChainType + toSerialize["address"] = o.Address + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["symbol"] = o.Symbol + toSerialize["decimals"] = o.Decimals + if !IsNil(o.LogoURI) { + toSerialize["logoURI"] = o.LogoURI + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.PriceUSD) { + toSerialize["priceUSD"] = o.PriceUSD + } + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + return toSerialize, nil +} + +type NullableToken struct { + value *Token + isSet bool +} + +func (v NullableToken) Get() *Token { + return v.value +} + +func (v *NullableToken) Set(val *Token) { + v.value = val + v.isSet = true +} + +func (v NullableToken) IsSet() bool { + return v.isSet +} + +func (v *NullableToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToken(val *Token) *NullableToken { + return &NullableToken{value: val, isSet: true} +} + +func (v NullableToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response.go new file mode 100644 index 0000000000..271862f4cb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response.go @@ -0,0 +1,145 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Transact200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Transact200Response{} + +// Transact200Response Response schema for a transaction request. Includes the session ID and the current status of the transaction. +type Transact200Response struct { + // Unique identifier (UUID) for the session. + SessionID string `json:"sessionID"` + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` +} + +// NewTransact200Response instantiates a new Transact200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransact200Response(sessionID string, statusResponse Transact200ResponseStatusResponse) *Transact200Response { + this := Transact200Response{} + this.SessionID = sessionID + this.StatusResponse = statusResponse + return &this +} + +// NewTransact200ResponseWithDefaults instantiates a new Transact200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransact200ResponseWithDefaults() *Transact200Response { + this := Transact200Response{} + return &this +} + +// GetSessionID returns the SessionID field value +func (o *Transact200Response) GetSessionID() string { + if o == nil { + var ret string + return ret + } + + return o.SessionID +} + +// GetSessionIDOk returns a tuple with the SessionID field value +// and a boolean to check if the value has been set. +func (o *Transact200Response) GetSessionIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SessionID, true +} + +// SetSessionID sets field value +func (o *Transact200Response) SetSessionID(v string) { + o.SessionID = v +} + +// GetStatusResponse returns the StatusResponse field value +func (o *Transact200Response) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *Transact200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *Transact200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +func (o Transact200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Transact200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sessionID"] = o.SessionID + toSerialize["statusResponse"] = o.StatusResponse + return toSerialize, nil +} + +type NullableTransact200Response struct { + value *Transact200Response + isSet bool +} + +func (v NullableTransact200Response) Get() *Transact200Response { + return v.value +} + +func (v *NullableTransact200Response) Set(val *Transact200Response) { + v.value = val + v.isSet = true +} + +func (v NullableTransact200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTransact200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransact200Response(val *Transact200Response) *NullableTransact200Response { + return &NullableTransact200Response{value: val, isSet: true} +} + +func (v NullableTransact200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransact200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response.go new file mode 100644 index 0000000000..1c14b4a36e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response.go @@ -0,0 +1,280 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "time" +) + +// checks if the Transact200ResponseStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Transact200ResponseStatusResponse{} + +// Transact200ResponseStatusResponse Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. +type Transact200ResponseStatusResponse struct { + Status string `json:"status"` + Substatus string `json:"substatus"` + Stage string `json:"stage"` + Step string `json:"step"` + StartTime time.Time `json:"startTime"` + OriginChain Transact200ResponseStatusResponseOriginChain `json:"originChain"` + DestinationChain Transact200ResponseStatusResponseDestinationChain `json:"destinationChain"` +} + +// NewTransact200ResponseStatusResponse instantiates a new Transact200ResponseStatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransact200ResponseStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain) *Transact200ResponseStatusResponse { + this := Transact200ResponseStatusResponse{} + this.Status = status + this.Substatus = substatus + this.Stage = stage + this.Step = step + this.StartTime = startTime + this.OriginChain = originChain + this.DestinationChain = destinationChain + return &this +} + +// NewTransact200ResponseStatusResponseWithDefaults instantiates a new Transact200ResponseStatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransact200ResponseStatusResponseWithDefaults() *Transact200ResponseStatusResponse { + this := Transact200ResponseStatusResponse{} + return &this +} + +// GetStatus returns the Status field value +func (o *Transact200ResponseStatusResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Transact200ResponseStatusResponse) SetStatus(v string) { + o.Status = v +} + +// GetSubstatus returns the Substatus field value +func (o *Transact200ResponseStatusResponse) GetSubstatus() string { + if o == nil { + var ret string + return ret + } + + return o.Substatus +} + +// GetSubstatusOk returns a tuple with the Substatus field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetSubstatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Substatus, true +} + +// SetSubstatus sets field value +func (o *Transact200ResponseStatusResponse) SetSubstatus(v string) { + o.Substatus = v +} + +// GetStage returns the Stage field value +func (o *Transact200ResponseStatusResponse) GetStage() string { + if o == nil { + var ret string + return ret + } + + return o.Stage +} + +// GetStageOk returns a tuple with the Stage field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetStageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stage, true +} + +// SetStage sets field value +func (o *Transact200ResponseStatusResponse) SetStage(v string) { + o.Stage = v +} + +// GetStep returns the Step field value +func (o *Transact200ResponseStatusResponse) GetStep() string { + if o == nil { + var ret string + return ret + } + + return o.Step +} + +// GetStepOk returns a tuple with the Step field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetStepOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Step, true +} + +// SetStep sets field value +func (o *Transact200ResponseStatusResponse) SetStep(v string) { + o.Step = v +} + +// GetStartTime returns the StartTime field value +func (o *Transact200ResponseStatusResponse) GetStartTime() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetStartTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *Transact200ResponseStatusResponse) SetStartTime(v time.Time) { + o.StartTime = v +} + +// GetOriginChain returns the OriginChain field value +func (o *Transact200ResponseStatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain { + if o == nil { + var ret Transact200ResponseStatusResponseOriginChain + return ret + } + + return o.OriginChain +} + +// GetOriginChainOk returns a tuple with the OriginChain field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool) { + if o == nil { + return nil, false + } + return &o.OriginChain, true +} + +// SetOriginChain sets field value +func (o *Transact200ResponseStatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain) { + o.OriginChain = v +} + +// GetDestinationChain returns the DestinationChain field value +func (o *Transact200ResponseStatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain { + if o == nil { + var ret Transact200ResponseStatusResponseDestinationChain + return ret + } + + return o.DestinationChain +} + +// GetDestinationChainOk returns a tuple with the DestinationChain field value +// and a boolean to check if the value has been set. +func (o *Transact200ResponseStatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool) { + if o == nil { + return nil, false + } + return &o.DestinationChain, true +} + +// SetDestinationChain sets field value +func (o *Transact200ResponseStatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain) { + o.DestinationChain = v +} + +func (o Transact200ResponseStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Transact200ResponseStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["substatus"] = o.Substatus + toSerialize["stage"] = o.Stage + toSerialize["step"] = o.Step + toSerialize["startTime"] = o.StartTime + toSerialize["originChain"] = o.OriginChain + toSerialize["destinationChain"] = o.DestinationChain + return toSerialize, nil +} + +type NullableTransact200ResponseStatusResponse struct { + value *Transact200ResponseStatusResponse + isSet bool +} + +func (v NullableTransact200ResponseStatusResponse) Get() *Transact200ResponseStatusResponse { + return v.value +} + +func (v *NullableTransact200ResponseStatusResponse) Set(val *Transact200ResponseStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTransact200ResponseStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTransact200ResponseStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransact200ResponseStatusResponse(val *Transact200ResponseStatusResponse) *NullableTransact200ResponseStatusResponse { + return &NullableTransact200ResponseStatusResponse{value: val, isSet: true} +} + +func (v NullableTransact200ResponseStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransact200ResponseStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_default_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_default_response.go new file mode 100644 index 0000000000..12d02cf2f1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_default_response.go @@ -0,0 +1,230 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactDefaultResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactDefaultResponse{} + +// TransactDefaultResponse An Error +type TransactDefaultResponse struct { + // HTTP error type + Type string `json:"type"` + // Numeric error code + Code int32 `json:"code"` + // HTTP status of the error + Status int32 `json:"status"` + // Long error description + Message string `json:"message"` + // Timestamp of the error + Timestamp string `json:"timestamp"` +} + +// NewTransactDefaultResponse instantiates a new TransactDefaultResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactDefaultResponse(type_ string, code int32, status int32, message string, timestamp string) *TransactDefaultResponse { + this := TransactDefaultResponse{} + this.Type = type_ + this.Code = code + this.Status = status + this.Message = message + this.Timestamp = timestamp + return &this +} + +// NewTransactDefaultResponseWithDefaults instantiates a new TransactDefaultResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactDefaultResponseWithDefaults() *TransactDefaultResponse { + this := TransactDefaultResponse{} + return &this +} + +// GetType returns the Type field value +func (o *TransactDefaultResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransactDefaultResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransactDefaultResponse) SetType(v string) { + o.Type = v +} + +// GetCode returns the Code field value +func (o *TransactDefaultResponse) GetCode() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *TransactDefaultResponse) GetCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *TransactDefaultResponse) SetCode(v int32) { + o.Code = v +} + +// GetStatus returns the Status field value +func (o *TransactDefaultResponse) GetStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TransactDefaultResponse) GetStatusOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TransactDefaultResponse) SetStatus(v int32) { + o.Status = v +} + +// GetMessage returns the Message field value +func (o *TransactDefaultResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *TransactDefaultResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *TransactDefaultResponse) SetMessage(v string) { + o.Message = v +} + +// GetTimestamp returns the Timestamp field value +func (o *TransactDefaultResponse) GetTimestamp() string { + if o == nil { + var ret string + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *TransactDefaultResponse) GetTimestampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *TransactDefaultResponse) SetTimestamp(v string) { + o.Timestamp = v +} + +func (o TransactDefaultResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactDefaultResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["code"] = o.Code + toSerialize["status"] = o.Status + toSerialize["message"] = o.Message + toSerialize["timestamp"] = o.Timestamp + return toSerialize, nil +} + +type NullableTransactDefaultResponse struct { + value *TransactDefaultResponse + isSet bool +} + +func (v NullableTransactDefaultResponse) Get() *TransactDefaultResponse { + return v.value +} + +func (v *NullableTransactDefaultResponse) Set(val *TransactDefaultResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTransactDefaultResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactDefaultResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactDefaultResponse(val *TransactDefaultResponse) *NullableTransactDefaultResponse { + return &NullableTransactDefaultResponse{value: val, isSet: true} +} + +func (v NullableTransactDefaultResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactDefaultResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request.go new file mode 100644 index 0000000000..a3bb88bc87 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request.go @@ -0,0 +1,396 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactRequest{} + +// TransactRequest Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. +type TransactRequest struct { + ContextID string `json:"contextID"` + Mode string `json:"mode"` + Payload *string `json:"payload,omitempty"` + FromDLTNetworkID *string `json:"fromDLTNetworkID,omitempty"` + ToDLTNetworkID *string `json:"toDLTNetworkID,omitempty"` + FromAmount *string `json:"fromAmount,omitempty"` + FromToken *string `json:"fromToken,omitempty"` + ToAmount *string `json:"toAmount,omitempty"` + ToToken *string `json:"toToken,omitempty"` +} + +// NewTransactRequest instantiates a new TransactRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactRequest(contextID string, mode string) *TransactRequest { + this := TransactRequest{} + this.ContextID = contextID + this.Mode = mode + return &this +} + +// NewTransactRequestWithDefaults instantiates a new TransactRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactRequestWithDefaults() *TransactRequest { + this := TransactRequest{} + return &this +} + +// GetContextID returns the ContextID field value +func (o *TransactRequest) GetContextID() string { + if o == nil { + var ret string + return ret + } + + return o.ContextID +} + +// GetContextIDOk returns a tuple with the ContextID field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetContextIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContextID, true +} + +// SetContextID sets field value +func (o *TransactRequest) SetContextID(v string) { + o.ContextID = v +} + +// GetMode returns the Mode field value +func (o *TransactRequest) GetMode() string { + if o == nil { + var ret string + return ret + } + + return o.Mode +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mode, true +} + +// SetMode sets field value +func (o *TransactRequest) SetMode(v string) { + o.Mode = v +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *TransactRequest) GetPayload() string { + if o == nil || IsNil(o.Payload) { + var ret string + return ret + } + return *o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetPayloadOk() (*string, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *TransactRequest) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given string and assigns it to the Payload field. +func (o *TransactRequest) SetPayload(v string) { + o.Payload = &v +} + +// GetFromDLTNetworkID returns the FromDLTNetworkID field value if set, zero value otherwise. +func (o *TransactRequest) GetFromDLTNetworkID() string { + if o == nil || IsNil(o.FromDLTNetworkID) { + var ret string + return ret + } + return *o.FromDLTNetworkID +} + +// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetFromDLTNetworkIDOk() (*string, bool) { + if o == nil || IsNil(o.FromDLTNetworkID) { + return nil, false + } + return o.FromDLTNetworkID, true +} + +// HasFromDLTNetworkID returns a boolean if a field has been set. +func (o *TransactRequest) HasFromDLTNetworkID() bool { + if o != nil && !IsNil(o.FromDLTNetworkID) { + return true + } + + return false +} + +// SetFromDLTNetworkID gets a reference to the given string and assigns it to the FromDLTNetworkID field. +func (o *TransactRequest) SetFromDLTNetworkID(v string) { + o.FromDLTNetworkID = &v +} + +// GetToDLTNetworkID returns the ToDLTNetworkID field value if set, zero value otherwise. +func (o *TransactRequest) GetToDLTNetworkID() string { + if o == nil || IsNil(o.ToDLTNetworkID) { + var ret string + return ret + } + return *o.ToDLTNetworkID +} + +// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetToDLTNetworkIDOk() (*string, bool) { + if o == nil || IsNil(o.ToDLTNetworkID) { + return nil, false + } + return o.ToDLTNetworkID, true +} + +// HasToDLTNetworkID returns a boolean if a field has been set. +func (o *TransactRequest) HasToDLTNetworkID() bool { + if o != nil && !IsNil(o.ToDLTNetworkID) { + return true + } + + return false +} + +// SetToDLTNetworkID gets a reference to the given string and assigns it to the ToDLTNetworkID field. +func (o *TransactRequest) SetToDLTNetworkID(v string) { + o.ToDLTNetworkID = &v +} + +// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +func (o *TransactRequest) GetFromAmount() string { + if o == nil || IsNil(o.FromAmount) { + var ret string + return ret + } + return *o.FromAmount +} + +// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetFromAmountOk() (*string, bool) { + if o == nil || IsNil(o.FromAmount) { + return nil, false + } + return o.FromAmount, true +} + +// HasFromAmount returns a boolean if a field has been set. +func (o *TransactRequest) HasFromAmount() bool { + if o != nil && !IsNil(o.FromAmount) { + return true + } + + return false +} + +// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +func (o *TransactRequest) SetFromAmount(v string) { + o.FromAmount = &v +} + +// GetFromToken returns the FromToken field value if set, zero value otherwise. +func (o *TransactRequest) GetFromToken() string { + if o == nil || IsNil(o.FromToken) { + var ret string + return ret + } + return *o.FromToken +} + +// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetFromTokenOk() (*string, bool) { + if o == nil || IsNil(o.FromToken) { + return nil, false + } + return o.FromToken, true +} + +// HasFromToken returns a boolean if a field has been set. +func (o *TransactRequest) HasFromToken() bool { + if o != nil && !IsNil(o.FromToken) { + return true + } + + return false +} + +// SetFromToken gets a reference to the given string and assigns it to the FromToken field. +func (o *TransactRequest) SetFromToken(v string) { + o.FromToken = &v +} + +// GetToAmount returns the ToAmount field value if set, zero value otherwise. +func (o *TransactRequest) GetToAmount() string { + if o == nil || IsNil(o.ToAmount) { + var ret string + return ret + } + return *o.ToAmount +} + +// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetToAmountOk() (*string, bool) { + if o == nil || IsNil(o.ToAmount) { + return nil, false + } + return o.ToAmount, true +} + +// HasToAmount returns a boolean if a field has been set. +func (o *TransactRequest) HasToAmount() bool { + if o != nil && !IsNil(o.ToAmount) { + return true + } + + return false +} + +// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. +func (o *TransactRequest) SetToAmount(v string) { + o.ToAmount = &v +} + +// GetToToken returns the ToToken field value if set, zero value otherwise. +func (o *TransactRequest) GetToToken() string { + if o == nil || IsNil(o.ToToken) { + var ret string + return ret + } + return *o.ToToken +} + +// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetToTokenOk() (*string, bool) { + if o == nil || IsNil(o.ToToken) { + return nil, false + } + return o.ToToken, true +} + +// HasToToken returns a boolean if a field has been set. +func (o *TransactRequest) HasToToken() bool { + if o != nil && !IsNil(o.ToToken) { + return true + } + + return false +} + +// SetToToken gets a reference to the given string and assigns it to the ToToken field. +func (o *TransactRequest) SetToToken(v string) { + o.ToToken = &v +} + +func (o TransactRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["contextID"] = o.ContextID + toSerialize["mode"] = o.Mode + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + if !IsNil(o.FromDLTNetworkID) { + toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID + } + if !IsNil(o.ToDLTNetworkID) { + toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID + } + if !IsNil(o.FromAmount) { + toSerialize["fromAmount"] = o.FromAmount + } + if !IsNil(o.FromToken) { + toSerialize["fromToken"] = o.FromToken + } + if !IsNil(o.ToAmount) { + toSerialize["toAmount"] = o.ToAmount + } + if !IsNil(o.ToToken) { + toSerialize["toToken"] = o.ToToken + } + return toSerialize, nil +} + +type NullableTransactRequest struct { + value *TransactRequest + isSet bool +} + +func (v NullableTransactRequest) Get() *TransactRequest { + return v.value +} + +func (v *NullableTransactRequest) Set(val *TransactRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransactRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactRequest(val *TransactRequest) *NullableTransactRequest { + return &NullableTransactRequest{value: val, isSet: true} +} + +func (v NullableTransactRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go new file mode 100644 index 0000000000..0236a55adf --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go @@ -0,0 +1,414 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: v0.0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactRequestFromToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactRequestFromToken{} + +// TransactRequestFromToken Metadata detailing a supported token +type TransactRequestFromToken struct { + // The network of the DLT being interacted with. TODO: implement network identification draft + ChainID string `json:"chainID"` + // Supported DLT protocols. + ChainType string `json:"chainType"` + // A blockchain address. + Address string `json:"address"` + // The name of the token. + Name *string `json:"name,omitempty"` + // The symbol of the token. + Symbol string `json:"symbol"` + // How many decimals the token supports. + Decimals int32 `json:"decimals"` + // The logo of a token, chain, dex etc. + LogoURI *string `json:"logoURI,omitempty"` + // List of tags identifiers providing additional context or categorization. + Tags []string `json:"tags,omitempty"` + // The current price of the token in USD. + PriceUSD *string `json:"priceUSD,omitempty"` + Extensions *TransactRequestFromTokenExtensions `json:"extensions,omitempty"` +} + +// NewTransactRequestFromToken instantiates a new TransactRequestFromToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactRequestFromToken(chainID string, chainType string, address string, symbol string, decimals int32) *TransactRequestFromToken { + this := TransactRequestFromToken{} + this.ChainID = chainID + this.ChainType = chainType + this.Address = address + this.Symbol = symbol + this.Decimals = decimals + return &this +} + +// NewTransactRequestFromTokenWithDefaults instantiates a new TransactRequestFromToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactRequestFromTokenWithDefaults() *TransactRequestFromToken { + this := TransactRequestFromToken{} + return &this +} + +// GetChainID returns the ChainID field value +func (o *TransactRequestFromToken) GetChainID() string { + if o == nil { + var ret string + return ret + } + + return o.ChainID +} + +// GetChainIDOk returns a tuple with the ChainID field value +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetChainIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainID, true +} + +// SetChainID sets field value +func (o *TransactRequestFromToken) SetChainID(v string) { + o.ChainID = v +} + +// GetChainType returns the ChainType field value +func (o *TransactRequestFromToken) GetChainType() string { + if o == nil { + var ret string + return ret + } + + return o.ChainType +} + +// GetChainTypeOk returns a tuple with the ChainType field value +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetChainTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChainType, true +} + +// SetChainType sets field value +func (o *TransactRequestFromToken) SetChainType(v string) { + o.ChainType = v +} + +// GetAddress returns the Address field value +func (o *TransactRequestFromToken) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *TransactRequestFromToken) SetAddress(v string) { + o.Address = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TransactRequestFromToken) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TransactRequestFromToken) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TransactRequestFromToken) SetName(v string) { + o.Name = &v +} + +// GetSymbol returns the Symbol field value +func (o *TransactRequestFromToken) GetSymbol() string { + if o == nil { + var ret string + return ret + } + + return o.Symbol +} + +// GetSymbolOk returns a tuple with the Symbol field value +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetSymbolOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Symbol, true +} + +// SetSymbol sets field value +func (o *TransactRequestFromToken) SetSymbol(v string) { + o.Symbol = v +} + +// GetDecimals returns the Decimals field value +func (o *TransactRequestFromToken) GetDecimals() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Decimals +} + +// GetDecimalsOk returns a tuple with the Decimals field value +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetDecimalsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Decimals, true +} + +// SetDecimals sets field value +func (o *TransactRequestFromToken) SetDecimals(v int32) { + o.Decimals = v +} + +// GetLogoURI returns the LogoURI field value if set, zero value otherwise. +func (o *TransactRequestFromToken) GetLogoURI() string { + if o == nil || IsNil(o.LogoURI) { + var ret string + return ret + } + return *o.LogoURI +} + +// GetLogoURIOk returns a tuple with the LogoURI field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetLogoURIOk() (*string, bool) { + if o == nil || IsNil(o.LogoURI) { + return nil, false + } + return o.LogoURI, true +} + +// HasLogoURI returns a boolean if a field has been set. +func (o *TransactRequestFromToken) HasLogoURI() bool { + if o != nil && !IsNil(o.LogoURI) { + return true + } + + return false +} + +// SetLogoURI gets a reference to the given string and assigns it to the LogoURI field. +func (o *TransactRequestFromToken) SetLogoURI(v string) { + o.LogoURI = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *TransactRequestFromToken) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *TransactRequestFromToken) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *TransactRequestFromToken) SetTags(v []string) { + o.Tags = v +} + +// GetPriceUSD returns the PriceUSD field value if set, zero value otherwise. +func (o *TransactRequestFromToken) GetPriceUSD() string { + if o == nil || IsNil(o.PriceUSD) { + var ret string + return ret + } + return *o.PriceUSD +} + +// GetPriceUSDOk returns a tuple with the PriceUSD field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetPriceUSDOk() (*string, bool) { + if o == nil || IsNil(o.PriceUSD) { + return nil, false + } + return o.PriceUSD, true +} + +// HasPriceUSD returns a boolean if a field has been set. +func (o *TransactRequestFromToken) HasPriceUSD() bool { + if o != nil && !IsNil(o.PriceUSD) { + return true + } + + return false +} + +// SetPriceUSD gets a reference to the given string and assigns it to the PriceUSD field. +func (o *TransactRequestFromToken) SetPriceUSD(v string) { + o.PriceUSD = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *TransactRequestFromToken) GetExtensions() TransactRequestFromTokenExtensions { + if o == nil || IsNil(o.Extensions) { + var ret TransactRequestFromTokenExtensions + return ret + } + return *o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromToken) GetExtensionsOk() (*TransactRequestFromTokenExtensions, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *TransactRequestFromToken) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given TransactRequestFromTokenExtensions and assigns it to the Extensions field. +func (o *TransactRequestFromToken) SetExtensions(v TransactRequestFromTokenExtensions) { + o.Extensions = &v +} + +func (o TransactRequestFromToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactRequestFromToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chainID"] = o.ChainID + toSerialize["chainType"] = o.ChainType + toSerialize["address"] = o.Address + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["symbol"] = o.Symbol + toSerialize["decimals"] = o.Decimals + if !IsNil(o.LogoURI) { + toSerialize["logoURI"] = o.LogoURI + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.PriceUSD) { + toSerialize["priceUSD"] = o.PriceUSD + } + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + return toSerialize, nil +} + +type NullableTransactRequestFromToken struct { + value *TransactRequestFromToken + isSet bool +} + +func (v NullableTransactRequestFromToken) Get() *TransactRequestFromToken { + return v.value +} + +func (v *NullableTransactRequestFromToken) Set(val *TransactRequestFromToken) { + v.value = val + v.isSet = true +} + +func (v NullableTransactRequestFromToken) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactRequestFromToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactRequestFromToken(val *TransactRequestFromToken) *NullableTransactRequestFromToken { + return &NullableTransactRequestFromToken{value: val, isSet: true} +} + +func (v NullableTransactRequestFromToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactRequestFromToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go new file mode 100644 index 0000000000..ee71302bda --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go @@ -0,0 +1,163 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: v0.0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactRequestFromTokenExtensions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactRequestFromTokenExtensions{} + +// TransactRequestFromTokenExtensions struct for TransactRequestFromTokenExtensions +type TransactRequestFromTokenExtensions struct { + BridgeInfo *map[string]TransactRequestFromTokenExtensionsBridgeInfoValue `json:"bridgeInfo,omitempty"` + // Indicates whether the token is verified. + Verified *bool `json:"verified,omitempty"` +} + +// NewTransactRequestFromTokenExtensions instantiates a new TransactRequestFromTokenExtensions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactRequestFromTokenExtensions() *TransactRequestFromTokenExtensions { + this := TransactRequestFromTokenExtensions{} + return &this +} + +// NewTransactRequestFromTokenExtensionsWithDefaults instantiates a new TransactRequestFromTokenExtensions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactRequestFromTokenExtensionsWithDefaults() *TransactRequestFromTokenExtensions { + this := TransactRequestFromTokenExtensions{} + return &this +} + +// GetBridgeInfo returns the BridgeInfo field value if set, zero value otherwise. +func (o *TransactRequestFromTokenExtensions) GetBridgeInfo() map[string]TransactRequestFromTokenExtensionsBridgeInfoValue { + if o == nil || IsNil(o.BridgeInfo) { + var ret map[string]TransactRequestFromTokenExtensionsBridgeInfoValue + return ret + } + return *o.BridgeInfo +} + +// GetBridgeInfoOk returns a tuple with the BridgeInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromTokenExtensions) GetBridgeInfoOk() (*map[string]TransactRequestFromTokenExtensionsBridgeInfoValue, bool) { + if o == nil || IsNil(o.BridgeInfo) { + return nil, false + } + return o.BridgeInfo, true +} + +// HasBridgeInfo returns a boolean if a field has been set. +func (o *TransactRequestFromTokenExtensions) HasBridgeInfo() bool { + if o != nil && !IsNil(o.BridgeInfo) { + return true + } + + return false +} + +// SetBridgeInfo gets a reference to the given map[string]TransactRequestFromTokenExtensionsBridgeInfoValue and assigns it to the BridgeInfo field. +func (o *TransactRequestFromTokenExtensions) SetBridgeInfo(v map[string]TransactRequestFromTokenExtensionsBridgeInfoValue) { + o.BridgeInfo = &v +} + +// GetVerified returns the Verified field value if set, zero value otherwise. +func (o *TransactRequestFromTokenExtensions) GetVerified() bool { + if o == nil || IsNil(o.Verified) { + var ret bool + return ret + } + return *o.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromTokenExtensions) GetVerifiedOk() (*bool, bool) { + if o == nil || IsNil(o.Verified) { + return nil, false + } + return o.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (o *TransactRequestFromTokenExtensions) HasVerified() bool { + if o != nil && !IsNil(o.Verified) { + return true + } + + return false +} + +// SetVerified gets a reference to the given bool and assigns it to the Verified field. +func (o *TransactRequestFromTokenExtensions) SetVerified(v bool) { + o.Verified = &v +} + +func (o TransactRequestFromTokenExtensions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactRequestFromTokenExtensions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BridgeInfo) { + toSerialize["bridgeInfo"] = o.BridgeInfo + } + if !IsNil(o.Verified) { + toSerialize["verified"] = o.Verified + } + return toSerialize, nil +} + +type NullableTransactRequestFromTokenExtensions struct { + value *TransactRequestFromTokenExtensions + isSet bool +} + +func (v NullableTransactRequestFromTokenExtensions) Get() *TransactRequestFromTokenExtensions { + return v.value +} + +func (v *NullableTransactRequestFromTokenExtensions) Set(val *TransactRequestFromTokenExtensions) { + v.value = val + v.isSet = true +} + +func (v NullableTransactRequestFromTokenExtensions) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactRequestFromTokenExtensions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactRequestFromTokenExtensions(val *TransactRequestFromTokenExtensions) *NullableTransactRequestFromTokenExtensions { + return &NullableTransactRequestFromTokenExtensions{value: val, isSet: true} +} + +func (v NullableTransactRequestFromTokenExtensions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactRequestFromTokenExtensions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go new file mode 100644 index 0000000000..842f90d6b1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go @@ -0,0 +1,127 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: v0.0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactRequestFromTokenExtensionsBridgeInfoValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactRequestFromTokenExtensionsBridgeInfoValue{} + +// TransactRequestFromTokenExtensionsBridgeInfoValue Information about the bridge used for the token transfer. +type TransactRequestFromTokenExtensionsBridgeInfoValue struct { + // The address of the token being transferred. + TokenAddress *string `json:"tokenAddress,omitempty"` +} + +// NewTransactRequestFromTokenExtensionsBridgeInfoValue instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactRequestFromTokenExtensionsBridgeInfoValue() *TransactRequestFromTokenExtensionsBridgeInfoValue { + this := TransactRequestFromTokenExtensionsBridgeInfoValue{} + return &this +} + +// NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults() *TransactRequestFromTokenExtensionsBridgeInfoValue { + this := TransactRequestFromTokenExtensionsBridgeInfoValue{} + return &this +} + +// GetTokenAddress returns the TokenAddress field value if set, zero value otherwise. +func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string { + if o == nil || IsNil(o.TokenAddress) { + var ret string + return ret + } + return *o.TokenAddress +} + +// GetTokenAddressOk returns a tuple with the TokenAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool) { + if o == nil || IsNil(o.TokenAddress) { + return nil, false + } + return o.TokenAddress, true +} + +// HasTokenAddress returns a boolean if a field has been set. +func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool { + if o != nil && !IsNil(o.TokenAddress) { + return true + } + + return false +} + +// SetTokenAddress gets a reference to the given string and assigns it to the TokenAddress field. +func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string) { + o.TokenAddress = &v +} + +func (o TransactRequestFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactRequestFromTokenExtensionsBridgeInfoValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TokenAddress) { + toSerialize["tokenAddress"] = o.TokenAddress + } + return toSerialize, nil +} + +type NullableTransactRequestFromTokenExtensionsBridgeInfoValue struct { + value *TransactRequestFromTokenExtensionsBridgeInfoValue + isSet bool +} + +func (v NullableTransactRequestFromTokenExtensionsBridgeInfoValue) Get() *TransactRequestFromTokenExtensionsBridgeInfoValue { + return v.value +} + +func (v *NullableTransactRequestFromTokenExtensionsBridgeInfoValue) Set(val *TransactRequestFromTokenExtensionsBridgeInfoValue) { + v.value = val + v.isSet = true +} + +func (v NullableTransactRequestFromTokenExtensionsBridgeInfoValue) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactRequestFromTokenExtensionsBridgeInfoValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactRequestFromTokenExtensionsBridgeInfoValue(val *TransactRequestFromTokenExtensionsBridgeInfoValue) *NullableTransactRequestFromTokenExtensionsBridgeInfoValue { + return &NullableTransactRequestFromTokenExtensionsBridgeInfoValue{value: val, isSet: true} +} + +func (v NullableTransactRequestFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactRequestFromTokenExtensionsBridgeInfoValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_response.go new file mode 100644 index 0000000000..6fccf8ecfa --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_response.go @@ -0,0 +1,145 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactResponse{} + +// TransactResponse Response schema for a transaction request. Includes the session ID and the current status of the transaction. +type TransactResponse struct { + // Unique identifier (UUID) for the session. + SessionID string `json:"sessionID"` + StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` +} + +// NewTransactResponse instantiates a new TransactResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactResponse(sessionID string, statusResponse Transact200ResponseStatusResponse) *TransactResponse { + this := TransactResponse{} + this.SessionID = sessionID + this.StatusResponse = statusResponse + return &this +} + +// NewTransactResponseWithDefaults instantiates a new TransactResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactResponseWithDefaults() *TransactResponse { + this := TransactResponse{} + return &this +} + +// GetSessionID returns the SessionID field value +func (o *TransactResponse) GetSessionID() string { + if o == nil { + var ret string + return ret + } + + return o.SessionID +} + +// GetSessionIDOk returns a tuple with the SessionID field value +// and a boolean to check if the value has been set. +func (o *TransactResponse) GetSessionIDOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SessionID, true +} + +// SetSessionID sets field value +func (o *TransactResponse) SetSessionID(v string) { + o.SessionID = v +} + +// GetStatusResponse returns the StatusResponse field value +func (o *TransactResponse) GetStatusResponse() Transact200ResponseStatusResponse { + if o == nil { + var ret Transact200ResponseStatusResponse + return ret + } + + return o.StatusResponse +} + +// GetStatusResponseOk returns a tuple with the StatusResponse field value +// and a boolean to check if the value has been set. +func (o *TransactResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { + if o == nil { + return nil, false + } + return &o.StatusResponse, true +} + +// SetStatusResponse sets field value +func (o *TransactResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { + o.StatusResponse = v +} + +func (o TransactResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sessionID"] = o.SessionID + toSerialize["statusResponse"] = o.StatusResponse + return toSerialize, nil +} + +type NullableTransactResponse struct { + value *TransactResponse + isSet bool +} + +func (v NullableTransactResponse) Get() *TransactResponse { + return v.value +} + +func (v *NullableTransactResponse) Set(val *TransactResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTransactResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactResponse(val *TransactResponse) *NullableTransactResponse { + return &NullableTransactResponse{value: val, isSet: true} +} + +func (v NullableTransactResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/response.go new file mode 100644 index 0000000000..4380f82140 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/response.go @@ -0,0 +1,47 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go new file mode 100644 index 0000000000..f3a25bd2bd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go @@ -0,0 +1,49 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +Testing AdminApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_generated_AdminApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AdminApiService GetAudit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AdminApi.GetAudit(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AdminApiService GetStatus", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AdminApi.GetStatus(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go new file mode 100644 index 0000000000..718c9bfafb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go @@ -0,0 +1,61 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +Testing TransactionApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_generated_TransactionApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TransactionApiService Cancel", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TransactionApi.Cancel(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TransactionApiService GetRoutes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TransactionApi.GetRoutes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TransactionApiService Transact", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TransactionApi.Transact(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/utils.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/utils.go new file mode 100644 index 0000000000..63010ca736 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/utils.go @@ -0,0 +1,347 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt deleted file mode 100644 index 1e1d3c114b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param messageType - * @param sessionID - * @param sequenceNumber - * @param initialRequestMessageHash - * @param timeStamp - * @param processedTimeStamp - * @param serverIdentityPubkey - * @param signature - * @param backupGatewaysAllowed - * @param odapPhase - * @param destination - */ - - -data class TransferInitializationV1Response ( - - @Json(name = "messageType") - val messageType: kotlin.String, - - @Json(name = "sessionID") - val sessionID: kotlin.String, - - @Json(name = "sequenceNumber") - val sequenceNumber: java.math.BigDecimal, - - @Json(name = "initialRequestMessageHash") - val initialRequestMessageHash: kotlin.String, - - @Json(name = "timeStamp") - val timeStamp: kotlin.String, - - @Json(name = "processedTimeStamp") - val processedTimeStamp: kotlin.String, - - @Json(name = "serverIdentityPubkey") - val serverIdentityPubkey: kotlin.String, - - @Json(name = "signature") - val signature: kotlin.String, - - @Json(name = "backupGatewaysAllowed") - val backupGatewaysAllowed: kotlin.collections.List, - - @Json(name = "odapPhase") - val odapPhase: TransferInitializationV1Response.OdapPhase? = null, - - @Json(name = "destination") - val destination: kotlin.String? = null - -) { - - /** - * - * - * Values: transferInitialization,lockEvidenceVerification,commitmentEstablishment - */ - @JsonClass(generateAdapter = false) - enum class OdapPhase(val value: kotlin.String) { - @Json(name = "TransferInitialization") transferInitialization("TransferInitialization"), - @Json(name = "LockEvidenceVerification") lockEvidenceVerification("LockEvidenceVerification"), - @Json(name = "CommitmentEstablishment") commitmentEstablishment("CommitmentEstablishment"); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto new file mode 100644 index 0000000000..14c27a18a3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -0,0 +1,226 @@ +syntax = "proto3"; +package cacti.satp.v02.common; + +// TODO: define the common parameters to every protocol message +message MessageCore { + string message = 1; +} + +// TODO: define the common parameters to every rollback message +message RollbackMessageCore { + string message = 1; +} + +enum STATUS { + STATUS_UNSPECIFIED = 0; + STATUS_OK = 1; + STATUS_ERROR = 2; +}; + +message Ack { + STATUS status = 1; +}; + +message TransferClaims { + string digital_asset_id = 1; + string asset_profile_id = 2; + string verified_originator_entity_id = 3; + string verified_beneficiary_entity_id = 4; + string originator_pubkey = 5; + string beneficiary_pubkey = 6; + string sender_gateway_network_id = 7; + string recipient_gateway_network_id = 8; + string client_gateway_pubkey = 9; + string server_gateway_pubkey = 10; + string sender_gateway_owner_id = 11; + string receiver_gateway_owner_id = 12; + uint32 max_retries = 13; + uint64 max_timeout = 14; +} + +message TransferClaimsFormat { + +} + +message Permissions { + +} + +message SubsequentCalls { + +} + +message History { + repeated Transaction transactions = 1; + repeated ActionCategory action_categories = 2; + string origin = 3; + string destination = 4; + string balance = 5; + STATUS status = 6; + ApplicationParameters application_parameters = 7; +} + +message ActionCategory { + +} + +message Transaction { + +} + +message ApplicationParameters { + +} + +message NetworkCapabilities { + string sender_gateway_network_id = 1; + SignatureAlgorithm signature_algorithm = 2; + repeated SignatureAlgorithm supported_signature_algorithms = 3; + LockType lock_type = 4; + uint64 lock_expiration_time = 5; + Permissions permissions = 6; + string developer_urn = 7; + CredentialProfile credential_profile = 8; + string application_profile = 9; + string logging_profile = 10; + string access_control_profile = 11; + SubsequentCalls subsequent_calls = 12; + repeated History history = 13; +} + +enum MessageType { + MESSAGE_TYPE_UNSPECIFIED = 0; + MESSAGE_TYPE_INIT_PROPOSAL = 1; + MESSAGE_TYPE_INIT_RECEIPT = 2; + MESSAGE_TYPE_INIT_REJECT = 3; + MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 4; + MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 5; + MESSAGE_TYPE_LOCK_ASSERT = 6; + MESSAGE_TYPE_ASSERTION_RECEIPT = 7; + MESSAGE_TYPE_COMMIT_PREPARE = 8; + MESSAGE_TYPE_COMMIT_READY = 9; + MESSAGE_TYPE_COMMIT_FINAL = 10; + MESSAGE_TYPE_ACK_COMMIT_FINAL = 11; + MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 12; + } + +message CommonSatp { + string version = 1; + MessageType message_type = 2; + string session_id = 3; + string transfer_context_id = 4; + uint64 sequence_number = 5; + string resource_url = 6; + ActionResponse action_response = 8; + string credential_block = 10; + PayloadProfile payload_profile = 11; + Payload payload = 13; + string payload_hash = 14; + string signature = 15; + string client_gateway_pubkey = 16; + string server_gateway_pubkey = 17; + string hash_previous_message = 18; +} + +message ActionResponse { + +} + +enum CredentialProfile { + CREDENTIAL_PROFILE_UNSPECIFIED = 0; + CREDENTIAL_PROFILE_SAML = 1; + CREDENTIAL_PROFILE_OAUTH = 2; + CREDENTIAL_PROFILE_X509 = 3; +} + +enum SignatureAlgorithm { + SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + SIGNATURE_ALGORITHM_RSA = 1; + SIGNATURE_ALGORITHM_ECDSA = 2; + SIGNATURE_ALGORITHM_DSA = 3; + SIGNATURE_ALGORITHM_HMAC = 4; + SIGNATURE_ALGORITHM_RSASSA_PSS = 5; + SIGNATURE_ALGORITHM_EDDSA = 6; +} + +enum LockType { + LOCK_TYPE_UNSPECIFIED = 0; + LOCK_TYPE_FAUCET = 1; + LOCK_TYPE_TIMELOCK = 2; + LOCK_TYPE_HASHLOCK = 3; + LOCK_TYPE_HASHLOCKTIME = 4; + LOCK_TYPE_MULTICLAIM = 5; + LOCK_TYPE_DESTROYBURN = 6; +} + +message PayloadProfile { + AssetProfile asset_profile = 1; + string capabilities = 2; +} + +message AssetProfile { + string issuer = 1; + string asset_code = 2; + string asset_code_type = 3; + string issuance_date = 4; + string expiration_date = 5; + string verification_end_point = 6; + string digital_signature = 7; + string prospectus_link = 8; + repeated string key_information_link = 9; + repeated string keywords = 10; + repeated string transfer_restrictions = 11; + repeated string ledger_requirements = 12; +} + +message Payload { + +} + +enum Error { + ERROR_UNSPECIFIED = 0; + ERROR_BADLY_FORMATED_MESSAGE = 1; + ERROR_INCORRECT_PARAMETER = 2; + ERROR_ACK_MISMATCH = 3; + ERROR_BADLY_FORMATED_MESSAGE_CLAIM = 4; + ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5; + ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6; + ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7; + ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE = 8; + ERROR_EXPIRED_CLAIM = 9; + ERROR_INCORRERCT_PARAMETER = 10; + ERROR_MESSAGE_OUT_OF_SEQUENCE = 11; +} + +message LockAssertionClaim { + +} + +message LockAssertionFormat { + +} + +message MintAssertionClaims { + +} + +message MintAssertionClaimsFormat { + +} + +message BurnAssertionClaim { + +} + +message BurnAssertionClaimFormat { + +} + +message AssignmentAssertionClaim { + +} + +message AssignmentAssertionClaimFormat { + +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES index 53250c0269..a80cd4f07b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES @@ -1,5 +1,8 @@ +.gitignore +.npmignore api.ts base.ts common.ts configuration.ts +git_push.sh index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/VERSION new file mode 100644 index 0000000000..cd802a1ec4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts index d80bb5dc08..5009672823 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) * * The version of the OpenAPI document: 0.0.2 * From a1fbe875f41853b04a49477dafd48803bb94704d Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 12 Apr 2024 13:13:38 +0300 Subject: [PATCH 06/49] fixup(satp-hermes): remove test protos and endpoints Signed-off-by: Rafael Belchior --- .../client/stage1-client-handler.ts | 2 +- .../client/stage2-client-handler.ts | 2 +- .../client/stage3-client-handler.ts | 2 +- .../server/stage1-server-handler.ts | 2 +- .../server/stage2-server-handler.ts | 2 +- .../server/stage3-server-handler.ts | 2 +- .../typescript-axios-json/.gitignore | 4 - .../typescript-axios-json/.npmignore | 1 - .../.openapi-generator-ignore | 23 - .../.openapi-generator/FILES | 8 - .../.openapi-generator/VERSION | 1 - .../openapi-blo/typescript-axios-json/api.ts | 2678 ----------------- .../openapi-blo/typescript-axios-json/base.ts | 72 - .../typescript-axios-json/common.ts | 150 - .../typescript-axios-json/configuration.ts | 101 - .../typescript-axios-json/git_push.sh | 57 - .../typescript-axios-json/index.ts | 18 - .../satp/v02/common/common_messages_pb.ts | 1507 ---------- .../generated/proto/test/message_connect.ts | 62 - .../generated/proto/test/message_pb.ts | 119 - .../main/typescript/web-services/router.ts | 9 +- .../main/typescript/web-services/test/test.ts | 42 - .../typescript/web-services/test/test2.ts | 12 - 23 files changed, 12 insertions(+), 4864 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts index 536acb2f16..9ebb36417e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts @@ -12,7 +12,7 @@ import { CommonSatp, TransferClaims, NetworkCapabilities, -} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { MessageStagesHashes, MessageStagesSignatures, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts index 92880531fa..39fb6fb7e8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts @@ -5,7 +5,7 @@ import { SATP_VERSION } from "../../constants"; import { CommonSatp, MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; import { SHA256 } from "crypto-js"; import { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts index 85f2000542..58a3f9eba3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts @@ -4,7 +4,7 @@ import { SATPGateway } from "../../../gateway-refactor"; import { CommonSatp, MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { SATP_VERSION } from "../../constants"; import { CommitFinalAcknowledgementReceiptResponseMessage, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts index b8f1daa767..fb6e478062 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts @@ -11,7 +11,7 @@ import { import { MessageType, CommonSatp, -} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { MessageStagesHashes, MessageStagesSignatures, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts index 3914861540..6ed8ca1360 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts @@ -8,7 +8,7 @@ import { SATP_VERSION } from "../../constants"; import { CommonSatp, MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { Stage2Hashes, Stage2Signatures, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts index 0d1b7febb6..c9cfef5a32 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts @@ -10,7 +10,7 @@ import { SATP_VERSION } from "../../constants"; import { CommonSatp, MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/common_messages_pb"; +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { Stage3Hashes, Stage3Signatures, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore deleted file mode 100644 index 149b576547..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore deleted file mode 100644 index 999d88df69..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.npmignore +++ /dev/null @@ -1 +0,0 @@ -# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES deleted file mode 100644 index a80cd4f07b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/FILES +++ /dev/null @@ -1,8 +0,0 @@ -.gitignore -.npmignore -api.ts -base.ts -common.ts -configuration.ts -git_push.sh -index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts deleted file mode 100644 index 5009672823..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/api.ts +++ /dev/null @@ -1,2678 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - * - * The version of the OpenAPI document: 0.0.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * An Error - * @export - * @interface APIError - */ -export interface APIError { - /** - * HTTP error type - * @type {string} - * @memberof APIError - */ - 'type': string; - /** - * Numeric error code - * @type {number} - * @memberof APIError - */ - 'code': number; - /** - * HTTP status of the error - * @type {number} - * @memberof APIError - */ - 'status': number; - /** - * Long error description - * @type {string} - * @memberof APIError - */ - 'message': string; - /** - * Timestamp of the error - * @type {string} - * @memberof APIError - */ - 'timestamp': string; -} -/** - * - * @export - * @interface Action - */ -export interface Action { - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Action - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. - * @type {string} - * @memberof Action - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Action - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. - * @type {number} - * @memberof Action - */ - 'slippage'?: number; - /** - * A blockchain address. - * @type {string} - * @memberof Action - */ - 'fromAddress'?: string; - /** - * A blockchain address. - * @type {string} - * @memberof Action - */ - 'toAddress'?: string; -} -/** - * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 - * @export - * @enum {string} - */ - -export const AuthzJwtClaim = { - /** - * The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. - */ - iss: 'Hyperledger Labs - Carbon Accounting Tool' -} as const; - -export type AuthzJwtClaim = typeof AuthzJwtClaim[keyof typeof AuthzJwtClaim]; - - -/** - * - * @export - * @enum {string} - */ - -export const AuthzScope = { - /** - * Identities with the group:admin scope are administrators of the system. - */ - GroupAdmin: 'group:admin', - /** - * Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. - */ - GroupUser: 'group:user' -} as const; - -export type AuthzScope = typeof AuthzScope[keyof typeof AuthzScope]; - - -/** - * Information about the bridge used for the token transfer. - * @export - * @interface BridgeInfo - */ -export interface BridgeInfo { - /** - * The address of the token being transferred. - * @type {string} - * @memberof BridgeInfo - */ - 'tokenAddress'?: string; -} -/** - * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. - * @export - * @interface Cancel200Response - */ -export interface Cancel200Response { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Cancel200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; - /** - * Indicates whether the cancel operation was successful. - * @type {boolean} - * @memberof Cancel200Response - */ - 'cancelSuccessful': boolean; -} -/** - * Request to cancel an ongoing transaction session, identified by the session ID. - * @export - * @interface CancelRequest - */ -export interface CancelRequest { - /** - * Unique identifier (UUID) for the session. - * @type {string} - * @memberof CancelRequest - */ - 'sessionID': string; -} -/** - * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. - * @export - * @interface CancelResponse - */ -export interface CancelResponse { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof CancelResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; - /** - * Indicates whether the cancel operation was successful. - * @type {boolean} - * @memberof CancelResponse - */ - 'cancelSuccessful': boolean; -} -/** - * - * @export - * @interface Chain - */ -export interface Chain { - /** - * A unique identifier for the blockchain network. - * @type {string} - * @memberof Chain - */ - 'chainId': string; - /** - * The name of the blockchain network. - * @type {string} - * @memberof Chain - */ - 'chainName': string; - /** - * The type of blockchain network (e.g., \'evm\', \'fabric\'). - * @type {string} - * @memberof Chain - */ - 'chainType': string; - /** - * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). - * @type {string} - * @memberof Chain - */ - 'networkName': string; -} -/** - * - * @export - * @interface Chains1Inner - */ -export interface Chains1Inner { - /** - * A unique identifier for the blockchain network. - * @type {string} - * @memberof Chains1Inner - */ - 'chainId': string; - /** - * The name of the blockchain network. - * @type {string} - * @memberof Chains1Inner - */ - 'chainName': string; - /** - * The type of blockchain network (e.g., \'evm\', \'fabric\'). - * @type {string} - * @memberof Chains1Inner - */ - 'chainType': string; - /** - * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). - * @type {string} - * @memberof Chains1Inner - */ - 'networkName': string; -} -/** - * Response schema for a continue request, returning the status of the SATP session. - * @export - * @interface Continue200Response - */ -export interface Continue200Response { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Continue200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * Schema for a request to continue a paused transaction session. - * @export - * @interface ContinueRequest - */ -export interface ContinueRequest { - /** - * A unique identifier for the transaction session to be continued. - * @type {string} - * @memberof ContinueRequest - */ - 'sessionId': string; - /** - * A unique identifier for the transaction context. - * @type {string} - * @memberof ContinueRequest - */ - 'contextId': string; -} -/** - * Response schema for a continue request, returning the status of the SATP session. - * @export - * @interface ContinueResponse - */ -export interface ContinueResponse { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof ContinueResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * - * @export - * @enum {string} - */ - -export const CredentialProfile = { - Saml: 'SAML', - Oauth: 'OAUTH', - X509: 'X509' -} as const; - -export type CredentialProfile = typeof CredentialProfile[keyof typeof CredentialProfile]; - - -/** - * Supported DLT protocols. - * @export - * @enum {string} - */ - -export const DLTProtocol = { - HyperledgerFabric: 'HyperledgerFabric', - HyperledgerBesu: 'HyperledgerBesu' -} as const; - -export type DLTProtocol = typeof DLTProtocol[keyof typeof DLTProtocol]; - - -/** - * Provides an estimation for a transaction, including costs, amounts, and execution duration. - * @export - * @interface Estimate - */ -export interface Estimate { - /** - * A blockchain address. - * @type {string} - * @memberof Estimate - */ - 'approvalAddress'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'toAmountMin'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'toAmount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'fromAmount'?: string; - /** - * A collection of fee costs associated with the transaction. - * @type {Array} - * @memberof Estimate - */ - 'feeCosts'?: Array; - /** - * A collection of estimated gas costs for executing the transaction. - * @type {Array} - * @memberof Estimate - */ - 'gasCosts'?: Array; - /** - * The estimated duration for the transaction execution in seconds. - * @type {number} - * @memberof Estimate - */ - 'executionDuration'?: number; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'fromAmountUSD'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'toAmountUSD'?: string; - /** - * The tool or service used to generate this estimate. - * @type {string} - * @memberof Estimate - */ - 'tool'?: string; -} -/** - * Details about a specific fee cost associated with the transaction. - * @export - * @interface FeeCost - */ -export interface FeeCost { - /** - * Name of the fee cost. - * @type {string} - * @memberof FeeCost - */ - 'name'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof FeeCost - */ - 'amount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof FeeCost - */ - 'amountUSD'?: string; - /** - * The symbol of a token - * @type {string} - * @memberof FeeCost - */ - 'token'?: string; - /** - * Indicates if the fee is included in the transaction amount. - * @type {boolean} - * @memberof FeeCost - */ - 'included'?: boolean; -} -/** - * - * @export - * @interface GasCost - */ -export interface GasCost { - /** - * The type of the gas cost. - * @type {string} - * @memberof GasCost - */ - 'type'?: string; - /** - * The gas price, specified as a string to maintain precision. - * @type {string} - * @memberof GasCost - */ - 'price'?: string; - /** - * The estimated gas required, specified as a string to maintain precision. - * @type {string} - * @memberof GasCost - */ - 'estimate'?: string; - /** - * The gas limit for the transaction, specified as a string to maintain precision. - * @type {string} - * @memberof GasCost - */ - 'limit'?: string; - /** - * The amount of gas required in the gas currency. - * @type {string} - * @memberof GasCost - */ - 'amount'?: string; - /** - * The amount of gas required in USD. - * @type {string} - * @memberof GasCost - */ - 'amountUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GasCost - */ - 'token'?: GetRoutes200ResponseRoutesInnerFromToken; -} -/** - * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. - * @export - * @interface GetAudit200Response - */ -export interface GetAudit200Response { - /** - * An array of strings representing proofs. - * @type {Array} - * @memberof GetAudit200Response - */ - 'proofs'?: Array; - /** - * The start datetime of the audit period. - * @type {string} - * @memberof GetAudit200Response - */ - 'auditStartTime'?: string; - /** - * The end datetime of the audit period. - * @type {string} - * @memberof GetAudit200Response - */ - 'auditEndTime'?: string; -} -/** - * Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. - * @export - * @interface GetAuditRequest - */ -export interface GetAuditRequest { - /** - * The start datetime for the audit. - * @type {string} - * @memberof GetAuditRequest - */ - 'auditStartDate'?: string; - /** - * The end datetime for the audit. - * @type {string} - * @memberof GetAuditRequest - */ - 'auditEndDate'?: string; - /** - * Include proofs generated from each gateway transaction. - * @type {boolean} - * @memberof GetAuditRequest - */ - 'includeProofs'?: boolean; -} -/** - * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. - * @export - * @interface GetAuditResponse - */ -export interface GetAuditResponse { - /** - * An array of strings representing proofs. - * @type {Array} - * @memberof GetAuditResponse - */ - 'proofs'?: Array; - /** - * The start datetime of the audit period. - * @type {string} - * @memberof GetAuditResponse - */ - 'auditStartTime'?: string; - /** - * The end datetime of the audit period. - * @type {string} - * @memberof GetAuditResponse - */ - 'auditEndTime'?: string; -} -/** - * - * @export - * @interface GetHealthCheck200Response - */ -export interface GetHealthCheck200Response { - /** - * - * @type {string} - * @memberof GetHealthCheck200Response - */ - 'status'?: string; -} -/** - * A collection of available and unavailable routes - * @export - * @interface GetRoutes200Response - */ -export interface GetRoutes200Response { - /** - * A collection of route objects - * @type {Array} - * @memberof GetRoutes200Response - */ - 'routes': Array; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInner - */ -export interface GetRoutes200ResponseRoutesInner { - /** - * A unique identifier of the route. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'id': string; - /** - * A unique identifier for the gateway. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'gatewayID': string; - /** - * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'mode': GetRoutes200ResponseRoutesInnerModeEnum; - /** - * The ID of the DLT Network where the operation will originate. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromDLTNetworkID'?: string; - /** - * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromAmountUSD'?: number; - /** - * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The ID of the DLT Network where the operation will end. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toDLTNetworkID'?: string; - /** - * The expected amount to be received in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toAmountUSD'?: string; - /** - * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toAmount'?: string; - /** - * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toAmountMin'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The expected gas cost in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'gasCostUSD'?: string; - /** - * Whether chain switching is enabled or not. - * @type {boolean} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'containsSwitchChain'?: boolean; - /** - * List of steps involved in this route, adjusted for mode. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'steps'?: Array; - /** - * - * @type {GetRoutes200ResponseRoutesInnerInsurance} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'tags'?: Array; -} - -export const GetRoutes200ResponseRoutesInnerModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type GetRoutes200ResponseRoutesInnerModeEnum = typeof GetRoutes200ResponseRoutesInnerModeEnum[keyof typeof GetRoutes200ResponseRoutesInnerModeEnum]; - -/** - * Metadata detailing a supported token - * @export - * @interface GetRoutes200ResponseRoutesInnerFromToken - */ -export interface GetRoutes200ResponseRoutesInnerFromToken { - /** - * The network of the DLT being interacted with. TODO: implement network identification draft - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'chainID': string; - /** - * Supported DLT protocols. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'chainType': GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum; - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'address': string; - /** - * The name of the token. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'name'?: string; - /** - * The symbol of the token. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'symbol': string; - /** - * How many decimals the token supports. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'decimals': number; - /** - * The logo of a token, chain, dex etc. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'logoURI'?: string; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'tags'?: Array; - /** - * The current price of the token in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'priceUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; -} - -export const GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = { - HyperledgerFabric: 'HyperledgerFabric', - HyperledgerBesu: 'HyperledgerBesu' -} as const; - -export type GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum[keyof typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum]; - -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensions - */ -export interface GetRoutes200ResponseRoutesInnerFromTokenExtensions { - /** - * - * @type {{ [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }} - * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions - */ - 'bridgeInfo'?: { [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }; - /** - * Indicates whether the token is verified. - * @type {boolean} - * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions - */ - 'verified'?: boolean; -} -/** - * Information about the bridge used for the token transfer. - * @export - * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - */ -export interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - /** - * The address of the token being transferred. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - */ - 'tokenAddress'?: string; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerInsurance - */ -export interface GetRoutes200ResponseRoutesInnerInsurance { - /** - * The state of insurance applicability for the transaction. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerInsurance - */ - 'state'?: GetRoutes200ResponseRoutesInnerInsuranceStateEnum; - /** - * The fee amount for insurance, represented in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerInsurance - */ - 'feeAmountUsd'?: string; -} - -export const GetRoutes200ResponseRoutesInnerInsuranceStateEnum = { - NotInsurable: 'NOT_INSURABLE', - Insurable: 'INSURABLE', - Insured: 'INSURED' -} as const; - -export type GetRoutes200ResponseRoutesInnerInsuranceStateEnum = typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum[keyof typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum]; - -/** - * Details a single step within a route including actions and estimates. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInner - */ -export interface GetRoutes200ResponseRoutesInnerStepsInner { - /** - * Id of the step - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'id'?: string; - /** - * Type of the step, typically describing the action, e.g., \'swap\'. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'type'?: string; - /** - * Tool used in the step, e.g., \'stargate\'. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'tool'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * IDs of further steps included within this step, allowing for nested actions without direct recursion. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'includedStepIds'?: Array; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerAction - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerAction { - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'slippage'?: number; - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'fromAddress'?: string; - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'toAddress'?: string; -} -/** - * Provides an estimation for a transaction, including costs, amounts, and execution duration. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'approvalAddress'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'toAmountMin'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'toAmount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'fromAmount'?: string; - /** - * A collection of fee costs associated with the transaction. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'feeCosts'?: Array; - /** - * A collection of estimated gas costs for executing the transaction. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'gasCosts'?: Array; - /** - * The estimated duration for the transaction execution in seconds. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'executionDuration'?: number; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'fromAmountUSD'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'toAmountUSD'?: string; - /** - * The tool or service used to generate this estimate. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'tool'?: string; -} -/** - * Details about a specific fee cost associated with the transaction. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - /** - * Name of the fee cost. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'name'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'amount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'amountUSD'?: string; - /** - * The symbol of a token - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'token'?: string; - /** - * Indicates if the fee is included in the transaction amount. - * @type {boolean} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'included'?: boolean; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - /** - * The type of the gas cost. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'type'?: string; - /** - * The gas price, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'price'?: string; - /** - * The estimated gas required, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'estimate'?: string; - /** - * The gas limit for the transaction, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'limit'?: string; - /** - * The amount of gas required in the gas currency. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'amount'?: string; - /** - * The amount of gas required in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'amountUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'token'?: GetRoutes200ResponseRoutesInnerFromToken; -} -/** - * Describes integration or tool details such as bridges or exchanges involved in the transaction. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - /** - * A unique identifier for the integration or tool. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ - 'key': string; - /** - * The name of the integration or tool. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ - 'name': string; - /** - * URL to the logo of the integration or tool. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ - 'logoURI': string; -} -/** - * - * @export - * @interface HealthCheckResponse - */ -export interface HealthCheckResponse { - /** - * - * @type {string} - * @memberof HealthCheckResponse - */ - 'status'?: string; -} -/** - * Details a single step within a route including actions and estimates. - * @export - * @interface IncludedStep - */ -export interface IncludedStep { - /** - * Id of the step - * @type {string} - * @memberof IncludedStep - */ - 'id'?: string; - /** - * Type of the step, typically describing the action, e.g., \'swap\'. - * @type {string} - * @memberof IncludedStep - */ - 'type'?: string; - /** - * Tool used in the step, e.g., \'stargate\'. - * @type {string} - * @memberof IncludedStep - */ - 'tool'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} - * @memberof IncludedStep - */ - 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} - * @memberof IncludedStep - */ - 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof IncludedStep - */ - 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof IncludedStep - */ - 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * IDs of further steps included within this step, allowing for nested actions without direct recursion. - * @type {Array} - * @memberof IncludedStep - */ - 'includedStepIds'?: Array; -} -/** - * - * @export - * @interface Insurance - */ -export interface Insurance { - /** - * The state of insurance applicability for the transaction. - * @type {string} - * @memberof Insurance - */ - 'state'?: InsuranceStateEnum; - /** - * The fee amount for insurance, represented in USD. - * @type {string} - * @memberof Insurance - */ - 'feeAmountUsd'?: string; -} - -export const InsuranceStateEnum = { - NotInsurable: 'NOT_INSURABLE', - Insurable: 'INSURABLE', - Insured: 'INSURED' -} as const; - -export type InsuranceStateEnum = typeof InsuranceStateEnum[keyof typeof InsuranceStateEnum]; - -/** - * Describes integration or tool details such as bridges or exchanges involved in the transaction. - * @export - * @interface IntegrationDetails - */ -export interface IntegrationDetails { - /** - * A unique identifier for the integration or tool. - * @type {string} - * @memberof IntegrationDetails - */ - 'key': string; - /** - * The name of the integration or tool. - * @type {string} - * @memberof IntegrationDetails - */ - 'name': string; - /** - * URL to the logo of the integration or tool. - * @type {string} - * @memberof IntegrationDetails - */ - 'logoURI': string; -} -/** - * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. - * @export - * @interface Pause200Response - */ -export interface Pause200Response { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Pause200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. - * @export - * @interface PauseRequest - */ -export interface PauseRequest { - /** - * - * @type {string} - * @memberof PauseRequest - */ - 'sessionId'?: string; - /** - * - * @type {string} - * @memberof PauseRequest - */ - 'contextId'?: string; -} -/** - * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. - * @export - * @interface PauseResponse - */ -export interface PauseResponse { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof PauseResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * - * @export - * @interface Route - */ -export interface Route { - /** - * A unique identifier of the route. - * @type {string} - * @memberof Route - */ - 'id': string; - /** - * A unique identifier for the gateway. - * @type {string} - * @memberof Route - */ - 'gatewayID': string; - /** - * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. - * @type {string} - * @memberof Route - */ - 'mode': RouteModeEnum; - /** - * The ID of the DLT Network where the operation will originate. - * @type {string} - * @memberof Route - */ - 'fromDLTNetworkID'?: string; - /** - * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. - * @type {number} - * @memberof Route - */ - 'fromAmountUSD'?: number; - /** - * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof Route - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Route - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The ID of the DLT Network where the operation will end. - * @type {string} - * @memberof Route - */ - 'toDLTNetworkID'?: string; - /** - * The expected amount to be received in USD. - * @type {string} - * @memberof Route - */ - 'toAmountUSD'?: string; - /** - * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof Route - */ - 'toAmount'?: string; - /** - * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof Route - */ - 'toAmountMin'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Route - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The expected gas cost in USD. - * @type {string} - * @memberof Route - */ - 'gasCostUSD'?: string; - /** - * Whether chain switching is enabled or not. - * @type {boolean} - * @memberof Route - */ - 'containsSwitchChain'?: boolean; - /** - * List of steps involved in this route, adjusted for mode. - * @type {Array} - * @memberof Route - */ - 'steps'?: Array; - /** - * - * @type {GetRoutes200ResponseRoutesInnerInsurance} - * @memberof Route - */ - 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof Route - */ - 'tags'?: Array; -} - -export const RouteModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type RouteModeEnum = typeof RouteModeEnum[keyof typeof RouteModeEnum]; - -/** - * A collection of available and unavailable routes - * @export - * @interface RoutesResponse - */ -export interface RoutesResponse { - /** - * A collection of route objects - * @type {Array} - * @memberof RoutesResponse - */ - 'routes': Array; -} -/** - * Request for retrieving the current status of a session, identified by the session ID. - * @export - * @interface StatusRequest - */ -export interface StatusRequest { - /** - * The ID of the session for which the status is being requested. - * @type {string} - * @memberof StatusRequest - */ - 'sessionID': string; -} -/** - * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. - * @export - * @interface StatusResponse - */ -export interface StatusResponse { - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'status': StatusResponseStatusEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'substatus': StatusResponseSubstatusEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'stage': StatusResponseStageEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'step': StatusResponseStepEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'startTime': string; - /** - * - * @type {Transact200ResponseStatusResponseOriginChain} - * @memberof StatusResponse - */ - 'originChain': Transact200ResponseStatusResponseOriginChain; - /** - * - * @type {Transact200ResponseStatusResponseDestinationChain} - * @memberof StatusResponse - */ - 'destinationChain': Transact200ResponseStatusResponseDestinationChain; -} - -export const StatusResponseStatusEnum = { - NotFound: 'NOT_FOUND', - Invalid: 'INVALID', - Pending: 'PENDING', - Done: 'DONE', - Failed: 'FAILED' -} as const; - -export type StatusResponseStatusEnum = typeof StatusResponseStatusEnum[keyof typeof StatusResponseStatusEnum]; -export const StatusResponseSubstatusEnum = { - WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', - WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', - BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', - ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', - RefundInProgress: 'REFUND_IN_PROGRESS', - UnknownError: 'UNKNOWN_ERROR', - Completed: 'COMPLETED', - Partial: 'PARTIAL', - Refunded: 'REFUNDED', - NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' -} as const; - -export type StatusResponseSubstatusEnum = typeof StatusResponseSubstatusEnum[keyof typeof StatusResponseSubstatusEnum]; -export const StatusResponseStageEnum = { - Stage0: 'STAGE0', - Stage1: 'STAGE1', - Stage2: 'STAGE2', - Stage3: 'STAGE3' -} as const; - -export type StatusResponseStageEnum = typeof StatusResponseStageEnum[keyof typeof StatusResponseStageEnum]; -export const StatusResponseStepEnum = { - TransferInitializationClaims: 'transfer-initialization-claims', - ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', - TransferProposalMessage: 'transfer-proposal-message', - TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', - TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', - TransferCommenceMessage: 'transfer-commence-message', - CommenceResponseMessage: 'commence-response-message', - LockAssertionMessage: 'lock-assertion-message', - LockAssertionReceiptMessage: 'lock-assertion-receipt-message', - CommitPreparationMessage: 'commit-preparation-message', - CommitReadyMessage: 'commit-ready-message', - CommitFinalAssertionMessage: 'commit-final-assertion-message', - CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', - TransferCompleteMessage: 'transfer-complete-message', - RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', - RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', - RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', - RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', - RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', - RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', - RollbackCommenceResponseMessage: 'rollback-commence-response-message', - RollbackLockAssertionMessage: 'rollback-lock-assertion-message', - RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', - RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', - RollbackCommitReadyMessage: 'rollback-commit-ready-message', - RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', - RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', - RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' -} as const; - -export type StatusResponseStepEnum = typeof StatusResponseStepEnum[keyof typeof StatusResponseStepEnum]; - -/** - * Metadata detailing a supported token - * @export - * @interface Token - */ -export interface Token { - /** - * The network of the DLT being interacted with. TODO: implement network identification draft - * @type {string} - * @memberof Token - */ - 'chainID': string; - /** - * Supported DLT protocols. - * @type {string} - * @memberof Token - */ - 'chainType': TokenChainTypeEnum; - /** - * A blockchain address. - * @type {string} - * @memberof Token - */ - 'address': string; - /** - * The name of the token. - * @type {string} - * @memberof Token - */ - 'name'?: string; - /** - * The symbol of the token. - * @type {string} - * @memberof Token - */ - 'symbol': string; - /** - * How many decimals the token supports. - * @type {number} - * @memberof Token - */ - 'decimals': number; - /** - * The logo of a token, chain, dex etc. - * @type {string} - * @memberof Token - */ - 'logoURI'?: string; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof Token - */ - 'tags'?: Array; - /** - * The current price of the token in USD. - * @type {string} - * @memberof Token - */ - 'priceUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} - * @memberof Token - */ - 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; -} - -export const TokenChainTypeEnum = { - HyperledgerFabric: 'HyperledgerFabric', - HyperledgerBesu: 'HyperledgerBesu' -} as const; - -export type TokenChainTypeEnum = typeof TokenChainTypeEnum[keyof typeof TokenChainTypeEnum]; - -/** - * Response schema for a transaction request. Includes the session ID and the current status of the transaction. - * @export - * @interface Transact200Response - */ -export interface Transact200Response { - /** - * Unique identifier (UUID) for the session. - * @type {string} - * @memberof Transact200Response - */ - 'sessionID': string; - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Transact200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. - * @export - * @interface Transact200ResponseStatusResponse - */ -export interface Transact200ResponseStatusResponse { - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'status': Transact200ResponseStatusResponseStatusEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'substatus': Transact200ResponseStatusResponseSubstatusEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'stage': Transact200ResponseStatusResponseStageEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'step': Transact200ResponseStatusResponseStepEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'startTime': string; - /** - * - * @type {Transact200ResponseStatusResponseOriginChain} - * @memberof Transact200ResponseStatusResponse - */ - 'originChain': Transact200ResponseStatusResponseOriginChain; - /** - * - * @type {Transact200ResponseStatusResponseDestinationChain} - * @memberof Transact200ResponseStatusResponse - */ - 'destinationChain': Transact200ResponseStatusResponseDestinationChain; -} - -export const Transact200ResponseStatusResponseStatusEnum = { - NotFound: 'NOT_FOUND', - Invalid: 'INVALID', - Pending: 'PENDING', - Done: 'DONE', - Failed: 'FAILED' -} as const; - -export type Transact200ResponseStatusResponseStatusEnum = typeof Transact200ResponseStatusResponseStatusEnum[keyof typeof Transact200ResponseStatusResponseStatusEnum]; -export const Transact200ResponseStatusResponseSubstatusEnum = { - WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', - WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', - BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', - ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', - RefundInProgress: 'REFUND_IN_PROGRESS', - UnknownError: 'UNKNOWN_ERROR', - Completed: 'COMPLETED', - Partial: 'PARTIAL', - Refunded: 'REFUNDED', - NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' -} as const; - -export type Transact200ResponseStatusResponseSubstatusEnum = typeof Transact200ResponseStatusResponseSubstatusEnum[keyof typeof Transact200ResponseStatusResponseSubstatusEnum]; -export const Transact200ResponseStatusResponseStageEnum = { - Stage0: 'STAGE0', - Stage1: 'STAGE1', - Stage2: 'STAGE2', - Stage3: 'STAGE3' -} as const; - -export type Transact200ResponseStatusResponseStageEnum = typeof Transact200ResponseStatusResponseStageEnum[keyof typeof Transact200ResponseStatusResponseStageEnum]; -export const Transact200ResponseStatusResponseStepEnum = { - TransferInitializationClaims: 'transfer-initialization-claims', - ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', - TransferProposalMessage: 'transfer-proposal-message', - TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', - TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', - TransferCommenceMessage: 'transfer-commence-message', - CommenceResponseMessage: 'commence-response-message', - LockAssertionMessage: 'lock-assertion-message', - LockAssertionReceiptMessage: 'lock-assertion-receipt-message', - CommitPreparationMessage: 'commit-preparation-message', - CommitReadyMessage: 'commit-ready-message', - CommitFinalAssertionMessage: 'commit-final-assertion-message', - CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', - TransferCompleteMessage: 'transfer-complete-message', - RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', - RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', - RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', - RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', - RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', - RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', - RollbackCommenceResponseMessage: 'rollback-commence-response-message', - RollbackLockAssertionMessage: 'rollback-lock-assertion-message', - RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', - RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', - RollbackCommitReadyMessage: 'rollback-commit-ready-message', - RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', - RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', - RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' -} as const; - -export type Transact200ResponseStatusResponseStepEnum = typeof Transact200ResponseStatusResponseStepEnum[keyof typeof Transact200ResponseStatusResponseStepEnum]; - -/** - * - * @export - * @interface Transact200ResponseStatusResponseDestinationChain - */ -export interface Transact200ResponseStatusResponseDestinationChain { - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseDestinationChain - */ - 'dltProtocol'?: any; - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseDestinationChain - */ - 'dltSubnetworkID'?: any; -} -/** - * - * @export - * @interface Transact200ResponseStatusResponseOriginChain - */ -export interface Transact200ResponseStatusResponseOriginChain { - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseOriginChain - */ - 'dltProtocol'?: any; - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseOriginChain - */ - 'dltSubnetworkID'?: any; -} -/** - * An Error - * @export - * @interface TransactDefaultResponse - */ -export interface TransactDefaultResponse { - /** - * HTTP error type - * @type {string} - * @memberof TransactDefaultResponse - */ - 'type': string; - /** - * Numeric error code - * @type {number} - * @memberof TransactDefaultResponse - */ - 'code': number; - /** - * HTTP status of the error - * @type {number} - * @memberof TransactDefaultResponse - */ - 'status': number; - /** - * Long error description - * @type {string} - * @memberof TransactDefaultResponse - */ - 'message': string; - /** - * Timestamp of the error - * @type {string} - * @memberof TransactDefaultResponse - */ - 'timestamp': string; -} -/** - * Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. - * @export - * @interface TransactRequest - */ -export interface TransactRequest { - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'contextID': string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'mode': TransactRequestModeEnum; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'payload'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'fromDLTNetworkID'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'toDLTNetworkID'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'fromAmount'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'fromToken'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'toAmount'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'toToken'?: string; -} - -export const TransactRequestModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; - -/** - * Response schema for a transaction request. Includes the session ID and the current status of the transaction. - * @export - * @interface TransactResponse - */ -export interface TransactResponse { - /** - * Unique identifier (UUID) for the session. - * @type {string} - * @memberof TransactResponse - */ - 'sessionID': string; - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof TransactResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; -} - -/** - * AdminApi - axios parameter creator - * @export - */ -export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - _continue: async (continueRequest: ContinueRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'continueRequest' is not null or undefined - assertParamExists('_continue', 'continueRequest', continueRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(continueRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAudit: async (auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (auditStartDate !== undefined) { - localVarQueryParameter['auditStartDate'] = (auditStartDate as any instanceof Date) ? - (auditStartDate as any).toISOString() : - auditStartDate; - } - - if (auditEndDate !== undefined) { - localVarQueryParameter['auditEndDate'] = (auditEndDate as any instanceof Date) ? - (auditEndDate as any).toISOString() : - auditEndDate; - } - - if (includeProofs !== undefined) { - localVarQueryParameter['includeProofs'] = includeProofs; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHealthCheck: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatus: async (sessionID: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'sessionID' is not null or undefined - assertParamExists('getStatus', 'sessionID', sessionID) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (sessionID !== undefined) { - localVarQueryParameter['SessionID'] = sessionID; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - pause: async (pauseRequest: PauseRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'pauseRequest' is not null or undefined - assertParamExists('pause', 'pauseRequest', pauseRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(pauseRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * AdminApi - functional programming interface - * @export - */ -export const AdminApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) - return { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator._continue(continueRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAudit(auditStartDate, auditEndDate, includeProofs, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHealthCheck(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheck(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatus(sessionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatus(sessionID, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.pause(pauseRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * AdminApi - factory interface - * @export - */ -export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AdminApiFp(configuration) - return { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - _continue(continueRequest: ContinueRequest, options?: any): AxiosPromise { - return localVarFp._continue(continueRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: any): AxiosPromise { - return localVarFp.getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(axios, basePath)); - }, - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHealthCheck(options?: any): AxiosPromise { - return localVarFp.getHealthCheck(options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatus(sessionID: string, options?: any): AxiosPromise { - return localVarFp.getStatus(sessionID, options).then((request) => request(axios, basePath)); - }, - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - pause(pauseRequest: PauseRequest, options?: any): AxiosPromise { - return localVarFp.pause(pauseRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * AdminApi - object-oriented interface - * @export - * @class AdminApi - * @extends {BaseAPI} - */ -export class AdminApi extends BaseAPI { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration)._continue(continueRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public getHealthCheck(options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getHealthCheck(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public getStatus(sessionID: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getStatus(sessionID, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).pause(pauseRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - -/** - * TransactionApi - axios parameter creator - * @export - */ -export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cancel: async (cancelRequest: CancelRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'cancelRequest' is not null or undefined - assertParamExists('cancel', 'cancelRequest', cancelRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(cancelRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getIntegrations: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRoutes: async (fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'fromNetworkID' is not null or undefined - assertParamExists('getRoutes', 'fromNetworkID', fromNetworkID) - // verify required parameter 'fromAmount' is not null or undefined - assertParamExists('getRoutes', 'fromAmount', fromAmount) - // verify required parameter 'fromToken' is not null or undefined - assertParamExists('getRoutes', 'fromToken', fromToken) - // verify required parameter 'toDLTNetwork' is not null or undefined - assertParamExists('getRoutes', 'toDLTNetwork', toDLTNetwork) - // verify required parameter 'toToken' is not null or undefined - assertParamExists('getRoutes', 'toToken', toToken) - // verify required parameter 'fromAddress' is not null or undefined - assertParamExists('getRoutes', 'fromAddress', fromAddress) - // verify required parameter 'toAddress' is not null or undefined - assertParamExists('getRoutes', 'toAddress', toAddress) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (fromNetworkID !== undefined) { - localVarQueryParameter['fromNetworkID'] = fromNetworkID; - } - - if (fromAmount !== undefined) { - localVarQueryParameter['fromAmount'] = fromAmount; - } - - if (fromToken !== undefined) { - localVarQueryParameter['fromToken'] = fromToken; - } - - if (toDLTNetwork !== undefined) { - localVarQueryParameter['toDLTNetwork'] = toDLTNetwork; - } - - if (toToken !== undefined) { - localVarQueryParameter['toToken'] = toToken; - } - - if (fromAddress !== undefined) { - localVarQueryParameter['fromAddress'] = fromAddress; - } - - if (toAddress !== undefined) { - localVarQueryParameter['toAddress'] = toAddress; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transact: async (transactRequest: TransactRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactRequest' is not null or undefined - assertParamExists('transact', 'transactRequest', transactRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * TransactionApi - functional programming interface - * @export - */ -export const TransactionApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration) - return { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(cancelRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getIntegrations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getIntegrations(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async transact(transactRequest: TransactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.transact(transactRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * TransactionApi - factory interface - * @export - */ -export const TransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TransactionApiFp(configuration) - return { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cancel(cancelRequest: CancelRequest, options?: any): AxiosPromise { - return localVarFp.cancel(cancelRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getIntegrations(options?: any): AxiosPromise> { - return localVarFp.getIntegrations(options).then((request) => request(axios, basePath)); - }, - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: any): AxiosPromise { - return localVarFp.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(axios, basePath)); - }, - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transact(transactRequest: TransactRequest, options?: any): AxiosPromise { - return localVarFp.transact(transactRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * TransactionApi - object-oriented interface - * @export - * @class TransactionApi - * @extends {BaseAPI} - */ -export class TransactionApi extends BaseAPI { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).cancel(cancelRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public getIntegrations(options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).getIntegrations(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public transact(transactRequest: TransactRequest, options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).transact(transactRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts deleted file mode 100644 index 59018f25b9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/base.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - * - * The version of the OpenAPI document: 0.0.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -// Some imports not used depending on template conditions -// @ts-ignore -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; - -export const BASE_PATH = "http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes".replace(/\/+$/, ""); - -/** - * - * @export - */ -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: AxiosRequestConfig; -} - -/** - * - * @export - * @class BaseAPI - */ -export class BaseAPI { - protected configuration: Configuration | undefined; - - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath || this.basePath; - } - } -}; - -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts deleted file mode 100644 index e2604cb54e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/common.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - * - * The version of the OpenAPI document: 0.0.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; - -/** - * - * @export - */ -export const DUMMY_BASE_URL = 'https://example.com' - -/** - * - * @throws {RequiredError} - * @export - */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} - -/** - * - * @export - */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} - -/** - * - * @export - */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -/** - * - * @export - */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} - -/** - * - * @export - */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} - -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} - -/** - * - * @export - */ -export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} - -/** - * - * @export - */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} - -/** - * - * @export - */ -export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} - -/** - * - * @export - */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts deleted file mode 100644 index a444ba448f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/configuration.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - * - * The version of the OpenAPI document: 0.0.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - baseOptions?: any; - formDataCtor?: new () => any; -} - -export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts deleted file mode 100644 index d13fdacf7f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios-json/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - * - * The version of the OpenAPI document: 0.0.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export * from "./api"; -export * from "./configuration"; - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts deleted file mode 100644 index be34c080ca..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/common_messages_pb.ts +++ /dev/null @@ -1,1507 +0,0 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" -// @generated from file cacti/satp/v02/common/common_messages.proto (package cacti.satp.v02.common, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; - -/** - * @generated from enum cacti.satp.v02.common.STATUS - */ -export enum STATUS { - /** - * @generated from enum value: STATUS_UNSPECIFIED = 0; - */ - STATUS_UNSPECIFIED = 0, - - /** - * @generated from enum value: STATUS_OK = 1; - */ - STATUS_OK = 1, - - /** - * @generated from enum value: STATUS_ERROR = 2; - */ - STATUS_ERROR = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(STATUS) -proto3.util.setEnumType(STATUS, "cacti.satp.v02.common.STATUS", [ - { no: 0, name: "STATUS_UNSPECIFIED" }, - { no: 1, name: "STATUS_OK" }, - { no: 2, name: "STATUS_ERROR" }, -]); - -/** - * @generated from enum cacti.satp.v02.common.MessageType - */ -export enum MessageType { - /** - * @generated from enum value: MESSAGE_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: MESSAGE_TYPE_INIT_PROPOSAL = 1; - */ - INIT_PROPOSAL = 1, - - /** - * @generated from enum value: MESSAGE_TYPE_INIT_RECEIPT = 2; - */ - INIT_RECEIPT = 2, - - /** - * @generated from enum value: MESSAGE_TYPE_INIT_REJECT = 3; - */ - INIT_REJECT = 3, - - /** - * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 4; - */ - TRANSFER_COMMENCE_REQUEST = 4, - - /** - * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 5; - */ - TRANSFER_COMMENCE_RESPONSE = 5, - - /** - * @generated from enum value: MESSAGE_TYPE_LOCK_ASSERT = 6; - */ - LOCK_ASSERT = 6, - - /** - * @generated from enum value: MESSAGE_TYPE_ASSERTION_RECEIPT = 7; - */ - ASSERTION_RECEIPT = 7, - - /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_PREPARE = 8; - */ - COMMIT_PREPARE = 8, - - /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_READY = 9; - */ - COMMIT_READY = 9, - - /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_FINAL = 10; - */ - COMMIT_FINAL = 10, - - /** - * @generated from enum value: MESSAGE_TYPE_ACK_COMMIT_FINAL = 11; - */ - ACK_COMMIT_FINAL = 11, - - /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 12; - */ - COMMIT_TRANSFER_COMPLETE = 12, -} -// Retrieve enum metadata with: proto3.getEnumType(MessageType) -proto3.util.setEnumType(MessageType, "cacti.satp.v02.common.MessageType", [ - { no: 0, name: "MESSAGE_TYPE_UNSPECIFIED" }, - { no: 1, name: "MESSAGE_TYPE_INIT_PROPOSAL" }, - { no: 2, name: "MESSAGE_TYPE_INIT_RECEIPT" }, - { no: 3, name: "MESSAGE_TYPE_INIT_REJECT" }, - { no: 4, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST" }, - { no: 5, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE" }, - { no: 6, name: "MESSAGE_TYPE_LOCK_ASSERT" }, - { no: 7, name: "MESSAGE_TYPE_ASSERTION_RECEIPT" }, - { no: 8, name: "MESSAGE_TYPE_COMMIT_PREPARE" }, - { no: 9, name: "MESSAGE_TYPE_COMMIT_READY" }, - { no: 10, name: "MESSAGE_TYPE_COMMIT_FINAL" }, - { no: 11, name: "MESSAGE_TYPE_ACK_COMMIT_FINAL" }, - { no: 12, name: "MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE" }, -]); - -/** - * @generated from enum cacti.satp.v02.common.CredentialProfile - */ -export enum CredentialProfile { - /** - * @generated from enum value: CREDENTIAL_PROFILE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: CREDENTIAL_PROFILE_SAML = 1; - */ - SAML = 1, - - /** - * @generated from enum value: CREDENTIAL_PROFILE_OAUTH = 2; - */ - OAUTH = 2, - - /** - * @generated from enum value: CREDENTIAL_PROFILE_X509 = 3; - */ - X509 = 3, -} -// Retrieve enum metadata with: proto3.getEnumType(CredentialProfile) -proto3.util.setEnumType(CredentialProfile, "cacti.satp.v02.common.CredentialProfile", [ - { no: 0, name: "CREDENTIAL_PROFILE_UNSPECIFIED" }, - { no: 1, name: "CREDENTIAL_PROFILE_SAML" }, - { no: 2, name: "CREDENTIAL_PROFILE_OAUTH" }, - { no: 3, name: "CREDENTIAL_PROFILE_X509" }, -]); - -/** - * @generated from enum cacti.satp.v02.common.SignatureAlgorithm - */ -export enum SignatureAlgorithm { - /** - * @generated from enum value: SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: SIGNATURE_ALGORITHM_RSA = 1; - */ - RSA = 1, - - /** - * @generated from enum value: SIGNATURE_ALGORITHM_ECDSA = 2; - */ - ECDSA = 2, - - /** - * @generated from enum value: SIGNATURE_ALGORITHM_DSA = 3; - */ - DSA = 3, - - /** - * @generated from enum value: SIGNATURE_ALGORITHM_HMAC = 4; - */ - HMAC = 4, - - /** - * @generated from enum value: SIGNATURE_ALGORITHM_RSASSA_PSS = 5; - */ - RSASSA_PSS = 5, - - /** - * @generated from enum value: SIGNATURE_ALGORITHM_EDDSA = 6; - */ - EDDSA = 6, -} -// Retrieve enum metadata with: proto3.getEnumType(SignatureAlgorithm) -proto3.util.setEnumType(SignatureAlgorithm, "cacti.satp.v02.common.SignatureAlgorithm", [ - { no: 0, name: "SIGNATURE_ALGORITHM_UNSPECIFIED" }, - { no: 1, name: "SIGNATURE_ALGORITHM_RSA" }, - { no: 2, name: "SIGNATURE_ALGORITHM_ECDSA" }, - { no: 3, name: "SIGNATURE_ALGORITHM_DSA" }, - { no: 4, name: "SIGNATURE_ALGORITHM_HMAC" }, - { no: 5, name: "SIGNATURE_ALGORITHM_RSASSA_PSS" }, - { no: 6, name: "SIGNATURE_ALGORITHM_EDDSA" }, -]); - -/** - * @generated from enum cacti.satp.v02.common.LockType - */ -export enum LockType { - /** - * @generated from enum value: LOCK_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: LOCK_TYPE_FAUCET = 1; - */ - FAUCET = 1, - - /** - * @generated from enum value: LOCK_TYPE_TIMELOCK = 2; - */ - TIMELOCK = 2, - - /** - * @generated from enum value: LOCK_TYPE_HASHLOCK = 3; - */ - HASHLOCK = 3, - - /** - * @generated from enum value: LOCK_TYPE_HASHLOCKTIME = 4; - */ - HASHLOCKTIME = 4, - - /** - * @generated from enum value: LOCK_TYPE_MULTICLAIM = 5; - */ - MULTICLAIM = 5, - - /** - * @generated from enum value: LOCK_TYPE_DESTROYBURN = 6; - */ - DESTROYBURN = 6, -} -// Retrieve enum metadata with: proto3.getEnumType(LockType) -proto3.util.setEnumType(LockType, "cacti.satp.v02.common.LockType", [ - { no: 0, name: "LOCK_TYPE_UNSPECIFIED" }, - { no: 1, name: "LOCK_TYPE_FAUCET" }, - { no: 2, name: "LOCK_TYPE_TIMELOCK" }, - { no: 3, name: "LOCK_TYPE_HASHLOCK" }, - { no: 4, name: "LOCK_TYPE_HASHLOCKTIME" }, - { no: 5, name: "LOCK_TYPE_MULTICLAIM" }, - { no: 6, name: "LOCK_TYPE_DESTROYBURN" }, -]); - -/** - * @generated from enum cacti.satp.v02.common.Error - */ -export enum Error { - /** - * @generated from enum value: ERROR_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE = 1; - */ - BADLY_FORMATED_MESSAGE = 1, - - /** - * @generated from enum value: ERROR_INCORRECT_PARAMETER = 2; - */ - INCORRECT_PARAMETER = 2, - - /** - * @generated from enum value: ERROR_ACK_MISMATCH = 3; - */ - ACK_MISMATCH = 3, - - /** - * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_CLAIM = 4; - */ - BADLY_FORMATED_MESSAGE_CLAIM = 4, - - /** - * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5; - */ - BADLY_FORMATED_MESSAGE_BAD_SIGNATURE = 5, - - /** - * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6; - */ - BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID = 6, - - /** - * @generated from enum value: ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7; - */ - BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES = 7, - - /** - * @generated from enum value: ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE = 8; - */ - EXPIRED_SIGNING_KEY_CERTIFICATE = 8, - - /** - * @generated from enum value: ERROR_EXPIRED_CLAIM = 9; - */ - EXPIRED_CLAIM = 9, - - /** - * @generated from enum value: ERROR_INCORRERCT_PARAMETER = 10; - */ - INCORRERCT_PARAMETER = 10, - - /** - * @generated from enum value: ERROR_MESSAGE_OUT_OF_SEQUENCE = 11; - */ - MESSAGE_OUT_OF_SEQUENCE = 11, -} -// Retrieve enum metadata with: proto3.getEnumType(Error) -proto3.util.setEnumType(Error, "cacti.satp.v02.common.Error", [ - { no: 0, name: "ERROR_UNSPECIFIED" }, - { no: 1, name: "ERROR_BADLY_FORMATED_MESSAGE" }, - { no: 2, name: "ERROR_INCORRECT_PARAMETER" }, - { no: 3, name: "ERROR_ACK_MISMATCH" }, - { no: 4, name: "ERROR_BADLY_FORMATED_MESSAGE_CLAIM" }, - { no: 5, name: "ERROR_BADLY_FORMATED_MESSAGE_BAD_SIGNATURE" }, - { no: 6, name: "ERROR_BADLY_FORMATED_MESSAGE_WRONG_TRANSACTION_ID" }, - { no: 7, name: "ERROR_BADLY_FORMATED_MESSAGE_MISMATCH_HASH_VALUES" }, - { no: 8, name: "ERROR_EXPIRED_SIGNING_KEY_CERTIFICATE" }, - { no: 9, name: "ERROR_EXPIRED_CLAIM" }, - { no: 10, name: "ERROR_INCORRERCT_PARAMETER" }, - { no: 11, name: "ERROR_MESSAGE_OUT_OF_SEQUENCE" }, -]); - -/** - * TODO: define the common parameters to every protocol message - * - * @generated from message cacti.satp.v02.common.MessageCore - */ -export class MessageCore extends Message { - /** - * @generated from field: string message = 1; - */ - message = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.MessageCore"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MessageCore { - return new MessageCore().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MessageCore { - return new MessageCore().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MessageCore { - return new MessageCore().fromJsonString(jsonString, options); - } - - static equals(a: MessageCore | PlainMessage | undefined, b: MessageCore | PlainMessage | undefined): boolean { - return proto3.util.equals(MessageCore, a, b); - } -} - -/** - * TODO: define the common parameters to every rollback message - * - * @generated from message cacti.satp.v02.common.RollbackMessageCore - */ -export class RollbackMessageCore extends Message { - /** - * @generated from field: string message = 1; - */ - message = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.RollbackMessageCore"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RollbackMessageCore { - return new RollbackMessageCore().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RollbackMessageCore { - return new RollbackMessageCore().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RollbackMessageCore { - return new RollbackMessageCore().fromJsonString(jsonString, options); - } - - static equals(a: RollbackMessageCore | PlainMessage | undefined, b: RollbackMessageCore | PlainMessage | undefined): boolean { - return proto3.util.equals(RollbackMessageCore, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.Ack - */ -export class Ack extends Message { - /** - * @generated from field: cacti.satp.v02.common.STATUS status = 1; - */ - status = STATUS.STATUS_UNSPECIFIED; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.Ack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Ack { - return new Ack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Ack { - return new Ack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Ack { - return new Ack().fromJsonString(jsonString, options); - } - - static equals(a: Ack | PlainMessage | undefined, b: Ack | PlainMessage | undefined): boolean { - return proto3.util.equals(Ack, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.TransferClaims - */ -export class TransferClaims extends Message { - /** - * @generated from field: string digital_asset_id = 1; - */ - digitalAssetId = ""; - - /** - * @generated from field: string asset_profile_id = 2; - */ - assetProfileId = ""; - - /** - * @generated from field: string verified_originator_entity_id = 3; - */ - verifiedOriginatorEntityId = ""; - - /** - * @generated from field: string verified_beneficiary_entity_id = 4; - */ - verifiedBeneficiaryEntityId = ""; - - /** - * @generated from field: string originator_pubkey = 5; - */ - originatorPubkey = ""; - - /** - * @generated from field: string beneficiary_pubkey = 6; - */ - beneficiaryPubkey = ""; - - /** - * @generated from field: string sender_gateway_network_id = 7; - */ - senderGatewayNetworkId = ""; - - /** - * @generated from field: string recipient_gateway_network_id = 8; - */ - recipientGatewayNetworkId = ""; - - /** - * @generated from field: string client_gateway_pubkey = 9; - */ - clientGatewayPubkey = ""; - - /** - * @generated from field: string server_gateway_pubkey = 10; - */ - serverGatewayPubkey = ""; - - /** - * @generated from field: string sender_gateway_owner_id = 11; - */ - senderGatewayOwnerId = ""; - - /** - * @generated from field: string receiver_gateway_owner_id = 12; - */ - receiverGatewayOwnerId = ""; - - /** - * @generated from field: uint32 max_retries = 13; - */ - maxRetries = 0; - - /** - * @generated from field: uint64 max_timeout = 14; - */ - maxTimeout = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.TransferClaims"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "digital_asset_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "asset_profile_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "verified_originator_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "verified_beneficiary_entity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "originator_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "beneficiary_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 13, name: "max_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, - { no: 14, name: "max_timeout", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaims { - return new TransferClaims().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransferClaims { - return new TransferClaims().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransferClaims { - return new TransferClaims().fromJsonString(jsonString, options); - } - - static equals(a: TransferClaims | PlainMessage | undefined, b: TransferClaims | PlainMessage | undefined): boolean { - return proto3.util.equals(TransferClaims, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.TransferClaimsFormat - */ -export class TransferClaimsFormat extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.TransferClaimsFormat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaimsFormat { - return new TransferClaimsFormat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): TransferClaimsFormat { - return new TransferClaimsFormat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): TransferClaimsFormat { - return new TransferClaimsFormat().fromJsonString(jsonString, options); - } - - static equals(a: TransferClaimsFormat | PlainMessage | undefined, b: TransferClaimsFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(TransferClaimsFormat, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.Permissions - */ -export class Permissions extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.Permissions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Permissions { - return new Permissions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Permissions { - return new Permissions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Permissions { - return new Permissions().fromJsonString(jsonString, options); - } - - static equals(a: Permissions | PlainMessage | undefined, b: Permissions | PlainMessage | undefined): boolean { - return proto3.util.equals(Permissions, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.SubsequentCalls - */ -export class SubsequentCalls extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.SubsequentCalls"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SubsequentCalls { - return new SubsequentCalls().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SubsequentCalls { - return new SubsequentCalls().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SubsequentCalls { - return new SubsequentCalls().fromJsonString(jsonString, options); - } - - static equals(a: SubsequentCalls | PlainMessage | undefined, b: SubsequentCalls | PlainMessage | undefined): boolean { - return proto3.util.equals(SubsequentCalls, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.History - */ -export class History extends Message { - /** - * @generated from field: repeated cacti.satp.v02.common.Transaction transactions = 1; - */ - transactions: Transaction[] = []; - - /** - * @generated from field: repeated cacti.satp.v02.common.ActionCategory action_categories = 2; - */ - actionCategories: ActionCategory[] = []; - - /** - * @generated from field: string origin = 3; - */ - origin = ""; - - /** - * @generated from field: string destination = 4; - */ - destination = ""; - - /** - * @generated from field: string balance = 5; - */ - balance = ""; - - /** - * @generated from field: cacti.satp.v02.common.STATUS status = 6; - */ - status = STATUS.STATUS_UNSPECIFIED; - - /** - * @generated from field: cacti.satp.v02.common.ApplicationParameters application_parameters = 7; - */ - applicationParameters?: ApplicationParameters; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.History"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transactions", kind: "message", T: Transaction, repeated: true }, - { no: 2, name: "action_categories", kind: "message", T: ActionCategory, repeated: true }, - { no: 3, name: "origin", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "destination", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "balance", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, - { no: 7, name: "application_parameters", kind: "message", T: ApplicationParameters }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): History { - return new History().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): History { - return new History().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): History { - return new History().fromJsonString(jsonString, options); - } - - static equals(a: History | PlainMessage | undefined, b: History | PlainMessage | undefined): boolean { - return proto3.util.equals(History, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.ActionCategory - */ -export class ActionCategory extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.ActionCategory"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActionCategory { - return new ActionCategory().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ActionCategory { - return new ActionCategory().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActionCategory { - return new ActionCategory().fromJsonString(jsonString, options); - } - - static equals(a: ActionCategory | PlainMessage | undefined, b: ActionCategory | PlainMessage | undefined): boolean { - return proto3.util.equals(ActionCategory, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.Transaction - */ -export class Transaction extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.Transaction"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Transaction { - return new Transaction().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Transaction { - return new Transaction().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Transaction { - return new Transaction().fromJsonString(jsonString, options); - } - - static equals(a: Transaction | PlainMessage | undefined, b: Transaction | PlainMessage | undefined): boolean { - return proto3.util.equals(Transaction, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.ApplicationParameters - */ -export class ApplicationParameters extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.ApplicationParameters"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApplicationParameters { - return new ApplicationParameters().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApplicationParameters { - return new ApplicationParameters().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApplicationParameters { - return new ApplicationParameters().fromJsonString(jsonString, options); - } - - static equals(a: ApplicationParameters | PlainMessage | undefined, b: ApplicationParameters | PlainMessage | undefined): boolean { - return proto3.util.equals(ApplicationParameters, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.NetworkCapabilities - */ -export class NetworkCapabilities extends Message { - /** - * @generated from field: string sender_gateway_network_id = 1; - */ - senderGatewayNetworkId = ""; - - /** - * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 2; - */ - signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; - - /** - * @generated from field: repeated cacti.satp.v02.common.SignatureAlgorithm supported_signature_algorithms = 3; - */ - supportedSignatureAlgorithms: SignatureAlgorithm[] = []; - - /** - * @generated from field: cacti.satp.v02.common.LockType lock_type = 4; - */ - lockType = LockType.UNSPECIFIED; - - /** - * @generated from field: uint64 lock_expiration_time = 5; - */ - lockExpirationTime = protoInt64.zero; - - /** - * @generated from field: cacti.satp.v02.common.Permissions permissions = 6; - */ - permissions?: Permissions; - - /** - * @generated from field: string developer_urn = 7; - */ - developerUrn = ""; - - /** - * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 8; - */ - credentialProfile = CredentialProfile.UNSPECIFIED; - - /** - * @generated from field: string application_profile = 9; - */ - applicationProfile = ""; - - /** - * @generated from field: string logging_profile = 10; - */ - loggingProfile = ""; - - /** - * @generated from field: string access_control_profile = 11; - */ - accessControlProfile = ""; - - /** - * @generated from field: cacti.satp.v02.common.SubsequentCalls subsequent_calls = 12; - */ - subsequentCalls?: SubsequentCalls; - - /** - * @generated from field: repeated cacti.satp.v02.common.History history = 13; - */ - history: History[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.NetworkCapabilities"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, - { no: 3, name: "supported_signature_algorithms", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm), repeated: true }, - { no: 4, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, - { no: 5, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 6, name: "permissions", kind: "message", T: Permissions }, - { no: 7, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, - { no: 9, name: "application_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 10, name: "logging_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "access_control_profile", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "subsequent_calls", kind: "message", T: SubsequentCalls }, - { no: 13, name: "history", kind: "message", T: History, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NetworkCapabilities { - return new NetworkCapabilities().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NetworkCapabilities { - return new NetworkCapabilities().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NetworkCapabilities { - return new NetworkCapabilities().fromJsonString(jsonString, options); - } - - static equals(a: NetworkCapabilities | PlainMessage | undefined, b: NetworkCapabilities | PlainMessage | undefined): boolean { - return proto3.util.equals(NetworkCapabilities, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.CommonSatp - */ -export class CommonSatp extends Message { - /** - * @generated from field: string version = 1; - */ - version = ""; - - /** - * @generated from field: cacti.satp.v02.common.MessageType message_type = 2; - */ - messageType = MessageType.UNSPECIFIED; - - /** - * @generated from field: string session_id = 3; - */ - sessionId = ""; - - /** - * @generated from field: string transfer_context_id = 4; - */ - transferContextId = ""; - - /** - * @generated from field: uint64 sequence_number = 5; - */ - sequenceNumber = protoInt64.zero; - - /** - * @generated from field: string resource_url = 6; - */ - resourceUrl = ""; - - /** - * @generated from field: cacti.satp.v02.common.ActionResponse action_response = 8; - */ - actionResponse?: ActionResponse; - - /** - * @generated from field: string credential_block = 10; - */ - credentialBlock = ""; - - /** - * @generated from field: cacti.satp.v02.common.PayloadProfile payload_profile = 11; - */ - payloadProfile?: PayloadProfile; - - /** - * @generated from field: cacti.satp.v02.common.Payload payload = 13; - */ - payload?: Payload; - - /** - * @generated from field: string payload_hash = 14; - */ - payloadHash = ""; - - /** - * @generated from field: string signature = 15; - */ - signature = ""; - - /** - * @generated from field: string client_gateway_pubkey = 16; - */ - clientGatewayPubkey = ""; - - /** - * @generated from field: string server_gateway_pubkey = 17; - */ - serverGatewayPubkey = ""; - - /** - * @generated from field: string hash_previous_message = 18; - */ - hashPreviousMessage = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.CommonSatp"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "message_type", kind: "enum", T: proto3.getEnumType(MessageType) }, - { no: 3, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "transfer_context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "sequence_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 6, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "action_response", kind: "message", T: ActionResponse }, - { no: 10, name: "credential_block", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "payload_profile", kind: "message", T: PayloadProfile }, - { no: 13, name: "payload", kind: "message", T: Payload }, - { no: 14, name: "payload_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 15, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 16, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 17, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 18, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CommonSatp { - return new CommonSatp().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CommonSatp { - return new CommonSatp().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CommonSatp { - return new CommonSatp().fromJsonString(jsonString, options); - } - - static equals(a: CommonSatp | PlainMessage | undefined, b: CommonSatp | PlainMessage | undefined): boolean { - return proto3.util.equals(CommonSatp, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.ActionResponse - */ -export class ActionResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.ActionResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ActionResponse { - return new ActionResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ActionResponse { - return new ActionResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ActionResponse { - return new ActionResponse().fromJsonString(jsonString, options); - } - - static equals(a: ActionResponse | PlainMessage | undefined, b: ActionResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ActionResponse, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.PayloadProfile - */ -export class PayloadProfile extends Message { - /** - * @generated from field: cacti.satp.v02.common.AssetProfile asset_profile = 1; - */ - assetProfile?: AssetProfile; - - /** - * @generated from field: string capabilities = 2; - */ - capabilities = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.PayloadProfile"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "asset_profile", kind: "message", T: AssetProfile }, - { no: 2, name: "capabilities", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PayloadProfile { - return new PayloadProfile().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PayloadProfile { - return new PayloadProfile().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PayloadProfile { - return new PayloadProfile().fromJsonString(jsonString, options); - } - - static equals(a: PayloadProfile | PlainMessage | undefined, b: PayloadProfile | PlainMessage | undefined): boolean { - return proto3.util.equals(PayloadProfile, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.AssetProfile - */ -export class AssetProfile extends Message { - /** - * @generated from field: string issuer = 1; - */ - issuer = ""; - - /** - * @generated from field: string asset_code = 2; - */ - assetCode = ""; - - /** - * @generated from field: string asset_code_type = 3; - */ - assetCodeType = ""; - - /** - * @generated from field: string issuance_date = 4; - */ - issuanceDate = ""; - - /** - * @generated from field: string expiration_date = 5; - */ - expirationDate = ""; - - /** - * @generated from field: string verification_end_point = 6; - */ - verificationEndPoint = ""; - - /** - * @generated from field: string digital_signature = 7; - */ - digitalSignature = ""; - - /** - * @generated from field: string prospectus_link = 8; - */ - prospectusLink = ""; - - /** - * @generated from field: repeated string key_information_link = 9; - */ - keyInformationLink: string[] = []; - - /** - * @generated from field: repeated string keywords = 10; - */ - keywords: string[] = []; - - /** - * @generated from field: repeated string transfer_restrictions = 11; - */ - transferRestrictions: string[] = []; - - /** - * @generated from field: repeated string ledger_requirements = 12; - */ - ledgerRequirements: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.AssetProfile"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "issuer", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "asset_code", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "asset_code_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "issuance_date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "expiration_date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "verification_end_point", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "digital_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "prospectus_link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "key_information_link", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 10, name: "keywords", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 11, name: "transfer_restrictions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 12, name: "ledger_requirements", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AssetProfile { - return new AssetProfile().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AssetProfile { - return new AssetProfile().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AssetProfile { - return new AssetProfile().fromJsonString(jsonString, options); - } - - static equals(a: AssetProfile | PlainMessage | undefined, b: AssetProfile | PlainMessage | undefined): boolean { - return proto3.util.equals(AssetProfile, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.Payload - */ -export class Payload extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.Payload"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Payload { - return new Payload().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Payload { - return new Payload().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Payload { - return new Payload().fromJsonString(jsonString, options); - } - - static equals(a: Payload | PlainMessage | undefined, b: Payload | PlainMessage | undefined): boolean { - return proto3.util.equals(Payload, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.LockAssertionClaim - */ -export class LockAssertionClaim extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.LockAssertionClaim"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaim { - return new LockAssertionClaim().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionClaim { - return new LockAssertionClaim().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LockAssertionClaim { - return new LockAssertionClaim().fromJsonString(jsonString, options); - } - - static equals(a: LockAssertionClaim | PlainMessage | undefined, b: LockAssertionClaim | PlainMessage | undefined): boolean { - return proto3.util.equals(LockAssertionClaim, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.LockAssertionFormat - */ -export class LockAssertionFormat extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.LockAssertionFormat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionFormat { - return new LockAssertionFormat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionFormat { - return new LockAssertionFormat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): LockAssertionFormat { - return new LockAssertionFormat().fromJsonString(jsonString, options); - } - - static equals(a: LockAssertionFormat | PlainMessage | undefined, b: LockAssertionFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(LockAssertionFormat, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.MintAssertionClaims - */ -export class MintAssertionClaims extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.MintAssertionClaims"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaims { - return new MintAssertionClaims().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaims { - return new MintAssertionClaims().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaims { - return new MintAssertionClaims().fromJsonString(jsonString, options); - } - - static equals(a: MintAssertionClaims | PlainMessage | undefined, b: MintAssertionClaims | PlainMessage | undefined): boolean { - return proto3.util.equals(MintAssertionClaims, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.MintAssertionClaimsFormat - */ -export class MintAssertionClaimsFormat extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.MintAssertionClaimsFormat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaimsFormat { - return new MintAssertionClaimsFormat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaimsFormat { - return new MintAssertionClaimsFormat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaimsFormat { - return new MintAssertionClaimsFormat().fromJsonString(jsonString, options); - } - - static equals(a: MintAssertionClaimsFormat | PlainMessage | undefined, b: MintAssertionClaimsFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(MintAssertionClaimsFormat, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.BurnAssertionClaim - */ -export class BurnAssertionClaim extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaim"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaim { - return new BurnAssertionClaim().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaim { - return new BurnAssertionClaim().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaim { - return new BurnAssertionClaim().fromJsonString(jsonString, options); - } - - static equals(a: BurnAssertionClaim | PlainMessage | undefined, b: BurnAssertionClaim | PlainMessage | undefined): boolean { - return proto3.util.equals(BurnAssertionClaim, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.BurnAssertionClaimFormat - */ -export class BurnAssertionClaimFormat extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaimFormat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaimFormat { - return new BurnAssertionClaimFormat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaimFormat { - return new BurnAssertionClaimFormat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaimFormat { - return new BurnAssertionClaimFormat().fromJsonString(jsonString, options); - } - - static equals(a: BurnAssertionClaimFormat | PlainMessage | undefined, b: BurnAssertionClaimFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(BurnAssertionClaimFormat, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.AssignmentAssertionClaim - */ -export class AssignmentAssertionClaim extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaim"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaim { - return new AssignmentAssertionClaim().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaim { - return new AssignmentAssertionClaim().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaim { - return new AssignmentAssertionClaim().fromJsonString(jsonString, options); - } - - static equals(a: AssignmentAssertionClaim | PlainMessage | undefined, b: AssignmentAssertionClaim | PlainMessage | undefined): boolean { - return proto3.util.equals(AssignmentAssertionClaim, a, b); - } -} - -/** - * @generated from message cacti.satp.v02.common.AssignmentAssertionClaimFormat - */ -export class AssignmentAssertionClaimFormat extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaimFormat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaimFormat { - return new AssignmentAssertionClaimFormat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaimFormat { - return new AssignmentAssertionClaimFormat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaimFormat { - return new AssignmentAssertionClaimFormat().fromJsonString(jsonString, options); - } - - static equals(a: AssignmentAssertionClaimFormat | PlainMessage | undefined, b: AssignmentAssertionClaimFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(AssignmentAssertionClaimFormat, a, b); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts deleted file mode 100644 index 3672917b75..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_connect.ts +++ /dev/null @@ -1,62 +0,0 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" -// @generated from file test/message.proto (package test.message, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { Empty, MethodKind } from "@bufbuild/protobuf"; -import { Message, ModifyMessageRequest, ModifyMessageResponse } from "./message_pb.js"; - -/** - * @generated from service test.message.TestService - */ -export const TestService = { - typeName: "test.message.TestService", - methods: { - /** - * @generated from rpc test.message.TestService.GetMessage - */ - getMessage: { - name: "GetMessage", - I: Empty, - O: Message, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc test.message.TestService.SendMessage - */ - sendMessage: { - name: "SendMessage", - I: Message, - O: Empty, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc test.message.TestService.ModifyMessage - */ - modifyMessage: { - name: "ModifyMessage", - I: ModifyMessageRequest, - O: ModifyMessageResponse, - kind: MethodKind.Unary, - }, - } -} as const; - -/** - * @generated from service test.message.TestService2 - */ -export const TestService2 = { - typeName: "test.message.TestService2", - methods: { - /** - * @generated from rpc test.message.TestService2.GetMessage - */ - getMessage: { - name: "GetMessage", - I: Empty, - O: Message, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts deleted file mode 100644 index 1a1ea00f89..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/test/message_pb.ts +++ /dev/null @@ -1,119 +0,0 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" -// @generated from file test/message.proto (package test.message, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message as Message$1, proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message test.message.Message - */ -export class Message extends Message$1 { - /** - * @generated from field: string content = 1; - */ - content = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "test.message.Message"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Message { - return new Message().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Message { - return new Message().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Message { - return new Message().fromJsonString(jsonString, options); - } - - static equals(a: Message | PlainMessage | undefined, b: Message | PlainMessage | undefined): boolean { - return proto3.util.equals(Message, a, b); - } -} - -/** - * @generated from message test.message.ModifyMessageResponse - */ -export class ModifyMessageResponse extends Message$1 { - /** - * @generated from field: string content = 1; - */ - content = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "test.message.ModifyMessageResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ModifyMessageResponse { - return new ModifyMessageResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ModifyMessageResponse { - return new ModifyMessageResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ModifyMessageResponse { - return new ModifyMessageResponse().fromJsonString(jsonString, options); - } - - static equals(a: ModifyMessageResponse | PlainMessage | undefined, b: ModifyMessageResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ModifyMessageResponse, a, b); - } -} - -/** - * @generated from message test.message.ModifyMessageRequest - */ -export class ModifyMessageRequest extends Message$1 { - /** - * @generated from field: string content = 1; - */ - content = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "test.message.ModifyMessageRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ModifyMessageRequest { - return new ModifyMessageRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ModifyMessageRequest { - return new ModifyMessageRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ModifyMessageRequest { - return new ModifyMessageRequest().fromJsonString(jsonString, options); - } - - static equals(a: ModifyMessageRequest | PlainMessage | undefined, b: ModifyMessageRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ModifyMessageRequest, a, b); - } -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts index 781507d1cc..6cdd48cbd7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts @@ -1,12 +1,15 @@ import { ConnectRouter } from "@connectrpc/connect"; + +/* import { TestService } from "../generated/proto/test/message_connect"; import { TestService2 } from "../generated/proto/test/message_connect"; import { TestImplementation } from "./test/test"; import { TestImplementation2 } from "./test/test2"; + +*/ export const configureRoutes = (router: ConnectRouter): void => { // TODO: add all services and respective implementations - router.service(TestService, TestImplementation); - router.service(TestService2, TestImplementation2); -}; + //router.service(TestService, TestImplementation); +}; \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts deleted file mode 100644 index 6138e2c46a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Empty } from "@bufbuild/protobuf"; -import { - Message, - ModifyMessageRequest, - ModifyMessageResponse, -} from "../../generated/proto/test/message_pb"; -import { HandlerContext } from "@connectrpc/connect"; - -// TODO: investigate how we can get type security, without doing the following: -/* -interface ITestServiceImplementation { - getMessage(req: Empty): Promise; - sendMessage(req: Message): Promise; - modifyMessage(req: ModifyMessageRequest): Promise; -} - -const TestImplementation: ITestServiceImplementation = { - - */ - -// TODO: inject logger from gateway? - -export const TestImplementation: any = { - async getMessage(req: Empty, context: HandlerContext): Promise { - console.log("Received request", req, context); - return new Message({ - content: "Hello, SATP!", - }); - }, - async sendMessage(req: Message): Promise { - console.log("Received request", req); - return new Empty(); - }, - async modifyMessage( - req: ModifyMessageRequest, - ): Promise { - console.log("Received request", req); - return new ModifyMessageResponse({ - content: "You said " + req.content, - }); - }, -}; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts deleted file mode 100644 index 8bea6562cf..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/test/test2.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Empty } from "@bufbuild/protobuf"; -import { Message } from "../../generated/proto/test/message_pb"; -import { HandlerContext } from "@connectrpc/connect"; - -export const TestImplementation2: any = { - async getMessage(req: Empty, context: HandlerContext): Promise { - console.log("Received request", req, context); - return new Message({ - content: "Hello, SATP!" + "2", - }); - }, -}; From 66186cbeb7d7a82ba64d6e4e0ac6748e4154cd42 Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Wed, 10 Apr 2024 15:11:26 +0100 Subject: [PATCH 07/49] feat(satp-hermes): gRPC services draft implementation Signed-off-by: Carlos Amaro feat(satp-hermes): stage1-service and handler refactored Signed-off-by: Carlos Amaro feat(satp-hermes):stage2-service and handler refactored server-side Signed-off-by: Carlos Amaro feat(satp-hermes): service handlers server Signed-off-by: Carlos Amaro feat(satp-hermes): client stage handlers refactor Signed-off-by: Carlos Amaro --- .../proto/cacti/satp/v02/common/session.proto | 42 +- .../src/main/typescript/core/dispatcher.ts | 28 +- .../src/main/typescript/core/session-utils.ts | 396 ++++++++++++++++++ .../client/stage1-client-handler.ts | 92 ++-- .../client/stage2-client-handler.ts | 52 +-- .../client/stage3-client-handler.ts | 166 +++----- .../server/stage1-server-handler.ts | 241 ++++++----- .../server/stage2-server-handler.ts | 55 +-- .../server/stage3-server-handler.ts | 185 ++++---- .../core/stage-services/stage1-service.ts | 113 +++-- .../core/stage-services/stage2-service.ts | 63 ++- .../core/stage-services/stage3-service.ts | 134 ++++-- .../src/main/typescript/gateway-utils.ts | 4 + .../typescript-axios/.openapi-generator/FILES | 1 + .../proto/cacti/satp/v02/common/session_pb.ts | 152 ++++--- 15 files changed, 1151 insertions(+), 573 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index 7cae6bf8dd..3f502462d2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -58,6 +58,9 @@ message SessionData { cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 48; cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 49; cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 50; + bool completed = 51; + ACCEPTANCE acceptance = 52; + string last_message_hash = 53; } @@ -86,8 +89,7 @@ message Stage3Hashes { string commit_ready_response_message_hash = 2; string commit_final_assertion_request_message_hash = 3; string commit_final_acknowledgement_receipt_response_message_hash = 4; - string transfer_complete_request_message_hash = 5; - string transfer_complete_response_message_hash = 6; + string transfer_complete_message_hash = 5; } message MessageStagesSignatures { @@ -97,25 +99,24 @@ message MessageStagesSignatures { } message Stage1Signatures { - string transfer_proposal_request_message_client_signature = 1; - string transfer_proposal_receipt_message_server_signature = 2; - string transfer_proposal_reject_message_server_signature = 3; - string transfer_commence_request_message_client_signature = 4; - string transfer_commence_response_message_server_signature = 5; + string transfer_proposal_request_message_signature = 1; + string transfer_proposal_receipt_message_signature = 2; + string transfer_proposal_reject_message_signature = 3; + string transfer_commence_request_message_signature = 4; + string transfer_commence_response_message_signature = 5; } message Stage2Signatures { - string lock_assertion_request_message_client_signature = 1; - string lock_assertion_receipt_message_server_signature = 2; + string lock_assertion_request_message_signature = 1; + string lock_assertion_receipt_message_signature = 2; } message Stage3Signatures { - string commit_preparation_request_message_client_signature = 1; - string commit_ready_response_message_server_signature = 2; - string commit_final_assertion_request_message_client_signature = 3; - string commit_final_acknowledgement_receipt_response_message_server_signature = 4; - string transfer_complete_request_message_client_signature = 5; - string transfer_complete_response_message_server_signature = 6; + string commit_preparation_request_message_signature = 1; + string commit_ready_response_message_signature = 2; + string commit_final_assertion_request_message_signature = 3; + string commit_final_acknowledgement_receipt_response_message_signature = 4; + string transfer_complete_message_signature = 5; } message MessageStagesTimestamps { @@ -141,9 +142,14 @@ message Stage3Timestamps { string commit_preparation_request_message_timestamp = 1; string commit_ready_response_message_timestamp = 2; string commit_final_assertion_request_message_timestamp = 3; - string commit_final_acknoledgement_receipt_response_message_timestamp = 4; - string transfer_complete_request_message_timestamp = 5; - string transfer_complete_response_message_timestamp = 6; + string commit_final_acknowledgement_receipt_response_message_timestamp = 4; + string transfer_complete_message_timestamp = 5; +} + +enum ACCEPTANCE { + ACCEPTANCE_REJECTED = 0; + ACCEPTANCE_ACCEPTED = 1; + ACCEPTANCE_CONDITIONAL = 2; } message SendStatusRequest { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts index 5ac543ca2d..54707f63d3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts @@ -8,6 +8,10 @@ import { import routesStage1 from "./stage-services/stage1-service"; import routesStage2 from "./stage-services/stage2-service"; import routesStage3 from "./stage-services/stage3-service"; +import { Stage1ServerHandler } from "./stage-handlers/server/stage1-server-handler"; +import { SATPGateway } from "../gateway-refactor"; +import { Stage2ServerHandler } from "./stage-handlers/server/stage2-server-handler"; +import { Stage3ServerHandler } from "./stage-handlers/server/stage3-server-handler"; export interface COREDispatcherOptions { logger: Logger; @@ -21,7 +25,18 @@ export class COREDispatcher { private readonly instanceId: string; private endpoints: any[] | undefined; - constructor(public readonly options: COREDispatcherOptions) { + private readonly gateway: SATPGateway; + private readonly stage1Handler: Stage1ServerHandler; + private readonly stage2Handler: Stage2ServerHandler; + private readonly stage3Handler: Stage3ServerHandler; + + constructor( + public readonly options: COREDispatcherOptions, + gateway: SATPGateway, + stage1Handler: Stage1ServerHandler, + stage2Handler: Stage2ServerHandler, + stage3Handler: Stage3ServerHandler, + ) { const fnTag = `${COREDispatcher.CLASS_NAME}#constructor()`; Checks.truthy(options, `${fnTag} arg options`); @@ -30,6 +45,11 @@ export class COREDispatcher { this.logger = LoggerProvider.getOrCreate({ level, label }); this.instanceId = options.instanceId; this.logger.info(`Instantiated ${this.className} OK`); + + this.gateway = gateway; + this.stage1Handler = stage1Handler; + this.stage2Handler = stage2Handler; + this.stage3Handler = stage3Handler; } public get className(): string { @@ -45,7 +65,11 @@ export class COREDispatcher { return this.endpoints; } - this.endpoints = [routesStage1, routesStage2, routesStage3]; + this.endpoints = [ + routesStage1(this.gateway, this.stage1Handler), + routesStage2(this.gateway, this.stage2Handler), + routesStage3(this.gateway, this.stage3Handler), + ]; return this.endpoints; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts new file mode 100644 index 0000000000..88a9db6a28 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts @@ -0,0 +1,396 @@ +import { + CredentialProfile, + LockType, + MessageType, + SignatureAlgorithm, +} from "../generated/proto/cacti/satp/v02/common/message_pb"; +import { + MessageStagesHashes, + MessageStagesSignatures, + MessageStagesTimestamps, + SessionData, + Stage1Hashes, + Stage1Signatures, + Stage1Timestamps, + Stage2Hashes, + Stage2Signatures, + Stage2Timestamps, + Stage3Hashes, + Stage3Signatures, + Stage3Timestamps, +} from "../generated/proto/cacti/satp/v02/common/session_pb"; + +export enum TimestampType { + PROCESSED = "PROCESSED", + RECEIVED = "RECEIVED", +} + +export function createSessionData( + id: string, + version: string, + digitalAssetId: string, + originatorPubkey: string, + beneficiaryPubkey: string, + senderGatewayNetworkId: string, + recipientGatewayNetworkId: string, + clientGatewayPubkey: string, + serverGatewayPubkey: string, + receiverGatewayOwnerId: string, + senderGatewayOwnerId: string, + signatureAlgorithm: SignatureAlgorithm, + lockType: LockType, + lockExpirationTime: bigint, + credentialProfile: CredentialProfile, + loggingProfile: string, + accessControlProfile: string, +): SessionData { + const sessionData = new SessionData(); + sessionData.processedTimestamps = new MessageStagesTimestamps(); + sessionData.receivedTimestamps = new MessageStagesTimestamps(); + sessionData.hashes = new MessageStagesHashes(); + sessionData.signatures = new MessageStagesSignatures(); + + sessionData.processedTimestamps.stage1 = new Stage1Timestamps(); + sessionData.processedTimestamps.stage2 = new Stage2Timestamps(); + sessionData.processedTimestamps.stage3 = new Stage3Timestamps(); + + sessionData.receivedTimestamps.stage1 = new Stage1Timestamps(); + sessionData.receivedTimestamps.stage2 = new Stage2Timestamps(); + sessionData.receivedTimestamps.stage3 = new Stage3Timestamps(); + + sessionData.hashes.stage1 = new Stage1Hashes(); + sessionData.hashes.stage2 = new Stage2Hashes(); + sessionData.hashes.stage3 = new Stage3Hashes(); + + sessionData.signatures.stage1 = new Stage1Signatures(); + sessionData.signatures.stage2 = new Stage2Signatures(); + sessionData.signatures.stage3 = new Stage3Signatures(); + + sessionData.id = id; + sessionData.version = version; + sessionData.digitalAssetId = digitalAssetId; + sessionData.originatorPubkey = originatorPubkey; + sessionData.beneficiaryPubkey = beneficiaryPubkey; + sessionData.senderGatewayNetworkId = senderGatewayNetworkId; + sessionData.recipientGatewayNetworkId = recipientGatewayNetworkId; + sessionData.clientGatewayPubkey = clientGatewayPubkey; + sessionData.serverGatewayPubkey = serverGatewayPubkey; + sessionData.receiverGatewayOwnerId = receiverGatewayOwnerId; + sessionData.senderGatewayOwnerId = senderGatewayOwnerId; + sessionData.signatureAlgorithm = signatureAlgorithm; + sessionData.lockType = lockType; + sessionData.lockExpirationTime = lockExpirationTime; + sessionData.credentialProfile = credentialProfile; + sessionData.loggingProfile = loggingProfile; + sessionData.accessControlProfile = accessControlProfile; + + return sessionData; +} +export function saveTimestamp( + session: SessionData | undefined, + stageMessage: MessageType, + type: TimestampType, + time?: string, +) { + if (session == undefined) { + throw new Error("No session data provided"); + } + + let timestamps: MessageStagesTimestamps | undefined; + + let timestamp; + + if (!time) { + timestamp = Date.now().toString(); + } else { + timestamp = time; + } + + switch (type) { + case TimestampType.PROCESSED: + timestamps = session.processedTimestamps; + break; + case TimestampType.RECEIVED: + timestamps = session.receivedTimestamps; + session.lastMessageReceivedTimestamp = timestamp; + break; + } + + if ( + timestamps == undefined || + timestamps.stage1 == undefined || + timestamps.stage2 == undefined || + timestamps.stage3 == undefined + ) { + throw new Error("Timestamps are not initialized"); + } + + switch (stageMessage) { + case MessageType.INIT_PROPOSAL: + timestamps.stage1.transferProposalRequestMessageTimestamp = timestamp; + break; + case MessageType.INIT_RECEIPT: + timestamps.stage1.transferProposalReceiptMessageTimestamp = timestamp; + break; + case MessageType.INIT_REJECT: + timestamps.stage1.transferProposalRejectMessageTimestamp = timestamp; + break; + case MessageType.TRANSFER_COMMENCE_REQUEST: + timestamps.stage1.transferCommenceRequestMessageTimestamp = timestamp; + break; + case MessageType.TRANSFER_COMMENCE_RESPONSE: + timestamps.stage1.transferCommenceResponseMessageTimestamp = timestamp; + break; + case MessageType.LOCK_ASSERT: + timestamps.stage2.lockAssertionRequestMessageTimestamp = timestamp; + break; + case MessageType.ASSERTION_RECEIPT: + timestamps.stage2.lockAssertionReceiptMessageTimestamp = timestamp; + break; + case MessageType.COMMIT_PREPARE: + timestamps.stage3.commitPreparationRequestMessageTimestamp = timestamp; + break; + case MessageType.COMMIT_READY: + timestamps.stage3.commitReadyResponseMessageTimestamp = timestamp; + break; + case MessageType.COMMIT_FINAL: + timestamps.stage3.commitFinalAssertionRequestMessageTimestamp = timestamp; + break; + case MessageType.ACK_COMMIT_FINAL: + timestamps.stage3.commitFinalAcknowledgementReceiptResponseMessageTimestamp = + timestamp; + break; + case MessageType.COMMIT_TRANSFER_COMPLETE: + timestamps.stage3.transferCompleteMessageTimestamp = timestamp; + break; + } +} + +export function saveHash( + session: SessionData | undefined, + stageMessage: MessageType, + hash: string, +) { + if (session == undefined) { + throw new Error("No session data provided"); + } + + const hashes = session.hashes; + + if ( + hashes == undefined || + hashes.stage1 == undefined || + hashes.stage2 == undefined || + hashes.stage3 == undefined + ) { + throw new Error("Hashes are not initialized"); + } + + switch (stageMessage) { + case MessageType.INIT_PROPOSAL: + hashes.stage1.transferProposalRequestMessageHash = hash; + break; + case MessageType.INIT_RECEIPT: + hashes.stage1.transferProposalReceiptMessageHash = hash; + break; + case MessageType.INIT_REJECT: + hashes.stage1.transferProposalRejectMessageHash = hash; + break; + case MessageType.TRANSFER_COMMENCE_REQUEST: + hashes.stage1.transferCommenceRequestMessageHash = hash; + break; + case MessageType.TRANSFER_COMMENCE_RESPONSE: + hashes.stage1.transferCommenceResponseMessageHash = hash; + break; + case MessageType.LOCK_ASSERT: + hashes.stage2.lockAssertionRequestMessageHash = hash; + break; + case MessageType.ASSERTION_RECEIPT: + hashes.stage2.lockAssertionReceiptMessageHash = hash; + break; + case MessageType.COMMIT_PREPARE: + hashes.stage3.commitPreparationRequestMessageHash = hash; + break; + case MessageType.COMMIT_READY: + hashes.stage3.commitReadyResponseMessageHash = hash; + break; + case MessageType.COMMIT_FINAL: + hashes.stage3.commitFinalAssertionRequestMessageHash = hash; + break; + case MessageType.ACK_COMMIT_FINAL: + hashes.stage3.commitFinalAcknowledgementReceiptResponseMessageHash = hash; + break; + case MessageType.COMMIT_TRANSFER_COMPLETE: + hashes.stage3.transferCompleteMessageHash = hash; + break; + } +} + +export function saveSignature( + sessionData: SessionData | undefined, + stageMessage: MessageType, + signature: string, +) { + if (sessionData == undefined) { + throw new Error("No session data provided"); + } + + const signatures = sessionData.signatures; + + if ( + signatures == undefined || + signatures.stage1 == undefined || + signatures.stage2 == undefined || + signatures.stage3 == undefined + ) { + throw new Error("Signatures are not initialized"); + } + + switch (stageMessage) { + case MessageType.INIT_PROPOSAL: + signatures.stage1.transferProposalRequestMessageSignature = signature; + break; + case MessageType.INIT_RECEIPT: + signatures.stage1.transferProposalReceiptMessageSignature = signature; + break; + case MessageType.INIT_REJECT: + signatures.stage1.transferProposalRejectMessageSignature = signature; + break; + case MessageType.TRANSFER_COMMENCE_REQUEST: + signatures.stage1.transferCommenceRequestMessageSignature = signature; + break; + case MessageType.TRANSFER_COMMENCE_RESPONSE: + signatures.stage1.transferCommenceResponseMessageSignature = signature; + break; + case MessageType.LOCK_ASSERT: + signatures.stage2.lockAssertionRequestMessageSignature = signature; + break; + case MessageType.ASSERTION_RECEIPT: + signatures.stage2.lockAssertionReceiptMessageSignature = signature; + break; + case MessageType.COMMIT_PREPARE: + signatures.stage3.commitPreparationRequestMessageSignature = signature; + break; + case MessageType.COMMIT_READY: + signatures.stage3.commitReadyResponseMessageSignature = signature; + break; + case MessageType.COMMIT_FINAL: + signatures.stage3.commitFinalAssertionRequestMessageSignature = signature; + break; + case MessageType.ACK_COMMIT_FINAL: + signatures.stage3.commitFinalAcknowledgementReceiptResponseMessageSignature = + signature; + break; + case MessageType.COMMIT_TRANSFER_COMPLETE: + signatures.stage3.transferCompleteMessageSignature = signature; + break; + } +} + +export function getMessageHash( + sessionData: SessionData | undefined, + messageType: MessageType, +): string { + if (sessionData == undefined) { + throw new Error("No session data provided"); + } + + if ( + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage2 == undefined || + sessionData.hashes.stage3 == undefined + ) { + throw new Error("sessionData.hashes are not initialized"); + } + + switch (messageType) { + case MessageType.INIT_PROPOSAL: + return sessionData.hashes.stage1.transferProposalRequestMessageHash; + case MessageType.INIT_RECEIPT: + return sessionData.hashes.stage1.transferProposalReceiptMessageHash; + case MessageType.INIT_REJECT: + return sessionData.hashes.stage1.transferProposalRejectMessageHash; + case MessageType.TRANSFER_COMMENCE_REQUEST: + return sessionData.hashes.stage1.transferCommenceRequestMessageHash; + case MessageType.TRANSFER_COMMENCE_RESPONSE: + return sessionData.hashes.stage1.transferCommenceResponseMessageHash; + case MessageType.LOCK_ASSERT: + return sessionData.hashes.stage2.lockAssertionRequestMessageHash; + case MessageType.ASSERTION_RECEIPT: + return sessionData.hashes.stage2.lockAssertionReceiptMessageHash; + case MessageType.COMMIT_PREPARE: + return sessionData.hashes.stage3.commitPreparationRequestMessageHash; + case MessageType.COMMIT_READY: + return sessionData.hashes.stage3.commitReadyResponseMessageHash; + case MessageType.COMMIT_FINAL: + return sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash; + case MessageType.ACK_COMMIT_FINAL: + return sessionData.hashes.stage3 + .commitFinalAcknowledgementReceiptResponseMessageHash; + case MessageType.COMMIT_TRANSFER_COMPLETE: + return sessionData.hashes.stage3.transferCompleteMessageHash; + default: + throw new Error("Message type not found"); + } +} + +export function getMessageTimestamp( + sessionData: SessionData | undefined, + stageMessage: MessageType, + type: TimestampType, +): string { + if (sessionData == undefined) { + throw new Error("No session data provided"); + } + + let timestamps: MessageStagesTimestamps | undefined; + + switch (type) { + case TimestampType.PROCESSED: + timestamps = sessionData.processedTimestamps; + break; + case TimestampType.RECEIVED: + timestamps = sessionData.receivedTimestamps; + break; + } + + if ( + timestamps == undefined || + timestamps.stage1 == undefined || + timestamps.stage2 == undefined || + timestamps.stage3 == undefined + ) { + throw new Error("Timestamps are not initialized"); + } + + switch (stageMessage) { + case MessageType.INIT_PROPOSAL: + return timestamps.stage1.transferProposalRequestMessageTimestamp; + case MessageType.INIT_RECEIPT: + return timestamps.stage1.transferProposalReceiptMessageTimestamp; + case MessageType.INIT_REJECT: + return timestamps.stage1.transferProposalRejectMessageTimestamp; + case MessageType.TRANSFER_COMMENCE_REQUEST: + return timestamps.stage1.transferCommenceRequestMessageTimestamp; + case MessageType.TRANSFER_COMMENCE_RESPONSE: + return timestamps.stage1.transferCommenceResponseMessageTimestamp; + case MessageType.LOCK_ASSERT: + return timestamps.stage2.lockAssertionRequestMessageTimestamp; + case MessageType.ASSERTION_RECEIPT: + return timestamps.stage2.lockAssertionReceiptMessageTimestamp; + case MessageType.COMMIT_PREPARE: + return timestamps.stage3.commitPreparationRequestMessageTimestamp; + case MessageType.COMMIT_READY: + return timestamps.stage3.commitReadyResponseMessageTimestamp; + case MessageType.COMMIT_FINAL: + return timestamps.stage3.commitFinalAssertionRequestMessageTimestamp; + case MessageType.ACK_COMMIT_FINAL: + return timestamps.stage3 + .commitFinalAcknowledgementReceiptResponseMessageTimestamp; + case MessageType.COMMIT_TRANSFER_COMPLETE: + return timestamps.stage3.transferCompleteMessageTimestamp; + default: + throw new Error("Message hash not found"); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts index 9ebb36417e..57bbb7cf3d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts @@ -1,6 +1,4 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SHA256 } from "crypto-js"; - import { SATPGateway } from "../../../gateway-refactor"; import { TransferCommenceRequestMessage, @@ -13,20 +11,15 @@ import { TransferClaims, NetworkCapabilities, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { - MessageStagesHashes, - MessageStagesSignatures, - SessionData, - Stage1Hashes, - Stage1Signatures, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { SATP_VERSION } from "../../constants"; import { bufArray2HexStr, + getHash, sign, storeLog, verifySignature, } from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; export class Stage1ClientHandler { public static readonly CLASS_NAME = "Stage1Handler-Client"; @@ -55,6 +48,7 @@ export class Stage1ClientHandler { const sessionData = gateway.getSession(sessionID); if ( + //todo maybe remove this? sessionData == undefined || sessionData.version == undefined || sessionData.id == undefined || @@ -140,6 +134,8 @@ export class Stage1ClientHandler { transferInitClaims.receiverGatewayOwnerId = sessionData.receiverGatewayOwnerId; + sessionData.hashTransferInitClaims = getHash(transferInitClaims); + const networkCapabilities = new NetworkCapabilities(); networkCapabilities.senderGatewayNetworkId = sessionData.senderGatewayNetworkId; @@ -172,17 +168,13 @@ export class Stage1ClientHandler { transferProposalRequestMessage.common.signature = messageSignature; - sessionData.signatures = new MessageStagesSignatures(); - sessionData.signatures.stage1 = new Stage1Signatures(); - sessionData.signatures.stage1.transferCommenceRequestMessageClientSignature = - messageSignature; - - sessionData.hashes = new MessageStagesHashes(); - sessionData.hashes.stage1 = new Stage1Hashes(); + saveSignature(sessionData, MessageType.INIT_PROPOSAL, messageSignature); - sessionData.hashes.stage1.transferCommenceRequestMessageHash = SHA256( - JSON.stringify(transferProposalRequestMessage), - ).toString(); + saveHash( + sessionData, + MessageType.INIT_PROPOSAL, + getHash(transferProposalRequestMessage), + ); await storeLog(gateway, { sessionID: sessionID, @@ -206,14 +198,9 @@ export class Stage1ClientHandler { throw new Error("Response or response.common is undefined"); } - //const sessionData = gateway.sessions.get(response.common.sessionId); - const sessionData = new SessionData(); //todo change + const sessionData = gateway.getSession(response.common.sessionId); - if ( - sessionData == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined - ) { + if (sessionData == undefined) { throw new Error("Session data not loaded successfully"); } @@ -221,17 +208,24 @@ export class Stage1ClientHandler { commonBody.version = sessionData.version; commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage1.transferProposalReceiptMessageHash; //todo + + //todo check when reject + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_RECEIPT, + ); commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; commonBody.sessionId = sessionData.id; + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + const transferCommenceRequestMessage = new TransferCommenceRequestMessage(); transferCommenceRequestMessage.common = commonBody; transferCommenceRequestMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; + // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; const messageSignature = bufArray2HexStr( @@ -243,7 +237,17 @@ export class Stage1ClientHandler { transferCommenceRequestMessage.common.signature = messageSignature; - sessionData.lastSequenceNumber = commonBody.sequenceNumber; + saveSignature( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + getHash(transferCommenceRequestMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -257,10 +261,11 @@ export class Stage1ClientHandler { return transferCommenceRequestMessage; } + //If is a reject message and there is no transferCounterClaims, then the there is no following up messages async checkTransferProposalReceiptRejectMessage( response: TransferProposalReceiptRejectMessage, gateway: SATPGateway, - ): Promise { + ): Promise { const fnTag = `${this.className}#checkTransferProposalReceiptRejectMessage()`; if (response.common == undefined) { @@ -288,13 +293,7 @@ export class Stage1ClientHandler { if ( sessionData.serverGatewayPubkey == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferProposalRequestMessageHash == - undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined + sessionData.lastSequenceNumber == undefined ) { throw new Error(`${fnTag}, session data was not loaded correctly`); } @@ -324,16 +323,7 @@ export class Stage1ClientHandler { if ( response.common.hashPreviousMessage == undefined || response.common.hashPreviousMessage != - sessionData.hashes.stage1.transferProposalRequestMessageHash - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt Message previous message hash is wrong`, - ); - } - - if ( - response.common.hashPreviousMessage != - sessionData.hashes.stage1.transferProposalRequestMessageHash + getMessageHash(sessionData, MessageType.INIT_PROPOSAL) ) { throw new Error( `${fnTag}, TransferProposalReceipt previous message hash does not match the one that was sent`, @@ -369,5 +359,13 @@ export class Stage1ClientHandler { } this.log.info(`TransferProposalReceipt passed all checks.`); + + if ( + response.common.messageType == MessageType.INIT_REJECT && + response.transferCounterClaims == undefined + ) { + return false; + } + return true; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts index 39fb6fb7e8..a766eb07a0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts @@ -7,17 +7,14 @@ import { MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -import { SHA256 } from "crypto-js"; -import { - Stage2Hashes, - Stage2Signatures, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { bufArray2HexStr, + getHash, sign, storeLog, verifySignature, } from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; export class Stage2ClientHandler { public static readonly CLASS_NAME = "Stage2Handler-Client"; @@ -53,31 +50,19 @@ export class Stage2ClientHandler { `${fnTag}, session data not found for session id ${response.common.sessionId}`, ); } - if ( - sessionData == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferCommenceRequestMessageHash == - undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - sessionData.hashes.stage1.transferCommenceResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); + saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.LOCK_ASSERT; commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage1.transferCommenceResponseMessageHash; + + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + ); + commonBody.sessionId = response.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -98,14 +83,13 @@ export class Stage2ClientHandler { lockAssertionRequestMessage.common.signature = messageSignature; - sessionData.signatures.stage2 = new Stage2Signatures(); - sessionData.signatures.stage2.lockAssertionRequestMessageClientSignature = - messageSignature; + saveSignature(sessionData, MessageType.LOCK_ASSERT, messageSignature); - sessionData.hashes.stage2 = new Stage2Hashes(); - sessionData.hashes.stage2.lockAssertionRequestMessageHash = SHA256( - JSON.stringify(lockAssertionRequestMessage), - ).toString(); + saveHash( + sessionData, + MessageType.LOCK_ASSERT, + getHash(lockAssertionRequestMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -159,10 +143,6 @@ export class Stage2ClientHandler { if ( sessionData.serverGatewayPubkey == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferProposalRequestMessageHash == - undefined || sessionData.lastSequenceNumber == undefined ) { throw new Error(`${fnTag}, session data was not load correctly`); @@ -213,7 +193,7 @@ export class Stage2ClientHandler { if ( response.common.hashPreviousMessage != - sessionData.hashes.stage1.transferCommenceResponseMessageHash //todo + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) ) { throw new Error( `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts index 58a3f9eba3..08a04a2231 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts @@ -13,18 +13,14 @@ import { CommitReadyResponseMessage, TransferCompleteRequestMessage, } from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; -import { SHA256 } from "crypto-js"; -import { - SessionData, - Stage3Hashes, - Stage3Signatures, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { bufArray2HexStr, + getHash, sign, storeLog, verifySignature, } from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; export class Stage3ClientHandler { public static readonly CLASS_NAME = "Stage3Handler-Client"; @@ -62,28 +58,16 @@ export class Stage3ClientHandler { ); } - if ( - sessionData.hashes == undefined || - sessionData.hashes.stage2 == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - sessionData.hashes.stage2.lockAssertionReceiptMessageHash = SHA256( - JSON.stringify(response), - ).toString(); + saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_PREPARE; commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage2.lockAssertionReceiptMessageHash; + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.ASSERTION_RECEIPT, + ); commonBody.sessionId = response.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -103,14 +87,13 @@ export class Stage3ClientHandler { commitPreparationRequestMessage.common.signature = messageSignature; - sessionData.signatures.stage3 = new Stage3Signatures(); - sessionData.signatures.stage3.commitPreparationRequestMessageClientSignature = - messageSignature; + saveSignature(sessionData, MessageType.COMMIT_PREPARE, messageSignature); - sessionData.hashes.stage3 = new Stage3Hashes(); - sessionData.hashes.stage3.commitPreparationRequestMessageHash = SHA256( - JSON.stringify(commitPreparationRequestMessage), - ).toString(); + saveHash( + sessionData, + MessageType.COMMIT_PREPARE, + getHash(commitPreparationRequestMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -134,8 +117,7 @@ export class Stage3ClientHandler { throw new Error(`${fnTag}, message common body is missing`); } - //const sessionData = gateway.sessions.get(response.common.sessionId); - const sessionData = new SessionData(); //todo change + const sessionData = gateway.getSession(response.common.sessionId); if (sessionData == undefined) { throw new Error( @@ -143,30 +125,18 @@ export class Stage3ClientHandler { ); } - if ( - sessionData.hashes == undefined || - sessionData.hashes.stage3 == undefined || - sessionData.signatures == undefined || - sessionData.signatures.stage3 == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - sessionData.hashes.stage3.commitReadyResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); + saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_FINAL; commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage3.commitReadyResponseMessageHash; + + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.COMMIT_READY, + ); + commonBody.sessionId = response.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -191,12 +161,13 @@ export class Stage3ClientHandler { commitFinalAssertionRequestMessage.common.signature = messageSignature; - sessionData.signatures.stage3.commitFinalAssertionRequestMessageClientSignature = - messageSignature; + saveSignature(sessionData, MessageType.COMMIT_FINAL, messageSignature); - sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash = SHA256( - JSON.stringify(commitFinalAssertionRequestMessage), - ).toString(); + saveHash( + sessionData, + MessageType.COMMIT_FINAL, + getHash(commitFinalAssertionRequestMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -220,8 +191,7 @@ export class Stage3ClientHandler { throw new Error(`${fnTag}, message common body is missing`); } - //const sessionData = gateway.sessions.get(response.common.sessionId); - const sessionData = new SessionData(); //todo change + const sessionData = gateway.getSession(response.common.sessionId); if (sessionData == undefined) { throw new Error( @@ -229,30 +199,18 @@ export class Stage3ClientHandler { ); } - if ( - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage3 == undefined || - sessionData.signatures == undefined || - sessionData.signatures.stage3 == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - sessionData.hashes.stage3.commitFinalAcknowledgementReceiptResponseMessageHash = - SHA256(JSON.stringify(response)).toString(); + saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage3.commitFinalAcknowledgementReceiptResponseMessageHash; + + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.ACK_COMMIT_FINAL, + ); + commonBody.sessionId = response.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -261,8 +219,11 @@ export class Stage3ClientHandler { const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); transferCompleteRequestMessage.common = commonBody; - transferCompleteRequestMessage.hashTransferCommence = - sessionData.hashes.stage1.transferCommenceRequestMessageHash; + + transferCompleteRequestMessage.hashTransferCommence = getMessageHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + ); const messageSignature = bufArray2HexStr( sign( @@ -273,12 +234,17 @@ export class Stage3ClientHandler { transferCompleteRequestMessage.common.signature = messageSignature; - sessionData.signatures.stage3.transferCompleteRequestMessageClientSignature = - messageSignature; + saveSignature( + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, + messageSignature, + ); - sessionData.hashes.stage3.transferCompleteRequestMessageHash = SHA256( - JSON.stringify(transferCompleteRequestMessage), - ).toString(); + saveHash( + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, + getHash(transferCompleteRequestMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -319,12 +285,8 @@ export class Stage3ClientHandler { } if ( - sessionData.hashes == undefined || - sessionData.hashes.stage2 == undefined || - sessionData.hashes.stage2.lockAssertionRequestMessageHash == undefined || sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined + sessionData.version == undefined ) { throw new Error( `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, @@ -339,8 +301,8 @@ export class Stage3ClientHandler { } if ( - sessionData.hashes.stage2.lockAssertionRequestMessageHash != - response.common.hashPreviousMessage + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.LOCK_ASSERT) ) { throw new Error(`${fnTag}, hashPreviousMessage does not match`); } @@ -397,13 +359,8 @@ export class Stage3ClientHandler { } if ( - sessionData.hashes == undefined || - sessionData.hashes.stage3 == undefined || - sessionData.hashes.stage3.commitPreparationRequestMessageHash == - undefined || sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined + sessionData.version == undefined ) { throw new Error( `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, @@ -418,8 +375,8 @@ export class Stage3ClientHandler { } if ( - sessionData.hashes.stage3.commitPreparationRequestMessageHash != - response.common.hashPreviousMessage + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.COMMIT_PREPARE) ) { throw new Error(`${fnTag}, hashPreviousMessage does not match`); } @@ -481,13 +438,8 @@ export class Stage3ClientHandler { } if ( - sessionData.hashes == undefined || - sessionData.hashes.stage3 == undefined || - sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash == - undefined || sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined + sessionData.version == undefined ) { throw new Error( `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, @@ -502,8 +454,8 @@ export class Stage3ClientHandler { } if ( - sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash != - response.common.hashPreviousMessage + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.COMMIT_FINAL) ) { throw new Error(`${fnTag}, hashPreviousMessage does not match`); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts index fb6e478062..d3b5f842d1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts @@ -1,5 +1,4 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SHA256 } from "crypto-js"; import { SATPGateway } from "../../../gateway-refactor"; import { @@ -13,34 +12,39 @@ import { CommonSatp, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { - MessageStagesHashes, - MessageStagesSignatures, - MessageStagesTimestamps, + ACCEPTANCE, SessionData, - Stage1Hashes, - Stage1Signatures, - Stage1Timestamps, } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { SATP_VERSION } from "../../constants"; import { bufArray2HexStr, + getHash, sign, storeLog, verifySignature, } from "../../../gateway-utils"; - -export class Stage1Handler { +import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { + TimestampType, + createSessionData, + getMessageHash, + getMessageTimestamp, + saveHash, + saveSignature, +} from "../../session-utils"; + +export class Stage1ServerHandler { public static readonly CLASS_NAME = "Stage1Handler-Server"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage1Handler.CLASS_NAME; + const label = Stage1ServerHandler.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage1Handler.CLASS_NAME; + return Stage1ServerHandler.CLASS_NAME; } public get log(): Logger { @@ -49,12 +53,11 @@ export class Stage1Handler { async transferProposalResponse( request: TransferProposalRequestMessage, + reject: boolean, gateway: SATPGateway, ): Promise { const fnTag = `${this.className}#transferProposalResponse()`; - const recvTimestamp: string = Date.now().toString(); - if ( request.common == undefined || request.transferInitClaims == undefined || @@ -65,93 +68,66 @@ export class Stage1Handler { ); } - const sessionData = new SessionData(); - sessionData.id = request.common.sessionId; - sessionData.version = request.common.version; - sessionData.digitalAssetId = request.transferInitClaims.digitalAssetId; - //sessionData.assetProfile = request.common.payloadProfile.assetProfile; - // sessionData.applicationProfile = request.networkCapabilities.applicationProfile; - sessionData.originatorPubkey = request.common.clientGatewayPubkey; - sessionData.beneficiaryPubkey = request.common.serverGatewayPubkey; - sessionData.senderGatewayNetworkId = - request.transferInitClaims.senderGatewayNetworkId; - sessionData.recipientGatewayNetworkId = - request.transferInitClaims.recipientGatewayNetworkId; - sessionData.clientGatewayPubkey = request.common.clientGatewayPubkey; - sessionData.serverGatewayPubkey = request.common.serverGatewayPubkey; - sessionData.receiverGatewayOwnerId = - request.transferInitClaims.receiverGatewayOwnerId; - sessionData.senderGatewayOwnerId = - request.transferInitClaims.senderGatewayOwnerId; - sessionData.signatureAlgorithm = - request.networkCapabilities.signatureAlgorithm; - sessionData.lockType = request.networkCapabilities.lockType; - sessionData.lockExpirationTime = - request.networkCapabilities.lockExpirationTime; - sessionData.credentialProfile = - request.networkCapabilities.credentialProfile; - sessionData.loggingProfile = request.networkCapabilities.loggingProfile; - sessionData.accessControlProfile = - request.networkCapabilities.accessControlProfile; - - // sessionData.maxRetries = request.transferInitClaims.maxRetries; - // sessionData.maxTimeout = request.transferInitClaims.maxTimeout; - - sessionData.signatures = new MessageStagesSignatures(); - sessionData.signatures.stage1 = new Stage1Signatures(); - sessionData.signatures.stage1.transferCommenceRequestMessageClientSignature = - request.common.signature; - - sessionData.lastMessageReceivedTimestamp = recvTimestamp; + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + saveSignature( + sessionData, + MessageType.INIT_PROPOSAL, + request.common.signature, + ); sessionData.sourceLedgerAssetId = request.transferInitClaims.verifiedOriginatorEntityId; sessionData.recipientLedgerAssetId = request.transferInitClaims.verifiedBeneficiaryEntityId; // todo shouldn't be the server to create this id? - sessionData.hashTransferInitClaims = SHA256( - JSON.stringify(request.transferInitClaims), - ).toString(); - - sessionData.hashes = new MessageStagesHashes(); - sessionData.hashes.stage1 = new Stage1Hashes(); + sessionData.hashTransferInitClaims = getHash(request.transferInitClaims); - sessionData.hashes.stage1.transferCommenceRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); + saveHash(sessionData, MessageType.INIT_PROPOSAL, getHash(request)); sessionData.lastSequenceNumber = request.common.sequenceNumber + BigInt(1); - sessionData.processedTimestamps = new MessageStagesTimestamps(); - sessionData.processedTimestamps.stage1 = new Stage1Timestamps(); - - sessionData.receivedTimestamps = new MessageStagesTimestamps(); - sessionData.receivedTimestamps.stage1 = new Stage1Timestamps(); - - sessionData.receivedTimestamps.stage1.transferCommenceRequestMessageTimestamp = - recvTimestamp; - - gateway.addSession(request.common.sessionId, sessionData); - const commonBody = new CommonSatp(); commonBody.version = sessionData.version; - commonBody.messageType = MessageType.INIT_RECEIPT; + commonBody.sessionId = sessionData.id; commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); commonBody.resourceUrl = request.common.resourceUrl; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - commonBody.hashPreviousMessage = sessionData.hashTransferInitClaims; + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_PROPOSAL, + ); + + if (reject) { + commonBody.messageType = MessageType.INIT_REJECT; + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_CONDITIONAL; + + //todo check if there are transferClaims possible if not just not send + } else { + commonBody.messageType = MessageType.INIT_RECEIPT; + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; + } //todo if rejection const transferProposalReceiptMessage = new TransferProposalReceiptRejectMessage(); transferProposalReceiptMessage.common = commonBody; - - sessionData.processedTimestamps.stage1.transferCommenceRequestMessageTimestamp = - Date.now().toString(); - transferProposalReceiptMessage.timestamp = - sessionData.processedTimestamps.stage1.transferCommenceRequestMessageTimestamp; + transferProposalReceiptMessage.hashTransferInitClaims = + sessionData.hashTransferInitClaims; + transferProposalReceiptMessage.timestamp = getMessageTimestamp( + sessionData, + MessageType.INIT_PROPOSAL, + TimestampType.RECEIVED, + ); const messageSignature = bufArray2HexStr( sign( @@ -162,11 +138,13 @@ export class Stage1Handler { transferProposalReceiptMessage.common.signature = messageSignature; - sessionData.signatures.stage1.transferProposalReceiptMessageServerSignature = - messageSignature; - sessionData.hashes.stage1.transferProposalReceiptMessageHash = SHA256( - JSON.stringify(transferProposalReceiptMessage), - ).toString(); + saveSignature(sessionData, commonBody.messageType, messageSignature); + + saveHash( + sessionData, + commonBody.messageType, + getHash(transferProposalReceiptMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -186,8 +164,6 @@ export class Stage1Handler { ): Promise { const fnTag = `${this.className}#transferCommenceResponse()`; - const recvTimestamp: string = Date.now().toString(); - if (request.common == undefined) { throw new Error( `${fnTag}, message satp common body is missing or is missing required fields`, @@ -196,29 +172,26 @@ export class Stage1Handler { const sessionData = gateway.getSession(request.common.sessionId); - if ( - sessionData == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined - ) { + if (sessionData == undefined) { throw new Error( `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, ); } - sessionData.hashes.stage1.transferCommenceRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.lastMessageReceivedTimestamp = recvTimestamp; - this.log.info(`TransferCommenceRequest passed all checks.`); + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + getHash(request), + ); const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.TRANSFER_COMMENCE_RESPONSE; commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage1.transferCommenceRequestMessageHash; //todo + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + ); commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -229,13 +202,28 @@ export class Stage1Handler { transferCommenceResponseMessage.common = commonBody; sessionData.lastSequenceNumber = commonBody.sequenceNumber; - //sessionData.processedTimestamps.stage1.transferCommenceRequestMessageTimestamp = Date.now().toString(); - sessionData.hashes.stage1.transferCommenceResponseMessageHash = SHA256( - JSON.stringify(transferCommenceResponseMessage), - ).toString(); + const messageSignature = bufArray2HexStr( + sign( + gateway.gatewaySigner, + JSON.stringify(transferCommenceResponseMessage), + ), + ); + + transferCommenceResponseMessage.common.signature = messageSignature; + + saveSignature( + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + getHash(transferCommenceResponseMessage), + ); - //todo sign await storeLog(gateway, { sessionID: sessionData.id, type: "transferCommenceResponse", @@ -248,10 +236,10 @@ export class Stage1Handler { return transferCommenceResponseMessage; } - checkTransferProposalRequestMessage( + async checkTransferProposalRequestMessage( request: TransferProposalRequestMessage, gateway: SATPGateway, - ): void { + ): Promise<[SessionData, boolean]> { const fnTag = `${this.className}#checkTransferProposalRequestMessage()`; if ( @@ -278,8 +266,6 @@ export class Stage1Handler { throw new Error(`${fnTag}, unsupported SATP version`); } - //todo there is not a session data already here? - if ( !verifySignature( gateway.gatewaySigner, @@ -321,16 +307,40 @@ export class Stage1Handler { } this.log.info(`TransferProposalRequest passed all checks.`); + + const sessionData = createSessionData( + request.common.sessionId, + request.common.version, + request.transferInitClaims.digitalAssetId, + request.transferInitClaims.senderGatewayNetworkId, + request.transferInitClaims.recipientGatewayNetworkId, + request.transferInitClaims.originatorPubkey, + request.transferInitClaims.beneficiaryPubkey, + request.transferInitClaims.senderGatewayOwnerId, + request.transferInitClaims.receiverGatewayOwnerId, + request.transferInitClaims.clientGatewayPubkey, + request.transferInitClaims.serverGatewayPubkey, + request.networkCapabilities.signatureAlgorithm, + request.networkCapabilities.lockType, + request.networkCapabilities.lockExpirationTime, + request.networkCapabilities.credentialProfile, + request.networkCapabilities.loggingProfile, + request.networkCapabilities.accessControlProfile, + ); + + this.log.info(`Session data created for session id ${sessionData.id}`); + + gateway.addSession(request.common.sessionId, sessionData); + + return [sessionData, this.checkTransferClaims(request.transferInitClaims)]; } async checkTransferCommenceRequestMessage( request: TransferCommenceRequestMessage, gateway: SATPGateway, - ): Promise { + ): Promise { const fnTag = `${this.className}#transferCommenceResponse()`; - //const recvTimestamp: string = Date.now().toString(); - if ( request.common == undefined || request.common.version == undefined || @@ -367,7 +377,7 @@ export class Stage1Handler { sessionData.serverGatewayPubkey == undefined || sessionData.hashes == undefined || sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferProposalRequestMessageHash == + sessionData.hashes.stage1.transferProposalReceiptMessageHash == undefined || sessionData.lastSequenceNumber == undefined ) { @@ -415,7 +425,7 @@ export class Stage1Handler { if ( request.common.hashPreviousMessage != - sessionData.hashes.stage1.transferProposalReceiptMessageHash //todo + sessionData.hashes.stage1.transferProposalReceiptMessageHash ) { throw new Error( `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, @@ -444,5 +454,12 @@ export class Stage1Handler { } this.log.info(`TransferCommenceRequest passed all checks.`); + return sessionData; + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + checkTransferClaims(transferClaims: TransferClaims): boolean { + //todo + return true; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts index 6ed8ca1360..61d8a398ee 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts @@ -9,18 +9,15 @@ import { CommonSatp, MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { - Stage2Hashes, - Stage2Signatures, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { SHA256 } from "crypto-js"; +import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { bufArray2HexStr, + getHash, sign, storeLog, verifySignature, } from "../../../gateway-utils"; - +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; export class Stage2ServerHandler { public static readonly CLASS_NAME = "Stage2Handler-Server"; private _log: Logger; @@ -56,29 +53,17 @@ export class Stage2ServerHandler { `${fnTag}, session data not found for session id ${request.common.sessionId}`, ); } - if ( - sessionData == undefined || - sessionData.hashes == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - sessionData.hashes.stage2 = new Stage2Hashes(); - sessionData.hashes.stage2.lockAssertionRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); + saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.ASSERTION_RECEIPT; commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage2.lockAssertionRequestMessageHash; + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.LOCK_ASSERT, + ); commonBody.sessionId = request.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -94,14 +79,13 @@ export class Stage2ServerHandler { lockAssertionReceiptMessage.common.signature = messageSignature; - sessionData.signatures.stage2 = new Stage2Signatures(); - sessionData.signatures.stage2.lockAssertionRequestMessageClientSignature = - messageSignature; + saveSignature(sessionData, MessageType.ASSERTION_RECEIPT, messageSignature); - sessionData.hashes.stage2 = new Stage2Hashes(); - sessionData.hashes.stage2.lockAssertionRequestMessageHash = SHA256( - JSON.stringify(lockAssertionReceiptMessage), - ).toString(); + saveHash( + sessionData, + MessageType.ASSERTION_RECEIPT, + getHash(lockAssertionReceiptMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -115,10 +99,10 @@ export class Stage2ServerHandler { return lockAssertionReceiptMessage; } - checkLockAssertionRequestMessage( + async checkLockAssertionRequestMessage( request: LockAssertionRequestMessage, gateway: SATPGateway, - ): void { + ): Promise { const fnTag = `${this.className}#checkLockAssertionRequestMessage()`; if ( @@ -155,10 +139,6 @@ export class Stage2ServerHandler { if ( sessionData.serverGatewayPubkey == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferCommenceResponseMessageHash == - undefined || sessionData.lastSequenceNumber == undefined ) { throw new Error(`${fnTag}, session data was not load correctly`); @@ -203,7 +183,7 @@ export class Stage2ServerHandler { if ( request.common.hashPreviousMessage != - sessionData.hashes.stage1.transferCommenceResponseMessageHash + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) ) { throw new Error( `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, @@ -220,5 +200,6 @@ export class Stage2ServerHandler { } this.log.info(`LockAssertionRequest passed all checks.`); + return sessionData; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts index c9cfef5a32..50ebe48b41 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts @@ -11,17 +11,15 @@ import { CommonSatp, MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { - Stage3Hashes, - Stage3Signatures, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { SHA256 } from "crypto-js"; +import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { bufArray2HexStr, + getHash, sign, storeLog, verifySignature, } from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; export class Stage3ServerHandler { public static readonly CLASS_NAME = "Stage3Handler-Server"; @@ -59,30 +57,16 @@ export class Stage3ServerHandler { ); } - if ( - sessionData == undefined || - sessionData.hashes == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - sessionData.hashes.stage3 = new Stage3Hashes(); - - sessionData.hashes.stage3.commitPreparationRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); + saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_READY; commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage3.commitPreparationRequestMessageHash; + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.COMMIT_PREPARE, + ); commonBody.sessionId = request.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -100,15 +84,13 @@ export class Stage3ServerHandler { sign(gateway.gatewaySigner, JSON.stringify(commitReadyMessage)), ); - commitReadyMessage.common.signature = messageSignature; + saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); - sessionData.signatures.stage3 = new Stage3Signatures(); - sessionData.signatures.stage3.commitReadyResponseMessageServerSignature = - messageSignature; - - sessionData.hashes.stage3.commitReadyResponseMessageHash = SHA256( - JSON.stringify(commitReadyMessage), - ).toString(); + saveHash( + sessionData, + MessageType.COMMIT_READY, + getHash(commitReadyMessage), + ); await storeLog(gateway, { sessionID: sessionData.id, @@ -140,31 +122,16 @@ export class Stage3ServerHandler { ); } - if ( - sessionData.hashes == undefined || - sessionData.hashes.stage3 == undefined || - sessionData.hashes.stage3.commitReadyResponseMessageHash == undefined || - sessionData.signatures == undefined || - sessionData.signatures.stage3 == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); + saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.ACK_COMMIT_FINAL; commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = - sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash; + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.COMMIT_FINAL, + ); commonBody.sessionId = request.common.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -187,15 +154,9 @@ export class Stage3ServerHandler { ), ); - commitFinalAcknowledgementReceiptResponseMessage.common.signature = - messageSignature; - - sessionData.signatures.stage3.commitFinalAcknowledgementReceiptResponseMessageServerSignature = - messageSignature; + saveSignature(sessionData, MessageType.ACK_COMMIT_FINAL, messageSignature); - sessionData.hashes.stage3.commitFinalAssertionRequestMessageHash = SHA256( - JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), - ).toString(); + saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); await storeLog(gateway, { sessionID: sessionData.id, @@ -211,10 +172,10 @@ export class Stage3ServerHandler { return commitFinalAcknowledgementReceiptResponseMessage; } - checkCommitPreparationRequestMessage( + async checkCommitPreparationRequestMessage( request: CommitPreparationRequestMessage, gateway: SATPGateway, - ): void { + ): Promise { const fnTag = `${this.className}#checkCommitPreparationRequestMessage()`; if (request.common == undefined) { @@ -238,10 +199,6 @@ export class Stage3ServerHandler { } if ( - sessionData == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage2 == undefined || - sessionData.hashes.stage2.lockAssertionReceiptMessageHash == undefined || sessionData.lastSequenceNumber == undefined || sessionData.version == undefined || sessionData.signatures == undefined @@ -259,7 +216,7 @@ export class Stage3ServerHandler { } if ( - sessionData.hashes.stage2.lockAssertionReceiptMessageHash != + getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != request.common.hashPreviousMessage ) { throw new Error(`${fnTag}, hashPreviousMessage does not match`); @@ -284,12 +241,14 @@ export class Stage3ServerHandler { } this.log.info(`CommitPreparationRequestMessage passed all checks.`); + + return sessionData; } - checkCommitFinalAssertionRequestMessage( + async checkCommitFinalAssertionRequestMessage( request: CommitFinalAssertionRequestMessage, gateway: SATPGateway, - ): void { + ): Promise { const fnTag = `${this.className}#checkCommitFinalAssertionRequestMessage()`; if (request.common == undefined) { @@ -313,9 +272,6 @@ export class Stage3ServerHandler { } if ( - sessionData.hashes == undefined || - sessionData.hashes.stage3 == undefined || - sessionData.hashes.stage3.commitReadyResponseMessageHash == undefined || sessionData.lastSequenceNumber == undefined || sessionData.version == undefined || sessionData.signatures == undefined @@ -333,7 +289,7 @@ export class Stage3ServerHandler { } if ( - sessionData.hashes.stage3.commitReadyResponseMessageHash != + getMessageHash(sessionData, MessageType.COMMIT_READY) != request.common.hashPreviousMessage ) { throw new Error(`${fnTag}, hashPreviousMessage does not match`); @@ -361,6 +317,89 @@ export class Stage3ServerHandler { throw new Error(`${fnTag}, mintAssertionClaims is missing`); } + //todo check burn + this.log.info(`CommitFinalAssertionRequestMessage passed all checks.`); + + return sessionData; + } + + async checkTransferCompleteRequestMessage( + request: CommitFinalAssertionRequestMessage, + gateway: SATPGateway, + ): Promise { + const fnTag = `${this.className}#checkTransferCompleteRequestMessage()`; + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { + throw new Error(`${fnTag}, message type is not COMMIT_TRANSFER_COMPLETE`); + } + + this.log.info( + `${fnTag}, TransferCompleteRequestMessage passed all checks.`, + ); + + const sessionData = gateway.getSession(request.common.sessionId); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + request.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + getMessageHash(sessionData, MessageType.COMMIT_FINAL) != + request.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + gateway.gatewaySigner, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + this.log.info( + `${fnTag}, TransferCompleteRequestMessage passed all checks.`, + ); + + return sessionData; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts index 516e2dcba4..0fbad17eb5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts @@ -3,31 +3,94 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; import { TransferCommenceRequestMessage, - TransferCommenceResponseMessage, - TransferProposalReceiptRejectMessage, TransferProposalRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { SATPGateway } from "../../gateway-refactor"; +import { Stage1ServerHandler } from "../stage-handlers/server/stage1-server-handler"; +import { TimestampType, saveTimestamp } from "../session-utils"; +import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; -export default (router: ConnectRouter) => - router.service(SatpStage1Service, { - async transferProposal( - req: TransferProposalRequestMessage, - context: HandlerContext, - ) { - console.log("Received request", req, context); - - //todo - - return new TransferProposalReceiptRejectMessage({}); - }, - async transferCommence( - req: TransferCommenceRequestMessage, - context: HandlerContext, - ) { - console.log("Received request", req, context); - - //todo - - return new TransferCommenceResponseMessage({}); - }, - }); +export default (gateway: SATPGateway, handler: Stage1ServerHandler) => + (router: ConnectRouter) => + router.service(SatpStage1Service, { + async transferProposal( + req: TransferProposalRequestMessage, + context: HandlerContext, + ) { + console.log("Received TransferProposalRequest", req, context); + const recvTimestamp: string = Date.now().toString(); + + const [sessionData, reject] = + await handler.checkTransferProposalRequestMessage(req, gateway); + + saveTimestamp( + sessionData, + MessageType.INIT_PROPOSAL, + TimestampType.RECEIVED, + recvTimestamp, + ); + + const message = await handler.transferProposalResponse( + req, + reject, + gateway, + ); + + if (!message) { + throw new Error("No message returned from transferProposalResponse"); + } + + if (reject) { + saveTimestamp( + sessionData, + MessageType.INIT_REJECT, + TimestampType.PROCESSED, + ); + } else { + saveTimestamp( + sessionData, + MessageType.INIT_RECEIPT, + TimestampType.PROCESSED, + ); + } + + console.log("Returning response", message); + + return message; + }, + async transferCommence( + req: TransferCommenceRequestMessage, + context: HandlerContext, + ) { + console.log("Received TransferCommenceRequest", req, context); + const recvTimestamp: string = Date.now().toString(); + + const sessionData = await handler.checkTransferCommenceRequestMessage( + req, + gateway, + ); + + saveTimestamp( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + TimestampType.RECEIVED, + recvTimestamp, + ); + + const message = await handler.transferCommenceResponse(req, gateway); + + if (!message) { + throw new Error("No message returned from transferProposalResponse"); + } + + saveTimestamp( + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + TimestampType.PROCESSED, + ); + + console.log("Returning response", message); + + return message; + }, + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts index 33983eabce..87d90758c4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts @@ -1,20 +1,47 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; -import { - LockAssertionReceiptMessage, - LockAssertionRequestMessage, -} from "../../generated/proto/cacti/satp/v02/stage_2_pb"; - -export default (router: ConnectRouter) => - router.service(SatpStage2Service, { - async lockAssertion( - req: LockAssertionRequestMessage, - context: HandlerContext, - ) { - console.log("Received request", req, context); - - //todo - - return new LockAssertionReceiptMessage({}); - }, - }); +import { LockAssertionRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { SATPGateway } from "../../gateway-refactor"; +import { Stage2ServerHandler } from "../stage-handlers/server/stage2-server-handler"; +import { TimestampType, saveTimestamp } from "../session-utils"; +import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; + +export default (gateway: SATPGateway, handler: Stage2ServerHandler) => + (router: ConnectRouter) => + router.service(SatpStage2Service, { + async lockAssertion( + req: LockAssertionRequestMessage, + context: HandlerContext, + ) { + console.log("Received LockAssertionRequest", req, context); + const recvTimestamp: string = Date.now().toString(); + + const sessionData = await handler.checkLockAssertionRequestMessage( + req, + gateway, + ); + + saveTimestamp( + sessionData, + MessageType.LOCK_ASSERT, + TimestampType.RECEIVED, + recvTimestamp, + ); + + const message = await handler.lockAssertionResponse(req, gateway); + + if (!message) { + throw new Error("No message returned from lockAssertionResponse"); + } + + saveTimestamp( + sessionData, + MessageType.ASSERTION_RECEIPT, + TimestampType.PROCESSED, + ); + + console.log("Returning response", message); + + return message; + }, + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts index 2639f01f0f..f8ff856ee9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts @@ -1,44 +1,108 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; import { - CommitFinalAcknowledgementReceiptResponseMessage, CommitFinalAssertionRequestMessage, CommitPreparationRequestMessage, - CommitReadyResponseMessage, TransferCompleteRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_3_pb"; import { Empty } from "@bufbuild/protobuf"; +import { Stage3ServerHandler } from "../stage-handlers/server/stage3-server-handler"; +import { SATPGateway } from "../../gateway-refactor"; +import { TimestampType, saveTimestamp } from "../session-utils"; +import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; -export default (router: ConnectRouter) => - router.service(SatpStage3Service, { - async commitPreparation( - req: CommitPreparationRequestMessage, - context: HandlerContext, - ) { - console.log("Received request", req, context); - - //todo - - return new CommitReadyResponseMessage({}); - }, - async commitFinalAssertion( - req: CommitFinalAssertionRequestMessage, - context: HandlerContext, - ) { - console.log("Received request", req, context); - - //todo - - return new CommitFinalAcknowledgementReceiptResponseMessage({}); - }, - async transferComplete( - req: TransferCompleteRequestMessage, - context: HandlerContext, - ) { - console.log("Received request", req, context); - - //todo - - return new Empty({}); - }, - }); +export default (gateway: SATPGateway, handler: Stage3ServerHandler) => + (router: ConnectRouter) => + router.service(SatpStage3Service, { + async commitPreparation( + req: CommitPreparationRequestMessage, + context: HandlerContext, + ) { + console.log("Received CommitPreparationRequest", req, context); + const recvTimestamp: string = Date.now().toString(); + + const sessionData = await handler.checkCommitPreparationRequestMessage( + req, + gateway, + ); + + saveTimestamp( + sessionData, + MessageType.COMMIT_PREPARE, + TimestampType.RECEIVED, + recvTimestamp, + ); + + const message = await handler.commitReady(req, gateway); + + if (!message) { + throw new Error("No message returned from commitPreparation"); + } + + saveTimestamp( + sessionData, + MessageType.COMMIT_READY, + TimestampType.PROCESSED, + ); + + console.log("Returning response", message); + + return message; + }, + async commitFinalAssertion( + req: CommitFinalAssertionRequestMessage, + context: HandlerContext, + ) { + console.log("Received CommitFinalAssertionRequest", req, context); + const recvTimestamp: string = Date.now().toString(); + + const sessionData = + await handler.checkCommitFinalAssertionRequestMessage(req, gateway); + + saveTimestamp( + sessionData, + MessageType.COMMIT_FINAL, + TimestampType.RECEIVED, + recvTimestamp, + ); + + const message = await handler.commitFinalAcknowledgementReceiptResponse( + req, + gateway, + ); + + if (!message) { + throw new Error("No message returned from commitFinalAssertion"); + } + + saveTimestamp( + sessionData, + MessageType.ACK_COMMIT_FINAL, + TimestampType.PROCESSED, + ); + + return message; + }, + async transferComplete( + req: TransferCompleteRequestMessage, + context: HandlerContext, + ) { + console.log("Received TransferCompleteRequest", req, context); + const recvTimestamp: string = Date.now().toString(); + + const sessionData = await handler.checkTransferCompleteRequestMessage( + req, + gateway, + ); + + saveTimestamp( + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, + TimestampType.RECEIVED, + recvTimestamp, + ); + + console.log("Returning empty response"); + return new Empty({}); + }, + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index 22ee13a58f..a76d98392b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -102,3 +102,7 @@ export function getSatpLogKey( ): string { return `${sessionID}-${type}-${operation}`; } + +export function getHash(object: unknown) { + return SHA256(JSON.stringify(object)).toString(); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES index a80cd4f07b..16b445eee6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES @@ -1,5 +1,6 @@ .gitignore .npmignore +.openapi-generator-ignore api.ts base.ts common.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 7d1077b54d..4f3d744d7c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -7,6 +7,32 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, LockAssertionClaim, LockAssertionFormat, LockType, MintAssertionClaims, MintAssertionClaimsFormat, PayloadProfile, Permissions, SignatureAlgorithm } from "./message_pb.js"; +/** + * @generated from enum cacti.satp.v02.common.ACCEPTANCE + */ +export enum ACCEPTANCE { + /** + * @generated from enum value: ACCEPTANCE_REJECTED = 0; + */ + ACCEPTANCE_REJECTED = 0, + + /** + * @generated from enum value: ACCEPTANCE_ACCEPTED = 1; + */ + ACCEPTANCE_ACCEPTED = 1, + + /** + * @generated from enum value: ACCEPTANCE_CONDITIONAL = 2; + */ + ACCEPTANCE_CONDITIONAL = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(ACCEPTANCE) +proto3.util.setEnumType(ACCEPTANCE, "cacti.satp.v02.common.ACCEPTANCE", [ + { no: 0, name: "ACCEPTANCE_REJECTED" }, + { no: 1, name: "ACCEPTANCE_ACCEPTED" }, + { no: 2, name: "ACCEPTANCE_CONDITIONAL" }, +]); + /** * @generated from message cacti.satp.v02.common.SessionData */ @@ -261,6 +287,21 @@ export class SessionData extends Message { */ assignmentAssertionClaimFormat?: AssignmentAssertionClaimFormat; + /** + * @generated from field: bool completed = 51; + */ + completed = false; + + /** + * @generated from field: cacti.satp.v02.common.ACCEPTANCE acceptance = 52; + */ + acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; + + /** + * @generated from field: string last_message_hash = 53; + */ + lastMessageHash = ""; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -319,6 +360,9 @@ export class SessionData extends Message { { no: 48, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, { no: 49, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, { no: 50, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, + { no: 51, name: "completed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 52, name: "acceptance", kind: "enum", T: proto3.getEnumType(ACCEPTANCE) }, + { no: 53, name: "last_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { @@ -516,14 +560,9 @@ export class Stage3Hashes extends Message { commitFinalAcknowledgementReceiptResponseMessageHash = ""; /** - * @generated from field: string transfer_complete_request_message_hash = 5; + * @generated from field: string transfer_complete_message_hash = 5; */ - transferCompleteRequestMessageHash = ""; - - /** - * @generated from field: string transfer_complete_response_message_hash = 6; - */ - transferCompleteResponseMessageHash = ""; + transferCompleteMessageHash = ""; constructor(data?: PartialMessage) { super(); @@ -537,8 +576,7 @@ export class Stage3Hashes extends Message { { no: 2, name: "commit_ready_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "commit_final_assertion_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "commit_final_acknowledgement_receipt_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "transfer_complete_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "transfer_complete_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Hashes { @@ -612,29 +650,29 @@ export class MessageStagesSignatures extends Message { */ export class Stage1Signatures extends Message { /** - * @generated from field: string transfer_proposal_request_message_client_signature = 1; + * @generated from field: string transfer_proposal_request_message_signature = 1; */ - transferProposalRequestMessageClientSignature = ""; + transferProposalRequestMessageSignature = ""; /** - * @generated from field: string transfer_proposal_receipt_message_server_signature = 2; + * @generated from field: string transfer_proposal_receipt_message_signature = 2; */ - transferProposalReceiptMessageServerSignature = ""; + transferProposalReceiptMessageSignature = ""; /** - * @generated from field: string transfer_proposal_reject_message_server_signature = 3; + * @generated from field: string transfer_proposal_reject_message_signature = 3; */ - transferProposalRejectMessageServerSignature = ""; + transferProposalRejectMessageSignature = ""; /** - * @generated from field: string transfer_commence_request_message_client_signature = 4; + * @generated from field: string transfer_commence_request_message_signature = 4; */ - transferCommenceRequestMessageClientSignature = ""; + transferCommenceRequestMessageSignature = ""; /** - * @generated from field: string transfer_commence_response_message_server_signature = 5; + * @generated from field: string transfer_commence_response_message_signature = 5; */ - transferCommenceResponseMessageServerSignature = ""; + transferCommenceResponseMessageSignature = ""; constructor(data?: PartialMessage) { super(); @@ -644,11 +682,11 @@ export class Stage1Signatures extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.Stage1Signatures"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transfer_proposal_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "transfer_proposal_receipt_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "transfer_proposal_reject_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "transfer_commence_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "transfer_commence_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "transfer_proposal_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "transfer_proposal_receipt_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transfer_proposal_reject_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transfer_commence_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_commence_response_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Stage1Signatures { @@ -673,14 +711,14 @@ export class Stage1Signatures extends Message { */ export class Stage2Signatures extends Message { /** - * @generated from field: string lock_assertion_request_message_client_signature = 1; + * @generated from field: string lock_assertion_request_message_signature = 1; */ - lockAssertionRequestMessageClientSignature = ""; + lockAssertionRequestMessageSignature = ""; /** - * @generated from field: string lock_assertion_receipt_message_server_signature = 2; + * @generated from field: string lock_assertion_receipt_message_signature = 2; */ - lockAssertionReceiptMessageServerSignature = ""; + lockAssertionReceiptMessageSignature = ""; constructor(data?: PartialMessage) { super(); @@ -690,8 +728,8 @@ export class Stage2Signatures extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.Stage2Signatures"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "lock_assertion_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "lock_assertion_receipt_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "lock_assertion_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "lock_assertion_receipt_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Stage2Signatures { @@ -716,34 +754,29 @@ export class Stage2Signatures extends Message { */ export class Stage3Signatures extends Message { /** - * @generated from field: string commit_preparation_request_message_client_signature = 1; - */ - commitPreparationRequestMessageClientSignature = ""; - - /** - * @generated from field: string commit_ready_response_message_server_signature = 2; + * @generated from field: string commit_preparation_request_message_signature = 1; */ - commitReadyResponseMessageServerSignature = ""; + commitPreparationRequestMessageSignature = ""; /** - * @generated from field: string commit_final_assertion_request_message_client_signature = 3; + * @generated from field: string commit_ready_response_message_signature = 2; */ - commitFinalAssertionRequestMessageClientSignature = ""; + commitReadyResponseMessageSignature = ""; /** - * @generated from field: string commit_final_acknowledgement_receipt_response_message_server_signature = 4; + * @generated from field: string commit_final_assertion_request_message_signature = 3; */ - commitFinalAcknowledgementReceiptResponseMessageServerSignature = ""; + commitFinalAssertionRequestMessageSignature = ""; /** - * @generated from field: string transfer_complete_request_message_client_signature = 5; + * @generated from field: string commit_final_acknowledgement_receipt_response_message_signature = 4; */ - transferCompleteRequestMessageClientSignature = ""; + commitFinalAcknowledgementReceiptResponseMessageSignature = ""; /** - * @generated from field: string transfer_complete_response_message_server_signature = 6; + * @generated from field: string transfer_complete_message_signature = 5; */ - transferCompleteResponseMessageServerSignature = ""; + transferCompleteMessageSignature = ""; constructor(data?: PartialMessage) { super(); @@ -753,12 +786,11 @@ export class Stage3Signatures extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.Stage3Signatures"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "commit_preparation_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "commit_ready_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "commit_final_assertion_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "commit_final_acknowledgement_receipt_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "transfer_complete_request_message_client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "transfer_complete_response_message_server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "commit_preparation_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "commit_ready_response_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "commit_final_assertion_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "commit_final_acknowledgement_receipt_response_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Signatures { @@ -951,19 +983,14 @@ export class Stage3Timestamps extends Message { commitFinalAssertionRequestMessageTimestamp = ""; /** - * @generated from field: string commit_final_acknoledgement_receipt_response_message_timestamp = 4; - */ - commitFinalAcknoledgementReceiptResponseMessageTimestamp = ""; - - /** - * @generated from field: string transfer_complete_request_message_timestamp = 5; + * @generated from field: string commit_final_acknowledgement_receipt_response_message_timestamp = 4; */ - transferCompleteRequestMessageTimestamp = ""; + commitFinalAcknowledgementReceiptResponseMessageTimestamp = ""; /** - * @generated from field: string transfer_complete_response_message_timestamp = 6; + * @generated from field: string transfer_complete_message_timestamp = 5; */ - transferCompleteResponseMessageTimestamp = ""; + transferCompleteMessageTimestamp = ""; constructor(data?: PartialMessage) { super(); @@ -976,9 +1003,8 @@ export class Stage3Timestamps extends Message { { no: 1, name: "commit_preparation_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "commit_ready_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "commit_final_assertion_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "commit_final_acknoledgement_receipt_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "transfer_complete_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "transfer_complete_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "commit_final_acknowledgement_receipt_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transfer_complete_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Stage3Timestamps { From ae0e5ab3557411cf34a969e5a9b415c7a743ce67 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 12 Apr 2024 17:15:11 +0300 Subject: [PATCH 08/49] fixup(satp-hermes): add skeleton for satp-bridge Signed-off-by: Rafael Belchior --- .../core/stage-services/satp-bridge/satp-bridge-manager.ts | 3 +++ .../core/stage-services/satp-bridge/satp-lock.ts | 1 + .../core/stage-services/satp-bridge/satp-unlock.ts | 2 ++ .../src/main/typescript/gateway-refactor.ts | 7 ++++++- .../src/main/typescript/types/blockchain-interaction.ts | 5 +++++ .../src/main/typescript/web-services/router.ts | 3 ++- 6 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts new file mode 100644 index 0000000000..304a7bda0c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -0,0 +1,3 @@ +// this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). +// should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts new file mode 100644 index 0000000000..d47dec14f7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts @@ -0,0 +1 @@ +// TODO Implement lock interface for all SATP supported chains \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts new file mode 100644 index 0000000000..7f0f638ade --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts @@ -0,0 +1,2 @@ +// TODO Implement unlock interface for all SATP supported chains +// TODO implement other required interfaces diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts index f983574a62..eead5ec3e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -44,6 +44,8 @@ import { ILocalLogRepository, IRemoteLogRepository, } from "./repository/interfaces/repository"; +import { IPluginLedgerConnector } from "@hyperledger/cactus-core-api"; +import { SATPLedgerConnector } from "./types/blockchain-interaction"; export class SATPGateway { // todo more checks; example port from config is between 3000 and 9000 @IsDefined() @@ -75,8 +77,11 @@ export class SATPGateway { private objectSigner: JsObjectSigner; - // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) + // Instantiate connectors based on supported implementations private supportedDltIDs: SupportedGatewayImplementations[]; + private connectors: SATPLedgerConnector[] = []; + + // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) private sessions: Map = new Map(); private _pubKey: string; private _privKey: string; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts new file mode 100644 index 0000000000..dc5fe3181d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts @@ -0,0 +1,5 @@ +// TODO: define alias types for SATPLedgerConnector, which encapsulates IPluginLedgerConnector +// inject gateway, get connectors +export type SATPLedgerConnector = string; + +// TODO Define lock interfaces and strategy pattern for locking (as function of locking blockchain) (see what smart contract implementations return) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts index 6cdd48cbd7..7922d8c4e8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts @@ -10,6 +10,7 @@ import { TestImplementation2 } from "./test/test2"; */ export const configureRoutes = (router: ConnectRouter): void => { + console.log(router); // TODO: add all services and respective implementations //router.service(TestService, TestImplementation); -}; \ No newline at end of file +}; From 3411962a27da467a1bb12477bb4c3bd71e485789 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Tue, 16 Apr 2024 17:04:08 +0300 Subject: [PATCH 09/49] chore(satp-hermes): rename generated code for gateway and blo Signed-off-by: Rafael Belchior --- packages/cactus-plugin-satp-hermes/.gitignore | 12 +- .../cactus-plugin-satp-hermes/package.json | 4 +- .../src/main/go/generated/api_chains.go | 147 - .../src/main/go/generated/docs/ChainsApi.md | 70 - .../docs/GetChains200ResponseInner.md | 114 - .../docs/GetIntegrations200ResponseInner.md | 114 - .../docs/TransactRequestFromToken.md | 265 -- .../TransactRequestFromTokenExtensions.md | 82 - ...questFromTokenExtensionsBridgeInfoValue.md | 56 - .../generated/{ => gateway-client}/.gitignore | 0 .../.openapi-generator-ignore | 0 .../.openapi-generator/FILES | 3 + .../.openapi-generator/VERSION | 0 .../{ => gateway-client}/.travis.yml | 0 .../generated/{ => gateway-client}/README.md | 0 .../{ => gateway-client}/api/openapi.yaml | 0 .../{ => gateway-client}/api_admin.go | 0 .../{ => gateway-client}/api_transaction.go | 0 .../generated/{ => gateway-client}/client.go | 0 .../{ => gateway-client}/configuration.go | 0 .../{ => gateway-client}/docs/APIError.md | 0 .../{ => gateway-client}/docs/Action.md | 0 .../{ => gateway-client}/docs/AdminApi.md | 0 .../docs/AuthzJwtClaim.md | 0 .../{ => gateway-client}/docs/AuthzScope.md | 0 .../{ => gateway-client}/docs/BridgeInfo.md | 0 .../docs/Cancel200Response.md | 0 .../docs/CancelRequest.md | 0 .../docs/CancelResponse.md | 0 .../{ => gateway-client}/docs/Chain.md | 0 .../{ => gateway-client}/docs/Chains1Inner.md | 0 .../docs/Continue200Response.md | 0 .../docs/ContinueRequest.md | 0 .../docs/ContinueResponse.md | 0 .../docs/CredentialProfile.md | 0 .../{ => gateway-client}/docs/DLTProtocol.md | 0 .../{ => gateway-client}/docs/Estimate.md | 0 .../{ => gateway-client}/docs/FeeCost.md | 0 .../{ => gateway-client}/docs/GasCost.md | 0 .../docs/GetAudit200Response.md | 0 .../docs/GetAuditRequest.md | 0 .../docs/GetAuditResponse.md | 0 .../docs/GetHealthCheck200Response.md | 0 .../docs/GetRoutes200Response.md | 0 .../docs/GetRoutes200ResponseRoutesInner.md | 0 ...etRoutes200ResponseRoutesInnerFromToken.md | 0 ...0ResponseRoutesInnerFromTokenExtensions.md | 0 ...InnerFromTokenExtensionsBridgeInfoValue.md | 0 ...etRoutes200ResponseRoutesInnerInsurance.md | 0 ...tRoutes200ResponseRoutesInnerStepsInner.md | 0 ...s200ResponseRoutesInnerStepsInnerAction.md | 0 ...00ResponseRoutesInnerStepsInnerEstimate.md | 0 ...tesInnerStepsInnerEstimateFeeCostsInner.md | 0 ...tesInnerStepsInnerEstimateGasCostsInner.md | 0 ...esponseRoutesInnerStepsInnerToolDetails.md | 0 .../docs/HealthCheckResponse.md | 0 .../{ => gateway-client}/docs/IncludedStep.md | 0 .../{ => gateway-client}/docs/Insurance.md | 0 .../docs/IntegrationDetails.md | 0 .../docs/Pause200Response.md | 0 .../{ => gateway-client}/docs/PauseRequest.md | 0 .../docs/PauseResponse.md | 0 .../{ => gateway-client}/docs/Route.md | 0 .../docs/RoutesResponse.md | 0 .../docs/StatusRequest.md | 0 .../docs/StatusResponse.md | 0 .../{ => gateway-client}/docs/Token.md | 0 .../docs/Transact200Response.md | 0 .../docs/Transact200ResponseStatusResponse.md | 0 ...0ResponseStatusResponseDestinationChain.md | 0 ...act200ResponseStatusResponseOriginChain.md | 0 .../docs/TransactDefaultResponse.md | 0 .../docs/TransactRequest.md | 0 .../docs/TransactResponse.md | 0 .../docs/TransactionApi.md | 0 .../{ => gateway-client}/git_push.sh | 0 .../go/generated/{ => gateway-client}/go.mod | 0 .../go/generated/{ => gateway-client}/go.sum | 0 .../{ => gateway-client}/model_action.go | 0 .../{ => gateway-client}/model_api_error.go | 0 .../model_authz_jwt_claim.go | 0 .../{ => gateway-client}/model_authz_scope.go | 0 .../{ => gateway-client}/model_bridge_info.go | 0 .../model_cancel_200_response.go | 0 .../model_cancel_request.go | 0 .../model_cancel_response.go | 0 .../{ => gateway-client}/model_chain.go | 0 .../model_chains_1_inner.go | 0 .../model_continue_200_response.go | 0 .../model_continue_request.go | 0 .../model_continue_response.go | 0 .../model_credential_profile.go | 0 .../model_dlt_protocol.go | 0 .../{ => gateway-client}/model_estimate.go | 0 .../{ => gateway-client}/model_fee_cost.go | 0 .../{ => gateway-client}/model_gas_cost.go | 0 .../model_get_audit_200_response.go | 0 .../model_get_audit_request.go | 0 .../model_get_audit_response.go | 0 .../model_get_health_check_200_response.go | 0 .../model_get_routes_200_response.go | 0 ...el_get_routes_200_response_routes_inner.go | 0 ...es_200_response_routes_inner_from_token.go | 0 ...onse_routes_inner_from_token_extensions.go | 0 ...from_token_extensions_bridge_info_value.go | 0 ...tes_200_response_routes_inner_insurance.go | 0 ...s_200_response_routes_inner_steps_inner.go | 0 ...esponse_routes_inner_steps_inner_action.go | 0 ...ponse_routes_inner_steps_inner_estimate.go | 0 ...er_steps_inner_estimate_fee_costs_inner.go | 0 ...er_steps_inner_estimate_gas_costs_inner.go | 0 ...e_routes_inner_steps_inner_tool_details.go | 0 .../model_health_check_response.go | 0 .../model_included_step.go | 0 .../{ => gateway-client}/model_insurance.go | 0 .../model_integration_details.go | 0 .../model_pause_200_response.go | 0 .../model_pause_request.go | 0 .../model_pause_response.go | 0 .../{ => gateway-client}/model_route.go | 0 .../model_routes_response.go | 0 .../model_status_request.go | 0 .../model_status_response.go | 0 .../{ => gateway-client}/model_token.go | 0 .../model_transact_200_response.go | 0 ...l_transact_200_response_status_response.go | 0 ...ponse_status_response_destination_chain.go | 0 ...0_response_status_response_origin_chain.go | 0 .../model_transact_default_response.go | 0 .../model_transact_request.go | 0 .../model_transact_response.go | 0 .../{ => gateway-client}/response.go | 0 .../test/api_admin_test.go | 38 +- .../test/api_transaction_test.go | 14 +- .../generated/{ => gateway-client}/utils.go | 0 .../model_get_chains_200_response_inner.go | 202 -- ...del_get_integrations_200_response_inner.go | 202 -- .../model_transact_request_from_token.go | 414 --- ..._transact_request_from_token_extensions.go | 163 - ...from_token_extensions_bridge_info_value.go | 127 - .../main/go/generated/test/api_chains_test.go | 37 - .../blo/admin/get-status-handler-service.ts | 2 +- .../src/main/typescript/blo/dispatcher.ts | 4 +- .../.openapi-generator/VERSION | 0 .../typescript-axios/base.ts | 0 .../typescript-axios/common.ts | 0 .../typescript-axios/configuration.ts | 0 .../typescript-axios/index.ts | 0 .../typescript-axios/.openapi-generator/FILES | 9 - .../openapi-blo/typescript-axios/api.ts | 2678 ----------------- .../web-services/blo/status-endpoint.ts | 2 +- .../src/test/typescript/test-utils.ts | 2 +- 152 files changed, 66 insertions(+), 4695 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/.gitignore (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/.openapi-generator-ignore (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/.openapi-generator/FILES (97%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/.openapi-generator/VERSION (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/.travis.yml (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/README.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/api/openapi.yaml (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/api_admin.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/api_transaction.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/client.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/configuration.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/APIError.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Action.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/AdminApi.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/AuthzJwtClaim.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/AuthzScope.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/BridgeInfo.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Cancel200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/CancelRequest.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/CancelResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Chain.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Chains1Inner.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Continue200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/ContinueRequest.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/ContinueResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/CredentialProfile.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/DLTProtocol.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Estimate.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/FeeCost.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GasCost.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetAudit200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetAuditRequest.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetAuditResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetHealthCheck200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInner.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerFromToken.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerInsurance.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerStepsInner.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/HealthCheckResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/IncludedStep.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Insurance.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/IntegrationDetails.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Pause200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/PauseRequest.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/PauseResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Route.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/RoutesResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/StatusRequest.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/StatusResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Token.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Transact200Response.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Transact200ResponseStatusResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Transact200ResponseStatusResponseDestinationChain.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/Transact200ResponseStatusResponseOriginChain.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/TransactDefaultResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/TransactRequest.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/TransactResponse.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/docs/TransactionApi.md (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/git_push.sh (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/go.mod (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/go.sum (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_action.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_api_error.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_authz_jwt_claim.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_authz_scope.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_bridge_info.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_cancel_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_cancel_request.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_cancel_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_chain.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_chains_1_inner.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_continue_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_continue_request.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_continue_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_credential_profile.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_dlt_protocol.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_estimate.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_fee_cost.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_gas_cost.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_audit_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_audit_request.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_audit_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_health_check_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_from_token.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_from_token_extensions.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_insurance.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_steps_inner.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_steps_inner_action.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_steps_inner_estimate.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_health_check_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_included_step.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_insurance.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_integration_details.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_pause_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_pause_request.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_pause_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_route.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_routes_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_status_request.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_status_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_token.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_200_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_200_response_status_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_200_response_status_response_destination_chain.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_200_response_status_response_origin_chain.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_default_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_request.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/model_transact_response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/response.go (100%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/test/api_admin_test.go (51%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/test/api_transaction_test.go (76%) rename packages/cactus-plugin-satp-hermes/src/main/go/generated/{ => gateway-client}/utils.go (100%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go rename packages/cactus-plugin-satp-hermes/src/main/typescript/generated/{openapi-blo => gateway-client}/typescript-axios/.openapi-generator/VERSION (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/generated/{openapi-blo => gateway-client}/typescript-axios/base.ts (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/generated/{openapi-blo => gateway-client}/typescript-axios/common.ts (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/generated/{openapi-blo => gateway-client}/typescript-axios/configuration.ts (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/generated/{openapi-blo => gateway-client}/typescript-axios/index.ts (100%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index f094fb5e99..55270896e4 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -1,6 +1,6 @@ -src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore -src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore -src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore -src/main/typescript/generated/openapi-blo/typescript-axios/api.ts -src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh -src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES +src/main/typescript/generated/gateway-client/typescript-axios/.gitignore +src/main/typescript/generated/gateway-client/typescript-axios/.npmignore +src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator-ignore +src/main/typescript/generated/gateway-client/typescript-axios/api.ts +src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh +src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index f754ac9c99..da09602ef2 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -51,8 +51,8 @@ "codegen:proto": "npm run generate-proto", "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", - "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/openapi-blo/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", + "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", + "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/gateway-client/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", "generate-sdk:typescript-axios-gateway": "yarn bundle-openapi-gateway-json && openapi-generator-cli generate -i ./src/main/json/openapi-gateway-bundled.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", "lint": "run-p 'lint:*'", "lint:eslint": "eslint '*/*/src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go deleted file mode 100644 index 8fa2d004e5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_chains.go +++ /dev/null @@ -1,147 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: v0.0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -type ChainsApi interface { - - /* - GetChains Get supported chains - - Retrieves metadata about each supported blockchain network. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetChainsRequest - */ - GetChains(ctx context.Context) ApiGetChainsRequest - - // GetChainsExecute executes the request - // @return []GetChains200ResponseInner - GetChainsExecute(r ApiGetChainsRequest) ([]GetChains200ResponseInner, *http.Response, error) -} - -// ChainsApiService ChainsApi service -type ChainsApiService service - -type ApiGetChainsRequest struct { - ctx context.Context - ApiService ChainsApi -} - -func (r ApiGetChainsRequest) Execute() ([]GetChains200ResponseInner, *http.Response, error) { - return r.ApiService.GetChainsExecute(r) -} - -/* -GetChains Get supported chains - -Retrieves metadata about each supported blockchain network. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetChainsRequest -*/ -func (a *ChainsApiService) GetChains(ctx context.Context) ApiGetChainsRequest { - return ApiGetChainsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []GetChains200ResponseInner -func (a *ChainsApiService) GetChainsExecute(r ApiGetChainsRequest) ([]GetChains200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetChains200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChainsApiService.GetChains") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/chains" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md deleted file mode 100644 index 53a9881669..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ChainsApi.md +++ /dev/null @@ -1,70 +0,0 @@ -# \ChainsApi - -All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetChains**](ChainsApi.md#GetChains) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/chains | Get supported chains - - - -## GetChains - -> []GetChains200ResponseInner GetChains(ctx).Execute() - -Get supported chains - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ChainsApi.GetChains(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChainsApi.GetChains``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetChains`: []GetChains200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `ChainsApi.GetChains`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetChainsRequest struct via the builder pattern - - -### Return type - -[**[]GetChains200ResponseInner**](GetChains200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md deleted file mode 100644 index 7c96e73a17..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetChains200ResponseInner.md +++ /dev/null @@ -1,114 +0,0 @@ -# GetChains200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainId** | **string** | A unique identifier for the blockchain network. | -**ChainName** | **string** | The name of the blockchain network. | -**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | -**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | - -## Methods - -### NewGetChains200ResponseInner - -`func NewGetChains200ResponseInner(chainId string, chainName string, chainType string, networkName string, ) *GetChains200ResponseInner` - -NewGetChains200ResponseInner instantiates a new GetChains200ResponseInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetChains200ResponseInnerWithDefaults - -`func NewGetChains200ResponseInnerWithDefaults() *GetChains200ResponseInner` - -NewGetChains200ResponseInnerWithDefaults instantiates a new GetChains200ResponseInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainId - -`func (o *GetChains200ResponseInner) GetChainId() string` - -GetChainId returns the ChainId field if non-nil, zero value otherwise. - -### GetChainIdOk - -`func (o *GetChains200ResponseInner) GetChainIdOk() (*string, bool)` - -GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainId - -`func (o *GetChains200ResponseInner) SetChainId(v string)` - -SetChainId sets ChainId field to given value. - - -### GetChainName - -`func (o *GetChains200ResponseInner) GetChainName() string` - -GetChainName returns the ChainName field if non-nil, zero value otherwise. - -### GetChainNameOk - -`func (o *GetChains200ResponseInner) GetChainNameOk() (*string, bool)` - -GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainName - -`func (o *GetChains200ResponseInner) SetChainName(v string)` - -SetChainName sets ChainName field to given value. - - -### GetChainType - -`func (o *GetChains200ResponseInner) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *GetChains200ResponseInner) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *GetChains200ResponseInner) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetNetworkName - -`func (o *GetChains200ResponseInner) GetNetworkName() string` - -GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. - -### GetNetworkNameOk - -`func (o *GetChains200ResponseInner) GetNetworkNameOk() (*string, bool)` - -GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNetworkName - -`func (o *GetChains200ResponseInner) SetNetworkName(v string)` - -SetNetworkName sets NetworkName field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md deleted file mode 100644 index 585d83bcb7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetIntegrations200ResponseInner.md +++ /dev/null @@ -1,114 +0,0 @@ -# GetIntegrations200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainId** | **string** | A unique identifier for the blockchain network. | -**ChainName** | **string** | The name of the blockchain network. | -**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | -**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | - -## Methods - -### NewGetIntegrations200ResponseInner - -`func NewGetIntegrations200ResponseInner(chainId string, chainName string, chainType string, networkName string, ) *GetIntegrations200ResponseInner` - -NewGetIntegrations200ResponseInner instantiates a new GetIntegrations200ResponseInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetIntegrations200ResponseInnerWithDefaults - -`func NewGetIntegrations200ResponseInnerWithDefaults() *GetIntegrations200ResponseInner` - -NewGetIntegrations200ResponseInnerWithDefaults instantiates a new GetIntegrations200ResponseInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainId - -`func (o *GetIntegrations200ResponseInner) GetChainId() string` - -GetChainId returns the ChainId field if non-nil, zero value otherwise. - -### GetChainIdOk - -`func (o *GetIntegrations200ResponseInner) GetChainIdOk() (*string, bool)` - -GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainId - -`func (o *GetIntegrations200ResponseInner) SetChainId(v string)` - -SetChainId sets ChainId field to given value. - - -### GetChainName - -`func (o *GetIntegrations200ResponseInner) GetChainName() string` - -GetChainName returns the ChainName field if non-nil, zero value otherwise. - -### GetChainNameOk - -`func (o *GetIntegrations200ResponseInner) GetChainNameOk() (*string, bool)` - -GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainName - -`func (o *GetIntegrations200ResponseInner) SetChainName(v string)` - -SetChainName sets ChainName field to given value. - - -### GetChainType - -`func (o *GetIntegrations200ResponseInner) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *GetIntegrations200ResponseInner) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *GetIntegrations200ResponseInner) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetNetworkName - -`func (o *GetIntegrations200ResponseInner) GetNetworkName() string` - -GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. - -### GetNetworkNameOk - -`func (o *GetIntegrations200ResponseInner) GetNetworkNameOk() (*string, bool)` - -GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNetworkName - -`func (o *GetIntegrations200ResponseInner) SetNetworkName(v string)` - -SetNetworkName sets NetworkName field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md deleted file mode 100644 index 26ea988095..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromToken.md +++ /dev/null @@ -1,265 +0,0 @@ -# TransactRequestFromToken - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainID** | **string** | The network of the DLT being interacted with. TODO: implement network identification draft | -**ChainType** | **string** | Supported DLT protocols. | -**Address** | **string** | A blockchain address. | -**Name** | Pointer to **string** | The name of the token. | [optional] -**Symbol** | **string** | The symbol of the token. | -**Decimals** | **int32** | How many decimals the token supports. | -**LogoURI** | Pointer to **string** | The logo of a token, chain, dex etc. | [optional] -**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] -**PriceUSD** | Pointer to **string** | The current price of the token in USD. | [optional] -**Extensions** | Pointer to [**TransactRequestFromTokenExtensions**](TransactRequestFromTokenExtensions.md) | | [optional] - -## Methods - -### NewTransactRequestFromToken - -`func NewTransactRequestFromToken(chainID string, chainType string, address string, symbol string, decimals int32, ) *TransactRequestFromToken` - -NewTransactRequestFromToken instantiates a new TransactRequestFromToken object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactRequestFromTokenWithDefaults - -`func NewTransactRequestFromTokenWithDefaults() *TransactRequestFromToken` - -NewTransactRequestFromTokenWithDefaults instantiates a new TransactRequestFromToken object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainID - -`func (o *TransactRequestFromToken) GetChainID() string` - -GetChainID returns the ChainID field if non-nil, zero value otherwise. - -### GetChainIDOk - -`func (o *TransactRequestFromToken) GetChainIDOk() (*string, bool)` - -GetChainIDOk returns a tuple with the ChainID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainID - -`func (o *TransactRequestFromToken) SetChainID(v string)` - -SetChainID sets ChainID field to given value. - - -### GetChainType - -`func (o *TransactRequestFromToken) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *TransactRequestFromToken) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *TransactRequestFromToken) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetAddress - -`func (o *TransactRequestFromToken) GetAddress() string` - -GetAddress returns the Address field if non-nil, zero value otherwise. - -### GetAddressOk - -`func (o *TransactRequestFromToken) GetAddressOk() (*string, bool)` - -GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddress - -`func (o *TransactRequestFromToken) SetAddress(v string)` - -SetAddress sets Address field to given value. - - -### GetName - -`func (o *TransactRequestFromToken) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *TransactRequestFromToken) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *TransactRequestFromToken) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *TransactRequestFromToken) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetSymbol - -`func (o *TransactRequestFromToken) GetSymbol() string` - -GetSymbol returns the Symbol field if non-nil, zero value otherwise. - -### GetSymbolOk - -`func (o *TransactRequestFromToken) GetSymbolOk() (*string, bool)` - -GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSymbol - -`func (o *TransactRequestFromToken) SetSymbol(v string)` - -SetSymbol sets Symbol field to given value. - - -### GetDecimals - -`func (o *TransactRequestFromToken) GetDecimals() int32` - -GetDecimals returns the Decimals field if non-nil, zero value otherwise. - -### GetDecimalsOk - -`func (o *TransactRequestFromToken) GetDecimalsOk() (*int32, bool)` - -GetDecimalsOk returns a tuple with the Decimals field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDecimals - -`func (o *TransactRequestFromToken) SetDecimals(v int32)` - -SetDecimals sets Decimals field to given value. - - -### GetLogoURI - -`func (o *TransactRequestFromToken) GetLogoURI() string` - -GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. - -### GetLogoURIOk - -`func (o *TransactRequestFromToken) GetLogoURIOk() (*string, bool)` - -GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoURI - -`func (o *TransactRequestFromToken) SetLogoURI(v string)` - -SetLogoURI sets LogoURI field to given value. - -### HasLogoURI - -`func (o *TransactRequestFromToken) HasLogoURI() bool` - -HasLogoURI returns a boolean if a field has been set. - -### GetTags - -`func (o *TransactRequestFromToken) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *TransactRequestFromToken) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *TransactRequestFromToken) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *TransactRequestFromToken) HasTags() bool` - -HasTags returns a boolean if a field has been set. - -### GetPriceUSD - -`func (o *TransactRequestFromToken) GetPriceUSD() string` - -GetPriceUSD returns the PriceUSD field if non-nil, zero value otherwise. - -### GetPriceUSDOk - -`func (o *TransactRequestFromToken) GetPriceUSDOk() (*string, bool)` - -GetPriceUSDOk returns a tuple with the PriceUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPriceUSD - -`func (o *TransactRequestFromToken) SetPriceUSD(v string)` - -SetPriceUSD sets PriceUSD field to given value. - -### HasPriceUSD - -`func (o *TransactRequestFromToken) HasPriceUSD() bool` - -HasPriceUSD returns a boolean if a field has been set. - -### GetExtensions - -`func (o *TransactRequestFromToken) GetExtensions() TransactRequestFromTokenExtensions` - -GetExtensions returns the Extensions field if non-nil, zero value otherwise. - -### GetExtensionsOk - -`func (o *TransactRequestFromToken) GetExtensionsOk() (*TransactRequestFromTokenExtensions, bool)` - -GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExtensions - -`func (o *TransactRequestFromToken) SetExtensions(v TransactRequestFromTokenExtensions)` - -SetExtensions sets Extensions field to given value. - -### HasExtensions - -`func (o *TransactRequestFromToken) HasExtensions() bool` - -HasExtensions returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md deleted file mode 100644 index 13b2ff90eb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensions.md +++ /dev/null @@ -1,82 +0,0 @@ -# TransactRequestFromTokenExtensions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BridgeInfo** | Pointer to [**map[string]TransactRequestFromTokenExtensionsBridgeInfoValue**](TransactRequestFromTokenExtensionsBridgeInfoValue.md) | | [optional] -**Verified** | Pointer to **bool** | Indicates whether the token is verified. | [optional] - -## Methods - -### NewTransactRequestFromTokenExtensions - -`func NewTransactRequestFromTokenExtensions() *TransactRequestFromTokenExtensions` - -NewTransactRequestFromTokenExtensions instantiates a new TransactRequestFromTokenExtensions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactRequestFromTokenExtensionsWithDefaults - -`func NewTransactRequestFromTokenExtensionsWithDefaults() *TransactRequestFromTokenExtensions` - -NewTransactRequestFromTokenExtensionsWithDefaults instantiates a new TransactRequestFromTokenExtensions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetBridgeInfo - -`func (o *TransactRequestFromTokenExtensions) GetBridgeInfo() map[string]TransactRequestFromTokenExtensionsBridgeInfoValue` - -GetBridgeInfo returns the BridgeInfo field if non-nil, zero value otherwise. - -### GetBridgeInfoOk - -`func (o *TransactRequestFromTokenExtensions) GetBridgeInfoOk() (*map[string]TransactRequestFromTokenExtensionsBridgeInfoValue, bool)` - -GetBridgeInfoOk returns a tuple with the BridgeInfo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBridgeInfo - -`func (o *TransactRequestFromTokenExtensions) SetBridgeInfo(v map[string]TransactRequestFromTokenExtensionsBridgeInfoValue)` - -SetBridgeInfo sets BridgeInfo field to given value. - -### HasBridgeInfo - -`func (o *TransactRequestFromTokenExtensions) HasBridgeInfo() bool` - -HasBridgeInfo returns a boolean if a field has been set. - -### GetVerified - -`func (o *TransactRequestFromTokenExtensions) GetVerified() bool` - -GetVerified returns the Verified field if non-nil, zero value otherwise. - -### GetVerifiedOk - -`func (o *TransactRequestFromTokenExtensions) GetVerifiedOk() (*bool, bool)` - -GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerified - -`func (o *TransactRequestFromTokenExtensions) SetVerified(v bool)` - -SetVerified sets Verified field to given value. - -### HasVerified - -`func (o *TransactRequestFromTokenExtensions) HasVerified() bool` - -HasVerified returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md deleted file mode 100644 index 24f0871973..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequestFromTokenExtensionsBridgeInfoValue.md +++ /dev/null @@ -1,56 +0,0 @@ -# TransactRequestFromTokenExtensionsBridgeInfoValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TokenAddress** | Pointer to **string** | The address of the token being transferred. | [optional] - -## Methods - -### NewTransactRequestFromTokenExtensionsBridgeInfoValue - -`func NewTransactRequestFromTokenExtensionsBridgeInfoValue() *TransactRequestFromTokenExtensionsBridgeInfoValue` - -NewTransactRequestFromTokenExtensionsBridgeInfoValue instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults - -`func NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults() *TransactRequestFromTokenExtensionsBridgeInfoValue` - -NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTokenAddress - -`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string` - -GetTokenAddress returns the TokenAddress field if non-nil, zero value otherwise. - -### GetTokenAddressOk - -`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool)` - -GetTokenAddressOk returns a tuple with the TokenAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenAddress - -`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string)` - -SetTokenAddress sets TokenAddress field to given value. - -### HasTokenAddress - -`func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool` - -HasTokenAddress returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.gitignore similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/.gitignore rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.gitignore diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator-ignore similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator-ignore rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator-ignore diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES similarity index 97% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES index e101cc77cb..6830c54440 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/FILES +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -118,4 +119,6 @@ model_transact_default_response.go model_transact_request.go model_transact_response.go response.go +test/api_admin_test.go +test/api_transaction_test.go utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/VERSION similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/.openapi-generator/VERSION rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/VERSION diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/.travis.yml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.travis.yml similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/.travis.yml rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.travis.yml diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/README.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/README.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api/openapi.yaml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/api/openapi.yaml rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/api_admin.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/api_transaction.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_transaction.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/api_transaction.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_transaction.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/client.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/client.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/client.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/client.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/configuration.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/configuration.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/configuration.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/configuration.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/APIError.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/APIError.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/APIError.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/APIError.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Action.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Action.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Action.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Action.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AdminApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AdminApi.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzJwtClaim.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzJwtClaim.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzJwtClaim.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzJwtClaim.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzScope.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzScope.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/AuthzScope.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzScope.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/BridgeInfo.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/BridgeInfo.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/BridgeInfo.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/BridgeInfo.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Cancel200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Cancel200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Cancel200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Cancel200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelRequest.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelRequest.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelRequest.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CancelResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chain.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chain.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chain.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chains1Inner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chains1Inner.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Chains1Inner.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chains1Inner.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Continue200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Continue200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Continue200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Continue200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueRequest.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueRequest.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueRequest.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/ContinueResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CredentialProfile.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CredentialProfile.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/CredentialProfile.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CredentialProfile.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/DLTProtocol.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/DLTProtocol.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/DLTProtocol.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/DLTProtocol.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Estimate.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Estimate.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Estimate.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Estimate.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/FeeCost.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/FeeCost.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/FeeCost.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/FeeCost.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GasCost.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GasCost.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GasCost.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GasCost.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAudit200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAudit200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAudit200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAudit200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditRequest.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditRequest.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditRequest.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetAuditResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetHealthCheck200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetHealthCheck200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetHealthCheck200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetHealthCheck200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInner.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInner.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInner.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromToken.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromToken.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromToken.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromToken.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerInsurance.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerInsurance.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerInsurance.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerInsurance.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInner.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInner.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInner.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/HealthCheckResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/HealthCheckResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/HealthCheckResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/HealthCheckResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IncludedStep.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IncludedStep.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IncludedStep.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IncludedStep.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Insurance.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Insurance.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Insurance.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Insurance.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IntegrationDetails.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IntegrationDetails.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/IntegrationDetails.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IntegrationDetails.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Pause200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Pause200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Pause200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Pause200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseRequest.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseRequest.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseRequest.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/PauseResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Route.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Route.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Route.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Route.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/RoutesResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/RoutesResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/RoutesResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/RoutesResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusRequest.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusRequest.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusRequest.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/StatusResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Token.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Token.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Token.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Token.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200Response.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200Response.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200Response.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseDestinationChain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseDestinationChain.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseDestinationChain.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseDestinationChain.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseOriginChain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseOriginChain.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/Transact200ResponseStatusResponseOriginChain.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseOriginChain.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactDefaultResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactDefaultResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactDefaultResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactDefaultResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactRequest.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactResponse.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactResponse.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactResponse.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactionApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/docs/TransactionApi.md rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/git_push.sh similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/git_push.sh rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/git_push.sh diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.mod b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.mod similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/go.mod rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.mod diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/go.sum b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.sum similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/go.sum rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.sum diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_action.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_action.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_action.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_action.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_api_error.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_api_error.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_api_error.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_api_error.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_jwt_claim.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_jwt_claim.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_jwt_claim.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_jwt_claim.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_scope.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_scope.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_authz_scope.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_scope.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_bridge_info.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_bridge_info.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_bridge_info.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_bridge_info.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_request.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_request.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_request.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_cancel_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chain.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chain.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chain.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chains_1_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chains_1_inner.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_chains_1_inner.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chains_1_inner.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_request.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_request.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_request.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_continue_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_credential_profile.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_credential_profile.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_credential_profile.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_credential_profile.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_dlt_protocol.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_dlt_protocol.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_dlt_protocol.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_dlt_protocol.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_estimate.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_estimate.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_estimate.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_estimate.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_fee_cost.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_fee_cost.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_fee_cost.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_fee_cost.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_gas_cost.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_gas_cost.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_gas_cost.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_gas_cost.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_request.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_request.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_request.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_audit_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_health_check_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_health_check_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_health_check_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_health_check_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_insurance.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_insurance.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_insurance.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_insurance.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_action.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_action.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_action.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_action.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_health_check_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_health_check_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_health_check_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_health_check_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_included_step.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_included_step.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_included_step.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_included_step.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_insurance.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_insurance.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_insurance.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_insurance.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_integration_details.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_integration_details.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_integration_details.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_integration_details.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_request.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_request.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_request.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_pause_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_route.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_route.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_route.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_route.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_routes_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_routes_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_routes_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_routes_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_request.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_request.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_request.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_status_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_token.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_token.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_token.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_destination_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_destination_chain.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_destination_chain.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_destination_chain.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_origin_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_origin_chain.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_200_response_status_response_origin_chain.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_origin_chain.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_default_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_default_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_default_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_default_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/response.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/response.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/response.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go similarity index 51% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go index f3a25bd2bd..4cd51095ba 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_admin_test.go +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" - openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" ) func Test_generated_AdminApiService(t *testing.T) { @@ -22,6 +22,18 @@ func Test_generated_AdminApiService(t *testing.T) { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) + t.Run("Test AdminApiService CallContinue", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AdminApi.CallContinue(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + t.Run("Test AdminApiService GetAudit", func(t *testing.T) { t.Skip("skip test") // remove to run test @@ -34,6 +46,18 @@ func Test_generated_AdminApiService(t *testing.T) { }) + t.Run("Test AdminApiService GetHealthCheck", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AdminApi.GetHealthCheck(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + t.Run("Test AdminApiService GetStatus", func(t *testing.T) { t.Skip("skip test") // remove to run test @@ -46,4 +70,16 @@ func Test_generated_AdminApiService(t *testing.T) { }) + t.Run("Test AdminApiService Pause", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AdminApi.Pause(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + } diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go similarity index 76% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go index 718c9bfafb..1b848e0db1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_transaction_test.go +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" - openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" ) func Test_generated_TransactionApiService(t *testing.T) { @@ -34,6 +34,18 @@ func Test_generated_TransactionApiService(t *testing.T) { }) + t.Run("Test TransactionApiService GetIntegrations", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TransactionApi.GetIntegrations(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + t.Run("Test TransactionApiService GetRoutes", func(t *testing.T) { t.Skip("skip test") // remove to run test diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/utils.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/utils.go similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/utils.go rename to packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go deleted file mode 100644 index 4023043d78..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_chains_200_response_inner.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: v0.0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetChains200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetChains200ResponseInner{} - -// GetChains200ResponseInner struct for GetChains200ResponseInner -type GetChains200ResponseInner struct { - // A unique identifier for the blockchain network. - ChainId string `json:"chainId"` - // The name of the blockchain network. - ChainName string `json:"chainName"` - // The type of blockchain network (e.g., 'evm', 'fabric'). - ChainType string `json:"chainType"` - // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). - NetworkName string `json:"networkName"` -} - -// NewGetChains200ResponseInner instantiates a new GetChains200ResponseInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetChains200ResponseInner(chainId string, chainName string, chainType string, networkName string) *GetChains200ResponseInner { - this := GetChains200ResponseInner{} - this.ChainId = chainId - this.ChainName = chainName - this.ChainType = chainType - this.NetworkName = networkName - return &this -} - -// NewGetChains200ResponseInnerWithDefaults instantiates a new GetChains200ResponseInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetChains200ResponseInnerWithDefaults() *GetChains200ResponseInner { - this := GetChains200ResponseInner{} - return &this -} - -// GetChainId returns the ChainId field value -func (o *GetChains200ResponseInner) GetChainId() string { - if o == nil { - var ret string - return ret - } - - return o.ChainId -} - -// GetChainIdOk returns a tuple with the ChainId field value -// and a boolean to check if the value has been set. -func (o *GetChains200ResponseInner) GetChainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainId, true -} - -// SetChainId sets field value -func (o *GetChains200ResponseInner) SetChainId(v string) { - o.ChainId = v -} - -// GetChainName returns the ChainName field value -func (o *GetChains200ResponseInner) GetChainName() string { - if o == nil { - var ret string - return ret - } - - return o.ChainName -} - -// GetChainNameOk returns a tuple with the ChainName field value -// and a boolean to check if the value has been set. -func (o *GetChains200ResponseInner) GetChainNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainName, true -} - -// SetChainName sets field value -func (o *GetChains200ResponseInner) SetChainName(v string) { - o.ChainName = v -} - -// GetChainType returns the ChainType field value -func (o *GetChains200ResponseInner) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *GetChains200ResponseInner) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *GetChains200ResponseInner) SetChainType(v string) { - o.ChainType = v -} - -// GetNetworkName returns the NetworkName field value -func (o *GetChains200ResponseInner) GetNetworkName() string { - if o == nil { - var ret string - return ret - } - - return o.NetworkName -} - -// GetNetworkNameOk returns a tuple with the NetworkName field value -// and a boolean to check if the value has been set. -func (o *GetChains200ResponseInner) GetNetworkNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.NetworkName, true -} - -// SetNetworkName sets field value -func (o *GetChains200ResponseInner) SetNetworkName(v string) { - o.NetworkName = v -} - -func (o GetChains200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetChains200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainId"] = o.ChainId - toSerialize["chainName"] = o.ChainName - toSerialize["chainType"] = o.ChainType - toSerialize["networkName"] = o.NetworkName - return toSerialize, nil -} - -type NullableGetChains200ResponseInner struct { - value *GetChains200ResponseInner - isSet bool -} - -func (v NullableGetChains200ResponseInner) Get() *GetChains200ResponseInner { - return v.value -} - -func (v *NullableGetChains200ResponseInner) Set(val *GetChains200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetChains200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetChains200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetChains200ResponseInner(val *GetChains200ResponseInner) *NullableGetChains200ResponseInner { - return &NullableGetChains200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetChains200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetChains200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go deleted file mode 100644 index e5749a63e6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_get_integrations_200_response_inner.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetIntegrations200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetIntegrations200ResponseInner{} - -// GetIntegrations200ResponseInner struct for GetIntegrations200ResponseInner -type GetIntegrations200ResponseInner struct { - // A unique identifier for the blockchain network. - ChainId string `json:"chainId"` - // The name of the blockchain network. - ChainName string `json:"chainName"` - // The type of blockchain network (e.g., 'evm', 'fabric'). - ChainType string `json:"chainType"` - // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). - NetworkName string `json:"networkName"` -} - -// NewGetIntegrations200ResponseInner instantiates a new GetIntegrations200ResponseInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetIntegrations200ResponseInner(chainId string, chainName string, chainType string, networkName string) *GetIntegrations200ResponseInner { - this := GetIntegrations200ResponseInner{} - this.ChainId = chainId - this.ChainName = chainName - this.ChainType = chainType - this.NetworkName = networkName - return &this -} - -// NewGetIntegrations200ResponseInnerWithDefaults instantiates a new GetIntegrations200ResponseInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetIntegrations200ResponseInnerWithDefaults() *GetIntegrations200ResponseInner { - this := GetIntegrations200ResponseInner{} - return &this -} - -// GetChainId returns the ChainId field value -func (o *GetIntegrations200ResponseInner) GetChainId() string { - if o == nil { - var ret string - return ret - } - - return o.ChainId -} - -// GetChainIdOk returns a tuple with the ChainId field value -// and a boolean to check if the value has been set. -func (o *GetIntegrations200ResponseInner) GetChainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainId, true -} - -// SetChainId sets field value -func (o *GetIntegrations200ResponseInner) SetChainId(v string) { - o.ChainId = v -} - -// GetChainName returns the ChainName field value -func (o *GetIntegrations200ResponseInner) GetChainName() string { - if o == nil { - var ret string - return ret - } - - return o.ChainName -} - -// GetChainNameOk returns a tuple with the ChainName field value -// and a boolean to check if the value has been set. -func (o *GetIntegrations200ResponseInner) GetChainNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainName, true -} - -// SetChainName sets field value -func (o *GetIntegrations200ResponseInner) SetChainName(v string) { - o.ChainName = v -} - -// GetChainType returns the ChainType field value -func (o *GetIntegrations200ResponseInner) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *GetIntegrations200ResponseInner) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *GetIntegrations200ResponseInner) SetChainType(v string) { - o.ChainType = v -} - -// GetNetworkName returns the NetworkName field value -func (o *GetIntegrations200ResponseInner) GetNetworkName() string { - if o == nil { - var ret string - return ret - } - - return o.NetworkName -} - -// GetNetworkNameOk returns a tuple with the NetworkName field value -// and a boolean to check if the value has been set. -func (o *GetIntegrations200ResponseInner) GetNetworkNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.NetworkName, true -} - -// SetNetworkName sets field value -func (o *GetIntegrations200ResponseInner) SetNetworkName(v string) { - o.NetworkName = v -} - -func (o GetIntegrations200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetIntegrations200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainId"] = o.ChainId - toSerialize["chainName"] = o.ChainName - toSerialize["chainType"] = o.ChainType - toSerialize["networkName"] = o.NetworkName - return toSerialize, nil -} - -type NullableGetIntegrations200ResponseInner struct { - value *GetIntegrations200ResponseInner - isSet bool -} - -func (v NullableGetIntegrations200ResponseInner) Get() *GetIntegrations200ResponseInner { - return v.value -} - -func (v *NullableGetIntegrations200ResponseInner) Set(val *GetIntegrations200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetIntegrations200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetIntegrations200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetIntegrations200ResponseInner(val *GetIntegrations200ResponseInner) *NullableGetIntegrations200ResponseInner { - return &NullableGetIntegrations200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetIntegrations200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetIntegrations200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go deleted file mode 100644 index 0236a55adf..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token.go +++ /dev/null @@ -1,414 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: v0.0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the TransactRequestFromToken type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactRequestFromToken{} - -// TransactRequestFromToken Metadata detailing a supported token -type TransactRequestFromToken struct { - // The network of the DLT being interacted with. TODO: implement network identification draft - ChainID string `json:"chainID"` - // Supported DLT protocols. - ChainType string `json:"chainType"` - // A blockchain address. - Address string `json:"address"` - // The name of the token. - Name *string `json:"name,omitempty"` - // The symbol of the token. - Symbol string `json:"symbol"` - // How many decimals the token supports. - Decimals int32 `json:"decimals"` - // The logo of a token, chain, dex etc. - LogoURI *string `json:"logoURI,omitempty"` - // List of tags identifiers providing additional context or categorization. - Tags []string `json:"tags,omitempty"` - // The current price of the token in USD. - PriceUSD *string `json:"priceUSD,omitempty"` - Extensions *TransactRequestFromTokenExtensions `json:"extensions,omitempty"` -} - -// NewTransactRequestFromToken instantiates a new TransactRequestFromToken object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactRequestFromToken(chainID string, chainType string, address string, symbol string, decimals int32) *TransactRequestFromToken { - this := TransactRequestFromToken{} - this.ChainID = chainID - this.ChainType = chainType - this.Address = address - this.Symbol = symbol - this.Decimals = decimals - return &this -} - -// NewTransactRequestFromTokenWithDefaults instantiates a new TransactRequestFromToken object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactRequestFromTokenWithDefaults() *TransactRequestFromToken { - this := TransactRequestFromToken{} - return &this -} - -// GetChainID returns the ChainID field value -func (o *TransactRequestFromToken) GetChainID() string { - if o == nil { - var ret string - return ret - } - - return o.ChainID -} - -// GetChainIDOk returns a tuple with the ChainID field value -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetChainIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainID, true -} - -// SetChainID sets field value -func (o *TransactRequestFromToken) SetChainID(v string) { - o.ChainID = v -} - -// GetChainType returns the ChainType field value -func (o *TransactRequestFromToken) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *TransactRequestFromToken) SetChainType(v string) { - o.ChainType = v -} - -// GetAddress returns the Address field value -func (o *TransactRequestFromToken) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *TransactRequestFromToken) SetAddress(v string) { - o.Address = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *TransactRequestFromToken) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *TransactRequestFromToken) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *TransactRequestFromToken) SetName(v string) { - o.Name = &v -} - -// GetSymbol returns the Symbol field value -func (o *TransactRequestFromToken) GetSymbol() string { - if o == nil { - var ret string - return ret - } - - return o.Symbol -} - -// GetSymbolOk returns a tuple with the Symbol field value -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetSymbolOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Symbol, true -} - -// SetSymbol sets field value -func (o *TransactRequestFromToken) SetSymbol(v string) { - o.Symbol = v -} - -// GetDecimals returns the Decimals field value -func (o *TransactRequestFromToken) GetDecimals() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Decimals -} - -// GetDecimalsOk returns a tuple with the Decimals field value -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetDecimalsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Decimals, true -} - -// SetDecimals sets field value -func (o *TransactRequestFromToken) SetDecimals(v int32) { - o.Decimals = v -} - -// GetLogoURI returns the LogoURI field value if set, zero value otherwise. -func (o *TransactRequestFromToken) GetLogoURI() string { - if o == nil || IsNil(o.LogoURI) { - var ret string - return ret - } - return *o.LogoURI -} - -// GetLogoURIOk returns a tuple with the LogoURI field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetLogoURIOk() (*string, bool) { - if o == nil || IsNil(o.LogoURI) { - return nil, false - } - return o.LogoURI, true -} - -// HasLogoURI returns a boolean if a field has been set. -func (o *TransactRequestFromToken) HasLogoURI() bool { - if o != nil && !IsNil(o.LogoURI) { - return true - } - - return false -} - -// SetLogoURI gets a reference to the given string and assigns it to the LogoURI field. -func (o *TransactRequestFromToken) SetLogoURI(v string) { - o.LogoURI = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *TransactRequestFromToken) GetTags() []string { - if o == nil || IsNil(o.Tags) { - var ret []string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetTagsOk() ([]string, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *TransactRequestFromToken) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given []string and assigns it to the Tags field. -func (o *TransactRequestFromToken) SetTags(v []string) { - o.Tags = v -} - -// GetPriceUSD returns the PriceUSD field value if set, zero value otherwise. -func (o *TransactRequestFromToken) GetPriceUSD() string { - if o == nil || IsNil(o.PriceUSD) { - var ret string - return ret - } - return *o.PriceUSD -} - -// GetPriceUSDOk returns a tuple with the PriceUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetPriceUSDOk() (*string, bool) { - if o == nil || IsNil(o.PriceUSD) { - return nil, false - } - return o.PriceUSD, true -} - -// HasPriceUSD returns a boolean if a field has been set. -func (o *TransactRequestFromToken) HasPriceUSD() bool { - if o != nil && !IsNil(o.PriceUSD) { - return true - } - - return false -} - -// SetPriceUSD gets a reference to the given string and assigns it to the PriceUSD field. -func (o *TransactRequestFromToken) SetPriceUSD(v string) { - o.PriceUSD = &v -} - -// GetExtensions returns the Extensions field value if set, zero value otherwise. -func (o *TransactRequestFromToken) GetExtensions() TransactRequestFromTokenExtensions { - if o == nil || IsNil(o.Extensions) { - var ret TransactRequestFromTokenExtensions - return ret - } - return *o.Extensions -} - -// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromToken) GetExtensionsOk() (*TransactRequestFromTokenExtensions, bool) { - if o == nil || IsNil(o.Extensions) { - return nil, false - } - return o.Extensions, true -} - -// HasExtensions returns a boolean if a field has been set. -func (o *TransactRequestFromToken) HasExtensions() bool { - if o != nil && !IsNil(o.Extensions) { - return true - } - - return false -} - -// SetExtensions gets a reference to the given TransactRequestFromTokenExtensions and assigns it to the Extensions field. -func (o *TransactRequestFromToken) SetExtensions(v TransactRequestFromTokenExtensions) { - o.Extensions = &v -} - -func (o TransactRequestFromToken) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactRequestFromToken) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainID"] = o.ChainID - toSerialize["chainType"] = o.ChainType - toSerialize["address"] = o.Address - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - toSerialize["symbol"] = o.Symbol - toSerialize["decimals"] = o.Decimals - if !IsNil(o.LogoURI) { - toSerialize["logoURI"] = o.LogoURI - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - if !IsNil(o.PriceUSD) { - toSerialize["priceUSD"] = o.PriceUSD - } - if !IsNil(o.Extensions) { - toSerialize["extensions"] = o.Extensions - } - return toSerialize, nil -} - -type NullableTransactRequestFromToken struct { - value *TransactRequestFromToken - isSet bool -} - -func (v NullableTransactRequestFromToken) Get() *TransactRequestFromToken { - return v.value -} - -func (v *NullableTransactRequestFromToken) Set(val *TransactRequestFromToken) { - v.value = val - v.isSet = true -} - -func (v NullableTransactRequestFromToken) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactRequestFromToken) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactRequestFromToken(val *TransactRequestFromToken) *NullableTransactRequestFromToken { - return &NullableTransactRequestFromToken{value: val, isSet: true} -} - -func (v NullableTransactRequestFromToken) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactRequestFromToken) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go deleted file mode 100644 index ee71302bda..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: v0.0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the TransactRequestFromTokenExtensions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactRequestFromTokenExtensions{} - -// TransactRequestFromTokenExtensions struct for TransactRequestFromTokenExtensions -type TransactRequestFromTokenExtensions struct { - BridgeInfo *map[string]TransactRequestFromTokenExtensionsBridgeInfoValue `json:"bridgeInfo,omitempty"` - // Indicates whether the token is verified. - Verified *bool `json:"verified,omitempty"` -} - -// NewTransactRequestFromTokenExtensions instantiates a new TransactRequestFromTokenExtensions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactRequestFromTokenExtensions() *TransactRequestFromTokenExtensions { - this := TransactRequestFromTokenExtensions{} - return &this -} - -// NewTransactRequestFromTokenExtensionsWithDefaults instantiates a new TransactRequestFromTokenExtensions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactRequestFromTokenExtensionsWithDefaults() *TransactRequestFromTokenExtensions { - this := TransactRequestFromTokenExtensions{} - return &this -} - -// GetBridgeInfo returns the BridgeInfo field value if set, zero value otherwise. -func (o *TransactRequestFromTokenExtensions) GetBridgeInfo() map[string]TransactRequestFromTokenExtensionsBridgeInfoValue { - if o == nil || IsNil(o.BridgeInfo) { - var ret map[string]TransactRequestFromTokenExtensionsBridgeInfoValue - return ret - } - return *o.BridgeInfo -} - -// GetBridgeInfoOk returns a tuple with the BridgeInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromTokenExtensions) GetBridgeInfoOk() (*map[string]TransactRequestFromTokenExtensionsBridgeInfoValue, bool) { - if o == nil || IsNil(o.BridgeInfo) { - return nil, false - } - return o.BridgeInfo, true -} - -// HasBridgeInfo returns a boolean if a field has been set. -func (o *TransactRequestFromTokenExtensions) HasBridgeInfo() bool { - if o != nil && !IsNil(o.BridgeInfo) { - return true - } - - return false -} - -// SetBridgeInfo gets a reference to the given map[string]TransactRequestFromTokenExtensionsBridgeInfoValue and assigns it to the BridgeInfo field. -func (o *TransactRequestFromTokenExtensions) SetBridgeInfo(v map[string]TransactRequestFromTokenExtensionsBridgeInfoValue) { - o.BridgeInfo = &v -} - -// GetVerified returns the Verified field value if set, zero value otherwise. -func (o *TransactRequestFromTokenExtensions) GetVerified() bool { - if o == nil || IsNil(o.Verified) { - var ret bool - return ret - } - return *o.Verified -} - -// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromTokenExtensions) GetVerifiedOk() (*bool, bool) { - if o == nil || IsNil(o.Verified) { - return nil, false - } - return o.Verified, true -} - -// HasVerified returns a boolean if a field has been set. -func (o *TransactRequestFromTokenExtensions) HasVerified() bool { - if o != nil && !IsNil(o.Verified) { - return true - } - - return false -} - -// SetVerified gets a reference to the given bool and assigns it to the Verified field. -func (o *TransactRequestFromTokenExtensions) SetVerified(v bool) { - o.Verified = &v -} - -func (o TransactRequestFromTokenExtensions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactRequestFromTokenExtensions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BridgeInfo) { - toSerialize["bridgeInfo"] = o.BridgeInfo - } - if !IsNil(o.Verified) { - toSerialize["verified"] = o.Verified - } - return toSerialize, nil -} - -type NullableTransactRequestFromTokenExtensions struct { - value *TransactRequestFromTokenExtensions - isSet bool -} - -func (v NullableTransactRequestFromTokenExtensions) Get() *TransactRequestFromTokenExtensions { - return v.value -} - -func (v *NullableTransactRequestFromTokenExtensions) Set(val *TransactRequestFromTokenExtensions) { - v.value = val - v.isSet = true -} - -func (v NullableTransactRequestFromTokenExtensions) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactRequestFromTokenExtensions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactRequestFromTokenExtensions(val *TransactRequestFromTokenExtensions) *NullableTransactRequestFromTokenExtensions { - return &NullableTransactRequestFromTokenExtensions{value: val, isSet: true} -} - -func (v NullableTransactRequestFromTokenExtensions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactRequestFromTokenExtensions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go deleted file mode 100644 index 842f90d6b1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/model_transact_request_from_token_extensions_bridge_info_value.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: v0.0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the TransactRequestFromTokenExtensionsBridgeInfoValue type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactRequestFromTokenExtensionsBridgeInfoValue{} - -// TransactRequestFromTokenExtensionsBridgeInfoValue Information about the bridge used for the token transfer. -type TransactRequestFromTokenExtensionsBridgeInfoValue struct { - // The address of the token being transferred. - TokenAddress *string `json:"tokenAddress,omitempty"` -} - -// NewTransactRequestFromTokenExtensionsBridgeInfoValue instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactRequestFromTokenExtensionsBridgeInfoValue() *TransactRequestFromTokenExtensionsBridgeInfoValue { - this := TransactRequestFromTokenExtensionsBridgeInfoValue{} - return &this -} - -// NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new TransactRequestFromTokenExtensionsBridgeInfoValue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactRequestFromTokenExtensionsBridgeInfoValueWithDefaults() *TransactRequestFromTokenExtensionsBridgeInfoValue { - this := TransactRequestFromTokenExtensionsBridgeInfoValue{} - return &this -} - -// GetTokenAddress returns the TokenAddress field value if set, zero value otherwise. -func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string { - if o == nil || IsNil(o.TokenAddress) { - var ret string - return ret - } - return *o.TokenAddress -} - -// GetTokenAddressOk returns a tuple with the TokenAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool) { - if o == nil || IsNil(o.TokenAddress) { - return nil, false - } - return o.TokenAddress, true -} - -// HasTokenAddress returns a boolean if a field has been set. -func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool { - if o != nil && !IsNil(o.TokenAddress) { - return true - } - - return false -} - -// SetTokenAddress gets a reference to the given string and assigns it to the TokenAddress field. -func (o *TransactRequestFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string) { - o.TokenAddress = &v -} - -func (o TransactRequestFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactRequestFromTokenExtensionsBridgeInfoValue) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TokenAddress) { - toSerialize["tokenAddress"] = o.TokenAddress - } - return toSerialize, nil -} - -type NullableTransactRequestFromTokenExtensionsBridgeInfoValue struct { - value *TransactRequestFromTokenExtensionsBridgeInfoValue - isSet bool -} - -func (v NullableTransactRequestFromTokenExtensionsBridgeInfoValue) Get() *TransactRequestFromTokenExtensionsBridgeInfoValue { - return v.value -} - -func (v *NullableTransactRequestFromTokenExtensionsBridgeInfoValue) Set(val *TransactRequestFromTokenExtensionsBridgeInfoValue) { - v.value = val - v.isSet = true -} - -func (v NullableTransactRequestFromTokenExtensionsBridgeInfoValue) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactRequestFromTokenExtensionsBridgeInfoValue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactRequestFromTokenExtensionsBridgeInfoValue(val *TransactRequestFromTokenExtensionsBridgeInfoValue) *NullableTransactRequestFromTokenExtensionsBridgeInfoValue { - return &NullableTransactRequestFromTokenExtensionsBridgeInfoValue{value: val, isSet: true} -} - -func (v NullableTransactRequestFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactRequestFromTokenExtensionsBridgeInfoValue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go deleted file mode 100644 index 2c39e87f1c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/test/api_chains_test.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -Testing ChainsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package generated - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" -) - -func Test_generated_ChainsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ChainsApiService GetChains", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.ChainsApi.GetChains(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index 68bffe6a9b..fad34c1286 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -3,7 +3,7 @@ import { StatusRequest, StatusResponse, Transact200ResponseStatusResponseOriginChain, -} from "../../generated/openapi-blo/typescript-axios"; +} from "../../generated/gateway-client/typescript-axios"; import { Logger } from "@hyperledger/cactus-common"; export async function GetStatusHandler( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 2510fb0a8d..864372f02e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -11,11 +11,11 @@ import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; //import { GetStatusError, NonExistantGatewayIdentity } from "../core/errors"; import { GetStatusEndpointV1 } from "../web-services/blo/status-endpoint"; -//import { GetAuditRequest, GetAuditResponse } from "../generated/openapi-blo/typescript-axios"; +//import { GetAuditRequest, GetAuditResponse } from "../generated/gateway-client/typescript-axios"; import { StatusRequest, StatusResponse, -} from "../generated/openapi-blo/typescript-axios"; +} from "../generated/gateway-client/typescript-axios"; import { GetStatusHandler } from "./admin/get-status-handler-service"; export interface BLODispatcherOptions { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/VERSION similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/VERSION rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/VERSION diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/base.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/base.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/base.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/base.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/common.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/common.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/common.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/common.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/configuration.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/configuration.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/configuration.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/configuration.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/index.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/index.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 16b445eee6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,9 +0,0 @@ -.gitignore -.npmignore -.openapi-generator-ignore -api.ts -base.ts -common.ts -configuration.ts -git_push.sh -index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts deleted file mode 100644 index 5009672823..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/api.ts +++ /dev/null @@ -1,2678 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * SATP Gateway Client (Business Logic Orchestrator) - * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - * - * The version of the OpenAPI document: 0.0.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; - -/** - * An Error - * @export - * @interface APIError - */ -export interface APIError { - /** - * HTTP error type - * @type {string} - * @memberof APIError - */ - 'type': string; - /** - * Numeric error code - * @type {number} - * @memberof APIError - */ - 'code': number; - /** - * HTTP status of the error - * @type {number} - * @memberof APIError - */ - 'status': number; - /** - * Long error description - * @type {string} - * @memberof APIError - */ - 'message': string; - /** - * Timestamp of the error - * @type {string} - * @memberof APIError - */ - 'timestamp': string; -} -/** - * - * @export - * @interface Action - */ -export interface Action { - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Action - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. - * @type {string} - * @memberof Action - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Action - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. - * @type {number} - * @memberof Action - */ - 'slippage'?: number; - /** - * A blockchain address. - * @type {string} - * @memberof Action - */ - 'fromAddress'?: string; - /** - * A blockchain address. - * @type {string} - * @memberof Action - */ - 'toAddress'?: string; -} -/** - * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 - * @export - * @enum {string} - */ - -export const AuthzJwtClaim = { - /** - * The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. - */ - iss: 'Hyperledger Labs - Carbon Accounting Tool' -} as const; - -export type AuthzJwtClaim = typeof AuthzJwtClaim[keyof typeof AuthzJwtClaim]; - - -/** - * - * @export - * @enum {string} - */ - -export const AuthzScope = { - /** - * Identities with the group:admin scope are administrators of the system. - */ - GroupAdmin: 'group:admin', - /** - * Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. - */ - GroupUser: 'group:user' -} as const; - -export type AuthzScope = typeof AuthzScope[keyof typeof AuthzScope]; - - -/** - * Information about the bridge used for the token transfer. - * @export - * @interface BridgeInfo - */ -export interface BridgeInfo { - /** - * The address of the token being transferred. - * @type {string} - * @memberof BridgeInfo - */ - 'tokenAddress'?: string; -} -/** - * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. - * @export - * @interface Cancel200Response - */ -export interface Cancel200Response { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Cancel200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; - /** - * Indicates whether the cancel operation was successful. - * @type {boolean} - * @memberof Cancel200Response - */ - 'cancelSuccessful': boolean; -} -/** - * Request to cancel an ongoing transaction session, identified by the session ID. - * @export - * @interface CancelRequest - */ -export interface CancelRequest { - /** - * Unique identifier (UUID) for the session. - * @type {string} - * @memberof CancelRequest - */ - 'sessionID': string; -} -/** - * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. - * @export - * @interface CancelResponse - */ -export interface CancelResponse { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof CancelResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; - /** - * Indicates whether the cancel operation was successful. - * @type {boolean} - * @memberof CancelResponse - */ - 'cancelSuccessful': boolean; -} -/** - * - * @export - * @interface Chain - */ -export interface Chain { - /** - * A unique identifier for the blockchain network. - * @type {string} - * @memberof Chain - */ - 'chainId': string; - /** - * The name of the blockchain network. - * @type {string} - * @memberof Chain - */ - 'chainName': string; - /** - * The type of blockchain network (e.g., \'evm\', \'fabric\'). - * @type {string} - * @memberof Chain - */ - 'chainType': string; - /** - * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). - * @type {string} - * @memberof Chain - */ - 'networkName': string; -} -/** - * - * @export - * @interface Chains1Inner - */ -export interface Chains1Inner { - /** - * A unique identifier for the blockchain network. - * @type {string} - * @memberof Chains1Inner - */ - 'chainId': string; - /** - * The name of the blockchain network. - * @type {string} - * @memberof Chains1Inner - */ - 'chainName': string; - /** - * The type of blockchain network (e.g., \'evm\', \'fabric\'). - * @type {string} - * @memberof Chains1Inner - */ - 'chainType': string; - /** - * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). - * @type {string} - * @memberof Chains1Inner - */ - 'networkName': string; -} -/** - * Response schema for a continue request, returning the status of the SATP session. - * @export - * @interface Continue200Response - */ -export interface Continue200Response { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Continue200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * Schema for a request to continue a paused transaction session. - * @export - * @interface ContinueRequest - */ -export interface ContinueRequest { - /** - * A unique identifier for the transaction session to be continued. - * @type {string} - * @memberof ContinueRequest - */ - 'sessionId': string; - /** - * A unique identifier for the transaction context. - * @type {string} - * @memberof ContinueRequest - */ - 'contextId': string; -} -/** - * Response schema for a continue request, returning the status of the SATP session. - * @export - * @interface ContinueResponse - */ -export interface ContinueResponse { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof ContinueResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * - * @export - * @enum {string} - */ - -export const CredentialProfile = { - Saml: 'SAML', - Oauth: 'OAUTH', - X509: 'X509' -} as const; - -export type CredentialProfile = typeof CredentialProfile[keyof typeof CredentialProfile]; - - -/** - * Supported DLT protocols. - * @export - * @enum {string} - */ - -export const DLTProtocol = { - HyperledgerFabric: 'HyperledgerFabric', - HyperledgerBesu: 'HyperledgerBesu' -} as const; - -export type DLTProtocol = typeof DLTProtocol[keyof typeof DLTProtocol]; - - -/** - * Provides an estimation for a transaction, including costs, amounts, and execution duration. - * @export - * @interface Estimate - */ -export interface Estimate { - /** - * A blockchain address. - * @type {string} - * @memberof Estimate - */ - 'approvalAddress'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'toAmountMin'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'toAmount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'fromAmount'?: string; - /** - * A collection of fee costs associated with the transaction. - * @type {Array} - * @memberof Estimate - */ - 'feeCosts'?: Array; - /** - * A collection of estimated gas costs for executing the transaction. - * @type {Array} - * @memberof Estimate - */ - 'gasCosts'?: Array; - /** - * The estimated duration for the transaction execution in seconds. - * @type {number} - * @memberof Estimate - */ - 'executionDuration'?: number; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'fromAmountUSD'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof Estimate - */ - 'toAmountUSD'?: string; - /** - * The tool or service used to generate this estimate. - * @type {string} - * @memberof Estimate - */ - 'tool'?: string; -} -/** - * Details about a specific fee cost associated with the transaction. - * @export - * @interface FeeCost - */ -export interface FeeCost { - /** - * Name of the fee cost. - * @type {string} - * @memberof FeeCost - */ - 'name'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof FeeCost - */ - 'amount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof FeeCost - */ - 'amountUSD'?: string; - /** - * The symbol of a token - * @type {string} - * @memberof FeeCost - */ - 'token'?: string; - /** - * Indicates if the fee is included in the transaction amount. - * @type {boolean} - * @memberof FeeCost - */ - 'included'?: boolean; -} -/** - * - * @export - * @interface GasCost - */ -export interface GasCost { - /** - * The type of the gas cost. - * @type {string} - * @memberof GasCost - */ - 'type'?: string; - /** - * The gas price, specified as a string to maintain precision. - * @type {string} - * @memberof GasCost - */ - 'price'?: string; - /** - * The estimated gas required, specified as a string to maintain precision. - * @type {string} - * @memberof GasCost - */ - 'estimate'?: string; - /** - * The gas limit for the transaction, specified as a string to maintain precision. - * @type {string} - * @memberof GasCost - */ - 'limit'?: string; - /** - * The amount of gas required in the gas currency. - * @type {string} - * @memberof GasCost - */ - 'amount'?: string; - /** - * The amount of gas required in USD. - * @type {string} - * @memberof GasCost - */ - 'amountUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GasCost - */ - 'token'?: GetRoutes200ResponseRoutesInnerFromToken; -} -/** - * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. - * @export - * @interface GetAudit200Response - */ -export interface GetAudit200Response { - /** - * An array of strings representing proofs. - * @type {Array} - * @memberof GetAudit200Response - */ - 'proofs'?: Array; - /** - * The start datetime of the audit period. - * @type {string} - * @memberof GetAudit200Response - */ - 'auditStartTime'?: string; - /** - * The end datetime of the audit period. - * @type {string} - * @memberof GetAudit200Response - */ - 'auditEndTime'?: string; -} -/** - * Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. - * @export - * @interface GetAuditRequest - */ -export interface GetAuditRequest { - /** - * The start datetime for the audit. - * @type {string} - * @memberof GetAuditRequest - */ - 'auditStartDate'?: string; - /** - * The end datetime for the audit. - * @type {string} - * @memberof GetAuditRequest - */ - 'auditEndDate'?: string; - /** - * Include proofs generated from each gateway transaction. - * @type {boolean} - * @memberof GetAuditRequest - */ - 'includeProofs'?: boolean; -} -/** - * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. - * @export - * @interface GetAuditResponse - */ -export interface GetAuditResponse { - /** - * An array of strings representing proofs. - * @type {Array} - * @memberof GetAuditResponse - */ - 'proofs'?: Array; - /** - * The start datetime of the audit period. - * @type {string} - * @memberof GetAuditResponse - */ - 'auditStartTime'?: string; - /** - * The end datetime of the audit period. - * @type {string} - * @memberof GetAuditResponse - */ - 'auditEndTime'?: string; -} -/** - * - * @export - * @interface GetHealthCheck200Response - */ -export interface GetHealthCheck200Response { - /** - * - * @type {string} - * @memberof GetHealthCheck200Response - */ - 'status'?: string; -} -/** - * A collection of available and unavailable routes - * @export - * @interface GetRoutes200Response - */ -export interface GetRoutes200Response { - /** - * A collection of route objects - * @type {Array} - * @memberof GetRoutes200Response - */ - 'routes': Array; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInner - */ -export interface GetRoutes200ResponseRoutesInner { - /** - * A unique identifier of the route. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'id': string; - /** - * A unique identifier for the gateway. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'gatewayID': string; - /** - * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'mode': GetRoutes200ResponseRoutesInnerModeEnum; - /** - * The ID of the DLT Network where the operation will originate. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromDLTNetworkID'?: string; - /** - * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromAmountUSD'?: number; - /** - * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The ID of the DLT Network where the operation will end. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toDLTNetworkID'?: string; - /** - * The expected amount to be received in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toAmountUSD'?: string; - /** - * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toAmount'?: string; - /** - * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toAmountMin'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The expected gas cost in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'gasCostUSD'?: string; - /** - * Whether chain switching is enabled or not. - * @type {boolean} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'containsSwitchChain'?: boolean; - /** - * List of steps involved in this route, adjusted for mode. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'steps'?: Array; - /** - * - * @type {GetRoutes200ResponseRoutesInnerInsurance} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInner - */ - 'tags'?: Array; -} - -export const GetRoutes200ResponseRoutesInnerModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type GetRoutes200ResponseRoutesInnerModeEnum = typeof GetRoutes200ResponseRoutesInnerModeEnum[keyof typeof GetRoutes200ResponseRoutesInnerModeEnum]; - -/** - * Metadata detailing a supported token - * @export - * @interface GetRoutes200ResponseRoutesInnerFromToken - */ -export interface GetRoutes200ResponseRoutesInnerFromToken { - /** - * The network of the DLT being interacted with. TODO: implement network identification draft - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'chainID': string; - /** - * Supported DLT protocols. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'chainType': GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum; - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'address': string; - /** - * The name of the token. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'name'?: string; - /** - * The symbol of the token. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'symbol': string; - /** - * How many decimals the token supports. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'decimals': number; - /** - * The logo of a token, chain, dex etc. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'logoURI'?: string; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'tags'?: Array; - /** - * The current price of the token in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'priceUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} - * @memberof GetRoutes200ResponseRoutesInnerFromToken - */ - 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; -} - -export const GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = { - HyperledgerFabric: 'HyperledgerFabric', - HyperledgerBesu: 'HyperledgerBesu' -} as const; - -export type GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum[keyof typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum]; - -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensions - */ -export interface GetRoutes200ResponseRoutesInnerFromTokenExtensions { - /** - * - * @type {{ [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }} - * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions - */ - 'bridgeInfo'?: { [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }; - /** - * Indicates whether the token is verified. - * @type {boolean} - * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions - */ - 'verified'?: boolean; -} -/** - * Information about the bridge used for the token transfer. - * @export - * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - */ -export interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - /** - * The address of the token being transferred. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - */ - 'tokenAddress'?: string; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerInsurance - */ -export interface GetRoutes200ResponseRoutesInnerInsurance { - /** - * The state of insurance applicability for the transaction. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerInsurance - */ - 'state'?: GetRoutes200ResponseRoutesInnerInsuranceStateEnum; - /** - * The fee amount for insurance, represented in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerInsurance - */ - 'feeAmountUsd'?: string; -} - -export const GetRoutes200ResponseRoutesInnerInsuranceStateEnum = { - NotInsurable: 'NOT_INSURABLE', - Insurable: 'INSURABLE', - Insured: 'INSURED' -} as const; - -export type GetRoutes200ResponseRoutesInnerInsuranceStateEnum = typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum[keyof typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum]; - -/** - * Details a single step within a route including actions and estimates. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInner - */ -export interface GetRoutes200ResponseRoutesInnerStepsInner { - /** - * Id of the step - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'id'?: string; - /** - * Type of the step, typically describing the action, e.g., \'swap\'. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'type'?: string; - /** - * Tool used in the step, e.g., \'stargate\'. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'tool'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * IDs of further steps included within this step, allowing for nested actions without direct recursion. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerStepsInner - */ - 'includedStepIds'?: Array; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerAction - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerAction { - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'slippage'?: number; - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'fromAddress'?: string; - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction - */ - 'toAddress'?: string; -} -/** - * Provides an estimation for a transaction, including costs, amounts, and execution duration. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - /** - * A blockchain address. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'approvalAddress'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'toAmountMin'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'toAmount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'fromAmount'?: string; - /** - * A collection of fee costs associated with the transaction. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'feeCosts'?: Array; - /** - * A collection of estimated gas costs for executing the transaction. - * @type {Array} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'gasCosts'?: Array; - /** - * The estimated duration for the transaction execution in seconds. - * @type {number} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'executionDuration'?: number; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'fromAmountUSD'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'toAmountUSD'?: string; - /** - * The tool or service used to generate this estimate. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate - */ - 'tool'?: string; -} -/** - * Details about a specific fee cost associated with the transaction. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - /** - * Name of the fee cost. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'name'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'amount'?: string; - /** - * The amount in string format including all decimals. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'amountUSD'?: string; - /** - * The symbol of a token - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'token'?: string; - /** - * Indicates if the fee is included in the transaction amount. - * @type {boolean} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - */ - 'included'?: boolean; -} -/** - * - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - /** - * The type of the gas cost. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'type'?: string; - /** - * The gas price, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'price'?: string; - /** - * The estimated gas required, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'estimate'?: string; - /** - * The gas limit for the transaction, specified as a string to maintain precision. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'limit'?: string; - /** - * The amount of gas required in the gas currency. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'amount'?: string; - /** - * The amount of gas required in USD. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'amountUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - */ - 'token'?: GetRoutes200ResponseRoutesInnerFromToken; -} -/** - * Describes integration or tool details such as bridges or exchanges involved in the transaction. - * @export - * @interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ -export interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - /** - * A unique identifier for the integration or tool. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ - 'key': string; - /** - * The name of the integration or tool. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ - 'name': string; - /** - * URL to the logo of the integration or tool. - * @type {string} - * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - */ - 'logoURI': string; -} -/** - * - * @export - * @interface HealthCheckResponse - */ -export interface HealthCheckResponse { - /** - * - * @type {string} - * @memberof HealthCheckResponse - */ - 'status'?: string; -} -/** - * Details a single step within a route including actions and estimates. - * @export - * @interface IncludedStep - */ -export interface IncludedStep { - /** - * Id of the step - * @type {string} - * @memberof IncludedStep - */ - 'id'?: string; - /** - * Type of the step, typically describing the action, e.g., \'swap\'. - * @type {string} - * @memberof IncludedStep - */ - 'type'?: string; - /** - * Tool used in the step, e.g., \'stargate\'. - * @type {string} - * @memberof IncludedStep - */ - 'tool'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} - * @memberof IncludedStep - */ - 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} - * @memberof IncludedStep - */ - 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof IncludedStep - */ - 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * - * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} - * @memberof IncludedStep - */ - 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; - /** - * IDs of further steps included within this step, allowing for nested actions without direct recursion. - * @type {Array} - * @memberof IncludedStep - */ - 'includedStepIds'?: Array; -} -/** - * - * @export - * @interface Insurance - */ -export interface Insurance { - /** - * The state of insurance applicability for the transaction. - * @type {string} - * @memberof Insurance - */ - 'state'?: InsuranceStateEnum; - /** - * The fee amount for insurance, represented in USD. - * @type {string} - * @memberof Insurance - */ - 'feeAmountUsd'?: string; -} - -export const InsuranceStateEnum = { - NotInsurable: 'NOT_INSURABLE', - Insurable: 'INSURABLE', - Insured: 'INSURED' -} as const; - -export type InsuranceStateEnum = typeof InsuranceStateEnum[keyof typeof InsuranceStateEnum]; - -/** - * Describes integration or tool details such as bridges or exchanges involved in the transaction. - * @export - * @interface IntegrationDetails - */ -export interface IntegrationDetails { - /** - * A unique identifier for the integration or tool. - * @type {string} - * @memberof IntegrationDetails - */ - 'key': string; - /** - * The name of the integration or tool. - * @type {string} - * @memberof IntegrationDetails - */ - 'name': string; - /** - * URL to the logo of the integration or tool. - * @type {string} - * @memberof IntegrationDetails - */ - 'logoURI': string; -} -/** - * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. - * @export - * @interface Pause200Response - */ -export interface Pause200Response { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Pause200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. - * @export - * @interface PauseRequest - */ -export interface PauseRequest { - /** - * - * @type {string} - * @memberof PauseRequest - */ - 'sessionId'?: string; - /** - * - * @type {string} - * @memberof PauseRequest - */ - 'contextId'?: string; -} -/** - * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. - * @export - * @interface PauseResponse - */ -export interface PauseResponse { - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof PauseResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * - * @export - * @interface Route - */ -export interface Route { - /** - * A unique identifier of the route. - * @type {string} - * @memberof Route - */ - 'id': string; - /** - * A unique identifier for the gateway. - * @type {string} - * @memberof Route - */ - 'gatewayID': string; - /** - * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. - * @type {string} - * @memberof Route - */ - 'mode': RouteModeEnum; - /** - * The ID of the DLT Network where the operation will originate. - * @type {string} - * @memberof Route - */ - 'fromDLTNetworkID'?: string; - /** - * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. - * @type {number} - * @memberof Route - */ - 'fromAmountUSD'?: number; - /** - * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof Route - */ - 'fromAmount'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Route - */ - 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The ID of the DLT Network where the operation will end. - * @type {string} - * @memberof Route - */ - 'toDLTNetworkID'?: string; - /** - * The expected amount to be received in USD. - * @type {string} - * @memberof Route - */ - 'toAmountUSD'?: string; - /** - * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof Route - */ - 'toAmount'?: string; - /** - * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - * @type {string} - * @memberof Route - */ - 'toAmountMin'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromToken} - * @memberof Route - */ - 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; - /** - * The expected gas cost in USD. - * @type {string} - * @memberof Route - */ - 'gasCostUSD'?: string; - /** - * Whether chain switching is enabled or not. - * @type {boolean} - * @memberof Route - */ - 'containsSwitchChain'?: boolean; - /** - * List of steps involved in this route, adjusted for mode. - * @type {Array} - * @memberof Route - */ - 'steps'?: Array; - /** - * - * @type {GetRoutes200ResponseRoutesInnerInsurance} - * @memberof Route - */ - 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof Route - */ - 'tags'?: Array; -} - -export const RouteModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type RouteModeEnum = typeof RouteModeEnum[keyof typeof RouteModeEnum]; - -/** - * A collection of available and unavailable routes - * @export - * @interface RoutesResponse - */ -export interface RoutesResponse { - /** - * A collection of route objects - * @type {Array} - * @memberof RoutesResponse - */ - 'routes': Array; -} -/** - * Request for retrieving the current status of a session, identified by the session ID. - * @export - * @interface StatusRequest - */ -export interface StatusRequest { - /** - * The ID of the session for which the status is being requested. - * @type {string} - * @memberof StatusRequest - */ - 'sessionID': string; -} -/** - * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. - * @export - * @interface StatusResponse - */ -export interface StatusResponse { - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'status': StatusResponseStatusEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'substatus': StatusResponseSubstatusEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'stage': StatusResponseStageEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'step': StatusResponseStepEnum; - /** - * - * @type {string} - * @memberof StatusResponse - */ - 'startTime': string; - /** - * - * @type {Transact200ResponseStatusResponseOriginChain} - * @memberof StatusResponse - */ - 'originChain': Transact200ResponseStatusResponseOriginChain; - /** - * - * @type {Transact200ResponseStatusResponseDestinationChain} - * @memberof StatusResponse - */ - 'destinationChain': Transact200ResponseStatusResponseDestinationChain; -} - -export const StatusResponseStatusEnum = { - NotFound: 'NOT_FOUND', - Invalid: 'INVALID', - Pending: 'PENDING', - Done: 'DONE', - Failed: 'FAILED' -} as const; - -export type StatusResponseStatusEnum = typeof StatusResponseStatusEnum[keyof typeof StatusResponseStatusEnum]; -export const StatusResponseSubstatusEnum = { - WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', - WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', - BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', - ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', - RefundInProgress: 'REFUND_IN_PROGRESS', - UnknownError: 'UNKNOWN_ERROR', - Completed: 'COMPLETED', - Partial: 'PARTIAL', - Refunded: 'REFUNDED', - NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' -} as const; - -export type StatusResponseSubstatusEnum = typeof StatusResponseSubstatusEnum[keyof typeof StatusResponseSubstatusEnum]; -export const StatusResponseStageEnum = { - Stage0: 'STAGE0', - Stage1: 'STAGE1', - Stage2: 'STAGE2', - Stage3: 'STAGE3' -} as const; - -export type StatusResponseStageEnum = typeof StatusResponseStageEnum[keyof typeof StatusResponseStageEnum]; -export const StatusResponseStepEnum = { - TransferInitializationClaims: 'transfer-initialization-claims', - ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', - TransferProposalMessage: 'transfer-proposal-message', - TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', - TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', - TransferCommenceMessage: 'transfer-commence-message', - CommenceResponseMessage: 'commence-response-message', - LockAssertionMessage: 'lock-assertion-message', - LockAssertionReceiptMessage: 'lock-assertion-receipt-message', - CommitPreparationMessage: 'commit-preparation-message', - CommitReadyMessage: 'commit-ready-message', - CommitFinalAssertionMessage: 'commit-final-assertion-message', - CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', - TransferCompleteMessage: 'transfer-complete-message', - RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', - RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', - RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', - RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', - RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', - RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', - RollbackCommenceResponseMessage: 'rollback-commence-response-message', - RollbackLockAssertionMessage: 'rollback-lock-assertion-message', - RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', - RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', - RollbackCommitReadyMessage: 'rollback-commit-ready-message', - RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', - RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', - RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' -} as const; - -export type StatusResponseStepEnum = typeof StatusResponseStepEnum[keyof typeof StatusResponseStepEnum]; - -/** - * Metadata detailing a supported token - * @export - * @interface Token - */ -export interface Token { - /** - * The network of the DLT being interacted with. TODO: implement network identification draft - * @type {string} - * @memberof Token - */ - 'chainID': string; - /** - * Supported DLT protocols. - * @type {string} - * @memberof Token - */ - 'chainType': TokenChainTypeEnum; - /** - * A blockchain address. - * @type {string} - * @memberof Token - */ - 'address': string; - /** - * The name of the token. - * @type {string} - * @memberof Token - */ - 'name'?: string; - /** - * The symbol of the token. - * @type {string} - * @memberof Token - */ - 'symbol': string; - /** - * How many decimals the token supports. - * @type {number} - * @memberof Token - */ - 'decimals': number; - /** - * The logo of a token, chain, dex etc. - * @type {string} - * @memberof Token - */ - 'logoURI'?: string; - /** - * List of tags identifiers providing additional context or categorization. - * @type {Array} - * @memberof Token - */ - 'tags'?: Array; - /** - * The current price of the token in USD. - * @type {string} - * @memberof Token - */ - 'priceUSD'?: string; - /** - * - * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} - * @memberof Token - */ - 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; -} - -export const TokenChainTypeEnum = { - HyperledgerFabric: 'HyperledgerFabric', - HyperledgerBesu: 'HyperledgerBesu' -} as const; - -export type TokenChainTypeEnum = typeof TokenChainTypeEnum[keyof typeof TokenChainTypeEnum]; - -/** - * Response schema for a transaction request. Includes the session ID and the current status of the transaction. - * @export - * @interface Transact200Response - */ -export interface Transact200Response { - /** - * Unique identifier (UUID) for the session. - * @type {string} - * @memberof Transact200Response - */ - 'sessionID': string; - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof Transact200Response - */ - 'statusResponse': Transact200ResponseStatusResponse; -} -/** - * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. - * @export - * @interface Transact200ResponseStatusResponse - */ -export interface Transact200ResponseStatusResponse { - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'status': Transact200ResponseStatusResponseStatusEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'substatus': Transact200ResponseStatusResponseSubstatusEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'stage': Transact200ResponseStatusResponseStageEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'step': Transact200ResponseStatusResponseStepEnum; - /** - * - * @type {string} - * @memberof Transact200ResponseStatusResponse - */ - 'startTime': string; - /** - * - * @type {Transact200ResponseStatusResponseOriginChain} - * @memberof Transact200ResponseStatusResponse - */ - 'originChain': Transact200ResponseStatusResponseOriginChain; - /** - * - * @type {Transact200ResponseStatusResponseDestinationChain} - * @memberof Transact200ResponseStatusResponse - */ - 'destinationChain': Transact200ResponseStatusResponseDestinationChain; -} - -export const Transact200ResponseStatusResponseStatusEnum = { - NotFound: 'NOT_FOUND', - Invalid: 'INVALID', - Pending: 'PENDING', - Done: 'DONE', - Failed: 'FAILED' -} as const; - -export type Transact200ResponseStatusResponseStatusEnum = typeof Transact200ResponseStatusResponseStatusEnum[keyof typeof Transact200ResponseStatusResponseStatusEnum]; -export const Transact200ResponseStatusResponseSubstatusEnum = { - WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', - WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', - BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', - ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', - RefundInProgress: 'REFUND_IN_PROGRESS', - UnknownError: 'UNKNOWN_ERROR', - Completed: 'COMPLETED', - Partial: 'PARTIAL', - Refunded: 'REFUNDED', - NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' -} as const; - -export type Transact200ResponseStatusResponseSubstatusEnum = typeof Transact200ResponseStatusResponseSubstatusEnum[keyof typeof Transact200ResponseStatusResponseSubstatusEnum]; -export const Transact200ResponseStatusResponseStageEnum = { - Stage0: 'STAGE0', - Stage1: 'STAGE1', - Stage2: 'STAGE2', - Stage3: 'STAGE3' -} as const; - -export type Transact200ResponseStatusResponseStageEnum = typeof Transact200ResponseStatusResponseStageEnum[keyof typeof Transact200ResponseStatusResponseStageEnum]; -export const Transact200ResponseStatusResponseStepEnum = { - TransferInitializationClaims: 'transfer-initialization-claims', - ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', - TransferProposalMessage: 'transfer-proposal-message', - TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', - TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', - TransferCommenceMessage: 'transfer-commence-message', - CommenceResponseMessage: 'commence-response-message', - LockAssertionMessage: 'lock-assertion-message', - LockAssertionReceiptMessage: 'lock-assertion-receipt-message', - CommitPreparationMessage: 'commit-preparation-message', - CommitReadyMessage: 'commit-ready-message', - CommitFinalAssertionMessage: 'commit-final-assertion-message', - CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', - TransferCompleteMessage: 'transfer-complete-message', - RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', - RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', - RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', - RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', - RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', - RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', - RollbackCommenceResponseMessage: 'rollback-commence-response-message', - RollbackLockAssertionMessage: 'rollback-lock-assertion-message', - RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', - RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', - RollbackCommitReadyMessage: 'rollback-commit-ready-message', - RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', - RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', - RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' -} as const; - -export type Transact200ResponseStatusResponseStepEnum = typeof Transact200ResponseStatusResponseStepEnum[keyof typeof Transact200ResponseStatusResponseStepEnum]; - -/** - * - * @export - * @interface Transact200ResponseStatusResponseDestinationChain - */ -export interface Transact200ResponseStatusResponseDestinationChain { - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseDestinationChain - */ - 'dltProtocol'?: any; - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseDestinationChain - */ - 'dltSubnetworkID'?: any; -} -/** - * - * @export - * @interface Transact200ResponseStatusResponseOriginChain - */ -export interface Transact200ResponseStatusResponseOriginChain { - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseOriginChain - */ - 'dltProtocol'?: any; - /** - * - * @type {any} - * @memberof Transact200ResponseStatusResponseOriginChain - */ - 'dltSubnetworkID'?: any; -} -/** - * An Error - * @export - * @interface TransactDefaultResponse - */ -export interface TransactDefaultResponse { - /** - * HTTP error type - * @type {string} - * @memberof TransactDefaultResponse - */ - 'type': string; - /** - * Numeric error code - * @type {number} - * @memberof TransactDefaultResponse - */ - 'code': number; - /** - * HTTP status of the error - * @type {number} - * @memberof TransactDefaultResponse - */ - 'status': number; - /** - * Long error description - * @type {string} - * @memberof TransactDefaultResponse - */ - 'message': string; - /** - * Timestamp of the error - * @type {string} - * @memberof TransactDefaultResponse - */ - 'timestamp': string; -} -/** - * Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. - * @export - * @interface TransactRequest - */ -export interface TransactRequest { - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'contextID': string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'mode': TransactRequestModeEnum; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'payload'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'fromDLTNetworkID'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'toDLTNetworkID'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'fromAmount'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'fromToken'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'toAmount'?: string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'toToken'?: string; -} - -export const TransactRequestModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; - -/** - * Response schema for a transaction request. Includes the session ID and the current status of the transaction. - * @export - * @interface TransactResponse - */ -export interface TransactResponse { - /** - * Unique identifier (UUID) for the session. - * @type {string} - * @memberof TransactResponse - */ - 'sessionID': string; - /** - * - * @type {Transact200ResponseStatusResponse} - * @memberof TransactResponse - */ - 'statusResponse': Transact200ResponseStatusResponse; -} - -/** - * AdminApi - axios parameter creator - * @export - */ -export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - _continue: async (continueRequest: ContinueRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'continueRequest' is not null or undefined - assertParamExists('_continue', 'continueRequest', continueRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(continueRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAudit: async (auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (auditStartDate !== undefined) { - localVarQueryParameter['auditStartDate'] = (auditStartDate as any instanceof Date) ? - (auditStartDate as any).toISOString() : - auditStartDate; - } - - if (auditEndDate !== undefined) { - localVarQueryParameter['auditEndDate'] = (auditEndDate as any instanceof Date) ? - (auditEndDate as any).toISOString() : - auditEndDate; - } - - if (includeProofs !== undefined) { - localVarQueryParameter['includeProofs'] = includeProofs; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHealthCheck: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatus: async (sessionID: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'sessionID' is not null or undefined - assertParamExists('getStatus', 'sessionID', sessionID) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (sessionID !== undefined) { - localVarQueryParameter['SessionID'] = sessionID; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - pause: async (pauseRequest: PauseRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'pauseRequest' is not null or undefined - assertParamExists('pause', 'pauseRequest', pauseRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(pauseRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * AdminApi - functional programming interface - * @export - */ -export const AdminApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) - return { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator._continue(continueRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAudit(auditStartDate, auditEndDate, includeProofs, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHealthCheck(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheck(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatus(sessionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatus(sessionID, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.pause(pauseRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * AdminApi - factory interface - * @export - */ -export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AdminApiFp(configuration) - return { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - _continue(continueRequest: ContinueRequest, options?: any): AxiosPromise { - return localVarFp._continue(continueRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: any): AxiosPromise { - return localVarFp.getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(axios, basePath)); - }, - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHealthCheck(options?: any): AxiosPromise { - return localVarFp.getHealthCheck(options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatus(sessionID: string, options?: any): AxiosPromise { - return localVarFp.getStatus(sessionID, options).then((request) => request(axios, basePath)); - }, - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - pause(pauseRequest: PauseRequest, options?: any): AxiosPromise { - return localVarFp.pause(pauseRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * AdminApi - object-oriented interface - * @export - * @class AdminApi - * @extends {BaseAPI} - */ -export class AdminApi extends BaseAPI { - /** - * Attempts to continue a previously paused transaction intent, resuming its execution. - * @summary Continue a paused transaction session - * @param {ContinueRequest} continueRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration)._continue(continueRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - * @summary Audit transactions - * @param {string} [auditStartDate] The start date for the audit period. - * @param {string} [auditEndDate] The end date for the audit period. - * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Responds if SATP Hermes is on - * @summary Health check endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public getHealthCheck(options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getHealthCheck(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Retrieve the status of a SATP session - * @summary Get SATP current session data - * @param {string} sessionID Unique identifier for the session. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public getStatus(sessionID: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getStatus(sessionID, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - * @summary Pause a transaction session - * @param {PauseRequest} pauseRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).pause(pauseRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - -/** - * TransactionApi - axios parameter creator - * @export - */ -export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cancel: async (cancelRequest: CancelRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'cancelRequest' is not null or undefined - assertParamExists('cancel', 'cancelRequest', cancelRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(cancelRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getIntegrations: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRoutes: async (fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'fromNetworkID' is not null or undefined - assertParamExists('getRoutes', 'fromNetworkID', fromNetworkID) - // verify required parameter 'fromAmount' is not null or undefined - assertParamExists('getRoutes', 'fromAmount', fromAmount) - // verify required parameter 'fromToken' is not null or undefined - assertParamExists('getRoutes', 'fromToken', fromToken) - // verify required parameter 'toDLTNetwork' is not null or undefined - assertParamExists('getRoutes', 'toDLTNetwork', toDLTNetwork) - // verify required parameter 'toToken' is not null or undefined - assertParamExists('getRoutes', 'toToken', toToken) - // verify required parameter 'fromAddress' is not null or undefined - assertParamExists('getRoutes', 'fromAddress', fromAddress) - // verify required parameter 'toAddress' is not null or undefined - assertParamExists('getRoutes', 'toAddress', toAddress) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (fromNetworkID !== undefined) { - localVarQueryParameter['fromNetworkID'] = fromNetworkID; - } - - if (fromAmount !== undefined) { - localVarQueryParameter['fromAmount'] = fromAmount; - } - - if (fromToken !== undefined) { - localVarQueryParameter['fromToken'] = fromToken; - } - - if (toDLTNetwork !== undefined) { - localVarQueryParameter['toDLTNetwork'] = toDLTNetwork; - } - - if (toToken !== undefined) { - localVarQueryParameter['toToken'] = toToken; - } - - if (fromAddress !== undefined) { - localVarQueryParameter['fromAddress'] = fromAddress; - } - - if (toAddress !== undefined) { - localVarQueryParameter['toAddress'] = toAddress; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transact: async (transactRequest: TransactRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'transactRequest' is not null or undefined - assertParamExists('transact', 'transactRequest', transactRequest) - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(transactRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * TransactionApi - functional programming interface - * @export - */ -export const TransactionApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration) - return { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(cancelRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getIntegrations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getIntegrations(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async transact(transactRequest: TransactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.transact(transactRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * TransactionApi - factory interface - * @export - */ -export const TransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TransactionApiFp(configuration) - return { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - cancel(cancelRequest: CancelRequest, options?: any): AxiosPromise { - return localVarFp.cancel(cancelRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getIntegrations(options?: any): AxiosPromise> { - return localVarFp.getIntegrations(options).then((request) => request(axios, basePath)); - }, - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: any): AxiosPromise { - return localVarFp.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(axios, basePath)); - }, - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - transact(transactRequest: TransactRequest, options?: any): AxiosPromise { - return localVarFp.transact(transactRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * TransactionApi - object-oriented interface - * @export - * @class TransactionApi - * @extends {BaseAPI} - */ -export class TransactionApi extends BaseAPI { - /** - * Attempts to cancel a previously submitted transaction intent using its session ID. - * @summary Cancel a transaction session - * @param {CancelRequest} cancelRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).cancel(cancelRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Retrieves metadata about each supported blockchain networks, chains, and other systems. - * @summary Get supported integrations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public getIntegrations(options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).getIntegrations(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a list of possible routes for swapping one asset for another across multiple exchanges - * @summary Get a list of routes for a gateway-to-gateway asset transfer - * @param {string} fromNetworkID The sending DLT Network. - * @param {string} fromAmount The amount that should be sent including all decimals. - * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. - * @param {string} toDLTNetwork The receiving DLT Network. - * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. - * @param {string} fromAddress The sending wallet address. - * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Allows users to queue intents for transactions based on specified parameters. - * @summary Submit a transaction intent - * @param {TransactRequest} transactRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TransactionApi - */ - public transact(transactRequest: TransactRequest, options?: AxiosRequestConfig) { - return TransactionApiFp(this.configuration).transact(transactRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts index f7d80f722b..40bb86d859 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts @@ -16,7 +16,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import OAS from "../../../json/openapi-blo-bundled.json"; import { IRequestOptions } from "../../core/types"; -import { StatusRequest } from "../../generated/openapi-blo/typescript-axios"; +import { StatusRequest } from "../../generated/gateway-client/typescript-axios"; export class GetStatusEndpointV1 implements IWebServiceEndpoint { public static readonly CLASS_NAME = "GetStatusEndpointV1"; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts index 8293a6586c..e115d7cd87 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts @@ -3,7 +3,7 @@ import { Configuration, AdminApi, TransactionApi, -} from "../../main/typescript/generated/openapi-blo/typescript-axios"; +} from "../../main/typescript/generated/gateway-client/typescript-axios"; //import { Api } from "@bufbuild/protobuf"; export function createClient( From 90974631bc22d01bd6c2543ea063ce03d776273e Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Tue, 16 Apr 2024 17:37:39 +0300 Subject: [PATCH 10/49] fix(satp-hermes): fix knex path for old gateway tests Signed-off-by: Rafael Belchior --- .../src/main/typescript/repository/knex-local-log-repository.ts | 2 +- .../main/typescript/repository/knex-remote-log-repository.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts index e74b027266..e5a71a4d9c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts @@ -7,7 +7,7 @@ export class KnexLocalLogRepository implements ILocalLogRepository { public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../../knex/knexfile.ts")[ + const configFile = require("../../../knex/knexfile.ts")[ process.env.ENVIRONMENT || "development" ]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts index 529eda61b5..09a7b87488 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-remote-log-repository.ts @@ -10,7 +10,7 @@ export class KnexRemoteLogRepository implements IRemoteLogRepository { // simulating a remote log storage public constructor(config: Knex.Config | undefined) { // eslint-disable-next-line @typescript-eslint/no-var-requires - const configFile = require("../../../../knex/knexfile-remote.ts")[ + const configFile = require("../../../knex/knexfile-remote.ts")[ process.env.ENVIRONMENT || "development" ]; From ad893f75564a60df398724c4723d431460ec7f0b Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Mon, 15 Apr 2024 19:08:52 +0100 Subject: [PATCH 11/49] feat(satp-hermes): update protos and services Signed-off-by: Carlos Amaro --- .../proto/cacti/satp/v02/common/session.proto | 50 +++--- .../src/main/typescript/core/dispatcher.ts | 34 ++-- .../src/main/typescript/core/session-utils.ts | 31 ++++ .../stage0.ts | 0 .../stage1-handler.ts} | 12 +- .../stage2-handler.ts} | 8 +- .../stage3-handler.ts} | 14 +- .../client/stage1-client-service.ts} | 149 +++++++++++------- .../client/stage2-client-service.ts} | 10 +- .../client/stage3-client-service.ts} | 8 +- .../satp-bridge/satp-bridge-manager.ts | 18 +++ .../stage-services/satp-bridge/satp-lock.ts | 1 - .../stage-services/satp-bridge/satp-unlock.ts | 2 - .../server/stage1-server-service.ts} | 51 +++--- .../server/stage2-server-service.ts} | 8 +- .../server/stage3-server-service.ts} | 8 +- .../src/main/typescript/gateway-refactor.ts | 10 +- .../proto/cacti/satp/v02/common/session_pb.ts | 116 ++++++++------ .../main/typescript/plugin-satp-gateway.ts | 2 +- 19 files changed, 322 insertions(+), 210 deletions(-) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-services => stage-handlers}/stage0.ts (100%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-services/stage1-service.ts => stage-handlers/stage1-handler.ts} (85%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-services/stage2-service.ts => stage-handlers/stage2-handler.ts} (82%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-services/stage3-service.ts => stage-handlers/stage3-handler.ts} (85%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-handlers/client/stage1-client-handler.ts => stage-services/client/stage1-client-service.ts} (76%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-handlers/client/stage2-client-handler.ts => stage-services/client/stage2-client-service.ts} (96%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-handlers/client/stage3-client-handler.ts => stage-services/client/stage3-client-service.ts} (98%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-handlers/server/stage1-server-handler.ts => stage-services/server/stage1-server-service.ts} (93%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-handlers/server/stage2-server-handler.ts => stage-services/server/stage2-server-service.ts} (97%) rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{stage-handlers/server/stage3-server-handler.ts => stage-services/server/stage3-server-service.ts} (98%) diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index 3f502462d2..6ca77ac19d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -37,30 +37,32 @@ message SessionData { string sender_gateway_owner_id = 27; string receiver_gateway_owner_id = 28; string hash_transfer_init_claims = 29; - cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 30; - cacti.satp.v02.common.LockType lock_type = 31; - uint64 lock_expiration_time = 32; - cacti.satp.v02.common.Permissions permitions = 33; - string developer_urn = 34; - cacti.satp.v02.common.CredentialProfile credential_profile = 35; - string subsequent_calls = 36; - string history = 37; - bool multiple_claims_allowed = 38; - bool multiple_cancels_allowed = 39; - string last_message_received_timestamp = 40; - MessageStagesTimestamps processed_timestamps = 41; - MessageStagesTimestamps received_timestamps = 42; - cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 43; - cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 44; - cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 45; - cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 46; - cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 47; - cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 48; - cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 49; - cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 50; - bool completed = 51; - ACCEPTANCE acceptance = 52; - string last_message_hash = 53; + string proposed_transfer_init_claims = 30; + cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 31; + cacti.satp.v02.common.LockType lock_type = 32; + uint64 lock_expiration_time = 33; + cacti.satp.v02.common.Permissions permissions = 34; + string developer_urn = 35; + cacti.satp.v02.common.CredentialProfile credential_profile = 36; + cacti.satp.v02.common.SubsequentCalls subsequent_calls = 37; + repeated cacti.satp.v02.common.History history = 38; + bool multiple_claims_allowed = 39; + bool multiple_cancels_allowed = 40; + string last_message_received_timestamp = 41; + MessageStagesTimestamps processed_timestamps = 42; + MessageStagesTimestamps received_timestamps = 43; + cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 44; + cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 45; + cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 46; + cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 47; + cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 48; + cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 49; + cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 50; + cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 51; + bool completed = 52; + ACCEPTANCE acceptance = 53; + string last_message_hash = 54; + cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 55; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts index 54707f63d3..65d822e08e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts @@ -5,13 +5,13 @@ import { LoggerProvider, } from "@hyperledger/cactus-common"; -import routesStage1 from "./stage-services/stage1-service"; -import routesStage2 from "./stage-services/stage2-service"; -import routesStage3 from "./stage-services/stage3-service"; -import { Stage1ServerHandler } from "./stage-handlers/server/stage1-server-handler"; +import routesStage1 from "./stage-handlers/stage1-handler"; +import routesStage2 from "./stage-handlers/stage2-handler"; +import routesStage3 from "./stage-handlers/stage3-handler"; +import { Stage1ServerService } from "./stage-services/server/stage1-server-service"; import { SATPGateway } from "../gateway-refactor"; -import { Stage2ServerHandler } from "./stage-handlers/server/stage2-server-handler"; -import { Stage3ServerHandler } from "./stage-handlers/server/stage3-server-handler"; +import { Stage2ServerService } from "./stage-services/server/stage2-server-service"; +import { Stage3ServerService } from "./stage-services/server/stage3-server-service"; export interface COREDispatcherOptions { logger: Logger; @@ -26,16 +26,13 @@ export class COREDispatcher { private endpoints: any[] | undefined; private readonly gateway: SATPGateway; - private readonly stage1Handler: Stage1ServerHandler; - private readonly stage2Handler: Stage2ServerHandler; - private readonly stage3Handler: Stage3ServerHandler; + private readonly stage1Service: Stage1ServerService; + private readonly stage2Service: Stage2ServerService; + private readonly stage3Service: Stage3ServerService; constructor( public readonly options: COREDispatcherOptions, gateway: SATPGateway, - stage1Handler: Stage1ServerHandler, - stage2Handler: Stage2ServerHandler, - stage3Handler: Stage3ServerHandler, ) { const fnTag = `${COREDispatcher.CLASS_NAME}#constructor()`; Checks.truthy(options, `${fnTag} arg options`); @@ -46,10 +43,11 @@ export class COREDispatcher { this.instanceId = options.instanceId; this.logger.info(`Instantiated ${this.className} OK`); + this.stage1Service = new Stage1ServerService(); + this.stage2Service = new Stage2ServerService(); + this.stage3Service = new Stage3ServerService(); + this.gateway = gateway; - this.stage1Handler = stage1Handler; - this.stage2Handler = stage2Handler; - this.stage3Handler = stage3Handler; } public get className(): string { @@ -66,9 +64,9 @@ export class COREDispatcher { } this.endpoints = [ - routesStage1(this.gateway, this.stage1Handler), - routesStage2(this.gateway, this.stage2Handler), - routesStage3(this.gateway, this.stage3Handler), + routesStage1(this.gateway, this.stage1Service), + routesStage2(this.gateway, this.stage2Service), + routesStage3(this.gateway, this.stage3Service), ]; return this.endpoints; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts index 88a9db6a28..160eabd490 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts @@ -394,3 +394,34 @@ export function getMessageTimestamp( throw new Error("Message hash not found"); } } + +export function checkSessionData(sessionData: SessionData): boolean { + if ( + sessionData.version == undefined || + sessionData.id == undefined || + sessionData.digitalAssetId == undefined || + sessionData.originatorPubkey == undefined || + sessionData.beneficiaryPubkey == undefined || + sessionData.senderGatewayNetworkId == undefined || + sessionData.recipientGatewayNetworkId == undefined || + sessionData.clientGatewayPubkey == undefined || + sessionData.serverGatewayPubkey == undefined || + sessionData.senderGatewayOwnerId == undefined || + sessionData.receiverGatewayOwnerId == undefined || + // sessionData.maxRetries == undefined || + // sessionData.maxTimeout == undefined || + sessionData.senderGatewayNetworkId == undefined || + sessionData.signatureAlgorithm == undefined || + sessionData.lockType == undefined || + sessionData.lockExpirationTime == undefined || + sessionData.credentialProfile == undefined || + sessionData.loggingProfile == undefined || + sessionData.accessControlProfile == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.multipleClaimsAllowed == undefined || + sessionData.multipleCancelsAllowed == undefined + ) { + return false; + } + return true; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage0.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts similarity index 85% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 0fbad17eb5..1681ac6367 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage1-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -6,11 +6,11 @@ import { TransferProposalRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; import { SATPGateway } from "../../gateway-refactor"; -import { Stage1ServerHandler } from "../stage-handlers/server/stage1-server-handler"; +import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; -export default (gateway: SATPGateway, handler: Stage1ServerHandler) => +export default (gateway: SATPGateway, service: Stage1ServerService) => (router: ConnectRouter) => router.service(SatpStage1Service, { async transferProposal( @@ -21,7 +21,7 @@ export default (gateway: SATPGateway, handler: Stage1ServerHandler) => const recvTimestamp: string = Date.now().toString(); const [sessionData, reject] = - await handler.checkTransferProposalRequestMessage(req, gateway); + await service.checkTransferProposalRequestMessage(req, gateway); saveTimestamp( sessionData, @@ -30,7 +30,7 @@ export default (gateway: SATPGateway, handler: Stage1ServerHandler) => recvTimestamp, ); - const message = await handler.transferProposalResponse( + const message = await service.transferProposalResponse( req, reject, gateway, @@ -65,7 +65,7 @@ export default (gateway: SATPGateway, handler: Stage1ServerHandler) => console.log("Received TransferCommenceRequest", req, context); const recvTimestamp: string = Date.now().toString(); - const sessionData = await handler.checkTransferCommenceRequestMessage( + const sessionData = await service.checkTransferCommenceRequestMessage( req, gateway, ); @@ -77,7 +77,7 @@ export default (gateway: SATPGateway, handler: Stage1ServerHandler) => recvTimestamp, ); - const message = await handler.transferCommenceResponse(req, gateway); + const message = await service.transferCommenceResponse(req, gateway); if (!message) { throw new Error("No message returned from transferProposalResponse"); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts similarity index 82% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index 87d90758c4..05edd7f946 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage2-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -2,11 +2,11 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; import { LockAssertionRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; import { SATPGateway } from "../../gateway-refactor"; -import { Stage2ServerHandler } from "../stage-handlers/server/stage2-server-handler"; +import { Stage2ServerService } from "../stage-services/server/stage2-server-service"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; -export default (gateway: SATPGateway, handler: Stage2ServerHandler) => +export default (gateway: SATPGateway, service: Stage2ServerService) => (router: ConnectRouter) => router.service(SatpStage2Service, { async lockAssertion( @@ -16,7 +16,7 @@ export default (gateway: SATPGateway, handler: Stage2ServerHandler) => console.log("Received LockAssertionRequest", req, context); const recvTimestamp: string = Date.now().toString(); - const sessionData = await handler.checkLockAssertionRequestMessage( + const sessionData = await service.checkLockAssertionRequestMessage( req, gateway, ); @@ -28,7 +28,7 @@ export default (gateway: SATPGateway, handler: Stage2ServerHandler) => recvTimestamp, ); - const message = await handler.lockAssertionResponse(req, gateway); + const message = await service.lockAssertionResponse(req, gateway); if (!message) { throw new Error("No message returned from lockAssertionResponse"); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts similarity index 85% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index f8ff856ee9..35dfc093e7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/stage3-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -6,12 +6,12 @@ import { TransferCompleteRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_3_pb"; import { Empty } from "@bufbuild/protobuf"; -import { Stage3ServerHandler } from "../stage-handlers/server/stage3-server-handler"; +import { Stage3ServerService } from "../stage-services/server/stage3-server-service"; import { SATPGateway } from "../../gateway-refactor"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; -export default (gateway: SATPGateway, handler: Stage3ServerHandler) => +export default (gateway: SATPGateway, service: Stage3ServerService) => (router: ConnectRouter) => router.service(SatpStage3Service, { async commitPreparation( @@ -21,7 +21,7 @@ export default (gateway: SATPGateway, handler: Stage3ServerHandler) => console.log("Received CommitPreparationRequest", req, context); const recvTimestamp: string = Date.now().toString(); - const sessionData = await handler.checkCommitPreparationRequestMessage( + const sessionData = await service.checkCommitPreparationRequestMessage( req, gateway, ); @@ -33,7 +33,7 @@ export default (gateway: SATPGateway, handler: Stage3ServerHandler) => recvTimestamp, ); - const message = await handler.commitReady(req, gateway); + const message = await service.commitReady(req, gateway); if (!message) { throw new Error("No message returned from commitPreparation"); @@ -57,7 +57,7 @@ export default (gateway: SATPGateway, handler: Stage3ServerHandler) => const recvTimestamp: string = Date.now().toString(); const sessionData = - await handler.checkCommitFinalAssertionRequestMessage(req, gateway); + await service.checkCommitFinalAssertionRequestMessage(req, gateway); saveTimestamp( sessionData, @@ -66,7 +66,7 @@ export default (gateway: SATPGateway, handler: Stage3ServerHandler) => recvTimestamp, ); - const message = await handler.commitFinalAcknowledgementReceiptResponse( + const message = await service.commitFinalAcknowledgementReceiptResponse( req, gateway, ); @@ -90,7 +90,7 @@ export default (gateway: SATPGateway, handler: Stage3ServerHandler) => console.log("Received TransferCompleteRequest", req, context); const recvTimestamp: string = Date.now().toString(); - const sessionData = await handler.checkTransferCompleteRequestMessage( + const sessionData = await service.checkTransferCompleteRequestMessage( req, gateway, ); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts similarity index 76% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 57bbb7cf3d..e13e1bf539 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage1-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -19,20 +19,25 @@ import { storeLog, verifySignature, } from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; - -export class Stage1ClientHandler { - public static readonly CLASS_NAME = "Stage1Handler-Client"; +import { + getMessageHash, + saveHash, + saveSignature, + checkSessionData, +} from "../../session-utils"; + +export class Stage1ClientService { + public static readonly CLASS_NAME = "Stage1Service-Client"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage1ClientHandler.CLASS_NAME; + const label = Stage1ClientService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage1ClientHandler.CLASS_NAME; + return Stage1ClientService.CLASS_NAME; } public get log(): Logger { @@ -47,40 +52,7 @@ export class Stage1ClientHandler { const sessionData = gateway.getSession(sessionID); - if ( - //todo maybe remove this? - sessionData == undefined || - sessionData.version == undefined || - sessionData.id == undefined || - //sessionData.transferContextId == undefined || - sessionData.digitalAssetId == undefined || - //sessionData.assetProfileId == undefined || - sessionData.originatorPubkey == undefined || - sessionData.beneficiaryPubkey == undefined || - sessionData.senderGatewayNetworkId == undefined || - sessionData.recipientGatewayNetworkId == undefined || - sessionData.clientGatewayPubkey == undefined || - sessionData.serverGatewayPubkey == undefined || - sessionData.senderGatewayOwnerId == undefined || - sessionData.receiverGatewayOwnerId == undefined || - // sessionData.maxRetries == undefined || - // sessionData.maxTimeout == undefined || - sessionData.senderGatewayNetworkId == undefined || - sessionData.signatureAlgorithm == undefined || - sessionData.lockType == undefined || - sessionData.lockExpirationTime == undefined || - //sessionData.permitions == undefined || - //sessionData.developerUrn == undefined || - sessionData.credentialProfile == undefined || - //sessionData.applicationProfile == undefined || - sessionData.loggingProfile == undefined || - sessionData.accessControlProfile == undefined || - sessionData.lastSequenceNumber == undefined //|| - //sessionData.subsequentCalls == undefined || - //sessionData.history == undefined || - //sessionData.multipleClaimsAllowed == undefined || - //sessionData.multipleCancelsAllowed == undefined - ) { + if (sessionData == undefined || !checkSessionData(sessionData)) { throw new Error(`${fnTag}, session data is not correctly initialized`); } @@ -100,16 +72,12 @@ export class Stage1ClientHandler { commonBody.version = sessionData.version; commonBody.messageType = MessageType.INIT_PROPOSAL; commonBody.sessionId = sessionData.id; - // commonBody.transferContextId = sessionData.transferContextId; commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); commonBody.resourceUrl = ""; - //commonBody.actionResponse = new ActionResponse(); - // commonBody.credentialBlock = sessionData.credentialBlock; - // commonBody.payloadProfile = sessionData.payloadProfile; - // commonBody.applicationProfile = sessionData.applicationProfile; - // commonBody.payload = new Payload(); - // commonBody.payloadHash = ""; + if (sessionData.transferContextId != undefined) { + commonBody.transferContextId = sessionData.transferContextId; + } commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -142,22 +110,63 @@ export class Stage1ClientHandler { networkCapabilities.signatureAlgorithm = sessionData.signatureAlgorithm; networkCapabilities.lockType = sessionData.lockType; networkCapabilities.lockExpirationTime = sessionData.lockExpirationTime; - //networkCapabilities.permitions = sessionData.permitions; - //networkCapabilities.developerUrn = sessionData.developerUrn; networkCapabilities.credentialProfile = sessionData.credentialProfile; - //networkCapabilities.applicationProfile = sessionData.applicationProfile; networkCapabilities.loggingProfile = sessionData.loggingProfile; networkCapabilities.accessControlProfile = sessionData.accessControlProfile; - //networkCapabilities.subsequentCalls = sessionData.subsequentCalls; - //networkCapabilities.history = sessionData.history; + + if (sessionData.permissions != undefined) { + this.log.info(`${fnTag}, Optional variable loaded: permissions...`); + networkCapabilities.permissions = sessionData.permissions; + } + + if (sessionData.developerUrn != undefined) { + this.log.info(`${fnTag}, Optional variable loaded: developerUrn...`); + networkCapabilities.developerUrn = sessionData.developerUrn; + } + + if (sessionData.applicationProfile != undefined) { + this.log.info( + `${fnTag}, Optional variable loaded: applicationProfile...`, + ); + networkCapabilities.applicationProfile = sessionData.applicationProfile; + } + + if (sessionData.subsequentCalls != undefined) { + this.log.info(`${fnTag}, Optional variable loaded: subsequentCalls...`); + networkCapabilities.subsequentCalls = sessionData.subsequentCalls; + } + + if (sessionData.history != undefined) { + this.log.info(`${fnTag}, Optional variable loaded: history...`); + networkCapabilities.history = sessionData.history; + } const transferProposalRequestMessage = new TransferProposalRequestMessage(); transferProposalRequestMessage.common = commonBody; transferProposalRequestMessage.transferInitClaims = transferInitClaims; - // transferProposalRequestMessage.transferInitClaimsFormat = sessionData.transferInitClaimsFormat; transferProposalRequestMessage.networkCapabilities = networkCapabilities; - // transferProposalRequestMessage.multipleClaimsAllowed = sessionData.multipleClaimsAllowed; - // transferProposalRequestMessage.multipleCancelsAllowed = sessionData.multipleCancelsAllowed; + + if (sessionData.transferClaimsFormat != undefined) { + this.log.info( + `${fnTag}, Optional variable loaded: transferInitClaimsFormat...`, + ); + transferProposalRequestMessage.transferInitClaimsFormat = + sessionData.transferClaimsFormat; + } + if (sessionData.multipleCancelsAllowed != undefined) { + this.log.info( + `${fnTag}, Optional variable loaded: multipleCancelsAllowed...`, + ); + transferProposalRequestMessage.multipleCancelsAllowed = + sessionData.multipleCancelsAllowed; + } + if (sessionData.multipleClaimsAllowed != undefined) { + this.log.info( + `${fnTag}, Optional variable loaded: multipleClaimsAllowed...`, + ); + transferProposalRequestMessage.multipleClaimsAllowed = + sessionData.multipleClaimsAllowed; + } const messageSignature = bufArray2HexStr( sign( @@ -261,7 +270,6 @@ export class Stage1ClientHandler { return transferCommenceRequestMessage; } - //If is a reject message and there is no transferCounterClaims, then the there is no following up messages async checkTransferProposalReceiptRejectMessage( response: TransferProposalReceiptRejectMessage, gateway: SATPGateway, @@ -358,14 +366,39 @@ export class Stage1ClientHandler { ); } - this.log.info(`TransferProposalReceipt passed all checks.`); - if ( response.common.messageType == MessageType.INIT_REJECT && response.transferCounterClaims == undefined ) { + sessionData.completed = true; return false; + } else if ( + response.common.messageType == MessageType.INIT_REJECT && + response.transferCounterClaims != undefined + ) { + if (this.checkProposedTransferClaims(response.transferCounterClaims)) { + sessionData.proposedTransferInitClaims = getHash( + response.transferCounterClaims, + ); + return true; + } else { + this.log.info( + `TransferProposalReceipt proposedTransferClaims were rejected`, + ); + sessionData.completed = true; + return false; + } } + this.log.info(`TransferProposalReceipt passed all checks.`); + return true; + } + + private checkProposedTransferClaims( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + counterTransfer: TransferClaims, + ): boolean { + //const fnTag = `${this.className}#checkCounterTransferClaims()`; + //todo return true; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index a766eb07a0..0dc15b6a1f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage2-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -16,18 +16,18 @@ import { } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -export class Stage2ClientHandler { - public static readonly CLASS_NAME = "Stage2Handler-Client"; +export class Stage2ClientService { + public static readonly CLASS_NAME = "Stage2Service-Client"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage2ClientHandler.CLASS_NAME; + const label = Stage2ClientService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage2ClientHandler.CLASS_NAME; + return Stage2ClientService.CLASS_NAME; } public get log(): Logger { @@ -75,7 +75,7 @@ export class Stage2ClientHandler { lockAssertionRequestMessage.lockAssertionClaim = sessionData.lockAssertionClaim; lockAssertionRequestMessage.lockAssertionFormat = - sessionData.lockAssertionFormat; //todo change this + sessionData.lockAssertionFormat; const messageSignature = bufArray2HexStr( sign(gateway.gatewaySigner, JSON.stringify(lockAssertionRequestMessage)), diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts similarity index 98% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 08a04a2231..4fdf9818d3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/client/stage3-client-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -22,18 +22,18 @@ import { } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -export class Stage3ClientHandler { - public static readonly CLASS_NAME = "Stage3Handler-Client"; +export class Stage3ClientService { + public static readonly CLASS_NAME = "Stage3Service-Client"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage3ClientHandler.CLASS_NAME; + const label = Stage3ClientService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage3ClientHandler.CLASS_NAME; + return Stage3ClientService.CLASS_NAME; } public get log(): Logger { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts index 304a7bda0c..6bd6a18bab 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -1,3 +1,21 @@ // this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). // should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output +export abstract class SATPBridgeManager { + public abstract lockAsset( + sessionId: string, + assetId: string, + ): Promise; + public abstract unlockAsset( + sessionId: string, + assetId: string, + ): Promise; + public abstract mintAsset( + sessionId: string, + assetId: string, + ): Promise; + public abstract burnAsset( + sessionId: string, + assetId: string, + ): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts deleted file mode 100644 index d47dec14f7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-lock.ts +++ /dev/null @@ -1 +0,0 @@ -// TODO Implement lock interface for all SATP supported chains \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts deleted file mode 100644 index 7f0f638ade..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-unlock.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO Implement unlock interface for all SATP supported chains -// TODO implement other required interfaces diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts similarity index 93% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index d3b5f842d1..2b906aad7b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage1-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -33,18 +33,18 @@ import { saveSignature, } from "../../session-utils"; -export class Stage1ServerHandler { - public static readonly CLASS_NAME = "Stage1Handler-Server"; +export class Stage1ServerService { + public static readonly CLASS_NAME = "Stage1Service-Server"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage1ServerHandler.CLASS_NAME; + const label = Stage1ServerService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage1ServerHandler.CLASS_NAME; + return Stage1ServerService.CLASS_NAME; } public get log(): Logger { @@ -106,18 +106,6 @@ export class Stage1ServerHandler { MessageType.INIT_PROPOSAL, ); - if (reject) { - commonBody.messageType = MessageType.INIT_REJECT; - sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; - sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_CONDITIONAL; - - //todo check if there are transferClaims possible if not just not send - } else { - commonBody.messageType = MessageType.INIT_RECEIPT; - sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; - } - - //todo if rejection const transferProposalReceiptMessage = new TransferProposalReceiptRejectMessage(); transferProposalReceiptMessage.common = commonBody; @@ -129,6 +117,25 @@ export class Stage1ServerHandler { TimestampType.RECEIVED, ); + if (reject) { + commonBody.messageType = MessageType.INIT_REJECT; + const counterProposalTransferClaims = this.counterProposalTransferClaims( + request.transferInitClaims, + ); + + if (!counterProposalTransferClaims) { + this.log.info(`${fnTag}, ProposalTransferClaims were rejected...`); + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; + } else { + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_CONDITIONAL; + transferProposalReceiptMessage.transferCounterClaims = + counterProposalTransferClaims; + } + } else { + commonBody.messageType = MessageType.INIT_RECEIPT; + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; + } + const messageSignature = bufArray2HexStr( sign( gateway.gatewaySigner, @@ -301,7 +308,7 @@ export class Stage1ServerHandler { .getSupportedDltIDs() .includes(request.transferInitClaims.senderGatewayNetworkId) ) { - throw new Error( + throw new Error( //todo change this to the transferClaims check `${fnTag}, recipient gateway dlt system is not supported by this gateway`, ); } @@ -458,8 +465,16 @@ export class Stage1ServerHandler { } // eslint-disable-next-line @typescript-eslint/no-unused-vars - checkTransferClaims(transferClaims: TransferClaims): boolean { + private checkTransferClaims(transferClaims: TransferClaims): boolean { //todo return true; } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + private counterProposalTransferClaims( + oldClaims: TransferClaims, + ): TransferClaims { + //todo + return oldClaims; + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts similarity index 97% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 61d8a398ee..530cd35e46 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage2-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -18,18 +18,18 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -export class Stage2ServerHandler { - public static readonly CLASS_NAME = "Stage2Handler-Server"; +export class Stage2ServerService { + public static readonly CLASS_NAME = "Stage2Service-Server"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage2ServerHandler.CLASS_NAME; + const label = Stage2ServerService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage2ServerHandler.CLASS_NAME; + return Stage2ServerService.CLASS_NAME; } public get log(): Logger { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts similarity index 98% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 50ebe48b41..e7da3b2701 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/server/stage3-server-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -21,18 +21,18 @@ import { } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -export class Stage3ServerHandler { - public static readonly CLASS_NAME = "Stage3Handler-Server"; +export class Stage3ServerService { + public static readonly CLASS_NAME = "Stage3Service-Server"; private _log: Logger; constructor() { const level = "INFO"; - const label = Stage3ServerHandler.CLASS_NAME; + const label = Stage3ServerService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); } public get className(): string { - return Stage3ServerHandler.CLASS_NAME; + return Stage3ServerService.CLASS_NAME; } public get log(): Logger { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts index eead5ec3e9..901f465b96 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -39,12 +39,11 @@ import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; import { SessionData } from "./generated/proto/cacti/satp/v02/common/session_pb"; import { expressConnectMiddleware } from "@connectrpc/connect-express"; import { bufArray2HexStr } from "./gateway-utils"; -import { COREDispatcher } from "./core/dispatcher"; +import { COREDispatcher, COREDispatcherOptions } from "./core/dispatcher"; import { ILocalLogRepository, IRemoteLogRepository, } from "./repository/interfaces/repository"; -import { IPluginLedgerConnector } from "@hyperledger/cactus-core-api"; import { SATPLedgerConnector } from "./types/blockchain-interaction"; export class SATPGateway { // todo more checks; example port from config is between 3000 and 9000 @@ -135,6 +134,12 @@ export class SATPGateway { instanceId: this.config.gid!.id, }; + const coreDispatcherOps: COREDispatcherOptions = { + logger: this.logger, + logLevel: this.config.logLevel, + instanceId: this.config.gid!.id, + }; + this.supportedDltIDs = this.config.gid!.supportedChains; if (!this.config.gid || !dispatcherOps.instanceId) { @@ -142,6 +147,7 @@ export class SATPGateway { } this.BLODispatcher = new BLODispatcher(dispatcherOps); + this.COREDispatcher = new COREDispatcher(coreDispatcherOps, this); } public getSessions(): Map { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 4f3d744d7c..f715a7cf52 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, LockAssertionClaim, LockAssertionFormat, LockType, MintAssertionClaims, MintAssertionClaimsFormat, PayloadProfile, Permissions, SignatureAlgorithm } from "./message_pb.js"; +import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, History, LockAssertionClaim, LockAssertionFormat, LockType, MintAssertionClaims, MintAssertionClaimsFormat, PayloadProfile, Permissions, SignatureAlgorithm, SubsequentCalls, TransferClaimsFormat } from "./message_pb.js"; /** * @generated from enum cacti.satp.v02.common.ACCEPTANCE @@ -183,125 +183,135 @@ export class SessionData extends Message { hashTransferInitClaims = ""; /** - * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 30; + * @generated from field: string proposed_transfer_init_claims = 30; + */ + proposedTransferInitClaims = ""; + + /** + * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 31; */ signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; /** - * @generated from field: cacti.satp.v02.common.LockType lock_type = 31; + * @generated from field: cacti.satp.v02.common.LockType lock_type = 32; */ lockType = LockType.UNSPECIFIED; /** - * @generated from field: uint64 lock_expiration_time = 32; + * @generated from field: uint64 lock_expiration_time = 33; */ lockExpirationTime = protoInt64.zero; /** - * @generated from field: cacti.satp.v02.common.Permissions permitions = 33; + * @generated from field: cacti.satp.v02.common.Permissions permissions = 34; */ - permitions?: Permissions; + permissions?: Permissions; /** - * @generated from field: string developer_urn = 34; + * @generated from field: string developer_urn = 35; */ developerUrn = ""; /** - * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 35; + * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 36; */ credentialProfile = CredentialProfile.UNSPECIFIED; /** - * @generated from field: string subsequent_calls = 36; + * @generated from field: cacti.satp.v02.common.SubsequentCalls subsequent_calls = 37; */ - subsequentCalls = ""; + subsequentCalls?: SubsequentCalls; /** - * @generated from field: string history = 37; + * @generated from field: repeated cacti.satp.v02.common.History history = 38; */ - history = ""; + history: History[] = []; /** - * @generated from field: bool multiple_claims_allowed = 38; + * @generated from field: bool multiple_claims_allowed = 39; */ multipleClaimsAllowed = false; /** - * @generated from field: bool multiple_cancels_allowed = 39; + * @generated from field: bool multiple_cancels_allowed = 40; */ multipleCancelsAllowed = false; /** - * @generated from field: string last_message_received_timestamp = 40; + * @generated from field: string last_message_received_timestamp = 41; */ lastMessageReceivedTimestamp = ""; /** - * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps processed_timestamps = 41; + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps processed_timestamps = 42; */ processedTimestamps?: MessageStagesTimestamps; /** - * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps received_timestamps = 42; + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps received_timestamps = 43; */ receivedTimestamps?: MessageStagesTimestamps; /** - * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 43; + * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 44; */ lockAssertionClaim?: LockAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 44; + * @generated from field: cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 45; */ lockAssertionFormat?: LockAssertionFormat; /** - * @generated from field: cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 45; + * @generated from field: cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 46; */ mintAssertionClaims?: MintAssertionClaims; /** - * @generated from field: cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 46; + * @generated from field: cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 47; */ mintAssertionClaimsFormat?: MintAssertionClaimsFormat; /** - * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 47; + * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 48; */ burnAssertionClaim?: BurnAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 48; + * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 49; */ burnAssertionClaimFormat?: BurnAssertionClaimFormat; /** - * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 49; + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 50; */ assignmentAssertionClaim?: AssignmentAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 50; + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 51; */ assignmentAssertionClaimFormat?: AssignmentAssertionClaimFormat; /** - * @generated from field: bool completed = 51; + * @generated from field: bool completed = 52; */ completed = false; /** - * @generated from field: cacti.satp.v02.common.ACCEPTANCE acceptance = 52; + * @generated from field: cacti.satp.v02.common.ACCEPTANCE acceptance = 53; */ acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; /** - * @generated from field: string last_message_hash = 53; + * @generated from field: string last_message_hash = 54; */ lastMessageHash = ""; + /** + * @generated from field: cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 55; + */ + transferClaimsFormat?: TransferClaimsFormat; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -339,30 +349,32 @@ export class SessionData extends Message { { no: 27, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 28, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 29, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 30, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, - { no: 31, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, - { no: 32, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 33, name: "permitions", kind: "message", T: Permissions }, - { no: 34, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 35, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, - { no: 36, name: "subsequent_calls", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 37, name: "history", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 38, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 39, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 40, name: "last_message_received_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 41, name: "processed_timestamps", kind: "message", T: MessageStagesTimestamps }, - { no: 42, name: "received_timestamps", kind: "message", T: MessageStagesTimestamps }, - { no: 43, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, - { no: 44, name: "lock_assertion_format", kind: "message", T: LockAssertionFormat }, - { no: 45, name: "mint_assertion_claims", kind: "message", T: MintAssertionClaims }, - { no: 46, name: "mint_assertion_claims_format", kind: "message", T: MintAssertionClaimsFormat }, - { no: 47, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, - { no: 48, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, - { no: 49, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, - { no: 50, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, - { no: 51, name: "completed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 52, name: "acceptance", kind: "enum", T: proto3.getEnumType(ACCEPTANCE) }, - { no: 53, name: "last_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 30, name: "proposed_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 31, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, + { no: 32, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, + { no: 33, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 34, name: "permissions", kind: "message", T: Permissions }, + { no: 35, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 36, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, + { no: 37, name: "subsequent_calls", kind: "message", T: SubsequentCalls }, + { no: 38, name: "history", kind: "message", T: History, repeated: true }, + { no: 39, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 40, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 41, name: "last_message_received_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 42, name: "processed_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 43, name: "received_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 44, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, + { no: 45, name: "lock_assertion_format", kind: "message", T: LockAssertionFormat }, + { no: 46, name: "mint_assertion_claims", kind: "message", T: MintAssertionClaims }, + { no: 47, name: "mint_assertion_claims_format", kind: "message", T: MintAssertionClaimsFormat }, + { no: 48, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, + { no: 49, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, + { no: 50, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, + { no: 51, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, + { no: 52, name: "completed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 53, name: "acceptance", kind: "enum", T: proto3.getEnumType(ACCEPTANCE) }, + { no: 54, name: "last_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 55, name: "transfer_claims_format", kind: "message", T: TransferClaimsFormat }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts index 046b37d527..9894b9b487 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts @@ -39,7 +39,7 @@ import { RecoverUpdateAckV1Message, RollbackV1Message, RollbackAckV1Message, - SessionData + SessionData, } from "./generated/openapi/typescript-axios"; import { CommitFinalRequestEndpointV1 } from "./web-services/server-side/commit-final-request-endpoint"; import { CommitFinalResponseEndpointV1 } from "./web-services/client-side/commit-final-response-endpoint"; From fc5c424d6e52ed1a708e993f5d0acaa45ec03d66 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 19 Apr 2024 15:28:50 +0300 Subject: [PATCH 12/49] fixup!: wip gateway refactoring Signed-off-by: Rafael Belchior --- .../gateway-client/.openapi-generator/FILES | 3 - .../proto/cacti/satp/v02/common/health.proto | 9 + .../main/proto/cacti/satp/v02/stage_1.proto | 4 +- .../src/main/typescript/core/dispatcher.ts | 74 ----- .../src/main/typescript/core/satp-session.ts | 33 ++ .../core/stage-handlers/stage1-handler.ts | 26 +- .../core/stage-handlers/stage2-handler.ts | 9 +- .../core/stage-handlers/stage3-handler.ts | 16 +- .../client/stage1-client-service.ts | 52 +-- .../client/stage2-client-service.ts | 29 +- .../client/stage3-client-service.ts | 57 ++-- .../server/stage1-server-service.ts | 86 +++-- .../server/stage2-server-service.ts | 26 +- .../server/stage3-server-service.ts | 48 +-- .../src/main/typescript/core/types.ts | 11 +- .../src/main/typescript/gateway-refactor.ts | 296 +++-------------- .../src/main/typescript/gateway-utils.ts | 2 +- .../cacti/satp/v02/common/health_connect.ts | 27 ++ .../proto/cacti/satp/v02/common/health_pb.ts | 39 +++ .../proto/cacti/satp/v02/stage_1_connect.ts | 4 +- .../proto/cacti/satp/v02/stage_1_pb.ts | 24 +- .../typescript/gol/gateway-orchestrator.ts | 300 ++++++++++++++---- .../protocol-manager-builder.ts | 5 + .../gol/protocol-manager/satp-manager.ts | 164 ++++++++++ .../network-identification/chainid-list.ts | 1 + .../network-identification/resolve-gateway.ts | 95 ++++++ .../main/typescript/types/satp-protocol.ts | 16 + .../gateway-coordinator-init.test.ts | 2 +- 28 files changed, 919 insertions(+), 539 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/health.proto delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES index 6830c54440..e101cc77cb 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -119,6 +118,4 @@ model_transact_default_response.go model_transact_request.go model_transact_response.go response.go -test/api_admin_test.go -test/api_transaction_test.go utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/health.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/health.proto new file mode 100644 index 0000000000..2018ce1919 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/health.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +package cacti.satp.v02.common; +import "cacti/satp/v02/common/message.proto"; + +message HealthCheckRequest {} + +service HealthService { + rpc CheckHealth(HealthCheckRequest) returns (Ack); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto index 4ea68757df..5b7aa8493e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto @@ -13,7 +13,7 @@ message TransferProposalRequestMessage { bool multiple_cancels_allowed = 6; } -message TransferProposalReceiptRejectMessage { +message TransferProposalReceiptMessage { cacti.satp.v02.common.CommonSatp common = 1; string hash_transfer_init_claims = 2; cacti.satp.v02.common.TransferClaims transfer_counter_claims = 3; @@ -31,6 +31,6 @@ message TransferCommenceResponseMessage { } service SatpStage1Service { - rpc TransferProposal(TransferProposalRequestMessage) returns (TransferProposalReceiptRejectMessage) {} + rpc TransferProposal(TransferProposalRequestMessage) returns (TransferProposalReceiptMessage) {} rpc TransferCommence(TransferCommenceRequestMessage) returns (TransferCommenceResponseMessage) {} } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts deleted file mode 100644 index 65d822e08e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/dispatcher.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { - Checks, - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import routesStage1 from "./stage-handlers/stage1-handler"; -import routesStage2 from "./stage-handlers/stage2-handler"; -import routesStage3 from "./stage-handlers/stage3-handler"; -import { Stage1ServerService } from "./stage-services/server/stage1-server-service"; -import { SATPGateway } from "../gateway-refactor"; -import { Stage2ServerService } from "./stage-services/server/stage2-server-service"; -import { Stage3ServerService } from "./stage-services/server/stage3-server-service"; - -export interface COREDispatcherOptions { - logger: Logger; - logLevel?: LogLevelDesc; - instanceId: string; -} - -export class COREDispatcher { - public static readonly CLASS_NAME = "COREDispacher"; - private readonly logger: Logger; - private readonly instanceId: string; - private endpoints: any[] | undefined; - - private readonly gateway: SATPGateway; - private readonly stage1Service: Stage1ServerService; - private readonly stage2Service: Stage2ServerService; - private readonly stage3Service: Stage3ServerService; - - constructor( - public readonly options: COREDispatcherOptions, - gateway: SATPGateway, - ) { - const fnTag = `${COREDispatcher.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.logger = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = options.instanceId; - this.logger.info(`Instantiated ${this.className} OK`); - - this.stage1Service = new Stage1ServerService(); - this.stage2Service = new Stage2ServerService(); - this.stage3Service = new Stage3ServerService(); - - this.gateway = gateway; - } - - public get className(): string { - return COREDispatcher.CLASS_NAME; - } - - getOrCreateServices() { - const fnTag = `${COREDispatcher.CLASS_NAME}#getOrCreateServices()`; - this.logger.info( - `${fnTag}, Registering gRPCservices on instanceId=${this.instanceId}`, - ); - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - this.endpoints = [ - routesStage1(this.gateway, this.stage1Service), - routesStage2(this.gateway, this.stage2Service), - routesStage3(this.gateway, this.stage3Service), - ]; - - return this.endpoints; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts new file mode 100644 index 0000000000..815022b2a2 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -0,0 +1,33 @@ +import { v4 as uuidv4 } from "uuid"; +import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; + + +export interface ISATPSessionOptions { + contextID: string; +} + +export class SATPSession { + private static readonly CLASS_NAME = "SATPSession"; + private sessionData: SessionData; + + constructor(ops: ISATPSessionOptions) { + this.sessionData = new SessionData(); + this.sessionData.transferContextId = ops.contextID; + + // TODO algorithm to create session ID from context ID + this.sessionData.id = ops.contextID + "-" + uuidv4(); + + } + + private initializeSessionID(): void { + if (this.sessionData.id === undefined) { + this.sessionData.id = uuidv4() + "-" + this.sessionData.transferContextId; + } else { + throw new Error("Session ID already initialized"); + } + } + + public getSessionData(): SessionData { + return this.sessionData; + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 1681ac6367..e1e8770d05 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -9,8 +9,12 @@ import { SATPGateway } from "../../gateway-refactor"; import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SATPSession } from "../satp-session"; +import { Stage1ClientService } from "../stage-services/client/stage1-client-service"; +import { ServiceType } from "@bufbuild/protobuf"; +import { SupportedGatewayImplementations } from "../types"; -export default (gateway: SATPGateway, service: Stage1ServerService) => +export const Stage1Handler = (session: SATPSession | undefined, serverService: Stage1ServerService, clientService: Stage1ClientService, connectClients: ServiceType[], supportedDLTs: SupportedGatewayImplementations[]) => (router: ConnectRouter) => router.service(SatpStage1Service, { async transferProposal( @@ -20,8 +24,8 @@ export default (gateway: SATPGateway, service: Stage1ServerService) => console.log("Received TransferProposalRequest", req, context); const recvTimestamp: string = Date.now().toString(); - const [sessionData, reject] = - await service.checkTransferProposalRequestMessage(req, gateway); + const sessionData = + await serverService.checkTransferProposalRequestMessage(req, session, supportedDLTs); saveTimestamp( sessionData, @@ -30,16 +34,16 @@ export default (gateway: SATPGateway, service: Stage1ServerService) => recvTimestamp, ); - const message = await service.transferProposalResponse( + const message = await serverService.transferProposalResponse( req, - reject, - gateway, + session, ); if (!message) { throw new Error("No message returned from transferProposalResponse"); } + /* if (reject) { saveTimestamp( sessionData, @@ -53,11 +57,13 @@ export default (gateway: SATPGateway, service: Stage1ServerService) => TimestampType.PROCESSED, ); } - + */ console.log("Returning response", message); return message; }, + + // TODO phase, step async transferCommence( req: TransferCommenceRequestMessage, context: HandlerContext, @@ -65,9 +71,9 @@ export default (gateway: SATPGateway, service: Stage1ServerService) => console.log("Received TransferCommenceRequest", req, context); const recvTimestamp: string = Date.now().toString(); - const sessionData = await service.checkTransferCommenceRequestMessage( + const sessionData = await serverService.checkTransferCommenceRequestMessage( req, - gateway, + session, ); saveTimestamp( @@ -77,7 +83,7 @@ export default (gateway: SATPGateway, service: Stage1ServerService) => recvTimestamp, ); - const message = await service.transferCommenceResponse(req, gateway); + const message = await serverService.transferCommenceResponse(req, session); if (!message) { throw new Error("No message returned from transferProposalResponse"); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index 05edd7f946..4fefbb1367 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -5,8 +5,11 @@ import { SATPGateway } from "../../gateway-refactor"; import { Stage2ServerService } from "../stage-services/server/stage2-server-service"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SATPSession } from "../satp-session"; +import { ServiceType } from "@bufbuild/protobuf"; +import { SupportedGatewayImplementations } from "../types"; -export default (gateway: SATPGateway, service: Stage2ServerService) => +export const Stage2Handler = (session: SATPSession, service: Stage2ServerService, connectClients: ServiceType[], supportedDLTs: SupportedGatewayImplementations[]) => (router: ConnectRouter) => router.service(SatpStage2Service, { async lockAssertion( @@ -18,7 +21,7 @@ export default (gateway: SATPGateway, service: Stage2ServerService) => const sessionData = await service.checkLockAssertionRequestMessage( req, - gateway, + session, ); saveTimestamp( @@ -28,7 +31,7 @@ export default (gateway: SATPGateway, service: Stage2ServerService) => recvTimestamp, ); - const message = await service.lockAssertionResponse(req, gateway); + const message = await service.lockAssertionResponse(req, session); if (!message) { throw new Error("No message returned from lockAssertionResponse"); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index 35dfc093e7..12904ca502 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -5,13 +5,15 @@ import { CommitPreparationRequestMessage, TransferCompleteRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_3_pb"; -import { Empty } from "@bufbuild/protobuf"; +import { Empty, ServiceType } from "@bufbuild/protobuf"; import { Stage3ServerService } from "../stage-services/server/stage3-server-service"; import { SATPGateway } from "../../gateway-refactor"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SATPSession } from "../satp-session"; +import { SupportedGatewayImplementations } from "../types"; -export default (gateway: SATPGateway, service: Stage3ServerService) => +export const Stage3Handler = (session: SATPSession, service: Stage3ServerService, connectClients: ServiceType[], supportedDLTs: SupportedGatewayImplementations[]) => (router: ConnectRouter) => router.service(SatpStage3Service, { async commitPreparation( @@ -23,7 +25,7 @@ export default (gateway: SATPGateway, service: Stage3ServerService) => const sessionData = await service.checkCommitPreparationRequestMessage( req, - gateway, + session, ); saveTimestamp( @@ -33,7 +35,7 @@ export default (gateway: SATPGateway, service: Stage3ServerService) => recvTimestamp, ); - const message = await service.commitReady(req, gateway); + const message = await service.commitReady(req, session); if (!message) { throw new Error("No message returned from commitPreparation"); @@ -57,7 +59,7 @@ export default (gateway: SATPGateway, service: Stage3ServerService) => const recvTimestamp: string = Date.now().toString(); const sessionData = - await service.checkCommitFinalAssertionRequestMessage(req, gateway); + await service.checkCommitFinalAssertionRequestMessage(req, session); saveTimestamp( sessionData, @@ -68,7 +70,7 @@ export default (gateway: SATPGateway, service: Stage3ServerService) => const message = await service.commitFinalAcknowledgementReceiptResponse( req, - gateway, + session, ); if (!message) { @@ -92,7 +94,7 @@ export default (gateway: SATPGateway, service: Stage3ServerService) => const sessionData = await service.checkTransferCompleteRequestMessage( req, - gateway, + session, ); saveTimestamp( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index e13e1bf539..f3c90176d1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -1,9 +1,9 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPGateway } from "../../../gateway-refactor"; import { TransferCommenceRequestMessage, TransferProposalRequestMessage, - TransferProposalReceiptRejectMessage, + TransferProposalReceiptMessage, } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; import { MessageType, @@ -25,15 +25,20 @@ import { saveSignature, checkSessionData, } from "../../session-utils"; +import { SupportedGatewayImplementations } from "../../types"; +import { SATPSession } from "../../../core/satp-session"; +import { SATPService, ISATPClientServiceOptions } from "../../../types/satp-protocol"; -export class Stage1ClientService { +export class Stage1ClientService implements SATPService { public static readonly CLASS_NAME = "Stage1Service-Client"; private _log: Logger; - - constructor() { + private signer: JsObjectSigner; + + constructor(ops: ISATPClientServiceOptions) { const level = "INFO"; const label = Stage1ClientService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); + this.signer = ops.signer; } public get className(): string { @@ -46,20 +51,21 @@ export class Stage1ClientService { async transferProposalRequest( sessionID: string, - gateway: SATPGateway, + session: SATPSession, + supportedDLTs: SupportedGatewayImplementations[], ): Promise { const fnTag = `${this.className}#transferProposalRequest()`; - const sessionData = gateway.getSession(sessionID); + const sessionData = session.getSessionData(); if (sessionData == undefined || !checkSessionData(sessionData)) { throw new Error(`${fnTag}, session data is not correctly initialized`); } if ( - !gateway.getSupportedDltIDs().includes(sessionData.senderGatewayNetworkId) + !supportedDLTs.includes(sessionData.senderGatewayNetworkId as SupportedGatewayImplementations) ) { - throw new Error( + throw new Error( //todo change this to the transferClaims check `${fnTag}, recipient gateway dlt system is not supported by this gateway`, ); } @@ -170,7 +176,7 @@ export class Stage1ClientService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(transferProposalRequestMessage), ), ); @@ -185,21 +191,22 @@ export class Stage1ClientService { getHash(transferProposalRequestMessage), ); + /* await storeLog(gateway, { sessionID: sessionID, type: "transferProposalRequest", operation: "validate", data: JSON.stringify(sessionData), }); - + */ this.log.info(`${fnTag}, sending TransferProposalRequest...`); return transferProposalRequestMessage; } async transferCommenceRequest( - response: TransferProposalReceiptRejectMessage, - gateway: SATPGateway, + response: TransferProposalReceiptMessage, + session: SATPSession, ): Promise { const fnTag = `${this.className}#transferCommenceRequest()`; @@ -207,7 +214,7 @@ export class Stage1ClientService { throw new Error("Response or response.common is undefined"); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error("Session data not loaded successfully"); @@ -239,7 +246,7 @@ export class Stage1ClientService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(transferCommenceRequestMessage), ), ); @@ -258,23 +265,24 @@ export class Stage1ClientService { getHash(transferCommenceRequestMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "transferCommenceRequest", operation: "validate", data: JSON.stringify(sessionData), }); - + */ this.log.info(`${fnTag}, sending TransferCommenceRequest...`); return transferCommenceRequestMessage; } - async checkTransferProposalReceiptRejectMessage( - response: TransferProposalReceiptRejectMessage, - gateway: SATPGateway, + async checkTransferProposalReceiptMessage( + response: TransferProposalReceiptMessage, + session: SATPSession, ): Promise { - const fnTag = `${this.className}#checkTransferProposalReceiptRejectMessage()`; + const fnTag = `${this.className}#checkTransferProposalReceiptMessage()`; if (response.common == undefined) { throw new Error(`${fnTag}, message has no satp common body`); @@ -291,7 +299,7 @@ export class Stage1ClientService { const sessionId = response.common.sessionId; - const sessionData = gateway.getSession(sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -356,7 +364,7 @@ export class Stage1ClientService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, response, sessionData.serverGatewayPubkey, ) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 0dc15b6a1f..6bde217a6b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -1,4 +1,4 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; import { SATPGateway } from "../../../gateway-refactor"; import { SATP_VERSION } from "../../constants"; @@ -15,15 +15,20 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { SATPSession } from "../../../core/satp-session"; +import { SATPService, ISATPClientServiceOptions } from "../../../types/satp-protocol"; -export class Stage2ClientService { +export class Stage2ClientService implements SATPService { public static readonly CLASS_NAME = "Stage2Service-Client"; private _log: Logger; - - constructor() { + private signer: JsObjectSigner; + + constructor(ops: ISATPClientServiceOptions) { const level = "INFO"; const label = Stage2ClientService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); + this.signer = ops.signer; + } public get className(): string { @@ -36,14 +41,14 @@ export class Stage2ClientService { async lockAssertionRequest( response: TransferCommenceResponseMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#lockAssertionRequest()`; if (response.common == undefined) { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -78,7 +83,7 @@ export class Stage2ClientService { sessionData.lockAssertionFormat; const messageSignature = bufArray2HexStr( - sign(gateway.gatewaySigner, JSON.stringify(lockAssertionRequestMessage)), + sign(this.signer, JSON.stringify(lockAssertionRequestMessage)), ); lockAssertionRequestMessage.common.signature = messageSignature; @@ -91,21 +96,23 @@ export class Stage2ClientService { getHash(lockAssertionRequestMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "lockAssertionRequest", operation: "lock", data: JSON.stringify(sessionData), }); - + */ this.log.info(`${fnTag}, sending LockAssertionMessage...`); return lockAssertionRequestMessage; } + checkTransferCommenceResponseMessage( response: TransferCommenceResponseMessage, - gateway: SATPGateway, + session: SATPSession, ): void { const fnTag = `${this.className}#lockAssertionRequestMessage()`; @@ -133,7 +140,7 @@ export class Stage2ClientService { throw new Error(`${fnTag}, unsupported SATP version`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -166,7 +173,7 @@ export class Stage2ClientService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, response.common, response.common.serverGatewayPubkey, ) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 4fdf9818d3..5e67ff995f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -1,5 +1,4 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPGateway } from "../../../gateway-refactor"; import { CommonSatp, @@ -21,15 +20,20 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { SATPService, ISATPClientServiceOptions } from "../../../types/satp-protocol"; +import { SATPSession } from "../../satp-session"; +import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -export class Stage3ClientService { +export class Stage3ClientService implements SATPService { public static readonly CLASS_NAME = "Stage3Service-Client"; private _log: Logger; - - constructor() { + private signer: JsObjectSigner; + + constructor(ops: ISATPClientServiceOptions) { const level = "INFO"; const label = Stage3ClientService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); + this.signer = ops.signer; } public get className(): string { @@ -42,7 +46,7 @@ export class Stage3ClientService { async commitPreparation( response: LockAssertionReceiptMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#commitPreparation()`; @@ -50,7 +54,7 @@ export class Stage3ClientService { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -80,7 +84,7 @@ export class Stage3ClientService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(commitPreparationRequestMessage), ), ); @@ -95,12 +99,14 @@ export class Stage3ClientService { getHash(commitPreparationRequestMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "commitPreparation", operation: "lock", data: JSON.stringify(sessionData), }); + */ this.log.info(`${fnTag}, sending CommitPreparationMessage...`); @@ -109,7 +115,7 @@ export class Stage3ClientService { async commitFinalAssertion( response: CommitReadyResponseMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#commitPreparation()`; @@ -117,7 +123,7 @@ export class Stage3ClientService { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -154,7 +160,7 @@ export class Stage3ClientService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(commitFinalAssertionRequestMessage), ), ); @@ -169,13 +175,14 @@ export class Stage3ClientService { getHash(commitFinalAssertionRequestMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "commitFinalAssertion", operation: "lock", data: JSON.stringify(sessionData), }); - + */ this.log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); return commitFinalAssertionRequestMessage; @@ -183,7 +190,7 @@ export class Stage3ClientService { async transferComplete( response: CommitFinalAcknowledgementReceiptResponseMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#transferComplete()`; @@ -191,7 +198,7 @@ export class Stage3ClientService { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -227,7 +234,7 @@ export class Stage3ClientService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(transferCompleteRequestMessage), ), ); @@ -246,12 +253,14 @@ export class Stage3ClientService { getHash(transferCompleteRequestMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "transferComplete", operation: "lock", data: JSON.stringify(sessionData), }); + */ this.log.info(`${fnTag}, sending TransferCompleteMessage...`); @@ -260,7 +269,7 @@ export class Stage3ClientService { checkLockAssertionReceiptMessage( response: LockAssertionReceiptMessage, - gateway: SATPGateway, + session: SATPSession, ): void { const fnTag = `${this.className}#checkLockAssertionReceiptMessage()`; @@ -276,7 +285,7 @@ export class Stage3ClientService { throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -321,7 +330,7 @@ export class Stage3ClientService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, response.common, response.common.serverGatewayPubkey, ) @@ -334,7 +343,7 @@ export class Stage3ClientService { checkCommitReadyResponseMessage( response: CommitReadyResponseMessage, - gateway: SATPGateway, + session: SATPSession, ): void { const fnTag = `${this.className}#checkCommitReadyResponseMessage()`; @@ -350,7 +359,7 @@ export class Stage3ClientService { throw new Error(`${fnTag}, message type is not COMMIT_READY`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -395,7 +404,7 @@ export class Stage3ClientService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, response.common, response.common.serverGatewayPubkey, ) @@ -413,7 +422,7 @@ export class Stage3ClientService { checkCommitFinalAcknowledgementReceiptResponseMessage( response: CommitFinalAcknowledgementReceiptResponseMessage, - gateway: SATPGateway, + session: SATPSession, ): void { const fnTag = `${this.className}#checkCommitFinalAcknowledgementReceiptResponseMessage()`; @@ -429,7 +438,7 @@ export class Stage3ClientService { throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); } - const sessionData = gateway.getSession(response.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -474,7 +483,7 @@ export class Stage3ClientService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, response.common, response.common.serverGatewayPubkey, ) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index 2b906aad7b..49e57f10f8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -1,11 +1,11 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { IJsObjectSignerOptions, JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPGateway } from "../../../gateway-refactor"; import { TransferCommenceResponseMessage, TransferCommenceRequestMessage, TransferProposalRequestMessage, - TransferProposalReceiptRejectMessage, + TransferProposalReceiptMessage, } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; import { MessageType, @@ -32,15 +32,21 @@ import { saveHash, saveSignature, } from "../../session-utils"; +import { SupportedGatewayImplementations } from "../../types"; +import { SATPSession } from "../../../core/satp-session"; +import { SATPService, ISATPServerServiceOptions } from "../../../types/satp-protocol"; -export class Stage1ServerService { - public static readonly CLASS_NAME = "Stage1Service-Server"; +export class Stage1ServerService implements SATPService { + public static readonly CLASS_NAME = "Stage2ServerService"; private _log: Logger; + private signer: JsObjectSigner; +; - constructor() { + constructor(ops: ISATPServerServiceOptions) { const level = "INFO"; const label = Stage1ServerService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); + this.signer = ops.signer; } public get className(): string { @@ -53,9 +59,8 @@ export class Stage1ServerService { async transferProposalResponse( request: TransferProposalRequestMessage, - reject: boolean, - gateway: SATPGateway, - ): Promise { + session: SATPSession | undefined, + ): Promise { const fnTag = `${this.className}#transferProposalResponse()`; if ( @@ -68,7 +73,12 @@ export class Stage1ServerService { ); } - const sessionData = gateway.getSession(request.common.sessionId); + if (session == undefined) { + throw new Error( + `${fnTag}, session is undefined`, + ); + } + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -107,7 +117,7 @@ export class Stage1ServerService { ); const transferProposalReceiptMessage = - new TransferProposalReceiptRejectMessage(); + new TransferProposalReceiptMessage(); transferProposalReceiptMessage.common = commonBody; transferProposalReceiptMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; @@ -117,6 +127,7 @@ export class Stage1ServerService { TimestampType.RECEIVED, ); + /* if (reject) { commonBody.messageType = MessageType.INIT_REJECT; const counterProposalTransferClaims = this.counterProposalTransferClaims( @@ -135,10 +146,11 @@ export class Stage1ServerService { commonBody.messageType = MessageType.INIT_RECEIPT; sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; } + */ const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(transferProposalReceiptMessage), ), ); @@ -153,13 +165,15 @@ export class Stage1ServerService { getHash(transferProposalReceiptMessage), ); + // TODO: store logs in the database using session ID; refactor storelog not to need gateway as input + /* await storeLog(gateway, { sessionID: sessionData.id, type: "transferProposalResponse", operation: "lock", data: JSON.stringify(sessionData), }); - + */ this.log.info(`${fnTag}, sending TransferProposalResponseMessage...`); return transferProposalReceiptMessage; @@ -167,7 +181,7 @@ export class Stage1ServerService { async transferCommenceResponse( request: TransferCommenceRequestMessage, - gateway: SATPGateway, + session: SATPSession | undefined, ): Promise { const fnTag = `${this.className}#transferCommenceResponse()`; @@ -177,7 +191,12 @@ export class Stage1ServerService { ); } - const sessionData = gateway.getSession(request.common.sessionId); + if (session == undefined) { + throw new Error( + `${fnTag}, session is undefined`, + ); + } + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -212,7 +231,7 @@ export class Stage1ServerService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(transferCommenceResponseMessage), ), ); @@ -231,13 +250,15 @@ export class Stage1ServerService { getHash(transferCommenceResponseMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "transferCommenceResponse", operation: "lock", data: JSON.stringify(sessionData), }); - + */ + this.log.info(`${fnTag}, sending TransferCommenceResponseMessage...`); return transferCommenceResponseMessage; @@ -245,8 +266,9 @@ export class Stage1ServerService { async checkTransferProposalRequestMessage( request: TransferProposalRequestMessage, - gateway: SATPGateway, - ): Promise<[SessionData, boolean]> { + session: SATPSession | undefined, + supportedDLTs: SupportedGatewayImplementations[], + ): Promise { const fnTag = `${this.className}#checkTransferProposalRequestMessage()`; if ( @@ -275,7 +297,7 @@ export class Stage1ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request.common, request.common.clientGatewayPubkey, ) @@ -302,11 +324,10 @@ export class Stage1ServerService { `${fnTag}, TransferProposalRequest message does not contain network capabilities and parameters`, ); } + const senderId = request.transferInitClaims.senderGatewayNetworkId as SupportedGatewayImplementations; if ( - !gateway - .getSupportedDltIDs() - .includes(request.transferInitClaims.senderGatewayNetworkId) + !supportedDLTs.includes(senderId) ) { throw new Error( //todo change this to the transferClaims check `${fnTag}, recipient gateway dlt system is not supported by this gateway`, @@ -336,15 +357,15 @@ export class Stage1ServerService { ); this.log.info(`Session data created for session id ${sessionData.id}`); - - gateway.addSession(request.common.sessionId, sessionData); - - return [sessionData, this.checkTransferClaims(request.transferInitClaims)]; + if (!this.checkTransferClaims(request.transferInitClaims)) { + throw new Error(); + } + return sessionData; } async checkTransferCommenceRequestMessage( request: TransferCommenceRequestMessage, - gateway: SATPGateway, + session: SATPSession | undefined, ): Promise { const fnTag = `${this.className}#transferCommenceResponse()`; @@ -372,7 +393,12 @@ export class Stage1ServerService { throw new Error(`${fnTag}, unsupported SATP version`); } - const sessionData = gateway.getSession(request.common.sessionId); + if (session == undefined) { + throw new Error( + `${fnTag}, session is undefined`, + ); + } + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -405,7 +431,7 @@ export class Stage1ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request.common, request.common.clientGatewayPubkey, ) @@ -450,7 +476,7 @@ export class Stage1ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request, sessionData.clientGatewayPubkey, ) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 530cd35e46..c0968b1be1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -1,4 +1,4 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { LockAssertionReceiptMessage, LockAssertionRequestMessage, @@ -18,14 +18,18 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -export class Stage2ServerService { - public static readonly CLASS_NAME = "Stage2Service-Server"; +import { SATPService, ISATPServerServiceOptions } from "../../../types/satp-protocol"; +import { SATPSession } from "../../../core/satp-session"; +export class Stage2ServerService implements SATPService { + public static readonly CLASS_NAME = "Stage2ServerService"; private _log: Logger; + private signer: JsObjectSigner; - constructor() { + constructor(ops: ISATPServerServiceOptions) { const level = "INFO"; const label = Stage2ServerService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); + this.signer = ops.signer; } public get className(): string { @@ -38,7 +42,7 @@ export class Stage2ServerService { async lockAssertionResponse( request: LockAssertionRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#lockAssertionResponse()`; @@ -46,7 +50,7 @@ export class Stage2ServerService { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -74,7 +78,7 @@ export class Stage2ServerService { lockAssertionReceiptMessage.common = commonBody; const messageSignature = bufArray2HexStr( - sign(gateway.gatewaySigner, JSON.stringify(lockAssertionReceiptMessage)), + sign(this.signer, JSON.stringify(lockAssertionReceiptMessage)), ); lockAssertionReceiptMessage.common.signature = messageSignature; @@ -87,12 +91,14 @@ export class Stage2ServerService { getHash(lockAssertionReceiptMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "lockAssertionResponse", operation: "lock", data: JSON.stringify(sessionData), }); + */ this.log.info(`${fnTag}, sending LockAssertionResponseMessage...`); @@ -101,7 +107,7 @@ export class Stage2ServerService { async checkLockAssertionRequestMessage( request: LockAssertionRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#checkLockAssertionRequestMessage()`; @@ -129,7 +135,7 @@ export class Stage2ServerService { throw new Error(`${fnTag}, unsupported SATP version`); } - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -158,7 +164,7 @@ export class Stage2ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request.common, request.common.serverGatewayPubkey, ) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index e7da3b2701..95cde2fe84 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -1,4 +1,4 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPGateway } from "../../../gateway-refactor"; import { CommitFinalAcknowledgementReceiptResponseMessage, @@ -20,15 +20,19 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { SATPService, ISATPServerServiceOptions } from "../../../types/satp-protocol"; +import { SATPSession } from "../../../core/satp-session"; -export class Stage3ServerService { - public static readonly CLASS_NAME = "Stage3Service-Server"; +export class Stage3ServerService implements SATPService { + public static readonly CLASS_NAME = "Stage3ServerService"; private _log: Logger; + private signer: JsObjectSigner; - constructor() { + constructor(ops: ISATPServerServiceOptions) { const level = "INFO"; const label = Stage3ServerService.CLASS_NAME; this._log = LoggerProvider.getOrCreate({ level, label }); + this.signer = ops.signer; } public get className(): string { @@ -41,7 +45,7 @@ export class Stage3ServerService { async commitReady( request: CommitPreparationRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#commitReady()`; @@ -49,7 +53,7 @@ export class Stage3ServerService { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -81,7 +85,7 @@ export class Stage3ServerService { sessionData.mintAssertionClaimsFormat; const messageSignature = bufArray2HexStr( - sign(gateway.gatewaySigner, JSON.stringify(commitReadyMessage)), + sign(this.signer, JSON.stringify(commitReadyMessage)), ); saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); @@ -92,13 +96,14 @@ export class Stage3ServerService { getHash(commitReadyMessage), ); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "commitReady", operation: "lock", data: JSON.stringify(sessionData), }); - + */ this.log.info(`${fnTag}, sending commitReadyMessage...`); return commitReadyMessage; @@ -106,7 +111,7 @@ export class Stage3ServerService { async commitFinalAcknowledgementReceiptResponse( request: CommitFinalAssertionRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#commitFinalAcknowledgementReceiptResponse()`; @@ -114,7 +119,7 @@ export class Stage3ServerService { throw new Error(`${fnTag}, message common body is missing`); } - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -149,7 +154,7 @@ export class Stage3ServerService { const messageSignature = bufArray2HexStr( sign( - gateway.gatewaySigner, + this.signer, JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), ), ); @@ -158,13 +163,14 @@ export class Stage3ServerService { saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); + /* await storeLog(gateway, { sessionID: sessionData.id, type: "commitFinalAcknowledgementReceiptResponse", operation: "lock", data: JSON.stringify(sessionData), }); - + */ this.log.info( `${fnTag}, sending commitFinalAcknowledgementReceiptResponseMessage...`, ); @@ -174,7 +180,7 @@ export class Stage3ServerService { async checkCommitPreparationRequestMessage( request: CommitPreparationRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#checkCommitPreparationRequestMessage()`; @@ -190,7 +196,7 @@ export class Stage3ServerService { throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); } - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -232,7 +238,7 @@ export class Stage3ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request.common, request.common.clientGatewayPubkey, ) @@ -247,7 +253,7 @@ export class Stage3ServerService { async checkCommitFinalAssertionRequestMessage( request: CommitFinalAssertionRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#checkCommitFinalAssertionRequestMessage()`; @@ -263,7 +269,7 @@ export class Stage3ServerService { throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); } - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -305,7 +311,7 @@ export class Stage3ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request.common, request.common.clientGatewayPubkey, ) @@ -326,7 +332,7 @@ export class Stage3ServerService { async checkTransferCompleteRequestMessage( request: CommitFinalAssertionRequestMessage, - gateway: SATPGateway, + session: SATPSession, ): Promise { const fnTag = `${this.className}#checkTransferCompleteRequestMessage()`; @@ -346,7 +352,7 @@ export class Stage3ServerService { `${fnTag}, TransferCompleteRequestMessage passed all checks.`, ); - const sessionData = gateway.getSession(request.common.sessionId); + const sessionData = session.getSessionData(); if (sessionData == undefined) { throw new Error( @@ -388,7 +394,7 @@ export class Stage3ServerService { if ( !verifySignature( - gateway.gatewaySigner, + this.signer, request.common, request.common.clientGatewayPubkey, ) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index b952bd6185..0f7e2027ff 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,7 +1,10 @@ -import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { JsObjectSigner, LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; import { ISignerKeyPairs } from "@hyperledger/cactus-common/src/main/typescript/signer-key-pairs"; +import { createConnectTransport } from "@connectrpc/connect-node"; +import { SATPManager } from "../gol/protocol-manager/satp-manager"; +import { SATPSession } from "./satp-session"; export enum CurrentDrafts { Core = "Core", @@ -28,7 +31,10 @@ export enum SupportedGatewayImplementations { } export type GatewayChannel = { - id: string; + fromGatewayID: string; + toGatewayID: string; + manager: SATPManager; + sessions: Map; }; export type Address = @@ -50,6 +56,7 @@ export type GatewayIdentity = { export interface SATPGatewayConfig { gid?: GatewayIdentity; + counterPartyGateways?: GatewayIdentity[]; logLevel?: LogLevelDesc; keyPair?: ISignerKeyPairs; environment?: "development" | "production"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts index 901f465b96..aa7ccdbece 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts @@ -25,7 +25,7 @@ import { ShutdownHook, SupportedGatewayImplementations, } from "./core/types"; -import { GatewayOrchestrator } from "./gol/gateway-orchestrator"; +import { GatewayOrchestrator, IGatewayOrchestratorOptions } from "./gol/gateway-orchestrator"; export { SATPGatewayConfig }; import express, { Express } from "express"; import http from "http"; @@ -35,16 +35,19 @@ import { DEFAULT_PORT_GATEWAY_GRPC, DEFAULT_PORT_GATEWAY_SERVER, } from "./core/constants"; -import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; import { SessionData } from "./generated/proto/cacti/satp/v02/common/session_pb"; import { expressConnectMiddleware } from "@connectrpc/connect-express"; import { bufArray2HexStr } from "./gateway-utils"; -import { COREDispatcher, COREDispatcherOptions } from "./core/dispatcher"; import { ILocalLogRepository, IRemoteLogRepository, } from "./repository/interfaces/repository"; import { SATPLedgerConnector } from "./types/blockchain-interaction"; +import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; +import fs from 'fs'; +import swaggerUi from 'swagger-ui-express'; +import { SATPSession } from "./core/satp-session"; + export class SATPGateway { // todo more checks; example port from config is between 3000 and 9000 @IsDefined() @@ -70,9 +73,7 @@ export class SATPGateway { private BLOApplication?: Express; private BLOServer?: http.Server; private BLODispatcher?: BLODispatcher; - private gRPCServer?: http.Server; - private gRPCApplication?: Express; - private COREDispatcher?: COREDispatcher; + private objectSigner: JsObjectSigner; @@ -81,9 +82,8 @@ export class SATPGateway { private connectors: SATPLedgerConnector[] = []; // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) - private sessions: Map = new Map(); + private sessions: Map = new Map(); private _pubKey: string; - private _privKey: string; public localRepository?: ILocalLogRepository; public remoteRepository?: IRemoteLogRepository; @@ -106,27 +106,28 @@ export class SATPGateway { } this._pubKey = bufArray2HexStr(this.config.keyPair.publicKey); - this._privKey = bufArray2HexStr(this.config.keyPair.privateKey); this.logger.info(`Gateway's public key: ${this._pubKey}`); const objectSignerOptions: IJsObjectSignerOptions = { - privateKey: this._privKey, + privateKey: bufArray2HexStr(this.config.keyPair.privateKey), logLevel: "debug", }; this.objectSigner = new JsObjectSigner(objectSignerOptions); - if (options.enableOpenAPI) { - this.setupOpenAPI(); + const gatewayOrchestratorOptions: IGatewayOrchestratorOptions = { + logLevel: this.config.logLevel, + ourGateway: this.config.gid!, + counterPartyGateways: this.config.counterPartyGateways, + signer: this.objectSigner!, + }; + + if (this.config.gid) { + this.logger.info("Initializing gateway connection manager with seed gateways"); + this.gatewayConnectionManager = new GatewayOrchestrator(gatewayOrchestratorOptions); + } else { + throw new Error("GatewayIdentity is not defined"); } - this.logger.info("Gateway Coordinator initialized"); - const seedGateways = this.getGatewaySeeds(); - this.logger.info( - `Initializing gateway connection manager with ${seedGateways} seed gateways`, - ); - this.gatewayConnectionManager = new GatewayOrchestrator(seedGateways, { - logger: this.logger, - }); const dispatcherOps: BLODispatcherOptions = { logger: this.logger, @@ -134,11 +135,6 @@ export class SATPGateway { instanceId: this.config.gid!.id, }; - const coreDispatcherOps: COREDispatcherOptions = { - logger: this.logger, - logLevel: this.config.logLevel, - instanceId: this.config.gid!.id, - }; this.supportedDltIDs = this.config.gid!.supportedChains; @@ -147,24 +143,19 @@ export class SATPGateway { } this.BLODispatcher = new BLODispatcher(dispatcherOps); - this.COREDispatcher = new COREDispatcher(coreDispatcherOps, this); - } - - public getSessions(): Map { - return this.sessions; + if (options.enableOpenAPI) { + this.setupOpenAPI(); + } } - public getSession(sessionId: string): SessionData | undefined { - return this.sessions.get(sessionId); + public get Signer(): JsObjectSigner { + return this.objectSigner; } - + public getSupportedDltIDs(): string[] { return this.supportedDltIDs; } - public addSession(sessionId: string, sessionData: SessionData): void { - this.sessions.set(sessionId, sessionData); - } public get gatewaySigner(): JsObjectSigner { return this.objectSigner; @@ -175,24 +166,24 @@ export class SATPGateway { } // todo load docs for gateway coordinator and expose them in a http gatewayApplication + setupOpenAPI(): void { - const fnTag = `${this.label}#setupOpenAPI()`; - this.logger.trace(`Entering ${fnTag}`); + if (!this.BLOApplication) { + throw new Error("BLOApplication is not defined"); + } - this.logger.error("OpenAPI setup not implemented"); - return; - const specPath = path.join(__dirname, "../../", "/json", "openapi.json"); - this.logger.debug(`Loading OpenAPI specification from ${specPath}`); + const specPath = path.join(__dirname, "../json/openapi-blo-bundled.json"); + const OpenAPISpec = JSON.parse(fs.readFileSync(specPath, 'utf8')); - /*const OpenAPISpec = JSON.parse(fs.readFileSync(specPath).toString()); - this.logger.info( - `OpenAPI docs and documentation set up at 📖: \n ${this.config.gid?.address}:${this.config.gid?.gatewayServerPort}/api-docs`, + // Type assertion here + this.BLOApplication.use( + "/api-docs", + swaggerUi.serve as express.RequestHandler[], + swaggerUi.setup(OpenAPISpec) as express.RequestHandler ); - */ - // todo bind to grpc gateway - // this._app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(OpenAPISpec)); } + // use builder pattern? static ProcessGatewayCoordinatorConfig( pluginOptions: SATPGatewayConfig, ): SATPGatewayConfig { @@ -289,92 +280,15 @@ export class SATPGateway { this.logger.trace(`Entering ${fnTag}`); await Promise.all([ - // grpc server does not start correctly - // this.startupGRPCServer(), this.startupGatewayServer(), - this.startupBOLServer(), ]); this.logger.info("Both GatewayServer and BLOServer have started"); } - async startupGRPCServer(): Promise { - const fnTag = `${this.label}#startupGRPCServer()`; - this.logger.trace(`Entering ${fnTag}`); - this.logger.info("Starting gRPC server"); - const port = this.options.gid?.gatewayGrpcPort ?? DEFAULT_PORT_GATEWAY_GRPC; - - return new Promise(async (resolve, reject) => { - if (this.gRPCApplication || !this.gRPCServer) { - if (!this.COREDispatcher) { - throw new Error("COREDispatcher is not defined"); - } - - this.gRPCApplication = express(); - - try { - const gRPCServices = await this.COREDispatcher.getOrCreateServices(); - for (const service of gRPCServices) { - this.logger.debug(`Registering web service: ${service.getPath()}`); - await service.registerExpress(this.COREDispatcher); - } - } catch (error) { - throw new Error(`Failed to register web services: ${error}`); - } - - this.gRPCServer = http.createServer(this.gRPCApplication); - - this.gRPCServer.listen(port, () => { - this.logger.info(`gRPC server started and listening on port ${port}`); - resolve(); - }); - - this.gRPCServer.on("error", (error) => { - this.logger.error(`gRPC server failed to start: ${error}`); - reject(error); - }); - } else { - this.logger.warn("Server already running"); - resolve(); - } - }); - } - async startupGatewayServer(): Promise { - const fnTag = `${this.label}#startupGatewayServer()`; - this.logger.trace(`Entering ${fnTag}`); - this.logger.info("Starting gateway server"); - const port = - this.options.gid?.gatewayServerPort ?? DEFAULT_PORT_GATEWAY_SERVER; - - return new Promise((resolve, reject) => { - if (!this.gatewayApplication || !this.gatewayServer) { - this.gatewayApplication = express(); - this.gatewayApplication.use( - expressConnectMiddleware({ routes: configureRoutes }), - ); - this.gatewayServer = http.createServer(this.gatewayApplication); - - this.gatewayServer.listen(port, () => { - this.logger.info( - `Gateway server started and listening on port ${port}`, - ); - resolve(); - }); - - this.gatewayServer.on("error", (error) => { - this.logger.error(`Gateway server failed to start: ${error}`); - reject(error); - }); - } else { - this.logger.warn("Server already running"); - resolve(); - } - }); - } - - async startupBOLServer(): Promise { - const fnTag = `${this.label}#startupBOLServer()`; + // starts BOL + const fnTag = `${this.label}#startupGatewayServer()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Starting BOL server"); const port = @@ -422,115 +336,25 @@ export class SATPGateway { * These operations are fundamental for setting up and managing gateway connections within the system. */ - // TODO: addGateways as an admin endpoint - public async addGateways(IDs: string[]): Promise { - const fnTag = `${this.label}#addGateways()`; + // TODO: addGateways as an admin endpoint, simply calls orchestrator + public async resolveAndAddGateways(IDs: string[]): Promise { + const fnTag = `${this.label}#resolveAndAddGateways()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Connecting to gateway"); - const gatewaysToAdd: GatewayIdentity[] = []; - const thisID = this.config.gid!.id; - const otherIDs = IDs.filter((id) => id !== thisID); - - for (const id of otherIDs) { - gatewaysToAdd.push(this.resolveGatewayID(id)); - } - - this.gatewayConnectionManager.addGateways(gatewaysToAdd); + this.gatewayConnectionManager.resolveAndAddGateways(IDs); // todo connect to gateway } - // gets an ID, queries a repository, returns an address, port, and proof of identity - private resolveGatewayID(ID: string): GatewayIdentity { - const fnTag = `${this.label}#resolveGatewayID()`; + public async addGateways(gateways: GatewayIdentity[]): Promise { + const fnTag = `${this.label}#addGateways()`; this.logger.trace(`Entering ${fnTag}`); - this.logger.info(`Resolving gateway with ID: ${ID}`); + this.logger.info("Connecting to gateway"); + this.gatewayConnectionManager.addGateways(gateways); - const mockGatewayIdentity: GatewayIdentity[] = [ - { - id: "1", - name: "Gateway1", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3011, - address: "http://localhost", - }, - { - id: "2", - name: "Gateway2", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3012, - address: "http://localhost", - }, - ]; - return mockGatewayIdentity.filter((gateway) => gateway.id === ID)[0]; + // todo connect to gateway } - private getGatewaySeeds(): GatewayIdentity[] { - const fnTag = `${this.label}#getGatewaySeeds()`; - this.logger.trace(`Entering ${fnTag}`); - - const mockGatewayIdentity: GatewayIdentity[] = [ - { - id: "1", - name: "Gateway1", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3011, - address: "http://localhost", - }, - { - id: "2", - name: "Gateway2", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3014, - address: "http://localhost", - }, - ]; - return mockGatewayIdentity; - } // TODO: keep getter; add an admin endpoint to get identity of connected gateway to BLO public get Identity(): GatewayIdentity { @@ -558,9 +382,6 @@ export class SATPGateway { const fnTag = `${this.label}#getGatewaySeeds()`; this.logger.debug(`Entering ${fnTag}`); - this.logger.info("Shutting down Node server - gRPC"); - await this.shutdownGRPCServer(); - this.logger.info("Shutting down Node server - Gateway"); await this.shutdownGatewayServer(); @@ -618,21 +439,4 @@ export class SATPGateway { } } - private async shutdownGRPCServer(): Promise { - const fnTag = `${this.label}#shutdownGRPCServer()`; - this.logger.debug(`Entering ${fnTag}`); - if (this.gRPCServer) { - try { - await this.gRPCServer.close(); - this.gRPCServer = undefined; - this.logger.info("Server shut down"); - } catch (error) { - this.logger.error( - `Error shutting down the gatewayApplication: ${error}`, - ); - } - } else { - this.logger.warn("Server is not running."); - } - } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index a76d98392b..dfa163b349 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -83,7 +83,7 @@ export async function storeRemoteLog( }; remoteLog.signature = bufArray2HexStr( - sign(gateway.gatewaySigner, JSON.stringify(remoteLog)), + sign(gateway.Signer, JSON.stringify(remoteLog)), ); const response = await gateway.remoteRepository?.create(remoteLog); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts new file mode 100644 index 0000000000..6868d89652 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts @@ -0,0 +1,27 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated from file cacti/satp/v02/common/health.proto (package cacti.satp.v02.common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { HealthCheckRequest } from "./health_pb.js"; +import { Ack } from "./message_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service cacti.satp.v02.common.HealthService + */ +export const HealthService = { + typeName: "cacti.satp.v02.common.HealthService", + methods: { + /** + * @generated from rpc cacti.satp.v02.common.HealthService.CheckHealth + */ + checkHealth: { + name: "CheckHealth", + I: HealthCheckRequest, + O: Ack, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts new file mode 100644 index 0000000000..06f94e0ab6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts @@ -0,0 +1,39 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file cacti/satp/v02/common/health.proto (package cacti.satp.v02.common, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message cacti.satp.v02.common.HealthCheckRequest + */ +export class HealthCheckRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.HealthCheckRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): HealthCheckRequest { + return new HealthCheckRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): HealthCheckRequest { + return new HealthCheckRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): HealthCheckRequest { + return new HealthCheckRequest().fromJsonString(jsonString, options); + } + + static equals(a: HealthCheckRequest | PlainMessage | undefined, b: HealthCheckRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(HealthCheckRequest, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts index 1f51ca2bd2..342989c8be 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { TransferCommenceRequestMessage, TransferCommenceResponseMessage, TransferProposalReceiptRejectMessage, TransferProposalRequestMessage } from "./stage_1_pb.js"; +import { TransferCommenceRequestMessage, TransferCommenceResponseMessage, TransferProposalReceiptMessage, TransferProposalRequestMessage } from "./stage_1_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -18,7 +18,7 @@ export const SatpStage1Service = { transferProposal: { name: "TransferProposal", I: TransferProposalRequestMessage, - O: TransferProposalReceiptRejectMessage, + O: TransferProposalReceiptMessage, kind: MethodKind.Unary, }, /** diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts index e59e1019c7..fac231eed5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -75,9 +75,9 @@ export class TransferProposalRequestMessage extends Message { +export class TransferProposalReceiptMessage extends Message { /** * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; */ @@ -98,13 +98,13 @@ export class TransferProposalReceiptRejectMessage extends Message) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.TransferProposalReceiptRejectMessage"; + static readonly typeName = "cacti.satp.v02.TransferProposalReceiptMessage"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "common", kind: "message", T: CommonSatp }, { no: 2, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -112,20 +112,20 @@ export class TransferProposalReceiptRejectMessage extends Message): TransferProposalReceiptRejectMessage { - return new TransferProposalReceiptRejectMessage().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): TransferProposalReceiptMessage { + return new TransferProposalReceiptMessage().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalReceiptRejectMessage { - return new TransferProposalReceiptRejectMessage().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): TransferProposalReceiptMessage { + return new TransferProposalReceiptMessage().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): TransferProposalReceiptRejectMessage { - return new TransferProposalReceiptRejectMessage().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): TransferProposalReceiptMessage { + return new TransferProposalReceiptMessage().fromJsonString(jsonString, options); } - static equals(a: TransferProposalReceiptRejectMessage | PlainMessage | undefined, b: TransferProposalReceiptRejectMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(TransferProposalReceiptRejectMessage, a, b); + static equals(a: TransferProposalReceiptMessage | PlainMessage | undefined, b: TransferProposalReceiptMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(TransferProposalReceiptMessage, a, b); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index 28866805a3..a713fc26d0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -1,51 +1,148 @@ // a helper class to manage connections to counterparty gateways - -import { Logger } from "@hyperledger/cactus-common"; -import { GatewayIdentity, GatewayChannel } from "../core/types"; +import { ILoggerOptions, JsObjectSigner, LogLevelDesc, Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { GatewayIdentity, GatewayChannel, SupportedGatewayImplementations } from "../core/types"; import { NonExistantGatewayIdentity } from "../core/errors"; -interface GatewayOrchestratorOptions { - logger: Logger; +import { PromiseClient as PromiseConnectClient, Transport as ConnectTransport, PromiseClient } from "@connectrpc/connect"; + +import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; +import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; +import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; +import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; + +export interface IGatewayOrchestratorOptions { + logLevel?: LogLevelDesc; + ourGateway: GatewayIdentity; + counterPartyGateways: GatewayIdentity[] | undefined; + signer: JsObjectSigner; } +import { + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_GRPC, + DEFAULT_PORT_GATEWAY_SERVER, +} from "../core/constants"; + +import { BLODispatcher, BLODispatcherOptions } from "../blo/dispatcher"; +//import { COREDispatcher, COREDispatcherOptions } from "../core/dispatcher"; +import express, { Express } from "express"; +import http from "http"; +import { SATPSession } from "../core/satp-session"; +import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; +import { Transport, createPromiseClient } from "@connectrpc/connect"; +import { createConnectTransport } from "@connectrpc/connect-node"; +import { ISATPManagerOptions, SATPManager, SATPServiceClient } from "./protocol-manager/satp-manager"; +import { log } from "console"; +import { getGatewaySeeds, resolveGatewayID } from "../network-identification/resolve-gateway"; +import { timingSafeEqual } from "crypto"; +import { ServiceType } from "@bufbuild/protobuf"; + export class GatewayOrchestrator { public readonly label = "GatewayOrchestrator"; - private gatewayIDs: string[] = []; - private gateways: Map = new Map(); + private ourGateway: GatewayIdentity; + private counterPartyGateways: Map = new Map(); private channels: Map = new Map(); private readonly logger: Logger; + private signer: JsObjectSigner; constructor( - public readonly identities: GatewayIdentity[], - options: GatewayOrchestratorOptions, + options: IGatewayOrchestratorOptions, ) { // add checks - this.logger = options.logger; + this.ourGateway = options.ourGateway; + const level = options.logLevel || "INFO"; + const logOptions: ILoggerOptions = { + level: level, + label: this.label, + }; + + this.logger = LoggerProvider.getOrCreate(logOptions); this.logger.info("Initializing Gateway Connection Manager"); - for (const identity of identities) { - this.gatewayIDs.push(identity.id); - this.gateways.set(identity.id, identity); - } + this.logger.info("Gateway Coordinator initialized"); + const seedGateways = getGatewaySeeds(this.logger); this.logger.info( - `Gateway Connection Manager bootstrapped with ${identities.length} gateways`, + `Initializing gateway connection manager with ${seedGateways} seed gateways`, + ); + this.signer = options.signer; + const allCounterPartyGateways = seedGateways.concat(options.counterPartyGateways ?? []); + // populate counterPartyGateways + this.counterPartyGateways = new Map( + allCounterPartyGateways.map((gateway) => [gateway.id, gateway]), ); - } - async connectToCounterPartyGateways(): Promise { - const fnTag = `${this.label}#connectToCounterPartyGateways()`; - // add checks this.logger.info( - `${fnTag}, Connecting to ${this.gatewayIDs.length} gateways`, + `Gateway Connection Manager bootstrapped with ${allCounterPartyGateways.length} gateways`, ); + + + this.addGateways(allCounterPartyGateways); + const numberGatewayChannels = this.connectToCounterPartyGateways(); + if (numberGatewayChannels > 0) { + this.logger.info( + `Gateway Connection Manager connected to ${numberGatewayChannels} gateways.`, + ); + this.logger.info("Creating SATPManager"); + } + } + + async startupGatewayOrchestrator(): Promise { + if (this.counterPartyGateways.values.length === 0) { + this.logger.info("No gateways to connect to"); + return; + } else { + this.connectToCounterPartyGateways(); + } + } + + isSelfId(id: string): boolean { + return id === this.ourGateway.id; + } + + isInCounterPartyGateways(id: string): boolean { + return this.counterPartyGateways.has(id); + } + + isInChannels(id: string): boolean { + return this.channels.has(id); + } + + // Find IDs in counterPartyGateways that do not have a corresponding channel + findUnchanneledGateways(): string[] { + return Array.from(this.counterPartyGateways.keys()).filter(id => { + return !this.isInChannels(id) && !this.isSelfId(id); + }); + } + + // Filter IDs that are not present in counterPartyGateways or channels and not the self ID + filterNewIds(ids: string[]): string[] { + return ids.filter(id => { + return !this.isInCounterPartyGateways(id) && + !this.isInChannels(id) && + !this.isSelfId(id); + }); + } + + connectToCounterPartyGateways(): number { + const fnTag = `${this.label}#connectToCounterPartyGateways()`; + if (!this.counterPartyGateways) { + this.logger.info(`${fnTag}, No counterparty gateways to connect to`); + return 0; + } + + const idsToAdd = this.filterNewIds(Array.from(this.counterPartyGateways.keys())); + if (idsToAdd.length === 0) { + this.logger.info(`${fnTag}, No new gateways to connect to`); + return 0; + } + + // get gateway identtiies from counterPartyGateways + const gatewaysToAdd = idsToAdd.map(id => this.counterPartyGateways.get(id)!); + let connected = 0; try { - for (const id of this.gatewayIDs) { - const guid = this.gateways.get(id); - if (!guid) { - throw new NonExistantGatewayIdentity(id); - } else if (!this.alreadyConnected) { - await this.createChannel(guid); + for (const gateway of gatewaysToAdd) { + const channel = this.createChannel(gateway); + this.channels.set(gateway.id, channel); connected++; - } } } catch (ex) { this.logger.error(`${fnTag}, Failed to connect to gateway`); @@ -54,50 +151,119 @@ export class GatewayOrchestrator { return connected; } - async addGateways(gateways: GatewayIdentity[]): Promise { - const fnTag = `${this.label}#addGateways()`; - // add checks - this.logger.info(`${fnTag}, Adding ${gateways.length} gateways`); - for (const gateway of gateways) { - const id = gateway.id; - if (this.gatewayIDs.includes(id)) { - this.logger.info( - `${fnTag}, ${fnTag}, Gateway with id ${id} already exists, ignoring`, - ); - continue; - } - this.gatewayIDs.push(id); - this.gateways.set(id, gateway); - } - return this.connectToCounterPartyGateways(); + get supportedDLTs(): SupportedGatewayImplementations[] { + return this.ourGateway.supportedChains; } - alreadyConnected(ID: string): boolean { - return this.channels.has(ID); - } - // make singleton - async createChannels(): Promise { - // Add checks and the rest of your logic here - const channels: GatewayChannel[] = []; - this.gateways.forEach(async (identity) => { - channels.push(await this.createChannel(identity)); - }); - } + createChannel(identity: GatewayIdentity): GatewayChannel { + const clients = this.createConnectClients(identity); + + const SATPManagerOpts: ISATPManagerOptions = { + logLevel: "DEBUG", + instanceId: this.ourGateway!.id, + signer: this.signer, + supportedDLTs: this.supportedDLTs, + connectClients: clients, + }; + + const manager = new SATPManager(SATPManagerOpts); - async createChannel(identity: GatewayIdentity): Promise { - // add checks const channel: GatewayChannel = { - id: identity.id, + fromGatewayID: this.ourGateway.id, + toGatewayID: identity.id, + manager: manager, + sessions: new Map(), }; + + return channel; } + private createConnectClients(identity: GatewayIdentity): PromiseConnectClient[] { + let createdClients: ServiceType[] = []; + // one function for each client type; aggregate in array + const transport = createConnectTransport({ + baseUrl: identity.address + ":" + identity.gatewayGrpcPort, + httpVersion: "1.1" + }); + + const stage0Client = this.createStage0ServiceClient(transport); + const stage1Client = this.createStage1ServiceClient(transport); + const stage2Client = this.createStage2ServiceClient(transport); + const stage3Client = this.createStage3ServiceClient(transport); + + return [stage0Client, stage1Client, stage2Client, stage3Client]; + } + + private createStage0ServiceClient(transport: ConnectTransport): PromiseConnectClient { + this.logger.debug("Creating stage 0 service client, with transport: ", transport); + const client = createPromiseClient(SatpStage0Service, transport); + return client; + } + + private createStage1ServiceClient(transport: ConnectTransport): PromiseConnectClient { + this.logger.debug("Creating stage 1 service client, with transport: ", transport); + const client = createPromiseClient(SatpStage1Service, transport); + return client; + } + + private createStage2ServiceClient(transport: ConnectTransport): PromiseConnectClient { + this.logger.debug("Creating stage 2 service client, with transport: ", transport); + const client = createPromiseClient(SatpStage2Service, transport); + return client; + } + + private createStage3ServiceClient(transport: ConnectTransport): PromiseConnectClient { + this.logger.debug("Creating stage 3 service client, with transport: ", transport); + const client = createPromiseClient(SatpStage3Service, transport); + return client; + } + + public async resolveAndAddGateways(IDs: string[]): Promise { + const fnTag = `${this.label}#addGateways()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.info("Connecting to gateway"); + const gatewaysToAdd: GatewayIdentity[] = []; + const thisID = this.ourGateway!.id; + const otherIDs = IDs.filter((id) => id !== thisID); + + for (const id of otherIDs) { + gatewaysToAdd.push(await resolveGatewayID(this.logger, id)); + } + + this.addGateways(gatewaysToAdd); + return gatewaysToAdd.length; + } + + public addGateways(gateways: GatewayIdentity[]): string[] { + const fnTag = `${this.label}#addGateways()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.info("Connecting to gateway"); + let addedIDs: string[] = []; + // gateways tha are not self + const otherGateways = gateways.filter((gateway) => gateway.id !== this.ourGateway.id); + + // gateways that are not already connected + const uniqueGateways = otherGateways.filter((gateway) => !this.counterPartyGateways.has(gateway.id)); + + for (const gateway of uniqueGateways) { + this.counterPartyGateways.set(gateway.id, gateway); + addedIDs.push(gateway.id); + } + this.logger.debug(`Added ${addedIDs.length} gateways: ${addedIDs}`); + return addedIDs; + } + + alreadyConnected(ID: string): boolean { + return this.channels.has(ID); + } + async disconnectAll(): Promise { const fnTag = `${this.label}#disconnectAll()`; let counter = 0; this.channels.forEach(async (channel) => { - this.logger.info(`${fnTag}, Disconnecting from ${channel.id}`); + this.logger.info(`${fnTag}, Disconnecting from ${channel.toGatewayID}`); // ! todo implement disconnect this.logger.error("Not implemented"); counter++; @@ -105,4 +271,22 @@ export class GatewayOrchestrator { this.channels.clear(); return counter; } + + /* + BOL TO GOL translation + */ + async handleTransferRequest(): Promise { + // add checks + this.logger.info("Handling transfer request"); + // ! todo implement transfer request + this.logger.error("Not implemented"); + } + + async handleGetRoutes(): Promise { + // add checks + this.logger.info("Handling transfer request"); + // ! todo implement transfer request + this.logger.error("Not implemented"); + } + } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts new file mode 100644 index 0000000000..b2cb2af53a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts @@ -0,0 +1,5 @@ +interface ISATPManagerBuilder { + producePartA(): void; + producePartB(): void; + producePartC(): void; +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts new file mode 100644 index 0000000000..5e2ce67db1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts @@ -0,0 +1,164 @@ +import { + Checks, + JsObjectSigner, + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; + +import { Stage1Handler } from "../../core/stage-handlers/stage1-handler"; +import { Stage2Handler } from "../../core/stage-handlers/stage2-handler"; +import { Stage3Handler } from "../../core/stage-handlers/stage3-handler"; +import { Stage1ServerService } from "../../core/stage-services/server/stage1-server-service"; +import { SATPGateway } from "../../gateway-refactor"; +import { Stage2ServerService } from "../../core/stage-services/server/stage2-server-service"; +import { Stage3ServerService } from "../../core/stage-services/server/stage3-server-service"; +import { ISATPSessionOptions, SATPSession } from "../../core/satp-session"; +import { ConnectRouter, createPromiseClient } from "@connectrpc/connect"; +import { ServiceType } from "@bufbuild/protobuf"; +import { SupportedGatewayImplementations } from "../../core/types"; +import { Stage1ClientService } from "../../core/stage-services/client/stage1-client-service"; +import { Stage2ClientService } from "../../core/stage-services/client/stage2-client-service"; +import { Stage3ClientService } from "../../core/stage-services/client/stage3-client-service"; +import { createConnectTransport } from "@connectrpc/connect-node"; +import { SATPService, ISATPServerServiceOptions } from "../../types/satp-protocol"; +import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; +import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; +import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; +import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; +import { PromiseClient as PromiseConnectClient, Transport as ConnectTransport, PromiseClient } from "@connectrpc/connect"; + +export interface ISATPManagerOptions { + logLevel?: LogLevelDesc; + instanceId: string; + sessions?: Map; + signer: JsObjectSigner; + supportedDLTs: SupportedGatewayImplementations[]; + connectClients: PromiseConnectClient[]; +} + +type SATPConnectHandler = (gateway: SATPGateway, service: SATPService) => (router: ConnectRouter) => void; + +export type SATPServiceClient = typeof SatpStage0Service | typeof SatpStage1Service | typeof SatpStage2Service | typeof SatpStage3Service; + +export class SATPManager { + public static readonly CLASS_NAME = "SATPManager"; + private readonly logger: Logger; + private readonly instanceId: string; + private endpoints: any[] | undefined; + private signer: JsObjectSigner; + private connectClients: PromiseConnectClient[]; + public supportedDLTs: SupportedGatewayImplementations[] = []; + protected sessions?: Map; + + private readonly stage1ServerService: SATPService; + private readonly stage2ServerService: SATPService; + private readonly stage3ServerService: SATPService; + private readonly stage1ClientService: SATPService; + private readonly stage2ClientService: SATPService; + private readonly stage3ClientService: SATPService; + + constructor( + public readonly options: ISATPManagerOptions, + ) { + const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "DEBUG"; + const label = this.className; + this.logger = LoggerProvider.getOrCreate({ level, label }); + this.instanceId = options.instanceId; + this.logger.info(`Instantiated ${this.className} OK`); + this.supportedDLTs = options.supportedDLTs; + this.signer = options.signer; + + this.sessions = options.sessions; + + const satpServiceOptions: ISATPServerServiceOptions = { + signer: this.signer, + }; + // create clients + + const satpServiceOptionsClient: ISATPServerServiceOptions = { + signer: this.signer, + + }; + this.connectClients = options.connectClients; + if (this.connectClients == undefined || this.connectClients.length == 0) { + this.logger.warn("Connect clients not provided"); + } + + this.stage1ServerService = new Stage1ServerService(satpServiceOptions); + this.stage2ServerService = new Stage2ServerService(satpServiceOptions); + this.stage3ServerService = new Stage3ServerService(satpServiceOptions); + this.stage1ClientService = new Stage1ClientService(satpServiceOptionsClient); + this.stage2ClientService = new Stage2ClientService(satpServiceOptionsClient); + this.stage3ClientService = new Stage3ClientService(satpServiceOptionsClient); + + /* + Stage1Handler(this.sessions, this.stage1ServerService, this.stage1ClientService, this.connectClients), + Stage2Handler(this.gateway, this.stage2Service), + Stage3Handler(this.gateway, this.stage3Service), + */ + } + + public get className(): string { + return SATPManager.CLASS_NAME; + } + + public getSessions(): Map | undefined { + return this.sessions; + } + + public getSession(sessionId: string): SATPSession[] | undefined { + if (this.sessions == undefined) { + return undefined; + } + return this.sessions.get(sessionId); + } + + get SupportedDLTs(): SupportedGatewayImplementations[] { + return this.supportedDLTs; + } + + public addSession(sessionId: string, contextID: string): void { + if (this.sessions == undefined) { + this.sessions = new Map(); + } else { + const existingSessions = this.sessions.get(sessionId); + const sessionOps: ISATPSessionOptions = { + contextID: contextID, + }; + if (existingSessions) { + + existingSessions.push(new SATPSession(sessionOps)); + this.sessions.set(sessionId, existingSessions); + } else { + this.sessions.set(sessionId, [new SATPSession(sessionOps)]); + } + } + } + + getOrCreateServices() { + const fnTag = `${SATPManager.CLASS_NAME}#getOrCreateServices()`; + this.logger.info( + `${fnTag}, Registering gRPCservices on instanceId=${this.instanceId}`, + ); + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + + this.endpoints = [ + + ]; + + return this.endpoints; + } + + get StageHandlers() { + throw new Error("Not implemented yet"); + } + + // methods to dynamically add/remove connect clients + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts new file mode 100644 index 0000000000..dfcefb553b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts @@ -0,0 +1 @@ +// TODO implement network identification draft \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts new file mode 100644 index 0000000000..ef715f1588 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts @@ -0,0 +1,95 @@ +import { GatewayIdentity, SupportedGatewayImplementations } from "../core/types"; +import { Logger } from "@hyperledger/cactus-common"; + +// gets an ID, queries a repository, returns a gateway identity +export async function resolveGatewayID(logger: Logger, ID: string): Promise { + const fnTag = `#resolveGatewayID()`; + logger.trace(`Entering ${fnTag}`); + logger.info(`Resolving gateway with ID: ${ID}`); + + const mockGatewayIdentity: GatewayIdentity[] = [ + { + id: "1", + name: "Gateway1", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + gatewayServerPort: 3011, + address: "http://localhost", + }, + { + id: "2", + name: "Gateway2", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + gatewayServerPort: 3012, + address: "http://localhost", + }, + ]; + return mockGatewayIdentity.filter((gateway) => gateway.id === ID)[0]; + } + +// TODO! dummy implementation for testing; contains hardcoded gateways similar to Bitcoin seeds +export function getGatewaySeeds(logger: Logger): GatewayIdentity[] { + const fnTag = `#getGatewaySeeds()`; + logger.trace(`Entering ${fnTag}`); + + const mockGatewayIdentity: GatewayIdentity[] = [ + { + id: "1", + name: "Gateway1", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + gatewayServerPort: 3011, + address: "http://localhost", + }, + { + id: "2", + name: "Gateway2", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID1", + gatewayServerPort: 3014, + address: "http://localhost", + }, + ]; + return mockGatewayIdentity; + } \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts new file mode 100644 index 0000000000..a0a243e179 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -0,0 +1,16 @@ +import { JsObjectSigner } from "@hyperledger/cactus-common"; +import { SupportedGatewayImplementations } from "../core/types"; +import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; +import { v4 as uuidV4 } from "uuid"; + +export type SATPService = { + +} + +export type ISATPServerServiceOptions = { + signer: JsObjectSigner; +} + +export type ISATPClientServiceOptions = { + signer: JsObjectSigner; +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts index f3f920b869..4958de05f3 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts @@ -138,7 +138,7 @@ describe("SATPGateway initialization", () => { const identity = gateway.Identity; expect(identity.gatewayClientPort).toBe(3010); expect(identity.address).toBe("https://localhost"); - await gateway.startupBOLServer(); + await gateway.startupGatewayServer(); await gateway.shutdown(); }); }); From d02643bea139bd61e5f93598849b6fe30cae4702 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Tue, 23 Apr 2024 13:24:33 +0300 Subject: [PATCH 13/49] fixup!: remove old implementation Signed-off-by: Rafael Belchior --- .../Dockerfile | 69 - .../README.md | 38 - .../healthcheck.sh | 3 - .../process.env | 8 - .../run-cbdc-app.sh | 14 - .../src/crypto-material/crypto-material.json | 39 - .../asset-reference/typescript/.gitignore | 16 - .../asset-reference/typescript/package.json | 64 - .../src/asset-reference-contract.spec.ts | 293 - .../src/asset-reference-contract.ts | 332 - .../typescript/src/asset-reference.ts | 20 - .../asset-reference/typescript/src/index.ts | 9 - .../asset-reference/typescript/tsconfig.json | 20 - .../cbdc-erc-20/javascript/.gitignore | 78 - .../crypto-material/crypto-material.json | 22 - .../cbdc-erc-20/javascript/index.js | 12 - .../cbdc-erc-20/javascript/lib/tokenERC20.js | 689 -- .../cbdc-erc-20/javascript/package.json | 49 - .../javascript/test/tokenERC20.test.js | 397 -- .../main/typescript/cbdc-bridging-app-cli.ts | 89 - .../src/main/typescript/cbdc-bridging-app.ts | 260 - .../src/main/typescript/index.ts | 1 - .../src/main/typescript/index.web.ts | 1 - .../cbdc-bridging-app-dummy-infrastructure.ts | 717 -- .../src/main/typescript/public-api.ts | 2 - .../satp-extension/besu-satp-gateway.ts | 603 -- .../satp-extension/client-helper.ts | 143 - .../satp-extension/fabric-satp-gateway.ts | 602 -- .../satp-extension/server-helper.ts | 147 - .../AssetReferenceContract.json | 5778 ----------------- .../asset-reference-contract/MyOwnable.sol | 78 - .../asset-reference-contract-test.sol | 60 - .../asset-reference-contract.sol | 130 - .../solidity/cbdc-erc-20/CBDCcontract.json | 2495 ------- .../cbdc-erc-20/cbdc-contract-test.sol | 49 - .../src/solidity/cbdc-erc-20/cbdc-erc-20.sol | 60 - .../test/typescript/cucumber/besu-helper.ts | 116 - .../test/typescript/cucumber/fabric-helper.ts | 161 - .../cucumber/features/besu-gateway.feature | 40 - .../cucumber/features/bridge-back.feature | 67 - .../cucumber/features/bridge-out.feature | 42 - .../cucumber/features/fabric-gateway.feature | 57 - .../cucumber/steps/besu-gateway.steps.ts | 170 - .../cucumber/steps/bridge-back.steps.ts | 126 - .../cucumber/steps/bridge-out.steps.ts | 163 - .../test/typescript/cucumber/steps/common.ts | 76 - .../cucumber/steps/fabric-gateway.steps.ts | 191 - .../integration/api-surface.test.ts | 6 - .../test/typescript/unit/api-surface.test.ts | 6 - .../supervisord.conf | 25 - .../tsconfig.json | 54 - .../main/typescript/core/besu-satp-gateway.ts | 519 -- .../src/main/typescript/core/client-helper.ts | 873 --- .../typescript/core/fabric-satp-gateway.ts | 482 -- .../src/main/typescript/core/server-helper.ts | 934 --- .../plugin-factory-besu-satp-gateway.ts | 20 - .../plugin-factory-fabric-satp-gateway.ts | 20 - .../main/typescript/plugin-satp-gateway.ts | 1201 ---- .../src/main/typescript/public-api.ts | 27 - .../typescript/recovery/recover-success.ts | 95 - .../typescript/recovery/recover-update-ack.ts | 97 - .../typescript/recovery/recover-update.ts | 145 - .../src/main/typescript/recovery/recover.ts | 141 - .../main/typescript/recovery/rollback-ack.ts | 92 - .../src/main/typescript/recovery/rollback.ts | 94 - .../client-side/client-request-endpoint.ts | 99 - .../commit-final-response-endpoint.ts | 103 - .../commit-prepare-response-endpoint.ts | 107 - .../lock-evidence-response-endpoint.ts | 106 - .../transfer-commence-response-endpoint.ts | 104 - .../transfer-initiation-response-endpoint.ts | 107 - .../recovery/recover-message-endpoint.ts | 103 - .../recover-success-message-endpoint.ts | 103 - .../recover-update-ack-message-endpoint.ts | 105 - .../recover-update-message-endpoint.ts | 103 - .../recovery/rollback-ack-message-endpoint.ts | 103 - .../recovery/rollback-message-endpoint.ts | 103 - .../commit-final-request-endpoint.ts | 102 - .../commite-prepare-request-endpoint.ts | 104 - .../lock-evidence-request-endpoint.ts | 106 - .../transfer-commence-request-endpoint.ts | 104 - .../transfer-complete-request-endpoint.ts | 104 - .../transfer-initiation-request-endpoint.ts | 107 - .../backup-gateway-after-client-crash.test.ts | 799 --- .../client-crash-after-delete-asset.test.ts | 813 --- .../client-crash-after-lock-asset.test.ts | 749 --- ...nt-crash-after-transfer-initiation.test.ts | 274 - ...dap-api-call-with-ledger-connector.test.ts | 624 -- .../integration/odap-api-call.test.ts | 204 - .../integration/odap-rollback.test.ts | 833 --- .../test/typescript/integration/odap.test.ts | 325 - .../server-crash-after-create-asset.test.ts | 835 --- ...er-crash-after-transfer-initiation.test.ts | 254 - .../src/test/typescript/make-checks.ts | 281 - .../unit/client/commit-final.test.ts | 226 - .../unit/client/commit-preparation.test.ts | 218 - .../unit/client/lock-evidence.test.ts | 208 - .../unit/client/transfer-commence.test.ts | 229 - .../client/transfer-initialization.test.ts | 246 - .../typescript/unit/recovery/logging.test.ts | 391 -- .../unit/recovery/recover-success.test.ts | 126 - .../unit/recovery/recover-update-ack.test.ts | 121 - .../unit/recovery/recover-update.test.ts | 209 - .../typescript/unit/recovery/recover.test.ts | 153 - .../unit/server/commit-final.test.ts | 265 - .../unit/server/commit-preparation.test.ts | 243 - .../unit/server/lock-evidence.test.ts | 298 - .../unit/server/transfer-commence.test.ts | 351 - .../unit/server/transfer-complete.test.ts | 118 - .../server/transfer-initialization.test.ts | 264 - tsconfig.json | 3 - yarn.lock | 2062 +----- 112 files changed, 75 insertions(+), 32947 deletions(-) delete mode 100644 examples/cactus-example-cbdc-bridging-backend/Dockerfile delete mode 100644 examples/cactus-example-cbdc-bridging-backend/README.md delete mode 100644 examples/cactus-example-cbdc-bridging-backend/healthcheck.sh delete mode 100644 examples/cactus-example-cbdc-bridging-backend/process.env delete mode 100755 examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js delete mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts delete mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts delete mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts delete mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts delete mode 100644 examples/cactus-example-cbdc-bridging-backend/supervisord.conf delete mode 100644 examples/cactus-example-cbdc-bridging-backend/tsconfig.json delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-fabric-satp-gateway.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts diff --git a/examples/cactus-example-cbdc-bridging-backend/Dockerfile b/examples/cactus-example-cbdc-bridging-backend/Dockerfile deleted file mode 100644 index 0276cab7a8..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/Dockerfile +++ /dev/null @@ -1,69 +0,0 @@ -FROM cruizba/ubuntu-dind:19.03.11 - -USER root - -RUN apt-get update -RUN apt -y upgrade - -# Need curl for healthchecks -RUN apt-get -y install --no-install-recommends curl - -# The file binary is used to inspect exectubles when debugging container image issues -RUN apt-get -y install --no-install-recommends file - -RUN apt-get -y install --no-install-recommends ca-certificates -RUN apt-get -y install --no-install-recommends tzdata - -RUN apt-get -y install --no-install-recommends git -RUN apt-get -y install --no-install-recommends apt-utils - -RUN apt -y install --no-install-recommends default-jdk - -ARG APP=/usr/src/app/cactus/ -COPY . ${APP} - -ENV TZ=Etc/UTC - -RUN mkdir -p ${APP} - -RUN mkdir -p "${APP}/log/" - -WORKDIR ${APP} - -SHELL ["/bin/bash", "--login", "-i", "-c"] -# Installing Node Version Manager (nvm) -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash - -RUN source ~/.bashrc && \ - nvm install 16.8.0 && \ - npm install -g yarn && \ - npm run configure - -SHELL ["/bin/bash", "--login", "-c"] - -COPY ./examples/cactus-example-cbdc-bridging-backend/healthcheck.sh / - -ENV API_HOST=localhost -ENV API_SERVER_1_PORT=4000 -ENV API_SERVER_2_PORT=4100 -ENV API_HOST_FRONTEND=localhost -ENV API_PORT_FRONTEND=2000 - -COPY examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/fabric-contracts -COPY examples/cactus-example-cbdc-bridging-backend/supervisord.conf /etc/supervisord.conf -COPY examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh /run-cbdc-app.sh -RUN chmod +x /run-cbdc-app.sh - -# supervisord web ui/dashboard -EXPOSE 9001 -# API #1 -EXPOSE 4000 -# API #2 -EXPOSE 4100 - -# Extend the parent image's entrypoint -# https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script -ENTRYPOINT ["/usr/bin/supervisord"] -CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] -HEALTHCHECK --interval=1s --timeout=5s --start-period=20s --retries=250 \ - CMD /usr/src/app/cactus/examples/cbdc-bridge-app/healthcheck.sh diff --git a/examples/cactus-example-cbdc-bridging-backend/README.md b/examples/cactus-example-cbdc-bridging-backend/README.md deleted file mode 100644 index c401469412..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Hyperledger Cactus Example - CBDC Bridging between Fabric and Besu Backend - -## Running the Test Suites - -> Make sure you have all the dependencies set up as explained in `BUILD.md` - -On the terminal, issue the following commands in the project root: - -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` - -Wait for the output to show the message `CbdcBridgingApp running...` - -In a second terminal run the following commands from the project root: -3. `cd examples/cactus-example-cbdc-bridging-backend` -4. `npm run test` - -## Running the Example Application Locally - -> Make sure you have all the dependencies set up as explained in `BUILD.md` - -On the terminal, issue the following commands: - -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` - -Wait for the output to show the message `CbdcBridgingApp running...` - -## Debugging the Example Application Locally - -On the terminal, issue the following commands (steps 1 to 6) and then perform the rest of the steps manually. - -1. `npm run configure` -2. Locate the `.vscode/template.launch.json` file -3. Within that file locate the entry named `"Example: CBDC Bridging Fabric-EVM App"` -4. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file -5. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: CBDC Bridging Fabric-EVM App"` which starts the application -6. Wait for the output to show the message `CbdcBridgingApp running...` diff --git a/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh b/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh deleted file mode 100644 index a4f7037da3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -curl -v -i -X OPTIONS http://127.0.0.1:${API_SERVER_1_PORT} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/process.env b/examples/cactus-example-cbdc-bridging-backend/process.env deleted file mode 100644 index 351fca7848..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/process.env +++ /dev/null @@ -1,8 +0,0 @@ -API_HOST=localhost -API_SERVER_1_PORT=4000 -API_SERVER_2_PORT=4100 -API_HOST_FRONTEND=localhost -API_PORT_FRONTEND=2000 -API_CRPC_HOST=localhost -API_SERVER_1_CRPC_PORT=6000 -API_SERVER_2_CRPC_PORT=6100 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh b/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh deleted file mode 100755 index 5eba756f93..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -function main() -{ - echo "Sleeping to let dockerd spin up" - sleep 10 - - docker pull ghcr.io/hyperledger/cactus-besu-all-in-one:2021-01-08-7a055c3 - docker pull ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2 - docker pull ipfs/go-ipfs:v0.8.0 - - /root/.nvm/versions/node/v16.8.0/bin/node -r ts-node/register /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/main/typescript/cbdc-bridging-app-cli.js -} - -main diff --git a/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json deleted file mode 100644 index 67525f5577..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json +++ /dev/null @@ -1,39 +0,0 @@ -{ "info": { - "description": "this file contains data to be used for testing purposes only. It should not be changed. It should remain consistent with the crypto material in the fabric chaincode" - }, - "accounts": { - "userA": { - "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", - "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - }, - "bridge": { - "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", - "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", - "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" - }, - "userB": { - "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", - "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - } - }, - "gateways": { - "gateway1": { - "publicKey": "02e2beaa887c53d0ddb8383e2c49553545f50ae19074b4c7f79238dcb59f4b5fcb", - "privateKey": "206021a8ffaba949d21e32c02d76d2dc13da25e8197532ab300bb49d91397e52" - }, - "gateway2": { - "publicKey": "02309ff54e58748616aa81245c1a4457f11fab47dcdb45b107dbcde24ee772b609", - "privateKey": "6bb4c730739969ff3429be71dd62d05459e61bc3f2956326449ae2ca7de50fb6" - } - }, - "keychains": { - "keychain1": { - "id": "df05d3c2-ddd5-4074-aae3-526564217459" - }, - "keychain2": { - "id": "d741fb4a-c95c-4205-8afa-758a9423234f" - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore deleted file mode 100644 index 79bfe1a3e0..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - - -# Coverage directory used by tools like istanbul -coverage - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# Compiled TypeScript files -dist - diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json deleted file mode 100644 index 1895375ca5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "asset-reference-contract", - "version": "1.0.0", - "description": "Asset Reference contract implemented in TypeScript", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", - "start": "fabric-chaincode-node start", - "build": "tsc", - "build:watch": "tsc -w", - "prepublishOnly": "npm run build" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "^2.4.1", - "fabric-shim": "2.4.1" - }, - "devDependencies": { - "@types/chai": "^4.2.11", - "@types/chai-as-promised": "^7.1.2", - "@types/mocha": "^7.0.2", - "@types/node": "18.11.9", - "@types/sinon": "^7.5.2", - "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", - "mocha": "^9.2.0", - "nyc": "^15.0.0", - "sinon": "^9.0.1", - "sinon-chai": "^3.5.0", - "ts-node": "^8.8.1", - "tslint": "^6.1.0", - "typescript": "5.5.2", - "winston": "^3.2.1" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "coverage/**", - "dist/**" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": true, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts deleted file mode 100644 index 9109626447..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts +++ /dev/null @@ -1,293 +0,0 @@ -/* - * SPDX-License-Identifier: Apache 2.0 - */ - -import { Context } from "fabric-contract-api"; -import { ChaincodeStub, ClientIdentity } from "fabric-shim"; -import { AssetReferenceContract } from "."; - -import * as winston from "winston"; -import * as chai from "chai"; -import * as chaiAsPromised from "chai-as-promised"; -import * as sinon from "sinon"; -import * as sinonChai from "sinon-chai"; - -const bridgedOutAmountKey = "amountBridgedOut"; - -const USER_A_FABRIC_ID = - "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; - -const USER_A_ETH_ADDRESS = - "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; - -chai.should(); -chai.use(chaiAsPromised); -chai.use(sinonChai); - -class TestContext extends Context { - public stub: sinon.SinonStubbedInstance = - sinon.createStubInstance(ChaincodeStub); - public clientIdentity: sinon.SinonStubbedInstance = - sinon.createStubInstance(ClientIdentity); - public logging = { - getLogger: sinon - .stub() - .returns(sinon.createStubInstance(winston.createLogger().constructor)), - setLevel: sinon.stub(), - }; -} - -describe("AssetReference", () => { - let contract: AssetReferenceContract; - let ctx: TestContext; - - beforeEach(() => { - contract = new AssetReferenceContract(); - ctx = new TestContext(); - ctx.clientIdentity.getMSPID.resolves("Org2MSP"); - ctx.stub.getState.withArgs(bridgedOutAmountKey).resolves(Buffer.from("50")); - ctx.stub.getState - .withArgs("1001") - .resolves( - Buffer.from( - `{"id":"1001","isLocked":false,"numberTokens":10,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - ctx.stub.getState - .withArgs("1002") - .resolves( - Buffer.from( - `{"id":"1002","isLocked":true,"numberTokens":30,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - describe("#assetReferenceExists", () => { - it("should return true for an asset reference", async () => { - await contract.AssetReferenceExists(ctx, "1001").should.eventually.be - .true; - }); - - it("should return false for an asset reference that does not exist", async () => { - await contract.AssetReferenceExists(ctx, "1003").should.eventually.be - .false; - }); - }); - - describe("#createAssetReference", () => { - it("should create an asset reference", async () => { - await contract.CreateAssetReference(ctx, "1003", 100, USER_A_FABRIC_ID); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - "1003", - Buffer.from( - `{"id":"1003","isLocked":false,"numberTokens":100,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - it("should throw an error for an asset reference that already exists", async () => { - await contract - .CreateAssetReference(ctx, "1001", 100, USER_A_FABRIC_ID) - .should.be.rejectedWith( - /The asset reference with ID 1001 already exists/, - ); - }); - }); - - describe("#readAssetReference", () => { - it("should return an asset reference", async () => { - await contract - .ReadAssetReference(ctx, "1001") - .should.eventually.deep.equal({ - id: "1001", - isLocked: false, - numberTokens: 10, - recipient: USER_A_FABRIC_ID, - }); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .ReadAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#IsAssetReferenceLocked", () => { - it("should return true for a locked asset reference", async () => { - const result1 = await contract.IsAssetReferenceLocked(ctx, "1001"); - const result2 = await contract.IsAssetReferenceLocked(ctx, "1002"); - chai.expect(result1).to.be.false; - chai.expect(result2).to.be.true; - - await contract - .IsAssetReferenceLocked(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#lockAssetReference", () => { - it("should lock an asset reference", async () => { - await contract.LockAssetReference(ctx, "1001"); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - "1001", - Buffer.from( - `{"id":"1001","isLocked":true,"numberTokens":10,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .LockAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - - it("should throw an error for an asset reference already locked", async () => { - await contract - .LockAssetReference(ctx, "1002") - .should.be.rejectedWith(/The asset reference 1002 is already locked/); - }); - }); - - describe("#unlockAssetReference", () => { - it("should unlock an asset reference", async () => { - await contract.UnlockAssetReference(ctx, "1002"); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - "1002", - Buffer.from( - `{"id":"1002","isLocked":false,"numberTokens":30,"recipient":"${USER_A_FABRIC_ID}"}`, - ), - ); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .UnlockAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#deleteAssetReference", () => { - it("should delete an asset reference", async () => { - await contract.DeleteAssetReference(ctx, "1001"); - ctx.stub.deleteState.should.have.been.calledOnceWithExactly("1001"); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .DeleteAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#GetBridgedOutAmount", () => { - it("should increase bridged out amount", async () => { - await contract.IncreaseBridgedAmount(ctx, 1001); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - bridgedOutAmountKey, - Buffer.from("1051"), - ); - }); - - it("should decrease bridged out amount", async () => { - await contract.DecreaseBridgedAmount(ctx, 10); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - bridgedOutAmountKey, - Buffer.from("40"), - ); - }); - - it("should thrown an error trying to decrease bridged out", async () => { - await contract - .DecreaseBridgedAmount(ctx, 100) - .should.be.rejectedWith(/Bridged back too many tokens/); - }); - - it("should throw an error for an asset reference that does not exist", async () => { - await contract - .DeleteAssetReference(ctx, "1003") - .should.be.rejectedWith(/The asset reference 1003 does not exist/); - }); - }); - - describe("#Refund", () => { - it("should decrease bridged out amount", async () => { - await contract.Refund(ctx, 20, USER_A_FABRIC_ID, USER_A_ETH_ADDRESS); - ctx.stub.putState.should.have.been.calledOnceWithExactly( - bridgedOutAmountKey, - Buffer.from("30"), - ); - }); - }); - - describe("#checkValidTransfer", () => { - const assetID = "1001"; - const amount1 = "10"; - const amount2 = "500"; - - it("should be a valid transfer bridging out CBDC to own address", async () => { - await contract.CheckValidBridgeOut( - ctx, - assetID, - amount1, - USER_A_FABRIC_ID, - USER_A_ETH_ADDRESS, - ).should.not.be.rejected; - }); - - it("should throw an error transfer CBDC escrowed by another user", async () => { - await contract - .CheckValidBridgeOut( - ctx, - assetID, - amount1, - "USER_B_FABRIC_ID", - USER_A_ETH_ADDRESS, - ) - .should.be.rejectedWith( - /it is not possible to transfer tokens escrowed by another user/, - ); - }); - - it("should throw an error bridging out more than the escrowed CBDC", async () => { - await contract - .CheckValidBridgeOut( - ctx, - assetID, - amount2, - USER_A_FABRIC_ID, - USER_A_ETH_ADDRESS, - ) - .should.be.rejectedWith( - /it is not possible to transfer a different amount of CBDC than the ones escrowed/, - ); - }); - }); - - describe("#operations", () => { - const number1 = 10; - const number2 = 500; - - it("add two numbers", () => { - const result = contract.add(number1, number2); - chai.expect(result).to.equal(number1 + number2); - }); - - it("subtract two numbers", () => { - const result = contract.sub(number2, number1); - chai.expect(result).to.equal(number2 - number1); - }); - }); - - describe("#checkPermission", () => { - it("user from organization other than Org2 is not authorized to perform operations", () => { - ctx.clientIdentity.getMSPID.resolves("Org1MSP"); - contract - .LockAssetReference(ctx, "1001") - .should.be.rejectedWith( - `client is not authorized to perform the operation. Org1MSP != "Org2MSP"`, - ); - }); - }); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts deleted file mode 100644 index 3a1f1d6904..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { AssetReference } from "./asset-reference"; - -const bridgedOutAmountKey = "amountBridgedOut"; - -@Info({ - title: "AssetReferenceContract", - description: "Smart contract for trading assets", -}) -export class AssetReferenceContract extends Contract { - // AssetReferenceExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetReferenceExists( - ctx: Context, - id: string, - ): Promise { - const assetJSON = await ctx.stub.getState(id); - return !!assetJSON && assetJSON.length > 0; - } - - // IsAssetReferenceLocked returns true when asset with given ID is locked in world state. - @Transaction(false) - @Returns("boolean") - public async IsAssetReferenceLocked( - ctx: Context, - id: string, - ): Promise { - const assetJSON = await ctx.stub.getState(id); - - if (assetJSON && assetJSON.length > 0) { - const asset = JSON.parse(assetJSON.toString()); - return asset.isLocked; - } else { - throw new Error(`The asset reference ${id} does not exist`); - } - } - - // CreateAssetReference issues a new asset to the world state with given details. - @Transaction() - public async CreateAssetReference( - ctx: Context, - assetId: string, - numberTokens: number, - recipient: string, - ): Promise { - console.log( - "Creating new asset reference with id: " + - assetId + - " representing " + - numberTokens + - " tokens", - ); - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (exists) { - throw new Error(`The asset reference with ID ${assetId} already exists`); - } - - const asset: AssetReference = { - id: assetId, - isLocked: false, - numberTokens: numberTokens, - recipient: recipient, - }; - - const buffer: Buffer = Buffer.from(JSON.stringify(asset)); - await ctx.stub.putState(assetId, buffer); - } - - @Transaction() - public async Refund( - ctx: Context, - numberTokens: number, - finalFabricIdentity: string, - ethAddress: string, - ): Promise { - await this.CheckPermission(ctx); - - console.log( - "Calling refund tokens to " + finalFabricIdentity + " from " + ethAddress, - ); - await ctx.stub.invokeChaincode( - "cbdc", - ["Refund", finalFabricIdentity, numberTokens.toString(), ethAddress], - ctx.stub.getChannelID(), - ); - - await this.DecreaseBridgedAmount(ctx, numberTokens); - } - - @Transaction(false) - @Returns("AssetReference") - public async ReadAssetReference( - ctx: Context, - assetId: string, - ): Promise { - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - const data: Uint8Array = await ctx.stub.getState(assetId); - const asset: AssetReference = JSON.parse(data.toString()) as AssetReference; - return asset; - } - - @Transaction() - public async LockAssetReference( - ctx: Context, - assetId: string, - ): Promise { - await this.CheckPermission(ctx); - - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - - if (await this.IsAssetReferenceLocked(ctx, assetId)) { - throw new Error(`The asset reference ${assetId} is already locked`); - } - - const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); - asset.isLocked = true; - const buffer: Buffer = Buffer.from(JSON.stringify(asset)); - - console.log("Locking asset reference with id: " + assetId); - await ctx.stub.putState(assetId, buffer); - } - - @Transaction(false) - public async CheckValidBridgeOut( - ctx: Context, - assetId: string, - amount: string, - fabricID: string, - ethAddress: string, - ): Promise { - // check if this transfer is allowed - const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); - - if (asset.recipient != fabricID) { - throw new Error( - `it is not possible to transfer tokens escrowed by another user`, - ); - } - - if (asset.numberTokens != parseInt(amount)) { - throw new Error( - `it is not possible to transfer a different amount of CBDC than the ones escrowed`, - ); - } - - await ctx.stub.invokeChaincode( - "cbdc", - ["checkAddressMapping", fabricID, ethAddress], - ctx.stub.getChannelID(), - ); - } - - @Transaction(false) - public async CheckValidBridgeBack( - ctx: Context, - fabricID: string, - ethAddress: string, - ): Promise { - await ctx.stub.invokeChaincode( - "cbdc", - ["checkAddressMapping", fabricID, ethAddress], - ctx.stub.getChannelID(), - ); - } - - @Transaction() - public async UnlockAssetReference( - ctx: Context, - assetId: string, - ): Promise { - await this.CheckPermission(ctx); - - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - - const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); - asset.isLocked = false; - const buffer: Buffer = Buffer.from(JSON.stringify(asset)); - - console.log("Unlocking asset reference with id: " + assetId); - await ctx.stub.putState(assetId, buffer); - } - - @Transaction() - public async DeleteAssetReference( - ctx: Context, - assetId: string, - ): Promise { - await this.CheckPermission(ctx); - - const exists: boolean = await this.AssetReferenceExists(ctx, assetId); - if (!exists) { - throw new Error(`The asset reference ${assetId} does not exist`); - } - const asset = await this.ReadAssetReference(ctx, assetId); - await this.IncreaseBridgedAmount(ctx, asset.numberTokens); - - console.log("Deleting asset reference with id: " + assetId); - await ctx.stub.deleteState(assetId); - } - - @Transaction(false) - public async GetBridgedOutAmount(ctx: Context): Promise { - const amountBytes = await ctx.stub.getState(bridgedOutAmountKey); - - let amountValue; - // If value doesn't yet exist, we'll create it with a value of 0 - if (!amountBytes || amountBytes.length === 0) { - amountValue = 0; - } else { - amountValue = parseInt(amountBytes.toString()); - } - - return amountValue; - } - - @Transaction() - public async IncreaseBridgedAmount( - ctx: Context, - value: number, - ): Promise { - await this.CheckPermission(ctx); - - const newBalance = this.add(await this.GetBridgedOutAmount(ctx), value); - await ctx.stub.putState( - bridgedOutAmountKey, - Buffer.from(newBalance.toString()), - ); - } - - @Transaction() - public async DecreaseBridgedAmount( - ctx: Context, - value: number, - ): Promise { - await this.CheckPermission(ctx); - - const newBalance = this.sub(await this.GetBridgedOutAmount(ctx), value); - - if (newBalance < 0) { - throw new Error(`Bridged back too many tokens`); - } - await ctx.stub.putState( - bridgedOutAmountKey, - Buffer.from(newBalance.toString()), - ); - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - public async GetAllAssetReferences(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push(record); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } - - @Transaction() - public async ResetState(ctx: Context): Promise { - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - console.log(result.value); - await ctx.stub.putState(result.value.key, undefined); - result = await iterator.next(); - } - - await ctx.stub.putState(bridgedOutAmountKey, Buffer.from("0")); - } - - // add two number checking for overflow - add(a, b) { - const c = a + b; - if (a !== c - b || b !== c - a) { - throw new Error(`Math: addition overflow occurred ${a} + ${b}`); - } - return c; - } - - // add two number checking for overflow - sub(a, b) { - const c = a - b; - if (a !== c + b || b !== a - c) { - throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); - } - return c; - } - - private async CheckPermission(ctx: Context) { - // this needs to be called by entity2 (the bridging entity) - const clientMSPID = await ctx.clientIdentity.getMSPID(); - if (clientMSPID !== "Org2MSP") { - throw new Error( - `client is not authorized to perform the operation. ${clientMSPID} != "Org2MSP"`, - ); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts deleted file mode 100644 index cab2df353e..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class AssetReference { - @Property() - public id: string; - - @Property() - public isLocked: boolean; - - @Property() - public numberTokens: number; - - @Property() - public recipient: string; -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts deleted file mode 100644 index 97998610fb..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetReferenceContract } from "./asset-reference-contract"; - -export { AssetReferenceContract } from "./asset-reference-contract"; - -export const contracts: any[] = [AssetReferenceContract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json deleted file mode 100644 index 4004da493c..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "target": "es2017", - "moduleResolution": "node", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "skipLibCheck": true - }, - "include": [ - "./src/**/*", - "src/**/*.json" - ], - "exclude": [ - "./src/**/*.spec.ts" - ] -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore deleted file mode 100644 index c84ff1dbdd..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore +++ /dev/null @@ -1,78 +0,0 @@ -# -# SPDX-License-Identifier: Apache-2.0 -# - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ -package-lock.json - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# next.js build output -.next - -# nuxt.js build output -.nuxt - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json deleted file mode 100644 index 1ec43cca91..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "info": { - "description": "this file contains data to be used for testing purposes only. It should not be changed. It should remain consistent with the crypto material in the fabric chaincode" - }, - "accounts": { - "userA": { - "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", - "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - }, - "bridge": { - "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", - "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", - "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" - }, - "userB": { - "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", - "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", - "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js deleted file mode 100644 index 2c63fa92a5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const tokenERC20Contract = require("./lib/tokenERC20.js"); - -module.exports.TokenERC20Contract = tokenERC20Contract; -module.exports.contracts = [tokenERC20Contract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js deleted file mode 100644 index 0ce3d715ba..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const { Contract } = require("fabric-contract-api"); -const CryptoMaterial = require("../crypto-material/crypto-material.json"); - -const accounts = [ - { - fabric: CryptoMaterial.accounts.userA.fabricID, - ethereum: CryptoMaterial.accounts.userA.ethAddress, - }, - { - fabric: CryptoMaterial.accounts.userB.fabricID, - ethereum: CryptoMaterial.accounts.userB.ethAddress, - }, - { - fabric: CryptoMaterial.accounts.bridge.fabricID, - ethereum: CryptoMaterial.accounts.bridge.ethAddress, - }, -]; - -const FABRIC_BRIDGE_IDENTITY = CryptoMaterial.accounts.bridge.fabricID; - -// Define objectType names for prefix -const balancePrefix = "balance"; -const allowancePrefix = "allowance"; -const addressPrefix = "address"; - -// Define key names for options -const nameKey = "name"; -const symbolKey = "symbol"; -const decimalsKey = "decimals"; -const totalSupplyKey = "totalSupply"; - -class TokenERC20Contract extends Contract { - /** - * Return the name of the token - e.g. "MyToken". - * The original function name is `name` in ERC20 specification. - * However, 'name' conflicts with a parameter `name` in `Contract` class. - * As a work around, we use `TokenName` as an alternative function name. - * - * @param {Context} ctx the transaction context - * @returns {String} Returns the name of the token - */ - async TokenName(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const nameBytes = await ctx.stub.getState(nameKey); - - return nameBytes.toString(); - } - - /** - * Return the symbol of the token. E.g. “HIX”. - * - * @param {Context} ctx the transaction context - * @returns {String} Returns the symbol of the token - */ - async Symbol(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const symbolBytes = await ctx.stub.getState(symbolKey); - return symbolBytes.toString(); - } - - /** - * Return the number of decimals the token uses - * e.g. 8, means to divide the token amount by 100000000 to get its user representation. - * - * @param {Context} ctx the transaction context - * @returns {Number} Returns the number of decimals - */ - async Decimals(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const decimalsBytes = await ctx.stub.getState(decimalsKey); - const decimals = parseInt(decimalsBytes.toString()); - return decimals; - } - - /** - * Return the total token supply. - * - * @param {Context} ctx the transaction context - * @returns {Number} Returns the total token supply - */ - async TotalSupply(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); - const totalSupply = parseInt(totalSupplyBytes.toString()); - return totalSupply; - } - - /** - * BalanceOf returns the balance of the given account. - * - * @param {Context} ctx the transaction context - * @param {String} owner The owner from which the balance will be retrieved - * @returns {Number} Returns the account balance - */ - async BalanceOf(ctx, owner) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [owner]); - - const balanceBytes = await ctx.stub.getState(balanceKey); - if (!balanceBytes || balanceBytes.length === 0) { - throw new Error(`the account ${owner} does not exist`); - } - const balance = parseInt(balanceBytes.toString()); - - return balance; - } - - /** - * Transfer transfers tokens from client account to recipient account. - * recipient account must be a valid clientID as returned by the ClientAccountID() function. - * - * @param {Context} ctx the transaction context - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async Transfer(ctx, to, value) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const from = ctx.clientIdentity.getID(); - - const transferResp = await this._transfer(ctx, from, to, value); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Emit the Transfer event - const transferEvent = { from, to, value: parseInt(value) }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - return true; - } - - /** - * Transfer `value` amount of tokens from `from` to `to`. - * - * @param {Context} ctx the transaction context - * @param {String} from The sender - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async TransferFrom(ctx, from, to, value) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const spender = ctx.clientIdentity.getID(); - - // Retrieve the allowance of the spender - const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ - from, - spender, - ]); - const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); - - if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { - throw new Error(`spender ${spender} has no allowance from ${from}`); - } - - const currentAllowance = parseInt(currentAllowanceBytes.toString()); - - // Convert value from string to int - const valueInt = parseInt(value); - - // Check if the transferred value is less than the allowance - if (currentAllowance < valueInt) { - throw new Error("The spender does not have enough allowance to spend."); - } - - const transferResp = await this._transfer(ctx, from, to, value); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Decrease the allowance - const updatedAllowance = this.sub(currentAllowance, valueInt); - await ctx.stub.putState( - allowanceKey, - Buffer.from(updatedAllowance.toString()), - ); - console.log( - `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, - ); - - // Emit the Transfer event - const transferEvent = { from, to, value: valueInt }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - console.log("transferFrom ended successfully"); - return true; - } - - async _transfer(ctx, from, to, value) { - if (from === to) { - throw new Error( - `cannot transfer to and from same client account: ${from}`, - ); - } - - // Convert value from string to int - const valueInt = parseInt(value); - - if (valueInt < 0) { - // transfer of 0 is allowed in ERC20, so just validate against negative amounts - throw new Error("transfer amount cannot be negative"); - } - - // Retrieve the current balance of the sender - const fromBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [from]); - const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); - - if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { - throw new Error(`client account ${from} has no balance`); - } - - const fromCurrentBalance = parseInt(fromCurrentBalanceBytes.toString()); - - // Check if the sender has enough tokens to spend. - if (fromCurrentBalance < valueInt) { - throw new Error(`client account ${from} has insufficient funds.`); - } - - // Retrieve the current balance of the recipient - const toBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [to]); - const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); - - let toCurrentBalance; - // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 - if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { - toCurrentBalance = 0; - } else { - toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); - } - - // Update the balance - const fromUpdatedBalance = this.sub(fromCurrentBalance, valueInt); - const toUpdatedBalance = this.add(toCurrentBalance, valueInt); - - await ctx.stub.putState( - fromBalanceKey, - Buffer.from(fromUpdatedBalance.toString()), - ); - await ctx.stub.putState( - toBalanceKey, - Buffer.from(toUpdatedBalance.toString()), - ); - - console.log( - `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, - ); - console.log( - `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, - ); - - return true; - } - - /** - * Allows `spender` to spend `value` amount of tokens from the owner. - * - * @param {Context} ctx the transaction context - * @param {String} spender The spender - * @param {Integer} value The amount of tokens to be approved for transfer - * @returns {Boolean} Return whether the approval was successful or not - */ - async Approve(ctx, spender, value) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const owner = ctx.clientIdentity.getID(); - - const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ - owner, - spender, - ]); - - let valueInt = parseInt(value); - await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); - - // Emit the Approval event - const approvalEvent = { owner, spender, value: valueInt }; - ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); - - console.log("approve ended successfully"); - return true; - } - - /** - * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. - * - * @param {Context} ctx the transaction context - * @param {String} owner The owner of tokens - * @param {String} spender The spender who are able to transfer the tokens - * @returns {Number} Return the amount of remaining tokens allowed to spent - */ - async Allowance(ctx, owner, spender) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ - owner, - spender, - ]); - - const allowanceBytes = await ctx.stub.getState(allowanceKey); - if (!allowanceBytes || allowanceBytes.length === 0) { - throw new Error(`spender ${spender} has no allowance from ${owner}`); - } - - const allowance = parseInt(allowanceBytes.toString()); - return allowance; - } - - // ================== Extended Functions ========================== - - /** - * Set optional infomation for a token. - * - * @param {Context} ctx the transaction context - * @param {String} name The name of the token - * @param {String} symbol The symbol of the token - * @param {String} decimals The decimals of the token - * @param {String} totalSupply The totalSupply of the token - */ - async Initialize(ctx, name, symbol, decimals) { - // Check minter authorization - this sample assumes Org1 is the central banker with privilege to set Options for these tokens - const clientMSPID = ctx.clientIdentity.getMSPID(); - if (clientMSPID !== "Org1MSP") { - throw new Error("client is not authorized to initialize contract"); - } - - //check contract options are not already set, client is not authorized to change them once initialized - const nameBytes = await ctx.stub.getState(nameKey); - if (nameBytes && nameBytes.length > 0) { - throw new Error( - "contract options are already set, client is not authorized to change them", - ); - } - - await ctx.stub.putState(nameKey, Buffer.from(name)); - await ctx.stub.putState(symbolKey, Buffer.from(symbol)); - await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); - - console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); - - await this.initializeAddressMapping(ctx); - return true; - } - - /** - * Mint creates new tokens and adds them to minter's account balance - * - * @param {Context} ctx the transaction context - * @param {Integer} amount amount of tokens to be minted - * @returns {Object} The balance - */ - async Mint(ctx, amount) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const minter = ctx.clientIdentity.getID(); - - // Check minter authorization - this sample assumes Org1 is the central banker with privilege to mint new tokens - const clientMSPID = ctx.clientIdentity.getMSPID(); - - if (clientMSPID !== "Org1MSP") { - throw new Error("client is not authorized to mint new tokens"); - } - - const amountInt = parseInt(amount); - if (amountInt <= 0) { - throw new Error("mint amount must be a positive integer"); - } - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); - - const currentBalanceBytes = await ctx.stub.getState(balanceKey); - // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 - let currentBalance; - if (!currentBalanceBytes || currentBalanceBytes.length === 0) { - currentBalance = 0; - } else { - currentBalance = parseInt(currentBalanceBytes.toString()); - } - const updatedBalance = this.add(currentBalance, amountInt); - - await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); - - // Increase totalSupply - const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); - let totalSupply; - if (!totalSupplyBytes || totalSupplyBytes.length === 0) { - console.log("Initialize the tokenSupply"); - totalSupply = 0; - } else { - totalSupply = parseInt(totalSupplyBytes.toString()); - } - totalSupply = this.add(totalSupply, amountInt); - await ctx.stub.putState( - totalSupplyKey, - Buffer.from(totalSupply.toString()), - ); - - // Emit the Transfer event - const transferEvent = { from: "0x0", to: minter, value: amountInt }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - console.log( - `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, - ); - return true; - } - - /** - * Burn redeem tokens from minter's account balance - * - * @param {Context} ctx the transaction context - * @param {Integer} amount amount of tokens to be burned - * @returns {Object} The balance - */ - async Burn(ctx, amount) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - // Check minter authorization - this sample assumes Org1 is the central banker with privilege to burn tokens - const clientMSPID = ctx.clientIdentity.getMSPID(); - if (clientMSPID !== "Org1MSP") { - throw new Error("client is not authorized to mint new tokens"); - } - - const minter = ctx.clientIdentity.getID(); - - const amountInt = parseInt(amount); - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); - - const currentBalanceBytes = await ctx.stub.getState(balanceKey); - if (!currentBalanceBytes || currentBalanceBytes.length === 0) { - throw new Error("The balance does not exist"); - } - const currentBalance = parseInt(currentBalanceBytes.toString()); - const updatedBalance = this.sub(currentBalance, amountInt); - - await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); - - // Decrease totalSupply - const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); - if (!totalSupplyBytes || totalSupplyBytes.length === 0) { - throw new Error("totalSupply does not exist."); - } - const totalSupply = this.sub( - parseInt(totalSupplyBytes.toString()), - amountInt, - ); - await ctx.stub.putState( - totalSupplyKey, - Buffer.from(totalSupply.toString()), - ); - - // Emit the Transfer event - const transferEvent = { from: minter, to: "0x0", value: amountInt }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - console.log( - `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, - ); - return true; - } - - /** - * ClientAccountBalance returns the balance of the requesting client's account. - * - * @param {Context} ctx the transaction context - * @returns {Number} Returns the account balance - */ - async ClientAccountBalance(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - // Get ID of submitting client identity - const clientAccountID = ctx.clientIdentity.getID(); - - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ - clientAccountID, - ]); - const balanceBytes = await ctx.stub.getState(balanceKey); - if (!balanceBytes || balanceBytes.length === 0) { - throw new Error(`the account ${clientAccountID} does not exist`); - } - const balance = parseInt(balanceBytes.toString()); - - return balance; - } - - // ClientAccountID returns the id of the requesting client's account. - // In this implementation, the client account ID is the clientId itself. - // Users can use this function to get their own account id, which they can then give to others as the payment address - async ClientAccountID(ctx) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - // Get ID of submitting client identity - const clientAccountID = ctx.clientIdentity.getID(); - return clientAccountID; - } - - //Checks that contract options have been already initialized - async CheckInitialized(ctx) { - const nameBytes = await ctx.stub.getState(nameKey); - if (!nameBytes || nameBytes.length === 0) { - throw new Error( - "contract options need to be set before calling any function, call Initialize() to initialize contract", - ); - } - } - - /** - * Escrow transfers tokens from client account to the bridging entity account. - * recipient account must be a valid clientID as returned by the ClientAccountID() function. - * - * @param {Context} ctx the transaction context - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async Escrow(ctx, value, id) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const from = ctx.clientIdentity.getID(); - - const transferResp = await this._transfer( - ctx, - from, - FABRIC_BRIDGE_IDENTITY, - value, - ); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Emit the Transfer event - const transferEvent = { - from, - FABRIC_BRIDGE_IDENTITY, - value: parseInt(value), - }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - - // this means that the transfer was made to the bridging entity - await ctx.stub.invokeChaincode( - "asset-reference-contract", - ["CreateAssetReference", id, value.toString(), from.toString()], - ctx.stub.getChannelID(), - ); - } - - /** - * Refunds transfers tokens from the bridging entity account to the client account. - * recipient account must be a valid clientID as returned by the ClientAccountID() function. - * - * @param {Context} ctx the transaction context - * @param {String} to The recipient - * @param {Integer} value The amount of token to be transferred - * @returns {Boolean} Return whether the transfer was successful or not - */ - async Refund(ctx, to, value, eth_address) { - //check contract options are already set first to execute the function - await this.CheckInitialized(ctx); - - const from = ctx.clientIdentity.getID(); - - if (from !== FABRIC_BRIDGE_IDENTITY) { - throw new Error("client is not authorized to refund tokens"); - } - - const clientEthAddress = await this.getAddressMapping(ctx, to); - - if (clientEthAddress !== eth_address) { - throw new Error( - "client is not authorized to bridge back tokens to another client account", - ); - } - - const transferResp = await this._transfer(ctx, from, to, value); - if (!transferResp) { - throw new Error("Failed to transfer"); - } - - // Emit the Transfer event - const transferEvent = { - from, - FABRIC_BRIDGE_IDENTITY, - value: parseInt(value), - }; - ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); - } - - async initializeAddressMapping(ctx) { - // initialize mapping between Fabric Identities and Ethereum addresses - for (let account of accounts) { - const addressKey = ctx.stub.createCompositeKey(addressPrefix, [ - account.fabric, - ]); - - // additionally initialize all addresses to 0 - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ - account.fabric, - ]); - - await ctx.stub.putState(addressKey, Buffer.from(account.ethereum)); - await ctx.stub.putState(balanceKey, Buffer.from("0")); - } - } - - async getAddressMapping(ctx, fabricID) { - await this.CheckInitialized(ctx); - - const addressKey = ctx.stub.createCompositeKey(addressPrefix, [fabricID]); - - console.log("retrieving address with key: " + addressKey); - const addressBytes = await ctx.stub.getState(addressKey); - if (!addressBytes || addressBytes.length === 0) { - throw new Error(`the account ${fabricID} does not exist`); - } - const address = addressBytes.toString(); - - return address; - } - - async checkAddressMapping(ctx, fabricID, ethAddress) { - const storedAddress = await this.getAddressMapping(ctx, fabricID); - - if (storedAddress != ethAddress) { - throw new Error(`it is not possible to bridge CBDC to another user.`); - } - } - - // add two number checking for overflow - add(a, b) { - let c = a + b; - if (a !== c - b || b !== c - a) { - throw new Error(`Math: addition overflow occurred ${a} + ${b}`); - } - return c; - } - - // add two number checking for overflow - sub(a, b) { - let c = a - b; - if (a !== c + b || b !== a - c) { - throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); - } - return c; - } - - /** - * Testing purposes function - */ - async ResetState(ctx) { - for (let account of accounts) { - const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ - account.fabric, - ]); - await ctx.stub.putState(balanceKey, Buffer.from("0")); - } - } -} - -module.exports = TokenERC20Contract; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json deleted file mode 100644 index e516e5e60c..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "cbdc", - "version": "0.0.1", - "description": "Token-ERC20 contract implemented in JavaScript", - "main": "index.js", - "engines": { - "node": ">=12", - "npm": ">=5" - }, - "scripts": { - "test": "nyc mocha --recursive", - "mocha": "mocha --recursive", - "start": "fabric-chaincode-node start" - }, - "engineStrict": true, - "author": "Hyperledger", - "license": "Apache-2.0", - "dependencies": { - "fabric-contract-api": "^2.2.3", - "fabric-shim": "^2.0.0" - }, - "devDependencies": { - "@types/sinon-chai": "^3.2.8", - "chai": "^4.1.2", - "chai-as-promised": "^7.1.1", - "mocha": "^8.0.1", - "nyc": "^14.1.1", - "sinon": "^6.0.0", - "sinon-chai": "^3.2.0" - }, - "nyc": { - "exclude": [ - "coverage/**", - "test/**", - "index.js", - ".eslintrc.js" - ], - "reporter": [ - "text-summary", - "html" - ], - "all": true, - "check-coverage": false, - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js deleted file mode 100644 index 8481b9af8b..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright IBM Corp. All Rights Reserved. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -"use strict"; - -const { Context } = require("fabric-contract-api"); -const { ChaincodeStub, ClientIdentity } = require("fabric-shim"); - -const { TokenERC20Contract } = require("../lib/tokenERC20"); - -const chai = require("chai"); -const chaiAsPromised = require("chai-as-promised"); -const sinon = require("sinon"); -const expect = chai.expect; - -chai.should(); -chai.use(chaiAsPromised); - -describe("Chaincode", () => { - let sandbox; - let token; - let ctx; - let mockStub; - let mockClientIdentity; - - beforeEach("Sandbox creation", async () => { - sandbox = sinon.createSandbox(); - token = new TokenERC20Contract("token-erc20"); - - ctx = sinon.createStubInstance(Context); - mockStub = sinon.createStubInstance(ChaincodeStub); - ctx.stub = mockStub; - mockClientIdentity = sinon.createStubInstance(ClientIdentity); - ctx.clientIdentity = mockClientIdentity; - - await token.Initialize(ctx, "some name", "some symbol", "2"); - - mockStub.putState.resolves("some state"); - mockStub.setEvent.returns("set event"); - }); - - afterEach("Sandbox restoration", () => { - sandbox.restore(); - }); - - describe("#TokenName", () => { - it("should work", async () => { - mockStub.getState.resolves("some state"); - - const response = await token.TokenName(ctx); - sinon.assert.calledWith(mockStub.getState, "name"); - expect(response).to.equals("some state"); - }); - }); - - describe("#Symbol", () => { - it("should work", async () => { - mockStub.getState.resolves("some state"); - - const response = await token.Symbol(ctx); - sinon.assert.calledWith(mockStub.getState, "symbol"); - expect(response).to.equals("some state"); - }); - }); - - describe("#Decimals", () => { - it("should work", async () => { - mockStub.getState.resolves(Buffer.from("2")); - - const response = await token.Decimals(ctx); - sinon.assert.calledWith(mockStub.getState, "decimals"); - expect(response).to.equals(2); - }); - }); - - describe("#TotalSupply", () => { - it("should work", async () => { - mockStub.getState.resolves(Buffer.from("10000")); - - const response = await token.TotalSupply(ctx); - sinon.assert.calledWith(mockStub.getState, "totalSupply"); - expect(response).to.equals(10000); - }); - }); - - describe("#BalanceOf", () => { - it("should work", async () => { - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.resolves(Buffer.from("1000")); - - const response = await token.BalanceOf(ctx, "Alice"); - expect(response).to.equals(1000); - }); - }); - - describe("#_transfer", () => { - it("should fail when the sender and the recipient are the same", async () => { - await expect( - token._transfer(ctx, "Alice", "Alice", "1000"), - ).to.be.rejectedWith( - Error, - "cannot transfer to and from same client account", - ); - }); - - it("should fail when the sender does not have enough token", async () => { - mockStub.createCompositeKey - .withArgs("balance", ["Alice"]) - .returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("500")); - - await expect( - token._transfer(ctx, "Alice", "Bob", "1000"), - ).to.be.rejectedWith( - Error, - "client account Alice has insufficient funds.", - ); - }); - - it("should transfer to a new account when the sender has enough token", async () => { - mockStub.createCompositeKey - .withArgs("balance", ["Alice"]) - .returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - - mockStub.createCompositeKey - .withArgs("balance", ["Bob"]) - .returns("balance_Bob"); - mockStub.getState.withArgs("balance_Bob").resolves(null); - - const response = await token._transfer(ctx, "Alice", "Bob", "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("0"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "balance_Bob", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - - it("should transfer to the existing account when the sender has enough token", async () => { - mockStub.createCompositeKey - .withArgs("balance", ["Alice"]) - .returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - - mockStub.createCompositeKey - .withArgs("balance", ["Bob"]) - .returns("balance_Bob"); - mockStub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); - - const response = await token._transfer(ctx, "Alice", "Bob", "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("0"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "balance_Bob", - Buffer.from("3000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Transfer", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("Alice"); - sinon.stub(token, "_transfer").returns(true); - - const response = await token.Transfer(ctx, "Bob", "1000"); - const event = { from: "Alice", to: "Bob", value: 1000 }; - sinon.assert.calledWith( - mockStub.setEvent, - "Transfer", - Buffer.from(JSON.stringify(event)), - ); - expect(response).to.equals(true); - }); - }); - - describe("#TransferFrom", () => { - it("should fail when the spender is not allowed to spend the token", async () => { - mockClientIdentity.getID.returns("Charlie"); - - mockStub.createCompositeKey - .withArgs("allowance", ["Alice", "Charlie"]) - .returns("allowance_Alice_Charlie"); - mockStub.getState - .withArgs("allowance_Alice_Charlie") - .resolves(Buffer.from("0")); - - await expect( - token.TransferFrom(ctx, "Alice", "Bob", "1000"), - ).to.be.rejectedWith( - Error, - "The spender does not have enough allowance to spend.", - ); - }); - - it("should transfer when the spender is allowed to spend the token", async () => { - mockClientIdentity.getID.returns("Charlie"); - - mockStub.createCompositeKey - .withArgs("allowance", ["Alice", "Charlie"]) - .returns("allowance_Alice_Charlie"); - mockStub.getState - .withArgs("allowance_Alice_Charlie") - .resolves(Buffer.from("3000")); - - sinon.stub(token, "_transfer").returns(true); - - const response = await token.TransferFrom(ctx, "Alice", "Bob", "1000"); - sinon.assert.calledWith( - mockStub.putState, - "allowance_Alice_Charlie", - Buffer.from("2000"), - ); - const event = { from: "Alice", to: "Bob", value: 1000 }; - sinon.assert.calledWith( - mockStub.setEvent, - "Transfer", - Buffer.from(JSON.stringify(event)), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Approve", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("Dave"); - mockStub.createCompositeKey.returns("allowance_Dave_Eve"); - - const response = await token.Approve(ctx, "Ellen", "1000"); - sinon.assert.calledWith( - mockStub.putState, - "allowance_Dave_Eve", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Allowance", () => { - it("should work", async () => { - mockStub.createCompositeKey.returns("allowance_Dave_Eve"); - mockStub.getState.resolves(Buffer.from("1000")); - - const response = await token.Allowance(ctx, "Dave", "Eve"); - expect(response).to.equals(1000); - }); - }); - - describe("#Initialize", () => { - it("should work", async () => { - //we consider it has already been initialized in the before-each statement - sinon.assert.calledWith( - mockStub.putState, - "name", - Buffer.from("some name"), - ); - sinon.assert.calledWith( - mockStub.putState, - "symbol", - Buffer.from("some symbol"), - ); - sinon.assert.calledWith(mockStub.putState, "decimals", Buffer.from("2")); - }); - - it("should failed if called a second time", async () => { - //we consider it has already been initialized in the before-each statement - await expect( - await token.Initialize(ctx, "some name", "some symbol", "2"), - ).to.be.rejectedWith( - Error, - "contract options are already set, client is not authorized to change them", - ); - }); - }); - - describe("#Mint", () => { - it("should add token to a new account and a new total supply", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(null); - mockStub.getState.withArgs("totalSupply").resolves(null); - - const response = await token.Mint(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("1000"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - - it("should add token to the existing account and the existing total supply", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); - - const response = await token.Mint(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("2000"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("3000"), - ); - expect(response).to.equals(true); - }); - - it("should add token to a new account and the existing total supply", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(null); - mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); - - const response = await token.Mint(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("1000"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("3000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#Burn", () => { - it("should work", async () => { - mockClientIdentity.getMSPID.returns("Org1MSP"); - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); - mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); - - const response = await token.Burn(ctx, "1000"); - sinon.assert.calledWith( - mockStub.putState.getCall(0), - "balance_Alice", - Buffer.from("0"), - ); - sinon.assert.calledWith( - mockStub.putState.getCall(1), - "totalSupply", - Buffer.from("1000"), - ); - expect(response).to.equals(true); - }); - }); - - describe("#ClientAccountBalance", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("Alice"); - mockStub.createCompositeKey.returns("balance_Alice"); - mockStub.getState.resolves(Buffer.from("1000")); - - const response = await token.ClientAccountBalance(ctx); - expect(response).to.equals(1000); - }); - }); - - describe("#ClientAccountID", () => { - it("should work", async () => { - mockClientIdentity.getID.returns("x509::{subject DN}::{issuer DN}"); - - const response = await token.ClientAccountID(ctx); - sinon.assert.calledOnce(mockClientIdentity.getID); - expect(response).to.equals("x509::{subject DN}::{issuer DN}"); - }); - }); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts deleted file mode 100755 index e94e09d390..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env node - -import { - AuthorizationProtocol, - ConfigService, - IAuthorizationConfig, -} from "@hyperledger/cactus-cmd-api-server"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { ICbdcBridgingApp, CbdcBridgingApp } from "./cbdc-bridging-app"; -import CryptoMaterial from "../../crypto-material/crypto-material.json"; -import "dotenv/config"; - -export async function launchApp( - env?: NodeJS.ProcessEnv, - args?: string[], -): Promise { - const configService = new ConfigService(); - const exampleConfig = await configService.newExampleConfig(); - exampleConfig.configFile = ""; - exampleConfig.authorizationConfigJson = JSON.stringify( - exampleConfig.authorizationConfigJson, - ) as unknown as IAuthorizationConfig; - exampleConfig.authorizationProtocol = AuthorizationProtocol.NONE; - - const convictConfig = - await configService.newExampleConfigConvict(exampleConfig); - - env = await configService.newExampleConfigEnv(convictConfig.getProperties()); - - const config = await configService.getOrCreate({ args, env }); - const serverOptions = config.getProperties(); - - LoggerProvider.setLogLevel(serverOptions.logLevel); - - const clientGatewayKeyPair = { - privateKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway1"].privateKey, "hex"), - ), - publicKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway1"].publicKey, "hex"), - ), - }; - - const serverGatewayKeyPair = { - privateKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway2"].privateKey, "hex"), - ), - publicKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway2"].publicKey, "hex"), - ), - }; - - if ( - process.env.API_HOST == undefined || - process.env.API_SERVER_1_PORT == undefined || - process.env.API_SERVER_2_PORT == undefined || - process.env.API_CRPC_HOST == undefined || - process.env.API_SERVER_1_CRPC_PORT == undefined || - process.env.API_SERVER_2_CRPC_PORT == undefined - ) { - throw new Error("Env variables not set"); - } - - const appOptions: ICbdcBridgingApp = { - apiHost: process.env.API_HOST, - apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), - apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), - clientGatewayKeyPair: clientGatewayKeyPair, - serverGatewayKeyPair: serverGatewayKeyPair, - logLevel: "DEBUG", - apiCrpcHost: process.env.API_CRPC_HOST, - apiServer1CrpcPort: parseInt(process.env.API_SERVER_1_CRPC_PORT), - apiServer2CrpcPort: parseInt(process.env.API_SERVER_2_CRPC_PORT), - }; - - const cbdcBridgingApp = new CbdcBridgingApp(appOptions); - try { - await cbdcBridgingApp.start(); - console.info("CbdcBridgingApp running..."); - } catch (ex) { - console.error(`CbdcBridgingApp crashed. Existing...`, ex); - await cbdcBridgingApp.stop(); - process.exit(-1); - } -} - -if (require.main === module) { - launchApp(); -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts deleted file mode 100644 index d349c35008..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { Server } from "http"; -import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - LogLevelDesc, - Logger, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { - ApiServer, - AuthorizationProtocol, - ConfigService, - ICactusApiServerOptions, -} from "@hyperledger/cactus-cmd-api-server"; -import { - Configuration, - IKeyPair, - DefaultApi as SatpApi, -} from "@hyperledger/cactus-plugin-satp-hermes/"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { CbdcBridgingAppDummyInfrastructure } from "./infrastructure/cbdc-bridging-app-dummy-infrastructure"; -import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { FabricSATPGateway } from "./satp-extension/fabric-satp-gateway"; -import { BesuSATPGateway } from "./satp-extension/besu-satp-gateway"; -import CryptoMaterial from "../../crypto-material/crypto-material.json"; - -export interface ICbdcBridgingApp { - apiHost: string; - apiServer1Port: number; - apiServer2Port: number; - apiCrpcHost: string; - apiServer1CrpcPort: number; - apiServer2CrpcPort: number; - clientGatewayKeyPair: IKeyPair; - serverGatewayKeyPair: IKeyPair; - logLevel?: LogLevelDesc; - apiServerOptions?: ICactusApiServerOptions; - disableSignalHandlers?: true; -} - -interface ICrpcOptions { - host: string; - port: number; -} - -export type ShutdownHook = () => Promise; -export class CbdcBridgingApp { - private readonly log: Logger; - private readonly shutdownHooks: ShutdownHook[]; - readonly infrastructure: CbdcBridgingAppDummyInfrastructure; - - public constructor(public readonly options: ICbdcBridgingApp) { - const fnTag = "CbdcBridgingApp#constructor()"; - - if (!options) { - throw new Error(`${fnTag} options parameter is falsy`); - } - const { logLevel } = options; - - const level = logLevel || "INFO"; - const label = "cbdc-bridging-app"; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.shutdownHooks = []; - - this.infrastructure = new CbdcBridgingAppDummyInfrastructure({ - logLevel: level, - }); - } - - public async start(): Promise { - this.log.debug(`Starting CBDC Bridging App...`); - - if (!this.options.disableSignalHandlers) { - exitHook((callback: IAsyncExitHookDoneCallback) => { - this.stop().then(callback); - }); - this.log.debug(`Registered signal handlers for graceful auto-shutdown`); - } - - await this.infrastructure.start(); - this.onShutdown(() => this.infrastructure.stop()); - - const fabricPlugin = - await this.infrastructure.createFabricLedgerConnector(); - const besuPlugin = await this.infrastructure.createBesuLedgerConnector(); - - // Reserve the ports where the API Servers will run - const httpApiA = await Servers.startOnPort( - this.options.apiServer1Port, - this.options.apiHost, - ); - const httpApiB = await Servers.startOnPort( - this.options.apiServer2Port, - this.options.apiHost, - ); - - const addressInfoA = httpApiA.address() as AddressInfo; - const nodeApiHostA = `http://${this.options.apiHost}:${addressInfoA.port}`; - - const addressInfoB = httpApiB.address() as AddressInfo; - const nodeApiHostB = `http://${this.options.apiHost}:${addressInfoB.port}`; - - const FabricSATPGateway = await this.infrastructure.createClientGateway( - nodeApiHostA, - this.options.clientGatewayKeyPair, - ); - - const BesuSATPGateway = await this.infrastructure.createServerGateway( - nodeApiHostB, - this.options.serverGatewayKeyPair, - ); - - const clientPluginRegistry = new PluginRegistry({ - plugins: [ - new PluginKeychainMemory({ - keychainId: CryptoMaterial.keychains.keychain1.id, - instanceId: uuidv4(), - logLevel: "INFO", - }), - ], - }); - const serverPluginRegistry = new PluginRegistry({ - plugins: [ - new PluginKeychainMemory({ - keychainId: CryptoMaterial.keychains.keychain2.id, - instanceId: uuidv4(), - logLevel: "INFO", - }), - ], - }); - - clientPluginRegistry.add(fabricPlugin); - clientPluginRegistry.add(FabricSATPGateway); - - serverPluginRegistry.add(besuPlugin); - serverPluginRegistry.add(BesuSATPGateway); - - const crpcOptionsServer1 = { - host: this.options.apiCrpcHost, - port: this.options.apiServer1CrpcPort, - }; - const apiServer1 = await this.startNode( - httpApiA, - clientPluginRegistry, - crpcOptionsServer1, - ); - - const crpcOptionsServer2 = { - host: this.options.apiCrpcHost, - port: this.options.apiServer2CrpcPort, - }; - const apiServer2 = await this.startNode( - httpApiB, - serverPluginRegistry, - crpcOptionsServer2, - ); - - const fabricApiClient = new FabricApi( - new Configuration({ basePath: nodeApiHostA }), - ); - - const besuApiClient = new BesuApi( - new Configuration({ basePath: nodeApiHostB }), - ); - - this.log.info("Deploying chaincode and smart contracts..."); - - await this.infrastructure.deployFabricCbdcContract(fabricApiClient); - - await this.infrastructure.deployFabricAssetReferenceContract( - fabricApiClient, - ); - - await this.infrastructure.deployBesuContracts(besuApiClient); - - this.log.info(`Chaincode and smart Contracts deployed.`); - - return { - apiServer1, - apiServer2, - fabricGatewayApi: new SatpApi( - new Configuration({ basePath: nodeApiHostA }), - ), - besuGatewayApi: new SatpApi( - new Configuration({ basePath: nodeApiHostB }), - ), - fabricApiClient, - besuApiClient, - FabricSATPGateway, - BesuSATPGateway, - }; - } - - public async stop(): Promise { - for (const hook of this.shutdownHooks) { - await hook(); // FIXME add timeout here so that shutdown does not hang - } - } - - public onShutdown(hook: ShutdownHook): void { - this.shutdownHooks.push(hook); - } - - public async startNode( - httpServerApi: Server, - pluginRegistry: PluginRegistry, - crpcOptions: ICrpcOptions, - ): Promise { - this.log.info(`Starting API Server node...`); - - const addressInfoApi = httpServerApi.address() as AddressInfo; - - let config; - if (this.options.apiServerOptions) { - config = this.options.apiServerOptions; - } else { - const configService = new ConfigService(); - const convictConfig = await configService.getOrCreate(); - config = convictConfig.getProperties(); - config.configFile = ""; - config.apiCorsDomainCsv = `http://${process.env.API_HOST_FRONTEND}:${process.env.API_PORT_FRONTEND}`; - config.cockpitCorsDomainCsv = `http://${process.env.API_HOST_FRONTEND}:${process.env.API_PORT_FRONTEND}`; - config.apiPort = addressInfoApi.port; - config.apiHost = addressInfoApi.address; - config.grpcPort = 0; - config.logLevel = this.options.logLevel || "INFO"; - config.authorizationProtocol = AuthorizationProtocol.NONE; - config.crpcHost = crpcOptions.host; - config.crpcPort = crpcOptions.port; - } - - const apiServer = new ApiServer({ - config, - httpServerApi, - pluginRegistry, - }); - - this.onShutdown(() => apiServer.shutdown()); - - await apiServer.start(); - - return apiServer; - } -} - -export interface IStartInfo { - readonly apiServer1: ApiServer; - readonly apiServer2: ApiServer; - readonly fabricGatewayApi: SatpApi; - readonly besuGatewayApi: SatpApi; - readonly besuApiClient: BesuApi; - readonly fabricApiClient: FabricApi; - readonly FabricSATPGateway: FabricSATPGateway; - readonly BesuSATPGateway: BesuSATPGateway; -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts deleted file mode 100755 index 87cb558397..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./public-api"; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts deleted file mode 100755 index cb0ff5c3b5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts deleted file mode 100644 index 6b5f92f18e..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts +++ /dev/null @@ -1,717 +0,0 @@ -import path from "path"; -import { v4 as uuidv4 } from "uuid"; -import fs from "fs-extra"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { - BesuTestLedger, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - DefaultApi as FabricApi, - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - DeploymentTargetOrgFabric2x, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - DefaultApi as BesuApi, - DeployContractSolidityBytecodeV1Request, - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - Web3SigningCredentialType, - InvokeContractV1Request as BesuInvokeContractV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; -import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; -import { IKeyPair } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSATPGateway } from "../satp-extension/fabric-satp-gateway"; -import { BesuSATPGateway } from "../satp-extension/besu-satp-gateway"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; -import CryptoMaterial from "../../../crypto-material/crypto-material.json"; -import { ClientHelper } from "../satp-extension/client-helper"; -import { ServerHelper } from "../satp-extension/server-helper"; - -export interface ICbdcBridgingAppDummyInfrastructureOptions { - logLevel?: LogLevelDesc; -} - -export class CbdcBridgingAppDummyInfrastructure { - public static readonly CLASS_NAME = "CbdcBridgingAppDummyInfrastructure"; - // TODO: Move this to the FabricTestLedger class where it belongs. - public static readonly FABRIC_2_AIO_CLI_CFG_DIR = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - private readonly besu: BesuTestLedger; - private readonly fabric: FabricTestLedgerV1; - private readonly log: Logger; - - public get className(): string { - return CbdcBridgingAppDummyInfrastructure.CLASS_NAME; - } - - public get orgCfgDir(): string { - return CbdcBridgingAppDummyInfrastructure.FABRIC_2_AIO_CLI_CFG_DIR; - } - - constructor( - public readonly options: ICbdcBridgingAppDummyInfrastructureOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.besu = new BesuTestLedger({ - logLevel: level || "DEBUG", - emitContainerLogs: true, - envVars: ["BESU_NETWORK=dev"], - }); - - this.fabric = new FabricTestLedgerV1({ - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel: level || "DEBUG", - }); - } - - public get org1Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { - return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1; - } - - public get org2Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { - return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2; - } - - public async start(): Promise { - try { - this.log.info(`Starting dummy infrastructure...`); - await Promise.all([this.besu.start(), this.fabric.start()]); - this.log.info(`Started dummy infrastructure OK`); - } catch (ex) { - this.log.error(`Starting of dummy infrastructure crashed: `, ex); - throw ex; - } - } - - public async stop(): Promise { - try { - this.log.info(`Stopping...`); - await Promise.all([ - this.besu.stop().then(() => this.besu.destroy()), - this.fabric.stop().then(() => this.fabric.destroy()), - ]); - this.log.info(`Stopped OK`); - } catch (ex) { - this.log.error(`Stopping crashed: `, ex); - throw ex; - } - } - - public async createFabricLedgerConnector(): Promise { - const connectionProfileOrg1 = await this.fabric.getConnectionProfileOrg1(); - const enrollAdminOutOrg1 = await this.fabric.enrollAdminV2({ - organization: "org1", - }); - const adminWalletOrg1 = enrollAdminOutOrg1[1]; - const [userIdentity1] = await this.fabric.enrollUserV2({ - wallet: adminWalletOrg1, - enrollmentID: "userA", - organization: "org1", - }); - const [userIdentity2] = await this.fabric.enrollUserV2({ - wallet: adminWalletOrg1, - enrollmentID: "userB", - organization: "org1", - }); - - const enrollAdminOutOrg2 = await this.fabric.enrollAdminV2({ - organization: "org2", - }); - const adminWalletOrg2 = enrollAdminOutOrg2[1]; - const [bridgeIdentity] = await this.fabric.enrollUserV2({ - wallet: adminWalletOrg2, - enrollmentID: "bridge", - organization: "org2", - }); - - const sshConfig = await this.fabric.getSshConfig(); - - const keychainEntryKey1 = "userA"; - const keychainEntryValue1 = JSON.stringify(userIdentity1); - - const keychainEntryKey2 = "userB"; - const keychainEntryValue2 = JSON.stringify(userIdentity2); - - const keychainEntryKey3 = "bridge"; - const keychainEntryValue3 = JSON.stringify(bridgeIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: CryptoMaterial.keychains.keychain1.id, - logLevel: undefined, - backend: new Map([ - [keychainEntryKey1, keychainEntryValue1], - [keychainEntryKey2, keychainEntryValue2], - [keychainEntryKey3, keychainEntryValue3], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - this.log.info(`Creating Fabric Connector...`); - return new PluginLedgerConnectorFabric({ - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: this.org1Env, - sshConfig, - connectionProfile: connectionProfileOrg1, - logLevel: this.options.logLevel || "INFO", - discoveryOptions: { - enabled: true, - asLocalhost: true, - }, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }); - } - - public async createBesuLedgerConnector(): Promise { - const rpcApiHttpHost = await this.besu.getRpcApiHttpHost(); - const rpcApiWsHost = await this.besu.getRpcApiWsHost(); - - const keychainEntryKey = AssetReferenceContractJson.contractName; - const keychainEntryValue = JSON.stringify(AssetReferenceContractJson); - - const keychainEntryKey2 = CBDCcontractJson.contractName; - const keychainEntryValue2 = JSON.stringify(CBDCcontractJson); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: CryptoMaterial.keychains.keychain2.id, - logLevel: undefined, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - [keychainEntryKey2, keychainEntryValue2], - ]), - }); - - this.log.info(`Creating Besu Connector...`); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - const besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const accounts = [ - CryptoMaterial.accounts.userA.ethAddress, - CryptoMaterial.accounts.userB.ethAddress, - CryptoMaterial.accounts.bridge.ethAddress, - ]; - - for (const account of accounts) { - await this.besu.sendEthToAccount(account); - } - - return besuConnector; - } - - public async createClientGateway( - nodeApiHost: string, - keyPair: IKeyPair, - ): Promise { - this.log.info(`Creating Source Gateway...`); - const pluginSourceGateway = new FabricSATPGateway({ - name: "cactus-plugin-source#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: keyPair, - fabricPath: nodeApiHost, - fabricSigningCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "bridge", - }, - fabricChannelName: "mychannel", - fabricContractName: "asset-reference-contract", - clientHelper: new ClientHelper(), - serverHelper: new ServerHelper({}), - }); - - await pluginSourceGateway.localRepository?.reset(); - await pluginSourceGateway.remoteRepository?.reset(); - - return pluginSourceGateway; - } - - public async createServerGateway( - nodeApiHost: string, - keyPair: IKeyPair, - ): Promise { - this.log.info(`Creating Recipient Gateway...`); - const pluginRecipientGateway = new BesuSATPGateway({ - name: "cactus-plugin-recipient#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: keyPair, - besuPath: nodeApiHost, - besuWeb3SigningCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - besuContractName: AssetReferenceContractJson.contractName, - besuKeychainId: CryptoMaterial.keychains.keychain2.id, - clientHelper: new ClientHelper(), - serverHelper: new ServerHelper({}), - }); - - await pluginRecipientGateway.localRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - return pluginRecipientGateway; - } - - public async deployFabricAssetReferenceContract( - fabricApiClient: FabricApi, - ): Promise { - const channelId = "mychannel"; - - const contractName = "asset-reference-contract"; - - const contractRelPath = - "../../../fabric-contracts/asset-reference/typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - // └── tslint.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset-reference.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset-reference-contract.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - let retries = 0; - while (retries <= 5) { - await fabricApiClient - .deployContractV1( - { - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [this.org1Env, this.org2Env], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "asset-reference-contract", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 120, - }, - { - maxContentLength: Infinity, - maxBodyLength: Infinity, - }, - ) - .then(async (res: { data: { packageIds: any; lifecycle: any } }) => { - retries = 6; - - const { packageIds, lifecycle } = res.data; - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - Checks.truthy(packageIds, `packageIds truthy OK`); - Checks.truthy( - Array.isArray(packageIds), - `Array.isArray(packageIds) truthy OK`, - ); - Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); - Checks.truthy( - Array.isArray(approveForMyOrgList), - `Array.isArray(approveForMyOrgList) truthy OK`, - ); - Checks.truthy(installList, `installList truthy OK`); - Checks.truthy( - Array.isArray(installList), - `Array.isArray(installList) truthy OK`, - ); - Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); - Checks.truthy( - Array.isArray(queryInstalledList), - `Array.isArray(queryInstalledList) truthy OK`, - ); - Checks.truthy(commit, `commit truthy OK`); - Checks.truthy(packaging, `packaging truthy OK`); - Checks.truthy(queryCommitted, `queryCommitted truthy OK`); - }) - .catch(() => console.log("trying to deploy fabric contract again")); - retries++; - } - } - - public async deployFabricCbdcContract( - fabricApiClient: FabricApi, - ): Promise { - const channelId = "mychannel"; - const channelName = channelId; - - const contractName = "cbdc"; - - const contractRelPath = "../../../fabric-contracts/cbdc-erc-20/javascript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── index.js - // ├── lib - // │ ├── tokenERC20.js - const sourceFiles: FileBase64[] = []; - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.js"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./tokenERC20.js"; - const relativePath = "./lib/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./crypto-material.json"; - const relativePath = "./crypto-material/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - let retries = 0; - while (retries <= 5) { - await fabricApiClient - .deployContractV1( - { - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: contractName, - targetOrganizations: [this.org1Env, this.org2Env], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "cbdc", - ccLang: ChainCodeProgrammingLanguage.Javascript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 120, - }, - { - maxContentLength: Infinity, - maxBodyLength: Infinity, - }, - ) - .then(async (res: { data: { packageIds: any; lifecycle: any } }) => { - retries = 6; - - const { packageIds, lifecycle } = res.data; - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - Checks.truthy(packageIds, `packageIds truthy OK`); - Checks.truthy( - Array.isArray(packageIds), - `Array.isArray(packageIds) truthy OK`, - ); - Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); - Checks.truthy( - Array.isArray(approveForMyOrgList), - `Array.isArray(approveForMyOrgList) truthy OK`, - ); - Checks.truthy(installList, `installList truthy OK`); - Checks.truthy( - Array.isArray(installList), - `Array.isArray(installList) truthy OK`, - ); - Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); - Checks.truthy( - Array.isArray(queryInstalledList), - `Array.isArray(queryInstalledList) truthy OK`, - ); - Checks.truthy(commit, `commit truthy OK`); - Checks.truthy(packaging, `packaging truthy OK`); - Checks.truthy(queryCommitted, `queryCommitted truthy OK`); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - let retries_2 = 0; - while (retries_2 <= 5) { - await new Promise((resolve) => setTimeout(resolve, 10000)); - - await fabricApiClient - .runTransactionV1({ - contractName, - channelName, - params: ["name1", "symbol1", "8"], - methodName: "Initialize", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }) - .then(() => (retries_2 = 6)) - .catch(() => - console.log("trying to Initialize fabric contract again"), - ); - retries_2++; - } - }) - .catch(() => console.log("trying to deploy fabric contract again")); - retries++; - } - } - - public async deployBesuContracts(besuApiClient: BesuApi): Promise { - const fnTag = `${this.className}#deployBesuContracts()`; - - const deployCbdcContractResponse = - await besuApiClient.deployContractSolBytecodeV1({ - keychainId: CryptoMaterial.keychains.keychain2.id, - contractName: CBDCcontractJson.contractName, - contractAbi: CBDCcontractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: CBDCcontractJson.bytecode, - gas: 10000000, - } as DeployContractSolidityBytecodeV1Request); - - if (deployCbdcContractResponse == undefined) { - throw new Error(`${fnTag}, error when deploying CBDC smart contract`); - } - - const deployAssetReferenceContractResponse = - await besuApiClient.deployContractSolBytecodeV1({ - keychainId: CryptoMaterial.keychains.keychain2.id, - contractName: AssetReferenceContractJson.contractName, - contractAbi: AssetReferenceContractJson.abi, - constructorArgs: [ - deployCbdcContractResponse.data.transactionReceipt.contractAddress, - ], - web3SigningCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: AssetReferenceContractJson.bytecode, - gas: 10000000, - } as DeployContractSolidityBytecodeV1Request); - - if (deployAssetReferenceContractResponse == undefined) { - throw new Error( - `${fnTag}, error when deploying Asset Reference smart contract`, - ); - } - - // set Asset Reference smart contract address in cbdc one (sidechain contract) - const insertARContractAddress = await besuApiClient.invokeContractV1({ - contractName: CBDCcontractJson.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "setAssetReferenceContract", - gas: 1000000, - params: [ - deployAssetReferenceContractResponse.data.transactionReceipt - .contractAddress, - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - } as BesuInvokeContractV1Request); - - if (insertARContractAddress == undefined) { - throw new Error( - `${fnTag}, error when setting Asset Reference smart contract address in sidechain contract`, - ); - } - - // make the owner of the sidechain contract the asset reference one - const transferOwnership = await besuApiClient.invokeContractV1({ - contractName: CBDCcontractJson.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "transferOwnership", - gas: 1000000, - params: [ - deployAssetReferenceContractResponse.data.transactionReceipt - .contractAddress, - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - } as BesuInvokeContractV1Request); - - if (transferOwnership == undefined) { - throw new Error( - `${fnTag}, error when transferring the ownershop Reference smart contract address in sidechain contract`, - ); - } - - // make the owner of the asset reference contract the sidechain one - const addOwnerToAssetRefContract = await besuApiClient.invokeContractV1({ - contractName: AssetReferenceContractJson.contractName, - invocationType: EthContractInvocationType.Send, - methodName: "addOwner", - gas: 1000000, - params: [ - deployCbdcContractResponse.data.transactionReceipt.contractAddress, - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - } as BesuInvokeContractV1Request); - - if (addOwnerToAssetRefContract == undefined) { - throw new Error( - `${fnTag}, error when transfering CBDC smart contract ownership`, - ); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts deleted file mode 100755 index b62ece0e7a..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { CbdcBridgingApp } from "./cbdc-bridging-app"; -export { launchApp } from "./cbdc-bridging-app-cli"; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts deleted file mode 100644 index 160220caad..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts +++ /dev/null @@ -1,603 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - DefaultApi as BesuApi, - Web3SigningCredential, - EthContractInvocationType, - InvokeContractV1Request as BesuInvokeContractV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; - -export interface IBesuSATPGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - besuContractName?: string; - besuWeb3SigningCredential?: Web3SigningCredential; - besuKeychainId?: string; - besuAssetID?: string; - besuPath?: string; -} - -export class BesuSATPGateway extends PluginSATPGateway { - public besuApi?: BesuApi; - public besuContractName?: string; - public besuWeb3SigningCredential?: Web3SigningCredential; - public besuKeychainId?: string; - - public constructor(options: IBesuSATPGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.besuPath != undefined) this.defineBesuConnection(options); - } - - private defineBesuConnection( - options: IBesuSATPGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineBesuConnection()`; - - const config = new Configuration({ basePath: options.besuPath }); - const apiClient = new BesuApi(config); - this.besuApi = apiClient; - const notEnoughBesuParams: boolean = - options.besuContractName == undefined || - options.besuWeb3SigningCredential == undefined || - options.besuKeychainId == undefined; - if (notEnoughBesuParams) { - throw new Error( - `${fnTag}, besu params missing. Should have: signing credentials, contract name, key chain ID, asset ID`, - ); - } - this.besuContractName = options.besuContractName; - this.besuWeb3SigningCredential = options.besuWeb3SigningCredential; - this.besuKeychainId = options.besuKeychainId; - } - - async isValidBridgeBackCBDC( - assetID: string, - amount: number, - user: string, - ): Promise { - // we should verify if the CBDC being bridged is valid or not - // e.g. if a client is trying to send more CBDC than what was escrowed - - if (this.besuApi != undefined) { - const response = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "checkValidBridgeBack", - gas: 1000000, - params: [assetID, amount, user], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (response.data.callOutput != true) { - throw new Error(`${response.statusText}`); - } - } - } - - async createAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetId == undefined) { - assetId = sessionData.recipientLedgerAssetID; - } - - let besuCreateAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const besuCreateRes = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "mint", - gas: 1000000, - params: [userEthAddress, amount], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuCreateRes.status != 200) { - throw new Error(`${fnTag}, besu create asset error`); - } - - const besuCreateResDataJson = JSON.parse( - JSON.stringify(besuCreateRes.data), - ); - - if (besuCreateResDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuCreateResDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - besuCreateResDataJson.out.transactionReceipt; - besuCreateAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.commitAcknowledgementClaim = besuCreateAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: besuCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return besuCreateAssetProof; - } - - async deleteAsset(sessionID: string, assetID?: string): Promise { - const fnTag = `${this.className}#deleteAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetID == undefined) { - assetID = sessionData.sourceLedgerAssetID; - } - - let besuDeleteAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const besuAssetDeletion = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAssetReference", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuAssetDeletion.status != 200) { - throw new Error(`${fnTag}, besu delete asset error`); - } - - const besuAssetDeletionDataJson = JSON.parse( - JSON.stringify(besuAssetDeletion.data), - ); - - if (besuAssetDeletionDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuAssetDeletionDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuAssetDeletionReceipt = - besuAssetDeletionDataJson.out.transactionReceipt; - besuDeleteAssetProof = JSON.stringify(besuAssetDeletionReceipt); - } - - sessionData.commitFinalClaim = besuDeleteAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: besuDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return besuDeleteAssetProof; - } - - async lockAsset(sessionID: string, assetID?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetID == undefined) { - assetID = sessionData.sourceLedgerAssetID; - } - - let besuLockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const besuAssetLock = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAssetReference", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuAssetLock.status != 200) { - throw new Error(`${fnTag}, besu lock asset error`); - } - - const besuAssetLockDataJson = JSON.parse( - JSON.stringify(besuAssetLock.data), - ); - - if (besuAssetLockDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuAssetLockDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuAssetLockReceipt = besuAssetLockDataJson.out.transactionReceipt; - besuLockAssetProof = JSON.stringify(besuAssetLockReceipt); - } - - sessionData.lockEvidenceClaim = besuLockAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: besuLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return besuLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const assetUnlockResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "unLockAssetReference", - gas: 1000000, - params: [assetId], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetUnlockResponse.status != 200) { - throw new Error(`${fnTag}, besu unlock asset error`); - } - - const assetUnlockResponseDataJson = JSON.parse( - JSON.stringify(assetUnlockResponse.data), - ); - - if (assetUnlockResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetUnlockResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetUnlockResponseDataJson.out.transactionReceipt; - besuUnlockAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Lock, - ); - sessionData.rollbackProofs.push(besuUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: besuUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return besuUnlockAssetProof; - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#createAssetToRollback()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuCreateAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const assetCreateResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "createAssetReference", - gas: 1000000, - params: [assetID, amount, userEthAddress], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetCreateResponse.status != 200) { - throw new Error(`${fnTag}, besu unlock asset error`); - } - - const assetCreateResponseDataJson = JSON.parse( - JSON.stringify(assetCreateResponse.data), - ); - - if (assetCreateResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetCreateResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetCreateResponseDataJson.out.transactionReceipt; - besuCreateAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Create, - ); - sessionData.rollbackProofs.push(besuCreateAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset create: ${besuCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "create", - data: besuCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return besuCreateAssetProof; - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - // not implemented. We assume the agreement was reached after the final interactions in each ledger - // (delete in the source chain and create in the side chain) - return `not implemented: ${sessionID}, ${assetID}`; - } - - async rollback(sessionID: string) { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.besuApi == undefined || - this.besuContractName == undefined || - this.besuKeychainId == undefined || - this.besuWeb3SigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.besuAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isBesuAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAssetToRollback( - sessionID, - sessionData.sourceLedgerAssetID, - ); - } - } - } - - /* Helper functions */ - async besuAssetExists(besuAssetID: string): Promise { - const fnTag = `${this.className}#besuAssetExists()`; - - const assetExists = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isPresent", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.callOutput == true; - } - - async isBesuAssetLocked(besuAssetID: string): Promise { - const fnTag = `${this.className}#isBesuAssetLocked()`; - - const assetIsLocked = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isAssetLocked", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.callOutput == true; - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts deleted file mode 100644 index 7e9649acb2..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { SHA256 } from "crypto-js"; -import { - PluginSATPGateway, - TransferInitializationV1Request, - ClientGatewayHelper, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { SatpMessageType } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricSATPGateway } from "./fabric-satp-gateway"; -import { BesuSATPGateway } from "./besu-satp-gateway"; - -export class ClientHelper extends ClientGatewayHelper { - async sendTransferInitializationRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${this.className}#sendTransferInitializationRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.id == undefined || - sessionData.step == undefined || - sessionData.version == undefined || - sessionData.maxRetries == undefined || - sessionData.maxTimeout == undefined || - sessionData.assetProfile == undefined || - sessionData.payloadProfile == undefined || - sessionData.loggingProfile == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.accessControlProfile == undefined || - sessionData.applicationProfile == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.sourceGatewayDltSystem == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.recipientLedgerAssetID == undefined || - sessionData.recipientGatewayDltSystem == undefined || - sessionData.allowedSourceBackupGateways == undefined || - sessionData.assetProfile.keyInformationLink == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if ( - !gateway.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem) - ) { - throw new Error( - `${fnTag}, recipient gateway dlt system is not supported by this gateway`, - ); - } - - const initializationRequestMessage: TransferInitializationV1Request = { - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionData.id, - version: sessionData.version, - // developer urn - // credential profile - payloadProfile: sessionData.payloadProfile, - applicationProfile: sessionData.applicationProfile, - loggingProfile: sessionData.loggingProfile, - accessControlProfile: sessionData.accessControlProfile, - signature: "", - sourceGatewayPubkey: gateway.pubKey, - sourceGatewayDltSystem: sessionData.sourceGatewayDltSystem, - recipientGatewayPubkey: sessionData.recipientGatewayPubkey, - recipientGatewayDltSystem: sessionData.recipientGatewayDltSystem, - sequenceNumber: sessionData.lastSequenceNumber, - sourceBasePath: sessionData.sourceBasePath, - recipientBasePath: sessionData.recipientBasePath, - // escrow type - // expiry time (related to the escrow) - // multiple claims allowed - // multiple cancels allowed - // permissions - maxRetries: sessionData.maxRetries, - maxTimeout: sessionData.maxTimeout, - backupGatewaysAllowed: sessionData.allowedSourceBackupGateways, - recipientLedgerAssetID: sessionData.recipientLedgerAssetID, - sourceLedgerAssetID: sessionData.sourceLedgerAssetID, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(initializationRequestMessage)), - ); - - initializationRequestMessage.signature = messageSignature; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(initializationRequestMessage), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - if (gateway instanceof FabricSATPGateway) { - await gateway - .isValidBridgeOutCBDC( - sessionData.sourceLedgerAssetID, - sessionData.assetProfile.keyInformationLink[0].toString(), // Amount - sessionData.assetProfile.keyInformationLink[1].toString(), // FabricID - sessionData.assetProfile.keyInformationLink[2].toString(), // ETH Address - ) - .catch((err) => { - throw new Error(`${err.response.data.error}`); - }); - } else if (gateway instanceof BesuSATPGateway) { - await gateway - .isValidBridgeBackCBDC( - sessionData.sourceLedgerAssetID, - sessionData.assetProfile.keyInformationLink[0].toString(), // Amount - sessionData.assetProfile.keyInformationLink[2].toString(), // ethAddress - ) - .catch((err) => { - throw new Error(`${err}`); - }); - } - - this.log.info(`${fnTag}, sending TransferInitializationRequest...`); - - if (!remote) { - return initializationRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase1TransferInitiationRequestV1(initializationRequestMessage), - "TransferInitializationRequest", - ); - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts deleted file mode 100644 index 3799d400aa..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts +++ /dev/null @@ -1,602 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - DefaultApi as FabricApi, - FabricSigningCredential, - FabricContractInvocationType, - RunTransactionRequest as FabricRunTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; - -export interface IFabricSATPGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - fabricPath?: string; - fabricSigningCredential?: FabricSigningCredential; - fabricChannelName?: string; - fabricContractName?: string; -} - -export class FabricSATPGateway extends PluginSATPGateway { - public fabricApi?: FabricApi; - public fabricSigningCredential?: FabricSigningCredential; - public fabricChannelName?: string; - public fabricContractName?: string; - - public constructor(options: IFabricSATPGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.fabricPath != undefined) this.defineFabricConnection(options); - } - - private defineFabricConnection( - options: IFabricSATPGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineFabricConnection()`; - - const config = new Configuration({ basePath: options.fabricPath }); - const apiClient = new FabricApi(config); - this.fabricApi = apiClient; - const notEnoughFabricParams: boolean = - options.fabricSigningCredential == undefined || - options.fabricChannelName == undefined || - options.fabricContractName == undefined; - if (notEnoughFabricParams) { - throw new Error( - `${fnTag}, fabric params missing should have: signing credentials, contract name, channel name, asset ID`, - ); - } - this.fabricSigningCredential = options.fabricSigningCredential; - this.fabricChannelName = options.fabricChannelName; - this.fabricContractName = options.fabricContractName; - } - - async isValidBridgeOutCBDC( - assetID: string, - amount: number, - fabricID: string, - ethAddress: string, - ) { - // we should verify if the CBDC being bridged is valid or not - // e.g. if a client is trying to send CBDC to another client in the sidechain, this should fail - - if (this.fabricApi != undefined) { - await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "CheckValidBridgeOut", - params: [assetID, amount, fabricID, ethAddress], - } as FabricRunTransactionRequest); - } - } - - async isValidBridgeBackCBDC(fabricID: string, ethAddress: string) { - // we should verify if the CBDC being bridged is valid or not - // e.g. if a client is trying to send CBDC to another client in the sidechain, this should fail - - if (this.fabricApi != undefined) { - await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Call, - methodName: "CheckValidBridgeBack", - params: [fabricID, ethAddress], - } as FabricRunTransactionRequest); - } - } - - async lockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricLockAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "LockAssetReference", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptLockRes = await this.fabricApi.getTransactionReceiptByTxIDV1( - { - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest, - ); - - this.log.warn(receiptLockRes.data); - fabricLockAssetProof = JSON.stringify(receiptLockRes.data); - } - - sessionData.lockEvidenceClaim = fabricLockAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${fabricLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: fabricLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "UnlockAssetReference", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptUnlock = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptUnlock.data); - fabricUnlockAssetProof = JSON.stringify(receiptUnlock.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Unlock, - ); - sessionData.rollbackProofs.push(fabricUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${fabricUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: fabricUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricUnlockAssetProof; - } - - async createAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricCreateAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.recipientLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const fabricClientID = - sessionData.assetProfile.keyInformationLink[1].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const response = await this.fabricApi.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [amount, fabricClientID, userEthAddress], - methodName: "Refund", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - } as FabricRunTransactionRequest); - - const receiptCreateRes = - await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptCreateRes.data); - fabricCreateAssetProof = JSON.stringify(receiptCreateRes.data); - } - - sessionData.commitAcknowledgementClaim = fabricCreateAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset create: ${fabricCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: fabricCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return fabricCreateAssetProof; - } - - async deleteAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#deleteAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricDeleteAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const deleteRes = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "DeleteAssetReference", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptDeleteRes = - await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, deleteRes.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptDeleteRes.data); - fabricDeleteAssetProof = JSON.stringify(receiptDeleteRes.data); - } - - sessionData.commitFinalClaim = fabricDeleteAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${fabricDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: fabricDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return fabricDeleteAssetProof; - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - this.fabricChannelName == undefined || - this.fabricContractName == undefined || - this.fabricSigningCredential == undefined || - sessionData.rollbackProofs == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.assetProfile == undefined || - sessionData.assetProfile.keyInformationLink == undefined || - sessionData.assetProfile.keyInformationLink.length != 3 - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricCreateAssetProof = ""; - - if (assetID == undefined) { - assetID = sessionData.recipientLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const amount = sessionData.assetProfile.keyInformationLink[0].toString(); - const userEthAddress = - sessionData.assetProfile.keyInformationLink[2].toString(); - - const response = await this.fabricApi.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [assetID, amount, userEthAddress], - methodName: "CreateAssetReference", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - } as FabricRunTransactionRequest); - - const receiptCreate = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptCreate.data); - fabricCreateAssetProof = JSON.stringify(receiptCreate.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Create, - ); - - sessionData.rollbackProofs.push(fabricCreateAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${fabricCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "create", - data: fabricCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return fabricCreateAssetProof; - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - // not implemented. We assume the agreement was reached after the final interactions in each ledger - // (delete in the source chain and create in the side chain) - return `not implemented: ${sessionID}, ${assetID}`; - } - - async rollback(sessionID: string): Promise { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.fabricApi == undefined || - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.fabricAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isFabricAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAssetToRollback( - sessionID, - sessionData.sourceLedgerAssetID, - ); - } - } - } - - /* Helper functions */ - public async fabricAssetExists( - fabricAssetID: string, - ): Promise { - const fnTag = `${this.className}#fabricAssetExists()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetExists = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "AssetReferenceExists", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.functionOutput == "true"; - } - - public async isFabricAssetLocked( - fabricAssetID: string, - ): Promise { - const fnTag = `${this.className}#isFabricAssetLocked()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetIsLocked = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "IsAssetReferenceLocked", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.functionOutput == "true"; - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts deleted file mode 100644 index cb283c6c01..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { SHA256 } from "crypto-js"; -import { - SessionData, - TransferInitializationV1Request, -} from "@hyperledger/cactus-plugin-satp-hermes"; -import { - SatpMessageType, - PluginSATPGateway, - ServerGatewayHelper, -} from "@hyperledger/cactus-plugin-satp-hermes"; - -import { FabricSATPGateway } from "./fabric-satp-gateway"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; - -export interface IServerHelperOptions { - logLevel?: LogLevelDesc; -} - -export class ServerHelper extends ServerGatewayHelper { - public static readonly CLASS_NAME: string = "ServerHelper"; - - constructor(readonly opts: IServerHelperOptions) { - super(); - this.log.debug(`Instantiated ${this.className} OK`); - } - - public get className(): string { - return ServerHelper.CLASS_NAME; - } - - async checkValidInitializationRequest( - request: TransferInitializationV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidInitializationRequest()`; - - const sessionData: SessionData = {}; - const recvTimestamp: string = Date.now().toString(); - const sessionID = request.sessionID; - - sessionData.id = sessionID; - sessionData.step = 2; - sessionData.initializationRequestMessageRcvTimeStamp = recvTimestamp; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.InitializationRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferInitializationRequest`, - ); - } - - if (!gateway.verifySignature(request, request.sourceGatewayPubkey)) { - throw new Error( - `${fnTag}, TransferInitializationRequest message signature verification failed`, - ); - } - - if (!gateway.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { - throw new Error( - `${fnTag}, source gateway dlt system is not supported by this gateway`, - ); - } - - if (request.payloadProfile.assetProfile.issuer != "CB1") { - throw new Error(`${fnTag}, asset issuer not recognized`); - } - - if (request.payloadProfile.assetProfile.assetCode != "CBDC1") { - throw new Error(`${fnTag}, asset code not recognized`); - } - - if (request.payloadProfile.assetProfile.keyInformationLink?.length != 3) { - throw new Error(`${fnTag}, CBDC parameters not specified`); - } - - const expiryDate: string = - request.payloadProfile.assetProfile.expirationDate; - const isDataExpired: boolean = new Date() >= new Date(expiryDate); - if (isDataExpired) { - throw new Error(`${fnTag}, asset has expired`); - } - - sessionData.version = request.version; - sessionData.maxRetries = request.maxRetries; - sessionData.maxTimeout = request.maxTimeout; - - sessionData.allowedSourceBackupGateways = request.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = gateway.backupGatewaysAllowed; - - sessionData.sourceBasePath = request.sourceBasePath; - sessionData.recipientBasePath = request.recipientBasePath; - sessionData.lastSequenceNumber = request.sequenceNumber; - sessionData.loggingProfile = request.loggingProfile; - sessionData.accessControlProfile = request.accessControlProfile; - sessionData.payloadProfile = request.payloadProfile; - sessionData.applicationProfile = request.applicationProfile; - sessionData.assetProfile = request.payloadProfile.assetProfile; - sessionData.sourceGatewayPubkey = request.sourceGatewayPubkey; - sessionData.sourceGatewayDltSystem = request.sourceGatewayDltSystem; - sessionData.recipientGatewayPubkey = request.recipientGatewayPubkey; - sessionData.recipientGatewayDltSystem = request.recipientGatewayDltSystem; - sessionData.rollbackActionsPerformed = []; - sessionData.rollbackProofs = []; - sessionData.lastMessageReceivedTimestamp = new Date().toString(); - sessionData.recipientLedgerAssetID = request.recipientLedgerAssetID; - sessionData.sourceLedgerAssetID = request.sourceLedgerAssetID; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = request.signature; - - sessionData.initializationRequestMessageProcessedTimeStamp = - Date.now().toString(); - - gateway.sessions.set(request.sessionID, sessionData); - - if (gateway instanceof FabricSATPGateway) { - await gateway - .isValidBridgeBackCBDC( - request.payloadProfile.assetProfile.keyInformationLink[1].toString(), // FabricID - request.payloadProfile.assetProfile.keyInformationLink[2].toString(), // ETH Address - ) - .catch((err) => { - throw new Error(`${err.response.data.error}`); - }); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - this.log.info(`TransferInitializationRequest passed all checks.`); - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json deleted file mode 100644 index 1156577ad5..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json +++ /dev/null @@ -1,5778 +0,0 @@ -{ - "contractName": "AssetReferenceContract", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - } - ], - "name": "OwnershipRemoved", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "checkValidBridgeBack", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "createAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllAssetReferences", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "bool", - "name": "isLocked", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct AssetReference[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAssetReference", - "outputs": [ - { - "components": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "bool", - "name": "isLocked", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct AssetReference", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isAssetLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isPresent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owners", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "removeItemFromList", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "oldOwner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resetAssetRefsList", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAssetReference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"checkValidBridgeBack\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"createAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetReferences\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isLocked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AssetReference[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAssetReference\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isLocked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AssetReference\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"removeItemFromList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetAssetRefsList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"owners()\":{\"details\":\"Returns the address of the current owners.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol\":\"AssetReferenceContract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol\":{\"keccak256\":\"0x0e64f282a7a93abd1a52b21d0a9995ea0252568fa4fdb35206e7a036368528fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c700a282ac8079d8ca12e687f58d0eb8665d16f433ea0824bd0fc2424132a167\",\"dweb:/ipfs/QmPsSRdwFppSrDnrjfRVAcKQpQK4DZMW73KGNY3bNBCNsX\"]},\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol\":{\"keccak256\":\"0xf4bc191b290664b626acc4e62cb09c3d95a83e836f9a35f83f8ace72a5103c29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://55fe1524d9dfb3256b44560103c52b5b74313aea0362483cc18d7aa51a90f864\",\"dweb:/ipfs/QmWkcmUzyZP6uWHJtpfB2FvareUH4tXySQJmPEGuv3mgGZ\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50604051611a0f380380611a0f83398101604081905261002f916100d3565b6100383361005d565b600180546001600160a01b0319166001600160a01b0392909216919091179055610103565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b6000602082840312156100e557600080fd5b81516001600160a01b03811681146100fc57600080fd5b9392505050565b6118fd806101126000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80637065cb4811610097578063affe39c111610066578063affe39c1146101f5578063b1fa25801461020a578063bc5482751461022a578063c8da01af1461023d57600080fd5b80637065cb48146101a95780638ef45293146101bc5780639ca27299146101cf578063ade3222b146101e257600080fd5b806342966c68116100d357806342966c681461016857806363773a6c1461017b578063663bcc921461018e5780636b4bd58c146101a157600080fd5b8063173825d9146101055780631ae4eb681461011a57806321db00b31461014257806340c10f1914610155575b600080fd5b6101186101133660046111d6565b610252565b005b61012d610128366004611241565b6102d0565b60405190151581526020015b60405180910390f35b610118610150366004611283565b610303565b61011861016336600461129c565b610476565b610118610176366004611283565b610563565b610118610189366004611241565b610647565b61011861019c3660046112c6565b610715565b6101186108fb565b6101186101b73660046111d6565b610923565b6101186101ca366004611241565b610999565b61012d6101dd3660046112c6565b6109db565b6101186101f0366004611241565b610a74565b6101fd610c4d565b6040516101399190611323565b61021d610218366004611241565b610caf565b60405161013991906113f1565b61012d610238366004611241565b610dc2565b610245610df1565b6040516101399190611404565b61025a610f14565b6001600160a01b0381166102c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206f6c64206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102cd81610fc3565b50565b6000600283836040516102e4929190611466565b9081526040519081900360200190206001015460ff1690505b92915050565b60045481106103495760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016102bb565b805b60045461035a9060019061148c565b81101561041a57600461036e82600161149f565b8154811061037e5761037e6114b2565b90600052602060002090600402016004828154811061039f5761039f6114b2565b60009182526020909120600490910201806103ba838261157b565b50600182810154908201805460ff909216151560ff1990921691909117905560028083015490820155600391820154910180546001600160a01b0319166001600160a01b039092169190911790558061041281611656565b91505061034b565b50600480548061042c5761042c61166f565b6000828152602081206000199092019160048302019061044c828261116c565b5060018101805460ff191690556000600282015560030180546001600160a01b0319169055905550565b61047e610f14565b6001546040516001600160a01b03848116602483015260448201849052600092169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104d89190611685565b6000604051808303816000865af19150503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b505090508061055e5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d0818d85b1b0819985a5b195960821b60448201526064016102bb565b505050565b61056b610f14565b600154604051602481018390526000916001600160a01b03169060440160408051601f198184030181529181526020820180516001600160e01b0316630852cd8d60e31b179052516105bd9190611685565b6000604051808303816000865af19150503d80600081146105fa576040519150601f19603f3d011682016040523d82523d6000602084013e6105ff565b606091505b50509050806106435760405162461bcd60e51b815260206004820152601060248201526f189d5c9b8818d85b1b0819985a5b195960821b60448201526064016102bb565b5050565b61064f610f14565b6106598282610dc2565b6106755760405162461bcd60e51b81526004016102bb906116a1565b61067f82826102d0565b156106da5760405162461bcd60e51b815260206004820152602560248201527f546865206173736574207265666572656e636520697320616c7265616479206c6044820152641bd8dad95960da1b60648201526084016102bb565b6001600283836040516106ee929190611466565b908152604051908190036020019020600101805491151560ff199092169190911790555050565b61071d610f14565b838360028686604051610731929190611466565b9081526040519081900360200190209161074c9190836116e3565b508160028585604051610760929190611466565b908152602001604051809103902060020181905550600060028585604051610789929190611466565b908152604051908190036020018120600101805492151560ff199093169290921790915581906002906107bf9087908790611466565b908152602001604051809103902060030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160038585604051610808929190611466565b908152604080519182900360209081018320805494151560ff199095169490941790935560a0601f870184900490930282018301905260808101858152600492829190889088908190850183828082843760009201829052509385525050506020808301829052604083018790526001600160a01b03861660609093019290925283546001810185559381522081519192600402019081906108aa908261179d565b50602082015160018201805460ff191691151591909117905560408201516002820155606090910151600390910180546001600160a01b0319166001600160a01b0390921691909117905550505050565b60005b6004548110156102cd5761091181610303565b8061091b81611656565b9150506108fe565b61092b610f14565b6001600160a01b0381166109905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102bb565b6102cd816110f6565b6109a1610f14565b6109ab8282610dc2565b6109c75760405162461bcd60e51b81526004016102bb906116a1565b6000600283836040516106ee929190611466565b60006109e78585610dc2565b610a035760405162461bcd60e51b81526004016102bb906116a1565b8260028686604051610a16929190611466565b90815260200160405180910390206002015410158015610a6b5750816001600160a01b031660028686604051610a4d929190611466565b908152604051908190036020019020600301546001600160a01b0316145b95945050505050565b610a7c610f14565b610a868282610dc2565b610aa25760405162461bcd60e51b81526004016102bb906116a1565b610aac82826102d0565b610af85760405162461bcd60e51b815260206004820152601d60248201527f546865206173736574207265666572656e6365206973206c6f636b656400000060448201526064016102bb565b610b2460028383604051610b0d929190611466565b908152602001604051809103902060020154610563565b60028282604051610b36929190611466565b9081526040519081900360200190206000610b51828261116c565b5060018101805460ff19169055600060028201819055600391820180546001600160a01b0319169055604051909190610b8d9085908590611466565b908152604051908190036020019020805491151560ff1990921691909117905560005b60045481101561055e578282604051602001610bcd929190611466565b6040516020818303038152906040528051906020012060048281548110610bf657610bf66114b2565b9060005260206000209060040201600001604051602001610c179190611851565b6040516020818303038152906040528051906020012003610c3b57610c3b81610303565b80610c4581611656565b915050610bb0565b60606000805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b5050505050905090565b604080516080810182526060808252600060208301819052828401819052908201529051600290610ce39085908590611466565b9081526020016040518091039020604051806080016040529081600082018054610d0c906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d38906114c8565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600182015460ff1615156020820152600282015460408201526003909101546001600160a01b03166060909101529392505050565b600060038383604051610dd6929190611466565b9081526040519081900360200190205460ff16905092915050565b60606004805480602002602001604051908101604052809291908181526020016000905b82821015610f0b5783829060005260206000209060040201604051806080016040529081600082018054610e48906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e74906114c8565b8015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050918352505060018281015460ff161515602080840191909152600284015460408401526003909301546001600160a01b031660609092019190915291835292019101610e15565b50505050905090565b6000805b600054811015610f7057336001600160a01b031660008281548110610f3f57610f3f6114b2565b6000918252602090912001546001600160a01b031603610f5e57600191505b80610f6881611656565b915050610f18565b506001811515146102cd5760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420616e206f776e65720060448201526064016102bb565b60005b6000548110156110be57816001600160a01b031660008281548110610fed57610fed6114b2565b6000918252602090912001546001600160a01b0316036110ac57600080546110179060019061148c565b81548110611027576110276114b2565b600091825260208220015481546001600160a01b03909116919083908110611051576110516114b2565b6000918252602082200180546001600160a01b0319166001600160a01b0393909316929092179091558054806110895761108961166f565b600082815260209020810160001990810180546001600160a01b03191690550190555b806110b681611656565b915050610fc6565b506040516001600160a01b038216907f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68190600090a250565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b508054611178906114c8565b6000825580601f10611188575050565b601f0160209004906000526020600020908101906102cd91905b808211156111b657600081556001016111a2565b5090565b80356001600160a01b03811681146111d157600080fd5b919050565b6000602082840312156111e857600080fd5b6111f1826111ba565b9392505050565b60008083601f84011261120a57600080fd5b50813567ffffffffffffffff81111561122257600080fd5b60208301915083602082850101111561123a57600080fd5b9250929050565b6000806020838503121561125457600080fd5b823567ffffffffffffffff81111561126b57600080fd5b611277858286016111f8565b90969095509350505050565b60006020828403121561129557600080fd5b5035919050565b600080604083850312156112af57600080fd5b6112b8836111ba565b946020939093013593505050565b600080600080606085870312156112dc57600080fd5b843567ffffffffffffffff8111156112f357600080fd5b6112ff878288016111f8565b90955093505060208501359150611318604086016111ba565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156113645783516001600160a01b03168352928401929184019160010161133f565b50909695505050505050565b60005b8381101561138b578181015183820152602001611373565b50506000910152565b600081516080845280518060808601526113b58160a0870160208501611370565b602084810151151590860152604080850151908601526060938401516001600160a01b0316938501939093525050601f01601f19160160a00190565b6020815260006111f16020830184611394565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561145957603f19888603018452611447858351611394565b9450928501929085019060010161142b565b5092979650505050505050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102fd576102fd611476565b808201808211156102fd576102fd611476565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806114dc57607f821691505b6020821081036114fc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561055e57600081815260208120601f850160051c8101602086101561153f5750805b601f850160051c820191505b8181101561155e5782815560010161154b565b505050505050565b600019600383901b1c191660019190911b1790565b818103611586575050565b61159082546114c8565b67ffffffffffffffff8111156115a8576115a8611502565b6115bc816115b684546114c8565b84611518565b6000601f8211600181146115ea57600083156115d85750848201545b6115e28482611566565b85555061164f565b600085815260209020601f19841690600086815260209020845b838110156116245782860154825560019586019590910190602001611604565b50858310156116425781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b60006001820161166857611668611476565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60008251611697818460208701611370565b9190910192915050565b60208082526022908201527f546865206173736574207265666572656e636520646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b67ffffffffffffffff8311156116fb576116fb611502565b61170f8361170983546114c8565b83611518565b6000601f84116001811461173d576000851561172b5750838201355b6117358682611566565b84555061164f565b600083815260209020601f19861690835b8281101561176e578685013582556020948501946001909201910161174e565b508682101561178b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b815167ffffffffffffffff8111156117b7576117b7611502565b6117c5816115b684546114c8565b602080601f8311600181146117f457600084156117e25750858301515b6117ec8582611566565b86555061155e565b600085815260208120601f198616915b8281101561182357888601518255948401946001909101908401611804565b50858210156118415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080835461185f816114c8565b60018281168015611877576001811461188c576118bb565b60ff19841687528215158302870194506118bb565b8760005260208060002060005b858110156118b25781548a820152908401908201611899565b50505082870194505b5092969550505050505056fea26469706673582212204e3defbf3329eeb8a9a2352d01161391069b644ab4b4adcc96c509b58240729a64736f6c63430008100033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106101005760003560e01c80637065cb4811610097578063affe39c111610066578063affe39c1146101f5578063b1fa25801461020a578063bc5482751461022a578063c8da01af1461023d57600080fd5b80637065cb48146101a95780638ef45293146101bc5780639ca27299146101cf578063ade3222b146101e257600080fd5b806342966c68116100d357806342966c681461016857806363773a6c1461017b578063663bcc921461018e5780636b4bd58c146101a157600080fd5b8063173825d9146101055780631ae4eb681461011a57806321db00b31461014257806340c10f1914610155575b600080fd5b6101186101133660046111d6565b610252565b005b61012d610128366004611241565b6102d0565b60405190151581526020015b60405180910390f35b610118610150366004611283565b610303565b61011861016336600461129c565b610476565b610118610176366004611283565b610563565b610118610189366004611241565b610647565b61011861019c3660046112c6565b610715565b6101186108fb565b6101186101b73660046111d6565b610923565b6101186101ca366004611241565b610999565b61012d6101dd3660046112c6565b6109db565b6101186101f0366004611241565b610a74565b6101fd610c4d565b6040516101399190611323565b61021d610218366004611241565b610caf565b60405161013991906113f1565b61012d610238366004611241565b610dc2565b610245610df1565b6040516101399190611404565b61025a610f14565b6001600160a01b0381166102c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206f6c64206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102cd81610fc3565b50565b6000600283836040516102e4929190611466565b9081526040519081900360200190206001015460ff1690505b92915050565b60045481106103495760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016102bb565b805b60045461035a9060019061148c565b81101561041a57600461036e82600161149f565b8154811061037e5761037e6114b2565b90600052602060002090600402016004828154811061039f5761039f6114b2565b60009182526020909120600490910201806103ba838261157b565b50600182810154908201805460ff909216151560ff1990921691909117905560028083015490820155600391820154910180546001600160a01b0319166001600160a01b039092169190911790558061041281611656565b91505061034b565b50600480548061042c5761042c61166f565b6000828152602081206000199092019160048302019061044c828261116c565b5060018101805460ff191690556000600282015560030180546001600160a01b0319169055905550565b61047e610f14565b6001546040516001600160a01b03848116602483015260448201849052600092169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104d89190611685565b6000604051808303816000865af19150503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b505090508061055e5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d0818d85b1b0819985a5b195960821b60448201526064016102bb565b505050565b61056b610f14565b600154604051602481018390526000916001600160a01b03169060440160408051601f198184030181529181526020820180516001600160e01b0316630852cd8d60e31b179052516105bd9190611685565b6000604051808303816000865af19150503d80600081146105fa576040519150601f19603f3d011682016040523d82523d6000602084013e6105ff565b606091505b50509050806106435760405162461bcd60e51b815260206004820152601060248201526f189d5c9b8818d85b1b0819985a5b195960821b60448201526064016102bb565b5050565b61064f610f14565b6106598282610dc2565b6106755760405162461bcd60e51b81526004016102bb906116a1565b61067f82826102d0565b156106da5760405162461bcd60e51b815260206004820152602560248201527f546865206173736574207265666572656e636520697320616c7265616479206c6044820152641bd8dad95960da1b60648201526084016102bb565b6001600283836040516106ee929190611466565b908152604051908190036020019020600101805491151560ff199092169190911790555050565b61071d610f14565b838360028686604051610731929190611466565b9081526040519081900360200190209161074c9190836116e3565b508160028585604051610760929190611466565b908152602001604051809103902060020181905550600060028585604051610789929190611466565b908152604051908190036020018120600101805492151560ff199093169290921790915581906002906107bf9087908790611466565b908152602001604051809103902060030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160038585604051610808929190611466565b908152604080519182900360209081018320805494151560ff199095169490941790935560a0601f870184900490930282018301905260808101858152600492829190889088908190850183828082843760009201829052509385525050506020808301829052604083018790526001600160a01b03861660609093019290925283546001810185559381522081519192600402019081906108aa908261179d565b50602082015160018201805460ff191691151591909117905560408201516002820155606090910151600390910180546001600160a01b0319166001600160a01b0390921691909117905550505050565b60005b6004548110156102cd5761091181610303565b8061091b81611656565b9150506108fe565b61092b610f14565b6001600160a01b0381166109905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102bb565b6102cd816110f6565b6109a1610f14565b6109ab8282610dc2565b6109c75760405162461bcd60e51b81526004016102bb906116a1565b6000600283836040516106ee929190611466565b60006109e78585610dc2565b610a035760405162461bcd60e51b81526004016102bb906116a1565b8260028686604051610a16929190611466565b90815260200160405180910390206002015410158015610a6b5750816001600160a01b031660028686604051610a4d929190611466565b908152604051908190036020019020600301546001600160a01b0316145b95945050505050565b610a7c610f14565b610a868282610dc2565b610aa25760405162461bcd60e51b81526004016102bb906116a1565b610aac82826102d0565b610af85760405162461bcd60e51b815260206004820152601d60248201527f546865206173736574207265666572656e6365206973206c6f636b656400000060448201526064016102bb565b610b2460028383604051610b0d929190611466565b908152602001604051809103902060020154610563565b60028282604051610b36929190611466565b9081526040519081900360200190206000610b51828261116c565b5060018101805460ff19169055600060028201819055600391820180546001600160a01b0319169055604051909190610b8d9085908590611466565b908152604051908190036020019020805491151560ff1990921691909117905560005b60045481101561055e578282604051602001610bcd929190611466565b6040516020818303038152906040528051906020012060048281548110610bf657610bf66114b2565b9060005260206000209060040201600001604051602001610c179190611851565b6040516020818303038152906040528051906020012003610c3b57610c3b81610303565b80610c4581611656565b915050610bb0565b60606000805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b5050505050905090565b604080516080810182526060808252600060208301819052828401819052908201529051600290610ce39085908590611466565b9081526020016040518091039020604051806080016040529081600082018054610d0c906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d38906114c8565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600182015460ff1615156020820152600282015460408201526003909101546001600160a01b03166060909101529392505050565b600060038383604051610dd6929190611466565b9081526040519081900360200190205460ff16905092915050565b60606004805480602002602001604051908101604052809291908181526020016000905b82821015610f0b5783829060005260206000209060040201604051806080016040529081600082018054610e48906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e74906114c8565b8015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050918352505060018281015460ff161515602080840191909152600284015460408401526003909301546001600160a01b031660609092019190915291835292019101610e15565b50505050905090565b6000805b600054811015610f7057336001600160a01b031660008281548110610f3f57610f3f6114b2565b6000918252602090912001546001600160a01b031603610f5e57600191505b80610f6881611656565b915050610f18565b506001811515146102cd5760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420616e206f776e65720060448201526064016102bb565b60005b6000548110156110be57816001600160a01b031660008281548110610fed57610fed6114b2565b6000918252602090912001546001600160a01b0316036110ac57600080546110179060019061148c565b81548110611027576110276114b2565b600091825260208220015481546001600160a01b03909116919083908110611051576110516114b2565b6000918252602082200180546001600160a01b0319166001600160a01b0393909316929092179091558054806110895761108961166f565b600082815260209020810160001990810180546001600160a01b03191690550190555b806110b681611656565b915050610fc6565b506040516001600160a01b038216907f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68190600090a250565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b508054611178906114c8565b6000825580601f10611188575050565b601f0160209004906000526020600020908101906102cd91905b808211156111b657600081556001016111a2565b5090565b80356001600160a01b03811681146111d157600080fd5b919050565b6000602082840312156111e857600080fd5b6111f1826111ba565b9392505050565b60008083601f84011261120a57600080fd5b50813567ffffffffffffffff81111561122257600080fd5b60208301915083602082850101111561123a57600080fd5b9250929050565b6000806020838503121561125457600080fd5b823567ffffffffffffffff81111561126b57600080fd5b611277858286016111f8565b90969095509350505050565b60006020828403121561129557600080fd5b5035919050565b600080604083850312156112af57600080fd5b6112b8836111ba565b946020939093013593505050565b600080600080606085870312156112dc57600080fd5b843567ffffffffffffffff8111156112f357600080fd5b6112ff878288016111f8565b90955093505060208501359150611318604086016111ba565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156113645783516001600160a01b03168352928401929184019160010161133f565b50909695505050505050565b60005b8381101561138b578181015183820152602001611373565b50506000910152565b600081516080845280518060808601526113b58160a0870160208501611370565b602084810151151590860152604080850151908601526060938401516001600160a01b0316938501939093525050601f01601f19160160a00190565b6020815260006111f16020830184611394565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561145957603f19888603018452611447858351611394565b9450928501929085019060010161142b565b5092979650505050505050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102fd576102fd611476565b808201808211156102fd576102fd611476565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806114dc57607f821691505b6020821081036114fc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561055e57600081815260208120601f850160051c8101602086101561153f5750805b601f850160051c820191505b8181101561155e5782815560010161154b565b505050505050565b600019600383901b1c191660019190911b1790565b818103611586575050565b61159082546114c8565b67ffffffffffffffff8111156115a8576115a8611502565b6115bc816115b684546114c8565b84611518565b6000601f8211600181146115ea57600083156115d85750848201545b6115e28482611566565b85555061164f565b600085815260209020601f19841690600086815260209020845b838110156116245782860154825560019586019590910190602001611604565b50858310156116425781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b60006001820161166857611668611476565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60008251611697818460208701611370565b9190910192915050565b60208082526022908201527f546865206173736574207265666572656e636520646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b67ffffffffffffffff8311156116fb576116fb611502565b61170f8361170983546114c8565b83611518565b6000601f84116001811461173d576000851561172b5750838201355b6117358682611566565b84555061164f565b600083815260209020601f19861690835b8281101561176e578685013582556020948501946001909201910161174e565b508682101561178b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b815167ffffffffffffffff8111156117b7576117b7611502565b6117c5816115b684546114c8565b602080601f8311600181146117f457600084156117e25750858301515b6117ec8582611566565b86555061155e565b600085815260208120601f198616915b8281101561182357888601518255948401946001909101908401611804565b50858210156118415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080835461185f816114c8565b60018281168015611877576001811461188c576118bb565b60ff19841687528215158302870194506118bb565b8760005260208060002060005b858110156118b25781548a820152908401908201611899565b50505082870194505b5092969550505050505056fea26469706673582212204e3defbf3329eeb8a9a2352d01161391069b644ab4b4adcc96c509b58240729a64736f6c63430008100033", - "sourceMap": "191:3466:1:-:0;;;598:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;348:26:0;2132:10;348:12;:26::i;:::-;633:13:1;:23;;-1:-1:-1;;;;;;633:23:1;-1:-1:-1;;;;;633:23:1;;;;;;;;;;191:3466;;1603:135:0;1670:7;:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;1670:22:0;-1:-1:-1;;;;;1670:22:0;;;;;;;;1707:24;;1670:22;;1707:24;;;1603:135;:::o;14:290:2:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:2;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:2:o;:::-;191:3466:1;;;;;;", - "deployedSourceMap": "191:3466:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1411:186:0;;;;;;:::i;:::-;;:::i;:::-;;2108:107:1;;;;;;:::i;:::-;;:::i;:::-;;;1317:14:2;;1310:22;1292:41;;1280:2;1265:18;2108:107:1;;;;;;;;3078:261;;;;;;:::i;:::-;;:::i;2342:234::-;;;;;;:::i;:::-;;:::i;2580:200::-;;;;;;:::i;:::-;;:::i;1062:243::-;;;;;;:::i;:::-;;:::i;665:393::-;;;;;;:::i;:::-;;:::i;3524:131::-;;;:::i;1222:183:0:-;;;;;;:::i;:::-;;:::i;1309:172:1:-;;;;;;:::i;:::-;;:::i;2784:259::-;;;;;;:::i;:::-;;:::i;1485:516::-;;;;;;:::i;:::-;;:::i;608:96:0:-;;;:::i;:::-;;;;;;;:::i;2219:119:1:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2005:99::-;;;;;;:::i;:::-;;:::i;3374:110::-;;;:::i;:::-;;;;;;;:::i;1411:186:0:-;500:13;:11;:13::i;:::-;-1:-1:-1;;;;;1493:22:0;::::1;1485:73;;;::::0;-1:-1:-1;;;1485:73:0;;5204:2:2;1485:73:0::1;::::0;::::1;5186:21:2::0;5243:2;5223:18;;;5216:30;5282:34;5262:18;;;5255:62;-1:-1:-1;;;5333:18:2;;;5326:36;5379:19;;1485:73:0::1;;;;;;;;;1568:22;1581:8;1568:12;:22::i;:::-;1411:186:::0;:::o;2108:107:1:-;2172:4;2191:6;2198:2;;2191:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:19;;;;;;-1:-1:-1;2108:107:1;;;;;:::o;3078:261::-;3149:13;:20;3140:29;;3132:60;;;;-1:-1:-1;;;3132:60:1;;5889:2:2;3132:60:1;;;5871:21:2;5928:2;5908:18;;;5901:30;-1:-1:-1;;;5947:18:2;;;5940:48;6005:18;;3132:60:1;5687:342:2;3132:60:1;3213:6;3199:111;3225:13;:20;:22;;3246:1;;3225:22;:::i;:::-;3221:1;:26;3199:111;;;3283:13;3297:5;:1;3301;3297:5;:::i;:::-;3283:20;;;;;;;;:::i;:::-;;;;;;;;;;;3264:13;3278:1;3264:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:39;;:16;:39;:::i;:::-;-1:-1:-1;3264:39:1;;;;;;;;;;;;;;;;-1:-1:-1;;3264:39:1;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3264:39:1;-1:-1:-1;;;;;3264:39:1;;;;;;;;;3249:3;;;;:::i;:::-;;;;3199:111;;;;3315:13;:19;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;;3315:19:1;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3315:19:1;;;;;-1:-1:-1;;3315:19:1;;;;;;;;;;;;-1:-1:-1;;;;;;3315:19:1;;;;;-1:-1:-1;3078:261:1:o;2342:234::-;500:13:0;:11;:13::i;:::-;2431::1::1;::::0;2457:65:::1;::::0;-1:-1:-1;;;;;9825:32:2;;;2457:65:1::1;::::0;::::1;9807:51:2::0;9874:18;;;9867:34;;;2413:12:1::1;::::0;2431:13:::1;::::0;9780:18:2;;2457:65:1::1;::::0;;-1:-1:-1;;2457:65:1;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2457:65:1::1;-1:-1:-1::0;;;2457:65:1::1;::::0;;2431:97;::::1;::::0;2457:65;2431:97:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2412:116;;;2543:7;2535:36;;;::::0;-1:-1:-1;;;2535:36:1;;10406:2:2;2535:36:1::1;::::0;::::1;10388:21:2::0;10445:2;10425:18;;;10418:30;-1:-1:-1;;;10464:18:2;;;10457:46;10520:18;;2535:36:1::1;10204:340:2::0;2535:36:1::1;2406:170;2342:234:::0;;:::o;2580:200::-;500:13:0;:11;:13::i;:::-;2652::1::1;::::0;2678:48:::1;::::0;::::1;::::0;::::1;10695:25:2::0;;;2634:12:1::1;::::0;-1:-1:-1;;;;;2652:13:1::1;::::0;10668:18:2;;2678:48:1::1;::::0;;-1:-1:-1;;2678:48:1;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2678:48:1::1;-1:-1:-1::0;;;2678:48:1::1;::::0;;2652:80;::::1;::::0;2678:48;2652:80:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2633:99;;;2747:7;2739:36;;;::::0;-1:-1:-1;;;2739:36:1;;10933:2:2;2739:36:1::1;::::0;::::1;10915:21:2::0;10972:2;10952:18;;;10945:30;-1:-1:-1;;;10991:18:2;;;10984:46;11047:18;;2739:36:1::1;10731:340:2::0;2739:36:1::1;2627:153;2580:200:::0;:::o;1062:243::-;500:13:0;:11;:13::i;:::-;1141::1::1;1151:2;;1141:9;:13::i;:::-;1133:60;;;;-1:-1:-1::0;;;1133:60:1::1;;;;;;;:::i;:::-;1208:17;1222:2;;1208:13;:17::i;:::-;1207:18;1199:68;;;::::0;-1:-1:-1;;;1199:68:1;;11681:2:2;1199:68:1::1;::::0;::::1;11663:21:2::0;11720:2;11700:18;;;11693:30;11759:34;11739:18;;;11732:62;-1:-1:-1;;;11810:18:2;;;11803:35;11855:19;;1199:68:1::1;11479:401:2::0;1199:68:1::1;1296:4;1274:6;1281:2;;1274:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:19:::1;;:26:::0;;;::::1;;-1:-1:-1::0;;1274:26:1;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;1062:243:1:o;665:393::-;500:13:0;:11;:13::i;:::-;785:2:1::1;;770:6;777:2;;770:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;:17:::1;::::0;;:10;:17:::1;:::i;:::-;;813:6;793;800:2;;793:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;:26;;;;847:5;825:6;832:2;;825:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:19:::1;;:27:::0;;;::::1;;-1:-1:-1::0;;825:27:1;;::::1;::::0;;;::::1;::::0;;;881:9;;858:6:::1;::::0;:10:::1;::::0;865:2;;;;858:10:::1;:::i;:::-;;;;;;;;;;;;;:20;;;:32;;;;;-1:-1:-1::0;;;;;858:32:1::1;;;;;-1:-1:-1::0;;;;;858:32:1::1;;;;;;915:4;897:11;909:2;;897:15;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;;::::1;::::0;;;;;:22;;;::::1;;-1:-1:-1::0;;897:22:1;;::::1;::::0;;;::::1;::::0;;;978:74;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;959:13:::1;::::0;897:15;;978:74;1000:2;;;;;;978:74;;1000:2;;;;978:74;::::1;;::::0;::::1;::::0;;;-1:-1:-1;978:74:1;;;-1:-1:-1;;;978:74:1::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;;;;;978:74:1;::::1;::::0;;;;;;;;959:94;;978:74;959:94;::::1;::::0;;;;;;;;;;::::1;;;::::0;;;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;959:94:1::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;959:94:1::1;::::0;::::1;;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;959:94:1::1;-1:-1:-1::0;;;;;959:94:1;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;;665:393:1:o;3524:131::-;3572:6;3567:84;3588:13;:20;3584:24;;3567:84;;;3623:21;3642:1;3623:18;:21::i;:::-;3610:3;;;;:::i;:::-;;;;3567:84;;1222:183:0;500:13;:11;:13::i;:::-;-1:-1:-1;;;;;1301:22:0;::::1;1293:73;;;::::0;-1:-1:-1;;;1293:73:0;;14655:2:2;1293:73:0::1;::::0;::::1;14637:21:2::0;14694:2;14674:18;;;14667:30;14733:34;14713:18;;;14706:62;-1:-1:-1;;;14784:18:2;;;14777:36;14830:19;;1293:73:0::1;14453:402:2::0;1293:73:0::1;1376:22;1389:8;1376:12;:22::i;1309:172:1:-:0;500:13:0;:11;:13::i;:::-;1390::1::1;1400:2;;1390:9;:13::i;:::-;1382:60;;;;-1:-1:-1::0;;;1382:60:1::1;;;;;;;:::i;:::-;1471:5;1449:6;1456:2;;1449:10;;;;;;;:::i;2784:259::-:0;2885:4;2905:13;2915:2;;2905:9;:13::i;:::-;2897:60;;;;-1:-1:-1;;;2897:60:1;;;;;;;:::i;:::-;2997:6;2976;2983:2;;2976:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;;:27;;2975:63;;;;;3033:4;-1:-1:-1;;;;;3009:28:1;:6;3016:2;;3009:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:20;;;-1:-1:-1;;;;;3009:20:1;:28;2975:63;2968:70;2784:259;-1:-1:-1;;;;;2784:259:1:o;1485:516::-;500:13:0;:11;:13::i;:::-;1566::1::1;1576:2;;1566:9;:13::i;:::-;1558:60;;;;-1:-1:-1::0;;;1558:60:1::1;;;;;;;:::i;:::-;1632:17;1646:2;;1632:13;:17::i;:::-;1624:59;;;::::0;-1:-1:-1;;;1624:59:1;;15062:2:2;1624:59:1::1;::::0;::::1;15044:21:2::0;15101:2;15081:18;;;15074:30;15140:31;15120:18;;;15113:59;15189:18;;1624:59:1::1;14860:353:2::0;1624:59:1::1;1690:23;1695:6;1702:2;;1695:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;;1690:4;:23::i;:::-;1727:6;1734:2;;1727:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;::::1;1720:17;1727:10:::0;;1720:17:::1;:::i;:::-;-1:-1:-1::0;1720:17:1::1;::::0;::::1;::::0;;-1:-1:-1;;1720:17:1::1;::::0;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;1720:17:1::1;::::0;;1743:15:::1;::::0;1720:17;;;1743:15:::1;::::0;1755:2;;;;1743:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:23;;;::::1;;-1:-1:-1::0;;1743:23:1;;::::1;::::0;;;::::1;::::0;;:15:::1;1806:191;1827:13;:20:::0;1823:24;::::1;1806:191;;;1945:2;;1928:20;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1918:31;;;;;;1893:13;1907:1;1893:16;;;;;;;;:::i;:::-;;;;;;;;;;;:19;;1876:37;;;;;;;;:::i;:::-;;;;;;;;;;;;;1866:48;;;;;;:83:::0;1862:129:::1;;1961:21;1980:1;1961:18;:21::i;:::-;1849:3:::0;::::1;::::0;::::1;:::i;:::-;;;;1806:191;;608:96:0::0;655:16;690:7;683:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;683:14:0;;;;;;;;;;;;;;;;;;;;;;;608:96;:::o;2219:119:1:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2323:10:1;;:6;;:10;;2330:2;;;;2323:10;:::i;:::-;;;;;;;;;;;;;2316:17;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2316:17:1;;;-1:-1:-1;;2316:17:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2316:17:1;;;;;;;2219:119;-1:-1:-1;;;2219:119:1:o;2005:99::-;2065:4;2084:11;2096:2;;2084:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;2005:99:1;;;;:::o;3374:110::-;3428:23;3466:13;3459:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3459:20:1;;;-1:-1:-1;;3459:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3459:20:1;;;;;;;;;;;;;;;;;;;;;;;;;3374:110;:::o;777:296:0:-;832:9;864:6;859:142;880:7;:14;876:18;;859:142;;;2132:10;-1:-1:-1;;;;;919:26:0;:7;927:1;919:10;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;919:10:0;:26;915:76;;972:4;965:11;;915:76;896:3;;;;:::i;:::-;;;;859:142;;;-1:-1:-1;1026:4:0;1018:12;;;;1010:56;;;;-1:-1:-1;;;1010:56:0;;16267:2:2;1010:56:0;;;16249:21:2;16306:2;16286:18;;;16279:30;16345:33;16325:18;;;16318:61;16396:18;;1010:56:0;16065:355:2;1744:303:0;1813:6;1808:195;1829:7;:14;1825:18;;1808:195;;;1882:5;-1:-1:-1;;;;;1868:19:0;:7;1876:1;1868:10;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;1868:10:0;:19;1864:129;;1920:7;1928:14;;:18;;1945:1;;1928:18;:::i;:::-;1920:27;;;;;;;;:::i;:::-;;;;;;;;;;1907:10;;-1:-1:-1;;;;;1920:27:0;;;;;1915:1;;1907:10;;;;;;:::i;:::-;;;;;;;;;:40;;-1:-1:-1;;;;;;1907:40:0;-1:-1:-1;;;;;1907:40:0;;;;;;;;;;;1965:13;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;1965:13:0;;;;;-1:-1:-1;;;;;;1965:13:0;;;;;;1864:129;1845:3;;;;:::i;:::-;;;;1808:195;;;-1:-1:-1;2017:23:0;;-1:-1:-1;;;;;2017:23:0;;;;;;;;1744:303;:::o;1603:135::-;1670:7;:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;1670:22:0;-1:-1:-1;;;;;1670:22:0;;;;;;;;1707:24;;1670:22;;1707:24;;;1603:135;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:173:2:-;82:20;;-1:-1:-1;;;;;131:31:2;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;:::-;333:39;192:186;-1:-1:-1;;;192:186:2:o;383:348::-;435:8;445:6;499:3;492:4;484:6;480:17;476:27;466:55;;517:1;514;507:12;466:55;-1:-1:-1;540:20:2;;583:18;572:30;;569:50;;;615:1;612;605:12;569:50;652:4;644:6;640:17;628:29;;704:3;697:4;688:6;680;676:19;672:30;669:39;666:59;;;721:1;718;711:12;666:59;383:348;;;;;:::o;736:411::-;807:6;815;868:2;856:9;847:7;843:23;839:32;836:52;;;884:1;881;874:12;836:52;924:9;911:23;957:18;949:6;946:30;943:50;;;989:1;986;979:12;943:50;1028:59;1079:7;1070:6;1059:9;1055:22;1028:59;:::i;:::-;1106:8;;1002:85;;-1:-1:-1;736:411:2;-1:-1:-1;;;;736:411:2:o;1344:180::-;1403:6;1456:2;1444:9;1435:7;1431:23;1427:32;1424:52;;;1472:1;1469;1462:12;1424:52;-1:-1:-1;1495:23:2;;1344:180;-1:-1:-1;1344:180:2:o;1529:254::-;1597:6;1605;1658:2;1646:9;1637:7;1633:23;1629:32;1626:52;;;1674:1;1671;1664:12;1626:52;1697:29;1716:9;1697:29;:::i;:::-;1687:39;1773:2;1758:18;;;;1745:32;;-1:-1:-1;;;1529:254:2:o;1788:553::-;1877:6;1885;1893;1901;1954:2;1942:9;1933:7;1929:23;1925:32;1922:52;;;1970:1;1967;1960:12;1922:52;2010:9;1997:23;2043:18;2035:6;2032:30;2029:50;;;2075:1;2072;2065:12;2029:50;2114:59;2165:7;2156:6;2145:9;2141:22;2114:59;:::i;:::-;2192:8;;-1:-1:-1;2088:85:2;-1:-1:-1;;2274:2:2;2259:18;;2246:32;;-1:-1:-1;2297:38:2;2331:2;2316:18;;2297:38;:::i;:::-;2287:48;;1788:553;;;;;;;:::o;2346:658::-;2517:2;2569:21;;;2639:13;;2542:18;;;2661:22;;;2488:4;;2517:2;2740:15;;;;2714:2;2699:18;;;2488:4;2783:195;2797:6;2794:1;2791:13;2783:195;;;2862:13;;-1:-1:-1;;;;;2858:39:2;2846:52;;2953:15;;;;2918:12;;;;2894:1;2812:9;2783:195;;;-1:-1:-1;2995:3:2;;2346:658;-1:-1:-1;;;;;;2346:658:2:o;3009:250::-;3094:1;3104:113;3118:6;3115:1;3112:13;3104:113;;;3194:11;;;3188:18;3175:11;;;3168:39;3140:2;3133:10;3104:113;;;-1:-1:-1;;3251:1:2;3233:16;;3226:27;3009:250::o;3264:586::-;3321:3;3365:5;3359:12;3392:4;3387:3;3380:17;3426:12;3420:19;3471:6;3464:4;3459:3;3455:14;3448:30;3487:82;3562:6;3556:3;3551;3547:13;3540:4;3526:12;3522:23;3487:82;:::i;:::-;3632:4;3621:16;;;3615:23;3608:31;3601:39;3585:14;;;3578:63;3690:4;3679:16;;;3673:23;3657:14;;;3650:47;3750:4;3739:16;;;3733:23;-1:-1:-1;;;;;3729:49:2;3713:14;;;3706:73;;;;-1:-1:-1;;3833:2:2;3812:15;-1:-1:-1;;3808:29:2;3799:39;3766:3;3795:49;;3264:586::o;3855:277::-;4046:2;4035:9;4028:21;4009:4;4066:60;4122:2;4111:9;4107:18;4099:6;4066:60;:::i;4137:860::-;4341:4;4370:2;4410;4399:9;4395:18;4440:2;4429:9;4422:21;4463:6;4498;4492:13;4529:6;4521;4514:22;4567:2;4556:9;4552:18;4545:25;;4629:2;4619:6;4616:1;4612:14;4601:9;4597:30;4593:39;4579:53;;4667:2;4659:6;4655:15;4688:1;4698:270;4712:6;4709:1;4706:13;4698:270;;;4805:2;4801:7;4789:9;4781:6;4777:22;4773:36;4768:3;4761:49;4833:55;4881:6;4872;4866:13;4833:55;:::i;:::-;4823:65;-1:-1:-1;4946:12:2;;;;4911:15;;;;4734:1;4727:9;4698:270;;;-1:-1:-1;4985:6:2;;4137:860;-1:-1:-1;;;;;;;4137:860:2:o;5409:273::-;5594:6;5586;5581:3;5568:33;5550:3;5620:16;;5645:13;;;5620:16;5409:273;-1:-1:-1;5409:273:2:o;6034:127::-;6095:10;6090:3;6086:20;6083:1;6076:31;6126:4;6123:1;6116:15;6150:4;6147:1;6140:15;6166:128;6233:9;;;6254:11;;;6251:37;;;6268:18;;:::i;6299:125::-;6364:9;;;6385:10;;;6382:36;;;6398:18;;:::i;6429:127::-;6490:10;6485:3;6481:20;6478:1;6471:31;6521:4;6518:1;6511:15;6545:4;6542:1;6535:15;6561:380;6640:1;6636:12;;;;6683;;;6704:61;;6758:4;6750:6;6746:17;6736:27;;6704:61;6811:2;6803:6;6800:14;6780:18;6777:38;6774:161;;6857:10;6852:3;6848:20;6845:1;6838:31;6892:4;6889:1;6882:15;6920:4;6917:1;6910:15;6774:161;;6561:380;;;:::o;6946:127::-;7007:10;7002:3;6998:20;6995:1;6988:31;7038:4;7035:1;7028:15;7062:4;7059:1;7052:15;7204:545;7306:2;7301:3;7298:11;7295:448;;;7342:1;7367:5;7363:2;7356:17;7412:4;7408:2;7398:19;7482:2;7470:10;7466:19;7463:1;7459:27;7453:4;7449:38;7518:4;7506:10;7503:20;7500:47;;;-1:-1:-1;7541:4:2;7500:47;7596:2;7591:3;7587:12;7584:1;7580:20;7574:4;7570:31;7560:41;;7651:82;7669:2;7662:5;7659:13;7651:82;;;7714:17;;;7695:1;7684:13;7651:82;;;7655:3;;;7204:545;;;:::o;7754:166::-;-1:-1:-1;;7882:1:2;7878:11;;;7874:24;7870:29;7860:40;7906:1;7902:11;;;;7857:57;;7754:166::o;7925:1431::-;8040:3;8034:4;8031:13;8028:26;;8047:5;;7925:1431::o;8028:26::-;8077:37;8109:3;8103:10;8077:37;:::i;:::-;8137:18;8129:6;8126:30;8123:56;;;8159:18;;:::i;:::-;8188:97;8278:6;8238:38;8270:4;8264:11;8238:38;:::i;:::-;8232:4;8188:97;:::i;:::-;8311:1;8339:2;8331:6;8328:14;8356:1;8351:748;;;;9143:1;9160:6;9157:89;;;-1:-1:-1;9212:19:2;;;9206:26;9157:89;9272:67;9332:6;9325:5;9272:67;:::i;:::-;9266:4;9259:81;;8321:1029;;8351:748;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;8387:20:2;;;7151:1;7144:14;;;7188:4;7175:18;;8551:9;8573:251;8587:7;8584:1;8581:14;8573:251;;;8669:21;;;8663:28;8648:44;;8719:1;8792:18;;;;8747:15;;;;8610:4;8603:12;8573:251;;;8577:3;8852:6;8843:7;8840:19;8837:203;;;8913:21;;;8907:28;-1:-1:-1;;8998:1:2;8994:14;;;9010:3;8990:24;8986:37;8982:42;8967:58;8952:74;;8837:203;;;;9086:1;9077:6;9074:1;9070:14;9066:22;9060:4;9053:36;8321:1029;;;;7925:1431;;:::o;9361:135::-;9400:3;9421:17;;;9418:43;;9441:18;;:::i;:::-;-1:-1:-1;9488:1:2;9477:13;;9361:135::o;9501:127::-;9562:10;9557:3;9553:20;9550:1;9543:31;9593:4;9590:1;9583:15;9617:4;9614:1;9607:15;9912:287;10041:3;10079:6;10073:13;10095:66;10154:6;10149:3;10142:4;10134:6;10130:17;10095:66;:::i;:::-;10177:16;;;;;9912:287;-1:-1:-1;;9912:287:2:o;11076:398::-;11278:2;11260:21;;;11317:2;11297:18;;;11290:30;11356:34;11351:2;11336:18;;11329:62;-1:-1:-1;;;11422:2:2;11407:18;;11400:32;11464:3;11449:19;;11076:398::o;11885:1206::-;12009:18;12004:3;12001:27;11998:53;;;12031:18;;:::i;:::-;12060:94;12150:3;12110:38;12142:4;12136:11;12110:38;:::i;:::-;12104:4;12060:94;:::i;:::-;12180:1;12205:2;12200:3;12197:11;12222:1;12217:616;;;;12877:1;12894:3;12891:93;;;-1:-1:-1;12950:19:2;;;12937:33;12891:93;13010:64;13070:3;13063:5;13010:64;:::i;:::-;13004:4;12997:78;;12190:895;;12217:616;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;12253:17:2;;;12354:9;12376:229;12390:7;12387:1;12384:14;12376:229;;;12479:19;;;12466:33;12451:49;;12586:4;12571:20;;;;12539:1;12527:14;;;;12406:12;12376:229;;;12380:3;12633;12624:7;12621:16;12618:159;;;12757:1;12753:6;12747:3;12741;12738:1;12734:11;12730:21;12726:34;12722:39;12709:9;12704:3;12700:19;12687:33;12683:79;12675:6;12668:95;12618:159;;;12820:1;12814:3;12811:1;12807:11;12803:19;12797:4;12790:33;12190:895;;11885:1206;;;:::o;13096:1352::-;13222:3;13216:10;13249:18;13241:6;13238:30;13235:56;;;13271:18;;:::i;:::-;13300:97;13390:6;13350:38;13382:4;13376:11;13350:38;:::i;13300:97::-;13452:4;;13516:2;13505:14;;13533:1;13528:663;;;;14235:1;14252:6;14249:89;;;-1:-1:-1;14304:19:2;;;14298:26;14249:89;14364:67;14424:6;14417:5;14364:67;:::i;:::-;14358:4;14351:81;;13498:944;;13528:663;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;13564:20:2;;;13682:236;13696:7;13693:1;13690:14;13682:236;;;13785:19;;;13779:26;13764:42;;13877:27;;;;13845:1;13833:14;;;;13712:19;;13682:236;;;13686:3;13946:6;13937:7;13934:19;13931:201;;;14007:19;;;14001:26;-1:-1:-1;;14090:1:2;14086:14;;;14102:3;14082:24;14078:37;14074:42;14059:58;14044:74;;13931:201;-1:-1:-1;;;;;14178:1:2;14162:14;;;14158:22;14145:36;;-1:-1:-1;13096:1352:2:o;15218:842::-;15346:3;15375:1;15408:6;15402:13;15438:36;15464:9;15438:36;:::i;:::-;15493:1;15510:18;;;15537:133;;;;15684:1;15679:356;;;;15503:532;;15537:133;-1:-1:-1;;15570:24:2;;15558:37;;15643:14;;15636:22;15624:35;;15615:45;;;-1:-1:-1;15537:133:2;;15679:356;15710:6;15707:1;15700:17;15740:4;15785:2;15782:1;15772:16;15810:1;15824:165;15838:6;15835:1;15832:13;15824:165;;;15916:14;;15903:11;;;15896:35;15959:16;;;;15853:10;;15824:165;;;15828:3;;;16018:6;16013:3;16009:16;16002:23;;15503:532;-1:-1:-1;16051:3:2;;15218:842;-1:-1:-1;;;;;;15218:842:2:o", - "sourcePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol", - "compiler": { - "name": "solc", - "version": "0.8.16+commit.07a7930e" - }, - "ast": { - "absolutePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol", - "exportedSymbols": { - "AssetReference": [ - 210 - ], - "AssetReferenceContract": [ - 621 - ], - "MyOwnable": [ - 198 - ] - }, - "id": 622, - "license": "GPL-3.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 200, - "literals": [ - "solidity", - "^", - "0.8", - ".15" - ], - "nodeType": "PragmaDirective", - "src": "37:24:1" - }, - { - "absolutePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol", - "file": "./MyOwnable.sol", - "id": 201, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 622, - "sourceUnit": 199, - "src": "63:25:1", - "symbolAliases": [], - "unitAlias": "" - }, - { - "canonicalName": "AssetReference", - "id": 210, - "members": [ - { - "constant": false, - "id": 203, - "mutability": "mutable", - "name": "id", - "nameLocation": "125:2:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "118:9:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 202, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "118:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 205, - "mutability": "mutable", - "name": "isLocked", - "nameLocation": "138:8:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "133:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 204, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "133:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 207, - "mutability": "mutable", - "name": "amount", - "nameLocation": "157:6:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "152:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 206, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "152:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 209, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "177:9:1", - "nodeType": "VariableDeclaration", - "scope": 210, - "src": "169:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 208, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "169:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "name": "AssetReference", - "nameLocation": "97:14:1", - "nodeType": "StructDefinition", - "scope": 622, - "src": "90:99:1", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 211, - "name": "MyOwnable", - "nameLocations": [ - "226:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 198, - "src": "226:9:1" - }, - "id": 212, - "nodeType": "InheritanceSpecifier", - "src": "226:9:1" - } - ], - "canonicalName": "AssetReferenceContract", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 621, - "linearizedBaseContracts": [ - 621, - 198 - ], - "name": "AssetReferenceContract", - "nameLocation": "200:22:1", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 214, - "mutability": "mutable", - "name": "cbdc_contract", - "nameLocation": "248:13:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "240:21:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 213, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "240:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 219, - "mutability": "mutable", - "name": "assets", - "nameLocation": "300:6:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "265:41:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string => struct AssetReference)" - }, - "typeName": { - "id": 218, - "keyType": { - "id": 215, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "274:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "265:34:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string => struct AssetReference)" - }, - "valueType": { - "id": 217, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 216, - "name": "AssetReference", - "nameLocations": [ - "284:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "284:14:1" - }, - "referencedDeclaration": 210, - "src": "284:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 223, - "mutability": "mutable", - "name": "assetExists", - "nameLocation": "335:11:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "310:36:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "typeName": { - "id": 222, - "keyType": { - "id": 220, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "319:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "310:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "valueType": { - "id": 221, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "329:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 227, - "mutability": "mutable", - "name": "assetRefsList", - "nameLocation": "580:13:1", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "563:30:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference[]" - }, - "typeName": { - "baseType": { - "id": 225, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 224, - "name": "AssetReference", - "nameLocations": [ - "563:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "563:14:1" - }, - "referencedDeclaration": 210, - "src": "563:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - }, - "id": 226, - "nodeType": "ArrayTypeName", - "src": "563:16:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr", - "typeString": "struct AssetReference[]" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 236, - "nodeType": "Block", - "src": "627:34:1", - "statements": [ - { - "expression": { - "id": 234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 232, - "name": "cbdc_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "633:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 233, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "649:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "633:23:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 235, - "nodeType": "ExpressionStatement", - "src": "633:23:1" - } - ] - }, - "id": 237, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 230, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 229, - "mutability": "mutable", - "name": "account", - "nameLocation": "618:7:1", - "nodeType": "VariableDeclaration", - "scope": 237, - "src": "610:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 228, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "610:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "609:17:1" - }, - "returnParameters": { - "id": 231, - "nodeType": "ParameterList", - "parameters": [], - "src": "627:0:1" - }, - "scope": 621, - "src": "598:63:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 293, - "nodeType": "Block", - "src": "764:294:1", - "statements": [ - { - "expression": { - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 248, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "770:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 250, - "indexExpression": { - "id": 249, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "777:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "770:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 251, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "781:2:1", - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 203, - "src": "770:13:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 252, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "785:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "src": "770:17:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 254, - "nodeType": "ExpressionStatement", - "src": "770:17:1" - }, - { - "expression": { - "id": 260, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 255, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "793:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 257, - "indexExpression": { - "id": 256, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "800:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "793:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 258, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "804:6:1", - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 207, - "src": "793:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 259, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 241, - "src": "813:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "793:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 261, - "nodeType": "ExpressionStatement", - "src": "793:26:1" - }, - { - "expression": { - "id": 267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 262, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "825:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 264, - "indexExpression": { - "id": 263, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "832:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "825:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 265, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "836:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "825:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "847:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "825:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 268, - "nodeType": "ExpressionStatement", - "src": "825:27:1" - }, - { - "expression": { - "id": 274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 269, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "858:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 271, - "indexExpression": { - "id": 270, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "865:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "858:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 272, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "869:9:1", - "memberName": "recipient", - "nodeType": "MemberAccess", - "referencedDeclaration": 209, - "src": "858:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 273, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "881:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "858:32:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 275, - "nodeType": "ExpressionStatement", - "src": "858:32:1" - }, - { - "expression": { - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 276, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "897:11:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 278, - "indexExpression": { - "id": 277, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "909:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "897:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "915:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "897:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 281, - "nodeType": "ExpressionStatement", - "src": "897:22:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 286, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 239, - "src": "1000:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "hexValue": "66616c7365", - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1010:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "id": 288, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 241, - "src": "1023:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 289, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "1037:9:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 285, - "name": "AssetReference", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "978:14:1", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_AssetReference_$210_storage_ptr_$", - "typeString": "type(struct AssetReference storage pointer)" - } - }, - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "978:74:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", - "typeString": "struct AssetReference memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", - "typeString": "struct AssetReference memory" - } - ], - "expression": { - "id": 282, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "959:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "973:4:1", - "memberName": "push", - "nodeType": "MemberAccess", - "src": "959:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$_t_struct$_AssetReference_$210_storage_$returns$__$bound_to$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$", - "typeString": "function (struct AssetReference storage ref[] storage pointer,struct AssetReference storage ref)" - } - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "959:94:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 292, - "nodeType": "ExpressionStatement", - "src": "959:94:1" - } - ] - }, - "functionSelector": "663bcc92", - "id": 294, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 246, - "kind": "modifierInvocation", - "modifierName": { - "id": 245, - "name": "onlyOwner", - "nameLocations": [ - "754:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "754:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "754:9:1" - } - ], - "name": "createAssetReference", - "nameLocation": "674:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 244, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 239, - "mutability": "mutable", - "name": "id", - "nameLocation": "711:2:1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "695:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 238, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "695:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 241, - "mutability": "mutable", - "name": "amount", - "nameLocation": "720:6:1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "715:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 240, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "715:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 243, - "mutability": "mutable", - "name": "recipient", - "nameLocation": "736:9:1", - "nodeType": "VariableDeclaration", - "scope": 294, - "src": "728:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 242, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "728:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "694:52:1" - }, - "returnParameters": { - "id": 247, - "nodeType": "ParameterList", - "parameters": [], - "src": "764:0:1" - }, - "scope": 621, - "src": "665:393:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 323, - "nodeType": "Block", - "src": "1127:178:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 303, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "1151:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 302, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1141:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1141:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1156:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 301, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1133:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1133:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 307, - "nodeType": "ExpressionStatement", - "src": "1133:60:1" - }, - { - "expression": { - "arguments": [ - { - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "1207:18:1", - "subExpression": { - "arguments": [ - { - "id": 310, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "1222:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 309, - "name": "isAssetLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 446, - "src": "1208:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1208:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520697320616c7265616479206c6f636b6564", - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1227:39:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_64521928c09bf02b6b5471b284b9f6dfbc7431afff7624ad621932a3f25b489f", - "typeString": "literal_string \"The asset reference is already locked\"" - }, - "value": "The asset reference is already locked" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_64521928c09bf02b6b5471b284b9f6dfbc7431afff7624ad621932a3f25b489f", - "typeString": "literal_string \"The asset reference is already locked\"" - } - ], - "id": 308, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1199:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 314, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1199:68:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 315, - "nodeType": "ExpressionStatement", - "src": "1199:68:1" - }, - { - "expression": { - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 316, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1274:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 318, - "indexExpression": { - "id": 317, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 296, - "src": "1281:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1274:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "1285:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "1274:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 320, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1296:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1274:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 322, - "nodeType": "ExpressionStatement", - "src": "1274:26:1" - } - ] - }, - "functionSelector": "63773a6c", - "id": 324, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 299, - "kind": "modifierInvocation", - "modifierName": { - "id": 298, - "name": "onlyOwner", - "nameLocations": [ - "1117:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "1117:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "1117:9:1" - } - ], - "name": "lockAssetReference", - "nameLocation": "1071:18:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 297, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 296, - "mutability": "mutable", - "name": "id", - "nameLocation": "1106:2:1", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1090:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 295, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1090:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1089:20:1" - }, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [], - "src": "1127:0:1" - }, - "scope": 621, - "src": "1062:243:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 345, - "nodeType": "Block", - "src": "1376:105:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 333, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "1400:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 332, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1390:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1390:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1405:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 331, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1382:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1382:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 337, - "nodeType": "ExpressionStatement", - "src": "1382:60:1" - }, - { - "expression": { - "id": 343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 338, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1449:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 340, - "indexExpression": { - "id": 339, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 326, - "src": "1456:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1449:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 341, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberLocation": "1460:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "1449:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1471:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1449:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 344, - "nodeType": "ExpressionStatement", - "src": "1449:27:1" - } - ] - }, - "functionSelector": "8ef45293", - "id": 346, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 329, - "kind": "modifierInvocation", - "modifierName": { - "id": 328, - "name": "onlyOwner", - "nameLocations": [ - "1366:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "1366:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "1366:9:1" - } - ], - "name": "unLockAssetReference", - "nameLocation": "1318:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 327, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 326, - "mutability": "mutable", - "name": "id", - "nameLocation": "1355:2:1", - "nodeType": "VariableDeclaration", - "scope": 346, - "src": "1339:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 325, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1339:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1338:20:1" - }, - "returnParameters": { - "id": 330, - "nodeType": "ParameterList", - "parameters": [], - "src": "1376:0:1" - }, - "scope": 621, - "src": "1309:172:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 420, - "nodeType": "Block", - "src": "1552:449:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 355, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1576:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 354, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "1566:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1566:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1581:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 353, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1558:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1558:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 359, - "nodeType": "ExpressionStatement", - "src": "1558:60:1" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 362, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1646:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 361, - "name": "isAssetLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 446, - "src": "1632:13:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1632:17:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e6365206973206c6f636b6564", - "id": 364, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1651:31:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0336abc357798e0ba342f01c1301e0e34f6dedce2787c507141be0c60e4153c9", - "typeString": "literal_string \"The asset reference is locked\"" - }, - "value": "The asset reference is locked" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0336abc357798e0ba342f01c1301e0e34f6dedce2787c507141be0c60e4153c9", - "typeString": "literal_string \"The asset reference is locked\"" - } - ], - "id": 360, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1624:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 365, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1624:59:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 366, - "nodeType": "ExpressionStatement", - "src": "1624:59:1" - }, - { - "expression": { - "arguments": [ - { - "expression": { - "baseExpression": { - "id": 368, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1695:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 370, - "indexExpression": { - "id": 369, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1702:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1695:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 371, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1706:6:1", - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 207, - "src": "1695:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 367, - "name": "burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 510, - "src": "1690:4:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1690:23:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 373, - "nodeType": "ExpressionStatement", - "src": "1690:23:1" - }, - { - "expression": { - "id": 377, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "1720:17:1", - "subExpression": { - "baseExpression": { - "id": 374, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "1727:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 376, - "indexExpression": { - "id": 375, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1734:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1727:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 378, - "nodeType": "ExpressionStatement", - "src": "1720:17:1" - }, - { - "expression": { - "id": 383, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 379, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "1743:11:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 381, - "indexExpression": { - "id": 380, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1755:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1743:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1761:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1743:23:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 384, - "nodeType": "ExpressionStatement", - "src": "1743:23:1" - }, - { - "body": { - "id": 418, - "nodeType": "Block", - "src": "1854:143:1", - "statements": [ - { - "condition": { - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "arguments": [ - { - "arguments": [ - { - "expression": { - "baseExpression": { - "id": 399, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "1893:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 401, - "indexExpression": { - "id": 400, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1907:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1893:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1910:2:1", - "memberName": "id", - "nodeType": "MemberAccess", - "referencedDeclaration": 203, - "src": "1893:19:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - ], - "expression": { - "id": 397, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1876:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 398, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1880:12:1", - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "1876:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 403, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1876:37:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 396, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "1866:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1866:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [ - { - "arguments": [ - { - "id": 408, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "1945:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "expression": { - "id": 406, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1928:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1932:12:1", - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "1928:16:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1928:20:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 405, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967288, - "src": "1918:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 410, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1918:31:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "1866:83:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 417, - "nodeType": "IfStatement", - "src": "1862:129:1", - "trueBody": { - "id": 416, - "nodeType": "Block", - "src": "1951:40:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 413, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1980:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 412, - "name": "removeItemFromList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "1961:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1961:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 415, - "nodeType": "ExpressionStatement", - "src": "1961:21:1" - } - ] - } - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 389, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1823:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 390, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "1827:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1841:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1827:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1823:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 419, - "initializationExpression": { - "assignments": [ - 386 - ], - "declarations": [ - { - "constant": false, - "id": 386, - "mutability": "mutable", - "name": "i", - "nameLocation": "1816:1:1", - "nodeType": "VariableDeclaration", - "scope": 419, - "src": "1811:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 385, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1811:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 388, - "initialValue": { - "hexValue": "30", - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1820:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "1811:10:1" - }, - "loopExpression": { - "expression": { - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "1849:3:1", - "subExpression": { - "id": 393, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "1849:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 395, - "nodeType": "ExpressionStatement", - "src": "1849:3:1" - }, - "nodeType": "ForStatement", - "src": "1806:191:1" - } - ] - }, - "functionSelector": "ade3222b", - "id": 421, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 351, - "kind": "modifierInvocation", - "modifierName": { - "id": 350, - "name": "onlyOwner", - "nameLocations": [ - "1542:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "1542:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "1542:9:1" - } - ], - "name": "deleteAssetReference", - "nameLocation": "1494:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 348, - "mutability": "mutable", - "name": "id", - "nameLocation": "1531:2:1", - "nodeType": "VariableDeclaration", - "scope": 421, - "src": "1515:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 347, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1515:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1514:20:1" - }, - "returnParameters": { - "id": 352, - "nodeType": "ParameterList", - "parameters": [], - "src": "1552:0:1" - }, - "scope": 621, - "src": "1485:516:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 432, - "nodeType": "Block", - "src": "2071:33:1", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 428, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 223, - "src": "2084:11:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 430, - "indexExpression": { - "id": 429, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 423, - "src": "2096:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2084:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 427, - "id": 431, - "nodeType": "Return", - "src": "2077:22:1" - } - ] - }, - "functionSelector": "bc548275", - "id": 433, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isPresent", - "nameLocation": "2014:9:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 424, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 423, - "mutability": "mutable", - "name": "id", - "nameLocation": "2040:2:1", - "nodeType": "VariableDeclaration", - "scope": 433, - "src": "2024:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 422, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2024:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2023:20:1" - }, - "returnParameters": { - "id": 427, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 426, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 433, - "src": "2065:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 425, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2065:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2064:6:1" - }, - "scope": 621, - "src": "2005:99:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 445, - "nodeType": "Block", - "src": "2178:37:1", - "statements": [ - { - "expression": { - "expression": { - "baseExpression": { - "id": 440, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "2191:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 442, - "indexExpression": { - "id": 441, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 435, - "src": "2198:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2191:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 443, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2202:8:1", - "memberName": "isLocked", - "nodeType": "MemberAccess", - "referencedDeclaration": 205, - "src": "2191:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 439, - "id": 444, - "nodeType": "Return", - "src": "2184:26:1" - } - ] - }, - "functionSelector": "1ae4eb68", - "id": 446, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isAssetLocked", - "nameLocation": "2117:13:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 436, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 435, - "mutability": "mutable", - "name": "id", - "nameLocation": "2147:2:1", - "nodeType": "VariableDeclaration", - "scope": 446, - "src": "2131:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 434, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2131:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2130:20:1" - }, - "returnParameters": { - "id": 439, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 438, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 446, - "src": "2172:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 437, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2172:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2171:6:1" - }, - "scope": 621, - "src": "2108:107:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 458, - "nodeType": "Block", - "src": "2310:28:1", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 454, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "2323:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 456, - "indexExpression": { - "id": 455, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 448, - "src": "2330:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2323:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "functionReturnParameters": 453, - "id": 457, - "nodeType": "Return", - "src": "2316:17:1" - } - ] - }, - "functionSelector": "b1fa2580", - "id": 459, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAssetReference", - "nameLocation": "2228:17:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 448, - "mutability": "mutable", - "name": "id", - "nameLocation": "2262:2:1", - "nodeType": "VariableDeclaration", - "scope": 459, - "src": "2246:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 447, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2246:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "2245:20:1" - }, - "returnParameters": { - "id": 453, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 452, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 459, - "src": "2287:21:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", - "typeString": "struct AssetReference" - }, - "typeName": { - "id": 451, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 450, - "name": "AssetReference", - "nameLocations": [ - "2287:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "2287:14:1" - }, - "referencedDeclaration": 210, - "src": "2287:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - }, - "visibility": "internal" - } - ], - "src": "2286:23:1" - }, - "scope": 621, - "src": "2219:119:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 485, - "nodeType": "Block", - "src": "2406:170:1", - "statements": [ - { - "assignments": [ - 469, - null - ], - "declarations": [ - { - "constant": false, - "id": 469, - "mutability": "mutable", - "name": "success", - "nameLocation": "2418:7:1", - "nodeType": "VariableDeclaration", - "scope": 485, - "src": "2413:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 468, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2413:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 479, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "hexValue": "6d696e7428616464726573732c75696e7432353629", - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2481:23:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_40c10f19c047ae7dfa66d6312b683d2ea3dfbcb4159e96b967c5f4b0a86f2842", - "typeString": "literal_string \"mint(address,uint256)\"" - }, - "value": "mint(address,uint256)" - }, - { - "id": 475, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 461, - "src": "2506:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 476, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 463, - "src": "2515:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_40c10f19c047ae7dfa66d6312b683d2ea3dfbcb4159e96b967c5f4b0a86f2842", - "typeString": "literal_string \"mint(address,uint256)\"" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 472, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "2457:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2461:19:1", - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "2457:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2457:65:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 470, - "name": "cbdc_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2431:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2445:4:1", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2431:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2431:97:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2412:116:1" - }, - { - "expression": { - "arguments": [ - { - "id": 481, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "2543:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "6d696e742063616c6c206661696c6564", - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2552:18:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bf9c519459adea86d8a83bfe255ca2736ba7c8625940375bb2fc6e318ee9051b", - "typeString": "literal_string \"mint call failed\"" - }, - "value": "mint call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bf9c519459adea86d8a83bfe255ca2736ba7c8625940375bb2fc6e318ee9051b", - "typeString": "literal_string \"mint call failed\"" - } - ], - "id": 480, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2535:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2535:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 484, - "nodeType": "ExpressionStatement", - "src": "2535:36:1" - } - ] - }, - "functionSelector": "40c10f19", - "id": 486, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 466, - "kind": "modifierInvocation", - "modifierName": { - "id": 465, - "name": "onlyOwner", - "nameLocations": [ - "2396:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "2396:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "2396:9:1" - } - ], - "name": "mint", - "nameLocation": "2351:4:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 464, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 461, - "mutability": "mutable", - "name": "account", - "nameLocation": "2364:7:1", - "nodeType": "VariableDeclaration", - "scope": 486, - "src": "2356:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 460, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2356:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 463, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2381:6:1", - "nodeType": "VariableDeclaration", - "scope": 486, - "src": "2373:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 462, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2373:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2355:33:1" - }, - "returnParameters": { - "id": 467, - "nodeType": "ParameterList", - "parameters": [], - "src": "2406:0:1" - }, - "scope": 621, - "src": "2342:234:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 509, - "nodeType": "Block", - "src": "2627:153:1", - "statements": [ - { - "assignments": [ - 494, - null - ], - "declarations": [ - { - "constant": false, - "id": 494, - "mutability": "mutable", - "name": "success", - "nameLocation": "2639:7:1", - "nodeType": "VariableDeclaration", - "scope": 509, - "src": "2634:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 493, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2634:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 503, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "hexValue": "6275726e2875696e7432353629", - "id": 499, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2702:15:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_42966c689b5afe9b9b3f8a7103b2a19980d59629bfd6a20a60972312ed41d836", - "typeString": "literal_string \"burn(uint256)\"" - }, - "value": "burn(uint256)" - }, - { - "id": 500, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 488, - "src": "2719:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_42966c689b5afe9b9b3f8a7103b2a19980d59629bfd6a20a60972312ed41d836", - "typeString": "literal_string \"burn(uint256)\"" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 497, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "2678:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 498, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2682:19:1", - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "2678:23:1", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2678:48:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 495, - "name": "cbdc_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 214, - "src": "2652:13:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2666:4:1", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2652:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2652:80:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2633:99:1" - }, - { - "expression": { - "arguments": [ - { - "id": 505, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 494, - "src": "2747:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "6275726e2063616c6c206661696c6564", - "id": 506, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2756:18:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_bd2737dababb3f3aa60c0b3e63ed3f2a6dbe45608e370c8c6df354f1d0f7216c", - "typeString": "literal_string \"burn call failed\"" - }, - "value": "burn call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_bd2737dababb3f3aa60c0b3e63ed3f2a6dbe45608e370c8c6df354f1d0f7216c", - "typeString": "literal_string \"burn call failed\"" - } - ], - "id": 504, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2739:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2739:36:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "2739:36:1" - } - ] - }, - "functionSelector": "42966c68", - "id": 510, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 491, - "kind": "modifierInvocation", - "modifierName": { - "id": 490, - "name": "onlyOwner", - "nameLocations": [ - "2617:9:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 30, - "src": "2617:9:1" - }, - "nodeType": "ModifierInvocation", - "src": "2617:9:1" - } - ], - "name": "burn", - "nameLocation": "2589:4:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 489, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 488, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2602:6:1", - "nodeType": "VariableDeclaration", - "scope": 510, - "src": "2594:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 487, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2594:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2593:16:1" - }, - "returnParameters": { - "id": 492, - "nodeType": "ParameterList", - "parameters": [], - "src": "2627:0:1" - }, - "scope": 621, - "src": "2580:200:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 544, - "nodeType": "Block", - "src": "2891:152:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "id": 523, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "2915:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - ], - "id": 522, - "name": "isPresent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 433, - "src": "2905:9:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", - "typeString": "function (string calldata) view returns (bool)" - } - }, - "id": 524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2905:13:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2920:36:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - }, - "value": "The asset reference does not exist" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", - "typeString": "literal_string \"The asset reference does not exist\"" - } - ], - "id": 521, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "2897:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 526, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2897:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 527, - "nodeType": "ExpressionStatement", - "src": "2897:60:1" - }, - { - "expression": { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 528, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "2976:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 530, - "indexExpression": { - "id": 529, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "2983:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2976:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 531, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2987:6:1", - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 207, - "src": "2976:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "id": 532, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 514, - "src": "2997:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2976:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 534, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2975:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "components": [ - { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 540, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 535, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 219, - "src": "3009:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", - "typeString": "mapping(string memory => struct AssetReference storage ref)" - } - }, - "id": 537, - "indexExpression": { - "id": 536, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 512, - "src": "3016:2:1", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3009:10:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 538, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3020:9:1", - "memberName": "recipient", - "nodeType": "MemberAccess", - "referencedDeclaration": 209, - "src": "3009:20:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 539, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 516, - "src": "3033:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3009:28:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 541, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "3008:30:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2975:63:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 520, - "id": 543, - "nodeType": "Return", - "src": "2968:70:1" - } - ] - }, - "functionSelector": "9ca27299", - "id": 545, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "checkValidBridgeBack", - "nameLocation": "2793:20:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 517, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 512, - "mutability": "mutable", - "name": "id", - "nameLocation": "2830:2:1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2814:18:1", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 511, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2814:6:1", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 514, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2842:6:1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2834:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 513, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2834:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 516, - "mutability": "mutable", - "name": "user", - "nameLocation": "2858:4:1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2850:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 515, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2850:7:1", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "2813:50:1" - }, - "returnParameters": { - "id": 520, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 519, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 545, - "src": "2885:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 518, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2885:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "2884:6:1" - }, - "scope": 621, - "src": "2784:259:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 588, - "nodeType": "Block", - "src": "3126:213:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 554, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 551, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 547, - "src": "3140:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 552, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3149:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 553, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3163:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3149:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3140:29:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "696e646578206f7574206f6620626f756e64", - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3171:20:1", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9bd393a5b80babd34996e9cb4b5d65af0ee420fc5edf77dbd7c6d563caa3bff2", - "typeString": "literal_string \"index out of bound\"" - }, - "value": "index out of bound" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9bd393a5b80babd34996e9cb4b5d65af0ee420fc5edf77dbd7c6d563caa3bff2", - "typeString": "literal_string \"index out of bound\"" - } - ], - "id": 550, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "3132:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 556, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3132:60:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 557, - "nodeType": "ExpressionStatement", - "src": "3132:60:1" - }, - { - "body": { - "id": 581, - "nodeType": "Block", - "src": "3254:56:1", - "statements": [ - { - "expression": { - "id": 579, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 571, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3264:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 573, - "indexExpression": { - "id": 572, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3278:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3264:16:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "baseExpression": { - "id": 574, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3283:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 578, - "indexExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 575, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3297:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "hexValue": "31", - "id": 576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3301:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3297:5:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3283:20:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "src": "3264:39:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage", - "typeString": "struct AssetReference storage ref" - } - }, - "id": 580, - "nodeType": "ExpressionStatement", - "src": "3264:39:1" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 562, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3221:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 563, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3225:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3239:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3225:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "hexValue": "31", - "id": 565, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3246:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3225:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3221:26:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 582, - "initializationExpression": { - "assignments": [ - 559 - ], - "declarations": [ - { - "constant": false, - "id": 559, - "mutability": "mutable", - "name": "i", - "nameLocation": "3209:1:1", - "nodeType": "VariableDeclaration", - "scope": 582, - "src": "3204:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 558, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3204:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 561, - "initialValue": { - "id": 560, - "name": "_index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 547, - "src": "3213:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3204:15:1" - }, - "loopExpression": { - "expression": { - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3249:3:1", - "subExpression": { - "id": 568, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 559, - "src": "3249:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 570, - "nodeType": "ExpressionStatement", - "src": "3249:3:1" - }, - "nodeType": "ForStatement", - "src": "3199:111:1" - }, - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "id": 583, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3315:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 585, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3329:3:1", - "memberName": "pop", - "nodeType": "MemberAccess", - "src": "3315:17:1", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$", - "typeString": "function (struct AssetReference storage ref[] storage pointer)" - } - }, - "id": 586, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3315:19:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 587, - "nodeType": "ExpressionStatement", - "src": "3315:19:1" - } - ] - }, - "functionSelector": "21db00b3", - "id": 589, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "removeItemFromList", - "nameLocation": "3087:18:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 548, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 547, - "mutability": "mutable", - "name": "_index", - "nameLocation": "3111:6:1", - "nodeType": "VariableDeclaration", - "scope": 589, - "src": "3106:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 546, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3106:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3105:13:1" - }, - "returnParameters": { - "id": 549, - "nodeType": "ParameterList", - "parameters": [], - "src": "3126:0:1" - }, - "scope": 621, - "src": "3078:261:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 598, - "nodeType": "Block", - "src": "3453:31:1", - "statements": [ - { - "expression": { - "id": 596, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3466:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "functionReturnParameters": 595, - "id": 597, - "nodeType": "Return", - "src": "3459:20:1" - } - ] - }, - "functionSelector": "c8da01af", - "id": 599, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAllAssetReferences", - "nameLocation": "3383:21:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 590, - "nodeType": "ParameterList", - "parameters": [], - "src": "3404:2:1" - }, - "returnParameters": { - "id": 595, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 594, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 599, - "src": "3428:23:1", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_memory_ptr_$dyn_memory_ptr", - "typeString": "struct AssetReference[]" - }, - "typeName": { - "baseType": { - "id": 592, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 591, - "name": "AssetReference", - "nameLocations": [ - "3428:14:1" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 210, - "src": "3428:14:1" - }, - "referencedDeclaration": 210, - "src": "3428:14:1", - "typeDescriptions": { - "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", - "typeString": "struct AssetReference" - } - }, - "id": 593, - "nodeType": "ArrayTypeName", - "src": "3428:16:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr", - "typeString": "struct AssetReference[]" - } - }, - "visibility": "internal" - } - ], - "src": "3427:25:1" - }, - "scope": 621, - "src": "3374:110:1", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 619, - "nodeType": "Block", - "src": "3561:94:1", - "statements": [ - { - "body": { - "id": 617, - "nodeType": "Block", - "src": "3615:36:1", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 614, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3642:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 613, - "name": "removeItemFromList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "3623:18:1", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 615, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3623:21:1", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 616, - "nodeType": "ExpressionStatement", - "src": "3623:21:1" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 609, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 606, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3584:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 607, - "name": "assetRefsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "3588:13:1", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", - "typeString": "struct AssetReference storage ref[] storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3602:6:1", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "3588:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3584:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 618, - "initializationExpression": { - "assignments": [ - 603 - ], - "declarations": [ - { - "constant": false, - "id": 603, - "mutability": "mutable", - "name": "i", - "nameLocation": "3577:1:1", - "nodeType": "VariableDeclaration", - "scope": 618, - "src": "3572:6:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3572:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 605, - "initialValue": { - "hexValue": "30", - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3581:1:1", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "3572:10:1" - }, - "loopExpression": { - "expression": { - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3610:3:1", - "subExpression": { - "id": 610, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 603, - "src": "3610:1:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 612, - "nodeType": "ExpressionStatement", - "src": "3610:3:1" - }, - "nodeType": "ForStatement", - "src": "3567:84:1" - } - ] - }, - "functionSelector": "6b4bd58c", - "id": 620, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "resetAssetRefsList", - "nameLocation": "3533:18:1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 600, - "nodeType": "ParameterList", - "parameters": [], - "src": "3551:2:1" - }, - "returnParameters": { - "id": 601, - "nodeType": "ParameterList", - "parameters": [], - "src": "3561:0:1" - }, - "scope": 621, - "src": "3524:131:1", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 622, - "src": "191:3466:1", - "usedErrors": [] - } - ], - "src": "37:3621:1" - }, - "functionHashes": { - "addOwner(address)": "7065cb48", - "burn(uint256)": "42966c68", - "checkValidBridgeBack(string,uint256,address)": "9ca27299", - "createAssetReference(string,uint256,address)": "663bcc92", - "deleteAssetReference(string)": "ade3222b", - "getAllAssetReferences()": "c8da01af", - "getAssetReference(string)": "b1fa2580", - "isAssetLocked(string)": "1ae4eb68", - "isPresent(string)": "bc548275", - "lockAssetReference(string)": "63773a6c", - "mint(address,uint256)": "40c10f19", - "owners()": "affe39c1", - "removeItemFromList(uint256)": "21db00b3", - "removeOwner(address)": "173825d9", - "resetAssetRefsList()": "6b4bd58c", - "unLockAssetReference(string)": "8ef45293" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "1279400", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "addOwner(address)": "infinite", - "burn(uint256)": "infinite", - "checkValidBridgeBack(string,uint256,address)": "infinite", - "createAssetReference(string,uint256,address)": "infinite", - "deleteAssetReference(string)": "infinite", - "getAllAssetReferences()": "infinite", - "getAssetReference(string)": "infinite", - "isAssetLocked(string)": "infinite", - "isPresent(string)": "infinite", - "lockAssetReference(string)": "infinite", - "mint(address,uint256)": "infinite", - "owners()": "infinite", - "removeItemFromList(uint256)": "infinite", - "removeOwner(address)": "infinite", - "resetAssetRefsList()": "infinite", - "unLockAssetReference(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol deleted file mode 100644 index 1ee2f8e52d..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.15; - -contract MyOwnable { - address[] private _owners; - - event OwnershipRemoved(address indexed previousOwner); - event OwnershipAdded(address indexed newOwner); - - /** - * @dev Initializes the contract setting the deployer as the initial owner. - */ - constructor() { - _addNewOwner(_msgSender()); - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - _checkOwner(); - _; - } - - /** - * @dev Returns the address of the current owners. - */ - function owners() public view virtual returns (address[] memory) { - return _owners; - } - - /** - * @dev Throws if the sender is not the owner. - */ - function _checkOwner() internal view virtual { - bool flag = false; - for (uint i = 0; i < _owners.length; i++) { - if (_owners[i] == _msgSender()) { - flag = true; - } - } - require(flag == true, "Ownable: caller is not an owner"); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Can only be called by the current owner. - */ - function addOwner(address newOwner) public virtual onlyOwner { - require(newOwner != address(0), "Ownable: new owner is the zero address"); - _addNewOwner(newOwner); - } - - function removeOwner(address oldOwner) public virtual onlyOwner { - require(oldOwner != address(0), "Ownable: old owner is the zero address"); - _removeOwner(oldOwner); - } - - function _addNewOwner(address newOwner) internal virtual { - _owners.push(newOwner); - emit OwnershipAdded(newOwner); - } - - function _removeOwner(address owner) internal virtual { - for (uint i = 0; i < _owners.length; i++) { - if (_owners[i] == owner) { - _owners[i] = _owners[_owners.length - 1]; - _owners.pop(); - } - } - emit OwnershipRemoved(owner); - } - - function _msgSender() internal view virtual returns (address) { - return msg.sender; - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol deleted file mode 100644 index ad03bbac0d..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract-test.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; -import "remix_testassetRefContract.sol"; -import "../contracts/CBDCcontract.sol"; -import "../contracts/AssetReferenceContract.sol"; - -contract AssetReferenceContractTest { - - AssetReferenceContract assetRefContract; - CBDCcontract cbdc_contract; - - function beforeEach () public { - cbdc_contract = new CBDCcontract(); - assetRefContract = new AssetReferenceContract(address(cbdc_contract)); - - cbdc_contract.setAssetReferenceContract(address(assetRefContract)); - cbdc_contract.transferOwnership(address(assetRefContract)); - } - - function createAssetReferenceSuccessfully () public { - assetRefContract.createAssetReference("id1", 123, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - - AssetReference memory asset = assetRefContract.getAssetReference("id1"); - Assert.equal(asset.id, "id1", "asset reference id did not match"); - Assert.equal(asset.isLocked, false, "asset reference lock state did not match"); - Assert.equal(asset.amount, 123, "asset reference amount did not match"); - Assert.equal(asset.recipient, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2), "asset reference recipient did not match"); - } - - function lockAndUnlockAssetReferenceSuccessfully () public { - assetRefContract.createAssetReference("id1", 123, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - - assetRefContract.lockAssetReference("id1"); - AssetReference memory asset1 = assetRefContract.getAssetReference("id1"); - Assert.equal(asset1.id, "id1", "asset reference id did not match"); - Assert.equal(asset1.isLocked, true, "asset reference lock state did not match"); - - assetRefContract.unLockAssetReference("id1"); - asset1 = assetRefContract.getAssetReference("id1"); - Assert.equal(asset1.id, "id1", "asset reference id did not match"); - Assert.equal(asset1.isLocked, false, "asset reference lock state did not match"); - } - - function deleteAssetReferenceSuccessfully () public { - assetRefContract.createAssetReference("id1", 123, address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - assetRefContract.deleteAssetReference("id1"); - - bool exists = assetRefContract.isPresent("id1"); - Assert.equal(exists, false, "asset reference did not match"); - } - - function mintTokens () public { - assetRefContract.mint(address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2), 123); - - uint256 balance = cbdc_contract.balanceOf(address(0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2)); - Assert.equal(balance, 123, "tokens minted did not match"); - } - -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol deleted file mode 100644 index cb041b11cb..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol +++ /dev/null @@ -1,130 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity ^0.8.15; - -import "./MyOwnable.sol"; - -struct AssetReference { - string id; - bool isLocked; - uint amount; - address recipient; -} - -contract AssetReferenceContract is MyOwnable { - address cbdc_contract; - mapping (string => AssetReference) assets; - mapping (string => bool) assetExists; - - // only used for UI purposes. The list is not updated in each operation - // so it should not be used for other ends than this - // The main use for this is to demonstrate in the UI the asset references list - AssetReference[] assetRefsList; - - constructor(address account) { - cbdc_contract = account; - } - - function createAssetReference(string calldata id, uint amount, address recipient) public onlyOwner { - assets[id].id= id; - assets[id].amount = amount; - assets[id].isLocked = false; - assets[id].recipient = recipient; - - assetExists[id] = true; - - // used for UI purposes only - assetRefsList.push(AssetReference( - id, - false, - amount, - recipient - )); - } - - function lockAssetReference(string calldata id) public onlyOwner { - require(isPresent(id), "The asset reference does not exist"); - require(!isAssetLocked(id), "The asset reference is already locked"); - - assets[id].isLocked = true; - } - - function unLockAssetReference(string calldata id) public onlyOwner { - require(isPresent(id), "The asset reference does not exist"); - - assets[id].isLocked = false; - } - - function deleteAssetReference(string calldata id) public onlyOwner { - require(isPresent(id), "The asset reference does not exist"); - require(isAssetLocked(id), "The asset reference is locked"); - - burn(assets[id].amount); - - delete assets[id]; - assetExists[id] = false; - - // used for UI purposes only - for (uint i = 0; i < assetRefsList.length; i++) { - if (keccak256(abi.encodePacked(assetRefsList[i].id)) == keccak256(abi.encodePacked(id))) { - removeItemFromList(i); - } - } - } - - function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; - } - - function isAssetLocked(string calldata id) public view returns (bool) { - return assets[id].isLocked; - } - - function getAssetReference(string calldata id) public view returns (AssetReference memory) { - return assets[id]; - } - - function mint(address account, uint256 amount) public onlyOwner { - (bool success, ) = cbdc_contract.call( - abi.encodeWithSignature("mint(address,uint256)", account, amount) - ); - - require(success, "mint call failed"); - } - - function burn(uint256 amount) public onlyOwner { - (bool success, ) = cbdc_contract.call( - abi.encodeWithSignature("burn(uint256)", amount) - ); - - require(success, "burn call failed"); - } - - function checkValidBridgeBack(string calldata id, uint256 amount, address user) public view returns (bool) { - require(isPresent(id), "The asset reference does not exist"); - - return (assets[id].amount >= amount) && (assets[id].recipient == user); - } - - // used for UI purposes only - function removeItemFromList(uint _index) public { - require(_index < assetRefsList.length, "index out of bound"); - - for (uint i = _index; i < assetRefsList.length-1; i++) { - assetRefsList[i] = assetRefsList[i + 1]; - } - assetRefsList.pop(); - } - - // used for UI purposes only - function getAllAssetReferences() public view returns (AssetReference[] memory) { - return assetRefsList; - } - - // used for testing purposes only - function resetAssetRefsList() public { - for (uint i = 0; i < assetRefsList.length; i++) { - removeItemFromList(i); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json deleted file mode 100644 index 506ad749f3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json +++ /dev/null @@ -1,2495 +0,0 @@ -{ - "contractName": "CBDCcontract", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "asset_ref_id", - "type": "string" - } - ], - "name": "escrow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "resetBalanceOf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contract_address", - "type": "address" - } - ], - "name": "setAssetReferenceContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"asset_ref_id\",\"type\":\"string\"}],\"name\":\"escrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"resetBalanceOf\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"setAssetReferenceContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Create a sample ERC20 standard token\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"SampleERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol\":\"CBDCcontract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol\":{\"keccak256\":\"0x0b74316abddd0f7e38c33034c987eb21560c8ef86d7b03c194a1050c09fee74e\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b0a6ec93f638b1304b1e2ff5fc3dbaa0f5c98ee988c7d8e0a8d4c4eba35cb223\",\"dweb:/ipfs/QmQwRUJN7XPMpTod9SPiNyC6nmKiCHS7pgmmQjAsjYTLVo\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e12cbaa7378fd9b62280e4e1d164bedcb4399ce238f5f98fc0eefb7e50577981\",\"dweb:/ipfs/QmXRoFGUgfsaRkoPT5bxNMtSayKTQ8GZATLPXf69HcRA51\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xd1d8caaeb45f78e0b0715664d56c220c283c89bf8b8c02954af86404d6b367f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://300a0cc7be3b26c96c22a47ffa9530a585e1c4f2dba3021d9bf309dc63007487\",\"dweb:/ipfs/QmQmxsvxK6CaJmQ4D8vDCYPLHMqcMmZLcBqedG4GFAbzu9\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2c3d0973630ed74f2b5ce3944677a885dc70ec32fc83b35f55045a10224da32b\",\"dweb:/ipfs/QmbefZ5RoEZKNHXCALfh683PnaNYzKPcKMFjyY1DVAgq8A\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}", - "bytecode": "6080604052600680546001600160a01b031990811673f28d5769171bfbd2b3628d722e58129a6ae15022179091556007805490911690553480156200004357600080fd5b506040518060400160405280601a81526020017f43656e7472616c42616e6b4469676974616c43757272656e6379000000000000815250604051806040016040528060048152602001634342444360e01b815250620000b1620000ab620000d760201b60201c565b620000db565b6004620000bf8382620001d0565b506005620000ce8282620001d0565b5050506200029c565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200015657607f821691505b6020821081036200017757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001cb57600081815260208120601f850160051c81016020861015620001a65750805b601f850160051c820191505b81811015620001c757828155600101620001b2565b5050505b505050565b81516001600160401b03811115620001ec57620001ec6200012b565b6200020481620001fd845462000141565b846200017d565b602080601f8311600181146200023c5760008415620002235750858301515b600019600386901b1c1916600185901b178555620001c7565b600085815260208120601f198616915b828110156200026d578886015182559484019460019091019084016200024c565b50858210156200028c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6111c980620002ac6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b411461025b578063a457c2d714610263578063a9059cbb14610276578063dd62ed3e14610289578063f2fde38b146102c257600080fd5b806342966c68146101e957806370a08231146101fc578063715018a6146102255780638d1a450d1461022d5780638da5cb5b1461024057600080fd5b8063313ce567116100f4578063313ce5671461018c5780633459feb21461019b57806339509351146101b057806340c10f19146101c3578063417d11af146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102d5565b60405161013b9190610e40565b60405180910390f35b610157610152366004610e8f565b610367565b604051901515815260200161013b565b6003545b60405190815260200161013b565b610157610187366004610eb9565b61037e565b6040516012815260200161013b565b6101ae6101a9366004610ef5565b61042d565b005b6101576101be366004610e8f565b6104ad565b6101ae6101d1366004610e8f565b6104e9565b6101ae6101e4366004610f6a565b610521565b6101ae6101f7366004610fe6565b61062f565b61016b61020a366004610fff565b6001600160a01b031660009081526001602052604090205490565b6101ae610672565b6101ae61023b366004610fff565b6106a8565b6000546040516001600160a01b03909116815260200161013b565b61012e6106f4565b610157610271366004610e8f565b610703565b610157610284366004610e8f565b61079c565b61016b610297366004611021565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101ae6102d0366004610fff565b6107a9565b6060600480546102e490611054565b80601f016020809104026020016040519081016040528092919081815260200182805461031090611054565b801561035d5780601f106103325761010080835404028352916020019161035d565b820191906000526020600020905b81548152906001019060200180831161034057829003601f168201915b5050505050905090565b6000610374338484610841565b5060015b92915050565b600061038b848484610966565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104155760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104228533858403610841565b506001949350505050565b6000805b828110156104a75761046384848381811061044e5761044e61108e565b905060200201602081019061020a9190610fff565b915061049584848381811061047a5761047a61108e565b905060200201602081019061048f9190610fff565b83610b34565b8061049f816110ba565b915050610431565b50505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103749185906104e49086906110d3565b610841565b6000546001600160a01b031633146105135760405162461bcd60e51b815260040161040c906110e6565b61051d8282610c7a565b5050565b610529610d59565b60065461053f906001600160a01b03168461079c565b506007546040516000916001600160a01b03169061056790859085908890339060240161111b565b60408051601f198184030181529181526020820180516001600160e01b031663331de64960e11b1790525161059c9190611164565b6000604051808303816000865af19150503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50509050806104a75760405162461bcd60e51b815260206004820181905260248201527f63726561746541737365745265666572656e63652063616c6c206661696c6564604482015260640161040c565b6000546001600160a01b031633146106595760405162461bcd60e51b815260040161040c906110e6565b60065461066f906001600160a01b031682610b34565b50565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161040c906110e6565b6106a66000610dcc565b565b6000546001600160a01b031633146106d25760405162461bcd60e51b815260040161040c906110e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060600580546102e490611054565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156107855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161040c565b6107923385858403610841565b5060019392505050565b6000610374338484610966565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161040c906110e6565b6001600160a01b0381166108385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040c565b61066f81610dcc565b6001600160a01b0383166108a35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b0382166109045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109ca5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610a2c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b6001600160a01b03831660009081526001602052604090205481811015610aa45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161040c565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610adb9084906110d3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b2791815260200190565b60405180910390a36104a7565b6001600160a01b038216610b945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161040c565b6001600160a01b03821660009081526001602052604090205481811015610c085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161040c565b6001600160a01b0383166000908152600160205260408120838303905560038054849290610c37908490611180565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610959565b6001600160a01b038216610cd05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040c565b8060036000828254610ce291906110d3565b90915550506001600160a01b03821660009081526001602052604081208054839290610d0f9084906110d3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6007546001600160a01b03166106a65760405162461bcd60e51b815260206004820152603260248201527f43424443636f6e74726163743a206173736574207265666572656e636520636f6044820152711b9d1c9858dd081b9bdd081919599a5b995960721b606482015260840161040c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b6020815260008251806020840152610e5f816040850160208701610e1c565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610e8a57600080fd5b919050565b60008060408385031215610ea257600080fd5b610eab83610e73565b946020939093013593505050565b600080600060608486031215610ece57600080fd5b610ed784610e73565b9250610ee560208501610e73565b9150604084013590509250925092565b60008060208385031215610f0857600080fd5b823567ffffffffffffffff80821115610f2057600080fd5b818501915085601f830112610f3457600080fd5b813581811115610f4357600080fd5b8660208260051b8501011115610f5857600080fd5b60209290920196919550909350505050565b600080600060408486031215610f7f57600080fd5b83359250602084013567ffffffffffffffff80821115610f9e57600080fd5b818601915086601f830112610fb257600080fd5b813581811115610fc157600080fd5b876020828501011115610fd357600080fd5b6020830194508093505050509250925092565b600060208284031215610ff857600080fd5b5035919050565b60006020828403121561101157600080fd5b61101a82610e73565b9392505050565b6000806040838503121561103457600080fd5b61103d83610e73565b915061104b60208401610e73565b90509250929050565b600181811c9082168061106857607f821691505b60208210810361108857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110cc576110cc6110a4565b5060010190565b80820180821115610378576103786110a4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60608152836060820152838560808301376000608085830181019190915260208201939093526001600160a01b03919091166040820152601f909201601f191690910101919050565b60008251611176818460208701610e1c565b9190910192915050565b81810381811115610378576103786110a456fea26469706673582212208e0d27b796e78bc197361bd99b802d95e06f14b4ad47842414086729e5f6ad7c64736f6c63430008100033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b411461025b578063a457c2d714610263578063a9059cbb14610276578063dd62ed3e14610289578063f2fde38b146102c257600080fd5b806342966c68146101e957806370a08231146101fc578063715018a6146102255780638d1a450d1461022d5780638da5cb5b1461024057600080fd5b8063313ce567116100f4578063313ce5671461018c5780633459feb21461019b57806339509351146101b057806340c10f19146101c3578063417d11af146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102d5565b60405161013b9190610e40565b60405180910390f35b610157610152366004610e8f565b610367565b604051901515815260200161013b565b6003545b60405190815260200161013b565b610157610187366004610eb9565b61037e565b6040516012815260200161013b565b6101ae6101a9366004610ef5565b61042d565b005b6101576101be366004610e8f565b6104ad565b6101ae6101d1366004610e8f565b6104e9565b6101ae6101e4366004610f6a565b610521565b6101ae6101f7366004610fe6565b61062f565b61016b61020a366004610fff565b6001600160a01b031660009081526001602052604090205490565b6101ae610672565b6101ae61023b366004610fff565b6106a8565b6000546040516001600160a01b03909116815260200161013b565b61012e6106f4565b610157610271366004610e8f565b610703565b610157610284366004610e8f565b61079c565b61016b610297366004611021565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101ae6102d0366004610fff565b6107a9565b6060600480546102e490611054565b80601f016020809104026020016040519081016040528092919081815260200182805461031090611054565b801561035d5780601f106103325761010080835404028352916020019161035d565b820191906000526020600020905b81548152906001019060200180831161034057829003601f168201915b5050505050905090565b6000610374338484610841565b5060015b92915050565b600061038b848484610966565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104155760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104228533858403610841565b506001949350505050565b6000805b828110156104a75761046384848381811061044e5761044e61108e565b905060200201602081019061020a9190610fff565b915061049584848381811061047a5761047a61108e565b905060200201602081019061048f9190610fff565b83610b34565b8061049f816110ba565b915050610431565b50505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103749185906104e49086906110d3565b610841565b6000546001600160a01b031633146105135760405162461bcd60e51b815260040161040c906110e6565b61051d8282610c7a565b5050565b610529610d59565b60065461053f906001600160a01b03168461079c565b506007546040516000916001600160a01b03169061056790859085908890339060240161111b565b60408051601f198184030181529181526020820180516001600160e01b031663331de64960e11b1790525161059c9190611164565b6000604051808303816000865af19150503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50509050806104a75760405162461bcd60e51b815260206004820181905260248201527f63726561746541737365745265666572656e63652063616c6c206661696c6564604482015260640161040c565b6000546001600160a01b031633146106595760405162461bcd60e51b815260040161040c906110e6565b60065461066f906001600160a01b031682610b34565b50565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161040c906110e6565b6106a66000610dcc565b565b6000546001600160a01b031633146106d25760405162461bcd60e51b815260040161040c906110e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060600580546102e490611054565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156107855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161040c565b6107923385858403610841565b5060019392505050565b6000610374338484610966565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161040c906110e6565b6001600160a01b0381166108385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040c565b61066f81610dcc565b6001600160a01b0383166108a35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b0382166109045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109ca5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610a2c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b6001600160a01b03831660009081526001602052604090205481811015610aa45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161040c565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610adb9084906110d3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b2791815260200190565b60405180910390a36104a7565b6001600160a01b038216610b945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161040c565b6001600160a01b03821660009081526001602052604090205481811015610c085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161040c565b6001600160a01b0383166000908152600160205260408120838303905560038054849290610c37908490611180565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610959565b6001600160a01b038216610cd05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040c565b8060036000828254610ce291906110d3565b90915550506001600160a01b03821660009081526001602052604081208054839290610d0f9084906110d3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6007546001600160a01b03166106a65760405162461bcd60e51b815260206004820152603260248201527f43424443636f6e74726163743a206173736574207265666572656e636520636f6044820152711b9d1c9858dd081b9bdd081919599a5b995960721b606482015260840161040c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b6020815260008251806020840152610e5f816040850160208701610e1c565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610e8a57600080fd5b919050565b60008060408385031215610ea257600080fd5b610eab83610e73565b946020939093013593505050565b600080600060608486031215610ece57600080fd5b610ed784610e73565b9250610ee560208501610e73565b9150604084013590509250925092565b60008060208385031215610f0857600080fd5b823567ffffffffffffffff80821115610f2057600080fd5b818501915085601f830112610f3457600080fd5b813581811115610f4357600080fd5b8660208260051b8501011115610f5857600080fd5b60209290920196919550909350505050565b600080600060408486031215610f7f57600080fd5b83359250602084013567ffffffffffffffff80821115610f9e57600080fd5b818601915086601f830112610fb257600080fd5b813581811115610fc157600080fd5b876020828501011115610fd357600080fd5b6020830194508093505050509250925092565b600060208284031215610ff857600080fd5b5035919050565b60006020828403121561101157600080fd5b61101a82610e73565b9392505050565b6000806040838503121561103457600080fd5b61103d83610e73565b915061104b60208401610e73565b90509250929050565b600181811c9082168061106857607f821691505b60208210810361108857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110cc576110cc6110a4565b5060010190565b80820180821115610378576103786110a4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60608152836060820152838560808301376000608085830181019190915260208201939093526001600160a01b03919091166040820152601f909201601f191690910101919050565b60008251611176818460208701610e1c565b9190910192915050565b81810381811115610378576103786110a456fea26469706673582212208e0d27b796e78bc197361bd99b802d95e06f14b4ad47842414086729e5f6ad7c64736f6c63430008100033", - "sourceMap": "319:1524:0:-:0;;;366:76;;;-1:-1:-1;;;;;;366:76:0;;;399:42;366:76;;;;448:39;;;;;;;;494:65;;;;;;;;;;1963:113:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1963:113:2;;;921:32:1;940:12;:10;;;:12;;:::i;:::-;921:18;:32::i;:::-;2029:5:2;:13;2037:5;2029;:13;:::i;:::-;-1:-1:-1;2052:7:2;:17;2062:7;2052;:17;:::i;:::-;;1963:113;;319:1524:0;;640:96:5;719:10;;640:96::o;2270:187:1:-;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:1;;;-1:-1:-1;;;;;;2378:17:1;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;14:127:6:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:545::-;759:2;754:3;751:11;748:448;;;795:1;820:5;816:2;809:17;865:4;861:2;851:19;935:2;923:10;919:19;916:1;912:27;906:4;902:38;971:4;959:10;956:20;953:47;;;-1:-1:-1;994:4:6;953:47;1049:2;1044:3;1040:12;1037:1;1033:20;1027:4;1023:31;1013:41;;1104:82;1122:2;1115:5;1112:13;1104:82;;;1167:17;;;1148:1;1137:13;1104:82;;;1108:3;;;748:448;657:545;;;:::o;1378:1352::-;1498:10;;-1:-1:-1;;;;;1520:30:6;;1517:56;;;1553:18;;:::i;:::-;1582:97;1672:6;1632:38;1664:4;1658:11;1632:38;:::i;:::-;1626:4;1582:97;:::i;:::-;1734:4;;1798:2;1787:14;;1815:1;1810:663;;;;2517:1;2534:6;2531:89;;;-1:-1:-1;2586:19:6;;;2580:26;2531:89;-1:-1:-1;;1335:1:6;1331:11;;;1327:24;1323:29;1313:40;1359:1;1355:11;;;1310:57;2633:81;;1780:944;;1810:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1846:20:6;;;1964:236;1978:7;1975:1;1972:14;1964:236;;;2067:19;;;2061:26;2046:42;;2159:27;;;;2127:1;2115:14;;;;1994:19;;1964:236;;;1968:3;2228:6;2219:7;2216:19;2213:201;;;2289:19;;;2283:26;-1:-1:-1;;2372:1:6;2368:14;;;2384:3;2364:24;2360:37;2356:42;2341:58;2326:74;;2213:201;-1:-1:-1;;;;;2460:1:6;2444:14;;;2440:22;2427:36;;-1:-1:-1;1378:1352:6:o;:::-;319:1524:0;;;;;;", - "deployedSourceMap": "319:1524:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2141:98:2;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4238:166;;;;;;:::i;:::-;;:::i;:::-;;;1272:14:6;;1265:22;1247:41;;1235:2;1220:18;4238:166:2;1107:187:6;3229:106:2;3316:12;;3229:106;;;1445:25:6;;;1433:2;1418:18;3229:106:2;1299:177:6;4871:478:2;;;;;;:::i;:::-;;:::i;3078:91::-;;;3160:2;1956:36:6;;1944:2;1929:18;3078:91:2;1814:184:6;1600:241:0;;;;;;:::i;:::-;;:::i;:::-;;5744:212:2;;;;;;:::i;:::-;;:::i;705:105:0:-;;;;;;:::i;:::-;;:::i;917:381::-;;;;;;:::i;:::-;;:::i;816:95::-;;;;;;:::i;:::-;;:::i;3393:125:2:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3493:18:2;3467:7;3493:18;;;:9;:18;;;;;;;3393:125;1668:101:1;;;:::i;565:134:0:-;;;;;;:::i;:::-;;:::i;1036:85:1:-;1082:7;1108:6;1036:85;;-1:-1:-1;;;;;1108:6:1;;;3810:51:6;;3798:2;3783:18;1036:85:1;3664:203:6;2352:102:2;;;:::i;6443:405::-;;;;;;:::i;:::-;;:::i;3721:172::-;;;;;;:::i;:::-;;:::i;3951:149::-;;;;;;:::i;:::-;-1:-1:-1;;;;;4066:18:2;;;4040:7;4066:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3951:149;1918:198:1;;;;;;:::i;:::-;;:::i;2141:98:2:-;2195:13;2227:5;2220:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2141:98;:::o;4238:166::-;4321:4;4337:39;719:10:5;4360:7:2;4369:6;4337:8;:39::i;:::-;-1:-1:-1;4393:4:2;4238:166;;;;;:::o;4871:478::-;5007:4;5023:36;5033:6;5041:9;5052:6;5023:9;:36::i;:::-;-1:-1:-1;;;;;5097:19:2;;5070:24;5097:19;;;:11;:19;;;;;;;;719:10:5;5097:33:2;;;;;;;;5148:26;;;;5140:79;;;;-1:-1:-1;;;5140:79:2;;4724:2:6;5140:79:2;;;4706:21:6;4763:2;4743:18;;;4736:30;4802:34;4782:18;;;4775:62;-1:-1:-1;;;4853:18:6;;;4846:38;4901:19;;5140:79:2;;;;;;;;;5253:57;5262:6;719:10:5;5303:6:2;5284:16;:25;5253:8;:57::i;:::-;-1:-1:-1;5338:4:2;;4871:478;-1:-1:-1;;;;4871:478:2:o;1600:241:0:-;1672:14;;1696:139;1713:19;;;1696:139;;;1762:22;1772:8;;1781:1;1772:11;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;1762:22::-;1753:31;;1798:26;1804:8;;1813:1;1804:11;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1817:6;1798:5;:26::i;:::-;1734:3;;;;:::i;:::-;;;;1696:139;;;;1662:179;1600:241;;:::o;5744:212:2:-;719:10:5;5832:4:2;5880:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;5880:34:2;;;;;;;;;;5832:4;;5848:80;;5871:7;;5880:47;;5917:10;;5880:47;:::i;:::-;5848:8;:80::i;705:105:0:-;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;781:22:0::1;787:7;796:6;781:5;:22::i;:::-;705:105:::0;;:::o;917:381::-;1515:24;:22;:24::i;:::-;1023:14:::1;::::0;1014:32:::1;::::0;-1:-1:-1;;;;;1023:14:0::1;1039:6:::0;1014:8:::1;:32::i;:::-;-1:-1:-1::0;1076:18:0::1;::::0;1113:105:::1;::::0;1058:12:::1;::::0;-1:-1:-1;;;;;1076:18:0::1;::::0;1113:105:::1;::::0;1185:12;;;;1199:6;;1207:10:::1;::::0;1113:105:::1;;;:::i;:::-;;::::0;;-1:-1:-1;;1113:105:0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;1113:105:0::1;-1:-1:-1::0;;;1113:105:0::1;::::0;;1076:152;::::1;::::0;1113:105;1076:152:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1057:171;;;1247:7;1239:52;;;::::0;-1:-1:-1;;;1239:52:0;;6888:2:6;1239:52:0::1;::::0;::::1;6870:21:6::0;;;6907:18;;;6900:30;6966:34;6946:18;;;6939:62;7018:18;;1239:52:0::1;6686:356:6::0;816:95:0;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;881:14:0::1;::::0;875:29:::1;::::0;-1:-1:-1;;;;;881:14:0::1;897:6:::0;875:5:::1;:29::i;:::-;816:95:::0;:::o;1668:101:1:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;565:134:0:-;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;655:18:0::1;:37:::0;;-1:-1:-1;;;;;;655:37:0::1;-1:-1:-1::0;;;;;655:37:0;;;::::1;::::0;;;::::1;::::0;;565:134::o;2352:102:2:-;2408:13;2440:7;2433:14;;;;;:::i;6443:405::-;719:10:5;6536:4:2;6579:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6579:34:2;;;;;;;;;;6631:35;;;;6623:85;;;;-1:-1:-1;;;6623:85:2;;7249:2:6;6623:85:2;;;7231:21:6;7288:2;7268:18;;;7261:30;7327:34;7307:18;;;7300:62;-1:-1:-1;;;7378:18:6;;;7371:35;7423:19;;6623:85:2;7047:401:6;6623:85:2;6742:67;719:10:5;6765:7:2;6793:15;6774:16;:34;6742:8;:67::i;:::-;-1:-1:-1;6837:4:2;;6443:405;-1:-1:-1;;;6443:405:2:o;3721:172::-;3807:4;3823:42;719:10:5;3847:9:2;3858:6;3823:9;:42::i;1918:198:1:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;-1:-1:-1;;;;;2006:22:1;::::1;1998:73;;;::::0;-1:-1:-1;;;1998:73:1;;7655:2:6;1998:73:1::1;::::0;::::1;7637:21:6::0;7694:2;7674:18;;;7667:30;7733:34;7713:18;;;7706:62;-1:-1:-1;;;7784:18:6;;;7777:36;7830:19;;1998:73:1::1;7453:402:6::0;1998:73:1::1;2081:28;2100:8;2081:18;:28::i;10019:370:2:-:0;-1:-1:-1;;;;;10150:19:2;;10142:68;;;;-1:-1:-1;;;10142:68:2;;8062:2:6;10142:68:2;;;8044:21:6;8101:2;8081:18;;;8074:30;8140:34;8120:18;;;8113:62;-1:-1:-1;;;8191:18:6;;;8184:34;8235:19;;10142:68:2;7860:400:6;10142:68:2;-1:-1:-1;;;;;10228:21:2;;10220:68;;;;-1:-1:-1;;;10220:68:2;;8467:2:6;10220:68:2;;;8449:21:6;8506:2;8486:18;;;8479:30;8545:34;8525:18;;;8518:62;-1:-1:-1;;;8596:18:6;;;8589:32;8638:19;;10220:68:2;8265:398:6;10220:68:2;-1:-1:-1;;;;;10299:18:2;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10350:32;;1445:25:6;;;10350:32:2;;1418:18:6;10350:32:2;;;;;;;;10019:370;;;:::o;7322:713::-;-1:-1:-1;;;;;7457:20:2;;7449:70;;;;-1:-1:-1;;;7449:70:2;;8870:2:6;7449:70:2;;;8852:21:6;8909:2;8889:18;;;8882:30;8948:34;8928:18;;;8921:62;-1:-1:-1;;;8999:18:6;;;8992:35;9044:19;;7449:70:2;8668:401:6;7449:70:2;-1:-1:-1;;;;;7537:23:2;;7529:71;;;;-1:-1:-1;;;7529:71:2;;9276:2:6;7529:71:2;;;9258:21:6;9315:2;9295:18;;;9288:30;9354:34;9334:18;;;9327:62;-1:-1:-1;;;9405:18:6;;;9398:33;9448:19;;7529:71:2;9074:399:6;7529:71:2;-1:-1:-1;;;;;7693:17:2;;7669:21;7693:17;;;:9;:17;;;;;;7728:23;;;;7720:74;;;;-1:-1:-1;;;7720:74:2;;9680:2:6;7720:74:2;;;9662:21:6;9719:2;9699:18;;;9692:30;9758:34;9738:18;;;9731:62;-1:-1:-1;;;9809:18:6;;;9802:36;9855:19;;7720:74:2;9478:402:6;7720:74:2;-1:-1:-1;;;;;7828:17:2;;;;;;;:9;:17;;;;;;7848:22;;;7828:42;;7890:20;;;;;;;;:30;;7864:6;;7828:17;7890:30;;7864:6;;7890:30;:::i;:::-;;;;;;;;7953:9;-1:-1:-1;;;;;7936:35:2;7945:6;-1:-1:-1;;;;;7936:35:2;;7964:6;7936:35;;;;1445:25:6;;1433:2;1418:18;;1299:177;7936:35:2;;;;;;;;7982:46;9020:576;;-1:-1:-1;;;;;9103:21:2;;9095:67;;;;-1:-1:-1;;;9095:67:2;;10087:2:6;9095:67:2;;;10069:21:6;10126:2;10106:18;;;10099:30;10165:34;10145:18;;;10138:62;-1:-1:-1;;;10216:18:6;;;10209:31;10257:19;;9095:67:2;9885:397:6;9095:67:2;-1:-1:-1;;;;;9258:18:2;;9233:22;9258:18;;;:9;:18;;;;;;9294:24;;;;9286:71;;;;-1:-1:-1;;;9286:71:2;;10489:2:6;9286:71:2;;;10471:21:6;10528:2;10508:18;;;10501:30;10567:34;10547:18;;;10540:62;-1:-1:-1;;;10618:18:6;;;10611:32;10660:19;;9286:71:2;10287:398:6;9286:71:2;-1:-1:-1;;;;;9391:18:2;;;;;;:9;:18;;;;;9412:23;;;9391:44;;9455:12;:22;;9429:6;;9391:18;9455:22;;9429:6;;9455:22;:::i;:::-;;;;-1:-1:-1;;9493:37:2;;1445:25:6;;;9519:1:2;;-1:-1:-1;;;;;9493:37:2;;;;;1433:2:6;1418:18;9493:37:2;1299:177:6;8311:389:2;-1:-1:-1;;;;;8394:21:2;;8386:65;;;;-1:-1:-1;;;8386:65:2;;11025:2:6;8386:65:2;;;11007:21:6;11064:2;11044:18;;;11037:30;11103:33;11083:18;;;11076:61;11154:18;;8386:65:2;10823:355:6;8386:65:2;8538:6;8522:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;8554:18:2;;;;;;:9;:18;;;;;:28;;8576:6;;8554:18;:28;;8576:6;;8554:28;:::i;:::-;;;;-1:-1:-1;;8597:37:2;;1445:25:6;;;-1:-1:-1;;;;;8597:37:2;;;8614:1;;8597:37;;1433:2:6;1418:18;8597:37:2;;;;;;;705:105:0;;:::o;1304:168::-;1378:18;;-1:-1:-1;;;;;1378:18:0;1370:95;;;;-1:-1:-1;;;1370:95:0;;11385:2:6;1370:95:0;;;11367:21:6;11424:2;11404:18;;;11397:30;11463:34;11443:18;;;11436:62;-1:-1:-1;;;11514:18:6;;;11507:48;11572:19;;1370:95:0;11183:414:6;2270:187:1;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:1;;;-1:-1:-1;;;;;;2378:17:1;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;14:250:6:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:6;238:16;;231:27;14:250::o;269:396::-;418:2;407:9;400:21;381:4;450:6;444:13;493:6;488:2;477:9;473:18;466:34;509:79;581:6;576:2;565:9;561:18;556:2;548:6;544:15;509:79;:::i;:::-;649:2;628:15;-1:-1:-1;;624:29:6;609:45;;;;656:2;605:54;;269:396;-1:-1:-1;;269:396:6:o;670:173::-;738:20;;-1:-1:-1;;;;;787:31:6;;777:42;;767:70;;833:1;830;823:12;767:70;670:173;;;:::o;848:254::-;916:6;924;977:2;965:9;956:7;952:23;948:32;945:52;;;993:1;990;983:12;945:52;1016:29;1035:9;1016:29;:::i;:::-;1006:39;1092:2;1077:18;;;;1064:32;;-1:-1:-1;;;848:254:6:o;1481:328::-;1558:6;1566;1574;1627:2;1615:9;1606:7;1602:23;1598:32;1595:52;;;1643:1;1640;1633:12;1595:52;1666:29;1685:9;1666:29;:::i;:::-;1656:39;;1714:38;1748:2;1737:9;1733:18;1714:38;:::i;:::-;1704:48;;1799:2;1788:9;1784:18;1771:32;1761:42;;1481:328;;;;;:::o;2003:615::-;2089:6;2097;2150:2;2138:9;2129:7;2125:23;2121:32;2118:52;;;2166:1;2163;2156:12;2118:52;2206:9;2193:23;2235:18;2276:2;2268:6;2265:14;2262:34;;;2292:1;2289;2282:12;2262:34;2330:6;2319:9;2315:22;2305:32;;2375:7;2368:4;2364:2;2360:13;2356:27;2346:55;;2397:1;2394;2387:12;2346:55;2437:2;2424:16;2463:2;2455:6;2452:14;2449:34;;;2479:1;2476;2469:12;2449:34;2532:7;2527:2;2517:6;2514:1;2510:14;2506:2;2502:23;2498:32;2495:45;2492:65;;;2553:1;2550;2543:12;2492:65;2584:2;2576:11;;;;;2606:6;;-1:-1:-1;2003:615:6;;-1:-1:-1;;;;2003:615:6:o;2623:660::-;2703:6;2711;2719;2772:2;2760:9;2751:7;2747:23;2743:32;2740:52;;;2788:1;2785;2778:12;2740:52;2824:9;2811:23;2801:33;;2885:2;2874:9;2870:18;2857:32;2908:18;2949:2;2941:6;2938:14;2935:34;;;2965:1;2962;2955:12;2935:34;3003:6;2992:9;2988:22;2978:32;;3048:7;3041:4;3037:2;3033:13;3029:27;3019:55;;3070:1;3067;3060:12;3019:55;3110:2;3097:16;3136:2;3128:6;3125:14;3122:34;;;3152:1;3149;3142:12;3122:34;3197:7;3192:2;3183:6;3179:2;3175:15;3171:24;3168:37;3165:57;;;3218:1;3215;3208:12;3165:57;3249:2;3245;3241:11;3231:21;;3271:6;3261:16;;;;;2623:660;;;;;:::o;3288:180::-;3347:6;3400:2;3388:9;3379:7;3375:23;3371:32;3368:52;;;3416:1;3413;3406:12;3368:52;-1:-1:-1;3439:23:6;;3288:180;-1:-1:-1;3288:180:6:o;3473:186::-;3532:6;3585:2;3573:9;3564:7;3560:23;3556:32;3553:52;;;3601:1;3598;3591:12;3553:52;3624:29;3643:9;3624:29;:::i;:::-;3614:39;3473:186;-1:-1:-1;;;3473:186:6:o;3872:260::-;3940:6;3948;4001:2;3989:9;3980:7;3976:23;3972:32;3969:52;;;4017:1;4014;4007:12;3969:52;4040:29;4059:9;4040:29;:::i;:::-;4030:39;;4088:38;4122:2;4111:9;4107:18;4088:38;:::i;:::-;4078:48;;3872:260;;;;;:::o;4137:380::-;4216:1;4212:12;;;;4259;;;4280:61;;4334:4;4326:6;4322:17;4312:27;;4280:61;4387:2;4379:6;4376:14;4356:18;4353:38;4350:161;;4433:10;4428:3;4424:20;4421:1;4414:31;4468:4;4465:1;4458:15;4496:4;4493:1;4486:15;4350:161;;4137:380;;;:::o;4931:127::-;4992:10;4987:3;4983:20;4980:1;4973:31;5023:4;5020:1;5013:15;5047:4;5044:1;5037:15;5063:127;5124:10;5119:3;5115:20;5112:1;5105:31;5155:4;5152:1;5145:15;5179:4;5176:1;5169:15;5195:135;5234:3;5255:17;;;5252:43;;5275:18;;:::i;:::-;-1:-1:-1;5322:1:6;5311:13;;5195:135::o;5335:125::-;5400:9;;;5421:10;;;5418:36;;;5434:18;;:::i;5465:356::-;5667:2;5649:21;;;5686:18;;;5679:30;5745:34;5740:2;5725:18;;5718:62;5812:2;5797:18;;5465:356::o;5826:563::-;6041:2;6030:9;6023:21;6080:6;6075:2;6064:9;6060:18;6053:34;6138:6;6130;6124:3;6113:9;6109:19;6096:49;6195:1;6189:3;6165:22;;;6161:32;;6154:43;;;;6300:4;6285:20;;6278:36;;;;-1:-1:-1;;;;;6350:32:6;;;;6345:2;6330:18;;6323:60;6258:2;6237:15;;;-1:-1:-1;;6233:29:6;6218:45;;;6214:55;;;-1:-1:-1;5826:563:6:o;6394:287::-;6523:3;6561:6;6555:13;6577:66;6636:6;6631:3;6624:4;6616:6;6612:17;6577:66;:::i;:::-;6659:16;;;;;6394:287;-1:-1:-1;;6394:287:6:o;10690:128::-;10757:9;;;10778:11;;;10775:37;;;10792:18;;:::i", - "sourcePath": "/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol", - "compiler": { - "name": "solc", - "version": "0.8.16+commit.07a7930e" - }, - "ast": { - "absolutePath": "/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol", - "exportedSymbols": { - "CBDCcontract": [ - 162 - ], - "Context": [ - 938 - ], - "ERC20": [ - 813 - ], - "IERC20": [ - 891 - ], - "IERC20Metadata": [ - 916 - ], - "Ownable": [ - 267 - ] - }, - "id": 163, - "license": "GPL-3.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.8", - ".15" - ], - "nodeType": "PragmaDirective", - "src": "37:24:0" - }, - { - "absolutePath": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol", - "file": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol", - "id": 2, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 163, - "sourceUnit": 268, - "src": "63:87:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", - "id": 3, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 163, - "sourceUnit": 814, - "src": "151:90:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 5, - "name": "Ownable", - "nameLocations": [ - "344:7:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 267, - "src": "344:7:0" - }, - "id": 6, - "nodeType": "InheritanceSpecifier", - "src": "344:7:0" - }, - { - "baseName": { - "id": 7, - "name": "ERC20", - "nameLocations": [ - "353:5:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 813, - "src": "353:5:0" - }, - "id": 8, - "nodeType": "InheritanceSpecifier", - "src": "353:5:0" - } - ], - "canonicalName": "CBDCcontract", - "contractDependencies": [], - "contractKind": "contract", - "documentation": { - "id": 4, - "nodeType": "StructuredDocumentation", - "src": "243:74:0", - "text": " @title SampleERC20\n @dev Create a sample ERC20 standard token" - }, - "fullyImplemented": true, - "id": 162, - "linearizedBaseContracts": [ - 162, - 813, - 916, - 891, - 267, - 938 - ], - "name": "CBDCcontract", - "nameLocation": "328:12:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "bridge_address", - "nameLocation": "374:14:0", - "nodeType": "VariableDeclaration", - "scope": 162, - "src": "366:76:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 9, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "366:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "arguments": [ - { - "hexValue": "307866323864353736393137316266624432423336323864373232653538313239613661453135303232", - "id": 12, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "399:42:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "value": "0xf28d5769171bfbD2B3628d722e58129a6aE15022" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "391:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 10, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "391:7:0", - "typeDescriptions": {} - } - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "391:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "asset_ref_contract", - "nameLocation": "456:18:0", - "nodeType": "VariableDeclaration", - "scope": 162, - "src": "448:39:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "448:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": { - "arguments": [ - { - "hexValue": "30", - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "485:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "477:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 16, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "477:7:0", - "typeDescriptions": {} - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "477:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 27, - "nodeType": "Block", - "src": "552:7:0", - "statements": [] - }, - "id": 28, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "hexValue": "43656e7472616c42616e6b4469676974616c43757272656e6379", - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "514:28:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e522a826804464981a3e2267dfbb8df03bd96487a0a7d8d35033a23e211146a", - "typeString": "literal_string \"CentralBankDigitalCurrency\"" - }, - "value": "CentralBankDigitalCurrency" - }, - { - "hexValue": "43424443", - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "544:6:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c71aa5a70a4f17bfd28bb6a719471c9c3eaa418d8bb831941073ae5e16c15076", - "typeString": "literal_string \"CBDC\"" - }, - "value": "CBDC" - } - ], - "id": 25, - "kind": "baseConstructorSpecifier", - "modifierName": { - "id": 22, - "name": "ERC20", - "nameLocations": [ - "508:5:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 813, - "src": "508:5:0" - }, - "nodeType": "ModifierInvocation", - "src": "508:43:0" - } - ], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 21, - "nodeType": "ParameterList", - "parameters": [], - "src": "505:2:0" - }, - "returnParameters": { - "id": 26, - "nodeType": "ParameterList", - "parameters": [], - "src": "552:0:0" - }, - "scope": 162, - "src": "494:65:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 39, - "nodeType": "Block", - "src": "645:54:0", - "statements": [ - { - "expression": { - "id": 37, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 35, - "name": "asset_ref_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "655:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 36, - "name": "contract_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 30, - "src": "676:16:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "655:37:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 38, - "nodeType": "ExpressionStatement", - "src": "655:37:0" - } - ] - }, - "functionSelector": "8d1a450d", - "id": 40, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 33, - "kind": "modifierInvocation", - "modifierName": { - "id": 32, - "name": "onlyOwner", - "nameLocations": [ - "635:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 209, - "src": "635:9:0" - }, - "nodeType": "ModifierInvocation", - "src": "635:9:0" - } - ], - "name": "setAssetReferenceContract", - "nameLocation": "574:25:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 31, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 30, - "mutability": "mutable", - "name": "contract_address", - "nameLocation": "608:16:0", - "nodeType": "VariableDeclaration", - "scope": 40, - "src": "600:24:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "600:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "599:26:0" - }, - "returnParameters": { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "645:0:0" - }, - "scope": 162, - "src": "565:134:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 54, - "nodeType": "Block", - "src": "771:39:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 50, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "787:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 51, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "796:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 49, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "781:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "781:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 53, - "nodeType": "ExpressionStatement", - "src": "781:22:0" - } - ] - }, - "functionSelector": "40c10f19", - "id": 55, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 47, - "kind": "modifierInvocation", - "modifierName": { - "id": 46, - "name": "onlyOwner", - "nameLocations": [ - "761:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 209, - "src": "761:9:0" - }, - "nodeType": "ModifierInvocation", - "src": "761:9:0" - } - ], - "name": "mint", - "nameLocation": "714:4:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 45, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 42, - "mutability": "mutable", - "name": "account", - "nameLocation": "727:7:0", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "719:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "719:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "mutability": "mutable", - "name": "amount", - "nameLocation": "744:6:0", - "nodeType": "VariableDeclaration", - "scope": 55, - "src": "736:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 43, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "736:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "718:33:0" - }, - "returnParameters": { - "id": 48, - "nodeType": "ParameterList", - "parameters": [], - "src": "771:0:0" - }, - "scope": 162, - "src": "705:105:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 67, - "nodeType": "Block", - "src": "865:46:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 63, - "name": "bridge_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "881:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 64, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "897:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 62, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 745, - "src": "875:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 65, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "875:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 66, - "nodeType": "ExpressionStatement", - "src": "875:29:0" - } - ] - }, - "functionSelector": "42966c68", - "id": 68, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 60, - "kind": "modifierInvocation", - "modifierName": { - "id": 59, - "name": "onlyOwner", - "nameLocations": [ - "855:9:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 209, - "src": "855:9:0" - }, - "nodeType": "ModifierInvocation", - "src": "855:9:0" - } - ], - "name": "burn", - "nameLocation": "825:4:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 58, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 57, - "mutability": "mutable", - "name": "amount", - "nameLocation": "838:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "830:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 56, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "830:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "829:16:0" - }, - "returnParameters": { - "id": 61, - "nodeType": "ParameterList", - "parameters": [], - "src": "865:0:0" - }, - "scope": 162, - "src": "816:95:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 101, - "nodeType": "Block", - "src": "1004:294:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "id": 78, - "name": "bridge_address", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "1023:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 79, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1039:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 77, - "name": "transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 387, - "src": "1014:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) returns (bool)" - } - }, - "id": 80, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1014:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 81, - "nodeType": "ExpressionStatement", - "src": "1014:32:0" - }, - { - "assignments": [ - 83, - null - ], - "declarations": [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "success", - "nameLocation": "1063:7:0", - "nodeType": "VariableDeclaration", - "scope": 101, - "src": "1058:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 82, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1058:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 95, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "hexValue": "63726561746541737365745265666572656e636528737472696e672c75696e743235362c6164647265737329", - "id": 88, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1137:46:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_663bcc920598c723df9b3a760a5a7d3abac3eae3f6190deac4bbb6aba0477d08", - "typeString": "literal_string \"createAssetReference(string,uint256,address)\"" - }, - "value": "createAssetReference(string,uint256,address)" - }, - { - "id": 89, - "name": "asset_ref_id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "1185:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "id": 90, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1199:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "expression": { - "id": 91, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "1207:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1211:6:0", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1207:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_663bcc920598c723df9b3a760a5a7d3abac3eae3f6190deac4bbb6aba0477d08", - "typeString": "literal_string \"createAssetReference(string,uint256,address)\"" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "id": 86, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967295, - "src": "1113:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 87, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "1117:19:0", - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "1113:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1113:105:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": { - "id": 84, - "name": "asset_ref_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1076:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1095:4:0", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "1076:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1076:152:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1057:171:0" - }, - { - "expression": { - "arguments": [ - { - "id": 97, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "1247:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "63726561746541737365745265666572656e63652063616c6c206661696c6564", - "id": 98, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1256:34:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_93169b227269284795eb472a6a53f2c082e0e5a5494d86528976ebe95cb05d72", - "typeString": "literal_string \"createAssetReference call failed\"" - }, - "value": "createAssetReference call failed" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_93169b227269284795eb472a6a53f2c082e0e5a5494d86528976ebe95cb05d72", - "typeString": "literal_string \"createAssetReference call failed\"" - } - ], - "id": 96, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1239:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1239:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 100, - "nodeType": "ExpressionStatement", - "src": "1239:52:0" - } - ] - }, - "functionSelector": "417d11af", - "id": 102, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 75, - "kind": "modifierInvocation", - "modifierName": { - "id": 74, - "name": "checkARContract", - "nameLocations": [ - "988:15:0" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 123, - "src": "988:15:0" - }, - "nodeType": "ModifierInvocation", - "src": "988:15:0" - } - ], - "name": "escrow", - "nameLocation": "926:6:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 73, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 70, - "mutability": "mutable", - "name": "amount", - "nameLocation": "941:6:0", - "nodeType": "VariableDeclaration", - "scope": 102, - "src": "933:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 69, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "933:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "asset_ref_id", - "nameLocation": "965:12:0", - "nodeType": "VariableDeclaration", - "scope": 102, - "src": "949:28:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 71, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "949:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "932:46:0" - }, - "returnParameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [], - "src": "1004:0:0" - }, - "scope": 162, - "src": "917:381:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 115, - "nodeType": "Block", - "src": "1360:112:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 106, - "name": "asset_ref_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1378:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "arguments": [ - { - "hexValue": "30", - "id": 109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1408:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1400:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 107, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1400:7:0", - "typeDescriptions": {} - } - }, - "id": 110, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1400:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1378:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "43424443636f6e74726163743a206173736574207265666572656e636520636f6e7472616374206e6f7420646566696e6564", - "id": 112, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1412:52:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_81032450132c43b9f8878276153b2ea85a9c962c1591b18b864a02232e1beff8", - "typeString": "literal_string \"CBDCcontract: asset reference contract not defined\"" - }, - "value": "CBDCcontract: asset reference contract not defined" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_81032450132c43b9f8878276153b2ea85a9c962c1591b18b864a02232e1beff8", - "typeString": "literal_string \"CBDCcontract: asset reference contract not defined\"" - } - ], - "id": 105, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1370:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1370:95:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 114, - "nodeType": "ExpressionStatement", - "src": "1370:95:0" - } - ] - }, - "id": 116, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_checkAssetRefContract", - "nameLocation": "1313:22:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 103, - "nodeType": "ParameterList", - "parameters": [], - "src": "1335:2:0" - }, - "returnParameters": { - "id": 104, - "nodeType": "ParameterList", - "parameters": [], - "src": "1360:0:0" - }, - "scope": 162, - "src": "1304:168:0", - "stateMutability": "view", - "virtual": true, - "visibility": "internal" - }, - { - "body": { - "id": 122, - "nodeType": "Block", - "src": "1505:52:0", - "statements": [ - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 118, - "name": "_checkAssetRefContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1515:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$__$", - "typeString": "function () view" - } - }, - "id": 119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1515:24:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 120, - "nodeType": "ExpressionStatement", - "src": "1515:24:0" - }, - { - "id": 121, - "nodeType": "PlaceholderStatement", - "src": "1549:1:0" - } - ] - }, - "id": 123, - "name": "checkARContract", - "nameLocation": "1487:15:0", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 117, - "nodeType": "ParameterList", - "parameters": [], - "src": "1502:2:0" - }, - "src": "1478:79:0", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 160, - "nodeType": "Block", - "src": "1662:179:0", - "statements": [ - { - "assignments": [ - 130 - ], - "declarations": [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "toBurn", - "nameLocation": "1680:6:0", - "nodeType": "VariableDeclaration", - "scope": 160, - "src": "1672:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1672:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 131, - "nodeType": "VariableDeclarationStatement", - "src": "1672:14:0" - }, - { - "body": { - "id": 158, - "nodeType": "Block", - "src": "1739:96:0", - "statements": [ - { - "expression": { - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 143, - "name": "toBurn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1753:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "baseExpression": { - "id": 145, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1772:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 147, - "indexExpression": { - "id": 146, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1781:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1772:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 144, - "name": "balanceOf", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 366, - "src": "1762:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 148, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1762:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1753:31:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 150, - "nodeType": "ExpressionStatement", - "src": "1753:31:0" - }, - { - "expression": { - "arguments": [ - { - "baseExpression": { - "id": 152, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1804:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 154, - "indexExpression": { - "id": 153, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1813:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1804:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "id": 155, - "name": "toBurn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1817:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 151, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 745, - "src": "1798:5:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1798:26:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 157, - "nodeType": "ExpressionStatement", - "src": "1798:26:0" - } - ] - }, - "condition": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 136, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1713:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "expression": { - "id": 137, - "name": "accounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1717:8:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[] calldata" - } - }, - "id": 138, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1726:6:0", - "memberName": "length", - "nodeType": "MemberAccess", - "src": "1717:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1713:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 159, - "initializationExpression": { - "assignments": [ - 133 - ], - "declarations": [ - { - "constant": false, - "id": 133, - "mutability": "mutable", - "name": "i", - "nameLocation": "1706:1:0", - "nodeType": "VariableDeclaration", - "scope": 159, - "src": "1701:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 132, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1701:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 135, - "initialValue": { - "hexValue": "30", - "id": 134, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1710:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "1701:10:0" - }, - "loopExpression": { - "expression": { - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "1734:3:0", - "subExpression": { - "id": 140, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1734:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 142, - "nodeType": "ExpressionStatement", - "src": "1734:3:0" - }, - "nodeType": "ForStatement", - "src": "1696:139:0" - } - ] - }, - "functionSelector": "3459feb2", - "id": 161, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "resetBalanceOf", - "nameLocation": "1609:14:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 127, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 126, - "mutability": "mutable", - "name": "accounts", - "nameLocation": "1643:8:0", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1624:27:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 124, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1624:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 125, - "nodeType": "ArrayTypeName", - "src": "1624:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "1623:29:0" - }, - "returnParameters": { - "id": 128, - "nodeType": "ParameterList", - "parameters": [], - "src": "1662:0:0" - }, - "scope": 162, - "src": "1600:241:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 163, - "src": "319:1524:0", - "usedErrors": [] - } - ], - "src": "37:1807:0" - }, - "functionHashes": { - "allowance(address,address)": "dd62ed3e", - "approve(address,uint256)": "095ea7b3", - "balanceOf(address)": "70a08231", - "burn(uint256)": "42966c68", - "decimals()": "313ce567", - "decreaseAllowance(address,uint256)": "a457c2d7", - "escrow(uint256,string)": "417d11af", - "increaseAllowance(address,uint256)": "39509351", - "mint(address,uint256)": "40c10f19", - "name()": "06fdde03", - "owner()": "8da5cb5b", - "renounceOwnership()": "715018a6", - "resetBalanceOf(address[])": "3459feb2", - "setAssetReferenceContract(address)": "8d1a450d", - "symbol()": "95d89b41", - "totalSupply()": "18160ddd", - "transfer(address,uint256)": "a9059cbb", - "transferFrom(address,address,uint256)": "23b872dd", - "transferOwnership(address)": "f2fde38b" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "910600", - "executionCost": "infinite", - "totalCost": "infinite" - }, - "external": { - "allowance(address,address)": "infinite", - "approve(address,uint256)": "24644", - "balanceOf(address)": "2582", - "burn(uint256)": "55148", - "decimals()": "200", - "decreaseAllowance(address,uint256)": "26933", - "escrow(uint256,string)": "infinite", - "increaseAllowance(address,uint256)": "infinite", - "mint(address,uint256)": "infinite", - "name()": "infinite", - "owner()": "2412", - "renounceOwnership()": "28181", - "resetBalanceOf(address[])": "infinite", - "setAssetReferenceContract(address)": "26800", - "symbol()": "infinite", - "totalSupply()": "2349", - "transfer(address,uint256)": "infinite", - "transferFrom(address,address,uint256)": "infinite", - "transferOwnership(address)": "28419" - }, - "internal": { - "_checkAssetRefContract()": "infinite" - } - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol deleted file mode 100644 index 61b1d6e250..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; -import "remix_tests.sol"; -import "../contracts/CBDCcontract.sol"; -import "../contracts/AssetReferenceContract.sol"; - -contract CBDCcontractTest { - - address bridge_address = address(0xf28d5769171bfbD2B3628d722e58129a6aE15022); - AssetReferenceContract assetRefContract; - CBDCcontract cbdcContract; - - function beforeEach () public { - cbdcContract = new CBDCcontract(); - assetRefContract = new AssetReferenceContract(address(cbdcContract)); - - cbdcContract.setAssetReferenceContract(address(assetRefContract)); - cbdcContract.setAssetReferenceContract(address(assetRefContract)); - assetRefContract.addOwner(address(cbdcContract)); - } - - function testTokenNameAndSymbol () public { - Assert.equal(cbdcContract.name(), "CentralBankDigitalCurrency", "token name did not match"); - Assert.equal(cbdcContract.symbol(), "CBDC", "token symbol did not match"); - } - - function mintEscrowAndBurnTokens () public { - cbdcContract.mint(address(this), 222); - uint256 balance = cbdcContract.balanceOf(address(this)); - Assert.equal(balance, 222, "tokens minted did not match"); - } - - function escrowTokens() public { - cbdcContract.mint(address(this), 222); - cbdcContract.escrow(222, "id1"); - - Assert.equal(assetRefContract.isPresent("id1"), true, "asset reference should be present"); - Assert.equal(cbdcContract.balanceOf(bridge_address), 222, "bridge balance not updated"); - } - - function burnTokens() public { - cbdcContract.mint(address(this), 222); - cbdcContract.escrow(222, "id1"); - cbdcContract.burn(222); - - Assert.equal(cbdcContract.balanceOf(bridge_address), 0, "bridge balance not updated"); - } -} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol deleted file mode 100644 index 99d5d71154..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity ^0.8.15; - -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; - -/** - * @title SampleERC20 - * @dev Create a sample ERC20 standard token - */ - -contract CBDCcontract is Ownable, ERC20 { - - address bridge_address = address(0xf28d5769171bfbD2B3628d722e58129a6aE15022); - address asset_ref_contract = address(0); - - constructor() ERC20("CentralBankDigitalCurrency", "CBDC") { - } - - function setAssetReferenceContract(address contract_address) external onlyOwner { - asset_ref_contract = contract_address; - } - - function mint(address account, uint256 amount) external onlyOwner { - _mint(account, amount); - } - - function burn(uint256 amount) external onlyOwner { - _burn(bridge_address, amount); - } - - function escrow(uint256 amount, string calldata asset_ref_id) external checkARContract { - transfer(bridge_address, amount); - - (bool success, ) = asset_ref_contract.call( - abi.encodeWithSignature("createAssetReference(string,uint256,address)", asset_ref_id, amount, msg.sender) - ); - - require(success, "createAssetReference call failed"); - } - - function _checkAssetRefContract() internal view virtual { - require(asset_ref_contract != address(0), "CBDCcontract: asset reference contract not defined"); - } - - modifier checkARContract() { - _checkAssetRefContract(); - _; - } - - // function for testing purposes - function resetBalanceOf(address[] calldata accounts) external { - uint256 toBurn; - for (uint i = 0; i < accounts.length; i++) { - toBurn = balanceOf(accounts[i]); - _burn(accounts[i], toBurn); - } - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts deleted file mode 100644 index 4ae10f035a..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts +++ /dev/null @@ -1,116 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../../../crypto-material/crypto-material.json"; -import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; -import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; - -const BESU_CONTRACT_CBDC_ERC20_NAME = CBDCcontractJson.contractName; -const BESU_CONTRACT_ASSET_REF_NAME = AssetReferenceContractJson.contractName; - -export async function lockBesuAssetReference( - userAddress: string, - prkAddress: string, - assetRefID: string, -): Promise { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "lockAssetReference", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: userAddress, - secret: prkAddress, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} - -export async function getBesuBalance(address: string): Promise { - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "CALL", - methodName: "balanceOf", - gas: 1000000, - params: [address], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return parseInt(response.data.callOutput); -} - -export async function isBesuAssetReference( - assetRefID: string, -): Promise { - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "CALL", - methodName: "isPresent", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return response.data.callOutput; -} - -export async function resetBesu(): Promise { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "resetBalanceOf", - gas: 1000000, - params: [ - [ - CryptoMaterial.accounts["userA"].ethAddress, - CryptoMaterial.accounts["userB"].ethAddress, - CryptoMaterial.accounts["bridge"].ethAddress, - ], - ], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "resetAssetRefsList", - gas: 1000000, - params: [], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts deleted file mode 100644 index 4188182bfc..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts +++ /dev/null @@ -1,161 +0,0 @@ -import axios from "axios"; -import { getUserFromPseudonim } from "./steps/common"; -import CryptoMaterial from "../../../crypto-material/crypto-material.json"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -export async function getFabricBalance(identity: string): Promise { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [identity], - methodName: "BalanceOf", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return parseInt(response.data.functionOutput); -} - -export async function readFabricAssetReference( - assetRefID: string, -): Promise { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "ReadAssetReference", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return JSON.parse(response.data.functionOutput); -} - -export async function fabricAssetReferenceExists( - assetRefID: string, -): Promise { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "AssetReferenceExists", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - return response.data.functionOutput; -} - -export async function lockFabricAssetReference( - user: string, - assetRefID: string, -): Promise { - return axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "LockAssetReference", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); -} - -export async function deleteFabricAssetReference( - user: string, - assetRefID: string, -): Promise { - return axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "DeleteAssetReference", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); -} - -export async function refundFabricTokens( - finalUserFabricID: string, - amount: number, - finalUserEthAddress: string, -): Promise { - return axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString(), finalUserFabricID, finalUserEthAddress], - methodName: "Refund", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "bridge", - }, - }, - ); -} - -export async function resetFabric(): Promise { - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "ResetState", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "ResetState", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature deleted file mode 100644 index 28d48164cf..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature +++ /dev/null @@ -1,40 +0,0 @@ -@besu -Feature: Hyperledger Besu gateway is working properly - - Scenario: Alice successfully escrows CBDC - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 500 CBDC available in the sidechain - - Scenario: Alice successfully creates an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then the asset reference smart contract has an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" - - Scenario: Alice successfully locks an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" is locked in the sidechain - - Scenario: Alice successfully locks an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then "charlie" fails to lock the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - - Scenario: Alice successfully deletes an asset reference in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob deletes the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then the asset reference smart contract has no asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" - - Scenario: BridgeEntity deletes an asset reference and burns tokens in the Besu network - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - When bob deletes the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the sidechain diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature deleted file mode 100644 index 09da8ebfd3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature +++ /dev/null @@ -1,67 +0,0 @@ -Feature: Client successfully bridges back CBDC - - @bridgeBack - @fabric - @besu - Scenario: Client successfully initiates bridge back of CBDC to own address in the source chain - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" initiates bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain - - @bridgeBack - @fabric - @besu - Scenario: Client initiates bridge back of CBDC and accounts have consistent balances in both chains - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" initiates bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the sidechain - Then "alice" has 500 CBDC available in the source chain - Then "bob" has 0 CBDC available in the source chain - - @bridgeBack - @fabric - @besu - Scenario: Client successfully initiates bridge back half of the escrowed CBDC to own address in the source chain - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 250 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" initiates bridge back of 250 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain - Then "alice" has 250 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the sidechain - Then "alice" has 250 CBDC available in the source chain - Then "bob" has 250 CBDC available in the source chain - - @bridgeBack - @fabric - @besu - Scenario: Client fails to initiate bridge back of double the escrowed CBDC to own address in the source chain - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "alice" fails to initiate bridge back of 10000 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" - - @bridgeBack - @fabric - @besu - Scenario: Impersonator fails to initiate bridge back of CBDC escrowed by another user address but transfer - Given "alice" with 500 CBDC available in the sidechain smart contract - When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain - Then "charlie" fails to initiate bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" - Then "alice" has 0 CBDC available in the source chain - Then "alice" has 0 CBDC available in the sidechain - Then "bob" has 0 CBDC available in the source chain - Then "bob" has 500 CBDC available in the sidechain - Then "charlie" has 0 CBDC available in the source chain - Then "charlie" has 0 CBDC available in the sidechain diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature deleted file mode 100644 index 04106f15a3..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature +++ /dev/null @@ -1,42 +0,0 @@ -Feature: Client successfully bridges out CBDC - - @bridgeOut - @fabric - @besu - Scenario: Chaincode correctly tracks amount of bridged out CBDC when running bridging protocol - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "alice" initiates bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain - Then the bridged out amount in the chaincode is 500 CBDC - - @bridgeOut - @fabric - @besu - Scenario: Client successfully initiates bridge out of CBDC to own address in the sidechain - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "alice" initiates bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain - Then "alice" has 0 CBDC available in the source chain - Then "bob" has 500 CBDC available in the source chain - Then "alice" has 500 CBDC available in the sidechain - - @bridgeOut - @fabric - Scenario: Client initiates bridge out of CBDC to another user address and the operation fails - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then "alice" tries to initiate bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "charlie" address in the sidechain and operation fails because "it is not possible to bridge CBDC to another user" - - @bridgeOut - @fabric - Scenario: Impersonator tries initiates bridge out of other user CBDC and the operation fails - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then "charlie" tries to initiate bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "charlie" address in the sidechain and operation fails because "it is not possible to transfer tokens escrowed by another user" - - @bridgeOut - @fabric - Scenario: Client tries initiates bridge out of more CBDC than the amount escrowed and the operation fails - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then "alice" tries to initiate bridge out of 1000 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain and operation fails because "it is not possible to transfer a different amount of CBDC than the ones escrowed" diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature deleted file mode 100644 index 1d299be865..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature +++ /dev/null @@ -1,57 +0,0 @@ -@fabric -Feature: Hyperledger Fabric gateway is working properly - - Scenario: Alice successfully escrows CBDC in the source chain - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then "alice" has 0 CBDC available in the source chain - Then "bob" has 500 CBDC available in the source chain - - Scenario: Alice successfully creates an asset reference - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then the asset reference chaincode has an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" - - Scenario: Alice successfully locks an asset reference - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" is locked in the source chain - - Scenario: Alice successfully locks an asset reference and Bob tries to lock the same - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then "charlie" fails to lock the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - - Scenario: Alice successfully escrows 500 CBDC and tries to transfer to Bob - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then "alice" fails to transfer 500 CBDC to "charlie" - - Scenario: Alice successfully deletes an asset reference - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks and deletes an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - Then the asset reference chaincode has no asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" - - Scenario: BridgeEntity successfully refunds CBDC - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When "bob" locks and deletes an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain - When bob refunds 500 CBDC to "alice" in the source chain - Then "bob" has 0 CBDC available in the source chain - Then "alice" has 500 CBDC available in the source chain - - Scenario: Chaincode correctly tracks amount of bridged out CBDC (1) - Given "alice" with 500 CBDC available in the source chain - When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - Then the bridged out amount in the chaincode is 500 CBDC - - Scenario: Chaincode correctly tracks amount of bridged out CBDC (2) - Given "alice" with 500 CBDC available in the source chain - Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain - When bob refunds 500 CBDC to "alice" in the source chain - Then the bridged out amount in the chaincode is 0 CBDC \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts deleted file mode 100644 index 42f40df8b6..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { Given, When, Then, Before, After } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { - getBesuBalance, - isBesuAssetReference, - lockBesuAssetReference, - resetBesu, -} from "../besu-helper"; -import AssetReferenceContractJson from "../../../../solidity/asset-reference-contract/AssetReferenceContract.json"; -import CBDCcontractJson from "../../../../solidity/cbdc-erc-20/CBDCcontract.json"; -import { - getEthAddress, - getPrvKey, - assertEqual, - assertStringContains, -} from "./common"; - -const BESU_CONTRACT_CBDC_ERC20_NAME = CBDCcontractJson.contractName; -const BESU_CONTRACT_ASSET_REF_NAME = AssetReferenceContractJson.contractName; - -Before({ timeout: 20 * 1000, tags: "@besu" }, async function () { - await resetBesu(); -}); - -After({ timeout: 20 * 1000, tags: "@besu" }, async function () { - await resetBesu(); -}); - -Given( - "{string} with {int} CBDC available in the sidechain smart contract", - { timeout: 10 * 1000 }, - async function (user: string, amount: number) { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "mint", - gas: 1000000, - params: [getEthAddress(user), amount], - signingCredential: { - ethAccount: getEthAddress(user), - secret: getPrvKey("bob"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - }, -); - -When( - "{string} escrows {int} CBDC and creates an asset reference with id {string} in the sidechain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number, assetRefID: string) { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "escrow", - gas: 1000000, - params: [amount, assetRefID], - signingCredential: { - ethAccount: getEthAddress(user), - secret: getPrvKey(user), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - }, -); - -When( - "bob locks the asset reference with id {string} in the sidechain", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - await lockBesuAssetReference( - getEthAddress("bob"), - getPrvKey("bob"), - assetRefID, - ); - }, -); - -When( - "bob deletes the asset reference with id {string} in the sidechain", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "SEND", - methodName: "deleteAssetReference", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: getEthAddress("bob"), - secret: getPrvKey("bob"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - }, -); - -Then( - "the asset reference smart contract has an asset reference with id {string}", - async function (assetRefID: string) { - assertEqual(await isBesuAssetReference(assetRefID), true); - }, -); - -Then( - "the asset reference smart contract has no asset reference with id {string}", - async function (assetRefID: string) { - assertEqual(await isBesuAssetReference(assetRefID), false); - }, -); - -Then( - "{string} has {int} CBDC available in the sidechain", - async function (user: string, amount: number) { - assertEqual(await getBesuBalance(getEthAddress(user)), amount); - }, -); - -Then( - "the asset reference with id {string} is locked in the sidechain", - async function (assetRefID: string) { - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "CALL", - methodName: "isAssetLocked", - gas: 1000000, - params: [assetRefID], - signingCredential: { - ethAccount: getEthAddress("alice"), - secret: getPrvKey("alice"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - assertEqual(response.data.callOutput, true); - }, -); - -Then( - "{string} fails to lock the asset reference with id {string} in the sidechain", - async function (user: string, assetRefID: string) { - await lockBesuAssetReference( - getEthAddress(user), - getPrvKey(user), - assetRefID, - ).catch((err) => { - assertStringContains( - err.response.data.error, - `Transaction has been reverted by the EVM`, - ); - }); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts deleted file mode 100644 index 65a9ad9c87..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Then } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { getFabricId, getEthAddress, assertEqual } from "./common"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -Then( - "{string} initiates bridge back of {int} CBDC referenced by id {string} to {string} address in the source chain", - { timeout: 60 * 1000 }, - async function ( - user: string, - amount: number, - assetRefID: string, - finalUser: string, - ) { - const address = getEthAddress(user); - const fabricID = getFabricId(finalUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - const response = await axios.post( - "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT2", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT1", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, - serverDltSystem: "DLT1", - sourceGatewayDltSystem: "DLT2", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); - - assertEqual(response.status, 200); - }, -); - -Then( - "{string} fails to initiate bridge back of {int} CBDC referenced by id {string}", - { timeout: 60 * 1000 }, - async function (user: string, amount: number, assetRefID: string) { - const address = getEthAddress(user); - const fabricID = getFabricId(user); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios - .post( - "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT2", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT1", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, - serverDltSystem: "DLT1", - sourceGatewayDltSystem: "DLT2", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ) - .catch((err) => { - assertEqual(err.response.status, 500); - }); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts deleted file mode 100644 index 509813deda..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { When, Then } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { - getUserFromPseudonim, - getFabricId, - getEthAddress, - assertEqual, - assertStringContains, -} from "./common"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -Then( - "the bridged out amount in the chaincode is {int} CBDC", - async function (amount: string) { - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "GetBridgedOutAmount", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim("bob"), - }, - }, - ); - - assertEqual(parseInt(response.data.functionOutput), amount); - }, -); - -When( - "{string} initiates bridge out of {int} CBDC referenced by id {string} to {string} address in the sidechain", - { timeout: 60 * 1000 }, - async function ( - user: string, - amount: number, - assetRefID: string, - finalUser: string, - ) { - const fabricID = getFabricId(user); - const address = getEthAddress(finalUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - const response = await axios.post( - "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); - - assertEqual(response.status, 200); - }, -); - -Then( - "{string} tries to initiate bridge out of {int} CBDC referenced by id {string} to {string} address in the sidechain and operation fails because {string}", - { timeout: 60 * 1000 }, - async function ( - user: string, - amount: number, - assetRefID: string, - finalUser: string, - failureReason: string, - ) { - const fabricID = getFabricId(user); - const address = getEthAddress(finalUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios - .post( - "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://127.0.0.1:4000`, - }, - serverGatewayConfiguration: { - apiHost: `http://127.0.0.1:4100`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "BESU_ASSET_ID", - }, - ) - .catch((err) => { - assertStringContains(err.response.data.error, failureReason); - }); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts deleted file mode 100644 index 4ed244ab7f..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts +++ /dev/null @@ -1,76 +0,0 @@ -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; - -export function getUserFromPseudonim(user: string): string { - switch (user) { - case "alice": - return "userA"; - case "charlie": - return "userB"; - case "bob": - return "bridge"; - default: - throw Error("Invalid user provided"); - } -} - -export function getFabricId(user: string): string { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].fabricID; - case "userB": - return CryptoMaterial.accounts["userB"].fabricID; - case "bridge": - return CryptoMaterial.accounts["bridge"].fabricID; - default: - throw Error("Invalid user provided"); - } -} - -export function getEthAddress(user: string): string { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].ethAddress; - case "userB": - return CryptoMaterial.accounts["userB"].ethAddress; - case "bridge": - return CryptoMaterial.accounts["bridge"].ethAddress; - default: - throw Error("Invalid user provided"); - } -} - -export function getPrvKey(user: string): string { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].privateKey; - case "userB": - return CryptoMaterial.accounts["userB"].privateKey; - case "bridge": - return CryptoMaterial.accounts["bridge"].privateKey; - default: - throw Error("Invalid user provided"); - } -} - -export function assertEqual(value_1: unknown, value_2: unknown) { - if (value_1 !== value_2) { - throw Error(`Expected ${value_1} to be equal to ${value_2}`); - } -} - -export function assertStringContains( - mainString: string, - subString: string, -): void { - if (!mainString.includes(subString)) { - throw new Error(`String "${mainString}" does not contain "${subString}"`); - } -} - -export function assertNonNullish( - value: TValue, -): asserts value is NonNullable { - if (value === null || value === undefined) { - throw Error(`${value} was expected to be non-null`); - } -} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts deleted file mode 100644 index e95a08a7ce..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { Given, When, Then, Before, After } from "cucumber"; -import axios from "axios"; -import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; -import { - getEthAddress, - getFabricId, - getUserFromPseudonim, - assertEqual, - assertNonNullish, - assertStringContains, -} from "./common"; -import { - deleteFabricAssetReference, - fabricAssetReferenceExists, - getFabricBalance, - lockFabricAssetReference, - readFabricAssetReference, - resetFabric, - refundFabricTokens, -} from "../fabric-helper"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; - -Before({ timeout: 20 * 1000, tags: "@fabric" }, async function () { - await resetFabric(); -}); - -After({ timeout: 20 * 1000, tags: "@fabric" }, async function () { - await resetFabric(); -}); - -Given( - "{string} with {int} CBDC available in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number) { - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString()], - methodName: "Mint", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim("alice"), - }, - }, - ); - - assertEqual(await getFabricBalance(getFabricId(user)), amount); - }, -); - -When( - "{string} escrows {int} CBDC and creates an asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number, assetRefID: string) { - await axios.post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString(), assetRefID], - methodName: "Escrow", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); - }, -); - -When( - "{string} locks the asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, assetRefID: string) { - await lockFabricAssetReference(user, assetRefID); - }, -); - -When( - "{string} locks and deletes an asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, assetRefID: string) { - await lockFabricAssetReference(user, assetRefID); - await deleteFabricAssetReference(user, assetRefID); - }, -); - -When( - "bob refunds {int} CBDC to {string} in the source chain", - { timeout: 10 * 1000 }, - async function (amount: number, userTo: string) { - const finalUserFabricID = getFabricId(userTo); - const finalUserEthAddress = getEthAddress(userTo); - - await refundFabricTokens(finalUserFabricID, amount, finalUserEthAddress); - }, -); - -Then( - "{string} fails to lock the asset reference with id {string} in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, assetRefID: string) { - return axios - .post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [assetRefID], - methodName: "LockAssetReference", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ) - .catch((err) => { - assertStringContains( - err.response.data.error, - `client is not authorized to perform the operation`, - ); - }); - }, -); - -Then( - "{string} fails to transfer {int} CBDC to {string}", - { timeout: 10 * 1000 }, - async function (userFrom: string, amount: number, userTo: string) { - const recipient = getFabricId(userTo); - - axios - .post( - "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [recipient, amount.toString()], - methodName: "Transfer", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(userFrom), - }, - }, - ) - .catch((err) => { - assertStringContains(err.response.data.error, `has insufficient funds`); - }); - }, -); - -Then( - "{string} has {int} CBDC available in the source chain", - { timeout: 10 * 1000 }, - async function (user: string, amount: number) { - assertEqual(await getFabricBalance(getFabricId(user)), amount); - }, -); - -Then( - "the asset reference chaincode has an asset reference with id {string}", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - assertNonNullish(await readFabricAssetReference(assetRefID)); - }, -); - -Then( - "the asset reference with id {string} is locked in the source chain", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - assertEqual((await readFabricAssetReference(assetRefID)).isLocked, true); - }, -); - -Then( - "the asset reference chaincode has no asset reference with id {string}", - { timeout: 10 * 1000 }, - async function (assetRefID: string) { - assertEqual(await fabricAssetReferenceExists(assetRefID), "false"); - }, -); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts deleted file mode 100644 index 34aba3a0ae..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as apiSurface from "../../../main/typescript/public-api"; -import "jest-extended"; - -test("Library can be loaded", async () => { - expect(apiSurface).toBeTruthy(); -}); diff --git a/examples/cactus-example-cbdc-bridging-backend/supervisord.conf b/examples/cactus-example-cbdc-bridging-backend/supervisord.conf deleted file mode 100644 index 8a836ce1b4..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/supervisord.conf +++ /dev/null @@ -1,25 +0,0 @@ -[supervisord] -logfile = /usr/src/app/cactus/log/supervisord.log -logfile_maxbytes = 50MB -logfile_backups=10 -loglevel = info - -[program:dockerd] -command=/usr/local/bin/dockerd -autostart=true -autorestart=true -stderr_logfile=/usr/src/app/cactus/log/dockerd.err.log -stdout_logfile=/usr/src/app/cactus/log/dockerd.out.log - -[program:cbdc-bridge-app-backend] -command=/run-cbdc-app.sh -autostart=true -autorestart=unexpected -exitcodes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 - -[inet_http_server] -port = 0.0.0.0:9001 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json deleted file mode 100644 index 3d723037bc..0000000000 --- a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./dist/lib/", - "declarationDir": "dist/lib", - "rootDir": "./src", - "moduleResolution": "Node16", - "module": "Node16", - "tsBuildInfoFile": "../../.build-cache/cactus-example-cbdc-bridging-backend.tsbuildinfo", - }, - "references": [ - { - "path": "../../extensions/cactus-plugin-object-store-ipfs" - }, - { - "path": "../../packages/cactus-api-client/tsconfig.json" - }, - { - "path": "../../packages/cactus-cmd-api-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-common/tsconfig.json" - }, - { - "path": "../../packages/cactus-core/tsconfig.json" - }, - { - "path": "../../packages/cactus-core-api/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" - }, - { - "path": "../../packages/cactus-plugin-satp-hermes/tsconfig.json" - }, - { - "path": "../../packages/cactus-test-tooling/tsconfig.json" - } - ], - "include": [ - "./src", - "src/**/*.json" - ], - "exclude": [ - "./src/fabric-contracts" - ] -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts deleted file mode 100644 index 7613681707..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/besu-satp-gateway.ts +++ /dev/null @@ -1,519 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios"; -import { - DefaultApi as BesuApi, - Web3SigningCredential, - EthContractInvocationType, - InvokeContractV1Request as BesuInvokeContractV1Request, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, -} from "../plugin-satp-gateway"; - -export interface IBesuSATPGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - besuPath?: string; - besuContractName?: string; - besuWeb3SigningCredential?: Web3SigningCredential; - besuKeychainId?: string; - besuAssetID?: string; -} - -export class BesuSATPGateway extends PluginSATPGateway { - public besuApi?: BesuApi; - public besuContractName?: string; - public besuWeb3SigningCredential?: Web3SigningCredential; - public besuKeychainId?: string; - - public constructor(options: IBesuSATPGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.besuPath != undefined) this.defineBesuConnection(options); - } - - private defineBesuConnection( - options: IBesuSATPGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineBesuConnection()`; - - const config = new Configuration({ basePath: options.besuPath }); - const apiClient = new BesuApi(config); - this.besuApi = apiClient; - const notEnoughBesuParams: boolean = - options.besuContractName == undefined || - options.besuWeb3SigningCredential == undefined || - options.besuKeychainId == undefined; - if (notEnoughBesuParams) { - throw new Error( - `${fnTag}, besu params missing. Should have: signing credentials, contract name, key chain ID, asset ID`, - ); - } - this.besuContractName = options.besuContractName; - this.besuWeb3SigningCredential = options.besuWeb3SigningCredential; - this.besuKeychainId = options.besuKeychainId; - } - - async createAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if (assetId == undefined) { - assetId = sessionData.recipientLedgerAssetID; - } - - let besuCreateAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const besuCreateRes = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - gas: 1000000, - params: [assetId, 100], //the second is size, may need to pass this from client? - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (besuCreateRes.status != 200) { - //await this.Revert(sessionID); - throw new Error(`${fnTag}, besu create asset error`); - } - - const besuCreateResDataJson = JSON.parse( - JSON.stringify(besuCreateRes.data), - ); - - if (besuCreateResDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (besuCreateResDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - besuCreateResDataJson.out.transactionReceipt; - besuCreateAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.commitAcknowledgementClaim = besuCreateAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: besuCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return besuCreateAssetProof; - } - - async lockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuLockAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const assetLockResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - gas: 1000000, - params: [assetId], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetLockResponse.status != 200) { - throw new Error(`${fnTag}, besu lock asset error`); - } - - const assetLockResponseDataJson = JSON.parse( - JSON.stringify(assetLockResponse.data), - ); - - if (assetLockResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetLockResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetLockResponseDataJson.out.transactionReceipt; - besuLockAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Lock, - ); - sessionData.rollbackProofs.push(besuLockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "lock", - data: besuLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return besuLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - const assetUnlockResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - gas: 1000000, - params: [assetId], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetUnlockResponse.status != 200) { - throw new Error(`${fnTag}, besu unlock asset error`); - } - - const assetUnlockResponseDataJson = JSON.parse( - JSON.stringify(assetUnlockResponse.data), - ); - - if (assetUnlockResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetUnlockResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetUnlockResponseDataJson.out.transactionReceipt; - besuUnlockAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Lock, - ); - sessionData.rollbackProofs.push(besuUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: besuUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return besuUnlockAssetProof; - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#deleteAssetToRollback()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let besuDeleteAssetProof = ""; - - if (assetID == undefined) { - assetID = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.besuApi != undefined) { - // we need to lock the asset first - await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - const assetCreationResponse = await this.besuApi.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAsset", - gas: 1000000, - params: [assetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetCreationResponse.status != 200) { - throw new Error(`${fnTag}, besu delete asset error`); - } - - const assetCreationResponseDataJson = JSON.parse( - JSON.stringify(assetCreationResponse.data), - ); - - if (assetCreationResponseDataJson.out == undefined) { - throw new Error(`${fnTag}, besu res data out undefined`); - } - - if (assetCreationResponseDataJson.out.transactionReceipt == undefined) { - throw new Error(`${fnTag}, undefined besu transact receipt`); - } - - const besuCreateAssetReceipt = - assetCreationResponseDataJson.out.transactionReceipt; - besuDeleteAssetProof = JSON.stringify(besuCreateAssetReceipt); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Delete, - ); - sessionData.rollbackProofs.push(besuDeleteAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "delete", - data: besuDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return besuDeleteAssetProof; - } - - // Not implementing these methods because this class is an example - // of a client gateway. They are only used for server gateways. - deleteAsset( - sessionID: string, - assetID?: string | undefined, - ): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async rollback(sessionID: string) { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.besuApi == undefined || - this.besuContractName == undefined || - this.besuKeychainId == undefined || - this.besuWeb3SigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.besuAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isBesuAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - if (await this.besuAssetExists(sessionData.recipientLedgerAssetID)) { - // Rollback creation of the asset - await this.deleteAssetToRollback( - sessionID, - sessionData.recipientLedgerAssetID, - ); - } - } - } - - /* Helper functions */ - async besuAssetExists(besuAssetID: string): Promise { - const fnTag = `${this.className}#besuAssetExists()`; - - const assetExists = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isPresent", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.callOutput == true; - } - - async isBesuAssetLocked(besuAssetID: string): Promise { - const fnTag = `${this.className}#isBesuAssetLocked()`; - - const assetIsLocked = await this.besuApi?.invokeContractV1({ - contractName: this.besuContractName, - invocationType: EthContractInvocationType.Call, - methodName: "isAssetLocked", - gas: 1000000, - params: [besuAssetID], - signingCredential: this.besuWeb3SigningCredential, - keychainId: this.besuKeychainId, - } as BesuInvokeContractV1Request); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.callOutput == true; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts deleted file mode 100644 index 5d81f1a062..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/client-helper.ts +++ /dev/null @@ -1,873 +0,0 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SHA256 } from "crypto-js"; -import { - TransferInitializationV1Request, - TransferInitializationV1Response, - TransferCommenceV1Request, - TransferCommenceV1Response, - LockEvidenceV1Request, - LockEvidenceV1Response, - CommitPreparationV1Request, - CommitPreparationV1Response, - CommitFinalV1Request, - CommitFinalV1Response, - TransferCompleteV1Request, -} from "../public-api"; -import { SatpMessageType, PluginSATPGateway } from "../plugin-satp-gateway"; - -export class ClientGatewayHelper { - public static readonly CLASS_NAME = "ClientGatewayHelper"; - private _log: Logger; - - constructor() { - const level = "INFO"; - const label = ClientGatewayHelper.CLASS_NAME; - this._log = LoggerProvider.getOrCreate({ level, label }); - } - - public get className(): string { - return ClientGatewayHelper.CLASS_NAME; - } - - public get log(): Logger { - return this._log; - } - - async sendTransferInitializationRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${this.className}#sendTransferInitializationRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.id == undefined || - sessionData.step == undefined || - sessionData.version == undefined || - sessionData.maxRetries == undefined || - sessionData.maxTimeout == undefined || - sessionData.payloadProfile == undefined || - sessionData.loggingProfile == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.accessControlProfile == undefined || - sessionData.applicationProfile == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.sourceGatewayDltSystem == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.recipientLedgerAssetID == undefined || - sessionData.recipientGatewayDltSystem == undefined || - sessionData.allowedSourceBackupGateways == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if ( - !gateway.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem) - ) { - throw new Error( - `${fnTag}, recipient gateway dlt system is not supported by this gateway`, - ); - } - - const initializationRequestMessage: TransferInitializationV1Request = { - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionData.id, - version: sessionData.version, - // developer urn - // credential profile - payloadProfile: sessionData.payloadProfile, - applicationProfile: sessionData.applicationProfile, - loggingProfile: sessionData.loggingProfile, - accessControlProfile: sessionData.accessControlProfile, - signature: "", - sourceGatewayPubkey: gateway.pubKey, - sourceGatewayDltSystem: sessionData.sourceGatewayDltSystem, - recipientGatewayPubkey: sessionData.recipientGatewayPubkey, - recipientGatewayDltSystem: sessionData.recipientGatewayDltSystem, - sequenceNumber: sessionData.lastSequenceNumber, - sourceBasePath: sessionData.sourceBasePath, - recipientBasePath: sessionData.recipientBasePath, - // escrow type - // expiry time (related to the escrow) - // multiple claims allowed - // multiple cancels allowed - // permissions - maxRetries: sessionData.maxRetries, - maxTimeout: sessionData.maxTimeout, - backupGatewaysAllowed: sessionData.allowedSourceBackupGateways, - recipientLedgerAssetID: sessionData.recipientLedgerAssetID, - sourceLedgerAssetID: sessionData.sourceLedgerAssetID, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(initializationRequestMessage)), - ); - - initializationRequestMessage.signature = messageSignature; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(initializationRequestMessage), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferInitializationRequest...`); - - if (!remote) { - return initializationRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase1TransferInitiationRequestV1(initializationRequestMessage), - "TransferInitializationRequest", - ); - } - - async checkValidInitializationResponse( - response: TransferInitializationV1Response, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${this.className}#checkValidInitializationResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - if (response.messageType != SatpMessageType.InitializationResponse) { - throw new Error( - `${fnTag}, wrong message type for TransferInitializationResponse`, - ); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, TransferInitializationResponse sequence number incorrect`, - ); - } - - if ( - response.initialRequestMessageHash != - sessionData.initializationRequestMessageHash - ) { - throw new Error( - `${fnTag}, TransferInitializationResponse previous message hash does not match the one that was sent`, - ); - } - - if (response.serverIdentityPubkey != sessionData.recipientGatewayPubkey) { - throw new Error( - `${fnTag}, TransferInitializationResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferInitializationResponse message signature verification failed`, - ); - } - - sessionData.id = response.sessionID; - - sessionData.recipientGatewayPubkey = response.serverIdentityPubkey; - - sessionData.initializationResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureInitializationResponseMessage = - response.signature; - - sessionData.allowedRecipientBackupGateways = response.backupGatewaysAllowed; - - sessionData.step = 3; - - gateway.sessions.set(sessionData.id, sessionData); - this.log.info(`TransferInitializationResponse passed all checks.`); - } - - async sendTransferCommenceRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferCommenceRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.assetProfile == undefined || - sessionData.recipientBasePath == undefined || - // sessionData.originatorPubkey == undefined || - // sessionData.beneficiaryPubkey == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.sourceGatewayDltSystem == undefined || - sessionData.recipientGatewayDltSystem == undefined || - sessionData.initializationResponseMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const hashAssetProfile = SHA256( - JSON.stringify(sessionData.assetProfile), - ).toString(); - - const transferCommenceRequestMessage: TransferCommenceV1Request = { - messageType: SatpMessageType.TransferCommenceRequest, - // originatorPubkey: sessionData.originatorPubkey, - // beneficiaryPubkey: sessionData.beneficiaryPubkey, - originatorPubkey: "sessionData.originatorPubkey", - beneficiaryPubkey: "sessionData.beneficiaryPubkey", - senderDltSystem: sessionData.sourceGatewayDltSystem, - recipientDltSystem: sessionData.recipientGatewayDltSystem, - sessionID: sessionID, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashAssetProfile: hashAssetProfile, - hashPrevMessage: sessionData.initializationResponseMessageHash, - // clientTransferNumber - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferCommenceRequestMessage)), - ); - - transferCommenceRequestMessage.signature = messageSignature; - - sessionData.transferCommenceMessageRequestHash = SHA256( - JSON.stringify(transferCommenceRequestMessage), - ).toString(); - - sessionData.clientSignatureTransferCommenceRequestMessage = - messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferCommenceRequest...`); - - if (!remote) { - return transferCommenceRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase2TransferCommenceRequestV1(transferCommenceRequestMessage), - "TransferCommenceRequest", - ); - } - - async checkValidTransferCommenceResponse( - response: TransferCommenceV1Response, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidTransferCommenceResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - if (response.messageType != SatpMessageType.TransferCommenceResponse) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceResponse`, - ); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, TransferCommenceResponse sequence number incorrect`, - ); - } - - if ( - sessionData.transferCommenceMessageRequestHash != - response.hashCommenceRequest - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse message signature verification failed`, - ); - } - - sessionData.transferCommenceMessageResponseHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureTransferCommenceResponseMessage = - response.signature; - - sessionData.step = 5; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`TransferCommenceResponse passed all checks.`); - } - - async sendLockEvidenceRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendLockEvidenceRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.lockEvidenceClaim == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.transferCommenceMessageResponseHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - lockEvidenceClaim: sessionData.lockEvidenceClaim, - // lock claim format - lockEvidenceExpiration: new Date() - .setDate(new Date().getDate() + 1) - .toString(), // a day from now - hashCommenceAckRequest: sessionData.transferCommenceMessageResponseHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - lockEvidenceRequestMessage.signature = messageSignature; - - sessionData.lockEvidenceRequestMessageHash = SHA256( - JSON.stringify(lockEvidenceRequestMessage), - ).toString(); - - sessionData.clientSignatureLockEvidenceRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending LockEvidenceRequest...`); - - if (!remote) { - return lockEvidenceRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase2LockEvidenceRequestV1(lockEvidenceRequestMessage), - "LockEvidenceRequest", - ); - } - - async checkValidLockEvidenceResponse( - response: LockEvidenceV1Response, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidLockEvidenceResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, reverting transfer because session data is undefined`, - ); - } - - if (response.messageType != SatpMessageType.LockEvidenceResponse) { - throw new Error(`${fnTag}, wrong message type for LockEvidenceResponse`); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, LockEvidenceResponse sequence number incorrect`, - ); - } - - if ( - sessionData.lockEvidenceRequestMessageHash != - response.hashLockEvidenceRequest - ) { - throw new Error( - `${fnTag}, LockEvidenceResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, LockEvidenceResponse message signature verification failed`, - ); - } - - sessionData.lockEvidenceResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureLockEvidenceResponseMessage = response.signature; - - sessionData.step = 7; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`LockEvidenceResponse passed all checks.`); - } - - async sendCommitPreparationRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitPreparationRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.lockEvidenceResponseMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashLockEvidenceAck: sessionData.lockEvidenceResponseMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - commitPrepareRequestMessage.signature = messageSignature; - - sessionData.commitPrepareRequestMessageHash = SHA256( - JSON.stringify(commitPrepareRequestMessage), - ).toString(); - - sessionData.clientSignatureCommitPreparationRequestMessage = - messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending CommitPreparationRequest...`); - - if (!remote) { - return commitPrepareRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase3CommitPreparationRequestV1(commitPrepareRequestMessage), - "CommitPreparationRequest", - ); - } - - async checkValidCommitPreparationResponse( - response: CommitPreparationV1Response, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitPreparationResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, reverting transfer because session data is undefined`, - ); - } - - if (response.messageType != SatpMessageType.CommitPreparationResponse) { - throw new Error( - `${fnTag}, wrong message type for CommitPreparationResponse`, - ); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, CommitPreparationResponse sequence number incorrect`, - ); - } - - if ( - sessionData.commitPrepareRequestMessageHash != response.hashCommitPrep - ) { - throw new Error( - `${fnTag}, CommitPreparationResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, CommitPreparationResponse message signature verification failed`, - ); - } - - sessionData.commitPrepareResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureCommitPreparationResponseMessage = - response.signature; - - sessionData.step = 9; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitPreparationResponse passed all checks.`); - } - - async sendCommitFinalRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitFinalRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.commitFinalClaim == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitPrepareResponseMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - commitFinalClaim: sessionData.commitFinalClaim, - // commit final claim format - hashCommitPrepareAck: sessionData.commitPrepareResponseMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - commitFinalRequestMessage.signature = messageSignature; - - sessionData.commitFinalRequestMessageHash = SHA256( - JSON.stringify(commitFinalRequestMessage), - ).toString(); - - sessionData.clientSignatureCommitFinalRequestMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "final", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending CommitFinalRequest...`); - - if (!remote) { - return commitFinalRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase3CommitFinalRequestV1(commitFinalRequestMessage), - "CommitFinalRequest", - ); - } - - async checkValidCommitFinalResponse( - response: CommitFinalV1Response, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitFinalResponse`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, reverting transfer because session data is undefined`, - ); - } - - if (response.messageType != SatpMessageType.CommitFinalResponse) { - throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - } - - if (response.sequenceNumber != sessionData.lastSequenceNumber) { - throw new Error( - `${fnTag}, CommitFinalResponse sequence number incorrect`, - ); - } - - if (response.commitAcknowledgementClaim == undefined) { - throw new Error(`${fnTag}, the claim provided is not valid`); - } - - if (sessionData.commitFinalRequestMessageHash != response.hashCommitFinal) { - throw new Error( - `${fnTag}, CommitFinalResponse previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != response.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != response.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !gateway.verifySignature(response, sessionData.recipientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, CommitFinalResponse message signature verification failed`, - ); - } - - const claimHash = SHA256(response.commitAcknowledgementClaim).toString(); - const retrievedClaim = await gateway.getLogFromRemote( - PluginSATPGateway.getSatpLogKey(sessionID, "proof", "create"), - ); - - if (claimHash != retrievedClaim.hash) { - throw new Error( - `${fnTag}, Commit Acknowledgement Claim hash does not match the one stored in IPFS`, - ); - } - - if ( - !gateway.verifySignature(retrievedClaim, response.serverIdentityPubkey) - ) { - throw new Error( - `${fnTag}, Commit Acknowledgement Claim signature verification failed`, - ); - } - - sessionData.commitAcknowledgementClaim = - response.commitAcknowledgementClaim; - - sessionData.commitFinalResponseMessageHash = SHA256( - JSON.stringify(response), - ).toString(); - - sessionData.serverSignatureCommitFinalResponseMessage = response.signature; - - sessionData.step = 11; - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitFinalResponse passed all checks.`); - } - - async sendTransferCompleteRequest( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferCompleteRequest()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitFinalResponseMessageHash == undefined || - sessionData.transferCommenceMessageRequestHash == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const transferCompleteRequestMessage: TransferCompleteV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCompleteRequest, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashCommitFinalAck: sessionData.commitFinalResponseMessageHash, - hashTransferCommence: sessionData.transferCommenceMessageRequestHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - const messageSignature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferCompleteRequestMessage)), - ); - - transferCompleteRequestMessage.signature = messageSignature; - - sessionData.transferCompleteMessageHash = SHA256( - JSON.stringify(transferCompleteRequestMessage), - ).toString(); - - sessionData.clientSignatureTransferCompleteMessage = messageSignature; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "complete", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferCompleteRequest...`); - - if (!remote) { - return transferCompleteRequestMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.recipientBasePath, - ).phase3TransferCompleteRequestV1(transferCompleteRequestMessage), - "TransferCompleteRequest", - ); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts deleted file mode 100644 index 7e7c629cc9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/fabric-satp-gateway.ts +++ /dev/null @@ -1,482 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Configuration } from "@hyperledger/cactus-core-api"; -import { - DefaultApi as FabricApi, - FabricContractInvocationType, - FabricSigningCredential, - RunTransactionRequest as FabricRunTransactionRequest, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, -} from "../plugin-satp-gateway"; -import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios"; - -export interface IFabricSATPGatewayConstructorOptions - extends IPluginSatpGatewayConstructorOptions { - fabricPath?: string; - fabricSigningCredential?: FabricSigningCredential; - fabricChannelName?: string; - fabricContractName?: string; -} - -export class FabricSATPGateway extends PluginSATPGateway { - public fabricApi?: FabricApi; - public fabricSigningCredential?: FabricSigningCredential; - public fabricChannelName?: string; - public fabricContractName?: string; - - public constructor(options: IFabricSATPGatewayConstructorOptions) { - super({ - name: options.name, - dltIDs: options.dltIDs, - instanceId: options.instanceId, - keyPair: options.keyPair, - backupGatewaysAllowed: options.backupGatewaysAllowed, - ipfsPath: options.ipfsPath, - clientHelper: options.clientHelper, - serverHelper: options.serverHelper, - knexLocalConfig: options.knexLocalConfig, - knexRemoteConfig: options.knexRemoteConfig, - }); - - if (options.fabricPath != undefined) this.defineFabricConnection(options); - } - - private defineFabricConnection( - options: IFabricSATPGatewayConstructorOptions, - ): void { - const fnTag = `${this.className}#defineFabricConnection()`; - - const config = new Configuration({ basePath: options.fabricPath }); - const apiClient = new FabricApi(config); - this.fabricApi = apiClient; - const notEnoughFabricParams: boolean = - options.fabricSigningCredential == undefined || - options.fabricChannelName == undefined || - options.fabricContractName == undefined; - if (notEnoughFabricParams) { - throw new Error( - `${fnTag}, fabric params missing should have: signing credentials, contract name, channel name, asset ID`, - ); - } - this.fabricSigningCredential = options.fabricSigningCredential; - this.fabricChannelName = options.fabricChannelName; - this.fabricContractName = options.fabricContractName; - } - - async lockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#lockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricLockAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "LockAsset", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptLockRes = await this.fabricApi.getTransactionReceiptByTxIDV1( - { - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest, - ); - - this.log.warn(receiptLockRes.data); - fabricLockAssetProof = JSON.stringify(receiptLockRes.data); - } - - sessionData.lockEvidenceClaim = fabricLockAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, proof of the asset lock: ${fabricLockAssetProof}`); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: fabricLockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricLockAssetProof; - } - - async unlockAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#unlockAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.rollbackActionsPerformed == undefined || - sessionData.rollbackProofs == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricUnlockAssetProof = ""; - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "UnlockAsset", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptUnlock = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptUnlock.data); - fabricUnlockAssetProof = JSON.stringify(receiptUnlock.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Unlock, - ); - sessionData.rollbackProofs.push(fabricUnlockAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset unlock: ${fabricUnlockAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "unlock", - data: fabricUnlockAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "unlock-asset", - data: JSON.stringify(sessionData), - }); - - return fabricUnlockAssetProof; - } - - async deleteAsset(sessionID: string, assetId?: string): Promise { - const fnTag = `${this.className}#deleteAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricDeleteAssetProof = ""; - - if (assetId == undefined) { - assetId = sessionData.sourceLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const deleteRes = await this.fabricApi.runTransactionV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: this.fabricContractName, - invocationType: FabricContractInvocationType.Send, - methodName: "DeleteAsset", - params: [assetId], - } as FabricRunTransactionRequest); - - const receiptDeleteRes = - await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, deleteRes.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptDeleteRes.data); - fabricDeleteAssetProof = JSON.stringify(receiptDeleteRes.data); - } - - sessionData.commitFinalClaim = fabricDeleteAssetProof; - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset deletion: ${fabricDeleteAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: fabricDeleteAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done", - operation: "delete-asset", - data: JSON.stringify(sessionData), - }); - - return fabricDeleteAssetProof; - } - - async createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - const fnTag = `${this.className}#createAsset()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - this.fabricChannelName == undefined || - this.fabricContractName == undefined || - this.fabricSigningCredential == undefined || - sessionData.rollbackProofs == undefined || - sessionData.rollbackActionsPerformed == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let fabricCreateAssetProof = ""; - - if (assetID == undefined) { - assetID = sessionData.recipientLedgerAssetID; - } - - await this.storeLog({ - sessionID: sessionID, - type: "exec-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - if (this.fabricApi != undefined) { - const response = await this.fabricApi.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [assetID!, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - const receiptCreate = await this.fabricApi.getTransactionReceiptByTxIDV1({ - signingCredential: this.fabricSigningCredential, - channelName: this.fabricChannelName, - contractName: "qscc", - invocationType: FabricContractInvocationType.Call, - methodName: "GetBlockByTxID", - params: [this.fabricChannelName, response.data.transactionId], - } as FabricRunTransactionRequest); - - this.log.warn(receiptCreate.data); - fabricCreateAssetProof = JSON.stringify(receiptCreate.data); - } - - sessionData.rollbackActionsPerformed.push( - SessionDataRollbackActionsPerformedEnum.Create, - ); - - sessionData.rollbackProofs.push(fabricCreateAssetProof); - - this.sessions.set(sessionID, sessionData); - - this.log.info( - `${fnTag}, proof of the asset creation: ${fabricCreateAssetProof}`, - ); - - await this.storeProof({ - sessionID: sessionID, - type: "proof-rollback", - operation: "create", - data: fabricCreateAssetProof, - }); - - await this.storeLog({ - sessionID: sessionID, - type: "done-rollback", - operation: "create-asset", - data: JSON.stringify(sessionData), - }); - - return fabricCreateAssetProof; - } - - // Not implementing these methods because this class is an example - // of a client gateway. They are only used for server gateways. - async createAsset(sessionID: string, assetID?: string): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise { - return new Promise(() => `${sessionID}, ${assetID}`); - } - - async rollback(sessionID: string): Promise { - const fnTag = `${this.className}#rollback()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - sessionData.rollback = true; - - this.log.info(`${fnTag}, rolling back session ${sessionID}`); - - if ( - this.fabricApi == undefined || - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined || - sessionData.sourceLedgerAssetID == undefined || - sessionData.recipientLedgerAssetID == undefined - ) { - return; - } - - if (this.isClientGateway(sessionID)) { - if (await this.fabricAssetExists(sessionData.sourceLedgerAssetID)) { - if (await this.isFabricAssetLocked(sessionData.sourceLedgerAssetID)) { - // Rollback locking of the asset - await this.unlockAsset(sessionID, sessionData.sourceLedgerAssetID); - } - } else { - // Rollback extinguishment of the asset - await this.createAssetToRollback( - sessionID, - sessionData.sourceLedgerAssetID, - ); - } - } else { - if (await this.fabricAssetExists(sessionData.sourceLedgerAssetID)) { - await this.deleteAsset(sessionID, sessionData.recipientLedgerAssetID); - } - } - } - - /* Helper functions */ - async fabricAssetExists(fabricAssetID: string): Promise { - const fnTag = `${this.className}#fabricAssetExists()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetExists = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "AssetExists", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetExists == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetExists?.data.functionOutput == "true"; - } - - async isFabricAssetLocked( - fabricAssetID: string, - ): Promise { - const fnTag = `${this.className}#fabricAssetExists()`; - - if ( - this.fabricContractName == undefined || - this.fabricChannelName == undefined || - this.fabricSigningCredential == undefined - ) { - throw new Error(`${fnTag} fabric config is not defined`); - } - - const assetIsLocked = await this.fabricApi?.runTransactionV1({ - contractName: this.fabricContractName, - channelName: this.fabricChannelName, - params: [fabricAssetID], - methodName: "IsAssetLocked", - invocationType: FabricContractInvocationType.Send, - signingCredential: this.fabricSigningCredential, - }); - - if (assetIsLocked == undefined) { - throw new Error(`${fnTag} the asset does not exist`); - } - - return assetIsLocked?.data.functionOutput == "true"; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts deleted file mode 100644 index 2cd8353ced..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/server-helper.ts +++ /dev/null @@ -1,934 +0,0 @@ -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SHA256 } from "crypto-js"; -import { - TransferInitializationV1Response, - TransferInitializationV1Request, - SessionData, - TransferCommenceV1Response, - TransferCommenceV1Request, - LockEvidenceV1Response, - LockEvidenceV1Request, - CommitPreparationV1Response, - CommitPreparationV1Request, - CommitFinalV1Response, - CommitFinalV1Request, - TransferCompleteV1Request, -} from "../public-api"; -import { SatpMessageType, PluginSATPGateway } from "../plugin-satp-gateway"; - -export class ServerGatewayHelper { - public static readonly CLASS_NAME: string = "ServerGatewayHelper"; - private _log: Logger; - - constructor() { - const level = "INFO"; - const label = ServerGatewayHelper.CLASS_NAME; - this._log = LoggerProvider.getOrCreate({ level, label }); - } - - public static get className(): string { - return ServerGatewayHelper.CLASS_NAME; - } - - public get log(): Logger { - return this._log; - } - - async sendTransferInitializationResponse( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferInitiationResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.initializationRequestMessageHash == undefined || - sessionData.initializationRequestMessageRcvTimeStamp == undefined || - sessionData.initializationRequestMessageProcessedTimeStamp == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const transferInitializationResponse: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: sessionID, - initialRequestMessageHash: sessionData.initializationRequestMessageHash, - timeStamp: sessionData.initializationRequestMessageRcvTimeStamp, - processedTimeStamp: - sessionData.initializationRequestMessageProcessedTimeStamp, - serverIdentityPubkey: gateway.pubKey, - sequenceNumber: sessionData.lastSequenceNumber, - signature: "", - backupGatewaysAllowed: gateway.backupGatewaysAllowed, - }; - - transferInitializationResponse.signature = - PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferInitializationResponse)), - ); - - sessionData.initializationResponseMessageHash = SHA256( - JSON.stringify(transferInitializationResponse), - ).toString(); - - sessionData.serverSignatureInitializationResponseMessage = - transferInitializationResponse.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, sending TransferInitializationResponse...`); - - if (!remote) { - return transferInitializationResponse; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase1TransferInitiationResponseV1(transferInitializationResponse), - "TransferInitializationResponse", - ); - } - - async checkValidInitializationRequest( - request: TransferInitializationV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidInitializationRequest()`; - - const sessionData: SessionData = {}; - const recvTimestamp: string = Date.now().toString(); - const sessionID = request.sessionID; - - sessionData.id = sessionID; - sessionData.step = 2; - sessionData.initializationRequestMessageRcvTimeStamp = recvTimestamp; - - gateway.sessions.set(sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.InitializationRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferInitializationRequest`, - ); - } - - if (!gateway.verifySignature(request, request.sourceGatewayPubkey)) { - throw new Error( - `${fnTag}, TransferInitializationRequest message signature verification failed`, - ); - } - - if (!gateway.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { - throw new Error( - `${fnTag}, source gateway dlt system is not supported by this gateway`, - ); - } - - const expiryDate: string = - request.payloadProfile.assetProfile.expirationDate; - const isDataExpired: boolean = new Date() >= new Date(expiryDate); - if (isDataExpired) { - throw new Error(`${fnTag}, asset has expired`); - } - - sessionData.version = request.version; - sessionData.maxRetries = request.maxRetries; - sessionData.maxTimeout = request.maxTimeout; - - sessionData.allowedSourceBackupGateways = request.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = gateway.backupGatewaysAllowed; - - sessionData.sourceBasePath = request.sourceBasePath; - sessionData.recipientBasePath = request.recipientBasePath; - sessionData.lastSequenceNumber = request.sequenceNumber; - sessionData.loggingProfile = request.loggingProfile; - sessionData.accessControlProfile = request.accessControlProfile; - sessionData.payloadProfile = request.payloadProfile; - sessionData.applicationProfile = request.applicationProfile; - sessionData.assetProfile = request.payloadProfile.assetProfile; - sessionData.sourceGatewayPubkey = request.sourceGatewayPubkey; - sessionData.sourceGatewayDltSystem = request.sourceGatewayDltSystem; - sessionData.recipientGatewayPubkey = request.recipientGatewayPubkey; - sessionData.recipientGatewayDltSystem = request.recipientGatewayDltSystem; - sessionData.rollbackActionsPerformed = []; - sessionData.rollbackProofs = []; - sessionData.lastMessageReceivedTimestamp = new Date().toString(); - sessionData.recipientLedgerAssetID = request.recipientLedgerAssetID; - sessionData.sourceLedgerAssetID = request.sourceLedgerAssetID; - - sessionData.initializationRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureInitializationRequestMessage = request.signature; - - sessionData.initializationRequestMessageProcessedTimeStamp = - Date.now().toString(); - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - this.log.info(`TransferInitializationRequest passed all checks.`); - } - - async sendTransferCommenceResponse( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendTransferCommenceResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.transferCommenceMessageRequestHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const transferCommenceResponse: TransferCommenceV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashCommenceRequest: sessionData.transferCommenceMessageRequestHash, - // serverTransferNumber?? - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(transferCommenceResponse)), - ); - - sessionData.transferCommenceMessageResponseHash = SHA256( - JSON.stringify(transferCommenceResponse), - ).toString(); - - sessionData.serverSignatureTransferCommenceResponseMessage = - transferCommenceResponse.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending TransferCommenceResponse...`); - - if (!remote) { - return transferCommenceResponse; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase2TransferCommenceResponseV1(transferCommenceResponse), - "TransferCommenceResponse", - ); - } - - async checkValidtransferCommenceRequest( - request: TransferCommenceV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidtransferCommenceRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.TransferCommenceRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceRequest`, - ); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, TransferCommenceRequest sequence number incorrect`, - ); - } - - if ( - sessionData.initializationResponseMessageHash != request.hashPrevMessage - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest clientIdentity public key does not match the one that was sent`, - ); - } - - const assetProfileHash = SHA256( - JSON.stringify(sessionData.assetProfile), - ).toString(); - if (assetProfileHash !== request.hashAssetProfile) { - throw new Error(`${fnTag}, assetProfile hash not match`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, TransferCommenceRequest message signature verification failed`, - ); - } - - sessionData.transferCommenceMessageRequestHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureTransferCommenceRequestMessage = - request.signature; - - sessionData.originatorPubkey = request.originatorPubkey; - sessionData.beneficiaryPubkey = request.beneficiaryPubkey; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "commence", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 4; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`TransferCommenceRequest passed all checks.`); - } - - async sendLockEvidenceResponse( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendLockEvidenceResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.lockEvidenceRequestMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const lockEvidenceResponseMessage: LockEvidenceV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashLockEvidenceRequest: sessionData.lockEvidenceRequestMessageHash, - // server transfer number - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - lockEvidenceResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( - await gateway.sign(JSON.stringify(lockEvidenceResponseMessage)), - ); - - sessionData.lockEvidenceResponseMessageHash = SHA256( - JSON.stringify(lockEvidenceResponseMessage), - ).toString(); - - sessionData.serverSignatureLockEvidenceResponseMessage = - lockEvidenceResponseMessage.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending LockEvidenceResponse...`); - - if (!remote) { - return lockEvidenceResponseMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase2LockEvidenceResponseV1(lockEvidenceResponseMessage), - "LockEvidenceResponse", - ); - } - - async checkValidLockEvidenceRequest( - request: LockEvidenceV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidLockEvidenceRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.LockEvidenceRequest) { - throw new Error(`${fnTag}, wrong message type for LockEvidenceRequest`); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, LockEvidenceRequestMessage sequence number incorrect`, - ); - } - - if ( - sessionData.transferCommenceMessageResponseHash != - request.hashCommenceAckRequest - ) { - throw new Error( - `${fnTag}, previous message hash does not match the one that was sent`, - ); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, LockEvidenceRequest clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - request.lockEvidenceClaim == undefined || - new Date() > new Date(request.lockEvidenceExpiration) - ) { - throw new Error(`${fnTag}, invalid or expired lock evidence claim`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, LockEvidenceRequest message signature verification failed`, - ); - } - - const claimHash = SHA256(request.lockEvidenceClaim).toString(); - const retrievedClaim = await gateway.getLogFromRemote( - PluginSATPGateway.getSatpLogKey(sessionID, "proof", "lock"), - ); - - if (claimHash != retrievedClaim.hash) { - throw new Error( - `${fnTag}, LockEvidence Claim hash does not match the one stored in IPFS`, - ); - } - - if ( - !gateway.verifySignature(retrievedClaim, request.clientIdentityPubkey) - ) { - throw new Error( - `${fnTag}, LockEvidence Claim message signature verification failed`, - ); - } - - sessionData.lockEvidenceRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureLockEvidenceRequestMessage = request.signature; - - sessionData.lockEvidenceClaim = request.lockEvidenceClaim; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "lock", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 6; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`LockEvidenceRequest passed all checks.`); - } - - async sendCommitPreparationResponse( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitPrepareResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitPrepareRequestMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const commitPreparationResponseMessage: CommitPreparationV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - hashCommitPrep: sessionData.commitPrepareRequestMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - commitPreparationResponseMessage.signature = - PluginSATPGateway.bufArray2HexStr( - await gateway.sign(JSON.stringify(commitPreparationResponseMessage)), - ); - - sessionData.commitPrepareResponseMessageHash = SHA256( - JSON.stringify(commitPreparationResponseMessage), - ).toString(); - - sessionData.serverSignatureCommitPreparationResponseMessage = - commitPreparationResponseMessage.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - this.log.info(`${fnTag}, sending CommitPreparationResponse...`); - - if (!remote) { - return commitPreparationResponseMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase3CommitPreparationResponseV1(commitPreparationResponseMessage), - "CommitPreparationResponse", - ); - } - - async checkValidCommitPreparationRequest( - request: CommitPreparationV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitPrepareRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - // We need to check somewhere if this phase is completed within the asset-lock duration. - - if (request.messageType != SatpMessageType.CommitPreparationRequest) { - throw new Error( - `${fnTag}, wrong message type for CommitPreparationRequest`, - ); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, CommitPreparationRequest sequence number incorrect`, - ); - } - - if ( - sessionData.lockEvidenceResponseMessageHash != request.hashLockEvidenceAck - ) { - throw new Error(`${fnTag}, previous message hash does not match`); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitPreparationRequest clientIdentity public key does not match the one that was sent`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, CommitPreparationRequest message signature verification failed`, - ); - } - - sessionData.commitPrepareRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureCommitPreparationRequestMessage = - request.signature; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "prepare", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 8; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitPreparationRequest passed all checks.`); - } - - async sendCommitFinalResponse( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, - ): Promise { - const fnTag = `${gateway.className}#sendCommitFinalResponse()`; - - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.sourceGatewayPubkey == undefined || - sessionData.recipientGatewayPubkey == undefined || - sessionData.commitAcknowledgementClaim == undefined || - sessionData.commitFinalRequestMessageHash == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const commitFinalResponseMessage: CommitFinalV1Response = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalResponse, - clientIdentityPubkey: sessionData.sourceGatewayPubkey, - serverIdentityPubkey: sessionData.recipientGatewayPubkey, - commitAcknowledgementClaim: sessionData.commitAcknowledgementClaim, - hashCommitFinal: sessionData.commitFinalRequestMessageHash, - signature: "", - sequenceNumber: ++sessionData.lastSequenceNumber, - }; - - commitFinalResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( - await gateway.sign(JSON.stringify(commitFinalResponseMessage)), - ); - - sessionData.commitFinalResponseMessageHash = SHA256( - JSON.stringify(commitFinalResponseMessage), - ).toString(); - - sessionData.serverSignatureCommitFinalResponseMessage = - commitFinalResponseMessage.signature; - - await gateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "final", - data: JSON.stringify(sessionData), - }); - - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`${fnTag}, sending CommitFinalResponse...`); - - if (!remote) { - return commitFinalResponseMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - sessionData.sourceBasePath, - ).phase3CommitFinalResponseV1(commitFinalResponseMessage), - "CommitFinalResponse", - ); - } - - async checkValidCommitFinalRequest( - request: CommitFinalV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidCommitFinalRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.id == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "final", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.CommitFinalRequest) { - throw new Error(`${fnTag}, wrong message type for CommitFinalRequest`); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error(`${fnTag}, CommitFinalRequest sequence number incorrect`); - } - - if (request.commitFinalClaim == undefined) { - throw new Error(`${fnTag}, claim presented by client is invalid`); - } - - if (sessionData.recipientGatewayPubkey != request.serverIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (sessionData.sourceGatewayPubkey != request.clientIdentityPubkey) { - throw new Error( - `${fnTag}, CommitFinalRequest clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - sessionData.commitPrepareResponseMessageHash != - request.hashCommitPrepareAck - ) { - throw new Error(`${fnTag}, previous message hash does not match`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, CommitFinalRequest message signature verification failed`, - ); - } - - // We need to check somewhere if this phase is completed within the asset-lock duration. - const claimHash = SHA256(request.commitFinalClaim).toString(); - - const retrievedClaim = await gateway.getLogFromRemote( - PluginSATPGateway.getSatpLogKey(sessionID, "proof", "delete"), - ); - - if (claimHash != retrievedClaim.hash) { - throw new Error( - `${fnTag}, Commit Final Claim hash does not match the one stored in IPFS`, - ); - } - - if ( - !gateway.verifySignature(retrievedClaim, request.clientIdentityPubkey) - ) { - throw new Error( - `${fnTag}, Commit Final Claim signature verification failed`, - ); - } - - sessionData.commitFinalClaim = request.commitFinalClaim; - - sessionData.commitFinalRequestMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureCommitFinalRequestMessage = request.signature; - - gateway.sessions.set(request.sessionID, sessionData); - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "final", - data: JSON.stringify(sessionData), - }); - - sessionData.step = 10; - gateway.sessions.set(sessionID, sessionData); - - this.log.info(`CommitFinalRequest passed all checks.`); - } - - async checkValidTransferCompleteRequest( - request: TransferCompleteV1Request, - gateway: PluginSATPGateway, - ): Promise { - const fnTag = `${gateway.className}#checkValidTransferCompleteRequest()`; - - const sessionID = request.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error( - `${fnTag}, session Id does not correspond to any open session`, - ); - } - - await gateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "complete", - data: JSON.stringify(sessionData), - }); - - if (request.messageType != SatpMessageType.TransferCompleteRequest) { - throw new Error( - `${fnTag}, wrong message type for TransferCompleteRequest`, - ); - } - - if (request.sequenceNumber != sessionData.lastSequenceNumber + 1) { - throw new Error( - `${fnTag}, TransferCompleteRequest sequence number incorrect`, - ); - } - - if ( - request.hashCommitFinalAck != sessionData.commitFinalResponseMessageHash - ) { - throw new Error(`${fnTag}, previous message hash not match`); - } - - if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { - throw new Error( - `${fnTag}, TransferCompleteRequest message signature verification failed`, - ); - } - - sessionData.transferCompleteMessageHash = SHA256( - JSON.stringify(request), - ).toString(); - - sessionData.clientSignatureTransferCompleteMessage = request.signature; - - gateway.sessions.set(request.sessionID, sessionData); - - await gateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "complete", - data: JSON.stringify(sessionData), - }); - - this.log.info(`TransferCompleteRequest passed all checks.`); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts deleted file mode 100644 index b362a244b9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-besu-satp-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IBesuSATPGatewayConstructorOptions, - BesuSATPGateway, -} from "../core/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/factory/plugin-factory-fabric-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-fabric-satp-gateway.ts deleted file mode 100644 index 1c4c48a657..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-fabric-satp-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IFabricSATPGatewayConstructorOptions, - FabricSATPGateway, -} from "../core/fabric-satp-gateway"; - -export class PluginFactoryFabricSATPGateway extends PluginFactory< - FabricSATPGateway, - IFabricSATPGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IFabricSATPGatewayConstructorOptions, - ): Promise { - return new FabricSATPGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts deleted file mode 100644 index 9894b9b487..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-gateway.ts +++ /dev/null @@ -1,1201 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import type { Server } from "http"; -import type { Server as SecureServer } from "https"; -import { Optional } from "typescript-optional"; -import type { Express } from "express"; -import { v4 as uuidV4 } from "uuid"; -import { Knex } from "knex"; -import OAS from "../json/openapi-gateway-bundled.json"; -import { - Secp256k1Keys, - Logger, - Checks, - LoggerProvider, - JsObjectSigner, - IJsObjectSignerOptions, -} from "@hyperledger/cactus-common"; -import { - ICactusPlugin, - IPluginWebService, - IWebServiceEndpoint, - Configuration, -} from "@hyperledger/cactus-core-api"; -import { - TransferInitializationV1Response, - DefaultApi as SatpApi, - ClientV1Request, - TransferCommenceV1Request, - TransferCommenceV1Response, - LockEvidenceV1Request, - LockEvidenceV1Response, - CommitPreparationV1Request, - CommitFinalV1Request, - CommitPreparationV1Response, - CommitFinalV1Response, - TransferCompleteV1Request, - TransferInitializationV1Request, - RecoverV1Message, - RecoverUpdateV1Message, - RecoverUpdateAckV1Message, - RollbackV1Message, - RollbackAckV1Message, - SessionData, -} from "./generated/openapi/typescript-axios"; -import { CommitFinalRequestEndpointV1 } from "./web-services/server-side/commit-final-request-endpoint"; -import { CommitFinalResponseEndpointV1 } from "./web-services/client-side/commit-final-response-endpoint"; -import { CommitPreparationResponseEndpointV1 } from "./web-services/client-side/commit-prepare-response-endpoint"; -import { LockEvidenceResponseEndpointV1 } from "./web-services/client-side/lock-evidence-response-endpoint"; -import { TransferCommenceResponseEndpointV1 } from "./web-services/client-side/transfer-commence-response-endpoint"; -import { TransferInitiationResponseEndpointV1 } from "./web-services/client-side/transfer-initiation-response-endpoint"; -import { LockEvidenceRequestEndpointV1 } from "./web-services/server-side/lock-evidence-request-endpoint"; -import { TransferCommenceRequestEndpointV1 } from "./web-services/server-side/transfer-commence-request-endpoint"; -import { TransferCompleteRequestEndpointV1 } from "./web-services/server-side/transfer-complete-request-endpoint"; -import { TransferInitiationRequestEndpointV1 } from "./web-services/server-side/transfer-initiation-request-endpoint"; -import { CommitPreparationRequestEndpointV1 } from "./web-services/server-side/commite-prepare-request-endpoint"; -import { randomInt } from "crypto"; -import { ClientGatewayHelper } from "./core/client-helper"; -import { ServerGatewayHelper } from "./core/server-helper"; -import { - checkValidRecoverMessage, - sendRecoverMessage, -} from "./recovery/recover"; -import { - checkValidRecoverUpdateMessage, - sendRecoverUpdateMessage, -} from "./recovery/recover-update"; -import { - checkValidRecoverUpdateAckMessage, - sendRecoverUpdateAckMessage, -} from "./recovery/recover-update-ack"; -import { - checkValidRecoverSuccessMessage, - sendRecoverSuccessMessage, -} from "./recovery/recover-success"; -import { SHA256 } from "crypto-js"; -import { RecoverMessageEndpointV1 } from "./web-services/recovery/recover-message-endpoint"; -import { RecoverUpdateMessageEndpointV1 } from "./web-services/recovery/recover-update-message-endpoint"; -import { RecoverUpdateAckMessageEndpointV1 } from "./web-services/recovery/recover-update-ack-message-endpoint"; -import { RecoverSuccessMessageEndpointV1 } from "./web-services/recovery/recover-success-message-endpoint"; -import { RollbackMessageEndpointV1 } from "./web-services/recovery/rollback-message-endpoint"; -import { - checkValidRollbackMessage, - sendRollbackMessage, -} from "./recovery/rollback"; -import { AxiosResponse } from "axios"; -import { - checkValidRollbackAckMessage, - sendRollbackAckMessage, -} from "./recovery/rollback-ack"; -import { ClientRequestEndpointV1 } from "./web-services/client-side/client-request-endpoint"; -import { RollbackAckMessageEndpointV1 } from "./web-services/recovery/rollback-ack-message-endpoint"; -import { KnexLocalLogRepository as LocalLogRepository } from "./repository/knex-local-log-repository"; -import { IPFSRemoteLogRepository } from "./repository/ipfs-remote-log-repository"; -import { KnexRemoteLogRepository } from "./repository/knex-remote-log-repository"; -import { IRemoteLogRepository } from "./repository/interfaces/repository"; - -export enum SatpMessageType { - InitializationRequest = "urn:ietf:satp:msgtype:init-transfer-msg", - InitializationResponse = "urn:ietf:satp:msgtype:init-transfer-ack-msg", - TransferCommenceRequest = "urn:ietf:satp:msgtype:transfer-commence-msg", - TransferCommenceResponse = "urn:ietf:satp:msgtype:transfer-commence-ack-msg", - LockEvidenceRequest = "urn:ietf:satp:msgtype:lock-evidence-req-msg", - LockEvidenceResponse = "urn:ietf:satp:msgtype:lock-evidence-ack-msg", - CommitPreparationRequest = "urn:ietf:satp:msgtype:commit-prepare-msg", - CommitPreparationResponse = "urn:ietf:satp:msgtype:commit-ack-msg", - CommitFinalRequest = "urn:ietf:satp:msgtype:commit-final-msg", - CommitFinalResponse = "urn:ietf:satp:msgtype:commit-final-ack-msg", - TransferCompleteRequest = "urn:ietf:satp:msgtype:commit-transfer-complete-msg", -} - -import { LocalLog, RemoteLog } from "./core/types"; -export interface IPluginSatpGatewayConstructorOptions { - name: string; - dltIDs: string[]; - instanceId: string; - keyPair?: IKeyPair; - backupGatewaysAllowed?: string[]; - clientHelper: ClientGatewayHelper; - serverHelper: ServerGatewayHelper; - knexLocalConfig?: Knex.Config; - - // below are the two options to store remote logs. Either using a DB simulating a remote DB or using - // IPFS which ensures a different notion of accountability. If both are set, the IPFS will be used - knexRemoteConfig?: Knex.Config; - ipfsPath?: string; -} -export interface IKeyPair { - publicKey: Uint8Array; - privateKey: Uint8Array; -} -// todo implement factory -export abstract class PluginSATPGateway - implements ICactusPlugin, IPluginWebService -{ - public static readonly CLASS_NAME = "SATPGateway"; - private readonly instanceId: string; - private readonly _log: Logger; - - private _sessions: Map; - private _pubKey: string; - private _privKey: string; - - public localRepository?: LocalLogRepository; - public remoteRepository?: IRemoteLogRepository; - - private endpoints: IWebServiceEndpoint[] | undefined; - - private _supportedDltIDs: string[]; - private _backupGatewaysAllowed: string[]; - - private objectSigner: JsObjectSigner; - - private _clientHelper: ClientGatewayHelper; - private _serverHelper: ServerGatewayHelper; - - public constructor(options: IPluginSatpGatewayConstructorOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.instanceId, `${fnTag} arg options.instanceId`); - Checks.nonBlankString(options.instanceId, `${fnTag} options.instanceId`); - - const level = "INFO"; - const label = this.className; - this._log = LoggerProvider.getOrCreate({ level, label }); - - this.instanceId = options.instanceId; - - this._supportedDltIDs = options.dltIDs; - this._sessions = new Map(); - - this._backupGatewaysAllowed = options.backupGatewaysAllowed || []; - const keyPairs = options.keyPair - ? options.keyPair - : Secp256k1Keys.generateKeyPairsBuffer(); - this._pubKey = PluginSATPGateway.bufArray2HexStr(keyPairs.publicKey); - this._privKey = PluginSATPGateway.bufArray2HexStr(keyPairs.privateKey); - - const objectSignerOptions: IJsObjectSignerOptions = { - privateKey: this._privKey, - logLevel: "debug", - }; - this.objectSigner = new JsObjectSigner(objectSignerOptions); - - this._clientHelper = options.clientHelper; - this._serverHelper = options.serverHelper; - - this.remoteRepository = new KnexRemoteLogRepository( - options.knexRemoteConfig, - ); - if (options.ipfsPath != undefined) - this.remoteRepository = new IPFSRemoteLogRepository(options.ipfsPath); - - this.localRepository = new LocalLogRepository(options.knexLocalConfig); - } - - public get className(): string { - return PluginSATPGateway.CLASS_NAME; - } - - public getOpenApiSpec(): unknown { - return OAS; - } - - /*public getAspect(): PluginAspect { - return PluginAspect.WEB_SERVICE; - }*/ - - public async onPluginInit(): Promise { - return; - } - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - // Server endpoints - const transferInitiationRequestEndpoint = - new TransferInitiationRequestEndpointV1({ - gateway: this, - }); - const transferCommenceRequestEndpoint = - new TransferCommenceRequestEndpointV1({ - gateway: this, - }); - const lockEvidenceRequestEndpoint = new LockEvidenceRequestEndpointV1({ - gateway: this, - }); - const commitPreparationRequestEndpoint = - new CommitPreparationRequestEndpointV1({ - gateway: this, - }); - const commitFinalRequestEndpoint = new CommitFinalRequestEndpointV1({ - gateway: this, - }); - const transferCompleteRequestEndpoint = - new TransferCompleteRequestEndpointV1({ - gateway: this, - }); - - // Client endpoints - const clientRequestEndpoint = new ClientRequestEndpointV1({ - gateway: this, - }); - const transferInitiationResponseEndpoint = - new TransferInitiationResponseEndpointV1({ - gateway: this, - }); - const transferCommenceResponseEndpoint = - new TransferCommenceResponseEndpointV1({ - gateway: this, - }); - const lockEvidenceResponseEndpoint = new LockEvidenceResponseEndpointV1({ - gateway: this, - }); - const commitPreparationResponseEndpoint = - new CommitPreparationResponseEndpointV1({ - gateway: this, - }); - const commitFinalResponseEndpoint = new CommitFinalResponseEndpointV1({ - gateway: this, - }); - - // Recovery endpoints - const recoverEndpoint = new RecoverMessageEndpointV1({ - gateway: this, - }); - - const recoverUpdateEndpoint = new RecoverUpdateMessageEndpointV1({ - gateway: this, - }); - - const recoverUpdateAckEndpoint = new RecoverUpdateAckMessageEndpointV1({ - gateway: this, - }); - - const recoverSuccessEndpoint = new RecoverSuccessMessageEndpointV1({ - gateway: this, - }); - - const rollbackEndpoint = new RollbackMessageEndpointV1({ - gateway: this, - }); - - const rollbackAckEndpoint = new RollbackAckMessageEndpointV1({ - gateway: this, - }); - - this.endpoints = [ - transferInitiationRequestEndpoint, - transferCommenceRequestEndpoint, - lockEvidenceRequestEndpoint, - commitPreparationRequestEndpoint, - commitFinalRequestEndpoint, - transferCompleteRequestEndpoint, - clientRequestEndpoint, - transferInitiationResponseEndpoint, - transferCommenceResponseEndpoint, - lockEvidenceResponseEndpoint, - commitPreparationResponseEndpoint, - commitFinalResponseEndpoint, - recoverEndpoint, - recoverUpdateEndpoint, - recoverUpdateAckEndpoint, - recoverSuccessEndpoint, - rollbackEndpoint, - rollbackAckEndpoint, - ]; - return this.endpoints; - } - - public getHttpServer(): Optional { - return Optional.empty(); - } - - public async shutdown(): Promise { - this.log.info(`Shutting down ${this.className}...`); - } - - public getInstanceId(): string { - return this.instanceId; - } - - public getPackageName(): string { - return "@hyperledger/cactus-odap-gateway-business-logic-plugin"; - } - - public get sessions(): Map { - return this._sessions; - } - - public get privKey(): string { - return this._privKey; - } - - public get pubKey(): string { - return this._pubKey; - } - - public get supportedDltIDs(): string[] { - return this._supportedDltIDs; - } - - public get backupGatewaysAllowed(): string[] { - return this._backupGatewaysAllowed; - } - - public get clientHelper(): ClientGatewayHelper { - return this._clientHelper; - } - - public get serverHelper(): ServerGatewayHelper { - return this._serverHelper; - } - - public get log(): Logger { - return this._log; - } - - isClientGateway(sessionID: string): boolean { - const fnTag = `${this.className}#isClientGateway()`; - - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - return sessionData.sourceGatewayPubkey == this.pubKey; - } - - sign(msg: string): Uint8Array { - return this.objectSigner.sign(msg); - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - verifySignature(obj: any, pubKey: string): boolean { - const sourceSignature = new Uint8Array(Buffer.from(obj.signature, "hex")); - const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); - - const signature = obj.signature; - obj.signature = ""; - if ( - !this.objectSigner.verify( - JSON.stringify(obj), - sourceSignature, - sourcePubkey, - ) - ) { - return false; - } - - obj.signature = signature; - return true; - } - - static bufArray2HexStr(array: Uint8Array): string { - return Buffer.from(array).toString("hex"); - } - - static getSatpLogKey( - sessionID: string, - type: string, - operation: string, - ): string { - return `${sessionID}-${type}-${operation}`; - } - - async recoverOpenSessions(remote: boolean) { - const fnTag = `${this.className}#recoverOpenSessions()`; - - this.log.info(`${fnTag}, recovering open sessions...`); - - if (this.localRepository?.database == undefined) { - throw new Error(`${fnTag}, database is undefined`); - } - - const logs: LocalLog[] = await this.localRepository.readLogsNotProofs(); - - for (const log of logs) { - const sessionID = log.sessionID; - this.log.info(`${fnTag}, recovering session ${sessionID}...`); - - if (log == undefined || log.data == undefined) { - throw new Error(`${fnTag}, invalid log}`); - } - - const sessionData: SessionData = JSON.parse(log.data); - - sessionData.lastLogEntryTimestamp = log.timestamp; - - let amIBackup = false; - if ( - this.pubKey != sessionData.sourceGatewayPubkey && - this.pubKey != sessionData.recipientGatewayPubkey - ) { - // this is a backup gateway -> for now we assume backup gateways only on the client side - sessionData.sourceGatewayPubkey = this.pubKey; - amIBackup = true; - } - - this.sessions.set(sessionID, sessionData); - if (remote) await sendRecoverMessage(sessionID, this, amIBackup, true); - } - } - - async storeInDatabase(LocalLog: LocalLog) { - const fnTag = `${this.className}#storeInDatabase()`; - this.log.info(`${fnTag}, Storing locally log: ${JSON.stringify(LocalLog)}`); - - await this.localRepository?.create(LocalLog); - } - - async storeRemoteLog(key: string, hash: string) { - const fnTag = `${this.className}#storeRemoteLog()`; - - const remoteLog: RemoteLog = { - key: key, - hash: hash, - signature: "", - signerPubKey: this.pubKey, - }; - - remoteLog.signature = PluginSATPGateway.bufArray2HexStr( - this.sign(JSON.stringify(remoteLog)), - ); - - this.log.info(`${fnTag}, Storing remote log: ${JSON.stringify(remoteLog)}`); - - const response = await this.remoteRepository?.create(remoteLog); - - if (response.status < 200 && response.status > 299) { - throw new Error( - `${fnTag}, got response ${response.status} when logging to remote`, - ); - } - } - - async storeLog(localLog: LocalLog): Promise { - localLog.key = PluginSATPGateway.getSatpLogKey( - localLog.sessionID, - localLog.type, - localLog.operation, - ); - localLog.timestamp = Date.now().toString(); - - await this.storeInDatabase(localLog); - - // Keep the order consistent with the order of the fields in the table - // so that the hash matches when retrieving from the database - const hash = SHA256( - JSON.stringify(localLog, [ - "sessionID", - "type", - "key", - "operation", - "timestamp", - "data", - ]), - ).toString(); - - await this.storeRemoteLog(localLog.key, hash); - } - - async storeProof(localLog: LocalLog): Promise { - if (localLog.data == undefined) return; - - localLog.key = PluginSATPGateway.getSatpLogKey( - localLog.sessionID, - localLog.type, - localLog.operation, - ); - localLog.timestamp = Date.now().toString(); - - await this.storeInDatabase(localLog); - - const hash = SHA256(localLog.data).toString(); - - await this.storeRemoteLog(localLog.key, hash); - } - - async getLogFromDatabase(logKey: string): Promise { - const fnTag = `${this.className}#getLogFromDatabase()`; - this.log.info(`${fnTag}, retrieving log with key ${logKey}`); - - return await this.localRepository?.readById(logKey).then((row) => { - this.log.info(`${fnTag}, retrieved log ${JSON.stringify(row)}`); - return row; - }); - } - - async getLastLogFromDatabase( - sessionID: string, - ): Promise { - const fnTag = `${this.className}#getLastLog()`; - this.log.info(`${fnTag}, retrieving last log from sessionID ${sessionID}`); - - return await this.localRepository?.readLastestLog(sessionID).then((row) => { - this.log.info(`${fnTag}, retrieved log ${JSON.stringify(row)}`); - return row; - }); - } - - async getLogsMoreRecentThanTimestamp(timestamp: string): Promise { - const fnTag = `${this.className}#getLogsMoreRecentThanTimestamp()`; - this.log.info(`${fnTag}, retrieving logs more recent than ${timestamp}`); - - const logs: LocalLog[] | undefined = - await this.localRepository?.readLogsMoreRecentThanTimestamp(timestamp); - - if (logs == undefined) { - throw new Error(`${fnTag}, error when retrieving log from database`); - } - - this.log.info(`${fnTag}, there are ${logs.length} more recent logs`); - - return logs; - } - - async getLogFromRemote(logKey: string): Promise { - const fnTag = `${this.className}#getSatpLogFromIPFS()`; - this.log.info(`Retrieving log with key: <${logKey}>`); - - try { - const log = await this.remoteRepository?.readById(logKey); - - if (log == undefined || log?.signature == undefined) { - throw new Error(`${fnTag}, the log or its signature is not defined`); - } - - if (!this.verifySignature(log, log.signerPubKey)) { - throw new Error(`${fnTag}, received log with invalid signature`); - } - - return log; - } catch { - throw new Error(`${fnTag}, error reading from remote log`); - } - } - - static getSatpAPI(basePath: string): SatpApi { - const satpServerApiConfig = new Configuration({ - basePath: basePath, - }); - - return new SatpApi(satpServerApiConfig); - } - - async deleteDatabaseEntries(sessionID: string) { - this.log.info( - `deleting logs from database associated with sessionID: ${sessionID}`, - ); - - await this.localRepository?.deleteBySessionId(sessionID); - } - - async resumeSatpSession(sessionID: string, remote: boolean) { - const fnTag = `${this.className}#continueSatpSession()`; - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.step == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if the other gateway made the rollback, we will do it as well - if (sessionData.rollback) { - await this.rollback(sessionID); - await sendRollbackAckMessage(sessionID, this, true); - return; - } - - this.log.info( - `${fnTag}, recovering session ${sessionID} that was in step ${sessionData.step}`, - ); - - // If step is even then the last log was inserted by the server - // so we need to increase the step - if (this.isClientGateway(sessionID) && sessionData.step % 2 == 0) { - sessionData.step++; - } - - this.sessions.set(sessionID, sessionData); - - switch (sessionData.step) { - case 1: - return await this.clientHelper.sendTransferInitializationRequest( - sessionID, - this, - remote, - ); - - case 2: - return await this.serverHelper.sendTransferInitializationResponse( - sessionID, - this, - remote, - ); - - case 3: - return await this.clientHelper.sendTransferCommenceRequest( - sessionID, - this, - remote, - ); - - case 4: - return await this.serverHelper.sendTransferCommenceResponse( - sessionID, - this, - remote, - ); - - case 5: - return await this.clientHelper.sendLockEvidenceRequest( - sessionID, - this, - remote, - ); - - case 6: - return await this.serverHelper.sendLockEvidenceResponse( - sessionID, - this, - remote, - ); - - case 7: - return await this.clientHelper.sendCommitPreparationRequest( - sessionID, - this, - remote, - ); - - case 8: - return await this.serverHelper.sendCommitPreparationResponse( - sessionID, - this, - remote, - ); - - case 9: - return await this.clientHelper.sendCommitFinalRequest( - sessionID, - this, - remote, - ); - - case 10: - return await this.serverHelper.sendCommitFinalResponse( - sessionID, - this, - remote, - ); - - case 11: - return await this.clientHelper.sendTransferCompleteRequest( - sessionID, - this, - remote, - ); - - default: - this.sessions.delete(sessionID); - throw new Error( - `${fnTag}, invalid session data step. A new session should be initiated by the client gateway.`, - ); - } - } - - private updateLastMessageReceivedTimestamp(sessionID: string) { - const fnTag = `${this.className}#updateLastMessageReceivedTimestamp()`; - const sessionData = this.sessions.get(sessionID); - - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - sessionData.lastMessageReceivedTimestamp = new Date().toString(); - this.sessions.set(sessionID, sessionData); - } - - /********************************/ - /* Server-side */ - /********************************/ - - async onTransferInitiationRequestReceived( - request: TransferInitializationV1Request, - ): Promise { - const fnTag = `${this.className}#onTransferInitiationRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received TransferInitializationRequest: ${JSON.stringify( - request, - )}`, - ); - - await this.serverHelper.checkValidInitializationRequest(request, this); - await this.serverHelper.sendTransferInitializationResponse( - request.sessionID, - this, - true, - ); - } - - async onTransferCommenceRequestReceived( - request: TransferCommenceV1Request, - ): Promise { - const fnTag = `${this.className}#onTransferCommenceRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received TransferCommenceRequest: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidtransferCommenceRequest(request, this); - await this.serverHelper.sendTransferCommenceResponse( - request.sessionID, - this, - true, - ); - } - - async onLockEvidenceRequestReceived( - request: LockEvidenceV1Request, - ): Promise { - const fnTag = `${this.className}#onLockEvidenceRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received LockEvidenceRequest: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidLockEvidenceRequest(request, this); - await this.serverHelper.sendLockEvidenceResponse( - request.sessionID, - this, - true, - ); - } - - async onCommitPrepareRequestReceived( - request: CommitPreparationV1Request, - ): Promise { - const fnTag = `${this.className}#onCommitPrepareRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received CommitPrepareRequest: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidCommitPreparationRequest(request, this); - await this.serverHelper.sendCommitPreparationResponse( - request.sessionID, - this, - true, - ); - } - - async onCommitFinalRequestReceived( - request: CommitFinalV1Request, - ): Promise { - const fnTag = `${this.className}#onCommitFinalRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received CommitFinalRequest: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidCommitFinalRequest(request, this); - await this.createAsset(request.sessionID); - await this.serverHelper.sendCommitFinalResponse( - request.sessionID, - this, - true, - ); - } - - async onTransferCompleteRequestReceived( - request: TransferCompleteV1Request, - ): Promise { - const fnTag = `${this.className}#onTransferCompleteRequestReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `server gateway received TransferCompleteRequest: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.serverHelper.checkValidTransferCompleteRequest(request, this); - //this.deleteDatabaseEntries(request.sessionID); - } - - /********************************/ - /* Client-side */ - /********************************/ - - async onTransferInitiationResponseReceived( - request: TransferInitializationV1Response, - ): Promise { - const fnTag = `${this.className}#onTransferInitiationResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received TransferInitiationResponse: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidInitializationResponse(request, this); - await this.clientHelper.sendTransferCommenceRequest( - request.sessionID, - this, - true, - ); - } - - async onTransferCommenceResponseReceived( - request: TransferCommenceV1Response, - ): Promise { - const fnTag = `${this.className}#onTransferCommenceResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received TransferCommenceResponse: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidTransferCommenceResponse(request, this); - await this.lockAsset(request.sessionID); - await this.clientHelper.sendLockEvidenceRequest( - request.sessionID, - this, - true, - ); - } - - async onLockEvidenceResponseReceived( - request: LockEvidenceV1Response, - ): Promise { - const fnTag = `${this.className}#onLockEvidenceResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received LockEvidenceResponse: ${JSON.stringify( - request, - )}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidLockEvidenceResponse(request, this); - await this.clientHelper.sendCommitPreparationRequest( - request.sessionID, - this, - true, - ); - } - - async onCommitPrepareResponseReceived( - request: CommitPreparationV1Response, - ): Promise { - const fnTag = `${this.className}#onCommitPrepareResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidCommitPreparationResponse(request, this); - await this.deleteAsset(request.sessionID); - await this.clientHelper.sendCommitFinalRequest( - request.sessionID, - this, - true, - ); - } - - async onCommitFinalResponseReceived( - request: CommitFinalV1Response, - ): Promise { - const fnTag = `${this.className}#onCommitFinalResponseReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received CommitFinalResponse: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await this.clientHelper.checkValidCommitFinalResponse(request, this); - await this.clientHelper.sendTransferCompleteRequest( - request.sessionID, - this, - true, - ); - } - - /********************************/ - /* Recovery */ - /********************************/ - - async onRecoverMessageReceived(request: RecoverV1Message): Promise { - const fnTag = `${this.className}#onRecoverMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received Recover message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverMessage(request, this); - await sendRecoverUpdateMessage(request.sessionID, this, true); - } - - async onRecoverUpdateMessageReceived( - request: RecoverUpdateV1Message, - ): Promise { - const fnTag = `${this.className}#onRecoverUpdateMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received RecoverUpdate message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverUpdateMessage(request, this); - await sendRecoverUpdateAckMessage(request.sessionID, this, true); - } - - async onRecoverUpdateAckMessageReceived( - request: RecoverUpdateAckV1Message, - ): Promise { - const fnTag = `${this.className}#onRecoverUpdateAckMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received RecoverUpdateAck message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverUpdateAckMessage(request, this); - await sendRecoverSuccessMessage(request.sessionID, this, true); - } - - async onRecoverSuccessMessageReceived( - request: RecoverUpdateAckV1Message, - ): Promise { - const fnTag = `${this.className}#onRecoverSuccessMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received RecoverSuccess message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRecoverSuccessMessage(request, this); - await this.resumeSatpSession(request.sessionID, true); - } - - async onRollbackMessageReceived(request: RollbackV1Message): Promise { - const fnTag = `${this.className}#onRollbackMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received Rollback message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRollbackMessage(request, this); - await this.rollback(request.sessionID); - await sendRollbackAckMessage(request.sessionID, this, true); - } - - async onRollbackAckMessageReceived( - request: RollbackAckV1Message, - ): Promise { - const fnTag = `${this.className}#onRollbackAckMessageReceived()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `gateway received Rollback Ack message: ${JSON.stringify(request)}`, - ); - - this.updateLastMessageReceivedTimestamp(request.sessionID); - await checkValidRollbackAckMessage(request, this); - //this.deleteDatabaseEntries(request.sessionID); - } - - async runSatp(request: ClientV1Request): Promise { - const fnTag = `${this.className}#runSatp()`; - this.log.info(`${fnTag}, start processing, time: ${Date.now()}`); - this.log.info( - `client gateway received ClientRequest: ${JSON.stringify(request)}`, - ); - - const sessionID = this.configureOdapSession(request); - - if (sessionID == undefined) { - throw new Error( - `${fnTag}, session id undefined after session configuration`, - ); - } - - await this.clientHelper.sendTransferInitializationRequest( - sessionID, - this, - true, - ); - } - - configureOdapSession(request: ClientV1Request) { - const sessionData: SessionData = {}; - - const sessionID = uuidV4(); - - sessionData.id = sessionID; - sessionData.step = 1; - sessionData.version = request.version; - sessionData.lastSequenceNumber = randomInt(4294967295); - - sessionData.sourceBasePath = request.clientGatewayConfiguration.apiHost; - sessionData.recipientBasePath = request.serverGatewayConfiguration.apiHost; - - sessionData.allowedSourceBackupGateways = this.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = []; - - sessionData.payloadProfile = request.payloadProfile; - sessionData.loggingProfile = request.loggingProfile; - sessionData.accessControlProfile = request.accessControlProfile; - sessionData.applicationProfile = request.applicationProfile; - sessionData.assetProfile = request.payloadProfile.assetProfile; - sessionData.originatorPubkey = request.originatorPubkey; - sessionData.beneficiaryPubkey = request.beneficiaryPubkey; - sessionData.sourceGatewayPubkey = this.pubKey; - sessionData.sourceGatewayDltSystem = request.sourceGatewayDltSystem; - sessionData.recipientGatewayPubkey = request.recipientGatewayPubkey; - sessionData.recipientGatewayDltSystem = request.recipientGatewayDltSystem; - sessionData.rollbackActionsPerformed = []; - sessionData.rollbackProofs = []; - sessionData.lastMessageReceivedTimestamp = Date.now().toString(); - - sessionData.sourceLedgerAssetID = request.sourceLedgerAssetID; - sessionData.recipientLedgerAssetID = request.recipientLedgerAssetID; - - sessionData.maxRetries = request.maxRetries; - sessionData.maxTimeout = request.maxTimeout; - - this.sessions.set(sessionID, sessionData); - - return sessionID; - } - - // we don't need a `lockAssetToRollback` method because we would never call - // that function in a rollback - abstract lockAsset(sessionID: string, assetID?: string): Promise; - - // we don't need a `unlockAssetToRollback` method because we only call this - // function to rollback, thus the implementation would be the same - abstract unlockAsset(sessionID: string, assetID?: string): Promise; - - abstract createAsset(sessionID: string, assetID?: string): Promise; - abstract createAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise; - abstract deleteAsset(sessionID: string, assetID?: string): Promise; - abstract deleteAssetToRollback( - sessionID: string, - assetID?: string, - ): Promise; - - async Revert(sessionID: string): Promise { - await this.rollback(sessionID); - await sendRollbackMessage(sessionID, this, true); - } - - abstract rollback(sessionID: string): Promise; - - async makeRequest( - sessionID: string, - request: Promise, - message: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ): Promise { - const fnTag = `${this.className}#makeRequest()`; - - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - let numberOfTries = 0; - let response = undefined; - - while (numberOfTries < sessionData.maxRetries) { - response = await request.catch(async (err) => { - if (err.response == undefined || err.response.status == 500) { - if (!message.match("Rollback")) { - await this.Revert(sessionID); - throw new Error(`${fnTag}, ${message} message failed. ${err}`); - } - } - this.log.info(`${fnTag}, ${message} message failed. Trying again...`); - numberOfTries++; - }); - - if (response != void 0) break; - } - - if (response != void 0 && response.status == 200) { - return; - } - - // When rolling back there is no problem of not receiving an answer - if (!message.match("Rollback")) { - this.log.info( - `${fnTag}, ${message} message was not sent. Initiating time...`, - ); - await new Promise((resolve) => - setTimeout(resolve, sessionData.maxTimeout), - ).then(async () => { - // we check if a message was received, otherwise we have a timeout and rollback - const sessionData = this.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.lastMessageReceivedTimestamp == undefined || - sessionData.maxTimeout == undefined - ) { - throw new Error( - `${fnTag}, session data is not correctly initialized`, - ); - } - - const now = new Date().getTime(); - const last = parseInt(sessionData.lastMessageReceivedTimestamp); - const differenceOfTime = now - last; - - if (differenceOfTime > sessionData.maxTimeout) { - this.log.info(`${fnTag}, no response received, rolling back`); - await this.Revert(sessionID); - throw new Error( - `${fnTag}, ${message} message failed. Timeout exceeded. Check connection with server gateway.`, - ); - } - - this.log.info(`${fnTag}, a response was received`); - return; - }); - } - - return response; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts index e55548a7dc..61baa1ec83 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts @@ -1,28 +1 @@ -export * from "./generated/openapi/typescript-axios/index"; - -export { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, - SatpMessageType, - IKeyPair, -} from "./plugin-satp-gateway"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryFabricSATPGateway } from "./factory/plugin-factory-fabric-satp-gateway"; -import { PluginFactoryBesuSATPGateway } from "./factory/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 "./core/server-helper"; -export { ClientGatewayHelper } from "./core/client-helper"; // TODO! export new gateway diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts deleted file mode 100644 index 0d01714677..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-success.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { RecoverSuccessV1Message } from "../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSATPGateway } from "../plugin-satp-gateway"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-success-helper", -}); - -export async function sendRecoverSuccessMessage( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverSuccessMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoverSuccessMessage: RecoverSuccessV1Message = { - sessionID: sessionID, - success: true, - signature: "", - }; - - const signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverSuccessMessage)), - ); - - recoverSuccessMessage.signature = signature; - - log.info(`${fnTag}, sending RecoverSuccess message...`); - - if (!remote) { - return recoverSuccessMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverV1Success(recoverSuccessMessage), - "RecoverSuccess", - ); -} - -export async function checkValidRecoverSuccessMessage( - response: RecoverSuccessV1Message, - gateway: PluginSATPGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverSuccessMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (!response.success) { - throw new Error(`${fnTag}, RecoverSuccess message is invalid`); - } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverUpdateAckMessage message signature verification failed`, - ); - } - - // storeSessionData(response, satp); - - log.info(`RecoverSuccessMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts deleted file mode 100644 index 911f5b8495..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update-ack.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { RecoverUpdateAckV1Message } from "../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSATPGateway } from "../plugin-satp-gateway"; -// import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-update-ack-helper", -}); - -export async function sendRecoverUpdateAckMessage( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverUpdateAckMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoverUpdateMessage: RecoverUpdateAckV1Message = { - sessionID: sessionID, - success: true, - changedEntriesHash: [], - signature: "", - }; - - const signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverUpdateMessage)), - ); - - recoverUpdateMessage.signature = signature; - - log.info(`${fnTag}, sending RecoverUpdateAck message...`); - - if (!remote) { - return recoverUpdateMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverUpdateAckV1Message(recoverUpdateMessage), - "RecoverUpdateAck", - ); -} - -export async function checkValidRecoverUpdateAckMessage( - response: RecoverUpdateAckV1Message, - gateway: PluginSATPGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverUpdateAckMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - // check if this is a valid recover update ack message - // check valid recovered logs - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverUpdateAckMessage message signature verification failed`, - ); - } - - // storeSessionData(response, satp); - - log.info(`RecoverUpdateAckMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts deleted file mode 100644 index b6a915ac55..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover-update.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { - LocalLog, - RecoverUpdateV1Message, -} from "../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSATPGateway } from "../plugin-satp-gateway"; -import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-update-helper", -}); - -export async function sendRecoverUpdateMessage( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverUpdateMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.lastLogEntryTimestamp == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoveredLogs: LocalLog[] = - await gateway.getLogsMoreRecentThanTimestamp( - sessionData.lastLogEntryTimestamp, - ); - - const recoverUpdateMessage: RecoverUpdateV1Message = { - sessionID: sessionID, - recoveredLogs: recoveredLogs, - signature: "", - }; - - const signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverUpdateMessage)), - ); - - recoverUpdateMessage.signature = signature; - - log.info(`${fnTag}, sending RecoverUpdate message...`); - - if (!remote) { - return recoverUpdateMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverUpdateV1Message(recoverUpdateMessage), - "RecoverUpdate", - ); -} - -export async function checkValidRecoverUpdateMessage( - response: RecoverUpdateV1Message, - gateway: PluginSATPGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverUpdateMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - // check if this is a valid recover update message - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverUpdateMessage message signature verification failed`, - ); - } - - // check logs from counter party gateway - const recoveredLogs = response.recoveredLogs; - let maxTimestamp = "0"; - - for (const recLog of recoveredLogs) { - if (recLog.key == undefined) { - throw new Error(`${fnTag}, the received log is not correctly defined`); - } - - log.info(`${fnTag}, received log: ${JSON.stringify(recLog)}`); - - const ipfsLog = await gateway.getLogFromRemote(recLog.key); - - const hash = SHA256(JSON.stringify(recLog)).toString(); - - if (ipfsLog.hash != hash) { - throw new Error( - `${fnTag}, RecoverUpdateMessage message has invalid recovered logs`, - ); - } - - if (recLog.data == undefined || recLog.timestamp == undefined) { - throw new Error( - `${fnTag}, RecoverUpdateMessage message is not correctly defined`, - ); - } - - if (parseInt(recLog.timestamp) > parseInt(maxTimestamp)) { - maxTimestamp = recLog.timestamp; - - const data = JSON.parse(recLog.data); - - // don't override new gateway public keys in case of being a backup gateway - if (gateway.isClientGateway(sessionID)) { - data.sourceGatewayPubkey = gateway.pubKey; - } else { - data.recipientGatewayPubkey = gateway.pubKey; - } - - gateway.sessions.set(sessionID, data); - } - } - - log.info(`RecoverUpdateMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts deleted file mode 100644 index 92263f424f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/recover.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { RecoverV1Message } from "../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSATPGateway } from "../plugin-satp-gateway"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "recover-helper", -}); - -export async function sendRecoverMessage( - sessionID: string, - gateway: PluginSATPGateway, - backup: boolean, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRecoverMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.lastLogEntryTimestamp == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "sessionData.odapPhase", - sequenceNumber: sessionData.lastSequenceNumber, - lastLogEntryTimestamp: sessionData.lastLogEntryTimestamp, - isBackup: backup, - newBasePath: "", - newGatewayPubKey: sessionData.sourceGatewayPubkey, - signature: "", - }; - - const signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(recoverMessage)), - ); - - recoverMessage.signature = signature; - - log.info(`${fnTag}, sending Recover message...`); - - if (!remote) { - return recoverMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).recoverV1Message(recoverMessage), - "Recover", - ); -} - -export async function checkValidRecoverMessage( - response: RecoverV1Message, - gateway: PluginSATPGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRecoverMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - let pubKey = undefined; - - if (gateway.isClientGateway(response.sessionID)) { - if ( - response.isBackup && - sessionData.recipientGatewayPubkey != response.newGatewayPubKey - ) { - // this is a backup gateway - sessionData.recipientGatewayPubkey = response.newGatewayPubKey; - - if ( - !sessionData.recipientGatewayPubkey || - !sessionData.allowedSourceBackupGateways?.includes( - sessionData.recipientGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, backup gateway not allowed`); - } - } - pubKey = sessionData.recipientGatewayPubkey; - } else { - if ( - response.isBackup && - sessionData.sourceGatewayPubkey != response.newGatewayPubKey - ) { - // this is a backup gateway - sessionData.sourceGatewayPubkey = response.newGatewayPubKey; - - if ( - !sessionData.sourceGatewayPubkey || - !sessionData.allowedSourceBackupGateways?.includes( - sessionData.sourceGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, backup gateway not allowed`); - } - } - pubKey = sessionData.sourceGatewayPubkey; - } - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (response.lastLogEntryTimestamp == undefined) { - throw new Error(`${fnTag}, last log entry timestamp is not valid`); - } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RecoverMessage message signature verification failed`, - ); - } - - sessionData.lastLogEntryTimestamp = response.lastLogEntryTimestamp; - - gateway.sessions.set(sessionID, sessionData); - - log.info(`RecoverMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts deleted file mode 100644 index 24ab040cce..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback-ack.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { RollbackAckV1Message } from "../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSATPGateway } from "../plugin-satp-gateway"; -// import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "rollback-ack-helper", -}); - -export async function sendRollbackAckMessage( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRollbackAckMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.rollbackProofs == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.rollbackActionsPerformed == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const rollbackAckMessage: RollbackAckV1Message = { - sessionID: sessionID, - success: true, - signature: "", - }; - - const signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(rollbackAckMessage)), - ); - - rollbackAckMessage.signature = signature; - - log.info(`${fnTag}, sending Rollback Ack message...`); - - if (!remote) { - return rollbackAckMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).rollbackAckV1Message(rollbackAckMessage), - "RollbackAck", - ); -} - -export async function checkValidRollbackAckMessage( - response: RollbackAckV1Message, - gateway: PluginSATPGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRollbackAckMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RollbackAckMessage message signature verification failed`, - ); - } - - log.info(`RollbackAckMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts deleted file mode 100644 index e9b573af1d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/recovery/rollback.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { RollbackV1Message } from "../generated/openapi/typescript-axios"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginSATPGateway } from "../plugin-satp-gateway"; -// import { SHA256 } from "crypto-js"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "rollback-helper", -}); - -export async function sendRollbackMessage( - sessionID: string, - gateway: PluginSATPGateway, - remote: boolean, -): Promise { - const fnTag = `${gateway.className}#sendRollbackMessage()`; - - const sessionData = gateway.sessions.get(sessionID); - - if ( - sessionData == undefined || - sessionData.maxTimeout == undefined || - sessionData.maxRetries == undefined || - sessionData.rollbackProofs == undefined || - sessionData.sourceBasePath == undefined || - sessionData.recipientBasePath == undefined || - sessionData.rollbackActionsPerformed == undefined - ) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - const rollbackMessage: RollbackV1Message = { - sessionID: sessionID, - success: true, - actionPerformed: sessionData.rollbackActionsPerformed, - proofs: sessionData.rollbackProofs, - signature: "", - }; - - const signature = PluginSATPGateway.bufArray2HexStr( - gateway.sign(JSON.stringify(rollbackMessage)), - ); - - rollbackMessage.signature = signature; - - log.info(`${fnTag}, sending Rollback message...`); - - if (!remote) { - return rollbackMessage; - } - - await gateway.makeRequest( - sessionID, - PluginSATPGateway.getSatpAPI( - gateway.isClientGateway(sessionID) - ? sessionData.recipientBasePath - : sessionData.sourceBasePath, - ).rollbackV1Message(rollbackMessage), - "Rollback", - ); -} - -export async function checkValidRollbackMessage( - response: RollbackV1Message, - gateway: PluginSATPGateway, -): Promise { - const fnTag = `${gateway.className}#checkValidRollbackMessage`; - - const sessionID = response.sessionID; - const sessionData = gateway.sessions.get(sessionID); - if (sessionData == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - const pubKey = gateway.isClientGateway(response.sessionID) - ? sessionData.recipientGatewayPubkey - : sessionData.sourceGatewayPubkey; - - if (pubKey == undefined) { - throw new Error(`${fnTag}, session data is undefined`); - } - - // if (response.messageType != SatpMessageType.CommitFinalResponse) { - // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); - // } - - if (!gateway.verifySignature(response, pubKey)) { - throw new Error( - `${fnTag}, RollbackMessage message signature verification failed`, - ); - } - - log.info(`RollbackMessage passed all checks.`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts deleted file mode 100644 index 333077cf7b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts +++ /dev/null @@ -1,99 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IClientRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class ClientRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "ClientRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return ClientRequestEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IClientRequestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest"]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest"]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.runSatp(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts deleted file mode 100644 index 38c51152f6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ICommitFinalResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class CommitFinalResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CommitFinalResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitFinalResponseEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ICommitFinalResponseEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitFinalResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts deleted file mode 100644 index 673c4002c8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ICommitPreparationResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class CommitPreparationResponseEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "CommitPrepareResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitPreparationResponseEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ICommitPreparationResponseEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitPrepareResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts deleted file mode 100644 index 0794db89fc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ILockEvidenceResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class LockEvidenceResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "LockEvidenceResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return LockEvidenceResponseEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ILockEvidenceResponseEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - /*public getOasPath() { - return OAS.paths["/api/v2/phase3/commitfinal"]; - }*/ - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onLockEvidenceResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts deleted file mode 100644 index 185f7d5673..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ITransferCommenceResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class TransferCommenceResponseEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "TransferCommenceResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferCommenceResponseEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferCommenceResponseEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferCommenceResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts deleted file mode 100644 index 913446225c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ITransferInitiationResponseEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class TransferInitiationResponseEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "TransferInitiationResponseEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferInitiationResponseEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferInitiationResponseEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - console.log("getting authorized provider"); - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferInitiationResponseReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts deleted file mode 100644 index 95c828d25e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IRecoverMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class RecoverMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRecoverMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts deleted file mode 100644 index 0e2f7fee51..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IRecoverSuccessMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class RecoverSuccessMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverSuccessMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverSuccessMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRecoverSuccessMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverSuccessMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts deleted file mode 100644 index a3e25fb740..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts +++ /dev/null @@ -1,105 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IRecoverUpdateAckMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class RecoverUpdateAckMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverUpdateAckMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverUpdateAckMessageEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: IRecoverUpdateAckMessageEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverUpdateAckMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts deleted file mode 100644 index eed087ac1f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IRecoverUpdateMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class RecoverUpdateMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RecoverUpdateMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RecoverUpdateMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRecoverUpdateMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRecoverUpdateMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts deleted file mode 100644 index b280b2e74b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IRollbackAckMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class RollbackAckMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RollbackAckMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RollbackAckMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRollbackAckMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRollbackAckMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts deleted file mode 100644 index 65427e4e22..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; - -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface IRollbackMessageEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class RollbackMessageEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "RollbackMessageEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return RollbackMessageEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: IRollbackMessageEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onRollbackMessageReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts deleted file mode 100644 index e5aea4fa1d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ICommitFinalRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class CommitFinalRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CommitFinalRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitFinalRequestEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ICommitFinalRequestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitFinalRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts deleted file mode 100644 index e370deca37..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ICommitPreparationRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class CommitPreparationRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "CommitPreparationRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return CommitPreparationRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ICommitPreparationRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onCommitPrepareRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts deleted file mode 100644 index cc6af836ca..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ILockEvidenceRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class LockEvidenceRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "LockEvidenceRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return LockEvidenceRequestEndpointV1.CLASS_NAME; - } - - constructor(public readonly options: ILockEvidenceRequestEndpointOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - /*public getOasPath() { - return OAS.paths["/api/v2/phase3/commitfinal"]; - }*/ - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onLockEvidenceRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts deleted file mode 100644 index 2060011ad3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ITransferCommenceRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class TransferCommenceRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "TransferCommenceRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferCommenceRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferCommenceRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferCommenceRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts deleted file mode 100644 index 0467d4f709..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ITransferCompleteRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class TransferCompleteRequestEndpointV1 implements IWebServiceEndpoint { - public static readonly CLASS_NAME = "TransferCompleteRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferCompleteRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferCompleteRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - ]; - return apiPath.get["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - ]; - return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - ].get.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferCompleteRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts deleted file mode 100644 index 400a309f4a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts +++ /dev/null @@ -1,107 +0,0 @@ -import type { Express, Request, Response } from "express"; - -import { - IWebServiceEndpoint, - IExpressRequestHandler, - IEndpointAuthzOptions, -} from "@hyperledger/cactus-core-api"; -import { - Logger, - Checks, - LogLevelDesc, - LoggerProvider, - IAsyncProvider, -} from "@hyperledger/cactus-common"; - -import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; - -import { PluginSATPGateway } from "../../plugin-satp-gateway"; -import OAS from "../../../json/openapi-gateway-bundled.json"; - -export interface ITransferInitiationRequestEndpointOptions { - logLevel?: LogLevelDesc; - gateway: PluginSATPGateway; -} - -export class TransferInitiationRequestEndpointV1 - implements IWebServiceEndpoint -{ - public static readonly CLASS_NAME = "TransferInitiationRequestEndpointV1"; - - private readonly log: Logger; - - public get className(): string { - return TransferInitiationRequestEndpointV1.CLASS_NAME; - } - - constructor( - public readonly options: ITransferInitiationRequestEndpointOptions, - ) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - Checks.truthy(options.gateway, `${fnTag} arg options.connector`); - - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - } - - public getPath(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.path; - } - - public getVerbLowerCase(): string { - const apiPath = - OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - ]; - return apiPath.post["x-hyperledger-cacti"].http.verbLowerCase; - } - - public getOperationId(): string { - return OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - ].post.operationId; - } - - getAuthorizationOptionsProvider(): IAsyncProvider { - // TODO: make this an injectable dependency in the constructor - console.log("getting authorized provider"); - return { - get: async () => ({ - isProtected: true, - requiredRoles: [], - }), - }; - } - - public async registerExpress( - expressApp: Express, - ): Promise { - await registerWebServiceEndpoint(expressApp, this); - return this; - } - - public getExpressRequestHandler(): IExpressRequestHandler { - return this.handleRequest.bind(this); - } - - public async handleRequest(req: Request, res: Response): Promise { - const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; - this.log.debug(reqTag); - try { - await this.options.gateway.onTransferInitiationRequestReceived(req.body); - res.status(200).json("OK"); - } catch (ex) { - this.log.error(`Crash while serving ${reqTag}`, ex); - res.status(500).json({ - message: "Internal Server Error", - error: ex?.stack || ex?.message, - }); - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts deleted file mode 100644 index 175229bdcf..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts +++ /dev/null @@ -1,799 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { PluginSATPGateway } from "../../../main/typescript/plugin-satp-gateway"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - FabricSATPGateway, - IFabricSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { - BesuSATPGateway, - IBesuSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const backupGatewayKeys = Secp256k1Keys.generateKeyPairsBuffer(); - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "backup-gateway-after-client-crash", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - const allowedGateways = []; - allowedGateways.push( - PluginSATPGateway.bufArray2HexStr(backupGatewayKeys.publicKey), - ); - - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - backupGatewaysAllowed: allowedGateways, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client gateway crashes after lock fabric asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - // Backup gateway configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: backupGatewayKeys, - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - - // backup client gateway back online - await pluginSourceGateway.recoverOpenSessions(true); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts deleted file mode 100644 index 37381f052d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts +++ /dev/null @@ -1,813 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - IFabricSATPGatewayConstructorOptions, - FabricSATPGateway, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { - IBesuSATPGatewayConstructorOptions, - BesuSATPGateway, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "client-crash-after-delete-asset", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client gateway crashes after deleting fabric asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(expressApp); - - // client gateway self-healed and is back online - await pluginSourceGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts deleted file mode 100644 index 2902020270..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts +++ /dev/null @@ -1,749 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - BesuSATPGateway, - IBesuSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { - FabricSATPGateway, - IFabricSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "client-crash-after-lock-asset", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client gateway crashes after lock fabric asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - // check if asset was successfully locked - expect(await pluginSourceGateway.isFabricAssetLocked(FABRIC_ASSET_ID)).toBe( - true, - ); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(expressApp); - - // client gateway self-healed and is back online - await pluginSourceGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts deleted file mode 100644 index 6e7a8fad98..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ /dev/null @@ -1,274 +0,0 @@ -import http, { Server } from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import bodyParser from "body-parser"; -import express, { Express } from "express"; -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { - IPluginSatpGatewayConstructorOptions, - PluginSATPGateway, -} from "../../../main/typescript/plugin-satp-gateway"; -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; - -import { BesuSATPGateway } from "../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gateway"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -const logLevel: LogLevelDesc = "INFO"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -let serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; -let clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; - -let sourceGatewayServer: Server; -let recipientGatewayserver: Server; - -let serverGatewayApiHost: string; -let clientGatewayApiHost: string; - -let clientRequest: ClientV1Request; - -let serverExpressApp: Express; -let serverListenOptions: IListenOptions; - -let clientExpressApp: Express; -let clientListenOptions: IListenOptions; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "client-crash-after-transfer-initiation", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Server Gateway configuration - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverExpressApp = express(); - serverExpressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(serverExpressApp); - serverListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - const addressInfo = (await Servers.listen( - serverListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginRecipientGateway.localRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - await pluginRecipientGateway.registerWebServices(serverExpressApp); - } - { - // Client Gateway configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - clientExpressApp = express(); - clientExpressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(clientExpressApp); - clientListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen( - clientListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - - if (pluginSourceGateway.localRepository?.database == undefined) { - throw new Error("Database is not correctly initialized"); - } - - await pluginSourceGateway.localRepository?.reset(); - - await pluginSourceGateway.registerWebServices(clientExpressApp); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - clientRequest = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - } -}); - -test("successful run ODAP after client gateway crashed after after receiving transfer initiation response", async () => { - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - clientExpressApp = express(); - clientExpressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(clientExpressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(clientExpressApp); - - // client gateway self-healed and is back online - await pluginSourceGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); -}); - -afterAll(async () => { - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayserver); - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts deleted file mode 100644 index 3a42c977a9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts +++ /dev/null @@ -1,624 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { - ClientV1Request, - DefaultApi as SatpApi, -} from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - FabricSATPGateway, - IFabricSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { - BesuSATPGateway, - IBesuSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; -import { knexRemoteConnection } from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "odap-api-call-with-ledger-connector", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 15000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([ - [ - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ], - ]), - logLevel, - }); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - - { - // Gateways configuration - const clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - const serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("runs ODAP between two gateways via openApi", async () => { - const satpApiConfig = new Configuration({ - basePath: clientGatewayApiHost, - }); - const apiClient = new SatpApi(satpApiConfig); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const res = await apiClient.clientRequestV1(clientRequest); - expect(res.status).toBe(200); - - expect(pluginSourceGateway.sessions.size).toBe(1); - expect(pluginRecipientGateway.sessions.size).toBe(1); - - const [sessionID] = pluginSourceGateway.sessions.keys(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts deleted file mode 100644 index 10355e7ccc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ /dev/null @@ -1,204 +0,0 @@ -import http, { Server } from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import bodyParser from "body-parser"; -import express from "express"; -import { DefaultApi as SatpApi } from "../../../main/typescript/public-api"; - -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; - -import { Configuration } from "@hyperledger/cactus-core-api"; - -import { - PluginSATPGateway, - IPluginSatpGatewayConstructorOptions, -} from "../../../main/typescript/plugin-satp-gateway"; -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; - -import { BesuSATPGateway } from "../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; -import { knexRemoteConnection } from "../knex.config"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; - -const logLevel: LogLevelDesc = "INFO"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -let sourceGatewayServer: Server; -let recipientGatewayserver: Server; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "odap-api-call-with-ledger-connector", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); - -test("runs ODAP between two gateways via openApi", async () => { - const clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - const serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - let serverGatewayApiHost: string; - - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - const clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - - const satpApiConfig = new Configuration({ - basePath: clientGatewayApiHost, - }); - const apiClient = new SatpApi(satpApiConfig); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - const res = await apiClient.clientRequestV1(clientRequest); - expect(res.status).toBe(200); - } - - expect(pluginSourceGateway.sessions.size).toBe(1); - expect(pluginRecipientGateway.sessions.size).toBe(1); - - const [sessionID] = pluginSourceGateway.sessions.keys(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); -}); - -afterAll(async () => { - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayserver); - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts deleted file mode 100644 index 10da0d1578..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ /dev/null @@ -1,833 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_AIO_FABRIC_VERSION, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import Web3 from "web3"; - -import { - IFabricSATPGatewayConstructorOptions, - FabricSATPGateway, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { - IBesuSATPGatewayConstructorOptions, - BesuSATPGateway, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; -import { knexRemoteConnection } from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "odap-rollback", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: DEFAULT_FABRIC_2_AIO_IMAGE_NAME, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 10000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } - { - // Gateways configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("client sends rollback message at the end of the protocol", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - const commitFinalRequest = - await pluginSourceGateway.clientHelper.sendCommitFinalRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitFinalRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequest, - pluginRecipientGateway, - ); - - await pluginRecipientGateway.createAsset(sessionID); - - const r1 = await pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID); - const r2 = await pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID); - console.log(r1); - console.log(r2); - // now we simulate the crash of the client gateway - pluginSourceGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - await Servers.shutdown(sourceGatewayServer); - - await new Promise((resolve) => setTimeout(resolve, 5000)); - - // the server gateway sends the message and the - // rollback will be triggered after the timeout - await pluginRecipientGateway.serverHelper - .sendCommitFinalResponse(sessionID, pluginRecipientGateway, true) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); - - // the client is back online and rollback after seeing the counterparty rollback - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - await pluginSourceGateway.registerWebServices(expressApp); - - await pluginSourceGateway.recoverOpenSessions(true); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(true); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(false); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts deleted file mode 100644 index 8342f08a1d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts +++ /dev/null @@ -1,325 +0,0 @@ -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSATPGateway } from "../../../main/typescript/plugin-satp-gateway"; - -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; - -import { BesuSATPGateway } from "../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; -import { knexRemoteConnection } from "../knex.config"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { - pruneDockerAllIfGithubAction, - Containers, -} from "@hyperledger/cactus-test-tooling"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; - -const logLevel: LogLevelDesc = "INFO"; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "odap", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); - -test("successful run ODAP instance", async () => { - console.log(knexRemoteConnection); - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - const dummyPath = { apiHost: "dummyPath" }; - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: dummyPath, - serverGatewayConfiguration: dummyPath, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: uuidV4(), - recipientLedgerAssetID: uuidV4(), - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - const commitFinalRequest = - await pluginSourceGateway.clientHelper.sendCommitFinalRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitFinalRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequest, - pluginRecipientGateway, - ); - - await pluginRecipientGateway.createAsset(sessionID); - - const commitFinalResponse = - await pluginRecipientGateway.serverHelper.sendCommitFinalResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitFinalResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitFinalResponse( - commitFinalResponse, - pluginSourceGateway, - ); - - const transferCompleteRequest = - await pluginSourceGateway.clientHelper.sendTransferCompleteRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCompleteRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidTransferCompleteRequest( - transferCompleteRequest, - pluginRecipientGateway, - ); - - expect(pluginSourceGateway.sessions.size).toBe(1); - expect(pluginRecipientGateway.sessions.size).toBe(1); - - const [sessionId] = pluginSourceGateway.sessions.keys(); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionId, - ); -}); - -afterAll(async () => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts deleted file mode 100644 index a0ab3217f2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts +++ /dev/null @@ -1,835 +0,0 @@ -import fs from "fs-extra"; -import "jest-extended"; -import http, { Server } from "http"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import bodyParser from "body-parser"; -import express from "express"; -import { AssetProfile } from "../../../main/typescript/generated/openapi/typescript-axios"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; -import { DiscoveryOptions } from "fabric-network"; -import { - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, - BesuTestLedger, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, -} from "@hyperledger/cactus-test-tooling"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { ClientV1Request } from "../../../main/typescript/public-api"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { - Configuration, - PluginImportType, - Constants, -} from "@hyperledger/cactus-core-api"; -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FabricSigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import path from "path"; -import { - Web3SigningCredentialType, - PluginLedgerConnectorBesu, - PluginFactoryLedgerConnector, - ReceiptType, - Web3SigningCredential, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -import Web3 from "web3"; - -import { makeSessionDataChecks } from "../make-checks"; -import { - BesuSATPGateway, - IBesuSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { - FabricSATPGateway, - IFabricSATPGatewayConstructorOptions, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../knex.config"; - -/** - * Use this to debug issues with the fabric node SDK - * ```sh - * export HFC_LOGGING='{"debug":"console","info":"console"}' - * ``` - */ - -let fabricSigningCredential: FabricSigningCredential; -const logLevel: LogLevelDesc = "INFO"; - -let sourceGatewayServer: Server; -let recipientGatewayServer: Server; -let besuServer: Server; -let fabricServer: Server; - -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let fabricChannelName: string; -let fabricPath: string; - -let besuTestLedger: BesuTestLedger; -let besuPath: string; -let besuContractName: string; -let besuWeb3SigningCredential: Web3SigningCredential; -let besuKeychainId: string; - -let fabricConnector: PluginLedgerConnectorFabric; -let besuConnector: PluginLedgerConnectorBesu; - -let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -let clientGatewayApiHost: string; -let serverGatewayApiHost: string; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "server-crash-after-create-asset", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Fabric ledger connection - const channelId = "mychannel"; - fabricChannelName = channelId; - - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressApp); - - const apiUrl = `http://${address}:${port}`; - fabricPath = apiUrl; - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ └── index.ts - // ├── tsconfig.json - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const response = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = response.data; - expect(response.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - - // FIXME - without this wait it randomly fails with an error claiming that - // the endorsement was impossible to be obtained. The fabric-samples script - // does the same thing, it just waits 10 seconds for good measure so there - // might not be a way for us to avoid doing this, but if there is a way we - // absolutely should not have timeouts like this, anywhere... - await new Promise((resolve) => setTimeout(resolve, 15000)); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - - const createResponse = await apiClient.runTransactionV1({ - contractName: fabricContractName, - channelName: fabricChannelName, - params: [FABRIC_ASSET_ID, "19"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - - expect(createResponse).not.toBeUndefined(); - expect(createResponse.status).toBeGreaterThan(199); - expect(createResponse.status).toBeLessThan(300); - - log.info( - `BassicAssetTransfer.Create(): ${JSON.stringify(createResponse.data)}`, - ); - } - { - // Besu ledger connection - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKey = uuidv4(); - const keychainEntryValue = testEthAccount.privateKey; - const keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - - besuConnector = await factory.create({ - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 4000, - server: besuServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - - await besuConnector.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuConnector.registerWebServices(expressApp, wsApi); - besuPath = `http://${address}:${port}`; - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).not.toBeUndefined(); - expect(parseInt(balance, 10)).toBe(10e9); - - besuWeb3SigningCredential = { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }; - - const deployContractResponse = await besuConnector.deployContract({ - keychainId: keychainPlugin.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: besuWeb3SigningCredential, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - - expect(deployContractResponse).not.toBeUndefined(); - expect(deployContractResponse.transactionReceipt).not.toBeUndefined(); - expect( - deployContractResponse.transactionReceipt.contractAddress, - ).not.toBeUndefined(); - - besuKeychainId = keychainPlugin.getKeychainId(); - besuContractName = LockAssetContractJson.contractName; - - const contractAddress: string = deployContractResponse.transactionReceipt - .contractAddress as string; - - expect(typeof contractAddress).toBe("string"); - } -}); - -beforeEach(async () => { - { - // Gateways configuration - const clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - fabricPath: fabricPath, - fabricSigningCredential: fabricSigningCredential, - fabricChannelName: fabricChannelName, - fabricContractName: fabricContractName, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - besuPath: besuPath, - besuWeb3SigningCredential: besuWeb3SigningCredential, - besuContractName: besuContractName, - besuKeychainId: besuKeychainId, - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - } - { - // Server Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - await pluginRecipientGateway.getOrCreateWebServices(); - await pluginRecipientGateway.registerWebServices(expressApp); - } - { - // Client Gateway configuration - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3001, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - await pluginSourceGateway.getOrCreateWebServices(); - await pluginSourceGateway.registerWebServices(expressApp); - } -}); - -test("server gateway crashes after creating besu asset", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const clientRequest: ClientV1Request = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - const transferInitializationResponse = - await pluginRecipientGateway.serverHelper.sendTransferInitializationResponse( - transferInitializationRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferInitializationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - transferInitializationResponse, - pluginSourceGateway, - ); - - const transferCommenceRequest = - await pluginSourceGateway.clientHelper.sendTransferCommenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferCommenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const transferCommenceResponse = - await pluginRecipientGateway.serverHelper.sendTransferCommenceResponse( - transferCommenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (transferCommenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.lockAsset(sessionID); - - const lockEvidenceRequest = - await pluginSourceGateway.clientHelper.sendLockEvidenceRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (lockEvidenceRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequest, - pluginRecipientGateway, - ); - - const lockEvidenceResponse = - await pluginRecipientGateway.serverHelper.sendLockEvidenceResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (lockEvidenceResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const commitPreparationRequest = - await pluginSourceGateway.clientHelper.sendCommitPreparationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitPreparationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPreparationRequest, - pluginRecipientGateway, - ); - - const commitPreparationResponse = - await pluginRecipientGateway.serverHelper.sendCommitPreparationResponse( - lockEvidenceRequest.sessionID, - pluginRecipientGateway, - false, - ); - - if (commitPreparationResponse == void 0) { - expect(false); - return; - } - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - await pluginSourceGateway.deleteAsset(sessionID); - - const commitFinalRequest = - await pluginSourceGateway.clientHelper.sendCommitFinalRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (commitFinalRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequest, - pluginRecipientGateway, - ); - - await pluginRecipientGateway.createAsset(sessionID); - - // now we simulate the crash of the server gateway - pluginRecipientGateway.localRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - await Servers.shutdown(recipientGatewayServer); - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 5000, - server: recipientGatewayServer, - }; - - await Servers.listen(listenOptions); - - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - await pluginRecipientGateway.registerWebServices(expressApp); - - // client gateway self-healed and is back online - await pluginRecipientGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); - - await expect( - pluginSourceGateway.fabricAssetExists(FABRIC_ASSET_ID), - ).resolves.toBe(false); - - await expect( - pluginRecipientGateway.besuAssetExists(BESU_ASSET_ID), - ).resolves.toBe(true); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - - await pluginSourceGateway.localRepository?.destroy(); - await pluginRecipientGateway.localRepository?.destroy(); - await pluginSourceGateway.remoteRepository?.destroy(); - await pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(besuServer); - await Servers.shutdown(fabricServer); - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts deleted file mode 100644 index 115450c1d4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ /dev/null @@ -1,254 +0,0 @@ -import http, { Server } from "http"; -import type { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import bodyParser from "body-parser"; -import express, { Express } from "express"; -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Secp256k1Keys, - Servers, -} from "@hyperledger/cactus-common"; - -import { - AssetProfile, - ClientV1Request, -} from "../../../main/typescript/public-api"; -import { makeSessionDataChecks } from "../make-checks"; -import { - IFabricSATPGatewayConstructorOptions, - FabricSATPGateway, -} from "../../../main/typescript/core/fabric-satp-gateway"; -import { - IBesuSATPGatewayConstructorOptions, - BesuSATPGateway, -} from "../../../main/typescript/core/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../main/typescript/core/server-helper"; - -import { knexClientConnection, knexRemoteConnection } from "../knex.config"; -import { - pruneDockerAllIfGithubAction, - Containers, -} from "@hyperledger/cactus-test-tooling"; - -const logLevel: LogLevelDesc = "INFO"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const FABRIC_ASSET_ID = uuidv4(); -const BESU_ASSET_ID = uuidv4(); - -let clientGatewayPluginOptions: IFabricSATPGatewayConstructorOptions; -let serverGatewayPluginOptions: IBesuSATPGatewayConstructorOptions; -let pluginSourceGateway: FabricSATPGateway; -let pluginRecipientGateway: BesuSATPGateway; - -let sourceGatewayServer: Server; -let recipientGatewayserver: Server; - -let serverGatewayApiHost: string; -let clientGatewayApiHost: string; - -let clientRequest: ClientV1Request; - -let serverExpressApp: Express; -let serverListenOptions: IListenOptions; - -let clientExpressApp: Express; -let clientListenOptions: IListenOptions; - -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "server-crash-after-create-asset", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - // Server Gateway configuration - serverGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - serverExpressApp = express(); - serverExpressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(serverExpressApp); - serverListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - const addressInfo = (await Servers.listen( - serverListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - serverGatewayApiHost = `http://${address}:${port}`; - - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - - expect( - pluginRecipientGateway.localRepository?.database, - ).not.toBeUndefined(); - expect( - pluginRecipientGateway.remoteRepository?.database, - ).not.toBeUndefined(); - - await pluginRecipientGateway.localRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - await pluginRecipientGateway.registerWebServices(serverExpressApp); - } - { - // Client Gateway configuration - clientGatewayPluginOptions = { - name: "cactus-plugin#satpGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - knexLocalConfig: knexClientConnection, - }; - - clientExpressApp = express(); - clientExpressApp.use(bodyParser.json({ limit: "250mb" })); - sourceGatewayServer = http.createServer(clientExpressApp); - clientListenOptions = { - hostname: "127.0.0.1", - port: 2000, - server: sourceGatewayServer, - }; - - const addressInfo = (await Servers.listen( - clientListenOptions, - )) as AddressInfo; - - const { address, port } = addressInfo; - clientGatewayApiHost = `http://${address}:${port}`; - - pluginSourceGateway = new FabricSATPGateway(clientGatewayPluginOptions); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginSourceGateway.remoteRepository?.reset(); - - await pluginSourceGateway.registerWebServices(clientExpressApp); - - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - clientRequest = { - clientGatewayConfiguration: { - apiHost: clientGatewayApiHost, - }, - serverGatewayConfiguration: { - apiHost: serverGatewayApiHost, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceLedgerAssetID: FABRIC_ASSET_ID, - recipientLedgerAssetID: BESU_ASSET_ID, - }; - } -}); - -test("server gateway crashes after transfer initiation flow", async () => { - const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); - - const transferInitializationRequest = - await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( - sessionID, - pluginSourceGateway, - false, - ); - - if (transferInitializationRequest == void 0) { - expect(false); - return; - } - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - transferInitializationRequest, - pluginRecipientGateway, - ); - - // now we simulate the crash of the server gateway - pluginRecipientGateway.localRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); - await Servers.shutdown(recipientGatewayserver); - - serverExpressApp = express(); - serverExpressApp.use(bodyParser.json({ limit: "250mb" })); - recipientGatewayserver = http.createServer(serverExpressApp); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 3000, - server: recipientGatewayserver, - }; - - await Servers.listen(listenOptions); - - pluginRecipientGateway = new BesuSATPGateway(serverGatewayPluginOptions); - await pluginRecipientGateway.registerWebServices(serverExpressApp); - - // server gateway self-healed and is back online - await pluginRecipientGateway.recoverOpenSessions(true); - - await makeSessionDataChecks( - pluginSourceGateway, - pluginRecipientGateway, - sessionID, - ); -}); - -afterAll(async () => { - await pluginSourceGateway.localRepository?.destroy(); - await pluginRecipientGateway.localRepository?.destroy(); - await pluginSourceGateway.remoteRepository?.destroy(); - await pluginRecipientGateway.remoteRepository?.destroy(); - - await Servers.shutdown(sourceGatewayServer); - await Servers.shutdown(recipientGatewayserver); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts deleted file mode 100644 index 863e166f6d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { PluginSATPGateway } from "../../main/typescript/plugin-satp-gateway"; - -export async function makeSessionDataChecks( - pluginSourceGateway: PluginSATPGateway, - pluginRecipientGateway: PluginSATPGateway, - sessionId: string, -): Promise { - const clientSessionData = pluginSourceGateway.sessions.get(sessionId); - const serverSessionData = pluginRecipientGateway.sessions.get(sessionId); - - expect(clientSessionData).not.toBeUndefined(); - expect(serverSessionData).not.toBeUndefined(); - - expect(clientSessionData?.id).toBe(serverSessionData?.id); - expect(clientSessionData?.id).toBe(sessionId); - - expect(clientSessionData?.loggingProfile).toBe( - serverSessionData?.loggingProfile, - ); - - expect(clientSessionData?.accessControlProfile).toBe( - serverSessionData?.accessControlProfile, - ); - - expect(clientSessionData?.applicationProfile).toBe( - serverSessionData?.applicationProfile, - ); - - expect(JSON.stringify(clientSessionData?.assetProfile)).toBe( - JSON.stringify(serverSessionData?.assetProfile), - ); - - expect(clientSessionData?.sourceGatewayPubkey).toBe( - serverSessionData?.sourceGatewayPubkey, - ); - - expect(clientSessionData?.sourceGatewayDltSystem).toBe( - serverSessionData?.sourceGatewayDltSystem, - ); - - expect(clientSessionData?.recipientGatewayPubkey).toBe( - serverSessionData?.recipientGatewayPubkey, - ); - - expect(clientSessionData?.recipientGatewayDltSystem).toBe( - serverSessionData?.recipientGatewayDltSystem, - ); - - expect(clientSessionData?.initializationRequestMessageHash).toBe( - serverSessionData?.initializationRequestMessageHash, - ); - - expect(clientSessionData?.initializationResponseMessageHash).toBe( - serverSessionData?.initializationResponseMessageHash, - ); - - expect(clientSessionData?.clientSignatureInitializationRequestMessage).toBe( - serverSessionData?.clientSignatureInitializationRequestMessage, - ); - - expect(clientSessionData?.serverSignatureInitializationResponseMessage).toBe( - serverSessionData?.serverSignatureInitializationResponseMessage, - ); - - expect(clientSessionData?.transferCommenceMessageRequestHash).toBe( - serverSessionData?.transferCommenceMessageRequestHash, - ); - - expect(clientSessionData?.transferCommenceMessageResponseHash).toBe( - serverSessionData?.transferCommenceMessageResponseHash, - ); - - expect(clientSessionData?.clientSignatureTransferCommenceRequestMessage).toBe( - serverSessionData?.clientSignatureTransferCommenceRequestMessage, - ); - - expect( - clientSessionData?.serverSignatureTransferCommenceResponseMessage, - ).toBe(serverSessionData?.serverSignatureTransferCommenceResponseMessage); - - expect(clientSessionData?.lockEvidenceRequestMessageHash).toBe( - serverSessionData?.lockEvidenceRequestMessageHash, - ); - - expect(clientSessionData?.lockEvidenceResponseMessageHash).toBe( - serverSessionData?.lockEvidenceResponseMessageHash, - ); - - expect(clientSessionData?.clientSignatureLockEvidenceRequestMessage).toBe( - serverSessionData?.clientSignatureLockEvidenceRequestMessage, - ); - - expect(clientSessionData?.serverSignatureLockEvidenceResponseMessage).toBe( - serverSessionData?.serverSignatureLockEvidenceResponseMessage, - ); - - expect(clientSessionData?.lockEvidenceClaim).toBe( - serverSessionData?.lockEvidenceClaim, - ); - - expect(clientSessionData?.commitPrepareRequestMessageHash).toBe( - serverSessionData?.commitPrepareRequestMessageHash, - ); - - expect(clientSessionData?.commitPrepareResponseMessageHash).toBe( - serverSessionData?.commitPrepareResponseMessageHash, - ); - - expect( - clientSessionData?.clientSignatureCommitPreparationRequestMessage, - ).toBe(serverSessionData?.clientSignatureCommitPreparationRequestMessage); - - expect( - clientSessionData?.serverSignatureCommitPreparationResponseMessage, - ).toBe(serverSessionData?.serverSignatureCommitPreparationResponseMessage); - - expect(clientSessionData?.commitFinalRequestMessageHash).toBe( - serverSessionData?.commitFinalRequestMessageHash, - ); - - expect(clientSessionData?.commitPrepareRequestMessageHash).toBe( - serverSessionData?.commitPrepareRequestMessageHash, - ); - - expect(clientSessionData?.commitFinalResponseMessageHash).toBe( - serverSessionData?.commitFinalResponseMessageHash, - ); - - expect(clientSessionData?.commitFinalClaim).toBe( - serverSessionData?.commitFinalClaim, - ); - - expect(clientSessionData?.commitFinalClaimFormat).toBe( - serverSessionData?.commitFinalClaimFormat, - ); - - expect(clientSessionData?.commitAcknowledgementClaim).toBe( - serverSessionData?.commitAcknowledgementClaim, - ); - - expect(clientSessionData?.commitAcknowledgementClaimFormat).toBe( - serverSessionData?.commitAcknowledgementClaimFormat, - ); - - expect(clientSessionData?.clientSignatureCommitFinalRequestMessage).toBe( - serverSessionData?.clientSignatureCommitFinalRequestMessage, - ); - - expect(clientSessionData?.serverSignatureCommitFinalResponseMessage).toBe( - serverSessionData?.serverSignatureCommitFinalResponseMessage, - ); - - expect(clientSessionData?.transferCompleteMessageHash).toBe( - serverSessionData?.transferCompleteMessageHash, - ); - - expect(clientSessionData?.clientSignatureTransferCompleteMessage).toBe( - serverSessionData?.clientSignatureTransferCompleteMessage, - ); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "init", "validate"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "exec", "validate"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "done", "validate"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "ack", "validate"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "init", "commence"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "exec", "commence"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "done", "commence"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "ack", "commence"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "init", "lock"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "exec", "lock"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "done", "lock"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "ack", "lock"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "init", "prepare"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "exec", "prepare"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "done", "prepare"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "ack", "prepare"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "init", "final"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "exec", "final"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "done", "final"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "ack", "final"), - ), - ).resolves.not.toBeUndefined(); - - await expect( - pluginSourceGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "init", "complete"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "exec", "complete"), - ), - ).resolves.not.toBeUndefined(); - await expect( - pluginRecipientGateway.getLogFromDatabase( - PluginSATPGateway.getSatpLogKey(sessionId, "done", "complete"), - ), - ).resolves.not.toBeUndefined(); -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts deleted file mode 100644 index fc1d1c341b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidv4 } from "uuid"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - CommitFinalV1Response, - SessionData, -} from "../../../../main/typescript/public-api"; - -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMIT_FINAL_REQUEST_MESSAGE_HASH = "dummyCommitFinalRequestMessageHash"; -const COMMIT_ACK_CLAIM = "dummyCommitAckClaim"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidv4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitFinalRequestMessageHash: COMMIT_FINAL_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "create", - data: COMMIT_ACK_CLAIM, - }); -}); - -afterEach(async () => { - await pluginSourceGateway.localRepository?.destroy(); - await pluginRecipientGateway.localRepository?.destroy(); -}); - -test("valid commit final response", async () => { - const commitFinalResponse: CommitFinalV1Response = { - messageType: SatpMessageType.CommitFinalResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - commitAcknowledgementClaim: COMMIT_ACK_CLAIM, - hashCommitFinal: COMMIT_FINAL_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitFinalResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), - ); - - const messageHash = SHA256(JSON.stringify(commitFinalResponse)).toString(); - - await pluginSourceGateway.clientHelper.checkValidCommitFinalResponse( - commitFinalResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.commitAcknowledgementClaim).toBe( - COMMIT_ACK_CLAIM, - ); - expect(retrievedSessionData.commitFinalRequestMessageHash).toBe( - COMMIT_FINAL_REQUEST_MESSAGE_HASH, - ); - expect(retrievedSessionData.commitFinalResponseMessageHash).toBe(messageHash); -}); - -test("commit final response invalid because of wrong previous message hash", async () => { - const commitFinalResponse: CommitFinalV1Response = { - messageType: SatpMessageType.CommitFinalResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - commitAcknowledgementClaim: COMMIT_ACK_CLAIM, - hashCommitFinal: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitFinalResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitFinalResponse(commitFinalResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("commit final response invalid because of wrong signature", async () => { - const commitFinalResponse: CommitFinalV1Response = { - messageType: SatpMessageType.CommitFinalResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - commitAcknowledgementClaim: COMMIT_ACK_CLAIM, - hashCommitFinal: COMMIT_FINAL_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitFinalResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitFinalResponse(commitFinalResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in commit final request because no server gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitFinalClaim: "dummyCommitFinalClaim", - commitPrepareResponseMessageHash: "dummyCommitPrepareResponseMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendCommitFinalRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts deleted file mode 100644 index 69fdd146ef..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - IPluginSatpGatewayConstructorOptions, - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - CommitPreparationV1Response, - SessionData, -} from "../../../../main/typescript/public-api"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMIT_PREPARATION_REQUEST_MESSAGE_HASH = - "dummyCommitPreparationRequestMessageHash"; - -let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitPrepareRequestMessageHash: COMMIT_PREPARATION_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid commit preparation response", async () => { - const commitPreparationResponse: CommitPreparationV1Response = { - messageType: SatpMessageType.CommitPreparationResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommitPrep: COMMIT_PREPARATION_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitPreparationResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign( - JSON.stringify(commitPreparationResponse), - ), - ); - - const messageHash = SHA256( - JSON.stringify(commitPreparationResponse), - ).toString(); - - await pluginSourceGateway.clientHelper.checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.commitPrepareResponseMessageHash).toBe( - messageHash, - ); - expect( - retrievedSessionData.serverSignatureCommitPreparationResponseMessage, - ).toBe(commitPreparationResponse.signature); -}); - -test("commit preparation response invalid because of wrong previous message hash", async () => { - const commitPreparationResponse: CommitPreparationV1Response = { - messageType: SatpMessageType.CommitPreparationResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommitPrep: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitPreparationResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign( - JSON.stringify(commitPreparationResponse), - ), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("commit preparation response invalid because of wrong signature", async () => { - const commitPreparationResponse: CommitPreparationV1Response = { - messageType: SatpMessageType.CommitPreparationResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommitPrep: COMMIT_PREPARATION_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - commitPreparationResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidCommitPreparationResponse( - commitPreparationResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in commit preparation request because no server gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceResponseMessageHash: "dummyLockEvidenceResponseMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendCommitPreparationRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts deleted file mode 100644 index 691229511a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - LockEvidenceV1Response, - SessionData, -} from "../../../../main/typescript/public-api"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const LOCK_EVIDENCE_REQUEST_MESSAGE_HASH = - "dummyLockEvidenceRequestMessageHash"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceRequestMessageHash: LOCK_EVIDENCE_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid lock evidence response", async () => { - const lockEvidenceResponse: LockEvidenceV1Response = { - messageType: SatpMessageType.LockEvidenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashLockEvidenceRequest: LOCK_EVIDENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - lockEvidenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), - ); - - const messageHash = SHA256(JSON.stringify(lockEvidenceResponse)).toString(); - - await pluginSourceGateway.clientHelper.checkValidLockEvidenceResponse( - lockEvidenceResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.lockEvidenceResponseMessageHash).toBe( - messageHash, - ); - expect(retrievedSessionData.serverSignatureLockEvidenceResponseMessage).toBe( - lockEvidenceResponse.signature, - ); -}); - -test("lock evidence response invalid because of wrong previous message hash", async () => { - const lockEvidenceResponse: LockEvidenceV1Response = { - messageType: SatpMessageType.LockEvidenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashLockEvidenceRequest: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - lockEvidenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), - ); - - await pluginSourceGateway.clientHelper - .checkValidLockEvidenceResponse(lockEvidenceResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("lock evidence response invalid because of wrong signature", async () => { - const lockEvidenceResponse: LockEvidenceV1Response = { - messageType: SatpMessageType.LockEvidenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashLockEvidenceRequest: LOCK_EVIDENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - lockEvidenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidLockEvidenceResponse(lockEvidenceResponse, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in lock evidence request because no server gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageResponseHash: - "dummyTransferCommenceMessageResponseHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.lockAsset(sessionID); - - await pluginSourceGateway.clientHelper - .sendLockEvidenceRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts deleted file mode 100644 index 6bcc36048f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts +++ /dev/null @@ -1,229 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - AssetProfile, - SessionData, - TransferCommenceV1Response, -} from "../../../../main/typescript/public-api"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMENCE_REQUEST_MESSAGE_HASH = "dummyCommenceRequestMessageHash"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageRequestHash: COMMENCE_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid transfer commence response", async () => { - const transferCommenceResponse: TransferCommenceV1Response = { - messageType: SatpMessageType.TransferCommenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommenceRequest: COMMENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), - ); - - const messageHash = SHA256( - JSON.stringify(transferCommenceResponse), - ).toString(); - - await pluginSourceGateway.clientHelper.checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.transferCommenceMessageResponseHash).toBe( - messageHash, - ); - expect( - retrievedSessionData.serverSignatureTransferCommenceResponseMessage, - ).toBe(transferCommenceResponse.signature); -}); - -test("transfer commence response invalid because of wrong previous message hash", async () => { - const transferCommenceResponse: TransferCommenceV1Response = { - messageType: SatpMessageType.TransferCommenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommenceRequest: "wrongMessageHash", - signature: "", - sequenceNumber: sequenceNumber, - }; - - transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), - ); - - await pluginSourceGateway.clientHelper - .checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("transfer commence response invalid because of wrong signature", async () => { - const transferCommenceResponse: TransferCommenceV1Response = { - messageType: SatpMessageType.TransferCommenceResponse, - sessionID: sessionID, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - clientIdentityPubkey: pluginSourceGateway.pubKey, - hashCommenceRequest: COMMENCE_REQUEST_MESSAGE_HASH, - signature: "", - sequenceNumber: sequenceNumber, - }; - - transferCommenceResponse.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign("somethingWrong"), - ); - - await pluginSourceGateway.clientHelper - .checkValidTransferCommenceResponse( - transferCommenceResponse, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -test("timeout in transfer commence request because no server gateway is connected", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const sessionData: SessionData = { - id: sessionID, - step: 1, - version: "0.0.0", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - loggingProfile: "dummyLoggingProfile", - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - originatorPubkey: "http://wrongpath", - beneficiaryPubkey: "http://wrongpath", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - lastSequenceNumber: 77, - sourceGatewayDltSystem: "DLT1", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - initializationResponseMessageHash: "dummyInitializationResponseMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendTransferCommenceRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts deleted file mode 100644 index acfee70fe6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - TransferInitializationV1Response, - SessionData, - AssetProfile, -} from "../../../../main/typescript/public-api"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const INITIALIZATION_REQUEST_MESSAGE_HASH = - "dummyInitializationRequestMessageHash"; - -let sourceGatewayConstructor; -let recipientGatewayConstructor; -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sequenceNumber: number; -let sessionID: string; -let step: number; - -beforeEach(async () => { - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); - step = 1; - - const sessionData: SessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - initializationRequestMessageHash: INITIALIZATION_REQUEST_MESSAGE_HASH, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); -}); - -test("valid transfer initiation response", async () => { - const initializationResponseMessage: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: sessionID, - initialRequestMessageHash: INITIALIZATION_REQUEST_MESSAGE_HASH, - timeStamp: Date.now().toString(), - processedTimeStamp: Date.now().toString(), - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - sequenceNumber: sequenceNumber, - backupGatewaysAllowed: [], - }; - - initializationResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( - await pluginRecipientGateway.sign( - JSON.stringify(initializationResponseMessage), - ), - ); - - const messageHash = SHA256( - JSON.stringify(initializationResponseMessage), - ).toString(); - - await pluginSourceGateway.clientHelper.checkValidInitializationResponse( - initializationResponseMessage, - pluginSourceGateway, - ); - - const retrievedSessionData = pluginSourceGateway.sessions.get(sessionID); - - if (retrievedSessionData == undefined) throw new Error("Test Failed."); - - expect(retrievedSessionData.id).toBe(sessionID); - expect(retrievedSessionData.recipientGatewayPubkey).toBe( - pluginRecipientGateway.pubKey, - ); - expect(retrievedSessionData.initializationRequestMessageHash).toBe( - INITIALIZATION_REQUEST_MESSAGE_HASH, - ); - expect(retrievedSessionData.initializationResponseMessageHash).toBe( - messageHash, - ); - expect( - retrievedSessionData.serverSignatureInitializationResponseMessage, - ).not.toBe(""); -}); - -test("transfer initiation response invalid because of wrong previous message hash", async () => { - const initializationResponseMessage: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: sessionID, - initialRequestMessageHash: "wrongMessageHash", - timeStamp: Date.now().toString(), - processedTimeStamp: Date.now().toString(), - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - sequenceNumber: sequenceNumber, - backupGatewaysAllowed: [], - }; - - initializationResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationResponseMessage), - ), - ); - - await pluginSourceGateway.clientHelper - .checkValidInitializationResponse( - initializationResponseMessage, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("transfer initiation response invalid because it does not match transfer initialization request sessionID", async () => { - const initializationResponseMessage: TransferInitializationV1Response = { - messageType: SatpMessageType.InitializationResponse, - sessionID: uuidV4(), - initialRequestMessageHash: "wrongMessageHash", - timeStamp: Date.now().toString(), - processedTimeStamp: Date.now().toString(), - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - sequenceNumber: sequenceNumber, - backupGatewaysAllowed: [], - }; - - initializationResponseMessage.signature = PluginSATPGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationResponseMessage), - ), - ); - - await pluginSourceGateway.clientHelper - .checkValidInitializationResponse( - initializationResponseMessage, - pluginSourceGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("session data is undefined"), - ); -}); - -test("timeout in transfer initiation request because no server gateway is connected", async () => { - const expiryDate = new Date(2060, 11, 24).toString(); - const assetProfile: AssetProfile = { expirationDate: expiryDate }; - - const sessionData: SessionData = { - id: sessionID, - step: 1, - version: "0.0.0", - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - loggingProfile: "dummyLoggingProfile", - sourceBasePath: "", - recipientBasePath: "http://wrongpath", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - lastSequenceNumber: 77, - sourceGatewayDltSystem: "DLT1", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - allowedSourceBackupGateways: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.clientHelper - .sendTransferInitializationRequest(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts deleted file mode 100644 index e71bb32874..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ /dev/null @@ -1,391 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { Secp256k1Keys } from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; -import { LocalLog } from "../../../../main/typescript/core/types"; -import { SessionData } from "../../../../main/typescript/public-api"; -import { SHA256 } from "crypto-js"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { - FabricSATPGateway, - IFabricSATPGatewayConstructorOptions, -} from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let sourceGatewayConstructor: IFabricSATPGatewayConstructorOptions; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sessionID: string; -let step: number; -let type: string; -let type2: string; -let type3: string; -let type4: string; -let operation: string; -let satpLog: LocalLog; -let satpLog2: LocalLog; -let satpLog3: LocalLog; -let satpLog4: LocalLog; -let sessionData: SessionData; - -beforeEach(async () => { - sessionID = uuidv4(); - step = 3; - type = "type1"; - operation = "operation1"; - - sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - sessionData = { - id: sessionID, - step: step, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - satpLog = { - sessionID: sessionID, - type: type, - operation: operation, - data: JSON.stringify(sessionData), - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); -}); - -test("successful translation of log keys", async () => { - expect(PluginSATPGateway.getSatpLogKey(sessionID, type, operation)).toBe( - `${sessionID}-${type}-${operation}`, - ); -}); - -test("successful logging of proof to ipfs and sqlite", async () => { - const claim = "claim"; - const satpLogKey = PluginSATPGateway.getSatpLogKey( - sessionID, - "proof", - "lock", - ); - - await pluginSourceGateway.storeProof({ - sessionID, - type: "proof", - operation: "lock", - data: claim, - }); - - const retrievedLogRemote = - await pluginSourceGateway.getLogFromRemote(satpLogKey); - const retrievedLogDB = - await pluginSourceGateway.getLogFromDatabase(satpLogKey); - - if (retrievedLogDB == undefined || retrievedLogRemote == undefined) { - throw new Error("Test Failed"); - } - - expect(retrievedLogRemote.key).toBe(satpLogKey); - expect(retrievedLogDB.key).toBe(satpLogKey); - expect(retrievedLogRemote.hash).toBe(SHA256(claim).toString()); - expect( - pluginRecipientGateway.verifySignature( - retrievedLogRemote, - pluginSourceGateway.pubKey, - ), - ).toBe(true); - - expect(1).toBe(1); -}); - -test("successful logging to ipfs and sqlite", async () => { - const satpLogKey = PluginSATPGateway.getSatpLogKey( - sessionID, - type, - operation, - ); - - await pluginSourceGateway.storeLog(satpLog); - - const retrievedLogRemote = - await pluginSourceGateway.getLogFromRemote(satpLogKey); - const retrievedLogDB = - await pluginSourceGateway.getLogFromDatabase(satpLogKey); - - if ( - retrievedLogRemote == undefined || - retrievedLogDB == undefined || - retrievedLogDB.data == undefined || - satpLog.data == undefined - ) { - throw new Error("Test failed"); - } - - expect(retrievedLogRemote.signerPubKey).toBe(pluginSourceGateway.pubKey); - expect(retrievedLogRemote.hash).toBe( - SHA256( - JSON.stringify(satpLog, [ - "sessionID", - "type", - "key", - "operation", - "timestamp", - "data", - ]), - ).toString(), - ); - expect(retrievedLogRemote.key).toBe(satpLogKey); - - expect(retrievedLogDB.type).toBe(satpLog.type); - expect(retrievedLogDB.operation).toBe(satpLog.operation); - expect(retrievedLogDB.data).toBe(satpLog.data); - - expect(retrievedLogDB.timestamp).toBe(satpLog.timestamp); - expect(retrievedLogDB.type).toBe(satpLog.type); - expect(retrievedLogDB.operation).toBe(satpLog.operation); - expect(retrievedLogDB.sessionID).toBe(satpLog.sessionID); - expect(retrievedLogDB.key).toBe(satpLogKey); -}); - -test("successful retrieval of last log", async () => { - type2 = type + "2"; - type3 = type + "3"; - - satpLog2 = { - sessionID: sessionID, - type: type2, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog3 = { - sessionID: sessionID, - type: type3, - operation: operation, - data: JSON.stringify(sessionData), - }; - - await pluginSourceGateway.storeLog(satpLog2); - await pluginSourceGateway.storeLog(satpLog3); - - const lastLog = await pluginSourceGateway.getLastLogFromDatabase(sessionID); - - if ( - lastLog == undefined || - satpLog3 == undefined || - lastLog.data == undefined || - satpLog3.data == undefined - ) { - throw new Error("Test failed"); - } - - expect(lastLog.type).toBe(satpLog3.type); - expect(lastLog.operation).toBe(satpLog3.operation); - expect(lastLog.data).toBe(satpLog3.data); - - expect(lastLog.timestamp).toBe(satpLog3.timestamp); - expect(lastLog.type).toBe(satpLog3.type); - expect(lastLog.operation).toBe(satpLog3.operation); - expect(lastLog.sessionID).toBe(satpLog3.sessionID); - expect(lastLog.key).toBe( - PluginSATPGateway.getSatpLogKey(sessionID, type3, operation), - ); -}); - -test("successful retrieval of logs more recent than another log", async () => { - type2 = type + "2"; - type3 = type + "3"; - - satpLog2 = { - sessionID: sessionID, - type: type2, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog3 = { - sessionID: sessionID, - type: type3, - operation: operation, - data: JSON.stringify(sessionData), - }; - - await pluginSourceGateway.storeLog(satpLog2); - - const referenceTimestamp = Date.now().toString(); - await new Promise((resolve) => setTimeout(resolve, 1000)); - - await pluginSourceGateway.storeLog(satpLog); - await pluginSourceGateway.storeLog(satpLog3); - - const moreRecentLogs = - await pluginSourceGateway.getLogsMoreRecentThanTimestamp( - referenceTimestamp, - ); - - if ( - moreRecentLogs == undefined || - moreRecentLogs.length != 2 || - moreRecentLogs[0].data == undefined || - moreRecentLogs[1].data == undefined || - satpLog.data == undefined || - satpLog3.data == undefined - ) { - throw new Error("Test failed"); - } - - expect(moreRecentLogs[0].type).toBe(satpLog.type); - expect(moreRecentLogs[0].operation).toBe(satpLog.operation); - expect(moreRecentLogs[0].data).toBe(satpLog.data); - - expect(moreRecentLogs[0].timestamp).toBe(satpLog.timestamp); - expect(moreRecentLogs[0].type).toBe(satpLog.type); - expect(moreRecentLogs[0].operation).toBe(satpLog.operation); - expect(moreRecentLogs[0].sessionID).toBe(satpLog.sessionID); - expect(moreRecentLogs[0].key).toBe( - PluginSATPGateway.getSatpLogKey(sessionID, type, operation), - ); - - expect(moreRecentLogs[1].type).toBe(satpLog3.type); - expect(moreRecentLogs[1].operation).toBe(satpLog3.operation); - expect(moreRecentLogs[1].data).toBe(satpLog3.data); - - expect(moreRecentLogs[1].timestamp).toBe(satpLog3.timestamp); - expect(moreRecentLogs[1].type).toBe(satpLog3.type); - expect(moreRecentLogs[1].operation).toBe(satpLog3.operation); - expect(moreRecentLogs[1].sessionID).toBe(satpLog3.sessionID); - expect(moreRecentLogs[1].key).toBe( - PluginSATPGateway.getSatpLogKey(sessionID, type3, operation), - ); -}); - -test("successful retrieval of logs when there are no more recent logs", async () => { - const moreRecentLogs = - await pluginSourceGateway.getLogsMoreRecentThanTimestamp( - Date.now().toString(), - ); - - expect(moreRecentLogs).not.toBeUndefined(); - expect(moreRecentLogs?.length).toBe(0); -}); - -test("successful recover of sessions after crash", async () => { - const newSessionID = uuidv4(); - const newStep = 4; - - type2 = type + "2"; - type3 = type + "3"; - type4 = type + "4"; - - const data = { - id: newSessionID, - step: newStep, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - satpLog2 = { - sessionID: sessionID, - type: type2, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog3 = { - sessionID: sessionID, - type: type3, - operation: operation, - data: JSON.stringify(sessionData), - }; - - satpLog4 = { - sessionID: newSessionID, - type: type4, - operation: operation, - data: JSON.stringify(data), - }; - - pluginSourceGateway.sessions.set(newSessionID, data); - - await pluginSourceGateway.storeLog(satpLog); - await pluginSourceGateway.storeLog(satpLog3); - await pluginSourceGateway.storeLog(satpLog2); - await pluginSourceGateway.storeLog(satpLog4); - - // simulate the crash of one gateway - pluginSourceGateway.localRepository?.destroy(); - const newPluginSourceGateway = new FabricSATPGateway( - sourceGatewayConstructor, - ); - - await newPluginSourceGateway.recoverOpenSessions(false); - - const sessions = newPluginSourceGateway.sessions.values(); - - expect(newPluginSourceGateway.sessions.size).toBe(2); - - for (const session of sessions) { - if (session.id == sessionID) { - expect(session.step).toBe(step); - } else if (session.id == newSessionID) { - expect(session.step).toBe(newStep); - } else { - throw new Error("Test failed."); - } - - expect(data.sourceGatewayPubkey).toBe(newPluginSourceGateway.pubKey); - expect(data.recipientGatewayPubkey).toBe(pluginRecipientGateway.pubKey); - } - - newPluginSourceGateway.localRepository?.destroy(); -}); - -afterEach(async () => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts deleted file mode 100644 index 63906805fe..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; - -import { - RecoverSuccessV1Message, - SessionData, -} from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { checkValidRecoverSuccessMessage } from "../../../../main/typescript/recovery/recover-success"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sessionID: string; -let sessionData: SessionData; - -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - if ( - pluginSourceGateway.localRepository?.database == undefined || - pluginRecipientGateway.localRepository?.database == undefined - ) { - throw new Error("Database is not correctly initialized"); - } - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid recover success message from client", async () => { - const recoverSuccessMessage: RecoverSuccessV1Message = { - sessionID: sessionID, - signature: "", - success: true, - }; - - recoverSuccessMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverSuccessMessage)), - ); - - await checkValidRecoverSuccessMessage( - recoverSuccessMessage, - pluginRecipientGateway, - ); -}); - -test("valid recover success message from server", async () => { - const recoverSuccessMessage: RecoverSuccessV1Message = { - sessionID: sessionID, - signature: "", - success: true, - }; - - recoverSuccessMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverSuccessMessage)), - ); - - await checkValidRecoverSuccessMessage( - recoverSuccessMessage, - pluginSourceGateway, - ).catch(() => { - throw new Error("Test failed"); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts deleted file mode 100644 index 52ad598046..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; - -import { - RecoverUpdateAckV1Message, - SessionData, -} from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { checkValidRecoverUpdateAckMessage } from "../../../../main/typescript/recovery/recover-update-ack"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sessionID: string; -let sessionData: SessionData; - -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid recover update ack message from client", async () => { - const recoverUpdateAckMessage: RecoverUpdateAckV1Message = { - sessionID: sessionID, - signature: "", - success: true, - changedEntriesHash: [], - }; - - recoverUpdateAckMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverUpdateAckMessage)), - ); - - await checkValidRecoverUpdateAckMessage( - recoverUpdateAckMessage, - pluginRecipientGateway, - ); -}); - -test("valid recover update ack message from server", async () => { - const recoverUpdateAckMessage: RecoverUpdateAckV1Message = { - sessionID: sessionID, - signature: "", - success: true, - changedEntriesHash: [], - }; - - recoverUpdateAckMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverUpdateAckMessage)), - ); - - await checkValidRecoverUpdateAckMessage( - recoverUpdateAckMessage, - pluginSourceGateway, - ).catch(() => { - throw new Error("Test failed"); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts deleted file mode 100644 index fc702e75a9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ /dev/null @@ -1,209 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import "jest-extended"; -import { Secp256k1Keys } from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; - -import { - RecoverUpdateV1Message, - RecoverV1Message, - SessionData, -} from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { - checkValidRecoverUpdateMessage, - sendRecoverUpdateMessage, -} from "../../../../main/typescript/recovery/recover-update"; - -import { checkValidRecoverMessage } from "../../../../main/typescript/recovery/recover"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sessionID: string; -let sessionData: SessionData; - -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid recover update message from server", async () => { - const recoverUpdateMessage: RecoverUpdateV1Message = { - sessionID: sessionID, - recoveredLogs: [], - signature: "", - }; - - recoverUpdateMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverUpdateMessage)), - ); - - await checkValidRecoverUpdateMessage( - recoverUpdateMessage, - pluginSourceGateway, - ).catch(() => { - throw new Error("Test failed"); - }); -}); - -test("check valid build of recover update message", async () => { - const sessionData1: SessionData = { - id: sessionID, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "", - lastSequenceNumber: 1, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData1); - - const sessionData2 = { - id: sessionID, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "", - recipientBasePath: "", - lastSequenceNumber: 2, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - }; - - pluginRecipientGateway.sessions.set(sessionID, sessionData2); - - const firstTimestamp = Date.now().toString(); - await new Promise((resolve) => setTimeout(resolve, 5000)); - - await pluginSourceGateway.storeLog({ - sessionID: sessionID, - type: "init", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - await pluginRecipientGateway.storeLog({ - sessionID: sessionID, - type: "exec", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - await pluginRecipientGateway.storeLog({ - sessionID: sessionID, - type: "done", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - await pluginRecipientGateway.storeLog({ - sessionID: sessionID, - type: "ack", - operation: "validate", - data: JSON.stringify(sessionData), - }); - - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: firstTimestamp, - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverMessage)), - ); - - await checkValidRecoverMessage(recoverMessage, pluginRecipientGateway); - - const recoverUpdateMessage: RecoverUpdateV1Message | void = - await sendRecoverUpdateMessage(sessionID, pluginRecipientGateway, false); - - if (recoverUpdateMessage == void 0) { - throw new Error("Test Failed"); - } - - expect(recoverUpdateMessage.recoveredLogs.length).toBe(3); - - await checkValidRecoverUpdateMessage( - recoverUpdateMessage, - pluginSourceGateway, - ); - - expect(pluginSourceGateway.sessions.size).toBe(1); - - const [sessionId] = pluginSourceGateway.sessions.keys(); - - expect(pluginRecipientGateway.sessions.get(sessionId)).toBe(sessionData2); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts deleted file mode 100644 index 66a248cfe6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ /dev/null @@ -1,153 +0,0 @@ -import "jest-extended"; -import { Secp256k1Keys } from "@hyperledger/cactus-common"; -import { v4 as uuidV4 } from "uuid"; -import { PluginSATPGateway } from "../../../../main/typescript/plugin-satp-gateway"; - -import { RecoverV1Message } from "../../../../main/typescript/public-api"; -import { randomInt } from "crypto"; -import { checkValidRecoverMessage } from "../../../../main/typescript/recovery/recover"; - -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -import { - knexClientConnection, - knexRemoteConnection, - knexServerConnection, -} from "../../knex.config"; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let sessionID: string; - -let sequenceNumber: number; - -beforeEach(async () => { - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexClientConnection, - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - keyPair: Secp256k1Keys.generateKeyPairsBuffer(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexLocalConfig: knexServerConnection, - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - const sessionData = { - lastSequenceNumber: sequenceNumber, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - step: 0, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); -}); - -test("valid recover message request from client", async () => { - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: "sometimestamp", - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(recoverMessage)), - ); - - await checkValidRecoverMessage(recoverMessage, pluginRecipientGateway); -}); - -test("valid recover message request from server", async () => { - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: "sometimestamp", - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify(recoverMessage)), - ); - - await checkValidRecoverMessage(recoverMessage, pluginSourceGateway).catch( - () => { - throw new Error("Test failed"); - }, - ); -}); - -test("recover message request from client with wrong signature", async () => { - const recoverMessage: RecoverV1Message = { - sessionID: sessionID, - odapPhase: "1", - sequenceNumber: sequenceNumber, - lastLogEntryTimestamp: "sometimestamp", - signature: "", - isBackup: false, - newBasePath: "", - }; - - recoverMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginRecipientGateway.sign(JSON.stringify("wrongRecoverMessage")), - ); - - await checkValidRecoverMessage(recoverMessage, pluginSourceGateway) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("message signature verification failed"), - ); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts deleted file mode 100644 index 8aa8aa03d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ /dev/null @@ -1,265 +0,0 @@ -import { randomInt } from "crypto"; -import { v4 as uuidv4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; - -import { LocalLog } from "../../../../main/typescript/core/types"; - -import { - CommitFinalV1Request, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; - -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const COMMIT_FINAL_CLAIM = "dummyCommitFinalClaim"; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let dummyCommitPreparationResponseMessageHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidv4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - dummyCommitPreparationResponseMessageHash = SHA256( - "commitPreparationResponseMessageData", - ).toString(); - - sessionID = uuidv4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitPrepareResponseMessageHash: dummyCommitPreparationResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "delete", - data: COMMIT_FINAL_CLAIM, - } as LocalLog); -}); - -test("valid commit final request", async () => { - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: dummyCommitPreparationResponseMessageHash, - commitFinalClaim: COMMIT_FINAL_CLAIM, - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - const requestHash = SHA256( - JSON.stringify(commitFinalRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.commitFinalClaim).toBe(COMMIT_FINAL_CLAIM); - - expect(sessionInfo.commitFinalRequestMessageHash).toBe(requestHash); - - expect(sessionInfo.clientSignatureCommitFinalRequestMessage).toBe( - commitFinalRequestMessage.signature, - ); -}); - -test("commit final request with wrong sessionId", async () => { - const wrongSessionId = uuidv4(); - - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: dummyCommitPreparationResponseMessageHash, - commitFinalClaim: "", - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("commit final request with wrong message type", async () => { - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalResponse, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: dummyCommitPreparationResponseMessageHash, - commitFinalClaim: "", - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("wrong message type for CommitFinalRequest"), - ); -}); - -test("commit final request with wrong previous message hash", async () => { - const commitFinalRequestMessage: CommitFinalV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommitPrepareAck: "dummyCommitPreparationResponseMessageHash", - commitFinalClaim: COMMIT_FINAL_CLAIM, - sequenceNumber: sequenceNumber + 1, - }; - - commitFinalRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitFinalRequest( - commitFinalRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("previous message hash does not match"), - ); -}); - -test("timeout in commit final response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitAcknowledgementClaim: "dummyCommitAcknowledgementClaim", - commitFinalRequestMessageHash: "dummyCommitFinalRequestMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendCommitFinalResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts deleted file mode 100644 index 6df59514e9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts +++ /dev/null @@ -1,243 +0,0 @@ -import { randomInt } from "crypto"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - CommitPreparationV1Request, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let dummyLockEvidenceResponseMessageHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - dummyLockEvidenceResponseMessageHash = SHA256( - "lockEvidenceResponseMessageData", - ).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceResponseMessageHash: dummyLockEvidenceResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid commit prepare request", async () => { - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: dummyLockEvidenceResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - const requestHash = SHA256( - JSON.stringify(commitPrepareRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.commitPrepareRequestMessageHash).toBe(requestHash); - - expect(sessionInfo.clientSignatureCommitPreparationRequestMessage).toBe( - commitPrepareRequestMessage.signature, - ); -}); - -test("commit prepare request with wrong sessionId", async () => { - const wrongSessionId = uuidV4(); - - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: dummyLockEvidenceResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("commit prepare request with wrong message type", async () => { - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitFinalResponse, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: dummyLockEvidenceResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "wrong message type for CommitPreparationRequest", - ), - ); -}); - -test("commit prepare request with wrong previous message hash", async () => { - const commitPrepareRequestMessage: CommitPreparationV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.CommitPreparationRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashLockEvidenceAck: "wrongLockEvidenceResponseMessageHash", - sequenceNumber: sequenceNumber + 1, - }; - - commitPrepareRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidCommitPreparationRequest( - commitPrepareRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("previous message hash does not match"), - ); -}); - -test("timeout in commit preparation response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitPrepareRequestMessageHash: "dummyCommitPrepareRequestMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendCommitPreparationResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts deleted file mode 100644 index d5ba51bda4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { randomInt } from "crypto"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - LockEvidenceV1Request, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; - -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -const LOCK_EVIDENCE_CLAIM = "dummyLockEvidenceClaim"; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let dummyTransferCommenceResponseMessageHash: string; -let sessionData: SessionData; -let lockExpiryDate: string; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - dummyTransferCommenceResponseMessageHash = SHA256( - "transferCommenceResponseMessageData", - ).toString(); - - lockExpiryDate = new Date().setDate(new Date().getDate() + 1).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageResponseHash: - dummyTransferCommenceResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - await pluginSourceGateway.storeProof({ - sessionID: sessionID, - type: "proof", - operation: "lock", - data: LOCK_EVIDENCE_CLAIM, - }); -}); - -test("valid lock evidence request", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: LOCK_EVIDENCE_CLAIM, - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - const requestHash = SHA256( - JSON.stringify(lockEvidenceRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.lockEvidenceRequestMessageHash).toBe(requestHash); - expect(sessionInfo.lockEvidenceResponseMessageHash).not.toBe(""); - - expect(sessionInfo.clientSignatureLockEvidenceRequestMessage).toBe( - lockEvidenceRequestMessage.signature, - ); -}); - -test("lock evidence request with wrong sessionId", async () => { - const wrongSessionId = uuidV4(); - - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: lockExpiryDate.toString(), - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("lock evidence request with wrong message type", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceResponse, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: lockExpiryDate.toString(), - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("wrong message type for LockEvidenceRequest"), - ); -}); - -test("lock evidence request with wrong previous message hash", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: "wrongPrevMessageHash", - lockEvidenceClaim: lockExpiryDate.toString(), - lockEvidenceExpiration: new Date(2060, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("previous message hash does not match"), - ); -}); - -test("transfer commence flow with invalid claim", async () => { - const lockEvidenceRequestMessage: LockEvidenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.LockEvidenceRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashCommenceAckRequest: dummyTransferCommenceResponseMessageHash, - lockEvidenceClaim: "", - lockEvidenceExpiration: new Date(2020, 11, 24).toString(), - sequenceNumber: sequenceNumber + 1, - }; - - lockEvidenceRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidLockEvidenceRequest( - lockEvidenceRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("invalid or expired lock evidence claim"), - ); -}); - -test("timeout in lock evidence response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - lockEvidenceClaim: "dummyLockEvidenceClaim", - lockEvidenceRequestMessageHash: "dummyLockEvidenceRequestMessageHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginRecipientGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendLockEvidenceResponse(sessionID, pluginRecipientGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts deleted file mode 100644 index d792f45ab5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts +++ /dev/null @@ -1,351 +0,0 @@ -import { randomInt } from "crypto"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - TransferCommenceV1Request, - AssetProfile, - SessionData, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let dummyInitializationResponseMessageHash: string; -let expiryDate: string; -let assetProfile: AssetProfile; -let assetProfileHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - dummyInitializationResponseMessageHash = SHA256( - "initializationResponseMessageData", - ).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - expiryDate = new Date(2060, 11, 24).toString(); - assetProfile = { expirationDate: expiryDate }; - assetProfileHash = SHA256(JSON.stringify(assetProfile)).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - initializationResponseMessageHash: dummyInitializationResponseMessageHash, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - sourceGatewayDltSystem: "DLT2", - recipientGatewayDltSystem: "DLT1", - assetProfile: assetProfile, - step: 1, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("valid transfer commence request", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "originatorDummyPubKey", - beneficiaryPubkey: "beneficiaryDummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - const requestHash = SHA256( - JSON.stringify(transferCommenceRequest), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ); - - const sessionInfo = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionInfo == null) throw new Error("Test Failed"); - - expect(sessionInfo.transferCommenceMessageRequestHash).toBe(requestHash); - expect(sessionInfo.clientSignatureTransferCommenceRequestMessage).toBe( - transferCommenceRequest.signature, - ); - expect(sessionInfo.serverSignatureTransferCommenceResponseMessage).not.toBe( - "", - ); - expect(sessionInfo.originatorPubkey).toBe("originatorDummyPubKey"); - expect(sessionInfo.beneficiaryPubkey).toBe("beneficiaryDummyPubKey"); -}); - -test("transfer commence request with wrong sessionId", async () => { - const wrongSessionId = uuidV4(); - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: wrongSessionId, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "session Id does not correspond to any open session", - ), - ); -}); - -test("transfer commence request with wrong message type", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceResponse, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "wrong message type for TransferCommenceRequest", - ), - ); -}); - -test("transfer commence request with wrong signature", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify("wrongData")), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "TransferCommenceRequest message signature verification failed", - ), - ); -}); - -test("transfer commence request with wrong previous message hash", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: "wrongPrevMessageHash", - hashAssetProfile: assetProfileHash, - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "previous message hash does not match the one that was sent", - ), - ); -}); - -test("transfer commence request with wrong asset profile hash", async () => { - const transferCommenceRequest: TransferCommenceV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCommenceRequest, - originatorPubkey: "dummyPubKey", - beneficiaryPubkey: "dummyPubKey", - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - hashPrevMessage: dummyInitializationResponseMessageHash, - hashAssetProfile: "wrongAssetProfileHash", - senderDltSystem: "dummy", - recipientDltSystem: "dummy", - signature: "", - sequenceNumber: sequenceNumber + 1, - }; - - transferCommenceRequest.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidtransferCommenceRequest( - transferCommenceRequest, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch("assetProfile hash not match"), - ); -}); - -test("timeout in transfer commence response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - transferCommenceMessageRequestHash: - "dummyTransferCommenceMessageRequestHash", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendTransferCommenceResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts deleted file mode 100644 index df206cffd4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - SessionData, - TransferCompleteV1Request, -} from "../../../../main/typescript/generated/openapi/typescript-axios/api"; -import { v4 as uuidV4 } from "uuid"; -import { SHA256 } from "crypto-js"; -import { randomInt } from "crypto"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; -import { knexRemoteConnection } from "../../knex.config"; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let dummyCommitFinalResponseMessageHash: string; -let dummyTransferCommenceResponseMessageHash: string; -let sessionData: SessionData; -let sessionID: string; -let sequenceNumber: number; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - knexRemoteConfig: knexRemoteConnection, - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - dummyCommitFinalResponseMessageHash = SHA256( - "commitFinalResponseMessageData", - ).toString(); - - dummyTransferCommenceResponseMessageHash = SHA256( - "transferCommenceResponseMessageData", - ).toString(); - - sessionID = uuidV4(); - sequenceNumber = randomInt(100); - - sessionData = { - id: sessionID, - sourceGatewayPubkey: pluginSourceGateway.pubKey, - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - commitFinalResponseMessageHash: dummyCommitFinalResponseMessageHash, - transferCommenceMessageRequestHash: - dummyTransferCommenceResponseMessageHash, - step: 2, - lastSequenceNumber: sequenceNumber, - maxTimeout: 0, - maxRetries: 0, - rollbackProofs: [], - sourceBasePath: "", - recipientBasePath: "", - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - pluginRecipientGateway.sessions.set(sessionID, sessionData); -}); - -test("dummy test for transfer complete flow", async () => { - const transferCompleteRequestMessage: TransferCompleteV1Request = { - sessionID: sessionID, - messageType: SatpMessageType.TransferCompleteRequest, - clientIdentityPubkey: pluginSourceGateway.pubKey, - serverIdentityPubkey: pluginRecipientGateway.pubKey, - signature: "", - hashTransferCommence: dummyTransferCommenceResponseMessageHash, - hashCommitFinalAck: dummyCommitFinalResponseMessageHash, - sequenceNumber: sequenceNumber + 1, - }; - - transferCompleteRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(transferCompleteRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper.checkValidTransferCompleteRequest( - transferCompleteRequestMessage, - pluginRecipientGateway, - ); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts deleted file mode 100644 index 0ed8286bde..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts +++ /dev/null @@ -1,264 +0,0 @@ -import { randomInt } from "crypto"; -import { SHA256 } from "crypto-js"; -import { v4 as uuidV4 } from "uuid"; -import { - SatpMessageType, - PluginSATPGateway, -} from "../../../../main/typescript/plugin-satp-gateway"; -import { - TransferInitializationV1Request, - AssetProfile, - SessionData, -} from "../../../../main/typescript/public-api"; -import { BesuSATPGateway } from "../../../../main/typescript/core/besu-satp-gateway"; -import { FabricSATPGateway } from "../../../../main/typescript/core/fabric-satp-gateway"; -import { ClientGatewayHelper } from "../../../../main/typescript/core/client-helper"; -import { ServerGatewayHelper } from "../../../../main/typescript/core/server-helper"; - -const MAX_RETRIES = 5; -const MAX_TIMEOUT = 5000; - -let pluginSourceGateway: PluginSATPGateway; -let pluginRecipientGateway: PluginSATPGateway; -let expiryDate: string; -let assetProfile: AssetProfile; -let sequenceNumber: number; -let sessionID: string; - -beforeEach(async () => { - const sourceGatewayConstructor = { - name: "plugin-satp-gateway#sourceGateway", - dltIDs: ["DLT2"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - const recipientGatewayConstructor = { - name: "plugin-satp-gateway#recipientGateway", - dltIDs: ["DLT1"], - instanceId: uuidV4(), - clientHelper: new ClientGatewayHelper(), - serverHelper: new ServerGatewayHelper(), - }; - - pluginSourceGateway = new FabricSATPGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuSATPGateway(recipientGatewayConstructor); - - expect(pluginSourceGateway.localRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.localRepository?.database).not.toBeUndefined(); - - expect(pluginSourceGateway.remoteRepository?.database).not.toBeUndefined(); - expect(pluginRecipientGateway.remoteRepository?.database).not.toBeUndefined(); - - await pluginSourceGateway.localRepository?.reset(); - await pluginRecipientGateway.localRepository?.reset(); - - await pluginSourceGateway.remoteRepository?.reset(); - await pluginRecipientGateway.remoteRepository?.reset(); - - expiryDate = new Date(2060, 11, 24).toString(); - assetProfile = { expirationDate: expiryDate }; - - sequenceNumber = randomInt(100); - sessionID = uuidV4(); -}); - -test("valid transfer initiation request", async () => { - const initializationRequestMessage: TransferInitializationV1Request = { - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionID, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - signature: "", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - sourceGatewayDltSystem: "DLT1", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - sequenceNumber: sequenceNumber, - recipientBasePath: "", - sourceBasePath: "", - backupGatewaysAllowed: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - initializationRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationRequestMessage), - ), - ); - - const messageHash = SHA256( - JSON.stringify(initializationRequestMessage), - ).toString(); - - await pluginRecipientGateway.serverHelper.checkValidInitializationRequest( - initializationRequestMessage, - pluginRecipientGateway, - ); - - const sessionData = pluginRecipientGateway.sessions.get(sessionID); - - if (sessionData == undefined) throw new Error("Test failed"); - - expect(sessionData.step).not.toBe(0); - expect(sessionData.lastSequenceNumber).toBe(sequenceNumber); - expect(sessionData.loggingProfile).toBe("dummyLoggingProfile"); - expect(sessionData.accessControlProfile).toBe("dummyAccessControlProfile"); - expect(sessionData.applicationProfile).toBe("dummyApplicationProfile"); - expect(JSON.stringify(sessionData.assetProfile)).toBe( - JSON.stringify(assetProfile), - ); - expect(sessionData.sourceGatewayPubkey).toBe(pluginSourceGateway.pubKey); - expect(sessionData.recipientGatewayPubkey).toBe( - pluginRecipientGateway.pubKey, - ); - expect(sessionData.sourceGatewayDltSystem).toBe("DLT1"); - expect(sessionData.recipientGatewayDltSystem).toBe("DLT2"); - - expect(sessionData.initializationRequestMessageHash).toBe(messageHash); - - expect(sessionData.clientSignatureInitializationRequestMessage).toBe( - initializationRequestMessage.signature, - ); -}); - -test("transfer initiation request invalid because of incompatible DLTs", async () => { - const initializationRequestMessage: TransferInitializationV1Request = { - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionID, - version: "0.0.0", - loggingProfile: "dummy", - accessControlProfile: "dummy", - applicationProfile: "dummy", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - signature: "", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - sourceGatewayDltSystem: "DLT2", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT1", - sequenceNumber: sequenceNumber, - recipientBasePath: "", - sourceBasePath: "", - backupGatewaysAllowed: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - initializationRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - await pluginSourceGateway.sign( - JSON.stringify(initializationRequestMessage), - ), - ); - - await pluginRecipientGateway.serverHelper - .checkValidInitializationRequest( - initializationRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => - expect(ex.message).toMatch( - "source gateway dlt system is not supported by this gateway", - ), - ); -}); - -test("transfer initiation request invalid because of asset expired", async () => { - expiryDate = new Date(2020, 11, 24).toString(); - assetProfile = { expirationDate: expiryDate }; - - const initializationRequestMessage: TransferInitializationV1Request = { - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - messageType: SatpMessageType.InitializationRequest, - sessionID: sessionID, - version: "0.0.0", - loggingProfile: "dummy", - accessControlProfile: "dummy", - applicationProfile: "dummy", - payloadProfile: { - assetProfile: assetProfile, - capabilities: "", - }, - signature: "", - sourceGatewayPubkey: pluginSourceGateway.pubKey, - sourceGatewayDltSystem: "DLT1", - recipientGatewayPubkey: pluginRecipientGateway.pubKey, - recipientGatewayDltSystem: "DLT2", - sequenceNumber: sequenceNumber, - recipientBasePath: "", - sourceBasePath: "", - backupGatewaysAllowed: [], - recipientLedgerAssetID: "", - sourceLedgerAssetID: "", - }; - - initializationRequestMessage.signature = PluginSATPGateway.bufArray2HexStr( - pluginSourceGateway.sign(JSON.stringify(initializationRequestMessage)), - ); - - await pluginRecipientGateway.serverHelper - .checkValidInitializationRequest( - initializationRequestMessage, - pluginRecipientGateway, - ) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => expect(ex.message).toMatch("asset has expired")); -}); - -test("timeout in commit final response because no client gateway is connected", async () => { - const sessionData: SessionData = { - id: sessionID, - step: 1, - maxRetries: MAX_RETRIES, - maxTimeout: MAX_TIMEOUT, - sourceBasePath: "http://wrongpath", - recipientBasePath: "", - lastSequenceNumber: 77, - initializationRequestMessageHash: - "dummyInitializationRequestMessageProcessedTimeStamp", - initializationRequestMessageRcvTimeStamp: - "dummyInitializationRequestMessageProcessedTimeStamp", - initializationRequestMessageProcessedTimeStamp: - "dummyInitializationRequestMessageProcessedTimeStamp", - lastMessageReceivedTimestamp: new Date().toString(), - rollbackProofs: [], - rollbackActionsPerformed: [], - }; - - pluginSourceGateway.sessions.set(sessionID, sessionData); - - await pluginRecipientGateway.serverHelper - .sendTransferInitializationResponse(sessionID, pluginSourceGateway, true) - .then(() => { - throw new Error("Test Failed"); - }) - .catch((ex: Error) => { - expect(ex.message).toMatch("message failed."); - }); -}); - -afterEach(() => { - pluginSourceGateway.localRepository?.destroy(); - pluginRecipientGateway.localRepository?.destroy(); - pluginSourceGateway.remoteRepository?.destroy(); - pluginRecipientGateway.remoteRepository?.destroy(); -}); diff --git a/tsconfig.json b/tsconfig.json index dd286a11dd..a9e8e7d6eb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -166,9 +166,6 @@ { "path": "./examples/cactus-example-discounted-asset-trade-client/tsconfig.json" }, - { - "path": "./examples/cactus-example-cbdc-bridging-backend/tsconfig.json" - }, { "path": "./examples/cactus-example-cbdc-bridging-frontend/tsconfig.json" }, diff --git a/yarn.lock b/yarn.lock index 594166a6da..c3f0dcdcce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1864,7 +1864,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.22.10, @babel/generator@npm:^7.4.0": +"@babel/generator@npm:^7.22.10": version: 7.22.10 resolution: "@babel/generator@npm:7.22.10" dependencies: @@ -3171,15 +3171,6 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.4.3": - version: 7.22.10 - resolution: "@babel/parser@npm:7.22.10" - bin: - parser: ./bin/babel-parser.js - checksum: 10/a11e93c9b371bdd9c44bc96fd37e63eca8450fd11c19f9a8b1d7e2582835a3db970d8202a21736d04c653c8d1facde7b66c15c15bbf095047b7ca98e057a5eb9 - languageName: node - linkType: hard - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5": version: 7.22.15 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.15" @@ -5541,7 +5532,7 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:7.22.5, @babel/template@npm:^7.22.5, @babel/template@npm:^7.4.0": +"@babel/template@npm:7.22.5, @babel/template@npm:^7.22.5": version: 7.22.5 resolution: "@babel/template@npm:7.22.5" dependencies: @@ -5700,7 +5691,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.22.10, @babel/types@npm:^7.4.0": +"@babel/types@npm:^7.22.10": version: 7.22.10 resolution: "@babel/types@npm:7.22.10" dependencies: @@ -16833,20 +16824,6 @@ __metadata: languageName: node linkType: hard -"@types/crypto-js@npm:4.1.1": - version: 4.1.1 - resolution: "@types/crypto-js@npm:4.1.1" - checksum: 10/822e798b97ef6f8f4d3114151547c90569b253356e3fb2f6d9bf44c072148a1e9a90685b439cced0374d72fc9c187bf25a77d64d42493c472850e9ea21eb2cbd - languageName: node - linkType: hard - -"@types/cucumber@npm:4.0.4": - version: 4.0.4 - resolution: "@types/cucumber@npm:4.0.4" - checksum: 10/c296941f0e80344c2a752fe21da73865788225e2914c189d875d9bd00dc408e7509e50d3584de9bf954837243fd26fa5f17e90d147dc79614b2b7d8af4a5dbf8 - languageName: node - linkType: hard - "@types/debug@npm:4.1.12": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -16995,16 +16972,6 @@ __metadata: languageName: node linkType: hard -"@types/express-jwt@npm:6.0.2": - version: 6.0.2 - resolution: "@types/express-jwt@npm:6.0.2" - dependencies: - "@types/express": "npm:*" - "@types/express-unless": "npm:*" - checksum: 10/0fffb222216173342ba9fa53878153012563827645ccc59e3ed46b9facd1249ba3967fd38a28417a40fb669d5b5182c75b7992813e516adc6be9b95a0559e807 - languageName: node - linkType: hard - "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": version: 4.17.28 resolution: "@types/express-serve-static-core@npm:4.17.28" @@ -17050,15 +17017,6 @@ __metadata: languageName: node linkType: hard -"@types/express-unless@npm:*": - version: 0.5.3 - resolution: "@types/express-unless@npm:0.5.3" - dependencies: - "@types/express": "npm:*" - checksum: 10/5c76425ff7490123f3c072c942ae6d18bb3cbf91d5d9857c52fca1f9a3d11b72413dbfb3e4af28fdd7f745d1a443f90daadbcf7daff714d608eef10bd7c8763c - languageName: node - linkType: hard - "@types/express@npm:*": version: 4.17.13 resolution: "@types/express@npm:4.17.13" @@ -19280,15 +19238,6 @@ __metadata: languageName: node linkType: hard -"abstract-leveldown@npm:^5.0.0, abstract-leveldown@npm:~5.0.0": - version: 5.0.0 - resolution: "abstract-leveldown@npm:5.0.0" - dependencies: - xtend: "npm:~4.0.0" - checksum: 10/bce08839fc5a9be06308c3c9669c5b5b31932b8994fb44599c9190a02592fd4eee7441bfc1de780ce7c2cadfa23e865e57a80f34f0005c8b4218a905518ad21f - languageName: node - linkType: hard - "abstract-leveldown@npm:^6.2.1": version: 6.3.0 resolution: "abstract-leveldown@npm:6.3.0" @@ -19311,15 +19260,6 @@ __metadata: languageName: node linkType: hard -"abstract-leveldown@npm:~2.6.0": - version: 2.6.3 - resolution: "abstract-leveldown@npm:2.6.3" - dependencies: - xtend: "npm:~4.0.0" - checksum: 10/3f9db6c3c77991018adcad133acb2e084446d7583753c46343ec3ba6ff60ab89cd1aa3813b2131ccc92191863802cacbca3240490fadde20118845267643c543 - languageName: node - linkType: hard - "abstract-leveldown@npm:~2.7.1": version: 2.7.2 resolution: "abstract-leveldown@npm:2.7.2" @@ -19622,15 +19562,6 @@ __metadata: languageName: node linkType: hard -"ajv-keywords@npm:^1.0.0": - version: 1.5.1 - resolution: "ajv-keywords@npm:1.5.1" - peerDependencies: - ajv: ">=4.10.0" - checksum: 10/e7eaae4f41d0c4178b611aa63f4dc2e94cb069a8c9017fe68f34cea5a5eefe5430e93906b7abe8b093f4a6297487ebbbd09ad065b323a7d59ea352d401266557 - languageName: node - linkType: hard - "ajv-keywords@npm:^2.1.0": version: 2.1.1 resolution: "ajv-keywords@npm:2.1.1" @@ -19684,16 +19615,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^4.7.0": - version: 4.11.8 - resolution: "ajv@npm:4.11.8" - dependencies: - co: "npm:^4.6.0" - json-stable-stringify: "npm:^1.0.1" - checksum: 10/dc008cdd33190af18a0f807f9823a16b0d756a5f26bbcaa50d6ed72f86d419654d9e9c35853e5ba81ef535485d8931c37fc71da53b3bb7a15e278ee141c616b7 - languageName: node - linkType: hard - "ajv@npm:^5.2.3, ajv@npm:^5.3.0": version: 5.5.2 resolution: "ajv@npm:5.5.2" @@ -19765,13 +19686,6 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^1.1.0": - version: 1.4.0 - resolution: "ansi-escapes@npm:1.4.0" - checksum: 10/287f18ea70cde710dbb83b6b6c4e1d62fcb962b951a601d976df69478a4ebdff6305691e3befb9053d740060544929732b8bade7a9781611dcd2b997e6bda3d6 - languageName: node - linkType: hard - "ansi-escapes@npm:^3.0.0": version: 3.2.0 resolution: "ansi-escapes@npm:3.2.0" @@ -19788,15 +19702,6 @@ __metadata: languageName: node linkType: hard -"ansi-gray@npm:^0.1.1": - version: 0.1.1 - resolution: "ansi-gray@npm:0.1.1" - dependencies: - ansi-wrap: "npm:0.1.0" - checksum: 10/b1f0cfefe43fb2f2f2f324daa578f528b7079514261e9ed060de05e21d99797e5fabf69d500c466c263f9c6302751a2c0709ab52324912cdee71be249deffbf7 - languageName: node - linkType: hard - "ansi-html-community@npm:^0.0.8": version: 0.0.8 resolution: "ansi-html-community@npm:0.0.8" @@ -19880,13 +19785,6 @@ __metadata: languageName: node linkType: hard -"ansi-wrap@npm:0.1.0": - version: 0.1.0 - resolution: "ansi-wrap@npm:0.1.0" - checksum: 10/f24f652a5e450c0561cbc7d298ffa62dcd33c72f9da34fd3c24538dbf82de8fc21b7f924dc30cd9d01360bd2893d1954f0a60eee0550ca629bb148dcbeef5c5b - languageName: node - linkType: hard - "ansicolors@npm:~0.3.2": version: 0.3.2 resolution: "ansicolors@npm:0.3.2" @@ -20096,15 +19994,6 @@ __metadata: languageName: node linkType: hard -"append-transform@npm:^1.0.0": - version: 1.0.0 - resolution: "append-transform@npm:1.0.0" - dependencies: - default-require-extensions: "npm:^2.0.0" - checksum: 10/65fc4fe074aa1cf291763a5835b1e209b5e407597d6662c30b0921928be8a074f75e69e751ddf388ad16411dd61cb70351a10914090b354a7a447c7bc164b0ac - languageName: node - linkType: hard - "append-transform@npm:^2.0.0": version: 2.0.0 resolution: "append-transform@npm:2.0.0" @@ -20391,18 +20280,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.find@npm:^2.0.1": - version: 2.2.1 - resolution: "array.prototype.find@npm:2.2.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/3bde6c9137a1b11e28c8e098574ae93aa4c660f3b917ab08e7076ee8ca32704ee158d562437b38b8a5a03b0f0ccacf4df9b7a4e4b4497f4bbe66b8406dc334e5 - languageName: node - linkType: hard - "array.prototype.findlastindex@npm:^1.2.2": version: 1.2.2 resolution: "array.prototype.findlastindex@npm:1.2.2" @@ -20477,19 +20354,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.reduce@npm:^1.0.5": - version: 1.0.5 - resolution: "array.prototype.reduce@npm:1.0.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10/ad8976da587854088fe8d5290e0709d670ba0dcac840b380b4aee11eae61b25fa78c324373387d39f4242345fda9cc57ff1b0cbfe510b9afa0cd1624ab1a1cab - languageName: node - linkType: hard - "array.prototype.reduce@npm:^1.0.6": version: 1.0.6 resolution: "array.prototype.reduce@npm:1.0.6" @@ -20546,7 +20410,7 @@ __metadata: languageName: node linkType: hard -"arrify@npm:^1.0.0, arrify@npm:^1.0.1": +"arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" checksum: 10/745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 @@ -20643,17 +20507,6 @@ __metadata: languageName: node linkType: hard -"assertion-error-formatter@npm:^2.0.1": - version: 2.0.1 - resolution: "assertion-error-formatter@npm:2.0.1" - dependencies: - diff: "npm:^3.0.0" - pad-right: "npm:^0.2.2" - repeat-string: "npm:^1.6.1" - checksum: 10/6c054ba5adec3e84d145aeecfc1ade92559ae1ab1a53539fc4dbdd309e0f1ed2b813a01cf7e3300a72ce77d1db52f4379869bc3ec5250918ab36443a6cd375ef - languageName: node - linkType: hard - "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -20689,7 +20542,7 @@ __metadata: languageName: node linkType: hard -"async-eventemitter@npm:0.2.4, async-eventemitter@npm:^0.2.2": +"async-eventemitter@npm:0.2.4": version: 0.2.4 resolution: "async-eventemitter@npm:0.2.4" dependencies: @@ -20730,14 +20583,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^1.4.2": - version: 1.5.2 - resolution: "async@npm:1.5.2" - checksum: 10/8afcdcee05168250926a3e7bd4dfaa74b681a74f634bae2af424fb716042461cbd20a375d9bc2534daa50a2d45286c9b174952fb239cee4ab8d6351a40c65327 - languageName: node - linkType: hard - -"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.6.0, async@npm:^2.6.1": +"async@npm:^2.4.0": version: 2.6.4 resolution: "async@npm:2.6.4" dependencies: @@ -20746,7 +20592,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.0.0, async@npm:^3.1.0": +"async@npm:^3.0.0": version: 3.2.4 resolution: "async@npm:3.2.4" checksum: 10/bebb5dc2258c45b83fa1d3be179ae0eb468e1646a62d443c8d60a45e84041b28fccebe1e2d1f234bfc3dcad44e73dcdbf4ba63d98327c9f6556e3dbd47c2ae8b @@ -20976,7 +20822,7 @@ __metadata: languageName: node linkType: hard -"babel-code-frame@npm:^6.16.0, babel-code-frame@npm:^6.22.0": +"babel-code-frame@npm:^6.22.0": version: 6.26.0 resolution: "babel-code-frame@npm:6.26.0" dependencies: @@ -21292,16 +21138,6 @@ __metadata: languageName: node linkType: hard -"babel-runtime@npm:^6.11.6": - version: 6.26.0 - resolution: "babel-runtime@npm:6.26.0" - dependencies: - core-js: "npm:^2.4.0" - regenerator-runtime: "npm:^0.11.0" - checksum: 10/2cdf0f083b9598a43cdb11cbf1e7060584079a9a2230f06aec997ba81e887ef17fdcb5ad813a484ee099e06d2de0cea832bdd3011c06325acb284284c754ee8f - languageName: node - linkType: hard - "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -21400,13 +21236,6 @@ __metadata: languageName: node linkType: hard -"becke-ch--regex--s0-0-v1--base--pl--lib@npm:^1.2.0": - version: 1.4.0 - resolution: "becke-ch--regex--s0-0-v1--base--pl--lib@npm:1.4.0" - checksum: 10/c86e2ec70a6530a0efded204c6d27b5648e8713c6175178bea6fd1867aaaec601c9b228070fcf4b43f387ddad63fddfe935d7298f9adf7a4cff403bb5ed6ff4d - languageName: node - linkType: hard - "before-after-hook@npm:^3.0.2": version: 3.0.2 resolution: "before-after-hook@npm:3.0.2" @@ -21592,7 +21421,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:3.7.2, bluebird@npm:^3.4.1, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": +"bluebird@npm:3.7.2, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 @@ -21667,7 +21496,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": +"body-parser@npm:^1.10.0": version: 1.20.2 resolution: "body-parser@npm:1.20.2" dependencies: @@ -22104,7 +21933,7 @@ __metadata: languageName: node linkType: hard -"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": +"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb @@ -22139,15 +21968,6 @@ __metadata: languageName: node linkType: hard -"buffer-xor@npm:^2.0.1": - version: 2.0.2 - resolution: "buffer-xor@npm:2.0.2" - dependencies: - safe-buffer: "npm:^5.1.1" - checksum: 10/78226fcae9f4a0b4adec69dffc049f26f6bab240dfdd1b3f6fe07c4eb6b90da202ea5c363f98af676156ee39450a06405fddd9e8965f68a5327edcc89dcbe5d0 - languageName: node - linkType: hard - "buffer@npm:4.9.2": version: 4.9.2 resolution: "buffer@npm:4.9.2" @@ -22466,18 +22286,6 @@ __metadata: languageName: node linkType: hard -"caching-transform@npm:^2.0.0": - version: 2.0.0 - resolution: "caching-transform@npm:2.0.0" - dependencies: - make-dir: "npm:^1.0.0" - md5-hex: "npm:^2.0.0" - package-hash: "npm:^2.0.0" - write-file-atomic: "npm:^2.0.0" - checksum: 10/83275a2529b4c65cc5c59b548ec5a0e7829883518235c45ff67e344d1bca6720d7233837b88e881e940f4e372503e1265df326f18dd4d717375e87fabca6dba2 - languageName: node - linkType: hard - "caching-transform@npm:^4.0.0": version: 4.0.0 resolution: "caching-transform@npm:4.0.0" @@ -22856,7 +22664,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^1.0.0, chalk@npm:^1.1.1, chalk@npm:^1.1.3": +"chalk@npm:^1.1.3": version: 1.1.3 resolution: "chalk@npm:1.1.3" dependencies: @@ -22912,32 +22720,6 @@ __metadata: languageName: node linkType: hard -"change-case@npm:^3.0.1": - version: 3.1.0 - resolution: "change-case@npm:3.1.0" - dependencies: - camel-case: "npm:^3.0.0" - constant-case: "npm:^2.0.0" - dot-case: "npm:^2.1.0" - header-case: "npm:^1.0.0" - is-lower-case: "npm:^1.1.0" - is-upper-case: "npm:^1.1.0" - lower-case: "npm:^1.1.1" - lower-case-first: "npm:^1.0.0" - no-case: "npm:^2.3.2" - param-case: "npm:^2.1.0" - pascal-case: "npm:^2.0.0" - path-case: "npm:^2.1.0" - sentence-case: "npm:^2.1.0" - snake-case: "npm:^2.1.0" - swap-case: "npm:^1.1.0" - title-case: "npm:^2.1.0" - upper-case: "npm:^1.1.1" - upper-case-first: "npm:^1.1.0" - checksum: 10/04ecb4db5ea15b71db7d229fd4fb4034e3f8a4f3e79c3729994eb9339f401b2b18cd5e01f19c1a6a607716ad32206cdee40812df76d9808629e8694f847da8a9 - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -22980,15 +22762,6 @@ __metadata: languageName: node linkType: hard -"checkpoint-store@npm:^1.1.0": - version: 1.1.0 - resolution: "checkpoint-store@npm:1.1.0" - dependencies: - functional-red-black-tree: "npm:^1.0.1" - checksum: 10/94e921ccb222c7970615e8b2bcd956dbd52f15a1c397af0447dbdef8ecd32ffe342e394d39e55f2912278a460f3736de777b5b57a5baf229c0a6bd04d2465511 - languageName: node - linkType: hard - "cheerio-select@npm:^2.1.0": version: 2.1.0 resolution: "cheerio-select@npm:2.1.0" @@ -23220,15 +22993,6 @@ __metadata: languageName: node linkType: hard -"cli-cursor@npm:^1.0.1": - version: 1.0.2 - resolution: "cli-cursor@npm:1.0.2" - dependencies: - restore-cursor: "npm:^1.0.1" - checksum: 10/e3b4400d5e925ed11c7596f82e80e170693f69ac6f0f21da2a400043c37548dd780f985a1a5ef1ffb038e36fc6711d1d4f066b104eed851ae76e34bd883cf2bf - languageName: node - linkType: hard - "cli-cursor@npm:^2.1.0": version: 2.1.0 resolution: "cli-cursor@npm:2.1.0" @@ -23275,20 +23039,6 @@ __metadata: languageName: node linkType: hard -"cli-table3@npm:^0.5.1": - version: 0.5.1 - resolution: "cli-table3@npm:0.5.1" - dependencies: - colors: "npm:^1.1.2" - object-assign: "npm:^4.1.0" - string-width: "npm:^2.1.1" - dependenciesMeta: - colors: - optional: true - checksum: 10/5b4aaa81943c9030e3366aaf20cc4be0792397d82dea3a1660e80ce49edded4dcc722f9bf272354061c5bfa3f4236ad2fdc86bc7bb0bbf7e4b8e8d3b418b955a - languageName: node - linkType: hard - "cli-truncate@npm:2.1.0, cli-truncate@npm:^2.1.0": version: 2.1.0 resolution: "cli-truncate@npm:2.1.0" @@ -23666,7 +23416,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^10.0.0, commander@npm:^10.0.1": +"commander@npm:^10.0.1": version: 10.0.1 resolution: "commander@npm:10.0.1" checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb @@ -23680,7 +23430,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.12.1, commander@npm:^2.13.0, commander@npm:^2.15.0, commander@npm:^2.19.0, commander@npm:^2.20.0, commander@npm:^2.20.3, commander@npm:^2.8.1, commander@npm:^2.9.0": +"commander@npm:^2.12.1, commander@npm:^2.15.0, commander@npm:^2.20.0, commander@npm:^2.20.3, commander@npm:^2.8.1": version: 2.20.3 resolution: "commander@npm:2.20.3" checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b @@ -23960,13 +23710,6 @@ __metadata: languageName: node linkType: hard -"contains-path@npm:^0.1.0": - version: 0.1.0 - resolution: "contains-path@npm:0.1.0" - checksum: 10/94ecfd944e0bc51be8d3fc596dcd17d705bd4c8a1a627952a3a8c5924bac01c7ea19034cf40b4b4f89e576cdead130a7e5fd38f5f7f07ef67b4b261d875871e3 - languageName: node - linkType: hard - "content-disposition@npm:0.5.4, content-disposition@npm:^0.5.3": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" @@ -24297,13 +24040,6 @@ __metadata: languageName: node linkType: hard -"core-js-pure@npm:^3.0.1": - version: 3.32.0 - resolution: "core-js-pure@npm:3.32.0" - checksum: 10/f98fc9610fedffd5587266cabddc880a8259bb0c99e81c5630e2076a4cd39b618f8db54137a6fdc578a8bb12a7fef2f341175085d89a16683a36aa89bc0ee137 - languageName: node - linkType: hard - "core-js-pure@npm:^3.23.3": version: 3.32.1 resolution: "core-js-pure@npm:3.32.1" @@ -24311,13 +24047,6 @@ __metadata: languageName: node linkType: hard -"core-js@npm:^2.4.0": - version: 2.6.12 - resolution: "core-js@npm:2.6.12" - checksum: 10/7c624eb00a59c74c769d5d80f751f3bf1fc6201205b6562f27286ad5e00bbca1483f2f7eb0c2854b86f526ef5c7dc958b45f2ff536f8a31b8e9cb1a13a96efca - languageName: node - linkType: hard - "core-js@npm:^3.19.2": version: 3.32.1 resolution: "core-js@npm:3.32.1" @@ -25218,61 +24947,6 @@ __metadata: languageName: node linkType: hard -"cucumber-expressions@npm:^6.0.0": - version: 6.6.2 - resolution: "cucumber-expressions@npm:6.6.2" - dependencies: - becke-ch--regex--s0-0-v1--base--pl--lib: "npm:^1.2.0" - checksum: 10/9878c49c8217fd95915c9537509c54979c2d749bb3beb8b306905511b675e087de08a4191017fa175bb432a8b0a83efa6d037351d5135ab51ca8dc8e8f8edff1 - languageName: node - linkType: hard - -"cucumber-tag-expressions@npm:^1.1.1": - version: 1.1.1 - resolution: "cucumber-tag-expressions@npm:1.1.1" - checksum: 10/50a355f08359930ee3e7b766083b2e1c443324cc2c983ea9b8d23b45f8e0e10a7fb5da3d3d7c88bc6fa08cb6559e2c48f0acfc8078a8311ebee08b4d5bc91acb - languageName: node - linkType: hard - -"cucumber@npm:5.0.3": - version: 5.0.3 - resolution: "cucumber@npm:5.0.3" - dependencies: - assertion-error-formatter: "npm:^2.0.1" - babel-runtime: "npm:^6.11.6" - bluebird: "npm:^3.4.1" - cli-table3: "npm:^0.5.1" - colors: "npm:^1.1.2" - commander: "npm:^2.9.0" - cross-spawn: "npm:^6.0.5" - cucumber-expressions: "npm:^6.0.0" - cucumber-tag-expressions: "npm:^1.1.1" - duration: "npm:^0.2.1" - escape-string-regexp: "npm:^1.0.5" - figures: "npm:2.0.0" - gherkin: "npm:^5.0.0" - glob: "npm:^7.1.3" - indent-string: "npm:^3.1.0" - is-generator: "npm:^1.0.2" - is-stream: "npm:^1.1.0" - knuth-shuffle-seeded: "npm:^1.0.6" - lodash: "npm:^4.17.10" - mz: "npm:^2.4.0" - progress: "npm:^2.0.0" - resolve: "npm:^1.3.3" - serialize-error: "npm:^2.1.0" - stack-chain: "npm:^2.0.0" - stacktrace-js: "npm:^2.0.0" - string-argv: "npm:0.1.1" - title-case: "npm:^2.1.1" - util-arity: "npm:^1.0.2" - verror: "npm:^1.9.0" - bin: - cucumber-js: ./bin/cucumber-js - checksum: 10/610544885dbd8ac110f80c9407d2d1907467bf3fe38541f2d7b0c0124acbc8136a43df9f70d85847038b00e1d312792bca60ed83b434c24645ac667f0fa112f3 - languageName: node - linkType: hard - "cycle@npm:1.0.x": version: 1.0.3 resolution: "cycle@npm:1.0.3" @@ -25392,14 +25066,14 @@ __metadata: languageName: node linkType: hard -"debug-log@npm:^1.0.0, debug-log@npm:^1.0.1": +"debug-log@npm:^1.0.1": version: 1.0.1 resolution: "debug-log@npm:1.0.1" checksum: 10/1439f9dac2e77cd915abd534b8876dd655cd86214e3bab8f78fff284b61fda3a143bad56ed71071fcbfbe11cc8c453ff719e1512f24c3b1056d12fa0b4db8520 languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.1.1, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0": +"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -25726,15 +25400,6 @@ __metadata: languageName: node linkType: hard -"default-require-extensions@npm:^2.0.0": - version: 2.0.0 - resolution: "default-require-extensions@npm:2.0.0" - dependencies: - strip-bom: "npm:^3.0.0" - checksum: 10/a0b18bdcdee93018ee39161208c193f274d5f6553c32f518ad86eba92edf6485d194012ffb402e8207f9b80f2da2c6de48e0189fd63bd682f0760e4dbd35cb79 - languageName: node - linkType: hard - "default-require-extensions@npm:^3.0.0": version: 3.0.0 resolution: "default-require-extensions@npm:3.0.0" @@ -25776,25 +25441,6 @@ __metadata: languageName: node linkType: hard -"deferred-leveldown@npm:~1.2.1": - version: 1.2.2 - resolution: "deferred-leveldown@npm:1.2.2" - dependencies: - abstract-leveldown: "npm:~2.6.0" - checksum: 10/17a79955e8191264c79422235dc5eea46fa1b5be43c06d50bfb149679721ec389168198ac2edf6635bd02372db19c1b0db5154d502b2ee93c33f0ad9644597be - languageName: node - linkType: hard - -"deferred-leveldown@npm:~4.0.0": - version: 4.0.2 - resolution: "deferred-leveldown@npm:4.0.2" - dependencies: - abstract-leveldown: "npm:~5.0.0" - inherits: "npm:^2.0.3" - checksum: 10/124de023a7f6d4b7109a2a8cdb361e533702035386718ab047960a763e993532854a027b7712caeb68d22e5c4358074fb5c3f7e7d7860dae16f3e482759d2cd6 - languageName: node - linkType: hard - "deferred-leveldown@npm:~5.3.0": version: 5.3.0 resolution: "deferred-leveldown@npm:5.3.0" @@ -25899,20 +25545,6 @@ __metadata: languageName: node linkType: hard -"deglob@npm:^2.1.0": - version: 2.1.1 - resolution: "deglob@npm:2.1.1" - dependencies: - find-root: "npm:^1.0.0" - glob: "npm:^7.0.5" - ignore: "npm:^3.0.9" - pkg-config: "npm:^1.1.0" - run-parallel: "npm:^1.1.2" - uniq: "npm:^1.0.1" - checksum: 10/cf1ae819dbdbf9bcd88f86a6e9abc7f28eb65702d5a01292572717e89c339ffc7cd8cd3ab1c76e345b93af2c986da35a2238839cbb6cb63574927add780d4cf7 - languageName: node - linkType: hard - "del-cli@npm:5.1.0": version: 5.1.0 resolution: "del-cli@npm:5.1.0" @@ -26235,7 +25867,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^3.0.0, diff@npm:^3.1.0, diff@npm:^3.5.0": +"diff@npm:^3.5.0": version: 3.5.0 resolution: "diff@npm:3.5.0" checksum: 10/cfbc2df98d6f8eb82c0f7735c8468695f65189d31f95a708d4c97cd96a8083fdfd83d87a067a29924ae7d8ff64f578e7da78391af537815750268555fe0df9f0 @@ -26343,17 +25975,7 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:1.5.0, doctrine@npm:^1.2.2": - version: 1.5.0 - resolution: "doctrine@npm:1.5.0" - dependencies: - esutils: "npm:^2.0.2" - isarray: "npm:^1.0.0" - checksum: 10/3ac7d891225f95292f9b9cfc1fe24e75e05ea53b08706298bbf4bf2451f8e1b9de25b1017f5dac23a8deeb8f3ba15fe2c1b454e78d1e97a0921af30aa6d5e753 - languageName: node - linkType: hard - -"doctrine@npm:^2.0.0, doctrine@npm:^2.1.0": +"doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" dependencies: @@ -26583,13 +26205,6 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:16.0.1": - version: 16.0.1 - resolution: "dotenv@npm:16.0.1" - checksum: 10/4b530b0cc1ecfbff93ce4641fb7bbcd5731a54c3acfbdbd00283073ec3f0cbff8e93946a68eaa6fa8ece33d442555e6a61a01da8fffb553d20838ba079bf1a20 - languageName: node - linkType: hard - "dotenv@npm:16.0.3": version: 16.0.3 resolution: "dotenv@npm:16.0.3" @@ -26676,16 +26291,6 @@ __metadata: languageName: node linkType: hard -"duration@npm:^0.2.1": - version: 0.2.2 - resolution: "duration@npm:0.2.2" - dependencies: - d: "npm:1" - es5-ext: "npm:~0.10.46" - checksum: 10/823c7d1d06c5126346147e5271ddce1c1bd186c110beaac3d18f22a83a1725d4a66c29bbefe1a550cd49a093727978a01708628c2f0d479eb2abd9e0afb77554 - languageName: node - linkType: hard - "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -26929,19 +26534,6 @@ __metadata: languageName: node linkType: hard -"encoding-down@npm:~5.0.0": - version: 5.0.4 - resolution: "encoding-down@npm:5.0.4" - dependencies: - abstract-leveldown: "npm:^5.0.0" - inherits: "npm:^2.0.3" - level-codec: "npm:^9.0.0" - level-errors: "npm:^2.0.0" - xtend: "npm:^4.0.1" - checksum: 10/aed668bb68e0db1f93979eb784f88d2350b268b1d4e2096a3421e4d0a4232fa928ff1af8b0131d4553f6189254bc9668053dc5e5d00b7230b5590e9e2c5bba22 - languageName: node - linkType: hard - "encoding@npm:^0.1.12, encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -27445,7 +27037,7 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:~0.10.14, es5-ext@npm:~0.10.46": +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:~0.10.14": version: 0.10.64 resolution: "es5-ext@npm:0.10.64" dependencies: @@ -27464,7 +27056,7 @@ __metadata: languageName: node linkType: hard -"es6-iterator@npm:^2.0.3, es6-iterator@npm:~2.0.1, es6-iterator@npm:~2.0.3": +"es6-iterator@npm:^2.0.3": version: 2.0.3 resolution: "es6-iterator@npm:2.0.3" dependencies: @@ -27475,20 +27067,6 @@ __metadata: languageName: node linkType: hard -"es6-map@npm:^0.1.3": - version: 0.1.5 - resolution: "es6-map@npm:0.1.5" - dependencies: - d: "npm:1" - es5-ext: "npm:~0.10.14" - es6-iterator: "npm:~2.0.1" - es6-set: "npm:~0.1.5" - es6-symbol: "npm:~3.1.1" - event-emitter: "npm:~0.3.5" - checksum: 10/ca271c8efcd5b03bc430fe7508803b8b47c1db2956299b538a68244a3473d176536ee10db2db3b31174c71f83d6a6d67dff8311ad25ec6e71a7ffae01f4ca9d2 - languageName: node - linkType: hard - "es6-object-assign@npm:^1.1.0": version: 1.1.0 resolution: "es6-object-assign@npm:1.1.0" @@ -27503,21 +27081,7 @@ __metadata: languageName: node linkType: hard -"es6-set@npm:~0.1.5": - version: 0.1.6 - resolution: "es6-set@npm:0.1.6" - dependencies: - d: "npm:^1.0.1" - es5-ext: "npm:^0.10.62" - es6-iterator: "npm:~2.0.3" - es6-symbol: "npm:^3.1.3" - event-emitter: "npm:^0.3.5" - type: "npm:^2.7.2" - checksum: 10/45e8a4432edf71be7e0b7415ec434f62e294a6cb790646a5475b01ac13fda820141eab9fa7d18e91f4e5977bdf8d27d944123fafd15740a1c7f832a2caf45ba4 - languageName: node - linkType: hard - -"es6-symbol@npm:^3.0.2, es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3, es6-symbol@npm:~3.1.1": +"es6-symbol@npm:^3.0.2, es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": version: 3.1.3 resolution: "es6-symbol@npm:3.1.3" dependencies: @@ -27527,18 +27091,6 @@ __metadata: languageName: node linkType: hard -"es6-weak-map@npm:^2.0.1": - version: 2.0.3 - resolution: "es6-weak-map@npm:2.0.3" - dependencies: - d: "npm:1" - es5-ext: "npm:^0.10.46" - es6-iterator: "npm:^2.0.3" - es6-symbol: "npm:^3.1.1" - checksum: 10/5958a321cf8dfadc82b79eeaa57dc855893a4afd062b4ef5c9ded0010d3932099311272965c3d3fdd3c85df1d7236013a570e704fa6c1f159bbf979c203dd3a3 - languageName: node - linkType: hard - "esbuild-wasm@npm:0.18.17": version: 0.18.17 resolution: "esbuild-wasm@npm:0.18.17" @@ -27868,18 +27420,6 @@ __metadata: languageName: node linkType: hard -"escope@npm:^3.6.0": - version: 3.6.0 - resolution: "escope@npm:3.6.0" - dependencies: - es6-map: "npm:^0.1.3" - es6-weak-map: "npm:^2.0.1" - esrecurse: "npm:^4.1.0" - estraverse: "npm:^4.1.1" - checksum: 10/8a656e71f01b7f4a3a262c2a9ea54654975e093f3b89f1b4ef5767fbf94567f8196772963b967ffb7a4aa9b211c5e47ba3a7e9f05828af5169183ac4f6eb2da9 - languageName: node - linkType: hard - "eslint-config-prettier@npm:9.1.0": version: 9.1.0 resolution: "eslint-config-prettier@npm:9.1.0" @@ -27915,29 +27455,6 @@ __metadata: languageName: node linkType: hard -"eslint-config-standard-jsx@npm:4.0.2": - version: 4.0.2 - resolution: "eslint-config-standard-jsx@npm:4.0.2" - peerDependencies: - eslint: ">=3.19.0" - eslint-plugin-react: ">=6.10.3" - checksum: 10/192133bbcf22967c75eff498c50c9c5ab29d616cae35274b99d99aa1fb0910a832352422ed6e2dbfb6adfd35b988cea138421885a1755dabf53088de20f88dd0 - languageName: node - linkType: hard - -"eslint-config-standard@npm:10.2.1": - version: 10.2.1 - resolution: "eslint-config-standard@npm:10.2.1" - peerDependencies: - eslint: ">=3.19.0" - eslint-plugin-import: ">=2.2.0" - eslint-plugin-node: ">=4.2.2" - eslint-plugin-promise: ">=3.5.0" - eslint-plugin-standard: ">=3.0.0" - checksum: 10/9fbcdcd0934cfb547fff0f73b8e2c94295b4d59adbe0bc935421f6360b219906d144bce5666189a0165212b141b0e3eaba4a76edec567adfe13b06227e2fefb4 - languageName: node - linkType: hard - "eslint-config-standard@npm:17.1.0": version: 17.1.0 resolution: "eslint-config-standard@npm:17.1.0" @@ -27950,17 +27467,6 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.2.0": - version: 0.2.3 - resolution: "eslint-import-resolver-node@npm:0.2.3" - dependencies: - debug: "npm:^2.2.0" - object-assign: "npm:^4.0.1" - resolve: "npm:^1.1.6" - checksum: 10/942425aff3c581fb174a53c40a55332fa3910f248147251d4b61a932a22761a5680ab3f419d12bc21dfff3e264c8c44b92c3ec8c0147dd2e67affbc8185dd170 - languageName: node - linkType: hard - "eslint-import-resolver-node@npm:^0.3.7, eslint-import-resolver-node@npm:^0.3.9": version: 0.3.9 resolution: "eslint-import-resolver-node@npm:0.3.9" @@ -27972,7 +27478,7 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.0.0, eslint-module-utils@npm:^2.8.0": +"eslint-module-utils@npm:^2.8.0": version: 2.8.0 resolution: "eslint-module-utils@npm:2.8.0" dependencies: @@ -28064,26 +27570,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:~2.2.0": - version: 2.2.0 - resolution: "eslint-plugin-import@npm:2.2.0" - dependencies: - builtin-modules: "npm:^1.1.1" - contains-path: "npm:^0.1.0" - debug: "npm:^2.2.0" - doctrine: "npm:1.5.0" - eslint-import-resolver-node: "npm:^0.2.0" - eslint-module-utils: "npm:^2.0.0" - has: "npm:^1.0.1" - lodash.cond: "npm:^4.3.0" - minimatch: "npm:^3.0.3" - pkg-up: "npm:^1.0.0" - peerDependencies: - eslint: 2.x - 3.x - checksum: 10/646734c8b1bf355ec1d0b2c90a51e5e9a7c764b12570e93b7ab6085db5df3f9aef718e941874148543b3eac61fcc7fb3668169d8e18b4b08b88ccefe054f942b - languageName: node - linkType: hard - "eslint-plugin-jest@npm:^25.3.0": version: 25.7.0 resolution: "eslint-plugin-jest@npm:25.7.0" @@ -28143,21 +27629,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-node@npm:~4.2.2": - version: 4.2.3 - resolution: "eslint-plugin-node@npm:4.2.3" - dependencies: - ignore: "npm:^3.0.11" - minimatch: "npm:^3.0.2" - object-assign: "npm:^4.0.1" - resolve: "npm:^1.1.7" - semver: "npm:5.3.0" - peerDependencies: - eslint: ">=3.1.0" - checksum: 10/72bdc48d39588c204f626cbcc20fa74321f46729a57814ca3472382bbeb5aef6d035cd683f40d3a5f3ebf817be76358a7fa7aa7eeca71979d44d9032048b7dc5 - languageName: node - linkType: hard - "eslint-plugin-prettier@npm:5.1.3": version: 5.1.3 resolution: "eslint-plugin-prettier@npm:5.1.3" @@ -28187,13 +27658,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-promise@npm:~3.5.0": - version: 3.5.0 - resolution: "eslint-plugin-promise@npm:3.5.0" - checksum: 10/e40b70e0eab0b7c31c0cffebbd4e334e7244c6a381e377bb191232e302830546f04cf54336cee10b8b73a7a29af42f2577db272de44019194b60226e3245dbd6 - languageName: node - linkType: hard - "eslint-plugin-react-hooks@npm:^4.3.0": version: 4.6.0 resolution: "eslint-plugin-react-hooks@npm:4.6.0" @@ -28229,21 +27693,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:~6.10.0": - version: 6.10.3 - resolution: "eslint-plugin-react@npm:6.10.3" - dependencies: - array.prototype.find: "npm:^2.0.1" - doctrine: "npm:^1.2.2" - has: "npm:^1.0.1" - jsx-ast-utils: "npm:^1.3.4" - object.assign: "npm:^4.0.4" - peerDependencies: - eslint: ^2.0.0 || ^3.0.0 - checksum: 10/461c9ae99fcbcd2b3e15b49ac5afcd80ac59890f23e95022c7bb3c6d7cdf737d108bc0ca76495f41ea693d692c6f94a0a9679d8a0f344571b2e48522300c1487 - languageName: node - linkType: hard - "eslint-plugin-standard@npm:5.0.0": version: 5.0.0 resolution: "eslint-plugin-standard@npm:5.0.0" @@ -28253,15 +27702,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-standard@npm:~3.0.1": - version: 3.0.1 - resolution: "eslint-plugin-standard@npm:3.0.1" - peerDependencies: - eslint: ">=3.19.0" - checksum: 10/7aa7b941bfa09eee5d2501ad7c5e39655a847a404e3d57cdacd0c58a361157f6cf20a70523e6ba3bf24ebb9356c53abe57c2214c37e4ef2746be460700e5b141 - languageName: node - linkType: hard - "eslint-plugin-testing-library@npm:^5.0.1": version: 5.11.1 resolution: "eslint-plugin-testing-library@npm:5.11.1" @@ -28273,7 +27713,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.0.0, eslint-scope@npm:^5.1.1": +"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -28499,51 +27939,6 @@ __metadata: languageName: node linkType: hard -"eslint@npm:~3.19.0": - version: 3.19.0 - resolution: "eslint@npm:3.19.0" - dependencies: - babel-code-frame: "npm:^6.16.0" - chalk: "npm:^1.1.3" - concat-stream: "npm:^1.5.2" - debug: "npm:^2.1.1" - doctrine: "npm:^2.0.0" - escope: "npm:^3.6.0" - espree: "npm:^3.4.0" - esquery: "npm:^1.0.0" - estraverse: "npm:^4.2.0" - esutils: "npm:^2.0.2" - file-entry-cache: "npm:^2.0.0" - glob: "npm:^7.0.3" - globals: "npm:^9.14.0" - ignore: "npm:^3.2.0" - imurmurhash: "npm:^0.1.4" - inquirer: "npm:^0.12.0" - is-my-json-valid: "npm:^2.10.0" - is-resolvable: "npm:^1.0.0" - js-yaml: "npm:^3.5.1" - json-stable-stringify: "npm:^1.0.0" - levn: "npm:^0.3.0" - lodash: "npm:^4.0.0" - mkdirp: "npm:^0.5.0" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.8.2" - path-is-inside: "npm:^1.0.1" - pluralize: "npm:^1.2.1" - progress: "npm:^1.1.8" - require-uncached: "npm:^1.0.2" - shelljs: "npm:^0.7.5" - strip-bom: "npm:^3.0.0" - strip-json-comments: "npm:~2.0.1" - table: "npm:^3.7.8" - text-table: "npm:~0.2.0" - user-home: "npm:^2.0.0" - bin: - eslint: ./bin/eslint.js - checksum: 10/38bbd71dd73a516c760feb4d7457cb192a288fed9facbe71c46d3088e69de37884503fb9b97a09b27c6ef4ade1c6072bd072dec08a00374069896ed9a0a82bad - languageName: node - linkType: hard - "esm@npm:3.2.25, esm@npm:^3.2.25": version: 3.2.25 resolution: "esm@npm:3.2.25" @@ -28563,7 +27958,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:^3.4.0, espree@npm:^3.5.4": +"espree@npm:^3.5.4": version: 3.5.4 resolution: "espree@npm:3.5.4" dependencies: @@ -28612,7 +28007,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1, estraverse@npm:^4.2.0": +"estraverse@npm:^4.1.1": version: 4.3.0 resolution: "estraverse@npm:4.3.0" checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb @@ -28689,18 +28084,6 @@ __metadata: languageName: node linkType: hard -"ethashjs@npm:~0.0.7": - version: 0.0.8 - resolution: "ethashjs@npm:0.0.8" - dependencies: - async: "npm:^2.1.2" - buffer-xor: "npm:^2.0.1" - ethereumjs-util: "npm:^7.0.2" - miller-rabin: "npm:^4.0.0" - checksum: 10/5364b2603df6cd0462d0408063fdf716ae6ed96b4dbc09278dde79132f94a92b458021446aa7db83568338d1cf3be180e140eda4c727e89261a01adf10574488 - languageName: node - linkType: hard - "ethereum-bloom-filters@npm:^1.0.6": version: 1.0.10 resolution: "ethereum-bloom-filters@npm:1.0.10" @@ -28767,48 +28150,6 @@ __metadata: languageName: node linkType: hard -"ethereumjs-account@npm:^3.0.0": - version: 3.0.0 - resolution: "ethereumjs-account@npm:3.0.0" - dependencies: - ethereumjs-util: "npm:^6.0.0" - rlp: "npm:^2.2.1" - safe-buffer: "npm:^5.1.1" - checksum: 10/64dbe026d29aca12c79596cf4085fb27e209988f11b7d5bf3a1f2aadaaa517d90d722680c8b525144c26a2d9cd8494aa26ac088fa80b358cc3e28024f7ddbe81 - languageName: node - linkType: hard - -"ethereumjs-block@npm:^2.2.2, ethereumjs-block@npm:~2.2.2": - version: 2.2.2 - resolution: "ethereumjs-block@npm:2.2.2" - dependencies: - async: "npm:^2.0.1" - ethereumjs-common: "npm:^1.5.0" - ethereumjs-tx: "npm:^2.1.1" - ethereumjs-util: "npm:^5.0.0" - merkle-patricia-tree: "npm:^2.1.2" - checksum: 10/5179e91d27acc3614199d8098449f16de7927e14239a996c8e7af6e2f65867048a3125ab79af4bac4f828228d332a0ae5837997b5bb259bd2dab2fe6dde455ac - languageName: node - linkType: hard - -"ethereumjs-blockchain@npm:^4.0.3": - version: 4.0.4 - resolution: "ethereumjs-blockchain@npm:4.0.4" - dependencies: - async: "npm:^2.6.1" - ethashjs: "npm:~0.0.7" - ethereumjs-block: "npm:~2.2.2" - ethereumjs-common: "npm:^1.5.0" - ethereumjs-util: "npm:^6.1.0" - flow-stoplight: "npm:^1.0.0" - level-mem: "npm:^3.0.1" - lru-cache: "npm:^5.1.1" - rlp: "npm:^2.2.2" - semaphore: "npm:^1.1.0" - checksum: 10/70041abc21eece9401d47b984608ae11dd55b1ae2c30551fc7c9387d1215ba5ae595641bcfe4fdff01da001707af3887611fcb6f2d027bcf7db6befa3bff2f0f - languageName: node - linkType: hard - "ethereumjs-common@npm:1.5.2, ethereumjs-common@npm:^1.5.0": version: 1.5.2 resolution: "ethereumjs-common@npm:1.5.2" @@ -28816,7 +28157,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-tx@npm:2.1.2, ethereumjs-tx@npm:^2.1.1, ethereumjs-tx@npm:^2.1.2": +"ethereumjs-tx@npm:2.1.2, ethereumjs-tx@npm:^2.1.2": version: 2.1.2 resolution: "ethereumjs-tx@npm:2.1.2" dependencies: @@ -28826,7 +28167,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:6.2.1, ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.1.0, ethereumjs-util@npm:^6.2.0, ethereumjs-util@npm:^6.2.1": +"ethereumjs-util@npm:6.2.1, ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.2.1": version: 6.2.1 resolution: "ethereumjs-util@npm:6.2.1" dependencies: @@ -28841,21 +28182,6 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^5.0.0": - version: 5.2.1 - resolution: "ethereumjs-util@npm:5.2.1" - dependencies: - bn.js: "npm:^4.11.0" - create-hash: "npm:^1.1.2" - elliptic: "npm:^6.5.2" - ethereum-cryptography: "npm:^0.1.3" - ethjs-util: "npm:^0.1.3" - rlp: "npm:^2.0.0" - safe-buffer: "npm:^5.1.1" - checksum: 10/f3957c7ccb4abe55c894ab1d039ecfbac1ce3025f4adfee61722760440b704f13dd056fdd9eaaa2be1154c17bba152e1c7f93ce91da3d3d1314de9c479003f9b - languageName: node - linkType: hard - "ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": version: 7.1.4 resolution: "ethereumjs-util@npm:7.1.4" @@ -28869,7 +28195,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -28882,29 +28208,6 @@ __metadata: languageName: node linkType: hard -"ethereumjs-vm@npm:4.1.3": - version: 4.1.3 - resolution: "ethereumjs-vm@npm:4.1.3" - dependencies: - async: "npm:^2.1.2" - async-eventemitter: "npm:^0.2.2" - core-js-pure: "npm:^3.0.1" - ethereumjs-account: "npm:^3.0.0" - ethereumjs-block: "npm:^2.2.2" - ethereumjs-blockchain: "npm:^4.0.3" - ethereumjs-common: "npm:^1.5.0" - ethereumjs-tx: "npm:^2.1.2" - ethereumjs-util: "npm:^6.2.0" - fake-merkle-patricia-tree: "npm:^1.0.1" - functional-red-black-tree: "npm:^1.0.1" - merkle-patricia-tree: "npm:^2.3.2" - rustbn.js: "npm:~0.2.0" - safe-buffer: "npm:^5.1.1" - util.promisify: "npm:^1.0.0" - checksum: 10/6101649632df0762155d952109d17ae735121009fbad704f83884e6aa5a898153bb4fba9856d218bede8c9bb41fa2c600b6a92e9e3dfcbac230076569a0a1b7e - languageName: node - linkType: hard - "ethers@npm:6.12.1": version: 6.12.1 resolution: "ethers@npm:6.12.1" @@ -28949,7 +28252,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^4.0.32, ethers@npm:^4.0.40": +"ethers@npm:^4.0.32": version: 4.0.49 resolution: "ethers@npm:4.0.49" dependencies: @@ -29014,7 +28317,7 @@ __metadata: languageName: node linkType: hard -"ethjs-util@npm:0.1.6, ethjs-util@npm:^0.1.3, ethjs-util@npm:^0.1.6": +"ethjs-util@npm:0.1.6, ethjs-util@npm:^0.1.6": version: 0.1.6 resolution: "ethjs-util@npm:0.1.6" dependencies: @@ -29024,7 +28327,7 @@ __metadata: languageName: node linkType: hard -"event-emitter@npm:^0.3.5, event-emitter@npm:~0.3.5": +"event-emitter@npm:^0.3.5": version: 0.3.5 resolution: "event-emitter@npm:0.3.5" dependencies: @@ -29189,13 +28492,6 @@ __metadata: languageName: node linkType: hard -"exit-hook@npm:^1.0.0": - version: 1.1.1 - resolution: "exit-hook@npm:1.1.1" - checksum: 10/1b4f16da7c202cd336ca07acb052922639182b4e2f1ad4007ed481bb774ce93469f505dec1371d9cd580ac54146a9fd260f053b0e4a48fa87c49fa3dc4a3f144 - languageName: node - linkType: hard - "exit-on-epipe@npm:~1.0.1": version: 1.0.1 resolution: "exit-on-epipe@npm:1.0.1" @@ -29400,17 +28696,6 @@ __metadata: languageName: node linkType: hard -"express-ws@npm:^4.0.0": - version: 4.0.0 - resolution: "express-ws@npm:4.0.0" - dependencies: - ws: "npm:^5.2.0" - peerDependencies: - express: ^4.0.0 || ^5.0.0-alpha.1 - checksum: 10/5caa16bc6ca109ce4b4380794537d0e915758f3cc9e780f675bc992e843cd554c8deb01cedd75734d8f029b003eac1c32eed4ca885b9a359b8bfefd015d003ec - languageName: node - linkType: hard - "express@npm:4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" @@ -29450,7 +28735,7 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.10.6, express@npm:^4.14.0, express@npm:^4.16.3, express@npm:^4.17.1, express@npm:^4.17.3": +"express@npm:^4.10.6, express@npm:^4.14.0, express@npm:^4.17.1, express@npm:^4.17.3": version: 4.18.2 resolution: "express@npm:4.18.2" dependencies: @@ -29707,15 +28992,6 @@ __metadata: languageName: node linkType: hard -"fake-merkle-patricia-tree@npm:^1.0.1": - version: 1.0.1 - resolution: "fake-merkle-patricia-tree@npm:1.0.1" - dependencies: - checkpoint-store: "npm:^1.1.0" - checksum: 10/db445809b41a3b99db604cfd943a894a1a10d6e0fe50d4192331fc9b411ef88f544c33c40cdbf5b04d57633799d13eaf2a690c501b026863539acb941880321c - languageName: node - linkType: hard - "fast-check@npm:3.1.1": version: 3.1.1 resolution: "fast-check@npm:3.1.1" @@ -30019,7 +29295,7 @@ __metadata: languageName: node linkType: hard -"figures@npm:2.0.0, figures@npm:^2.0.0": +"figures@npm:^2.0.0": version: 2.0.0 resolution: "figures@npm:2.0.0" dependencies: @@ -30028,16 +29304,6 @@ __metadata: languageName: node linkType: hard -"figures@npm:^1.3.5": - version: 1.7.0 - resolution: "figures@npm:1.7.0" - dependencies: - escape-string-regexp: "npm:^1.0.5" - object-assign: "npm:^4.1.0" - checksum: 10/3a815f8a3b488f818e661694112b4546ddff799aa6a07c864c46dadff923af74021f84d42ded402432a98c3208acebf2d096f3a7cc3d1a7b19a2cdc9cbcaea2e - languageName: node - linkType: hard - "figures@npm:^3.0.0, figures@npm:^3.2.0": version: 3.2.0 resolution: "figures@npm:3.2.0" @@ -30224,17 +29490,6 @@ __metadata: languageName: node linkType: hard -"find-cache-dir@npm:^2.0.0": - version: 2.1.0 - resolution: "find-cache-dir@npm:2.1.0" - dependencies: - commondir: "npm:^1.0.1" - make-dir: "npm:^2.0.0" - pkg-dir: "npm:^3.0.0" - checksum: 10/60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 - languageName: node - linkType: hard - "find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1": version: 3.3.2 resolution: "find-cache-dir@npm:3.3.2" @@ -30267,7 +29522,7 @@ __metadata: languageName: node linkType: hard -"find-root@npm:^1.0.0, find-root@npm:^1.1.0": +"find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" checksum: 10/caa799c976a14925ba7f31ca1a226fe73d3aa270f4f1b623fcfeb1c6e263111db4beb807d8acd31bd4d48d44c343b93688a9288dfbccca27463c36a0301b0bb9 @@ -30301,7 +29556,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^2.0.0, find-up@npm:^2.1.0": +"find-up@npm:^2.1.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" dependencies: @@ -30420,13 +29675,6 @@ __metadata: languageName: node linkType: hard -"flow-stoplight@npm:^1.0.0": - version: 1.0.0 - resolution: "flow-stoplight@npm:1.0.0" - checksum: 10/e5bfbbb7274f444a926392243eb286292d0da1c8af3ca21d9f2e71a00631b8c0e29b5aba9cc9039c2d2ffc8b80714bb8f48ed6c93b01ca856304b38224e44192 - languageName: node - linkType: hard - "fmt-subs@npm:^1.1.1": version: 1.1.1 resolution: "fmt-subs@npm:1.1.1" @@ -30957,7 +30205,7 @@ __metadata: languageName: node linkType: hard -"functional-red-black-tree@npm:^1.0.1, functional-red-black-tree@npm:~1.0.1": +"functional-red-black-tree@npm:^1.0.1": version: 1.0.1 resolution: "functional-red-black-tree@npm:1.0.1" checksum: 10/debe73e92204341d1fa5f89614e44284d3add26dee660722978d8c50829170f87d1c74768f68c251d215ae461c11db7bac13101c77f4146ff051da75466f7a12 @@ -31388,15 +30636,6 @@ __metadata: languageName: node linkType: hard -"gherkin@npm:^5.0.0": - version: 5.1.0 - resolution: "gherkin@npm:5.1.0" - bin: - gherkin-javascript: bin/gherkin - checksum: 10/e2f74b7f0e36c1a4e38cb670439b078c41d4268f988c487f4a51acc85ea566c433f4c9426527a9d5c8dd0a7258593557597fd778b961d8025548b7452c55881a - languageName: node - linkType: hard - "git-hooks-list@npm:1.0.3": version: 1.0.3 resolution: "git-hooks-list@npm:1.0.3" @@ -31570,7 +30809,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.3, glob@npm:^7.1.2, glob@npm:^7.2.3": +"glob@npm:^7.1.2, glob@npm:^7.2.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -31720,13 +30959,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^9.14.0": - version: 9.18.0 - resolution: "globals@npm:9.18.0" - checksum: 10/492600be44eb7ae107d37fa8536fb98f36a6f051c1420cd912a6de307758d502b9930a8f7beda0e74a98a5613aae464c828bb81418fc335c9ff4707ba9fd9070 - languageName: node - linkType: hard - "globalthis@npm:^1.0.2, globalthis@npm:^1.0.3": version: 1.0.3 resolution: "globalthis@npm:1.0.3" @@ -32465,7 +31697,7 @@ __metadata: languageName: node linkType: hard -"has@npm:^1.0.1, has@npm:^1.0.3": +"has@npm:^1.0.3": version: 1.0.3 resolution: "has@npm:1.0.3" dependencies: @@ -33142,7 +32374,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^3.0.11, ignore@npm:^3.0.9, ignore@npm:^3.2.0, ignore@npm:^3.3.3": +"ignore@npm:^3.3.3": version: 3.3.10 resolution: "ignore@npm:3.3.10" checksum: 10/7cbe87d9ed0e6b710ed76f040733f4d1dbed7aa573b579949d6cc25572a72c69d546acda11c2d4bf202691ddda5db8078d32a50a6623eade424d81e6f1d32133 @@ -33179,13 +32411,6 @@ __metadata: languageName: node linkType: hard -"immediate@npm:~3.2.3": - version: 3.2.3 - resolution: "immediate@npm:3.2.3" - checksum: 10/fcc2223bdaeac9ba378543658c4c6420a61b6eef2e8447f4b274a2964721d1c707b37725768af20226c8ea66b5b9e7ca982e28c36fc4c2d1af318c1fd4a9e687 - languageName: node - linkType: hard - "immer@npm:^9.0.7": version: 9.0.21 resolution: "immer@npm:9.0.21" @@ -33243,13 +32468,6 @@ __metadata: languageName: node linkType: hard -"indent-string@npm:^3.1.0": - version: 3.2.0 - resolution: "indent-string@npm:3.2.0" - checksum: 10/a0b72603bba6c985d367fda3a25aad16423d2056b22a7e83ee2dd9ce0ce3d03d1e078644b679087aa7edf1cfb457f0d96d9eeadc0b12f38582088cc00e995d2f - languageName: node - linkType: hard - "indent-string@npm:^4.0.0": version: 4.0.0 resolution: "indent-string@npm:4.0.0" @@ -33477,27 +32695,6 @@ __metadata: languageName: node linkType: hard -"inquirer@npm:^0.12.0": - version: 0.12.0 - resolution: "inquirer@npm:0.12.0" - dependencies: - ansi-escapes: "npm:^1.1.0" - ansi-regex: "npm:^2.0.0" - chalk: "npm:^1.0.0" - cli-cursor: "npm:^1.0.1" - cli-width: "npm:^2.0.0" - figures: "npm:^1.3.5" - lodash: "npm:^4.3.0" - readline2: "npm:^1.0.1" - run-async: "npm:^0.1.0" - rx-lite: "npm:^3.1.2" - string-width: "npm:^1.0.1" - strip-ansi: "npm:^3.0.0" - through: "npm:^2.3.6" - checksum: 10/43a5e31fb28348627a1775eee1162966fe97fff39ec0114ef2e1ca09961e2bb3875d5bf8377469ccf01e341c9029214b950fa8581e6760a8ebec6b0f7423606f - languageName: node - linkType: hard - "inquirer@npm:^3.0.6": version: 3.3.0 resolution: "inquirer@npm:3.3.0" @@ -34201,13 +33398,6 @@ __metadata: languageName: node linkType: hard -"is-generator@npm:^1.0.2": - version: 1.0.3 - resolution: "is-generator@npm:1.0.3" - checksum: 10/416ab44184fcb75923fd07cdffd05cbfc27c13d75ab9d5df441180f9689def4ba4e430a249b1b39669c651e9ea697c107493391e8265ab78ffe22e5eafb34c6b - languageName: node - linkType: hard - "is-glob@npm:^2.0.0, is-glob@npm:^2.0.1": version: 2.0.1 resolution: "is-glob@npm:2.0.1" @@ -34296,7 +33486,7 @@ __metadata: languageName: node linkType: hard -"is-my-json-valid@npm:^2.10.0, is-my-json-valid@npm:^2.20.6": +"is-my-json-valid@npm:^2.20.6": version: 2.20.6 resolution: "is-my-json-valid@npm:2.20.6" dependencies: @@ -34924,7 +34114,7 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^2.0.1, istanbul-lib-coverage@npm:^2.0.5": +"istanbul-lib-coverage@npm:^2.0.1": version: 2.0.5 resolution: "istanbul-lib-coverage@npm:2.0.5" checksum: 10/57b7d67dd004977e9b3b1ab9584cea06d7359cb6fa85570880e35b3db8ed04bf60ffd3a4a0067c79d7105f8b0935334315e38b9bb47f4192b5c4727659c6a575 @@ -34947,15 +34137,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-hook@npm:^2.0.1": - version: 2.0.7 - resolution: "istanbul-lib-hook@npm:2.0.7" - dependencies: - append-transform: "npm:^1.0.0" - checksum: 10/a6a8c3a8af08e1783079aaf32bdd4459fe118eb757068efcdae20e1d86ef982080cd7350f7420aabf970736fce6c3e800b77e83fcd173ddb8e60774c43a7bbb4 - languageName: node - linkType: hard - "istanbul-lib-hook@npm:^3.0.0": version: 3.0.0 resolution: "istanbul-lib-hook@npm:3.0.0" @@ -34980,21 +34161,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-instrument@npm:^3.0.0": - version: 3.3.0 - resolution: "istanbul-lib-instrument@npm:3.3.0" - dependencies: - "@babel/generator": "npm:^7.4.0" - "@babel/parser": "npm:^7.4.3" - "@babel/template": "npm:^7.4.0" - "@babel/traverse": "npm:^7.4.3" - "@babel/types": "npm:^7.4.0" - istanbul-lib-coverage: "npm:^2.0.5" - semver: "npm:^6.0.0" - checksum: 10/6e5d7347ded2d50a0c86b15177ec35f3e6e5dc8ccb9b885dccd3640b5983b76c364ae04ff7b2e953dbd53fa2301d60c4b8061ddcb53d962beb3b425467fb7558 - languageName: node - linkType: hard - "istanbul-lib-instrument@npm:^4.0.0": version: 4.0.3 resolution: "istanbul-lib-instrument@npm:4.0.3" @@ -35061,17 +34227,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-report@npm:^2.0.2": - version: 2.0.8 - resolution: "istanbul-lib-report@npm:2.0.8" - dependencies: - istanbul-lib-coverage: "npm:^2.0.5" - make-dir: "npm:^2.1.0" - supports-color: "npm:^6.1.0" - checksum: 10/acd9f662c56784c84faa117605e49955caa92fb8ccd3c15031390b2b801c909eb640ab51d3bb6befdca84290dda5039de2308dc2618c32ecdbe5e1ee8183de75 - languageName: node - linkType: hard - "istanbul-lib-report@npm:^3.0.0": version: 3.0.0 resolution: "istanbul-lib-report@npm:3.0.0" @@ -35096,19 +34251,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-source-maps@npm:^2.0.1": - version: 2.0.1 - resolution: "istanbul-lib-source-maps@npm:2.0.1" - dependencies: - debug: "npm:^3.1.0" - istanbul-lib-coverage: "npm:^2.0.1" - make-dir: "npm:^1.3.0" - rimraf: "npm:^2.6.2" - source-map: "npm:^0.6.1" - checksum: 10/f53e0d7c24e9e454e08ecc02b3ec84f580b4dea92897827ae1873b057acd9580756d002063b035564141eadda673e1f6a33a38daa67018777c1c83742c33caad - languageName: node - linkType: hard - "istanbul-lib-source-maps@npm:^4.0.0": version: 4.0.1 resolution: "istanbul-lib-source-maps@npm:4.0.1" @@ -35129,15 +34271,6 @@ __metadata: languageName: node linkType: hard -"istanbul-reports@npm:^2.0.1": - version: 2.2.7 - resolution: "istanbul-reports@npm:2.2.7" - dependencies: - html-escaper: "npm:^2.0.0" - checksum: 10/10e6822d676511fc65a79d506e2267ecb52fe2623c5e628bb09b0df0225f2b6121046683329fbd5eee26988f43f8390771a29440afa1dd35c3ebc8f32894b24e - languageName: node - linkType: hard - "istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3": version: 3.1.4 resolution: "istanbul-reports@npm:3.1.4" @@ -36468,7 +35601,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.0, js-yaml@npm:^3.14.1, js-yaml@npm:^3.5.1, js-yaml@npm:^3.9.1": +"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.0, js-yaml@npm:^3.14.1, js-yaml@npm:^3.9.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -36676,7 +35809,7 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify@npm:1.0.2, json-stable-stringify@npm:^1.0.0, json-stable-stringify@npm:^1.0.1": +"json-stable-stringify@npm:1.0.2, json-stable-stringify@npm:^1.0.1": version: 1.0.2 resolution: "json-stable-stringify@npm:1.0.2" dependencies: @@ -36860,13 +35993,6 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^1.3.4": - version: 1.4.1 - resolution: "jsx-ast-utils@npm:1.4.1" - checksum: 10/7682d3165fef499aed99f0162cdca3801d3eb2939c1097f7d6db41d5bfc9131966689bd9ef05568955e500a57594a00b967dd9e5e16fb36459e83879c17d2de4 - languageName: node - linkType: hard - "jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" @@ -37150,54 +36276,6 @@ __metadata: languageName: node linkType: hard -"knex@npm:2.5.1": - version: 2.5.1 - resolution: "knex@npm:2.5.1" - dependencies: - colorette: "npm:2.0.19" - commander: "npm:^10.0.0" - debug: "npm:4.3.4" - escalade: "npm:^3.1.1" - esm: "npm:^3.2.25" - get-package-type: "npm:^0.1.0" - getopts: "npm:2.3.0" - interpret: "npm:^2.2.0" - lodash: "npm:^4.17.21" - pg-connection-string: "npm:2.6.1" - rechoir: "npm:^0.8.0" - resolve-from: "npm:^5.0.0" - tarn: "npm:^3.0.2" - tildify: "npm:2.0.0" - peerDependenciesMeta: - better-sqlite3: - optional: true - mysql: - optional: true - mysql2: - optional: true - pg: - optional: true - pg-native: - optional: true - sqlite3: - optional: true - tedious: - optional: true - bin: - knex: bin/cli.js - checksum: 10/7ab53dfdc382633d890355c15cb4d6e501560cdbc2b03c77f7fc098bdb55a85dfd37e5e8a7f5f38d351c82d5ab77e5e924376ec60e4a0f746901c387ce09b397 - languageName: node - linkType: hard - -"knuth-shuffle-seeded@npm:^1.0.6": - version: 1.0.6 - resolution: "knuth-shuffle-seeded@npm:1.0.6" - dependencies: - seed-random: "npm:~2.2.0" - checksum: 10/1bf533232cba7a9701791ef94df4e5afd4d561f8f94e54e83a598292746a3fa6f5bc7676e694718f1247addf80e43179eb46ad971508bb35dd7e3f47b523dc39 - languageName: node - linkType: hard - "kubo-rpc-client-esm-cjs@npm:3.0.1": version: 3.0.1 resolution: "kubo-rpc-client-esm-cjs@npm:3.0.1" @@ -37437,13 +36515,6 @@ __metadata: languageName: node linkType: hard -"level-codec@npm:~7.0.0": - version: 7.0.1 - resolution: "level-codec@npm:7.0.1" - checksum: 10/76a8a814cab0bdd45d10ee17f5a642c28996500de6684a08611925c4c342ace0587e028903afd35cc2991749c22196a735976743385f4a9dadd1273c97902420 - languageName: node - linkType: hard - "level-concat-iterator@npm:^3.0.0": version: 3.1.0 resolution: "level-concat-iterator@npm:3.1.0" @@ -37460,15 +36531,6 @@ __metadata: languageName: node linkType: hard -"level-errors@npm:^1.0.3": - version: 1.1.2 - resolution: "level-errors@npm:1.1.2" - dependencies: - errno: "npm:~0.1.1" - checksum: 10/18c22fd574ff31567642a85d9a306604a32cbe969b8469fee29620c10488214a6b5e6bbf19e3b5e2042859e4b81041af537319c18132a1aaa56d4ed5981157b7 - languageName: node - linkType: hard - "level-errors@npm:^2.0.0, level-errors@npm:~2.0.0": version: 2.0.1 resolution: "level-errors@npm:2.0.1" @@ -37478,15 +36540,6 @@ __metadata: languageName: node linkType: hard -"level-errors@npm:~1.0.3": - version: 1.0.5 - resolution: "level-errors@npm:1.0.5" - dependencies: - errno: "npm:~0.1.1" - checksum: 10/ae5d5c042c52975aa1543120fe5e1bf3d382c3f64aa9f036a616c6bf4b2de841eea4fc26107e96fe70ba34a21565e7902f9cafcf9ec699de0d98b02d53b42467 - languageName: node - linkType: hard - "level-filesystem@npm:^1.0.1": version: 1.2.0 resolution: "level-filesystem@npm:1.2.0" @@ -37529,29 +36582,6 @@ __metadata: languageName: node linkType: hard -"level-iterator-stream@npm:~1.3.0": - version: 1.3.1 - resolution: "level-iterator-stream@npm:1.3.1" - dependencies: - inherits: "npm:^2.0.1" - level-errors: "npm:^1.0.3" - readable-stream: "npm:^1.0.33" - xtend: "npm:^4.0.0" - checksum: 10/ed9a865cc02ff2edfbc231ab8bf911f4645c0571bfadc5c55a1893435a0c9990bbf8b0176c5f5838cf4117937c6b196e09d24a14da007c25c6c00c989e92fe72 - languageName: node - linkType: hard - -"level-iterator-stream@npm:~3.0.0": - version: 3.0.1 - resolution: "level-iterator-stream@npm:3.0.1" - dependencies: - inherits: "npm:^2.0.1" - readable-stream: "npm:^2.3.6" - xtend: "npm:^4.0.0" - checksum: 10/53ff9825fcdf44f73210d3d3979add8f2ba1a928ce6313928adc6258ae58107b112b43e4632f6fedf9e0455b6ccd24969338b633f63846c0d4a8fe516495e5f2 - languageName: node - linkType: hard - "level-iterator-stream@npm:~4.0.0": version: 4.0.2 resolution: "level-iterator-stream@npm:4.0.2" @@ -37589,16 +36619,6 @@ __metadata: languageName: node linkType: hard -"level-mem@npm:^3.0.1": - version: 3.0.1 - resolution: "level-mem@npm:3.0.1" - dependencies: - level-packager: "npm:~4.0.0" - memdown: "npm:~3.0.0" - checksum: 10/e4c680922afc3c8cd4502d761ab610c8aa7bcacde2550a0a463e1db069eeb55b6b7bec0bb7fda564cec82422944776f9909fe101b0d7746ad8f4f7446ec2a5cd - languageName: node - linkType: hard - "level-packager@npm:^5.1.0": version: 5.1.1 resolution: "level-packager@npm:5.1.1" @@ -37609,16 +36629,6 @@ __metadata: languageName: node linkType: hard -"level-packager@npm:~4.0.0": - version: 4.0.1 - resolution: "level-packager@npm:4.0.1" - dependencies: - encoding-down: "npm:~5.0.0" - levelup: "npm:^3.0.0" - checksum: 10/7521845db87475daaa001bf80748c6e1c53a3a14dd1d14daaffe168c02a0d559b88b86e565ff30fef5a00368ba47a16aea3b96588831423fdc6e0252155371b3 - languageName: node - linkType: hard - "level-peek@npm:1.0.6, level-peek@npm:^1.0.6": version: 1.0.6 resolution: "level-peek@npm:1.0.6" @@ -37682,16 +36692,6 @@ __metadata: languageName: node linkType: hard -"level-ws@npm:0.0.0": - version: 0.0.0 - resolution: "level-ws@npm:0.0.0" - dependencies: - readable-stream: "npm:~1.0.15" - xtend: "npm:~2.1.1" - checksum: 10/ee85b24c8fac8c48185af0dce6b87228c3ef941b2241793fe7201f7676a1588beb1cad5db1fbad75532628a28aaee50a4fbfd510c8da35faffc348a9fd05c272 - languageName: node - linkType: hard - "level@npm:6.0.1": version: 6.0.1 resolution: "level@npm:6.0.1" @@ -37765,33 +36765,6 @@ __metadata: languageName: node linkType: hard -"levelup@npm:^1.2.1": - version: 1.3.9 - resolution: "levelup@npm:1.3.9" - dependencies: - deferred-leveldown: "npm:~1.2.1" - level-codec: "npm:~7.0.0" - level-errors: "npm:~1.0.3" - level-iterator-stream: "npm:~1.3.0" - prr: "npm:~1.0.1" - semver: "npm:~5.4.1" - xtend: "npm:~4.0.0" - checksum: 10/2d7ce905a08b8073f3d012d66fdf7582111cc699da64772f0ebbb0dc225566674ef528d7167f6a7be9a0686a883623f638a9583c7b1a3e8cdcea40018666f2ca - languageName: node - linkType: hard - -"levelup@npm:^3.0.0": - version: 3.1.1 - resolution: "levelup@npm:3.1.1" - dependencies: - deferred-leveldown: "npm:~4.0.0" - level-errors: "npm:~2.0.0" - level-iterator-stream: "npm:~3.0.0" - xtend: "npm:~4.0.0" - checksum: 10/df3ecd82b21261c21a6e07bd780f7fc212d0988e02c0a3801e4f49fcfb6f4f277ed803c839bc8334cf21316835d43bcc33839c7d660da7d60e0728996bf78698 - languageName: node - linkType: hard - "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -38142,13 +37115,6 @@ __metadata: languageName: node linkType: hard -"lodash.cond@npm:^4.3.0": - version: 4.5.2 - resolution: "lodash.cond@npm:4.5.2" - checksum: 10/3c4b129baee08e97413dfed1d00d4ea72bb33d6193ad7158c10a0685433012ab4e8a938c41252c26392b8ee8871523974886ed1c58a17fe456c057f8b9cf7c02 - languageName: node - linkType: hard - "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -38749,7 +37715,7 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:^1.0.0, make-dir@npm:^1.3.0": +"make-dir@npm:^1.0.0": version: 1.3.0 resolution: "make-dir@npm:1.3.0" dependencies: @@ -38758,7 +37724,7 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": +"make-dir@npm:^2.1.0": version: 2.1.0 resolution: "make-dir@npm:2.1.0" dependencies: @@ -39013,15 +37979,6 @@ __metadata: languageName: node linkType: hard -"md5-hex@npm:^2.0.0": - version: 2.0.0 - resolution: "md5-hex@npm:2.0.0" - dependencies: - md5-o-matic: "npm:^0.1.1" - checksum: 10/2d4ab121347ab66dfdfc7f38c6c29f24c4c0c0f9faf036216b1b9f717a8495465d09bca32b86b9e96c12516e85e881fef75533a3ade554eef8de3f57d25db7df - languageName: node - linkType: hard - "md5-o-matic@npm:^0.1.1": version: 0.1.1 resolution: "md5-o-matic@npm:0.1.1" @@ -39095,7 +38052,7 @@ __metadata: languageName: node linkType: hard -"memdown@npm:1.4.1, memdown@npm:^1.0.0": +"memdown@npm:1.4.1": version: 1.4.1 resolution: "memdown@npm:1.4.1" dependencies: @@ -39109,20 +38066,6 @@ __metadata: languageName: node linkType: hard -"memdown@npm:~3.0.0": - version: 3.0.0 - resolution: "memdown@npm:3.0.0" - dependencies: - abstract-leveldown: "npm:~5.0.0" - functional-red-black-tree: "npm:~1.0.1" - immediate: "npm:~3.2.3" - inherits: "npm:~2.0.1" - ltgt: "npm:~2.2.0" - safe-buffer: "npm:~5.1.1" - checksum: 10/c3b9d58f32ae8694b1a2daa4c3a7aafd08ac986df9a6de56b9630920d69955b8b1df4c54ca2021d2e0c80153b53142cab469b39e311eb36dab9436798414e640 - languageName: node - linkType: hard - "memfs@npm:^3.1.2": version: 3.5.3 resolution: "memfs@npm:3.5.3" @@ -39274,29 +38217,6 @@ __metadata: languageName: node linkType: hard -"merge@npm:^1.2.0": - version: 1.2.1 - resolution: "merge@npm:1.2.1" - checksum: 10/2298c4fdcf64561f320b92338681f7ffcafafb579a6e294066ae3e7bd10ae25df363903d2f028072733b9f79a1f75d2b999aef98ad5d73de13641da39cda0913 - languageName: node - linkType: hard - -"merkle-patricia-tree@npm:^2.1.2, merkle-patricia-tree@npm:^2.3.2": - version: 2.3.2 - resolution: "merkle-patricia-tree@npm:2.3.2" - dependencies: - async: "npm:^1.4.2" - ethereumjs-util: "npm:^5.0.0" - level-ws: "npm:0.0.0" - levelup: "npm:^1.2.1" - memdown: "npm:^1.0.0" - readable-stream: "npm:^2.0.0" - rlp: "npm:^2.0.0" - semaphore: "npm:>=1.0.1" - checksum: 10/4188bd5b163719bd9c5da45ba356fac753a0f0ac0b9990923b5f064852e083334abd5e4d838dcd35ee50d884dad5c52adbd103387c89d20be3ec47b51784946a - languageName: node - linkType: hard - "merkletreejs@npm:0.3.11": version: 0.3.11 resolution: "merkletreejs@npm:0.3.11" @@ -39584,7 +38504,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.2, minimatch@npm:^3.0.3, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -40221,13 +39141,6 @@ __metadata: languageName: node linkType: hard -"mute-stream@npm:0.0.5": - version: 0.0.5 - resolution: "mute-stream@npm:0.0.5" - checksum: 10/a2a3b25fa0e6adf3516f51b1d8bd0cc48e256fc9384c3c5bd3a5c3635e0823d6dee4c28909a3f2a9d8782d7d8daa3a8c081163d881e4d7f30ff17e7d2eabde76 - languageName: node - linkType: hard - "mute-stream@npm:0.0.7": version: 0.0.7 resolution: "mute-stream@npm:0.0.7" @@ -40249,7 +39162,7 @@ __metadata: languageName: node linkType: hard -"mz@npm:^2.4.0, mz@npm:^2.7.0": +"mz@npm:^2.7.0": version: 2.7.0 resolution: "mz@npm:2.7.0" dependencies: @@ -41573,41 +40486,6 @@ __metadata: languageName: node linkType: hard -"nyc@npm:13.1.0": - version: 13.1.0 - resolution: "nyc@npm:13.1.0" - dependencies: - archy: "npm:^1.0.0" - arrify: "npm:^1.0.1" - caching-transform: "npm:^2.0.0" - convert-source-map: "npm:^1.6.0" - debug-log: "npm:^1.0.1" - find-cache-dir: "npm:^2.0.0" - find-up: "npm:^3.0.0" - foreground-child: "npm:^1.5.6" - glob: "npm:^7.1.3" - istanbul-lib-coverage: "npm:^2.0.1" - istanbul-lib-hook: "npm:^2.0.1" - istanbul-lib-instrument: "npm:^3.0.0" - istanbul-lib-report: "npm:^2.0.2" - istanbul-lib-source-maps: "npm:^2.0.1" - istanbul-reports: "npm:^2.0.1" - make-dir: "npm:^1.3.0" - merge-source-map: "npm:^1.1.0" - resolve-from: "npm:^4.0.0" - rimraf: "npm:^2.6.2" - signal-exit: "npm:^3.0.2" - spawn-wrap: "npm:^1.4.2" - test-exclude: "npm:^5.0.0" - uuid: "npm:^3.3.2" - yargs: "npm:11.1.0" - yargs-parser: "npm:^9.0.2" - bin: - nyc: ./bin/nyc.js - checksum: 10/30e4247e5d2fae022d327eb55286d9f60f14334664be93ef222f786a527a7bd25160efe70bf218539f6e694e34fb98f58272730fd1be01d12c050092dd3742a3 - languageName: node - linkType: hard - "nyc@npm:^15.1.0": version: 15.1.0 resolution: "nyc@npm:15.1.0" @@ -41756,18 +40634,6 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.0.4, object.assign@npm:^4.1.4": - version: 4.1.4 - resolution: "object.assign@npm:4.1.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10/fd82d45289df0a952d772817622ecbaeb4ec933d3abb53267aede083ee38f6a395af8fadfbc569ee575115b0b7c9b286e7cfb2b7a2557b1055f7acbce513bc29 - languageName: node - linkType: hard - "object.assign@npm:^4.1.2": version: 4.1.2 resolution: "object.assign@npm:4.1.2" @@ -41780,6 +40646,18 @@ __metadata: languageName: node linkType: hard +"object.assign@npm:^4.1.4": + version: 4.1.4 + resolution: "object.assign@npm:4.1.4" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.1.4" + has-symbols: "npm:^1.0.3" + object-keys: "npm:^1.1.1" + checksum: 10/fd82d45289df0a952d772817622ecbaeb4ec933d3abb53267aede083ee38f6a395af8fadfbc569ee575115b0b7c9b286e7cfb2b7a2557b1055f7acbce513bc29 + languageName: node + linkType: hard + "object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" @@ -41838,19 +40716,6 @@ __metadata: languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.1.6": - version: 2.1.6 - resolution: "object.getownpropertydescriptors@npm:2.1.6" - dependencies: - array.prototype.reduce: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.21.2" - safe-array-concat: "npm:^1.0.0" - checksum: 10/442983bf16c4cbf6f3b8882d14ca4d76fc78c4afc45a16454f6a728946f8e1aaf4ba4bd60557bbd800211bea0e7e83732344e884d5a8c20a195273fa637d8876 - languageName: node - linkType: hard - "object.groupby@npm:^1.0.0": version: 1.0.0 resolution: "object.groupby@npm:1.0.0" @@ -42007,13 +40872,6 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^1.0.0": - version: 1.1.0 - resolution: "onetime@npm:1.1.0" - checksum: 10/751f45ddeba213600c215280cb937efd7b530b498277c9605f9ee0e5e2022b3463e23fd6d1800e793e128301adee12ed4aba41242e50fbc0d631a9e171aef361 - languageName: node - linkType: hard - "onetime@npm:^2.0.0": version: 2.0.1 resolution: "onetime@npm:2.0.1" @@ -42162,7 +41020,7 @@ __metadata: languageName: node linkType: hard -"os-homedir@npm:^1.0.0, os-homedir@npm:^1.0.1": +"os-homedir@npm:^1.0.1": version: 1.0.2 resolution: "os-homedir@npm:1.0.2" checksum: 10/af609f5a7ab72de2f6ca9be6d6b91a599777afc122ac5cad47e126c1f67c176fe9b52516b9eeca1ff6ca0ab8587fe66208bc85e40a3940125f03cdb91408e9d2 @@ -42539,18 +41397,6 @@ __metadata: languageName: node linkType: hard -"package-hash@npm:^2.0.0": - version: 2.0.0 - resolution: "package-hash@npm:2.0.0" - dependencies: - graceful-fs: "npm:^4.1.11" - lodash.flattendeep: "npm:^4.4.0" - md5-hex: "npm:^2.0.0" - release-zalgo: "npm:^1.0.0" - checksum: 10/21c2e6be90d14fffdb960110df20f2942bf8e37157fd9071de1f4e3ae3d41cc3bbf153bed2a053d61d8ef73d0ec9c40805c44804c8063c8f7c1ebd8632085dae - languageName: node - linkType: hard - "package-hash@npm:^4.0.0": version: 4.0.0 resolution: "package-hash@npm:4.0.0" @@ -42672,15 +41518,6 @@ __metadata: languageName: node linkType: hard -"pad-right@npm:^0.2.2": - version: 0.2.2 - resolution: "pad-right@npm:0.2.2" - dependencies: - repeat-string: "npm:^1.5.2" - checksum: 10/090fe065f979e04b251e4b33706caf5817c973f1106e445ffaee3a742e1495b0892db858ee25383f97dd048262ba969559d43f31beb385d780c9a0a24f3063d0 - languageName: node - linkType: hard - "pako@npm:^1.0.3, pako@npm:~1.0.5": version: 1.0.11 resolution: "pako@npm:1.0.11" @@ -43044,7 +41881,7 @@ __metadata: languageName: node linkType: hard -"path-is-inside@npm:^1.0.1, path-is-inside@npm:^1.0.2": +"path-is-inside@npm:^1.0.2": version: 1.0.2 resolution: "path-is-inside@npm:1.0.2" checksum: 10/0b5b6c92d3018b82afb1f74fe6de6338c4c654de4a96123cb343f2b747d5606590ac0c890f956ed38220a4ab59baddfd7b713d78a62d240b20b14ab801fa02cb @@ -43221,13 +42058,6 @@ __metadata: languageName: node linkType: hard -"pg-connection-string@npm:2.6.1": - version: 2.6.1 - resolution: "pg-connection-string@npm:2.6.1" - checksum: 10/882344a47e1ecf3a91383e0809bf2ac48facea97fcec0358d6e060e1cbcb8737acde419b4c86f05da4ce4a16634ee50fff1d2bb787d73b52ccbfde697243ad8a - languageName: node - linkType: hard - "pg-int8@npm:1.0.1": version: 1.0.1 resolution: "pg-int8@npm:1.0.1" @@ -43482,27 +42312,6 @@ __metadata: languageName: node linkType: hard -"pkg-conf@npm:^2.0.0, pkg-conf@npm:^2.1.0": - version: 2.1.0 - resolution: "pkg-conf@npm:2.1.0" - dependencies: - find-up: "npm:^2.0.0" - load-json-file: "npm:^4.0.0" - checksum: 10/b50775157262abd1bfb4d3d948f3fc6c009d10266c6507d4de296af4e2cbb6d2738310784432185886d83144466fbb286b6e8ff0bc23dc5ee7d81810dc6c4788 - languageName: node - linkType: hard - -"pkg-config@npm:^1.1.0": - version: 1.1.1 - resolution: "pkg-config@npm:1.1.1" - dependencies: - debug-log: "npm:^1.0.0" - find-root: "npm:^1.0.0" - xtend: "npm:^4.0.1" - checksum: 10/951d904f0ba050e4e71b5143a518615f12b91416f11c68a00a2c5e2ddb56d9abbb7e66cbf7d182f7c424c0741e73f3f60790c0fd6723bc6449ab82c18fecee28 - languageName: node - linkType: hard - "pkg-dir@npm:^1.0.0": version: 1.0.0 resolution: "pkg-dir@npm:1.0.0" @@ -43512,15 +42321,6 @@ __metadata: languageName: node linkType: hard -"pkg-dir@npm:^3.0.0": - version: 3.0.0 - resolution: "pkg-dir@npm:3.0.0" - dependencies: - find-up: "npm:^3.0.0" - checksum: 10/70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 - languageName: node - linkType: hard - "pkg-dir@npm:^4.1.0, pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" @@ -43557,15 +42357,6 @@ __metadata: languageName: node linkType: hard -"pkg-up@npm:^1.0.0": - version: 1.0.0 - resolution: "pkg-up@npm:1.0.0" - dependencies: - find-up: "npm:^1.0.0" - checksum: 10/cffd99b39385147a42a4c7822326777be05be1fbbc3d6e20aa5d82a2d8e9a78de28488b0edb8331329ee27f0ad08aa3a5793566983701df2e5edc430654d617f - languageName: node - linkType: hard - "pkg-up@npm:^3.1.0": version: 3.1.0 resolution: "pkg-up@npm:3.1.0" @@ -43620,13 +42411,6 @@ __metadata: languageName: node linkType: hard -"pluralize@npm:^1.2.1": - version: 1.2.1 - resolution: "pluralize@npm:1.2.1" - checksum: 10/b6d1e873ac7fa0e1c3edd92ed650f53940a1d8e923ba4890899a2bd1495df4183a2408969945ce404293a181f706fd0ff4c1ec75fe13442de0d5ffc6ba5d4cd7 - languageName: node - linkType: hard - "pluralize@npm:^7.0.0": version: 7.0.0 resolution: "pluralize@npm:7.0.0" @@ -45053,13 +43837,6 @@ __metadata: languageName: node linkType: hard -"progress@npm:^1.1.8": - version: 1.1.8 - resolution: "progress@npm:1.1.8" - checksum: 10/873189b8ac74a0dcd23f3287646e8af360b71f6c40fbab572f7898093a6212c37c34cefcb20bfd583dc4f6c44ff98b1b8bce4dcaf67214175e99c0ba6d698839 - languageName: node - linkType: hard - "progress@npm:^2.0.0, progress@npm:^2.0.3": version: 2.0.3 resolution: "progress@npm:2.0.3" @@ -45957,16 +44734,6 @@ __metadata: languageName: node linkType: hard -"read-pkg-up@npm:^4.0.0": - version: 4.0.0 - resolution: "read-pkg-up@npm:4.0.0" - dependencies: - find-up: "npm:^3.0.0" - read-pkg: "npm:^3.0.0" - checksum: 10/dd867d9a912707bc11340aebc91780be9f36f34ee1d27a5dafb8520e0cb6344138b80eb8bf8325bebf519d26ecf14cbf6190d9e5f765f0120da5ede4013f4d13 - languageName: node - linkType: hard - "read-pkg-up@npm:^7.0.1": version: 7.0.1 resolution: "read-pkg-up@npm:7.0.1" @@ -46060,7 +44827,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4, readable-stream@npm:^1.0.33": +"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4": version: 1.1.14 resolution: "readable-stream@npm:1.1.14" dependencies: @@ -46094,7 +44861,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.1.4, readable-stream@npm:^2.3.6, readable-stream@npm:^2.3.8": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.1.4, readable-stream@npm:^2.3.8": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -46144,7 +44911,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:~1.0.15, readable-stream@npm:~1.0.26, readable-stream@npm:~1.0.26-4": +"readable-stream@npm:~1.0.26, readable-stream@npm:~1.0.26-4": version: 1.0.34 resolution: "readable-stream@npm:1.0.34" dependencies: @@ -46165,17 +44932,6 @@ __metadata: languageName: node linkType: hard -"readline2@npm:^1.0.1": - version: 1.0.1 - resolution: "readline2@npm:1.0.1" - dependencies: - code-point-at: "npm:^1.0.0" - is-fullwidth-code-point: "npm:^1.0.0" - mute-stream: "npm:0.0.5" - checksum: 10/7ac8ffa917af89f042bb24f695b1333158d83e26f398108f6d4ce7ca3ab6bccb6fa32623d9254ea1dc5420db7e6ce0b0fc527108645ababf6e280d8db3fe8a89 - languageName: node - linkType: hard - "real-require@npm:^0.2.0": version: 0.2.0 resolution: "real-require@npm:0.2.0" @@ -46361,13 +45117,6 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.11.0": - version: 0.11.1 - resolution: "regenerator-runtime@npm:0.11.1" - checksum: 10/64e62d78594c227e7d5269811bca9e4aa6451332adaae8c79a30cab0fa98733b1ad90bdb9d038095c340c6fad3b414a49a8d9e0b6b424ab7ff8f94f35704f8a2 - languageName: node - linkType: hard - "regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.4, regenerator-runtime@npm:^0.13.9": version: 0.13.11 resolution: "regenerator-runtime@npm:0.13.11" @@ -46556,83 +45305,6 @@ __metadata: languageName: node linkType: hard -"remix-lib@npm:0.4.30": - version: 0.4.30 - resolution: "remix-lib@npm:0.4.30" - dependencies: - async: "npm:^2.1.2" - ethereumjs-block: "npm:^2.2.2" - ethereumjs-tx: "npm:^2.1.2" - ethereumjs-util: "npm:^6.2.0" - ethereumjs-vm: "npm:4.1.3" - ethers: "npm:^4.0.40" - events: "npm:^3.0.0" - solc: "npm:^0.6.0" - web3: "npm:^1.2.4" - checksum: 10/b78a309af142febe6a6cdd124d32a07d59e80ba786d5c42e7a898b304241fcfa5fe9ed67d3db40af43fa631bf68212845fbc2785612e0cc3800edeae2a7d04fc - languageName: node - linkType: hard - -"remix-simulator@npm:0.1.9-beta.6": - version: 0.1.9-beta.6 - resolution: "remix-simulator@npm:0.1.9-beta.6" - dependencies: - ansi-gray: "npm:^0.1.1" - async: "npm:^3.1.0" - body-parser: "npm:^1.18.2" - color-support: "npm:^1.1.3" - commander: "npm:^2.19.0" - cors: "npm:^2.8.5" - ethereumjs-block: "npm:^2.2.2" - ethereumjs-util: "npm:^6.2.0" - express: "npm:^4.16.3" - express-ws: "npm:^4.0.0" - merge: "npm:^1.2.0" - remix-lib: "npm:0.4.30" - standard: "npm:^10.0.3" - time-stamp: "npm:^2.0.0" - web3: "npm:^1.2.4" - bin: - ethsim: ./bin/ethsim - remix-simulator: ./bin/ethsim - checksum: 10/1cc8920fd91f018a999ee4cd4563299f29f35d84e38e2912edfedc4e73637524a639632c1624d027747a834feba70d188fc2512a6dec82a0161bc419e08c35ba - languageName: node - linkType: hard - -"remix-solidity@npm:0.3.31": - version: 0.3.31 - resolution: "remix-solidity@npm:0.3.31" - dependencies: - eslint-scope: "npm:^5.0.0" - remix-lib: "npm:0.4.30" - solc: "npm:^0.6.0" - webworkify: "npm:^1.2.1" - checksum: 10/1f52865c2693c7da281e0e77a129e9a87ba47237a4f09989dd6ed26d55bc20fbdcf156aaaaafd44cefebcf82ed1f87ea70b3585a4a026ce6611b35c65b6bf8db - languageName: node - linkType: hard - -"remix-tests@npm:0.1.34": - version: 0.1.34 - resolution: "remix-tests@npm:0.1.34" - dependencies: - async: "npm:^2.6.0" - change-case: "npm:^3.0.1" - colors: "npm:^1.1.2" - commander: "npm:^2.13.0" - remix-lib: "npm:0.4.30" - remix-simulator: "npm:0.1.9-beta.6" - remix-solidity: "npm:0.3.31" - signale: "npm:^1.4.0" - web3: "npm:^1.2.4" - winston: "npm:^3.0.0" - peerDependencies: - yo-yoify: ^4.3.0 - bin: - remix-tests: ./bin/remix-tests - checksum: 10/aaa5af910b650d7ec4a6b7bd347137abfcc0989c1562f1e9dc6c2c927d07fd0e51a69af7c16c4cd4d8dbb6cba531bd82bf5d8014234b7e6d57a3b60933e4b5b8 - languageName: node - linkType: hard - "remove-trailing-separator@npm:^1.0.1": version: 1.1.0 resolution: "remove-trailing-separator@npm:1.1.0" @@ -46653,7 +45325,7 @@ __metadata: languageName: node linkType: hard -"repeat-string@npm:^1.5.2, repeat-string@npm:^1.6.1": +"repeat-string@npm:^1.6.1": version: 1.6.1 resolution: "repeat-string@npm:1.6.1" checksum: 10/1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 @@ -46820,7 +45492,7 @@ __metadata: languageName: node linkType: hard -"require-uncached@npm:^1.0.2, require-uncached@npm:^1.0.3": +"require-uncached@npm:^1.0.3": version: 1.0.3 resolution: "require-uncached@npm:1.0.3" dependencies: @@ -47062,7 +45734,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.7, resolve@npm:^1.22.4, resolve@npm:^1.3.3": +"resolve@npm:^1.1.7, resolve@npm:^1.22.4": version: 1.22.4 resolution: "resolve@npm:1.22.4" dependencies: @@ -47136,7 +45808,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.3.3#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": version: 1.22.4 resolution: "resolve@patch:resolve@npm%3A1.22.4#optional!builtin::version=1.22.4&hash=c3c19d" dependencies: @@ -47189,16 +45861,6 @@ __metadata: languageName: node linkType: hard -"restore-cursor@npm:^1.0.1": - version: 1.0.1 - resolution: "restore-cursor@npm:1.0.1" - dependencies: - exit-hook: "npm:^1.0.0" - onetime: "npm:^1.0.0" - checksum: 10/e40bd1a540d69970341fc734dfada908815a44f91903211f34d32c47da33f6e7824bbc97f6e76aff387137d6b2a1ada3d3d2dc1b654b8accdc8ed5721c46cbfa - languageName: node - linkType: hard - "restore-cursor@npm:^2.0.0": version: 2.0.0 resolution: "restore-cursor@npm:2.0.0" @@ -47349,7 +46011,7 @@ __metadata: languageName: node linkType: hard -"rlp@npm:2.2.7, rlp@npm:^2.0.0, rlp@npm:^2.2.1, rlp@npm:^2.2.2, rlp@npm:^2.2.3, rlp@npm:^2.2.4": +"rlp@npm:2.2.7, rlp@npm:^2.2.3, rlp@npm:^2.2.4": version: 2.2.7 resolution: "rlp@npm:2.2.7" dependencies: @@ -47465,15 +46127,6 @@ __metadata: languageName: node linkType: hard -"run-async@npm:^0.1.0": - version: 0.1.0 - resolution: "run-async@npm:0.1.0" - dependencies: - once: "npm:^1.3.0" - checksum: 10/66fd3ada4036a77a70fbf5063d66bf88df77fa9cbf20516115a6a09431ba66621f353e6fefecd10f9cb6a3345b5fe007a438dbf3f6020fbfd5732634cd4d3e15 - languageName: node - linkType: hard - "run-async@npm:^2.2.0, run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -47497,7 +46150,7 @@ __metadata: languageName: node linkType: hard -"run-parallel@npm:^1.1.2, run-parallel@npm:^1.1.9": +"run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" dependencies: @@ -47543,13 +46196,6 @@ __metadata: languageName: node linkType: hard -"rx-lite@npm:^3.1.2": - version: 3.1.2 - resolution: "rx-lite@npm:3.1.2" - checksum: 10/e11d3b1a044e0fe5af82b923dee68aa83b193bf3ad8128cf70e033cbc414f175011a644419c25fe62f75a6f20a1f2aee3b407847dae129fa8df1198b618fb1b2 - languageName: node - linkType: hard - "rxjs@npm:7.8.0": version: 7.8.0 resolution: "rxjs@npm:7.8.0" @@ -47996,13 +46642,6 @@ __metadata: languageName: node linkType: hard -"seed-random@npm:~2.2.0": - version: 2.2.0 - resolution: "seed-random@npm:2.2.0" - checksum: 10/af4da53206a7fa4b76f4f1bbd1713b10f2e7e4f25a22d1f9247f0e4b5ac86eb8f018338f5fd7f0fe822905f12987aa1d6f4eebf596c5c20afa4a01b0327db624 - languageName: node - linkType: hard - "seek-bzip@npm:^1.0.5": version: 1.0.6 resolution: "seek-bzip@npm:1.0.6" @@ -48031,13 +46670,6 @@ __metadata: languageName: node linkType: hard -"semaphore@npm:>=1.0.1, semaphore@npm:^1.1.0": - version: 1.1.0 - resolution: "semaphore@npm:1.1.0" - checksum: 10/7a62e0486ab2e361aecf5d88ecb99f42236bb9fbe29e432644d8af371e78c559dc3f2fbef0f57f716491071c214bdf1a15f1f398445b20423278750e2290ea37 - languageName: node - linkType: hard - "semver-compare@npm:^1.0.0": version: 1.0.0 resolution: "semver-compare@npm:1.0.0" @@ -48135,13 +46767,6 @@ __metadata: languageName: node linkType: hard -"serialize-error@npm:^2.1.0": - version: 2.1.0 - resolution: "serialize-error@npm:2.1.0" - checksum: 10/28464a6f65e6becd6e49fb782aff06573fdbf3d19f161a20228179842fed05c75a34110e54c3ee020b00240f9e11d8bee9b9fee5d04e0bc0bef1fdbf2baa297e - languageName: node - linkType: hard - "serialize-error@npm:^8.0.1": version: 8.1.0 resolution: "serialize-error@npm:8.1.0" @@ -48440,19 +47065,6 @@ __metadata: languageName: node linkType: hard -"shelljs@npm:^0.7.5": - version: 0.7.8 - resolution: "shelljs@npm:0.7.8" - dependencies: - glob: "npm:^7.0.0" - interpret: "npm:^1.0.0" - rechoir: "npm:^0.6.2" - bin: - shjs: ./bin/shjs - checksum: 10/c30b6a204167fcb54d2019a83be1e0f7b03346883d0454cd588911ea88843dbf1383ceb6e745fdea2da4b343644b57d373bc3802aaf74d53765adca8adc89b3a - languageName: node - linkType: hard - "shiki@npm:^1.9.0": version: 1.9.0 resolution: "shiki@npm:1.9.0" @@ -48499,17 +47111,6 @@ __metadata: languageName: node linkType: hard -"signale@npm:^1.4.0": - version: 1.4.0 - resolution: "signale@npm:1.4.0" - dependencies: - chalk: "npm:^2.3.2" - figures: "npm:^2.0.0" - pkg-conf: "npm:^2.1.0" - checksum: 10/0659f7168ce4322f62123e74fd537956b032b1ebac9ffc8fcf3a631082c491186c7715eeb41fc6930187923679b85609cb8923789af594e5be4e7aa06acfffa4 - languageName: node - linkType: hard - "sigstore@npm:^1.3.0": version: 1.9.0 resolution: "sigstore@npm:1.9.0" @@ -48659,13 +47260,6 @@ __metadata: languageName: node linkType: hard -"slice-ansi@npm:0.0.4": - version: 0.0.4 - resolution: "slice-ansi@npm:0.0.4" - checksum: 10/481d969c6aa771b27d7baacd6fe321751a0b9eb410274bda10ca81ea641bbfe747e428025d6d8f15bd635fdcfd57e8b2d54681ee6b0ce0c40f78644b144759e3 - languageName: node - linkType: hard - "slice-ansi@npm:1.0.0": version: 1.0.0 resolution: "slice-ansi@npm:1.0.0" @@ -48936,24 +47530,6 @@ __metadata: languageName: node linkType: hard -"solc@npm:^0.6.0": - version: 0.6.12 - resolution: "solc@npm:0.6.12" - dependencies: - command-exists: "npm:^1.2.8" - commander: "npm:3.0.2" - fs-extra: "npm:^0.30.0" - js-sha3: "npm:0.8.0" - memorystream: "npm:^0.3.1" - require-from-string: "npm:^2.0.0" - semver: "npm:^5.5.0" - tmp: "npm:0.0.33" - bin: - solcjs: solcjs - checksum: 10/27c665d182baf9120e489ac1ce1dc2b66237801d4386328b734d37bb44e596e687aacbc140b19bf4531c2549c2779a53f95ac25078ae24dcd0be8823e2081f17 - languageName: node - linkType: hard - "sonic-boom@npm:^4.0.1": version: 4.1.0 resolution: "sonic-boom@npm:4.1.0" @@ -49097,13 +47673,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:0.5.6": - version: 0.5.6 - resolution: "source-map@npm:0.5.6" - checksum: 10/c62fe98e106c762307eea3a982242c1a76a31bc762da10fe2dda12252d423c163e0cd45d313330c8bd040cc5121702511138252308f72b8a9273825e81e4db30 - languageName: node - linkType: hard - "source-map@npm:0.6.1, source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -49427,22 +47996,6 @@ __metadata: languageName: node linkType: hard -"stack-chain@npm:^2.0.0": - version: 2.0.0 - resolution: "stack-chain@npm:2.0.0" - checksum: 10/1ab6aafa6c0d4194d4cf15eac9e4121492da79596268eed6d9101e91e2cea1c5998638faf74968b7aed1ff5f76b35e7390cdd56c156cca4a8f02244716786ae8 - languageName: node - linkType: hard - -"stack-generator@npm:^2.0.5": - version: 2.0.10 - resolution: "stack-generator@npm:2.0.10" - dependencies: - stackframe: "npm:^1.3.4" - checksum: 10/4fc3978a934424218a0aa9f398034e1f78153d5ff4f4ff9c62478c672debb47dd58de05b09fc3900530cbb526d72c93a6e6c9353bacc698e3b1c00ca3dda0c47 - languageName: node - linkType: hard - "stack-trace@npm:0.0.x": version: 0.0.10 resolution: "stack-trace@npm:0.0.10" @@ -49475,27 +48028,6 @@ __metadata: languageName: node linkType: hard -"stacktrace-gps@npm:^3.0.4": - version: 3.1.2 - resolution: "stacktrace-gps@npm:3.1.2" - dependencies: - source-map: "npm:0.5.6" - stackframe: "npm:^1.3.4" - checksum: 10/21cb60ce0990f7a661e964cf4bdef1e70dda2286fb628fbd0fd1e69e8925138433d08ed84969de2d396b3b91515e15336a502f777c26587db89f3933d6f63f9b - languageName: node - linkType: hard - -"stacktrace-js@npm:^2.0.0": - version: 2.0.2 - resolution: "stacktrace-js@npm:2.0.2" - dependencies: - error-stack-parser: "npm:^2.0.6" - stack-generator: "npm:^2.0.5" - stacktrace-gps: "npm:^3.0.4" - checksum: 10/e5f60a09852687e4a9206927fe1078e24d63e00a71a2dcddd67940e9504a54931a3454439d5b4e3e0e62aeb979be810573e8d3332fbef0dbfa335a8781b4b57c - languageName: node - linkType: hard - "stacktrace-parser@npm:^0.1.10": version: 0.1.10 resolution: "stacktrace-parser@npm:0.1.10" @@ -49505,37 +48037,6 @@ __metadata: languageName: node linkType: hard -"standard-engine@npm:~7.0.0": - version: 7.0.0 - resolution: "standard-engine@npm:7.0.0" - dependencies: - deglob: "npm:^2.1.0" - get-stdin: "npm:^5.0.1" - minimist: "npm:^1.1.0" - pkg-conf: "npm:^2.0.0" - checksum: 10/71c40c189e22595b7e3674763ac3a032ac5ab19ad612fc8f66981284635965b1f0961f2e44440c16fe2b2064f2fc2a5a6f18637c2e135d67582d3e921fc9d7cf - languageName: node - linkType: hard - -"standard@npm:^10.0.3": - version: 10.0.3 - resolution: "standard@npm:10.0.3" - dependencies: - eslint: "npm:~3.19.0" - eslint-config-standard: "npm:10.2.1" - eslint-config-standard-jsx: "npm:4.0.2" - eslint-plugin-import: "npm:~2.2.0" - eslint-plugin-node: "npm:~4.2.2" - eslint-plugin-promise: "npm:~3.5.0" - eslint-plugin-react: "npm:~6.10.0" - eslint-plugin-standard: "npm:~3.0.1" - standard-engine: "npm:~7.0.0" - bin: - standard: ./bin/cmd.js - checksum: 10/09bf6e229f01be7fd5f2f01f7800ded0878c57739db8659d6e19a902621b0b8d34fec21eee26fe874eaf8ddba624af53e09015eb443ec47a1eb3305e3b5223c5 - languageName: node - linkType: hard - "static-extend@npm:^0.1.1": version: 0.1.2 resolution: "static-extend@npm:0.1.2" @@ -49719,13 +48220,6 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:0.1.1": - version: 0.1.1 - resolution: "string-argv@npm:0.1.1" - checksum: 10/880e327b230f5a7e6a4b7e348617b32b45db3e420815b10b59bfe285e0ddb82ef73b6770d5e610ca73d1eb513df0a35661268d6e06c6d7663defb247a8b94765 - languageName: node - linkType: hard - "string-argv@npm:0.3.1": version: 0.3.1 resolution: "string-argv@npm:0.3.1" @@ -50294,15 +48788,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^6.1.0": - version: 6.1.0 - resolution: "supports-color@npm:6.1.0" - dependencies: - has-flag: "npm:^3.0.0" - checksum: 10/78a5c43b9e478966ed41ed923a942dfd6209bf3bcc826a01435cfec98d5a17ca5d866effd2b6be438c16cd73b99f4a4397fcbb282e6f653e39046e1335334189 - languageName: node - linkType: hard - "supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" @@ -50550,20 +49035,6 @@ __metadata: languageName: node linkType: hard -"table@npm:^3.7.8": - version: 3.8.3 - resolution: "table@npm:3.8.3" - dependencies: - ajv: "npm:^4.7.0" - ajv-keywords: "npm:^1.0.0" - chalk: "npm:^1.1.1" - lodash: "npm:^4.0.0" - slice-ansi: "npm:0.0.4" - string-width: "npm:^2.0.0" - checksum: 10/2909eedc40712da7373b47b3fc18896c0ed21fbc1379c25c9d5f1fbef2184b3a7ba7d840a7359e1ce2b63ae32b971f6d006b81a3a04ee3eb05340a5a4f402e5c - languageName: node - linkType: hard - "tablemark@npm:^3.0.0": version: 3.0.0 resolution: "tablemark@npm:3.0.0" @@ -51076,18 +49547,6 @@ __metadata: languageName: node linkType: hard -"test-exclude@npm:^5.0.0": - version: 5.2.3 - resolution: "test-exclude@npm:5.2.3" - dependencies: - glob: "npm:^7.1.3" - minimatch: "npm:^3.0.4" - read-pkg-up: "npm:^4.0.0" - require-main-filename: "npm:^2.0.0" - checksum: 10/90f5ebf975da303377f1ee65cc80b78a91abcfe43a12f5e08ebd76a993b237cd34bfda1c79eeb3c8ab179d0dd09753efae56711eec9d267177869f7ee8c423df - languageName: node - linkType: hard - "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -51217,13 +49676,6 @@ __metadata: languageName: node linkType: hard -"time-stamp@npm:^2.0.0": - version: 2.2.0 - resolution: "time-stamp@npm:2.2.0" - checksum: 10/b602ea7c86793989fb22cf5aec35307e78af3e3c4f9ef7efdf0dabe296def23684985a55fb56a37143d80256f07f17768916d80995cd197aa3a811470d2e6f54 - languageName: node - linkType: hard - "timed-out@npm:^4.0.0, timed-out@npm:^4.0.1": version: 4.0.1 resolution: "timed-out@npm:4.0.1" @@ -51256,7 +49708,7 @@ __metadata: languageName: node linkType: hard -"title-case@npm:^2.1.0, title-case@npm:^2.1.1": +"title-case@npm:^2.1.0": version: 2.1.1 resolution: "title-case@npm:2.1.1" dependencies: @@ -51641,24 +50093,6 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:7.0.1": - version: 7.0.1 - resolution: "ts-node@npm:7.0.1" - dependencies: - arrify: "npm:^1.0.0" - buffer-from: "npm:^1.1.0" - diff: "npm:^3.1.0" - make-error: "npm:^1.1.1" - minimist: "npm:^1.2.0" - mkdirp: "npm:^0.5.1" - source-map-support: "npm:^0.5.6" - yn: "npm:^2.0.0" - bin: - ts-node: dist/bin.js - checksum: 10/c1e0f1582867c34a03a25b1861e86922b9576931d473d48cd13275400832972350c4564e5f2c2df5817be6acbbb8e1dedf43bdd6f8c0f06b15d3530562a08a90 - languageName: node - linkType: hard - "ts-node@npm:8.9.1": version: 8.9.1 resolution: "ts-node@npm:8.9.1" @@ -52587,13 +51021,6 @@ __metadata: languageName: node linkType: hard -"uniq@npm:^1.0.1": - version: 1.0.1 - resolution: "uniq@npm:1.0.1" - checksum: 10/8206535f83745ea83f9da7035f3b983fd6ed5e35b8ed7745441944e4065b616bc67cf0d0a23a86b40ee0074426f0607f0a138f9b78e124eb6a7a6a6966055709 - languageName: node - linkType: hard - "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -52930,15 +51357,6 @@ __metadata: languageName: node linkType: hard -"user-home@npm:^2.0.0": - version: 2.0.0 - resolution: "user-home@npm:2.0.0" - dependencies: - os-homedir: "npm:^1.0.0" - checksum: 10/a3329faa959fcd9e3e01a03347ca974f7f6b8896e6a634f29c61d8d5b61557d853c6fc5a6dff1a28e2da85b400d0e4490368a28de452ba8c41a2bf3a92cb110a - languageName: node - linkType: hard - "utf-8-validate@npm:5.0.7": version: 5.0.7 resolution: "utf-8-validate@npm:5.0.7" @@ -52973,13 +51391,6 @@ __metadata: languageName: node linkType: hard -"util-arity@npm:^1.0.2": - version: 1.1.0 - resolution: "util-arity@npm:1.1.0" - checksum: 10/f1c4c36395eccfa8a153c7aedf3eaf4acc5b2e9696b8ef7113312b0389f67702d973a593e39af715d6673cfe11f33fc53648e1f2209efdc4c66637fec161c5d7 - languageName: node - linkType: hard - "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -52987,21 +51398,6 @@ __metadata: languageName: node linkType: hard -"util.promisify@npm:^1.0.0": - version: 1.1.2 - resolution: "util.promisify@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - for-each: "npm:^0.3.3" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - object.getownpropertydescriptors: "npm:^2.1.6" - safe-array-concat: "npm:^1.0.0" - checksum: 10/90c139773aedfe0cda48f2e43fb96bb0b45ab1d9544ed0cc1949d6acda17053dcb60ed1d3d0a1e121f0e2c26ca21e84dc589a5f06ec33059a4c742e7cba4584f - languageName: node - linkType: hard - "util.promisify@npm:~1.0.0": version: 1.0.1 resolution: "util.promisify@npm:1.0.1" @@ -53229,17 +51625,6 @@ __metadata: languageName: node linkType: hard -"verror@npm:^1.9.0": - version: 1.10.1 - resolution: "verror@npm:1.10.1" - dependencies: - assert-plus: "npm:^1.0.0" - core-util-is: "npm:1.0.2" - extsprintf: "npm:^1.2.0" - checksum: 10/2b24eb830ecee7be69ab84192946074d7e8a85a42b0784d9874a28f52616065953ab4297975c87045879505fe9a6ac38dedad29a7470bbe0324540e5b6e92f62 - languageName: node - linkType: hard - "visit-values@npm:^2.0.0": version: 2.0.0 resolution: "visit-values@npm:2.0.0" @@ -53429,17 +51814,6 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.10.1": - version: 1.10.1 - resolution: "web3-bzz@npm:1.10.1" - dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 10/6907516c04aa8f2bb3907c2da6931a7b2ea897dcc1621839e8868d4db862375e77979c066f3a3aec8067e1a784b156b4c0a1d1c882f9859b43e4c81039035b6b - languageName: node - linkType: hard - "web3-bzz@npm:1.6.1": version: 1.6.1 resolution: "web3-bzz@npm:1.6.1" @@ -53483,16 +51857,6 @@ __metadata: languageName: node linkType: hard -"web3-core-helpers@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-helpers@npm:1.10.1" - dependencies: - web3-eth-iban: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/b0ca784b08861b3add442dbf7c7d2326180973b962d8d781f5ca6393099b694dfb29bdd07ae50134620c1588f6d734b8b8ee6e345fc8b494340505d352f8098c - languageName: node - linkType: hard - "web3-core-helpers@npm:1.6.1": version: 1.6.1 resolution: "web3-core-helpers@npm:1.6.1" @@ -53536,19 +51900,6 @@ __metadata: languageName: node linkType: hard -"web3-core-method@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-method@npm:1.10.1" - dependencies: - "@ethersproject/transactions": "npm:^5.6.2" - web3-core-helpers: "npm:1.10.1" - web3-core-promievent: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/fe011256c0a034769dea7cb150cf4a7ee6cab82b03cf6dd001745e362a3c5da892dc1d82c4858ad0d39036b139d9edb1b296b565ba96baacedb7a44fde974812 - languageName: node - linkType: hard - "web3-core-method@npm:1.6.1": version: 1.6.1 resolution: "web3-core-method@npm:1.6.1" @@ -53597,15 +51948,6 @@ __metadata: languageName: node linkType: hard -"web3-core-promievent@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-promievent@npm:1.10.1" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/cd9bc5c067782f374ad4aa69536f382c0c0528a545f9ea8763e605de297cb78bdbc0ea708601d099f8d6ceaae11529062357309a6e037db3673601d7f9a63e88 - languageName: node - linkType: hard - "web3-core-promievent@npm:1.6.1": version: 1.6.1 resolution: "web3-core-promievent@npm:1.6.1" @@ -53646,19 +51988,6 @@ __metadata: languageName: node linkType: hard -"web3-core-requestmanager@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-requestmanager@npm:1.10.1" - dependencies: - util: "npm:^0.12.5" - web3-core-helpers: "npm:1.10.1" - web3-providers-http: "npm:1.10.1" - web3-providers-ipc: "npm:1.10.1" - web3-providers-ws: "npm:1.10.1" - checksum: 10/03b5399fcb7660fb45012d032a749e41fddd4f00674d4bdb4ac7fc3f08836637c7e1d0660d3a0e127aa0368d63a034ee2b22645cf3730c0f56e62b71a7ea2cf3 - languageName: node - linkType: hard - "web3-core-requestmanager@npm:1.6.1": version: 1.6.1 resolution: "web3-core-requestmanager@npm:1.6.1" @@ -53708,16 +52037,6 @@ __metadata: languageName: node linkType: hard -"web3-core-subscriptions@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core-subscriptions@npm:1.10.1" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.1" - checksum: 10/d022a849e46f8365b8843205e92b6d3c28017fa9fd3b74c72553b0d1fef83f88fd674dec5a72d6c7082c20f1f5f82d9c3c8dccbb284a4a1c60cd8ce91e326181 - languageName: node - linkType: hard - "web3-core-subscriptions@npm:1.6.1": version: 1.6.1 resolution: "web3-core-subscriptions@npm:1.6.1" @@ -53763,21 +52082,6 @@ __metadata: languageName: node linkType: hard -"web3-core@npm:1.10.1": - version: 1.10.1 - resolution: "web3-core@npm:1.10.1" - dependencies: - "@types/bn.js": "npm:^5.1.1" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-requestmanager: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/196d77da7f1fdc45bd37220baa8875960cc393c30dd16036b7b798fc10b13257bebccfeb7ee2abee8a252bec39608912421a4c108f84af8905ba1b583b8123b4 - languageName: node - linkType: hard - "web3-core@npm:1.6.1": version: 1.6.1 resolution: "web3-core@npm:1.6.1" @@ -53945,16 +52249,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-abi@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-abi@npm:1.10.1" - dependencies: - "@ethersproject/abi": "npm:^5.6.3" - web3-utils: "npm:1.10.1" - checksum: 10/acc702b0022542515ae9192ee43d12831164de82d1b392113d7410c1d332790cb15fe2a17cc8ba76391179422cc612b99d9abcbb6423ae74cca868e45e94cb38 - languageName: node - linkType: hard - "web3-eth-abi@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-abi@npm:1.6.1" @@ -54068,24 +52362,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-accounts@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-accounts@npm:1.10.1" - dependencies: - "@ethereumjs/common": "npm:2.5.0" - "@ethereumjs/tx": "npm:3.3.2" - "@ethereumjs/util": "npm:^8.1.0" - eth-lib: "npm:0.2.8" - scrypt-js: "npm:^3.0.1" - uuid: "npm:^9.0.0" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/334b4b5075ffd547ebf487ec7b4c209ea7e8d40f0e48f1b56134f06f4e4cbea9a62924ad8407ec7ff7209e3f7bf22face82eeb9a65e4c0d2c2bbfcaa6beeaa83 - languageName: node - linkType: hard - "web3-eth-accounts@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-accounts@npm:1.6.1" @@ -54219,22 +52495,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-contract@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-contract@npm:1.10.1" - dependencies: - "@types/bn.js": "npm:^5.1.1" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-promievent: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-eth-abi: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/cf90d7286eb690fb2b25dcd19e58763f0e8745fc474663b0dba5d7e356b5b89d29509b26f7863bf200428f883e8f70a132b1ba40d0ddc9e320bed5129e0535aa - languageName: node - linkType: hard - "web3-eth-contract@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-contract@npm:1.6.1" @@ -54344,22 +52604,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-ens@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-ens@npm:1.10.1" - dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-promievent: "npm:1.10.1" - web3-eth-abi: "npm:1.10.1" - web3-eth-contract: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/fced5d691ed5beebb8be9faaf75e6400e09a1df4006c308766102f6ff559206c6921537804f471d8bbbbfc843dd22d7771b2ce4a80767eff64bb58e7b80bbd33 - languageName: node - linkType: hard - "web3-eth-ens@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-ens@npm:1.6.1" @@ -54452,16 +52696,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-iban@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-iban@npm:1.10.1" - dependencies: - bn.js: "npm:^5.2.1" - web3-utils: "npm:1.10.1" - checksum: 10/c3e3c9c551a812cbdb2c88d016902d22b029c821294f4499a5e5147d3b45727076069c6beb5d76dbe83b2b0187f236458ce17502855a419e12eaf8c1e3c6d1c7 - languageName: node - linkType: hard - "web3-eth-iban@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-iban@npm:1.6.1" @@ -54530,20 +52764,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-personal@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth-personal@npm:1.10.1" - dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-net: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/bd3733f32592890e15f3a2e3c866b7c9cabd71c0cc1c992f0a4c325c06f69f6db63c7d03ffeb786e06e47b1a0378b18963cbb298069cde23ebaf37c04be10d88 - languageName: node - linkType: hard - "web3-eth-personal@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-personal@npm:1.6.1" @@ -54634,26 +52854,6 @@ __metadata: languageName: node linkType: hard -"web3-eth@npm:1.10.1": - version: 1.10.1 - resolution: "web3-eth@npm:1.10.1" - dependencies: - web3-core: "npm:1.10.1" - web3-core-helpers: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-eth-abi: "npm:1.10.1" - web3-eth-accounts: "npm:1.10.1" - web3-eth-contract: "npm:1.10.1" - web3-eth-ens: "npm:1.10.1" - web3-eth-iban: "npm:1.10.1" - web3-eth-personal: "npm:1.10.1" - web3-net: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/4ad39270953a41c025d869c3f3f8b48b1b5694c29cd4e892c2bda181e8322977ce8b17ecaa387bc9eab107cf2a1465c57354cf7508e5714233caaed1611f3ddd - languageName: node - linkType: hard - "web3-eth@npm:1.6.1": version: 1.6.1 resolution: "web3-eth@npm:1.6.1" @@ -54782,17 +52982,6 @@ __metadata: languageName: node linkType: hard -"web3-net@npm:1.10.1": - version: 1.10.1 - resolution: "web3-net@npm:1.10.1" - dependencies: - web3-core: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/535e87452db2e8a30e08f9349c56555e59d76962de74b6ef09cd89cf89d5a70423f12db2bfcab4e4d8e411e0e198e6aa9abee3bb1c4c6d61fab7cfd76303d038 - languageName: node - linkType: hard - "web3-net@npm:1.6.1": version: 1.6.1 resolution: "web3-net@npm:1.6.1" @@ -54862,18 +53051,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-http@npm:1.10.1": - version: 1.10.1 - resolution: "web3-providers-http@npm:1.10.1" - dependencies: - abortcontroller-polyfill: "npm:^1.7.3" - cross-fetch: "npm:^3.1.4" - es6-promise: "npm:^4.2.8" - web3-core-helpers: "npm:1.10.1" - checksum: 10/0e64cebbe735a4bcc4574443b60311c3f85647331954ce624d9a73c6f99b47cac38609e55e349e53a336d457a4e24b98a3b920f2f1ac725ae4b6648cc2deea82 - languageName: node - linkType: hard - "web3-providers-http@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-http@npm:1.6.1" @@ -54940,16 +53117,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-ipc@npm:1.10.1": - version: 1.10.1 - resolution: "web3-providers-ipc@npm:1.10.1" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.10.1" - checksum: 10/bb176d7460130e1781d19778f7ac058873bdf26ed9f82adcfe4c3572e5dc4df558a41bbe7f22858659cf8cb136abf8420f916890f389a5158eeb2e88b7bdd05a - languageName: node - linkType: hard - "web3-providers-ipc@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ipc@npm:1.6.1" @@ -55013,17 +53180,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-ws@npm:1.10.1": - version: 1.10.1 - resolution: "web3-providers-ws@npm:1.10.1" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.1" - websocket: "npm:^1.0.32" - checksum: 10/ff5e1bc56f6ba587e12414d9cd795df749cf48729cb4bcc15fdc81e9459cc86f3f9a4f01617af87f0d19708599cff787f00bd192c9f6b454d109eca818510b19 - languageName: node - linkType: hard - "web3-providers-ws@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ws@npm:1.6.1" @@ -55130,18 +53286,6 @@ __metadata: languageName: node linkType: hard -"web3-shh@npm:1.10.1": - version: 1.10.1 - resolution: "web3-shh@npm:1.10.1" - dependencies: - web3-core: "npm:1.10.1" - web3-core-method: "npm:1.10.1" - web3-core-subscriptions: "npm:1.10.1" - web3-net: "npm:1.10.1" - checksum: 10/8fc943a53ace0376a8785c60e2a5623875192ec64ce0b0bae35fb164b536e9bcef41318b8ffd76df2ee2057525fa7520ba44b050dc2e9689835bc778a87dc151 - languageName: node - linkType: hard - "web3-shh@npm:1.6.1": version: 1.6.1 resolution: "web3-shh@npm:1.6.1" @@ -55242,22 +53386,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:1.10.1": - version: 1.10.1 - resolution: "web3-utils@npm:1.10.1" - dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/0a8a65cf8efe8b7dc6bae413f6508c23c44af05d124ce408335c8ed42da582171b6a9a20cc2d55d93fd609972e0d9d8c35284ec4d0ca8871a7f7ed283bb858df - languageName: node - linkType: hard - "web3-utils@npm:1.6.1": version: 1.6.1 resolution: "web3-utils@npm:1.6.1" @@ -55568,21 +53696,6 @@ __metadata: languageName: node linkType: hard -"web3@npm:^1.2.4": - version: 1.10.1 - resolution: "web3@npm:1.10.1" - dependencies: - web3-bzz: "npm:1.10.1" - web3-core: "npm:1.10.1" - web3-eth: "npm:1.10.1" - web3-eth-personal: "npm:1.10.1" - web3-net: "npm:1.10.1" - web3-shh: "npm:1.10.1" - web3-utils: "npm:1.10.1" - checksum: 10/33f63121a94b271fa56090763dab641bbc67677d81abc5fd013846b15a27e565a7cc0e8f4fcc424d05022785c8f54e1dba6ce6b79ad681a0cfabf8d380476628 - languageName: node - linkType: hard - "web3js-quorum@npm:22.4.0": version: 22.4.0 resolution: "web3js-quorum@npm:22.4.0" @@ -55972,13 +54085,6 @@ __metadata: languageName: node linkType: hard -"webworkify@npm:^1.2.1": - version: 1.5.0 - resolution: "webworkify@npm:1.5.0" - checksum: 10/2ee5b8e418da45657544bfb397599d60abc009c59d1b92f73c46a6beb9a1e08d6fabab36cd823bc4e8da0c2e498b4cf883aa5d3704d98cafe1b5faa23b92ffcc - languageName: node - linkType: hard - "wget-improved@npm:3.4.0": version: 3.4.0 resolution: "wget-improved@npm:3.4.0" @@ -56268,7 +54374,7 @@ __metadata: languageName: node linkType: hard -"winston@npm:3.10.0, winston@npm:^3.0.0": +"winston@npm:3.10.0": version: 3.10.0 resolution: "winston@npm:3.10.0" dependencies: @@ -56624,17 +54730,6 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^2.0.0": - version: 2.4.3 - resolution: "write-file-atomic@npm:2.4.3" - dependencies: - graceful-fs: "npm:^4.1.11" - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^3.0.2" - checksum: 10/15ce863dce07075d0decedd7c9094f4461e46139d28a758c53162f24c0791c16cd2e7a76baa5b47b1a851fbb51e16f2fab739afb156929b22628f3225437135c - languageName: node - linkType: hard - "write-file-atomic@npm:^3.0.0, write-file-atomic@npm:^3.0.3": version: 3.0.3 resolution: "write-file-atomic@npm:3.0.3" @@ -56888,7 +54983,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0": +"xtend@npm:^4.0.0, xtend@npm:^4.0.2, xtend@npm:~4.0.0": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: 10/ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -56905,7 +55000,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:~2.1.1, xtend@npm:~2.1.2": +"xtend@npm:~2.1.2": version: 2.1.2 resolution: "xtend@npm:2.1.2" dependencies: @@ -57191,13 +55286,6 @@ __metadata: languageName: node linkType: hard -"yn@npm:^2.0.0": - version: 2.0.0 - resolution: "yn@npm:2.0.0" - checksum: 10/9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 - languageName: node - linkType: hard - "yn@npm:^4.0.0": version: 4.0.0 resolution: "yn@npm:4.0.0" From 18af6e939d04385dab5826c7c212869a502716d6 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Tue, 23 Apr 2024 13:36:41 +0300 Subject: [PATCH 14/49] fixup!: rename new implementation, add new public api for plugin Signed-off-by: Rafael Belchior --- .../cactus-plugin-satp-hermes/package.json | 2 - .../main/json/openapi-gateway-bundled.json | 3259 ----------------- .../core/stage-handlers/stage1-handler.ts | 2 +- .../core/stage-handlers/stage2-handler.ts | 2 +- .../core/stage-handlers/stage3-handler.ts | 2 +- .../client/stage1-client-service.ts | 2 +- .../client/stage2-client-service.ts | 2 +- .../client/stage3-client-service.ts | 2 +- .../server/stage1-server-service.ts | 2 +- .../server/stage2-server-service.ts | 2 +- .../server/stage3-server-service.ts | 2 +- .../plugin-factory-gateway-orchestrator.ts | 2 +- .../src/main/typescript/gateway-utils.ts | 2 +- .../typescript-axios/.openapi-generator/FILES | 5 - .../.openapi-generator/VERSION | 1 - .../gol/protocol-manager/satp-manager.ts | 2 +- ...actor.ts => plugin-satp-hermes-gateway.ts} | 17 +- .../src/main/typescript/public-api.ts | 32 +- .../src/main/yml/openapi.yml | 1229 ------- ...test.ts => gateway-blo-get-status.test.ts} | 0 .../gateway-coordinator-init.test.ts | 157 - ...t.test.ts => gateway-init-startup.test.ts} | 109 +- 22 files changed, 162 insertions(+), 4673 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION rename packages/cactus-plugin-satp-hermes/src/main/typescript/{gateway-refactor.ts => plugin-satp-hermes-gateway.ts} (97%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml rename packages/cactus-plugin-satp-hermes/src/test/typescript/integration/{refactor-gateway-get-status.test.ts => gateway-blo-get-status.test.ts} (100%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts rename packages/cactus-plugin-satp-hermes/src/test/typescript/integration/{refactor-gateway-init.test.ts => gateway-init-startup.test.ts} (66%) diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index da09602ef2..6df1cfc6be 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -43,7 +43,6 @@ "build": "run-p tsc codegen", "build-proto": "buf build --path src/main/proto --verbose", "build:dev:backend:postbuild": "mkdir -p ./dist/lib/knex && cp -r ./src/knex/* ./dist/lib/knex", - "bundle-openapi-gateway-json": "swagger-cli bundle ./src/main/yml/openapi.yml -o ./src/main/json/openapi-gateway-bundled.json -r -t json", "bundle-openapi-json": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/json/openapi-blo-bundled.json -r -t json", "bundle-openapi-yaml": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/yml/bol/openapi-blo-bundled.yml -r -t yaml", "codegen": "run-p 'codegen:*'", @@ -53,7 +52,6 @@ "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/gateway-client/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", - "generate-sdk:typescript-axios-gateway": "yarn bundle-openapi-gateway-json && openapi-generator-cli generate -i ./src/main/json/openapi-gateway-bundled.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --ignore-file-override ../../openapi-generator-ignore", "lint": "run-p 'lint:*'", "lint:eslint": "eslint '*/*/src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json deleted file mode 100644 index a627a5dd37..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-gateway-bundled.json +++ /dev/null @@ -1,3259 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Hyperledger Cactus Plugin - Odap Hermes", - "description": "Implementation for Odap and Hermes", - "version": "v2.0.0-alpha.2", - "license": { - "name": "Apache-2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "components": { - "schemas": { - "CredentialProfile": { - "type": "string", - "enum": [ - "SAML", - "OAUTH", - "X509" - ] - }, - "PayloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "ApplicationProfile": { - "type": "object" - }, - "Payload": { - "type": "object" - }, - "AssetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "LoggingProfile": { - "type": "array", - "items": { - "type": "string" - } - }, - "AccessControlProfile": { - "type": "array", - "items": { - "type": "string" - } - }, - "Permissions": { - "type": "object" - }, - "Transaction": { - "type": "object" - }, - "ActionCategory": { - "type": "object" - }, - "History": { - "type": "object", - "properties": { - "Transactions": { - "type": "array", - "items": { - "type": "object" - } - }, - "Actions": { - "type": "array", - "items": { - "type": "object" - } - }, - "Origin": { - "type": "string" - }, - "Destination": { - "type": "string" - }, - "Balance": { - "type": "string" - }, - "CurrentStatus": { - "type": "object" - }, - "ApplicationSpecificParameters": { - "type": "object" - } - } - }, - "SenderDltSystem": { - "type": "object" - }, - "RecipientDltSystem": { - "type": "object" - }, - "LockEvidenceClaim": { - "type": "object" - }, - "LockClaimFormat": { - "type": "object" - }, - "CommitFinalClaim": { - "type": "object" - }, - "CommitFinalClaimFormat": { - "type": "object" - }, - "CommitAcknowledgementClaim": { - "type": "object" - }, - "CommitAcknowledgementClaimFormat": { - "type": "object" - }, - "SessionData": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "step": { - "type": "number" - }, - "version": { - "type": "string" - }, - "lastSequenceNumber": { - "type": "number" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "payloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "allowedSourceBackupGateways": { - "type": "array", - "items": { - "type": "string" - } - }, - "allowedRecipientBackupGateways": { - "type": "array", - "items": { - "type": "string" - } - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "initializationRequestMessageHash": { - "type": "string" - }, - "initializationResponseMessageHash": { - "type": "string" - }, - "initializationRequestMessageRcvTimeStamp": { - "type": "string" - }, - "initializationRequestMessageProcessedTimeStamp": { - "type": "string" - }, - "clientSignatureInitializationRequestMessage": { - "type": "string" - }, - "serverSignatureInitializationResponseMessage": { - "type": "string" - }, - "transferCommenceMessageRequestHash": { - "type": "string" - }, - "transferCommenceMessageResponseHash": { - "type": "string" - }, - "clientSignatureTransferCommenceRequestMessage": { - "type": "string" - }, - "serverSignatureTransferCommenceResponseMessage": { - "type": "string" - }, - "lockEvidenceRequestMessageHash": { - "type": "string" - }, - "lockEvidenceResponseMessageHash": { - "type": "string" - }, - "clientSignatureLockEvidenceRequestMessage": { - "type": "string" - }, - "serverSignatureLockEvidenceResponseMessage": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "commitPrepareRequestMessageHash": { - "type": "string" - }, - "commitPrepareResponseMessageHash": { - "type": "string" - }, - "clientSignatureCommitPreparationRequestMessage": { - "type": "string" - }, - "serverSignatureCommitPreparationResponseMessage": { - "type": "string" - }, - "commitFinalRequestMessageHash": { - "type": "string" - }, - "commitFinalResponseMessageHash": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "type": "string" - }, - "clientSignatureCommitFinalRequestMessage": { - "type": "string" - }, - "serverSignatureCommitFinalResponseMessage": { - "type": "string" - }, - "transferCompleteMessageHash": { - "type": "string" - }, - "clientSignatureTransferCompleteMessage": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "maxTimeout": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "unlockAssetClaim": { - "type": "string" - }, - "recreateAssetClaim": { - "type": "string" - }, - "deleteAssetClaim": { - "type": "string" - }, - "lastMessageReceivedTimestamp": { - "type": "string" - }, - "rollback": { - "type": "boolean" - }, - "rollbackMessageHash": { - "type": "string" - }, - "rollbackProofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "rollbackActionsPerformed": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "CREATE", - "DELETE", - "LOCK", - "UNLOCK" - ] - } - } - } - }, - "TransferInitializationV1Request": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "version": { - "type": "string" - }, - "developerURN": { - "type": "string" - }, - "credentialProfile": { - "type": "string", - "enum": [ - "SAML", - "OAUTH", - "X509" - ] - }, - "payloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "applicationProfile": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "escrowType": { - "type": "string", - "enum": [ - "FAUCET", - "TIMELOCK", - "HASHLOCK", - "HASHTIMELOCK", - "MULTICLAIMPC", - "DESTROY", - "BURN" - ] - }, - "expiryTime": { - "type": "string" - }, - "multipleClaimsAllowed": { - "type": "boolean" - }, - "multipleCancelsAllowed": { - "type": "boolean" - }, - "permissions": { - "type": "object" - }, - "origin": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "subsequentCalls": { - "type": "object" - }, - "histories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "Transactions": { - "type": "array", - "items": { - "type": "object" - } - }, - "Actions": { - "type": "array", - "items": { - "type": "object" - } - }, - "Origin": { - "type": "string" - }, - "Destination": { - "type": "string" - }, - "Balance": { - "type": "string" - }, - "CurrentStatus": { - "type": "object" - }, - "ApplicationSpecificParameters": { - "type": "object" - } - } - } - }, - "sequenceNumber": { - "type": "integer" - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "messageType", - "sessionID", - "loggingProfile", - "accessControlProfile", - "payloadProfile", - "applicationProfile", - "signature", - "sourceGatewayPubkey", - "sourceGatewayDltSystem", - "recipientGatewayPubkey", - "recipientGatewayDltSystem", - "sequenceNumber", - "sourceBasePath", - "recipientBasePath", - "maxRetries", - "maxTimeout", - "backupGatewaysAllowed", - "recipientLedgerAssetID", - "sourceLedgerAssetID" - ] - }, - "TransferInitializationV1Response": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "odapPhase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "initialRequestMessageHash": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "timeStamp": { - "type": "string" - }, - "processedTimeStamp": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "messageType", - "initialRequestMessageHash", - "timeStamp", - "processedTimeStamp", - "sessionID", - "serverIdentityPubkey", - "sequenceNumber", - "signature", - "backupGatewaysAllowed" - ] - }, - "TransferCommenceV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "senderDltSystem": { - "type": "string" - }, - "recipientDltSystem": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashAssetProfile": { - "type": "string" - }, - "assetUnit": { - "type": "integer" - }, - "hashPrevMessage": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "integer" - } - }, - "required": [ - "sessionID", - "messageType", - "originatorPubkey", - "beneficiaryPubkey", - "senderDltSystem", - "recipientDltSystem", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashAssetProfile", - "hashPrevMessage", - "signature", - "sequenceNumber" - ] - }, - "TransferCommenceV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "serverIdentityPubkey", - "clientIdentityPubkey", - "hashCommenceRequest", - "signature", - "sequenceNumber" - ] - }, - "LockEvidenceV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "lockEvidenceFormat": { - "nullable": true, - "type": "object" - }, - "lockEvidenceExpiration": { - "type": "string" - }, - "hashCommenceAckRequest": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "lockEvidenceClaim", - "lockEvidenceExpiration", - "hashCommenceAckRequest", - "signature", - "sequenceNumber" - ] - }, - "LockEvidenceV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceRequest", - "signature", - "sequenceNumber" - ] - }, - "CommitPreparationV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceAck", - "signature", - "sequenceNumber" - ] - }, - "CommitPreparationV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitPrep": { - "type": "string" - }, - "serverTransferNumber": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitPrep", - "signature", - "sequenceNumber" - ] - }, - "CommitFinalV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "type": "object" - }, - "hashCommitPrepareAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitFinalClaim", - "hashCommitPrepareAck", - "signature", - "sequenceNumber" - ] - }, - "CommitFinalV1Response": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "type": "object" - }, - "hashCommitFinal": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitAcknowledgementClaim", - "hashCommitFinal", - "signature", - "sequenceNumber" - ] - }, - "TransferCompleteV1Request": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitFinalAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "hashTransferCommence": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitFinalAck", - "signature", - "hashTransferCommence", - "sequenceNumber" - ] - }, - "ClientV1Request": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "assetControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "payloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "clientDltSystem": { - "type": "string" - }, - "serverDltSystem": { - "type": "string" - }, - "clientGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": [ - "apiHost" - ] - }, - "serverGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": [ - "apiHost" - ] - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "recipientLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "version", - "loggingProfile", - "accessControlProfile", - "assetControlProfile", - "applicationProfile", - "assetProfile", - "payloadProfile", - "sourceGatewayDltSystem", - "recipientGatewayDltSystem", - "recipientGatewayPubkey", - "originatorPubkey", - "beneficiaryPubkey", - "clientIdentityPubkey", - "serverIdentityPubkey", - "clientDltSystem", - "serverDltSystem", - "clientGatewayConfiguration", - "serverGatewayConfiguration", - "maxRetries", - "maxTimeout", - "sourceLedgerAssetID", - "recipientLedgerAssetID" - ] - }, - "RecoverV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "odapPhase": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "isBackup": { - "type": "boolean" - }, - "newBasePath": { - "type": "string" - }, - "newGatewayPubKey": { - "type": "string" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "odapPhase", - "sequenceNumber", - "lastLogEntryTimestamp", - "isBackup", - "newBasePath", - "signature" - ] - }, - "RecoverUpdateV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "recoveredLogs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "data": { - "type": "string" - }, - "type": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - }, - "required": [ - "sessionID", - "type", - "operation" - ] - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "recoveredLogs", - "signature" - ] - }, - "RecoverUpdateAckV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "changedEntriesHash": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "changedEntriesHash", - "signature" - ] - }, - "RecoverSuccessV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "signature" - ] - }, - "RollbackV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "actionPerformed": { - "type": "array", - "items": { - "type": "string" - } - }, - "proofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "actionPerformed", - "proofs", - "signature" - ] - }, - "RollbackAckV1Message": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "signature" - ] - }, - "LocalLog": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "data": { - "type": "string" - }, - "type": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - }, - "required": [ - "sessionID", - "type", - "operation" - ] - }, - "SatpMessage": { - "type": "object", - "properties": { - "SequenceNumber": { - "type": "number" - }, - "Phase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "ResourceURL": { - "type": "string" - }, - "DeveloperURN": { - "type": "string" - }, - "ActionResponse": { - "type": "object", - "properties": { - "ResponseCode": { - "type": "string", - "enum": [ - "200", - "404" - ], - "x-enum-varnames": [ - "OK", - "RESOURCE_NOT_FOUND" - ] - }, - "Arguments": { - "type": "array", - "items": {} - } - } - }, - "CredentialProfile": { - "type": "string", - "enum": [ - "SAML", - "OAuth", - "X509" - ] - }, - "CredentialBlock": { - "type": "array", - "items": {} - }, - "CredentialsProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "ApplicationProfile": { - "type": "object" - }, - "Payload": { - "type": "object" - }, - "PayloadHash": { - "type": "string" - }, - "MessageSignature": { - "type": "string" - } - } - } - } - }, - "paths": { - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" - } - }, - "operationId": "phase1TransferInitiationRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "version": { - "type": "string" - }, - "developerURN": { - "type": "string" - }, - "credentialProfile": { - "type": "string", - "enum": [ - "SAML", - "OAUTH", - "X509" - ] - }, - "payloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "applicationProfile": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sourceGatewayPubkey": { - "type": "string" - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "escrowType": { - "type": "string", - "enum": [ - "FAUCET", - "TIMELOCK", - "HASHLOCK", - "HASHTIMELOCK", - "MULTICLAIMPC", - "DESTROY", - "BURN" - ] - }, - "expiryTime": { - "type": "string" - }, - "multipleClaimsAllowed": { - "type": "boolean" - }, - "multipleCancelsAllowed": { - "type": "boolean" - }, - "permissions": { - "type": "object" - }, - "origin": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "subsequentCalls": { - "type": "object" - }, - "histories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "Transactions": { - "type": "array", - "items": { - "type": "object" - } - }, - "Actions": { - "type": "array", - "items": { - "type": "object" - } - }, - "Origin": { - "type": "string" - }, - "Destination": { - "type": "string" - }, - "Balance": { - "type": "string" - }, - "CurrentStatus": { - "type": "object" - }, - "ApplicationSpecificParameters": { - "type": "object" - } - } - } - }, - "sequenceNumber": { - "type": "integer" - }, - "sourceBasePath": { - "type": "string" - }, - "recipientBasePath": { - "type": "string" - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - }, - "recipientLedgerAssetID": { - "type": "string" - }, - "sourceLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "messageType", - "sessionID", - "loggingProfile", - "accessControlProfile", - "payloadProfile", - "applicationProfile", - "signature", - "sourceGatewayPubkey", - "sourceGatewayDltSystem", - "recipientGatewayPubkey", - "recipientGatewayDltSystem", - "sequenceNumber", - "sourceBasePath", - "recipientBasePath", - "maxRetries", - "maxTimeout", - "backupGatewaysAllowed", - "recipientLedgerAssetID", - "sourceLedgerAssetID" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" - } - }, - "operationId": "phase2TransferCommenceRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "senderDltSystem": { - "type": "string" - }, - "recipientDltSystem": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashAssetProfile": { - "type": "string" - }, - "assetUnit": { - "type": "integer" - }, - "hashPrevMessage": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "integer" - } - }, - "required": [ - "sessionID", - "messageType", - "originatorPubkey", - "beneficiaryPubkey", - "senderDltSystem", - "recipientDltSystem", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashAssetProfile", - "hashPrevMessage", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" - } - }, - "operationId": "phase2LockEvidenceRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "lockEvidenceClaim": { - "type": "string" - }, - "lockEvidenceFormat": { - "nullable": true, - "type": "object" - }, - "lockEvidenceExpiration": { - "type": "string" - }, - "hashCommenceAckRequest": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "lockEvidenceClaim", - "lockEvidenceExpiration", - "hashCommenceAckRequest", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" - } - }, - "operationId": "phase3CommitPreparationRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceAck", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" - } - }, - "operationId": "phase3CommitFinalRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitFinalClaim": { - "type": "string" - }, - "commitFinalClaimFormat": { - "type": "object" - }, - "hashCommitPrepareAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitFinalClaim", - "hashCommitPrepareAck", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest": { - "get": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "get", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" - } - }, - "operationId": "phase3TransferCompleteRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitFinalAck": { - "type": "string" - }, - "clientTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "hashTransferCommence": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitFinalAck", - "signature", - "hashTransferCommence", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" - } - }, - "operationId": "clientRequestV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "loggingProfile": { - "type": "string" - }, - "accessControlProfile": { - "type": "string" - }, - "assetControlProfile": { - "type": "string" - }, - "applicationProfile": { - "type": "string" - }, - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "payloadProfile": { - "type": "object", - "properties": { - "assetProfile": { - "type": "object", - "properties": { - "issuer": { - "type": "string" - }, - "assetCode": { - "type": "string" - }, - "assetCodeType": { - "type": "string" - }, - "issuanceDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "verificationEndPoint": { - "type": "string" - }, - "digitalSignature": { - "type": "string" - }, - "prospectusLink": { - "type": "string" - }, - "keyInformationLink": { - "type": "array", - "items": {} - }, - "keyWord": { - "type": "array", - "items": {} - }, - "transferRestriction": { - "type": "array", - "items": {} - }, - "ledgerRequirements": { - "type": "array", - "items": {} - } - }, - "required": [ - "expirationDate" - ] - }, - "capabilities": { - "type": "string" - } - }, - "required": [ - "assetProfile" - ] - }, - "sourceGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayDltSystem": { - "type": "string" - }, - "recipientGatewayPubkey": { - "type": "string" - }, - "originatorPubkey": { - "type": "string" - }, - "beneficiaryPubkey": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "clientDltSystem": { - "type": "string" - }, - "serverDltSystem": { - "type": "string" - }, - "clientGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": [ - "apiHost" - ] - }, - "serverGatewayConfiguration": { - "type": "object", - "properties": { - "apiHost": { - "type": "string" - } - }, - "required": [ - "apiHost" - ] - }, - "maxRetries": { - "type": "number" - }, - "maxTimeout": { - "type": "number" - }, - "sourceLedgerAssetID": { - "type": "string" - }, - "recipientLedgerAssetID": { - "type": "string" - } - }, - "required": [ - "version", - "loggingProfile", - "accessControlProfile", - "assetControlProfile", - "applicationProfile", - "assetProfile", - "payloadProfile", - "sourceGatewayDltSystem", - "recipientGatewayDltSystem", - "recipientGatewayPubkey", - "originatorPubkey", - "beneficiaryPubkey", - "clientIdentityPubkey", - "serverIdentityPubkey", - "clientDltSystem", - "serverDltSystem", - "clientGatewayConfiguration", - "serverGatewayConfiguration", - "maxRetries", - "maxTimeout", - "sourceLedgerAssetID", - "recipientLedgerAssetID" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" - } - }, - "operationId": "phase1TransferInitiationResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "messageType": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "odapPhase": { - "type": "string", - "enum": [ - "TransferInitialization", - "LockEvidenceVerification", - "CommitmentEstablishment" - ] - }, - "initialRequestMessageHash": { - "type": "string" - }, - "destination": { - "type": "string" - }, - "timeStamp": { - "type": "string" - }, - "processedTimeStamp": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "backupGatewaysAllowed": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "messageType", - "initialRequestMessageHash", - "timeStamp", - "processedTimeStamp", - "sessionID", - "serverIdentityPubkey", - "sequenceNumber", - "signature", - "backupGatewaysAllowed" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" - } - }, - "operationId": "phase2TransferCommenceResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "messageHash": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "serverIdentityPubkey", - "clientIdentityPubkey", - "hashCommenceRequest", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" - } - }, - "operationId": "phase2LockEvidenceResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashLockEvidenceRequest": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer", - "nullable": true - }, - "signature": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashLockEvidenceRequest", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" - } - }, - "operationId": "phase3CommitPreparationResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "hashCommitPrep": { - "type": "string" - }, - "serverTransferNumber": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "hashCommitPrep", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" - } - }, - "operationId": "phase3CommitFinalResponseV1", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "messageType": { - "type": "string" - }, - "clientIdentityPubkey": { - "type": "string" - }, - "serverIdentityPubkey": { - "type": "string" - }, - "commitAcknowledgementClaim": { - "type": "string" - }, - "commitAcknowledgementClaimFormat": { - "type": "object" - }, - "hashCommitFinal": { - "type": "string" - }, - "serverTransferNumber": { - "type": "integer" - }, - "signature": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - } - }, - "required": [ - "sessionID", - "messageType", - "clientIdentityPubkey", - "serverIdentityPubkey", - "commitAcknowledgementClaim", - "hashCommitFinal", - "signature", - "sequenceNumber" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" - } - }, - "operationId": "RecoverV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "odapPhase": { - "type": "string" - }, - "sequenceNumber": { - "type": "number" - }, - "lastLogEntryTimestamp": { - "type": "string" - }, - "isBackup": { - "type": "boolean" - }, - "newBasePath": { - "type": "string" - }, - "newGatewayPubKey": { - "type": "string" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "odapPhase", - "sequenceNumber", - "lastLogEntryTimestamp", - "isBackup", - "newBasePath", - "signature" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" - } - }, - "operationId": "RecoverUpdateV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "recoveredLogs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "sessionID": { - "type": "string" - }, - "data": { - "type": "string" - }, - "type": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "timestamp": { - "type": "string" - } - }, - "required": [ - "sessionID", - "type", - "operation" - ] - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "recoveredLogs", - "signature" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" - } - }, - "operationId": "RecoverUpdateAckV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "changedEntriesHash": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "changedEntriesHash", - "signature" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" - } - }, - "operationId": "RecoverV1Success", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "signature" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" - } - }, - "operationId": "RollbackV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "actionPerformed": { - "type": "array", - "items": { - "type": "string" - } - }, - "proofs": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "actionPerformed", - "proofs", - "signature" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage": { - "post": { - "x-hyperledger-cacti": { - "http": { - "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" - } - }, - "operationId": "RollbackAckV1Message", - "description": "", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sessionID": { - "type": "string" - }, - "success": { - "type": "boolean" - }, - "signature": { - "type": "string" - } - }, - "required": [ - "sessionID", - "success", - "signature" - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - } - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index e1e8770d05..41b67a5361 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -5,7 +5,7 @@ import { TransferCommenceRequestMessage, TransferProposalRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; -import { SATPGateway } from "../../gateway-refactor"; +import { SATPGateway } from "../../plugin-satp-hermes-gateway"; import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index 4fefbb1367..e421fee9a6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -1,7 +1,7 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; import { LockAssertionRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; -import { SATPGateway } from "../../gateway-refactor"; +import { SATPGateway } from "../../plugin-satp-hermes-gateway"; import { Stage2ServerService } from "../stage-services/server/stage2-server-service"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index 12904ca502..b5c91b4db0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -7,7 +7,7 @@ import { } from "../../generated/proto/cacti/satp/v02/stage_3_pb"; import { Empty, ServiceType } from "@bufbuild/protobuf"; import { Stage3ServerService } from "../stage-services/server/stage3-server-service"; -import { SATPGateway } from "../../gateway-refactor"; +import { SATPGateway } from "../../plugin-satp-hermes-gateway"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; import { SATPSession } from "../satp-session"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index f3c90176d1..2e654f6893 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -1,5 +1,5 @@ import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../gateway-refactor"; +import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { TransferCommenceRequestMessage, TransferProposalRequestMessage, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 6bde217a6b..ceaa6dbff3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -1,6 +1,6 @@ import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; -import { SATPGateway } from "../../../gateway-refactor"; +import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { SATP_VERSION } from "../../constants"; import { CommonSatp, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 5e67ff995f..c79291d52b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -1,5 +1,5 @@ import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../gateway-refactor"; +import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { CommonSatp, MessageType, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index 49e57f10f8..efd8406332 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -1,6 +1,6 @@ import { IJsObjectSignerOptions, JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../gateway-refactor"; +import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { TransferCommenceResponseMessage, TransferCommenceRequestMessage, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index c0968b1be1..29f679078d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -3,7 +3,7 @@ import { LockAssertionReceiptMessage, LockAssertionRequestMessage, } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -import { SATPGateway } from "../../../gateway-refactor"; +import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { SATP_VERSION } from "../../constants"; import { CommonSatp, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 95cde2fe84..4568a9dad9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -1,5 +1,5 @@ import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../gateway-refactor"; +import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { CommitFinalAcknowledgementReceiptResponseMessage, CommitFinalAssertionRequestMessage, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts index cfbc9c20c5..1d4167d2ab 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-gateway-orchestrator.ts @@ -2,7 +2,7 @@ import { IPluginFactoryOptions, PluginFactory, } from "@hyperledger/cactus-core-api"; -import { SATPGateway, SATPGatewayConfig } from "../gateway-refactor"; +import { SATPGateway, SATPGatewayConfig } from "../plugin-satp-hermes-gateway"; import { validateOrReject } from "class-validator"; export class PluginFactorySATPGateway extends PluginFactory< diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index dfa163b349..8b6bd2c6da 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -1,6 +1,6 @@ import { JsObjectSigner } from "@hyperledger/cactus-common"; import { LocalLog, RemoteLog } from "./core/types"; -import { SATPGateway } from "./gateway-refactor"; +import { SATPGateway } from "./plugin-satp-hermes-gateway"; import { SHA256 } from "crypto-js"; export function bufArray2HexStr(array: Uint8Array): string { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES deleted file mode 100644 index 53250c0269..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES +++ /dev/null @@ -1,5 +0,0 @@ -api.ts -base.ts -common.ts -configuration.ts -index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts index 5e2ce67db1..b21f7bd121 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts @@ -10,7 +10,7 @@ import { Stage1Handler } from "../../core/stage-handlers/stage1-handler"; import { Stage2Handler } from "../../core/stage-handlers/stage2-handler"; import { Stage3Handler } from "../../core/stage-handlers/stage3-handler"; import { Stage1ServerService } from "../../core/stage-services/server/stage1-server-service"; -import { SATPGateway } from "../../gateway-refactor"; +import { SATPGateway } from "../../plugin-satp-hermes-gateway"; import { Stage2ServerService } from "../../core/stage-services/server/stage2-server-service"; import { Stage3ServerService } from "../../core/stage-services/server/stage3-server-service"; import { ISATPSessionOptions, SATPSession } from "../../core/satp-session"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts similarity index 97% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index aa7ccdbece..bd8e872919 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-refactor.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -73,7 +73,7 @@ export class SATPGateway { private BLOApplication?: Express; private BLOServer?: http.Server; private BLODispatcher?: BLODispatcher; - + public OAPIServerEnabled: boolean = false; private objectSigner: JsObjectSigner; @@ -143,9 +143,7 @@ export class SATPGateway { } this.BLODispatcher = new BLODispatcher(dispatcherOps); - if (options.enableOpenAPI) { - this.setupOpenAPI(); - } + this.OAPIServerEnabled = this.config.enableOpenAPI ?? true; } public get Signer(): JsObjectSigner { @@ -168,10 +166,16 @@ export class SATPGateway { // todo load docs for gateway coordinator and expose them in a http gatewayApplication setupOpenAPI(): void { - if (!this.BLOApplication) { - throw new Error("BLOApplication is not defined"); + if (!this.OAPIServerEnabled) { + this.logger.debug("OpenAPI server is disabled"); + return; } + if (!this.BLOApplication) { + this.logger.debug("BLOApplication is not defined. Not initializing OpenAPI server"); + return; + } + const specPath = path.join(__dirname, "../json/openapi-blo-bundled.json"); const OpenAPISpec = JSON.parse(fs.readFileSync(specPath, 'utf8')); @@ -281,6 +285,7 @@ export class SATPGateway { await Promise.all([ this.startupGatewayServer(), + this.setupOpenAPI(), ]); this.logger.info("Both GatewayServer and BLOServer have started"); 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 index 61baa1ec83..e491e34574 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts @@ -1 +1,31 @@ -// TODO! export new gateway +// Gateway Client API +export * from "./generated/gateway-client/typescript-axios"; + +// Gateway Backend, not exported for now +/* +// Exporting from the common directory +export * from './generated/proto/cacti/satp/v02/common/health_connect'; +export * from './generated/proto/cacti/satp/v02/common/health_pb'; + +// Re-export everything except CredentialProfile to avoid conflicts +export { STATUS, MessageType, SignatureAlgorithm, LockType, Error } from './generated/proto/cacti/satp/v02/common/message_pb'; +export * from './generated/proto/cacti/satp/v02/common/session_connect'; +export * from './generated/proto/cacti/satp/v02/common/session_pb'; + +// Exporting files in the v02 directory +export * from './generated/proto/cacti/satp/v02/crash_recovery_connect'; +export * from './generated/proto/cacti/satp/v02/stage_0_connect'; +export * from './generated/proto/cacti/satp/v02/stage_0_pb'; +export * from './generated/proto/cacti/satp/v02/stage_1_connect'; +export * from './generated/proto/cacti/satp/v02/stage_1_pb'; +export * from './generated/proto/cacti/satp/v02/stage_2_connect'; +export * from './generated/proto/cacti/satp/v02/stage_2_pb'; +export * from './generated/proto/cacti/satp/v02/stage_3_connect'; +export * from './generated/proto/cacti/satp/v02/stage_3_pb'; + +// Exporting from the view directory +export * from './generated/proto/cacti/satp/v02/view/bungee_pb'; +*/ + +export { SATPGateway, SATPGatewayConfig } from "./plugin-satp-hermes-gateway"; +export { PluginFactorySATPGateway } from "./factory/plugin-factory-gateway-orchestrator"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml deleted file mode 100644 index 5027174a8d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/openapi.yml +++ /dev/null @@ -1,1229 +0,0 @@ -openapi: 3.0.3 -info: - title: Hyperledger Cactus Plugin - Odap Hermes - description: Implementation for Odap and Hermes - version: v2.0.0-alpha.2 - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html -components: - schemas: - CredentialProfile: - type: string - enum: - - SAML - - OAUTH - - X509 - PayloadProfile: - type: object - properties: - assetProfile: - $ref: '#/components/schemas/AssetProfile' - capabilities: - type: string - required: - - assetProfile - ApplicationProfile: - type: object - Payload: - type: object - AssetProfile: - type: object - properties: - issuer: - type: string - assetCode: - type: string - assetCodeType: - type: string - issuanceDate: - type: string - expirationDate: - type: string - verificationEndPoint: - type: string - digitalSignature: - type: string - prospectusLink: - type: string - keyInformationLink: - type: array - items: {} - keyWord: - type: array - items: {} - transferRestriction: - type: array - items: {} - ledgerRequirements: - type: array - items: {} - required: - - expirationDate - LoggingProfile: - type: array - items: - type: string - AccessControlProfile: - type: array - items: - type: string - Permissions: - type: object - Transaction: - type: object - ActionCategory: - type: object - History: - type: object - properties: - Transactions: - type: array - items: - $ref: '#/components/schemas/Transaction' - Actions: - type: array - items: - $ref: '#/components/schemas/ActionCategory' - Origin: - type: string - Destination: - type: string - Balance: - type: string - CurrentStatus: - type: object - ApplicationSpecificParameters: - type: object - SenderDltSystem: - type: object - RecipientDltSystem: - type: object - LockEvidenceClaim: - type: object - LockClaimFormat: - type: object - CommitFinalClaim: - type: object - CommitFinalClaimFormat: - type: object - CommitAcknowledgementClaim: - type: object - CommitAcknowledgementClaimFormat: - type: object - SessionData: - type: object - properties: - id: - type: string - step: - type: number - version: - type: string - lastSequenceNumber: - type: number - loggingProfile: - type: string - accessControlProfile: - type: string - applicationProfile: - type: string - payloadProfile: - $ref: '#/components/schemas/PayloadProfile' - assetProfile: - $ref: '#/components/schemas/AssetProfile' - allowedSourceBackupGateways: - type: array - items: - type: string - allowedRecipientBackupGateways: - type: array - items: - type: string - sourceBasePath: - type: string - recipientBasePath: - type: string - originatorPubkey: - type: string - beneficiaryPubkey: - type: string - sourceGatewayPubkey: - type: string - sourceGatewayDltSystem: - type: string - recipientGatewayPubkey: - type: string - recipientGatewayDltSystem: - type: string - initializationRequestMessageHash: - type: string - initializationResponseMessageHash: - type: string - initializationRequestMessageRcvTimeStamp: - type: string - initializationRequestMessageProcessedTimeStamp: - type: string - clientSignatureInitializationRequestMessage: - type: string - serverSignatureInitializationResponseMessage: - type: string - transferCommenceMessageRequestHash: - type: string - transferCommenceMessageResponseHash: - type: string - clientSignatureTransferCommenceRequestMessage: - type: string - serverSignatureTransferCommenceResponseMessage: - type: string - lockEvidenceRequestMessageHash: - type: string - lockEvidenceResponseMessageHash: - type: string - clientSignatureLockEvidenceRequestMessage: - type: string - serverSignatureLockEvidenceResponseMessage: - type: string - lockEvidenceClaim: - type: string - commitPrepareRequestMessageHash: - type: string - commitPrepareResponseMessageHash: - type: string - clientSignatureCommitPreparationRequestMessage: - type: string - serverSignatureCommitPreparationResponseMessage: - type: string - commitFinalRequestMessageHash: - type: string - commitFinalResponseMessageHash: - type: string - commitFinalClaim: - type: string - commitFinalClaimFormat: - type: string - commitAcknowledgementClaim: - type: string - commitAcknowledgementClaimFormat: - type: string - clientSignatureCommitFinalRequestMessage: - type: string - serverSignatureCommitFinalResponseMessage: - type: string - transferCompleteMessageHash: - type: string - clientSignatureTransferCompleteMessage: - type: string - maxRetries: - type: number - recipientLedgerAssetID: - type: string - sourceLedgerAssetID: - type: string - maxTimeout: - type: number - lastLogEntryTimestamp: - type: string - unlockAssetClaim: - type: string - recreateAssetClaim: - type: string - deleteAssetClaim: - type: string - lastMessageReceivedTimestamp: - type: string - rollback: - type: boolean - rollbackMessageHash: - type: string - rollbackProofs: - type: array - items: - type: string - rollbackActionsPerformed: - type: array - items: - type: string - enum: - - CREATE - - DELETE - - LOCK - - UNLOCK - TransferInitializationV1Request: - type: object - properties: - messageType: - type: string - sessionID: - type: string - version: - type: string - developerURN: - type: string - credentialProfile: - $ref: '#/components/schemas/CredentialProfile' - payloadProfile: - $ref: '#/components/schemas/PayloadProfile' - applicationProfile: - type: string - loggingProfile: - type: string - accessControlProfile: - type: string - signature: - type: string - sourceGatewayPubkey: - type: string - sourceGatewayDltSystem: - type: string - recipientGatewayPubkey: - type: string - recipientGatewayDltSystem: - type: string - escrowType: - type: string - enum: - - FAUCET - - TIMELOCK - - HASHLOCK - - HASHTIMELOCK - - MULTICLAIMPC - - DESTROY - - BURN - expiryTime: - type: string - multipleClaimsAllowed: - type: boolean - multipleCancelsAllowed: - type: boolean - permissions: - $ref: '#/components/schemas/Permissions' - origin: - type: string - destination: - type: string - subsequentCalls: - type: object - histories: - type: array - items: - $ref: '#/components/schemas/History' - sequenceNumber: - type: integer - sourceBasePath: - type: string - recipientBasePath: - type: string - maxRetries: - type: number - maxTimeout: - type: number - backupGatewaysAllowed: - type: array - items: - type: string - recipientLedgerAssetID: - type: string - sourceLedgerAssetID: - type: string - required: - - messageType - - sessionID - - loggingProfile - - accessControlProfile - - payloadProfile - - applicationProfile - - signature - - sourceGatewayPubkey - - sourceGatewayDltSystem - - recipientGatewayPubkey - - recipientGatewayDltSystem - - sequenceNumber - - sourceBasePath - - recipientBasePath - - maxRetries - - maxTimeout - - backupGatewaysAllowed - - recipientLedgerAssetID - - sourceLedgerAssetID - TransferInitializationV1Response: - type: object - properties: - messageType: - type: string - sessionID: - type: string - sequenceNumber: - type: number - odapPhase: - type: string - enum: - - TransferInitialization - - LockEvidenceVerification - - CommitmentEstablishment - initialRequestMessageHash: - type: string - destination: - type: string - timeStamp: - type: string - processedTimeStamp: - type: string - serverIdentityPubkey: - type: string - signature: - type: string - backupGatewaysAllowed: - type: array - items: - type: string - required: - - messageType - - initialRequestMessageHash - - timeStamp - - processedTimeStamp - - sessionID - - serverIdentityPubkey - - sequenceNumber - - signature - - backupGatewaysAllowed - TransferCommenceV1Request: - type: object - properties: - sessionID: - type: string - messageType: - type: string - originatorPubkey: - type: string - beneficiaryPubkey: - type: string - senderDltSystem: - type: string - recipientDltSystem: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashAssetProfile: - type: string - assetUnit: - type: integer - hashPrevMessage: - type: string - clientTransferNumber: - type: integer - nullable: true - signature: - type: string - sequenceNumber: - type: integer - required: - - sessionID - - messageType - - originatorPubkey - - beneficiaryPubkey - - senderDltSystem - - recipientDltSystem - - clientIdentityPubkey - - serverIdentityPubkey - - hashAssetProfile - - hashPrevMessage - - signature - - sequenceNumber - TransferCommenceV1Response: - type: object - properties: - sessionID: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashCommenceRequest: - type: string - serverTransferNumber: - type: integer - nullable: true - signature: - type: string - messageType: - type: string - messageHash: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - serverIdentityPubkey - - clientIdentityPubkey - - hashCommenceRequest - - signature - - sequenceNumber - LockEvidenceV1Request: - type: object - properties: - sessionID: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - lockEvidenceClaim: - type: string - lockEvidenceFormat: - $ref: '#/components/schemas/LockClaimFormat' - nullable: true - lockEvidenceExpiration: - type: string - hashCommenceAckRequest: - type: string - clientTransferNumber: - type: integer - nullable: true - signature: - type: string - messageType: - type: string - messageHash: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - lockEvidenceClaim - - lockEvidenceExpiration - - hashCommenceAckRequest - - signature - - sequenceNumber - LockEvidenceV1Response: - type: object - properties: - sessionID: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashLockEvidenceRequest: - type: string - serverTransferNumber: - type: integer - nullable: true - signature: - type: string - messageType: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - hashLockEvidenceRequest - - signature - - sequenceNumber - CommitPreparationV1Request: - type: object - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashLockEvidenceAck: - type: string - clientTransferNumber: - type: integer - signature: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - hashLockEvidenceAck - - signature - - sequenceNumber - CommitPreparationV1Response: - type: object - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashCommitPrep: - type: string - serverTransferNumber: - type: string - signature: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - hashCommitPrep - - signature - - sequenceNumber - CommitFinalV1Request: - type: object - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - commitFinalClaim: - type: string - commitFinalClaimFormat: - $ref: '#/components/schemas/CommitFinalClaimFormat' - hashCommitPrepareAck: - type: string - clientTransferNumber: - type: integer - nullable: true - signature: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - commitFinalClaim - - hashCommitPrepareAck - - signature - - sequenceNumber - CommitFinalV1Response: - type: object - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - commitAcknowledgementClaim: - type: string - commitAcknowledgementClaimFormat: - $ref: '#/components/schemas/CommitAcknowledgementClaimFormat' - hashCommitFinal: - type: string - serverTransferNumber: - type: integer - signature: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - commitAcknowledgementClaim - - hashCommitFinal - - signature - - sequenceNumber - TransferCompleteV1Request: - type: object - properties: - sessionID: - type: string - messageType: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - hashCommitFinalAck: - type: string - clientTransferNumber: - type: integer - nullable: true - signature: - type: string - hashTransferCommence: - type: string - sequenceNumber: - type: number - required: - - sessionID - - messageType - - clientIdentityPubkey - - serverIdentityPubkey - - hashCommitFinalAck - - signature - - hashTransferCommence - - sequenceNumber - ClientV1Request: - type: object - properties: - version: - type: string - loggingProfile: - type: string - accessControlProfile: - type: string - assetControlProfile: - type: string - applicationProfile: - type: string - assetProfile: - $ref: '#/components/schemas/AssetProfile' - payloadProfile: - $ref: '#/components/schemas/PayloadProfile' - sourceGatewayDltSystem: - type: string - recipientGatewayDltSystem: - type: string - recipientGatewayPubkey: - type: string - originatorPubkey: - type: string - beneficiaryPubkey: - type: string - clientIdentityPubkey: - type: string - serverIdentityPubkey: - type: string - clientDltSystem: - type: string - serverDltSystem: - type: string - clientGatewayConfiguration: - type: object - properties: - apiHost: - type: string - required: - - apiHost - serverGatewayConfiguration: - type: object - properties: - apiHost: - type: string - required: - - apiHost - maxRetries: - type: number - maxTimeout: - type: number - sourceLedgerAssetID: - type: string - recipientLedgerAssetID: - type: string - required: - - version - - loggingProfile - - accessControlProfile - - assetControlProfile - - applicationProfile - - assetProfile - - payloadProfile - - sourceGatewayDltSystem - - recipientGatewayDltSystem - - recipientGatewayPubkey - - originatorPubkey - - beneficiaryPubkey - - clientIdentityPubkey - - serverIdentityPubkey - - clientDltSystem - - serverDltSystem - - clientGatewayConfiguration - - serverGatewayConfiguration - - maxRetries - - maxTimeout - - sourceLedgerAssetID - - recipientLedgerAssetID - RecoverV1Message: - type: object - properties: - sessionID: - type: string - odapPhase: - type: string - sequenceNumber: - type: number - lastLogEntryTimestamp: - type: string - isBackup: - type: boolean - newBasePath: - type: string - newGatewayPubKey: - type: string - signature: - type: string - required: - - sessionID - - odapPhase - - sequenceNumber - - lastLogEntryTimestamp - - isBackup - - newBasePath - - signature - RecoverUpdateV1Message: - type: object - properties: - sessionID: - type: string - recoveredLogs: - type: array - items: - $ref: '#/components/schemas/LocalLog' - signature: - type: string - required: - - sessionID - - recoveredLogs - - signature - RecoverUpdateAckV1Message: - type: object - properties: - sessionID: - type: string - success: - type: boolean - changedEntriesHash: - type: array - items: - type: string - signature: - type: string - required: - - sessionID - - success - - changedEntriesHash - - signature - RecoverSuccessV1Message: - type: object - properties: - sessionID: - type: string - success: - type: boolean - signature: - type: string - required: - - sessionID - - success - - signature - RollbackV1Message: - type: object - properties: - sessionID: - type: string - success: - type: boolean - actionPerformed: - type: array - items: - type: string - proofs: - type: array - items: - type: string - signature: - type: string - required: - - sessionID - - success - - actionPerformed - - proofs - - signature - RollbackAckV1Message: - type: object - properties: - sessionID: - type: string - success: - type: boolean - signature: - type: string - required: - - sessionID - - success - - signature - LocalLog: - type: object - properties: - key: - type: string - sessionID: - type: string - data: - type: string - type: - type: string - operation: - type: string - timestamp: - type: string - required: - - sessionID - - type - - operation - SatpMessage: - type: object - properties: - SequenceNumber: - type: number - Phase: - type: string - enum: - - TransferInitialization - - LockEvidenceVerification - - CommitmentEstablishment - ResourceURL: - type: string - DeveloperURN: - type: string - ActionResponse: - type: object - properties: - ResponseCode: - type: string - enum: - - '200' - - '404' - x-enum-varnames: - - OK - - RESOURCE_NOT_FOUND - Arguments: - type: array - items: {} - CredentialProfile: - type: string - enum: - - SAML - - OAuth - - X509 - CredentialBlock: - type: array - items: {} - CredentialsProfile: - $ref: '#/components/schemas/PayloadProfile' - ApplicationProfile: - $ref: '#/components/schemas/ApplicationProfile' - Payload: - $ref: '#/components/schemas/Payload' - PayloadHash: - type: string - MessageSignature: - type: string -paths: - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest - operationId: phase1TransferInitiationRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferInitializationV1Request' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest - operationId: phase2TransferCommenceRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferCommenceV1Request' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest - operationId: phase2LockEvidenceRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LockEvidenceV1Request' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest - operationId: phase3CommitPreparationRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitPreparationV1Request' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest - operationId: phase3CommitFinalRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitFinalV1Request' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest: - get: - x-hyperledger-cacti: - http: - verbLowerCase: get - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest - operationId: phase3TransferCompleteRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferCompleteV1Request' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest - operationId: clientRequestV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ClientV1Request' - responses: - '200': - description: OK - content: - application/json: - schema: {} - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse - operationId: phase1TransferInitiationResponseV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferInitializationV1Response' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse - operationId: phase2TransferCommenceResponseV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferCommenceV1Response' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse - operationId: phase2LockEvidenceResponseV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LockEvidenceV1Response' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse - operationId: phase3CommitPreparationResponseV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitPreparationV1Response' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse - operationId: phase3CommitFinalResponseV1 - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommitFinalV1Response' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage - operationId: RecoverV1Message - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverV1Message' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage - operationId: RecoverUpdateV1Message - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverUpdateV1Message' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage - operationId: RecoverUpdateAckV1Message - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverUpdateAckV1Message' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage - operationId: RecoverV1Success - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RecoverSuccessV1Message' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage - operationId: RollbackV1Message - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RollbackV1Message' - responses: - '200': - description: OK - /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage: - post: - x-hyperledger-cacti: - http: - verbLowerCase: post - path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage - operationId: RollbackAckV1Message - description: '' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RollbackAckV1Message' - responses: - '200': - description: OK diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-get-status.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-get-status.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts deleted file mode 100644 index 4958de05f3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-coordinator-init.test.ts +++ /dev/null @@ -1,157 +0,0 @@ -import "jest-extended"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -// import coordinator factory, coordinator and coordinator options -import { - SATPGateway, - SATPGatewayConfig, -} from "../../../main/typescript/gateway-refactor"; -import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; -import { - IPluginFactoryOptions, - PluginImportType, -} from "@hyperledger/cactus-core-api"; -import { SupportedGatewayImplementations } from "./../../../main/typescript/core/types"; - -const logLevel: LogLevelDesc = "INFO"; -const log = LoggerProvider.getOrCreate({ - level: "INFO", - label: "satp-gateway-orchestrator-init-test", -}); -const factoryOptions: IPluginFactoryOptions = { - pluginImportType: PluginImportType.Local, -}; -const factory = new PluginFactorySATPGateway(factoryOptions); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); - -describe("SATPGateway initialization", () => { - it("initiates with default config", async () => { - const options: SATPGatewayConfig = {}; - const gateway = await factory.create(options); - - expect(gateway).toBeInstanceOf(SATPGateway); - - const identity = gateway.Identity; - expect(identity).toBeDefined(); - expect(identity.id).toBeDefined(); - expect(identity.name).toBeDefined(); - expect(identity.version).toEqual([ - { - Core: "v02", - Architecture: "v02", - Crash: "v02", - }, - ]); - expect(identity.supportedChains).toEqual([ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ]); - expect(identity.proofID).toBe("mockProofID1"); - expect(identity.gatewayClientPort).toBe(3011); - expect(identity.address).toBe("http://localhost"); - }); - - test("initiates custom config Gateway Coordinator", async () => { - const options: SATPGatewayConfig = { - logLevel: "INFO", - gid: { - id: "mockID", - name: "CustomGateway", - version: [ - { - Core: "v1", - Architecture: "v1", - Crash: "v1", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID10", - gatewayClientPort: 3001, - address: "https://localhost", - }, - }; - const gateway = await factory.create(options); - - expect(gateway).toBeInstanceOf(SATPGateway); - - const identity = gateway.Identity; - expect(identity).toBeDefined(); - expect(identity.id).toBeDefined(); - expect(identity.name).toBeDefined(); - expect(identity.version).toEqual([ - { - Core: "v1", - Architecture: "v1", - Crash: "v1", - }, - ]); - expect(identity.supportedChains).toEqual([ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ]); - expect(identity.proofID).toBe("mockProofID10"); - expect(identity.gatewayClientPort).toBe(3001); - expect(identity.address).toBe("https://localhost"); - }); - - test("Gateway Server launches", async () => { - const options: SATPGatewayConfig = { - logLevel: "INFO", - gid: { - id: "mockID", - name: "CustomGateway", - version: [ - { - Core: "v02", - Architecture: "v02", - Crash: "v02", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID10", - gatewayClientPort: 3010, - address: "https://localhost", - }, - }; - const gateway = await factory.create(options); - expect(gateway).toBeInstanceOf(SATPGateway); - - const identity = gateway.Identity; - expect(identity.gatewayClientPort).toBe(3010); - expect(identity.address).toBe("https://localhost"); - await gateway.startupGatewayServer(); - await gateway.shutdown(); - }); -}); - -afterAll(async () => { - // shutdown channels - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts similarity index 66% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts index 1f4d195a8e..c5997c9e10 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/refactor-gateway-init.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts @@ -8,7 +8,7 @@ import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPGateway, SATPGatewayConfig, -} from "../../../main/typescript/gateway-refactor"; +} from "../../../main/typescript/plugin-satp-hermes-gateway"; import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; import { IPluginFactoryOptions, @@ -205,6 +205,113 @@ describe("SATPGateway initialization", () => { }); }); + +describe("SATPGateway startup", () => { + it("initiates with default config", async () => { + const options: SATPGatewayConfig = {}; + const gateway = await factory.create(options); + + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + expect(identity).toBeDefined(); + expect(identity.id).toBeDefined(); + expect(identity.name).toBeDefined(); + expect(identity.version).toEqual([ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ]); + expect(identity.supportedChains).toEqual([ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]); + expect(identity.proofID).toBe("mockProofID1"); + expect(identity.gatewayClientPort).toBe(3011); + expect(identity.address).toBe("http://localhost"); + }); + + test("initiates custom config Gateway Coordinator", async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + gatewayClientPort: 3001, + address: "https://localhost", + }, + }; + const gateway = await factory.create(options); + + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + expect(identity).toBeDefined(); + expect(identity.id).toBeDefined(); + expect(identity.name).toBeDefined(); + expect(identity.version).toEqual([ + { + Core: "v1", + Architecture: "v1", + Crash: "v1", + }, + ]); + expect(identity.supportedChains).toEqual([ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ]); + expect(identity.proofID).toBe("mockProofID10"); + expect(identity.gatewayClientPort).toBe(3001); + expect(identity.address).toBe("https://localhost"); + }); + + test("Gateway Server launches", async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedChains: [ + SupportedGatewayImplementations.FABRIC, + SupportedGatewayImplementations.BESU, + ], + proofID: "mockProofID10", + gatewayClientPort: 3010, + address: "https://localhost", + }, + }; + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + expect(identity.gatewayClientPort).toBe(3010); + expect(identity.address).toBe("https://localhost"); + await gateway.startupGatewayServer(); + await gateway.shutdown(); + }); +}); + afterAll(async () => { await pruneDockerAllIfGithubAction({ logLevel }) .then(() => { From bb7bcfcb45f78e816d727799ce6737d8334d2d97 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 26 Apr 2024 23:02:41 +0300 Subject: [PATCH 15/49] fix: refactor services and handlers Signed-off-by: Rafael Belchior --- .../src/main/typescript/core/errors.ts | 33 +++-- .../src/main/typescript/core/satp-session.ts | 14 +- .../core/stage-handlers/stage1-handler.ts | 130 +++++----------- .../client/stage1-client-service.ts | 24 ++- .../client/stage2-client-service.ts | 24 ++- .../client/stage3-client-service.ts | 23 ++- .../server/stage1-server-service.ts | 25 +++- .../server/stage2-server-service.ts | 23 ++- .../server/stage3-server-service.ts | 22 ++- .../gol/protocol-manager/satp-manager.ts | 139 ++++++++---------- .../main/typescript/types/satp-protocol.ts | 42 +++++- 11 files changed, 272 insertions(+), 227 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts index d0d6599c9e..0c9fec11af 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts @@ -1,25 +1,26 @@ -export class BootstrapError extends Error { - constructor() { - super("Bootstrap already called in this Gateway Manager"); +export class SATPError extends Error { + constructor(message: string, public code: number = 500, public internalErrorId?: string, public trace?: string) { + super(message); this.name = this.constructor.name; - Object.setPrototypeOf(this, BootstrapError.prototype); + Object.setPrototypeOf(this, new.target.prototype); // make sure prototype chain is set to error + this.stack = trace || new Error().stack; } } -export class NonExistantGatewayIdentity extends Error { - constructor(id: string) { - super(`Gateway with id ${id} does not exist`); - this.name = this.constructor.name; - Object.setPrototypeOf(this, BootstrapError.prototype); +export class BootstrapError extends SATPError { + constructor(internalErrorId?: string, trace?: string) { + super("Bootstrap already called in this Gateway Manager", 409, internalErrorId, trace); } } -export class GetStatusError extends Error { - constructor(sessionID: string, message: string) { - super( - `Could not GetStatus at Session: with id ${sessionID}. Reason: ${message}`, - ); - this.name = this.constructor.name; - Object.setPrototypeOf(this, GetStatusError.prototype); +export class NonExistantGatewayIdentity extends SATPError { + constructor(id: string, internalErrorId?: string, trace?: string) { + super(`Gateway with id ${id} does not exist`, 404, internalErrorId, trace); + } +} + +export class GetStatusError extends SATPError { + constructor(sessionID: string, message: string, internalErrorId?: string, trace?: string) { + super(`Could not GetStatus at Session: with id ${sessionID}. Reason: ${message}`, 400, internalErrorId, trace); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index 815022b2a2..21259abbfe 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -13,21 +13,15 @@ export class SATPSession { constructor(ops: ISATPSessionOptions) { this.sessionData = new SessionData(); this.sessionData.transferContextId = ops.contextID; - - // TODO algorithm to create session ID from context ID - this.sessionData.id = ops.contextID + "-" + uuidv4(); + this.sessionData.id = this.generateSessionID(); } - private initializeSessionID(): void { - if (this.sessionData.id === undefined) { - this.sessionData.id = uuidv4() + "-" + this.sessionData.transferContextId; - } else { - throw new Error("Session ID already initialized"); - } + private generateSessionID(): string { + return this.sessionData.id = uuidv4() + "-" + this.sessionData.transferContextId; } public getSessionData(): SessionData { return this.sessionData; } -} \ No newline at end of file +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 41b67a5361..71e7089cc9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -1,102 +1,50 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; - import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; -import { - TransferCommenceRequestMessage, - TransferProposalRequestMessage, -} from "../../generated/proto/cacti/satp/v02/stage_1_pb"; -import { SATPGateway } from "../../plugin-satp-hermes-gateway"; -import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; -import { TimestampType, saveTimestamp } from "../session-utils"; -import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { TransferCommenceRequestMessage, TransferProposalRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; import { SATPSession } from "../satp-session"; +import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; import { Stage1ClientService } from "../stage-services/client/stage1-client-service"; -import { ServiceType } from "@bufbuild/protobuf"; import { SupportedGatewayImplementations } from "../types"; +import { SATPHandler } from './SATPHandler'; // Assuming the interface is exported from this path -export const Stage1Handler = (session: SATPSession | undefined, serverService: Stage1ServerService, clientService: Stage1ClientService, connectClients: ServiceType[], supportedDLTs: SupportedGatewayImplementations[]) => - (router: ConnectRouter) => - router.service(SatpStage1Service, { - async transferProposal( - req: TransferProposalRequestMessage, - context: HandlerContext, - ) { - console.log("Received TransferProposalRequest", req, context); - const recvTimestamp: string = Date.now().toString(); - - const sessionData = - await serverService.checkTransferProposalRequestMessage(req, session, supportedDLTs); - - saveTimestamp( - sessionData, - MessageType.INIT_PROPOSAL, - TimestampType.RECEIVED, - recvTimestamp, - ); +export class Stage1SATPHandler implements SATPHandler { + constructor( + private session: SATPSession | undefined, + private serverService: Stage1ServerService, + private clientService: Stage1ClientService, + private supportedDLTs: SupportedGatewayImplementations[] + ) {} - const message = await serverService.transferProposalResponse( - req, - session, - ); - - if (!message) { - throw new Error("No message returned from transferProposalResponse"); - } - - /* - if (reject) { - saveTimestamp( - sessionData, - MessageType.INIT_REJECT, - TimestampType.PROCESSED, - ); - } else { - saveTimestamp( - sessionData, - MessageType.INIT_RECEIPT, - TimestampType.PROCESSED, - ); + setupRouter(router: ConnectRouter): void { + router.service(SatpStage1Service, { + transferProposal: async (req: TransferProposalRequestMessage, context: HandlerContext) => { + try { + console.log("Received TransferProposalRequest", req, context); + const sessionData = await this.serverService.checkTransferProposalRequestMessage(req, this.session, this.supportedDLTs); + const message = await this.serverService.transferProposalResponse(req, this.session); + console.log("Returning response", message); + return message; + } catch (error) { + console.error("Error handling TransferProposalRequest:", error); + throw new Error("Failed to process TransferProposalRequest"); } - */ - console.log("Returning response", message); - - return message; }, - - // TODO phase, step - async transferCommence( - req: TransferCommenceRequestMessage, - context: HandlerContext, - ) { - console.log("Received TransferCommenceRequest", req, context); - const recvTimestamp: string = Date.now().toString(); - - const sessionData = await serverService.checkTransferCommenceRequestMessage( - req, - session, - ); - - saveTimestamp( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - TimestampType.RECEIVED, - recvTimestamp, - ); - - const message = await serverService.transferCommenceResponse(req, session); - - if (!message) { - throw new Error("No message returned from transferProposalResponse"); + transferCommence: async (req: TransferCommenceRequestMessage, context: HandlerContext) => { + try { + console.log("Received TransferCommenceRequest", req, context); + const sessionData = await this.serverService.checkTransferCommenceRequestMessage(req, this.session); + const message = await this.serverService.transferCommenceResponse(req, this.session); + console.log("Returning response", message); + return message; + } catch (error) { + console.error("Error handling TransferCommenceRequest:", error); + throw new Error("Failed to process TransferCommenceRequest"); } - - saveTimestamp( - sessionData, - MessageType.TRANSFER_COMMENCE_RESPONSE, - TimestampType.PROCESSED, - ); - - console.log("Returning response", message); - - return message; - }, + } }); + } + + getHandlerIdentifier(): string { + return "Stage1SATPHandler"; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 2e654f6893..105fd216e5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -27,28 +27,42 @@ import { } from "../../session-utils"; import { SupportedGatewayImplementations } from "../../types"; import { SATPSession } from "../../../core/satp-session"; -import { SATPService, ISATPClientServiceOptions } from "../../../types/satp-protocol"; +import { SATPService, ISATPClientServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; export class Stage1ClientService implements SATPService { - public static readonly CLASS_NAME = "Stage1Service-Client"; + public static readonly CLASS_NAME = "client-service"; + public static readonly SATP_STAGE = "stage-1"; + public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; private _log: Logger; private signer: JsObjectSigner; constructor(ops: ISATPClientServiceOptions) { - const level = "INFO"; - const label = Stage1ClientService.CLASS_NAME; + const level = ops.logLevel || "INFO"; + const label = this.getServiceIdentifier(); this._log = LoggerProvider.getOrCreate({ level, label }); this.signer = ops.signer; } - + public get className(): string { return Stage1ClientService.CLASS_NAME; } + public get stage(): string { + return Stage1ClientService.SATP_STAGE; + } + public get log(): Logger { return this._log; } + public get serviceType(): SATPServiceType { + return SATPServiceType.Client; + } + + public getServiceIdentifier(): string { + return `${this.className}#${this.serviceType}`; + } + async transferProposalRequest( sessionID: string, session: SATPSession, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index ceaa6dbff3..56603fb305 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -16,29 +16,43 @@ import { } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; import { SATPSession } from "../../../core/satp-session"; -import { SATPService, ISATPClientServiceOptions } from "../../../types/satp-protocol"; +import { SATPService, ISATPClientServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; export class Stage2ClientService implements SATPService { - public static readonly CLASS_NAME = "Stage2Service-Client"; + public static readonly CLASS_NAME = "client-service"; + public static readonly SATP_STAGE = "stage-2"; + public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; + private _log: Logger; private signer: JsObjectSigner; constructor(ops: ISATPClientServiceOptions) { - const level = "INFO"; - const label = Stage2ClientService.CLASS_NAME; + const level = ops.logLevel || "INFO"; + const label = this.getServiceIdentifier(); this._log = LoggerProvider.getOrCreate({ level, label }); this.signer = ops.signer; - } public get className(): string { return Stage2ClientService.CLASS_NAME; } + public get stage(): string { + return Stage2ClientService.SATP_STAGE; + } + public get log(): Logger { return this._log; } + public get serviceType(): SATPServiceType { + return SATPServiceType.Client; + } + + public getServiceIdentifier(): string { + return `${this.className}#${this.serviceType}`; + } + async lockAssertionRequest( response: TransferCommenceResponseMessage, session: SATPSession, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index c79291d52b..8b6fdc41ca 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -20,18 +20,21 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPService, ISATPClientServiceOptions } from "../../../types/satp-protocol"; +import { SATPService, ISATPClientServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; import { SATPSession } from "../../satp-session"; import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; export class Stage3ClientService implements SATPService { - public static readonly CLASS_NAME = "Stage3Service-Client"; + public static readonly CLASS_NAME = "client-service"; + public static readonly SATP_STAGE = "stage-3"; + public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; + private _log: Logger; private signer: JsObjectSigner; constructor(ops: ISATPClientServiceOptions) { - const level = "INFO"; - const label = Stage3ClientService.CLASS_NAME; + const level = ops.logLevel || "INFO"; + const label = this.getServiceIdentifier(); this._log = LoggerProvider.getOrCreate({ level, label }); this.signer = ops.signer; } @@ -40,10 +43,22 @@ export class Stage3ClientService implements SATPService { return Stage3ClientService.CLASS_NAME; } + public get stage(): string { + return Stage3ClientService.SATP_STAGE; + } + public get log(): Logger { return this._log; } + public get serviceType(): SATPServiceType { + return SATPServiceType.Client; + } + + public getServiceIdentifier(): string { + return `${this.className}#${this.serviceType}`; + } + async commitPreparation( response: LockAssertionReceiptMessage, session: SATPSession, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index efd8406332..32e60eb722 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -34,17 +34,19 @@ import { } from "../../session-utils"; import { SupportedGatewayImplementations } from "../../types"; import { SATPSession } from "../../../core/satp-session"; -import { SATPService, ISATPServerServiceOptions } from "../../../types/satp-protocol"; +import { SATPService, ISATPServerServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; export class Stage1ServerService implements SATPService { - public static readonly CLASS_NAME = "Stage2ServerService"; + public static readonly CLASS_NAME = "server-service"; + public static readonly SATP_STAGE = "stage-1"; + public static readonly SERVICE_TYPE = SATPServiceType.Server; private _log: Logger; private signer: JsObjectSigner; -; + constructor(ops: ISATPServerServiceOptions) { - const level = "INFO"; - const label = Stage1ServerService.CLASS_NAME; + const level = ops.logLevel || "INFO"; + const label = this.getServiceIdentifier(); this._log = LoggerProvider.getOrCreate({ level, label }); this.signer = ops.signer; } @@ -53,10 +55,23 @@ export class Stage1ServerService implements SATPService { return Stage1ServerService.CLASS_NAME; } + public get stage(): string { + return Stage1ServerService.SATP_STAGE; + } + public get log(): Logger { return this._log; } + + public get serviceType(): SATPServiceType { + return SATPServiceType.Server; + } + + public getServiceIdentifier(): string { + return `${this.className}#${this.serviceType}`; + } + async transferProposalResponse( request: TransferProposalRequestMessage, session: SATPSession | undefined, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 29f679078d..359ac37eff 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -18,16 +18,19 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPService, ISATPServerServiceOptions } from "../../../types/satp-protocol"; +import { SATPService, ISATPServerServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; import { SATPSession } from "../../../core/satp-session"; export class Stage2ServerService implements SATPService { - public static readonly CLASS_NAME = "Stage2ServerService"; + public static readonly CLASS_NAME = "server-service"; + public static readonly SATP_STAGE = "stage-2"; + public static readonly SERVICE_TYPE = SATPServiceType.Server; + private _log: Logger; private signer: JsObjectSigner; constructor(ops: ISATPServerServiceOptions) { - const level = "INFO"; - const label = Stage2ServerService.CLASS_NAME; + const level = ops.logLevel || "INFO"; + const label = this.getServiceIdentifier(); this._log = LoggerProvider.getOrCreate({ level, label }); this.signer = ops.signer; } @@ -36,10 +39,22 @@ export class Stage2ServerService implements SATPService { return Stage2ServerService.CLASS_NAME; } + public get stage(): string { + return Stage2ServerService.SATP_STAGE; + } + public get log(): Logger { return this._log; } + public get serviceType(): SATPServiceType { + return SATPServiceType.Server; + } + + public getServiceIdentifier(): string { + return `${this.className}#${this.serviceType}`; + } + async lockAssertionResponse( request: LockAssertionRequestMessage, session: SATPSession, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 4568a9dad9..4a1aca5121 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -20,17 +20,19 @@ import { verifySignature, } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPService, ISATPServerServiceOptions } from "../../../types/satp-protocol"; +import { SATPService, ISATPServerServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; import { SATPSession } from "../../../core/satp-session"; export class Stage3ServerService implements SATPService { - public static readonly CLASS_NAME = "Stage3ServerService"; + public static readonly CLASS_NAME = "server-service"; + public static readonly SATP_STAGE = "stage-3"; + public static readonly SERVICE_TYPE = SATPServiceType.Server; private _log: Logger; private signer: JsObjectSigner; constructor(ops: ISATPServerServiceOptions) { - const level = "INFO"; - const label = Stage3ServerService.CLASS_NAME; + const level = ops.logLevel || "INFO"; + const label = this.getServiceIdentifier(); this._log = LoggerProvider.getOrCreate({ level, label }); this.signer = ops.signer; } @@ -39,10 +41,22 @@ export class Stage3ServerService implements SATPService { return Stage3ServerService.CLASS_NAME; } + public get stage(): string { + return Stage3ServerService.SATP_STAGE; + } + public get log(): Logger { return this._log; } + public get serviceType(): SATPServiceType { + return SATPServiceType.Server; + } + + public getServiceIdentifier(): string { + return `${this.className}#${this.serviceType}`; + } + async commitReady( request: CommitPreparationRequestMessage, session: SATPSession, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts index b21f7bd121..ef756948e8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts @@ -6,7 +6,7 @@ import { LoggerProvider, } from "@hyperledger/cactus-common"; -import { Stage1Handler } from "../../core/stage-handlers/stage1-handler"; +import { Stage1SATPHandler } from "../../core/stage-handlers/stage1-handler"; import { Stage2Handler } from "../../core/stage-handlers/stage2-handler"; import { Stage3Handler } from "../../core/stage-handlers/stage3-handler"; import { Stage1ServerService } from "../../core/stage-services/server/stage1-server-service"; @@ -21,17 +21,18 @@ import { Stage1ClientService } from "../../core/stage-services/client/stage1-cli import { Stage2ClientService } from "../../core/stage-services/client/stage2-client-service"; import { Stage3ClientService } from "../../core/stage-services/client/stage3-client-service"; import { createConnectTransport } from "@connectrpc/connect-node"; -import { SATPService, ISATPServerServiceOptions } from "../../types/satp-protocol"; +import { SATPService, ISATPServerServiceOptions, ISATPServiceOptions, SATPHandler, SATPServiceType } from "../../types/satp-protocol"; import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; import { PromiseClient as PromiseConnectClient, Transport as ConnectTransport, PromiseClient } from "@connectrpc/connect"; +import { Session } from "inspector"; export interface ISATPManagerOptions { logLevel?: LogLevelDesc; instanceId: string; - sessions?: Map; + sessions?: Map; signer: JsObjectSigner; supportedDLTs: SupportedGatewayImplementations[]; connectClients: PromiseConnectClient[]; @@ -49,68 +50,59 @@ export class SATPManager { private signer: JsObjectSigner; private connectClients: PromiseConnectClient[]; public supportedDLTs: SupportedGatewayImplementations[] = []; - protected sessions?: Map; - - private readonly stage1ServerService: SATPService; - private readonly stage2ServerService: SATPService; - private readonly stage3ServerService: SATPService; - private readonly stage1ClientService: SATPService; - private readonly stage2ClientService: SATPService; - private readonly stage3ClientService: SATPService; - - constructor( - public readonly options: ISATPManagerOptions, - ) { - const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "DEBUG"; - const label = this.className; - this.logger = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = options.instanceId; - this.logger.info(`Instantiated ${this.className} OK`); - this.supportedDLTs = options.supportedDLTs; - this.signer = options.signer; - - this.sessions = options.sessions; - - const satpServiceOptions: ISATPServerServiceOptions = { - signer: this.signer, - }; - // create clients - - const satpServiceOptionsClient: ISATPServerServiceOptions = { - signer: this.signer, - - }; - this.connectClients = options.connectClients; - if (this.connectClients == undefined || this.connectClients.length == 0) { - this.logger.warn("Connect clients not provided"); + private sessions: Map; + + private readonly satpServices: SATPService[] = []; + private readonly satpHandlers: SATPHandler[] = []; + + constructor( + public readonly options: ISATPManagerOptions, + ) { + const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "DEBUG"; + const label = this.className; + this.logger = LoggerProvider.getOrCreate({ level, label }); + this.instanceId = options.instanceId; + this.logger.info(`Instantiated ${this.className} OK`); + this.supportedDLTs = options.supportedDLTs; + this.signer = options.signer; + + this.sessions = options.sessions || new Map(); + + this.connectClients = options.connectClients; + if (this.connectClients == undefined || this.connectClients.length == 0) { + this.logger.warn("Connect clients not provided"); + } + + const serviceClasses = [Stage1ServerService, Stage2ServerService, Stage3ServerService, Stage1ClientService, Stage2ClientService, Stage3ClientService]; + const satpServiceOptions: ISATPServiceOptions = { signer: this.signer, logLevel: level }; + this.satpServices = serviceClasses.map(ServiceClass => new ServiceClass(satpServiceOptions)); + + let mockSession = this.getOrCreateSession() + const stage1Handler = new Stage1SATPHandler(mockSession, this.getServiceByStage(SATPServiceType.Server, "stage-1"), this.getServiceByStage(SATPServiceType.Client, "stage-1"), this.supportedDLTs); + stage1Handler.setupRouter(router); + + } - this.stage1ServerService = new Stage1ServerService(satpServiceOptions); - this.stage2ServerService = new Stage2ServerService(satpServiceOptions); - this.stage3ServerService = new Stage3ServerService(satpServiceOptions); - this.stage1ClientService = new Stage1ClientService(satpServiceOptionsClient); - this.stage2ClientService = new Stage2ClientService(satpServiceOptionsClient); - this.stage3ClientService = new Stage3ClientService(satpServiceOptionsClient); - - /* - Stage1Handler(this.sessions, this.stage1ServerService, this.stage1ClientService, this.connectClients), - Stage2Handler(this.gateway, this.stage2Service), - Stage3Handler(this.gateway, this.stage3Service), - */ + public getServiceByStage(serviceType: SATPServiceType, stageId: string): any { + return this.satpServices.find(service => + service.serviceType === serviceType && + service.stage === stageId + ); } public get className(): string { return SATPManager.CLASS_NAME; } - public getSessions(): Map | undefined { + public getSessions(): Map | undefined { return this.sessions; } - public getSession(sessionId: string): SATPSession[] | undefined { + public getSession(sessionId: string): SATPSession | undefined { if (this.sessions == undefined) { return undefined; } @@ -121,23 +113,22 @@ export class SATPManager { return this.supportedDLTs; } - public addSession(sessionId: string, contextID: string): void { - if (this.sessions == undefined) { - this.sessions = new Map(); - } else { - const existingSessions = this.sessions.get(sessionId); - const sessionOps: ISATPSessionOptions = { - contextID: contextID, - }; - if (existingSessions) { - - existingSessions.push(new SATPSession(sessionOps)); - this.sessions.set(sessionId, existingSessions); - } else { - this.sessions.set(sessionId, [new SATPSession(sessionOps)]); - } + public getOrCreateSession(sessionId?: string, contextID?: string): SATPSession { + let session: SATPSession; + if (!sessionId) { + return this.createNewSession(contextID || "MOCK_CONTEXT_ID"); + return session; + } else { + let existingSession = this.sessions.get(sessionId); + return existingSession || this.createNewSession("MOCK_CONTEXT_ID"); } - } + } + + private createNewSession(contextID: string): SATPSession { + let session = new SATPSession({ contextID: contextID }); + this.sessions?.set(session.getSessionData().id, session); + return session + } getOrCreateServices() { const fnTag = `${SATPManager.CLASS_NAME}#getOrCreateServices()`; @@ -148,17 +139,11 @@ export class SATPManager { return this.endpoints; } - this.endpoints = [ - - ]; - + this.endpoints = this.satpHandlers; return this.endpoints; } get StageHandlers() { throw new Error("Not implemented yet"); } - - // methods to dynamically add/remove connect clients - } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index a0a243e179..e8a63c3d25 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -1,16 +1,46 @@ -import { JsObjectSigner } from "@hyperledger/cactus-common"; +import { JsObjectSigner, LogLevelDesc, Logger } from "@hyperledger/cactus-common"; import { SupportedGatewayImplementations } from "../core/types"; import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; import { v4 as uuidV4 } from "uuid"; +import { ConnectRouter } from "@connectrpc/connect"; -export type SATPService = { +/** + * Interface for SATP Services. + * Each service implementing this interface must provide one or more function(s) to handle specific stages of the SATP protocol. + * Implementations should ensure compliance with the defined asynchronous patterns essential for SATP protocol interactions. + */ +export interface SATPService { + readonly className: string; + readonly stage: string; + readonly log: Logger; + readonly serviceType: SATPServiceType; + getServiceIdentifier(): string; +} +/** + * Represents a handler for various stages of the SATP (Secure Asset Transfer Protocol). + * Handlers implementing this interface must provide mechanisms to setup routes and handle + * protocol-specific requests based on the stage they are designed for. + */ +export interface SATPHandler { + setupRouter(router: ConnectRouter): void; + getHandlerIdentifier(): string; } -export type ISATPServerServiceOptions = { +export enum SATPServiceType { + Server, + Client, +} + +export type ISATPServiceOptions = { + logLevel: LogLevelDesc signer: JsObjectSigner; } -export type ISATPClientServiceOptions = { - signer: JsObjectSigner; -} \ No newline at end of file +export type ISATPServerServiceOptions = ISATPServiceOptions & { + +} + +export type ISATPClientServiceOptions = ISATPServiceOptions & { + +} From a6d1d073caf8819948d9e7b618ed4ded0ee3d2c7 Mon Sep 17 00:00:00 2001 From: eduv09 Date: Tue, 26 Mar 2024 13:32:50 +0000 Subject: [PATCH 16/49] feat(bungee-hermes): viewProof & ethereum strategy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Views have new attribute viewProof * This attribute has the roots of all state proofs and transaction proofs in the view * Added new endpoint to verify integrity of view proofs * Created strategy for bungee-hermes to support the ethereum-connector * Created new test for the strategy-ethereum, and altered the API test to test the new viewProof endpoint * Updated documentation to reflect new changes. * Fixes in Fabric Strategy, stateProofs and error handling Co-authored-by: André Augusto Co-authored-by: Rafael Belchior Signed-off-by: eduv09 --- packages/cactus-plugin-bungee-hermes/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cactus-plugin-bungee-hermes/README.md b/packages/cactus-plugin-bungee-hermes/README.md index 2ada98ce32..8c05a4e0cc 100644 --- a/packages/cactus-plugin-bungee-hermes/README.md +++ b/packages/cactus-plugin-bungee-hermes/README.md @@ -226,4 +226,4 @@ We welcome contributions to Hyperledger Cactus in many forms, and there’s alwa Please review [CONTRIBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md "CONTRIBUTING.md") to get started. ## License -This distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE "LICENSE ")file. \ No newline at end of file +This distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE "LICENSE ")file. From 8c65e1051643754aa616776daf21074492e011ec Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Sun, 12 May 2024 18:21:44 +0100 Subject: [PATCH 17/49] fix: eslint all Signed-off-by: Rafael Belchior --- .../get-keychain-entry-endpoint.puml | 2 +- .../initialization-standalone-plugin.puml | 52 + .../cactus-plugin-satp-hermes/package.json | 2 +- .../blo/admin/get-audit-handler-service.ts | 1 - .../blo/admin/get-status-handler-service.ts | 2 +- .../src/main/typescript/blo/dispatcher.ts | 47 +- .../blo/transaction/cancel-handler-service.ts | 1 - .../blo/transaction/routes-handler-service.ts | 1 - .../src/main/typescript/core/errors.ts | 28 +- .../src/main/typescript/core/satp-session.ts | 8 +- .../core/stage-handlers/stage1-handler.ts | 116 +- .../core/stage-handlers/stage2-handler.ts | 14 +- .../core/stage-handlers/stage3-handler.ts | 14 +- .../client/stage1-client-service.ts | 123 +- .../client/stage2-client-service.ts | 459 ++++---- .../client/stage3-client-service.ts | 1033 ++++++++--------- .../satp-bridge/satp-bridge-manager.ts | 5 + .../core/stage-services/satp-service.ts | 69 ++ .../server/stage1-server-service.ts | 137 +-- .../server/stage2-server-service.ts | 460 ++++---- .../server/stage3-server-service.ts | 858 +++++++------- .../src/main/typescript/core/types.ts | 30 +- ...ugin-factory-satp-hermes-bridge-manager.ts | 1 + .../src/main/typescript/gateway-utils.ts | 2 +- .../typescript/gol/gateway-orchestrator.ts | 194 ++-- .../protocol-manager-builder.ts | 5 - .../gol/protocol-manager/satp-manager.ts | 149 --- .../src/main/typescript/gol/satp-manager.ts | 254 ++++ .../network-identification/chainid-list.ts | 2 +- .../network-identification/resolve-gateway.ts | 169 ++- .../typescript/plugin-satp-hermes-gateway.ts | 262 +++-- .../src/main/typescript/public-api.ts | 3 +- .../main/typescript/types/satp-protocol.ts | 54 +- .../main/typescript/web-services/router.ts | 16 - .../web-services/stage-0/dummy-step.ts | 0 .../stage-0/identity-verification.ts | 0 .../web-services/{blo => }/status-endpoint.ts | 8 +- .../gateway-blo-get-status.test.ts | 7 +- .../integration/gateway-init-startup.test.ts | 54 +- 39 files changed, 2486 insertions(+), 2156 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/docs/initialization-standalone-plugin.puml delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/dummy-step.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/identity-verification.ts rename packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/{blo => }/status-endpoint.ts (90%) diff --git a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml index 195b74be5e..c05e81f6dd 100644 --- a/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml +++ b/packages/cactus-plugin-keychain-aws-sm/docs/architecture/get-keychain-entry-endpoint.puml @@ -32,4 +32,4 @@ end awssm --> apis: Response apis --> apic: Formatted Response apic --> a: GetKeychainEntryResponse -@enduml \ No newline at end of file +@enduml diff --git a/packages/cactus-plugin-satp-hermes/docs/initialization-standalone-plugin.puml b/packages/cactus-plugin-satp-hermes/docs/initialization-standalone-plugin.puml new file mode 100644 index 0000000000..e36b77b8b4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/docs/initialization-standalone-plugin.puml @@ -0,0 +1,52 @@ +@startuml +title Hyperledger Cacti SATP-Hermes\nInitialization (standalone) + +skinparam sequenceArrowThickness 2 +skinparam roundcorner 20 +skinparam maxmessagesize 120 +skinparam sequenceParticipant underline +skinparam autonumber true + +entity "SATPGateway" as g +entity "Orchestrator (GOL)" as gol +entity "Counterparty SATP Gateway" as cg +entity "WebServices" as web +entity "Dispatcher (BLO)" as dispatcher +entity "SATPManager" as manager +component "SATP Core" as core + + +g --> g: constructor(options) +g --> g: ProcessGatewayCoordinatorConfig() +g --> g: basic initialization (logger, signer, etc) + +== GOL Init == +g -> gol: initialize GatewayOrchestrator(GOLoptions) +group #Yellow if { get GOLoptions.CounterpartyGateways() } + gol -> gol: basic initialization (logger, etc) + gol -> gol: connectToCounterPartyGateways() + gol -> gol: createChannel(counterpartyGateway) + gol -> gol: createConnectClients(counterpartyGateway) + gol -> cg: call healthcheck endpoint (TBD 🚨) +else #Pink else only do basic initialization +end +gol --> g: GatewayOrchestrator + +== BLO and SATP Manager Init == +g --> bol: initialize BLODispatcher(options, GatewayOrchestrator) +bol --> bol: expose endpoints via getOrCreateWebServices() +bol --> manager: initialize SATPManager(options) +manager --> core: get SATP Service classes +core --> manager: services +manager --> manager: instantiate services (options) +manager --> core: get SATP Handler classes +core --> manager: handlers +manager --> manager: instatiate handlers (services, options) +manager --> bol: SATP manager + +== Misc == + +g --> g: setup OpenAPI UI server + + +@enduml diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 6df1cfc6be..4cfc88a16c 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -53,7 +53,7 @@ "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/gateway-client/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", "lint": "run-p 'lint:*'", - "lint:eslint": "eslint '*/*/src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", + "lint:eslint": "eslint './src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", "lint:protobuf": "buf lint --path src/main/proto --verbose", "pretsc": "npm run generate-sdk", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts deleted file mode 100644 index 65b3dba385..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-audit-handler-service.ts +++ /dev/null @@ -1 +0,0 @@ -// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index fad34c1286..76034e9f1e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -6,7 +6,7 @@ import { } from "../../generated/gateway-client/typescript-axios"; import { Logger } from "@hyperledger/cactus-common"; -export async function GetStatusHandler( +export async function ExecuteGetStatus( logger: Logger, req: StatusRequest, ): Promise { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 864372f02e..7a146527d2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -3,25 +3,30 @@ import { Checks, LogLevelDesc, LoggerProvider, + JsObjectSigner, } from "@hyperledger/cactus-common"; import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; //import { GatewayIdentity, GatewayChannel } from "../core/types"; //import { GetStatusError, NonExistantGatewayIdentity } from "../core/errors"; -import { GetStatusEndpointV1 } from "../web-services/blo/status-endpoint"; +import { GetStatusEndpointV1 } from "../web-services/status-endpoint"; //import { GetAuditRequest, GetAuditResponse } from "../generated/gateway-client/typescript-axios"; import { StatusRequest, StatusResponse, } from "../generated/gateway-client/typescript-axios"; -import { GetStatusHandler } from "./admin/get-status-handler-service"; +import { ExecuteGetStatus } from "./admin/get-status-handler-service"; +import { ISATPManagerOptions, SATPManager } from "../gol/satp-manager"; +import { GatewayOrchestrator } from "../gol/gateway-orchestrator"; export interface BLODispatcherOptions { logger: Logger; logLevel?: LogLevelDesc; instanceId: string; + orchestrator: GatewayOrchestrator; + signer: JsObjectSigner; } export class BLODispatcher { @@ -29,6 +34,8 @@ export class BLODispatcher { private readonly logger: Logger; private endpoints: IWebServiceEndpoint[] | undefined; private readonly instanceId: string; + private manager: SATPManager; + private orchestrator: GatewayOrchestrator; constructor(public readonly options: BLODispatcherOptions) { const fnTag = `${BLODispatcher.CLASS_NAME}#constructor()`; @@ -39,6 +46,18 @@ export class BLODispatcher { this.logger = LoggerProvider.getOrCreate({ level, label }); this.instanceId = options.instanceId; this.logger.info(`Instantiated ${this.className} OK`); + this.orchestrator = options.orchestrator; + const signer = options.signer; + const ourGateway = this.orchestrator.ourGateway; + + const SATPManagerOpts: ISATPManagerOptions = { + logLevel: "DEBUG", + instanceId: ourGateway!.id, + signer: signer, + supportedDLTs: this.orchestrator.supportedDLTs, + }; + + this.manager = new SATPManager(SATPManagerOpts); } public get className(): string { @@ -64,9 +83,31 @@ export class BLODispatcher { return theEndpoints; } + private getTargetGatewayClient(id: string) { + const channels = Array.from(this.orchestrator.getChannels()); + channels.filter((ch) => { + id == ch[0] && ch[1].toGatewayID == id; + }); + + if (channels.length == 0) { + throw new Error(`No channels with specified target gateway id ${id}`); + } else if (channels.length > 1) { + throw new Error( + `Duplicated channels with specified target gateway id ${id}`, + ); + } else { + return channels[0]; + } + } + public async GetStatus(req: StatusRequest): Promise { - return GetStatusHandler(this.logger, req); + return ExecuteGetStatus(this.logger, req); } + public async Transact(req: StatusRequest): Promise { + return ExecuteGetStatus(this.logger, req); + } + // get channel by caller; give needed client from orchestrator to handler to call + // for all channels, find session id on request // TODO implement handlers GetAudit, Transact, Cancel, Routes } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts deleted file mode 100644 index 65b3dba385..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/cancel-handler-service.ts +++ /dev/null @@ -1 +0,0 @@ -// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts deleted file mode 100644 index 65b3dba385..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/routes-handler-service.ts +++ /dev/null @@ -1 +0,0 @@ -// todo diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts index 0c9fec11af..0eb24f198b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts @@ -1,5 +1,10 @@ export class SATPError extends Error { - constructor(message: string, public code: number = 500, public internalErrorId?: string, public trace?: string) { + constructor( + message: string, + public code: number = 500, + public internalErrorId?: string, + public trace?: string, + ) { super(message); this.name = this.constructor.name; Object.setPrototypeOf(this, new.target.prototype); // make sure prototype chain is set to error @@ -9,7 +14,12 @@ export class SATPError extends Error { export class BootstrapError extends SATPError { constructor(internalErrorId?: string, trace?: string) { - super("Bootstrap already called in this Gateway Manager", 409, internalErrorId, trace); + super( + "Bootstrap already called in this Gateway Manager", + 409, + internalErrorId, + trace, + ); } } @@ -20,7 +30,17 @@ export class NonExistantGatewayIdentity extends SATPError { } export class GetStatusError extends SATPError { - constructor(sessionID: string, message: string, internalErrorId?: string, trace?: string) { - super(`Could not GetStatus at Session: with id ${sessionID}. Reason: ${message}`, 400, internalErrorId, trace); + constructor( + sessionID: string, + message: string, + internalErrorId?: string, + trace?: string, + ) { + super( + `Could not GetStatus at Session: with id ${sessionID}. Reason: ${message}`, + 400, + internalErrorId, + trace, + ); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index 21259abbfe..3a8f316e0a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -1,24 +1,24 @@ import { v4 as uuidv4 } from "uuid"; import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; - +// Define interface on protos export interface ISATPSessionOptions { contextID: string; } export class SATPSession { - private static readonly CLASS_NAME = "SATPSession"; + public static readonly CLASS_NAME = "SATPSession"; private sessionData: SessionData; constructor(ops: ISATPSessionOptions) { this.sessionData = new SessionData(); this.sessionData.transferContextId = ops.contextID; this.sessionData.id = this.generateSessionID(); - } private generateSessionID(): string { - return this.sessionData.id = uuidv4() + "-" + this.sessionData.transferContextId; + return (this.sessionData.id = + uuidv4() + "-" + this.sessionData.transferContextId); } public getSessionData(): SessionData { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 71e7089cc9..942acd3ff9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -1,50 +1,92 @@ import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; -import { TransferCommenceRequestMessage, TransferProposalRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { + TransferCommenceRequestMessage, + TransferCommenceResponseMessage, + TransferProposalReceiptMessage, + TransferProposalRequestMessage, +} from "../../generated/proto/cacti/satp/v02/stage_1_pb"; import { SATPSession } from "../satp-session"; import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; import { Stage1ClientService } from "../stage-services/client/stage1-client-service"; -import { SupportedGatewayImplementations } from "../types"; -import { SATPHandler } from './SATPHandler'; // Assuming the interface is exported from this path +import { SupportedChain } from "../types"; +import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; export class Stage1SATPHandler implements SATPHandler { - constructor( - private session: SATPSession | undefined, - private serverService: Stage1ServerService, - private clientService: Stage1ClientService, - private supportedDLTs: SupportedGatewayImplementations[] - ) {} + public static readonly CLASS_NAME = "Stage1SATPHandler"; + private session: SATPSession; + private serverService: Stage1ServerService; + private clientService: Stage1ClientService; + private supportedDLTs: SupportedChain[]; + private logger: Logger; - setupRouter(router: ConnectRouter): void { - router.service(SatpStage1Service, { - transferProposal: async (req: TransferProposalRequestMessage, context: HandlerContext) => { - try { - console.log("Received TransferProposalRequest", req, context); - const sessionData = await this.serverService.checkTransferProposalRequestMessage(req, this.session, this.supportedDLTs); - const message = await this.serverService.transferProposalResponse(req, this.session); - console.log("Returning response", message); - return message; - } catch (error) { - console.error("Error handling TransferProposalRequest:", error); - throw new Error("Failed to process TransferProposalRequest"); - } - }, - transferCommence: async (req: TransferCommenceRequestMessage, context: HandlerContext) => { - try { - console.log("Received TransferCommenceRequest", req, context); - const sessionData = await this.serverService.checkTransferCommenceRequestMessage(req, this.session); - const message = await this.serverService.transferCommenceResponse(req, this.session); - console.log("Returning response", message); - return message; - } catch (error) { - console.error("Error handling TransferCommenceRequest:", error); - throw new Error("Failed to process TransferCommenceRequest"); - } - } - }); + constructor(ops: SATPHandlerOptions) { + this.session = ops.session; + this.serverService = ops.serverService as Stage1ServerService; + this.clientService = ops.clientService as Stage1ClientService; + this.supportedDLTs = ops.supportedDLTs; + this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); + this.logger.trace(`Initialized ${Stage1SATPHandler.CLASS_NAME}`); } getHandlerIdentifier(): string { - return "Stage1SATPHandler"; + return Stage1SATPHandler.CLASS_NAME; + } + + async TransferProposalImplementation( + req: TransferProposalRequestMessage, + ): Promise { + try { + console.log("Received TransferProposalRequest", req); + const sessionData = + await this.serverService.checkTransferProposalRequestMessage( + req, + this.session, + this.supportedDLTs, + ); + const message = await this.serverService.transferProposalResponse( + req, + this.session, + ); + console.log("message", message); + console.log("Returning response", sessionData); + const response = new TransferProposalReceiptMessage(); + return response; + } catch (error) { + console.error("Error handling TransferProposalRequest:", error); + throw new Error("Failed to process TransferProposalRequest"); + } + } + + async TransferCommenceImplementation( + req: TransferCommenceRequestMessage, + ): Promise { + try { + console.log("Received TransferCommenceRequest", req); + const sessionData = + await this.serverService.checkTransferCommenceRequestMessage( + req, + this.session, + ); + const message = await this.serverService.transferCommenceResponse( + req, + this.session, + ); + console.log("Returning response", message); + console.log("Returning response", sessionData); + const response = new TransferProposalReceiptMessage(); + return response; + } catch (error) { + console.error("Error handling TransferCommenceRequest:", error); + throw new Error("Failed to process TransferCommenceRequest"); + } + } + + setupRouter(router: ConnectRouter): void { + router.service(SatpStage1Service, { + transferProposal: this.TransferProposalImplementation, + transferCommence: this.TransferCommenceImplementation, + }); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index e421fee9a6..9159b4eef2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -1,3 +1,4 @@ +/* import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; import { LockAssertionRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; @@ -7,9 +8,15 @@ import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; import { SATPSession } from "../satp-session"; import { ServiceType } from "@bufbuild/protobuf"; -import { SupportedGatewayImplementations } from "../types"; - -export const Stage2Handler = (session: SATPSession, service: Stage2ServerService, connectClients: ServiceType[], supportedDLTs: SupportedGatewayImplementations[]) => +import { SupportedChain } from "../types"; + +export const Stage2Handler = + ( + session: SATPSession, + service: Stage2ServerService, + connectClients: ServiceType[], + supportedDLTs: SupportedChain[], + ) => (router: ConnectRouter) => router.service(SatpStage2Service, { async lockAssertion( @@ -48,3 +55,4 @@ export const Stage2Handler = (session: SATPSession, service: Stage2ServerService return message; }, }); +*/ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index b5c91b4db0..d967e99a33 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -1,3 +1,4 @@ +/* import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; import { @@ -11,9 +12,15 @@ import { SATPGateway } from "../../plugin-satp-hermes-gateway"; import { TimestampType, saveTimestamp } from "../session-utils"; import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; import { SATPSession } from "../satp-session"; -import { SupportedGatewayImplementations } from "../types"; - -export const Stage3Handler = (session: SATPSession, service: Stage3ServerService, connectClients: ServiceType[], supportedDLTs: SupportedGatewayImplementations[]) => +import { SupportedChain } from "../types"; + +export const Stage3Handler = + ( + session: SATPSession, + service: Stage3ServerService, + connectClients: ServiceType[], + supportedDLTs: SupportedChain[], + ) => (router: ConnectRouter) => router.service(SatpStage3Service, { async commitPreparation( @@ -108,3 +115,4 @@ export const Stage3Handler = (session: SATPSession, service: Stage3ServerService return new Empty({}); }, }); +*/ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 105fd216e5..1d8b10cf26 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -1,5 +1,3 @@ -import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { TransferCommenceRequestMessage, TransferProposalRequestMessage, @@ -16,7 +14,6 @@ import { bufArray2HexStr, getHash, sign, - storeLog, verifySignature, } from "../../../gateway-utils"; import { @@ -25,50 +22,39 @@ import { saveSignature, checkSessionData, } from "../../session-utils"; -import { SupportedGatewayImplementations } from "../../types"; +import { SupportedChain } from "../../types"; import { SATPSession } from "../../../core/satp-session"; -import { SATPService, ISATPClientServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; - -export class Stage1ClientService implements SATPService { - public static readonly CLASS_NAME = "client-service"; - public static readonly SATP_STAGE = "stage-1"; - public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; - private _log: Logger; - private signer: JsObjectSigner; - - constructor(ops: ISATPClientServiceOptions) { - const level = ops.logLevel || "INFO"; - const label = this.getServiceIdentifier(); - this._log = LoggerProvider.getOrCreate({ level, label }); - this.signer = ops.signer; - } - - public get className(): string { - return Stage1ClientService.CLASS_NAME; - } - - public get stage(): string { - return Stage1ClientService.SATP_STAGE; - } - - public get log(): Logger { - return this._log; - } +import { + SATPService, + SATPServiceType, + ISATPClientServiceOptions, + ISATPServiceOptions, +} from "../satp-service"; - public get serviceType(): SATPServiceType { - return SATPServiceType.Client; - } +export class Stage1ClientService extends SATPService { + public static readonly SATP_STAGE = "1"; + public static readonly SERVICE_TYPE = SATPServiceType.Client; - public getServiceIdentifier(): string { - return `${this.className}#${this.serviceType}`; + constructor(ops: ISATPClientServiceOptions) { + // for now stage1serverservice does not have any different options than the SATPService class + + const commonOptions: ISATPServiceOptions = { + stage: Stage1ClientService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage1ClientService.SERVICE_TYPE, + }; + super(commonOptions); } async transferProposalRequest( sessionID: string, session: SATPSession, - supportedDLTs: SupportedGatewayImplementations[], + supportedDLTs: SupportedChain[], ): Promise { - const fnTag = `${this.className}#transferProposalRequest()`; + const stepTag = `transferProposalRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; const sessionData = session.getSessionData(); @@ -77,7 +63,9 @@ export class Stage1ClientService implements SATPService { } if ( - !supportedDLTs.includes(sessionData.senderGatewayNetworkId as SupportedGatewayImplementations) + !supportedDLTs.includes( + sessionData.senderGatewayNetworkId as SupportedChain, + ) ) { throw new Error( //todo change this to the transferClaims check `${fnTag}, recipient gateway dlt system is not supported by this gateway`, @@ -135,29 +123,29 @@ export class Stage1ClientService implements SATPService { networkCapabilities.accessControlProfile = sessionData.accessControlProfile; if (sessionData.permissions != undefined) { - this.log.info(`${fnTag}, Optional variable loaded: permissions...`); + this.Log.info(`${fnTag}, Optional variable loaded: permissions...`); networkCapabilities.permissions = sessionData.permissions; } if (sessionData.developerUrn != undefined) { - this.log.info(`${fnTag}, Optional variable loaded: developerUrn...`); + this.Log.info(`${fnTag}, Optional variable loaded: developerUrn...`); networkCapabilities.developerUrn = sessionData.developerUrn; } if (sessionData.applicationProfile != undefined) { - this.log.info( + this.Log.info( `${fnTag}, Optional variable loaded: applicationProfile...`, ); networkCapabilities.applicationProfile = sessionData.applicationProfile; } if (sessionData.subsequentCalls != undefined) { - this.log.info(`${fnTag}, Optional variable loaded: subsequentCalls...`); + this.Log.info(`${fnTag}, Optional variable loaded: subsequentCalls...`); networkCapabilities.subsequentCalls = sessionData.subsequentCalls; } if (sessionData.history != undefined) { - this.log.info(`${fnTag}, Optional variable loaded: history...`); + this.Log.info(`${fnTag}, Optional variable loaded: history...`); networkCapabilities.history = sessionData.history; } @@ -167,21 +155,21 @@ export class Stage1ClientService implements SATPService { transferProposalRequestMessage.networkCapabilities = networkCapabilities; if (sessionData.transferClaimsFormat != undefined) { - this.log.info( + this.Log.info( `${fnTag}, Optional variable loaded: transferInitClaimsFormat...`, ); transferProposalRequestMessage.transferInitClaimsFormat = sessionData.transferClaimsFormat; } if (sessionData.multipleCancelsAllowed != undefined) { - this.log.info( + this.Log.info( `${fnTag}, Optional variable loaded: multipleCancelsAllowed...`, ); transferProposalRequestMessage.multipleCancelsAllowed = sessionData.multipleCancelsAllowed; } if (sessionData.multipleClaimsAllowed != undefined) { - this.log.info( + this.Log.info( `${fnTag}, Optional variable loaded: multipleClaimsAllowed...`, ); transferProposalRequestMessage.multipleClaimsAllowed = @@ -189,10 +177,7 @@ export class Stage1ClientService implements SATPService { } const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(transferProposalRequestMessage), - ), + sign(this.Signer, JSON.stringify(transferProposalRequestMessage)), ); transferProposalRequestMessage.common.signature = messageSignature; @@ -213,7 +198,7 @@ export class Stage1ClientService implements SATPService { data: JSON.stringify(sessionData), }); */ - this.log.info(`${fnTag}, sending TransferProposalRequest...`); + this.Log.info(`${fnTag}, sending TransferProposalRequest...`); return transferProposalRequestMessage; } @@ -222,7 +207,8 @@ export class Stage1ClientService implements SATPService { response: TransferProposalReceiptMessage, session: SATPSession, ): Promise { - const fnTag = `${this.className}#transferCommenceRequest()`; + const stepTag = `transferCommenceRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; if (!response || !response.common) { throw new Error("Response or response.common is undefined"); @@ -259,10 +245,7 @@ export class Stage1ClientService implements SATPService { // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(transferCommenceRequestMessage), - ), + sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), ); transferCommenceRequestMessage.common.signature = messageSignature; @@ -287,7 +270,7 @@ export class Stage1ClientService implements SATPService { data: JSON.stringify(sessionData), }); */ - this.log.info(`${fnTag}, sending TransferCommenceRequest...`); + this.Log.info(`${fnTag}, sending TransferCommenceRequest...`); return transferCommenceRequestMessage; } @@ -296,8 +279,8 @@ export class Stage1ClientService implements SATPService { response: TransferProposalReceiptMessage, session: SATPSession, ): Promise { - const fnTag = `${this.className}#checkTransferProposalReceiptMessage()`; - + const stepTag = `checkTransferProposalReceiptMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; if (response.common == undefined) { throw new Error(`${fnTag}, message has no satp common body`); } @@ -311,7 +294,7 @@ export class Stage1ClientService implements SATPService { throw new Error(`${fnTag}, satp common body is missing required fields`); } - const sessionId = response.common.sessionId; + // const sessionId = response.common.sessionId; const sessionData = session.getSessionData(); @@ -377,11 +360,7 @@ export class Stage1ClientService implements SATPService { } if ( - !verifySignature( - this.signer, - response, - sessionData.serverGatewayPubkey, - ) + !verifySignature(this.Signer, response, sessionData.serverGatewayPubkey) ) { throw new Error( `${fnTag}, TransferProposalReceipt message signature verification failed`, @@ -398,27 +377,29 @@ export class Stage1ClientService implements SATPService { response.common.messageType == MessageType.INIT_REJECT && response.transferCounterClaims != undefined ) { - if (this.checkProposedTransferClaims(response.transferCounterClaims)) { + if ( + await this.checkProposedTransferClaims(response.transferCounterClaims) + ) { sessionData.proposedTransferInitClaims = getHash( response.transferCounterClaims, ); return true; } else { - this.log.info( + this.Log.info( `TransferProposalReceipt proposedTransferClaims were rejected`, ); sessionData.completed = true; return false; } } - this.log.info(`TransferProposalReceipt passed all checks.`); + this.Log.info(`TransferProposalReceipt passed all checks.`); return true; } - private checkProposedTransferClaims( + async checkProposedTransferClaims( // eslint-disable-next-line @typescript-eslint/no-unused-vars counterTransfer: TransferClaims, - ): boolean { + ): Promise { //const fnTag = `${this.className}#checkCounterTransferClaims()`; //todo return true; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 56603fb305..9cbdce756e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -1,226 +1,233 @@ -import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; -import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -import { SATP_VERSION } from "../../constants"; -import { - CommonSatp, - MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -import { - bufArray2HexStr, - getHash, - sign, - storeLog, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPSession } from "../../../core/satp-session"; -import { SATPService, ISATPClientServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; - -export class Stage2ClientService implements SATPService { - public static readonly CLASS_NAME = "client-service"; - public static readonly SATP_STAGE = "stage-2"; - public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; - - private _log: Logger; - private signer: JsObjectSigner; - - constructor(ops: ISATPClientServiceOptions) { - const level = ops.logLevel || "INFO"; - const label = this.getServiceIdentifier(); - this._log = LoggerProvider.getOrCreate({ level, label }); - this.signer = ops.signer; - } - - public get className(): string { - return Stage2ClientService.CLASS_NAME; - } - - public get stage(): string { - return Stage2ClientService.SATP_STAGE; - } - - public get log(): Logger { - return this._log; - } - - public get serviceType(): SATPServiceType { - return SATPServiceType.Client; - } - - public getServiceIdentifier(): string { - return `${this.className}#${this.serviceType}`; - } - - async lockAssertionRequest( - response: TransferCommenceResponseMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#lockAssertionRequest()`; - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); - - const commonBody = new CommonSatp(); - commonBody.version = sessionData.version; - commonBody.messageType = MessageType.LOCK_ASSERT; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.TRANSFER_COMMENCE_RESPONSE, - ); - - commonBody.sessionId = response.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const lockAssertionRequestMessage = new LockAssertionRequestMessage(); - lockAssertionRequestMessage.common = commonBody; - - lockAssertionRequestMessage.lockAssertionClaim = - sessionData.lockAssertionClaim; - lockAssertionRequestMessage.lockAssertionFormat = - sessionData.lockAssertionFormat; - - const messageSignature = bufArray2HexStr( - sign(this.signer, JSON.stringify(lockAssertionRequestMessage)), - ); - - lockAssertionRequestMessage.common.signature = messageSignature; - - saveSignature(sessionData, MessageType.LOCK_ASSERT, messageSignature); - - saveHash( - sessionData, - MessageType.LOCK_ASSERT, - getHash(lockAssertionRequestMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "lockAssertionRequest", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - this.log.info(`${fnTag}, sending LockAssertionMessage...`); - - return lockAssertionRequestMessage; - } - - - checkTransferCommenceResponseMessage( - response: TransferCommenceResponseMessage, - session: SATPSession, - ): void { - const fnTag = `${this.className}#lockAssertionRequestMessage()`; - - if ( - response.common == undefined || - response.common.version == undefined || - response.common.messageType == undefined || - response.common.sessionId == undefined || - // request.common.transferContextId == undefined || - response.common.sequenceNumber == undefined || - response.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || - response.common.signature == undefined || - response.common.clientGatewayPubkey == undefined || - response.common.serverGatewayPubkey == undefined - ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not load correctly`); - } - - if ( - response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, - ); - } - - if ( - response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !verifySignature( - this.signer, - response.common, - response.common.serverGatewayPubkey, - ) - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse message signature verification failed`, - ); - } - - if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceResponse `, - ); - } - - if ( - response.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse sequence number is wrong`, - ); - } - - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) - ) { - throw new Error( - `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, - ); - } - - this.log.info(`TransferCommenceResponse passed all checks.`); - } -} +// import { +// JsObjectSigner, +// Logger, +// LoggerProvider, +// } from "@hyperledger/cactus-common"; +// import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; +// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; +// import { SATP_VERSION } from "../../constants"; +// import { +// CommonSatp, +// MessageType, +// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +// import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +// import { +// bufArray2HexStr, +// getHash, +// sign, +// storeLog, +// verifySignature, +// } from "../../../gateway-utils"; +// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +// import { SATPSession } from "../../../core/satp-session"; +// import { +// SATPService, +// ISATPClientServiceOptions, +// SATPServiceType, +// } from "../../../types/satp-protocol"; + +// export class Stage2ClientService implements SATPService { +// public static readonly CLASS_NAME = "client-service"; +// public static readonly SATP_STAGE = "stage-2"; +// public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; + +// private _log: Logger; +// private signer: JsObjectSigner; + +// constructor(ops: ISATPClientServiceOptions) { +// const level = ops.logLevel || "INFO"; +// const label = this.getServiceIdentifier(); +// this._log = LoggerProvider.getOrCreate({ level, label }); +// this.signer = ops.signer; +// } + +// public get className(): string { +// return Stage2ClientService.CLASS_NAME; +// } + +// public get stage(): string { +// return Stage2ClientService.SATP_STAGE; +// } + +// public get log(): Logger { +// return this._log; +// } + +// public get serviceType(): SATPServiceType { +// return SATPServiceType.Client; +// } + +// public getServiceIdentifier(): string { +// return `${this.className}#${this.serviceType}`; +// } + +// async lockAssertionRequest( +// response: TransferCommenceResponseMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#lockAssertionRequest()`; +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); + +// const commonBody = new CommonSatp(); +// commonBody.version = sessionData.version; +// commonBody.messageType = MessageType.LOCK_ASSERT; +// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.TRANSFER_COMMENCE_RESPONSE, +// ); + +// commonBody.sessionId = response.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const lockAssertionRequestMessage = new LockAssertionRequestMessage(); +// lockAssertionRequestMessage.common = commonBody; + +// lockAssertionRequestMessage.lockAssertionClaim = +// sessionData.lockAssertionClaim; +// lockAssertionRequestMessage.lockAssertionFormat = +// sessionData.lockAssertionFormat; + +// const messageSignature = bufArray2HexStr( +// sign(this.signer, JSON.stringify(lockAssertionRequestMessage)), +// ); + +// lockAssertionRequestMessage.common.signature = messageSignature; + +// saveSignature(sessionData, MessageType.LOCK_ASSERT, messageSignature); + +// saveHash( +// sessionData, +// MessageType.LOCK_ASSERT, +// getHash(lockAssertionRequestMessage), +// ); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "lockAssertionRequest", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ +// this.log.info(`${fnTag}, sending LockAssertionMessage...`); + +// return lockAssertionRequestMessage; +// } + +// checkTransferCommenceResponseMessage( +// response: TransferCommenceResponseMessage, +// session: SATPSession, +// ): void { +// const fnTag = `${this.className}#lockAssertionRequestMessage()`; + +// if ( +// response.common == undefined || +// response.common.version == undefined || +// response.common.messageType == undefined || +// response.common.sessionId == undefined || +// // request.common.transferContextId == undefined || +// response.common.sequenceNumber == undefined || +// response.common.resourceUrl == undefined || +// // request.common.actionResponse == undefined || +// // request.common.payloadProfile == undefined || +// // request.common.applicationProfile == undefined || +// response.common.signature == undefined || +// response.common.clientGatewayPubkey == undefined || +// response.common.serverGatewayPubkey == undefined +// ) { +// throw new Error( +// `${fnTag}, message satp common body is missing or is missing required fields`, +// ); +// } + +// if (response.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, unsupported SATP version`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.serverGatewayPubkey == undefined || +// sessionData.lastSequenceNumber == undefined +// ) { +// throw new Error(`${fnTag}, session data was not load correctly`); +// } + +// if ( +// response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey +// ) { +// throw new Error( +// `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, +// ); +// } + +// if ( +// response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey +// ) { +// throw new Error( +// `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, +// ); +// } + +// if ( +// !verifySignature( +// this.signer, +// response.common, +// response.common.serverGatewayPubkey, +// ) +// ) { +// throw new Error( +// `${fnTag}, TransferCommenceResponse message signature verification failed`, +// ); +// } + +// if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { +// throw new Error( +// `${fnTag}, wrong message type for TransferCommenceResponse `, +// ); +// } + +// if ( +// response.common.sequenceNumber != +// sessionData.lastSequenceNumber + BigInt(1) +// ) { +// throw new Error( +// `${fnTag}, TransferCommenceResponse sequence number is wrong`, +// ); +// } + +// if ( +// response.common.hashPreviousMessage != +// getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) +// ) { +// throw new Error( +// `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, +// ); +// } + +// this.log.info(`TransferCommenceResponse passed all checks.`); +// } +// } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 8b6fdc41ca..e407e98d5e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -1,517 +1,516 @@ -import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -import { - CommonSatp, - MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SATP_VERSION } from "../../constants"; -import { - CommitFinalAcknowledgementReceiptResponseMessage, - CommitFinalAssertionRequestMessage, - CommitPreparationRequestMessage, - CommitReadyResponseMessage, - TransferCompleteRequestMessage, -} from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; -import { - bufArray2HexStr, - getHash, - sign, - storeLog, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPService, ISATPClientServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; -import { SATPSession } from "../../satp-session"; -import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; - -export class Stage3ClientService implements SATPService { - public static readonly CLASS_NAME = "client-service"; - public static readonly SATP_STAGE = "stage-3"; - public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; - - private _log: Logger; - private signer: JsObjectSigner; - - constructor(ops: ISATPClientServiceOptions) { - const level = ops.logLevel || "INFO"; - const label = this.getServiceIdentifier(); - this._log = LoggerProvider.getOrCreate({ level, label }); - this.signer = ops.signer; - } - - public get className(): string { - return Stage3ClientService.CLASS_NAME; - } - - public get stage(): string { - return Stage3ClientService.SATP_STAGE; - } - - public get log(): Logger { - return this._log; - } - - public get serviceType(): SATPServiceType { - return SATPServiceType.Client; - } - - public getServiceIdentifier(): string { - return `${this.className}#${this.serviceType}`; - } - - async commitPreparation( - response: LockAssertionReceiptMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#commitPreparation()`; - - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); - - const commonBody = new CommonSatp(); - commonBody.version = SATP_VERSION; - commonBody.messageType = MessageType.COMMIT_PREPARE; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.ASSERTION_RECEIPT, - ); - commonBody.sessionId = response.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const commitPreparationRequestMessage = - new CommitPreparationRequestMessage(); - commitPreparationRequestMessage.common = commonBody; - - const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(commitPreparationRequestMessage), - ), - ); - - commitPreparationRequestMessage.common.signature = messageSignature; - - saveSignature(sessionData, MessageType.COMMIT_PREPARE, messageSignature); - - saveHash( - sessionData, - MessageType.COMMIT_PREPARE, - getHash(commitPreparationRequestMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "commitPreparation", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - - this.log.info(`${fnTag}, sending CommitPreparationMessage...`); - - return commitPreparationRequestMessage; - } - - async commitFinalAssertion( - response: CommitReadyResponseMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#commitPreparation()`; - - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); - - const commonBody = new CommonSatp(); - commonBody.version = SATP_VERSION; - commonBody.messageType = MessageType.COMMIT_FINAL; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.COMMIT_READY, - ); - - commonBody.sessionId = response.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const commitFinalAssertionRequestMessage = - new CommitFinalAssertionRequestMessage(); - commitFinalAssertionRequestMessage.common = commonBody; - - commitFinalAssertionRequestMessage.burnAssertionClaim = - sessionData.burnAssertionClaim; - commitFinalAssertionRequestMessage.burnAssertionClaimFormat = - sessionData.burnAssertionClaimFormat; - - const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(commitFinalAssertionRequestMessage), - ), - ); - - commitFinalAssertionRequestMessage.common.signature = messageSignature; - - saveSignature(sessionData, MessageType.COMMIT_FINAL, messageSignature); - - saveHash( - sessionData, - MessageType.COMMIT_FINAL, - getHash(commitFinalAssertionRequestMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "commitFinalAssertion", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - this.log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); - - return commitFinalAssertionRequestMessage; - } - - async transferComplete( - response: CommitFinalAcknowledgementReceiptResponseMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#transferComplete()`; - - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); - - const commonBody = new CommonSatp(); - commonBody.version = SATP_VERSION; - commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.ACK_COMMIT_FINAL, - ); - - commonBody.sessionId = response.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); - transferCompleteRequestMessage.common = commonBody; - - transferCompleteRequestMessage.hashTransferCommence = getMessageHash( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - ); - - const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(transferCompleteRequestMessage), - ), - ); - - transferCompleteRequestMessage.common.signature = messageSignature; - - saveSignature( - sessionData, - MessageType.COMMIT_TRANSFER_COMPLETE, - messageSignature, - ); - - saveHash( - sessionData, - MessageType.COMMIT_TRANSFER_COMPLETE, - getHash(transferCompleteRequestMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "transferComplete", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - - this.log.info(`${fnTag}, sending TransferCompleteMessage...`); - - return transferCompleteRequestMessage; - } - - checkLockAssertionReceiptMessage( - response: LockAssertionReceiptMessage, - session: SATPSession, - ): void { - const fnTag = `${this.className}#checkLockAssertionReceiptMessage()`; - - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { - throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - response.common.sequenceNumber - ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); - } - - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.LOCK_ASSERT) - ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); - } - - if ( - sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey - ) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); - } - - if ( - sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey - ) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); - } - - if ( - !verifySignature( - this.signer, - response.common, - response.common.serverGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, message signature verification failed`); - } - - this.log.info(`LockAssertionReceiptMessage passed all checks.`); - } - - checkCommitReadyResponseMessage( - response: CommitReadyResponseMessage, - session: SATPSession, - ): void { - const fnTag = `${this.className}#checkCommitReadyResponseMessage()`; - - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (response.common.messageType != MessageType.COMMIT_READY) { - throw new Error(`${fnTag}, message type is not COMMIT_READY`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - response.common.sequenceNumber - ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); - } - - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.COMMIT_PREPARE) - ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); - } - - if ( - sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey - ) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); - } - - if ( - sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey - ) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); - } - - if ( - !verifySignature( - this.signer, - response.common, - response.common.serverGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, message signature verification failed`); - } - - if (response.mintAssertionClaims == undefined) { - //todo - throw new Error(`${fnTag}, mintAssertionClaims is missing`); - } - - this.log.info(`CommitReadyResponseMessage passed all checks.`); - } - - checkCommitFinalAcknowledgementReceiptResponseMessage( - response: CommitFinalAcknowledgementReceiptResponseMessage, - session: SATPSession, - ): void { - const fnTag = `${this.className}#checkCommitFinalAcknowledgementReceiptResponseMessage()`; - - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { - throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - response.common.sequenceNumber - ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); - } - - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.COMMIT_FINAL) - ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); - } - - if ( - sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey - ) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); - } - - if ( - sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey - ) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); - } - - if ( - !verifySignature( - this.signer, - response.common, - response.common.serverGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, message signature verification failed`); - } - - if (response.assignmentAssertionClaim == undefined) { - throw new Error(`${fnTag}, assignmentAssertionClaim is missing`); - } - - this.log.info( - `CommitFinalAcknowledgementReceiptResponseMessage passed all checks.`, - ); - } -} +// import { +// JsObjectSigner, +// Logger, +// LoggerProvider, +// } from "@hyperledger/cactus-common"; +// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; +// import { +// CommonSatp, +// MessageType, +// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +// import { SATP_VERSION } from "../../constants"; +// import { +// CommitFinalAcknowledgementReceiptResponseMessage, +// CommitFinalAssertionRequestMessage, +// CommitPreparationRequestMessage, +// CommitReadyResponseMessage, +// TransferCompleteRequestMessage, +// } from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +// import { +// bufArray2HexStr, +// getHash, +// sign, +// storeLog, +// verifySignature, +// } from "../../../gateway-utils"; +// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +// import { +// SATPService, +// ISATPClientServiceOptions, +// SATPServiceType, +// } from "../../../types/satp-protocol"; +// import { SATPSession } from "../../satp-session"; +// import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; + +// export class Stage3ClientService implements SATPService { +// public static readonly CLASS_NAME = "client-service"; +// public static readonly SATP_STAGE = "stage-3"; +// public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; + +// private _log: Logger; +// private signer: JsObjectSigner; + +// constructor(ops: ISATPClientServiceOptions) { +// const level = ops.logLevel || "INFO"; +// const label = this.getServiceIdentifier(); +// this._log = LoggerProvider.getOrCreate({ level, label }); +// this.signer = ops.signer; +// } + +// public get className(): string { +// return Stage3ClientService.CLASS_NAME; +// } + +// public get stage(): string { +// return Stage3ClientService.SATP_STAGE; +// } + +// public get log(): Logger { +// return this._log; +// } + +// public get serviceType(): SATPServiceType { +// return SATPServiceType.Client; +// } + +// public getServiceIdentifier(): string { +// return `${this.className}#${this.serviceType}`; +// } + +// async commitPreparation( +// response: LockAssertionReceiptMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#commitPreparation()`; + +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); + +// const commonBody = new CommonSatp(); +// commonBody.version = SATP_VERSION; +// commonBody.messageType = MessageType.COMMIT_PREPARE; +// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.ASSERTION_RECEIPT, +// ); +// commonBody.sessionId = response.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const commitPreparationRequestMessage = +// new CommitPreparationRequestMessage(); +// commitPreparationRequestMessage.common = commonBody; + +// const messageSignature = bufArray2HexStr( +// sign(this.signer, JSON.stringify(commitPreparationRequestMessage)), +// ); + +// commitPreparationRequestMessage.common.signature = messageSignature; + +// saveSignature(sessionData, MessageType.COMMIT_PREPARE, messageSignature); + +// saveHash( +// sessionData, +// MessageType.COMMIT_PREPARE, +// getHash(commitPreparationRequestMessage), +// ); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "commitPreparation", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ + +// this.log.info(`${fnTag}, sending CommitPreparationMessage...`); + +// return commitPreparationRequestMessage; +// } + +// async commitFinalAssertion( +// response: CommitReadyResponseMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#commitPreparation()`; + +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); + +// const commonBody = new CommonSatp(); +// commonBody.version = SATP_VERSION; +// commonBody.messageType = MessageType.COMMIT_FINAL; +// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.COMMIT_READY, +// ); + +// commonBody.sessionId = response.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const commitFinalAssertionRequestMessage = +// new CommitFinalAssertionRequestMessage(); +// commitFinalAssertionRequestMessage.common = commonBody; + +// commitFinalAssertionRequestMessage.burnAssertionClaim = +// sessionData.burnAssertionClaim; +// commitFinalAssertionRequestMessage.burnAssertionClaimFormat = +// sessionData.burnAssertionClaimFormat; + +// const messageSignature = bufArray2HexStr( +// sign(this.signer, JSON.stringify(commitFinalAssertionRequestMessage)), +// ); + +// commitFinalAssertionRequestMessage.common.signature = messageSignature; + +// saveSignature(sessionData, MessageType.COMMIT_FINAL, messageSignature); + +// saveHash( +// sessionData, +// MessageType.COMMIT_FINAL, +// getHash(commitFinalAssertionRequestMessage), +// ); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "commitFinalAssertion", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ +// this.log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); + +// return commitFinalAssertionRequestMessage; +// } + +// async transferComplete( +// response: CommitFinalAcknowledgementReceiptResponseMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#transferComplete()`; + +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); + +// const commonBody = new CommonSatp(); +// commonBody.version = SATP_VERSION; +// commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; +// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.ACK_COMMIT_FINAL, +// ); + +// commonBody.sessionId = response.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); +// transferCompleteRequestMessage.common = commonBody; + +// transferCompleteRequestMessage.hashTransferCommence = getMessageHash( +// sessionData, +// MessageType.TRANSFER_COMMENCE_REQUEST, +// ); + +// const messageSignature = bufArray2HexStr( +// sign(this.signer, JSON.stringify(transferCompleteRequestMessage)), +// ); + +// transferCompleteRequestMessage.common.signature = messageSignature; + +// saveSignature( +// sessionData, +// MessageType.COMMIT_TRANSFER_COMPLETE, +// messageSignature, +// ); + +// saveHash( +// sessionData, +// MessageType.COMMIT_TRANSFER_COMPLETE, +// getHash(transferCompleteRequestMessage), +// ); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "transferComplete", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ + +// this.log.info(`${fnTag}, sending TransferCompleteMessage...`); + +// return transferCompleteRequestMessage; +// } + +// checkLockAssertionReceiptMessage( +// response: LockAssertionReceiptMessage, +// session: SATPSession, +// ): void { +// const fnTag = `${this.className}#checkLockAssertionReceiptMessage()`; + +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// if (response.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); +// } + +// if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { +// throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber == undefined || +// sessionData.version == undefined +// ) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber + BigInt(1) != +// response.common.sequenceNumber +// ) { +// throw new Error(`${fnTag}, sequenceNumber does not match`); +// } + +// if ( +// response.common.hashPreviousMessage != +// getMessageHash(sessionData, MessageType.LOCK_ASSERT) +// ) { +// throw new Error(`${fnTag}, hashPreviousMessage does not match`); +// } + +// if ( +// sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey +// ) { +// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); +// } + +// if ( +// sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey +// ) { +// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); +// } + +// if ( +// !verifySignature( +// this.signer, +// response.common, +// response.common.serverGatewayPubkey, +// ) +// ) { +// throw new Error(`${fnTag}, message signature verification failed`); +// } + +// this.log.info(`LockAssertionReceiptMessage passed all checks.`); +// } + +// checkCommitReadyResponseMessage( +// response: CommitReadyResponseMessage, +// session: SATPSession, +// ): void { +// const fnTag = `${this.className}#checkCommitReadyResponseMessage()`; + +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// if (response.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); +// } + +// if (response.common.messageType != MessageType.COMMIT_READY) { +// throw new Error(`${fnTag}, message type is not COMMIT_READY`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber == undefined || +// sessionData.version == undefined +// ) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber + BigInt(1) != +// response.common.sequenceNumber +// ) { +// throw new Error(`${fnTag}, sequenceNumber does not match`); +// } + +// if ( +// response.common.hashPreviousMessage != +// getMessageHash(sessionData, MessageType.COMMIT_PREPARE) +// ) { +// throw new Error(`${fnTag}, hashPreviousMessage does not match`); +// } + +// if ( +// sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey +// ) { +// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); +// } + +// if ( +// sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey +// ) { +// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); +// } + +// if ( +// !verifySignature( +// this.signer, +// response.common, +// response.common.serverGatewayPubkey, +// ) +// ) { +// throw new Error(`${fnTag}, message signature verification failed`); +// } + +// if (response.mintAssertionClaims == undefined) { +// //todo +// throw new Error(`${fnTag}, mintAssertionClaims is missing`); +// } + +// this.log.info(`CommitReadyResponseMessage passed all checks.`); +// } + +// checkCommitFinalAcknowledgementReceiptResponseMessage( +// response: CommitFinalAcknowledgementReceiptResponseMessage, +// session: SATPSession, +// ): void { +// const fnTag = `${this.className}#checkCommitFinalAcknowledgementReceiptResponseMessage()`; + +// if (response.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// if (response.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); +// } + +// if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { +// throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber == undefined || +// sessionData.version == undefined +// ) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber + BigInt(1) != +// response.common.sequenceNumber +// ) { +// throw new Error(`${fnTag}, sequenceNumber does not match`); +// } + +// if ( +// response.common.hashPreviousMessage != +// getMessageHash(sessionData, MessageType.COMMIT_FINAL) +// ) { +// throw new Error(`${fnTag}, hashPreviousMessage does not match`); +// } + +// if ( +// sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey +// ) { +// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); +// } + +// if ( +// sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey +// ) { +// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); +// } + +// if ( +// !verifySignature( +// this.signer, +// response.common, +// response.common.serverGatewayPubkey, +// ) +// ) { +// throw new Error(`${fnTag}, message signature verification failed`); +// } + +// if (response.assignmentAssertionClaim == undefined) { +// throw new Error(`${fnTag}, assignmentAssertionClaim is missing`); +// } + +// this.log.info( +// `CommitFinalAcknowledgementReceiptResponseMessage passed all checks.`, +// ); +// } +// } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts index 6bd6a18bab..16d6ca7673 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -1,7 +1,12 @@ // this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). // should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output +import { SATPLedgerConnector } from "../../../types/blockchain-interaction"; + export abstract class SATPBridgeManager { + // Instantiate connectors based on supported implementations, at bridge level + private connectors: SATPLedgerConnector[] = []; + public abstract lockAsset( sessionId: string, assetId: string, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts new file mode 100644 index 0000000000..b20d70fdac --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts @@ -0,0 +1,69 @@ +import { + JsObjectSigner, + Logger, + LoggerProvider, + ILoggerOptions, +} from "@hyperledger/cactus-common"; + +export enum SATPServiceType { + Server, + Client, +} + +export type ISATPServiceOptions = { + serviceName: string; + stage: "0" | "1" | "2" | "3"; + loggerOptions: ILoggerOptions; + signer: JsObjectSigner; + serviceType: SATPServiceType; +}; + +export type ISATPServerServiceOptions = ISATPServiceOptions; + +export type ISATPClientServiceOptions = ISATPServiceOptions; + +/** + * Interface for SATP Services. + * Each service implementing this interface must provide one or more function(s) to handle specific stages of the SATP protocol. + * Implementations should ensure compliance with the defined asynchronous patterns essential for SATP protocol interactions. + */ +export abstract class SATPService { + readonly stage: string; + readonly logger: Logger; + readonly serviceType: SATPServiceType; + private readonly signer: JsObjectSigner; + readonly serviceName: string; + + constructor(ops: ISATPServiceOptions) { + this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); + this.serviceName = ops.serviceName; + this.serviceType = ops.serviceType; + this.stage = ops.stage; + this.signer = ops.signer; + this.logger.trace(`Signer logger level: ${this.signer.options.logLevel}`); + } + + public getServiceIdentifier(): string { + return `${this.serviceType}#${this.stage}`; + } + + public get Stage(): string { + return this.stage; + } + + public get Log(): Logger { + return this.logger; + } + + public get ServiceType(): SATPServiceType { + return this.serviceType; + } + + public get ServiceName(): string { + return this.serviceName; + } + + public get Signer(): JsObjectSigner { + return this.signer; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index 32e60eb722..e1237ed33b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -1,6 +1,3 @@ -import { IJsObjectSignerOptions, JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; - -import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; import { TransferCommenceResponseMessage, TransferCommenceRequestMessage, @@ -11,16 +8,12 @@ import { MessageType, CommonSatp, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { - ACCEPTANCE, - SessionData, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { SATP_VERSION } from "../../constants"; import { bufArray2HexStr, getHash, sign, - storeLog, verifySignature, } from "../../../gateway-utils"; import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; @@ -32,51 +25,38 @@ import { saveHash, saveSignature, } from "../../session-utils"; -import { SupportedGatewayImplementations } from "../../types"; +import { SupportedChain } from "../../types"; import { SATPSession } from "../../../core/satp-session"; -import { SATPService, ISATPServerServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; - -export class Stage1ServerService implements SATPService { - public static readonly CLASS_NAME = "server-service"; - public static readonly SATP_STAGE = "stage-1"; +import { + SATPService, + SATPServiceType, + ISATPServerServiceOptions, + ISATPServiceOptions, +} from "../satp-service"; + +export class Stage1ServerService extends SATPService { + public static readonly SATP_STAGE = "1"; public static readonly SERVICE_TYPE = SATPServiceType.Server; - private _log: Logger; - private signer: JsObjectSigner; - constructor(ops: ISATPServerServiceOptions) { - const level = ops.logLevel || "INFO"; - const label = this.getServiceIdentifier(); - this._log = LoggerProvider.getOrCreate({ level, label }); - this.signer = ops.signer; - } - - public get className(): string { - return Stage1ServerService.CLASS_NAME; - } - - public get stage(): string { - return Stage1ServerService.SATP_STAGE; - } - - public get log(): Logger { - return this._log; - } - - - public get serviceType(): SATPServiceType { - return SATPServiceType.Server; - } - - public getServiceIdentifier(): string { - return `${this.className}#${this.serviceType}`; + // for now stage1serverservice does not have any different options than the SATPService class + + const commonOptions: ISATPServiceOptions = { + stage: Stage1ServerService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage1ServerService.SERVICE_TYPE, + }; + super(commonOptions); } async transferProposalResponse( request: TransferProposalRequestMessage, session: SATPSession | undefined, ): Promise { - const fnTag = `${this.className}#transferProposalResponse()`; + const stepTag = `transferProposalResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; if ( request.common == undefined || @@ -89,9 +69,7 @@ export class Stage1ServerService implements SATPService { } if (session == undefined) { - throw new Error( - `${fnTag}, session is undefined`, - ); + throw new Error(`${fnTag}, session is undefined`); } const sessionData = session.getSessionData(); @@ -131,8 +109,7 @@ export class Stage1ServerService implements SATPService { MessageType.INIT_PROPOSAL, ); - const transferProposalReceiptMessage = - new TransferProposalReceiptMessage(); + const transferProposalReceiptMessage = new TransferProposalReceiptMessage(); transferProposalReceiptMessage.common = commonBody; transferProposalReceiptMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; @@ -150,7 +127,7 @@ export class Stage1ServerService implements SATPService { ); if (!counterProposalTransferClaims) { - this.log.info(`${fnTag}, ProposalTransferClaims were rejected...`); + this.Log.info(`${fnTag}, ProposalTransferClaims were rejected...`); sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; } else { sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_CONDITIONAL; @@ -164,10 +141,7 @@ export class Stage1ServerService implements SATPService { */ const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(transferProposalReceiptMessage), - ), + sign(this.Signer, JSON.stringify(transferProposalReceiptMessage)), ); transferProposalReceiptMessage.common.signature = messageSignature; @@ -188,8 +162,8 @@ export class Stage1ServerService implements SATPService { operation: "lock", data: JSON.stringify(sessionData), }); - */ - this.log.info(`${fnTag}, sending TransferProposalResponseMessage...`); + */ + this.Log.info(`${fnTag}, sending TransferProposalResponseMessage...`); return transferProposalReceiptMessage; } @@ -198,7 +172,8 @@ export class Stage1ServerService implements SATPService { request: TransferCommenceRequestMessage, session: SATPSession | undefined, ): Promise { - const fnTag = `${this.className}#transferCommenceResponse()`; + const stepTag = `transferCommenceResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; if (request.common == undefined) { throw new Error( @@ -207,9 +182,7 @@ export class Stage1ServerService implements SATPService { } if (session == undefined) { - throw new Error( - `${fnTag}, session is undefined`, - ); + throw new Error(`${fnTag}, session is undefined`); } const sessionData = session.getSessionData(); @@ -245,10 +218,7 @@ export class Stage1ServerService implements SATPService { sessionData.lastSequenceNumber = commonBody.sequenceNumber; const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(transferCommenceResponseMessage), - ), + sign(this.Signer, JSON.stringify(transferCommenceResponseMessage)), ); transferCommenceResponseMessage.common.signature = messageSignature; @@ -273,8 +243,8 @@ export class Stage1ServerService implements SATPService { data: JSON.stringify(sessionData), }); */ - - this.log.info(`${fnTag}, sending TransferCommenceResponseMessage...`); + + this.Log.info(`${fnTag}, sending TransferCommenceResponseMessage...`); return transferCommenceResponseMessage; } @@ -282,9 +252,10 @@ export class Stage1ServerService implements SATPService { async checkTransferProposalRequestMessage( request: TransferProposalRequestMessage, session: SATPSession | undefined, - supportedDLTs: SupportedGatewayImplementations[], + supportedDLTs: SupportedChain[], ): Promise { - const fnTag = `${this.className}#checkTransferProposalRequestMessage()`; + const stepTag = `checkTransferProposalRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; if ( request.common == undefined || @@ -312,7 +283,7 @@ export class Stage1ServerService implements SATPService { if ( !verifySignature( - this.signer, + this.Signer, request.common, request.common.clientGatewayPubkey, ) @@ -339,17 +310,16 @@ export class Stage1ServerService implements SATPService { `${fnTag}, TransferProposalRequest message does not contain network capabilities and parameters`, ); } - const senderId = request.transferInitClaims.senderGatewayNetworkId as SupportedGatewayImplementations; + const senderId = request.transferInitClaims + .senderGatewayNetworkId as SupportedChain; - if ( - !supportedDLTs.includes(senderId) - ) { + if (!supportedDLTs.includes(senderId)) { throw new Error( //todo change this to the transferClaims check `${fnTag}, recipient gateway dlt system is not supported by this gateway`, ); } - this.log.info(`TransferProposalRequest passed all checks.`); + this.Log.info(`TransferProposalRequest passed all checks.`); const sessionData = createSessionData( request.common.sessionId, @@ -371,8 +341,8 @@ export class Stage1ServerService implements SATPService { request.networkCapabilities.accessControlProfile, ); - this.log.info(`Session data created for session id ${sessionData.id}`); - if (!this.checkTransferClaims(request.transferInitClaims)) { + this.Log.info(`Session data created for session id ${sessionData.id}`); + if (!this.checkTransferClaims(request.transferInitClaims)) { throw new Error(); } return sessionData; @@ -382,7 +352,8 @@ export class Stage1ServerService implements SATPService { request: TransferCommenceRequestMessage, session: SATPSession | undefined, ): Promise { - const fnTag = `${this.className}#transferCommenceResponse()`; + const stepTag = `checkTransferCommenceRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; if ( request.common == undefined || @@ -409,9 +380,7 @@ export class Stage1ServerService implements SATPService { } if (session == undefined) { - throw new Error( - `${fnTag}, session is undefined`, - ); + throw new Error(`${fnTag}, session is undefined`); } const sessionData = session.getSessionData(); @@ -446,7 +415,7 @@ export class Stage1ServerService implements SATPService { if ( !verifySignature( - this.signer, + this.Signer, request.common, request.common.clientGatewayPubkey, ) @@ -490,18 +459,14 @@ export class Stage1ServerService implements SATPService { } if ( - !verifySignature( - this.signer, - request, - sessionData.clientGatewayPubkey, - ) + !verifySignature(this.Signer, request, sessionData.clientGatewayPubkey) ) { throw new Error( `${fnTag}, TransferCommenceRequest message signature verification failed`, ); } - this.log.info(`TransferCommenceRequest passed all checks.`); + this.Log.info(`TransferCommenceRequest passed all checks.`); return sessionData; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 359ac37eff..702abebcdb 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -1,226 +1,234 @@ -import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { - LockAssertionReceiptMessage, - LockAssertionRequestMessage, -} from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -import { SATP_VERSION } from "../../constants"; -import { - CommonSatp, - MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { - bufArray2HexStr, - getHash, - sign, - storeLog, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPService, ISATPServerServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; -import { SATPSession } from "../../../core/satp-session"; -export class Stage2ServerService implements SATPService { - public static readonly CLASS_NAME = "server-service"; - public static readonly SATP_STAGE = "stage-2"; - public static readonly SERVICE_TYPE = SATPServiceType.Server; - - private _log: Logger; - private signer: JsObjectSigner; - - constructor(ops: ISATPServerServiceOptions) { - const level = ops.logLevel || "INFO"; - const label = this.getServiceIdentifier(); - this._log = LoggerProvider.getOrCreate({ level, label }); - this.signer = ops.signer; - } - - public get className(): string { - return Stage2ServerService.CLASS_NAME; - } - - public get stage(): string { - return Stage2ServerService.SATP_STAGE; - } - - public get log(): Logger { - return this._log; - } - - public get serviceType(): SATPServiceType { - return SATPServiceType.Server; - } - - public getServiceIdentifier(): string { - return `${this.className}#${this.serviceType}`; - } - - async lockAssertionResponse( - request: LockAssertionRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#lockAssertionResponse()`; - - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); - - const commonBody = new CommonSatp(); - commonBody.version = SATP_VERSION; - commonBody.messageType = MessageType.ASSERTION_RECEIPT; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.LOCK_ASSERT, - ); - commonBody.sessionId = request.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const lockAssertionReceiptMessage = new LockAssertionReceiptMessage(); - lockAssertionReceiptMessage.common = commonBody; - - const messageSignature = bufArray2HexStr( - sign(this.signer, JSON.stringify(lockAssertionReceiptMessage)), - ); - - lockAssertionReceiptMessage.common.signature = messageSignature; - - saveSignature(sessionData, MessageType.ASSERTION_RECEIPT, messageSignature); - - saveHash( - sessionData, - MessageType.ASSERTION_RECEIPT, - getHash(lockAssertionReceiptMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "lockAssertionResponse", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - - this.log.info(`${fnTag}, sending LockAssertionResponseMessage...`); - - return lockAssertionReceiptMessage; - } - - async checkLockAssertionRequestMessage( - request: LockAssertionRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#checkLockAssertionRequestMessage()`; - - if ( - request.common == undefined || - request.common.version == undefined || - request.common.messageType == undefined || - request.common.sessionId == undefined || - // request.common.transferContextId == undefined || - request.common.sequenceNumber == undefined || - request.common.resourceUrl == undefined || - // request.common.actionrequest == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || - request.common.signature == undefined || - request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined - ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not load correctly`); - } - - if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { - throw new Error( - `${fnTag}, LockAssertionRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { - throw new Error( - `${fnTag}, LockAssertionRequest clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !verifySignature( - this.signer, - request.common, - request.common.serverGatewayPubkey, - ) - ) { - throw new Error( - `${fnTag}, LockAssertionRequest message signature verification failed`, - ); - } - - if (request.common.messageType != MessageType.LOCK_ASSERT) { - throw new Error(`${fnTag}, wrong message type for LockAssertionRequest`); - } - - if ( - request.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw new Error( - `${fnTag}, LockAssertionRequest Message sequence number is wrong`, - ); - } - - if ( - request.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) - ) { - throw new Error( - `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, - ); - } - - if ( - request.lockAssertionFormat == undefined || - request.lockAssertionClaim == undefined - ) { - throw new Error( - `${fnTag}, LockAssertionRequest lockAssertionFormat or lockAssertionClaim is missing`, - ); - } - - this.log.info(`LockAssertionRequest passed all checks.`); - return sessionData; - } -} +// import { +// JsObjectSigner, +// Logger, +// LoggerProvider, +// } from "@hyperledger/cactus-common"; +// import { +// LockAssertionReceiptMessage, +// LockAssertionRequestMessage, +// } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; +// import { SATP_VERSION } from "../../constants"; +// import { +// CommonSatp, +// MessageType, +// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +// import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +// import { +// bufArray2HexStr, +// getHash, +// sign, +// storeLog, +// verifySignature, +// } from "../../../gateway-utils"; +// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +// import { +// SATPService, +// ISATPServerServiceOptions, +// SATPServiceType, +// } from "../../../types/satp-protocol"; +// import { SATPSession } from "../../../core/satp-session"; +// export class Stage2ServerService implements SATPService { +// public static readonly CLASS_NAME = "server-service"; +// public static readonly SATP_STAGE = "stage-2"; +// public static readonly SERVICE_TYPE = SATPServiceType.Server; + +// private _log: Logger; +// private signer: JsObjectSigner; + +// constructor(ops: ISATPServerServiceOptions) { +// const level = ops.logLevel || "INFO"; +// const label = this.getServiceIdentifier(); +// this._log = LoggerProvider.getOrCreate({ level, label }); +// this.signer = ops.signer; +// } + +// public get className(): string { +// return Stage2ServerService.CLASS_NAME; +// } + +// public get stage(): string { +// return Stage2ServerService.SATP_STAGE; +// } + +// public get log(): Logger { +// return this._log; +// } + +// public get serviceType(): SATPServiceType { +// return SATPServiceType.Server; +// } + +// public getServiceIdentifier(): string { +// return `${this.className}#${this.serviceType}`; +// } + +// async lockAssertionResponse( +// request: LockAssertionRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#lockAssertionResponse()`; + +// if (request.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${request.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); + +// const commonBody = new CommonSatp(); +// commonBody.version = SATP_VERSION; +// commonBody.messageType = MessageType.ASSERTION_RECEIPT; +// commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.LOCK_ASSERT, +// ); +// commonBody.sessionId = request.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const lockAssertionReceiptMessage = new LockAssertionReceiptMessage(); +// lockAssertionReceiptMessage.common = commonBody; + +// const messageSignature = bufArray2HexStr( +// sign(this.signer, JSON.stringify(lockAssertionReceiptMessage)), +// ); + +// lockAssertionReceiptMessage.common.signature = messageSignature; + +// saveSignature(sessionData, MessageType.ASSERTION_RECEIPT, messageSignature); + +// saveHash( +// sessionData, +// MessageType.ASSERTION_RECEIPT, +// getHash(lockAssertionReceiptMessage), +// ); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "lockAssertionResponse", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ + +// this.log.info(`${fnTag}, sending LockAssertionResponseMessage...`); + +// return lockAssertionReceiptMessage; +// } + +// async checkLockAssertionRequestMessage( +// request: LockAssertionRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#checkLockAssertionRequestMessage()`; + +// if ( +// request.common == undefined || +// request.common.version == undefined || +// request.common.messageType == undefined || +// request.common.sessionId == undefined || +// // request.common.transferContextId == undefined || +// request.common.sequenceNumber == undefined || +// request.common.resourceUrl == undefined || +// // request.common.actionrequest == undefined || +// // request.common.payloadProfile == undefined || +// // request.common.applicationProfile == undefined || +// request.common.signature == undefined || +// request.common.clientGatewayPubkey == undefined || +// request.common.serverGatewayPubkey == undefined +// ) { +// throw new Error( +// `${fnTag}, message satp common body is missing or is missing required fields`, +// ); +// } + +// if (request.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, unsupported SATP version`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.serverGatewayPubkey == undefined || +// sessionData.lastSequenceNumber == undefined +// ) { +// throw new Error(`${fnTag}, session data was not load correctly`); +// } + +// if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { +// throw new Error( +// `${fnTag}, LockAssertionRequest serverIdentity public key does not match the one that was sent`, +// ); +// } + +// if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { +// throw new Error( +// `${fnTag}, LockAssertionRequest clientIdentity public key does not match the one that was sent`, +// ); +// } + +// if ( +// !verifySignature( +// this.signer, +// request.common, +// request.common.serverGatewayPubkey, +// ) +// ) { +// throw new Error( +// `${fnTag}, LockAssertionRequest message signature verification failed`, +// ); +// } + +// if (request.common.messageType != MessageType.LOCK_ASSERT) { +// throw new Error(`${fnTag}, wrong message type for LockAssertionRequest`); +// } + +// if ( +// request.common.sequenceNumber != +// sessionData.lastSequenceNumber + BigInt(1) +// ) { +// throw new Error( +// `${fnTag}, LockAssertionRequest Message sequence number is wrong`, +// ); +// } + +// if ( +// request.common.hashPreviousMessage != +// getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) +// ) { +// throw new Error( +// `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, +// ); +// } + +// if ( +// request.lockAssertionFormat == undefined || +// request.lockAssertionClaim == undefined +// ) { +// throw new Error( +// `${fnTag}, LockAssertionRequest lockAssertionFormat or lockAssertionClaim is missing`, +// ); +// } + +// this.log.info(`LockAssertionRequest passed all checks.`); +// return sessionData; +// } +// } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 4a1aca5121..24bedb08db 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -1,425 +1,433 @@ -import { JsObjectSigner, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -import { - CommitFinalAcknowledgementReceiptResponseMessage, - CommitFinalAssertionRequestMessage, - CommitPreparationRequestMessage, - CommitReadyResponseMessage, -} from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; -import { SATP_VERSION } from "../../constants"; -import { - CommonSatp, - MessageType, -} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { - bufArray2HexStr, - getHash, - sign, - storeLog, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -import { SATPService, ISATPServerServiceOptions, SATPServiceType } from "../../../types/satp-protocol"; -import { SATPSession } from "../../../core/satp-session"; - -export class Stage3ServerService implements SATPService { - public static readonly CLASS_NAME = "server-service"; - public static readonly SATP_STAGE = "stage-3"; - public static readonly SERVICE_TYPE = SATPServiceType.Server; - private _log: Logger; - private signer: JsObjectSigner; - - constructor(ops: ISATPServerServiceOptions) { - const level = ops.logLevel || "INFO"; - const label = this.getServiceIdentifier(); - this._log = LoggerProvider.getOrCreate({ level, label }); - this.signer = ops.signer; - } - - public get className(): string { - return Stage3ServerService.CLASS_NAME; - } - - public get stage(): string { - return Stage3ServerService.SATP_STAGE; - } - - public get log(): Logger { - return this._log; - } - - public get serviceType(): SATPServiceType { - return SATPServiceType.Server; - } - - public getServiceIdentifier(): string { - return `${this.className}#${this.serviceType}`; - } - - async commitReady( - request: CommitPreparationRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#commitReady()`; - - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); - - const commonBody = new CommonSatp(); - commonBody.version = SATP_VERSION; - commonBody.messageType = MessageType.COMMIT_READY; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.COMMIT_PREPARE, - ); - commonBody.sessionId = request.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const commitReadyMessage = new CommitReadyResponseMessage(); - commitReadyMessage.common = commonBody; - - commitReadyMessage.mintAssertionClaims = sessionData.mintAssertionClaims; - commitReadyMessage.mintAssertionClaimsFormat = - sessionData.mintAssertionClaimsFormat; - - const messageSignature = bufArray2HexStr( - sign(this.signer, JSON.stringify(commitReadyMessage)), - ); - - saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); - - saveHash( - sessionData, - MessageType.COMMIT_READY, - getHash(commitReadyMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "commitReady", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - this.log.info(`${fnTag}, sending commitReadyMessage...`); - - return commitReadyMessage; - } - - async commitFinalAcknowledgementReceiptResponse( - request: CommitFinalAssertionRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#commitFinalAcknowledgementReceiptResponse()`; - - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); - - const commonBody = new CommonSatp(); - commonBody.version = SATP_VERSION; - commonBody.messageType = MessageType.ACK_COMMIT_FINAL; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.COMMIT_FINAL, - ); - commonBody.sessionId = request.common.sessionId; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const commitFinalAcknowledgementReceiptResponseMessage = - new CommitFinalAcknowledgementReceiptResponseMessage(); - commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; - - commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = - sessionData.assignmentAssertionClaim; - commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaimFormat = - sessionData.assignmentAssertionClaimFormat; - - const messageSignature = bufArray2HexStr( - sign( - this.signer, - JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), - ), - ); - - saveSignature(sessionData, MessageType.ACK_COMMIT_FINAL, messageSignature); - - saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "commitFinalAcknowledgementReceiptResponse", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - this.log.info( - `${fnTag}, sending commitFinalAcknowledgementReceiptResponseMessage...`, - ); - - return commitFinalAcknowledgementReceiptResponseMessage; - } - - async checkCommitPreparationRequestMessage( - request: CommitPreparationRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#checkCommitPreparationRequestMessage()`; - - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (request.common.messageType != MessageType.COMMIT_PREPARE) { - throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - request.common.sequenceNumber - ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); - } - - if ( - getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != - request.common.hashPreviousMessage - ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); - } - - if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); - } - - if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); - } - - if ( - !verifySignature( - this.signer, - request.common, - request.common.clientGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, message signature verification failed`); - } - - this.log.info(`CommitPreparationRequestMessage passed all checks.`); - - return sessionData; - } - - async checkCommitFinalAssertionRequestMessage( - request: CommitFinalAssertionRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#checkCommitFinalAssertionRequestMessage()`; - - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (request.common.messageType != MessageType.COMMIT_FINAL) { - throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - request.common.sequenceNumber - ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); - } - - if ( - getMessageHash(sessionData, MessageType.COMMIT_READY) != - request.common.hashPreviousMessage - ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); - } - - if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); - } - - if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); - } - - if ( - !verifySignature( - this.signer, - request.common, - request.common.clientGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, message signature verification failed`); - } - - if (request.burnAssertionClaim == undefined) { - throw new Error(`${fnTag}, mintAssertionClaims is missing`); - } - - //todo check burn - - this.log.info(`CommitFinalAssertionRequestMessage passed all checks.`); - - return sessionData; - } - - async checkTransferCompleteRequestMessage( - request: CommitFinalAssertionRequestMessage, - session: SATPSession, - ): Promise { - const fnTag = `${this.className}#checkTransferCompleteRequestMessage()`; - - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { - throw new Error(`${fnTag}, message type is not COMMIT_TRANSFER_COMPLETE`); - } - - this.log.info( - `${fnTag}, TransferCompleteRequestMessage passed all checks.`, - ); - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - request.common.sequenceNumber - ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); - } - - if ( - getMessageHash(sessionData, MessageType.COMMIT_FINAL) != - request.common.hashPreviousMessage - ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); - } - - if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); - } - - if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); - } - - if ( - !verifySignature( - this.signer, - request.common, - request.common.clientGatewayPubkey, - ) - ) { - throw new Error(`${fnTag}, message signature verification failed`); - } - - this.log.info( - `${fnTag}, TransferCompleteRequestMessage passed all checks.`, - ); - - return sessionData; - } -} +// import { +// JsObjectSigner, +// Logger, +// LoggerProvider, +// } from "@hyperledger/cactus-common"; +// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; +// import { +// CommitFinalAcknowledgementReceiptResponseMessage, +// CommitFinalAssertionRequestMessage, +// CommitPreparationRequestMessage, +// CommitReadyResponseMessage, +// } from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +// import { SATP_VERSION } from "../../constants"; +// import { +// CommonSatp, +// MessageType, +// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +// import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +// import { +// bufArray2HexStr, +// getHash, +// sign, +// storeLog, +// verifySignature, +// } from "../../../gateway-utils"; +// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +// import { +// SATPService, +// ISATPServerServiceOptions, +// SATPServiceType, +// } from "../../../types/satp-protocol"; +// import { SATPSession } from "../../../core/satp-session"; + +// export class Stage3ServerService implements SATPService { +// public static readonly CLASS_NAME = "server-service"; +// public static readonly SATP_STAGE = "stage-3"; +// public static readonly SERVICE_TYPE = SATPServiceType.Server; +// private _log: Logger; +// private signer: JsObjectSigner; + +// constructor(ops: ISATPServerServiceOptions) { +// const level = ops.logLevel || "INFO"; +// const label = this.getServiceIdentifier(); +// this._log = LoggerProvider.getOrCreate({ level, label }); +// this.signer = ops.signer; +// } + +// public get className(): string { +// return Stage3ServerService.CLASS_NAME; +// } + +// public get stage(): string { +// return Stage3ServerService.SATP_STAGE; +// } + +// public get log(): Logger { +// return this._log; +// } + +// public get serviceType(): SATPServiceType { +// return SATPServiceType.Server; +// } + +// public getServiceIdentifier(): string { +// return `${this.className}#${this.serviceType}`; +// } + +// async commitReady( +// request: CommitPreparationRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#commitReady()`; + +// if (request.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${request.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); + +// const commonBody = new CommonSatp(); +// commonBody.version = SATP_VERSION; +// commonBody.messageType = MessageType.COMMIT_READY; +// commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.COMMIT_PREPARE, +// ); +// commonBody.sessionId = request.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const commitReadyMessage = new CommitReadyResponseMessage(); +// commitReadyMessage.common = commonBody; + +// commitReadyMessage.mintAssertionClaims = sessionData.mintAssertionClaims; +// commitReadyMessage.mintAssertionClaimsFormat = +// sessionData.mintAssertionClaimsFormat; + +// const messageSignature = bufArray2HexStr( +// sign(this.signer, JSON.stringify(commitReadyMessage)), +// ); + +// saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); + +// saveHash( +// sessionData, +// MessageType.COMMIT_READY, +// getHash(commitReadyMessage), +// ); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "commitReady", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ +// this.log.info(`${fnTag}, sending commitReadyMessage...`); + +// return commitReadyMessage; +// } + +// async commitFinalAcknowledgementReceiptResponse( +// request: CommitFinalAssertionRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#commitFinalAcknowledgementReceiptResponse()`; + +// if (request.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, +// ); +// } + +// saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); + +// const commonBody = new CommonSatp(); +// commonBody.version = SATP_VERSION; +// commonBody.messageType = MessageType.ACK_COMMIT_FINAL; +// commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); +// commonBody.hashPreviousMessage = getMessageHash( +// sessionData, +// MessageType.COMMIT_FINAL, +// ); +// commonBody.sessionId = request.common.sessionId; +// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; +// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + +// sessionData.lastSequenceNumber = commonBody.sequenceNumber; + +// const commitFinalAcknowledgementReceiptResponseMessage = +// new CommitFinalAcknowledgementReceiptResponseMessage(); +// commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; + +// commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = +// sessionData.assignmentAssertionClaim; +// commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaimFormat = +// sessionData.assignmentAssertionClaimFormat; + +// const messageSignature = bufArray2HexStr( +// sign( +// this.signer, +// JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), +// ), +// ); + +// saveSignature(sessionData, MessageType.ACK_COMMIT_FINAL, messageSignature); + +// saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); + +// /* +// await storeLog(gateway, { +// sessionID: sessionData.id, +// type: "commitFinalAcknowledgementReceiptResponse", +// operation: "lock", +// data: JSON.stringify(sessionData), +// }); +// */ +// this.log.info( +// `${fnTag}, sending commitFinalAcknowledgementReceiptResponseMessage...`, +// ); + +// return commitFinalAcknowledgementReceiptResponseMessage; +// } + +// async checkCommitPreparationRequestMessage( +// request: CommitPreparationRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#checkCommitPreparationRequestMessage()`; + +// if (request.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// if (request.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); +// } + +// if (request.common.messageType != MessageType.COMMIT_PREPARE) { +// throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber == undefined || +// sessionData.version == undefined || +// sessionData.signatures == undefined +// ) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber + BigInt(1) != +// request.common.sequenceNumber +// ) { +// throw new Error(`${fnTag}, sequenceNumber does not match`); +// } + +// if ( +// getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != +// request.common.hashPreviousMessage +// ) { +// throw new Error(`${fnTag}, hashPreviousMessage does not match`); +// } + +// if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { +// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); +// } + +// if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { +// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); +// } + +// if ( +// !verifySignature( +// this.signer, +// request.common, +// request.common.clientGatewayPubkey, +// ) +// ) { +// throw new Error(`${fnTag}, message signature verification failed`); +// } + +// this.log.info(`CommitPreparationRequestMessage passed all checks.`); + +// return sessionData; +// } + +// async checkCommitFinalAssertionRequestMessage( +// request: CommitFinalAssertionRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#checkCommitFinalAssertionRequestMessage()`; + +// if (request.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// if (request.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); +// } + +// if (request.common.messageType != MessageType.COMMIT_FINAL) { +// throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); +// } + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber == undefined || +// sessionData.version == undefined || +// sessionData.signatures == undefined +// ) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber + BigInt(1) != +// request.common.sequenceNumber +// ) { +// throw new Error(`${fnTag}, sequenceNumber does not match`); +// } + +// if ( +// getMessageHash(sessionData, MessageType.COMMIT_READY) != +// request.common.hashPreviousMessage +// ) { +// throw new Error(`${fnTag}, hashPreviousMessage does not match`); +// } + +// if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { +// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); +// } + +// if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { +// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); +// } + +// if ( +// !verifySignature( +// this.signer, +// request.common, +// request.common.clientGatewayPubkey, +// ) +// ) { +// throw new Error(`${fnTag}, message signature verification failed`); +// } + +// if (request.burnAssertionClaim == undefined) { +// throw new Error(`${fnTag}, mintAssertionClaims is missing`); +// } + +// //todo check burn + +// this.log.info(`CommitFinalAssertionRequestMessage passed all checks.`); + +// return sessionData; +// } + +// async checkTransferCompleteRequestMessage( +// request: CommitFinalAssertionRequestMessage, +// session: SATPSession, +// ): Promise { +// const fnTag = `${this.className}#checkTransferCompleteRequestMessage()`; + +// if (request.common == undefined) { +// throw new Error(`${fnTag}, message common body is missing`); +// } + +// if (request.common.version != SATP_VERSION) { +// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); +// } + +// if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { +// throw new Error(`${fnTag}, message type is not COMMIT_TRANSFER_COMPLETE`); +// } + +// this.log.info( +// `${fnTag}, TransferCompleteRequestMessage passed all checks.`, +// ); + +// const sessionData = session.getSessionData(); + +// if (sessionData == undefined) { +// throw new Error( +// `${fnTag}, session data not found for session id ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber == undefined || +// sessionData.version == undefined || +// sessionData.signatures == undefined +// ) { +// throw new Error( +// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, +// ); +// } + +// if ( +// sessionData.lastSequenceNumber + BigInt(1) != +// request.common.sequenceNumber +// ) { +// throw new Error(`${fnTag}, sequenceNumber does not match`); +// } + +// if ( +// getMessageHash(sessionData, MessageType.COMMIT_FINAL) != +// request.common.hashPreviousMessage +// ) { +// throw new Error(`${fnTag}, hashPreviousMessage does not match`); +// } + +// if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { +// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); +// } + +// if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { +// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); +// } + +// if ( +// !verifySignature( +// this.signer, +// request.common, +// request.common.clientGatewayPubkey, +// ) +// ) { +// throw new Error(`${fnTag}, message signature verification failed`); +// } + +// this.log.info( +// `${fnTag}, TransferCompleteRequestMessage passed all checks.`, +// ); + +// return sessionData; +// } +// } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 0f7e2027ff..91f6a20937 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -3,8 +3,27 @@ import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; import { ISignerKeyPairs } from "@hyperledger/cactus-common/src/main/typescript/signer-key-pairs"; import { createConnectTransport } from "@connectrpc/connect-node"; -import { SATPManager } from "../gol/protocol-manager/satp-manager"; +import { SATPManager } from "../gol/satp-manager"; import { SATPSession } from "./satp-session"; +import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; +import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; +import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; +import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; +import { ConnectRouter } from "@connectrpc/connect"; +import { SATPGateway } from "../plugin-satp-hermes-gateway"; +import { SATPService } from "../types/satp-protocol"; +import { PromiseClient as PromiseConnectClient } from "@connectrpc/connect"; + +export type SATPConnectHandler = ( + gateway: SATPGateway, + service: SATPService, +) => (router: ConnectRouter) => void; + +export type SATPServiceClient = + | typeof SatpStage0Service + | typeof SatpStage1Service + | typeof SatpStage2Service + | typeof SatpStage3Service; export enum CurrentDrafts { Core = "Core", @@ -25,7 +44,7 @@ export type ShutdownHook = { hook: () => Promise; }; -export enum SupportedGatewayImplementations { +export enum SupportedChain { FABRIC = "FabricSATPGateway", BESU = "BesuSATPGateway", } @@ -33,8 +52,9 @@ export enum SupportedGatewayImplementations { export type GatewayChannel = { fromGatewayID: string; toGatewayID: string; - manager: SATPManager; - sessions: Map; + sessions: Map; + supportedDLTs: SupportedChain[]; + clients: PromiseConnectClient[]; }; export type Address = @@ -46,7 +66,7 @@ export type GatewayIdentity = { id: string; name?: string; version: DraftVersions[]; - supportedChains: SupportedGatewayImplementations[]; + supportedDLTs: SupportedChain[]; proofID?: string; gatewayServerPort?: number; gatewayClientPort?: number; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts new file mode 100644 index 0000000000..70b786d12e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts @@ -0,0 +1 @@ +// TODO diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index 8b6bd2c6da..0c775ad781 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -73,7 +73,7 @@ export async function storeRemoteLog( key: string, hash: string, ) { - const fnTag = `${gateway.label}#storeInDatabase()`; + const fnTag = `${gateway.className}#storeInDatabase()`; const remoteLog: RemoteLog = { key: key, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index a713fc26d0..5dd70d9c1f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -1,8 +1,21 @@ // a helper class to manage connections to counterparty gateways -import { ILoggerOptions, JsObjectSigner, LogLevelDesc, Logger, LoggerProvider } from "@hyperledger/cactus-common"; -import { GatewayIdentity, GatewayChannel, SupportedGatewayImplementations } from "../core/types"; -import { NonExistantGatewayIdentity } from "../core/errors"; -import { PromiseClient as PromiseConnectClient, Transport as ConnectTransport, PromiseClient } from "@connectrpc/connect"; +import { + ILoggerOptions, + JsObjectSigner, + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + GatewayIdentity, + GatewayChannel, + SupportedChain, + SATPServiceClient, +} from "../core/types"; +import { + PromiseClient as PromiseConnectClient, + Transport as ConnectTransport, +} from "@connectrpc/connect"; import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; @@ -11,44 +24,31 @@ import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_con export interface IGatewayOrchestratorOptions { logLevel?: LogLevelDesc; - ourGateway: GatewayIdentity; + localGateway: GatewayIdentity; counterPartyGateways: GatewayIdentity[] | undefined; signer: JsObjectSigner; } -import { - DEFAULT_PORT_GATEWAY_CLIENT, - DEFAULT_PORT_GATEWAY_GRPC, - DEFAULT_PORT_GATEWAY_SERVER, -} from "../core/constants"; - -import { BLODispatcher, BLODispatcherOptions } from "../blo/dispatcher"; //import { COREDispatcher, COREDispatcherOptions } from "../core/dispatcher"; -import express, { Express } from "express"; -import http from "http"; -import { SATPSession } from "../core/satp-session"; -import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; -import { Transport, createPromiseClient } from "@connectrpc/connect"; +import { createPromiseClient } from "@connectrpc/connect"; import { createConnectTransport } from "@connectrpc/connect-node"; -import { ISATPManagerOptions, SATPManager, SATPServiceClient } from "./protocol-manager/satp-manager"; -import { log } from "console"; -import { getGatewaySeeds, resolveGatewayID } from "../network-identification/resolve-gateway"; -import { timingSafeEqual } from "crypto"; -import { ServiceType } from "@bufbuild/protobuf"; +import { + getGatewaySeeds, + resolveGatewayID, +} from "../network-identification/resolve-gateway"; export class GatewayOrchestrator { public readonly label = "GatewayOrchestrator"; - private ourGateway: GatewayIdentity; + protected localGateway: GatewayIdentity; private counterPartyGateways: Map = new Map(); + + // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) private channels: Map = new Map(); private readonly logger: Logger; - private signer: JsObjectSigner; - constructor( - options: IGatewayOrchestratorOptions, - ) { + constructor(options: IGatewayOrchestratorOptions) { // add checks - this.ourGateway = options.ourGateway; + this.localGateway = options.localGateway; const level = options.logLevel || "INFO"; const logOptions: ILoggerOptions = { level: level, @@ -62,8 +62,9 @@ export class GatewayOrchestrator { this.logger.info( `Initializing gateway connection manager with ${seedGateways} seed gateways`, ); - this.signer = options.signer; - const allCounterPartyGateways = seedGateways.concat(options.counterPartyGateways ?? []); + const allCounterPartyGateways = seedGateways.concat( + options.counterPartyGateways ?? [], + ); // populate counterPartyGateways this.counterPartyGateways = new Map( allCounterPartyGateways.map((gateway) => [gateway.id, gateway]), @@ -73,7 +74,6 @@ export class GatewayOrchestrator { `Gateway Connection Manager bootstrapped with ${allCounterPartyGateways.length} gateways`, ); - this.addGateways(allCounterPartyGateways); const numberGatewayChannels = this.connectToCounterPartyGateways(); if (numberGatewayChannels > 0) { @@ -84,6 +84,9 @@ export class GatewayOrchestrator { } } + public get ourGateway(): GatewayIdentity { + return this.localGateway; + } async startupGatewayOrchestrator(): Promise { if (this.counterPartyGateways.values.length === 0) { this.logger.info("No gateways to connect to"); @@ -93,8 +96,11 @@ export class GatewayOrchestrator { } } + public getChannels(): Map { + return this.channels; + } isSelfId(id: string): boolean { - return id === this.ourGateway.id; + return id === this.localGateway.id; } isInCounterPartyGateways(id: string): boolean { @@ -107,17 +113,19 @@ export class GatewayOrchestrator { // Find IDs in counterPartyGateways that do not have a corresponding channel findUnchanneledGateways(): string[] { - return Array.from(this.counterPartyGateways.keys()).filter(id => { + return Array.from(this.counterPartyGateways.keys()).filter((id) => { return !this.isInChannels(id) && !this.isSelfId(id); }); } // Filter IDs that are not present in counterPartyGateways or channels and not the self ID filterNewIds(ids: string[]): string[] { - return ids.filter(id => { - return !this.isInCounterPartyGateways(id) && - !this.isInChannels(id) && - !this.isSelfId(id); + return ids.filter((id) => { + return ( + !this.isInCounterPartyGateways(id) && + !this.isInChannels(id) && + !this.isSelfId(id) + ); }); } @@ -128,21 +136,25 @@ export class GatewayOrchestrator { return 0; } - const idsToAdd = this.filterNewIds(Array.from(this.counterPartyGateways.keys())); + const idsToAdd = this.filterNewIds( + Array.from(this.counterPartyGateways.keys()), + ); if (idsToAdd.length === 0) { this.logger.info(`${fnTag}, No new gateways to connect to`); return 0; } - + // get gateway identtiies from counterPartyGateways - const gatewaysToAdd = idsToAdd.map(id => this.counterPartyGateways.get(id)!); + const gatewaysToAdd = idsToAdd.map( + (id) => this.counterPartyGateways.get(id)!, + ); let connected = 0; try { for (const gateway of gatewaysToAdd) { - const channel = this.createChannel(gateway); - this.channels.set(gateway.id, channel); - connected++; + const channel = this.createChannel(gateway); + this.channels.set(gateway.id, channel); + connected++; } } catch (ex) { this.logger.error(`${fnTag}, Failed to connect to gateway`); @@ -151,40 +163,40 @@ export class GatewayOrchestrator { return connected; } - get supportedDLTs(): SupportedGatewayImplementations[] { - return this.ourGateway.supportedChains; + get supportedDLTs(): SupportedChain[] { + return this.localGateway.supportedDLTs; } createChannel(identity: GatewayIdentity): GatewayChannel { const clients = this.createConnectClients(identity); - const SATPManagerOpts: ISATPManagerOptions = { - logLevel: "DEBUG", - instanceId: this.ourGateway!.id, - signer: this.signer, - supportedDLTs: this.supportedDLTs, - connectClients: clients, - }; - - const manager = new SATPManager(SATPManagerOpts); - const channel: GatewayChannel = { - fromGatewayID: this.ourGateway.id, - toGatewayID: identity.id, - manager: manager, + fromGatewayID: this.localGateway.id, + toGatewayID: identity.id, sessions: new Map(), + clients: clients, + supportedDLTs: identity.supportedDLTs, }; - return channel; } - private createConnectClients(identity: GatewayIdentity): PromiseConnectClient[] { - let createdClients: ServiceType[] = []; + protected getTargetChannel(id: string): GatewayChannel { + const channel = this.channels.get(id); + if (!channel) { + throw new Error(`Channel with gateway id ${id} does not exist`); + } else { + return channel; + } + } + + private createConnectClients( + identity: GatewayIdentity, + ): PromiseConnectClient[] { // one function for each client type; aggregate in array const transport = createConnectTransport({ baseUrl: identity.address + ":" + identity.gatewayGrpcPort, - httpVersion: "1.1" + httpVersion: "1.1", }); const stage0Client = this.createStage0ServiceClient(transport); @@ -192,39 +204,60 @@ export class GatewayOrchestrator { const stage2Client = this.createStage2ServiceClient(transport); const stage3Client = this.createStage3ServiceClient(transport); + // todo perform healthcheck on startup; should be in stage 0 return [stage0Client, stage1Client, stage2Client, stage3Client]; } - private createStage0ServiceClient(transport: ConnectTransport): PromiseConnectClient { - this.logger.debug("Creating stage 0 service client, with transport: ", transport); + private createStage0ServiceClient( + transport: ConnectTransport, + ): PromiseConnectClient { + this.logger.debug( + "Creating stage 0 service client, with transport: ", + transport, + ); const client = createPromiseClient(SatpStage0Service, transport); return client; } - private createStage1ServiceClient(transport: ConnectTransport): PromiseConnectClient { - this.logger.debug("Creating stage 1 service client, with transport: ", transport); + private createStage1ServiceClient( + transport: ConnectTransport, + ): PromiseConnectClient { + this.logger.debug( + "Creating stage 1 service client, with transport: ", + transport, + ); const client = createPromiseClient(SatpStage1Service, transport); return client; } - private createStage2ServiceClient(transport: ConnectTransport): PromiseConnectClient { - this.logger.debug("Creating stage 2 service client, with transport: ", transport); + private createStage2ServiceClient( + transport: ConnectTransport, + ): PromiseConnectClient { + this.logger.debug( + "Creating stage 2 service client, with transport: ", + transport, + ); const client = createPromiseClient(SatpStage2Service, transport); return client; } - private createStage3ServiceClient(transport: ConnectTransport): PromiseConnectClient { - this.logger.debug("Creating stage 3 service client, with transport: ", transport); + private createStage3ServiceClient( + transport: ConnectTransport, + ): PromiseConnectClient { + this.logger.debug( + "Creating stage 3 service client, with transport: ", + transport, + ); const client = createPromiseClient(SatpStage3Service, transport); return client; } - public async resolveAndAddGateways(IDs: string[]): Promise { + public async resolveAndAddGateways(IDs: string[]): Promise { const fnTag = `${this.label}#addGateways()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Connecting to gateway"); const gatewaysToAdd: GatewayIdentity[] = []; - const thisID = this.ourGateway!.id; + const thisID = this.localGateway!.id; const otherIDs = IDs.filter((id) => id !== thisID); for (const id of otherIDs) { @@ -235,16 +268,20 @@ export class GatewayOrchestrator { return gatewaysToAdd.length; } - public addGateways(gateways: GatewayIdentity[]): string[] { + public addGateways(gateways: GatewayIdentity[]): string[] { const fnTag = `${this.label}#addGateways()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Connecting to gateway"); - let addedIDs: string[] = []; + const addedIDs: string[] = []; // gateways tha are not self - const otherGateways = gateways.filter((gateway) => gateway.id !== this.ourGateway.id); + const otherGateways = gateways.filter( + (gateway) => gateway.id !== this.localGateway.id, + ); // gateways that are not already connected - const uniqueGateways = otherGateways.filter((gateway) => !this.counterPartyGateways.has(gateway.id)); + const uniqueGateways = otherGateways.filter( + (gateway) => !this.counterPartyGateways.has(gateway.id), + ); for (const gateway of uniqueGateways) { this.counterPartyGateways.set(gateway.id, gateway); @@ -275,18 +312,17 @@ export class GatewayOrchestrator { /* BOL TO GOL translation */ - async handleTransferRequest(): Promise { + async handleTransferRequest(): Promise { // add checks this.logger.info("Handling transfer request"); // ! todo implement transfer request this.logger.error("Not implemented"); } - async handleGetRoutes(): Promise { + async handleGetRoutes(): Promise { // add checks this.logger.info("Handling transfer request"); // ! todo implement transfer request this.logger.error("Not implemented"); } - } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts deleted file mode 100644 index b2cb2af53a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/protocol-manager-builder.ts +++ /dev/null @@ -1,5 +0,0 @@ -interface ISATPManagerBuilder { - producePartA(): void; - producePartB(): void; - producePartC(): void; -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts deleted file mode 100644 index ef756948e8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/protocol-manager/satp-manager.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { - Checks, - JsObjectSigner, - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; - -import { Stage1SATPHandler } from "../../core/stage-handlers/stage1-handler"; -import { Stage2Handler } from "../../core/stage-handlers/stage2-handler"; -import { Stage3Handler } from "../../core/stage-handlers/stage3-handler"; -import { Stage1ServerService } from "../../core/stage-services/server/stage1-server-service"; -import { SATPGateway } from "../../plugin-satp-hermes-gateway"; -import { Stage2ServerService } from "../../core/stage-services/server/stage2-server-service"; -import { Stage3ServerService } from "../../core/stage-services/server/stage3-server-service"; -import { ISATPSessionOptions, SATPSession } from "../../core/satp-session"; -import { ConnectRouter, createPromiseClient } from "@connectrpc/connect"; -import { ServiceType } from "@bufbuild/protobuf"; -import { SupportedGatewayImplementations } from "../../core/types"; -import { Stage1ClientService } from "../../core/stage-services/client/stage1-client-service"; -import { Stage2ClientService } from "../../core/stage-services/client/stage2-client-service"; -import { Stage3ClientService } from "../../core/stage-services/client/stage3-client-service"; -import { createConnectTransport } from "@connectrpc/connect-node"; -import { SATPService, ISATPServerServiceOptions, ISATPServiceOptions, SATPHandler, SATPServiceType } from "../../types/satp-protocol"; -import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; -import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; -import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; -import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; -import { PromiseClient as PromiseConnectClient, Transport as ConnectTransport, PromiseClient } from "@connectrpc/connect"; -import { Session } from "inspector"; - -export interface ISATPManagerOptions { - logLevel?: LogLevelDesc; - instanceId: string; - sessions?: Map; - signer: JsObjectSigner; - supportedDLTs: SupportedGatewayImplementations[]; - connectClients: PromiseConnectClient[]; -} - -type SATPConnectHandler = (gateway: SATPGateway, service: SATPService) => (router: ConnectRouter) => void; - -export type SATPServiceClient = typeof SatpStage0Service | typeof SatpStage1Service | typeof SatpStage2Service | typeof SatpStage3Service; - -export class SATPManager { - public static readonly CLASS_NAME = "SATPManager"; - private readonly logger: Logger; - private readonly instanceId: string; - private endpoints: any[] | undefined; - private signer: JsObjectSigner; - private connectClients: PromiseConnectClient[]; - public supportedDLTs: SupportedGatewayImplementations[] = []; - private sessions: Map; - - private readonly satpServices: SATPService[] = []; - private readonly satpHandlers: SATPHandler[] = []; - - constructor( - public readonly options: ISATPManagerOptions, - ) { - const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; - Checks.truthy(options, `${fnTag} arg options`); - - const level = this.options.logLevel || "DEBUG"; - const label = this.className; - this.logger = LoggerProvider.getOrCreate({ level, label }); - this.instanceId = options.instanceId; - this.logger.info(`Instantiated ${this.className} OK`); - this.supportedDLTs = options.supportedDLTs; - this.signer = options.signer; - - this.sessions = options.sessions || new Map(); - - this.connectClients = options.connectClients; - if (this.connectClients == undefined || this.connectClients.length == 0) { - this.logger.warn("Connect clients not provided"); - } - - const serviceClasses = [Stage1ServerService, Stage2ServerService, Stage3ServerService, Stage1ClientService, Stage2ClientService, Stage3ClientService]; - const satpServiceOptions: ISATPServiceOptions = { signer: this.signer, logLevel: level }; - this.satpServices = serviceClasses.map(ServiceClass => new ServiceClass(satpServiceOptions)); - - let mockSession = this.getOrCreateSession() - const stage1Handler = new Stage1SATPHandler(mockSession, this.getServiceByStage(SATPServiceType.Server, "stage-1"), this.getServiceByStage(SATPServiceType.Client, "stage-1"), this.supportedDLTs); - stage1Handler.setupRouter(router); - - - } - - public getServiceByStage(serviceType: SATPServiceType, stageId: string): any { - return this.satpServices.find(service => - service.serviceType === serviceType && - service.stage === stageId - ); - } - - public get className(): string { - return SATPManager.CLASS_NAME; - } - - public getSessions(): Map | undefined { - return this.sessions; - } - - public getSession(sessionId: string): SATPSession | undefined { - if (this.sessions == undefined) { - return undefined; - } - return this.sessions.get(sessionId); - } - - get SupportedDLTs(): SupportedGatewayImplementations[] { - return this.supportedDLTs; - } - - public getOrCreateSession(sessionId?: string, contextID?: string): SATPSession { - let session: SATPSession; - if (!sessionId) { - return this.createNewSession(contextID || "MOCK_CONTEXT_ID"); - return session; - } else { - let existingSession = this.sessions.get(sessionId); - return existingSession || this.createNewSession("MOCK_CONTEXT_ID"); - } - } - - private createNewSession(contextID: string): SATPSession { - let session = new SATPSession({ contextID: contextID }); - this.sessions?.set(session.getSessionData().id, session); - return session - } - - getOrCreateServices() { - const fnTag = `${SATPManager.CLASS_NAME}#getOrCreateServices()`; - this.logger.info( - `${fnTag}, Registering gRPCservices on instanceId=${this.instanceId}`, - ); - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - this.endpoints = this.satpHandlers; - return this.endpoints; - } - - get StageHandlers() { - throw new Error("Not implemented yet"); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts new file mode 100644 index 0000000000..543c4a2291 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -0,0 +1,254 @@ +import { + Checks, + JsObjectSigner, + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; + +import { Stage1SATPHandler } from "../core/stage-handlers/stage1-handler"; +import { Stage1ServerService } from "../core/stage-services/server/stage1-server-service"; +// import { Stage2ServerService } from "../core/stage-services/server/stage2-server-service"; +// import { Stage3ServerService } from "../core/stage-services/server/stage3-server-service"; +import { SATPSession } from "../core/satp-session"; +import { SupportedChain } from "../core/types"; +import { Stage1ClientService } from "../core/stage-services/client/stage1-client-service"; +// import { Stage2ClientService } from "../core/stage-services/client/stage2-client-service"; +// import { Stage3ClientService } from "../core/stage-services/client/stage3-client-service"; +import { + SATPService, + SATPHandler, + SATPServiceType, + SATPHandlerOptions, +} from "../types/satp-protocol"; +import { ISATPServiceOptions } from "../core/stage-services/satp-service"; + +export interface ISATPManagerOptions { + logLevel?: LogLevelDesc; + instanceId: string; + sessions?: Map; + signer: JsObjectSigner; + supportedDLTs: SupportedChain[]; +} + +export class SATPManager { + public static readonly CLASS_NAME = "SATPManager"; + private readonly logger: Logger; + private readonly instanceId: string; + private endpoints: any[] | undefined; + private signer: JsObjectSigner; + public supportedDLTs: SupportedChain[] = []; + private sessions: Map; + + private readonly satpServices: SATPService[] = []; + private readonly satpHandlers: SATPHandler[] = []; + + constructor(public readonly options: ISATPManagerOptions) { + const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "DEBUG"; + const label = this.className; + this.logger = LoggerProvider.getOrCreate({ level, label }); + this.instanceId = options.instanceId; + this.logger.info(`Instantiated ${this.className} OK`); + this.supportedDLTs = options.supportedDLTs; + this.signer = options.signer; + + this.sessions = options.sessions || new Map(); + const handlersClasses = [ + Stage1SATPHandler, + // Stage2SATPHandler, + // Stage3SATPHandler, + ]; + + const serviceClasses = [Stage1ServerService, Stage1ClientService]; + + const serviceOptions = this.initializeServiceOptions( + serviceClasses, + level, + label, + ); + this.satpServices = this.initializeServices(serviceClasses, serviceOptions); + + const mockSession = this.getOrCreateSession(); + + if (serviceClasses.length % 2 !== 0) { + throw new Error( + "Invalid number of service classes. Each handler needs one server and one client service.", + ); + } + const handlersOptions = this.initializeHandlerOptions( + serviceClasses, + level, + ); + + const handlers = this.initializeHandlers(handlersClasses, handlersOptions); + this.satpHandlers = handlers; + } + + public getServiceByStage( + serviceType: SATPServiceType, + stageId: string, + ): SATPService { + if (isNaN(Number(stageId))) { + throw new Error("Invalid stageId"); + } + + const service = this.satpServices.find( + (service) => + service.serviceType === serviceType && service.stage === stageId, + ); + if (service == undefined) { + throw new Error( + `Service not found for stageId=${stageId} and serviceType=${serviceType}`, + ); + } + return service; + } + + public get className(): string { + return SATPManager.CLASS_NAME; + } + + public getSessions(): Map | undefined { + return this.sessions; + } + + public getSession(sessionId: string): SATPSession | undefined { + if (this.sessions == undefined) { + return undefined; + } + return this.sessions.get(sessionId); + } + + get SupportedDLTs(): SupportedChain[] { + return this.supportedDLTs; + } + + public getOrCreateSession( + sessionId?: string, + contextID?: string, + ): SATPSession { + let session: SATPSession; + if (!sessionId) { + return this.createNewSession(contextID || "MOCK_CONTEXT_ID"); + return session; + } else { + const existingSession = this.sessions.get(sessionId); + return existingSession || this.createNewSession("MOCK_CONTEXT_ID"); + } + } + + private createNewSession(contextID: string): SATPSession { + const session = new SATPSession({ contextID: contextID }); + this.sessions?.set(session.getSessionData().id, session); + return session; + } + + getOrCreateServices() { + const fnTag = `${SATPManager.CLASS_NAME}#getOrCreateServices()`; + this.logger.info( + `${fnTag}, Registering gRPCservices on instanceId=${this.instanceId}`, + ); + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + + this.endpoints = this.satpHandlers; + return this.endpoints; + } + + get StageHandlers() { + throw new Error("Not implemented yet"); + } + + private initializeServiceOptions( + serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + logLevel: LogLevelDesc, + label: string, + ): ISATPServiceOptions[] { + return serviceClasses.map((_, index) => ({ + signer: this.signer, + stage: index.toString() as "0" | "1" | "2" | "3", + loggerOptions: { level: logLevel, label }, + serviceName: `Service-${index}`, + serviceType: + index % 2 === 0 ? SATPServiceType.Server : SATPServiceType.Client, + })); + } + + private initializeServices( + serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + serviceOptions: ISATPServiceOptions[], + ): SATPService[] { + return serviceClasses.map( + (ServiceClass, index) => new ServiceClass(serviceOptions[index]), + ); + } + + private initializeHandlerOptions( + serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + level: LogLevelDesc = "DEBUG", + ): SATPHandlerOptions[] { + const handlersOptions: SATPHandlerOptions[] = []; + const mockSession = this.getOrCreateSession(); + + try { + for (let i = 0; i < serviceClasses.length / 2; i++) { + const serverService = this.getServiceByStage( + SATPServiceType.Server, + i.toString(), + ); + + const clientService = this.getServiceByStage( + SATPServiceType.Client, + i.toString(), + ); + + const handlerOptions: SATPHandlerOptions = { + session: mockSession, + serverService: serverService, + clientService: clientService, + supportedDLTs: this.supportedDLTs, + loggerOptions: { level: level, label: `SATPHandler-Stage${i}` }, + }; + handlersOptions.push(handlerOptions); + } + } catch (error) { + this.logger.error(`Error creating handler options: ${error}`); + } + + return handlersOptions; + } + + private initializeHandlers( + handlersClasses: (new (options: SATPHandlerOptions) => SATPHandler)[], + handlersOptions: SATPHandlerOptions[], + ): SATPHandler[] { + const handlers: SATPHandler[] = []; + if (handlersClasses.length === 0) { + throw new Error("No handlers provided"); + } + + if (handlersOptions.length === 0) { + throw new Error("No handler options provided"); + } + + if (handlersClasses.length !== handlersOptions.length) { + throw new Error( + "Number of handler classes and options do not match. Each handler class needs an options object.", + ); + } + + handlersOptions.forEach((options, index) => { + if (index < handlersClasses.length) { + const HandlerClass = handlersClasses[index]; + const handler = new HandlerClass(options); + handlers.push(handler); + } + }); + + return handlers; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts index dfcefb553b..6e2e644d2d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/chainid-list.ts @@ -1 +1 @@ -// TODO implement network identification draft \ No newline at end of file +// TODO implement network identification draft diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts index ef715f1588..f7df2e1659 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts @@ -1,95 +1,86 @@ -import { GatewayIdentity, SupportedGatewayImplementations } from "../core/types"; +import { GatewayIdentity, SupportedChain } from "../core/types"; import { Logger } from "@hyperledger/cactus-common"; // gets an ID, queries a repository, returns a gateway identity -export async function resolveGatewayID(logger: Logger, ID: string): Promise { - const fnTag = `#resolveGatewayID()`; - logger.trace(`Entering ${fnTag}`); - logger.info(`Resolving gateway with ID: ${ID}`); +export async function resolveGatewayID( + logger: Logger, + ID: string, +): Promise { + const fnTag = `#resolveGatewayID()`; + logger.trace(`Entering ${fnTag}`); + logger.info(`Resolving gateway with ID: ${ID}`); + + const mockGatewayIdentity: GatewayIdentity[] = [ + { + id: "1", + name: "Gateway1", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID1", + gatewayServerPort: 3011, + address: "http://localhost", + }, + { + id: "2", + name: "Gateway2", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID1", + gatewayServerPort: 3012, + address: "http://localhost", + }, + ]; + return mockGatewayIdentity.filter((gateway) => gateway.id === ID)[0]; +} - const mockGatewayIdentity: GatewayIdentity[] = [ - { - id: "1", - name: "Gateway1", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3011, - address: "http://localhost", - }, - { - id: "2", - name: "Gateway2", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3012, - address: "http://localhost", - }, - ]; - return mockGatewayIdentity.filter((gateway) => gateway.id === ID)[0]; - } - // TODO! dummy implementation for testing; contains hardcoded gateways similar to Bitcoin seeds -export function getGatewaySeeds(logger: Logger): GatewayIdentity[] { - const fnTag = `#getGatewaySeeds()`; - logger.trace(`Entering ${fnTag}`); +export function getGatewaySeeds(logger: Logger): GatewayIdentity[] { + const fnTag = `#getGatewaySeeds()`; + logger.trace(`Entering ${fnTag}`); - const mockGatewayIdentity: GatewayIdentity[] = [ - { - id: "1", - name: "Gateway1", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3011, - address: "http://localhost", - }, - { - id: "2", - name: "Gateway2", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], - proofID: "mockProofID1", - gatewayServerPort: 3014, - address: "http://localhost", - }, - ]; - return mockGatewayIdentity; - } \ No newline at end of file + const mockGatewayIdentity: GatewayIdentity[] = [ + { + id: "1", + name: "Gateway1", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID1", + gatewayServerPort: 3011, + address: "http://localhost", + }, + { + id: "2", + name: "Gateway2", + version: [ + { + Core: "1.0", + Architecture: "1.0", + Crash: "1.0", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID1", + gatewayServerPort: 3014, + address: "http://localhost", + }, + ]; + return mockGatewayIdentity; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index bd8e872919..d271213457 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -23,20 +23,19 @@ import { SATPGatewayConfig, GatewayIdentity, ShutdownHook, - SupportedGatewayImplementations, + SupportedChain, } from "./core/types"; -import { GatewayOrchestrator, IGatewayOrchestratorOptions } from "./gol/gateway-orchestrator"; +import { + GatewayOrchestrator, + IGatewayOrchestratorOptions, +} from "./gol/gateway-orchestrator"; export { SATPGatewayConfig }; import express, { Express } from "express"; import http from "http"; -import { configureRoutes } from "./web-services/router"; import { DEFAULT_PORT_GATEWAY_CLIENT, - DEFAULT_PORT_GATEWAY_GRPC, DEFAULT_PORT_GATEWAY_SERVER, } from "./core/constants"; -import { SessionData } from "./generated/proto/cacti/satp/v02/common/session_pb"; -import { expressConnectMiddleware } from "@connectrpc/connect-express"; import { bufArray2HexStr } from "./gateway-utils"; import { ILocalLogRepository, @@ -44,11 +43,16 @@ import { } from "./repository/interfaces/repository"; import { SATPLedgerConnector } from "./types/blockchain-interaction"; import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; -import fs from 'fs'; -import swaggerUi from 'swagger-ui-express'; +import fs from "fs"; +import swaggerUi, { JsonObject } from "swagger-ui-express"; import { SATPSession } from "./core/satp-session"; +import { + IPluginWebService, + ICactusPlugin, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; -export class SATPGateway { +export class SATPGateway implements IPluginWebService, ICactusPlugin { // todo more checks; example port from config is between 3000 and 9000 @IsDefined() @IsNotEmptyObject() @@ -58,45 +62,39 @@ export class SATPGateway { @IsDefined() @IsNotEmptyObject() @IsObject() - // todo add decorators that check all fields are defined private readonly config: SATPGatewayConfig; @IsString() @Contains("Gateway") - public readonly label = "SATPGateway"; + public readonly className = "SATPGateway"; - private readonly shutdownHooks: ShutdownHook[]; - private gatewayConnectionManager: GatewayOrchestrator; + @IsString() + public readonly instanceId: string; + private supportedDltIDs: SupportedChain[]; + private gatewayOrchestrator: GatewayOrchestrator; - private gatewayApplication?: Express; - private gatewayServer?: http.Server; private BLOApplication?: Express; private BLOServer?: http.Server; private BLODispatcher?: BLODispatcher; + private readonly OAS: JsonObject; public OAPIServerEnabled: boolean = false; - private objectSigner: JsObjectSigner; - - // Instantiate connectors based on supported implementations - private supportedDltIDs: SupportedGatewayImplementations[]; - private connectors: SATPLedgerConnector[] = []; - - // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) - private sessions: Map = new Map(); + private signer: JsObjectSigner; private _pubKey: string; public localRepository?: ILocalLogRepository; public remoteRepository?: IRemoteLogRepository; + private readonly shutdownHooks: ShutdownHook[]; constructor(public readonly options: SATPGatewayConfig) { - const fnTag = `${this.label}#constructor()`; + const fnTag = `${this.className}#constructor()`; Checks.truthy(options, `${fnTag} arg options`); this.config = SATPGateway.ProcessGatewayCoordinatorConfig(options); this.shutdownHooks = []; const level = options.logLevel || "INFO"; const logOptions: ILoggerOptions = { level: level, - label: this.label, + label: this.className, }; this.logger = LoggerProvider.getOrCreate(logOptions); this.logger.info("Initializing Gateway Coordinator"); @@ -109,34 +107,40 @@ export class SATPGateway { this.logger.info(`Gateway's public key: ${this._pubKey}`); - const objectSignerOptions: IJsObjectSignerOptions = { + const signerOptions: IJsObjectSignerOptions = { privateKey: bufArray2HexStr(this.config.keyPair.privateKey), logLevel: "debug", }; - this.objectSigner = new JsObjectSigner(objectSignerOptions); + this.signer = new JsObjectSigner(signerOptions); const gatewayOrchestratorOptions: IGatewayOrchestratorOptions = { logLevel: this.config.logLevel, - ourGateway: this.config.gid!, + localGateway: this.config.gid!, counterPartyGateways: this.config.counterPartyGateways, - signer: this.objectSigner!, + signer: this.signer!, }; - if (this.config.gid) { - this.logger.info("Initializing gateway connection manager with seed gateways"); - this.gatewayConnectionManager = new GatewayOrchestrator(gatewayOrchestratorOptions); + if (this.config.gid) { + this.logger.info( + "Initializing gateway connection manager with seed gateways", + ); + this.gatewayOrchestrator = new GatewayOrchestrator( + gatewayOrchestratorOptions, + ); } else { throw new Error("GatewayIdentity is not defined"); } + this.instanceId = uuidv4(); const dispatcherOps: BLODispatcherOptions = { logger: this.logger, logLevel: this.config.logLevel, instanceId: this.config.gid!.id, + orchestrator: this.gatewayOrchestrator, + signer: this.signer, }; - - this.supportedDltIDs = this.config.gid!.supportedChains; + this.supportedDltIDs = this.config.gid!.supportedDLTs; if (!this.config.gid || !dispatcherOps.instanceId) { throw new Error("Invalid configuration"); @@ -144,50 +148,83 @@ export class SATPGateway { this.BLODispatcher = new BLODispatcher(dispatcherOps); this.OAPIServerEnabled = this.config.enableOpenAPI ?? true; + + const specPath = path.join(__dirname, "../json/openapi-blo-bundled.json"); + this.OAS = JSON.parse(fs.readFileSync(specPath, "utf8")); + if (!this.OAS) { + this.logger.warn("Error loading OAS"); + } + } + + /* ICactus Plugin methods */ + + public getInstanceId(): string { + return this.instanceId; + } + + public getPackageName(): string { + return `@hyperledger/cactus-plugin-satp-hermes`; + } + + public async onPluginInit(): Promise { + const fnTag = `${this.className}#onPluginInit()`; + this.logger.trace(`Entering ${fnTag}`); + // resolve gateways on init + throw new Error("Not implemented"); + } + + /* IPluginWebService methods */ + async registerWebServices(app: Express): Promise { + const webServices = await this.getOrCreateWebServices(); + webServices.forEach((ws) => { + this.logger.debug(`Registering service ${ws.getPath()}`); + ws.registerExpress(app); + }); + return webServices; + } + + public async getOrCreateWebServices(): Promise { + const fnTag = `${this.className}#getOrCreateWebServices()`; + this.logger.trace(`Entering ${fnTag}`); + if (!this.BLODispatcher) { + throw new Error(`Cannot ${fnTag} because BLODispatcher is erroneous`); + } + return this.BLODispatcher?.getOrCreateWebServices(); } + /* Getters */ + public get Signer(): JsObjectSigner { - return this.objectSigner; + return this.signer; } - + public getSupportedDltIDs(): string[] { return this.supportedDltIDs; } - public get gatewaySigner(): JsObjectSigner { - return this.objectSigner; + return this.signer; } public get pubKey(): string { return this._pubKey; } - // todo load docs for gateway coordinator and expose them in a http gatewayApplication - - setupOpenAPI(): void { - if (!this.OAPIServerEnabled) { - this.logger.debug("OpenAPI server is disabled"); - return; - } + public getOpenApiSpec(): unknown { + return this.OAS; + } - if (!this.BLOApplication) { - this.logger.debug("BLOApplication is not defined. Not initializing OpenAPI server"); - return; + // TODO: keep getter; add an admin endpoint to get identity of connected gateway to BLO + public get Identity(): GatewayIdentity { + const fnTag = `${this.className}#getIdentity()`; + this.logger.trace(`Entering ${fnTag}`); + if (!this.config.gid) { + throw new Error("GatewayIdentity is not defined"); } - - const specPath = path.join(__dirname, "../json/openapi-blo-bundled.json"); - const OpenAPISpec = JSON.parse(fs.readFileSync(specPath, 'utf8')); - - // Type assertion here - this.BLOApplication.use( - "/api-docs", - swaggerUi.serve as express.RequestHandler[], - swaggerUi.setup(OpenAPISpec) as express.RequestHandler - ); + return this.config.gid!; } - // use builder pattern? + /* Gateway configuration helpers */ static ProcessGatewayCoordinatorConfig( pluginOptions: SATPGatewayConfig, ): SATPGatewayConfig { @@ -207,10 +244,7 @@ export class SATPGateway { Crash: "v02", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID1", gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, @@ -235,10 +269,10 @@ export class SATPGateway { ]; } - if (!pluginOptions.gid.supportedChains) { - pluginOptions.gid.supportedChains = [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, + if (!pluginOptions.gid.supportedDLTs) { + pluginOptions.gid.supportedDLTs = [ + SupportedChain.FABRIC, + SupportedChain.BESU, ]; } @@ -276,24 +310,19 @@ export class SATPGateway { /** * Startup Methods * ---------------- - * This section includes methods responsible for starting up the server and its associated services. + * This section includes methods responsible for starting up the server and its associated services independently of the existance of a Hyperledger Cacti Node. * It ensures that both the GatewayServer and BLOServer are initiated concurrently for efficient launch. */ - async startup(): Promise { - const fnTag = `${this.label}#startup()`; + public async startup(): Promise { + const fnTag = `${this.className}#startup()`; this.logger.trace(`Entering ${fnTag}`); - await Promise.all([ - this.startupGatewayServer(), - this.setupOpenAPI(), - ]); - - this.logger.info("Both GatewayServer and BLOServer have started"); + await Promise.all([this.startupBLOServer(), this.setupOpenAPIServer()]); } - async startupGatewayServer(): Promise { + protected async startupBLOServer(): Promise { // starts BOL - const fnTag = `${this.label}#startupGatewayServer()`; + const fnTag = `${this.className}#startupBLOServer()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Starting BOL server"); const port = @@ -333,6 +362,29 @@ export class SATPGateway { }); } + public setupOpenAPIServer(): void { + if (!this.OAPIServerEnabled) { + this.logger.debug("OpenAPI server is disabled"); + return; + } + + if (!this.BLOApplication) { + this.logger.debug( + "BLOApplication is not defined. Not initializing OpenAPI server", + ); + return; + } + + if (!this.OAS) { + throw new Error("OpenAPI spec is not set"); + } + // Type assertion here + this.BLOApplication.use( + "/api-docs", + swaggerUi.serve as express.RequestHandler[], + swaggerUi.setup(this.OAS) as express.RequestHandler, + ); + } /** * Gateway Connection Methods * -------------------------- @@ -343,53 +395,39 @@ export class SATPGateway { // TODO: addGateways as an admin endpoint, simply calls orchestrator public async resolveAndAddGateways(IDs: string[]): Promise { - const fnTag = `${this.label}#resolveAndAddGateways()`; + const fnTag = `${this.className}#resolveAndAddGateways()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Connecting to gateway"); - this.gatewayConnectionManager.resolveAndAddGateways(IDs); + this.gatewayOrchestrator.resolveAndAddGateways(IDs); // todo connect to gateway } public async addGateways(gateways: GatewayIdentity[]): Promise { - const fnTag = `${this.label}#addGateways()`; + const fnTag = `${this.className}#addGateways()`; this.logger.trace(`Entering ${fnTag}`); this.logger.info("Connecting to gateway"); - this.gatewayConnectionManager.addGateways(gateways); + this.gatewayOrchestrator.addGateways(gateways); // todo connect to gateway } - - // TODO: keep getter; add an admin endpoint to get identity of connected gateway to BLO - public get Identity(): GatewayIdentity { - const fnTag = `${this.label}#getIdentity()`; - this.logger.trace(`Entering ${fnTag}`); - if (!this.config.gid) { - throw new Error("GatewayIdentity is not defined"); - } - return this.config.gid!; - } - /** * Shutdown Methods * ----------------- * This section includes methods responsible for cleanly shutting down the server and its associated services. */ public onShutdown(hook: ShutdownHook): void { - const fnTag = `${this.label}#onShutdown()`; + const fnTag = `${this.className}#onShutdown()`; this.logger.trace(`Entering ${fnTag}`); this.logger.debug(`Adding shutdown hook: ${hook.name}`); this.shutdownHooks.push(hook); } - public async shutdown(): Promise { - const fnTag = `${this.label}#getGatewaySeeds()`; + public async shutdown(): Promise { + const fnTag = `${this.className}#getGatewaySeeds()`; this.logger.debug(`Entering ${fnTag}`); - this.logger.info("Shutting down Node server - Gateway"); - await this.shutdownGatewayServer(); - this.logger.info("Shutting down Node server - BOL"); await this.shutdownBLOServer(); @@ -400,34 +438,15 @@ export class SATPGateway { } this.logger.info("Shutting down Gateway Connection Manager"); - const connectionsClosed = - await this.gatewayConnectionManager.disconnectAll(); + const connectionsClosed = await this.gatewayOrchestrator.disconnectAll(); this.logger.info(`Closed ${connectionsClosed} connections`); this.logger.info("Gateway Coordinator shut down"); - return connectionsClosed; - } - - private async shutdownGatewayServer(): Promise { - const fnTag = `${this.label}#shutdownServer()`; - this.logger.debug(`Entering ${fnTag}`); - if (this.gatewayServer) { - try { - await this.gatewayServer.close(); - this.gatewayServer = undefined; - this.logger.info("Server shut down"); - } catch (error) { - this.logger.error( - `Error shutting down the gatewayApplication: ${error}`, - ); - } - } else { - this.logger.warn("Server is not running."); - } + return; } private async shutdownBLOServer(): Promise { - const fnTag = `${this.label}#shutdownBLOServer()`; + const fnTag = `${this.className}#shutdownBLOServer()`; this.logger.debug(`Entering ${fnTag}`); if (this.BLOServer) { try { @@ -443,5 +462,4 @@ export class SATPGateway { this.logger.warn("Server is not running."); } } - } 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 index e491e34574..df70e959f4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts @@ -1,7 +1,8 @@ // Gateway Client API export * from "./generated/gateway-client/typescript-axios"; -// Gateway Backend, not exported for now +// TODO: Should we export the gateway backend +// Gateway Backend /* // Exporting from the common directory export * from './generated/proto/cacti/satp/v02/common/health_connect'; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index e8a63c3d25..cab98da467 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -1,46 +1,32 @@ -import { JsObjectSigner, LogLevelDesc, Logger } from "@hyperledger/cactus-common"; -import { SupportedGatewayImplementations } from "../core/types"; -import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; -import { v4 as uuidV4 } from "uuid"; +import { + ILoggerOptions, + JsObjectSigner, + LogLevelDesc, + Logger, +} from "@hyperledger/cactus-common"; +import { SupportedChain } from "../core/types"; import { ConnectRouter } from "@connectrpc/connect"; - -/** - * Interface for SATP Services. - * Each service implementing this interface must provide one or more function(s) to handle specific stages of the SATP protocol. - * Implementations should ensure compliance with the defined asynchronous patterns essential for SATP protocol interactions. - */ -export interface SATPService { - readonly className: string; - readonly stage: string; - readonly log: Logger; - readonly serviceType: SATPServiceType; - getServiceIdentifier(): string; -} +import { SATPSession } from "../core/satp-session"; +import { + SATPService, + SATPServiceType, +} from "../core/stage-services/satp-service"; /** * Represents a handler for various stages of the SATP (Secure Asset Transfer Protocol). * Handlers implementing this interface must provide mechanisms to setup routes and handle * protocol-specific requests based on the stage they are designed for. - */ + */ export interface SATPHandler { setupRouter(router: ConnectRouter): void; getHandlerIdentifier(): string; } -export enum SATPServiceType { - Server, - Client, -} - -export type ISATPServiceOptions = { - logLevel: LogLevelDesc - signer: JsObjectSigner; -} - -export type ISATPServerServiceOptions = ISATPServiceOptions & { - -} - -export type ISATPClientServiceOptions = ISATPServiceOptions & { - +export interface SATPHandlerOptions { + session: SATPSession; + serverService: SATPService; + clientService: SATPService; + supportedDLTs: SupportedChain[]; + loggerOptions: ILoggerOptions; } +export { SATPService, SATPServiceType }; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts deleted file mode 100644 index 7922d8c4e8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/router.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ConnectRouter } from "@connectrpc/connect"; - -/* -import { TestService } from "../generated/proto/test/message_connect"; -import { TestService2 } from "../generated/proto/test/message_connect"; - -import { TestImplementation } from "./test/test"; -import { TestImplementation2 } from "./test/test2"; - - -*/ -export const configureRoutes = (router: ConnectRouter): void => { - console.log(router); - // TODO: add all services and respective implementations - //router.service(TestService, TestImplementation); -}; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/dummy-step.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/dummy-step.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/identity-verification.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/stage-0/identity-verification.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts similarity index 90% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts index 40bb86d859..e93d8a639c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/blo/status-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts @@ -14,9 +14,9 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import OAS from "../../../json/openapi-blo-bundled.json"; -import { IRequestOptions } from "../../core/types"; -import { StatusRequest } from "../../generated/gateway-client/typescript-axios"; +import OAS from "../../json/openapi-blo-bundled.json"; +import { IRequestOptions } from "../core/types"; +import { StatusRequest } from "../generated/gateway-client/typescript-axios"; export class GetStatusEndpointV1 implements IWebServiceEndpoint { public static readonly CLASS_NAME = "GetStatusEndpointV1"; @@ -75,6 +75,8 @@ export class GetStatusEndpointV1 implements IWebServiceEndpoint { return this.handleRequest.bind(this); } + // TODO discover way to inherit OAS schema and have request types here + // parameter checks should be enforced by the type system public async handleRequest(req: Request, res: Response): Promise { const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; this.log.debug(reqTag); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts index e7b4b9f447..a3404a7b10 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts @@ -12,7 +12,7 @@ import { import { SATPGatewayConfig, - SupportedGatewayImplementations, + SupportedChain, } from "../../../main/typescript/core/types"; import { createClient } from "../test-utils"; @@ -52,10 +52,7 @@ describe("GetStatus Endpoint and Functionality testing", () => { Crash: "v1", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", gatewayServerPort: 3010, gatewayClientPort: 3011, diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts index c5997c9e10..b4b9b8355c 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts @@ -16,7 +16,7 @@ import { } from "@hyperledger/cactus-core-api"; import { ShutdownHook, - SupportedGatewayImplementations, + SupportedChain, } from "./../../../main/typescript/core/types"; const logLevel: LogLevelDesc = "INFO"; @@ -58,9 +58,9 @@ describe("SATPGateway initialization", () => { Crash: "v02", }, ]); - expect(identity.supportedChains).toEqual([ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, + expect(identity.supportedDLTs).toEqual([ + SupportedChain.FABRIC, + SupportedChain.BESU, ]); expect(identity.proofID).toBe("mockProofID1"); expect(identity.gatewayServerPort).toBe(3010); @@ -80,10 +80,7 @@ describe("SATPGateway initialization", () => { Crash: "v1", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", gatewayServerPort: 3010, address: "https://localhost", @@ -104,9 +101,9 @@ describe("SATPGateway initialization", () => { Crash: "v1", }, ]); - expect(identity.supportedChains).toEqual([ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, + expect(identity.supportedDLTs).toEqual([ + SupportedChain.FABRIC, + SupportedChain.BESU, ]); expect(identity.proofID).toBe("mockProofID10"); expect(identity.gatewayServerPort).toBe(3010); @@ -126,10 +123,7 @@ describe("SATPGateway initialization", () => { Crash: "v02", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", address: "https://localhost", }, @@ -158,10 +152,7 @@ describe("SATPGateway initialization", () => { Crash: "v02", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", gatewayServerPort: 3014, gatewayClientPort: 3015, @@ -205,7 +196,6 @@ describe("SATPGateway initialization", () => { }); }); - describe("SATPGateway startup", () => { it("initiates with default config", async () => { const options: SATPGatewayConfig = {}; @@ -224,9 +214,9 @@ describe("SATPGateway startup", () => { Crash: "v02", }, ]); - expect(identity.supportedChains).toEqual([ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, + expect(identity.supportedDLTs).toEqual([ + SupportedChain.FABRIC, + SupportedChain.BESU, ]); expect(identity.proofID).toBe("mockProofID1"); expect(identity.gatewayClientPort).toBe(3011); @@ -246,10 +236,7 @@ describe("SATPGateway startup", () => { Crash: "v1", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", gatewayClientPort: 3001, address: "https://localhost", @@ -270,9 +257,9 @@ describe("SATPGateway startup", () => { Crash: "v1", }, ]); - expect(identity.supportedChains).toEqual([ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, + expect(identity.supportedDLTs).toEqual([ + SupportedChain.FABRIC, + SupportedChain.BESU, ]); expect(identity.proofID).toBe("mockProofID10"); expect(identity.gatewayClientPort).toBe(3001); @@ -292,10 +279,7 @@ describe("SATPGateway startup", () => { Crash: "v02", }, ], - supportedChains: [ - SupportedGatewayImplementations.FABRIC, - SupportedGatewayImplementations.BESU, - ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", gatewayClientPort: 3010, address: "https://localhost", @@ -307,7 +291,7 @@ describe("SATPGateway startup", () => { const identity = gateway.Identity; expect(identity.gatewayClientPort).toBe(3010); expect(identity.address).toBe("https://localhost"); - await gateway.startupGatewayServer(); + await gateway.startup(); await gateway.shutdown(); }); }); From e923e5fc602d71ccb47506c5f102db2ef707e1f5 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 5 Jul 2024 15:18:17 +0100 Subject: [PATCH 18/49] chore(satp-hermes): rebase with cacti main Signed-off-by: Rafael Belchior --- packages/cactus-plugin-satp-hermes/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 4cfc88a16c..91229c7468 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -116,7 +116,7 @@ "express": "4.21.0", "fabric-network": "2.2.20", "kubo-rpc-client": "3.0.1", - "swagger-cli": "^4.0.4", + "swagger-cli": "4.0.4", "typescript": "5.5.2" }, "engines": { diff --git a/yarn.lock b/yarn.lock index c3f0dcdcce..5308881112 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10866,7 +10866,7 @@ __metadata: secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" - swagger-cli: "npm:^4.0.4" + swagger-cli: "npm:4.0.4" swagger-ui-express: "npm:5.0.0" typescript: "npm:5.5.2" typescript-optional: "npm:2.0.1" @@ -17885,12 +17885,12 @@ __metadata: linkType: hard "@types/readable-stream@npm:^4.0.0": - version: 4.0.15 - resolution: "@types/readable-stream@npm:4.0.15" + version: 4.0.14 + resolution: "@types/readable-stream@npm:4.0.14" dependencies: "@types/node": "npm:*" safe-buffer: "npm:~5.1.1" - checksum: 10/33a273dcd74bec84f0d7d507c0d719487f9d0b4f48cd9e3fd2b0c6e848f23ce0c6cac1250be03c94df29e78cfd29940aae80ed2a4407fe4188eb959d15b32646 + checksum: 10/5ec03edfc96653866d45c6dca54c16f890e7d1bf9ab837f520d056bd55de257a2c177ba9ba8831dae9ded73887ed4fd31320e5a6bb3b4304bf88ca59519b68c0 languageName: node linkType: hard @@ -48932,7 +48932,7 @@ __metadata: languageName: node linkType: hard -"swagger-cli@npm:^4.0.4": +"swagger-cli@npm:4.0.4": version: 4.0.4 resolution: "swagger-cli@npm:4.0.4" dependencies: From aadfbbc9bf4001405c777fe4a6ec4502e999d8ca Mon Sep 17 00:00:00 2001 From: Carlos Amaro <64661289+LordKubaya@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:45:00 +0100 Subject: [PATCH 19/49] feat(satp-hermes): satp development continuation and implementation satp protocol (#3397) Signed-off-by: Carlos Amaro --- .../package.json | 98 +- .../cactus-plugin-satp-hermes/package.json | 2 + .../proto/cacti/satp/v02/common/message.proto | 31 +- .../proto/cacti/satp/v02/common/session.proto | 58 +- .../main/proto/cacti/satp/v02/stage_1.proto | 1 + .../main/proto/cacti/satp/v02/stage_2.proto | 2 +- .../main/proto/cacti/satp/v02/stage_3.proto | 4 +- .../src/main/typescript/blo/dispatcher.ts | 6 + .../typescript/core/sender-satp-protocol.ts | 169 +++ .../core/stage-handlers/stage1-handler.ts | 110 +- .../core/stage-handlers/stage2-handler.ts | 140 +- .../core/stage-handlers/stage3-handler.ts | 309 +++-- .../client/stage1-client-service.ts | 8 +- .../client/stage2-client-service.ts | 511 +++---- .../client/stage3-client-service.ts | 1182 ++++++++++------- .../satp-bridge/satp-bridge-manager.ts | 26 - .../core/stage-services/satp-service.ts | 2 + .../server/stage1-server-service.ts | 85 +- .../server/stage2-server-service.ts | 487 +++---- .../server/stage3-server-service.ts | 1029 ++++++++------ .../src/main/typescript/core/types.ts | 10 +- ...ugin-factory-satp-hermes-bridge-manager.ts | 31 +- .../proto/cacti/satp/v02/common/message_pb.ts | 252 ++-- .../proto/cacti/satp/v02/common/session_pb.ts | 142 +- .../proto/cacti/satp/v02/stage_1_pb.ts | 6 + .../proto/cacti/satp/v02/stage_2_pb.ts | 8 +- .../proto/cacti/satp/v02/stage_3_pb.ts | 14 +- .../typescript/gol/satp-bridges-manager.ts | 92 ++ .../src/main/typescript/gol/satp-manager.ts | 55 +- .../typescript/plugin-satp-hermes-gateway.ts | 20 +- .../types/blockchain-interaction.ts | 5 - .../main/typescript/types/satp-protocol.ts | 8 +- yarn.lock | 139 +- 33 files changed, 3080 insertions(+), 1962 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts diff --git a/packages/cacti-plugin-weaver-driver-fabric/package.json b/packages/cacti-plugin-weaver-driver-fabric/package.json index c365cf17b6..7aad5f2c61 100644 --- a/packages/cacti-plugin-weaver-driver-fabric/package.json +++ b/packages/cacti-plugin-weaver-driver-fabric/package.json @@ -14,63 +14,47 @@ "bugs": { "url": "https://github.com/hyperledger-cacti/cacti/issues" }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperledger/cacti.git" + { + "name": "Venkatraman Ramakrishna", + "email": "vramakr2@in.ibm.com", + "url": "https://researcher.watson.ibm.com/researcher/view.php?person=in-vramakr2" }, - "license": "Apache-2.0", - "author": { - "name": "Hyperledger cacti Contributors", - "email": "cacti@lists.hyperledger.org", - "url": "https://www.hyperledger.org/use/cacti" + { + "name": "Sandeep Nishad", + "email": "sandeep.nishad1@ibm.com", + "url": "https://github.com/sandeepnRES" }, - "contributors": [ - { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", - "url": "https://example.com" - }, - { - "name": "Venkatraman Ramakrishna", - "email": "vramakr2@in.ibm.com", - "url": "https://researcher.watson.ibm.com/researcher/view.php?person=in-vramakr2" - }, - { - "name": "Sandeep Nishad", - "email": "sandeep.nishad1@ibm.com", - "url": "https://github.com/sandeepnRES" - }, - { - "name": "Krishnasuri Narayanam", - "email": "knaraya3@in.ibm.com", - "url": "https://research.ibm.com/people/krishnasuri-narayanam" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build": "cd src/main/typescript && make build", - "build-image": "cd src/main/typescript && make build-image", - "build-image-local": "cd src/main/typescript && make build-image-local", - "build-local": "cd src/main/typescript && make build-local", - "clean": "cd src/main/typescript && make clean", - "clean-local": "cd src/main/typescript && make clean-local", - "publish": "cd src/main/typescript && make push-image && make push-image-latest", - "postpublish": "cd src/main/typescript && make push-image-latest", - "watch": "npm-watch" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cacti-weaver-driver-fabric.web.umd.min.js", - "mainMinified": "dist/cacti-weaver-driver-fabric.node.umd.min.js", - "watch": {} + { + "name": "Krishnasuri Narayanam", + "email": "knaraya3@in.ibm.com", + "url": "https://research.ibm.com/people/krishnasuri-narayanam" + } + ], + "main": "dist/lib/main/typescript/index.js", + "module": "dist/lib/main/typescript/index.js", + "types": "dist/lib/main/typescript/index.d.ts", + "files": [ + "dist/*" + ], + "scripts": { + "build": "cd src/main/typescript && make build", + "build-image": "cd src/main/typescript && make build-image", + "build-image-local": "cd src/main/typescript && make build-image-local", + "build-local": "cd src/main/typescript && make build-local", + "clean": "cd src/main/typescript && make clean", + "clean-local": "cd src/main/typescript && make clean-local", + "publish": "cd src/main/typescript && make push-image && make push-image-latest", + "postpublish": "cd src/main/typescript && make push-image-latest", + "watch": "npm-watch" + }, + "engines": { + "node": ">=18", + "npm": ">=8" + }, + "publishConfig": { + "access": "public" + }, + "browserMinified": "dist/cacti-weaver-driver-fabric.web.umd.min.js", + "mainMinified": "dist/cacti-weaver-driver-fabric.node.umd.min.js", + "watch": {} } diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 91229c7468..e1f6d2f686 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -80,6 +80,8 @@ "@connectrpc/connect-node": "1.3.0", "@connectrpc/protoc-gen-connect-es": "1.3.0", "@bufbuild/protobuf": "1.10.0", + "@hyperledger/cactus-plugin-bungee-hermes": "2.0.0", + "axios": "1.7.7", "body-parser": "1.20.2", "class-transformer": "0.5.1", diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto index 14c27a18a3..b73dcc0c77 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -36,6 +36,8 @@ message TransferClaims { string receiver_gateway_owner_id = 12; uint32 max_retries = 13; uint64 max_timeout = 14; + string amount_from_originator = 15; + string amount_to_beneficiary = 16; } message TransferClaimsFormat { @@ -192,35 +194,40 @@ enum Error { ERROR_MESSAGE_OUT_OF_SEQUENCE = 11; } -message LockAssertionClaim { - -} -message LockAssertionFormat { +message LockAssertionClaimFormat { } -message MintAssertionClaims { +message MintAssertionClaimFormat { } -message MintAssertionClaimsFormat { +message BurnAssertionClaimFormat { } -message BurnAssertionClaim { +message AssignmentAssertionClaimFormat { } -message BurnAssertionClaimFormat { - +message LockAssertionClaim { + string receipt = 1; + string signature = 2; } -message AssignmentAssertionClaim { - +message MintAssertionClaim { + string receipt = 1; + string signature = 2; } -message AssignmentAssertionClaimFormat { +message BurnAssertionClaim { + string receipt = 1; + string signature = 2; +} +message AssignmentAssertionClaim { + string receipt = 1; + string signature = 2; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index 6ca77ac19d..9bfa59cc09 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -37,36 +37,40 @@ message SessionData { string sender_gateway_owner_id = 27; string receiver_gateway_owner_id = 28; string hash_transfer_init_claims = 29; - string proposed_transfer_init_claims = 30; - cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 31; - cacti.satp.v02.common.LockType lock_type = 32; - uint64 lock_expiration_time = 33; - cacti.satp.v02.common.Permissions permissions = 34; - string developer_urn = 35; - cacti.satp.v02.common.CredentialProfile credential_profile = 36; - cacti.satp.v02.common.SubsequentCalls subsequent_calls = 37; - repeated cacti.satp.v02.common.History history = 38; - bool multiple_claims_allowed = 39; - bool multiple_cancels_allowed = 40; - string last_message_received_timestamp = 41; - MessageStagesTimestamps processed_timestamps = 42; - MessageStagesTimestamps received_timestamps = 43; - cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 44; - cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 45; - cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 46; - cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 47; - cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 48; - cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 49; - cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 50; - cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 51; - bool completed = 52; - ACCEPTANCE acceptance = 53; - string last_message_hash = 54; - cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 55; + cacti.satp.v02.common.TransferClaims transfer_init_claims = 30; + string proposed_transfer_init_claims = 31; + cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 32; + cacti.satp.v02.common.LockType lock_type = 33; + uint64 lock_expiration_time = 34; + cacti.satp.v02.common.Permissions permissions = 35; + string developer_urn = 36; + cacti.satp.v02.common.CredentialProfile credential_profile = 37; + cacti.satp.v02.common.SubsequentCalls subsequent_calls = 38; + repeated cacti.satp.v02.common.History history = 39; + bool multiple_claims_allowed = 40; + bool multiple_cancels_allowed = 41; + string last_message_received_timestamp = 42; + MessageStagesTimestamps processed_timestamps = 43; + MessageStagesTimestamps received_timestamps = 44; + cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 45; + cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 46; + cacti.satp.v02.common.MintAssertionClaim mint_assertion_claim = 47; + cacti.satp.v02.common.MintAssertionClaimFormat mint_assertion_claim_format = 48; + cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 49; + cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 50; + cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 51; + cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 52; + bool completed = 53; + ACCEPTANCE acceptance = 54; + string last_message_hash = 55; + cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 56; + string client_transfer_number = 57; + string server_transfer_number = 58; + string lock_assertion_expiration = 59; + cacti.satp.v02.common.AssetProfile asset_profile = 60; } - message MessageStagesHashes { Stage1Hashes stage1 = 1; Stage2Hashes stage2 = 2; diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto index 5b7aa8493e..1423e41242 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto @@ -28,6 +28,7 @@ message TransferCommenceRequestMessage { message TransferCommenceResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; + string server_transfer_number = 2; } service SatpStage1Service { diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto index 27863c71c1..8e946b4b91 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto @@ -9,7 +9,7 @@ import "cacti/satp/v02/common/message.proto"; message LockAssertionRequestMessage { cacti.satp.v02.common.CommonSatp common = 1; cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 2; - cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 3; + cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 3; string lock_assertion_expiration = 4; string client_transfer_number = 5; string client_signature = 6; diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto index 78edd2f1b3..11ff12313a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto @@ -13,8 +13,8 @@ message CommitPreparationRequestMessage { message CommitReadyResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; - cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 2; - cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 3; + cacti.satp.v02.common.MintAssertionClaim mint_assertion_claim = 2; + cacti.satp.v02.common.MintAssertionClaimFormat mint_assertion_claim_format = 3; string server_transfer_number = 4; string server_signature = 5; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 7a146527d2..5299cb2b9d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -20,6 +20,7 @@ import { import { ExecuteGetStatus } from "./admin/get-status-handler-service"; import { ISATPManagerOptions, SATPManager } from "../gol/satp-manager"; import { GatewayOrchestrator } from "../gol/gateway-orchestrator"; +import { SATPBridgesManager } from "../gol/satp-bridges-manager"; export interface BLODispatcherOptions { logger: Logger; @@ -27,6 +28,7 @@ export interface BLODispatcherOptions { instanceId: string; orchestrator: GatewayOrchestrator; signer: JsObjectSigner; + bridgesManager: SATPBridgesManager; } export class BLODispatcher { @@ -36,6 +38,7 @@ export class BLODispatcher { private readonly instanceId: string; private manager: SATPManager; private orchestrator: GatewayOrchestrator; + private bridgeManager: SATPBridgesManager; constructor(public readonly options: BLODispatcherOptions) { const fnTag = `${BLODispatcher.CLASS_NAME}#constructor()`; @@ -50,11 +53,14 @@ export class BLODispatcher { const signer = options.signer; const ourGateway = this.orchestrator.ourGateway; + this.bridgeManager = options.bridgesManager; + const SATPManagerOpts: ISATPManagerOptions = { logLevel: "DEBUG", instanceId: ourGateway!.id, signer: signer, supportedDLTs: this.orchestrator.supportedDLTs, + bridgeManager: this.bridgeManager, }; this.manager = new SATPManager(SATPManagerOpts); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts new file mode 100644 index 0000000000..62b6f2fb2b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts @@ -0,0 +1,169 @@ +import { createPromiseClient } from "@connectrpc/connect"; +import { + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; +import { createConnectTransport } from "@connectrpc/connect-node"; +import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; +import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; +import { SATPManager } from "../gol/satp-manager"; +import { SATPSession } from "./satp-session"; +import { SATPHandler } from "../types/satp-protocol"; +import { Stage1SATPHandler } from "./stage-handlers/stage1-handler"; +import { Stage2SATPHandler } from "./stage-handlers/stage2-handler"; +import { Stage3SATPHandler } from "./stage-handlers/stage3-handler"; + +export interface ISenderSATPProtocolOptions { + logLevel?: LogLevelDesc; + serverPath: string; + sessionId: string; + satpManager: SATPManager; +} + +export interface SATPTransferRequest { + sessionId: string; +} + +export class SenderSATPProtocol { + public static readonly CLASS_NAME = "SenderSATPProtocol"; + + private satpManager: SATPManager; + + readonly log: Logger; + constructor(private config: ISenderSATPProtocolOptions) { + this.log = LoggerProvider.getOrCreate({ + label: SenderSATPProtocol.CLASS_NAME, + level: config.logLevel || "INFO", + }); + this.satpManager = config.satpManager; + } + + public async initiateTransfer(session: SATPSession): Promise { + this.log.info(`Initiating Transfer`); + this.log.info(`Session: ${JSON.stringify(session)}`); + + if (!session) { + throw new Error(`Session with id ${this.config.sessionId} not found`); + } + + const transport = createConnectTransport({ + baseUrl: this.config.serverPath, + httpVersion: "1.1", + }); + + const handlers = this.satpManager.getSATPHandlers( + session.getSessionData().id, + ); + + if (!handlers) { + throw new Error( + `No handlers found for session ${session.getSessionData().id}`, + ); + } + + const satpHandlers: Map = handlers; + + const clientSatpStage1 = createPromiseClient(SatpStage1Service, transport); + const clientSatpStage2 = createPromiseClient(SatpStage2Service, transport); + const clientSatpStage3 = createPromiseClient(SatpStage3Service, transport); + + const requestTransferProposal = await ( + satpHandlers.get("Stage1SATPHandler") as Stage1SATPHandler + ).TransferProposalRequest(); + + if (!requestTransferProposal) { + throw new Error(`Failed to create TransferProposalRequest`); + } + + const responseTransferProposal = await clientSatpStage1.transferProposal( + requestTransferProposal, + ); + + this.log.info( + `responseTransferProposal: ${JSON.stringify(responseTransferProposal)}`, + ); + + const requestTransferCommence = await ( + satpHandlers.get("Stage1SATPHandler") as Stage1SATPHandler + ).TransferCommenceRequest(responseTransferProposal); + + if (!requestTransferCommence) { + throw new Error(`Failed to create TransferCommenceRequest`); + } + + const responseTransferCommence = await clientSatpStage1.transferCommence( + requestTransferCommence, + ); + + this.log.info( + `responseTransferCommence: ${JSON.stringify(responseTransferCommence)}`, + ); + + this.log.info(`Stage 1 completed`); + + const requestLockAssertion = await ( + satpHandlers.get("Stage2SATPHandler") as Stage2SATPHandler + ).LockAssertionRequest(responseTransferCommence); + + if (!requestLockAssertion) { + throw new Error(`Failed to create LockAssertionRequest`); + } + + const responseLockAssertion = + await clientSatpStage2.lockAssertion(requestLockAssertion); + + this.log.info( + `responseLockAssertion: ${JSON.stringify(responseLockAssertion)}`, + ); + + this.log.info(`Stage 2 completed`); + + const requestCommitPreparation = await ( + satpHandlers.get("Stage3SATPHandler") as Stage3SATPHandler + ).CommitPreparationRequest(responseLockAssertion); + + if (!requestCommitPreparation) { + throw new Error(`Failed to create CommitPreparationRequest`); + } + + const responseCommitPreparation = await clientSatpStage3.commitPreparation( + requestCommitPreparation, + ); + this.log.info( + `responseCommitPreparation: ${JSON.stringify(responseCommitPreparation)}`, + ); + + const requestCommitFinalAssertion = await ( + satpHandlers.get("Stage3SATPHandler") as Stage3SATPHandler + ).CommitFinalAssertionRequest(responseLockAssertion); + + if (!requestCommitFinalAssertion) { + throw new Error(`Failed to create CommitFinalAssertionRequest`); + } + + const responseCommitFinalAssertion = + await clientSatpStage3.commitFinalAssertion(requestCommitFinalAssertion); + this.log.info( + `responseCommitFinalAssertion: ${JSON.stringify(responseCommitFinalAssertion)}`, + ); + + const RequestTransferComplete = await ( + satpHandlers.get("Stage3SATPHandler") as Stage3SATPHandler + ).TransferCompleteRequest(responseCommitFinalAssertion); + + if (!RequestTransferComplete) { + throw new Error(`Failed to create TransferCompleteRequest`); + } + + const responseTransferComplete = await clientSatpStage3.transferComplete( + RequestTransferComplete, + ); + this.log.info( + `responseTransferComplete: ${JSON.stringify(responseTransferComplete)}`, + ); + + this.log.info(`Stage 3 completed`); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 942acd3ff9..884b514f36 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -34,11 +34,23 @@ export class Stage1SATPHandler implements SATPHandler { return Stage1SATPHandler.CLASS_NAME; } - async TransferProposalImplementation( + getSessionId(): string { + return this.session.getSessionData().id; + } + + public get Log(): Logger { + return this.logger; + } + + private async TransferProposalImplementation( req: TransferProposalRequestMessage, + context: HandlerContext, ): Promise { + const stepTag = `TransferProposalImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { - console.log("Received TransferProposalRequest", req); + this.Log.debug(`${fnTag}, Transfer Proposal...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); const sessionData = await this.serverService.checkTransferProposalRequestMessage( req, @@ -49,21 +61,27 @@ export class Stage1SATPHandler implements SATPHandler { req, this.session, ); - console.log("message", message); - console.log("Returning response", sessionData); - const response = new TransferProposalReceiptMessage(); - return response; + this.Log.debug(`${fnTag}, Returning response: ${message}`); + this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); + + if (!message) { + throw new Error(`${fnTag}, Failed to create TransferProposalReceipt`); + } + return message; } catch (error) { - console.error("Error handling TransferProposalRequest:", error); - throw new Error("Failed to process TransferProposalRequest"); + throw new Error(`${fnTag}, Failed to process TransferProposal ${error}`); } } - async TransferCommenceImplementation( + private async TransferCommenceImplementation( req: TransferCommenceRequestMessage, + context: HandlerContext, ): Promise { + const stepTag = `TransferProposalImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { - console.log("Received TransferCommenceRequest", req); + this.Log.debug(`${fnTag}, Transfer Commence...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); const sessionData = await this.serverService.checkTransferCommenceRequestMessage( req, @@ -73,13 +91,17 @@ export class Stage1SATPHandler implements SATPHandler { req, this.session, ); - console.log("Returning response", message); - console.log("Returning response", sessionData); - const response = new TransferProposalReceiptMessage(); - return response; + this.Log.debug(`${fnTag}, Returning response: ${message}`); + this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); + + if (!message) { + throw new Error(`${fnTag}, Failed to create TransferCommenceResponse`); + } + return message; } catch (error) { - console.error("Error handling TransferCommenceRequest:", error); - throw new Error("Failed to process TransferCommenceRequest"); + throw new Error( + `${fnTag}, Failed to process TransferCommenceRequest ${error}`, + ); } } @@ -89,4 +111,60 @@ export class Stage1SATPHandler implements SATPHandler { transferCommence: this.TransferCommenceImplementation, }); } + + //client side + public async TransferProposalRequest(): Promise { + const stepTag = `TransferProposalRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Transfer Proposal Request...`); + const requestTransferProposal = + await this.clientService.transferProposalRequest( + this.session, + this.supportedDLTs, + ); + + if (!requestTransferProposal) { + throw new Error(`${fnTag}, Failed to create TransferProposalRequest`); + } + return requestTransferProposal; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process TransferProposalRequest ${error}`, + ); + } + } + + //client side + public async TransferCommenceRequest( + response: TransferProposalReceiptMessage, + ): Promise { + const stepTag = `TransferProposalRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Transfer Commence Request...`); + this.Log.debug(`${fnTag}, Response: ${response}`); + + await this.clientService.checkTransferProposalReceiptMessage( + response, + this.session, + ); + + const requestTransferCommence = + await this.clientService.transferCommenceRequest( + response, + this.session, + ); + + if (!requestTransferCommence) { + throw new Error(`${fnTag}, Failed to create TransferCommenceRequest`); + } + + return requestTransferCommence; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process TransferCommenceRequest ${error}`, + ); + } + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index 9159b4eef2..dcccccdd74 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -1,58 +1,110 @@ -/* import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; -import { LockAssertionRequestMessage } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; -import { SATPGateway } from "../../plugin-satp-hermes-gateway"; import { Stage2ServerService } from "../stage-services/server/stage2-server-service"; -import { TimestampType, saveTimestamp } from "../session-utils"; -import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; import { SATPSession } from "../satp-session"; -import { ServiceType } from "@bufbuild/protobuf"; import { SupportedChain } from "../types"; +import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { + LockAssertionReceiptMessage, + LockAssertionRequestMessage, +} from "../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { Stage2ClientService } from "../stage-services/client/stage2-client-service"; +import { TransferCommenceResponseMessage } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; +export class Stage2SATPHandler implements SATPHandler { + public static readonly CLASS_NAME = "Stage2SATPHandler"; + private session: SATPSession; + private serverService: Stage2ServerService; + private clientService: Stage2ClientService; + private supportedDLTs: SupportedChain[]; + private logger: Logger; -export const Stage2Handler = - ( - session: SATPSession, - service: Stage2ServerService, - connectClients: ServiceType[], - supportedDLTs: SupportedChain[], - ) => - (router: ConnectRouter) => - router.service(SatpStage2Service, { - async lockAssertion( - req: LockAssertionRequestMessage, - context: HandlerContext, - ) { - console.log("Received LockAssertionRequest", req, context); - const recvTimestamp: string = Date.now().toString(); - - const sessionData = await service.checkLockAssertionRequestMessage( - req, - session, - ); + constructor(ops: SATPHandlerOptions) { + this.session = ops.session; + this.serverService = ops.serverService as Stage2ServerService; + this.clientService = ops.clientService as Stage2ClientService; + this.supportedDLTs = ops.supportedDLTs; + this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); + this.logger.trace(`Initialized ${Stage2SATPHandler.CLASS_NAME}`); + } - saveTimestamp( - sessionData, - MessageType.LOCK_ASSERT, - TimestampType.RECEIVED, - recvTimestamp, - ); + public get Log(): Logger { + return this.logger; + } - const message = await service.lockAssertionResponse(req, session); + getHandlerIdentifier(): string { + return Stage2SATPHandler.CLASS_NAME; + } - if (!message) { - throw new Error("No message returned from lockAssertionResponse"); - } + getSessionId(): string { + return this.session.getSessionData().id; + } - saveTimestamp( - sessionData, - MessageType.ASSERTION_RECEIPT, - TimestampType.PROCESSED, + async LockAssertionImplementation( + req: LockAssertionRequestMessage, + context: HandlerContext, + ): Promise { + const stepTag = `LockAssertionImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Lock Assertion...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + const sessionData = + await this.serverService.checkLockAssertionRequestMessage( + req, + this.session, ); + const message = await this.serverService.lockAssertionResponse( + req, + this.session, + ); + this.Log.debug(`${fnTag}, Returning response: ${message}`); + this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); - console.log("Returning response", message); + if (!message) { + throw new Error(`${fnTag}, Failed to create LockAssertionReceipt`); + } + return message; + } catch (error) { + throw new Error(`${fnTag}, Failed to process LockAssertion ${error}`); + } + } - return message; - }, + setupRouter(router: ConnectRouter): void { + router.service(SatpStage2Service, { + lockAssertion: this.LockAssertionImplementation, }); -*/ + } + + //client side + async LockAssertionRequest( + response: TransferCommenceResponseMessage, + ): Promise { + const stepTag = `LockAssertionRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Lock Assertion Request Message...`); + this.Log.debug(`${fnTag}, Response: ${response}`); + await this.clientService.checkTransferCommenceResponseMessage( + response, + this.session, + ); + + await this.clientService.lockAsset(this.session); + + const request = await this.clientService.lockAssertionRequest( + response, + this.session, + ); + + if (!request) { + throw new Error(`${fnTag}, Failed to create LockAssertionRequest`); + } + return request; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process LockAssertionRequest ${error}`, + ); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index d967e99a33..c53f2b1941 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -1,118 +1,237 @@ -/* import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; import { + CommitFinalAcknowledgementReceiptResponseMessage, CommitFinalAssertionRequestMessage, CommitPreparationRequestMessage, + CommitReadyResponseMessage, TransferCompleteRequestMessage, } from "../../generated/proto/cacti/satp/v02/stage_3_pb"; -import { Empty, ServiceType } from "@bufbuild/protobuf"; import { Stage3ServerService } from "../stage-services/server/stage3-server-service"; -import { SATPGateway } from "../../plugin-satp-hermes-gateway"; -import { TimestampType, saveTimestamp } from "../session-utils"; -import { MessageType } from "../../generated/proto/cacti/satp/v02/common/message_pb"; import { SATPSession } from "../satp-session"; import { SupportedChain } from "../types"; - -export const Stage3Handler = - ( - session: SATPSession, - service: Stage3ServerService, - connectClients: ServiceType[], - supportedDLTs: SupportedChain[], - ) => - (router: ConnectRouter) => - router.service(SatpStage3Service, { - async commitPreparation( - req: CommitPreparationRequestMessage, - context: HandlerContext, - ) { - console.log("Received CommitPreparationRequest", req, context); - const recvTimestamp: string = Date.now().toString(); - - const sessionData = await service.checkCommitPreparationRequestMessage( +import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { Empty } from "@bufbuild/protobuf"; +import { Stage3ClientService } from "../stage-services/client/stage3-client-service"; + +export class Stage3SATPHandler implements SATPHandler { + public static readonly CLASS_NAME = "Stage3SATPHandler"; + private session: SATPSession; + private clientService: Stage3ClientService; + private serverService: Stage3ServerService; + private supportedDLTs: SupportedChain[]; + private logger: Logger; + + constructor(ops: SATPHandlerOptions) { + this.session = ops.session; + this.serverService = ops.serverService as Stage3ServerService; + this.clientService = ops.clientService as Stage3ClientService; + this.supportedDLTs = ops.supportedDLTs; + this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); + this.logger.trace(`Initialized ${Stage3SATPHandler.CLASS_NAME}`); + } + + getHandlerIdentifier(): string { + return Stage3SATPHandler.CLASS_NAME; + } + + getSessionId(): string { + return this.session.getSessionData().id; + } + + public get Log(): Logger { + return this.logger; + } + + async CommitPreparationImplementation( + req: CommitPreparationRequestMessage, + context: HandlerContext, + ): Promise { + const stepTag = `CommitPreparationImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Commit Preparation...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + const sessionData = + await this.serverService.checkCommitPreparationRequestMessage( req, - session, + this.session, ); - saveTimestamp( - sessionData, - MessageType.COMMIT_PREPARE, - TimestampType.RECEIVED, - recvTimestamp, - ); - - const message = await service.commitReady(req, session); - - if (!message) { - throw new Error("No message returned from commitPreparation"); - } - - saveTimestamp( - sessionData, - MessageType.COMMIT_READY, - TimestampType.PROCESSED, - ); - - console.log("Returning response", message); - - return message; - }, - async commitFinalAssertion( - req: CommitFinalAssertionRequestMessage, - context: HandlerContext, - ) { - console.log("Received CommitFinalAssertionRequest", req, context); - const recvTimestamp: string = Date.now().toString(); - - const sessionData = - await service.checkCommitFinalAssertionRequestMessage(req, session); - - saveTimestamp( - sessionData, - MessageType.COMMIT_FINAL, - TimestampType.RECEIVED, - recvTimestamp, - ); - - const message = await service.commitFinalAcknowledgementReceiptResponse( + await this.serverService.mintAsset(this.session); + + const message = await this.serverService.commitReady(req, this.session); + + this.Log.debug(`${fnTag}, Returning response: ${message}`); + this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); + + const response = new CommitReadyResponseMessage(); + return response; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process CommitPreparationRequest ${error}`, + ); + } + } + + async CommitFinalAssertionImplementation( + req: CommitFinalAssertionRequestMessage, + context: HandlerContext, + ): Promise { + const stepTag = `CommitFinalAssertionImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Commit Final Assertion...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + const sessionData = + await this.serverService.checkCommitFinalAssertionRequestMessage( req, - session, + this.session, ); - if (!message) { - throw new Error("No message returned from commitFinalAssertion"); - } + await this.serverService.assignAsset(this.session); - saveTimestamp( - sessionData, - MessageType.ACK_COMMIT_FINAL, - TimestampType.PROCESSED, + const message = + await this.serverService.commitFinalAcknowledgementReceiptResponse( + req, + this.session, ); - - return message; - }, - async transferComplete( - req: TransferCompleteRequestMessage, - context: HandlerContext, - ) { - console.log("Received TransferCompleteRequest", req, context); - const recvTimestamp: string = Date.now().toString(); - - const sessionData = await service.checkTransferCompleteRequestMessage( + this.Log.debug(`${fnTag}, Returning response: ${message}`); + this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); + + const response = new CommitFinalAcknowledgementReceiptResponseMessage(); + return response; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process CommitFinalAssertionRequest ${error}`, + ); + } + } + + async TransferCompleteImplementation( + req: TransferCompleteRequestMessage, + context: HandlerContext, + ): Promise { + const stepTag = `CommitFinalAssertionImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Transfer Complete...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + const sessionData = + await this.serverService.checkTransferCompleteRequestMessage( req, - session, + this.session, ); - saveTimestamp( - sessionData, - MessageType.COMMIT_TRANSFER_COMPLETE, - TimestampType.RECEIVED, - recvTimestamp, - ); + this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); + + return new Empty({}); + } catch (error) { + throw new Error( + `${fnTag}, Failed to process TransferCompleteRequest ${error}`, + ); + } + } - console.log("Returning empty response"); - return new Empty({}); - }, + setupRouter(router: ConnectRouter): void { + router.service(SatpStage3Service, { + commitPreparation: this.CommitPreparationImplementation, + commitFinalAssertion: this.CommitFinalAssertionImplementation, + transferComplete: this.TransferCompleteImplementation, }); -*/ + } + + //client side + + async CommitPreparationRequest( + response: CommitReadyResponseMessage, + ): Promise { + const stepTag = `CommitPreparationRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Commit Preparation Request...`); + this.Log.debug(`${fnTag}, Response: ${response}`); + await this.clientService.checkCommitReadyResponseMessage( + response, + this.session, + ); + + const request = await this.clientService.commitPreparation( + response, + this.session, + ); + + if (!request) { + throw new Error(`${fnTag}, Failed to create TransferProposalRequest`); + } + return request; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process commitPreparationRequest ${error}`, + ); + } + } + + async CommitFinalAssertionRequest( + response: CommitReadyResponseMessage, + ): Promise { + const stepTag = `CommitFinalAssertionRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Commit Preparation Request...`); + this.Log.debug(`${fnTag}, Response: ${response}`); + await this.clientService.checkCommitReadyResponseMessage( + response, + this.session, + ); + + await this.clientService.burnAsset(this.session); + + const request = await this.clientService.commitFinalAssertion( + response, + this.session, + ); + + if (!request) { + throw new Error( + `${fnTag}, Failed to create CommitFinalAssertionRequest`, + ); + } + return request; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process CommitFinalAssertionRequest ${error}`, + ); + } + } + + async TransferCompleteRequest( + response: CommitFinalAcknowledgementReceiptResponseMessage, + ): Promise { + const stepTag = `TransferCompleteRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Transfer Complete Request...`); + this.Log.debug(`${fnTag}, Response: ${response}`); + await this.clientService.checkCommitFinalAcknowledgementReceiptResponseMessage( + response, + this.session, + ); + + const request = await this.clientService.transferComplete( + response, + this.session, + ); + + if (!request) { + throw new Error(`${fnTag}, Failed to create TransferCompleteRequest`); + } + return request; + } catch (error) { + throw new Error( + `${fnTag}, Failed to process TransferCompleteRequest ${error}`, + ); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 1d8b10cf26..239b92132b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -49,12 +49,12 @@ export class Stage1ClientService extends SATPService { } async transferProposalRequest( - sessionID: string, session: SATPSession, supportedDLTs: SupportedChain[], ): Promise { const stepTag = `transferProposalRequest()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, transferProposalRequest...`); const sessionData = session.getSessionData(); @@ -209,6 +209,7 @@ export class Stage1ClientService extends SATPService { ): Promise { const stepTag = `transferCommenceRequest()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, transferCommenceRequest...`); if (!response || !response.common) { throw new Error("Response or response.common is undefined"); @@ -281,6 +282,7 @@ export class Stage1ClientService extends SATPService { ): Promise { const stepTag = `checkTransferProposalReceiptMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkTransferProposalReceiptMessage...`); if (response.common == undefined) { throw new Error(`${fnTag}, message has no satp common body`); } @@ -386,13 +388,13 @@ export class Stage1ClientService extends SATPService { return true; } else { this.Log.info( - `TransferProposalReceipt proposedTransferClaims were rejected`, + `${fnTag}, TransferProposalReceipt proposedTransferClaims were rejected`, ); sessionData.completed = true; return false; } } - this.Log.info(`TransferProposalReceipt passed all checks.`); + this.Log.info(`${fnTag}, TransferProposalReceipt passed all checks.`); return true; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 9cbdce756e..9a9887506d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -1,233 +1,278 @@ -// import { -// JsObjectSigner, -// Logger, -// LoggerProvider, -// } from "@hyperledger/cactus-common"; -// import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; -// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -// import { SATP_VERSION } from "../../constants"; -// import { -// CommonSatp, -// MessageType, -// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -// import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -// import { -// bufArray2HexStr, -// getHash, -// sign, -// storeLog, -// verifySignature, -// } from "../../../gateway-utils"; -// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -// import { SATPSession } from "../../../core/satp-session"; -// import { -// SATPService, -// ISATPClientServiceOptions, -// SATPServiceType, -// } from "../../../types/satp-protocol"; - -// export class Stage2ClientService implements SATPService { -// public static readonly CLASS_NAME = "client-service"; -// public static readonly SATP_STAGE = "stage-2"; -// public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; - -// private _log: Logger; -// private signer: JsObjectSigner; - -// constructor(ops: ISATPClientServiceOptions) { -// const level = ops.logLevel || "INFO"; -// const label = this.getServiceIdentifier(); -// this._log = LoggerProvider.getOrCreate({ level, label }); -// this.signer = ops.signer; -// } - -// public get className(): string { -// return Stage2ClientService.CLASS_NAME; -// } - -// public get stage(): string { -// return Stage2ClientService.SATP_STAGE; -// } - -// public get log(): Logger { -// return this._log; -// } - -// public get serviceType(): SATPServiceType { -// return SATPServiceType.Client; -// } - -// public getServiceIdentifier(): string { -// return `${this.className}#${this.serviceType}`; -// } - -// async lockAssertionRequest( -// response: TransferCommenceResponseMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#lockAssertionRequest()`; -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); - -// const commonBody = new CommonSatp(); -// commonBody.version = sessionData.version; -// commonBody.messageType = MessageType.LOCK_ASSERT; -// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.TRANSFER_COMMENCE_RESPONSE, -// ); - -// commonBody.sessionId = response.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const lockAssertionRequestMessage = new LockAssertionRequestMessage(); -// lockAssertionRequestMessage.common = commonBody; - -// lockAssertionRequestMessage.lockAssertionClaim = -// sessionData.lockAssertionClaim; -// lockAssertionRequestMessage.lockAssertionFormat = -// sessionData.lockAssertionFormat; - -// const messageSignature = bufArray2HexStr( -// sign(this.signer, JSON.stringify(lockAssertionRequestMessage)), -// ); - -// lockAssertionRequestMessage.common.signature = messageSignature; - -// saveSignature(sessionData, MessageType.LOCK_ASSERT, messageSignature); - -// saveHash( -// sessionData, -// MessageType.LOCK_ASSERT, -// getHash(lockAssertionRequestMessage), -// ); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "lockAssertionRequest", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ -// this.log.info(`${fnTag}, sending LockAssertionMessage...`); - -// return lockAssertionRequestMessage; -// } - -// checkTransferCommenceResponseMessage( -// response: TransferCommenceResponseMessage, -// session: SATPSession, -// ): void { -// const fnTag = `${this.className}#lockAssertionRequestMessage()`; - -// if ( -// response.common == undefined || -// response.common.version == undefined || -// response.common.messageType == undefined || -// response.common.sessionId == undefined || -// // request.common.transferContextId == undefined || -// response.common.sequenceNumber == undefined || -// response.common.resourceUrl == undefined || -// // request.common.actionResponse == undefined || -// // request.common.payloadProfile == undefined || -// // request.common.applicationProfile == undefined || -// response.common.signature == undefined || -// response.common.clientGatewayPubkey == undefined || -// response.common.serverGatewayPubkey == undefined -// ) { -// throw new Error( -// `${fnTag}, message satp common body is missing or is missing required fields`, -// ); -// } - -// if (response.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, unsupported SATP version`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.serverGatewayPubkey == undefined || -// sessionData.lastSequenceNumber == undefined -// ) { -// throw new Error(`${fnTag}, session data was not load correctly`); -// } - -// if ( -// response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey -// ) { -// throw new Error( -// `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, -// ); -// } - -// if ( -// response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey -// ) { -// throw new Error( -// `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, -// ); -// } - -// if ( -// !verifySignature( -// this.signer, -// response.common, -// response.common.serverGatewayPubkey, -// ) -// ) { -// throw new Error( -// `${fnTag}, TransferCommenceResponse message signature verification failed`, -// ); -// } - -// if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { -// throw new Error( -// `${fnTag}, wrong message type for TransferCommenceResponse `, -// ); -// } - -// if ( -// response.common.sequenceNumber != -// sessionData.lastSequenceNumber + BigInt(1) -// ) { -// throw new Error( -// `${fnTag}, TransferCommenceResponse sequence number is wrong`, -// ); -// } - -// if ( -// response.common.hashPreviousMessage != -// getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) -// ) { -// throw new Error( -// `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, -// ); -// } - -// this.log.info(`TransferCommenceResponse passed all checks.`); -// } -// } +import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { SATP_VERSION } from "../../constants"; +import { + CommonSatp, + LockAssertionClaim, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { SATPSession } from "../../../core/satp-session"; +import { + SATPService, + ISATPClientServiceOptions, + SATPServiceType, +} from "../satp-service"; +import { ISATPServiceOptions } from "../satp-service"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; + +export class Stage2ClientService extends SATPService { + public static readonly SATP_STAGE = "2"; + public static readonly SERVICE_TYPE = SATPServiceType.Client; + + private bridgeManager: SATPBridgesManager; + + constructor(ops: ISATPClientServiceOptions) { + const commonOptions: ISATPServiceOptions = { + stage: Stage2ClientService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage2ClientService.SERVICE_TYPE, + bridgeManager: ops.bridgeManager, + }; + super(commonOptions); + + if (ops.bridgeManager == undefined) { + throw new Error( + `${this.getServiceIdentifier()}#constructor(), bridgeManager is missing`, + ); + } + this.bridgeManager = ops.bridgeManager; + } + + async lockAssertionRequest( + response: TransferCommenceResponseMessage, + session: SATPSession, + ): Promise { + const stepTag = `lockAssertionRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, lockAssertionRequest...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.LOCK_ASSERT; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + ); + + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const lockAssertionRequestMessage = new LockAssertionRequestMessage(); + lockAssertionRequestMessage.common = commonBody; + + lockAssertionRequestMessage.lockAssertionClaim = + sessionData.lockAssertionClaim; + lockAssertionRequestMessage.lockAssertionClaimFormat = + sessionData.lockAssertionClaimFormat; + + if (sessionData.transferContextId != undefined) { + lockAssertionRequestMessage.common.transferContextId = + sessionData.transferContextId; + } + if (sessionData.clientTransferNumber != undefined) { + lockAssertionRequestMessage.clientTransferNumber = + sessionData.clientTransferNumber; + } + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(lockAssertionRequestMessage)), + ); + + lockAssertionRequestMessage.common.signature = messageSignature; + + saveSignature(sessionData, MessageType.LOCK_ASSERT, messageSignature); + + saveHash( + sessionData, + MessageType.LOCK_ASSERT, + getHash(lockAssertionRequestMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "lockAssertionRequest", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info(`${fnTag}, sending LockAssertionMessage...`); + + return lockAssertionRequestMessage; + } + + checkTransferCommenceResponseMessage( + response: TransferCommenceResponseMessage, + session: SATPSession, + ): void { + const stepTag = `checkTransferCommenceResponseMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkTransferCommenceResponseMessage...`); + + if ( + response.common == undefined || + response.common.version == undefined || + response.common.messageType == undefined || + response.common.sessionId == undefined || + response.common.sequenceNumber == undefined || + response.common.resourceUrl == undefined || + response.common.signature == undefined || + response.common.clientGatewayPubkey == undefined || + response.common.serverGatewayPubkey == undefined || + response.common.hashPreviousMessage == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not load correctly`); + } + + if ( + response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, + ); + } + + if ( + response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + this.Signer, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse message signature verification failed`, + ); + } + + if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { + throw new Error( + `${fnTag}, wrong message type for TransferCommenceResponse `, + ); + } + + if ( + response.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse sequence number is wrong`, + ); + } + + if ( + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) + ) { + throw new Error( + `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, + ); + } + + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error( + `${fnTag}, transferContextId does not match the one that was sent`, + ); + } + + if (response.serverTransferNumber != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: serverTransferNumber...`, + ); + sessionData.serverTransferNumber = response.serverTransferNumber; + } + + this.Log.info(`${fnTag}, TransferCommenceResponse passed all checks.`); + } + + async lockAsset(session: SATPSession): Promise { + const stepTag = `lockAsset()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + try { + this.Log.info(`${fnTag}, Locking Asset...`); + const sessionData = session.getSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; + const amount = sessionData.transferInitClaims?.amountFromOriginator; + + this.Log.debug(`${fnTag}, Lock Asset ID: ${assetId} amount: ${amount}`); + if (assetId == undefined) { + throw new Error(`${fnTag}, Asset ID is missing`); + } + + // const bridge = this.bridgeManager.getBridge( + // sessionData.senderGatewayNetworkId, + // ); + + // sessionData.lockAssertionClaim = new LockAssertionClaim(); + // sessionData.lockAssertionClaim.receipt = await bridge.lockAsset( + // assetId, + // Number(amount), + // ); + + // sessionData.lockAssertionClaim.signature = bufArray2HexStr( + // sign(this.Signer, sessionData.lockAssertionClaim.receipt), + // ); + } catch (error) { + throw new Error(`${fnTag}, Failed to process Lock Asset ${error}`); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index e407e98d5e..8f07ceffa7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -1,516 +1,666 @@ -// import { -// JsObjectSigner, -// Logger, -// LoggerProvider, -// } from "@hyperledger/cactus-common"; -// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -// import { -// CommonSatp, -// MessageType, -// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -// import { SATP_VERSION } from "../../constants"; -// import { -// CommitFinalAcknowledgementReceiptResponseMessage, -// CommitFinalAssertionRequestMessage, -// CommitPreparationRequestMessage, -// CommitReadyResponseMessage, -// TransferCompleteRequestMessage, -// } from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; -// import { -// bufArray2HexStr, -// getHash, -// sign, -// storeLog, -// verifySignature, -// } from "../../../gateway-utils"; -// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -// import { -// SATPService, -// ISATPClientServiceOptions, -// SATPServiceType, -// } from "../../../types/satp-protocol"; -// import { SATPSession } from "../../satp-session"; -// import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; - -// export class Stage3ClientService implements SATPService { -// public static readonly CLASS_NAME = "client-service"; -// public static readonly SATP_STAGE = "stage-3"; -// public static readonly SATP_SERVICE_TYPE = SATPServiceType.Client; - -// private _log: Logger; -// private signer: JsObjectSigner; - -// constructor(ops: ISATPClientServiceOptions) { -// const level = ops.logLevel || "INFO"; -// const label = this.getServiceIdentifier(); -// this._log = LoggerProvider.getOrCreate({ level, label }); -// this.signer = ops.signer; -// } - -// public get className(): string { -// return Stage3ClientService.CLASS_NAME; -// } - -// public get stage(): string { -// return Stage3ClientService.SATP_STAGE; -// } - -// public get log(): Logger { -// return this._log; -// } - -// public get serviceType(): SATPServiceType { -// return SATPServiceType.Client; -// } - -// public getServiceIdentifier(): string { -// return `${this.className}#${this.serviceType}`; -// } - -// async commitPreparation( -// response: LockAssertionReceiptMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#commitPreparation()`; - -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); - -// const commonBody = new CommonSatp(); -// commonBody.version = SATP_VERSION; -// commonBody.messageType = MessageType.COMMIT_PREPARE; -// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.ASSERTION_RECEIPT, -// ); -// commonBody.sessionId = response.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const commitPreparationRequestMessage = -// new CommitPreparationRequestMessage(); -// commitPreparationRequestMessage.common = commonBody; - -// const messageSignature = bufArray2HexStr( -// sign(this.signer, JSON.stringify(commitPreparationRequestMessage)), -// ); - -// commitPreparationRequestMessage.common.signature = messageSignature; - -// saveSignature(sessionData, MessageType.COMMIT_PREPARE, messageSignature); - -// saveHash( -// sessionData, -// MessageType.COMMIT_PREPARE, -// getHash(commitPreparationRequestMessage), -// ); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "commitPreparation", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ - -// this.log.info(`${fnTag}, sending CommitPreparationMessage...`); - -// return commitPreparationRequestMessage; -// } - -// async commitFinalAssertion( -// response: CommitReadyResponseMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#commitPreparation()`; - -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); - -// const commonBody = new CommonSatp(); -// commonBody.version = SATP_VERSION; -// commonBody.messageType = MessageType.COMMIT_FINAL; -// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.COMMIT_READY, -// ); - -// commonBody.sessionId = response.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const commitFinalAssertionRequestMessage = -// new CommitFinalAssertionRequestMessage(); -// commitFinalAssertionRequestMessage.common = commonBody; - -// commitFinalAssertionRequestMessage.burnAssertionClaim = -// sessionData.burnAssertionClaim; -// commitFinalAssertionRequestMessage.burnAssertionClaimFormat = -// sessionData.burnAssertionClaimFormat; - -// const messageSignature = bufArray2HexStr( -// sign(this.signer, JSON.stringify(commitFinalAssertionRequestMessage)), -// ); - -// commitFinalAssertionRequestMessage.common.signature = messageSignature; - -// saveSignature(sessionData, MessageType.COMMIT_FINAL, messageSignature); - -// saveHash( -// sessionData, -// MessageType.COMMIT_FINAL, -// getHash(commitFinalAssertionRequestMessage), -// ); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "commitFinalAssertion", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ -// this.log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); - -// return commitFinalAssertionRequestMessage; -// } - -// async transferComplete( -// response: CommitFinalAcknowledgementReceiptResponseMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#transferComplete()`; - -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); - -// const commonBody = new CommonSatp(); -// commonBody.version = SATP_VERSION; -// commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; -// commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.ACK_COMMIT_FINAL, -// ); - -// commonBody.sessionId = response.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); -// transferCompleteRequestMessage.common = commonBody; - -// transferCompleteRequestMessage.hashTransferCommence = getMessageHash( -// sessionData, -// MessageType.TRANSFER_COMMENCE_REQUEST, -// ); - -// const messageSignature = bufArray2HexStr( -// sign(this.signer, JSON.stringify(transferCompleteRequestMessage)), -// ); - -// transferCompleteRequestMessage.common.signature = messageSignature; - -// saveSignature( -// sessionData, -// MessageType.COMMIT_TRANSFER_COMPLETE, -// messageSignature, -// ); - -// saveHash( -// sessionData, -// MessageType.COMMIT_TRANSFER_COMPLETE, -// getHash(transferCompleteRequestMessage), -// ); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "transferComplete", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ - -// this.log.info(`${fnTag}, sending TransferCompleteMessage...`); - -// return transferCompleteRequestMessage; -// } - -// checkLockAssertionReceiptMessage( -// response: LockAssertionReceiptMessage, -// session: SATPSession, -// ): void { -// const fnTag = `${this.className}#checkLockAssertionReceiptMessage()`; - -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// if (response.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); -// } - -// if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { -// throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber == undefined || -// sessionData.version == undefined -// ) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber + BigInt(1) != -// response.common.sequenceNumber -// ) { -// throw new Error(`${fnTag}, sequenceNumber does not match`); -// } - -// if ( -// response.common.hashPreviousMessage != -// getMessageHash(sessionData, MessageType.LOCK_ASSERT) -// ) { -// throw new Error(`${fnTag}, hashPreviousMessage does not match`); -// } - -// if ( -// sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey -// ) { -// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); -// } - -// if ( -// sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey -// ) { -// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); -// } - -// if ( -// !verifySignature( -// this.signer, -// response.common, -// response.common.serverGatewayPubkey, -// ) -// ) { -// throw new Error(`${fnTag}, message signature verification failed`); -// } - -// this.log.info(`LockAssertionReceiptMessage passed all checks.`); -// } - -// checkCommitReadyResponseMessage( -// response: CommitReadyResponseMessage, -// session: SATPSession, -// ): void { -// const fnTag = `${this.className}#checkCommitReadyResponseMessage()`; - -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// if (response.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); -// } - -// if (response.common.messageType != MessageType.COMMIT_READY) { -// throw new Error(`${fnTag}, message type is not COMMIT_READY`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber == undefined || -// sessionData.version == undefined -// ) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber + BigInt(1) != -// response.common.sequenceNumber -// ) { -// throw new Error(`${fnTag}, sequenceNumber does not match`); -// } - -// if ( -// response.common.hashPreviousMessage != -// getMessageHash(sessionData, MessageType.COMMIT_PREPARE) -// ) { -// throw new Error(`${fnTag}, hashPreviousMessage does not match`); -// } - -// if ( -// sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey -// ) { -// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); -// } - -// if ( -// sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey -// ) { -// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); -// } - -// if ( -// !verifySignature( -// this.signer, -// response.common, -// response.common.serverGatewayPubkey, -// ) -// ) { -// throw new Error(`${fnTag}, message signature verification failed`); -// } - -// if (response.mintAssertionClaims == undefined) { -// //todo -// throw new Error(`${fnTag}, mintAssertionClaims is missing`); -// } - -// this.log.info(`CommitReadyResponseMessage passed all checks.`); -// } - -// checkCommitFinalAcknowledgementReceiptResponseMessage( -// response: CommitFinalAcknowledgementReceiptResponseMessage, -// session: SATPSession, -// ): void { -// const fnTag = `${this.className}#checkCommitFinalAcknowledgementReceiptResponseMessage()`; - -// if (response.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// if (response.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); -// } - -// if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { -// throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber == undefined || -// sessionData.version == undefined -// ) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber + BigInt(1) != -// response.common.sequenceNumber -// ) { -// throw new Error(`${fnTag}, sequenceNumber does not match`); -// } - -// if ( -// response.common.hashPreviousMessage != -// getMessageHash(sessionData, MessageType.COMMIT_FINAL) -// ) { -// throw new Error(`${fnTag}, hashPreviousMessage does not match`); -// } - -// if ( -// sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey -// ) { -// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); -// } - -// if ( -// sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey -// ) { -// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); -// } - -// if ( -// !verifySignature( -// this.signer, -// response.common, -// response.common.serverGatewayPubkey, -// ) -// ) { -// throw new Error(`${fnTag}, message signature verification failed`); -// } - -// if (response.assignmentAssertionClaim == undefined) { -// throw new Error(`${fnTag}, assignmentAssertionClaim is missing`); -// } - -// this.log.info( -// `CommitFinalAcknowledgementReceiptResponseMessage passed all checks.`, -// ); -// } -// } +import { + BurnAssertionClaim, + CommonSatp, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SATP_VERSION } from "../../constants"; +import { + CommitFinalAcknowledgementReceiptResponseMessage, + CommitFinalAssertionRequestMessage, + CommitPreparationRequestMessage, + CommitReadyResponseMessage, + TransferCompleteRequestMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { + SATPService, + ISATPClientServiceOptions, + ISATPServiceOptions, + SATPServiceType, +} from "../satp-service"; +import { SATPSession } from "../../satp-session"; +import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; + +export class Stage3ClientService extends SATPService { + public static readonly SATP_STAGE = "3"; + public static readonly SERVICE_TYPE = SATPServiceType.Client; + + private bridgeManager: SATPBridgesManager; + + constructor(ops: ISATPClientServiceOptions) { + const commonOptions: ISATPServiceOptions = { + stage: Stage3ClientService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage3ClientService.SERVICE_TYPE, + bridgeManager: ops.bridgeManager, + }; + super(commonOptions); + + if (ops.bridgeManager == undefined) { + throw new Error( + `${this.getServiceIdentifier()}#constructor(), bridgeManager is missing`, + ); + } + this.bridgeManager = ops.bridgeManager; + } + + async commitPreparation( + response: LockAssertionReceiptMessage, + session: SATPSession, + ): Promise { + const stepTag = `commitPreparation()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, CommitPreparation...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_PREPARE; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.ASSERTION_RECEIPT, + ); + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitPreparationRequestMessage = + new CommitPreparationRequestMessage(); + commitPreparationRequestMessage.common = commonBody; + + if (sessionData.transferContextId != undefined) { + commitPreparationRequestMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.clientTransferNumber != undefined) { + commitPreparationRequestMessage.clientTransferNumber = + sessionData.clientTransferNumber; + } + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(commitPreparationRequestMessage)), + ); + + commitPreparationRequestMessage.common.signature = messageSignature; + + saveSignature(sessionData, MessageType.COMMIT_PREPARE, messageSignature); + + saveHash( + sessionData, + MessageType.COMMIT_PREPARE, + getHash(commitPreparationRequestMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitPreparation", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + + this.Log.info(`${fnTag}, sending CommitPreparationMessage...`); + + return commitPreparationRequestMessage; + } + + async commitFinalAssertion( + response: CommitReadyResponseMessage, + session: SATPSession, + ): Promise { + const stepTag = `commitFinalAssertion()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, CommitFinalAssertion...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_FINAL; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.COMMIT_READY, + ); + + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitFinalAssertionRequestMessage = + new CommitFinalAssertionRequestMessage(); + commitFinalAssertionRequestMessage.common = commonBody; + + commitFinalAssertionRequestMessage.burnAssertionClaim = + sessionData.burnAssertionClaim; + + if (sessionData.burnAssertionClaimFormat != undefined) { + commitFinalAssertionRequestMessage.burnAssertionClaimFormat = + sessionData.burnAssertionClaimFormat; + } + + if (sessionData.transferContextId != undefined) { + commitFinalAssertionRequestMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.clientTransferNumber != undefined) { + commitFinalAssertionRequestMessage.clientTransferNumber = + sessionData.clientTransferNumber; + } + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(commitFinalAssertionRequestMessage)), + ); + + commitFinalAssertionRequestMessage.common.signature = messageSignature; + + saveSignature(sessionData, MessageType.COMMIT_FINAL, messageSignature); + + saveHash( + sessionData, + MessageType.COMMIT_FINAL, + getHash(commitFinalAssertionRequestMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitFinalAssertion", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); + + return commitFinalAssertionRequestMessage; + } + + async transferComplete( + response: CommitFinalAcknowledgementReceiptResponseMessage, + session: SATPSession, + ): Promise { + const stepTag = `transferComplete()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, TransferComplete...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.ACK_COMMIT_FINAL, + ); + + commonBody.sessionId = response.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); + transferCompleteRequestMessage.common = commonBody; + + if (sessionData.transferContextId != undefined) { + transferCompleteRequestMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.clientTransferNumber != undefined) { + transferCompleteRequestMessage.clientTransferNumber = + sessionData.clientTransferNumber; + } + + transferCompleteRequestMessage.hashTransferCommence = getMessageHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + ); + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(transferCompleteRequestMessage)), + ); + + transferCompleteRequestMessage.common.signature = messageSignature; + + saveSignature( + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, + getHash(transferCompleteRequestMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferComplete", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + + this.Log.info(`${fnTag}, sending TransferCompleteMessage...`); + + return transferCompleteRequestMessage; + } + + checkLockAssertionReceiptMessage( + response: LockAssertionReceiptMessage, + session: SATPSession, + ): void { + const stepTag = `checkLockAssertionReceiptMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, CheckLockAssertionReceiptMessage...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { + throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + response.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.LOCK_ASSERT) + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey + ) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if ( + sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey + ) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + this.Signer, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + + if ( + sessionData.serverTransferNumber != undefined && + response.serverTransferNumber != sessionData.serverTransferNumber + ) { + // This does not throw an error because the serverTransferNumber is only meaningful to the server. + this.Log.info( + `${fnTag}, serverTransferNumber does not match the one that was sent`, + ); + } + + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + + if ( + sessionData.serverTransferNumber != undefined && + response.serverTransferNumber != sessionData.serverTransferNumber + ) { + // This does not throw an error because the serverTransferNumber is only meaningful to the server. + this.Log.info( + `${fnTag}, serverTransferNumber does not match the one that was sent`, + ); + } + + this.Log.info(`${fnTag}, LockAssertionReceiptMessage passed all checks.`); + } + + checkCommitReadyResponseMessage( + response: CommitReadyResponseMessage, + session: SATPSession, + ): void { + const stepTag = `checkCommitReadyResponseMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, CommitReadyResponse...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (response.common.messageType != MessageType.COMMIT_READY) { + throw new Error(`${fnTag}, message type is not COMMIT_READY`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + response.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.COMMIT_PREPARE) + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey + ) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if ( + sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey + ) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + this.Signer, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if (response.mintAssertionClaimFormat != undefined) { + //todo + this.Log.info( + `${fnTag}, Optional variable loaded: mintAssertionClaimsFormat `, + ); + sessionData.mintAssertionClaimFormat = response.mintAssertionClaimFormat; + } + + if (response.mintAssertionClaim == undefined) { + //todo + throw new Error(`${fnTag}, mintAssertionClaims is missing`); + } + + sessionData.mintAssertionClaim = response.mintAssertionClaim; + + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + + if ( + sessionData.serverTransferNumber != undefined && + response.serverTransferNumber != sessionData.serverTransferNumber + ) { + // This does not throw an error because the serverTransferNumber is only meaningful to the server. + this.Log.info( + `${fnTag}, serverTransferNumber does not match the one that was sent`, + ); + } + + this.Log.info(`${fnTag}, CommitReadyResponseMessage passed all checks.`); + } + + checkCommitFinalAcknowledgementReceiptResponseMessage( + response: CommitFinalAcknowledgementReceiptResponseMessage, + session: SATPSession, + ): void { + const stepTag = `checkCommitFinalAcknowledgementReceiptResponseMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, CommitFinalAcknowledgementReceipt...`); + + if (response.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (response.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { + throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + response.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.COMMIT_FINAL) + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey + ) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if ( + sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey + ) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + this.Signer, + response.common, + response.common.serverGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + + if (response.assignmentAssertionClaim == undefined) { + throw new Error(`${fnTag}, assignmentAssertionClaim is missing`); + } + + sessionData.assignmentAssertionClaim = response.assignmentAssertionClaim; + + if (response.assignmentAssertionClaimFormat != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: assignmentAssertionClaimFormat `, + ); + sessionData.assignmentAssertionClaimFormat = + response.assignmentAssertionClaimFormat; + } + + if ( + sessionData.serverTransferNumber != undefined && + response.serverTransferNumber != sessionData.serverTransferNumber + ) { + // This does not throw an error because the serverTransferNumber is only meaningful to the server. + this.Log.info( + `${fnTag}, serverTransferNumber does not match the one that was sent`, + ); + } + + this.Log.info( + `${fnTag}, CommitFinalAcknowledgementReceiptResponseMessage passed all checks.`, + ); + } + + async burnAsset(session: SATPSession): Promise { + const stepTag = `lockAsset()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Burning Asset...`); + const sessionData = session.getSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; + const amount = sessionData.transferInitClaims?.amountFromOriginator; + + this.Log.debug(`${fnTag}, Burn Asset ID: ${assetId} amount: ${amount}`); + if (assetId == undefined) { + throw new Error(`${fnTag}, Asset ID is missing`); + } + + // const bridge = this.bridgeManager.getBridge( + // sessionData.senderGatewayNetworkId, + // ); + + // sessionData.burnAssertionClaim = new BurnAssertionClaim(); + // sessionData.burnAssertionClaim.receipt = await bridge.burnAsset( + // assetId, + // Number(amount), + // ); + // sessionData.burnAssertionClaim.signature = bufArray2HexStr( + // sign(this.Signer, sessionData.burnAssertionClaim.receipt), + // ); + } catch (error) { + throw new Error(`${fnTag}, Failed to process Burn Asset ${error}`); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts deleted file mode 100644 index 16d6ca7673..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ /dev/null @@ -1,26 +0,0 @@ -// this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). -// should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output - -import { SATPLedgerConnector } from "../../../types/blockchain-interaction"; - -export abstract class SATPBridgeManager { - // Instantiate connectors based on supported implementations, at bridge level - private connectors: SATPLedgerConnector[] = []; - - public abstract lockAsset( - sessionId: string, - assetId: string, - ): Promise; - public abstract unlockAsset( - sessionId: string, - assetId: string, - ): Promise; - public abstract mintAsset( - sessionId: string, - assetId: string, - ): Promise; - public abstract burnAsset( - sessionId: string, - assetId: string, - ): Promise; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts index b20d70fdac..75812e5f11 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts @@ -4,6 +4,7 @@ import { LoggerProvider, ILoggerOptions, } from "@hyperledger/cactus-common"; +import { SATPBridgesManager } from "../../gol/satp-bridges-manager"; export enum SATPServiceType { Server, @@ -16,6 +17,7 @@ export type ISATPServiceOptions = { loggerOptions: ILoggerOptions; signer: JsObjectSigner; serviceType: SATPServiceType; + bridgeManager?: SATPBridgesManager; }; export type ISATPServerServiceOptions = ISATPServiceOptions; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index e1237ed33b..a2886b15bd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -19,7 +19,6 @@ import { import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { TimestampType, - createSessionData, getMessageHash, getMessageTimestamp, saveHash, @@ -57,6 +56,7 @@ export class Stage1ServerService extends SATPService { ): Promise { const stepTag = `transferProposalResponse()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, transferProposalResponse...`); if ( request.common == undefined || @@ -174,6 +174,7 @@ export class Stage1ServerService extends SATPService { ): Promise { const stepTag = `transferCommenceResponse()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, transferCommenceResponse...`); if (request.common == undefined) { throw new Error( @@ -256,6 +257,24 @@ export class Stage1ServerService extends SATPService { ): Promise { const stepTag = `checkTransferProposalRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkTransferProposalRequestMessage...`); + + if (session == undefined) { + throw new Error(`${fnTag}, session is undefined`); + } + const sessionData = session.getSessionData(); + + if (request.common == undefined) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } if ( request.common == undefined || @@ -321,25 +340,33 @@ export class Stage1ServerService extends SATPService { this.Log.info(`TransferProposalRequest passed all checks.`); - const sessionData = createSessionData( - request.common.sessionId, - request.common.version, - request.transferInitClaims.digitalAssetId, - request.transferInitClaims.senderGatewayNetworkId, - request.transferInitClaims.recipientGatewayNetworkId, - request.transferInitClaims.originatorPubkey, - request.transferInitClaims.beneficiaryPubkey, - request.transferInitClaims.senderGatewayOwnerId, - request.transferInitClaims.receiverGatewayOwnerId, - request.transferInitClaims.clientGatewayPubkey, - request.transferInitClaims.serverGatewayPubkey, - request.networkCapabilities.signatureAlgorithm, - request.networkCapabilities.lockType, - request.networkCapabilities.lockExpirationTime, - request.networkCapabilities.credentialProfile, - request.networkCapabilities.loggingProfile, - request.networkCapabilities.accessControlProfile, - ); + sessionData.version = request.common.version; + sessionData.digitalAssetId = request.transferInitClaims.digitalAssetId; + sessionData.originatorPubkey = request.transferInitClaims.originatorPubkey; + sessionData.beneficiaryPubkey = + request.transferInitClaims.beneficiaryPubkey; + sessionData.senderGatewayNetworkId = + request.transferInitClaims.senderGatewayNetworkId; + sessionData.recipientGatewayNetworkId = + request.transferInitClaims.recipientGatewayNetworkId; + sessionData.clientGatewayPubkey = + request.transferInitClaims.clientGatewayPubkey; + sessionData.serverGatewayPubkey = + request.transferInitClaims.serverGatewayPubkey; + sessionData.receiverGatewayOwnerId = + request.transferInitClaims.receiverGatewayOwnerId; + sessionData.senderGatewayOwnerId = + request.transferInitClaims.senderGatewayOwnerId; + sessionData.signatureAlgorithm = + request.networkCapabilities.signatureAlgorithm; + sessionData.lockType = request.networkCapabilities.lockType; + sessionData.lockExpirationTime = + request.networkCapabilities.lockExpirationTime; + sessionData.credentialProfile = + request.networkCapabilities.credentialProfile; + sessionData.loggingProfile = request.networkCapabilities.loggingProfile; + sessionData.accessControlProfile = + request.networkCapabilities.accessControlProfile; this.Log.info(`Session data created for session id ${sessionData.id}`); if (!this.checkTransferClaims(request.transferInitClaims)) { @@ -466,7 +493,23 @@ export class Stage1ServerService extends SATPService { ); } - this.Log.info(`TransferCommenceRequest passed all checks.`); + if ( + sessionData.transferContextId != undefined && + request.common.transferContextId != sessionData.transferContextId + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message transfer context id does not match the one that was sent`, + ); + } + + if (request.clientTransferNumber != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: clientTransferNumber...`, + ); + sessionData.clientTransferNumber = request.clientTransferNumber; + } + + this.Log.info(`${fnTag}, TransferCommenceRequest passed all checks.`); return sessionData; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 702abebcdb..5cdd9d06b5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -1,234 +1,253 @@ -// import { -// JsObjectSigner, -// Logger, -// LoggerProvider, -// } from "@hyperledger/cactus-common"; -// import { -// LockAssertionReceiptMessage, -// LockAssertionRequestMessage, -// } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; -// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -// import { SATP_VERSION } from "../../constants"; -// import { -// CommonSatp, -// MessageType, -// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -// import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -// import { -// bufArray2HexStr, -// getHash, -// sign, -// storeLog, -// verifySignature, -// } from "../../../gateway-utils"; -// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -// import { -// SATPService, -// ISATPServerServiceOptions, -// SATPServiceType, -// } from "../../../types/satp-protocol"; -// import { SATPSession } from "../../../core/satp-session"; -// export class Stage2ServerService implements SATPService { -// public static readonly CLASS_NAME = "server-service"; -// public static readonly SATP_STAGE = "stage-2"; -// public static readonly SERVICE_TYPE = SATPServiceType.Server; - -// private _log: Logger; -// private signer: JsObjectSigner; - -// constructor(ops: ISATPServerServiceOptions) { -// const level = ops.logLevel || "INFO"; -// const label = this.getServiceIdentifier(); -// this._log = LoggerProvider.getOrCreate({ level, label }); -// this.signer = ops.signer; -// } - -// public get className(): string { -// return Stage2ServerService.CLASS_NAME; -// } - -// public get stage(): string { -// return Stage2ServerService.SATP_STAGE; -// } - -// public get log(): Logger { -// return this._log; -// } - -// public get serviceType(): SATPServiceType { -// return SATPServiceType.Server; -// } - -// public getServiceIdentifier(): string { -// return `${this.className}#${this.serviceType}`; -// } - -// async lockAssertionResponse( -// request: LockAssertionRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#lockAssertionResponse()`; - -// if (request.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${request.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); - -// const commonBody = new CommonSatp(); -// commonBody.version = SATP_VERSION; -// commonBody.messageType = MessageType.ASSERTION_RECEIPT; -// commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.LOCK_ASSERT, -// ); -// commonBody.sessionId = request.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const lockAssertionReceiptMessage = new LockAssertionReceiptMessage(); -// lockAssertionReceiptMessage.common = commonBody; - -// const messageSignature = bufArray2HexStr( -// sign(this.signer, JSON.stringify(lockAssertionReceiptMessage)), -// ); - -// lockAssertionReceiptMessage.common.signature = messageSignature; - -// saveSignature(sessionData, MessageType.ASSERTION_RECEIPT, messageSignature); - -// saveHash( -// sessionData, -// MessageType.ASSERTION_RECEIPT, -// getHash(lockAssertionReceiptMessage), -// ); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "lockAssertionResponse", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ - -// this.log.info(`${fnTag}, sending LockAssertionResponseMessage...`); - -// return lockAssertionReceiptMessage; -// } - -// async checkLockAssertionRequestMessage( -// request: LockAssertionRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#checkLockAssertionRequestMessage()`; - -// if ( -// request.common == undefined || -// request.common.version == undefined || -// request.common.messageType == undefined || -// request.common.sessionId == undefined || -// // request.common.transferContextId == undefined || -// request.common.sequenceNumber == undefined || -// request.common.resourceUrl == undefined || -// // request.common.actionrequest == undefined || -// // request.common.payloadProfile == undefined || -// // request.common.applicationProfile == undefined || -// request.common.signature == undefined || -// request.common.clientGatewayPubkey == undefined || -// request.common.serverGatewayPubkey == undefined -// ) { -// throw new Error( -// `${fnTag}, message satp common body is missing or is missing required fields`, -// ); -// } - -// if (request.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, unsupported SATP version`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.serverGatewayPubkey == undefined || -// sessionData.lastSequenceNumber == undefined -// ) { -// throw new Error(`${fnTag}, session data was not load correctly`); -// } - -// if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { -// throw new Error( -// `${fnTag}, LockAssertionRequest serverIdentity public key does not match the one that was sent`, -// ); -// } - -// if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { -// throw new Error( -// `${fnTag}, LockAssertionRequest clientIdentity public key does not match the one that was sent`, -// ); -// } - -// if ( -// !verifySignature( -// this.signer, -// request.common, -// request.common.serverGatewayPubkey, -// ) -// ) { -// throw new Error( -// `${fnTag}, LockAssertionRequest message signature verification failed`, -// ); -// } - -// if (request.common.messageType != MessageType.LOCK_ASSERT) { -// throw new Error(`${fnTag}, wrong message type for LockAssertionRequest`); -// } - -// if ( -// request.common.sequenceNumber != -// sessionData.lastSequenceNumber + BigInt(1) -// ) { -// throw new Error( -// `${fnTag}, LockAssertionRequest Message sequence number is wrong`, -// ); -// } - -// if ( -// request.common.hashPreviousMessage != -// getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) -// ) { -// throw new Error( -// `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, -// ); -// } - -// if ( -// request.lockAssertionFormat == undefined || -// request.lockAssertionClaim == undefined -// ) { -// throw new Error( -// `${fnTag}, LockAssertionRequest lockAssertionFormat or lockAssertionClaim is missing`, -// ); -// } - -// this.log.info(`LockAssertionRequest passed all checks.`); -// return sessionData; -// } -// } +import { + LockAssertionReceiptMessage, + LockAssertionRequestMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { SATP_VERSION } from "../../constants"; +import { + CommonSatp, + MessageType, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { + SATPService, + SATPServiceType, + ISATPServerServiceOptions, + ISATPServiceOptions, +} from "../satp-service"; +import { SATPSession } from "../../../core/satp-session"; +export class Stage2ServerService extends SATPService { + public static readonly SATP_STAGE = "2"; + public static readonly SERVICE_TYPE = SATPServiceType.Server; + + constructor(ops: ISATPServerServiceOptions) { + const commonOptions: ISATPServiceOptions = { + stage: Stage2ServerService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage2ServerService.SERVICE_TYPE, + }; + super(commonOptions); + } + + async lockAssertionResponse( + request: LockAssertionRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `lockAssertionResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, lockAssertionResponse...`); + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.ASSERTION_RECEIPT; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.LOCK_ASSERT, + ); + commonBody.sessionId = request.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const lockAssertionReceiptMessage = new LockAssertionReceiptMessage(); + lockAssertionReceiptMessage.common = commonBody; + + if (sessionData.transferContextId != undefined) { + lockAssertionReceiptMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.serverTransferNumber != undefined) { + lockAssertionReceiptMessage.serverTransferNumber = + sessionData.serverTransferNumber; + } + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(lockAssertionReceiptMessage)), + ); + + lockAssertionReceiptMessage.common.signature = messageSignature; + + saveSignature(sessionData, MessageType.ASSERTION_RECEIPT, messageSignature); + + saveHash( + sessionData, + MessageType.ASSERTION_RECEIPT, + getHash(lockAssertionReceiptMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "lockAssertionResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + + this.Log.info(`${fnTag}, sending LockAssertionResponseMessage...`); + + return lockAssertionReceiptMessage; + } + + async checkLockAssertionRequestMessage( + request: LockAssertionRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `checkLockAssertionRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkLockAssertionRequestMessage...`); + + if ( + request.common == undefined || + request.common.version == undefined || + request.common.messageType == undefined || + request.common.sessionId == undefined || + request.common.sequenceNumber == undefined || + request.common.resourceUrl == undefined || + request.common.signature == undefined || + request.common.clientGatewayPubkey == undefined || + request.common.serverGatewayPubkey == undefined || + request.common.hashPreviousMessage == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not load correctly`); + } + + if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { + throw new Error( + `${fnTag}, LockAssertionRequest serverIdentity public key does not match the one that was sent`, + ); + } + + if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { + throw new Error( + `${fnTag}, LockAssertionRequest clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + this.Signer, + request.common, + request.common.serverGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, LockAssertionRequest message signature verification failed`, + ); + } + + if (request.common.messageType != MessageType.LOCK_ASSERT) { + throw new Error(`${fnTag}, wrong message type for LockAssertionRequest`); + } + + if ( + request.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, LockAssertionRequest Message sequence number is wrong`, + ); + } + + if ( + request.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) + ) { + throw new Error( + `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, + ); + } + + if (request.lockAssertionClaim == undefined) { + throw new Error( + `${fnTag}, LockAssertionRequest lockAssertionClaim is missing`, + ); + } + + sessionData.lockAssertionClaim = request.lockAssertionClaim; + + if (request.lockAssertionClaimFormat == undefined) { + throw new Error( + `${fnTag}, LockAssertionRequest lockAssertionFormat is missing`, + ); + } + + sessionData.lockAssertionClaimFormat = request.lockAssertionClaimFormat; + + if (request.lockAssertionExpiration == undefined) { + throw new Error( + `${fnTag}, LockAssertionRequest lockAssertionExpiration is missing`, + ); + } + + sessionData.lockAssertionExpiration = request.lockAssertionExpiration; //todo check if expired + + if ( + sessionData.transferContextId != undefined && + request.common.transferContextId != sessionData.transferContextId + ) { + throw new Error( + `${fnTag}, LockAssertionRequest transferContextId does not match the one that was sent`, + ); + } + + if ( + sessionData.clientTransferNumber != undefined && + request.clientTransferNumber != sessionData.clientTransferNumber + ) { + // This does not throw an error because the clientTransferNumber is only meaningful to the client. + this.Log.info( + `${fnTag}, LockAssertionRequest clientTransferNumber does not match the one that was sent`, + ); + } + + this.Log.info(`${fnTag}, LockAssertionRequest passed all checks.`); + return sessionData; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 24bedb08db..4d75c0b865 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -1,433 +1,596 @@ -// import { -// JsObjectSigner, -// Logger, -// LoggerProvider, -// } from "@hyperledger/cactus-common"; -// import { SATPGateway } from "../../../plugin-satp-hermes-gateway"; -// import { -// CommitFinalAcknowledgementReceiptResponseMessage, -// CommitFinalAssertionRequestMessage, -// CommitPreparationRequestMessage, -// CommitReadyResponseMessage, -// } from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; -// import { SATP_VERSION } from "../../constants"; -// import { -// CommonSatp, -// MessageType, -// } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -// import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -// import { -// bufArray2HexStr, -// getHash, -// sign, -// storeLog, -// verifySignature, -// } from "../../../gateway-utils"; -// import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; -// import { -// SATPService, -// ISATPServerServiceOptions, -// SATPServiceType, -// } from "../../../types/satp-protocol"; -// import { SATPSession } from "../../../core/satp-session"; - -// export class Stage3ServerService implements SATPService { -// public static readonly CLASS_NAME = "server-service"; -// public static readonly SATP_STAGE = "stage-3"; -// public static readonly SERVICE_TYPE = SATPServiceType.Server; -// private _log: Logger; -// private signer: JsObjectSigner; - -// constructor(ops: ISATPServerServiceOptions) { -// const level = ops.logLevel || "INFO"; -// const label = this.getServiceIdentifier(); -// this._log = LoggerProvider.getOrCreate({ level, label }); -// this.signer = ops.signer; -// } - -// public get className(): string { -// return Stage3ServerService.CLASS_NAME; -// } - -// public get stage(): string { -// return Stage3ServerService.SATP_STAGE; -// } - -// public get log(): Logger { -// return this._log; -// } - -// public get serviceType(): SATPServiceType { -// return SATPServiceType.Server; -// } - -// public getServiceIdentifier(): string { -// return `${this.className}#${this.serviceType}`; -// } - -// async commitReady( -// request: CommitPreparationRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#commitReady()`; - -// if (request.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${request.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); - -// const commonBody = new CommonSatp(); -// commonBody.version = SATP_VERSION; -// commonBody.messageType = MessageType.COMMIT_READY; -// commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.COMMIT_PREPARE, -// ); -// commonBody.sessionId = request.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const commitReadyMessage = new CommitReadyResponseMessage(); -// commitReadyMessage.common = commonBody; - -// commitReadyMessage.mintAssertionClaims = sessionData.mintAssertionClaims; -// commitReadyMessage.mintAssertionClaimsFormat = -// sessionData.mintAssertionClaimsFormat; - -// const messageSignature = bufArray2HexStr( -// sign(this.signer, JSON.stringify(commitReadyMessage)), -// ); - -// saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); - -// saveHash( -// sessionData, -// MessageType.COMMIT_READY, -// getHash(commitReadyMessage), -// ); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "commitReady", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ -// this.log.info(`${fnTag}, sending commitReadyMessage...`); - -// return commitReadyMessage; -// } - -// async commitFinalAcknowledgementReceiptResponse( -// request: CommitFinalAssertionRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#commitFinalAcknowledgementReceiptResponse()`; - -// if (request.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, -// ); -// } - -// saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); - -// const commonBody = new CommonSatp(); -// commonBody.version = SATP_VERSION; -// commonBody.messageType = MessageType.ACK_COMMIT_FINAL; -// commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); -// commonBody.hashPreviousMessage = getMessageHash( -// sessionData, -// MessageType.COMMIT_FINAL, -// ); -// commonBody.sessionId = request.common.sessionId; -// commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; -// commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - -// sessionData.lastSequenceNumber = commonBody.sequenceNumber; - -// const commitFinalAcknowledgementReceiptResponseMessage = -// new CommitFinalAcknowledgementReceiptResponseMessage(); -// commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; - -// commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = -// sessionData.assignmentAssertionClaim; -// commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaimFormat = -// sessionData.assignmentAssertionClaimFormat; - -// const messageSignature = bufArray2HexStr( -// sign( -// this.signer, -// JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), -// ), -// ); - -// saveSignature(sessionData, MessageType.ACK_COMMIT_FINAL, messageSignature); - -// saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); - -// /* -// await storeLog(gateway, { -// sessionID: sessionData.id, -// type: "commitFinalAcknowledgementReceiptResponse", -// operation: "lock", -// data: JSON.stringify(sessionData), -// }); -// */ -// this.log.info( -// `${fnTag}, sending commitFinalAcknowledgementReceiptResponseMessage...`, -// ); - -// return commitFinalAcknowledgementReceiptResponseMessage; -// } - -// async checkCommitPreparationRequestMessage( -// request: CommitPreparationRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#checkCommitPreparationRequestMessage()`; - -// if (request.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// if (request.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); -// } - -// if (request.common.messageType != MessageType.COMMIT_PREPARE) { -// throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber == undefined || -// sessionData.version == undefined || -// sessionData.signatures == undefined -// ) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber + BigInt(1) != -// request.common.sequenceNumber -// ) { -// throw new Error(`${fnTag}, sequenceNumber does not match`); -// } - -// if ( -// getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != -// request.common.hashPreviousMessage -// ) { -// throw new Error(`${fnTag}, hashPreviousMessage does not match`); -// } - -// if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { -// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); -// } - -// if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { -// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); -// } - -// if ( -// !verifySignature( -// this.signer, -// request.common, -// request.common.clientGatewayPubkey, -// ) -// ) { -// throw new Error(`${fnTag}, message signature verification failed`); -// } - -// this.log.info(`CommitPreparationRequestMessage passed all checks.`); - -// return sessionData; -// } - -// async checkCommitFinalAssertionRequestMessage( -// request: CommitFinalAssertionRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#checkCommitFinalAssertionRequestMessage()`; - -// if (request.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// if (request.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); -// } - -// if (request.common.messageType != MessageType.COMMIT_FINAL) { -// throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); -// } - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber == undefined || -// sessionData.version == undefined || -// sessionData.signatures == undefined -// ) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber + BigInt(1) != -// request.common.sequenceNumber -// ) { -// throw new Error(`${fnTag}, sequenceNumber does not match`); -// } - -// if ( -// getMessageHash(sessionData, MessageType.COMMIT_READY) != -// request.common.hashPreviousMessage -// ) { -// throw new Error(`${fnTag}, hashPreviousMessage does not match`); -// } - -// if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { -// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); -// } - -// if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { -// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); -// } - -// if ( -// !verifySignature( -// this.signer, -// request.common, -// request.common.clientGatewayPubkey, -// ) -// ) { -// throw new Error(`${fnTag}, message signature verification failed`); -// } - -// if (request.burnAssertionClaim == undefined) { -// throw new Error(`${fnTag}, mintAssertionClaims is missing`); -// } - -// //todo check burn - -// this.log.info(`CommitFinalAssertionRequestMessage passed all checks.`); - -// return sessionData; -// } - -// async checkTransferCompleteRequestMessage( -// request: CommitFinalAssertionRequestMessage, -// session: SATPSession, -// ): Promise { -// const fnTag = `${this.className}#checkTransferCompleteRequestMessage()`; - -// if (request.common == undefined) { -// throw new Error(`${fnTag}, message common body is missing`); -// } - -// if (request.common.version != SATP_VERSION) { -// throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); -// } - -// if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { -// throw new Error(`${fnTag}, message type is not COMMIT_TRANSFER_COMPLETE`); -// } - -// this.log.info( -// `${fnTag}, TransferCompleteRequestMessage passed all checks.`, -// ); - -// const sessionData = session.getSessionData(); - -// if (sessionData == undefined) { -// throw new Error( -// `${fnTag}, session data not found for session id ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber == undefined || -// sessionData.version == undefined || -// sessionData.signatures == undefined -// ) { -// throw new Error( -// `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, -// ); -// } - -// if ( -// sessionData.lastSequenceNumber + BigInt(1) != -// request.common.sequenceNumber -// ) { -// throw new Error(`${fnTag}, sequenceNumber does not match`); -// } - -// if ( -// getMessageHash(sessionData, MessageType.COMMIT_FINAL) != -// request.common.hashPreviousMessage -// ) { -// throw new Error(`${fnTag}, hashPreviousMessage does not match`); -// } - -// if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { -// throw new Error(`${fnTag}, clientGatewayPubkey does not match`); -// } - -// if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { -// throw new Error(`${fnTag}, serverGatewayPubkey does not match`); -// } - -// if ( -// !verifySignature( -// this.signer, -// request.common, -// request.common.clientGatewayPubkey, -// ) -// ) { -// throw new Error(`${fnTag}, message signature verification failed`); -// } - -// this.log.info( -// `${fnTag}, TransferCompleteRequestMessage passed all checks.`, -// ); - -// return sessionData; -// } -// } +import { + CommitFinalAcknowledgementReceiptResponseMessage, + CommitFinalAssertionRequestMessage, + CommitPreparationRequestMessage, + CommitReadyResponseMessage, + TransferCompleteRequestMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +import { SATP_VERSION } from "../../constants"; +import { + AssignmentAssertionClaim, + CommonSatp, + MessageType, + MintAssertionClaim, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; +import { + SATPService, + SATPServiceType, + ISATPServerServiceOptions, + ISATPServiceOptions, +} from "../satp-service"; +import { SATPSession } from "../../../core/satp-session"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; + +export class Stage3ServerService extends SATPService { + public static readonly SATP_STAGE = "3"; + public static readonly SERVICE_TYPE = SATPServiceType.Server; + + private bridgeManager: SATPBridgesManager; + + constructor(ops: ISATPServerServiceOptions) { + const commonOptions: ISATPServiceOptions = { + stage: Stage3ServerService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage3ServerService.SERVICE_TYPE, + bridgeManager: ops.bridgeManager, + }; + super(commonOptions); + if (ops.bridgeManager == undefined) { + throw new Error( + `${this.getServiceIdentifier()}#constructor() bridgeManager is required`, + ); + } + this.bridgeManager = ops.bridgeManager; + } + + async commitReady( + request: CommitPreparationRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `commitReady()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, commitReady...`); + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.COMMIT_READY; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.COMMIT_PREPARE, + ); + commonBody.sessionId = request.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitReadyMessage = new CommitReadyResponseMessage(); + commitReadyMessage.common = commonBody; + + commitReadyMessage.mintAssertionClaim = sessionData.mintAssertionClaim; + commitReadyMessage.mintAssertionClaimFormat = + sessionData.mintAssertionClaimFormat; + + if (sessionData.transferContextId != undefined) { + commitReadyMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.serverTransferNumber != undefined) { + commitReadyMessage.serverTransferNumber = + sessionData.serverTransferNumber; + } + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(commitReadyMessage)), + ); + + saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); + + saveHash( + sessionData, + MessageType.COMMIT_READY, + getHash(commitReadyMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitReady", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info(`${fnTag}, sending commitReadyMessage...`); + + return commitReadyMessage; + } + + async commitFinalAcknowledgementReceiptResponse( + request: CommitFinalAssertionRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `commitFinalAcknowledgementReceiptResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, commitFinalAcknowledgementReceiptResponse...`); + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); + + const commonBody = new CommonSatp(); + commonBody.version = SATP_VERSION; + commonBody.messageType = MessageType.ACK_COMMIT_FINAL; + commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.COMMIT_FINAL, + ); + commonBody.sessionId = request.common.sessionId; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const commitFinalAcknowledgementReceiptResponseMessage = + new CommitFinalAcknowledgementReceiptResponseMessage(); + commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; + + commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = + sessionData.assignmentAssertionClaim; + + if (sessionData.assignmentAssertionClaimFormat != undefined) { + commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaimFormat = + sessionData.assignmentAssertionClaimFormat; + } + + if (sessionData.transferContextId != undefined) { + commitFinalAcknowledgementReceiptResponseMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.serverTransferNumber != undefined) { + commitFinalAcknowledgementReceiptResponseMessage.serverTransferNumber = + sessionData.serverTransferNumber; + } + + const messageSignature = bufArray2HexStr( + sign( + this.Signer, + JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), + ), + ); + + saveSignature(sessionData, MessageType.ACK_COMMIT_FINAL, messageSignature); + + saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "commitFinalAcknowledgementReceiptResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info( + `${fnTag}, sending commitFinalAcknowledgementReceiptResponseMessage...`, + ); + + return commitFinalAcknowledgementReceiptResponseMessage; + } + + async checkCommitPreparationRequestMessage( + request: CommitPreparationRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `checkCommitPreparationRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkCommitPreparationRequestMessage...`); + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (request.common.messageType != MessageType.COMMIT_PREPARE) { + throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + request.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != + request.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + this.Signer, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if ( + sessionData.transferContextId != undefined && + request.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + + if ( + sessionData.clientTransferNumber != undefined && + request.clientTransferNumber != sessionData.clientTransferNumber + ) { + // This does not throw an error because the clientTransferNumber is only meaningful to the client. + this.Log.info( + `${fnTag}, LockAssertionRequest clientTransferNumber does not match the one that was sent`, + ); + } + + this.Log.info( + `${fnTag}, CommitPreparationRequestMessage passed all checks.`, + ); + + return sessionData; + } + + async checkCommitFinalAssertionRequestMessage( + request: CommitFinalAssertionRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `checkCommitFinalAssertionRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkCommitFinalAssertionRequestMessage...`); + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (request.common.messageType != MessageType.COMMIT_FINAL) { + throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + request.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + getMessageHash(sessionData, MessageType.COMMIT_READY) != + request.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + this.Signer, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + if ( + sessionData.transferContextId != undefined && + request.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + //todo check burn + if (request.burnAssertionClaim == undefined) { + throw new Error(`${fnTag}, mintAssertionClaims is missing`); + } + + sessionData.burnAssertionClaim = request.burnAssertionClaim; + + if (request.burnAssertionClaimFormat != undefined) { + this.Log.info( + `${fnTag}, optional variable loaded: burnAssertionClaimFormat`, + ); + sessionData.burnAssertionClaimFormat = request.burnAssertionClaimFormat; + } + + if ( + sessionData.clientTransferNumber != undefined && + request.clientTransferNumber != sessionData.clientTransferNumber + ) { + // This does not throw an error because the clientTransferNumber is only meaningful to the client. + this.Log.info( + `${fnTag}, CommitFinalAssertionRequest clientTransferNumber does not match the one that was sent`, + ); + } + + this.Log.info( + `${fnTag}, CommitFinalAssertionRequestMessage passed all checks.`, + ); + + return sessionData; + } + + async checkTransferCompleteRequestMessage( + request: TransferCompleteRequestMessage, + session: SATPSession, + ): Promise { + const stepTag = `checkTransferCompleteRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkTransferCompleteRequestMessage...`); + + if (request.common == undefined) { + throw new Error(`${fnTag}, message common body is missing`); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + } + + if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { + throw new Error(`${fnTag}, message type is not COMMIT_TRANSFER_COMPLETE`); + } + + this.Log.info( + `${fnTag}, TransferCompleteRequestMessage passed all checks.`, + ); + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined || + sessionData.signatures == undefined + ) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + if ( + sessionData.lastSequenceNumber + BigInt(1) != + request.common.sequenceNumber + ) { + throw new Error(`${fnTag}, sequenceNumber does not match`); + } + + if ( + getMessageHash(sessionData, MessageType.COMMIT_FINAL) != + request.common.hashPreviousMessage + ) { + throw new Error(`${fnTag}, hashPreviousMessage does not match`); + } + + if ( + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST) != + request.hashTransferCommence + ) { + throw new Error(`${fnTag}, hashTransferCommence does not match`); + } + + if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { + throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + } + + if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { + throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + } + + if ( + !verifySignature( + this.Signer, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error(`${fnTag}, message signature verification failed`); + } + + this.Log.info( + `${fnTag}, TransferCompleteRequestMessage passed all checks.`, + ); + + if ( + sessionData.transferContextId != undefined && + request.common.transferContextId != sessionData.transferContextId + ) { + throw new Error(`${fnTag}, transferContextId does not match`); + } + + if ( + sessionData.clientTransferNumber != undefined && + request.clientTransferNumber != sessionData.clientTransferNumber + ) { + // This does not throw an error because the clientTransferNumber is only meaningful to the client. + this.Log.info( + `${fnTag}, TransferCompleteRequest clientTransferNumber does not match the one that was sent`, + ); + } + this.Log.info( + `${fnTag}, TransferCompleteRequestMessage passed all checks.`, + ); + + return sessionData; + } + async mintAsset(session: SATPSession): Promise { + const stepTag = `mintAsset()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + try { + this.Log.info(`${fnTag}, Minting Asset...`); + const sessionData = session.getSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; + const amount = sessionData.transferInitClaims?.amountToBeneficiary; + + this.logger.debug( + `${fnTag}, Mint Asset ID: ${assetId} amount: ${amount}`, + ); + if (assetId == undefined) { + throw new Error(`${fnTag}, Asset ID is missing`); + } + + // const bridge = this.bridgeManager.getBridge( + // sessionData.recipientGatewayNetworkId, + // ); + + // sessionData.mintAssertionClaim = new MintAssertionClaim(); + // sessionData.mintAssertionClaim.receipt = await bridge.mintAsset( + // assetId, + // Number(amount), + // ); + // sessionData.mintAssertionClaim.signature = bufArray2HexStr( + // sign(this.Signer, sessionData.mintAssertionClaim.receipt), + // ); + } catch (error) { + throw new Error(`${fnTag}, Failed to process Mint Asset ${error}`); + } + } + + async assignAsset(session: SATPSession): Promise { + const stepTag = `assignAsset()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + try { + this.Log.info(`${fnTag}, Assigning Asset...`); + const sessionData = session.getSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; + const amount = sessionData.transferInitClaims?.amountToBeneficiary; + const recipient = sessionData.transferInitClaims?.beneficiaryPubkey; + + if (recipient == undefined) { + throw new Error(`${fnTag}, Recipient is missing`); + } + this.logger.debug( + `${fnTag}, Assign Asset ID: ${assetId} amount: ${amount} recipient: ${recipient}`, + ); + if (assetId == undefined) { + throw new Error(`${fnTag}, Asset ID is missing`); + } + + // const bridge = this.bridgeManager.getBridge( + // sessionData.recipientGatewayNetworkId, + // ); + + // sessionData.assignmentAssertionClaim = new AssignmentAssertionClaim(); + // sessionData.assignmentAssertionClaim.receipt = await bridge.assignAsset( + // assetId, + // recipient, + // Number(amount), + // ); + // sessionData.assignmentAssertionClaim.signature = bufArray2HexStr( + // sign(this.Signer, sessionData.assignmentAssertionClaim.receipt), + // ); + } catch (error) { + throw new Error(`${fnTag}, Failed to process Assign Asset ${error}`); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 91f6a20937..5278e09809 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,9 +1,7 @@ -import { JsObjectSigner, LogLevelDesc } from "@hyperledger/cactus-common"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; import { ISignerKeyPairs } from "@hyperledger/cactus-common/src/main/typescript/signer-key-pairs"; -import { createConnectTransport } from "@connectrpc/connect-node"; -import { SATPManager } from "../gol/satp-manager"; import { SATPSession } from "./satp-session"; import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; @@ -83,6 +81,12 @@ export interface SATPGatewayConfig { enableOpenAPI?: boolean; validationOptions?: ValidatorOptions; } + +// export interface SATPBridgeConfig { +// logLevel?: LogLevelDesc; +// network: NetworkBridge; +// } + export type Immutable = { readonly [K in keyof T]: Immutable; }; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts index 70b786d12e..9fd5edb890 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/factory/plugin-factory-satp-hermes-bridge-manager.ts @@ -1 +1,30 @@ -// TODO +import { validateOrReject } from "class-validator"; +import { + IPluginFactoryOptions, + PluginFactory, +} from "@hyperledger/cactus-core-api"; +import { + SATPBridgesManager, + ISATPBridgesOptions, +} from "../gol/satp-bridges-manager"; + +export class PluginFactorySATPBridge extends PluginFactory< + SATPBridgesManager, + ISATPBridgesOptions, + IPluginFactoryOptions +> { + async create( + pluginOptions: ISATPBridgesOptions, + ): Promise { + const manager = new SATPBridgesManager(pluginOptions); + try { + const validationOptions = pluginOptions.validationOptions; + await validateOrReject(manager, validationOptions); + return manager; + } catch (errors) { + throw new Error( + `Caught promise rejection (validation failed). Errors: ${errors}`, + ); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index 9d7fd15f6d..e6d0eb22c8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -519,6 +519,16 @@ export class TransferClaims extends Message { */ maxTimeout = protoInt64.zero; + /** + * @generated from field: string amount_from_originator = 15; + */ + amountFromOriginator = ""; + + /** + * @generated from field: string amount_to_beneficiary = 16; + */ + amountToBeneficiary = ""; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -541,6 +551,8 @@ export class TransferClaims extends Message { { no: 12, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 13, name: "max_retries", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, { no: 14, name: "max_timeout", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 15, name: "amount_from_originator", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 16, name: "amount_to_beneficiary", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaims { @@ -1258,250 +1270,298 @@ export class Payload extends Message { } /** - * @generated from message cacti.satp.v02.common.LockAssertionClaim + * @generated from message cacti.satp.v02.common.LockAssertionClaimFormat */ -export class LockAssertionClaim extends Message { - constructor(data?: PartialMessage) { +export class LockAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.LockAssertionClaim"; + static readonly typeName = "cacti.satp.v02.common.LockAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ ]); - static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaim { - return new LockAssertionClaim().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaimFormat { + return new LockAssertionClaimFormat().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionClaim { - return new LockAssertionClaim().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionClaimFormat { + return new LockAssertionClaimFormat().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): LockAssertionClaim { - return new LockAssertionClaim().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): LockAssertionClaimFormat { + return new LockAssertionClaimFormat().fromJsonString(jsonString, options); } - static equals(a: LockAssertionClaim | PlainMessage | undefined, b: LockAssertionClaim | PlainMessage | undefined): boolean { - return proto3.util.equals(LockAssertionClaim, a, b); + static equals(a: LockAssertionClaimFormat | PlainMessage | undefined, b: LockAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionClaimFormat, a, b); } } /** - * @generated from message cacti.satp.v02.common.LockAssertionFormat + * @generated from message cacti.satp.v02.common.MintAssertionClaimFormat */ -export class LockAssertionFormat extends Message { - constructor(data?: PartialMessage) { +export class MintAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.LockAssertionFormat"; + static readonly typeName = "cacti.satp.v02.common.MintAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ ]); - static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionFormat { - return new LockAssertionFormat().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaimFormat { + return new MintAssertionClaimFormat().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionFormat { - return new LockAssertionFormat().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaimFormat { + return new MintAssertionClaimFormat().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): LockAssertionFormat { - return new LockAssertionFormat().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaimFormat { + return new MintAssertionClaimFormat().fromJsonString(jsonString, options); } - static equals(a: LockAssertionFormat | PlainMessage | undefined, b: LockAssertionFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(LockAssertionFormat, a, b); + static equals(a: MintAssertionClaimFormat | PlainMessage | undefined, b: MintAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(MintAssertionClaimFormat, a, b); } } /** - * @generated from message cacti.satp.v02.common.MintAssertionClaims + * @generated from message cacti.satp.v02.common.BurnAssertionClaimFormat */ -export class MintAssertionClaims extends Message { - constructor(data?: PartialMessage) { +export class BurnAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.MintAssertionClaims"; + static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ ]); - static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaims { - return new MintAssertionClaims().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaims { - return new MintAssertionClaims().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaims { - return new MintAssertionClaims().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaimFormat { + return new BurnAssertionClaimFormat().fromJsonString(jsonString, options); } - static equals(a: MintAssertionClaims | PlainMessage | undefined, b: MintAssertionClaims | PlainMessage | undefined): boolean { - return proto3.util.equals(MintAssertionClaims, a, b); + static equals(a: BurnAssertionClaimFormat | PlainMessage | undefined, b: BurnAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(BurnAssertionClaimFormat, a, b); } } /** - * @generated from message cacti.satp.v02.common.MintAssertionClaimsFormat + * @generated from message cacti.satp.v02.common.AssignmentAssertionClaimFormat */ -export class MintAssertionClaimsFormat extends Message { - constructor(data?: PartialMessage) { +export class AssignmentAssertionClaimFormat extends Message { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.MintAssertionClaimsFormat"; + static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ ]); - static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaimsFormat { - return new MintAssertionClaimsFormat().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaimsFormat { - return new MintAssertionClaimsFormat().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaimsFormat { - return new MintAssertionClaimsFormat().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaimFormat { + return new AssignmentAssertionClaimFormat().fromJsonString(jsonString, options); } - static equals(a: MintAssertionClaimsFormat | PlainMessage | undefined, b: MintAssertionClaimsFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(MintAssertionClaimsFormat, a, b); + static equals(a: AssignmentAssertionClaimFormat | PlainMessage | undefined, b: AssignmentAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(AssignmentAssertionClaimFormat, a, b); } } /** - * @generated from message cacti.satp.v02.common.BurnAssertionClaim + * @generated from message cacti.satp.v02.common.LockAssertionClaim */ -export class BurnAssertionClaim extends Message { - constructor(data?: PartialMessage) { +export class LockAssertionClaim extends Message { + /** + * @generated from field: string receipt = 1; + */ + receipt = ""; + + /** + * @generated from field: string signature = 2; + */ + signature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaim"; + static readonly typeName = "cacti.satp.v02.common.LockAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaim { - return new BurnAssertionClaim().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaim { - return new BurnAssertionClaim().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaim { - return new BurnAssertionClaim().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): LockAssertionClaim { + return new LockAssertionClaim().fromJsonString(jsonString, options); } - static equals(a: BurnAssertionClaim | PlainMessage | undefined, b: BurnAssertionClaim | PlainMessage | undefined): boolean { - return proto3.util.equals(BurnAssertionClaim, a, b); + static equals(a: LockAssertionClaim | PlainMessage | undefined, b: LockAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(LockAssertionClaim, a, b); } } /** - * @generated from message cacti.satp.v02.common.BurnAssertionClaimFormat + * @generated from message cacti.satp.v02.common.MintAssertionClaim */ -export class BurnAssertionClaimFormat extends Message { - constructor(data?: PartialMessage) { +export class MintAssertionClaim extends Message { + /** + * @generated from field: string receipt = 1; + */ + receipt = ""; + + /** + * @generated from field: string signature = 2; + */ + signature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaimFormat"; + static readonly typeName = "cacti.satp.v02.common.MintAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaimFormat { - return new BurnAssertionClaimFormat().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaim { + return new MintAssertionClaim().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaimFormat { - return new BurnAssertionClaimFormat().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): MintAssertionClaim { + return new MintAssertionClaim().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaimFormat { - return new BurnAssertionClaimFormat().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): MintAssertionClaim { + return new MintAssertionClaim().fromJsonString(jsonString, options); } - static equals(a: BurnAssertionClaimFormat | PlainMessage | undefined, b: BurnAssertionClaimFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(BurnAssertionClaimFormat, a, b); + static equals(a: MintAssertionClaim | PlainMessage | undefined, b: MintAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(MintAssertionClaim, a, b); } } /** - * @generated from message cacti.satp.v02.common.AssignmentAssertionClaim + * @generated from message cacti.satp.v02.common.BurnAssertionClaim */ -export class AssignmentAssertionClaim extends Message { - constructor(data?: PartialMessage) { +export class BurnAssertionClaim extends Message { + /** + * @generated from field: string receipt = 1; + */ + receipt = ""; + + /** + * @generated from field: string signature = 2; + */ + signature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaim"; + static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaim { - return new AssignmentAssertionClaim().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaim { - return new AssignmentAssertionClaim().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaim { - return new AssignmentAssertionClaim().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): BurnAssertionClaim { + return new BurnAssertionClaim().fromJsonString(jsonString, options); } - static equals(a: AssignmentAssertionClaim | PlainMessage | undefined, b: AssignmentAssertionClaim | PlainMessage | undefined): boolean { - return proto3.util.equals(AssignmentAssertionClaim, a, b); + static equals(a: BurnAssertionClaim | PlainMessage | undefined, b: BurnAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(BurnAssertionClaim, a, b); } } /** - * @generated from message cacti.satp.v02.common.AssignmentAssertionClaimFormat + * @generated from message cacti.satp.v02.common.AssignmentAssertionClaim */ -export class AssignmentAssertionClaimFormat extends Message { - constructor(data?: PartialMessage) { +export class AssignmentAssertionClaim extends Message { + /** + * @generated from field: string receipt = 1; + */ + receipt = ""; + + /** + * @generated from field: string signature = 2; + */ + signature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaimFormat"; + static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaimFormat { - return new AssignmentAssertionClaimFormat().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaimFormat { - return new AssignmentAssertionClaimFormat().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaimFormat { - return new AssignmentAssertionClaimFormat().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): AssignmentAssertionClaim { + return new AssignmentAssertionClaim().fromJsonString(jsonString, options); } - static equals(a: AssignmentAssertionClaimFormat | PlainMessage | undefined, b: AssignmentAssertionClaimFormat | PlainMessage | undefined): boolean { - return proto3.util.equals(AssignmentAssertionClaimFormat, a, b); + static equals(a: AssignmentAssertionClaim | PlainMessage | undefined, b: AssignmentAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(AssignmentAssertionClaim, a, b); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index f715a7cf52..a66127f94a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, History, LockAssertionClaim, LockAssertionFormat, LockType, MintAssertionClaims, MintAssertionClaimsFormat, PayloadProfile, Permissions, SignatureAlgorithm, SubsequentCalls, TransferClaimsFormat } from "./message_pb.js"; +import { AssetProfile, AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, History, LockAssertionClaim, LockAssertionClaimFormat, LockType, MintAssertionClaim, MintAssertionClaimFormat, PayloadProfile, Permissions, SignatureAlgorithm, SubsequentCalls, TransferClaims, TransferClaimsFormat } from "./message_pb.js"; /** * @generated from enum cacti.satp.v02.common.ACCEPTANCE @@ -183,135 +183,160 @@ export class SessionData extends Message { hashTransferInitClaims = ""; /** - * @generated from field: string proposed_transfer_init_claims = 30; + * @generated from field: cacti.satp.v02.common.TransferClaims transfer_init_claims = 30; + */ + transferInitClaims?: TransferClaims; + + /** + * @generated from field: string proposed_transfer_init_claims = 31; */ proposedTransferInitClaims = ""; /** - * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 31; + * @generated from field: cacti.satp.v02.common.SignatureAlgorithm signature_algorithm = 32; */ signatureAlgorithm = SignatureAlgorithm.UNSPECIFIED; /** - * @generated from field: cacti.satp.v02.common.LockType lock_type = 32; + * @generated from field: cacti.satp.v02.common.LockType lock_type = 33; */ lockType = LockType.UNSPECIFIED; /** - * @generated from field: uint64 lock_expiration_time = 33; + * @generated from field: uint64 lock_expiration_time = 34; */ lockExpirationTime = protoInt64.zero; /** - * @generated from field: cacti.satp.v02.common.Permissions permissions = 34; + * @generated from field: cacti.satp.v02.common.Permissions permissions = 35; */ permissions?: Permissions; /** - * @generated from field: string developer_urn = 35; + * @generated from field: string developer_urn = 36; */ developerUrn = ""; /** - * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 36; + * @generated from field: cacti.satp.v02.common.CredentialProfile credential_profile = 37; */ credentialProfile = CredentialProfile.UNSPECIFIED; /** - * @generated from field: cacti.satp.v02.common.SubsequentCalls subsequent_calls = 37; + * @generated from field: cacti.satp.v02.common.SubsequentCalls subsequent_calls = 38; */ subsequentCalls?: SubsequentCalls; /** - * @generated from field: repeated cacti.satp.v02.common.History history = 38; + * @generated from field: repeated cacti.satp.v02.common.History history = 39; */ history: History[] = []; /** - * @generated from field: bool multiple_claims_allowed = 39; + * @generated from field: bool multiple_claims_allowed = 40; */ multipleClaimsAllowed = false; /** - * @generated from field: bool multiple_cancels_allowed = 40; + * @generated from field: bool multiple_cancels_allowed = 41; */ multipleCancelsAllowed = false; /** - * @generated from field: string last_message_received_timestamp = 41; + * @generated from field: string last_message_received_timestamp = 42; */ lastMessageReceivedTimestamp = ""; /** - * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps processed_timestamps = 42; + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps processed_timestamps = 43; */ processedTimestamps?: MessageStagesTimestamps; /** - * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps received_timestamps = 43; + * @generated from field: cacti.satp.v02.common.MessageStagesTimestamps received_timestamps = 44; */ receivedTimestamps?: MessageStagesTimestamps; /** - * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 44; + * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 45; */ lockAssertionClaim?: LockAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.LockAssertionFormat lock_assertion_format = 45; + * @generated from field: cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 46; */ - lockAssertionFormat?: LockAssertionFormat; + lockAssertionClaimFormat?: LockAssertionClaimFormat; /** - * @generated from field: cacti.satp.v02.common.MintAssertionClaims mint_assertion_claims = 46; + * @generated from field: cacti.satp.v02.common.MintAssertionClaim mint_assertion_claim = 47; */ - mintAssertionClaims?: MintAssertionClaims; + mintAssertionClaim?: MintAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.MintAssertionClaimsFormat mint_assertion_claims_format = 47; + * @generated from field: cacti.satp.v02.common.MintAssertionClaimFormat mint_assertion_claim_format = 48; */ - mintAssertionClaimsFormat?: MintAssertionClaimsFormat; + mintAssertionClaimFormat?: MintAssertionClaimFormat; /** - * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 48; + * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 49; */ burnAssertionClaim?: BurnAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 49; + * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 50; */ burnAssertionClaimFormat?: BurnAssertionClaimFormat; /** - * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 50; + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 51; */ assignmentAssertionClaim?: AssignmentAssertionClaim; /** - * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 51; + * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 52; */ assignmentAssertionClaimFormat?: AssignmentAssertionClaimFormat; /** - * @generated from field: bool completed = 52; + * @generated from field: bool completed = 53; */ completed = false; /** - * @generated from field: cacti.satp.v02.common.ACCEPTANCE acceptance = 53; + * @generated from field: cacti.satp.v02.common.ACCEPTANCE acceptance = 54; */ acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; /** - * @generated from field: string last_message_hash = 54; + * @generated from field: string last_message_hash = 55; */ lastMessageHash = ""; /** - * @generated from field: cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 55; + * @generated from field: cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 56; */ transferClaimsFormat?: TransferClaimsFormat; + /** + * @generated from field: string client_transfer_number = 57; + */ + clientTransferNumber = ""; + + /** + * @generated from field: string server_transfer_number = 58; + */ + serverTransferNumber = ""; + + /** + * @generated from field: string lock_assertion_expiration = 59; + */ + lockAssertionExpiration = ""; + + /** + * @generated from field: cacti.satp.v02.common.AssetProfile asset_profile = 60; + */ + assetProfile?: AssetProfile; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -349,32 +374,37 @@ export class SessionData extends Message { { no: 27, name: "sender_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 28, name: "receiver_gateway_owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 29, name: "hash_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 30, name: "proposed_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 31, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, - { no: 32, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, - { no: 33, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, - { no: 34, name: "permissions", kind: "message", T: Permissions }, - { no: 35, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 36, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, - { no: 37, name: "subsequent_calls", kind: "message", T: SubsequentCalls }, - { no: 38, name: "history", kind: "message", T: History, repeated: true }, - { no: 39, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 40, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 41, name: "last_message_received_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 42, name: "processed_timestamps", kind: "message", T: MessageStagesTimestamps }, - { no: 43, name: "received_timestamps", kind: "message", T: MessageStagesTimestamps }, - { no: 44, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, - { no: 45, name: "lock_assertion_format", kind: "message", T: LockAssertionFormat }, - { no: 46, name: "mint_assertion_claims", kind: "message", T: MintAssertionClaims }, - { no: 47, name: "mint_assertion_claims_format", kind: "message", T: MintAssertionClaimsFormat }, - { no: 48, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, - { no: 49, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, - { no: 50, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, - { no: 51, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, - { no: 52, name: "completed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 53, name: "acceptance", kind: "enum", T: proto3.getEnumType(ACCEPTANCE) }, - { no: 54, name: "last_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 55, name: "transfer_claims_format", kind: "message", T: TransferClaimsFormat }, + { no: 30, name: "transfer_init_claims", kind: "message", T: TransferClaims }, + { no: 31, name: "proposed_transfer_init_claims", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 32, name: "signature_algorithm", kind: "enum", T: proto3.getEnumType(SignatureAlgorithm) }, + { no: 33, name: "lock_type", kind: "enum", T: proto3.getEnumType(LockType) }, + { no: 34, name: "lock_expiration_time", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 35, name: "permissions", kind: "message", T: Permissions }, + { no: 36, name: "developer_urn", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 37, name: "credential_profile", kind: "enum", T: proto3.getEnumType(CredentialProfile) }, + { no: 38, name: "subsequent_calls", kind: "message", T: SubsequentCalls }, + { no: 39, name: "history", kind: "message", T: History, repeated: true }, + { no: 40, name: "multiple_claims_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 41, name: "multiple_cancels_allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 42, name: "last_message_received_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 43, name: "processed_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 44, name: "received_timestamps", kind: "message", T: MessageStagesTimestamps }, + { no: 45, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, + { no: 46, name: "lock_assertion_claim_format", kind: "message", T: LockAssertionClaimFormat }, + { no: 47, name: "mint_assertion_claim", kind: "message", T: MintAssertionClaim }, + { no: 48, name: "mint_assertion_claim_format", kind: "message", T: MintAssertionClaimFormat }, + { no: 49, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, + { no: 50, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, + { no: 51, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, + { no: 52, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, + { no: 53, name: "completed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 54, name: "acceptance", kind: "enum", T: proto3.getEnumType(ACCEPTANCE) }, + { no: 55, name: "last_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 56, name: "transfer_claims_format", kind: "message", T: TransferClaimsFormat }, + { no: 57, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 58, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 59, name: "lock_assertion_expiration", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 60, name: "asset_profile", kind: "message", T: AssetProfile }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts index fac231eed5..4a6e7dc4cd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -187,6 +187,11 @@ export class TransferCommenceResponseMessage extends Message) { super(); proto3.util.initPartial(data, this); @@ -196,6 +201,7 @@ export class TransferCommenceResponseMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TransferCommenceResponseMessage { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts index a7e91edc78..2fb9380d15 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { CommonSatp, LockAssertionClaim, LockAssertionFormat } from "./common/message_pb.js"; +import { CommonSatp, LockAssertionClaim, LockAssertionClaimFormat } from "./common/message_pb.js"; /** * @generated from message cacti.satp.v02.LockAssertionRequestMessage @@ -22,9 +22,9 @@ export class LockAssertionRequestMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, { no: 2, name: "lock_assertion_claim", kind: "message", T: LockAssertionClaim }, - { no: 3, name: "lock_assertion_format", kind: "message", T: LockAssertionFormat }, + { no: 3, name: "lock_assertion_claim_format", kind: "message", T: LockAssertionClaimFormat }, { no: 4, name: "lock_assertion_expiration", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 6, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts index 7c4c0246fe..5e64da5a95 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CommonSatp, MintAssertionClaims, MintAssertionClaimsFormat } from "./common/message_pb.js"; +import { AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CommonSatp, MintAssertionClaim, MintAssertionClaimFormat } from "./common/message_pb.js"; /** * @generated from message cacti.satp.v02.CommitPreparationRequestMessage @@ -66,14 +66,14 @@ export class CommitReadyResponseMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "mint_assertion_claims", kind: "message", T: MintAssertionClaims }, - { no: 3, name: "mint_assertion_claims_format", kind: "message", T: MintAssertionClaimsFormat }, + { no: 2, name: "mint_assertion_claim", kind: "message", T: MintAssertionClaim }, + { no: 3, name: "mint_assertion_claim_format", kind: "message", T: MintAssertionClaimFormat }, { no: 4, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts new file mode 100644 index 0000000000..22f63d434f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts @@ -0,0 +1,92 @@ +import { + LogLevelDesc, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +// import { BesuBridge } from "../core/stage-services/satp-bridge/besu-bridge"; +// import { FabricBridge } from "../core/stage-services/satp-bridge/fabric-bridge"; +// import { NetworkBridge } from "../core/stage-services/satp-bridge/network-bridge-interface"; +// import { SATPBridge } from "../core/stage-services/satp-bridge/satp-bridge"; +import { SupportedChain } from "../core/types"; +// import { +// FabricConfig, +// BesuConfig, +// BridgeConfig, +// } from "../types/blockchain-interaction"; +import { ValidatorOptions } from "class-validator"; + +export interface ISATPBridgesOptions { + logLevel?: LogLevelDesc; + //networks: BridgeConfig[]; + validationOptions?: ValidatorOptions; + supportedDLTs: SupportedChain[]; +} + +export class SATPBridgesManager { + static CLASS_NAME: string = "SATPBridgesManager"; + + // bridges: Map = new Map(); + log: Logger; + + constructor(private config: ISATPBridgesOptions) { + this.log = LoggerProvider.getOrCreate({ + level: config.logLevel, + label: SATPBridgesManager.CLASS_NAME, + }); + + // config.networks.map((bridgeConfig) => { + // let bridge: NetworkBridge; + // switch (bridgeConfig.network) { + // case SupportedChain.FABRIC: + // bridge = new FabricBridge(bridgeConfig as FabricConfig); + // break; + // case SupportedChain.BESU: + // bridge = new BesuBridge(bridgeConfig as BesuConfig); + // break; + // default: + // throw new Error(`Unsupported network: ${bridgeConfig.network}`); + // } + // const config: SATPBridgeConfig = { + // network: bridge, + // logLevel: bridgeConfig.logLevel, + // }; + // const satp = new SATPBridge(config); + // this.bridges.set(bridgeConfig.network, satp); + // }); + } + + // public getBridge(network: string): SATPBridge { + // if (!this.bridges.has(network)) { + // throw new Error(`Bridge for network ${network} not found`); + // } + // return this.bridges.get(network) as SATPBridge; + // } + + // public getBridgesList(): string[] { + // return Array.from(this.bridges.keys()); + // } + + // public addBridgeFromConfig(bridgeConfig: BridgeConfig) { + // let bridge: NetworkBridge; + // switch (bridgeConfig.network) { + // case SupportedChain.FABRIC: + // bridge = new FabricBridge(bridgeConfig as FabricConfig); + // break; + // case SupportedChain.BESU: + // bridge = new BesuBridge(bridgeConfig as BesuConfig); + // break; + // default: + // throw new Error(`Unsupported network: ${bridgeConfig.network}`); + // } + // const config: SATPBridgeConfig = { + // network: bridge, + // logLevel: bridgeConfig.logLevel, + // }; + // const satp = new SATPBridge(config); + // this.bridges.set(bridgeConfig.network, satp); + // } + + // public addBridge(network: string, bridge: SATPBridge): void { + // this.bridges.set(network, bridge); + // } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 543c4a2291..5a0a645d7a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -8,13 +8,13 @@ import { import { Stage1SATPHandler } from "../core/stage-handlers/stage1-handler"; import { Stage1ServerService } from "../core/stage-services/server/stage1-server-service"; -// import { Stage2ServerService } from "../core/stage-services/server/stage2-server-service"; -// import { Stage3ServerService } from "../core/stage-services/server/stage3-server-service"; +import { Stage2ServerService } from "../core/stage-services/server/stage2-server-service"; +import { Stage3ServerService } from "../core/stage-services/server/stage3-server-service"; import { SATPSession } from "../core/satp-session"; import { SupportedChain } from "../core/types"; import { Stage1ClientService } from "../core/stage-services/client/stage1-client-service"; -// import { Stage2ClientService } from "../core/stage-services/client/stage2-client-service"; -// import { Stage3ClientService } from "../core/stage-services/client/stage3-client-service"; +import { Stage2ClientService } from "../core/stage-services/client/stage2-client-service"; +import { Stage3ClientService } from "../core/stage-services/client/stage3-client-service"; import { SATPService, SATPHandler, @@ -22,6 +22,9 @@ import { SATPHandlerOptions, } from "../types/satp-protocol"; import { ISATPServiceOptions } from "../core/stage-services/satp-service"; +import { Stage2SATPHandler } from "../core/stage-handlers/stage2-handler"; +import { Stage3SATPHandler } from "../core/stage-handlers/stage3-handler"; +import { SATPBridgesManager } from "./satp-bridges-manager"; export interface ISATPManagerOptions { logLevel?: LogLevelDesc; @@ -29,6 +32,7 @@ export interface ISATPManagerOptions { sessions?: Map; signer: JsObjectSigner; supportedDLTs: SupportedChain[]; + bridgeManager: SATPBridgesManager; } export class SATPManager { @@ -39,9 +43,13 @@ export class SATPManager { private signer: JsObjectSigner; public supportedDLTs: SupportedChain[] = []; private sessions: Map; + private handlers: SATPHandler[] = []; + + private readonly bridgeManager: SATPBridgesManager; private readonly satpServices: SATPService[] = []; - private readonly satpHandlers: SATPHandler[] = []; + private readonly satpHandlers: Map> = + new Map(); constructor(public readonly options: ISATPManagerOptions) { const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; @@ -54,15 +62,23 @@ export class SATPManager { this.logger.info(`Instantiated ${this.className} OK`); this.supportedDLTs = options.supportedDLTs; this.signer = options.signer; + this.bridgeManager = options.bridgeManager; this.sessions = options.sessions || new Map(); const handlersClasses = [ Stage1SATPHandler, - // Stage2SATPHandler, - // Stage3SATPHandler, + Stage2SATPHandler, + Stage3SATPHandler, ]; - const serviceClasses = [Stage1ServerService, Stage1ClientService]; + const serviceClasses = [ + Stage1ServerService, + Stage1ClientService, + Stage2ServerService, + Stage2ClientService, + Stage3ServerService, + Stage3ClientService, + ]; const serviceOptions = this.initializeServiceOptions( serviceClasses, @@ -83,8 +99,18 @@ export class SATPManager { level, ); - const handlers = this.initializeHandlers(handlersClasses, handlersOptions); - this.satpHandlers = handlers; + this.handlers = this.initializeHandlers(handlersClasses, handlersOptions); + + for (const handler of this.handlers) { + const sessionId = mockSession.getSessionData().id; + const handlerMap = this.satpHandlers.get(sessionId); + if (handlerMap == undefined) { + this.satpHandlers.set(sessionId, new Map()); + } + this.satpHandlers + .get(sessionId) + ?.set(handler.getHandlerIdentifier(), handler); + } } public getServiceByStage( @@ -126,6 +152,12 @@ export class SATPManager { return this.supportedDLTs; } + public getSATPHandlers( + sessionId: string, + ): Map | undefined { + return this.satpHandlers.get(sessionId); + } + public getOrCreateSession( sessionId?: string, contextID?: string, @@ -155,7 +187,7 @@ export class SATPManager { return this.endpoints; } - this.endpoints = this.satpHandlers; + this.endpoints = this.handlers; return this.endpoints; } @@ -175,6 +207,7 @@ export class SATPManager { serviceName: `Service-${index}`, serviceType: index % 2 === 0 ? SATPServiceType.Server : SATPServiceType.Client, + bridgeManager: this.bridgeManager, })); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index d271213457..55bee1be83 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -41,16 +41,18 @@ import { ILocalLogRepository, IRemoteLogRepository, } from "./repository/interfaces/repository"; -import { SATPLedgerConnector } from "./types/blockchain-interaction"; import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; import fs from "fs"; import swaggerUi, { JsonObject } from "swagger-ui-express"; -import { SATPSession } from "./core/satp-session"; import { IPluginWebService, ICactusPlugin, IWebServiceEndpoint, } from "@hyperledger/cactus-core-api"; +import { + ISATPBridgesOptions, + SATPBridgesManager, +} from "./gol/satp-bridges-manager"; export class SATPGateway implements IPluginWebService, ICactusPlugin { // todo more checks; example port from config is between 3000 and 9000 @@ -72,6 +74,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { public readonly instanceId: string; private supportedDltIDs: SupportedChain[]; private gatewayOrchestrator: GatewayOrchestrator; + private bridgesManager: SATPBridgesManager; private BLOApplication?: Express; private BLOServer?: http.Server; @@ -120,6 +123,12 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { signer: this.signer!, }; + const bridgesManagerOptions: ISATPBridgesOptions = { + logLevel: this.config.logLevel, + supportedDLTs: this.config.gid!.supportedDLTs, + // networks: [], //todo add networks + }; + if (this.config.gid) { this.logger.info( "Initializing gateway connection manager with seed gateways", @@ -131,6 +140,12 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { throw new Error("GatewayIdentity is not defined"); } + this.bridgesManager = new SATPBridgesManager(bridgesManagerOptions); + + if (!this.bridgesManager) { + throw new Error("BridgesManager is not defined"); + } + this.instanceId = uuidv4(); const dispatcherOps: BLODispatcherOptions = { logger: this.logger, @@ -138,6 +153,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { instanceId: this.config.gid!.id, orchestrator: this.gatewayOrchestrator, signer: this.signer, + bridgesManager: this.bridgesManager, }; this.supportedDltIDs = this.config.gid!.supportedDLTs; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts deleted file mode 100644 index dc5fe3181d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// TODO: define alias types for SATPLedgerConnector, which encapsulates IPluginLedgerConnector -// inject gateway, get connectors -export type SATPLedgerConnector = string; - -// TODO Define lock interfaces and strategy pattern for locking (as function of locking blockchain) (see what smart contract implementations return) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index cab98da467..9fbe9a40dc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -1,9 +1,4 @@ -import { - ILoggerOptions, - JsObjectSigner, - LogLevelDesc, - Logger, -} from "@hyperledger/cactus-common"; +import { ILoggerOptions } from "@hyperledger/cactus-common"; import { SupportedChain } from "../core/types"; import { ConnectRouter } from "@connectrpc/connect"; import { SATPSession } from "../core/satp-session"; @@ -20,6 +15,7 @@ import { export interface SATPHandler { setupRouter(router: ConnectRouter): void; getHandlerIdentifier(): string; + getSessionId(): string; } export interface SATPHandlerOptions { diff --git a/yarn.lock b/yarn.lock index 5308881112..be1aa444d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6422,9 +6422,9 @@ __metadata: linkType: hard "@cspell/dict-cpp@npm:^5.1.10": - version: 5.1.10 - resolution: "@cspell/dict-cpp@npm:5.1.10" - checksum: 10/ba8727af8ab3ac18f0ba030f043378bb6c951d819b7fba0114ca9377271752d04c1b3b6dfe4f9384fc35069ab7ff671313bc681a06345ef6625be7ca7fc37132 + version: 5.1.19 + resolution: "@cspell/dict-cpp@npm:5.1.19" + checksum: 10/f49912cdb783e403c114721ac1f2dc429206450d4eb6062d53796c7f566c5e644f68ba367a0ff9e501ab872f7d3d70d08102a492daca53ae4cb77ff2bb21c857 languageName: node linkType: hard @@ -6718,9 +6718,9 @@ __metadata: linkType: hard "@cspell/dict-software-terms@npm:^3.4.9": - version: 3.4.9 - resolution: "@cspell/dict-software-terms@npm:3.4.9" - checksum: 10/2fc21d7fefbd0269b760d2f634b22d6e54bd71dd3c03d96b59931fd1ef0c7380b6596e578621f907823eb8423bbdd297f56d8eaa150f2bbb23ed0559656c7523 + version: 3.4.10 + resolution: "@cspell/dict-software-terms@npm:3.4.10" + checksum: 10/f5bdee39e463d279e4f907cc7771342ab97f330d088b07acb2fc53747e98a2403dd249bdd5303a23fe61cd54029099a0ae83c63fdd3c8085a6f0b131ad001012 languageName: node linkType: hard @@ -6746,9 +6746,9 @@ __metadata: linkType: hard "@cspell/dict-terraform@npm:^1.0.0": - version: 1.0.0 - resolution: "@cspell/dict-terraform@npm:1.0.0" - checksum: 10/132b8f0532aa5a6a08fa57487313722bc10ad37a4b94a5d76b072922eb4eb56d204a3e33c1569613af5b337bd125b8e2d30cae6bf5400a07fa58c551c7fe3b37 + version: 1.0.2 + resolution: "@cspell/dict-terraform@npm:1.0.2" + checksum: 10/68b4ab50ebb6087520c977a87d1307135d7d91084bc13975573e34beeed9cfd75ec87ecac221a6afa48d0e28d7058ade14f13ef7e625e295aaad7218d1abbae1 languageName: node linkType: hard @@ -10113,7 +10113,7 @@ __metadata: languageName: unknown linkType: soft -"@hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes": +"@hyperledger/cactus-plugin-bungee-hermes@npm:2.0.0-rc.7, @hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes" dependencies: @@ -13741,8 +13741,8 @@ __metadata: linkType: hard "@npmcli/arborist@npm:^7.5.3": - version: 7.5.3 - resolution: "@npmcli/arborist@npm:7.5.3" + version: 7.5.4 + resolution: "@npmcli/arborist@npm:7.5.4" dependencies: "@isaacs/string-locale-compare": "npm:^1.1.0" "@npmcli/fs": "npm:^3.1.1" @@ -13781,7 +13781,7 @@ __metadata: walk-up-path: "npm:^3.0.1" bin: arborist: bin/index.js - checksum: 10/e149df712a2396f59e348ff32d763f62bbdf576f3976110f47b10cd912a91cce76c83f859bb0f97f4ca5273f15a270df54a702190753772f3539a3f10307b6ed + checksum: 10/b77170754f419171e5ca2abfb679a9c811443e2b67036916a62eda81fd069f12c98186941cd73a0d36c2ec76cda638b43ceeb4c5fae39de1bb9df825432f3ef7 languageName: node linkType: hard @@ -13953,7 +13953,7 @@ __metadata: languageName: node linkType: hard -"@npmcli/package-json@npm:^5.1.0, @npmcli/package-json@npm:^5.2.0": +"@npmcli/package-json@npm:^5.1.0": version: 5.2.0 resolution: "@npmcli/package-json@npm:5.2.0" dependencies: @@ -13968,6 +13968,21 @@ __metadata: languageName: node linkType: hard +"@npmcli/package-json@npm:^5.2.0": + version: 5.2.1 + resolution: "@npmcli/package-json@npm:5.2.1" + dependencies: + "@npmcli/git": "npm:^5.0.0" + glob: "npm:^10.2.2" + hosted-git-info: "npm:^7.0.0" + json-parse-even-better-errors: "npm:^3.0.0" + normalize-package-data: "npm:^6.0.0" + proc-log: "npm:^4.0.0" + semver: "npm:^7.5.3" + checksum: 10/304a819b93f79a6e0e56cb371961a66d2db72142e310d545ecbbbe4d917025a30601aa8e63a5f0cc28f0fe281c116bdaf79b334619b105a1d027a2b769ecd137 + languageName: node + linkType: hard + "@npmcli/promise-spawn@npm:^6.0.0, @npmcli/promise-spawn@npm:^6.0.1": version: 6.0.2 resolution: "@npmcli/promise-spawn@npm:6.0.2" @@ -14120,70 +14135,70 @@ __metadata: linkType: hard "@octokit/plugin-paginate-rest@npm:^11.0.0": - version: 11.3.3 - resolution: "@octokit/plugin-paginate-rest@npm:11.3.3" + version: 11.3.5 + resolution: "@octokit/plugin-paginate-rest@npm:11.3.5" dependencies: - "@octokit/types": "npm:^13.5.0" + "@octokit/types": "npm:^13.6.0" peerDependencies: "@octokit/core": ">=6" - checksum: 10/87eeb4dd68a8207e669989cdbf9de3717b74038d630c2b803cbc7a9c44c3ff74771ce1cf45fa056b7172aaaa80fd9a0e4bf5eca06aabc19f30e7e29898f1f69e + checksum: 10/daa911bb370818d8cd561a7d449d164cbad6e9e29c11c666054f1ecc19d2ea9fbdc9ef8c65f33a1102096eb671847d343ae57acbeb17185e64447741ffdfde3e languageName: node linkType: hard -"@octokit/plugin-request-log@npm:^5.1.0": - version: 5.3.0 - resolution: "@octokit/plugin-request-log@npm:5.3.0" +"@octokit/plugin-request-log@npm:^5.3.1": + version: 5.3.1 + resolution: "@octokit/plugin-request-log@npm:5.3.1" peerDependencies: "@octokit/core": ">=6" - checksum: 10/8c918b14f0687e8a3d9c7c81ef1092a49de07681940cc1aee0aeb7e3dd8ac64f69af5d65932eec32f6db4af3dca80541ad3bb13ac0fa44af3e2340ed91909272 + checksum: 10/a27e163282c8d0ba8feee4d3cbbd1b62e1aa89a892877f7a9876fc17ddde3e1e1af922e6664221a0cabae99b8a7a2a5215b9ec2ee5222edb50e06298e99022b0 languageName: node linkType: hard "@octokit/plugin-rest-endpoint-methods@npm:^13.0.0": - version: 13.2.4 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.2.4" + version: 13.2.6 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.2.6" dependencies: - "@octokit/types": "npm:^13.5.0" + "@octokit/types": "npm:^13.6.1" peerDependencies: "@octokit/core": ">=6" - checksum: 10/5d90adb9b5ab52a7ce260fcd2acc48a6723fc888e4f5711f958694c4bfb53fa146ad6791ce651060566d1bd513b3d9287c44a25b1da866d9611c3e1e739b5981 + checksum: 10/368aee8b3f638faefc1426e77c138a2784fb56d0bec4e71bb128c2a46f90903b800ac2c8373c217c364f0efc403f1504e041ddba2168803a27af5c55a9fd921e languageName: node linkType: hard "@octokit/request-error@npm:^6.0.1": - version: 6.1.1 - resolution: "@octokit/request-error@npm:6.1.1" + version: 6.1.5 + resolution: "@octokit/request-error@npm:6.1.5" dependencies: "@octokit/types": "npm:^13.0.0" - checksum: 10/cae7bc4078629a02edcf35977f496a4b943e730165f6d7828795073f99a1d884ac67343b02eff69e553a5057765e466d70ddd9d266787f505aa29018858ab06d + checksum: 10/a0891df29957d9911ef34281fefffac4a98baa96ffffeb1a2b8f0c8e229911ca3da2be42e5bbe6a4b994a12fd100f4d0d86be095fada60384cd6728705eae859 languageName: node linkType: hard "@octokit/request@npm:^9.0.0": - version: 9.1.1 - resolution: "@octokit/request@npm:9.1.1" + version: 9.1.3 + resolution: "@octokit/request@npm:9.1.3" dependencies: "@octokit/endpoint": "npm:^10.0.0" "@octokit/request-error": "npm:^6.0.1" "@octokit/types": "npm:^13.1.0" universal-user-agent: "npm:^7.0.2" - checksum: 10/aef47d85751c387c6ef29e70b3b86c9033fc7940361092c80728f7e99cc0ba54ddd00bbecb4422e50df78744600cfb8a1a2bc6916c5b6440677aa8ebd6b9b291 + checksum: 10/b445f263157a2c608d8cfa89162be5f5d39551607d0ec973c3fdf9d3fd3753e33861c4e34942f5dbf47576ac91a99238ed482f2d6c6af3f9070e0b190b3f07a2 languageName: node linkType: hard "@octokit/rest@npm:^21.0.0": - version: 21.0.0 - resolution: "@octokit/rest@npm:21.0.0" + version: 21.0.2 + resolution: "@octokit/rest@npm:21.0.2" dependencies: "@octokit/core": "npm:^6.1.2" "@octokit/plugin-paginate-rest": "npm:^11.0.0" - "@octokit/plugin-request-log": "npm:^5.1.0" + "@octokit/plugin-request-log": "npm:^5.3.1" "@octokit/plugin-rest-endpoint-methods": "npm:^13.0.0" - checksum: 10/7da1c97866af04038fe4e384ce0a90cc4750bb951085c10053ceb73a4818cfe460336d7794ab3c65648cf5e195dba8e90940e36aec1e7ed22b6606cda38c88e0 + checksum: 10/f67fbb1b3e9568f352933c55703cd33354183e48710a146f6a1c5930419006d2d97c08f5b0a29a56fffc9e53f01b34bae2681a577f604172f4331644b85a9779 languageName: node linkType: hard -"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.5.0": +"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0": version: 13.5.0 resolution: "@octokit/types@npm:13.5.0" dependencies: @@ -14192,6 +14207,15 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^13.6.0, @octokit/types@npm:^13.6.1": + version: 13.6.1 + resolution: "@octokit/types@npm:13.6.1" + dependencies: + "@octokit/openapi-types": "npm:^22.2.0" + checksum: 10/9ea6189839439e1085799cc16ee699292538d9c14dd15e9e45462377287f863b6be93455d2ad9acffd561018a0c35adbb9d1437e92075c9058d6c6d69ff2f503 + languageName: node + linkType: hard + "@openapitools/openapi-generator-cli@npm:2.7.0": version: 2.7.0 resolution: "@openapitools/openapi-generator-cli@npm:2.7.0" @@ -14239,6 +14263,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:4.4.0": + version: 4.4.0 + resolution: "@openzeppelin/contracts@npm:4.4.0" + checksum: 10/1c830b5ec2a9df32d94ec14bfaead2feb4f67db2ed0e0085cf074d64b4240f9cf0760858c6f0b5a19e57e81f22f9daa892b9993bd83fdc25db2fdc48ea37b7a2 + languageName: node + linkType: hard + "@openzeppelin/contracts@npm:4.9.6": version: 4.9.6 resolution: "@openzeppelin/contracts@npm:4.9.6" @@ -23459,15 +23490,15 @@ __metadata: linkType: hard "comment-json@npm:^4.2.4": - version: 4.2.4 - resolution: "comment-json@npm:4.2.4" + version: 4.2.5 + resolution: "comment-json@npm:4.2.5" dependencies: array-timsort: "npm:^1.0.3" core-util-is: "npm:^1.0.3" esprima: "npm:^4.0.1" has-own-prop: "npm:^2.0.0" repeat-string: "npm:^1.6.1" - checksum: 10/b39109b318cbad9c8d991aebdcb1835542338b4e1c03a3d00ec72eab2e13045589c071943cb238443b9e1595800e6f82318e08aeba516d38571d7c146c58a38e + checksum: 10/dc347621de15043a16846a1697a6248b427e913ddfb57f3427ca4eedf9c92131000d5e8efc8be9fe191a74dc36b615d73207fc3585bf29ca1b8d32e90d40c801 languageName: node linkType: hard @@ -30596,11 +30627,11 @@ __metadata: linkType: hard "get-tsconfig@npm:^4.7.5": - version: 4.7.5 - resolution: "get-tsconfig@npm:4.7.5" + version: 4.8.1 + resolution: "get-tsconfig@npm:4.8.1" dependencies: resolve-pkg-maps: "npm:^1.0.0" - checksum: 10/de7de5e4978354e8e6d9985baf40ea32f908a13560f793bc989930c229cc8d5c3f7b6b2896d8e43eb1a9b4e9e30018ef4b506752fd2a4b4d0dfee4af6841b119 + checksum: 10/3fb5a8ad57b9633eaea085d81661e9e5c9f78b35d8f8689eaf8b8b45a2a3ebf3b3422266d4d7df765e308cc1e6231648d114803ab3d018332e29916f2c1de036 languageName: node linkType: hard @@ -32718,8 +32749,8 @@ __metadata: linkType: hard "inquirer@npm:^9.3.4": - version: 9.3.4 - resolution: "inquirer@npm:9.3.4" + version: 9.3.7 + resolution: "inquirer@npm:9.3.7" dependencies: "@inquirer/figures": "npm:^1.0.3" ansi-escapes: "npm:^4.3.2" @@ -32733,7 +32764,7 @@ __metadata: strip-ansi: "npm:^6.0.1" wrap-ansi: "npm:^6.2.0" yoctocolors-cjs: "npm:^2.1.2" - checksum: 10/f9d20820ad07bfaa98ad1b0e1bb65da9cb020edafda25f781a28e7fe0fc98eb15b3fe95687258140a24a6bc9d209740d38ab17cc265c12fa6738db530c71b17e + checksum: 10/92d0a0f55701e05a8dd3624eab0c03c6e96de18285cefdbef4edc5c1a77c8283361700e088db275ec5d5b36c45ff9428127125d78428e07ea4c5574f55b17176 languageName: node linkType: hard @@ -37553,7 +37584,14 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": +"lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a + languageName: node + linkType: hard + +"lru-cache@npm:^10.2.2": version: 10.3.0 resolution: "lru-cache@npm:10.3.0" checksum: 10/37e921aedbd1f4062475d9fa6760391fa7adfaaee3a5a6cbedd1d6d0b46705c14012312c1edb2b13f119eae6584a48f73c158d118828d42475b44a7abf7d05ab @@ -40288,7 +40326,6 @@ __metadata: make-fetch-happen: "npm:^13.0.0" minipass: "npm:^7.0.2" minipass-fetch: "npm:^3.0.0" - minipass-json-stream: "npm:^1.0.1" minizlib: "npm:^2.1.2" npm-package-arg: "npm:^11.0.0" proc-log: "npm:^4.0.0" @@ -51680,9 +51717,9 @@ __metadata: linkType: hard "vscode-languageserver-textdocument@npm:^1.0.11": - version: 1.0.11 - resolution: "vscode-languageserver-textdocument@npm:1.0.11" - checksum: 10/6096d2a85570e819e01ff406de7c88c48211e6874c6fc71df92193aa8b5aadf40591e44f033d634a95d04975d7aad29049d3eccab617ca41c189ae325aadb913 + version: 1.0.12 + resolution: "vscode-languageserver-textdocument@npm:1.0.12" + checksum: 10/2bc0fde952d40f35a31179623d1491b0fafdee156aaf58557f40f5d394a25fc84826763cdde55fa6ce2ed9cd35a931355ad6dd7fe5db82e7f21e5d865f0af8c6 languageName: node linkType: hard From f2edd4742d2d80da2321b16b7ee3813c576c8bf8 Mon Sep 17 00:00:00 2001 From: Carlos Amaro <64661289+LordKubaya@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:13:19 +0100 Subject: [PATCH 20/49] feat(satp-hermes): fabric and besu bridges, wrapper contracts with ontology (#3382) feat(satp-hermes): added forge to compile solidity contracts Signed-off-by: Carlos Amaro --- .../src/main/json/openapi.json | 4 +- .../generated/openapi/typescript-axios/api.ts | 3 +- .../view-creation/privacy-policies.ts | 13 + .../main/typescript/view-creation/snapshot.ts | 16 + .../main/typescript/view-creation/state.ts | 10 + packages/cactus-plugin-satp-hermes/.gitignore | 1 + .../cactus-plugin-satp-hermes/foundry.toml | 3 + .../cactus-plugin-satp-hermes/package.json | 15 +- .../main/proto/cacti/satp/v02/stage_3.proto | 4 +- .../blo/admin/get-status-handler-service.ts | 2 +- .../client/stage1-client-service.ts | 40 +- .../stage-services/satp-bridge/besu-bridge.ts | 386 ++ .../satp-bridge/bridge-manager.ts | 79 + .../satp-bridge/fabric-bridge.ts | 325 ++ .../satp-bridge/network-bridge.ts | 51 + .../satp-bridge/satp-bridge-manager.ts | 200 + .../stage-services/satp-bridge/types/asset.ts | 34 + .../satp-bridge/types/besu-asset.ts | 20 + .../satp-bridge/types/fabric-asset.ts | 30 + .../satp-bridge/types/interact.ts | 5 + .../server/stage1-server-service.ts | 27 +- .../src/main/typescript/core/types.ts | 7 +- .../chaincode-typescript/.gitignore | 1 + .../chaincode-typescript/package.json | 65 + .../src/ITraceableContract.ts | 13 + .../chaincode-typescript/src/index.ts | 9 + .../src/interaction-signature.ts | 31 + .../chaincode-typescript/src/satp-wrapper.ts | 517 +++ .../chaincode-typescript/src/token.ts | 29 + .../test/satp-wrapper.test.ts | 418 ++ .../chaincode-typescript/tsconfig.json | 5 +- .../chaincode-typescript/yarn.lock | 3662 ++++++++++++++++ .../src/main/typescript/gateway-utils.ts | 20 + .../openapi-blo/typescript-axios/.gitignore | 4 + .../openapi-blo/typescript-axios/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../openapi-blo/typescript-axios/git_push.sh | 57 + .../proto/cacti/satp/v02/common/session_pb.ts | 6 +- .../proto/cacti/satp/v02/stage_2_pb.ts | 4 +- .../proto/cacti/satp/v02/stage_3_pb.ts | 12 +- .../types/blockchain-interaction.ts | 42 + .../src/main/typescript/types/satp-session.ts | 31 + .../src/solidity/ITraceableContract.sol | 10 + .../solidity/satp-wrapper-without-json.sol | 184 + .../src/solidity/satp-wrapper.sol | 251 ++ .../solidity/contracts/ITraceableContract.sol | 10 + .../contracts/satp-contract-interface.sol | 20 + .../test/solidity/contracts/satp-erc20.sol | 74 + .../contracts/test/satp-erc20-test.sol | 63 + .../contracts/test/satp-wrapper-test.sol | 162 + .../lock-asset-contract/LockAsset.json | 2504 ----------- .../lock-asset-contract/lock-asset.sol | 70 - .../test/solidity/satp-erc20-interact.json | 49 + .../chaincode-typescript/src/asset.ts | 20 - .../chaincode-typescript/src/assetTransfer.ts | 182 - .../chaincode-typescript/src/index.ts | 9 - .../chaincode-typescript/.gitignore | 17 + .../chaincode-typescript/lib/tokenERC20.js | 516 +++ .../chaincode-typescript/package.json | 38 +- .../src/ITraceableContract.ts | 13 + .../chaincode-typescript/src/index.ts | 9 + .../src/satp-contract-interface.ts | 32 + .../chaincode-typescript/src/satp-contract.ts | 174 + .../chaincode-typescript/src/tokenERC20.ts | 565 +++ .../test/satp-contract.test.ts | 230 + .../test/tokenERC20.test.js | 397 ++ .../chaincode-typescript/tsconfig.json | 19 + .../chaincode-typescript/yarn.lock | 3747 +++++++++++++++++ .../fabric/satp-erc20-interact.json | 38 + .../integration/bridge/besu-bridge.test.ts | 592 +++ .../integration/bridge/fabric-bridge.test.ts | 1062 +++++ .../src/test/typescript/test-utils.ts | 4 +- .../unit/satp-bridge-manager.test.ts | 145 + .../cactus-plugin-satp-hermes/tsconfig.json | 3 +- .../main/typescript/besu/besu-test-ledger.ts | 2 +- yarn.lock | 407 +- 76 files changed, 14970 insertions(+), 2873 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/foundry.toml create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts rename packages/cactus-plugin-satp-hermes/src/{test/typescript/fabric-contracts/lock-asset => main/typescript/fabric-contracts/satp-wrapper}/chaincode-typescript/.gitignore (96%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts rename packages/cactus-plugin-satp-hermes/src/{test/typescript/fabric-contracts/lock-asset => main/typescript/fabric-contracts/satp-wrapper}/chaincode-typescript/tsconfig.json (79%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js rename packages/cactus-plugin-satp-hermes/src/test/typescript/{fabric-contracts/lock-asset => fabric/contracts/satp-contract}/chaincode-typescript/package.json (57%) create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts diff --git a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json index 4cc0d3870c..239399b6fa 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json +++ b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json @@ -28,8 +28,8 @@ "PrivacyPolicyOpts": { "description": "identifier of the policy used to process a view", "type": "string", - "enum": ["pruneState"], - "x-enum-varnames": ["PruneState"] + "enum": ["pruneState", "singleTransaction"], + "x-enum-varnames": ["PruneState", "SingleTransaction"] }, "MergePolicyOpts": { "description": "identifier of the policy used to merge views (can be none)", diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts index 7a3d524e57..269ecff837 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -185,7 +185,8 @@ export interface MergeViewsResponse { */ export const PrivacyPolicyOpts = { - PruneState: 'pruneState' + PruneState: 'pruneState', + SingleTransaction: 'singleTransaction' } as const; export type PrivacyPolicyOpts = typeof PrivacyPolicyOpts[keyof typeof PrivacyPolicyOpts]; diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts index a32c5314d5..4e78f62009 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts @@ -18,11 +18,24 @@ export class PrivacyPolicies { return view; } + public singleTransaction( + view: View, + stateId: string, + transactionId: string, + ): View { + const snapshot = view.getSnapshot(); + snapshot.filterTransaction(stateId, transactionId); + return view; + } + public getPrivacyPolicy(opts: PrivacyPolicyOpts): IPrivacyPolicy | undefined { switch (opts) { case PrivacyPolicyOpts.PruneState: return this.pruneState; break; + case PrivacyPolicyOpts.SingleTransaction: + return this.singleTransaction; + break; default: return undefined; break; diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts index 3a22583fa8..b8b73fcda2 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts @@ -76,6 +76,22 @@ export class Snapshot { this.stateBins = stateBins; } + public selectStates(states: string[]): void { + const stateBins: State[] = []; + for (const state of this.stateBins) { + if (states.includes(state.getId())) { + stateBins.push(state); + } + } + this.stateBins = stateBins; + } + + public filterTransaction(stateId: string, transaction: string): void { + this.selectStates([stateId]); + const state = this.stateBins[0]; + state.selectTransactions([transaction]); + } + public getSnapshotJson(): string { const snapshotJson = { id: this.id, diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts index b390afa36c..ad1ed6bb65 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts @@ -54,6 +54,16 @@ export class State { return this.transactions; } + public selectTransactions(txs: string[]): void { + const transactions: Transaction[] = []; + for (const tx of this.transactions) { + if (txs.includes(tx.getId())) { + transactions.push(tx); + } + } + this.transactions = transactions; + } + public getInitialTime(): string { if (this.transactions.length >= 1) { return this.transactions[0].getTimeStamp(); diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index 55270896e4..2d414222df 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -4,3 +4,4 @@ src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator src/main/typescript/generated/gateway-client/typescript-axios/api.ts src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES +src/main/typescript/fabric-contracts/satp/chaincode-typescript/.yarn/ diff --git a/packages/cactus-plugin-satp-hermes/foundry.toml b/packages/cactus-plugin-satp-hermes/foundry.toml new file mode 100644 index 0000000000..2018a4da62 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/foundry.toml @@ -0,0 +1,3 @@ +[profile.default] +solc-version = "0.8.20" +evm-version = "paris" \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index e1f6d2f686..fd9c257bf4 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -31,6 +31,10 @@ { "name": "Rafael Belchior", "url": "https://github.com/RafaelAPB" + }, + { + "name": "Carlos Amaro", + "url": "https://github.com/LordKubaya" } ], "main": "dist/lib/main/typescript/index.js", @@ -46,8 +50,12 @@ "bundle-openapi-json": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/json/openapi-blo-bundled.json -r -t json", "bundle-openapi-yaml": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/yml/bol/openapi-blo-bundled.yml -r -t yaml", "codegen": "run-p 'codegen:*'", + "codegen:abi": "yarn forge:all && abi-types-generator './src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json' --output='./src/main/typescript/generated'", "codegen:openapi": "npm run generate-sdk", "codegen:proto": "npm run generate-proto", + "forge": "forge build ./src/solidity/*.sol --out ./src/solidity/generated", + "forge:all": "run-p 'forge' 'forge:test'", + "forge:test": "forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated", "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", @@ -81,17 +89,20 @@ "@connectrpc/protoc-gen-connect-es": "1.3.0", "@bufbuild/protobuf": "1.10.0", "@hyperledger/cactus-plugin-bungee-hermes": "2.0.0", - "axios": "1.7.7", "body-parser": "1.20.2", "class-transformer": "0.5.1", "class-validator": "0.14.1", "crypto-js": "4.2.0", + "ethers": "^6.13.1", "express": "4.17.2", "fabric-network": "2.2.19", "fs-extra": "11.2.0", + "hardhat": "2.22.5", "knex": "2.4.0", "kubo-rpc-client": "3.0.1", + "npm-run-all": "4.1.5", + "openzeppelin-solidity": "3.4.2", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", @@ -104,6 +115,7 @@ "devDependencies": { "@apidevtools/swagger-cli": "4.0.4", "@bufbuild/buf": "1.29.0", + "@bufbuild/protobuf": "1.7.2", "@bufbuild/protoc-gen-es": "1.8.0", "@quobix/vacuum": "^0.9.10", "@types/body-parser": "1.19.4", @@ -115,6 +127,7 @@ "@types/tape": "4.13.4", "@types/uuid": "10.0.0", "body-parser": "1.20.3", + "ethereum-abi-types-generator": "1.3.4", "express": "4.21.0", "fabric-network": "2.2.20", "kubo-rpc-client": "3.0.1", diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto index 11ff12313a..0f96e0dd1d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto @@ -21,7 +21,7 @@ message CommitReadyResponseMessage { message CommitFinalAssertionRequestMessage { cacti.satp.v02.common.CommonSatp common = 1; - cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 2; + string burn_assertion_claim = 2; cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 3; string client_transfer_number = 4; string client_signature = 5; @@ -30,7 +30,7 @@ message CommitFinalAssertionRequestMessage { message CommitFinalAcknowledgementReceiptResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; - cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 2; + string assignment_assertion_claim = 2; cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 3; string server_transfer_number = 4; string server_signature = 5; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index 76034e9f1e..626e05ea1c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -3,7 +3,7 @@ import { StatusRequest, StatusResponse, Transact200ResponseStatusResponseOriginChain, -} from "../../generated/gateway-client/typescript-axios"; +} from "../../generated/gateway-client/typescript-axios/api"; import { Logger } from "@hyperledger/cactus-common"; export async function ExecuteGetStatus( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 239b92132b..f98305679f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -30,6 +30,7 @@ import { ISATPClientServiceOptions, ISATPServiceOptions, } from "../satp-service"; +import { ACCEPTANCE } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; export class Stage1ClientService extends SATPService { public static readonly SATP_STAGE = "1"; @@ -211,7 +212,7 @@ export class Stage1ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferCommenceRequest...`); - if (!response || !response.common) { + if (response.common == undefined) { throw new Error("Response or response.common is undefined"); } @@ -226,11 +227,17 @@ export class Stage1ClientService extends SATPService { commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); - //todo check when reject - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.INIT_RECEIPT, - ); + if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_ACCEPTED) { + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_RECEIPT, + ); + } else if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_CONDITIONAL) { + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_REJECT, + ); + } commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -243,7 +250,15 @@ export class Stage1ClientService extends SATPService { transferCommenceRequestMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; - // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; + if (sessionData.transferContextId != undefined) { + transferCommenceRequestMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.clientTransferNumber != undefined) { + transferCommenceRequestMessage.clientTransferNumber = + sessionData.clientTransferNumber; + } const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), @@ -296,8 +311,6 @@ export class Stage1ClientService extends SATPService { throw new Error(`${fnTag}, satp common body is missing required fields`); } - // const sessionId = response.common.sessionId; - const sessionData = session.getSessionData(); if (sessionData == undefined) { @@ -369,6 +382,15 @@ export class Stage1ClientService extends SATPService { ); } + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt transferContextId mismatch or not received`, + ); + } + if ( response.common.messageType == MessageType.INIT_REJECT && response.transferCounterClaims == undefined diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts new file mode 100644 index 0000000000..c7fb4ed40b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts @@ -0,0 +1,386 @@ +import { + BesuConfig, + TransactionResponse, +} from "../../../types/blockchain-interaction"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + RunTransactionResponse, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { NetworkBridge } from "./network-bridge"; +import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { StrategyBesu } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-besu"; +import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; +import { BesuAsset, getVarTypes } from "./types/besu-asset"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { InteractionsRequest } from "../../../generated/SATPWrapperContract"; +import { getInteractionType } from "./types/asset"; +import { InteractionData } from "./types/interact"; + +interface BesuResponse { + success: boolean; + out: RunTransactionResponse; + callOutput: unknown; +} +export class BesuBridge implements NetworkBridge { + public static readonly CLASS_NAME = "BesuBridge"; + + network: string = "BESU"; + + public log: Logger; + + private connector: PluginLedgerConnectorBesu; + private bungee: PluginBungeeHermes; + private options: IPluginLedgerConnectorBesuOptions; + private config: BesuConfig; + + constructor(besuConfig: BesuConfig) { + this.config = besuConfig; + this.options = besuConfig.options; + const level = this.config.logLevel || "INFO"; + const label = BesuBridge.CLASS_NAME; + + this.log = LoggerProvider.getOrCreate({ label, level }); + + this.connector = new PluginLedgerConnectorBesu(besuConfig.options); + this.bungee = new PluginBungeeHermes(besuConfig.bungeeOptions); + this.bungee.addStrategy(this.network, new StrategyBesu("INFO")); + } + + public async wrapAsset(asset: BesuAsset): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#wrapAsset Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.contractAddress}, ${asset.tokenType}}`, + ); + + if (asset.ontology === undefined) { + throw new Error( + `${BesuBridge.CLASS_NAME}#wrapAsset: Ontology is required to interact with tokens`, + ); + } + + const interactions = this.interactionList(asset.ontology); + + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "wrap", + params: [ + asset.contractAddress, + asset.tokenType, + asset.tokenId, + asset.owner, + interactions, + ], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#wrapAsset:Transaction failed`); + } + + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async unwrapAsset(assetId: string): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#UnwrapAsset Unwrapping Asset: ${assetId}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "unwrap", + params: [assetId], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#unwrapAsset:Transaction failed`, + ); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async lockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#lockAsset Locking Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "lock", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#lockAsset:Transaction failed}`); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async unlockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#unlockAsset Unlocking Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "unlock", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#unlockAsset:Transaction failed}`, + ); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async mintAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#mintAsset Minting Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#mintAsset:Transaction failed}`); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async burnAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#burnAsset Burning Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "burn", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#burnAsset:Transaction failed}`); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#assignAsset Assigning Asset: ${assetId} amount: ${amount} to: ${to}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "assign", + params: [assetId, to, amount], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#assignAsset:Transaction failed}`, + ); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + + public async getAssets(): Promise { + this.log.debug(`${BesuBridge.CLASS_NAME}#getAssets Getting Assets`); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Call, + methodName: "getAllAssetsIDs", + params: [], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#getAssets: Transaction failed`); + } + + return response.callOutput as string[]; + } + + public async getAsset(assetId: string): Promise { + this.log.debug(`${BesuBridge.CLASS_NAME}#getAsset Getting Asset`); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Call, + methodName: "getToken", + params: [assetId], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#getAsset: Transaction failed`); + } + + return response.callOutput as BesuAsset; + } + + public networkName(): string { + return this.network; + } + + public async runTransaction( + methodName: string, + params: string[], + invocationType: EthContractInvocationType, + ): Promise { + this.log.debug(`Running Transaction: ${methodName}`); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: invocationType, + methodName: methodName, + params: params, + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#runTransaction:Transaction failed}`, + ); + } + + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + output: response.callOutput ?? undefined, + }; + } + + public async getReceipt( + assetId: string, + transactionHash: string, + ): Promise { + this.log.debug( + `Getting Receipt: ${assetId} transactionHash: ${transactionHash}`, + ); + //todo needs implementation + const networkDetails = { + //connector: this.connector, + connectorApiPath: "", + signingCredential: this.config.signingCredential, + contractName: this.config.contractName, + contractAddress: this.config.contractAddress, + keychainId: this.config.keychainId, + participant: "Org1MSP", + }; + + const snapshot = await this.bungee.generateSnapshot( + [], + this.network, + networkDetails, + ); + + const generated = this.bungee.generateView( + snapshot, + "0", + Number.MAX_SAFE_INTEGER.toString(), + undefined, + ); + + if (generated.view == undefined) { + throw new Error("View is undefined"); + } + + const view = await this.bungee.processView( + generated.view, + //PrivacyPolicyOpts.SingleTransaction, + PrivacyPolicyOpts.PruneState, + [assetId, transactionHash], + ); + + return view.getViewStr(); + } + + private interactionList(jsonString: string): InteractionsRequest[] { + const ontologyJSON = JSON.parse(jsonString); + + const interactions: InteractionsRequest[] = []; + + for (const interaction in ontologyJSON["ontology"]) { + const functions: string[] = []; + const variables: string | number[][] = []; + + for (const signature of ontologyJSON["ontology"][ + interaction + ] as InteractionData[]) { + functions.push(signature.functionSignature); + const vars: string | number[] = []; + + for (const variable of signature.variables) { + vars.push(getVarTypes(variable)); + } + variables.push(vars); + } + + const interactionRequest: InteractionsRequest = { + interactionType: getInteractionType(interaction), + functionsSignature: functions, + variables: variables, + available: true, + }; + interactions.push(interactionRequest); + } + + return interactions; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts new file mode 100644 index 0000000000..dcb63f272a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts @@ -0,0 +1,79 @@ +// this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). +// should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output + +import { Asset } from "./types/asset"; + +export abstract class BridgeManager { + /** + * wraps an asset on the wrapper contract + * @param asset + * @returns transaction hash + */ + public abstract wrapAsset(asset: Asset): Promise; + /** + * unwraps an asset on the wrapper contract + * @param assetId + * @returns transaction hash + */ + public abstract unwrapAsset(assetId: string): Promise; + /** + * Locks an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract lockAsset(assetId: string, amount: number): Promise; + /** + * Unlocks an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract unlockAsset(assetId: string, amount: number): Promise; + /** + * Mints an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract mintAsset(assetId: string, amount: number): Promise; + /** + * Burns an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract burnAsset(assetId: string, amount: number): Promise; + /** + * Assigns an asset to a recipient on the blockchain + * @param assetId + * @param recipient + * @param amount + * @returns transaction hash + **/ + public abstract assignAsset( + assetId: string, + recipient: string, + amount: number, + ): Promise; + /** + * Verifies the existence of an asset on the blockchain + * @param assetId + * @returns boolean + **/ + + //TODO create-rollback + public abstract verifyAssetExistence( + assetId: string, + invocationType: unknown, + ): Promise; + /** + * Verifies if an asset is locked on the blockchain + * @param assetId + * @returns boolean + **/ + public abstract verifyLockAsset( + assetId: string, + invocationType: unknown, + ): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts new file mode 100644 index 0000000000..59d7b860c6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts @@ -0,0 +1,325 @@ +import { + FabricContractInvocationType, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { StrategyFabric } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-fabric"; +import { + FabricConfig, + TransactionResponse, +} from "../../../types/blockchain-interaction"; +import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; +import { FabricAsset, getVarTypes } from "./types/fabric-asset"; +import { + Logger, + LogLevelDesc, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { NetworkBridge } from "./network-bridge"; +import { InteractionSignature } from "./types/fabric-asset"; +import { InteractionData } from "./types/interact"; +import { getInteractionType } from "./types/asset"; + +export class FabricBridge implements NetworkBridge { + public static readonly CLASS_NAME = "FabricBridge"; + + network: string = "FABRIC"; + + public log: Logger; + + connector: PluginLedgerConnectorFabric; + bungee: PluginBungeeHermes; + options: IPluginLedgerConnectorFabricOptions; + config: FabricConfig; + + constructor(fabricConfig: FabricConfig, level: LogLevelDesc) { + this.config = fabricConfig; + this.options = fabricConfig.options; + this.connector = new PluginLedgerConnectorFabric(fabricConfig.options); + this.bungee = new PluginBungeeHermes(fabricConfig.bungeeOptions); + this.bungee.addStrategy(this.network, new StrategyFabric("INFO")); + this.log = LoggerProvider.getOrCreate({ + label: StrategyFabric.CLASS_NAME, + level, + }); + } + public async wrapAsset(asset: FabricAsset): Promise { + this.log.debug(`Wrapping Asset: ${asset.tokenId}`); + + if (asset.ontology === undefined) { + throw new Error( + `${FabricBridge.CLASS_NAME}#wrapAsset: Ontology is required to interact with tokens`, + ); + } + + const interactions = this.interactionList(asset.ontology); + + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "wrap", + params: [ + asset.tokenType.toString(), + asset.tokenId, + asset.owner, + asset.mspId, + asset.channelName, + asset.contractName, + JSON.stringify(interactions), + ], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async unwrapAsset(assetId: string): Promise { + this.log.debug(`Unwrapping Asset: ${assetId}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "unwrap", + params: [assetId], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async lockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Locking Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "lock", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async unlockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Unlocking Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "unlock", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async mintAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Minting Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "mint", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async burnAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Burning Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "burn", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise { + this.log.debug(`Assigning Asset: ${assetId} to: ${to} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "assign", + params: [assetId, to, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + + public async getAsset(assetId: string): Promise { + this.log.debug(`Getting Asset: ${assetId}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "GetAsset", + params: [assetId], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Call, + }); + + const token = JSON.parse(response.functionOutput) as FabricAsset; + + return token; + } + + public async getClientId(): Promise { + this.log.debug(`Getting Client Id`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "ClientAccountID", + params: [], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Call, + }); + + return response.functionOutput; + } + + public networkName(): string { + return this.network; + } + + public async runTransaction( + methodName: string, + params: string[], + ): Promise { + this.log.debug(`Running Transaction: ${methodName} with params: ${params}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: methodName, + params: params, + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + transactionReceipt: "response.transactionReceipt", + output: response.functionOutput, + }; + } + + public async getReceipt( + assetId: string, + transactionId: string, + ): Promise { + this.log.debug( + `Getting Receipt for Asset: ${assetId} Transaction: ${transactionId}`, + ); + //todo needs implementation + const networkDetails = { + //connector: this.connector, + connectorApiPath: "", //todo check this to not use api + signingCredential: this.config.signingCredential, + contractName: this.config.contractName, + channelName: this.config.channelName, + participant: "Org1MSP", + }; + + const snapshot = await this.bungee.generateSnapshot( + [], + this.network, + networkDetails, + ); + + const generated = this.bungee.generateView( + snapshot, + "0", + Number.MAX_SAFE_INTEGER.toString(), + undefined, + ); + + if (generated.view == undefined) { + throw new Error("View is undefined"); + } + + const view = await this.bungee.processView( + generated.view, + //PrivacyPolicyOpts.SingleTransaction, + PrivacyPolicyOpts.PruneState, + [assetId, transactionId], + ); + + return view.getViewStr(); + } + + private interactionList(jsonString: string): InteractionSignature[] { + const ontologyJSON = JSON.parse(jsonString); + + const interactions: InteractionSignature[] = []; + + for (const interaction in ontologyJSON["ontology"]) { + const functions: string[] = []; + const variables: string | number[][] = []; + + for (const signature of ontologyJSON["ontology"][ + interaction + ] as InteractionData[]) { + functions.push(signature.functionSignature); + const vars: string | number[] = []; + + for (const variable of signature.variables) { + vars.push(getVarTypes(variable)); + } + variables.push(vars); + } + + const interactionRequest: InteractionSignature = { + type: getInteractionType(interaction), + functionsSignature: functions, + variables: variables, + }; + interactions.push(interactionRequest); + } + + this.log.info(`Interactions: ${JSON.stringify(interactions)}`); + + return interactions; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts new file mode 100644 index 0000000000..acb851090b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts @@ -0,0 +1,51 @@ +import { TransactionResponse } from "../../../types/blockchain-interaction"; +import { Asset } from "./types/asset"; + +export abstract class NetworkBridge { + network!: string; + + public networkName(): string { + return this.network; + } + + public abstract wrapAsset(asset: Asset): Promise; + + public abstract unwrapAsset(assetId: string): Promise; + + public abstract lockAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract unlockAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract mintAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract burnAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise; + + public abstract runTransaction( + methodName: string, + params: string[], + invocationType: unknown, + ): Promise; + + public abstract getReceipt( + assetId: string, + transactionId: string, + ): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts new file mode 100644 index 0000000000..55ace0586e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -0,0 +1,200 @@ +// this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). +// should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output +import { BridgeManager } from "./bridge-manager"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPBridgeConfig } from "../../types"; +import { Asset } from "./types/asset"; + +export class SatpBridgeManager implements BridgeManager { + public static readonly CLASS_NAME = "FabricBridgeManager"; + + private _log: Logger; + + public get log(): Logger { + return this._log; + } + + constructor(private config: SATPBridgeConfig) { + const level = "INFO"; + const label = SatpBridgeManager.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public async wrapAsset(asset: Asset): Promise { + const fnTag = `${this.className}#wrap()`; + + const response = await this.config.network.wrapAsset(asset); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = this.config.network.getReceipt( + asset.tokenId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset wrapping: ${receipt}`); + + return receipt; + } + public async unwrapAsset(assetId: string): Promise { + const fnTag = `${this.className}#unwrap()`; + + const response = await this.config.network.unwrapAsset(assetId); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset unwrapping: ${receipt}`); + + return receipt; + } + + public get className(): string { + return SatpBridgeManager.CLASS_NAME; + } + + public async lockAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#lockAsset()`; + + const response = await this.config.network.lockAsset(assetId, amount); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset lock: ${receipt}`); + + return receipt; + } + + public async unlockAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#unlockAsset()`; + + const response = await this.config.network.unlockAsset(assetId, amount); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset unlock: ${receipt}`); + + return receipt; + } + + public async mintAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#mintAsset()`; + + const transaction = await this.config.network.mintAsset(assetId, amount); + + if (transaction.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + transaction.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset creation: ${receipt}`); + + return receipt; + } + + public async burnAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#burnAsset()`; + + const transaction = await this.config.network.burnAsset(assetId, amount); + + if (transaction.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + transaction.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset deletion: ${receipt}`); + + return receipt; + } + + public async assignAsset( + assetId: string, + recipient: string, + amount: number, + ): Promise { + const fnTag = `${this.className}#assignAsset()`; + + const response = await this.config.network.assignAsset( + assetId, + recipient, + amount, + ); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset assignment: ${receipt}`); + + return receipt; + } + public async verifyAssetExistence( + assetId: string, + invocationType: unknown, + ): Promise { + //todo: implement this + const assetExists = await this.config.network.runTransaction( + "AssetExists", + [assetId], + invocationType, + ); + + if (assetExists == undefined) { + return false; + } + + return true; + } + public async verifyLockAsset( + assetId: string, + invocationType: unknown, + ): Promise { + //todo: implement this + const lockAsset = await this.config.network.runTransaction( + "LockAsset", + [assetId], + invocationType, + ); + + if (lockAsset.output == undefined) { + return false; + } + + return true; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts new file mode 100644 index 0000000000..2c743e415f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts @@ -0,0 +1,34 @@ +export interface Asset { + tokenId: string; + tokenType: TokenType; + owner: string; + amount: number; + ontology: string; +} + +//When there is new token type, add it here or it will break the code +export enum TokenType { + ERC20 = 0, + ERC721 = 1, + ERC1155 = 2, + NONSTANDARD = 3, +} + +export enum InteractionType { + MINT = 0, + BURN = 1, + ASSIGN = 2, + CHECKPERMISSION = 3, + LOCK = 4, + UNLOCK = 5, +} + +export function getTokenType(stringType: string) { + return TokenType[stringType.toUpperCase() as keyof typeof TokenType]; +} + +export function getInteractionType(stringType: string) { + return InteractionType[ + stringType.toUpperCase() as keyof typeof InteractionType + ]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts new file mode 100644 index 0000000000..af5847b08b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts @@ -0,0 +1,20 @@ +import { Asset } from "./asset"; + +export interface BesuAsset extends Asset { + contractName: string; + contractAddress: string; +} + +export enum VarType { + CONTRACTADDRESS = 0, + TOKENTYPE = 1, + TOKENID = 2, + OWNER = 3, + AMOUNT = 4, + BRIDGE = 5, + RECEIVER = 6, +} + +export function getVarTypes(stringType: string) { + return VarType[stringType.toUpperCase() as keyof typeof VarType]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts new file mode 100644 index 0000000000..6b0fc4e368 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts @@ -0,0 +1,30 @@ +import { Asset, InteractionType } from "./asset"; + +export interface FabricAsset extends Asset { + mspId: string; + contractName: string; + channelName: string; +} + +export enum VarType { + CONTRACTNAME = 0, + CHANNELNAME = 1, + TOKENID = 2, + OWNER = 3, + OWNERMSPID = 4, + AMOUNT = 5, + BRIDGE = 6, + BRIDGEMSPID = 7, + RECEIVER = 8, + MSPID = 9, +} + +export function getVarTypes(stringType: string) { + return VarType[stringType.toUpperCase() as keyof typeof VarType]; +} + +export interface InteractionSignature { + type: InteractionType; + functionsSignature: string[]; + variables: VarType[][]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts new file mode 100644 index 0000000000..0a1d8da403 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts @@ -0,0 +1,5 @@ +export interface InteractionData { + functionSignature: string; + variables: string[]; + available: boolean; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index a2886b15bd..0efb0df4a1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -140,6 +140,11 @@ export class Stage1ServerService extends SATPService { } */ + if (sessionData.transferContextId != undefined) { + transferProposalReceiptMessage.common.transferContextId = + sessionData.transferContextId; + } + const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferProposalReceiptMessage)), ); @@ -216,6 +221,16 @@ export class Stage1ServerService extends SATPService { new TransferCommenceResponseMessage(); transferCommenceResponseMessage.common = commonBody; + if (sessionData.transferContextId != undefined) { + transferCommenceResponseMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.serverTransferNumber != undefined) { + transferCommenceResponseMessage.serverTransferNumber = + sessionData.serverTransferNumber; + } + sessionData.lastSequenceNumber = commonBody.sequenceNumber; const messageSignature = bufArray2HexStr( @@ -281,12 +296,8 @@ export class Stage1ServerService extends SATPService { request.common.version == undefined || request.common.messageType == undefined || request.common.sessionId == undefined || - // request.common.transferContextId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || request.common.signature == undefined || request.common.clientGatewayPubkey == undefined || request.common.serverGatewayPubkey == undefined @@ -387,15 +398,13 @@ export class Stage1ServerService extends SATPService { request.common.version == undefined || request.common.messageType == undefined || request.common.sessionId == undefined || - // request.common.transferContextId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || request.common.signature == undefined || request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined + request.common.serverGatewayPubkey == undefined || + request.common.hashPreviousMessage == undefined || + request.common.signature == undefined ) { throw new Error( `${fnTag}, message satp common body is missing or is missing required fields`, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 5278e09809..cc9260dc1c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,7 +1,7 @@ import { LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; -import { ISignerKeyPairs } from "@hyperledger/cactus-common/src/main/typescript/signer-key-pairs"; +import { ISignerKeyPairs } from "@hyperledger/cactus-common/dist/lib/main/typescript/signer-key-pairs"; import { SATPSession } from "./satp-session"; import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; @@ -22,6 +22,7 @@ export type SATPServiceClient = | typeof SatpStage1Service | typeof SatpStage2Service | typeof SatpStage3Service; +import { NetworkBridge } from "./stage-services/satp-bridge/network-bridge"; export enum CurrentDrafts { Core = "Core", @@ -116,3 +117,7 @@ export interface RemoteLog { signature: string; signerPubKey: string; } + +export interface SATPBridgeConfig { + network: NetworkBridge; +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore rename to packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore index 79bfe1a3e0..1dc2dbe2a8 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore @@ -10,6 +10,7 @@ coverage node_modules/ jspm_packages/ package-lock.json +.yarn/ # Compiled TypeScript files dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json new file mode 100644 index 0000000000..8a267e2feb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json @@ -0,0 +1,65 @@ +{ + "name": "satp-wrapper-contract", + "version": "1.0.0", + "description": "SATP Wrapper contract implemented in TypeScript", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "lint": "tslint -c tslint.json 'src/**/*.ts'", + "test": "nyc mocha -r ts-node/register test/**/*.test.ts", + "start": "fabric-chaincode-node start", + "build": "tsc", + "build:watch": "tsc -w", + "prepublishOnly": "npm run build" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "^2.4.1", + "fabric-shim": "^2.4.1" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", + "@types/node": "18.11.9", + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.3.3", + "winston": "^3.2.1" + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "coverage/**", + "dist/**" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": true, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } + } + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts new file mode 100644 index 0000000000..f0596b3843 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +export interface ITraceableContract { + // GetAllAssetsKey returns all assets key found in the world state. + GetAllAssetsKey(ctx: Context): Promise; + + // GetAllTxByKey returns all transations for a specific key. + GetAllTxByKey(ctx: Context, key: string): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..537c947067 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SATPContractWrapper } from "./satp-wrapper"; + +export { SATPContractWrapper } from "./satp-wrapper"; + +export const contracts: any[] = [SATPContractWrapper]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts new file mode 100644 index 0000000000..e8b691516c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +export enum InteractionSignatureType { + MINT = 0, + BURN = 1, + ASSIGN = 2, + CHECKPERMITION = 3, + LOCK = 4, + UNLOCK = 5, +} + +export enum VarType { + CONTRACTNAME = 0, + CHANNELNAME = 1, + TOKENID = 2, + OWNER = 3, + OWNERMSPID = 4, + AMOUNT = 5, + BRIDGE = 6, + BRIDGEMSPID = 7, + RECEIVER = 8, + MSPID = 9, +} + +export class InteractionSignature { + type: InteractionSignatureType; + functionsSignature: string[]; + variables: VarType[][]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts new file mode 100644 index 0000000000..14c2719384 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts @@ -0,0 +1,517 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + Context, + Info, + Returns, + Transaction, + Contract, +} from "fabric-contract-api"; +import { ITraceableContract } from "./ITraceableContract"; + +import { Token } from "./token"; +import { + InteractionSignatureType, + VarType, + InteractionSignature, +} from "./interaction-signature"; + +@Info({ + title: "SATPContractWrapper", + description: "SATP Wrapper contract for trading assets", +}) +export class SATPContractWrapper + extends Contract + implements ITraceableContract +{ + constructor() { + super(); + } + + @Transaction() + public async Initialize(ctx: Context, ownerMSPID: string): Promise { + await ctx.stub.putState("ownerMSPID", Buffer.from(ownerMSPID)); + return true; + } + + @Transaction() + public async setBridge( + ctx: Context, + bridgeMSPID: string, + bridgeID: string, + ): Promise { + await this.checkPermission(ctx); + await ctx.stub.putState("bridgeMSPID", Buffer.from(bridgeMSPID)); + await ctx.stub.putState("bridgeID", Buffer.from(bridgeID)); + return true; + } + + @Transaction() + public async getToken(ctx: Context, tokenId: string): Promise { + const valueBytes = await ctx.stub.getState(tokenId); + + if (!valueBytes || valueBytes.length === 0) { + throw new Error(`Asset with ID ${tokenId} does not exist`); + } + + return JSON.parse(valueBytes.toString()) as Token; + } + + @Transaction() + @Returns("boolean") + public async wrap( + ctx: Context, + tokenType: string, + tokenId: string, + owner: string, + mspId: string, + channelName: string, + contractName: string, + interactions: string, + ): Promise { + await this.checkPermission(ctx); + + const valueBytes = await ctx.stub.getState(tokenId); + + const bridge = await ctx.stub.getState("bridgeMSPID"); + + if (valueBytes && valueBytes.length > 0) { + throw new Error( + `Asset with ID ${tokenId} is already wrapped ${valueBytes.toString()}`, + ); + } + + if (!bridge || bridge.length === 0) { + throw new Error(`Bridge is not set`); + } + + const list = await this.createNonStandardTokenOntology( + ctx, + tokenId, + interactions, + ); + + const checkPermission = await this.getOntologyMethodFromList( + list, + InteractionSignatureType.CHECKPERMITION, + ); + + const token: Token = { + tokenType: tokenType, + tokenId: tokenId, + owner: owner, + mspId: mspId, + channelName: channelName, + contractName: contractName, + amount: 0, + }; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + + try { + if (checkPermission) { + await this.interact(ctx, checkPermission, token); + } + } catch (error) { + await ctx.stub.deleteState(tokenId); //maybe is not needed + throw new Error(`Wrap failed: ${error}`); + } + + return true; + } + + @Transaction() + @Returns("boolean") + public async unwrap(ctx: Context, tokenId: string): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount > 0) { + throw new Error("Token has locked amount"); + } + + await ctx.stub.deleteState(tokenId); + + for (const interactionType in InteractionSignatureType) { + await ctx.stub.deleteState(tokenId + ":" + interactionType); + } + + return true; + } + + @Transaction() + @Returns("number") + public async lockedAmount(ctx: Context, tokenId: string): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + return token.amount; + } + + @Transaction() + @Returns("boolean") + public async lock( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + // const to = await ctx.clientIdentity.getID(); + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.LOCK), + token, + amount, + ); + + token.amount += amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + public async unlock( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error( + "No sufficient amount locked, total tried to unlock: " + + amount + + " total locked: " + + token.amount, + ); + } + + await this.interact( + ctx, + await this.getOntologyMethod( + ctx, + tokenId, + InteractionSignatureType.UNLOCK, + ), + token, + amount, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async mint( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.MINT), + token, + amount, + ); + + token.amount += amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async burn( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error("No sufficient amount locked"); + } + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.BURN), + token, + amount, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async assign( + ctx: Context, + tokenId: string, + to: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error("No sufficient amount locked"); + } + + //const from = await ctx.clientIdentity.getID(); + + await this.interact( + ctx, + await this.getOntologyMethod( + ctx, + tokenId, + InteractionSignatureType.ASSIGN, + ), + token, + amount, + to, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction(false) + @Returns("string") + public async GetAsset(ctx: Context, id: string): Promise { + const assetBytes = await ctx.stub.getState(id); // get the asset from chaincode state + if (!assetBytes || assetBytes.length === 0) { + throw new Error(`Asset with key ${id} does not exist`); + } + return JSON.parse(assetBytes.toString()); + } + + // GetAllAssetsKey returns all assets key found in the world state. + @Transaction(false) + @Returns("string") + public async GetAllAssetsKey(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + allResults.push(result.value.key); + result = await iterator.next(); + } + return allResults.toString(); + } + + // GetAllTxByKey returns all transations for a specific key. + @Transaction(false) + @Returns("string") + public async GetAllTxByKey(ctx: Context, key: string): Promise { + const allResults = []; + const iterator = await ctx.stub.getHistoryForKey(key); + let result = await iterator.next(); + while (!result.done) { + const strValue = JSON.stringify(result); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + // add two number checking for overflow + add(a, b) { + const c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + const c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } + + private async checkPermission(ctx: Context) { + let owner = await ctx.stub.getState("ownerMSPID"); + let bridge = await ctx.stub.getState("bridgeMSPID"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `wrapper: client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + } + + @Transaction(false) + @Returns("string") + async ClientAccountID(ctx: Context): Promise { + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + return clientAccountID; + } + + private async createNonStandardTokenOntology( + ctx: Context, + tokenId: string, + interactions: string, + ): Promise { + const interactionsJson = JSON.parse(interactions) as InteractionSignature[]; + for (const interaction of interactionsJson) { + await ctx.stub.putState( + tokenId + "-" + interaction.type, + Buffer.from(JSON.stringify(interaction)), + ); + } + return interactionsJson; + } + + private async getOntologyMethod( + ctx: Context, + tokenId: string, + interactionType: InteractionSignatureType, + ): Promise { + const valueBytes = await ctx.stub.getState(tokenId + "-" + interactionType); + + if (!valueBytes || valueBytes.length === 0) { + throw new Error( + `Asset method with ID ${tokenId} and ${interactionType} does not exist`, + ); + } + return JSON.parse(valueBytes.toString()) as InteractionSignature; + } + + private async getOntologyMethodFromList( + interactions: InteractionSignature[], + interactionType: InteractionSignatureType, + ): Promise { + for (const interaction of interactions) { + if (interaction.type === interactionType) { + return interaction; + } + } + return undefined; + //throw new Error(`Interaction type ${interactionType} not found`); + } + + private async interact( + ctx: Context, + interaction: InteractionSignature, + token: Token, + amount?: number, + receiver?: string, + ): Promise { + for (let i = 0; i < interaction.functionsSignature.length; i++) { + const response = await ctx.stub.invokeChaincode( + token.contractName, + await this.dynamicParams( + ctx, + interaction.functionsSignature[i], + interaction.variables[i], + token, + amount, + receiver, + ), + token.channelName, + ); + + if (response.status !== 200) { + throw new Error( + `Interact failed: ${response.message} ${response.payload}`, + ); + } + } + } + + private async dynamicParams( + ctx: Context, + functionSignature: string, + variables: VarType[], + token: Token, + amount?: number, + receiver?: string, + ): Promise { + const list = []; + list.push(functionSignature); + for (const variable of variables) { + switch (variable) { + case VarType.CONTRACTNAME: + list.push(token.contractName); + break; + case VarType.CHANNELNAME: + list.push(token.channelName); + break; + case VarType.TOKENID: + list.push(token.tokenId); + break; + case VarType.OWNER: + list.push(token.owner); + break; + case VarType.OWNERMSPID: + list.push(token.mspId); + break; + case VarType.BRIDGE: + list.push(await ctx.stub.getState("bridgeID")); + break; + case VarType.BRIDGEMSPID: + list.push(await ctx.stub.getState("bridgeMSPID")); + break; + case VarType.AMOUNT: + list.push(amount.toString()); + break; + case VarType.BRIDGE: + list.push(await ctx.stub.getState("bridge")); + break; + case VarType.RECEIVER: + list.push(receiver); + break; + case VarType.MSPID: + list.push(await ctx.clientIdentity.getMSPID()); + break; + } + } + return list; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts new file mode 100644 index 0000000000..eca6d255df --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts @@ -0,0 +1,29 @@ +/* + SPDX-License-Identifier: Apache-2.0 +*/ + +import { Object, Property } from "fabric-contract-api"; + +@Object() +export class Token { + @Property() + tokenType: string; + + @Property() + tokenId: string; + + @Property() + owner: string; + + @Property() + mspId: string; + + @Property() + channelName: string; + + @Property() + contractName: string; + + @Property() + amount: number; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts new file mode 100644 index 0000000000..59f2f0cde1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts @@ -0,0 +1,418 @@ +/* + * SPDX-License-Identifier: Apache 2.0 + */ + +import { Context } from "fabric-contract-api"; +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { SATPContractWrapper } from "../src/satp-wrapper"; + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import sinon from "sinon"; +import sinonChai from "sinon-chai"; +import { TokenType } from "../src/token"; + +const bridgedOutAmountKey = "amountBridgedOut"; + +const USER_A_FABRIC_ID = + "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +describe("Wrapper", () => { + let ctx; + let contract: SATPContractWrapper; + + beforeEach(() => { + contract = new SATPContractWrapper("bridge_address"); + ctx = sinon.createStubInstance(Context); + ctx.stub = sinon.createStubInstance(ChaincodeStub); + ctx.clientIdentity = sinon.createStubInstance(ClientIdentity); + + ctx.clientIdentity.getMSPID.resolves("bridge"); + ctx.stub.getState.withArgs(bridgedOutAmountKey).resolves(Buffer.from("50")); + ctx.stub.getState + .withArgs("1001") + .resolves( + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":0}`, + ), + ); + ctx.stub.getState + .withArgs("1002") + .resolves( + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":99}`, + ), + ); + + ctx.stub.getState.withArgs("owner").resolves("Org1MSP"); + ctx.stub.getState.withArgs("bridge").resolves("bridge"); + }); + + describe("#tokenExists", () => { + it("should return true for a token reference", async () => { + (await contract.getToken(ctx, "1001")).should.not.be.undefined; + }); + + it("should throw an error for a token reference that does not exist", async () => { + await contract + .getToken(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#wrap", () => { + it("should wrap an asset", async () => { + await contract.wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1003", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"address":"chainCodeID","tokenType":"ERC20","tokenId":"1003","owner":"${USER_A_FABRIC_ID}","channelName":"channelName","contractName":"contractName","amount":0}`, + ), + ); + }); + it("should throw an error for an asset that already exists", async () => { + await contract + .wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1001", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ) + .should.be.rejectedWith(/Asset with ID 1001 is already wrapped/); + }); + }); + + describe("#unwrap", () => { + it("should delete an asset reference", async () => { + await contract.unwrap(ctx, "1001"); + ctx.stub.deleteState.should.have.been.calledOnceWithExactly("1001"); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .unwrap(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + + it("should throw an error for an asset reference with locked amount", async () => { + await contract + .unwrap(ctx, "1002") + .should.be.rejectedWith(/Token has locked amount/); + }); + }); + + describe("#createAssetReference", () => { + it("should create an asset reference", async () => { + await contract.wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1003", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"address":"chainCodeID","tokenType":"ERC20","tokenId":"1003","owner":"${USER_A_FABRIC_ID}","channelName":"channelName","contractName":"contractName","amount":0}`, + ), + ); + }); + + it("should throw an error for an asset reference that already exists", async () => { + await contract + .wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1001", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ) + .should.be.rejectedWith(/Asset with ID 1001 is already wrapped/); + }); + }); + + describe("#getToken", () => { + it("should return a token reference", async () => { + await contract.getToken(ctx, "1001").should.eventually.deep.equal({ + address: "token_address", + tokenType: TokenType.ERC20, + tokenId: 1001, + owner: USER_A_FABRIC_ID, + channelName: "channel", + contractName: "contract", + amount: 0, + }); + }); + + it("should throw an error for a token reference that does not exist", async () => { + await contract + .getToken(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#IsLocked", () => { + it("should return true for a locked asset reference", async () => { + const result1 = await contract.lockedAmount(ctx, "1001"); + const result2 = await contract.lockedAmount(ctx, "1002"); + chai.expect(result1).to.be.equal(0); + chai.expect(result2).to.be.equal(99); + + await contract + .lockedAmount(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#lockAsset", () => { + it("should lock an asset", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract", + ["transfer", USER_A_FABRIC_ID, "bridge", "10"], + "channel", + ) + .resolves({ status: 200 }); + await contract.lock(ctx, "1001", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":10}`, + ), + ); + }); + + it("should throw and error if response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract", + ["transfer", USER_A_FABRIC_ID, "bridge", "10"], + "channel", + ) + .resolves({ status: 404 }); + await contract + .lock(ctx, "1001", 10) + .should.be.rejectedWith(/Lock failed/); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .lock(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#unlockAsset", () => { + it("should unlock an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 200 }); + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["transfer", USER_A_FABRIC_ID, "bridge", "30"], + "channel2", + ) + .resolves({ status: 200 }); + await contract.unlock(ctx, "1002", 30); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":69}`, + ), + ); + }); + + it("should throw and error if the amount to unlock is greater than the locked amount", async () => { + await contract + .unlock(ctx, "1002", 100) + .should.be.rejectedWith( + /No sufficient amount locked, total tried to unlock: 100 total locked: 99/, + ); + }); + + it("should throw an error if approve response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 404 }); + await contract + .unlock(ctx, "1002", 30) + .should.be.rejectedWith(/Approve failed/); + }); + + it("should throw an error if transfer response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 200 }); + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["transfer", USER_A_FABRIC_ID, "bridge", "30"], + "channel2", + ) + .resolves({ status: 404 }); + await contract + .unlock(ctx, "1002", 30) + .should.be.rejectedWith(/Unlock failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .unlock(ctx, "1003", 99) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#mint", () => { + it("should mint an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract", ["mint", "10"], "channel") + .resolves({ status: 200 }); + await contract.mint(ctx, "1001", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":10}`, + ), + ); + }); + it("should throw and error if status response is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract", ["mint", "10"], "channel") + .resolves({ status: 404 }); + await contract + .mint(ctx, "1001", 10) + .should.be.rejectedWith(/Mint failed/); + }); + it("should throw an error for an asset that does not exist", async () => { + await contract + .burn(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#burn", () => { + it("should burn an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["burn", "10"], "channel2") + .resolves({ status: 200 }); + await contract.burn(ctx, "1002", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":89}`, + ), + ); + }); + + it("should throw an error if the amount to burn is greater than the locked amount", async () => { + await contract + .burn(ctx, "1002", 100) + .should.be.rejectedWith(/No sufficient amount locked/); + }); + + it("should throw and error if status response is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["burn", "10"], "channel2") + .resolves({ status: 404 }); + await contract + .burn(ctx, "1002", 10) + .should.be.rejectedWith(/Burn failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .burn(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#assign", () => { + it("should assign an asset", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["assign", "bridge", USER_A_FABRIC_ID, "99"], + "channel2", + ) + .resolves({ status: 200 }); + await contract.assign(ctx, "1002", USER_A_FABRIC_ID, 99); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":0}`, + ), + ); + }); + + it("should throw an error when the response is not 200", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["assign", "bridge", USER_A_FABRIC_ID, "99"], + "channel2", + ) + .resolves({ status: 404 }); + await contract + .assign(ctx, "1002", USER_A_FABRIC_ID, 99) + .should.be.rejectedWith(/Assign failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .assign(ctx, "1003", USER_A_FABRIC_ID, 10) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + + it("should throw an error if no amount available to assign", async () => { + await contract + .assign(ctx, "1002", USER_A_FABRIC_ID, 100) + .should.be.rejectedWith(/No sufficient amount locked/); + }); + }); + + describe("#operations", () => { + const number1 = 10; + const number2 = 500; + + it("add two numbers", () => { + const result = contract.add(number1, number2); + chai.expect(result).to.equal(number1 + number2); + }); + + it("subtract two numbers", () => { + const result = contract.sub(number2, number1); + chai.expect(result).to.equal(number2 - number1); + }); + }); + + describe("#checkPermission", () => { + it("user from organization other than Org2 is not authorized to perform operations", () => { + ctx.clientIdentity.getMSPID.resolves("Org1MSP"); + contract + .lock(ctx, "1001", 10) + .should.be.rejectedWith( + `client is not authorized to perform the operation. Org1MSP"`, + ); + }); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json similarity index 79% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json rename to packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json index 80d8e12d8c..a1c5ccb234 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json @@ -7,12 +7,13 @@ "moduleResolution": "node", "module": "commonjs", "declaration": true, - "sourceMap": true + "sourceMap": true, + "skipLibCheck": true, }, "include": [ "./src/**/*" ], "exclude": [ - "./src/**/*.spec.ts" + "./src/**/*.test.ts" ] } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock new file mode 100644 index 0000000000..3261b6e7da --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock @@ -0,0 +1,3662 @@ +# This file is generated by running "yarn install" inside your project. + # Manual changes might be lost - proceed with caution! + + __metadata: + version: 8 + cacheKey: 10 + + "@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/code-frame@npm:7.24.7" + dependencies: + "@babel/highlight": "npm:^7.24.7" + picocolors: "npm:^1.0.0" + checksum: 10/4812e94885ba7e3213d49583a155fdffb05292330f0a9b2c41b49288da70cf3c746a3fda0bf1074041a6d741c33f8d7be24be5e96f41ef77395eeddc5c9ff624 + languageName: node + linkType: hard + + "@babel/compat-data@npm:^7.24.8": + version: 7.24.9 + resolution: "@babel/compat-data@npm:7.24.9" + checksum: 10/fcdbf3dd978305880f06ae20a23f4f68a8eddbe64fc5d2fbc98dfe4cdf15c174cff41e3a8eb9d935f9f3a68d3a23fa432044082ee9768a2ed4b15f769b8f6853 + languageName: node + linkType: hard + + "@babel/core@npm:^7.7.5": + version: 7.24.9 + resolution: "@babel/core@npm:7.24.9" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.24.9" + "@babel/helper-compilation-targets": "npm:^7.24.8" + "@babel/helper-module-transforms": "npm:^7.24.9" + "@babel/helpers": "npm:^7.24.8" + "@babel/parser": "npm:^7.24.8" + "@babel/template": "npm:^7.24.7" + "@babel/traverse": "npm:^7.24.8" + "@babel/types": "npm:^7.24.9" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/f00a372fa547f6e21f4db1b6e521e6eb01f77f5931726897aae6f4cf29a687f615b9b77147b539e851a68bf94e4850bcfba7eb11091dd8e2bc625f6d831ce257 + languageName: node + linkType: hard + + "@babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9": + version: 7.24.10 + resolution: "@babel/generator@npm:7.24.10" + dependencies: + "@babel/types": "npm:^7.24.9" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/c2491fb7d985527a165546cbcf9e5f6a2518f2a968c7564409c012acce1019056b21e67a152af89b3f4d4a295ca2e75a1a16858152f750efbc4b5087f0cb7253 + languageName: node + linkType: hard + + "@babel/helper-compilation-targets@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-compilation-targets@npm:7.24.8" + dependencies: + "@babel/compat-data": "npm:^7.24.8" + "@babel/helper-validator-option": "npm:^7.24.8" + browserslist: "npm:^4.23.1" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/3489280d07b871af565b32f9b11946ff9a999fac0db9bec5df960760f6836c7a4b52fccb9d64229ccce835d37a43afb85659beb439ecedde04dcea7eb062a143 + languageName: node + linkType: hard + + "@babel/helper-environment-visitor@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-environment-visitor@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/079d86e65701b29ebc10baf6ed548d17c19b808a07aa6885cc141b690a78581b180ee92b580d755361dc3b16adf975b2d2058b8ce6c86675fcaf43cf22f2f7c6 + languageName: node + linkType: hard + + "@babel/helper-function-name@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-function-name@npm:7.24.7" + dependencies: + "@babel/template": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/2ceb3d9b2b35a0fc4100fc06ed7be3bc38f03ff0bf128ff0edbc0cc7dd842967b1496fc70b5c616c747d7711c2b87e7d025c8888f48740631d6148a9d3614f85 + languageName: node + linkType: hard + + "@babel/helper-hoist-variables@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-hoist-variables@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/6cfdcf2289cd12185dcdbdf2435fa8d3447b797ac75851166de9fc8503e2fd0021db6baf8dfbecad3753e582c08e6a3f805c8d00cbed756060a877d705bd8d8d + languageName: node + linkType: hard + + "@babel/helper-module-imports@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-module-imports@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/df8bfb2bb18413aa151ecd63b7d5deb0eec102f924f9de6bc08022ced7ed8ca7fed914562d2f6fa5b59b74a5d6e255dc35612b2bc3b8abf361e13f61b3704770 + languageName: node + linkType: hard + + "@babel/helper-module-transforms@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/helper-module-transforms@npm:7.24.9" + dependencies: + "@babel/helper-environment-visitor": "npm:^7.24.7" + "@babel/helper-module-imports": "npm:^7.24.7" + "@babel/helper-simple-access": "npm:^7.24.7" + "@babel/helper-split-export-declaration": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/eaed9cb93edb11626758f76bfb482f9c3b6583f6756813c5ef849d6d52bbe7c2cb39f61646758e860732d14c2588b60eb4e2af78d7751450649a8d3d7ca41697 + languageName: node + linkType: hard + + "@babel/helper-simple-access@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-simple-access@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/5083e190186028e48fc358a192e4b93ab320bd016103caffcfda81302a13300ccce46c9cd255ae520c25d2a6a9b47671f93e5fe5678954a2329dc0a685465c49 + languageName: node + linkType: hard + + "@babel/helper-split-export-declaration@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-split-export-declaration@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/ff04a3071603c87de0d6ee2540b7291ab36305b329bd047cdbb6cbd7db335a12f9a77af1cf708779f75f13c4d9af46093c00b34432e50b2411872c658d1a2e5e + languageName: node + linkType: hard + + "@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 10/6d1bf8f27dd725ce02bdc6dffca3c95fb9ab8a06adc2edbd9c1c9d68500274230d1a609025833ed81981eff560045b6b38f7b4c6fb1ab19fc90e5004e3932535 + languageName: node + linkType: hard + + "@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + + "@babel/helper-validator-option@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-validator-option@npm:7.24.8" + checksum: 10/a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c + languageName: node + linkType: hard + + "@babel/helpers@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helpers@npm:7.24.8" + dependencies: + "@babel/template": "npm:^7.24.7" + "@babel/types": "npm:^7.24.8" + checksum: 10/61c08a2baa87382a87c7110e9b5574c782603e247b7e6267769ee0e8b7b54b70ff05f16466f05bb318622b7ac28e79b449edff565abf5adcb1adb1b0f42fee9c + languageName: node + linkType: hard + + "@babel/highlight@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.7" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/69b73f38cdd4f881b09b939a711e76646da34f4834f4ce141d7a49a6bb1926eab1c594148970a8aa9360398dff800f63aade4e81fafdd7c8d8a8489ea93bfec1 + languageName: node + linkType: hard + + "@babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/parser@npm:7.24.8" + bin: + parser: ./bin/babel-parser.js + checksum: 10/e44b8327da46e8659bc9fb77f66e2dc4364dd66495fb17d046b96a77bf604f0446f1e9a89cf2f011d78fc3f5cdfbae2e9e0714708e1c985988335683b2e781ef + languageName: node + linkType: hard + + "@babel/template@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/template@npm:7.24.7" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/parser": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/5975d404ef51cf379515eb0f80b115981d0b9dff5539e53a47516644abb8c83d7559f5b083eb1d4977b20d8359ebb2f911ccd4f729143f8958fdc465f976d843 + languageName: node + linkType: hard + + "@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/traverse@npm:7.24.8" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.24.8" + "@babel/helper-environment-visitor": "npm:^7.24.7" + "@babel/helper-function-name": "npm:^7.24.7" + "@babel/helper-hoist-variables": "npm:^7.24.7" + "@babel/helper-split-export-declaration": "npm:^7.24.7" + "@babel/parser": "npm:^7.24.8" + "@babel/types": "npm:^7.24.8" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/47d8ecf8cfff58fe621fc4d8454b82c97c407816d8f9c435caa0c849ea7c357b91119a06f3c69f21a0228b5d06ac0b44f49d1f78cff032d6266317707f1fe615 + languageName: node + linkType: hard + + "@babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9, @babel/types@npm:^7.8.3": + version: 7.24.9 + resolution: "@babel/types@npm:7.24.9" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/21873a08a124646824aa230de06af52149ab88206dca59849dcb3003990a6306ec2cdaa4147ec1127c0cfc5f133853cfc18f80d7f6337b6662a3c378ed565f15 + languageName: node + linkType: hard + + "@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + + "@dabh/diagnostics@npm:^2.0.2": + version: 2.0.3 + resolution: "@dabh/diagnostics@npm:2.0.3" + dependencies: + colorspace: "npm:1.1.x" + enabled: "npm:2.0.x" + kuler: "npm:^2.0.0" + checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 + languageName: node + linkType: hard + + "@fidm/asn1@npm:^1.0.4": + version: 1.0.4 + resolution: "@fidm/asn1@npm:1.0.4" + checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f + languageName: node + linkType: hard + + "@fidm/x509@npm:^1.2.1": + version: 1.2.1 + resolution: "@fidm/x509@npm:1.2.1" + dependencies: + "@fidm/asn1": "npm:^1.0.4" + tweetnacl: "npm:^1.0.1" + checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 + languageName: node + linkType: hard + + "@grpc/grpc-js@npm:^1.9.0": + version: 1.11.0 + resolution: "@grpc/grpc-js@npm:1.11.0" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/d41f8d666a228ff0b09855448319ad0400e2079312d032447e86e4b1d7e8bb8a01d653de36b529b35eb07f5cfd6996a6153c8700248a8a32f5fad2e03df06445 + languageName: node + linkType: hard + + "@grpc/grpc-js@npm:~1.10.9": + version: 1.10.11 + resolution: "@grpc/grpc-js@npm:1.10.11" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/fe08e39702b2b567453e2a25bae9eaa84bde1712e3ef463f89be5163a305f4663a1a57188f812677e225422d7ea9c10adf94fc9124548d0953b85f21f78d9808 + languageName: node + linkType: hard + + "@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" + dependencies: + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 + languageName: node + linkType: hard + + "@hyperledger/fabric-protos@npm:~0.2.1": + version: 0.2.1 + resolution: "@hyperledger/fabric-protos@npm:0.2.1" + dependencies: + "@grpc/grpc-js": "npm:^1.9.0" + google-protobuf: "npm:^3.21.0" + checksum: 10/9873eccf5707ecc6a10b7d803053e5cd17b44a30f946c50acf2e07a65d2e7980c87aee84241b1140afd888abc25d8e7c730ba796bb8c50cdfbf0cb2b2138f436 + languageName: node + linkType: hard + + "@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + + "@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + + "@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + + "@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 + languageName: node + linkType: hard + + "@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + + "@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + + "@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + + "@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + + "@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 + languageName: node + linkType: hard + + "@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a + languageName: node + linkType: hard + + "@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd + languageName: node + linkType: hard + + "@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + + "@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 + languageName: node + linkType: hard + + "@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 + languageName: node + linkType: hard + + "@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 + languageName: node + linkType: hard + + "@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 + languageName: node + linkType: hard + + "@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 + languageName: node + linkType: hard + + "@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 + languageName: node + linkType: hard + + "@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + + "@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 + languageName: node + linkType: hard + + "@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 + languageName: node + linkType: hard + + "@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 + languageName: node + linkType: hard + + "@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": + version: 1.8.6 + resolution: "@sinonjs/commons@npm:1.8.6" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 + languageName: node + linkType: hard + + "@sinonjs/fake-timers@npm:^6.0.0, @sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395 + languageName: node + linkType: hard + + "@sinonjs/samsam@npm:^5.3.1": + version: 5.3.1 + resolution: "@sinonjs/samsam@npm:5.3.1" + dependencies: + "@sinonjs/commons": "npm:^1.6.0" + lodash.get: "npm:^4.4.2" + type-detect: "npm:^4.0.8" + checksum: 10/6850b9980f042a844072a34ce3ca80b098d4550c8c7a83b2b2e7beb1e06ad19608699544b7a8b0c7db882528d8b74321dfd185d0651cff08cbe793cb73dd39d3 + languageName: node + linkType: hard + + "@sinonjs/text-encoding@npm:^0.7.1": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 + languageName: node + linkType: hard + + "@types/chai-as-promised@npm:^7.1.2": + version: 7.1.8 + resolution: "@types/chai-as-promised@npm:7.1.8" + dependencies: + "@types/chai": "npm:*" + checksum: 10/88e2d42f14d1de19ba1c7b5c35f263fef37d3ad241c71f5eb59b10763706f3902f4131b93854c9c6ed520081c7e36be555849f202418357f905bea71178b7d02 + languageName: node + linkType: hard + + "@types/chai@npm:*, @types/chai@npm:^4.2.11": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: 10/f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f + languageName: node + linkType: hard + + "@types/mocha@npm:^7.0.2": + version: 7.0.2 + resolution: "@types/mocha@npm:7.0.2" + checksum: 10/8d9cfcd2fcaf0dcd4840c2f54e737e88b3999c334b363b0ed184db40e765da20befa8281211b351d213781231a2372bfb4ca043e9ee8188885bf7be83c2928fd + languageName: node + linkType: hard + + "@types/node@npm:18.11.9": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae + languageName: node + linkType: hard + + "@types/node@npm:>=13.7.0": + version: 20.14.10 + resolution: "@types/node@npm:20.14.10" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10/672892cf94d0d95cf052f11271990686a0fd204cd1e5fe7a4ef240e5315e06711765dc47b9ec98627d3adac18b8c92bb7e2d8db21d18faa20bc3e3203a143e79 + languageName: node + linkType: hard + + "@types/node@npm:^16.11.1": + version: 16.18.101 + resolution: "@types/node@npm:16.18.101" + checksum: 10/97592d3b2e29711a2c98ca3e9f6e52c8792d57e4ad45a18d68cdd6f9386615738d476b5366169ccae38099b60f6d63d15a2a6dced8e804f70dc32cc5b8f36c0c + languageName: node + linkType: hard + + "@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + + "@types/sinon@npm:*": + version: 17.0.3 + resolution: "@types/sinon@npm:17.0.3" + dependencies: + "@types/sinonjs__fake-timers": "npm:*" + checksum: 10/3f82b4a477c0c57fa4f4f4fb7585cb72c2a65a7e41e5271b54edca296c8dc242c2d8e709de7a8f16af8693c87cb3ad9d96981069ae683f7197a1134892035833 + languageName: node + linkType: hard + + "@types/sinon@npm:^7.5.2": + version: 7.5.2 + resolution: "@types/sinon@npm:7.5.2" + checksum: 10/66163c371dd84f1c485ae4c60401e4cfdb376974c85d91123dcc8c38334ecc4909c4ae9ffc5008bf0f5212593c7d91f70f460963c01510d2dfe93a689fc8e9ea + languageName: node + linkType: hard + + "@types/sinonjs__fake-timers@npm:*": + version: 8.1.5 + resolution: "@types/sinonjs__fake-timers@npm:8.1.5" + checksum: 10/3a0b285fcb8e1eca435266faa27ffff206608b69041022a42857274e44d9305822e85af5e7a43a9fae78d2ab7dc0fcb49f3ae3bda1fa81f0203064dbf5afd4f6 + languageName: node + linkType: hard + + "@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + + "@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 10/ee8fe811becd830f5e276ec63469ec66c22503eb140064580e712c9fccadfd54157c462188640ba6765d5c21f829e7120eb37afb5ead512684b9a1ab86d2db66 + languageName: node + linkType: hard + + "abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + + "agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 + languageName: node + linkType: hard + + "aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + + "ajv@npm:^6.12.2": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + + "ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 + languageName: node + linkType: hard + + "ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + + "ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + + "ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + + "ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + + "ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + + "anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + + "append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 + languageName: node + linkType: hard + + "archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 + languageName: node + linkType: hard + + "arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 + languageName: node + linkType: hard + + "argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + + "argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + + "assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + + "async@npm:^3.2.3": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + languageName: node + linkType: hard + + "balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + + "binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + + "brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + + "brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + + "braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + + "browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 + languageName: node + linkType: hard + + "browserslist@npm:^4.23.1": + version: 4.23.2 + resolution: "browserslist@npm:4.23.2" + dependencies: + caniuse-lite: "npm:^1.0.30001640" + electron-to-chromium: "npm:^1.4.820" + node-releases: "npm:^2.0.14" + update-browserslist-db: "npm:^1.1.0" + bin: + browserslist: cli.js + checksum: 10/326a98b1c39bcc9a99b197f15790dc28e122b1aead3257c837421899377ac96239123f26868698085b3d9be916d72540602738e1f857e86a387e810af3fda6e5 + languageName: node + linkType: hard + + "buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + + "builtin-modules@npm:^1.1.1": + version: 1.1.1 + resolution: "builtin-modules@npm:1.1.1" + checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c + languageName: node + linkType: hard + + "cacache@npm:^18.0.0": + version: 18.0.4 + resolution: "cacache@npm:18.0.4" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/ca2f7b2d3003f84d362da9580b5561058ccaecd46cba661cbcff0375c90734b610520d46b472a339fd032d91597ad6ed12dde8af81571197f3c9772b5d35b104 + languageName: node + linkType: hard + + "caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" + dependencies: + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 + languageName: node + linkType: hard + + "camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + + "camelcase@npm:^6.0.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + + "caniuse-lite@npm:^1.0.30001640": + version: 1.0.30001642 + resolution: "caniuse-lite@npm:1.0.30001642" + checksum: 10/8d80ea82be453ae0fdfea8766d82740a4945c1b99189650f29bfc458d4e235d7e99027a8f8bc5a4228d8c4457ba896315284b0703f300353ad5f09d8e693de10 + languageName: node + linkType: hard + + "chai-as-promised@npm:^7.1.1": + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" + dependencies: + check-error: "npm:^1.0.2" + peerDependencies: + chai: ">= 2.1.2 < 6" + checksum: 10/be372540dad92ef85cde3954bc0e9b0b33e4e6454f3740b17bfb16e36eda638911619089c05a4e4f2bf6722563bf893bb78c2af59b318c23abb2199e5c20ca1f + languageName: node + linkType: hard + + "chai@npm:^4.2.0": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 10/c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae + languageName: node + linkType: hard + + "chalk@npm:^2.3.0, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + + "chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + + "check-error@npm:^1.0.2, check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + + "chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + languageName: node + linkType: hard + + "chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + + "class-transformer@npm:^0.4.0": + version: 0.4.0 + resolution: "class-transformer@npm:0.4.0" + checksum: 10/4751bbcf0ec8a754053eca1cce2e6d883a8fc7d400fac32368b18f05353e22e8415f7223a53daa35705e6d690516f221ec1c46e68c7ad731e31c4f8e46101fb8 + languageName: node + linkType: hard + + "clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + + "cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab + languageName: node + linkType: hard + + "cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + + "cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + + "color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + + "color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + + "color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + + "color-name@npm:^1.0.0, color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + + "color-string@npm:^1.6.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + + "color@npm:^3.1.3": + version: 3.2.1 + resolution: "color@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.3" + color-string: "npm:^1.6.0" + checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae + languageName: node + linkType: hard + + "colorspace@npm:1.1.x": + version: 1.1.4 + resolution: "colorspace@npm:1.1.4" + dependencies: + color: "npm:^3.1.3" + text-hex: "npm:1.0.x" + checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 + languageName: node + linkType: hard + + "commander@npm:^2.12.1": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + + "commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c + languageName: node + linkType: hard + + "concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + + "convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 + languageName: node + linkType: hard + + "convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + + "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce + languageName: node + linkType: hard + + "debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 + languageName: node + linkType: hard + + "debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/723a9570dcd15d146ea4992f0dca12467d1b00f534abb42473df166d36826fcae8bab045aef59ac2f407b47a23266110bc0e646df8ac82f7800c11384f82050e + languageName: node + linkType: hard + + "decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + + "decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + + "deep-eql@npm:^4.1.3": + version: 4.1.4 + resolution: "deep-eql@npm:4.1.4" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 10/f04f4d581f044a824a6322fe4f68fbee4d6780e93fc710cd9852cbc82bfc7010df00f0e05894b848abbe14dc3a25acac44f424e181ae64d12f2ab9d0a875a5ef + languageName: node + linkType: hard + + "default-require-extensions@npm:^3.0.0": + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" + dependencies: + strip-bom: "npm:^4.0.0" + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 + languageName: node + linkType: hard + + "diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c + languageName: node + linkType: hard + + "diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 + languageName: node + linkType: hard + + "eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + + "electron-to-chromium@npm:^1.4.820": + version: 1.4.828 + resolution: "electron-to-chromium@npm:1.4.828" + checksum: 10/5962877ab1239f93683729b07403ffa89559aad358b863d11f40edbc073a79414238296a628bc602a07eedcf41e9fa01b4a84d6813237dfeb4183b0e387b6136 + languageName: node + linkType: hard + + "emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + + "emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + + "enabled@npm:2.0.x": + version: 2.0.0 + resolution: "enabled@npm:2.0.0" + checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 + languageName: node + linkType: hard + + "encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + + "env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + + "err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + + "es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 + languageName: node + linkType: hard + + "escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + languageName: node + linkType: hard + + "escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + + "escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + + "esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + + "exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd + languageName: node + linkType: hard + + "fabric-contract-api@npm:2.5.6, fabric-contract-api@npm:^2.4.1": + version: 2.5.6 + resolution: "fabric-contract-api@npm:2.5.6" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.5.6" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + checksum: 10/fe47af74162dcc7fb4342726829b8d8c309caae00d59fd882c8c8009c49b5bf39e6ba00e239b4df4af0ba5027b0781a29584e656a20321f33989d72dc1ffbaf9 + languageName: node + linkType: hard + + "fabric-shim-api@npm:2.5.6": + version: 2.5.6 + resolution: "fabric-shim-api@npm:2.5.6" + checksum: 10/d24c6f23c5d25fda6794410d5155f80df68fa8f3b5d40c68df275e5ab3ac126d3bcf345ba7dc34c3471e58c31be047227879359c282283b3392b4f8b1b5cdd39 + languageName: node + linkType: hard + + "fabric-shim@npm:^2.4.1": + version: 2.5.6 + resolution: "fabric-shim@npm:2.5.6" + dependencies: + "@fidm/x509": "npm:^1.2.1" + "@grpc/grpc-js": "npm:~1.10.9" + "@hyperledger/fabric-protos": "npm:~0.2.1" + "@types/node": "npm:^16.11.1" + ajv: "npm:^6.12.2" + fabric-contract-api: "npm:2.5.6" + fabric-shim-api: "npm:2.5.6" + fast-safe-stringify: "npm:^2.1.1" + long: "npm:^5.2.3" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + yargs: "npm:^17.4.0" + yargs-parser: "npm:^21.0.1" + bin: + fabric-chaincode-node: cli.js + checksum: 10/ac21dd16ba6bfef868ba5215e2f8530cda9541d897f9b53f93b55c06130a7f6c9c5a87e0ac30f11de37338253feecb0f7378531e085af71d46c0b482555cad7c + languageName: node + linkType: hard + + "fast-deep-equal@npm:^3.1.1": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + + "fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + + "fast-safe-stringify@npm:^2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 + languageName: node + linkType: hard + + "fecha@npm:^4.2.0": + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 + languageName: node + linkType: hard + + "fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + + "find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 + languageName: node + linkType: hard + + "find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + + "find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + + "flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + + "fn.name@npm:1.x.x": + version: 1.1.0 + resolution: "fn.name@npm:1.1.0" + checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 + languageName: node + linkType: hard + + "foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e + languageName: node + linkType: hard + + "foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/77b33b3c438a499201727ca84de39a66350ccd54a8805df712773e963cefb5c4632dbc4386109e97a0df8fb1585aee95fa35acb07587e3e04cfacabfc0ae15dc + languageName: node + linkType: hard + + "fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be + languageName: node + linkType: hard + + "fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec + languageName: node + linkType: hard + + "fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + + "fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + + "fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + + "fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + + "function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + + "gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + + "get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + + "get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 10/3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + + "get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + + "get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + + "glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + + "glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b + languageName: node + linkType: hard + + "glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac + languageName: node + linkType: hard + + "glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + + "globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + + "google-protobuf@npm:^3.21.0": + version: 3.21.4 + resolution: "google-protobuf@npm:3.21.4" + checksum: 10/0d87fe8ef221d105cbaa808f4024bd577638524d8e461469e3733f2e4933391ad4da86b7fcbd11e8781bee04eacf2e8ba19aaacd5f9deb336a220485841d980f + languageName: node + linkType: hard + + "graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + + "growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 10/1391a9add951964de566adc0aee8b0e2b2321e768c1fdccb7a8e156d6a6cd7ea72782883ba8c2c307baf524e3059519423b72e585eba5e7a5f6e83a1e2359b0d + languageName: node + linkType: hard + + "has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + + "has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + + "hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" + dependencies: + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a + languageName: node + linkType: hard + + "hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + + "he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + + "html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + + "http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + + "http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + + "https-proxy-agent@npm:^7.0.1": + version: 7.0.5 + resolution: "https-proxy-agent@npm:7.0.5" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/6679d46159ab3f9a5509ee80c3a3fc83fba3a920a5e18d32176c3327852c3c00ad640c0c4210a8fd70ea3c4a6d3a1b375bf01942516e7df80e2646bdc77658ab + languageName: node + linkType: hard + + "iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + + "imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + + "indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + + "inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + + "inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + + "ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + + "is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + + "is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + + "is-core-module@npm:^2.13.0": + version: 2.14.0 + resolution: "is-core-module@npm:2.14.0" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10/1e0d1a16cb3a94746f6a28db09ccab4562860c94c74bacedb3a6729736d61cfb97001d2052f9622637aa7ea8e0643a3f0f4f16965c70ba6ce30a8ccfe8074af8 + languageName: node + linkType: hard + + "is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + + "is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + + "is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + + "is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + + "is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + + "is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + + "is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + + "is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + + "is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + + "is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + + "isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + + "isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + + "isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + + "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + + "istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" + dependencies: + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 + languageName: node + linkType: hard + + "istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" + dependencies: + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 + languageName: node + linkType: hard + + "istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e + languageName: node + linkType: hard + + "istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + + "istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 + languageName: node + linkType: hard + + "istanbul-reports@npm:^3.0.2": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + + "jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 + languageName: node + linkType: hard + + "js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + + "js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + + "js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + + "jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + + "jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 + languageName: node + linkType: hard + + "json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + + "json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + + "just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 + languageName: node + linkType: hard + + "kuler@npm:^2.0.0": + version: 2.0.0 + resolution: "kuler@npm:2.0.0" + checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 + languageName: node + linkType: hard + + "locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + + "locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + + "lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 + languageName: node + linkType: hard + + "lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 + languageName: node + linkType: hard + + "lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 + languageName: node + linkType: hard + + "log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + + "logform@npm:^2.6.0, logform@npm:^2.6.1": + version: 2.6.1 + resolution: "logform@npm:2.6.1" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/e67f414787fbfe1e6a997f4c84300c7e06bee3d0bd579778af667e24b36db3ea200ed195d41b61311ff738dab7faabc615a07b174b22fe69e0b2f39e985be64b + languageName: node + linkType: hard + + "long@npm:^5.0.0, long@npm:^5.2.3": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 + languageName: node + linkType: hard + + "loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a + languageName: node + linkType: hard + + "lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + + "make-dir@npm:^3.0.0, make-dir@npm:^3.0.2": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + languageName: node + linkType: hard + + "make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + + "make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + + "make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 + languageName: node + linkType: hard + + "minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/27e49fb720116face9588c29634404edc0c6677e5448ba01b4ec6179002461cc4fabc842497a0537edc5aa87bc93e65cfb0fe6dc32b850563429a64836dd1d54 + languageName: node + linkType: hard + + "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + + "minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 + languageName: node + linkType: hard + + "minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + + "minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + + "minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 + languageName: node + linkType: hard + + "minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + + "minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + + "minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + + "minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + + "minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 + languageName: node + linkType: hard + + "minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 + languageName: node + linkType: hard + + "mkdirp@npm:^0.5.3": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: "npm:^1.2.6" + bin: + mkdirp: bin/cmd.js + checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + + "mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + + "mocha@npm:^9.2.0": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": "npm:1.1.2" + ansi-colors: "npm:4.1.1" + browser-stdout: "npm:1.3.1" + chokidar: "npm:3.5.3" + debug: "npm:4.3.3" + diff: "npm:5.0.0" + escape-string-regexp: "npm:4.0.0" + find-up: "npm:5.0.0" + glob: "npm:7.2.0" + growl: "npm:1.10.5" + he: "npm:1.2.0" + js-yaml: "npm:4.1.0" + log-symbols: "npm:4.1.0" + minimatch: "npm:4.2.1" + ms: "npm:2.1.3" + nanoid: "npm:3.3.1" + serialize-javascript: "npm:6.0.0" + strip-json-comments: "npm:3.1.1" + supports-color: "npm:8.1.1" + which: "npm:2.0.2" + workerpool: "npm:6.2.0" + yargs: "npm:16.2.0" + yargs-parser: "npm:20.2.4" + yargs-unparser: "npm:2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 10/8ee58bff8694ad4013fc0fbb5670c5ec6d8404c601df2d4ae798fad01dd03b5f9395347cf59167006b315a14813a6f839290d60dcbdee8ef4246afe43609d2dc + languageName: node + linkType: hard + + "ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + + "ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + + "nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 + languageName: node + linkType: hard + + "negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + + "nise@npm:^4.0.4": + version: 4.1.0 + resolution: "nise@npm:4.1.0" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + "@sinonjs/fake-timers": "npm:^6.0.0" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/ff7c2e316c8ae8327573417fefcc84070d9dcfa423b123d014d21db5f7de07580f76a85143c2f91eaf5f1a979f3f9a3721e3652753e58ddaa703aa8d65539b0b + languageName: node + linkType: hard + + "node-gyp@npm:latest": + version: 10.2.0 + resolution: "node-gyp@npm:10.2.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^4.1.0" + semver: "npm:^7.3.5" + tar: "npm:^6.2.1" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/41773093b1275751dec942b985982fd4e7a69b88cae719b868babcef3880ee6168aaec8dcaa8cd0b9fa7c84873e36cc549c6cac6a124ee65ba4ce1f1cc108cfe + languageName: node + linkType: hard + + "node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" + dependencies: + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab + languageName: node + linkType: hard + + "node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 + languageName: node + linkType: hard + + "nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + + "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + + "nyc@npm:^15.0.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" + dependencies: + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 + languageName: node + linkType: hard + + "once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + + "one-time@npm:^1.0.0": + version: 1.0.0 + resolution: "one-time@npm:1.0.0" + dependencies: + fn.name: "npm:1.x.x" + checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 + languageName: node + linkType: hard + + "p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + + "p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + + "p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + + "p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + + "p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 + languageName: node + linkType: hard + + "p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + + "p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + + "package-hash@npm:^4.0.0": + version: 4.0.0 + resolution: "package-hash@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + languageName: node + linkType: hard + + "package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + + "path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + + "path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + + "path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + + "path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + + "path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + + "path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + languageName: node + linkType: hard + + "pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + + "picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + + "pkg-dir@npm:^4.1.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + + "proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + + "process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" + dependencies: + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + languageName: node + linkType: hard + + "promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + + "protobufjs@npm:^7.2.5": + version: 7.3.2 + resolution: "protobufjs@npm:7.3.2" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/816604aa0649a93fd5d3ef2858ef038f482d18eebcfb4201fe85c0d3bcccc12410f9e3e73262f1219e6b5bed4f27b28c3bf7c931c409dfb1fd563a304d541d89 + languageName: node + linkType: hard + + "punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + + "randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + + "readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.2": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + + "readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + + "reflect-metadata@npm:^0.1.13": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + + "release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" + dependencies: + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 + languageName: node + linkType: hard + + "require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + + "require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd + languageName: node + linkType: hard + + "resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + + "resolve@npm:^1.3.2": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + languageName: node + linkType: hard + + "resolve@patch:resolve@npm%3A^1.3.2#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + languageName: node + linkType: hard + + "retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + + "rimraf@npm:^3.0.0": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + + "safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + + "safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 + languageName: node + linkType: hard + + "safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + + "satp-wrapper-contract@workspace:.": + version: 0.0.0-use.local + resolution: "satp-wrapper-contract@workspace:." + dependencies: + "@types/chai": "npm:^4.2.11" + "@types/chai-as-promised": "npm:^7.1.2" + "@types/mocha": "npm:^7.0.2" + "@types/node": "npm:18.11.9" + "@types/sinon": "npm:^7.5.2" + "@types/sinon-chai": "npm:^3.2.3" + chai: "npm:^4.2.0" + chai-as-promised: "npm:^7.1.1" + fabric-contract-api: "npm:^2.4.1" + fabric-shim: "npm:^2.4.1" + mocha: "npm:^9.2.0" + nyc: "npm:^15.0.0" + sinon: "npm:^9.0.1" + sinon-chai: "npm:^3.5.0" + ts-node: "npm:^8.8.1" + tslint: "npm:^6.1.0" + typescript: "npm:5.3.3" + winston: "npm:^3.2.1" + languageName: unknown + linkType: soft + + "semver@npm:^5.3.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + + "semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + + "semver@npm:^7.3.5, semver@npm:^7.5.3": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 + languageName: node + linkType: hard + + "serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + languageName: node + linkType: hard + + "set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef + languageName: node + linkType: hard + + "shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + + "shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + + "signal-exit@npm:^3.0.2": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + + "signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + + "simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + + "sinon-chai@npm:^3.5.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe + languageName: node + linkType: hard + + "sinon@npm:^9.0.1": + version: 9.2.4 + resolution: "sinon@npm:9.2.4" + dependencies: + "@sinonjs/commons": "npm:^1.8.1" + "@sinonjs/fake-timers": "npm:^6.0.1" + "@sinonjs/samsam": "npm:^5.3.1" + diff: "npm:^4.0.2" + nise: "npm:^4.0.4" + supports-color: "npm:^7.1.0" + checksum: 10/4597c12e2490b22aaae5fb1edca169a10e71dee73c13d2d12d6d9fa7f3bdbdb53ec5ad52c631c301fb3eab79471a30b05be65155c30ca415169470ea4789eae6 + languageName: node + linkType: hard + + "smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + + "socks-proxy-agent@npm:^8.0.3": + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10/c8e7c2b398338b49a0a0f4d2bae5c0602aeeca6b478b99415927b6c5db349ca258448f2c87c6958ebf83eea17d42cbc5d1af0bfecb276cac10b9658b0f07f7d7 + languageName: node + linkType: hard + + "socks@npm:^2.8.3": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb + languageName: node + linkType: hard + + "source-map-support@npm:^0.5.17": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + + "source-map@npm:^0.6.0, source-map@npm:^0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + + "spawn-wrap@npm:^2.0.0": + version: 2.0.0 + resolution: "spawn-wrap@npm:2.0.0" + dependencies: + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + languageName: node + linkType: hard + + "sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + + "sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + + "ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + languageName: node + linkType: hard + + "stack-trace@npm:0.0.x": + version: 0.0.10 + resolution: "stack-trace@npm:0.0.10" + checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 + languageName: node + linkType: hard + + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + + "string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + + "string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + + "strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + + "strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + + "strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + + "strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + + "supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + + "supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b + languageName: node + linkType: hard + + "supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + + "supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + + "tar@npm:^6.1.11, tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 + languageName: node + linkType: hard + + "test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + + "text-hex@npm:1.0.x": + version: 1.0.0 + resolution: "text-hex@npm:1.0.0" + checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a + languageName: node + linkType: hard + + "to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + + "to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + + "triple-beam@npm:^1.3.0": + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 + languageName: node + linkType: hard + + "ts-node@npm:^8.8.1": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/1431026e6e9e8971ecaba14fdf9960541918c0560344d95e4942b765dbd96d5648b99ca02a5090046130aa9870164b82ba8090a4eda048d19da3ad7aceeb0b49 + languageName: node + linkType: hard + + "tslib@npm:^1.13.0, tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb + languageName: node + linkType: hard + + "tslint@npm:^6.1.0": + version: 6.1.3 + resolution: "tslint@npm:6.1.3" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + builtin-modules: "npm:^1.1.1" + chalk: "npm:^2.3.0" + commander: "npm:^2.12.1" + diff: "npm:^4.0.1" + glob: "npm:^7.1.1" + js-yaml: "npm:^3.13.1" + minimatch: "npm:^3.0.4" + mkdirp: "npm:^0.5.3" + resolve: "npm:^1.3.2" + semver: "npm:^5.3.0" + tslib: "npm:^1.13.0" + tsutils: "npm:^2.29.0" + peerDependencies: + typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + bin: + tslint: bin/tslint + checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + languageName: node + linkType: hard + + "tsutils@npm:^2.29.0": + version: 2.29.0 + resolution: "tsutils@npm:2.29.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + languageName: node + linkType: hard + + "tweetnacl@npm:^1.0.1": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 + languageName: node + linkType: hard + + "type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + + "type-fest@npm:^0.8.0": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + + "typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + + "typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + + "typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + + "undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd + languageName: node + linkType: hard + + "unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + + "unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 + languageName: node + linkType: hard + + "update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/d70b9efeaf4601aadb1a4f6456a7a5d9118e0063d995866b8e0c5e0cf559482671dab6ce7b079f9536b06758a344fbd83f974b965211e1c6e8d1958540b0c24c + languageName: node + linkType: hard + + "uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + + "util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + + "uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + + "which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + + "which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + + "which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + + "winston-transport@npm:^4.7.0": + version: 4.7.1 + resolution: "winston-transport@npm:4.7.1" + dependencies: + logform: "npm:^2.6.1" + readable-stream: "npm:^3.6.2" + triple-beam: "npm:^1.3.0" + checksum: 10/bc48c921ec9b4a71c1445bf274aa6b00c01089a6c26fc0b19534f8a32fa2710c6766c9e6db53a23492c20772934025d312dd9fb08df157ccb6579ad6b9dae9a7 + languageName: node + linkType: hard + + "winston@npm:^3.2.1, winston@npm:^3.7.2": + version: 3.13.1 + resolution: "winston@npm:3.13.1" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.6.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/bc78202708800f74b94a2cc4fbdd46569dea90f939ad2149a936b2deee612d63a512f9e5725251349090bc12ba35351dd67336b3c92bf094892f9ea03d34fdc4 + languageName: node + linkType: hard + + "workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 10/c7dce6eae02098d70fe9924503bd95688564a1316cbb96fe55600f7ede0e66f1f2fea4d18aaec71fcee32373d17eda0bf87ac4dac8e5823e90ca1524aac90bdc + languageName: node + linkType: hard + + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + + "wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/0d64f2d438e0b555e693b95aee7b2689a12c3be5ac458192a1ce28f542a6e9e59ddfecc37520910c2c88eb1f82a5411260566dba5064e8f9895e76e169e76187 + languageName: node + linkType: hard + + "wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + + "wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + + "write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + + "y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 10/392870b2a100bbc643bc035fe3a89cef5591b719c7bdc8721bcdb3d27ab39fa4870acdca67b0ee096e146d769f311d68eda6b8195a6d970f227795061923013f + languageName: node + linkType: hard + + "y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + + "yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + + "yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + + "yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: 10/db8f251ae40e24782d5c089ed86883ba3c0ce7f3c174002a67ec500802f928df9d505fea5d04829769221ce20b0f69f6fb1138fbb2e2fb102e3e9d426d20edab + languageName: node + linkType: hard + + "yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: "npm:^5.0.0" + decamelize: "npm:^1.2.0" + checksum: 10/235bcbad5b7ca13e5abc54df61d42f230857c6f83223a38e4ed7b824681875b7f8b6ed52139d88a3ad007050f28dc0324b3c805deac7db22ae3b4815dae0e1bf + languageName: node + linkType: hard + + "yargs-parser@npm:^20.2.2": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + + "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + + "yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: "npm:^6.0.0" + decamelize: "npm:^4.0.0" + flat: "npm:^5.0.2" + is-plain-obj: "npm:^2.1.0" + checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + + "yargs@npm:16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e + languageName: node + linkType: hard + + "yargs@npm:^15.0.2": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: "npm:^6.0.0" + decamelize: "npm:^1.2.0" + find-up: "npm:^4.1.0" + get-caller-file: "npm:^2.0.1" + require-directory: "npm:^2.1.1" + require-main-filename: "npm:^2.0.0" + set-blocking: "npm:^2.0.0" + string-width: "npm:^4.2.0" + which-module: "npm:^2.0.0" + y18n: "npm:^4.0.0" + yargs-parser: "npm:^18.1.2" + checksum: 10/bbcc82222996c0982905b668644ca363eebe6ffd6a572fbb52f0c0e8146661d8ce5af2a7df546968779bb03d1e4186f3ad3d55dfaadd1c4f0d5187c0e3a5ba16 + languageName: node + linkType: hard + + "yargs@npm:^17.4.0, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + + "yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + + "yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index 0c775ad781..fc168aa4a4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -32,6 +32,26 @@ export function verifySignature( return true; } +export async function storeProof( + gateway: SATPGateway, + localLog: LocalLog, +): Promise { + if (localLog.data == undefined) return; + + localLog.key = getSatpLogKey( + localLog.sessionID, + localLog.type, + localLog.operation, + ); + localLog.timestamp = Date.now().toString(); + + await storeInDatabase(gateway, localLog); + + const hash = SHA256(localLog.data).toString(); + + await storeRemoteLog(gateway, localLog.key, hash); +} + export async function storeLog( gateway: SATPGateway, localLog: LocalLog, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore new file mode 100644 index 0000000000..149b576547 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore new file mode 100644 index 0000000000..999d88df69 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index a66127f94a..8825e5e212 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -260,7 +260,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 45; */ - lockAssertionClaim?: LockAssertionClaim; + lockAssertionClaim = ""; /** * @generated from field: cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 46; @@ -280,7 +280,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 49; */ - burnAssertionClaim?: BurnAssertionClaim; + burnAssertionClaim = ""; /** * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 50; @@ -290,7 +290,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 51; */ - assignmentAssertionClaim?: AssignmentAssertionClaim; + assignmentAssertionClaim = ""; /** * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 52; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts index 2fb9380d15..f646d858e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -17,9 +17,9 @@ export class LockAssertionRequestMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, + { no: 2, name: "burn_assertion_claim", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, { no: 4, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -188,9 +188,9 @@ export class CommitFinalAcknowledgementReceiptResponseMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, + { no: 2, name: "assignment_assertion_claim", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, { no: 4, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts new file mode 100644 index 0000000000..f4a83a82e3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts @@ -0,0 +1,42 @@ +// TODO: define alias types for SATPLedgerConnector, which encapsulates IPluginLedgerConnector + +import { + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + IPluginLedgerConnectorBesuOptions, + Web3SigningCredential, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; + +// inject gateway, get connectors +export type SATPLedgerConnector = string; + +// TODO Define lock interfaces and strategy pattern for locking (as function of locking blockchain) (see what smart contract implementations return) + +export interface FabricConfig { + signingCredential: FabricSigningCredential; + channelName: string; + contractName: string; + options: IPluginLedgerConnectorFabricOptions; + bungeeOptions: IPluginBungeeHermesOptions; + logLevel?: LogLevelDesc; +} +export interface BesuConfig { + keychainId: string; + signingCredential: Web3SigningCredential; + contractName: string; + contractAddress: string; + gas: number; + options: IPluginLedgerConnectorBesuOptions; + bungeeOptions: IPluginBungeeHermesOptions; + logLevel?: LogLevelDesc; +} + +export interface TransactionResponse { + transactionId?: string; + transactionReceipt?: string; + output?: unknown; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts new file mode 100644 index 0000000000..acedba3053 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts @@ -0,0 +1,31 @@ +import { v4 as uuidv4 } from "uuid"; +import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; + +export interface ISATPSessionOptions { + contextID: string; +} + +export class SATPSession { + private static readonly CLASS_NAME = "SATPSession"; + private sessionData: SessionData; + + constructor(ops: ISATPSessionOptions) { + this.sessionData = new SessionData(); + this.sessionData.transferContextId = ops.contextID; + + // TODO algorithm to create session ID from context ID + this.sessionData.id = ops.contextID + "-" + uuidv4(); + } + + private initializeSessionID(): void { + if (this.sessionData.id === undefined) { + this.sessionData.id = uuidv4() + "-" + this.sessionData.transferContextId; + } else { + throw new Error("Session ID already initialized"); + } + } + + public getSessionData(): SessionData { + return this.sessionData; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol b/packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol new file mode 100644 index 0000000000..1e10d5f55d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: UNKNOWN +pragma solidity >=0.7.0; + +interface ITraceableContract { + //All transactions that change the state of and asset, should emmit this event + event Changed(string indexed id, bytes[] value); + + //Should return a list of asset IDs to be tracked by Bungee + function getAllAssetsIDs() external view returns (string[] memory); +} diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol new file mode 100644 index 0000000000..00b5024ca6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol @@ -0,0 +1,184 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "./ITraceableContract.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; + +enum TokenType { ERC20, ERC721, ERC1155 } + +struct Token { + address contractAddress; + string tokenType; + string tokenId; + address owner; + uint amount; //ammount that is approved by the contract owner +} + +error TokenNotAvailable(string tokenId); + +error TokenAlreadyWrapped(string tokenId); + +error TokenNotLocked(string tokenId); + +error TokenLocked(string tokenId); + +error TokenNotUnlocked(string tokenId); + +error InsuficientAmountLocked(string tokenId, uint256 amount); + +contract SATPWrapperContract is Ownable, ITraceableContract{ + + bytes32 public BRIDGE_ROLE; + + mapping (string => Token) public tokens; //contract address to Token + + string[] ids; + + address public bridge_address; + + event Wrap(address contractAddress, string tokenType, string tokenId, address owner); + event Unwrap(string tokenId); + event Lock(string tokenId, uint256 amount); + event Unlock(string tokenId, uint256 amount); + event Mint(string tokenId, uint256 amount); + event Burn(string tokenId, uint256 amount); + event Assign(string tokenId, address receiver_account, uint256 amount); + + constructor(address _bridge_address, bytes32 role_given) Ownable(_bridge_address) { + bridge_address = address(_bridge_address); + BRIDGE_ROLE = role_given; + } + + function wrap(address contractAddress, string memory tokenType, string memory tokenId, address owner) external onlyOwner returns (bool wrapSuccess) { + if(tokens[tokenId].contractAddress != address(0)) { + revert TokenAlreadyWrapped(tokenId); + } + + (bool hasRoleSuccess, ) = contractAddress.call(abi.encodeWithSignature("hasPermission(bytes32,address)", BRIDGE_ROLE, address(this))); + + if(!hasRoleSuccess) { + revert OwnableUnauthorizedAccount(tokens[tokenId].contractAddress); + } + + tokens[tokenId] = Token(contractAddress, tokenType, tokenId, owner, 0); + + ids.push(tokenId); + + emit Wrap(contractAddress, tokenType, tokenId, owner); + return true; + } + + function unwrap(string memory tokenId) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)) { + revert TokenNotAvailable(tokenId); + } + if(tokens[tokenId].amount > 0) { + revert TokenLocked(tokenId); + } + deleteFromArray(tokens[tokenId].tokenId); + delete tokens[tokenId]; + + emit Unwrap(tokenId); + return true; + } + + function lock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + (bool lockSuccess,) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("transfer(address,address,uint256)", tokens[tokenId].owner, address(this), amount)); + + if(lockSuccess) { + tokens[tokenId].amount += amount; + emit Lock(tokenId, amount); + return true; + } + + revert TokenNotLocked(tokenId); + } + + function unlock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { //ammount + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + if(tokens[tokenId].amount < amount) { + revert InsuficientAmountLocked(tokenId, amount); + } + + (bool successAprov,) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("approve(address,uint256)", address(this), amount)); + if(!successAprov) { + revert TokenNotUnlocked(tokenId); + } + + (bool unlockSuccess,) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("transfer(address,address,uint256)", address(this), tokens[tokenId].owner, tokens[tokenId].amount)); + if(unlockSuccess) { + tokens[tokenId].amount -= amount; + emit Unlock(tokenId, amount); + return true; + } + + revert TokenNotUnlocked(tokenId); + } + + function mint(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + (bool mintSuccess, ) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("mint(address,uint256)", address(this), amount)); + + require(mintSuccess, "mint asset call failed"); + + tokens[tokenId].amount = amount; + emit Mint(tokenId, amount); + return true; + } + + function burn(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "burn asset asset is not locked"); + + (bool burnSuccess, ) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("burn(address,uint256)", address(this), amount)); + + require(burnSuccess, "burn asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Burn(tokenId, amount); + return true; + } + + function assign(string memory tokenId, address receiver_account, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "assign asset asset is not locked"); + + (bool assignSuccess, ) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("assign(address,address,uint256)", address(this), receiver_account, amount)); + require(assignSuccess, "assign asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Assign(tokenId, receiver_account, amount); + return true; + } + + + function getAllAssetsIDs() external view returns (string[] memory) { + return ids; + } + + function deleteFromArray(string memory id) internal { + for (uint256 i = 0; i < ids.length; i++) { + if (Strings.equal(ids[i], id)) { + ids[i] = ids[ids.length - 1]; + ids.pop(); + break; + } + } + } + + function getToken(string memory tokenId) view public returns (Token memory token) { + return tokens[tokenId]; + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol new file mode 100644 index 0000000000..83c8ce1855 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol @@ -0,0 +1,251 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "./ITraceableContract.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; + +enum TokenType { ERC20, ERC721, ERC1155, OTHER } +enum InteractionType { MINT, BURN, ASSIGN, CHECKPERMITION, LOCK, UNLOCK } +enum VarType {CONTRACTADDRESS, TOKENTYPE, TOKENID, OWNER, AMOUNT, BRIDGE, RECEIVER} + +struct Token { + address contractAddress; + TokenType tokenType; + string tokenId; + address owner; + uint amount; //ammount that is approved by the contract owner +} + + +struct InteractionSignature { + InteractionType interactionType; + string[] functionsSignature; + VarType[][] variables; + bool available; +} + +error TokenNotAvailable(string tokenId); + +error TokenAlreadyWrapped(string tokenId); + +error TokenNotLocked(string tokenId); + +error TokenLocked(string tokenId); + +error TokenNotUnlocked(string tokenId); + +error InsuficientAmountLocked(string tokenId, uint256 amount); + +contract SATPWrapperContract is Ownable, ITraceableContract{ + + mapping (string => Token) public tokens; //contract address to Token + + mapping (string => mapping(InteractionType => InteractionSignature)) public tokensInteractions; + + string[] ids; + + address public bridge_address; + + event Wrap(address contractAddress, TokenType tokenType, string tokenId, address owner); + event Unwrap(string tokenId); + event Lock(string tokenId, uint256 amount); + event Unlock(string tokenId, uint256 amount); + event Mint(string tokenId, uint256 amount); + event Burn(string tokenId, uint256 amount); + event Assign(string tokenId, address receiver_account, uint256 amount); + + constructor(address _bridge_address) Ownable(_bridge_address) { + bridge_address = address(_bridge_address); + } + + function wrap(address contractAddress, TokenType tokenType, string memory tokenId, address owner, InteractionSignature[] memory interactions ) external onlyOwner returns (bool wrapSuccess) { + if(tokens[tokenId].contractAddress != address(0)) { + revert TokenAlreadyWrapped(tokenId); + } + + createNonStandardTokenOntology(tokenId, interactions); + + if(tokensInteractions[tokenId][InteractionType.CHECKPERMITION].available) { + require(interact(tokenId, InteractionType.CHECKPERMITION), "Contract does not have permission to interact with the token"); + } + + tokens[tokenId] = Token(contractAddress, tokenType, tokenId, owner, 0); + + ids.push(tokenId); + + emit Wrap(contractAddress, tokenType, tokenId, owner); + return true; + } + + function wrap(address contractAddress, TokenType tokenType, string memory tokenId, address owner) external onlyOwner returns (bool wrapSuccess) { + return this.wrap(contractAddress, tokenType, tokenId, owner, new InteractionSignature[](0)); + } + + function unwrap(string memory tokenId) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)) { + revert TokenNotAvailable(tokenId); + } + if(tokens[tokenId].amount > 0) { + revert TokenLocked(tokenId); + } + deleteFromArray(tokens[tokenId].tokenId); + delete tokens[tokenId]; + + emit Unwrap(tokenId); + return true; + } + + function lock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + bool lockSuccess = interact(tokenId, InteractionType.LOCK, amount); + + if(lockSuccess) { + tokens[tokenId].amount += amount; + emit Lock(tokenId, amount); + return true; + } + + revert TokenNotLocked(tokenId); + } + + function unlock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { //ammount + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + if(tokens[tokenId].amount < amount) { + revert InsuficientAmountLocked(tokenId, amount); + } + + bool unlockSuccess = interact(tokenId, InteractionType.UNLOCK, amount); + + if(unlockSuccess) { + tokens[tokenId].amount -= amount; + emit Unlock(tokenId, amount); + return true; + } + + revert TokenNotUnlocked(tokenId); + } + + function mint(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + require(interact(tokenId, InteractionType.MINT, amount) , "mint asset call failed"); + + tokens[tokenId].amount = amount; + emit Mint(tokenId, amount); + return true; + } + + function burn(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "burn asset asset is not locked"); + + require(interact(tokenId, InteractionType.BURN, amount), "burn asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Burn(tokenId, amount); + return true; + } + + function assign(string memory tokenId, address receiver_account, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "assign asset asset is not locked"); + + require(interact(tokenId, InteractionType.ASSIGN, amount, receiver_account), "assign asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Assign(tokenId, receiver_account, amount); + return true; + } + + + function getAllAssetsIDs() external view returns (string[] memory) { + return ids; + } + + function deleteFromArray(string memory id) internal { + for (uint256 i = 0; i < ids.length; i++) { + if (Strings.equal(ids[i], id)) { + ids[i] = ids[ids.length - 1]; + ids.pop(); + break; + } + } + } + + function getToken(string memory tokenId) view public returns (Token memory token) { + return tokens[tokenId]; + } + + function createNonStandardTokenOntology(string memory tokenId, InteractionSignature[] memory interactions) internal { + for(uint i = 0; i < interactions.length; i++) { + tokensInteractions[tokenId][interactions[i].interactionType] = interactions[i]; + } + } + + function interact(string memory tokenId, InteractionType interactionType) internal returns (bool success) { + return interact(tokenId, interactionType, 0, address(0)); + } + + function interact(string memory tokenId, InteractionType interactionType, uint256 amount) internal returns (bool success) { + return interact(tokenId, interactionType, amount, address(0)); + } + + function interact(string memory tokenId, InteractionType interactionType, uint256 amount, address receiver) internal returns (bool) { + if (!tokensInteractions[tokenId][interactionType].available) { + return false; + } + + for (uint i = 0; i < tokensInteractions[tokenId][interactionType].functionsSignature.length; i++) { + bytes4 functionSelector = bytes4(keccak256(abi.encodePacked(tokensInteractions[tokenId][interactionType].functionsSignature[i]))); + + bytes memory encodedParams = encodeDynamicParams(functionSelector, encodeParams(tokensInteractions[tokenId][interactionType].variables[i], tokenId, receiver, amount)); + + (bool callSuccess, ) = tokens[tokenId].contractAddress.call(encodedParams); + if (!callSuccess) { + return false; + } + } + + return true; + } + + function encodeDynamicParams(bytes4 functionSelector, bytes[] memory dynamicParams) internal pure returns (bytes memory encodedParams) { + encodedParams = abi.encodePacked(functionSelector); + for (uint256 i = 0; i < dynamicParams.length; i++) { + encodedParams = abi.encodePacked(encodedParams, dynamicParams[i]); + } + return encodedParams; + } + + function encodeParams(VarType[] memory variables, string memory tokenId, address receiver, uint256 amount) internal view returns (bytes[] memory){ + bytes[] memory dynamicParams = new bytes[](variables.length); + for (uint i = 0; i < variables.length; i++) { + if (variables[i] == VarType.BRIDGE) { + dynamicParams[i] = abi.encode(address(this)); + } else if (variables[i] == VarType.TOKENID) { + dynamicParams[i] = abi.encode(tokenId); + } else if (variables[i] == VarType.AMOUNT) { + dynamicParams[i] = abi.encode(amount); + } else if (variables[i] == VarType.OWNER) { + dynamicParams[i] = abi.encode(tokens[tokenId].owner); + } else if (variables[i] == VarType.CONTRACTADDRESS) { + dynamicParams[i] = abi.encode(tokens[tokenId].contractAddress); + } else if (variables[i] == VarType.RECEIVER) { + dynamicParams[i] = abi.encode(receiver); + } else { + revert("Variable not supported"); + } + } + return dynamicParams; + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol new file mode 100644 index 0000000000..1e10d5f55d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: UNKNOWN +pragma solidity >=0.7.0; + +interface ITraceableContract { + //All transactions that change the state of and asset, should emmit this event + event Changed(string indexed id, bytes[] value); + + //Should return a list of asset IDs to be tracked by Bungee + function getAllAssetsIDs() external view returns (string[] memory); +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol new file mode 100644 index 0000000000..1432b1559d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: UNKNOWN + +pragma solidity >=0.7.0; + +/* + * Smart Contract Interface to define the methods needed by SATP Wrapper Contract. + */ + +interface SATPContractInterface { + // mint creates new tokens with the given amount and assigns them to the owner. + function mint(address account, uint256 amount) external returns (bool); + // burn destroys the given amount of tokens from the owner. + function burn(address account, uint256 amount) external returns (bool); + // assign assigns the given amount of tokens from the owner to the target, without approval. + function assign(address from, address recipient, uint256 amount) external returns (bool); + // transfer transfers the given amount of tokens from the sender to the target, with approval needed. + function transfer(address from, address recipient, uint256 amount) external returns (bool); + // checks if the given account has the given role. + function hasPermission(address account) external view returns (bool); +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol new file mode 100644 index 0000000000..51c09dbb0e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "./ITraceableContract.sol"; + +import "./satp-contract-interface.sol"; + +error noPermission(address adr); + +contract SATPContract is AccessControl, ERC20, ITraceableContract, SATPContractInterface { + + bytes32 public constant BRIDGE_ROLE = keccak256("BRIDGE_ROLE"); + bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE"); + + string public id; + + constructor(address _owner, string memory _id) ERC20("SATPToken", "SATP") { + _grantRole(OWNER_ROLE, _owner); + _grantRole(BRIDGE_ROLE, _owner); + + id = _id; + } + + function mint(address account, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + _mint(account, amount); + return true; + } + + function burn(address account, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + _burn(account, amount); + return true; + } + + function assign(address from, address recipient, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + require(from == _msgSender(), "The msgSender is not the owner"); + _transfer(from, recipient, amount); + return true; + } + + function transfer(address from, address recipient, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + transferFrom(from, recipient, amount); + return true; + } + + function getAllAssetsIDs() external view returns (string[] memory) { + string[] memory myArray = new string[](1); + myArray[0] = id; + return myArray; + } + + function getId() view public returns (string memory) { + return id; + } + + function giveRole(address account) external onlyRole(OWNER_ROLE) returns (bool success) { + _grantRole(BRIDGE_ROLE, account); + return true; + } + + function hasPermission(address account) external view returns (bool success) { + if(hasRole(BRIDGE_ROLE, account)){ + return true; + } + revert noPermission(account); + } + + function checkBalance(address account) external view returns (uint256) { + return balanceOf(account); + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol new file mode 100644 index 0000000000..cd46b6ee79 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.15; + +import "./../contracts/satp-erc20.sol"; +import "remix_tests.sol"; +import "remix_accounts.sol"; + +import "remix_accounts.sol"; + +contract SATPContractTest { + + SATPContract satpContract; + + function beforeEach () public { + satpContract = new SATPContract(address(this), "ID1"); + } + + function testTokenNameAndSymbol () public { + Assert.equal(satpContract.name(), "SATPToken", "token name did not match"); + Assert.equal(satpContract.symbol(), "SATP", "token symbol did not match"); + } + + function mintTokens () public { + satpContract.mint(address(this), 99); + uint256 balance = satpContract.balanceOf(address(this)); + Assert.equal(balance, 99, "tokens minted did not match"); + } + + function mintToOtherAccoutTokens () public { + satpContract.mint(TestsAccounts.getAccount(1), 99); + uint256 balance = satpContract.balanceOf(TestsAccounts.getAccount(1)); + Assert.equal(balance, 99, "tokens minted did not match"); + } + + function burnTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + satpContract.mint(address(this), 99); + satpContract.burn(address(this), 99); + uint256 balance = satpContract.balanceOf(address(this)); + Assert.equal(balance, initBalance, "tokens burned did not match"); + } + + function assignTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + + satpContract.mint(address(this), 99); + + satpContract.assign(address(this), TestsAccounts.getAccount(1), 99); + + Assert.equal(satpContract.balanceOf(TestsAccounts.getAccount(1)), 99, "tokens not assigned"); + Assert.equal(satpContract.balanceOf(address(this)), initBalance, "balance of account did not change"); + } + + function transferTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + satpContract.mint(address(this), 99); + satpContract.approve(address(this), 99); + satpContract.transfer(address(this), TestsAccounts.getAccount(1), 99); + Assert.equal(satpContract.balanceOf(TestsAccounts.getAccount(1)), 99, "tokens not transferred"); + Assert.equal(satpContract.balanceOf(address(this)), initBalance, "balance of account did not change"); + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol new file mode 100644 index 0000000000..2ba3e52521 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.4.22 <0.9.0; + +// This import is automatically injected by Remix +import "remix_tests.sol"; + +// This import is required to use custom transaction context +// Although it may fail compilation in 'Solidity Compiler' plugin +// But it will work fine in 'Solidity Unit Testing' plugin +import "remix_accounts.sol"; +import "../contracts/satp-wrapper.sol"; +import "./../contracts/satp-erc20.sol"; + +contract SATPWrapTest { + + SATPContract contract1; + SATPContract contract2; + + InteractionSignature[] signatures; + + SATPWrapperContract wrapperContract; + + string[] lockInteractions; + Types[][] lockVariables; + string[] unlockInteractions; + Types[][] unlockVariables; + string[] minInteractions; + Types[][] mintVariables; + string[] burnInteractions; + Types[][] burnVariables; + string[] assignInteractions; + Types[][] assignVariables; + string[] checkPermissionInteractions; + Types[][] checkPermissionVariables; + + function beforeEach() public { + // Remix does not offer a set of methods that can change the msg.sender so every contract owner is the same + + wrapperContract = new SATPWrapperContract(address(this)); + + contract1 = new SATPContract(address(wrapperContract), "ID1"); + contract2 = new SATPContract(address(this), "ID2"); + + lockInteractions.push("transfer(address,address,uint256)"); + + lockVariables.push([Types.OWNER, Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory lock = InteractionSignature(InteractionType.LOCK,lockInteractions,lockVariables, true); + signatures.push(lock); + + unlockInteractions.push("approve(address,uint256)"); + unlockInteractions.push("transfer(address,address,uint256)"); + + unlockVariables.push([Types.BRIDGE, Types.AMOUNT]); + unlockVariables.push([Types.BRIDGE, Types.OWNER, Types.AMOUNT]); + InteractionSignature memory unlock = InteractionSignature(InteractionType.UNLOCK,lockInteractions,lockVariables, true); + signatures.push(unlock); + + + minInteractions.push("mint(address,uint256)"); + + mintVariables.push([Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory mint = InteractionSignature(InteractionType.MINT,lockInteractions,lockVariables, true); + signatures.push(mint); + + + burnInteractions.push("burn(address,uint256)"); + + burnVariables.push([Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory burn = InteractionSignature(InteractionType.BURN,lockInteractions,lockVariables, true); + signatures.push(burn); + + + assignInteractions.push("assign(address,address,uint256)"); + + assignVariables.push([Types.BRIDGE, Types.RECEIVER, Types.AMOUNT]); + InteractionSignature memory assign = InteractionSignature(InteractionType.ASSIGN,lockInteractions,lockVariables, true); + signatures.push(assign); + + checkPermissionInteractions.push("hasPermission(address)"); + + checkPermissionVariables.push([Types.BRIDGE]); + InteractionSignature memory checkPermition = InteractionSignature(InteractionType.CHECKPERMITION,lockInteractions,lockVariables, true); + signatures.push(checkPermition); + } + + function checkWrap() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + Token memory tokenReceived = wrapperContract.getToken(contract1.getId()); + + Assert.equal(tokenReceived.contractAddress, address(contract1), "Tokens don't match"); + + Assert.equal(wrapperContract.getAllAssetsIDs()[0], contract1.getId(), "Ids don't match"); + } + + function checkWrapTokenAlreadyWrapped() public { + + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + try wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + + function checkUnwrap() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + wrapperContract.unwrap(contract1.getId()); + + Token memory tokenReceived = wrapperContract.getToken(contract1.getId()); + + Assert.notEqual(tokenReceived.contractAddress, address(contract1), "Tokens don't match"); + } + + function checkUnwrapATokenNotWrapped() public { + try wrapperContract.unwrap(contract1.getId()) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + + function checkUnwrapATokenWithValueLocked() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + wrapperContract.mint(contract1.getId(), 10); + + try wrapperContract.unwrap(contract1.getId()) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + function checkMint() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + + wrapperContract.mint(contract1.getId(), 10); + + Assert.equal(contract1.balanceOf(address(wrapperContract)), 10, "Token not minted"); + } + + function checkMintATokenNotWrapped() public { + try wrapperContract.mint(contract1.getId(), 10) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } +} + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json deleted file mode 100644 index fda660818a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json +++ /dev/null @@ -1,2504 +0,0 @@ -{ - "contractName": "LockAsset", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "createAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bool", - "name": "isLock", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "internalType": "struct Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isAssetLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isPresent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":{\"keccak256\":\"0xde0438e010cd77bfc1516697230fbcec20e85bd7fdbc8df9225abb5c9dd6c7ed\",\"urls\":[\"bzz-raw://865f301eada0615be375c9313d3abce9458dcbb5311dedf805cad921accda557\",\"dweb:/ipfs/QmY1r6Z7PM8ypYy59rWqozy3Mkcv9nMd4xRcfpCbwN4LQK\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506105f9806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", - "deployedBytecode": "608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", - "sourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1770:231;;;;;;:::i;:::-;;:::i;:::-;;;948:14:1;;941:22;923:41;;911:2;896:18;1770:231:0;;;;;;;;1011:144;;;;;;:::i;:::-;;:::i;:::-;;1665:101;;;;;;:::i;:::-;;:::i;865:103::-;;;;;;:::i;:::-;;:::i;:::-;;;;1183:13:1;;-1:-1:-1;;;;;1179:39:1;1161:58;;1289:4;1277:17;;;1271:24;1264:32;1257:40;1235:20;;;1228:70;1342:17;;;1336:24;1314:20;;;1307:54;1149:2;1134:18;865:103:0;975:392:1;643:218:0;;;;;;:::i;:::-;;:::i;1200:147::-;;;;;;:::i;:::-;;:::i;1351:310::-;;;;;;:::i;:::-;;:::i;1770:231::-;1834:4;1848:11;1862;1874:2;;1862:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1862:15:0;1885;;;;;;1979:6;1986:2;;1979:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1979:17:0;;;;;-1:-1:-1;;1770:231:0;;;;:::o;1011:144::-;1065:11;1079;1091:2;;1079:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1079:15:0;1102;;;;;;1146:4;1126:6;1133:2;;1126:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1126:24:0;-1:-1:-1;;;;1126:24:0;;;;;;;;;-1:-1:-1;;;1011:144:0:o;1665:101::-;1725:4;1746:11;1758:2;;1746:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1665:101:0;;;;:::o;865:103::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;953:6:0;960:2;;953:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;946:17;;;;;;;-1:-1:-1;;;;;946:17:0;;;;-1:-1:-1;;;946:17:0;;;;;;;;;;;;;;;;;;;;;;953:10;865:103;-1:-1:-1;;;865:103:0:o;643:218::-;723:1;718:4;:6;710:15;;;;;;750:4;733:6;740:2;;733:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;783:10;762:6;769:2;;762:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;762:31:0;;;;-1:-1:-1;;;;;;762:31:0;;;;;;;;;;:18;;;;801:10;;808:2;;;;801:10;:::i;:::-;;;;;;;;;;;;;;:25;;;;;-1:-1:-1;;;801:25:0;-1:-1:-1;;;;801:25:0;;;;;;;;;;-1:-1:-1;;;;834:15:0;;846:2;;;;834:15;:::i;:::-;;;;;;;;;;;;;;:22;;;;;-1:-1:-1;;834:22:0;;;;;;;;;-1:-1:-1;;;643:218:0:o;1200:147::-;1256:11;1270;1282:2;;1270:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1270:15:0;1293;;;;;;1337:5;1317:6;1324:2;;1317:10;;;;;;;:::i;1351:310::-;1407:11;1421;1433:2;;1421:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1421:15:0;1444;;;;;;1531:18;1552:6;1559:2;;1552:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1552:17:0;;;;;-1:-1:-1;1552:17:0;1577:22;;;;;;1615:6;1622:2;;1615:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1608:17;;-1:-1:-1;;;;;;1608:17:0;;;1615:10;1608:17;;;;;;;1615:10;1633:15;;1645:2;;;;1633:15;:::i;:::-;;;;;;;;;;;;;;:23;;;;;-1:-1:-1;;1633:23:0;;;;;;;;;-1:-1:-1;;;;1351:310:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;1372:479::-;1452:6;1460;1468;1521:2;1509:9;1500:7;1496:23;1492:32;1489:52;;;1537:1;1534;1527:12;1489:52;1577:9;1564:23;1610:18;1602:6;1599:30;1596:50;;;1642:1;1639;1632:12;1596:50;1681:59;1732:7;1723:6;1712:9;1708:22;1681:59;:::i;:::-;1759:8;;1655:85;;-1:-1:-1;1841:2:1;1826:18;;;;1813:32;;1372:479;-1:-1:-1;;;;1372:479:1:o;1856:273::-;2041:6;2033;2028:3;2015:33;1997:3;2067:16;;2092:13;;;2067:16;1856:273;-1:-1:-1;1856:273:1:o", - "sourcePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", - "compiler": { - "name": "solc", - "version": "0.8.15+commit.e14f2714" - }, - "ast": { - "absolutePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", - "exportedSymbols": { - "Asset": [ - 8 - ], - "LockAsset": [ - 192 - ] - }, - "id": 193, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "canonicalName": "Asset", - "id": 8, - "members": [ - { - "constant": false, - "id": 3, - "mutability": "mutable", - "name": "creator", - "nameLocation": "464:7:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "456:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "456:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "isLock", - "nameLocation": "482:6:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "477:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "size", - "nameLocation": "499:4:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "494:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "Asset", - "nameLocation": "445:5:0", - "nodeType": "StructDefinition", - "scope": 193, - "src": "438:68:0", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "LockAsset", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 192, - "linearizedBaseContracts": [ - 192 - ], - "name": "LockAsset", - "nameLocation": "552:9:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "assets", - "nameLocation": "592:6:0", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "566:32:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "typeName": { - "id": 12, - "keyType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "575:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "566:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "valueType": { - "id": 11, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 10, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "585:5:0" - }, - "referencedDeclaration": 8, - "src": "585:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "assetExists", - "nameLocation": "627:11:0", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "602:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "typeName": { - "id": 16, - "keyType": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "611:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "602:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "valueType": { - "id": 15, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "621:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 58, - "nodeType": "Block", - "src": "702:159:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 25, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "718:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 26, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "723:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "718:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 24, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "710:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "710:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 29, - "nodeType": "ExpressionStatement", - "src": "710:15:0" - }, - { - "expression": { - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 30, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "733:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 32, - "indexExpression": { - "id": 31, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "740:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "733:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 33, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "733:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 34, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "750:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "733:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 36, - "nodeType": "ExpressionStatement", - "src": "733:21:0" - }, - { - "expression": { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 37, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "762:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 39, - "indexExpression": { - "id": 38, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "769:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "762:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 40, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "762:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 41, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "783:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "783:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "762:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "762:31:0" - }, - { - "expression": { - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 45, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "801:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 47, - "indexExpression": { - "id": 46, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "808:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "801:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 48, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "801:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "821:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "801:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 51, - "nodeType": "ExpressionStatement", - "src": "801:25:0" - }, - { - "expression": { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 52, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "834:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 54, - "indexExpression": { - "id": 53, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "846:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "834:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "852:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "834:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "834:22:0" - } - ] - }, - "functionSelector": "db9cc410", - "id": 59, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createAsset", - "nameLocation": "652:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 22, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19, - "mutability": "mutable", - "name": "id", - "nameLocation": "681:2:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "665:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 18, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "665:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 21, - "mutability": "mutable", - "name": "size", - "nameLocation": "690:4:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "685:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 20, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "685:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "663:32:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [], - "src": "702:0:0" - }, - "scope": 192, - "src": "643:218:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 71, - "nodeType": "Block", - "src": "938:30:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 67, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "953:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 69, - "indexExpression": { - "id": 68, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "960:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "953:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "946:17:0" - } - ] - }, - "functionSelector": "cd5286d0", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAsset", - "nameLocation": "874:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 62, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 61, - "mutability": "mutable", - "name": "id", - "nameLocation": "899:2:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "883:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 60, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "883:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "882:20:0" - }, - "returnParameters": { - "id": 66, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "924:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_memory_ptr", - "typeString": "struct Asset" - }, - "typeName": { - "id": 64, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 63, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "924:5:0" - }, - "referencedDeclaration": 8, - "src": "924:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - }, - "visibility": "internal" - } - ], - "src": "923:14:0" - }, - "scope": 192, - "src": "865:103:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 94, - "nodeType": "Block", - "src": "1057:98:0", - "statements": [ - { - "assignments": [ - 78 - ], - "declarations": [ - { - "constant": false, - "id": 78, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1070:6:0", - "nodeType": "VariableDeclaration", - "scope": 94, - "src": "1065:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 77, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1065:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 82, - "initialValue": { - "baseExpression": { - "id": 79, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1079:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 81, - "indexExpression": { - "id": 80, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "1091:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1079:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1065:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 84, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "1110:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 83, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1102:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1102:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 86, - "nodeType": "ExpressionStatement", - "src": "1102:15:0" - }, - { - "expression": { - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 87, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1126:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 89, - "indexExpression": { - "id": 88, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "1133:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1126:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 90, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1126:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 91, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1146:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1126:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 93, - "nodeType": "ExpressionStatement", - "src": "1126:24:0" - } - ] - }, - "functionSelector": "5e82d0a6", - "id": 95, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lockAsset", - "nameLocation": "1020:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 75, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "id", - "nameLocation": "1046:2:0", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "1030:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 73, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1030:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1029:20:0" - }, - "returnParameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [], - "src": "1057:0:0" - }, - "scope": 192, - "src": "1011:144:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 117, - "nodeType": "Block", - "src": "1248:99:0", - "statements": [ - { - "assignments": [ - 101 - ], - "declarations": [ - { - "constant": false, - "id": 101, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1261:6:0", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1256:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 100, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 105, - "initialValue": { - "baseExpression": { - "id": 102, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1270:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 104, - "indexExpression": { - "id": 103, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "1282:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1270:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1256:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 107, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 101, - "src": "1301:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1293:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1293:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 109, - "nodeType": "ExpressionStatement", - "src": "1293:15:0" - }, - { - "expression": { - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 110, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1317:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 112, - "indexExpression": { - "id": 111, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "1324:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1317:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 113, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1317:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1337:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1317:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 116, - "nodeType": "ExpressionStatement", - "src": "1317:25:0" - } - ] - }, - "functionSelector": "def60e0d", - "id": 118, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "unLockAsset", - "nameLocation": "1209:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 97, - "mutability": "mutable", - "name": "id", - "nameLocation": "1237:2:0", - "nodeType": "VariableDeclaration", - "scope": 118, - "src": "1221:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 96, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1220:20:0" - }, - "returnParameters": { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "1248:0:0" - }, - "scope": 192, - "src": "1200:147:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 155, - "nodeType": "Block", - "src": "1399:262:0", - "statements": [ - { - "assignments": [ - 124 - ], - "declarations": [ - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1412:6:0", - "nodeType": "VariableDeclaration", - "scope": 155, - "src": "1407:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 123, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1407:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 128, - "initialValue": { - "baseExpression": { - "id": 125, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1421:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 127, - "indexExpression": { - "id": 126, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1433:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1421:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1407:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 130, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "1452:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 129, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1444:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1444:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 132, - "nodeType": "ExpressionStatement", - "src": "1444:15:0" - }, - { - "assignments": [ - 134 - ], - "declarations": [ - { - "constant": false, - "id": 134, - "mutability": "mutable", - "name": "assetIsLocked", - "nameLocation": "1536:13:0", - "nodeType": "VariableDeclaration", - "scope": 155, - "src": "1531:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 133, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1531:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 139, - "initialValue": { - "expression": { - "baseExpression": { - "id": 135, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1552:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 137, - "indexExpression": { - "id": 136, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1559:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1552:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 138, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1552:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1531:38:0" - }, - { - "expression": { - "arguments": [ - { - "id": 141, - "name": "assetIsLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "1585:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 140, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1577:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1577:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 143, - "nodeType": "ExpressionStatement", - "src": "1577:22:0" - }, - { - "expression": { - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "1608:17:0", - "subExpression": { - "baseExpression": { - "id": 144, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 146, - "indexExpression": { - "id": 145, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1622:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1615:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 148, - "nodeType": "ExpressionStatement", - "src": "1608:17:0" - }, - { - "expression": { - "id": 153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 149, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1633:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 151, - "indexExpression": { - "id": 150, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1645:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1633:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1651:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1633:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 154, - "nodeType": "ExpressionStatement", - "src": "1633:23:0" - } - ] - }, - "functionSelector": "e24aa37c", - "id": 156, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deleteAsset", - "nameLocation": "1360:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 120, - "mutability": "mutable", - "name": "id", - "nameLocation": "1388:2:0", - "nodeType": "VariableDeclaration", - "scope": 156, - "src": "1372:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 119, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1372:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1371:20:0" - }, - "returnParameters": { - "id": 122, - "nodeType": "ParameterList", - "parameters": [], - "src": "1399:0:0" - }, - "scope": 192, - "src": "1351:310:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 167, - "nodeType": "Block", - "src": "1731:35:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 163, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1746:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 165, - "indexExpression": { - "id": 164, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "1758:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1746:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 162, - "id": 166, - "nodeType": "Return", - "src": "1739:22:0" - } - ] - }, - "functionSelector": "bc548275", - "id": 168, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isPresent", - "nameLocation": "1674:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 158, - "mutability": "mutable", - "name": "id", - "nameLocation": "1700:2:0", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "1684:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 157, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1684:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1683:20:0" - }, - "returnParameters": { - "id": 162, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 161, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "1725:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 160, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1725:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "1724:6:0" - }, - "scope": 192, - "src": "1665:101:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 190, - "nodeType": "Block", - "src": "1840:161:0", - "statements": [ - { - "assignments": [ - 176 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1853:6:0", - "nodeType": "VariableDeclaration", - "scope": 190, - "src": "1848:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1848:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 180, - "initialValue": { - "baseExpression": { - "id": 177, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1862:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 179, - "indexExpression": { - "id": 178, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "1874:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1862:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1848:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 182, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "1893:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 181, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1885:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1885:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 184, - "nodeType": "ExpressionStatement", - "src": "1885:15:0" - }, - { - "expression": { - "expression": { - "baseExpression": { - "id": 185, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1979:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 187, - "indexExpression": { - "id": 186, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "1986:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1979:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 188, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1979:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 174, - "id": 189, - "nodeType": "Return", - "src": "1972:24:0" - } - ] - }, - "functionSelector": "1ae4eb68", - "id": 191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isAssetLocked", - "nameLocation": "1779:13:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "mutability": "mutable", - "name": "id", - "nameLocation": "1809:2:0", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1793:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 169, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1793:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1792:20:0" - }, - "returnParameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1834:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 172, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1834:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "1833:6:0" - }, - "scope": 192, - "src": "1770:231:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 193, - "src": "543:1460:0", - "usedErrors": [] - } - ], - "src": "413:1591:0" - }, - "functionHashes": { - "createAsset(string,uint256)": "db9cc410", - "deleteAsset(string)": "e24aa37c", - "getAsset(string)": "cd5286d0", - "isAssetLocked(string)": "1ae4eb68", - "isPresent(string)": "bc548275", - "lockAsset(string)": "5e82d0a6", - "unLockAsset(string)": "def60e0d" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "305800", - "executionCost": "343", - "totalCost": "306143" - }, - "external": { - "createAsset(string,uint256)": "infinite", - "deleteAsset(string)": "infinite", - "getAsset(string)": "infinite", - "isAssetLocked(string)": "infinite", - "isPresent(string)": "infinite", - "lockAsset(string)": "infinite", - "unLockAsset(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol deleted file mode 100644 index 35378109d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol +++ /dev/null @@ -1,70 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; -struct Asset{ - address creator; - bool isLock; - uint size; -} -//TODO: DETEMINE CALLDATA VS MEMORY -contract LockAsset { - mapping (string => Asset) assets; - mapping (string => bool) assetExists; - - function createAsset( string calldata id, uint size) public{ - require(size>0); - assets[id].size= size; - assets[id].creator = msg.sender; - assets[id].isLock = false; - assetExists[id] = true; - } - - function getAsset(string calldata id) public view returns (Asset memory) { - return assets[id]; - } - - //Don't care if it is already locked - function lockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = true; - } - - //Don't care if it is already unlocked - function unLockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = false; - } - - function deleteAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - bool assetIsLocked = assets[id].isLock; - require(assetIsLocked); - - delete assets[id]; - assetExists[id] = false; - } - - function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; - } - - function isAssetLocked(string calldata id) public view returns (bool) { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - return assets[id].isLock; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json new file mode 100644 index 0000000000..fd1c73cebe --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json @@ -0,0 +1,49 @@ +{ + "name": "SATP-ERC20", + "contract": "solidity", + "ontology": { + "lock": [{ + "functionSignature": "transfer(address,address,uint256)", + "variables": ["owner", "bridge", "amount"], + "available": true + } + ], + "unlock": [{ + "functionSignature": "approve(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + }, + { + "functionSignature": "transfer(address,address,uint256)", + "variables": ["bridge", "owner", "amount"], + "available": true + } + ], + "mint": [{ + "functionSignature": "mint(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + } + ], + "burn": [{ + "functionSignature": "burn(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + } + ], + "assign": [{ + "functionSignature": "assign(address,address,uint256)", + "variables": ["bridge", "receiver", "amount"], + "available": true + } + ], + "checkPermission": [{ + "functionSignature": "hasPermission(address)", + "variables": ["bridge"], + "available": true + } + ] + }, + "ownerSignature": "", + "bridgeSignature": "" +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts deleted file mode 100644 index f93f19710e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public isLocked: boolean; - - @Property() - public size: number; -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index a98006bfa5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract extends Contract { - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - size: 5, - isLocked: false, - }, - { - ID: "asset2", - size: 5, - isLocked: false, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const asset: Asset = { - ID: id, - size: size, - isLocked: false, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - if (this.IsAssetLocked(ctx, id)) { - throw new Error(`The asset ${id} is locked`); - } - - // overwriting original asset with new asset - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.size = size; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // DeleteAsset deletes an given asset from the world state. - @Transaction() - public async DeleteAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // IsAssetLocked returns true when asset with given ID is locked in world state. - @Transaction(false) - @Returns("boolean") - public async IsAssetLocked(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - - if (assetJSON && assetJSON.length > 0) { - const asset = JSON.parse(assetJSON.toString()); - return asset.isLocked; - } else { - throw new Error(`The asset ${id} does not exist`); - } - } - - @Transaction(false) - @Returns("boolean") - public async LockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // if (this.IsAssetLocked(ctx, id)) { - // throw new Error(`The asset ${id} is already locked`); - // } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = true; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - @Transaction(false) - @Returns("boolean") - public async UnlockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = false; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore new file mode 100644 index 0000000000..1dc2dbe2a8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore @@ -0,0 +1,17 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json +.yarn/ + +# Compiled TypeScript files +dist + diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js new file mode 100644 index 0000000000..f04e64cb64 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js @@ -0,0 +1,516 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Contract } = require("fabric-contract-api"); + +// Define objectType names for prefix +const balancePrefix = "balance"; +const allowancePrefix = "allowance"; + +// Define key names for options +const nameKey = "name"; +const symbolKey = "symbol"; +const decimalsKey = "decimals"; +const totalSupplyKey = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx, owner) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [owner]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx, to, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from = ctx.clientIdentity.getID(); + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom(ctx, from, to, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer(ctx, from, to, value) { + if (from === to) { + throw new Error("cannot transfer to and from same client account"); + } + + // Convert value from string to int + const valueInt = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [from]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance = parseInt(fromCurrentBalanceBytes.toString()); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recepient + const toBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [to]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + async Approve(ctx, spender, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner = ctx.clientIdentity.getID(); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + let valueInt = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance(ctx, owner, spender) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize(ctx, name, symbol, decimals) { + // Check contract options are not already set, client is not authorized to change them once intitialized + const nameBytes = await ctx.stub.getState(nameKey); + console.log("nameBytes: ", nameBytes); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + async Mint(ctx, amount) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx, amount) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance = parseInt(currentBalanceBytes.toString()); + const updatedBalance = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + async ClientAccountBalance(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + return clientAccountID; + } + + // Checks that contract options have been already initialized + async CheckInitialized(ctx) { + const nameBytes = await ctx.stub.getState(nameKey); + + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + // add two number checking for overflow + add(a, b) { + let c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + let c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } +} + +module.exports = TokenERC20Contract; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/package.json similarity index 57% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/package.json index d8f1c89341..2594a3ae2f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/package.json @@ -1,7 +1,7 @@ { - "name": "asset-transfer-basic", + "name": "satp-contract", "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", + "description": "SATP contract implemented in TypeScript", "main": "dist/index.js", "typings": "dist/index.d.ts", "engines": { @@ -10,8 +10,7 @@ }, "scripts": { "lint": "tslint -c tslint.json 'src/**/*.ts'", - "pretest": "npm run lint", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", + "test": "nyc mocha -r ts-node/register test/**/*.test.ts", "start": "fabric-chaincode-node start", "build": "tsc", "build:watch": "tsc -w", @@ -21,23 +20,26 @@ "author": "Hyperledger", "license": "Apache-2.0", "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" + "fabric-contract-api": "^2.4.1", + "fabric-shim": "2.4.1" }, "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", "@types/node": "18.11.9", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "chai": "4.3.6", - "mocha": "5.2.0", - "nyc": "14.1.1", - "sinon": "7.5.0", - "sinon-chai": "3.7.0", - "ts-node": "7.0.1", - "tslint": "5.20.1", - "typescript": "5.5.2" + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.5.2", + "winston": "^3.2.1" }, "nyc": { "extension": [ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts new file mode 100644 index 0000000000..f0596b3843 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +export interface ITraceableContract { + // GetAllAssetsKey returns all assets key found in the world state. + GetAllAssetsKey(ctx: Context): Promise; + + // GetAllTxByKey returns all transations for a specific key. + GetAllTxByKey(ctx: Context, key: string): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..420ce3ba19 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SATPContract } from "./satp-contract"; + +export { SATPContract } from "./satp-contract"; + +export const contracts: any[] = [SATPContract]; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts new file mode 100644 index 0000000000..d3651eb3c5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +/* + * Smart Contract Interface to define the methods needed by SATP Wrapper Contract. + */ + +export interface SATPContractInterface { + // mint creates new tokens with the given amount and assigns them to the owner. + mint(ctx: Context, amount: string): Promise; + // burn destroys the given amount of tokens from the owner. + burn(ctx: Context, amount: string): Promise; + // assign assigns the given amount of tokens from the owner to the target, without approval. + assign( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise; + // transfer transfers the given amount of tokens from the sender to the target, with approval needed. + transfer( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise; + // hasPermission checks if the clientMSPID has the permission to perform actions. + hasPermission(ctx: Context, clientMSPID: string): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts new file mode 100644 index 0000000000..684a0c1ec7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts @@ -0,0 +1,174 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context, Info, Returns, Transaction } from "fabric-contract-api"; +import { ITraceableContract } from "./ITraceableContract"; + +import TokenERC20Contract from "./tokenERC20"; +import { SATPContractInterface } from "./satp-contract-interface"; + +@Info({ + title: "SATPContract", + description: "SATP ERC20 contract for trading asset", +}) +export class SATPContract + extends TokenERC20Contract + implements ITraceableContract, SATPContractInterface +{ + constructor() { + super("SATP-token"); + } + + @Transaction() + public async InitToken( + ctx: Context, + owner: string, + id: string, + ): Promise { + await super.Initialize(ctx, "SATPContract", "SATP", "2"); + + await ctx.stub.putState("ID", Buffer.from(id)); + await ctx.stub.putState("owner", Buffer.from(owner)); + return true; + } + + @Transaction() + public async setBridge(ctx: Context, bridge: string): Promise { + this.checkPermission(ctx); + await ctx.stub.putState("bridge", Buffer.from(bridge)); + return true; + } + + @Transaction(false) + @Returns("string") + public async GetAllAssetsKey(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + allResults.push(result.value.key); + result = await iterator.next(); + } + return allResults.toString(); + } + + // GetAllTxByKey returns all transations for a specific key. + @Transaction(false) + @Returns("string") + public async GetAllTxByKey(ctx: Context, key: string): Promise { + const allResults = []; + const iterator = await ctx.stub.getHistoryForKey(key); + let result = await iterator.next(); + while (!result.done) { + const strValue = JSON.stringify(result); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + @Transaction() + public async mint(ctx: Context, amount: string): Promise { + this.checkPermission(ctx); + await super.Mint(ctx, amount); + return true; + } + + @Transaction() + public async burn(ctx: Context, amount: string): Promise { + this.checkPermission(ctx); + await this.Burn(ctx, amount); + return true; + } + + @Transaction() + public async assign( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + const clientID = await ctx.clientIdentity.getID(); + + if (from !== clientID) { + throw new Error( + `client is not authorized to perform the operation. ${clientID} != ${from}`, + ); + } + await this._transfer(ctx, from, to, amount); + return true; + } + + @Transaction() + public async transferFrom( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + await this.TransferFrom(ctx, from, to, amount); + return true; + } + + @Transaction() + public async transfer( + ctx: Context, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + await this.Transfer(ctx, to, amount); + return true; + } + + private async checkPermission(ctx: Context) { + let owner = await ctx.stub.getState("owner"); + let bridge = await ctx.stub.getState("bridge"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + } + + @Transaction() + public async hasPermission( + ctx: Context, + clientMSPID: string, + ): Promise { + let owner = await ctx.stub.getState("owner"); + let bridge = await ctx.stub.getState("bridge"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + return true; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts new file mode 100644 index 0000000000..4ae3089c5f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts @@ -0,0 +1,565 @@ +import { Context, Contract, Transaction } from "fabric-contract-api"; + +// Define objectType names for prefix +const balancePrefix: string = "balance"; +const allowancePrefix: string = "allowance"; + +// Define key names for options +const nameKey: string = "name"; +const symbolKey: string = "symbol"; +const decimalsKey: string = "decimals"; +const totalSupplyKey: string = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals: number = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply: number = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx: Context, owner: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + owner, + ]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx: Context, to: string, value: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from: string = ctx.clientIdentity.getID(); + + const transferResp: boolean = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom( + ctx: Context, + from: string, + to: string, + value: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender: string = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance: number = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt: number = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp: boolean = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance: number = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer( + ctx: Context, + from: string, + to: string, + value: string, + ): Promise { + if (from === to) { + throw new Error("cannot transfer to and from same client account"); + } + + // Convert value from string to int + const valueInt: number = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + from, + ]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance: number = parseInt( + fromCurrentBalanceBytes.toString(), + ); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recepient + const toBalanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + to, + ]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance: number; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance: number = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance: number = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + @Transaction(true) + async Approve( + ctx: Context, + spender: string, + value: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner: string = ctx.clientIdentity.getID(); + + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const valueInt: number = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance( + ctx: Context, + owner: string, + spender: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance: number = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize( + ctx: Context, + name: string, + symbol: string, + decimals: string, + ): Promise { + // Check contract options are not already set, client is not authorized to change them once intitialized + const nameBytes = await ctx.stub.getState(nameKey); + console.log("nameBytes: ", nameBytes); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + @Transaction(true) + async Mint(ctx: Context, amount: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const minter: string = ctx.clientIdentity.getID(); + + const amountInt: number = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + minter, + ]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance: number; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance: number = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply: number; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx: Context, amount: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter: string = ctx.clientIdentity.getID(); + + const amountInt: number = parseInt(amount); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + minter, + ]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance: number = parseInt(currentBalanceBytes.toString()); + const updatedBalance: number = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply: number = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + @Transaction(false) + async ClientAccountBalance(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * ClientIDAccountBalance returns the balance of the given client's account. + * The clientID must be a valid clientID as returned by the ClientAccountID() function. + * */ + @Transaction(false) + async ClientIDAccountBalance(ctx: Context, id: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [id]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${id} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + return clientAccountID; + } + + // Checks that contract options have been already initialized + async CheckInitialized(ctx: Context): Promise { + const nameBytes = await ctx.stub.getState(nameKey); + + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + // add two number checking for overflow + add(a: number, b: number): number { + const c: number = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a: number, b: number): number { + const c: number = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } +} + +export default TokenERC20Contract; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts new file mode 100644 index 0000000000..95daf7b306 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts @@ -0,0 +1,230 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { SATPContract } from "./../src/satp-contract"; + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import sinon from "sinon"; +import sinonChai from "sinon-chai"; +import { expect } from "chai"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +describe("SATPContract", () => { + let contract: SATPContract; + let sandbox; + let ctx; + + beforeEach(async () => { + sandbox = sinon.createSandbox(); + contract = new SATPContract(); + ctx = sinon.createStubInstance(ChaincodeStub); + ctx.stub = sinon.createStubInstance(ChaincodeStub); + ctx.clientIdentity = sinon.createStubInstance(ClientIdentity); + + ctx.clientIdentity.getMSPID.returns("Org1MSP"); + ctx.stub.getState.withArgs("owner").resolves("Org1MSP"); + ctx.stub.getState.withArgs("bridge").resolves("bridge"); + + await contract.InitToken(ctx, "Org1MSP"); + ctx.stub.getState.withArgs("name").resolves("SATPContract"); + }); + + afterEach(() => { + sandbox.restore(); + }); + + describe("#mint", () => { + it("should add token to a new account and a new total supply", async () => { + ctx.clientIdentity.getID.returns("Org1MSP"); + ctx.stub.createCompositeKey.returns("balance_Org1MSP"); + ctx.stub.getState.withArgs("balance_Org1MSP").resolves(null); + ctx.stub.getState.withArgs("totalSupply").resolves(null); + + const response = await contract.mint(ctx, 1000); + + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Org1MSP", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#burn", () => { + it("should work", async () => { + ctx.clientIdentity.getID.returns("Org1MSP"); + ctx.stub.createCompositeKey.returns("balance_Org1MSP"); + ctx.stub.getState + .withArgs("balance_Org1MSP") + .resolves(Buffer.from("1000")); + ctx.stub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await contract.burn(ctx, 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Org1MSP", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#assign", () => { + it("should fail when the sender and the recipient are the same", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + await expect( + contract.assign(ctx, "bridge", "bridge", 1000), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the message sender does not have permition", async () => { + ctx.clientIdentity.getMSPID.returns("attacker"); + await expect( + contract.assign(ctx, "bridge", "attacker", 1000), + ).to.be.rejectedWith( + Error, + "client is not authorized to perform the operation. attacker", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState.withArgs("balance_bridge").resolves(Buffer.from("500")); + + await expect( + contract.assign(ctx, "bridge", "Alice", 1000), + ).to.be.rejectedWith( + Error, + "client account bridge has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState + .withArgs("balance_bridge") + .resolves(Buffer.from("1000")); + + ctx.stub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + ctx.stub.getState.withArgs("balance_Bob").resolves(null); + + const response = await contract.assign(ctx, "bridge", "Bob", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_bridge", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState + .withArgs("balance_bridge") + .resolves(Buffer.from("1000")); + + ctx.stub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + ctx.stub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await contract.assign(ctx, "bridge", "Bob", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_bridge", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + describe("#transfer", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.clientIdentity.getID.returns("bridge"); + + ctx.stub.createCompositeKey + .withArgs("allowance", ["owner", "bridge"]) + .returns("allowance_owner_bridge"); + ctx.stub.getState + .withArgs("allowance_owner_bridge") + .resolves(Buffer.from("0")); + + await expect( + contract.transfer(ctx, "owner", "bridge", 1000), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.clientIdentity.getID.returns("bridge"); + + ctx.stub.createCompositeKey + .withArgs("allowance", ["owner", "bridge"]) + .returns("allowance_owner_bridge"); + ctx.stub.getState + .withArgs("allowance_owner_bridge") + .resolves(Buffer.from("3000")); + + sinon.stub(contract, "_transfer").resolves(true); + + const response = await contract.transfer(ctx, "owner", "bridge", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "allowance_owner_bridge", + Buffer.from("2000"), + ); + const event = { from: "owner", to: "bridge", value: 1000 }; + sinon.assert.calledWith( + ctx.stub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js new file mode 100644 index 0000000000..0f11a84957 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js @@ -0,0 +1,397 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Context } = require("fabric-contract-api"); +const { ChaincodeStub, ClientIdentity } = require("fabric-shim"); + +const { TokenERC20Contract } = require("../lib/tokenERC20"); + +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +const sinon = require("sinon"); +const expect = chai.expect; + +chai.should(); +chai.use(chaiAsPromised); + +describe("Chaincode", () => { + let sandbox; + let token; + let ctx; + let mockStub; + let mockClientIdentity; + + beforeEach("Sandbox creation", async () => { + sandbox = sinon.createSandbox(); + token = new TokenERC20Contract("token-erc20"); + + ctx = sinon.createStubInstance(Context); + mockStub = sinon.createStubInstance(ChaincodeStub); + ctx.stub = mockStub; + mockClientIdentity = sinon.createStubInstance(ClientIdentity); + ctx.clientIdentity = mockClientIdentity; + + await token.Initialize(ctx, "some name", "some symbol", "2"); + + mockStub.putState.resolves("some state"); + mockStub.setEvent.returns("set event"); + }); + + afterEach("Sandbox restoration", () => { + sandbox.restore(); + }); + + describe("#TokenName", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.TokenName(ctx); + sinon.assert.calledWith(mockStub.getState, "name"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Symbol", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.Symbol(ctx); + sinon.assert.calledWith(mockStub.getState, "symbol"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Decimals", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("2")); + + const response = await token.Decimals(ctx); + sinon.assert.calledWith(mockStub.getState, "decimals"); + expect(response).to.equals(2); + }); + }); + + describe("#TotalSupply", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("10000")); + + const response = await token.TotalSupply(ctx); + sinon.assert.calledWith(mockStub.getState, "totalSupply"); + expect(response).to.equals(10000); + }); + }); + + describe("#BalanceOf", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.BalanceOf(ctx, "Alice"); + expect(response).to.equals(1000); + }); + }); + + describe("#_transfer", () => { + it("should fail when the sender and the receipient are the same", async () => { + await expect( + token._transfer(ctx, "Alice", "Alice", "1000"), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("500")); + + await expect( + token._transfer(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "client account Alice has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(null); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Transfer", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + sinon.stub(token, "_transfer").returns(true); + + const response = await token.Transfer(ctx, "Bob", "1000"); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#TransferFrom", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("0")); + + await expect( + token.TransferFrom(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("3000")); + + sinon.stub(token, "_transfer").returns(true); + + const response = await token.TransferFrom(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Alice_Charlie", + Buffer.from("2000"), + ); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Approve", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Dave"); + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + + const response = await token.Approve(ctx, "Ellen", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Dave_Eve", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Allowance", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.Allowance(ctx, "Dave", "Eve"); + expect(response).to.equals(1000); + }); + }); + + describe("#Initialize", () => { + it("should work", async () => { + // We consider it has already been initialized in the before-each statement + sinon.assert.calledWith( + mockStub.putState, + "name", + Buffer.from("some name"), + ); + sinon.assert.calledWith( + mockStub.putState, + "symbol", + Buffer.from("some symbol"), + ); + sinon.assert.calledWith(mockStub.putState, "decimals", Buffer.from("2")); + }); + + it("should failed if called a second time", async () => { + // We consider it has already been initialized in the before-each statement + await expect( + await token.Initialize(ctx, "some name", "some symbol", "2"), + ).to.be.rejectedWith( + Error, + "contract options are already set, client is not authorized to change them", + ); + }); + }); + + describe("#Mint", () => { + it("should add token to a new account and a new total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(null); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to the existing account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("2000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to a new account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Burn", () => { + it("should work", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Burn(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#ClientAccountBalance", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.ClientAccountBalance(ctx); + expect(response).to.equals(1000); + }); + }); + + describe("#ClientAccountID", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("x509::{subject DN}::{issuer DN}"); + + const response = await token.ClientAccountID(ctx); + sinon.assert.calledOnce(mockClientIdentity.getID); + expect(response).to.equals("x509::{subject DN}::{issuer DN}"); + }); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json new file mode 100644 index 0000000000..a1c5ccb234 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "target": "es2017", + "moduleResolution": "node", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "skipLibCheck": true, + }, + "include": [ + "./src/**/*" + ], + "exclude": [ + "./src/**/*.test.ts" + ] +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock new file mode 100644 index 0000000000..8e3447999e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock @@ -0,0 +1,3747 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/code-frame@npm:7.24.2" + dependencies: + "@babel/highlight": "npm:^7.24.2" + picocolors: "npm:^1.0.0" + checksum: 10/7db8f5b36ffa3f47a37f58f61e3d130b9ecad21961f3eede7e2a4ac2c7e4a5efb6e9d03a810c669bc986096831b6c0dfc2c3082673d93351b82359c1b03e0590 + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.23.5": + version: 7.24.4 + resolution: "@babel/compat-data@npm:7.24.4" + checksum: 10/e51faec0ac8259f03cc5029d2b4a944b4fee44cb5188c11530769d5beb81f384d031dba951febc3e33dbb48ceb8045b1184f5c1ac4c5f86ab1f5e951e9aaf7af + languageName: node + linkType: hard + +"@babel/core@npm:^7.7.5": + version: 7.24.5 + resolution: "@babel/core@npm:7.24.5" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" + "@babel/helper-compilation-targets": "npm:^7.23.6" + "@babel/helper-module-transforms": "npm:^7.24.5" + "@babel/helpers": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/b0d02c51f39cc4c6f8fcaab7052d17dea63aab36d7e2567bfbad074e5a027df737ebcaf3029c3a659bc719bbac806311c2e8786be1d686abd093c48a6068395c + languageName: node + linkType: hard + +"@babel/generator@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/generator@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/7a3782f1d2f824025a538444a0fce44f5b30a7b013984279561bcb3450eec91a41526533fd0b25b1a6fde627bebd0e645c0ea2aa907cc15c7f3da2d9eb71f069 + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-compilation-targets@npm:7.23.6" + dependencies: + "@babel/compat-data": "npm:^7.23.5" + "@babel/helper-validator-option": "npm:^7.23.5" + browserslist: "npm:^4.22.2" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 + languageName: node + linkType: hard + +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": "npm:^7.22.15" + "@babel/types": "npm:^7.23.0" + checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d + languageName: node + linkType: hard + +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" + dependencies: + "@babel/types": "npm:^7.22.5" + checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.24.3": + version: 7.24.3 + resolution: "@babel/helper-module-imports@npm:7.24.3" + dependencies: + "@babel/types": "npm:^7.24.0" + checksum: 10/42fe124130b78eeb4bb6af8c094aa749712be0f4606f46716ce74bc18a5ea91c918c547c8bb2307a2e4b33f163e4ad2cb6a7b45f80448e624eae45b597ea3499 + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-module-transforms@npm:7.24.5" + dependencies: + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-module-imports": "npm:^7.24.3" + "@babel/helper-simple-access": "npm:^7.24.5" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/helper-validator-identifier": "npm:^7.24.5" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/1a91e8abc2f427f8273ce3b99ef7b9c013eb3628221428553e0d4bc9c6db2e73bc4fc1b8535bd258544936accab9380e0d095f2449f913cad650ddee744b2124 + languageName: node + linkType: hard + +"@babel/helper-simple-access@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-simple-access@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10/db8768a16592faa1bde9061cac3d903bdbb2ddb2a7e9fb73c5904daee1f1b1dc69ba4d249dc22c45885c0d4b54fd0356ee78e6d67a9a90330c7dd37e6cd3acff + languageName: node + linkType: hard + +"@babel/helper-split-export-declaration@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-split-export-declaration@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10/84777b6304ef0fe6501038985b61aaa118082688aa54eca8265f14f3ae2e01adf137e9111f4eb9870e0e9bc23901e0b8859bb2a9e4362ddf89d05e1c409c2422 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/helper-string-parser@npm:7.24.1" + checksum: 10/04c0ede77b908b43e6124753b48bc485528112a9335f0a21a226bff1ace75bb6e64fab24c85cb4b1610ef3494dacd1cb807caeb6b79a7b36c43d48c289b35949 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-string-parser@npm:7.24.7" + checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-validator-identifier@npm:7.24.5" + checksum: 10/38aaf6a64a0ea2e84766165b461deda3c24fd2173dff18419a2cc9e1ea1d3e709039aee94db29433a07011492717c80900a5eb564cdca7d137757c3c69e26898 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 10/537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helpers@npm:7.24.5" + dependencies: + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + checksum: 10/efd74325823c70a32aa9f5e263c8eb0a1f729f5e9ea168e3226fa92a10b1702593b76034812e9f7b560d6447f9cd446bad231d7086af842129c6596306300094 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.24.2": + version: 7.24.5 + resolution: "@babel/highlight@npm:7.24.5" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.5" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/afde0403154ad69ecd58a98903058e776760444bf4d0363fb740a8596bc6278b72c5226637c4f6b3674d70acb1665207fe2fcecfe93a74f2f4ab033e89fd7e8c + languageName: node + linkType: hard + +"@babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/parser@npm:7.24.5" + bin: + parser: ./bin/babel-parser.js + checksum: 10/f5ed1c5fd4b0045a364fb906f54fd30e2fff93a45069068b6d80d3ab2b64f5569c90fb41d39aff80fb7e925ca4d44917965a76776a3ca11924ec1fae3be5d1ea + languageName: node + linkType: hard + +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/template@npm:7.24.0" + dependencies: + "@babel/code-frame": "npm:^7.23.5" + "@babel/parser": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" + checksum: 10/8c538338c7de8fac8ada691a5a812bdcbd60bd4a4eb5adae2cc9ee19773e8fb1a724312a00af9e1ce49056ffd3c3475e7287b5668cf6360bfb3f8ac827a06ffe + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/traverse@npm:7.24.5" + dependencies: + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-function-name": "npm:^7.23.0" + "@babel/helper-hoist-variables": "npm:^7.22.5" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/e237de56e0c30795293fdb6f2cb09a75e6230836e3dc67dc4fa21781eb4d5842996bf3af95bc57ac5c7e6e97d06446f14732d0952eb57d5d9643de7c4f95bee6 + languageName: node + linkType: hard + +"@babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/types@npm:7.24.5" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.1" + "@babel/helper-validator-identifier": "npm:^7.24.5" + to-fast-properties: "npm:^2.0.0" + checksum: 10/259e7512476ae64830e73f2addf143159232bcbf0eba6a6a27cab25a960cd353a11c826eb54185fdf7d8d9865922cbcd6522149e9ec55b967131193f9c9111a1 + languageName: node + linkType: hard + +"@babel/types@npm:^7.8.3": + version: 7.24.7 + resolution: "@babel/types@npm:7.24.7" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/ad3c8c0d6fb4acb0bb74bb5b4bb849b181bf6185677ef9c59c18856c81e43628d0858253cf232f0eca806f02e08eff85a1d3e636a3e94daea737597796b0b430 + languageName: node + linkType: hard + +"@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + +"@dabh/diagnostics@npm:^2.0.2": + version: 2.0.3 + resolution: "@dabh/diagnostics@npm:2.0.3" + dependencies: + colorspace: "npm:1.1.x" + enabled: "npm:2.0.x" + kuler: "npm:^2.0.0" + checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 + languageName: node + linkType: hard + +"@fidm/asn1@npm:^1.0.4": + version: 1.0.4 + resolution: "@fidm/asn1@npm:1.0.4" + checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f + languageName: node + linkType: hard + +"@fidm/x509@npm:^1.2.1": + version: 1.2.1 + resolution: "@fidm/x509@npm:1.2.1" + dependencies: + "@fidm/asn1": "npm:^1.0.4" + tweetnacl: "npm:^1.0.1" + checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 + languageName: node + linkType: hard + +"@grpc/grpc-js@npm:^1.4.1": + version: 1.10.9 + resolution: "@grpc/grpc-js@npm:1.10.9" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/8991a997798f19ae849d0f274280f5fdba981048f77211744a301e22207620bb24661d0dfaea51ee6259c5c8e6c159b62fe2499c879d9f14decf20957c219124 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.6.6": + version: 0.6.13 + resolution: "@grpc/proto-loader@npm:0.6.13" + dependencies: + "@types/long": "npm:^4.0.1" + lodash.camelcase: "npm:^4.3.0" + long: "npm:^4.0.0" + protobufjs: "npm:^6.11.3" + yargs: "npm:^16.2.0" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/a881bea00a1ab1c8d50e4bdf106c7e74f905121116fbcda91b9688548da1267edf1302bb754164a6f60ece82a949a28cefc503bfe058ffc1531dc26fa5188df3 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" + dependencies: + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: 10/89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 + languageName: node + linkType: hard + +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 + languageName: node + linkType: hard + +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 + languageName: node + linkType: hard + +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 + languageName: node + linkType: hard + +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 + languageName: node + linkType: hard + +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 + languageName: node + linkType: hard + +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 + languageName: node + linkType: hard + +"@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 + languageName: node + linkType: hard + +"@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": + version: 1.8.6 + resolution: "@sinonjs/commons@npm:1.8.6" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^6.0.0, @sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395 + languageName: node + linkType: hard + +"@sinonjs/samsam@npm:^5.3.1": + version: 5.3.1 + resolution: "@sinonjs/samsam@npm:5.3.1" + dependencies: + "@sinonjs/commons": "npm:^1.6.0" + lodash.get: "npm:^4.4.2" + type-detect: "npm:^4.0.8" + checksum: 10/6850b9980f042a844072a34ce3ca80b098d4550c8c7a83b2b2e7beb1e06ad19608699544b7a8b0c7db882528d8b74321dfd185d0651cff08cbe793cb73dd39d3 + languageName: node + linkType: hard + +"@sinonjs/text-encoding@npm:^0.7.1": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 + languageName: node + linkType: hard + +"@types/chai-as-promised@npm:^7.1.2": + version: 7.1.8 + resolution: "@types/chai-as-promised@npm:7.1.8" + dependencies: + "@types/chai": "npm:*" + checksum: 10/88e2d42f14d1de19ba1c7b5c35f263fef37d3ad241c71f5eb59b10763706f3902f4131b93854c9c6ed520081c7e36be555849f202418357f905bea71178b7d02 + languageName: node + linkType: hard + +"@types/chai@npm:*, @types/chai@npm:^4.2.11": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: 10/f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f + languageName: node + linkType: hard + +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: 10/68afa05fb20949d88345876148a76f6ccff5433310e720db51ac5ca21cb8cc6714286dbe04713840ddbd25a8b56b7a23aa87d08472fabf06463a6f2ed4967707 + languageName: node + linkType: hard + +"@types/mocha@npm:^7.0.2": + version: 7.0.2 + resolution: "@types/mocha@npm:7.0.2" + checksum: 10/8d9cfcd2fcaf0dcd4840c2f54e737e88b3999c334b363b0ed184db40e765da20befa8281211b351d213781231a2372bfb4ca043e9ee8188885bf7be83c2928fd + languageName: node + linkType: hard + +"@types/node@npm:18.11.9, @types/node@npm:>=13.7.0": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae + languageName: node + linkType: hard + +"@types/node@npm:^16.11.1": + version: 16.18.97 + resolution: "@types/node@npm:16.18.97" + checksum: 10/c7ffc135852b658ab6737f818492cab4f43a1c092ad4b032dd591c0ab2f66781191df4ddd08ba91436d7ee64c259987f94da8fa97e3b7d8d0fd5dae6f2775c26 + languageName: node + linkType: hard + +"@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + +"@types/sinon@npm:*, @types/sinon@npm:^7.5.2": + version: 7.5.2 + resolution: "@types/sinon@npm:7.5.2" + checksum: 10/66163c371dd84f1c485ae4c60401e4cfdb376974c85d91123dcc8c38334ecc4909c4ae9ffc5008bf0f5212593c7d91f70f460963c01510d2dfe93a689fc8e9ea + languageName: node + linkType: hard + +"@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + +"@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 10/ee8fe811becd830f5e276ec63469ec66c22503eb140064580e712c9fccadfd54157c462188640ba6765d5c21f829e7120eb37afb5ead512684b9a1ab86d2db66 + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv@npm:^6.12.2": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 + languageName: node + linkType: hard + +"archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 + languageName: node + linkType: hard + +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + +"async@npm:^3.2.3": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 + languageName: node + linkType: hard + +"browserslist@npm:^4.22.2": + version: 4.23.0 + resolution: "browserslist@npm:4.23.0" + dependencies: + caniuse-lite: "npm:^1.0.30001587" + electron-to-chromium: "npm:^1.4.668" + node-releases: "npm:^2.0.14" + update-browserslist-db: "npm:^1.0.13" + bin: + browserslist: cli.js + checksum: 10/496c3862df74565dd942b4ae65f502c575cbeba1fa4a3894dad7aa3b16130dc3033bc502d8848147f7b625154a284708253d9598bcdbef5a1e34cf11dc7bad8e + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"builtin-modules@npm:^1.1.1": + version: 1.1.1 + resolution: "builtin-modules@npm:1.1.1" + checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.3 + resolution: "cacache@npm:18.0.3" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/d4c161f071524bb636334b8cf94780c014e29c180a886b8184da8f2f44d2aca88d5664797c661e9f74bdbd34697c2f231ed7c24c256cecbb0a0563ad1ada2219 + languageName: node + linkType: hard + +"caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" + dependencies: + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"camelcase@npm:^6.0.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001587": + version: 1.0.30001621 + resolution: "caniuse-lite@npm:1.0.30001621" + checksum: 10/238187b8565edd98b041829a4157ff23406e8b573a8f5a7f7d75fd6bd46c508e4d1a07eb4a0086cfa1bce2f45fcd3b08ea7ffc36584ef2b1d38f8215b7301853 + languageName: node + linkType: hard + +"chai-as-promised@npm:^7.1.1": + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" + dependencies: + check-error: "npm:^1.0.2" + peerDependencies: + chai: ">= 2.1.2 < 6" + checksum: 10/be372540dad92ef85cde3954bc0e9b0b33e4e6454f3740b17bfb16e36eda638911619089c05a4e4f2bf6722563bf893bb78c2af59b318c23abb2199e5c20ca1f + languageName: node + linkType: hard + +"chai@npm:^4.2.0": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 10/c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae + languageName: node + linkType: hard + +"chalk@npm:^2.3.0, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + +"chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + +"check-error@npm:^1.0.2, check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + +"chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"class-transformer@npm:^0.4.0": + version: 0.4.0 + resolution: "class-transformer@npm:0.4.0" + checksum: 10/4751bbcf0ec8a754053eca1cce2e6d883a8fc7d400fac32368b18f05353e22e8415f7223a53daa35705e6d690516f221ec1c46e68c7ad731e31c4f8e46101fb8 + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + +"color-name@npm:1.1.3, color-name@npm:^1.0.0": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"color-string@npm:^1.6.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + +"color@npm:^3.1.3": + version: 3.2.1 + resolution: "color@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.3" + color-string: "npm:^1.6.0" + checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae + languageName: node + linkType: hard + +"colorspace@npm:1.1.x": + version: 1.1.4 + resolution: "colorspace@npm:1.1.4" + dependencies: + color: "npm:^3.1.3" + text-hex: "npm:1.0.x" + checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 + languageName: node + linkType: hard + +"commander@npm:^2.12.1": + version: 2.15.1 + resolution: "commander@npm:2.15.1" + checksum: 10/6f4545833348d61dd0c3b285c7f0dc9bc8b1bdac38b512d263184918811382c646c38d58c1102caeff0eb57d4bbd526efc5e6116a78b6af7c1aad6fb628678a8 + languageName: node + linkType: hard + +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + +"convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 + languageName: node + linkType: hard + +"debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/723a9570dcd15d146ea4992f0dca12467d1b00f534abb42473df166d36826fcae8bab045aef59ac2f407b47a23266110bc0e646df8ac82f7800c11384f82050e + languageName: node + linkType: hard + +"debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/0073c3bcbd9cb7d71dd5f6b55be8701af42df3e56e911186dfa46fac3a5b9eb7ce7f377dd1d3be6db8977221f8eb333d945216f645cf56f6b688cd484837d255 + languageName: node + linkType: hard + +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 10/12ce93ae63de187e77b076d3d51bfc28b11f98910a22c18714cce112791195e86a94f97788180994614b14562a86c9763f67c69f785e4586f806b5df39bf9301 + languageName: node + linkType: hard + +"default-require-extensions@npm:^3.0.0": + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" + dependencies: + strip-bom: "npm:^4.0.0" + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 + languageName: node + linkType: hard + +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c + languageName: node + linkType: hard + +"diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.4.668": + version: 1.4.782 + resolution: "electron-to-chromium@npm:1.4.782" + checksum: 10/d5550876e4ee04df75e3bf6e0809de2b8d6129dd1ef3a8508020c0620bc814c496b5852b3a99cfe1bb79662c8dd5182ae18844af089414e6e92790d5deeea864 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + +"enabled@npm:2.0.x": + version: 2.0.0 + resolution: "enabled@npm:2.0.0" + checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + +"es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + languageName: node + linkType: hard + +"escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd + languageName: node + linkType: hard + +"fabric-contract-api@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-contract-api@npm:2.4.1" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.4.1" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.3" + checksum: 10/3708814be206f3130e0264bc591a67a2ed631b9979af3e7589ca7b8e61c8f098a6fae0acb931f5211c8346a728e0f8d112671a20fd9ecdafbe48695b082e1226 + languageName: node + linkType: hard + +"fabric-contract-api@npm:^2.4.1": + version: 2.5.4 + resolution: "fabric-contract-api@npm:2.5.4" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.5.4" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + checksum: 10/09001db44761f9afa50ba8af7f0740fd7a33bce0a6e4ee597767169f2b187f13a13d2a1713400f42e3eaf53c999fd0ae0d07619faf6da8344efbe6a6e9ffc4bb + languageName: node + linkType: hard + +"fabric-shim-api@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-shim-api@npm:2.4.1" + checksum: 10/fa344ba5d45faafaccff05be21fb822ba39e3fd93fdaaafe8790d579e136f17795f6438a7fb399e2b40126f8d45cfd2596bdebe606743e6920851958ed6f856b + languageName: node + linkType: hard + +"fabric-shim-api@npm:2.5.4": + version: 2.5.4 + resolution: "fabric-shim-api@npm:2.5.4" + checksum: 10/aee691043d245a99dd8c8dd44ca7e29feb2de60e44bcc572050bfefa17a8e64d978c8264308d4ce079e5f1ec3779e58d962af9adc52bdeb0b579fe857b4bacad + languageName: node + linkType: hard + +"fabric-shim@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-shim@npm:2.4.1" + dependencies: + "@fidm/x509": "npm:^1.2.1" + "@grpc/grpc-js": "npm:^1.4.1" + "@grpc/proto-loader": "npm:^0.6.6" + "@types/node": "npm:^16.11.1" + ajv: "npm:^6.12.2" + fabric-contract-api: "npm:2.4.1" + fabric-shim-api: "npm:2.4.1" + fs-extra: "npm:^10.0.0" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.3" + yargs: "npm:^17.2.1" + yargs-parser: "npm:^20.2.9" + bin: + fabric-chaincode-node: cli.js + checksum: 10/5684f966fdfff43d5f9d45598445be5232f015a702b1cadfc6d82d701d524db8cfffc174376aca13cc15fe9377b0942422fa7d299fd6c4fc9af8e8017a88276f + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + +"fast-safe-stringify@npm:^2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 + languageName: node + linkType: hard + +"fecha@npm:^4.2.0": + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + +"find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 + languageName: node + linkType: hard + +"find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + +"fn.name@npm:1.x.x": + version: 1.1.0 + resolution: "fn.name@npm:1.1.0" + checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 + languageName: node + linkType: hard + +"foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/77b33b3c438a499201727ca84de39a66350ccd54a8805df712773e963cefb5c4632dbc4386109e97a0df8fb1585aee95fa35acb07587e3e04cfacabfc0ae15dc + languageName: node + linkType: hard + +"fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be + languageName: node + linkType: hard + +"fs-extra@npm:^10.0.0": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/05ce2c3b59049bcb7b52001acd000e44b3c4af4ec1f8839f383ef41ec0048e3cfa7fd8a637b1bddfefad319145db89be91f4b7c1db2908205d38bf91e7d1d3b7 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 10/3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + +"get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + +"glob@npm:7.2.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.2 + resolution: "glob@npm:10.4.2" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 + languageName: node + linkType: hard + +"glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 10/1391a9add951964de566adc0aee8b0e2b2321e768c1fdccb7a8e156d6a6cd7ea72782883ba8c2c307baf524e3059519423b72e585eba5e7a5f6e83a1e2359b0d + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" + dependencies: + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a + languageName: node + linkType: hard + +"hasown@npm:^2.0.0": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.4 + resolution: "https-proxy-agent@npm:7.0.4" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + +"is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: "npm:^2.0.0" + checksum: 10/d53bd0cc24b0a0351fb4b206ee3908f71b9bbf1c47e9c9e14e5f06d292af1663704d2abd7e67700d6487b2b7864e0d0f6f10a1edf1892864bdffcb197d1845a2 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + +"istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" + dependencies: + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" + dependencies: + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 + languageName: node + linkType: hard + +"istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.0.2": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.0 + resolution: "jackspeak@npm:3.4.0" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b + languageName: node + linkType: hard + +"js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + +"js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" + dependencies: + graceful-fs: "npm:^4.1.6" + universalify: "npm:^2.0.0" + dependenciesMeta: + graceful-fs: + optional: true + checksum: 10/03014769e7dc77d4cf05fa0b534907270b60890085dd5e4d60a382ff09328580651da0b8b4cdf44d91e4c8ae64d91791d965f05707beff000ed494a38b6fec85 + languageName: node + linkType: hard + +"just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 + languageName: node + linkType: hard + +"kuler@npm:^2.0.0": + version: 2.0.0 + resolution: "kuler@npm:2.0.0" + checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 + languageName: node + linkType: hard + +"lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 + languageName: node + linkType: hard + +"lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 + languageName: node + linkType: hard + +"log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"logform@npm:^2.3.2, logform@npm:^2.4.0": + version: 2.6.0 + resolution: "logform@npm:2.6.0" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/92de5696a529a7ccf4359fe65a21fce2398ba20c4b4e5769cba187b8fde01d590a22d3c83f797d31b436f49770fb1b2f28646e7c881d30b8d1f4080a05ae7006 + languageName: node + linkType: hard + +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 10/8296e2ba7bab30f9cfabb81ebccff89c819af6a7a78b4bb5a70ea411aa764ee0532f7441381549dfa6a1a98d72abe9138bfcf99f4fa41238629849bc035b845b + languageName: node + linkType: hard + +"long@npm:^5.0.0": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 + languageName: node + linkType: hard + +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: 10/ff1a496d30b5eaec2c9079080965bb0cede203cf878371f7033a007f1e54cd4aa13cc8abf7ccec4c994a83a22ed5476e83a55bb57cc07e6c1547a42937e42c37 + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + +"make-dir@npm:^3.0.0, make-dir@npm:^3.0.2": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 + languageName: node + linkType: hard + +"minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/27e49fb720116face9588c29634404edc0c6677e5448ba01b4ec6179002461cc4fabc842497a0537edc5aa87bc93e65cfb0fe6dc32b850563429a64836dd1d54 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.4 + resolution: "minimatch@npm:9.0.4" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/4cdc18d112b164084513e890d6323370db14c22249d536ad1854539577a895e690a27513dc346392f61a4a50afbbd8abc88f3f25558bfbbbb862cd56508b20f5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.3": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: "npm:^1.2.6" + bin: + mkdirp: bin/cmd.js + checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + +"mocha@npm:^9.2.0": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": "npm:1.1.2" + ansi-colors: "npm:4.1.1" + browser-stdout: "npm:1.3.1" + chokidar: "npm:3.5.3" + debug: "npm:4.3.3" + diff: "npm:5.0.0" + escape-string-regexp: "npm:4.0.0" + find-up: "npm:5.0.0" + glob: "npm:7.2.0" + growl: "npm:1.10.5" + he: "npm:1.2.0" + js-yaml: "npm:4.1.0" + log-symbols: "npm:4.1.0" + minimatch: "npm:4.2.1" + ms: "npm:2.1.3" + nanoid: "npm:3.3.1" + serialize-javascript: "npm:6.0.0" + strip-json-comments: "npm:3.1.1" + supports-color: "npm:8.1.1" + which: "npm:2.0.2" + workerpool: "npm:6.2.0" + yargs: "npm:16.2.0" + yargs-parser: "npm:20.2.4" + yargs-unparser: "npm:2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 10/8ee58bff8694ad4013fc0fbb5670c5ec6d8404c601df2d4ae798fad01dd03b5f9395347cf59167006b315a14813a6f839290d60dcbdee8ef4246afe43609d2dc + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + +"nise@npm:^4.0.4": + version: 4.1.0 + resolution: "nise@npm:4.1.0" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + "@sinonjs/fake-timers": "npm:^6.0.0" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/ff7c2e316c8ae8327573417fefcc84070d9dcfa423b123d014d21db5f7de07580f76a85143c2f91eaf5f1a979f3f9a3721e3652753e58ddaa703aa8d65539b0b + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.1.0 + resolution: "node-gyp@npm:10.1.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.3.5" + tar: "npm:^6.1.2" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/89e105e495e66cd4568af3cf79cdeb67d670eb069e33163c7781d3366470a30367c9bd8dea59e46db16370020139e5bf78b1fbc03284cb571754dfaa59744db5 + languageName: node + linkType: hard + +"node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" + dependencies: + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab + languageName: node + linkType: hard + +"node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"nyc@npm:^15.0.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" + dependencies: + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"one-time@npm:^1.0.0": + version: 1.0.0 + resolution: "one-time@npm:1.0.0" + dependencies: + fn.name: "npm:1.x.x" + checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 + languageName: node + linkType: hard + +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"package-hash@npm:^4.0.0": + version: 4.0.0 + resolution: "package-hash@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + +"path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + languageName: node + linkType: hard + +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + +"pkg-dir@npm:^4.1.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + +"process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" + dependencies: + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + +"protobufjs@npm:^6.11.3": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/long": "npm:^4.0.1" + "@types/node": "npm:>=13.7.0" + long: "npm:^4.0.0" + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: 10/6b7fd7540d74350d65c38f69f398c9995ae019da070e79d9cd464a458c6d19b40b07c9a026be4e10704c824a344b603307745863310c50026ebd661ce4da0663 + languageName: node + linkType: hard + +"protobufjs@npm:^7.2.5": + version: 7.3.0 + resolution: "protobufjs@npm:7.3.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/aff4aa2a3a2f011accb51e23fcae122acbee35cb761abe51f799675a61ab39ad9a506911f307e0fdb9a1703bed1f522cfbdaafaeefd2b3aaca2ddc18f03029d9 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + +"readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + +"reflect-metadata@npm:^0.1.13": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + +"release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" + dependencies: + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + +"resolve@npm:^1.3.2": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.3.2#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + +"rimraf@npm:^3.0.0": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + +"safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + +"safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + +"satp-contract@workspace:.": + version: 0.0.0-use.local + resolution: "satp-contract@workspace:." + dependencies: + "@types/chai": "npm:^4.2.11" + "@types/chai-as-promised": "npm:^7.1.2" + "@types/mocha": "npm:^7.0.2" + "@types/node": "npm:18.11.9" + "@types/sinon": "npm:^7.5.2" + "@types/sinon-chai": "npm:^3.2.3" + chai: "npm:^4.2.0" + chai-as-promised: "npm:^7.1.1" + fabric-contract-api: "npm:^2.4.1" + fabric-shim: "npm:2.4.1" + mocha: "npm:^9.2.0" + nyc: "npm:^15.0.0" + sinon: "npm:^9.0.1" + sinon-chai: "npm:^3.5.0" + ts-node: "npm:^8.8.1" + tslint: "npm:^6.1.0" + typescript: "npm:5.3.3" + winston: "npm:^3.2.1" + languageName: unknown + linkType: soft + +"semver@npm:^5.3.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + +"semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.5.3": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 + languageName: node + linkType: hard + +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.2": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + +"simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + +"sinon-chai@npm:^3.5.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe + languageName: node + linkType: hard + +"sinon@npm:^9.0.1": + version: 9.2.4 + resolution: "sinon@npm:9.2.4" + dependencies: + "@sinonjs/commons": "npm:^1.8.1" + "@sinonjs/fake-timers": "npm:^6.0.1" + "@sinonjs/samsam": "npm:^5.3.1" + diff: "npm:^4.0.2" + nise: "npm:^4.0.4" + supports-color: "npm:^7.1.0" + checksum: 10/4597c12e2490b22aaae5fb1edca169a10e71dee73c13d2d12d6d9fa7f3bdbdb53ec5ad52c631c301fb3eab79471a30b05be65155c30ca415169470ea4789eae6 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.3 + resolution: "socks-proxy-agent@npm:8.0.3" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.7.1" + checksum: 10/c2112c66d6322e497d68e913c3780f3683237fd394bfd480b9283486a86e36095d0020db96145d88f8ccd9cc73261b98165b461f9c1bf5dc17abfe75c18029ce + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.17": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0, source-map@npm:^0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + +"spawn-wrap@npm:^2.0.0": + version: 2.0.0 + resolution: "spawn-wrap@npm:2.0.0" + dependencies: + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + languageName: node + linkType: hard + +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + languageName: node + linkType: hard + +"stack-trace@npm:0.0.x": + version: 0.0.10 + resolution: "stack-trace@npm:0.0.10" + checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + +"strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.4.0 + resolution: "supports-color@npm:5.4.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/11a1faa8e02c1c4f528cdfea6a41d4c823c0b9d7280e14684bbac554c6a32a1c800c0fcc5d148764a071fd94be5c2dbd301cd1fe95daa029296c4ef36ae62d01 + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 + languageName: node + linkType: hard + +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + +"text-hex@npm:1.0.x": + version: 1.0.0 + resolution: "text-hex@npm:1.0.0" + checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a + languageName: node + linkType: hard + +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + +"triple-beam@npm:^1.3.0": + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 + languageName: node + linkType: hard + +"ts-node@npm:^8.8.1": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/1431026e6e9e8971ecaba14fdf9960541918c0560344d95e4942b765dbd96d5648b99ca02a5090046130aa9870164b82ba8090a4eda048d19da3ad7aceeb0b49 + languageName: node + linkType: hard + +"tslib@npm:^1.13.0, tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb + languageName: node + linkType: hard + +"tslint@npm:^6.1.0": + version: 6.1.3 + resolution: "tslint@npm:6.1.3" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + builtin-modules: "npm:^1.1.1" + chalk: "npm:^2.3.0" + commander: "npm:^2.12.1" + diff: "npm:^4.0.1" + glob: "npm:^7.1.1" + js-yaml: "npm:^3.13.1" + minimatch: "npm:^3.0.4" + mkdirp: "npm:^0.5.3" + resolve: "npm:^1.3.2" + semver: "npm:^5.3.0" + tslib: "npm:^1.13.0" + tsutils: "npm:^2.29.0" + peerDependencies: + typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + bin: + tslint: bin/tslint + checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + languageName: node + linkType: hard + +"tsutils@npm:^2.29.0": + version: 2.29.0 + resolution: "tsutils@npm:2.29.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + languageName: node + linkType: hard + +"tweetnacl@npm:^1.0.1": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 + languageName: node + linkType: hard + +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + +"type-fest@npm:^0.8.0": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + +"typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 + languageName: node + linkType: hard + +"universalify@npm:^2.0.0": + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 10/ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.0.13": + version: 1.0.16 + resolution: "update-browserslist-db@npm:1.0.16" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/071bf0b2fb8568db6cd42ee2598ac9b87c794a7229fcbf1b035ae7f883e770c07143f16a5371525d5bcb94b99f9a1b279036142b0195ffd4cf5a0008fc4a500e + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"winston-transport@npm:^4.7.0": + version: 4.7.0 + resolution: "winston-transport@npm:4.7.0" + dependencies: + logform: "npm:^2.3.2" + readable-stream: "npm:^3.6.0" + triple-beam: "npm:^1.3.0" + checksum: 10/c8eae7b110e68396edcf26aec86608bd8ac98f3cc05961064e2e577b023d9c4aa485546cacba84efaf48b7d6b1e282dc211fd959ee16cbd31d34476d96daea43 + languageName: node + linkType: hard + +"winston@npm:^3.2.1, winston@npm:^3.3.3, winston@npm:^3.7.2": + version: 3.13.0 + resolution: "winston@npm:3.13.0" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.4.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/436675598359af27e4eabde2ce578cf77da893ffd57d0479f037fef939e8eb721031f0102b14399eee93b3412b545946c431d1fff23db3beeac2ffa395537f7b + languageName: node + linkType: hard + +"workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 10/c7dce6eae02098d70fe9924503bd95688564a1316cbb96fe55600f7ede0e66f1f2fea4d18aaec71fcee32373d17eda0bf87ac4dac8e5823e90ca1524aac90bdc + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/0d64f2d438e0b555e693b95aee7b2689a12c3be5ac458192a1ce28f542a6e9e59ddfecc37520910c2c88eb1f82a5411260566dba5064e8f9895e76e169e76187 + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 10/392870b2a100bbc643bc035fe3a89cef5591b719c7bdc8721bcdb3d27ab39fa4870acdca67b0ee096e146d769f311d68eda6b8195a6d970f227795061923013f + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + +"yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: 10/db8f251ae40e24782d5c089ed86883ba3c0ce7f3c174002a67ec500802f928df9d505fea5d04829769221ce20b0f69f6fb1138fbb2e2fb102e3e9d426d20edab + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: "npm:^5.0.0" + decamelize: "npm:^1.2.0" + checksum: 10/235bcbad5b7ca13e5abc54df61d42f230857c6f83223a38e4ed7b824681875b7f8b6ed52139d88a3ad007050f28dc0324b3c805deac7db22ae3b4815dae0e1bf + languageName: node + linkType: hard + +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.9": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: "npm:^6.0.0" + decamelize: "npm:^4.0.0" + flat: "npm:^5.0.2" + is-plain-obj: "npm:^2.1.0" + checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0, yargs@npm:^16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e + languageName: node + linkType: hard + +"yargs@npm:^15.0.2": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: "npm:^6.0.0" + decamelize: "npm:^1.2.0" + find-up: "npm:^4.1.0" + get-caller-file: "npm:^2.0.1" + require-directory: "npm:^2.1.1" + require-main-filename: "npm:^2.0.0" + set-blocking: "npm:^2.0.0" + string-width: "npm:^4.2.0" + which-module: "npm:^2.0.0" + y18n: "npm:^4.0.0" + yargs-parser: "npm:^18.1.2" + checksum: 10/bbcc82222996c0982905b668644ca363eebe6ffd6a572fbb52f0c0e8146661d8ce5af2a7df546968779bb03d1e4186f3ad3d55dfaadd1c4f0d5187c0e3a5ba16 + languageName: node + linkType: hard + +"yargs@npm:^17.2.1, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json new file mode 100644 index 0000000000..472d18de98 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json @@ -0,0 +1,38 @@ +{ + "name": "SATP-ERC20", + "contract": "fabric", + "ontology": { + "lock": [{ + "functionSignature": "transferFrom", + "variables": ["owner", "bridge", "amount"] + } + ], + "unlock": [{ + "functionSignature": "transfer", + "variables": ["owner", "amount"] + } + ], + "mint": [{ + "functionSignature": "mint", + "variables": ["amount"] + } + ], + "burn": [{ + "functionSignature": "burn", + "variables": ["amount"] + } + ], + "assign": [{ + "functionSignature": "assign", + "variables": ["bridge", "receiver", "amount"] + } + ], + "checkPermission": [{ + "functionSignature": "hasPermission", + "variables": ["bridgeMSPID"] + } + ] + }, + "ownerSignature": "", + "bridgeSignature": "" +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts new file mode 100644 index 0000000000..099c368482 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts @@ -0,0 +1,592 @@ +import { + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, +} from "@hyperledger/cactus-common"; +import { + pruneDockerAllIfGithubAction, + Containers, + BesuTestLedger, +} from "@hyperledger/cactus-test-tooling"; +import { v4 as uuidv4 } from "uuid"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import SATPContract from "../../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import { Account } from "web3-core"; +import { BesuBridge } from "../../../../main/typescript/core/stage-services/satp-bridge/besu-bridge"; +import { BesuAsset } from "../../../../main/typescript/core/stage-services/satp-bridge/types/besu-asset"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { BesuConfig } from "../../../../main/typescript/types/blockchain-interaction"; +import SATPInteraction from "../../../solidity/satp-erc20-interact.json"; + +const logLevel: LogLevelDesc = "DEBUG"; + +let besuLedger: BesuTestLedger; +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; + +let besuBridge: BesuBridge; +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let assetContractAddress: string; +let wrapperContractAddress: string; + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + pluginRegistry.add(testing_connector); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeHermesOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + //pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeHermesOptions, + gas: 9999999999999, + logLevel, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } +}); + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +describe("Besu Bridge Test", () => { + it("Should Initialize the bridge", async () => { + besuBridge = new BesuBridge(besuConfig); + expect(besuBridge).toBeDefined(); + }); + it("Should Wrap a token", async () => { + const asset = { + tokenId: BESU_ASSET_ID, + tokenType: TokenType.NONSTANDARD, + owner: firstHighNetWorthAccount, + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + ontology: JSON.stringify(SATPInteraction), + } as BesuAsset; + + const response = await besuBridge.wrapAsset(asset); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAssets(); + expect(response2).toBeDefined(); + expect(response2.length).toBe(1); + expect(response2[0]).toBe(BESU_ASSET_ID); + + const response3 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response3).toBeDefined(); + expect(response3.tokenId).toBe(BESU_ASSET_ID); + expect(response3.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response3.owner).toBe(firstHighNetWorthAccount); + expect(response3.contractAddress).toBe(assetContractAddress); + }); + + it("Should Lock a token", async () => { + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + + const response = await besuBridge.lockAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.owner).toBe(firstHighNetWorthAccount); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("100"); + log.info("Locked 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("100"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + }); + + it("Should Unlock a token", async () => { + const response = await besuBridge.unlockAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.owner).toBe(firstHighNetWorthAccount); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("0"); + log.info("Unlocked 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("100"); + log.info("Amount was transfer correctly from the Wrapper account"); + }); + + it("Should Burn a token", async () => { + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + + const response = await besuBridge.lockAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Locked 100 tokens successfully"); + + const response2 = await besuBridge.burnAsset(BESU_ASSET_ID, 100); + expect(response2).toBeDefined(); + expect(response2.transactionId).toBeDefined(); + expect(response2.transactionReceipt).toBeDefined(); + log.info("Burned 100 tokens successfully"); + + const response3 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response3).toBeDefined(); + expect(response3.tokenId).toBe(BESU_ASSET_ID); + expect(response3.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response3.owner).toBe(firstHighNetWorthAccount); + expect(response3.contractAddress).toBe(assetContractAddress); + expect(response3.amount).toBe("0"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was burned correctly to the Wrapper account"); + }); + + it("Should Mint a token", async () => { + const response = await besuBridge.mintAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Minted 100 tokens successfully"); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.owner).toBe(firstHighNetWorthAccount); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("100"); + log.info("Minted 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("100"); + log.info("Amount was minted correctly to the Wrapper account"); + }); + + it("Should Assign a token", async () => { + const response = await besuBridge.assignAsset( + BESU_ASSET_ID, + assigneeEthAccount.address, + 100, + ); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Assigned 100 tokens successfully"); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("0"); + log.info("Assigned 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was assigned correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [assigneeEthAccount.address], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("100"); + log.info("Amount was assigned correctly to the Assignee account"); + }); + + it("Should Unwrap a token", async () => { + const response = await besuBridge.unwrapAsset(BESU_ASSET_ID); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAssets(); + expect(response2).toBeDefined(); + expect(response2.length).toBe(0); + log.info("Unwrapped 100 tokens successfully"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts new file mode 100644 index 0000000000..fea1d1122b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts @@ -0,0 +1,1062 @@ +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import "jest-extended"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { DiscoveryOptions } from "fabric-network"; +import bodyParser from "body-parser"; +import path from "path"; + +import http, { Server } from "http"; + +import fs from "fs-extra"; + +import { + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FileBase64, + ChainCodeProgrammingLanguage, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + Containers, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import express from "express"; +import { AddressInfo } from "net"; + +import { v4 as uuidv4 } from "uuid"; +import { FabricBridge } from "../../../../main/typescript/core/stage-services/satp-bridge/fabric-bridge"; +import { FabricConfig } from "../../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import SATPInteraction from "../../../../test/typescript/fabric/satp-erc20-interact.json"; +let fabricServer: Server; + +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +const logLevel: LogLevelDesc = "DEBUG"; + +let fabricLedger: FabricTestLedgerV1; +let satpContractName: string; +let satpWrapperContractName: string; +let fabricChannelName: string; + +let configFabric: Configuration; +let apiClient: FabricApi; + +let fabricConnector: PluginLedgerConnectorFabric; + +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let fabricBridge: FabricBridge; +let fabricConfig: FabricConfig; + +let clientId: string; + +let bridgeId: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "Satp - Hermes", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + log.info("Fabric Ledger started"); + + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + //pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + logLevel, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } +}); + +describe("Fabric Bridge Test", () => { + it("Should Initialize the bridge", async () => { + fabricBridge = new FabricBridge(fabricConfig, logLevel); + expect(fabricBridge).not.toBeUndefined(); + + bridgeId = await fabricBridge.getClientId(); + expect(bridgeId).not.toBeUndefined(); + log.debug(`Bridge ID: ${bridgeId}`); + }); + + it("Wrap asset", async () => { + const response = await fabricBridge.wrapAsset({ + tokenId: FABRIC_ASSET_ID, + tokenType: TokenType.NONSTANDARD, + owner: clientId, + mspId: "Org1MSP", + channelName: fabricChannelName, + contractName: satpContractName, + amount: 0, + ontology: JSON.stringify(SATPInteraction), + }); + + expect(response).not.toBeUndefined(); + expect(response.transactionId).not.toBeUndefined(); + expect(response.output).not.toBeUndefined(); + + log.info(`Wrap asset response: ${JSON.stringify(response)}`); + + const response2 = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + log.info(`GetAsset response: ${JSON.stringify(response2)}`); + + expect(response2).not.toBeUndefined(); + expect(response2.amount).toBe(0); + expect(response2.owner).toBe(clientId); + expect(response2.mspId).toBe("Org1MSP"); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.tokenId).toBe(FABRIC_ASSET_ID); + expect(response2.contractName).toBe(satpContractName); + expect(response2.channelName).toBe(fabricChannelName); + }); + + it("lock asset", async () => { + const responseMint = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["2"], + methodName: "Mint", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseMint).not.toBeUndefined(); + expect(responseMint.status).toBeGreaterThan(199); + expect(responseMint.status).toBeLessThan(300); + expect(responseMint.data).not.toBeUndefined(); + + log.info( + `Mint 2 amount asset by the owner response: ${JSON.stringify(responseMint.data)}`, + ); + + const responseApprove = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId, "2"], + methodName: "Approve", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseApprove).not.toBeUndefined(); + expect(responseApprove.status).toBeGreaterThan(199); + expect(responseApprove.status).toBeLessThan(300); + expect(responseApprove.data).not.toBeUndefined(); + + log.info( + `Approve 2 amount asset by the owner response: ${JSON.stringify(responseApprove.data)}`, + ); + + const responseLock = await fabricBridge.lockAsset(FABRIC_ASSET_ID, 2); + + expect(responseLock).not.toBeUndefined(); + expect(responseLock.transactionId).not.toBeUndefined(); + expect(responseLock.output).not.toBeUndefined(); + + log.info(`Lock asset response: ${JSON.stringify(responseLock)}`); + + const response2 = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response2).not.toBeUndefined(); + expect(response2.amount).toBe(2); + expect(response2.owner).toBe(clientId); + expect(response2.mspId).toBe("Org1MSP"); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.tokenId).toBe(FABRIC_ASSET_ID); + expect(response2.contractName).toBe(satpContractName); + expect(response2.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response2)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("2"); + log.info("Amount was transfer correctly to the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + }); + + it("unlock asset", async () => { + const responseUnlock = await fabricBridge.unlockAsset(FABRIC_ASSET_ID, 2); + + expect(responseUnlock).not.toBeUndefined(); + expect(responseUnlock.transactionId).not.toBeUndefined(); + expect(responseUnlock.output).not.toBeUndefined(); + + log.info(`Unlock asset response: ${JSON.stringify(responseUnlock)}`); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(0); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("2"); + log.info("Amount was transfer correctly to the Owner account"); + }); + + it("Should Burn a token", async () => { + const responseApprove = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId, "2"], + methodName: "Approve", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseApprove).not.toBeUndefined(); + expect(responseApprove.status).toBeGreaterThan(199); + expect(responseApprove.status).toBeLessThan(300); + expect(responseApprove.data).not.toBeUndefined(); + + log.info( + `Approve 2 amount asset by the owner response: ${JSON.stringify(responseApprove.data)}`, + ); + const responseLock = await fabricBridge.lockAsset(FABRIC_ASSET_ID, 2); + + expect(responseLock).not.toBeUndefined(); + expect(responseLock.transactionId).not.toBeUndefined(); + expect(responseLock.output).not.toBeUndefined(); + + log.info(`Lock asset response: ${JSON.stringify(responseLock)}`); + + const responseBurn = await fabricBridge.burnAsset(FABRIC_ASSET_ID, 2); + + expect(responseBurn).not.toBeUndefined(); + expect(responseBurn.transactionId).not.toBeUndefined(); + expect(responseBurn.output).not.toBeUndefined(); + + log.info( + `Burn 2 amount asset by the owner response: ${JSON.stringify(responseBurn)}`, + ); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(0); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was burned correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("0"); + log.info("Amount was burned correctly from the Owner account"); + }); + + it("Should Mint a token", async () => { + const responseMint = await fabricBridge.mintAsset(FABRIC_ASSET_ID, 2); + expect(responseMint).not.toBeUndefined(); + expect(responseMint.transactionId).not.toBeUndefined(); + expect(responseMint.output).not.toBeUndefined(); + + log.info(`Mint asset response: ${JSON.stringify(responseMint)}`); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(2); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("2"); + log.info("Amount was minted correctly to the Bridge account"); + }); + + it("Should Assign a token", async () => { + const responseAssign = await fabricBridge.assignAsset( + FABRIC_ASSET_ID, + clientId, + 2, + ); + expect(responseAssign).not.toBeUndefined(); + expect(responseAssign.transactionId).not.toBeUndefined(); + expect(responseAssign.output).not.toBeUndefined(); + + log.info(`Assign asset response: ${JSON.stringify(responseAssign)}`); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(0); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("2"); + log.info("Amount was assigned correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("0"); + log.info("Amount was assigned correctly to the Owner account"); + }); + + it("Should Unwrap a token", async () => { + const responseUnwrap = await fabricBridge.unwrapAsset(FABRIC_ASSET_ID); + expect(responseUnwrap).not.toBeUndefined(); + expect(responseUnwrap.transactionId).not.toBeUndefined(); + expect(responseUnwrap.output).not.toBeUndefined(); + + log.info(`Unwrap asset response: ${JSON.stringify(responseUnwrap)}`); + + expect( + async () => await fabricBridge.getAsset(FABRIC_ASSET_ID), + ).rejects.toThrow(); + }); +}); + +afterAll(async () => { + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts index e115d7cd87..8e20ce2bd8 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts @@ -1,9 +1,9 @@ import { Logger } from "@hyperledger/cactus-common"; import { - Configuration, AdminApi, TransactionApi, -} from "../../main/typescript/generated/gateway-client/typescript-axios"; +} from "../../main/typescript/generated/gateway-client/typescript-axios/api"; +import { Configuration } from "../../main/typescript/generated/gateway-client/typescript-axios"; //import { Api } from "@bufbuild/protobuf"; export function createClient( diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts new file mode 100644 index 0000000000..5350589cad --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts @@ -0,0 +1,145 @@ +import "jest-extended"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; + +import { SATPBridgeConfig } from "../../../main/typescript/core/types"; +import { SatpBridgeManager } from "../../../main/typescript/core/stage-services/satp-bridge/satp-bridge-manager"; +import { NetworkBridge } from "../../../main/typescript/core/stage-services/satp-bridge/network-bridge"; +import { + Asset, + TokenType, +} from "../../../main/typescript/core/stage-services/satp-bridge/types/asset"; + +const logLevel: LogLevelDesc = "DEBUG"; +const logger = LoggerProvider.getOrCreate({ + level: logLevel, + label: "satp-bridge-manager-test", +}); + +let network: NetworkBridge; + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + network = { + runTransaction: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + getReceipt: jest.fn().mockReturnValue("testReceipt"), + network: "testNetwork", + networkName: function (): string { + return this.network; + }, + wrapAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + unwrapAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + lockAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + unlockAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + mintAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + burnAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + assignAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + }; +}); + +describe("SATP bridge function testing", () => { + test("Lock asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.lockAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Unlock asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.unlockAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Mint asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.mintAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Burn asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.burnAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Assign asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const recipient = "testRecipient"; + const receipt = await bridgeManager.assignAsset(assetId, recipient, 2); + expect(receipt).toBeDefined(); + }); + test("Verify wrap asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const asset: Asset = { + tokenId: "testAssetId", + tokenType: TokenType.ERC20, + owner: "testOwner", + amount: 0, + ontology: "", + }; + const receipt = await bridgeManager.wrapAsset(asset); + expect(receipt).toBeDefined(); + }); + + test("Verify unwrap asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.unwrapAsset(assetId); + expect(receipt).toBeDefined(); + }); +}); + +afterAll(async () => { + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/tsconfig.json b/packages/cactus-plugin-satp-hermes/tsconfig.json index 430c7cd63a..179fef0810 100644 --- a/packages/cactus-plugin-satp-hermes/tsconfig.json +++ b/packages/cactus-plugin-satp-hermes/tsconfig.json @@ -19,7 +19,8 @@ "src/**/*.json" ], "exclude":[ - "./src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/**/*.ts" + "./src/main/typescript/fabric-contracts/**/*.ts", + "./src/test/typescript/fabric/**/*.ts" ], "references": [ { diff --git a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts index ff7072aa39..d6828327f4 100644 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts @@ -27,7 +27,7 @@ export interface IBesuTestLedgerConstructorOptions { } export const BESU_TEST_LEDGER_DEFAULT_OPTIONS = Object.freeze({ - containerImageVersion: "2021-01-08-7a055c3", + containerImageVersion: "2024-06-09-cc2f9c5", containerImageName: "ghcr.io/hyperledger/cactus-besu-all-in-one", rpcApiHttpPort: 8545, rpcApiWsPort: 8546, diff --git a/yarn.lock b/yarn.lock index be1aa444d9..e18b07a1f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5917,6 +5917,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protobuf@npm:1.7.2": + version: 1.7.2 + resolution: "@bufbuild/protobuf@npm:1.7.2" + checksum: 10/f23ccc77066100157043cf36bd2506acdcb235f0a902f7662fbbb992e78df4202780aeb55bd2e3fd1945bd9e52a4fca759351f333f2ff779e32996e13eb56d34 + languageName: node + linkType: hard + "@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": version: 1.8.0 resolution: "@bufbuild/protobuf@npm:1.8.0" @@ -8807,6 +8814,41 @@ __metadata: languageName: node linkType: hard +"@foundry-rs/easy-foundryup@npm:^0.1.3": + version: 0.1.3 + resolution: "@foundry-rs/easy-foundryup@npm:0.1.3" + dependencies: + command-exists: "npm:^1.2.9" + ts-interface-checker: "npm:^0.1.9" + checksum: 10/a653a11e670dc0d75b58d4039049706ab078cb9baea22dbc133aabe9edb4421e65bfd08c81f9e23b35985850555764edec5f28f06cf33bf23df37051b3358c43 + languageName: node + linkType: hard + +"@foundry-rs/hardhat-forge@npm:0.1.17": + version: 0.1.17 + resolution: "@foundry-rs/hardhat-forge@npm:0.1.17" + dependencies: + "@foundry-rs/easy-foundryup": "npm:^0.1.3" + "@nomiclabs/hardhat-ethers": "npm:^2.0.0" + "@nomiclabs/hardhat-waffle": "npm:^2.0.0" + "@types/sinon-chai": "npm:^3.2.3" + "@types/web3": "npm:1.0.19" + camelcase-keys: "npm:7.0.2" + debug: "npm:^4.1.1" + ethers: "npm:^5.0.0" + fs-extra: "npm:^10.1.0" + glob: "npm:^7.1.3" + true-case-path: "npm:^2.2.1" + ts-interface-checker: "npm:^0.1.9" + peerDependencies: + "@nomiclabs/hardhat-ethers": ^2.0.0 + ethereum-waffle: ^3.2.0 + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 10/fcdcfee1b1f244536db9ec1758e32bac0eb0b8cf4b24fdc871857fe89d1a46b48b75e2d965dca9a06793d10c81ad1a52b3034f149690648a705f9d7133cc0614 + languageName: node + linkType: hard + "@gar/promisify@npm:^1.0.1, @gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -10858,11 +10900,16 @@ __metadata: class-transformer: "npm:0.5.1" class-validator: "npm:0.14.1" crypto-js: "npm:4.2.0" + ethereum-abi-types-generator: "npm:1.3.4" + ethers: "npm:^6.13.1" express: "npm:4.21.0" fabric-network: "npm:2.2.20" fs-extra: "npm:11.2.0" + hardhat: "npm:2.22.5" knex: "npm:2.4.0" kubo-rpc-client: "npm:3.0.1" + npm-run-all: "npm:4.1.5" + openzeppelin-solidity: "npm:3.4.2" secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" @@ -13461,6 +13508,70 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-arm64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.4.2" + checksum: 10/331d34e15127215102a4eb5698b196d5dfb1fe7f7452ef08aad39827d4b294b2424372525aa19bc88374815328321a4c2cf9fb4ba6fa0edb0bb03f65d539a905 + languageName: node + linkType: hard + +"@nomicfoundation/edr-darwin-x64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" + checksum: 10/72f82ca892a7e1436e36445d38ecd6a448b3bc6287dfc132c133f24a6450c47f6e7ec2f73272b55b8630b25072ba82e54b3e0dc67edea20a51718c066f831bae + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" + checksum: 10/e0fd03020d525834743a0a84fb6cea77fda6d23dcec158766cbf4e282b1ddb11370de9cf29cac5a6392c671477db5cd8b2cae4b08fc147f16f42f8fda7015a8b + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" + checksum: 10/ce3cd5241c399540f65ec1b158ed1dd4f4defdb982f14c0476078c36d648177c901f65f03f1a8e4b248be4793f449a3c5d40b820fefc1415ee15e2a8e341d65c + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" + checksum: 10/6104d48dbbc4ab9fb3e7caf35863868e0619e0f19fa513f0f531d50dda319025c57a0909b8a3217cc1ce6ced4b8191d3feb80735d34d2311e10c8fe6e938491b + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" + checksum: 10/528b9fbdf73bb61e0d184f7d53abb38729369a1c1e7d00cded35e3979df2945b72f692d93588d0024dfa8d638091b086b20eee930a839ca047f372de7c4920a2 + languageName: node + linkType: hard + +"@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" + checksum: 10/3d09106954f19ce641435289d63aa224241a45e05ae05b0bb66d6d6e2a4005f32062e2cf7244a96c01ac5ef6382a2a21dcd2fb7a6bb3b4f042f518e815665a05 + languageName: node + linkType: hard + +"@nomicfoundation/edr@npm:^0.4.0": + version: 0.4.2 + resolution: "@nomicfoundation/edr@npm:0.4.2" + dependencies: + "@nomicfoundation/edr-darwin-arm64": "npm:0.4.2" + "@nomicfoundation/edr-darwin-x64": "npm:0.4.2" + "@nomicfoundation/edr-linux-arm64-gnu": "npm:0.4.2" + "@nomicfoundation/edr-linux-arm64-musl": "npm:0.4.2" + "@nomicfoundation/edr-linux-x64-gnu": "npm:0.4.2" + "@nomicfoundation/edr-linux-x64-musl": "npm:0.4.2" + "@nomicfoundation/edr-win32-x64-msvc": "npm:0.4.2" + checksum: 10/25a2d59f82057c4df0df7c619a77fa30bb9dae5ff57b0ada8fb86ffa0eb95b7f932e9c83769ab8f82a16f65bcbd12a9be334aed7e23c6d514b9339e34bb6f5c4 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-block@npm:5.0.2": version: 5.0.2 resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" @@ -13507,6 +13618,15 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-common@npm:4.0.4": + version: 4.0.4 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" + dependencies: + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + checksum: 10/1daaede087c5dee92cb1e5309a548da2d64484722b917eccda4118d627293b61f705a990075f4d7f0f350100ed79396b3a25e7ea67824242d36d23716fe75e97 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-ethash@npm:3.0.2": version: 3.0.2 resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" @@ -13546,6 +13666,15 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-rlp@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" + bin: + rlp: bin/rlp.cjs + checksum: 10/39fb26340bb2643a66c642315aa7b6fcfbdbddddeee18b4b683b77aa93b8a031bc86d4d4144368e5dd20499dc96b8b27751c6a285ff34e7a9969b530b306ce8c + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": version: 2.0.2 resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" @@ -13587,6 +13716,23 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-tx@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" + dependencies: + "@nomicfoundation/ethereumjs-common": "npm:4.0.4" + "@nomicfoundation/ethereumjs-rlp": "npm:5.0.4" + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + ethereum-cryptography: "npm:0.1.3" + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 10/5e84de14fa464501c5c60ac6519f536d39ebc52c4d1fb79c63a66ea86f992bde4f338b0b0fdd2e5bc811ebd984e8ff41e4205e47d30001bad5b45370568bc41c + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-util@npm:9.0.2": version: 9.0.2 resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" @@ -13598,6 +13744,21 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-util@npm:9.0.4": + version: 9.0.4 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" + dependencies: + "@nomicfoundation/ethereumjs-rlp": "npm:5.0.4" + ethereum-cryptography: "npm:0.1.3" + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 10/891806c7edda29c7b3f61551949ff0c1fa5f4e122fba84878bf27362a9e058768fd01194dc0e031de2e523c30ecbeb22e6841b8ab3772c8567fef4af6480872d + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-vm@npm:7.0.2": version: 7.0.2 resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" @@ -13728,6 +13889,29 @@ __metadata: languageName: node linkType: hard +"@nomiclabs/hardhat-ethers@npm:^2.0.0": + version: 2.2.3 + resolution: "@nomiclabs/hardhat-ethers@npm:2.2.3" + peerDependencies: + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 10/bd239a00d3384b6dfefbf2444bacd7fdaccc9df40efac2255b4f8314f0414416e65296945bbe6debec65479a3f8a5f9d1e69aa66a39d1852e5ac1d690c3b458a + languageName: node + linkType: hard + +"@nomiclabs/hardhat-waffle@npm:^2.0.0": + version: 2.0.6 + resolution: "@nomiclabs/hardhat-waffle@npm:2.0.6" + peerDependencies: + "@nomiclabs/hardhat-ethers": ^2.0.0 + "@types/sinon-chai": ^3.2.3 + ethereum-waffle: "*" + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 10/55e5edd8ddbd9a1579bfd997d96e431057850ef640f826f0f0c22dcfc9db46e04f4ecd8f3ca8b3d1715a951e184b8bcfadf94ceee5f2db000ac896f617cfa2ae + languageName: node + linkType: hard + "@npmcli/agent@npm:^2.0.0": version: 2.1.1 resolution: "@npmcli/agent@npm:2.1.1" @@ -14263,13 +14447,6 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.4.0": - version: 4.4.0 - resolution: "@openzeppelin/contracts@npm:4.4.0" - checksum: 10/1c830b5ec2a9df32d94ec14bfaead2feb4f67db2ed0e0085cf074d64b4240f9cf0760858c6f0b5a19e57e81f22f9daa892b9993bd83fdc25db2fdc48ea37b7a2 - languageName: node - linkType: hard - "@openzeppelin/contracts@npm:4.9.6": version: 4.9.6 resolution: "@openzeppelin/contracts@npm:4.9.6" @@ -14277,6 +14454,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:5.0.2": + version: 5.0.2 + resolution: "@openzeppelin/contracts@npm:5.0.2" + checksum: 10/938ebffbdade7dc59ea3df5b562c0e457bbefde9d82be8fa2acfd11da887df11653ac07922f41746b80cdbc106430e1e6978ce244fe99b00a7d9dc1418fc7670 + languageName: node + linkType: hard + "@peculiar/asn1-schema@npm:^2.3.6": version: 2.3.8 resolution: "@peculiar/asn1-schema@npm:2.3.8" @@ -16682,7 +16866,7 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:^4.11.3, @types/bn.js@npm:^4.11.5": +"@types/bn.js@npm:^4.11.3, @types/bn.js@npm:^4.11.5, @types/bn.js@npm:^4.11.6": version: 4.11.6 resolution: "@types/bn.js@npm:4.11.6" dependencies: @@ -16767,6 +16951,13 @@ __metadata: languageName: node linkType: hard +"@types/chai@npm:*": + version: 5.0.0 + resolution: "@types/chai@npm:5.0.0" + checksum: 10/a6c03aa6b6d59ad40ddb48d07807690efb874628c15b9d89c17d97045a9305a487933398c1e5b5f94087b1a6a9a67a7c828eb9b635104526fd25bb5f9d4c4175 + languageName: node + linkType: hard + "@types/compression@npm:1.7.4": version: 1.7.4 resolution: "@types/compression@npm:1.7.4" @@ -18086,6 +18277,32 @@ __metadata: languageName: node linkType: hard +"@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + +"@types/sinon@npm:*": + version: 17.0.3 + resolution: "@types/sinon@npm:17.0.3" + dependencies: + "@types/sinonjs__fake-timers": "npm:*" + checksum: 10/3f82b4a477c0c57fa4f4f4fb7585cb72c2a65a7e41e5271b54edca296c8dc242c2d8e709de7a8f16af8693c87cb3ad9d96981069ae683f7197a1134892035833 + languageName: node + linkType: hard + +"@types/sinonjs__fake-timers@npm:*": + version: 8.1.5 + resolution: "@types/sinonjs__fake-timers@npm:8.1.5" + checksum: 10/3a0b285fcb8e1eca435266faa27ffff206608b69041022a42857274e44d9305822e85af5e7a43a9fae78d2ab7dc0fcb49f3ae3bda1fa81f0203064dbf5afd4f6 + languageName: node + linkType: hard + "@types/sockjs@npm:^0.3.33": version: 0.3.33 resolution: "@types/sockjs@npm:0.3.33" @@ -18267,6 +18484,13 @@ __metadata: languageName: node linkType: hard +"@types/underscore@npm:*": + version: 1.11.15 + resolution: "@types/underscore@npm:1.11.15" + checksum: 10/5a9c262566551f61744e066d33578c0fad1139c2d5314ed77a8f867487a6d7dd18616f32df4c605070fbd569b942c6d2c083be9f9ae649f41a562b52812b06be + languageName: node + linkType: hard + "@types/uuid@npm:10.0.0": version: 10.0.0 resolution: "@types/uuid@npm:10.0.0" @@ -18288,6 +18512,16 @@ __metadata: languageName: node linkType: hard +"@types/web3@npm:1.0.19": + version: 1.0.19 + resolution: "@types/web3@npm:1.0.19" + dependencies: + "@types/bn.js": "npm:*" + "@types/underscore": "npm:*" + checksum: 10/bf61a77d63cafed92a431df32505ea7e5d91f044f50ecd57e22efa10c76ec1093367403c060b8e72021f4e52513aceebb9c3edfb801b90dee09dc16dc0339d25 + languageName: node + linkType: hard + "@types/ws@npm:8.5.3, @types/ws@npm:^8.2.2": version: 8.5.3 resolution: "@types/ws@npm:8.5.3" @@ -21613,7 +21847,7 @@ __metadata: languageName: node linkType: hard -"boxen@npm:^5.0.0": +"boxen@npm:^5.0.0, boxen@npm:^5.1.2": version: 5.1.2 resolution: "boxen@npm:5.1.2" dependencies: @@ -22445,18 +22679,7 @@ __metadata: languageName: node linkType: hard -"camelcase-keys@npm:^6.2.2": - version: 6.2.2 - resolution: "camelcase-keys@npm:6.2.2" - dependencies: - camelcase: "npm:^5.3.1" - map-obj: "npm:^4.0.0" - quick-lru: "npm:^4.0.1" - checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 - languageName: node - linkType: hard - -"camelcase-keys@npm:^7.0.0": +"camelcase-keys@npm:7.0.2, camelcase-keys@npm:^7.0.0": version: 7.0.2 resolution: "camelcase-keys@npm:7.0.2" dependencies: @@ -22468,6 +22691,17 @@ __metadata: languageName: node linkType: hard +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: "npm:^5.3.1" + map-obj: "npm:^4.0.0" + quick-lru: "npm:^4.0.1" + checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 + languageName: node + linkType: hard + "camelcase@npm:^4.1.0": version: 4.1.0 resolution: "camelcase@npm:4.1.0" @@ -23390,7 +23624,7 @@ __metadata: languageName: node linkType: hard -"colors@npm:1.4.0, colors@npm:^1.1.2": +"colors@npm:1.4.0, colors@npm:^1.1.2, colors@npm:^1.4.0": version: 1.4.0 resolution: "colors@npm:1.4.0" checksum: 10/90b2d5465159813a3983ea72ca8cff75f784824ad70f2cc2b32c233e95bcfbcda101ebc6d6766bc50f57263792629bfb4f1f8a4dfbd1d240f229fc7f69b785fc @@ -23426,7 +23660,7 @@ __metadata: languageName: node linkType: hard -"command-exists@npm:^1.2.8": +"command-exists@npm:^1.2.8, command-exists@npm:^1.2.9": version: 1.2.9 resolution: "command-exists@npm:1.2.9" checksum: 10/46fb3c4d626ca5a9d274f8fe241230817496abc34d12911505370b7411999e183c11adff7078dd8a03ec4cf1391290facda40c6a4faac8203ae38c985eaedd63 @@ -26250,7 +26484,7 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:8.6.0": +"dotenv@npm:8.6.0, dotenv@npm:^8.2.0": version: 8.6.0 resolution: "dotenv@npm:8.6.0" checksum: 10/31d7b5c010cebb80046ba6853d703f9573369b00b15129536494f04b0af4ea0060ce8646e3af58b455af2f6f1237879dd261a5831656410ec92561ae1ea44508 @@ -28115,6 +28349,26 @@ __metadata: languageName: node linkType: hard +"ethereum-abi-types-generator@npm:1.3.4": + version: 1.3.4 + resolution: "ethereum-abi-types-generator@npm:1.3.4" + dependencies: + "@types/bn.js": "npm:^4.11.6" + bignumber.js: "npm:^9.0.0" + colors: "npm:^1.4.0" + dotenv: "npm:^8.2.0" + ethers: "npm:^4.0.47" + ethersv5: "npm:ethers@^5.0.32" + fs-extra: "npm:^9.0.0" + prettier: "npm:^2.0.5" + reflect-metadata: "npm:^0.1.13" + yargs: "npm:^15.3.1" + bin: + abi-types-generator: dist/bin/generator-cli.js + checksum: 10/b9b294f1c7e58af824526d408f8590a3d8e81ab9917f32ba80b586977978e9e9af15bf57dd8d772ec845f648105f79363212394647884a58106fdcce066eeafc + languageName: node + linkType: hard + "ethereum-bloom-filters@npm:^1.0.6": version: 1.0.10 resolution: "ethereum-bloom-filters@npm:1.0.10" @@ -28283,7 +28537,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^4.0.32": +"ethers@npm:^4.0.32, ethers@npm:^4.0.47": version: 4.0.49 resolution: "ethers@npm:4.0.49" dependencies: @@ -28300,7 +28554,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.0.13, ethers@npm:^5.7.1": +"ethers@npm:^5.0.0, ethers@npm:^5.0.13, ethers@npm:^5.7.1, ethersv5@npm:ethers@^5.0.32": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -28338,6 +28592,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.13.1": + version: 6.13.3 + resolution: "ethers@npm:6.13.3" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.1" + "@noble/curves": "npm:1.2.0" + "@noble/hashes": "npm:1.3.2" + "@types/node": "npm:18.15.13" + aes-js: "npm:4.0.0-beta.5" + tslib: "npm:2.4.0" + ws: "npm:8.17.1" + checksum: 10/a3b11a5bd97269f2aa5e5cb844642a84fe139a188fd3c0d7d0c4c7b4958d56286e84c14cd41d1c53bd5dff8bf1060c73bd7a9bde8313f8a994d94881f4010037 + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -30000,7 +30269,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:10.1.0": +"fs-extra@npm:10.1.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" dependencies: @@ -31527,6 +31796,67 @@ __metadata: languageName: node linkType: hard +"hardhat@npm:2.22.5": + version: 2.22.5 + resolution: "hardhat@npm:2.22.5" + dependencies: + "@ethersproject/abi": "npm:^5.1.2" + "@metamask/eth-sig-util": "npm:^4.0.0" + "@nomicfoundation/edr": "npm:^0.4.0" + "@nomicfoundation/ethereumjs-common": "npm:4.0.4" + "@nomicfoundation/ethereumjs-tx": "npm:5.0.4" + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + "@nomicfoundation/solidity-analyzer": "npm:^0.1.0" + "@sentry/node": "npm:^5.18.1" + "@types/bn.js": "npm:^5.1.0" + "@types/lru-cache": "npm:^5.1.0" + adm-zip: "npm:^0.4.16" + aggregate-error: "npm:^3.0.0" + ansi-escapes: "npm:^4.3.0" + boxen: "npm:^5.1.2" + chalk: "npm:^2.4.2" + chokidar: "npm:^3.4.0" + ci-info: "npm:^2.0.0" + debug: "npm:^4.1.1" + enquirer: "npm:^2.3.0" + env-paths: "npm:^2.2.0" + ethereum-cryptography: "npm:^1.0.3" + ethereumjs-abi: "npm:^0.6.8" + find-up: "npm:^2.1.0" + fp-ts: "npm:1.19.3" + fs-extra: "npm:^7.0.1" + glob: "npm:7.2.0" + immutable: "npm:^4.0.0-rc.12" + io-ts: "npm:1.10.4" + keccak: "npm:^3.0.2" + lodash: "npm:^4.17.11" + mnemonist: "npm:^0.38.0" + mocha: "npm:^10.0.0" + p-map: "npm:^4.0.0" + raw-body: "npm:^2.4.1" + resolve: "npm:1.17.0" + semver: "npm:^6.3.0" + solc: "npm:0.7.3" + source-map-support: "npm:^0.5.13" + stacktrace-parser: "npm:^0.1.10" + tsort: "npm:0.0.1" + undici: "npm:^5.14.0" + uuid: "npm:^8.3.2" + ws: "npm:^7.4.6" + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: 10/8b5fa8d57ac9dc7f28e4747a9dca7a8ebf2c1e9fe697d7adab3b56e98691cf7732d383ac6dbabfe093229c23a5bfa04f72a060bce35cc1851a21299dacaab0eb + languageName: node + linkType: hard + "harmony-reflect@npm:^1.4.6": version: 1.6.2 resolution: "harmony-reflect@npm:1.6.2" @@ -40983,6 +41313,13 @@ __metadata: languageName: node linkType: hard +"openzeppelin-solidity@npm:3.4.2": + version: 3.4.2 + resolution: "openzeppelin-solidity@npm:3.4.2" + checksum: 10/f5b49e3cd2918b1853a94b5a8cc0e2a1096611a94448f05a3c1a71def21f6fbf46832f5fda5e3684bb9cc3f52b342dd20a0aff4488d256eeb73a612d3cba0400 + languageName: node + linkType: hard + "optionator@npm:^0.8.2": version: 0.8.3 resolution: "optionator@npm:0.8.3" @@ -43747,6 +44084,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^2.0.5": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" + bin: + prettier: bin-prettier.js + checksum: 10/00cdb6ab0281f98306cd1847425c24cbaaa48a5ff03633945ab4c701901b8e96ad558eb0777364ffc312f437af9b5a07d0f45346266e8245beaf6247b9c62b24 + languageName: node + linkType: hard + "pretty-bytes@npm:^5.3.0, pretty-bytes@npm:^5.4.1": version: 5.6.0 resolution: "pretty-bytes@npm:5.6.0" @@ -49985,6 +50331,13 @@ __metadata: languageName: node linkType: hard +"true-case-path@npm:^2.2.1": + version: 2.2.1 + resolution: "true-case-path@npm:2.2.1" + checksum: 10/8c6ddd8dab044012a7bb1bed0b31cbb8f9924e903e996f7378d9b86113cde29251e684075203490d4dca2a199ef401ba89228c602bc5e2a3e4550446e8ae1ccf + languageName: node + linkType: hard + "truffle@npm:5.11.2": version: 5.11.2 resolution: "truffle@npm:5.11.2" From c985db0844448d83cdf60949a45fc48d788eaf16 Mon Sep 17 00:00:00 2001 From: Carlos Amaro <64661289+LordKubaya@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:51:10 +0100 Subject: [PATCH 21/49] fix(satp-hermes): added generated code (#3443) Signed-off-by: Carlos Amaro --- .../cactus-plugin-satp-hermes/foundry.toml | 3 +- .../generated/SATPWrapperContract.ts | 403 ++++++++++++++++++ .../generated/Context.sol/Context.json | 1 + .../ITraceableContract.json | 1 + .../src/solidity/generated/Math.sol/Math.json | 1 + .../generated/Ownable.sol/Ownable.json | 1 + .../generated/SignedMath.sol/SignedMath.json | 1 + .../generated/Strings.sol/Strings.json | 1 + .../08aaa4179bf88c82656a7f352889f726.json | 1 + .../974845d0475a59734bc898d56133545f.json | 1 + .../SATPWrapperContract.json | 1 + .../satp-wrapper.sol/SATPWrapperContract.json | 1 + .../AccessControl.sol/AccessControl.json | 1 + .../generated/Context.sol/Context.json | 1 + .../solidity/generated/ERC165.sol/ERC165.json | 1 + .../solidity/generated/ERC20.sol/ERC20.json | 1 + .../IAccessControl.sol/IAccessControl.json | 1 + .../generated/IERC165.sol/IERC165.json | 1 + .../solidity/generated/IERC20.sol/IERC20.json | 1 + .../IERC20Metadata.sol/IERC20Metadata.json | 1 + .../ITraceableContract.json | 1 + .../solidity/generated/Math.sol/Math.json | 1 + .../generated/SignedMath.sol/SignedMath.json | 1 + .../generated/Strings.sol/Strings.json | 1 + .../707a9b7be39daaaf674e343568be37c1.json | 1 + .../84d52643d45e1addd104736585542010.json | 1 + .../draft-IERC6093.sol/IERC1155Errors.json | 1 + .../draft-IERC6093.sol/IERC20Errors.json | 1 + .../draft-IERC6093.sol/IERC721Errors.json | 1 + .../SATPContractInterface.json | 1 + .../satp-erc20.sol/SATPContract.json | 1 + 31 files changed, 434 insertions(+), 1 deletion(-) create mode 100755 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json diff --git a/packages/cactus-plugin-satp-hermes/foundry.toml b/packages/cactus-plugin-satp-hermes/foundry.toml index 2018a4da62..c966ded7e0 100644 --- a/packages/cactus-plugin-satp-hermes/foundry.toml +++ b/packages/cactus-plugin-satp-hermes/foundry.toml @@ -1,3 +1,4 @@ [profile.default] solc-version = "0.8.20" -evm-version = "paris" \ No newline at end of file +evm-version = "paris" +libs = ["node_modules", "lib"] \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts new file mode 100755 index 0000000000..b1f2d9df5b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts @@ -0,0 +1,403 @@ +import BN from 'bn.js'; +import BigNumber from 'bignumber.js'; +import { + PromiEvent, + TransactionReceipt, + EventResponse, + EventData, + Web3ContractContext, +} from 'ethereum-abi-types-generator'; + +export interface CallOptions { + from?: string; + gasPrice?: string; + gas?: number; +} + +export interface SendOptions { + from: string; + value?: number | string | BN | BigNumber; + gasPrice?: string; + gas?: number; +} + +export interface EstimateGasOptions { + from?: string; + value?: number | string | BN | BigNumber; + gas?: number; +} + +export interface MethodPayableReturnContext { + send(options: SendOptions): PromiEvent; + send( + options: SendOptions, + callback: (error: Error, result: any) => void + ): PromiEvent; + estimateGas(options: EstimateGasOptions): Promise; + estimateGas( + options: EstimateGasOptions, + callback: (error: Error, result: any) => void + ): Promise; + encodeABI(): string; +} + +export interface MethodConstantReturnContext { + call(): Promise; + call(options: CallOptions): Promise; + call( + options: CallOptions, + callback: (error: Error, result: TCallReturn) => void + ): Promise; + encodeABI(): string; +} + +export interface MethodReturnContext extends MethodPayableReturnContext {} + +export type ContractContext = Web3ContractContext< + SATPWrapperContract, + SATPWrapperContractMethodNames, + SATPWrapperContractEventsContext, + SATPWrapperContractEvents +>; +export type SATPWrapperContractEvents = + | 'Assign' + | 'Burn' + | 'Changed' + | 'Lock' + | 'Mint' + | 'OwnershipTransferred' + | 'Unlock' + | 'Unwrap' + | 'Wrap'; +export interface SATPWrapperContractEventsContext { + Assign( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Burn( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Changed( + parameters: { + filter?: { id?: string | string[] }; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Lock( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Mint( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + OwnershipTransferred( + parameters: { + filter?: { + previousOwner?: string | string[]; + newOwner?: string | string[]; + }; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Unlock( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Unwrap( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; + Wrap( + parameters: { + filter?: {}; + fromBlock?: number; + toBlock?: 'latest' | number; + topics?: string[]; + }, + callback?: (error: Error, event: EventData) => void + ): EventResponse; +} +export type SATPWrapperContractMethodNames = + | 'new' + | 'assign' + | 'bridge_address' + | 'burn' + | 'getAllAssetsIDs' + | 'getToken' + | 'lock' + | 'mint' + | 'owner' + | 'renounceOwnership' + | 'tokens' + | 'tokensInteractions' + | 'transferOwnership' + | 'unlock' + | 'unwrap' + | 'wrap' + | 'wrap'; +export interface TokenResponse { + contractAddress: string; + tokenType: string; + tokenId: string; + owner: string; + amount: string; +} +export interface TokensResponse { + contractAddress: string; + tokenType: string; + tokenId: string; + owner: string; + amount: string; +} +export interface TokensInteractionsResponse { + interactionType: string; + available: boolean; +} +export interface InteractionsRequest { + interactionType: string | number; + functionsSignature: string[]; + variables: string | number[][]; + available: boolean; +} +export interface AssignEventEmittedResponse { + tokenId: string; + receiver_account: string; + amount: string; +} +export interface BurnEventEmittedResponse { + tokenId: string; + amount: string; +} +export interface ChangedEventEmittedResponse { + id: string; + value: string | number[][]; +} +export interface LockEventEmittedResponse { + tokenId: string; + amount: string; +} +export interface MintEventEmittedResponse { + tokenId: string; + amount: string; +} +export interface OwnershipTransferredEventEmittedResponse { + previousOwner: string; + newOwner: string; +} +export interface UnlockEventEmittedResponse { + tokenId: string; + amount: string; +} +export interface UnwrapEventEmittedResponse { + tokenId: string; +} +export interface WrapEventEmittedResponse { + contractAddress: string; + tokenType: string | number; + tokenId: string; + owner: string; +} +export interface SATPWrapperContract { + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: constructor + * @param _bridge_address Type: address, Indexed: false + */ + 'new'(_bridge_address: string): MethodReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param tokenId Type: string, Indexed: false + * @param receiver_account Type: address, Indexed: false + * @param amount Type: uint256, Indexed: false + */ + assign( + tokenId: string, + receiver_account: string, + amount: string + ): MethodReturnContext; + /** + * Payable: false + * Constant: true + * StateMutability: view + * Type: function + */ + bridge_address(): MethodConstantReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param tokenId Type: string, Indexed: false + * @param amount Type: uint256, Indexed: false + */ + burn(tokenId: string, amount: string): MethodReturnContext; + /** + * Payable: false + * Constant: true + * StateMutability: view + * Type: function + */ + getAllAssetsIDs(): MethodConstantReturnContext; + /** + * Payable: false + * Constant: true + * StateMutability: view + * Type: function + * @param tokenId Type: string, Indexed: false + */ + getToken(tokenId: string): MethodConstantReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param tokenId Type: string, Indexed: false + * @param amount Type: uint256, Indexed: false + */ + lock(tokenId: string, amount: string): MethodReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param tokenId Type: string, Indexed: false + * @param amount Type: uint256, Indexed: false + */ + mint(tokenId: string, amount: string): MethodReturnContext; + /** + * Payable: false + * Constant: true + * StateMutability: view + * Type: function + */ + owner(): MethodConstantReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + */ + renounceOwnership(): MethodReturnContext; + /** + * Payable: false + * Constant: true + * StateMutability: view + * Type: function + * @param parameter0 Type: string, Indexed: false + */ + tokens(parameter0: string): MethodConstantReturnContext; + /** + * Payable: false + * Constant: true + * StateMutability: view + * Type: function + * @param parameter0 Type: string, Indexed: false + * @param parameter1 Type: uint8, Indexed: false + */ + tokensInteractions( + parameter0: string, + parameter1: string | number + ): MethodConstantReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param newOwner Type: address, Indexed: false + */ + transferOwnership(newOwner: string): MethodReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param tokenId Type: string, Indexed: false + * @param amount Type: uint256, Indexed: false + */ + unlock(tokenId: string, amount: string): MethodReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param tokenId Type: string, Indexed: false + */ + unwrap(tokenId: string): MethodReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param contractAddress Type: address, Indexed: false + * @param tokenType Type: uint8, Indexed: false + * @param tokenId Type: string, Indexed: false + * @param owner Type: address, Indexed: false + * @param interactions Type: tuple[], Indexed: false + */ + wrap( + contractAddress: string, + tokenType: string | number, + tokenId: string, + owner: string, + interactions: InteractionsRequest[] + ): MethodReturnContext; + /** + * Payable: false + * Constant: false + * StateMutability: nonpayable + * Type: function + * @param contractAddress Type: address, Indexed: false + * @param tokenType Type: uint8, Indexed: false + * @param tokenId Type: string, Indexed: false + * @param owner Type: address, Indexed: false + */ + wrap( + contractAddress: string, + tokenType: string | number, + tokenId: string, + owner: string + ): MethodReturnContext; +} diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json new file mode 100644 index 0000000000..10c223ce86 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json @@ -0,0 +1 @@ +{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json new file mode 100644 index 0000000000..9f45686972 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":5} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json new file mode 100644 index 0000000000..a3f5304faf --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:3:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:3;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:3:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json new file mode 100644 index 0000000000..f83a9ee073 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the address provided by the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"}],"devdoc":{"kind":"dev","methods":{"constructor":{"details":"Initializes the contract setting the address provided by the deployer as the initial owner."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":"Ownable"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json new file mode 100644 index 0000000000..535ade9288 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json @@ -0,0 +1 @@ +{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:4:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:4;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:4:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json new file mode 100644 index 0000000000..91ae15029a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:2:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:2;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:2:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json new file mode 100644 index 0000000000..096c3b0645 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json @@ -0,0 +1 @@ +{"id":"08aaa4179bf88c82656a7f352889f726","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json new file mode 100644 index 0000000000..83723e5a30 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json @@ -0,0 +1 @@ +{"id":"974845d0475a59734bc898d56133545f","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json new file mode 100644 index 0000000000..74d5babbd6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"},{"name":"role_given","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"string","indexed":false,"internalType":"string"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620020cb380380620020cb8339810160408190526200003491620000ea565b816001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f816200009a565b50600480546001600160a01b0319166001600160a01b03939093169290921790915560015562000126565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060408385031215620000fe57600080fd5b82516001600160a01b03811681146200011657600080fd5b6020939093015192949293505050565b611f9580620001366000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063c1733f6811610066578063c1733f6814610208578063d9cf884c14610228578063e1efb5961461023b578063f2fde38b1461024e57600080fd5b80638da5cb5b146101ba578063a1bc17c5146101cb578063b48272cc146101de578063b5bfddea146101f157600080fd5b80634534ba17116100d35780634534ba17146101755780635137b8a714610188578063715018a61461019d5780638d7d180b146101a757600080fd5b806304c2320b146100fa578063056b01ce146101275780631255c1891461014a575b600080fd5b61010d6101083660046118f6565b610261565b60405161011e959493929190611983565b60405180910390f35b61013a6101353660046119cd565b6103bf565b604051901515815260200161011e565b60045461015d906001600160a01b031681565b6040516001600160a01b03909116815260200161011e565b61013a610183366004611a29565b61058e565b610190610792565b60405161011e9190611a80565b6101a561086b565b005b61013a6101b5366004611ae2565b61087f565b6000546001600160a01b031661015d565b61013a6101d93660046118f6565b610b19565b61013a6101ec3660046119cd565b610d14565b6101fa60015481565b60405190815260200161011e565b61021b6102163660046118f6565b610ef4565b60405161011e9190611b67565b61013a6102363660046119cd565b6110b9565b61013a6102493660046119cd565b6113e6565b6101a561025c366004611bd7565b6115c5565b8051602081830181018051600282529282019190930120915280546001820180546001600160a01b03909216929161029890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546102c490611bf2565b80156103115780601f106102e657610100808354040283529160200191610311565b820191906000526020600020905b8154815290600101906020018083116102f457829003601f168201915b50505050509080600201805461032690611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461035290611bf2565b801561039f5780601f106103745761010080835404028352916020019161039f565b820191906000526020600020905b81548152906001019060200180831161038257829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006103c9611603565b60006001600160a01b03166002846040516103e49190611c2c565b908152604051908190036020019020546001600160a01b031603610426578260405163c0bab25f60e01b815260040161041d9190611c48565b60405180910390fd5b60006002846040516104389190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104979190611c2c565b6000604051808303816000865af19150503d80600081146104d4576040519150601f19603f3d011682016040523d82523d6000602084013e6104d9565b606091505b50509050806105235760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b826002856040516105349190611c2c565b9081526020016040518091039020600401819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6848460405161057a929190611c5b565b60405180910390a160019150505b92915050565b6000610598611603565b816002856040516105a99190611c2c565b90815260200160405180910390206004015410156106095760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b6564604482015260640161041d565b600060028560405161061b9190611c2c565b908152604051908190036020018120543060248301526001600160a01b03868116604484015260648301869052169060840160408051601f198184030181529181526020820180516001600160e01b0316632fa96a2760e11b179052516106829190611c2c565b6000604051808303816000865af19150503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b50509050806107155760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c65640000000000000000604482015260640161041d565b826002866040516107269190611c2c565b908152602001604051809103902060040160008282546107469190611c93565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c9061077f90879087908790611ca6565b60405180910390a1506001949350505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156108625783829060005260206000200180546107d590611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461080190611bf2565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050815260200190600101906107b6565b50505050905090565b610873611603565b61087d6000611630565b565b6000610889611603565b60006001600160a01b03166002846040516108a49190611c2c565b908152604051908190036020019020546001600160a01b0316146108dd57826040516319eac8d160e21b815260040161041d9190611c48565b60015460405160248101919091523060448201526000906001600160a01b0387169060640160408051601f198184030181529181526020820180516001600160e01b03166328545c0d60e01b179052516109379190611c2c565b6000604051808303816000865af19150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109c2576002846040516109929190611c2c565b9081526040519081900360200181205463118cdaa760e01b82526001600160a01b0316600482015260240161041d565b6040518060a00160405280876001600160a01b03168152602001868152602001858152602001846001600160a01b031681526020016000815250600285604051610a0c9190611c2c565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610a4b9082611d23565b5060408201516002820190610a609082611d23565b506060820151600382810180546001600160a01b0319166001600160a01b039093169290921790915560809092015160049091015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610acf8582611d23565b507f57951acaa6aa023b66ff5ae829f011ec74aedd1a40654570a33708280743e88186868686604051610b059493929190611de3565b60405180910390a150600195945050505050565b6000610b23611603565b60006001600160a01b0316600283604051610b3e9190611c2c565b908152604051908190036020019020546001600160a01b031603610b77578160405163c0bab25f60e01b815260040161041d9190611c48565b6000600283604051610b899190611c2c565b9081526020016040518091039020600401541115610bbc5781604051635be9608560e11b815260040161041d9190611c48565b610c6e600283604051610bcf9190611c2c565b90815260200160405180910390206002018054610beb90611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1790611bf2565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050611680565b600282604051610c7e9190611c2c565b90815260405190819003602001902080546001600160a01b03191681556000610caa6001830182611805565b610cb8600283016000611805565b506003810180546001600160a01b031916905560006004909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610d03908490611c48565b60405180910390a15060015b919050565b6000610d1e611603565b81600284604051610d2f9190611c2c565b9081526020016040518091039020600401541015610d8f5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b65640000604482015260640161041d565b6000600284604051610da19190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b0316632770a7eb60e21b17905251610e009190611c2c565b6000604051808303816000865af19150503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5050905080610e8c5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b82600285604051610e9d9190611c2c565b90815260200160405180910390206004016000828254610ebd9190611c93565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee999061057a9086908690611c5b565b610f386040518060a0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b600282604051610f489190611c2c565b90815260408051918290036020908101832060a0840190925281546001600160a01b0316835260018201805491840191610f8190611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fad90611bf2565b8015610ffa5780601f10610fcf57610100808354040283529160200191610ffa565b820191906000526020600020905b815481529060010190602001808311610fdd57829003601f168201915b5050505050815260200160028201805461101390611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461103f90611bf2565b801561108c5780601f106110615761010080835404028352916020019161108c565b820191906000526020600020905b81548152906001019060200180831161106f57829003601f168201915b505050918352505060038201546001600160a01b0316602082015260049091015460409091015292915050565b60006110c3611603565b60006001600160a01b03166002846040516110de9190611c2c565b908152604051908190036020019020546001600160a01b031603611117578260405163c0bab25f60e01b815260040161041d9190611c48565b816002846040516111289190611c2c565b908152602001604051809103902060040154101561115d57828260405163076abcf360e51b815260040161041d929190611c5b565b600060028460405161116f9190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b179052516111ce9190611c2c565b6000604051808303816000865af19150503d806000811461120b576040519150601f19603f3d011682016040523d82523d6000602084013e611210565b606091505b505090508061123457836040516358300fe760e01b815260040161041d9190611c48565b60006002856040516112469190611c2c565b908152604051908190036020018120546001600160a01b0316903090600290611270908990611c2c565b908152604051908190036020018120600301546001600160a01b03169060029061129b908a90611c2c565b908152604051908190036020018120600401546001600160a01b039384166024830152919092166044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516113049190611c2c565b6000604051808303816000865af19150503d8060008114611341576040519150601f19603f3d011682016040523d82523d6000602084013e611346565b606091505b5050905080156113cb57836002866040516113619190611c2c565b908152602001604051809103902060040160008282546113819190611c93565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906113b89087908790611c5b565b60405180910390a1600192505050610588565b846040516358300fe760e01b815260040161041d9190611c48565b60006113f0611603565b60006001600160a01b031660028460405161140b9190611c2c565b908152604051908190036020019020546001600160a01b031603611444578260405163c0bab25f60e01b815260040161041d9190611c48565b60006002846040516114569190611c2c565b908152604051908190036020018120546001600160a01b03169060029061147e908790611c2c565b908152604051908190036020018120600301546001600160a01b031660248201523060448201526064810185905260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516114e49190611c2c565b6000604051808303816000865af19150503d8060008114611521576040519150601f19603f3d011682016040523d82523d6000602084013e611526565b606091505b5050905080156115aa57826002856040516115419190611c2c565b908152602001604051809103902060040160008282546115619190611e2c565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc9797906115989086908690611c5b565b60405180910390a16001915050610588565b8360405163412204b560e11b815260040161041d9190611c48565b6115cd611603565b6001600160a01b0381166115f757604051631e4fbdf760e01b81526000600482015260240161041d565b61160081611630565b50565b6000546001600160a01b0316331461087d5760405163118cdaa760e01b815233600482015260240161041d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117da5761173c600382815481106116a3576116a3611e3f565b9060005260206000200180546116b890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546116e490611bf2565b80156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505050836117de565b156117c8576003805461175190600190611c93565b8154811061176157611761611e3f565b906000526020600020016003828154811061177e5761177e611e3f565b9060005260206000200190816117949190611e55565b5060038054806117a6576117a6611f30565b6001900381819060005260206000200160006117c29190611805565b90555050565b806117d281611f46565b915050611683565b5050565b6000815183511480156117fe575081805190602001208380519060200120145b9392505050565b50805461181190611bf2565b6000825580601f10611821575050565b601f01602090049060005260206000209081019061160091905b8082111561184f576000815560010161183b565b5090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261187a57600080fd5b813567ffffffffffffffff8082111561189557611895611853565b604051601f8301601f19908116603f011681019082821181831017156118bd576118bd611853565b816040528381528660208588010111156118d657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561190857600080fd5b813567ffffffffffffffff81111561191f57600080fd5b61192b84828501611869565b949350505050565b60005b8381101561194e578181015183820152602001611936565b50506000910152565b6000815180845261196f816020860160208601611933565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526119a560a0840188611957565b83810360408501526119b78188611957565b9590911660608401525050608001529392505050565b600080604083850312156119e057600080fd5b823567ffffffffffffffff8111156119f757600080fd5b611a0385828601611869565b95602094909401359450505050565b80356001600160a01b0381168114610d0f57600080fd5b600080600060608486031215611a3e57600080fd5b833567ffffffffffffffff811115611a5557600080fd5b611a6186828701611869565b935050611a7060208501611a12565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ad557603f19888603018452611ac3858351611957565b94509285019290850190600101611aa7565b5092979650505050505050565b60008060008060808587031215611af857600080fd5b611b0185611a12565b9350602085013567ffffffffffffffff80821115611b1e57600080fd5b611b2a88838901611869565b94506040870135915080821115611b4057600080fd5b50611b4d87828801611869565b925050611b5c60608601611a12565b905092959194509250565b60208152600060018060a01b03808451166020840152602084015160a06040850152611b9660c0850182611957565b90506040850151601f19858303016060860152611bb38282611957565b915050816060860151166080850152608085015160a0850152809250505092915050565b600060208284031215611be957600080fd5b6117fe82611a12565b600181811c90821680611c0657607f821691505b602082108103611c2657634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611c3e818460208701611933565b9190910192915050565b6020815260006117fe6020830184611957565b604081526000611c6e6040830185611957565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058857610588611c7d565b606081526000611cb96060830186611957565b6001600160a01b039490941660208301525060400152919050565b601f821115611d1e57600081815260208120601f850160051c81016020861015611cfb5750805b601f850160051c820191505b81811015611d1a57828155600101611d07565b5050505b505050565b815167ffffffffffffffff811115611d3d57611d3d611853565b611d5181611d4b8454611bf2565b84611cd4565b602080601f831160018114611d865760008415611d6e5750858301515b600019600386901b1c1916600185901b178555611d1a565b600085815260208120601f198616915b82811015611db557888601518255948401946001909101908401611d96565b5085821015611dd35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b03808716835260806020840152611e056080840187611957565b8381036040850152611e178187611957565b92505080841660608401525095945050505050565b8082018082111561058857610588611c7d565b634e487b7160e01b600052603260045260246000fd5b818103611e60575050565b611e6a8254611bf2565b67ffffffffffffffff811115611e8257611e82611853565b611e9081611d4b8454611bf2565b6000601f821160018114611ec45760008315611eac5750848201545b600019600385901b1c1916600184901b178455611f29565b600085815260209020601f19841690600086815260209020845b83811015611efe5782860154825560019586019590910190602001611ede565b5085831015611f1c5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b600060018201611f5857611f58611c7d565b506001019056fea2646970667358221220225cb2753a2630cfbc6258111a8866e031dff580edaff7495e38d9172ce6ee3164736f6c63430008140033","sourceMap":"689:5698:6:-:0;;;1317:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1383:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;516:51:8;489:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1410:14:6::1;:41:::0;;-1:-1:-1;;;;;;1410:41:6::1;-1:-1:-1::0;;;;;1410:41:6;;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;1461:24:6;689:5698;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:351:8:-;93:6;101;154:2;142:9;133:7;129:23;125:32;122:52;;;170:1;167;160:12;122:52;196:16;;-1:-1:-1;;;;;241:31:8;;231:42;;221:70;;287:1;284;277:12;221:70;355:2;340:18;;;;334:25;310:5;;334:25;;-1:-1:-1;;;14:351:8:o;370:203::-;689:5698:6;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063c1733f6811610066578063c1733f6814610208578063d9cf884c14610228578063e1efb5961461023b578063f2fde38b1461024e57600080fd5b80638da5cb5b146101ba578063a1bc17c5146101cb578063b48272cc146101de578063b5bfddea146101f157600080fd5b80634534ba17116100d35780634534ba17146101755780635137b8a714610188578063715018a61461019d5780638d7d180b146101a757600080fd5b806304c2320b146100fa578063056b01ce146101275780631255c1891461014a575b600080fd5b61010d6101083660046118f6565b610261565b60405161011e959493929190611983565b60405180910390f35b61013a6101353660046119cd565b6103bf565b604051901515815260200161011e565b60045461015d906001600160a01b031681565b6040516001600160a01b03909116815260200161011e565b61013a610183366004611a29565b61058e565b610190610792565b60405161011e9190611a80565b6101a561086b565b005b61013a6101b5366004611ae2565b61087f565b6000546001600160a01b031661015d565b61013a6101d93660046118f6565b610b19565b61013a6101ec3660046119cd565b610d14565b6101fa60015481565b60405190815260200161011e565b61021b6102163660046118f6565b610ef4565b60405161011e9190611b67565b61013a6102363660046119cd565b6110b9565b61013a6102493660046119cd565b6113e6565b6101a561025c366004611bd7565b6115c5565b8051602081830181018051600282529282019190930120915280546001820180546001600160a01b03909216929161029890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546102c490611bf2565b80156103115780601f106102e657610100808354040283529160200191610311565b820191906000526020600020905b8154815290600101906020018083116102f457829003601f168201915b50505050509080600201805461032690611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461035290611bf2565b801561039f5780601f106103745761010080835404028352916020019161039f565b820191906000526020600020905b81548152906001019060200180831161038257829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006103c9611603565b60006001600160a01b03166002846040516103e49190611c2c565b908152604051908190036020019020546001600160a01b031603610426578260405163c0bab25f60e01b815260040161041d9190611c48565b60405180910390fd5b60006002846040516104389190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104979190611c2c565b6000604051808303816000865af19150503d80600081146104d4576040519150601f19603f3d011682016040523d82523d6000602084013e6104d9565b606091505b50509050806105235760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b826002856040516105349190611c2c565b9081526020016040518091039020600401819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6848460405161057a929190611c5b565b60405180910390a160019150505b92915050565b6000610598611603565b816002856040516105a99190611c2c565b90815260200160405180910390206004015410156106095760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b6564604482015260640161041d565b600060028560405161061b9190611c2c565b908152604051908190036020018120543060248301526001600160a01b03868116604484015260648301869052169060840160408051601f198184030181529181526020820180516001600160e01b0316632fa96a2760e11b179052516106829190611c2c565b6000604051808303816000865af19150503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b50509050806107155760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c65640000000000000000604482015260640161041d565b826002866040516107269190611c2c565b908152602001604051809103902060040160008282546107469190611c93565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c9061077f90879087908790611ca6565b60405180910390a1506001949350505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156108625783829060005260206000200180546107d590611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461080190611bf2565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050815260200190600101906107b6565b50505050905090565b610873611603565b61087d6000611630565b565b6000610889611603565b60006001600160a01b03166002846040516108a49190611c2c565b908152604051908190036020019020546001600160a01b0316146108dd57826040516319eac8d160e21b815260040161041d9190611c48565b60015460405160248101919091523060448201526000906001600160a01b0387169060640160408051601f198184030181529181526020820180516001600160e01b03166328545c0d60e01b179052516109379190611c2c565b6000604051808303816000865af19150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109c2576002846040516109929190611c2c565b9081526040519081900360200181205463118cdaa760e01b82526001600160a01b0316600482015260240161041d565b6040518060a00160405280876001600160a01b03168152602001868152602001858152602001846001600160a01b031681526020016000815250600285604051610a0c9190611c2c565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610a4b9082611d23565b5060408201516002820190610a609082611d23565b506060820151600382810180546001600160a01b0319166001600160a01b039093169290921790915560809092015160049091015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610acf8582611d23565b507f57951acaa6aa023b66ff5ae829f011ec74aedd1a40654570a33708280743e88186868686604051610b059493929190611de3565b60405180910390a150600195945050505050565b6000610b23611603565b60006001600160a01b0316600283604051610b3e9190611c2c565b908152604051908190036020019020546001600160a01b031603610b77578160405163c0bab25f60e01b815260040161041d9190611c48565b6000600283604051610b899190611c2c565b9081526020016040518091039020600401541115610bbc5781604051635be9608560e11b815260040161041d9190611c48565b610c6e600283604051610bcf9190611c2c565b90815260200160405180910390206002018054610beb90611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1790611bf2565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050611680565b600282604051610c7e9190611c2c565b90815260405190819003602001902080546001600160a01b03191681556000610caa6001830182611805565b610cb8600283016000611805565b506003810180546001600160a01b031916905560006004909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610d03908490611c48565b60405180910390a15060015b919050565b6000610d1e611603565b81600284604051610d2f9190611c2c565b9081526020016040518091039020600401541015610d8f5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b65640000604482015260640161041d565b6000600284604051610da19190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b0316632770a7eb60e21b17905251610e009190611c2c565b6000604051808303816000865af19150503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5050905080610e8c5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b82600285604051610e9d9190611c2c565b90815260200160405180910390206004016000828254610ebd9190611c93565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee999061057a9086908690611c5b565b610f386040518060a0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b600282604051610f489190611c2c565b90815260408051918290036020908101832060a0840190925281546001600160a01b0316835260018201805491840191610f8190611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fad90611bf2565b8015610ffa5780601f10610fcf57610100808354040283529160200191610ffa565b820191906000526020600020905b815481529060010190602001808311610fdd57829003601f168201915b5050505050815260200160028201805461101390611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461103f90611bf2565b801561108c5780601f106110615761010080835404028352916020019161108c565b820191906000526020600020905b81548152906001019060200180831161106f57829003601f168201915b505050918352505060038201546001600160a01b0316602082015260049091015460409091015292915050565b60006110c3611603565b60006001600160a01b03166002846040516110de9190611c2c565b908152604051908190036020019020546001600160a01b031603611117578260405163c0bab25f60e01b815260040161041d9190611c48565b816002846040516111289190611c2c565b908152602001604051809103902060040154101561115d57828260405163076abcf360e51b815260040161041d929190611c5b565b600060028460405161116f9190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b179052516111ce9190611c2c565b6000604051808303816000865af19150503d806000811461120b576040519150601f19603f3d011682016040523d82523d6000602084013e611210565b606091505b505090508061123457836040516358300fe760e01b815260040161041d9190611c48565b60006002856040516112469190611c2c565b908152604051908190036020018120546001600160a01b0316903090600290611270908990611c2c565b908152604051908190036020018120600301546001600160a01b03169060029061129b908a90611c2c565b908152604051908190036020018120600401546001600160a01b039384166024830152919092166044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516113049190611c2c565b6000604051808303816000865af19150503d8060008114611341576040519150601f19603f3d011682016040523d82523d6000602084013e611346565b606091505b5050905080156113cb57836002866040516113619190611c2c565b908152602001604051809103902060040160008282546113819190611c93565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906113b89087908790611c5b565b60405180910390a1600192505050610588565b846040516358300fe760e01b815260040161041d9190611c48565b60006113f0611603565b60006001600160a01b031660028460405161140b9190611c2c565b908152604051908190036020019020546001600160a01b031603611444578260405163c0bab25f60e01b815260040161041d9190611c48565b60006002846040516114569190611c2c565b908152604051908190036020018120546001600160a01b03169060029061147e908790611c2c565b908152604051908190036020018120600301546001600160a01b031660248201523060448201526064810185905260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516114e49190611c2c565b6000604051808303816000865af19150503d8060008114611521576040519150601f19603f3d011682016040523d82523d6000602084013e611526565b606091505b5050905080156115aa57826002856040516115419190611c2c565b908152602001604051809103902060040160008282546115619190611e2c565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc9797906115989086908690611c5b565b60405180910390a16001915050610588565b8360405163412204b560e11b815260040161041d9190611c48565b6115cd611603565b6001600160a01b0381166115f757604051631e4fbdf760e01b81526000600482015260240161041d565b61160081611630565b50565b6000546001600160a01b0316331461087d5760405163118cdaa760e01b815233600482015260240161041d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117da5761173c600382815481106116a3576116a3611e3f565b9060005260206000200180546116b890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546116e490611bf2565b80156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505050836117de565b156117c8576003805461175190600190611c93565b8154811061176157611761611e3f565b906000526020600020016003828154811061177e5761177e611e3f565b9060005260206000200190816117949190611e55565b5060038054806117a6576117a6611f30565b6001900381819060005260206000200160006117c29190611805565b90555050565b806117d281611f46565b915050611683565b5050565b6000815183511480156117fe575081805190602001208380519060200120145b9392505050565b50805461181190611bf2565b6000825580601f10611821575050565b601f01602090049060005260206000209081019061160091905b8082111561184f576000815560010161183b565b5090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261187a57600080fd5b813567ffffffffffffffff8082111561189557611895611853565b604051601f8301601f19908116603f011681019082821181831017156118bd576118bd611853565b816040528381528660208588010111156118d657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561190857600080fd5b813567ffffffffffffffff81111561191f57600080fd5b61192b84828501611869565b949350505050565b60005b8381101561194e578181015183820152602001611936565b50506000910152565b6000815180845261196f816020860160208601611933565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526119a560a0840188611957565b83810360408501526119b78188611957565b9590911660608401525050608001529392505050565b600080604083850312156119e057600080fd5b823567ffffffffffffffff8111156119f757600080fd5b611a0385828601611869565b95602094909401359450505050565b80356001600160a01b0381168114610d0f57600080fd5b600080600060608486031215611a3e57600080fd5b833567ffffffffffffffff811115611a5557600080fd5b611a6186828701611869565b935050611a7060208501611a12565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ad557603f19888603018452611ac3858351611957565b94509285019290850190600101611aa7565b5092979650505050505050565b60008060008060808587031215611af857600080fd5b611b0185611a12565b9350602085013567ffffffffffffffff80821115611b1e57600080fd5b611b2a88838901611869565b94506040870135915080821115611b4057600080fd5b50611b4d87828801611869565b925050611b5c60608601611a12565b905092959194509250565b60208152600060018060a01b03808451166020840152602084015160a06040850152611b9660c0850182611957565b90506040850151601f19858303016060860152611bb38282611957565b915050816060860151166080850152608085015160a0850152809250505092915050565b600060208284031215611be957600080fd5b6117fe82611a12565b600181811c90821680611c0657607f821691505b602082108103611c2657634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611c3e818460208701611933565b9190910192915050565b6020815260006117fe6020830184611957565b604081526000611c6e6040830185611957565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058857610588611c7d565b606081526000611cb96060830186611957565b6001600160a01b039490941660208301525060400152919050565b601f821115611d1e57600081815260208120601f850160051c81016020861015611cfb5750805b601f850160051c820191505b81811015611d1a57828155600101611d07565b5050505b505050565b815167ffffffffffffffff811115611d3d57611d3d611853565b611d5181611d4b8454611bf2565b84611cd4565b602080601f831160018114611d865760008415611d6e5750858301515b600019600386901b1c1916600185901b178555611d1a565b600085815260208120601f198616915b82811015611db557888601518255948401946001909101908401611d96565b5085821015611dd35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b03808716835260806020840152611e056080840187611957565b8381036040850152611e178187611957565b92505080841660608401525095945050505050565b8082018082111561058857610588611c7d565b634e487b7160e01b600052603260045260246000fd5b818103611e60575050565b611e6a8254611bf2565b67ffffffffffffffff811115611e8257611e82611853565b611e9081611d4b8454611bf2565b6000601f821160018114611ec45760008315611eac5750848201545b600019600385901b1c1916600184901b178455611f29565b600085815260209020601f19841690600086815260209020845b83811015611efe5782860154825560019586019590910190602001611ede565b5085831015611f1c5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b600060018201611f5857611f58611c7d565b506001019056fea2646970667358221220225cb2753a2630cfbc6258111a8866e031dff580edaff7495e38d9172ce6ee3164736f6c63430008140033","sourceMap":"689:5698:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;792:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4259:525;;;;;;:::i;:::-;;:::i;:::-;;;2948:14:8;;2941:22;2923:41;;2911:2;2896:18;4259:525:6;2783:187:8;886:29:6;;;;;-1:-1:-1;;;;;886:29:6;;;;;;-1:-1:-1;;;;;3139:32:8;;;3121:51;;3109:2;3094:18;886:29:6;2975:203:8;5285:579:6;;;;;;:::i;:::-;;:::i;5882:94::-;;;:::i;:::-;;;;;;;:::i;2293:101:0:-;;;:::i;:::-;;1498:753:6;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2257:431:6;;;;;;:::i;:::-;;:::i;4790:489::-;;;;;;:::i;:::-;;:::i;755:26::-;;;;;;;;;5481:25:8;;;5469:2;5454:18;755:26:6;5335:177:8;6264:121:6;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3285:967::-;;;;;;:::i;:::-;;:::i;2694:584::-;;;;;;:::i;:::-;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;792:40:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;792:40:6;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;792:40:6;;;;;;;;;;;-1:-1:-1;;;;;792:40:6;;;-1:-1:-1;792:40:6;:::o;4259:525::-;4340:12;1531:13:0;:11;:13::i;:::-;4410:1:6::1;-1:-1:-1::0;;;;;4367:45:6::1;:6;4374:7;4367:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4367:31:6::1;:45:::0;4364:107:::1;;4452:7;4434:26;;-1:-1:-1::0;;;4434:26:6::1;;;;;;;;:::i;:::-;;;;;;;;4364:107;4482:16;4504:6;4511:7;4504:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;4598:4:::1;4541:71;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;4504:31:6::1;::::0;7556:18:8;;4541:71:6::1;::::0;;-1:-1:-1;;4541:71:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;4541:71:6::1;-1:-1:-1::0;;;4541:71:6::1;::::0;;4504:109;::::1;::::0;4541:71;4504:109:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4481:132;;;4640:11;4632:46;;;::::0;-1:-1:-1;;;4632:46:6;;8182:2:8;4632:46:6::1;::::0;::::1;8164:21:8::0;8221:2;8201:18;;;8194:30;-1:-1:-1;;;8240:18:8;;;8233:52;8302:18;;4632:46:6::1;7980:346:8::0;4632:46:6::1;4714:6;4689;4696:7;4689:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4735:21;4740:7;4749:6;4735:21;;;;;;;:::i;:::-;;;;;;;;4773:4;4766:11;;;1554:1:0;4259:525:6::0;;;;:::o;5285:579::-;5394:12;1531:13:0;:11;:13::i;:::-;5452:6:6::1;5426;5433:7;5426:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5418:77;;;::::0;-1:-1:-1;;;5418:77:6;;8829:2:8;5418:77:6::1;::::0;::::1;8811:21:8::0;;;8848:18;;;8841:30;8907:34;8887:18;;;8880:62;8959:18;;5418:77:6::1;8627:356:8::0;5418:77:6::1;5507:18;5531:6;5538:7;5531:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;5635:4:::1;5568:99;::::0;::::1;9228:34:8::0;-1:-1:-1;;;;;9298:15:8;;;9278:18;;;9271:43;9330:18;;;9323:34;;;5531:31:6::1;::::0;9163:18:8;;5568:99:6::1;::::0;;-1:-1:-1;;5568:99:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;5568:99:6::1;-1:-1:-1::0;;;5568:99:6::1;::::0;;5531:137;::::1;::::0;5568:99;5531:137:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5506:162;;;5686:13;5678:50;;;::::0;-1:-1:-1;;;5678:50:6;;9570:2:8;5678:50:6::1;::::0;::::1;9552:21:8::0;9609:2;9589:18;;;9582:30;9648:26;9628:18;;;9621:54;9692:18;;5678:50:6::1;9368:348:8::0;5678:50:6::1;5765:6;5739;5746:7;5739:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5795:41:6::1;::::0;::::1;::::0;::::1;::::0;5802:7;;5811:16;;5829:6;;5795:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5853:4:6::1;::::0;5285:579;-1:-1:-1;;;;5285:579:6:o;5882:94::-;5932:15;5966:3;5959:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5882:94;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;1498:753:6:-;1628:16;1531:13:0;:11;:13::i;:::-;1702:1:6::1;-1:-1:-1::0;;;;;1659:45:6::1;:6;1666:7;1659:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;1659:31:6::1;:45;1656:110;;1747:7;1727:28;;-1:-1:-1::0;;;1727:28:6::1;;;;;;;;:::i;1656:110::-;1885:11;::::0;1827:85:::1;::::0;::::1;::::0;::::1;10553:25:8::0;;;;1906:4:6::1;10594:18:8::0;;;10587:60;1781:19:6::1;::::0;-1:-1:-1;;;;;1806:20:6;::::1;::::0;10526:18:8;;1827:85:6::1;::::0;;-1:-1:-1;;1827:85:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;1827:85:6::1;-1:-1:-1::0;;;1827:85:6::1;::::0;;1806:107;::::1;::::0;1827:85;1806:107:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1780:133;;;1932:14;1928:111;;1996:6;2003:7;1996:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;1969:59:6;;-1:-1:-1;;;;;1996:31:6::1;1969:59;::::0;::::1;3121:51:8::0;3094:18;;1969:59:6::1;2975:203:8::0;1928:111:6::1;2067:52;;;;;;;;2073:15;-1:-1:-1::0;;;;;2067:52:6::1;;;;;2090:9;2067:52;;;;2101:7;2067:52;;;;2110:5;-1:-1:-1::0;;;;;2067:52:6::1;;;;;2117:1;2067:52;;::::0;2049:6:::1;2056:7;2049:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;::::1;::::0;;;;;;;;:70;;;;-1:-1:-1;;;;;;2049:70:6::1;-1:-1:-1::0;;;;;2049:70:6;;::::1;;::::0;;;;::::1;::::0;-1:-1:-1;2049:70:6;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2049:70:6::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2049:70:6::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;2049:70:6::1;-1:-1:-1::0;;;;;2049:70:6;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2134:17;;-1:-1:-1;2134:17:6;::::1;::::0;;-1:-1:-1;2134:17:6;;;;;::::1;;2143:7:::0;2134:17;::::1;:::i;:::-;;2175:48;2180:15;2197:9;2208:7;2217:5;2175:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2240:4:6::1;::::0;1498:753;-1:-1:-1;;;;;1498:753:6:o;2257:431::-;2324:12;1531:13:0;:11;:13::i;:::-;2394:1:6::1;-1:-1:-1::0;;;;;2351:45:6::1;:6;2358:7;2351:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2351:31:6::1;:45:::0;2348:108:::1;;2437:7;2419:26;;-1:-1:-1::0;;;2419:26:6::1;;;;;;;;:::i;2348:108::-;2493:1;2468:6;2475:7;2468:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;2465:83;;;2529:7;2517:20;;-1:-1:-1::0;;;2517:20:6::1;;;;;;;;:::i;2465:83::-;2557:40;2573:6;2580:7;2573:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;2557:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;2614:6;2621:7;2614:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;2607:22;;-1:-1:-1;;;;;;2607:22:6::1;::::0;;2614:15:::1;2607:22;::::0;;::::1;2614:15:::0;2607:22:::1;:::i;:::-;;;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;2607:22:6::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2607:22:6::1;::::0;;::::1;;::::0;;::::1;::::0;2645:15:::1;::::0;::::1;::::0;::::1;::::0;2652:7;;2645:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;2677:4:6::1;1554:1:0;2257:431:6::0;;;:::o;4790:489::-;4871:12;1531:13:0;:11;:13::i;:::-;4929:6:6::1;4903;4910:7;4903:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4895:75;;;::::0;-1:-1:-1;;;4895:75:6;;13652:2:8;4895:75:6::1;::::0;::::1;13634:21:8::0;13691:2;13671:18;;;13664:30;13730:32;13710:18;;;13703:60;13780:18;;4895:75:6::1;13450:354:8::0;4895:75:6::1;4982:16;5004:6;5011:7;5004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;5099:4:::1;5041:72;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;5004:31:6::1;::::0;7556:18:8;;5041:72:6::1;::::0;;-1:-1:-1;;5041:72:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;5041:72:6::1;-1:-1:-1::0;;;5041:72:6::1;::::0;;5004:110;::::1;::::0;5041:72;5004:110:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:133;;;5133:11;5125:46;;;::::0;-1:-1:-1;;;5125:46:6;;14011:2:8;5125:46:6::1;::::0;::::1;13993:21:8::0;14050:2;14030:18;;;14023:30;-1:-1:-1;;;14069:18:8;;;14062:52;14131:18;;5125:46:6::1;13809:346:8::0;5125:46:6::1;5208:6;5182;5189:7;5182:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5230:21:6::1;::::0;::::1;::::0;::::1;::::0;5235:7;;5244:6;;5230:21:::1;:::i;6264:121::-:0;6326:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6326:18:6;6363:6;6370:7;6363:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;6356:22;;;;;;;;-1:-1:-1;;;;;6356:22:6;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6356:22:6;;;-1:-1:-1;;6356:22:6;;;;-1:-1:-1;;;;;6356:22:6;;;;;;;;;;;;;;;;6264:121;-1:-1:-1;;6264:121:6:o;3285:967::-;3368:12;1531:13:0;:11;:13::i;:::-;3448:1:6::1;-1:-1:-1::0;;;;;3405:45:6::1;:6;3412:7;3405:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3405:31:6::1;:45:::0;3402:107:::1;;3490:7;3472:26;;-1:-1:-1::0;;;3472:26:6::1;;;;;;;;:::i;3402:107::-;3547:6;3522;3529:7;3522:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;3519:108;;;3600:7;3609:6;3576:40;;-1:-1:-1::0;;;3576:40:6::1;;;;;;;;;:::i;3519:108::-;3638:17;3660:6;3667:7;3660:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;3757:4:::1;3697:74;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;3660:31:6::1;::::0;7556:18:8;;3697:74:6::1;::::0;;-1:-1:-1;;3697:74:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3697:74:6::1;-1:-1:-1::0;;;3697:74:6::1;::::0;;3660:112;::::1;::::0;3697:74;3660:112:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3637:135;;;3786:12;3782:75;;3838:7;3821:25;;-1:-1:-1::0;;;3821:25:6::1;;;;;;;;:::i;3782:75::-;3868:18;3891:6;3898:7;3891:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3891:31:6::1;::::0;3997:4:::1;::::0;4004:6:::1;::::0;:15:::1;::::0;4011:7;;4004:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:21:::1;;::::0;-1:-1:-1;;;;;4004:21:6::1;::::0;4027:6:::1;::::0;:15:::1;::::0;4034:7;;4027:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:22:::1;;::::0;-1:-1:-1;;;;;9246:15:8;;;3928:122:6::1;::::0;::::1;9228:34:8::0;9298:15;;;;9278:18;;;9271:43;9330:18;;;9323:34;9163:18;;3928:122:6::1;::::0;;-1:-1:-1;;3928:122:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3928:122:6::1;-1:-1:-1::0;;;3928:122:6::1;::::0;;3891:160;::::1;::::0;3928:122;3891:160:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3867:184;;;4064:13;4061:142;;;4119:6;4093;4100:7;4093:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4144:23:6::1;::::0;::::1;::::0;::::1;::::0;4151:7;;4160:6;;4144:23:::1;:::i;:::-;;;;;;;;4188:4;4181:11;;;;;;4061:142;4237:7;4220:25;;-1:-1:-1::0;;;4220:25:6::1;;;;;;;;:::i;2694:584::-:0;2775:12;1531:13:0;:11;:13::i;:::-;2845:1:6::1;-1:-1:-1::0;;;;;2802:45:6::1;:6;2809:7;2802:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2802:31:6::1;:45:::0;2799:107:::1;;2887:7;2869:26;;-1:-1:-1::0;;;2869:26:6::1;;;;;;;;:::i;2799:107::-;2917:16;2938:6;2945:7;2938:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2938:31:6::1;::::0;3036:6:::1;::::0;:15:::1;::::0;3043:7;;3036:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:21:::1;;::::0;-1:-1:-1;;;;;3036:21:6::1;2975:106;::::0;::::1;9228:34:8::0;3067:4:6::1;9278:18:8::0;;;9271:43;9330:18;;;9323:34;;;9163:18;;2975:106:6::1;::::0;;-1:-1:-1;;2975:106:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2975:106:6::1;-1:-1:-1::0;;;2975:106:6::1;::::0;;2938:144;::::1;::::0;2975:106;2938:144:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2916:166;;;3096:11;3093:138;;;3149:6;3123;3130:7;3123:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3174:21:6::1;::::0;::::1;::::0;::::1;::::0;3179:7;;3188:6;;3174:21:::1;:::i;:::-;;;;;;;;3216:4;3209:11;;;;;3093:138;3263:7;3248:23;;-1:-1:-1::0;;;3248:23:6::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3121:51:8::0;3094:18;;2672:31:0::1;2975:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3121:51:8;3094:18;;1901:40:0;2975:203:8;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5982:276:6:-;6050:9;6045:207;6069:3;:10;6065:14;;6045:207;;;6104:25;6118:3;6122:1;6118:6;;;;;;;;:::i;:::-;;;;;;;;6104:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6126:2;6104:13;:25::i;:::-;6100:142;;;6158:3;6162:10;;:14;;6175:1;;6162:14;:::i;:::-;6158:19;;;;;;;;:::i;:::-;;;;;;;;6149:3;6153:1;6149:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6195:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;6045:207;5982:276;:::o;6100:142::-;6081:3;;;;:::i;:::-;;;;6045:207;;;;5982:276;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;;3086:1;3070:19;;;;;;3063:1;3047:19;;;;;;:42;3009:80;3002:87;2914:182;-1:-1:-1;;;2914:182:2:o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:719;189:5;242:3;235:4;227:6;223:17;219:27;209:55;;260:1;257;250:12;209:55;296:6;283:20;322:18;359:2;355;352:10;349:36;;;365:18;;:::i;:::-;440:2;434:9;408:2;494:13;;-1:-1:-1;;490:22:8;;;514:2;486:31;482:40;470:53;;;538:18;;;558:22;;;535:46;532:72;;;584:18;;:::i;:::-;624:10;620:2;613:22;659:2;651:6;644:18;705:3;698:4;693:2;685:6;681:15;677:26;674:35;671:55;;;722:1;719;712:12;671:55;786:2;779:4;771:6;767:17;760:4;752:6;748:17;735:54;833:1;826:4;821:2;813:6;809:15;805:26;798:37;853:6;844:15;;;;;;146:719;;;;:::o;870:322::-;939:6;992:2;980:9;971:7;967:23;963:32;960:52;;;1008:1;1005;998:12;960:52;1048:9;1035:23;1081:18;1073:6;1070:30;1067:50;;;1113:1;1110;1103:12;1067:50;1136;1178:7;1169:6;1158:9;1154:22;1136:50;:::i;:::-;1126:60;870:322;-1:-1:-1;;;;870:322:8:o;1197:250::-;1282:1;1292:113;1306:6;1303:1;1300:13;1292:113;;;1382:11;;;1376:18;1363:11;;;1356:39;1328:2;1321:10;1292:113;;;-1:-1:-1;;1439:1:8;1421:16;;1414:27;1197:250::o;1452:271::-;1494:3;1532:5;1526:12;1559:6;1554:3;1547:19;1575:76;1644:6;1637:4;1632:3;1628:14;1621:4;1614:5;1610:16;1575:76;:::i;:::-;1705:2;1684:15;-1:-1:-1;;1680:29:8;1671:39;;;;1712:4;1667:50;;1452:271;-1:-1:-1;;1452:271:8:o;1728:655::-;1972:4;2018:1;2014;2009:3;2005:11;2001:19;2059:2;2051:6;2047:15;2036:9;2029:34;2099:3;2094:2;2083:9;2079:18;2072:31;2126:46;2167:3;2156:9;2152:19;2144:6;2126:46;:::i;:::-;2220:9;2212:6;2208:22;2203:2;2192:9;2188:18;2181:50;2248:33;2274:6;2266;2248:33;:::i;:::-;2317:15;;;;2312:2;2297:18;;2290:43;-1:-1:-1;;2364:3:8;2349:19;2342:35;2240:41;1728:655;-1:-1:-1;;;1728:655:8:o;2388:390::-;2466:6;2474;2527:2;2515:9;2506:7;2502:23;2498:32;2495:52;;;2543:1;2540;2533:12;2495:52;2583:9;2570:23;2616:18;2608:6;2605:30;2602:50;;;2648:1;2645;2638:12;2602:50;2671;2713:7;2704:6;2693:9;2689:22;2671:50;:::i;:::-;2661:60;2768:2;2753:18;;;;2740:32;;-1:-1:-1;;;;2388:390:8:o;3183:173::-;3251:20;;-1:-1:-1;;;;;3300:31:8;;3290:42;;3280:70;;3346:1;3343;3336:12;3361:464;3448:6;3456;3464;3517:2;3505:9;3496:7;3492:23;3488:32;3485:52;;;3533:1;3530;3523:12;3485:52;3573:9;3560:23;3606:18;3598:6;3595:30;3592:50;;;3638:1;3635;3628:12;3592:50;3661;3703:7;3694:6;3683:9;3679:22;3661:50;:::i;:::-;3651:60;;;3730:38;3764:2;3753:9;3749:18;3730:38;:::i;:::-;3720:48;;3815:2;3804:9;3800:18;3787:32;3777:42;;3361:464;;;;;:::o;3830:803::-;3992:4;4021:2;4061;4050:9;4046:18;4091:2;4080:9;4073:21;4114:6;4149;4143:13;4180:6;4172;4165:22;4218:2;4207:9;4203:18;4196:25;;4280:2;4270:6;4267:1;4263:14;4252:9;4248:30;4244:39;4230:53;;4318:2;4310:6;4306:15;4339:1;4349:255;4363:6;4360:1;4357:13;4349:255;;;4456:2;4452:7;4440:9;4432:6;4428:22;4424:36;4419:3;4412:49;4484:40;4517:6;4508;4502:13;4484:40;:::i;:::-;4474:50;-1:-1:-1;4582:12:8;;;;4547:15;;;;4385:1;4378:9;4349:255;;;-1:-1:-1;4621:6:8;;3830:803;-1:-1:-1;;;;;;;3830:803:8:o;4638:692::-;4744:6;4752;4760;4768;4821:3;4809:9;4800:7;4796:23;4792:33;4789:53;;;4838:1;4835;4828:12;4789:53;4861:29;4880:9;4861:29;:::i;:::-;4851:39;;4941:2;4930:9;4926:18;4913:32;4964:18;5005:2;4997:6;4994:14;4991:34;;;5021:1;5018;5011:12;4991:34;5044:50;5086:7;5077:6;5066:9;5062:22;5044:50;:::i;:::-;5034:60;;5147:2;5136:9;5132:18;5119:32;5103:48;;5176:2;5166:8;5163:16;5160:36;;;5192:1;5189;5182:12;5160:36;;5215:52;5259:7;5248:8;5237:9;5233:24;5215:52;:::i;:::-;5205:62;;;5286:38;5320:2;5309:9;5305:18;5286:38;:::i;:::-;5276:48;;4638:692;;;;;;;:::o;5517:792::-;5692:2;5681:9;5674:21;5655:4;5731:1;5727;5722:3;5718:11;5714:19;5788:2;5779:6;5773:13;5769:22;5764:2;5753:9;5749:18;5742:50;5839:2;5831:6;5827:15;5821:22;5879:4;5874:2;5863:9;5859:18;5852:32;5907:52;5954:3;5943:9;5939:19;5925:12;5907:52;:::i;:::-;5893:66;;6008:2;6000:6;5996:15;5990:22;6080:2;6076:7;6064:9;6056:6;6052:22;6048:36;6043:2;6032:9;6028:18;6021:64;6108:41;6142:6;6126:14;6108:41;:::i;:::-;6094:55;;;6214:2;6208;6200:6;6196:15;6190:22;6186:31;6180:3;6169:9;6165:19;6158:60;6274:3;6266:6;6262:16;6256:23;6249:4;6238:9;6234:20;6227:53;6297:6;6289:14;;;;5517:792;;;;:::o;6314:186::-;6373:6;6426:2;6414:9;6405:7;6401:23;6397:32;6394:52;;;6442:1;6439;6432:12;6394:52;6465:29;6484:9;6465:29;:::i;6505:380::-;6584:1;6580:12;;;;6627;;;6648:61;;6702:4;6694:6;6690:17;6680:27;;6648:61;6755:2;6747:6;6744:14;6724:18;6721:38;6718:161;;6801:10;6796:3;6792:20;6789:1;6782:31;6836:4;6833:1;6826:15;6864:4;6861:1;6854:15;6718:161;;6505:380;;;:::o;6890:289::-;7021:3;7059:6;7053:13;7075:66;7134:6;7129:3;7122:4;7114:6;7110:17;7075:66;:::i;:::-;7157:16;;;;;6890:289;-1:-1:-1;;6890:289:8:o;7184:220::-;7333:2;7322:9;7315:21;7296:4;7353:45;7394:2;7383:9;7379:18;7371:6;7353:45;:::i;8331:291::-;8508:2;8497:9;8490:21;8471:4;8528:45;8569:2;8558:9;8554:18;8546:6;8528:45;:::i;:::-;8520:53;;8609:6;8604:2;8593:9;8589:18;8582:34;8331:291;;;;;:::o;9721:127::-;9782:10;9777:3;9773:20;9770:1;9763:31;9813:4;9810:1;9803:15;9837:4;9834:1;9827:15;9853:128;9920:9;;;9941:11;;;9938:37;;;9955:18;;:::i;9986:388::-;10191:2;10180:9;10173:21;10154:4;10211:45;10252:2;10241:9;10237:18;10229:6;10211:45;:::i;:::-;-1:-1:-1;;;;;10292:32:8;;;;10287:2;10272:18;;10265:60;-1:-1:-1;10356:2:8;10341:18;10334:34;10203:53;9986:388;-1:-1:-1;9986:388:8:o;10784:545::-;10886:2;10881:3;10878:11;10875:448;;;10922:1;10947:5;10943:2;10936:17;10992:4;10988:2;10978:19;11062:2;11050:10;11046:19;11043:1;11039:27;11033:4;11029:38;11098:4;11086:10;11083:20;11080:47;;;-1:-1:-1;11121:4:8;11080:47;11176:2;11171:3;11167:12;11164:1;11160:20;11154:4;11150:31;11140:41;;11231:82;11249:2;11242:5;11239:13;11231:82;;;11294:17;;;11275:1;11264:13;11231:82;;;11235:3;;;10875:448;10784:545;;;:::o;11505:1352::-;11631:3;11625:10;11658:18;11650:6;11647:30;11644:56;;;11680:18;;:::i;:::-;11709:97;11799:6;11759:38;11791:4;11785:11;11759:38;:::i;:::-;11753:4;11709:97;:::i;:::-;11861:4;;11925:2;11914:14;;11942:1;11937:663;;;;12644:1;12661:6;12658:89;;;-1:-1:-1;12713:19:8;;;12707:26;12658:89;-1:-1:-1;;11462:1:8;11458:11;;;11454:24;11450:29;11440:40;11486:1;11482:11;;;11437:57;12760:81;;11907:944;;11937:663;10731:1;10724:14;;;10768:4;10755:18;;-1:-1:-1;;11973:20:8;;;12091:236;12105:7;12102:1;12099:14;12091:236;;;12194:19;;;12188:26;12173:42;;12286:27;;;;12254:1;12242:14;;;;12121:19;;12091:236;;;12095:3;12355:6;12346:7;12343:19;12340:201;;;12416:19;;;12410:26;-1:-1:-1;;12499:1:8;12495:14;;;12511:3;12491:24;12487:37;12483:42;12468:58;12453:74;;12340:201;-1:-1:-1;;;;;12587:1:8;12571:14;;;12567:22;12554:36;;-1:-1:-1;11505:1352:8:o;12862:583::-;13078:4;13124:1;13120;13115:3;13111:11;13107:19;13165:2;13157:6;13153:15;13142:9;13135:34;13205:3;13200:2;13189:9;13185:18;13178:31;13232:46;13273:3;13262:9;13258:19;13250:6;13232:46;:::i;:::-;13326:9;13318:6;13314:22;13309:2;13298:9;13294:18;13287:50;13354:33;13380:6;13372;13354:33;:::i;:::-;13346:41;;;13435:2;13427:6;13423:15;13418:2;13407:9;13403:18;13396:43;;12862:583;;;;;;;:::o;14160:125::-;14225:9;;;14246:10;;;14243:36;;;14259:18;;:::i;14290:127::-;14351:10;14346:3;14342:20;14339:1;14332:31;14382:4;14379:1;14372:15;14406:4;14403:1;14396:15;14422:1435;14541:3;14535:4;14532:13;14529:26;;14548:5;;14422:1435::o;14529:26::-;14578:37;14610:3;14604:10;14578:37;:::i;:::-;14638:18;14630:6;14627:30;14624:56;;;14660:18;;:::i;:::-;14689:97;14779:6;14739:38;14771:4;14765:11;14739:38;:::i;14689:97::-;14812:1;14840:2;14832:6;14829:14;14857:1;14852:748;;;;15644:1;15661:6;15658:89;;;-1:-1:-1;15713:19:8;;;15707:26;15658:89;-1:-1:-1;;11462:1:8;11458:11;;;11454:24;11450:29;11440:40;11486:1;11482:11;;;11437:57;15760:81;;14822:1029;;14852:748;10731:1;10724:14;;;10768:4;10755:18;;-1:-1:-1;;14888:20:8;;;10731:1;10724:14;;;10768:4;10755:18;;15052:9;15074:251;15088:7;15085:1;15082:14;15074:251;;;15170:21;;;15164:28;15149:44;;15220:1;15293:18;;;;15248:15;;;;15111:4;15104:12;15074:251;;;15078:3;15353:6;15344:7;15341:19;15338:203;;;15414:21;;;15408:28;-1:-1:-1;;15499:1:8;15495:14;;;15511:3;15491:24;15487:37;15483:42;15468:58;15453:74;;15338:203;;;;15587:1;15578:6;15575:1;15571:14;15567:22;15561:4;15554:36;14822:1029;;;;14422:1435;;:::o;15862:127::-;15923:10;15918:3;15914:20;15911:1;15904:31;15954:4;15951:1;15944:15;15978:4;15975:1;15968:15;15994:135;16033:3;16054:17;;;16051:43;;16074:18;;:::i;:::-;-1:-1:-1;16121:1:8;16110:13;;15994:135::o","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,string,string,address)":"8d7d180b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"role_given\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper-without-json.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper-without-json.sol\":{\"keccak256\":\"0x8da1f5da60631c7fd64cc6c7114f18c8e409d7b38038a81e4cd802afac4232be\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://9472f7dad3a205e7dcefe74107f36a9a75e384ef83963c6e7342910b1b5f8b57\",\"dweb:/ipfs/QmfZU5Yhcujs8tWkwbEs7UV8gLLUXz6CnG8frF2yeNAH2L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"},{"internalType":"bytes32","name":"role_given","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"string","name":"tokenType","type":"string","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper-without-json.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper-without-json.sol":{"keccak256":"0x8da1f5da60631c7fd64cc6c7114f18c8e409d7b38038a81e4cd802afac4232be","urls":["bzz-raw://9472f7dad3a205e7dcefe74107f36a9a75e384ef83963c6e7342910b1b5f8b57","dweb:/ipfs/QmfZU5Yhcujs8tWkwbEs7UV8gLLUXz6CnG8frF2yeNAH2L"],"license":"GPL-3.0"}},"version":1},"id":6} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json new file mode 100644 index 0000000000..250c49c927 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"tokensInteractions","inputs":[{"name":"","type":"string","internalType":"string"},{"name":"","type":"uint8","internalType":"enum InteractionType"}],"outputs":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"available","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"interactions","type":"tuple[]","internalType":"struct InteractionSignature[]","components":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"functionsSignature","type":"string[]","internalType":"string[]"},{"name":"variables","type":"uint8[][]","internalType":"enum VarType[][]"},{"name":"available","type":"bool","internalType":"bool"}]}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"uint8","indexed":false,"internalType":"enum TokenType"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b5060405162002c7738038062002c778339810160408190526200003491620000e6565b806001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f8162000096565b50600480546001600160a01b0319166001600160a01b039290921691909117905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f957600080fd5b81516001600160a01b03811681146200011157600080fd5b9392505050565b612b4f80620001286000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220d2d5a88633237cc5040d057e26c565ffe5bb3210798fece3ead31992c778084364736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;1703:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1749:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:8;428:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1776:14:7::1;:41:::0;;-1:-1:-1;;;;;;1776:41:7::1;-1:-1:-1::0;;;;;1776:41:7;;;::::1;::::0;;;::::1;::::0;;1008:8352;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:290:8:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:8;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:8:o;309:203::-;1008:8352:7;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220d2d5a88633237cc5040d057e26c565ffe5bb3210798fece3ead31992c778084364736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1074:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4469:419;;;;;;:::i;:::-;;:::i;:::-;;;3609:14:8;;3602:22;3584:41;;3572:2;3557:18;4469:419:7;3444:187:8;1269:29:7;;;;;-1:-1:-1;;;;;1269:29:7;;;;;;-1:-1:-1;;;;;3800:32:8;;;3782:51;;3770:2;3755:18;1269:29:7;3636:203:8;5281:461:7;;;;;;:::i;:::-;;:::i;5760:94::-;;;:::i;:::-;;;;;;;:::i;1830:816::-;;;;;;:::i;:::-;;:::i;2293:101:0:-;;;:::i;:::-;;2652:252:7;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2910:431:7;;;;;;:::i;:::-;;:::i;4894:381::-;;;;;;:::i;:::-;;:::i;6142:121::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3838:624::-;;;;;;:::i;:::-;;:::i;3347:484::-;;;;;;:::i;:::-;;:::i;1149:94::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:94:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;1074:40:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;;;1074:40:7;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1074:40:7;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;1074:40:7;:::o;4469:419::-;4550:12;1531:13:0;:11;:13::i;:::-;4620:1:7::1;-1:-1:-1::0;;;;;4577:45:7::1;:6;4584:7;4577:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4577:31:7::1;:45:::0;4574:107:::1;;4662:7;4644:26;;-1:-1:-1::0;;;4644:26:7::1;;;;;;;;:::i;:::-;;;;;;;;4574:107;4707:47;4716:7;4725:20;4747:6;4707:8;:47::i;:::-;4699:83;;;::::0;-1:-1:-1;;;4699:83:7;;15099:2:8;4699:83:7::1;::::0;::::1;15081:21:8::0;15138:2;15118:18;;;15111:30;-1:-1:-1;;;15157:18:8;;;15150:52;15219:18;;4699:83:7::1;14897:346:8::0;4699:83:7::1;4818:6;4793;4800:7;4793:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4839:21;4844:7;4853:6;4839:21;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;4877:4:7::1;1554:1:0;4469:419:7::0;;;;:::o;5281:461::-;5390:12;1531:13:0;:11;:13::i;:::-;5448:6:7::1;5422;5429:7;5422:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5414:77;;;::::0;-1:-1:-1;;;5414:77:7;;15746:2:8;5414:77:7::1;::::0;::::1;15728:21:8::0;;;15765:18;;;15758:30;15824:34;15804:18;;;15797:62;15876:18;;5414:77:7::1;15544:356:8::0;5414:77:7::1;5510:67;5519:7;5528:22;5552:6;5560:16;5510:8;:67::i;:::-;5502:104;;;::::0;-1:-1:-1;;;5502:104:7;;16107:2:8;5502:104:7::1;::::0;::::1;16089:21:8::0;16146:2;16126:18;;;16119:30;16185:26;16165:18;;;16158:54;16229:18;;5502:104:7::1;15905:348:8::0;5502:104:7::1;5643:6;5617;5624:7;5617:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5673:41:7::1;::::0;::::1;::::0;::::1;::::0;5680:7;;5689:16;;5707:6;;5673:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5731:4:7::1;5281:461:::0;;;;;:::o;5760:94::-;5810:15;5844:3;5837:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5760:94;:::o;1830:816::-;2001:16;1531:13:0;:11;:13::i;:::-;2075:1:7::1;-1:-1:-1::0;;;;;2032:45:7::1;:6;2039:7;2032:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2032:31:7::1;:45;2029:110;;2120:7;2100:28;;-1:-1:-1::0;;;2100:28:7::1;;;;;;;;:::i;2029:110::-;2149:53;2180:7;2189:12;2149:30;:53::i;:::-;2216:18;2235:7;2216:27;;;;;;:::i;:::-;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;2244:30:::1;2216:59;::::0;;;;;;;;:69:::1;::::0;::::1;;2213:221;;;2309:49;2318:7;2327:30;2309:8;:49::i;:::-;2301:122;;;::::0;-1:-1:-1;;;2301:122:7;;17118:2:8;2301:122:7::1;::::0;::::1;17100:21:8::0;17157:2;17137:18;;;17130:30;17196:34;17176:18;;;17169:62;17267:30;17247:18;;;17240:58;17315:19;;2301:122:7::1;16916:424:8::0;2301:122:7::1;2462:52;;;;;;;;2468:15;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2485:9;2462:52;;;;;;;;:::i;:::-;;;;;2496:7;2462:52;;;;2505:5;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2512:1;2462:52;;::::0;2444:6:::1;2451:7;2444:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;:70;;;;-1:-1:-1;;;;;2444:70:7;;::::1;-1:-1:-1::0;;;;;;2444:70:7;::::1;::::0;::::1;::::0;;;;::::1;::::0;:15;;;;-1:-1:-1;;;;;;2444:70:7;;-1:-1:-1;;;2444:70:7;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2444:70:7::1;-1:-1:-1::0;;;;;2444:70:7;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2529:17;;-1:-1:-1;2529:17:7;::::1;::::0;;-1:-1:-1;2529:17:7;;;;;::::1;;2538:7:::0;2529:17;::::1;:::i;:::-;;2570:48;2575:15;2592:9;2603:7;2612:5;2570:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2635:4:7::1;1830:816:::0;;;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2652:252:7:-;2778:16;1531:13:0;:11;:13::i;:::-;2813:4:7::1;:9;2823:15:::0;2840:9;2851:7;2860:5;2894:1:::1;2867:29;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2867:29:7::1;;;;;;;;;;;;;;;;;2813:84;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2806:91;;1554:1:0;2652:252:7::0;;;;;;:::o;2910:431::-;2977:12;1531:13:0;:11;:13::i;:::-;3047:1:7::1;-1:-1:-1::0;;;;;3004:45:7::1;:6;3011:7;3004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3004:31:7::1;:45:::0;3001:108:::1;;3090:7;3072:26;;-1:-1:-1::0;;;3072:26:7::1;;;;;;;;:::i;3001:108::-;3146:1;3121:6;3128:7;3121:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;3118:83;;;3182:7;3170:20;;-1:-1:-1::0;;;3170:20:7::1;;;;;;;;:::i;3118:83::-;3210:40;3226:6;3233:7;3226:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;3210:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;3267:6;3274:7;3267:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;3260:22;;-1:-1:-1;;;;;;3260:22:7;;;3267:15:::1;3260:22;::::0;;::::1;3267:15:::0;3260:22:::1;:::i;:::-;-1:-1:-1::0;3260:22:7::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;3260:22:7::1;::::0;;::::1;;::::0;;::::1;::::0;3298:15:::1;::::0;::::1;::::0;::::1;::::0;3305:7;;3298:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;3330:4:7::1;1554:1:0;2910:431:7::0;;;:::o;4894:381::-;4975:12;1531:13:0;:11;:13::i;:::-;5033:6:7::1;5007;5014:7;5007:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4999:75;;;::::0;-1:-1:-1;;;4999:75:7;;24155:2:8;4999:75:7::1;::::0;::::1;24137:21:8::0;24194:2;24174:18;;;24167:30;24233:32;24213:18;;;24206:60;24283:18;;4999:75:7::1;23953:354:8::0;4999:75:7::1;5093:47;5102:7;5111:20;5133:6;5093:8;:47::i;:::-;5085:82;;;::::0;-1:-1:-1;;;5085:82:7;;24514:2:8;5085:82:7::1;::::0;::::1;24496:21:8::0;24553:2;24533:18;;;24526:30;-1:-1:-1;;;24572:18:8;;;24565:52;24634:18;;5085:82:7::1;24312:346:8::0;5085:82:7::1;5204:6;5178;5185:7;5178:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5226:21:7::1;::::0;::::1;::::0;::::1;::::0;5231:7;;5240:6;;5226:21:::1;:::i;6142:121::-:0;6204:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6204:18:7;6241:6;6248:7;6241:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6234:22;;;;;;;;-1:-1:-1;;;;;6234:22:7;;;;6241:15;;6234:22;;;-1:-1:-1;;;6234:22:7;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6234:22:7;;;-1:-1:-1;;6234:22:7;;;;-1:-1:-1;;;;;6234:22:7;;;;;;;;;;;;;;;;6142:121;-1:-1:-1;;6142:121:7:o;3838:624::-;3921:12;1531:13:0;:11;:13::i;:::-;4001:1:7::1;-1:-1:-1::0;;;;;3958:45:7::1;:6;3965:7;3958:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3958:31:7::1;:45:::0;3955:107:::1;;4043:7;4025:26;;-1:-1:-1::0;;;4025:26:7::1;;;;;;;;:::i;3955:107::-;4100:6;4075;4082:7;4075:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;4072:108;;;4153:7;4162:6;4129:40;;-1:-1:-1::0;;;4129:40:7::1;;;;;;;;;:::i;4072:108::-;4190:18;4211:49;4220:7;4229:22;4253:6;4211:8;:49::i;:::-;4190:70;;4274:13;4271:142;;;4329:6;4303;4310:7;4303:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4354:23:7::1;::::0;::::1;::::0;::::1;::::0;4361:7;;4370:6;;4354:23:::1;:::i;:::-;;;;;;;;4398:4;4391:11;;;;;4271:142;4447:7;4430:25;;-1:-1:-1::0;;;4430:25:7::1;;;;;;;;:::i;3347:484::-:0;3428:12;1531:13:0;:11;:13::i;:::-;3498:1:7::1;-1:-1:-1::0;;;;;3455:45:7::1;:6;3462:7;3455:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3455:31:7::1;:45:::0;3452:107:::1;;3540:7;3522:26;;-1:-1:-1::0;;;3522:26:7::1;;;;;;;;:::i;3452:107::-;3569:16;3588:47;3597:7;3606:20;3628:6;3588:8;:47::i;:::-;3569:66;;3649:11;3646:138;;;3702:6;3676;3683:7;3676:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3727:21:7::1;::::0;::::1;::::0;::::1;::::0;3732:7;;3741:6;;3727:21:::1;:::i;3646:138::-;3816:7;3801:23;;-1:-1:-1::0;;;3801:23:7::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3782:51:8::0;3755:18;;2672:31:0::1;3636:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3782:51:8;3755:18;;1901:40:0;3636:203:8;6742:200:7;6850:12;6881:54;6890:7;6899:15;6916:6;6932:1;6948:888;7074:4;7095:18;7114:7;7095:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7123:15;7095:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7095:44:7;:54;;;;;7090:98;;-1:-1:-1;7172:5:7;7165:12;;7090:98;7203:6;7198:598;7219:18;7238:7;7219:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7247:15;7219:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7219:44:7;:63;;:70;7215:74;;7198:598;;;7310:23;7370:18;7389:7;7370:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7398:15;7370:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:63;;7434:1;7370:66;;;;;;;;:::i;:::-;;;;;;;;7353:84;;;;;;;;:::i;:::-;;;;;;;;;;;;;7343:95;;;;;;7310:129;;7454:26;7483:137;7503:16;7521:98;7534:18;7553:7;7534:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7562:15;7534:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:54;;7589:1;7534:57;;;;;;;;:::i;:::-;;;;;;;;7521:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7593:7;7602:8;7612:6;7521:12;:98::i;:::-;7483:19;:137::i;:::-;7454:166;;7636:16;7658:6;7665:7;7658:15;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;7658:31:7;;:51;;7695:13;;7658:51;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7635:74;;;7728:11;7723:63;;7766:5;7759:12;;;;;;;;7723:63;7296:500;;;7291:3;;;;;:::i;:::-;;;;7198:598;;;-1:-1:-1;7821:4:7;;6948:888;-1:-1:-1;;;;;6948:888:7:o;6269:281::-;6399:6;6395:149;6415:12;:19;6411:1;:23;6395:149;;;6518:12;6531:1;6518:15;;;;;;;;:::i;:::-;;;;;;;6455:18;6474:7;6455:27;;;;;;:::i;:::-;;;;;;;;;;;;;:60;6483:12;6496:1;6483:15;;;;;;;;:::i;:::-;;;;;;;:31;;;6455:60;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;6455:60:7;:78;;;;:60;;-1:-1:-1;;6455:78:7;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;-1:-1:-1;;6455:78:7;;;;;;;;;;6436:3;;;;:::i;:::-;;;;6395:149;;;;6269:281;;:::o;6556:180::-;6649:12;6680:49;6689:7;6698:15;6715:1;6726;6680:8;:49::i;:::-;6673:56;6556:180;-1:-1:-1;;;6556:180:7:o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5860:276:7:-;5928:9;5923:207;5947:3;:10;5943:14;;5923:207;;;5982:25;5996:3;6000:1;5996:6;;;;;;;;:::i;:::-;;;;;;;;5982:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6004:2;5982:13;:25::i;:::-;5978:142;;;6036:3;6040:10;;:14;;6053:1;;6040:14;:::i;:::-;6036:19;;;;;;;;:::i;:::-;;;;;;;;6027:3;6031:1;6027:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6073:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;5923:207;5860:276;:::o;5978:142::-;5959:3;;;;:::i;:::-;;;;5923:207;;;;5860:276;:::o;8230:1128::-;8361:14;8386:28;8429:9;:16;-1:-1:-1;;;;;8417:29:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8386:60;;8461:6;8456:866;8477:9;:16;8473:1;:20;8456:866;;;8534:14;8518:9;8528:1;8518:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8514:798;;8587:25;;;8606:4;8587:25;;;3782:51:8;3755:18;8587:25:7;;;;;;;;;;;;;8568:13;8582:1;8568:16;;;;;;;;:::i;:::-;;;;;;:44;;;;8514:798;;;8653:15;8637:9;8647:1;8637:12;;;;;;;;:::i;:::-;;;;;;;:31;;;;;;;;:::i;:::-;;8633:679;;8718:7;8707:19;;;;;;;;:::i;8633:679::-;8767:14;8751:9;8761:1;8751:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8747:565;;8820:18;;;;;;27922:25:8;;;27895:18;8820::7;27776:177:8;8747:565:7;8879:13;8863:9;8873:1;8863:12;;;;;;;;:::i;:::-;;;;;;;:29;;;;;;;;:::i;:::-;;8859:453;;8942:6;8949:7;8942:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:21;;;-1:-1:-1;;;;;8942:21:7;8931:33;;;3782:51:8;3755:18;8931:33:7;3636:203:8;8859:453:7;9005:23;8989:9;8999:1;8989:12;;;;;;;;:::i;:::-;;;;;;;:39;;;;;;;;:::i;:::-;;8985:327;;9078:6;9085:7;9078:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;9078:31:7;9067:43;;;3782:51:8;3755:18;9067:43:7;3636:203:8;8985:327:7;9151:16;9135:9;9145:1;9135:12;;;;;;;;:::i;:::-;;;;;;;:32;;;;;;;;:::i;:::-;;9131:181;;9206:20;;;-1:-1:-1;;;;;3800:32:8;;9206:20:7;;;3782:51:8;3755:18;9206:20:7;3636:203:8;9131:181:7;9265:32;;-1:-1:-1;;;9265:32:7;;28160:2:8;9265:32:7;;;28142:21:8;28199:2;28179:18;;;28172:30;-1:-1:-1;;;28218:18:8;;;28211:52;28280:18;;9265:32:7;27958:346:8;9131:181:7;8495:3;;;;:::i;:::-;;;;8456:866;;;-1:-1:-1;9338:13:7;8230:1128;-1:-1:-1;;;;;8230:1128:7:o;7842:382::-;8003:34;;;-1:-1:-1;;;;;;28448:33:8;;8003:34:7;;;28436:46:8;8003:34:7;;;;;;;;;28498:11:8;;;;8003:34:7;;;8052:9;8047:141;8071:13;:20;8067:1;:24;8047:141;;;8145:13;8160;8174:1;8160:16;;;;;;;;:::i;:::-;;;;;;;8128:49;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8112:65;;8093:3;;;;;:::i;:::-;;;;8047:141;;;;7842:382;;;;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;-1:-1:-1;;3070:19:2;;;;;;;3047;;;;;;;;;;:42;;2914:182::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;218:2;212:9;260:3;248:16;;-1:-1:-1;;;;;279:34:8;;315:22;;;276:62;273:88;;;341:18;;:::i;:::-;377:2;370:22;146:252;:::o;403:275::-;474:2;468:9;539:2;520:13;;-1:-1:-1;;516:27:8;504:40;;-1:-1:-1;;;;;559:34:8;;595:22;;;556:62;553:88;;;621:18;;:::i;:::-;657:2;650:22;403:275;;-1:-1:-1;403:275:8:o;683:531::-;726:5;779:3;772:4;764:6;760:17;756:27;746:55;;797:1;794;787:12;746:55;833:6;820:20;-1:-1:-1;;;;;855:2:8;852:26;849:52;;;881:18;;:::i;:::-;925:55;968:2;949:13;;-1:-1:-1;;945:27:8;974:4;941:38;925:55;:::i;:::-;1005:2;996:7;989:19;1051:3;1044:4;1039:2;1031:6;1027:15;1023:26;1020:35;1017:55;;;1068:1;1065;1058:12;1017:55;1133:2;1126:4;1118:6;1114:17;1107:4;1098:7;1094:18;1081:55;1181:1;1156:16;;;1174:4;1152:27;1145:38;;;;1160:7;683:531;-1:-1:-1;;;683:531:8:o;1219:322::-;1288:6;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;-1:-1:-1;;;;;1422:6:8;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485;1527:7;1518:6;1507:9;1503:22;1485:50;:::i;1546:127::-;1607:10;1602:3;1598:20;1595:1;1588:31;1638:4;1635:1;1628:15;1662:4;1659:1;1652:15;1678:140;1759:1;1752:5;1749:12;1739:46;;1765:18;;:::i;:::-;1794;;1678:140::o;1823:250::-;1908:1;1918:113;1932:6;1929:1;1926:13;1918:113;;;2008:11;;;2002:18;1989:11;;;1982:39;1954:2;1947:10;1918:113;;;-1:-1:-1;;2065:1:8;2047:16;;2040:27;1823:250::o;2078:271::-;2120:3;2158:5;2152:12;2185:6;2180:3;2173:19;2201:76;2270:6;2263:4;2258:3;2254:14;2247:4;2240:5;2236:16;2201:76;:::i;:::-;2331:2;2310:15;-1:-1:-1;;2306:29:8;2297:39;;;;2338:4;2293:50;;2078:271;-1:-1:-1;;2078:271:8:o;2354:594::-;-1:-1:-1;;;;;2665:15:8;;;2647:34;;2590:4;;2690:53;2739:2;2724:18;;2716:6;2690:53;:::i;:::-;2779:3;2774:2;2763:9;2759:18;2752:31;2800:46;2841:3;2830:9;2826:19;2818:6;2800:46;:::i;:::-;2882:15;;2877:2;2862:18;;2855:43;-1:-1:-1;2929:3:8;2914:19;2907:35;2792:54;2354:594;-1:-1:-1;;;2354:594:8:o;2953:390::-;3031:6;3039;3092:2;3080:9;3071:7;3067:23;3063:32;3060:52;;;3108:1;3105;3098:12;3060:52;3148:9;3135:23;-1:-1:-1;;;;;3173:6:8;3170:30;3167:50;;;3213:1;3210;3203:12;3167:50;3236;3278:7;3269:6;3258:9;3254:22;3236:50;:::i;:::-;3226:60;3333:2;3318:18;;;;3305:32;;-1:-1:-1;;;;2953:390:8:o;3844:173::-;3912:20;;-1:-1:-1;;;;;3961:31:8;;3951:42;;3941:70;;4007:1;4004;3997:12;4022:464;4109:6;4117;4125;4178:2;4166:9;4157:7;4153:23;4149:32;4146:52;;;4194:1;4191;4184:12;4146:52;4234:9;4221:23;-1:-1:-1;;;;;4259:6:8;4256:30;4253:50;;;4299:1;4296;4289:12;4253:50;4322;4364:7;4355:6;4344:9;4340:22;4322:50;:::i;:::-;4312:60;;;4391:38;4425:2;4414:9;4410:18;4391:38;:::i;:::-;4381:48;;4476:2;4465:9;4461:18;4448:32;4438:42;;4022:464;;;;;:::o;4491:803::-;4653:4;4682:2;4722;4711:9;4707:18;4752:2;4741:9;4734:21;4775:6;4810;4804:13;4841:6;4833;4826:22;4879:2;4868:9;4864:18;4857:25;;4941:2;4931:6;4928:1;4924:14;4913:9;4909:30;4905:39;4891:53;;4979:2;4971:6;4967:15;5000:1;5010:255;5024:6;5021:1;5018:13;5010:255;;;5117:2;5113:7;5101:9;5093:6;5089:22;5085:36;5080:3;5073:49;5145:40;5178:6;5169;5163:13;5145:40;:::i;:::-;5135:50;-1:-1:-1;5243:12:8;;;;5208:15;;;;5046:1;5039:9;5010:255;;;-1:-1:-1;5282:6:8;;4491:803;-1:-1:-1;;;;;;;4491:803:8:o;5299:150::-;5374:20;;5423:1;5413:12;;5403:40;;5439:1;5436;5429:12;5454:203;5534:4;-1:-1:-1;;;;;5559:6:8;5556:30;5553:56;;;5589:18;;:::i;:::-;-1:-1:-1;5634:1:8;5630:14;5646:4;5626:25;;5454:203::o;5662:156::-;5743:20;;5792:1;5782:12;;5772:40;;5808:1;5805;5798:12;5823:1931;5892:5;5945:3;5938:4;5930:6;5926:17;5922:27;5912:55;;5963:1;5960;5953:12;5912:55;5999:6;5986:20;6025:4;6049:80;6065:63;6125:2;6065:63;:::i;:::-;6049:80;:::i;:::-;6163:15;;;6225:1;6265:11;;;6253:24;;6249:33;;;6194:12;;;;6151:3;6294:15;;;6291:35;;;6322:1;6319;6312:12;6291:35;6358:2;6350:6;6346:15;6370:1355;6386:6;6381:3;6378:15;6370:1355;;;6472:3;6459:17;-1:-1:-1;;;;;6495:11:8;6492:35;6489:125;;;6568:1;6597:2;6593;6586:14;6489:125;6637:24;;6696:2;6688:11;;6684:21;-1:-1:-1;6674:119:8;;6747:1;6776:2;6772;6765:14;6674:119;6837:2;6833;6829:11;6816:25;6864:2;6892:80;6908:63;6968:2;6908:63;:::i;6892:80::-;7016:17;;;7110:11;;;7102:20;;7098:29;;;7055:14;;;;7143:17;;;7140:107;;;7201:1;7230:2;7226;7219:14;7140:107;7273:11;;;;7297:355;7315:8;7308:5;7305:19;7297:355;;;7409:5;7396:19;7383:32;;7452:1;7445:5;7442:12;7432:129;;7505:1;7539:3;7534;7527:16;7432:129;7578:20;;;7336:14;;;;7624;;;;7297:355;;;7665:18;;-1:-1:-1;;;7703:12:8;;;;-1:-1:-1;6403:12:8;;6370:1355;;;-1:-1:-1;7743:5:8;;5823:1931;-1:-1:-1;;;;;;;5823:1931:8:o;7759:118::-;7845:5;7838:13;7831:21;7824:5;7821:32;7811:60;;7867:1;7864;7857:12;7882:128;7947:20;;7976:28;7947:20;7976:28;:::i;8015:3590::-;8197:6;8205;8213;8221;8229;8282:3;8270:9;8261:7;8257:23;8253:33;8250:53;;;8299:1;8296;8289:12;8250:53;8322:29;8341:9;8322:29;:::i;:::-;8312:39;;8370:45;8411:2;8400:9;8396:18;8370:45;:::i;:::-;8360:55;;-1:-1:-1;;;;;8458:2:8;8447:9;8443:18;8430:32;8427:56;8424:76;;;8496:1;8493;8486:12;8424:76;8519;8587:7;8580:2;8569:9;8565:18;8552:32;8541:9;8537:48;8519:76;:::i;:::-;8509:86;;8614:38;8648:2;8637:9;8633:18;8614:38;:::i;:::-;8604:48;;-1:-1:-1;;;;;8695:3:8;8684:9;8680:19;8667:33;8664:57;8661:77;;;8734:1;8731;8724:12;8661:77;8823:7;8816:4;8808:3;8797:9;8793:19;8780:33;8769:9;8765:49;8761:60;8757:74;8747:102;;8845:1;8842;8835:12;8747:102;8869:141;8885:124;9001:3;8990:9;8986:19;8973:33;8962:9;8958:49;8945:63;8885:124;:::i;8869:141::-;9112:3;9097:19;;9084:33;9069:49;;9056:63;;9044:76;;;9145:2;9136:12;;;;9032:3;9226:1;9222:71;;;;9167:127;;;9163:136;9160:149;-1:-1:-1;9157:169:8;;;9322:1;9319;9312:12;9157:169;9401:2;9393:3;9382:9;9378:19;9365:33;9354:9;9350:49;9346:58;9413:2162;9559:3;9544:19;;9531:33;9516:49;;9503:63;;9500:1;9496:71;9441:127;9570:2;9437:136;9429:145;;9413:2162;;;-1:-1:-1;;;;;9648:3:8;9635:17;9632:41;9629:61;;;9686:1;9683;9676:12;9629:61;9781:3;9768:17;9760:3;9749:9;9745:19;9732:33;9721:9;9717:49;9713:73;9838:3;9832:2;9828:7;9823:2;9814:7;9810:16;9806:30;9802:40;9799:60;;;9855:1;9852;9845:12;9799:60;9885:22;;:::i;:::-;9934:44;9974:2;9970;9966:11;9934:44;:::i;:::-;9927:5;9920:59;-1:-1:-1;;;;;10019:2:8;10015;10011:11;9998:25;9995:49;9992:69;;;10057:1;10054;10047:12;9992:69;10133:7;10128:2;10121;10117;10113:11;10100:25;10096:2;10092:34;10088:43;10084:57;10074:85;;10155:1;10152;10145:12;10074:85;10185:135;10201:118;10314:2;10307;10303;10299:11;10286:25;10282:2;10278:34;10274:43;10261:57;10201:118;:::i;10185:135::-;10431:2;10424;10416:11;;;10403:25;10395:34;;10391:43;;;10378:57;10364:72;;;10458:14;;;;10364:72;10539:1;10535:65;10495:106;10491:115;-1:-1:-1;;10485:148:8;;;10629:1;10626;10619:12;10485:148;10699:2;10692;10688;10684:11;10671:25;10667:2;10663:34;10659:43;10715:463;10857:2;10834:11;;;10821:25;10813:34;;10849:2;10809:43;;10796:57;10793:1;10789:65;10749:106;10745:115;10735:126;;10715:463;;;-1:-1:-1;;;;;10951:5:8;10938:19;10935:43;10932:63;;;10991:1;10988;10981:12;10932:63;11026:97;11115:7;11110:2;11101:5;11088:19;11081:2;11077;11073:11;11060:25;11056:2;11052:34;11048:60;11044:69;11026:97;:::i;:::-;11012:112;;11161:2;11150:14;;;;10885;10715:463;;;-1:-1:-1;11209:2:8;11198:14;;11191:29;-1:-1:-1;;;;;;11260:2:8;11252:11;;11239:25;11236:49;11233:69;;;11298:1;11295;11288:12;11233:69;11338:97;11427:7;11422:2;11415;11411;11407:11;11394:25;11390:2;11386:34;11382:43;11338:97;:::i;:::-;11333:2;11326:5;11322:14;11315:121;11472:29;11496:3;11492:2;11488:12;11472:29;:::i;:::-;11467:2;11456:14;;11449:53;11515:18;;-1:-1:-1;11562:2:8;11553:12;;;;9592;9413:2162;;;9417:3;11594:5;11584:15;;;;8015:3590;;;;;;;;:::o;11610:566::-;11720:6;11728;11736;11744;11797:3;11785:9;11776:7;11772:23;11768:33;11765:53;;;11814:1;11811;11804:12;11765:53;11837:29;11856:9;11837:29;:::i;:::-;11827:39;;11885:45;11926:2;11915:9;11911:18;11885:45;:::i;:::-;11875:55;;11981:2;11970:9;11966:18;11953:32;-1:-1:-1;;;;;12000:6:8;11997:30;11994:50;;;12040:1;12037;12030:12;11994:50;12063;12105:7;12096:6;12085:9;12081:22;12063:50;:::i;:::-;12053:60;;;12132:38;12166:2;12155:9;12151:18;12132:38;:::i;:::-;12122:48;;11610:566;;;;;;;:::o;12181:725::-;12356:2;12345:9;12338:21;12319:4;12395:1;12391;12386:3;12382:11;12378:19;12452:2;12443:6;12437:13;12433:22;12428:2;12417:9;12413:18;12406:50;12503:2;12495:6;12491:15;12485:22;12516:59;12571:2;12560:9;12556:18;12542:12;12516:59;:::i;:::-;;12624:2;12616:6;12612:15;12606:22;12664:4;12659:2;12648:9;12644:18;12637:32;12692:54;12741:3;12730:9;12726:19;12710:14;12692:54;:::i;:::-;12678:68;;12811:2;12805;12797:6;12793:15;12787:22;12783:31;12777:3;12766:9;12762:19;12755:60;12871:3;12863:6;12859:16;12853:23;12846:4;12835:9;12831:20;12824:53;12894:6;12886:14;;;;12181:725;;;;:::o;12911:429::-;13009:6;13017;13070:2;13058:9;13049:7;13045:23;13041:32;13038:52;;;13086:1;13083;13076:12;13038:52;13126:9;13113:23;-1:-1:-1;;;;;13151:6:8;13148:30;13145:50;;;13191:1;13188;13181:12;13145:50;13214;13256:7;13247:6;13236:9;13232:22;13214:50;:::i;:::-;13204:60;;;13283:51;13330:2;13319:9;13315:18;13283:51;:::i;:::-;13273:61;;12911:429;;;;;:::o;13345:146::-;13432:1;13425:5;13422:12;13412:46;;13438:18;;:::i;13496:301::-;13670:2;13655:18;;13682:50;13659:9;13714:6;13682:50;:::i;:::-;13782:6;13775:14;13768:22;13763:2;13752:9;13748:18;13741:50;13496:301;;;;;:::o;13802:186::-;13861:6;13914:2;13902:9;13893:7;13889:23;13885:32;13882:52;;;13930:1;13927;13920:12;13882:52;13953:29;13972:9;13953:29;:::i;13993:380::-;14072:1;14068:12;;;;14115;;;14136:61;;14190:4;14182:6;14178:17;14168:27;;14136:61;14243:2;14235:6;14232:14;14212:18;14209:38;14206:161;;14289:10;14284:3;14280:20;14277:1;14270:31;14324:4;14321:1;14314:15;14352:4;14349:1;14342:15;14206:161;;13993:380;;;:::o;14378:289::-;14509:3;14547:6;14541:13;14563:66;14622:6;14617:3;14610:4;14602:6;14598:17;14563:66;:::i;:::-;14645:16;;;;;14378:289;-1:-1:-1;;14378:289:8:o;14672:220::-;14821:2;14810:9;14803:21;14784:4;14841:45;14882:2;14871:9;14867:18;14859:6;14841:45;:::i;15248:291::-;15425:2;15414:9;15407:21;15388:4;15445:45;15486:2;15475:9;15471:18;15463:6;15445:45;:::i;:::-;15437:53;;15526:6;15521:2;15510:9;15506:18;15499:34;15248:291;;;;;:::o;16258:127::-;16319:10;16314:3;16310:20;16307:1;16300:31;16350:4;16347:1;16340:15;16374:4;16371:1;16364:15;16390:128;16457:9;;;16478:11;;;16475:37;;;16492:18;;:::i;16523:388::-;16728:2;16717:9;16710:21;16691:4;16748:45;16789:2;16778:9;16774:18;16766:6;16748:45;:::i;:::-;-1:-1:-1;;;;;16829:32:8;;;;16824:2;16809:18;;16802:60;-1:-1:-1;16893:2:8;16878:18;16871:34;16740:53;16523:388;-1:-1:-1;16523:388:8:o;17471:545::-;17573:2;17568:3;17565:11;17562:448;;;17609:1;17634:5;17630:2;17623:17;17679:4;17675:2;17665:19;17749:2;17737:10;17733:19;17730:1;17726:27;17720:4;17716:38;17785:4;17773:10;17770:20;17767:47;;;-1:-1:-1;17808:4:8;17767:47;17863:2;17858:3;17854:12;17851:1;17847:20;17841:4;17837:31;17827:41;;17918:82;17936:2;17929:5;17926:13;17918:82;;;17981:17;;;17962:1;17951:13;17918:82;;;17922:3;;;17471:545;;;:::o;18192:1352::-;18318:3;18312:10;-1:-1:-1;;;;;18337:6:8;18334:30;18331:56;;;18367:18;;:::i;:::-;18396:97;18486:6;18446:38;18478:4;18472:11;18446:38;:::i;:::-;18440:4;18396:97;:::i;:::-;18548:4;;18612:2;18601:14;;18629:1;18624:663;;;;19331:1;19348:6;19345:89;;;-1:-1:-1;19400:19:8;;;19394:26;19345:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;19447:81;;18594:944;;18624:663;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;18660:20:8;;;18778:236;18792:7;18789:1;18786:14;18778:236;;;18881:19;;;18875:26;18860:42;;18973:27;;;;18941:1;18929:14;;;;18808:19;;18778:236;;;18782:3;19042:6;19033:7;19030:19;19027:201;;;19103:19;;;19097:26;-1:-1:-1;;19186:1:8;19182:14;;;19198:3;19178:24;19174:37;19170:42;19155:58;19140:74;;19027:201;-1:-1:-1;;;;;19274:1:8;19258:14;;;19254:22;19241:36;;-1:-1:-1;18192:1352:8:o;19549:522::-;-1:-1:-1;;;;;19832:15:8;;;19814:34;;19757:4;;19857:53;19906:2;19891:18;;19883:6;19857:53;:::i;:::-;19946:3;19941:2;19930:9;19926:18;19919:31;19967:46;20008:3;19997:9;19993:19;19985:6;19967:46;:::i;:::-;19959:54;;20061:2;20053:6;20049:15;20044:2;20033:9;20029:18;20022:43;;19549:522;;;;;;;:::o;20076:1127::-;20144:3;20182:5;20176:12;20209:6;20204:3;20197:19;20235:4;20264:2;20259:3;20255:12;20248:19;;20289:3;20329:6;20326:1;20322:14;20317:3;20313:24;20371:2;20364:5;20360:14;20392:1;20413;20423:754;20439:6;20434:3;20431:15;20423:754;;;20504:16;;;20492:29;;20544:13;;20616:9;;20638:22;;;20724:11;;;;20682:13;;;;20759:1;20773:298;20789:8;20784:3;20781:17;20773:298;;;20868:8;20862:15;20911:1;20907:2;20904:9;20894:43;;20917:18;;:::i;:::-;20954:17;;21040;;;;20997:14;;;;20817:1;20808:11;20773:298;;;-1:-1:-1;;21155:12:8;;;;21092:5;-1:-1:-1;;21120:15:8;;;;20465:1;20456:11;20423:754;;;-1:-1:-1;21193:4:8;;20076:1127;-1:-1:-1;;;;;;;;20076:1127:8:o;21208:2490::-;-1:-1:-1;;;;;21667:15:8;;;21649:34;;21570:4;;21599:3;;21702:2;21713:53;21747:18;;;21739:6;21713:53;:::i;:::-;21785:2;21823;21818;21807:9;21803:18;21796:30;21849:45;21890:2;21879:9;21875:18;21867:6;21849:45;:::i;:::-;21913:2;21963;21955:6;21951:15;21946:2;21935:9;21931:18;21924:43;21986:3;21976:13;;22037:9;22029:6;22025:22;22020:2;22009:9;22005:18;21998:50;22068:6;22103;22097:13;22134:6;22126;22119:22;22169:2;22161:6;22157:15;22150:22;;22228:2;22218:6;22215:1;22211:14;22203:6;22199:27;22195:36;22266:2;22258:6;22254:15;22287:1;22297:1372;22311:6;22308:1;22305:13;22297:1372;;;22401:2;22397:7;22388:6;22380;22376:19;22372:33;22367:3;22360:46;22435:6;22429:13;22481:2;22473:6;22469:15;22497:50;22540:6;22535:2;22529:9;22497:50;:::i;:::-;22586:11;;;22580:18;22618:15;;;22611:27;;;22699:19;;22731:24;;;;22839:1;22835:16;;;22823:29;;22819:38;;;22886:21;;;;22777:15;;;;22931:1;22945:297;22961:8;22956:3;22953:17;22945:297;;;23067:3;23063:8;23054:6;23046;23042:19;23038:34;23031:5;23024:49;23100:42;23135:6;23124:8;23118:15;23100:42;:::i;:::-;23090:52;-1:-1:-1;23171:17:8;;;;23214:14;;;;22989:1;22980:11;22945:297;;;22949:3;;;;23291:2;23287;23283:11;23277:18;23344:6;23336;23332:19;23327:2;23319:6;23315:15;23308:44;23379:67;23439:6;23423:14;23379:67;:::i;:::-;23487:11;;;23481:18;3418:13;;3411:21;23544:15;;;3399:34;23481:18;23365:81;-1:-1:-1;23512:48:8;;-1:-1:-1;3348:91:8;23512:48;23647:12;;;;23583:6;-1:-1:-1;;23612:15:8;;;;22333:1;22326:9;22297:1372;;;22301:3;;23686:6;23678:14;;;;;;;;;;;21208:2490;;;;;;;;:::o;23703:245::-;23770:6;23823:2;23811:9;23802:7;23798:23;23794:32;23791:52;;;23839:1;23836;23829:12;23791:52;23871:9;23865:16;23890:28;23912:5;23890:28;:::i;24663:125::-;24728:9;;;24749:10;;;24746:36;;;24762:18;;:::i;24793:127::-;24854:10;24849:3;24845:20;24842:1;24835:31;24885:4;24882:1;24875:15;24909:4;24906:1;24899:15;24925:842;25053:3;25082:1;25115:6;25109:13;25145:36;25171:9;25145:36;:::i;:::-;25200:1;25217:18;;;25244:133;;;;25391:1;25386:356;;;;25210:532;;25244:133;-1:-1:-1;;25277:24:8;;25265:37;;25350:14;;25343:22;25331:35;;25322:45;;;-1:-1:-1;25244:133:8;;25386:356;25417:6;25414:1;25407:17;25447:4;25492:2;25489:1;25479:16;25517:1;25531:165;25545:6;25542:1;25539:13;25531:165;;;25623:14;;25610:11;;;25603:35;25666:16;;;;25560:10;;25531:165;;;25535:3;;;25725:6;25720:3;25716:16;25709:23;;25210:532;-1:-1:-1;25758:3:8;;24925:842;-1:-1:-1;;;;;;24925:842:8:o;26064:135::-;26103:3;26124:17;;;26121:43;;26144:18;;:::i;:::-;-1:-1:-1;26191:1:8;26180:13;;26064:135::o;26204:1435::-;26323:3;26317:4;26314:13;26311:26;;26330:5;;26204:1435::o;26311:26::-;26360:37;26392:3;26386:10;26360:37;:::i;:::-;-1:-1:-1;;;;;26412:6:8;26409:30;26406:56;;;26442:18;;:::i;:::-;26471:97;26561:6;26521:38;26553:4;26547:11;26521:38;:::i;26471:97::-;26594:1;26622:2;26614:6;26611:14;26639:1;26634:748;;;;27426:1;27443:6;27440:89;;;-1:-1:-1;27495:19:8;;;27489:26;27440:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;27542:81;;26604:1029;;26634:748;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;26670:20:8;;;17418:1;17411:14;;;17455:4;17442:18;;26834:9;26856:251;26870:7;26867:1;26864:14;26856:251;;;26952:21;;;26946:28;26931:44;;27002:1;27075:18;;;;27030:15;;;;26893:4;26886:12;26856:251;;;26860:3;27135:6;27126:7;27123:19;27120:203;;;27196:21;;;27190:28;-1:-1:-1;;27281:1:8;27277:14;;;27293:3;27273:24;27269:37;27265:42;27250:58;27235:74;;27120:203;;;;27369:1;27360:6;27357:1;27353:14;27349:22;27343:4;27336:36;26604:1029;;;;26204:1435;;:::o;27644:127::-;27705:10;27700:3;27696:20;27693:1;27686:31;27736:4;27733:1;27726:15;27760:4;27757:1;27750:15;28520:492;28695:3;28733:6;28727:13;28749:66;28808:6;28803:3;28796:4;28788:6;28784:17;28749:66;:::i;:::-;28878:13;;28837:16;;;;28900:70;28878:13;28837:16;28947:4;28935:17;;28900:70;:::i;:::-;28986:20;;28520:492;-1:-1:-1;;;;28520:492:8:o","linkReferences":{}},"methodIdentifiers":{"assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","tokensInteractions(string,uint8)":"ea8f547f","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,uint8,string,address)":"72d4c33b","wrap(address,uint8,string,address,(uint8,string[],uint8[][],bool)[])":"623662ad"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"enum InteractionType\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"tokensInteractions\",\"outputs\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"functionsSignature\",\"type\":\"string[]\"},{\"internalType\":\"enum VarType[][]\",\"name\":\"variables\",\"type\":\"uint8[][]\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"internalType\":\"struct InteractionSignature[]\",\"name\":\"interactions\",\"type\":\"tuple[]\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper.sol\":{\"keccak256\":\"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b\",\"dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"enum TokenType","name":"tokenType","type":"uint8","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"enum InteractionType","name":"","type":"uint8"}],"stateMutability":"view","type":"function","name":"tokensInteractions","outputs":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"bool","name":"available","type":"bool"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"struct InteractionSignature[]","name":"interactions","type":"tuple[]","components":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"string[]","name":"functionsSignature","type":"string[]"},{"internalType":"enum VarType[][]","name":"variables","type":"uint8[][]"},{"internalType":"bool","name":"available","type":"bool"}]}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper.sol":{"keccak256":"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29","urls":["bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b","dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC"],"license":"GPL-3.0"}},"version":1},"id":7} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json new file mode 100644 index 0000000000..513e66d200 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"DEFAULT_ADMIN_ROLE()":"a217fddf","getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ```solidity bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ```solidity function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} to enforce additional security measures for this role.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":\"AccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":"AccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json new file mode 100644 index 0000000000..bacc9c1124 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json @@ -0,0 +1 @@ +{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":6} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json new file mode 100644 index 0000000000..ee441896f8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC165} interface. Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check for the additional interface id that will be supported. For example: ```solidity function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); } ```\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":\"ERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":"ERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":8} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json new file mode 100644 index 0000000000..aa20313267 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"details\":\"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"constructor":{"details":"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":"ERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json new file mode 100644 index 0000000000..791f1bdfbe --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"External interface of AccessControl declared to support ERC165 detection.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":\"IAccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":"IAccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json new file mode 100644 index 0000000000..30a0fe04c9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":"IERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":9} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json new file mode 100644 index 0000000000..5384bded8f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":"IERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json new file mode 100644 index 0000000000..07229e1a56 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for the optional metadata functions from the ERC20 standard.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"decimals()\":{\"details\":\"Returns the decimals places of the token.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":\"IERC20Metadata\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"decimals()":{"details":"Returns the decimals places of the token."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":"IERC20Metadata"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"}},"version":1},"id":5} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json new file mode 100644 index 0000000000..a146e1a378 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"src/test/solidity/contracts/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/test/solidity/contracts/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":12} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json new file mode 100644 index 0000000000..53313e9845 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:10:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:10;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:10:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":10} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json new file mode 100644 index 0000000000..57693e62d9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json @@ -0,0 +1 @@ +{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:11:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:11;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:11:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":11} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json new file mode 100644 index 0000000000..47e06f9293 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:7:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:7;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:7:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":7} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json new file mode 100644 index 0000000000..042f29bd74 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json @@ -0,0 +1 @@ +{"id":"707a9b7be39daaaf674e343568be37c1","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json new file mode 100644 index 0000000000..480d9452fc --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json @@ -0,0 +1 @@ +{"id":"84d52643d45e1addd104736585542010","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json new file mode 100644 index 0000000000..53636f677f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"ERC1155InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidArrayLength","inputs":[{"name":"idsLength","type":"uint256","internalType":"uint256"},{"name":"valuesLength","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155MissingApprovalForAll","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\",\"errors\":{\"ERC1155InsufficientBalance(address,uint256,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC1155InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC1155InvalidArrayLength(uint256,uint256)\":[{\"details\":\"Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. Used in batch transfers.\",\"params\":{\"idsLength\":\"Length of the array of token identifiers\",\"valuesLength\":\"Length of the array of token amounts\"}}],\"ERC1155InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC1155InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC1155InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC1155MissingApprovalForAll(address,address)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"owner\":\"Address of the current owner of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC1155Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC1155InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC1155InvalidApprover"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"type":"error","name":"ERC1155InvalidArrayLength"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC1155InvalidOperator"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC1155InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC1155InvalidSender"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC1155MissingApprovalForAll"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC1155Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json new file mode 100644 index 0000000000..5694de72c9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC20Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC20Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json new file mode 100644 index 0000000000..df81b48cb5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"ERC721IncorrectOwner","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InsufficientApproval","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NonexistentToken","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\",\"errors\":{\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC721Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721IncorrectOwner"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721InsufficientApproval"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC721InvalidApprover"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC721InvalidOperator"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721InvalidOwner"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC721InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC721InvalidSender"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721NonexistentToken"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC721Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json new file mode 100644 index 0000000000..4f8edb48f5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"assign(address,address,uint256)":"5f52d44e","burn(address,uint256)":"9dc29fac","hasPermission(address)":"97128e00","mint(address,uint256)":"40c10f19","transfer(address,address,uint256)":"beabacc8"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/satp-contract-interface.sol\":\"SATPContractInterface\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"src/test/solidity/contracts/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/satp-contract-interface.sol":"SATPContractInterface"},"evmVersion":"paris","libraries":{}},"sources":{"src/test/solidity/contracts/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"}},"version":1},"id":13} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json new file mode 100644 index 0000000000..cc4e24965b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"constructor","inputs":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_id","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"OWNER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"checkBalance","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getId","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"giveRole","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"id","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]},{"type":"error","name":"noPermission","inputs":[{"name":"adr","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620014a4380380620014a48339810160408190526200003491620001d2565b6040518060400160405280600981526020016829a0aa282a37b5b2b760b91b815250604051806040016040528060048152602001630534154560e41b815250816004908162000084919062000357565b50600562000093828262000357565b505050620000c87fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e836200010d60201b60201c565b50620000f57f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f836200010d565b50600662000104828262000357565b50505062000423565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16620001b2576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001693390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001b6565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620001e657600080fd5b82516001600160a01b0381168114620001fe57600080fd5b602084810151919350906001600160401b03808211156200021e57600080fd5b818601915086601f8301126200023357600080fd5b815181811115620002485762000248620001bc565b604051601f8201601f19908116603f01168101908382118183101715620002735762000273620001bc565b8160405282815289868487010111156200028c57600080fd5b600093505b82841015620002b0578484018601518185018701529285019262000291565b60008684830101528096505050505050509250929050565b600181811c90821680620002dd57607f821691505b602082108103620002fe57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035257600081815260208120601f850160051c810160208610156200032d5750805b601f850160051c820191505b818110156200034e5782815560010162000339565b5050505b505050565b81516001600160401b03811115620003735762000373620001bc565b6200038b81620003848454620002c8565b8462000304565b602080601f831160018114620003c35760008415620003aa5750858301515b600019600386901b1c1916600185901b1785556200034e565b600085815260208120601f198616915b82811015620003f457888601518255948401946001909101908401620003d3565b5085821015620004135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61107180620004336000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa26469706673582212205c19eccd79b954f812cf3dba1e11836a0d878689eee985130dcc211dc0b7ac2064736f6c63430008140033","sourceMap":"341:2002:14:-:0;;;595:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1896:113:3;;;;;;;;;;;;;-1:-1:-1;;;1896:113:3;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:3;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:3;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;679:30:14::1;542:23;702:6;679:10;;;:30;;:::i;:::-;-1:-1:-1::0;719:31:14::1;475:24;743:6:::0;719:10:::1;:31::i;:::-;-1:-1:-1::0;761:2:14::1;:8;766:3:::0;761:2;:8:::1;:::i;:::-;;595:181:::0;;341:2002;;6179:316:0;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:6;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6272:217;6179:316;;;;:::o;14:127:15:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1209;235:6;243;296:2;284:9;275:7;271:23;267:32;264:52;;;312:1;309;302:12;264:52;338:16;;-1:-1:-1;;;;;383:31:15;;373:42;;363:70;;429:1;426;419:12;363:70;476:2;507:18;;;501:25;452:5;;-1:-1:-1;476:2:15;-1:-1:-1;;;;;575:14:15;;;572:34;;;602:1;599;592:12;572:34;640:6;629:9;625:22;615:32;;685:7;678:4;674:2;670:13;666:27;656:55;;707:1;704;697:12;656:55;736:2;730:9;758:2;754;751:10;748:36;;;764:18;;:::i;:::-;839:2;833:9;807:2;893:13;;-1:-1:-1;;889:22:15;;;913:2;885:31;881:40;869:53;;;937:18;;;957:22;;;934:46;931:72;;;983:18;;:::i;:::-;1023:10;1019:2;1012:22;1058:2;1050:6;1043:18;1098:7;1093:2;1088;1084;1080:11;1076:20;1073:33;1070:53;;;1119:1;1116;1109:12;1070:53;1141:1;1132:10;;1151:129;1165:2;1162:1;1159:9;1151:129;;;1253:10;;;1249:19;;1243:26;1222:14;;;1218:23;;1211:59;1176:10;;;;1151:129;;;1322:1;1317:2;1312;1304:6;1300:15;1296:24;1289:35;1343:6;1333:16;;;;;;;;146:1209;;;;;:::o;1360:380::-;1439:1;1435:12;;;;1482;;;1503:61;;1557:4;1549:6;1545:17;1535:27;;1503:61;1610:2;1602:6;1599:14;1579:18;1576:38;1573:161;;1656:10;1651:3;1647:20;1644:1;1637:31;1691:4;1688:1;1681:15;1719:4;1716:1;1709:15;1573:161;;1360:380;;;:::o;1871:545::-;1973:2;1968:3;1965:11;1962:448;;;2009:1;2034:5;2030:2;2023:17;2079:4;2075:2;2065:19;2149:2;2137:10;2133:19;2130:1;2126:27;2120:4;2116:38;2185:4;2173:10;2170:20;2167:47;;;-1:-1:-1;2208:4:15;2167:47;2263:2;2258:3;2254:12;2251:1;2247:20;2241:4;2237:31;2227:41;;2318:82;2336:2;2329:5;2326:13;2318:82;;;2381:17;;;2362:1;2351:13;2318:82;;;2322:3;;;1962:448;1871:545;;;:::o;2592:1352::-;2712:10;;-1:-1:-1;;;;;2734:30:15;;2731:56;;;2767:18;;:::i;:::-;2796:97;2886:6;2846:38;2878:4;2872:11;2846:38;:::i;:::-;2840:4;2796:97;:::i;:::-;2948:4;;3012:2;3001:14;;3029:1;3024:663;;;;3731:1;3748:6;3745:89;;;-1:-1:-1;3800:19:15;;;3794:26;3745:89;-1:-1:-1;;2549:1:15;2545:11;;;2541:24;2537:29;2527:40;2573:1;2569:11;;;2524:57;3847:81;;2994:944;;3024:663;1818:1;1811:14;;;1855:4;1842:18;;-1:-1:-1;;3060:20:15;;;3178:236;3192:7;3189:1;3186:14;3178:236;;;3281:19;;;3275:26;3260:42;;3373:27;;;;3341:1;3329:14;;;;3208:19;;3178:236;;;3182:3;3442:6;3433:7;3430:19;3427:201;;;3503:19;;;3497:26;-1:-1:-1;;3586:1:15;3582:14;;;3598:3;3578:24;3574:37;3570:42;3555:58;3540:74;;3427:201;-1:-1:-1;;;;;3674:1:15;3658:14;;;3654:22;3641:36;;-1:-1:-1;2592:1352:15:o;:::-;341:2002:14;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa26469706673582212205c19eccd79b954f812cf3dba1e11836a0d878689eee985130dcc211dc0b7ac2064736f6c63430008140033","sourceMap":"341:2002:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:0;;;;;;:::i;:::-;;:::i;:::-;;;470:14:15;;463:22;445:41;;433:2;418:18;2565:202:0;;;;;;;;2074:89:3;;;:::i;:::-;;;;;;;:::i;4293:186::-;;;;;;:::i;:::-;;:::i;3144:97::-;3222:12;;3144:97;;;1733:25:15;;;1721:2;1706:18;3144:97:3;1587:177:15;5039:244:3;;;;;;:::i;:::-;;:::i;3810:120:0:-;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;:::-;;3002:82:3;;;3075:2;2870:36:15;;2858:2;2843:18;3002:82:3;2728:184:15;5328:245:0;;;;;;:::i;:::-;;:::i;782:161:14:-;;;;;;:::i;:::-;;:::i;1588:174::-;;;:::i;:::-;;;;;;;:::i;1768:79::-;;;:::i;2228:113::-;;;;;;:::i;:::-;;:::i;1116:264::-;;;;;;:::i;:::-;;:::i;3299:116:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:3;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2854:136:0;;;;;;:::i;:::-;;:::i;2276:93:3:-;;;:::i;2017:205:14:-;;;;;;:::i;:::-;;:::i;949:161::-;;;;;;:::i;:::-;;:::i;2187:49:0:-;;2232:4;2187:49;;3610:178:3;;;;;;:::i;:::-;;:::i;572:16:14:-;;;:::i;437:62::-;;-1:-1:-1;;;;;;;;;;;437:62:14;;1386:196;;;;;;:::i;:::-;;:::i;1853:158::-;;;;;;:::i;:::-;;:::i;4642:138:0:-;;;;;;:::i;:::-;;:::i;3846:140:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:3;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;505:60:14;;542:23;505:60;;2565:202:0;2650:4;-1:-1:-1;;;;;;2673:47:0;;-1:-1:-1;;;2673:47:0;;:87;;-1:-1:-1;;;;;;;;;;861:40:8;;;2724:36:0;2666:94;2565:202;-1:-1:-1;;2565:202:0:o;2074:89:3:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:6;4420:31:3;735:10:6;4436:7:3;4445:5;4420:8;:31::i;:::-;-1:-1:-1;4468:4:3;;4293:186;-1:-1:-1;;;4293:186:3:o;5039:244::-;5126:4;735:10:6;5182:37:3;5198:4;735:10:6;5213:5:3;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:3;;5039:244;-1:-1:-1;;;;5039:244:3:o;4226:136:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;5328:245::-;-1:-1:-1;;;;;5421:34:0;;735:10:6;5421:34:0;5417:102;;5478:30;;-1:-1:-1;;;5478:30:0;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;782:161:14:-;869:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;893:22:14::1;899:7;908:6;893:5;:22::i;1588:174::-:0;1691:15;;;1704:1;1691:15;;;;;;;;;1638;;1665:23;;1691:15;;;;;;;;;;;;;;;;;;;;;1665:41;;1729:2;1716:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;1724:1;1716:10;;;;;;;;:::i;:::-;;;;;;;;;;:15;1748:7;1588:174;-1:-1:-1;1588:174:14:o;1768:79::-;1806:13;1838:2;1831:9;;;;;:::i;2228:113::-;-1:-1:-1;;;;;3390:18:3;;2290:7:14;3390:18:3;;;:9;:18;;;;;;2316::14;3299:116:3;1116:264:14;1221:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;-1:-1:-1;;;;;1253:20:14;::::1;735:10:6::0;1253:20:14::1;1245:63;;;::::0;-1:-1:-1;;;1245:63:14;;5032:2:15;1245:63:14::1;::::0;::::1;5014:21:15::0;5071:2;5051:18;;;5044:30;5110:32;5090:18;;;5083:60;5160:18;;1245:63:14::1;;;;;;;;2854:136:0::0;2931:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;;;;2854:136::o;2276:93:3:-;2323:13;2355:7;2348:14;;;;;:::i;2017:205:14:-;2080:12;2107:29;-1:-1:-1;;;;;;;;;;;2128:7:14;2107;:29::i;:::-;2104:69;;;-1:-1:-1;2158:4:14;;2017:205;-1:-1:-1;2017:205:14:o;2104:69::-;2194:21;;-1:-1:-1;;;2194:21:14;;-1:-1:-1;;;;;5353:32:15;;2194:21:14;;;5335:51:15;5308:18;;2194:21:14;5189:203:15;949:161:14;1036:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1060:22:14::1;1066:7;1075:6;1060:5;:22::i;3610:178:3:-:0;3679:4;735:10:6;3733:27:3;735:10:6;3750:2:3;3754:5;3733:9;:27::i;572:16:14:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1386:196::-;1493:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1517:37:14::1;1530:4;1536:9;1547:6;1517:12;:37::i;:::-;-1:-1:-1::0;1571:4:14::1;::::0;1386:196;-1:-1:-1;;;;;1386:196:14:o;1853:158::-;1927:12;542:23;2464:16:0;2475:4;2464:10;:16::i;:::-;1951:32:14::1;-1:-1:-1::0;;;;;;;;;;;1975:7:14::1;1951:10;:32::i;:::-;;2000:4;1993:11;;2490:1:0;1853:158:14::0;;;;:::o;4642:138:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;8989:128:3:-:0;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;10663:477::-;-1:-1:-1;;;;;3952:18:3;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:3;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:3;;-1:-1:-1;;;;;5617:32:15;;10936:60:3;;;5599:51:15;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;10936:60:3;5397:345:15;10881:130:3;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;5656:300::-;-1:-1:-1;;;;;5739:18:3;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:3;;5807:1;5780:30;;;5335:51:15;5308:18;;5780:30:3;5189:203:15;5735:86:3;-1:-1:-1;;;;;5834:16:3;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:3;;5902:1;5873:32;;;5335:51:15;5308:18;;5873:32:3;5189:203:15;5830:86:3;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;3199:103:0:-;3265:30;3276:4;735:10:6;3265::0;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;6277:22;6285:4;6291:7;6277;:22::i;:::-;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:6;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6466:12;;6730:317;6808:4;6828:22;6836:4;6842:7;6828;:22::i;:::-;6824:217;;;6898:5;6866:12;;;;;;;;;;;-1:-1:-1;;;;;6866:29:0;;;;;;;;;;:37;;-1:-1:-1;;6866:37:0;;;6922:40;735:10:6;;6866:12:0;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:0;6976:11;;7721:208:3;-1:-1:-1;;;;;7791:21:3;;7787:91;;7835:32;;-1:-1:-1;;;7835:32:3;;7864:1;7835:32;;;5335:51:15;5308:18;;7835:32:3;5189:203:15;7787:91:3;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;8247:206::-;-1:-1:-1;;;;;8317:21:3;;8313:89;;8361:30;;-1:-1:-1;;;8361:30:3;;8388:1;8361:30;;;5335:51:15;5308:18;;8361:30:3;5189:203:15;8313:89:3;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;9949:432::-;-1:-1:-1;;;;;10061:19:3;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:3;;10132:1;10103:32;;;5335:51:15;5308:18;;10103:32:3;5189:203:15;10057:89:3;-1:-1:-1;;;;;10159:21:3;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:3;;10231:1;10203:31;;;5335:51:15;5308:18;;10203:31:3;5189:203:15;10155:90:3;-1:-1:-1;;;;;10254:18:3;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:3;10342:5;-1:-1:-1;;;;;10333:31:3;;10358:5;10333:31;;;;1733:25:15;;1721:2;1706:18;;1587:177;10333:31:3;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:3;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:3;;-1:-1:-1;6356:540:3;;-1:-1:-1;;;;;6570:15:3;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:3;;-1:-1:-1;;;;;5617:32:15;;6649:50:3;;;5599:51:15;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;6649:50:3;5397:345:15;6599:115:3;-1:-1:-1;;;;;6834:15:3;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:3;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:3;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:3;7355:4;-1:-1:-1;;;;;7346:25:3;;7365:5;7346:25;;;;1733::15;;1721:2;1706:18;;1587:177;7346:25:3;;;;;;;;6271:1107;;;:::o;3432:197:0:-;3520:22;3528:4;3534:7;3520;:22::i;:::-;3515:108;;3565:47;;-1:-1:-1;;;3565:47:0;;-1:-1:-1;;;;;6166:32:15;;3565:47:0;;;6148:51:15;6215:18;;;6208:34;;;6121:18;;3565:47:0;5974:274:15;14:286;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:15;;209:43;;199:71;;266:1;263;256:12;199:71;289:5;14:286;-1:-1:-1;;;14:286:15:o;497:423::-;539:3;577:5;571:12;604:6;599:3;592:19;629:1;639:162;653:6;650:1;647:13;639:162;;;715:4;771:13;;;767:22;;761:29;743:11;;;739:20;;732:59;668:12;639:162;;;643:3;846:1;839:4;830:6;825:3;821:16;817:27;810:38;909:4;902:2;898:7;893:2;885:6;881:15;877:29;872:3;868:39;864:50;857:57;;;497:423;;;;:::o;925:220::-;1074:2;1063:9;1056:21;1037:4;1094:45;1135:2;1124:9;1120:18;1112:6;1094:45;:::i;1150:173::-;1218:20;;-1:-1:-1;;;;;1267:31:15;;1257:42;;1247:70;;1313:1;1310;1303:12;1247:70;1150:173;;;:::o;1328:254::-;1396:6;1404;1457:2;1445:9;1436:7;1432:23;1428:32;1425:52;;;1473:1;1470;1463:12;1425:52;1496:29;1515:9;1496:29;:::i;:::-;1486:39;1572:2;1557:18;;;;1544:32;;-1:-1:-1;;;1328:254:15:o;1769:328::-;1846:6;1854;1862;1915:2;1903:9;1894:7;1890:23;1886:32;1883:52;;;1931:1;1928;1921:12;1883:52;1954:29;1973:9;1954:29;:::i;:::-;1944:39;;2002:38;2036:2;2025:9;2021:18;2002:38;:::i;:::-;1992:48;;2087:2;2076:9;2072:18;2059:32;2049:42;;1769:328;;;;;:::o;2102:180::-;2161:6;2214:2;2202:9;2193:7;2189:23;2185:32;2182:52;;;2230:1;2227;2220:12;2182:52;-1:-1:-1;2253:23:15;;2102:180;-1:-1:-1;2102:180:15:o;2469:254::-;2537:6;2545;2598:2;2586:9;2577:7;2573:23;2569:32;2566:52;;;2614:1;2611;2604:12;2566:52;2650:9;2637:23;2627:33;;2679:38;2713:2;2702:9;2698:18;2679:38;:::i;:::-;2669:48;;2469:254;;;;;:::o;2917:803::-;3079:4;3108:2;3148;3137:9;3133:18;3178:2;3167:9;3160:21;3201:6;3236;3230:13;3267:6;3259;3252:22;3305:2;3294:9;3290:18;3283:25;;3367:2;3357:6;3354:1;3350:14;3339:9;3335:30;3331:39;3317:53;;3405:2;3397:6;3393:15;3426:1;3436:255;3450:6;3447:1;3444:13;3436:255;;;3543:2;3539:7;3527:9;3519:6;3515:22;3511:36;3506:3;3499:49;3571:40;3604:6;3595;3589:13;3571:40;:::i;:::-;3561:50;-1:-1:-1;3669:12:15;;;;3634:15;;;;3472:1;3465:9;3436:255;;;-1:-1:-1;3708:6:15;;2917:803;-1:-1:-1;;;;;;;2917:803:15:o;3725:186::-;3784:6;3837:2;3825:9;3816:7;3812:23;3808:32;3805:52;;;3853:1;3850;3843:12;3805:52;3876:29;3895:9;3876:29;:::i;3916:260::-;3984:6;3992;4045:2;4033:9;4024:7;4020:23;4016:32;4013:52;;;4061:1;4058;4051:12;4013:52;4084:29;4103:9;4084:29;:::i;:::-;4074:39;;4132:38;4166:2;4155:9;4151:18;4132:38;:::i;4181:380::-;4260:1;4256:12;;;;4303;;;4324:61;;4378:4;4370:6;4366:17;4356:27;;4324:61;4431:2;4423:6;4420:14;4400:18;4397:38;4394:161;;4477:10;4472:3;4468:20;4465:1;4458:31;4512:4;4509:1;4502:15;4540:4;4537:1;4530:15;4698:127;4759:10;4754:3;4750:20;4747:1;4740:31;4790:4;4787:1;4780:15;4814:4;4811:1;4804:15;5747:222;5812:9;;;5833:10;;;5830:133;;;5885:10;5880:3;5876:20;5873:1;5866:31;5920:4;5917:1;5910:15;5948:4;5945:1;5938:15","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","DEFAULT_ADMIN_ROLE()":"a217fddf","OWNER_ROLE()":"e58378bb","allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","assign(address,address,uint256)":"5f52d44e","balanceOf(address)":"70a08231","burn(address,uint256)":"9dc29fac","checkBalance(address)":"5f515226","decimals()":"313ce567","getAllAssetsIDs()":"5137b8a7","getId()":"5d1ca631","getRoleAdmin(bytes32)":"248a9ca3","giveRole(address)":"c375110d","grantRole(bytes32,address)":"2f2ff15d","hasPermission(address)":"97128e00","hasRole(bytes32,address)":"91d14854","id()":"af640d0f","mint(address,uint256)":"40c10f19","name()":"06fdde03","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,address,uint256)":"beabacc8","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_id\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adr\",\"type\":\"address\"}],\"name\":\"noPermission\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"checkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"giveRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"id\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/satp-erc20.sol\":\"SATPContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/test/solidity/contracts/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/test/solidity/contracts/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]},\"src/test/solidity/contracts/satp-erc20.sol\":{\"keccak256\":\"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac\",\"dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_id","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"type":"error","name":"noPermission"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"checkBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getId","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"giveRole","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"id","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"name()":{"details":"Returns the name of the token."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/satp-erc20.sol":"SATPContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/test/solidity/contracts/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/test/solidity/contracts/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"},"src/test/solidity/contracts/satp-erc20.sol":{"keccak256":"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989","urls":["bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac","dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8"],"license":"GPL-3.0"}},"version":1},"id":14} \ No newline at end of file From cd18042449cff29cc5e0edb0c1882bbc33e0abd2 Mon Sep 17 00:00:00 2001 From: Carlos Amaro <64661289+LordKubaya@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:46:55 +0100 Subject: [PATCH 22/49] fix(satp-hermes): run sequencial instead of paralel (#3445) Signed-off-by: Carlos Amaro --- .../cactus-plugin-satp-hermes/package.json | 8 ++-- yarn.lock | 48 ++++++++++--------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index fd9c257bf4..08d4d6ae0d 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -54,7 +54,7 @@ "codegen:openapi": "npm run generate-sdk", "codegen:proto": "npm run generate-proto", "forge": "forge build ./src/solidity/*.sol --out ./src/solidity/generated", - "forge:all": "run-p 'forge' 'forge:test'", + "forge:all": "run-s 'forge' 'forge:test'", "forge:test": "forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated", "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", "generate-sdk": "run-p 'generate-sdk:*'", @@ -90,11 +90,14 @@ "@bufbuild/protobuf": "1.10.0", "@hyperledger/cactus-plugin-bungee-hermes": "2.0.0", "axios": "1.7.7", + "bignumber.js": "9.1.2", + "bn.js": "5.2.1", "body-parser": "1.20.2", "class-transformer": "0.5.1", "class-validator": "0.14.1", "crypto-js": "4.2.0", - "ethers": "^6.13.1", + "ethereum-abi-types-generator": "1.3.4", + "ethers": "6.13.1", "express": "4.17.2", "fabric-network": "2.2.19", "fs-extra": "11.2.0", @@ -127,7 +130,6 @@ "@types/tape": "4.13.4", "@types/uuid": "10.0.0", "body-parser": "1.20.3", - "ethereum-abi-types-generator": "1.3.4", "express": "4.21.0", "fabric-network": "2.2.20", "kubo-rpc-client": "3.0.1", diff --git a/yarn.lock b/yarn.lock index e18b07a1f4..bb1b2c0ccd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10896,12 +10896,14 @@ __metadata: "@types/tape": "npm:4.13.4" "@types/uuid": "npm:10.0.0" axios: "npm:1.7.7" + bignumber.js: "npm:9.1.2" + bn.js: "npm:5.2.1" body-parser: "npm:1.20.3" class-transformer: "npm:0.5.1" class-validator: "npm:0.14.1" crypto-js: "npm:4.2.0" ethereum-abi-types-generator: "npm:1.3.4" - ethers: "npm:^6.13.1" + ethers: "npm:6.13.1" express: "npm:4.21.0" fabric-network: "npm:2.2.20" fs-extra: "npm:11.2.0" @@ -21565,6 +21567,13 @@ __metadata: languageName: node linkType: hard +"bignumber.js@npm:9.1.2, bignumber.js@npm:^9.1.2": + version: 9.1.2 + resolution: "bignumber.js@npm:9.1.2" + checksum: 10/d89b8800a987225d2c00dcbf8a69dc08e92aa0880157c851c287b307d31ceb2fc2acb0c62c3e3a3d42b6c5fcae9b004035f13eb4386e56d529d7edac18d5c9d8 + languageName: node + linkType: hard + "bignumber.js@npm:^7.2.1": version: 7.2.1 resolution: "bignumber.js@npm:7.2.1" @@ -21579,13 +21588,6 @@ __metadata: languageName: node linkType: hard -"bignumber.js@npm:^9.1.2": - version: 9.1.2 - resolution: "bignumber.js@npm:9.1.2" - checksum: 10/d89b8800a987225d2c00dcbf8a69dc08e92aa0880157c851c287b307d31ceb2fc2acb0c62c3e3a3d42b6c5fcae9b004035f13eb4386e56d529d7edac18d5c9d8 - languageName: node - linkType: hard - "bin-links@npm:^4.0.4": version: 4.0.4 resolution: "bin-links@npm:4.0.4" @@ -28508,6 +28510,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:6.13.1": + version: 6.13.1 + resolution: "ethers@npm:6.13.1" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.1" + "@noble/curves": "npm:1.2.0" + "@noble/hashes": "npm:1.3.2" + "@types/node": "npm:18.15.13" + aes-js: "npm:4.0.0-beta.5" + tslib: "npm:2.4.0" + ws: "npm:8.17.1" + checksum: 10/efc3e8d4d13101cad01823ba524dad797a23f60088ca9f8677bd6dbfad5087e4187ede121e43aa0758d704525976f935860c5d5d27183a4247deaccf7cf19950 + languageName: node + linkType: hard + "ethers@npm:6.3.0": version: 6.3.0 resolution: "ethers@npm:6.3.0" @@ -28592,21 +28609,6 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^6.13.1": - version: 6.13.3 - resolution: "ethers@npm:6.13.3" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.1" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:18.15.13" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.4.0" - ws: "npm:8.17.1" - checksum: 10/a3b11a5bd97269f2aa5e5cb844642a84fe139a188fd3c0d7d0c4c7b4958d56286e84c14cd41d1c53bd5dff8bf1060c73bd7a9bde8313f8a994d94881f4010037 - languageName: node - linkType: hard - "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" From b81cfd1920ea34144522eee923bef63fb8c0d369 Mon Sep 17 00:00:00 2001 From: Iulia Mihaiu Date: Tue, 3 Aug 2021 01:01:00 +0300 Subject: [PATCH 23/49] feat(cc-tx-visualization): initial commit Signed-off-by: Iulia Mihaiu Signed-off-by: Rafael Belchior feat(cc-tx-viz): add methods to fabric connector Signed-off-by: Iulia Mihaiu fix(prometheus): metrics.ts leaks to global registry #1202 1. Specified a `register` property of the gauges as an empty array so that it does not pollute the global namespace. This is how this is supposed to be done as per the docs of prom-client. 2. Once the change from 1) took place, the issue became that the metrics gathering code was still trying to hit up the global scope for the metrics, e.g. calling the get metrics methods directly on the promClient object instead of the registry that we create for each prmoetheus exporter object separately. So a little additional refactor ensued to fix this as well by making sure that we grab a reference of the registry object at construction time and then re-use that wherever needed instead of going through the global promClient object. 3. Added missing .startMetricsCollection calls in the plugin constructors to ensure that the prometheus exporter object gets initialized properly (this is where the registry gets created as well so without this there are crashes happening when one tries to access the metrics through the registry) Why though? The problem was that the metrics.ts file that we have for all the plugin's metrics constructs a new Metric (Gauge) object at import time which then defaults to registering the metric in the global registry of prom-client by default. The latter was causing crashes when separate versions of the same metrics.ts file are imported in a scenario were the API server imports plugins from a different directory (this issue is coming from the branch where I'm working on plugin sandboxing via the live-plugin-manager). Fixes #1202 Signed-off-by: Peter Somogyvari feat(cc-tx-viz): added test for multiple prometheus metrics on fabric Signed-off-by: Iulia Mihaiu feat(cc-tx-viz): add metric model Signed-off-by: Iulia Mihaiu feat(cc-tx-viz): added croschainEventLog models Signed-off-by: Iulia Mihaiu feat(fabric): added endpoint for list of transaction receipts Signed-off-by: Iulia Mihaiu feat(test-tooling): add RabbitMQ test server feat(cc-tx-viz): add RabbitMQ support; update model feat(cc-tx-viz): add preliminary support to Fabric and Besu build(deps): upgrade axios to latest to fix CVE Details CVE-2021-3749 high severity Vulnerable versions: <= 0.21.1 Patched version: 0.21.2 axios is vulnerable to Inefficient Regular Expression Complexity Signed-off-by: Peter Somogyvari feat(cc-tx-viz): add methods to fabric connector Signed-off-by: Iulia Mihaiu feat(cc-tx-viz): add metric model Signed-off-by: Iulia Mihaiu xfix(cc-tx-viz): error implementation of IsVisualizable feat(cc-tx-viz): add methods to fabric and besu; update models Signed-off-by: Iulia Mihaiu feat(cc-tx-viz): update cross chain events log for fabric transactions Signed-off-by: Iulia Mihaiu feat(cctxviz): fix fabric prometheus feat(cctxviz): fix besu prometheus feat(cctxviz): fix fabric test feat(cctxviz): update tx receipt feat(cctxviz): add test script Signed-off-by: Rafael Belchior feat(cctxviz): add test receipts feat(cctxviz): refactor CrossChainEventLog Signed-off-by: Rafael Belchior test(cctxviz): refactor tests feat(cc-tx-viz): update model, add tests chore(cc-tx-viz): update dependencies Signed-off-by: Rafael Belchior feat(cc-tx-viz): persist logs Signed-off-by: Rafael Belchior test(cc-tx-viz): update test Signed-off-by: Rafael Belchior feat(cc-tx-viz): update strinfify to csv Signed-off-by: Rafael Belchior chore(cc-tx-viz): add csv folder Signed-off-by: Rafael Belchior chore(cc-tx-viz): move csv folder Signed-off-by: Rafael Belchior feat(cc-tx-viz): add test feat(cctxviz): add csv file, process mining script Signed-off-by: Rafael Belchior feat(cctxviz): proof of concept v1 Signed-off-by: Rafael Belchior chore(cctxviz): update csv Signed-off-by: Rafael Belchior docs(cctxviz): update readme Signed-off-by: Rafael Belchior feat(cctxviz): update tests Signed-off-by: Rafael Belchior feat(cctxviz): add carbon footprint Signed-off-by: Rafael Belchior feat(cctxviz): update tests Signed-off-by: Rafael Belchior feat(cctxviz): update model Signed-off-by: Rafael Belchior feat(fabric-connector): update default queue Signed-off-by: Rafael Belchior test(cctxviz): fabric test Signed-off-by: Rafael Belchior feat(cctxviz): add parameters to fabric calls Signed-off-by: Rafael Belchior feat(cctxviz): support besu Signed-off-by: Rafael Belchior feat(cctxviz): update metrics Signed-off-by: Rafael Belchior test(cctxvi): update fabric and besu tests Signed-off-by: Rafael Belchior test(cctxviz): besu and fabric Signed-off-by: Rafael Belchior feat(cctxviz): support call transactions on fabric Signed-off-by: Rafael Belchior feat(cctxviz): add aggregation basis Signed-off-by: Rafael Belchior feat(cctxviz): aggregate cctx Signed-off-by: Rafael Belchior chore: update yarn and remove package.lock Signed-off-by: Rafael Belchior feat(cctxviz): containerize draft Signed-off-by: Rafael Belchior feat(cctxviz): add revenue Signed-off-by: Rafael Belchior feat(cctxviz): update model playbook Signed-off-by: Rafael Belchior feat(cctxviz): add dummy use case playbook Signed-off-by: Rafael Belchior test(cctxviz): update persist test and dummy uc Signed-off-by: Rafael Belchior feat(cctxviz): add timer Signed-off-by: Rafael Belchior feat(cctxviz): workload test Signed-off-by: Rafael Belchior feat(cctxviz): add more timers Signed-off-by: Rafael Belchior feat(cctxviz): add timer to map on connectors Signed-off-by: Rafael Belchior feat(cctxviz): update testing framework Signed-off-by: Rafael Belchior feat(cctxviz): vis plot wip Signed-off-by: Rafael Belchior feat(cctxviz): evaluate baseline Signed-off-by: Rafael Belchior feat(cctxviz): update plots Signed-off-by: Rafael Belchior test(cctxviz): add test files Signed-off-by: Rafael Belchior feat(cctxviz): update testing framework Signed-off-by: Rafael Belchior test(cctxviz): time-efficient polling receipts Signed-off-by: Rafael Belchior chore(cctxviz): add test chaincode Signed-off-by: Rafael Belchior test(cctxviz): update test Signed-off-by: Rafael Belchior test(cctxviz): use case v1 Signed-off-by: Rafael Belchior test(cctxviz): update test framework Signed-off-by: Rafael Belchior build(cc-tx-visualization): added missing fabric-contract-api This will fix one compilation error. Signed-off-by: Peter Somogyvari chore(deps): updated yarn.lock after rebase onto upstream/main Signed-off-by: Peter Somogyvari build(cc-tx-visualization): deleted redundant test fixtures Also added the test-tooling package as a dev dependency which should fix a few of the compiler errors we were getting on account of missing dependencies. Signed-off-by: Peter Somogyvari fix: resolved build errors for cctxviz branch - test-tooling package changed that needs to be reverted before commmit to main branch - added import statement for test data generationt xfix(cc-tx-viz): error implementation of IsVisualizable chore: update yarn and remove package.lock Signed-off-by: Rafael Belchior test(cctxviz): testing framework Signed-off-by: Rafael Belchior test(cctxviz): test framework Signed-off-by: Rafael Belchior test(cctxviz): update framework Signed-off-by: Rafael Belchior test(cctxviz): add graphs Signed-off-by: Rafael Belchior test(cctxviz): add test Signed-off-by: Rafael Belchior fix(cctxviz): fix bug Signed-off-by: Rafael Belchior test(cctxviz): add process conformance Signed-off-by: Rafael Belchior --- .cspell.json | 3 + jest.config.js | 8 + package.json | 15 + .../.gitignore | 4 + .../README.md | 3 + .../package.json | 92 + .../src/main/typescript/index.ts | 1 + .../src/main/typescript/index.web.ts | 1 + .../typescript/models/carbon-footprint.ts | 55 + .../typescript/models/cross-chain-event.ts | 73 + .../typescript/models/crosschain-model.ts | 74 + .../typescript/models/transaction-receipt.ts | 68 + .../typescript/plugin-cc-tx-visualization.ts | 416 ++++ .../plugin-factory-cc-tx-visualization.ts | 20 + .../src/main/typescript/public-api.ts | 17 + .../src/test/csv/dummy-use-case-6-events.csv | 7 + .../src/test/csv/dummy-use-case-60-events.csv | 61 + .../src/test/csv/dummy-use-case-invalid.csv | 7 + .../src/test/csv/example-dummy-use-case.csv | 9 + .../csv/use-case-besu-fabric-6-events.csv | 7 + .../csv/use-case-besu-fabric-60-events.csv | 61 + .../test/fixtures/python/process mining.ipynb | 423 ++++ .../fixtures/python/process_conformance.ipynb | 147 ++ .../src/test/solidity/LockAsset.json | 2007 +++++++++++++++++ .../integration/api-surface.test.ts | 8 + ...ate-use-case-dummy-baseline-events.test.ts | 207 ++ ...iz-generate-use-case-dummy-invalid.test.ts | 200 ++ .../cctxviz-persist-cross-chain-log.test.ts | 120 + ...txviz-usecase-fabric-besu-6-events.test.ts | 583 +++++ .../integration/initialize-rabbitmq.test.ts | 39 + .../tsconfig.json | 25 + .../src/main/json/openapi.json | 12 + .../generated/openapi/typescript-axios/api.ts | 18 + .../plugin-ledger-connector-besu.ts | 98 +- .../src/main/json/openapi.json | 12 + .../generated/openapi/typescript-axios/api.ts | 18 + .../plugin-ledger-connector-fabric.ts | 158 +- .../run-transaction-endpoint-v1.test.ts | 21 - .../src/main/typescript/public-api.ts | 2 + .../rabbit-mq-test-server.ts | 251 +++ .../socketio-test-setup-helpers.ts | 2 +- tsconfig.json | 3 + yarn.lock | 915 +++++++- 43 files changed, 6213 insertions(+), 58 deletions(-) create mode 100644 packages/cactus-plugin-cc-tx-visualization/.gitignore create mode 100644 packages/cactus-plugin-cc-tx-visualization/README.md create mode 100644 packages/cactus-plugin-cc-tx-visualization/package.json create mode 100755 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.web.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts create mode 100755 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts create mode 100644 packages/cactus-plugin-cc-tx-visualization/tsconfig.json create mode 100644 packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts diff --git a/.cspell.json b/.cspell.json index 0afbb2fe56..8ad22bc2cc 100644 --- a/.cspell.json +++ b/.cspell.json @@ -34,6 +34,8 @@ "cccs", "ccep", "ccid", + "cctx", + "cctxviz", "celo", "cids", "clazz", @@ -169,6 +171,7 @@ "redoc", "redocly", "rogpeppe", + "rabbitmq", "rollbackackmessage", "RUSTC", "Rwset", diff --git a/jest.config.js b/jest.config.js index df76347651..888b1c0a4d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -61,5 +61,13 @@ module.exports = { `./examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/admin-enroll-v1-endpoint.test.ts`, `./examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-backend-api-calls.test.ts`, `./examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-cli-via-npm-script.test.ts`, + `./examples/cactus-check-connection-ethereum-validator/src/test/typescript/integration/check-connection-to-ledger.test.ts`, + `./examples/cactus-check-connection-ethereum-validator/src/test/typescript/integration/check-config-files.test.ts`, + `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts`, + `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts`, + `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts`, + `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts`, + `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts`, + `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts`, ], }; diff --git a/package.json b/package.json index c175dda0ba..f58723730e 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,21 @@ "build:dev:frontend": "lerna run build:dev:frontend --scope='@hyperledger/cactus-example-*-frontend' --scope='@hyperledger/cacti-ledger-browser'", "build:dev:common": "lerna exec --stream --scope '*/*common' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'", "build:dev:backend:postbuild": "lerna run build:dev:backend:postbuild", + "test:cmd-api-server": "tap --ts --timeout=600 \"packages/cactus-*cmd-api-server/src/test/typescript/{unit,integration}/\"", + "test:plugin-ledger-connector-besu": "tap --ts --jobs=1 --timeout=60 \"packages/cactus-*-besu/src/test/typescript/{unit,integration}/\"", + "test:plugin-htlc-besu-erc20": "tap --jobs=1 --timeout=600 \"packages/*htlc-eth-besu-erc20/src/test/typescript/{unit,integration}/\"", + "test:plugin": "tap --jobs=1 --timeout=600 \"packages/*test-plugin-htlc-eth-besu/src/test/typescript/{unit,integration}/\"", + "test:plugin-ledger-connector-quorum": "tap --ts --jobs=1 --timeout=60 \"packages/cactus-*-quorum/src/test/typescript/{unit,integration}/\"", + "test:cctxviz": "tap --jobs=1 --timeout=600 \"packages/cactus-plugin-cc-tx-visualization/src/test/typescript/{unit,integration}/\"", + "test:plugin-ledger-connector-iroha": "tap --ts --jobs=1 --timeout=600 \"packages/cactus-*-iroha/src/test/typescript/{unit,integration}/\"", + "test:plugin-htlc-besu": "tap --jobs=1 --timeout=600 \"packages/*htlc-eth-besu/src/test/typescript/{integration}/\"", + "build:dev:plugin-consortium-manual": "lerna exec --stream --scope '*/*manual-consortium' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'", + "build:dev:plugin-cc-tx-visualization": "lerna exec --stream --scope '*/*cc-tx-visualization' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'", + "build:dev:example-supply-chain-backend": "lerna exec --stream --scope '*/*example-supply-chain-b*' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --display-modules --env=dev --target=node --config ../../webpack.config.js'", + "build:dev:example-carbon-accounting-backend": "lerna exec --stream --scope '*/*carbon-accounting-b*' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --display-modules --env=dev --target=node --config ../../webpack.config.js' && cp -r examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/ examples/cactus-example-carbon-accounting-backend/dist/lib/", + "build:dev:sdk": "lerna exec --stream --scope '*/*sdk' -- 'del-cli dist/** && tsc --project ./tsconfig.json && webpack --env=dev --target=node --config ../../webpack.config.js'", + "build:dev:plugin-ledger-connector-corda": "lerna exec --stream --scope '*/*connector-corda' -- 'del-cli dist/** && npm run tsc && webpack --env=dev --target=node --config ../../webpack.config.js'", + "test:plugin-ledger-connector-corda": "tap --ts --jobs=1 --timeout=600 \"packages/cactus-*-corda/src/test/typescript/{unit,integration}/\"", "webpack": "lerna run webpack:dev", "webpack:dev:web": "lerna run webpack:dev:web", "webpack:dev:node": "lerna run webpack:dev:node", diff --git a/packages/cactus-plugin-cc-tx-visualization/.gitignore b/packages/cactus-plugin-cc-tx-visualization/.gitignore new file mode 100644 index 0000000000..a3a215c6f3 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/.gitignore @@ -0,0 +1,4 @@ +cactus-openapi-spec-plugin-consortium-manual.json +src/main/typescript/generated/openapi/typescript-axios/.npmignore +src/test/csv +src/test/test-results/*.out diff --git a/packages/cactus-plugin-cc-tx-visualization/README.md b/packages/cactus-plugin-cc-tx-visualization/README.md new file mode 100644 index 0000000000..20f5ba92cd --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/README.md @@ -0,0 +1,3 @@ +# `@hyperledger/cactus-plugin-cctxviz` + +The proposed plugin allows generating process models from arbitrary cross-chain use cases. Currently supports Fabric and Besu. More documentation to come soon. diff --git a/packages/cactus-plugin-cc-tx-visualization/package.json b/packages/cactus-plugin-cc-tx-visualization/package.json new file mode 100644 index 0000000000..7fe9df9cdc --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/package.json @@ -0,0 +1,92 @@ +{ + "name": "@hyperledger/cactus-plugin-cc-tx-visualization", + "version": "1.0.0", + "description": "A web service plugin that provides management capabilities on cross-chain transactions visualization.", + "keywords": [ + "Hyperledger", + "Cactus", + "Integration", + "Blockchain", + "Distributed Ledger Technology" + ], + "homepage": "https://github.com/hyperledger/cactus#readme", + "bugs": { + "url": "https://github.com/hyperledger/cactus/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hyperledger/cactus.git" + }, + "license": "Apache-2.0", + "author": { + "name": "Hyperledger Cactus Contributors", + "email": "cactus@lists.hyperledger.org", + "url": "https://www.hyperledger.org/use/cactus" + }, + "contributors": [ + { + "name": "Please add yourself to the list of contributors", + "email": "your.name@example.com", + "url": "https://example.com" + }, + { + "name": "Iulia Mihaiu" + }, + { + "name": "Sabrina Scuri" + }, + { + "name": "Rafael Belchior" + } + ], + "main": "dist/lib/main/typescript/index.js", + "module": "dist/lib/main/typescript/index.js", + "browser": "dist/cactus-plugin-cc-tx-visualization.web.umd.js", + "types": "dist/types/main/typescript/index.d.ts", + "files": [ + "dist/*" + ], + "scripts": { + "watch": "npm-watch", + "webpack": "npm-run-all webpack:dev webpack:prod", + "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", + "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", + "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", + "webpack:prod": "npm-run-all webpack:prod:node webpack:prod:web", + "webpack:prod:node": "webpack --env=prod --target=node --config ../../webpack.config.js", + "webpack:prod:web": "webpack --env=prod --target=web --config ../../webpack.config.js" + }, + "dependencies": { + "@hyperledger/cactus-common": "2.0.0-rc.7", + "@hyperledger/cactus-core": "2.0.0-rc.7", + "@hyperledger/cactus-core-api": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.7", + "amqp-ts": "1.8.0", + "axios": "1.7.7", + "body-parser": "1.19.0", + "csv-stringify": "6.0.5", + "express": "4.17.1", + "fabric-contract-api": "2.2.3", + "jose": "1.28.1", + "json-stable-stringify": "1.0.1", + "prom-client": "13.0.0", + "typescript-optional": "2.0.1", + "uuid": "8.3.2" + }, + "devDependencies": { + "@hyperledger/cactus-test-tooling": "1.0.0", + "@types/express": "4.17.8", + "@types/json-stable-stringify": "1.0.32", + "@types/uuid": "8.3.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + }, + "publishConfig": { + "access": "public" + }, + "browserMinified": "dist/cactus-plugin-cc-tx-visualization.web.umd.min.js", + "mainMinified": "dist/cactus-plugin-cc-tx-visualization.node.umd.min.js" +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.ts new file mode 100755 index 0000000000..87cb558397 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.ts @@ -0,0 +1 @@ +export * from "./public-api"; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.web.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.web.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.web.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts new file mode 100644 index 0000000000..376c2c2292 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts @@ -0,0 +1,55 @@ +import { LedgerType } from "@hyperledger/cactus-core-api"; + +export function calculateGasPriceBesu(gasUsed: number): number { + if (!gasUsed) { + return 0; + } + return getGasPrice() * gasUsed; +} + +// The conversion rate gwei-dollar can be dynamic +export function gweiToDollar(gwei: number): number | string { + if (!gwei) { + return 0; + } + return (gwei * 0.00000255).toFixed(2); +} + +// This value can be retrieved dynamically; 1 gas = 30 gwei +export function getGasPrice(): number { + return 30; +} +// price per gwei +export function gasToDollar(gwei: number): number { + return gwei * 0.005899; +} + +export function calculateCarbonFootPrintFabric( + peers: string[] | undefined, +): number { + if (!peers) { + return 0; + } + return peers.length * CarbonFootPrintConstants(LedgerType.Fabric2); +} +export function calculateCarbonFootPrintBesu(): number { + return CarbonFootPrintConstants(LedgerType.Besu2X); +} + +export const CarbonFootPrintConstants = (ledger: LedgerType): number => { + switch (ledger) { + case LedgerType.Besu2X: + return 0.00018; + + case LedgerType.Besu1X: + return 0.00018; + + case LedgerType.Fabric2: + return 0.00018; + + case LedgerType.Fabric14X: + return 0.00018; + default: + return 0; + } +}; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts new file mode 100644 index 0000000000..c9ee7b19e6 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts @@ -0,0 +1,73 @@ +export type CrossChainEvent = { + caseID: string; + receiptID: string; + timestamp: Date; + blockchainID: string; + invocationType: string; + methodName: string; + parameters: string[]; + identity: string; + cost?: number | string; + carbonFootprint?: number | string; + latency?: number; + revenue?: number; +}; + +export interface ICrossChainEventLog { + name: string; +} + +export class CrossChainEventLog { + private crossChainEvents: CrossChainEvent[] = []; + private creationDate: Date; + private lastUpdateDate: Date; + public readonly logName: string; + //TODO: add a pause boolean? + + constructor(options: ICrossChainEventLog) { + this.creationDate = new Date(); + this.lastUpdateDate = new Date(); + this.logName = options.name; + } + + get logEntries(): CrossChainEvent[] { + return this.crossChainEvents; + } + + public numberEvents(): number { + return this.crossChainEvents.length; + } + public getCreationDate(): Date { + return this.creationDate; + } + + public getLastUpdateDate(): Date { + return this.lastUpdateDate; + } + + public purgeLogs(): void { + this.crossChainEvents = []; + } + + public addCrossChainEvent(event: CrossChainEvent): void { + this.crossChainEvents.push(event); + this.lastUpdateDate = new Date(); + } + + public getCrossChainLogAttributes(): string[] { + return [ + "caseID", + "receiptID", + "timestamp", + "blockchainID", + "invocationType", + "methodName", + "parameters", + "identity", + "cost", + "carbonFootprint", + "latency", + "revenue", + ]; + } +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts new file mode 100644 index 0000000000..5241771d0e --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts @@ -0,0 +1,74 @@ +import { v4 as uuidv4 } from "uuid"; + +export class CrossChainModel { + private modelType: CrossChainModelType | undefined; + private crossChainTransactions: + | Map + | undefined; + private models = new Map(); + private id: string; + private lastAggregationDate: Date; + + constructor() { + this.id = uuidv4(); + this.crossChainTransactions = new Map< + string, + CrossChainTransactionSchema + >(); + this.lastAggregationDate = new Date(); + } + get lastAggregation(): Date { + return this.lastAggregationDate; + } + + public setLastAggregationDate(date: Date): void { + this.lastAggregationDate = date; + } + + public saveModel(type: CrossChainModelType, model: string): void { + this.models.set(type, model); + } + + public getModel(type: CrossChainModelType): string | undefined { + if (this.models.has(type)) { + return this.models.get(type); + } + } + + public getOneCCTx(txKey: string): CrossChainTransactionSchema | undefined { + if (this.crossChainTransactions && this.crossChainTransactions.has(txKey)) { + return this.crossChainTransactions.get(txKey); + } + } + + public getCCTxs(): Map | undefined { + if (this.crossChainTransactions) { + return this.crossChainTransactions; + } + } + + public setCCTxs( + key: string, + mapDefintion: CrossChainTransactionSchema, + ): void { + this.crossChainTransactions?.set(key, mapDefintion); + } +} + +export enum CrossChainModelType { + HeuristicMiner, + ProcessTree, + DirectFollowGraph, +} + +export type CrossChainTransactionSchema = { + ccTxID: string; + // the receipt ids of each cross chain event + processedCrossChainEvents: string[]; + latency: number; + carbonFootprint: number | undefined; + cost: number | undefined; + throughput: number; + latestUpdate: Date; + revenue: number; +}; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts new file mode 100644 index 0000000000..0b6b173359 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts @@ -0,0 +1,68 @@ +import { LedgerType } from "@hyperledger/cactus-core-api"; +import { Web3SigningCredential } from "@hyperledger/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api"; +import { + FabricSigningCredential, + GatewayOptions, + TransactReceiptBlockMetaData, + TransactReceiptTransactionCreator, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api"; + +export interface TransactionReceipt { + caseID: string; + blockchainID: LedgerType; + invocationType: string; + methodName: string; + parameters: string[]; + timestamp: Date; +} + +export interface IsVisualizable { + // list of transaction receipts, that will be sent to cc-tx-viz + collectTransactionReceipts: boolean; +} + +// TODO define Tx Receipt for Fabric +export interface FabricV2TxReceipt extends TransactionReceipt { + channelName: string; + transactionID: string | undefined; + contractName: string; + endorsingPeers?: string[]; + endorsingParties?: string[]; + transientData?: any | null; + gatewayOptions?: GatewayOptions; + signingCredentials: FabricSigningCredential; + blockNumber?: string; + transactionCreator?: TransactReceiptTransactionCreator; + blockMetaData?: TransactReceiptBlockMetaData; + chainCodeName?: string; + chainCodeVersion?: string; + responseStatus?: string; +} +export interface BesuV2TxReceipt extends TransactionReceipt { + status: boolean; + transactionHash: string; + transactionIndex: number; + blockNumber: number; + blockHash: string; + contractName: string; + contractAddress?: string; + contractAbi?: string[]; + value?: number | string; + gas?: number | string; + gasPrice?: number | string; + gasUsed?: number | string; + cumulativeGasUsed?: number | string; + from: string; + to: string; + signingCredentials?: Web3SigningCredential; + keychainID?: string; + privateTransactionConfig?: string[]; + timeoutMs?: number | string; +} + +export function toSeconds(date: number): number { + return Math.floor(date / 1000); +} +export function millisecondsLatency(date: Date): number { + return new Date().getTime() - date.getTime(); +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts new file mode 100644 index 0000000000..e16888aec1 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts @@ -0,0 +1,416 @@ +/* eslint-disable prettier/prettier */ +import { Server } from "http"; +import { Server as SecureServer } from "https"; +import { Optional } from "typescript-optional"; +import { promisify } from "util"; +import { + IPluginWebService, + IWebServiceEndpoint, + ICactusPlugin, + ICactusPluginOptions, + LedgerType, +} from "@hyperledger/cactus-core-api"; +//import { BesuApiClient} from "@hyperledger/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api"; +import { stringify } from 'csv-stringify'; + +import fs from 'fs'; +import path from 'path'; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Express } from "express"; + +import { + Checks, + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { calculateGasPriceBesu, CarbonFootPrintConstants, gweiToDollar } from "./models/carbon-footprint"; +import { CrossChainEvent, CrossChainEventLog } from "./models/cross-chain-event"; + +export interface IWebAppOptions { + port: number; + hostname: string; +} +import * as Amqp from "amqp-ts"; +import { CrossChainModel, CrossChainModelType, CrossChainTransactionSchema } from "./models/crosschain-model"; +import { BesuV2TxReceipt, FabricV2TxReceipt, millisecondsLatency } from "./models/transaction-receipt"; +import { randomUUID } from "crypto"; + +export interface IChannelOptions { + queueId: string, + dltTechnology: LedgerType | null, + persistMessages: boolean +} + +export type APIConfig = { + type:LedgerType, + basePath: string +} + +export interface IPluginCcTxVisualizationOptions extends ICactusPluginOptions { + connectorRegistry?: PluginRegistry; + logLevel?: LogLevelDesc; + webAppOptions?: IWebAppOptions; + eventProvider: string; + channelOptions: IChannelOptions; + instanceId: string; +} + +// TODO - for extensability, modularity, and flexibility, +// this plugin could have a list of connections and list of queues +export class CcTxVisualization + implements ICactusPlugin, IPluginWebService { + private readonly log: Logger; + private readonly instanceId: string; + private endpoints: IWebServiceEndpoint[] | undefined; + private httpServer: Server | SecureServer | null = null; + private crossChainLog: CrossChainEventLog; + private crossChainModel: CrossChainModel; + private readonly eventProvider: string; + private amqpConnection: Amqp.Connection; + private amqpQueue: Amqp.Queue; + private amqpExchange: Amqp.Exchange; + public readonly className = "plugin-cc-tx-visualization"; + private readonly queueId: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + private txReceipts: any[]; + private readonly persistMessages: boolean; + + constructor(public readonly options: IPluginCcTxVisualizationOptions) { + const startTime = new Date(); + const fnTag = `PluginCcTxVisualization#constructor()`; + if (!options) { + throw new Error(`${fnTag} options falsy.`); + } + Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.queueId = options.channelOptions.queueId || "cc-tx-viz-queue"; + this.log = LoggerProvider.getOrCreate({ + label: label, + level: level, + }); + this.instanceId = this.options.instanceId; + this.crossChainLog = new CrossChainEventLog({name:"CC-TX-VIZ_EVENT_LOGS"}); + //todo should allow different models to be instantiated + this.crossChainModel = new CrossChainModel(); + this.txReceipts = []; + this.persistMessages = options.channelOptions.persistMessages || false; + this.eventProvider = options.eventProvider; + this.log.debug("Initializing connection to RabbitMQ"); + this.amqpConnection = new Amqp.Connection(this.eventProvider); + this.log.info("Connection to RabbitMQ server initialized"); + this.amqpExchange = this.amqpConnection.declareExchange(`cc-tx-viz-exchange`, "direct", {durable: this.persistMessages}); + this.amqpQueue = this.amqpConnection.declareQueue(this.queueId, {durable: this.persistMessages}); + this.amqpQueue.bind(this.amqpExchange); + + const finalTime = new Date(); + this.log.debug(`EVAL-${this.className}-SETUP-CONSTRUCTOR:${finalTime.getTime()-startTime.getTime()}`); + + } + getOpenApiSpec(): unknown { + throw new Error("Method not implemented."); + } + + get numberEventsLog(): number { + return this.crossChainLog.numberEvents(); + } + + get numberUnprocessedReceipts(): number { + return this.txReceipts.length; + } + + public purgeCrossChainEvents(): void { + this.crossChainLog.purgeLogs(); + } + + // todo connection closing is problematic, tests are left hanging + public async closeConnection(): Promise { + this.log.debug("Closing Amqp connection"); + try { + this.amqpConnection.close(); + this.log.debug(" Amqp connection closed"); + + } catch (error) { + this.log.error(error); + } + + } + + public getInstanceId(): string { + return this.instanceId; + } + + public async onPluginInit(): Promise { + return; + } + + public async shutdown(): Promise { + this.log.info(`Shutting down...`); + const serverMaybe = this.getHttpServer(); + if (serverMaybe.isPresent()) { + this.log.info(`Awaiting server.close() ...`); + const server = serverMaybe.get(); + await promisify(server.close.bind(server))(); + this.log.info(`server.close() OK`); + } else { + this.log.info(`No HTTP server found, skipping...`); + } + } + + + async registerWebServices(app: Express): Promise { + const webServices = await this.getOrCreateWebServices(); + await Promise.all(webServices.map((ws) => ws.registerExpress(app))); + return webServices; + } + + public async getOrCreateWebServices(): Promise { + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + + const { log } = this; + + log.info(`Installing web services for plugin ${this.getPackageName()}...`); + + const endpoints: IWebServiceEndpoint[] = []; + + // TODO implement endpoints + + const pkg = this.getPackageName(); + log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); + + return endpoints; + } + + public getHttpServer(): Optional { + return Optional.ofNullable(this.httpServer); + } + + public getPackageName(): string { + return `@hyperledger/cactus-plugin-cc-tx-visualization`; + } + + public pollTxReceipts(): Promise { + const fnTag = `${this.className}#pollTxReceipts()`; + this.log.debug(fnTag); + return this.amqpQueue.activateConsumer( (message) => { + const messageContent = message.getContent(); + this.log.debug(`Received message from ${this.queueId}: ${message.content.toString()}`); + this.txReceipts.push(messageContent); + message.ack(); + }, { noAck: false }); + } + + // Precion minimum is 4ms by convention + public async hasProcessedXMessages(numberMessages: number, precision: number): Promise { + while (this.txReceipts.length < numberMessages) { + await new Promise((resolve) => setTimeout(resolve, precision)); + } + return; + + } + + public async txReceiptToCrossChainEventLogEntry(): Promise { + const startTime = new Date(); + const fnTag = `${this.className}#pollTxReceipts()`; + this.log.debug(fnTag); + // We are processing receipts to update the CrossChainLog. + // At the end of the processing, we need to clear the transaction receipts that have been processed + // Therefore, we need a listen method that cctxviz is always running, doing polls every X seconds, followed by receipt processing (this method) + try { + this.txReceipts.forEach(receipt => { + switch(receipt.blockchainID) { + case LedgerType.Besu2X: + const besuReceipt: BesuV2TxReceipt = receipt; + const ccEventFromBesu:CrossChainEvent = { + caseID: besuReceipt.caseID, + receiptID: besuReceipt.transactionHash, + blockchainID:besuReceipt.blockchainID, + invocationType: besuReceipt.invocationType, + methodName:besuReceipt.methodName, + parameters:besuReceipt.parameters, + timestamp: besuReceipt.timestamp, + identity: besuReceipt.from, + cost: gweiToDollar(calculateGasPriceBesu(besuReceipt.gasUsed as number)), + carbonFootprint: CarbonFootPrintConstants(LedgerType.Besu2X), + latency: millisecondsLatency(new Date(receipt.timestamp)), + revenue: receipt.revenue || 0, + }; + this.crossChainLog.addCrossChainEvent(ccEventFromBesu); + this.log.info("Added Cross Chain event from BESU"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromBesu)}`); + break; + case LedgerType.Fabric2: + const fabricReceipt: FabricV2TxReceipt = receipt; + const ccEventFromFabric:CrossChainEvent = { + caseID: fabricReceipt.caseID, + receiptID: fabricReceipt.transactionID || `FABRIC-CALL-${randomUUID()}`, + blockchainID: fabricReceipt.blockchainID, + invocationType: fabricReceipt.invocationType, + methodName: fabricReceipt.methodName, + parameters: fabricReceipt.parameters, + timestamp: fabricReceipt.timestamp, + identity: fabricReceipt.signingCredentials.keychainRef, + cost: receipt.cost || 0, + carbonFootprint: CarbonFootPrintConstants(LedgerType.Fabric2), + latency: millisecondsLatency(new Date(receipt.timestamp)), + revenue: receipt.revenue || 0, + }; + this.crossChainLog.addCrossChainEvent(ccEventFromFabric); + this.log.info("Added Cross Chain event from FABRIC"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromFabric)}`); + break; + // used to test cctxviz + case "TEST": + const ccEventTest:CrossChainEvent = { + caseID: receipt.caseID, + receiptID: receipt.receiptID || randomUUID(), + blockchainID: receipt.blockchainID, + invocationType: receipt.invocationType, + methodName: receipt.methodName, + parameters: receipt.parameters, + timestamp: receipt.timestamp, + identity: receipt.identity, + cost: receipt.cost || 0, + carbonFootprint: receipt.carbonFootprint || 0, + latency: receipt.latency || millisecondsLatency(new Date(receipt.timestamp)), + revenue: receipt.revenue, + }; + this.crossChainLog.addCrossChainEvent(ccEventTest); + this.log.info("Added Cross Chain event TEST"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventTest)}`); + break; + default: + this.log.warn(`Tx Receipt with case ID ${receipt.caseID} is not supported`); + break; + } + + }); + // Clear receipt array + this.txReceipts = []; + const finalTime = new Date(); + this.log.debug(`EVAL-${this.className}-RECEIPT2EVENT:${finalTime.getTime()-startTime.getTime()}`); + return; + } catch (error) { + this.log.error(error); + } + + } + + // Parses the cross chain event log and updates the cross chain model + // This is part of the cc model; have a set that maps case id to data structure; this data structure are the consolidated metrics for a cctx, stores each txid + // run over cc log; if case id is unique create new entry, otherwise add tx to cctx, update metrics, update last update; this is an updatable model + public async aggregateCcTx(): Promise { + const startTime = new Date(); + const lastAggregated = this.crossChainModel.lastAggregation; + const newAggregationDate = new Date(); + const ccTxSet = this.crossChainModel.getCCTxs(); + const logEntries = this.crossChainLog.logEntries; + // If entries are more recent than aggregation + let metrics: CrossChainTransactionSchema = { + ccTxID: "", + processedCrossChainEvents: [], + latency: 0, + carbonFootprint: 0, + cost: 0, + throughput: 0, + latestUpdate: newAggregationDate, + revenue: 0, + }; + const logsToAggregate = logEntries.filter(log => new Date(log.timestamp).getTime() > new Date(lastAggregated).getTime()); + if (logsToAggregate.length === 0) { + const finalTime = new Date(); + + this.log.debug(`EVAL-${this.className}-AGGREGATE-CCTX-NO_NEW_LOGS:${finalTime.getTime()-startTime.getTime()}`); + return;} + logsToAggregate.forEach(eventEntry => { + const key = eventEntry.caseID; + const eventID = eventEntry.receiptID; + let latency = eventEntry.latency as number; + let carbonFootprint = eventEntry.carbonFootprint as number; + let cost = eventEntry.cost as number; + const revenue = eventEntry.revenue as number; + + if (!latency) {latency = 0;} + if (!carbonFootprint) {carbonFootprint = 0;} + if (!cost) {cost = 0;} + if (ccTxSet?.has(key)) { + const existingCCTx = ccTxSet.get(key); + const previousEvents = existingCCTx?.processedCrossChainEvents || []; + const numberOfCurrentEvents = previousEvents.length + 1; + const previousLatency = existingCCTx?.latency || 0; + const previousCarbonFootprint = existingCCTx?.carbonFootprint || 0; + const previousCost = existingCCTx?.cost || 0; + const currentCost = (cost + previousCost) / numberOfCurrentEvents; + const previousRevenue = existingCCTx?.revenue || 0; + const currentRevenue = (revenue + previousRevenue) / numberOfCurrentEvents; + + const updatedMetrics = { + ccTxID: key, + processedCrossChainEvents: [...previousEvents , eventID], + latency: (latency + previousLatency) / numberOfCurrentEvents, + carbonFootprint: (carbonFootprint + previousCarbonFootprint) / numberOfCurrentEvents, + cost: currentCost, + throughput: Number(latency != 0 ? (1 / ((latency + previousLatency) / numberOfCurrentEvents)).toFixed(3) as unknown as number : 0), + latestUpdate: lastAggregated, + revenue: currentRevenue, + }; + this.crossChainModel.setCCTxs(key,updatedMetrics); + } else { + metrics = { + ccTxID: key, + processedCrossChainEvents: [eventID], + latency: latency, + carbonFootprint: carbonFootprint, + cost: cost, + throughput: Number((latency != 0 ? 1 / latency : 0).toFixed(3) as unknown as number), + latestUpdate: lastAggregated, + revenue: revenue, + }; + this.crossChainModel.setCCTxs(key,metrics); + } + }); + this.crossChainModel.setLastAggregationDate(newAggregationDate); + const finalTime = new Date(); + this.log.debug(`${this.className}-AGGREGATE-CCTX-SUCCESS:${finalTime.getTime()-startTime.getTime()}`); + return; + } + + public async persistCrossChainLogCsv (name?: string): Promise { + const startTime = new Date(); + const columns = this.crossChainLog.getCrossChainLogAttributes(); + const logName = name? `${name}.csv` : `cctxviz_log_${new Date().getTime()}.csv`; + const csvFolder = path.join(__dirname, "../" , "../", "test", "csv"); + const logPath = path.join(csvFolder , logName); + + stringify( + this.crossChainLog.logEntries + , { + header: true, + columns: columns, + delimiter: ";", + }, (err, data) =>{ + if (err) { + this.log.error(err); + throw new Error("failed to stringify log"); + } + this.log.debug(data); + fs.writeFileSync(logPath, data); + }); + const finalTime = new Date(); + this.log.debug(`EVAL-${this.className}-PERSIST-LOG:${finalTime.getTime()-startTime.getTime()}`); + return logName; + } + + // Receives a serialized model + public async saveModel (modelType: CrossChainModelType, model :string): Promise { + this.crossChainModel.saveModel(modelType, model); + } + + public async getModel (modelType: CrossChainModelType): Promise { + return this.crossChainModel.getModel(modelType); + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts new file mode 100644 index 0000000000..7d18d6d1c1 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts @@ -0,0 +1,20 @@ +import { + IPluginFactoryOptions, + PluginFactory, +} from "@hyperledger/cactus-core-api"; +import { + IPluginCcTxVisualizationOptions, + CcTxVisualization, +} from "./plugin-cc-tx-visualization"; + +export class PluginFactoryWebService extends PluginFactory< + CcTxVisualization, + IPluginCcTxVisualizationOptions, + IPluginFactoryOptions +> { + async create( + pluginOptions: IPluginCcTxVisualizationOptions, + ): Promise { + return new CcTxVisualization(pluginOptions); + } +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts new file mode 100755 index 0000000000..7da664906e --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts @@ -0,0 +1,17 @@ +export { + CcTxVisualization, + IPluginCcTxVisualizationOptions, + IWebAppOptions, +} from "./plugin-cc-tx-visualization"; + +export { IsVisualizable } from "./models/transaction-receipt"; +export { PluginFactoryWebService } from "./plugin-factory-cc-tx-visualization"; + +import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; +import { PluginFactoryWebService } from "./plugin-factory-cc-tx-visualization"; + +export async function createPluginFactory( + pluginFactoryOptions: IPluginFactoryOptions, +): Promise { + return new PluginFactoryWebService(pluginFactoryOptions); +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv new file mode 100644 index 0000000000..0b0ec28b6c --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv @@ -0,0 +1,7 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue +1;515ca87f-fbac-49f0-a4cf-d3bf5eb62860;2022-08-03T14:04:52.844Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7621; +1;2a5ca7a6-344c-4dfd-a005-98811fc889ce;2022-08-03T14:04:52.846Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7620; +1;4b3a5b7f-9bb2-413e-b2f4-74822db34c07;2022-08-03T14:04:52.847Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7619; +1;ee00b057-2f8e-4d57-89b0-ec9390a53e9b;2022-08-03T14:04:52.848Z;TEST;send;transfer asset;"[""A""]";A;0;0;7618; +1;d31efa25-097b-4496-9c75-bc8daca1cf51;2022-08-03T14:04:52.849Z;TEST;send;transfer asset;"[""""]";A;0;0;7617; +1;020c5f54-006f-4f49-b675-7cf85fb3cd80;2022-08-03T14:04:52.850Z;TEST;send;burn asset;"[""""]";A;0;0;7617; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv new file mode 100644 index 0000000000..378c12bc6d --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv @@ -0,0 +1,61 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue +10;672c7375-b463-4602-882a-5b50ca93af39;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7646; +10;3095c26a-d2db-4f25-823e-0de1e829e11d;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7644; +10;5c2c87f0-0f27-4e86-85b2-8b0816b10c24;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7643; +10;022e0884-4b78-4784-8929-caa2d1ed7234;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7642; +10;af311552-9ff1-421c-a4f1-d12e5ec20347;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7642; +10;7af1d933-da3c-4835-bc96-4dbbac913ddf;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7641; +9;ddcaff66-949e-49cb-9250-508598fc4408;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7647; +9;9f0eb346-4bfc-4687-8ca6-2fc181260eb0;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7645; +9;33ed7788-50e1-44a4-8d5a-62656dd84cf7;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7644; +9;564c7787-eae0-4dbe-82c7-4a2f07a65286;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7644; +9;66d2cd2c-b5ee-417c-a09f-4910a42468ed;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7643; +9;24a76769-c283-4ed3-a6c1-f495a068a94f;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7642; +8;96b7c76f-7f2a-444f-a263-331292842dd3;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7648; +8;06830bf5-d41c-4dce-aea3-237f0ba7ed71;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7647; +8;5429fead-c8f7-4906-a15b-1d0ff84885d1;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7646; +8;d4316180-80af-4eb0-91bc-e3a7c302b3f2;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7645; +8;552525b6-8ec6-4b65-a8ce-0afc245dadf4;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7644; +8;df8de589-e4c1-4323-b283-088dd60368a6;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7643; +7;5974b1e7-5db3-4139-ab8a-d9e255ea72a4;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7649; +7;39d7a374-4725-48cf-a600-4d0935b7e249;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7648; +7;0fbff6f5-c1a4-470f-a957-d98086e51cbf;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7647; +7;054cbc90-06cd-4461-8509-903fca7fc963;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7646; +7;abbd93cf-9ea2-431d-b688-4f85d0befa1d;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7645; +7;432d3e06-9624-438f-99c3-173452359762;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7645; +6;d022a95a-bf69-4585-8d2c-c1d09c8d2ab7;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7651; +6;40be8287-6f8c-4719-a24d-3270d07682e4;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7649; +6;0c9e2c65-e2ac-4d47-8fab-35029aaf86d7;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7648; +6;125cccb6-56cb-4653-8114-609d29bfced0;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7647; +6;adf7b151-d318-4ddd-9c31-8a0e9319eb88;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7646; +6;29c7f1a7-c812-4c4c-bb55-90ae0c78eaed;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7646; +5;09dfa0a0-1107-4453-8cb4-dcca500b102e;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7652; +5;c81ffbcd-7bdf-44c3-bc9b-a3d664464094;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7650; +5;7e78e8ea-912e-471b-b412-2b2a71c2bdc7;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7649; +5;71587b9e-78d8-4f8f-a3df-568d26dded51;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7648; +5;127b0e58-cf75-4dbe-9767-8053335f90d2;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7648; +5;4173755f-6012-4e14-9b5c-52f628888846;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7647; +4;2be88040-b17d-4e71-854e-7b815778713e;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7653; +4;550643ce-7e2c-4f6a-bed7-6400fa8ba5be;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7651; +4;85b72b5e-c6f0-4d53-8527-8283e0b198a0;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7650; +4;7fb7df34-c7c0-4077-bffa-577dbd11e9ea;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7649; +4;bb1b5e57-bfa9-407b-8797-b64f0e99ec81;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7649; +4;1583ef47-dff0-4897-a9a2-1fddb02817ab;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7648; +3;07803bdd-6f8b-460b-9e4e-378befce11e2;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7654; +3;fb1d93d3-9e98-4213-bf3d-e219d0201fd3;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7652; +3;6ec5ed7d-fad5-41c1-96b7-834370dfddd5;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7651; +3;aa32d8bf-9a17-479b-be99-098931378896;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7651; +3;961f131b-9632-4909-ad73-a30c97d689c8;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7650; +3;e7d9e88c-5a8b-4ae5-aeb3-16bc7fe10d99;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7649; +2;2cdc5e7c-1ce0-43f2-a6a5-cac754beba08;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7655; +2;f48ff1d5-5f9d-4769-93dc-7435f516d3e3;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7653; +2;e4d51446-a241-47f7-932e-187102aca449;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7653; +2;2aa46d3c-111c-4b5b-80e1-5716ba4a889c;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7652; +2;cad9d38d-5791-445f-a7ae-7bad0dea5525;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7651; +2;086a681d-3c3c-49ea-a66c-3251eae97633;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7650; +1;ed54f76d-3ace-45f5-b233-7b541d7deec5;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7656; +1;bc54f38c-909f-433b-ace9-5acf4c109784;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7655; +1;8006179b-8e93-4ac1-b806-016138c79b7c;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7654; +1;8bfbc22d-2224-4050-b513-205b1529a9d3;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7653; +1;a47b4c5e-ed79-423a-a5f0-832af54d356f;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7652; +1;3aecbfb3-3b9f-43e9-a88d-dc8dc06b0608;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7651; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv new file mode 100644 index 0000000000..11c53ff5f7 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv @@ -0,0 +1,7 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue +INVALID_FABRIC_BESU_1;f0e58801-e6dd-44d4-91de-4adb2113a68b;2022-08-03T14:05:37.740Z;TEST;send;createAsset;"[""asset1,5""]";A;0;0;7602; +INVALID_FABRIC_BESU_1;fe6e7084-74da-4d1e-8681-6603111a71fc;2022-08-03T14:05:37.742Z;TEST;send;mintAsset;"[""asset1"",""Green"",""19"",""owner1"",""9999""]";A;0;0;7601; +INVALID_FABRIC_BESU_1;e7466cb2-4eaf-44f0-acd3-0b0dfae52801;2022-08-03T14:05:37.743Z;TEST;send;lockAsset;"[""asset1""]";A;0;0;7600; +INVALID_FABRIC_BESU_1;4df9be1c-6e47-40dd-8722-90072b0b04bd;2022-08-03T14:05:37.744Z;TEST;send;transferAsset;"[""asset1"",""owner2""]";A;0;0;7599; +INVALID_FABRIC_BESU_1;9a130336-c165-4e05-b72c-3b9c3fa583a0;2022-08-03T14:05:37.745Z;TEST;send;transferAsset;"[""asset1"",""owner1""]";A;0;0;7598; +INVALID_FABRIC_BESU_1;b8fef379-e64f-4aa0-97d8-45f28276576c;2022-08-03T14:05:37.746Z;TEST;send;BurnAsset;"[""asset1""]";A;0;0;7598; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv new file mode 100644 index 0000000000..a4e72b6acb --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv @@ -0,0 +1,9 @@ +caseID;timestamp;blockchainID;invocationType;methodName;parameters;identity +1;2022-04-28T16:14:23.922Z;TEST;send;registerEmission;"[""1,100""]";company_A +2;2022-04-28T16:14:23.922Z;TEST;send;registerEmission;"[""2,100""]";company_B +1;2022-04-29T20:01:03.922Z;TEST;send;registerEmission;"[""2,100""]";company_A +1;2022-05-10T06:01:03.922Z;TEST;send;getEmissions;"[""company_A""]";auditor +1;2022-05-11T09:47:43.922Z;TEST;send;mintEmissionToken;"[""uuidTokenEmissions""]";protocol_administrator +2;2022-04-29T22:47:43.922Z;TEST;send;registerEmission;"[""2,100""]";company_B +2;2022-05-11T09:47:43.922Z;TEST;send;getEmissions;"[""company_B""]";auditor +2;2022-05-12T13:34:23.922Z;TEST;send;mintEmissionToken;"[""uuidTokenEmissions""]";protocol_administrator diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv new file mode 100644 index 0000000000..2619033017 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv @@ -0,0 +1,7 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue +FABRIC_BESU;0xd184f5a49d170e2f7f9fcb7996e8db3d7764c13d798fc5a795e0d9371dd61435;2022-06-24T14:47:43.716Z;BESU_2X;SEND;createAsset;"[""asset1"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;10065;0 +FABRIC_BESU;0xc315d4ee310a04d4c0949279f4edba34fa8fb35cf5fe4fb1e4b95488202860fc;2022-06-24T14:47:45.312Z;BESU_2X;SEND;lockAsset;"[""asset1""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;8469;0 +FABRIC_BESU;7fddc8aef1a46f23fa33891b4ab6b951c7224671575b573cd47e7711cd9449b1;2022-06-24T14:47:47.102Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset1"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;6679;0 +FABRIC_BESU;7c395a691ba45d7fe921fb5f69b40fbff810459f8f9f274307c58fb070b2910a;2022-06-24T14:47:49.361Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner2""]";user2;0;0.00018;4420;0 +FABRIC_BESU;a6b747257c6e92b8c85292561999dad7dcf56051f2c6c639a2bbbd987a4afbdf;2022-06-24T14:47:51.573Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner1""]";user2;0;0.00018;2208;0 +FABRIC_BESU;fc20c6cd4f1cbd6b06da6cd1fc846a0b2051382096d63cd7e8a67865471526f1;2022-06-24T14:47:53.767Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset1""]";user2;0;0.00018;14;0 diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv new file mode 100644 index 0000000000..2e6e397e0b --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv @@ -0,0 +1,61 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue +10;0x0b84cd21633da69461dc0189b4ddc566bd4d794cb5b0094348c6d24217c66687;2022-06-25T10:59:25.183Z;BESU_2X;SEND;createAsset;"[""asset10"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.28;0.00018;103484;0 +10;0x255fb16b63d60d9f24f9809e444f0c5da6a1145d9de25c8b8acca5f0791b73bc;2022-06-25T10:59:26.102Z;BESU_2X;SEND;lockAsset;"[""asset10""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;102566;0 +10;1b7572e4c269dc6ee321da24b8eb464d1a6cee310ba3975bd4f90edf414c4766;2022-06-25T10:59:27.347Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset10"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;101321;0 +10;264b1a9e086920b5c8e21562dfd0b7034a313fb1c672d4b0a5805120aacde642;2022-06-25T10:59:29.562Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset10"",""owner2""]";user2;0;0.00018;99106;0 +10;17655a502c1ff999d966b926f99658b8dd84027e3f5b49b6374a162d7ebe39ce;2022-06-25T10:59:31.777Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset10"",""owner1""]";user2;0;0.00018;96892;0 +10;6d173ade6a8da3e9b7b4cdc54a0756d4eeb5a6ecae61edb32c892956f87433bf;2022-06-25T10:59:34.051Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset10""]";user2;0;0.00018;94618;0 +9;0xc27e6a83b344020f5cdffed3ec0e76f85ad1f46bef5874f7237219540626324a;2022-06-25T10:59:35.130Z;BESU_2X;SEND;createAsset;"[""asset9"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;93539;0 +9;0x19c60c14bcc4162e6633f76e0ee12911c8c5a4164a4e84fcdfc5bfa362f4546d;2022-06-25T10:59:36.173Z;BESU_2X;SEND;lockAsset;"[""asset9""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;92497;0 +9;7dc4caed5df3b823497626e64d8251b88ebda89658df4366d2bd85e0629ba542;2022-06-25T10:59:38.453Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset9"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;90217;0 +9;551bfac56479dc5ea1044a081526588ebe272984bfc113edf02cf4c7516d7d39;2022-06-25T10:59:40.676Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset9"",""owner2""]";user2;0;0.00018;87994;0 +9;9b06aaa26a2235df1c83687eb5425ca58e7150f3a6b21b74a5bbac56fb3a768a;2022-06-25T10:59:42.867Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset9"",""owner1""]";user2;0;0.00018;85803;0 +9;e15cdcc70b1bc670b50acf8dd7d074f07e43b49cecce6ef8216e9e25c70856e8;2022-06-25T10:59:45.105Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset9""]";user2;0;0.00018;83566;0 +8;0x9b31a1c51a1498d0cbcbc6e7751ec96847509146f1b0824c72e88e36f28dc675;2022-06-25T10:59:46.224Z;BESU_2X;SEND;createAsset;"[""asset8"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;82447;0 +8;0x7d962f902de9367d477f24f13d106f0de8002f217f401eac16a485d274a03e2a;2022-06-25T10:59:47.386Z;BESU_2X;SEND;lockAsset;"[""asset8""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;81285;0 +8;d5ce85e36492b9c164d88c4ba4615202c20ff7018303ec7855fcbf979aa2038d;2022-06-25T10:59:49.537Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset8"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;79135;0 +8;6f4bacb0a6cc996ebd241a51e73c2b7da61085284f5bb2b7097191324391189a;2022-06-25T10:59:51.679Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset8"",""owner2""]";user2;0;0.00018;76993;0 +8;750c903bd5870a72d6a48836123af036c34bed1ff0f0c427ec7702c9e6d5477d;2022-06-25T10:59:53.840Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset8"",""owner1""]";user2;0;0.00018;74832;0 +8;70f3f9e97cceb4ae4c992c701b75188ffac571ea28bc2a7b664d9d83f7d2d634;2022-06-25T10:59:56.017Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset8""]";user2;0;0.00018;72655;0 +7;0x7c2e2a12a0263a0562f0e874b5367856dff1295b447b6aa6587499520eb483f6;2022-06-25T10:59:57.165Z;BESU_2X;SEND;createAsset;"[""asset7"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;71508;0 +7;0xdd4f0626d4893812a69bbf7369598e8930328bf0a2f72530f5e328a3dab5f23f;2022-06-25T10:59:58.644Z;BESU_2X;SEND;lockAsset;"[""asset7""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;70029;0 +7;aafd581a460cb584394b5b02f158521fece5a64a392764a6c6b64a6144735dd6;2022-06-25T11:00:00.353Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset7"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;68320;0 +7;1dcaef34942fcd520df700e1ddb289940ecd92b48ef422ac8bcc297c816dccc0;2022-06-25T11:00:02.559Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset7"",""owner2""]";user2;0;0.00018;66114;0 +7;3b66f7f62ecbdd4fe41c71f6379b712ad7e3f845b76e75af2f7c08e57aa1011b;2022-06-25T11:00:04.791Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset7"",""owner1""]";user2;0;0.00018;63883;0 +7;99ee4284e38531fc2a4b2524019d48dcd8960d0d784d9c99f47f8514ed77b061;2022-06-25T11:00:06.981Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset7""]";user2;0;0.00018;61693;0 +6;0x2348af3e9cf3e817918c947002ac5c5ce25d1a720c02fc35a90f91cb13bb0ec3;2022-06-25T11:00:07.306Z;BESU_2X;SEND;createAsset;"[""asset6"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;61368;0 +6;0xb257570d87c2025d4a0f5a95a2ed74fdac76ad5329449841ad2347b21d4f3432;2022-06-25T11:00:08.058Z;BESU_2X;SEND;lockAsset;"[""asset6""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;60617;0 +6;0b0aaf2bf5c0f563827bb8560840a9997ad30ef527c2b6ff08de7aea15ef3c7e;2022-06-25T11:00:09.195Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset6"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;59480;0 +6;7f3d17884f04f12f3d0aa514cfbf9c152b445e48e5b7379883c7b11d539460ab;2022-06-25T11:00:11.431Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset6"",""owner2""]";user2;0;0.00018;57244;0 +6;594be967c7b886364cf2187676712bacd40eaa9e71a012bfc51d5af6d1e036e8;2022-06-25T11:00:13.676Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset6"",""owner1""]";user2;0;0.00018;54999;0 +6;c3b4d35769879dfd5b69239b01bc99cb1c24da3ec23b684d9c1e9769e4051fbd;2022-06-25T11:00:15.933Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset6""]";user2;0;0.00018;52743;0 +5;0x4056b743c139167e7520c3b092e506cb0a7bfcb5f01a97ea92cad8193356f063;2022-06-25T11:00:16.066Z;BESU_2X;SEND;createAsset;"[""asset5"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;52610;0 +5;0xc67fcd01535160e32f7b2b1d53cd92708a1bcbf69836000da85539e2e23efa15;2022-06-25T11:00:17.035Z;BESU_2X;SEND;lockAsset;"[""asset5""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;51641;0 +5;42b1100d844150d3223995b6c1baaa94150762de464be17cadee40c186d14b44;2022-06-25T11:00:18.087Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset5"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;50589;0 +5;8a9dd0e172f6b1f76ec9ba19509646b2719036735b713d160224c872e0bfd459;2022-06-25T11:00:20.293Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset5"",""owner2""]";user2;0;0.00018;48383;0 +5;f738b68c0e698d6475df97e8d9d131eb2716cedb0b5ec8ef0725c7678cdb5721;2022-06-25T11:00:22.492Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset5"",""owner1""]";user2;0;0.00018;46185;0 +5;9868694a2d0bfe679138eb43eb3f1fd13443bdd6fa99d4dc1a0a27fc37c76eaa;2022-06-25T11:00:24.713Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset5""]";user2;0;0.00018;43964;0 +4;0x1a674d3f2a7128fd0673ed20bcaa65866ab94e881e6ffe63376d4ab4cd613a39;2022-06-25T11:00:25.504Z;BESU_2X;SEND;createAsset;"[""asset4"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;43173;0 +4;0x5e6d1389a7dab4fe7aa33337e39330d722aec12af775f3d14204c2c3e6e6085a;2022-06-25T11:00:26.032Z;BESU_2X;SEND;lockAsset;"[""asset4""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;42646;0 +4;575bf45fd7e82267451465f7cbba7539f52ede08122839cf7b289e9833618fc0;2022-06-25T11:00:26.921Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset4"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;41757;0 +4;5cea5444721da108ffeac701e33773dde47ac7cf3596463f23b3304c1f85cd51;2022-06-25T11:00:29.124Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset4"",""owner2""]";user2;0;0.00018;39554;0 +4;f453e1de3aee3ac960fa1af1fc53f67f3e14fde5a37c68e30bd0795cdec6d58a;2022-06-25T11:00:31.343Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset4"",""owner1""]";user2;0;0.00018;37336;0 +4;071c140a9278eb6e91ea48988d8baa0eb4bc2bf2e861e11a502a634bc9704f42;2022-06-25T11:00:33.553Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset4""]";user2;0;0.00018;35126;0 +3;0x4365fd66956e3636a770292e7768b204b49c72fe3044171c36877d1d0dbed06b;2022-06-25T11:00:34.209Z;BESU_2X;SEND;createAsset;"[""asset3"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;34470;0 +3;0xcdad311631eaaea0722fff7fee626aff8edd9c1534517da781918277b4fe9c62;2022-06-25T11:00:35.117Z;BESU_2X;SEND;lockAsset;"[""asset3""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;33562;0 +3;5af29303a26443813ab900d7fd28eb4c6c8421333d865ed8c4329545997f79cf;2022-06-25T11:00:35.757Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset3"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;32923;0 +3;6b99476527ac6826128b30f95b9249097f398b38be9062b37dea79e9dced08d4;2022-06-25T11:00:37.979Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset3"",""owner2""]";user2;0;0.00018;30701;0 +3;580e3274acd62a5e4596b3e77308d9ae34b86804950a26bb339cd77a9e90c34b;2022-06-25T11:00:40.169Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset3"",""owner1""]";user2;0;0.00018;28511;0 +3;eb02da68b4ddeab17eae477c1ee4c2b26260d31bd8e15ff8d01dc76a24af8ac0;2022-06-25T11:00:42.330Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset3""]";user2;0;0.00018;26350;0 +2;0x0df56eeaebb034e0c74e7eaac81310536a8f5cb021470f7f596c27e14221c03b;2022-06-25T11:00:43.118Z;BESU_2X;SEND;createAsset;"[""asset2"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;25563;0 +2;0x20d772dffe4ed51f09850544a282032598d0146a4d2b8a6da0334de837b86094;2022-06-25T11:00:44.327Z;BESU_2X;SEND;lockAsset;"[""asset2""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;24354;0 +2;1dec685fc674460e905bc5631934764af97a0a71c4bdaa4cca58f1b1c0097d33;2022-06-25T11:00:46.592Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset2"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;22089;0 +2;0da0bf6a104da6cae5d8e7971a1f05d0c684889043eec86d029108fd385d9ea1;2022-06-25T11:00:48.854Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset2"",""owner2""]";user2;0;0.00018;19827;0 +2;dcce95975672efef29db26bbeffc6a1c5247da4f485168fb581cd308e5589c86;2022-06-25T11:00:51.117Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset2"",""owner1""]";user2;0;0.00018;17565;0 +2;3083629ff79e16f8470e4ea1d8fbc5c9115491fcf6eb7e695e8f7838e0481afb;2022-06-25T11:00:53.342Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset2""]";user2;0;0.00018;15340;0 +1;0x6907cca45d572b05bdf0db922fe58e313e0fdb0df44199ddd96b6005db09e3ae;2022-06-25T11:00:54.159Z;BESU_2X;SEND;createAsset;"[""asset1"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;14523;0 +1;0xfbf7a0ef853fd86384adc9b7f67f0cef8e8c68b5745890220ae989538e1946c1;2022-06-25T11:00:55.030Z;BESU_2X;SEND;lockAsset;"[""asset1""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;13652;0 +1;8c6f92d3dde2147ac0632107ad4273106fc73ab46bf340cb6cf7af46e244c67b;2022-06-25T11:00:55.573Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset1"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;13109;0 +1;4a6ac7d83bb4c5d67b1007688f81a2ff8e0df1792c34db3893eb652c409bcd14;2022-06-25T11:00:57.797Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner2""]";user2;0;0.00018;10886;0 +1;7eb266fae4cf38b200a4f9f3a27d8ba39a1759b1367a0d5b8162f93b58a907e7;2022-06-25T11:01:00.009Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner1""]";user2;0;0.00018;8674;0 +1;8a8f26e2aad74625f1dd084ef6fdcb141421b1c17511721350aaff20bcb49dd7;2022-06-25T11:01:02.244Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset1""]";user2;0;0.00018;6440;0 diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb b/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb new file mode 100644 index 0000000000..e3a085eab6 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb @@ -0,0 +1,423 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "module 'posixpath' has no attribute 'parents'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;31m# Change path if necessary\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mlevels_up\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparents\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mlevels_up\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0mfile_path\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparent\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"/csv/use-case-besu-fabric-6-events.csv\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mfile_path_other_model\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparent\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"/csv/dummy-use-case-invalid.csv\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mAttributeError\u001b[0m: module 'posixpath' has no attribute 'parents'" + ] + } + ], + "source": [ + "import os\n", + "path = os.getcwd()\n", + "parent = os.path.dirname(path)\n", + "\n", + "\n", + "# Change path if necessary\n", + "file_path = parent + \"/csv/use-case-besu-fabric-6-events.csv\"\n", + "file_path_other_model = parent + \"/csv/dummy-use-case-invalid.csv\"\n", + "\n", + "import sys\n", + "\n", + "if __name__ == '__main__':\n", + " print(sys.argv)\n", + " print(file_path)\n", + "\n", + "\n", + "\n", + "# import sys\n", + "\n", + "# accept command line arguments\n", + "# inputArg1 = sys.argv[1]\n", + "\n", + "#print('inputArg1: ',inputArg1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "# uncomment if problems with dependencies\n", + "#%pip install pm4py\n", + "#%pip install pandas\n", + "import pm4py\n", + "import datetime as dt\n", + "import time\n", + "import pandas\n", + "\n", + "# process mining\n", + "from pm4py.algo.discovery.alpha import algorithm as alpha_miner\n", + "from pm4py.algo.discovery.inductive import algorithm as inductive_miner\n", + "from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner\n", + "from pm4py.algo.discovery.dfg import algorithm as dfg_discovery\n", + "\n", + "# viz\n", + "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", + "from pm4py.visualization.process_tree import visualizer as pt_visualizer\n", + "from pm4py.visualization.heuristics_net import visualizer as hn_visualizer\n", + "from pm4py.visualization.dfg import visualizer as dfg_visualization\n", + "\n", + "from pm4py.objects.conversion.process_tree import converter as pt_converter\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "def import_csv_original(file_path):\n", + " event_log = pandas.read_csv(file_path, sep=';')\n", + " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", + " return event_log\n", + "\n", + "def getStartActivities(event_log):\n", + " s = pm4py.get_start_activities(event_log)\n", + " print(\"Start activities: {}\\n\".format(s))\n", + " return s\n", + "def getEndActivities(event_log):\n", + " e = pm4py.get_end_activities(event_log)\n", + " print(\"End activities: {}\\n\".format(e))\n", + " return (e)\n", + "\n", + "def getAttributeFromLog(event_log, attr):\n", + " entries = pm4py.get_event_attribute_values(event_log,attr)\n", + " print(\"Entries: {}\\n\".format(entries))\n", + " return entries" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../../csv/use-case-besu-fabric-6-events.csv\n" + ] + }, + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: '/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../../csv/use-case-besu-fabric-6-events.csv'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mlog\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mimport_csv_original\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mlog_other_model\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mimport_csv_original\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path_other_model\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"leght is\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mimport_csv_original\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mimport_csv_original\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mevent_log\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m';'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mevent_log\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpm4py\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat_dataframe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mevent_log\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcase_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'caseID'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mactivity_key\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'methodName'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimestamp_key\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'timestamp'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mevent_log\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options)\u001b[0m\n\u001b[1;32m 608\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkwds_defaults\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 609\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 610\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_read\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 611\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 612\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m 460\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 461\u001b[0m \u001b[0;31m# Create the parser.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 462\u001b[0;31m \u001b[0mparser\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mTextFileReader\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 463\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 464\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mchunksize\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0miterator\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[1;32m 817\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moptions\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"has_index_names\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"has_index_names\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 818\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 819\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_engine\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_make_engine\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mengine\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 820\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 821\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mclose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m_make_engine\u001b[0;34m(self, engine)\u001b[0m\n\u001b[1;32m 1048\u001b[0m )\n\u001b[1;32m 1049\u001b[0m \u001b[0;31m# error: Too many arguments for \"ParserBase\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1050\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmapping\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mengine\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moptions\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# type: ignore[call-arg]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1051\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1052\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_failover_to_python\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, src, **kwds)\u001b[0m\n\u001b[1;32m 1865\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1866\u001b[0m \u001b[0;31m# open handles\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1867\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_open_handles\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msrc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1868\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhandles\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1869\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"storage_options\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"encoding\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"memory_map\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"compression\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m_open_handles\u001b[0;34m(self, src, kwds)\u001b[0m\n\u001b[1;32m 1360\u001b[0m \u001b[0mLet\u001b[0m \u001b[0mthe\u001b[0m \u001b[0mreaders\u001b[0m \u001b[0mopen\u001b[0m \u001b[0mIOHanldes\u001b[0m \u001b[0mafter\u001b[0m \u001b[0mthey\u001b[0m \u001b[0mare\u001b[0m \u001b[0mdone\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mtheir\u001b[0m \u001b[0mpotential\u001b[0m \u001b[0mraises\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1361\u001b[0m \"\"\"\n\u001b[0;32m-> 1362\u001b[0;31m self.handles = get_handle(\n\u001b[0m\u001b[1;32m 1363\u001b[0m \u001b[0msrc\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1364\u001b[0m \u001b[0;34m\"r\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/common.py\u001b[0m in \u001b[0;36mget_handle\u001b[0;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[1;32m 640\u001b[0m \u001b[0merrors\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"replace\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 641\u001b[0m \u001b[0;31m# Encoding\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 642\u001b[0;31m handle = open(\n\u001b[0m\u001b[1;32m 643\u001b[0m \u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 644\u001b[0m \u001b[0mioargs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../../csv/use-case-besu-fabric-6-events.csv'" + ] + } + ], + "source": [ + "print(file_path)\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "print(log)\n", + "print(\"leght is\", len(log))\n", + "print(log_other_model)\n", + "print(\"leght is\", len(log_other_model))\n", + "startAct = getStartActivities(log)\n", + "endAct = getEndActivities(log)\n", + "timestamps = getAttributeFromLog(log, \"timestamp\")\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "->( 'createAsset', 'lockAsset', 'MintAsset', *( 'TransferAsset', tau ), 'BurnAsset' )\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA70AAAD7CAYAAACmNPNAAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdd5hcV33/8be2qK16l2zJktwt23KvAhdkTDMYiME0E5ogNIWQYAglogREKMEQAqLEYAgYJxCCQwgYgw1yl7tlWy6y5SJZzepd2v398bnnd+/MzvaZOXdmPq/nuc/szs7uPTtz7rnneyqYmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmVklDYqdADMzM+uVscAUYDQwIvMcwE5gD7AX2AqsA9YD+6qcRjMzs9xx0GtmZpYfE4GTgaOBI5PjUGASMKQff28dsBp4BHg4Oe4DHgLay5BeMzOz3HPQa2ZmFs904CXAPOBM4PDk+bUoMF0BPJZ8/xywBtgM7Ehetyl5HI6C4hZgDAqSJwHTknMciQLp2UArsAW4NTmuSx4PVOZfNDMzMzMzs0ZyMrAY9bh2ANtR4PkZ4GXAuAqeuxU4CXgf8CNgZZKGjcBPgEuBYRU8v5mZmZmZmdWhKcBHgAdQkPko8M/ABfRv2HI5HQl8CAXe+1BP8vdQ77OZmZmZmZlZlw4HrkALTW0CrgLmk9/pReOABcBSFJzfDVyGeojNzMzMzMzMAM2f/W+0WNSDwDuBoVFT1HenAlej3t8ngbcCTTETZGZmZmZmZnFNAr6NAsV7gFeQ317d3poJLCH9n+ZHTY2ZmZmZmZlFcSnaG/cZ4C+pv17RY4Br0bDnK9Eq0WZmZmZmZlbnxgA/R0OZvwWMjJucins12jrpGeBFkdNiZmZmZmZmFXQ02kv3aeC8yGmppvHANWjI84cip8XMzMzMzMwq4EXAFuAmtCVRoxmEtmHaj7Y4ao6bHDMzMzMzMyuXC9A2RP9O/H12Y3s5ei+uwoGvmZmZmZlZzXsBCvJ+hIO84MXoPfl+7ISYmZmZmZlZ/x0MPIcWrnLAW+hlaKjzwtgJMTMzMzMzs75rAW4FllP/KzT310fR4lbzYifEzMzMzMzM+uavgd3AUbETkmODgF+jhoHWyGkxMzMzMzOzXpqGVmr+TOyE1IBZaH7v38VOiJmZmZmZmfXOP6G9eIfFTkiN+CywHhgaOyFmZmZmZmbWvWHABuBjsRNSQyahoeBvi50QMzMzMzMz696lwB5gYoX+/tuA24DngV3AMuAjwOSi1zWjlZHvRsOHtwN3Js+VWkl6NPB14FmU/sfR8OzXAB2Z44yy/jepnwB/qtDfNjMzMzMzszL5LvDnCv3tvwfagXcDY4ARwMXAZuCXmdc1A9ei3tP3AOOAqcDlye//HC0iFQxDwfFeYEHydw8GPg+sRMHuosr8S//fG1Gw3Vbh85iZmZmZmdkAPELlFrC6F/XEFvs4hUHvB1Cg+vkSr/1R8rPXFP1+B/CtEq//NdUJeqeigPyCCp/HzMzMzMzM+mkQ2nf29RX6+/+LAtBPAKO6ed2dyetOKfGzy5Kf/STz3H3Jc+eVeP1fUZ2gF2Aj6sU2MzMzMzOzHBqHAsQXVejvHwk8kJxjN/Ab4IN0ns+7k8J5uKWOZZnX70qeO6zEOV9J9YLeh4FPVuE8ZmZmXWqKnQAzM7McC/NRd1bo768AjgPOR3OHjwauAJ4C3lfi9Yej3udSR6le4FJKLXpVKdvxnF4zM4vMQa+ZmVnXNiaP4yp4jg7gj2je7kxgPgoWvw5MS17zUPJ4SC//5iPJ4/QSPzu4X6nsnwlouyczM7NoHPSamZl1bSewA+07WwlPAhcWPXc98Dt0jw7bJF2ZPF5W4m+MB7ahrYuCq5PH15V4/av7k9B+COlfX6XzmZmZmZmZWT/cBHy7Qn/7SeBB4AVoGPBINOd2E3AXaeN0M/Ar4ADwOWAWMBw4C+3xe3vyfTAUzfHdC7yLdMuiLyWvr8ac3rnJeeZW+DxmZmZmZmY2AJ8jHS5cbkeiQPRutDfvVmA52iJpbNFrm9E83ztQD/Q2tAjWP6BgudhoND94NdovdwXwYaq3kNVfo6HNHlVmZmZmZmaWY2fT9XZBtegVVCfovQ349wqfw8zMrEdufTUzM+veTcC9wPtjJ6SGnAGcBnwzdkLMzMwc9JqZmfXsG8ClaMsg69nHgTuBm2MnxMzMzMzMzHrWAtwD/DZ2Qgaoo8RxRpnPcVHyd88r8981MzMzMzOzCnoV0A68NXZCcmw8WpHac3nNzMzMzMxy7kjgHcAPgMdQ7+V6tHLySfGSlVvNwHXAGmAxMA8YHDVFZmZmZmZmBihgmwMsAK4CnkJB7g5gKQriLkI9mdcBq4BDoqQ0nwYB/4oaBP4evT8dwHY0JPyjwOlomLiZmZmZmZlV2HDUE3k5cC2wCQVpW1BQuwiYDwwp8bvj0L66T+DAFxTw/guwF3h15vlpwCXAEgqD4OvQ+34yXlDTzMzMzMysLEahIHYx6rndjYKw1cA1wEL6FoSNR4HvKmBuuRNbQ4YAV9I54C1lNmlP+jPo/d9KYRA8qGIpNTMzMzMzqyOhl/EKYBlagKoDeBz1PF4GzBrgOcYBf0C9l68b4N+qRdOAW4DNwEv78fshCL4G2Ig+n3UUNkI4CDYzMzMzs4bXROF83CdQALUPBbxXoAB4fAXO3QJ8HQXVS1CPciN4LbAWeBgt+DVQ2c/wGtLh5s8l3y9Ifm5mZmZmZlb3WlAv4EIKewm3UTgfd1gV0jIxOd/zwAa0Xc9LqnDeWCYDP0VB/p2ot7cSmtFnHOZcb6FwOPoCPJ/azMzMzMzqxEgUxC5CQe0u0gDoWuIsinQw6kHemaTjQ8B04GdJ2n4DHF/F9FRaG/BJNAd3FfBxNKx5PfARtDBYJYWGjsspzAOPo979BegzMTMzMzMzy72pFM7HPUDnACfWUNcZSbp2oW2NFtK5R/k84A6U7h8DJ1YzgWU2Gvg7FNhvQdsRhQB3JApCt6Dg93Kq07tOcp6w+vZ1wB4K52xXaji7mZmZmZlZn81GC0stAZZTej7uxGipk5koLbvREOaFwNBuXj8IeANwL/p/fg+8EmitZCLL6CjgKyig3QJ8ma4/gwloVeydwNPovSm11VMltVG4OvdeOgfBY6ucJjMzMzMza0DF83HXk+7fuhQFLRehHsY8mI2Cpn3ASvoe0A0CXgz8FvX8rkPB82nkb2XiycD7gdvQZ7IK9fL29rOYhD6/XcnvLkCfdwwjSIPgMFpgP4UNKXnJY2ZmZmZmVsPaSIehZhckWks6H3ceMDhWArswBw2l3g88RnkCuEOAT6AVjzuANcD30UrIMYbitqLg+x+A21FguA34IfAi+j9HejqFDQUL0MJUMU1EjSkhCG4nHU2wGAXI3fXcm5mZmZmZAeotDMHFUtK5lmHV3bzvv3ocabB7Pxp2XYmAbS7wMfQe7Ufv0QoUcL4PzQueWsbzDUdziy8FvgT8GQ1H7kBzk7+Nhl+Xc0GqmSj43Y+GrV9Cfj73ySg9pYbUhyC42kO0zcysQvJy8zEzs9o0DTgbBQnzgKNRL9oKFNDdBNyIhrvm2Vy0IvFfoGD3K2gRqvYqnHsscCZwRvJ4CjAm+dkW1NO8Bg0FfxYNBd+U/Hwr6qEdiXqih6OhvZOAKckxHfUyD0IB6EPArcAtyeNDlfznUJ74GPAmFGB+FviPCp+zr6ai/DsfDUefiRoFbkZ5eCnKx/sipc/MzAbAQa+ZmfVWM1rg6GwUIJyDVjPeB9yHFmsKAcKmLv5G3pyFArKXo0WnPg/8J+r5i2kKChaPQPOKp6BAdhoKasOiTKPQ57IdfQ47k6/XoSHka1Av+woU3D5OvMDtWOBTqGHhNvReXxspLT2ZjfL42cBLUcPBdtRI8PvkuJvqNIqYmZmZmVmFDKdwPu7zKBjciraJWUTtzoWch/6nDhSkXxQ3Of32d2g16VpyOoXv/blRU9M7s9Hc5Ozia+E6CPtEuyPBzMzMzCznRqEgdhGqzO+m9Hzc/i5wlAfzUC9drQe7QS0GvcFZwPXos7gOODVucvokGwSHxqC1FF4nZmZmZmYW2TS0mM8VpNu6hL1Nr0KV+lnRUlde89Ec1hDsnh83OWVTy0FvMA/Nlw3B74lxk9NnzRRuw7WZdHXua6iv68jMzMzMLNdC79RVaCuZ7Iq1Ye/SGFvnVMog1JMb9p29Dg2trSf1EPQG80m3E7oGODJucvotBMGXozwXVskOIyYWoLnwZmZmZmY2AC0U9j5tQBXvbRTOxx0WKX2V1ISC3RBAXUttDZ3ti3oKeiFtqLgHjTy4BjgsaooGLlyLIQgO0wYeR1smXQYcFC11ZmZmZmY1YgSF83FD79IaFPRdjoaRtkZKXzWEYPcuFDBdC5wUNUWVV29Bb9CERh6sAPai0Qn1MkR4OIXXatjLOgTBlwDjYiXOzMzMzCwvpqAAbzFdz8edQ2OsKBsCpIdJewePjpqi6qnXoDcIn+1jKDhcgvbUrSdtKAjOXssH0J7GIQge0+Vvm5mZmZnVidloGOQSVBnuAPZTWDGeGC11cbSi9+QR0t7AWp0H2l/1HvQGragh5xlgB5qDPjlqiipnJIVBcDu61pclz12EVlo3MzMzM6tZzaiXNmyJsg4FuTvQysOh4tuovT+DUbAbev+uovbnffZXowS9wWB0XaxB89MXU//XwUQKV1lvJ12AbjG1u1e2mZmZmTWQNjTf9nI0DzVsebKWwvm4Q2IlMCeGkPb2haGu06OmKL5GC3qDNnRdPA9sRcFfo/R+TkZB8BI0naEDzeEPDWLzUeOAmZmZmVk0k0jn4y4lXcgmbGmyEK322gjzcXujDb0nzwLbUY+XV7uVRg16gxEo+N0MrE++rscVybsT9ttegvJCB7pOrqMxFrAzMzMzsxwIldLs8MTsfNzLgEOipS6/RqBgNwxlvYL6W8RooBo96A3Go9WQt6DpAJfTuEN+s/P/n6Zwq7LLUYNaU7TUmZmZmVnNy87HvYq052UvCnivwFuS9GQkqpxvRENX63nRooFy0FtoAhpBsRN4Cl2HLVFTFN9s0vUBwn7d60mnTnhUiZmZmZl1qxVVGsN83OdRpXIr6llZhBea6a3QW7cJ9dgtBsbGTFANcNBb2sGosWQ38AQK+pqjpig/skFwKK+eS74PW52ZmZmZWQML24ksQkHtLkrPx/Xwwd6biN7PMC9zEfW/Im+5OOjt3iFomO8+4EE07NfXZqoZlVcLUfkVFtEL5dkCYGasxJmZmZlZdRTPxz2AKoWPo+HL7hnpv0moN3cHmoe5iMZZgbdcHPT2ziwU/O4H7kfXtIf0dtZCOnIl26iXLe8afcV0MzMzs5qXXQQmbAcS9sQM83EnREtdfZiB3sudaFhlI664Wy4OevvmGNSD2Q7chlZRt64VB8G7SYPgJbg8NDMzM8u9UKELQ/vCIi/bKNzz0gFZecxEwe4uYBV63z3XeWAc9PbPceia7wBuAs6Pm5yaMZzC6R176RwEe5E+MzMzs4hGUFhh20m6iEtYydR7WpZfGFq6Dy0qtBAYEjVF9cNB78CcgcqCDtTQ9cK4yak5oUxdTDr9Yz+FI2NGR0udmZmZWQOYgoYvLkYV2myvRHY+ruf2VcYx6H3eh95zbx9Tfg56y2Me8EdUPlyHRoBY34WF/kIQHPYkX4ZHzpiZmZmVRXY+7nLSCtfy5LnL8CIs1XAsCnb3Aw+g993bxVSGg97ymg/cjsqOa4ET4ian5k2icCHA7BoJIQj2qA8zMzOzLjSjXtoFKMB6ClWodpDOx70Ib31TTXNJFwm6Dwe71eCgtzLmA3eh4brXAEfETU7dmIKC4CXAStIyO7un+eBYiTMzMzOLbTgagng56oHZhCpMW1CFKczHda9B9Z2JPpN24B68HUw1OeitnEEoLz9MGvweGjVF9SdsCbcELW7XAWwnLdO957mZmZnVtVGkc8OWkm6VsRpVPhfiClFs81CwG1bAvQgHu9XmoLfymlBg9ihaF2AJcFDUFNWv2aSjd55BZctWCoNglzFmZmZWs0KLf5j71U7hVhiXoS1vLL5ssLsU73Uak4Pe6mlF5dBKYA8ql6ZETVH9C0HwNcBGVOasI11t30GwmZmZ5VbxfNwnKFzgJGx14f0e82Ue8AfSYPdFcZNjOOiNYTAqu1ajobiLcVlVDU2k941rSKe4PJd8H1bjNzMzM4uiBbXIL6SwxT4MW1uEhjIPjZQ+69584DbS7VzOiJscy3DQG89wVKY9B2xDwa8XzqueZnRfCes8bKFwCswC4JBoqTMzM7O6F/ZqXISCpF2klZHssDTPx82vQWjY8h2k27ecGjVFVoqD3vhGoDJtE2rQW4TWJLDqCo2rl1N438nuy35wtNSZmZlZzZtK4XzcA3SubHjYWW1oQsFu2K7lWlSRtHxy0JsfI1HAtQVYn3w9LGqKGtsw0hX/r0PzsLPrRFwCjI+WOjMzM8u92WhBlyXAckrPx50YLXXWH2GF2odIt2c5OmqKrDcc9ObPBDTUeSfwNBoC7a3U4mujcEeAvXQOgsdGS52ZmZlFVTwfdz3pXopLUQXiImB0rATagIQVaVeQBrtHRk2R9YWD3vyaiMrHXWgP2gWoPLV8GEEaBIcRSvspbLz1fc3MzKxOtVE4JGwnCnLXks7HnYdWMLXaNRgFu2Hv0auAw6OmyPrDQW/+TUc9ifvQdkcL0CJMli8TUANuCILbSUcwLcaLLZqZmdW0yaQ3+qWk856yK2DOwXsh1osh6DN9Gn3WVwGHRk2RDYSD3toxEwW/+9G0kEtwuZpnk9FnVGoaTwiCPWzdzMwsp6ZReCNvJ62ELUG9fzOipc4qpQ0NUX8W2I0+64OipsjKwUFv7TkaNTYdAO5D5bHlX1iwcQnp3vI7KNx2rzVW4szMzBpZM+qlXYAqWatIb9TZ+bhevKN+jUDB7ho0D/sKVHmz+uCgt3Ydi0bTtAO3oLLYakd2Qcen0L11GwqCvS2fmZlZBQ0nnY97Ldo3sgNtoZFtjfaQrPoXtk/ZiCpiVwBToqbIKsFBb+07HZXXHagx8tyoqbH+mo0amLMLPm6lMAj2cHYzM7N+GIWC2EXoxrqbwvm4C3Frc6MZj/LDJtTYsRj35NczB7314yzgelSGXwecGjc5NkDZIPh50gUhs/dmMzMzKyHMx72CdIuFsM/gVegGOyta6iymCSjY3Yx6GRYBYyKmx6rDQW/9mQfcSBr8nhg3OVYGzRRu/bcZfb5rSBeM9L3bzMwaVmgpvgptdZFdPTLsIzg+WuosDyah3twdwDoU7I6KmSCrKge99Ws+6dY53j+7voQguHhrwOyuCV5Q0szM6lILhS3BGyhcGGMRqgQNi5Q+y5fpqOFjJxoydzma022NxUFvfRuEFri6B43suQY4LGqKrBLC/T8EwWGq0uOkuyp4tX0zM6tJIyicj7uLdLjTtejmNw9vgWCFDkHB7i60GvdC3BDSyBz0NoYmNLJnBbAXjf7xcNj6NZzC+sEeCoPgS4BxsRJnZmbWnSmoxX4xXc/HnYNXd7TSZqFgdzfaI3IhMDRqiiwPHPQ2lhD8PoYCoSVorQerb20oCM7WHw4Ay0mDYK/hYGZmUWT38FuOAtz9FN6kJkZLndWKQ1F+2YfmdS9AQ+HMwEFvo2pFZcEzaD7/FcDkqCmyahpJYRDcjuoXy5LnLsJrO5iZWQUUz8ddh4Lc7WjfxXATGh0rgVZzjkUjAEJDyWU42LXOHPQ2tsEo+F2D1n/wFmWNaSKFOzu0ky56uRgFyB4ZZGZmfdaG5ttejubfhu0H1lI4H3dwrARazToeBbsHgPtRsNscNUWWZw56DXRPuhztB7sVBTpuZG1ck1EQnB1ptpO0EX4+rp+YmVkJk0jn4y4lXVQibC8QNpr3fFzrrxNQXmpHK7VegvOT9cxBr2WNQMHvJrQDwOV4oTvTvO8QBD9JOhLtOrxopjUIV6gqbyi64YxABcoY9L63Js8VG0bpISh70bydYjuSn4FucvvREKc9qFXP+mcacDa6EZwNnISCkRUo6L0JuBGtnmuVMQZdD8NIh+uNonOvZ6mhfFvQ5xW0J8+BeuV3JcemciV2AM4GPgq8ArgF+ALwP6hSYo1nFDAEzdkL940hdN6OKtxbXglcCLyPwnweHEA9fyQ/243uG9vQ/cLq0zjgg8CHUH3gK6QL4cUS6kIjSetCxeX3SAqncWTzbxBGVm1CgdsOStePrGuzSes3LwMORu/lrcDvk+NuCu+jVtpoVEaPIC2zB6PRF1ktKH8X246GomftRNdtyP/h+zzUWWqWg97uDUbzJCYnj2N6cQxJHrsKaqstBMVb0AWzOXNsQRfQ5qJjA/AcsD75nXrXDBxFGuS+EG0Lsw+4DxX+NyXH85HSWMsmov0FpwLjSxwTk8eR6OYxjOruN7ubNADeDmxE18CG5Ovnk8eNaN7canR9DFQYHv8KlLe+iIbGW+0bjPL7wcAEFICMQ/l8XNFzId8PpXMlqdJCI2kIHJ4nze/FX69H+f5ZOgfWll8TgL9FAfAGFPx+m/Lc26ege+UUNBpqcnK+UG+ahBpxRqE83lSGc3alA9VftqEgIeTXDcnX69D0o7WosXoNbljMmo2GPM8Hzkdl1QYUBC9F9aC7qN/3LOTfqaRlczjGFn0/nLSuEmOedOjUCsFwKKs3Zb7Ofr+GNO/X6+fXK40a9A4Bphcdk5Jjaubr8UW/F1rRSwWK4didvGYfqkiECnU2+GwnLaCLhd8rNjxJd7FwIxmEgu3QkhR6AdpQBWxU8lxPQXtxL9pmdOMIN4wQDD+dOZ4ibutxX7WieZPzSVs6x6Kb5W0oAFmaHLX0f8XQCswEDkOrDM9AveTh8SAKbwp7SAPIcITgcivpNbSzxNdhTlJxZW0rag0NwrWQlW11HUt6syr+egS67ickRzY4z/4fe1Hw+wy6BlYnj4+hLahWko7AKDYP+DSqWDjYrT2DUL4+FFUUZyTfT0NB7hQ6r6K7ncIgMhzPo3KnuAd2d/IY7hshOM0q9VypxtZsL/EYlI+H07lHuY3CwDz79XgK6ws7Ud5fg/L9c8n3K0nzv8vOfDkYDYV/N/rcvgB8n8Kys9gQ4AjUKHw4KusPyRzZMnEraf1gA2mdYUvys62kjSvh+wN0HnFQXMYX95g1o7wbyvmRyc/bMt+PQnW4KRQG4dn7wh5Ud1mVOR5Bo7lWoHpbI8sGwfPR/XEt8CfSjoDl0VLXN1PRln+zSRtpDkZ5Ijxm5zcfoOtA8nmUR0OZvSv5ei+FZXapUTdQuqe2VINQGNUWyvQ20k61UKaPSh67C9Czoyb2oc/wWdIGzOdQ3l+JtkJcTR0HxvUa9LagjH0EaUE9HVVOpqMLINhN+sGvRx94aBXMfr2WzkNs6tFIdIOYknkMLbbZBoHpFM4TWkthELwKeBTdRJ6g89CNahoJnE4a4M5DN+s1pEOVl+KhPN2ZhBoKjkPX1KEo0J1BWqiuR5/9s6SB4DPJEb4u1aBTK9pQYDMN5f+DkmN68twhpMHOAfQePI4C4cfQDexSNHf3N8Bn0XBmy6cpaAXtY1Ben43y/SzSBsidaH7c6uR4FpUrz2Qe62XETAgcQmA/nbTyODXzfbCaNABeCTwMPIDuCR5WHc8M4OPA29E9ejHwU1RfOhnl+aOAo1Feb0bl2SqU11eV+Ho1tZHHwwiMELTPTB5nJF/PQvezdvR/PQw8iIK7O5OvGzHvNqP7VqhDvRgFaqEO9Xvgd8RdW2AGyrPHoLJ6FmmgGxpn9pLWR7KB35rM92so3SFVq0ah+kk2wA9leHicQXpP24Pq7OFYCTyE8v4qajwgrvWgdyyqhB+JKuJHJF/PJm21WYc+uBCQrUIV8/D92uomua5MJO0pDzeO8P1M0saFfagwXIEqPI+gm+19qEW43Irn456IWtFWkga4tdRKWU3NwBx0gzsOmIuC3RDMrUcVgdCj+Vjm8JBHNbCEBoHscQTp9bAZVaDuT467k8dGrEzlwXBURhyL8vyc5DGM9NmAyqxsL2Z4XFPtxOZcG2njQKnHZlTxfBiVv/cnj3ehyqhVx+FoWsXbUPl0APUm7UGV24dRRffh5HiE2ghqB6oVvR9Hkwb+R6FAajjq1bsHld93opFhD0VJaVwtqG4QeoFDR0K2jvUbVMcut8mofnIs+nzCY9iTeB2qXz5B5+DtWbof2dCowuilbENB+Pow0rrLdpTfl2ce70aNCDWhloLeaagV8mRUAM1BGX0QKowfRx9AaFV+EN1QXRGPZwi6YELLWziOIw2iNqHPKtxElqPegL7cYLMLMlyALtT9wL2kBfAfqUyAXetGA6ei9+9k0qHe+9CNYznp5xOuL+ufMaQ9h3PQ+30CChTC/PGb0Hv9Z3SjtvIK8/dPzhynokbSrSjPh56d8Og8Xx6tqPEn5P/weBRqlFxDeh+4E42CcJldHtl75IWokXo/CmbvRcHbnWhPVw9L76xUuXESGu22DridtMezEUeMFQfBL0D1v5Wki2L1pw42GtUXs+/7McnPQt0xW1Y/QHnW27BCo1FdPltuH4Pq2oPoXHbfTk47FPMa9E4HzkyOM9DFNAwV0itQ5fDe5Lgftd5YbZlCYU/iXNSI0YoC3vvQAgq3ospPCABC4Rpu4GHBhe0oP4Qbz014Tk4pE9B7dgFwHuqB6UCt+bdmjkYdxlVtTagydUbmOAZVsp4C/oDy8/X4Zt4fLWhqw3ko35+GGhl2oN7F24E7kkc3MsQxCgUQp2WO6ahcWgHcgK6DG9BIE+tZGwpuXwG8FN1vd6D74p/Qe7mMxui9rZRWlG/PQYtfvgDl5Q1oqO+vgP+jMTtehgNnkdbTzkHvVzYIvp7OC4POSl57Lno/ZyfPP4Xy652Zx42V/AesV8agUVKnZI7sZ/YntMvJjahBObo8BL3NqPVmHmmgexCqcN8P3Iwy+L2oJceFdP0ajALf49HFcwa6oFpJF0o5AVVkw1ySpahX7D48bKWUFnRDfjFqgT0RtULfgfbnuxm18tfTHJZaNxJV/M9Cn9kZ6Bp4gHTu1EfcBJYAACAASURBVB/oeqGsRjcXNeqcjypOI1DZ8Qd0E74dNeq4vMivKagH/izUYHEyqivcj3qMrk8Ob8uXmgK8Gm1hdS66n96Ktj+7AZX5bsisnGZ0fz0XeDmq03agMud/gJ9TmeG+tWA0qoecj67n49B78wBaxHEGCnYPQSMNbkN59nYU5K6reoqtv8ah+vtp6DM/CzXCrUaf6Y3En/9ddbOBBcA1qLUmrGR8HbAIuIjOq69aY2pFFZ6FwH+hlv7iTdVPJh8NOHkxBAVLV6DGgg40/H8J2py+1L62ll/D0ee5GFUA2lGvzbXAZZTe96+RNKMK5mI0YqEDVZKuQeWGy4fa10bhNXAAjeS5Dn3GU7v+1bo2FJXp16JGsFAuLKBx35O8GIs+m6vQUNwDqJF+Aen800Y0B+1e8BAqq/eja3oxusZjbAFkldOC7sGXo7Ip7MTxOKqjzqdwhem6MBgNsfkOGkLWgZb2vhbdsObES5rVoCOA9wK/QDeTDtSTcyXwKhqz0GxCvbk/Id0W61bgI2gIs9WPGajcvBFVGHYA/4l6eOru5tGFkN+vIm04fQD4R9RD6CC3vk0G3onqEDvRdfAn4AN03mqwHp2M7ndb0XoA1wKvp3BHBcuPwahu8p+k2/D9O+oFq3eDUI/fEjQVsQMNff0W8DKcZxvNYNJOmcdJG6mvRPf04m1Ta8ZQVAn7IQpM2tFQhU+jIWet8ZJmdaQZDf/8BGpFDfv+XY1aWdu6/tW6cBD630Nj0p9Rxe/gmImyqpmM9t28HuX9Z1HgN7u7X6phhwOfQ5WmDjQ8/8O4YaeRtQGvQXWNrWgK1H+i+az11AjUhAKnG1Devxf4INpOzmrHWNTbexv6HG9DDRb1lFdBO6l8lrRucheqq5wQM1GWO8egXuBbUD55FvgSGgJfE+ah1vew8fhS4EOod8Ks0qYB70PzvkIv2M9Qy1I99f6cgYZ770etZF9GCyJZ45qNAt6wLcNv0fypWtcEXIx6ttvRqI7Po0qVWVYb8FYUGLajtR8+jbbXq1VNwFvQQjAHUK/ui6KmyMrlLOA/0H18FWrArOXgtxV4I2kA8wzwRTya03rncOAzaMGzDrQS+jtI9xDOjbFouN1ylNA7gPejAMQslkmoRfUmlC8fQy1Ktdwyfi6axxZ6uV5Huie1GajS9ErU+9uB8v/LqL1GnyHohvcQquz/EngJNTz8yapqNhoVsAE1fn4DrQ5bSy5EFb/9wPdxQ0+9mgl8HY1SeAgtSFZLRgN/h0bg7EMj7eajBhuzvhqERgT/AE0HeA74FDlovJwJfBctKLEVjdk/KWaCzLpwLLqpbEI3lh9RWxWIE9HQ5Q4UzJwfNzlWI85EK4e2o8VCzo6bnF5pAt6Feqz3oMr+0VFTZLWsDQ0DfhJVyK8k/4s8zUDb3XQA/026N6nVt0NRwNiO7vdHxE1Oj0ai0UVb0VoiX0ErMJuVyxSUxzagufBfQytEV9V04NuoQvI4GpLR6CuIWm0YBvwl6T60V6FNt/NqFJrwvx/dBM+MmxyrUSeg4c7tKIicEDc5XToLBed7Ub4/KG5yrI60AG9Gcwy3okX+8jhK5jK0wulytACQNZ5T0VadO9B0rbyN0mlCo3DWoL12P4J6e80qpQ2NIH4OLV65kCqsDdUGfBV1Nz+BVk/0glT5cT9qGZ4bOyE1oAl4E9riZB9aWTxvW/m8FO1tth54G9W58b0f5aFwVGNBrHKd0/m/Z5egeVYb0ND4vBiBeuDa0fD9avZsdRQdn+jl7/2p6Pc+WpHU9Z2vg+4NQ0PldgAryE9D4nA0v/MAqmc16qq2Me5BedSK5jfuQw2WeamfnICG3O9DUwaquVr6M3Qur8OxHwVEv0D7xNYil909G4W2t9qF6u8VG712HurV3QC8h3y2kDayk0kv/q9GTkstaUYt66vRcMpXxE0OoOD246jy8yMiDOVA8yerXeEYyDmd/3tvJPAvKMD8J+LPkT0GjbxYC7w2UhpGkOaf9fS86vu8zOs/V/SzJrRTwcPJ360mXwe9NwMN/d+Leg1iGo8W/1lHfSw+Vw4x7kF5dBqaK3s/8Ue+vBcFGzcQb8pJKKs3Z55rQcOq/yH52S5qb6qly+6+mYXK733Axyjj/PGhwDdRBem/0Phq65+HUS95JXyddL/KteR7BcBKvg/9NRYNde5AW19Uu7IaDAN+jipi74+UBqi9oNf5v+/ejObI/JZ4Q9NeD2xHq/zHrNCFitSq5PFDPbz+N2iOaFdB7zLgEcpTjvQlv/g66JtBqId+P3AN6m2ttoPR4kUr0eqlJg56UwejfchXEWee7wi0Ddh+YBFxG0pLBb1Z1yY//37VUlQeLrv7bhC6V+9BayAMuINoAqqMbALeMNA/ZhXLKK2od+KtqCDoIB89ll3JywVTykWowLmb6lfCh6AAZANauS6mWgp6nf/77yQ0wuFmqt/Q8zY0muEK4k+TCRWpD5ButdHVaKYTUY/cpykd9JZbb/OLr4P+Oxe9d9dT3cB3CBoV8AD5X1yr2hz0FhoL3IoaSKq5hs5otAPAWvIxCqGnoPefkp//pmopGjiX3QNzKmoQupcB7M4yGm0m/QReObNcKpVRLkYLcwxDrVsdaG5QXuXtgik2Cw23XAFMruJ5v4MKvDwMy6mloNf5f2CORBWan1O9BVNejHoNPlul8/UkVKSOQlvudaAVpEv5TzT94KPkK+j1dTAwx6MGx2uo3nXwLfSZeY/1zhz0djYZNVL+kurk0Rbgd8k585JHe9vT+6WqpWjgXHYP3Ay0l/lt9GM9hEHAr1Frd173tWtGwz+XoQUpNqEg/Uuki6C8hMKJ7vOAt6NVEfcmz32t6G8uRL18O9GwuzuT54qHczShvS9/gYa57UHv15Xozc8qXpghe1zaz/Nn/VdyXlBLXAfKkF0tfPA2lDGeR3MflqHV94oDvN6+rrfp7u37kAdT0PDEm6nOMJNXoykEr6zCuXqjqwpH8XW3A113XeXR3lynXZ2zhc755JclzuH8P3AvRHNj3lmFc01Erdo/rsK5eisb9L6WdF/v4jx9FMrDYygd9Ja655R6/hwUOD+J8sz9wFuKztXX/OLrYODORdfBe6twrpAnXlWFcxW7gcL3/Znk+XcWPf/tzO/0tuzva72rK5W6B3X1+uJ8ORc1RK9G9btHgMuJv/fsOajB8M1VONdn0PuVh4b4oKs5vTPQAnUd6LPODnUNZXUoE7M2ZH7215nne5uP+1O2F3PZXR6HoyHi/9rXX1yAPtQzyp2iMmkGfoUu/I+hYagjgQtQRituAfoa6VzNf0TDiA4DniYtfJtRC9FutFDXuOR1l6NgpLgX5JTkby5Jzt+G9k59FC3jXqqHsLvWkb6eP5iAPquwb2tT8n91AH9V4vV/n/y9d6OK2wjUyrSZwoCit6/rT7rz2EpUyjGowP/7Cp+nBY2o+EGFz9MXpSoc2evugyhfjEL5bB/wvxQ2EPT1Oi11zuPRe9PVTcP5v3y+gioAPS3iNFBL0MIsoyp8nr7IBr1NaAhhB/DGotf9EPhi8nV3Pb3hnjOvi+f/hPLLWNSwfEMXr4fe5RdfB+XzBfT/VXq13GWoshvLEah3aS0wLfP8X6LK79DMc30t+6F39a7ulPse1Nt0h/M+iPL9eNRQ95Xk+R/0Iu2V9l20sGwlA/AjUJnygQqeoz+yiw4WH3vR6ImuVpTuqsx5M52D3qC3+bg/ZTu47C63S1G6T+vtL7SiVr/eFEqxhHlX3y3xs5fRddD766Lnv0z6f4a/+fkSf/NHyc9ek3nuFFRxL84MoZXmMyX+TncZpa/nDz6IPq9s4RfmNNxW4vX3oqEqxT5O4YXQ29f1J915vmCKfQr17FSygv5adFM+pILn6KtSFY7wWX+vxOu/mfzswyVe39vrtPic56PC/4Ju0un8Xz7jUSPPuyt4jgmoxXlBBc/RH9mgF9RC3gHcR1rGzwS2kS7mOJCg9ztFz78wef4bJf5Wb/KLr4PyGYnK/I9U8Bxz0XtSse02eukNpBX1ZmAOarQvXlCrr2U/9K7e1Z1y3oP6ku5w3n8s8Tt3JT/r7p5UDUcl6XhRBc/xLdS7HXt1/2JdDW+ejEbMPYEackq9NwMJenvKx/0p28FldyXcQh+Gh78I/ZMzK5WaMrgTpfH8nl6YCJnxbb34m6X297os+dlPenGuMZS+QKD7jNLf89+JLpCs40lbvornYfxv8vwn6D6Q6+3r+pPuvF8wWWNRK9zrK3iOK4E/VvDv90epCkf4rEvdTM5OfvZAidf39jrNnvMNqOJ5Qg+/4/xfXv+BWn0r5Y1oqGCs1dG7Uhz0tqLe6A7SKQf/iiqCwUCC3uI9kg9Knv/vEn+rN/nF10F5fQ8t4lkpH0YV82rNHe7Od0iHai6n9L2ur2U/9K7e1Z1y3oP6ku5w3lIjHT+S/CwPKwM/SOlApRwGocaPvOw9ntXTnN7Tkp+vo/NojYEEvT3l4/6U7eCyuxLeiRrwh/b0QtBF/WQlU1MGO9EH0dvl/UNmnN+Lv9ndsazod16PVntcjVYhzb62VBDTXUbpz/mPTZ4/vsTfuy/52ReKnj8SFfIdSVp+g1qaiodj9/Z1/Ul33i+YYndQ2UURbqvw3++PUhWO7q67GcnP9pNW5Pp6nYZzfhUNPetAqxl2xfm//C5HW6dUyhfQ0Mm8KQ56QfOZOtCKqVPQPKfZmZ8PJOh9YdHzE5Ln/6/E3+opv/g6KL93AVsq+PeXAL+v4N/vi6GoV6gD+GkXr+lr2Q+9q3d1p9L3oK7SHc5bvDYLFPaMx3Y1WlOmEiah/zMPqzUX6ynoBfVwdgCXFD0/kKC3p3zcn7LdZXdlzEHpPrb4B6XmA4yi+8yUJx19fH1vPqTDUQFY6si2hHwOFTo7USvi0OQ1YSn5/rbg9vb8kAYE4YaVPY5LfvYWCj/nFcnPzkfDTo9GW4Y8BbyvH6/rT7przWYqu4/pCFShrld9vU5PQwtnrEe9a8ULXgXO/+W3jcpuhzEiOUct+C6a43w66gH/JeVrEGgv098BXweVsAXl1Ur1xA5HPRF5sJu0V/sCyr9acp4rx90pNaw3Dz3zwXYqt/5CuAdsrdDfr7Q1yeMhvXx9b+ZG9zYf96Vsd9ldGSHfdqrLlPqgVwPTu/hZXjyUPJZqiRvo3+ztRRJWd3xX8rv7evE73VX++3r+ZuBNaOJ5qUw6GQ3LPYjOQ3tCT/QH0DD2+agA/TqFC1r05nV9TXf4u7VkFqXnRpTLempjj8burrvw3MOkn29/r9M3ka54OBRtIVK8d6bzf2VMQ8MuK2Ut1d//ur92okoCaCjkF7t5bSV1l198HVTGdJRXK5XGjVR3O7zuvBJtIfZONK//Z3Re3KmvZX+llPMe1FO6S5VT05PHR7pPZlVMQXWHSlhH5172WhLqU88XPb8HTV0pbryIUf9y2V054Tp9rvgHpQLbP6DVu86pZIoG6Mrk8Q0lfnYZyth9vaGEv3lZiZ+NR70TCzPPhfeuuDWwu4yzHV1w4Xf/kXSiel/P/2LUEv3vXZxrHelk9ewQ0SeBC4teez3ai60JrVLYl9f1Nd3Q/fuQN8cBh6L/vVJuRa1xeWpFLiV81sUr2kJ6Lf6gxOv7ep0eSB5/i+YszUGLjmQ5/1fG+Sg/VsotaIjwoRU8Rzl9E82d+xFqiImhu/zi66AyLkDb1VXKXWgxq+LGvGqbiYZavw7NU/0GcBad54r2teyvlP7eg/qT7leXeC7Md/5ZF79TLc1oRNRdFfr721DvY/G1XwtORwHdfjpPIXgKlTfF9fQYC5O57K6cC1FH1RO9/YU/ojkLea2EF2+FMg0Ny34NatlZVPT6ruZXlfqbB9DQ5VnohnQW+jBvp/AG9c/J3/wtGjYwFA3JvDV5/oYS5/jX5GcXojkTD5DeXPp6/qspXFSllHOT8+0gncj+JKrEvQANjRmJWnrD/qlNfXxdX9Pd0/uQN79EhX8lRz6cgN6P2CtCZvVmu4jRKF+9B410+C3db1nU03Va6pxNqCGuA22lETj/l99JKF2VXBE0LBCVt90BSs3p7clA5vQWP9/dvK/u8ouvg/I7Gv0fF1fwHBNRo99be3phBbWiz+Y9mecGo8+qHXhF5vm+lv3Qu3pXd8p9D+ptusN5/4yGgU5IjrBl0Q/7+f+U0yvQZ3RYBc/x1yjgmdjTC6usqzm9k0hXb+6g9FaTYWGmn6Ke8onAJ1EDV09zenvKx30t2112V8YI1MNbavX1Lp2CutUvr0SKyiRsOH4nGoa2BX1A2daKMEm8+OjqZtaMCrk7kr+5DX2Y/0DnseFhM+f7M+e/DhVG2XNlNxCfjBYeeB4Nb/pR0d/tzflnFv39/V38L1eX+L9/jCa3fwktJrMZjX1fjrZYyq5019vX9TbdWT29D3nxDlQQVDIICH6NFi5orcK5ulNq8/HsIgbF191OlEc+ROfKQ6nXl7pOLy5xznCDeKzEz5z/y68JNXTeQuUbO9+D7i9zK3ye3nqGznmlVF4OSuXXDjQ89CUlnt9M6XtRuK5+XOJnf5E5X6n8chy+DiohNLJlK4WV8kM0THZwhc9TSqigZ/MuaG5vcX4JK6D2tuzva72rWKXvQT29PgS9R6BFFZ9B5dVjqE4cewufJhSIlNohpJzaUAPl1RU+T1+UKqvDsRsFetfQ9aJTTWix3kfQ1nkr0P0oLGQVjsPofT7ua9n+t0Xfu+wur2+gtTj63FjzN6jC/+aeXmhWh16BbnR9ai0agMNQQdPVXm5mlbQI9TydWIVzNQE3Ao+iqTRmefE5dB1UY+GWmWiYYLXuMdY7pXqY82QRCvCO6+F15fBiFAf8TRXOZTZQb0UjIEpNqeuVL6IMX7x5t1k9eycKeL9DdYf4X4Iu2DzujWf16z0o3y2o4jknA6tQy3Jxq7NZDH+LroO3V/Gc70Z1rNdU8ZzWvTwHvS9F+aWaZfXfoOui1Iq/ZnnxJjRlYcCNiAvRRfa/5LMQMCuXMWhRjw60amuMFczfi24wV9D9EEuzgWoCPovy2ycinP9QFPiGrRXMYhiC5qi1o3mf1fZNNNTSgW8+5DXovQANUf23COe+HL0n3yId7m6WBy3AYlR+l22HhbNQxWQz1W1hMquWl6H5IqvRZP+YXonmvv6J/GxrYfVlJJqTs5t0Pl8ME9EKm7vQHHqzajoYzWPfikbaxDAI+DKa2/dXkdJgPc8ljuk1qIz8MfHW/XgVmsO5HO2oYBbbwWjBuV10XmF6wIaj3qcDaHXnF5T7BGYRnAL8D7rB/Rvq7c2D44DH0bLrsSpjVp9eihZlWQ2cGTktoJbaL6GW2mso7/7rZqW0oOGaz6MFBA+PmxxAq822o17ntshpsXwYQjrN8MvE31FlFlpEazvwcWBY3ORYg2pFK21XpRHmTNItRH4PnF3Jk5lVyElomfZ2tM1UV6v9xTQO7Z3YjlYzzkPFzGrXdODnqOz+GTA1bnI6eSlaVXMH2kbCFSqrhPNRoLsHDYuLvVdu1l+glUcfRSPsrHGdiPLpVvI1CmYwaqDZhlZ3fhPxg3FrHBeTrr79BapYfp+Lhl92oD1p34BapczyqgUNE/o/FEjejoY1591ZaK/gXcDXUfBi1luTUW/BdjRNJU/7QRcbjOaPbUXzfT9AvoISq10vIB3Vcy35bUSciraj2Y96fT3FpbGMQ726e9Aq97PiJqdLU4DvoV7ou1AMEHvLRatPTWgP5ptQ3f1qtPp9FOejif/7gHXAP5Hfm4k1pploK4rVqID+DfDymAnqhxa0yNUqdDP8DjA7aoos7w5GU1J2os3a/5baaZicirbv2gGsR/sFjo+aIqtFTahn4GYU7P4ZuDBqinpnEPCXaJ2JbSj/j4iZIKu4ocDfoSGb69D9PsZimn01F01L2Y/qJx8GRkVNkdWL4eg6eATV3a8lH1OyADgIDUlbhSLxP6Mx156fZTFMQ3O2/oAuljVoKfOZEdNUDoPRUKdHUUPTz9Gw0OaYibLcGIQaIn+CGkeeQr2ltTpUeALwaTTkcwfwA+AcPJzOuncQ8DFUWWpHU1lqcSrWcPR/bEYNV59Ei79Z/RiDgt2n0Wicz1KbQeNM4J/RKJ0tqBf4HGojcLd8OQP4F2AjarT/NnBk1BR1oxkNGb0K2IRuOLcBH0FbVJhVygzU0LIUBbrb0DCIV1N/w26agUvRonLtKLhZhBuZGtVUVDl+DPVo3QK8DTWS1IM2tLLtHej/exz4FHBIzERZrgwFXo9G8uxHDSXfoD5Wmp2AGm03oGku36E+/q9GdhiarrQNBYlfQY31tW40qofdhcrqJ9FIu6Mipsnybxa6pz+C8s1yNNVpQsxE9VUzMA8NsXuOtLKyBK1IOzZe0qwODEcLUC1GWwu0o96ga4HLaJzhYIejgPcp0sJiEXBEvCRZFUxE+fxaYC9qZFwCnBAzUVVwNLrm11CY30+OmCaLow24CDWyb0aNndeh66JWRzd0Zwj63x4g3VJnIe79rRXDUN33WtQwsxJV7Ou1Lnw0KptXktb/r0D1tnrriLC+m4Py/1JUf9+I6jDzYiaqXFrQsLsvoNb6A+iivxn4TPKzkdFSZ7VgOFqM5JNogYe96EK5By38cCH107PVH62oAvgDNC+oA7gTrbR4Ah4SWg/moLm5N6O8vxX4KVr1dWjEdMXQgob2L0Hz9TtQT/eX0f2k0d6PRnEk2lP1OnQP2AP8Ds39mhIxXdU0CHgx2rd1B3oPfgG8lsZp7K0Vw9B9+SdoqOYu4D+S5xplWlITcB7wVTQ1qwOt1XAVGp3hxdoaw3g08vK7pI3Wq4Bvovp7S7ykVd541OL1HdJWoP1oldpvAW9FNzdX1BvXoWg5/G+gFu19KJ88DVwJvBEXll1pRZWiJaSjLNahAOkdeFhorZiGenauIg3sNqL8fxEO7IImNA9oMfAQep92oTn9n0Qtx+5ZqE2zgLcDP0L7lneg4aA/QyvGjo6XtFwYiepLv0d1qN1oh4L34XI+lmnAu9Bc8h2ogXIpsID67dXti6PRlMc/oTzbATyI6v6Xkr/t9Kx/JqKGuK+j7bcOJMdtaJ/nudVOUJ4CyoNQpeXM5PFkVKHbiOYG3IPetPtQpWZfnGRaBbSgobjHo4tgLvr8J6GW/LvRXrq3ormKq+Iks2Y1ofd0fnK8ALU+P4p6DG9B7+0DqECyOJpQZSCUg2cCx6BenJtRpfb3qPfen1P3pqOehfOTYzqqfN6Ktiq7HY04ejZWAq2kYWgP9VOB09B2bYegHrKb0RoGf0Sf3f5IacyziWhNlYtQo+dI4H70nt2AFhjdECtxdWwMuq+eg8qdE1Gj2/VoKPOvUaOldTaS9L07B9X9WtDcztvQ/e4OFAPsjJRG69lQVM88JTlOQ/WZdtSZeSMqg5aikYhR5CnoLdaKbn5noALkeDS0bzAKhB4kDYIfRhfIkzgYzrNmtMLf4WhRg+PQRTIHXTD70Gd5L2mgexdqubbyGYoqk+clj6eiG892dHO5Bb3/96E5OA6wym8Q2nLqeFS+nYFuEqPRjX0Z+hz+iCqqvtkPzGGk+f00VP40oaD3DhQE34fmBz8ZJ4kNZxQq+49FFd3Tk69bUGB2O6r03pA87omSyto1BAURL00e56JyZzl6T29G5UxY/M56bxaq2J+F3tvjUXkS3tvfooB3V6T01bIRaGTOPFQ3OQXtXbwf1fuXoXrhg6ihfn2cZDa0cajsPgaV3aegsrsVjcIJDRVLUf1lS5xkdpbnoLeUVlRZOT45TkBvdFjxbh+qsDwCrEA9WY8mzz2NgmWrrFa0P+ghqPf28OTxCFTJD3Nu15E2WtyHAt0H8WcUQzMqvEIP4+loakEzumkvR5/R/cnxCNo/0hWl3jkI5f9jUUNPaMAbgVpBH0OV+jCS4X7ci1Vpo0hbo09Lvp6e/GwbKovuR3n/AfQZPY0bgPpjLJqqcgzK98clX4eht9tR+X975lhZ/WTWvbEokDiXNAhuQRXSu1BFdRn6LB7HHQig92cW6eizcIxDZUEIcm9EQ3Xdi14Zs0l7EE9BDcVjkp9tQJ/DQ8njgyj/PoPL64FoQrHVYajHdk7mMUwr3IrKi2WZI8zZzqVaC3q7MpI0uDocVdjD9+HC6EBzG1ehystTybEKtfY/hwIxB11da0XDpyaTBrYzUGVxBurFnUK6L9tW0oaHbEPEI+So5cdKGoYqpnNRsBYamsIqobtRIPAY+kzD10+h66mRWriHoMB2Oip3Dssch6MF2EBDerKNB/eim/SOKqfXShtD2vN4LMr/x5Hm+b2oAfXxouNJtChHo1Z4h6HK0cEouC0+whzGPahimm1QWA48QY4rSXUsDEfMBnNzUKC3D5XnD6HRVw+i+/cq6rNnbTxpQ/3RyXEUqksORsHTw6hhIBz34LI7pmmojA6NaeHrccnP96L6yMrkeCJ5DHX+tTR2UNyE6vJTUd19FmpcmJ18PRPVbUAr44dGhezjU9VMcDnUS9DbnYkUBmczk6/D98ULIW1CAfB6dFGEr9ejSuvmEkctBsqtqJJXfIxFc2knJo9TM18X75e1gbTxIDQgPIUaFZ5E75/Vl0mkjUuHFR2jMq/biOYwPYUCgmdIG5Y2Fh157FFoQRWh7DEB3WinkQa5U9F7EmwnbQDIHo+g98Fqz0SUv2dTGMzNpnDBlT0oz69Glao1yeM6dO/YWPSY5wrXSFR5DPl+XPI4BQW34XEqaSUTFASsJG0QyH79JB7BkHdDSQO+Y5LHo1F5H0Zp7UKfZbjfhyBiPcrra5Ov8zAtaQhp/WVy8vU0VP87JHOEFa/3oTy7HAX5D5IG/g5wa8MkVF4XB3Gz0X07dMq0o7y6BpXZz5GW1xtQGZ09tlbtP+i/kagOPy5zZOvy0zKPk0lXD+9A70FoGMg2EjxOHdVdGiHo7clQdPMOBeKUWq5KugAAFmtJREFULr6eiDJTqfdsJ2kAvAtdHAdQAH0g+X5P8rqdpHOT9qFKcrHNdG75LrXiXxvpjWhw8v2w5H8aQRrYNqO5gkNJg9u2En+PJM3rM8fqEl+vQ4FtI/XmWc8moWspBITTMo8HJY+lVlrdim4ym9D1sDt5rvjrEBwXXx+7KKxgDSHtXQ3GoGu3Bd0YRqLrofjr0ahyP4bOtpEGNc8kxxpU8VuNronnSvye1a/hqNI8lTSPh/w+FV0PEym9Z+xmlO+3oAr17uTrkJ83J49hPnf23pH9G9lrIXtPCMK9oxk1TLWha2QM6f0ifD0eVZSK/0Z7kta1pPk85P9nSQN95//61ELaYRACxez3U+mcx7eh/LIF5dPtKJ9vz3y/FzWEbMv8XnG9qDhPh7pNa/L1mOSxLfP9KFR/yzbEgq6n51CZ/SSFgfsqVNHPYyOslccQVCeZgsroKRQGgqERezyd6/r7SQPgHShf70V5d0fy9SbSuj4ovxXXk8Nrg1AnyRpKej1ly+jBKI+PSL4eg+5BIcAttUPB86QdeKGH+5nkMZTZT5GPRqqKc9Dbd6Mp3UMajmEoA7egykbI0KEini3AQ2bOChWTYtvo3EqevbjCjSJcZCFI2Jz83lbSilR3h1kllepBHY8Cg9AYMwxdAyNIr6dwTZW6PkIlKCiuREF6/YRGqO3oOtlW9PVW1LBT3Bu9kdoc0WH5MIy05zT7OAHdU9rQvWA06X1hLIWVn3ANBE10bkQqVckKjbDtqKK2k8Kgehdpg23ohc72SG/A9wbr2QjUSfBFtHjWp0gbE0NgGo7wfSudGymzeR465+nQKBTK8i2oDA/HZlSWT0L7OX8KbW/1HJ3vC2ZdGVd0ZHtQ21A9ZAjK39mGxGz+LdUIOZq0txnUaFlcvmbrMCH/b0F1/tB4tCf5vZ2onN5E597p5/HUETMzMzOzsnodqmS/KXZCEt9EgfERsRNiZmZmZmZmte0w1Bv19dgJyRiCVqa+g3RRHjMzMzMzM7M+GUp+g8sQjP9z7ISYmZmZmZlZbfoumlM4O3ZCuvB6NKf94tgJMTMzMzMzs9ryBhRQvjp2QnrwfbSwz8zI6TAzMzMzM7MacSRaKOpLsRPSC0OBe4DbKL21i5mZmZmZmdn/1wYsB26l87YseTUHbfeyOHZCzMzMzMzMLN9+iPZyPiR2QvroHWg49kWxE2JmZmZmZmb59C7gAPCS2Anpp6uAdcBBsRNiZmZmZmZm+XIcGiL8udgJGYARwEPAjUBz5LSYmZmZmZlZToRg8QagJW5SBuw4YCewKHI6zMzMzMzMLCd+DKwFpsVOSJm8Fw3Tnh87IWZmZmZmZhbXB1CAeEHshJTZT4DngKmxE2JmZmZmZmZxnArsBj4ZOyEVMBp4HPgDnt9rZmZmZmbWcMYAK4Hrqd+g8BRgD/D3sRNiZmZmZmZm1TMI+AWwBpgSOS2V9iFgHzAvdkLMzMzMzMysOv4WBYIviJ2QKhgE/BfwNDAhclrMzMzMzMyswk5HQ34/EjshVTQWeAL4NQqCzczMzMzMrA6NA54E/ofGC/5OB/YCH46dEDMzMzMzMyu/JuA3wFPA+MhpieVjKPA9M3ZCzMzMzMzMrLw+jgK+s2InJKJBwK+AVajX28zMzMzMzOrAOWjhqoWxE5IDE4FnUfDbaEO8zczMzMzM6s4kFOT9Nw7ygnOA/cD7YifEzMzMzMzM+q8J+B3wGDA6clryZhGwGzgpcjrMzMzMzMysnz6DA7uuNAHXAY8CoyKnxczMzMzMzProfDSE992xE5Jjk4E1wM9iJ8TMzMzMzMx6bwoK5q6OnZAaEBoH3hk7IWZmZmZmZtazFuBPwCN42G5vfR7YBcyNnRAzMzMzMzPr3hdRAHdC7ITUkBbgz8AKYGTktJiZmZmZmVkXXg60A38ZOR216GBgPfBvsRNiZmZmZmZmnU0HNgDfj52QGvYy1GhwWeyEmJmZmZmZWaoVuAm4HxgeOS217qvAduDo2AkxMzMzMzMz+RqwDQdq5dAK3IwaEIZFTouZmZmZmVnDeyUakvuW2AmpIzOAjcC/xk6ImZmZmZlZIzsU2IyDs0p4LdABvDF2QszMzMzMzBrREOBO4F48DLdSvomGjR8ROyFmZmZmZmaN5tvAVuDI2AmpY0OAu4BlyddmZmZmZmZWBa9H83hfGzshDeAwYAvwz7ETYmZmZmZm1ggOx0FYtb0ONTJcHDshZmZmZmZm9WwocDdwGzA4cloazfeA54GZkdNhZmZmZmZWt65Egdes2AlpQEOBe3CDg5mZmZmZWUW8HQ2xfVXshDSwOcAOYHHshJiZmZmZmdWTY3GwlRfvQI0PF8VOiJmZmZmZWT0YATwI3AK0Rk6LyVXAOuCg2AkxMzMzMzOrdQ6w8qcNeAi4EWiOnBYzMzMzM7Oa9VfAAeDC2AmxTo4DdgKfjp0Qs0Y3KHYCzMzMzGrMEGA4WqG3DQ0pHpH8rAUY2cXvtdH1qr47gT1d/GxTia83A8cAvwP+CVjUi3Rb9b0X+AbwEuC6yGkxa1gOes3MzKwRDAcmABOBsckxEhiVPI4ERgNjMt+PQsHsMLQdzdDk6zzainp8twH7UXC8LTm2Jo9bkmNr5mebgQ3AxuRxb7UT3gB+ApwPnAisiZwWs4bkoNfMzMxqUTMwGZgGTEXzWSehwHZ88jgp83WpYLWroHBb0c/2opWR9wHbM4/7k9ccSF4XbAY6SpxvD+rRLWUUped+ZnuRm1BgPggF56DgneT7QcnPm5PvR1EY1I+iMKjv6j1ZhwLgbDC8AQVszwHPJI8buvhfrNBo4C5gFXAByi9mVkUOes3MzCxvmlAQOys5DgGmAAejAHcaCnizQeImYC2Fgdo6OgduG4DnKRwy3KhaUNAcGgayjQUTip6fhN77bKC8GwXCq4uOVcBK4AkcGAenADeh+b2fj5wWs4bjoNfMzMxiaAOOBA4lDW7DMZN07utu4CnUs/g0hT2Nz6Kg61lgV/WS3tDGoEaHcBxE2tM+BZiePB8aJLah4Dd7rAQeBR5HveWN4kNo/vV5wNLIaTFrKA56zczMrJLGArOBOWjhpfD1UahHF9TrurKLYxUeDlprWkmD36noM88es1AddD9q0HgQWI4+7weBe1GwXG8GAb9Avb4n4l5ws6px0GtmZmbl0Ix6bk8ETkoej0dDY0FzXlegvUsfSr5eDjyJF09qNCOAI1DDxzEo3xwNHE7aw78KuA/Nhb07eXy66iktv7Hof3kIeDml536bWZk56DUzM7O+akLByumkQe7xaMjyXuABFKjcAzycHM9ESanVkhbUC3wMCoJPTI7DUJ11A4VB8M3UZr46Hfgz8DHgK5HTYtYQHPSamZlZT1qAucA84Gy0/cp4FOA+BtyZOZahebhm5TIS5b+TUUA8Bw0RHoLmdC9Fi0QtRQFxe5xk9slHgc8A5wC3RE6LmZmZmVnDaQFeiFaZXYqC2A60YNTPgA+i3t1SW+yYVUMbWhDqU8D/oeHzHWh++P8AH0YBcl4NAn6FhnGPi5wWMzMzM7OGMA14B/AfKHDoQCvsfht4Cxp2apZXzcAJwAeAq9FQ6A40Z/zbwMWk+x3nxUTUkPQrPPrSzMzMzKwiDgU+QTokdCfwvyhwOCxiuswGqhk4A+2LeztaAXwPcB3wTrSgVB6cg1axfn/shJiZmZmZ1YupwELgVtQTthb4JvBSYFjEdJlV0kTgzWgkw04UAP83cCkwPGK6ABahKQQnRU6HmZmZmVnNGoS2R/kt6lXaAvwAuBDPy7XGMwq4DPgNsA/tCfx9tAJ5DE2oB/rRJG1mZmZmZtZLw4F3oz1B29GCP68FhsZMlFmOTERDi5ejkQ/XoQaias+xnYxWov5Zlc9rZmZmZlaThqG5uhuAXcB30DYvMSxDwURfjlqfT3w28EdgI+n/9L0qnv/+5Jxzq3jOWjcIjXz4P9RA9DAa+lzN4Pc8NBLjnVU8p5mZmZlZzbkErVi7FfgH1JMV0zI6V+IvRkHZ1UXPj6H2g95DgO1oKPkUtMfs96le0HsyaaD91Sqds97MQcP/DwB/prpzbT+PGqrcYGFmZmZmVuRo4AZUUb8SLViVB40W9C5E/8PFkc7/ddIe5rVoz+W8ehgt4JRXJwM3oWvqO8DoKpyzBQXaK1CDiZmZmZmZoUV5tqOtWU6NnJbe6CrorQdfQf/bCyKcuxVYD7wV2Jyk4xUR0tFbeQ96QcOb34jm2z5OdXp9D0af479V4VxmZmZmZrn3CTQH8Uso6KkF9Rz0fg39b/MinPtiNKx9GBpS3YG26MmrWgh6g8lokattwAVVON/L0HV9WRXOZWZmZmaWWx9GQy/fHTshfdRT0PsSChe2mge8Ha2wuzd57mvJa5tQgPALNJd5D/AMGuI9o4e/ew7w8eT3dqIFoN7SRZreBtwGPI/mXC4DPoKCoVJ/u9TCXM1o+PPdyfm2A3cmz2W3jurL////2rv3GLmqOoDjX3b7oqV0S0tbWghtrFA2bcG2mohKCIL4hxhDfGAU0EQjUkBNTDQ+IpKiRjG+EhVNNCgaYxQVFYsEn6CilKYWKaCkpaUtRVZ26YM+oPWP37m5s3fv7N4ddndmdr+fZHI75945c87sNJnfPef8Tq2fpX5DJEU6RgSVsxvs03Cvq9q/a6j/WV1Wp62tYBLwPeIzeOUYvN8Xic/wrDF4L0mSJKnlvIYIeD/U7IY0oOpIbzZqegtwI7FOeSmwgzzoW5OuuRlYBMwALiD2PN3NwMCstt4/AVcRQeESYk102Sjtx4hRt/cR645PSH3oBX5ep+5iHZ3AL4kg9CrgpNSfj6S6f8rATMFV+p+ZSwTEF6TnHem6Y8D7Sz6Dqn2qel0j/Wunkd5MB9Hv3dS/mTBSphDf0T8DO4FHgW8SCdIkSZKkcW8j8OtmN6JBww16i/28if5B7zYGBlTZSOcNg9T7rUL5ean8a4XyTUTQUfRxqge916byz5TU8/107tI6dQ3W/8x1xAh3R03Z59Pr7yt5z6p9qnpdI/1rx6AXIqHVk4x+duwriRsGR8hHwg8TU9iXj/J7S5IkSU31cuIH8OpmN6RBww16393Ae2SZoMtuDGT1vrVQviiV/6JQfkcq/wRw4hDvWy/o3ZDK15S85op07od16qrS/w1EkFtrJXmwtKxwrmqfql7XSP/aNegF+DCRJXvKKNU/C9hP+RTwI8A9o/S+kiRJUku4jhhpalfDDXovHOK6twF3A7uIKd+1AcLvB6n3vEL53FS+vlB+JvAg+RrZ3xB/g8GmTheD3gOUBzC1j/vr1DVU/5en61aWnPtnOvfZBvtU9bpG+tfOQW839T/zkXAJg3+WRxn6BoykpGPoSyRJUovpIpIKTRSDBUbriOD5APBaYBox1Tnb47Q47bnW0Yrv/wiwglgv+20isdBXgO3A2op1ZF6a2lT2KBslhaEDwyvTcRMDg6MV6dzl9P/dV7VPw+17I/1rRz3pOFrrersY/Pt5XLpGUgUGvZIktZ8dRGbiac1uSAu4Oh3fC2whpn6OhmzU+FpgMTH6ug/4KrCwwuu3pOPpI9yuTuAdRPKoskBzPrEOdBFxU6BW1T5Vua6R/h0bxrWt5ox03D5K9T/G4L/Tn6O9Z3tIY8qgV5Kk9rOeCHiLiYEmouy3TGehfCSDy23AxYWyu4Hfpvc/uUId2VZCZfuuziH2f/1AA217HZFR+Qd1zj9FnnDqyprybVTrU9XrGunfPmJv6exveCPlSbda0RXEFlJbR6n++4jp38+XnDsCfIe4mSFJkiSNW98FHicS3rSb4a7pLa6PrfWldM2dxNTbacAq4G+p/A/DqLfemt5twEPENlEziKnTbwSeAR6g/yDCYFsW3U6sOV5HbJE0HTiXCHD+np5XaWetHwHfGOQ8wPmpnv3k60Cr9qnqdY307+upXRcD84i1w2XZn1vNK4hgtCzAH0lnEIHvC8QU94PkidaKn6UkSZI07swjtqhZz+hlkB1p51CelGdd4brlda57U0mdncQI4mZiXW8fcBfwhsJr31mn3iy50q0l596czp0JfIHYJqqX2DLmX8R2SNmaztfXafNNhbauBf6R2rqXCPQ+Rb4GuWr/FxfOlY0IQgTFxXpurdinqn0fbv8y84HbiPXpPcTWRmXXtZLTyP/fDbZefKRMAt4CfI7IoF1MviZJkiSNa6uJQOROYoqrpNGzjBj53oxJpCRJkqQxs4pIaPMwcHaT2yKNV5cRswjuBU5qclskSZKkCWcekVjoMLGdTDuu85Va0VLgx8S08JuBqc1tjiRJkjRxdRCJdfYATxPrXIsZjSVVMwO4nkgetYWBGawlSZIkNclsYrT3CJFE6D24n69U1QLg08RWTz3ANUQyKUmSJEkt5ixiL8+DxA/4G4gf9JIGOpvYBqz2/8ucprZIkiRJUiXziZGrPcQP+p8Al+Lor3QycDVwD7FmdzPOjJAkSZLa1jTgXcDdxJ6uvcTI1kW49lcTx0zgcuAOYgnAPmLf4osYm313JUmSJI2BhcAHgfuIEa49wC3Etixux6Lx5iXAWuBXwAHgEHA78HZgehPbJUmSJGkMLAU+CvyRGPl6HvgL8ElgDZEVWmonxxPZlr8MPELc2OkDbiOmL3tjR5IkSZqgZgCXEPuRPk4EC88CdxHbt1xIBBRSK5lJfDevJ76rzxHf3ceITOYXAlOa1ThJzefaBUmSVM8K4HzgVcCrgUXAYeB+IvnPX4EHgO1Nap8mnk5gGbAaOJf4Xnancw8R38t7gd8BO5vRQEmtx6BXkiRVtYQIMrIguJv4LdEDbCQC4I3p8W/gaHOaqXFiKrAcWAW8LD1WEutwDwEbiCA3C3T/15xmSmp1Br2SJKlRM4Fz6B+UdAOTgL3Ag8To28PAlvTYhsGw+psKnEmM4C4j9pg+i/guTSYyLG8iv6GykfhuHWlGYyW1H4NeSZI0kqaRj86tJA9kFqXzB4nkQlkg/B9ga3rsHuvGasxMBk4jZgssBs4gD26XENOWnye+B9kNkizQfRRvlEh6EQx6JUnSWJhFjOZ1kwfC3cDp5EmGDpIHwFuJUeGtRFKtXcTWSi+MZaNV2VTgFOLmxpKax+J0PJWYAQCwnwhkH6H/TIBHiTXjkjSiDHolSVIzdTIwUKp9LCT/vfICEfg+ATwJ7CgcdxPri58m1nzqxTsBmAPMAxYQf6tTiCB2ATF6uwA4ueY1h4nkZltLHtuAp8am6ZIUDHolSVIrm0oEVmWB1qnko4vFrZT2EcHvf9Oxp3DsI9Yd7yW2ZeqrKRtvo43TgROJNdgnAl01/55FBLVzyYPb2ufTCnX1ElmRd6XHTvrfeHiCuPngiLyklmHQK0mSxoMuIhCeQx60zSVGIGuDuOw4i3y6bdEhIhDeCzxD7Pnam849k469qbyPWG/6LHmgdzSVl8leV2syMaJa1EkEppmpRAA7hdhTOXvdJCKIzY6T07Ervb6zTlueS+3sIb8ZkN0oqL1J0JPKdqfXSFJbMeiVJEkT1fHkI6Cz6D8CWjsSmgWfHen5celagNnp2EX+uyoLSouyoLSoNqguyoJqiGzF+4iET3uJIPtZ8iA7qycr7yUP3rNjXyrfi9mPJUmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmq7/8mvAZmTZ6wxAAAAABJRU5ErkJggg==", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Execution Time : 0.001\n", + "Execution Time (ms): 1.402\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABKgAAABZCAYAAAAaXByKAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd5wU9f3H8ddtOeohEIKIWKLYEEssPzVobARNxA5IYkNjQWMsoLElxp8tloi9/4LYRawxGgu2EDVGY4IoFgg2LChFmnB3uzu/Pz4z7t7e9p292d17P32sx83Mzn73dm7uO5/5fD9fEBERERERERERERERERERERERERERERERERERERERERERERERkc6mIegGiIiIiIhkMSboBkhVeyDoBoiIiH8UoBIRERGRauUE3QCparqWEREREREREZGKc1AWlbQ3BgUvRUTqTijoBoiIiIiIiIiISOemAJWIiIiIiIiIiARKASoREREREREREQmUAlQiIiIiIiIiIhIoBahERERERERERCRQClCJiIiIiIiIiEigFKASEREREREREZFAKUAlIiIiIiIiIiKBUoBKREREREREREQCpQCViIiIiIiIiIgESgEqEREREREREREJlAJUIiIiIiIiIiISKAWoREREREREREQkUApQiYiIiIiIiIhIoBSgEhEREZF68B7gFPC4KKgGFmBb4GVgJdbW+RV4jbWBOHBTBfZdjOHYexwacDtERKRKKEAlIiIiIvXiB0CD+zgjw7LTAmpXoe4BPgPWBIYA31bgNY7ArgHGAl0rsH8REZGSKEAlIiIiIhK8rsAmwHRgBfAusHEFXmccMA3oDRxYgf2LiIiIiIiIiNQVBxhT4nNPd5+/foZ1J5Ec8ncSNtxtsfv9/e42/YArgLnAauA/wP459jMeuBZYimVBnZe27YbAY8BCYDnwKLBjhv14j6dSnjsSeMNtxwLgZqBXEe/FMwyYCWzgrn8mw88mX1sLWZ+vzZdmeL8fZWlLJmPc54iIiIiIiIiIVFylAlQAPd31HwKjgR5YgMcL6lztPr7nbnsoFmzZPMt+ZgL7AU3Aye6yXVO2+4+77/5Y9tLVWKZU+n6OSdv//kACuADoA2yFZVc9hw1bLOS9eG4jOfTxFawW1TrpP5gC2ppvfSFtLqcGlQJUIiIiIiIiItJhOiJAdVsR+/wzlgmUaT9/SlkWxgqd/9b9vivt30sEyyxK3096gOp9YFbaspHutnukPTfXe+kOLMGKpAOc6D7n3LTt8rW1kPdSSJsVoBIRkTZUg0pEREREOrO3ith2MdnrQqUGZOLY8Lf+7vergdeBP2AZTt2AGFYMPZdB7uu9mLb8NffrnmnLc72Xg4E3seGHAFOBVqwmVap8bc23vtg2i4iIAApQiYiIiEjntirL8iHAw8CX2HA1BzgSG7KWyYq071tp29feC6vVdDXwDfAEsEOetvVzv6bXqPrKXb5u2vbZ3gvAUcDdKd8vwupcDQZ2Sds2X1tzrS+2zSIiIoACVCIiIiIi6aLYbHrrALu53zcAd5CsoVSsJcBEbIjdrthQub9hBcezWeh+vdx93fTH4QW+9nrY+5hM26DRvu76cUW2Ndd6v9osIiKdjAJUIiIiIiJtbQCshQ2Dew8bsgfQpcT9DaDtEMB/AMcCjcB2OZ4333397TOsmwkcUuDrjwPupX2wqCcWUBqDFVYvpK351hfa5kSBbRcRkU5CASoRERERkbY+Ar7Gsn2GYBlCI4CflrHPocBpQC9s5rvjSdZzymUi8GPgLGz4XD9gElaY/LECXtfLWro4w7qVwFVYoGpUEW3Nt76QNn/hft3UXf8FuYN1IiIiIiIiIiKBKHUWv29oO5RtStr6sWnrHSzQkmp7bNjacuAT4BZgWsr2AzLs526sSHjqsrnu/vYBnsEylpYCM0jOaJder8kBdk5pywjgVSwI9CVwj/s6+d7LgLTlW6e9x0vT1j9VQFsLWZ+vzZ4bsM9qqfvvQmkWPxERERERERHpMKUGqKS+KUAlIlKHNMRPREREREREREQCFanw/sPAFtjY8o2BNbECjN2xdN6VWCHFd7Fii59WuD21YCdgQtCNEN+NDroBJdLxWF1exWp41KIJ2PEk1WkSdnxJeQZgdX7uAl4MtikiIgXbDatTdi42HFPKo/5z7VD/x6xLMm6zDhav6Q18i8VsFgAfYBNgzCI5cYjvKhGg6gWMIsLBwK7E6EGYBOvQyiBC9CREE2G+ppWVOMwDFtEIQBc+pZmngPuAl+ics3usgxWpfDDohogvBgE7Bt2IMuh4rB61fByBddZ2xGZ7kuoyCqurow5aeQ4FrsVuzh0F3IgViF4RZKNERHLoidUhOxFYBhwAnIzVC5PSqf9cGzpz/ycE7A6M7RJh7+aY1Qfs10TLD/pDzy6E+jURWb6a+IrVJOYvJvHpIqLxBKFImBXAS7E4D2HH+PIA30dOmxDmdsI0EyXG/sS5DodZOLTg5PxvKQ4v4PA7HLaiBXBo5HPgDKAp4PfV0TSmvr7U+udZ6+2vJ9PcR62q9fbXM9X4Kc+awEPYTbVbsAu+0dgMcB8CewbXtLqg41MyUf+kfDtjGRFLgOOwjIlLscyIJ4C1g2tazdPxWRs649+XJuCMxjBfAM4P16flvINwXvgtzrI/4Tj3ZH+03Ikz6zKc647E2W8b4tEw8XCI1eEQt2Oj5arGQMLcSwMJNqSFm3BYkicgle+/2TicjkM3WomwFEuRrPRwxGqhE1p9qfXPs9bbX09qPcBT6+2vZ52xg+aX1EBU+gxm6YGrznbDzS86PiUT9U9Kly8QNYy2gSspno7P2tCZ/r5EgImRMMu6NdJ6+j44sy/PHZDK91h8K85NR+Ns2J+WhgYS4RD3AGuV29ByiqQ3ACcSYQ4DOZipNPABUcbTfpLeYm0GXAHMJ8KZ9KKRK2jkLWDbMvcsIiIiUi4v+DQVeBir2/B82jYLgIOBQ4CDgLdQNpWIBGtn4D/A8cAJwD7AZ2nbvAxshQXWb0LZVCK1brvGCLOiYS47ez+aPrueyBW/gM3K/K3u0wPG7wkfTCJ630k0DOzN6EiYOcD4cvZbaoCqDxEeJcR1nEl33qeR0WXsLZu+wEXAO4TYiY0I8Srwa59fRURERKRQo4G3gW2A4diFXq46U9OAocCbwLN0zmyqI7G6NiOBIUDXYJsj0ul4WVMvAXOwc9KtObZfhdXQ+zGwEXbOUzaVSG1pAE4JNfDqsI3Y6N0rCF8wygJLfgo1wCE7wvtXEv3NSHqEGrgxEuYRSkxbKiWkNJBGXmENfsbThLgI6FbKSxdhMPACESYRJczVhJhC5xnyJyIiIsErJGsqm86eTTUYuAZ4HHgHmxXoK6ww7RTgPOAwbDKFNYNpokjdKiRrKhtlU4nUpnA4xK2hBq763YFEpp9LeMMK/3Xt1ggXj4EXfktD3x7s0xjmdWx2wKIUG6DaiChvsiEbMosIw4t9uTI0AKcAjxAiwmFEeBAFqURERKTyis2ayqazZlO9Qdt6LA3A97GZPQ8HfgvcAbyCTXG/GsvyeNzd/kcd1lKpNecBP8WOJ2mr2KypbJRNJVJbouEwD0VCHPXYRBrOP9iynDrKjzeFNy8huuGarN8Y5jXsvFGwYgJUA2nkBbagLy8TLb/8VYn2BaYTJsJIwkzGOjkiIiIifisnayqbzphN9TrZ+2shIErbPmkXLOtqH/f7WZVrmtS4I4EnsYy8D4EHgN9g06f3CrBdQSsnayobZVOJVL+GcIjbG8OMnH4O4ZE/DKYRa/eBl88nMnRd+jWGeZ4iiqcXGqDqRiPPsh79eYYofUprqG92AR4hDBwK/D7g1oiIiEj98StrKpvOlE31ObCwwG0dbObDWdhsYgDLK9EoqQsbYnVOdgGuxrLvjscCyUuxY+9x4EwsaNM9mGZ2GL+yprJRNpVIdbugAX7+6ATCO28SbEP69ICnzySybj/WbIzwNAXWnywsQBXiGrqwMc8Q5XvlNNNHewPXE6KB86j/O48iIiLSMSqRNZVNPWdTRYEfYhevt2JT1ifyPKcVCwJOcJ/7aiUbKHVjKfB3rM7ZEVjQam1gP5LBmQnADHfbd4A7seIhO2MZe/WgEllT2SibSqT6jGho4NwbjyY0Yougm2L6NcHTZxFtjLBZKMRVhTynkADVfjgcyx1EWL+8BvpuPDAGhyj30bnTeEVERKR8lc6ayqbWs6lCwGZYcOBaLLC0DHs/VwKbAPOAWJbnx7DMqalYcOEaIF7ZJkud8zKnzscKhKyJBVAOwn7f+mD1q2ZgGXpe0Oo4YHP8n5t8DDDK5316Kp01lY2yqUSqR+9omHsP2QHn2N2DbkpbG/SHO8YTSSQ4nuTQ/azynXy708gNjCXOgf400Hc3EaInfQhxYdBNERERkZrUkVlT2dRSNtVA7KL/fCwI8DUwG/g/rM1zsAvX7bDhV7sCVwGNafvxhvO9ixVCP9zdl0glpAetvocFRI8BpgMbYMME36Z9VtbmlFf3diQWGHseC9j6pSOzprJRNpVIwEJwSY8urHH9Ub4H131x0PZwyI44jWFuBXrk2jbfG5hIlAFMIuxf83zWB/gjERxOwt8TvoiIiNS/oLKmsqm2bKq1aBuMWoBdAD+C/eyWABdgNYB6YRfyR2AX9v8imQn1Om1n8ksfzvePyr4NkYzm0Xa4Xy/s9+9X2PG7LZaN9DZ2rKcGrX5QxOt49dR2dvd1KXku0vIIKmsqG2VTiQRniNPA8VcfQeR7PYNuSnaTDiMUDtMfODnXdrkCVD2IMIHTiTDA38b5bhywETHCnBN0U0RERKQmVEPWVDZBZVP1wi6gT8Eu2t/Bsk7+TPJicxKZg1F/xwpUZ7MYC2w57uN27AJfw/mkmsRoX6OqCQsA/QYLaA3Hjt95tM/K+n6GfTaRDGZFgQgWmP0Q+/0pVjVkTWWjbCqRDhYOcc7g/sQP3znoluQ2sA9M+BmRSJgzgayhtFwBqqOJ0JNf+98434WAc2nE4VB0EhQREZHcqi1rKptKZlP1oH0w6husJs+ZWI76NKzQ9PdJDuu7DAtGfVvCa76CXVj/D/YzX1TWOxDpGK3Y78etJIf7eTMHXoZlVo0GHgO+on3QanfaDw+MYkMMpwB/c/eZT7VlTWWjbCqRjjMo4TD2dwcRDZUzCLmDnLo3REL0xFKMMsoeoGrkOA4lXDWz9uUzFuhJAjg06KaIiEhVGIZdAA8JuiFSNao5ayobP7KpIrTPdlqMBaPOx2rvPA7sDwygfY2pheW9he94dane8Gl/IkFZTvsaVQOwWlO3YAGp8Vj24RQsyJUu5G63IzDT3Ve2AHQ1Z01lo2wqkco7vKkrzpgdgm5GYfo1wdidCHWJcGy2bSJZlm9OC0NLSjoNSiNwKFEmczTNXB50czq54did3i2wuyalWhv4BLs7dIIP7SqVX++nM7gUu/MO8FPgqSrZv46l2rMdVrPGMwGyTk8bwu5ub+p+fwNwEsnOfyn3lAr5rHRc1ZbRwI1YptRw/AlMzcWKLHtexi4ku2JZBJ7XsIvQckzDMi1uxD7v24DTsQvlVGHsd2HbtEdXd9u3sNo6t7pfZ9O2NlQlfVji83bytRVSD6rxmPgKC8I8kbJsXSxA9eMcz4u6X08Afo79Xt/pLuuOzTZ4Btbn2Z3yA1Mded7ysqkex4ZFvo3146ox8ytIg4BPMyxPAF9gWXNnY32OaqD+T5XoEuXow3cm0iWaf9tqccQuNEz5G1tis/++m74+W4Bqb3rTyi7U0FsFDgRuYhPsl6ba7ypIfkdgF5hjgdPIXdtCqsNZWEes3ckm4P3rWKo9b2CBpSnAkViH/UagOcO2o0gGp6Ikp7KfAfStYBt1XNWGNbFj50AsqDMR/4bzDQb2wi4cn8IC52DHQnfswu8XwHs+vZ6XTeUF20Zg58UwsL37+KH72t8C/8YCvTe5X+fQccEoP53qPkRqzSfAxlDQhFPesL87gKOwWTF/jw2xPQH/gjodfd6CZDbV77Hz0f7YsD9dr5n5JPs8o0jW5+kN/MxdPhT7GVYD9X+qwzrNrQw+cPugm1GcXTeDpm60Ll/FXmS4pss8xC/CcIYTLmsy1SAMA6IksLsLQQsBv8Y6xlKacdgd497YhYWUrivWuekXdEMCMg4dS34ZgAWMenXga76EDTk6Osv6s91tOto4dFz5aX/A7yT1jqg19TR2Ibk38MuU5ZdiWRB+XuR5UmtT3Qfc5b7+POAcrDZOHywr4jTgHuADajM41aCHHjke1a4fhQ9rS2BDAR1gN+Bud/lW+J9xFMR5q1ZrU43GAv9B+Aa4F8tA2xLLyKsG41D/x0+7Yn2UQgLZqfaIhkn8aKMKtKiCQg0wfHPCkTDDM67P+KwGdmBYzgLq1ak7sCUx7A5i0BqAa7FCic9hv8hrVPD19sKmaF6FpYg+SLKjfxLJWXNOwu5cLHa/vz9lHyOxrIXV2F3am2l7EdoPuAJLDV6NjYXfP60dl2KplgCz3Nf4qIjX8AxztznL/f6oLO97Q6wo5UJs6MKjtE1Hzrc+X5vyvZ9aEcXutn+JdUoOp+OnLU89RhdhF1Rr5dku/VjOZDzJ49vB7uak0rHkr77YnbyF2DTzB2EB0Eq6DTuXnkn7zN99gY+x81Gq1PPeMRmWjcfO0UuxO7jnpTy3kM9Kx5X/9sd+9z8BLqS82mEdXWtqIna+moQN1dgDCyBdU8HX9LKpjsCKNHfFMi+8GlMtFXxtESnMdmnfx2hfj+obLNtxKtYv/woLpJ8FbELlhnUFcd6C2qtN9XPsZsB/sb5CEOEALxjr3WS4mmR/Zqi7bFTKssPcZfmuAQvtF6VS/8d/P8Ley5fYZ1vozbrttl6fWLfGirWrYnbehFCoIfNQ7UxBqN600ofNKtyqShlKI9GCZsLoKCHsLsifgK+xX8SD8feCbiTwJHZgD8IO6mYsMAZwPclgxESsk74OtJmjcX+skOOTWNBgBBbNfYTkSfG3WKBjB5LBqqm0nXnkLOAn7r+3cJ+7fhGv4RmH3TmaB7yKFYRdJ8N7fwgLZAxx138ETC9ifb425Xo/tSiMReinYH8QHgQOALpU+HW9Y/Q57HMYhnW6/kbbQFm+YzmT27E7S7/CPp/709aPQ8dSJUSxz+tBLOB4B/aei737U4hm4HJgPZKdLs85WDAjXep5L9OyE7DPbxA2C9P/Yp8XFPZZjUPHVSUksJ/DmVhdsdnY1O7F3DUOYoa+ZVgWQi/s/HoNlvHXERlLd2N/hysx05+IlGd7LCD1Mfb7eSuW9XsQFqRpIpnt+Al2A/Ff2LD1y6jsOSTI81YtZlNtAPwOy0b9N5adOrDCr7kGNtxyJHau9+pUnUryb7/nQWw4aKp814CF9otSjUP9n0poxa6vT8Ru1n1Knpt10QhDtxhEDYanYNOB0BKjL5aFl9d2gMNcnJr87yIcumYsMtfRwrTN6vAerVgHfDV2ItkX2tT6GkPxfxjew4qepupJ2+mbe7r7vS3LPt7Hos+pRrrP2SPHa/8Zi2anGk7biH6xr9Eduxvs3U050d3m3LTndnWXj0lZFsEi7IWsL7RN2d5PIUr5PCuhiczHYwt2PK7AMpr2pW2GSint39R9zt4py96j/c95a3e7M9O2y3csp+6/G/BXkhky6erpWJrmPoI2hOznNge783YL1tlODTyX2v4p2F3Bblih0PdJ3lz5CfAX99/e3cTU49c77x2TYdmfUpaFgZVYEN6T67Oqp+OKDG0IymQsuyDbsTUTOIXsQ+e9rKkEdgz2zLJdJd2KtTVbQf9KG43dDPuQ4mf6C2G/ZyLinzXIf+NmZyzosYRggjRBn7e6Ydkwcaozm+ph2v9dSpDsQ7+G/W1KDQ6V2v+fkuG1Ytjfx/QRJ5n+9vejbQYV5L8GLLRfBOr/VMrZWGwg/bNvdr/OwWbVTZ3cgK4R5l9yCI5zT+09Prjyu/e4TfoPI3MGFVgsvxb1BeJVfecwgl20dSEZGV6IjfceTvHj6QeRzERJtQIrtJgu/eLf28fGwItpy19zv+bq5C52n5tPMa9xMHYn2CucOBW7QBmX9tzVWNHXP2Cd8m7YSXzNAteX877rRRQ75npgJ2jveMwUYCiVd4y+lLb8P9jdu+Fp2xV6LPfAOjJLsToKmehY6jheYKgX9vOdgQWUrsFmECvXKuCP2M/Z60ycC1xQ4v5SOz1x7LjvX+BzdVx1LO/Y2gK4Ehvu+Sp2Ied12IPImsrkE+xY+CXB1ApJrU1VSDbVICxjYir2O7B7pRso0sksxf7GZNIdC8y8hF2ADiWY2e2CPm/VYjZVA8k+9LbY36YvsQylIyhvpMxKkjXWumJZeBtjN2kGlbHfTNeAqQrpF6n/07G87KjBWJ93Lik36+IOvfr0CKpp5embvIXYrgRSpln8eqb8v/Y0ATF6Ag8E3JJCLuxTL+jGYmm9S9xlW9A+apyJV/R6cYHtWpVhmbePk9xHOu+P1RDgImycbH+S7zG99ksmhb4G2Fjmu1K+X4TNMrIvVvh1Rsq6vbDo/tVYuul07IL1tQLWF9OmcgV9PGabsTOVdxJcA/sMjiOZuTQEG2pTilzH6KKU9cUey9dhJ+lR2FDA1zJsU2/H0lCCP5YKKY7uHUtrYinjJ2P1BT7G0q8/KvG1b8Iy7s7BOkergH+WuK/04EUr2eoytldvxxXYUIVRPu6vFPlqTjWQzET4H/dxPZYxtBYWjDmDYAJTYFmh+2E3n57AAucjAmiHV5vqUKyeyHDswvNF7IJ4V7ddI7FOb5xk9uGS9rsTkQrYDctY6Y0FNO4JqB3Vct4Cq021DRa0uxk7by0g+BniNsizPjVD7sfYZ+vVGdsHeIb2dccK1YwNJxyPXReeg2UtlSLTNWCqQvpF6v9Uxqbkjx2k36ybFIvTMPNjWL4amipdDdZnKe1td11Re4XQ86mGwVQda6H7tZyp1L19XE7mGVIOx+4STMfGCO9G8q7BHRQWjCvkNcBqzOyGpbKmpjju664fl7bfJdiY6rWxTndXLANnwwLWF9omKU+uY/R7KeuLPZYvwjpVM7EMxO5p63Us1Z9vsT/KW2Azl2WqPVVpOq4kky7Yhd0x2LDjW7AhqMcG2SiXVy/uSex4exK7wBnsrg+T7PguavdsEalX1Xzekrb+635NrRKdcL+mloqp5AzL6v+Ib5wcMZtMWRUrvvt/OSGPoCwHIqygNfDxpGEsVTGXGPYZLMOKp9+JXbDfT2HZUwDzsTG66UXsBmLF69Ymf4dzPlb7J9PshzOBS7AsqbWwmT5Sp57NVFw7kWFZIa8xFTu53Uv7Qsg9sKyLMVg2xkpsuvtnsYtVsIJyx2In8e3cbXKtn1pgmzK9n2IFfTw2kX8a2BYs82Up9r7vwo6f+yk9ewqSx+huacu3xv6QTk/brtBjeR52d8crKHo5be+yjKP+jqW3Cf5YGoIVr87FO5YWYO/7TpKzvXxU5uvfgGXJvAe8Uua+csn2WY2j/o4rsNojQWfnTcbuImbj1f1owDLnbsfOT8uwIQI3YrXpjiH3xAqVcAFW/8obQnGG25Y/YneXO7I25lDsZ7Mddve9L1YQN0LyxmS2oqrfVLx1IgKW0TgUu9FyJ5a1/guSQ6c6QjWdt8BKS0zGajmNJ5jhjpk8jBW0z8YbwtmABVimuN/fgWWl+cGbOTC1RtPX7tcBKcu29On1MhmH+j+Vcjbw+zzbeHGDWdjvyf2RMHO2Wo+mWsueAsv6ci1LX5cpg8o6J7Wa5L0ECLd/o1XEKwDbjAWl9sPSGI/ALtRLyQE7HbtovBALcK2HHbh3UPjd0IlYWupZbnv6YcGoiNvOj7AT4eHua3XFUoB/mmFfX7hfN3X38wV2ssn3Gl5E/OIM+1yJnUB60jYNcyiWmtkLS5M+nuS45kLW52tTrvdTD7ziwyuxk7N3PB6PTVPuV07i6dhdn4uxY3QT7E7dXGzYVup2xR7Ls7ET+4kkZ/PQsdTxvID8MqxztgsW1D4FCyD6ZQV2/Bzg4z4zyfRZbY+OqyB4x9Ys7OcxENgJu3jx/t4XW3vJT8OwC6vLU5atwIanNJG9Rl4lXI9dbHqfv3cTqZHCsuY3xOp+DEAF00UKtQY2fH1rrI7bgVhttwlYf+Y6bAjTX7BhbO9gtfQWY+e0EHae78jaS9V03qqWWlzFSJ3A41/Y5zgAK959J/4NS+wC/BAb8hjH/rZ5PgC+wvq/fbG+0ZE+vW469auD0eJ+nYv97AdjwdJrgAXhBpYtWRlU08qT0u6lhWzfG3B4qqQ59IL/70gcojxbqR9mEVJn8Yu7jxbsF+pgshfPK3XWh72xMbursbsvV6a8xljazwqQaUrHEVjh2dVYob97aFuMb3vszsByrKDiLdhFgbfP1Aj+DViwc6n773yvMSCtfVunte3StPVPucu9sd0L3deaQdsZAfOtL+R953o/+VTjLH7e8diMzSR5AJkz4aD49qd/TnenrEs9Rhe769bKsI9cx/Lpafu/3t0+ddmX1OexVI2z+Hmzkq7EgogjyD5bUbHtH0Tbzylbrbueads52PDPk9KWvUj7c+HdGV5nbsq+Uz+rh6jP4wqqZxabySTrIbW4X2cDv6G4ehPlzGRXrNTzTWr9jgNof1xWMqiaOoPhZKzTP5e2P8t8j9YMy5qxn+Vc4A3sRtrDWIbW1VgGxkQsa200dpPgf7ALpXWxKXdqcgps6RQi2DG6AZZ58iOsLs5o7Jg+FauRcxkWMHkAC4C/gWV6LMJ+5zL9Pi3D+sozscDLo9jNm6uwTImTsZvTXu2ebd3X6YiZ7KrlvAXBz2BYiNRZ/Lzz5L+x8+zALM8ptv+c3hdJ7bN/hQ3NzjSr+nAs4Pkt1s/ZNuW5T5H/GrCQftGKtO/V//Hf2ST/VntfP8UC3Fnrc0bDPH/0rsHPyFfK44kzssckMtcOirKIy+nLqeX/tDvctrTwJjdjd+2D5A3xS2AnjLuAR8gfJRyDpSz6MXuaBK9aPs8mrLMUx4a+3I11lpbneV61tF+SwZ3RgbYiOcSvFetE34V1nPLdLayW9kt7DnAIwae4T8YKsH6KBTzvo/ThxWtiQ/4OxAYi9cEAAApdSURBVKbWPp3857ta5Q1v9LIfnk9ZtzN2EXUAdv6Ptnt20gJgRywbpJf7NfXfvd1HpnXeI5sE1v9ZhZ0rlmDBr2+xv02r3favcP+9zF23GrvwcEgOP1yBnX+852daJ7UrSnKqpt5Y/6M7diMt07re7vKmlO3yLevl7ifXwJil2DnDOy6XuI9vMvw709d8ZT6yGYYFgL+PTQpS7ZlEpeoOnIcNK3wKC0515PDGYjyM/S2ZR/Jv05w8z1H/uTZUS//nbGzY4kIsCHcfmSd/Snfddhtw3OsX1t6NoElPwtlTWdQS+64g/ncyz+zl8E9eZgSn1lgR9W+BWUQofVYnPznY3ZEHaDteWCQIrVgK8DSShQdFSrEYq0PwCBnGjYuU4TEsM7eQTlk+3kx2XvBmBMHUpqqk9CDcRNrPwvR397EBdgF4AnZh7hWaTbWY8mvE9SYZrOqKBQJ6kAwQdHOX93GXdXe37YHNDtzkrm9yl3Uld+Arm1zBKz/XtdL2Z+4F4DzLaRuoqIYCGl5QxxOh7XDYrrQd3tmTZGCzkIBRueuKtQzLOFhG8ue/1F22HOvzNGOfWQv2eS2jffBpRcqyIP+2vYwN4fk9VgJhf6o7eFOK1FpTJ1D9QThvUpZ/B90QqVuvYBnIL5CsaVaI12d+zImrWqBbjYWoZrxHIuHwaqZ1mQNUMZ7lWfYkQaimQlR/B1oJYR9u0BLYmHORarCatrWeREr1JXYHUcRvj+XfpGjTsKHpN2JDc+olmyo1a2o4bbOmMpmH1fG4CCvEPBGrNeUVXQV/bl58Q2UKrYdJzk61Blazxwt2+bFu7SKe57f0oFY2XoAMCg/mpAeb/LIaa3ecZDDHy9LOtO6TtHVeRl2m5xW7rh6twn5fH8eyqd6mPrKp0rOmdqc2Am/VUF5B6ttLJT7v+dY4oVfmwJ6b+9qeiko48Nxs4rH4dxNltZE5QAVPsZQrmUH7+bSq2UM4dOF9mvk86KaIiIhIVainbKpCsqZyWYFd5N6G3a09Favj10B1Z9fGSWYfBZ2FlBq8ypVtBMnsILAgV6ZssNRtculFssZfavAnl9Rsr1RLSc5+lRr0gdxZYfUcFKpG9ZRNVWtZUyK1YH6XKB88/E82rqUA1YuzYfkqosDTmdZnC1DNppFZ3MlQdq2RsbMtwP3EaGZy0E0RERGRqlPr2VTFZk3l4mDFaZ/BZgX6Ff5M190ZpAbLRCqt1rOpajVrSqQmNLdy+90vc+Gkw4h0yVVlsorc+XecLhFmNcd4L9P67AP4WriNe0lkndi92twHrCAE3Bt0U0RERKQqedlUhwAHAW9R+Zn+yuXN0DcVK9a7BeUFp9LNxQqpT/RxnyLiLy+b6hYsm6rSM/35YWdsBt7jsaypfVBwSsRvdy9fTcPUfwTdjMIsXA5TXyXRHOO2bNvkqjA1mTjLubYCLfNbHLiQVhq4G534REREJLdpwFDgTSyb6hbaFoquFqOxjIltsKyp4yluSJ+I1A8vm+rHwEbYueG4QFuUWXfgUqyuzhzsXFsrGV8itWZ+qIH7L3yE1oQTdFPyu+qvEEuwApiSbZtcAaqVtPJHriTGF763zV9TgA8JE+eSoJsiIiIiNaGas6kqnTUlIrWrmrOplDUl0sHiCS7+71eE75wRdEty+3wJXPVXYrE4l5LjZlu+Ofom0cqXTKzigoiLgTOIYTPmfRBwa0RERKS2VFs2lbKmRCSfasumUtaUSHDebXC46dS7iC2q4t7CaXeRiMf5HLg613b5AlSraOEE7iPEw/41zlfjSbCCJSQ4L+imiIiISE2qhmwqZU2JSLGqIZtKWVMiAUvAud82882vJlfnhCcP/hMeeI2GljgnkJwZNqN8ASqAvxDiNo4kxjx/GuibG4EHgVbGUth0uyIiIiLZBJVNpawpESlVUNlUypoSqR5LW+P8/IF/0nDLc0E3pa3/LoBxNxMLhbgZeDLf9oUEqCDBKbTwHnvRysJym+iTvwInk8Dhf9EdRhEREfFHR2ZTKWtKRPzSkdlUypoSqT7THYcLfzWFxNNvBd0U8/UyGPEHWlvjzE4kmFDIcwoLUMFqWhjBJyxgBK0sKaOVfvgbcBBx4G7gwoBbIyIiIvWn0tlUypoSEb9VOptKWVMi1e184N4DJhGf8X6wDVm8Ava6lNj8xXzZEmMv8gzt8xQaoAL4ghb24B0W8SNaA4uRPwb8hDgxHifOL4EamFBRREREalAlsqmUNSUilVaJbCplTYlUPyee4KjWBI8Pv4T4428G04j5i2HY+cTe+YyvW+LsAXxZ6HOLCVABzKGFbZnHXLYkxrNFPrscDnAZcBAOMe4ixmgg1oEtEBERkc7Jr2wqZU2JSEfxK5tKWVMitSUWjzMqluD/DpiEc/5DEO/A0ukvvgvbnEvrvK/5sCXGDsDcYp5fbIAK4HNa2Ill/IW9cTgb+LaEvRTjfWBXYpxDKwl+TYKjUHBKREREOk452VTKmhKRoJSTTaWsKZHaFE8kGJ9wOPnCR2nd4xJicwrOYSrNymY4637Y82KcJSt5vCXG9sCnxe6nlAAVwFJiHEiCE/kjK9mEVu4D4iXuLZtFWNx/KAle430S7Ajc4POriIiIiBSq2GwqZU2JSNCKzaZS1pRIfbg+kWDHf8zhgyG/IX7OVFjkcw8knoB7X4GNJxC78klWJBxOiMU5GFhayv5KDVB5bibGYL7gfg4lwca0chOwuMy9vgNMBNYhzpV8Q4zTaGFrrDMoIiIiEqRCsqmUNSUi1aaQbCplTYnUlzdbYmwVizPxiidYus6viU+8B2aX+Vu9eAXcNB02mkDrYTeSWLCMe2NxBmPnl6qwEWEmE2Y1UeLsQ4xrcJiJQzNOzv+W4DAdh3Nw2IIWwKGRz7AwVY+A31dHG4MKv9eTWv88a7399WSa+6hVtd7+euZgv+tSGi8QlSCZTTUa+Br4ENgjuKaJiGQ1DPgAWIJlU3lZU3H8Kareman/XBs6Y/+nJ3B6Y5jPAWfLdWk59wCc587B+eY2HOee7I/mO3Bm/gHn6sNxfrY1sUiYeDjEqnCIPwGD/Wpgg187StEEHEyEg4DdiNFEGIdBtDCQBnoRpokwC2llOQ4f0sBiogB04WOa+StwPzAD6+x1NmOwu60PBt0Q8cUgYEcq87vWEXQ8Vo8dgX9gF761aBrJ9yDVZRSWCfRA0A2pcYcC1wJhoBdwIzakRsP5RKRa9cSCUicCy7Dg1MnAPUE2qg6o/1wbOnP/J4QN+R3bJcreza2sB9C3B60/6I/T1I2Gfj2JLl9NfOkq4p8vwflsMY3xBA3RMMsdeCEW5yEsQ9zXfk6lL5rDwObApsAmQH/sRNgDi9avwApnvYeNhZ5f4fbUgp2ACUE3QnxXq0EFHY/V5VVgUtCNKNEE7HiS6jQJO76kPAOAi4G7gBeDbYqISMF2Aw4HzqWI6eAlK/Wfa4f6P2YQVopgU/ffPYE+wEosZrMAy7j04jadMZFIREREREREREREREREREREREREREREREREREREREREREREREREKuT/AeaZclviRSBrAAAAAElFTkSuQmCC", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Start Time : 2571.73599414\n", + "End Time : 2571.73943057\n", + "Execution Time : 0.003\n", + "Execution Time (ms): 3.436\n" + ] + } + ], + "source": [ + "#Another way to discover the tree\n", + "# # create the process tree\n", + "#tree = inductive_miner.apply_tree(log)\n", + "\n", + "# viz\n", + "#gviz = pt_visualizer.apply(tree)\n", + "#pt_visualizer.view(gviz)# convert the process tree to a petri net\n", + "\n", + "start_time = time.perf_counter()\n", + "process_tree = pm4py.discover_process_tree_inductive(log)\n", + "print(process_tree)\n", + "end_time = time.perf_counter()\n", + "pm4py.view_process_tree(process_tree)\n", + "\n", + "start_time_2 = time.perf_counter()\n", + "bpmn_model = pm4py.convert_to_bpmn(process_tree)\n", + "end_time_2 = time.perf_counter()\n", + "print(f\"Execution Time : {end_time_2 - start_time_2:0.3f}\" )\n", + "timeDiff_2 = end_time_2 - start_time_2\n", + "print(f\"Execution Time (ms): {timeDiff_2*1000:0.3f}\" )\n", + "\n", + "pm4py.view_bpmn(bpmn_model)\n", + "\n", + "print(f\"Start Time : {start_time}\")\n", + "print(f\"End Time : {end_time}\")\n", + "timeDiff_3 = end_time - start_time\n", + "print(f\"Execution Time : {timeDiff_3:0.3f}\")\n", + "print(f\"Execution Time (ms): {timeDiff_3*1000:0.3f}\" )\n", + "\n", + "\n", + "#net, initial_marking, final_marking = pt_converter.apply(tree)\n", + "\n", + "# alternatively, use the inductive_miner to create a petri net from scratch\n", + "# net, initial_marking, final_marking = inductive_miner.apply(log)\n", + "\n", + "# viz\n", + "parameters = {pn_visualizer.Variants.FREQUENCY.value.Parameters.FORMAT: \"png\"}\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/rafaelapb/.local/lib/python3.8/site-packages/pm4py/algo/discovery/dfg/adapters/pandas/df_statistics.py:82: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n", + " df_reduced = df[{case_id_glue, activity_key, target_activity_key}]\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAANAAAAM/CAYAAACgXly+AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzde3wU1f3/8VcSYgIJkBAMCFioWEG5WVBBfxQF5RsoIlZFLFAvCKJYilKLtWqrrVVE0SpYtPQL4Vbl4tcLiCJEQRSloIhcBIQWIdwkkBAIBAI5vz8OCdlcN5zszm7yfj4e+9DMzM58Nuw7c+bMzBkQERERERGpOSK8LiDM1QYuAloBTYE4IB5IBOoAR4EjQM7p1z5gK7AJyPCgXqliCpD/ooCOQA+gG9AG+BH2d3gS2IsNyREgCxue2thAxWPD1fj0NICD2CB9DnwMfAIcDs5HkaqiAJUvDrgJuAW4GqiPDcrHwFpgCzYE24ATfqwvAjgfu9e6CBvCgjCeAlYB7wEzgB1V+DlEgiYCuBaYht0jHAfeBX4NXBKgbSYDA4DXgB+wYfoYuBOoG6BtilSpSKAv8CVggA3Aw9gvdzBFAdcB07FNwmzgJWzzTyTk1AKGYg/u84CZQDtPKzojEXgM2I/dGz5H8AMtUqauwDfYZtp07HFJKIoDRgHp2A6KUdg9lYgnGmCbRaeANKC1t+X4rTbwBJALrAGu9LQaqZGux56D2YHtYQtHrYAl2D8Az2CboSIBFQ08D+QDU7DNonA3BNvRsBxo5nEtUo01w56wPALc7nEtVa0NtsdwP5DicS1SDV0MfA9sPP3/1VEcthMkD3vuSKRKXI49MbkSaOhxLcHwMLaJ+oTHdUg10BPbZJuPvbCzphiJ7VwY73UhEr46Y8Mzk5rZQ/VL7AWuf/K6EAk/P8HeNrCAmhmeAsOwlyT9xutCJHw0w3YYfEbNaraV5Y/YPVG4nu+SIIoGVmB72xp4XEsomYS9ji5crrYQjzyHPe4J1C0H4Soau0deh/bKUobe2O7bO7wuJESdj7186R9eFyKh51zsWfipXhcS4vph/8j8wutCJLRMAXZixx2Q8k3BXkSr35UA8P+wf1Vv9rqQMJGE3Vs/63Uh4r1a2HtiPvS6kDBzL/aaufZeFyLeGoK9k/QnXhcSZiKxo//M97oQ8U4UsBn4p9eFhKk+2KsUOnpdiHjjNuwZ9lAdwyAcrAZme12EBF8EdlDDWV4XEuZuwV613cbrQsJZOI5Meg120MFLsUHyWl3scL+dgLbYnq562KF9M4HvsGPNLcWOqhMqIoFvgUXogtMaZQr2INhr3YB5wDHs8URFr3zs2AW3EzpDUv0Be4XCOV4XIsFRGzsumpd/MTtg94D+hKas13eExhXSP8I24/p6XYgExyDsOYxGHmw7EngcO4i8S3iKvmZjRx/10sfAHI9rkCD5P+zTC4KtNvAWVRecoq9NwI+D91FKGIpthsZ6WIMEQSS2vT4qyNuNwXYABCI8Ba89eBeiH52uoYdH25cg6Yj9hw72wO//IrDhKXh9i3fNue+Av3i0bQmSh7BDVAWz6304wQlPwetfwflYJbyGvelOqrF3CO7B7vnYZ/MEM0AGe99OsN2G7RzRHavV2Dbg0SBubzLBD09BUy4yCJ+vqItPb7tDkLcrQXIO9tq3W4K0vfOp2u7qyr5uC/xH9HEO9vTArUHebtgL9l+6s/UTzlyBHQx3YAfj8MrQIG/vBLAd+9gUqYRwCVAr7KUwW4O0vf5B2k5ZriH4J4s3owBVWrgEqAn2HNCxIGwrCe/v1owCrg7yNncATYO8zbAXLgGqix0cMBg6BWk7FQn2zW6Hsb9nqQQFqKQLg7SdigS7DgXoLIRLgOIJXoC8vrizQLDrUIDOQrgEKA57g1owhMpFlcE+qXkEjRdXaeESoOPYizqDIVh7uopkB3l7sUBukLcZ9sIlQIcJ3l/HA0HaTkWCXUddgh/asBcuATpC8NrnG4K0nYqsD/L2gtlRU22ES4CCeYC7FnvZkNe+DPL26qEAVVq4BCgDe4IzGINxHMPe5uylw8CyIG8zGft7lkoIlwBtwXYiNA/S9rwecPBdgn9A3wr7e5ZqqD72KuXeQdpeHPbmPa+uxr4i8B/RRwSQA9wV5O2GvXDZAx0C9hK8ix1zgPFB2lZx7wP/DvI2z8eedwrW1e7igY+xN7kFSyx2xJxg7nly8eZhwL1Obz/Jg22HtXDZAwF8DvwsiNvLxTZpTgVxm3/EhjbYrj693VA5ByYB0BP7V7JZkLd7H8HZ+7yBd2OVrwRe8WjbEiR1sHuFX3mw7ScIbHg+JHiXKhVXn+DeLi8eWgqkerTt+7BftKoOzzS8vX28H7aZ2tDDGiRIHgIO4t0V01dhe6qqIjhZ2MdUem0WGhOuxmiC982NWOBh7NOuzyY4x4FJ2M/itXjsdYbDvS5EgucD7CCLXosD7sYev+RRcXC+xj6PJ9idIOW5ExtodV+fpXB8Qt1A7HFQM+zVAqGgNnZQwoIn1NXFXlNX9Al1Bz2rrmwfYWu82etCJHjqYIPzlNeFhLmO2KHCUrwuRILvUezlPQleFxLG3gS+IjxbIeKoHrbp8QevCwlTF2O7rn/hdSHinaewPWH1vC4kDL0OrEN7nxotCXsD2AteFxJmumGPfW70uhDx3jBsF7Iey+GfWtju9A+8LkRCQySwAvgUNUf88RD2esKLvC5EQsdPsVcn3O91ISHuIuxYC3/0uhAJPX/C/mUN9oDs4SIW22X9b+zDtER8RGIvqdmKvTxffL2K7fb/sdeFSOhqjB03YS46HipqELbXTed8pELdsRdHqmvb6oFt2j7ndSESPm7DnmV/2OtCPNYe22x7nfAa+0JCwG+wzZZQuGHNCz/BNmcXoU4DOUt/we6JRnldSJB1xIbnC/S8H3E0Chuil6gZHQvdsVepp6FrBKWK3A6cAKYSOk+fC4RfYTtQZqFmm1Sx3thBPL7CHh9UJ7WBf2CP+Z5DHQYSIM2xo5tmA7/0uJaqchH24tBDwK0e1yI1QAz2eCgf+BdwnrflnLVo4HfYEXW+AFp4Wo3UOD8HtmH/co/CXuYfLq7BPobyKPAYOt4Rj9QG/ow9U/8NcBOhffzQDpiD3XvOR9e1SYj4Cfb6uVPYv+yDCa090mXAW9jgrAVu8LYckdJdDEzH3uH6X+BJvOuxq48dtHEZdlDGldjg1IRzWRLmLsB2B+/CfnlXYG/WuzDA222AbUa+gT2+OYZ9VmvPAG9XJCCisIMOzsTeyWmAHdhRUW/HjsNQ22HdFwDXA+OA1dgm5EngE2AoGvMuLKhJ4J9o7IN/e5x+XYntEi8I1ebT/83Gdi0fwfbw1cFejxYPJGJHEmqFbRoWPA9oA3aI3Y+wTbbMYHwgqRoK0Nk5B2iJfZ5pK+wJzfM5E5b40z9nYR+bePj0/2diHyW/CRu6zdigiUgxBl0dUO2F8nkPkZCnAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIUPC2x42xv97gOqUIKUHAMARYByV4XIlVLAQq8OOBaoDOw3uNapIqF0oOkqqscYJDXRUhgaA8k4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIhKSij3j84PTPRV97PapLqpBOpAZHL68LkMBQE07EgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJONDFpFUjAYjwugiRcPUxJW9XKO11EmjsUY0SAGrCVY3X/VjGAMvRfUAiJSQCeVS897nLqwJFQt1CbEjKCtAJ7LGSiJRiIJBP6eHJA97xrjSR0FcHOEbpAcoH+ntXmkh4eAPbVCseoKNAbQ/rEgkLfSn92Ge6l0WJhIto4BAlQ6RReUT89BpwnDPhyURXfIj47Rp8m28TPa1GJMxEAvs4E6Ku3pYjEn6ex4ZnN7rItFpzaZu3ALpXUR3VTc7p/34N3OlhHaHsv8BSr4tw5fLX8VZgdkxMzKmqKqY6OXHiRFR0dHR+RESE8bqWUJOXlxeZn5//JtXg5LJz71Bubm5UVRRS3cyZM4dbb71VV7uXon///sybN8/rMqqE/oED5NZbb614IQl7CpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiTio0QFasmQJERERrF+/3mk9u3btIioqivvuu6+KKjs7Z/N5srKyGDx4MD/88IPP9G3btnHVVVfRokWLUt935513smHDBpdyq4UaHaCqMn36dPLz83njjTfIzc31uhy/ZWdn061bN7p3705ycnLh9ClTppCSklIiVEWNHDmS3r17s3bt2mCUGrIUoCqQmppK//79ycrK4q233vK6HL+NGTOGpk2bcvfddxdOy8nJIS0tjZUrV9K2bdsy39upUyeGDx/OoEGDOHVKNyWfjVsBU1kffPCB6dy5s4mNjTXNmjUzN998s/niiy+MMcZMmDChcDDCCRMmmHvvvdckJiYawAwYMKBwHfPnzzedOnUyMTExJjk52QwfPtwcOnSocP7+/fvNQw89ZFq2bGliYmJMhw4dzNtvv+1Tx8MPP1xiDOvmzZv7vY0Cn376qWnfvr3Ztm2bAUzPnj1L/dxbt241N9xwg0lKSjLx8fGmX79+5vPPP/d7fkU1VfR5isvOzjaxsbHmvffeK3OZfv36lbuOgwcPmqioKLNkyZIylynNLbfcYoC5XnxpQ0mlAzR//nwTGRlpHnvsMZORkWF27dplBg4caOLi4gqXOXz4sAFMixYtzJw5c8yRI0fMhAkTCgP09ttvm4iICPP444+bgwcPmq+//tq0bt3a9OjRw+Tn5xtjjBk1apQZNWqUycjIMIcPHzYzZ840MTExZv369T71LF682ABm3bp1PtP92UaBoUOHmnHjxhljjLnyyitNZGSk2bFjR4nP3qFDBzNgwACzb98+k5mZaUaNGuXzuSua709NZX2e0sycOdMA5sCBA2UuU1GAjDGmTZs2ZtiwYRVurygFyKp0gFq1amXatWvnM+3w4cOmQYMGPj8DZujQoaWu46KLLjJt27b1mTZ//nwDmLS0tDK33bdvXzN8+HCfaWV94fzdRk5OjklISDDp6enGGGNeeeUVA5innnrK573Hjh0zgJk9e3bhtLy8PJOcnOzXfH9rqkyARo8eberWrVvuMv4E6PrrrzedOnWqcHtFVacABe0YKD09nc2bN9OtWzef6fHx8Rw4cKDE8u3bty91HVu2bOGaa67xmd65c2cA0tLSytx+gwYN2LJli191+ruNN998k44dO9K0aVMABgwYQHR0NKmpqT7vjY2N5fLLL+eRRx5h7ty5HDt2jFq1arFv3z6/5rt87rLs3buXhAT3530lJCSwd2/NfWpl0AKUkZEB2C+yP2rXLvk0kIJ1TJw4kYiIiMJXQQ/Sjh07ANi4cSM33XQTjRs3JjIykoiICKZNm0ZmZqbfdVa0DYCpU6cyePDgwp+TkpLo1asXW7duZfny5T7rXbRoETfeeCMPPPAACQkJ9OnTh5UrV/o1vzI1+SszM5Po6OhKv6+46OhoDh486LyecBW0ADVs2BDA6ZddsI4xY8ZgjCnxmjFjBnl5eVx33XXs3LmTpUuXkpeXhzGGO+64A2MqHqLNn20AfP/99yxdupQhQ4b4fKnnz58PUGIvlJiYyPjx49m1axfLli0jNzeXbt26sW3btgrn+1tTZSQmJpKXl1fp9xWXl5fn9x/F6ihoAWrWrBmtWrVi2bJlPtN3795NbGxsqc240tbRunVrVq1aVWJehw4dmD17Nv/5z3/Ys2cPAwYMoHXr1kRF2WHrjh8/XuI9kZElP74/2wAbkIEDB5b4Mh85coSGDRsyZ84ccnLsAKV79+6lXbt2hevp0qULkydP5sSJE6xevbrC+f7WVNrnKUvjxo3Jysrye/myZGVl0bhxY+f11ETOvXDbt283KSkp5p577ilcpqATYfLkyaWu47333jNRUVHmmWeeMfv37zf79+83Dz74oLnkkkvMsWPHTG5urjn33HNN+/btzYYNG8yxY8fMokWLTP369U2HDh181rVx40YDmLlz55r9+/ebxo0bm1WrVlW4jfz8fNOyZUuzcePGUmv861//agCTmppqjDFmz549BjAvvPCCOXTokMnMzDRjxowxsbGxZtu2bRXO9+dzl/d5SqNeOO+d1Xmg999/31xxxRUmJibGNGnSxIwePbrwC/D666+XOJeRmZlZYh2LFi0yXbp0MTExMaZRo0Zm4MCBZufOnYXz//3vf5uf/exnJj4+3px//vnmnnvuKfhHM4DZs2dP4bIjRoww9evXN/Xq1TMjRoyocBsFX/aC15o1a3xqK34+JiUlxRhjzIIFC0zPnj1NUlKSqVevnunatatPj15F8/353OV9nuIKzgMtXLiwxLyUlJQS/w6NGjUqsVxmZqbOAzk4qwBJ6Bg+fLjp3bv3Wb//6aefNm3atDEnT56s1PuqU4B0KU8N9uyzz5Kens6UKVMq/d4vv/ySSZMmMXPmzMLjzJpIAarB6tevz7Jly0hLSyv3wtHSvPzyyyxcuJBLL700QNWFBz27s4ZLTExk1qxZlX7ftGnTAlBN+NEeSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHzvcDTZ06tSrqkBpk+/btXpdQZVwCdDIyMjJ32LBhEVVWTTVijImKiIjIxw7KISWFz3NgxBMGO/CKVGM6BhJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECFDwtgRXAdo/rkCqkAAXHEGARkOx1IVK1FKDAiwOuBToD6z2uRaqY8+DyUqEcYJDXRUhgaA8k4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIhKSij3j84PTPRV97PapLqpBOpAZHL68LkMBQE07EgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBzoauyq8SegSbFpx4G7sWPCFfUEsCcINYmEjeew9/icKOd1CkgHIjyqUSRkdaTkDXPFX8eBp70qUCTUfUfFIWrnWXUiIe5P2KZaWeH5zrvSRELfhZQdnhPAH7wrTSQ8rAXyKT1EF3pYl0hY+C2Qh29w8oFVXhYlEi6aYLuriwYoDxjpZVEi4WQ5viE6BTT2tCKRMHIPZwJ0EvjI23JEwksiZ46DTgJ3eVuOSPh5D9t5cAJI8LgWCaBAXkwaBcQGcP2hbC7wc+yTufOwDxquaU5iL1+Ss3QrFV/aolf1fc2lBgj47QwLFiwI9CZC0iuvvMKwYcM455xzvC4l6MaOHcunn37qdRlBEfAA9enTJ9CbCEldu3alfv36XpfhidTUVK9LCBrdkRogNTU8NY0CJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDkImQL///e+JiIggIiKCDz74IGTWv2vXLqKiorjvvvuqvKbKWLJkCREREaxfv97v92RlZTF48GB++OEHn+nbtm3jqquuokWLFqW+784772TDhg0u5dYYIROgsWPH8u2334bc+qdPn05+fj5vvPEGubm5AagsMLKzs+nWrRvdu3cnOTm5cPqUKVNISUkpEaqiRo4cSe/evVm7dm0wSg1rIROgUJWamkr//v3Jysrirbfe8rocv40ZM4amTZty9913F07LyckhLS2NlStX0rZt2zLf26lTJ4YPH86gQYM4depUMMoNW2ERoEWLFtGlSxdq165NUlISv/rVr9izp+RD3ooud/7553PLLbewcuXKMtf76quvFjbrIiIieOONN3zmf/bZZ8TGxjJ27FgApk6dWup6tm3bRr9+/WjYsCF169blxhtv5IsvvvB7Pthb3y+77DJiY2Np1KgR9957L9nZ2YBtfvbs2ROAdu3aERERUWbzC+Dw4cNMmzaNkSN9B0SNi4tj1qxZJCUllfneAiNGjGDTpk0sXbq0wmVrspAP0IIFC/j5z3/Otddey86dO/nss8/YvHkz3bp14/DhwyWW69mzJ+np6axcuZKYmBiuvbb4ExbPuOuuu+jbty+vvPIKxhhuu+02n/mpqakMHjyYCy64gCuvvJK0tDR27txZYj0333wztWvXZuPGjezcuZMWLVpw3XXX+T3/nXfe4YYbbuDnP/85e/bs4cMPP2TZsmX84he/wBjD2LFjWbx4MQDr1q3DGMP27dvL/Fzvvvsuubm5dOnSpcLfb1kSExNp3bo1s2fPPut1iJtbAVMZ3377rQHM+++/XzitVatWpm3btj7LrVmzxgBm7NixPsu1a9fOZ7nDhw+bBg0alLr+o0ePml69epnJkyeXWktOTo5JSEgw6enpxhhjXnnlFQOYp556yme5Y8eOGcDMnj27cFpeXp5JTk72a74xxlx00UUlPuP8+fMNYNLS0owxxixevNgAZt26daXWW9To0aNN3bp1y12mX79+pnnz5uUuc/3115tOnTpVuL3ibrnllhozKk9I74HS09PZvHkzV199tc/0Sy+9lHr16rFkyRKf5bp16+azXHx8PAcOHCix3pycHPr06UP9+vUZOnRoqdt+88036dixI02bNgVgwIABREdHlxgwIzY2lssvv5xHHnmEuXPncuzYMWrVqsW+ffv8mp+ens6WLVu45pprfNbbuXNnANLS0vz4Tfnau3cvCQnu4zkmJCSwd+9e5/VUZyEdoIyMDAAaNGhQYl5SUlLh/PKWK83IkSOJiYlh3rx5ZR4jTZ06lcGDB/tsr1evXmzdupXly5f7LLto0SJuvPFGHnjgARISEujTp4/PesubX1D7xIkTfY7HCnrOduzY4ddnKiozM5Po6OhKv6+46OhoDh486Lye6iykA9SwYUOAUv8RDxw4UDi/vOVK89hjj/Huu+/SoUMHbr/9do4ePeoz//vvv2fp0qUMGTLE50s9f/58oOSwTYmJiYwfP55du3axbNkycnNz6datG9u2batwfkHtY8aMwRhT4jVjxgw/f1u+9eTl5VX6fcXl5eX5/UeppgrpADVr1oxWrVqV6An6+uuvyc7OLjwQL1hu2bJlPsvt3r2b2NjYEs24Cy64gOjoaGbMmMGOHTsYM2aMz/zU1FQGDhxY4st85MgRGjZsyJw5c8jJyQFsc6lduzPPDu7SpQuTJ0/mxIkTrF69usL5zZo1o3Xr1qxaVfIZXB06dCg8iI+M9P+fqnHjxmRlZfm9fFmysrJo3FhPZvFKlXQizJ8/30RGRpo//OEPJiMjw2zatMlcccUV5sILLzSHDh0qsdxjjz1mMjIyzPbt201KSoq55557yl3/iy++aCIiIsyHH35ojDEmPz/ftGzZ0mzcuLHUGv/6178awKSmphpjjNmzZ48BzAsvvGAOHTpkMjMzzZgxY0xsbKzZtm1bhfONMea9994zUVFR5plnnjH79+83+/fvNw8++KC55JJLzLFjx4wxxmzcuNEAZu7cuWb//v2mcePGZtWqVaXWOHPmTAOYAwcOlPm79qcToU2bNmbYsGHlLlOamtSJEEiVCtDDDz/sM7byoEGDCue9//775oorrjAxMTEmMTHRDBo0yOzevbvEOoou16RJEzN69OjCL+Bzzz3ns/7777/fvP/++z7TGjVq5PPzmjVryq0xJSXFGGPMggULTM+ePU1SUpKpV6+e6dq1a2HvmT/zjTFm0aJFpkuXLiYmJsY0atTIDBw40OzcudNnmREjRpj69eubevXqmREjRpT5u8zOzjaxsbFm4cKFJealpKSUGMe6UaNGJZbLzMw0UVFRZsmSJWVupywKUNWo9B5Iqs7w4cNN7969z/r9Tz/9tGnTpo05efJkpd9bkwIU0sdAcvaeffZZ0tPTmTJlSqXf++WXXzJp0iRmzpxJVFRUAKqrPhSgaqp+/fosW7aMtLS0ci8cLc3LL7/MwoULufTSSwNUXfUR8KcziHcSExOZNWtWpd83bdq0AFRTPWkPJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcBv52hYPANqTlq0njaAQ9QfHx8oDch4pmIAK77PKBjANcf6hYAzwLLK1qwmtoDfOV1ERK+DHZgFanG1Ikg4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKUPC0BFYA2z2uQ6qQAhQcQ4BFQLLXhUjVUoACLw64FugMrPe4FqliAR8bW8gBBnldhASG9kAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIlISCr6hLoPTv9c9LXXo7qkCulEanD08roACQw14UQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIGuxq4aXYHYUqa3Aw4Wm7YKOBTwikTCyGxK3u9T2isHO9CiVBNqwlWNN/xY5iTwLjZEIlLEOUA2Fe+B+nhVoEiomwIcp+zwHMIGTURKcR1lh+cE8Kp3pYmEvkhgP2WHqJt3pYmEh79RejPuB9RhI1KhzpQMz3HgOS+LEgkn2ykZoo5eFiQSTv6C7TQoCM9/vC1HJLy0xrf59idvyxEJPxs4E6JWHtciEnYexoZnrdeFSGAF6mrsR2rVqnVNgNYdDmqfPHmSyMjI2MjIyEVeF+OVU6dO5RtjentdRyBFBGi9c5s3b37LNddcE6DVh74PPviAbt26UadOHa9L8cT27dtZtmwZBO47FhICdj/Q5ZdfTmpqaqBWH/K+/vprLr30Uq/L8MycOXMKAlSt6ex4gNTk8NQkCpCIAwVIxLOviQAAACAASURBVIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScVBtAvTZZ5+RlJTExo0bvS5FapCQCNDq1auJiIgofL344otlLpufn8/FF19cuOyvf/3rwunGGIwxld7+kiVLiIiIYP369WUus2vXLqKiorjvvvsqvf6q5E+txWVlZTF48GB++OEHn+nbtm3jqquuokWLFqW+784772TDhg0u5VZ7IRGgyy67DGMMd9xxBwDPP/88x48fL3XZefPmsWnTJgDy8vKYOHEiAD/72c84ePAgbdq0CUiN06dPJz8/nzfeeIPc3NyAbCMQsrOz6datG927dyc5Oblw+pQpU0hJSSkRqqJGjhxJ7969WbtWd6aXJSQCVNTVV1/N7t27mTJlSqnzn3nmGa6++uogVwWpqan079+frKws3nrrraBv/2yNGTOGpk2bcvfddxdOy8nJIS0tjZUrV9K2bdsy39upUyeGDx/OoEGDOHXqVDDKldPm3nLLLaay7rjjDjNz5kzTpEkT07x5c5OXl+cz/9133zX9+vUzo0aNMkDh/AkTJhQOYjh58uQS0yZNmmRGjhxp6tWrZ5o0aWKefPLJwnU+/PDDJcaxbt68uc92P/30U9O+fXuzbds2A5iePXuWWv/WrVvNDTfcYJKSkkx8fLzp16+f+fzzz/2eb4wx8+fPN506dTIxMTEmOTnZDB8+3Bw6dMjvWovKzs42sbGx5r333itzmX79+pW7joMHD5qoqCizZMmSMpcpzezZswtqlLNw1gGaO3eu+dvf/mYAM3XqVJ/5Xbp0MatXry4RIGOMOXz4sE+Aik5r3769eeedd0x2drZ56aWXDGCWLl1auNzixYsNYNatW1dqXUOHDjXjxo0zxhhz5ZVXmsjISLNjx44Sy3Xo0MEMGDDA7Nu3z2RmZppRo0aZuLg4v+e//fbbJiIiwjz++OPm4MGD5uuvvzatW7c2PXr0MPn5+X7VWtTMmTMNYA4cOFDmMhUFyBhj2rRpY4YNG1bh9oqqKQEKuSYcwD333EPjxo155plnyM/PB2Dx4sUkJSXRqVOnSq/vsssu44YbbqBu3brcf//91KlTh+XLl/v13qNHjzJv3jwGDhwIwODBg8nPz2f69Ok+y+Xm5rJ27VpuuukmkpOTSUhI4PnnnycuLs6v+WCbW23atOHPf/4ziYmJdOjQgeeee46PPvqIjz/+uNKf+6uvvqJu3bo0aNCg0u8t6sc//jFfffWV0zqqq5AMUO3atXnooYfYsmULc+bMAeCvf/0rf/zjH89qfe3atSv8/6ioKBo2bFjuwXNRb775Jh07dqRp06YADBgwgOjo6BIDpsTGxnL55ZfzyCOPMHfuXI4dO0atWrXYt2+fX/PT09PZsmULxUcy6ty5MwBpaWmV/tx79+4lISGh0u8rLiEhgb179zqvpzoKyQAB3HfffZx77rk8/fTTLF++nNq1a3PFFVec1bri4+N9fo6Oji7cs1Vk6tSpDB48uPDnpKQkevXqxdatW0vsxRYtWsSNN97IAw88QEJCAn369GHlypV+zc/IyABg4sSJPl36BT1nO3bsqPTnzszMJDo6utLvKy46OpqDB4s/bFwghANUp04dfvvb37Ju3Tp++ctf8vjjjwe9hu+//56lS5cyZMgQny/1/PnzAUrshRITExk/fjy7du1i2bJl5Obm0q1bN7Zt21bh/IYNGwK2GWdOn88q+poxY0al609MTCQvL8/tl4A9XeDaDKyuQjZAAPfffz9JSUm0bt2aq666KmDbiYws/deQmprKwIEDS3yZjxw5QsOGDZkzZw45Ofah23v37vVpKnbp0oXJkydz4sQJVq9eXeH8Zs2a0bp1a1atWlWijg4dOjB79uxyay1N48aNycrK8nv5smRlZdG4cWPn9VRHIR2g+Ph4Nm/ezNtvvx3Q7Zx33nkAbNq0iYyMDM477zxWrVrFjBkzePTRR0ssHxcXx4MPPsiRI0eYN29e4fT169fz4osvkp2dTVZWFq+99lrhsY8/88ePH88nn3zC2LFjycjIICMjg9GjR3Py5En69etXZq2rV68u9XN17NiRw4cPOze//vvf/9Kxox5xFEyV6sbeuXOnz7mNDh06lLpcQbd00dejjz7qc84HMFdffbV5/fXXfaYNGjSoxHZatmxZuO4RI0aY+vXrm3r16pmbbrrJZ7k1a9b41FH8fExKSooxxpgFCxaYnj17mqSkJFOvXj3TtWtXk5aWVvi+iuYbY8yiRYtMly5dTExMjGnUqJEZOHCg2blzp88yRWsdMWJEmb/XgvNACxcuLDEvJSWlxO+yUaNGJZbLzMzUeSAPnNV5IKl6w4cPN7179z7r9z/99NOmTZs25uTJk5V6X00JUEg34cTds88+S3p6epmXRpXnyy+/ZNKkScycOZOoqKgAVBf+FKBqrn79+ixbtoy0tDS/z30VePnll1m4cKHG+S5HwJ7OIKEjMTGRWbNmVfp906ZNC0A11Yv2QCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4CNj9QMuXLze9evXyb/A1qXb27t0bQQ34Ax0RoPWOAM5uFMTq43rgK2C314V47E6vC5DwZIBbvS5CAqva72JFAkkBEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBSh4WgIrgO0e1yFVSAEKjiHAIiDZ60KkailAgRcHXAt0BtZ7XItUsYANLi+FcoBBXhchgaE9kIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIhKSij7i8YPTPxd97fWoLqlCOpEaHL28LkACQ004EQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxEOF1AdXE+8D/w/f3GQPkAflFpuUBbYHdwStNJPT9hpL3+xR/5QNfeFWgSChLBk5RfoDygPu8KlAk1H0EnKTsAJ1EY2OLlOkuyg7QSext3SJShnrAcUoP0ClgsHeliYSHd7DHOsUDdBwbMBEpR39sb1vxzoO5XhYlEi5igSOU7L6+0cuiRMLJdOAEZwJ0GHtSVUT80Isz4TkB/K+35YiEl1rAAc6E6FpvyxEJPxOx4ckAojyuRQKotKF9WwDdg1xHdZN9+r9rgNu9LKQa+C+w1OsiylLa1di3ArNr1Yo5FexiqpOTJ09ERUXVyo+IiDRe1xKuTp3KizQm/03s6YGQVObg8pMm5arp4WD58sl07To0MiJCd4ycrVdf7c+XX87zuoxy6ekMAfKznw3zugQJAt2RKuJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAASaiLAeK9LqIsuhZOQl177G3xmcBOYAewHdgIbADWAwe9Kk4BklC3EbgfOB/40en/dsKOs5dwepk9wJfAp6dfq7FDiQWcc4Aef7w1e/durnC5Pn0e5cYbn3LdXEB8//2XvP76b9i582tOnDhKQkJTnnsuvUq3kZW1izFjfkS3bvcwePCkKl13ZXz77RJeeKEnTzyxjqZN2/r1nqNHs/jXv37NgAEvULduMvv2beGjjyawdu18Dh3aS4MGP6JDh75cf/3j1KmTUPi+qVPvJCXldzRp0sal5BzgvTLmNQMuAdoBV2AH+R8L5AKfAPOAt7B3BvujJTADaIK9sbRCVXIMNHbsf5k82TB5suGWW54rMW3AgBerYjMB889/DiIxsSkvvLCPP/95I+ecU6fKt7FixXSMyWfVqjfIy8ut8vUHyrFj2Ywb143WrbtTt64d2vvvf7+J77//ipEjF/DSSwcZPHgSK1fO4vnnu5Off7LwvT16jOSll3qzc+faQJWXDnwIjAcGAE2BC4F7sc2+l7B7pw+wg72UZwiwiEqOX17jOxHy8nLZu3czF198HTEx8Zx33sX89a9bqnw7K1akctll/Tl6NIs1a96q8vUHyptvjiExsSldu97tM33QoL/TtGlbzjmnDhdffC3XX/84O3d+zbp17xcu07x5J7p1G84//zmI/Pyg3eC8DZgG3AKcCwzCjk+xEPgK6FfKe+Kwg790xh5T+c25CfeXv2yqcJnrrnsAgI8+msjrr48E4Je/nMDu3RtYtWo2R49mcvnlA7jnnjc4ciSDDz54lq++eovMzHTOO681N9zwJJdeeuZzF13P4MGT2L17I59/Po2YmHi6dRtO375/LFx2//5tzJ49mm3bPiMv7zgXX3wtvXv/ngsu6OKznhkzhjNjxnDatEnhgQfsOPDffLOAd999gl271lO7dn06dvwFN988jtq16/n1WQps3foZ0dGx3HTTWFavnstnn03liit+WeL3VF6t/syvqOY33/w9H3zwLABPPNEOgKSk5owdu73Uf7fc3MOsWDGN++5702f6k0+W/I41a9YegAMHvveZ3r37CN59909s3ryUiy8O+gBFOcCc069LgUewTbppwEjsIJgFyw06mw0EdQ/Uo8evmTjxMAAffjie1q17MG7cTn75ywmFyyxY8BQnT+bxhz+s5G9/yyAl5Xe89toAdu/eUOp6li6dxCWXXMe4cen06vUw7777J7ZsWVa47KRJN3POObX58583Mm7cTpKSWvDCC9eVWM/tt09m8mRTGJ6vv36HiRNvoF27nzN+/B4efPBDNm9ext///guMMX59lgIrVqTSpctgzj33Alq2vJJvv03j4MGdJZYrr1Z/5ldU8803j2X06MUAPPHEOiZPNmWGB2Dt2nfJy8v1CWhZjh7NAqBx41Y+0+vUSaRx49asWjW7wnUE2NfYZl5f4OfAv6mCx8141oS75JLruOyy/sTExNGjx68L/2LfdtvfuO22vxEfn0RMTDydOw+iTZv/4aOPSn4xAVq0uIwOHW4gNrYu3bvfzznn1OG775YDtnm2c+daOna8ibp1k6lTJ4Fbb32ec86Jq7C+efPG0KRJG/r1+zN16iRy/vkd6N//OTZt+ojNmz/267MAnDhxlC+/nEfnzgMB6NJlMMbk8/nn033WUVGt/nyWytTsj++//4rY2LrExTWocNn169/n3HNb0rp1jxLzGjb8MTt2fFXp7QfIe8BPsa2vOTg+5tSzABXs8v0RF9eAfftKPy5p2rRd4f9HRkYRH9+Q7OwfAIiOjqVFi8v5v/97hNWr55KXd4zIyFq88MK+creXmZnOvn1baNXqGp/pP/5xZwC+/TbN78/y5Zdv8qMfdSQhoSkAl102gKioaFasSPVZrqJaK5pf2Zr9kZ2916dXrSw//LCVFSum8atfvUZkZMmxaOrUSeDQob2V3n4A7QZuA7pRcedCuTw7DxQdXbvU6bt3b+Tttx9j27YVHD78A8bYUaHOP//SUpePifE9SR0VFY0xZ57r++CDi1iw4Clmz36A//3fwVx88XX07fvHwi9WaY4csb2eH300kY8+mlhi/sGDO/z6LAArVkylS5dfFf4cH59E27a9WLt2Pt99t5yf/ORnftda3vzK1uyPnJxMoqKiy13m+PEjvPpqf/r2/WOZxzhRUdHk5Hh2rrMsX2HPF/XCPiT6rITUidRTp/J44YXrSExsyu9+t5Tk5J8QGRnF1Kl3snPn12e1zjp1Ern11vHceut4/vOfL3jrrUcZN64bf/7zRs49t2Wp74mPbwhAr15juPnmZ8/68xw48D2bNy9l06aPSU0dUmL+ihWpPgGqqNby5ldVzUXFxSVy6lRemfOPHs3ilVdupE2b/6FXr4fLXO7UqTy/moEeyMDxuU0h1Y29f/9/OHRoD5ddNoDGjVsXNgfy8s7upPKhQ3sLe5sALrigC7ffPpmTJ0+wffvqMt+XmNiMxo1bs337qhLznnyyg98HxCtWpHLFFQMLz4cVvCZOPEJ8fENWrZrD8eM5ftVa0Xx/a46I8P+fvF69xoWdA8VlZqYzbtzPaNfu5xUG9ujRLOrXb+z3doPkHKAjUHE3cjlCKkANG7agbt1z+eKLGezevZG8vFw2bPiQ9evPeg/Lrl3rWbz4RY4dy+bo0Sw++eS1wuOJ8tx663i2bPmE998fy5EjGRw5ksGcOaPJzz/p06VeFmMMn38+gz59Hi0xLyYmjp49H+T48SM+AwdWVGtF8/2puX798wDYu3cTR45k8NBD55X5x6R5847k5h4u0fzatWs9zz7bleuue5BevcYUTv/mmwVMmza0xHoyMv7Lj37UscLfWRWIwp4QrbjbEMZgLwWaXtGC5SlzaN/Jkys/Iu1vfpPAsWOHCn++6qo7uOuu1MKfV616g3/8w/f8x0svZfocqG7fvoo5c37Ljh1riItLpG3b3uTkHCz8oj3//B62bFnqs57OnQdx881jGTPm/MJp557bkqef3so337xHWtpL7NjxFadO5dG0aXv69XuS1q17+JzLKfDww8u58MKuAGzY8CHvvvsnduxYQ506CVx88bXcfPOzJCY2K/ezHDq0l4ceOq9w+h//uMbnGK7o+Rig8NxTebUCFc6vqOYCs2bdz8qVswBD586DGTToleL/lIA9DzR6dDIjRvwfbdv2Lpz++9//mAMHtpf6nq5d7+aOO/5Z+PPRo1k8+GBDHnhgUaXPA50emXQe/g3tmwK8CFwMPIS9OqEsv8ZepTAS+PvpaR+cXkdR+4Byd51VGiCpfmbOvJcDB3YwatTCs3r/woXPsHLlLP70p7Wl9tCVx88AtceG5Trs09AjsHuVkged9tq5vwG/AP4AOB8shlQTTkLPzTc/S2ZmOp9+OqXS7/3++y9ZtmwSQ4fOrHR4/NAE+Af2CRhXn55WC9uM+2mxZVthHznzHdABu6epkp4WBUjKVbt2fcaMWcamTWkcPvxDpd6blvYyv/nNwjJPQZylOOBhbBjuxH6Hi/e1twaaY5tyX2I7Cvqe/rkdsKSqigmpbmwJTXXqJDJ06KxKv2/IkGlVWUYk9h6g8UAi5T+4LBb4D5AFvAn8DlgGVPkVrQqQhIPrgJexTbEI/Lv85nHgeexzagNGAZKQdfoc1NXYWxMM/l+3dgLIJ8DhAR0DSYj64Yet7N+/FezxTS5nwnOCiptiUdhjnYBTgCQkJSdfSPPml4E94K8DXADcAPwReB1741vBHsZgQ1YQrNJ64gJCTTgJBwb7sOH/AvOLTI/CBqstZ8ZG+OnpaRecnh/QW2EVIAlnp7Dd2d9h7zQtUAv4CQqQyFk5CXwbjA3pGEjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIgzJPpH722dRg1iFSQlnjLoSS0gJ0MiIiMnf69GFOQ57WdMaYqIiIiHzsdVxy9sLnWTBSpQx2gBapxnQMJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwUoeFoCK4DtHtchVUgBCo4hwCIg2etCpGopQIEXB1wLdAbWe1yLVDE9pTvwcoBBXhchgaE9kIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIhKSij7i8YPTPxd97fWoLqlCOpEaHL28LkACQ004EQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoKuxq8afgCbFph0H7saOCVfUE8CeINQkEjaew97jc6Kc1ykgHYjwqEaRkNWRkjfMFX8dB572qkCRUPcdFYeonWfViYS4P2GbamWF5zvvShMJfRdSdnhOAH/wrjSR8LAWyKf0EF3oYV0iYeG3QB6+wckHVnlZlEi4aILtri4aoDxgpJdFiYST5fiG6BTQ2NOKRMLIPZwJ0EngI2/LEQkviZw5DjoJ3OVtOSLh5z1s58EJIMHjWiSAAnExaVwA1hlu5gI/xz6ZOw/9TnKxzdpqJxAXNpoArFPC2wBgjtdFBEJAbmf4/e9/T9euXQOx6rDxyiuvMGzYMM455xyvS/HU9ddf73UJARWQAP30pz+lT58+gVh12OjatSv169f3ugwJMN2RGiAKT82gAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiANPA5Senk5ERESJV1RUFM2aNWPQoEHs2LHDyxJ97Nq1i6ioKO677z5P61iyZAkRERGsX7/e7/dkZWUxePBgfvjhB5/p27Zt46qrrqJFixalvu/OO+9kw4YNLuVWa54GqFmzZhhjuOOOO4iLi8MYgzGGAwcOMG7cOObOnUvfvn29LNHH9OnTyc/P54033iA3N9frcvyWnZ1Nt27d6N69O8nJyYXTp0yZQkpKSolQFTVy5Eh69+7N2rVrg1Fq2AnJJlxCQgIDBw6kb9++fPPNNyGzF0pNTaV///5kZWXx1ltveV2O38aMGUPTpk25++67C6fl5OSQlpbGypUradu2bZnv7dSpE8OHD2fQoEGcOlUthzUIOWb27NmmMu644w4TFxdXYvovfvELA5gdO3YYY4wZNWpU4Yif69atM8YYM3fu3MJpM2bMMMYYM2HChMJpEyZMMPfee69JTEw0gBkwYIDP/EmTJpmRI0eaevXqmSZNmpgnn3yy1Bo//fRT0759e7Nt2zYDmJ49e5a63NatW80NN9xgkpKSTHx8vOnXr5/5/PPP/Z5vjDHz5883nTp1MjExMSY5OdkMHz7cHDp0yBhjzMMPP1xi3O3mzZuX+bvNzs42sbGx5r333itzmX79+pW7joMHD5qoqCizZMmSMpcpy+kabw36tzCMOQcoKyvLzJo1y0RHR5vBgwf7LLt48WKfABljzP79+30CZIwxhw8fNoBp0aKFmTNnjjly5IiZMGGCGTBggM/89u3bm3feecdkZ2ebl156yQBm6dKlJWocOnSoGTdunDHGmCuvvNJERkYWBruoDh06mAEDBph9+/aZzMxMM2rUKJ/PVtH8t99+20RERJjHH3/cHDx40Hz99demdevWpkePHiY/P7/M30FZZs6caQBz4MCBMpepKEDGGNOmTRszbNiwCrdXHApQpZ1VgCj2VzUqKsrcddddhX95C1Q2QEOHDi11mwXzhwwZUjjt5MmTpk6dOuYvf/mLz7I5OTkmISHBpKenG2OMeeWVVwxgnnrqKZ/ljh07Zop//ry8PJOcnOzXfGOMueiii0zbtm191jt//nwDmLS0tDJ/B2UZPXq0qVu3brnL+BOg66+/3nTq1KnC7RVHNQ9QyBwDFe1EyM3NZdWqVWzZsoUOHTqQnp5+1utt3759ufPbtTvz0LioqCgaNmxY4qD6zTffpGPHjjRt2hSAAQMGEB0dTWpqqs9ysbGxXH755TzyyCPMnTuXY8eOUatWLfbt2+fX/PT0dLZs2cI111zjs97OnTsDkJaWVunPv3fvXhIS3Md2TEhIYO/evc7rqW5CJkBFxcTE8NOf/pRXX32V7du38/TTZ/9o0dq1a5c7Pz4+3ufn6Oho8vPzfaZNnTqVwYMHF/6clJREr1692Lp1K8uXL/dZdtGiRdx444088MADJCQk0KdPH1auXOnX/IyMDAAmTpzo061f0HN2Np0pmZmZREdHV/p9xUVHR3Pw4EHn9VQ3IRmgAi1btgTg22+/LZwWGWlLzsvLK5yWnZ0dsBq+//57li5dypAhQ3y+1PPnzwcosRdKTExk/Pjx7Nq1i2XLlpGbm0u3bt3Ytm1bhfMbNmwI2F6zgr1x0deMGTMqXX9iYqLP7+ps5eXl0aBBA+f1VDchHaDvvrOPFW3UqFHhtHPPPRfApznxzTffBKyG1NRUBg4cWOLLfOTIERo2bMicOXPIyckprKlok7BLly5MnjyZEydOsHr16grnN2vWjNatW7NqVcnncXXo0IHZs2cDZ/6I+KNx48ZkZWWd7ccvlJWVRePGekpLcSEZoOPHj7NmzRruvfdeoqKiGD58eOG8iy66iOTkZP7+979z8OBBNm/ezLRp0wJSR8Ff/UcffbTEvLi4OB588EGOHDnCvHnzCqevX7+eF198kezsbLKysnjttdcKj338mT9+/Hg++eQTxo4dS0ZGBhkZGYwePZqTJ0/Sr18/AM477zwANm3aREZGBueddx6rV68u9TN07NiRw4cPOze//vvf/9KxY0endYh//O6F27lzZ6kP5Y2MjDTnnnuu6d27d2HPU1GLFy82l1xyialdu7a5+uqrzerVqwvfm5KSYl5//fUS68zMzCx8f/H5gwYNKlFLXFycz89r1qzxqaH4+ZiUlBRjjDELFiwwPXv2NElJSaZevXqma9euPp+hovnGGLNo0SLTpUsXExMTYxo1amQGDhxodu7c6bPMiBEjTP369U29evXMiBEjyvwdF5wHWrhwYYl5KSkpJX5PjRo1KrFcZmamzgMFUaW7sSWwhg8fbnr37n3W73/66adNmzZtzMmTJyv9Xqp5gEKyCSdV69lnnyU9PZ0pU6ZU+r1ffvklkyZNYubMmURFRQWguvCmANUA9evXZ9myZaSlpZV74WhpXn75ZRYuXMill14aoOrCW0CeziChJzExkVmzZlX6fYHqoKkutAcScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIg4DcznD8+PHCgTZEqrOIAKzTBGCdEt4GAHO8LiIQArEHuj4A6wxHbwB/A77wupAQ8JXXBUj4qdaDaYilTgQRBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCAgqcln8oKqAAAECBJREFUsALY7nEdUoUUoOAYAiwCkr0uRKqWAhR4ccC1QGdgvce1SBULyODy4iMHGOR1ERIY2gOJOFCARBwoQCIOFCARBwqQiAMFSMSBAiQiIanoE+o+OP1z0ddej+qSKqQTqcHRy+sCJDDUhBNxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQe6GrtqDAcSik07iL0K+8fFpqcC+4JQk0jY+Af2Hp/ccl4ngQNAtEc1ioSs7pS8Ya746wTwilcFioSySGyzrKIQdfWqQJFQNx67lykrPHuACM+qEwlxl1F+822sd6WJhIf/UHaIOnhYl0hYeJLSm3HbvCxKJFy0pvTm22NeFiUSTr4B8vEN0U88rUgkjDwE5GGDkw985W05IuGlCWf2QHnAKG/LEQk/n2JDdAobKBGphHuxe6ClHtchAaYz45UXDVyA7XFrBVx0+lUXqHf6FQ/EYvdCh06/ck6/tgNbgE3A5tP/nx3MDyBVRwGq2DnYR9R3B3oAXYAY7B5mJzYAWzgTlMPYoIwA/on9HdfHPu6+Lvb2hlbAhafXDbAB+Pj0axn2qm2RsFUb+CWwABsGg91zTAVuB36KDUR5zq9gfi1siPoC44BV2FseTgFfAg8Dzc6qehEPRABXA/+L3ZPkAfOBodgmWzAkAP2ASdi90ClgMfArKg6siCcisXuB1dg9zQbsX/9GXhaFbd71BeYAx7GhHgskeVmU+KrJx0DnYP+y/x57XDIb25RaW4l1xHGmE+H80z/HYY956nKm4yAH21GQAXyH7UD4oRLbScIeU406XferwAvoKXfikeuxF3geByZjj0UqUgvbmfB74H3ge3xPmH4PbAT+jW12/R/wIfAZ8PXp7R3mzOU9B4HPsfcRXY/tvatIPPBbYDdwFHgc26EhEhTNgbexX+B/UfGBfjy20+BdbBPKYL+8M4Ex2OOVVlRunINm2N68+4AJ2D1ePjaEX2AvPG1ewTpigd9hA7kF+J9KbF+k0iKxX/gc4FvsF7i8ZXsC04Ej2L3UO9gm1MUBqu9coD+2abYPG6ilwBDK3zOdD8zDBnsOkByg+qQGawwswY6M8wfOnHspLhL7Jd6A/UKuxh5zBPtLGQVcx5kAZwMvYT9HWXphb+bbBVwT4PqkBrkG2+Tajj1+KU00MAx7jJKH/eK2CUJt/kgAHgX2Y8M0nrJ7B+sBb2DPJT2BDaLIWXsMex5lNmU3g7pi7985jg3ORcEprdLisHvDnUDW6f8vKyAjsXvbxUBiUKqTaiUKeA27NxlRxjINsM2iU0Aa9rq2cFAbu3fJxfbsXVXGcp2AHcA6oGlQKpNqIQa7x8kFbi5jmT7Y8zE7gJuCVFdVa4Xdw5zCnlwtbYjmJti96/bTy4uUqy7wEfb8SmkDGEYDz2F7uKZiu6jD3RBsz+KnlN4ln4Q917QfuDyIdUmYicE2xfYA7UqZ3xRYgT0QvyOIdQVDG+wJ3Axsb1xxcdgTvwcInc4RCSGR2HMgWcClpcxvzZmrBC4JYl3BFAfMwB733VnK/NrAJ0A6FZ+klRrmJexlLT8rZd5l2GvOVgINg1mUByKwHQz5p/9bXH1gDfbKBZ1wFQAewf7V7VfKvB7YS10WAHWCWZTHfoPtXHiulHlNsZ0Kn6HHrNR4V2NPGo4sZd7l2PD8i5r5RRmE/d2UNqDjJZw5KSs11LnY9vy7lLwl40LsZf6LKfuynZpgOPaSpF+XMu82bFPvxqBWJCEhEvgA2zHQoNi8JtgmyufoDk6wx0InKb2JOwXb5d8iiPVICHgQe+lN8fMatYDl2JvVdNfmGf/AXpBa/DKlOtgrFZZRs2+srFGaYr8MT5Qy7xngGHqMSHHR2HNg32C7s4vqiN1DVbdzY1KGOcBW7A1lRfXA9jzdHfSKwsOPsCdSJ5UybwL2JKz22tVcT+xBcZ9i0xtgb0KbEfSKwstN2I6DG4pNr4e9j0gPQK7GamFH8XyzlHmvYe/58WdMgZpuOraTpfh5scHYPXhpV3JINTAIe8K0ZbHpl2P/4W8LekXhqRGQCTxdbHoE9g7ceUGvSAIuAttbVLyJFoV99s5S1ItUGb/G9mIWH9+hoInXNugVSUD9gtL/YW/H7pXC5Wa4UBGFvSbu/4pNL/hDNT3oFUlA/ZuSxz6RwHogNejVVA83Yv8oFb/1o6CpHKyhjCXALsf2vHUpNv0W7LGP7m85OxHY80Kzik2vhb3CY2zQK5KAmIDtfStuNfackJy9X2JPohZ/APJfsdcZalQfP4TywXc0tnv6BexVBgWuwl6Ofxn2MSCBUB97n5GX1hHYK6ajsPcGvY0dLrjARdg/Wtdib5GXMHUjtplW/F7/V7HHP4HUGN/H1Hvx+iDAnxHsJVF7KTkoyb+x40ZIGJuDHeegqHOwl508FOBt15QAtcB2JhQfS2Ek9n6q4pdMSZiIxAal+CPi+2P3SoEe66ymBAjsiD7FOxN+dLqG7kGqIWxFel1AGS7FXtz4cbHpN52etivoFVVf/8JeH1f0zt0d2KGOFaAKhGqAumOvHi56rBOBHev6Qy8KqsYWY8fIu6LY9I8o/ykWQmgH6CNs+7zAJdimlXqGqtZ32HM/xcPyMXZA/rpBryiMhGKAIrAjiy4rNr0H9iFXa4JeUfW3lJLNtY8581Q+KUMoBug87HmYb/5/e2ceYlUVx/HPNJZLqRM6jkiGmqVkWmmUtrm0aSUUGFEUZEQb2kq2EUVUFEULbRQRFVkKbVQmYWmYRIu2WzpmOSVhpaY2wjQ02R/f+5o75573Zibvu5133+8Djzf87ixn3nvfe875/X7n93PsxyFRtWU+ovyzDJhEx33QJuTIsVzDEoQooMIb5mYgjCEpKiMdvkQuazcHbi1WmL4kIQpoFCrTG+9iXYvOAvnSeozdpxG5rV2xrMVmoJKEKiBXKMNQAXkTUHnYiUIDrlhsBuqEEAU0AhUOiVN4Y9dlPJZqwieWdaireM/sh1MZhCigOnTsOM5gVM5qW/bDqRp+RA6cONuQV9Rc2UUIUUD7oDysOP08NiNdmkkKpfCam4CKEKKA+qI3M45PVEa6/IEJqNuEKiBXLD5RGeniE9CO6NlKhhUhRAH1QQ2zOrMZ6dJMsm/szujZCvUXIUQBtZA8h9KCeYLKTW9UW9y14bEbESEKyHcn9G1wjXQptnTGYzciQhRQsc2sCai8mID+A6EKyJ2BfDYjXfrS7jSI28AEVJQQBbQDZWPH+S2yuf1tjPRoQNnXcQrvgwmoCCEKqIlkVnAjGuvI7IdTNYwmmWs4AiX1mge0CCEKqFhOVpvHbqTDXihh1xWQL7HXiBGqgBpQTlyBVjQzmYDKwwG092CKYwLqhFAFBMmmuN9itbDLxRg0w7vZ7iagTghRQE0ocHqwY/8AVeUx0mcyqjUR3+v0A4ZgAipJiAJqQ6Vlj3PsS1G6vS3j0mcayWpHx0fPH2U8looiRAGBilyc6NhWIhe31SpLlwbUrc4tYjkV1Ur4NfETxr+EKqClqLzs8JjtL+B9ksIydo8T0Wu7wrH7ZiXDIVQBfYgygd3Z5nVgBpZenyZnI6HEj4sMAMaRnJUMh1AF1Ip6AM1w7Auj51nZDie31KPODG5f1OloL7o88xFVGG5fmJBYCDyO7oZbItt2YBFwPvB0Gf/278DMMv7+rpDF3uMc1LH7dcd+PrAYvd5GhdIPLeMucewz0d1xWNYDyiGfkGzU3IAaDdssnwPmk9zc7oliRQ9nP5xcMQUVU5zk2K9F1XgscTcHnII6NLhJpHPQKUm3DJPRdd4h2QEQ4HPgyYzHYpSJWuAH4FHH3gs1IL4n8xHlg6PQ7ON6OU+I7G6vIKOCuQyl9gxx7NehwOqgzEdU+byFUqNclmENzHJHT1S3+V7Hvg/wE9ZNurvMRMviKY59Ipp9Jmc9IKP8XIsCfQMd+1now2BvetfoDXwPPO+5tgj/rGTkgL1RXOQBz7VFwFd0bA5l+LkDxXbc5fBk/O3ujRxxEYpPHObYRyKP3C2Zj6iymID2klc49h7AFyhwauSYGrTEWBF9HWcOCq5aoqmfvsAalPNW61ybh84BuXUojBwyFs1Csz3XXkB9PS02lGQ+/tdmP1Rxx2bvKuJBVH5pqGPvD6xHAULbD7VzJTqu4Hbh3gMt2xqxsslVxd7AanTkwRXKeHRHfY7kMq8amYXEM89z7UaU9X50piMygmAMSjS923NtGtosP5LpiMJjCnKuuFkcoJhPK3B1lgMywmI2cr26Z4YAzkVOhRsyHVE4jEcJoQtInvkaiALQr2GzdNXzDDq7M85zbQ4S2F1U1wdlGor1LEYFE+P0Rl7MH4B9Mx6XESB7AW8DvwAHeq6fh5Yqz1IdjoUz0bLtZZI9lmoj+2ZURMQwAMU4VgHfocNgLqei/dIbJIvW54UalO7UBjxEctlWAzyF4j3HZDs0oxJoQAJahY6Au0xExx/WA0dkOK4sqANeRfGx6zzXa4D70Ex8aobjMiqMEWht/y0qieVSj/YFrcD15GNfNAHdODbhz8LogWpHtKL6B4ZRksGoRO3PwKGe6zUosNiKzr645YMrhT7Abchd/w76v116oT3PTmzmMbpBHSrHtJXixxyOAj5FFWnuRB/ISmEWckNvBS7FP5MOQnmDm9H/ahjdojfwEtoX3IS//l0tMBfFS5pQ9Z+QU1qmoGTQv9EhwvoS31fY743OYmBGPiks1/5ExTN8yxwi+2NoObQRuIqwZqTpKHazCwmomBctvjx9DYvzGClxJHIubMSftVBgCHA/Ovm6BaXATCz76PzshxwdX6MZZxGlc9aGA0vQTWBu2UdnVB11wIvoLv4yyUzuOPXow7s6+v61wK1ITOWs5HoAcDFyCrSh/cujwOElfqYncDOK73xD/lz0RmCcjNL3m1GGcmfZCRPQ8YmNSEw7UED2GlQCqpQQS1GHZsYL0H5mQ/T7m4FXgDNIpuG4nITE3YwEXw2ZFsGRh1hId9kTuBx537agZduTKAWmFKPRmZppqPlUoZxWMxJlU/R1MxLadlQ5qPDoiwK+o2jPmGhBDayWRo+PkOOjFMciwZwOvImWbBs6+RmjTFSjgArsjz6IF6KE1PuAJ1DcpCvUI1GNQv1ch9JRLHW0C6ogqs2oD+kaNHs0oeVaZ9SgWM7NqBTvu6hAyHtdHKthlI1BKCi5LXo8h6L6IdxchiKRr0VLvCX8f44NwyjJAHTA7DP0Yf0euB3tg7Lso7Q/ciYsRx64TWgfNjbDMRjGbjEWVUItOA+2os39XHQaNk1v3BDUJe4JtLzbhbxqC4DTUv5bRsqEsEwJmRrgEOQ4mIpSg+pQsHI92ss0Ro/t0WMH2vO0oJmrP+p1VNgbDafj3qk/qlvwMXIkLENpOC0Z/H/GbmIC6h61aHY6mI4iOIiuZS+0IY9ZI8oab0T7m5V07FFqVAgmoPSoRTNNfzTb9ER7mO2oUlAznbvKDcMwDMMwDMMwDCNY/gFQodjaA4PBwwAAAABJRU5ErkJggg==", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'createAsset': (node:createAsset connections:{lockAsset:[0.5]}), 'lockAsset': (node:lockAsset connections:{MintAsset:[0.5]}), 'MintAsset': (node:MintAsset connections:{TransferAsset:[0.5]}), 'TransferAsset': (node:TransferAsset connections:{TransferAsset:[0.5], BurnAsset:[0.5]}), 'BurnAsset': (node:BurnAsset connections:{})}\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOsAAALzCAYAAADwEPAKAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd5xU9b3/8deZsiy7wNJXiiBisIPY4IrEjiWiAQvGEkAxpphEiYlY8HptiYbITYy/RDEYQeRaooZmxOSachErglEioBClCFKEpe5O+f7++LLOzs7M7sy2M9+d9/PxOI9hZr5zzucM895zzvc0EBEREREREclPnt8FFKjOQA+gI9AWaAOUAFFgJxADtgOb9g8xf8qUfKKwNh8POAI4FjjKC3qDCHKkiZruxCnKYSxxL+RtAz42EfMu8D7wHvAWsK8Z6pY8pbA2rb7ASIKc6XneqSZqyryQF2/Tp02kZEBJUfHBxV5ReRGhbiGKuhYRLAsSKArgFXkEigOYqCG+J44xhtiOGJFtESKb7bDvk33sXbU3su+jfcR2x8IEiHhB7x0TMa8AC4A3AOPv7EtzUlgbrxcw1gt7Y0zEDAy0DUTbn9Dea398+2C7Y9vRdkBbvGDTfs1Vn1Wx651d7Fyyk4o3KqoiGyNFXsjbbKLmGWAWsLhJJyh5QWFtGA84ywt615u4OS9YGox3GtEp3PG0jrQ/oT1euGW/1r0f7WX7q9v54uUvqvat2Vfkhb3lJmJ+DcwEdrVoMdJsFNbcnemFvZ+biDmm7YC2sW6XdAt2/lpnAm0CftcFwJ5/7WHLH7aYbfO3xU3M7DIx89/AVGCH37VJ4yis2Rvihb1HTMQMKjulLNbzup7Btoe29bumjKLbo3z+5Od8PvvzqImaXSZqJgHTgLjftUnDKKz160iA+zFc2+6YdtEDf3xgOJ9DWlt0R5RN0zfx+ezP4wRYZiJmArDE77okdwpr3YZ5Ie/ZYLtg19439Q53Prez3/U02N6P9/LpvZ9Gd7+328NwCzAF9R47Jeh3AXlsEh4zO/xHh9Kv/PYrodKjS/2up1HCncN0vaBrIFAcCOx6e9cZXtAbRpy5aF+tM7RkTRUkwG8wTOg9sbfX/RvdW923tPv93Xw88eNIrCK22kTMmcA6v2uS+rWyn2Gjhbyg9weCfO3gnx0cLDulzO96mk3VpipWfXdVpGpd1VYTNScDH/tdk9RNYU3wCPBEIBS4/JDfHhJsN6id3/U0u1hFjJXfXhndt3rfBhMxJ2KPQ5Y8lR87B/PD3Z7nXXHwgwcXRFABgh2CfOXhr4TC5eEeXth7BSj2uybJTB1M1hl4TOtzW59Ap7M6+V1Liwq0DVD21bLglhe2dDEx0xXDAr9rkvQUVujkhbxXO57esW2v7/cqyDWNUIcQbQ5sE9j+yvbjgbeBVX7XJKkK8sdZy22BkkCnvrf3Leg/XJ3O6kSnszsZL+z9Ggj7XY+kKvSw9iPAD3p+t2c42L6gswpAr+/3CmA4ELjO71okVaGH9fvhrmG6jurqdx15oahHEd0u7hb0Qt7N6LeRdwr5PyTshbzx3S7qFvZC2oNVreslXTFR0xs41e9aJFkhh/UMEzUdO49093jf5lB8UDElh5dEgMv9rkWSFXJYh7fp3aaqqDz7yyEVig4ndQh7Rd7pftchyQo2rF7YO7ndse2U1DRKB5ViqsxBQBe/a5GEgg0rHv2L++qAnXSK+xSDPRS1j8+lSA2FG9YYHYMdtbsmnVBZqPqf6ibPIwUbVhM3xfly3aR8E2j75ffi9km8rUzB/lq9oFcRq9CF7tOJVkSr/7nNzzokWcGGlSDbol9E629XgGp8L1v8rEOSFWxYTZVZuvtfu7VoTWPPh3sgQASdkJ5XCjasGP5v99LdcV0yLNXuZbvxgt67QKXftUhC4YYV/hLbFQvvWqYL1tdkYobtr26PmIj5k9+1SLJCDus/vbD3/tYXt2rZWkPFogqiX0RDwAy/a5FkhRxWTMT8ZtuftsUjmyN+l5I3Nj25KeqFvL+j7dW8U9BhBaZj2LThtxt0SwnsUnXXO7tCJmpu97sWSVXoYd1noubmrX/c6u3+YLfftfgqXhln7S/WRrygNw/4P7/rkVSFHlaAWV7QW7jmJ2sisQLek7P+wfWmal1VpYmZ7/tdi6SnsIIxUTMusiWy65P/+iReiPdY2/anbWx+brNnYuZq4N9+1yPp6Uh2axdx3tj3yb4rozuigbJhZQVz6YiK1ytY85M1cTwexPDfftcjmSmsCf/GsHzP8j2XxPfGvQ5DOrT6+xXsfGMnqyeujpmY+R/ifMfveqRuCmuyfwGrd7+3+8LKdZWUfbXM8wKtM7HbXtrGmp+siXtx7zkTN2OBwt1gd4TCmuo94PV9q/ddUvF6hddhaIdAsF3r+ZpM1LDhoQ2sn7oeDL8wxnwbBdUJrXOx0TSO8sLe84GiQL++/9k31PGMjn7X02iVaytZc+ua6N4Ve6MmZr4D/N7vmiR7CmvdSgjwK+JcUza8LHbgTw4MFvV077JN8ao4m36/iY2/2xjDY4WJmIuAD/2uS3KjsGbnNC/sPYpHv/IryoPdr+xOqGOo/k/5zMQNXyz4gg2/2RCJbI5ETcxMBn4F6PhKByms2QsD3/eC3m1e0OvQ/fLuoW6XdiNcnn+3hYlXxvniT1/w2e8+i1RtqAriMZM4twHr/a5NGk5hzV0p8B0v5E0yMdO57OSyeNeLuwY7DO2A31f23/vxXra+uJWtL26NxvbFAJ4izl3ooPxWQWFtuCLg617Iu95EzcnB0mC07LSyUKfTO3ntT2hPoKT5Dw4zccPeD/ey/dXtfLHwi6rKdZVFXthbayLm/wGPozuZtyoKa9PoB4z2wt4YEzXHe55H2wFtI+2Pb19UcnQJbfu3pU2fNnjBxn3dkc8j7F29lz3/2sOuJbtiu5bsMvF98ZBX5G0wVeZ/gOeBxVCIB022fgpr0ysHTgGGe0XeCBMxh2AIeEEvXtS7KNKmV5tQuFs4WNS9iEC7AMGSIF7QI1AawFQZ4vvimCpDbFeMyLYIVRur4pHPI9F9n+wLxPfEQwBe2NtsYuZV4vwN+Dvwvp8zLC1DYW1+xcDhwJHAYUBvL+T1JkgfDO2J0w5D0MRMWzxiXtDbi0clAXZh2GiqzBpgI/Zu5B9gg7nVt7kRKXAlgAHG+VyH5DGdIifiCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhzW/nASuBqN+FiP/y/yajhak/MBXoi70dh4iWrHnqbuA14Dhgp8+1SJ7QkjU/XQPs9bsIyS9asuYnBVVSKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKz56XzA7B96AcEazyf4WJf4SIcb5qd5gOd3EZJftGQVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijtBpWP5YBBxN8vdfDESAWI3XosBQYEXLlSYiNd1B4mTyTEMcWO5XgSJi9ceGsa6wRoFJfhUoIglLsKu8dS1Z+/lWnYh86UYyL11jwOv+lSYiNfUg85I1DlzvX2kiUttfsdum6ZasuuO5SB6ZQPqOpVf8LEpEUnUEqkgN7Fg/ixKR9P6IPRiiOqiVQJmvFYlIWmNIBDUCPOdvOSKSSQmwh0RgL/K3HBGpy0xsUHcBbX2uRfJUY+510xs4qakKKXDr9z++DYz0s5BWZC2w2O8i8sWl1H8wugYNfg3P0so0/nxWYzQ0xTB5MkQi/tfRGoaLL26CaOQfnXyeLyZPhpDuwCmZKaz5Ihz2uwLJcwqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYW9KqVeB5MHSo35U0n08+gQsugIqK1PcWLIABA+o+YWHSJHj66earz2EKa0t6/HH7+MYbsLwV3nNq6VI4/ngYMQI6dEi8/vHHNsC33AKbNtU9jmuvte0mT27eWh2ksKbTrh2cfHLTjjMehxkzYPBg+7w6uPmmofNeUQEjR8JFF8H1tW4mMHkynHQSvPMOtG9f93j694cXXoB774Vnnsm9jlZMYW0pCxfa1b9HH7XPZ86EaNTfmprSAw/Axo1wxx2p7/3ud3b1NtvzdQcNsieQ/+hHres7aiSFtaVMnw7jxtnVxIED7ergggV+V9U0jIHHHoMhQ6Bnz9T32zbgGnCjRsG6dTB/fuPrayVaPqxbt8LEiXZ1p00b6N0bzjwTfv972LsXXnzRdsJUDytWwKWXQpcuide2bLHj2rwZfvADOOggKCqCbt1g9Gi77VRTNGo7Lc46Cw44wP54jj4afvlLu3pabcoUO/7du2HRosT0ai8Rsp1utW3bYO5cGDvWPh8/3j5On57atrLSLp0OOwxKSqBzZ7t6OWcOxGK5t8u23mznPZ1ly+wfn0GD6m+brWOOsY8vv9x04yxg9oJpxmQ/fPaZoV8/wwEHGObONVRUGDZuNNx9twEMU6cm2l54oX3tlFMMr75q2L3b8PrrhmDQsHmzYcMGQ9++hvJyw/z5hp07De+/b9sXFxteey0xrrlz7bjuu8+wbZv9/K9+ZQgEDDfdlFpnaalh2LD085DLdKuHhx4ynHZa4vnmzYZw2BAKGTZtSm47YYKhrMywcKFhzx77/dx0k63/1Vdzb5drvXXNe6Zh5szE91tf21697P9hfe127LDjHD48t1qMMVx8saEVXjCtMXIP67hx9j/g6adT3zvnnPRhXbAg/bjGjrXvz5qV+gehTRvDccclh/XUU1PHceWVNjQ7dmT/g81lutXDsccaZsxIfm3UKDueKVOSX+/Xz3DSSanjGDAgOYTZtsu13oaE9YEH7DQefrjpwmqMwfMMhxyisDaB3MNaVmb/Uysq6m9bHdYtWzKPKxBIDVp1OMCwdm3d0/j5z227XJYuuU532TJD+/Z2zaBm2zlzbNsjj0x+/Tvfsa9fe61h8WJDNJq+jmzb5VpvQ8J61112PI8+2rRhDYdte4UVaMlt1spK2LEDiovr776vqbQ087jicSgrS97G9TxYssS2W7XKPu7YYbfvjj4aOnVKtPvxj+37e/bkNg/ZThfsdunOnXY+ara94AL7/gcfwJtvJto//LDdxbN6NZxxht1fec45dndGTdm0a0i9DVFcbB8jkcaNp7ZotGGdU61Uy4W1TRv7g9m3z/54Gzuujh1t50dd19o97TTbfuRIuPtuu8N95Ur74zUGpk617xuTPH7Pa5rpRiIwa5btsEnX7oYbbLua+1w9D666Cv78Z9i+3Xa4GWM7hB58MLd2udZb17zXpUcP+7hjR+6fzaSiwtZWPW5p4d7gUaPsY7pdFoMHw403Zj+u0aPtX95Fi1Lfu/9+6NPHvh+L2TYHHGB7RLt1S/wg9+5NP+6SEqiqSjw/9NDE/tFspwu2B7hrV3tAQDrXXGMfZ89O1NKxI3z4of13OGx7sKt7yGvuxsi2XS711jfvmRx1lH1ct67udrlYvz553NIoDe8N7tHDMG+e3XZdu9Zuf5WXGz75JHWbde/e9OPatMnQv7/h4INtJ9T27YatWw2//a2hpCS5E+v00+24HnjA9sTu2WP43/819OljX3/lleRxn3OO3db79FO7PRsKGZYvz326559vp1nXd3LiibaGJ59MbGOecord1t23z07vzjttm3vuSd4WzaZdLvXWN++Zhnjc0L17dtu62W6zPvWUnZcXXtA2axPIPazG2A6jG26woQ2HbXAvu8ywcqV9f/Fi+59Ue0g3rq1bDRMn2h9iOGzo1s0wYkRq+DZvNlx3neHAA2278nLbMz1pUmL8NXtFP/zQ7jIoLbWfqd3LWd90165Nrn3IkNTa16xJncfycsPSpbbWww+3Yerc2TB0qGHaNBuK6s9n2y6X7ymbec803HqrDfb69anvVe86SzdMm5Z+fJdcYoNdVaWwNoGGhVVD6xy2b7fhuu66xo9r6VK722b27IZ9vpWGVYcbStMoK7Pb6M89Z3uqG2r1arudfcstcNllTVdfK6CwStMZPBjefhteein9+azZeOQRe8bNvfc2bW2tgG5bJk3roINg3ryGf/7++5uslNZGS1YRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriiMafIqc7fUm+acoLt+WRxod1zJgmKENExA0l2AuIjfO5Dslj2mYVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsOa384CVQNTvQsR/jb8ivzSH/sBUoC9Q7nMtkie0ZM1PdwOvAccBO32uRfKElqz56Rpgr99FSH7RkjU/KaiSQmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmHNT+cDZv/QCwjWeD7Bx7rERzrcMD/NAzy/i5D8oiWriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYROw/LHIuBokr//YiACxGq8FgWGAitarjQRqekOEieTZxriwHK/ChQRqz82jHWFNQpM8qtAEUlYgl3lrWvJ2s+36kTkSzeSeekaA173rzQRqakHmZesceB6/0oTkdr+it02Tbdk1R3PRfLIBNJ3LL3iZ1EikqojUEVqYMf6WZSIpPdH7MEQ1UGtBMp8rUhE0hpDIqgR4Dl/yxGRTEqAPSQCe5G/5YhIXWZig7oLaOtzLZKnWvJeN5e24LRcs37/49vASD8LyXOvAev8LsIvLXnWjWnBaUnrNAZ4xu8i/NKy57M+/TQYoyHdMHkyRCL+15Gvg+jk87wxeTKEdAdOyUxhzRfhsN8VSJ5TWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXFEfoZ1yhTwPDv07p3f01q1yn526NCmry1ffPIJXHABVFSkvrdgAQwYUPdJCJMm2TOuxBmGp582GJP9MGiQoVev3D7T0KGh07rlFgP7L8nywQctU2tLDu++a+ja1fDQQ8mvf/SRYeRIw8CBhg4dDMFg5nF89JGhXz/D7bc3vA77HRf0BQzyc8nqingcZsyAwYPt88cf97eeTNq1g5NPzv1zFRUwciRcdBFcX+sGAZMnw0knwTvvQPv2dY+nf3944QW49154pmDPHW80hbUxFi60q3+PPmqfz5wJ0ai/NTWlBx6AjRvhjjtS3/vd7+zqbbbn4A4aBBdfDD/6Uev6jlqQwtoY06fDuHFw/PEwcCBs2mS34VoDY+Cxx2DIEOjZM/X9tg24rtuoUbBuHcyf3/j6CpCbYd26FSZOtKtXRUXQqROcey68+mrdbdu0sZ1IZ54Jv/897N2beRpPPpnoeKoeNm5MvL9tG8ydC2PH2ufjx9vH6dNTx1VZaZdOhx0GJSXQubNdvZwzB2Kx3NsBbN4MP/gBHHSQ/Q66dYPRo2Hp0kSb6s6z3bth0aLEfGSzNFy2zP7xGTSo/rbZOuYY+/jyy003TmkWTdPB9NlntrOivNwwd65hxw7DihWG0aMNnmeYNi217QEH2LYVFYaNGw133207LKZOzTytaNQwcaLhrLMM27al1vbQQ4bTTks837zZEA4bQiHDpk3JbSdMMJSVGRYuNOzZY2u46SZbw6uv5t5uwwZD3772O5g/37Bzp+H99w2nnGIoLja89lry9EtLDcOG5fbdz5xpp3vfffW37dWr7g6m6mHHDjvO4cPVwZTnmias48bZ/7jZs5Nf37fP0LOnoW1b+yOv2TbddM85J3NYv/jCcPbZhh/+0IY2XW3HHmuYMSP5tVGj7PSmTEl+vV8/w0knpY5jwIDkEGbbbuxYO51Zs1L/kLVpYzjuuMaH9YEH7DQefrjpwmqM/YN6yCEKa55rmrCWldn/uIqK1PZXXWXfe+KJ+ttmmtaHH9pwnHtu5rbLlhnatzfs3p38+pw5dnpHHpn8+ne+Y1+/9lrD4sWZ/wBk266szBAI2CVVuj8iYFi7tnFhvesuO55HH23asIbDDdtFprA6ts1aWQk7dkBxcfrdBeX7b2m6cWP9bdP54gv4+tftdu1LL9nt1nSmT4edO6G0NHmb9oIL7PsffABvvplo//DDdhfP6tVwxhnQoQOcc47dnVFTNu2q5yseh7Ky1O3qJUtsu1WrspvnTIqL7WMk0rjx1BaNNqxzShwLa5s29ge6b58NS22bNtnHAw6ov206oRD8+c/wxz/C0UfDtdfCW28lt4lEYNYs22Fj0lzf9oYbbLua+1w9D666yo57+3Z48UXbdvRoePDB3Nq1aQMdO9pa67rO8GmnJY83Vz162McdO3L/bCYVFba26nFLTtwKK9juf0jt/q+shL/8xf7VPvvs5LbpdqcMHgw33pj8Wvv20KuXPYhgzhz7+PWvw2efJdrMnQtdu9oDAtK55hr7OHt2ore5Y0f48EP773AYzjrLBtHzkucj23ajR9sl1KJFqdO//37o0yd5X2ZJCVRVJZ4femhi33AmRx1lH9c14d0q1q9PHrfkrebpDa6oSO4NrrmNVd22Rw/DvHm27dq1dtuwvNzwySd1T+uvf7XbWEOH2g4sYwznn287X+qq+8QT7TbWk08mtjFPOcVu6+7bZ3uL77zTtrnnnuRt0Wzabdpk6N/fcPDBhgULDNu3G7ZuNfz2t4aSktTv+Zxz7Lg//dT2FIdChuXL656HeNzQvXt227rZbrM+9ZSdlxde0DZrnss+rD//eeJ42+rhttsS72/ZYrjhBhvEcNj+EM8+2/CXv6SOq3bbHj0Ml11mWLnSvj97duq0pk61HTy1X685DBmSOq01a1LblZcbli41XHed4fDDbZg6d7Z/AKZNs6Go/ny27Yyx4Zw40QY2HDZ062YYMcLwyiupdX34od1dUlpqOPDA7Hp4jTHceqsN9vr1qe/NnZv5u6m5+6zmcMklNthVVQprnst9yarB32H7dhuu665r/LiWLrVrPrV3uWU7KKwObrNKyykrs9vozz1ne6obavVqu519yy1w2WVNV1+BUVilboMHw9tv211Z6c5nzcYjj9gzbu69t2lrKzC6bZnU76CDYN68hn/+/vubrJRCpiWriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcUTLniK3eHGLTk6kNWnANSobzLTgtKR1GgPonpHiqxLsH7NxPtcheUzbrCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxTW/HYesBKI+l2I+K9lb58h2eoPTAX6AuU+1yJ5QkvW/HQ38BpwHLDT51okT2jJmp+uAfb6XYTkFy1Z85OCKikUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMU1vx0PmD2D72AYI3nE3ysS3ykww3z0zzA87sIyS9asoo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFH6DQsfywCjib5+y8GIkCsxmtRYCiwouVKE5Ga7iBxMnmmIQ4s96tAEbH6Y8NYV1ijwCS/ChSRhCXYVd66lqz9fKtORL50I5mXrjHgdf9KE5GaepB5yRoHrvevNBGp7a/YbdN0S1bd8Vwkj0wgfcfSK34WJSKpOgJVpAZ2rJ9FiUh6f8QeDFEd1EqgzNeKRCStMSSCGgGe87ccEcmkBNhDIrAX+VuOiNRlJjaou4C2Ptcieao573XTGzipGcffmqzf//g2MNLPQhyyFljsdxGtxaXUf7C6Bg0NHZ6lwDT/+azGaMhmmDwZIhH/63BhuPjiZv/Z5iOdfJ4vJk+GkO7AKZkprPkiHPa7AslzCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOyJ+w7toFnpc8LM7idMUf/zj5M/fc0/y11mXVKlvH0KH+1tGcPvkELrgAKipS31uwAAYMqPukhEmT4Omnm68+yZk9n9WY3IZ33zWw/5zFc8+tu+2WLYZ27WzbK65Ifm/nTsMhhxi+9rXca2jMcMstifo/+KBlp90Sw7vvGrp2NTz0UPLrH31kGDnSMHCgoUMHQzCYeRwffWTo189w++0Nq+Hiiw06nzVPtG0LffvCSy/B229nbjd1Khx4YPr3jIF43A6N1a4dnHxy/e3icZgxAwYPts8ff7zx024O2c5PbRUVMHIkXHQRXF/rhgGTJ8NJJ8E770D79nWPp39/eOEFuPdeeOaZ3OuQJtfwJWtpqeE3v7FLpwsvTN/uiy8MnTsbfv/79EvWphxKSw3DhtXf7qWXDH37Gt56y9ZUXm6IRPxfGjZ0fmoPt91mCIUM69envrdnT+LfvXrVvWStHi65xNC7d+7fkZaseWb8eOjVC+bMgffeS33/V7+C886zf6XzxfTpMG4cHH88DBwImzbZbbjWwBh47DEYMgR69kx9v20DrvM2ahSsWwfz5ze+vgKQv2Ft08Z2HhljV5dq2rULHnoIbr01/WdffDG502nfvvSv//vfMGYMdOwIXbrA+efDxx8nxjNlim23ezcsWpT4XLrOk23bYO5cGDvWPh8/3j5On57atrIS7rgDDjsMSkqgc2e7ejlnDsRiubcD2LwZfvADOOggKCqCbt1g9GhYurRh81PbsmX2j8+gQfW3zdYxx9jHl19uunFKgzRuNbh61aq83BAIGJYvT7T52c8Ml15q//2Pf2ReDb7wQvve3r3pX7/wQsNrrxl27TK88oqhbVvDCWnU2i4AACAASURBVCc0bLXxoYcMp52WeL55syEctquNmzYlt50wwVBWZli40M7jxo2Gm26yNb36au7tNmywq9/l5Yb5823n2vvvG045xVBcbOexsavBM2fa6d53X/1ts10N3rHDjnP4cK0G+6zxYTXGcP/99j/0yivt89277Y9y2bLGh3Xu3HQ/Ahu0XH/cxx5rmDEj+bVRo+z4pkxJfr1fP8NJJ6WOY8CA5BBm227sWDudWbOS2332maFNG8NxxzU+rA88YKfx8MNNF1ZjDJ5ne+0V1nrl72pwte9+166izp4NH30Ejzxi92EOHNj4cZ9wQvLz6p7lDRtyG89779n9qxfVuph+9apw7V7hc86B116Db30LXn89sUq7YgWcemru7V58EQIBuxpf0wEHwJFH2h7adetym6faqjclmvpaUaEQ7N3btONspfI/rO3awQ032B/qf/6n3e66/famGXdZrfs/FRXZx1x390yfDjt3Qmlp8jbxBRfY9z/4AN58M9H+4YftLp7Vq+GMM6BDBxvMF15IHm827SorYccOW3NZWeqBJUuW2HarVuU2T7UVF9vHSKRx46ktGm1Y51QByv+wAnz/+/aH+NRTtoPj+ONbdvqel/m9SARmzbIdNibNNW5vuMG2q7l09Ty46ir4859h+3a7ZDTGdgg9+GBu7dq0sR1koVDd1x0+7bTs5ieTHj3s444duX82k4oKW1v1uKVOboS1rAwmTrSPTbVUzUVJCVRVJZ4feig8+qj999y50LWrPSAgnWuusY+zZydW9zp2hA8/tP8Oh+GssxI91TV3Y2TbbvRou4RatCh1+vffD3362PezmZ9MjjrKPjZ2dbqm9euTxy11ciOsYHdhbN+eORTN6dhjYeVKWLvWHq+8ejUMH27fe/xxuPrqzJ896ig48US7RHr++cTr3/623datrITPP4cHHrBLmdNPT/58Nu1++lO7v/nqq+1RXzt22F1JjzwCd91lNx1q7p6pa34yGTQIune3u3CaSvVupREjmm6c0iC59waXliaOqwXD2WfX3b5m2+rhoYcML7yQ+voVVxgWL059/bbb0o+r5jHFH35ody+UlhoOPND2iK5dm9x+yJDU+tasSR1veblh6VLDddcZDj/cUFJij8QaOtQwbZohHk98Ptt2xhi2bjVMnGg4+GC7y6hbN8OIEXaXVO260s1PNv8/t96a+QimuXPT/3+ArTfd+C65xPYcV1WpN9hnDdt1oyF/h+3bbbiuu67x41q61O62mT07988WaFjdWQ0W/5WV2W30556zPdUNtXq13c6+5Ra47LKmq6+VU1glN4MH2zOhXnop/fms2XjkEXsIae3DSKVOum2Z5O6gg2DevIZ//v77m6yUQqIlq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXFE858ip7uESVNryou2OaT5wzpmTLNPQkSkpZRgLy42zuc6JI9pm1XEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCmt/OA1YCUb8LEf81/xX5pSH6A1OBvkC5z7VIntCSNT/dDbwGHAfs9LkWyRNasuana4C9fhch+UVL1vykoEoKhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhTU/nQ+Y/UMvIFjj+QQf6xIf6XDD/DQP8PwuQvKLlqwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEToNyx+LgKNJ/v6LgQgQq/FaFBgKrGi50kSkpjtInEyeaYgDy/0qUESs/tgw1hXWKDDJrwJFJGEJdpW3riVrP9+qE5Ev3UjmpWsMeN2/0kSkph5kXrLGgev9K01Eavsrdts03ZJVdzwXySMTSN+x9IqfRYlIqo5AFamBHetnUSKS3h+xB0NUB7USKPO1IhFJawyJoEaA5/wtR0QyKQH2kAjsRf6WIyJ1mYkN6i6grc+1SJ5Kd6+b3sBJLV1IgVu///FtYKSfhRSgtcBiv4vIRrqzbi4Fnm7pQkR88hxwid9FZCPjXeSK9u1ryToKXuyuuwjeeiuEdGO/lhK9/HLizz/vdxlZ08nneSJ4yy0KqtRJYc0X4bDfFUieU1hFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCB6NKoTsDe43mT4BP9z9+jL11ySc+1pWi0UvWyIknUlVcnPUQ++lPm6LuFhV/9lk7nx07fjkf5oMPmnWa5qOPqCouJjJ8eLNOx0/m00+JXnQRVFTYF774gvi0aUTPPpuqHj2o6tiRyJFHEh03DvPeeymfj91+O/Fnn21sGZ8Bq4Ce2Evs/DewAPg3sAN4DXgU+BZwJI2/mdt5wErsVSxz0iSrwaGnnqJo374vh8CECfb1OXOSX7/EidMGk5jFi4l+85sEzjyTonXrCC9fjterV7NPNz5jhp3+W29h/vWvZp9eSzPLlhH5j//AO/NM6NABgOgttxC98Ua8kSMJL11K0YYNhB599Mu28TlzksYRuPpqYpMnE/uv/2pMKcuBq4DhQB/slToOBS4GpmBPTj8Z+A3wPrAFmAv8ADgwh+n0B+YAP6WB14TWNms94n/4AxhD4PrroV07vIMPJvzxx3hHHtmME40Tf/JJvGOOsU/3BzffVHXpQuS003L/YEUF0dGjCYwaRfA730l6KzB2LMHrr8crL4eSErxhwwg98QTEYsRuvTWprXfwwYSeeYbYz35G/Lkmu85cBLvk+wNwN3ZpewTQBfgaNrQdgF9gV5PfAG4COtcz3ruxS+njgJ0NKazR26zhN9/MfmIzZzZ2ci3OrFsHgNe5vv+LphP/858hFCL08MNEhg0jPmsWwbvvbjXnu8YefBCzaROh225Lej3029+mbe8NHAht22JWrwZjwPOS3guMHk3s5psJfP3rzfkdbceuHi/Y/7wLcAEwGrgXuBOYDjyIXYWu7Rpgb2MK0JK1PrFY/W2aWPyJJwh885t4xx2Hd/TRmM8/J/6nP7V4Hc3CGOLTp+OdcAJejx7ZfWb3bti7167NeKmbjIELLsCsX0/8pZeauNg6bQUex14zqw92lfkK4F/AzaRmq1FBJc0Im118zpykDiezciXRK66gqmfPL19j61aIRok/+yzR884j0qeP7Ww47jhiv/41xOOZx/fJJ0SvvJKq8nKqevYkOmqU/YtcU2UlsbvuIjJwIFWdOlHVowfR0aOJz5v3ZTirxxufOxfgy86lpA6fLVuITZxIZMAAqtq3p6pXL6JjxmCWLct9fqtt20Z8/nwCV14JQOCb37TjeeKJ1C8zi/nIqV2W8xSbOtXWvXs3ZvHixPyVltb7/2/eew/z+ed2aZml6kuvBG++Oe373qBBtt0rvt11ZBN2yXoQ8AR2u3Q+9jKzzepSwBTt29fgITBhggFMaM6czG1GjjSA8YYPN6GFC03Rtm0m/I9/GIJBU7R+vQk9/7wBTPCuu0zRZ5+ZovXrTfDBBw2BgAneeGPG8QVGjjThv/3NFG3dakILFhjatjXe8ccntx0/3lBWZkLz55uiL74w4U8/NcEbb7Q1L1yYdrxF27cnvR7+97+N16eP8bp3N6EXXzRFW7aY8JIlxhs+3FBcbGvIYX6r2wWnTjWBU05JfHb9ekM4bAiFTHjt2gbNR7btcp0nSkuN9x//kdNvI/T444n/1yzahz/91Hjdu5vA+PGZ233+uf1uhw3L7Xc6erQBGt2dnMZIYDeQ6QJP6/CrN7gxgjfdROCrX7WdCSecQNHu3dClCwCBr36V4E9+Ap06QZcuBL/7XQJjxtila3V3fy2B8ePxhgyB0lICp59O4NxzMW+/nbT0Mq++inf44QTOOAPatsXr3p3gT3+K95WvZF137PbbMZ9+SvCBBwicc47tfDriCEJPPgnGEL3xxpznF2xnUmBsjVvddOlC4Lzz7JrGrFlJ48p2PrJt19B5yoX57DMAvLIs7hCybRvRkSPxTjmF0K9/nbldhw529XjjxkbX10TmAlcDo4ARTTVS38MaOOGE9K+fdx6hhQtTXvcGDoRIJOPuDO/445Of9+4NgNmwIfHaiBGY118n+t3vYt5888tVwfA//2mDlIX43LkQCNgg1ZxeeTneEUdglizBrF+f8rlM8wtg/vlPzEcf2Y6Smp+pXhWu1Suc7Xxk266h85ST6qtm1nfNqd27iZx/Pt7hhxP6/e8hGKy7fSgEexu9WdiUngY+wga2SfjfvViSYbV+xw5iv/wl8T/+0f5Atm9Petvs2ZN277S3f5/dl4qK7GON7dzQL39JfOhQ4jNnEjnnHAACw4YRmDCBwIUX1l9zZSXs2AFAVffuGZuZjz5K3SebaX7Zv126cydVGXqezfLlmLfewtsf+GznI6t2jZmnXBQX28dIJHObaJTo5Zfj9exJ6LHH6g/q/s/QNu9uZrCO+nfpZM33JWsmkdGjid13H4Grr6bo/fcp2ruXon37CP7857aBMQ0fuecRuPxyQi+9RNGmTYSefdau5o0ZQ+yXv6z/823aQMeOEApRtGtX0oEfSQeBnHJK9jVFIsRmzyb817+mHVfw+98HIFZz6ZrtfGTTriHzlKZntj7VPcBm/x+GdKLf+x5UVhKaNStpV0zkiCPsmkFtFRX293DAATnX04w6AMdge4ebRH6GNRbDLF6MV15O8Hvfg65dEz+MJljVqSovx6xYYZ+EwwTOOMP+gD0Pk2X3f+DCCyEaxSxOvfNCbMoUIoccYv/aZyk+fz5e1654Q4emn964cbbdM898+R1kOx/Ztst1nry2bZOWkJGjjyb+u9/VOZ/eEUcAZFydjt1zD2b5ckLPPWf/gGShehOnWQ9UsY4A5gGZVz0SHsT2Btf9heQgP8MaDBL46lcxmzYRe/BB2zm0dy/xv/2N+LRpTTKJ6PXXY/75T6isxGzeTOwXvwBj8E49NbsS77kH7+CDiX7rW8RfftmuQm7bRvyxx4jddx/Bn/0spx30KR1LtXhHHmlXf3fsIP7iiznPRzbtcp0nb/BgzKpVmHXrMG+8gVmzBm/YsDrn0xs4EK9bt7TH+sZnzrRhfestqrp2TTmuPGUX3H7Vu5UCZ55Z57Qb4UDsLpn3sUcxHVVH22LswRHXANdjD1dsNg3edROaNq32Hbztbo8tWxJd8X//e/o2tce3fr0JTJhgvN69DeGw7b6/6ioT/PGPv/yMd+yxaccXnDTJ7lqo9Xrg3HNtDW++acd92GGGkhJD587GO/FEE/rNb0zR3r12Xp55Jm2d4b//PVHjhg0m+MMfGq9fP7t7pWtXEzjzTBNasCDr+Q1//HHS694JJ6TuvlixIuXzXvfuWc1HtvObyzx9Od733jPesGF2F07v3ib0y19m9TsJ3nyz3RW1Zk3yrpRzz037XWX8/qs/d9FFxuvZ0xTt3NnUu27KsPtM95G44XUcG8LaPGxn0kf720+o9f75dcxX7bZpZbwxVZHudSPNZccOIoMH4513Xt27ZLJg3nuPyJAhhJ54gsCll+b02f33ukl3Y6owMB64D+hE8hpoBLtqW31QczfsPXWvx56V8yrwQ+CfOc5KvfJzNVhat7IyQs8/T/z554llOB44G2bNGqJjxhD8yU9yDmodRgIrgEewPbm1MxIGjseG83+xp9g9jD0X9kzgdJohqKQpRKRFeMccQ3jxYszLL2c8wKU+8cceI/hf/0WwcafIVRsCLMKextanuswMbQdhz3stAn6E3aY9D/hLUxSSif/7WaVgeX37EnrhhQZ/PnjvvU1RRjvsPVpHA9UHSte3YzeM7Rlu0RONFVYpTFu2VPcin01iCZpLHnrSwmHVarAUpPhbb1XvhvoMexJ5zaNsqrC9vpkYbGdSi1JYpSAFzj23+iCK17CntrUHTsTuH/01dvtzU42PGGyIq0Pd4mHVarCItRt4a/9QUyfgaOw26sD9/x6IwiqSd74A/r5/qKlLmrbNSqvBIg2ztf4mTUthFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOCLjEUxNeFcukbxUfdMxV2QMa3T/vVZERCShBHs2xzif65A8pm1WEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCmt+Ow9YCUT9LkT8l/GK/OKr/sBUoC9Q7nMtkie0ZM1PdwOvAccBO32uRfKElqz56Rpgr99FSH7RkjU/KaiSQmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmHNT+cDZv/QCwjWeD7Bx7rERzrcMD/NAzy/i5D8oiWriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYROw/LHIuBokr//YiACxGq8FgWGAitarjQRqekOEieTZxriwHK/ChQRqz82jHWFNQpM8qtAEUlYgl3lrWvJ2s+36kTkSzeSeekaA173rzQRqakHmZesceB6/0oTkdr+it02Tbdk1R3PRfLIBNJ3LL3iZ1EikqojUEVqYMf6WZSIpPdH7MEQ1UGtBMp8rUhE0hpDIqgR4Dl/yxGRTEqAPSQCe5G/5YhIXWZig7oLaOtzLZKnmuteN/8BHNhM426N1u9/fBsY6WchDnrG7wJaSnOddfMscHEzjVukpoI5c6z5zme9+GIwRkO2w+TJEIn4X4crw9NPN9tPN1/p5PN8MXkyhHQHTslMYc0X4bDfFUieU1hFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxRP6EtV078Lz0Q0kJDBoEDz4IsVj94/LbqlW27qFD/a6k+XzyCVxwAVRUpL63YAEMGFD3iQmTJhXkmTONkT9h3bUL3n3X/vvCCxOnQlVUwJ/+ZF//0Y/gxz/2r8ZsPf64fXzjDVjeCu8ttXQpHH88jBgBHTokXv/4YxvgW26BTZvqHse119p2kyc3b61Sr2e5+GKDMbkN775rAMOFF6a+99pr9r2SEkNVVe7jbqkhFjP06mUYPNjWe9NN/teUbigtNQwblvvnduww9O5tuO661Pe+8Q3DT39qiETsdxAM1j2upUsNnmd4+unc63j6afv9FpD8WbLW59BD7eOePbBjh7+11GXhQrv69+ij9vnMmRCN+ltTU3rgAdi4Ee64I/W93/3Ort5me17uoEH2IgU/+lHr+o6aiTthXbH/fsLdukHXrv7WUpfp02HcOLuaOHCgXR1csMDvqpqGMfDYYzBkCPTsmfp+2wZc623UKFi3DubPb3x9rVz+h3XXLvjHP+Db37YdTb/9beK9e+5JdEKdfHLi9T/9KfF6zWC/+GJyx9WKFXDppdClS+K1xx5LbvPvf8OYMdCxo213/vl22yydbdtg7lwYO9Y+Hz/ePk6fntq2stIunQ47zM5X584wciTMmZPciZZtO4DNm+EHP4CDDoKiIvuHbfRou41ZbcoUO1+7d8OiRYn5zGZpuGyZ/eMzaFD9bbN1zDH28eWXm26ckpPGbbOmGw491PCHP+S2/XXccYYuXVJfv/BCO85TTjG8+qph927D66/bbazNm5PbXHih3V7etcvwyiuGtm0NJ5yQvo6HHjKcdlri+ebNhnDYEAoZNm1KbjthgqGszLBwoWHPHsPGjXb7FmxNubbbsMHQt6+hvNwwf75h507D++/beSwutvPQ2G3WmTPtdO+7r/622WyzVm8Dg2H4cG2z+qTpOpgiEcPq1Yb//E/bGTF6dGoHU0PDumBB5lqq28ydm/z6xRfb16tDXXM49ljDjBnJr40aZdtPmZL8er9+hpNOSh3HgAHJIcy23dixdjqzZiW3++wzQ5s29rtobFgfeMBO4+GHmy6sxtj/10MOUVjrkf+rwaEQ9OsHd94Jl18Ozz8Pv/pV04z7xBPrb3PCCcnPD9x/OeQNG5Jff+89u3/1oloX1K9eFa7enVPtnHPgtdfgW9+C119PrNKuWAGnnpp7uxdfhEDArqbXdMABcOSR8M47dtuwMfbts49Nfb2oUAj27m3acbZC+R/Wmr76Vfv4l780zfhKS+tvU1brHlFFRfYxHk9+ffp02LnTjrPmNu8FF9j3P/gA3nwz0f7hh2HGDFi9Gs44w+6vPOcceOGF5PFm066y0vaQx+O23toHlSxZYtutWlX//NaluNg+RiKNG09t0WjDOqcKjFthNfvXevbsSX49EICqqtT227c3f01gf7yzZtkOG5PmGrc33GDb1Vy6eh5cdRX8+c+2zhdftG1Hj7ZHauXSrk0b2wEWCtV97eHTTkseb6569LCPTbnrrKLC1lY9bsnIrbD+4x/2sfaqaY8esH598msbN8Knn7ZMXXPn2l7nk05K//4119jH2bMTq3sdO8KHH9p/h8Nw1lmJ3uqauzGybTd6tF1CLVqUOv3774c+fZL3ZZaUJP+BO/TQxL7hTI46yj42dnW6pur/t+pxS0b5H9Zo1O4+ufNOeOop6NULJk5MbjNihN2G/PWv7a6ejz+GH/4QundvmRoffxyuvjrz+0cdZbePd+yw29zVvv1tu61bWQmff24PODAGTj89+fPZtPvpT6F/f1vHSy/ZaW3bBo88AnfdZXfZ1Nw9c+yxsHIlrF0Lixfb1ezhw+uez0GD7He6bFn23019qncrjRjRdOOUnOTeG1xamn6XjecZ2rc3DBpk+MlPUneBGGPYvt3u4ujRw+5aOflkw1tv2R7Q6vHcfLNh8eL006g5rnRtbrvNvlf79UGDkp8PGZJa25o1qZ8rL7eH2l13neHww+0hlJ07G4YONUybZojHE5/Ptp0xhq1bDRMnGg4+2O4y6tbNMGKE3eVUu64PP7S7S0pLDQcemF0PrzGGW2+1u6LWr099b+7czLvepk1LP75LLrE9x7keQlqAvcHNpWG7bjTk/7B9uw1XumODcx2qjw2ePTv3zxZgWPN/NVjyS1mZ3UZ/7jnbU91Qq1fb7exbboHLLmu6+loxhVVyN3gwvP223TZOdz5rNh55BO691w6SFd22TBrmoINg3ryGf/7++5uslEKhJauIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxRPOdIrduHTzzTLONXgrc4sV+V9DiGnA9yqw8C1zcTOMWqam5fsMiaZVgryc0zuc6JI9pm1XEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCmt/OA1YCUb8LEf813+0zpDH6A1OBvkC5z7VIntCSNT/dDbwGHAfs9LkWyRNasuana4C9fhch+UVL1vykoEoKhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhTU/nQ+Y/UMvIFjj+QQf6xIf6XDD/DQP8PwuQvKLlqwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEToNyx+LgKNJ/v6LgQgQq/FaFBgKrGi50kSkpjtInEyeaYgDy/0qUESs/tgw1hXWKDDJrwJFJGEJdpW3riVrP9+qE5Ev3UjmpWsMeN2/0kSkph5kXrLGgev9K01Eavsrdts03ZJVdzwXySMTSN+x9IqfRYlIqo5AFamBHetnUSKS3h+xB0NUB7USKPO1IhFJawyJoEaA5/wtR0QyKQH2kAjsRf6WIyJ1mYkN6i6grc+1SJ7SvW58YJ6hM1F6EKcjHm2/9wQf/7+FcFgP3vrXFIYBMQJsBzYRZJN3adLB/VKgdNZNMzEGj9kcgeFYPI7CMAjDkQTojqGoZttIDHp+D578Lpw9MGVUcWAbho/xeBfD+xjeI8pb3nj2tdT8iP8U1iZkZtEXGEmAM4lzKlCGIU6ACFCEyfx93/Ec3DEKQsE6JxHZ/xjGEMHjHeAVDAu4gjc8D9NEsyJ5SGFtJPMEvQgxFturOxCI4uFhqDt2tURiEM7pE1+qAorw2IzhGTxmeZezuEFjkrymsDaAMXjM4iw8rgfOw66qhn0uC6qDa8+D/TVhZnqXssvnmqSJKKw5MrM4E/g5cAz2GN6GLQ+blz0ZwGMXhv8mzFTvUnb4XZQ0jsKaJTObIcR4BBiEl7chTeURxbALj0msZJp3J3G/S5KGUVjrYR6nIyHuJ8C12IPs82F1tyHiwDLiTPCuYonfxUjuFNY6mCcZhsezQFfcDWmCXcp6eNzCN5ii3mO3KKwZmKeYhOGe/U/dWOXNXhz4C1Vc6o1nu9/FSHYU1lrMMwSJ8hsME2jd308EWI3hTO9K1vldjNSvNf8Yc2ZeJcRn/AH4Wq77SR0VwbCVECd7l/Gx38VI3XRF/v2MwWMD0zEFE1SAMB5difK/5ildRibfKazVZnE3hitofdun9QkBPTC8Yh6n2O9iJDOFFTBPcgYBbsUr0O/DI4zH4bThF36XIpkV/DarmUUn4EOgC4W3VK3NEGCk9w3m+12IpCrMJUlNHrcBnVBQAQxxfm0eaQX7lFuhgg6rmUE/DD+gNRzw0DQCwIG04zq/C5FUBR1Wgnzf7xLyUBC42dxZ4L+NPFSw/yHmEcIYxqOlajq9GcCpfhchyQo2rLTnDOxFtqU2QwTD5X6XIckKN6yG4XhU+V1GXvIIcliFowAAAuZJREFUA6f7XYYkK9ywwsm1L1wmSQ4yT9DF7yIkoXDDauivvcx18iiij99FSELhhtXT9mq9DF39LkESCjes6DjYLJT6XYAkFHJYK/wuIO8ZtvldgiQUclj1Q6yPYYvfJUhCIYd1KegeMhkZInTWCen5pHDDavg/0GU50zKAx7veeVT6XYokFG5Y4S/oUMNMIhj+5HcRkqxgw+pdyT8xvA+6HGcKjxAhZvhdhiQr2LACEOA3aFW4tigef9cF1PJPYYe1kunAJhTYmkLA7X4XIakKOqzeePbhcTO6vE21CDDPu5z/87sQSVXQYQXgG8zCsBDz5Y2KC5OHwaOSgE7Iz1cFH1bPw1DEuP23Ryzc1eE4HoarvW/wb79LkfQKPqwA3qVsJM5o7EEShdg7HAd+4V3Bs34XIplpW60G8xQXYXiGwvojFgP+h8u5SneVy2+F9KOsl3c5f8BjLPYHXAirxHHgOXYxXkHNf1qypmGeZAQeL2KPcAr5XU+Tq46lxxQu5ycKqhsU1gzMDI4iyPNAP1pXYKP7h+94V/B7n2uRHGg1OAPvm7zPLo4BnrAvtIozdGLASjwGK6ju0ZI1C2YWp2F4FI9+uHibDUMEjyiGyezmV951Bb5P2VEKa5bMI4Rpz/eB2zB0wBBy4NuL7L/X7Exi3OaNZb3fBUnD5f/PLc+YGZQS5DsYJuHRGY94Ht58Obr/8SmC3KWD8lsHhbWBzDMUEeXrwPUYTsaerRLC+PadVgFFwFo8/h/wuHc5m3yqRZqBwtoEzAz6EWA0MIYAx+/fERKBZr2IeAwPgyEEbAD+B8PzfMRi786C2EdccBTWJmaeohw4Zf/tOUZgOATb6x7HI7I/XLmsNsexq7UBqncheWwGXgX+RpS/e9/k/SadCclLCmszM49TTDGHYziSOIcRoDeG3nj0AdpjaIcNb1tsKPcBlRh2EWAjhjV4bARWAR8Q4X1vLFv9myMRERERERERERFx0v8HV5cCN2SOTmMAAAAASUVORK5CYII=", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "dfg, start_activities, end_activities = pm4py.discover_dfg(log)\n", + "pm4py.view_dfg(dfg, start_activities, end_activities)\n", + "\n", + "map = pm4py.discover_heuristics_net(log)\n", + "print(map)\n", + "pm4py.view_heuristics_net(map)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/rafaelapb/.local/lib/python3.8/site-packages/pm4py/algo/discovery/dfg/adapters/pandas/df_statistics.py:82: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n", + " df_reduced = df[{case_id_glue, activity_key, target_activity_key}]\n", + "/home/rafaelapb/.local/lib/python3.8/site-packages/pm4py/algo/discovery/dfg/adapters/pandas/df_statistics.py:82: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n", + " df_reduced = df[{case_id_glue, activity_key, target_activity_key}]\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABdMAAACUCAYAAAB4DbBPAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd7wcVfnH8c9NAklIQgKp0g0loRNBpEsXpCMdAVGkiXREQAEpSlEEEQFRpIN0QVDpTYp0KRJ67yRAgJB6f398Z367d+7u3bn3zu6Znf2+X699QWZ3Z5/dO3t25jnnPAfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwmkLHYCZmZmZmZmZmZnVtCqwYOggcu4N4IHQQZiZmZmZmZmZmZlZOFcB7b51ebuqx5+uWQp9QgdgZmZmZmZmZmZmZpZ3TqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ1OppuZmZmZmZmZmZmZ1eBkupmZmZmZmZmZmZlZDU6mm5mZmZmZmZmZmZnV4GS6mZmZmZmZmZmZmVkNTqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ1OppuZmZmZmZmZmZmZ1eBkupmZmZmZmZmZmZlZDU6mm5mZmZmZmZmZmZnV4GS6mZmZmZmZmZmZmVkNTqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ1OppuZmZmZmZmZmZmZ1eBkupmZmZmZmZmZmZlZDU6mm5mZmZmZmZmZmZnV4GS6mZmZmZmZmZmZmVkNTqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ39QgdQZk5gMWAcMBYYCQwGBkW3ycDn0e1t4Pno9kaIYM2sqbm9MbM0hgFLAOOBhVH7MA9qLwA+o9RevApMRG3Fx40O1MxyZUF0jrEE8BVK5xfzUDq/+Az4AHgZeA54CZgeIlgzMzMzSy9kMn0osBawTnRbJoqnHXgLeI+OJ5tjKSW7FkAnowBTgAeAO6PbI8CsRr0JM2sKbm/MLI2vUmon1kbff4BpKFlenjwHGEUpub4I0D/a/iZwF6W24pU6x21m4fQDVqTUdqxGqcNtEjrPiM8vJgOjKSXXRwPzA23ATOBp1GbcAdwDfNqoN2FmZmZm+TQnsBVwPbownQU8AfwW2BZYHhiYcl8jgTWAvYBLgXdQYuzdaH8TsgzczJqO2xszS2M0cCDwOPpefw7cAhwJbIQ61/qm2E/f6LEbRc+9Ffgi2uejwAEo+W5mxfA14HTUId+OZrJdAuyJzhlGpNzPQHROsl20vyeB2ejc5TpgS3ROY2ZmBnAV+t3xrfrtqh5/umY5MhI4EfgIJbRuAXYh/UlmWksBR6Mp1u0ocbYz+SpnY2b15fbGzNJYCbgGmIHKspyHRpVmmbTqD6wL/Bn4JHqtq1ESzsyaTz/guyjh3Y5KO/0MlYLK0khgV+A2dC7zIXAC2Z/LmJlZ83Ey3cl0K7gxaITF58D76GRz/ga99qrAxejC9UVgD5zkMisytzdmlsZqwD/RifbDwI6kn6XSGwOj13o4eu1/oLbDzPKvHxpx/hL6rb+Ixn1/F0DnNO+jUjGnoRk1ZmZWbPHaPasCmwG7A4cBtxM+WZ33m5Pp1pT6AvujkV5voqnNcwWKZSzwRzRV8nF84WpWNG5vzCyN0cCFqHzC3cC3AsayEXBvFMtfcPkXszxbHY1Enwacg37rQ5gLlaR6E9Ve3490JajMzCy8AahzdAVgQ2AndA37C+AslPy9E3gKlRSdQecE8WdoDZ+HKtznm5Pp1uQmAI+hE84TCZfUShqH6pfORlO5h4QNx8wy4PbGzNLYEyWfXge2DhxLue8Ab6BFCvcIHIuZdTQ3KtE0G/gXsHjYcP7fIOBX6NznUZSYMTOzxhoIzIcWoN4MleY6ADgWOBe4EbgPeAatqTGbzgnfSdH990WPvwg4Azg82t9maA2OpdEo9ZjLvDiZbgXzI+BL1KM2LnAs1WyPFg18Hi8aaNbM3N6YWS1D0cn0TOAUlITKm8HAr1Fd5CtQAs/Mwvoa8AIaHbht4FiqGY9m2UwF9gkci5lZM4sT40uj5PW2lBLjZ6Ak962UEuOVRo1Pje57JnpsnBg/NtrXtpQS4/PRu5lFTqY7mW4FMRgtqDUTOAboEzacmr4C3IEavL0Cx2Jm3eP2xszSmIDWMHgHLQKad+ujzrcXgOUDx2LWyvZFnfW3ofVY8qwvKhEwC/gr+ewwNDNrtHkoJcbLR42fhJLc5aPGP6ZzIvZLSonx8lHjJ0X7KR81PpZsF69Pw8l0J9OtAEaixbTeA9YJHEt39AWOQ9Ntfgm0hQ3HzFJwe2NmaawLfIo6spppob6vAHcBn9BcbZxZEbQBJ6Pf6mNornrk66EFSh8CRgSOxcwsS+WjxtenYzmVM4Ar6VhOZRadE6vxqPFH6FhO5VhUCrC8nMp85P9azcl0J9MtsH69fP7CqIZgf2BNVMqgWcwCjkYjwP4MzI/qlc4IGZSZVeX2xszS2BK4HLgZ2BmNLmoW76BFqS4E/gnsgi4Szay++gJnA7uj3+fzw4bTbbcDq6DzpAfRAssvBY3IzKyzAcC8aOR4fPsKSmDPU2H7AnQe9f0lWgcnvr2N1o+YXGH7O6ijcWYd35OZtaDeJNPnR3X6PgbWRlOTm9HFaOGHK9GJ9C6oJ8vM8sPtjZmlsQ2qO34WcBAaYdpspqNOgN8Bl6HOuGuCRmRWbH1QB9aWwObAP8KG02MvA2uhjrjbgdWBt4JGZGZFN5DqCfFK28bQedR3XFLlHUqJ8JcrbJuM2rSP6/mGzMzS6GkyfShwE/AZmko9KbOIwrgJTe25GU2t/lHYcOpqVeDg0EFY5vK6OFYW3N40L7c3+fIAcFroIOpoHdRhdS6a/tvMZgP7odkrlwGbosWsiupg1F5YPp2G2o+iOhWdR22ORnY3s3iNiHvQe1mL5j9vMrPGiBPjXSXDy7eNpHM+qXzUeJwMf7nCtvjf76FBA2ZmTaUnyfQBKAk0DxrxUJQTtDuA7wGXAq+iE+siWhCN3Ls6dCCWiQXQtN6icnvT3Nze5EeR2wmAFYDrgeuAHweOJUuHoAvXq1FS7Mmw4dTNqugYfTB0INbJNqjuaFGT6YcDBwI70PyJ9NhHwEbAv4EbUD31aUEjMrMQ5qF6+ZTk9vnRAKZy09C1V/nI8HdQSZXkiPG3gTfR7Dozs8LrSTL9NLQwwyqowSySK9APyylocYo7w4ZTV0UeydxKtgP+GjqIOnJ7Uwxub8Ir8iI8Q1Gy+RHUSdWMpV2qmY0W2roF/Q1XQgurFtGDuK3IoyKXIlsPLQp+EMVrI99ACfUHgN+gmS5m1rzKR42nKakyis6LKMejxstHh79cYVt54rzIvwFmZj3W3WT6tsA+wE7Ac9mHkwunAauhxcsmoB8RM2s8tzdmlsYfgMHAdynmiKjpwPbA48B50f+bWe+MQmWhrkHrExTRs2gx1SvRKPXLw4ZjZpEQi3B+gErHmZlZBrqTTF8Y+BPwe4p/MrYH+jE6H9g4cCxmrcjtjZmlsSdKLm9IsTuj3kMj1P8F/AD4c9hwzJpaG3AJ8Dn6DS6yq4BzgLNRQv31sOGYFZIX4TQzazHdSaafgRrzQ+sUS558DOwC3ItqKF4RNhyzluP2xsxqGQ2chEoY3BE4lka4DTgdlYa6AY0yM7Pu2wmVeFmN4pZNKncQWpT0t8B3AsdilndehNPMzGpKm0zfCNgCWJ/WWcDmfuAv6MTzH8AnYcMxaxlub9zemKVxCvAZcHzoQBroWDQS/yQ0Qt3Mumdu1Hb8EXgocCyN8iWqmX4LsAlwU9hwzBrKi3CamVnm0iTT50T1SC8Hbq9vOLnzU2BL4CjgJ4FjMWsFbm/c3pilsRqa0bENSqi3iinAwWgGSyslA82yciwwB/qtbSW3opIvp6OkumsnWzPyIpxmZpYLaZLpu6Be2sPrHAvAEDQNcUVgGWA4GkHyBfoxewH1At+Fen3r7UPghOh2Kp5SbVZvjWxv8sbtjVl6R6PSSNeGDiSAK4ED0GewSeBYzJrJaGBvdI4xKXAsIfwEeB7YGbggbChmXoTTrJvGAEsC44AVAsdi1vJqJdP7ohPOC4E36hjHWsD+6KJwQIrHt6NFdM4DLqW+Ncb+CBwBHEjrjWIxa6RGtTd55vbGrLYJaMHRjUIHEtCJqFTDiihxYGa1HYRqpP8pdCCBvIoWXj0KuBjXaLZseRFOs97rB4xFSfPxlBLniwODyx7n2RJmgdVKpm+LvszfrtPrL4+mG67dzee1AWtEt5+jBFy9Rqd9geoY/xTVWHQtY7P6qHd70wzc3pjVdhTwCCpV0Kr+ATyGzn+2CxyLWTMYBuyDOqKmBo4lpJOAXdFCpFcGjsXyy4twmtVff3QONx4lz5cFFqH0XZqGBpslv1vtwOPA1xoSpZlVVCuZ/kPgb8CLGb9uH3Qx/HNUt7A3FgOuQSeEe6Mf46ydjaZTb4dGw5tZ9urV3jQbtzdm1Y1GCxTvEjqQwNqB36BSDSNxWSizWrZH1z3nhA4ksOeBG9E5l5PprWMg6UeMz4c6n5Li+uFehNMsG9OAvdA6QO0oR1auf4XntKPrxOVxMt0sqK6S6QugEeNbZfyaA4HL0EJ7WdoONSobA69kvO9PUJJvF5zcMquHerU3zcjtjVl1O6MZHH8LHUgOXIcWbN4BODNwLGZ5txuaxfpp6EBy4GK0GOkCNGYNKsuWF+E0K45DgAfonEivZDZwLlpf66p6BmVmtXWVTN8N/Xj+M8PX64+mJn8zw32WGwfcj3r3sk6oXwz8HZWheDnjfZu1unq0N83M7Y1ZZbsAf6W1yzTEpqKE+i44mW7WlcWAVYBjA8eRF39H51w7oZJyFk5/YDiVF9yslCRPswjnZOAZKo8Y9yKcZvnyEFoD51t0XbFhFnA1sF8jgjKz2rpKpm+Fpv9lOUXrL9QvkR4bA9yMEupZlny5BfgIjag/LcP9mll92ptm5vbGrLOxaBGmg0MHkiOXofZiIeD1wLGY5dXWKIF4e+hAcmI6GqW/NU6mZ82LcJpZdx1K12uGzQDuQ4PPZjckIjOrqVoyfRi6YD0xw9faC9gxw/11ZTxwFhpxkZWZwF3AOji5ZZalerQ3zc7tjVln66ASL/eHDiRH7kWJl3WACwPHYpZX66JEuhc3LLkN2B2Ym+6XvlmKUlK3yNIswlm+vSeLcCbLqngRTrPWMg9qiz8HBtB5dPoM4Glgc1RjPbZtQ6Izs6qqJdPXRr3k92T0OgsCp2a0r7R2RFPBs6yregdwMmrkPD3OLBtrk217UxRub8w6Wgf4Nx0vJlrdl6jWppPp3bc6cAOwJvBs4FisfuZAf2vPaOnodlSjdy1U9qWWNmBD4DDUObEqKk/QTOqxCGdXJVXewr9XZlbZQGB/4HA0iOrXwJGJx8wAXgU2AD5rZHBm1nOnAY9luL/z0KIljb79j3SLOaQ1LtrvNzLcZ6NtR/MvILM+eg/L9HI/86PRH2f3OqLe6c37KcLfM+v2pihasb05iVL7vVEd4unp/ovQVlxF8y9W9AZwROggcuhnwGuhg+il7h6fK9HxfO+gLh7bB50Pxo/9fbR9TWASsHR3gyXdd7EI7QbRc7fLLpyGWxW9h8VDB5JDT6AETlcGAj8EJqLPcXr0303qG1pNA1HCe2l0jO8KHIDq4p+BSgfehxLdb6NkVfI6cWp03yPAjcBF0XOPBfYENgPWiF5jPjqXYzEz664+aFT5KyhBfhIwNLrvFJRAb4/++y6wcIAYzSyFaiPTlwUez+g1FkT1nUIYjy4Arshof8+jRm9pmm80hnW2K/pB2wFdiH8ZNpyWlWV7UySt2N78FLgAJb7ytH+3FeENQwuvua3o7HFUM70n5Rqa1SMosXUBOsc8FPgDlUeBboPOB0GjlGdG/38vMG8dY3S7kQ/LAFOAF0MHkkNPUL2TZTSwD0pQz00pkTwH6iQamWEcXoTTzFrB+sBvgCXRWoLHovYo9itgb2AwKvuyNs0/WMKssKol08cBt2b0GrvR9crE9bYH2SXT29HJ+LiM9tcbQ1FHwTVoZJV13/fQSLht0QKYlweNprn1Q+siXAW8383nZtneFEme2htQYug/wHOhAwnge7ityMoE1Mn+T7q34HD8PZiYeUTNL/5MlkBJ5pDmBransecmd6PF7b9P5VHgR5Q9ppG+h9uNLG2BRul1t3N5HOqcbvZZfPUwkc7fi+WBH6HrtzYqX8PNAkZ0sd9GL8L5NsWv325mzWtVNAJ9TeBq1Mn/QoXHTUZriB2Nymq14jWXWVObC50kbZHR/p4kTImX+DYTja7IyhXA9Rnur6e+QmkK0E2oRvxcKZ7X07Ig3wIeRFMi30A/BHH5if0ofd77oYvZSdG/yzsyNkUX+l+iBXbOQRfesRGotv6L0WOeoPNxWF6mIb692o3XiK2Ojs2x0T5uqfK+F0V19z9EI5uuB1bpxv21Yqr1fmrJS5mX/pS+b7ehi7BKn3tS1u1N0eSlvQEdw+3AU2gU6IIpntOT43M8lcuwlLdBHwEXo3Ywqau2qtL+96bj92+HxP6K0lbkpczLzij2T4E/oVrfacqx7Yo+l771C61p9UWfzc6hA0FJseS5yaAUz+vp8XkBet9voe9DcpDIZui7dnoUV3x/+XnLHhW27Q38Dvgk2vfRZftM810sSrsB+Snzcj6K5XXgeLQIZho3ApfWK6gmtzU6BxuERkz+A5hNqZRLtds0tBD0ucC1aM2bZygtnpl8/Cfo3P4BVJ/9AlRe5nDUCbY5+s6Mo76zRczMGmkpVHKqHQ0cWzHFcwaitSzMiqINzaDdAHXW/xydn56Lzs8ujf7/pOi+H6FzkoVowvJqcaJhuQz2NZywifT4luVFwC9Rkje0OJkeJzBnowupy9GFVbXZAD1Jbm2KTo6PR3/T+dBBX74QxuBov6+gUViD0IVpnEzfIorxODQKZXlUauF2Sl+S06Pb8Gh/O0fvKVnPtFr9zzSvETsPLaIEuiCYReXk4BPRexiFygycnnjfte5PE1MRaqbHyfR29FnOQhdj16KLtQFVnpdle1NEeWlvQHXt29HxPCP67/0o6TS8ynOySqbHbdCJqNNtPBol/wIwpMLjumqrkvvvjxYh3LdKPEVpK/KUTJ+N3kecsPkArZ3w9S6e93M8QqcrzwNHhQ6CUjK92rlJsjRDrDfJ9G1QKYp2NBq83APo4jWZTIfSecseFbY9iRJ8Q9ACYe10HMFb67tYlHYD8pVMjxO1cdvxLPATdMFVzX+BE+oeXXNaDX2Ob9Lxc611m4E6tW9H3+0zgWPQef8OqJN0OfQbXO07b2ZWVAui5OBMNAhp07DhmDXU3OiY/w3wMCpZFJ8/fIjOUx9BHUzXR7dbo23PofOL+PGfo2v+X6O1Wsqv+3NpZRT4whnsa0PCJ9LbUS9HVg5H0wxDK0+ml9/iE+EpaOTmZnQcydeT5NZz6GKk3GB0oJf/ux1dQFYyEf2YlNs0es66Xbz2DWiUVblqF4ZpX2MuNI1q/ujf+0aPSSYiBtD5IrIfGnmT5v60MRUtmZ684JqNGsL4eCzv6MmyvSmivLQ3UEqml99moxPFWcAdaPRw+Y9cVsn05+j8PVohetzhicfVaqvK9z8QjcTbg8qK1FbkKZleaeRi/Nv1FvrNHp943qnoZMoqewQ4OXQQdEymJ/++s+l4blKe2O5tMn0gKv0wkdJMhw3QKFjofjL9z2Xb+qLfsJ+Vbevqu1ikdoMKMYRyPpUXkYwXa3sSdaokZ6O+Sqljw0qGABfSsfOr0udb7XZD40M2M8u1edE57FT027Mn6WZfmjW74WhE+X2U8j//Reff30ed912Vh0sagWasfR8tDP4UpQF996I1XYLPZKv05Y4TIVMy2P9iGewjC1nGMYV894jEicrB6OLnBnSBeQZakb67FkDTLu9JbP+MyqNRk4mseB9LAHcltsd1L9fr4vUnRc+tpTuv8R2UGHwr+vdf0Rfze4nnfol6036FRtsPpGPZoFr39+Z9F0U/NDpuLjRa6QY0CvVcdDzGU9GzaG+KKO/tTRtKNPVBUxL/ghLXN6HvRLV1ObojboPuTmx/ApUKWT/xuLRt1aAozk9QuZFK3FY0TvzbNR9wMBq18DxanGks+h64nagu723FHKi9KD83eZuen5skTUWjVpaglPg9Co3Y7onyBPUsNJJmVMrnut1orPh3Zlk0CuptNCNhT3SO4bajsinAIdH/74w6ff5GaeZD3AFWTaUya2ZmrWguNLjnJeAH6Nx1HPBHum5HzZpZG/BtVIngbTSo52VgJ3SuuhxwIBoMcT86l07rQ+Df0XMPQOd4Y9D5yqtokNXbaI2mjQlUDqZSoiO+GPuswn3dNU8G+8hClnFMQYt/XpnhPnuiWtmMcvHUypGoFMP+lBaHXAIlKmqJe5DSLiQ2tYt97BfdkuLpuUuhqbiroYvW+EuRpsxF2tcA2B2NjIt9hBbD2wwtDHJv2X3fQqPRTgcuQfXAj6N0sdrV/d2JqbdCH49pet3j9mYo+hvsSem4WhgvpFvJFDS1P/TfF6qXconFM2D6oFlJG6O6qqAp33fTsxPKrtqgj8ru725bdSYaybgNqqleaVG7orUV4wl/LKWpfxcn1hdDCdGj0Wf/FjoOP6ryvFb2KerQCv337e65yT7o3ORz4DXSn5tUcja6mD0SHStT6flshuQ58AzSjy4rWrsBcBBqK0OqVSM97twFzXpbGbXz/VBSoz+l3ySTuJPhc+AylPjph0purYd+y1dBbfKXdPx+j2xcmGZmudQPjZw9Bl3f/h6V6Pw0ZFBmddYHnRMeiRLmdwI/REn1LHLI1byPrnOuRDnrrdGs+JvQNf2JUQwN68Cq97STNBdVjZBmYU6rLO5B6s00ingfp6CLneRtF3SifhuqMbY2pVFsF5KupynNa4CStmtTWsgqvm0W3f+9xH4no5E786N6qQPQyNdFU9yfNiYzq66rNmh42f3dbatOQDWRnwQuovPvhNsKs+byBRqZvCyq43x8gBjcblizm4lG9p+AOuiGoU6d36EZG3HptrwMmDKz7PVFv2crot+eTdAMqQ2AVVECrdU71DZDCy//HpWUWwz4KU6kW7FthdaruQyVV52AOt8vIl0ifS5gSWAlNLt8y+i2frRtPJqJWcsUlCdcL4rheTQT9Bm0nlAw66ETpSxq0PyE8PXS24F/ZfBeYvuiMhWhVauZXn6bFv33fUpTqXtaMz1Zk3M+NEolHq1aqfZouf+hmspJTwLbo1FD7cChifsvp/PI9HWpXP+z1muAeo4vqfCYQejvOiX6f9BUkuT7Hhu99vYp7k8bU7X3k0bea6ZXqmv6MaUyL3Et1+A1r3IqL+0NVK6ZXn6La6dPp1TmZSeyq5n+dOJx1Wqm12qrkvtfCo1g/X3ieUVrK/JeM738FtdPLy/zcg5a7M4quxP4Q+ggqF4zvda5SW9rpscGoyTzbYnHdbdmevJc5kU6thHVvotFazcg/zXT41v5Gh7lZV4+QrMzrbMR6LNbpxvPGY6+c2cRaFq1mWWqH5oVfhQqmfA0Om9Ok2P5CLW356PfzUUpvtXQDLPZaIRsK7xns0XR9f1sNPsyTRnmYSix/VvgFlSeZTa125XZ0WNvAU5Dg9+GpXi9ccCl0fNvBL6a4jmZy3JBwB8QPpHejnpOshLXwwqtkQuQboouTo5HJ9ELoynL55Y9plYy/dvoIuen6OR9BPpyPINGWvVHF9ZPouTWADS99GM6J9OXjF5rm2g/76CerFqv0YYuiJesEuOR0X53i/4dJwUOQhdkw1AtqKnogrbW/Wned1fvJ428J9O9AGnv5KW9gbALkMZt0ImoDRqHyhy8QKnufvnjumqrKu3/wOi9bBD9u4htRd6T6V6AtHceIdvF1nsq1AKk5Yajc5JyWSfTK30Xv07x2g3IfzLdC5D23FfRZ9ed48HMmt9c6HzsRvS73A68iZLDJwDfRSPQx6LSq3En8DyU1ihaDw36OQO4FY1KbUcl285GSeciWRp9Pu3o/X4tbDhmDdEHnb9ORQM81qrx+IWixz9CKUfwGPBnlNfYEs0gHYvakzmj2zzRtuXQ6PfDo+c8Hu1jJlpH6AhUyaIra6Pz4C/Q+XFDFwGOEw3LZbCvVQifSG9Hf9Cs/JJ0NbzrrTyZPhNdpH6JRnJvSseEZbmeJl83QsmrL1Gy4zeULtR2oPNnXqn3aEPUe/0l8C7qOVqg7P6vo+nLU4DXUQLsqrJ9jil77Fko0f5J9P+1XiN5gb9CIraTEvf/M9q+CeoV+zB6rXvRKC9S3p/mfXf1fmrJYzJ9FqURyteielbVSj5l2d4UUV7aGygl0+OVtGejxUT2pno99e4en8nvYfkIz/I2aFJ0X6UF0Lpqqw5N7P/30ePLt71LMduKPCXT41EJcQL9A5QA/HoXz/s5MLHu0TWvF9CostDKf2srnZvMWeV53T0+F6Dj97BaOzk48bh2lCjYL7HtLjqfy1xS4XVeLNt3+XfxGorZbkC+kulxR1zcdjyLZsF2VR/+SfQ3t87iGV5pRpiZWfObAPwFlSKZjhYd3ots2oA50UyzY4D/orYlPjdp5hnIC6GcxEw0qCP5G2xWVGPQTM8v0aCEavnFvugc+g50nvYBmi27Fdl894ejfNLZ6Hx4VhTX9nQcNFxuDpSQ/xKdR4/KII5UBqIAt8xoX/GIkZC3b2XwXmJXANdluL+eipPpM9CUix1JVxs+L8lXy0Ze/p5xMn0matx2o+OI4WqybG+KKC/tDaiHuR31Sh9K7V5hyM/xaflKprejC7k/ofICaUYM7IJOiKqdNLWyvqh0yk6hA6GUTC8/NxnU5TMkL8endZanZHo7GmxxPLUXJI3dgDoYrLPvoHOwvKxxZWb1sTqlEg1PoIW/613zfAU0UOJDNFDuVDoOjMu74agjfCoazLEtLm1lrWNdNJPxBarPwpgTVSJ5AeWArkElWaol3bMwJyodc230ms+jRYCrDdZZCc3yfxuNWG+I19BIjyzcQthE+qdke5L4OFDctpwAACAASURBVPmYSj0UrZrb3d4eJ7eKJS9/z37Aj+hZr1+W7U3R5KW9AZVwSZbeqCUvx6flJ1k5AZ1oVTvpqSYuCRWk/l3OLYY+mzyUapibnp2b5OX4tM7ykkzfAvhGD553KuoMts6OAF4OHYSZ1c1YtDhmO3AfsHGAGAajhbTfRmUXjibfHXiD0IjWj1EJ2sPp/jmrWTPbHQ2K+SvVB0duhs4fpgHnoWuRRlsMDcyahhLmm1R53FB0jTEd5TPq7hZUoyYLoeumV1oIqqfaUM/q9zPcZ6M5uVUsRfh7ZtneFInbG8tSsycrh6JjaaNaD2xBm6DPJs1soLxq9uOzyPKSTO+pPdDAGo8o7OwCtHD3zqgGcjN+RqFnP/uW71ur6o/K432BagevFzYcQAn0w9C1zfNkWzkgC3OghavfQTGeRMd1oMxawQFoBku1wXwLA9ej9vUy0s1Ur7eF0Gz+djRivVLpvzbgWPTejs3qhftV2f402Q2DvwL4FfWfSlTN7zLc1zjUu/p0hvs0a3VZtjdF4vbGrOQTtDjW1yjVmzaZgEpffBo6ELMceholRBZDU5GtZAI6z/gLSiR9AjyKFvmKb68Hiy6909G6AWaxVdHi8q1oEZR/WRY4BeVhpoUMKPIlmil0KUrU/RMtSL4XKqUSShtaoPuXKAl3AeqIeD9gTGYhnAocjMpA/b7C/VuhknsfoMFN/2pcaF16HdVsPwetC/QUaleuKHtMO0qiT0blp+aijpURtkA19EZktL/DCdMbfXNG8cf2RRer9awDVG8eKVosRfh7Zt3eFIXbG8tSEUb+XoxmslhHd6CLv2ZWhOOzqNpp7pHp/dBv6Z6hA8mZ4ejca1P0GS2Npj+fgcpBTEN/+8nRv09C07rrWfN4TjQLqTua/fi0+mjV88+t0Xf2UcKUXeiOrQgf6/qoDNgs4EpUFsesFR2NapDvWOG+/ujcoB24CK15l1dpYv0ueq8/q1cQQ6MX2Dqj/Q1A0wgbmUj/ku7X963lauDGjPfZaK16clFURfh7Zt3eFIXbG8tSEZKV3wc+RydKJgPQiK7dQgfSS0U4PouqCMnKfwCXhw4iZ7ZDNVGrlYcaBKyBpnxfhEpFzELHw9vo/ORYlGDPajDEqsC76EI3bcmZIhyflr1WPP+MBy/mPdlVbhHgIZRUX6OBr7sScBv6vG5Fi6Wataq9UPmTH1a4bx7Uof4JGv3dLOLOugfR4IGkvdD3f796BfAwcHaG+1sVJcwalUzPeth+P7Qa9UEZ77fRWvHkosiK8vfMur1pdm5vLGtFSFYugo6ndQPHkScbos8kDzULe6MIx2dRFSFZeRjwHtA3dCA5ch7dL40yN50T7PF1V3mCfX2UjO+uH6OE/ewotuVSPKcIx6dlr5XOP/ui8gYzaM51lgYC16H67pvV+bUWBs5F7cyDuMyo2ZYoR3tUhfvmR6XyXiP7QcqNsBQqAfMUei9Jx6D3vmk9XvwIlMzJcvXifWhMIv0Ksl9EZ1N0ctfs039a6eSiFRTl71mP9qaZub2xrBUlWfkoSgKZXIBGdTW7ohyfRVSEZOWi6Dc1bwvehTInOuc6LIN9fQUlwI5FyfT30DEzEyXbL0LJ9zXQTJquXIISgu3Rf2ehta+6Kv1ShOPTstcq5599Ud7jC1Q2s1n1Red2M6jP6NcRqFTVl8D/gG1pzgWXzbK0GBpxfk6F+xYGXkXJ9AUaGFPWFgSeRe9l4Qr3/wmNYP9qT3ZebQFS0MnP8cDGwN96svMKzgZGo16AerkVTXfO+gd0F+Be4OWM92tm9WlvmpnbG7PKLgZ+gZIzXwSOJbS5UHmsI0MHYpZzL6GRzruQnwWzQtoMTd3OovTNOyiJXl6Wbj5gxbLb0cC8KFH2AuoUfRRNHX8CJc0BVqN0bRr/dx9gJ7Qo2sW0RoLULK2zgM2BbwN3hQ2lV2ahdS2mABei5FYWbfVg4EfoPGkKWljxfNTZF9ICqL2z/LsfeDN0EHXQH3XEvUrnmfAj0ffvYzQbeFJDI8vWG8CaaH2pf6GO/Q/L7t8P+Brw1+i+6Vm++G3AtVnuMLIP9Sn5ciH1WaxvGLpo36MO+260VumpbxVF+nvWq71pNm5vrB6KMvJ3FErI7BQ6kBz4LjrpGxk6kAwU5fgsoqKM/N0LrbnQ3QUui+h6GruYcx9gSdSZ8TuUnJiKjq0pwN3R9tlUvr6bTfXSL0U5Pi1brXD+eRzFW3OqDSW7P6d3yeY5UHL+XZQIPJx81ZGPj0/f8n8r6u/LmWhUenLx37nQb/RLaOZZUYwCngf+gzrZyi2BFqr/bdYvuj1qpBfPeseogZxINgf5x9S3RtiR0WsU4QS8FU4uWkmR/p71bG+aidsbq4ciJSuvBh4JHURgbcBjwJWhA8lIkY7PoinKxeQwdOF4eOhAAhuHzrW2DRzHHMAEtODZH9GI9VrXe5VKvxTl+LRsFf38c3vUwdSMNdJrmQO4Gc16Gd3N57ahtu1FYBqqj57HAQdFPz6Loqi/L2ui9mPHCvddhTqhFm1oRI2xOPA+GoWetAs6v1g1yxfsixLef8pyp2UGoJPaD+hZEn0aKh0zX53iAy2g8z5wQh1fo5HceBdLkf6e9W5vmoHbG6uXIiUrJ+D6x5ui79aKoQPJSJGOz6Ip0sXkSaim91yhAwnoAuA5NFo8T36CZtqkuf6bgaZp70mxjk/LTpHPPxdDg25+FzqQOhqCrgnvIP3C0eujQQaz0ECDReoSWTaKfHwWSRF/X/qh8mqVyijth74/6zc0osZaBw0o2LvCfTcD/6XrUujd9n2UtF4oy50mDAJ+gKYcxgvPdHV7Ao3ebEQx/IOBz9DCFUXgxrtYivb3bER7k2dub6xeipas/AdaV6BV3Q/8PXQQGSra8VkkRbqYHIXKB+wfOpBAvooS1ruFDqSCq+l5CdBDA8Rr+VbU88/+KGH8SPT/RbYSWjD0ZzUe93XgdvT3vpXOpaDyqKjHZ9EU6fwndgj6Xi2R2D4h2n50wyNqvONQqbnlE9sXj7Zneo44J6qZc0WWO+3CQGAVVC/4cDRC8yhgX2ADtIBNo4wEPgJObuBr1psb72Ip2t+z0e1Nnri9sXoqWrJyVTQ6/TuhAwlgezRyZOXQgWSoaMdnkRTtYvI3aEbs8NCBBHA1qhlaj/WleutNqifLZ6FOgFll26ah88V2tPhpd8tBWLEV9fzz52idgSKWYKjkQPTdX6rCfePQCPR4PYW1GhhXbxX1+Cyaop3/DEe1wY9NbO+LOunuJH+z1uqhL3AP6pRMznw5Ac38mSfLF/wWOpg2znKnTeB84G2KUbs45sa7WIr493R7UxxFPD6bVRGTlRegVdqTC8kU2RCUdDovdCAZK+LxWRRFu5gcAryFaum2kg3R3/LboQOpYASKLTky/UO0WNhF6OJ/V2ANOi6KVrTj07JRxPPPhdHMmsNCB9JAfYCHUOKrLdo2EjgDVTN4lvDrP/REEY/PIira78vx6Hc1ed20P+qgHt/wiMJZCnXU7ZvYPggNuDgm6xe8FtXYG5D1jnNqddTT2YwNdFfceBdLUf+ebm+KoajHZzMqYrJyFDAJODV0IA10GjoRLkopqFgRj8+iKNrFJGjRrVloJmwrGIhGpOf1O7YUqv98ILA5sAzp69oX8fi03ivi+effgWfI58ySeloZtdffR1ULPkUDKfYkfT31vCni8VlERfp9mRtdMx2V2D4GjcQ+seERhXcyMBldT5Y7FlULGFJrB90prn4gKsh+Gp0z+EUzDLgY1WTN64mnWZG5vTGzWt5HI7T+iBbSuS1sOHW3IXAAWmPmw8CxmDWzy1Hd8EvQIr6fhA2n7k5HozkPCh1IFc/SunXszdJYHdgELQw4I3AsjfYfNBPxTFTP+BfAWai+s5mlsy/qfDorsf2naL22niTTh6JZIiE9hcr39cRxwC5oAfTytVd+h9ax25uMB2xtg3podspypznTBlwDvIt6aorGPaHFUuS/p9ub5lfk47PZFHnk7yXAe8B8oQOpo9HAO8BfQwdSJ0U+PptdkUZmlRuFyr0U/bjbDs182zp0IHVS1OPTeqdo5583o4XHW9VYVAZqz9CBZKRox2dRFeX3pQ/wGnBKYvtwtAZDTzuzx9CzRcOzvP2zh7HHDkGdCSMT238NvEodasifiUZwVFoIoggOQ431N0MHUiduvIul6H9PtzfNrejHZzMpcrJyblTC4C60iHHR9Ef1QieSYsphkyry8dnsinIxWcna6Dc4ryO2e2sZVBIh9Mixeiry8Wk9V6Tzz+VRh9hGoQMJ7CI0i6UICyQW6fgssqL8vqyH3kuyJvqJqD74oB7utwjJ9EFopvNxie1LRfvvMkfTnTIvsUOBFVDgq6OaVUWxE3ASSnDdHTiWevNFazEsEDqAOnN7Uwxub8JbBXgwdBB18imayXIPutjaCV14FkEfVAZqObTw3pSw4dTVKritsMa6C01x/jWa+XFF0GiytRA6d3qc1lqwsCvPAeNSPO5E4Gd1jqWnVkRT0FdAdeXfIvtrgfmB11EJtX0y3nd3rA/cCiwLPB0wjtAOAJ5E5exa2a9Qzfj1gVsCx2LWTHZB5ZKeK9s2J7AX8Fu0sHGr+hwN3twfOAEtSgrquHsMfXZV8zQ96dmbBmyKirLfTueC7c1qXeB8VHPntMCx1NMbwNWhg7DMvEmx/55ub5qb25v8eBB4IHQQdfRfYIvolqwH2MxOQ+9pG4qdTHiA4nb2NLurKVZHdtKv0cXkRRRn5OdwlEifDGxJ6eLQ4KuoxF4bpU6G8m15n6VwKUqgj0Yj576ow2vsinIEOwAD6rB/S28gKtF0Ph7J/D90nrBL6EDMmsgg4DtoYE65TYF5gAsbHlH+nI8+i+Q54EXAtqgdztz8qI7Mk8BX6vECDbQp6pW4CJ1ImVm+uL0xszS+g8o2nElzTwXuA/wevZetAsdiVnRtaO2Fz9Eif81sPnSu9ArFXkci1p1p+M8Bi5T9+9Do+eXbDkSj0/JoAIq33nWjJwJXRq+1Y51fqyvrRzEs04PnFqWMxs5owdHRoQPJiX1QfeNmL3lXlOOz6IpQ5mVjNFs3uTbb9fR+hkcRyrzE7qDz7Nj5otf4Vkav0cnCqJfwFWCJer1Ine2KRmxcQM/K3phZY7i9MbM0tgSmAtfSnKPq5kTlJr6k+U/izZpFX1TWYibwg8Cx9NSiwAtoevJCgWNplN4kOyol02P7UbpY3w84G5gU/TsuBzQCOBV4EbXXT6CZRNX2szcq0fIJGl1+dOKxiwJ/Az5EJb2uR+WvkvuplETYFHgkiuM94By0nkja9xJbHXXGjI3ur5Zs6SrWNPfXivmkCu/31SqxVFKUZOXfgRtCB5Ej86JZyzuFDqSXinJ8Fl0RkumnAk8ltg1F36PezvIoUjJ9d/RblOyo+x8qMVU3I4CHUOH29er5Qhnri0YezAaOxyNEzZqB2xszS2MdlLC4k86jMfJsPlT7fTKwVuBYzFpNG/BL9Fv9C/Tb3Sw2QAuJ3Y/KvLSKeiXTAQZH97+CpnoPQsnoOAF9enQbHj12Z3QxvnSV/TwJbI4u1ven8+JmT0T7HgUMi/b9WYX97JHY/xbomD0OTVVfHiUAbqd0vlnrvcTOo1T+5n5gFrBg8oNJEWut+9PE3Ooj0/uhNWH2Ch1IztyNyjI0syIcn62gCMn0R1AnbrnNUfs7opf7LlIyfRT6TL6d2H4Wyj3V1SD0gzmL5jj5nA8tOvQFzTv6xKxVub0xszSWA54H3kUX5Xm3IRqd9xw9Sx6YWTb2RLNb7iD/peXizvpZqJ72XGHDabhGJNPP68Y+b0AjrCvt589l2/qiskLxQqdxCZfy99IP/SYk95NMpk+k88jDTaPHrpt4blfvZS7UkTt/9O99o+cclXhcrVjTvJc0Mbd6Mn019B4WDx1IzhwDvBY6iF4qwvHZCpo9mT6MyuUif4s6PHurSMl00G/SqYltcfnQoRm+TlV7o5PPe9CiKHm0ExrV+hy60Daz5uT2xsxqGQJcjhJNv0YJhbwZgk5s42RYs9cCNSuCFVDC7z20EGMeLQ3chzrrfxg4llAakUz/cTf2eQHqhKm0nwMT21+j44jB/wAvUX3Bs0rJ9AWibWcmHjsy2n5i4rldvZdd0Mjw2HBUmvCFCo+tFWtX96eNuSjJ9G/Qs9/1oyj24s89tSb62y4aOpBe6O7xGX9nkrdZwJvo3DFPpb3mR7GdHTiO3rQh0PzJ9LXQe0iun/I4uu7oraIl088AHk1si797a2b4Ol1aHk0nmA6cjEaR5sGS6ORmFhoxkMcLajPrHrc3ZpbG94GP0EVHnk6Mt0e1cz9E9frMLD+GoDrqs4DbgPFhw/l/g9HoqenAw7R2Z30jkunJkeCxpdDaHO+i6eHxxf3jKffzIlpoOjYP8Bv0mzANuAklYrvazwp0nWi4OOV7AZ23Jn+HbqByIqFWrF3dnzbmoiTTr0UdXucBK3bjedfQeUE8g/5oUdZtQwfSCz09Pi+gY7mkYWjg1nRURiovjkDvbzJh1y5q9WT6nqhUVHl52TnR9yeL91W0ZPoO6LOZo2xbG1r3o6HVBfqiqWGTgbeBgwmX5FocTaubjpJuKweKw8zqw+2NmaUxEtXZnA38m8518RqlDdgE1aOdDfyJ3tctNLP6WQV4DP22/wlYLFAcg4FDgHfQApL7AH0CxZIXoZLpc6BzzodRJ0tccvACOk+fT5tML7cKGiU+jdII3K5Gpp9cZT+1YogtTMcOgeTtz1WeVy3Wru5PG3NRkum3o1hmRP/9L0py1Rpo8wxaZ8k6e5FSiaTQkqN+08gqmR67JtpfXkanTwSuRDHtGDCOoiTTe3KMgTo0H05sWwq9ryw64YuWTJ8Q7XNcYvtjwCkZvk5qo9C06iloUZyjqbyISdbagDXQlJeZ6Au9O/mvrWxmPef2xszS+AYaJTcbTefbmcbUGZ4req3Hote+EXe4mTWLvmiGywvot/5SYHUas6D4QqhO8AfoHOdU1Dlo4ZLp46L7Dk1sv5yeJdPH0LmG+NjoedvX2M//6FxaBjRStdZzY8cAl1TYPojScRcPVKkVa5r3kibmdSlGMv1hOiZ/ZqM25As08+VrFZ7TF5Wy/G6DYmw2N1GawRDaNcCraB2vtLOXsk6mXxvtL77uPZ3S8RZ/f7Yp2xYfV/uVbdsPlWWZFP37isT9e6OyVJ+gGSdHV4lxdfQ9jr/zt1R53KLA39DMzCnA9ajjLe39oHUWHkELP7+HZoPPHd13Ep0Tr69WiaWavCTTb0G/Fz+ne535f6dzu74Vmm2XxXVP0ZLpg1D7vHli++XoWAxmBOpZ/QD98eJpZKMzfI021MPyC1SjrR1dsO6Ak1pmrcTtjZmlMQFNoZ6OpkH+BdiAbKekDkQLi14QvcZ0NFpnhQxfw8wapy+aVv84+u1/ETgWWJZsE+tjUPL+TnQu8z465xie4WsUQahken/0N3kSjfQbgNr6j+l5Mr0dOAglg4ahkdtTUVKqq/18GyVnf4rOgUcAp6GRzQNqPBd03L6IShRWcmT03N1SxprmvaSJecloP9tE978DrFQlxqQ4Wdkeve4kNJPgGZR8uw91aF8JXIRq5Z6EvssHoJHjuwKbodGta6A1CsaiUaL9UsYB6jiolgiaTuXR6l+Ntn8juTMDVO/5wdBBROJEdjzz4BngMLoe0JVVMn0opTIvyc6FSqOyR9AxmQ6ltuEVVDpnEEqiX5G4/0mUZBwC7B9t+2aFGM9D7x80A3MWlT+LJ6LXGIXaiNMT763W/VugxOdxqKzU8ui7djul3+KijExPzm55DK3BUWvE+mPArxLbDiO7BXyLlkwHrVNxSGLbSeh3I7g50YF/NepBmo16rs9ASagJpC/PMBp9gfdBX7T30Af6Fhqd2sr1A83M7Y2ZpTMSXRjEo8emohPXn6EL/sVId+HcL3rst9HokTuifbUDD6GF31zOxaw4lkfTqN9G3/N30QimfdDCX6NS7mcQOifZAY38e5pSW3QVSmDMUfXZra2nyY6P6XhBfkHi/h3ofNE+LPGYrwP3oFGTrwPnor9X/PgxFfZzCZ0XE3wx2t8maATih2j0571odDZ0HCEa39Yoi2VD4AF0vvsumjmxQIr3kkyGJDt6k6M748RFV7Gmub9WzLGz0N/qk+j/04qTlduiJPUBwOHR+zkDjQi/Eo3cvA0lSp5FCcVJqCRNrSTOp+h64CXUufYAcCsaqXwJOh5OoTTSt6tbcrT6jtH2Zl5ks55+hmYC50GcTC//W8adJE+gYy85oKs3yfTksTMTlTCcO/HY7ibTz6vymvH95aWe+gKf07nUzlyo7Or80b/3jZ57VOJxA+jcdvdD36c094P+/skZMJtGz4vbmqIl05PH2Gx0fXEAlWervYjq15f7FUqyZ6GIyfQngBMS2/LU3vy/weiC89domnXc09KOFgh7DJ2g3IxOTG5FPZBP0/EE6JPoMYehRT1avXagmXXm9sbM0lgIjb67EI3ciL/701B5h0fQSe3fotvt0bYX6Xjx/Wq0j91oTLkpMwunLxoxexjwD3SuELcFk9G5xIPo3OIqdB5xD0rAvVn22OnoHOVUYGO8eHkaeUl2WL5kUealDxrxugBaE2lFNLBmI5Sk3x0lCw9HyZffoAT6ZcB16Pv+EOos6Gmi6Ec0ppRUs9kfdWLmQTKZXqmTZBbqbNkTjezOamR6f9QRex/qCCrvjOpuMv3HVV4zvv/AxPbXUOdvuV3QeXFsOPpde6HCfv+DOqK2RbM4u3N/3CF5ZmL7yGj7idG/i5pMT3amxMfYHWhGTXzu8C7qiC13JnB3RnEVMZl+L+pwLbc/mhnVSXemKGXtM3QyeXP07znQ1KnxqBd2BDoQhqARGy9Hz5mCDoznUQ/BWw2N2syakdsbM0vjdZQEvzD699zAEqg+7iKojRhG6UT1HdThNgUl0Cei9uLTRgVsZsHNQp1qj6BEOGhk3jjUfoxBbcdglJx7D3XAfYZK0r0MPBf9d0YjAzezqmajzrDJvdzPFykfNwNdn0xBg3y+SSlRax1NQedi24YOBLXp1bRRKv+5cnQ7k9LI4P5oIEZPTUOdsnujUdpHog6enpha4/5krfYZdB5Utjsdy818hJKdmwFrokRl7FtoxO/paCbHbahky0Mp7o9nee5H52QxZLsQ6yqE/w4O6eK+8vKyawFro06969B3JPl3HYK+P1bZFDrP8phC138DMzMzMzMzs6aRl5GDli95WYC0DSXlq41ajsuBvIFGQ66PEupbR9u9DlNlO6JOzNCjYtvpOIuxu7ff0r2FIC+g8gKkA6P93Vm2LV7Ad0LZtnhR0Eoj06stTpxmzQeAhal+rLfTsUxM0ipo9PU0Kpc2St4fj0w/uYt9QjYj0/Nwe7MXz70BddrELkeddFko4sj0a9FnVG5Hqgx0cIkCMzMzMzMzM7PsDKRjmZY4ATwb+DcqEbM4Kgd3ABp9OwPVo4b0azu1miFoBmBbDm6Ppoh3VnSbiUqBxfX/DyL9zIWuLB79t7ym+AfRf8eUbavnGl/fQyWOkp/PYLR2wnaUjucxdKx3/iDwQ7Te2Uop7n8Tzeb6eoU4ngS2j/5/du/eEkT7Cn2MpanXPQu93xloJv526DtyAx1nP3yO25WuDKbzyP0hVO7EcjLdzMzMzMzMzCxD5eseTEGLnu6EakmviUYmv1jheXEyx6UFKmuGUhXtlDpPHgYOQUnib6M1M7IQ10w/J3qtc8vuex54H5V9mReVHdsto9dNakP10k+scN/n6DgfDGxTtn0Z1JkwNypHshdaX+DhlPcfgsqa/BSVfRkBnIbKWP8tekxc53p8dP87KBlfFPExNhsdU7ujtmUTtD5LpfIkLlnStbmpnEzPe3tjZmZmZmZmlko7LvNineWlzMtotI7CN+neWnXLovjH1yOoAjgWeCZ0EJHkAqRx6Z6JaObBmArP6e7xGZc1Sd5moYT5zaisS9L66HP6ArgLLaJbXh5jhwr7HFb2/OT9l1SI5bPEv1dIxHBS4v64LMcmwC1o1PonqJ56+XuodT/Ahmhh1y/RGmeX0nERVtAsgI+jfZxF9+Tl96V8AdK4PNRsVD/+ANTOVPI/4OjEtuPoOOq/N4pY5uVp1L6UO5b8tDdmZmZmZmZmvZKXZIflS16S6T01EsW/XuhAcuo8lGDMg/Jk+nPAEWjB+q40+/HZKvLy+1KeTH8KOAyVhqrlQTRav9y+wKSM4ipiMv1jtKBvudOB+ys9uDs9pGZmZmZmZmZmVh8foITXOPKTNM6TcWQ3ura3XgV+heqFPx02FCuoicB9aGHM57rxvJfpvKDrRGAe1GH3QadntLYxwFA6f8aLAS9VeoKT6WZmZmZmZmZm+fA8sEToIHJqHHBN6CAiB4cOwApv3x4+byKwY4VtoLbFyfSO4vb2+cT2ccCFlZ7gBUjNzMzMzMzMzPLhOWDp0EHk0AhgFN0boWvWiiYCY4E5yra9hRbTXCZIRPm2NPAppYVrAeZEZZsmVnqCk+lmZmZmZmZmZvlwP7AaSuZYydpo4c2HAsdhlncTUSJ98bJt7WjR1rWCRJRv3wT+Tcf1DJZA1VySo9UBJ9PNzMzMzMzMzPLiDmAuYOXQgeTMusCjaKFAM6vuKTTSOpk4vxNYB2hreET51YY66u5MbP8mGsn/TKUnOZluZmZmZmZmZpYPLwGvo+SxlaxL54SXmXU2Ey1cuk5i+x3AV4DxDY8ov5YBRqPPptw6wF3os+zEyXQzMzMzMzMzs/y4GdgmdBA5sgxaDPCm0IGYNYk70Yjr8lHojwLv4bal3DbA28DjZdv6oJHpVTvvnEw3MzMzMzMzM8uPS4BlgRVCB5ITuwKvodG2ZlbbHWjB3gll22YBl6Pvk0u96DP4LnAZMLts+4powePkaPX/52S6mZmZV8PUYAAACLZJREFUmZmZmVl+/BstfLdL6EByoA+wI3AxHRcINLPqHkNtyE6J7RcDiwGrNDyi/FkdGIs+k3I7Ay8A/632RCfTzczMzMzMzMzy5WJgN2Bw6EAC2wKYj84JLzPr2uVo5HW/sm2PAU8C+waJKF/2ReVdypPm/YAdgItw552ZmZmZmZkVSDuwXeggLHe2ozgJkHmBT4FDQgcS2MPANaGDyEiRjs8iK8rvyyKofMlGie07o4U1F+/hfsegzyjk7Z89jD22KDADJc7LbYo+s7FdPblfV3eamZmZmZmZmVnDTQLOBQ4F/gBMDRtOEBsDKwH7hA7ErAm9CtwL7E3H5PMVwDGobdmrB/udDGzW2+B66f1ePv9ItA7D1YntewH3AC/3cv9mZmZmZmZmuRJ6VJxv+b4VxVeAL4DDQgcSQF/gEeCm0IFkyCPTm0M7xRiZDrA5Gmm9bGL7HsA0YFzDIwpvSWA6sHti+/Los9qk1g68equZmZmZmZk1m6IkOqw+rgwdQIaOAX4CLIVGUraKfYEzgK8BTwWOJSvbAX/Fubi8awe2pxjtSBvwKPAcHRcj7YtKKH0EbBAgrpBuB4YBKwOzyrZfCSwBTMCdXmZmZmZmZmZmTak/SoRdFTqQBhqFytycFDqQjHlkenMo0sh0UMfATJQoLvd1lEwu0nutZSf0nldJbF8y2r5NwyMyMzMzMzMzM7NMfQuVH9g+dCAN0AZch0bhDwocS9acTG8ORUum9wX+C9xc4b7zgHdRSamimw/VWj+nwn23AI8DfRoakZmZmZmZmZmZ1cWZwBSKX+P4QDSKdt3QgdSBk+nNoWjJdIA1UIfc1ontg4H/AXehpHtR9QFuA54H5k7ctx36bFZrdFBmZmZmZmZmZlYf/dGCnI8BAwLHUi/fQIsiHhk6kDpxMr05FDGZDnAh8DpKoJdbAZgK/KLhETXOiWgx5+US24cAbwJ/6s7O+mUUlJmZmZmZmZmZ1cc0VOblP8DlqLbvrC6f0VwWBf6GFgcsWq30pCImai3/DkPrL/wa2Lts+xPAAaj8yUvARY0Pra52B44A9kTlbsr9FnVO/rTRQZmZmZmZmZmZWf19A/gMjTJtCxxLVkYCE4GH0UjRoopHpvuW/1tROzw2QyVNvlvhvhNRiaWtGhpRfW0CzACOq3DfDuiz2LKhEZmZmZmZmZmZWUNthhJEp9H8CfXRaOG/54FRgWMxawVnoPUXxie2twF/Bj4HNmh0UHWwAXov59G5nVwc+BSN0jczMzMzMzMzs4LbAZV+uRCYI3AsPTUWeAEl0hcJG4pZy+iPZoE8BcyTuK8fcAmlslLNakf0Hi6i88Kq8wLPAg/QvG2nmZmZmZmZmZl104ZohOlNwNDAsXTXysA7KKnnEelmjbUgWoz0XmBg4r42NOtlFnBQg+PqrTbgUBT7qXQekT4X8G/gVWC+hkZmZmZmZmZmZmbBfR14G3gRWDFwLGm0ocUOpwE3A4PDhmPWshYH3gNuRCPSkw5FNdSvpjk664YB16ISWJU6AfpG939I5xI3ZmZmZmZmZmbWIkYDtwJfAgfSuaxBXowCrkPJriOBPmHDMWt5q6K64leh8i9Ja6POupeix+bV6sDLwJvAWhXu7486BT5DizibmZmZmZmZmVkL6wP8DJgOPILKqORFX2BfYBLwGpWTXWYWxjeBj4E7qTwCfRTwD1Q65TxgRONCq2kkWjR1Nip3NbLCYwYDtwCTgTUbF5qZmZmZmZmZmeXdksAdKPH1Z7TIZ0gbo+T+dOBkYFDYcMysguXRCPTHqF5LfHvgLVQm5UBUfzyUQcDBwEdoNPp2VR43P/BE9JhlGxOamZmZmZmZmZk1kzZgJ1SaYQZwEbBUA1+/D7AVSqK3oxGjjXx9M+u+rwLPoTrqG1Z5zBDgFFQu5X3gCBpbT30oKhH1fhTDyVFMlWwUPe4ZYOGGRGdmZmZmZmZmZk2rD7AtSia1o+T2AVQuhZCFpYBjUe3i2WhhwzyVmzGzrg0BLkXf3zOAOao8bgT6rk8CpqLv+rZdPL43+gLro07Bz4BPo9jGdPH4Y9HsnIvxIsdmZmZmZmZmZtYNfdBI04tRMmoacDdwDKohXGnhwTRGAN8BzkIjWtuBV4DjgcV7F7KZBbQn8AXwMLBSF48bCvwQuBcl4D9Ai5nuA4zvxeuPj/ZxFSorMxu1WXsAc3fxvJVRp+EXwA968fpdaqvXjs3MzMzMzMzMLFcGA5sDGwDroPIHM4FXgeej2wco6R7fhqEE1mBUg3gJlOwahUZ/PorqtN8M3IeS6mbW3JYC/oA63M5BCxxP7uLxY4EtgXXRIsNDgM8ptSuvoIVOP0HtCqhNGYramK+itmUJVBN9Ckqg3wFch9qoauYFfokS+3cDPwL+l/6tdo+T6WZmZmZmZmZmrWlRYEVKCfKxqAzM4LLbZJTY+gx4F5gY3Z4DHkTJMTMrnjbgu8CpqHzK6cDvqf2d74falWVQ2zIOddzNjRLncemVz1CC/VM6dug9hRZDnVnjdYYBP0blq6YDhwGX4Q49MzMzMzMzMzMzMwtgGHAc6lj7GDiB6jXLG2EMcCJK6k8CfkFjF0I1MzMzMzMzMzMzM6tqMBoF/jYq8XQrsCsqy1JvA4DNgCvRKPQP0EKjwxrw2mZmZmZmZmZmZmZm3TYA2B74OzADjVa/BtUqXyrD11kK2A+4Fo1CnwHcCGwXxRCEa6abmZmZmZmZmZmZWXeNRsntDdDCo0PR2gpPovrnz1Fa2HgKSryXL0A6DC1WOpLS2g3jgOVQOZdP0KKitwBXAe834D11ycl0MzMzMzMzMzMzM+uNvmjh0bXQqPIlUYJ83pTPn0RpceNnURL9MVRSJjecTDczMzMzMzMzMzOzehgBDEcj0eeJ/gsaoT4ZjVifBHwYJDozMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOzJvJ/Na1SOXfSC8gAAAAASUVORK5CYII=", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# heuristics miner\n", + "net, im, fm = heuristics_miner.apply(log)\n", + "\n", + "# viz\n", + "gviz = pn_visualizer.apply(net, im, fm)\n", + "pn_visualizer.view(gviz)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.8.8 ('base')", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.8" + }, + "vscode": { + "interpreter": { + "hash": "994fd3bf715f7d00910c6929cedf6117267fec036ef9d2716f71f2b8e3dc9b3e" + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb b/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb new file mode 100644 index 0000000000..fb7e30c891 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb @@ -0,0 +1,147 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "ename": "ImportError", + "evalue": "dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb Cell 1\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mos\u001b[39;00m\u001b[39m# uncomment if problems with dependencies\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m#%pip install pm4py\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[39m#%pip install pandas\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mdatetime\u001b[39;00m \u001b[39mas\u001b[39;00m \u001b[39mdt\u001b[39;00m\n\u001b[1;32m 6\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mtime\u001b[39;00m\n", + "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/__init__.py:20\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39msys\u001b[39;00m\n\u001b[1;32m 18\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mtime\u001b[39;00m\n\u001b[0;32m---> 20\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m \u001b[39mimport\u001b[39;00m util, objects, statistics, algo, visualization\n\u001b[1;32m 21\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39manalysis\u001b[39;00m \u001b[39mimport\u001b[39;00m check_soundness, solve_marking_equation, solve_extended_marking_equation, \\\n\u001b[1;32m 22\u001b[0m construct_synchronous_product_net, insert_artificial_start_end\n\u001b[1;32m 23\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mconformance\u001b[39;00m \u001b[39mimport\u001b[39;00m conformance_diagnostics_token_based_replay, conformance_diagnostics_alignments, \\\n\u001b[1;32m 24\u001b[0m fitness_token_based_replay, \\\n\u001b[1;32m 25\u001b[0m fitness_alignments, precision_token_based_replay, \\\n\u001b[1;32m 26\u001b[0m precision_alignments, conformance_alignments, conformance_tbr, evaluate_precision_alignments, \\\n\u001b[1;32m 27\u001b[0m evaluate_precision_tbr, evaluate_fitness_tbr, evaluate_fitness_alignments, conformance_diagnostics_footprints, \\\n\u001b[1;32m 28\u001b[0m fitness_footprints, precision_footprints, check_is_fitting\n", + "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/__init__.py:18\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[39m along with PM4Py. If not, see .\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[0;32m---> 18\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutil\u001b[39;00m \u001b[39mimport\u001b[39;00m variants_util, lp, constants, points_subset, business_hours, regex, xes_constants, vis_utils, \\\n\u001b[1;32m 19\u001b[0m dt_parsing, colors, exec_utils, pandas_utils, typing\n", + "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/lp/__init__.py:17\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[39m along with PM4Py. If not, see .\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[0;32m---> 17\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutil\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mlp\u001b[39;00m \u001b[39mimport\u001b[39;00m solver, util, variants\n", + "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/lp/solver.py:58\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 55\u001b[0m DEFAULT_LP_SOLVER_VARIANT \u001b[39m=\u001b[39m SCIPY\n\u001b[1;32m 57\u001b[0m \u001b[39mif\u001b[39;00m pkgutil\u001b[39m.\u001b[39mfind_loader(\u001b[39m\"\u001b[39m\u001b[39mcvxopt\u001b[39m\u001b[39m\"\u001b[39m):\n\u001b[0;32m---> 58\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutil\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mlp\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mvariants\u001b[39;00m \u001b[39mimport\u001b[39;00m cvxopt_solver, cvxopt_solver_custom_align, cvxopt_solver_custom_align_ilp, \\\n\u001b[1;32m 59\u001b[0m cvxopt_solver_custom_align_arm\n\u001b[1;32m 61\u001b[0m custom_solver \u001b[39m=\u001b[39m cvxopt_solver_custom_align\n\u001b[1;32m 62\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[1;32m 63\u001b[0m \u001b[39m# for ARM-based Linux, we need to use a different call to GLPK\u001b[39;00m\n", + "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/lp/variants/cvxopt_solver.py:19\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[39m along with PM4Py. If not, see .\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 17\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39msys\u001b[39;00m\n\u001b[0;32m---> 19\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mcvxopt\u001b[39;00m \u001b[39mimport\u001b[39;00m matrix, solvers\n\u001b[1;32m 22\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mapply\u001b[39m(c, Aub, bub, Aeq, beq, parameters\u001b[39m=\u001b[39m\u001b[39mNone\u001b[39;00m):\n\u001b[1;32m 23\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 24\u001b[0m \u001b[39m Gets the overall solution of the problem\u001b[39;00m\n\u001b[1;32m 25\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 44\u001b[0m \u001b[39m Solution of the LP problem by the given algorithm\u001b[39;00m\n\u001b[1;32m 45\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n", + "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/__init__.py:50\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 33\u001b[0m __copyright__ \u001b[39m=\u001b[39m \u001b[39m\"\"\"\u001b[39m\u001b[39mCopyright (c) 2012-2022 M. Andersen and L. Vandenberghe.\u001b[39m\n\u001b[1;32m 34\u001b[0m \u001b[39mCopyright (c) 2010-2011 L. Vandenberghe.\u001b[39m\n\u001b[1;32m 35\u001b[0m \u001b[39mCopyright (c) 2004-2009 J. Dahl and L. Vandenberghe.\u001b[39m\u001b[39m\"\"\"\u001b[39m\n\u001b[1;32m 37\u001b[0m __license__ \u001b[39m=\u001b[39m \u001b[39m\"\"\"\u001b[39m\u001b[39mThis program is free software; you can redistribute it and/or modify\u001b[39m\n\u001b[1;32m 38\u001b[0m \u001b[39mit under the terms of the GNU General Public License as published by\u001b[39m\n\u001b[1;32m 39\u001b[0m \u001b[39mthe Free Software Foundation; either version 3 of the License, or\u001b[39m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 47\u001b[0m \u001b[39mYou should have received a copy of the GNU General Public License\u001b[39m\n\u001b[1;32m 48\u001b[0m \u001b[39malong with this program. If not, see .\u001b[39m\u001b[39m\"\"\"\u001b[39m\n\u001b[0;32m---> 50\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mcvxopt\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mbase\u001b[39;00m\n\u001b[1;32m 52\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcopyright\u001b[39m():\n\u001b[1;32m 53\u001b[0m \u001b[39mprint\u001b[39m(__copyright__)\n", + "\u001b[0;31mImportError\u001b[0m: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))" + ] + } + ], + "source": [ + "import os# uncomment if problems with dependencies\n", + "#%pip install pm4py\n", + "#%pip install pandas\n", + "import pm4py\n", + "import datetime as dt\n", + "import time\n", + "import pandas\n", + "path = os.getcwd()\n", + "parent = os.path.dirname(path)\n", + "\n", + "# Change path if necessary \n", + "file_path = parent + \"/csv/use-case-besu-fabric-6-events.csv\"\n", + "file_path_other_model = parent + \"/csv/dummy-use-case-invalid.csv\"\n", + "\n", + "import sys\n", + "\n", + "if __name__ == '__main__':\n", + " print(sys.argv)\n", + " print(file_path)\n", + "\n", + "\n", + "\n", + "# import sys\n", + "\n", + "# accept command line arguments\n", + "# inputArg1 = sys.argv[1]\n", + "\n", + "#print('inputArg1: ',inputArg1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "\n", + "\n", + "def import_csv_original(file_path):\n", + " event_log = pandas.read_csv(file_path, sep=';')\n", + " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", + " return event_log\n", + "\n", + "def getStartActivities(event_log):\n", + " s = pm4py.get_start_activities(event_log)\n", + " print(\"Start activities: {}\\n\".format(s))\n", + " return s\n", + "def getEndActivities(event_log):\n", + " e = pm4py.get_end_activities(event_log)\n", + " print(\"End activities: {}\\n\".format(e))\n", + " return (e)\n", + "\n", + "def getAttributeFromLog(event_log, attr):\n", + " entries = pm4py.get_event_attribute_values(event_log,attr)\n", + " print(\"Entries: {}\\n\".format(entries))\n", + " return entries\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{'alignment': [('createAsset', 'createAsset'), ('MintAsset', '>>'), ('lockAsset', 'lockAsset'), ('>>', 'MintAsset'), ('transferAsset', 'transferAsset'), ('>>', None), ('transferAsset', 'transferAsset'), ('BurnAsset', 'BurnAsset')], 'cost': 20001, 'visited_states': 10, 'queued_states': 26, 'traversed_arcs': 28, 'lp_solved': 8, 'fitness': 0.8181818181818181, 'bwc': 110000}]\n" + ] + } + ], + "source": [ + "\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "\n", + "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", + "\n", + "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", + "\n", + "print(aligned_traces)\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.10.2 64-bit", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.2" + }, + "vscode": { + "interpreter": { + "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json b/packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json new file mode 100644 index 0000000000..50be30cea5 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json @@ -0,0 +1,2007 @@ +{ + "contractName": "LockAsset", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "createAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "deleteAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "getAsset", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "internalType": "bool", + "name": "isLock", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "internalType": "struct Asset", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "lockAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "unLockAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol\":{\"keccak256\":\"0x878fc27f22785593c1b35005ecf333e1f93e6dcf932b3d6e2b24d6be790b996a\",\"urls\":[\"bzz-raw://d8be1567f5e11fb718d8849f4dc9b8a8e467135ecd04c5f796c938b7363daaf2\",\"dweb:/ipfs/QmQuteuiTygZxjDnLiq3GNgJNFmPSRqbE2Q9vm85WgVbox\"]}},\"version\":1}", + "bytecode": "608060405234801561001057600080fd5b50610475806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80635e82d0a61461005c578063cd5286d014610071578063db9cc410146100b5578063def60e0d146100c8578063e24aa37c146100db575b600080fd5b61006f61006a3660046103a1565b6100ee565b005b61008461007f3660046103a1565b610164565b6040805182516001600160a01b03168152602080840151151590820152918101519082015260600160405180910390f35b61006f6100c33660046103e3565b6101dc565b61006f6100d63660046103a1565b610266565b61006f6100e93660046103a1565b6102ad565b6000806000848460405161010392919061042f565b9081526020016040518091039020600101541190508061012257600080fd5b60016000848460405161013692919061042f565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60408051606081018252600080825260208201819052918101919091526000838360405161019392919061042f565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116101e957600080fd5b80600084846040516101fc92919061042f565b908152602001604051809103902060010181905550336000848460405161022492919061042f565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556000908190610136908690869061042f565b6000806000848460405161027b92919061042f565b9081526020016040518091039020600101541190508061029a57600080fd5b600080848460405161013692919061042f565b600080600084846040516102c292919061042f565b908152602001604051809103902060010154119050806102e157600080fd5b60008084846040516102f492919061042f565b9081526040519081900360200190205460ff600160a01b9091041690508061031b57600080fd5b6000848460405161032d92919061042f565b90815260405190819003602001902080546001600160a81b0319168155600060019091015550505050565b60008083601f84011261036a57600080fd5b50813567ffffffffffffffff81111561038257600080fd5b60208301915083602082850101111561039a57600080fd5b9250929050565b600080602083850312156103b457600080fd5b823567ffffffffffffffff8111156103cb57600080fd5b6103d785828601610358565b90969095509350505050565b6000806000604084860312156103f857600080fd5b833567ffffffffffffffff81111561040f57600080fd5b61041b86828701610358565b909790965060209590950135949350505050565b818382376000910190815291905056fea26469706673582212203e656ee2af105d66466451b5ca09a2a5780b62c439dd43befb63a10687d2423b64736f6c63430008070033", + "deployedBytecode": "608060405234801561001057600080fd5b50600436106100575760003560e01c80635e82d0a61461005c578063cd5286d014610071578063db9cc410146100b5578063def60e0d146100c8578063e24aa37c146100db575b600080fd5b61006f61006a3660046103a1565b6100ee565b005b61008461007f3660046103a1565b610164565b6040805182516001600160a01b03168152602080840151151590820152918101519082015260600160405180910390f35b61006f6100c33660046103e3565b6101dc565b61006f6100d63660046103a1565b610266565b61006f6100e93660046103a1565b6102ad565b6000806000848460405161010392919061042f565b9081526020016040518091039020600101541190508061012257600080fd5b60016000848460405161013692919061042f565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60408051606081018252600080825260208201819052918101919091526000838360405161019392919061042f565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116101e957600080fd5b80600084846040516101fc92919061042f565b908152602001604051809103902060010181905550336000848460405161022492919061042f565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556000908190610136908690869061042f565b6000806000848460405161027b92919061042f565b9081526020016040518091039020600101541190508061029a57600080fd5b600080848460405161013692919061042f565b600080600084846040516102c292919061042f565b908152602001604051809103902060010154119050806102e157600080fd5b60008084846040516102f492919061042f565b9081526040519081900360200190205460ff600160a01b9091041690508061031b57600080fd5b6000848460405161032d92919061042f565b90815260405190819003602001902080546001600160a81b0319168155600060019091015550505050565b60008083601f84011261036a57600080fd5b50813567ffffffffffffffff81111561038257600080fd5b60208301915083602082850101111561039a57600080fd5b9250929050565b600080602083850312156103b457600080fd5b823567ffffffffffffffff8111156103cb57600080fd5b6103d785828601610358565b90969095509350505050565b6000806000604084860312156103f857600080fd5b833567ffffffffffffffff81111561040f57600080fd5b61041b86828701610358565b909790965060209590950135949350505050565b818382376000910190815291905056fea26469706673582212203e656ee2af105d66466451b5ca09a2a5780b62c439dd43befb63a10687d2423b64736f6c63430008070033", + "sourceMap": "543:1053:0:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "543:1053:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;946:154;;;;;;:::i;:::-;;:::i;:::-;;798:105;;;;;;:::i;:::-;;:::i;:::-;;;;1753:13:1;;-1:-1:-1;;;;;1749:39:1;1731:58;;1859:4;1847:17;;;1841:24;1834:32;1827:40;1805:20;;;1798:70;1912:17;;;1906:24;1884:20;;;1877:54;1719:2;1704:18;798:105:0;;;;;;;607:188;;;;;;:::i;:::-;;:::i;1144:157::-;;;;;;:::i;:::-;;:::i;1304:289::-;;;;;;:::i;:::-;;:::i;946:154::-;999:16;1034:1;1018:6;1025:2;;1018:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;999:36;;1051:11;1043:20;;;;;;1091:4;1071:6;1078:2;;1071:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1071:24:0;-1:-1:-1;;;;1071:24:0;;;;;;;;;-1:-1:-1;;;946:154:0:o;798:105::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;888:6:0;895:2;;888:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;881:17;;;;;;;-1:-1:-1;;;;;881:17:0;;;;-1:-1:-1;;;881:17:0;;;;;;;;;;;;;;;;;;;;;;888:10;798:105;-1:-1:-1;;;798:105:0:o;607:188::-;687:1;682:4;:6;674:15;;;;;;714:4;697:6;704:2;;697:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;747:10;726:6;733:2;;726:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;726:31:0;;;;-1:-1:-1;;;;;;726:31:0;;;;;;;;;;:18;;;;765:10;;772:2;;;;765:10;:::i;1144:157::-;1199:16;1234:1;1218:6;1225:2;;1218:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;1199:36;;1251:11;1243:20;;;;;;1291:5;1271:6;1278:2;;1271:10;;;;;;;:::i;1304:289::-;1360:16;1395:1;1379:6;1386:2;;1379:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;1360:36;;1412:11;1404:20;;;;;;1495:18;1516:6;1523:2;;1516:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1516:17:0;;;;;-1:-1:-1;1516:17:0;1541:22;;;;;;1578:6;1585:2;;1578:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1571:17;;-1:-1:-1;;;;;;1571:17:0;;;1578:10;1571:17;;;;;-1:-1:-1;;;;1304:289:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;783:479::-;863:6;871;879;932:2;920:9;911:7;907:23;903:32;900:52;;;948:1;945;938:12;900:52;988:9;975:23;1021:18;1013:6;1010:30;1007:50;;;1053:1;1050;1043:12;1007:50;1092:59;1143:7;1134:6;1123:9;1119:22;1092:59;:::i;:::-;1170:8;;1066:85;;-1:-1:-1;1252:2:1;1237:18;;;;1224:32;;783:479;-1:-1:-1;;;;783:479:1:o;1267:273::-;1452:6;1444;1439:3;1426:33;1408:3;1478:16;;1503:13;;;1478:16;1267:273;-1:-1:-1;1267:273:1:o", + "sourcePath": "/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol", + "compiler": { + "name": "solc", + "version": "0.8.7+commit.e28d00a7" + }, + "ast": { + "absolutePath": "/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol", + "exportedSymbols": { + "Asset": [ + 8 + ], + "LockAsset": [ + 150 + ] + }, + "id": 151, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.7", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "413:24:0" + }, + { + "canonicalName": "Asset", + "id": 8, + "members": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "creator", + "nameLocation": "464:7:0", + "nodeType": "VariableDeclaration", + "scope": 8, + "src": "456:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "456:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5, + "mutability": "mutable", + "name": "isLock", + "nameLocation": "482:6:0", + "nodeType": "VariableDeclaration", + "scope": 8, + "src": "477:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "477:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7, + "mutability": "mutable", + "name": "size", + "nameLocation": "499:4:0", + "nodeType": "VariableDeclaration", + "scope": 8, + "src": "494:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "494:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Asset", + "nameLocation": "445:5:0", + "nodeType": "StructDefinition", + "scope": 151, + "src": "438:68:0", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 150, + "linearizedBaseContracts": [ + 150 + ], + "name": "LockAsset", + "nameLocation": "552:9:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 13, + "mutability": "mutable", + "name": "assets", + "nameLocation": "597:6:0", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "571:32:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string => struct Asset)" + }, + "typeName": { + "id": 12, + "keyType": { + "id": 9, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "580:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "nodeType": "Mapping", + "src": "571:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string => struct Asset)" + }, + "valueType": { + "id": 11, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 10, + "name": "Asset", + "nodeType": "IdentifierPath", + "referencedDeclaration": 8, + "src": "590:5:0" + }, + "referencedDeclaration": 8, + "src": "590:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", + "typeString": "struct Asset" + } + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 48, + "nodeType": "Block", + "src": "666:129:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 21, + "name": "size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "682:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "687:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "682:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 20, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "674:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "674:15:0" + }, + { + "expression": { + "id": 31, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 26, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "697:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 28, + "indexExpression": { + "id": 27, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "704:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "697:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 29, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 7, + "src": "697:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 30, + "name": "size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "714:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "697:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 32, + "nodeType": "ExpressionStatement", + "src": "697:21:0" + }, + { + "expression": { + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 33, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "726:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 35, + "indexExpression": { + "id": 34, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "733:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "726:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 36, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "creator", + "nodeType": "MemberAccess", + "referencedDeclaration": 3, + "src": "726:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 37, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "747:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "747:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "726:31:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 40, + "nodeType": "ExpressionStatement", + "src": "726:31:0" + }, + { + "expression": { + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 41, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "765:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 43, + "indexExpression": { + "id": 42, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "772:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "765:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 44, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "765:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "785:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "765:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 47, + "nodeType": "ExpressionStatement", + "src": "765:25:0" + } + ] + }, + "functionSelector": "db9cc410", + "id": 49, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createAsset", + "nameLocation": "616:11:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 15, + "mutability": "mutable", + "name": "id", + "nameLocation": "645:2:0", + "nodeType": "VariableDeclaration", + "scope": 49, + "src": "629:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 14, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "629:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 17, + "mutability": "mutable", + "name": "size", + "nameLocation": "654:4:0", + "nodeType": "VariableDeclaration", + "scope": 49, + "src": "649:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "649:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "627:32:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "666:0:0" + }, + "scope": 150, + "src": "607:188:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "873:30:0", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 57, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "888:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 59, + "indexExpression": { + "id": 58, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "895:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "888:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "functionReturnParameters": 56, + "id": 60, + "nodeType": "Return", + "src": "881:17:0" + } + ] + }, + "functionSelector": "cd5286d0", + "id": 62, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAsset", + "nameLocation": "807:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 51, + "mutability": "mutable", + "name": "id", + "nameLocation": "832:2:0", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "816:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 50, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "816:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "815:20:0" + }, + "returnParameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 55, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 62, + "src": "857:12:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_memory_ptr", + "typeString": "struct Asset" + }, + "typeName": { + "id": 54, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 53, + "name": "Asset", + "nodeType": "IdentifierPath", + "referencedDeclaration": 8, + "src": "857:5:0" + }, + "referencedDeclaration": 8, + "src": "857:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", + "typeString": "struct Asset" + } + }, + "visibility": "internal" + } + ], + "src": "856:14:0" + }, + "scope": 150, + "src": "798:105:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 87, + "nodeType": "Block", + "src": "991:109:0", + "statements": [ + { + "assignments": [ + 68 + ], + "declarations": [ + { + "constant": false, + "id": 68, + "mutability": "mutable", + "name": "assetExsist", + "nameLocation": "1004:11:0", + "nodeType": "VariableDeclaration", + "scope": 87, + "src": "999:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 67, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "999:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 75, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 69, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1018:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 71, + "indexExpression": { + "id": 70, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64, + "src": "1025:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1018:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 72, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 7, + "src": "1018:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 73, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1034:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1018:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "999:36:0" + }, + { + "expression": { + "arguments": [ + { + "id": 77, + "name": "assetExsist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "1051:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 76, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1043:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1043:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 79, + "nodeType": "ExpressionStatement", + "src": "1043:20:0" + }, + { + "expression": { + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 80, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1071:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 82, + "indexExpression": { + "id": 81, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 64, + "src": "1078:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1071:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 83, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "1071:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1091:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1071:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 86, + "nodeType": "ExpressionStatement", + "src": "1071:24:0" + } + ] + }, + "functionSelector": "5e82d0a6", + "id": 88, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "lockAsset", + "nameLocation": "955:9:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 64, + "mutability": "mutable", + "name": "id", + "nameLocation": "981:2:0", + "nodeType": "VariableDeclaration", + "scope": 88, + "src": "965:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 63, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "965:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "964:20:0" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [], + "src": "991:0:0" + }, + "scope": 150, + "src": "946:154:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 113, + "nodeType": "Block", + "src": "1191:110:0", + "statements": [ + { + "assignments": [ + 94 + ], + "declarations": [ + { + "constant": false, + "id": 94, + "mutability": "mutable", + "name": "assetExsist", + "nameLocation": "1204:11:0", + "nodeType": "VariableDeclaration", + "scope": 113, + "src": "1199:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 93, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1199:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 101, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 95, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1218:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 97, + "indexExpression": { + "id": 96, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "1225:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1218:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 98, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 7, + "src": "1218:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1234:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1218:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1199:36:0" + }, + { + "expression": { + "arguments": [ + { + "id": 103, + "name": "assetExsist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 94, + "src": "1251:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 102, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1243:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 105, + "nodeType": "ExpressionStatement", + "src": "1243:20:0" + }, + { + "expression": { + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 106, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1271:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 108, + "indexExpression": { + "id": 107, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 90, + "src": "1278:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 109, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "1271:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1291:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1271:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 112, + "nodeType": "ExpressionStatement", + "src": "1271:25:0" + } + ] + }, + "functionSelector": "def60e0d", + "id": 114, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unLockAsset", + "nameLocation": "1153:11:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 91, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 90, + "mutability": "mutable", + "name": "id", + "nameLocation": "1181:2:0", + "nodeType": "VariableDeclaration", + "scope": 114, + "src": "1165:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 89, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1165:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1164:20:0" + }, + "returnParameters": { + "id": 92, + "nodeType": "ParameterList", + "parameters": [], + "src": "1191:0:0" + }, + "scope": 150, + "src": "1144:157:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 148, + "nodeType": "Block", + "src": "1352:241:0", + "statements": [ + { + "assignments": [ + 120 + ], + "declarations": [ + { + "constant": false, + "id": 120, + "mutability": "mutable", + "name": "assetExsist", + "nameLocation": "1365:11:0", + "nodeType": "VariableDeclaration", + "scope": 148, + "src": "1360:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 119, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1360:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 127, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 121, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1379:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 123, + "indexExpression": { + "id": 122, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "1386:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1379:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "size", + "nodeType": "MemberAccess", + "referencedDeclaration": 7, + "src": "1379:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1395:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1379:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1360:36:0" + }, + { + "expression": { + "arguments": [ + { + "id": 129, + "name": "assetExsist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1412:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 128, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1404:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1404:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 131, + "nodeType": "ExpressionStatement", + "src": "1404:20:0" + }, + { + "assignments": [ + 133 + ], + "declarations": [ + { + "constant": false, + "id": 133, + "mutability": "mutable", + "name": "assetIsLocked", + "nameLocation": "1500:13:0", + "nodeType": "VariableDeclaration", + "scope": 148, + "src": "1495:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 132, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1495:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 138, + "initialValue": { + "expression": { + "baseExpression": { + "id": 134, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1516:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 136, + "indexExpression": { + "id": 135, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "1523:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1516:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "1516:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1495:38:0" + }, + { + "expression": { + "arguments": [ + { + "id": 140, + "name": "assetIsLocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "1549:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 139, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 142, + "nodeType": "ExpressionStatement", + "src": "1541:22:0" + }, + { + "expression": { + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "1571:17:0", + "subExpression": { + "baseExpression": { + "id": 143, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1578:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 145, + "indexExpression": { + "id": 144, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "1585:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1578:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "1571:17:0" + } + ] + }, + "functionSelector": "e24aa37c", + "id": 149, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deleteAsset", + "nameLocation": "1313:11:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 117, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 116, + "mutability": "mutable", + "name": "id", + "nameLocation": "1341:2:0", + "nodeType": "VariableDeclaration", + "scope": 149, + "src": "1325:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 115, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1325:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1324:20:0" + }, + "returnParameters": { + "id": 118, + "nodeType": "ParameterList", + "parameters": [], + "src": "1352:0:0" + }, + "scope": 150, + "src": "1304:289:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 151, + "src": "543:1053:0", + "usedErrors": [] + } + ], + "src": "413:1184:0" + }, + "functionHashes": { + "createAsset(string,uint256)": "db9cc410", + "deleteAsset(string)": "e24aa37c", + "getAsset(string)": "cd5286d0", + "lockAsset(string)": "5e82d0a6", + "unLockAsset(string)": "def60e0d" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "228200", + "executionCost": "269", + "totalCost": "228469" + }, + "external": { + "createAsset(string,uint256)": "infinite", + "deleteAsset(string)": "infinite", + "getAsset(string)": "infinite", + "lockAsset(string)": "infinite", + "unLockAsset(string)": "infinite" + } + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts new file mode 100644 index 0000000000..a77b09a829 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts @@ -0,0 +1,8 @@ +import test, { Test } from "tape-promise/tape"; + +import * as apiSurface from "../../../main/typescript/public-api"; + +test("Library can be loaded", (t: Test) => { + t.ok(apiSurface, "apiSurface truthy OK"); + t.end(); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts new file mode 100644 index 0000000000..cebc20f6ce --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts @@ -0,0 +1,207 @@ +import test, { Test } from "tape-promise/tape"; +import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; +import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; +import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; +import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; +import { + CcTxVisualization, + IChannelOptions, +} from "../../../main/typescript/plugin-cc-tx-visualization"; +import { randomUUID } from "crypto"; +import * as amqp from "amqp-ts"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const testCase = "dummy-baseline-6-events"; +const logLevel: LogLevelDesc = "TRACE"; +const queueName = "cc-tx-log-entry-test"; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "cctxviz-dummy-demo", +}); +test("BEFORE " + testCase, async (t: Test) => { + const pruning = pruneDockerAllIfGithubAction({ logLevel }); + await t.doesNotReject(pruning, "Pruning didn't throw OK"); + t.end(); +}); + +test(testCase, async (t: Test) => { + //initialize rabbitmq + const setupInfraTime = new Date(); + const options = { + publishAllPorts: true, + port: 5672, + logLevel: logLevel, + imageName: "rabbitmq", + imageTag: "3.9-management", + emitContainerLogs: true, + envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), + }; + const channelOptions: IChannelOptions = { + queueId: queueName, + dltTechnology: null, + persistMessages: false, + }; + + const cctxvizOptions: IPluginCcTxVisualizationOptions = { + instanceId: randomUUID(), + logLevel: logLevel, + eventProvider: "amqp://localhost", + channelOptions: channelOptions, + }; + + const testServer = new RabbitMQTestServer(options); + const tearDown = async () => { + t.comment("shutdown starts"); + await testServer.stop(); + await cctxViz.shutdown(); + await cctxViz.closeConnection(); + log.debug("running process exit"); + process.exit(0); + }; + + test.onFinish(tearDown); + await testServer.start(true); + t.ok(testServer); + + // Simulates a Cactus Ledger Connector plugin + const connection = new amqp.Connection(); + const queue = connection.declareQueue(queueName, { durable: false }); + + // Initialize our plugin + const cctxViz = new CcTxVisualization(cctxvizOptions); + const setupInfraTimeEnd = new Date(); + log.debug( + `EVAL-testFile-SETUP-INFRA:${ + setupInfraTimeEnd.getTime() - setupInfraTime.getTime() + }`, + ); + t.ok(cctxViz); + t.comment("cctxviz plugin is ok"); + + t.assert(cctxViz.numberUnprocessedReceipts === 0); + t.assert(cctxViz.numberEventsLog === 0); + + const currentTime = new Date(); + const timeStartSendMessages = new Date(); + + // caseID 1; registar emissions; Fabric blockchain, test message; parameters: asset 1, 100 units + const testMessage1 = new amqp.Message({ + caseID: "1", + timestamp: currentTime, + blockchainID: "TEST", + invocationType: "send", + methodName: "initialize asset", + // Asset 1, 100 units + parameters: ["1,100"], + identity: "A", + }); + queue.send(testMessage1); + + const testMessage2 = new amqp.Message({ + caseID: "1", + timestamp: new Date(currentTime.getTime() + 2), + blockchainID: "TEST", + invocationType: "send", + methodName: "lock asset", + // Asset 1, 100 units + parameters: ["1,100"], + identity: "A", + }); + queue.send(testMessage2); + + const testMessage3 = new amqp.Message({ + caseID: "1", + timestamp: new Date(currentTime.getTime() + 3), + blockchainID: "TEST", + invocationType: "send", + methodName: "mint asset", + // Asset 1, 100 units + parameters: ["1,100"], + identity: "A", + }); + queue.send(testMessage3); + + const testMessage4 = new amqp.Message({ + caseID: "1", + timestamp: new Date(currentTime.getTime() + 4), + blockchainID: "TEST", + invocationType: "send", + methodName: "transfer asset", + // Asset 1, 100 units + parameters: ["A"], + identity: "A", + }); + queue.send(testMessage4); + + const testMessage5 = new amqp.Message({ + caseID: "1", + timestamp: new Date(currentTime.getTime() + 5), + blockchainID: "TEST", + invocationType: "send", + methodName: "transfer asset", + // Asset 1, 100 units + parameters: [""], + identity: "A", + }); + queue.send(testMessage5); + + const testMessage6 = new amqp.Message({ + caseID: "1", + timestamp: new Date(currentTime.getTime() + 6), + blockchainID: "TEST", + invocationType: "send", + methodName: "burn asset", + // Asset 1, 100 units + parameters: [""], + identity: "A", + }); + queue.send(testMessage6); + const endTimeSendMessages = new Date(); + t.comment( + `EVAL-testFile-SEND-MESSAGES:${ + endTimeSendMessages.getTime() - timeStartSendMessages.getTime() + }`, + ); + + const timeStartPollReceipts = new Date(); + await cctxViz.pollTxReceipts(); + await cctxViz.hasProcessedXMessages(6, 4); + + const endTimePollReceipts = new Date(); + const totalTimePoll = + endTimePollReceipts.getTime() - timeStartPollReceipts.getTime(); + t.comment(`EVAL-testFile-POLL:${totalTimePoll}`); + + t.assert(cctxViz.numberEventsLog === 0); + t.assert(cctxViz.numberUnprocessedReceipts === 6); + + await cctxViz.txReceiptToCrossChainEventLogEntry(); + + t.assert(cctxViz.numberEventsLog === 6); + t.assert(cctxViz.numberUnprocessedReceipts === 0); + + const logName = await cctxViz.persistCrossChainLogCsv( + "dummy-use-case-6-events", + ); + + const startTimeAggregate = new Date(); + await cctxViz.aggregateCcTx(); + const endTimeAggregate = new Date(); + t.comment( + `EVAL-testFile-AGGREGATE-CCTX:${ + endTimeAggregate.getTime() - startTimeAggregate.getTime() + }`, + ); + + const map = + "{'registerEmission': (node:registerEmission connections:{registerEmission:[0.6666666666666666], getEmissions:[0.6666666666666666]}), 'getEmissions': (node:getEmissions connections:{mintEmissionToken:[0.6666666666666666]}), 'mintEmissionToken': (node:mintEmissionToken connections:{})}"; + // Persist heuristic map that is generated from the script that takes this input + await cctxViz.saveModel(CrossChainModelType.HeuristicMiner, map); + const savedModel = await cctxViz.getModel(CrossChainModelType.HeuristicMiner); + t.assert(map === savedModel); + + console.log(logName); + t.ok(logName); + t.end(); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts new file mode 100644 index 0000000000..02fb72e647 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts @@ -0,0 +1,200 @@ +import test, { Test } from "tape-promise/tape"; +import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; +import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; +import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; +import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; +import { + CcTxVisualization, + IChannelOptions, +} from "../../../main/typescript/plugin-cc-tx-visualization"; +import { randomUUID } from "crypto"; +import * as amqp from "amqp-ts"; + +const testCase = "dummy-baseline-invalid"; +const logLevel: LogLevelDesc = "TRACE"; +const queueName = "cc-tx-log-entry-test"; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "cctxviz-dummy-demo", +}); +test("BEFORE " + testCase, async (t: Test) => { + const pruning = pruneDockerAllIfGithubAction({ logLevel }); + await t.doesNotReject(pruning, "Pruning didn't throw OK"); + t.end(); +}); + +test(testCase, async (t: Test) => { + //initialize rabbitmq + const setupInfraTime = new Date(); + const options = { + publishAllPorts: true, + port: 5672, + logLevel: logLevel, + imageName: "rabbitmq", + imageTag: "3.9-management", + emitContainerLogs: true, + envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), + }; + const channelOptions: IChannelOptions = { + queueId: queueName, + dltTechnology: null, + persistMessages: false, + }; + + const cctxvizOptions: IPluginCcTxVisualizationOptions = { + instanceId: randomUUID(), + logLevel: logLevel, + eventProvider: "amqp://localhost", + channelOptions: channelOptions, + }; + + const testServer = new RabbitMQTestServer(options); + const tearDown = async () => { + t.comment("shutdown starts"); + await testServer.stop(); + await cctxViz.shutdown(); + await cctxViz.closeConnection(); + log.debug("running process exit"); + process.exit(0); + }; + + test.onFinish(tearDown); + await testServer.start(true); + t.ok(testServer); + + // Simulates a Cactus Ledger Connector plugin + const connection = new amqp.Connection(); + const queue = connection.declareQueue(queueName, { durable: false }); + + // Initialize our plugin + const cctxViz = new CcTxVisualization(cctxvizOptions); + const setupInfraTimeEnd = new Date(); + log.debug( + `EVAL-testFile-SETUP-INFRA:${ + setupInfraTimeEnd.getTime() - setupInfraTime.getTime() + }`, + ); + t.ok(cctxViz); + t.comment("cctxviz plugin is ok"); + + t.assert(cctxViz.numberUnprocessedReceipts === 0); + t.assert(cctxViz.numberEventsLog === 0); + + const currentTime = new Date(); + let caseNumber = 1; + const caseID = "INVALID_FABRIC_BESU"; + + t.comment(`Sending ${caseNumber * 6} messages across ${caseNumber} cases`); + while (caseNumber > 0) { + // caseID 1; registar emissions; Fabric blockchain, test message; parameters: asset 1, 100 units + const testMessage1 = new amqp.Message({ + caseID: caseID + "_" + caseNumber, + timestamp: currentTime, + blockchainID: "TEST", + invocationType: "send", + methodName: "createAsset", + // Asset 1, 100 units + parameters: ["asset1,5"], + identity: "A", + }); + queue.send(testMessage1); + + // BAD ORDER MINT BEFORE LOCK + const testMessage3 = new amqp.Message({ + caseID: caseID + "_" + caseNumber, + timestamp: new Date(currentTime.getTime() + 2), + blockchainID: "TEST", + invocationType: "send", + methodName: "mintAsset", + // Asset 1, 100 units + parameters: ["asset1", "Green", "19", "owner1", "9999"], + identity: "A", + }); + queue.send(testMessage3); + + const testMessage2 = new amqp.Message({ + caseID: caseID + "_" + caseNumber, + timestamp: new Date(currentTime.getTime() + 3), + blockchainID: "TEST", + invocationType: "send", + methodName: "lockAsset", + // Asset 1, 100 units + parameters: ["asset1"], + identity: "A", + }); + queue.send(testMessage2); + + const testMessage4 = new amqp.Message({ + caseID: caseID + "_" + caseNumber, + timestamp: new Date(currentTime.getTime() + 4), + blockchainID: "TEST", + invocationType: "send", + methodName: "transferAsset", + // Asset 1, 100 units + parameters: ["asset1", "owner2"], + identity: "A", + }); + queue.send(testMessage4); + + const testMessage5 = new amqp.Message({ + caseID: caseID + "_" + caseNumber, + timestamp: new Date(currentTime.getTime() + 5), + blockchainID: "TEST", + invocationType: "send", + methodName: "transferAsset", + // Asset 1, 100 units + parameters: ["asset1", "owner1"], + identity: "A", + }); + queue.send(testMessage5); + + const testMessage6 = new amqp.Message({ + caseID: caseID + "_" + caseNumber, + timestamp: new Date(currentTime.getTime() + 6), + blockchainID: "TEST", + invocationType: "send", + methodName: "BurnAsset", + // Asset 1, 100 units + parameters: ["asset1"], + identity: "A", + }); + queue.send(testMessage6); + + caseNumber--; + } + + const timeStartPollReceipts = new Date(); + await cctxViz.pollTxReceipts(); + await cctxViz.hasProcessedXMessages(6, 4); + + const endTimePollReceipts = new Date(); + const totalTimePoll = + endTimePollReceipts.getTime() - timeStartPollReceipts.getTime(); + t.comment(`EVAL-testFile-POLL:${totalTimePoll}`); + + t.assert(cctxViz.numberEventsLog === 0); + t.assert(cctxViz.numberUnprocessedReceipts === 6); + + await cctxViz.txReceiptToCrossChainEventLogEntry(); + + t.assert(cctxViz.numberEventsLog === 6); + t.assert(cctxViz.numberUnprocessedReceipts === 0); + + const logName = await cctxViz.persistCrossChainLogCsv( + "dummy-use-case-invalid", + ); + + const startTimeAggregate = new Date(); + await cctxViz.aggregateCcTx(); + const endTimeAggregate = new Date(); + t.comment( + `EVAL-testFile-AGGREGATE-CCTX:${ + endTimeAggregate.getTime() - startTimeAggregate.getTime() + }`, + ); + + console.log(logName); + t.ok(logName); + t.end(); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts new file mode 100644 index 0000000000..d32af002cf --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts @@ -0,0 +1,120 @@ +import test, { Test } from "tape-promise/tape"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; +import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; +import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; +import { + CcTxVisualization, + IChannelOptions, +} from "../../../main/typescript/plugin-cc-tx-visualization"; +import { randomUUID } from "crypto"; +import * as amqp from "amqp-ts"; +//import { LedgerType } from "@hyperledger/cactus-core-api/src/main/typescript/public-api"; + +const testCase = "persist logs"; +const logLevel: LogLevelDesc = "TRACE"; +const queueName = "cc-tx-log-entry-test"; + +test("BEFORE " + testCase, async (t: Test) => { + const pruning = pruneDockerAllIfGithubAction({ logLevel }); + await t.doesNotReject(pruning, "Pruning didn't throw OK"); + t.end(); +}); + +test(testCase, async (t: Test) => { + //initialize rabbitmq + const options = { + publishAllPorts: true, + port: 5672, + logLevel: logLevel, + imageName: "rabbitmq", + imageTag: "3.9-management", + emitContainerLogs: true, + envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), + }; + const channelOptions: IChannelOptions = { + queueId: queueName, + dltTechnology: null, + persistMessages: false, + }; + + const cctxvizOptions: IPluginCcTxVisualizationOptions = { + instanceId: randomUUID(), + logLevel: logLevel, + eventProvider: "amqp://localhost", + channelOptions: channelOptions, + }; + + const testServer = new RabbitMQTestServer(options); + const tearDown = async () => { + // Connections to the RabbitMQ server need to be closed + + await testServer.stop(); + // todo problem connection closing is hanging here and l56 + await connection.close(); + + await cctxViz.closeConnection(); + + //await testServer.destroy(); + //await pruneDockerAllIfGithubAction({ logLevel }); + }; + + test.onFinish(tearDown); + + await testServer.start(true); + t.ok(testServer); + + // Simulates a Cactus Ledger Connector plugin + const connection = new amqp.Connection(); + const queue = connection.declareQueue(queueName, { durable: false }); + + // Initialize our plugin + const cctxViz = new CcTxVisualization(cctxvizOptions); + t.ok(cctxViz); + t.comment("cctxviz plugin is ok"); + await cctxViz.pollTxReceipts(); + t.assert(cctxViz.numberUnprocessedReceipts === 0); + t.assert(cctxViz.numberEventsLog === 0); + + // already activated by previous test + //await cctxViz.pollTxReceipts(); + + const testMessage = new amqp.Message({ + caseID: "caseID-TEST 1", + timestamp: new Date(), + blockchainID: "TEST", + invocationType: "call", + methodName: "methodName", + parameters: ["0", "2"], + identity: "person 1", + }); + queue.send(testMessage); + + const testMessage2 = new amqp.Message({ + caseID: "case1", + cost: 5, + revenue: 0, + carbonFootprint: 5, + timestamp: new Date(), + blockchainID: "TEST", + invocationType: "call", + methodName: "methodName", + parameters: ["0", "2"], + identity: "person 1", + }); + queue.send(testMessage2); + + await new Promise((resolve) => setTimeout(resolve, 1000)); + await cctxViz.txReceiptToCrossChainEventLogEntry(); + + t.assert(cctxViz.numberEventsLog === 2); + // because the second message did not have time to be send to processing before receipts were transformed into cross chain events + t.assert(cctxViz.numberUnprocessedReceipts === 0); + + await cctxViz.txReceiptToCrossChainEventLogEntry(); + + const logName = await cctxViz.persistCrossChainLogCsv(); + console.log(logName); + t.ok(logName); + t.end(); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts new file mode 100644 index 0000000000..0c533f674e --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts @@ -0,0 +1,583 @@ +import test, { Test } from "tape-promise/tape"; +import { + IListenOptions, + LoggerProvider, + LogLevelDesc, + Servers, +} from "@hyperledger/cactus-common"; +import { + BesuTestLedger, + Containers, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; +import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; +import { + CcTxVisualization, + IChannelOptions, +} from "../../../main/typescript/plugin-cc-tx-visualization"; +import { randomUUID } from "crypto"; +import { IRabbitMQTestServerOptions } from "@hyperledger/cactus-test-tooling/dist/lib/main/typescript/rabbitmq-test-server/rabbit-mq-test-server"; +import { v4 as uuidv4 } from "uuid"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { DiscoveryOptions } from "fabric-network"; +import { Configuration } from "@hyperledger/cactus-core-api"; +import fs from "fs-extra"; +import LockAssetContractJson from "../../solidity/LockAsset.json"; +import { PluginImportType } from "@hyperledger/cactus-core-api"; + +import { + ChainCodeProgrammingLanguage, + DefaultEventHandlerStrategy, + FabricContractInvocationType, + FileBase64, + PluginLedgerConnectorFabric, + IPluginLedgerConnectorFabricOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import express from "express"; +import bodyParser from "body-parser"; +import http from "http"; +import path from "path"; +import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { AddressInfo } from "net"; +import Web3 from "web3"; +import { + EthContractInvocationType, + PluginFactoryLedgerConnector, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; + +const testCase = "Instantiate plugin with fabric, send 2 transactions"; +const logLevel: LogLevelDesc = "TRACE"; + +// By default that's the Fabric connector queue +const queueName = "cc-tx-viz-queue"; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "cctxviz-fabtest", +}); +//const fixturesPath = +("../../../../../cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures"); +const alternativeFixturesPath = "../fixtures"; + +let cctxViz: CcTxVisualization; +let options: IRabbitMQTestServerOptions; +let channelOptions: IChannelOptions; +let testServer: RabbitMQTestServer; +let cctxvizOptions: IPluginCcTxVisualizationOptions; +let ledger: FabricTestLedgerV1; +let besuTestLedger: BesuTestLedger; +const expressAppBesu = express(); +expressAppBesu.use(bodyParser.json({ limit: "250mb" })); + +const expressApp = express(); +expressApp.use(bodyParser.json({ limit: "250mb" })); +const server = http.createServer(expressApp); + +test(testCase, async (t: Test) => { + const setupInfraTime = new Date(); + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + options = { + publishAllPorts: true, + port: 5672, + logLevel: logLevel, + imageName: "rabbitmq", + imageTag: "3.9-management", + emitContainerLogs: true, + envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), + }; + channelOptions = { + queueId: queueName, + dltTechnology: null, + persistMessages: false, + }; + + cctxvizOptions = { + instanceId: randomUUID(), + logLevel: logLevel, + eventProvider: "amqp://localhost", + channelOptions: channelOptions, + }; + testServer = new RabbitMQTestServer(options); + + await testServer.start(); + cctxViz = new CcTxVisualization(cctxvizOptions); + + ledger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), + logLevel, + }); + await ledger.start(); + + besuTestLedger = new BesuTestLedger(); + await besuTestLedger.start(); + const tearDown = async () => { + await cctxViz.closeConnection(); + await testServer.stop(); + await ledger.stop(); + await ledger.destroy(); + await besuTestLedger.stop(); + await besuTestLedger.destroy(); + await pruneDockerAllIfGithubAction({ logLevel }); + log.debug("executing exit"); + process.exit(0); + }; + + test.onFinish(tearDown); + t.ok(testServer); + const channelId = "mychannel"; + const channelName = channelId; + + const connectionProfile = await ledger.getConnectionProfileOrg1(); + const enrollAdminOut = await ledger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + const [userIdentity] = await ledger.enrollUser(adminWallet); + const sshConfig = await ledger.getSshConfig(); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user2"; + const keychainEntryValue = JSON.stringify(userIdentity); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) + // const orgCfgDir = "/fabric-samples/test-network/organizations/"; + const orgCfgDir = + "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; + + // these below mirror how the fabric-samples sets up the configuration + const org1Env = { + CORE_LOGGING_LEVEL: "debug", + FABRIC_LOGGING_SPEC: "debug", + CORE_PEER_LOCALMSPID: "Org1MSP", + + ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + + FABRIC_CFG_PATH: "/etc/hyperledger/fabric", + CORE_PEER_TLS_ENABLED: "true", + CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, + CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, + CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", + ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + }; + + // these below mirror how the fabric-samples sets up the configuration + const org2Env = { + CORE_LOGGING_LEVEL: "debug", + FABRIC_LOGGING_SPEC: "debug", + CORE_PEER_LOCALMSPID: "Org2MSP", + + FABRIC_CFG_PATH: "/etc/hyperledger/fabric", + CORE_PEER_TLS_ENABLED: "true", + ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + + CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", + CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, + CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, + ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + collectTransactionReceipts: true, + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: org1Env, + sshConfig, + logLevel, + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + const plugin = new PluginLedgerConnectorFabric(pluginOptions); + + const listenOptions: IListenOptions = { + hostname: "localhost", + port: 0, + server, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { port } = addressInfo; + + await plugin.getOrCreateWebServices(); + await plugin.registerWebServices(expressApp); + const apiUrl = `http://localhost:${port}`; + + const config = new Configuration({ basePath: apiUrl }); + + const apiClient = new FabricApi(config); + + // Setup: contract name + const contractName = "basic-asset-transfer-2"; + + // Setup: contract directory + const contractRelPath = "go/basic-asset-transfer/chaincode-typescript"; + const contractDir = path.join( + __dirname, + alternativeFixturesPath, + contractRelPath, + ); + const sourceFiles: FileBase64[] = []; + // Setup: push files + { + const filename = "./tslint.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./asset.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./assetTransfer.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + // Setup: Deploy smart contract + const res = await apiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + // constructorArgs: { Args: ["john", "99"] }, + sourceFiles, + ccName: contractName, + targetOrganizations: [org1Env, org2Env], + caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, + ccLabel: "basic-asset-transfer-2", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { success } = res.data; + t.assert(success); + t.assert(res.status === 200); + + const contractNameBesu = "LockAsset"; + + const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); + const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); + + /** + * Constant defining the standard 'dev' Besu genesis.json contents. + * + * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json + */ + const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); + const besuKeyPair = { + privateKey: besuTestLedger.getGenesisAccountPrivKey(), + }; + + const web3 = new Web3(rpcApiHttpHost); + const testEthAccount = web3.eth.accounts.create(uuidv4()); + + const keychainEntryKeyBesu = uuidv4(); + const keychainEntryValueBesu = testEthAccount.privateKey; + const keychainPluginBesu = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + // pre-provision keychain with mock backend holding the private key of the + // test account that we'll reference while sending requests with the + // signing credential pointing to this keychain entry. + backend: new Map([[keychainEntryKeyBesu, keychainEntryValueBesu]]), + logLevel, + }); + keychainPluginBesu.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + const factory = new PluginFactoryLedgerConnector({ + pluginImportType: PluginImportType.Local, + }); + const connector: PluginLedgerConnectorBesu = await factory.create({ + collectTransactionReceipts: true, + rpcApiHttpHost, + rpcApiWsHost, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPluginBesu] }), + }); + + const balance = await web3.eth.getBalance(testEthAccount.address); + t.ok(balance); + + const deployOut = await connector.deployContract({ + keychainId: keychainPluginBesu.getKeychainId(), + contractName: LockAssetContractJson.contractName, + contractAbi: LockAssetContractJson.abi, + constructorArgs: [], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: LockAssetContractJson.bytecode, + gas: 1000000, + }); + t.ok(deployOut); + t.ok(deployOut.transactionReceipt); + + const setupInfraTimeEnd = new Date(); + log.debug( + `EVAL-testFile-SETUP-INFRA:${ + setupInfraTimeEnd.getTime() - setupInfraTime.getTime() + }`, + ); + + const timeStartSendMessages = new Date(); + + await connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: testEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + const { success: createRes } = await connector.invokeContract({ + caseID: "FABRIC_BESU", + contractName: contractNameBesu, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1", 5], + signingCredential: { + ethAccount: testEthAccount.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + t.ok(createRes); + t.assert(createRes === true); + log.warn("create ok"); + const { success: lockRes } = await connector.invokeContract({ + caseID: "FABRIC_BESU", + contractName: contractNameBesu, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1"], + signingCredential: { + ethAccount: testEthAccount.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + log.warn("checking lock res"); + t.ok(lockRes); + const assetId = "asset1"; + const assetOwner = "owner1"; + + const createResFabric = await apiClient.runTransactionV1({ + caseID: "FABRIC_BESU", + contractName, + channelName, + params: [assetId, "Green", "19", assetOwner, "9999"], + methodName: "MintAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId, + keychainRef: keychainEntryKey, + }, + }); + t.ok(createResFabric); + + // READS are not considered transactions, but are relevant to our use case + /* + const getRes = await apiClient.runTransactionV1({ + caseID: "FABRIC_BESU", + contractName, + channelName, + params: [assetId], + methodName: "ReadAsset", + invocationType: FabricContractInvocationType.Call, + signingCredential: { + keychainId, + keychainRef: keychainEntryKey, + }, + }); + expect(getRes).toBeDefined(); + */ + + // Setup: transact + const transferAssetRes = await apiClient.runTransactionV1({ + caseID: "FABRIC_BESU", + contractName, + channelName, + params: [assetId, "owner2"], + methodName: "TransferAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId, + keychainRef: keychainEntryKey, + }, + }); + t.ok(transferAssetRes); + // Setup: transact + const transferAssetBackRes = await apiClient.runTransactionV1({ + caseID: "FABRIC_BESU", + contractName, + channelName, + params: [assetId, "owner1"], + methodName: "TransferAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId, + keychainRef: keychainEntryKey, + }, + }); + t.ok(transferAssetBackRes); + // Setup: transact + const burnAssetRes = await apiClient.runTransactionV1({ + caseID: "FABRIC_BESU", + contractName, + channelName, + params: [assetId], + methodName: "BurnAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId, + keychainRef: keychainEntryKey, + }, + }); + t.ok(burnAssetRes); + + // Initialize our plugin + t.ok(cctxViz); + log.info("cctxviz plugin is ok"); + const endTimeSendMessages = new Date(); + log.debug( + `EVAL-testFile-SEND-MESSAGES:${ + endTimeSendMessages.getTime() - timeStartSendMessages.getTime() + }`, + ); + const timeStartPollReceipts = new Date(); + await cctxViz.pollTxReceipts(); + await cctxViz.hasProcessedXMessages(6, 4); + + const endTimePollReceipts = new Date(); + const totalTimePoll = + endTimePollReceipts.getTime() - timeStartPollReceipts.getTime(); + log.debug(`EVAL-testFile-POLL:${totalTimePoll}`); + + // Number of messages on queue: 0 + t.assert(cctxViz.numberUnprocessedReceipts > 1); + t.assert(cctxViz.numberEventsLog === 0); + + await cctxViz.txReceiptToCrossChainEventLogEntry(); + + // Number of messages on queue: 0 + t.assert(cctxViz.numberUnprocessedReceipts === 0); + t.assert(cctxViz.numberEventsLog > 1); + + await cctxViz.persistCrossChainLogCsv("use-case-besu-fabric-6-events"); + + const startTimeAggregate = new Date(); + await cctxViz.aggregateCcTx(); + const endTimeAggregate = new Date(); + log.debug( + `EVAL-testFile-AGGREGATE-CCTX:${ + endTimeAggregate.getTime() - startTimeAggregate.getTime() + }`, + ); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts new file mode 100644 index 0000000000..ac4489260a --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts @@ -0,0 +1,39 @@ +import test, { Test } from "tape-promise/tape"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; +import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; + +const testCase = "Instantiate plugin"; +const logLevel: LogLevelDesc = "TRACE"; + +test("BEFORE " + testCase, async (t: Test) => { + const pruning = pruneDockerAllIfGithubAction({ logLevel }); + await t.doesNotReject(pruning, "Pruning didn't throw OK"); + t.end(); +}); + +test(testCase, async (t: Test) => { + const options = { + publishAllPorts: true, + port: 5672, + logLevel: logLevel, + imageName: "rabbitmq", + imageTag: "3.9-management", + emitContainerLogs: true, + envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), + }; + + const testServer = new RabbitMQTestServer(options); + const tearDown = async () => { + await testServer.stop(); + // Destruction occurs when the RabbitMQ stops and has no listening connections + //await testServer.destroy(); + await pruneDockerAllIfGithubAction({ logLevel }); + }; + + test.onFinish(tearDown); + await testServer.start(); + t.ok(testServer); + //await new Promise((resolve) => setTimeout(resolve, 3000)); + t.end(); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/tsconfig.json b/packages/cactus-plugin-cc-tx-visualization/tsconfig.json new file mode 100644 index 0000000000..937bea6bb9 --- /dev/null +++ b/packages/cactus-plugin-cc-tx-visualization/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./dist/lib/", + "declarationDir": "dist/types", + "rootDir": "./src", + "tsBuildInfoFile": "../../.build-cache/cactus-plugin-cc-tx-visualization.tsbuildinfo" + }, + "include": [ + "./src", + "./src/test/solidity/*.json", + ], + "references": [ + { + "path": "../cactus-common/tsconfig.json" + }, + { + "path": "../cactus-core/tsconfig.json" + }, + { + "path": "../cactus-core-api/tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json index 545d518403..3c23f13355 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json @@ -841,6 +841,18 @@ ], "additionalProperties": false, "properties": { + "caseID": { + "type": "string", + "nullable": false + }, + "cost": { + "type": "number", + "nullable": false + }, + "carbonFootprint": { + "type": "string", + "nullable": false + }, "contractName": { "type": "string", "nullable": false diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts index 31cb240ce2..95b644d582 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -714,6 +714,24 @@ export interface GetTransactionV1Response { * @interface InvokeContractV1Request */ export interface InvokeContractV1Request { + /** + * + * @type {string} + * @memberof InvokeContractV1Request + */ + 'caseID'?: string; + /** + * + * @type {number} + * @memberof InvokeContractV1Request + */ + 'cost'?: number; + /** + * + * @type {string} + * @memberof InvokeContractV1Request + */ + 'carbonFootprint'?: string; /** * * @type {string} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts index 36aca2bcae..b29f378aac 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts @@ -30,6 +30,7 @@ import { ICactusPluginOptions, IPluginGrpcService, IGrpcSvcDefAndImplPair, + LedgerType, } from "@hyperledger/cactus-core-api"; import { @@ -105,6 +106,13 @@ import { transactV1Impl } from "./impl/transact-v1/transact-v1-impl"; import { deployContractV1Keychain } from "./impl/deploy-contract-v1/deploy-contract-v1-keychain"; import { deployContractV1NoKeychain } from "./impl/deploy-contract-v1/deploy-contract-v1-no-keychain"; +//cc-tx-viz +import * as amqp from "amqp-ts"; +import { + BesuV2TxReceipt, + IsVisualizable, +} from "@hyperledger/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt"; + export const E_KEYCHAIN_NOT_FOUND = "cactus.connector.besu.keychain_not_found"; export interface IPluginLedgerConnectorBesuOptions @@ -114,6 +122,10 @@ export interface IPluginLedgerConnectorBesuOptions pluginRegistry: PluginRegistry; prometheusExporter?: PrometheusExporter; logLevel?: LogLevelDesc; + collectTransactionReceipts?: boolean; + persistMessages?: boolean; + queueId?: string; + eventProvider?: string; } export class PluginLedgerConnectorBesu @@ -126,7 +138,7 @@ export class PluginLedgerConnectorBesu >, ICactusPlugin, IPluginGrpcService, - IPluginWebService + IPluginWebService //, IsVisualizable //cc-tx-viz { private readonly instanceId: string; public prometheusExporter: PrometheusExporter; @@ -139,10 +151,17 @@ export class PluginLedgerConnectorBesu private contracts: { [name: string]: Contract; } = {}; - private endpoints: IWebServiceEndpoint[] | undefined; - public static readonly CLASS_NAME = "PluginLedgerConnectorBesu"; + public transactionReceipts: any[] = []; + public collectTransactionReceipts: boolean; + + private amqpConnection: amqp.Connection | undefined; + private amqpQueue: amqp.Queue | undefined; + private amqpExchange: amqp.Exchange | undefined; + public readonly persistMessages: boolean | undefined; + public readonly queueId: string | undefined; + public readonly eventProvider: string | undefined; public get className(): string { return PluginLedgerConnectorBesu.CLASS_NAME; @@ -174,8 +193,29 @@ export class PluginLedgerConnectorBesu this.prometheusExporter, `${fnTag} options.prometheusExporter`, ); - this.prometheusExporter.startMetricsCollection(); + + //Visualization part + this.collectTransactionReceipts = + options.collectTransactionReceipts || false; + if (this.collectTransactionReceipts) { + this.eventProvider = options.eventProvider || "amqp://localhost"; + this.log.debug("Initializing connection to RabbitMQ"); + this.amqpConnection = new amqp.Connection(this.eventProvider); + this.log.info("Connection to RabbitMQ server initialized"); + const queue = options.queueId || "cc-tx-viz-queue"; + this.queueId = queue; + this.persistMessages = options.persistMessages || false; + this.amqpExchange = this.amqpConnection.declareExchange( + `cc-tx-viz-exchange`, + "direct", + { durable: this.persistMessages }, + ); + this.amqpQueue = this.amqpConnection.declareQueue(this.queueId, { + durable: this.persistMessages, + }); + this.amqpQueue.bind(this.amqpExchange); + } } public getOpenApiSpec(): unknown { @@ -192,6 +232,11 @@ export class PluginLedgerConnectorBesu return res; } + public closeConnection(): Promise { + this.log.info("Closing Amqp connection"); + return this.amqpConnection?.close(); + } + public getInstanceId(): string { return this.instanceId; } @@ -428,6 +473,7 @@ export class PluginLedgerConnectorBesu req: InvokeContractV1Request, ): Promise { const fnTag = `${this.className}#invokeContract()`; + const startTimeToTransaction = new Date(); const contractName = req.contractName; let contractInstance: Contract; @@ -458,7 +504,6 @@ export class PluginLedgerConnectorBesu const web3SigningCredential = req.signingCredential as | Web3SigningCredentialPrivateKeyHex | Web3SigningCredentialCactusKeychainRef; - const receipt = await this.transact({ transactionConfig: { data: `0x${contractJSON.bytecode}`, @@ -474,7 +519,6 @@ export class PluginLedgerConnectorBesu web3SigningCredential, privateTransactionConfig: req.privateTransactionConfig, }); - const address = { address: receipt.transactionReceipt.contractAddress, }; @@ -497,7 +541,6 @@ export class PluginLedgerConnectorBesu `${fnTag} Cannot invoke a contract without contract instance, the keychainId param is needed`, ); } - contractInstance = this.contracts[contractName]; if (req.contractAbi != undefined) { let abi; @@ -606,6 +649,47 @@ export class PluginLedgerConnectorBesu const out = await this.transact(txReq); const success = out.transactionReceipt.status; const data = { success, out }; + const endTimeToTransaction = new Date(); + this.log.debug( + `EVAL-${this.className}-ISSUE-TRANSACTION:${ + endTimeToTransaction.getTime() - startTimeToTransaction.getTime() + }`, + ); + + if (this.collectTransactionReceipts) { + const startTimeBesuReceipt = new Date(); + const extendedReceipt: BesuV2TxReceipt = { + caseID: req.caseID || "BESU_TBD", + blockchainID: LedgerType.Besu2X, + invocationType: req.invocationType, + methodName: req.methodName, + parameters: req.params, + timestamp: new Date(), + contractName: req.contractName, + status: out.transactionReceipt.status, + transactionHash: out.transactionReceipt.transactionHash, + transactionIndex: out.transactionReceipt.transactionIndex, + blockNumber: out.transactionReceipt.blockNumber, + blockHash: out.transactionReceipt.blockHash, + gasPrice: req.gasPrice, + gas: req.gas, + from: out.transactionReceipt.from, + to: out.transactionReceipt.to, + value: req.value, + gasUsed: out.transactionReceipt.gasUsed, + keychainID: req.keychainId, + signingCredentials: req.signingCredential, + }; + const txReceipt = new amqp.Message(extendedReceipt); + this.amqpQueue?.send(txReceipt); + const endTimeBesuReceipt = new Date(); + this.log.debug(`Sent transaction receipt to queue ${this.queueId}`); + this.log.debug( + `EVAL-${this.className}-GENERATE-AND-CAPTURE-RECEIPT:${ + endTimeBesuReceipt.getTime() - startTimeBesuReceipt.getTime() + }`, + ); + } return data; } else { throw new Error( diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json index ca384261e4..b3a37d784a 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json @@ -414,6 +414,18 @@ "nullable": false } }, + "cost":{ + "type": "number", + "nullable": false + }, + "carbonFootprint":{ + "type": "string", + "nullable": false + }, + "caseID":{ + "type": "string", + "nullable": false + }, "transientData": { "type": "object", "nullable": true diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts index 4ba11dde84..74f7ec2d44 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -1365,6 +1365,24 @@ export interface RunTransactionRequest { * @memberof RunTransactionRequest */ 'endorsingOrgs'?: Array; + /** + * + * @type {number} + * @memberof RunTransactionRequest + */ + cost?: number; + /** + * + * @type {string} + * @memberof RunTransactionRequest + */ + carbonFootprint?: string; + /** + * + * @type {string} + * @memberof RunTransactionRequest + */ + caseID?: string; /** * * @type {object} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts index b0f2fe0c07..2983e2031c 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts @@ -1,3 +1,4 @@ +/* eslint-disable prettier/prettier */ import fs from "fs"; import path from "path"; import { v4 as uuidv4 } from "uuid"; @@ -46,6 +47,7 @@ import { IWebServiceEndpoint, ICactusPlugin, ICactusPluginOptions, + LedgerType, } from "@hyperledger/cactus-core-api"; import { @@ -147,6 +149,7 @@ import { formatCactiFullBlockResponse, formatCactiTransactionsBlockResponse, } from "./get-block/cacti-block-formatters"; + import { GetBlockEndpointV1 } from "./get-block/get-block-endpoint-v1"; import { GetChainInfoEndpointV1 } from "./get-chain-info/get-chain-info-endpoint-v1"; import { querySystemChainCode } from "./common/query-system-chain-code"; @@ -162,6 +165,10 @@ import { deployContractGoSourceImplFabricV256 } from "./deploy-contract-go-sourc const { loadFromConfig } = require("fabric-network/lib/impl/ccp/networkconfig"); assertFabricFunctionIsAvailable(loadFromConfig, "loadFromConfig"); +//cc-tx-viz +import * as amqp from "amqp-ts"; +import {FabricV2TxReceipt, IsVisualizable} from "@hyperledger/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt"; + /** * Constant value holding the default $GOPATH in the Fabric CLI container as * observed on fabric deployments that are produced by the official examples @@ -199,6 +206,12 @@ export interface IPluginLedgerConnectorFabricOptions vaultConfig?: IVaultConfig; webSocketConfig?: IWebSocketConfig; signCallback?: SignPayloadCallback; + + //cc-tx-viz + collectTransactionReceipts?: boolean; + persistMessages?: boolean; + queueId?: string; + eventProvider?: string; } export class PluginLedgerConnectorFabric @@ -209,6 +222,7 @@ export class PluginLedgerConnectorFabric RunTransactionRequest, RunTransactionResponse >, + IsVisualizable, ICactusPlugin, IPluginWebService { @@ -225,6 +239,15 @@ export class PluginLedgerConnectorFabric private readonly certStore: CertDatastore; private readonly sshDebugOn: boolean; private runningWatchBlocksMonitors = new Set(); + + //cc-tx-viz + private amqpConnection: amqp.Connection | undefined; + private amqpQueue: amqp.Queue | undefined; + private amqpExchange: amqp.Exchange | undefined; + public readonly collectTransactionReceipts: boolean; + public readonly persistMessages: boolean | undefined; + public readonly queueId: string | undefined; + public readonly eventProvider: string | undefined; public get className(): string { return PluginLedgerConnectorFabric.CLASS_NAME; @@ -238,7 +261,7 @@ export class PluginLedgerConnectorFabric constructor(public readonly opts: IPluginLedgerConnectorFabricOptions) { const fnTag = `${this.className}#constructor()`; Checks.truthy(opts, `${fnTag} arg options`); - Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); + //Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); Checks.truthy(opts.peerBinary, `${fnTag} options.peerBinary`); Checks.truthy(opts.pluginRegistry, `${fnTag} options.pluginRegistry`); Checks.truthy(opts.connectionProfile, `${fnTag} options.connectionProfile`); @@ -283,6 +306,27 @@ export class PluginLedgerConnectorFabric } this.signCallback = opts.signCallback; + + //cc-tx-viz + // Visualization part + this.collectTransactionReceipts = opts.collectTransactionReceipts || false; + if (this.collectTransactionReceipts) { + this.eventProvider = opts.eventProvider || "amqp://localhost"; + this.log.debug("Initializing connection to RabbitMQ"); + this.amqpConnection = new amqp.Connection(this.eventProvider); + this.log.info("Connection to RabbitMQ server initialized"); + const queue = this.opts.queueId || "cc-tx-viz-queue"; + this.queueId = queue; + this.persistMessages = this.opts.persistMessages || false; + this.amqpExchange = this.amqpConnection.declareExchange(`cc-tx-viz-exchange`, "direct", {durable: this.persistMessages}); + this.amqpQueue = this.amqpConnection.declareQueue(this.queueId, {durable: this.persistMessages}); + this.amqpQueue.bind(this.amqpExchange); + } + } + + public closeConnection(): Promise { + this.log.info("Closing Amqp connection"); + return this.amqpConnection?.close(); } public getOpenApiSpec(): unknown { @@ -303,6 +347,11 @@ export class PluginLedgerConnectorFabric this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); return res; } + + //TODO returns Promise + public async getTransactionReceiptsList(): Promise { + //returns list + } public getInstanceId(): string { return this.instanceId; @@ -1147,8 +1196,16 @@ export class PluginLedgerConnectorFabric public async transact( req: RunTransactionRequest, ): Promise { + //start transaction time + // const startTx = performance.now(); + + //start tx const fnTag = `${this.className}#transact()`; this.log.debug("%s ENTER", fnTag); + + //cc-tx-viz + const startTimeFabricReceipt = new Date(); + const { channelName, contractName, @@ -1215,9 +1272,33 @@ export class PluginLedgerConnectorFabric } const transientMap = this.toTransientMap(req.transientData); + + //cc-tx-viz + /* + const transientMap: TransientMap = transientData as TransientMap; + + try { + //Obtains and parses each component of transient data + for (const key in transientMap) { + transientMap[key] = Buffer.from( + JSON.stringify(transientMap[key]), + ); + } + } catch (ex) { + this.log.error(`Building transient map crashed: `, ex); + throw new Error( + `${fnTag} Unable to build the transient map: ${ex.message}`, + ); + } + */ + const transactionProposal = await contract.createTransaction(fnName); transactionProposal.setEndorsingPeers(endorsingTargets); out = await transactionProposal.setTransient(transientMap).submit(); + + //cc-tx-viz + //transactionId = transactionProposal.getTransactionId(); + //success = true; break; } default: { @@ -1225,7 +1306,74 @@ export class PluginLedgerConnectorFabric throw new Error(`${fnTag} unknown ${message}`); } } + //cc-tx-viz + /* + const endTimeFabricReceipt = new Date(); + this.log.debug(`EVAL-${this.className}-ISSUE-TRANSACTION:${endTimeFabricReceipt.getTime()-startTimeFabricReceipt.getTime()}`); + + // if we don't want to collect reads, than add condition && transactionId !== "" + if (this.collectTransactionReceipts) { + const startTimeFabricReceipt = new Date(); + const txParams = req.params; + //getTransactionReceiptByTxID requires 2 params in req.params => channelName and txID + req.params = []; + req.params[0] = req.channelName; + req.params[1] = transactionId; + //req.params get are stored in the basicTxReceipt rwsetWriteData + if (transactionId) { + const basicTxReceipt = await this.getTransactionReceiptByTxID(req); + const extendedReceipt: FabricV2TxReceipt={ + caseID: req.caseID || "FABRIC_TBD", + transactionID: transactionId, + blockchainID: LedgerType.Fabric2, + invocationType: req.invocationType, + methodName: req.methodName, + parameters: txParams, + timestamp: new Date(), + channelName: req.channelName, + contractName: req.contractName, + signingCredentials: req.signingCredential, + endorsingParties: req.endorsingParties, + endorsingPeers: req.endorsingPeers, + gatewayOptions: req.gatewayOptions, + transactionCreator: basicTxReceipt.transactionCreator, + transientData: req.transientData, + blockMetaData: basicTxReceipt.blockMetaData, + chainCodeName: basicTxReceipt.chainCodeName, + blockNumber: basicTxReceipt.blockNumber, + chainCodeVersion: basicTxReceipt.chainCodeVersion, + responseStatus: basicTxReceipt.responseStatus, + }; + const txReceipt = new amqp.Message(extendedReceipt); + this.amqpQueue?.send(txReceipt); + this.log.debug(`Sent extended transaction receipt to queue ${this.queueId}`); + } else { + const extendedReceipt: FabricV2TxReceipt={ + caseID: req.caseID || "FABRIC_TBD", + transactionID: undefined, + blockchainID: LedgerType.Fabric2, + invocationType: req.invocationType, + methodName: req.methodName, + parameters: txParams, + timestamp: new Date(), + channelName: req.channelName, + contractName: req.contractName, + signingCredentials: req.signingCredential, + endorsingParties: req.endorsingParties, + endorsingPeers: req.endorsingPeers, + gatewayOptions: req.gatewayOptions, + }; + const txReceipt = new amqp.Message(extendedReceipt); + this.amqpQueue?.send(txReceipt); + this.log.debug(`Sent simple transaction receipt to queue ${this.queueId}`); + } + const endTimeFabricReceipt = new Date(); + this.log.debug(`EVAL-${this.className}-GENERATE-AND-CAPTURE-RECEIPT:${endTimeFabricReceipt.getTime()-startTimeFabricReceipt.getTime()}`); + + } + const outUtf8 = out.toString("utf-8"); + */ const res: RunTransactionResponse = { functionOutput: this.convertToTransactionResponseType( out, @@ -1235,12 +1383,10 @@ export class PluginLedgerConnectorFabric }; gateway.disconnect(); this.log.debug(`transact() response: %o`, res); - this.prometheusExporter.addCurrentTransaction(); - return res; } catch (ex) { this.log.error(`transact() crashed: `, ex); - throw new Error(`${fnTag} Unable to run transaction: ${ex.message}`); + throw new Error(`${fnTag} Unable to run transaction: ${ex}`); } } @@ -1277,7 +1423,7 @@ export class PluginLedgerConnectorFabric return new FabricCAServices(caUrl, tlsOptions, caName); } catch (ex) { this.log.error(`createCaClient() Failure:`, ex); - throw new Error(`${fnTag} Inner Exception: ${ex?.message}`); + throw new Error(`${fnTag} Inner Exception: ${ex}`); } } @@ -1313,7 +1459,7 @@ export class PluginLedgerConnectorFabric return [x509Identity, wallet]; } catch (ex) { this.log.error(`enrollAdmin() Failure:`, ex); - throw new Error(`${fnTag} Exception: ${ex?.message}`); + throw new Error(`${fnTag} Exception: ${ex}`); } } /** diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts index a1933710c4..d46ca0c437 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts @@ -35,8 +35,6 @@ import { FabricSigningCredential, } from "../../../../main/typescript/public-api"; -import { K_CACTUS_FABRIC_TOTAL_TX_COUNT } from "../../../../main/typescript/prometheus-exporter/metrics"; - import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; import { DiscoveryOptions } from "fabric-network"; import { Configuration } from "@hyperledger/cactus-core-api"; @@ -231,25 +229,6 @@ describe(testCase, () => { expect(asset277.Owner).toEqual(assetOwner); } - { - const res = await apiClient.getPrometheusMetricsV1(); - const promMetricsOutput = - "# HELP " + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - " Total transactions executed\n" + - "# TYPE " + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - " gauge\n" + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - '{type="' + - K_CACTUS_FABRIC_TOTAL_TX_COUNT + - '"} 3'; - expect(res).toBeTruthy(); - expect(res.data).toBeTruthy(); - expect(res.status).toEqual(200); - expect(res.data.includes(promMetricsOutput)).toBeTrue(); - } - { const req: RunTransactionRequest = { signingCredential, diff --git a/packages/cactus-test-tooling/src/main/typescript/public-api.ts b/packages/cactus-test-tooling/src/main/typescript/public-api.ts index 6054d279b0..20dc2a615a 100755 --- a/packages/cactus-test-tooling/src/main/typescript/public-api.ts +++ b/packages/cactus-test-tooling/src/main/typescript/public-api.ts @@ -230,3 +230,5 @@ export { IBuildImageBesuAllInOneLatestResponse, buildImageBesuAllInOneLatest, } from "./corda/build-image-besu-all-in-one-latest"; + +export { RabbitMQTestServer } from "./rabbitmq-test-server/rabbit-mq-test-server"; diff --git a/packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts b/packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts new file mode 100644 index 0000000000..727f137c69 --- /dev/null +++ b/packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts @@ -0,0 +1,251 @@ +import type { EventEmitter } from "events"; +import { Optional } from "typescript-optional"; +import { RuntimeError } from "run-time-error"; +import type { Container, ContainerInfo } from "dockerode"; +import Docker from "dockerode"; +import { Logger, Checks, Bools } from "@hyperledger/cactus-common"; +import type { LogLevelDesc } from "@hyperledger/cactus-common"; +import { LoggerProvider } from "@hyperledger/cactus-common"; +import { Containers } from "../common/containers"; +import { Config as SshConfig } from "node-ssh"; + +export interface IRabbitMQTestServerOptions { + readonly publishAllPorts: boolean; + readonly port: number; + readonly logLevel?: LogLevelDesc; + readonly imageName?: string; + readonly imageTag?: string; + readonly emitContainerLogs?: boolean; + readonly envVars?: Map; +} + +export class RabbitMQTestServer { + public static readonly CLASS_NAME = "RabbitMQTestServer"; + + public readonly logLevel: LogLevelDesc; + public readonly imageName: string; + public readonly imageTag: string; + public readonly imageFqn: string; + public readonly log: Logger; + public readonly emitContainerLogs: boolean; + public readonly publishAllPorts: boolean; + public readonly envVars: Map; + public readonly port: number; + private _containerId: Optional; + + public get containerId(): Optional { + return this._containerId; + } + + public get container(): Optional { + const docker = new Docker(); + return this.containerId.isPresent() + ? Optional.ofNonNull(docker.getContainer(this.containerId.get())) + : Optional.empty(); + } + + public get className(): string { + return RabbitMQTestServer.CLASS_NAME; + } + + constructor(public readonly opts: IRabbitMQTestServerOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(opts, `${fnTag} arg options`); + + this.publishAllPorts = opts.publishAllPorts; + this._containerId = Optional.empty(); + this.imageName = opts.imageName || "rabbitmq"; + this.port = opts.port || 5672; + this.imageTag = opts.imageTag || "3.9-management"; + this.imageFqn = `${this.imageName}:${this.imageTag}`; + this.envVars = opts.envVars || new Map(); + this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) + ? (opts.emitContainerLogs as boolean) + : true; + + this.logLevel = opts.logLevel || "INFO"; + + const level = this.logLevel; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + + this.log.debug(`Created instance of ${this.className} OK`); + } + public getContainerImageName(): string { + return `${this.imageName}:${this.imageTag}`; + } + public async start(omitPull = false): Promise { + const startTime = new Date(); + const docker = new Docker(); + if (this.containerId.isPresent()) { + this.log.warn(`Container ID provided. Will not start new one.`); + const container = docker.getContainer(this.containerId.get()); + return container; + } + if (!omitPull) { + this.log.debug(`Pulling image ${this.imageFqn}...`); + await Containers.pullImage(this.imageFqn); + this.log.debug(`Pulled image ${this.imageFqn} OK`); + } + + const dockerEnvVars: string[] = new Array(...this.envVars).map( + (pairs) => `${pairs[0]}=${pairs[1]}`, + ); + + // TODO: dynamically expose ports for custom port mapping + const createOptions = { + Env: dockerEnvVars, + + /* + Healthcheck: { + Test: ["CMD-SHELL", `rabbitmq-diagnostics -q ping`], + Interval: 1000000000, // 1 second + Timeout: 3000000000, // 3 seconds + Retries: 10, + StartPeriod: 1000000000, // 1 second + }, + */ + + ExposedPorts: { + "5672/tcp": {}, // Default port for RabbitMQ + "7235/tcp": {}, // Default port for RabbitMQ + }, + HostConfig: { + AutoRemove: true, + PublishAllPorts: this.publishAllPorts, + Privileged: false, + PortBindings: { + "5672/tcp": [{ HostPort: "5672" }], + "7235/tcp": [{ HostPort: "7235" }], + }, + }, + }; + + this.log.debug(`Starting ${this.imageFqn} with options: `, createOptions); + + return new Promise((resolve, reject) => { + const eventEmitter: EventEmitter = docker.run( + this.imageFqn, + [], + [], + createOptions, + {}, + (err: Error) => { + if (err) { + const errorMessage = `Failed to start container ${this.imageFqn}`; + const exception = new RuntimeError(errorMessage, err); + this.log.error(exception); + reject(exception); + } + }, + ); + + eventEmitter.once("start", async (container: Container) => { + const { id } = container; + this.log.debug(`Started ${this.imageFqn} successfully. ID=${id}`); + this._containerId = Optional.ofNonNull(id); + + if (this.emitContainerLogs) { + const logOptions = { follow: true, stderr: true, stdout: true }; + const logStream = await container.logs(logOptions); + logStream.on("data", (data: Buffer) => { + const fnTag = `[${this.imageFqn}]`; + this.log.debug(`${fnTag} %o`, data.toString("utf-8")); + }); + } + this.log.debug(`Registered container log stream callbacks OK`); + + try { + this.log.debug(`Starting to wait for healthcheck... `); + await this.waitForHealthCheck(); + this.log.debug(`Healthcheck passed OK`); + const finalTime = new Date(); + this.log.debug( + `EVAL-SETUP-INIT-RABBIT-MQ-SERVER:${ + finalTime.getTime() - startTime.getTime() + }`, + ); + resolve(container); + } catch (ex) { + this.log.error(ex); + reject(ex); + } + }); + }); + } + + public async waitForHealthCheck(timeoutMs = 180000): Promise { + const fnTag = "FabricTestLedgerV1#waitForHealthCheck()"; + const startedAt = Date.now(); + let reachable = false; + do { + try { + const { State } = await this.getContainerInfo(); + reachable = State === "running"; + } catch (ex) { + reachable = false; + if (Date.now() >= startedAt + timeoutMs) { + throw new Error(`${fnTag} timed out (${timeoutMs}ms) -> ${ex.stack}`); + } + } + await new Promise((resolve2) => setTimeout(resolve2, 1000)); + } while (!reachable); + } + public async stop(): Promise { + return Containers.stop(this.container.get()); + } + + public async destroy(): Promise { + if (!this.container.get()) { + return; + } + return this.container.get().remove(); + } + + public async getContainerIpAddress(): Promise { + const containerInfo = await this.getContainerInfo(); + return Containers.getContainerInternalIp(containerInfo); + } + + // TODO + public async getSshConfig(): Promise { + const fnTag = "RabbitMQTestServer#getSshConfig()"; + if (!this.container) { + throw new Error(`${fnTag} - invalid state no container instance set`); + } + const filePath = "/etc/hyperledger/cactus/fabric-aio-image.key"; + const privateKey = await Containers.pullFile( + (this.container as unknown) as Container, + filePath, + ); + const containerInfo = await this.getContainerInfo(); + const port = await Containers.getPublicPort(22, containerInfo); + const sshConfig: SshConfig = { + host: "localhost", + privateKey, + username: "root", + port, + }; + return sshConfig; + } + + protected async getContainerInfo(): Promise { + const fnTag = `${this.className}#getContainerInfo()`; + const docker = new Docker(); + const image = this.getContainerImageName(); + const containerInfos = await docker.listContainers({}); + + let aContainerInfo; + if (this.containerId !== undefined) { + aContainerInfo = containerInfos.find( + (ci) => ci.Id == this.containerId.get(), + ); + } + + if (aContainerInfo) { + return aContainerInfo; + } else { + throw new Error(`${fnTag} no image "${image}"`); + } + } +} diff --git a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts index dfbb33ac09..6ab025f3fa 100644 --- a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts +++ b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts @@ -80,7 +80,7 @@ export function connectTestClient(socket: ClientSocket): Promise { socket.on("connect_timeout", errorHandlerFactory("connect_timeout")); socket.on("connect", () => { - socket.removeAllListeners(); + //socket.removeAllListeners(); resolve(socket); }); }); diff --git a/tsconfig.json b/tsconfig.json index a9e8e7d6eb..57f3ced284 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -133,6 +133,9 @@ { "path": "./packages/cactus-test-verifier-client/tsconfig.json" }, + { + "path": "./packages/cactus-plugin-cc-tx-visualization/tsconfig.json" + }, { "path": "./examples/cactus-common-example-server/tsconfig.json" }, diff --git a/yarn.lock b/yarn.lock index bb1b2c0ccd..5b0f3eb303 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6028,6 +6028,13 @@ __metadata: languageName: node linkType: hard +"@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + "@commitlint/cli@npm:17.7.1": version: 17.7.1 resolution: "@commitlint/cli@npm:17.7.1" @@ -7946,23 +7953,23 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^2.5.0": - version: 2.6.4 - resolution: "@ethereumjs/common@npm:2.6.4" +"@ethereumjs/common@npm:^2.3.0, @ethereumjs/common@npm:^2.4.0, @ethereumjs/common@npm:^2.6.4": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" dependencies: crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.4" - checksum: 10/2dcd913e298c234ceb8d23aab9cb4ad5e6e14d426cf8c331ccf053cc68c70532c42d24ca86d4897321421b44126decd9738597bb634d86d69442ec9efa9f3725 + ethereumjs-util: "npm:^7.1.5" + checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 languageName: node linkType: hard -"@ethereumjs/common@npm:^2.6.4": - version: 2.6.5 - resolution: "@ethereumjs/common@npm:2.6.5" +"@ethereumjs/common@npm:^2.5.0": + version: 2.6.4 + resolution: "@ethereumjs/common@npm:2.6.4" dependencies: crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 + ethereumjs-util: "npm:^7.1.4" + checksum: 10/2dcd913e298c234ceb8d23aab9cb4ad5e6e14d426cf8c331ccf053cc68c70532c42d24ca86d4897321421b44126decd9738597bb634d86d69442ec9efa9f3725 languageName: node linkType: hard @@ -8011,7 +8018,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^3.3.2": +"@ethereumjs/tx@npm:^3.2.1, @ethereumjs/tx@npm:^3.3.2": version: 3.5.2 resolution: "@ethereumjs/tx@npm:3.5.2" dependencies: @@ -9003,6 +9010,16 @@ __metadata: languageName: node linkType: hard +"@grpc/grpc-js@npm:^1.3.4": + version: 1.12.2 + resolution: "@grpc/grpc-js@npm:1.12.2" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/0d0556da8515704b5e722b86097e04693d8c71ba286a076270a96e1ac3a4950e87559c718cc2875d3fcaa6cb8e07d0cc6b1db2673b8940829dfe8b75197844dd + languageName: node + linkType: hard + "@grpc/grpc-js@npm:~1.7.3": version: 1.7.3 resolution: "@grpc/grpc-js@npm:1.7.3" @@ -9047,6 +9064,21 @@ __metadata: languageName: node linkType: hard +"@grpc/proto-loader@npm:^0.6.2": + version: 0.6.13 + resolution: "@grpc/proto-loader@npm:0.6.13" + dependencies: + "@types/long": "npm:^4.0.1" + lodash.camelcase: "npm:^4.3.0" + long: "npm:^4.0.0" + protobufjs: "npm:^6.11.3" + yargs: "npm:^16.2.0" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/a881bea00a1ab1c8d50e4bdf106c7e74f905121116fbcda91b9688548da1267edf1302bb754164a6f60ece82a949a28cefc503bfe058ffc1531dc26fa5188df3 + languageName: node + linkType: hard + "@grpc/proto-loader@npm:^0.7.0": version: 0.7.7 resolution: "@grpc/proto-loader@npm:0.7.7" @@ -9090,7 +9122,7 @@ __metadata: languageName: node linkType: hard -"@hapi/topo@npm:^5.1.0": +"@hapi/topo@npm:^5.0.0, @hapi/topo@npm:^5.1.0": version: 5.1.0 resolution: "@hapi/topo@npm:5.1.0" dependencies: @@ -10626,6 +10658,7 @@ __metadata: "@types/sanitize-html": "npm:2.9.5" "@types/temp": "npm:0.9.1" "@types/uuid": "npm:10.0.0" + amqp-ts: "npm:1.8.0" axios: "npm:1.7.7" bl: "npm:6.0.16" bn.js: "npm:4.12.0" @@ -14463,6 +14496,13 @@ __metadata: languageName: node linkType: hard +"@panva/asn1.js@npm:^1.0.0": + version: 1.0.0 + resolution: "@panva/asn1.js@npm:1.0.0" + checksum: 10/e62b1218a8c57ee5b5432f5ac1c65d3fc5419a1d6a71517cdbe9b1b13d1576dcc9ea7a49437c14317aca1248d61fc71ef332a799c8177d7324690ae830b9a82c + languageName: node + linkType: hard + "@peculiar/asn1-schema@npm:^2.3.6": version: 2.3.8 resolution: "@peculiar/asn1-schema@npm:2.3.8" @@ -15555,7 +15595,7 @@ __metadata: languageName: node linkType: hard -"@sideway/address@npm:^4.1.5": +"@sideway/address@npm:^4.1.0, @sideway/address@npm:^4.1.5": version: 4.1.5 resolution: "@sideway/address@npm:4.1.5" dependencies: @@ -15564,7 +15604,7 @@ __metadata: languageName: node linkType: hard -"@sideway/formula@npm:^3.0.1": +"@sideway/formula@npm:^3.0.0, @sideway/formula@npm:^3.0.1": version: 3.0.1 resolution: "@sideway/formula@npm:3.0.1" checksum: 10/8d3ee7f80df4e5204b2cbe92a2a711ca89684965a5c9eb3b316b7051212d3522e332a65a0bb2a07cc708fcd1d0b27fcb30f43ff0bcd5089d7006c7160a89eefe @@ -17265,6 +17305,18 @@ __metadata: languageName: node linkType: hard +"@types/express@npm:4.17.8": + version: 4.17.8 + resolution: "@types/express@npm:4.17.8" + dependencies: + "@types/body-parser": "npm:*" + "@types/express-serve-static-core": "npm:*" + "@types/qs": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/ca265de4f9deb7eea2babd66d7f4069ca49202b69db48fb2e805998a8574ac1d186989de7920e66d4a97740228205f62f8c5821283756cf55bb2115ca2f5b901 + languageName: node + linkType: hard + "@types/express@npm:5.0.0": version: 5.0.0 resolution: "@types/express@npm:5.0.0" @@ -17557,6 +17609,13 @@ __metadata: languageName: node linkType: hard +"@types/json-stable-stringify@npm:1.0.32": + version: 1.0.32 + resolution: "@types/json-stable-stringify@npm:1.0.32" + checksum: 10/04e454947ddd7cbe468c218379dc7832ed949dd921719f7147daac4e3f8d31a89c48ecec265a1283d62bcfc27a3996b7f61565b507b78d2f3aa129f8d3ed5e90 + languageName: node + linkType: hard + "@types/json-stable-stringify@npm:1.0.33": version: 1.0.33 resolution: "@types/json-stable-stringify@npm:1.0.33" @@ -17860,7 +17919,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.6": +"@types/node@npm:^12.12.6, @types/node@npm:^12.7.2": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: 10/1f916a06fff02faadb09a16ed6e31820ce170798b202ef0b14fc244bfbd721938c54a3a99836e185e4414ca461fe96c5bb5c67c3d248f153555b7e6347f061dd @@ -18470,6 +18529,13 @@ __metadata: languageName: node linkType: hard +"@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + "@types/trusted-types@npm:^2.0.2": version: 2.0.3 resolution: "@types/trusted-types@npm:2.0.3" @@ -18500,6 +18566,13 @@ __metadata: languageName: node linkType: hard +"@types/uuid@npm:8.3.0": + version: 8.3.0 + resolution: "@types/uuid@npm:8.3.0" + checksum: 10/0f46b15020b9c252473fb327a6491fd7d238c7b5bbaebd32195a0de178db040f6abb96902507ba25dd4a673cdd9cc28b8880512dba54561e8bc60d8f326c1e30 + languageName: node + linkType: hard + "@types/validator@npm:^13.11.8": version: 13.12.2 resolution: "@types/validator@npm:13.12.2" @@ -19556,7 +19629,7 @@ __metadata: languageName: node linkType: hard -"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.8": +"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.7, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" dependencies: @@ -19930,6 +20003,30 @@ __metadata: languageName: node linkType: hard +"amqp-ts@npm:1.8.0": + version: 1.8.0 + resolution: "amqp-ts@npm:1.8.0" + dependencies: + "@types/node": "npm:^12.7.2" + amqplib: "npm:^0.4.1" + bluebird: "npm:^3.3.5" + winston: "npm:^2.2.0" + checksum: 10/70c3970a224e69fa8dcaf22375fac75f5477f9303efd61be1349044676a14a03ff54f308374178b2a26fd7209c001c7a865a43cd379fb4736d4e8caf10ede493 + languageName: node + linkType: hard + +"amqplib@npm:^0.4.1": + version: 0.4.2 + resolution: "amqplib@npm:0.4.2" + dependencies: + bitsyntax: "npm:~0.0.4" + buffer-more-ints: "npm:0.0.2" + readable-stream: "npm:1.x >=1.1.9" + when: "npm:~3.6.2" + checksum: 10/b326f5225c41ca96b97e6bf80325ba1eb27cc39d30476509882345753b167b262d08b7f3f82304c80e155833134a52c871a2f694cc65c8d3beba74f9ec078e87 + languageName: node + linkType: hard + "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -20850,7 +20947,14 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.4.0": +"async@npm:^1.4.0": + version: 1.5.2 + resolution: "async@npm:1.5.2" + checksum: 10/8afcdcee05168250926a3e7bd4dfaa74b681a74f634bae2af424fb716042461cbd20a375d9bc2534daa50a2d45286c9b174952fb239cee4ab8d6351a40c65327 + languageName: node + linkType: hard + +"async@npm:^2.4.0, async@npm:^2.6.4": version: 2.6.4 resolution: "async@npm:2.6.4" dependencies: @@ -21630,6 +21734,15 @@ __metadata: languageName: node linkType: hard +"bitsyntax@npm:~0.0.4": + version: 0.0.4 + resolution: "bitsyntax@npm:0.0.4" + dependencies: + buffer-more-ints: "npm:0.0.2" + checksum: 10/dcc206593a1ad7cb77230764544e5dde8b0a26dd480117d96b2e4ed4bf37542c0e73f0ecfc8b084c3690c861ef1f2be69273eeb95c55a9a48b7afc0a63a55418 + languageName: node + linkType: hard + "bl@npm:6.0.16": version: 6.0.16 resolution: "bl@npm:6.0.16" @@ -21688,7 +21801,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:3.7.2, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": +"bluebird@npm:3.7.2, bluebird@npm:^3.3.5, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 @@ -21723,6 +21836,24 @@ __metadata: languageName: node linkType: hard +"body-parser@npm:1.19.0": + version: 1.19.0 + resolution: "body-parser@npm:1.19.0" + dependencies: + bytes: "npm:3.1.0" + content-type: "npm:~1.0.4" + debug: "npm:2.6.9" + depd: "npm:~1.1.2" + http-errors: "npm:1.7.2" + iconv-lite: "npm:0.4.24" + on-finished: "npm:~2.3.0" + qs: "npm:6.7.0" + raw-body: "npm:2.4.0" + type-is: "npm:~1.6.17" + checksum: 10/6ed5f3f42f3038301673d90ea1616f7670e78795018904cf581d361523bfa24a7b6d998015d9cdd02668cd70e85d8b3b4b40023e4128e8aec1ddaf6ed1693dc1 + languageName: node + linkType: hard + "body-parser@npm:1.20.1": version: 1.20.1 resolution: "body-parser@npm:1.20.1" @@ -22207,6 +22338,13 @@ __metadata: languageName: node linkType: hard +"buffer-more-ints@npm:0.0.2": + version: 0.0.2 + resolution: "buffer-more-ints@npm:0.0.2" + checksum: 10/8daf486048e9fa6462463404147472a87ddbc82e95a96dd2adf7b9eca14ff81019f62acbe597bc8f72707946e5b8cb994ea41ec66bf7a1b2021d905321c44910 + languageName: node + linkType: hard + "buffer-reverse@npm:^1.0.1": version: 1.0.1 resolution: "buffer-reverse@npm:1.0.1" @@ -22346,6 +22484,13 @@ __metadata: languageName: node linkType: hard +"bytes@npm:3.1.0": + version: 3.1.0 + resolution: "bytes@npm:3.1.0" + checksum: 10/7c3b21c5d9d44ed455460d5d36a31abc6fa2ce3807964ba60a4b03fd44454c8cf07bb0585af83bfde1c5cc2ea4bbe5897bc3d18cd15e0acf25a3615a35aba2df + languageName: node + linkType: hard + "bytes@npm:3.1.2": version: 3.1.2 resolution: "bytes@npm:3.1.2" @@ -23170,6 +23315,13 @@ __metadata: languageName: node linkType: hard +"class-transformer@npm:^0.3.1": + version: 0.3.1 + resolution: "class-transformer@npm:0.3.1" + checksum: 10/36f6289d8e48bbbf3f042e1eb8d64391e9bae2465211ac0db8a4cda64fda84275325b4d0013a0cded8f28225e199ef591cc10de3612916efc9de1e6d2ced78c1 + languageName: node + linkType: hard + "class-utils@npm:^0.3.5": version: 0.3.6 resolution: "class-utils@npm:0.3.6" @@ -23977,6 +24129,15 @@ __metadata: languageName: node linkType: hard +"content-disposition@npm:0.5.3": + version: 0.5.3 + resolution: "content-disposition@npm:0.5.3" + dependencies: + safe-buffer: "npm:5.1.2" + checksum: 10/7d0df7855b0202c02d083767258c7baae5cfc2664181de8abccca1b06aa6cc127d15a0f9f45409683a7b58e42af6dcb2ba46201071ce4225ae3980b2a55f58cd + languageName: node + linkType: hard + "content-disposition@npm:0.5.4, content-disposition@npm:^0.5.3": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" @@ -24452,6 +24613,17 @@ __metadata: languageName: node linkType: hard +"cpu-features@npm:~0.0.10": + version: 0.0.10 + resolution: "cpu-features@npm:0.0.10" + dependencies: + buildcheck: "npm:~0.0.6" + nan: "npm:^2.19.0" + node-gyp: "npm:latest" + checksum: 10/941b828ffe77582b2bdc03e894c913e2e2eeb5c6043ccb01338c34446d026f6888dc480ecb85e684809f9c3889d245f3648c7907eb61a92bdfc6aed039fcda8d + languageName: node + linkType: hard + "cpu-features@npm:~0.0.8": version: 0.0.8 resolution: "cpu-features@npm:0.0.8" @@ -25214,6 +25386,13 @@ __metadata: languageName: node linkType: hard +"csv-stringify@npm:6.0.5": + version: 6.0.5 + resolution: "csv-stringify@npm:6.0.5" + checksum: 10/d3c0d2f291a06d3c47bc72be30271ad9169df17b166b6d87fb8dea0c35094aa16afd17a3c86ca4fe91e984540c1de480535ea40e4cc33a85111843deaec0a6ff + languageName: node + linkType: hard + "cycle@npm:1.0.x": version: 1.0.3 resolution: "cycle@npm:1.0.3" @@ -25954,6 +26133,13 @@ __metadata: languageName: node linkType: hard +"destroy@npm:~1.0.4": + version: 1.0.4 + resolution: "destroy@npm:1.0.4" + checksum: 10/da9ab4961dc61677c709da0c25ef01733042614453924d65636a7db37308fef8a24cd1e07172e61173d471ca175371295fbc984b0af5b2b4ff47cd57bd784c03 + languageName: node + linkType: hard + "detect-file@npm:^1.0.0": version: 1.0.0 resolution: "detect-file@npm:1.0.0" @@ -28998,6 +29184,44 @@ __metadata: languageName: node linkType: hard +"express@npm:4.17.1": + version: 4.17.1 + resolution: "express@npm:4.17.1" + dependencies: + accepts: "npm:~1.3.7" + array-flatten: "npm:1.1.1" + body-parser: "npm:1.19.0" + content-disposition: "npm:0.5.3" + content-type: "npm:~1.0.4" + cookie: "npm:0.4.0" + cookie-signature: "npm:1.0.6" + debug: "npm:2.6.9" + depd: "npm:~1.1.2" + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + finalhandler: "npm:~1.1.2" + fresh: "npm:0.5.2" + merge-descriptors: "npm:1.0.1" + methods: "npm:~1.1.2" + on-finished: "npm:~2.3.0" + parseurl: "npm:~1.3.3" + path-to-regexp: "npm:0.1.7" + proxy-addr: "npm:~2.0.5" + qs: "npm:6.7.0" + range-parser: "npm:~1.2.1" + safe-buffer: "npm:5.1.2" + send: "npm:0.17.1" + serve-static: "npm:1.14.1" + setprototypeof: "npm:1.1.1" + statuses: "npm:~1.5.0" + type-is: "npm:~1.6.18" + utils-merge: "npm:1.0.1" + vary: "npm:~1.1.2" + checksum: 10/b4a03cdd6a3ca8555057249f8240d8b2d4feb469c8d3edbf94afcc454c0cb73cd108cf4a1b801b978f7e960e420b2597e1efd0480efb9092faa151f38f9576b5 + languageName: node + linkType: hard + "express@npm:4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" @@ -29179,6 +29403,18 @@ __metadata: languageName: node linkType: hard +"fabric-ca-client@npm:2.2.10": + version: 2.2.10 + resolution: "fabric-ca-client@npm:2.2.10" + dependencies: + fabric-common: "npm:2.2.10" + jsrsasign: "npm:^10.4.1" + url: "npm:^0.11.0" + winston: "npm:^2.4.5" + checksum: 10/06ef25222aafcb38c8c2b9fc0e0d93b4899a29afe0f9b07d1a4db4545179575668dccbf2f19a023a25e1c065b41aa65859dc2106d76b9f19d902ad38dcfc1678 + languageName: node + linkType: hard + "fabric-ca-client@npm:2.2.20": version: 2.2.20 resolution: "fabric-ca-client@npm:2.2.20" @@ -29203,6 +29439,29 @@ __metadata: languageName: node linkType: hard +"fabric-common@npm:2.2.10": + version: 2.2.10 + resolution: "fabric-common@npm:2.2.10" + dependencies: + callsite: "npm:^1.0.0" + elliptic: "npm:^6.5.4" + fabric-protos: "npm:2.2.10" + js-sha3: "npm:^0.8.0" + jsrsasign: "npm:^10.4.1" + long: "npm:^4.0.0" + nconf: "npm:^0.11.2" + pkcs11js: "npm:^1.0.6" + promise-settle: "npm:^0.3.0" + sjcl: "npm:^1.0.8" + winston: "npm:^2.4.5" + yn: "npm:^4.0.0" + dependenciesMeta: + pkcs11js: + optional: true + checksum: 10/7dd78494f960e2877d47083406a4ed18d191d4a64c5a9c2ae3854f6f77a33f390ea81c01dd5943e55eaa89ba5f80150686c0a31d5adb8f8cb0212af0c5a6d0e0 + languageName: node + linkType: hard + "fabric-common@npm:2.2.20": version: 2.2.20 resolution: "fabric-common@npm:2.2.20" @@ -29248,6 +29507,32 @@ __metadata: languageName: node linkType: hard +"fabric-contract-api@npm:2.2.3": + version: 2.2.3 + resolution: "fabric-contract-api@npm:2.2.3" + dependencies: + class-transformer: "npm:^0.3.1" + fabric-shim-api: "npm:2.2.3" + fast-safe-stringify: "npm:^2.0.7" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.2" + checksum: 10/1cf75e116d8fa3e4904a0ca0e71aafb7468d08fec9f7822212d46d7abbc83b5f55720e2c8a52bf615d0206249193ead0b4c512fe7f68ebb64fc8f3f832ee4ee3 + languageName: node + linkType: hard + +"fabric-network@npm:2.2.10": + version: 2.2.10 + resolution: "fabric-network@npm:2.2.10" + dependencies: + fabric-common: "npm:2.2.10" + fabric-protos: "npm:2.2.10" + long: "npm:^4.0.0" + nano: "npm:^9.0.3" + checksum: 10/bbb98a3fe6fa41cbf3a0ab2692d6b558e0b6f9210ba12e5e35f80f67f7c164e6b46cb900dd76c882458458b5fd2f61e158cc24bd6f574f88017516881a14b239 + languageName: node + linkType: hard + "fabric-network@npm:2.2.20": version: 2.2.20 resolution: "fabric-network@npm:2.2.20" @@ -29271,6 +29556,17 @@ __metadata: languageName: node linkType: hard +"fabric-protos@npm:2.2.10": + version: 2.2.10 + resolution: "fabric-protos@npm:2.2.10" + dependencies: + "@grpc/grpc-js": "npm:^1.3.4" + "@grpc/proto-loader": "npm:^0.6.2" + protobufjs: "npm:^6.11.2" + checksum: 10/53cbc27840c9af578c8f7532a55d8e21380f57e1be23c34aa2709964e3f66d99c990e1daea02517b59c70b6af34bc5b4e4e7e759762308c5ed88a5f9aa55f1b0 + languageName: node + linkType: hard + "fabric-protos@npm:2.2.20": version: 2.2.20 resolution: "fabric-protos@npm:2.2.20" @@ -29294,6 +29590,13 @@ __metadata: languageName: node linkType: hard +"fabric-shim-api@npm:2.2.3": + version: 2.2.3 + resolution: "fabric-shim-api@npm:2.2.3" + checksum: 10/c4f8ea2cab2f71656ebf2de0d26db79e2005d1899110618f349dbfdecb2e926b83db838020ca8e0f73b9c34dbe7ed61dbfbc01e6f2aa7973550f0c66c957ce90 + languageName: node + linkType: hard + "fast-check@npm:3.1.1": version: 3.1.1 resolution: "fast-check@npm:3.1.1" @@ -29781,6 +30084,21 @@ __metadata: languageName: node linkType: hard +"finalhandler@npm:~1.1.2": + version: 1.1.2 + resolution: "finalhandler@npm:1.1.2" + dependencies: + debug: "npm:2.6.9" + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + on-finished: "npm:~2.3.0" + parseurl: "npm:~1.3.3" + statuses: "npm:~1.5.0" + unpipe: "npm:~1.0.0" + checksum: 10/351e99a889abf149eb3edb24568586469feeb3019f5eafb9b31e632a5ad886f12a5595a221508245e6a37da69ae866c9fb411eb541a844238e2c900f63ac1576 + languageName: node + linkType: hard + "find-cache-dir@npm:^0.1.1": version: 0.1.1 resolution: "find-cache-dir@npm:0.1.1" @@ -30271,6 +30589,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:10.0.0": + version: 10.0.0 + resolution: "fs-extra@npm:10.0.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/c333973ece06655bf9a4566c65e648d64d7ab3a36e52011b05263e8f4664d2cc85cf9d98ddd4672857105561d759ef63828cf49428c78470a788a3751094a1a4 + languageName: node + linkType: hard + "fs-extra@npm:10.1.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -30796,6 +31125,13 @@ __metadata: languageName: node linkType: hard +"get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + "get-stdin@npm:^5.0.1": version: 5.0.1 resolution: "get-stdin@npm:5.0.1" @@ -32411,6 +32747,19 @@ __metadata: languageName: node linkType: hard +"http-errors@npm:1.7.2": + version: 1.7.2 + resolution: "http-errors@npm:1.7.2" + dependencies: + depd: "npm:~1.1.2" + inherits: "npm:2.0.3" + setprototypeof: "npm:1.1.1" + statuses: "npm:>= 1.5.0 < 2" + toidentifier: "npm:1.0.0" + checksum: 10/cf8da344b181599d19a2bfedcbe7c946945a907f2825a0c89e119ce9f9c9a421a49898afe3291485b40ffbbd587b62326f9becc7aa053036eff2559d9436defb + languageName: node + linkType: hard + "http-errors@npm:2.0.0": version: 2.0.0 resolution: "http-errors@npm:2.0.0" @@ -32424,6 +32773,19 @@ __metadata: languageName: node linkType: hard +"http-errors@npm:~1.7.2": + version: 1.7.3 + resolution: "http-errors@npm:1.7.3" + dependencies: + depd: "npm:~1.1.2" + inherits: "npm:2.0.4" + setprototypeof: "npm:1.1.1" + statuses: "npm:>= 1.5.0 < 2" + toidentifier: "npm:1.0.0" + checksum: 10/157cb95296118e9c37034f04d5c372916db03bcb6b1097caf693fbc9cf85ac881c8cbdf892140acb7ede6cad6a1a3dbf86a8031b2b127dc47bfc0600b3fda8a0 + languageName: node + linkType: hard + "http-https@npm:^1.0.0": version: 1.0.0 resolution: "http-https@npm:1.0.0" @@ -35901,6 +36263,28 @@ __metadata: languageName: node linkType: hard +"joi@npm:17.4.2": + version: 17.4.2 + resolution: "joi@npm:17.4.2" + dependencies: + "@hapi/hoek": "npm:^9.0.0" + "@hapi/topo": "npm:^5.0.0" + "@sideway/address": "npm:^4.1.0" + "@sideway/formula": "npm:^3.0.0" + "@sideway/pinpoint": "npm:^2.0.0" + checksum: 10/35fc3ab817e7035ff12bdd8dd6b39d74936562f1a257412ec738f0fb157a86191c9cc5caaf89c6f4b80f2241658435341f185574196642c5c67350ff19703787 + languageName: node + linkType: hard + +"jose@npm:1.28.1": + version: 1.28.1 + resolution: "jose@npm:1.28.1" + dependencies: + "@panva/asn1.js": "npm:^1.0.0" + checksum: 10/ccc44d52463a4e913557a2cb326ffd7cce89ed2928f8b15aaea248e23098b8f90d12f8538f5378e2383f83a1d9ce3bfb121eb4e8a283507db5f0d9d415901c26 + languageName: node + linkType: hard + "jose@npm:4.15.5": version: 4.15.5 resolution: "jose@npm:4.15.5" @@ -36483,6 +36867,21 @@ __metadata: languageName: node linkType: hard +"keycloak-admin@npm:1.14.21": + version: 1.14.21 + resolution: "keycloak-admin@npm:1.14.21" + dependencies: + axios: "npm:^0.21.0" + camelize: "npm:^1.0.0" + keycloak-js: "npm:^11.0.3" + lodash: "npm:^4.17.21" + query-string: "npm:^6.13.7" + url-join: "npm:^4.0.0" + url-template: "npm:^2.0.8" + checksum: 10/3d0b1bbc1b522f72c69640defe35df993950896526fc810752fed83627d71db131463cc4607af09e954ac4ec5fd366fdd45e612d44a76070817e919aa47b906a + languageName: node + linkType: hard + "keycloak-admin@npm:1.14.22": version: 1.14.22 resolution: "keycloak-admin@npm:1.14.22" @@ -37785,6 +38184,20 @@ __metadata: languageName: node linkType: hard +"logform@npm:^2.6.0, logform@npm:^2.6.1": + version: 2.6.1 + resolution: "logform@npm:2.6.1" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/e67f414787fbfe1e6a997f4c84300c7e06bee3d0bd579778af667e24b36db3ea200ed195d41b61311ff738dab7faabc615a07b174b22fe69e0b2f39e985be64b + languageName: node + linkType: hard + "loglevel-plugin-prefix@npm:0.8.4": version: 0.8.4 resolution: "loglevel-plugin-prefix@npm:0.8.4" @@ -39356,6 +39769,13 @@ __metadata: languageName: node linkType: hard +"ms@npm:2.1.1": + version: 2.1.1 + resolution: "ms@npm:2.1.1" + checksum: 10/0078a23cd916a9a7435c413caa14c57d4b4f6e2470e0ab554b6964163c8a4436448ac7ae020e883685475da6b6796cc396b670f579cb275db288a21e3e57721e + languageName: node + linkType: hard + "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -39570,6 +39990,15 @@ __metadata: languageName: node linkType: hard +"nan@npm:^2.19.0, nan@npm:^2.20.0": + version: 2.21.0 + resolution: "nan@npm:2.21.0" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4517d316776b509a961c65241b72863e70f63aa5b0c354ca19fbbbf7c78254e54aa1f0de142fac1df986a04c27e74a1fb7e4aa85e9e3834daa172b8d9d1bbb07 + languageName: node + linkType: hard + "nano-base32@npm:^1.0.1": version: 1.0.1 resolution: "nano-base32@npm:1.0.1" @@ -39703,6 +40132,18 @@ __metadata: languageName: node linkType: hard +"nconf@npm:^0.11.2": + version: 0.11.4 + resolution: "nconf@npm:0.11.4" + dependencies: + async: "npm:^1.4.0" + ini: "npm:^2.0.0" + secure-keys: "npm:^1.0.0" + yargs: "npm:^16.1.1" + checksum: 10/9788075cf5ca929736fd799335773994b774aad384f914c3a00ea0a9d52cf95842b762cb5e57dfd021568104fc56422ab91b9586f24ed091001c384230a72483 + languageName: node + linkType: hard + "nconf@npm:^0.12.0": version: 0.12.0 resolution: "nconf@npm:0.12.0" @@ -40262,6 +40703,20 @@ __metadata: languageName: node linkType: hard +"node-ssh@npm:12.0.0": + version: 12.0.0 + resolution: "node-ssh@npm:12.0.0" + dependencies: + is-stream: "npm:^2.0.0" + make-dir: "npm:^3.1.0" + sb-promise-queue: "npm:^2.1.0" + sb-scandir: "npm:^3.1.0" + shell-escape: "npm:^0.2.0" + ssh2: "npm:^1.1.0" + checksum: 10/1076e0b45bd3a07933ecbe7421fc78289472a67ee00e82c8e07df338ab7149e2926fe7f31626f30b5203f00c6d8c0959399b99f6fadb588b90b29a6bf6164322 + languageName: node + linkType: hard + "node-ssh@npm:13.1.0": version: 13.1.0 resolution: "node-ssh@npm:13.1.0" @@ -44229,6 +44684,15 @@ __metadata: languageName: node linkType: hard +"prom-client@npm:13.0.0": + version: 13.0.0 + resolution: "prom-client@npm:13.0.0" + dependencies: + tdigest: "npm:^0.1.1" + checksum: 10/a57d295eeee5eaf344adbf42a76eed2305d617fdad93669fc04610ade33a54a3452f127502a749400633821bbbff2641b576cb0924135c690679a1b58b516778 + languageName: node + linkType: hard + "prom-client@npm:15.1.3": version: 15.1.3 resolution: "prom-client@npm:15.1.3" @@ -44385,7 +44849,7 @@ __metadata: languageName: node linkType: hard -"proxy-addr@npm:^2.0.7, proxy-addr@npm:~2.0.7": +"proxy-addr@npm:^2.0.7, proxy-addr@npm:~2.0.5, proxy-addr@npm:~2.0.7": version: 2.0.7 resolution: "proxy-addr@npm:2.0.7" dependencies: @@ -44562,6 +45026,13 @@ __metadata: languageName: node linkType: hard +"qs@npm:6.7.0": + version: 6.7.0 + resolution: "qs@npm:6.7.0" + checksum: 10/d8f4b216c6777853c17586dc17fa685fb4e14269dbf6e860add6c0c61fd12137dc7aa4bf5066a794ba9a8dbb9c11e9ef20b72db763228701be95546ea807213a + languageName: node + linkType: hard + "qs@npm:^6.11.0, qs@npm:^6.9.4": version: 6.11.2 resolution: "qs@npm:6.11.2" @@ -44711,6 +45182,18 @@ __metadata: languageName: node linkType: hard +"raw-body@npm:2.4.0": + version: 2.4.0 + resolution: "raw-body@npm:2.4.0" + dependencies: + bytes: "npm:3.1.0" + http-errors: "npm:1.7.2" + iconv-lite: "npm:0.4.24" + unpipe: "npm:1.0.0" + checksum: 10/aa2c506055f32448211a4933c728b6a3d715101975328071ad4aad210a19e5cadd7666d1acc139ed59c7519e5a044a1a19285d4b4bb542d93de6187acf4a5ebf + languageName: node + linkType: hard + "raw-body@npm:2.5.1": version: 2.5.1 resolution: "raw-body@npm:2.5.1" @@ -45212,7 +45695,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4": +"readable-stream@npm:1.1.14, readable-stream@npm:1.x >=1.1.9, readable-stream@npm:^1.0.26-4": version: 1.1.14 resolution: "readable-stream@npm:1.1.14" dependencies: @@ -45276,7 +45759,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0": +"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0, readable-stream@npm:^4.5.2": version: 4.5.2 resolution: "readable-stream@npm:4.5.2" dependencies: @@ -47089,6 +47572,27 @@ __metadata: languageName: node linkType: hard +"send@npm:0.17.1": + version: 0.17.1 + resolution: "send@npm:0.17.1" + dependencies: + debug: "npm:2.6.9" + depd: "npm:~1.1.2" + destroy: "npm:~1.0.4" + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + fresh: "npm:0.5.2" + http-errors: "npm:~1.7.2" + mime: "npm:1.6.0" + ms: "npm:2.1.1" + on-finished: "npm:~2.3.0" + range-parser: "npm:~1.2.1" + statuses: "npm:~1.5.0" + checksum: 10/b632573e156db8f110e3776e4c8e8393bed1c3ad2be01d4f2832d33525395058cdababdaffea639af3a2d81b3d46c242134279efce87d33d2be3ccf31abaa937 + languageName: node + linkType: hard + "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -47212,6 +47716,18 @@ __metadata: languageName: node linkType: hard +"serve-static@npm:1.14.1": + version: 1.14.1 + resolution: "serve-static@npm:1.14.1" + dependencies: + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + parseurl: "npm:~1.3.3" + send: "npm:0.17.1" + checksum: 10/a479286814f2aa3712683951908ea49d6c4999191465f9139d68ad001f8b594e4c16aee02d9511f3579e90aac20bf574a267b799fd48fc1857d89a2a08e280d7 + languageName: node + linkType: hard + "serve-static@npm:1.15.0": version: 1.15.0 resolution: "serve-static@npm:1.15.0" @@ -47333,6 +47849,13 @@ __metadata: languageName: node linkType: hard +"setprototypeof@npm:1.1.1": + version: 1.1.1 + resolution: "setprototypeof@npm:1.1.1" + checksum: 10/b8fcf5b4b8325ea638712ed6e62f8e0ffac69eef1390305a5331046992424e484d4d6603a18d84d4c08c3def50b9195d9e707b747aed5eec15ee66a2a6508318 + languageName: node + linkType: hard + "setprototypeof@npm:1.2.0": version: 1.2.0 resolution: "setprototypeof@npm:1.2.0" @@ -48283,6 +48806,23 @@ __metadata: languageName: node linkType: hard +"ssh2@npm:^1.1.0": + version: 1.16.0 + resolution: "ssh2@npm:1.16.0" + dependencies: + asn1: "npm:^0.2.6" + bcrypt-pbkdf: "npm:^1.0.2" + cpu-features: "npm:~0.0.10" + nan: "npm:^2.20.0" + dependenciesMeta: + cpu-features: + optional: true + nan: + optional: true + checksum: 10/0951c22d9c5a0e3b89a8e5ae890ebcbce9f1f94dbed37d1490e4e48e26bc8b074fa81f202ee57b708e31b5f33033f4c870b92047f4f02b6bc26c32225b01d84c + languageName: node + linkType: hard + "ssh2@npm:^1.11.0": version: 1.14.0 resolution: "ssh2@npm:1.14.0" @@ -48439,7 +48979,7 @@ __metadata: languageName: node linkType: hard -"statuses@npm:>= 1.4.0 < 2": +"statuses@npm:>= 1.4.0 < 2, statuses@npm:>= 1.5.0 < 2, statuses@npm:~1.5.0": version: 1.5.0 resolution: "statuses@npm:1.5.0" checksum: 10/c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c @@ -50186,6 +50726,13 @@ __metadata: languageName: node linkType: hard +"toidentifier@npm:1.0.0": + version: 1.0.0 + resolution: "toidentifier@npm:1.0.0" + checksum: 10/199e6bfca1531d49b3506cff02353d53ec987c9ee10ee272ca6484ed97f1fc10fb77c6c009079ca16d5c5be4a10378178c3cacdb41ce9ec954c3297c74c6053e + languageName: node + linkType: hard + "toidentifier@npm:1.0.1": version: 1.0.1 resolution: "toidentifier@npm:1.0.1" @@ -50915,7 +51462,7 @@ __metadata: languageName: node linkType: hard -"type-is@npm:^1.6.18, type-is@npm:^1.6.4, type-is@npm:~1.6.18": +"type-is@npm:^1.6.18, type-is@npm:^1.6.4, type-is@npm:~1.6.17, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" dependencies: @@ -52206,6 +52753,17 @@ __metadata: languageName: node linkType: hard +"web3-bzz@npm:1.5.2": + version: 1.5.2 + resolution: "web3-bzz@npm:1.5.2" + dependencies: + "@types/node": "npm:^12.12.6" + got: "npm:9.6.0" + swarm-js: "npm:^0.1.40" + checksum: 10/b4ff80a57cccd7a5bc52feeef66a4f6f68e3d32bc87c17c0df511cbdab8df946bd505df92864052f281712ebf93cd183637f491156d62c9b4119c6cc86a514cd + languageName: node + linkType: hard + "web3-bzz@npm:1.6.1": version: 1.6.1 resolution: "web3-bzz@npm:1.6.1" @@ -52249,6 +52807,16 @@ __metadata: languageName: node linkType: hard +"web3-core-helpers@npm:1.5.2": + version: 1.5.2 + resolution: "web3-core-helpers@npm:1.5.2" + dependencies: + web3-eth-iban: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/9071e23ff7b7aebef4dbdfe4d4a686bc82fc98470b3a9335d5d1550935e8d0183bff45891ca6bc0dec2334dbdfdbb74932347bae8beb984f2699d32ee7ac1ae0 + languageName: node + linkType: hard + "web3-core-helpers@npm:1.6.1": version: 1.6.1 resolution: "web3-core-helpers@npm:1.6.1" @@ -52292,6 +52860,20 @@ __metadata: languageName: node linkType: hard +"web3-core-method@npm:1.5.2": + version: 1.5.2 + resolution: "web3-core-method@npm:1.5.2" + dependencies: + "@ethereumjs/common": "npm:^2.4.0" + "@ethersproject/transactions": "npm:^5.0.0-beta.135" + web3-core-helpers: "npm:1.5.2" + web3-core-promievent: "npm:1.5.2" + web3-core-subscriptions: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/df38f4f96dc3daec63bd0ca6767b5ad7bb6520dc20e97b256a1796f392192070164f7dce5be25e6fe72dd2dd65ae27e74d63e598841eaae197af9c68eb1f4a60 + languageName: node + linkType: hard + "web3-core-method@npm:1.6.1": version: 1.6.1 resolution: "web3-core-method@npm:1.6.1" @@ -52340,6 +52922,15 @@ __metadata: languageName: node linkType: hard +"web3-core-promievent@npm:1.5.2": + version: 1.5.2 + resolution: "web3-core-promievent@npm:1.5.2" + dependencies: + eventemitter3: "npm:4.0.4" + checksum: 10/b19f1546e9ae4620c65a335cee2dac881684c0f0ab7d29384a950b384b42d9b156d85ed77a1fc3191d73bc8b1879507626525cf98c3bf17c5c973416ed4a64b4 + languageName: node + linkType: hard + "web3-core-promievent@npm:1.6.1": version: 1.6.1 resolution: "web3-core-promievent@npm:1.6.1" @@ -52380,6 +52971,19 @@ __metadata: languageName: node linkType: hard +"web3-core-requestmanager@npm:1.5.2": + version: 1.5.2 + resolution: "web3-core-requestmanager@npm:1.5.2" + dependencies: + util: "npm:^0.12.0" + web3-core-helpers: "npm:1.5.2" + web3-providers-http: "npm:1.5.2" + web3-providers-ipc: "npm:1.5.2" + web3-providers-ws: "npm:1.5.2" + checksum: 10/135719627a7934462b94806728751ff798ffb97d7b3e67bef229bc5e3423b57c23f2c48322f17cba05588e67b866d5908cd74d4b8a897c99c5d38f4a6f18ce70 + languageName: node + linkType: hard + "web3-core-requestmanager@npm:1.6.1": version: 1.6.1 resolution: "web3-core-requestmanager@npm:1.6.1" @@ -52429,6 +53033,16 @@ __metadata: languageName: node linkType: hard +"web3-core-subscriptions@npm:1.5.2": + version: 1.5.2 + resolution: "web3-core-subscriptions@npm:1.5.2" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.5.2" + checksum: 10/98343a06d237dfb8d540ce7d8a66cdf05b2cb50e53063854a6d37ba1df2d86c3430f9b010074233c76b1ff2aa35b186bb017441ed136953d66aecdfdd2f8fe97 + languageName: node + linkType: hard + "web3-core-subscriptions@npm:1.6.1": version: 1.6.1 resolution: "web3-core-subscriptions@npm:1.6.1" @@ -52474,6 +53088,21 @@ __metadata: languageName: node linkType: hard +"web3-core@npm:1.5.2": + version: 1.5.2 + resolution: "web3-core@npm:1.5.2" + dependencies: + "@types/bn.js": "npm:^4.11.5" + "@types/node": "npm:^12.12.6" + bignumber.js: "npm:^9.0.0" + web3-core-helpers: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-core-requestmanager: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/16bc49bb9247a2a8c53b3996bdb4562c20473db719436507b83e05c599c5d93d8120211b06d10492249f2370a461af661cbaaaad187259cb69d3fd8290217a5e + languageName: node + linkType: hard + "web3-core@npm:1.6.1": version: 1.6.1 resolution: "web3-core@npm:1.6.1" @@ -52641,6 +53270,16 @@ __metadata: languageName: node linkType: hard +"web3-eth-abi@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth-abi@npm:1.5.2" + dependencies: + "@ethersproject/abi": "npm:5.0.7" + web3-utils: "npm:1.5.2" + checksum: 10/ba25188b4491113c837a5baa11c79e08060496a1f9840e336f0eb73506c10528e33b9b935dc684b181478a1fa26fb3c77324e12ce0307507bc7b98905829a77c + languageName: node + linkType: hard + "web3-eth-abi@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-abi@npm:1.6.1" @@ -52754,6 +53393,25 @@ __metadata: languageName: node linkType: hard +"web3-eth-accounts@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth-accounts@npm:1.5.2" + dependencies: + "@ethereumjs/common": "npm:^2.3.0" + "@ethereumjs/tx": "npm:^3.2.1" + crypto-browserify: "npm:3.12.0" + eth-lib: "npm:0.2.8" + ethereumjs-util: "npm:^7.0.10" + scrypt-js: "npm:^3.0.1" + uuid: "npm:3.3.2" + web3-core: "npm:1.5.2" + web3-core-helpers: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/8da761b2103e89354734e3cacd83078fff81890532630f2e311ff8e103307d4c1f83449b2dd8efa2158fde8bfdd4ed7948c6ce92e9359ff48ffc76aa4a74641f + languageName: node + linkType: hard + "web3-eth-accounts@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-accounts@npm:1.6.1" @@ -52887,6 +53545,22 @@ __metadata: languageName: node linkType: hard +"web3-eth-contract@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth-contract@npm:1.5.2" + dependencies: + "@types/bn.js": "npm:^4.11.5" + web3-core: "npm:1.5.2" + web3-core-helpers: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-core-promievent: "npm:1.5.2" + web3-core-subscriptions: "npm:1.5.2" + web3-eth-abi: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/2dfe4195d3cf4e8cfed210357347b076634789ca5cec8d02c805b9d06be71d345e9a0c403e6801dc40bc15ab73f1546eebfa305eddf16903e768fc593dc6521c + languageName: node + linkType: hard + "web3-eth-contract@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-contract@npm:1.6.1" @@ -52996,6 +53670,22 @@ __metadata: languageName: node linkType: hard +"web3-eth-ens@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth-ens@npm:1.5.2" + dependencies: + content-hash: "npm:^2.5.2" + eth-ens-namehash: "npm:2.0.8" + web3-core: "npm:1.5.2" + web3-core-helpers: "npm:1.5.2" + web3-core-promievent: "npm:1.5.2" + web3-eth-abi: "npm:1.5.2" + web3-eth-contract: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/38b94ba2cc4274b8cb8664a1fde62654e77fc81d68eb69c0a9449d3c9baf5161a85d3fd5e1d891008fde26f240860926a0ec99f37e4fd8d5865e53df10ee355f + languageName: node + linkType: hard + "web3-eth-ens@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-ens@npm:1.6.1" @@ -53088,6 +53778,16 @@ __metadata: languageName: node linkType: hard +"web3-eth-iban@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth-iban@npm:1.5.2" + dependencies: + bn.js: "npm:^4.11.9" + web3-utils: "npm:1.5.2" + checksum: 10/73f749684ae65a4ae8f1125aa240c020b382025944dbb9ed67c7b14cb1b9f9143ab46e74c7a61a639ebc9892dcc2da61eff60a131d2779acfb47740ac4a81446 + languageName: node + linkType: hard + "web3-eth-iban@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-iban@npm:1.6.1" @@ -53156,6 +53856,20 @@ __metadata: languageName: node linkType: hard +"web3-eth-personal@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth-personal@npm:1.5.2" + dependencies: + "@types/node": "npm:^12.12.6" + web3-core: "npm:1.5.2" + web3-core-helpers: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-net: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/0a2c586df93bf7392d2948e89fa9022ac91da3e6359afc5e4019ead046e5277dc31bce20da253be4d8a55055c0bca46bd8e96fdb9facd02f5465cb73e6d3284b + languageName: node + linkType: hard + "web3-eth-personal@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-personal@npm:1.6.1" @@ -53246,6 +53960,26 @@ __metadata: languageName: node linkType: hard +"web3-eth@npm:1.5.2": + version: 1.5.2 + resolution: "web3-eth@npm:1.5.2" + dependencies: + web3-core: "npm:1.5.2" + web3-core-helpers: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-core-subscriptions: "npm:1.5.2" + web3-eth-abi: "npm:1.5.2" + web3-eth-accounts: "npm:1.5.2" + web3-eth-contract: "npm:1.5.2" + web3-eth-ens: "npm:1.5.2" + web3-eth-iban: "npm:1.5.2" + web3-eth-personal: "npm:1.5.2" + web3-net: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/1df554703ebf41739849da02044529a95e64f0f6937b9c820db809179e02fc03e54dd7f57dedba1643ae1fccfc9b61b4d38f887aa2d5c7d7da38d825921328f8 + languageName: node + linkType: hard + "web3-eth@npm:1.6.1": version: 1.6.1 resolution: "web3-eth@npm:1.6.1" @@ -53374,6 +54108,17 @@ __metadata: languageName: node linkType: hard +"web3-net@npm:1.5.2": + version: 1.5.2 + resolution: "web3-net@npm:1.5.2" + dependencies: + web3-core: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/5619fc10b7114b4d64b3802ab6459de9e1caf3341719b718451c1f5585e075c87b3d1e45c917b6eccca2c6b16861eb7f4d3f539f5b280eb2a558406745a2a447 + languageName: node + linkType: hard + "web3-net@npm:1.6.1": version: 1.6.1 resolution: "web3-net@npm:1.6.1" @@ -53443,6 +54188,16 @@ __metadata: languageName: node linkType: hard +"web3-providers-http@npm:1.5.2": + version: 1.5.2 + resolution: "web3-providers-http@npm:1.5.2" + dependencies: + web3-core-helpers: "npm:1.5.2" + xhr2-cookies: "npm:1.1.0" + checksum: 10/abbef0d729b497d04300aea291ce635ac879bb0b88c226a60da0b5c1cb289067204dfbc25038c8fe779d8729ab7c21fa11acd0f93697fc8db612d968c1e4fe72 + languageName: node + linkType: hard + "web3-providers-http@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-http@npm:1.6.1" @@ -53509,6 +54264,16 @@ __metadata: languageName: node linkType: hard +"web3-providers-ipc@npm:1.5.2": + version: 1.5.2 + resolution: "web3-providers-ipc@npm:1.5.2" + dependencies: + oboe: "npm:2.1.5" + web3-core-helpers: "npm:1.5.2" + checksum: 10/1b8f4b375d111b77ba4742d3337c3aa9f9ae59ef5f34348d4b956c721c7b49d8dad5adaea0e211cf0e00bdee5f727c0d8a55a077ec92124bcae1bdf0cd13fd92 + languageName: node + linkType: hard + "web3-providers-ipc@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ipc@npm:1.6.1" @@ -53572,6 +54337,17 @@ __metadata: languageName: node linkType: hard +"web3-providers-ws@npm:1.5.2": + version: 1.5.2 + resolution: "web3-providers-ws@npm:1.5.2" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.5.2" + websocket: "npm:^1.0.32" + checksum: 10/be424724f9c38ba5fbe1567fca981a5a36d3c208a4457616ccb49339a5dd8bfcb64e26248307149f3a664cd7efdb84533d6e45d1ee4ce895cc7f049766d4cfc8 + languageName: node + linkType: hard + "web3-providers-ws@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ws@npm:1.6.1" @@ -53678,6 +54454,18 @@ __metadata: languageName: node linkType: hard +"web3-shh@npm:1.5.2": + version: 1.5.2 + resolution: "web3-shh@npm:1.5.2" + dependencies: + web3-core: "npm:1.5.2" + web3-core-method: "npm:1.5.2" + web3-core-subscriptions: "npm:1.5.2" + web3-net: "npm:1.5.2" + checksum: 10/e20b04a62f0898de9dbee2fdeea28b21e74a2ae5c03275b192963d3fcf24644620eb2e8ac9d734db5a1ab932b5cd21df1574e575274df5ecef45190810e407a1 + languageName: node + linkType: hard + "web3-shh@npm:1.6.1": version: 1.6.1 resolution: "web3-shh@npm:1.6.1" @@ -53778,6 +54566,21 @@ __metadata: languageName: node linkType: hard +"web3-utils@npm:1.5.2": + version: 1.5.2 + resolution: "web3-utils@npm:1.5.2" + dependencies: + bn.js: "npm:^4.11.9" + eth-lib: "npm:0.2.8" + ethereum-bloom-filters: "npm:^1.0.6" + ethjs-unit: "npm:0.1.6" + number-to-bn: "npm:1.7.0" + randombytes: "npm:^2.1.0" + utf8: "npm:3.0.0" + checksum: 10/4532674e9c70702438e2b714de0a56c214298db2972fbdc851706075fd0d184ad8e04fe20e89c276f04d892655c7c2f0c2fe696a7d3aa8ae6654c513a0139b0f + languageName: node + linkType: hard + "web3-utils@npm:1.6.1": version: 1.6.1 resolution: "web3-utils@npm:1.6.1" @@ -53971,6 +54774,21 @@ __metadata: languageName: node linkType: hard +"web3@npm:1.5.2": + version: 1.5.2 + resolution: "web3@npm:1.5.2" + dependencies: + web3-bzz: "npm:1.5.2" + web3-core: "npm:1.5.2" + web3-eth: "npm:1.5.2" + web3-eth-personal: "npm:1.5.2" + web3-net: "npm:1.5.2" + web3-shh: "npm:1.5.2" + web3-utils: "npm:1.5.2" + checksum: 10/0658167ee6b18e501104f5d7328b1fd3d606b27a3d6e7b417163be5c6f1d08d65af281ba9b6db1f1f6c134a596c11864ac667ee302798b60c74296afa4dba742 + languageName: node + linkType: hard + "web3@npm:1.6.1": version: 1.6.1 resolution: "web3@npm:1.6.1" @@ -54551,6 +55369,13 @@ __metadata: languageName: node linkType: hard +"when@npm:~3.6.2": + version: 3.6.4 + resolution: "when@npm:3.6.4" + checksum: 10/818b8b8e173e17df49fdee1a9c6cc212da57663206bb21ef5659fb0a12dbf3bddbec952a235073ad44f371007a0b6d8c66966063e0068a6f8c10bc18b6b4789c + languageName: node + linkType: hard + "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -54766,6 +55591,17 @@ __metadata: languageName: node linkType: hard +"winston-transport@npm:^4.7.0": + version: 4.8.0 + resolution: "winston-transport@npm:4.8.0" + dependencies: + logform: "npm:^2.6.1" + readable-stream: "npm:^4.5.2" + triple-beam: "npm:^1.3.0" + checksum: 10/930bdc0ec689d5c4f07a262721da80440336f64739d0ce33db801c7142b4fca5be8ef71b725b670bac609de8b6bce405e5c5f84d355f5176a611209b476cee18 + languageName: node + linkType: hard + "winston@npm:3.10.0": version: 3.10.0 resolution: "winston@npm:3.10.0" @@ -54785,6 +55621,20 @@ __metadata: languageName: node linkType: hard +"winston@npm:^2.2.0": + version: 2.4.7 + resolution: "winston@npm:2.4.7" + dependencies: + async: "npm:^2.6.4" + colors: "npm:1.0.x" + cycle: "npm:1.0.x" + eyes: "npm:0.1.x" + isstream: "npm:0.1.x" + stack-trace: "npm:0.0.x" + checksum: 10/44665f99bb1b1f290fc48879cd3bf635d0821ad70e90cdec0911a79b4ffd4f62ae4afa4764b27766e6a4ff60e911611047fd3f10b21d395eb0e3da33086d6c73 + languageName: node + linkType: hard + "winston@npm:^2.4.5": version: 2.4.5 resolution: "winston@npm:2.4.5" @@ -54799,6 +55649,25 @@ __metadata: languageName: node linkType: hard +"winston@npm:^3.3.2": + version: 3.15.0 + resolution: "winston@npm:3.15.0" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.6.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/60e55eb3621e4de1a764a4e43ee1d242c71957d3e0eb359cb8f16fe2b9d9543fd4c31a8d3baf96fa7e43ef5df383c43c1a98aff4bd714ea0082303504b0e3cdc + languageName: node + linkType: hard + "winston@npm:^3.3.3": version: 3.6.0 resolution: "winston@npm:3.6.0" From e3e00696cfa5f55208e7bc44b75de6ef7cf86e70 Mon Sep 17 00:00:00 2001 From: Bruno Mateus Date: Tue, 2 Apr 2024 14:32:07 +0100 Subject: [PATCH 24/49] refactor(cc-tx-visualization): capture transactional data with RxJS The plugin now utilizes RxJS instead of RabbitMQ in transaction monitoring. ReplaySubjects store and emit observed transactional data to subscribers. fix(cc-tx-visualization): rebase latest version Signed-off-by: Rafael Belchior squash! - migrate a test case to Fabric v2.5.6 LTS AIO This is just a snippet of a change from the pair programming call with Bruno, it can be safely squashed, no worries. Signed-off-by: Peter Somogyvari Signed-off-by: Bruno Mateus feat(cc-tx-visualization): ccmodel serialization with PM4PY The plugin now creates the ccmodel for conformance checking with PM4PY. Signed-off-by: Bruno Mateus --- .cspell.json | 2 +- CODEOWNERS | 1 + .../src/main/typescript/index.web.ts | 0 jest.config.js | 8 - .../src/main/json/openapi.json | 2 + .../openapitools/client/models/LedgerType.kt | 8 +- .../generated/openapi/typescript-axios/api.ts | 2 + .../README.md | 3 - .../typescript/models/transaction-receipt.ts | 68 - .../typescript/plugin-cc-tx-visualization.ts | 416 ----- .../plugin-factory-cc-tx-visualization.ts | 20 - .../src/main/typescript/public-api.ts | 17 - .../src/test/csv/dummy-use-case-6-events.csv | 7 - .../src/test/csv/dummy-use-case-60-events.csv | 61 - .../src/test/csv/dummy-use-case-invalid.csv | 7 - .../src/test/csv/example-dummy-use-case.csv | 9 - .../csv/use-case-besu-fabric-6-events.csv | 7 - .../csv/use-case-besu-fabric-60-events.csv | 61 - .../test/fixtures/python/process mining.ipynb | 423 ----- .../fixtures/python/process_conformance.ipynb | 147 -- .../integration/api-surface.test.ts | 8 - ...ate-use-case-dummy-baseline-events.test.ts | 207 --- ...iz-generate-use-case-dummy-invalid.test.ts | 200 --- .../cctxviz-persist-cross-chain-log.test.ts | 120 -- ...txviz-usecase-fabric-besu-6-events.test.ts | 583 ------ .../integration/initialize-rabbitmq.test.ts | 39 - .../.gitignore | 2 +- .../README.md | 149 ++ .../package.json | 44 +- .../src/main/typescript/index.ts | 0 .../src/main/typescript/index.web.ts | 0 .../typescript/models/carbon-footprint.ts | 27 +- .../typescript/models/cross-chain-event.ts | 4 +- .../typescript/models/crosschain-model.ts | 15 +- .../typescript/models/transaction-receipt.ts | 33 + .../src/main/typescript/models/utils.ts | 7 + .../typescript/plugin-ccmodel-hephaestus.ts | 973 ++++++++++ .../plugin-factory-ccmodel-hephaestus.ts | 20 + .../pm4py-adapter/ccmodel-adapter.ts | 97 + .../pm4py-adapter/check_conformance.py | 188 ++ .../typescript/pm4py-adapter/convert_model.py | 123 ++ .../typescript/pm4py-adapter/create_model.py | 84 + .../src/main/typescript/public-api.ts | 16 + .../src/test/csv/example-dummy-basic-test.csv | 2 + .../test/csv/example-dummy-besu-4-events.csv | 5 + ...my-besu-ethereum-fabric-events-3-cases.csv | 28 + ...mple-dummy-besu-ethereum-fabric-events.csv | 28 + ...mple-dummy-ethereum-3-unmodeled-events.csv | 4 + .../csv/example-dummy-ethereum-4-events.csv | 5 + .../csv/example-dummy-fabric-4-events.csv | 5 + .../csv/example-dummy-periodic-update.csv | 29 + .../process mining-checkpoint.ipynb | 286 +++ .../process_conformance-checkpoint.ipynb | 186 ++ .../test/fixtures/python/process mining.ipynb | 286 +++ .../fixtures/python/process_conformance.ipynb | 186 ++ .../test/json/example-dummy-basic-test.json | 18 + .../json/example-dummy-besu-4-events.json | 63 + ...y-besu-ethereum-fabric-events-3-cases.json | 425 +++++ ...ple-dummy-besu-ethereum-fabric-events.json | 425 +++++ ...ple-dummy-ethereum-3-unmodeled-events.json | 48 + .../json/example-dummy-ethereum-4-events.json | 65 + .../json/example-dummy-fabric-4-events.json | 66 + .../json/example-dummy-periodic-update.json | 432 +++++ .../lock-asset-contract}/LockAsset.json | 1585 +++++++++++------ .../lock-asset-contract/lock-asset.sol | 70 + .../chaincode-typescript/.gitignore | 16 + .../chaincode-typescript/package.json | 62 + .../chaincode-typescript/src/asset.ts | 23 + .../chaincode-typescript/src/assetTransfer.ts | 201 +++ .../chaincode-typescript/src/index.ts | 9 + .../chaincode-typescript/tsconfig.json | 18 + .../integration/basic-mock-test.test.ts | 125 ++ ...s-chain-model-conformance-checking.test.ts | 467 +++++ .../cross-chain-model-periodic-update.test.ts | 282 +++ .../cross-chain-model-serialization.test.ts | 288 +++ .../integration/monitor-4-besu-events.test.ts | 244 +++ .../monitor-4-ethereum-events.test.ts | 293 +++ .../monitor-4-fabric-events.test.ts | 364 ++++ ...onitor-besu-ethereum-fabric-events.test.ts | 705 ++++++++ .../tsconfig.json | 7 +- .../src/main/json/openapi.json | 12 - .../generated/openapi/typescript-axios/api.ts | 18 - .../plugin-ledger-connector-besu.ts | 118 +- .../src/main/typescript/public-api.ts | 1 + .../plugin-ledger-connector-ethereum.ts | 24 + .../src/main/typescript/public-api.ts | 1 + .../src/main/json/openapi.json | 12 - .../generated/openapi/typescript-axios/api.ts | 18 - .../plugin-ledger-connector-fabric.ts | 176 +- .../src/main/typescript/public-api.ts | 1 + .../run-transaction-endpoint-v1.test.ts | 21 + .../src/main/typescript/public-api.ts | 2 - .../rabbit-mq-test-server.ts | 251 --- .../socketio-test-setup-helpers.ts | 2 +- tsconfig.json | 5 +- yarn.lock | 863 +-------- 96 files changed, 8703 insertions(+), 4381 deletions(-) mode change 100755 => 100644 examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/README.md delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts delete mode 100755 packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts delete mode 100644 packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/.gitignore (82%) create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/README.md rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/package.json (71%) rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/src/main/typescript/index.ts (100%) rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/src/main/typescript/index.web.ts (100%) rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/src/main/typescript/models/carbon-footprint.ts (58%) rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/src/main/typescript/models/cross-chain-event.ts (96%) rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/src/main/typescript/models/crosschain-model.ts (87%) create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/transaction-receipt.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/utils.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-factory-ccmodel-hephaestus.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py create mode 100755 packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/public-api.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json rename packages/{cactus-plugin-cc-tx-visualization/src/test/solidity => cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract}/LockAsset.json (58%) create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts rename packages/{cactus-plugin-cc-tx-visualization => cactus-plugin-ccmodel-hephaestus}/tsconfig.json (62%) delete mode 100644 packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts diff --git a/.cspell.json b/.cspell.json index 8ad22bc2cc..73fb27310d 100644 --- a/.cspell.json +++ b/.cspell.json @@ -35,7 +35,6 @@ "ccep", "ccid", "cctx", - "cctxviz", "celo", "cids", "clazz", @@ -93,6 +92,7 @@ "hada", "hashicorp", "Healthcheck", + "hephaestus", "HSTS", "htlc", "Htlc", diff --git a/CODEOWNERS b/CODEOWNERS index b561fc8bde..9c00abc80d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,5 +1,6 @@ * @petermetz @takeutak @izuru0 @jagpreetsinghsasan @vramakrishna @sandeepnRES @outSH +packages/cactus-plugin-ccmodel-hephaestus @RafaelAPB packages/cactus-plugin-satp-hermes @RafaelAPB packages/cactus-plugin-bungee-hermes @RafaelAPB examples/cactus-example-cbdc-bridging @RafaelAPB diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts old mode 100755 new mode 100644 diff --git a/jest.config.js b/jest.config.js index 888b1c0a4d..df76347651 100644 --- a/jest.config.js +++ b/jest.config.js @@ -61,13 +61,5 @@ module.exports = { `./examples/cactus-example-carbon-accounting-backend/src/test/typescript/integration/admin-enroll-v1-endpoint.test.ts`, `./examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-backend-api-calls.test.ts`, `./examples/cactus-example-supply-chain-backend/src/test/typescript/integration/supply-chain-cli-via-npm-script.test.ts`, - `./examples/cactus-check-connection-ethereum-validator/src/test/typescript/integration/check-connection-to-ledger.test.ts`, - `./examples/cactus-check-connection-ethereum-validator/src/test/typescript/integration/check-config-files.test.ts`, - `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts`, - `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts`, - `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts`, - `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts`, - `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts`, - `./packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts`, ], }; diff --git a/packages/cactus-core-api/src/main/json/openapi.json b/packages/cactus-core-api/src/main/json/openapi.json index f6972c48ec..8ff71f7fa1 100644 --- a/packages/cactus-core-api/src/main/json/openapi.json +++ b/packages/cactus-core-api/src/main/json/openapi.json @@ -186,6 +186,8 @@ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", + "FABRIC_14X", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt b/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt index 60fe48e4ae..643e99587e 100644 --- a/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt +++ b/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass /** * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. * - * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X + * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC14X,fABRIC2,qUORUM2X,sAWTOOTH1X */ @JsonClass(generateAdapter = false) @@ -40,6 +40,12 @@ enum class LedgerType(val value: kotlin.String) { @Json(name = "CORDA_4X") cORDA4X("CORDA_4X"), + @Json(name = "ETHEREUM") + eTHEREUM("ETHEREUM"), + + @Json(name = "FABRIC_14X") + fABRIC14X("FABRIC_14X"), + @Json(name = "FABRIC_2") fABRIC2("FABRIC_2"), diff --git a/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts index fece1ca1f0..20b1102374 100644 --- a/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -524,6 +524,8 @@ export const LedgerType = { Besu2X: 'BESU_2X', Burrow0X: 'BURROW_0X', Corda4X: 'CORDA_4X', + Ethereum: 'ETHEREUM', + Fabric14X: 'FABRIC_14X', Fabric2: 'FABRIC_2', Sawtooth1X: 'SAWTOOTH_1X' } as const; diff --git a/packages/cactus-plugin-cc-tx-visualization/README.md b/packages/cactus-plugin-cc-tx-visualization/README.md deleted file mode 100644 index 20f5ba92cd..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@hyperledger/cactus-plugin-cctxviz` - -The proposed plugin allows generating process models from arbitrary cross-chain use cases. Currently supports Fabric and Besu. More documentation to come soon. diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts deleted file mode 100644 index 0b6b173359..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { LedgerType } from "@hyperledger/cactus-core-api"; -import { Web3SigningCredential } from "@hyperledger/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api"; -import { - FabricSigningCredential, - GatewayOptions, - TransactReceiptBlockMetaData, - TransactReceiptTransactionCreator, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api"; - -export interface TransactionReceipt { - caseID: string; - blockchainID: LedgerType; - invocationType: string; - methodName: string; - parameters: string[]; - timestamp: Date; -} - -export interface IsVisualizable { - // list of transaction receipts, that will be sent to cc-tx-viz - collectTransactionReceipts: boolean; -} - -// TODO define Tx Receipt for Fabric -export interface FabricV2TxReceipt extends TransactionReceipt { - channelName: string; - transactionID: string | undefined; - contractName: string; - endorsingPeers?: string[]; - endorsingParties?: string[]; - transientData?: any | null; - gatewayOptions?: GatewayOptions; - signingCredentials: FabricSigningCredential; - blockNumber?: string; - transactionCreator?: TransactReceiptTransactionCreator; - blockMetaData?: TransactReceiptBlockMetaData; - chainCodeName?: string; - chainCodeVersion?: string; - responseStatus?: string; -} -export interface BesuV2TxReceipt extends TransactionReceipt { - status: boolean; - transactionHash: string; - transactionIndex: number; - blockNumber: number; - blockHash: string; - contractName: string; - contractAddress?: string; - contractAbi?: string[]; - value?: number | string; - gas?: number | string; - gasPrice?: number | string; - gasUsed?: number | string; - cumulativeGasUsed?: number | string; - from: string; - to: string; - signingCredentials?: Web3SigningCredential; - keychainID?: string; - privateTransactionConfig?: string[]; - timeoutMs?: number | string; -} - -export function toSeconds(date: number): number { - return Math.floor(date / 1000); -} -export function millisecondsLatency(date: Date): number { - return new Date().getTime() - date.getTime(); -} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts deleted file mode 100644 index e16888aec1..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-cc-tx-visualization.ts +++ /dev/null @@ -1,416 +0,0 @@ -/* eslint-disable prettier/prettier */ -import { Server } from "http"; -import { Server as SecureServer } from "https"; -import { Optional } from "typescript-optional"; -import { promisify } from "util"; -import { - IPluginWebService, - IWebServiceEndpoint, - ICactusPlugin, - ICactusPluginOptions, - LedgerType, -} from "@hyperledger/cactus-core-api"; -//import { BesuApiClient} from "@hyperledger/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api"; -import { stringify } from 'csv-stringify'; - -import fs from 'fs'; -import path from 'path'; - -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Express } from "express"; - -import { - Checks, - Logger, - LoggerProvider, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { calculateGasPriceBesu, CarbonFootPrintConstants, gweiToDollar } from "./models/carbon-footprint"; -import { CrossChainEvent, CrossChainEventLog } from "./models/cross-chain-event"; - -export interface IWebAppOptions { - port: number; - hostname: string; -} -import * as Amqp from "amqp-ts"; -import { CrossChainModel, CrossChainModelType, CrossChainTransactionSchema } from "./models/crosschain-model"; -import { BesuV2TxReceipt, FabricV2TxReceipt, millisecondsLatency } from "./models/transaction-receipt"; -import { randomUUID } from "crypto"; - -export interface IChannelOptions { - queueId: string, - dltTechnology: LedgerType | null, - persistMessages: boolean -} - -export type APIConfig = { - type:LedgerType, - basePath: string -} - -export interface IPluginCcTxVisualizationOptions extends ICactusPluginOptions { - connectorRegistry?: PluginRegistry; - logLevel?: LogLevelDesc; - webAppOptions?: IWebAppOptions; - eventProvider: string; - channelOptions: IChannelOptions; - instanceId: string; -} - -// TODO - for extensability, modularity, and flexibility, -// this plugin could have a list of connections and list of queues -export class CcTxVisualization - implements ICactusPlugin, IPluginWebService { - private readonly log: Logger; - private readonly instanceId: string; - private endpoints: IWebServiceEndpoint[] | undefined; - private httpServer: Server | SecureServer | null = null; - private crossChainLog: CrossChainEventLog; - private crossChainModel: CrossChainModel; - private readonly eventProvider: string; - private amqpConnection: Amqp.Connection; - private amqpQueue: Amqp.Queue; - private amqpExchange: Amqp.Exchange; - public readonly className = "plugin-cc-tx-visualization"; - private readonly queueId: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - private txReceipts: any[]; - private readonly persistMessages: boolean; - - constructor(public readonly options: IPluginCcTxVisualizationOptions) { - const startTime = new Date(); - const fnTag = `PluginCcTxVisualization#constructor()`; - if (!options) { - throw new Error(`${fnTag} options falsy.`); - } - Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); - const level = this.options.logLevel || "INFO"; - const label = this.className; - this.queueId = options.channelOptions.queueId || "cc-tx-viz-queue"; - this.log = LoggerProvider.getOrCreate({ - label: label, - level: level, - }); - this.instanceId = this.options.instanceId; - this.crossChainLog = new CrossChainEventLog({name:"CC-TX-VIZ_EVENT_LOGS"}); - //todo should allow different models to be instantiated - this.crossChainModel = new CrossChainModel(); - this.txReceipts = []; - this.persistMessages = options.channelOptions.persistMessages || false; - this.eventProvider = options.eventProvider; - this.log.debug("Initializing connection to RabbitMQ"); - this.amqpConnection = new Amqp.Connection(this.eventProvider); - this.log.info("Connection to RabbitMQ server initialized"); - this.amqpExchange = this.amqpConnection.declareExchange(`cc-tx-viz-exchange`, "direct", {durable: this.persistMessages}); - this.amqpQueue = this.amqpConnection.declareQueue(this.queueId, {durable: this.persistMessages}); - this.amqpQueue.bind(this.amqpExchange); - - const finalTime = new Date(); - this.log.debug(`EVAL-${this.className}-SETUP-CONSTRUCTOR:${finalTime.getTime()-startTime.getTime()}`); - - } - getOpenApiSpec(): unknown { - throw new Error("Method not implemented."); - } - - get numberEventsLog(): number { - return this.crossChainLog.numberEvents(); - } - - get numberUnprocessedReceipts(): number { - return this.txReceipts.length; - } - - public purgeCrossChainEvents(): void { - this.crossChainLog.purgeLogs(); - } - - // todo connection closing is problematic, tests are left hanging - public async closeConnection(): Promise { - this.log.debug("Closing Amqp connection"); - try { - this.amqpConnection.close(); - this.log.debug(" Amqp connection closed"); - - } catch (error) { - this.log.error(error); - } - - } - - public getInstanceId(): string { - return this.instanceId; - } - - public async onPluginInit(): Promise { - return; - } - - public async shutdown(): Promise { - this.log.info(`Shutting down...`); - const serverMaybe = this.getHttpServer(); - if (serverMaybe.isPresent()) { - this.log.info(`Awaiting server.close() ...`); - const server = serverMaybe.get(); - await promisify(server.close.bind(server))(); - this.log.info(`server.close() OK`); - } else { - this.log.info(`No HTTP server found, skipping...`); - } - } - - - async registerWebServices(app: Express): Promise { - const webServices = await this.getOrCreateWebServices(); - await Promise.all(webServices.map((ws) => ws.registerExpress(app))); - return webServices; - } - - public async getOrCreateWebServices(): Promise { - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - const { log } = this; - - log.info(`Installing web services for plugin ${this.getPackageName()}...`); - - const endpoints: IWebServiceEndpoint[] = []; - - // TODO implement endpoints - - const pkg = this.getPackageName(); - log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); - - return endpoints; - } - - public getHttpServer(): Optional { - return Optional.ofNullable(this.httpServer); - } - - public getPackageName(): string { - return `@hyperledger/cactus-plugin-cc-tx-visualization`; - } - - public pollTxReceipts(): Promise { - const fnTag = `${this.className}#pollTxReceipts()`; - this.log.debug(fnTag); - return this.amqpQueue.activateConsumer( (message) => { - const messageContent = message.getContent(); - this.log.debug(`Received message from ${this.queueId}: ${message.content.toString()}`); - this.txReceipts.push(messageContent); - message.ack(); - }, { noAck: false }); - } - - // Precion minimum is 4ms by convention - public async hasProcessedXMessages(numberMessages: number, precision: number): Promise { - while (this.txReceipts.length < numberMessages) { - await new Promise((resolve) => setTimeout(resolve, precision)); - } - return; - - } - - public async txReceiptToCrossChainEventLogEntry(): Promise { - const startTime = new Date(); - const fnTag = `${this.className}#pollTxReceipts()`; - this.log.debug(fnTag); - // We are processing receipts to update the CrossChainLog. - // At the end of the processing, we need to clear the transaction receipts that have been processed - // Therefore, we need a listen method that cctxviz is always running, doing polls every X seconds, followed by receipt processing (this method) - try { - this.txReceipts.forEach(receipt => { - switch(receipt.blockchainID) { - case LedgerType.Besu2X: - const besuReceipt: BesuV2TxReceipt = receipt; - const ccEventFromBesu:CrossChainEvent = { - caseID: besuReceipt.caseID, - receiptID: besuReceipt.transactionHash, - blockchainID:besuReceipt.blockchainID, - invocationType: besuReceipt.invocationType, - methodName:besuReceipt.methodName, - parameters:besuReceipt.parameters, - timestamp: besuReceipt.timestamp, - identity: besuReceipt.from, - cost: gweiToDollar(calculateGasPriceBesu(besuReceipt.gasUsed as number)), - carbonFootprint: CarbonFootPrintConstants(LedgerType.Besu2X), - latency: millisecondsLatency(new Date(receipt.timestamp)), - revenue: receipt.revenue || 0, - }; - this.crossChainLog.addCrossChainEvent(ccEventFromBesu); - this.log.info("Added Cross Chain event from BESU"); - this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromBesu)}`); - break; - case LedgerType.Fabric2: - const fabricReceipt: FabricV2TxReceipt = receipt; - const ccEventFromFabric:CrossChainEvent = { - caseID: fabricReceipt.caseID, - receiptID: fabricReceipt.transactionID || `FABRIC-CALL-${randomUUID()}`, - blockchainID: fabricReceipt.blockchainID, - invocationType: fabricReceipt.invocationType, - methodName: fabricReceipt.methodName, - parameters: fabricReceipt.parameters, - timestamp: fabricReceipt.timestamp, - identity: fabricReceipt.signingCredentials.keychainRef, - cost: receipt.cost || 0, - carbonFootprint: CarbonFootPrintConstants(LedgerType.Fabric2), - latency: millisecondsLatency(new Date(receipt.timestamp)), - revenue: receipt.revenue || 0, - }; - this.crossChainLog.addCrossChainEvent(ccEventFromFabric); - this.log.info("Added Cross Chain event from FABRIC"); - this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromFabric)}`); - break; - // used to test cctxviz - case "TEST": - const ccEventTest:CrossChainEvent = { - caseID: receipt.caseID, - receiptID: receipt.receiptID || randomUUID(), - blockchainID: receipt.blockchainID, - invocationType: receipt.invocationType, - methodName: receipt.methodName, - parameters: receipt.parameters, - timestamp: receipt.timestamp, - identity: receipt.identity, - cost: receipt.cost || 0, - carbonFootprint: receipt.carbonFootprint || 0, - latency: receipt.latency || millisecondsLatency(new Date(receipt.timestamp)), - revenue: receipt.revenue, - }; - this.crossChainLog.addCrossChainEvent(ccEventTest); - this.log.info("Added Cross Chain event TEST"); - this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventTest)}`); - break; - default: - this.log.warn(`Tx Receipt with case ID ${receipt.caseID} is not supported`); - break; - } - - }); - // Clear receipt array - this.txReceipts = []; - const finalTime = new Date(); - this.log.debug(`EVAL-${this.className}-RECEIPT2EVENT:${finalTime.getTime()-startTime.getTime()}`); - return; - } catch (error) { - this.log.error(error); - } - - } - - // Parses the cross chain event log and updates the cross chain model - // This is part of the cc model; have a set that maps case id to data structure; this data structure are the consolidated metrics for a cctx, stores each txid - // run over cc log; if case id is unique create new entry, otherwise add tx to cctx, update metrics, update last update; this is an updatable model - public async aggregateCcTx(): Promise { - const startTime = new Date(); - const lastAggregated = this.crossChainModel.lastAggregation; - const newAggregationDate = new Date(); - const ccTxSet = this.crossChainModel.getCCTxs(); - const logEntries = this.crossChainLog.logEntries; - // If entries are more recent than aggregation - let metrics: CrossChainTransactionSchema = { - ccTxID: "", - processedCrossChainEvents: [], - latency: 0, - carbonFootprint: 0, - cost: 0, - throughput: 0, - latestUpdate: newAggregationDate, - revenue: 0, - }; - const logsToAggregate = logEntries.filter(log => new Date(log.timestamp).getTime() > new Date(lastAggregated).getTime()); - if (logsToAggregate.length === 0) { - const finalTime = new Date(); - - this.log.debug(`EVAL-${this.className}-AGGREGATE-CCTX-NO_NEW_LOGS:${finalTime.getTime()-startTime.getTime()}`); - return;} - logsToAggregate.forEach(eventEntry => { - const key = eventEntry.caseID; - const eventID = eventEntry.receiptID; - let latency = eventEntry.latency as number; - let carbonFootprint = eventEntry.carbonFootprint as number; - let cost = eventEntry.cost as number; - const revenue = eventEntry.revenue as number; - - if (!latency) {latency = 0;} - if (!carbonFootprint) {carbonFootprint = 0;} - if (!cost) {cost = 0;} - if (ccTxSet?.has(key)) { - const existingCCTx = ccTxSet.get(key); - const previousEvents = existingCCTx?.processedCrossChainEvents || []; - const numberOfCurrentEvents = previousEvents.length + 1; - const previousLatency = existingCCTx?.latency || 0; - const previousCarbonFootprint = existingCCTx?.carbonFootprint || 0; - const previousCost = existingCCTx?.cost || 0; - const currentCost = (cost + previousCost) / numberOfCurrentEvents; - const previousRevenue = existingCCTx?.revenue || 0; - const currentRevenue = (revenue + previousRevenue) / numberOfCurrentEvents; - - const updatedMetrics = { - ccTxID: key, - processedCrossChainEvents: [...previousEvents , eventID], - latency: (latency + previousLatency) / numberOfCurrentEvents, - carbonFootprint: (carbonFootprint + previousCarbonFootprint) / numberOfCurrentEvents, - cost: currentCost, - throughput: Number(latency != 0 ? (1 / ((latency + previousLatency) / numberOfCurrentEvents)).toFixed(3) as unknown as number : 0), - latestUpdate: lastAggregated, - revenue: currentRevenue, - }; - this.crossChainModel.setCCTxs(key,updatedMetrics); - } else { - metrics = { - ccTxID: key, - processedCrossChainEvents: [eventID], - latency: latency, - carbonFootprint: carbonFootprint, - cost: cost, - throughput: Number((latency != 0 ? 1 / latency : 0).toFixed(3) as unknown as number), - latestUpdate: lastAggregated, - revenue: revenue, - }; - this.crossChainModel.setCCTxs(key,metrics); - } - }); - this.crossChainModel.setLastAggregationDate(newAggregationDate); - const finalTime = new Date(); - this.log.debug(`${this.className}-AGGREGATE-CCTX-SUCCESS:${finalTime.getTime()-startTime.getTime()}`); - return; - } - - public async persistCrossChainLogCsv (name?: string): Promise { - const startTime = new Date(); - const columns = this.crossChainLog.getCrossChainLogAttributes(); - const logName = name? `${name}.csv` : `cctxviz_log_${new Date().getTime()}.csv`; - const csvFolder = path.join(__dirname, "../" , "../", "test", "csv"); - const logPath = path.join(csvFolder , logName); - - stringify( - this.crossChainLog.logEntries - , { - header: true, - columns: columns, - delimiter: ";", - }, (err, data) =>{ - if (err) { - this.log.error(err); - throw new Error("failed to stringify log"); - } - this.log.debug(data); - fs.writeFileSync(logPath, data); - }); - const finalTime = new Date(); - this.log.debug(`EVAL-${this.className}-PERSIST-LOG:${finalTime.getTime()-startTime.getTime()}`); - return logName; - } - - // Receives a serialized model - public async saveModel (modelType: CrossChainModelType, model :string): Promise { - this.crossChainModel.saveModel(modelType, model); - } - - public async getModel (modelType: CrossChainModelType): Promise { - return this.crossChainModel.getModel(modelType); - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts deleted file mode 100644 index 7d18d6d1c1..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/plugin-factory-cc-tx-visualization.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IPluginCcTxVisualizationOptions, - CcTxVisualization, -} from "./plugin-cc-tx-visualization"; - -export class PluginFactoryWebService extends PluginFactory< - CcTxVisualization, - IPluginCcTxVisualizationOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IPluginCcTxVisualizationOptions, - ): Promise { - return new CcTxVisualization(pluginOptions); - } -} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts b/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts deleted file mode 100755 index 7da664906e..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/public-api.ts +++ /dev/null @@ -1,17 +0,0 @@ -export { - CcTxVisualization, - IPluginCcTxVisualizationOptions, - IWebAppOptions, -} from "./plugin-cc-tx-visualization"; - -export { IsVisualizable } from "./models/transaction-receipt"; -export { PluginFactoryWebService } from "./plugin-factory-cc-tx-visualization"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryWebService } from "./plugin-factory-cc-tx-visualization"; - -export async function createPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryWebService(pluginFactoryOptions); -} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv deleted file mode 100644 index 0b0ec28b6c..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-6-events.csv +++ /dev/null @@ -1,7 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue -1;515ca87f-fbac-49f0-a4cf-d3bf5eb62860;2022-08-03T14:04:52.844Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7621; -1;2a5ca7a6-344c-4dfd-a005-98811fc889ce;2022-08-03T14:04:52.846Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7620; -1;4b3a5b7f-9bb2-413e-b2f4-74822db34c07;2022-08-03T14:04:52.847Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7619; -1;ee00b057-2f8e-4d57-89b0-ec9390a53e9b;2022-08-03T14:04:52.848Z;TEST;send;transfer asset;"[""A""]";A;0;0;7618; -1;d31efa25-097b-4496-9c75-bc8daca1cf51;2022-08-03T14:04:52.849Z;TEST;send;transfer asset;"[""""]";A;0;0;7617; -1;020c5f54-006f-4f49-b675-7cf85fb3cd80;2022-08-03T14:04:52.850Z;TEST;send;burn asset;"[""""]";A;0;0;7617; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv deleted file mode 100644 index 378c12bc6d..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-60-events.csv +++ /dev/null @@ -1,61 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue -10;672c7375-b463-4602-882a-5b50ca93af39;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7646; -10;3095c26a-d2db-4f25-823e-0de1e829e11d;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7644; -10;5c2c87f0-0f27-4e86-85b2-8b0816b10c24;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7643; -10;022e0884-4b78-4784-8929-caa2d1ed7234;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7642; -10;af311552-9ff1-421c-a4f1-d12e5ec20347;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7642; -10;7af1d933-da3c-4835-bc96-4dbbac913ddf;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7641; -9;ddcaff66-949e-49cb-9250-508598fc4408;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7647; -9;9f0eb346-4bfc-4687-8ca6-2fc181260eb0;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7645; -9;33ed7788-50e1-44a4-8d5a-62656dd84cf7;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7644; -9;564c7787-eae0-4dbe-82c7-4a2f07a65286;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7644; -9;66d2cd2c-b5ee-417c-a09f-4910a42468ed;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7643; -9;24a76769-c283-4ed3-a6c1-f495a068a94f;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7642; -8;96b7c76f-7f2a-444f-a263-331292842dd3;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7648; -8;06830bf5-d41c-4dce-aea3-237f0ba7ed71;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7647; -8;5429fead-c8f7-4906-a15b-1d0ff84885d1;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7646; -8;d4316180-80af-4eb0-91bc-e3a7c302b3f2;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7645; -8;552525b6-8ec6-4b65-a8ce-0afc245dadf4;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7644; -8;df8de589-e4c1-4323-b283-088dd60368a6;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7643; -7;5974b1e7-5db3-4139-ab8a-d9e255ea72a4;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7649; -7;39d7a374-4725-48cf-a600-4d0935b7e249;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7648; -7;0fbff6f5-c1a4-470f-a957-d98086e51cbf;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7647; -7;054cbc90-06cd-4461-8509-903fca7fc963;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7646; -7;abbd93cf-9ea2-431d-b688-4f85d0befa1d;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7645; -7;432d3e06-9624-438f-99c3-173452359762;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7645; -6;d022a95a-bf69-4585-8d2c-c1d09c8d2ab7;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7651; -6;40be8287-6f8c-4719-a24d-3270d07682e4;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7649; -6;0c9e2c65-e2ac-4d47-8fab-35029aaf86d7;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7648; -6;125cccb6-56cb-4653-8114-609d29bfced0;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7647; -6;adf7b151-d318-4ddd-9c31-8a0e9319eb88;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7646; -6;29c7f1a7-c812-4c4c-bb55-90ae0c78eaed;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7646; -5;09dfa0a0-1107-4453-8cb4-dcca500b102e;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7652; -5;c81ffbcd-7bdf-44c3-bc9b-a3d664464094;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7650; -5;7e78e8ea-912e-471b-b412-2b2a71c2bdc7;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7649; -5;71587b9e-78d8-4f8f-a3df-568d26dded51;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7648; -5;127b0e58-cf75-4dbe-9767-8053335f90d2;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7648; -5;4173755f-6012-4e14-9b5c-52f628888846;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7647; -4;2be88040-b17d-4e71-854e-7b815778713e;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7653; -4;550643ce-7e2c-4f6a-bed7-6400fa8ba5be;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7651; -4;85b72b5e-c6f0-4d53-8527-8283e0b198a0;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7650; -4;7fb7df34-c7c0-4077-bffa-577dbd11e9ea;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7649; -4;bb1b5e57-bfa9-407b-8797-b64f0e99ec81;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7649; -4;1583ef47-dff0-4897-a9a2-1fddb02817ab;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7648; -3;07803bdd-6f8b-460b-9e4e-378befce11e2;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7654; -3;fb1d93d3-9e98-4213-bf3d-e219d0201fd3;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7652; -3;6ec5ed7d-fad5-41c1-96b7-834370dfddd5;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7651; -3;aa32d8bf-9a17-479b-be99-098931378896;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7651; -3;961f131b-9632-4909-ad73-a30c97d689c8;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7650; -3;e7d9e88c-5a8b-4ae5-aeb3-16bc7fe10d99;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7649; -2;2cdc5e7c-1ce0-43f2-a6a5-cac754beba08;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7655; -2;f48ff1d5-5f9d-4769-93dc-7435f516d3e3;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7653; -2;e4d51446-a241-47f7-932e-187102aca449;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7653; -2;2aa46d3c-111c-4b5b-80e1-5716ba4a889c;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7652; -2;cad9d38d-5791-445f-a7ae-7bad0dea5525;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7651; -2;086a681d-3c3c-49ea-a66c-3251eae97633;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7650; -1;ed54f76d-3ace-45f5-b233-7b541d7deec5;2022-07-07T16:03:18.375Z;TEST;send;initialize asset;"[""1,100""]";A;0;0;7656; -1;bc54f38c-909f-433b-ace9-5acf4c109784;2022-07-07T16:03:18.377Z;TEST;send;lock asset;"[""1,100""]";A;0;0;7655; -1;8006179b-8e93-4ac1-b806-016138c79b7c;2022-07-07T16:03:18.378Z;TEST;send;mint asset;"[""1,100""]";A;0;0;7654; -1;8bfbc22d-2224-4050-b513-205b1529a9d3;2022-07-07T16:03:18.379Z;TEST;send;transfer asset;"[""A""]";A;0;0;7653; -1;a47b4c5e-ed79-423a-a5f0-832af54d356f;2022-07-07T16:03:18.380Z;TEST;send;transfer asset;"[""""]";A;0;0;7652; -1;3aecbfb3-3b9f-43e9-a88d-dc8dc06b0608;2022-07-07T16:03:18.381Z;TEST;send;burn asset;"[""""]";A;0;0;7651; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv deleted file mode 100644 index 11c53ff5f7..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/dummy-use-case-invalid.csv +++ /dev/null @@ -1,7 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue -INVALID_FABRIC_BESU_1;f0e58801-e6dd-44d4-91de-4adb2113a68b;2022-08-03T14:05:37.740Z;TEST;send;createAsset;"[""asset1,5""]";A;0;0;7602; -INVALID_FABRIC_BESU_1;fe6e7084-74da-4d1e-8681-6603111a71fc;2022-08-03T14:05:37.742Z;TEST;send;mintAsset;"[""asset1"",""Green"",""19"",""owner1"",""9999""]";A;0;0;7601; -INVALID_FABRIC_BESU_1;e7466cb2-4eaf-44f0-acd3-0b0dfae52801;2022-08-03T14:05:37.743Z;TEST;send;lockAsset;"[""asset1""]";A;0;0;7600; -INVALID_FABRIC_BESU_1;4df9be1c-6e47-40dd-8722-90072b0b04bd;2022-08-03T14:05:37.744Z;TEST;send;transferAsset;"[""asset1"",""owner2""]";A;0;0;7599; -INVALID_FABRIC_BESU_1;9a130336-c165-4e05-b72c-3b9c3fa583a0;2022-08-03T14:05:37.745Z;TEST;send;transferAsset;"[""asset1"",""owner1""]";A;0;0;7598; -INVALID_FABRIC_BESU_1;b8fef379-e64f-4aa0-97d8-45f28276576c;2022-08-03T14:05:37.746Z;TEST;send;BurnAsset;"[""asset1""]";A;0;0;7598; diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv deleted file mode 100644 index a4e72b6acb..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/example-dummy-use-case.csv +++ /dev/null @@ -1,9 +0,0 @@ -caseID;timestamp;blockchainID;invocationType;methodName;parameters;identity -1;2022-04-28T16:14:23.922Z;TEST;send;registerEmission;"[""1,100""]";company_A -2;2022-04-28T16:14:23.922Z;TEST;send;registerEmission;"[""2,100""]";company_B -1;2022-04-29T20:01:03.922Z;TEST;send;registerEmission;"[""2,100""]";company_A -1;2022-05-10T06:01:03.922Z;TEST;send;getEmissions;"[""company_A""]";auditor -1;2022-05-11T09:47:43.922Z;TEST;send;mintEmissionToken;"[""uuidTokenEmissions""]";protocol_administrator -2;2022-04-29T22:47:43.922Z;TEST;send;registerEmission;"[""2,100""]";company_B -2;2022-05-11T09:47:43.922Z;TEST;send;getEmissions;"[""company_B""]";auditor -2;2022-05-12T13:34:23.922Z;TEST;send;mintEmissionToken;"[""uuidTokenEmissions""]";protocol_administrator diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv deleted file mode 100644 index 2619033017..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-6-events.csv +++ /dev/null @@ -1,7 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue -FABRIC_BESU;0xd184f5a49d170e2f7f9fcb7996e8db3d7764c13d798fc5a795e0d9371dd61435;2022-06-24T14:47:43.716Z;BESU_2X;SEND;createAsset;"[""asset1"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;10065;0 -FABRIC_BESU;0xc315d4ee310a04d4c0949279f4edba34fa8fb35cf5fe4fb1e4b95488202860fc;2022-06-24T14:47:45.312Z;BESU_2X;SEND;lockAsset;"[""asset1""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;8469;0 -FABRIC_BESU;7fddc8aef1a46f23fa33891b4ab6b951c7224671575b573cd47e7711cd9449b1;2022-06-24T14:47:47.102Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset1"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;6679;0 -FABRIC_BESU;7c395a691ba45d7fe921fb5f69b40fbff810459f8f9f274307c58fb070b2910a;2022-06-24T14:47:49.361Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner2""]";user2;0;0.00018;4420;0 -FABRIC_BESU;a6b747257c6e92b8c85292561999dad7dcf56051f2c6c639a2bbbd987a4afbdf;2022-06-24T14:47:51.573Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner1""]";user2;0;0.00018;2208;0 -FABRIC_BESU;fc20c6cd4f1cbd6b06da6cd1fc846a0b2051382096d63cd7e8a67865471526f1;2022-06-24T14:47:53.767Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset1""]";user2;0;0.00018;14;0 diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv b/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv deleted file mode 100644 index 2e6e397e0b..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/csv/use-case-besu-fabric-60-events.csv +++ /dev/null @@ -1,61 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency;revenue -10;0x0b84cd21633da69461dc0189b4ddc566bd4d794cb5b0094348c6d24217c66687;2022-06-25T10:59:25.183Z;BESU_2X;SEND;createAsset;"[""asset10"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.28;0.00018;103484;0 -10;0x255fb16b63d60d9f24f9809e444f0c5da6a1145d9de25c8b8acca5f0791b73bc;2022-06-25T10:59:26.102Z;BESU_2X;SEND;lockAsset;"[""asset10""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;102566;0 -10;1b7572e4c269dc6ee321da24b8eb464d1a6cee310ba3975bd4f90edf414c4766;2022-06-25T10:59:27.347Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset10"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;101321;0 -10;264b1a9e086920b5c8e21562dfd0b7034a313fb1c672d4b0a5805120aacde642;2022-06-25T10:59:29.562Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset10"",""owner2""]";user2;0;0.00018;99106;0 -10;17655a502c1ff999d966b926f99658b8dd84027e3f5b49b6374a162d7ebe39ce;2022-06-25T10:59:31.777Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset10"",""owner1""]";user2;0;0.00018;96892;0 -10;6d173ade6a8da3e9b7b4cdc54a0756d4eeb5a6ecae61edb32c892956f87433bf;2022-06-25T10:59:34.051Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset10""]";user2;0;0.00018;94618;0 -9;0xc27e6a83b344020f5cdffed3ec0e76f85ad1f46bef5874f7237219540626324a;2022-06-25T10:59:35.130Z;BESU_2X;SEND;createAsset;"[""asset9"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;93539;0 -9;0x19c60c14bcc4162e6633f76e0ee12911c8c5a4164a4e84fcdfc5bfa362f4546d;2022-06-25T10:59:36.173Z;BESU_2X;SEND;lockAsset;"[""asset9""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;92497;0 -9;7dc4caed5df3b823497626e64d8251b88ebda89658df4366d2bd85e0629ba542;2022-06-25T10:59:38.453Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset9"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;90217;0 -9;551bfac56479dc5ea1044a081526588ebe272984bfc113edf02cf4c7516d7d39;2022-06-25T10:59:40.676Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset9"",""owner2""]";user2;0;0.00018;87994;0 -9;9b06aaa26a2235df1c83687eb5425ca58e7150f3a6b21b74a5bbac56fb3a768a;2022-06-25T10:59:42.867Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset9"",""owner1""]";user2;0;0.00018;85803;0 -9;e15cdcc70b1bc670b50acf8dd7d074f07e43b49cecce6ef8216e9e25c70856e8;2022-06-25T10:59:45.105Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset9""]";user2;0;0.00018;83566;0 -8;0x9b31a1c51a1498d0cbcbc6e7751ec96847509146f1b0824c72e88e36f28dc675;2022-06-25T10:59:46.224Z;BESU_2X;SEND;createAsset;"[""asset8"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;82447;0 -8;0x7d962f902de9367d477f24f13d106f0de8002f217f401eac16a485d274a03e2a;2022-06-25T10:59:47.386Z;BESU_2X;SEND;lockAsset;"[""asset8""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;81285;0 -8;d5ce85e36492b9c164d88c4ba4615202c20ff7018303ec7855fcbf979aa2038d;2022-06-25T10:59:49.537Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset8"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;79135;0 -8;6f4bacb0a6cc996ebd241a51e73c2b7da61085284f5bb2b7097191324391189a;2022-06-25T10:59:51.679Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset8"",""owner2""]";user2;0;0.00018;76993;0 -8;750c903bd5870a72d6a48836123af036c34bed1ff0f0c427ec7702c9e6d5477d;2022-06-25T10:59:53.840Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset8"",""owner1""]";user2;0;0.00018;74832;0 -8;70f3f9e97cceb4ae4c992c701b75188ffac571ea28bc2a7b664d9d83f7d2d634;2022-06-25T10:59:56.017Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset8""]";user2;0;0.00018;72655;0 -7;0x7c2e2a12a0263a0562f0e874b5367856dff1295b447b6aa6587499520eb483f6;2022-06-25T10:59:57.165Z;BESU_2X;SEND;createAsset;"[""asset7"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;71508;0 -7;0xdd4f0626d4893812a69bbf7369598e8930328bf0a2f72530f5e328a3dab5f23f;2022-06-25T10:59:58.644Z;BESU_2X;SEND;lockAsset;"[""asset7""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;70029;0 -7;aafd581a460cb584394b5b02f158521fece5a64a392764a6c6b64a6144735dd6;2022-06-25T11:00:00.353Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset7"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;68320;0 -7;1dcaef34942fcd520df700e1ddb289940ecd92b48ef422ac8bcc297c816dccc0;2022-06-25T11:00:02.559Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset7"",""owner2""]";user2;0;0.00018;66114;0 -7;3b66f7f62ecbdd4fe41c71f6379b712ad7e3f845b76e75af2f7c08e57aa1011b;2022-06-25T11:00:04.791Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset7"",""owner1""]";user2;0;0.00018;63883;0 -7;99ee4284e38531fc2a4b2524019d48dcd8960d0d784d9c99f47f8514ed77b061;2022-06-25T11:00:06.981Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset7""]";user2;0;0.00018;61693;0 -6;0x2348af3e9cf3e817918c947002ac5c5ce25d1a720c02fc35a90f91cb13bb0ec3;2022-06-25T11:00:07.306Z;BESU_2X;SEND;createAsset;"[""asset6"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;61368;0 -6;0xb257570d87c2025d4a0f5a95a2ed74fdac76ad5329449841ad2347b21d4f3432;2022-06-25T11:00:08.058Z;BESU_2X;SEND;lockAsset;"[""asset6""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;60617;0 -6;0b0aaf2bf5c0f563827bb8560840a9997ad30ef527c2b6ff08de7aea15ef3c7e;2022-06-25T11:00:09.195Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset6"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;59480;0 -6;7f3d17884f04f12f3d0aa514cfbf9c152b445e48e5b7379883c7b11d539460ab;2022-06-25T11:00:11.431Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset6"",""owner2""]";user2;0;0.00018;57244;0 -6;594be967c7b886364cf2187676712bacd40eaa9e71a012bfc51d5af6d1e036e8;2022-06-25T11:00:13.676Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset6"",""owner1""]";user2;0;0.00018;54999;0 -6;c3b4d35769879dfd5b69239b01bc99cb1c24da3ec23b684d9c1e9769e4051fbd;2022-06-25T11:00:15.933Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset6""]";user2;0;0.00018;52743;0 -5;0x4056b743c139167e7520c3b092e506cb0a7bfcb5f01a97ea92cad8193356f063;2022-06-25T11:00:16.066Z;BESU_2X;SEND;createAsset;"[""asset5"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;52610;0 -5;0xc67fcd01535160e32f7b2b1d53cd92708a1bcbf69836000da85539e2e23efa15;2022-06-25T11:00:17.035Z;BESU_2X;SEND;lockAsset;"[""asset5""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;51641;0 -5;42b1100d844150d3223995b6c1baaa94150762de464be17cadee40c186d14b44;2022-06-25T11:00:18.087Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset5"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;50589;0 -5;8a9dd0e172f6b1f76ec9ba19509646b2719036735b713d160224c872e0bfd459;2022-06-25T11:00:20.293Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset5"",""owner2""]";user2;0;0.00018;48383;0 -5;f738b68c0e698d6475df97e8d9d131eb2716cedb0b5ec8ef0725c7678cdb5721;2022-06-25T11:00:22.492Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset5"",""owner1""]";user2;0;0.00018;46185;0 -5;9868694a2d0bfe679138eb43eb3f1fd13443bdd6fa99d4dc1a0a27fc37c76eaa;2022-06-25T11:00:24.713Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset5""]";user2;0;0.00018;43964;0 -4;0x1a674d3f2a7128fd0673ed20bcaa65866ab94e881e6ffe63376d4ab4cd613a39;2022-06-25T11:00:25.504Z;BESU_2X;SEND;createAsset;"[""asset4"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;43173;0 -4;0x5e6d1389a7dab4fe7aa33337e39330d722aec12af775f3d14204c2c3e6e6085a;2022-06-25T11:00:26.032Z;BESU_2X;SEND;lockAsset;"[""asset4""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;42646;0 -4;575bf45fd7e82267451465f7cbba7539f52ede08122839cf7b289e9833618fc0;2022-06-25T11:00:26.921Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset4"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;41757;0 -4;5cea5444721da108ffeac701e33773dde47ac7cf3596463f23b3304c1f85cd51;2022-06-25T11:00:29.124Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset4"",""owner2""]";user2;0;0.00018;39554;0 -4;f453e1de3aee3ac960fa1af1fc53f67f3e14fde5a37c68e30bd0795cdec6d58a;2022-06-25T11:00:31.343Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset4"",""owner1""]";user2;0;0.00018;37336;0 -4;071c140a9278eb6e91ea48988d8baa0eb4bc2bf2e861e11a502a634bc9704f42;2022-06-25T11:00:33.553Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset4""]";user2;0;0.00018;35126;0 -3;0x4365fd66956e3636a770292e7768b204b49c72fe3044171c36877d1d0dbed06b;2022-06-25T11:00:34.209Z;BESU_2X;SEND;createAsset;"[""asset3"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;34470;0 -3;0xcdad311631eaaea0722fff7fee626aff8edd9c1534517da781918277b4fe9c62;2022-06-25T11:00:35.117Z;BESU_2X;SEND;lockAsset;"[""asset3""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;33562;0 -3;5af29303a26443813ab900d7fd28eb4c6c8421333d865ed8c4329545997f79cf;2022-06-25T11:00:35.757Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset3"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;32923;0 -3;6b99476527ac6826128b30f95b9249097f398b38be9062b37dea79e9dced08d4;2022-06-25T11:00:37.979Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset3"",""owner2""]";user2;0;0.00018;30701;0 -3;580e3274acd62a5e4596b3e77308d9ae34b86804950a26bb339cd77a9e90c34b;2022-06-25T11:00:40.169Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset3"",""owner1""]";user2;0;0.00018;28511;0 -3;eb02da68b4ddeab17eae477c1ee4c2b26260d31bd8e15ff8d01dc76a24af8ac0;2022-06-25T11:00:42.330Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset3""]";user2;0;0.00018;26350;0 -2;0x0df56eeaebb034e0c74e7eaac81310536a8f5cb021470f7f596c27e14221c03b;2022-06-25T11:00:43.118Z;BESU_2X;SEND;createAsset;"[""asset2"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;25563;0 -2;0x20d772dffe4ed51f09850544a282032598d0146a4d2b8a6da0334de837b86094;2022-06-25T11:00:44.327Z;BESU_2X;SEND;lockAsset;"[""asset2""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;24354;0 -2;1dec685fc674460e905bc5631934764af97a0a71c4bdaa4cca58f1b1c0097d33;2022-06-25T11:00:46.592Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset2"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;22089;0 -2;0da0bf6a104da6cae5d8e7971a1f05d0c684889043eec86d029108fd385d9ea1;2022-06-25T11:00:48.854Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset2"",""owner2""]";user2;0;0.00018;19827;0 -2;dcce95975672efef29db26bbeffc6a1c5247da4f485168fb581cd308e5589c86;2022-06-25T11:00:51.117Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset2"",""owner1""]";user2;0;0.00018;17565;0 -2;3083629ff79e16f8470e4ea1d8fbc5c9115491fcf6eb7e695e8f7838e0481afb;2022-06-25T11:00:53.342Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset2""]";user2;0;0.00018;15340;0 -1;0x6907cca45d572b05bdf0db922fe58e313e0fdb0df44199ddd96b6005db09e3ae;2022-06-25T11:00:54.159Z;BESU_2X;SEND;createAsset;"[""asset1"",5]";0x627306090abab3a6e1400e9345bc60c78a8bef57;5.27;0.00018;14523;0 -1;0xfbf7a0ef853fd86384adc9b7f67f0cef8e8c68b5745890220ae989538e1946c1;2022-06-25T11:00:55.030Z;BESU_2X;SEND;lockAsset;"[""asset1""]";0x627306090abab3a6e1400e9345bc60c78a8bef57;2.18;0.00018;13652;0 -1;8c6f92d3dde2147ac0632107ad4273106fc73ab46bf340cb6cf7af46e244c67b;2022-06-25T11:00:55.573Z;FABRIC_2;FabricContractInvocationType.SEND;MintAsset;"[""asset1"",""Green"",""19"",""owner1"",""9999""]";user2;0;0.00018;13109;0 -1;4a6ac7d83bb4c5d67b1007688f81a2ff8e0df1792c34db3893eb652c409bcd14;2022-06-25T11:00:57.797Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner2""]";user2;0;0.00018;10886;0 -1;7eb266fae4cf38b200a4f9f3a27d8ba39a1759b1367a0d5b8162f93b58a907e7;2022-06-25T11:01:00.009Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;"[""asset1"",""owner1""]";user2;0;0.00018;8674;0 -1;8a8f26e2aad74625f1dd084ef6fdcb141421b1c17511721350aaff20bcb49dd7;2022-06-25T11:01:02.244Z;FABRIC_2;FabricContractInvocationType.SEND;BurnAsset;"[""asset1""]";user2;0;0.00018;6440;0 diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb b/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb deleted file mode 100644 index e3a085eab6..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process mining.ipynb +++ /dev/null @@ -1,423 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "module 'posixpath' has no attribute 'parents'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;31m# Change path if necessary\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mlevels_up\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparents\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mlevels_up\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0mfile_path\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparent\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"/csv/use-case-besu-fabric-6-events.csv\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mfile_path_other_model\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparent\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"/csv/dummy-use-case-invalid.csv\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mAttributeError\u001b[0m: module 'posixpath' has no attribute 'parents'" - ] - } - ], - "source": [ - "import os\n", - "path = os.getcwd()\n", - "parent = os.path.dirname(path)\n", - "\n", - "\n", - "# Change path if necessary\n", - "file_path = parent + \"/csv/use-case-besu-fabric-6-events.csv\"\n", - "file_path_other_model = parent + \"/csv/dummy-use-case-invalid.csv\"\n", - "\n", - "import sys\n", - "\n", - "if __name__ == '__main__':\n", - " print(sys.argv)\n", - " print(file_path)\n", - "\n", - "\n", - "\n", - "# import sys\n", - "\n", - "# accept command line arguments\n", - "# inputArg1 = sys.argv[1]\n", - "\n", - "#print('inputArg1: ',inputArg1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "# uncomment if problems with dependencies\n", - "#%pip install pm4py\n", - "#%pip install pandas\n", - "import pm4py\n", - "import datetime as dt\n", - "import time\n", - "import pandas\n", - "\n", - "# process mining\n", - "from pm4py.algo.discovery.alpha import algorithm as alpha_miner\n", - "from pm4py.algo.discovery.inductive import algorithm as inductive_miner\n", - "from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner\n", - "from pm4py.algo.discovery.dfg import algorithm as dfg_discovery\n", - "\n", - "# viz\n", - "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", - "from pm4py.visualization.process_tree import visualizer as pt_visualizer\n", - "from pm4py.visualization.heuristics_net import visualizer as hn_visualizer\n", - "from pm4py.visualization.dfg import visualizer as dfg_visualization\n", - "\n", - "from pm4py.objects.conversion.process_tree import converter as pt_converter\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "def import_csv_original(file_path):\n", - " event_log = pandas.read_csv(file_path, sep=';')\n", - " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", - " return event_log\n", - "\n", - "def getStartActivities(event_log):\n", - " s = pm4py.get_start_activities(event_log)\n", - " print(\"Start activities: {}\\n\".format(s))\n", - " return s\n", - "def getEndActivities(event_log):\n", - " e = pm4py.get_end_activities(event_log)\n", - " print(\"End activities: {}\\n\".format(e))\n", - " return (e)\n", - "\n", - "def getAttributeFromLog(event_log, attr):\n", - " entries = pm4py.get_event_attribute_values(event_log,attr)\n", - " print(\"Entries: {}\\n\".format(entries))\n", - " return entries" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../../csv/use-case-besu-fabric-6-events.csv\n" - ] - }, - { - "ename": "FileNotFoundError", - "evalue": "[Errno 2] No such file or directory: '/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../../csv/use-case-besu-fabric-6-events.csv'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mlog\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mimport_csv_original\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mlog_other_model\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mimport_csv_original\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path_other_model\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"leght is\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m\u001b[0m in \u001b[0;36mimport_csv_original\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mimport_csv_original\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mevent_log\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpandas\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m';'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mevent_log\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpm4py\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat_dataframe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mevent_log\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcase_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'caseID'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mactivity_key\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'methodName'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimestamp_key\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'timestamp'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mevent_log\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options)\u001b[0m\n\u001b[1;32m 608\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkwds_defaults\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 609\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 610\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_read\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 611\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 612\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m 460\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 461\u001b[0m \u001b[0;31m# Create the parser.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 462\u001b[0;31m \u001b[0mparser\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mTextFileReader\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 463\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 464\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mchunksize\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0miterator\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[1;32m 817\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moptions\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"has_index_names\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"has_index_names\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 818\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 819\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_engine\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_make_engine\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mengine\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 820\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 821\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mclose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m_make_engine\u001b[0;34m(self, engine)\u001b[0m\n\u001b[1;32m 1048\u001b[0m )\n\u001b[1;32m 1049\u001b[0m \u001b[0;31m# error: Too many arguments for \"ParserBase\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1050\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mmapping\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mengine\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moptions\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# type: ignore[call-arg]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1051\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1052\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_failover_to_python\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, src, **kwds)\u001b[0m\n\u001b[1;32m 1865\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1866\u001b[0m \u001b[0;31m# open handles\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1867\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_open_handles\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msrc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1868\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhandles\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1869\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m\"storage_options\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"encoding\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"memory_map\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"compression\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/parsers.py\u001b[0m in \u001b[0;36m_open_handles\u001b[0;34m(self, src, kwds)\u001b[0m\n\u001b[1;32m 1360\u001b[0m \u001b[0mLet\u001b[0m \u001b[0mthe\u001b[0m \u001b[0mreaders\u001b[0m \u001b[0mopen\u001b[0m \u001b[0mIOHanldes\u001b[0m \u001b[0mafter\u001b[0m \u001b[0mthey\u001b[0m \u001b[0mare\u001b[0m \u001b[0mdone\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mtheir\u001b[0m \u001b[0mpotential\u001b[0m \u001b[0mraises\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1361\u001b[0m \"\"\"\n\u001b[0;32m-> 1362\u001b[0;31m self.handles = get_handle(\n\u001b[0m\u001b[1;32m 1363\u001b[0m \u001b[0msrc\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1364\u001b[0m \u001b[0;34m\"r\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/io/common.py\u001b[0m in \u001b[0;36mget_handle\u001b[0;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[1;32m 640\u001b[0m \u001b[0merrors\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"replace\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 641\u001b[0m \u001b[0;31m# Encoding\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 642\u001b[0;31m handle = open(\n\u001b[0m\u001b[1;32m 643\u001b[0m \u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 644\u001b[0m \u001b[0mioargs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmode\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../../csv/use-case-besu-fabric-6-events.csv'" - ] - } - ], - "source": [ - "print(file_path)\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "print(log)\n", - "print(\"leght is\", len(log))\n", - "print(log_other_model)\n", - "print(\"leght is\", len(log_other_model))\n", - "startAct = getStartActivities(log)\n", - "endAct = getEndActivities(log)\n", - "timestamps = getAttributeFromLog(log, \"timestamp\")\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "->( 'createAsset', 'lockAsset', 'MintAsset', *( 'TransferAsset', tau ), 'BurnAsset' )\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAA70AAAD7CAYAAACmNPNAAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdd5hcV33/8be2qK16l2zJktwt23KvAhdkTDMYiME0E5ogNIWQYAglogREKMEQAqLEYAgYJxCCQwgYgw1yl7tlWy6y5SJZzepd2v398bnnd+/MzvaZOXdmPq/nuc/szs7uPTtz7rnneyqYmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmVklDYqdADMzM+uVscAUYDQwIvMcwE5gD7AX2AqsA9YD+6qcRjMzs9xx0GtmZpYfE4GTgaOBI5PjUGASMKQff28dsBp4BHg4Oe4DHgLay5BeMzOz3HPQa2ZmFs904CXAPOBM4PDk+bUoMF0BPJZ8/xywBtgM7Ehetyl5HI6C4hZgDAqSJwHTknMciQLp2UArsAW4NTmuSx4PVOZfNDMzMzMzs0ZyMrAY9bh2ANtR4PkZ4GXAuAqeuxU4CXgf8CNgZZKGjcBPgEuBYRU8v5mZmZmZmdWhKcBHgAdQkPko8M/ABfRv2HI5HQl8CAXe+1BP8vdQ77OZmZmZmZlZlw4HrkALTW0CrgLmk9/pReOABcBSFJzfDVyGeojNzMzMzMzMAM2f/W+0WNSDwDuBoVFT1HenAlej3t8ngbcCTTETZGZmZmZmZnFNAr6NAsV7gFeQ317d3poJLCH9n+ZHTY2ZmZmZmZlFcSnaG/cZ4C+pv17RY4Br0bDnK9Eq0WZmZmZmZlbnxgA/R0OZvwWMjJucins12jrpGeBFkdNiZmZmZmZmFXQ02kv3aeC8yGmppvHANWjI84cip8XMzMzMzMwq4EXAFuAmtCVRoxmEtmHaj7Y4ao6bHDMzMzMzMyuXC9A2RP9O/H12Y3s5ei+uwoGvmZmZmZlZzXsBCvJ+hIO84MXoPfl+7ISYmZmZmZlZ/x0MPIcWrnLAW+hlaKjzwtgJMTMzMzMzs75rAW4FllP/KzT310fR4lbzYifEzMzMzMzM+uavgd3AUbETkmODgF+jhoHWyGkxMzMzMzOzXpqGVmr+TOyE1IBZaH7v38VOiJmZmZmZmfXOP6G9eIfFTkiN+CywHhgaOyFmZmZmZmbWvWHABuBjsRNSQyahoeBvi50QMzMzMzMz696lwB5gYoX+/tuA24DngV3AMuAjwOSi1zWjlZHvRsOHtwN3Js+VWkl6NPB14FmU/sfR8OzXAB2Z44yy/jepnwB/qtDfNjMzMzMzszL5LvDnCv3tvwfagXcDY4ARwMXAZuCXmdc1A9ei3tP3AOOAqcDlye//HC0iFQxDwfFeYEHydw8GPg+sRMHuosr8S//fG1Gw3Vbh85iZmZmZmdkAPELlFrC6F/XEFvs4hUHvB1Cg+vkSr/1R8rPXFP1+B/CtEq//NdUJeqeigPyCCp/HzMzMzMzM+mkQ2nf29RX6+/+LAtBPAKO6ed2dyetOKfGzy5Kf/STz3H3Jc+eVeP1fUZ2gF2Aj6sU2MzMzMzOzHBqHAsQXVejvHwk8kJxjN/Ab4IN0ns+7k8J5uKWOZZnX70qeO6zEOV9J9YLeh4FPVuE8ZmZmXWqKnQAzM7McC/NRd1bo768AjgPOR3OHjwauAJ4C3lfi9Yej3udSR6le4FJKLXpVKdvxnF4zM4vMQa+ZmVnXNiaP4yp4jg7gj2je7kxgPgoWvw5MS17zUPJ4SC//5iPJ4/QSPzu4X6nsnwlouyczM7NoHPSamZl1bSewA+07WwlPAhcWPXc98Dt0jw7bJF2ZPF5W4m+MB7ahrYuCq5PH15V4/av7k9B+COlfX6XzmZmZmZmZWT/cBHy7Qn/7SeBB4AVoGPBINOd2E3AXaeN0M/Ar4ADwOWAWMBw4C+3xe3vyfTAUzfHdC7yLdMuiLyWvr8ac3rnJeeZW+DxmZmZmZmY2AJ8jHS5cbkeiQPRutDfvVmA52iJpbNFrm9E83ztQD/Q2tAjWP6BgudhoND94NdovdwXwYaq3kNVfo6HNHlVmZmZmZmaWY2fT9XZBtegVVCfovQ349wqfw8zMrEdufTUzM+veTcC9wPtjJ6SGnAGcBnwzdkLMzMwc9JqZmfXsG8ClaMsg69nHgTuBm2MnxMzMzMzMzHrWAtwD/DZ2Qgaoo8RxRpnPcVHyd88r8981MzMzMzOzCnoV0A68NXZCcmw8WpHac3nNzMzMzMxy7kjgHcAPgMdQ7+V6tHLySfGSlVvNwHXAGmAxMA8YHDVFZmZmZmZmBihgmwMsAK4CnkJB7g5gKQriLkI9mdcBq4BDoqQ0nwYB/4oaBP4evT8dwHY0JPyjwOlomLiZmZmZmZlV2HDUE3k5cC2wCQVpW1BQuwiYDwwp8bvj0L66T+DAFxTw/guwF3h15vlpwCXAEgqD4OvQ+34yXlDTzMzMzMysLEahIHYx6rndjYKw1cA1wEL6FoSNR4HvKmBuuRNbQ4YAV9I54C1lNmlP+jPo/d9KYRA8qGIpNTMzMzMzqyOhl/EKYBlagKoDeBz1PF4GzBrgOcYBf0C9l68b4N+qRdOAW4DNwEv78fshCL4G2Ig+n3UUNkI4CDYzMzMzs4bXROF83CdQALUPBbxXoAB4fAXO3QJ8HQXVS1CPciN4LbAWeBgt+DVQ2c/wGtLh5s8l3y9Ifm5mZmZmZlb3WlAv4EIKewm3UTgfd1gV0jIxOd/zwAa0Xc9LqnDeWCYDP0VB/p2ot7cSmtFnHOZcb6FwOPoCPJ/azMzMzMzqxEgUxC5CQe0u0gDoWuIsinQw6kHemaTjQ8B04GdJ2n4DHF/F9FRaG/BJNAd3FfBxNKx5PfARtDBYJYWGjsspzAOPo979BegzMTMzMzMzy72pFM7HPUDnACfWUNcZSbp2oW2NFtK5R/k84A6U7h8DJ1YzgWU2Gvg7FNhvQdsRhQB3JApCt6Dg93Kq07tOcp6w+vZ1wB4K52xXaji7mZmZmZlZn81GC0stAZZTej7uxGipk5koLbvREOaFwNBuXj8IeANwL/p/fg+8EmitZCLL6CjgKyig3QJ8ma4/gwloVeydwNPovSm11VMltVG4OvdeOgfBY6ucJjMzMzMza0DF83HXk+7fuhQFLRehHsY8mI2Cpn3ASvoe0A0CXgz8FvX8rkPB82nkb2XiycD7gdvQZ7IK9fL29rOYhD6/XcnvLkCfdwwjSIPgMFpgP4UNKXnJY2ZmZmZmVsPaSIehZhckWks6H3ceMDhWArswBw2l3g88RnkCuEOAT6AVjzuANcD30UrIMYbitqLg+x+A21FguA34IfAi+j9HejqFDQUL0MJUMU1EjSkhCG4nHU2wGAXI3fXcm5mZmZmZAeotDMHFUtK5lmHV3bzvv3ocabB7Pxp2XYmAbS7wMfQe7Ufv0QoUcL4PzQueWsbzDUdziy8FvgT8GQ1H7kBzk7+Nhl+Xc0GqmSj43Y+GrV9Cfj73ySg9pYbUhyC42kO0zcysQvJy8zEzs9o0DTgbBQnzgKNRL9oKFNDdBNyIhrvm2Vy0IvFfoGD3K2gRqvYqnHsscCZwRvJ4CjAm+dkW1NO8Bg0FfxYNBd+U/Hwr6qEdiXqih6OhvZOAKckxHfUyD0IB6EPArcAtyeNDlfznUJ74GPAmFGB+FviPCp+zr6ai/DsfDUefiRoFbkZ5eCnKx/sipc/MzAbAQa+ZmfVWM1rg6GwUIJyDVjPeB9yHFmsKAcKmLv5G3pyFArKXo0WnPg/8J+r5i2kKChaPQPOKp6BAdhoKasOiTKPQ57IdfQ47k6/XoSHka1Av+woU3D5OvMDtWOBTqGHhNvReXxspLT2ZjfL42cBLUcPBdtRI8PvkuJvqNIqYmZmZmVmFDKdwPu7zKBjciraJWUTtzoWch/6nDhSkXxQ3Of32d2g16VpyOoXv/blRU9M7s9Hc5Ozia+E6CPtEuyPBzMzMzCznRqEgdhGqzO+m9Hzc/i5wlAfzUC9drQe7QS0GvcFZwPXos7gOODVucvokGwSHxqC1FF4nZmZmZmYW2TS0mM8VpNu6hL1Nr0KV+lnRUlde89Ec1hDsnh83OWVTy0FvMA/Nlw3B74lxk9NnzRRuw7WZdHXua6iv68jMzMzMLNdC79RVaCuZ7Iq1Ye/SGFvnVMog1JMb9p29Dg2trSf1EPQG80m3E7oGODJucvotBMGXozwXVskOIyYWoLnwZmZmZmY2AC0U9j5tQBXvbRTOxx0WKX2V1ISC3RBAXUttDZ3ti3oKeiFtqLgHjTy4BjgsaooGLlyLIQgO0wYeR1smXQYcFC11ZmZmZmY1YgSF83FD79IaFPRdjoaRtkZKXzWEYPcuFDBdC5wUNUWVV29Bb9CERh6sAPai0Qn1MkR4OIXXatjLOgTBlwDjYiXOzMzMzCwvpqAAbzFdz8edQ2OsKBsCpIdJewePjpqi6qnXoDcIn+1jKDhcgvbUrSdtKAjOXssH0J7GIQge0+Vvm5mZmZnVidloGOQSVBnuAPZTWDGeGC11cbSi9+QR0t7AWp0H2l/1HvQGragh5xlgB5qDPjlqiipnJIVBcDu61pclz12EVlo3MzMzM6tZzaiXNmyJsg4FuTvQysOh4tuovT+DUbAbev+uovbnffZXowS9wWB0XaxB89MXU//XwUQKV1lvJ12AbjG1u1e2mZmZmTWQNjTf9nI0DzVsebKWwvm4Q2IlMCeGkPb2haGu06OmKL5GC3qDNnRdPA9sRcFfo/R+TkZB8BI0naEDzeEPDWLzUeOAmZmZmVk0k0jn4y4lXcgmbGmyEK322gjzcXujDb0nzwLbUY+XV7uVRg16gxEo+N0MrE++rscVybsT9ttegvJCB7pOrqMxFrAzMzMzsxwIldLs8MTsfNzLgEOipS6/RqBgNwxlvYL6W8RooBo96A3Go9WQt6DpAJfTuEN+s/P/n6Zwq7LLUYNaU7TUmZmZmVnNy87HvYq052UvCnivwFuS9GQkqpxvRENX63nRooFy0FtoAhpBsRN4Cl2HLVFTFN9s0vUBwn7d60mnTnhUiZmZmZl1qxVVGsN83OdRpXIr6llZhBea6a3QW7cJ9dgtBsbGTFANcNBb2sGosWQ38AQK+pqjpig/skFwKK+eS74PW52ZmZmZWQML24ksQkHtLkrPx/Xwwd6biN7PMC9zEfW/Im+5OOjt3iFomO8+4EE07NfXZqoZlVcLUfkVFtEL5dkCYGasxJmZmZlZdRTPxz2AKoWPo+HL7hnpv0moN3cHmoe5iMZZgbdcHPT2ziwU/O4H7kfXtIf0dtZCOnIl26iXLe8afcV0MzMzs5qXXQQmbAcS9sQM83EnREtdfZiB3sudaFhlI664Wy4OevvmGNSD2Q7chlZRt64VB8G7SYPgJbg8NDMzM8u9UKELQ/vCIi/bKNzz0gFZecxEwe4uYBV63z3XeWAc9PbPceia7wBuAs6Pm5yaMZzC6R176RwEe5E+MzMzs4hGUFhh20m6iEtYydR7WpZfGFq6Dy0qtBAYEjVF9cNB78CcgcqCDtTQ9cK4yak5oUxdTDr9Yz+FI2NGR0udmZmZWQOYgoYvLkYV2myvRHY+ruf2VcYx6H3eh95zbx9Tfg56y2Me8EdUPlyHRoBY34WF/kIQHPYkX4ZHzpiZmZmVRXY+7nLSCtfy5LnL8CIs1XAsCnb3Aw+g993bxVSGg97ymg/cjsqOa4ET4ian5k2icCHA7BoJIQj2qA8zMzOzLjSjXtoFKMB6ClWodpDOx70Ib31TTXNJFwm6Dwe71eCgtzLmA3eh4brXAEfETU7dmIKC4CXAStIyO7un+eBYiTMzMzOLbTgagng56oHZhCpMW1CFKczHda9B9Z2JPpN24B68HUw1OeitnEEoLz9MGvweGjVF9SdsCbcELW7XAWwnLdO957mZmZnVtVGkc8OWkm6VsRpVPhfiClFs81CwG1bAvQgHu9XmoLfymlBg9ihaF2AJcFDUFNWv2aSjd55BZctWCoNglzFmZmZWs0KLf5j71U7hVhiXoS1vLL5ssLsU73Uak4Pe6mlF5dBKYA8ql6ZETVH9C0HwNcBGVOasI11t30GwmZmZ5VbxfNwnKFzgJGx14f0e82Ue8AfSYPdFcZNjOOiNYTAqu1ajobiLcVlVDU2k941rSKe4PJd8H1bjNzMzM4uiBbXIL6SwxT4MW1uEhjIPjZQ+69584DbS7VzOiJscy3DQG89wVKY9B2xDwa8XzqueZnRfCes8bKFwCswC4JBoqTMzM7O6F/ZqXISCpF2klZHssDTPx82vQWjY8h2k27ecGjVFVoqD3vhGoDJtE2rQW4TWJLDqCo2rl1N438nuy35wtNSZmZlZzZtK4XzcA3SubHjYWW1oQsFu2K7lWlSRtHxy0JsfI1HAtQVYn3w9LGqKGtsw0hX/r0PzsLPrRFwCjI+WOjMzM8u92WhBlyXAckrPx50YLXXWH2GF2odIt2c5OmqKrDcc9ObPBDTUeSfwNBoC7a3U4mujcEeAvXQOgsdGS52ZmZlFVTwfdz3pXopLUQXiImB0rATagIQVaVeQBrtHRk2R9YWD3vyaiMrHXWgP2gWoPLV8GEEaBIcRSvspbLz1fc3MzKxOtVE4JGwnCnLXks7HnYdWMLXaNRgFu2Hv0auAw6OmyPrDQW/+TUc9ifvQdkcL0CJMli8TUANuCILbSUcwLcaLLZqZmdW0yaQ3+qWk856yK2DOwXsh1osh6DN9Gn3WVwGHRk2RDYSD3toxEwW/+9G0kEtwuZpnk9FnVGoaTwiCPWzdzMwsp6ZReCNvJ62ELUG9fzOipc4qpQ0NUX8W2I0+64OipsjKwUFv7TkaNTYdAO5D5bHlX1iwcQnp3vI7KNx2rzVW4szMzBpZM+qlXYAqWatIb9TZ+bhevKN+jUDB7ho0D/sKVHmz+uCgt3Ydi0bTtAO3oLLYakd2Qcen0L11GwqCvS2fmZlZBQ0nnY97Ldo3sgNtoZFtjfaQrPoXtk/ZiCpiVwBToqbIKsFBb+07HZXXHagx8tyoqbH+mo0amLMLPm6lMAj2cHYzM7N+GIWC2EXoxrqbwvm4C3Frc6MZj/LDJtTYsRj35NczB7314yzgelSGXwecGjc5NkDZIPh50gUhs/dmMzMzKyHMx72CdIuFsM/gVegGOyta6iymCSjY3Yx6GRYBYyKmx6rDQW/9mQfcSBr8nhg3OVYGzRRu/bcZfb5rSBeM9L3bzMwaVmgpvgptdZFdPTLsIzg+WuosDyah3twdwDoU7I6KmSCrKge99Ws+6dY53j+7voQguHhrwOyuCV5Q0szM6lILhS3BGyhcGGMRqgQNi5Q+y5fpqOFjJxoydzma022NxUFvfRuEFri6B43suQY4LGqKrBLC/T8EwWGq0uOkuyp4tX0zM6tJIyicj7uLdLjTtejmNw9vgWCFDkHB7i60GvdC3BDSyBz0NoYmNLJnBbAXjf7xcNj6NZzC+sEeCoPgS4BxsRJnZmbWnSmoxX4xXc/HnYNXd7TSZqFgdzfaI3IhMDRqiiwPHPQ2lhD8PoYCoSVorQerb20oCM7WHw4Ay0mDYK/hYGZmUWT38FuOAtz9FN6kJkZLndWKQ1F+2YfmdS9AQ+HMwEFvo2pFZcEzaD7/FcDkqCmyahpJYRDcjuoXy5LnLsJrO5iZWQUUz8ddh4Lc7WjfxXATGh0rgVZzjkUjAEJDyWU42LXOHPQ2tsEo+F2D1n/wFmWNaSKFOzu0ky56uRgFyB4ZZGZmfdaG5ttejubfhu0H1lI4H3dwrARazToeBbsHgPtRsNscNUWWZw56DXRPuhztB7sVBTpuZG1ck1EQnB1ptpO0EX4+rp+YmVkJk0jn4y4lXVQibC8QNpr3fFzrrxNQXmpHK7VegvOT9cxBr2WNQMHvJrQDwOV4oTvTvO8QBD9JOhLtOrxopjUIV6gqbyi64YxABcoY9L63Js8VG0bpISh70bydYjuSn4FucvvREKc9qFXP+mcacDa6EZwNnISCkRUo6L0JuBGtnmuVMQZdD8NIh+uNonOvZ6mhfFvQ5xW0J8+BeuV3JcemciV2AM4GPgq8ArgF+ALwP6hSYo1nFDAEzdkL940hdN6OKtxbXglcCLyPwnweHEA9fyQ/243uG9vQ/cLq0zjgg8CHUH3gK6QL4cUS6kIjSetCxeX3SAqncWTzbxBGVm1CgdsOStePrGuzSes3LwMORu/lrcDvk+NuCu+jVtpoVEaPIC2zB6PRF1ktKH8X246GomftRNdtyP/h+zzUWWqWg97uDUbzJCYnj2N6cQxJHrsKaqstBMVb0AWzOXNsQRfQ5qJjA/AcsD75nXrXDBxFGuS+EG0Lsw+4DxX+NyXH85HSWMsmov0FpwLjSxwTk8eR6OYxjOruN7ubNADeDmxE18CG5Ovnk8eNaN7canR9DFQYHv8KlLe+iIbGW+0bjPL7wcAEFICMQ/l8XNFzId8PpXMlqdJCI2kIHJ4nze/FX69H+f5ZOgfWll8TgL9FAfAGFPx+m/Lc26ege+UUNBpqcnK+UG+ahBpxRqE83lSGc3alA9VftqEgIeTXDcnX69D0o7WosXoNbljMmo2GPM8Hzkdl1QYUBC9F9aC7qN/3LOTfqaRlczjGFn0/nLSuEmOedOjUCsFwKKs3Zb7Ofr+GNO/X6+fXK40a9A4Bphcdk5Jjaubr8UW/F1rRSwWK4didvGYfqkiECnU2+GwnLaCLhd8rNjxJd7FwIxmEgu3QkhR6AdpQBWxU8lxPQXtxL9pmdOMIN4wQDD+dOZ4ibutxX7WieZPzSVs6x6Kb5W0oAFmaHLX0f8XQCswEDkOrDM9AveTh8SAKbwp7SAPIcITgcivpNbSzxNdhTlJxZW0rag0NwrWQlW11HUt6syr+egS67ickRzY4z/4fe1Hw+wy6BlYnj4+hLahWko7AKDYP+DSqWDjYrT2DUL4+FFUUZyTfT0NB7hQ6r6K7ncIgMhzPo3KnuAd2d/IY7hshOM0q9VypxtZsL/EYlI+H07lHuY3CwDz79XgK6ws7Ud5fg/L9c8n3K0nzv8vOfDkYDYV/N/rcvgB8n8Kys9gQ4AjUKHw4KusPyRzZMnEraf1gA2mdYUvys62kjSvh+wN0HnFQXMYX95g1o7wbyvmRyc/bMt+PQnW4KRQG4dn7wh5Ud1mVOR5Bo7lWoHpbI8sGwfPR/XEt8CfSjoDl0VLXN1PRln+zSRtpDkZ5Ijxm5zcfoOtA8nmUR0OZvSv5ei+FZXapUTdQuqe2VINQGNUWyvQ20k61UKaPSh67C9Czoyb2oc/wWdIGzOdQ3l+JtkJcTR0HxvUa9LagjH0EaUE9HVVOpqMLINhN+sGvRx94aBXMfr2WzkNs6tFIdIOYknkMLbbZBoHpFM4TWkthELwKeBTdRJ6g89CNahoJnE4a4M5DN+s1pEOVl+KhPN2ZhBoKjkPX1KEo0J1BWqiuR5/9s6SB4DPJEb4u1aBTK9pQYDMN5f+DkmN68twhpMHOAfQePI4C4cfQDexSNHf3N8Bn0XBmy6cpaAXtY1Ben43y/SzSBsidaH7c6uR4FpUrz2Qe62XETAgcQmA/nbTyODXzfbCaNABeCTwMPIDuCR5WHc8M4OPA29E9ejHwU1RfOhnl+aOAo1Feb0bl2SqU11eV+Ho1tZHHwwiMELTPTB5nJF/PQvezdvR/PQw8iIK7O5OvGzHvNqP7VqhDvRgFaqEO9Xvgd8RdW2AGyrPHoLJ6FmmgGxpn9pLWR7KB35rM92so3SFVq0ah+kk2wA9leHicQXpP24Pq7OFYCTyE8v4qajwgrvWgdyyqhB+JKuJHJF/PJm21WYc+uBCQrUIV8/D92uomua5MJO0pDzeO8P1M0saFfagwXIEqPI+gm+19qEW43Irn456IWtFWkga4tdRKWU3NwBx0gzsOmIuC3RDMrUcVgdCj+Vjm8JBHNbCEBoHscQTp9bAZVaDuT467k8dGrEzlwXBURhyL8vyc5DGM9NmAyqxsL2Z4XFPtxOZcG2njQKnHZlTxfBiVv/cnj3ehyqhVx+FoWsXbUPl0APUm7UGV24dRRffh5HiE2ghqB6oVvR9Hkwb+R6FAajjq1bsHld93opFhD0VJaVwtqG4QeoFDR0K2jvUbVMcut8mofnIs+nzCY9iTeB2qXz5B5+DtWbof2dCowuilbENB+Pow0rrLdpTfl2ce70aNCDWhloLeaagV8mRUAM1BGX0QKowfRx9AaFV+EN1QXRGPZwi6YELLWziOIw2iNqHPKtxElqPegL7cYLMLMlyALtT9wL2kBfAfqUyAXetGA6ei9+9k0qHe+9CNYznp5xOuL+ufMaQ9h3PQ+30CChTC/PGb0Hv9Z3SjtvIK8/dPzhynokbSrSjPh56d8Og8Xx6tqPEn5P/weBRqlFxDeh+4E42CcJldHtl75IWokXo/CmbvRcHbnWhPVw9L76xUuXESGu22DridtMezEUeMFQfBL0D1v5Wki2L1pw42GtUXs+/7McnPQt0xW1Y/QHnW27BCo1FdPltuH4Pq2oPoXHbfTk47FPMa9E4HzkyOM9DFNAwV0itQ5fDe5Lgftd5YbZlCYU/iXNSI0YoC3vvQAgq3ospPCABC4Rpu4GHBhe0oP4Qbz014Tk4pE9B7dgFwHuqB6UCt+bdmjkYdxlVtTagydUbmOAZVsp4C/oDy8/X4Zt4fLWhqw3ko35+GGhl2oN7F24E7kkc3MsQxCgUQp2WO6ahcWgHcgK6DG9BIE+tZGwpuXwG8FN1vd6D74p/Qe7mMxui9rZRWlG/PQYtfvgDl5Q1oqO+vgP+jMTtehgNnkdbTzkHvVzYIvp7OC4POSl57Lno/ZyfPP4Xy652Zx42V/AesV8agUVKnZI7sZ/YntMvJjahBObo8BL3NqPVmHmmgexCqcN8P3Iwy+L2oJceFdP0ajALf49HFcwa6oFpJF0o5AVVkw1ySpahX7D48bKWUFnRDfjFqgT0RtULfgfbnuxm18tfTHJZaNxJV/M9Cn9kZ6Bp4gHTu1EfcBJYAACAASURBVB/oeqGsRjcXNeqcjypOI1DZ8Qd0E74dNeq4vMivKagH/izUYHEyqivcj3qMrk8Ob8uXmgK8Gm1hdS66n96Ktj+7AZX5bsisnGZ0fz0XeDmq03agMud/gJ9TmeG+tWA0qoecj67n49B78wBaxHEGCnYPQSMNbkN59nYU5K6reoqtv8ah+vtp6DM/CzXCrUaf6Y3En/9ddbOBBcA1qLUmrGR8HbAIuIjOq69aY2pFFZ6FwH+hlv7iTdVPJh8NOHkxBAVLV6DGgg40/H8J2py+1L62ll/D0ee5GFUA2lGvzbXAZZTe96+RNKMK5mI0YqEDVZKuQeWGy4fa10bhNXAAjeS5Dn3GU7v+1bo2FJXp16JGsFAuLKBx35O8GIs+m6vQUNwDqJF+Aen800Y0B+1e8BAqq/eja3oxusZjbAFkldOC7sGXo7Ip7MTxOKqjzqdwhem6MBgNsfkOGkLWgZb2vhbdsObES5rVoCOA9wK/QDeTDtSTcyXwKhqz0GxCvbk/Id0W61bgI2gIs9WPGajcvBFVGHYA/4l6eOru5tGFkN+vIm04fQD4R9RD6CC3vk0G3onqEDvRdfAn4AN03mqwHp2M7ndb0XoA1wKvp3BHBcuPwahu8p+k2/D9O+oFq3eDUI/fEjQVsQMNff0W8DKcZxvNYNJOmcdJG6mvRPf04m1Ta8ZQVAn7IQpM2tFQhU+jIWet8ZJmdaQZDf/8BGpFDfv+XY1aWdu6/tW6cBD630Nj0p9Rxe/gmImyqpmM9t28HuX9Z1HgN7u7X6phhwOfQ5WmDjQ8/8O4YaeRtQGvQXWNrWgK1H+i+az11AjUhAKnG1Devxf4INpOzmrHWNTbexv6HG9DDRb1lFdBO6l8lrRucheqq5wQM1GWO8egXuBbUD55FvgSGgJfE+ah1vew8fhS4EOod8Ks0qYB70PzvkIv2M9Qy1I99f6cgYZ770etZF9GCyJZ45qNAt6wLcNv0fypWtcEXIx6ttvRqI7Po0qVWVYb8FYUGLajtR8+jbbXq1VNwFvQQjAHUK/ui6KmyMrlLOA/0H18FWrArOXgtxV4I2kA8wzwRTya03rncOAzaMGzDrQS+jtI9xDOjbFouN1ylNA7gPejAMQslkmoRfUmlC8fQy1Ktdwyfi6axxZ6uV5Huie1GajS9ErU+9uB8v/LqL1GnyHohvcQquz/EngJNTz8yapqNhoVsAE1fn4DrQ5bSy5EFb/9wPdxQ0+9mgl8HY1SeAgtSFZLRgN/h0bg7EMj7eajBhuzvhqERgT/AE0HeA74FDlovJwJfBctKLEVjdk/KWaCzLpwLLqpbEI3lh9RWxWIE9HQ5Q4UzJwfNzlWI85EK4e2o8VCzo6bnF5pAt6Feqz3oMr+0VFTZLWsDQ0DfhJVyK8k/4s8zUDb3XQA/026N6nVt0NRwNiO7vdHxE1Oj0ai0UVb0VoiX0ErMJuVyxSUxzagufBfQytEV9V04NuoQvI4GpLR6CuIWm0YBvwl6T60V6FNt/NqFJrwvx/dBM+MmxyrUSeg4c7tKIicEDc5XToLBed7Ub4/KG5yrI60AG9Gcwy3okX+8jhK5jK0wulytACQNZ5T0VadO9B0rbyN0mlCo3DWoL12P4J6e80qpQ2NIH4OLV65kCqsDdUGfBV1Nz+BVk/0glT5cT9qGZ4bOyE1oAl4E9riZB9aWTxvW/m8FO1tth54G9W58b0f5aFwVGNBrHKd0/m/Z5egeVYb0ND4vBiBeuDa0fD9avZsdRQdn+jl7/2p6Pc+WpHU9Z2vg+4NQ0PldgAryE9D4nA0v/MAqmc16qq2Me5BedSK5jfuQw2WeamfnICG3O9DUwaquVr6M3Qur8OxHwVEv0D7xNYil909G4W2t9qF6u8VG712HurV3QC8h3y2kDayk0kv/q9GTkstaUYt66vRcMpXxE0OoOD246jy8yMiDOVA8yerXeEYyDmd/3tvJPAvKMD8J+LPkT0GjbxYC7w2UhpGkOaf9fS86vu8zOs/V/SzJrRTwcPJ360mXwe9NwMN/d+Leg1iGo8W/1lHfSw+Vw4x7kF5dBqaK3s/8Ue+vBcFGzcQb8pJKKs3Z55rQcOq/yH52S5qb6qly+6+mYXK733Axyjj/PGhwDdRBem/0Phq65+HUS95JXyddL/KteR7BcBKvg/9NRYNde5AW19Uu7IaDAN+jipi74+UBqi9oNf5v+/ejObI/JZ4Q9NeD2xHq/zHrNCFitSq5PFDPbz+N2iOaFdB7zLgEcpTjvQlv/g66JtBqId+P3AN6m2ttoPR4kUr0eqlJg56UwejfchXEWee7wi0Ddh+YBFxG0pLBb1Z1yY//37VUlQeLrv7bhC6V+9BayAMuINoAqqMbALeMNA/ZhXLKK2od+KtqCDoIB89ll3JywVTykWowLmb6lfCh6AAZANauS6mWgp6nf/77yQ0wuFmqt/Q8zY0muEK4k+TCRWpD5ButdHVaKYTUY/cpykd9JZbb/OLr4P+Oxe9d9dT3cB3CBoV8AD5X1yr2hz0FhoL3IoaSKq5hs5otAPAWvIxCqGnoPefkp//pmopGjiX3QNzKmoQupcB7M4yGm0m/QReObNcKpVRLkYLcwxDrVsdaG5QXuXtgik2Cw23XAFMruJ5v4MKvDwMy6mloNf5f2CORBWan1O9BVNejHoNPlul8/UkVKSOQlvudaAVpEv5TzT94KPkK+j1dTAwx6MGx2uo3nXwLfSZeY/1zhz0djYZNVL+kurk0Rbgd8k585JHe9vT+6WqpWjgXHYP3Ay0l/lt9GM9hEHAr1Frd173tWtGwz+XoQUpNqEg/Uuki6C8hMKJ7vOAt6NVEfcmz32t6G8uRL18O9GwuzuT54qHczShvS9/gYa57UHv15Xozc8qXpghe1zaz/Nn/VdyXlBLXAfKkF0tfPA2lDGeR3MflqHV94oDvN6+rrfp7u37kAdT0PDEm6nOMJNXoykEr6zCuXqjqwpH8XW3A113XeXR3lynXZ2zhc755JclzuH8P3AvRHNj3lmFc01Erdo/rsK5eisb9L6WdF/v4jx9FMrDYygd9Ja655R6/hwUOD+J8sz9wFuKztXX/OLrYODORdfBe6twrpAnXlWFcxW7gcL3/Znk+XcWPf/tzO/0tuzva72rK5W6B3X1+uJ8ORc1RK9G9btHgMuJv/fsOajB8M1VONdn0PuVh4b4oKs5vTPQAnUd6LPODnUNZXUoE7M2ZH7215nne5uP+1O2F3PZXR6HoyHi/9rXX1yAPtQzyp2iMmkGfoUu/I+hYagjgQtQRituAfoa6VzNf0TDiA4DniYtfJtRC9FutFDXuOR1l6NgpLgX5JTkby5Jzt+G9k59FC3jXqqHsLvWkb6eP5iAPquwb2tT8n91AH9V4vV/n/y9d6OK2wjUyrSZwoCit6/rT7rz2EpUyjGowP/7Cp+nBY2o+EGFz9MXpSoc2evugyhfjEL5bB/wvxQ2EPT1Oi11zuPRe9PVTcP5v3y+gioAPS3iNFBL0MIsoyp8nr7IBr1NaAhhB/DGotf9EPhi8nV3Pb3hnjOvi+f/hPLLWNSwfEMXr4fe5RdfB+XzBfT/VXq13GWoshvLEah3aS0wLfP8X6LK79DMc30t+6F39a7ulPse1Nt0h/M+iPL9eNRQ95Xk+R/0Iu2V9l20sGwlA/AjUJnygQqeoz+yiw4WH3vR6ImuVpTuqsx5M52D3qC3+bg/ZTu47C63S1G6T+vtL7SiVr/eFEqxhHlX3y3xs5fRddD766Lnv0z6f4a/+fkSf/NHyc9ek3nuFFRxL84MoZXmMyX+TncZpa/nDz6IPq9s4RfmNNxW4vX3oqEqxT5O4YXQ29f1J915vmCKfQr17FSygv5adFM+pILn6KtSFY7wWX+vxOu/mfzswyVe39vrtPic56PC/4Ju0un8Xz7jUSPPuyt4jgmoxXlBBc/RH9mgF9RC3gHcR1rGzwS2kS7mOJCg9ztFz78wef4bJf5Wb/KLr4PyGYnK/I9U8Bxz0XtSse02eukNpBX1ZmAOarQvXlCrr2U/9K7e1Z1y3oP6ku5w3n8s8Tt3JT/r7p5UDUcl6XhRBc/xLdS7HXt1/2JdDW+ejEbMPYEackq9NwMJenvKx/0p28FldyXcQh+Gh78I/ZMzK5WaMrgTpfH8nl6YCJnxbb34m6X297os+dlPenGuMZS+QKD7jNLf89+JLpCs40lbvornYfxv8vwn6D6Q6+3r+pPuvF8wWWNRK9zrK3iOK4E/VvDv90epCkf4rEvdTM5OfvZAidf39jrNnvMNqOJ5Qg+/4/xfXv+BWn0r5Y1oqGCs1dG7Uhz0tqLe6A7SKQf/iiqCwUCC3uI9kg9Knv/vEn+rN/nF10F5fQ8t4lkpH0YV82rNHe7Od0iHai6n9L2ur2U/9K7e1Z1y3oP6ku5w3lIjHT+S/CwPKwM/SOlApRwGocaPvOw9ntXTnN7Tkp+vo/NojYEEvT3l4/6U7eCyuxLeiRrwh/b0QtBF/WQlU1MGO9EH0dvl/UNmnN+Lv9ndsazod16PVntcjVYhzb62VBDTXUbpz/mPTZ4/vsTfuy/52ReKnj8SFfIdSVp+g1qaiodj9/Z1/Ul33i+YYndQ2UURbqvw3++PUhWO7q67GcnP9pNW5Pp6nYZzfhUNPetAqxl2xfm//C5HW6dUyhfQ0Mm8KQ56QfOZOtCKqVPQPKfZmZ8PJOh9YdHzE5Ln/6/E3+opv/g6KL93AVsq+PeXAL+v4N/vi6GoV6gD+GkXr+lr2Q+9q3d1p9L3oK7SHc5bvDYLFPaMx3Y1WlOmEiah/zMPqzUX6ynoBfVwdgCXFD0/kKC3p3zcn7LdZXdlzEHpPrb4B6XmA4yi+8yUJx19fH1vPqTDUQFY6si2hHwOFTo7USvi0OQ1YSn5/rbg9vb8kAYE4YaVPY5LfvYWCj/nFcnPzkfDTo9GW4Y8BbyvH6/rT7przWYqu4/pCFShrld9vU5PQwtnrEe9a8ULXgXO/+W3jcpuhzEiOUct+C6a43w66gH/JeVrEGgv098BXweVsAXl1Ur1xA5HPRF5sJu0V/sCyr9acp4rx90pNaw3Dz3zwXYqt/5CuAdsrdDfr7Q1yeMhvXx9b+ZG9zYf96Vsd9ldGSHfdqrLlPqgVwPTu/hZXjyUPJZqiRvo3+ztRRJWd3xX8rv7evE73VX++3r+ZuBNaOJ5qUw6GQ3LPYjOQ3tCT/QH0DD2+agA/TqFC1r05nV9TXf4u7VkFqXnRpTLempjj8burrvw3MOkn29/r9M3ka54OBRtIVK8d6bzf2VMQ8MuK2Ut1d//ur92okoCaCjkF7t5bSV1l198HVTGdJRXK5XGjVR3O7zuvBJtIfZONK//Z3Re3KmvZX+llPMe1FO6S5VT05PHR7pPZlVMQXWHSlhH5172WhLqU88XPb8HTV0pbryIUf9y2V054Tp9rvgHpQLbP6DVu86pZIoG6Mrk8Q0lfnYZyth9vaGEv3lZiZ+NR70TCzPPhfeuuDWwu4yzHV1w4Xf/kXSiel/P/2LUEv3vXZxrHelk9ewQ0SeBC4teez3ai60JrVLYl9f1Nd3Q/fuQN8cBh6L/vVJuRa1xeWpFLiV81sUr2kJ6Lf6gxOv7ep0eSB5/i+YszUGLjmQ5/1fG+Sg/VsotaIjwoRU8Rzl9E82d+xFqiImhu/zi66AyLkDb1VXKXWgxq+LGvGqbiYZavw7NU/0GcBad54r2teyvlP7eg/qT7leXeC7Md/5ZF79TLc1oRNRdFfr721DvY/G1XwtORwHdfjpPIXgKlTfF9fQYC5O57K6cC1FH1RO9/YU/ojkLea2EF2+FMg0Ny34NatlZVPT6ruZXlfqbB9DQ5VnohnQW+jBvp/AG9c/J3/wtGjYwFA3JvDV5/oYS5/jX5GcXojkTD5DeXPp6/qspXFSllHOT8+0gncj+JKrEvQANjRmJWnrD/qlNfXxdX9Pd0/uQN79EhX8lRz6cgN6P2CtCZvVmu4jRKF+9B410+C3db1nU03Va6pxNqCGuA22lETj/l99JKF2VXBE0LBCVt90BSs3p7clA5vQWP9/dvK/u8ouvg/I7Gv0fF1fwHBNRo99be3phBbWiz+Y9mecGo8+qHXhF5vm+lv3Qu3pXd8p9D+ptusN5/4yGgU5IjrBl0Q/7+f+U0yvQZ3RYBc/x1yjgmdjTC6usqzm9k0hXb+6g9FaTYWGmn6Ke8onAJ1EDV09zenvKx30t2112V8YI1MNbavX1Lp2CutUvr0SKyiRsOH4nGoa2BX1A2daKMEm8+OjqZtaMCrk7kr+5DX2Y/0DnseFhM+f7M+e/DhVG2XNlNxCfjBYeeB4Nb/pR0d/tzflnFv39/V38L1eX+L9/jCa3fwktJrMZjX1fjrZYyq5019vX9TbdWT29D3nxDlQQVDIICH6NFi5orcK5ulNq8/HsIgbF191OlEc+ROfKQ6nXl7pOLy5xznCDeKzEz5z/y68JNXTeQuUbO9+D7i9zK3ye3nqGznmlVF4OSuXXDjQ89CUlnt9M6XtRuK5+XOJnf5E5X6n8chy+DiohNLJlK4WV8kM0THZwhc9TSqigZ/MuaG5vcX4JK6D2tuzva72rWKXvQT29PgS9R6BFFZ9B5dVjqE4cewufJhSIlNohpJzaUAPl1RU+T1+UKqvDsRsFetfQ9aJTTWix3kfQ1nkr0P0oLGQVjsPofT7ua9n+t0Xfu+wur2+gtTj63FjzN6jC/+aeXmhWh16BbnR9ai0agMNQQdPVXm5mlbQI9TydWIVzNQE3Ao+iqTRmefE5dB1UY+GWmWiYYLXuMdY7pXqY82QRCvCO6+F15fBiFAf8TRXOZTZQb0UjIEpNqeuVL6IMX7x5t1k9eycKeL9DdYf4X4Iu2DzujWf16z0o3y2o4jknA6tQy3Jxq7NZDH+LroO3V/Gc70Z1rNdU8ZzWvTwHvS9F+aWaZfXfoOui1Iq/ZnnxJjRlYcCNiAvRRfa/5LMQMCuXMWhRjw60amuMFczfi24wV9D9EEuzgWoCPovy2ycinP9QFPiGrRXMYhiC5qi1o3mf1fZNNNTSgW8+5DXovQANUf23COe+HL0n3yId7m6WBy3AYlR+l22HhbNQxWQz1W1hMquWl6H5IqvRZP+YXonmvv6J/GxrYfVlJJqTs5t0Pl8ME9EKm7vQHHqzajoYzWPfikbaxDAI+DKa2/dXkdJgPc8ljuk1qIz8MfHW/XgVmsO5HO2oYBbbwWjBuV10XmF6wIaj3qcDaHXnF5T7BGYRnAL8D7rB/Rvq7c2D44DH0bLrsSpjVp9eihZlWQ2cGTktoJbaL6GW2mso7/7rZqW0oOGaz6MFBA+PmxxAq822o17ntshpsXwYQjrN8MvE31FlFlpEazvwcWBY3ORYg2pFK21XpRHmTNItRH4PnF3Jk5lVyElomfZ2tM1UV6v9xTQO7Z3YjlYzzkPFzGrXdODnqOz+GTA1bnI6eSlaVXMH2kbCFSqrhPNRoLsHDYuLvVdu1l+glUcfRSPsrHGdiPLpVvI1CmYwaqDZhlZ3fhPxg3FrHBeTrr79BapYfp+Lhl92oD1p34BapczyqgUNE/o/FEjejoY1591ZaK/gXcDXUfBi1luTUW/BdjRNJU/7QRcbjOaPbUXzfT9AvoISq10vIB3Vcy35bUSciraj2Y96fT3FpbGMQ726e9Aq97PiJqdLU4DvoV7ou1AMEHvLRatPTWgP5ptQ3f1qtPp9FOejif/7gHXAP5Hfm4k1pploK4rVqID+DfDymAnqhxa0yNUqdDP8DjA7aoos7w5GU1J2os3a/5baaZicirbv2gGsR/sFjo+aIqtFTahn4GYU7P4ZuDBqinpnEPCXaJ2JbSj/j4iZIKu4ocDfoSGb69D9PsZimn01F01L2Y/qJx8GRkVNkdWL4eg6eATV3a8lH1OyADgIDUlbhSLxP6Mx156fZTFMQ3O2/oAuljVoKfOZEdNUDoPRUKdHUUPTz9Gw0OaYibLcGIQaIn+CGkeeQr2ltTpUeALwaTTkcwfwA+AcPJzOuncQ8DFUWWpHU1lqcSrWcPR/bEYNV59Ei79Z/RiDgt2n0Wicz1KbQeNM4J/RKJ0tqBf4HGojcLd8OQP4F2AjarT/NnBk1BR1oxkNGb0K2IRuOLcBH0FbVJhVygzU0LIUBbrb0DCIV1N/w26agUvRonLtKLhZhBuZGtVUVDl+DPVo3QK8DTWS1IM2tLLtHej/exz4FHBIzERZrgwFXo9G8uxHDSXfoD5Wmp2AGm03oGku36E+/q9GdhiarrQNBYlfQY31tW40qofdhcrqJ9FIu6Mipsnybxa6pz+C8s1yNNVpQsxE9VUzMA8NsXuOtLKyBK1IOzZe0qwODEcLUC1GWwu0o96ga4HLaJzhYIejgPcp0sJiEXBEvCRZFUxE+fxaYC9qZFwCnBAzUVVwNLrm11CY30+OmCaLow24CDWyb0aNndeh66JWRzd0Zwj63x4g3VJnIe79rRXDUN33WtQwsxJV7Ou1Lnw0KptXktb/r0D1tnrriLC+m4Py/1JUf9+I6jDzYiaqXFrQsLsvoNb6A+iivxn4TPKzkdFSZ7VgOFqM5JNogYe96EK5By38cCH107PVH62oAvgDNC+oA7gTrbR4Ah4SWg/moLm5N6O8vxX4KVr1dWjEdMXQgob2L0Hz9TtQT/eX0f2k0d6PRnEk2lP1OnQP2AP8Ds39mhIxXdU0CHgx2rd1B3oPfgG8lsZp7K0Vw9B9+SdoqOYu4D+S5xplWlITcB7wVTQ1qwOt1XAVGp3hxdoaw3g08vK7pI3Wq4Bvovp7S7ykVd541OL1HdJWoP1oldpvAW9FNzdX1BvXoWg5/G+gFu19KJ88DVwJvBEXll1pRZWiJaSjLNahAOkdeFhorZiGenauIg3sNqL8fxEO7IImNA9oMfAQep92oTn9n0Qtx+5ZqE2zgLcDP0L7lneg4aA/QyvGjo6XtFwYiepLv0d1qN1oh4L34XI+lmnAu9Bc8h2ogXIpsID67dXti6PRlMc/oTzbATyI6v6Xkr/t9Kx/JqKGuK+j7bcOJMdtaJ/nudVOUJ4CyoNQpeXM5PFkVKHbiOYG3IPetPtQpWZfnGRaBbSgobjHo4tgLvr8J6GW/LvRXrq3ormKq+Iks2Y1ofd0fnK8ALU+P4p6DG9B7+0DqECyOJpQZSCUg2cCx6BenJtRpfb3qPfen1P3pqOehfOTYzqqfN6Ktiq7HY04ejZWAq2kYWgP9VOB09B2bYegHrKb0RoGf0Sf3f5IacyziWhNlYtQo+dI4H70nt2AFhjdECtxdWwMuq+eg8qdE1Gj2/VoKPOvUaOldTaS9L07B9X9WtDcztvQ/e4OFAPsjJRG69lQVM88JTlOQ/WZdtSZeSMqg5aikYhR5CnoLdaKbn5noALkeDS0bzAKhB4kDYIfRhfIkzgYzrNmtMLf4WhRg+PQRTIHXTD70Gd5L2mgexdqubbyGYoqk+clj6eiG892dHO5Bb3/96E5OA6wym8Q2nLqeFS+nYFuEqPRjX0Z+hz+iCqqvtkPzGGk+f00VP40oaD3DhQE34fmBz8ZJ4kNZxQq+49FFd3Tk69bUGB2O6r03pA87omSyto1BAURL00e56JyZzl6T29G5UxY/M56bxaq2J+F3tvjUXkS3tvfooB3V6T01bIRaGTOPFQ3OQXtXbwf1fuXoXrhg6ihfn2cZDa0cajsPgaV3aegsrsVjcIJDRVLUf1lS5xkdpbnoLeUVlRZOT45TkBvdFjxbh+qsDwCrEA9WY8mzz2NgmWrrFa0P+ghqPf28OTxCFTJD3Nu15E2WtyHAt0H8WcUQzMqvEIP4+loakEzumkvR5/R/cnxCNo/0hWl3jkI5f9jUUNPaMAbgVpBH0OV+jCS4X7ci1Vpo0hbo09Lvp6e/GwbKovuR3n/AfQZPY0bgPpjLJqqcgzK98clX4eht9tR+X975lhZ/WTWvbEokDiXNAhuQRXSu1BFdRn6LB7HHQig92cW6eizcIxDZUEIcm9EQ3Xdi14Zs0l7EE9BDcVjkp9tQJ/DQ8njgyj/PoPL64FoQrHVYajHdk7mMUwr3IrKi2WZI8zZzqVaC3q7MpI0uDocVdjD9+HC6EBzG1ehystTybEKtfY/hwIxB11da0XDpyaTBrYzUGVxBurFnUK6L9tW0oaHbEPEI+So5cdKGoYqpnNRsBYamsIqobtRIPAY+kzD10+h66mRWriHoMB2Oip3Dssch6MF2EBDerKNB/eim/SOKqfXShtD2vN4LMr/x5Hm+b2oAfXxouNJtChHo1Z4h6HK0cEouC0+whzGPahimm1QWA48QY4rSXUsDEfMBnNzUKC3D5XnD6HRVw+i+/cq6rNnbTxpQ/3RyXEUqksORsHTw6hhIBz34LI7pmmojA6NaeHrccnP96L6yMrkeCJ5DHX+tTR2UNyE6vJTUd19FmpcmJ18PRPVbUAr44dGhezjU9VMcDnUS9DbnYkUBmczk6/D98ULIW1CAfB6dFGEr9ejSuvmEkctBsqtqJJXfIxFc2knJo9TM18X75e1gbTxIDQgPIUaFZ5E75/Vl0mkjUuHFR2jMq/biOYwPYUCgmdIG5Y2Fh157FFoQRWh7DEB3WinkQa5U9F7EmwnbQDIHo+g98Fqz0SUv2dTGMzNpnDBlT0oz69Glao1yeM6dO/YWPSY5wrXSFR5DPl+XPI4BQW34XEqaSUTFASsJG0QyH79JB7BkHdDSQO+Y5LHo1F5H0Zp7UKfZbjfhyBiPcrra5Ov8zAtaQhp/WVy8vU0VP87JHOEFa/3oTy7HAX5D5IG/g5wa8MkVF4XB3Gz0X07dMq0o7y6BpXZz5GW1xtQGZ09tlbtP+i/kagOPy5zZOvy0zKPk0lXD+9A70FoGMg2EjxOHdVdGiHo7clQdPMOBeKUWq5KugAAFmtJREFULr6eiDJTqfdsJ2kAvAtdHAdQAH0g+X5P8rqdpHOT9qFKcrHNdG75LrXiXxvpjWhw8v2w5H8aQRrYNqO5gkNJg9u2En+PJM3rM8fqEl+vQ4FtI/XmWc8moWspBITTMo8HJY+lVlrdim4ym9D1sDt5rvjrEBwXXx+7KKxgDSHtXQ3GoGu3Bd0YRqLrofjr0ahyP4bOtpEGNc8kxxpU8VuNronnSvye1a/hqNI8lTSPh/w+FV0PEym9Z+xmlO+3oAr17uTrkJ83J49hPnf23pH9G9lrIXtPCMK9oxk1TLWha2QM6f0ifD0eVZSK/0Z7kta1pPk85P9nSQN95//61ELaYRACxez3U+mcx7eh/LIF5dPtKJ9vz3y/FzWEbMv8XnG9qDhPh7pNa/L1mOSxLfP9KFR/yzbEgq6n51CZ/SSFgfsqVNHPYyOslccQVCeZgsroKRQGgqERezyd6/r7SQPgHShf70V5d0fy9SbSuj4ovxXXk8Nrg1AnyRpKej1ly+jBKI+PSL4eg+5BIcAttUPB86QdeKGH+5nkMZTZT5GPRqqKc9Dbd6Mp3UMajmEoA7egykbI0KEini3AQ2bOChWTYtvo3EqevbjCjSJcZCFI2Jz83lbSilR3h1kllepBHY8Cg9AYMwxdAyNIr6dwTZW6PkIlKCiuREF6/YRGqO3oOtlW9PVW1LBT3Bu9kdoc0WH5MIy05zT7OAHdU9rQvWA06X1hLIWVn3ANBE10bkQqVckKjbDtqKK2k8Kgehdpg23ohc72SG/A9wbr2QjUSfBFtHjWp0gbE0NgGo7wfSudGymzeR465+nQKBTK8i2oDA/HZlSWT0L7OX8KbW/1HJ3vC2ZdGVd0ZHtQ21A9ZAjK39mGxGz+LdUIOZq0txnUaFlcvmbrMCH/b0F1/tB4tCf5vZ2onN5E597p5/HUETMzMzOzsnodqmS/KXZCEt9EgfERsRNiZmZmZmZmte0w1Bv19dgJyRiCVqa+g3RRHjMzMzMzM7M+GUp+g8sQjP9z7ISYmZmZmZlZbfoumlM4O3ZCuvB6NKf94tgJMTMzMzMzs9ryBhRQvjp2QnrwfbSwz8zI6TAzMzMzM7MacSRaKOpLsRPSC0OBe4DbKL21i5mZmZmZmdn/1wYsB26l87YseTUHbfeyOHZCzMzMzMzMLN9+iPZyPiR2QvroHWg49kWxE2JmZmZmZmb59C7gAPCS2Anpp6uAdcBBsRNiZmZmZmZm+XIcGiL8udgJGYARwEPAjUBz5LSYmZmZmZlZToRg8QagJW5SBuw4YCewKHI6zMzMzMzMLCd+DKwFpsVOSJm8Fw3Tnh87IWZmZmZmZhbXB1CAeEHshJTZT4DngKmxE2JmZmZmZmZxnArsBj4ZOyEVMBp4HPgDnt9rZmZmZmbWcMYAK4Hrqd+g8BRgD/D3sRNiZmZmZmZm1TMI+AWwBpgSOS2V9iFgHzAvdkLMzMzMzMysOv4WBYIviJ2QKhgE/BfwNDAhclrMzMzMzMyswk5HQ34/EjshVTQWeAL4NQqCzczMzMzMrA6NA54E/ofGC/5OB/YCH46dEDMzMzMzMyu/JuA3wFPA+MhpieVjKPA9M3ZCzMzMzMzMrLw+jgK+s2InJKJBwK+AVajX28zMzMzMzOrAOWjhqoWxE5IDE4FnUfDbaEO8zczMzMzM6s4kFOT9Nw7ygnOA/cD7YifEzMzMzMzM+q8J+B3wGDA6clryZhGwGzgpcjrMzMzMzMysnz6DA7uuNAHXAY8CoyKnxczMzMzMzProfDSE992xE5Jjk4E1wM9iJ8TMzMzMzMx6bwoK5q6OnZAaEBoH3hk7IWZmZmZmZtazFuBPwCN42G5vfR7YBcyNnRAzMzMzMzPr3hdRAHdC7ITUkBbgz8AKYGTktJiZmZmZmVkXXg60A38ZOR216GBgPfBvsRNiZmZmZmZmnU0HNgDfj52QGvYy1GhwWeyEmJmZmZmZWaoVuAm4HxgeOS217qvAduDo2AkxMzMzMzMz+RqwDQdq5dAK3IwaEIZFTouZmZmZmVnDeyUakvuW2AmpIzOAjcC/xk6ImZmZmZlZIzsU2IyDs0p4LdABvDF2QszMzMzMzBrREOBO4F48DLdSvomGjR8ROyFmZmZmZmaN5tvAVuDI2AmpY0OAu4BlyddmZmZmZmZWBa9H83hfGzshDeAwYAvwz7ETYmZmZmZm1ggOx0FYtb0ONTJcHDshZmZmZmZm9WwocDdwGzA4cloazfeA54GZkdNhZmZmZmZWt65Egdes2AlpQEOBe3CDg5mZmZmZWUW8HQ2xfVXshDSwOcAOYHHshJiZmZmZmdWTY3GwlRfvQI0PF8VOiJmZmZmZWT0YATwI3AK0Rk6LyVXAOuCg2AkxMzMzMzOrdQ6w8qcNeAi4EWiOnBYzMzMzM7Oa9VfAAeDC2AmxTo4DdgKfjp0Qs0Y3KHYCzMzMzGrMEGA4WqG3DQ0pHpH8rAUY2cXvtdH1qr47gT1d/GxTia83A8cAvwP+CVjUi3Rb9b0X+AbwEuC6yGkxa1gOes3MzKwRDAcmABOBsckxEhiVPI4ERgNjMt+PQsHsMLQdzdDk6zzainp8twH7UXC8LTm2Jo9bkmNr5mebgQ3AxuRxb7UT3gB+ApwPnAisiZwWs4bkoNfMzMxqUTMwGZgGTEXzWSehwHZ88jgp83WpYLWroHBb0c/2opWR9wHbM4/7k9ccSF4XbAY6SpxvD+rRLWUUped+ZnuRm1BgPggF56DgneT7QcnPm5PvR1EY1I+iMKjv6j1ZhwLgbDC8AQVszwHPJI8buvhfrNBo4C5gFXAByi9mVkUOes3MzCxvmlAQOys5DgGmAAejAHcaCnizQeImYC2Fgdo6OgduG4DnKRwy3KhaUNAcGgayjQUTip6fhN77bKC8GwXCq4uOVcBK4AkcGAenADeh+b2fj5wWs4bjoNfMzMxiaAOOBA4lDW7DMZN07utu4CnUs/g0hT2Nz6Kg61lgV/WS3tDGoEaHcBxE2tM+BZiePB8aJLah4Dd7rAQeBR5HveWN4kNo/vV5wNLIaTFrKA56zczMrJLGArOBOWjhpfD1UahHF9TrurKLYxUeDlprWkmD36noM88es1AddD9q0HgQWI4+7weBe1GwXG8GAb9Avb4n4l5ws6px0GtmZmbl0Ix6bk8ETkoej0dDY0FzXlegvUsfSr5eDjyJF09qNCOAI1DDxzEo3xwNHE7aw78KuA/Nhb07eXy66iktv7Hof3kIeDml536bWZk56DUzM7O+akLByumkQe7xaMjyXuABFKjcAzycHM9ESanVkhbUC3wMCoJPTI7DUJ11A4VB8M3UZr46Hfgz8DHgK5HTYtYQHPSamZlZT1qAucA84Gy0/cp4FOA+BtyZOZahebhm5TIS5b+TUUA8Bw0RHoLmdC9Fi0QtRQFxe5xk9slHgc8A5wC3RE6LmZmZmVnDaQFeiFaZXYqC2A60YNTPgA+i3t1SW+yYVUMbWhDqU8D/oeHzHWh++P8AH0YBcl4NAn6FhnGPi5wWMzMzM7OGMA14B/AfKHDoQCvsfht4Cxp2apZXzcAJwAeAq9FQ6A40Z/zbwMWk+x3nxUTUkPQrPPrSzMzMzKwiDgU+QTokdCfwvyhwOCxiuswGqhk4A+2LeztaAXwPcB3wTrSgVB6cg1axfn/shJiZmZmZ1YupwELgVtQTthb4JvBSYFjEdJlV0kTgzWgkw04UAP83cCkwPGK6ABahKQQnRU6HmZmZmVnNGoS2R/kt6lXaAvwAuBDPy7XGMwq4DPgNsA/tCfx9tAJ5DE2oB/rRJG1mZmZmZtZLw4F3oz1B29GCP68FhsZMlFmOTERDi5ejkQ/XoQaias+xnYxWov5Zlc9rZmZmZlaThqG5uhuAXcB30DYvMSxDwURfjlqfT3w28EdgI+n/9L0qnv/+5Jxzq3jOWjcIjXz4P9RA9DAa+lzN4Pc8NBLjnVU8p5mZmZlZzbkErVi7FfgH1JMV0zI6V+IvRkHZ1UXPj6H2g95DgO1oKPkUtMfs96le0HsyaaD91Sqds97MQcP/DwB/prpzbT+PGqrcYGFmZmZmVuRo4AZUUb8SLViVB40W9C5E/8PFkc7/ddIe5rVoz+W8ehgt4JRXJwM3oWvqO8DoKpyzBQXaK1CDiZmZmZmZoUV5tqOtWU6NnJbe6CrorQdfQf/bCyKcuxVYD7wV2Jyk4xUR0tFbeQ96QcOb34jm2z5OdXp9D0af479V4VxmZmZmZrn3CTQH8Uso6KkF9Rz0fg39b/MinPtiNKx9GBpS3YG26MmrWgh6g8lokattwAVVON/L0HV9WRXOZWZmZmaWWx9GQy/fHTshfdRT0PsSChe2mge8Ha2wuzd57mvJa5tQgPALNJd5D/AMGuI9o4e/ew7w8eT3dqIFoN7SRZreBtwGPI/mXC4DPoKCoVJ/u9TCXM1o+PPdyfm2A3cmz2W3jurL////2rv3GLmqOoDjX3b7oqV0S0tbWghtrFA2bcG2mohKCIL4hxhDfGAU0EQjUkBNTDQ+IpKiRjG+EhVNNCgaYxQVFYsEn6CilKYWKaCkpaUtRVZ26YM+oPWP37m5s3fv7N4ddndmdr+fZHI75945c87sNJnfPef8Tq2fpX5DJEU6RgSVsxvs03Cvq9q/a6j/WV1Wp62tYBLwPeIzeOUYvN8Xic/wrDF4L0mSJKnlvIYIeD/U7IY0oOpIbzZqegtwI7FOeSmwgzzoW5OuuRlYBMwALiD2PN3NwMCstt4/AVcRQeESYk102Sjtx4hRt/cR645PSH3oBX5ep+5iHZ3AL4kg9CrgpNSfj6S6f8rATMFV+p+ZSwTEF6TnHem6Y8D7Sz6Dqn2qel0j/Wunkd5MB9Hv3dS/mTBSphDf0T8DO4FHgW8SCdIkSZKkcW8j8OtmN6JBww16i/28if5B7zYGBlTZSOcNg9T7rUL5ean8a4XyTUTQUfRxqge916byz5TU8/107tI6dQ3W/8x1xAh3R03Z59Pr7yt5z6p9qnpdI/1rx6AXIqHVk4x+duwriRsGR8hHwg8TU9iXj/J7S5IkSU31cuIH8OpmN6RBww16393Ae2SZoMtuDGT1vrVQviiV/6JQfkcq/wRw4hDvWy/o3ZDK15S85op07od16qrS/w1EkFtrJXmwtKxwrmqfql7XSP/aNegF+DCRJXvKKNU/C9hP+RTwI8A9o/S+kiRJUku4jhhpalfDDXovHOK6twF3A7uIKd+1AcLvB6n3vEL53FS+vlB+JvAg+RrZ3xB/g8GmTheD3gOUBzC1j/vr1DVU/5en61aWnPtnOvfZBvtU9bpG+tfOQW839T/zkXAJg3+WRxn6BoykpGPoSyRJUovpIpIKTRSDBUbriOD5APBaYBox1Tnb47Q47bnW0Yrv/wiwglgv+20isdBXgO3A2op1ZF6a2lT2KBslhaEDwyvTcRMDg6MV6dzl9P/dV7VPw+17I/1rRz3pOFrrersY/Pt5XLpGUgUGvZIktZ8dRGbiac1uSAu4Oh3fC2whpn6OhmzU+FpgMTH6ug/4KrCwwuu3pOPpI9yuTuAdRPKoskBzPrEOdBFxU6BW1T5Vua6R/h0bxrWt5ox03D5K9T/G4L/Tn6O9Z3tIY8qgV5Kk9rOeCHiLiYEmouy3TGehfCSDy23AxYWyu4Hfpvc/uUId2VZCZfuuziH2f/1AA217HZFR+Qd1zj9FnnDqyprybVTrU9XrGunfPmJv6exveCPlSbda0RXEFlJbR6n++4jp38+XnDsCfIe4mSFJkiSNW98FHicS3rSb4a7pLa6PrfWldM2dxNTbacAq4G+p/A/DqLfemt5twEPENlEziKnTbwSeAR6g/yDCYFsW3U6sOV5HbJE0HTiXCHD+np5XaWetHwHfGOQ8wPmpnv3k60Cr9qnqdY307+upXRcD84i1w2XZn1vNK4hgtCzAH0lnEIHvC8QU94PkidaKn6UkSZI07swjtqhZz+hlkB1p51CelGdd4brlda57U0mdncQI4mZiXW8fcBfwhsJr31mn3iy50q0l596czp0JfIHYJqqX2DLmX8R2SNmaztfXafNNhbauBf6R2rqXCPQ+Rb4GuWr/FxfOlY0IQgTFxXpurdinqn0fbv8y84HbiPXpPcTWRmXXtZLTyP/fDbZefKRMAt4CfI7IoF1MviZJkiSNa6uJQOROYoqrpNGzjBj53oxJpCRJkqQxs4pIaPMwcHaT2yKNV5cRswjuBU5qclskSZKkCWcekVjoMLGdTDuu85Va0VLgx8S08JuBqc1tjiRJkjRxdRCJdfYATxPrXIsZjSVVMwO4nkgetYWBGawlSZIkNclsYrT3CJFE6D24n69U1QLg08RWTz3ANUQyKUmSJEkt5ixiL8+DxA/4G4gf9JIGOpvYBqz2/8ucprZIkiRJUiXziZGrPcQP+p8Al+Lor3QycDVwD7FmdzPOjJAkSZLa1jTgXcDdxJ6uvcTI1kW49lcTx0zgcuAOYgnAPmLf4osYm313JUmSJI2BhcAHgfuIEa49wC3Etixux6Lx5iXAWuBXwAHgEHA78HZgehPbJUmSJGkMLAU+CvyRGPl6HvgL8ElgDZEVWmonxxPZlr8MPELc2OkDbiOmL3tjR5IkSZqgZgCXEPuRPk4EC88CdxHbt1xIBBRSK5lJfDevJ76rzxHf3ceITOYXAlOa1ThJzefaBUmSVM8K4HzgVcCrgUXAYeB+IvnPX4EHgO1Nap8mnk5gGbAaOJf4Xnancw8R38t7gd8BO5vRQEmtx6BXkiRVtYQIMrIguJv4LdEDbCQC4I3p8W/gaHOaqXFiKrAcWAW8LD1WEutwDwEbiCA3C3T/15xmSmp1Br2SJKlRM4Fz6B+UdAOTgL3Ag8To28PAlvTYhsGw+psKnEmM4C4j9pg+i/guTSYyLG8iv6GykfhuHWlGYyW1H4NeSZI0kqaRj86tJA9kFqXzB4nkQlkg/B9ga3rsHuvGasxMBk4jZgssBs4gD26XENOWnye+B9kNkizQfRRvlEh6EQx6JUnSWJhFjOZ1kwfC3cDp5EmGDpIHwFuJUeGtRFKtXcTWSi+MZaNV2VTgFOLmxpKax+J0PJWYAQCwnwhkH6H/TIBHiTXjkjSiDHolSVIzdTIwUKp9LCT/vfICEfg+ATwJ7CgcdxPri58m1nzqxTsBmAPMAxYQf6tTiCB2ATF6uwA4ueY1h4nkZltLHtuAp8am6ZIUDHolSVIrm0oEVmWB1qnko4vFrZT2EcHvf9Oxp3DsI9Yd7yW2ZeqrKRtvo43TgROJNdgnAl01/55FBLVzyYPb2ufTCnX1ElmRd6XHTvrfeHiCuPngiLyklmHQK0mSxoMuIhCeQx60zSVGIGuDuOw4i3y6bdEhIhDeCzxD7Pnam849k469qbyPWG/6LHmgdzSVl8leV2syMaJa1EkEppmpRAA7hdhTOXvdJCKIzY6T07Ervb6zTlueS+3sIb8ZkN0oqL1J0JPKdqfXSFJbMeiVJEkT1fHkI6Cz6D8CWjsSmgWfHen5celagNnp2EX+uyoLSouyoLSoNqguyoJqiGzF+4iET3uJIPtZ8iA7qycr7yUP3rNjXyrfi9mPJUmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmq7/8mvAZmTZ6wxAAAAABJRU5ErkJggg==", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Execution Time : 0.001\n", - "Execution Time (ms): 1.402\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAABKgAAABZCAYAAAAaXByKAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd5wU9f3H8ddtOeohEIKIWKLYEEssPzVobARNxA5IYkNjQWMsoLElxp8tloi9/4LYRawxGgu2EDVGY4IoFgg2LChFmnB3uzu/Pz4z7t7e9p292d17P32sx83Mzn73dm7uO5/5fD9fEBERERERERERERERERERERERERERERERERERERERERERERERkc6mIegGiIiIiIhkMSboBkhVeyDoBoiIiH8UoBIRERGRauUE3QCparqWEREREREREZGKc1AWlbQ3BgUvRUTqTijoBoiIiIiIiIiISOemAJWIiIiIiIiIiARKASoREREREREREQmUAlQiIiIiIiIiIhIoBahERERERERERCRQClCJiIiIiIiIiEigFKASEREREREREZFAKUAlIiIiIiIiIiKBUoBKREREREREREQCpQCViIiIiIiIiIgESgEqEREREREREREJlAJUIiIiIiIiIiISKAWoREREREREREQkUApQiYiIiIiIiIhIoBSgEhEREZF68B7gFPC4KKgGFmBb4GVgJdbW+RV4jbWBOHBTBfZdjOHYexwacDtERKRKKEAlIiIiIvXiB0CD+zgjw7LTAmpXoe4BPgPWBIYA31bgNY7ArgHGAl0rsH8REZGSKEAlIiIiIhK8rsAmwHRgBfAusHEFXmccMA3oDRxYgf2LiIiIiIiIiNQVBxhT4nNPd5+/foZ1J5Ec8ncSNtxtsfv9/e42/YArgLnAauA/wP459jMeuBZYimVBnZe27YbAY8BCYDnwKLBjhv14j6dSnjsSeMNtxwLgZqBXEe/FMwyYCWzgrn8mw88mX1sLWZ+vzZdmeL8fZWlLJmPc54iIiIiIiIiIVFylAlQAPd31HwKjgR5YgMcL6lztPr7nbnsoFmzZPMt+ZgL7AU3Aye6yXVO2+4+77/5Y9tLVWKZU+n6OSdv//kACuADoA2yFZVc9hw1bLOS9eG4jOfTxFawW1TrpP5gC2ppvfSFtLqcGlQJUIiIiIiIiItJhOiJAdVsR+/wzlgmUaT9/SlkWxgqd/9b9vivt30sEyyxK3096gOp9YFbaspHutnukPTfXe+kOLMGKpAOc6D7n3LTt8rW1kPdSSJsVoBIRkTZUg0pEREREOrO3ith2MdnrQqUGZOLY8Lf+7vergdeBP2AZTt2AGFYMPZdB7uu9mLb8NffrnmnLc72Xg4E3seGHAFOBVqwmVap8bc23vtg2i4iIAApQiYiIiEjntirL8iHAw8CX2HA1BzgSG7KWyYq071tp29feC6vVdDXwDfAEsEOetvVzv6bXqPrKXb5u2vbZ3gvAUcDdKd8vwupcDQZ2Sds2X1tzrS+2zSIiIoACVCIiIiIi6aLYbHrrALu53zcAd5CsoVSsJcBEbIjdrthQub9hBcezWeh+vdx93fTH4QW+9nrY+5hM26DRvu76cUW2Ndd6v9osIiKdjAJUIiIiIiJtbQCshQ2Dew8bsgfQpcT9DaDtEMB/AMcCjcB2OZ4333397TOsmwkcUuDrjwPupX2wqCcWUBqDFVYvpK351hfa5kSBbRcRkU5CASoRERERkbY+Ar7Gsn2GYBlCI4CflrHPocBpQC9s5rvjSdZzymUi8GPgLGz4XD9gElaY/LECXtfLWro4w7qVwFVYoGpUEW3Nt76QNn/hft3UXf8FuYN1IiIiIiIiIiKBKHUWv29oO5RtStr6sWnrHSzQkmp7bNjacuAT4BZgWsr2AzLs526sSHjqsrnu/vYBnsEylpYCM0jOaJder8kBdk5pywjgVSwI9CVwj/s6+d7LgLTlW6e9x0vT1j9VQFsLWZ+vzZ4bsM9qqfvvQmkWPxERERERERHpMKUGqKS+KUAlIlKHNMRPREREREREREQCFanw/sPAFtjY8o2BNbECjN2xdN6VWCHFd7Fii59WuD21YCdgQtCNEN+NDroBJdLxWF1exWp41KIJ2PEk1WkSdnxJeQZgdX7uAl4MtikiIgXbDatTdi42HFPKo/5z7VD/x6xLMm6zDhav6Q18i8VsFgAfYBNgzCI5cYjvKhGg6gWMIsLBwK7E6EGYBOvQyiBC9CREE2G+ppWVOMwDFtEIQBc+pZmngPuAl+ics3usgxWpfDDohogvBgE7Bt2IMuh4rB61fByBddZ2xGZ7kuoyCqurow5aeQ4FrsVuzh0F3IgViF4RZKNERHLoidUhOxFYBhwAnIzVC5PSqf9cGzpz/ycE7A6M7RJh7+aY1Qfs10TLD/pDzy6E+jURWb6a+IrVJOYvJvHpIqLxBKFImBXAS7E4D2HH+PIA30dOmxDmdsI0EyXG/sS5DodZOLTg5PxvKQ4v4PA7HLaiBXBo5HPgDKAp4PfV0TSmvr7U+udZ6+2vJ9PcR62q9fbXM9X4Kc+awEPYTbVbsAu+0dgMcB8CewbXtLqg41MyUf+kfDtjGRFLgOOwjIlLscyIJ4C1g2tazdPxWRs649+XJuCMxjBfAM4P16flvINwXvgtzrI/4Tj3ZH+03Ikz6zKc647E2W8b4tEw8XCI1eEQt2Oj5arGQMLcSwMJNqSFm3BYkicgle+/2TicjkM3WomwFEuRrPRwxGqhE1p9qfXPs9bbX09qPcBT6+2vZ52xg+aX1EBU+gxm6YGrznbDzS86PiUT9U9Kly8QNYy2gSspno7P2tCZ/r5EgImRMMu6NdJ6+j44sy/PHZDK91h8K85NR+Ns2J+WhgYS4RD3AGuV29ByiqQ3ACcSYQ4DOZipNPABUcbTfpLeYm0GXAHMJ8KZ9KKRK2jkLWDbMvcsIiIiUi4v+DQVeBir2/B82jYLgIOBQ4CDgLdQNpWIBGtn4D/A8cAJwD7AZ2nbvAxshQXWb0LZVCK1brvGCLOiYS47ez+aPrueyBW/gM3K/K3u0wPG7wkfTCJ630k0DOzN6EiYOcD4cvZbaoCqDxEeJcR1nEl33qeR0WXsLZu+wEXAO4TYiY0I8Srwa59fRURERKRQo4G3gW2A4diFXq46U9OAocCbwLN0zmyqI7G6NiOBIUDXYJsj0ul4WVMvAXOwc9KtObZfhdXQ+zGwEXbOUzaVSG1pAE4JNfDqsI3Y6N0rCF8wygJLfgo1wCE7wvtXEv3NSHqEGrgxEuYRSkxbKiWkNJBGXmENfsbThLgI6FbKSxdhMPACESYRJczVhJhC5xnyJyIiIsErJGsqm86eTTUYuAZ4HHgHmxXoK6ww7RTgPOAwbDKFNYNpokjdKiRrKhtlU4nUpnA4xK2hBq763YFEpp9LeMMK/3Xt1ggXj4EXfktD3x7s0xjmdWx2wKIUG6DaiChvsiEbMosIw4t9uTI0AKcAjxAiwmFEeBAFqURERKTyis2ayqazZlO9Qdt6LA3A97GZPQ8HfgvcAbyCTXG/GsvyeNzd/kcd1lKpNecBP8WOJ2mr2KypbJRNJVJbouEwD0VCHPXYRBrOP9iynDrKjzeFNy8huuGarN8Y5jXsvFGwYgJUA2nkBbagLy8TLb/8VYn2BaYTJsJIwkzGOjkiIiIifisnayqbzphN9TrZ+2shIErbPmkXLOtqH/f7WZVrmtS4I4EnsYy8D4EHgN9g06f3CrBdQSsnayobZVOJVL+GcIjbG8OMnH4O4ZE/DKYRa/eBl88nMnRd+jWGeZ4iiqcXGqDqRiPPsh79eYYofUprqG92AR4hDBwK/D7g1oiIiEj98StrKpvOlE31ObCwwG0dbObDWdhsYgDLK9EoqQsbYnVOdgGuxrLvjscCyUuxY+9x4EwsaNM9mGZ2GL+yprJRNpVIdbugAX7+6ATCO28SbEP69ICnzySybj/WbIzwNAXWnywsQBXiGrqwMc8Q5XvlNNNHewPXE6KB86j/O48iIiLSMSqRNZVNPWdTRYEfYhevt2JT1ifyPKcVCwJOcJ/7aiUbKHVjKfB3rM7ZEVjQam1gP5LBmQnADHfbd4A7seIhO2MZe/WgEllT2SibSqT6jGho4NwbjyY0Yougm2L6NcHTZxFtjLBZKMRVhTynkADVfjgcyx1EWL+8BvpuPDAGhyj30bnTeEVERKR8lc6ayqbWs6lCwGZYcOBaLLC0DHs/VwKbAPOAWJbnx7DMqalYcOEaIF7ZJkud8zKnzscKhKyJBVAOwn7f+mD1q2ZgGXpe0Oo4YHP8n5t8DDDK5316Kp01lY2yqUSqR+9omHsP2QHn2N2DbkpbG/SHO8YTSSQ4nuTQ/azynXy708gNjCXOgf400Hc3EaInfQhxYdBNERERkZrUkVlT2dRSNtVA7KL/fCwI8DUwG/g/rM1zsAvX7bDhV7sCVwGNafvxhvO9ixVCP9zdl0glpAetvocFRI8BpgMbYMME36Z9VtbmlFf3diQWGHseC9j6pSOzprJRNpVIwEJwSY8urHH9Ub4H131x0PZwyI44jWFuBXrk2jbfG5hIlAFMIuxf83zWB/gjERxOwt8TvoiIiNS/oLKmsqm2bKq1aBuMWoBdAD+C/eyWABdgNYB6YRfyR2AX9v8imQn1Om1n8ksfzvePyr4NkYzm0Xa4Xy/s9+9X2PG7LZaN9DZ2rKcGrX5QxOt49dR2dvd1KXku0vIIKmsqG2VTiQRniNPA8VcfQeR7PYNuSnaTDiMUDtMfODnXdrkCVD2IMIHTiTDA38b5bhywETHCnBN0U0RERKQmVEPWVDZBZVP1wi6gT8Eu2t/Bsk7+TPJicxKZg1F/xwpUZ7MYC2w57uN27AJfw/mkmsRoX6OqCQsA/QYLaA3Hjt95tM/K+n6GfTaRDGZFgQgWmP0Q+/0pVjVkTWWjbCqRDhYOcc7g/sQP3znoluQ2sA9M+BmRSJgzgayhtFwBqqOJ0JNf+98434WAc2nE4VB0EhQREZHcqi1rKptKZlP1oH0w6husJs+ZWI76NKzQ9PdJDuu7DAtGfVvCa76CXVj/D/YzX1TWOxDpGK3Y78etJIf7eTMHXoZlVo0GHgO+on3QanfaDw+MYkMMpwB/c/eZT7VlTWWjbCqRjjMo4TD2dwcRDZUzCLmDnLo3REL0xFKMMsoeoGrkOA4lXDWz9uUzFuhJAjg06KaIiEhVGIZdAA8JuiFSNao5ayobP7KpIrTPdlqMBaPOx2rvPA7sDwygfY2pheW9he94dane8Gl/IkFZTvsaVQOwWlO3YAGp8Vj24RQsyJUu5G63IzDT3Ve2AHQ1Z01lo2wqkco7vKkrzpgdgm5GYfo1wdidCHWJcGy2bSJZlm9OC0NLSjoNSiNwKFEmczTNXB50czq54did3i2wuyalWhv4BLs7dIIP7SqVX++nM7gUu/MO8FPgqSrZv46l2rMdVrPGMwGyTk8bwu5ub+p+fwNwEsnOfyn3lAr5rHRc1ZbRwI1YptRw/AlMzcWKLHtexi4ku2JZBJ7XsIvQckzDMi1uxD7v24DTsQvlVGHsd2HbtEdXd9u3sNo6t7pfZ9O2NlQlfVji83bytRVSD6rxmPgKC8I8kbJsXSxA9eMcz4u6X08Afo79Xt/pLuuOzTZ4Btbn2Z3yA1Mded7ysqkex4ZFvo3146ox8ytIg4BPMyxPAF9gWXNnY32OaqD+T5XoEuXow3cm0iWaf9tqccQuNEz5G1tis/++m74+W4Bqb3rTyi7U0FsFDgRuYhPsl6ba7ypIfkdgF5hjgdPIXdtCqsNZWEes3ckm4P3rWKo9b2CBpSnAkViH/UagOcO2o0gGp6Ikp7KfAfStYBt1XNWGNbFj50AsqDMR/4bzDQb2wi4cn8IC52DHQnfswu8XwHs+vZ6XTeUF20Zg58UwsL37+KH72t8C/8YCvTe5X+fQccEoP53qPkRqzSfAxlDQhFPesL87gKOwWTF/jw2xPQH/gjodfd6CZDbV77Hz0f7YsD9dr5n5JPs8o0jW5+kN/MxdPhT7GVYD9X+qwzrNrQw+cPugm1GcXTeDpm60Ll/FXmS4pss8xC/CcIYTLmsy1SAMA6IksLsLQQsBv8Y6xlKacdgd497YhYWUrivWuekXdEMCMg4dS34ZgAWMenXga76EDTk6Osv6s91tOto4dFz5aX/A7yT1jqg19TR2Ibk38MuU5ZdiWRB+XuR5UmtT3Qfc5b7+POAcrDZOHywr4jTgHuADajM41aCHHjke1a4fhQ9rS2BDAR1gN+Bud/lW+J9xFMR5q1ZrU43GAv9B+Aa4F8tA2xLLyKsG41D/x0+7Yn2UQgLZqfaIhkn8aKMKtKiCQg0wfHPCkTDDM67P+KwGdmBYzgLq1ak7sCUx7A5i0BqAa7FCic9hv8hrVPD19sKmaF6FpYg+SLKjfxLJWXNOwu5cLHa/vz9lHyOxrIXV2F3am2l7EdoPuAJLDV6NjYXfP60dl2KplgCz3Nf4qIjX8AxztznL/f6oLO97Q6wo5UJs6MKjtE1Hzrc+X5vyvZ9aEcXutn+JdUoOp+OnLU89RhdhF1Rr5dku/VjOZDzJ49vB7uak0rHkr77YnbyF2DTzB2EB0Eq6DTuXnkn7zN99gY+x81Gq1PPeMRmWjcfO0UuxO7jnpTy3kM9Kx5X/9sd+9z8BLqS82mEdXWtqIna+moQN1dgDCyBdU8HX9LKpjsCKNHfFMi+8GlMtFXxtESnMdmnfx2hfj+obLNtxKtYv/woLpJ8FbELlhnUFcd6C2qtN9XPsZsB/sb5CEOEALxjr3WS4mmR/Zqi7bFTKssPcZfmuAQvtF6VS/8d/P8Ley5fYZ1vozbrttl6fWLfGirWrYnbehFCoIfNQ7UxBqN600ofNKtyqShlKI9GCZsLoKCHsLsifgK+xX8SD8feCbiTwJHZgD8IO6mYsMAZwPclgxESsk74OtJmjcX+skOOTWNBgBBbNfYTkSfG3WKBjB5LBqqm0nXnkLOAn7r+3cJ+7fhGv4RmH3TmaB7yKFYRdJ8N7fwgLZAxx138ETC9ifb425Xo/tSiMReinYH8QHgQOALpU+HW9Y/Q57HMYhnW6/kbbQFm+YzmT27E7S7/CPp/709aPQ8dSJUSxz+tBLOB4B/aei737U4hm4HJgPZKdLs85WDAjXep5L9OyE7DPbxA2C9P/Yp8XFPZZjUPHVSUksJ/DmVhdsdnY1O7F3DUOYoa+ZVgWQi/s/HoNlvHXERlLd2N/hysx05+IlGd7LCD1Mfb7eSuW9XsQFqRpIpnt+Al2A/Ff2LD1y6jsOSTI81YtZlNtAPwOy0b9N5adOrDCr7kGNtxyJHau9+pUnUryb7/nQWw4aKp814CF9otSjUP9n0poxa6vT8Ru1n1Knpt10QhDtxhEDYanYNOB0BKjL5aFl9d2gMNcnJr87yIcumYsMtfRwrTN6vAerVgHfDV2ItkX2tT6GkPxfxjew4qepupJ2+mbe7r7vS3LPt7Hos+pRrrP2SPHa/8Zi2anGk7biH6xr9Eduxvs3U050d3m3LTndnWXj0lZFsEi7IWsL7RN2d5PIUr5PCuhiczHYwt2PK7AMpr2pW2GSint39R9zt4py96j/c95a3e7M9O2y3csp+6/G/BXkhky6erpWJrmPoI2hOznNge783YL1tlODTyX2v4p2F3Bblih0PdJ3lz5CfAX99/e3cTU49c77x2TYdmfUpaFgZVYEN6T67Oqp+OKDG0IymQsuyDbsTUTOIXsQ+e9rKkEdgz2zLJdJd2KtTVbQf9KG43dDPuQ4mf6C2G/ZyLinzXIf+NmZyzosYRggjRBn7e6Ydkwcaozm+ph2v9dSpDsQ7+G/W1KDQ6V2v+fkuG1Ytjfx/QRJ5n+9vejbQYV5L8GLLRfBOr/VMrZWGwg/bNvdr/OwWbVTZ3cgK4R5l9yCI5zT+09Prjyu/e4TfoPI3MGFVgsvxb1BeJVfecwgl20dSEZGV6IjfceTvHj6QeRzERJtQIrtJgu/eLf28fGwItpy19zv+bq5C52n5tPMa9xMHYn2CucOBW7QBmX9tzVWNHXP2Cd8m7YSXzNAteX877rRRQ75npgJ2jveMwUYCiVd4y+lLb8P9jdu+Fp2xV6LPfAOjJLsToKmehY6jheYKgX9vOdgQWUrsFmECvXKuCP2M/Z60ycC1xQ4v5SOz1x7LjvX+BzdVx1LO/Y2gK4Ehvu+Sp2Ied12IPImsrkE+xY+CXB1ApJrU1VSDbVICxjYir2O7B7pRso0sksxf7GZNIdC8y8hF2ADiWY2e2CPm/VYjZVA8k+9LbY36YvsQylIyhvpMxKkjXWumJZeBtjN2kGlbHfTNeAqQrpF6n/07G87KjBWJ93Lik36+IOvfr0CKpp5embvIXYrgRSpln8eqb8v/Y0ATF6Ag8E3JJCLuxTL+jGYmm9S9xlW9A+apyJV/R6cYHtWpVhmbePk9xHOu+P1RDgImycbH+S7zG99ksmhb4G2Fjmu1K+X4TNMrIvVvh1Rsq6vbDo/tVYuul07IL1tQLWF9OmcgV9PGabsTOVdxJcA/sMjiOZuTQEG2pTilzH6KKU9cUey9dhJ+lR2FDA1zJsU2/H0lCCP5YKKY7uHUtrYinjJ2P1BT7G0q8/KvG1b8Iy7s7BOkergH+WuK/04EUr2eoytldvxxXYUIVRPu6vFPlqTjWQzET4H/dxPZYxtBYWjDmDYAJTYFmh+2E3n57AAucjAmiHV5vqUKyeyHDswvNF7IJ4V7ddI7FOb5xk9uGS9rsTkQrYDctY6Y0FNO4JqB3Vct4Cq021DRa0uxk7by0g+BniNsizPjVD7sfYZ+vVGdsHeIb2dccK1YwNJxyPXReeg2UtlSLTNWCqQvpF6v9Uxqbkjx2k36ybFIvTMPNjWL4amipdDdZnKe1td11Re4XQ86mGwVQda6H7tZyp1L19XE7mGVIOx+4STMfGCO9G8q7BHRQWjCvkNcBqzOyGpbKmpjju664fl7bfJdiY6rWxTndXLANnwwLWF9omKU+uY/R7KeuLPZYvwjpVM7EMxO5p63Us1Z9vsT/KW2Azl2WqPVVpOq4kky7Yhd0x2LDjW7AhqMcG2SiXVy/uSex4exK7wBnsrg+T7PguavdsEalX1Xzekrb+635NrRKdcL+mloqp5AzL6v+Ib5wcMZtMWRUrvvt/OSGPoCwHIqygNfDxpGEsVTGXGPYZLMOKp9+JXbDfT2HZUwDzsTG66UXsBmLF69Ymf4dzPlb7J9PshzOBS7AsqbWwmT5Sp57NVFw7kWFZIa8xFTu53Uv7Qsg9sKyLMVg2xkpsuvtnsYtVsIJyx2In8e3cbXKtn1pgmzK9n2IFfTw2kX8a2BYs82Up9r7vwo6f+yk9ewqSx+huacu3xv6QTk/brtBjeR52d8crKHo5be+yjKP+jqW3Cf5YGoIVr87FO5YWYO/7TpKzvXxU5uvfgGXJvAe8Uua+csn2WY2j/o4rsNojQWfnTcbuImbj1f1owDLnbsfOT8uwIQI3YrXpjiH3xAqVcAFW/8obQnGG25Y/YneXO7I25lDsZ7Mddve9L1YQN0LyxmS2oqrfVLx1IgKW0TgUu9FyJ5a1/guSQ6c6QjWdt8BKS0zGajmNJ5jhjpk8jBW0z8YbwtmABVimuN/fgWWl+cGbOTC1RtPX7tcBKcu29On1MhmH+j+Vcjbw+zzbeHGDWdjvyf2RMHO2Wo+mWsueAsv6ci1LX5cpg8o6J7Wa5L0ECLd/o1XEKwDbjAWl9sPSGI/ALtRLyQE7HbtovBALcK2HHbh3UPjd0IlYWupZbnv6YcGoiNvOj7AT4eHua3XFUoB/mmFfX7hfN3X38wV2ssn3Gl5E/OIM+1yJnUB60jYNcyiWmtkLS5M+nuS45kLW52tTrvdTD7ziwyuxk7N3PB6PTVPuV07i6dhdn4uxY3QT7E7dXGzYVup2xR7Ls7ET+4kkZ/PQsdTxvID8MqxztgsW1D4FCyD6ZQV2/Bzg4z4zyfRZbY+OqyB4x9Ys7OcxENgJu3jx/t4XW3vJT8OwC6vLU5atwIanNJG9Rl4lXI9dbHqfv3cTqZHCsuY3xOp+DEAF00UKtQY2fH1rrI7bgVhttwlYf+Y6bAjTX7BhbO9gtfQWY+e0EHae78jaS9V03qqWWlzFSJ3A41/Y5zgAK959J/4NS+wC/BAb8hjH/rZ5PgC+wvq/fbG+0ZE+vW469auD0eJ+nYv97AdjwdJrgAXhBpYtWRlU08qT0u6lhWzfG3B4qqQ59IL/70gcojxbqR9mEVJn8Yu7jxbsF+pgshfPK3XWh72xMbursbsvV6a8xljazwqQaUrHEVjh2dVYob97aFuMb3vszsByrKDiLdhFgbfP1Aj+DViwc6n773yvMSCtfVunte3StPVPucu9sd0L3deaQdsZAfOtL+R953o/+VTjLH7e8diMzSR5AJkz4aD49qd/TnenrEs9Rhe769bKsI9cx/Lpafu/3t0+ddmX1OexVI2z+Hmzkq7EgogjyD5bUbHtH0Tbzylbrbueads52PDPk9KWvUj7c+HdGV5nbsq+Uz+rh6jP4wqqZxabySTrIbW4X2cDv6G4ehPlzGRXrNTzTWr9jgNof1xWMqiaOoPhZKzTP5e2P8t8j9YMy5qxn+Vc4A3sRtrDWIbW1VgGxkQsa200dpPgf7ALpXWxKXdqcgps6RQi2DG6AZZ58iOsLs5o7Jg+FauRcxkWMHkAC4C/gWV6LMJ+5zL9Pi3D+sozscDLo9jNm6uwTImTsZvTXu2ebd3X6YiZ7KrlvAXBz2BYiNRZ/Lzz5L+x8+zALM8ptv+c3hdJ7bN/hQ3NzjSr+nAs4Pkt1s/ZNuW5T5H/GrCQftGKtO/V//Hf2ST/VntfP8UC3Fnrc0bDPH/0rsHPyFfK44kzssckMtcOirKIy+nLqeX/tDvctrTwJjdjd+2D5A3xS2AnjLuAR8gfJRyDpSz6MXuaBK9aPs8mrLMUx4a+3I11lpbneV61tF+SwZ3RgbYiOcSvFetE34V1nPLdLayW9kt7DnAIwae4T8YKsH6KBTzvo/ThxWtiQ/4OxAYi9cEAAApdSURBVKbWPp3857ta5Q1v9LIfnk9ZtzN2EXUAdv6Ptnt20gJgRywbpJf7NfXfvd1HpnXeI5sE1v9ZhZ0rlmDBr2+xv02r3favcP+9zF23GrvwcEgOP1yBnX+852daJ7UrSnKqpt5Y/6M7diMt07re7vKmlO3yLevl7ifXwJil2DnDOy6XuI9vMvw709d8ZT6yGYYFgL+PTQpS7ZlEpeoOnIcNK3wKC0515PDGYjyM/S2ZR/Jv05w8z1H/uTZUS//nbGzY4kIsCHcfmSd/Snfddhtw3OsX1t6NoElPwtlTWdQS+64g/ncyz+zl8E9eZgSn1lgR9W+BWUQofVYnPznY3ZEHaDteWCQIrVgK8DSShQdFSrEYq0PwCBnGjYuU4TEsM7eQTlk+3kx2XvBmBMHUpqqk9CDcRNrPwvR397EBdgF4AnZh7hWaTbWY8mvE9SYZrOqKBQJ6kAwQdHOX93GXdXe37YHNDtzkrm9yl3Uld+Arm1zBKz/XtdL2Z+4F4DzLaRuoqIYCGl5QxxOh7XDYrrQd3tmTZGCzkIBRueuKtQzLOFhG8ue/1F22HOvzNGOfWQv2eS2jffBpRcqyIP+2vYwN4fk9VgJhf6o7eFOK1FpTJ1D9QThvUpZ/B90QqVuvYBnIL5CsaVaI12d+zImrWqBbjYWoZrxHIuHwaqZ1mQNUMZ7lWfYkQaimQlR/B1oJYR9u0BLYmHORarCatrWeREr1JXYHUcRvj+XfpGjTsKHpN2JDc+olmyo1a2o4bbOmMpmH1fG4CCvEPBGrNeUVXQV/bl58Q2UKrYdJzk61Blazxwt2+bFu7SKe57f0oFY2XoAMCg/mpAeb/LIaa3ecZDDHy9LOtO6TtHVeRl2m5xW7rh6twn5fH8eyqd6mPrKp0rOmdqc2Am/VUF5B6ttLJT7v+dY4oVfmwJ6b+9qeiko48Nxs4rH4dxNltZE5QAVPsZQrmUH7+bSq2UM4dOF9mvk86KaIiIhIVainbKpCsqZyWYFd5N6G3a09Favj10B1Z9fGSWYfBZ2FlBq8ypVtBMnsILAgV6ZssNRtculFssZfavAnl9Rsr1RLSc5+lRr0gdxZYfUcFKpG9ZRNVWtZUyK1YH6XKB88/E82rqUA1YuzYfkqosDTmdZnC1DNppFZ3MlQdq2RsbMtwP3EaGZy0E0RERGRqlPr2VTFZk3l4mDFaZ/BZgX6Ff5M190ZpAbLRCqt1rOpajVrSqQmNLdy+90vc+Gkw4h0yVVlsorc+XecLhFmNcd4L9P67AP4WriNe0lkndi92twHrCAE3Bt0U0RERKQqedlUhwAHAW9R+Zn+yuXN0DcVK9a7BeUFp9LNxQqpT/RxnyLiLy+b6hYsm6rSM/35YWdsBt7jsaypfVBwSsRvdy9fTcPUfwTdjMIsXA5TXyXRHOO2bNvkqjA1mTjLubYCLfNbHLiQVhq4G534REREJLdpwFDgTSyb6hbaFoquFqOxjIltsKyp4yluSJ+I1A8vm+rHwEbYueG4QFuUWXfgUqyuzhzsXFsrGV8itWZ+qIH7L3yE1oQTdFPyu+qvEEuwApiSbZtcAaqVtPJHriTGF763zV9TgA8JE+eSoJsiIiIiNaGas6kqnTUlIrWrmrOplDUl0sHiCS7+71eE75wRdEty+3wJXPVXYrE4l5LjZlu+Ofom0cqXTKzigoiLgTOIYTPmfRBwa0RERKS2VFs2lbKmRCSfasumUtaUSHDebXC46dS7iC2q4t7CaXeRiMf5HLg613b5AlSraOEE7iPEw/41zlfjSbCCJSQ4L+imiIiISE2qhmwqZU2JSLGqIZtKWVMiAUvAud82882vJlfnhCcP/hMeeI2GljgnkJwZNqN8ASqAvxDiNo4kxjx/GuibG4EHgVbGUth0uyIiIiLZBJVNpawpESlVUNlUypoSqR5LW+P8/IF/0nDLc0E3pa3/LoBxNxMLhbgZeDLf9oUEqCDBKbTwHnvRysJym+iTvwInk8Dhf9EdRhEREfFHR2ZTKWtKRPzSkdlUypoSqT7THYcLfzWFxNNvBd0U8/UyGPEHWlvjzE4kmFDIcwoLUMFqWhjBJyxgBK0sKaOVfvgbcBBx4G7gwoBbIyIiIvWn0tlUypoSEb9VOptKWVMi1e184N4DJhGf8X6wDVm8Ava6lNj8xXzZEmMv8gzt8xQaoAL4ghb24B0W8SNaA4uRPwb8hDgxHifOL4EamFBRREREalAlsqmUNSUilVaJbCplTYlUPyee4KjWBI8Pv4T4428G04j5i2HY+cTe+YyvW+LsAXxZ6HOLCVABzKGFbZnHXLYkxrNFPrscDnAZcBAOMe4ixmgg1oEtEBERkc7Jr2wqZU2JSEfxK5tKWVMitSUWjzMqluD/DpiEc/5DEO/A0ukvvgvbnEvrvK/5sCXGDsDcYp5fbIAK4HNa2Ill/IW9cTgb+LaEvRTjfWBXYpxDKwl+TYKjUHBKREREOk452VTKmhKRoJSTTaWsKZHaFE8kGJ9wOPnCR2nd4xJicwrOYSrNymY4637Y82KcJSt5vCXG9sCnxe6nlAAVwFJiHEiCE/kjK9mEVu4D4iXuLZtFWNx/KAle430S7Ajc4POriIiIiBSq2GwqZU2JSNCKzaZS1pRIfbg+kWDHf8zhgyG/IX7OVFjkcw8knoB7X4GNJxC78klWJBxOiMU5GFhayv5KDVB5bibGYL7gfg4lwca0chOwuMy9vgNMBNYhzpV8Q4zTaGFrrDMoIiIiEqRCsqmUNSUi1aaQbCplTYnUlzdbYmwVizPxiidYus6viU+8B2aX+Vu9eAXcNB02mkDrYTeSWLCMe2NxBmPnl6qwEWEmE2Y1UeLsQ4xrcJiJQzNOzv+W4DAdh3Nw2IIWwKGRz7AwVY+A31dHG4MKv9eTWv88a7399WSa+6hVtd7+euZgv+tSGi8QlSCZTTUa+Br4ENgjuKaJiGQ1DPgAWIJlU3lZU3H8Kareman/XBs6Y/+nJ3B6Y5jPAWfLdWk59wCc587B+eY2HOee7I/mO3Bm/gHn6sNxfrY1sUiYeDjEqnCIPwGD/Wpgg187StEEHEyEg4DdiNFEGIdBtDCQBnoRpokwC2llOQ4f0sBiogB04WOa+StwPzAD6+x1NmOwu60PBt0Q8cUgYEcq87vWEXQ8Vo8dgX9gF761aBrJ9yDVZRSWCfRA0A2pcYcC1wJhoBdwIzakRsP5RKRa9cSCUicCy7Dg1MnAPUE2qg6o/1wbOnP/J4QN+R3bJcreza2sB9C3B60/6I/T1I2Gfj2JLl9NfOkq4p8vwflsMY3xBA3RMMsdeCEW5yEsQ9zXfk6lL5rDwObApsAmQH/sRNgDi9avwApnvYeNhZ5f4fbUgp2ACUE3QnxXq0EFHY/V5VVgUtCNKNEE7HiS6jQJO76kPAOAi4G7gBeDbYqISMF2Aw4HzqWI6eAlK/Wfa4f6P2YQVopgU/ffPYE+wEosZrMAy7j04jadMZFIREREREREREREREREREREREREREREREREREREREREREREREREKuT/AeaZclviRSBrAAAAAElFTkSuQmCC", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Start Time : 2571.73599414\n", - "End Time : 2571.73943057\n", - "Execution Time : 0.003\n", - "Execution Time (ms): 3.436\n" - ] - } - ], - "source": [ - "#Another way to discover the tree\n", - "# # create the process tree\n", - "#tree = inductive_miner.apply_tree(log)\n", - "\n", - "# viz\n", - "#gviz = pt_visualizer.apply(tree)\n", - "#pt_visualizer.view(gviz)# convert the process tree to a petri net\n", - "\n", - "start_time = time.perf_counter()\n", - "process_tree = pm4py.discover_process_tree_inductive(log)\n", - "print(process_tree)\n", - "end_time = time.perf_counter()\n", - "pm4py.view_process_tree(process_tree)\n", - "\n", - "start_time_2 = time.perf_counter()\n", - "bpmn_model = pm4py.convert_to_bpmn(process_tree)\n", - "end_time_2 = time.perf_counter()\n", - "print(f\"Execution Time : {end_time_2 - start_time_2:0.3f}\" )\n", - "timeDiff_2 = end_time_2 - start_time_2\n", - "print(f\"Execution Time (ms): {timeDiff_2*1000:0.3f}\" )\n", - "\n", - "pm4py.view_bpmn(bpmn_model)\n", - "\n", - "print(f\"Start Time : {start_time}\")\n", - "print(f\"End Time : {end_time}\")\n", - "timeDiff_3 = end_time - start_time\n", - "print(f\"Execution Time : {timeDiff_3:0.3f}\")\n", - "print(f\"Execution Time (ms): {timeDiff_3*1000:0.3f}\" )\n", - "\n", - "\n", - "#net, initial_marking, final_marking = pt_converter.apply(tree)\n", - "\n", - "# alternatively, use the inductive_miner to create a petri net from scratch\n", - "# net, initial_marking, final_marking = inductive_miner.apply(log)\n", - "\n", - "# viz\n", - "parameters = {pn_visualizer.Variants.FREQUENCY.value.Parameters.FORMAT: \"png\"}\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/rafaelapb/.local/lib/python3.8/site-packages/pm4py/algo/discovery/dfg/adapters/pandas/df_statistics.py:82: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n", - " df_reduced = df[{case_id_glue, activity_key, target_activity_key}]\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAANAAAAM/CAYAAACgXly+AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzde3wU1f3/8VcSYgIJkBAMCFioWEG5WVBBfxQF5RsoIlZFLFAvCKJYilKLtWqrrVVE0SpYtPQL4Vbl4tcLiCJEQRSloIhcBIQWIdwkkBAIBAI5vz8OCdlcN5zszm7yfj4e+9DMzM58Nuw7c+bMzBkQERERERGpOSK8LiDM1QYuAloBTYE4IB5IBOoAR4EjQM7p1z5gK7AJyPCgXqliCpD/ooCOQA+gG9AG+BH2d3gS2IsNyREgCxue2thAxWPD1fj0NICD2CB9DnwMfAIcDs5HkaqiAJUvDrgJuAW4GqiPDcrHwFpgCzYE24ATfqwvAjgfu9e6CBvCgjCeAlYB7wEzgB1V+DlEgiYCuBaYht0jHAfeBX4NXBKgbSYDA4DXgB+wYfoYuBOoG6BtilSpSKAv8CVggA3Aw9gvdzBFAdcB07FNwmzgJWzzTyTk1AKGYg/u84CZQDtPKzojEXgM2I/dGz5H8AMtUqauwDfYZtp07HFJKIoDRgHp2A6KUdg9lYgnGmCbRaeANKC1t+X4rTbwBJALrAGu9LQaqZGux56D2YHtYQtHrYAl2D8Az2CboSIBFQ08D+QDU7DNonA3BNvRsBxo5nEtUo01w56wPALc7nEtVa0NtsdwP5DicS1SDV0MfA9sPP3/1VEcthMkD3vuSKRKXI49MbkSaOhxLcHwMLaJ+oTHdUg10BPbZJuPvbCzphiJ7VwY73UhEr46Y8Mzk5rZQ/VL7AWuf/K6EAk/P8HeNrCAmhmeAsOwlyT9xutCJHw0w3YYfEbNaraV5Y/YPVG4nu+SIIoGVmB72xp4XEsomYS9ji5crrYQjzyHPe4J1C0H4Soau0deh/bKUobe2O7bO7wuJESdj7186R9eFyKh51zsWfipXhcS4vph/8j8wutCJLRMAXZixx2Q8k3BXkSr35UA8P+wf1Vv9rqQMJGE3Vs/63Uh4r1a2HtiPvS6kDBzL/aaufZeFyLeGoK9k/QnXhcSZiKxo//M97oQ8U4UsBn4p9eFhKk+2KsUOnpdiHjjNuwZ9lAdwyAcrAZme12EBF8EdlDDWV4XEuZuwV613cbrQsJZOI5Meg120MFLsUHyWl3scL+dgLbYnq562KF9M4HvsGPNLcWOqhMqIoFvgUXogtMaZQr2INhr3YB5wDHs8URFr3zs2AW3EzpDUv0Be4XCOV4XIsFRGzsumpd/MTtg94D+hKas13eExhXSP8I24/p6XYgExyDsOYxGHmw7EngcO4i8S3iKvmZjRx/10sfAHI9rkCD5P+zTC4KtNvAWVRecoq9NwI+D91FKGIpthsZ6WIMEQSS2vT4qyNuNwXYABCI8Ba89eBeiH52uoYdH25cg6Yj9hw72wO//IrDhKXh9i3fNue+Av3i0bQmSh7BDVAWz6304wQlPwetfwflYJbyGvelOqrF3CO7B7vnYZ/MEM0AGe99OsN2G7RzRHavV2Dbg0SBubzLBD09BUy4yCJ+vqItPb7tDkLcrQXIO9tq3W4K0vfOp2u7qyr5uC/xH9HEO9vTArUHebtgL9l+6s/UTzlyBHQx3YAfj8MrQIG/vBLAd+9gUqYRwCVAr7KUwW4O0vf5B2k5ZriH4J4s3owBVWrgEqAn2HNCxIGwrCe/v1owCrg7yNncATYO8zbAXLgGqix0cMBg6BWk7FQn2zW6Hsb9nqQQFqKQLg7SdigS7DgXoLIRLgOIJXoC8vrizQLDrUIDOQrgEKA57g1owhMpFlcE+qXkEjRdXaeESoOPYizqDIVh7uopkB3l7sUBukLcZ9sIlQIcJ3l/HA0HaTkWCXUddgh/asBcuATpC8NrnG4K0nYqsD/L2gtlRU22ES4CCeYC7FnvZkNe+DPL26qEAVVq4BCgDe4IzGINxHMPe5uylw8CyIG8zGft7lkoIlwBtwXYiNA/S9rwecPBdgn9A3wr7e5ZqqD72KuXeQdpeHPbmPa+uxr4i8B/RRwSQA9wV5O2GvXDZAx0C9hK8ix1zgPFB2lZx7wP/DvI2z8eedwrW1e7igY+xN7kFSyx2xJxg7nly8eZhwL1Obz/Jg22HtXDZAwF8DvwsiNvLxTZpTgVxm3/EhjbYrj693VA5ByYB0BP7V7JZkLd7H8HZ+7yBd2OVrwRe8WjbEiR1sHuFX3mw7ScIbHg+JHiXKhVXn+DeLi8eWgqkerTt+7BftKoOzzS8vX28H7aZ2tDDGiRIHgIO4t0V01dhe6qqIjhZ2MdUem0WGhOuxmiC982NWOBh7NOuzyY4x4FJ2M/itXjsdYbDvS5EgucD7CCLXosD7sYev+RRcXC+xj6PJ9idIOW5ExtodV+fpXB8Qt1A7HFQM+zVAqGgNnZQwoIn1NXFXlNX9Al1Bz2rrmwfYWu82etCJHjqYIPzlNeFhLmO2KHCUrwuRILvUezlPQleFxLG3gS+IjxbIeKoHrbp8QevCwlTF2O7rn/hdSHinaewPWH1vC4kDL0OrEN7nxotCXsD2AteFxJmumGPfW70uhDx3jBsF7Iey+GfWtju9A+8LkRCQySwAvgUNUf88RD2esKLvC5EQsdPsVcn3O91ISHuIuxYC3/0uhAJPX/C/mUN9oDs4SIW22X9b+zDtER8RGIvqdmKvTxffL2K7fb/sdeFSOhqjB03YS46HipqELbXTed8pELdsRdHqmvb6oFt2j7ndSESPm7DnmV/2OtCPNYe22x7nfAa+0JCwG+wzZZQuGHNCz/BNmcXoU4DOUt/we6JRnldSJB1xIbnC/S8H3E0Chuil6gZHQvdsVepp6FrBKWK3A6cAKYSOk+fC4RfYTtQZqFmm1Sx3thBPL7CHh9UJ7WBf2CP+Z5DHQYSIM2xo5tmA7/0uJaqchH24tBDwK0e1yI1QAz2eCgf+BdwnrflnLVo4HfYEXW+AFp4Wo3UOD8HtmH/co/CXuYfLq7BPobyKPAYOt4Rj9QG/ow9U/8NcBOhffzQDpiD3XvOR9e1SYj4Cfb6uVPYv+yDCa090mXAW9jgrAVu8LYckdJdDEzH3uH6X+BJvOuxq48dtHEZdlDGldjg1IRzWRLmLsB2B+/CfnlXYG/WuzDA222AbUa+gT2+OYZ9VmvPAG9XJCCisIMOzsTeyWmAHdhRUW/HjsNQ22HdFwDXA+OA1dgm5EngE2AoGvMuLKhJ4J9o7IN/e5x+XYntEi8I1ebT/83Gdi0fwfbw1cFejxYPJGJHEmqFbRoWPA9oA3aI3Y+wTbbMYHwgqRoK0Nk5B2iJfZ5pK+wJzfM5E5b40z9nYR+bePj0/2diHyW/CRu6zdigiUgxBl0dUO2F8nkPkZCnAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIUPC2x42xv97gOqUIKUHAMARYByV4XIlVLAQq8OOBaoDOw3uNapIqF0oOkqqscYJDXRUhgaA8k4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIhKSij3j84PTPRV97PapLqpBOpAZHL68LkMBQE07EgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJONDFpFUjAYjwugiRcPUxJW9XKO11EmjsUY0SAGrCVY3X/VjGAMvRfUAiJSQCeVS897nLqwJFQt1CbEjKCtAJ7LGSiJRiIJBP6eHJA97xrjSR0FcHOEbpAcoH+ntXmkh4eAPbVCseoKNAbQ/rEgkLfSn92Ge6l0WJhIto4BAlQ6RReUT89BpwnDPhyURXfIj47Rp8m28TPa1GJMxEAvs4E6Ku3pYjEn6ex4ZnN7rItFpzaZu3ALpXUR3VTc7p/34N3OlhHaHsv8BSr4tw5fLX8VZgdkxMzKmqKqY6OXHiRFR0dHR+RESE8bqWUJOXlxeZn5//JtXg5LJz71Bubm5UVRRS3cyZM4dbb71VV7uXon///sybN8/rMqqE/oED5NZbb614IQl7CpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiTio0QFasmQJERERrF+/3mk9u3btIioqivvuu6+KKjs7Z/N5srKyGDx4MD/88IPP9G3btnHVVVfRokWLUt935513smHDBpdyq4UaHaCqMn36dPLz83njjTfIzc31uhy/ZWdn061bN7p3705ycnLh9ClTppCSklIiVEWNHDmS3r17s3bt2mCUGrIUoCqQmppK//79ycrK4q233vK6HL+NGTOGpk2bcvfddxdOy8nJIS0tjZUrV9K2bdsy39upUyeGDx/OoEGDOHVKNyWfjVsBU1kffPCB6dy5s4mNjTXNmjUzN998s/niiy+MMcZMmDChcDDCCRMmmHvvvdckJiYawAwYMKBwHfPnzzedOnUyMTExJjk52QwfPtwcOnSocP7+/fvNQw89ZFq2bGliYmJMhw4dzNtvv+1Tx8MPP1xiDOvmzZv7vY0Cn376qWnfvr3Ztm2bAUzPnj1L/dxbt241N9xwg0lKSjLx8fGmX79+5vPPP/d7fkU1VfR5isvOzjaxsbHmvffeK3OZfv36lbuOgwcPmqioKLNkyZIylynNLbfcYoC5XnxpQ0mlAzR//nwTGRlpHnvsMZORkWF27dplBg4caOLi4gqXOXz4sAFMixYtzJw5c8yRI0fMhAkTCgP09ttvm4iICPP444+bgwcPmq+//tq0bt3a9OjRw+Tn5xtjjBk1apQZNWqUycjIMIcPHzYzZ840MTExZv369T71LF682ABm3bp1PtP92UaBoUOHmnHjxhljjLnyyitNZGSk2bFjR4nP3qFDBzNgwACzb98+k5mZaUaNGuXzuSua709NZX2e0sycOdMA5sCBA2UuU1GAjDGmTZs2ZtiwYRVurygFyKp0gFq1amXatWvnM+3w4cOmQYMGPj8DZujQoaWu46KLLjJt27b1mTZ//nwDmLS0tDK33bdvXzN8+HCfaWV94fzdRk5OjklISDDp6enGGGNeeeUVA5innnrK573Hjh0zgJk9e3bhtLy8PJOcnOzXfH9rqkyARo8eberWrVvuMv4E6PrrrzedOnWqcHtFVacABe0YKD09nc2bN9OtWzef6fHx8Rw4cKDE8u3bty91HVu2bOGaa67xmd65c2cA0tLSytx+gwYN2LJli191+ruNN998k44dO9K0aVMABgwYQHR0NKmpqT7vjY2N5fLLL+eRRx5h7ty5HDt2jFq1arFv3z6/5rt87rLs3buXhAT3530lJCSwd2/NfWpl0AKUkZEB2C+yP2rXLvk0kIJ1TJw4kYiIiMJXQQ/Sjh07ANi4cSM33XQTjRs3JjIykoiICKZNm0ZmZqbfdVa0DYCpU6cyePDgwp+TkpLo1asXW7duZfny5T7rXbRoETfeeCMPPPAACQkJ9OnTh5UrV/o1vzI1+SszM5Po6OhKv6+46OhoDh486LyecBW0ADVs2BDA6ZddsI4xY8ZgjCnxmjFjBnl5eVx33XXs3LmTpUuXkpeXhzGGO+64A2MqHqLNn20AfP/99yxdupQhQ4b4fKnnz58PUGIvlJiYyPjx49m1axfLli0jNzeXbt26sW3btgrn+1tTZSQmJpKXl1fp9xWXl5fn9x/F6ihoAWrWrBmtWrVi2bJlPtN3795NbGxsqc240tbRunVrVq1aVWJehw4dmD17Nv/5z3/Ys2cPAwYMoHXr1kRF2WHrjh8/XuI9kZElP74/2wAbkIEDB5b4Mh85coSGDRsyZ84ccnLsAKV79+6lXbt2hevp0qULkydP5sSJE6xevbrC+f7WVNrnKUvjxo3Jysrye/myZGVl0bhxY+f11ETOvXDbt283KSkp5p577ilcpqATYfLkyaWu47333jNRUVHmmWeeMfv37zf79+83Dz74oLnkkkvMsWPHTG5urjn33HNN+/btzYYNG8yxY8fMokWLTP369U2HDh181rVx40YDmLlz55r9+/ebxo0bm1WrVlW4jfz8fNOyZUuzcePGUmv861//agCTmppqjDFmz549BjAvvPCCOXTokMnMzDRjxowxsbGxZtu2bRXO9+dzl/d5SqNeOO+d1Xmg999/31xxxRUmJibGNGnSxIwePbrwC/D666+XOJeRmZlZYh2LFi0yXbp0MTExMaZRo0Zm4MCBZufOnYXz//3vf5uf/exnJj4+3px//vnmnnvuKfhHM4DZs2dP4bIjRoww9evXN/Xq1TMjRoyocBsFX/aC15o1a3xqK34+JiUlxRhjzIIFC0zPnj1NUlKSqVevnunatatPj15F8/353OV9nuIKzgMtXLiwxLyUlJQS/w6NGjUqsVxmZqbOAzk4qwBJ6Bg+fLjp3bv3Wb//6aefNm3atDEnT56s1PuqU4B0KU8N9uyzz5Kens6UKVMq/d4vv/ySSZMmMXPmzMLjzJpIAarB6tevz7Jly0hLSyv3wtHSvPzyyyxcuJBLL700QNWFBz27s4ZLTExk1qxZlX7ftGnTAlBN+NEeSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHzvcDTZ06tSrqkBpk+/btXpdQZVwCdDIyMjJ32LBhEVVWTTVijImKiIjIxw7KISWFz3NgxBMGO/CKVGM6BhJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECFDwtgRXAdo/rkCqkAAXHEGARkOx1IVK1FKDAiwOuBToD6z2uRaqY8+DyUqEcYJDXRUhgaA8k4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIhKSij3j84PTPRV97PapLqpBOpAZHL68LkMBQE07EgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBzoauyq8SegSbFpx4G7sWPCFfUEsCcINYmEjeew9/icKOd1CkgHIjyqUSRkdaTkDXPFX8eBp70qUCTUfUfFIWrnWXUiIe5P2KZaWeH5zrvSRELfhZQdnhPAH7wrTSQ8rAXyKT1EF3pYl0hY+C2Qh29w8oFVXhYlEi6aYLuriwYoDxjpZVEi4WQ5viE6BTT2tCKRMHIPZwJ0EvjI23JEwksiZ46DTgJ3eVuOSPh5D9t5cAJI8LgWCaBAXkwaBcQGcP2hbC7wc+yTufOwDxquaU5iL1+Ss3QrFV/aolf1fc2lBgj47QwLFiwI9CZC0iuvvMKwYcM455xzvC4l6MaOHcunn37qdRlBEfAA9enTJ9CbCEldu3alfv36XpfhidTUVK9LCBrdkRogNTU8NY0CJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDkImQL///e+JiIggIiKCDz74IGTWv2vXLqKiorjvvvuqvKbKWLJkCREREaxfv97v92RlZTF48GB++OEHn+nbtm3jqquuokWLFqW+784772TDhg0u5dYYIROgsWPH8u2334bc+qdPn05+fj5vvPEGubm5AagsMLKzs+nWrRvdu3cnOTm5cPqUKVNISUkpEaqiRo4cSe/evVm7dm0wSg1rIROgUJWamkr//v3Jysrirbfe8rocv40ZM4amTZty9913F07LyckhLS2NlStX0rZt2zLf26lTJ4YPH86gQYM4depUMMoNW2ERoEWLFtGlSxdq165NUlISv/rVr9izp+RD3ooud/7553PLLbewcuXKMtf76quvFjbrIiIieOONN3zmf/bZZ8TGxjJ27FgApk6dWup6tm3bRr9+/WjYsCF169blxhtv5IsvvvB7Pthb3y+77DJiY2Np1KgR9957L9nZ2YBtfvbs2ROAdu3aERERUWbzC+Dw4cNMmzaNkSN9B0SNi4tj1qxZJCUllfneAiNGjGDTpk0sXbq0wmVrspAP0IIFC/j5z3/Otddey86dO/nss8/YvHkz3bp14/DhwyWW69mzJ+np6axcuZKYmBiuvbb4ExbPuOuuu+jbty+vvPIKxhhuu+02n/mpqakMHjyYCy64gCuvvJK0tDR27txZYj0333wztWvXZuPGjezcuZMWLVpw3XXX+T3/nXfe4YYbbuDnP/85e/bs4cMPP2TZsmX84he/wBjD2LFjWbx4MQDr1q3DGMP27dvL/Fzvvvsuubm5dOnSpcLfb1kSExNp3bo1s2fPPut1iJtbAVMZ3377rQHM+++/XzitVatWpm3btj7LrVmzxgBm7NixPsu1a9fOZ7nDhw+bBg0alLr+o0ePml69epnJkyeXWktOTo5JSEgw6enpxhhjXnnlFQOYp556yme5Y8eOGcDMnj27cFpeXp5JTk72a74xxlx00UUlPuP8+fMNYNLS0owxxixevNgAZt26daXWW9To0aNN3bp1y12mX79+pnnz5uUuc/3115tOnTpVuL3ibrnllhozKk9I74HS09PZvHkzV199tc/0Sy+9lHr16rFkyRKf5bp16+azXHx8PAcOHCix3pycHPr06UP9+vUZOnRoqdt+88036dixI02bNgVgwIABREdHlxgwIzY2lssvv5xHHnmEuXPncuzYMWrVqsW+ffv8mp+ens6WLVu45pprfNbbuXNnANLS0vz4Tfnau3cvCQnu4zkmJCSwd+9e5/VUZyEdoIyMDAAaNGhQYl5SUlLh/PKWK83IkSOJiYlh3rx5ZR4jTZ06lcGDB/tsr1evXmzdupXly5f7LLto0SJuvPFGHnjgARISEujTp4/PesubX1D7xIkTfY7HCnrOduzY4ddnKiozM5Po6OhKv6+46OhoDh486Lye6iykA9SwYUOAUv8RDxw4UDi/vOVK89hjj/Huu+/SoUMHbr/9do4ePeoz//vvv2fp0qUMGTLE50s9f/58oOSwTYmJiYwfP55du3axbNkycnNz6datG9u2batwfkHtY8aMwRhT4jVjxgw/f1u+9eTl5VX6fcXl5eX5/UeppgrpADVr1oxWrVqV6An6+uuvyc7OLjwQL1hu2bJlPsvt3r2b2NjYEs24Cy64gOjoaGbMmMGOHTsYM2aMz/zU1FQGDhxY4st85MgRGjZsyJw5c8jJyQFsc6lduzPPDu7SpQuTJ0/mxIkTrF69usL5zZo1o3Xr1qxaVfIZXB06dCg8iI+M9P+fqnHjxmRlZfm9fFmysrJo3FhPZvFKlXQizJ8/30RGRpo//OEPJiMjw2zatMlcccUV5sILLzSHDh0qsdxjjz1mMjIyzPbt201KSoq55557yl3/iy++aCIiIsyHH35ojDEmPz/ftGzZ0mzcuLHUGv/6178awKSmphpjjNmzZ48BzAsvvGAOHTpkMjMzzZgxY0xsbKzZtm1bhfONMea9994zUVFR5plnnjH79+83+/fvNw8++KC55JJLzLFjx4wxxmzcuNEAZu7cuWb//v2mcePGZtWqVaXWOHPmTAOYAwcOlPm79qcToU2bNmbYsGHlLlOamtSJEEiVCtDDDz/sM7byoEGDCue9//775oorrjAxMTEmMTHRDBo0yOzevbvEOoou16RJEzN69OjCL+Bzzz3ns/7777/fvP/++z7TGjVq5PPzmjVryq0xJSXFGGPMggULTM+ePU1SUpKpV6+e6dq1a2HvmT/zjTFm0aJFpkuXLiYmJsY0atTIDBw40OzcudNnmREjRpj69eubevXqmREjRpT5u8zOzjaxsbFm4cKFJealpKSUGMe6UaNGJZbLzMw0UVFRZsmSJWVupywKUNWo9B5Iqs7w4cNN7969z/r9Tz/9tGnTpo05efJkpd9bkwIU0sdAcvaeffZZ0tPTmTJlSqXf++WXXzJp0iRmzpxJVFRUAKqrPhSgaqp+/fosW7aMtLS0ci8cLc3LL7/MwoULufTSSwNUXfUR8KcziHcSExOZNWtWpd83bdq0AFRTPWkPJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcBv52hYPANqTlq0njaAQ9QfHx8oDch4pmIAK77PKBjANcf6hYAzwLLK1qwmtoDfOV1ERK+DHZgFanG1Ikg4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKUPC0BFYA2z2uQ6qQAhQcQ4BFQLLXhUjVUoACLw64FugMrPe4FqliAR8bW8gBBnldhASG9kAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIlISCr6hLoPTv9c9LXXo7qkCulEanD08roACQw14UQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIGuxq4aXYHYUqa3Aw4Wm7YKOBTwikTCyGxK3u9T2isHO9CiVBNqwlWNN/xY5iTwLjZEIlLEOUA2Fe+B+nhVoEiomwIcp+zwHMIGTURKcR1lh+cE8Kp3pYmEvkhgP2WHqJt3pYmEh79RejPuB9RhI1KhzpQMz3HgOS+LEgkn2ykZoo5eFiQSTv6C7TQoCM9/vC1HJLy0xrf59idvyxEJPxs4E6JWHtciEnYexoZnrdeFSGAF6mrsR2rVqnVNgNYdDmqfPHmSyMjI2MjIyEVeF+OVU6dO5RtjentdRyBFBGi9c5s3b37LNddcE6DVh74PPviAbt26UadOHa9L8cT27dtZtmwZBO47FhICdj/Q5ZdfTmpqaqBWH/K+/vprLr30Uq/L8MycOXMKAlSt6ex4gNTk8NQkCpCIAwVIxLOviQAAACAASURBVIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScVBtAvTZZ5+RlJTExo0bvS5FapCQCNDq1auJiIgofL344otlLpufn8/FF19cuOyvf/3rwunGGIwxld7+kiVLiIiIYP369WUus2vXLqKiorjvvvsqvf6q5E+txWVlZTF48GB++OEHn+nbtm3jqquuokWLFqW+784772TDhg0u5VZ7IRGgyy67DGMMd9xxBwDPP/88x48fL3XZefPmsWnTJgDy8vKYOHEiAD/72c84ePAgbdq0CUiN06dPJz8/nzfeeIPc3NyAbCMQsrOz6datG927dyc5Oblw+pQpU0hJSSkRqqJGjhxJ7969WbtWd6aXJSQCVNTVV1/N7t27mTJlSqnzn3nmGa6++uogVwWpqan079+frKws3nrrraBv/2yNGTOGpk2bcvfddxdOy8nJIS0tjZUrV9K2bdsy39upUyeGDx/OoEGDOHXqVDDKldPm3nLLLaay7rjjDjNz5kzTpEkT07x5c5OXl+cz/9133zX9+vUzo0aNMkDh/AkTJhQOYjh58uQS0yZNmmRGjhxp6tWrZ5o0aWKefPLJwnU+/PDDJcaxbt68uc92P/30U9O+fXuzbds2A5iePXuWWv/WrVvNDTfcYJKSkkx8fLzp16+f+fzzz/2eb4wx8+fPN506dTIxMTEmOTnZDB8+3Bw6dMjvWovKzs42sbGx5r333itzmX79+pW7joMHD5qoqCizZMmSMpcpzezZswtqlLNw1gGaO3eu+dvf/mYAM3XqVJ/5Xbp0MatXry4RIGOMOXz4sE+Aik5r3769eeedd0x2drZ56aWXDGCWLl1auNzixYsNYNatW1dqXUOHDjXjxo0zxhhz5ZVXmsjISLNjx44Sy3Xo0MEMGDDA7Nu3z2RmZppRo0aZuLg4v+e//fbbJiIiwjz++OPm4MGD5uuvvzatW7c2PXr0MPn5+X7VWtTMmTMNYA4cOFDmMhUFyBhj2rRpY4YNG1bh9oqqKQEKuSYcwD333EPjxo155plnyM/PB2Dx4sUkJSXRqVOnSq/vsssu44YbbqBu3brcf//91KlTh+XLl/v13qNHjzJv3jwGDhwIwODBg8nPz2f69Ok+y+Xm5rJ27VpuuukmkpOTSUhI4PnnnycuLs6v+WCbW23atOHPf/4ziYmJdOjQgeeee46PPvqIjz/+uNKf+6uvvqJu3bo0aNCg0u8t6sc//jFfffWV0zqqq5AMUO3atXnooYfYsmULc+bMAeCvf/0rf/zjH89qfe3atSv8/6ioKBo2bFjuwXNRb775Jh07dqRp06YADBgwgOjo6BIDpsTGxnL55ZfzyCOPMHfuXI4dO0atWrXYt2+fX/PT09PZsmULxUcy6ty5MwBpaWmV/tx79+4lISGh0u8rLiEhgb179zqvpzoKyQAB3HfffZx77rk8/fTTLF++nNq1a3PFFVec1bri4+N9fo6Oji7cs1Vk6tSpDB48uPDnpKQkevXqxdatW0vsxRYtWsSNN97IAw88QEJCAn369GHlypV+zc/IyABg4sSJPl36BT1nO3bsqPTnzszMJDo6utLvKy46OpqDB4s/bFwghANUp04dfvvb37Ju3Tp++ctf8vjjjwe9hu+//56lS5cyZMgQny/1/PnzAUrshRITExk/fjy7du1i2bJl5Obm0q1bN7Zt21bh/IYNGwK2GWdOn88q+poxY0al609MTCQvL8/tl4A9XeDaDKyuQjZAAPfffz9JSUm0bt2aq666KmDbiYws/deQmprKwIEDS3yZjxw5QsOGDZkzZw45Ofah23v37vVpKnbp0oXJkydz4sQJVq9eXeH8Zs2a0bp1a1atWlWijg4dOjB79uxyay1N48aNycrK8nv5smRlZdG4cWPn9VRHIR2g+Ph4Nm/ezNtvvx3Q7Zx33nkAbNq0iYyMDM477zxWrVrFjBkzePTRR0ssHxcXx4MPPsiRI0eYN29e4fT169fz4osvkp2dTVZWFq+99lrhsY8/88ePH88nn3zC2LFjycjIICMjg9GjR3Py5En69etXZq2rV68u9XN17NiRw4cPOze//vvf/9Kxox5xFEyV6sbeuXOnz7mNDh06lLpcQbd00dejjz7qc84HMFdffbV5/fXXfaYNGjSoxHZatmxZuO4RI0aY+vXrm3r16pmbbrrJZ7k1a9b41FH8fExKSooxxpgFCxaYnj17mqSkJFOvXj3TtWtXk5aWVvi+iuYbY8yiRYtMly5dTExMjGnUqJEZOHCg2blzp88yRWsdMWJEmb/XgvNACxcuLDEvJSWlxO+yUaNGJZbLzMzUeSAPnNV5IKl6w4cPN7179z7r9z/99NOmTZs25uTJk5V6X00JUEg34cTds88+S3p6epmXRpXnyy+/ZNKkScycOZOoqKgAVBf+FKBqrn79+ixbtoy0tDS/z30VePnll1m4cKHG+S5HwJ7OIKEjMTGRWbNmVfp906ZNC0A11Yv2QCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4CNj9QMuXLze9evXyb/A1qXb27t0bQQ34Ax0RoPWOAM5uFMTq43rgK2C314V47E6vC5DwZIBbvS5CAqva72JFAkkBEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBSh4WgIrgO0e1yFVSAEKjiHAIiDZ60KkailAgRcHXAt0BtZ7XItUsYANLi+FcoBBXhchgaE9kIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIhKSij7i8YPTPxd97fWoLqlCOpEaHL28LkACQ004EQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxEOF1AdXE+8D/w/f3GQPkAflFpuUBbYHdwStNJPT9hpL3+xR/5QNfeFWgSChLBk5RfoDygPu8KlAk1H0EnKTsAJ1EY2OLlOkuyg7QSext3SJShnrAcUoP0ClgsHeliYSHd7DHOsUDdBwbMBEpR39sb1vxzoO5XhYlEi5igSOU7L6+0cuiRMLJdOAEZwJ0GHtSVUT80Isz4TkB/K+35YiEl1rAAc6E6FpvyxEJPxOx4ckAojyuRQKotKF9WwDdg1xHdZN9+r9rgNu9LKQa+C+w1OsiylLa1di3ArNr1Yo5FexiqpOTJ09ERUXVyo+IiDRe1xKuTp3KizQm/03s6YGQVObg8pMm5arp4WD58sl07To0MiJCd4ycrVdf7c+XX87zuoxy6ekMAfKznw3zugQJAt2RKuJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAASaiLAeK9LqIsuhZOQl177G3xmcBOYAewHdgIbADWAwe9Kk4BklC3EbgfOB/40en/dsKOs5dwepk9wJfAp6dfq7FDiQWcc4Aef7w1e/durnC5Pn0e5cYbn3LdXEB8//2XvP76b9i582tOnDhKQkJTnnsuvUq3kZW1izFjfkS3bvcwePCkKl13ZXz77RJeeKEnTzyxjqZN2/r1nqNHs/jXv37NgAEvULduMvv2beGjjyawdu18Dh3aS4MGP6JDh75cf/3j1KmTUPi+qVPvJCXldzRp0sal5BzgvTLmNQMuAdoBV2AH+R8L5AKfAPOAt7B3BvujJTADaIK9sbRCVXIMNHbsf5k82TB5suGWW54rMW3AgBerYjMB889/DiIxsSkvvLCPP/95I+ecU6fKt7FixXSMyWfVqjfIy8ut8vUHyrFj2Ywb143WrbtTt64d2vvvf7+J77//ipEjF/DSSwcZPHgSK1fO4vnnu5Off7LwvT16jOSll3qzc+faQJWXDnwIjAcGAE2BC4F7sc2+l7B7pw+wg72UZwiwiEqOX17jOxHy8nLZu3czF198HTEx8Zx33sX89a9bqnw7K1akctll/Tl6NIs1a96q8vUHyptvjiExsSldu97tM33QoL/TtGlbzjmnDhdffC3XX/84O3d+zbp17xcu07x5J7p1G84//zmI/Pyg3eC8DZgG3AKcCwzCjk+xEPgK6FfKe+Kwg790xh5T+c25CfeXv2yqcJnrrnsAgI8+msjrr48E4Je/nMDu3RtYtWo2R49mcvnlA7jnnjc4ciSDDz54lq++eovMzHTOO681N9zwJJdeeuZzF13P4MGT2L17I59/Po2YmHi6dRtO375/LFx2//5tzJ49mm3bPiMv7zgXX3wtvXv/ngsu6OKznhkzhjNjxnDatEnhgQfsOPDffLOAd999gl271lO7dn06dvwFN988jtq16/n1WQps3foZ0dGx3HTTWFavnstnn03liit+WeL3VF6t/syvqOY33/w9H3zwLABPPNEOgKSk5owdu73Uf7fc3MOsWDGN++5702f6k0+W/I41a9YegAMHvveZ3r37CN59909s3ryUiy8O+gBFOcCc069LgUewTbppwEjsIJgFyw06mw0EdQ/Uo8evmTjxMAAffjie1q17MG7cTn75ywmFyyxY8BQnT+bxhz+s5G9/yyAl5Xe89toAdu/eUOp6li6dxCWXXMe4cen06vUw7777J7ZsWVa47KRJN3POObX58583Mm7cTpKSWvDCC9eVWM/tt09m8mRTGJ6vv36HiRNvoF27nzN+/B4efPBDNm9ext///guMMX59lgIrVqTSpctgzj33Alq2vJJvv03j4MGdJZYrr1Z/5ldU8803j2X06MUAPPHEOiZPNmWGB2Dt2nfJy8v1CWhZjh7NAqBx41Y+0+vUSaRx49asWjW7wnUE2NfYZl5f4OfAv6mCx8141oS75JLruOyy/sTExNGjx68L/2LfdtvfuO22vxEfn0RMTDydOw+iTZv/4aOPSn4xAVq0uIwOHW4gNrYu3bvfzznn1OG775YDtnm2c+daOna8ibp1k6lTJ4Fbb32ec86Jq7C+efPG0KRJG/r1+zN16iRy/vkd6N//OTZt+ojNmz/267MAnDhxlC+/nEfnzgMB6NJlMMbk8/nn033WUVGt/nyWytTsj++//4rY2LrExTWocNn169/n3HNb0rp1jxLzGjb8MTt2fFXp7QfIe8BPsa2vOTg+5tSzABXs8v0RF9eAfftKPy5p2rRd4f9HRkYRH9+Q7OwfAIiOjqVFi8v5v/97hNWr55KXd4zIyFq88MK+creXmZnOvn1baNXqGp/pP/5xZwC+/TbN78/y5Zdv8qMfdSQhoSkAl102gKioaFasSPVZrqJaK5pf2Zr9kZ2916dXrSw//LCVFSum8atfvUZkZMmxaOrUSeDQob2V3n4A7QZuA7pRcedCuTw7DxQdXbvU6bt3b+Tttx9j27YVHD78A8bYUaHOP//SUpePifE9SR0VFY0xZ57r++CDi1iw4Clmz36A//3fwVx88XX07fvHwi9WaY4csb2eH300kY8+mlhi/sGDO/z6LAArVkylS5dfFf4cH59E27a9WLt2Pt99t5yf/ORnftda3vzK1uyPnJxMoqKiy13m+PEjvPpqf/r2/WOZxzhRUdHk5Hh2rrMsX2HPF/XCPiT6rITUidRTp/J44YXrSExsyu9+t5Tk5J8QGRnF1Kl3snPn12e1zjp1Ern11vHceut4/vOfL3jrrUcZN64bf/7zRs49t2Wp74mPbwhAr15juPnmZ8/68xw48D2bNy9l06aPSU0dUmL+ihWpPgGqqNby5ldVzUXFxSVy6lRemfOPHs3ilVdupE2b/6FXr4fLXO7UqTy/moEeyMDxuU0h1Y29f/9/OHRoD5ddNoDGjVsXNgfy8s7upPKhQ3sLe5sALrigC7ffPpmTJ0+wffvqMt+XmNiMxo1bs337qhLznnyyg98HxCtWpHLFFQMLz4cVvCZOPEJ8fENWrZrD8eM5ftVa0Xx/a46I8P+fvF69xoWdA8VlZqYzbtzPaNfu5xUG9ujRLOrXb+z3doPkHKAjUHE3cjlCKkANG7agbt1z+eKLGezevZG8vFw2bPiQ9evPeg/Lrl3rWbz4RY4dy+bo0Sw++eS1wuOJ8tx663i2bPmE998fy5EjGRw5ksGcOaPJzz/p06VeFmMMn38+gz59Hi0xLyYmjp49H+T48SM+AwdWVGtF8/2puX798wDYu3cTR45k8NBD55X5x6R5847k5h4u0fzatWs9zz7bleuue5BevcYUTv/mmwVMmza0xHoyMv7Lj37UscLfWRWIwp4QrbjbEMZgLwWaXtGC5SlzaN/Jkys/Iu1vfpPAsWOHCn++6qo7uOuu1MKfV616g3/8w/f8x0svZfocqG7fvoo5c37Ljh1riItLpG3b3uTkHCz8oj3//B62bFnqs57OnQdx881jGTPm/MJp557bkqef3so337xHWtpL7NjxFadO5dG0aXv69XuS1q17+JzLKfDww8u58MKuAGzY8CHvvvsnduxYQ506CVx88bXcfPOzJCY2K/ezHDq0l4ceOq9w+h//uMbnGK7o+Rig8NxTebUCFc6vqOYCs2bdz8qVswBD586DGTToleL/lIA9DzR6dDIjRvwfbdv2Lpz++9//mAMHtpf6nq5d7+aOO/5Z+PPRo1k8+GBDHnhgUaXPA50emXQe/g3tmwK8CFwMPIS9OqEsv8ZepTAS+PvpaR+cXkdR+4Byd51VGiCpfmbOvJcDB3YwatTCs3r/woXPsHLlLP70p7Wl9tCVx88AtceG5Trs09AjsHuVkged9tq5vwG/AP4AOB8shlQTTkLPzTc/S2ZmOp9+OqXS7/3++y9ZtmwSQ4fOrHR4/NAE+Af2CRhXn55WC9uM+2mxZVthHznzHdABu6epkp4WBUjKVbt2fcaMWcamTWkcPvxDpd6blvYyv/nNwjJPQZylOOBhbBjuxH6Hi/e1twaaY5tyX2I7Cvqe/rkdsKSqigmpbmwJTXXqJDJ06KxKv2/IkGlVWUYk9h6g8UAi5T+4LBb4D5AFvAn8DlgGVPkVrQqQhIPrgJexTbEI/Lv85nHgeexzagNGAZKQdfoc1NXYWxMM/l+3dgLIJ8DhAR0DSYj64Yet7N+/FezxTS5nwnOCiptiUdhjnYBTgCQkJSdfSPPml4E94K8DXADcAPwReB1741vBHsZgQ1YQrNJ64gJCTTgJBwb7sOH/AvOLTI/CBqstZ8ZG+OnpaRecnh/QW2EVIAlnp7Dd2d9h7zQtUAv4CQqQyFk5CXwbjA3pGEjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIgzJPpH722dRg1iFSQlnjLoSS0gJ0MiIiMnf69GFOQ57WdMaYqIiIiHzsdVxy9sLnWTBSpQx2gBapxnQMJOJAARJxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwUoeFoCK4DtHtchVUgBCo4hwCIg2etCpGopQIEXB1wLdAbWe1yLVDE9pTvwcoBBXhchgaE9kIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIhKSij7i8YPTPxd97fWoLqlCOpEaHL28LkACQ004EQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoKuxq8afgCbFph0H7saOCVfUE8CeINQkEjaew97jc6Kc1ykgHYjwqEaRkNWRkjfMFX8dB572qkCRUPcdFYeonWfViYS4P2GbamWF5zvvShMJfRdSdnhOAH/wrjSR8LAWyKf0EF3oYV0iYeG3QB6+wckHVnlZlEi4aILtri4aoDxgpJdFiYST5fiG6BTQ2NOKRMLIPZwJ0EngI2/LEQkviZw5DjoJ3OVtOSLh5z1s58EJIMHjWiSAAnExaVwA1hlu5gI/xz6ZOw/9TnKxzdpqJxAXNpoArFPC2wBgjtdFBEJAbmf4/e9/T9euXQOx6rDxyiuvMGzYMM455xyvS/HU9ddf73UJARWQAP30pz+lT58+gVh12OjatSv169f3ugwJMN2RGiAKT82gAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCARBwoQCIOFCARBwqQiANPA5Senk5ERESJV1RUFM2aNWPQoEHs2LHDyxJ97Nq1i6ioKO677z5P61iyZAkRERGsX7/e7/dkZWUxePBgfvjhB5/p27Zt46qrrqJFixalvu/OO+9kw4YNLuVWa54GqFmzZhhjuOOOO4iLi8MYgzGGAwcOMG7cOObOnUvfvn29LNHH9OnTyc/P54033iA3N9frcvyWnZ1Nt27d6N69O8nJyYXTp0yZQkpKSolQFTVy5Eh69+7N2rVrg1Fq2AnJJlxCQgIDBw6kb9++fPPNNyGzF0pNTaV///5kZWXx1ltveV2O38aMGUPTpk25++67C6fl5OSQlpbGypUradu2bZnv7dSpE8OHD2fQoEGcOlUthzUIOWb27NmmMu644w4TFxdXYvovfvELA5gdO3YYY4wZNWpU4Yif69atM8YYM3fu3MJpM2bMMMYYM2HChMJpEyZMMPfee69JTEw0gBkwYIDP/EmTJpmRI0eaevXqmSZNmpgnn3yy1Bo//fRT0759e7Nt2zYDmJ49e5a63NatW80NN9xgkpKSTHx8vOnXr5/5/PPP/Z5vjDHz5883nTp1MjExMSY5OdkMHz7cHDp0yBhjzMMPP1xi3O3mzZuX+bvNzs42sbGx5r333itzmX79+pW7joMHD5qoqCizZMmSMpcpy+kabw36tzCMOQcoKyvLzJo1y0RHR5vBgwf7LLt48WKfABljzP79+30CZIwxhw8fNoBp0aKFmTNnjjly5IiZMGGCGTBggM/89u3bm3feecdkZ2ebl156yQBm6dKlJWocOnSoGTdunDHGmCuvvNJERkYWBruoDh06mAEDBph9+/aZzMxMM2rUKJ/PVtH8t99+20RERJjHH3/cHDx40Hz99demdevWpkePHiY/P7/M30FZZs6caQBz4MCBMpepKEDGGNOmTRszbNiwCrdXHApQpZ1VgCj2VzUqKsrcddddhX95C1Q2QEOHDi11mwXzhwwZUjjt5MmTpk6dOuYvf/mLz7I5OTkmISHBpKenG2OMeeWVVwxgnnrqKZ/ljh07Zop//ry8PJOcnOzXfGOMueiii0zbtm191jt//nwDmLS0tDJ/B2UZPXq0qVu3brnL+BOg66+/3nTq1KnC7RVHNQ9QyBwDFe1EyM3NZdWqVWzZsoUOHTqQnp5+1utt3759ufPbtTvz0LioqCgaNmxY4qD6zTffpGPHjjRt2hSAAQMGEB0dTWpqqs9ysbGxXH755TzyyCPMnTuXY8eOUatWLfbt2+fX/PT0dLZs2cI111zjs97OnTsDkJaWVunPv3fvXhIS3Md2TEhIYO/evc7rqW5CJkBFxcTE8NOf/pRXX32V7du38/TTZ/9o0dq1a5c7Pz4+3ufn6Oho8vPzfaZNnTqVwYMHF/6clJREr1692Lp1K8uXL/dZdtGiRdx444088MADJCQk0KdPH1auXOnX/IyMDAAmTpzo061f0HN2Np0pmZmZREdHV/p9xUVHR3Pw4EHn9VQ3IRmgAi1btgTg22+/LZwWGWlLzsvLK5yWnZ0dsBq+//57li5dypAhQ3y+1PPnzwcosRdKTExk/Pjx7Nq1i2XLlpGbm0u3bt3Ytm1bhfMbNmwI2F6zgr1x0deMGTMqXX9iYqLP7+ps5eXl0aBBA+f1VDchHaDvvrOPFW3UqFHhtHPPPRfApznxzTffBKyG1NRUBg4cWOLLfOTIERo2bMicOXPIyckprKlok7BLly5MnjyZEydOsHr16grnN2vWjNatW7NqVcnncXXo0IHZs2cDZ/6I+KNx48ZkZWWd7ccvlJWVRePGekpLcSEZoOPHj7NmzRruvfdeoqKiGD58eOG8iy66iOTkZP7+979z8OBBNm/ezLRp0wJSR8Ff/UcffbTEvLi4OB588EGOHDnCvHnzCqevX7+eF198kezsbLKysnjttdcKj338mT9+/Hg++eQTxo4dS0ZGBhkZGYwePZqTJ0/Sr18/AM477zwANm3aREZGBueddx6rV68u9TN07NiRw4cPOze//vvf/9KxY0endYh//O6F27lzZ6kP5Y2MjDTnnnuu6d27d2HPU1GLFy82l1xyialdu7a5+uqrzerVqwvfm5KSYl5//fUS68zMzCx8f/H5gwYNKlFLXFycz89r1qzxqaH4+ZiUlBRjjDELFiwwPXv2NElJSaZevXqma9euPp+hovnGGLNo0SLTpUsXExMTYxo1amQGDhxodu7c6bPMiBEjTP369U29evXMiBEjyvwdF5wHWrhwYYl5KSkpJX5PjRo1KrFcZmamzgMFUaW7sSWwhg8fbnr37n3W73/66adNmzZtzMmTJyv9Xqp5gEKyCSdV69lnnyU9PZ0pU6ZU+r1ffvklkyZNYubMmURFRQWguvCmANUA9evXZ9myZaSlpZV74WhpXn75ZRYuXMill14aoOrCW0CeziChJzExkVmzZlX6fYHqoKkutAcScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIg4DcznD8+PHCgTZEqrOIAKzTBGCdEt4GAHO8LiIQArEHuj4A6wxHbwB/A77wupAQ8JXXBUj4qdaDaYilTgQRBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQcKkIgDBUjEgQIk4kABEnGgAIk4UIBEHChAIg4UIBEHCpCIAwVIxIECJOJAARJxoACJOFCAgqcln8oKqAAAECBJREFUsALY7nEdUoUUoOAYAiwCkr0uRKqWAhR4ccC1QGdgvce1SBULyODy4iMHGOR1ERIY2gOJOFCARBwoQCIOFCARBwqQiAMFSMSBAiQiIanoE+o+OP1z0ddej+qSKqQTqcHRy+sCJDDUhBNxoACJOFCARBwoQCIOFCARBwqQiAMFSMSBAiTiQAEScaAAiThQgEQcKEAiDhQgEQe6GrtqDAcSik07iL0K+8fFpqcC+4JQk0jY+Af2Hp/ccl4ngQNAtEc1ioSs7pS8Ya746wTwilcFioSySGyzrKIQdfWqQJFQNx67lykrPHuACM+qEwlxl1F+822sd6WJhIf/UHaIOnhYl0hYeJLSm3HbvCxKJFy0pvTm22NeFiUSTr4B8vEN0U88rUgkjDwE5GGDkw985W05IuGlCWf2QHnAKG/LEQk/n2JDdAobKBGphHuxe6ClHtchAaYz45UXDVyA7XFrBVx0+lUXqHf6FQ/EYvdCh06/ck6/tgNbgE3A5tP/nx3MDyBVRwGq2DnYR9R3B3oAXYAY7B5mJzYAWzgTlMPYoIwA/on9HdfHPu6+Lvb2hlbAhafXDbAB+Pj0axn2qm2RsFUb+CWwABsGg91zTAVuB36KDUR5zq9gfi1siPoC44BV2FseTgFfAg8Dzc6qehEPRABXA/+L3ZPkAfOBodgmWzAkAP2ASdi90ClgMfArKg6siCcisXuB1dg9zQbsX/9GXhaFbd71BeYAx7GhHgskeVmU+KrJx0DnYP+y/x57XDIb25RaW4l1xHGmE+H80z/HYY956nKm4yAH21GQAXyH7UD4oRLbScIeU406XferwAvoKXfikeuxF3geByZjj0UqUgvbmfB74H3ge3xPmH4PbAT+jW12/R/wIfAZ8PXp7R3mzOU9B4HPsfcRXY/tvatIPPBbYDdwFHgc26EhEhTNgbexX+B/UfGBfjy20+BdbBPKYL+8M4Ex2OOVVlRunINm2N68+4AJ2D1ePjaEX2AvPG1ewTpigd9hA7kF+J9KbF+k0iKxX/gc4FvsF7i8ZXsC04Ej2L3UO9gm1MUBqu9coD+2abYPG6ilwBDK3zOdD8zDBnsOkByg+qQGawwswY6M8wfOnHspLhL7Jd6A/UKuxh5zBPtLGQVcx5kAZwMvYT9HWXphb+bbBVwT4PqkBrkG2+Tajj1+KU00MAx7jJKH/eK2CUJt/kgAHgX2Y8M0nrJ7B+sBb2DPJT2BDaLIWXsMex5lNmU3g7pi7985jg3ORcEprdLisHvDnUDW6f8vKyAjsXvbxUBiUKqTaiUKeA27NxlRxjINsM2iU0Aa9rq2cFAbu3fJxfbsXVXGcp2AHcA6oGlQKpNqIQa7x8kFbi5jmT7Y8zE7gJuCVFdVa4Xdw5zCnlwtbYjmJti96/bTy4uUqy7wEfb8SmkDGEYDz2F7uKZiu6jD3RBsz+KnlN4ln4Q917QfuDyIdUmYicE2xfYA7UqZ3xRYgT0QvyOIdQVDG+wJ3Axsb1xxcdgTvwcInc4RCSGR2HMgWcClpcxvzZmrBC4JYl3BFAfMwB733VnK/NrAJ0A6FZ+klRrmJexlLT8rZd5l2GvOVgINg1mUByKwHQz5p/9bXH1gDfbKBZ1wFQAewf7V7VfKvB7YS10WAHWCWZTHfoPtXHiulHlNsZ0Kn6HHrNR4V2NPGo4sZd7l2PD8i5r5RRmE/d2UNqDjJZw5KSs11LnY9vy7lLwl40LsZf6LKfuynZpgOPaSpF+XMu82bFPvxqBWJCEhEvgA2zHQoNi8JtgmyufoDk6wx0InKb2JOwXb5d8iiPVICHgQe+lN8fMatYDl2JvVdNfmGf/AXpBa/DKlOtgrFZZRs2+srFGaYr8MT5Qy7xngGHqMSHHR2HNg32C7s4vqiN1DVbdzY1KGOcBW7A1lRfXA9jzdHfSKwsOPsCdSJ5UybwL2JKz22tVcT+xBcZ9i0xtgb0KbEfSKwstN2I6DG4pNr4e9j0gPQK7GamFH8XyzlHmvYe/58WdMgZpuOraTpfh5scHYPXhpV3JINTAIe8K0ZbHpl2P/4W8LekXhqRGQCTxdbHoE9g7ceUGvSAIuAttbVLyJFoV99s5S1ItUGb/G9mIWH9+hoInXNugVSUD9gtL/YW/H7pXC5Wa4UBGFvSbu/4pNL/hDNT3oFUlA/ZuSxz6RwHogNejVVA83Yv8oFb/1o6CpHKyhjCXALsf2vHUpNv0W7LGP7m85OxHY80Kzik2vhb3CY2zQK5KAmIDtfStuNfackJy9X2JPohZ/APJfsdcZalQfP4TywXc0tnv6BexVBgWuwl6Ofxn2MSCBUB97n5GX1hHYK6ajsPcGvY0dLrjARdg/Wtdib5GXMHUjtplW/F7/V7HHP4HUGN/H1Hvx+iDAnxHsJVF7KTkoyb+x40ZIGJuDHeegqHOwl508FOBt15QAtcB2JhQfS2Ek9n6q4pdMSZiIxAal+CPi+2P3SoEe66ymBAjsiD7FOxN+dLqG7kGqIWxFel1AGS7FXtz4cbHpN52etivoFVVf/8JeH1f0zt0d2KGOFaAKhGqAumOvHi56rBOBHev6Qy8KqsYWY8fIu6LY9I8o/ykWQmgH6CNs+7zAJdimlXqGqtZ32HM/xcPyMXZA/rpBryiMhGKAIrAjiy4rNr0H9iFXa4JeUfW3lJLNtY8581Q+KUMoBug87HmYb/5/e2ceYlUVx/HPNJZLqRM6jkiGmqVkWmmUtrm0aSUUGFEUZEQb2kq2EUVUFEULbRQRFVkKbVQmYWmYRIu2WzpmOSVhpaY2wjQ02R/f+5o75573Zibvu5133+8Djzf87ixn3nvfe875/X7n93PsxyFRtWU+ovyzDJhEx33QJuTIsVzDEoQooMIb5mYgjCEpKiMdvkQuazcHbi1WmL4kIQpoFCrTG+9iXYvOAvnSeozdpxG5rV2xrMVmoJKEKiBXKMNQAXkTUHnYiUIDrlhsBuqEEAU0AhUOiVN4Y9dlPJZqwieWdaireM/sh1MZhCigOnTsOM5gVM5qW/bDqRp+RA6cONuQV9Rc2UUIUUD7oDysOP08NiNdmkkKpfCam4CKEKKA+qI3M45PVEa6/IEJqNuEKiBXLD5RGeniE9CO6NlKhhUhRAH1QQ2zOrMZ6dJMsm/szujZCvUXIUQBtZA8h9KCeYLKTW9UW9y14bEbESEKyHcn9G1wjXQptnTGYzciQhRQsc2sCai8mID+A6EKyJ2BfDYjXfrS7jSI28AEVJQQBbQDZWPH+S2yuf1tjPRoQNnXcQrvgwmoCCEKqIlkVnAjGuvI7IdTNYwmmWs4AiX1mge0CCEKqFhOVpvHbqTDXihh1xWQL7HXiBGqgBpQTlyBVjQzmYDKwwG092CKYwLqhFAFBMmmuN9itbDLxRg0w7vZ7iagTghRQE0ocHqwY/8AVeUx0mcyqjUR3+v0A4ZgAipJiAJqQ6Vlj3PsS1G6vS3j0mcayWpHx0fPH2U8looiRAGBilyc6NhWIhe31SpLlwbUrc4tYjkV1Ur4NfETxr+EKqClqLzs8JjtL+B9ksIydo8T0Wu7wrH7ZiXDIVQBfYgygd3Z5nVgBpZenyZnI6HEj4sMAMaRnJUMh1AF1Ip6AM1w7Auj51nZDie31KPODG5f1OloL7o88xFVGG5fmJBYCDyO7oZbItt2YBFwPvB0Gf/278DMMv7+rpDF3uMc1LH7dcd+PrAYvd5GhdIPLeMucewz0d1xWNYDyiGfkGzU3IAaDdssnwPmk9zc7oliRQ9nP5xcMQUVU5zk2K9F1XgscTcHnII6NLhJpHPQKUm3DJPRdd4h2QEQ4HPgyYzHYpSJWuAH4FHH3gs1IL4n8xHlg6PQ7ON6OU+I7G6vIKOCuQyl9gxx7NehwOqgzEdU+byFUqNclmENzHJHT1S3+V7Hvg/wE9ZNurvMRMviKY59Ipp9Jmc9IKP8XIsCfQMd+1now2BvetfoDXwPPO+5tgj/rGTkgL1RXOQBz7VFwFd0bA5l+LkDxXbc5fBk/O3ujRxxEYpPHObYRyKP3C2Zj6iymID2klc49h7AFyhwauSYGrTEWBF9HWcOCq5aoqmfvsAalPNW61ybh84BuXUojBwyFs1Csz3XXkB9PS02lGQ+/tdmP1Rxx2bvKuJBVH5pqGPvD6xHAULbD7VzJTqu4Hbh3gMt2xqxsslVxd7AanTkwRXKeHRHfY7kMq8amYXEM89z7UaU9X50piMygmAMSjS923NtGtosP5LpiMJjCnKuuFkcoJhPK3B1lgMywmI2cr26Z4YAzkVOhRsyHVE4jEcJoQtInvkaiALQr2GzdNXzDDq7M85zbQ4S2F1U1wdlGor1LEYFE+P0Rl7MH4B9Mx6XESB7AW8DvwAHeq6fh5Yqz1IdjoUz0bLtZZI9lmoj+2ZURMQwAMU4VgHfocNgLqei/dIbJIvW54UalO7UBjxEctlWAzyF4j3HZDs0oxJoQAJahY6Au0xExx/WA0dkOK4sqANeRfGx6zzXa4D70Ex8aobjMiqMEWht/y0qieVSj/YFrcD15GNfNAHdODbhz8LogWpHtKL6B4ZRksGoRO3PwKGe6zUosNiKzr645YMrhT7Abchd/w76v116oT3PTmzmMbpBHSrHtJXixxyOAj5FFWnuRB/ISmEWckNvBS7FP5MOQnmDm9H/ahjdojfwEtoX3IS//l0tMBfFS5pQ9Z+QU1qmoGTQv9EhwvoS31fY743OYmBGPiks1/5ExTN8yxwi+2NoObQRuIqwZqTpKHazCwmomBctvjx9DYvzGClxJHIubMSftVBgCHA/Ovm6BaXATCz76PzshxwdX6MZZxGlc9aGA0vQTWBu2UdnVB11wIvoLv4yyUzuOPXow7s6+v61wK1ITOWs5HoAcDFyCrSh/cujwOElfqYncDOK73xD/lz0RmCcjNL3m1GGcmfZCRPQ8YmNSEw7UED2GlQCqpQQS1GHZsYL0H5mQ/T7m4FXgDNIpuG4nITE3YwEXw2ZFsGRh1hId9kTuBx537agZduTKAWmFKPRmZppqPlUoZxWMxJlU/R1MxLadlQ5qPDoiwK+o2jPmGhBDayWRo+PkOOjFMciwZwOvImWbBs6+RmjTFSjgArsjz6IF6KE1PuAJ1DcpCvUI1GNQv1ch9JRLHW0C6ogqs2oD+kaNHs0oeVaZ9SgWM7NqBTvu6hAyHtdHKthlI1BKCi5LXo8h6L6IdxchiKRr0VLvCX8f44NwyjJAHTA7DP0Yf0euB3tg7Lso7Q/ciYsRx64TWgfNjbDMRjGbjEWVUItOA+2os39XHQaNk1v3BDUJe4JtLzbhbxqC4DTUv5bRsqEsEwJmRrgEOQ4mIpSg+pQsHI92ss0Ro/t0WMH2vO0oJmrP+p1VNgbDafj3qk/qlvwMXIkLENpOC0Z/H/GbmIC6h61aHY6mI4iOIiuZS+0IY9ZI8oab0T7m5V07FFqVAgmoPSoRTNNfzTb9ER7mO2oUlAznbvKDcMwDMMwDMMwDCNY/gFQodjaA4PBwwAAAABJRU5ErkJggg==", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'createAsset': (node:createAsset connections:{lockAsset:[0.5]}), 'lockAsset': (node:lockAsset connections:{MintAsset:[0.5]}), 'MintAsset': (node:MintAsset connections:{TransferAsset:[0.5]}), 'TransferAsset': (node:TransferAsset connections:{TransferAsset:[0.5], BurnAsset:[0.5]}), 'BurnAsset': (node:BurnAsset connections:{})}\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOsAAALzCAYAAADwEPAKAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd5xU9b3/8deZsiy7wNJXiiBisIPY4IrEjiWiAQvGEkAxpphEiYlY8HptiYbITYy/RDEYQeRaooZmxOSachErglEioBClCFKEpe5O+f7++LLOzs7M7sy2M9+d9/PxOI9hZr5zzucM895zzvc0EBEREREREclPnt8FFKjOQA+gI9AWaAOUAFFgJxADtgOb9g8xf8qUfKKwNh8POAI4FjjKC3qDCHKkiZruxCnKYSxxL+RtAz42EfMu8D7wHvAWsK8Z6pY8pbA2rb7ASIKc6XneqSZqyryQF2/Tp02kZEBJUfHBxV5ReRGhbiGKuhYRLAsSKArgFXkEigOYqCG+J44xhtiOGJFtESKb7bDvk33sXbU3su+jfcR2x8IEiHhB7x0TMa8AC4A3AOPv7EtzUlgbrxcw1gt7Y0zEDAy0DUTbn9Dea398+2C7Y9vRdkBbvGDTfs1Vn1Wx651d7Fyyk4o3KqoiGyNFXsjbbKLmGWAWsLhJJyh5QWFtGA84ywt615u4OS9YGox3GtEp3PG0jrQ/oT1euGW/1r0f7WX7q9v54uUvqvat2Vfkhb3lJmJ+DcwEdrVoMdJsFNbcnemFvZ+biDmm7YC2sW6XdAt2/lpnAm0CftcFwJ5/7WHLH7aYbfO3xU3M7DIx89/AVGCH37VJ4yis2Rvihb1HTMQMKjulLNbzup7Btoe29bumjKLbo3z+5Od8PvvzqImaXSZqJgHTgLjftUnDKKz160iA+zFc2+6YdtEDf3xgOJ9DWlt0R5RN0zfx+ezP4wRYZiJmArDE77okdwpr3YZ5Ie/ZYLtg19439Q53Prez3/U02N6P9/LpvZ9Gd7+328NwCzAF9R47Jeh3AXlsEh4zO/xHh9Kv/PYrodKjS/2up1HCncN0vaBrIFAcCOx6e9cZXtAbRpy5aF+tM7RkTRUkwG8wTOg9sbfX/RvdW923tPv93Xw88eNIrCK22kTMmcA6v2uS+rWyn2Gjhbyg9weCfO3gnx0cLDulzO96mk3VpipWfXdVpGpd1VYTNScDH/tdk9RNYU3wCPBEIBS4/JDfHhJsN6id3/U0u1hFjJXfXhndt3rfBhMxJ2KPQ5Y8lR87B/PD3Z7nXXHwgwcXRFABgh2CfOXhr4TC5eEeXth7BSj2uybJTB1M1hl4TOtzW59Ap7M6+V1Liwq0DVD21bLglhe2dDEx0xXDAr9rkvQUVujkhbxXO57esW2v7/cqyDWNUIcQbQ5sE9j+yvbjgbeBVX7XJKkK8sdZy22BkkCnvrf3Leg/XJ3O6kSnszsZL+z9Ggj7XY+kKvSw9iPAD3p+t2c42L6gswpAr+/3CmA4ELjO71okVaGH9fvhrmG6jurqdx15oahHEd0u7hb0Qt7N6LeRdwr5PyTshbzx3S7qFvZC2oNVreslXTFR0xs41e9aJFkhh/UMEzUdO49093jf5lB8UDElh5dEgMv9rkWSFXJYh7fp3aaqqDz7yyEVig4ndQh7Rd7pftchyQo2rF7YO7ndse2U1DRKB5ViqsxBQBe/a5GEgg0rHv2L++qAnXSK+xSDPRS1j8+lSA2FG9YYHYMdtbsmnVBZqPqf6ibPIwUbVhM3xfly3aR8E2j75ffi9km8rUzB/lq9oFcRq9CF7tOJVkSr/7nNzzokWcGGlSDbol9E629XgGp8L1v8rEOSFWxYTZVZuvtfu7VoTWPPh3sgQASdkJ5XCjasGP5v99LdcV0yLNXuZbvxgt67QKXftUhC4YYV/hLbFQvvWqYL1tdkYobtr26PmIj5k9+1SLJCDus/vbD3/tYXt2rZWkPFogqiX0RDwAy/a5FkhRxWTMT8ZtuftsUjmyN+l5I3Nj25KeqFvL+j7dW8U9BhBaZj2LThtxt0SwnsUnXXO7tCJmpu97sWSVXoYd1noubmrX/c6u3+YLfftfgqXhln7S/WRrygNw/4P7/rkVSFHlaAWV7QW7jmJ2sisQLek7P+wfWmal1VpYmZ7/tdi6SnsIIxUTMusiWy65P/+iReiPdY2/anbWx+brNnYuZq4N9+1yPp6Uh2axdx3tj3yb4rozuigbJhZQVz6YiK1ytY85M1cTwexPDfftcjmSmsCf/GsHzP8j2XxPfGvQ5DOrT6+xXsfGMnqyeujpmY+R/ifMfveqRuCmuyfwGrd7+3+8LKdZWUfbXM8wKtM7HbXtrGmp+siXtx7zkTN2OBwt1gd4TCmuo94PV9q/ddUvF6hddhaIdAsF3r+ZpM1LDhoQ2sn7oeDL8wxnwbBdUJrXOx0TSO8sLe84GiQL++/9k31PGMjn7X02iVaytZc+ua6N4Ve6MmZr4D/N7vmiR7CmvdSgjwK+JcUza8LHbgTw4MFvV077JN8ao4m36/iY2/2xjDY4WJmIuAD/2uS3KjsGbnNC/sPYpHv/IryoPdr+xOqGOo/k/5zMQNXyz4gg2/2RCJbI5ETcxMBn4F6PhKByms2QsD3/eC3m1e0OvQ/fLuoW6XdiNcnn+3hYlXxvniT1/w2e8+i1RtqAriMZM4twHr/a5NGk5hzV0p8B0v5E0yMdO57OSyeNeLuwY7DO2A31f23/vxXra+uJWtL26NxvbFAJ4izl3ooPxWQWFtuCLg617Iu95EzcnB0mC07LSyUKfTO3ntT2hPoKT5Dw4zccPeD/ey/dXtfLHwi6rKdZVFXthbayLm/wGPozuZtyoKa9PoB4z2wt4YEzXHe55H2wFtI+2Pb19UcnQJbfu3pU2fNnjBxn3dkc8j7F29lz3/2sOuJbtiu5bsMvF98ZBX5G0wVeZ/gOeBxVCIB022fgpr0ysHTgGGe0XeCBMxh2AIeEEvXtS7KNKmV5tQuFs4WNS9iEC7AMGSIF7QI1AawFQZ4vvimCpDbFeMyLYIVRur4pHPI9F9n+wLxPfEQwBe2NtsYuZV4vwN+Dvwvp8zLC1DYW1+xcDhwJHAYUBvL+T1JkgfDO2J0w5D0MRMWzxiXtDbi0clAXZh2GiqzBpgI/Zu5B9gg7nVt7kRKXAlgAHG+VyH5DGdIifiCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhzW/nASuBqN+FiP/y/yajhak/MBXoi70dh4iWrHnqbuA14Dhgp8+1SJ7QkjU/XQPs9bsIyS9asuYnBVVSKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKz56XzA7B96AcEazyf4WJf4SIcb5qd5gOd3EZJftGQVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijtBpWP5YBBxN8vdfDESAWI3XosBQYEXLlSYiNd1B4mTyTEMcWO5XgSJi9ceGsa6wRoFJfhUoIglLsKu8dS1Z+/lWnYh86UYyL11jwOv+lSYiNfUg85I1DlzvX2kiUttfsdum6ZasuuO5SB6ZQPqOpVf8LEpEUnUEqkgN7Fg/ixKR9P6IPRiiOqiVQJmvFYlIWmNIBDUCPOdvOSKSSQmwh0RgL/K3HBGpy0xsUHcBbX2uRfJUY+510xs4qakKKXDr9z++DYz0s5BWZC2w2O8i8sWl1H8wugYNfg3P0so0/nxWYzQ0xTB5MkQi/tfRGoaLL26CaOQfnXyeLyZPhpDuwCmZKaz5Ihz2uwLJcwqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYW9KqVeB5MHSo35U0n08+gQsugIqK1PcWLIABA+o+YWHSJHj66earz2EKa0t6/HH7+MYbsLwV3nNq6VI4/ngYMQI6dEi8/vHHNsC33AKbNtU9jmuvte0mT27eWh2ksKbTrh2cfHLTjjMehxkzYPBg+7w6uPmmofNeUQEjR8JFF8H1tW4mMHkynHQSvPMOtG9f93j694cXXoB774Vnnsm9jlZMYW0pCxfa1b9HH7XPZ86EaNTfmprSAw/Axo1wxx2p7/3ud3b1NtvzdQcNsieQ/+hHres7aiSFtaVMnw7jxtnVxIED7ergggV+V9U0jIHHHoMhQ6Bnz9T32zbgGnCjRsG6dTB/fuPrayVaPqxbt8LEiXZ1p00b6N0bzjwTfv972LsXXnzRdsJUDytWwKWXQpcuide2bLHj2rwZfvADOOggKCqCbt1g9Gi77VRTNGo7Lc46Cw44wP54jj4afvlLu3pabcoUO/7du2HRosT0ai8Rsp1utW3bYO5cGDvWPh8/3j5On57atrLSLp0OOwxKSqBzZ7t6OWcOxGK5t8u23mznPZ1ly+wfn0GD6m+brWOOsY8vv9x04yxg9oJpxmQ/fPaZoV8/wwEHGObONVRUGDZuNNx9twEMU6cm2l54oX3tlFMMr75q2L3b8PrrhmDQsHmzYcMGQ9++hvJyw/z5hp07De+/b9sXFxteey0xrrlz7bjuu8+wbZv9/K9+ZQgEDDfdlFpnaalh2LD085DLdKuHhx4ynHZa4vnmzYZw2BAKGTZtSm47YYKhrMywcKFhzx77/dx0k63/1Vdzb5drvXXNe6Zh5szE91tf21697P9hfe127LDjHD48t1qMMVx8saEVXjCtMXIP67hx9j/g6adT3zvnnPRhXbAg/bjGjrXvz5qV+gehTRvDccclh/XUU1PHceWVNjQ7dmT/g81lutXDsccaZsxIfm3UKDueKVOSX+/Xz3DSSanjGDAgOYTZtsu13oaE9YEH7DQefrjpwmqMwfMMhxyisDaB3MNaVmb/Uysq6m9bHdYtWzKPKxBIDVp1OMCwdm3d0/j5z227XJYuuU532TJD+/Z2zaBm2zlzbNsjj0x+/Tvfsa9fe61h8WJDNJq+jmzb5VpvQ8J61112PI8+2rRhDYdte4UVaMlt1spK2LEDiovr776vqbQ087jicSgrS97G9TxYssS2W7XKPu7YYbfvjj4aOnVKtPvxj+37e/bkNg/ZThfsdunOnXY+ara94AL7/gcfwJtvJto//LDdxbN6NZxxht1fec45dndGTdm0a0i9DVFcbB8jkcaNp7ZotGGdU61Uy4W1TRv7g9m3z/54Gzuujh1t50dd19o97TTbfuRIuPtuu8N95Ur74zUGpk617xuTPH7Pa5rpRiIwa5btsEnX7oYbbLua+1w9D666Cv78Z9i+3Xa4GWM7hB58MLd2udZb17zXpUcP+7hjR+6fzaSiwtZWPW5p4d7gUaPsY7pdFoMHw403Zj+u0aPtX95Fi1Lfu/9+6NPHvh+L2TYHHGB7RLt1S/wg9+5NP+6SEqiqSjw/9NDE/tFspwu2B7hrV3tAQDrXXGMfZ89O1NKxI3z4of13OGx7sKt7yGvuxsi2XS711jfvmRx1lH1ct67udrlYvz553NIoDe8N7tHDMG+e3XZdu9Zuf5WXGz75JHWbde/e9OPatMnQv7/h4INtJ9T27YatWw2//a2hpCS5E+v00+24HnjA9sTu2WP43/819OljX3/lleRxn3OO3db79FO7PRsKGZYvz326559vp1nXd3LiibaGJ59MbGOecord1t23z07vzjttm3vuSd4WzaZdLvXWN++Zhnjc0L17dtu62W6zPvWUnZcXXtA2axPIPazG2A6jG26woQ2HbXAvu8ywcqV9f/Fi+59Ue0g3rq1bDRMn2h9iOGzo1s0wYkRq+DZvNlx3neHAA2278nLbMz1pUmL8NXtFP/zQ7jIoLbWfqd3LWd90165Nrn3IkNTa16xJncfycsPSpbbWww+3Yerc2TB0qGHaNBuK6s9n2y6X7ymbec803HqrDfb69anvVe86SzdMm5Z+fJdcYoNdVaWwNoGGhVVD6xy2b7fhuu66xo9r6VK722b27IZ9vpWGVYcbStMoK7Pb6M89Z3uqG2r1arudfcstcNllTVdfK6CwStMZPBjefhteein9+azZeOQRe8bNvfc2bW2tgG5bJk3roINg3ryGf/7++5uslNZGS1YRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriiMafIqc7fUm+acoLt+WRxod1zJgmKENExA0l2AuIjfO5Dslj2mYVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsOa384CVQNTvQsR/jb8ivzSH/sBUoC9Q7nMtkie0ZM1PdwOvAccBO32uRfKElqz56Rpgr99FSH7RkjU/KaiSQmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmHNT+cDZv/QCwjWeD7Bx7rERzrcMD/NAzy/i5D8oiWriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYROw/LHIuBokr//YiACxGq8FgWGAitarjQRqekOEieTZxriwHK/ChQRqz82jHWFNQpM8qtAEUlYgl3lrWvJ2s+36kTkSzeSeekaA173rzQRqakHmZesceB6/0oTkdr+it02Tbdk1R3PRfLIBNJ3LL3iZ1EikqojUEVqYMf6WZSIpPdH7MEQ1UGtBMp8rUhE0hpDIqgR4Dl/yxGRTEqAPSQCe5G/5YhIXWZig7oLaOtzLZKnWvJeN5e24LRcs37/49vASD8LyXOvAev8LsIvLXnWjWnBaUnrNAZ4xu8i/NKy57M+/TQYoyHdMHkyRCL+15Gvg+jk87wxeTKEdAdOyUxhzRfhsN8VSJ5TWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXFEfoZ1yhTwPDv07p3f01q1yn526NCmry1ffPIJXHABVFSkvrdgAQwYUPdJCJMm2TOuxBmGp582GJP9MGiQoVev3D7T0KGh07rlFgP7L8nywQctU2tLDu++a+ja1fDQQ8mvf/SRYeRIw8CBhg4dDMFg5nF89JGhXz/D7bc3vA77HRf0BQzyc8nqingcZsyAwYPt88cf97eeTNq1g5NPzv1zFRUwciRcdBFcX+sGAZMnw0knwTvvQPv2dY+nf3944QW49154pmDPHW80hbUxFi60q3+PPmqfz5wJ0ai/NTWlBx6AjRvhjjtS3/vd7+zqbbbn4A4aBBdfDD/6Uev6jlqQwtoY06fDuHFw/PEwcCBs2mS34VoDY+Cxx2DIEOjZM/X9tg24rtuoUbBuHcyf3/j6CpCbYd26FSZOtKtXRUXQqROcey68+mrdbdu0sZ1IZ54Jv/897N2beRpPPpnoeKoeNm5MvL9tG8ydC2PH2ufjx9vH6dNTx1VZaZdOhx0GJSXQubNdvZwzB2Kx3NsBbN4MP/gBHHSQ/Q66dYPRo2Hp0kSb6s6z3bth0aLEfGSzNFy2zP7xGTSo/rbZOuYY+/jyy003TmkWTdPB9NlntrOivNwwd65hxw7DihWG0aMNnmeYNi217QEH2LYVFYaNGw133207LKZOzTytaNQwcaLhrLMM27al1vbQQ4bTTks837zZEA4bQiHDpk3JbSdMMJSVGRYuNOzZY2u46SZbw6uv5t5uwwZD3772O5g/37Bzp+H99w2nnGIoLja89lry9EtLDcOG5fbdz5xpp3vfffW37dWr7g6m6mHHDjvO4cPVwZTnmias48bZ/7jZs5Nf37fP0LOnoW1b+yOv2TbddM85J3NYv/jCcPbZhh/+0IY2XW3HHmuYMSP5tVGj7PSmTEl+vV8/w0knpY5jwIDkEGbbbuxYO51Zs1L/kLVpYzjuuMaH9YEH7DQefrjpwmqM/YN6yCEKa55rmrCWldn/uIqK1PZXXWXfe+KJ+ttmmtaHH9pwnHtu5rbLlhnatzfs3p38+pw5dnpHHpn8+ne+Y1+/9lrD4sWZ/wBk266szBAI2CVVuj8iYFi7tnFhvesuO55HH23asIbDDdtFprA6ts1aWQk7dkBxcfrdBeX7b2m6cWP9bdP54gv4+tftdu1LL9nt1nSmT4edO6G0NHmb9oIL7PsffABvvplo//DDdhfP6tVwxhnQoQOcc47dnVFTNu2q5yseh7Ky1O3qJUtsu1WrspvnTIqL7WMk0rjx1BaNNqxzShwLa5s29ge6b58NS22bNtnHAw6ov206oRD8+c/wxz/C0UfDtdfCW28lt4lEYNYs22Fj0lzf9oYbbLua+1w9D666yo57+3Z48UXbdvRoePDB3Nq1aQMdO9pa67rO8GmnJY83Vz162McdO3L/bCYVFba26nFLTtwKK9juf0jt/q+shL/8xf7VPvvs5LbpdqcMHgw33pj8Wvv20KuXPYhgzhz7+PWvw2efJdrMnQtdu9oDAtK55hr7OHt2ore5Y0f48EP773AYzjrLBtHzkucj23ajR9sl1KJFqdO//37o0yd5X2ZJCVRVJZ4femhi33AmRx1lH9c14d0q1q9PHrfkrebpDa6oSO4NrrmNVd22Rw/DvHm27dq1dtuwvNzwySd1T+uvf7XbWEOH2g4sYwznn287X+qq+8QT7TbWk08mtjFPOcVu6+7bZ3uL77zTtrnnnuRt0Wzabdpk6N/fcPDBhgULDNu3G7ZuNfz2t4aSktTv+Zxz7Lg//dT2FIdChuXL656HeNzQvXt227rZbrM+9ZSdlxde0DZrnss+rD//eeJ42+rhttsS72/ZYrjhBhvEcNj+EM8+2/CXv6SOq3bbHj0Ml11mWLnSvj97duq0pk61HTy1X685DBmSOq01a1LblZcbli41XHed4fDDbZg6d7Z/AKZNs6Go/ny27Yyx4Zw40QY2HDZ062YYMcLwyiupdX34od1dUlpqOPDA7Hp4jTHceqsN9vr1qe/NnZv5u6m5+6zmcMklNthVVQprnst9yarB32H7dhuu665r/LiWLrVrPrV3uWU7KKwObrNKyykrs9vozz1ne6obavVqu519yy1w2WVNV1+BUVilboMHw9tv211Z6c5nzcYjj9gzbu69t2lrKzC6bZnU76CDYN68hn/+/vubrJRCpiWriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcUTLniK3eHGLTk6kNWnANSobzLTgtKR1GgPonpHiqxLsH7NxPtcheUzbrCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxTW/HYesBKI+l2I+K9lb58h2eoPTAX6AuU+1yJ5QkvW/HQ38BpwHLDT51okT2jJmp+uAfb6XYTkFy1Z85OCKikUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMU1vx0PmD2D72AYI3nE3ysS3ykww3z0zzA87sIyS9asoo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFH6DQsfywCjib5+y8GIkCsxmtRYCiwouVKE5Ga7iBxMnmmIQ4s96tAEbH6Y8NYV1ijwCS/ChSRhCXYVd66lqz9fKtORL50I5mXrjHgdf9KE5GaepB5yRoHrvevNBGp7a/YbdN0S1bd8Vwkj0wgfcfSK34WJSKpOgJVpAZ2rJ9FiUh6f8QeDFEd1EqgzNeKRCStMSSCGgGe87ccEcmkBNhDIrAX+VuOiNRlJjaou4C2Ptcieao573XTGzipGcffmqzf//g2MNLPQhyyFljsdxGtxaXUf7C6Bg0NHZ6lwDT/+azGaMhmmDwZIhH/63BhuPjiZv/Z5iOdfJ4vJk+GkO7AKZkprPkiHPa7AslzCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOyJ+w7toFnpc8LM7idMUf/zj5M/fc0/y11mXVKlvH0KH+1tGcPvkELrgAKipS31uwAAYMqPukhEmT4Omnm68+yZk9n9WY3IZ33zWw/5zFc8+tu+2WLYZ27WzbK65Ifm/nTsMhhxi+9rXca2jMcMstifo/+KBlp90Sw7vvGrp2NTz0UPLrH31kGDnSMHCgoUMHQzCYeRwffWTo189w++0Nq+Hiiw06nzVPtG0LffvCSy/B229nbjd1Khx4YPr3jIF43A6N1a4dnHxy/e3icZgxAwYPts8ff7zx024O2c5PbRUVMHIkXHQRXF/rhgGTJ8NJJ8E770D79nWPp39/eOEFuPdeeOaZ3OuQJtfwJWtpqeE3v7FLpwsvTN/uiy8MnTsbfv/79EvWphxKSw3DhtXf7qWXDH37Gt56y9ZUXm6IRPxfGjZ0fmoPt91mCIUM69envrdnT+LfvXrVvWStHi65xNC7d+7fkZaseWb8eOjVC+bMgffeS33/V7+C886zf6XzxfTpMG4cHH88DBwImzbZbbjWwBh47DEYMgR69kx9v20DrvM2ahSsWwfz5ze+vgKQv2Ft08Z2HhljV5dq2rULHnoIbr01/WdffDG502nfvvSv//vfMGYMdOwIXbrA+efDxx8nxjNlim23ezcsWpT4XLrOk23bYO5cGDvWPh8/3j5On57atrIS7rgDDjsMSkqgc2e7ejlnDsRiubcD2LwZfvADOOggKCqCbt1g9GhYurRh81PbsmX2j8+gQfW3zdYxx9jHl19uunFKgzRuNbh61aq83BAIGJYvT7T52c8Ml15q//2Pf2ReDb7wQvve3r3pX7/wQsNrrxl27TK88oqhbVvDCWnU2i4AACAASURBVCc0bLXxoYcMp52WeL55syEctquNmzYlt50wwVBWZli40M7jxo2Gm26yNb36au7tNmywq9/l5Yb5823n2vvvG045xVBcbOexsavBM2fa6d53X/1ts10N3rHDjnP4cK0G+6zxYTXGcP/99j/0yivt89277Y9y2bLGh3Xu3HQ/Ahu0XH/cxx5rmDEj+bVRo+z4pkxJfr1fP8NJJ6WOY8CA5BBm227sWDudWbOS2332maFNG8NxxzU+rA88YKfx8MNNF1ZjDJ5ne+0V1nrl72pwte9+166izp4NH30Ejzxi92EOHNj4cZ9wQvLz6p7lDRtyG89779n9qxfVuph+9apw7V7hc86B116Db30LXn89sUq7YgWcemru7V58EQIBuxpf0wEHwJFH2h7adetym6faqjclmvpaUaEQ7N3btONspfI/rO3awQ032B/qf/6n3e66/famGXdZrfs/FRXZx1x390yfDjt3Qmlp8jbxBRfY9z/4AN58M9H+4YftLp7Vq+GMM6BDBxvMF15IHm827SorYccOW3NZWeqBJUuW2HarVuU2T7UVF9vHSKRx46ktGm1Y51QByv+wAnz/+/aH+NRTtoPj+ONbdvqel/m9SARmzbIdNibNNW5vuMG2q7l09Ty46ir4859h+3a7ZDTGdgg9+GBu7dq0sR1koVDd1x0+7bTs5ieTHj3s444duX82k4oKW1v1uKVOboS1rAwmTrSPTbVUzUVJCVRVJZ4feig8+qj999y50LWrPSAgnWuusY+zZydW9zp2hA8/tP8Oh+GssxI91TV3Y2TbbvRou4RatCh1+vffD3362PezmZ9MjjrKPjZ2dbqm9euTxy11ciOsYHdhbN+eORTN6dhjYeVKWLvWHq+8ejUMH27fe/xxuPrqzJ896ig48US7RHr++cTr3/623datrITPP4cHHrBLmdNPT/58Nu1++lO7v/nqq+1RXzt22F1JjzwCd91lNx1q7p6pa34yGTQIune3u3CaSvVupREjmm6c0iC59waXliaOqwXD2WfX3b5m2+rhoYcML7yQ+voVVxgWL059/bbb0o+r5jHFH35ody+UlhoOPND2iK5dm9x+yJDU+tasSR1veblh6VLDddcZDj/cUFJij8QaOtQwbZohHk98Ptt2xhi2bjVMnGg4+GC7y6hbN8OIEXaXVO260s1PNv8/t96a+QimuXPT/3+ArTfd+C65xPYcV1WpN9hnDdt1oyF/h+3bbbiuu67x41q61O62mT07988WaFjdWQ0W/5WV2W30556zPdUNtXq13c6+5Ra47LKmq6+VU1glN4MH2zOhXnop/fms2XjkEXsIae3DSKVOum2Z5O6gg2DevIZ//v77m6yUQqIlq4gjFFYRRyisIo5QWEUcobCKOEJhFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOEJhFXFE858ip7uESVNryou2OaT5wzpmTLNPQkSkpZRgLy42zuc6JI9pm1XEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCmt/OA1YCUb8LEf81/xX5pSH6A1OBvkC5z7VIntCSNT/dDbwGHAfs9LkWyRNasuana4C9fhch+UVL1vykoEoKhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhTU/nQ+Y/UMvIFjj+QQf6xIf6XDD/DQP8PwuQvKLlqwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEToNyx+LgKNJ/v6LgQgQq/FaFBgKrGi50kSkpjtInEyeaYgDy/0qUESs/tgw1hXWKDDJrwJFJGEJdpW3riVrP9+qE5Ev3UjmpWsMeN2/0kSkph5kXrLGgev9K01Eavsrdts03ZJVdzwXySMTSN+x9IqfRYlIqo5AFamBHetnUSKS3h+xB0NUB7USKPO1IhFJawyJoEaA5/wtR0QyKQH2kAjsRf6WIyJ1mYkN6i6grc+1SJ5Kd6+b3sBJLV1IgVu///FtYKSfhRSgtcBiv4vIRrqzbi4Fnm7pQkR88hxwid9FZCPjXeSK9u1ryToKXuyuuwjeeiuEdGO/lhK9/HLizz/vdxlZ08nneSJ4yy0KqtRJYc0X4bDfFUieU1hFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCB6NKoTsDe43mT4BP9z9+jL11ySc+1pWi0UvWyIknUlVcnPUQ++lPm6LuFhV/9lk7nx07fjkf5oMPmnWa5qOPqCouJjJ8eLNOx0/m00+JXnQRVFTYF774gvi0aUTPPpuqHj2o6tiRyJFHEh03DvPeeymfj91+O/Fnn21sGZ8Bq4Ce2Evs/DewAPg3sAN4DXgU+BZwJI2/mdt5wErsVSxz0iSrwaGnnqJo374vh8CECfb1OXOSX7/EidMGk5jFi4l+85sEzjyTonXrCC9fjterV7NPNz5jhp3+W29h/vWvZp9eSzPLlhH5j//AO/NM6NABgOgttxC98Ua8kSMJL11K0YYNhB599Mu28TlzksYRuPpqYpMnE/uv/2pMKcuBq4DhQB/slToOBS4GpmBPTj8Z+A3wPrAFmAv8ADgwh+n0B+YAP6WB14TWNms94n/4AxhD4PrroV07vIMPJvzxx3hHHtmME40Tf/JJvGOOsU/3BzffVHXpQuS003L/YEUF0dGjCYwaRfA730l6KzB2LMHrr8crL4eSErxhwwg98QTEYsRuvTWprXfwwYSeeYbYz35G/Lkmu85cBLvk+wNwN3ZpewTQBfgaNrQdgF9gV5PfAG4COtcz3ruxS+njgJ0NKazR26zhN9/MfmIzZzZ2ci3OrFsHgNe5vv+LphP/858hFCL08MNEhg0jPmsWwbvvbjXnu8YefBCzaROh225Lej3029+mbe8NHAht22JWrwZjwPOS3guMHk3s5psJfP3rzfkdbceuHi/Y/7wLcAEwGrgXuBOYDjyIXYWu7Rpgb2MK0JK1PrFY/W2aWPyJJwh885t4xx2Hd/TRmM8/J/6nP7V4Hc3CGOLTp+OdcAJejx7ZfWb3bti7167NeKmbjIELLsCsX0/8pZeauNg6bQUex14zqw92lfkK4F/AzaRmq1FBJc0Im118zpykDiezciXRK66gqmfPL19j61aIRok/+yzR884j0qeP7Ww47jhiv/41xOOZx/fJJ0SvvJKq8nKqevYkOmqU/YtcU2UlsbvuIjJwIFWdOlHVowfR0aOJz5v3ZTirxxufOxfgy86lpA6fLVuITZxIZMAAqtq3p6pXL6JjxmCWLct9fqtt20Z8/nwCV14JQOCb37TjeeKJ1C8zi/nIqV2W8xSbOtXWvXs3ZvHixPyVltb7/2/eew/z+ed2aZml6kuvBG++Oe373qBBtt0rvt11ZBN2yXoQ8AR2u3Q+9jKzzepSwBTt29fgITBhggFMaM6czG1GjjSA8YYPN6GFC03Rtm0m/I9/GIJBU7R+vQk9/7wBTPCuu0zRZ5+ZovXrTfDBBw2BgAneeGPG8QVGjjThv/3NFG3dakILFhjatjXe8ccntx0/3lBWZkLz55uiL74w4U8/NcEbb7Q1L1yYdrxF27cnvR7+97+N16eP8bp3N6EXXzRFW7aY8JIlxhs+3FBcbGvIYX6r2wWnTjWBU05JfHb9ekM4bAiFTHjt2gbNR7btcp0nSkuN9x//kdNvI/T444n/1yzahz/91Hjdu5vA+PGZ233+uf1uhw3L7Xc6erQBGt2dnMZIYDeQ6QJP6/CrN7gxgjfdROCrX7WdCSecQNHu3dClCwCBr36V4E9+Ap06QZcuBL/7XQJjxtila3V3fy2B8ePxhgyB0lICp59O4NxzMW+/nbT0Mq++inf44QTOOAPatsXr3p3gT3+K95WvZF137PbbMZ9+SvCBBwicc47tfDriCEJPPgnGEL3xxpznF2xnUmBsjVvddOlC4Lzz7JrGrFlJ48p2PrJt19B5yoX57DMAvLIs7hCybRvRkSPxTjmF0K9/nbldhw529XjjxkbX10TmAlcDo4ARTTVS38MaOOGE9K+fdx6hhQtTXvcGDoRIJOPuDO/445Of9+4NgNmwIfHaiBGY118n+t3vYt5888tVwfA//2mDlIX43LkQCNgg1ZxeeTneEUdglizBrF+f8rlM8wtg/vlPzEcf2Y6Smp+pXhWu1Suc7Xxk266h85ST6qtm1nfNqd27iZx/Pt7hhxP6/e8hGKy7fSgEexu9WdiUngY+wga2SfjfvViSYbV+xw5iv/wl8T/+0f5Atm9Petvs2ZN277S3f5/dl4qK7GON7dzQL39JfOhQ4jNnEjnnHAACw4YRmDCBwIUX1l9zZSXs2AFAVffuGZuZjz5K3SebaX7Zv126cydVGXqezfLlmLfewtsf+GznI6t2jZmnXBQX28dIJHObaJTo5Zfj9exJ6LHH6g/q/s/QNu9uZrCO+nfpZM33JWsmkdGjid13H4Grr6bo/fcp2ruXon37CP7857aBMQ0fuecRuPxyQi+9RNGmTYSefdau5o0ZQ+yXv6z/823aQMeOEApRtGtX0oEfSQeBnHJK9jVFIsRmzyb817+mHVfw+98HIFZz6ZrtfGTTriHzlKZntj7VPcBm/x+GdKLf+x5UVhKaNStpV0zkiCPsmkFtFRX293DAATnX04w6AMdge4ebRH6GNRbDLF6MV15O8Hvfg65dEz+MJljVqSovx6xYYZ+EwwTOOMP+gD0Pk2X3f+DCCyEaxSxOvfNCbMoUIoccYv/aZyk+fz5e1654Q4emn964cbbdM898+R1kOx/Ztst1nry2bZOWkJGjjyb+u9/VOZ/eEUcAZFydjt1zD2b5ckLPPWf/gGShehOnWQ9UsY4A5gGZVz0SHsT2Btf9heQgP8MaDBL46lcxmzYRe/BB2zm0dy/xv/2N+LRpTTKJ6PXXY/75T6isxGzeTOwXvwBj8E49NbsS77kH7+CDiX7rW8RfftmuQm7bRvyxx4jddx/Bn/0spx30KR1LtXhHHmlXf3fsIP7iiznPRzbtcp0nb/BgzKpVmHXrMG+8gVmzBm/YsDrn0xs4EK9bt7TH+sZnzrRhfestqrp2TTmuPGUX3H7Vu5UCZ55Z57Qb4UDsLpn3sUcxHVVH22LswRHXANdjD1dsNg3edROaNq32Hbztbo8tWxJd8X//e/o2tce3fr0JTJhgvN69DeGw7b6/6ioT/PGPv/yMd+yxaccXnDTJ7lqo9Xrg3HNtDW++acd92GGGkhJD587GO/FEE/rNb0zR3r12Xp55Jm2d4b//PVHjhg0m+MMfGq9fP7t7pWtXEzjzTBNasCDr+Q1//HHS694JJ6TuvlixIuXzXvfuWc1HtvObyzx9Od733jPesGF2F07v3ib0y19m9TsJ3nyz3RW1Zk3yrpRzz037XWX8/qs/d9FFxuvZ0xTt3NnUu27KsPtM95G44XUcG8LaPGxn0kf720+o9f75dcxX7bZpZbwxVZHudSPNZccOIoMH4513Xt27ZLJg3nuPyJAhhJ54gsCll+b02f33ukl3Y6owMB64D+hE8hpoBLtqW31QczfsPXWvx56V8yrwQ+CfOc5KvfJzNVhat7IyQs8/T/z554llOB44G2bNGqJjxhD8yU9yDmodRgIrgEewPbm1MxIGjseG83+xp9g9jD0X9kzgdJohqKQpRKRFeMccQ3jxYszLL2c8wKU+8cceI/hf/0WwcafIVRsCLMKextanuswMbQdhz3stAn6E3aY9D/hLUxSSif/7WaVgeX37EnrhhQZ/PnjvvU1RRjvsPVpHA9UHSte3YzeM7Rlu0RONFVYpTFu2VPcin01iCZpLHnrSwmHVarAUpPhbb1XvhvoMexJ5zaNsqrC9vpkYbGdSi1JYpSAFzj23+iCK17CntrUHTsTuH/01dvtzU42PGGyIq0Pd4mHVarCItRt4a/9QUyfgaOw26sD9/x6IwiqSd74A/r5/qKlLmrbNSqvBIg2ztf4mTUthFXGEwiriCIVVxBEKq4gjFFYRRyisIo5QWEUcobCKOCLjEUxNeFcukbxUfdMxV2QMa3T/vVZERCShBHs2xzif65A8pm1WEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCmt+Ow9YCUT9LkT8l/GK/OKr/sBUoC9Q7nMtkie0ZM1PdwOvAccBO32uRfKElqz56Rpgr99FSH7RkjU/KaiSQmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmHNT+cDZv/QCwjWeD7Bx7rERzrcMD/NAzy/i5D8oiWriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYROw/LHIuBokr//YiACxGq8FgWGAitarjQRqekOEieTZxriwHK/ChQRqz82jHWFNQpM8qtAEUlYgl3lrWvJ2s+36kTkSzeSeekaA173rzQRqakHmZesceB6/0oTkdr+it02Tbdk1R3PRfLIBNJ3LL3iZ1EikqojUEVqYMf6WZSIpPdH7MEQ1UGtBMp8rUhE0hpDIqgR4Dl/yxGRTEqAPSQCe5G/5YhIXWZig7oLaOtzLZKnmuteN/8BHNhM426N1u9/fBsY6WchDnrG7wJaSnOddfMscHEzjVukpoI5c6z5zme9+GIwRkO2w+TJEIn4X4crw9NPN9tPN1/p5PN8MXkyhHQHTslMYc0X4bDfFUieU1hFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxRP6EtV078Lz0Q0kJDBoEDz4IsVj94/LbqlW27qFD/a6k+XzyCVxwAVRUpL63YAEMGFD3iQmTJhXkmTONkT9h3bUL3n3X/vvCCxOnQlVUwJ/+ZF//0Y/gxz/2r8ZsPf64fXzjDVjeCu8ttXQpHH88jBgBHTokXv/4YxvgW26BTZvqHse119p2kyc3b61Sr2e5+GKDMbkN775rAMOFF6a+99pr9r2SEkNVVe7jbqkhFjP06mUYPNjWe9NN/teUbigtNQwblvvnduww9O5tuO661Pe+8Q3DT39qiETsdxAM1j2upUsNnmd4+unc63j6afv9FpD8WbLW59BD7eOePbBjh7+11GXhQrv69+ij9vnMmRCN+ltTU3rgAdi4Ee64I/W93/3Ort5me17uoEH2IgU/+lHr+o6aiTthXbH/fsLdukHXrv7WUpfp02HcOLuaOHCgXR1csMDvqpqGMfDYYzBkCPTsmfp+2wZc623UKFi3DubPb3x9rVz+h3XXLvjHP+Db37YdTb/9beK9e+5JdEKdfHLi9T/9KfF6zWC/+GJyx9WKFXDppdClS+K1xx5LbvPvf8OYMdCxo213/vl22yydbdtg7lwYO9Y+Hz/ePk6fntq2stIunQ47zM5X584wciTMmZPciZZtO4DNm+EHP4CDDoKiIvuHbfRou41ZbcoUO1+7d8OiRYn5zGZpuGyZ/eMzaFD9bbN1zDH28eWXm26ckpPGbbOmGw491PCHP+S2/XXccYYuXVJfv/BCO85TTjG8+qph927D66/bbazNm5PbXHih3V7etcvwyiuGtm0NJ5yQvo6HHjKcdlri+ebNhnDYEAoZNm1KbjthgqGszLBwoWHPHsPGjXb7FmxNubbbsMHQt6+hvNwwf75h507D++/beSwutvPQ2G3WmTPtdO+7r/622WyzVm8Dg2H4cG2z+qTpOpgiEcPq1Yb//E/bGTF6dGoHU0PDumBB5lqq28ydm/z6xRfb16tDXXM49ljDjBnJr40aZdtPmZL8er9+hpNOSh3HgAHJIcy23dixdjqzZiW3++wzQ5s29rtobFgfeMBO4+GHmy6sxtj/10MOUVjrkf+rwaEQ9OsHd94Jl18Ozz8Pv/pV04z7xBPrb3PCCcnPD9x/OeQNG5Jff+89u3/1oloX1K9eFa7enVPtnHPgtdfgW9+C119PrNKuWAGnnpp7uxdfhEDArqbXdMABcOSR8M47dtuwMfbts49Nfb2oUAj27m3acbZC+R/Wmr76Vfv4l780zfhKS+tvU1brHlFFRfYxHk9+ffp02LnTjrPmNu8FF9j3P/gA3nwz0f7hh2HGDFi9Gs44w+6vPOcceOGF5PFm066y0vaQx+O23toHlSxZYtutWlX//NaluNg+RiKNG09t0WjDOqcKjFthNfvXevbsSX49EICqqtT227c3f01gf7yzZtkOG5PmGrc33GDb1Vy6eh5cdRX8+c+2zhdftG1Hj7ZHauXSrk0b2wEWCtV97eHTTkseb6569LCPTbnrrKLC1lY9bsnIrbD+4x/2sfaqaY8esH598msbN8Knn7ZMXXPn2l7nk05K//4119jH2bMTq3sdO8KHH9p/h8Nw1lmJ3uqauzGybTd6tF1CLVqUOv3774c+fZL3ZZaUJP+BO/TQxL7hTI46yj42dnW6pur/t+pxS0b5H9Zo1O4+ufNOeOop6NULJk5MbjNihN2G/PWv7a6ejz+GH/4QundvmRoffxyuvjrz+0cdZbePd+yw29zVvv1tu61bWQmff24PODAGTj89+fPZtPvpT6F/f1vHSy/ZaW3bBo88AnfdZXfZ1Nw9c+yxsHIlrF0Lixfb1ezhw+uez0GD7He6bFn23019qncrjRjRdOOUnOTeG1xamn6XjecZ2rc3DBpk+MlPUneBGGPYvt3u4ujRw+5aOflkw1tv2R7Q6vHcfLNh8eL006g5rnRtbrvNvlf79UGDkp8PGZJa25o1qZ8rL7eH2l13neHww+0hlJ07G4YONUybZojHE5/Ptp0xhq1bDRMnGg4+2O4y6tbNMGKE3eVUu64PP7S7S0pLDQcemF0PrzGGW2+1u6LWr099b+7czLvepk1LP75LLrE9x7keQlqAvcHNpWG7bjTk/7B9uw1XumODcx2qjw2ePTv3zxZgWPN/NVjyS1mZ3UZ/7jnbU91Qq1fb7exbboHLLmu6+loxhVVyN3gwvP223TZOdz5rNh55BO691w6SFd22TBrmoINg3ryGf/7++5uslEKhJauIIxRWEUcorCKOUFhFHKGwijhCYRVxhMIq4giFVcQRCquIIxRWEUcorCKOUFhFHKGwijhCYRVxRPOdIrduHTzzTLONXgrc4sV+V9DiGnA9yqw8C1zcTOMWqam5fsMiaZVgryc0zuc6JI9pm1XEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCmt/OA1YCUb8LEf813+0zpDH6A1OBvkC5z7VIntCSNT/dDbwGHAfs9LkWyRNasuana4C9fhch+UVL1vykoEoKhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhTU/nQ+Y/UMvIFjj+QQf6xIf6XDD/DQP8PwuQvKLlqwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEQqriCMUVhFHKKwijlBYRRyhsIo4QmEVcYTCKuIIhVXEEToNyx+LgKNJ/v6LgQgQq/FaFBgKrGi50kSkpjtInEyeaYgDy/0qUESs/tgw1hXWKDDJrwJFJGEJdpW3riVrP9+qE5Ev3UjmpWsMeN2/0kSkph5kXrLGgev9K01Eavsrdts03ZJVdzwXySMTSN+x9IqfRYlIqo5AFamBHetnUSKS3h+xB0NUB7USKPO1IhFJawyJoEaA5/wtR0QyKQH2kAjsRf6WIyJ1mYkN6i6grc+1SJ7SvW58YJ6hM1F6EKcjHm2/9wQf/7+FcFgP3vrXFIYBMQJsBzYRZJN3adLB/VKgdNZNMzEGj9kcgeFYPI7CMAjDkQTojqGoZttIDHp+D578Lpw9MGVUcWAbho/xeBfD+xjeI8pb3nj2tdT8iP8U1iZkZtEXGEmAM4lzKlCGIU6ACFCEyfx93/Ec3DEKQsE6JxHZ/xjGEMHjHeAVDAu4gjc8D9NEsyJ5SGFtJPMEvQgxFturOxCI4uFhqDt2tURiEM7pE1+qAorw2IzhGTxmeZezuEFjkrymsDaAMXjM4iw8rgfOw66qhn0uC6qDa8+D/TVhZnqXssvnmqSJKKw5MrM4E/g5cAz2GN6GLQ+blz0ZwGMXhv8mzFTvUnb4XZQ0jsKaJTObIcR4BBiEl7chTeURxbALj0msZJp3J3G/S5KGUVjrYR6nIyHuJ8C12IPs82F1tyHiwDLiTPCuYonfxUjuFNY6mCcZhsezQFfcDWmCXcp6eNzCN5ii3mO3KKwZmKeYhOGe/U/dWOXNXhz4C1Vc6o1nu9/FSHYU1lrMMwSJ8hsME2jd308EWI3hTO9K1vldjNSvNf8Yc2ZeJcRn/AH4Wq77SR0VwbCVECd7l/Gx38VI3XRF/v2MwWMD0zEFE1SAMB5difK/5ildRibfKazVZnE3hitofdun9QkBPTC8Yh6n2O9iJDOFFTBPcgYBbsUr0O/DI4zH4bThF36XIpkV/DarmUUn4EOgC4W3VK3NEGCk9w3m+12IpCrMJUlNHrcBnVBQAQxxfm0eaQX7lFuhgg6rmUE/DD+gNRzw0DQCwIG04zq/C5FUBR1Wgnzf7xLyUBC42dxZ4L+NPFSw/yHmEcIYxqOlajq9GcCpfhchyQo2rLTnDOxFtqU2QwTD5X6XIckKN6yG4XhU+V1GXvIIcliFowAAAuZJREFUA6f7XYYkK9ywwsm1L1wmSQ4yT9DF7yIkoXDDauivvcx18iiij99FSELhhtXT9mq9DF39LkESCjes6DjYLJT6XYAkFHJYK/wuIO8ZtvldgiQUclj1Q6yPYYvfJUhCIYd1KegeMhkZInTWCen5pHDDavg/0GU50zKAx7veeVT6XYokFG5Y4S/oUMNMIhj+5HcRkqxgw+pdyT8xvA+6HGcKjxAhZvhdhiQr2LACEOA3aFW4tigef9cF1PJPYYe1kunAJhTYmkLA7X4XIakKOqzeePbhcTO6vE21CDDPu5z/87sQSVXQYQXgG8zCsBDz5Y2KC5OHwaOSgE7Iz1cFH1bPw1DEuP23Ryzc1eE4HoarvW/wb79LkfQKPqwA3qVsJM5o7EEShdg7HAd+4V3Bs34XIplpW60G8xQXYXiGwvojFgP+h8u5SneVy2+F9KOsl3c5f8BjLPYHXAirxHHgOXYxXkHNf1qypmGeZAQeL2KPcAr5XU+Tq46lxxQu5ycKqhsU1gzMDI4iyPNAP1pXYKP7h+94V/B7n2uRHGg1OAPvm7zPLo4BnrAvtIozdGLASjwGK6ju0ZI1C2YWp2F4FI9+uHibDUMEjyiGyezmV951Bb5P2VEKa5bMI4Rpz/eB2zB0wBBy4NuL7L/X7Exi3OaNZb3fBUnD5f/PLc+YGZQS5DsYJuHRGY94Ht58Obr/8SmC3KWD8lsHhbWBzDMUEeXrwPUYTsaerRLC+PadVgFFwFo8/h/wuHc5m3yqRZqBwtoEzAz6EWA0MIYAx+/fERKBZr2IeAwPgyEEbAD+B8PzfMRi786C2EdccBTWJmaeohw4Zf/tOUZgOATb6x7HI7I/XLmsNsexq7UBqncheWwGXgX+RpS/e9/k/SadCclLCmszM49TTDGHYziSOIcRoDeG3nj0AdpjaIcNb1tsKPcBlRh2EWAjhjV4bARWAR8Q4X1vLFv9myMRERERERERERFx0v8HV5cCN2SOTmMAAAAASUVORK5CYII=", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "dfg, start_activities, end_activities = pm4py.discover_dfg(log)\n", - "pm4py.view_dfg(dfg, start_activities, end_activities)\n", - "\n", - "map = pm4py.discover_heuristics_net(log)\n", - "print(map)\n", - "pm4py.view_heuristics_net(map)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/rafaelapb/.local/lib/python3.8/site-packages/pm4py/algo/discovery/dfg/adapters/pandas/df_statistics.py:82: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n", - " df_reduced = df[{case_id_glue, activity_key, target_activity_key}]\n", - "/home/rafaelapb/.local/lib/python3.8/site-packages/pm4py/algo/discovery/dfg/adapters/pandas/df_statistics.py:82: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n", - " df_reduced = df[{case_id_glue, activity_key, target_activity_key}]\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAABdMAAACUCAYAAAB4DbBPAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3dd7wcVfnH8c9NAklIQgKp0g0loRNBpEsXpCMdAVGkiXREQAEpSlEEEQFRpIN0QVDpTYp0KRJ67yRAgJB6f398Z367d+7u3bn3zu6Znf2+X699QWZ3Z5/dO3t25jnnPAfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwmkLHYCZmZmZmZmZmZnVtCqwYOggcu4N4IHQQZiZmZmZmZmZmZlZOFcB7b51ebuqx5+uWQp9QgdgZmZmZmZmZmZmZpZ3TqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ1OppuZmZmZmZmZmZmZ1eBkupmZmZmZmZmZmZlZDU6mm5mZmZmZmZmZmZnV4GS6mZmZmZmZmZmZmVkNTqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ1OppuZmZmZmZmZmZmZ1eBkupmZmZmZmZmZmZlZDU6mm5mZmZmZmZmZmZnV4GS6mZmZmZmZmZmZmVkNTqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ1OppuZmZmZmZmZmZmZ1eBkupmZmZmZmZmZmZlZDU6mm5mZmZmZmZmZmZnV4GS6mZmZmZmZmZmZmVkNTqabmZmZmZmZmZmZmdXgZLqZmZmZmZmZmZmZWQ39QgdQZk5gMWAcMBYYCQwGBkW3ycDn0e1t4Pno9kaIYM2sqbm9MbM0hgFLAOOBhVH7MA9qLwA+o9RevApMRG3Fx40O1MxyZUF0jrEE8BVK5xfzUDq/+Az4AHgZeA54CZgeIlgzMzMzSy9kMn0osBawTnRbJoqnHXgLeI+OJ5tjKSW7FkAnowBTgAeAO6PbI8CsRr0JM2sKbm/MLI2vUmon1kbff4BpKFlenjwHGEUpub4I0D/a/iZwF6W24pU6x21m4fQDVqTUdqxGqcNtEjrPiM8vJgOjKSXXRwPzA23ATOBp1GbcAdwDfNqoN2FmZmZm+TQnsBVwPbownQU8AfwW2BZYHhiYcl8jgTWAvYBLgXdQYuzdaH8TsgzczJqO2xszS2M0cCDwOPpefw7cAhwJbIQ61/qm2E/f6LEbRc+9Ffgi2uejwAEo+W5mxfA14HTUId+OZrJdAuyJzhlGpNzPQHROsl20vyeB2ejc5TpgS3ROY2ZmBnAV+t3xrfrtqh5/umY5MhI4EfgIJbRuAXYh/UlmWksBR6Mp1u0ocbYz+SpnY2b15fbGzNJYCbgGmIHKspyHRpVmmbTqD6wL/Bn4JHqtq1ESzsyaTz/guyjh3Y5KO/0MlYLK0khgV+A2dC7zIXAC2Z/LmJlZ83Ey3cl0K7gxaITF58D76GRz/ga99qrAxejC9UVgD5zkMisytzdmlsZqwD/RifbDwI6kn6XSGwOj13o4eu1/oLbDzPKvHxpx/hL6rb+Ixn1/F0DnNO+jUjGnoRk1ZmZWbPHaPasCmwG7A4cBtxM+WZ33m5Pp1pT6AvujkV5voqnNcwWKZSzwRzRV8nF84WpWNG5vzCyN0cCFqHzC3cC3AsayEXBvFMtfcPkXszxbHY1Enwacg37rQ5gLlaR6E9Ve3490JajMzCy8AahzdAVgQ2AndA37C+AslPy9E3gKlRSdQecE8WdoDZ+HKtznm5Pp1uQmAI+hE84TCZfUShqH6pfORlO5h4QNx8wy4PbGzNLYEyWfXge2DhxLue8Ab6BFCvcIHIuZdTQ3KtE0G/gXsHjYcP7fIOBX6NznUZSYMTOzxhoIzIcWoN4MleY6ADgWOBe4EbgPeAatqTGbzgnfSdH990WPvwg4Azg82t9maA2OpdEo9ZjLvDiZbgXzI+BL1KM2LnAs1WyPFg18Hi8aaNbM3N6YWS1D0cn0TOAUlITKm8HAr1Fd5CtQAs/Mwvoa8AIaHbht4FiqGY9m2UwF9gkci5lZM4sT40uj5PW2lBLjZ6Ak962UEuOVRo1Pje57JnpsnBg/NtrXtpQS4/PRu5lFTqY7mW4FMRgtqDUTOAboEzacmr4C3IEavL0Cx2Jm3eP2xszSmIDWMHgHLQKad+ujzrcXgOUDx2LWyvZFnfW3ofVY8qwvKhEwC/gr+ewwNDNrtHkoJcbLR42fhJLc5aPGP6ZzIvZLSonx8lHjJ0X7KR81PpZsF69Pw8l0J9OtAEaixbTeA9YJHEt39AWOQ9Ntfgm0hQ3HzFJwe2NmaawLfIo6spppob6vAHcBn9BcbZxZEbQBJ6Pf6mNornrk66EFSh8CRgSOxcwsS+WjxtenYzmVM4Ar6VhOZRadE6vxqPFH6FhO5VhUCrC8nMp85P9azcl0J9MtsH69fP7CqIZgf2BNVMqgWcwCjkYjwP4MzI/qlc4IGZSZVeX2xszS2BK4HLgZ2BmNLmoW76BFqS4E/gnsgi4Szay++gJnA7uj3+fzw4bTbbcDq6DzpAfRAssvBY3IzKyzAcC8aOR4fPsKSmDPU2H7AnQe9f0lWgcnvr2N1o+YXGH7O6ijcWYd35OZtaDeJNPnR3X6PgbWRlOTm9HFaOGHK9GJ9C6oJ8vM8sPtjZmlsQ2qO34WcBAaYdpspqNOgN8Bl6HOuGuCRmRWbH1QB9aWwObAP8KG02MvA2uhjrjbgdWBt4JGZGZFN5DqCfFK28bQedR3XFLlHUqJ8JcrbJuM2rSP6/mGzMzS6GkyfShwE/AZmko9KbOIwrgJTe25GU2t/lHYcOpqVeDg0EFY5vK6OFYW3N40L7c3+fIAcFroIOpoHdRhdS6a/tvMZgP7odkrlwGbosWsiupg1F5YPp2G2o+iOhWdR22ORnY3s3iNiHvQe1mL5j9vMrPGiBPjXSXDy7eNpHM+qXzUeJwMf7nCtvjf76FBA2ZmTaUnyfQBKAk0DxrxUJQTtDuA7wGXAq+iE+siWhCN3Ls6dCCWiQXQtN6icnvT3Nze5EeR2wmAFYDrgeuAHweOJUuHoAvXq1FS7Mmw4dTNqugYfTB0INbJNqjuaFGT6YcDBwI70PyJ9NhHwEbAv4EbUD31aUEjMrMQ5qF6+ZTk9vnRAKZy09C1V/nI8HdQSZXkiPG3gTfR7Dozs8LrSTL9NLQwwyqowSySK9APyylocYo7w4ZTV0UeydxKtgP+GjqIOnJ7Uwxub8Ir8iI8Q1Gy+RHUSdWMpV2qmY0W2roF/Q1XQgurFtGDuK3IoyKXIlsPLQp+EMVrI99ACfUHgN+gmS5m1rzKR42nKakyis6LKMejxstHh79cYVt54rzIvwFmZj3W3WT6tsA+wE7Ac9mHkwunAauhxcsmoB8RM2s8tzdmlsYfgMHAdynmiKjpwPbA48B50f+bWe+MQmWhrkHrExTRs2gx1SvRKPXLw4ZjZpEQi3B+gErHmZlZBrqTTF8Y+BPwe4p/MrYH+jE6H9g4cCxmrcjtjZmlsSdKLm9IsTuj3kMj1P8F/AD4c9hwzJpaG3AJ8Dn6DS6yq4BzgLNRQv31sOGYFZIX4TQzazHdSaafgRrzQ+sUS558DOwC3ItqKF4RNhyzluP2xsxqGQ2chEoY3BE4lka4DTgdlYa6AY0yM7Pu2wmVeFmN4pZNKncQWpT0t8B3AsdilndehNPMzGpKm0zfCNgCWJ/WWcDmfuAv6MTzH8AnYcMxaxlub9zemKVxCvAZcHzoQBroWDQS/yQ0Qt3Mumdu1Hb8EXgocCyN8iWqmX4LsAlwU9hwzBrKi3CamVnm0iTT50T1SC8Hbq9vOLnzU2BL4CjgJ4FjMWsFbm/c3pilsRqa0bENSqi3iinAwWgGSyslA82yciwwB/qtbSW3opIvp6OkumsnWzPyIpxmZpYLaZLpu6Be2sPrHAvAEDQNcUVgGWA4GkHyBfoxewH1At+Fen3r7UPghOh2Kp5SbVZvjWxv8sbtjVl6R6PSSNeGDiSAK4ED0GewSeBYzJrJaGBvdI4xKXAsIfwEeB7YGbggbChmXoTTrJvGAEsC44AVAsdi1vJqJdP7ohPOC4E36hjHWsD+6KJwQIrHt6NFdM4DLqW+Ncb+CBwBHEjrjWIxa6RGtTd55vbGrLYJaMHRjUIHEtCJqFTDiihxYGa1HYRqpP8pdCCBvIoWXj0KuBjXaLZseRFOs97rB4xFSfPxlBLniwODyx7n2RJmgdVKpm+LvszfrtPrL4+mG67dzee1AWtEt5+jBFy9Rqd9geoY/xTVWHQtY7P6qHd70wzc3pjVdhTwCCpV0Kr+ATyGzn+2CxyLWTMYBuyDOqKmBo4lpJOAXdFCpFcGjsXyy4twmtVff3QONx4lz5cFFqH0XZqGBpslv1vtwOPA1xoSpZlVVCuZ/kPgb8CLGb9uH3Qx/HNUt7A3FgOuQSeEe6Mf46ydjaZTb4dGw5tZ9urV3jQbtzdm1Y1GCxTvEjqQwNqB36BSDSNxWSizWrZH1z3nhA4ksOeBG9E5l5PprWMg6UeMz4c6n5Li+uFehNMsG9OAvdA6QO0oR1auf4XntKPrxOVxMt0sqK6S6QugEeNbZfyaA4HL0EJ7WdoONSobA69kvO9PUJJvF5zcMquHerU3zcjtjVl1O6MZHH8LHUgOXIcWbN4BODNwLGZ5txuaxfpp6EBy4GK0GOkCNGYNKsuWF+E0K45DgAfonEivZDZwLlpf66p6BmVmtXWVTN8N/Xj+M8PX64+mJn8zw32WGwfcj3r3sk6oXwz8HZWheDnjfZu1unq0N83M7Y1ZZbsAf6W1yzTEpqKE+i44mW7WlcWAVYBjA8eRF39H51w7oZJyFk5/YDiVF9yslCRPswjnZOAZKo8Y9yKcZvnyEFoD51t0XbFhFnA1sF8jgjKz2rpKpm+Fpv9lOUXrL9QvkR4bA9yMEupZlny5BfgIjag/LcP9mll92ptm5vbGrLOxaBGmg0MHkiOXofZiIeD1wLGY5dXWKIF4e+hAcmI6GqW/NU6mZ82LcJpZdx1K12uGzQDuQ4PPZjckIjOrqVoyfRi6YD0xw9faC9gxw/11ZTxwFhpxkZWZwF3AOji5ZZalerQ3zc7tjVln66ASL/eHDiRH7kWJl3WACwPHYpZX66JEuhc3LLkN2B2Ym+6XvlmKUlK3yNIswlm+vSeLcCbLqngRTrPWMg9qiz8HBtB5dPoM4Glgc1RjPbZtQ6Izs6qqJdPXRr3k92T0OgsCp2a0r7R2RFPBs6yregdwMmrkPD3OLBtrk217UxRub8w6Wgf4Nx0vJlrdl6jWppPp3bc6cAOwJvBs4FisfuZAf2vPaOnodlSjdy1U9qWWNmBD4DDUObEqKk/QTOqxCGdXJVXewr9XZlbZQGB/4HA0iOrXwJGJx8wAXgU2AD5rZHBm1nOnAY9luL/z0KIljb79j3SLOaQ1LtrvNzLcZ6NtR/MvILM+eg/L9HI/86PRH2f3OqLe6c37KcLfM+v2pihasb05iVL7vVEd4unp/ovQVlxF8y9W9AZwROggcuhnwGuhg+il7h6fK9HxfO+gLh7bB50Pxo/9fbR9TWASsHR3gyXdd7EI7QbRc7fLLpyGWxW9h8VDB5JDT6AETlcGAj8EJqLPcXr0303qG1pNA1HCe2l0jO8KHIDq4p+BSgfehxLdb6NkVfI6cWp03yPAjcBF0XOPBfYENgPWiF5jPjqXYzEz664+aFT5KyhBfhIwNLrvFJRAb4/++y6wcIAYzSyFaiPTlwUez+g1FkT1nUIYjy4Arshof8+jRm9pmm80hnW2K/pB2wFdiH8ZNpyWlWV7UySt2N78FLgAJb7ytH+3FeENQwuvua3o7HFUM70n5Rqa1SMosXUBOsc8FPgDlUeBboPOB0GjlGdG/38vMG8dY3S7kQ/LAFOAF0MHkkNPUL2TZTSwD0pQz00pkTwH6iQamWEcXoTTzFrB+sBvgCXRWoLHovYo9itgb2AwKvuyNs0/WMKssKol08cBt2b0GrvR9crE9bYH2SXT29HJ+LiM9tcbQ1FHwTVoZJV13/fQSLht0QKYlweNprn1Q+siXAW8383nZtneFEme2htQYug/wHOhAwnge7ityMoE1Mn+T7q34HD8PZiYeUTNL/5MlkBJ5pDmBransecmd6PF7b9P5VHgR5Q9ppG+h9uNLG2BRul1t3N5HOqcbvZZfPUwkc7fi+WBH6HrtzYqX8PNAkZ0sd9GL8L5NsWv325mzWtVNAJ9TeBq1Mn/QoXHTUZriB2Nymq14jWXWVObC50kbZHR/p4kTImX+DYTja7IyhXA9Rnur6e+QmkK0E2oRvxcKZ7X07Ig3wIeRFMi30A/BHH5if0ofd77oYvZSdG/yzsyNkUX+l+iBXbOQRfesRGotv6L0WOeoPNxWF6mIb692o3XiK2Ojs2x0T5uqfK+F0V19z9EI5uuB1bpxv21Yqr1fmrJS5mX/pS+b7ehi7BKn3tS1u1N0eSlvQEdw+3AU2gU6IIpntOT43M8lcuwlLdBHwEXo3Ywqau2qtL+96bj92+HxP6K0lbkpczLzij2T4E/oVrfacqx7Yo+l771C61p9UWfzc6hA0FJseS5yaAUz+vp8XkBet9voe9DcpDIZui7dnoUV3x/+XnLHhW27Q38Dvgk2vfRZftM810sSrsB+Snzcj6K5XXgeLQIZho3ApfWK6gmtzU6BxuERkz+A5hNqZRLtds0tBD0ucC1aM2bZygtnpl8/Cfo3P4BVJ/9AlRe5nDUCbY5+s6Mo76zRczMGmkpVHKqHQ0cWzHFcwaitSzMiqINzaDdAHXW/xydn56Lzs8ujf7/pOi+H6FzkoVowvJqcaJhuQz2NZywifT4luVFwC9Rkje0OJkeJzBnowupy9GFVbXZAD1Jbm2KTo6PR3/T+dBBX74QxuBov6+gUViD0IVpnEzfIorxODQKZXlUauF2Sl+S06Pb8Gh/O0fvKVnPtFr9zzSvETsPLaIEuiCYReXk4BPRexiFygycnnjfte5PE1MRaqbHyfR29FnOQhdj16KLtQFVnpdle1NEeWlvQHXt29HxPCP67/0o6TS8ynOySqbHbdCJqNNtPBol/wIwpMLjumqrkvvvjxYh3LdKPEVpK/KUTJ+N3kecsPkArZ3w9S6e93M8QqcrzwNHhQ6CUjK92rlJsjRDrDfJ9G1QKYp2NBq83APo4jWZTIfSecseFbY9iRJ8Q9ACYe10HMFb67tYlHYD8pVMjxO1cdvxLPATdMFVzX+BE+oeXXNaDX2Ob9Lxc611m4E6tW9H3+0zgWPQef8OqJN0OfQbXO07b2ZWVAui5OBMNAhp07DhmDXU3OiY/w3wMCpZFJ8/fIjOUx9BHUzXR7dbo23PofOL+PGfo2v+X6O1Wsqv+3NpZRT4whnsa0PCJ9LbUS9HVg5H0wxDK0+ml9/iE+EpaOTmZnQcydeT5NZz6GKk3GB0oJf/ux1dQFYyEf2YlNs0es66Xbz2DWiUVblqF4ZpX2MuNI1q/ujf+0aPSSYiBtD5IrIfGnmT5v60MRUtmZ684JqNGsL4eCzv6MmyvSmivLQ3UEqml99moxPFWcAdaPRw+Y9cVsn05+j8PVohetzhicfVaqvK9z8QjcTbg8qK1FbkKZleaeRi/Nv1FvrNHp943qnoZMoqewQ4OXQQdEymJ/++s+l4blKe2O5tMn0gKv0wkdJMhw3QKFjofjL9z2Xb+qLfsJ+Vbevqu1ikdoMKMYRyPpUXkYwXa3sSdaokZ6O+Sqljw0qGABfSsfOr0udb7XZD40M2M8u1edE57FT027Mn6WZfmjW74WhE+X2U8j//Reff30ed912Vh0sagWasfR8tDP4UpQF996I1XYLPZKv05Y4TIVMy2P9iGewjC1nGMYV894jEicrB6OLnBnSBeQZakb67FkDTLu9JbP+MyqNRk4mseB9LAHcltsd1L9fr4vUnRc+tpTuv8R2UGHwr+vdf0Rfze4nnfol6036FRtsPpGPZoFr39+Z9F0U/NDpuLjRa6QY0CvVcdDzGU9GzaG+KKO/tTRtKNPVBUxL/ghLXN6HvRLV1ObojboPuTmx/ApUKWT/xuLRt1aAozk9QuZFK3FY0TvzbNR9wMBq18DxanGks+h64nagu723FHKi9KD83eZuen5skTUWjVpaglPg9Co3Y7onyBPUsNJJmVMrnut1orPh3Zlk0CuptNCNhT3SO4bajsinAIdH/74w6ff5GaeZD3AFWTaUya2ZmrWguNLjnJeAH6Nx1HPBHum5HzZpZG/BtVIngbTSo52VgJ3SuuhxwIBoMcT86l07rQ+Df0XMPQOd4Y9D5yqtokNXbaI2mjQlUDqZSoiO+GPuswn3dNU8G+8hClnFMQYt/XpnhPnuiWtmMcvHUypGoFMP+lBaHXAIlKmqJe5DSLiQ2tYt97BfdkuLpuUuhqbiroYvW+EuRpsxF2tcA2B2NjIt9hBbD2wwtDHJv2X3fQqPRTgcuQfXAj6N0sdrV/d2JqbdCH49pet3j9mYo+hvsSem4WhgvpFvJFDS1P/TfF6qXconFM2D6oFlJG6O6qqAp33fTsxPKrtqgj8ru725bdSYaybgNqqleaVG7orUV4wl/LKWpfxcn1hdDCdGj0Wf/FjoOP6ryvFb2KerQCv337e65yT7o3ORz4DXSn5tUcja6mD0SHStT6flshuQ58AzSjy4rWrsBcBBqK0OqVSM97twFzXpbGbXz/VBSoz+l3ySTuJPhc+AylPjph0purYd+y1dBbfKXdPx+j2xcmGZmudQPjZw9Bl3f/h6V6Pw0ZFBmddYHnRMeiRLmdwI/REn1LHLI1byPrnOuRDnrrdGs+JvQNf2JUQwN68Cq97STNBdVjZBmYU6rLO5B6s00ingfp6CLneRtF3SifhuqMbY2pVFsF5KupynNa4CStmtTWsgqvm0W3f+9xH4no5E786N6qQPQyNdFU9yfNiYzq66rNmh42f3dbatOQDWRnwQuovPvhNsKs+byBRqZvCyq43x8gBjcblizm4lG9p+AOuiGoU6d36EZG3HptrwMmDKz7PVFv2crot+eTdAMqQ2AVVECrdU71DZDCy//HpWUWwz4KU6kW7FthdaruQyVV52AOt8vIl0ifS5gSWAlNLt8y+i2frRtPJqJWcsUlCdcL4rheTQT9Bm0nlAw66ETpSxq0PyE8PXS24F/ZfBeYvuiMhWhVauZXn6bFv33fUpTqXtaMz1Zk3M+NEolHq1aqfZouf+hmspJTwLbo1FD7cChifsvp/PI9HWpXP+z1muAeo4vqfCYQejvOiX6f9BUkuT7Hhu99vYp7k8bU7X3k0bea6ZXqmv6MaUyL3Et1+A1r3IqL+0NVK6ZXn6La6dPp1TmZSeyq5n+dOJx1Wqm12qrkvtfCo1g/X3ieUVrK/JeM738FtdPLy/zcg5a7M4quxP4Q+ggqF4zvda5SW9rpscGoyTzbYnHdbdmevJc5kU6thHVvotFazcg/zXT41v5Gh7lZV4+QrMzrbMR6LNbpxvPGY6+c2cRaFq1mWWqH5oVfhQqmfA0Om9Ok2P5CLW356PfzUUpvtXQDLPZaIRsK7xns0XR9f1sNPsyTRnmYSix/VvgFlSeZTa125XZ0WNvAU5Dg9+GpXi9ccCl0fNvBL6a4jmZy3JBwB8QPpHejnpOshLXwwqtkQuQboouTo5HJ9ELoynL55Y9plYy/dvoIuen6OR9BPpyPINGWvVHF9ZPouTWADS99GM6J9OXjF5rm2g/76CerFqv0YYuiJesEuOR0X53i/4dJwUOQhdkw1AtqKnogrbW/Wned1fvJ428J9O9AGnv5KW9gbALkMZt0ImoDRqHyhy8QKnufvnjumqrKu3/wOi9bBD9u4htRd6T6V6AtHceIdvF1nsq1AKk5Yajc5JyWSfTK30Xv07x2g3IfzLdC5D23FfRZ9ed48HMmt9c6HzsRvS73A68iZLDJwDfRSPQx6LSq3En8DyU1ihaDw36OQO4FY1KbUcl285GSeciWRp9Pu3o/X4tbDhmDdEHnb9ORQM81qrx+IWixz9CKUfwGPBnlNfYEs0gHYvakzmj2zzRtuXQ6PfDo+c8Hu1jJlpH6AhUyaIra6Pz4C/Q+XFDFwGOEw3LZbCvVQifSG9Hf9Cs/JJ0NbzrrTyZPhNdpH6JRnJvSseEZbmeJl83QsmrL1Gy4zeULtR2oPNnXqn3aEPUe/0l8C7qOVqg7P6vo+nLU4DXUQLsqrJ9jil77Fko0f5J9P+1XiN5gb9CIraTEvf/M9q+CeoV+zB6rXvRKC9S3p/mfXf1fmrJYzJ9FqURyteielbVSj5l2d4UUV7aGygl0+OVtGejxUT2pno99e4en8nvYfkIz/I2aFJ0X6UF0Lpqqw5N7P/30ePLt71LMduKPCXT41EJcQL9A5QA/HoXz/s5MLHu0TWvF9CostDKf2srnZvMWeV53T0+F6Dj97BaOzk48bh2lCjYL7HtLjqfy1xS4XVeLNt3+XfxGorZbkC+kulxR1zcdjyLZsF2VR/+SfQ3t87iGV5pRpiZWfObAPwFlSKZjhYd3ots2oA50UyzY4D/orYlPjdp5hnIC6GcxEw0qCP5G2xWVGPQTM8v0aCEavnFvugc+g50nvYBmi27Fdl894ejfNLZ6Hx4VhTX9nQcNFxuDpSQ/xKdR4/KII5UBqIAt8xoX/GIkZC3b2XwXmJXANdluL+eipPpM9CUix1JVxs+L8lXy0Ze/p5xMn0matx2o+OI4WqybG+KKC/tDaiHuR31Sh9K7V5hyM/xaflKprejC7k/ofICaUYM7IJOiKqdNLWyvqh0yk6hA6GUTC8/NxnU5TMkL8endZanZHo7GmxxPLUXJI3dgDoYrLPvoHOwvKxxZWb1sTqlEg1PoIW/613zfAU0UOJDNFDuVDoOjMu74agjfCoazLEtLm1lrWNdNJPxBarPwpgTVSJ5AeWArkElWaol3bMwJyodc230ms+jRYCrDdZZCc3yfxuNWG+I19BIjyzcQthE+qdke5L4OFDctpwAACAASURBVPmYSj0UrZrb3d4eJ7eKJS9/z37Aj+hZr1+W7U3R5KW9AZVwSZbeqCUvx6flJ1k5AZ1oVTvpqSYuCRWk/l3OLYY+mzyUapibnp2b5OX4tM7ykkzfAvhGD553KuoMts6OAF4OHYSZ1c1YtDhmO3AfsHGAGAajhbTfRmUXjibfHXiD0IjWj1EJ2sPp/jmrWTPbHQ2K+SvVB0duhs4fpgHnoWuRRlsMDcyahhLmm1R53FB0jTEd5TPq7hZUoyYLoeumV1oIqqfaUM/q9zPcZ6M5uVUsRfh7ZtneFInbG8tSsycrh6JjaaNaD2xBm6DPJs1soLxq9uOzyPKSTO+pPdDAGo8o7OwCtHD3zqgGcjN+RqFnP/uW71ur6o/K432BagevFzYcQAn0w9C1zfNkWzkgC3OghavfQTGeRMd1oMxawQFoBku1wXwLA9ej9vUy0s1Ur7eF0Gz+djRivVLpvzbgWPTejs3qhftV2f402Q2DvwL4FfWfSlTN7zLc1zjUu/p0hvs0a3VZtjdF4vbGrOQTtDjW1yjVmzaZgEpffBo6ELMceholRBZDU5GtZAI6z/gLSiR9AjyKFvmKb68Hiy6909G6AWaxVdHi8q1oEZR/WRY4BeVhpoUMKPIlmil0KUrU/RMtSL4XKqUSShtaoPuXKAl3AeqIeD9gTGYhnAocjMpA/b7C/VuhknsfoMFN/2pcaF16HdVsPwetC/QUaleuKHtMO0qiT0blp+aijpURtkA19EZktL/DCdMbfXNG8cf2RRer9awDVG8eKVosRfh7Zt3eFIXbG8tSEUb+XoxmslhHd6CLv2ZWhOOzqNpp7pHp/dBv6Z6hA8mZ4ejca1P0GS2Npj+fgcpBTEN/+8nRv09C07rrWfN4TjQLqTua/fi0+mjV88+t0Xf2UcKUXeiOrQgf6/qoDNgs4EpUFsesFR2NapDvWOG+/ujcoB24CK15l1dpYv0ueq8/q1cQQ6MX2Dqj/Q1A0wgbmUj/ku7X963lauDGjPfZaK16clFURfh7Zt3eFIXbG8tSEZKV3wc+RydKJgPQiK7dQgfSS0U4PouqCMnKfwCXhw4iZ7ZDNVGrlYcaBKyBpnxfhEpFzELHw9vo/ORYlGDPajDEqsC76EI3bcmZIhyflr1WPP+MBy/mPdlVbhHgIZRUX6OBr7sScBv6vG5Fi6Wataq9UPmTH1a4bx7Uof4JGv3dLOLOugfR4IGkvdD3f796BfAwcHaG+1sVJcwalUzPeth+P7Qa9UEZ77fRWvHkosiK8vfMur1pdm5vLGtFSFYugo6ndQPHkScbos8kDzULe6MIx2dRFSFZeRjwHtA3dCA5ch7dL40yN50T7PF1V3mCfX2UjO+uH6OE/ewotuVSPKcIx6dlr5XOP/ui8gYzaM51lgYC16H67pvV+bUWBs5F7cyDuMyo2ZYoR3tUhfvmR6XyXiP7QcqNsBQqAfMUei9Jx6D3vmk9XvwIlMzJcvXifWhMIv0Ksl9EZ1N0ctfs039a6eSiFRTl71mP9qaZub2xrBUlWfkoSgKZXIBGdTW7ohyfRVSEZOWi6Dc1bwvehTInOuc6LIN9fQUlwI5FyfT30DEzEyXbL0LJ9zXQTJquXIISgu3Rf2ehta+6Kv1ShOPTstcq5599Ud7jC1Q2s1n1Red2M6jP6NcRqFTVl8D/gG1pzgWXzbK0GBpxfk6F+xYGXkXJ9AUaGFPWFgSeRe9l4Qr3/wmNYP9qT3ZebQFS0MnP8cDGwN96svMKzgZGo16AerkVTXfO+gd0F+Be4OWM92tm9WlvmpnbG7PKLgZ+gZIzXwSOJbS5UHmsI0MHYpZzL6GRzruQnwWzQtoMTd3OovTNOyiJXl6Wbj5gxbLb0cC8KFH2AuoUfRRNHX8CJc0BVqN0bRr/dx9gJ7Qo2sW0RoLULK2zgM2BbwN3hQ2lV2ahdS2mABei5FYWbfVg4EfoPGkKWljxfNTZF9ICqL2z/LsfeDN0EHXQH3XEvUrnmfAj0ffvYzQbeFJDI8vWG8CaaH2pf6GO/Q/L7t8P+Brw1+i+6Vm++G3AtVnuMLIP9Sn5ciH1WaxvGLpo36MO+260VumpbxVF+nvWq71pNm5vrB6KMvJ3FErI7BQ6kBz4LjrpGxk6kAwU5fgsoqKM/N0LrbnQ3QUui+h6GruYcx9gSdSZ8TuUnJiKjq0pwN3R9tlUvr6bTfXSL0U5Pi1brXD+eRzFW3OqDSW7P6d3yeY5UHL+XZQIPJx81ZGPj0/f8n8r6u/LmWhUenLx37nQb/RLaOZZUYwCngf+gzrZyi2BFqr/bdYvuj1qpBfPeseogZxINgf5x9S3RtiR0WsU4QS8FU4uWkmR/p71bG+aidsbq4ciJSuvBh4JHURgbcBjwJWhA8lIkY7PoinKxeQwdOF4eOhAAhuHzrW2DRzHHMAEtODZH9GI9VrXe5VKvxTl+LRsFf38c3vUwdSMNdJrmQO4Gc16Gd3N57ahtu1FYBqqj57HAQdFPz6Loqi/L2ui9mPHCvddhTqhFm1oRI2xOPA+GoWetAs6v1g1yxfsixLef8pyp2UGoJPaD+hZEn0aKh0zX53iAy2g8z5wQh1fo5HceBdLkf6e9W5vmoHbG6uXIiUrJ+D6x5ui79aKoQPJSJGOz6Ip0sXkSaim91yhAwnoAuA5NFo8T36CZtqkuf6bgaZp70mxjk/LTpHPPxdDg25+FzqQOhqCrgnvIP3C0eujQQaz0ECDReoSWTaKfHwWSRF/X/qh8mqVyijth74/6zc0osZaBw0o2LvCfTcD/6XrUujd9n2UtF4oy50mDAJ+gKYcxgvPdHV7Ao3ebEQx/IOBz9DCFUXgxrtYivb3bER7k2dub6xeipas/AdaV6BV3Q/8PXQQGSra8VkkRbqYHIXKB+wfOpBAvooS1ruFDqSCq+l5CdBDA8Rr+VbU88/+KGH8SPT/RbYSWjD0ZzUe93XgdvT3vpXOpaDyqKjHZ9EU6fwndgj6Xi2R2D4h2n50wyNqvONQqbnlE9sXj7Zneo44J6qZc0WWO+3CQGAVVC/4cDRC8yhgX2ADtIBNo4wEPgJObuBr1psb72Ip2t+z0e1Nnri9sXoqWrJyVTQ6/TuhAwlgezRyZOXQgWSoaMdnkRTtYvI3aEbs8NCBBHA1qhlaj/WleutNqifLZ6FOgFll26ah88V2tPhpd8tBWLEV9fzz52idgSKWYKjkQPTdX6rCfePQCPR4PYW1GhhXbxX1+Cyaop3/DEe1wY9NbO+LOunuJH+z1uqhL3AP6pRMznw5Ac38mSfLF/wWOpg2znKnTeB84G2KUbs45sa7WIr493R7UxxFPD6bVRGTlRegVdqTC8kU2RCUdDovdCAZK+LxWRRFu5gcAryFaum2kg3R3/LboQOpYASKLTky/UO0WNhF6OJ/V2ANOi6KVrTj07JRxPPPhdHMmsNCB9JAfYCHUOKrLdo2EjgDVTN4lvDrP/REEY/PIira78vx6Hc1ed20P+qgHt/wiMJZCnXU7ZvYPggNuDgm6xe8FtXYG5D1jnNqddTT2YwNdFfceBdLUf+ebm+KoajHZzMqYrJyFDAJODV0IA10GjoRLkopqFgRj8+iKNrFJGjRrVloJmwrGIhGpOf1O7YUqv98ILA5sAzp69oX8fi03ivi+effgWfI58ySeloZtdffR1ULPkUDKfYkfT31vCni8VlERfp9mRtdMx2V2D4GjcQ+seERhXcyMBldT5Y7FlULGFJrB90prn4gKsh+Gp0z+EUzDLgY1WTN64mnWZG5vTGzWt5HI7T+iBbSuS1sOHW3IXAAWmPmw8CxmDWzy1Hd8EvQIr6fhA2n7k5HozkPCh1IFc/SunXszdJYHdgELQw4I3AsjfYfNBPxTFTP+BfAWai+s5mlsy/qfDorsf2naL22niTTh6JZIiE9hcr39cRxwC5oAfTytVd+h9ax25uMB2xtg3podspypznTBlwDvIt6aorGPaHFUuS/p9ub5lfk47PZFHnk7yXAe8B8oQOpo9HAO8BfQwdSJ0U+PptdkUZmlRuFyr0U/bjbDs182zp0IHVS1OPTeqdo5583o4XHW9VYVAZqz9CBZKRox2dRFeX3pQ/wGnBKYvtwtAZDTzuzx9CzRcOzvP2zh7HHDkGdCSMT238NvEodasifiUZwVFoIoggOQ431N0MHUiduvIul6H9PtzfNrejHZzMpcrJyblTC4C60iHHR9Ef1QieSYsphkyry8dnsinIxWcna6Dc4ryO2e2sZVBIh9Mixeiry8Wk9V6Tzz+VRh9hGoQMJ7CI0i6UICyQW6fgssqL8vqyH3kuyJvqJqD74oB7utwjJ9EFopvNxie1LRfvvMkfTnTIvsUOBFVDgq6OaVUWxE3ASSnDdHTiWevNFazEsEDqAOnN7Uwxub8JbBXgwdBB18imayXIPutjaCV14FkEfVAZqObTw3pSw4dTVKritsMa6C01x/jWa+XFF0GiytRA6d3qc1lqwsCvPAeNSPO5E4Gd1jqWnVkRT0FdAdeXfIvtrgfmB11EJtX0y3nd3rA/cCiwLPB0wjtAOAJ5E5exa2a9Qzfj1gVsCx2LWTHZB5ZKeK9s2J7AX8Fu0sHGr+hwN3twfOAEtSgrquHsMfXZV8zQ96dmbBmyKirLfTueC7c1qXeB8VHPntMCx1NMbwNWhg7DMvEmx/55ub5qb25v8eBB4IHQQdfRfYIvolqwH2MxOQ+9pG4qdTHiA4nb2NLurKVZHdtKv0cXkRRRn5OdwlEifDGxJ6eLQ4KuoxF4bpU6G8m15n6VwKUqgj0Yj576ow2vsinIEOwAD6rB/S28gKtF0Ph7J/D90nrBL6EDMmsgg4DtoYE65TYF5gAsbHlH+nI8+i+Q54EXAtqgdztz8qI7Mk8BX6vECDbQp6pW4CJ1ImVm+uL0xszS+g8o2nElzTwXuA/wevZetAsdiVnRtaO2Fz9Eif81sPnSu9ArFXkci1p1p+M8Bi5T9+9Do+eXbDkSj0/JoAIq33nWjJwJXRq+1Y51fqyvrRzEs04PnFqWMxs5owdHRoQPJiX1QfeNmL3lXlOOz6IpQ5mVjNFs3uTbb9fR+hkcRyrzE7qDz7Nj5otf4Vkav0cnCqJfwFWCJer1Ine2KRmxcQM/K3phZY7i9MbM0tgSmAtfSnKPq5kTlJr6k+U/izZpFX1TWYibwg8Cx9NSiwAtoevJCgWNplN4kOyol02P7UbpY3w84G5gU/TsuBzQCOBV4EbXXT6CZRNX2szcq0fIJGl1+dOKxiwJ/Az5EJb2uR+WvkvuplETYFHgkiuM94By0nkja9xJbHXXGjI3ur5Zs6SrWNPfXivmkCu/31SqxVFKUZOXfgRtCB5Ej86JZyzuFDqSXinJ8Fl0RkumnAk8ltg1F36PezvIoUjJ9d/RblOyo+x8qMVU3I4CHUOH29er5Qhnri0YezAaOxyNEzZqB2xszS2MdlLC4k86jMfJsPlT7fTKwVuBYzFpNG/BL9Fv9C/Tb3Sw2QAuJ3Y/KvLSKeiXTAQZH97+CpnoPQsnoOAF9enQbHj12Z3QxvnSV/TwJbI4u1ven8+JmT0T7HgUMi/b9WYX97JHY/xbomD0OTVVfHiUAbqd0vlnrvcTOo1T+5n5gFrBg8oNJEWut+9PE3Ooj0/uhNWH2Ch1IztyNyjI0syIcn62gCMn0R1AnbrnNUfs7opf7LlIyfRT6TL6d2H4Wyj3V1SD0gzmL5jj5nA8tOvQFzTv6xKxVub0xszSWA54H3kUX5Xm3IRqd9xw9Sx6YWTb2RLNb7iD/peXizvpZqJ72XGHDabhGJNPP68Y+b0AjrCvt589l2/qiskLxQqdxCZfy99IP/SYk95NMpk+k88jDTaPHrpt4blfvZS7UkTt/9O99o+cclXhcrVjTvJc0Mbd6Mn019B4WDx1IzhwDvBY6iF4qwvHZCpo9mT6MyuUif4s6PHurSMl00G/SqYltcfnQoRm+TlV7o5PPe9CiKHm0ExrV+hy60Daz5uT2xsxqGQJcjhJNv0YJhbwZgk5s42RYs9cCNSuCFVDC7z20EGMeLQ3chzrrfxg4llAakUz/cTf2eQHqhKm0nwMT21+j44jB/wAvUX3Bs0rJ9AWibWcmHjsy2n5i4rldvZdd0Mjw2HBUmvCFCo+tFWtX96eNuSjJ9G/Qs9/1oyj24s89tSb62y4aOpBe6O7xGX9nkrdZwJvo3DFPpb3mR7GdHTiO3rQh0PzJ9LXQe0iun/I4uu7oraIl088AHk1si797a2b4Ol1aHk0nmA6cjEaR5sGS6ORmFhoxkMcLajPrHrc3ZpbG94GP0EVHnk6Mt0e1cz9E9frMLD+GoDrqs4DbgPFhw/l/g9HoqenAw7R2Z30jkunJkeCxpdDaHO+i6eHxxf3jKffzIlpoOjYP8Bv0mzANuAklYrvazwp0nWi4OOV7AZ23Jn+HbqByIqFWrF3dnzbmoiTTr0UdXucBK3bjedfQeUE8g/5oUdZtQwfSCz09Pi+gY7mkYWjg1nRURiovjkDvbzJh1y5q9WT6nqhUVHl52TnR9yeL91W0ZPoO6LOZo2xbG1r3o6HVBfqiqWGTgbeBgwmX5FocTaubjpJuKweKw8zqw+2NmaUxEtXZnA38m8518RqlDdgE1aOdDfyJ3tctNLP6WQV4DP22/wlYLFAcg4FDgHfQApL7AH0CxZIXoZLpc6BzzodRJ0tccvACOk+fT5tML7cKGiU+jdII3K5Gpp9cZT+1YogtTMcOgeTtz1WeVy3Wru5PG3NRkum3o1hmRP/9L0py1Rpo8wxaZ8k6e5FSiaTQkqN+08gqmR67JtpfXkanTwSuRDHtGDCOoiTTe3KMgTo0H05sWwq9ryw64YuWTJ8Q7XNcYvtjwCkZvk5qo9C06iloUZyjqbyISdbagDXQlJeZ6Au9O/mvrWxmPef2xszS+AYaJTcbTefbmcbUGZ4req3Hote+EXe4mTWLvmiGywvot/5SYHUas6D4QqhO8AfoHOdU1Dlo4ZLp46L7Dk1sv5yeJdPH0LmG+NjoedvX2M//6FxaBjRStdZzY8cAl1TYPojScRcPVKkVa5r3kibmdSlGMv1hOiZ/ZqM25As08+VrFZ7TF5Wy/G6DYmw2N1GawRDaNcCraB2vtLOXsk6mXxvtL77uPZ3S8RZ/f7Yp2xYfV/uVbdsPlWWZFP37isT9e6OyVJ+gGSdHV4lxdfQ9jr/zt1R53KLA39DMzCnA9ajjLe39oHUWHkELP7+HZoPPHd13Ep0Tr69WiaWavCTTb0G/Fz+ne535f6dzu74Vmm2XxXVP0ZLpg1D7vHli++XoWAxmBOpZ/QD98eJpZKMzfI021MPyC1SjrR1dsO6Ak1pmrcTtjZmlMQFNoZ6OpkH+BdiAbKekDkQLi14QvcZ0NFpnhQxfw8wapy+aVv84+u1/ETgWWJZsE+tjUPL+TnQu8z465xie4WsUQahken/0N3kSjfQbgNr6j+l5Mr0dOAglg4ahkdtTUVKqq/18GyVnf4rOgUcAp6GRzQNqPBd03L6IShRWcmT03N1SxprmvaSJecloP9tE978DrFQlxqQ4Wdkeve4kNJPgGZR8uw91aF8JXIRq5Z6EvssHoJHjuwKbodGta6A1CsaiUaL9UsYB6jiolgiaTuXR6l+Ntn8juTMDVO/5wdBBROJEdjzz4BngMLoe0JVVMn0opTIvyc6FSqOyR9AxmQ6ltuEVVDpnEEqiX5G4/0mUZBwC7B9t+2aFGM9D7x80A3MWlT+LJ6LXGIXaiNMT763W/VugxOdxqKzU8ui7djul3+KijExPzm55DK3BUWvE+mPArxLbDiO7BXyLlkwHrVNxSGLbSeh3I7g50YF/NepBmo16rs9ASagJpC/PMBp9gfdBX7T30Af6Fhqd2sr1A83M7Y2ZpTMSXRjEo8emohPXn6EL/sVId+HcL3rst9HokTuifbUDD6GF31zOxaw4lkfTqN9G3/N30QimfdDCX6NS7mcQOifZAY38e5pSW3QVSmDMUfXZra2nyY6P6XhBfkHi/h3ofNE+LPGYrwP3oFGTrwPnor9X/PgxFfZzCZ0XE3wx2t8maATih2j0571odDZ0HCEa39Yoi2VD4AF0vvsumjmxQIr3kkyGJDt6k6M748RFV7Gmub9WzLGz0N/qk+j/04qTlduiJPUBwOHR+zkDjQi/Eo3cvA0lSp5FCcVJqCRNrSTOp+h64CXUufYAcCsaqXwJOh5OoTTSt6tbcrT6jtH2Zl5ks55+hmYC50GcTC//W8adJE+gYy85oKs3yfTksTMTlTCcO/HY7ibTz6vymvH95aWe+gKf07nUzlyo7Or80b/3jZ57VOJxA+jcdvdD36c094P+/skZMJtGz4vbmqIl05PH2Gx0fXEAlWervYjq15f7FUqyZ6GIyfQngBMS2/LU3vy/weiC89domnXc09KOFgh7DJ2g3IxOTG5FPZBP0/EE6JPoMYehRT1avXagmXXm9sbM0lgIjb67EI3ciL/701B5h0fQSe3fotvt0bYX6Xjx/Wq0j91oTLkpMwunLxoxexjwD3SuELcFk9G5xIPo3OIqdB5xD0rAvVn22OnoHOVUYGO8eHkaeUl2WL5kUealDxrxugBaE2lFNLBmI5Sk3x0lCw9HyZffoAT6ZcB16Pv+EOos6Gmi6Ec0ppRUs9kfdWLmQTKZXqmTZBbqbNkTjezOamR6f9QRex/qCCrvjOpuMv3HVV4zvv/AxPbXUOdvuV3QeXFsOPpde6HCfv+DOqK2RbM4u3N/3CF5ZmL7yGj7idG/i5pMT3amxMfYHWhGTXzu8C7qiC13JnB3RnEVMZl+L+pwLbc/mhnVSXemKGXtM3QyeXP07znQ1KnxqBd2BDoQhqARGy9Hz5mCDoznUQ/BWw2N2syakdsbM0vjdZQEvzD699zAEqg+7iKojRhG6UT1HdThNgUl0Cei9uLTRgVsZsHNQp1qj6BEOGhk3jjUfoxBbcdglJx7D3XAfYZK0r0MPBf9d0YjAzezqmajzrDJvdzPFykfNwNdn0xBg3y+SSlRax1NQedi24YOBLXp1bRRKv+5cnQ7k9LI4P5oIEZPTUOdsnujUdpHog6enpha4/5krfYZdB5Utjsdy818hJKdmwFrokRl7FtoxO/paCbHbahky0Mp7o9nee5H52QxZLsQ6yqE/w4O6eK+8vKyawFro06969B3JPl3HYK+P1bZFDrP8phC138DMzMzMzMzs6aRl5GDli95WYC0DSXlq41ajsuBvIFGQ66PEupbR9u9DlNlO6JOzNCjYtvpOIuxu7ff0r2FIC+g8gKkA6P93Vm2LV7Ad0LZtnhR0Eoj06stTpxmzQeAhal+rLfTsUxM0ipo9PU0Kpc2St4fj0w/uYt9QjYj0/Nwe7MXz70BddrELkeddFko4sj0a9FnVG5Hqgx0cIkCMzMzMzMzM7PsDKRjmZY4ATwb+DcqEbM4Kgd3ABp9OwPVo4b0azu1miFoBmBbDm6Ppoh3VnSbiUqBxfX/DyL9zIWuLB79t7ym+AfRf8eUbavnGl/fQyWOkp/PYLR2wnaUjucxdKx3/iDwQ7Te2Uop7n8Tzeb6eoU4ngS2j/5/du/eEkT7Cn2MpanXPQu93xloJv526DtyAx1nP3yO25WuDKbzyP0hVO7EcjLdzMzMzMzMzCxD5eseTEGLnu6EakmviUYmv1jheXEyx6UFKmuGUhXtlDpPHgYOQUnib6M1M7IQ10w/J3qtc8vuex54H5V9mReVHdsto9dNakP10k+scN/n6DgfDGxTtn0Z1JkwNypHshdaX+DhlPcfgsqa/BSVfRkBnIbKWP8tekxc53p8dP87KBlfFPExNhsdU7ujtmUTtD5LpfIkLlnStbmpnEzPe3tjZmZmZmZmlko7LvNineWlzMtotI7CN+neWnXLovjH1yOoAjgWeCZ0EJHkAqRx6Z6JaObBmArP6e7xGZc1Sd5moYT5zaisS9L66HP6ArgLLaJbXh5jhwr7HFb2/OT9l1SI5bPEv1dIxHBS4v64LMcmwC1o1PonqJ56+XuodT/Ahmhh1y/RGmeX0nERVtAsgI+jfZxF9+Tl96V8AdK4PNRsVD/+ANTOVPI/4OjEtuPoOOq/N4pY5uVp1L6UO5b8tDdmZmZmZmZmvZKXZIflS16S6T01EsW/XuhAcuo8lGDMg/Jk+nPAEWjB+q40+/HZKvLy+1KeTH8KOAyVhqrlQTRav9y+wKSM4ipiMv1jtKBvudOB+ys9uDs9pGZmZmZmZmZmVh8foITXOPKTNM6TcWQ3ura3XgV+heqFPx02FCuoicB9aGHM57rxvJfpvKDrRGAe1GH3QadntLYxwFA6f8aLAS9VeoKT6WZmZmZmZmZm+fA8sEToIHJqHHBN6CAiB4cOwApv3x4+byKwY4VtoLbFyfSO4vb2+cT2ccCFlZ7gBUjNzMzMzMzMzPLhOWDp0EHk0AhgFN0boWvWiiYCY4E5yra9hRbTXCZIRPm2NPAppYVrAeZEZZsmVnqCk+lmZmZmZmZmZvlwP7AaSuZYydpo4c2HAsdhlncTUSJ98bJt7WjR1rWCRJRv3wT+Tcf1DJZA1VySo9UBJ9PNzMzMzMzMzPLiDmAuYOXQgeTMusCjaKFAM6vuKTTSOpk4vxNYB2hreET51YY66u5MbP8mGsn/TKUnOZluZmZmZmZmZpYPLwGvo+SxlaxL54SXmXU2Ey1cuk5i+x3AV4DxDY8ov5YBRqPPptw6wF3os+zEyXQzMzMzMzMzs/y4GdgmdBA5sgxaDPCm0IGYNYk70Yjr8lHojwLv4bal3DbA28DjZdv6oJHpVTvvnEw3MzMzMzMzM8uPS4BlgRVCB5ITuwKvodG2ZlbbHWjB3gll22YBl6Pvk0u96DP4LnAZMLts+4powePkaPX/52S6mZmZV8PUYAAACLZJREFUmZmZmVl+/BstfLdL6EByoA+wI3AxHRcINLPqHkNtyE6J7RcDiwGrNDyi/FkdGIs+k3I7Ay8A/632RCfTzczMzMzMzMzy5WJgN2Bw6EAC2wKYj84JLzPr2uVo5HW/sm2PAU8C+waJKF/2ReVdypPm/YAdgItw552ZmZmZmZkVSDuwXeggLHe2ozgJkHmBT4FDQgcS2MPANaGDyEiRjs8iK8rvyyKofMlGie07o4U1F+/hfsegzyjk7Z89jD22KDADJc7LbYo+s7FdPblfV3eamZmZmZmZmVnDTQLOBQ4F/gBMDRtOEBsDKwH7hA7ErAm9CtwL7E3H5PMVwDGobdmrB/udDGzW2+B66f1ePv9ItA7D1YntewH3AC/3cv9mZmZmZmZmuRJ6VJxv+b4VxVeAL4DDQgcSQF/gEeCm0IFkyCPTm0M7xRiZDrA5Gmm9bGL7HsA0YFzDIwpvSWA6sHti+/Los9qk1g68equZmZmZmZk1m6IkOqw+rgwdQIaOAX4CLIVGUraKfYEzgK8BTwWOJSvbAX/Fubi8awe2pxjtSBvwKPAcHRcj7YtKKH0EbBAgrpBuB4YBKwOzyrZfCSwBTMCdXmZmZmZmZmZmTak/SoRdFTqQBhqFytycFDqQjHlkenMo0sh0UMfATJQoLvd1lEwu0nutZSf0nldJbF8y2r5NwyMyMzMzMzMzM7NMfQuVH9g+dCAN0AZch0bhDwocS9acTG8ORUum9wX+C9xc4b7zgHdRSamimw/VWj+nwn23AI8DfRoakZmZmZmZmZmZ1cWZwBSKX+P4QDSKdt3QgdSBk+nNoWjJdIA1UIfc1ontg4H/AXehpHtR9QFuA54H5k7ctx36bFZrdFBmZmZmZmZmZlYf/dGCnI8BAwLHUi/fQIsiHhk6kDpxMr05FDGZDnAh8DpKoJdbAZgK/KLhETXOiWgx5+US24cAbwJ/6s7O+mUUlJmZmZmZmZmZ1cc0VOblP8DlqLbvrC6f0VwWBf6GFgcsWq30pCImai3/DkPrL/wa2Lts+xPAAaj8yUvARY0Pra52B44A9kTlbsr9FnVO/rTRQZmZmZmZmZmZWf19A/gMjTJtCxxLVkYCE4GH0UjRoopHpvuW/1tROzw2QyVNvlvhvhNRiaWtGhpRfW0CzACOq3DfDuiz2LKhEZmZmZmZmZmZWUNthhJEp9H8CfXRaOG/54FRgWMxawVnoPUXxie2twF/Bj4HNmh0UHWwAXov59G5nVwc+BSN0jczMzMzMzMzs4LbAZV+uRCYI3AsPTUWeAEl0hcJG4pZy+iPZoE8BcyTuK8fcAmlslLNakf0Hi6i88Kq8wLPAg/QvG2nmZmZmZmZmZl104ZohOlNwNDAsXTXysA7KKnnEelmjbUgWoz0XmBg4r42NOtlFnBQg+PqrTbgUBT7qXQekT4X8G/gVWC+hkZmZmZmZmZmZmbBfR14G3gRWDFwLGm0ocUOpwE3A4PDhmPWshYH3gNuRCPSkw5FNdSvpjk664YB16ISWJU6AfpG939I5xI3ZmZmZmZmZmbWIkYDtwJfAgfSuaxBXowCrkPJriOBPmHDMWt5q6K64leh8i9Ja6POupeix+bV6sDLwJvAWhXu7486BT5DizibmZmZmZmZmVkL6wP8DJgOPILKqORFX2BfYBLwGpWTXWYWxjeBj4E7qTwCfRTwD1Q65TxgRONCq2kkWjR1Nip3NbLCYwYDtwCTgTUbF5qZmZmZmZmZmeXdksAdKPH1Z7TIZ0gbo+T+dOBkYFDYcMysguXRCPTHqF5LfHvgLVQm5UBUfzyUQcDBwEdoNPp2VR43P/BE9JhlGxOamZmZmZmZmZk1kzZgJ1SaYQZwEbBUA1+/D7AVSqK3oxGjjXx9M+u+rwLPoTrqG1Z5zBDgFFQu5X3gCBpbT30oKhH1fhTDyVFMlWwUPe4ZYOGGRGdmZmZmZmZmZk2rD7AtSia1o+T2AVQuhZCFpYBjUe3i2WhhwzyVmzGzrg0BLkXf3zOAOao8bgT6rk8CpqLv+rZdPL43+gLro07Bz4BPo9jGdPH4Y9HsnIvxIsdmZmZmZmZmZtYNfdBI04tRMmoacDdwDKohXGnhwTRGAN8BzkIjWtuBV4DjgcV7F7KZBbQn8AXwMLBSF48bCvwQuBcl4D9Ai5nuA4zvxeuPj/ZxFSorMxu1WXsAc3fxvJVRp+EXwA968fpdaqvXjs3MzMzMzMzMLFcGA5sDGwDroPIHM4FXgeej2wco6R7fhqEE1mBUg3gJlOwahUZ/PorqtN8M3IeS6mbW3JYC/oA63M5BCxxP7uLxY4EtgXXRIsNDgM8ptSuvoIVOP0HtCqhNGYramK+itmUJVBN9Ckqg3wFch9qoauYFfokS+3cDPwL+l/6tdo+T6WZmZmZmZmZmrWlRYEVKCfKxqAzM4LLbZJTY+gx4F5gY3Z4DHkTJMTMrnjbgu8CpqHzK6cDvqf2d74falWVQ2zIOddzNjRLncemVz1CC/VM6dug9hRZDnVnjdYYBP0blq6YDhwGX4Q49MzMzMzMzMzMzMwtgGHAc6lj7GDiB6jXLG2EMcCJK6k8CfkFjF0I1MzMzMzMzMzMzM6tqMBoF/jYq8XQrsCsqy1JvA4DNgCvRKPQP0EKjwxrw2mZmZmZmZmZmZmZm3TYA2B74OzADjVa/BtUqXyrD11kK2A+4Fo1CnwHcCGwXxRCEa6abmZmZmZmZmZmZWXeNRsntDdDCo0PR2gpPovrnz1Fa2HgKSryXL0A6DC1WOpLS2g3jgOVQOZdP0KKitwBXAe834D11ycl0MzMzMzMzMzMzM+uNvmjh0bXQqPIlUYJ83pTPn0RpceNnURL9MVRSJjecTDczMzMzMzMzMzOzehgBDEcj0eeJ/gsaoT4ZjVifBHwYJDozMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzOzJvJ/Na1SOXfSC8gAAAAASUVORK5CYII=", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# heuristics miner\n", - "net, im, fm = heuristics_miner.apply(log)\n", - "\n", - "# viz\n", - "gviz = pn_visualizer.apply(net, im, fm)\n", - "pn_visualizer.view(gviz)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.8.8 ('base')", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.8" - }, - "vscode": { - "interpreter": { - "hash": "994fd3bf715f7d00910c6929cedf6117267fec036ef9d2716f71f2b8e3dc9b3e" - } - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb b/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb deleted file mode 100644 index fb7e30c891..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "ename": "ImportError", - "evalue": "dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m/Users/rafaelapb/Projects/cactus-with-branches/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/python/process_conformance.ipynb Cell 1\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mos\u001b[39;00m\u001b[39m# uncomment if problems with dependencies\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m#%pip install pm4py\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[39m#%pip install pandas\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mdatetime\u001b[39;00m \u001b[39mas\u001b[39;00m \u001b[39mdt\u001b[39;00m\n\u001b[1;32m 6\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mtime\u001b[39;00m\n", - "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/__init__.py:20\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39msys\u001b[39;00m\n\u001b[1;32m 18\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mtime\u001b[39;00m\n\u001b[0;32m---> 20\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m \u001b[39mimport\u001b[39;00m util, objects, statistics, algo, visualization\n\u001b[1;32m 21\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39manalysis\u001b[39;00m \u001b[39mimport\u001b[39;00m check_soundness, solve_marking_equation, solve_extended_marking_equation, \\\n\u001b[1;32m 22\u001b[0m construct_synchronous_product_net, insert_artificial_start_end\n\u001b[1;32m 23\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mconformance\u001b[39;00m \u001b[39mimport\u001b[39;00m conformance_diagnostics_token_based_replay, conformance_diagnostics_alignments, \\\n\u001b[1;32m 24\u001b[0m fitness_token_based_replay, \\\n\u001b[1;32m 25\u001b[0m fitness_alignments, precision_token_based_replay, \\\n\u001b[1;32m 26\u001b[0m precision_alignments, conformance_alignments, conformance_tbr, evaluate_precision_alignments, \\\n\u001b[1;32m 27\u001b[0m evaluate_precision_tbr, evaluate_fitness_tbr, evaluate_fitness_alignments, conformance_diagnostics_footprints, \\\n\u001b[1;32m 28\u001b[0m fitness_footprints, precision_footprints, check_is_fitting\n", - "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/__init__.py:18\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[39m along with PM4Py. If not, see .\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[0;32m---> 18\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutil\u001b[39;00m \u001b[39mimport\u001b[39;00m variants_util, lp, constants, points_subset, business_hours, regex, xes_constants, vis_utils, \\\n\u001b[1;32m 19\u001b[0m dt_parsing, colors, exec_utils, pandas_utils, typing\n", - "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/lp/__init__.py:17\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[39m along with PM4Py. If not, see .\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[0;32m---> 17\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutil\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mlp\u001b[39;00m \u001b[39mimport\u001b[39;00m solver, util, variants\n", - "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/lp/solver.py:58\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 55\u001b[0m DEFAULT_LP_SOLVER_VARIANT \u001b[39m=\u001b[39m SCIPY\n\u001b[1;32m 57\u001b[0m \u001b[39mif\u001b[39;00m pkgutil\u001b[39m.\u001b[39mfind_loader(\u001b[39m\"\u001b[39m\u001b[39mcvxopt\u001b[39m\u001b[39m\"\u001b[39m):\n\u001b[0;32m---> 58\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mpm4py\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mutil\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mlp\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mvariants\u001b[39;00m \u001b[39mimport\u001b[39;00m cvxopt_solver, cvxopt_solver_custom_align, cvxopt_solver_custom_align_ilp, \\\n\u001b[1;32m 59\u001b[0m cvxopt_solver_custom_align_arm\n\u001b[1;32m 61\u001b[0m custom_solver \u001b[39m=\u001b[39m cvxopt_solver_custom_align\n\u001b[1;32m 62\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[1;32m 63\u001b[0m \u001b[39m# for ARM-based Linux, we need to use a different call to GLPK\u001b[39;00m\n", - "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pm4py/util/lp/variants/cvxopt_solver.py:19\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[39m This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[39m along with PM4Py. If not, see .\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[39m'''\u001b[39;00m\n\u001b[1;32m 17\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39msys\u001b[39;00m\n\u001b[0;32m---> 19\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mcvxopt\u001b[39;00m \u001b[39mimport\u001b[39;00m matrix, solvers\n\u001b[1;32m 22\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mapply\u001b[39m(c, Aub, bub, Aeq, beq, parameters\u001b[39m=\u001b[39m\u001b[39mNone\u001b[39;00m):\n\u001b[1;32m 23\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 24\u001b[0m \u001b[39m Gets the overall solution of the problem\u001b[39;00m\n\u001b[1;32m 25\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 44\u001b[0m \u001b[39m Solution of the LP problem by the given algorithm\u001b[39;00m\n\u001b[1;32m 45\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n", - "File \u001b[0;32m/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/__init__.py:50\u001b[0m, in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 33\u001b[0m __copyright__ \u001b[39m=\u001b[39m \u001b[39m\"\"\"\u001b[39m\u001b[39mCopyright (c) 2012-2022 M. Andersen and L. Vandenberghe.\u001b[39m\n\u001b[1;32m 34\u001b[0m \u001b[39mCopyright (c) 2010-2011 L. Vandenberghe.\u001b[39m\n\u001b[1;32m 35\u001b[0m \u001b[39mCopyright (c) 2004-2009 J. Dahl and L. Vandenberghe.\u001b[39m\u001b[39m\"\"\"\u001b[39m\n\u001b[1;32m 37\u001b[0m __license__ \u001b[39m=\u001b[39m \u001b[39m\"\"\"\u001b[39m\u001b[39mThis program is free software; you can redistribute it and/or modify\u001b[39m\n\u001b[1;32m 38\u001b[0m \u001b[39mit under the terms of the GNU General Public License as published by\u001b[39m\n\u001b[1;32m 39\u001b[0m \u001b[39mthe Free Software Foundation; either version 3 of the License, or\u001b[39m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 47\u001b[0m \u001b[39mYou should have received a copy of the GNU General Public License\u001b[39m\n\u001b[1;32m 48\u001b[0m \u001b[39malong with this program. If not, see .\u001b[39m\u001b[39m\"\"\"\u001b[39m\n\u001b[0;32m---> 50\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mcvxopt\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mbase\u001b[39;00m\n\u001b[1;32m 52\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcopyright\u001b[39m():\n\u001b[1;32m 53\u001b[0m \u001b[39mprint\u001b[39m(__copyright__)\n", - "\u001b[0;31mImportError\u001b[0m: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cvxopt/base.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))" - ] - } - ], - "source": [ - "import os# uncomment if problems with dependencies\n", - "#%pip install pm4py\n", - "#%pip install pandas\n", - "import pm4py\n", - "import datetime as dt\n", - "import time\n", - "import pandas\n", - "path = os.getcwd()\n", - "parent = os.path.dirname(path)\n", - "\n", - "# Change path if necessary \n", - "file_path = parent + \"/csv/use-case-besu-fabric-6-events.csv\"\n", - "file_path_other_model = parent + \"/csv/dummy-use-case-invalid.csv\"\n", - "\n", - "import sys\n", - "\n", - "if __name__ == '__main__':\n", - " print(sys.argv)\n", - " print(file_path)\n", - "\n", - "\n", - "\n", - "# import sys\n", - "\n", - "# accept command line arguments\n", - "# inputArg1 = sys.argv[1]\n", - "\n", - "#print('inputArg1: ',inputArg1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "\n", - "\n", - "def import_csv_original(file_path):\n", - " event_log = pandas.read_csv(file_path, sep=';')\n", - " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", - " return event_log\n", - "\n", - "def getStartActivities(event_log):\n", - " s = pm4py.get_start_activities(event_log)\n", - " print(\"Start activities: {}\\n\".format(s))\n", - " return s\n", - "def getEndActivities(event_log):\n", - " e = pm4py.get_end_activities(event_log)\n", - " print(\"End activities: {}\\n\".format(e))\n", - " return (e)\n", - "\n", - "def getAttributeFromLog(event_log, attr):\n", - " entries = pm4py.get_event_attribute_values(event_log,attr)\n", - " print(\"Entries: {}\\n\".format(entries))\n", - " return entries\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'alignment': [('createAsset', 'createAsset'), ('MintAsset', '>>'), ('lockAsset', 'lockAsset'), ('>>', 'MintAsset'), ('transferAsset', 'transferAsset'), ('>>', None), ('transferAsset', 'transferAsset'), ('BurnAsset', 'BurnAsset')], 'cost': 20001, 'visited_states': 10, 'queued_states': 26, 'traversed_arcs': 28, 'lp_solved': 8, 'fitness': 0.8181818181818181, 'bwc': 110000}]\n" - ] - } - ], - "source": [ - "\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "\n", - "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", - "\n", - "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", - "\n", - "print(aligned_traces)\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.10.2 64-bit", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.2" - }, - "vscode": { - "interpreter": { - "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" - } - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts deleted file mode 100644 index a77b09a829..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/api-surface.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import test, { Test } from "tape-promise/tape"; - -import * as apiSurface from "../../../main/typescript/public-api"; - -test("Library can be loaded", (t: Test) => { - t.ok(apiSurface, "apiSurface truthy OK"); - t.end(); -}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts deleted file mode 100644 index cebc20f6ce..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-baseline-events.test.ts +++ /dev/null @@ -1,207 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; -import { - CcTxVisualization, - IChannelOptions, -} from "../../../main/typescript/plugin-cc-tx-visualization"; -import { randomUUID } from "crypto"; -import * as amqp from "amqp-ts"; -import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; - -const testCase = "dummy-baseline-6-events"; -const logLevel: LogLevelDesc = "TRACE"; -const queueName = "cc-tx-log-entry-test"; - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "cctxviz-dummy-demo", -}); -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - //initialize rabbitmq - const setupInfraTime = new Date(); - const options = { - publishAllPorts: true, - port: 5672, - logLevel: logLevel, - imageName: "rabbitmq", - imageTag: "3.9-management", - emitContainerLogs: true, - envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), - }; - const channelOptions: IChannelOptions = { - queueId: queueName, - dltTechnology: null, - persistMessages: false, - }; - - const cctxvizOptions: IPluginCcTxVisualizationOptions = { - instanceId: randomUUID(), - logLevel: logLevel, - eventProvider: "amqp://localhost", - channelOptions: channelOptions, - }; - - const testServer = new RabbitMQTestServer(options); - const tearDown = async () => { - t.comment("shutdown starts"); - await testServer.stop(); - await cctxViz.shutdown(); - await cctxViz.closeConnection(); - log.debug("running process exit"); - process.exit(0); - }; - - test.onFinish(tearDown); - await testServer.start(true); - t.ok(testServer); - - // Simulates a Cactus Ledger Connector plugin - const connection = new amqp.Connection(); - const queue = connection.declareQueue(queueName, { durable: false }); - - // Initialize our plugin - const cctxViz = new CcTxVisualization(cctxvizOptions); - const setupInfraTimeEnd = new Date(); - log.debug( - `EVAL-testFile-SETUP-INFRA:${ - setupInfraTimeEnd.getTime() - setupInfraTime.getTime() - }`, - ); - t.ok(cctxViz); - t.comment("cctxviz plugin is ok"); - - t.assert(cctxViz.numberUnprocessedReceipts === 0); - t.assert(cctxViz.numberEventsLog === 0); - - const currentTime = new Date(); - const timeStartSendMessages = new Date(); - - // caseID 1; registar emissions; Fabric blockchain, test message; parameters: asset 1, 100 units - const testMessage1 = new amqp.Message({ - caseID: "1", - timestamp: currentTime, - blockchainID: "TEST", - invocationType: "send", - methodName: "initialize asset", - // Asset 1, 100 units - parameters: ["1,100"], - identity: "A", - }); - queue.send(testMessage1); - - const testMessage2 = new amqp.Message({ - caseID: "1", - timestamp: new Date(currentTime.getTime() + 2), - blockchainID: "TEST", - invocationType: "send", - methodName: "lock asset", - // Asset 1, 100 units - parameters: ["1,100"], - identity: "A", - }); - queue.send(testMessage2); - - const testMessage3 = new amqp.Message({ - caseID: "1", - timestamp: new Date(currentTime.getTime() + 3), - blockchainID: "TEST", - invocationType: "send", - methodName: "mint asset", - // Asset 1, 100 units - parameters: ["1,100"], - identity: "A", - }); - queue.send(testMessage3); - - const testMessage4 = new amqp.Message({ - caseID: "1", - timestamp: new Date(currentTime.getTime() + 4), - blockchainID: "TEST", - invocationType: "send", - methodName: "transfer asset", - // Asset 1, 100 units - parameters: ["A"], - identity: "A", - }); - queue.send(testMessage4); - - const testMessage5 = new amqp.Message({ - caseID: "1", - timestamp: new Date(currentTime.getTime() + 5), - blockchainID: "TEST", - invocationType: "send", - methodName: "transfer asset", - // Asset 1, 100 units - parameters: [""], - identity: "A", - }); - queue.send(testMessage5); - - const testMessage6 = new amqp.Message({ - caseID: "1", - timestamp: new Date(currentTime.getTime() + 6), - blockchainID: "TEST", - invocationType: "send", - methodName: "burn asset", - // Asset 1, 100 units - parameters: [""], - identity: "A", - }); - queue.send(testMessage6); - const endTimeSendMessages = new Date(); - t.comment( - `EVAL-testFile-SEND-MESSAGES:${ - endTimeSendMessages.getTime() - timeStartSendMessages.getTime() - }`, - ); - - const timeStartPollReceipts = new Date(); - await cctxViz.pollTxReceipts(); - await cctxViz.hasProcessedXMessages(6, 4); - - const endTimePollReceipts = new Date(); - const totalTimePoll = - endTimePollReceipts.getTime() - timeStartPollReceipts.getTime(); - t.comment(`EVAL-testFile-POLL:${totalTimePoll}`); - - t.assert(cctxViz.numberEventsLog === 0); - t.assert(cctxViz.numberUnprocessedReceipts === 6); - - await cctxViz.txReceiptToCrossChainEventLogEntry(); - - t.assert(cctxViz.numberEventsLog === 6); - t.assert(cctxViz.numberUnprocessedReceipts === 0); - - const logName = await cctxViz.persistCrossChainLogCsv( - "dummy-use-case-6-events", - ); - - const startTimeAggregate = new Date(); - await cctxViz.aggregateCcTx(); - const endTimeAggregate = new Date(); - t.comment( - `EVAL-testFile-AGGREGATE-CCTX:${ - endTimeAggregate.getTime() - startTimeAggregate.getTime() - }`, - ); - - const map = - "{'registerEmission': (node:registerEmission connections:{registerEmission:[0.6666666666666666], getEmissions:[0.6666666666666666]}), 'getEmissions': (node:getEmissions connections:{mintEmissionToken:[0.6666666666666666]}), 'mintEmissionToken': (node:mintEmissionToken connections:{})}"; - // Persist heuristic map that is generated from the script that takes this input - await cctxViz.saveModel(CrossChainModelType.HeuristicMiner, map); - const savedModel = await cctxViz.getModel(CrossChainModelType.HeuristicMiner); - t.assert(map === savedModel); - - console.log(logName); - t.ok(logName); - t.end(); -}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts deleted file mode 100644 index 02fb72e647..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-generate-use-case-dummy-invalid.test.ts +++ /dev/null @@ -1,200 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; -import { - CcTxVisualization, - IChannelOptions, -} from "../../../main/typescript/plugin-cc-tx-visualization"; -import { randomUUID } from "crypto"; -import * as amqp from "amqp-ts"; - -const testCase = "dummy-baseline-invalid"; -const logLevel: LogLevelDesc = "TRACE"; -const queueName = "cc-tx-log-entry-test"; - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "cctxviz-dummy-demo", -}); -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - //initialize rabbitmq - const setupInfraTime = new Date(); - const options = { - publishAllPorts: true, - port: 5672, - logLevel: logLevel, - imageName: "rabbitmq", - imageTag: "3.9-management", - emitContainerLogs: true, - envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), - }; - const channelOptions: IChannelOptions = { - queueId: queueName, - dltTechnology: null, - persistMessages: false, - }; - - const cctxvizOptions: IPluginCcTxVisualizationOptions = { - instanceId: randomUUID(), - logLevel: logLevel, - eventProvider: "amqp://localhost", - channelOptions: channelOptions, - }; - - const testServer = new RabbitMQTestServer(options); - const tearDown = async () => { - t.comment("shutdown starts"); - await testServer.stop(); - await cctxViz.shutdown(); - await cctxViz.closeConnection(); - log.debug("running process exit"); - process.exit(0); - }; - - test.onFinish(tearDown); - await testServer.start(true); - t.ok(testServer); - - // Simulates a Cactus Ledger Connector plugin - const connection = new amqp.Connection(); - const queue = connection.declareQueue(queueName, { durable: false }); - - // Initialize our plugin - const cctxViz = new CcTxVisualization(cctxvizOptions); - const setupInfraTimeEnd = new Date(); - log.debug( - `EVAL-testFile-SETUP-INFRA:${ - setupInfraTimeEnd.getTime() - setupInfraTime.getTime() - }`, - ); - t.ok(cctxViz); - t.comment("cctxviz plugin is ok"); - - t.assert(cctxViz.numberUnprocessedReceipts === 0); - t.assert(cctxViz.numberEventsLog === 0); - - const currentTime = new Date(); - let caseNumber = 1; - const caseID = "INVALID_FABRIC_BESU"; - - t.comment(`Sending ${caseNumber * 6} messages across ${caseNumber} cases`); - while (caseNumber > 0) { - // caseID 1; registar emissions; Fabric blockchain, test message; parameters: asset 1, 100 units - const testMessage1 = new amqp.Message({ - caseID: caseID + "_" + caseNumber, - timestamp: currentTime, - blockchainID: "TEST", - invocationType: "send", - methodName: "createAsset", - // Asset 1, 100 units - parameters: ["asset1,5"], - identity: "A", - }); - queue.send(testMessage1); - - // BAD ORDER MINT BEFORE LOCK - const testMessage3 = new amqp.Message({ - caseID: caseID + "_" + caseNumber, - timestamp: new Date(currentTime.getTime() + 2), - blockchainID: "TEST", - invocationType: "send", - methodName: "mintAsset", - // Asset 1, 100 units - parameters: ["asset1", "Green", "19", "owner1", "9999"], - identity: "A", - }); - queue.send(testMessage3); - - const testMessage2 = new amqp.Message({ - caseID: caseID + "_" + caseNumber, - timestamp: new Date(currentTime.getTime() + 3), - blockchainID: "TEST", - invocationType: "send", - methodName: "lockAsset", - // Asset 1, 100 units - parameters: ["asset1"], - identity: "A", - }); - queue.send(testMessage2); - - const testMessage4 = new amqp.Message({ - caseID: caseID + "_" + caseNumber, - timestamp: new Date(currentTime.getTime() + 4), - blockchainID: "TEST", - invocationType: "send", - methodName: "transferAsset", - // Asset 1, 100 units - parameters: ["asset1", "owner2"], - identity: "A", - }); - queue.send(testMessage4); - - const testMessage5 = new amqp.Message({ - caseID: caseID + "_" + caseNumber, - timestamp: new Date(currentTime.getTime() + 5), - blockchainID: "TEST", - invocationType: "send", - methodName: "transferAsset", - // Asset 1, 100 units - parameters: ["asset1", "owner1"], - identity: "A", - }); - queue.send(testMessage5); - - const testMessage6 = new amqp.Message({ - caseID: caseID + "_" + caseNumber, - timestamp: new Date(currentTime.getTime() + 6), - blockchainID: "TEST", - invocationType: "send", - methodName: "BurnAsset", - // Asset 1, 100 units - parameters: ["asset1"], - identity: "A", - }); - queue.send(testMessage6); - - caseNumber--; - } - - const timeStartPollReceipts = new Date(); - await cctxViz.pollTxReceipts(); - await cctxViz.hasProcessedXMessages(6, 4); - - const endTimePollReceipts = new Date(); - const totalTimePoll = - endTimePollReceipts.getTime() - timeStartPollReceipts.getTime(); - t.comment(`EVAL-testFile-POLL:${totalTimePoll}`); - - t.assert(cctxViz.numberEventsLog === 0); - t.assert(cctxViz.numberUnprocessedReceipts === 6); - - await cctxViz.txReceiptToCrossChainEventLogEntry(); - - t.assert(cctxViz.numberEventsLog === 6); - t.assert(cctxViz.numberUnprocessedReceipts === 0); - - const logName = await cctxViz.persistCrossChainLogCsv( - "dummy-use-case-invalid", - ); - - const startTimeAggregate = new Date(); - await cctxViz.aggregateCcTx(); - const endTimeAggregate = new Date(); - t.comment( - `EVAL-testFile-AGGREGATE-CCTX:${ - endTimeAggregate.getTime() - startTimeAggregate.getTime() - }`, - ); - - console.log(logName); - t.ok(logName); - t.end(); -}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts deleted file mode 100644 index d32af002cf..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/cctxviz-persist-cross-chain-log.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; -import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; -import { - CcTxVisualization, - IChannelOptions, -} from "../../../main/typescript/plugin-cc-tx-visualization"; -import { randomUUID } from "crypto"; -import * as amqp from "amqp-ts"; -//import { LedgerType } from "@hyperledger/cactus-core-api/src/main/typescript/public-api"; - -const testCase = "persist logs"; -const logLevel: LogLevelDesc = "TRACE"; -const queueName = "cc-tx-log-entry-test"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - //initialize rabbitmq - const options = { - publishAllPorts: true, - port: 5672, - logLevel: logLevel, - imageName: "rabbitmq", - imageTag: "3.9-management", - emitContainerLogs: true, - envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), - }; - const channelOptions: IChannelOptions = { - queueId: queueName, - dltTechnology: null, - persistMessages: false, - }; - - const cctxvizOptions: IPluginCcTxVisualizationOptions = { - instanceId: randomUUID(), - logLevel: logLevel, - eventProvider: "amqp://localhost", - channelOptions: channelOptions, - }; - - const testServer = new RabbitMQTestServer(options); - const tearDown = async () => { - // Connections to the RabbitMQ server need to be closed - - await testServer.stop(); - // todo problem connection closing is hanging here and l56 - await connection.close(); - - await cctxViz.closeConnection(); - - //await testServer.destroy(); - //await pruneDockerAllIfGithubAction({ logLevel }); - }; - - test.onFinish(tearDown); - - await testServer.start(true); - t.ok(testServer); - - // Simulates a Cactus Ledger Connector plugin - const connection = new amqp.Connection(); - const queue = connection.declareQueue(queueName, { durable: false }); - - // Initialize our plugin - const cctxViz = new CcTxVisualization(cctxvizOptions); - t.ok(cctxViz); - t.comment("cctxviz plugin is ok"); - await cctxViz.pollTxReceipts(); - t.assert(cctxViz.numberUnprocessedReceipts === 0); - t.assert(cctxViz.numberEventsLog === 0); - - // already activated by previous test - //await cctxViz.pollTxReceipts(); - - const testMessage = new amqp.Message({ - caseID: "caseID-TEST 1", - timestamp: new Date(), - blockchainID: "TEST", - invocationType: "call", - methodName: "methodName", - parameters: ["0", "2"], - identity: "person 1", - }); - queue.send(testMessage); - - const testMessage2 = new amqp.Message({ - caseID: "case1", - cost: 5, - revenue: 0, - carbonFootprint: 5, - timestamp: new Date(), - blockchainID: "TEST", - invocationType: "call", - methodName: "methodName", - parameters: ["0", "2"], - identity: "person 1", - }); - queue.send(testMessage2); - - await new Promise((resolve) => setTimeout(resolve, 1000)); - await cctxViz.txReceiptToCrossChainEventLogEntry(); - - t.assert(cctxViz.numberEventsLog === 2); - // because the second message did not have time to be send to processing before receipts were transformed into cross chain events - t.assert(cctxViz.numberUnprocessedReceipts === 0); - - await cctxViz.txReceiptToCrossChainEventLogEntry(); - - const logName = await cctxViz.persistCrossChainLogCsv(); - console.log(logName); - t.ok(logName); - t.end(); -}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts deleted file mode 100644 index 0c533f674e..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-cctxviz-usecase-fabric-besu-6-events.test.ts +++ /dev/null @@ -1,583 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { - IListenOptions, - LoggerProvider, - LogLevelDesc, - Servers, -} from "@hyperledger/cactus-common"; -import { - BesuTestLedger, - Containers, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; -import { IPluginCcTxVisualizationOptions } from "../../../main/typescript"; -import { - CcTxVisualization, - IChannelOptions, -} from "../../../main/typescript/plugin-cc-tx-visualization"; -import { randomUUID } from "crypto"; -import { IRabbitMQTestServerOptions } from "@hyperledger/cactus-test-tooling/dist/lib/main/typescript/rabbitmq-test-server/rabbit-mq-test-server"; -import { v4 as uuidv4 } from "uuid"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { DiscoveryOptions } from "fabric-network"; -import { Configuration } from "@hyperledger/cactus-core-api"; -import fs from "fs-extra"; -import LockAssetContractJson from "../../solidity/LockAsset.json"; -import { PluginImportType } from "@hyperledger/cactus-core-api"; - -import { - ChainCodeProgrammingLanguage, - DefaultEventHandlerStrategy, - FabricContractInvocationType, - FileBase64, - PluginLedgerConnectorFabric, - IPluginLedgerConnectorFabricOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import path from "path"; -import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { AddressInfo } from "net"; -import Web3 from "web3"; -import { - EthContractInvocationType, - PluginFactoryLedgerConnector, - PluginLedgerConnectorBesu, - ReceiptType, - Web3SigningCredentialType, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; - -const testCase = "Instantiate plugin with fabric, send 2 transactions"; -const logLevel: LogLevelDesc = "TRACE"; - -// By default that's the Fabric connector queue -const queueName = "cc-tx-viz-queue"; - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "cctxviz-fabtest", -}); -//const fixturesPath = -("../../../../../cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures"); -const alternativeFixturesPath = "../fixtures"; - -let cctxViz: CcTxVisualization; -let options: IRabbitMQTestServerOptions; -let channelOptions: IChannelOptions; -let testServer: RabbitMQTestServer; -let cctxvizOptions: IPluginCcTxVisualizationOptions; -let ledger: FabricTestLedgerV1; -let besuTestLedger: BesuTestLedger; -const expressAppBesu = express(); -expressAppBesu.use(bodyParser.json({ limit: "250mb" })); - -const expressApp = express(); -expressApp.use(bodyParser.json({ limit: "250mb" })); -const server = http.createServer(expressApp); - -test(testCase, async (t: Test) => { - const setupInfraTime = new Date(); - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - options = { - publishAllPorts: true, - port: 5672, - logLevel: logLevel, - imageName: "rabbitmq", - imageTag: "3.9-management", - emitContainerLogs: true, - envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), - }; - channelOptions = { - queueId: queueName, - dltTechnology: null, - persistMessages: false, - }; - - cctxvizOptions = { - instanceId: randomUUID(), - logLevel: logLevel, - eventProvider: "amqp://localhost", - channelOptions: channelOptions, - }; - testServer = new RabbitMQTestServer(options); - - await testServer.start(); - cctxViz = new CcTxVisualization(cctxvizOptions); - - ledger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - envVars: new Map([["FABRIC_VERSION", "2.2.0"]]), - logLevel, - }); - await ledger.start(); - - besuTestLedger = new BesuTestLedger(); - await besuTestLedger.start(); - const tearDown = async () => { - await cctxViz.closeConnection(); - await testServer.stop(); - await ledger.stop(); - await ledger.destroy(); - await besuTestLedger.stop(); - await besuTestLedger.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - log.debug("executing exit"); - process.exit(0); - }; - - test.onFinish(tearDown); - t.ok(testServer); - const channelId = "mychannel"; - const channelName = channelId; - - const connectionProfile = await ledger.getConnectionProfileOrg1(); - const enrollAdminOut = await ledger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await ledger.enrollUser(adminWallet); - const sshConfig = await ledger.getSshConfig(); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user2"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPlugin = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - // This is the directory structure of the Fabirc 2.x CLI container (fabric-tools image) - // const orgCfgDir = "/fabric-samples/test-network/organizations/"; - const orgCfgDir = - "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; - - // these below mirror how the fabric-samples sets up the configuration - const org1Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org1MSP", - - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt`, - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp`, - CORE_PEER_ADDRESS: "peer0.org1.example.com:7051", - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - // these below mirror how the fabric-samples sets up the configuration - const org2Env = { - CORE_LOGGING_LEVEL: "debug", - FABRIC_LOGGING_SPEC: "debug", - CORE_PEER_LOCALMSPID: "Org2MSP", - - FABRIC_CFG_PATH: "/etc/hyperledger/fabric", - CORE_PEER_TLS_ENABLED: "true", - ORDERER_CA: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - - CORE_PEER_ADDRESS: "peer0.org2.example.com:9051", - CORE_PEER_MSPCONFIGPATH: `${orgCfgDir}peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp`, - CORE_PEER_TLS_ROOTCERT_FILE: `${orgCfgDir}peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt`, - ORDERER_TLS_ROOTCERT_FILE: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - collectTransactionReceipts: true, - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: org1Env, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - const plugin = new PluginLedgerConnectorFabric(pluginOptions); - - const listenOptions: IListenOptions = { - hostname: "localhost", - port: 0, - server, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { port } = addressInfo; - - await plugin.getOrCreateWebServices(); - await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; - - const config = new Configuration({ basePath: apiUrl }); - - const apiClient = new FabricApi(config); - - // Setup: contract name - const contractName = "basic-asset-transfer-2"; - - // Setup: contract directory - const contractRelPath = "go/basic-asset-transfer/chaincode-typescript"; - const contractDir = path.join( - __dirname, - alternativeFixturesPath, - contractRelPath, - ); - const sourceFiles: FileBase64[] = []; - // Setup: push files - { - const filename = "./tslint.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - // Setup: Deploy smart contract - const res = await apiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - // constructorArgs: { Args: ["john", "99"] }, - sourceFiles, - ccName: contractName, - targetOrganizations: [org1Env, org2Env], - caFile: `${orgCfgDir}ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem`, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { success } = res.data; - t.assert(success); - t.assert(res.status === 200); - - const contractNameBesu = "LockAsset"; - - const rpcApiHttpHost = await besuTestLedger.getRpcApiHttpHost(); - const rpcApiWsHost = await besuTestLedger.getRpcApiWsHost(); - - /** - * Constant defining the standard 'dev' Besu genesis.json contents. - * - * @see https://github.com/hyperledger/besu/blob/1.5.1/config/src/main/resources/dev.json - */ - const firstHighNetWorthAccount = besuTestLedger.getGenesisAccountPubKey(); - const besuKeyPair = { - privateKey: besuTestLedger.getGenesisAccountPrivKey(), - }; - - const web3 = new Web3(rpcApiHttpHost); - const testEthAccount = web3.eth.accounts.create(uuidv4()); - - const keychainEntryKeyBesu = uuidv4(); - const keychainEntryValueBesu = testEthAccount.privateKey; - const keychainPluginBesu = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - // pre-provision keychain with mock backend holding the private key of the - // test account that we'll reference while sending requests with the - // signing credential pointing to this keychain entry. - backend: new Map([[keychainEntryKeyBesu, keychainEntryValueBesu]]), - logLevel, - }); - keychainPluginBesu.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - const factory = new PluginFactoryLedgerConnector({ - pluginImportType: PluginImportType.Local, - }); - const connector: PluginLedgerConnectorBesu = await factory.create({ - collectTransactionReceipts: true, - rpcApiHttpHost, - rpcApiWsHost, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPluginBesu] }), - }); - - const balance = await web3.eth.getBalance(testEthAccount.address); - t.ok(balance); - - const deployOut = await connector.deployContract({ - keychainId: keychainPluginBesu.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - t.ok(deployOut); - t.ok(deployOut.transactionReceipt); - - const setupInfraTimeEnd = new Date(); - log.debug( - `EVAL-testFile-SETUP-INFRA:${ - setupInfraTimeEnd.getTime() - setupInfraTime.getTime() - }`, - ); - - const timeStartSendMessages = new Date(); - - await connector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccount.address, - value: 10e9, - gas: 1000000, - }, - }); - const { success: createRes } = await connector.invokeContract({ - caseID: "FABRIC_BESU", - contractName: contractNameBesu, - keychainId: keychainPluginBesu.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: ["asset1", 5], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - t.ok(createRes); - t.assert(createRes === true); - log.warn("create ok"); - const { success: lockRes } = await connector.invokeContract({ - caseID: "FABRIC_BESU", - contractName: contractNameBesu, - keychainId: keychainPluginBesu.getKeychainId(), - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: ["asset1"], - signingCredential: { - ethAccount: testEthAccount.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialType.PrivateKeyHex, - }, - gas: 1000000, - }); - log.warn("checking lock res"); - t.ok(lockRes); - const assetId = "asset1"; - const assetOwner = "owner1"; - - const createResFabric = await apiClient.runTransactionV1({ - caseID: "FABRIC_BESU", - contractName, - channelName, - params: [assetId, "Green", "19", assetOwner, "9999"], - methodName: "MintAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - t.ok(createResFabric); - - // READS are not considered transactions, but are relevant to our use case - /* - const getRes = await apiClient.runTransactionV1({ - caseID: "FABRIC_BESU", - contractName, - channelName, - params: [assetId], - methodName: "ReadAsset", - invocationType: FabricContractInvocationType.Call, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - expect(getRes).toBeDefined(); - */ - - // Setup: transact - const transferAssetRes = await apiClient.runTransactionV1({ - caseID: "FABRIC_BESU", - contractName, - channelName, - params: [assetId, "owner2"], - methodName: "TransferAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - t.ok(transferAssetRes); - // Setup: transact - const transferAssetBackRes = await apiClient.runTransactionV1({ - caseID: "FABRIC_BESU", - contractName, - channelName, - params: [assetId, "owner1"], - methodName: "TransferAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - t.ok(transferAssetBackRes); - // Setup: transact - const burnAssetRes = await apiClient.runTransactionV1({ - caseID: "FABRIC_BESU", - contractName, - channelName, - params: [assetId], - methodName: "BurnAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId, - keychainRef: keychainEntryKey, - }, - }); - t.ok(burnAssetRes); - - // Initialize our plugin - t.ok(cctxViz); - log.info("cctxviz plugin is ok"); - const endTimeSendMessages = new Date(); - log.debug( - `EVAL-testFile-SEND-MESSAGES:${ - endTimeSendMessages.getTime() - timeStartSendMessages.getTime() - }`, - ); - const timeStartPollReceipts = new Date(); - await cctxViz.pollTxReceipts(); - await cctxViz.hasProcessedXMessages(6, 4); - - const endTimePollReceipts = new Date(); - const totalTimePoll = - endTimePollReceipts.getTime() - timeStartPollReceipts.getTime(); - log.debug(`EVAL-testFile-POLL:${totalTimePoll}`); - - // Number of messages on queue: 0 - t.assert(cctxViz.numberUnprocessedReceipts > 1); - t.assert(cctxViz.numberEventsLog === 0); - - await cctxViz.txReceiptToCrossChainEventLogEntry(); - - // Number of messages on queue: 0 - t.assert(cctxViz.numberUnprocessedReceipts === 0); - t.assert(cctxViz.numberEventsLog > 1); - - await cctxViz.persistCrossChainLogCsv("use-case-besu-fabric-6-events"); - - const startTimeAggregate = new Date(); - await cctxViz.aggregateCcTx(); - const endTimeAggregate = new Date(); - log.debug( - `EVAL-testFile-AGGREGATE-CCTX:${ - endTimeAggregate.getTime() - startTimeAggregate.getTime() - }`, - ); -}); diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts b/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts deleted file mode 100644 index ac4489260a..0000000000 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/typescript/integration/initialize-rabbitmq.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import test, { Test } from "tape-promise/tape"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; -import { RabbitMQTestServer } from "@hyperledger/cactus-test-tooling"; -import { pruneDockerAllIfGithubAction } from "@hyperledger/cactus-test-tooling"; - -const testCase = "Instantiate plugin"; -const logLevel: LogLevelDesc = "TRACE"; - -test("BEFORE " + testCase, async (t: Test) => { - const pruning = pruneDockerAllIfGithubAction({ logLevel }); - await t.doesNotReject(pruning, "Pruning didn't throw OK"); - t.end(); -}); - -test(testCase, async (t: Test) => { - const options = { - publishAllPorts: true, - port: 5672, - logLevel: logLevel, - imageName: "rabbitmq", - imageTag: "3.9-management", - emitContainerLogs: true, - envVars: new Map([["AnyNecessaryEnvVar", "Can be set here"]]), - }; - - const testServer = new RabbitMQTestServer(options); - const tearDown = async () => { - await testServer.stop(); - // Destruction occurs when the RabbitMQ stops and has no listening connections - //await testServer.destroy(); - await pruneDockerAllIfGithubAction({ logLevel }); - }; - - test.onFinish(tearDown); - await testServer.start(); - t.ok(testServer); - //await new Promise((resolve) => setTimeout(resolve, 3000)); - t.end(); -}); diff --git a/packages/cactus-plugin-cc-tx-visualization/.gitignore b/packages/cactus-plugin-ccmodel-hephaestus/.gitignore similarity index 82% rename from packages/cactus-plugin-cc-tx-visualization/.gitignore rename to packages/cactus-plugin-ccmodel-hephaestus/.gitignore index a3a215c6f3..e923932be3 100644 --- a/packages/cactus-plugin-cc-tx-visualization/.gitignore +++ b/packages/cactus-plugin-ccmodel-hephaestus/.gitignore @@ -1,4 +1,4 @@ cactus-openapi-spec-plugin-consortium-manual.json src/main/typescript/generated/openapi/typescript-axios/.npmignore src/test/csv -src/test/test-results/*.out +src/test/json diff --git a/packages/cactus-plugin-ccmodel-hephaestus/README.md b/packages/cactus-plugin-ccmodel-hephaestus/README.md new file mode 100644 index 0000000000..7ca59b9578 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/README.md @@ -0,0 +1,149 @@ +# `@hyperledger/cactus-plugin-ccmodel-hephaestus` + +The package provides `Hyperledger Cacti` a way to generate process models from arbitrary cross-chain use cases. The implementation follows the paper [Hephaestus](https://www.techrxiv.org/doi/full/10.36227/techrxiv.20718058.v3). + +With this plugin it will be possible to generate cross-chain models from local transactions in different ledgers (currently supports Besu, Ethereum, and Fabric), realizing arbitrary cross-chain use cases and allowing operators to monitor their applications. +Through monitoring, errors like outliers and malicious behavior can be identified, which can enable programmatically stopping attacks (circuit breaker), including bridge hacks. + +## Summary + +- [`@hyperledger/cactus-plugin-ccmodel-hephaestus`](#hyperledgercactus-plugin-ccmodel-hephaestus) + - [Summary](#summary) + - [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Architecture](#architecture) + - [RxJS Transaction Monitoring](#rxjs-transaction-monitoring) + - [Cross-Chain Model Pipeline](#cross-chain-model-pipeline) + - [PM4Py Overview](#pm4py-overview) + - [Running the tests](#running-the-tests) + - [Usage](#usage) + - [Contributing](#contributing) + - [License](#license) + + +## Getting Started + +Clone the git repository on your local machine. Follow these instructions that will get you a copy of the project up and running on your local machine for development and testing purposes. + +### Prerequisites + +In the root of the project to install the dependencies execute the command: +```sh +npm run configure +``` + +Know how to use the following plugins of the project: + + - [cactus-plugin-ledger-connector-besu](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-besu) + - [cactus-plugin-ledger-connector-ethereum](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-ethereum) + - [cactus-plugin-ledger-connector-fabric](https://github.com/hyperledger/cactus/tree/main/packages/cactus-plugin-ledger-connector-fabric) + + +## Architecture + +### RxJS Transaction Monitoring + +This plugin utilizes RxJS (Reactive Extensions for JavaScript) to monitor transactions issued in Hyperledger Besu, Hyperledger Ethereum, and Hyperledger Fabric connectors. + +RxJS provides a powerful framework for asynchronous or callback-based code, each connector maintains an RxJS `ReplaySubject`, named `txSubject`, which acts as a message bus for emitting transaction data. + +- When a transaction is issued in a connector, the `ReplaySubject` stores the value it observes in an internal buffer. This observation is achieved by passing the value to its `next` method. +- When a new subscriber subscribes to the `txSubject`, it synchronously emits all values in its buffer in a First-In-First-Out (FIFO) manner. This ensures that subscribers receive the most recent transactional data, regardless of when they subscribe. +- The transactional data emitted includes essential information such as the transaction ID, timestamp, and other parameters, which are necessary for creating transaction receipts within the plugin. + +### Cross-Chain Model Pipeline + +The plugin employs a structured pipeline to create a cross-chain model from monitored connector transactions: + +1. **Transaction Emission**: Connectors issue local transactions against their respective target blockchains. Each transaction's data is emitted by the `txSubject` to the subscribers within our plugin. + +2. **Receipt Polling**: Upon receiving of transactional data, the plugin processes it into transaction receipts. This step involves precessing transactional information received such as transaction IDs, timestamps, and other parameters. + +3. **Cross-Chain Event Logging**: Processed receipts information can then be used to create cross-chain events, forming a cross-chain event log. + +4. **Cross-Chain Model**: The plugin uses the cross chain event log to create the cross-chain model with the information received from the connectors, using the Process Mining for Python (PM4PY) library. This model can then be used to verify new and unmodeled transactional information received from the connectors. + +### PM4Py Overview + +[PM4Py](https://pm4py.fit.fraunhofer.de/) is an open-source library designed for process mining, that provides tools to analyze and visualize business processes. +With it we can generate process models from the event logs created from transactional data and compare event logs with process models to identify deviations. + +## Running the tests + - **basic-mock-test.test.ts**: Conducts the simulation of a transaction without instantiating the connectors, and tests that the plugin monitors, captures, and processes the transactional data and creates a cross-chain event. + - **monitor-4-besu-events.test.ts**: Tests the plugin's ability to monitor, capture, and process the transactional data from besu connectors, and exports transactional data, in both CSV and JSON formats, as cross-chain event logs. + - **monitor-4-ethereum-events.test.ts**: Tests the plugin's ability to monitor, capture, and process the transactional data from ethereum connectors, and exports transactional data, in both CSV and JSON formats, as cross-chain event logs. + - **monitor-4-fabric-events.test.ts**: Tests the plugin's ability to monitor, capture, and process the transactional data from fabric connectors, and exports transactional data, in both CSV and JSON formats, as cross-chain event logs. + - **monitor-besu-ethereum-fabric-events.test.ts**: Tests the plugin's ability to monitor transactional data from besu, ethereum, and fabric connectors at the same time. + - **cross-chain-model-serialization.test.ts**: Tests the plugin's ability to create the cross-chain model using the PM4PY (Process Mining for Python) library and save it serialized. + - **cross-chain-model-conformance-checking.test.ts**: Tests the plugin's ability to check the conformity of unmodeled transactions against the cross-chain model using the PM4PY (Process Mining for Python) library. + - **cross-chain-model-periodic-update.test.ts**: Tests the plugin's ability to periodically update the cross-chain model with received transactional data. + +## Usage +Let us consider three conectors: one connected to Hyperledger Besu and, another connected to Hyperledger Ethereum, and a third connected to Hyperledger Fabric. To monitor cross-chain transactions and create a cross-chain model we should follow the next steps. + +After instantiating the connectors, we instantiate the plugin as follows: +```typescript +let hephaestusOptions: IPluginCcModelHephaestusOptions; + +hephaestusOptions = { + instanceId: randomUUID(), + logLevel: logLevel, + besuTxObservable: besuConnector.getTxSubjectObservable(), + ethereumTxObservable: ethereumConnector.getTxSubjectObservable(), + fabricTxObservable: fabricConnector.getTxSubjectObservable(), +}; +hephaestus = new CcModelHephaestus(hephaestusOptions); +``` + +We set the desired caseID and start monitoring and processing the transactions into transaction receipts: + +```typescript +hephaestus.setCaseId("Desired_CaseID"); +hephaestus.monitorTransactions(); +``` + +We can create cross-chain events from processed transaction receipts and add them to the cross-chain event log: + +```typescript +hephaestus.txReceiptToCrossChainEventLogEntry(); +``` + +We can export the transactional data captured to CSV and JSON files: + +```typescript +hephaestus.persistCrossChainLogCsv("output-file-CSV"); +hephaestus.persistCrossChainLogJson("output-file-JSON"); +``` + +We can create the cross-chain model with events created from the transactional data captured: +```typescript +await hephaestus.createModel(); +``` + +We can periodically update the cross-chain model with events created from the transactional data captured: +```typescript +const timeInterval = 10000; +const fileName = "file-with-modeled-logs" +await hephaestus.periodicCCModelUpdate( + fileName, + timeInterval, + ); +await hephaestus.stopPeriodicCCModelUpdate(fileName); +``` + +After creating or updating a model with the desired event logs, we can perform a conformance check of the newly received transactional data against the model: +```typescript +const model = hephaestus.getModel(CrossChainModelType.PetriNet); +hephaestus.setIsModeling(false); +//receive more transactional data from connectors +await hephaestus.checkConformance(model); +``` + + +## Contributing +We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! + +Please review [CONTIRBUTING.md](https://github.com/hyperledger/cactus/blob/main/CONTRIBUTING.md "CONTIRBUTING.md") to get started. + +## License +This distribution is published under the Apache License Version 2.0 found in the [LICENSE ](https://github.com/hyperledger/cactus/blob/main/LICENSE "LICENSE ")file. \ No newline at end of file diff --git a/packages/cactus-plugin-cc-tx-visualization/package.json b/packages/cactus-plugin-ccmodel-hephaestus/package.json similarity index 71% rename from packages/cactus-plugin-cc-tx-visualization/package.json rename to packages/cactus-plugin-ccmodel-hephaestus/package.json index 7fe9df9cdc..e1881ea01c 100644 --- a/packages/cactus-plugin-cc-tx-visualization/package.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/package.json @@ -1,6 +1,6 @@ { - "name": "@hyperledger/cactus-plugin-cc-tx-visualization", - "version": "1.0.0", + "name": "@hyperledger/cactus-plugin-ccmodel-hephaestus", + "version": "2.0.0-rc.7", "description": "A web service plugin that provides management capabilities on cross-chain transactions visualization.", "keywords": [ "Hyperledger", @@ -37,16 +37,21 @@ }, { "name": "Rafael Belchior" + }, + { + "name": "Bruno Mateus" } ], "main": "dist/lib/main/typescript/index.js", "module": "dist/lib/main/typescript/index.js", - "browser": "dist/cactus-plugin-cc-tx-visualization.web.umd.js", + "browser": "dist/cactus-plugin-ccmodel-hephaestus.web.umd.js", "types": "dist/types/main/typescript/index.d.ts", "files": [ "dist/*" ], "scripts": { + "build": "npm run tsc", + "tsc": "tsc --project ./tsconfig.json", "watch": "npm-watch", "webpack": "npm-run-all webpack:dev webpack:prod", "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", @@ -61,24 +66,25 @@ "@hyperledger/cactus-core": "2.0.0-rc.7", "@hyperledger/cactus-core-api": "2.0.0-rc.7", "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0-rc.7", "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.7", - "amqp-ts": "1.8.0", - "axios": "1.7.7", - "body-parser": "1.19.0", - "csv-stringify": "6.0.5", - "express": "4.17.1", - "fabric-contract-api": "2.2.3", - "jose": "1.28.1", - "json-stable-stringify": "1.0.1", - "prom-client": "13.0.0", + "express": "4.21.0", + "run-time-error-cjs": "1.4.0", + "rxjs": "7.8.1", "typescript-optional": "2.0.1", - "uuid": "8.3.2" + "uuid": "10.0.0" }, "devDependencies": { - "@hyperledger/cactus-test-tooling": "1.0.0", - "@types/express": "4.17.8", - "@types/json-stable-stringify": "1.0.32", - "@types/uuid": "8.3.0" + "@hyperledger/cactus-plugin-keychain-memory": "2.0.0-rc.7", + "@hyperledger/cactus-test-geth-ledger": "2.0.0-rc.7", + "@hyperledger/cactus-test-tooling": "2.0.0-rc.7", + "@types/express": "5.0.0", + "@types/uuid": "10.0.0", + "body-parser": "1.19.0", + "fabric-network": "2.2.20", + "socket.io": "4.5.4", + "web3": "1.6.1", + "web3-core": "1.6.1" }, "engines": { "node": ">=10", @@ -87,6 +93,6 @@ "publishConfig": { "access": "public" }, - "browserMinified": "dist/cactus-plugin-cc-tx-visualization.web.umd.min.js", - "mainMinified": "dist/cactus-plugin-cc-tx-visualization.node.umd.min.js" + "browserMinified": "dist/cactus-plugin-ccmodel-hephaestus.web.umd.min.js", + "mainMinified": "dist/cactus-plugin-ccmodel-hephaestus.node.umd.min.js" } diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/index.ts similarity index 100% rename from packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.ts rename to packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/index.ts diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.web.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/index.web.ts similarity index 100% rename from packages/cactus-plugin-cc-tx-visualization/src/main/typescript/index.web.ts rename to packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/index.web.ts diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts similarity index 58% rename from packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts rename to packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts index 376c2c2292..13623fdcad 100644 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/carbon-footprint.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts @@ -1,27 +1,14 @@ import { LedgerType } from "@hyperledger/cactus-core-api"; -export function calculateGasPriceBesu(gasUsed: number): number { - if (!gasUsed) { - return 0; - } - return getGasPrice() * gasUsed; -} - -// The conversion rate gwei-dollar can be dynamic -export function gweiToDollar(gwei: number): number | string { - if (!gwei) { +export function calculateGasPriceEth( + gasUsed: number, + effectiveGasPrice: string | undefined, +): number { + if (!gasUsed || !effectiveGasPrice) { return 0; } - return (gwei * 0.00000255).toFixed(2); -} - -// This value can be retrieved dynamically; 1 gas = 30 gwei -export function getGasPrice(): number { - return 30; -} -// price per gwei -export function gasToDollar(gwei: number): number { - return gwei * 0.005899; + const gasPrice = parseFloat(effectiveGasPrice); + return gasUsed * gasPrice; } export function calculateCarbonFootPrintFabric( diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts similarity index 96% rename from packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts rename to packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts index c9ee7b19e6..be13220159 100644 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/cross-chain-event.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts @@ -1,7 +1,7 @@ export type CrossChainEvent = { caseID: string; receiptID: string; - timestamp: Date; + timestamp: string; blockchainID: string; invocationType: string; methodName: string; @@ -10,7 +10,6 @@ export type CrossChainEvent = { cost?: number | string; carbonFootprint?: number | string; latency?: number; - revenue?: number; }; export interface ICrossChainEventLog { @@ -67,7 +66,6 @@ export class CrossChainEventLog { "cost", "carbonFootprint", "latency", - "revenue", ]; } } diff --git a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts similarity index 87% rename from packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts rename to packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts index 5241771d0e..38f89e7bd0 100644 --- a/packages/cactus-plugin-cc-tx-visualization/src/main/typescript/models/crosschain-model.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts @@ -17,10 +17,19 @@ export class CrossChainModel { >(); this.lastAggregationDate = new Date(); } + get lastAggregation(): Date { return this.lastAggregationDate; } + get ccModelType(): CrossChainModelType | undefined { + return this.modelType; + } + + public setType(modelType: CrossChainModelType): void { + this.modelType = modelType; + } + public setLastAggregationDate(date: Date): void { this.lastAggregationDate = date; } @@ -56,19 +65,17 @@ export class CrossChainModel { } export enum CrossChainModelType { - HeuristicMiner, + PetriNet, ProcessTree, - DirectFollowGraph, } export type CrossChainTransactionSchema = { ccTxID: string; - // the receipt ids of each cross chain event + // the IDs of all cross chain events of the cross chain transaction processedCrossChainEvents: string[]; latency: number; carbonFootprint: number | undefined; cost: number | undefined; throughput: number; latestUpdate: Date; - revenue: number; }; diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/transaction-receipt.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/transaction-receipt.ts new file mode 100644 index 0000000000..96475d1169 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/transaction-receipt.ts @@ -0,0 +1,33 @@ +import { LedgerType } from "@hyperledger/cactus-core-api"; +import { FabricSigningCredential } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; + +export interface TransactionReceipt { + caseID: string; + blockchainID: LedgerType; + invocationType: string; + methodName: string; + parameters: string[]; + timestamp: Date; +} + +export interface FabricV2TxReceipt extends TransactionReceipt { + channelName: string; + transactionID: string; + contractName: string; + signingCredentials: FabricSigningCredential; + cost?: number; +} + +export interface BesuV2TxReceipt extends TransactionReceipt { + transactionID: string; + gasUsed: number; + from: string; + gasPrice?: number; +} + +export interface EthereumTxReceipt extends TransactionReceipt { + transactionID: string; + gasUsed: number | string; + from: string; + effectiveGasPrice?: string; +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/utils.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/utils.ts new file mode 100644 index 0000000000..df20eae7a1 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/utils.ts @@ -0,0 +1,7 @@ +export function toSeconds(date: number): number { + return Math.floor(date / 1000); +} + +export function millisecondsLatency(date: Date): number { + return new Date().getTime() - date.getTime(); +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts new file mode 100644 index 0000000000..71f1f57ffe --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts @@ -0,0 +1,973 @@ +import { Server } from "http"; +import { Server as SecureServer } from "https"; +import { Optional } from "typescript-optional"; +import { promisify } from "util"; +import { + IPluginWebService, + IWebServiceEndpoint, + ICactusPlugin, + ICactusPluginOptions, + LedgerType, +} from "@hyperledger/cactus-core-api"; + +import { RuntimeError } from "run-time-error-cjs"; + +import fs from "fs"; +import path from "path"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Express } from "express"; + +import { + Checks, + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { + calculateGasPriceEth, + CarbonFootPrintConstants, +} from "./models/carbon-footprint"; +import { + CrossChainEvent, + CrossChainEventLog, +} from "./models/cross-chain-event"; +import { + createModelPM4PY, + checkConformancePM4PY, + convertToProcessTreePM4PY, +} from "./pm4py-adapter/ccmodel-adapter"; + +export interface IWebAppOptions { + port: number; + hostname: string; +} +import { + CrossChainModel, + CrossChainModelType, + CrossChainTransactionSchema, +} from "./models/crosschain-model"; +import { + BesuV2TxReceipt, + EthereumTxReceipt, + FabricV2TxReceipt, +} from "./models/transaction-receipt"; +import { millisecondsLatency } from "./models/utils"; +import { RunTransactionV1Exchange as RunTransactionV1ExchangeBesu } from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { RunTransactionV1Exchange as RunTransactionV1ExchangeEth } from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { RunTxReqWithTxId } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; + +import { Observable } from "rxjs"; +import { filter, tap } from "rxjs/operators"; + +export interface IPluginCcModelHephaestusOptions extends ICactusPluginOptions { + connectorRegistry?: PluginRegistry; + logLevel?: LogLevelDesc; + webAppOptions?: IWebAppOptions; + instanceId: string; + ethTxObservable?: Observable; + besuTxObservable?: Observable; + fabricTxObservable?: Observable; +} + +export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { + private readonly log: Logger; + private readonly instanceId: string; + private endpoints: IWebServiceEndpoint[] | undefined; + private httpServer: Server | SecureServer | null = null; + private crossChainLog: CrossChainEventLog; + private uncheckedEventLog: CrossChainEventLog; + private nonConformanceCrossChainLog: CrossChainEventLog; + private crossChainModel: CrossChainModel; + public readonly className = "plugin-ccmodel-hephaestus"; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + private txReceipts: any[]; + private caseID: string; + private ethTxObservable?: Observable; + private besuTxObservable?: Observable; + private fabricTxObservable?: Observable; + private startMonitoring: number | null = null; + private periodicUpdate: boolean; + private isModeling: boolean; + + constructor(public readonly options: IPluginCcModelHephaestusOptions) { + const startTime = new Date(); + const fnTag = `PluginCcModelHephaestus#constructor()`; + if (!options) { + throw new Error(`${fnTag} options falsy.`); + } + Checks.truthy(options.instanceId, `${fnTag} options.instanceId`); + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ + label: label, + level: level, + }); + this.instanceId = this.options.instanceId; + this.crossChainLog = new CrossChainEventLog({ + name: "HEPHAESTUS_EVENT_LOGS", + }); + this.uncheckedEventLog = new CrossChainEventLog({ + name: "HEPHAESTUS_CONFORMANCE_LOGS", + }); + this.nonConformanceCrossChainLog = new CrossChainEventLog({ + name: "HEPHAESTUS_NON_CONFORMANCE_LOGS", + }); + //todo should allow different models to be instantiated + this.crossChainModel = new CrossChainModel(); + this.txReceipts = []; + + this.caseID = "UNDEFINED_CASE_ID"; + + this.ethTxObservable = options.ethTxObservable; + this.besuTxObservable = options.besuTxObservable; + this.fabricTxObservable = options.fabricTxObservable; + + this.periodicUpdate = false; + this.isModeling = true; + + const finalTime = new Date(); + this.log.debug( + `EVAL-${this.className}-SETUP-CONSTRUCTOR:${finalTime.getTime() - startTime.getTime()}`, + ); + } + + getOpenApiSpec(): unknown { + throw new Error("Method not implemented."); + } + + get ccModel(): CrossChainModel { + return this.crossChainModel; + } + + get numberEventsLog(): number { + return this.crossChainLog.numberEvents(); + } + + get numberEventsUncheckedLog(): number { + return this.uncheckedEventLog.numberEvents(); + } + + get numberEventsNonConformanceLog(): number { + return this.nonConformanceCrossChainLog.numberEvents(); + } + + get numberUnprocessedReceipts(): number { + return this.txReceipts.length; + } + + public purgeCrossChainEvents(): void { + this.crossChainLog.purgeLogs(); + } + + public getInstanceId(): string { + return this.instanceId; + } + + public getCaseId(): string { + return this.caseID; + } + + public setIsModeling(bool: boolean): void { + this.isModeling = bool; + } + + public setCaseId(id: string): void { + this.caseID = id; + } + + public async onPluginInit(): Promise { + return; + } + + public async shutdown(): Promise { + this.log.info(`Shutting down...`); + const serverMaybe = this.getHttpServer(); + if (serverMaybe.isPresent()) { + this.log.info(`Awaiting server.close() ...`); + const server = serverMaybe.get(); + await promisify(server.close.bind(server))(); + this.log.info(`server.close() OK`); + } else { + this.log.info(`No HTTP server found, skipping...`); + } + } + + async registerWebServices(app: Express): Promise { + const webServices = await this.getOrCreateWebServices(); + await Promise.all(webServices.map((ws) => ws.registerExpress(app))); + return webServices; + } + + public async getOrCreateWebServices(): Promise { + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + + const { log } = this; + + log.info(`Installing web services for plugin ${this.getPackageName()}...`); + + const endpoints: IWebServiceEndpoint[] = []; + + // TODO implement endpoints + + const pkg = this.getPackageName(); + log.info(`Installed web services for plugin ${pkg} OK`, { endpoints }); + + return endpoints; + } + + public getHttpServer(): Optional { + return Optional.ofNullable(this.httpServer); + } + + public getPackageName(): string { + return `@hyperledger/cactus-plugin-ccmodel-hephaestus`; + } + + public createReceiptFromRunTransactionV1ExchangeEth( + data: RunTransactionV1ExchangeEth, + caseId: string, + ): EthereumTxReceipt { + return { + caseID: caseId, + blockchainID: LedgerType.Ethereum, + timestamp: data.timestamp, + transactionID: data.response.transactionReceipt.transactionHash, + from: data.response.transactionReceipt.from, + invocationType: data.request.invocationType, + methodName: data.request.methodName, + parameters: data.request.params, + gasUsed: data.response.transactionReceipt.gasUsed, + effectiveGasPrice: data.response.transactionReceipt.effectiveGasPrice, + }; + } + + public pollTxReceiptsEth(data: RunTransactionV1ExchangeEth): void { + const fnTag = `${this.className}#pollTxReceiptsEth()`; + this.log.debug(fnTag); + + const ethReceipt = this.createReceiptFromRunTransactionV1ExchangeEth( + data, + this.caseID, + ); + this.txReceipts.push(ethReceipt); + return; + } + + public createReceiptFromRunTransactionV1ExchangeBesu( + data: RunTransactionV1ExchangeBesu, + caseId: string, + ): BesuV2TxReceipt { + return { + caseID: caseId, + blockchainID: LedgerType.Besu2X, + timestamp: data.timestamp, + transactionID: data.response.transactionReceipt.transactionHash, + from: data.response.transactionReceipt.from, + invocationType: data.request.invocationType, + methodName: data.request.methodName, + parameters: data.request.params, + gasUsed: data.response.transactionReceipt.gasUsed, + gasPrice: data.request.gasPrice as number, + }; + } + + public pollTxReceiptsBesu(data: RunTransactionV1ExchangeBesu): void { + const fnTag = `${this.className}#pollTxReceiptsBesu()`; + this.log.debug(fnTag); + + const besuReceipt = this.createReceiptFromRunTransactionV1ExchangeBesu( + data, + this.caseID, + ); + this.txReceipts.push(besuReceipt); + return; + } + + public createReceiptFromRunTxReqWithTxId( + data: RunTxReqWithTxId, + caseId: string, + ): FabricV2TxReceipt { + return { + caseID: caseId, + blockchainID: LedgerType.Fabric2, + timestamp: data.timestamp, + channelName: data.request.channelName, + transactionID: data.transactionId, + contractName: data.request.contractName, + signingCredentials: data.request.signingCredential, + invocationType: data.request.invocationType, + methodName: data.request.methodName, + parameters: data.request.params, + }; + } + + public pollTxReceiptsFabric(data: RunTxReqWithTxId): void { + const fnTag = `${this.className}#pollTxReceiptsFabric()`; + this.log.debug(fnTag); + + const fabricReceipt = this.createReceiptFromRunTxReqWithTxId( + data, + this.caseID, + ); + this.txReceipts.push(fabricReceipt); + return; + } + + public watchRunTransactionV1ExchangeEth(duration: number = 0): void { + const fnTag = `${this.className}#watchRunTransactionV1ExchangeEth()`; + this.log.debug(fnTag); + + if (!this.ethTxObservable) { + this.log.debug( + `${fnTag}-No Ethereum transaction observable provided, monitoring skipped`, + ); + return; + } + if (duration < 0) { + this.log.debug( + `${fnTag}-Negative duration provided (${duration}), monitoring all transactions`, + ); + } + !this.startMonitoring || (this.startMonitoring = Date.now()); + + this.ethTxObservable + .pipe( + // Filter only the values emitted within the specified duration + // if no duration provided, skip filtering + duration > 0 + ? filter( + (data) => + this.startMonitoring! - data.timestamp.getTime() <= duration, + ) + : tap(), + ) + .subscribe({ + next: (data: RunTransactionV1ExchangeEth) => { + // Handle the data whenever a new value is received by the observer + this.pollTxReceiptsEth(data); + }, + error: (error: unknown) => { + this.log.error( + `${fnTag}- error`, + error, + `receiving RunTransactionV1ExchangeEth by Ethereum transaction observable`, + this.ethTxObservable, + ); + throw error; + }, + }); + } + + public watchRunTransactionV1ExchangeBesu(duration: number = 0): void { + const fnTag = `${this.className}#watchRunTransactionV1ExchangeBesu()`; + this.log.debug(fnTag); + + if (!this.besuTxObservable) { + this.log.debug( + `${fnTag}-No Besu transaction observable provided, monitoring skipped`, + ); + return; + } + if (duration < 0) { + this.log.debug( + `${fnTag}-Negative duration provided (${duration}), monitoring all transactions`, + ); + } + + !this.startMonitoring || (this.startMonitoring = Date.now()); + + this.besuTxObservable + .pipe( + // Filter only the values emitted within the specified duration + // if no duration provided, skip filtering + duration > 0 + ? filter( + (data) => + this.startMonitoring! - data.timestamp.getTime() <= duration, + ) + : tap(), + ) + .subscribe({ + next: (data: RunTransactionV1ExchangeBesu) => { + // Handle the data whenever a new value is received by the observer + this.pollTxReceiptsBesu(data); + }, + error: (error: unknown) => { + this.log.error( + `${fnTag}- error`, + error, + `receiving RunTransactionV1ExchangeBesu by Besu transaction observable`, + this.besuTxObservable, + ); + throw error; + }, + }); + } + + public watchRunTxReqWithTxId(duration: number = 0): void { + const fnTag = `${this.className}#watchRunTxReqWithTxId()`; + this.log.debug(fnTag); + + if (!this.fabricTxObservable) { + this.log.debug( + `${fnTag}-No Fabric transaction observable provided, monitoring skipped`, + ); + return; + } + if (duration < 0) { + this.log.debug( + `${fnTag}-Negative duration provided (${duration}), monitoring all transactions`, + ); + } + !this.startMonitoring || (this.startMonitoring = Date.now()); + + this.fabricTxObservable + .pipe( + // Filter only the values emitted within the specified duration + // if no duration provided, skip filtering + duration > 0 + ? filter( + (data) => + this.startMonitoring! - data.timestamp.getTime() <= duration, + ) + : tap(), + ) + .subscribe({ + next: (data: RunTxReqWithTxId) => { + // Handle the data whenever a new value is received by the observer + this.pollTxReceiptsFabric(data); + }, + error: (error: unknown) => { + this.log.error( + `${fnTag}- error`, + error, + `receiving RunTxReqWithTxId by Fabric transaction observable`, + this.fabricTxObservable, + ); + throw error; + }, + }); + } + + public monitorTransactions(duration: number = 0): void { + const fnTag = `${this.className}#monitorTransactions()`; + this.log.debug(fnTag); + + this.startMonitoring = Date.now(); + this.watchRunTxReqWithTxId(duration); + this.watchRunTransactionV1ExchangeBesu(duration); + this.watchRunTransactionV1ExchangeEth(duration); + return; + } + + private createCrossChainEventFromEthReceipt( + ethReceipt: EthereumTxReceipt, + updatingCCModel: boolean, + ): void { + const ccEventFromEth: CrossChainEvent = { + caseID: ethReceipt.caseID, + receiptID: ethReceipt.transactionID, + blockchainID: ethReceipt.blockchainID, + invocationType: ethReceipt.invocationType, + methodName: ethReceipt.methodName, + parameters: ethReceipt.parameters, + timestamp: ethReceipt.timestamp.toISOString(), + identity: ethReceipt.from, + cost: calculateGasPriceEth( + ethReceipt.gasUsed as number, + ethReceipt.effectiveGasPrice, + ), + carbonFootprint: CarbonFootPrintConstants(ethReceipt.blockchainID), + latency: millisecondsLatency(ethReceipt.timestamp), + }; + + if (this.isModeling == false && updatingCCModel == false) { + this.uncheckedEventLog.addCrossChainEvent(ccEventFromEth); + + this.log.info( + "Added Cross Chain event from ETHEREUM for conformance checking", + ); + this.log.debug( + `Conformance Cross-chain log: ${JSON.stringify(ccEventFromEth)}`, + ); + } else { + this.crossChainLog.addCrossChainEvent(ccEventFromEth); + this.log.info("Added Cross Chain event from ETHEREUM"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromEth)}`); + } + } + + private createCrossChainEventFromBesuReceipt( + besuReceipt: BesuV2TxReceipt, + updatingCCModel: boolean, + ): void { + const ccEventFromBesu: CrossChainEvent = { + caseID: besuReceipt.caseID, + receiptID: besuReceipt.transactionID, + blockchainID: besuReceipt.blockchainID, + invocationType: besuReceipt.invocationType, + methodName: besuReceipt.methodName, + parameters: besuReceipt.parameters, + timestamp: besuReceipt.timestamp.toISOString(), + identity: besuReceipt.from, + cost: besuReceipt.gasUsed, + carbonFootprint: CarbonFootPrintConstants(besuReceipt.blockchainID), + latency: millisecondsLatency(besuReceipt.timestamp), + }; + + if (this.isModeling == false && updatingCCModel == false) { + this.uncheckedEventLog.addCrossChainEvent(ccEventFromBesu); + + this.log.info( + "Added Cross Chain event from BESU for conformance checking", + ); + this.log.debug( + `Conformance Cross-chain log: ${JSON.stringify(ccEventFromBesu)}`, + ); + } else { + this.crossChainLog.addCrossChainEvent(ccEventFromBesu); + this.log.info("Added Cross Chain event from BESU"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromBesu)}`); + } + } + + private createCrossChainEventFromFabricReceipt( + fabricReceipt: FabricV2TxReceipt, + updatingCCModel: boolean, + ): void { + const ccEventFromFabric: CrossChainEvent = { + caseID: fabricReceipt.caseID, + receiptID: fabricReceipt.transactionID, + blockchainID: fabricReceipt.blockchainID, + invocationType: fabricReceipt.invocationType, + methodName: fabricReceipt.methodName, + parameters: fabricReceipt.parameters, + timestamp: fabricReceipt.timestamp.toISOString(), + identity: fabricReceipt.signingCredentials.keychainRef, + cost: fabricReceipt.cost || 0, + carbonFootprint: CarbonFootPrintConstants(fabricReceipt.blockchainID), + latency: millisecondsLatency(fabricReceipt.timestamp), + }; + + if (this.isModeling == false && updatingCCModel == false) { + this.uncheckedEventLog.addCrossChainEvent(ccEventFromFabric); + + this.log.info( + "Added Cross Chain event from FABRIC for conformance checking", + ); + this.log.debug( + `Conformance Cross-chain log: ${JSON.stringify(ccEventFromFabric)}`, + ); + } else { + this.crossChainLog.addCrossChainEvent(ccEventFromFabric); + this.log.info("Added Cross Chain event from FABRIC"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromFabric)}`); + } + } + + private async createCrossChainEventFromReceipt( + receipt: BesuV2TxReceipt | EthereumTxReceipt | FabricV2TxReceipt, + updatingCCModel: boolean, + ): Promise { + switch (receipt.blockchainID) { + // Process Besu transaction receipt + case LedgerType.Besu2X: + this.createCrossChainEventFromBesuReceipt( + receipt as BesuV2TxReceipt, + updatingCCModel, + ); + break; + // Process Ethereum transaction receipt + case LedgerType.Ethereum: + this.createCrossChainEventFromEthReceipt( + receipt as EthereumTxReceipt, + updatingCCModel, + ); + break; + // Process Fabric transaction receipt + case LedgerType.Fabric2: + this.createCrossChainEventFromFabricReceipt( + receipt as FabricV2TxReceipt, + updatingCCModel, + ); + break; + default: + this.log.warn( + `Tx Receipt with case ID ${receipt.caseID} is not supported`, + ); + break; + } + } + + public async txReceiptToCrossChainEventLogEntry( + updatingCCModel: boolean = false, + ): Promise { + const startTime = new Date(); + const fnTag = `${this.className}#txReceiptToCrossChainEventLogEntry()`; + this.log.debug(fnTag); + // We are processing receipts to update the CrossChainLog. + // At the end of the processing, we need to clear the transaction receipts that have been processed + // Therefore, we need a listen method that hephaestus is always running, doing polls every X seconds, followed by receipt processing (this method) + try { + this.txReceipts.forEach((receipt) => { + this.createCrossChainEventFromReceipt(receipt, updatingCCModel); + }); + // Clear receipt array + this.txReceipts = []; + const finalTime = new Date(); + this.log.debug( + `EVAL-${this.className}-RECEIPT2EVENT:${finalTime.getTime() - startTime.getTime()}`, + ); + return; + } catch (error) { + const details = this.txReceipts.map((receipt) => { + return { + caseID: receipt.caseID, + receiptID: receipt.receiptID, + blockchainID: receipt.blockchainID, + timestamp: receipt.timestamp, + invocationType: receipt.invocationType, + methodName: receipt.methodName, + parameters: receipt.parameters, + }; + }); + this.log.error( + `${fnTag} Failed to create cross chain events from transaction receipts:`, + error, + `Receipts' details:`, + JSON.stringify(details), + ); + throw error; + } + } + + // Parses the cross chain event log to updates the cross chain model + // This is part of the cc model; have a set that maps case id to data structure; this data structure are the consolidated metrics for a cctx, stores each txid + // run over cc log; if case id is unique create new entry, otherwise add tx to cctx, update metrics, update last update; this is an updatable model + public async aggregateCcTx(): Promise { + const startTime = new Date(); + const lastAggregated = this.crossChainModel.lastAggregation; + const newAggregationDate = new Date(); + const ccTxSet = this.crossChainModel.getCCTxs(); + const logEntries = this.crossChainLog.logEntries; + // If entries are more recent than aggregation + let metrics: CrossChainTransactionSchema = { + ccTxID: "", + processedCrossChainEvents: [], + latency: 0, + carbonFootprint: 0, + cost: 0, + throughput: 0, + latestUpdate: newAggregationDate, + }; + const lastAggregatedTime = new Date(lastAggregated).getTime(); + const logsToAggregate = logEntries.filter( + (log) => new Date(log.timestamp).getTime() > lastAggregatedTime, + ); + if (logsToAggregate.length === 0) { + const finalTime = new Date(); + + this.log.debug( + `EVAL-${this.className}-AGGREGATE-CCTX-NO_NEW_LOGS:${finalTime.getTime() - startTime.getTime()}`, + ); + return; + } + logsToAggregate.forEach((eventEntry) => { + const key = eventEntry.caseID; + const eventID = eventEntry.receiptID; + let latency = eventEntry.latency as number; + let carbonFootprint = eventEntry.carbonFootprint as number; + let cost = eventEntry.cost as number; + + if (!latency) { + latency = 0; + } + if (!carbonFootprint) { + carbonFootprint = 0; + } + if (!cost) { + cost = 0; + } + if (ccTxSet?.has(key)) { + const existingCCTx = ccTxSet.get(key); + const previousEvents = existingCCTx?.processedCrossChainEvents || []; + const numberOfCurrentEvents = previousEvents.length + 1; + const previousLatency = existingCCTx?.latency || 0; + const previousCarbonFootprint = existingCCTx?.carbonFootprint || 0; + const previousCost = existingCCTx?.cost || 0; + const currentCost = (cost + previousCost) / numberOfCurrentEvents; + + const updatedMetrics = { + ccTxID: key, + processedCrossChainEvents: [...previousEvents, eventID], + latency: (latency + previousLatency) / numberOfCurrentEvents, + carbonFootprint: + (carbonFootprint + previousCarbonFootprint) / numberOfCurrentEvents, + cost: currentCost, + throughput: Number( + latency != 0 + ? (( + 1 / + ((latency + previousLatency) / numberOfCurrentEvents) + ).toFixed(3) as unknown as number) + : 0, + ), + latestUpdate: lastAggregated, + }; + this.crossChainModel.setCCTxs(key, updatedMetrics); + } else { + metrics = { + ccTxID: key, + processedCrossChainEvents: [eventID], + latency: latency, + carbonFootprint: carbonFootprint, + cost: cost, + throughput: Number( + (latency != 0 ? 1 / latency : 0).toFixed(3) as unknown as number, + ), + latestUpdate: lastAggregated, + }; + this.crossChainModel.setCCTxs(key, metrics); + } + }); + this.crossChainModel.setLastAggregationDate(newAggregationDate); + const finalTime = new Date(); + this.log.debug( + `${this.className}-AGGREGATE-CCTX-SUCCESS:${finalTime.getTime() - startTime.getTime()}`, + ); + return; + } + + public async persistCrossChainLogCsv(name?: string): Promise { + const startTime = new Date(); + const columns = + this.crossChainLog.getCrossChainLogAttributes() as (keyof CrossChainEvent)[]; + const logName = name + ? `${name}.csv` + : `hephaestus_log_${startTime.getTime()}.csv`; + const csvFolder = path.join(__dirname, "../", "../", "test", "csv"); + const logPath = path.join(csvFolder, logName); + const fnTag = `${this.className}#persistCrossChainLogCsv()`; + const ccEvents = this.crossChainLog.logEntries; + + try { + // Convert log entries to CSV rows + const csvRows = ccEvents.map((entry) => { + return columns + .map((header) => { + const value = entry[header]; + return typeof value === "string" && value.includes(";") + ? `"${value}"` + : value; + }) + .join(";"); + }); + + // Concatenate columns and rows into a single CSV string + const data = [columns.join(";"), ...csvRows].join("\n"); + this.log.debug(data); + + // Create directory if it doesn't exist + if (!fs.existsSync(csvFolder)) { + fs.mkdirSync(csvFolder); + } + fs.writeFileSync(logPath, data); + + const finalTime = new Date(); + this.log.debug( + `EVAL-${this.className}-PERSIST-LOG-CVS:${finalTime.getTime() - startTime.getTime()}`, + ); + return logName; + } catch (error) { + const errorMessage = `${fnTag} Failed to export cross-chain event log to CSV file:`; + throw new RuntimeError(errorMessage, error); + } + } + + public async persistCrossChainLogJson(name?: string): Promise { + const startTime = new Date(); + const logName = name + ? `${name}.json` + : `hephaestus_log_${startTime.getTime()}.json`; + const jsonFolder = path.join(__dirname, "../", "../", "test", "json"); + const logPath = path.join(jsonFolder, logName); + const fnTag = `${this.className}#persistCrossChainLogJson()`; + + const ccEvents = this.crossChainLog.logEntries; + + try { + const data = JSON.stringify(ccEvents, null, 2); + this.log.debug(data); + + // Create directory if it doesn't exist + if (!fs.existsSync(jsonFolder)) { + fs.mkdirSync(jsonFolder); + } + fs.writeFileSync(logPath, data); + + const finalTime = new Date(); + this.log.debug( + `EVAL-${this.className}-PERSIST-LOG-JSON:${finalTime.getTime() - startTime.getTime()}`, + ); + + return logName; + } catch (error) { + const errorMessage = `${fnTag} Failed to export cross-chain event log to JSON file:`; + throw new RuntimeError(errorMessage, error); + } + } + + private async persistUncheckedEventLog(): Promise { + const startTime = new Date(); + const logName = `hephaestus_log_${startTime.getTime()}`; + const jsonFolder = path.join(__dirname, "../", "../", "test", "json"); + const logPath = path.join(jsonFolder, logName + ".json"); + const fnTag = `${this.className}#persistUncheckedEventLog()`; + + const ccEvents = this.uncheckedEventLog.logEntries; + + try { + const data = JSON.stringify(ccEvents, null, 2); + this.log.debug(data); + + // Create directory if it doesn't exist + if (!fs.existsSync(jsonFolder)) { + fs.mkdirSync(jsonFolder); + } + fs.writeFileSync(logPath, data); + + const finalTime = new Date(); + this.log.debug( + `EVAL-${this.className}-PERSIST-LOG-JSON:${finalTime.getTime() - startTime.getTime()}`, + ); + + return logName; + } catch (error) { + const errorMessage = `${fnTag} Failed to export cross-chain event log to JSON file:`; + throw new RuntimeError(errorMessage, error); + } + } + + public async stopPeriodicCCModelUpdate(fileName: string = ""): Promise { + const fnTag = `${this.className}#stopPeriodicCCModelUpdate()`; + this.log.debug(fnTag); + await this.txReceiptToCrossChainEventLogEntry(true); + await this.createModel(fileName); + this.periodicUpdate = false; + } + + public async periodicCCModelUpdate( + fileName: string = "", + timeInterval: number, + ): Promise { + const fnTag = `${this.className}#periodicCCModelUpdate()`; + this.log.debug(fnTag); + + timeInterval = timeInterval < 5000 ? 5000 : timeInterval; + + this.periodicUpdate = true; + const intervalId = setInterval(async () => { + if (this.periodicUpdate == true) { + await this.txReceiptToCrossChainEventLogEntry(true); + if (fileName != "") { + await this.persistCrossChainLogCsv(fileName); + await this.persistCrossChainLogJson(fileName); + } + await this.checkConformanceAndUpdateModel(fileName); + } else { + clearInterval(intervalId); + } + }, timeInterval); + } + + public async checkConformanceAndUpdateModel(fileName: string): Promise { + const model = this.getModel(CrossChainModelType.PetriNet); + if (!model) { + return; + } + const conformanceDetails = await this.checkConformance(model); + this.filterCrossChainLogsByConformance(conformanceDetails); + const modelPM4PY = await this.createModel(fileName); + if (modelPM4PY) { + this.ccModel.setType(CrossChainModelType.PetriNet); + this.saveModel(CrossChainModelType.PetriNet, modelPM4PY); + } + } + + // Receives a serialized model and saves it + public saveModel(modelType: CrossChainModelType, model: string): void { + this.crossChainModel.saveModel(modelType, model); + } + + // Gets the saved serialized model with the specified CrossChainModelType + public getModel(modelType: CrossChainModelType): string | undefined { + return this.crossChainModel.getModel(modelType); + } + + public async createModel(fileName: string = ""): Promise { + if (fileName == "") { + fileName = await this.persistCrossChainLogCsv(); + fileName = fileName.split(".")[0]; + } + await this.aggregateCcTx(); + const petriNet = createModelPM4PY(fileName); + this.ccModel.setType(CrossChainModelType.PetriNet); + this.saveModel(CrossChainModelType.PetriNet, petriNet); + return petriNet; + } + + // creates a file with unmodeled logs and performs a conformance check + public async checkConformance(serializedCCModel: string): Promise { + const fileName = await this.persistUncheckedEventLog(); + const conformanceDetails = checkConformancePM4PY( + fileName, + serializedCCModel, + ); + this.filterCrossChainLogsByConformance(conformanceDetails); + return conformanceDetails; + } + + private filterCrossChainLogsByConformance( + conformanceDetails: string | undefined, + ): void { + const fnTag = `${this.className}#filterCrossChainLogsByConformance()`; + if (!conformanceDetails) { + throw new Error(`${fnTag} conformance details falsy.`); + } + + const entries = this.uncheckedEventLog.logEntries; + const details = conformanceDetails.split("\n"); + + const misbehaviour = details[2]; + + if (misbehaviour === "[]") { + // if it conforms, add to ccmodel + entries.forEach((entry) => { + this.crossChainLog.addCrossChainEvent(entry); + }); + } else { + // else keep it in a different log of non-conformance + entries.forEach((entry) => { + this.nonConformanceCrossChainLog.addCrossChainEvent(entry); + }); + } + // clean uncheckedEventLog + this.uncheckedEventLog.purgeLogs(); + } + + public convertModelToProcessTree(): string | undefined { + const petriNet = this.ccModel.getModel(CrossChainModelType.PetriNet); + if (!petriNet) { + return; + } + const tree = convertToProcessTreePM4PY(petriNet); + if (!tree) { + return; + } + this.saveModel(CrossChainModelType.ProcessTree, tree); + return tree; + } +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-factory-ccmodel-hephaestus.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-factory-ccmodel-hephaestus.ts new file mode 100644 index 0000000000..37676d287b --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-factory-ccmodel-hephaestus.ts @@ -0,0 +1,20 @@ +import { + IPluginFactoryOptions, + PluginFactory, +} from "@hyperledger/cactus-core-api"; +import { + IPluginCcModelHephaestusOptions, + CcModelHephaestus, +} from "./plugin-ccmodel-hephaestus"; + +export class PluginFactoryWebService extends PluginFactory< + CcModelHephaestus, + IPluginCcModelHephaestusOptions, + IPluginFactoryOptions +> { + async create( + pluginOptions: IPluginCcModelHephaestusOptions, + ): Promise { + return new CcModelHephaestus(pluginOptions); + } +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts new file mode 100644 index 0000000000..ee7f9c29d8 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts @@ -0,0 +1,97 @@ +import { execSync } from "child_process"; + +import path from "path"; + +export function createModelPM4PY(file_name: string): string { + const createModelScript = path.join(__dirname, "create_model.py"); + const command = `python3 ${createModelScript} ${file_name}`; + + try { + const startTime = new Date(); + const serializedCCModel = execSync(command).toString("utf-8"); + const finalTime = new Date(); + console.log( + `CREATE-MODEL-PM4PY:${finalTime.getTime() - startTime.getTime()}`, + ); + return serializedCCModel; + } catch (error) { + console.error(`Error executing ${command}:`, error); + throw error; + } +} + +export function checkConformancePM4PY( + file_name: string, + serializedCCModel: string, +): string { + const checkConformanceScript = path.join(__dirname, "check_conformance.py"); + const command = `python3 ${checkConformanceScript} ${file_name} \'${serializedCCModel}\'`; + + try { + const checkOutput = execSync(command).toString("utf-8"); + return checkOutput; + } catch (error) { + console.error(`Error executing ${command}:`, error); + throw error; + } +} + +export function convertToProcessTreePM4PY( + serializedCCModel: string, +): string | undefined { + const ConvertModelScript = path.join(__dirname, "convert_model.py"); + const command = `python3 ${ConvertModelScript} \'${serializedCCModel}\' ProcessTree`; + + try { + const output = execSync(command, { encoding: "utf-8" }); + return output; + } catch (error) { + console.error(`Error executing ${command}:`, error); + throw error; + } +} + +// // not needed? +// // this is just assigning the serialized process to hepheastus' ccmodel +// export function processModelToCCModelPM4PY( +// ccmodel: CrossChainModel, +// // processModel: string, +// ): CrossChainModel { +// // something like that +// // ccmodel.setModel(ccmodel.ccModelType, processModel); +// return ccmodel; +// } + +// // converts the ccmodel into process model for later conformance checking +// // if needed it's going to be different +// export function ccModelToProcessModelPM4PY( +// model: CrossChainModel, +// modelType: CrossChainModelType, +// ): string { +// let processModel: string | undefined; +// if (modelType == CrossChainModelType.PetriNet) { +// // call pm4py to make PetriNet +// processModel = model.getModel(CrossChainModelType.PetriNet); +// } else if (modelType == CrossChainModelType.ProcessTree) { +// // call pm4py to make ProcessTree +// processModel = model.getModel(CrossChainModelType.ProcessTree); +// } else { +// return "failed"; +// } + +// const processModelToCCModel = path.join( +// __dirname, +// "ccmodel_to_process_model.py", // serializes the ccmodel +// ); +// const command = `python3 ${processModelToCCModel} ${modelType} ${processModel}`; + +// try { +// const output = execSync(command, { encoding: "utf-8" }); +// console.log("Command output:", output); +// // return parseMP4PYOutput(output); +// return output; +// } catch (error) { +// console.error(`Error executing ${command}:`, error); +// throw error; +// } +// } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py new file mode 100644 index 0000000000..19a3b58e5d --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py @@ -0,0 +1,188 @@ +import sys +import os +# uncomment if problems with dependencies +#%pip install pm4py +#%pip install pandas +import pm4py +import time +import pandas +import pickle +import json +from pm4py.objects.petri_net.obj import PetriNet, Marking +from pm4py.objects.petri_net.utils import petri_utils + +#chage path if necessary +path = os.getcwd() +parent = os.path.dirname(path) +csv_dir = path + "/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv" +json_dir = path + "/packages/cactus-plugin-ccmodel-hephaestus/src/test/json" +pnml_file = path + "/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/process_models/pnml/petri_output.pnml" + +################################################################## + +def import_csv_original(file_path): + event_log = pandas.read_csv(file_path, sep=';') + event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp') + return event_log + +def import_json_original(file_path): + with open(file_path, 'r') as file: + data = json.load(file) + event_log = pandas.DataFrame(data) + event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp') + return event_log + +################################################################## + +def unserialize_and_check_conformance_file(ccLog): + net, initial_marking, final_marking = pm4py.read_pnml(pnml_file) + # pm4py.view_petri_net(net, initial_marking, final_marking) + + # check conformance: + print("\n----diagnostics:") + diagnostics = pm4py.conformance_diagnostics_alignments(ccLog, net, initial_marking, final_marking) + print(diagnostics) + +################################################################## + +def divide_model(model): + split_model = model.split(';') + return split_model[0], split_model[1], split_model[2], split_model[3], split_model[4] + +def get_from_to_arc(arc): + if '->' in arc: + return arc.split('->') + else: + return None, None + +def get_place(places_set, name): + for place in places_set: + if place.name == name: + return place + return None + +def get_transition(transitions_set, name): + name = name[1:name.find(',')] + for transition in transitions_set: + if transition.name == name: + return transition + return None + +def unserialize_model(model): + (places_str, transitions_str, arcs_str, im_str, fm_str) = divide_model(model) + + net = PetriNet("unserialized__petri_net") + + #unserialize places: + places_str = places_str[1:-1].replace(" ", "") + places_str_list = places_str.split(',') # creates a list of stringed places + for place_str in places_str_list: + net.places.add(PetriNet.Place(place_str)) # creates place from each string + + #unserialize transitions: + transitions_str = transitions_str[1:-1].replace(" ", "").replace("(", "").replace(")", "") + transitions_str_list = transitions_str.split(',') # creates a list of strings + i = 0 + while i < len(transitions_str_list): + if transitions_str_list[i] == 'None': + net.transitions.add(PetriNet.Transition(None, transitions_str_list[i+1])) + elif transitions_str_list[i+1] == 'None': + net.transitions.add(PetriNet.Transition(transitions_str_list[i], None)) + else: + net.transitions.add(PetriNet.Transition(transitions_str_list[i], transitions_str_list[i+1])) + i += 2 + + #unserialize arcs: + arcs_str = arcs_str[1:-1].replace(" ", "") + text_parsed = arcs_str + arcs_list = [] + while True: + next_parentisis = text_parsed.find(')') + next_comma = text_parsed.find(',', next_parentisis, len(text_parsed)) + + if next_parentisis != -1 and next_comma != -1: + arcs_list.append(text_parsed[:next_comma]) + text_parsed = text_parsed[next_comma + 1:] + else: + break + arcs_list.append(text_parsed[:len(text_parsed)]) + + # creates arc from place names + for arc in arcs_list: + (source, target) = get_from_to_arc(arc) + + # source is a place, target is a transition + if get_place(net.places, source) != None: + place = get_place(net.places, source) + transition = get_transition(net.transitions, target) + petri_utils.add_arc_from_to(place, transition, net) + + # target is a place, source is a transition + elif get_place(net.places, target) != None: + transition = get_transition(net.transitions, source) + place = get_place(net.places, target) + petri_utils.add_arc_from_to(transition, place, net) + + # target and source are both a transition or a place - cannot happen + else: + print("arcs cannot have the same type in source and target") + exit(1) + + ### unserialize tokens + im_info = im_str.replace("[", "").replace("]", "").replace("\'", "").split(':') + fm_info = fm_str.replace("[", "").replace("]", "").replace("\'", "").split(':') + initial_marking = Marking() + im_place = get_place(net.places, im_info[0]) + fm_place = get_place(net.places, fm_info[0]) + initial_marking[im_place] = int(im_info[1]) + final_marking = Marking() + final_marking[fm_place] = int(fm_info[1]) + + return net, initial_marking, final_marking + +def unserialize_and_check_conformance(ccLog): + (net, initial_marking, final_marking) = unserialize_model(serialized_ccmodel) + # pm4py.view_petri_net(net, initial_marking, final_marking) + + # check conformance: + diagnostics = pm4py.conformance_diagnostics_alignments(ccLog, net, initial_marking, final_marking) + print(diagnostics) + + alignment = diagnostics[0]["alignment"] + non_modeled_activities = [] + skips = [] + for activity in alignment: + if activity[0] == ">>" and activity[1] != None: + skips.append(activity) + elif activity[0] != ">>" and activity[1] == ">>": + non_modeled_activities.append(activity) + print(skips) + print(non_modeled_activities) + +################################################################## + +def main(): + file_csv = file + ".csv" + file_json = file + ".json" + + file_path_csv = os.path.join(csv_dir, file_csv) + file_path_json = os.path.join(json_dir, file_json) + if (os.path.exists(file_path_csv)): + ccLog = import_csv_original(file_path_csv) + unserialize_and_check_conformance(ccLog) + elif (os.path.exists(file_path_json)): + ccLog = import_json_original(file_path_json) + unserialize_and_check_conformance(ccLog) + else: + print(f"File '{file}' does not exist") + print(file_path_json) + exit(1) + +if __name__ == "__main__": + # if len(sys.argv) != 3: + # print("Usage: python3 check_conformance_json.py file_with_new_logs serialized_ccmodel") + # exit(1) + + file = sys.argv[1] + serialized_ccmodel = sys.argv[2] + main() \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py new file mode 100644 index 0000000000..bbf2360586 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py @@ -0,0 +1,123 @@ +import sys +# uncomment if problems with dependencies +#%pip install pm4py +import pm4py +from pm4py.objects.petri_net.obj import PetriNet, Marking +from pm4py.objects.petri_net.utils import petri_utils + +################################################################## + +def divide_model(model): + split_model = model.split(';') + return split_model[0], split_model[1], split_model[2], split_model[3], split_model[4] + +def get_from_to_arc(arc): + if '->' in arc: + return arc.split('->') + else: + return None, None + +def get_place(places_set, name): + for place in places_set: + if place.name == name: + return place + return None + +def get_transition(transitions_set, name): + name = name[1:name.find(',')] + for transition in transitions_set: + if transition.name == name: + return transition + return None + +def unserialize_model(model): + (places_str, transitions_str, arcs_str, im_str, fm_str) = divide_model(model) + + net = PetriNet("unserialized__petri_net") + + #unserialize places: + places_str = places_str[1:-1].replace(" ", "") + places_str_list = places_str.split(',') # creates a list of stringed places + for place_str in places_str_list: + net.places.add(PetriNet.Place(place_str)) # creates place from each string + + #unserialize transitions: + transitions_str = transitions_str[1:-1].replace(" ", "").replace("(", "").replace(")", "") + transitions_str_list = transitions_str.split(',') # creates a list of strings + i = 0 + while i < len(transitions_str_list): + if transitions_str_list[i] == 'None': + net.transitions.add(PetriNet.Transition(None, transitions_str_list[i+1])) + elif transitions_str_list[i+1] == 'None': + net.transitions.add(PetriNet.Transition(transitions_str_list[i], None)) + else: + net.transitions.add(PetriNet.Transition(transitions_str_list[i], transitions_str_list[i+1])) + i += 2 + + #unserialize arcs: + arcs_str = arcs_str[1:-1].replace(" ", "") + text_parsed = arcs_str + arcs_list = [] + while True: + next_parentisis = text_parsed.find(')') + next_comma = text_parsed.find(',', next_parentisis, len(text_parsed)) + + if next_parentisis != -1 and next_comma != -1: + arcs_list.append(text_parsed[:next_comma]) + text_parsed = text_parsed[next_comma + 1:] + else: + break + arcs_list.append(text_parsed[:len(text_parsed)]) + + # creates arc from place names + for arc in arcs_list: + (source, target) = get_from_to_arc(arc) + + # source is a place, target is a transition + if get_place(net.places, source) != None: + place = get_place(net.places, source) + transition = get_transition(net.transitions, target) + petri_utils.add_arc_from_to(place, transition, net) + + # target is a place, source is a transition + elif get_place(net.places, target) != None: + transition = get_transition(net.transitions, source) + place = get_place(net.places, target) + petri_utils.add_arc_from_to(transition, place, net) + + # target and source are both a transition or a place - cannot happen + else: + print("arcs cannot have the same type in source and target") + exit(1) + + ### unserialize tokens + im_info = im_str.replace("[", "").replace("]", "").replace("\'", "").split(':') + fm_info = fm_str.replace("[", "").replace("]", "").replace("\'", "").split(':') + initial_marking = Marking() + im_place = get_place(net.places, im_info[0]) + fm_place = get_place(net.places, fm_info[0]) + initial_marking[im_place] = int(im_info[1]) + final_marking = Marking() + final_marking[fm_place] = int(fm_info[1]) + + return net, initial_marking, final_marking + +################################################################## + +def main(): + (petri_net, initial_marking, final_marking) = unserialize_model(serialized_model) + if(convertion_type == "ProcessTree"): + process_tree = pm4py.convert_to_process_tree(petri_net, initial_marking, final_marking) + print(process_tree) + if(convertion_type == "BPMN"): + bpmn = pm4py.convert_to_bpmn(petri_net, initial_marking, final_marking) + print(bpmn) + +if __name__ == "__main__": + if len(sys.argv) != 3: + print("Usage: python3 convert_model_csv.py serialized_model type_to_convert_to") + exit(1) + + serialized_model = sys.argv[1] + convertion_type = sys.argv[2] + main() \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py new file mode 100644 index 0000000000..d92751c9e9 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py @@ -0,0 +1,84 @@ +import sys +import os +# uncomment if problems with dependencies +#%pip install pm4py +#%pip install pandas +import pm4py +import time +import pandas +import pickle +import json + +#chage path if necessary +path = os.getcwd() +parent = os.path.dirname(path) +csv_dir = path + "/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv" +json_dir = path + "/packages/cactus-plugin-ccmodel-hephaestus/src/test/json" +pnml_file = path + "/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/process_models/pnml/petri_output.pnml" + +def import_csv_original(file_path): + event_log = pandas.read_csv(file_path, sep=';') + event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp') + return event_log + +def import_json_original(file_path): + with open(file_path, 'r') as file: + data = json.load(file) + event_log = pandas.DataFrame(data) + event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp') + return event_log + +################################################################## +# unused + +def create_and_serialize_model_file(ccLog): + pn, im, fm = pm4py.discover_petri_net_inductive(ccLog) + pm4py.write_pnml(pn, im, fm, pnml_file) + +def create_and_serialize_model_pickle(ccLog): + pn, im, fm = pm4py.discover_petri_net_inductive(ccLog) + + pn_str = pickle.dumps(pn) + print(pn_str) + im_str = pickle.dumps(im) + print(im_str) + fm_str = pickle.dumps(fm) + print(fm_str) + + return pn_str + b"\n" + im_str + b"\n" + fm_str + b"\n" + +################################################################## + +def create_and_serialize_model(ccLog): + pn, im, fm = pm4py.discover_petri_net_inductive(ccLog) + # pm4py.view_petri_net(pn, im, fm) + return str(pn.places) + ";" + str(pn.transitions) + ";" + str(pn.arcs) + ";" + str(im) + ";" + str(fm) + +################################################################## + +def main(): + file_csv = file + ".csv" + file_json = file + ".json" + + file_path_csv = os.path.join(csv_dir, file_csv) + file_path_json = os.path.join(json_dir, file_json) + + if (os.path.exists(file_path_csv)): + ccLog = import_csv_original(file_path_csv) + serialized_model = create_and_serialize_model(ccLog) + print(serialized_model) + elif (os.path.exists(file_path_json)): + ccLog = import_json_original(file_path_json) + serialized_model = create_and_serialize_model(ccLog) + print(serialized_model) + else: + print(f"File '{file}' does not exist") + exit(1) + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Usage: python3 create_model_csv.py file_with_logs") + exit(1) + + file = sys.argv[1] + main() \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/public-api.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/public-api.ts new file mode 100755 index 0000000000..3e81fe76c1 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/public-api.ts @@ -0,0 +1,16 @@ +export { + CcModelHephaestus, + IPluginCcModelHephaestusOptions, + IWebAppOptions, +} from "./plugin-ccmodel-hephaestus"; + +export { PluginFactoryWebService } from "./plugin-factory-ccmodel-hephaestus"; + +import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; +import { PluginFactoryWebService } from "./plugin-factory-ccmodel-hephaestus"; + +export async function createPluginFactory( + pluginFactoryOptions: IPluginFactoryOptions, +): Promise { + return new PluginFactoryWebService(pluginFactoryOptions); +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv new file mode 100644 index 0000000000..b53c925f56 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv @@ -0,0 +1,2 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +basic-TEST;txID1;2024-05-27T09:05:43.640Z;FABRIC_2;FabricContractInvocationType.SEND;methodName2;0,2;person 1;0;0.00018;4 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv new file mode 100644 index 0000000000..a44a57f6bd --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv @@ -0,0 +1,5 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +BESU_MONITORING;0xe6800f6ff8d1a8ea5ee677dbb9320f849d28a8a533608affea5ef138be088736;2024-05-27T09:34:25.795Z;BESU_2X;SEND;createAsset;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;3457 +BESU_MONITORING;0x320482edd9e264453bbd7dee3826b7f9960fcaa27ce70398e21eee9be14423aa;2024-05-27T09:34:27.303Z;BESU_2X;SEND;lockAsset;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;1953 +BESU_MONITORING;0x99ae2b0951af4d674734bdc8ba21838eb2df3aefa7d2bc54f51c12ad713c06b5;2024-05-27T09:34:28.641Z;BESU_2X;SEND;isPresent;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b;0x627306090abab3a6e1400e9345bc60c78a8bef57;25157;0.00018;615 +BESU_MONITORING;0xd2da2adaf8f4e39dbd55ff8b42179efd67d402c58a61cdd30ca8d142be955f5c;2024-05-27T09:34:29.246Z;BESU_2X;SEND;deleteAsset;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;11 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv new file mode 100644 index 0000000000..5f19ca27f8 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv @@ -0,0 +1,28 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +BESU_ETHEREUM_FABRIC_1;0x6b2082f5ca10801ab311fefa9fd5fc0ddcca253da5707232ac07599585d88fb4;2024-05-20T10:32:59.263Z;BESU_2X;SEND;createAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;110153 +BESU_ETHEREUM_FABRIC_1;0x8bcbdc64574f2767526685aedb2197158da87c619a4bb7bf64e3aaa00ac72872;2024-05-20T10:33:00.553Z;BESU_2X;SEND;lockAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;108865 +BESU_ETHEREUM_FABRIC_1;0x8068f71dc71de14e80c8b6be2042c2001ac383c42bc363608df5510277cedc81;2024-05-20T10:33:01.883Z;BESU_2X;SEND;deleteAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;107535 +BESU_ETHEREUM_FABRIC_1;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-20T10:33:07.943Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;129786009655382;0;101476 +BESU_ETHEREUM_FABRIC_1;0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9;2024-05-20T10:33:12.103Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;41156218131450;0;97316 +BESU_ETHEREUM_FABRIC_1;0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c;2024-05-20T10:33:17.246Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955165049120;0;92174 +BESU_ETHEREUM_FABRIC_1;453887cf863ff5329f47ba82b0a6de9d63a1b7eb07be932ac4d6fd71c03f1227;2024-05-20T10:33:23.599Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,10,owner1;user1;0;0.00018;85821 +BESU_ETHEREUM_FABRIC_1;547e59b76a912a65638585f42d33e264cefe1898a10cfeafd97929a6547dfd96;2024-05-20T10:33:29.855Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,owner2;user1;0;0.00018;79566 +BESU_ETHEREUM_FABRIC_1;9486bee925044c747d5faa942449f899d3c8a8c9e9a42ffe37ca46278545e636;2024-05-20T10:33:35.386Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850;user1;0;0.00018;74035 +BESU_ETHEREUM_FABRIC_2;0xafac857fc46846e2c6bb651a1c406606f58357211fb65f6887617a5cac878c23;2024-05-20T10:33:36.055Z;BESU_2X;SEND;createAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;73367 +BESU_ETHEREUM_FABRIC_2;0x5061e439a6cff371957872531932990013c6e052d82b7ab199785c2fd7e74e93;2024-05-20T10:33:38.902Z;BESU_2X;SEND;lockAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;70520 +BESU_ETHEREUM_FABRIC_2;0xe72063132b259c1a57e202cb5321258102767816b1240f513499faa04af8781d;2024-05-20T10:33:40.054Z;BESU_2X;SEND;deleteAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;69369 +BESU_ETHEREUM_FABRIC_2;0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708;2024-05-20T10:33:47.139Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103394573872490;0;62284 +BESU_ETHEREUM_FABRIC_2;0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2;2024-05-20T10:33:52.281Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538215602250;0;57143 +BESU_ETHEREUM_FABRIC_2;0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16;2024-05-20T10:33:57.501Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079554985280;0;51924 +BESU_ETHEREUM_FABRIC_2;525368f5e7ebbed3edd2cb5f52fcc5f441bbdff5863fc08597b87402abaa681e;2024-05-20T10:34:03.161Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,10,owner1;user1;0;0.00018;46264 +BESU_ETHEREUM_FABRIC_2;5374737a2ac9149c4068a776249c2bc5b45e80b34c5f37a9340966a4edf2c4a4;2024-05-20T10:34:08.645Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,owner2;user1;0;0.00018;40780 +BESU_ETHEREUM_FABRIC_2;67fdd728e47ab2ae655ecca44bda5999067cf11c2e79bd317ee6ad03dd5eb5cf;2024-05-20T10:34:14.183Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850;user1;0;0.00018;35243 +BESU_ETHEREUM_FABRIC_3;0xf7e10e0fa005951955ab2e03d1742430d4b9e73303c07cadf640148460f1859e;2024-05-20T10:34:15.031Z;BESU_2X;SEND;createAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;34395 +BESU_ETHEREUM_FABRIC_3;0xe96e1c157a0c42487428da97c6a97c548bcd4d17b25fdbc8d8ca747adfbeeac6;2024-05-20T10:34:16.505Z;BESU_2X;SEND;lockAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;32922 +BESU_ETHEREUM_FABRIC_3;0x03abead1107ae01dff9bdfb941124e80adc0609bd613461152c0df7d902a1c63;2024-05-20T10:34:17.879Z;BESU_2X;SEND;deleteAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;31548 +BESU_ETHEREUM_FABRIC_3;0xdaf77bc2c7bdba632dd34d7ff8036dcb18c3fcfcfa8a34e315099a674c662351;2024-05-20T10:34:22.191Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;95004006312862;0;27237 +BESU_ETHEREUM_FABRIC_3;0x3e8cc1e7762ebbf015fbcc7527be575ce932bad1e52c277ef5ad06978f46c90f;2024-05-20T10:34:27.469Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31116241250400;0;21959 +BESU_ETHEREUM_FABRIC_3;0xbf8a4b150c4c431b415829e5722840f1e7541109507b7ca497f7bc2453b64fed;2024-05-20T10:34:32.014Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31893607627440;0;17414 +BESU_ETHEREUM_FABRIC_3;8e2146a7989e14efbc97d369a98d8203401dfbd034df77fcb66f7b32e4a50e99;2024-05-20T10:34:38.174Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,10,owner1;user1;0;0.00018;11255 +BESU_ETHEREUM_FABRIC_3;cd118aeed54618ead4514f17c2682178f4f788b7e5f7f0d0772744ae22e9f9b2;2024-05-20T10:34:43.744Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,owner2;user1;0;0.00018;5685 +BESU_ETHEREUM_FABRIC_3;93f066ba9539c48b32a11b2e6cd469cab38e9cb4e78be4385f259286afb674cb;2024-05-20T10:34:49.405Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850;user1;0;0.00018;25 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv new file mode 100644 index 0000000000..231f0be83a --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv @@ -0,0 +1,28 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +BESU_ETHEREUM_FABRIC_1;0xb81ed2022db3f730c182da98690974fa6b2b1f4ae503d4d9c9160c160a0cc589;2024-05-27T09:15:37.576Z;BESU_2X;SEND;createAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;116909 +BESU_ETHEREUM_FABRIC_1;0x3957718d932e5c08f5183d7e354f27e92bbf1f7bad03f23300bce9190e0e9c1d;2024-05-27T09:15:39.273Z;BESU_2X;SEND;lockAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;115213 +BESU_ETHEREUM_FABRIC_1;0xc23ab99376855ab985aa8964ce2da5a6d7ff4539c34b33daf54d927396547808;2024-05-27T09:15:40.109Z;BESU_2X;SEND;deleteAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;114379 +BESU_ETHEREUM_FABRIC_1;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-27T09:15:46.123Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;129786009655382;0;108366 +BESU_ETHEREUM_FABRIC_1;0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9;2024-05-27T09:15:51.381Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;41156218131450;0;103109 +BESU_ETHEREUM_FABRIC_1;0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c;2024-05-27T09:15:56.367Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955165049120;0;98124 +BESU_ETHEREUM_FABRIC_1;88ab44939551ea52c8abdb2779163278a07713bf397b215cce2dac9be478b08a;2024-05-27T09:16:03.019Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;966c0c39-b39a-49de-bf00-82b62444615a,10,owner1;user1;0;0.00018;91472 +BESU_ETHEREUM_FABRIC_1;04a5f33f1461b1f446086dcd435cedfb7f690b35b4359f87724a18755fd12bbb;2024-05-27T09:16:08.577Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;966c0c39-b39a-49de-bf00-82b62444615a,owner2;user1;0;0.00018;85916 +BESU_ETHEREUM_FABRIC_1;5f25721a387592f30d493aa455025aff308c7009b7b05d45949006e7e964094f;2024-05-27T09:16:14.245Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;966c0c39-b39a-49de-bf00-82b62444615a;user1;0;0.00018;80250 +BESU_ETHEREUM_FABRIC_2;0x9198a615db48db3c018bef59d47dfb93568dbbf6d04a56acb595db24d192fc06;2024-05-27T09:16:15.243Z;BESU_2X;SEND;createAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;79254 +BESU_ETHEREUM_FABRIC_2;0x1451b68f1f59a5425cb442075c2a8504ad08d0fe605180ee3a02e9019f82c3f3;2024-05-27T09:16:17.305Z;BESU_2X;SEND;lockAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;77194 +BESU_ETHEREUM_FABRIC_2;0x0801c6aecd6d105d0249d51868050395cad9b5e17f56ee4654c2ec47cbf49f82;2024-05-27T09:16:18.359Z;BESU_2X;SEND;deleteAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;76141 +BESU_ETHEREUM_FABRIC_2;0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708;2024-05-27T09:16:26.125Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103394573872490;0;68378 +BESU_ETHEREUM_FABRIC_2;0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2;2024-05-27T09:16:31.184Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538215602250;0;63331 +BESU_ETHEREUM_FABRIC_2;0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16;2024-05-27T09:16:36.363Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079554985280;0;58154 +BESU_ETHEREUM_FABRIC_2;ec20bf8b8418971e43685ba2b6bee62c845dd272d901af92a158d21e982a8d47;2024-05-27T09:16:43.981Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;966c0c39-b39a-49de-bf00-82b62444615a,10,owner1;user1;0;0.00018;50536 +BESU_ETHEREUM_FABRIC_2;d68666a62b997c8527718aba35b7fddef109dafee2273133b618847e2a8074c6;2024-05-27T09:16:51.969Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;966c0c39-b39a-49de-bf00-82b62444615a,owner2;user1;0;0.00018;42549 +BESU_ETHEREUM_FABRIC_2;5cbf80fe64c979d92f0e35f40bd130a05772d36268c2ee3f73d2aad463359978;2024-05-27T09:16:59.118Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;966c0c39-b39a-49de-bf00-82b62444615a;user1;0;0.00018;35400 +BESU_ETHEREUM_FABRIC_3;0x4985326b838f116fa612b9c1d81335ea4ee957a20c54a44ae42579ec4710a99a;2024-05-27T09:17:00.202Z;BESU_2X;SEND;createAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;34317 +BESU_ETHEREUM_FABRIC_3;0x967eb4286a012277a74270dce024c9c0872739c0733f8211b206ccf16432a122;2024-05-27T09:17:01.250Z;BESU_2X;SEND;lockAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;33269 +BESU_ETHEREUM_FABRIC_3;0x7d6c1bdfaafd4b5f4799450da507b517603d2963291649ec832d191944dca56d;2024-05-27T09:17:02.477Z;BESU_2X;SEND;deleteAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;32051 +BESU_ETHEREUM_FABRIC_3;0x8f63925f9c4e05884840fc15df27f41cd75d97a13a3aa3a34ed8497cde5af522;2024-05-27T09:17:06.542Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;94325755557346;0;27986 +BESU_ETHEREUM_FABRIC_3;0x972b7d58b0cd9e3e603c577f2cb4fabd8a64ed0c070d55950bf403e27f446390;2024-05-27T09:17:11.777Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30920461153200;0;22752 +BESU_ETHEREUM_FABRIC_3;0x5bcfdbf3d6b1baf09446a581afb9b9dd76298639f7bda9db71f6a60d8d55ea15;2024-05-27T09:17:16.969Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31716906746400;0;17563 +BESU_ETHEREUM_FABRIC_3;0e1e5982732b3426ca1feb4a0585d48adc3ee67706c7c92289ace06d949a4fad;2024-05-27T09:17:22.893Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;966c0c39-b39a-49de-bf00-82b62444615a,10,owner1;user1;0;0.00018;11640 +BESU_ETHEREUM_FABRIC_3;b925b6b6e68a07c12be5fe01a58869f844cd73d88254f3b427a65ac52eae7a32;2024-05-27T09:17:28.417Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;966c0c39-b39a-49de-bf00-82b62444615a,owner2;user1;0;0.00018;6116 +BESU_ETHEREUM_FABRIC_3;b99476b1334e81083ae88ae4991d72af4ca91adb63022ee8e37cde0beae10621;2024-05-27T09:17:34.473Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;966c0c39-b39a-49de-bf00-82b62444615a;user1;0;0.00018;60 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv new file mode 100644 index 0000000000..cf9950b9c0 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv @@ -0,0 +1,4 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +ETHEREUM_MONITORING;0xc0730eff8158a22803060879fd555b04d3940733b58f3b5d73698ea693e5d8de;2024-05-17T14:52:01.098Z;ETHEREUM;SEND;createAsset;asset2,10;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103396064181676;0;10250 +ETHEREUM_MONITORING;0x319fc6d76fc7216599060623d0613fea997d164b8c7fbab08635190556d12162;2024-05-17T14:52:06.257Z;ETHEREUM;SEND;lockAsset;asset2;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538645761600;0;5091 +ETHEREUM_MONITORING;0x6ea284a62910fd25c30722aa7b20b325cc5f4304f25cd10d0186041b39e7e95e;2024-05-17T14:52:11.337Z;ETHEREUM;SEND;deleteAsset;asset2;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079943209040;0;13 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv new file mode 100644 index 0000000000..634807ddfc --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv @@ -0,0 +1,5 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +ETHEREUM_MONITORING;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-27T09:33:21.366Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;135530010970738;0;15298 +ETHEREUM_MONITORING;0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72;2024-05-27T09:33:26.632Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42814248832950;0;10033 +ETHEREUM_MONITORING;0xdddabe51b7894122aed2ec29891c8de590b727cfbea99dbdabc55feb1ba04718;2024-05-27T09:33:31.653Z;ETHEREUM;SEND;isPresent;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33945972851475;0;5012 +ETHEREUM_MONITORING;0x154f57cfdd1c482a246377a80ddcaaa1e14d92678882a119cb0cdf96ebb83d7e;2024-05-27T09:33:36.658Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955256397680;0;7 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv new file mode 100644 index 0000000000..ad9d3bffc0 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv @@ -0,0 +1,5 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +FABRIC_MONITORING;4b21851915d609fc0541037a569ce502ac9b87a415664755494422e4e8cb30dc;2024-05-27T09:31:47.774Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231,10,owner1;user1;0;0.00018;16298 +FABRIC_MONITORING;e26794398de369ba8ee2eb97235ef5d1dceceb8fda57413732a5550bf5cc420f;2024-05-27T09:31:53.120Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231,owner2;user1;0;0.00018;10952 +FABRIC_MONITORING;fa3bbd9ec8cb372e09211e057074fcf03f0c5f178c7ae098fbd3ead0956d17a4;2024-05-27T09:31:58.521Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231,owner1;user1;0;0.00018;5552 +FABRIC_MONITORING;677867c703fa64b1a4651a5c661ccd4cf2ca84259a64eae534d88d7cc3cafe48;2024-05-27T09:32:04.061Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231;user1;0;0.00018;12 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv new file mode 100644 index 0000000000..4299f0a23d --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv @@ -0,0 +1,29 @@ +caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency +CCMODEL_UPDATE;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-27T09:40:42.941Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;135530010970738;0;4921 +CCMODEL_UPDATE;0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72;2024-05-27T09:40:49.281Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42814248832950;0;8580 +CCMODEL_UPDATE;0x5121ac2440d82d580bc30c9e445365871a0bbd7310580bd7e7617d66abdc0d33;2024-05-27T09:40:52.233Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42451616646000;0;5628 +CCMODEL_UPDATE;0x3be2b1b2c1bec476f0d37cb6990b2ae7b54804a166262aef639ba6993d64e896;2024-05-27T09:40:57.247Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;120363911294810;0;615 +CCMODEL_UPDATE;0x1ae44035a0580491f47933802ca3f99c11ca524b9c2add9169b67079d1085d56;2024-05-27T09:41:02.421Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;38436488700900;0;5440 +CCMODEL_UPDATE;0xb64d1e48f4f69bf930950bc13d9c05513642af08dbdd5079f428db0fc17c839d;2024-05-27T09:41:07.408Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;38500479768000;0;454 +CCMODEL_UPDATE;0xb299fbed0ff28d4b29404142d8bee7b33a6ac2d480f22af3fdac030e9197e955;2024-05-27T09:41:12.385Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;110203266779032;0;5476 +CCMODEL_UPDATE;0xf88b5da58aa42c36a798cbbb773da6650e27dd55ab9a870f542e899b827720ba;2024-05-27T09:41:17.387Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;35503574548200;0;475 +CCMODEL_UPDATE;0x620e72017b4bc4689c11d329504a8ea73729ed3f4eae2c73c7d2ad440f1d3463;2024-05-27T09:41:22.263Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;35853385067280;0;5598 +CCMODEL_UPDATE;0xaaf8cacf1951a808f769e87a32304952d9bbdb3eeb2e56fde12959c5d775b49f;2024-05-27T09:41:27.170Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103396064181676;0;692 +CCMODEL_UPDATE;0xb205b16fac624e125354b93d9d9b542b6dbbf84816c6ed32a9e8ddd0c89cde50;2024-05-27T09:41:32.195Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538645761600;0;5666 +CCMODEL_UPDATE;0x621becfe651fee97f77384c62b1730c6c0f364bf40f4be96fcc871c25d2410bc;2024-05-27T09:41:37.087Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079943209040;0;775 +CCMODEL_UPDATE;0xa9ba355c1b6c24475762f8d85e3fe31373488d4ed5767d85cdd8bad701b635d3;2024-05-27T09:41:42.152Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;98835525300660;0;5710 +CCMODEL_UPDATE;0xadf19829cc25a097e457ed78fe9430fb0d306820ed91adbb94e538a291535849;2024-05-27T09:41:47.039Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;32222226180300;0;823 +CCMODEL_UPDATE;0x39d64d6a97e476d64ebee18f8769fea61f8619ada119c58264dab2a04f8b11be;2024-05-27T09:41:52.133Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;32891811777840;0;5728 +CCMODEL_UPDATE;0xebfd45ff34e3ff7bd33d3c9bb5379877b7b0fd08e4357045dac805ed19cee100;2024-05-27T09:41:57.039Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;95780155968798;0;823 +CCMODEL_UPDATE;0xe280efdc199b8635b392024bf969d7a78f7de3aaef64499c01dc240c425da1c2;2024-05-27T09:42:02.152Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31340280308100;0;5709 +CCMODEL_UPDATE;0x96129a0b72d96b2bb3c7d359cf0d7d444f814b18614889b07a391af1d12314f2;2024-05-27T09:42:07.066Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;32095813562880;0;796 +CCMODEL_UPDATE;0xd3d2045c8d79914a43bf0d0fa48233cb0c6d3d8d4c623767badeb6f5157e9876;2024-05-27T09:42:12.164Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;93733186606720;0;5697 +CCMODEL_UPDATE;0xd5d911f6b56aaa9539605c428404558111b31701753843d7e37b8732967b721b;2024-05-27T09:42:17.148Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30749413489950;0;714 +CCMODEL_UPDATE;0xcbc1a5c07d93f980362adaf84f66db3127e7d5745cca0117cbf9f05078d6b03b;2024-05-27T09:42:22.248Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31562528045760;0;5613 +CCMODEL_UPDATE;0x9cd9db21f05539f6dff370095d8d1763f0914b5d197405d30fc941d8c090c678;2024-05-27T09:42:27.135Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;92361802785924;0;727 +CCMODEL_UPDATE;0x6adbc6ffea1acadabe5c67cef94a855383c38b58a5b8ff296b48e399f30a4ad3;2024-05-27T09:42:32.319Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30353557405200;0;5542 +CCMODEL_UPDATE;0x96ecf2aa1876492afddccf5e2a0083e21b1c85b24550fc0e4c7437699729ce18;2024-05-27T09:42:37.207Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31205249014320;0;655 +CCMODEL_UPDATE;0xcf6652ab02e110b03816ba739c83a600424e9ee0611c34544ca4a239081018be;2024-05-27T09:42:42.165Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;91443032771380;0;5696 +CCMODEL_UPDATE;0x76ea903dabc8a71125125ee782e22d06cebb3923cdeb0186236186145b299c2e;2024-05-27T09:42:47.055Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30088350292200;0;806 +CCMODEL_UPDATE;0x60fb968f395815fc788974d19ccb11fa5e361b74e9d9ae1bd2224b8f03be395f;2024-05-27T09:42:52.213Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30965886922560;0;5648 +CCMODEL_UPDATE;0x13b53c3379a666e719caa33ea0161d08594e663f90e268f25017c2e7068290c8;2024-05-27T09:42:57.111Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;90827495125774;0;751 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb new file mode 100644 index 0000000000..460facfb36 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb @@ -0,0 +1,286 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-2fed1eb2-9dc1-47ec-b7f2-f355b444c690.json']\n", + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" + ] + } + ], + "source": [ + "import os\n", + "path = os.getcwd()\n", + "parent = os.path.dirname(path)\n", + "\n", + "\n", + "# Change path if necessary\n", + "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", + "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", + "\n", + "import sys\n", + "\n", + "if __name__ == '__main__':\n", + " print(sys.argv)\n", + " print(file_path)\n", + "\n", + "\n", + "\n", + "# import sys\n", + "\n", + "# accept command line arguments\n", + "# inputArg1 = sys.argv[1]\n", + "\n", + "#print('inputArg1: ',inputArg1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "# uncomment if problems with dependencies\n", + "#%pip install pm4py\n", + "#%pip install pandas\n", + "import pm4py\n", + "import datetime as dt\n", + "import time\n", + "import pandas\n", + "\n", + "# process mining\n", + "from pm4py.algo.discovery.alpha import algorithm as alpha_miner\n", + "from pm4py.algo.discovery.inductive import algorithm as inductive_miner\n", + "from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner\n", + "from pm4py.algo.discovery.dfg import algorithm as dfg_discovery\n", + "\n", + "# viz\n", + "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", + "from pm4py.visualization.process_tree import visualizer as pt_visualizer\n", + "from pm4py.visualization.heuristics_net import visualizer as hn_visualizer\n", + "from pm4py.visualization.dfg import visualizer as dfg_visualization\n", + "\n", + "from pm4py.objects.conversion.process_tree import converter as pt_converter\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "def import_csv_original(file_path):\n", + " event_log = pandas.read_csv(file_path, sep=';')\n", + " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", + " return event_log\n", + "\n", + "def getStartActivities(event_log):\n", + " s = pm4py.get_start_activities(event_log)\n", + " print(\"Start activities: {}\\n\".format(s))\n", + " return s\n", + "def getEndActivities(event_log):\n", + " e = pm4py.get_end_activities(event_log)\n", + " print(\"End activities: {}\\n\".format(e))\n", + " return (e)\n", + "\n", + "def getAttributeFromLog(event_log, attr):\n", + " entries = pm4py.get_event_attribute_values(event_log,attr)\n", + " print(\"Entries: {}\\n\".format(entries))\n", + " return entries" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" + ] + }, + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[4], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(file_path)\n\u001b[0;32m----> 2\u001b[0m log \u001b[38;5;241m=\u001b[39m \u001b[43mimport_csv_original\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m log_other_model \u001b[38;5;241m=\u001b[39m import_csv_original(file_path_other_model)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(log)\n", + "Cell \u001b[0;32mIn[3], line 2\u001b[0m, in \u001b[0;36mimport_csv_original\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mimport_csv_original\u001b[39m(file_path):\n\u001b[0;32m----> 2\u001b[0m event_log \u001b[38;5;241m=\u001b[39m \u001b[43mpandas\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msep\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m;\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m event_log \u001b[38;5;241m=\u001b[39m pm4py\u001b[38;5;241m.\u001b[39mformat_dataframe(event_log, case_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcaseID\u001b[39m\u001b[38;5;124m'\u001b[39m, activity_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmethodName\u001b[39m\u001b[38;5;124m'\u001b[39m, timestamp_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtimestamp\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m event_log\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:912\u001b[0m, in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[0m\n\u001b[1;32m 899\u001b[0m kwds_defaults \u001b[38;5;241m=\u001b[39m _refine_defaults_read(\n\u001b[1;32m 900\u001b[0m dialect,\n\u001b[1;32m 901\u001b[0m delimiter,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 908\u001b[0m dtype_backend\u001b[38;5;241m=\u001b[39mdtype_backend,\n\u001b[1;32m 909\u001b[0m )\n\u001b[1;32m 910\u001b[0m kwds\u001b[38;5;241m.\u001b[39mupdate(kwds_defaults)\n\u001b[0;32m--> 912\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:577\u001b[0m, in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m 574\u001b[0m _validate_names(kwds\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnames\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m))\n\u001b[1;32m 576\u001b[0m \u001b[38;5;66;03m# Create the parser.\u001b[39;00m\n\u001b[0;32m--> 577\u001b[0m parser \u001b[38;5;241m=\u001b[39m \u001b[43mTextFileReader\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m chunksize \u001b[38;5;129;01mor\u001b[39;00m iterator:\n\u001b[1;32m 580\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m parser\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1407\u001b[0m, in \u001b[0;36mTextFileReader.__init__\u001b[0;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[1;32m 1404\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moptions[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m kwds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 1406\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles: IOHandles \u001b[38;5;241m|\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m-> 1407\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_engine \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_make_engine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mengine\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1661\u001b[0m, in \u001b[0;36mTextFileReader._make_engine\u001b[0;34m(self, f, engine)\u001b[0m\n\u001b[1;32m 1659\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m mode:\n\u001b[1;32m 1660\u001b[0m mode \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m-> 1661\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;241m=\u001b[39m \u001b[43mget_handle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1662\u001b[0m \u001b[43m \u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1663\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1664\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1665\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcompression\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1666\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemory_map\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmemory_map\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1667\u001b[0m \u001b[43m \u001b[49m\u001b[43mis_text\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mis_text\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1668\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding_errors\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstrict\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1669\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstorage_options\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1670\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1671\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1672\u001b[0m f \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles\u001b[38;5;241m.\u001b[39mhandle\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/common.py:859\u001b[0m, in \u001b[0;36mget_handle\u001b[0;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[1;32m 854\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(handle, \u001b[38;5;28mstr\u001b[39m):\n\u001b[1;32m 855\u001b[0m \u001b[38;5;66;03m# Check whether the filename is to be opened in binary mode.\u001b[39;00m\n\u001b[1;32m 856\u001b[0m \u001b[38;5;66;03m# Binary mode does not support 'encoding' and 'newline'.\u001b[39;00m\n\u001b[1;32m 857\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mencoding \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mmode:\n\u001b[1;32m 858\u001b[0m \u001b[38;5;66;03m# Encoding\u001b[39;00m\n\u001b[0;32m--> 859\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[1;32m 860\u001b[0m \u001b[43m \u001b[49m\u001b[43mhandle\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 861\u001b[0m \u001b[43m \u001b[49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 862\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 863\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 864\u001b[0m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 865\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 866\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 867\u001b[0m \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[1;32m 868\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mopen\u001b[39m(handle, ioargs\u001b[38;5;241m.\u001b[39mmode)\n", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'" + ] + } + ], + "source": [ + "print(file_path)\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "print(log)\n", + "print(\"lenght is\", len(log))\n", + "print(log_other_model)\n", + "print(\"lenght is\", len(log_other_model))\n", + "startAct = getStartActivities(log)\n", + "endAct = getEndActivities(log)\n", + "timestamps = getAttributeFromLog(log, \"timestamp\")\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Install graphviz, if not done already\n", + "Open a terminal window and intall graphviz with:\n", + "`sudo apt install graphviz`" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "#Another way to discover the tree\n", + "# # create the process tree\n", + "#tree = inductive_miner.apply_tree(log)\n", + "\n", + "# viz\n", + "#gviz = pt_visualizer.apply(tree)\n", + "#pt_visualizer.view(gviz)# convert the process tree to a petri net\n", + "\n", + "start_time = time.perf_counter()\n", + "process_tree = pm4py.discover_process_tree_inductive(log)\n", + "print(process_tree)\n", + "end_time = time.perf_counter()\n", + "pm4py.view_process_tree(process_tree)\n", + "\n", + "parameters = {pn_visualizer.Variants.FREQUENCY.value.Parameters.FORMAT: \"png\"}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "dfg, start_activities, end_activities = pm4py.discover_dfg(log)\n", + "pm4py.view_dfg(dfg, start_activities, end_activities)\n", + "\n", + "map = pm4py.discover_heuristics_net(log)\n", + "print(map)\n", + "pm4py.view_heuristics_net(map)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "# heuristics miner\n", + "net, im, fm = heuristics_miner.apply(log)\n", + "\n", + "# viz\n", + "gviz = pn_visualizer.apply(net, im, fm)\n", + "pn_visualizer.view(gviz)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + }, + "vscode": { + "interpreter": { + "hash": "994fd3bf715f7d00910c6929cedf6117267fec036ef9d2716f71f2b8e3dc9b3e" + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb new file mode 100644 index 0000000000..c6c5ef6fd5 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb @@ -0,0 +1,186 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-85cfe7fb-4cec-4b85-affb-ff95bb09e084.json']\n", + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures\n", + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" + ] + } + ], + "source": [ + "import os\n", + "# uncomment if problems with dependencies\n", + "# %pip install pm4py\n", + "# %pip install pandas\n", + "import pm4py\n", + "import datetime as dt\n", + "import time\n", + "import pandas\n", + "\n", + "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", + "\n", + "path = os.getcwd()\n", + "parent = os.path.dirname(path)\n", + "\n", + "# Change path if necessary \n", + "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", + "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", + "\n", + "import sys\n", + "\n", + "if __name__ == '__main__':\n", + " print(sys.argv)\n", + " print(parent)\n", + " print(file_path)\n", + "\n", + "\n", + "\n", + "# import sys\n", + "\n", + "# accept command line arguments\n", + "# inputArg1 = sys.argv[1]\n", + "\n", + "#print('inputArg1: ',inputArg1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "def import_csv_original(file_path):\n", + " event_log = pandas.read_csv(file_path, sep=';')\n", + " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", + " return event_log\n", + "\n", + "def getStartActivities(event_log):\n", + " s = pm4py.get_start_activities(event_log)\n", + " print(\"Start activities: {}\\n\".format(s))\n", + " return s\n", + "def getEndActivities(event_log):\n", + " e = pm4py.get_end_activities(event_log)\n", + " print(\"End activities: {}\\n\".format(e))\n", + " return (e)\n", + "\n", + "def getAttributeFromLog(event_log, attr):\n", + " entries = pm4py.get_event_attribute_values(event_log,attr)\n", + " print(\"Entries: {}\\n\".format(entries))\n", + " return entries\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" + ] + } + ], + "source": [ + "\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "\n", + "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", + "\n", + "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", + "\n", + "print(aligned_traces)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABe0AAACUCAIAAACBVZWTAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdeTxU/fcA8DtjX4ZESlS28JRIVKSNyNIuS7YopZ1SoUeLlKJF2hSpLNlVUp42WcrWRosKxVMioZKyLzO/P+7vO9/5WsaY7c7ovP/olTt3OTPjuHPPfO754EgkEgIAAAAAAAAAAAAAOB4e6wAAAAAAAAAAAAAAAE2gjgMAAAAAAAAAAADAHaCOAwAAAAAAAAAAAMAdeLEOAAAAAAAAAAAAwEZVVVVeXh7WUbCKtbU11iEA5sNBn2MAAAAAAAAAAH+mxMREGxsbrKNgFbjeH5LgvioAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO7Ay57DdHR0fPjwobS0tKKior6+vqmpqbm5ubm5WUJCQkREREREZPTo0SoqKioqKmPGjGFPSABwNcgpAKj4+fNnWVlZSUnJp0+fmpubGxoampqaEAQRFRVFc0ReXl5VVVVFRWXYsGFYBwsAN/n8+XNpaWlZWVlNTQ163mloaEDPO6KioiNGjFBUVFRTU1NSUuLn58c6WAAAAGBoYmEdp7Gx8eHDh5mZmZmZmcXFxV1dXTgcTlZWduTIkeTzfUVFBXr9WVVV1dDQgCAIgUDQ09MzMDAwMDDQ0dHh4eFhXYQAcBfIKQCo+Pfff9HsyMrKqqqqQhBEQEBAXl6eXLtBEKSurg6t6Xz8+LG9vR1BEDk5ublz56IJoqCggPFzAIDzdHV1PX/+HE2uvLw8tCQ6fPhwWVlZ9LwjISFRW1uL1nRqa2urq6tJJBIvL6+6urqBgYGhoeHs2bPFxMSwfh4AAADA0IEjkUjM3WNHR0daWlpkZOTt27e7uromTZpkYGAwY8YMdGiAkJBQfxvW19eXlpa+efPm4cOHGRkZX79+HTlypK2t7cqVK7W0tJgbJABcBHIKACpqa2vj4uIiIyNfvHghLCysr68/d+7cKVOmqKiojBs3rr/CZXd396dPn8rKygoLCzMzM3Nzc1tbW6dMmbJy5UpbW1tpaWk2PwsAOFBhYWFUVFRcXFxdXZ2MjAxakZkwYYKampqUlFR/W7W2tpaVlZWWlubl5WVmZr5+/ZqPj8/c3NzJycnc3BwG6QAAOFBiYqKNjQ3WUbAK06/3AUcgMU9dXd3ff/89fPhwPB5vbGwcFRVVX19P997evHmzf//+8ePHIwiiqal55cqVzs5OJkYLAOeDnAKAiqdPn1pYWPDy8oqLi69ZsyYjI6O9vZ2+XbW1tT148GD16tViYmK8vLzLly9//vw5c6MFgFt0dnZGR0draGggCKKionLgwIF3797Rvbe6urrIyMh58+bh8XhJSUkfHx9GTmQAAMAKCQkJGF+TsxLWry5gCeaMx/n69WtAQMCFCxdERETc3NxWrVolKyvL+G5R+fn5ISEh8fHx48aN8/b2dnZ25uVlU1sfALACOQUAFXl5eX5+fnfv3tXR0fHw8Fi6dCmVgWmD0trampKSEhQU9OzZM1NT07179+rp6TFlzwBwvq6urkuXLgUGBlZWVtra2m7YsIGJv/9VVVURERGnTp1qaWlxdXX18vIaOXIks3YOAAA0IpFI3759+/79+7dv39D/1NXVvX379sqVK1iHxipMud4HnIbROk53d/fZs2f37t0rKiq6c+fOtWvXCgsLMys4ShUVFQEBAZGRkRMmTAgJCYEP1mCogpwCgIra2lpPT8/o6OhZs2b9/fffJiYmLDrQnTt3/P39c3NznZycAgMD4U4rMOTl5uZu3LixpKRk1apVnp6eioqKrDhKS0tLWFjYsWPHmpubDxw4sGHDBujaBgBgll+/ftXV1ZHLNOi/vZdQXv8SCARpaWlxcfHCwkIMI2cpqOMMSQzVcYqKilxcXN68ebNjxw4fHx8WXW1SKi0t3bx584MHD1xcXIKCgggEAquPCAA7QU4BQEVYWJiXlxeBQAgODrawsGDDEa9evbp169bm5uYjR46sWbOGDUcEgP1+/fq1bdu2y5cvGxsbnzlzBr39lqWam5sPHjwYFBSkrq5+8eLFyZMns/qIAACu1tra2kChpqbmy5cvPZZUVVV1dHSQNxEUFJSgMHr0aBkZmR5LZGVlBQQEEOiPA7gQ/XWcs2fPbt++XU9P7/z586qqqswNi7qEhAR3d3cxMbGEhARo1wqGDMgpAPrT2Ni4Zs2a69eve3h47Nu3D518ij2ampp8fX1PnDhhZWUVFhYG0+6AIaawsNDGxqapqenUqVNWVlbsPHRJScm6deuePHkSFBS0YcMGdh4aAMA5GhoaehdlKJfU1NSgc7CSSUhI9C7K9F5CewxQxwFch546TlNTk7Ozc0pKyp49e/bs2YPH41kRGXU1NTX29vb5+fnBwcHr1q1jfwAAMBHkFABUFBUVWVlZNTc3x8TEGBoaYhJDenq6g4MDgUBITk7W1NTEJAYAmC4kJMTDw2PmzJlXrlwZNWoU+wPo7u728/M7ePCgpaXlpUuX2FmiBQCwGjqIpndRhvLH2tpaIpFI3gQdRNNnUYa8ZNSoUUz/qAx1HMB1Bl3Hqa+vNzc3r6ysjI+PNzAwYFFYtOju7t6/f//Bgwe9vb39/f1xOByGwQBAN8gpAKjIyMhYunSpjo5OXFwctl1Ra2pqbG1ti4qKUlJSsE1VABhHIpG8vb2PHj26b9++3bt3Y9uk5sGDB7a2tgoKCmlpaVRmNAcAcAjyXU593t+ELqmvr+/q6iJvQnmXU48yDflHaWlprGbegDoO4DqDq+N8+vTJxMSkvb397t27KioqrAuLdtHR0S4uLra2tuHh4Xx8fFiHA8DgQE4BQEVKSoqtra25uXlMTIygoCDW4SAdHR1OTk7Xrl2Ljo62trbGOhwA6NTd3b1hw4bLly+HhoauXr0a63AQBEEqKipMTExIJNLdu3eVlJSwDgeAPxSr29BwLKjjAK4ziJJndXX1nDlzhg0blpWVhcng2z45OjoOHz7c2tq6u7s7OjoaRhAALgI5BQAVycnJK1as2LRp04kTJzC52bA3fn7+mJgYNzc3Ozs7Hh6e5cuXYx0RAINGJBKdnJxSUlJSU1PNzMywDuf/KSoqPnz40NTUdN68ebm5ubKyslhHBMBQw3gbGkVFRQbb0AAAmIXW8TiNjY1z5szp6up6+PDh8OHDWR3WYGVkZJibm7u4uJw9exbrWAaWn58fFBSEdRRDWVJSEtYhDAxyiokgp2inp6fn4eGBdRQDy8zMNDc3X716NWf+Bm7bti0kJOTWrVvGxsZYxzKwoKCg/Px8rKMY+jw8PPT09LCOYmDbt28/c+ZMamqqiYkJ1rH09P3799mzZ+NwOM48MwLAmbioDQ3HgvE4gOvQNB6nra3N3Ny8oaEhNzeXM0+rhoaGERER9vb28vLyO3fuxDqcAXz+/Dk5OdnS0hLrQIagqqqqgoICrKMYGOQUc0FO0YgrsgNBkBcvXixdunTZsmWnT5/GOpa+HT9+vKamxtLS8uHDh5zf9jg/P7+goEBXVxfrQIay5ORkKysrzq/jBAYGBgcHx8fHc2ARB0EQSUnJO3fu6OvrL168+MGDBxx+IwYArMZ4GxpFRUWOakMDAGAWmnLYw8PjzZs3BQUFcnJyrA6IbitWrPjy5Yunp6eOjg5XdKDkijEjXIdbqumQU6wAOTUgNk8qTJ/GxkZLS0sdHZ2IiAiO/SYQj8dHRUXNnz/fysrq2bNnnD8Zua6uLiQIS3HFLagPHjz4+++/T5w4wcl/CsaMGXPnzh09PT103BDW4QDAEoy3oVFUVNTX1+e6NjQAAGYZuI6TlJR07ty52NhYNTU1NgTECA8Pj7y8PHQ+ERkZGazDAaBvkFMAULFx48ampqYrV67w8/NjHQs1/Pz8CQkJWlpaa9euTUhIwDocAAZQV1fn6Oi4fPlyNzc3rGMZwIQJE8LDw62trfX19W1tbbEOB4DBgTY0AAA2GKCO8+nTpzVr1mzevJlbzqPh4eHa2tqrV6++ffs21rEA0AfIKQCoCAsLS0hIuHfvHlfUDUeOHBkVFWViYnLx4kUXFxeswwGgXyQSycHBQUREJDw8HOtYaGJlZbV+/foNGzbo6+uPHTsW63AAQBBmtKEh3+X0x7ahAQAwywB1HHd399GjRx87dow90TBu2LBh0dHRs2bNio+PX7FiBdbhANAT5BQA/amtrfX29t6+fbuhoSHWsdDKyMho69atnp6eixcvHjFiBNbhANC32NjYBw8e5OXlcf49gGQnTpzIyMjYtm3b1atXsY4FDHHQhgYAwHWo/XG5c+fOjRs30tPTuetOyxkzZqxatWrbtm1mZmbi4uJYhwPAf0FOAUCFp6enqKjonj17sA5kcHx9fRMSEry9vS9evIh1LAD04devX56enq6urtOnT8c6lkEQFBQ8c+bM/Pnz09LSFixYgHU4gCtBGxoAwFDVbx2no6Nj48aNtra28+bNY2dATBEQEJCSkuLv73/kyBGsYwHg/0FOAUBFXl5edHR0cnKyqKgo1rEMDoFACAoKWrFiBdddJ4M/hK+vb2dnp7+/P9aBDJqxsbGVldXWrVvnz5/Px8eHdTiAs0AbGsAsHR0dNTU1WEcBwOD0W8eJjo6urq4ODAxk1pF+//6dkZHx/Pnz4uLi79+///r1S1hYWEJCYvz48dra2nPnzmXixD1SUlK7d+/evXv3zp07YaA74BBMzyl2gpwCrObn5zdr1iwLCwusA6GHtbX1yZMn/fz80tLSsI4FgP9RW1t7/vz5wMDA4cOHYx0LPY4cOaKiohITE+Ps7Ix1LIBNoA0NYJ329vaKiooP/1FSUlJaWlpTU0P56wQAV+i7jtPd3R0YGOjk5DRmzBjGj/Hw4cNTp06lpaW1tbX1tw4Oh9PX11+7dq29vT0PDw/jB3V1dT18+HBwcDA3fgEFhh7m5hQmIKcA6xQVFd27d+/OnTtYB0I/Hx+fBQsWPH/+XFtbG+tYAPivEydOiImJrVmzButA6CQvL+/g4ODv7+/o6MiUz4cAQ9CGBrATkUh88+YNWq8pLy8vKSkpKyv7+vUriURCEERAQACHw5EvTseNG/fp0ydM4wVgcPr+q5eUlFRRUfHPP/8wuPeXL19u3bo1KytrwDVJJFJOTk5OTs6BAwcCAwMZ/0pWWFh427ZtAQEBnp6e0NEDYI5ZOYUhyCnAOv7+/jo6OvPnz8c6EPqZmZlNmTIlMDAwMTER61gA+H8/f/48d+6cj4+PkJAQ1rHQz9vbOyoq6urVq9bW1ljHAvoGbWgAB8LhcC4uLk+fPuXn5yeRSJ2dnZSPtre3o//h4+NTUFDw9PTk3no3+DP1Xce5cOHCkiVLlJWV6d4vkUj09/c/cOBAj5wZ0IcPH5YvX25tbX3+/HkJCQm6A0AQZMOGDX5+fomJiWvXrmVkPwAwjvGc4gSQU4AVamtrb9y4ER0djXUgDMHhcNu3b3d2dq6vr4d7DwGHSEhI6OrqWr9+PdaBMERFRWXRokUXLlyAOg4moA0N4FI4HO7gwYMmJiaUBcQeeHl5ZWRkMjMzc3Jy2BkbAIzro45TVVWVlZV1/fp1unfa2tpqZ2eXkpJC9x4SExNfvnx5+/ZtBQUFunciLi6+ZMmS6OhouOYE2GI8pzgE5BRghZiYGGFh4SVLlmAdCKOWLVu2cePG+Pj4LVu2YB0LAAiCIJGRkRYWFlw013h/HB0draysqqqqmNhLEUAbGjDkzZ8/X19f//Hjx5Q365Hx8vIOHz48KysLqoqAG/VRx4mMjJSQkDA1NaVvj+3t7WZmZtnZ2YwFhpSWls6YMSMvL4+RUo6jo+PChQsrKioUFRUZjAcAujGYUxwFcgowXXR0tI2NDVff94ESEhJatmxZdHQ01HEAJ/jw4UNBQYGvry/WgTDBwoULJSQkYmNjPT09sY6FC0AbGgDIAgICZs2a1Xs5Ly8vgUDIzMxk5EoTAAz18ef4+vXr1tbW/Pz89O1x1apVjBdxUF+/fjU3N8/Ly6P7Bqv58+dLSkqmpKR4eHgwJSQA6MBgTnEUyCnAXBUVFS9evAgKCsI6EOaws7ObP39+ZWXl2LFjsY4F/OmuXbs2YsSIefPmYR0IE/Dz81tYWFy7du0Pr+NAGxoABoVIJH769Gn06NH19fWUvT54eHgEBATu378/YcIEDMMDgBE96zg/f/588eKFj48PfbsLDQ2Ni4tjOKr/Kikp2bRpU2xsLH2b8/Lyzp07NzMzE645AVYYzClOAzkFmCszM1NYWHjGjBlYB8Ics2bNEhQUzMzMdHJywjoW8KfLyMiYN2/ekJnjycjI6PLly79+/aLlNrGqqipBQUEpKSk2BMYs0IYGACYikUjXr1/fu3dvSUmJqakp5UwjeDyel5f39u3blPNLWltbQwcuwF161nGysrJIJNLs2bPp2Nfnz5937tzJjKj+R1xcnI2NDd2tEwwNDb28vDo7O/n4+JgbGAC0YCSnOBPkFGCizMxMfX39IfNVsKCgoJ6eHtRxAOY6Oztzc3OHzEg3BEHmzZtHJBIfPny4cOFCKqs9efLk+PHj165d++eff4yNjdkWHhXQhgYANktPT9+1a9fz588XLFgQGxuroaGxcOHCe/fudXZ24nA4PB6fkpLS581WAHCRnnWchw8fampqSkpK0rEvPz+/379/MyOqnry9vRctWkTf6crQ0PD379+FhYXTp09nemBDRnp6urGx8evXr9XV1Wnfqrq6euzYsa6urufOneO02DgHIznFmbg0p7y9vQMDAxEEuX37NiO9imjfDyQILbKzszdu3Ih1FMxkaGh44cIFrKOg35s3b44cOZKRkVFXVzdixAglJSVTU9Ply5erqKiw4nBw9mGRZ8+eNTU1zZ07F+tAmEZSUnLSpElZWVl91nG6u7uvXbt2/Pjxx48f8/HxdXd3f/v2jdUhQRsaADhNbm7u7t27s7KyjIyMnj17NmXKFHT5oUOH0CE5OBwuOTl5aPSsBH+4nueJ169fa2lp0bGjz58/R0ZGMiOkPpSUlCQmJq5YsYKObVVUVERFRd+8ecNd15xcISoqikgkxsfHnzhxQlBQEOtwOBTdOcWxuDSnAgICnJ2d//rrL7btBxJkQD9//qyqqhpiCaKlpVVZWUnj3R+cJj4+3tnZ2d3d/eHDh7Kysg0NDVlZWTt37ty/f39bWxvW0f0XJNeAiouLCQSCsrIy1oEw0+TJk4uLi3ss/P3796VLl44ePfrlyxf0Cz90uCgjdRxoQwMA1ykoKPD3979165a+vn52dnaPgfAaGhqWlpbJyclRUVFDYH5MAJDedZzS0lL6hqFGRkZSto9iuvDwcPrqODgcTllZubS0lOkh9dDY2JiYmLh8+fLhw4ez+lgcIiIiwsrKKikp6fr167a2tliHwz5dXV2hoaFWVlbS0tIDrkx3TnEstuUUgiBRUVHTpk1TU1Njw7GY7o9NkKKios+fP5uamg7Y2xv9LVJVVWVLXGyCPp2ysjIdHR2WHujhw4ft7e2GhobMaoBSXFzs7Ozs4eFx6NAhdMnIkSNtbGwmTpw4bdo0phyCWf7Y5Lp58+aIESN0dXUHXLO0tFRFRQWHw7EhKrZRVVWlnEmjoqIiLCzs7NmzbW1t6JiX7u5u9CE8Ht9fHQfa0AAwxBQXF/v5+SUnJ+vq6j548MDQ0LDP1Q4cOGBkZGRvb8/m8ABgFRKF5uZm9I5B0uBpaGiwNE4eHp6vX7/SERiJRELb69C3Le2+fPmCIAgvL6+5uXlsbGxzc3N/ayYkJPR45ftz586d6dOnCwoKysnJLV++vKCggEQinT59Gn1NTp8+vX79enQyLxsbG3STmzdvamtrCwgISEtLr1u3rrGxEV1eX1+/Y8cOJSUlAQEBTU1NynfZy8uL8qUeN24c9V2hcnJyNDQ0ysvLEQQxNjbuEfmHDx8WL14sKSkpKiq6ZMmS/Px86sv7O1x/sTH+2jIC/V6ah4dn3rx5ERERPV4ZSozkFCdjT06RSCS0BZ26uvrRo0crKyv7W43G9/3du3cIgty+fZu8hJxiw4cPd3Bw+PLlC+X6fSZgj/1Q3tYRFxdH3pYzE8TS0tLS0nLAF4pBV65cQRCEQCC4uLhkZGR0d3f3t2ZkZKSAgEBXVxerQ2Knrq4uAQGBK1eusPpA6P19kpKSbm5u+fn5RCKxvzVpfN9tbW35+Ph+/PjR3wpw9qECQZCEhATq6zBu7dq1CILIycn5+PgUFxdTWXPhwoV2dnasjofNrl69isfjW1panj17Zmdnx8PD09/9R3x8fLNnz/bw8HByclqwYIGurq6SklKPIXI4HE5KSkpNTU1fX3/JkiUuLi7e3t7Hjh2LiIi4efNmfn5+WVkZlfM7AABzb9++dXR0xOPxGhoaiYmJWIcDhpT29vbi4uKrV68eO3Zs9+7d27Ztc3V1tbKycnZ23rRpk5eXV0BAQGRkZEFBQUNDAyYR/s+VD3px8vLly8HuhQ03ITPyCWnXrl2ampr0bUs7tI6DIAgPDw8OhxMQEFixYsXNmzc7Ojp6rEnjNefNmzfxePzu3bu/fftWXV1tZ2cnIiKCPoT2IZKXl09MTGxqajp9+jT6STolJQWHw+3Zs+fHjx8vXrxQU1MzNDREP9y7u7u7u7t/+/bt9+/fV65cERAQoPwIeP/+fQRBXr9+TV5CZVeoNWvWHDlyhEQi6enp4fH4HtfYmpqaNjY2tbW1DQ0N7u7u5Mj7W07lcL1jo4KddRwEQfB4PB6P5+PjW7Zs2dWrV1tbW3usSXdOcTj25BSJRELvuMHhcLy8vDgcTk9P79y5c9++feuxGn11HDTF/v777/r6+nfv3k2dOlVZWfnXr1+Uj/aZgJT7aWtrW7Ro0dmzZ3scizMThG11HHQUANoJW0pKatu2bU+ePOm9pp+fn6qqKqvjYb/x48cfPHiQ1UcJDAxEX2H0X1lZ2f6u7Wl83yUkJLS0tKivA2ef/jDyKYV2a9euRYdfoW+6mpra4cOHP3782HvNSZMm+fj4sDoeNnvy5AnynyFv1Bvt43A4GRmZ6dOnL1iwYOXKlR4eHv7+/uHh4devX3/06NHbt2/r6uqolJgBABzu48ePrq6uPDw8EyZMSExMpPJNBgC0+/fffy9duuTo6KikpISebfF4vJyc3KRJk3R1dY2MjKysrMzMzGbPnq2tra2oqEi+VVZaWtrU1DQwMPDJkyds+3ryf658Hj9+jCBInx8IqLt79y4zCjUD8PLyou9JBgQEKCgo0Lct7ch1HDL0Q4aoqKiDg0Nqair5TaXxmlNVVXXSpEnkH3///j18+HDy/xEEWbNmTY9NVFRU1NXVyT/evHkTQZAHDx703vmiRYvWrVtH/rH3p1Xqu2pubh42bFhVVRWJRDp79iyCIJQXLa2trQjFJ9rOzk5paWkqy6kfjpPrOGRolUFYWBh9r8nFO7pzisOxJ6dI/6njkOFwOB4eHjweb2BgEBkZSa650FfHUVVVpfytKyoqQhAkICCA/Gh/CUjeT0tLi6mp6YULF3ociGMThG11nB5t6dE/hqNHj/by8nr37h15zR07dkydOpXV8bCftra2p6cnq48SGBjYo9cGeiObsrLyvn373r9/T16Tlve9sbERQRAzMzPqq8HZpz8Iu+o4PUagoMmloaERHBxcU1NDXnPcuHFotWvIaG5uXr16Nfqs0S9R+vu4iJo1axbWIQMAmK+ystLNzU1AQEBBQSE0NHSIDekFmHj9+vXOnTsVFBQQBBESEpo3b97+/fsTExNfvnzZ+0t6St3d3RUVFXfu3AkODra1tR01ahSCIOLi4itWrEhLS+vs7GRp2P9zFkQ/nxEIBOqnxt4+fPgw2E3oQPdRCAQCiybSog5tGNTU1JSYmLh48WIZGRl3d/ecnBxatq2qqiotLaXs0SUqKvr9+3fKdXrcy1ZVVVVWVkY5OQXahvbBgwe99z98+PCysjIqR6e+q6tXr06ZMkVWVhZBEBsbGz4+voiICPLKgoKCU6dO3bVrV1JSUmtrKy8vb21tLZXlg4qcM6FnkZaWlvj4+MWLF48YMWLdunU5OTm/fv1C6MopDodVTqF/MdGpZ1etWiUpKblgwYKkpCTK2UBohKbYnDlzyEsmT54sJiaWnp6O0JaAzc3NCxYsEBcXX7NmTY+dQ4L0gP4x/PLlS1BQ0F9//aWiouLr61tRUfH79++hlx0IdgmCdl398OHDoUOHxo8fr6mpefLkya9fv9K+BxrbqcDZh3OgyfX69evt27fLysrq6emFhYX9+vVr6CWXsLAwei9hTEzMuXPnli5dKiwsjCAIHx9fn7+3dXV17A4RAMBK9fX13t7eKioqKSkpp06dKisrQ4fkYB0X4FZNTU2nTp3S1taeNGlSUlKSra1tVlZWQ0NDenr63r17raysNDQ0qM+lgMfjFRQUTExM3N3dY2Nja2pqiouLDxw4UFVVtXDhwjFjxnh4eLx//55F8f/Ptzro505RUdHB7qVHQzgWofsoBAKhsbHR2tqaufH0QGUuD/SzdX19/fnz50+dOoU2xy0rK6MyjSt6qxr1lslCQkK9Nzlz5syZM2col1dWViII8vbt2927d+fl5dXV1ZFIJARBJk+eTI44Z9AAACAASURBVP3o/e0KQZDLly87Ojqi/5eUlDQ1Nb158+ajR49mzZqFLrx79+7Bgwe3bt3q4OBgZGS0d+9e9MNxn8sHPNxgsfq9JhKJ/T2EFhQaGxsvX74cFhaGvoOfPn0aYt2vCQTCz58/Wf06IwjSo3RChjazJBKJ9+7du337NjoqITMzc86cOQN+SYvqM8UkJSXR5bQk4JYtWzQ1NZOTkx8/ftxj6i5OTpCSkhJWv3HofS59PoRec3748MHf39/Pz09SUlJWVvb79++SkpIsDYnN0IIgq1/n0tJS6q8zem3v4eEhJSU1btw46lNoiYmJSUhI1NTU0HJoOPv06cSJE8nJyXRsSLsXL170uRytcSMI8uTJkydPnmzZsqWrq6ukpKStrW0ozeeFVqZERETs7OxcXV07Ojry8/MfPHhw586dwsLC7u5ufn5+8hxS/Z0+AABc58ePH6dOnQoKChISEvL19XV3dx9Kf9kA+/348eP06dOnTp3q6OiwtrYOCgqaPXs2U2YGmDhx4sSJE7ds2VJRUXHlypWoqKhTp05ZW1vv2rVr0qRJjO+fEk0XPANiz3SkLS0tbDgKh5CSkkIQ5MePH4PdpPdg/ujo6M7OTiMjo8+fP2dlZaFDvJycnPq7AKC+KwRBPn36lJWVtXr1atx/oAPRKb8UlZCQOH78eHV1dXZ2dltb2+zZs9GelH0up344AFihzxT7/v07upyWBNy9e3dqaqqmpubKlSsp/zpBggAuZW5uXlxc/PPnz8FuCGcfgAl+fv45c+b4+fk9efLkx48fqamp69evHz9+PPooHb/JAHCd7u7uT58+PX/+PDs7Oy0tLSkp6f79+/n5+a9evaqvr8c6OiZoamoKDAxUUlI6c+aMj4/Px48fvby8oIgD6NbS0rJ37155eflTp065ubl9+vTp4sWLc+bMoVLEqa+vf/XqVV5e3v3795OSktLS0rKzs58/f15ZWUmeJLE3RUXFvXv3lpWVxcTEvHnzRlNTc9myZegHEqah/OCC3lDw/fv3nndfDQQd6cpq8+fPH2xgqLNnz0pJSdG3Le1698chQ3sWjBgxws3N7dGjR7T3x6G8ab+6ulpAQADt8IqOnOrdlUNNTc3AwIByiYaGRnx8fElJCYIgR48eJS9fsWIFZZ9adAw5ZReA/nZFIpF8fX3t7e0pH2pqapKSkhIVFW1qaiKRSDU1NZSRo7+y8fHx/S2nfrjesVGBVX8cMrRzgbi4uKur66NHj9D2CnTkFIdjT06RevXHIUO75PDx8ZmbmycmJsbExNDyvvfujzNx4kTyo7374/SXgJT7efPmjaCg4KZNm8hrcnKCYNUfhwzt5TF+/Ph9+/aVl5evW7fO0NCQ1fGw39y5czds2MDqo/Tuj9PjdSb3TKHxfX/79q2goGDv5rhBQUFiYmLo3zE4+/QHwag/DorcO0xXVzc0NLSxsXH48OHnzp1jdTxshl6XZmRkUF/ty5cv0dHRzs7OLS0t7AkMALbp7OzMzc09ePCghYXFxIkT+zsLoIYPH66rq7tq1aoLFy58+PAB69gHp6mpKTg4WFpamkAgeHl5/fz5E+uIANe7ceOGvLy8uLh4YGAguclmb+/fvw8LC1u1atX06dPRqTn7IyAgoK6uvnz5cn9//7y8vP4a4hCJxNTU1EmTJgkKCu7bt496zx3aMafPcXh4OJVnyCy2trb0PcmAgABFRUX6tqUd0/scU06X8/HjRxMTE1dXV/Sh/j5Jp6Wl8fDwHD58uL6+vr6+ftu2bRMmTGhtbW1raxsxYoSGhsabN29aW1vv3r0rLi5O+Un67du3CIIkJSXV19ePGjXq6dOn/e2KSCQqKSm9ffu2x6H9/f0RBImIiCCRSOjI/KCgoMbGxoaGBk9PT0FBwfLy8v6WU4m8z9iovGjQ55g92JNTJBb3OSbPV/Xt27eSkpJp06YpKyuTZ5mlkoA99nPixAkcDnfv3j0SicThCQJ9jtlDW1ub7sb8tGNun2NUcnKykJCQt7f3v//+29HR8fHjx4MHDwoKCkZHR6MrwNmnPwj0OWa9iooKBEGovxEADEnNzc1XrlxZuHAh2v5CVlbWysrKx8cnOjo6Ly+vvLy8trYWLWf/+PHj8+fPJSUl6enpZ8+edXNzMzIyEhERQRBk7Nix69evz83NxfrZDKC9vT00NFRGRkZERMTLy+vHjx9YRwS43tevXxcvXozD4ezt7SnPlWREIjEnJ2fdunVjxoxBEERERMTIyMjd3T0kJCQ9Pb2kpOTz58/or2JTU9PXr1/Ly8vz8vKioqJ8fHysrKzQtn0EAmHRokUxMTF9fovQ2dl5/PhxAoGgpKSUlZXF+JNizrzj+fn5A9RgmMHf35++J8ml846TSKTbt29PmzZNQEBg9OjRHh4e6CfLuLg4ypelx5T1d+/e1dXVFRAQGDlypJ2d3efPn9HlT548mTVrlqio6JgxY1xdXS0tLdHNyb/KGzduFBcXFxMT27hxY3+7omydUFRURD6ol5cXebmJiQmJRLp165axsbGkpKSYmNjMmTPJU430t5xK5H3G1h+Yd5w9uHHeccrfUvJX+uQUk5CQsLe3//LlC+UmfSbg0aNHyfvZtGnT7du3yT+OHDmSwxOEA+cdV1FRYXU87KesrMyN846j3rx54+joKCMjw8/PLysra2FhkZOTgz4EZx8qEA6bd1xDQ2PozTuOjppEO0MB8IcoLCx0dnYmEAh8fHyLFy8+f/48HSnQ3t7+6NEjX19ftEMHepLiwNHiHR0dkZGRCgoK/Pz8rq6ufV5vAzBYDx48GDVqlJKSUp/DOb99++bn56ekpIQgiIaGhp+f36NHj3pfvw+opKTk3LlzCxcu5OPjExMTW716NeXHFbKqqqqlS5fy8PD4+fl1d3fT83z+43+ufFpaWvB4/PXr1we7l5aWlj4H+jLXnTt36HuSNjY2S5cupW9b2qF1HF5eXnNz89jY2Obm5v7WZE+t4c/EzjoODw/PvHnzIiIiyCM4eqM7pzgce3KKRCJpa2sjCKKurn706FG0e26fIKdoxLY6DoIgBALBxcUlIyODylkqKipKQEBgiE0a2tXVxc/PHxMTw+oDoXc0S0pKurm55efnE4nE/tZkz/v+h2NbHQdBEDk5uf5qdmSLFi2ys7NjdTxslpycjMfjmTUiHQAOl5OTY25ujsPh0MkH0VbxjCsqKtq2bZukpKSoqOiOHTs4pFbS3d2dmJiorKzMx8fn6upaVVWFdURgKOjq6vL19eXh4bGysup9vfbly5ft27eLioqi3zi+ePGCKQetra0NDg7W1NTE4XALFizocwTcqVOnBAQEjIyMamtr6T5QzyufsWPHBgYG0rEjY2NjlhZxCAQC3WfuyZMns2GI+8+fP8PCwmipbcM1J+uw57Xt7Ow8c+YMjYlHd05xMvbkFIlEioyMpLwNpz+QUzRiz/V8YWHhjRs32tvbB1wTvfGwoqKC1SGxEzrBJBtu/cjOzr537x4tVTCo47ABe+o4qamp+fn5tKy5Y8cObW1tVsfDZocOHVJQUMA6CgBYrry8fMGCBQiC6Ovr//PPP6w4xO/fv48dOyYjIyMkJLR//34My6No6xANDQ08Hm9lZcV1fXwAx2pra7O0tBQUFDx79myPh1pbW/ft2ycoKCgjI3P8+HH0nkTmIhKJaWlpM2bMQBBk0aJFvT/rPnv2TElJSUFBge5Bpj1bUaqqqpaWltJRZ7GxsWGkTDOgxYsX09ecnEQiffjwgcoM38wiLi6+du3aITa9NOgTLy/vpk2b0PnjB0R3TnEstuUUgiArV65UU1Njw4EAE2lpaS1evBjt1UKdqqoqgiBDLEHQp8OGBJk9e7axsTF6lw34QyxatEhXV5eWNVVVVcvKykj9Tw3GjUpLS9HBbuinXqzDQRAEwQGOhPXvBf3a29sPHDigrq7+77//pqen5+TkmJmZseJAoqKi27dvr6io2L9//9GjRzU0NO7evcuKA1GXnp6uo6OzdOlSVVXVd+/eJSYmore3AMCgpqamxYsXp6en3717d+PGjZQP3b59W11d/fjx4wcOHPj33389PDzQBlLMhcPhzM3Nc3Nz79279+HDB3V1dX9//46ODvIK2traT58+lZGR0dPTo69HTc+bodTV1bOysujY0YoVK3bt2sW6Ke7c3Nzo27C0tLSpqUldXZ258QBAI7pzimNBTgFmERcXl5OTKywsNDU1xToWpikqKho7dqyYmBjWgYA/mrq6+u/fvz98+ECeh3sIKCoqampqWrVqVWdnp7i4uLa29tT/GDt2LFZRbd26VU9PD6ujgx7y8/ODg4OxjoJOHz9+XLFixevXrz09PXft2kV9LiqmEBQU3Llzp729vbe3t6mpqaOjY2hoqJCQEKuPiyBITk6Oj4/Pw4cPjYyMnj171t/8pADQ4fv37/Pnz6+pqcnOztbQ0CAvb29v9/T0PHXq1MKFCzMyMthz4jA2Nn758mVISMiePXuuXbuWkJCgrKyMPiQhIXHv3j1LS8v58+enpqYaGBgMas896zhz5sw5efLkt2/fpKSkBrUjERGR7du3e3t7D2orGpmZmU2bNo2+bTMyMggEAvx1AFihO6c4FuQUYKK5c+dmZWX9/fffWAfCNBkZGYM9EwPAdDo6OgQCITMzc8jUcb5//15cXHzjxg1TU9PS0tLnz58/f/48JyfnxIkTHR0dw4YNmzhx4syZM/X19adOnTpq1CgGD9fR0dHa2iouLj7gmnp6etbW1gweDjARl9Zxrl275uLioqio+PLlS/JlHnuMHj06Kipq2bJlq1evfvPmDeV1Jivk5+fv3r07IyPDyMjoyZMnU6dOZd2xwB+oubl5wYIFP378yM3NVVBQIC9H66Rv376Ni4tbsWIFO0Pi4+Nzd3dfunSpjY3NlClTwsLCyAGIiIikpqY6OjouWbIkIyNDR0eH9t32vK9q7ty5OBzu4cOHdITo7u6ODpJnLgEBgaCgILo3z8jImDNnDjqzAwDsx0hOcSbIKcBEBgYGubm57e3tWAfCHG1tbfn5+VDHAZjj5eXV19fPzMzEOhCmefDgAR6Pnz17Ni8v78SJE1euXHny5MmcnJwfP36gE/EoKirevHlz6dKlMjIyo0ePXrRoka+v782bN799+0bH4Z4/f66qqnrlyhUOuYELDG2BgYHLly9ftGhRTk4Om4s4ZMuWLSsqKuLl5Z06dWpOTg4rDvHq1Stra+sZM2a0t7dnZGTcv38fijiAuTo7O62srMrLy+/cuUNZxCkoKNDR0ens7CwsLGRzEYds3Lhx2dnZq1atsrW1pRz7wsfHFx0dPXPmTDMzs0G1GuhZxxEXF9fS0rp//z4dwQkKCl6+fJnp9+r7+fnR3SCjq6srKyvL0NCQuSEBQDtGcooDQU4B5jI0NGxpacnNzcU6EOZ4+PBhW1sbJAjgBIaGhuiEcVgHwhz379/X0dHpfceiiIjIzJkz3d3do6Ki3rx509DQ8OjRIy8vLwkJiaSkpMWLF48YMYJc1klPT29ubqblcM+ePauvr1+5cuWMGTNevXrFgicEAIIgSHd39/r163fv3n3x4sWoqCj23NPUH3l5+aysrLlz586fP//mzZtM3PPbt2+tra0nT55cWVmZmpqak5MDX3gAVnBxccnJyblz5w7l4JLU1FRDQ8M5c+bk5uZiVSdFCQgInDx5MjQ09NixYxs2bCCfoPn4+JKSkhQVFc3MzOrq6mjcW886DoIgFhYWSUlJlG14aKenp3f69Gk6NuyPjY3Nzp076d78zp07P378WLJkCRNDAmCwGMkpTgM5BZhLXl5+ypQpcXFxWAfCHLGxsdOmTRszZgzWgQCAWFhY1NfXp6enYx0IE3R0dFy/ft3CwmLANcXExCjLOl++fElNTXV1dUUQ5Ny5c8bGxuLi4pTDedra2vrcz+PHj/F4PDqliJaWlpubW2NjI5OfFfjjdXd329vbR0VFJScnr169GutwEARBhISEkpOT7e3tLSws4uPjGd/hv//+u27dOg0NjXfv3iUkJOTn5y9atIjx3QLQW0hISGxsbHJysra2NnlhfHz88uXLHR0dExMT6Zs0ielcXV2TkpIiIiIcHBzIpRwREZG0tDQcDufo6EgkEmnZT8/+OAiCrFy5cs+ePbdv36bvUm3Dhg21tbX79++nY9sejI2NIyMjGWk7Hx0dPWvWLEVFRcaDAYBuDOYUR4GcAkzn6Oi4b9++kydPCgsLYx0LQ1paWq5du3bo0CGsAwEAQRBESUlJT08vOjraxMQE61gYdfPmzYaGBltb28FuKCMjs2jRIvJ145cvX57/h5+f348fP/j4+MaPH6+tra2trT1z5szJkyej48rz8vK6uroQBEH/PXfuXGxsbFBQkKOjI1dPhwQ4yqZNm1JTU//555+5c+diHct/8fDwhIWFEQgEJycnCQkJuv+AVFZW+vv7X7p0SVlZ+dKlSw4ODnh8HwMImKKqqiovL49FOwcIgnB+F7BXr17t2LFjz5498+fPJy+8c+fOypUr3d3djx07hmFsvS1btuyff/4xNzffvHnzuXPn0IVSUlIJCQkzZ848fPiwj4/PwHvpczbyefPmLVu2jL6ZzFEhISEM3mC1cuXKjo4ORmJoaGgQEhK6cOECIzthhYSEhP5eecAgjn1tGc8pTgA5xe0sLS0tLS2xjqKn2tpaXl7emJgYrANhVHR0NB8fX11dHdaB9MSZ7/sQgyBIQkIC1lH0dP78eWFh4Z8/f2IdCKOWLFlibGzM3H12d3e/ffs2Kipqy5Ytenp66Pe0oqKis2fP3rJlS+9iDTqhta6u7suXL8k74cz3/U/GRZ8H9uzZw8PDc/XqVawD6RuRSFy1apWwsHBubu5gt62trfXy8hIUFBw3blxoaGhnZycrIqSEvu+AdVj9DjKosbFRWVnZ0NCwu7ubvPDx48eioqIODg5EIhHD2KhITU3l5eXdt28f5cKTJ0/y8vJmZ2cPuHnf70p8fDwPD09ZWRkjkeXm5qqoqNDxiyIuLn7x4kVGDo3y9/cXFxfnwI8vXHSO4Toc+9oyJacwBznF7Tj2en758uXa2tpYR8EQIpGopaVlZWWFdSB94Nj3fShBOPJ6vqGhQUxMLCAgAOtAGFJSUsLDw5OYmMjSo3R0dBQWFoaFha1du5ZKAwVeXl48Hr9lyxb0VMiZ7/ufjFs+D8THx+NwOKZc77BOR0eHmZnZqFGjvn79SuMm37598/LyEhISkpOTCw4ObmtrY2mEZNzyvnMjrnht3dzcpKSkampqyEtqampGjhy5cOFCNpQRGREWFobD4ShPcEQicfHixePHj29tbaW+bd/D2ywtLZWUlAIDA+mowpDNmDHj5cuXAQEBtE+3zM/Pv379+rdv3zJ+j2hzc3NwcPDmzZtpmTMSAFZjSk5hC3IKsI6Pj09hYeHdu3exDoR+aWlpRUVFXl5eWAcCwH8NGzZsw4YNQUFBLS0tWMdCv8OHDysrKy9fvpylR+Hj49PS0lq7di1ayulvTsauri4ikXju3DklJaWwsDCWhgSGqg8fPqxbt27z5s0c0hOnP3x8fAkJCWJiYra2tgN2TP/9+3dgYKCSktLFixf37dtXVlbm7u4uICDAnlDBn+z169chISFHjhwZNWoUuoRIJK5cuZJAIMTExPDy9tFGhnOsXbt2/fr1Li4uZWVl6BIcDnf27NmampojR45Q37bvOg4PD4+Xl1d0dHRlZSUjkQkKCnp5eX38+DE8PNzY2JjK66ipqenv719eXn7u3LnRo0czclBUaGhoS0vL1q1bGd8VAIxjVk5hCHIKsI6WlpaJicnBgwexDoR+hw4dWrBgAWVrPQA4gYeHR1NTU3h4ONaB0Onff/+NjY3dtWsX6zpr9PbkyRPqbSa7urq+f/++bt06BEG497QOMNHe3m5tba2srHz06FGsYxkYeiWcl5d3+PDh/tZpbm4ODAwcN27ckSNHtm7dWl5ejg7JYWec4I9FJBLXrVs3ffp0Z2dn8sIDBw48evQoMTGx9xSHHCgoKEhZWdnOzo48JY6cnNzevXsDAgIqKiqobNjvSdHBwUFOTs7T05Px4ERERFxcXO7du/fr16/8/PwLFy4EBAT4+PgcPHjw7Nmz9+7d+/79+4sXL/7++285OTnGD4cgSH19vb+//6ZNm2gfCgQAqzExp9gPcgqw2t69e3Nzc69evYp1IPRISEh4/Pjx3r17sQ4EgJ6kpaXXr19/4MCB79+/Yx0LPXbu3CkvL29nZ8fOgxYUFPQefYDH4/n4+MjlJH5+frTlf3Z2dm1tLTvDA1ztyJEj79+/T0hI4JaxKjo6OgEBAX5+fm/fvu3xUEdHR1hYmLKy8sGDB11dXcvLy319fbniyhkMGbGxsU+fPg0JCSE3NSsuLvb39z9y5IiWlha2sdFIUFAwISHh3bt3lM2Yt27dqqSkNMC03VTuubpz5w6CIP/88w9zbv9io1WrVsnIyHBgFw8UV9xnyKU4/LWFnGIRDn/fOQeH90lxcnKSk5P7/fs31oEMzq9fv2RlZdesWYN1IP3i8Pd9aEA4uE/Kr1+/Ro8e7erqinUgg4bea5mWlsbOg9bX1yMIQjlZh6Sk5NSpU9GZ9SIjIx89evTlyxd0ZU5+3/9MHP554OPHj8LCwkeOHME6kMHp7u6eNm3arFmzyP1iOzo6QkNDZWVlhYWF3dzcaG+gwyIc/r5zNU5+bbu7uydOnOjk5EReQiQS586dq6OjQ9nwmCv4+/sLCQlVVFSQl1y/fh2Hw7169aq/TajdMGZiYrJs2bJt27YZGBhwyHTrtMjNzY2IiEhISIAuHoDTQE4BQMWRI0fU1NT279/PFaPNyfbt29fW1kZlzDkA2CIQCMeOHXNwcFi1apWuri7W4dCqtbV18+bNlpaW5ubm7DxuXV3dli1bFCkICwuzMwAwhG3atEleXp7rblHH4/GnT5/W09OLi4tbsWLF1atXd+3a9fnzZ2dnZ19fXxkZGawDBH+oa9euvXv3jnK2sujo6EePHj1+/Jidt+IyxY4dO6Kjo7dt25aSkoIuWbJkibq6ekBAQExMTJ+bDND4Jzg4WENDw8PDIyQkhMnBssbPnz8dHR3NzMysrKywjgWAPkBOAdAfaWnpo0ePurq6mpiYGBkZYR0OTe7du3fy5MmLFy/CLYeAk9na2kZGRjo4ODx//pxbKvJbt26tr68/ceIEm487YcKEU6dOsfmg4E+Qm5ublpaWnp7eXxdtTjZt2jRnZ2dvb29fX9+PHz86Ozvv2bNnzJgxWMcF/miBgYHLly+fOHEi+mNnZ+e+fftcXFxobFbY2Njo7u7OygCRSZMmbd++nZY1+fn5g4ODTU1NHz9+PH36dARBcDjcrl27HB0dfX19x48f33uTAeo4Y8eODQ8Pt7KymjlzJptvTqYDiURycXFpaWm5ePEi1rEA0DfIKQCocHFxyczMtLe3LyoqYkrPe5aqra11cnKytLSk7K4HAGeKiorS0tJas2ZNUlIS1rEMLDEx8cKFC8nJyczqnAgA5vz9/fX09ObNm4d1IHTy8fGJioqaN2/e7du3lZSUsA4H/Ony8vKePXt27tw58pKYmJjq6updu3bRuIfW1tbIyEjWRPf/TExMaKzjoCvr6+v7+/unpqaiS6ytrX18fM6fP3/8+PHe6w884sjS0nLz5s0bNmzo3d2K0xw7duzGjRsJCQnkWccA4ECQUwBQERISIi4uTtm3nzO1t7dbWVmJiYlx70xA4I8iLS0dExNz/fp19o9wGazi4uI1a9Zs2bLFwsIC61gAYI6XL1/euXOHq9vhKyoq2traVlZWKigoYB0LAEhUVNTEiRN1dHTQH4lE4tGjRx0cHOTl5TGNiyHe3t63bt0qLCxEf+Th4Vm5cmVMTExXV1fvlWmaUP3YsWMvXrwwNTXNzc3l2BF0sbGx3t7eR48enTNnDtax0ATuUmGFqqoqrEOgCeQUK0BODaigoIDzu2OIiYklJyfPnj175cqVsbGxnHmHM5FIdHR0fPXqVU5ODoFAwDqcgRUUFECCgLlz5wYEBOzYsUNGRmbFihVYh9O3yspKU1NTLS0t7uqT1R81NbXS0tL+HkUnb2VnPAiCPH/+3M3N7cWLFy0tLbKysox8cKqurh47dqyrqyvlV+JMl56ebmxs/Pr1a3V1ddYdhdVOnjypqalpYmKCdSAM2bVr18SJE9PT0+fPn491LOCP1tHRkZyc7O3tTV5y7969d+/ecem0p2QLFiyYNGlSSEgI+TtCJycnPz+/9PR0U1PTHivT9PlYQEDg1q1bkpKS8+bNq6urY3K8zJCRkbF69ert27d7eHhgHcvAxowZY2lpiXUUQ5OcnBxXvLaQU8wFOUUjXV1dPT09rKMYmIaGxo0bN27cuLFp0yasY+mbh4fHjRs3kpOTueK6Qk9Pj/Prd9zO0tKSY4vylHbs2LFt27aVK1ei8ydymu/fv5uamkpISKSkpPDz82MdDnP8+++/6NwiaGWK/CNWA6Ps7e1lZWVra2vfvn3LYAvnqKgoIpEYHx/f1tbGrPCGpNbW1mvXrq1evZo8NTKX+uuvv3R1daOjo7EOBPzpUlNTf/78SdmhIioqSl9fX01NDcOoGIfD4ZydnZOSklpbW9ElCgoKM2bMiIqK6mNt2mfDqqqqGjdunIaGBnm2RQ5x8+ZNYWFhR0dH8mR4AHAFyCkAqEhOTubh4dm8eTNHTR7Z3d29adMmHh6ea9euYR0LAPQgEon29vbCwsK3bt3COpb/UV1draGhIS8vX11djXUstEIGmndcVVWVSh3Hx8eHxQH2hF4bhIaGMmVvKioq6EC/2NhYpuywT/fv30cQ5PXr17SszJlzJF+5coWXlxfzybmZIiQkRERE5NevX1gH8j84830fGjjztXV23a7yqQAAIABJREFUdp4zZw75x8bGRmFh4cH+ZaupqWF1XcbExGSwT622tpaXlzc+Pp68JDg4WEJCoqurq8eagxivLisrm52d3dHRMWPGjLKyMtY94UGJioqysLCwsrK6dOkStxe5wZ8GcgoAKpYvX56cnBweHm5packhX/Z2dHTY2dmFh4fHxsYuW7YM63AAoAcOh4uMjLS3t1+yZAnn9LAvLy+fM2dOZ2dndnY25/c4p11JSUl/zRq2bt168ODBM2fO4HA4HA535syZDRs2DB8+HIfDoXe9ffv2befOncrKyoKCgpMnT75x4wZ5W/JW58+fd3NzExcXl5WV9fPzI69QXl6+ZMkSKSkpAoGwdOnSgoICdCshISEEQdatW4fD4cij9G/duqWjoyMoKDhy5Mj169f/+vWL8hC9A0Pl5uYKCgoGBAQgCHL58uUez67PAKgs7y8Mb29vY2NjBEEmTZqEw+G4tPNFXFycmZnZyJEjsQ6ECWxsbDo7O2/evIl1IOCPlpmZaWhoSP4xJSWFSCRaW1tjGBKzSEtLGxsbx8XFkZcYGho2NDS8ePGi56qDLRHV19dPmzZtxIgR6enpg92Wubq6unx8fHA43O7du2HUAOBekFMAUJGRkSEmJjZ37tyamhpsI6murp41a9awYcOys7OxjQQAxhGJxF27duFwuL179/b+lo/N7t27JyUlpaen9+3bN2wjGSxkoPE4lHqMxyH7/fs3giDy8vKJiYlNTU2nT5+2sbEhkUju7u7u7u7fvn37/fv3lStXBAQEiouLe2yF3oX669evkydPIgiSlZWFPqqpqWljY1NbW9vQ0ODu7i4iIkK51YULF8j7SUlJweFwe/bs+fHjx4sXL9TU1AwNDdHPAP0FhlqzZs2RI0dIJJKenh4ej6+srKR8Uv0F0N9yKmFw+3iczs5OAoFw/vx5rANhmtmzZ69atQrrKP4HB77vQwYHvrYfPnxAEOTRo0fkJY6OjvPmzRvsfjhzPA6JRDpz5gyBQOjs7ER/JBKJI0eORP/eUqLnXWlqarKxscHj8Rie+6urq+fMmSMkJBQeHo5JAAAwEeQUAFS8fPly/PjxI0eOvH//PlYx3L17V1paWlVVlcZrCQC4QmhoqKCgoIGBAVa396LfH+DxeDs7u+bmZkxiYAQT6zhr1qyhvvmiRYvWrVvXY6vVq1ejP3Z1dQkLCx84cID0n5unyIF1dnZKS0tTbkVZx1FRUVFXVyf/iI6zePDgAfXAmpubhw0bVlVVRSKRzp49iyDIwYMHyY/2FwCVwKiEwe11nNzcXARBysrKsA6EaXx9fceOHYt1FP+DA9/3IYMDX9vw8HBhYeH29nbyEjk5Oco/QTTi2DoOOqPx48ePyUtsbGzMzMx6rEbPPCAiIiLx8fFnz549cuSIgYEB++dOjo2NnTx58tevXwsKClxcXNh8dACYDnIKACo0NDSeP39uYGBgYmKyY8eOpqYmdh799+/f27ZtMzMzMzIyevr0KVc0NgaARq6urvn5+dXV1ZMnT46Pj2fz0d+8eTNnzpygoKDz58/HxMQw2HOX22loaFBfYfjw4b1vwZ40aRL6Hx4eHikpKXTmBEFBwalTp+7atQttlsnLy1tbW9vnPquqqsrKyubOnUteMn36dARBHjx4QD2wq1evTpkyRVZWFkEQGxsbPj6+iIgI8qP9BdDfclrC4DSPHz9G61wDyszMlJOTGz9+PKtDYhtDQ8PKysry8nKsAxmcqqoqHAUeHp7hw4fPnDnzyJEj6E18A/L29ka3paVPfHp6Og6HKy4uHlSQ1dXVPDw8GzZsGNRWg0VfbJyjqKhoypQp5F7479+/r6qqMjAwwDYqJvrrr79Gjx6dkZFBXjJ9+vSioqIeq9E/n+v69esLCgpaWlomT57s5eXV3NxM965o9+7dO0NDQ0dHRwsLi2fPng14zgOAi0BOAdAfAoEQFxd34cKFy5cvq6mpJSYmsue4CQkJampq0dHR4eHhMTExXDHFOACDMnny5GfPni1ZssTe3t7IyKikpIQNB21qatq5c6eWllZ7e3tBQcHatWvZcFAOh3auofT27VsLC4tRo0bh8Xi0q1FDQ0OPdURFRcn/5+PjIxKJ6P/v3r27dOnSrVu3Dhs2bMGCBY8fP+7zoN++fUMoWuHgcDhpaWkEQSorK6kEhiDI5cuXHRwc0P9LSkqampp++PDh0aNH5BX6C6DP5bSEwWkCAwNHjhy5du3a58+fU1+zsLBwiM0YOG3aNF5e3sLCQqwDGRw5OTkSieTk5ITezdfR0fH69evVq1efPXtWQ0Pj9evXA+4hICDg3bt3LA0S5oCjRUlJiaqqKvnHwsJCPj4+HR0dDENiOl1dXcq/Laqqql+/fv358yflOvTXcRAE0dTUfPz4cXBwcFhY2Pjx44OCglh35fn+/XsXFxdNTc1fv37l5+efP3+e8tQFwNAAOQUAFatXry4pKZk/f/6KFSv09fX/+ecfFh2IRCKlpaXNmDHD1tbWzMyspKRk1apVLDoWAJgjEAhhYWG5ubk/fvzQ0NBYs2YN2n2AFZqamo4fPz5+/PiLFy+ePHny8ePH8P1Bnzo7O42MjD5//pyVlYV2SXByciKRSDRuLiEhcfz48erq6uzs7La2ttmzZ/c5ekJKSgpBEE9Pzx7D9alPLP3p06esrCx0Fm0UehsU5ZCc/gLoczl9YWCrsbGxtbU1IiJCR0dHQ0MjLCysv7GiJSUl3D4Xcg8CAgLjxo0rLS1l9YHa29vRGh8r8PDwyMrKrl69+unTpwiCmJub0zjAiqUiIiKsrKx+/vx5/fp1rGNhty9fvtC4ZmlpKWUdp6SkREFBgTw8Z2hQVVWlTDH0+b5//55yHYbqOAiC8PDwbNy4sbS01M7Obt++ffLy8n5+fp8/f2Zwt2QkEiknJ8fe3v6vv/7KyckJDQ19/PjxtGnTmLV/ADgN5BQAVIwYMeLSpUv5+fnDhg1buHChtrZ2TExMS0sLs/bf0tISExOjra29aNEiSUnJgoKC8PBw9BoDgKFNV1f36dOn58+fz87OVlNTs7e3z83Npb1wMKDKysr9+/crKCj4+vo6ODiUlpZu2LABj2f0g+hQVVFRUVNTY2Njo6amxsPDgyBIe3s7jdt+/fqVfL+Vrq7uhQsXOjo6nj171ntNOTk5NTU19DqWTFNTE+2I0Z+IiAg7OzvKgktTU5OUlFRiYiL65VN/AfS3nHoYnPlLgt6J09XVhSBIcXHxxo0bpaWlXV1de4xS6e7urqiooLzmHBp6XGSyyI8fP2RkZExNTa9cucK6Iou0tPShQ4eqqqrOnz9PXtjn7Gl9GtQ8a9R3+4fPAefo6KisrHzgwAHqXyQ0NzdXV1dT5lSPss7QoKqq+v79++7ubvRHeXl5AQGBnklHR+ud/tTX1+/evVtKSgqPxxsYGFy6dOnr16/07YpIJL58+XLv3r2KiooIgmhpacXFxWE+nwIAbAY5BQAVhYWFlpaWfHx8BALB2dn53r17ra2t9O2qpaXl7t27Tk5OBAKBj4/PysqqqKiIudECwC26urpiYmImT56MIIiSktK+fftevXpF9ySGNTU1Fy9enDt3Lh6PHzFixN69e7luUioqEOb1OabsPUwikdra2kaMGKGhofHmzZvW1ta7d++Ki4trampS2UpJSWnTpk2k/zTvDAoKamxsbGho8PT0FBQULC8v73OrtLQ0Hh6ew4cP19fX19fXb9u2bcKECejf0j4DIxKJSkpKb9++7fEs/P39EQSJiIigEgCVwKiEgTYNTEpKqq+vHzVq1NOnT6m8yOQKlKCgoISEhIyMzIQJE7S1tfX19RcuXGhlZeXo6Ojm5ubl5bVv377g4ODQ0NDIyMjU1NT79+8/evSouLi4vLy8urqaPFNMf/ocYsPHx4cgyKRJk0JDQ3///k0ikSoqKhAEKSgooL43rrN169bp06ez+ijoAA08Ho/H4/n5+a2srFJSUtra2nqvSXsvXvJ9VZQaGxtxOJyBgQH6I5XZ09D7qm7fvj3gmr37c1NZGfWHzwE3Z84cBEF4eXnR65QTJ0702YAfbRNWWFhIXjJ16lQPDw86jsixfY5JJFJeXh6CIB8/fiQvUVRUPHz4MOU6zH9X2tvbU1JSli9fLiAggMPh1NXV3dzc4uLiCgsLm5qaqGz49evXrKyskJAQGxsb9LbY0aNHb9++/eXLl0wPEgAuAjkFABV1dXUnT55E74sWFBQ0NDQ8cOBAWlra+/fvqXwQ7+zsfP/+fVpamp+fn4GBgaCgIIIg06ZNO3XqVH19PTvjB4BjvXjxwsPDQ0ZGBkGQkSNHrlixIiQkJDs7u7a2lspWTU1NhYWFcXFxW7ZsmThxIpqYlpaWN27c6OjoYFvw7IHQXMcRFxcnf7JH75BCxcXFUX7ob2hoID/05MmTWbNmiYqKjhkzxtXV1dLSEl2npqaGcit7e3vKQbtKSkokEunWrVvGxsaSkpJiYmIzZ85EJ346ffo05bHIs/bevXtXV1dXQEBg5MiRdnZ2nz9/7i8wysseymK3l5dXj+uWPgOgsry/MFAbN24UFxcXExPbuHEj9dcZveZMTEwMDQ0NDg4OCAjw8vJyc3Nbu3atlZXVggUL5s2bp62t/ddff8nLy0tISFC5F4NAIEhLSysqKk6ePFlXV9fIyMjCwsLe3t7V1XXnzp0SEhL9bYj20BUSElq7dm1sbCyCIB8+fKDll4SLHDhwQEVFhdVH6XGjDR8fHw6HExERcXBwSE1NpTzFM1jHIZFIkpKSioqK6P+pzJ7Wo44zqHnWqKxMgjng/lPHIScR+nZPmzYtODi4rq6OvBraNYYyp5SUlA4dOkTHETm5joMOvXnx4gV5iaampo+PD+U6OBLzRsz20NTU9H/t3WtUE2ceBvBJALGScLFyExAEmwTFUu60QZEgakOtFqroFtB1ba3UWql4tGK91SpsCy0uWN3WgqBolbUiIIuXRJAVUG6KIAGhVkFEogYSFhBD9sPsZnMAKWhgAJ/fp+TlJfMMYTjMP+8lJydHIBAIhcLr16+TIw/NzMyMjIwYDAaDwdDR0ZFIJFKpVCaT1dXVNTc3EwShq6vL5XK9vLx4PJ6Dg8PwHEsJQAlcUwB9uHPnjlAoFAgEFy9eJFfHHDNmzKRJk/T09PT09Mjln2QyWXNzs0QiuXv37pMnTwiCsLS09PT05PF4PB7PwsKC4nMAGH7kcnlJSQl5cV2+fJkcma+vr29mZsZgMJhMpr6+fmtrq0wmk0qlTU1N9fX1BEFoaWlNnz6dvLLIYgTV5zEoaDTaL7/8snjxYqqDwH8dP348ICBgQHc3XV1dzc3Nra2tbW1tLS0tMpmsra2N/FeKfCCVStva2sjfcPJBS0vLtWvX+j/TLTY2NiQkhEajPdc5DUd79+6NiIjo/4Imz6ehoWHixIk928eMGfPkyRM9Pb2AgICgoCAul3vixIl+vu/Lly9PSUnpuZjRq6++qq+vX1NTU1dXZ2FhsWbNGmXds6mpycjIaPPmzV9//XVlZaWtrW1mZua8efP67nn+/HkfH5+ysjJym8u+OxMEkZSUlJCQQO7R9vDhQ1NTU0tLS9X1UFxdXR8+fBgREfHOO++orj7ea/uAsvXtOa6p5zNr1qzs7OxujeSsUhqNNnv27KVLl/r5+RUVFc2aNauxsZH8iJogCBMTky1btqxZs2agR7x//z75QcXgmTt3bn92N+uJzJaTkzNjxgyyZcaMGQ4ODnv37lX20VRPxt4wGAw+n8/n8wmC6OzsrK2traysrKmpEYvF5J/C1tZWa2tr8p8AExMTFovFZrPJLQwBoCdcUwB9mDRp0rJly5YtW0YQREtLS1VVlUgkun37tlQqlUgk5D9tpqam+vr6TCbTysqKzWazWCxdXV2qgwMMaxoaGs7Ozs7Ozhs2bCAIor6+XiQSVVVV3b9/n7zXffz4sbGx8ZQpUxgMhqGhobW1NYfDsba2JueYAAxzdDrdwMCgj/E1vRo3blwfX9XS0urs7GQymY6OjtnZ2X5+fqOpiEMQBJPJlEgkJ06cGNSj9NygjUR+DNPc3BwfH//3v//d3Nz8Bdd5JCf62dvbEyq7p8XGxqr26bl7Wv979qdzfHx8UFAQ+ZjcAy4tLe3SpUvK2/isrKxdu3atW7cuMDBw9uzZW7dudXNze1b7gLL1x2C/1wRB9LpSuHKBmHPnzmVlZa1atYo8a21tbWUfqVQ6+j4qIDdIVV0WislkdlslahDrOKq0tLTYbPboW4IIgCq4pgD6oKurS955Uh0EYLQxMzMzMzPj8XhUBwGgjEKh6LktNI1G09TU7OzsNDc39/Pzmz9/vqenZ1paWnZ2tnLgwKgxduzYjo4OykeidXZ2EgRRV1dXV1dHEERGRoavr+9zvM7p06cVCgX5Qaly97TIyMi+v6v/Pf+wM7kHnFAoXLFihWp7QkKCso5D7vUWFRWVn58fHh4+c+bMiooKGxubXtsHlK0/huC97vuDZ7Kg097eTo7Z2bNnz86dO8l5kR0dHaplndGBPCPVvzNjx47t9mcHMywAAAAAAAD6hVyAmXysoaFBo9HodDqXy42MjKyurr57925MTMzs2bO1tLR0dHQIgiC38RpNpFKprq7u8y380X99z9si7+GNjY3Xrl27Y8cOgiCer4jT2NgYHh5uYWGxatUqYiCbuA1on7W+Ow//PeAG+71WKBRTpkx51tE1NDTodLqWlhafzw8PDycIYvPmzcrFrXR0dEbfJUaOTlIdZySTychBOkqo4wAAAAAAAPSLcgIIk8lcvHhxcnLyw4cPL126FBoa2u1etOfkiNFBKpV2u6UcMuR+Rrq6ugEBAefOnWtoaIiJiel1+7C+yeXy+vr6n3/+2cXFhU6nZ2RkKM8oKioqJycnIiJCLBaLxeLPP//86dOnCxYs6PkiffQkF16prKwUi8WmpqaFhYXP6qxQKJKSksjyhJKOjk5oaKhMJktJSSFbbty48d1337W0tEgkkgMHDowdO9bFxaWP9gFlG+hPb2iQS4bT6fSZM2fGx8c/fPgwIyODHDbV94SjUYA8I9W5/y0tLajjAAAAAAAAPA+FQhEWFnbx4sVHjx4lJycvWbJEX1+/156o46iLpqYmnU7X1tZesGDB6dOnxWJxYmLi7Nmz+7/wUF1dHY1GO3ToUGtrK7kd0vTp0w8ePLhmzZrr168rR7UQBMHn88+cOZOammpubm5nZ9fY2JiVlTV27NhNmzbZ2toSBPH2228HBgb20ZMgCFtb25CQkJUrV9rY2Pj5+Tk7O/faWSKR0On0mpqaqVOnlpaWKjNs2rSJrOwsX7583rx5JiYm6enpmZmZ1tbWlpaWly9fzsjIsLa2flb7QLOp7X1SB+VmVS4uLlFRUQ0NDQKBIDg4mPyV63lN6erqjspLjPjfySpbul10Q7Q+DgAAAAAAwEhnbGz8zTff9KeniYkJQRD19fXPMWBkOKuvrydPbWiQE2qCgoJ8fX3JSsRzMDc3V/R706U5c+bMmTOnW2NERERERER/epLi4uLIHcT77txrqp7H8vX17XXi2LPaB5pt+Jg2bdqyZcsCAgJ63UVUT0+PIAiJRKJsMTY2JvdJHE3IM1K9yiQSCXnuSqjjAAAAAAAAqJmhoeH48eNFIpG3tzfVWdRJJBKpDmAZJHQ6fc6cOUuXLn3vvfe63cHC6MPhcDw9PZcuXdp30dPMzExbW/vWrVvu7u5kC5vNFolEQ5Jx6FRWVk6YMOHVV18ln7a2tjY0NJAjrZRQxwEAAAAAAFA/FotVVVVFdQo1E4lE/v7+g30UY2PjrKyswT4KDBP79+/vTzcNDQ0bGxvVa4rNZp8+fXrQclGjqqpKdVfi6upqhULRrcKF9XEAAAAAAADUj8PhlJeXU51CncRi8YMHD0bZTDEYQboNwOFwOA0NDY8ePaIwktqVl5er1nFEIpGmpubkyZNV+6COAwAAAAAAoH5vvfXW5cuXnzx5QnUQtbl48aKGhoabmxvVQeAlxeFwKioqlE/ffPNNDQ2NnJwcCiOpV0dHR35+PpfLVbZUVFRYW1srt1onoY4DAAAAAACgfjwe79///veVK1eoDqI2AoHAycnpWVt0AQw2d3f38vJysVhMPtXX17e3txcKhdSmUqO8vLy2tjYej6dsycnJeeutt7p1Qx0HAAAAAABA/WxsbCZNmiQQCKgOojYCgcDLy4vqFPDy8vT0pNPp2dnZyhYej3fhwgUKI6mXQCCwtra2srIin7a3t+fn5/e86FDHAQAAAAAAGBR8Pj8lJYXqFOpx48YNkUj0rI2uAYaAnp6eo6Oj6gAcPp9fXl5+8+ZNClOpUUpKCp/PVz7Nzc1tb29XHZ5DQh0HAAAAAABgUAQGBpaVlZWWllIdRA0SExMtLS09PDyoDgIvNR6Pp7qXmaenp4WFxeHDhymMpC6FhYU3b94MCgpStpw9e5bFYpmbm3friToOAAAAAADAoOByuSwWKykpieogL6qrq+vo0aNBQUE0Go3qLPBSe//992/dulVQUEA+pdPpgYGBhw4dksvl1AZ7cUlJSa+99pqLiwv5tKur69ixY4sWLerZE3UcAAAAAACAwRIUFHTo0CGZTEZ1kBeSmpp679491ZECAJRwdna2s7NTrY0uW7bs3r176enpFKZ6cVKp9PDhw8uXL1eWSoVC4d27dwMDA3t2Rh0HAAAAAABgsISEhDx58uTAgQNUB3khu3fvXrhwIYvFojoIAPHBBx8cPXq0o6ODfMpms999993du3dTm+oF7du3r7Ozc/Xq1cqWpKQkV1dXDofTs7PmEAYDAAAAAAB4uYwfP37VqlXffvttSEjIK6+8QnWc55GZmVlYWPjDDz9QHQSAIAgiMDDwyy+/TElJ+eCDD8iW8PBwV1fX8+fPz549uz+vYGBgkJaWNpgZCSMjo/53bm9vj4mJ+eSTTwwMDMgWsVickpISGRnZa3+aQqFQQ0YAAAAAgJcJVgkZnobn3U1DQ4ONjc2OHTs2bNhAdZYBk8vlbm5uxsbGGRkZVGfpxfHjxwMCAobn+z7SDeefbWBgYHFx8Y0bN+j0/84xmjt3rkQiycvLU7aMIHv27Nm1a9dvv/2mrP5s2bJl//79t2/fZjAYPftjPA4AAAAAwID98ssvVEeAEcPU1HTjxo3bt29fvHixpaUl1XEG5sCBA9euXSsuLqY6CMD/hYeH29nZnT59euHChWRLdHS0g4PDTz/99NFHH1GbbaDu3r379ddfh4eHK4s4LS0tcXFxGzZs6LWIQ2A8DgAAAAAAwGDr6Oiwt7efPn36iRMnqM4yAA8ePOBwOB999FFERATVWXo3nMeMjHTD/Gfr7+9/586dK1euKEdHrl+/PiEhobKy0tDQkNpsA/Lee++Vl5eXlZVpa2uTLbt27YqKirp9+7aenl6v3zLyRhwBAAAAAACMLNra2jExMf/4xz9G0EguhUKxatUqJpP55ZdfUp0FoLutW7eWlJQcOnRI2bJ9+/Zx48apLhU8/CUnJ6empu7bt09ZxKmrq4uMjFy/fv2zijgE6jgAAAAAAABDYO7cuZ988snKlStFIhHVWfolJiYmLS0tPj5eR0eH6iwA3dnb24eEhISFhYnFYrKFyWQePnz41KlTsbGx1Gbrp1u3bq1evfqzzz5TXZ45NDTUxMQkLCysj29EHQcAAAAAAGAofPvtt2w2e+nSpe3t7VRn+QMFBQUbN27cuXMnj8ejOgtA73bt2qWtra06XszT03Pbtm1hYWGFhYUUBuuPtrY2f39/NputuinVuXPnUlJSYmJixo4d28f3Yn0cAAAAAACAIVJTU+Pq6jpz5syUlBQNDQ2q4/SupqaGy+U6Ojqmp6cP891/yDVcRtBstREkLy/v+++/H+YVgyNHjgQHB//zn//08fEhW7q6uvh8/vXr1//1r39NnjyZ2njP8vTpU39//9zc3MLCQmXIx48fOzg4uLi4/OEqWqjjAAAAAAAADJ2CggJvb29/f/+EhIRhuIF9U1OTh4eHrq6uQCBgMplUx/kDZB2H6hSj2fCvGAQFBZ09e7akpGTixIlki1Qq9fLykkgkubm5JiYm1MbrSaFQfPjhh8nJyefOneNyucpGf3//q1evlpSUTJgwoe9XQB0HAAAAAABgSKWlpfn5+X366adRUVHDqpTT2Ng4b9681tbW3Nxc5S7IAMOZTCZzcXExNja+cOGCcoxbY2Ojh4cHg8HIysoaVr/JCoXi888/j42NPXXqlK+vr7I9Ojp648aNAoFgxowZf/giw3qMHAAAAAAAwOgzf/78pKSkuLi45cuXd3Z2Uh3nv2praz08PFpbW8+ePTusbn0B+sBgMI4dO1ZQUKC6NrCxsfHZs2dlMpmHh8dvv/1GYTxVnZ2dwcHB+/btO3z4sGoR5/z585s2bfrqq6/6U8QhUMcBAAAAAAAYekuWLElLSzt58uTChQubm5upjkNcuXKFy+Xq6+vn5uZaWVlRHQdgAOzt7RMSEvbu3au6ZvDkyZNzc3OZTCaXyx0Oyx5LJJL58+enpqZmZGSoTgYsLi728/NbvHjxxo0b+/lSqOMAAAAAAABQYM6cOQKBoKSkxMnJqaioiKoYCoUiJiZmxowZDg4OQqEQI3FgJAoICIiNjf3iiy8OHjyobDQ2NhYKha+//rqHh8ff/vY3CuNdvXrV0dGxrKxMKBSq7jJeW1vr6+vr4uJy8ODB/k+xRB0HAAAAAACAGi4uLiUlJZMnT+Zyud9//71cLh/iAA8ePPDz8wsLC9u2bVt6ejqDwRjiAADqsnr16s2bN3/88cfx8fHKRl1d3TNnzoSHh4eGhvr7+zc1NQ1xKrlcHh0d7eHhwWKxSktLnZyclF+qrKzk8XgWFhapqana2tr9f02N7du3qz8pAAAAAAAA9AODwQgsMhr+AAAGDElEQVQMDKTRaFu2bElLS3vjjTfMzMyG4LhyuXz//v1+fn6PHj06deoUmWEIjgsweHg8nra29tq1axUKxaxZs8hGGo3m6ek5c+bMuLi47777Tk9Pz9HRcWh+2/Pz8xcuXHj06NFt27b98MMPqnXSq1ev+vj4mJubnzlzRl9ff0Avi/E4AAAAAAAAVKLT6Vu2bLl27Zquru6bb775l7/8pba2dlCPmJmZ6ebmtm7dug8//LCiomLmzJmDejiAIbNx48aYmJivvvpq3bp1qgPcZs2aVVFRsWLFirVr17q5uWVlZQ1qjJqamhUrVnC5XAMDg2vXrm3evJlO/3/5JT093cvLy93dXSgU/uEu4z2hjgMAAAAAAEA9W1vbCxcuJCUlXbx4kc1mBwcHV1RUqPcQXV1dv/76q7OzM5/PNzY2Li0tjYyM1NHRUe9RAKj16aefJicnHzhwwNvb+969e8p2BoPxzTfflJSUTJgwYd68eS4uLqdOnerq6lLv0SsqKoKDgzkcTk5OzpEjRy5cuMDhcJRfffr0aXh4+IIFC5YsWXLy5Mlx48Y9xyFQxwEAAAAAABgWaDTan/70p+rq6uTk5KKiomnTpjk7O8fExLz4oh4VFRXbt2+fMmWKv7+/qalpQUFBRkbG1KlT1RIbYLgJCAgoKioSi8X29vaZmZmqX5o2bVpmZmZpaamtre37779vYWHx2WeflZSUvOARJRJJYmKij4+PnZ1dcXHxwYMHKysrlyxZotqnvr6ex+NFR0dHR0f/9NNPmpqaz3csmkKheMG4AAAAAAAAoF5dXV3nz59PSkr69ddfOzs73d3deTwej8dzdXXt55KoYrE4OztbIBBcuHBBJBJZWVkFBgYGBwe/9tprgx0eYDiQSqUff/zxsWPHVq5cuWfPnvHjx3frUFVVlZiYePjw4d9//53D4Xh7e3t5eXl6evZzrlNHR8eVK1cEAoFAIMjLyxszZoyfn19QUJC3t7fqLCqCILq6un788cfNmzcbGRkdP358+vTpL3JeqOMAAAAAAAAMXzKZ7PTp0+fOnRMKhb///rumpqaVlRWLxWKxWIaGhoz/kUgkLS0tMpmsvr6+qqqqsrLywYMHGhoaTk5OPB6Pz+d7eHhgJWN4CR09enT9+vWdnZ2RkZF//vOfe14FXV1dly5dyszMFAgExcXFcrncyMiIw+Gw2eyJEycymUwmk6mvry/7nwcPHlRXV4tEotu3b8vlcisrKy8vLx8fn/nz5/e641tRUVFISEhJScnatWt37Njx4jMZUccBAAAAAAAYGWpqaoqKisgyTW1tbVNTk/Le0sDAgMlkMhgMExMTNpvNZrM5HI67u7uenh7VqQEo1tLSsnXr1ri4uNdffz08PHzhwoXdxssoSSSSgoKCmzdvikSiqqqq+/fvy2QyqVT6+PFjZc3U0NDQxsaGw+GwWCwnJydra+tnHffGjRu7d+8+fvw4l8uNi4uzs7NTy+mgjgMAAAAAAAAAo1xZWdnOnTtPnjzJ4XC++OKLRYsW9XOK4nMoKCiIiIhITU21s7PbsmXLokWL1DgaDnUcAAAAAAAAAHgp1NTU/PWvf/35558ZDMb8+fODg4O9vb3VVWSpr69PSUlJSEgoLS194403QkNDAwMDnzX257mhjgMAAAAAAAAAL5H6+vojR44kJiaWl5fb2Nj4+PjweLxZs2YZGhoO9KU6Ojry8vLIBcXz8/MNDAyWLFkSFBTk5uY2CMEJAnUcAAAAAAAAAHg5FRcXp6SkCIXCwsJCuVxua2s7depUFovFZrOnTJliYGBAroljYGCgXItKIpHcuXOnqqqKXKmqtLS0ra3N2tqax+O98847b7/99pgxYwY1M+o4AAAAAAAAAPBSk0ql2dnZeXl5IpFIJBJVV1d3dHQ8qzONRrO0tCTLPY6Ojl5eXpaWlkMWFXUcAAAAAAAAAID/k8vl9+7da25uJsfgPH78WEdHhxybo6+vb2pq+sorr1CVDXUcAAAAAAAAAICRQc3LJgMAAAAAAAAAwCBBHQcAAAAAAAAAYGRAHQcAAAAAAAAAYGT4D9D731X6hs6CAAAAAElFTkSuQmCC", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" + ] + } + ], + "source": [ + "\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "\n", + "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", + "\n", + "gviz = pn_visualizer.apply(net, initial_marking, final_marking)\n", + "pn_visualizer.view(gviz)\n", + "\n", + "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", + "\n", + "print(aligned_traces)\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + }, + "vscode": { + "interpreter": { + "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb new file mode 100644 index 0000000000..460facfb36 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb @@ -0,0 +1,286 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-2fed1eb2-9dc1-47ec-b7f2-f355b444c690.json']\n", + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" + ] + } + ], + "source": [ + "import os\n", + "path = os.getcwd()\n", + "parent = os.path.dirname(path)\n", + "\n", + "\n", + "# Change path if necessary\n", + "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", + "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", + "\n", + "import sys\n", + "\n", + "if __name__ == '__main__':\n", + " print(sys.argv)\n", + " print(file_path)\n", + "\n", + "\n", + "\n", + "# import sys\n", + "\n", + "# accept command line arguments\n", + "# inputArg1 = sys.argv[1]\n", + "\n", + "#print('inputArg1: ',inputArg1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "# uncomment if problems with dependencies\n", + "#%pip install pm4py\n", + "#%pip install pandas\n", + "import pm4py\n", + "import datetime as dt\n", + "import time\n", + "import pandas\n", + "\n", + "# process mining\n", + "from pm4py.algo.discovery.alpha import algorithm as alpha_miner\n", + "from pm4py.algo.discovery.inductive import algorithm as inductive_miner\n", + "from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner\n", + "from pm4py.algo.discovery.dfg import algorithm as dfg_discovery\n", + "\n", + "# viz\n", + "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", + "from pm4py.visualization.process_tree import visualizer as pt_visualizer\n", + "from pm4py.visualization.heuristics_net import visualizer as hn_visualizer\n", + "from pm4py.visualization.dfg import visualizer as dfg_visualization\n", + "\n", + "from pm4py.objects.conversion.process_tree import converter as pt_converter\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "def import_csv_original(file_path):\n", + " event_log = pandas.read_csv(file_path, sep=';')\n", + " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", + " return event_log\n", + "\n", + "def getStartActivities(event_log):\n", + " s = pm4py.get_start_activities(event_log)\n", + " print(\"Start activities: {}\\n\".format(s))\n", + " return s\n", + "def getEndActivities(event_log):\n", + " e = pm4py.get_end_activities(event_log)\n", + " print(\"End activities: {}\\n\".format(e))\n", + " return (e)\n", + "\n", + "def getAttributeFromLog(event_log, attr):\n", + " entries = pm4py.get_event_attribute_values(event_log,attr)\n", + " print(\"Entries: {}\\n\".format(entries))\n", + " return entries" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" + ] + }, + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[4], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(file_path)\n\u001b[0;32m----> 2\u001b[0m log \u001b[38;5;241m=\u001b[39m \u001b[43mimport_csv_original\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m log_other_model \u001b[38;5;241m=\u001b[39m import_csv_original(file_path_other_model)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(log)\n", + "Cell \u001b[0;32mIn[3], line 2\u001b[0m, in \u001b[0;36mimport_csv_original\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mimport_csv_original\u001b[39m(file_path):\n\u001b[0;32m----> 2\u001b[0m event_log \u001b[38;5;241m=\u001b[39m \u001b[43mpandas\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msep\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m;\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m event_log \u001b[38;5;241m=\u001b[39m pm4py\u001b[38;5;241m.\u001b[39mformat_dataframe(event_log, case_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcaseID\u001b[39m\u001b[38;5;124m'\u001b[39m, activity_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmethodName\u001b[39m\u001b[38;5;124m'\u001b[39m, timestamp_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtimestamp\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m event_log\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:912\u001b[0m, in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[0m\n\u001b[1;32m 899\u001b[0m kwds_defaults \u001b[38;5;241m=\u001b[39m _refine_defaults_read(\n\u001b[1;32m 900\u001b[0m dialect,\n\u001b[1;32m 901\u001b[0m delimiter,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 908\u001b[0m dtype_backend\u001b[38;5;241m=\u001b[39mdtype_backend,\n\u001b[1;32m 909\u001b[0m )\n\u001b[1;32m 910\u001b[0m kwds\u001b[38;5;241m.\u001b[39mupdate(kwds_defaults)\n\u001b[0;32m--> 912\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:577\u001b[0m, in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m 574\u001b[0m _validate_names(kwds\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnames\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m))\n\u001b[1;32m 576\u001b[0m \u001b[38;5;66;03m# Create the parser.\u001b[39;00m\n\u001b[0;32m--> 577\u001b[0m parser \u001b[38;5;241m=\u001b[39m \u001b[43mTextFileReader\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m chunksize \u001b[38;5;129;01mor\u001b[39;00m iterator:\n\u001b[1;32m 580\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m parser\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1407\u001b[0m, in \u001b[0;36mTextFileReader.__init__\u001b[0;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[1;32m 1404\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moptions[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m kwds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 1406\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles: IOHandles \u001b[38;5;241m|\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m-> 1407\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_engine \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_make_engine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mengine\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1661\u001b[0m, in \u001b[0;36mTextFileReader._make_engine\u001b[0;34m(self, f, engine)\u001b[0m\n\u001b[1;32m 1659\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m mode:\n\u001b[1;32m 1660\u001b[0m mode \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m-> 1661\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;241m=\u001b[39m \u001b[43mget_handle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1662\u001b[0m \u001b[43m \u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1663\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1664\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1665\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcompression\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1666\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemory_map\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmemory_map\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1667\u001b[0m \u001b[43m \u001b[49m\u001b[43mis_text\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mis_text\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1668\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding_errors\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstrict\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1669\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstorage_options\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1670\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1671\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1672\u001b[0m f \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles\u001b[38;5;241m.\u001b[39mhandle\n", + "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/common.py:859\u001b[0m, in \u001b[0;36mget_handle\u001b[0;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[1;32m 854\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(handle, \u001b[38;5;28mstr\u001b[39m):\n\u001b[1;32m 855\u001b[0m \u001b[38;5;66;03m# Check whether the filename is to be opened in binary mode.\u001b[39;00m\n\u001b[1;32m 856\u001b[0m \u001b[38;5;66;03m# Binary mode does not support 'encoding' and 'newline'.\u001b[39;00m\n\u001b[1;32m 857\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mencoding \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mmode:\n\u001b[1;32m 858\u001b[0m \u001b[38;5;66;03m# Encoding\u001b[39;00m\n\u001b[0;32m--> 859\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[1;32m 860\u001b[0m \u001b[43m \u001b[49m\u001b[43mhandle\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 861\u001b[0m \u001b[43m \u001b[49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 862\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 863\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 864\u001b[0m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 865\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 866\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 867\u001b[0m \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[1;32m 868\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mopen\u001b[39m(handle, ioargs\u001b[38;5;241m.\u001b[39mmode)\n", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'" + ] + } + ], + "source": [ + "print(file_path)\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "print(log)\n", + "print(\"lenght is\", len(log))\n", + "print(log_other_model)\n", + "print(\"lenght is\", len(log_other_model))\n", + "startAct = getStartActivities(log)\n", + "endAct = getEndActivities(log)\n", + "timestamps = getAttributeFromLog(log, \"timestamp\")\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Install graphviz, if not done already\n", + "Open a terminal window and intall graphviz with:\n", + "`sudo apt install graphviz`" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "#Another way to discover the tree\n", + "# # create the process tree\n", + "#tree = inductive_miner.apply_tree(log)\n", + "\n", + "# viz\n", + "#gviz = pt_visualizer.apply(tree)\n", + "#pt_visualizer.view(gviz)# convert the process tree to a petri net\n", + "\n", + "start_time = time.perf_counter()\n", + "process_tree = pm4py.discover_process_tree_inductive(log)\n", + "print(process_tree)\n", + "end_time = time.perf_counter()\n", + "pm4py.view_process_tree(process_tree)\n", + "\n", + "parameters = {pn_visualizer.Variants.FREQUENCY.value.Parameters.FORMAT: \"png\"}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "dfg, start_activities, end_activities = pm4py.discover_dfg(log)\n", + "pm4py.view_dfg(dfg, start_activities, end_activities)\n", + "\n", + "map = pm4py.discover_heuristics_net(log)\n", + "print(map)\n", + "pm4py.view_heuristics_net(map)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "# heuristics miner\n", + "net, im, fm = heuristics_miner.apply(log)\n", + "\n", + "# viz\n", + "gviz = pn_visualizer.apply(net, im, fm)\n", + "pn_visualizer.view(gviz)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + }, + "vscode": { + "interpreter": { + "hash": "994fd3bf715f7d00910c6929cedf6117267fec036ef9d2716f71f2b8e3dc9b3e" + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb new file mode 100644 index 0000000000..c6c5ef6fd5 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb @@ -0,0 +1,186 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-85cfe7fb-4cec-4b85-affb-ff95bb09e084.json']\n", + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures\n", + "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" + ] + } + ], + "source": [ + "import os\n", + "# uncomment if problems with dependencies\n", + "# %pip install pm4py\n", + "# %pip install pandas\n", + "import pm4py\n", + "import datetime as dt\n", + "import time\n", + "import pandas\n", + "\n", + "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", + "\n", + "path = os.getcwd()\n", + "parent = os.path.dirname(path)\n", + "\n", + "# Change path if necessary \n", + "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", + "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", + "\n", + "import sys\n", + "\n", + "if __name__ == '__main__':\n", + " print(sys.argv)\n", + " print(parent)\n", + " print(file_path)\n", + "\n", + "\n", + "\n", + "# import sys\n", + "\n", + "# accept command line arguments\n", + "# inputArg1 = sys.argv[1]\n", + "\n", + "#print('inputArg1: ',inputArg1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + }, + "pycharm": { + "name": "#%%\n" + } + }, + "outputs": [], + "source": [ + "def import_csv_original(file_path):\n", + " event_log = pandas.read_csv(file_path, sep=';')\n", + " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", + " return event_log\n", + "\n", + "def getStartActivities(event_log):\n", + " s = pm4py.get_start_activities(event_log)\n", + " print(\"Start activities: {}\\n\".format(s))\n", + " return s\n", + "def getEndActivities(event_log):\n", + " e = pm4py.get_end_activities(event_log)\n", + " print(\"End activities: {}\\n\".format(e))\n", + " return (e)\n", + "\n", + "def getAttributeFromLog(event_log, attr):\n", + " entries = pm4py.get_event_attribute_values(event_log,attr)\n", + " print(\"Entries: {}\\n\".format(entries))\n", + " return entries\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" + ] + } + ], + "source": [ + "\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "\n", + "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", + "\n", + "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", + "\n", + "print(aligned_traces)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABe0AAACUCAIAAACBVZWTAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdeTxU/fcA8DtjX4ZESlS28JRIVKSNyNIuS7YopZ1SoUeLlKJF2hSpLNlVUp42WcrWRosKxVMioZKyLzO/P+7vO9/5WsaY7c7ovP/olTt3OTPjuHPPfO754EgkEgIAAAAAAAAAAAAAOB4e6wAAAAAAAAAAAAAAAE2gjgMAAAAAAAAAAADAHaCOAwAAAAAAAAAAAMAdeLEOAAAAAAAAAAAAwEZVVVVeXh7WUbCKtbU11iEA5sNBn2MAAAAAAAAAAH+mxMREGxsbrKNgFbjeH5LgvioAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO7Ay57DdHR0fPjwobS0tKKior6+vqmpqbm5ubm5WUJCQkREREREZPTo0SoqKioqKmPGjGFPSABwNcgpAKj4+fNnWVlZSUnJp0+fmpubGxoampqaEAQRFRVFc0ReXl5VVVVFRWXYsGFYBwsAN/n8+XNpaWlZWVlNTQ163mloaEDPO6KioiNGjFBUVFRTU1NSUuLn58c6WAAAAGBoYmEdp7Gx8eHDh5mZmZmZmcXFxV1dXTgcTlZWduTIkeTzfUVFBXr9WVVV1dDQgCAIgUDQ09MzMDAwMDDQ0dHh4eFhXYQAcBfIKQCo+Pfff9HsyMrKqqqqQhBEQEBAXl6eXLtBEKSurg6t6Xz8+LG9vR1BEDk5ublz56IJoqCggPFzAIDzdHV1PX/+HE2uvLw8tCQ6fPhwWVlZ9LwjISFRW1uL1nRqa2urq6tJJBIvL6+6urqBgYGhoeHs2bPFxMSwfh4AAADA0IEjkUjM3WNHR0daWlpkZOTt27e7uromTZpkYGAwY8YMdGiAkJBQfxvW19eXlpa+efPm4cOHGRkZX79+HTlypK2t7cqVK7W0tJgbJABcBHIKACpqa2vj4uIiIyNfvHghLCysr68/d+7cKVOmqKiojBs3rr/CZXd396dPn8rKygoLCzMzM3Nzc1tbW6dMmbJy5UpbW1tpaWk2PwsAOFBhYWFUVFRcXFxdXZ2MjAxakZkwYYKampqUlFR/W7W2tpaVlZWWlubl5WVmZr5+/ZqPj8/c3NzJycnc3BwG6QAAOFBiYqKNjQ3WUbAK06/3AUcgMU9dXd3ff/89fPhwPB5vbGwcFRVVX19P997evHmzf//+8ePHIwiiqal55cqVzs5OJkYLAOeDnAKAiqdPn1pYWPDy8oqLi69ZsyYjI6O9vZ2+XbW1tT148GD16tViYmK8vLzLly9//vw5c6MFgFt0dnZGR0draGggCKKionLgwIF3797Rvbe6urrIyMh58+bh8XhJSUkfHx9GTmQAAMAKCQkJGF+TsxLWry5gCeaMx/n69WtAQMCFCxdERETc3NxWrVolKyvL+G5R+fn5ISEh8fHx48aN8/b2dnZ25uVlU1sfALACOQUAFXl5eX5+fnfv3tXR0fHw8Fi6dCmVgWmD0trampKSEhQU9OzZM1NT07179+rp6TFlzwBwvq6urkuXLgUGBlZWVtra2m7YsIGJv/9VVVURERGnTp1qaWlxdXX18vIaOXIks3YOAAA0IpFI3759+/79+7dv39D/1NXVvX379sqVK1iHxipMud4HnIbROk53d/fZs2f37t0rKiq6c+fOtWvXCgsLMys4ShUVFQEBAZGRkRMmTAgJCYEP1mCogpwCgIra2lpPT8/o6OhZs2b9/fffJiYmLDrQnTt3/P39c3NznZycAgMD4U4rMOTl5uZu3LixpKRk1apVnp6eioqKrDhKS0tLWFjYsWPHmpubDxw4sGHDBujaBgBgll+/ftXV1ZHLNOi/vZdQXv8SCARpaWlxcfHCwkIMI2cpqOMMSQzVcYqKilxcXN68ebNjxw4fHx8WXW1SKi0t3bx584MHD1xcXIKCgggEAquPCAA7QU4BQEVYWJiXlxeBQAgODrawsGDDEa9evbp169bm5uYjR46sWbOGDUcEgP1+/fq1bdu2y5cvGxsbnzlzBr39lqWam5sPHjwYFBSkrq5+8eLFyZMns/qIAACu1tra2kChpqbmy5cvPZZUVVV1dHSQNxEUFJSgMHr0aBkZmR5LZGVlBQQEEOiPA7gQ/XWcs2fPbt++XU9P7/z586qqqswNi7qEhAR3d3cxMbGEhARo1wqGDMgpAPrT2Ni4Zs2a69eve3h47Nu3D518ij2ampp8fX1PnDhhZWUVFhYG0+6AIaawsNDGxqapqenUqVNWVlbsPHRJScm6deuePHkSFBS0YcMGdh4aAMA5GhoaehdlKJfU1NSgc7CSSUhI9C7K9F5CewxQxwFch546TlNTk7Ozc0pKyp49e/bs2YPH41kRGXU1NTX29vb5+fnBwcHr1q1jfwAAMBHkFABUFBUVWVlZNTc3x8TEGBoaYhJDenq6g4MDgUBITk7W1NTEJAYAmC4kJMTDw2PmzJlXrlwZNWoU+wPo7u728/M7ePCgpaXlpUuX2FmiBQCwGjqIpndRhvLH2tpaIpFI3gQdRNNnUYa8ZNSoUUz/qAx1HMB1Bl3Hqa+vNzc3r6ysjI+PNzAwYFFYtOju7t6/f//Bgwe9vb39/f1xOByGwQBAN8gpAKjIyMhYunSpjo5OXFwctl1Ra2pqbG1ti4qKUlJSsE1VABhHIpG8vb2PHj26b9++3bt3Y9uk5sGDB7a2tgoKCmlpaVRmNAcAcAjyXU593t+ELqmvr+/q6iJvQnmXU48yDflHaWlprGbegDoO4DqDq+N8+vTJxMSkvb397t27KioqrAuLdtHR0S4uLra2tuHh4Xx8fFiHA8DgQE4BQEVKSoqtra25uXlMTIygoCDW4SAdHR1OTk7Xrl2Ljo62trbGOhwA6NTd3b1hw4bLly+HhoauXr0a63AQBEEqKipMTExIJNLdu3eVlJSwDgeAPxSr29BwLKjjAK4ziJJndXX1nDlzhg0blpWVhcng2z45OjoOHz7c2tq6u7s7OjoaRhAALgI5BQAVycnJK1as2LRp04kTJzC52bA3fn7+mJgYNzc3Ozs7Hh6e5cuXYx0RAINGJBKdnJxSUlJSU1PNzMywDuf/KSoqPnz40NTUdN68ebm5ubKyslhHBMBQw3gbGkVFRQbb0AAAmIXW8TiNjY1z5szp6up6+PDh8OHDWR3WYGVkZJibm7u4uJw9exbrWAaWn58fFBSEdRRDWVJSEtYhDAxyiokgp2inp6fn4eGBdRQDy8zMNDc3X716NWf+Bm7bti0kJOTWrVvGxsZYxzKwoKCg/Px8rKMY+jw8PPT09LCOYmDbt28/c+ZMamqqiYkJ1rH09P3799mzZ+NwOM48MwLAmbioDQ3HgvE4gOvQNB6nra3N3Ny8oaEhNzeXM0+rhoaGERER9vb28vLyO3fuxDqcAXz+/Dk5OdnS0hLrQIagqqqqgoICrKMYGOQUc0FO0YgrsgNBkBcvXixdunTZsmWnT5/GOpa+HT9+vKamxtLS8uHDh5zf9jg/P7+goEBXVxfrQIay5ORkKysrzq/jBAYGBgcHx8fHc2ARB0EQSUnJO3fu6OvrL168+MGDBxx+IwYArMZ4GxpFRUWOakMDAGAWmnLYw8PjzZs3BQUFcnJyrA6IbitWrPjy5Yunp6eOjg5XdKDkijEjXIdbqumQU6wAOTUgNk8qTJ/GxkZLS0sdHZ2IiAiO/SYQj8dHRUXNnz/fysrq2bNnnD8Zua6uLiQIS3HFLagPHjz4+++/T5w4wcl/CsaMGXPnzh09PT103BDW4QDAEoy3oVFUVNTX1+e6NjQAAGYZuI6TlJR07ty52NhYNTU1NgTECA8Pj7y8PHQ+ERkZGazDAaBvkFMAULFx48ampqYrV67w8/NjHQs1/Pz8CQkJWlpaa9euTUhIwDocAAZQV1fn6Oi4fPlyNzc3rGMZwIQJE8LDw62trfX19W1tbbEOB4DBgTY0AAA2GKCO8+nTpzVr1mzevJlbzqPh4eHa2tqrV6++ffs21rEA0AfIKQCoCAsLS0hIuHfvHlfUDUeOHBkVFWViYnLx4kUXFxeswwGgXyQSycHBQUREJDw8HOtYaGJlZbV+/foNGzbo6+uPHTsW63AAQBBmtKEh3+X0x7ahAQAwywB1HHd399GjRx87dow90TBu2LBh0dHRs2bNio+PX7FiBdbhANAT5BQA/amtrfX29t6+fbuhoSHWsdDKyMho69atnp6eixcvHjFiBNbhANC32NjYBw8e5OXlcf49gGQnTpzIyMjYtm3b1atXsY4FDHHQhgYAwHWo/XG5c+fOjRs30tPTuetOyxkzZqxatWrbtm1mZmbi4uJYhwPAf0FOAUCFp6enqKjonj17sA5kcHx9fRMSEry9vS9evIh1LAD04devX56enq6urtOnT8c6lkEQFBQ8c+bM/Pnz09LSFixYgHU4gCtBGxoAwFDVbx2no6Nj48aNtra28+bNY2dATBEQEJCSkuLv73/kyBGsYwHg/0FOAUBFXl5edHR0cnKyqKgo1rEMDoFACAoKWrFiBdddJ4M/hK+vb2dnp7+/P9aBDJqxsbGVldXWrVvnz5/Px8eHdTiAs0AbGsAsHR0dNTU1WEcBwOD0W8eJjo6urq4ODAxk1pF+//6dkZHx/Pnz4uLi79+///r1S1hYWEJCYvz48dra2nPnzmXixD1SUlK7d+/evXv3zp07YaA74BBMzyl2gpwCrObn5zdr1iwLCwusA6GHtbX1yZMn/fz80tLSsI4FgP9RW1t7/vz5wMDA4cOHYx0LPY4cOaKiohITE+Ps7Ix1LIBNoA0NYJ329vaKiooP/1FSUlJaWlpTU0P56wQAV+i7jtPd3R0YGOjk5DRmzBjGj/Hw4cNTp06lpaW1tbX1tw4Oh9PX11+7dq29vT0PDw/jB3V1dT18+HBwcDA3fgEFhh7m5hQmIKcA6xQVFd27d+/OnTtYB0I/Hx+fBQsWPH/+XFtbG+tYAPivEydOiImJrVmzButA6CQvL+/g4ODv7+/o6MiUz4cAQ9CGBrATkUh88+YNWq8pLy8vKSkpKyv7+vUriURCEERAQACHw5EvTseNG/fp0ydM4wVgcPr+q5eUlFRRUfHPP/8wuPeXL19u3bo1KytrwDVJJFJOTk5OTs6BAwcCAwMZ/0pWWFh427ZtAQEBnp6e0NEDYI5ZOYUhyCnAOv7+/jo6OvPnz8c6EPqZmZlNmTIlMDAwMTER61gA+H8/f/48d+6cj4+PkJAQ1rHQz9vbOyoq6urVq9bW1ljHAvoGbWgAB8LhcC4uLk+fPuXn5yeRSJ2dnZSPtre3o//h4+NTUFDw9PTk3no3+DP1Xce5cOHCkiVLlJWV6d4vkUj09/c/cOBAj5wZ0IcPH5YvX25tbX3+/HkJCQm6A0AQZMOGDX5+fomJiWvXrmVkPwAwjvGc4gSQU4AVamtrb9y4ER0djXUgDMHhcNu3b3d2dq6vr4d7DwGHSEhI6OrqWr9+PdaBMERFRWXRokUXLlyAOg4moA0N4FI4HO7gwYMmJiaUBcQeeHl5ZWRkMjMzc3Jy2BkbAIzro45TVVWVlZV1/fp1unfa2tpqZ2eXkpJC9x4SExNfvnx5+/ZtBQUFunciLi6+ZMmS6OhouOYE2GI8pzgE5BRghZiYGGFh4SVLlmAdCKOWLVu2cePG+Pj4LVu2YB0LAAiCIJGRkRYWFlw013h/HB0draysqqqqmNhLEUAbGjDkzZ8/X19f//Hjx5Q365Hx8vIOHz48KysLqoqAG/VRx4mMjJSQkDA1NaVvj+3t7WZmZtnZ2YwFhpSWls6YMSMvL4+RUo6jo+PChQsrKioUFRUZjAcAujGYUxwFcgowXXR0tI2NDVff94ESEhJatmxZdHQ01HEAJ/jw4UNBQYGvry/WgTDBwoULJSQkYmNjPT09sY6FC0AbGgDIAgICZs2a1Xs5Ly8vgUDIzMxk5EoTAAz18ef4+vXr1tbW/Pz89O1x1apVjBdxUF+/fjU3N8/Ly6P7Bqv58+dLSkqmpKR4eHgwJSQA6MBgTnEUyCnAXBUVFS9evAgKCsI6EOaws7ObP39+ZWXl2LFjsY4F/OmuXbs2YsSIefPmYR0IE/Dz81tYWFy7du0Pr+NAGxoABoVIJH769Gn06NH19fWUvT54eHgEBATu378/YcIEDMMDgBE96zg/f/588eKFj48PfbsLDQ2Ni4tjOKr/Kikp2bRpU2xsLH2b8/Lyzp07NzMzE645AVYYzClOAzkFmCszM1NYWHjGjBlYB8Ics2bNEhQUzMzMdHJywjoW8KfLyMiYN2/ekJnjycjI6PLly79+/aLlNrGqqipBQUEpKSk2BMYs0IYGACYikUjXr1/fu3dvSUmJqakp5UwjeDyel5f39u3blPNLWltbQwcuwF161nGysrJIJNLs2bPp2Nfnz5937tzJjKj+R1xcnI2NDd2tEwwNDb28vDo7O/n4+JgbGAC0YCSnOBPkFGCizMxMfX39IfNVsKCgoJ6eHtRxAOY6Oztzc3OHzEg3BEHmzZtHJBIfPny4cOFCKqs9efLk+PHj165d++eff4yNjdkWHhXQhgYANktPT9+1a9fz588XLFgQGxuroaGxcOHCe/fudXZ24nA4PB6fkpLS581WAHCRnnWchw8fampqSkpK0rEvPz+/379/MyOqnry9vRctWkTf6crQ0PD379+FhYXTp09nemBDRnp6urGx8evXr9XV1Wnfqrq6euzYsa6urufOneO02DgHIznFmbg0p7y9vQMDAxEEuX37NiO9imjfDyQILbKzszdu3Ih1FMxkaGh44cIFrKOg35s3b44cOZKRkVFXVzdixAglJSVTU9Ply5erqKiw4nBw9mGRZ8+eNTU1zZ07F+tAmEZSUnLSpElZWVl91nG6u7uvXbt2/Pjxx48f8/HxdXd3f/v2jdUhQRsaADhNbm7u7t27s7KyjIyMnj17NmXKFHT5oUOH0CE5OBwuOTl5aPSsBH+4nueJ169fa2lp0bGjz58/R0ZGMiOkPpSUlCQmJq5YsYKObVVUVERFRd+8ecNd15xcISoqikgkxsfHnzhxQlBQEOtwOBTdOcWxuDSnAgICnJ2d//rrL7btBxJkQD9//qyqqhpiCaKlpVVZWUnj3R+cJj4+3tnZ2d3d/eHDh7Kysg0NDVlZWTt37ty/f39bWxvW0f0XJNeAiouLCQSCsrIy1oEw0+TJk4uLi3ss/P3796VLl44ePfrlyxf0Cz90uCgjdRxoQwMA1ykoKPD3979165a+vn52dnaPgfAaGhqWlpbJyclRUVFDYH5MAJDedZzS0lL6hqFGRkZSto9iuvDwcPrqODgcTllZubS0lOkh9dDY2JiYmLh8+fLhw4ez+lgcIiIiwsrKKikp6fr167a2tliHwz5dXV2hoaFWVlbS0tIDrkx3TnEstuUUgiBRUVHTpk1TU1Njw7GY7o9NkKKios+fP5uamg7Y2xv9LVJVVWVLXGyCPp2ysjIdHR2WHujhw4ft7e2GhobMaoBSXFzs7Ozs4eFx6NAhdMnIkSNtbGwmTpw4bdo0phyCWf7Y5Lp58+aIESN0dXUHXLO0tFRFRQWHw7EhKrZRVVWlnEmjoqIiLCzs7NmzbW1t6JiX7u5u9CE8Ht9fHQfa0AAwxBQXF/v5+SUnJ+vq6j548MDQ0LDP1Q4cOGBkZGRvb8/m8ABgFRKF5uZm9I5B0uBpaGiwNE4eHp6vX7/SERiJRELb69C3Le2+fPmCIAgvL6+5uXlsbGxzc3N/ayYkJPR45ftz586d6dOnCwoKysnJLV++vKCggEQinT59Gn1NTp8+vX79enQyLxsbG3STmzdvamtrCwgISEtLr1u3rrGxEV1eX1+/Y8cOJSUlAQEBTU1NynfZy8uL8qUeN24c9V2hcnJyNDQ0ysvLEQQxNjbuEfmHDx8WL14sKSkpKiq6ZMmS/Px86sv7O1x/sTH+2jIC/V6ah4dn3rx5ERERPV4ZSozkFCdjT06RSCS0BZ26uvrRo0crKyv7W43G9/3du3cIgty+fZu8hJxiw4cPd3Bw+PLlC+X6fSZgj/1Q3tYRFxdH3pYzE8TS0tLS0nLAF4pBV65cQRCEQCC4uLhkZGR0d3f3t2ZkZKSAgEBXVxerQ2Knrq4uAQGBK1eusPpA6P19kpKSbm5u+fn5RCKxvzVpfN9tbW35+Ph+/PjR3wpw9qECQZCEhATq6zBu7dq1CILIycn5+PgUFxdTWXPhwoV2dnasjofNrl69isfjW1panj17Zmdnx8PD09/9R3x8fLNnz/bw8HByclqwYIGurq6SklKPIXI4HE5KSkpNTU1fX3/JkiUuLi7e3t7Hjh2LiIi4efNmfn5+WVkZlfM7AABzb9++dXR0xOPxGhoaiYmJWIcDhpT29vbi4uKrV68eO3Zs9+7d27Ztc3V1tbKycnZ23rRpk5eXV0BAQGRkZEFBQUNDAyYR/s+VD3px8vLly8HuhQ03ITPyCWnXrl2ampr0bUs7tI6DIAgPDw8OhxMQEFixYsXNmzc7Ojp6rEnjNefNmzfxePzu3bu/fftWXV1tZ2cnIiKCPoT2IZKXl09MTGxqajp9+jT6STolJQWHw+3Zs+fHjx8vXrxQU1MzNDREP9y7u7u7u7t/+/bt9+/fV65cERAQoPwIeP/+fQRBXr9+TV5CZVeoNWvWHDlyhEQi6enp4fH4HtfYmpqaNjY2tbW1DQ0N7u7u5Mj7W07lcL1jo4KddRwEQfB4PB6P5+PjW7Zs2dWrV1tbW3usSXdOcTj25BSJRELvuMHhcLy8vDgcTk9P79y5c9++feuxGn11HDTF/v777/r6+nfv3k2dOlVZWfnXr1+Uj/aZgJT7aWtrW7Ro0dmzZ3scizMThG11HHQUANoJW0pKatu2bU+ePOm9pp+fn6qqKqvjYb/x48cfPHiQ1UcJDAxEX2H0X1lZ2f6u7Wl83yUkJLS0tKivA2ef/jDyKYV2a9euRYdfoW+6mpra4cOHP3782HvNSZMm+fj4sDoeNnvy5AnynyFv1Bvt43A4GRmZ6dOnL1iwYOXKlR4eHv7+/uHh4devX3/06NHbt2/r6uqolJgBABzu48ePrq6uPDw8EyZMSExMpPJNBgC0+/fffy9duuTo6KikpISebfF4vJyc3KRJk3R1dY2MjKysrMzMzGbPnq2tra2oqEi+VVZaWtrU1DQwMPDJkyds+3ryf658Hj9+jCBInx8IqLt79y4zCjUD8PLyou9JBgQEKCgo0Lct7ch1HDL0Q4aoqKiDg0Nqair5TaXxmlNVVXXSpEnkH3///j18+HDy/xEEWbNmTY9NVFRU1NXVyT/evHkTQZAHDx703vmiRYvWrVtH/rH3p1Xqu2pubh42bFhVVRWJRDp79iyCIJQXLa2trQjFJ9rOzk5paWkqy6kfjpPrOGRolUFYWBh9r8nFO7pzisOxJ6dI/6njkOFwOB4eHjweb2BgEBkZSa650FfHUVVVpfytKyoqQhAkICCA/Gh/CUjeT0tLi6mp6YULF3ociGMThG11nB5t6dE/hqNHj/by8nr37h15zR07dkydOpXV8bCftra2p6cnq48SGBjYo9cGeiObsrLyvn373r9/T16Tlve9sbERQRAzMzPqq8HZpz8Iu+o4PUagoMmloaERHBxcU1NDXnPcuHFotWvIaG5uXr16Nfqs0S9R+vu4iJo1axbWIQMAmK+ystLNzU1AQEBBQSE0NHSIDekFmHj9+vXOnTsVFBQQBBESEpo3b97+/fsTExNfvnzZ+0t6St3d3RUVFXfu3AkODra1tR01ahSCIOLi4itWrEhLS+vs7GRp2P9zFkQ/nxEIBOqnxt4+fPgw2E3oQPdRCAQCiybSog5tGNTU1JSYmLh48WIZGRl3d/ecnBxatq2qqiotLaXs0SUqKvr9+3fKdXrcy1ZVVVVWVkY5OQXahvbBgwe99z98+PCysjIqR6e+q6tXr06ZMkVWVhZBEBsbGz4+voiICPLKgoKCU6dO3bVrV1JSUmtrKy8vb21tLZXlg4qcM6FnkZaWlvj4+MWLF48YMWLdunU5OTm/fv1C6MopDodVTqF/MdGpZ1etWiUpKblgwYKkpCTK2UBohKbYnDlzyEsmT54sJiaWnp6O0JaAzc3NCxYsEBcXX7NmTY+dQ4L0gP4x/PLlS1BQ0F9//aWiouLr61tRUfH79++hlx0IdgmCdl398OHDoUOHxo8fr6mpefLkya9fv9K+BxrbqcDZh3OgyfX69evt27fLysrq6emFhYX9+vVr6CWXsLAwei9hTEzMuXPnli5dKiwsjCAIHx9fn7+3dXV17A4RAMBK9fX13t7eKioqKSkpp06dKisrQ4fkYB0X4FZNTU2nTp3S1taeNGlSUlKSra1tVlZWQ0NDenr63r17raysNDQ0qM+lgMfjFRQUTExM3N3dY2Nja2pqiouLDxw4UFVVtXDhwjFjxnh4eLx//55F8f/Ptzro505RUdHB7qVHQzgWofsoBAKhsbHR2tqaufH0QGUuD/SzdX19/fnz50+dOoU2xy0rK6MyjSt6qxr1lslCQkK9Nzlz5syZM2col1dWViII8vbt2927d+fl5dXV1ZFIJARBJk+eTI44Z9AAACAASURBVP3o/e0KQZDLly87Ojqi/5eUlDQ1Nb158+ajR49mzZqFLrx79+7Bgwe3bt3q4OBgZGS0d+9e9MNxn8sHPNxgsfq9JhKJ/T2EFhQaGxsvX74cFhaGvoOfPn0aYt2vCQTCz58/Wf06IwjSo3RChjazJBKJ9+7du337NjoqITMzc86cOQN+SYvqM8UkJSXR5bQk4JYtWzQ1NZOTkx8/ftxj6i5OTpCSkhJWv3HofS59PoRec3748MHf39/Pz09SUlJWVvb79++SkpIsDYnN0IIgq1/n0tJS6q8zem3v4eEhJSU1btw46lNoiYmJSUhI1NTU0HJoOPv06cSJE8nJyXRsSLsXL170uRytcSMI8uTJkydPnmzZsqWrq6ukpKStrW0ozeeFVqZERETs7OxcXV07Ojry8/MfPHhw586dwsLC7u5ufn5+8hxS/Z0+AABc58ePH6dOnQoKChISEvL19XV3dx9Kf9kA+/348eP06dOnTp3q6OiwtrYOCgqaPXs2U2YGmDhx4sSJE7ds2VJRUXHlypWoqKhTp05ZW1vv2rVr0qRJjO+fEk0XPANiz3SkLS0tbDgKh5CSkkIQ5MePH4PdpPdg/ujo6M7OTiMjo8+fP2dlZaFDvJycnPq7AKC+KwRBPn36lJWVtXr1atx/oAPRKb8UlZCQOH78eHV1dXZ2dltb2+zZs9GelH0up344AFihzxT7/v07upyWBNy9e3dqaqqmpubKlSsp/zpBggAuZW5uXlxc/PPnz8FuCGcfgAl+fv45c+b4+fk9efLkx48fqamp69evHz9+PPooHb/JAHCd7u7uT58+PX/+PDs7Oy0tLSkp6f79+/n5+a9evaqvr8c6OiZoamoKDAxUUlI6c+aMj4/Px48fvby8oIgD6NbS0rJ37155eflTp065ubl9+vTp4sWLc+bMoVLEqa+vf/XqVV5e3v3795OSktLS0rKzs58/f15ZWUmeJLE3RUXFvXv3lpWVxcTEvHnzRlNTc9myZegHEqah/OCC3lDw/fv3nndfDQQd6cpq8+fPH2xgqLNnz0pJSdG3Le1698chQ3sWjBgxws3N7dGjR7T3x6G8ab+6ulpAQADt8IqOnOrdlUNNTc3AwIByiYaGRnx8fElJCYIgR48eJS9fsWIFZZ9adAw5ZReA/nZFIpF8fX3t7e0pH2pqapKSkhIVFW1qaiKRSDU1NZSRo7+y8fHx/S2nfrjesVGBVX8cMrRzgbi4uKur66NHj9D2CnTkFIdjT06RevXHIUO75PDx8ZmbmycmJsbExNDyvvfujzNx4kTyo7374/SXgJT7efPmjaCg4KZNm8hrcnKCYNUfhwzt5TF+/Ph9+/aVl5evW7fO0NCQ1fGw39y5czds2MDqo/Tuj9PjdSb3TKHxfX/79q2goGDv5rhBQUFiYmLo3zE4+/QHwag/DorcO0xXVzc0NLSxsXH48OHnzp1jdTxshl6XZmRkUF/ty5cv0dHRzs7OLS0t7AkMALbp7OzMzc09ePCghYXFxIkT+zsLoIYPH66rq7tq1aoLFy58+PAB69gHp6mpKTg4WFpamkAgeHl5/fz5E+uIANe7ceOGvLy8uLh4YGAguclmb+/fvw8LC1u1atX06dPRqTn7IyAgoK6uvnz5cn9//7y8vP4a4hCJxNTU1EmTJgkKCu7bt496zx3aMafPcXh4OJVnyCy2trb0PcmAgABFRUX6tqUd0/scU06X8/HjRxMTE1dXV/Sh/j5Jp6Wl8fDwHD58uL6+vr6+ftu2bRMmTGhtbW1raxsxYoSGhsabN29aW1vv3r0rLi5O+Un67du3CIIkJSXV19ePGjXq6dOn/e2KSCQqKSm9ffu2x6H9/f0RBImIiCCRSOjI/KCgoMbGxoaGBk9PT0FBwfLy8v6WU4m8z9iovGjQ55g92JNTJBb3OSbPV/Xt27eSkpJp06YpKyuTZ5mlkoA99nPixAkcDnfv3j0SicThCQJ9jtlDW1ub7sb8tGNun2NUcnKykJCQt7f3v//+29HR8fHjx4MHDwoKCkZHR6MrwNmnPwj0OWa9iooKBEGovxEADEnNzc1XrlxZuHAh2v5CVlbWysrKx8cnOjo6Ly+vvLy8trYWLWf/+PHj8+fPJSUl6enpZ8+edXNzMzIyEhERQRBk7Nix69evz83NxfrZDKC9vT00NFRGRkZERMTLy+vHjx9YRwS43tevXxcvXozD4ezt7SnPlWREIjEnJ2fdunVjxoxBEERERMTIyMjd3T0kJCQ9Pb2kpOTz58/or2JTU9PXr1/Ly8vz8vKioqJ8fHysrKzQtn0EAmHRokUxMTF9fovQ2dl5/PhxAoGgpKSUlZXF+JNizrzj+fn5A9RgmMHf35++J8ml846TSKTbt29PmzZNQEBg9OjRHh4e6CfLuLg4ypelx5T1d+/e1dXVFRAQGDlypJ2d3efPn9HlT548mTVrlqio6JgxY1xdXS0tLdHNyb/KGzduFBcXFxMT27hxY3+7omydUFRURD6ol5cXebmJiQmJRLp165axsbGkpKSYmNjMmTPJU430t5xK5H3G1h+Yd5w9uHHeccrfUvJX+uQUk5CQsLe3//LlC+UmfSbg0aNHyfvZtGnT7du3yT+OHDmSwxOEA+cdV1FRYXU87KesrMyN846j3rx54+joKCMjw8/PLysra2FhkZOTgz4EZx8qEA6bd1xDQ2PozTuOjppEO0MB8IcoLCx0dnYmEAh8fHyLFy8+f/48HSnQ3t7+6NEjX19ftEMHepLiwNHiHR0dkZGRCgoK/Pz8rq6ufV5vAzBYDx48GDVqlJKSUp/DOb99++bn56ekpIQgiIaGhp+f36NHj3pfvw+opKTk3LlzCxcu5OPjExMTW716NeXHFbKqqqqlS5fy8PD4+fl1d3fT83z+43+ufFpaWvB4/PXr1we7l5aWlj4H+jLXnTt36HuSNjY2S5cupW9b2qF1HF5eXnNz89jY2Obm5v7WZE+t4c/EzjoODw/PvHnzIiIiyCM4eqM7pzgce3KKRCJpa2sjCKKurn706FG0e26fIKdoxLY6DoIgBALBxcUlIyODylkqKipKQEBgiE0a2tXVxc/PHxMTw+oDoXc0S0pKurm55efnE4nE/tZkz/v+h2NbHQdBEDk5uf5qdmSLFi2ys7NjdTxslpycjMfjmTUiHQAOl5OTY25ujsPh0MkH0VbxjCsqKtq2bZukpKSoqOiOHTs4pFbS3d2dmJiorKzMx8fn6upaVVWFdURgKOjq6vL19eXh4bGysup9vfbly5ft27eLioqi3zi+ePGCKQetra0NDg7W1NTE4XALFizocwTcqVOnBAQEjIyMamtr6T5QzyufsWPHBgYG0rEjY2NjlhZxCAQC3WfuyZMns2GI+8+fP8PCwmipbcM1J+uw57Xt7Ow8c+YMjYlHd05xMvbkFIlEioyMpLwNpz+QUzRiz/V8YWHhjRs32tvbB1wTvfGwoqKC1SGxEzrBJBtu/cjOzr537x4tVTCo47ABe+o4qamp+fn5tKy5Y8cObW1tVsfDZocOHVJQUMA6CgBYrry8fMGCBQiC6Ovr//PPP6w4xO/fv48dOyYjIyMkJLR//34My6No6xANDQ08Hm9lZcV1fXwAx2pra7O0tBQUFDx79myPh1pbW/ft2ycoKCgjI3P8+HH0nkTmIhKJaWlpM2bMQBBk0aJFvT/rPnv2TElJSUFBge5Bpj1bUaqqqpaWltJRZ7GxsWGkTDOgxYsX09ecnEQiffjwgcoM38wiLi6+du3aITa9NOgTLy/vpk2b0PnjB0R3TnEstuUUgiArV65UU1Njw4EAE2lpaS1evBjt1UKdqqoqgiBDLEHQp8OGBJk9e7axsTF6lw34QyxatEhXV5eWNVVVVcvKykj9Tw3GjUpLS9HBbuinXqzDQRAEwQGOhPXvBf3a29sPHDigrq7+77//pqen5+TkmJmZseJAoqKi27dvr6io2L9//9GjRzU0NO7evcuKA1GXnp6uo6OzdOlSVVXVd+/eJSYmore3AMCgpqamxYsXp6en3717d+PGjZQP3b59W11d/fjx4wcOHPj33389PDzQBlLMhcPhzM3Nc3Nz79279+HDB3V1dX9//46ODvIK2traT58+lZGR0dPTo69HTc+bodTV1bOysujY0YoVK3bt2sW6Ke7c3Nzo27C0tLSpqUldXZ258QBAI7pzimNBTgFmERcXl5OTKywsNDU1xToWpikqKho7dqyYmBjWgYA/mrq6+u/fvz98+ECeh3sIKCoqampqWrVqVWdnp7i4uLa29tT/GDt2LFZRbd26VU9PD6ujgx7y8/ODg4OxjoJOHz9+XLFixevXrz09PXft2kV9LiqmEBQU3Llzp729vbe3t6mpqaOjY2hoqJCQEKuPiyBITk6Oj4/Pw4cPjYyMnj171t/8pADQ4fv37/Pnz6+pqcnOztbQ0CAvb29v9/T0PHXq1MKFCzMyMthz4jA2Nn758mVISMiePXuuXbuWkJCgrKyMPiQhIXHv3j1LS8v58+enpqYaGBgMas896zhz5sw5efLkt2/fpKSkBrUjERGR7du3e3t7D2orGpmZmU2bNo2+bTMyMggEAvx1AFihO6c4FuQUYKK5c+dmZWX9/fffWAfCNBkZGYM9EwPAdDo6OgQCITMzc8jUcb5//15cXHzjxg1TU9PS0tLnz58/f/48JyfnxIkTHR0dw4YNmzhx4syZM/X19adOnTpq1CgGD9fR0dHa2iouLj7gmnp6etbW1gweDjARl9Zxrl275uLioqio+PLlS/JlHnuMHj06Kipq2bJlq1evfvPmDeV1Jivk5+fv3r07IyPDyMjoyZMnU6dOZd2xwB+oubl5wYIFP378yM3NVVBQIC9H66Rv376Ni4tbsWIFO0Pi4+Nzd3dfunSpjY3NlClTwsLCyAGIiIikpqY6OjouWbIkIyNDR0eH9t32vK9q7ty5OBzu4cOHdITo7u6ODpJnLgEBgaCgILo3z8jImDNnDjqzAwDsx0hOcSbIKcBEBgYGubm57e3tWAfCHG1tbfn5+VDHAZjj5eXV19fPzMzEOhCmefDgAR6Pnz17Ni8v78SJE1euXHny5MmcnJwfP36gE/EoKirevHlz6dKlMjIyo0ePXrRoka+v782bN799+0bH4Z4/f66qqnrlyhUOuYELDG2BgYHLly9ftGhRTk4Om4s4ZMuWLSsqKuLl5Z06dWpOTg4rDvHq1Stra+sZM2a0t7dnZGTcv38fijiAuTo7O62srMrLy+/cuUNZxCkoKNDR0ens7CwsLGRzEYds3Lhx2dnZq1atsrW1pRz7wsfHFx0dPXPmTDMzs0G1GuhZxxEXF9fS0rp//z4dwQkKCl6+fJnp9+r7+fnR3SCjq6srKyvL0NCQuSEBQDtGcooDQU4B5jI0NGxpacnNzcU6EOZ4+PBhW1sbJAjgBIaGhuiEcVgHwhz379/X0dHpfceiiIjIzJkz3d3do6Ki3rx509DQ8OjRIy8vLwkJiaSkpMWLF48YMYJc1klPT29ubqblcM+ePauvr1+5cuWMGTNevXrFgicEAIIgSHd39/r163fv3n3x4sWoqCj23NPUH3l5+aysrLlz586fP//mzZtM3PPbt2+tra0nT55cWVmZmpqak5MDX3gAVnBxccnJyblz5w7l4JLU1FRDQ8M5c+bk5uZiVSdFCQgInDx5MjQ09NixYxs2bCCfoPn4+JKSkhQVFc3MzOrq6mjcW886DoIgFhYWSUlJlG14aKenp3f69Gk6NuyPjY3Nzp076d78zp07P378WLJkCRNDAmCwGMkpTgM5BZhLXl5+ypQpcXFxWAfCHLGxsdOmTRszZgzWgQCAWFhY1NfXp6enYx0IE3R0dFy/ft3CwmLANcXExCjLOl++fElNTXV1dUUQ5Ny5c8bGxuLi4pTDedra2vrcz+PHj/F4PDqliJaWlpubW2NjI5OfFfjjdXd329vbR0VFJScnr169GutwEARBhISEkpOT7e3tLSws4uPjGd/hv//+u27dOg0NjXfv3iUkJOTn5y9atIjx3QLQW0hISGxsbHJysra2NnlhfHz88uXLHR0dExMT6Zs0ielcXV2TkpIiIiIcHBzIpRwREZG0tDQcDufo6EgkEmnZT8/+OAiCrFy5cs+ePbdv36bvUm3Dhg21tbX79++nY9sejI2NIyMjGWk7Hx0dPWvWLEVFRcaDAYBuDOYUR4GcAkzn6Oi4b9++kydPCgsLYx0LQ1paWq5du3bo0CGsAwEAQRBESUlJT08vOjraxMQE61gYdfPmzYaGBltb28FuKCMjs2jRIvJ145cvX57/h5+f348fP/j4+MaPH6+tra2trT1z5szJkyej48rz8vK6uroQBEH/PXfuXGxsbFBQkKOjI1dPhwQ4yqZNm1JTU//555+5c+diHct/8fDwhIWFEQgEJycnCQkJuv+AVFZW+vv7X7p0SVlZ+dKlSw4ODnh8HwMImKKqqiovL49FOwcIgnB+F7BXr17t2LFjz5498+fPJy+8c+fOypUr3d3djx07hmFsvS1btuyff/4xNzffvHnzuXPn0IVSUlIJCQkzZ848fPiwj4/PwHvpczbyefPmLVu2jL6ZzFEhISEM3mC1cuXKjo4ORmJoaGgQEhK6cOECIzthhYSEhP5eecAgjn1tGc8pTgA5xe0sLS0tLS2xjqKn2tpaXl7emJgYrANhVHR0NB8fX11dHdaB9MSZ7/sQgyBIQkIC1lH0dP78eWFh4Z8/f2IdCKOWLFlibGzM3H12d3e/ffs2Kipqy5Ytenp66Pe0oqKis2fP3rJlS+9iDTqhta6u7suXL8k74cz3/U/GRZ8H9uzZw8PDc/XqVawD6RuRSFy1apWwsHBubu5gt62trfXy8hIUFBw3blxoaGhnZycrIqSEvu+AdVj9DjKosbFRWVnZ0NCwu7ubvPDx48eioqIODg5EIhHD2KhITU3l5eXdt28f5cKTJ0/y8vJmZ2cPuHnf70p8fDwPD09ZWRkjkeXm5qqoqNDxiyIuLn7x4kVGDo3y9/cXFxfnwI8vXHSO4Toc+9oyJacwBznF7Tj2en758uXa2tpYR8EQIpGopaVlZWWFdSB94Nj3fShBOPJ6vqGhQUxMLCAgAOtAGFJSUsLDw5OYmMjSo3R0dBQWFoaFha1du5ZKAwVeXl48Hr9lyxb0VMiZ7/ufjFs+D8THx+NwOKZc77BOR0eHmZnZqFGjvn79SuMm37598/LyEhISkpOTCw4ObmtrY2mEZNzyvnMjrnht3dzcpKSkampqyEtqampGjhy5cOFCNpQRGREWFobD4ShPcEQicfHixePHj29tbaW+bd/D2ywtLZWUlAIDA+mowpDNmDHj5cuXAQEBtE+3zM/Pv379+rdv3zJ+j2hzc3NwcPDmzZtpmTMSAFZjSk5hC3IKsI6Pj09hYeHdu3exDoR+aWlpRUVFXl5eWAcCwH8NGzZsw4YNQUFBLS0tWMdCv8OHDysrKy9fvpylR+Hj49PS0lq7di1ayulvTsauri4ikXju3DklJaWwsDCWhgSGqg8fPqxbt27z5s0c0hOnP3x8fAkJCWJiYra2tgN2TP/9+3dgYKCSktLFixf37dtXVlbm7u4uICDAnlDBn+z169chISFHjhwZNWoUuoRIJK5cuZJAIMTExPDy9tFGhnOsXbt2/fr1Li4uZWVl6BIcDnf27NmampojR45Q37bvOg4PD4+Xl1d0dHRlZSUjkQkKCnp5eX38+DE8PNzY2JjK66ipqenv719eXn7u3LnRo0czclBUaGhoS0vL1q1bGd8VAIxjVk5hCHIKsI6WlpaJicnBgwexDoR+hw4dWrBgAWVrPQA4gYeHR1NTU3h4ONaB0Onff/+NjY3dtWsX6zpr9PbkyRPqbSa7urq+f/++bt06BEG497QOMNHe3m5tba2srHz06FGsYxkYeiWcl5d3+PDh/tZpbm4ODAwcN27ckSNHtm7dWl5ejg7JYWec4I9FJBLXrVs3ffp0Z2dn8sIDBw48evQoMTGx9xSHHCgoKEhZWdnOzo48JY6cnNzevXsDAgIqKiqobNjvSdHBwUFOTs7T05Px4ERERFxcXO7du/fr16/8/PwLFy4EBAT4+PgcPHjw7Nmz9+7d+/79+4sXL/7++285OTnGD4cgSH19vb+//6ZNm2gfCgQAqzExp9gPcgqw2t69e3Nzc69evYp1IPRISEh4/Pjx3r17sQ4EgJ6kpaXXr19/4MCB79+/Yx0LPXbu3CkvL29nZ8fOgxYUFPQefYDH4/n4+MjlJH5+frTlf3Z2dm1tLTvDA1ztyJEj79+/T0hI4JaxKjo6OgEBAX5+fm/fvu3xUEdHR1hYmLKy8sGDB11dXcvLy319fbniyhkMGbGxsU+fPg0JCSE3NSsuLvb39z9y5IiWlha2sdFIUFAwISHh3bt3lM2Yt27dqqSkNMC03VTuubpz5w6CIP/88w9zbv9io1WrVsnIyHBgFw8UV9xnyKU4/LWFnGIRDn/fOQeH90lxcnKSk5P7/fs31oEMzq9fv2RlZdesWYN1IP3i8Pd9aEA4uE/Kr1+/Ro8e7erqinUgg4bea5mWlsbOg9bX1yMIQjlZh6Sk5NSpU9GZ9SIjIx89evTlyxd0ZU5+3/9MHP554OPHj8LCwkeOHME6kMHp7u6eNm3arFmzyP1iOzo6QkNDZWVlhYWF3dzcaG+gwyIc/r5zNU5+bbu7uydOnOjk5EReQiQS586dq6OjQ9nwmCv4+/sLCQlVVFSQl1y/fh2Hw7169aq/TajdMGZiYrJs2bJt27YZGBhwyHTrtMjNzY2IiEhISIAuHoDTQE4BQMWRI0fU1NT279/PFaPNyfbt29fW1kZlzDkA2CIQCMeOHXNwcFi1apWuri7W4dCqtbV18+bNlpaW5ubm7DxuXV3dli1bFCkICwuzMwAwhG3atEleXp7rblHH4/GnT5/W09OLi4tbsWLF1atXd+3a9fnzZ2dnZ19fXxkZGawDBH+oa9euvXv3jnK2sujo6EePHj1+/Jidt+IyxY4dO6Kjo7dt25aSkoIuWbJkibq6ekBAQExMTJ+bDND4Jzg4WENDw8PDIyQkhMnBssbPnz8dHR3NzMysrKywjgWAPkBOAdAfaWnpo0ePurq6mpiYGBkZYR0OTe7du3fy5MmLFy/CLYeAk9na2kZGRjo4ODx//pxbKvJbt26tr68/ceIEm487YcKEU6dOsfmg4E+Qm5ublpaWnp7eXxdtTjZt2jRnZ2dvb29fX9+PHz86Ozvv2bNnzJgxWMcF/miBgYHLly+fOHEi+mNnZ+e+fftcXFxobFbY2Njo7u7OygCRSZMmbd++nZY1+fn5g4ODTU1NHz9+PH36dARBcDjcrl27HB0dfX19x48f33uTAeo4Y8eODQ8Pt7KymjlzJptvTqYDiURycXFpaWm5ePEi1rEA0DfIKQCocHFxyczMtLe3LyoqYkrPe5aqra11cnKytLSk7K4HAGeKiorS0tJas2ZNUlIS1rEMLDEx8cKFC8nJyczqnAgA5vz9/fX09ObNm4d1IHTy8fGJioqaN2/e7du3lZSUsA4H/Ony8vKePXt27tw58pKYmJjq6updu3bRuIfW1tbIyEjWRPf/TExMaKzjoCvr6+v7+/unpqaiS6ytrX18fM6fP3/8+PHe6w884sjS0nLz5s0bNmzo3d2K0xw7duzGjRsJCQnkWccA4ECQUwBQERISIi4uTtm3nzO1t7dbWVmJiYlx70xA4I8iLS0dExNz/fp19o9wGazi4uI1a9Zs2bLFwsIC61gAYI6XL1/euXOHq9vhKyoq2traVlZWKigoYB0LAEhUVNTEiRN1dHTQH4lE4tGjRx0cHOTl5TGNiyHe3t63bt0qLCxEf+Th4Vm5cmVMTExXV1fvlWmaUP3YsWMvXrwwNTXNzc3l2BF0sbGx3t7eR48enTNnDtax0ATuUmGFqqoqrEOgCeQUK0BODaigoIDzu2OIiYklJyfPnj175cqVsbGxnHmHM5FIdHR0fPXqVU5ODoFAwDqcgRUUFECCgLlz5wYEBOzYsUNGRmbFihVYh9O3yspKU1NTLS0t7uqT1R81NbXS0tL+HkUnb2VnPAiCPH/+3M3N7cWLFy0tLbKysox8cKqurh47dqyrqyvlV+JMl56ebmxs/Pr1a3V1ddYdhdVOnjypqalpYmKCdSAM2bVr18SJE9PT0+fPn491LOCP1tHRkZyc7O3tTV5y7969d+/ecem0p2QLFiyYNGlSSEgI+TtCJycnPz+/9PR0U1PTHivT9PlYQEDg1q1bkpKS8+bNq6urY3K8zJCRkbF69ert27d7eHhgHcvAxowZY2lpiXUUQ5OcnBxXvLaQU8wFOUUjXV1dPT09rKMYmIaGxo0bN27cuLFp0yasY+mbh4fHjRs3kpOTueK6Qk9Pj/Prd9zO0tKSY4vylHbs2LFt27aVK1ei8ydymu/fv5uamkpISKSkpPDz82MdDnP8+++/6NwiaGWK/CNWA6Ps7e1lZWVra2vfvn3LYAvnqKgoIpEYHx/f1tbGrPCGpNbW1mvXrq1evZo8NTKX+uuvv3R1daOjo7EOBPzpUlNTf/78SdmhIioqSl9fX01NDcOoGIfD4ZydnZOSklpbW9ElCgoKM2bMiIqK6mNt2mfDqqqqGjdunIaGBnm2RQ5x8+ZNYWFhR0dH8mR4AHAFyCkAqEhOTubh4dm8eTNHTR7Z3d29adMmHh6ea9euYR0LAPQgEon29vbCwsK3bt3COpb/UV1draGhIS8vX11djXUstEIGmndcVVWVSh3Hx8eHxQH2hF4bhIaGMmVvKioq6EC/2NhYpuywT/fv30cQ5PXr17SszJlzJF+5coWXlxfzybmZIiQkRERE5NevX1gH8j84830fGjjztXV23a7yqQAAIABJREFUdp4zZw75x8bGRmFh4cH+ZaupqWF1XcbExGSwT622tpaXlzc+Pp68JDg4WEJCoqurq8eagxivLisrm52d3dHRMWPGjLKyMtY94UGJioqysLCwsrK6dOkStxe5wZ8GcgoAKpYvX56cnBweHm5packhX/Z2dHTY2dmFh4fHxsYuW7YM63AAoAcOh4uMjLS3t1+yZAnn9LAvLy+fM2dOZ2dndnY25/c4p11JSUl/zRq2bt168ODBM2fO4HA4HA535syZDRs2DB8+HIfDoXe9ffv2befOncrKyoKCgpMnT75x4wZ5W/JW58+fd3NzExcXl5WV9fPzI69QXl6+ZMkSKSkpAoGwdOnSgoICdCshISEEQdatW4fD4cij9G/duqWjoyMoKDhy5Mj169f/+vWL8hC9A0Pl5uYKCgoGBAQgCHL58uUez67PAKgs7y8Mb29vY2NjBEEmTZqEw+G4tPNFXFycmZnZyJEjsQ6ECWxsbDo7O2/evIl1IOCPlpmZaWhoSP4xJSWFSCRaW1tjGBKzSEtLGxsbx8XFkZcYGho2NDS8ePGi56qDLRHV19dPmzZtxIgR6enpg92Wubq6unx8fHA43O7du2HUAOBekFMAUJGRkSEmJjZ37tyamhpsI6murp41a9awYcOys7OxjQQAxhGJxF27duFwuL179/b+lo/N7t27JyUlpaen9+3bN2wjGSxkoPE4lHqMxyH7/fs3giDy8vKJiYlNTU2nT5+2sbEhkUju7u7u7u7fvn37/fv3lStXBAQEiouLe2yF3oX669evkydPIgiSlZWFPqqpqWljY1NbW9vQ0ODu7i4iIkK51YULF8j7SUlJweFwe/bs+fHjx4sXL9TU1AwNDdHPAP0FhlqzZs2RI0dIJJKenh4ej6+srKR8Uv0F0N9yKmFw+3iczs5OAoFw/vx5rANhmtmzZ69atQrrKP4HB77vQwYHvrYfPnxAEOTRo0fkJY6OjvPmzRvsfjhzPA6JRDpz5gyBQOjs7ER/JBKJI0eORP/eUqLnXWlqarKxscHj8Rie+6urq+fMmSMkJBQeHo5JAAAwEeQUAFS8fPly/PjxI0eOvH//PlYx3L17V1paWlVVlcZrCQC4QmhoqKCgoIGBAVa396LfH+DxeDs7u+bmZkxiYAQT6zhr1qyhvvmiRYvWrVvXY6vVq1ejP3Z1dQkLCx84cID0n5unyIF1dnZKS0tTbkVZx1FRUVFXVyf/iI6zePDgAfXAmpubhw0bVlVVRSKRzp49iyDIwYMHyY/2FwCVwKiEwe11nNzcXARBysrKsA6EaXx9fceOHYt1FP+DA9/3IYMDX9vw8HBhYeH29nbyEjk5Oco/QTTi2DoOOqPx48ePyUtsbGzMzMx6rEbPPCAiIiLx8fFnz549cuSIgYEB++dOjo2NnTx58tevXwsKClxcXNh8dACYDnIKACo0NDSeP39uYGBgYmKyY8eOpqYmdh799+/f27ZtMzMzMzIyevr0KVc0NgaARq6urvn5+dXV1ZMnT46Pj2fz0d+8eTNnzpygoKDz58/HxMQw2HOX22loaFBfYfjw4b1vwZ40aRL6Hx4eHikpKXTmBEFBwalTp+7atQttlsnLy1tbW9vnPquqqsrKyubOnUteMn36dARBHjx4QD2wq1evTpkyRVZWFkEQGxsbPj6+iIgI8qP9BdDfclrC4DSPHz9G61wDyszMlJOTGz9+PKtDYhtDQ8PKysry8nKsAxmcqqoqHAUeHp7hw4fPnDnzyJEj6E18A/L29ka3paVPfHp6Og6HKy4uHlSQ1dXVPDw8GzZsGNRWg0VfbJyjqKhoypQp5F7479+/r6qqMjAwwDYqJvrrr79Gjx6dkZFBXjJ9+vSioqIeq9E/n+v69esLCgpaWlomT57s5eXV3NxM965o9+7dO0NDQ0dHRwsLi2fPng14zgOAi0BOAdAfAoEQFxd34cKFy5cvq6mpJSYmsue4CQkJampq0dHR4eHhMTExXDHFOACDMnny5GfPni1ZssTe3t7IyKikpIQNB21qatq5c6eWllZ7e3tBQcHatWvZcFAOh3auofT27VsLC4tRo0bh8Xi0q1FDQ0OPdURFRcn/5+PjIxKJ6P/v3r27dOnSrVu3Dhs2bMGCBY8fP+7zoN++fUMoWuHgcDhpaWkEQSorK6kEhiDI5cuXHRwc0P9LSkqampp++PDh0aNH5BX6C6DP5bSEwWkCAwNHjhy5du3a58+fU1+zsLBwiM0YOG3aNF5e3sLCQqwDGRw5OTkSieTk5ITezdfR0fH69evVq1efPXtWQ0Pj9evXA+4hICDg3bt3LA0S5oCjRUlJiaqqKvnHwsJCPj4+HR0dDENiOl1dXcq/Laqqql+/fv358yflOvTXcRAE0dTUfPz4cXBwcFhY2Pjx44OCglh35fn+/XsXFxdNTc1fv37l5+efP3+e8tQFwNAAOQUAFatXry4pKZk/f/6KFSv09fX/+ecfFh2IRCKlpaXNmDHD1tbWzMyspKRk1apVLDoWAJgjEAhhYWG5ubk/fvzQ0NBYs2YN2n2AFZqamo4fPz5+/PiLFy+ePHny8ePH8P1Bnzo7O42MjD5//pyVlYV2SXByciKRSDRuLiEhcfz48erq6uzs7La2ttmzZ/c5ekJKSgpBEE9Pzx7D9alPLP3p06esrCx0Fm0UehsU5ZCc/gLoczl9YWCrsbGxtbU1IiJCR0dHQ0MjLCysv7GiJSUl3D4Xcg8CAgLjxo0rLS1l9YHa29vRGh8r8PDwyMrKrl69+unTpwiCmJub0zjAiqUiIiKsrKx+/vx5/fp1rGNhty9fvtC4ZmlpKWUdp6SkREFBgTw8Z2hQVVWlTDH0+b5//55yHYbqOAiC8PDwbNy4sbS01M7Obt++ffLy8n5+fp8/f2Zwt2QkEiknJ8fe3v6vv/7KyckJDQ19/PjxtGnTmLV/ADgN5BQAVIwYMeLSpUv5+fnDhg1buHChtrZ2TExMS0sLs/bf0tISExOjra29aNEiSUnJgoKC8PBw9BoDgKFNV1f36dOn58+fz87OVlNTs7e3z83Npb1wMKDKysr9+/crKCj4+vo6ODiUlpZu2LABj2f0g+hQVVFRUVNTY2Njo6amxsPDgyBIe3s7jdt+/fqVfL+Vrq7uhQsXOjo6nj171ntNOTk5NTU19DqWTFNTE+2I0Z+IiAg7OzvKgktTU5OUlFRiYiL65VN/AfS3nHoYnPlLgt6J09XVhSBIcXHxxo0bpaWlXV1de4xS6e7urqiooLzmHBp6XGSyyI8fP2RkZExNTa9cucK6Iou0tPShQ4eqqqrOnz9PXtjn7Gl9GtQ8a9R3+4fPAefo6KisrHzgwAHqXyQ0NzdXV1dT5lSPss7QoKqq+v79++7ubvRHeXl5AQGBnklHR+ud/tTX1+/evVtKSgqPxxsYGFy6dOnr16/07YpIJL58+XLv3r2KiooIgmhpacXFxWE+nwIAbAY5BQAVhYWFlpaWfHx8BALB2dn53r17ra2t9O2qpaXl7t27Tk5OBAKBj4/PysqqqKiIudECwC26urpiYmImT56MIIiSktK+fftevXpF9ySGNTU1Fy9enDt3Lh6PHzFixN69e7luUioqEOb1OabsPUwikdra2kaMGKGhofHmzZvW1ta7d++Ki4trampS2UpJSWnTpk2k/zTvDAoKamxsbGho8PT0FBQULC8v73OrtLQ0Hh6ew4cP19fX19fXb9u2bcKECejf0j4DIxKJSkpKb9++7fEs/P39EQSJiIigEgCVwKiEgTYNTEpKqq+vHzVq1NOnT6m8yOQKlKCgoISEhIyMzIQJE7S1tfX19RcuXGhlZeXo6Ojm5ubl5bVv377g4ODQ0NDIyMjU1NT79+8/evSouLi4vLy8urqaPFNMf/ocYsPHx4cgyKRJk0JDQ3///k0ikSoqKhAEKSgooL43rrN169bp06ez+ijoAA08Ho/H4/n5+a2srFJSUtra2nqvSXsvXvJ9VZQaGxtxOJyBgQH6I5XZ09D7qm7fvj3gmr37c1NZGfWHzwE3Z84cBEF4eXnR65QTJ0702YAfbRNWWFhIXjJ16lQPDw86jsixfY5JJFJeXh6CIB8/fiQvUVRUPHz4MOU6zH9X2tvbU1JSli9fLiAggMPh1NXV3dzc4uLiCgsLm5qaqGz49evXrKyskJAQGxsb9LbY0aNHb9++/eXLl0wPEgAuAjkFABV1dXUnT55E74sWFBQ0NDQ8cOBAWlra+/fvqXwQ7+zsfP/+fVpamp+fn4GBgaCgIIIg06ZNO3XqVH19PTvjB4BjvXjxwsPDQ0ZGBkGQkSNHrlixIiQkJDs7u7a2lspWTU1NhYWFcXFxW7ZsmThxIpqYlpaWN27c6OjoYFvw7IHQXMcRFxcnf7JH75BCxcXFUX7ob2hoID/05MmTWbNmiYqKjhkzxtXV1dLSEl2npqaGcit7e3vKQbtKSkokEunWrVvGxsaSkpJiYmIzZ85EJ346ffo05bHIs/bevXtXV1dXQEBg5MiRdnZ2nz9/7i8wysseymK3l5dXj+uWPgOgsry/MFAbN24UFxcXExPbuHEj9dcZveZMTEwMDQ0NDg4OCAjw8vJyc3Nbu3atlZXVggUL5s2bp62t/ddff8nLy0tISFC5F4NAIEhLSysqKk6ePFlXV9fIyMjCwsLe3t7V1XXnzp0SEhL9bYj20BUSElq7dm1sbCyCIB8+fKDll4SLHDhwQEVFhdVH6XGjDR8fHw6HExERcXBwSE1NpTzFM1jHIZFIkpKSioqK6P+pzJ7Wo44zqHnWqKxMgjng/lPHIScR+nZPmzYtODi4rq6OvBraNYYyp5SUlA4dOkTHETm5joMOvXnx4gV5iaampo+PD+U6OBLzRsz20NTU9H/t3WtUE2ceBvBJALGScLFyExAEmwTFUu60QZEgakOtFqroFtB1ba3UWql4tGK91SpsCy0uWN3WgqBolbUiIIuXRJAVUG6KIAGhVkFEogYSFhBD9sPsZnMAKWhgAJ/fp+TlJfMMYTjMP+8lJydHIBAIhcLr16+TIw/NzMyMjIwYDAaDwdDR0ZFIJFKpVCaT1dXVNTc3EwShq6vL5XK9vLx4PJ6Dg8PwHEsJQAlcUwB9uHPnjlAoFAgEFy9eJFfHHDNmzKRJk/T09PT09Mjln2QyWXNzs0QiuXv37pMnTwiCsLS09PT05PF4PB7PwsKC4nMAGH7kcnlJSQl5cV2+fJkcma+vr29mZsZgMJhMpr6+fmtrq0wmk0qlTU1N9fX1BEFoaWlNnz6dvLLIYgTV5zEoaDTaL7/8snjxYqqDwH8dP348ICBgQHc3XV1dzc3Nra2tbW1tLS0tMpmsra2N/FeKfCCVStva2sjfcPJBS0vLtWvX+j/TLTY2NiQkhEajPdc5DUd79+6NiIjo/4Imz6ehoWHixIk928eMGfPkyRM9Pb2AgICgoCAul3vixIl+vu/Lly9PSUnpuZjRq6++qq+vX1NTU1dXZ2FhsWbNGmXds6mpycjIaPPmzV9//XVlZaWtrW1mZua8efP67nn+/HkfH5+ysjJym8u+OxMEkZSUlJCQQO7R9vDhQ1NTU0tLS9X1UFxdXR8+fBgREfHOO++orj7ea/uAsvXtOa6p5zNr1qzs7OxujeSsUhqNNnv27KVLl/r5+RUVFc2aNauxsZH8iJogCBMTky1btqxZs2agR7x//z75QcXgmTt3bn92N+uJzJaTkzNjxgyyZcaMGQ4ODnv37lX20VRPxt4wGAw+n8/n8wmC6OzsrK2traysrKmpEYvF5J/C1tZWa2tr8p8AExMTFovFZrPJLQwBoCdcUwB9mDRp0rJly5YtW0YQREtLS1VVlUgkun37tlQqlUgk5D9tpqam+vr6TCbTysqKzWazWCxdXV2qgwMMaxoaGs7Ozs7Ozhs2bCAIor6+XiQSVVVV3b9/n7zXffz4sbGx8ZQpUxgMhqGhobW1NYfDsba2JueYAAxzdDrdwMCgj/E1vRo3blwfX9XS0urs7GQymY6OjtnZ2X5+fqOpiEMQBJPJlEgkJ06cGNSj9NygjUR+DNPc3BwfH//3v//d3Nz8Bdd5JCf62dvbEyq7p8XGxqr26bl7Wv979qdzfHx8UFAQ+ZjcAy4tLe3SpUvK2/isrKxdu3atW7cuMDBw9uzZW7dudXNze1b7gLL1x2C/1wRB9LpSuHKBmHPnzmVlZa1atYo8a21tbWUfqVQ6+j4qIDdIVV0WislkdlslahDrOKq0tLTYbPboW4IIgCq4pgD6oKurS955Uh0EYLQxMzMzMzPj8XhUBwGgjEKh6LktNI1G09TU7OzsNDc39/Pzmz9/vqenZ1paWnZ2tnLgwKgxduzYjo4OykeidXZ2EgRRV1dXV1dHEERGRoavr+9zvM7p06cVCgX5Qaly97TIyMi+v6v/Pf+wM7kHnFAoXLFihWp7QkKCso5D7vUWFRWVn58fHh4+c+bMiooKGxubXtsHlK0/huC97vuDZ7Kg097eTo7Z2bNnz86dO8l5kR0dHaplndGBPCPVvzNjx47t9mcHMywAAAAAAAD6hVyAmXysoaFBo9HodDqXy42MjKyurr57925MTMzs2bO1tLR0dHQIgiC38RpNpFKprq7u8y380X99z9si7+GNjY3Xrl27Y8cOgiCer4jT2NgYHh5uYWGxatUqYiCbuA1on7W+Ow//PeAG+71WKBRTpkx51tE1NDTodLqWlhafzw8PDycIYvPmzcrFrXR0dEbfJUaOTlIdZySTychBOkqo4wAAAAAAAPSLcgIIk8lcvHhxcnLyw4cPL126FBoa2u1etOfkiNFBKpV2u6UcMuR+Rrq6ugEBAefOnWtoaIiJiel1+7C+yeXy+vr6n3/+2cXFhU6nZ2RkKM8oKioqJycnIiJCLBaLxeLPP//86dOnCxYs6PkiffQkF16prKwUi8WmpqaFhYXP6qxQKJKSksjyhJKOjk5oaKhMJktJSSFbbty48d1337W0tEgkkgMHDowdO9bFxaWP9gFlG+hPb2iQS4bT6fSZM2fGx8c/fPgwIyODHDbV94SjUYA8I9W5/y0tLajjAAAAAAAAPA+FQhEWFnbx4sVHjx4lJycvWbJEX1+/156o46iLpqYmnU7X1tZesGDB6dOnxWJxYmLi7Nmz+7/wUF1dHY1GO3ToUGtrK7kd0vTp0w8ePLhmzZrr168rR7UQBMHn88+cOZOammpubm5nZ9fY2JiVlTV27NhNmzbZ2toSBPH2228HBgb20ZMgCFtb25CQkJUrV9rY2Pj5+Tk7O/faWSKR0On0mpqaqVOnlpaWKjNs2rSJrOwsX7583rx5JiYm6enpmZmZ1tbWlpaWly9fzsjIsLa2flb7QLOp7X1SB+VmVS4uLlFRUQ0NDQKBIDg4mPyV63lN6erqjspLjPjfySpbul10Q7Q+DgAAAAAAwEhnbGz8zTff9KeniYkJQRD19fXPMWBkOKuvrydPbWiQE2qCgoJ8fX3JSsRzMDc3V/R706U5c+bMmTOnW2NERERERER/epLi4uLIHcT77txrqp7H8vX17XXi2LPaB5pt+Jg2bdqyZcsCAgJ63UVUT0+PIAiJRKJsMTY2JvdJHE3IM1K9yiQSCXnuSqjjAAAAAAAAqJmhoeH48eNFIpG3tzfVWdRJJBKpDmAZJHQ6fc6cOUuXLn3vvfe63cHC6MPhcDw9PZcuXdp30dPMzExbW/vWrVvu7u5kC5vNFolEQ5Jx6FRWVk6YMOHVV18ln7a2tjY0NJAjrZRQxwEAAAAAAFA/FotVVVVFdQo1E4lE/v7+g30UY2PjrKyswT4KDBP79+/vTzcNDQ0bGxvVa4rNZp8+fXrQclGjqqpKdVfi6upqhULRrcKF9XEAAAAAAADUj8PhlJeXU51CncRi8YMHD0bZTDEYQboNwOFwOA0NDY8ePaIwktqVl5er1nFEIpGmpubkyZNV+6COAwAAAAAAoH5vvfXW5cuXnzx5QnUQtbl48aKGhoabmxvVQeAlxeFwKioqlE/ffPNNDQ2NnJwcCiOpV0dHR35+PpfLVbZUVFRYW1srt1onoY4DAAAAAACgfjwe79///veVK1eoDqI2AoHAycnpWVt0AQw2d3f38vJysVhMPtXX17e3txcKhdSmUqO8vLy2tjYej6dsycnJeeutt7p1Qx0HAAAAAABA/WxsbCZNmiQQCKgOojYCgcDLy4vqFPDy8vT0pNPp2dnZyhYej3fhwgUKI6mXQCCwtra2srIin7a3t+fn5/e86FDHAQAAAAAAGBR8Pj8lJYXqFOpx48YNkUj0rI2uAYaAnp6eo6Oj6gAcPp9fXl5+8+ZNClOpUUpKCp/PVz7Nzc1tb29XHZ5DQh0HAAAAAABgUAQGBpaVlZWWllIdRA0SExMtLS09PDyoDgIvNR6Pp7qXmaenp4WFxeHDhymMpC6FhYU3b94MCgpStpw9e5bFYpmbm3friToOAAAAAADAoOByuSwWKykpieogL6qrq+vo0aNBQUE0Go3qLPBSe//992/dulVQUEA+pdPpgYGBhw4dksvl1AZ7cUlJSa+99pqLiwv5tKur69ixY4sWLerZE3UcAAAAAACAwRIUFHTo0CGZTEZ1kBeSmpp679491ZECAJRwdna2s7NTrY0uW7bs3r176enpFKZ6cVKp9PDhw8uXL1eWSoVC4d27dwMDA3t2Rh0HAAAAAABgsISEhDx58uTAgQNUB3khu3fvXrhwIYvFojoIAPHBBx8cPXq0o6ODfMpms999993du3dTm+oF7du3r7Ozc/Xq1cqWpKQkV1dXDofTs7PmEAYDAAAAAAB4uYwfP37VqlXffvttSEjIK6+8QnWc55GZmVlYWPjDDz9QHQSAIAgiMDDwyy+/TElJ+eCDD8iW8PBwV1fX8+fPz549uz+vYGBgkJaWNpgZCSMjo/53bm9vj4mJ+eSTTwwMDMgWsVickpISGRnZa3+aQqFQQ0YAAAAAgJcJVgkZnobn3U1DQ4ONjc2OHTs2bNhAdZYBk8vlbm5uxsbGGRkZVGfpxfHjxwMCAobn+z7SDeefbWBgYHFx8Y0bN+j0/84xmjt3rkQiycvLU7aMIHv27Nm1a9dvv/2mrP5s2bJl//79t2/fZjAYPftjPA4AAAAAwID98ssvVEeAEcPU1HTjxo3bt29fvHixpaUl1XEG5sCBA9euXSsuLqY6CMD/hYeH29nZnT59euHChWRLdHS0g4PDTz/99NFHH1GbbaDu3r379ddfh4eHK4s4LS0tcXFxGzZs6LWIQ2A8DgAAAAAAwGDr6Oiwt7efPn36iRMnqM4yAA8ePOBwOB999FFERATVWXo3nMeMjHTD/Gfr7+9/586dK1euKEdHrl+/PiEhobKy0tDQkNpsA/Lee++Vl5eXlZVpa2uTLbt27YqKirp9+7aenl6v3zLyRhwBAAAAAACMLNra2jExMf/4xz9G0EguhUKxatUqJpP55ZdfUp0FoLutW7eWlJQcOnRI2bJ9+/Zx48apLhU8/CUnJ6empu7bt09ZxKmrq4uMjFy/fv2zijgE6jgAAAAAAABDYO7cuZ988snKlStFIhHVWfolJiYmLS0tPj5eR0eH6iwA3dnb24eEhISFhYnFYrKFyWQePnz41KlTsbGx1Gbrp1u3bq1evfqzzz5TXZ45NDTUxMQkLCysj29EHQcAAAAAAGAofPvtt2w2e+nSpe3t7VRn+QMFBQUbN27cuXMnj8ejOgtA73bt2qWtra06XszT03Pbtm1hYWGFhYUUBuuPtrY2f39/NputuinVuXPnUlJSYmJixo4d28f3Yn0cAAAAAACAIVJTU+Pq6jpz5syUlBQNDQ2q4/SupqaGy+U6Ojqmp6cP891/yDVcRtBstREkLy/v+++/H+YVgyNHjgQHB//zn//08fEhW7q6uvh8/vXr1//1r39NnjyZ2njP8vTpU39//9zc3MLCQmXIx48fOzg4uLi4/OEqWqjjAAAAAAAADJ2CggJvb29/f/+EhIRhuIF9U1OTh4eHrq6uQCBgMplUx/kDZB2H6hSj2fCvGAQFBZ09e7akpGTixIlki1Qq9fLykkgkubm5JiYm1MbrSaFQfPjhh8nJyefOneNyucpGf3//q1evlpSUTJgwoe9XQB0HAAAAAABgSKWlpfn5+X366adRUVHDqpTT2Ng4b9681tbW3Nxc5S7IAMOZTCZzcXExNja+cOGCcoxbY2Ojh4cHg8HIysoaVr/JCoXi888/j42NPXXqlK+vr7I9Ojp648aNAoFgxowZf/giw3qMHAAAAAAAwOgzf/78pKSkuLi45cuXd3Z2Uh3nv2praz08PFpbW8+ePTusbn0B+sBgMI4dO1ZQUKC6NrCxsfHZs2dlMpmHh8dvv/1GYTxVnZ2dwcHB+/btO3z4sGoR5/z585s2bfrqq6/6U8QhUMcBAAAAAAAYekuWLElLSzt58uTChQubm5upjkNcuXKFy+Xq6+vn5uZaWVlRHQdgAOzt7RMSEvbu3au6ZvDkyZNzc3OZTCaXyx0Oyx5LJJL58+enpqZmZGSoTgYsLi728/NbvHjxxo0b+/lSqOMAAAAAAABQYM6cOQKBoKSkxMnJqaioiKoYCoUiJiZmxowZDg4OQqEQI3FgJAoICIiNjf3iiy8OHjyobDQ2NhYKha+//rqHh8ff/vY3CuNdvXrV0dGxrKxMKBSq7jJeW1vr6+vr4uJy8ODB/k+xRB0HAAAAAACAGi4uLiUlJZMnT+Zyud9//71cLh/iAA8ePPDz8wsLC9u2bVt6ejqDwRjiAADqsnr16s2bN3/88cfx8fHKRl1d3TNnzoSHh4eGhvr7+zc1NQ1xKrlcHh0d7eHhwWKxSktLnZyclF+qrKzk8XgWFhapqana2tr9f02N7du3qz8pAAAAAAAA9AODwQgsMhr+AAAGDElEQVQMDKTRaFu2bElLS3vjjTfMzMyG4LhyuXz//v1+fn6PHj06deoUmWEIjgsweHg8nra29tq1axUKxaxZs8hGGo3m6ek5c+bMuLi47777Tk9Pz9HRcWh+2/Pz8xcuXHj06NFt27b98MMPqnXSq1ev+vj4mJubnzlzRl9ff0Avi/E4AAAAAAAAVKLT6Vu2bLl27Zquru6bb775l7/8pba2dlCPmJmZ6ebmtm7dug8//LCiomLmzJmDejiAIbNx48aYmJivvvpq3bp1qgPcZs2aVVFRsWLFirVr17q5uWVlZQ1qjJqamhUrVnC5XAMDg2vXrm3evJlO/3/5JT093cvLy93dXSgU/uEu4z2hjgMAAAAAAEA9W1vbCxcuJCUlXbx4kc1mBwcHV1RUqPcQXV1dv/76q7OzM5/PNzY2Li0tjYyM1NHRUe9RAKj16aefJicnHzhwwNvb+969e8p2BoPxzTfflJSUTJgwYd68eS4uLqdOnerq6lLv0SsqKoKDgzkcTk5OzpEjRy5cuMDhcJRfffr0aXh4+IIFC5YsWXLy5Mlx48Y9xyFQxwEAAAAAABgWaDTan/70p+rq6uTk5KKiomnTpjk7O8fExLz4oh4VFRXbt2+fMmWKv7+/qalpQUFBRkbG1KlT1RIbYLgJCAgoKioSi8X29vaZmZmqX5o2bVpmZmZpaamtre37779vYWHx2WeflZSUvOARJRJJYmKij4+PnZ1dcXHxwYMHKysrlyxZotqnvr6ex+NFR0dHR0f/9NNPmpqaz3csmkKheMG4AAAAAAAAoF5dXV3nz59PSkr69ddfOzs73d3deTwej8dzdXXt55KoYrE4OztbIBBcuHBBJBJZWVkFBgYGBwe/9tprgx0eYDiQSqUff/zxsWPHVq5cuWfPnvHjx3frUFVVlZiYePjw4d9//53D4Xh7e3t5eXl6evZzrlNHR8eVK1cEAoFAIMjLyxszZoyfn19QUJC3t7fqLCqCILq6un788cfNmzcbGRkdP358+vTpL3JeqOMAAAAAAAAMXzKZ7PTp0+fOnRMKhb///rumpqaVlRWLxWKxWIaGhoz/kUgkLS0tMpmsvr6+qqqqsrLywYMHGhoaTk5OPB6Pz+d7eHhgJWN4CR09enT9+vWdnZ2RkZF//vOfe14FXV1dly5dyszMFAgExcXFcrncyMiIw+Gw2eyJEycymUwmk6mvry/7nwcPHlRXV4tEotu3b8vlcisrKy8vLx8fn/nz5/e641tRUVFISEhJScnatWt37Njx4jMZUccBAAAAAAAYGWpqaoqKisgyTW1tbVNTk/Le0sDAgMlkMhgMExMTNpvNZrM5HI67u7uenh7VqQEo1tLSsnXr1ri4uNdffz08PHzhwoXdxssoSSSSgoKCmzdvikSiqqqq+/fvy2QyqVT6+PFjZc3U0NDQxsaGw+GwWCwnJydra+tnHffGjRu7d+8+fvw4l8uNi4uzs7NTy+mgjgMAAAAAAAAAo1xZWdnOnTtPnjzJ4XC++OKLRYsW9XOK4nMoKCiIiIhITU21s7PbsmXLokWL1DgaDnUcAAAAAAAAAHgp1NTU/PWvf/35558ZDMb8+fODg4O9vb3VVWSpr69PSUlJSEgoLS194403QkNDAwMDnzX257mhjgMAAAAAAAAAL5H6+vojR44kJiaWl5fb2Nj4+PjweLxZs2YZGhoO9KU6Ojry8vLIBcXz8/MNDAyWLFkSFBTk5uY2CMEJAnUcAAAAAAAAAHg5FRcXp6SkCIXCwsJCuVxua2s7depUFovFZrOnTJliYGBAroljYGCgXItKIpHcuXOnqqqKXKmqtLS0ra3N2tqax+O98847b7/99pgxYwY1M+o4AAAAAAAAAPBSk0ql2dnZeXl5IpFIJBJVV1d3dHQ8qzONRrO0tCTLPY6Ojl5eXpaWlkMWFXUcAAAAAAAAAID/k8vl9+7da25uJsfgPH78WEdHhxybo6+vb2pq+sorr1CVDXUcAAAAAAAAAICRQc3LJgMAAAAAAAAAwCBBHQcAAAAAAAAAYGRAHQcAAAAAAAAAYGT4D9D731X6hs6CAAAAAElFTkSuQmCC", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" + ] + } + ], + "source": [ + "\n", + "log = import_csv_original(file_path)\n", + "log_other_model = import_csv_original(file_path_other_model)\n", + "\n", + "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", + "\n", + "gviz = pn_visualizer.apply(net, initial_marking, final_marking)\n", + "pn_visualizer.view(gviz)\n", + "\n", + "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", + "\n", + "print(aligned_traces)\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + }, + "vscode": { + "interpreter": { + "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json new file mode 100644 index 0000000000..c09113c41f --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json @@ -0,0 +1,18 @@ +[ + { + "caseID": "basic-TEST", + "receiptID": "txID1", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "methodName2", + "parameters": [ + "0", + "2" + ], + "timestamp": "2024-05-27T09:05:43.640Z", + "identity": "person 1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 4 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json new file mode 100644 index 0000000000..be97efbdd9 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json @@ -0,0 +1,63 @@ +[ + { + "caseID": "BESU_MONITORING", + "receiptID": "0xe6800f6ff8d1a8ea5ee677dbb9320f849d28a8a533608affea5ef138be088736", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b", + 10 + ], + "timestamp": "2024-05-27T09:34:25.795Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 3457 + }, + { + "caseID": "BESU_MONITORING", + "receiptID": "0x320482edd9e264453bbd7dee3826b7f9960fcaa27ce70398e21eee9be14423aa", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b" + ], + "timestamp": "2024-05-27T09:34:27.303Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 1953 + }, + { + "caseID": "BESU_MONITORING", + "receiptID": "0x99ae2b0951af4d674734bdc8ba21838eb2df3aefa7d2bc54f51c12ad713c06b5", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "isPresent", + "parameters": [ + "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b" + ], + "timestamp": "2024-05-27T09:34:28.641Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 25157, + "carbonFootprint": 0.00018, + "latency": 615 + }, + { + "caseID": "BESU_MONITORING", + "receiptID": "0xd2da2adaf8f4e39dbd55ff8b42179efd67d402c58a61cdd30ca8d142be955f5c", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b" + ], + "timestamp": "2024-05-27T09:34:29.246Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 11 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json new file mode 100644 index 0000000000..1fcd8d1fa4 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json @@ -0,0 +1,425 @@ +[ + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x6b2082f5ca10801ab311fefa9fd5fc0ddcca253da5707232ac07599585d88fb4", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c", + 10 + ], + "timestamp": "2024-05-20T10:32:59.263Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 110153 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x8bcbdc64574f2767526685aedb2197158da87c619a4bb7bf64e3aaa00ac72872", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" + ], + "timestamp": "2024-05-20T10:33:00.553Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 108865 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x8068f71dc71de14e80c8b6be2042c2001ac383c42bc363608df5510277cedc81", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" + ], + "timestamp": "2024-05-20T10:33:01.883Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 107535 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-20T10:33:07.943Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 129786009655382, + "carbonFootprint": 0, + "latency": 101476 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-20T10:33:12.103Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 41156218131450, + "carbonFootprint": 0, + "latency": 97316 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-20T10:33:17.246Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 40955165049120, + "carbonFootprint": 0, + "latency": 92174 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "453887cf863ff5329f47ba82b0a6de9d63a1b7eb07be932ac4d6fd71c03f1227", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", + "10", + "owner1" + ], + "timestamp": "2024-05-20T10:33:23.599Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 85821 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "547e59b76a912a65638585f42d33e264cefe1898a10cfeafd97929a6547dfd96", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", + "owner2" + ], + "timestamp": "2024-05-20T10:33:29.855Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 79566 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "9486bee925044c747d5faa942449f899d3c8a8c9e9a42ffe37ca46278545e636", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850" + ], + "timestamp": "2024-05-20T10:33:35.386Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 74035 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0xafac857fc46846e2c6bb651a1c406606f58357211fb65f6887617a5cac878c23", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c", + 10 + ], + "timestamp": "2024-05-20T10:33:36.055Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 73367 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x5061e439a6cff371957872531932990013c6e052d82b7ab199785c2fd7e74e93", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" + ], + "timestamp": "2024-05-20T10:33:38.902Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 70520 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0xe72063132b259c1a57e202cb5321258102767816b1240f513499faa04af8781d", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" + ], + "timestamp": "2024-05-20T10:33:40.054Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 69369 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-20T10:33:47.139Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 103394573872490, + "carbonFootprint": 0, + "latency": 62284 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-20T10:33:52.281Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 33538215602250, + "carbonFootprint": 0, + "latency": 57143 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-20T10:33:57.501Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 34079554985280, + "carbonFootprint": 0, + "latency": 51924 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "525368f5e7ebbed3edd2cb5f52fcc5f441bbdff5863fc08597b87402abaa681e", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", + "10", + "owner1" + ], + "timestamp": "2024-05-20T10:34:03.161Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 46264 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "5374737a2ac9149c4068a776249c2bc5b45e80b34c5f37a9340966a4edf2c4a4", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", + "owner2" + ], + "timestamp": "2024-05-20T10:34:08.645Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 40780 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "67fdd728e47ab2ae655ecca44bda5999067cf11c2e79bd317ee6ad03dd5eb5cf", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850" + ], + "timestamp": "2024-05-20T10:34:14.183Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 35243 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0xf7e10e0fa005951955ab2e03d1742430d4b9e73303c07cadf640148460f1859e", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c", + 10 + ], + "timestamp": "2024-05-20T10:34:15.031Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 34395 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0xe96e1c157a0c42487428da97c6a97c548bcd4d17b25fdbc8d8ca747adfbeeac6", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" + ], + "timestamp": "2024-05-20T10:34:16.505Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 32922 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x03abead1107ae01dff9bdfb941124e80adc0609bd613461152c0df7d902a1c63", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" + ], + "timestamp": "2024-05-20T10:34:17.879Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 31548 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0xdaf77bc2c7bdba632dd34d7ff8036dcb18c3fcfcfa8a34e315099a674c662351", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-20T10:34:22.191Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 95004006312862, + "carbonFootprint": 0, + "latency": 27237 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x3e8cc1e7762ebbf015fbcc7527be575ce932bad1e52c277ef5ad06978f46c90f", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-20T10:34:27.469Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 31116241250400, + "carbonFootprint": 0, + "latency": 21959 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0xbf8a4b150c4c431b415829e5722840f1e7541109507b7ca497f7bc2453b64fed", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-20T10:34:32.014Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 31893607627440, + "carbonFootprint": 0, + "latency": 17414 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "8e2146a7989e14efbc97d369a98d8203401dfbd034df77fcb66f7b32e4a50e99", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", + "10", + "owner1" + ], + "timestamp": "2024-05-20T10:34:38.174Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 11255 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "cd118aeed54618ead4514f17c2682178f4f788b7e5f7f0d0772744ae22e9f9b2", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", + "owner2" + ], + "timestamp": "2024-05-20T10:34:43.744Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 5685 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "93f066ba9539c48b32a11b2e6cd469cab38e9cb4e78be4385f259286afb674cb", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850" + ], + "timestamp": "2024-05-20T10:34:49.405Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 25 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json new file mode 100644 index 0000000000..263cd1cc4b --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json @@ -0,0 +1,425 @@ +[ + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0xb81ed2022db3f730c182da98690974fa6b2b1f4ae503d4d9c9160c160a0cc589", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94", + 10 + ], + "timestamp": "2024-05-27T09:15:37.576Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 116909 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x3957718d932e5c08f5183d7e354f27e92bbf1f7bad03f23300bce9190e0e9c1d", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94" + ], + "timestamp": "2024-05-27T09:15:39.273Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 115213 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0xc23ab99376855ab985aa8964ce2da5a6d7ff4539c34b33daf54d927396547808", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94" + ], + "timestamp": "2024-05-27T09:15:40.109Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 114379 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:15:46.123Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 129786009655382, + "carbonFootprint": 0, + "latency": 108366 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:15:51.381Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 41156218131450, + "carbonFootprint": 0, + "latency": 103109 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-27T09:15:56.367Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 40955165049120, + "carbonFootprint": 0, + "latency": 98124 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "88ab44939551ea52c8abdb2779163278a07713bf397b215cce2dac9be478b08a", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a", + "10", + "owner1" + ], + "timestamp": "2024-05-27T09:16:03.019Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 91472 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "04a5f33f1461b1f446086dcd435cedfb7f690b35b4359f87724a18755fd12bbb", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a", + "owner2" + ], + "timestamp": "2024-05-27T09:16:08.577Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 85916 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_1", + "receiptID": "5f25721a387592f30d493aa455025aff308c7009b7b05d45949006e7e964094f", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a" + ], + "timestamp": "2024-05-27T09:16:14.245Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 80250 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x9198a615db48db3c018bef59d47dfb93568dbbf6d04a56acb595db24d192fc06", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94", + 10 + ], + "timestamp": "2024-05-27T09:16:15.243Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 79254 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x1451b68f1f59a5425cb442075c2a8504ad08d0fe605180ee3a02e9019f82c3f3", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94" + ], + "timestamp": "2024-05-27T09:16:17.305Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 77194 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x0801c6aecd6d105d0249d51868050395cad9b5e17f56ee4654c2ec47cbf49f82", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94" + ], + "timestamp": "2024-05-27T09:16:18.359Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 76141 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:16:26.125Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 103394573872490, + "carbonFootprint": 0, + "latency": 68378 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:16:31.184Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 33538215602250, + "carbonFootprint": 0, + "latency": 63331 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-27T09:16:36.363Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 34079554985280, + "carbonFootprint": 0, + "latency": 58154 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "ec20bf8b8418971e43685ba2b6bee62c845dd272d901af92a158d21e982a8d47", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a", + "10", + "owner1" + ], + "timestamp": "2024-05-27T09:16:43.981Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 50536 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "d68666a62b997c8527718aba35b7fddef109dafee2273133b618847e2a8074c6", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a", + "owner2" + ], + "timestamp": "2024-05-27T09:16:51.969Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 42549 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_2", + "receiptID": "5cbf80fe64c979d92f0e35f40bd130a05772d36268c2ee3f73d2aad463359978", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a" + ], + "timestamp": "2024-05-27T09:16:59.118Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 35400 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x4985326b838f116fa612b9c1d81335ea4ee957a20c54a44ae42579ec4710a99a", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94", + 10 + ], + "timestamp": "2024-05-27T09:17:00.202Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 91441, + "carbonFootprint": 0.00018, + "latency": 34317 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x967eb4286a012277a74270dce024c9c0872739c0733f8211b206ccf16432a122", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94" + ], + "timestamp": "2024-05-27T09:17:01.250Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 30543, + "carbonFootprint": 0.00018, + "latency": 33269 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x7d6c1bdfaafd4b5f4799450da507b517603d2963291649ec832d191944dca56d", + "blockchainID": "BESU_2X", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "024505e9-8b77-4fcf-a9f1-63d2fe838f94" + ], + "timestamp": "2024-05-27T09:17:02.477Z", + "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", + "cost": 20705, + "carbonFootprint": 0.00018, + "latency": 32051 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x8f63925f9c4e05884840fc15df27f41cd75d97a13a3aa3a34ed8497cde5af522", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:17:06.542Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 94325755557346, + "carbonFootprint": 0, + "latency": 27986 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x972b7d58b0cd9e3e603c577f2cb4fabd8a64ed0c070d55950bf403e27f446390", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:17:11.777Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 30920461153200, + "carbonFootprint": 0, + "latency": 22752 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0x5bcfdbf3d6b1baf09446a581afb9b9dd76298639f7bda9db71f6a60d8d55ea15", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-27T09:17:16.969Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 31716906746400, + "carbonFootprint": 0, + "latency": 17563 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "0e1e5982732b3426ca1feb4a0585d48adc3ee67706c7c92289ace06d949a4fad", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a", + "10", + "owner1" + ], + "timestamp": "2024-05-27T09:17:22.893Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 11640 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "b925b6b6e68a07c12be5fe01a58869f844cd73d88254f3b427a65ac52eae7a32", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a", + "owner2" + ], + "timestamp": "2024-05-27T09:17:28.417Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 6116 + }, + { + "caseID": "BESU_ETHEREUM_FABRIC_3", + "receiptID": "b99476b1334e81083ae88ae4991d72af4ca91adb63022ee8e37cde0beae10621", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "966c0c39-b39a-49de-bf00-82b62444615a" + ], + "timestamp": "2024-05-27T09:17:34.473Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 60 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json new file mode 100644 index 0000000000..aad876857b --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json @@ -0,0 +1,48 @@ +[ + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0xc0730eff8158a22803060879fd555b04d3940733b58f3b5d73698ea693e5d8de", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset2", + 10 + ], + "timestamp": "2024-05-17T14:52:01.098Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 103396064181676, + "carbonFootprint": 0, + "latency": 10250 + }, + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0x319fc6d76fc7216599060623d0613fea997d164b8c7fbab08635190556d12162", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset2" + ], + "timestamp": "2024-05-17T14:52:06.257Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 33538645761600, + "carbonFootprint": 0, + "latency": 5091 + }, + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0x6ea284a62910fd25c30722aa7b20b325cc5f4304f25cd10d0186041b39e7e95e", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset2" + ], + "timestamp": "2024-05-17T14:52:11.337Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 34079943209040, + "carbonFootprint": 0, + "latency": 13 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json new file mode 100644 index 0000000000..7961841699 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json @@ -0,0 +1,65 @@ +[ + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:33:21.366Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 135530010970738, + "carbonFootprint": 0, + "latency": 15298 + }, + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:33:26.632Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 42814248832950, + "carbonFootprint": 0, + "latency": 10033 + }, + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0xdddabe51b7894122aed2ec29891c8de590b727cfbea99dbdabc55feb1ba04718", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "isPresent", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-27T09:33:31.653Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 33945972851475, + "carbonFootprint": 0, + "latency": 5012 + }, + { + "caseID": "ETHEREUM_MONITORING", + "receiptID": "0x154f57cfdd1c482a246377a80ddcaaa1e14d92678882a119cb0cdf96ebb83d7e", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1", + "owner1" + ], + "timestamp": "2024-05-27T09:33:36.658Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 40955256397680, + "carbonFootprint": 0, + "latency": 7 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json new file mode 100644 index 0000000000..22e8d70b03 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json @@ -0,0 +1,66 @@ +[ + { + "caseID": "FABRIC_MONITORING", + "receiptID": "4b21851915d609fc0541037a569ce502ac9b87a415664755494422e4e8cb30dc", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "CreateAsset", + "parameters": [ + "78fffaa3-06ed-4daa-bedc-8f7d72992231", + "10", + "owner1" + ], + "timestamp": "2024-05-27T09:31:47.774Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 16298 + }, + { + "caseID": "FABRIC_MONITORING", + "receiptID": "e26794398de369ba8ee2eb97235ef5d1dceceb8fda57413732a5550bf5cc420f", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "78fffaa3-06ed-4daa-bedc-8f7d72992231", + "owner2" + ], + "timestamp": "2024-05-27T09:31:53.120Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 10952 + }, + { + "caseID": "FABRIC_MONITORING", + "receiptID": "fa3bbd9ec8cb372e09211e057074fcf03f0c5f178c7ae098fbd3ead0956d17a4", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "TransferAsset", + "parameters": [ + "78fffaa3-06ed-4daa-bedc-8f7d72992231", + "owner1" + ], + "timestamp": "2024-05-27T09:31:58.521Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 5552 + }, + { + "caseID": "FABRIC_MONITORING", + "receiptID": "677867c703fa64b1a4651a5c661ccd4cf2ca84259a64eae534d88d7cc3cafe48", + "blockchainID": "FABRIC_2", + "invocationType": "FabricContractInvocationType.SEND", + "methodName": "DeleteAsset", + "parameters": [ + "78fffaa3-06ed-4daa-bedc-8f7d72992231" + ], + "timestamp": "2024-05-27T09:32:04.061Z", + "identity": "user1", + "cost": 0, + "carbonFootprint": 0.00018, + "latency": 12 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json new file mode 100644 index 0000000000..8b4e9fbbbb --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json @@ -0,0 +1,432 @@ +[ + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:40:42.941Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 135530010970738, + "carbonFootprint": 0, + "latency": 4921 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:40:49.281Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 42814248832950, + "carbonFootprint": 0, + "latency": 8580 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x5121ac2440d82d580bc30c9e445365871a0bbd7310580bd7e7617d66abdc0d33", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:40:52.233Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 42451616646000, + "carbonFootprint": 0, + "latency": 5628 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x3be2b1b2c1bec476f0d37cb6990b2ae7b54804a166262aef639ba6993d64e896", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:40:57.247Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 120363911294810, + "carbonFootprint": 0, + "latency": 615 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x1ae44035a0580491f47933802ca3f99c11ca524b9c2add9169b67079d1085d56", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:02.421Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 38436488700900, + "carbonFootprint": 0, + "latency": 5440 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xb64d1e48f4f69bf930950bc13d9c05513642af08dbdd5079f428db0fc17c839d", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:07.408Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 38500479768000, + "carbonFootprint": 0, + "latency": 454 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xb299fbed0ff28d4b29404142d8bee7b33a6ac2d480f22af3fdac030e9197e955", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:41:12.385Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 110203266779032, + "carbonFootprint": 0, + "latency": 5476 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xf88b5da58aa42c36a798cbbb773da6650e27dd55ab9a870f542e899b827720ba", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:17.387Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 35503574548200, + "carbonFootprint": 0, + "latency": 475 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x620e72017b4bc4689c11d329504a8ea73729ed3f4eae2c73c7d2ad440f1d3463", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:22.263Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 35853385067280, + "carbonFootprint": 0, + "latency": 5598 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xaaf8cacf1951a808f769e87a32304952d9bbdb3eeb2e56fde12959c5d775b49f", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:41:27.170Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 103396064181676, + "carbonFootprint": 0, + "latency": 692 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xb205b16fac624e125354b93d9d9b542b6dbbf84816c6ed32a9e8ddd0c89cde50", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:32.195Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 33538645761600, + "carbonFootprint": 0, + "latency": 5666 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x621becfe651fee97f77384c62b1730c6c0f364bf40f4be96fcc871c25d2410bc", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:37.087Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 34079943209040, + "carbonFootprint": 0, + "latency": 775 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xa9ba355c1b6c24475762f8d85e3fe31373488d4ed5767d85cdd8bad701b635d3", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:41:42.152Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 98835525300660, + "carbonFootprint": 0, + "latency": 5710 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xadf19829cc25a097e457ed78fe9430fb0d306820ed91adbb94e538a291535849", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:47.039Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 32222226180300, + "carbonFootprint": 0, + "latency": 823 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x39d64d6a97e476d64ebee18f8769fea61f8619ada119c58264dab2a04f8b11be", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:41:52.133Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 32891811777840, + "carbonFootprint": 0, + "latency": 5728 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xebfd45ff34e3ff7bd33d3c9bb5379877b7b0fd08e4357045dac805ed19cee100", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:41:57.039Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 95780155968798, + "carbonFootprint": 0, + "latency": 823 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xe280efdc199b8635b392024bf969d7a78f7de3aaef64499c01dc240c425da1c2", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:02.152Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 31340280308100, + "carbonFootprint": 0, + "latency": 5709 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x96129a0b72d96b2bb3c7d359cf0d7d444f814b18614889b07a391af1d12314f2", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:07.066Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 32095813562880, + "carbonFootprint": 0, + "latency": 796 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xd3d2045c8d79914a43bf0d0fa48233cb0c6d3d8d4c623767badeb6f5157e9876", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:42:12.164Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 93733186606720, + "carbonFootprint": 0, + "latency": 5697 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xd5d911f6b56aaa9539605c428404558111b31701753843d7e37b8732967b721b", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:17.148Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 30749413489950, + "carbonFootprint": 0, + "latency": 714 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xcbc1a5c07d93f980362adaf84f66db3127e7d5745cca0117cbf9f05078d6b03b", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:22.248Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 31562528045760, + "carbonFootprint": 0, + "latency": 5613 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x9cd9db21f05539f6dff370095d8d1763f0914b5d197405d30fc941d8c090c678", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:42:27.135Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 92361802785924, + "carbonFootprint": 0, + "latency": 727 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x6adbc6ffea1acadabe5c67cef94a855383c38b58a5b8ff296b48e399f30a4ad3", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:32.319Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 30353557405200, + "carbonFootprint": 0, + "latency": 5542 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x96ecf2aa1876492afddccf5e2a0083e21b1c85b24550fc0e4c7437699729ce18", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:37.207Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 31205249014320, + "carbonFootprint": 0, + "latency": 655 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0xcf6652ab02e110b03816ba739c83a600424e9ee0611c34544ca4a239081018be", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:42:42.165Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 91443032771380, + "carbonFootprint": 0, + "latency": 5696 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x76ea903dabc8a71125125ee782e22d06cebb3923cdeb0186236186145b299c2e", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "lockAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:47.055Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 30088350292200, + "carbonFootprint": 0, + "latency": 806 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x60fb968f395815fc788974d19ccb11fa5e361b74e9d9ae1bd2224b8f03be395f", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "deleteAsset", + "parameters": [ + "asset1" + ], + "timestamp": "2024-05-27T09:42:52.213Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 30965886922560, + "carbonFootprint": 0, + "latency": 5648 + }, + { + "caseID": "CCMODEL_UPDATE", + "receiptID": "0x13b53c3379a666e719caa33ea0161d08594e663f90e268f25017c2e7068290c8", + "blockchainID": "ETHEREUM", + "invocationType": "SEND", + "methodName": "createAsset", + "parameters": [ + "asset1", + 5 + ], + "timestamp": "2024-05-27T09:42:57.111Z", + "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", + "cost": 90827495125774, + "carbonFootprint": 0, + "latency": 751 + } +] \ No newline at end of file diff --git a/packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/LockAsset.json similarity index 58% rename from packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json rename to packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/LockAsset.json index 50be30cea5..fda660818a 100644 --- a/packages/cactus-plugin-cc-tx-visualization/src/test/solidity/LockAsset.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/LockAsset.json @@ -68,6 +68,44 @@ "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": [ { @@ -95,27 +133,27 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol\":{\"keccak256\":\"0x878fc27f22785593c1b35005ecf333e1f93e6dcf932b3d6e2b24d6be790b996a\",\"urls\":[\"bzz-raw://d8be1567f5e11fb718d8849f4dc9b8a8e467135ecd04c5f796c938b7363daaf2\",\"dweb:/ipfs/QmQuteuiTygZxjDnLiq3GNgJNFmPSRqbE2Q9vm85WgVbox\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b50610475806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80635e82d0a61461005c578063cd5286d014610071578063db9cc410146100b5578063def60e0d146100c8578063e24aa37c146100db575b600080fd5b61006f61006a3660046103a1565b6100ee565b005b61008461007f3660046103a1565b610164565b6040805182516001600160a01b03168152602080840151151590820152918101519082015260600160405180910390f35b61006f6100c33660046103e3565b6101dc565b61006f6100d63660046103a1565b610266565b61006f6100e93660046103a1565b6102ad565b6000806000848460405161010392919061042f565b9081526020016040518091039020600101541190508061012257600080fd5b60016000848460405161013692919061042f565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60408051606081018252600080825260208201819052918101919091526000838360405161019392919061042f565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116101e957600080fd5b80600084846040516101fc92919061042f565b908152602001604051809103902060010181905550336000848460405161022492919061042f565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556000908190610136908690869061042f565b6000806000848460405161027b92919061042f565b9081526020016040518091039020600101541190508061029a57600080fd5b600080848460405161013692919061042f565b600080600084846040516102c292919061042f565b908152602001604051809103902060010154119050806102e157600080fd5b60008084846040516102f492919061042f565b9081526040519081900360200190205460ff600160a01b9091041690508061031b57600080fd5b6000848460405161032d92919061042f565b90815260405190819003602001902080546001600160a81b0319168155600060019091015550505050565b60008083601f84011261036a57600080fd5b50813567ffffffffffffffff81111561038257600080fd5b60208301915083602082850101111561039a57600080fd5b9250929050565b600080602083850312156103b457600080fd5b823567ffffffffffffffff8111156103cb57600080fd5b6103d785828601610358565b90969095509350505050565b6000806000604084860312156103f857600080fd5b833567ffffffffffffffff81111561040f57600080fd5b61041b86828701610358565b909790965060209590950135949350505050565b818382376000910190815291905056fea26469706673582212203e656ee2af105d66466451b5ca09a2a5780b62c439dd43befb63a10687d2423b64736f6c63430008070033", - "deployedBytecode": "608060405234801561001057600080fd5b50600436106100575760003560e01c80635e82d0a61461005c578063cd5286d014610071578063db9cc410146100b5578063def60e0d146100c8578063e24aa37c146100db575b600080fd5b61006f61006a3660046103a1565b6100ee565b005b61008461007f3660046103a1565b610164565b6040805182516001600160a01b03168152602080840151151590820152918101519082015260600160405180910390f35b61006f6100c33660046103e3565b6101dc565b61006f6100d63660046103a1565b610266565b61006f6100e93660046103a1565b6102ad565b6000806000848460405161010392919061042f565b9081526020016040518091039020600101541190508061012257600080fd5b60016000848460405161013692919061042f565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60408051606081018252600080825260208201819052918101919091526000838360405161019392919061042f565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116101e957600080fd5b80600084846040516101fc92919061042f565b908152602001604051809103902060010181905550336000848460405161022492919061042f565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b0319909316929092179091556000908190610136908690869061042f565b6000806000848460405161027b92919061042f565b9081526020016040518091039020600101541190508061029a57600080fd5b600080848460405161013692919061042f565b600080600084846040516102c292919061042f565b908152602001604051809103902060010154119050806102e157600080fd5b60008084846040516102f492919061042f565b9081526040519081900360200190205460ff600160a01b9091041690508061031b57600080fd5b6000848460405161032d92919061042f565b90815260405190819003602001902080546001600160a81b0319168155600060019091015550505050565b60008083601f84011261036a57600080fd5b50813567ffffffffffffffff81111561038257600080fd5b60208301915083602082850101111561039a57600080fd5b9250929050565b600080602083850312156103b457600080fd5b823567ffffffffffffffff8111156103cb57600080fd5b6103d785828601610358565b90969095509350505050565b6000806000604084860312156103f857600080fd5b833567ffffffffffffffff81111561040f57600080fd5b61041b86828701610358565b909790965060209590950135949350505050565b818382376000910190815291905056fea26469706673582212203e656ee2af105d66466451b5ca09a2a5780b62c439dd43befb63a10687d2423b64736f6c63430008070033", - "sourceMap": "543:1053:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "543:1053:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;946:154;;;;;;:::i;:::-;;:::i;:::-;;798:105;;;;;;:::i;:::-;;:::i;:::-;;;;1753:13:1;;-1:-1:-1;;;;;1749:39:1;1731:58;;1859:4;1847:17;;;1841:24;1834:32;1827:40;1805:20;;;1798:70;1912:17;;;1906:24;1884:20;;;1877:54;1719:2;1704:18;798:105:0;;;;;;;607:188;;;;;;:::i;:::-;;:::i;1144:157::-;;;;;;:::i;:::-;;:::i;1304:289::-;;;;;;:::i;:::-;;:::i;946:154::-;999:16;1034:1;1018:6;1025:2;;1018:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;999:36;;1051:11;1043:20;;;;;;1091:4;1071:6;1078:2;;1071:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1071:24:0;-1:-1:-1;;;;1071:24:0;;;;;;;;;-1:-1:-1;;;946:154:0:o;798:105::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;888:6:0;895:2;;888:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;881:17;;;;;;;-1:-1:-1;;;;;881:17:0;;;;-1:-1:-1;;;881:17:0;;;;;;;;;;;;;;;;;;;;;;888:10;798:105;-1:-1:-1;;;798:105:0:o;607:188::-;687:1;682:4;:6;674:15;;;;;;714:4;697:6;704:2;;697:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;747:10;726:6;733:2;;726:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;726:31:0;;;;-1:-1:-1;;;;;;726:31:0;;;;;;;;;;:18;;;;765:10;;772:2;;;;765:10;:::i;1144:157::-;1199:16;1234:1;1218:6;1225:2;;1218:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;1199:36;;1251:11;1243:20;;;;;;1291:5;1271:6;1278:2;;1271:10;;;;;;;:::i;1304:289::-;1360:16;1395:1;1379:6;1386:2;;1379:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;;:17;1360:36;;1412:11;1404:20;;;;;;1495:18;1516:6;1523:2;;1516:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1516:17:0;;;;;-1:-1:-1;1516:17:0;1541:22;;;;;;1578:6;1585:2;;1578:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1571:17;;-1:-1:-1;;;;;;1571:17:0;;;1578:10;1571:17;;;;;-1:-1:-1;;;;1304:289:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;783:479::-;863:6;871;879;932:2;920:9;911:7;907:23;903:32;900:52;;;948:1;945;938:12;900:52;988:9;975:23;1021:18;1013:6;1010:30;1007:50;;;1053:1;1050;1043:12;1007:50;1092:59;1143:7;1134:6;1123:9;1119:22;1092:59;:::i;:::-;1170:8;;1066:85;;-1:-1:-1;1252:2:1;1237:18;;;;1224:32;;783:479;-1:-1:-1;;;;783:479:1:o;1267:273::-;1452:6;1444;1439:3;1426:33;1408:3;1478:16;;1503:13;;;1478:16;1267:273;-1:-1:-1;1267:273:1:o", - "sourcePath": "/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-contract/lock-asset.sol", + "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":{\"keccak256\":\"0xde0438e010cd77bfc1516697230fbcec20e85bd7fdbc8df9225abb5c9dd6c7ed\",\"urls\":[\"bzz-raw://865f301eada0615be375c9313d3abce9458dcbb5311dedf805cad921accda557\",\"dweb:/ipfs/QmY1r6Z7PM8ypYy59rWqozy3Mkcv9nMd4xRcfpCbwN4LQK\"]}},\"version\":1}", + "bytecode": "608060405234801561001057600080fd5b506105f9806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", + "deployedBytecode": "608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", + "sourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1770:231;;;;;;:::i;:::-;;:::i;:::-;;;948:14:1;;941:22;923:41;;911:2;896:18;1770:231:0;;;;;;;;1011:144;;;;;;:::i;:::-;;:::i;:::-;;1665:101;;;;;;:::i;:::-;;:::i;865:103::-;;;;;;:::i;:::-;;:::i;:::-;;;;1183:13:1;;-1:-1:-1;;;;;1179:39:1;1161:58;;1289:4;1277:17;;;1271:24;1264:32;1257:40;1235:20;;;1228:70;1342:17;;;1336:24;1314:20;;;1307:54;1149:2;1134:18;865:103:0;975:392:1;643:218:0;;;;;;:::i;:::-;;:::i;1200:147::-;;;;;;:::i;:::-;;:::i;1351:310::-;;;;;;:::i;:::-;;:::i;1770:231::-;1834:4;1848:11;1862;1874:2;;1862:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1862:15:0;1885;;;;;;1979:6;1986:2;;1979:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1979:17:0;;;;;-1:-1:-1;;1770:231:0;;;;:::o;1011:144::-;1065:11;1079;1091:2;;1079:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1079:15:0;1102;;;;;;1146:4;1126:6;1133:2;;1126:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1126:24:0;-1:-1:-1;;;;1126:24:0;;;;;;;;;-1:-1:-1;;;1011:144:0:o;1665:101::-;1725:4;1746:11;1758:2;;1746:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1665:101:0;;;;:::o;865:103::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;953:6:0;960:2;;953:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;946:17;;;;;;;-1:-1:-1;;;;;946:17:0;;;;-1:-1:-1;;;946:17:0;;;;;;;;;;;;;;;;;;;;;;953:10;865:103;-1:-1:-1;;;865:103:0:o;643:218::-;723:1;718:4;:6;710:15;;;;;;750:4;733:6;740:2;;733:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;783:10;762:6;769:2;;762:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;762:31:0;;;;-1:-1:-1;;;;;;762:31:0;;;;;;;;;;:18;;;;801:10;;808:2;;;;801:10;:::i;:::-;;;;;;;;;;;;;;:25;;;;;-1:-1:-1;;;801:25:0;-1:-1:-1;;;;801:25:0;;;;;;;;;;-1:-1:-1;;;;834:15:0;;846:2;;;;834:15;:::i;:::-;;;;;;;;;;;;;;:22;;;;;-1:-1:-1;;834:22:0;;;;;;;;;-1:-1:-1;;;643:218:0:o;1200:147::-;1256:11;1270;1282:2;;1270:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1270:15:0;1293;;;;;;1337:5;1317:6;1324:2;;1317:10;;;;;;;:::i;1351:310::-;1407:11;1421;1433:2;;1421:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1421:15:0;1444;;;;;;1531:18;1552:6;1559:2;;1552:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1552:17:0;;;;;-1:-1:-1;1552:17:0;1577:22;;;;;;1615:6;1622:2;;1615:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1608:17;;-1:-1:-1;;;;;;1608:17:0;;;1615:10;1608:17;;;;;;;1615:10;1633:15;;1645:2;;;;1633:15;:::i;:::-;;;;;;;;;;;;;;:23;;;;;-1:-1:-1;;1633:23:0;;;;;;;;;-1:-1:-1;;;;1351:310:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;1372:479::-;1452:6;1460;1468;1521:2;1509:9;1500:7;1496:23;1492:32;1489:52;;;1537:1;1534;1527:12;1489:52;1577:9;1564:23;1610:18;1602:6;1599:30;1596:50;;;1642:1;1639;1632:12;1596:50;1681:59;1732:7;1723:6;1712:9;1708:22;1681:59;:::i;:::-;1759:8;;1655:85;;-1:-1:-1;1841:2:1;1826:18;;;;1813:32;;1372:479;-1:-1:-1;;;;1372:479:1:o;1856:273::-;2041:6;2033;2028:3;2015:33;1997:3;2067:16;;2092:13;;;2067:16;1856:273;-1:-1:-1;1856:273:1:o", + "sourcePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", "compiler": { "name": "solc", - "version": "0.8.7+commit.e28d00a7" + "version": "0.8.15+commit.e14f2714" }, "ast": { - "absolutePath": "/Users/jasonwang/cactus-odap-merge/packages/cactus-plugin-ledger-connector-besu/src/test/solidity/hello-world-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 ], "LockAsset": [ - 150 + 192 ] }, - "id": 151, + "id": 193, "nodeType": "SourceUnit", "nodes": [ { @@ -219,19 +257,20 @@ "name": "Asset", "nameLocation": "445:5:0", "nodeType": "StructDefinition", - "scope": 151, + "scope": 193, "src": "438:68:0", "visibility": "public" }, { "abstract": false, "baseContracts": [], + "canonicalName": "LockAsset", "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, - "id": 150, + "id": 192, "linearizedBaseContracts": [ - 150 + 192 ], "name": "LockAsset", "nameLocation": "552:9:0", @@ -242,10 +281,10 @@ "id": 13, "mutability": "mutable", "name": "assets", - "nameLocation": "597:6:0", + "nameLocation": "592:6:0", "nodeType": "VariableDeclaration", - "scope": 150, - "src": "571:32:0", + "scope": 192, + "src": "566:32:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -258,14 +297,14 @@ "id": 9, "name": "string", "nodeType": "ElementaryTypeName", - "src": "580:6:0", + "src": "575:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", - "src": "571:25:0", + "src": "566:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string => struct Asset)" @@ -278,10 +317,10 @@ "name": "Asset", "nodeType": "IdentifierPath", "referencedDeclaration": 8, - "src": "590:5:0" + "src": "585:5:0" }, "referencedDeclaration": 8, - "src": "590:5:0", + "src": "585:5:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", "typeString": "struct Asset" @@ -290,11 +329,57 @@ }, "visibility": "internal" }, + { + "constant": false, + "id": 17, + "mutability": "mutable", + "name": "assetExists", + "nameLocation": "627:11:0", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "602:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string => bool)" + }, + "typeName": { + "id": 16, + "keyType": { + "id": 14, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "611:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "nodeType": "Mapping", + "src": "602:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string => bool)" + }, + "valueType": { + "id": 15, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "621:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "visibility": "internal" + }, { "body": { - "id": 48, + "id": 58, "nodeType": "Block", - "src": "666:129:0", + "src": "702:159:0", "statements": [ { "expression": { @@ -304,18 +389,18 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 23, + "id": 27, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "id": 21, + "id": 25, "name": "size", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "682:4:0", + "referencedDeclaration": 21, + "src": "718:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -325,21 +410,21 @@ "operator": ">", "rightExpression": { "hexValue": "30", - "id": 22, + "id": 26, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "687:1:0", + "src": "723:1:0", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "682:6:0", + "src": "718:6:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -353,7 +438,7 @@ "typeString": "bool" } ], - "id": 20, + "id": 24, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -361,13 +446,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "674:7:0", + "src": "710:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 24, + "id": 28, "isConstant": false, "isLValue": false, "isPure": false, @@ -375,20 +460,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "674:15:0", + "src": "710:15:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 25, + "id": 29, "nodeType": "ExpressionStatement", - "src": "674:15:0" + "src": "710:15:0" }, { "expression": { - "id": 31, + "id": 35, "isConstant": false, "isLValue": false, "isPure": false, @@ -396,25 +481,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 26, + "id": 30, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "697:6:0", + "src": "733:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 28, + "id": 32, "indexExpression": { - "id": 27, + "id": 31, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "704:2:0", + "referencedDeclaration": 19, + "src": "740:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -425,13 +510,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "697:10:0", + "src": "733:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "id": 29, + "id": 33, "isConstant": false, "isLValue": true, "isPure": false, @@ -439,7 +524,7 @@ "memberName": "size", "nodeType": "MemberAccess", "referencedDeclaration": 7, - "src": "697:15:0", + "src": "733:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -448,30 +533,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "id": 30, + "id": 34, "name": "size", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "714:4:0", + "referencedDeclaration": 21, + "src": "750:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "697:21:0", + "src": "733:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 32, + "id": 36, "nodeType": "ExpressionStatement", - "src": "697:21:0" + "src": "733:21:0" }, { "expression": { - "id": 39, + "id": 43, "isConstant": false, "isLValue": false, "isPure": false, @@ -479,25 +564,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 33, + "id": 37, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "726:6:0", + "src": "762:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 35, + "id": 39, "indexExpression": { - "id": 34, + "id": 38, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "733:2:0", + "referencedDeclaration": 19, + "src": "769:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -508,13 +593,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "726:10:0", + "src": "762:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "id": 36, + "id": 40, "isConstant": false, "isLValue": true, "isPure": false, @@ -522,7 +607,7 @@ "memberName": "creator", "nodeType": "MemberAccess", "referencedDeclaration": 3, - "src": "726:18:0", + "src": "762:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -532,43 +617,43 @@ "operator": "=", "rightHandSide": { "expression": { - "id": 37, + "id": 41, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "747:3:0", + "src": "783:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 38, + "id": 42, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "747:10:0", + "src": "783:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "726:31:0", + "src": "762:31:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 40, + "id": 44, "nodeType": "ExpressionStatement", - "src": "726:31:0" + "src": "762:31:0" }, { "expression": { - "id": 46, + "id": 50, "isConstant": false, "isLValue": false, "isPure": false, @@ -576,25 +661,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 41, + "id": 45, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "765:6:0", + "src": "801:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 43, + "id": 47, "indexExpression": { - "id": 42, + "id": 46, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "772:2:0", + "referencedDeclaration": 19, + "src": "808:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -605,13 +690,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "765:10:0", + "src": "801:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "id": 44, + "id": 48, "isConstant": false, "isLValue": true, "isPure": false, @@ -619,7 +704,7 @@ "memberName": "isLock", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "765:17:0", + "src": "801:17:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -629,53 +714,125 @@ "operator": "=", "rightHandSide": { "hexValue": "66616c7365", - "id": 45, + "id": 49, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "785:5:0", + "src": "821:5:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, - "src": "765:25:0", + "src": "801:25:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 47, + "id": 51, + "nodeType": "ExpressionStatement", + "src": "801:25:0" + }, + { + "expression": { + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 52, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "834:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 54, + "indexExpression": { + "id": 53, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "846:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "834:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "852:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "834:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 57, "nodeType": "ExpressionStatement", - "src": "765:25:0" + "src": "834:22:0" } ] }, "functionSelector": "db9cc410", - "id": 49, + "id": 59, "implemented": true, "kind": "function", "modifiers": [], "name": "createAsset", - "nameLocation": "616:11:0", + "nameLocation": "652:11:0", "nodeType": "FunctionDefinition", "parameters": { - "id": 18, + "id": 22, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 15, + "id": 19, "mutability": "mutable", "name": "id", - "nameLocation": "645:2:0", + "nameLocation": "681:2:0", "nodeType": "VariableDeclaration", - "scope": 49, - "src": "629:18:0", + "scope": 59, + "src": "665:18:0", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -683,10 +840,10 @@ "typeString": "string" }, "typeName": { - "id": 14, + "id": 18, "name": "string", "nodeType": "ElementaryTypeName", - "src": "629:6:0", + "src": "665:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -696,13 +853,13 @@ }, { "constant": false, - "id": 17, + "id": 21, "mutability": "mutable", "name": "size", - "nameLocation": "654:4:0", + "nameLocation": "690:4:0", "nodeType": "VariableDeclaration", - "scope": 49, - "src": "649:9:0", + "scope": 59, + "src": "685:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -710,10 +867,10 @@ "typeString": "uint256" }, "typeName": { - "id": 16, + "id": 20, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "649:4:0", + "src": "685:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -722,48 +879,48 @@ "visibility": "internal" } ], - "src": "627:32:0" + "src": "663:32:0" }, "returnParameters": { - "id": 19, + "id": 23, "nodeType": "ParameterList", "parameters": [], - "src": "666:0:0" + "src": "702:0:0" }, - "scope": 150, - "src": "607:188:0", + "scope": 192, + "src": "643:218:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 61, + "id": 71, "nodeType": "Block", - "src": "873:30:0", + "src": "938:30:0", "statements": [ { "expression": { "baseExpression": { - "id": 57, + "id": 67, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "888:6:0", + "src": "953:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 59, + "id": 69, "indexExpression": { - "id": 58, + "id": 68, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 51, - "src": "895:2:0", + "referencedDeclaration": 61, + "src": "960:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -774,40 +931,40 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "888:10:0", + "src": "953:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "functionReturnParameters": 56, - "id": 60, + "functionReturnParameters": 66, + "id": 70, "nodeType": "Return", - "src": "881:17:0" + "src": "946:17:0" } ] }, "functionSelector": "cd5286d0", - "id": 62, + "id": 72, "implemented": true, "kind": "function", "modifiers": [], "name": "getAsset", - "nameLocation": "807:8:0", + "nameLocation": "874:8:0", "nodeType": "FunctionDefinition", "parameters": { - "id": 52, + "id": 62, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 51, + "id": 61, "mutability": "mutable", "name": "id", - "nameLocation": "832:2:0", + "nameLocation": "899:2:0", "nodeType": "VariableDeclaration", - "scope": 62, - "src": "816:18:0", + "scope": 72, + "src": "883:18:0", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -815,10 +972,10 @@ "typeString": "string" }, "typeName": { - "id": 50, + "id": 60, "name": "string", "nodeType": "ElementaryTypeName", - "src": "816:6:0", + "src": "883:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -827,21 +984,21 @@ "visibility": "internal" } ], - "src": "815:20:0" + "src": "882:20:0" }, "returnParameters": { - "id": 56, + "id": 66, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 55, + "id": 65, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", - "scope": 62, - "src": "857:12:0", + "scope": 72, + "src": "924:12:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -849,17 +1006,17 @@ "typeString": "struct Asset" }, "typeName": { - "id": 54, + "id": 64, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 53, + "id": 63, "name": "Asset", "nodeType": "IdentifierPath", "referencedDeclaration": 8, - "src": "857:5:0" + "src": "924:5:0" }, "referencedDeclaration": 8, - "src": "857:5:0", + "src": "924:5:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", "typeString": "struct Asset" @@ -868,34 +1025,34 @@ "visibility": "internal" } ], - "src": "856:14:0" + "src": "923:14:0" }, - "scope": 150, - "src": "798:105:0", + "scope": 192, + "src": "865:103:0", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { - "id": 87, + "id": 94, "nodeType": "Block", - "src": "991:109:0", + "src": "1057:98:0", "statements": [ { "assignments": [ - 68 + 78 ], "declarations": [ { "constant": false, - "id": 68, + "id": 78, "mutability": "mutable", - "name": "assetExsist", - "nameLocation": "1004:11:0", + "name": "exists", + "nameLocation": "1070:6:0", "nodeType": "VariableDeclaration", - "scope": 87, - "src": "999:16:0", + "scope": 94, + "src": "1065:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -903,10 +1060,10 @@ "typeString": "bool" }, "typeName": { - "id": 67, + "id": 77, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "999:4:0", + "src": "1065:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -915,106 +1072,57 @@ "visibility": "internal" } ], - "id": 75, + "id": 82, "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 74, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 69, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1018:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 71, - "indexExpression": { - "id": 70, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "1025:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1018:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 72, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1018:15:0", + "baseExpression": { + "id": 79, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1079:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" } }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 73, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1034:1:0", + "id": 81, + "indexExpression": { + "id": 80, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "1091:2:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } }, - "src": "1018:17:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1079:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", - "src": "999:36:0" + "src": "1065:29:0" }, { "expression": { "arguments": [ { - "id": 77, - "name": "assetExsist", + "id": 84, + "name": "exists", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1051:11:0", + "referencedDeclaration": 78, + "src": "1110:6:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1028,7 +1136,7 @@ "typeString": "bool" } ], - "id": 76, + "id": 83, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1036,13 +1144,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1043:7:0", + "src": "1102:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 78, + "id": 85, "isConstant": false, "isLValue": false, "isPure": false, @@ -1050,20 +1158,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1043:20:0", + "src": "1102:15:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 79, + "id": 86, "nodeType": "ExpressionStatement", - "src": "1043:20:0" + "src": "1102:15:0" }, { "expression": { - "id": 85, + "id": 92, "isConstant": false, "isLValue": false, "isPure": false, @@ -1071,25 +1179,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 80, + "id": 87, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "1071:6:0", + "src": "1126:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 82, + "id": 89, "indexExpression": { - "id": 81, + "id": 88, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "1078:2:0", + "referencedDeclaration": 74, + "src": "1133:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -1100,13 +1208,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1071:10:0", + "src": "1126:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "id": 83, + "id": 90, "isConstant": false, "isLValue": true, "isPure": false, @@ -1114,7 +1222,7 @@ "memberName": "isLock", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "1071:17:0", + "src": "1126:17:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1124,53 +1232,53 @@ "operator": "=", "rightHandSide": { "hexValue": "74727565", - "id": 84, + "id": 91, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1091:4:0", + "src": "1146:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "1071:24:0", + "src": "1126:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 86, + "id": 93, "nodeType": "ExpressionStatement", - "src": "1071:24:0" + "src": "1126:24:0" } ] }, "functionSelector": "5e82d0a6", - "id": 88, + "id": 95, "implemented": true, "kind": "function", "modifiers": [], "name": "lockAsset", - "nameLocation": "955:9:0", + "nameLocation": "1020:9:0", "nodeType": "FunctionDefinition", "parameters": { - "id": 65, + "id": 75, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 64, + "id": 74, "mutability": "mutable", "name": "id", - "nameLocation": "981:2:0", + "nameLocation": "1046:2:0", "nodeType": "VariableDeclaration", - "scope": 88, - "src": "965:18:0", + "scope": 95, + "src": "1030:18:0", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -1178,10 +1286,10 @@ "typeString": "string" }, "typeName": { - "id": 63, + "id": 73, "name": "string", "nodeType": "ElementaryTypeName", - "src": "965:6:0", + "src": "1030:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1190,40 +1298,40 @@ "visibility": "internal" } ], - "src": "964:20:0" + "src": "1029:20:0" }, "returnParameters": { - "id": 66, + "id": 76, "nodeType": "ParameterList", "parameters": [], - "src": "991:0:0" + "src": "1057:0:0" }, - "scope": 150, - "src": "946:154:0", + "scope": 192, + "src": "1011:144:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 113, + "id": 117, "nodeType": "Block", - "src": "1191:110:0", + "src": "1248:99:0", "statements": [ { "assignments": [ - 94 + 101 ], "declarations": [ { "constant": false, - "id": 94, + "id": 101, "mutability": "mutable", - "name": "assetExsist", - "nameLocation": "1204:11:0", + "name": "exists", + "nameLocation": "1261:6:0", "nodeType": "VariableDeclaration", - "scope": 113, - "src": "1199:16:0", + "scope": 117, + "src": "1256:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1231,10 +1339,10 @@ "typeString": "bool" }, "typeName": { - "id": 93, + "id": 100, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1199:4:0", + "src": "1256:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1243,106 +1351,57 @@ "visibility": "internal" } ], - "id": 101, + "id": 105, "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "baseExpression": { + "id": 102, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1270:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 104, + "indexExpression": { + "id": 103, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 97, + "src": "1282:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } }, - "id": 100, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 95, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1218:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 97, - "indexExpression": { - "id": 96, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1225:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1218:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 98, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1218:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 99, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1234:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1218:17:0", + "nodeType": "IndexAccess", + "src": "1270:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", - "src": "1199:36:0" + "src": "1256:29:0" }, { "expression": { "arguments": [ { - "id": 103, - "name": "assetExsist", + "id": 107, + "name": "exists", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "1251:11:0", + "referencedDeclaration": 101, + "src": "1301:6:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1356,7 +1415,7 @@ "typeString": "bool" } ], - "id": 102, + "id": 106, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1364,13 +1423,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1243:7:0", + "src": "1293:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 104, + "id": 108, "isConstant": false, "isLValue": false, "isPure": false, @@ -1378,20 +1437,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1243:20:0", + "src": "1293:15:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 105, + "id": 109, "nodeType": "ExpressionStatement", - "src": "1243:20:0" + "src": "1293:15:0" }, { "expression": { - "id": 111, + "id": 115, "isConstant": false, "isLValue": false, "isPure": false, @@ -1399,25 +1458,25 @@ "leftHandSide": { "expression": { "baseExpression": { - "id": 106, + "id": 110, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "1271:6:0", + "src": "1317:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 108, + "id": 112, "indexExpression": { - "id": 107, + "id": 111, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1278:2:0", + "referencedDeclaration": 97, + "src": "1324:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -1428,13 +1487,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1271:10:0", + "src": "1317:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "id": 109, + "id": 113, "isConstant": false, "isLValue": true, "isPure": false, @@ -1442,7 +1501,7 @@ "memberName": "isLock", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "1271:17:0", + "src": "1317:17:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1452,53 +1511,53 @@ "operator": "=", "rightHandSide": { "hexValue": "66616c7365", - "id": 110, + "id": 114, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1291:5:0", + "src": "1337:5:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, - "src": "1271:25:0", + "src": "1317:25:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 112, + "id": 116, "nodeType": "ExpressionStatement", - "src": "1271:25:0" + "src": "1317:25:0" } ] }, "functionSelector": "def60e0d", - "id": 114, + "id": 118, "implemented": true, "kind": "function", "modifiers": [], "name": "unLockAsset", - "nameLocation": "1153:11:0", + "nameLocation": "1209:11:0", "nodeType": "FunctionDefinition", "parameters": { - "id": 91, + "id": 98, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 90, + "id": 97, "mutability": "mutable", "name": "id", - "nameLocation": "1181:2:0", + "nameLocation": "1237:2:0", "nodeType": "VariableDeclaration", - "scope": 114, - "src": "1165:18:0", + "scope": 118, + "src": "1221:18:0", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -1506,10 +1565,10 @@ "typeString": "string" }, "typeName": { - "id": 89, + "id": 96, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1165:6:0", + "src": "1221:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1518,40 +1577,40 @@ "visibility": "internal" } ], - "src": "1164:20:0" + "src": "1220:20:0" }, "returnParameters": { - "id": 92, + "id": 99, "nodeType": "ParameterList", "parameters": [], - "src": "1191:0:0" + "src": "1248:0:0" }, - "scope": 150, - "src": "1144:157:0", + "scope": 192, + "src": "1200:147:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { - "id": 148, + "id": 155, "nodeType": "Block", - "src": "1352:241:0", + "src": "1399:262:0", "statements": [ { "assignments": [ - 120 + 124 ], "declarations": [ { "constant": false, - "id": 120, + "id": 124, "mutability": "mutable", - "name": "assetExsist", - "nameLocation": "1365:11:0", + "name": "exists", + "nameLocation": "1412:6:0", "nodeType": "VariableDeclaration", - "scope": 148, - "src": "1360:16:0", + "scope": 155, + "src": "1407:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1559,10 +1618,10 @@ "typeString": "bool" }, "typeName": { - "id": 119, + "id": 123, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1360:4:0", + "src": "1407:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1571,106 +1630,57 @@ "visibility": "internal" } ], - "id": 127, + "id": 128, "initialValue": { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 121, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1379:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 123, - "indexExpression": { - "id": 122, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1386:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1379:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 124, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "1379:15:0", + "baseExpression": { + "id": 125, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1421:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" } }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1395:1:0", + "id": 127, + "indexExpression": { + "id": 126, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1433:2:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } }, - "src": "1379:17:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1421:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", - "src": "1360:36:0" + "src": "1407:29:0" }, { "expression": { "arguments": [ { - "id": 129, - "name": "assetExsist", + "id": 130, + "name": "exists", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1412:11:0", + "referencedDeclaration": 124, + "src": "1452:6:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1684,7 +1694,7 @@ "typeString": "bool" } ], - "id": 128, + "id": 129, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1692,13 +1702,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1404:7:0", + "src": "1444:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 130, + "id": 131, "isConstant": false, "isLValue": false, "isPure": false, @@ -1706,31 +1716,31 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1404:20:0", + "src": "1444:15:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 131, + "id": 132, "nodeType": "ExpressionStatement", - "src": "1404:20:0" + "src": "1444:15:0" }, { "assignments": [ - 133 + 134 ], "declarations": [ { "constant": false, - "id": 133, + "id": 134, "mutability": "mutable", "name": "assetIsLocked", - "nameLocation": "1500:13:0", + "nameLocation": "1536:13:0", "nodeType": "VariableDeclaration", - "scope": 148, - "src": "1495:18:0", + "scope": 155, + "src": "1531:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1738,10 +1748,10 @@ "typeString": "bool" }, "typeName": { - "id": 132, + "id": 133, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1495:4:0", + "src": "1531:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1750,29 +1760,29 @@ "visibility": "internal" } ], - "id": 138, + "id": 139, "initialValue": { "expression": { "baseExpression": { - "id": 134, + "id": 135, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "1516:6:0", + "src": "1552:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 136, + "id": 137, "indexExpression": { - "id": 135, + "id": 136, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1523:2:0", + "referencedDeclaration": 120, + "src": "1559:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -1783,13 +1793,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1516:10:0", + "src": "1552:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" } }, - "id": 137, + "id": 138, "isConstant": false, "isLValue": true, "isPure": false, @@ -1797,25 +1807,25 @@ "memberName": "isLock", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "1516:17:0", + "src": "1552:17:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "VariableDeclarationStatement", - "src": "1495:38:0" + "src": "1531:38:0" }, { "expression": { "arguments": [ { - "id": 140, + "id": 141, "name": "assetIsLocked", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 133, - "src": "1549:13:0", + "referencedDeclaration": 134, + "src": "1585:13:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1829,7 +1839,7 @@ "typeString": "bool" } ], - "id": 139, + "id": 140, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -1837,13 +1847,13 @@ 4294967278 ], "referencedDeclaration": 4294967278, - "src": "1541:7:0", + "src": "1577:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 141, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, @@ -1851,20 +1861,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1541:22:0", + "src": "1577:22:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 142, + "id": 143, "nodeType": "ExpressionStatement", - "src": "1541:22:0" + "src": "1577:22:0" }, { "expression": { - "id": 146, + "id": 147, "isConstant": false, "isLValue": false, "isPure": false, @@ -1872,28 +1882,28 @@ "nodeType": "UnaryOperation", "operator": "delete", "prefix": true, - "src": "1571:17:0", + "src": "1608:17:0", "subExpression": { "baseExpression": { - "id": 143, + "id": 144, "name": "assets", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, - "src": "1578:6:0", + "src": "1615:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", "typeString": "mapping(string memory => struct Asset storage ref)" } }, - "id": 145, + "id": 146, "indexExpression": { - "id": 144, + "id": 145, "name": "id", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1585:2:0", + "referencedDeclaration": 120, + "src": "1622:2:0", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" @@ -1904,7 +1914,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1578:10:0", + "src": "1615:10:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Asset_$8_storage", "typeString": "struct Asset storage ref" @@ -1915,33 +1925,105 @@ "typeString": "tuple()" } }, - "id": 147, + "id": 148, "nodeType": "ExpressionStatement", - "src": "1571:17:0" + "src": "1608:17:0" + }, + { + "expression": { + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 149, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1633:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 151, + "indexExpression": { + "id": 150, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1645:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1633:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1651:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1633:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "1633:23:0" } ] }, "functionSelector": "e24aa37c", - "id": 149, + "id": 156, "implemented": true, "kind": "function", "modifiers": [], "name": "deleteAsset", - "nameLocation": "1313:11:0", + "nameLocation": "1360:11:0", "nodeType": "FunctionDefinition", "parameters": { - "id": 117, + "id": 121, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 116, + "id": 120, "mutability": "mutable", "name": "id", - "nameLocation": "1341:2:0", + "nameLocation": "1388:2:0", "nodeType": "VariableDeclaration", - "scope": 149, - "src": "1325:18:0", + "scope": 156, + "src": "1372:18:0", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { @@ -1949,10 +2031,10 @@ "typeString": "string" }, "typeName": { - "id": 115, + "id": 119, "name": "string", "nodeType": "ElementaryTypeName", - "src": "1325:6:0", + "src": "1372:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -1961,45 +2043,460 @@ "visibility": "internal" } ], - "src": "1324:20:0" + "src": "1371:20:0" }, "returnParameters": { - "id": 118, + "id": 122, "nodeType": "ParameterList", "parameters": [], - "src": "1352:0:0" + "src": "1399:0:0" }, - "scope": 150, - "src": "1304:289:0", + "scope": 192, + "src": "1351:310:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" + }, + { + "body": { + "id": 167, + "nodeType": "Block", + "src": "1731:35:0", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 163, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1746:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 165, + "indexExpression": { + "id": 164, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "1758:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1746:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 162, + "id": 166, + "nodeType": "Return", + "src": "1739:22:0" + } + ] + }, + "functionSelector": "bc548275", + "id": 168, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPresent", + "nameLocation": "1674:9:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 158, + "mutability": "mutable", + "name": "id", + "nameLocation": "1700:2:0", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1684:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 157, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1684:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1683:20:0" + }, + "returnParameters": { + "id": 162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 168, + "src": "1725:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 160, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1725:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1724:6:0" + }, + "scope": 192, + "src": "1665:101:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 190, + "nodeType": "Block", + "src": "1840:161:0", + "statements": [ + { + "assignments": [ + 176 + ], + "declarations": [ + { + "constant": false, + "id": 176, + "mutability": "mutable", + "name": "exists", + "nameLocation": "1853:6:0", + "nodeType": "VariableDeclaration", + "scope": 190, + "src": "1848:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 175, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1848:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 180, + "initialValue": { + "baseExpression": { + "id": 177, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "1862:11:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 179, + "indexExpression": { + "id": 178, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 170, + "src": "1874:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1862:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1848:29:0" + }, + { + "expression": { + "arguments": [ + { + "id": 182, + "name": "exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 176, + "src": "1893:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 181, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1885:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1885:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 184, + "nodeType": "ExpressionStatement", + "src": "1885:15:0" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 185, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "1979:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", + "typeString": "mapping(string memory => struct Asset storage ref)" + } + }, + "id": 187, + "indexExpression": { + "id": 186, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 170, + "src": "1986:2:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1979:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Asset_$8_storage", + "typeString": "struct Asset storage ref" + } + }, + "id": 188, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isLock", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "1979:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 174, + "id": 189, + "nodeType": "Return", + "src": "1972:24:0" + } + ] + }, + "functionSelector": "1ae4eb68", + "id": 191, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isAssetLocked", + "nameLocation": "1779:13:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "mutability": "mutable", + "name": "id", + "nameLocation": "1809:2:0", + "nodeType": "VariableDeclaration", + "scope": 191, + "src": "1793:18:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 169, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1793:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1792:20:0" + }, + "returnParameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 191, + "src": "1834:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 172, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1834:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1833:6:0" + }, + "scope": 192, + "src": "1770:231:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" } ], - "scope": 151, - "src": "543:1053:0", + "scope": 193, + "src": "543:1460:0", "usedErrors": [] } ], - "src": "413:1184:0" + "src": "413:1591:0" }, "functionHashes": { "createAsset(string,uint256)": "db9cc410", "deleteAsset(string)": "e24aa37c", "getAsset(string)": "cd5286d0", + "isAssetLocked(string)": "1ae4eb68", + "isPresent(string)": "bc548275", "lockAsset(string)": "5e82d0a6", "unLockAsset(string)": "def60e0d" }, "gasEstimates": { "creation": { - "codeDepositCost": "228200", - "executionCost": "269", - "totalCost": "228469" + "codeDepositCost": "305800", + "executionCost": "343", + "totalCost": "306143" }, "external": { "createAsset(string,uint256)": "infinite", "deleteAsset(string)": "infinite", "getAsset(string)": "infinite", + "isAssetLocked(string)": "infinite", + "isPresent(string)": "infinite", "lockAsset(string)": "infinite", "unLockAsset(string)": "infinite" } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol b/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol new file mode 100644 index 0000000000..a3139b7ba9 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol @@ -0,0 +1,70 @@ +// ***************************************************************************** +// IMPORTANT: If you update this code then make sure to recompile +// it and update the .json file as well so that they +// remain in sync for consistent test executions. +// With that said, there shouldn't be any reason to recompile this, like ever... +// ***************************************************************************** + +pragma solidity >=0.7.0; +struct Asset{ + address creator; + bool isLock; + uint size; +} + +contract LockAsset { + mapping (string => Asset) assets; + mapping (string => bool) assetExists; + + function createAsset( string calldata id, uint size) public{ + require(size>0); + assets[id].size= size; + assets[id].creator = msg.sender; + assets[id].isLock = false; + assetExists[id] = true; + } + + function getAsset(string calldata id) public view returns (Asset memory) { + return assets[id]; + } + + //Don't care if it is already locked + function lockAsset(string calldata id) public { + bool exists = assetExists[id]; + require(exists); + + assets[id].isLock = true; + } + + //Don't care if it is already unlocked + function unLockAsset(string calldata id) public { + bool exists = assetExists[id]; + require(exists); + + assets[id].isLock = false; + } + + function deleteAsset(string calldata id) public { + bool exists = assetExists[id]; + require(exists); + + //an asset could only be deleted if it is already locked + bool assetIsLocked = assets[id].isLock; + require(assetIsLocked); + + delete assets[id]; + assetExists[id] = false; + } + + function isPresent(string calldata id) public view returns (bool) { + return assetExists[id]; + } + + function isAssetLocked(string calldata id) public view returns (bool) { + bool exists = assetExists[id]; + require(exists); + + //an asset could only be deleted if it is already locked + return assets[id].isLock; + } +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore new file mode 100644 index 0000000000..79bfe1a3e0 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore @@ -0,0 +1,16 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json + +# Compiled TypeScript files +dist + diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json new file mode 100644 index 0000000000..7e2b5a65e6 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json @@ -0,0 +1,62 @@ +{ + "name": "asset-transfer-basic", + "version": "1.0.0", + "description": "Asset Transfer Basic contract implemented in TypeScript", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "lint": "tslint -c tslint.json 'src/**/*.ts'", + "pretest": "npm run lint", + "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", + "start": "fabric-chaincode-node start", + "build": "tsc", + "build:watch": "tsc -w", + "prepublishOnly": "npm run build" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "2.2.2", + "fabric-shim": "2.2.2" + }, + "devDependencies": { + "@types/chai": "4.3.0", + "@types/mocha": "5.2.7", + "@types/node": "18.11.9", + "@types/sinon": "5.0.7", + "@types/sinon-chai": "3.2.8", + "chai": "4.3.6", + "mocha": "5.2.0", + "nyc": "14.1.1", + "sinon": "7.5.0", + "sinon-chai": "3.7.0", + "ts-node": "7.0.1", + "tslint": "5.20.1", + "typescript": "5.3.3" + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "coverage/**", + "dist/**" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": true, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts new file mode 100644 index 0000000000..1e5f4dec06 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts @@ -0,0 +1,23 @@ +/* + SPDX-License-Identifier: Apache-2.0 +*/ + +import { Object, Property } from "fabric-contract-api"; + +@Object() +export class Asset { + @Property() + public docType?: string; + + @Property() + public ID: string; + + @Property() + public isLocked: boolean; + + @Property() + public size: number; + + @Property() + public owner: string; +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts new file mode 100644 index 0000000000..8789a15b11 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts @@ -0,0 +1,201 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + Context, + Contract, + Info, + Returns, + Transaction, +} from "fabric-contract-api"; +import { Asset } from "./asset"; + +@Info({ + title: "AssetTransfer", + description: "Smart contract for trading assets", +}) +export class AssetTransferContract extends Contract { + @Transaction() + public async InitLedger(ctx: Context): Promise { + const assets: Asset[] = [ + { + ID: "asset1", + size: 5, + isLocked: false, + owner: "owner1", + }, + { + ID: "asset2", + size: 5, + isLocked: false, + owner: "owner2", + }, + ]; + + for (const asset of assets) { + asset.docType = "asset"; + await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); + console.info(`Asset ${asset.ID} initialized`); + } + } + + // CreateAsset issues a new asset to the world state with given details. + @Transaction() + public async CreateAsset( + ctx: Context, + id: string, + size: number, + owner: string, + ): Promise { + const asset: Asset = { + ID: id, + size: size, + isLocked: false, + owner: owner, + }; + await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); + } + + // ReadAsset returns the asset stored in the world state with given id. + @Transaction(false) + public async ReadAsset(ctx: Context, id: string): Promise { + const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state + if (!assetJSON || assetJSON.length === 0) { + throw new Error(`The asset ${id} does not exist`); + } + return assetJSON.toString(); + } + + // UpdateAsset updates an existing asset in the world state with provided parameters. + @Transaction() + public async UpdateAsset( + ctx: Context, + id: string, + size: number, + owner: string, + ): Promise { + const exists = await this.AssetExists(ctx, id); + if (!exists) { + throw new Error(`The asset ${id} does not exist`); + } + + if (this.IsAssetLocked(ctx, id)) { + throw new Error(`The asset ${id} is locked`); + } + + // overwriting original asset with new asset + const assetString = await this.ReadAsset(ctx, id); + const asset: Asset = JSON.parse(assetString); + asset.size = size; + asset.owner = owner; + return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); + } + + // TransferAsset changes the owner of an asset with given ID in the world state. + @Transaction() + public async TransferAsset( + ctx: Context, + id: string, + newOwner: string, + ): Promise { + const assetString = await this.ReadAsset(ctx, id); + const asset: Asset = JSON.parse(assetString); + asset.owner = newOwner; + return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); + } + + // DeleteAsset deletes a given asset from the world state. + @Transaction() + public async DeleteAsset(ctx: Context, id: string): Promise { + const exists = await this.AssetExists(ctx, id); + if (!exists) { + throw new Error(`The asset ${id} does not exist`); + } + + return ctx.stub.deleteState(id); + } + + // AssetExists returns true when asset with given ID exists in world state. + @Transaction(false) + @Returns("boolean") + public async AssetExists(ctx: Context, id: string): Promise { + const assetJSON = await ctx.stub.getState(id); + return assetJSON && assetJSON.length > 0; + } + + // IsAssetLocked returns true when asset with given ID is locked in world state. + @Transaction(false) + @Returns("boolean") + public async IsAssetLocked(ctx: Context, id: string): Promise { + const assetJSON = await ctx.stub.getState(id); + + if (assetJSON && assetJSON.length > 0) { + const asset = JSON.parse(assetJSON.toString()); + return asset.isLocked; + } else { + throw new Error(`The asset ${id} does not exist`); + } + } + + @Transaction(false) + @Returns("boolean") + public async LockAsset(ctx: Context, id: string): Promise { + const exists = await this.AssetExists(ctx, id); + + if (!exists) { + throw new Error(`The asset ${id} does not exist`); + } + + // if (this.IsAssetLocked(ctx, id)) { + // throw new Error(`The asset ${id} is already locked`); + // } + + const assetString = await this.ReadAsset(ctx, id); + const asset: Asset = JSON.parse(assetString); + asset.isLocked = true; + await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); + return true; + } + + @Transaction(false) + @Returns("boolean") + public async UnlockAsset(ctx: Context, id: string): Promise { + const exists = await this.AssetExists(ctx, id); + + if (!exists) { + throw new Error(`The asset ${id} does not exist`); + } + + const assetString = await this.ReadAsset(ctx, id); + const asset: Asset = JSON.parse(assetString); + asset.isLocked = false; + await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); + return true; + } + + // GetAllAssets returns all assets found in the world state. + @Transaction(false) + @Returns("string") + public async GetAllAssets(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + const strValue = Buffer.from(result.value.value.toString()).toString( + "utf8", + ); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push({ Key: result.value.key, Record: record }); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..020a09f410 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { AssetTransferContract } from "./assetTransfer"; + +export { AssetTransferContract } from "./assetTransfer"; + +export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json new file mode 100644 index 0000000000..80d8e12d8c --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "target": "es2017", + "moduleResolution": "node", + "module": "commonjs", + "declaration": true, + "sourceMap": true + }, + "include": [ + "./src/**/*" + ], + "exclude": [ + "./src/**/*.spec.ts" + ] +} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts new file mode 100644 index 0000000000..c411b7e24f --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts @@ -0,0 +1,125 @@ +import "jest-extended"; +import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { v4 as uuidv4 } from "uuid"; +import { + FabricContractInvocationType, + RunTxReqWithTxId, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { ReplaySubject } from "rxjs"; + +const testCase = "simulate basic transaction without connectors"; +const logLevel: LogLevelDesc = "TRACE"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "Hephaestus", +}); + +let fabricReplaySubject: ReplaySubject; +let hephaestusOptions: IPluginCcModelHephaestusOptions; +let hephaestus: CcModelHephaestus; + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + fabricReplaySubject = new ReplaySubject(); + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + fabricTxObservable: fabricReplaySubject.asObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); +}); + +test(testCase, async () => { + hephaestus.setCaseId("basic-TEST"); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin is ok"); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(0); + + const txSim1: RunTxReqWithTxId = { + request: { + signingCredential: { + keychainId: "keychainId", + keychainRef: "person 1", + }, + channelName: "channelName", + contractName: "contractName", + invocationType: FabricContractInvocationType.Send, + methodName: "methodName", + params: ["0", "2"], + }, + transactionId: "txID1", + timestamp: new Date(), + }; + fabricReplaySubject.next(txSim1); + log.debug(txSim1); + + await new Promise((f) => setTimeout(f, 3000)); + + // only monitoring the last 1000 miliseconds + // txSim1 will not be monitored + hephaestus.monitorTransactions(1000); + + const txSim2: RunTxReqWithTxId = { + request: { + signingCredential: { + keychainId: "keychainId", + keychainRef: "person 1", + }, + channelName: "channelName", + contractName: "contractName", + invocationType: FabricContractInvocationType.Send, + methodName: "methodName2", + params: ["0", "2"], + }, + transactionId: "txID1", + timestamp: new Date(), + }; + fabricReplaySubject.next(txSim2); + log.debug(txSim2); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(1); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(1); + + const logNameCsv = await hephaestus.persistCrossChainLogCsv( + "example-dummy-basic-test", + ); + expect(logNameCsv).toBeTruthy(); + + const logNameJson = await hephaestus.persistCrossChainLogJson( + "example-dummy-basic-test", + ); + expect(logNameJson).toBeTruthy(); +}); + +afterAll(async () => { + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts new file mode 100644 index 0000000000..b3560e3fe4 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts @@ -0,0 +1,467 @@ +/* + * Copyright 2020-2022 Hyperledger Cactus Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +////////////////////////////////// +// Constants +////////////////////////////////// + +const testLogLevel: LogLevelDesc = "info"; + +import "jest-extended"; +import express from "express"; +import bodyParser from "body-parser"; +import http from "http"; +import Web3 from "web3"; +import { v4 as uuidv4 } from "uuid"; +import { Server as SocketIoServer } from "socket.io"; +import { AddressInfo } from "net"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + IListenOptions, + Logger, + LoggerProvider, + Servers, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { Account } from "web3-core"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const log: Logger = LoggerProvider.getOrCreate({ + label: "cross-chain-model-conformance-checking.test", + level: testLogLevel, +}); +log.info("Test started"); + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; + +describe("Test cross-chain model serialization and conformance checking", () => { + const keychainEntryKey = uuidv4(); + let testEthAccount: Account, + web3: InstanceType, + addressInfo, + address: string, + port: number, + apiHost: string, + apiConfig, + ledger: GethTestLedger, + apiClient: EthereumApi, + connector: PluginLedgerConnectorEthereum, + rpcApiHttpHost: string, + keychainPlugin: PluginKeychainMemory; + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const server = http.createServer(expressApp); + const wsApi = new SocketIoServer(server, { + path: Constants.SocketIoConnectionPathV1, + }); + + let hephaestus: CcModelHephaestus; + let hephaestusOptions: IPluginCcModelHephaestusOptions; + + ////////////////////////////////// + // Environment Setup + ////////////////////////////////// + + beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel: testLogLevel }); + fail("Pruning didn't throw OK"); + }); + + ledger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ledger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + apiClient = new EthereumApi(apiConfig); + rpcApiHttpHost = await ledger.getRpcApiHttpHost(); + web3 = new Web3(rpcApiHttpHost); + testEthAccount = web3.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel: testLogLevel, + }); + + keychainPlugin.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + connector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHost, + logLevel: testLogLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), + }); + + await connector.getOrCreateWebServices(); + await connector.registerWebServices(expressApp, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await apiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3.utils.toWei("5000", "ether"); + await apiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: testLogLevel, + ethTxObservable: connector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + }); + + test("Monitor Ethereum transactions and create cross-chain model", async () => { + hephaestus.setCaseId("ETHEREUM_MONITORING"); + hephaestus.monitorTransactions(); + + const numberOfCases = 3; + const txsPerCase = 3; + let caseNumber = 1; + + while (numberOfCases >= caseNumber) { + const createResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1", 5], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const deleteResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + + caseNumber++; + } + + const totalTxs = txsPerCase * numberOfCases; + + expect(hephaestus.numberUnprocessedReceipts).toEqual(totalTxs); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(totalTxs); + + const model = await hephaestus.createModel(); + expect(model).toBeTruthy(); + expect(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)) + .toBeTruthy; + + hephaestus.setIsModeling(false); + }); + + test("Check confomity of unmodeled transactions", async () => { + const createResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset2", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset2"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const deleteResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset2"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + + expect(hephaestus.numberEventsUncheckedLog).toEqual(0); + expect(hephaestus.numberUnprocessedReceipts).toEqual(3); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + expect(hephaestus.numberEventsUncheckedLog).toEqual(3); + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + + const serializedCCModel = hephaestus.getModel(CrossChainModelType.PetriNet); + expect(serializedCCModel).toBeTruthy(); + + const conformanceDetails = await hephaestus.checkConformance( + serializedCCModel!, + ); + expect(conformanceDetails).toBeTruthy(); + console.log(conformanceDetails); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsUncheckedLog).toEqual(0); + + const tree = hephaestus.convertModelToProcessTree(); + expect(tree).toBeTruthy(); + expect( + hephaestus.ccModel.getModel(CrossChainModelType.ProcessTree), + ).toBeTruthy(); + console.log(hephaestus.ccModel.getModel(CrossChainModelType.ProcessTree)); + }); + + test("Check confomity of unmodeled transactions that should not conform", async () => { + const createResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset3", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset3"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const deleteResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset3"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + + const getResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "getAsset", + params: ["asset3"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(getResEth).toBeTruthy(); + expect(getResEth.data).toBeTruthy(); + expect(getResEth.status).toBe(200); + + expect(hephaestus.numberEventsUncheckedLog).toEqual(0); + expect(hephaestus.numberUnprocessedReceipts).toEqual(4); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + expect(hephaestus.numberEventsUncheckedLog).toEqual(4); + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + + const serializedCCModel = hephaestus.getModel(CrossChainModelType.PetriNet); + expect(serializedCCModel).toBeTruthy(); + + const conformanceDetails = await hephaestus.checkConformance( + serializedCCModel!, + ); + expect(conformanceDetails).toBeTruthy(); + console.log(conformanceDetails); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsUncheckedLog).toEqual(0); + expect(hephaestus.numberEventsNonConformanceLog).toEqual(4); + + const tree = hephaestus.convertModelToProcessTree(); + expect(tree).toBeTruthy(); + expect(hephaestus.getModel(CrossChainModelType.ProcessTree)).toBeTruthy(); + console.log(hephaestus.getModel(CrossChainModelType.ProcessTree)); + }); + + afterAll(async () => { + log.info("Shutdown connector..."); + await connector.shutdown(); + + log.info("Stop and destroy the test ledger..."); + await ledger.stop(); + await ledger.destroy(); + + log.info("Shutdown server..."); + await Servers.shutdown(server); + + log.info("Prune docker..."); + const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); + await expect(pruning).resolves.toBeTruthy(); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts new file mode 100644 index 0000000000..b9517fd912 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts @@ -0,0 +1,282 @@ +/* + * Copyright 2020-2022 Hyperledger Cactus Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +////////////////////////////////// +// Constants +////////////////////////////////// + +const testLogLevel: LogLevelDesc = "info"; + +import "jest-extended"; +import express from "express"; +import bodyParser from "body-parser"; +import http from "http"; +import Web3 from "web3"; +import { v4 as uuidv4 } from "uuid"; +import { Server as SocketIoServer } from "socket.io"; +import { AddressInfo } from "net"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + IListenOptions, + Logger, + LoggerProvider, + Servers, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { Account } from "web3-core"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const log: Logger = LoggerProvider.getOrCreate({ + label: "cross-chain-model-periodic-update.test", + level: testLogLevel, +}); +log.info("Test started"); + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; + +describe("Test the periodic update of the cross-chain model", () => { + const keychainEntryKey = uuidv4(); + let testEthAccount: Account, + web3: InstanceType, + addressInfo, + address: string, + port: number, + apiHost: string, + apiConfig, + ledger: GethTestLedger, + apiClient: EthereumApi, + connector: PluginLedgerConnectorEthereum, + rpcApiHttpHost: string, + keychainPlugin: PluginKeychainMemory; + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const server = http.createServer(expressApp); + const wsApi = new SocketIoServer(server, { + path: Constants.SocketIoConnectionPathV1, + }); + + let hephaestus: CcModelHephaestus; + let hephaestusOptions: IPluginCcModelHephaestusOptions; + const fileName = "example-dummy-periodic-update"; + + ////////////////////////////////// + // Environment Setup + ////////////////////////////////// + + beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel: testLogLevel }); + fail("Pruning didn't throw OK"); + }); + + ledger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ledger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + apiClient = new EthereumApi(apiConfig); + rpcApiHttpHost = await ledger.getRpcApiHttpHost(); + web3 = new Web3(rpcApiHttpHost); + testEthAccount = web3.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel: testLogLevel, + }); + + keychainPlugin.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + connector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHost, + logLevel: testLogLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), + }); + + await connector.getOrCreateWebServices(); + await connector.registerWebServices(expressApp, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await apiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3.utils.toWei("5000", "ether"); + await apiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: testLogLevel, + ethTxObservable: connector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + }); + + test("update cross-chain model across 10 cases", async () => { + hephaestus.setCaseId("CCMODEL_UPDATE"); + hephaestus.monitorTransactions(); + + await hephaestus.periodicCCModelUpdate(fileName, 10000); + + const numberOfCases = 10; + const txsPerCase = 3; + let caseNumber = 1; + + while (numberOfCases >= caseNumber) { + const createResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1", 5], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const deleteResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + + caseNumber++; + } + + const totalTxs = txsPerCase * numberOfCases; + + await hephaestus.stopPeriodicCCModelUpdate(fileName); + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(totalTxs); + + console.log(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)); + }); + + afterAll(async () => { + log.info("Shutdown connector..."); + await connector.shutdown(); + + log.info("Stop and destroy the test ledger..."); + await ledger.stop(); + await ledger.destroy(); + + log.info("Shutdown server..."); + await Servers.shutdown(server); + + log.info("Prune docker..."); + const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); + await expect(pruning).resolves.toBeTruthy(); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts new file mode 100644 index 0000000000..18cf5da629 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts @@ -0,0 +1,288 @@ +/* + * Copyright 2020-2022 Hyperledger Cactus Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +////////////////////////////////// +// Constants +////////////////////////////////// + +const testLogLevel: LogLevelDesc = "info"; + +import "jest-extended"; +import express from "express"; +import bodyParser from "body-parser"; +import http from "http"; +import Web3 from "web3"; +import { v4 as uuidv4 } from "uuid"; +import { Server as SocketIoServer } from "socket.io"; +import { AddressInfo } from "net"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + IListenOptions, + Logger, + LoggerProvider, + Servers, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { Account } from "web3-core"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const log: Logger = LoggerProvider.getOrCreate({ + label: "cross-chain-model-serialization.test", + level: testLogLevel, +}); +log.info("Test started"); + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; + +describe("Test cross-chain model serialization", () => { + const keychainEntryKey = uuidv4(); + let testEthAccount: Account, + web3: InstanceType, + addressInfo, + address: string, + port: number, + apiHost: string, + apiConfig, + ledger: GethTestLedger, + apiClient: EthereumApi, + connector: PluginLedgerConnectorEthereum, + rpcApiHttpHost: string, + keychainPlugin: PluginKeychainMemory; + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const server = http.createServer(expressApp); + const wsApi = new SocketIoServer(server, { + path: Constants.SocketIoConnectionPathV1, + }); + + let hephaestus: CcModelHephaestus; + let hephaestusOptions: IPluginCcModelHephaestusOptions; + + ////////////////////////////////// + // Environment Setup + ////////////////////////////////// + + beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel: testLogLevel }); + fail("Pruning didn't throw OK"); + }); + + ledger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ledger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + apiClient = new EthereumApi(apiConfig); + rpcApiHttpHost = await ledger.getRpcApiHttpHost(); + web3 = new Web3(rpcApiHttpHost); + testEthAccount = web3.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel: testLogLevel, + }); + + keychainPlugin.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + connector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHost, + logLevel: testLogLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), + }); + + await connector.getOrCreateWebServices(); + await connector.registerWebServices(expressApp, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await apiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3.utils.toWei("5000", "ether"); + await apiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: testLogLevel, + ethTxObservable: connector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + }); + + test("Monitor Ethereum transactions and create cross-chain model", async () => { + hephaestus.setCaseId("ETHEREUM_MONITORING"); + hephaestus.monitorTransactions(); + + const numberOfCases = 3; + const txsPerCase = 3; + let caseNumber = 1; + + while (numberOfCases >= caseNumber) { + const createResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1", 5], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const deleteResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + + caseNumber++; + } + + const totalTxs = txsPerCase * numberOfCases; + + expect(hephaestus.numberUnprocessedReceipts).toEqual(totalTxs); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(totalTxs); + + const model = await hephaestus.createModel(); + + expect(model).toBeTruthy(); + expect(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)) + .toBeTruthy; + console.log(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)); + }); + + afterAll(async () => { + log.info("Shutdown connector..."); + await connector.shutdown(); + + log.info("Stop and destroy the test ledger..."); + await ledger.stop(); + await ledger.destroy(); + + log.info("Shutdown server..."); + await Servers.shutdown(server); + + log.info("Prune docker..."); + const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); + await expect(pruning).resolves.toBeTruthy(); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts new file mode 100644 index 0000000000..a5e52a411c --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts @@ -0,0 +1,244 @@ +import "jest-extended"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { v4 as uuidv4 } from "uuid"; +import { + BesuTestLedger, + pruneDockerAllIfGithubAction, + Containers, +} from "@hyperledger/cactus-test-tooling"; +import { + Web3SigningCredentialType, + PluginLedgerConnectorBesu, + EthContractInvocationType, + ReceiptType, + IPluginLedgerConnectorBesuOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import { Account } from "web3-core"; + +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; + +const logLevel: LogLevelDesc = "INFO"; + +let besuLedger: BesuTestLedger; +let contractName: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let testEthAccount: Account; +let keychainPlugin: PluginKeychainMemory; +const BESU_ASSET_ID = uuidv4(); + +let hephaestus: CcModelHephaestus; +let hephaestusOptions: IPluginCcModelHephaestusOptions; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "monitor-4-besu-events.test", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + besuLedger = new BesuTestLedger(); + await besuLedger.start(); + + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + testEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + contractName = "LockAsset"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + keychainPlugin.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin], + }); + + const options: IPluginLedgerConnectorBesuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + connector = new PluginLedgerConnectorBesu(options); + pluginRegistry.add(connector); + + await connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: testEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + const balance = await web3.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + + log.info("Connector initialized"); + + const deployOut = await connector.deployContract({ + keychainId: keychainPlugin.getKeychainId(), + contractName: LockAssetContractJson.contractName, + contractAbi: LockAssetContractJson.abi, + constructorArgs: [], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: LockAssetContractJson.bytecode, + gas: 1000000, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.transactionReceipt).toBeTruthy(); + expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); + log.info("Contract Deployed successfully"); + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + besuTxObservable: connector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + } +}); + +test("monitor Besu transactions", async () => { + hephaestus.setCaseId("BESU_MONITORING"); + hephaestus.monitorTransactions(); + + const { success: createResBesu } = await connector.invokeContract({ + contractName, + keychainId: keychainPlugin.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: [BESU_ASSET_ID, 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + + const { success: lockResBesu } = await connector.invokeContract({ + contractName, + keychainId: keychainPlugin.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: [BESU_ASSET_ID], + signingCredential: { + ethAccount: testEthAccount.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu).toBeTruthy(); + + const { success: isPresentResBesu } = await connector.invokeContract({ + contractName, + keychainId: keychainPlugin.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "isPresent", + params: [BESU_ASSET_ID], + signingCredential: { + ethAccount: testEthAccount.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(isPresentResBesu).toBeTruthy(); + + const { success: deleteResBesu } = await connector.invokeContract({ + contractName, + keychainId: keychainPlugin.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: [BESU_ASSET_ID], + signingCredential: { + ethAccount: testEthAccount.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(deleteResBesu).toBeTruthy(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(4); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(4); + + await hephaestus.persistCrossChainLogCsv("example-dummy-besu-4-events"); + await hephaestus.persistCrossChainLogJson("example-dummy-besu-4-events"); +}); + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts new file mode 100644 index 0000000000..ef8860bf7c --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts @@ -0,0 +1,293 @@ +/* + * Copyright 2020-2022 Hyperledger Cactus Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +////////////////////////////////// +// Constants +////////////////////////////////// + +const testLogLevel: LogLevelDesc = "info"; + +import "jest-extended"; +import express from "express"; +import bodyParser from "body-parser"; +import http from "http"; +import Web3 from "web3"; +import { v4 as uuidv4 } from "uuid"; +import { Server as SocketIoServer } from "socket.io"; +import { AddressInfo } from "net"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + IListenOptions, + Logger, + LoggerProvider, + Servers, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { Account } from "web3-core"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; + +const log: Logger = LoggerProvider.getOrCreate({ + label: "monitor-4-ethereum-events.test", + level: testLogLevel, +}); +log.info("Test started"); + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; + +describe("Ethereum contract deploy and invoke while monitoring", () => { + const keychainEntryKey = uuidv4(); + let testEthAccount: Account, + web3: InstanceType, + addressInfo, + address: string, + port: number, + apiHost: string, + apiConfig, + ledger: GethTestLedger, + apiClient: EthereumApi, + connector: PluginLedgerConnectorEthereum, + rpcApiHttpHost: string, + keychainPlugin: PluginKeychainMemory; + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const server = http.createServer(expressApp); + const wsApi = new SocketIoServer(server, { + path: Constants.SocketIoConnectionPathV1, + }); + + let hephaestus: CcModelHephaestus; + let hephaestusOptions: IPluginCcModelHephaestusOptions; + + ////////////////////////////////// + // Environment Setup + ////////////////////////////////// + + beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel: testLogLevel }); + fail("Pruning didn't throw OK"); + }); + + ledger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ledger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + apiClient = new EthereumApi(apiConfig); + rpcApiHttpHost = await ledger.getRpcApiHttpHost(); + web3 = new Web3(rpcApiHttpHost); + testEthAccount = web3.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel: testLogLevel, + }); + + keychainPlugin.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + connector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHost, + logLevel: testLogLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), + }); + + await connector.getOrCreateWebServices(); + await connector.registerWebServices(expressApp, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await apiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3.utils.toWei("5000", "ether"); + await apiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: testLogLevel, + ethTxObservable: connector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + }); + + test("monitor Ethereum transactions", async () => { + hephaestus.setCaseId("ETHEREUM_MONITORING"); + hephaestus.monitorTransactions(); + + const createResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1", 5], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const isPresentResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "isPresent", + params: ["asset1", "owner1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(isPresentResEth).toBeTruthy(); + expect(isPresentResEth.data).toBeTruthy(); + expect(isPresentResEth.status).toBe(200); + + const deleteResEth = await apiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPlugin.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset1", "owner1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(4); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(4); + + await hephaestus.persistCrossChainLogCsv("example-dummy-ethereum-4-events"); + await hephaestus.persistCrossChainLogJson( + "example-dummy-ethereum-4-events", + ); + }); + + afterAll(async () => { + log.info("Shutdown connector..."); + await connector.shutdown(); + + log.info("Stop and destroy the test ledger..."); + await ledger.stop(); + await ledger.destroy(); + + log.info("Shutdown server..."); + await Servers.shutdown(server); + + log.info("Prune docker..."); + const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); + await expect(pruning).resolves.toBeTruthy(); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts new file mode 100644 index 0000000000..f305c7529c --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts @@ -0,0 +1,364 @@ +import "jest-extended"; +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { DiscoveryOptions } from "fabric-network"; +import bodyParser from "body-parser"; +import path from "path"; +import http, { Server } from "http"; +import fs from "fs-extra"; +import { + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FileBase64, + ChainCodeProgrammingLanguage, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + Containers, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import express from "express"; +import { AddressInfo } from "net"; +import { v4 as uuidv4 } from "uuid"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; + +let server: Server; + +let fabricSigningCredential: FabricSigningCredential; +const logLevel: LogLevelDesc = "INFO"; + +let fabricLedger: FabricTestLedgerV1; +let contractName: string; +let channelName: string; + +let config: Configuration; +let apiClient: FabricApi; + +let fabricConnector: PluginLedgerConnectorFabric; +const FABRIC_ASSET_ID = uuidv4(); + +let hephaestus: CcModelHephaestus; +let hephaestusOptions: IPluginCcModelHephaestusOptions; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "monitor-4-fabric-events.test", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + log.info("Fabric Ledger started"); + + const channelId = "mychannel"; + channelName = channelId; + + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + const sshConfig = await fabricLedger.getSshConfig(); + log.info("admin enrolled"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel, + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + server = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + const apiUrl = `http://${address}:${port}`; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + config = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(config); + + // deploy contracts ... + contractName = "basic-asset-transfer-2"; + const contractRelPath = + "../fabric-contracts/lock-asset/chaincode-typescript"; + + const contractDir = path.join(__dirname, contractRelPath); + + // ├── package.json + // ├── src + // │ ├── assetTransfer.ts + // │ ├── asset.ts + // │ ├── index.ts + // │ └── ITraceableContract.ts + // ├── tsconfig.json + // -------- + const sourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./asset.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./assetTransfer.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles, + ccName: contractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "basic-asset-transfer-2", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + fabricTxObservable: fabricConnector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + } +}); + +test("monitor Fabric transactions", async () => { + hephaestus.setCaseId("FABRIC_MONITORING"); + hephaestus.monitorTransactions(); + + const createResFabric = await apiClient.runTransactionV1({ + contractName, + channelName, + params: [FABRIC_ASSET_ID, "10", "owner1"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric).toBeTruthy(); + + const transferResFabric = await apiClient.runTransactionV1({ + contractName, + channelName, + params: [FABRIC_ASSET_ID, "owner2"], + methodName: "TransferAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(transferResFabric).toBeTruthy(); + + const transferBackResFabric = await apiClient.runTransactionV1({ + contractName, + channelName, + params: [FABRIC_ASSET_ID, "owner1"], + methodName: "TransferAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(transferBackResFabric).toBeTruthy(); + + const deleteResFabric = await apiClient.runTransactionV1({ + contractName, + channelName, + params: [FABRIC_ASSET_ID], + methodName: "DeleteAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(deleteResFabric).toBeTruthy(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(4); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(4); + + await hephaestus.persistCrossChainLogCsv("example-dummy-fabric-4-events"); + await hephaestus.persistCrossChainLogJson("example-dummy-fabric-4-events"); +}); + +afterAll(async () => { + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(server); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts new file mode 100644 index 0000000000..5e7e998814 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts @@ -0,0 +1,705 @@ +import "jest-extended"; +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; +import { Server as SocketIoServer } from "socket.io"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { DiscoveryOptions } from "fabric-network"; +import bodyParser from "body-parser"; +import path from "path"; +import http, { Server } from "http"; +import fs from "fs-extra"; +import { + Web3SigningCredentialType as Web3SigningCredentialTypeBesu, + PluginLedgerConnectorBesu, + EthContractInvocationType as EthContractInvocationTypeBesu, + ReceiptType, + IPluginLedgerConnectorBesuOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { + Configuration as ConfigurationFabric, + DefaultEventHandlerStrategy, + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FileBase64, + ChainCodeProgrammingLanguage, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + BesuTestLedger, + Containers, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import Web3 from "web3"; +import { Account } from "web3-core"; +import express from "express"; +import { AddressInfo } from "net"; +import { v4 as uuidv4 } from "uuid"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; + +const logLevel: LogLevelDesc = "INFO"; + +let fabricServer: Server; +let fabricSigningCredential: FabricSigningCredential; +let fabricLedger: FabricTestLedgerV1; +let fabricContractName: string; +let channelName: string; +let config: ConfigurationFabric; +let fabricApiClient: FabricApi; +let fabricConnector: PluginLedgerConnectorFabric; +const FABRIC_ASSET_ID = uuidv4(); + +let besuLedger: BesuTestLedger; +let besuContractName: string; +let rpcApiHttpHostBesu: string; +let rpcApiWsHost: string; +let web3Besu: Web3; +let firstHighNetWorthAccount: string; +let besuConnector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let testEthAccountBesu: Account; +let keychainPluginBesu: PluginKeychainMemory; +const BESU_ASSET_ID = uuidv4(); + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; +const keychainEntryKey = uuidv4(); +let testEthAccount: Account; +let web3Eth: InstanceType; +let addressInfo; +let address: string; +let port: number; +let apiHost: string; +let apiConfig; +let ethereumLedger: GethTestLedger; +let ethereumApiClient: EthereumApi; +let ethereumConnector: PluginLedgerConnectorEthereum; +let rpcApiHttpHostEthereum: string; +let keychainPluginEthereum: PluginKeychainMemory; +const expressAppEthereum = express(); +expressAppEthereum.use(bodyParser.json({ limit: "250mb" })); +const ethereumServer = http.createServer(expressAppEthereum); +const wsApi = new SocketIoServer(ethereumServer, { + path: Constants.SocketIoConnectionPathV1, +}); + +let hephaestus: CcModelHephaestus; +let hephaestusOptions: IPluginCcModelHephaestusOptions; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "monitor-besu-ethereum-fabric-events.test.test", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + log.info("Fabric Ledger started"); + + const channelId = "mychannel"; + channelName = channelId; + + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + const sshConfig = await fabricLedger.getSshConfig(); + log.info("admin enrolled"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + const keychainPluginFabric = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPluginFabric], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel, + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressAppFabric = express(); + expressAppFabric.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressAppFabric); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + const apiUrl = `http://${address}:${port}`; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressAppFabric); + + config = new ConfigurationFabric({ basePath: apiUrl }); + + fabricApiClient = new FabricApi(config); + + // deploy contracts ... + fabricContractName = "basic-asset-transfer-2"; + const contractRelPath = + "../fabric-contracts/lock-asset/chaincode-typescript"; + + const contractDir = path.join(__dirname, contractRelPath); + + // ├── package.json + // ├── src + // │ ├── assetTransfer.ts + // │ ├── asset.ts + // │ ├── index.ts + // │ └── ITraceableContract.ts + // ├── tsconfig.json + // -------- + const sourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./asset.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./assetTransfer.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await fabricApiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles, + ccName: fabricContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "basic-asset-transfer-2", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + } + { + besuLedger = new BesuTestLedger(); + await besuLedger.start(); + + rpcApiHttpHostBesu = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3Besu = new Web3(rpcApiHttpHostBesu); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + testEthAccountBesu = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + besuContractName = "LockAsset"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPluginBesu = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + keychainPluginBesu.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPluginBesu], + }); + + const options: IPluginLedgerConnectorBesuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost: rpcApiHttpHostBesu, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + besuConnector = new PluginLedgerConnectorBesu(options); + pluginRegistry.add(besuConnector); + + await besuConnector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: testEthAccountBesu.address, + value: 10e9, + gas: 1000000, + }, + }); + const balance = await web3Besu.eth.getBalance(testEthAccountBesu.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + + log.info("Connector initialized"); + + const deployOut = await besuConnector.deployContract({ + keychainId: keychainPluginBesu.getKeychainId(), + contractName: LockAssetContractJson.contractName, + contractAbi: LockAssetContractJson.abi, + constructorArgs: [], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + bytecode: LockAssetContractJson.bytecode, + gas: 1000000, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.transactionReceipt).toBeTruthy(); + expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); + log.info("Contract Deployed successfully"); + } + { + ethereumLedger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ethereumLedger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server: ethereumServer, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + ethereumApiClient = new EthereumApi(apiConfig); + rpcApiHttpHostEthereum = await ethereumLedger.getRpcApiHttpHost(); + web3Eth = new Web3(rpcApiHttpHostEthereum); + testEthAccount = web3Eth.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPluginEthereum = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPluginEthereum.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + ethereumConnector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHostEthereum, + logLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPluginEthereum] }), + }); + + await ethereumConnector.getOrCreateWebServices(); + await ethereumConnector.registerWebServices(expressAppEthereum, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await ethereumApiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3Eth.utils.toWei("5000", "ether"); + await ethereumApiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3Eth.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + } + { + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + besuTxObservable: besuConnector.getTxSubjectObservable(), + ethTxObservable: ethereumConnector.getTxSubjectObservable(), + fabricTxObservable: fabricConnector.getTxSubjectObservable(), + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + } +}); + +test("Monitor Besu, Ethereum and Fabric transactions", async () => { + hephaestus.setCaseId("BESU_ETHEREUM_FABRIC_MONITORING_3_CASES"); + hephaestus.monitorTransactions(); + + const numberOfCases = 3; + const txsPerCase = 9; + let caseNumber = 1; + + while (numberOfCases >= caseNumber) { + hephaestus.setCaseId("BESU_ETHEREUM_FABRIC_" + caseNumber); + { + const { success: createResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: [BESU_ASSET_ID, 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + + const { success: lockResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: [BESU_ASSET_ID], + signingCredential: { + ethAccount: testEthAccountBesu.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu).toBeTruthy(); + + const { success: deleteResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "deleteAsset", + params: [BESU_ASSET_ID], + signingCredential: { + ethAccount: testEthAccountBesu.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(deleteResBesu).toBeTruthy(); + } + { + const createResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1", 5], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(createResEth.data).toBeTruthy(); + + const lockResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(lockResEth.data).toBeTruthy(); + expect(lockResEth.status).toBe(200); + + const deleteResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset1", "owner1"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(deleteResEth.data).toBeTruthy(); + expect(deleteResEth.status).toBe(200); + } + { + const createResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: [FABRIC_ASSET_ID, "10", "owner1"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric).toBeTruthy(); + + const transferResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: [FABRIC_ASSET_ID, "owner2"], + methodName: "TransferAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(transferResFabric).toBeTruthy(); + + const deleteResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: [FABRIC_ASSET_ID], + methodName: "DeleteAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(deleteResFabric).toBeTruthy(); + } + + caseNumber++; + } + + const totalTxs = txsPerCase * numberOfCases; + expect(hephaestus.numberUnprocessedReceipts).toEqual(totalTxs); + expect(hephaestus.numberEventsLog).toEqual(0); + + await hephaestus.txReceiptToCrossChainEventLogEntry(); + + expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(totalTxs); + + await hephaestus.persistCrossChainLogCsv( + "example-dummy-besu-ethereum-fabric-events", + ); + await hephaestus.persistCrossChainLogJson( + "example-dummy-besu-ethereum-fabric-events", + ); +}); + +afterAll(async () => { + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await besuLedger.stop(); + await besuLedger.destroy(); + + await ethereumConnector.shutdown(); + await ethereumLedger.stop(); + await ethereumLedger.destroy(); + await Servers.shutdown(ethereumServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-cc-tx-visualization/tsconfig.json b/packages/cactus-plugin-ccmodel-hephaestus/tsconfig.json similarity index 62% rename from packages/cactus-plugin-cc-tx-visualization/tsconfig.json rename to packages/cactus-plugin-ccmodel-hephaestus/tsconfig.json index 937bea6bb9..8ab9da859c 100644 --- a/packages/cactus-plugin-cc-tx-visualization/tsconfig.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/tsconfig.json @@ -5,11 +5,14 @@ "outDir": "./dist/lib/", "declarationDir": "dist/types", "rootDir": "./src", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-cc-tx-visualization.tsbuildinfo" + "tsBuildInfoFile": "../../.build-cache/cactus-plugin-ccmodel-hephaestus.tsbuildinfo" }, "include": [ "./src", - "./src/test/solidity/*.json", + "./src/test/solidity/lock-asset-contract/*.json", + ], + "exclude":[ + "./src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/**/*.ts" ], "references": [ { diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json index 3c23f13355..545d518403 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/json/openapi.json @@ -841,18 +841,6 @@ ], "additionalProperties": false, "properties": { - "caseID": { - "type": "string", - "nullable": false - }, - "cost": { - "type": "number", - "nullable": false - }, - "carbonFootprint": { - "type": "string", - "nullable": false - }, "contractName": { "type": "string", "nullable": false diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts index 95b644d582..31cb240ce2 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -714,24 +714,6 @@ export interface GetTransactionV1Response { * @interface InvokeContractV1Request */ export interface InvokeContractV1Request { - /** - * - * @type {string} - * @memberof InvokeContractV1Request - */ - 'caseID'?: string; - /** - * - * @type {number} - * @memberof InvokeContractV1Request - */ - 'cost'?: number; - /** - * - * @type {string} - * @memberof InvokeContractV1Request - */ - 'carbonFootprint'?: string; /** * * @type {string} diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts index b29f378aac..25291cd740 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/plugin-ledger-connector-besu.ts @@ -30,7 +30,6 @@ import { ICactusPluginOptions, IPluginGrpcService, IGrpcSvcDefAndImplPair, - LedgerType, } from "@hyperledger/cactus-core-api"; import { @@ -105,13 +104,13 @@ import { getBlockV1Http } from "./impl/get-block-v1/get-block-v1-http"; import { transactV1Impl } from "./impl/transact-v1/transact-v1-impl"; import { deployContractV1Keychain } from "./impl/deploy-contract-v1/deploy-contract-v1-keychain"; import { deployContractV1NoKeychain } from "./impl/deploy-contract-v1/deploy-contract-v1-no-keychain"; +import { ReplaySubject, Observable } from "rxjs"; -//cc-tx-viz -import * as amqp from "amqp-ts"; -import { - BesuV2TxReceipt, - IsVisualizable, -} from "@hyperledger/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt"; +export interface RunTransactionV1Exchange { + request: InvokeContractV1Request; + response: RunTransactionResponse; + timestamp: Date; +} export const E_KEYCHAIN_NOT_FOUND = "cactus.connector.besu.keychain_not_found"; @@ -122,10 +121,6 @@ export interface IPluginLedgerConnectorBesuOptions pluginRegistry: PluginRegistry; prometheusExporter?: PrometheusExporter; logLevel?: LogLevelDesc; - collectTransactionReceipts?: boolean; - persistMessages?: boolean; - queueId?: string; - eventProvider?: string; } export class PluginLedgerConnectorBesu @@ -138,7 +133,7 @@ export class PluginLedgerConnectorBesu >, ICactusPlugin, IPluginGrpcService, - IPluginWebService //, IsVisualizable //cc-tx-viz + IPluginWebService { private readonly instanceId: string; public prometheusExporter: PrometheusExporter; @@ -151,17 +146,12 @@ export class PluginLedgerConnectorBesu private contracts: { [name: string]: Contract; } = {}; - private endpoints: IWebServiceEndpoint[] | undefined; - public transactionReceipts: any[] = []; - public collectTransactionReceipts: boolean; + private endpoints: IWebServiceEndpoint[] | undefined; + private txSubject: ReplaySubject = + new ReplaySubject(); - private amqpConnection: amqp.Connection | undefined; - private amqpQueue: amqp.Queue | undefined; - private amqpExchange: amqp.Exchange | undefined; - public readonly persistMessages: boolean | undefined; - public readonly queueId: string | undefined; - public readonly eventProvider: string | undefined; + public static readonly CLASS_NAME = "PluginLedgerConnectorBesu"; public get className(): string { return PluginLedgerConnectorBesu.CLASS_NAME; @@ -193,29 +183,8 @@ export class PluginLedgerConnectorBesu this.prometheusExporter, `${fnTag} options.prometheusExporter`, ); - this.prometheusExporter.startMetricsCollection(); - //Visualization part - this.collectTransactionReceipts = - options.collectTransactionReceipts || false; - if (this.collectTransactionReceipts) { - this.eventProvider = options.eventProvider || "amqp://localhost"; - this.log.debug("Initializing connection to RabbitMQ"); - this.amqpConnection = new amqp.Connection(this.eventProvider); - this.log.info("Connection to RabbitMQ server initialized"); - const queue = options.queueId || "cc-tx-viz-queue"; - this.queueId = queue; - this.persistMessages = options.persistMessages || false; - this.amqpExchange = this.amqpConnection.declareExchange( - `cc-tx-viz-exchange`, - "direct", - { durable: this.persistMessages }, - ); - this.amqpQueue = this.amqpConnection.declareQueue(this.queueId, { - durable: this.persistMessages, - }); - this.amqpQueue.bind(this.amqpExchange); - } + this.prometheusExporter.startMetricsCollection(); } public getOpenApiSpec(): unknown { @@ -232,15 +201,14 @@ export class PluginLedgerConnectorBesu return res; } - public closeConnection(): Promise { - this.log.info("Closing Amqp connection"); - return this.amqpConnection?.close(); - } - public getInstanceId(): string { return this.instanceId; } + public getTxSubjectObservable(): Observable { + return this.txSubject.asObservable(); + } + public async onPluginInit(): Promise { this.web3Quorum = Web3JsQuorum(this.web3); this.log.info("onPluginInit() querying networkId..."); @@ -473,7 +441,7 @@ export class PluginLedgerConnectorBesu req: InvokeContractV1Request, ): Promise { const fnTag = `${this.className}#invokeContract()`; - const startTimeToTransaction = new Date(); + const contractName = req.contractName; let contractInstance: Contract; @@ -504,6 +472,7 @@ export class PluginLedgerConnectorBesu const web3SigningCredential = req.signingCredential as | Web3SigningCredentialPrivateKeyHex | Web3SigningCredentialCactusKeychainRef; + const receipt = await this.transact({ transactionConfig: { data: `0x${contractJSON.bytecode}`, @@ -519,6 +488,7 @@ export class PluginLedgerConnectorBesu web3SigningCredential, privateTransactionConfig: req.privateTransactionConfig, }); + const address = { address: receipt.transactionReceipt.contractAddress, }; @@ -541,6 +511,7 @@ export class PluginLedgerConnectorBesu `${fnTag} Cannot invoke a contract without contract instance, the keychainId param is needed`, ); } + contractInstance = this.contracts[contractName]; if (req.contractAbi != undefined) { let abi; @@ -649,47 +620,16 @@ export class PluginLedgerConnectorBesu const out = await this.transact(txReq); const success = out.transactionReceipt.status; const data = { success, out }; - const endTimeToTransaction = new Date(); - this.log.debug( - `EVAL-${this.className}-ISSUE-TRANSACTION:${ - endTimeToTransaction.getTime() - startTimeToTransaction.getTime() - }`, - ); - if (this.collectTransactionReceipts) { - const startTimeBesuReceipt = new Date(); - const extendedReceipt: BesuV2TxReceipt = { - caseID: req.caseID || "BESU_TBD", - blockchainID: LedgerType.Besu2X, - invocationType: req.invocationType, - methodName: req.methodName, - parameters: req.params, - timestamp: new Date(), - contractName: req.contractName, - status: out.transactionReceipt.status, - transactionHash: out.transactionReceipt.transactionHash, - transactionIndex: out.transactionReceipt.transactionIndex, - blockNumber: out.transactionReceipt.blockNumber, - blockHash: out.transactionReceipt.blockHash, - gasPrice: req.gasPrice, - gas: req.gas, - from: out.transactionReceipt.from, - to: out.transactionReceipt.to, - value: req.value, - gasUsed: out.transactionReceipt.gasUsed, - keychainID: req.keychainId, - signingCredentials: req.signingCredential, - }; - const txReceipt = new amqp.Message(extendedReceipt); - this.amqpQueue?.send(txReceipt); - const endTimeBesuReceipt = new Date(); - this.log.debug(`Sent transaction receipt to queue ${this.queueId}`); - this.log.debug( - `EVAL-${this.className}-GENERATE-AND-CAPTURE-RECEIPT:${ - endTimeBesuReceipt.getTime() - startTimeBesuReceipt.getTime() - }`, - ); - } + // create RunTransactionV1Exchange for transaction monitoring + const receiptData: RunTransactionV1Exchange = { + request: req, + response: out, + timestamp: new Date(), + }; + this.log.debug(`RunTransactionV1Exchange created ${receiptData}`); + this.txSubject.next(receiptData); + return data; } else { throw new Error( diff --git a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts index 8e686fb328..47cc31f64f 100755 --- a/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/main/typescript/public-api.ts @@ -2,6 +2,7 @@ export { E_KEYCHAIN_NOT_FOUND, IPluginLedgerConnectorBesuOptions, PluginLedgerConnectorBesu, + RunTransactionV1Exchange, } from "./plugin-ledger-connector-besu"; export { PluginFactoryLedgerConnector } from "./plugin-factory-ledger-connector"; diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts index 551baf07fb..d455d23aa9 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts +++ b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/plugin-ledger-connector-ethereum.ts @@ -88,6 +88,13 @@ import { Web3StringReturnFormat, convertWeb3ReceiptStatusToBool, } from "./types/util-types"; +import { Observable, ReplaySubject } from "rxjs"; + +export interface RunTransactionV1Exchange { + request: InvokeContractV1Request; + response: RunTransactionResponse; + timestamp: Date; +} // Used when waiting for WS requests to be send correctly before disconnecting const waitForWsProviderRequestsTimeout = 5 * 1000; // 5s @@ -150,6 +157,9 @@ export class PluginLedgerConnectorEthereum private watchBlocksSubscriptions: Map = new Map(); + private txSubject: ReplaySubject = + new ReplaySubject(); + public get className(): string { return PluginLedgerConnectorEthereum.CLASS_NAME; } @@ -235,6 +245,10 @@ export class PluginLedgerConnectorEthereum return this.instanceId; } + public getTxSubjectObservable(): Observable { + return this.txSubject.asObservable(); + } + private async removeWatchBlocksSubscriptionForSocket(socketId: string) { try { const subscription = this.watchBlocksSubscriptions.get(socketId); @@ -655,6 +669,16 @@ export class PluginLedgerConnectorEthereum }); const success = out.transactionReceipt.status; const data = { success, out }; + + // create RunTransactionV1Exchange for transaction monitoring + const receiptData: RunTransactionV1Exchange = { + request: req, + response: out, + timestamp: new Date(), + }; + this.log.debug(`RunTransactionV1Exchange created ${receiptData}`); + this.txSubject.next(receiptData); + return data; } else { throw new Error( diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts index 56d5b0cfbb..cd2e9f7194 100755 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/public-api.ts @@ -3,6 +3,7 @@ export * from "./generated/openapi/typescript-axios"; export { PluginLedgerConnectorEthereum, IPluginLedgerConnectorEthereumOptions, + RunTransactionV1Exchange, } from "./plugin-ledger-connector-ethereum"; export * from "./sign-utils"; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json index b3a37d784a..ca384261e4 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/json/openapi.json @@ -414,18 +414,6 @@ "nullable": false } }, - "cost":{ - "type": "number", - "nullable": false - }, - "carbonFootprint":{ - "type": "string", - "nullable": false - }, - "caseID":{ - "type": "string", - "nullable": false - }, "transientData": { "type": "object", "nullable": true diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts index 74f7ec2d44..4ba11dde84 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -1365,24 +1365,6 @@ export interface RunTransactionRequest { * @memberof RunTransactionRequest */ 'endorsingOrgs'?: Array; - /** - * - * @type {number} - * @memberof RunTransactionRequest - */ - cost?: number; - /** - * - * @type {string} - * @memberof RunTransactionRequest - */ - carbonFootprint?: string; - /** - * - * @type {string} - * @memberof RunTransactionRequest - */ - caseID?: string; /** * * @type {object} diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts index 2983e2031c..e1ca9d54cb 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/plugin-ledger-connector-fabric.ts @@ -1,4 +1,3 @@ -/* eslint-disable prettier/prettier */ import fs from "fs"; import path from "path"; import { v4 as uuidv4 } from "uuid"; @@ -47,7 +46,6 @@ import { IWebServiceEndpoint, ICactusPlugin, ICactusPluginOptions, - LedgerType, } from "@hyperledger/cactus-core-api"; import { @@ -161,13 +159,16 @@ import { } from "./common/utils"; import { findAndReplaceFabricLoggingSpec } from "./common/find-and-replace-fabric-logging-spec"; import { deployContractGoSourceImplFabricV256 } from "./deploy-contract-go-source/deploy-contract-go-source-impl-fabric-v2-5-6"; +import { Observable, ReplaySubject } from "rxjs"; const { loadFromConfig } = require("fabric-network/lib/impl/ccp/networkconfig"); assertFabricFunctionIsAvailable(loadFromConfig, "loadFromConfig"); -//cc-tx-viz -import * as amqp from "amqp-ts"; -import {FabricV2TxReceipt, IsVisualizable} from "@hyperledger/cactus-plugin-cc-tx-visualization/src/main/typescript/models/transaction-receipt"; +export interface RunTxReqWithTxId { + request: RunTransactionRequest; + transactionId: string; + timestamp: Date; +} /** * Constant value holding the default $GOPATH in the Fabric CLI container as @@ -206,12 +207,6 @@ export interface IPluginLedgerConnectorFabricOptions vaultConfig?: IVaultConfig; webSocketConfig?: IWebSocketConfig; signCallback?: SignPayloadCallback; - - //cc-tx-viz - collectTransactionReceipts?: boolean; - persistMessages?: boolean; - queueId?: string; - eventProvider?: string; } export class PluginLedgerConnectorFabric @@ -222,7 +217,6 @@ export class PluginLedgerConnectorFabric RunTransactionRequest, RunTransactionResponse >, - IsVisualizable, ICactusPlugin, IPluginWebService { @@ -239,15 +233,7 @@ export class PluginLedgerConnectorFabric private readonly certStore: CertDatastore; private readonly sshDebugOn: boolean; private runningWatchBlocksMonitors = new Set(); - - //cc-tx-viz - private amqpConnection: amqp.Connection | undefined; - private amqpQueue: amqp.Queue | undefined; - private amqpExchange: amqp.Exchange | undefined; - public readonly collectTransactionReceipts: boolean; - public readonly persistMessages: boolean | undefined; - public readonly queueId: string | undefined; - public readonly eventProvider: string | undefined; + private txSubject: ReplaySubject = new ReplaySubject(); public get className(): string { return PluginLedgerConnectorFabric.CLASS_NAME; @@ -261,7 +247,7 @@ export class PluginLedgerConnectorFabric constructor(public readonly opts: IPluginLedgerConnectorFabricOptions) { const fnTag = `${this.className}#constructor()`; Checks.truthy(opts, `${fnTag} arg options`); - //Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); + Checks.truthy(opts.instanceId, `${fnTag} options.instanceId`); Checks.truthy(opts.peerBinary, `${fnTag} options.peerBinary`); Checks.truthy(opts.pluginRegistry, `${fnTag} options.pluginRegistry`); Checks.truthy(opts.connectionProfile, `${fnTag} options.connectionProfile`); @@ -306,27 +292,6 @@ export class PluginLedgerConnectorFabric } this.signCallback = opts.signCallback; - - //cc-tx-viz - // Visualization part - this.collectTransactionReceipts = opts.collectTransactionReceipts || false; - if (this.collectTransactionReceipts) { - this.eventProvider = opts.eventProvider || "amqp://localhost"; - this.log.debug("Initializing connection to RabbitMQ"); - this.amqpConnection = new amqp.Connection(this.eventProvider); - this.log.info("Connection to RabbitMQ server initialized"); - const queue = this.opts.queueId || "cc-tx-viz-queue"; - this.queueId = queue; - this.persistMessages = this.opts.persistMessages || false; - this.amqpExchange = this.amqpConnection.declareExchange(`cc-tx-viz-exchange`, "direct", {durable: this.persistMessages}); - this.amqpQueue = this.amqpConnection.declareQueue(this.queueId, {durable: this.persistMessages}); - this.amqpQueue.bind(this.amqpExchange); - } - } - - public closeConnection(): Promise { - this.log.info("Closing Amqp connection"); - return this.amqpConnection?.close(); } public getOpenApiSpec(): unknown { @@ -347,11 +312,6 @@ export class PluginLedgerConnectorFabric this.log.debug(`getPrometheusExporterMetrics() response: %o`, res); return res; } - - //TODO returns Promise - public async getTransactionReceiptsList(): Promise { - //returns list - } public getInstanceId(): string { return this.instanceId; @@ -361,6 +321,10 @@ export class PluginLedgerConnectorFabric return `@hyperledger/cactus-plugin-ledger-connector-fabric`; } + public getTxSubjectObservable(): Observable { + return this.txSubject.asObservable(); + } + public async onPluginInit(): Promise { return; } @@ -1196,15 +1160,8 @@ export class PluginLedgerConnectorFabric public async transact( req: RunTransactionRequest, ): Promise { - //start transaction time - // const startTx = performance.now(); - - //start tx const fnTag = `${this.className}#transact()`; this.log.debug("%s ENTER", fnTag); - - //cc-tx-viz - const startTimeFabricReceipt = new Date(); const { channelName, @@ -1272,33 +1229,10 @@ export class PluginLedgerConnectorFabric } const transientMap = this.toTransientMap(req.transientData); - - //cc-tx-viz - /* - const transientMap: TransientMap = transientData as TransientMap; - - try { - //Obtains and parses each component of transient data - for (const key in transientMap) { - transientMap[key] = Buffer.from( - JSON.stringify(transientMap[key]), - ); - } - } catch (ex) { - this.log.error(`Building transient map crashed: `, ex); - throw new Error( - `${fnTag} Unable to build the transient map: ${ex.message}`, - ); - } - */ - const transactionProposal = await contract.createTransaction(fnName); transactionProposal.setEndorsingPeers(endorsingTargets); out = await transactionProposal.setTransient(transientMap).submit(); - - //cc-tx-viz - //transactionId = transactionProposal.getTransactionId(); - //success = true; + transactionId = transactionProposal.getTransactionId(); break; } default: { @@ -1306,74 +1240,18 @@ export class PluginLedgerConnectorFabric throw new Error(`${fnTag} unknown ${message}`); } } - //cc-tx-viz - /* - const endTimeFabricReceipt = new Date(); - this.log.debug(`EVAL-${this.className}-ISSUE-TRANSACTION:${endTimeFabricReceipt.getTime()-startTimeFabricReceipt.getTime()}`); - - // if we don't want to collect reads, than add condition && transactionId !== "" - if (this.collectTransactionReceipts) { - const startTimeFabricReceipt = new Date(); - const txParams = req.params; - //getTransactionReceiptByTxID requires 2 params in req.params => channelName and txID - req.params = []; - req.params[0] = req.channelName; - req.params[1] = transactionId; - //req.params get are stored in the basicTxReceipt rwsetWriteData - if (transactionId) { - const basicTxReceipt = await this.getTransactionReceiptByTxID(req); - const extendedReceipt: FabricV2TxReceipt={ - caseID: req.caseID || "FABRIC_TBD", - transactionID: transactionId, - blockchainID: LedgerType.Fabric2, - invocationType: req.invocationType, - methodName: req.methodName, - parameters: txParams, - timestamp: new Date(), - channelName: req.channelName, - contractName: req.contractName, - signingCredentials: req.signingCredential, - endorsingParties: req.endorsingParties, - endorsingPeers: req.endorsingPeers, - gatewayOptions: req.gatewayOptions, - transactionCreator: basicTxReceipt.transactionCreator, - transientData: req.transientData, - blockMetaData: basicTxReceipt.blockMetaData, - chainCodeName: basicTxReceipt.chainCodeName, - blockNumber: basicTxReceipt.blockNumber, - chainCodeVersion: basicTxReceipt.chainCodeVersion, - responseStatus: basicTxReceipt.responseStatus, - }; - const txReceipt = new amqp.Message(extendedReceipt); - this.amqpQueue?.send(txReceipt); - this.log.debug(`Sent extended transaction receipt to queue ${this.queueId}`); - } else { - const extendedReceipt: FabricV2TxReceipt={ - caseID: req.caseID || "FABRIC_TBD", - transactionID: undefined, - blockchainID: LedgerType.Fabric2, - invocationType: req.invocationType, - methodName: req.methodName, - parameters: txParams, - timestamp: new Date(), - channelName: req.channelName, - contractName: req.contractName, - signingCredentials: req.signingCredential, - endorsingParties: req.endorsingParties, - endorsingPeers: req.endorsingPeers, - gatewayOptions: req.gatewayOptions, - }; - const txReceipt = new amqp.Message(extendedReceipt); - this.amqpQueue?.send(txReceipt); - this.log.debug(`Sent simple transaction receipt to queue ${this.queueId}`); - } - const endTimeFabricReceipt = new Date(); - this.log.debug(`EVAL-${this.className}-GENERATE-AND-CAPTURE-RECEIPT:${endTimeFabricReceipt.getTime()-startTimeFabricReceipt.getTime()}`); - } + // create RunTxReqWithTxId for transaction monitoring + const receiptData: RunTxReqWithTxId = { + request: req, + transactionId: transactionId == "" ? uuidv4() : transactionId, + timestamp: new Date(), + }; + this.log.debug( + `RunTxReqWithTxId created with ID: ${receiptData.transactionId}`, + ); + this.txSubject.next(receiptData); - const outUtf8 = out.toString("utf-8"); - */ const res: RunTransactionResponse = { functionOutput: this.convertToTransactionResponseType( out, @@ -1383,10 +1261,12 @@ export class PluginLedgerConnectorFabric }; gateway.disconnect(); this.log.debug(`transact() response: %o`, res); + this.prometheusExporter.addCurrentTransaction(); + return res; } catch (ex) { this.log.error(`transact() crashed: `, ex); - throw new Error(`${fnTag} Unable to run transaction: ${ex}`); + throw new Error(`${fnTag} Unable to run transaction: ${ex.message}`); } } @@ -1423,7 +1303,7 @@ export class PluginLedgerConnectorFabric return new FabricCAServices(caUrl, tlsOptions, caName); } catch (ex) { this.log.error(`createCaClient() Failure:`, ex); - throw new Error(`${fnTag} Inner Exception: ${ex}`); + throw new Error(`${fnTag} Inner Exception: ${ex?.message}`); } } @@ -1459,7 +1339,7 @@ export class PluginLedgerConnectorFabric return [x509Identity, wallet]; } catch (ex) { this.log.error(`enrollAdmin() Failure:`, ex); - throw new Error(`${fnTag} Exception: ${ex}`); + throw new Error(`${fnTag} Exception: ${ex?.message}`); } } /** diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts index 50172d9cf8..8910d64904 100755 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/public-api.ts @@ -9,6 +9,7 @@ export { PluginLedgerConnectorFabric, IPluginLedgerConnectorFabricOptions, SignPayloadCallback, + RunTxReqWithTxId, } from "./plugin-ledger-connector-fabric"; import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts index d46ca0c437..a1933710c4 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts @@ -35,6 +35,8 @@ import { FabricSigningCredential, } from "../../../../main/typescript/public-api"; +import { K_CACTUS_FABRIC_TOTAL_TX_COUNT } from "../../../../main/typescript/prometheus-exporter/metrics"; + import { IPluginLedgerConnectorFabricOptions } from "../../../../main/typescript/plugin-ledger-connector-fabric"; import { DiscoveryOptions } from "fabric-network"; import { Configuration } from "@hyperledger/cactus-core-api"; @@ -229,6 +231,25 @@ describe(testCase, () => { expect(asset277.Owner).toEqual(assetOwner); } + { + const res = await apiClient.getPrometheusMetricsV1(); + const promMetricsOutput = + "# HELP " + + K_CACTUS_FABRIC_TOTAL_TX_COUNT + + " Total transactions executed\n" + + "# TYPE " + + K_CACTUS_FABRIC_TOTAL_TX_COUNT + + " gauge\n" + + K_CACTUS_FABRIC_TOTAL_TX_COUNT + + '{type="' + + K_CACTUS_FABRIC_TOTAL_TX_COUNT + + '"} 3'; + expect(res).toBeTruthy(); + expect(res.data).toBeTruthy(); + expect(res.status).toEqual(200); + expect(res.data.includes(promMetricsOutput)).toBeTrue(); + } + { const req: RunTransactionRequest = { signingCredential, diff --git a/packages/cactus-test-tooling/src/main/typescript/public-api.ts b/packages/cactus-test-tooling/src/main/typescript/public-api.ts index 20dc2a615a..6054d279b0 100755 --- a/packages/cactus-test-tooling/src/main/typescript/public-api.ts +++ b/packages/cactus-test-tooling/src/main/typescript/public-api.ts @@ -230,5 +230,3 @@ export { IBuildImageBesuAllInOneLatestResponse, buildImageBesuAllInOneLatest, } from "./corda/build-image-besu-all-in-one-latest"; - -export { RabbitMQTestServer } from "./rabbitmq-test-server/rabbit-mq-test-server"; diff --git a/packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts b/packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts deleted file mode 100644 index 727f137c69..0000000000 --- a/packages/cactus-test-tooling/src/main/typescript/rabbitmq-test-server/rabbit-mq-test-server.ts +++ /dev/null @@ -1,251 +0,0 @@ -import type { EventEmitter } from "events"; -import { Optional } from "typescript-optional"; -import { RuntimeError } from "run-time-error"; -import type { Container, ContainerInfo } from "dockerode"; -import Docker from "dockerode"; -import { Logger, Checks, Bools } from "@hyperledger/cactus-common"; -import type { LogLevelDesc } from "@hyperledger/cactus-common"; -import { LoggerProvider } from "@hyperledger/cactus-common"; -import { Containers } from "../common/containers"; -import { Config as SshConfig } from "node-ssh"; - -export interface IRabbitMQTestServerOptions { - readonly publishAllPorts: boolean; - readonly port: number; - readonly logLevel?: LogLevelDesc; - readonly imageName?: string; - readonly imageTag?: string; - readonly emitContainerLogs?: boolean; - readonly envVars?: Map; -} - -export class RabbitMQTestServer { - public static readonly CLASS_NAME = "RabbitMQTestServer"; - - public readonly logLevel: LogLevelDesc; - public readonly imageName: string; - public readonly imageTag: string; - public readonly imageFqn: string; - public readonly log: Logger; - public readonly emitContainerLogs: boolean; - public readonly publishAllPorts: boolean; - public readonly envVars: Map; - public readonly port: number; - private _containerId: Optional; - - public get containerId(): Optional { - return this._containerId; - } - - public get container(): Optional { - const docker = new Docker(); - return this.containerId.isPresent() - ? Optional.ofNonNull(docker.getContainer(this.containerId.get())) - : Optional.empty(); - } - - public get className(): string { - return RabbitMQTestServer.CLASS_NAME; - } - - constructor(public readonly opts: IRabbitMQTestServerOptions) { - const fnTag = `${this.className}#constructor()`; - Checks.truthy(opts, `${fnTag} arg options`); - - this.publishAllPorts = opts.publishAllPorts; - this._containerId = Optional.empty(); - this.imageName = opts.imageName || "rabbitmq"; - this.port = opts.port || 5672; - this.imageTag = opts.imageTag || "3.9-management"; - this.imageFqn = `${this.imageName}:${this.imageTag}`; - this.envVars = opts.envVars || new Map(); - this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) - ? (opts.emitContainerLogs as boolean) - : true; - - this.logLevel = opts.logLevel || "INFO"; - - const level = this.logLevel; - const label = this.className; - this.log = LoggerProvider.getOrCreate({ level, label }); - - this.log.debug(`Created instance of ${this.className} OK`); - } - public getContainerImageName(): string { - return `${this.imageName}:${this.imageTag}`; - } - public async start(omitPull = false): Promise { - const startTime = new Date(); - const docker = new Docker(); - if (this.containerId.isPresent()) { - this.log.warn(`Container ID provided. Will not start new one.`); - const container = docker.getContainer(this.containerId.get()); - return container; - } - if (!omitPull) { - this.log.debug(`Pulling image ${this.imageFqn}...`); - await Containers.pullImage(this.imageFqn); - this.log.debug(`Pulled image ${this.imageFqn} OK`); - } - - const dockerEnvVars: string[] = new Array(...this.envVars).map( - (pairs) => `${pairs[0]}=${pairs[1]}`, - ); - - // TODO: dynamically expose ports for custom port mapping - const createOptions = { - Env: dockerEnvVars, - - /* - Healthcheck: { - Test: ["CMD-SHELL", `rabbitmq-diagnostics -q ping`], - Interval: 1000000000, // 1 second - Timeout: 3000000000, // 3 seconds - Retries: 10, - StartPeriod: 1000000000, // 1 second - }, - */ - - ExposedPorts: { - "5672/tcp": {}, // Default port for RabbitMQ - "7235/tcp": {}, // Default port for RabbitMQ - }, - HostConfig: { - AutoRemove: true, - PublishAllPorts: this.publishAllPorts, - Privileged: false, - PortBindings: { - "5672/tcp": [{ HostPort: "5672" }], - "7235/tcp": [{ HostPort: "7235" }], - }, - }, - }; - - this.log.debug(`Starting ${this.imageFqn} with options: `, createOptions); - - return new Promise((resolve, reject) => { - const eventEmitter: EventEmitter = docker.run( - this.imageFqn, - [], - [], - createOptions, - {}, - (err: Error) => { - if (err) { - const errorMessage = `Failed to start container ${this.imageFqn}`; - const exception = new RuntimeError(errorMessage, err); - this.log.error(exception); - reject(exception); - } - }, - ); - - eventEmitter.once("start", async (container: Container) => { - const { id } = container; - this.log.debug(`Started ${this.imageFqn} successfully. ID=${id}`); - this._containerId = Optional.ofNonNull(id); - - if (this.emitContainerLogs) { - const logOptions = { follow: true, stderr: true, stdout: true }; - const logStream = await container.logs(logOptions); - logStream.on("data", (data: Buffer) => { - const fnTag = `[${this.imageFqn}]`; - this.log.debug(`${fnTag} %o`, data.toString("utf-8")); - }); - } - this.log.debug(`Registered container log stream callbacks OK`); - - try { - this.log.debug(`Starting to wait for healthcheck... `); - await this.waitForHealthCheck(); - this.log.debug(`Healthcheck passed OK`); - const finalTime = new Date(); - this.log.debug( - `EVAL-SETUP-INIT-RABBIT-MQ-SERVER:${ - finalTime.getTime() - startTime.getTime() - }`, - ); - resolve(container); - } catch (ex) { - this.log.error(ex); - reject(ex); - } - }); - }); - } - - public async waitForHealthCheck(timeoutMs = 180000): Promise { - const fnTag = "FabricTestLedgerV1#waitForHealthCheck()"; - const startedAt = Date.now(); - let reachable = false; - do { - try { - const { State } = await this.getContainerInfo(); - reachable = State === "running"; - } catch (ex) { - reachable = false; - if (Date.now() >= startedAt + timeoutMs) { - throw new Error(`${fnTag} timed out (${timeoutMs}ms) -> ${ex.stack}`); - } - } - await new Promise((resolve2) => setTimeout(resolve2, 1000)); - } while (!reachable); - } - public async stop(): Promise { - return Containers.stop(this.container.get()); - } - - public async destroy(): Promise { - if (!this.container.get()) { - return; - } - return this.container.get().remove(); - } - - public async getContainerIpAddress(): Promise { - const containerInfo = await this.getContainerInfo(); - return Containers.getContainerInternalIp(containerInfo); - } - - // TODO - public async getSshConfig(): Promise { - const fnTag = "RabbitMQTestServer#getSshConfig()"; - if (!this.container) { - throw new Error(`${fnTag} - invalid state no container instance set`); - } - const filePath = "/etc/hyperledger/cactus/fabric-aio-image.key"; - const privateKey = await Containers.pullFile( - (this.container as unknown) as Container, - filePath, - ); - const containerInfo = await this.getContainerInfo(); - const port = await Containers.getPublicPort(22, containerInfo); - const sshConfig: SshConfig = { - host: "localhost", - privateKey, - username: "root", - port, - }; - return sshConfig; - } - - protected async getContainerInfo(): Promise { - const fnTag = `${this.className}#getContainerInfo()`; - const docker = new Docker(); - const image = this.getContainerImageName(); - const containerInfos = await docker.listContainers({}); - - let aContainerInfo; - if (this.containerId !== undefined) { - aContainerInfo = containerInfos.find( - (ci) => ci.Id == this.containerId.get(), - ); - } - - if (aContainerInfo) { - return aContainerInfo; - } else { - throw new Error(`${fnTag} no image "${image}"`); - } - } -} diff --git a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts index 6ab025f3fa..dfbb33ac09 100644 --- a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts +++ b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts @@ -80,7 +80,7 @@ export function connectTestClient(socket: ClientSocket): Promise { socket.on("connect_timeout", errorHandlerFactory("connect_timeout")); socket.on("connect", () => { - //socket.removeAllListeners(); + socket.removeAllListeners(); resolve(socket); }); }); diff --git a/tsconfig.json b/tsconfig.json index 57f3ced284..9f9b434d53 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -134,7 +134,7 @@ "path": "./packages/cactus-test-verifier-client/tsconfig.json" }, { - "path": "./packages/cactus-plugin-cc-tx-visualization/tsconfig.json" + "path": "./packages/cactus-plugin-ccmodel-hephaestus/tsconfig.json" }, { "path": "./examples/cactus-common-example-server/tsconfig.json" @@ -169,9 +169,6 @@ { "path": "./examples/cactus-example-discounted-asset-trade-client/tsconfig.json" }, - { - "path": "./examples/cactus-example-cbdc-bridging-frontend/tsconfig.json" - }, { "path": "./extensions/cactus-plugin-object-store-ipfs/tsconfig.json" }, diff --git a/yarn.lock b/yarn.lock index 5b0f3eb303..01158e4230 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6028,13 +6028,6 @@ __metadata: languageName: node linkType: hard -"@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": - version: 1.6.0 - resolution: "@colors/colors@npm:1.6.0" - checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 - languageName: node - linkType: hard - "@commitlint/cli@npm:17.7.1": version: 17.7.1 resolution: "@commitlint/cli@npm:17.7.1" @@ -7953,16 +7946,6 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^2.3.0, @ethereumjs/common@npm:^2.4.0, @ethereumjs/common@npm:^2.6.4": - version: 2.6.5 - resolution: "@ethereumjs/common@npm:2.6.5" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 - languageName: node - linkType: hard - "@ethereumjs/common@npm:^2.5.0": version: 2.6.4 resolution: "@ethereumjs/common@npm:2.6.4" @@ -7973,6 +7956,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/common@npm:^2.6.4": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" + dependencies: + crc-32: "npm:^1.2.0" + ethereumjs-util: "npm:^7.1.5" + checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 + languageName: node + linkType: hard + "@ethereumjs/rlp@npm:^4.0.1": version: 4.0.1 resolution: "@ethereumjs/rlp@npm:4.0.1" @@ -8018,7 +8011,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^3.2.1, @ethereumjs/tx@npm:^3.3.2": +"@ethereumjs/tx@npm:^3.3.2": version: 3.5.2 resolution: "@ethereumjs/tx@npm:3.5.2" dependencies: @@ -9010,16 +9003,6 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:^1.3.4": - version: 1.12.2 - resolution: "@grpc/grpc-js@npm:1.12.2" - dependencies: - "@grpc/proto-loader": "npm:^0.7.13" - "@js-sdsl/ordered-map": "npm:^4.4.2" - checksum: 10/0d0556da8515704b5e722b86097e04693d8c71ba286a076270a96e1ac3a4950e87559c718cc2875d3fcaa6cb8e07d0cc6b1db2673b8940829dfe8b75197844dd - languageName: node - linkType: hard - "@grpc/grpc-js@npm:~1.7.3": version: 1.7.3 resolution: "@grpc/grpc-js@npm:1.7.3" @@ -9064,21 +9047,6 @@ __metadata: languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.6.2": - version: 0.6.13 - resolution: "@grpc/proto-loader@npm:0.6.13" - dependencies: - "@types/long": "npm:^4.0.1" - lodash.camelcase: "npm:^4.3.0" - long: "npm:^4.0.0" - protobufjs: "npm:^6.11.3" - yargs: "npm:^16.2.0" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/a881bea00a1ab1c8d50e4bdf106c7e74f905121116fbcda91b9688548da1267edf1302bb754164a6f60ece82a949a28cefc503bfe058ffc1531dc26fa5188df3 - languageName: node - linkType: hard - "@grpc/proto-loader@npm:^0.7.0": version: 0.7.7 resolution: "@grpc/proto-loader@npm:0.7.7" @@ -9122,7 +9090,7 @@ __metadata: languageName: node linkType: hard -"@hapi/topo@npm:^5.0.0, @hapi/topo@npm:^5.1.0": +"@hapi/topo@npm:^5.1.0": version: 5.1.0 resolution: "@hapi/topo@npm:5.1.0" dependencies: @@ -10658,7 +10626,6 @@ __metadata: "@types/sanitize-html": "npm:2.9.5" "@types/temp": "npm:0.9.1" "@types/uuid": "npm:10.0.0" - amqp-ts: "npm:1.8.0" axios: "npm:1.7.7" bl: "npm:6.0.16" bn.js: "npm:4.12.0" @@ -14496,13 +14463,6 @@ __metadata: languageName: node linkType: hard -"@panva/asn1.js@npm:^1.0.0": - version: 1.0.0 - resolution: "@panva/asn1.js@npm:1.0.0" - checksum: 10/e62b1218a8c57ee5b5432f5ac1c65d3fc5419a1d6a71517cdbe9b1b13d1576dcc9ea7a49437c14317aca1248d61fc71ef332a799c8177d7324690ae830b9a82c - languageName: node - linkType: hard - "@peculiar/asn1-schema@npm:^2.3.6": version: 2.3.8 resolution: "@peculiar/asn1-schema@npm:2.3.8" @@ -15595,7 +15555,7 @@ __metadata: languageName: node linkType: hard -"@sideway/address@npm:^4.1.0, @sideway/address@npm:^4.1.5": +"@sideway/address@npm:^4.1.5": version: 4.1.5 resolution: "@sideway/address@npm:4.1.5" dependencies: @@ -15604,7 +15564,7 @@ __metadata: languageName: node linkType: hard -"@sideway/formula@npm:^3.0.0, @sideway/formula@npm:^3.0.1": +"@sideway/formula@npm:^3.0.1": version: 3.0.1 resolution: "@sideway/formula@npm:3.0.1" checksum: 10/8d3ee7f80df4e5204b2cbe92a2a711ca89684965a5c9eb3b316b7051212d3522e332a65a0bb2a07cc708fcd1d0b27fcb30f43ff0bcd5089d7006c7160a89eefe @@ -17305,18 +17265,6 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:4.17.8": - version: 4.17.8 - resolution: "@types/express@npm:4.17.8" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:*" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/ca265de4f9deb7eea2babd66d7f4069ca49202b69db48fb2e805998a8574ac1d186989de7920e66d4a97740228205f62f8c5821283756cf55bb2115ca2f5b901 - languageName: node - linkType: hard - "@types/express@npm:5.0.0": version: 5.0.0 resolution: "@types/express@npm:5.0.0" @@ -17609,13 +17557,6 @@ __metadata: languageName: node linkType: hard -"@types/json-stable-stringify@npm:1.0.32": - version: 1.0.32 - resolution: "@types/json-stable-stringify@npm:1.0.32" - checksum: 10/04e454947ddd7cbe468c218379dc7832ed949dd921719f7147daac4e3f8d31a89c48ecec265a1283d62bcfc27a3996b7f61565b507b78d2f3aa129f8d3ed5e90 - languageName: node - linkType: hard - "@types/json-stable-stringify@npm:1.0.33": version: 1.0.33 resolution: "@types/json-stable-stringify@npm:1.0.33" @@ -17919,7 +17860,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.6, @types/node@npm:^12.7.2": +"@types/node@npm:^12.12.6": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: 10/1f916a06fff02faadb09a16ed6e31820ce170798b202ef0b14fc244bfbd721938c54a3a99836e185e4414ca461fe96c5bb5c67c3d248f153555b7e6347f061dd @@ -18529,13 +18470,6 @@ __metadata: languageName: node linkType: hard -"@types/triple-beam@npm:^1.3.2": - version: 1.3.5 - resolution: "@types/triple-beam@npm:1.3.5" - checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 - languageName: node - linkType: hard - "@types/trusted-types@npm:^2.0.2": version: 2.0.3 resolution: "@types/trusted-types@npm:2.0.3" @@ -18566,13 +18500,6 @@ __metadata: languageName: node linkType: hard -"@types/uuid@npm:8.3.0": - version: 8.3.0 - resolution: "@types/uuid@npm:8.3.0" - checksum: 10/0f46b15020b9c252473fb327a6491fd7d238c7b5bbaebd32195a0de178db040f6abb96902507ba25dd4a673cdd9cc28b8880512dba54561e8bc60d8f326c1e30 - languageName: node - linkType: hard - "@types/validator@npm:^13.11.8": version: 13.12.2 resolution: "@types/validator@npm:13.12.2" @@ -19629,7 +19556,7 @@ __metadata: languageName: node linkType: hard -"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.7, accepts@npm:~1.3.8": +"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" dependencies: @@ -20003,30 +19930,6 @@ __metadata: languageName: node linkType: hard -"amqp-ts@npm:1.8.0": - version: 1.8.0 - resolution: "amqp-ts@npm:1.8.0" - dependencies: - "@types/node": "npm:^12.7.2" - amqplib: "npm:^0.4.1" - bluebird: "npm:^3.3.5" - winston: "npm:^2.2.0" - checksum: 10/70c3970a224e69fa8dcaf22375fac75f5477f9303efd61be1349044676a14a03ff54f308374178b2a26fd7209c001c7a865a43cd379fb4736d4e8caf10ede493 - languageName: node - linkType: hard - -"amqplib@npm:^0.4.1": - version: 0.4.2 - resolution: "amqplib@npm:0.4.2" - dependencies: - bitsyntax: "npm:~0.0.4" - buffer-more-ints: "npm:0.0.2" - readable-stream: "npm:1.x >=1.1.9" - when: "npm:~3.6.2" - checksum: 10/b326f5225c41ca96b97e6bf80325ba1eb27cc39d30476509882345753b167b262d08b7f3f82304c80e155833134a52c871a2f694cc65c8d3beba74f9ec078e87 - languageName: node - linkType: hard - "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -20947,14 +20850,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^1.4.0": - version: 1.5.2 - resolution: "async@npm:1.5.2" - checksum: 10/8afcdcee05168250926a3e7bd4dfaa74b681a74f634bae2af424fb716042461cbd20a375d9bc2534daa50a2d45286c9b174952fb239cee4ab8d6351a40c65327 - languageName: node - linkType: hard - -"async@npm:^2.4.0, async@npm:^2.6.4": +"async@npm:^2.4.0": version: 2.6.4 resolution: "async@npm:2.6.4" dependencies: @@ -21734,15 +21630,6 @@ __metadata: languageName: node linkType: hard -"bitsyntax@npm:~0.0.4": - version: 0.0.4 - resolution: "bitsyntax@npm:0.0.4" - dependencies: - buffer-more-ints: "npm:0.0.2" - checksum: 10/dcc206593a1ad7cb77230764544e5dde8b0a26dd480117d96b2e4ed4bf37542c0e73f0ecfc8b084c3690c861ef1f2be69273eeb95c55a9a48b7afc0a63a55418 - languageName: node - linkType: hard - "bl@npm:6.0.16": version: 6.0.16 resolution: "bl@npm:6.0.16" @@ -21801,7 +21688,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:3.7.2, bluebird@npm:^3.3.5, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": +"bluebird@npm:3.7.2, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 @@ -22338,13 +22225,6 @@ __metadata: languageName: node linkType: hard -"buffer-more-ints@npm:0.0.2": - version: 0.0.2 - resolution: "buffer-more-ints@npm:0.0.2" - checksum: 10/8daf486048e9fa6462463404147472a87ddbc82e95a96dd2adf7b9eca14ff81019f62acbe597bc8f72707946e5b8cb994ea41ec66bf7a1b2021d905321c44910 - languageName: node - linkType: hard - "buffer-reverse@npm:^1.0.1": version: 1.0.1 resolution: "buffer-reverse@npm:1.0.1" @@ -23315,13 +23195,6 @@ __metadata: languageName: node linkType: hard -"class-transformer@npm:^0.3.1": - version: 0.3.1 - resolution: "class-transformer@npm:0.3.1" - checksum: 10/36f6289d8e48bbbf3f042e1eb8d64391e9bae2465211ac0db8a4cda64fda84275325b4d0013a0cded8f28225e199ef591cc10de3612916efc9de1e6d2ced78c1 - languageName: node - linkType: hard - "class-utils@npm:^0.3.5": version: 0.3.6 resolution: "class-utils@npm:0.3.6" @@ -24129,15 +24002,6 @@ __metadata: languageName: node linkType: hard -"content-disposition@npm:0.5.3": - version: 0.5.3 - resolution: "content-disposition@npm:0.5.3" - dependencies: - safe-buffer: "npm:5.1.2" - checksum: 10/7d0df7855b0202c02d083767258c7baae5cfc2664181de8abccca1b06aa6cc127d15a0f9f45409683a7b58e42af6dcb2ba46201071ce4225ae3980b2a55f58cd - languageName: node - linkType: hard - "content-disposition@npm:0.5.4, content-disposition@npm:^0.5.3": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" @@ -24613,17 +24477,6 @@ __metadata: languageName: node linkType: hard -"cpu-features@npm:~0.0.10": - version: 0.0.10 - resolution: "cpu-features@npm:0.0.10" - dependencies: - buildcheck: "npm:~0.0.6" - nan: "npm:^2.19.0" - node-gyp: "npm:latest" - checksum: 10/941b828ffe77582b2bdc03e894c913e2e2eeb5c6043ccb01338c34446d026f6888dc480ecb85e684809f9c3889d245f3648c7907eb61a92bdfc6aed039fcda8d - languageName: node - linkType: hard - "cpu-features@npm:~0.0.8": version: 0.0.8 resolution: "cpu-features@npm:0.0.8" @@ -25386,13 +25239,6 @@ __metadata: languageName: node linkType: hard -"csv-stringify@npm:6.0.5": - version: 6.0.5 - resolution: "csv-stringify@npm:6.0.5" - checksum: 10/d3c0d2f291a06d3c47bc72be30271ad9169df17b166b6d87fb8dea0c35094aa16afd17a3c86ca4fe91e984540c1de480535ea40e4cc33a85111843deaec0a6ff - languageName: node - linkType: hard - "cycle@npm:1.0.x": version: 1.0.3 resolution: "cycle@npm:1.0.3" @@ -26133,13 +25979,6 @@ __metadata: languageName: node linkType: hard -"destroy@npm:~1.0.4": - version: 1.0.4 - resolution: "destroy@npm:1.0.4" - checksum: 10/da9ab4961dc61677c709da0c25ef01733042614453924d65636a7db37308fef8a24cd1e07172e61173d471ca175371295fbc984b0af5b2b4ff47cd57bd784c03 - languageName: node - linkType: hard - "detect-file@npm:^1.0.0": version: 1.0.0 resolution: "detect-file@npm:1.0.0" @@ -29184,44 +29023,6 @@ __metadata: languageName: node linkType: hard -"express@npm:4.17.1": - version: 4.17.1 - resolution: "express@npm:4.17.1" - dependencies: - accepts: "npm:~1.3.7" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.19.0" - content-disposition: "npm:0.5.3" - content-type: "npm:~1.0.4" - cookie: "npm:0.4.0" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:~1.1.2" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:~1.1.2" - fresh: "npm:0.5.2" - merge-descriptors: "npm:1.0.1" - methods: "npm:~1.1.2" - on-finished: "npm:~2.3.0" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.7" - proxy-addr: "npm:~2.0.5" - qs: "npm:6.7.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.1.2" - send: "npm:0.17.1" - serve-static: "npm:1.14.1" - setprototypeof: "npm:1.1.1" - statuses: "npm:~1.5.0" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10/b4a03cdd6a3ca8555057249f8240d8b2d4feb469c8d3edbf94afcc454c0cb73cd108cf4a1b801b978f7e960e420b2597e1efd0480efb9092faa151f38f9576b5 - languageName: node - linkType: hard - "express@npm:4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" @@ -29403,18 +29204,6 @@ __metadata: languageName: node linkType: hard -"fabric-ca-client@npm:2.2.10": - version: 2.2.10 - resolution: "fabric-ca-client@npm:2.2.10" - dependencies: - fabric-common: "npm:2.2.10" - jsrsasign: "npm:^10.4.1" - url: "npm:^0.11.0" - winston: "npm:^2.4.5" - checksum: 10/06ef25222aafcb38c8c2b9fc0e0d93b4899a29afe0f9b07d1a4db4545179575668dccbf2f19a023a25e1c065b41aa65859dc2106d76b9f19d902ad38dcfc1678 - languageName: node - linkType: hard - "fabric-ca-client@npm:2.2.20": version: 2.2.20 resolution: "fabric-ca-client@npm:2.2.20" @@ -29439,29 +29228,6 @@ __metadata: languageName: node linkType: hard -"fabric-common@npm:2.2.10": - version: 2.2.10 - resolution: "fabric-common@npm:2.2.10" - dependencies: - callsite: "npm:^1.0.0" - elliptic: "npm:^6.5.4" - fabric-protos: "npm:2.2.10" - js-sha3: "npm:^0.8.0" - jsrsasign: "npm:^10.4.1" - long: "npm:^4.0.0" - nconf: "npm:^0.11.2" - pkcs11js: "npm:^1.0.6" - promise-settle: "npm:^0.3.0" - sjcl: "npm:^1.0.8" - winston: "npm:^2.4.5" - yn: "npm:^4.0.0" - dependenciesMeta: - pkcs11js: - optional: true - checksum: 10/7dd78494f960e2877d47083406a4ed18d191d4a64c5a9c2ae3854f6f77a33f390ea81c01dd5943e55eaa89ba5f80150686c0a31d5adb8f8cb0212af0c5a6d0e0 - languageName: node - linkType: hard - "fabric-common@npm:2.2.20": version: 2.2.20 resolution: "fabric-common@npm:2.2.20" @@ -29507,32 +29273,6 @@ __metadata: languageName: node linkType: hard -"fabric-contract-api@npm:2.2.3": - version: 2.2.3 - resolution: "fabric-contract-api@npm:2.2.3" - dependencies: - class-transformer: "npm:^0.3.1" - fabric-shim-api: "npm:2.2.3" - fast-safe-stringify: "npm:^2.0.7" - get-params: "npm:^0.1.2" - reflect-metadata: "npm:^0.1.13" - winston: "npm:^3.3.2" - checksum: 10/1cf75e116d8fa3e4904a0ca0e71aafb7468d08fec9f7822212d46d7abbc83b5f55720e2c8a52bf615d0206249193ead0b4c512fe7f68ebb64fc8f3f832ee4ee3 - languageName: node - linkType: hard - -"fabric-network@npm:2.2.10": - version: 2.2.10 - resolution: "fabric-network@npm:2.2.10" - dependencies: - fabric-common: "npm:2.2.10" - fabric-protos: "npm:2.2.10" - long: "npm:^4.0.0" - nano: "npm:^9.0.3" - checksum: 10/bbb98a3fe6fa41cbf3a0ab2692d6b558e0b6f9210ba12e5e35f80f67f7c164e6b46cb900dd76c882458458b5fd2f61e158cc24bd6f574f88017516881a14b239 - languageName: node - linkType: hard - "fabric-network@npm:2.2.20": version: 2.2.20 resolution: "fabric-network@npm:2.2.20" @@ -29556,17 +29296,6 @@ __metadata: languageName: node linkType: hard -"fabric-protos@npm:2.2.10": - version: 2.2.10 - resolution: "fabric-protos@npm:2.2.10" - dependencies: - "@grpc/grpc-js": "npm:^1.3.4" - "@grpc/proto-loader": "npm:^0.6.2" - protobufjs: "npm:^6.11.2" - checksum: 10/53cbc27840c9af578c8f7532a55d8e21380f57e1be23c34aa2709964e3f66d99c990e1daea02517b59c70b6af34bc5b4e4e7e759762308c5ed88a5f9aa55f1b0 - languageName: node - linkType: hard - "fabric-protos@npm:2.2.20": version: 2.2.20 resolution: "fabric-protos@npm:2.2.20" @@ -29590,13 +29319,6 @@ __metadata: languageName: node linkType: hard -"fabric-shim-api@npm:2.2.3": - version: 2.2.3 - resolution: "fabric-shim-api@npm:2.2.3" - checksum: 10/c4f8ea2cab2f71656ebf2de0d26db79e2005d1899110618f349dbfdecb2e926b83db838020ca8e0f73b9c34dbe7ed61dbfbc01e6f2aa7973550f0c66c957ce90 - languageName: node - linkType: hard - "fast-check@npm:3.1.1": version: 3.1.1 resolution: "fast-check@npm:3.1.1" @@ -30084,21 +29806,6 @@ __metadata: languageName: node linkType: hard -"finalhandler@npm:~1.1.2": - version: 1.1.2 - resolution: "finalhandler@npm:1.1.2" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - on-finished: "npm:~2.3.0" - parseurl: "npm:~1.3.3" - statuses: "npm:~1.5.0" - unpipe: "npm:~1.0.0" - checksum: 10/351e99a889abf149eb3edb24568586469feeb3019f5eafb9b31e632a5ad886f12a5595a221508245e6a37da69ae866c9fb411eb541a844238e2c900f63ac1576 - languageName: node - linkType: hard - "find-cache-dir@npm:^0.1.1": version: 0.1.1 resolution: "find-cache-dir@npm:0.1.1" @@ -30589,17 +30296,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:10.0.0": - version: 10.0.0 - resolution: "fs-extra@npm:10.0.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/c333973ece06655bf9a4566c65e648d64d7ab3a36e52011b05263e8f4664d2cc85cf9d98ddd4672857105561d759ef63828cf49428c78470a788a3751094a1a4 - languageName: node - linkType: hard - "fs-extra@npm:10.1.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -31125,13 +30821,6 @@ __metadata: languageName: node linkType: hard -"get-params@npm:^0.1.2": - version: 0.1.2 - resolution: "get-params@npm:0.1.2" - checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 - languageName: node - linkType: hard - "get-stdin@npm:^5.0.1": version: 5.0.1 resolution: "get-stdin@npm:5.0.1" @@ -32773,19 +32462,6 @@ __metadata: languageName: node linkType: hard -"http-errors@npm:~1.7.2": - version: 1.7.3 - resolution: "http-errors@npm:1.7.3" - dependencies: - depd: "npm:~1.1.2" - inherits: "npm:2.0.4" - setprototypeof: "npm:1.1.1" - statuses: "npm:>= 1.5.0 < 2" - toidentifier: "npm:1.0.0" - checksum: 10/157cb95296118e9c37034f04d5c372916db03bcb6b1097caf693fbc9cf85ac881c8cbdf892140acb7ede6cad6a1a3dbf86a8031b2b127dc47bfc0600b3fda8a0 - languageName: node - linkType: hard - "http-https@npm:^1.0.0": version: 1.0.0 resolution: "http-https@npm:1.0.0" @@ -36263,28 +35939,6 @@ __metadata: languageName: node linkType: hard -"joi@npm:17.4.2": - version: 17.4.2 - resolution: "joi@npm:17.4.2" - dependencies: - "@hapi/hoek": "npm:^9.0.0" - "@hapi/topo": "npm:^5.0.0" - "@sideway/address": "npm:^4.1.0" - "@sideway/formula": "npm:^3.0.0" - "@sideway/pinpoint": "npm:^2.0.0" - checksum: 10/35fc3ab817e7035ff12bdd8dd6b39d74936562f1a257412ec738f0fb157a86191c9cc5caaf89c6f4b80f2241658435341f185574196642c5c67350ff19703787 - languageName: node - linkType: hard - -"jose@npm:1.28.1": - version: 1.28.1 - resolution: "jose@npm:1.28.1" - dependencies: - "@panva/asn1.js": "npm:^1.0.0" - checksum: 10/ccc44d52463a4e913557a2cb326ffd7cce89ed2928f8b15aaea248e23098b8f90d12f8538f5378e2383f83a1d9ce3bfb121eb4e8a283507db5f0d9d415901c26 - languageName: node - linkType: hard - "jose@npm:4.15.5": version: 4.15.5 resolution: "jose@npm:4.15.5" @@ -36867,21 +36521,6 @@ __metadata: languageName: node linkType: hard -"keycloak-admin@npm:1.14.21": - version: 1.14.21 - resolution: "keycloak-admin@npm:1.14.21" - dependencies: - axios: "npm:^0.21.0" - camelize: "npm:^1.0.0" - keycloak-js: "npm:^11.0.3" - lodash: "npm:^4.17.21" - query-string: "npm:^6.13.7" - url-join: "npm:^4.0.0" - url-template: "npm:^2.0.8" - checksum: 10/3d0b1bbc1b522f72c69640defe35df993950896526fc810752fed83627d71db131463cc4607af09e954ac4ec5fd366fdd45e612d44a76070817e919aa47b906a - languageName: node - linkType: hard - "keycloak-admin@npm:1.14.22": version: 1.14.22 resolution: "keycloak-admin@npm:1.14.22" @@ -38184,20 +37823,6 @@ __metadata: languageName: node linkType: hard -"logform@npm:^2.6.0, logform@npm:^2.6.1": - version: 2.6.1 - resolution: "logform@npm:2.6.1" - dependencies: - "@colors/colors": "npm:1.6.0" - "@types/triple-beam": "npm:^1.3.2" - fecha: "npm:^4.2.0" - ms: "npm:^2.1.1" - safe-stable-stringify: "npm:^2.3.1" - triple-beam: "npm:^1.3.0" - checksum: 10/e67f414787fbfe1e6a997f4c84300c7e06bee3d0bd579778af667e24b36db3ea200ed195d41b61311ff738dab7faabc615a07b174b22fe69e0b2f39e985be64b - languageName: node - linkType: hard - "loglevel-plugin-prefix@npm:0.8.4": version: 0.8.4 resolution: "loglevel-plugin-prefix@npm:0.8.4" @@ -39769,13 +39394,6 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.1": - version: 2.1.1 - resolution: "ms@npm:2.1.1" - checksum: 10/0078a23cd916a9a7435c413caa14c57d4b4f6e2470e0ab554b6964163c8a4436448ac7ae020e883685475da6b6796cc396b670f579cb275db288a21e3e57721e - languageName: node - linkType: hard - "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -39990,15 +39608,6 @@ __metadata: languageName: node linkType: hard -"nan@npm:^2.19.0, nan@npm:^2.20.0": - version: 2.21.0 - resolution: "nan@npm:2.21.0" - dependencies: - node-gyp: "npm:latest" - checksum: 10/4517d316776b509a961c65241b72863e70f63aa5b0c354ca19fbbbf7c78254e54aa1f0de142fac1df986a04c27e74a1fb7e4aa85e9e3834daa172b8d9d1bbb07 - languageName: node - linkType: hard - "nano-base32@npm:^1.0.1": version: 1.0.1 resolution: "nano-base32@npm:1.0.1" @@ -40132,18 +39741,6 @@ __metadata: languageName: node linkType: hard -"nconf@npm:^0.11.2": - version: 0.11.4 - resolution: "nconf@npm:0.11.4" - dependencies: - async: "npm:^1.4.0" - ini: "npm:^2.0.0" - secure-keys: "npm:^1.0.0" - yargs: "npm:^16.1.1" - checksum: 10/9788075cf5ca929736fd799335773994b774aad384f914c3a00ea0a9d52cf95842b762cb5e57dfd021568104fc56422ab91b9586f24ed091001c384230a72483 - languageName: node - linkType: hard - "nconf@npm:^0.12.0": version: 0.12.0 resolution: "nconf@npm:0.12.0" @@ -40703,20 +40300,6 @@ __metadata: languageName: node linkType: hard -"node-ssh@npm:12.0.0": - version: 12.0.0 - resolution: "node-ssh@npm:12.0.0" - dependencies: - is-stream: "npm:^2.0.0" - make-dir: "npm:^3.1.0" - sb-promise-queue: "npm:^2.1.0" - sb-scandir: "npm:^3.1.0" - shell-escape: "npm:^0.2.0" - ssh2: "npm:^1.1.0" - checksum: 10/1076e0b45bd3a07933ecbe7421fc78289472a67ee00e82c8e07df338ab7149e2926fe7f31626f30b5203f00c6d8c0959399b99f6fadb588b90b29a6bf6164322 - languageName: node - linkType: hard - "node-ssh@npm:13.1.0": version: 13.1.0 resolution: "node-ssh@npm:13.1.0" @@ -44684,15 +44267,6 @@ __metadata: languageName: node linkType: hard -"prom-client@npm:13.0.0": - version: 13.0.0 - resolution: "prom-client@npm:13.0.0" - dependencies: - tdigest: "npm:^0.1.1" - checksum: 10/a57d295eeee5eaf344adbf42a76eed2305d617fdad93669fc04610ade33a54a3452f127502a749400633821bbbff2641b576cb0924135c690679a1b58b516778 - languageName: node - linkType: hard - "prom-client@npm:15.1.3": version: 15.1.3 resolution: "prom-client@npm:15.1.3" @@ -44849,7 +44423,7 @@ __metadata: languageName: node linkType: hard -"proxy-addr@npm:^2.0.7, proxy-addr@npm:~2.0.5, proxy-addr@npm:~2.0.7": +"proxy-addr@npm:^2.0.7, proxy-addr@npm:~2.0.7": version: 2.0.7 resolution: "proxy-addr@npm:2.0.7" dependencies: @@ -45695,7 +45269,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:1.1.14, readable-stream@npm:1.x >=1.1.9, readable-stream@npm:^1.0.26-4": +"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4": version: 1.1.14 resolution: "readable-stream@npm:1.1.14" dependencies: @@ -45759,7 +45333,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0, readable-stream@npm:^4.5.2": +"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0": version: 4.5.2 resolution: "readable-stream@npm:4.5.2" dependencies: @@ -47572,27 +47146,6 @@ __metadata: languageName: node linkType: hard -"send@npm:0.17.1": - version: 0.17.1 - resolution: "send@npm:0.17.1" - dependencies: - debug: "npm:2.6.9" - depd: "npm:~1.1.2" - destroy: "npm:~1.0.4" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:~1.7.2" - mime: "npm:1.6.0" - ms: "npm:2.1.1" - on-finished: "npm:~2.3.0" - range-parser: "npm:~1.2.1" - statuses: "npm:~1.5.0" - checksum: 10/b632573e156db8f110e3776e4c8e8393bed1c3ad2be01d4f2832d33525395058cdababdaffea639af3a2d81b3d46c242134279efce87d33d2be3ccf31abaa937 - languageName: node - linkType: hard - "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -47716,18 +47269,6 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:1.14.1": - version: 1.14.1 - resolution: "serve-static@npm:1.14.1" - dependencies: - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.17.1" - checksum: 10/a479286814f2aa3712683951908ea49d6c4999191465f9139d68ad001f8b594e4c16aee02d9511f3579e90aac20bf574a267b799fd48fc1857d89a2a08e280d7 - languageName: node - linkType: hard - "serve-static@npm:1.15.0": version: 1.15.0 resolution: "serve-static@npm:1.15.0" @@ -48248,6 +47789,13 @@ __metadata: languageName: node linkType: hard +"socket.io-adapter@npm:~2.4.0": + version: 2.4.0 + resolution: "socket.io-adapter@npm:2.4.0" + checksum: 10/e10c8c36a1b0744432d9fb7266c69268fb11cacb548e95f5feb7708c1438c4c1e034abf3eee56dc3fd4d5524aba4e5a306a402f0c15efb1334be364a05bfad04 + languageName: node + linkType: hard + "socket.io-adapter@npm:~2.5.2": version: 2.5.5 resolution: "socket.io-adapter@npm:2.5.5" @@ -48280,6 +47828,20 @@ __metadata: languageName: node linkType: hard +"socket.io@npm:4.5.4": + version: 4.5.4 + resolution: "socket.io@npm:4.5.4" + dependencies: + accepts: "npm:~1.3.4" + base64id: "npm:~2.0.0" + debug: "npm:~4.3.2" + engine.io: "npm:~6.2.1" + socket.io-adapter: "npm:~2.4.0" + socket.io-parser: "npm:~4.2.1" + checksum: 10/5e599eb7cab24124ad7ef7718ef09e16f2587a0891588cc11b77d3ff7572de82d9d07bf7feb870c38f36c8a1a90b8ff4b8d5ce224a3390d45b085e400e92b9cf + languageName: node + linkType: hard + "socket.io@npm:4.6.2": version: 4.6.2 resolution: "socket.io@npm:4.6.2" @@ -48806,23 +48368,6 @@ __metadata: languageName: node linkType: hard -"ssh2@npm:^1.1.0": - version: 1.16.0 - resolution: "ssh2@npm:1.16.0" - dependencies: - asn1: "npm:^0.2.6" - bcrypt-pbkdf: "npm:^1.0.2" - cpu-features: "npm:~0.0.10" - nan: "npm:^2.20.0" - dependenciesMeta: - cpu-features: - optional: true - nan: - optional: true - checksum: 10/0951c22d9c5a0e3b89a8e5ae890ebcbce9f1f94dbed37d1490e4e48e26bc8b074fa81f202ee57b708e31b5f33033f4c870b92047f4f02b6bc26c32225b01d84c - languageName: node - linkType: hard - "ssh2@npm:^1.11.0": version: 1.14.0 resolution: "ssh2@npm:1.14.0" @@ -48979,7 +48524,7 @@ __metadata: languageName: node linkType: hard -"statuses@npm:>= 1.4.0 < 2, statuses@npm:>= 1.5.0 < 2, statuses@npm:~1.5.0": +"statuses@npm:>= 1.4.0 < 2, statuses@npm:>= 1.5.0 < 2": version: 1.5.0 resolution: "statuses@npm:1.5.0" checksum: 10/c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c @@ -52753,17 +52298,6 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.5.2": - version: 1.5.2 - resolution: "web3-bzz@npm:1.5.2" - dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:9.6.0" - swarm-js: "npm:^0.1.40" - checksum: 10/b4ff80a57cccd7a5bc52feeef66a4f6f68e3d32bc87c17c0df511cbdab8df946bd505df92864052f281712ebf93cd183637f491156d62c9b4119c6cc86a514cd - languageName: node - linkType: hard - "web3-bzz@npm:1.6.1": version: 1.6.1 resolution: "web3-bzz@npm:1.6.1" @@ -52807,16 +52341,6 @@ __metadata: languageName: node linkType: hard -"web3-core-helpers@npm:1.5.2": - version: 1.5.2 - resolution: "web3-core-helpers@npm:1.5.2" - dependencies: - web3-eth-iban: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/9071e23ff7b7aebef4dbdfe4d4a686bc82fc98470b3a9335d5d1550935e8d0183bff45891ca6bc0dec2334dbdfdbb74932347bae8beb984f2699d32ee7ac1ae0 - languageName: node - linkType: hard - "web3-core-helpers@npm:1.6.1": version: 1.6.1 resolution: "web3-core-helpers@npm:1.6.1" @@ -52860,20 +52384,6 @@ __metadata: languageName: node linkType: hard -"web3-core-method@npm:1.5.2": - version: 1.5.2 - resolution: "web3-core-method@npm:1.5.2" - dependencies: - "@ethereumjs/common": "npm:^2.4.0" - "@ethersproject/transactions": "npm:^5.0.0-beta.135" - web3-core-helpers: "npm:1.5.2" - web3-core-promievent: "npm:1.5.2" - web3-core-subscriptions: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/df38f4f96dc3daec63bd0ca6767b5ad7bb6520dc20e97b256a1796f392192070164f7dce5be25e6fe72dd2dd65ae27e74d63e598841eaae197af9c68eb1f4a60 - languageName: node - linkType: hard - "web3-core-method@npm:1.6.1": version: 1.6.1 resolution: "web3-core-method@npm:1.6.1" @@ -52922,15 +52432,6 @@ __metadata: languageName: node linkType: hard -"web3-core-promievent@npm:1.5.2": - version: 1.5.2 - resolution: "web3-core-promievent@npm:1.5.2" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/b19f1546e9ae4620c65a335cee2dac881684c0f0ab7d29384a950b384b42d9b156d85ed77a1fc3191d73bc8b1879507626525cf98c3bf17c5c973416ed4a64b4 - languageName: node - linkType: hard - "web3-core-promievent@npm:1.6.1": version: 1.6.1 resolution: "web3-core-promievent@npm:1.6.1" @@ -52971,19 +52472,6 @@ __metadata: languageName: node linkType: hard -"web3-core-requestmanager@npm:1.5.2": - version: 1.5.2 - resolution: "web3-core-requestmanager@npm:1.5.2" - dependencies: - util: "npm:^0.12.0" - web3-core-helpers: "npm:1.5.2" - web3-providers-http: "npm:1.5.2" - web3-providers-ipc: "npm:1.5.2" - web3-providers-ws: "npm:1.5.2" - checksum: 10/135719627a7934462b94806728751ff798ffb97d7b3e67bef229bc5e3423b57c23f2c48322f17cba05588e67b866d5908cd74d4b8a897c99c5d38f4a6f18ce70 - languageName: node - linkType: hard - "web3-core-requestmanager@npm:1.6.1": version: 1.6.1 resolution: "web3-core-requestmanager@npm:1.6.1" @@ -53033,16 +52521,6 @@ __metadata: languageName: node linkType: hard -"web3-core-subscriptions@npm:1.5.2": - version: 1.5.2 - resolution: "web3-core-subscriptions@npm:1.5.2" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.5.2" - checksum: 10/98343a06d237dfb8d540ce7d8a66cdf05b2cb50e53063854a6d37ba1df2d86c3430f9b010074233c76b1ff2aa35b186bb017441ed136953d66aecdfdd2f8fe97 - languageName: node - linkType: hard - "web3-core-subscriptions@npm:1.6.1": version: 1.6.1 resolution: "web3-core-subscriptions@npm:1.6.1" @@ -53088,21 +52566,6 @@ __metadata: languageName: node linkType: hard -"web3-core@npm:1.5.2": - version: 1.5.2 - resolution: "web3-core@npm:1.5.2" - dependencies: - "@types/bn.js": "npm:^4.11.5" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-core-requestmanager: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/16bc49bb9247a2a8c53b3996bdb4562c20473db719436507b83e05c599c5d93d8120211b06d10492249f2370a461af661cbaaaad187259cb69d3fd8290217a5e - languageName: node - linkType: hard - "web3-core@npm:1.6.1": version: 1.6.1 resolution: "web3-core@npm:1.6.1" @@ -53270,16 +52733,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-abi@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth-abi@npm:1.5.2" - dependencies: - "@ethersproject/abi": "npm:5.0.7" - web3-utils: "npm:1.5.2" - checksum: 10/ba25188b4491113c837a5baa11c79e08060496a1f9840e336f0eb73506c10528e33b9b935dc684b181478a1fa26fb3c77324e12ce0307507bc7b98905829a77c - languageName: node - linkType: hard - "web3-eth-abi@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-abi@npm:1.6.1" @@ -53393,25 +52846,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-accounts@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth-accounts@npm:1.5.2" - dependencies: - "@ethereumjs/common": "npm:^2.3.0" - "@ethereumjs/tx": "npm:^3.2.1" - crypto-browserify: "npm:3.12.0" - eth-lib: "npm:0.2.8" - ethereumjs-util: "npm:^7.0.10" - scrypt-js: "npm:^3.0.1" - uuid: "npm:3.3.2" - web3-core: "npm:1.5.2" - web3-core-helpers: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/8da761b2103e89354734e3cacd83078fff81890532630f2e311ff8e103307d4c1f83449b2dd8efa2158fde8bfdd4ed7948c6ce92e9359ff48ffc76aa4a74641f - languageName: node - linkType: hard - "web3-eth-accounts@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-accounts@npm:1.6.1" @@ -53545,22 +52979,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-contract@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth-contract@npm:1.5.2" - dependencies: - "@types/bn.js": "npm:^4.11.5" - web3-core: "npm:1.5.2" - web3-core-helpers: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-core-promievent: "npm:1.5.2" - web3-core-subscriptions: "npm:1.5.2" - web3-eth-abi: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/2dfe4195d3cf4e8cfed210357347b076634789ca5cec8d02c805b9d06be71d345e9a0c403e6801dc40bc15ab73f1546eebfa305eddf16903e768fc593dc6521c - languageName: node - linkType: hard - "web3-eth-contract@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-contract@npm:1.6.1" @@ -53670,22 +53088,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-ens@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth-ens@npm:1.5.2" - dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.5.2" - web3-core-helpers: "npm:1.5.2" - web3-core-promievent: "npm:1.5.2" - web3-eth-abi: "npm:1.5.2" - web3-eth-contract: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/38b94ba2cc4274b8cb8664a1fde62654e77fc81d68eb69c0a9449d3c9baf5161a85d3fd5e1d891008fde26f240860926a0ec99f37e4fd8d5865e53df10ee355f - languageName: node - linkType: hard - "web3-eth-ens@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-ens@npm:1.6.1" @@ -53778,16 +53180,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-iban@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth-iban@npm:1.5.2" - dependencies: - bn.js: "npm:^4.11.9" - web3-utils: "npm:1.5.2" - checksum: 10/73f749684ae65a4ae8f1125aa240c020b382025944dbb9ed67c7b14cb1b9f9143ab46e74c7a61a639ebc9892dcc2da61eff60a131d2779acfb47740ac4a81446 - languageName: node - linkType: hard - "web3-eth-iban@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-iban@npm:1.6.1" @@ -53856,20 +53248,6 @@ __metadata: languageName: node linkType: hard -"web3-eth-personal@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth-personal@npm:1.5.2" - dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.5.2" - web3-core-helpers: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-net: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/0a2c586df93bf7392d2948e89fa9022ac91da3e6359afc5e4019ead046e5277dc31bce20da253be4d8a55055c0bca46bd8e96fdb9facd02f5465cb73e6d3284b - languageName: node - linkType: hard - "web3-eth-personal@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-personal@npm:1.6.1" @@ -53960,26 +53338,6 @@ __metadata: languageName: node linkType: hard -"web3-eth@npm:1.5.2": - version: 1.5.2 - resolution: "web3-eth@npm:1.5.2" - dependencies: - web3-core: "npm:1.5.2" - web3-core-helpers: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-core-subscriptions: "npm:1.5.2" - web3-eth-abi: "npm:1.5.2" - web3-eth-accounts: "npm:1.5.2" - web3-eth-contract: "npm:1.5.2" - web3-eth-ens: "npm:1.5.2" - web3-eth-iban: "npm:1.5.2" - web3-eth-personal: "npm:1.5.2" - web3-net: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/1df554703ebf41739849da02044529a95e64f0f6937b9c820db809179e02fc03e54dd7f57dedba1643ae1fccfc9b61b4d38f887aa2d5c7d7da38d825921328f8 - languageName: node - linkType: hard - "web3-eth@npm:1.6.1": version: 1.6.1 resolution: "web3-eth@npm:1.6.1" @@ -54108,17 +53466,6 @@ __metadata: languageName: node linkType: hard -"web3-net@npm:1.5.2": - version: 1.5.2 - resolution: "web3-net@npm:1.5.2" - dependencies: - web3-core: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/5619fc10b7114b4d64b3802ab6459de9e1caf3341719b718451c1f5585e075c87b3d1e45c917b6eccca2c6b16861eb7f4d3f539f5b280eb2a558406745a2a447 - languageName: node - linkType: hard - "web3-net@npm:1.6.1": version: 1.6.1 resolution: "web3-net@npm:1.6.1" @@ -54188,16 +53535,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-http@npm:1.5.2": - version: 1.5.2 - resolution: "web3-providers-http@npm:1.5.2" - dependencies: - web3-core-helpers: "npm:1.5.2" - xhr2-cookies: "npm:1.1.0" - checksum: 10/abbef0d729b497d04300aea291ce635ac879bb0b88c226a60da0b5c1cb289067204dfbc25038c8fe779d8729ab7c21fa11acd0f93697fc8db612d968c1e4fe72 - languageName: node - linkType: hard - "web3-providers-http@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-http@npm:1.6.1" @@ -54264,16 +53601,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-ipc@npm:1.5.2": - version: 1.5.2 - resolution: "web3-providers-ipc@npm:1.5.2" - dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.5.2" - checksum: 10/1b8f4b375d111b77ba4742d3337c3aa9f9ae59ef5f34348d4b956c721c7b49d8dad5adaea0e211cf0e00bdee5f727c0d8a55a077ec92124bcae1bdf0cd13fd92 - languageName: node - linkType: hard - "web3-providers-ipc@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ipc@npm:1.6.1" @@ -54337,17 +53664,6 @@ __metadata: languageName: node linkType: hard -"web3-providers-ws@npm:1.5.2": - version: 1.5.2 - resolution: "web3-providers-ws@npm:1.5.2" - dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.5.2" - websocket: "npm:^1.0.32" - checksum: 10/be424724f9c38ba5fbe1567fca981a5a36d3c208a4457616ccb49339a5dd8bfcb64e26248307149f3a664cd7efdb84533d6e45d1ee4ce895cc7f049766d4cfc8 - languageName: node - linkType: hard - "web3-providers-ws@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ws@npm:1.6.1" @@ -54454,18 +53770,6 @@ __metadata: languageName: node linkType: hard -"web3-shh@npm:1.5.2": - version: 1.5.2 - resolution: "web3-shh@npm:1.5.2" - dependencies: - web3-core: "npm:1.5.2" - web3-core-method: "npm:1.5.2" - web3-core-subscriptions: "npm:1.5.2" - web3-net: "npm:1.5.2" - checksum: 10/e20b04a62f0898de9dbee2fdeea28b21e74a2ae5c03275b192963d3fcf24644620eb2e8ac9d734db5a1ab932b5cd21df1574e575274df5ecef45190810e407a1 - languageName: node - linkType: hard - "web3-shh@npm:1.6.1": version: 1.6.1 resolution: "web3-shh@npm:1.6.1" @@ -54566,21 +53870,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:1.5.2": - version: 1.5.2 - resolution: "web3-utils@npm:1.5.2" - dependencies: - bn.js: "npm:^4.11.9" - eth-lib: "npm:0.2.8" - ethereum-bloom-filters: "npm:^1.0.6" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/4532674e9c70702438e2b714de0a56c214298db2972fbdc851706075fd0d184ad8e04fe20e89c276f04d892655c7c2f0c2fe696a7d3aa8ae6654c513a0139b0f - languageName: node - linkType: hard - "web3-utils@npm:1.6.1": version: 1.6.1 resolution: "web3-utils@npm:1.6.1" @@ -54774,21 +54063,6 @@ __metadata: languageName: node linkType: hard -"web3@npm:1.5.2": - version: 1.5.2 - resolution: "web3@npm:1.5.2" - dependencies: - web3-bzz: "npm:1.5.2" - web3-core: "npm:1.5.2" - web3-eth: "npm:1.5.2" - web3-eth-personal: "npm:1.5.2" - web3-net: "npm:1.5.2" - web3-shh: "npm:1.5.2" - web3-utils: "npm:1.5.2" - checksum: 10/0658167ee6b18e501104f5d7328b1fd3d606b27a3d6e7b417163be5c6f1d08d65af281ba9b6db1f1f6c134a596c11864ac667ee302798b60c74296afa4dba742 - languageName: node - linkType: hard - "web3@npm:1.6.1": version: 1.6.1 resolution: "web3@npm:1.6.1" @@ -55369,13 +54643,6 @@ __metadata: languageName: node linkType: hard -"when@npm:~3.6.2": - version: 3.6.4 - resolution: "when@npm:3.6.4" - checksum: 10/818b8b8e173e17df49fdee1a9c6cc212da57663206bb21ef5659fb0a12dbf3bddbec952a235073ad44f371007a0b6d8c66966063e0068a6f8c10bc18b6b4789c - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -55591,17 +54858,6 @@ __metadata: languageName: node linkType: hard -"winston-transport@npm:^4.7.0": - version: 4.8.0 - resolution: "winston-transport@npm:4.8.0" - dependencies: - logform: "npm:^2.6.1" - readable-stream: "npm:^4.5.2" - triple-beam: "npm:^1.3.0" - checksum: 10/930bdc0ec689d5c4f07a262721da80440336f64739d0ce33db801c7142b4fca5be8ef71b725b670bac609de8b6bce405e5c5f84d355f5176a611209b476cee18 - languageName: node - linkType: hard - "winston@npm:3.10.0": version: 3.10.0 resolution: "winston@npm:3.10.0" @@ -55621,20 +54877,6 @@ __metadata: languageName: node linkType: hard -"winston@npm:^2.2.0": - version: 2.4.7 - resolution: "winston@npm:2.4.7" - dependencies: - async: "npm:^2.6.4" - colors: "npm:1.0.x" - cycle: "npm:1.0.x" - eyes: "npm:0.1.x" - isstream: "npm:0.1.x" - stack-trace: "npm:0.0.x" - checksum: 10/44665f99bb1b1f290fc48879cd3bf635d0821ad70e90cdec0911a79b4ffd4f62ae4afa4764b27766e6a4ff60e911611047fd3f10b21d395eb0e3da33086d6c73 - languageName: node - linkType: hard - "winston@npm:^2.4.5": version: 2.4.5 resolution: "winston@npm:2.4.5" @@ -55649,25 +54891,6 @@ __metadata: languageName: node linkType: hard -"winston@npm:^3.3.2": - version: 3.15.0 - resolution: "winston@npm:3.15.0" - dependencies: - "@colors/colors": "npm:^1.6.0" - "@dabh/diagnostics": "npm:^2.0.2" - async: "npm:^3.2.3" - is-stream: "npm:^2.0.0" - logform: "npm:^2.6.0" - one-time: "npm:^1.0.0" - readable-stream: "npm:^3.4.0" - safe-stable-stringify: "npm:^2.3.1" - stack-trace: "npm:0.0.x" - triple-beam: "npm:^1.3.0" - winston-transport: "npm:^4.7.0" - checksum: 10/60e55eb3621e4de1a764a4e43ee1d242c71957d3e0eb359cb8f16fe2b9d9543fd4c31a8d3baf96fa7e43ef5df383c43c1a98aff4bd714ea0082303504b0e3cdc - languageName: node - linkType: hard - "winston@npm:^3.3.3": version: 3.6.0 resolution: "winston@npm:3.6.0" From 7f71c8ba7712668b925c04d61b1f23274a3d44f3 Mon Sep 17 00:00:00 2001 From: Bruno Mateus Date: Wed, 12 Jun 2024 16:05:38 +0100 Subject: [PATCH 25/49] feat(hephaestus): analyse transactions using hephaestus The plugin is now able to: Create a Cross-Chain Model based on monitored transactions Compare new transactions against the model and detect non-conformance Signed-off-by: Bruno Mateus --- .cspell.json | 1 - .../src/main/typescript/index.web.ts | 0 .../src/main/json/openapi.json | 1 - .../src/main/json/openapi.tpl.json | 1 + .../openapitools/client/models/LedgerType.kt | 5 +- .../generated/openapi/typescript-axios/api.ts | 1 - .../README.md | 43 +- .../package.json | 5 +- .../typescript/models/carbon-footprint.ts | 2 - .../typescript/models/cross-chain-event.ts | 9 +- .../typescript/models/crosschain-model.ts | 112 ++- .../typescript/plugin-ccmodel-hephaestus.ts | 564 +++++------- .../pm4py-adapter/ccmodel-adapter.ts | 61 +- .../pm4py-adapter/check_conformance.py | 58 +- .../typescript/pm4py-adapter/convert_model.py | 13 +- .../typescript/pm4py-adapter/create_model.py | 2 +- .../src/test/csv/example-dummy-basic-test.csv | 2 - .../test/csv/example-dummy-besu-4-events.csv | 8 +- ...my-besu-ethereum-fabric-events-3-cases.csv | 28 - ...mple-dummy-besu-ethereum-fabric-events.csv | 28 - ...mple-dummy-ethereum-3-unmodeled-events.csv | 4 - .../csv/example-dummy-ethereum-4-events.csv | 8 +- .../csv/example-dummy-fabric-4-events.csv | 8 +- .../csv/example-dummy-periodic-update.csv | 29 - .../process mining-checkpoint.ipynb | 286 ------ .../process_conformance-checkpoint.ipynb | 186 ---- .../test/fixtures/python/process mining.ipynb | 286 ------ .../fixtures/python/process_conformance.ipynb | 186 ---- .../test/json/example-dummy-basic-test.json | 18 - .../json/example-dummy-besu-4-events.json | 32 +- ...y-besu-ethereum-fabric-events-3-cases.json | 425 --------- ...ple-dummy-besu-ethereum-fabric-events.json | 425 --------- ...ple-dummy-ethereum-3-unmodeled-events.json | 48 - .../json/example-dummy-ethereum-4-events.json | 16 +- .../json/example-dummy-fabric-4-events.json | 32 +- .../json/example-dummy-periodic-update.json | 432 --------- .../lock-asset-contract/lock-asset.sol | 60 +- .../integration/basic-mock-test.test.ts | 125 --- .../besu-ethereum-asset-transfer.test.ts | 778 ++++++++++++++++ ...s-chain-model-conformance-checking.test.ts | 149 +-- .../cross-chain-model-periodic-update.test.ts | 282 ------ .../cross-chain-model-serialization.test.ts | 14 +- .../ethereum-fabric-asset-transfer.test.ts | 868 ++++++++++++++++++ .../fabric-besu-asset-transfer.test.ts | 800 ++++++++++++++++ .../integration/monitor-4-besu-events.test.ts | 12 +- .../monitor-4-ethereum-events.test.ts | 14 +- .../monitor-4-fabric-events.test.ts | 12 +- ...onitor-besu-ethereum-fabric-events.test.ts | 705 -------------- yarn.lock | 153 +-- 49 files changed, 3033 insertions(+), 4304 deletions(-) mode change 100644 => 100755 examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/besu-ethereum-asset-transfer.test.ts delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/ethereum-fabric-asset-transfer.test.ts create mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/fabric-besu-asset-transfer.test.ts delete mode 100644 packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts diff --git a/.cspell.json b/.cspell.json index 73fb27310d..0e3a1a91e5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -171,7 +171,6 @@ "redoc", "redocly", "rogpeppe", - "rabbitmq", "rollbackackmessage", "RUSTC", "Rwset", diff --git a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/index.web.ts old mode 100644 new mode 100755 diff --git a/packages/cactus-core-api/src/main/json/openapi.json b/packages/cactus-core-api/src/main/json/openapi.json index 8ff71f7fa1..dada9b9302 100644 --- a/packages/cactus-core-api/src/main/json/openapi.json +++ b/packages/cactus-core-api/src/main/json/openapi.json @@ -187,7 +187,6 @@ "BURROW_0X", "CORDA_4X", "ETHEREUM", - "FABRIC_14X", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cactus-core-api/src/main/json/openapi.tpl.json b/packages/cactus-core-api/src/main/json/openapi.tpl.json index f6972c48ec..dada9b9302 100644 --- a/packages/cactus-core-api/src/main/json/openapi.tpl.json +++ b/packages/cactus-core-api/src/main/json/openapi.tpl.json @@ -186,6 +186,7 @@ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X" ] diff --git a/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt b/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt index 643e99587e..298eb9b78a 100644 --- a/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt +++ b/packages/cactus-core-api/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass /** * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. * - * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC14X,fABRIC2,qUORUM2X,sAWTOOTH1X + * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC2,sAWTOOTH1X */ @JsonClass(generateAdapter = false) @@ -43,9 +43,6 @@ enum class LedgerType(val value: kotlin.String) { @Json(name = "ETHEREUM") eTHEREUM("ETHEREUM"), - @Json(name = "FABRIC_14X") - fABRIC14X("FABRIC_14X"), - @Json(name = "FABRIC_2") fABRIC2("FABRIC_2"), diff --git a/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts index 20b1102374..770c48d36e 100644 --- a/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-core-api/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -525,7 +525,6 @@ export const LedgerType = { Burrow0X: 'BURROW_0X', Corda4X: 'CORDA_4X', Ethereum: 'ETHEREUM', - Fabric14X: 'FABRIC_14X', Fabric2: 'FABRIC_2', Sawtooth1X: 'SAWTOOTH_1X' } as const; diff --git a/packages/cactus-plugin-ccmodel-hephaestus/README.md b/packages/cactus-plugin-ccmodel-hephaestus/README.md index 7ca59b9578..87fc6bcc7d 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/README.md +++ b/packages/cactus-plugin-ccmodel-hephaestus/README.md @@ -69,17 +69,17 @@ The plugin employs a structured pipeline to create a cross-chain model from moni With it we can generate process models from the event logs created from transactional data and compare event logs with process models to identify deviations. ## Running the tests - - **basic-mock-test.test.ts**: Conducts the simulation of a transaction without instantiating the connectors, and tests that the plugin monitors, captures, and processes the transactional data and creates a cross-chain event. - **monitor-4-besu-events.test.ts**: Tests the plugin's ability to monitor, capture, and process the transactional data from besu connectors, and exports transactional data, in both CSV and JSON formats, as cross-chain event logs. - **monitor-4-ethereum-events.test.ts**: Tests the plugin's ability to monitor, capture, and process the transactional data from ethereum connectors, and exports transactional data, in both CSV and JSON formats, as cross-chain event logs. - **monitor-4-fabric-events.test.ts**: Tests the plugin's ability to monitor, capture, and process the transactional data from fabric connectors, and exports transactional data, in both CSV and JSON formats, as cross-chain event logs. - - **monitor-besu-ethereum-fabric-events.test.ts**: Tests the plugin's ability to monitor transactional data from besu, ethereum, and fabric connectors at the same time. - **cross-chain-model-serialization.test.ts**: Tests the plugin's ability to create the cross-chain model using the PM4PY (Process Mining for Python) library and save it serialized. - **cross-chain-model-conformance-checking.test.ts**: Tests the plugin's ability to check the conformity of unmodeled transactions against the cross-chain model using the PM4PY (Process Mining for Python) library. - - **cross-chain-model-periodic-update.test.ts**: Tests the plugin's ability to periodically update the cross-chain model with received transactional data. + - **besu-ethereum-asset-transfer.test.ts**: Tests the plugin's ability to detect non-conformance in asset transactions across two ledgers. + - **ethereum-fabric-asset-transfer.test.ts**: Tests the plugin's ability to detect non-conformance in asset transactions across two ledgers. + - **fabric-besu-asset-transfer.test.ts**: Tests the plugin's ability to detect non-conformance in asset transactions across two ledgers. ## Usage -Let us consider three conectors: one connected to Hyperledger Besu and, another connected to Hyperledger Ethereum, and a third connected to Hyperledger Fabric. To monitor cross-chain transactions and create a cross-chain model we should follow the next steps. +Let us consider two conectors: one connected to Hyperledger Besu and, and another connected to Hyperledger Ethereum. To monitor cross-chain transactions and create a cross-chain model we should follow the next steps. After instantiating the connectors, we instantiate the plugin as follows: ```typescript @@ -90,56 +90,31 @@ hephaestusOptions = { logLevel: logLevel, besuTxObservable: besuConnector.getTxSubjectObservable(), ethereumTxObservable: ethereumConnector.getTxSubjectObservable(), - fabricTxObservable: fabricConnector.getTxSubjectObservable(), + sourceLedger: LedgerType.Besu2X, + targetLedger: LedgerType.Ethereum, }; hephaestus = new CcModelHephaestus(hephaestusOptions); ``` -We set the desired caseID and start monitoring and processing the transactions into transaction receipts: +We set the desired caseID and start monitoring transactions. These are then processed into cross-chain events when received and added to the cross-chain event log: ```typescript hephaestus.setCaseId("Desired_CaseID"); hephaestus.monitorTransactions(); ``` -We can create cross-chain events from processed transaction receipts and add them to the cross-chain event log: - -```typescript -hephaestus.txReceiptToCrossChainEventLogEntry(); -``` - -We can export the transactional data captured to CSV and JSON files: - -```typescript -hephaestus.persistCrossChainLogCsv("output-file-CSV"); -hephaestus.persistCrossChainLogJson("output-file-JSON"); -``` - We can create the cross-chain model with events created from the transactional data captured: + ```typescript await hephaestus.createModel(); ``` -We can periodically update the cross-chain model with events created from the transactional data captured: -```typescript -const timeInterval = 10000; -const fileName = "file-with-modeled-logs" -await hephaestus.periodicCCModelUpdate( - fileName, - timeInterval, - ); -await hephaestus.stopPeriodicCCModelUpdate(fileName); -``` +After creating a model with the desired event logs, we can turn off modeling so that newly received transactional data will be compared against the model through a conformance check: -After creating or updating a model with the desired event logs, we can perform a conformance check of the newly received transactional data against the model: ```typescript -const model = hephaestus.getModel(CrossChainModelType.PetriNet); hephaestus.setIsModeling(false); -//receive more transactional data from connectors -await hephaestus.checkConformance(model); ``` - ## Contributing We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! diff --git a/packages/cactus-plugin-ccmodel-hephaestus/package.json b/packages/cactus-plugin-ccmodel-hephaestus/package.json index e1881ea01c..f407623a9a 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/package.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/package.json @@ -80,9 +80,10 @@ "@hyperledger/cactus-test-tooling": "2.0.0-rc.7", "@types/express": "5.0.0", "@types/uuid": "10.0.0", - "body-parser": "1.19.0", + "body-parser": "1.20.2", "fabric-network": "2.2.20", - "socket.io": "4.5.4", + "socket.io": "4.6.2", + "uuid": "10.0.0", "web3": "1.6.1", "web3-core": "1.6.1" }, diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts index 13623fdcad..e71c4c3613 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/carbon-footprint.ts @@ -34,8 +34,6 @@ export const CarbonFootPrintConstants = (ledger: LedgerType): number => { case LedgerType.Fabric2: return 0.00018; - case LedgerType.Fabric14X: - return 0.00018; default: return 0; } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts index be13220159..6c857a6544 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/cross-chain-event.ts @@ -1,8 +1,10 @@ +import { LedgerType } from "@hyperledger/cactus-core-api"; + export type CrossChainEvent = { caseID: string; receiptID: string; timestamp: string; - blockchainID: string; + blockchainID: LedgerType; invocationType: string; methodName: string; parameters: string[]; @@ -53,6 +55,11 @@ export class CrossChainEventLog { this.lastUpdateDate = new Date(); } + public removeLastEvent(): void { + this.crossChainEvents.pop(); + this.lastUpdateDate = new Date(); + } + public getCrossChainLogAttributes(): string[] { return [ "caseID", diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts index 38f89e7bd0..ad601daafe 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/models/crosschain-model.ts @@ -1,3 +1,4 @@ +import { LedgerType } from "@hyperledger/cactus-core-api"; import { v4 as uuidv4 } from "uuid"; export class CrossChainModel { @@ -8,6 +9,12 @@ export class CrossChainModel { private models = new Map(); private id: string; private lastAggregationDate: Date; + private crossChainState: Map< + string, + [AssetState | undefined, AssetState | undefined] + >; + private sourceLedgerMethods: string[] = []; + private targetLedgerMethods: string[] = []; constructor() { this.id = uuidv4(); @@ -16,6 +23,10 @@ export class CrossChainModel { CrossChainTransactionSchema >(); this.lastAggregationDate = new Date(); + this.crossChainState = new Map< + string, + [AssetState | undefined, AssetState | undefined] + >(); } get lastAggregation(): Date { @@ -62,6 +73,99 @@ export class CrossChainModel { ): void { this.crossChainTransactions?.set(key, mapDefintion); } + + public setSourceLedgerMethod(methodName: string): void { + this.sourceLedgerMethods.push(methodName); + } + + public sourceLedgerIncludesMethod(methodName: string): boolean { + return this.sourceLedgerMethods.includes(methodName); + } + + public setTargetLedgerMethod(methodName: string): void { + this.targetLedgerMethods.push(methodName); + } + + public targetLedgerIncludesMethod(methodName: string): boolean { + return this.targetLedgerMethods.includes(methodName); + } + + public setAssetStateSourceLedger(ccTxID: string, details: AssetState): void { + const prevState = this.crossChainState.get(ccTxID); + if (!prevState) { + this.crossChainState.set(ccTxID, [details, undefined]); + return; + } + this.crossChainState.set(ccTxID, [details, prevState[1]]); + } + + public setAssetStateTargetLedger(ccTxID: string, details: AssetState): void { + const prevState = this.crossChainState.get(ccTxID); + if (!prevState) { + this.crossChainState.set(ccTxID, [undefined, details]); + return; + } + this.crossChainState.set(ccTxID, [prevState[0], details]); + } + + public getCrossChainState(): string | undefined { + let ccState: string = ""; + for (const [ + ccTxID, + [assetStateSource, assetStateTarget], + ] of this.crossChainState.entries()) { + let txData: string; + if (assetStateSource && assetStateTarget) { + txData = + ccTxID + + "\n" + + assetStateSource.assetID + + ";" + + assetStateSource.assetState + + ";" + + assetStateSource.ledger + + ";" + + assetStateSource.lastStateUpdate + + "\n" + + assetStateTarget.assetID + + ";" + + assetStateTarget.assetState + + ";" + + assetStateTarget.ledger + + ";" + + assetStateTarget.lastStateUpdate + + "\n"; + } else if (assetStateSource) { + txData = + ccTxID + + "\n" + + assetStateSource.assetID + + ";" + + assetStateSource.assetState + + ";" + + assetStateSource.ledger + + ";" + + assetStateSource.lastStateUpdate + + "\n"; + } else if (assetStateTarget) { + txData = + ccTxID + + "\n" + + assetStateTarget.assetID + + ";" + + assetStateTarget.assetState + + ";" + + assetStateTarget.ledger + + ";" + + assetStateTarget.lastStateUpdate + + "\n"; + } else { + continue; + } + ccState = ccState + txData + "\n"; + } + return ccState; + } } export enum CrossChainModelType { @@ -70,7 +174,6 @@ export enum CrossChainModelType { } export type CrossChainTransactionSchema = { - ccTxID: string; // the IDs of all cross chain events of the cross chain transaction processedCrossChainEvents: string[]; latency: number; @@ -79,3 +182,10 @@ export type CrossChainTransactionSchema = { throughput: number; latestUpdate: Date; }; + +export type AssetState = { + assetID: string; + assetState: string; + ledger: LedgerType; + lastStateUpdate: Date; +}; diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts index 71f1f57ffe..fa26b486fe 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/plugin-ccmodel-hephaestus.ts @@ -35,7 +35,6 @@ import { import { createModelPM4PY, checkConformancePM4PY, - convertToProcessTreePM4PY, } from "./pm4py-adapter/ccmodel-adapter"; export interface IWebAppOptions { @@ -46,6 +45,7 @@ import { CrossChainModel, CrossChainModelType, CrossChainTransactionSchema, + AssetState, } from "./models/crosschain-model"; import { BesuV2TxReceipt, @@ -68,6 +68,8 @@ export interface IPluginCcModelHephaestusOptions extends ICactusPluginOptions { ethTxObservable?: Observable; besuTxObservable?: Observable; fabricTxObservable?: Observable; + sourceLedger: LedgerType; + targetLedger: LedgerType; } export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { @@ -76,18 +78,18 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { private endpoints: IWebServiceEndpoint[] | undefined; private httpServer: Server | SecureServer | null = null; private crossChainLog: CrossChainEventLog; - private uncheckedEventLog: CrossChainEventLog; - private nonConformanceCrossChainLog: CrossChainEventLog; + private unmodeledEventLog: CrossChainEventLog; + private nonConformedCrossChainLog: CrossChainEventLog; + private nonConformedCCTxs: string[]; private crossChainModel: CrossChainModel; public readonly className = "plugin-ccmodel-hephaestus"; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - private txReceipts: any[]; private caseID: string; private ethTxObservable?: Observable; private besuTxObservable?: Observable; private fabricTxObservable?: Observable; + private sourceLedger: LedgerType; + private targetLedger: LedgerType; private startMonitoring: number | null = null; - private periodicUpdate: boolean; private isModeling: boolean; constructor(public readonly options: IPluginCcModelHephaestusOptions) { @@ -107,15 +109,12 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { this.crossChainLog = new CrossChainEventLog({ name: "HEPHAESTUS_EVENT_LOGS", }); - this.uncheckedEventLog = new CrossChainEventLog({ - name: "HEPHAESTUS_CONFORMANCE_LOGS", + this.unmodeledEventLog = new CrossChainEventLog({ + name: "HEPHAESTUS_UNMODELED_LOGS", }); - this.nonConformanceCrossChainLog = new CrossChainEventLog({ + this.nonConformedCrossChainLog = new CrossChainEventLog({ name: "HEPHAESTUS_NON_CONFORMANCE_LOGS", }); - //todo should allow different models to be instantiated - this.crossChainModel = new CrossChainModel(); - this.txReceipts = []; this.caseID = "UNDEFINED_CASE_ID"; @@ -123,9 +122,16 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { this.besuTxObservable = options.besuTxObservable; this.fabricTxObservable = options.fabricTxObservable; - this.periodicUpdate = false; + this.sourceLedger = options.sourceLedger; + this.targetLedger = options.targetLedger; + + //todo should allow different models to be instantiated + this.crossChainModel = new CrossChainModel(); + this.isModeling = true; + this.nonConformedCCTxs = []; + const finalTime = new Date(); this.log.debug( `EVAL-${this.className}-SETUP-CONSTRUCTOR:${finalTime.getTime() - startTime.getTime()}`, @@ -144,16 +150,16 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { return this.crossChainLog.numberEvents(); } - get numberEventsUncheckedLog(): number { - return this.uncheckedEventLog.numberEvents(); + get numberEventsUnmodeledLog(): number { + return this.unmodeledEventLog.numberEvents(); } - get numberEventsNonConformanceLog(): number { - return this.nonConformanceCrossChainLog.numberEvents(); + public purgeNonConformedEvents(): void { + this.nonConformedCrossChainLog.purgeLogs(); } - get numberUnprocessedReceipts(): number { - return this.txReceipts.length; + get numberEventsNonConformedLog(): number { + return this.nonConformedCrossChainLog.numberEvents(); } public purgeCrossChainEvents(): void { @@ -173,6 +179,7 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { } public setCaseId(id: string): void { + this.unmodeledEventLog.purgeLogs(); this.caseID = id; } @@ -226,13 +233,13 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { return `@hyperledger/cactus-plugin-ccmodel-hephaestus`; } - public createReceiptFromRunTransactionV1ExchangeEth( - data: RunTransactionV1ExchangeEth, + private createReceiptFromRunTransactionV1ExchangeBesu( + data: RunTransactionV1ExchangeBesu, caseId: string, - ): EthereumTxReceipt { + ): BesuV2TxReceipt { return { caseID: caseId, - blockchainID: LedgerType.Ethereum, + blockchainID: LedgerType.Besu2X, timestamp: data.timestamp, transactionID: data.response.transactionReceipt.transactionHash, from: data.response.transactionReceipt.from, @@ -240,29 +247,30 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { methodName: data.request.methodName, parameters: data.request.params, gasUsed: data.response.transactionReceipt.gasUsed, - effectiveGasPrice: data.response.transactionReceipt.effectiveGasPrice, + gasPrice: data.request.gasPrice as number, }; } - public pollTxReceiptsEth(data: RunTransactionV1ExchangeEth): void { - const fnTag = `${this.className}#pollTxReceiptsEth()`; + private pollTxReceiptsBesu( + data: RunTransactionV1ExchangeBesu, + ): BesuV2TxReceipt { + const fnTag = `${this.className}#pollTxReceiptsBesu()`; this.log.debug(fnTag); - const ethReceipt = this.createReceiptFromRunTransactionV1ExchangeEth( + const besuReceipt = this.createReceiptFromRunTransactionV1ExchangeBesu( data, this.caseID, ); - this.txReceipts.push(ethReceipt); - return; + return besuReceipt; } - public createReceiptFromRunTransactionV1ExchangeBesu( - data: RunTransactionV1ExchangeBesu, + private createReceiptFromRunTransactionV1ExchangeEth( + data: RunTransactionV1ExchangeEth, caseId: string, - ): BesuV2TxReceipt { + ): EthereumTxReceipt { return { caseID: caseId, - blockchainID: LedgerType.Besu2X, + blockchainID: LedgerType.Ethereum, timestamp: data.timestamp, transactionID: data.response.transactionReceipt.transactionHash, from: data.response.transactionReceipt.from, @@ -270,23 +278,24 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { methodName: data.request.methodName, parameters: data.request.params, gasUsed: data.response.transactionReceipt.gasUsed, - gasPrice: data.request.gasPrice as number, + effectiveGasPrice: data.response.transactionReceipt.effectiveGasPrice, }; } - public pollTxReceiptsBesu(data: RunTransactionV1ExchangeBesu): void { - const fnTag = `${this.className}#pollTxReceiptsBesu()`; + private pollTxReceiptsEth( + data: RunTransactionV1ExchangeEth, + ): EthereumTxReceipt { + const fnTag = `${this.className}#pollTxReceiptsEth()`; this.log.debug(fnTag); - const besuReceipt = this.createReceiptFromRunTransactionV1ExchangeBesu( + const ethReceipt = this.createReceiptFromRunTransactionV1ExchangeEth( data, this.caseID, ); - this.txReceipts.push(besuReceipt); - return; + return ethReceipt; } - public createReceiptFromRunTxReqWithTxId( + private createReceiptFromRunTxReqWithTxId( data: RunTxReqWithTxId, caseId: string, ): FabricV2TxReceipt { @@ -304,7 +313,7 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { }; } - public pollTxReceiptsFabric(data: RunTxReqWithTxId): void { + private pollTxReceiptsFabric(data: RunTxReqWithTxId): FabricV2TxReceipt { const fnTag = `${this.className}#pollTxReceiptsFabric()`; this.log.debug(fnTag); @@ -312,32 +321,25 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { data, this.caseID, ); - this.txReceipts.push(fabricReceipt); - return; + return fabricReceipt; } - public watchRunTransactionV1ExchangeEth(duration: number = 0): void { - const fnTag = `${this.className}#watchRunTransactionV1ExchangeEth()`; + private watchRunTransactionV1ExchangeBesu(duration: number = 0): void { + const fnTag = `${this.className}#watchRunTransactionV1ExchangeBesu()`; this.log.debug(fnTag); - if (!this.ethTxObservable) { + if (!this.besuTxObservable) { this.log.debug( - `${fnTag}-No Ethereum transaction observable provided, monitoring skipped`, + `${fnTag}-No Besu transaction observable provided, monitoring skipped`, ); return; } - if (duration < 0) { - this.log.debug( - `${fnTag}-Negative duration provided (${duration}), monitoring all transactions`, - ); - } - !this.startMonitoring || (this.startMonitoring = Date.now()); - this.ethTxObservable + this.besuTxObservable .pipe( // Filter only the values emitted within the specified duration // if no duration provided, skip filtering - duration > 0 + duration >= 0 ? filter( (data) => this.startMonitoring! - data.timestamp.getTime() <= duration, @@ -345,45 +347,49 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { : tap(), ) .subscribe({ - next: (data: RunTransactionV1ExchangeEth) => { - // Handle the data whenever a new value is received by the observer - this.pollTxReceiptsEth(data); + next: async (data: RunTransactionV1ExchangeBesu) => { + // Handle the data whenever a new value is received by the observer: + // this includes creating the receipt, then the cross-chain event + // and check its conformance to the model, if the model is already defined + const receipt = this.pollTxReceiptsBesu(data); + const ccEvent = this.createCrossChainEventFromBesuReceipt( + receipt, + this.isModeling, + ); + const model = this.ccModel.getModel(CrossChainModelType.PetriNet); + + if (!this.isModeling && model && this.numberEventsUnmodeledLog != 0) { + this.updateCcStateAndCheckConformance(ccEvent, model); + } }, error: (error: unknown) => { this.log.error( `${fnTag}- error`, error, - `receiving RunTransactionV1ExchangeEth by Ethereum transaction observable`, - this.ethTxObservable, + `receiving RunTransactionV1ExchangeBesu by Besu transaction observable`, + this.besuTxObservable, ); throw error; }, }); } - public watchRunTransactionV1ExchangeBesu(duration: number = 0): void { - const fnTag = `${this.className}#watchRunTransactionV1ExchangeBesu()`; + private watchRunTransactionV1ExchangeEth(duration: number = 0): void { + const fnTag = `${this.className}#watchRunTransactionV1ExchangeEth()`; this.log.debug(fnTag); - if (!this.besuTxObservable) { + if (!this.ethTxObservable) { this.log.debug( - `${fnTag}-No Besu transaction observable provided, monitoring skipped`, + `${fnTag}-No Ethereum transaction observable provided, monitoring skipped`, ); return; } - if (duration < 0) { - this.log.debug( - `${fnTag}-Negative duration provided (${duration}), monitoring all transactions`, - ); - } - - !this.startMonitoring || (this.startMonitoring = Date.now()); - this.besuTxObservable + this.ethTxObservable .pipe( // Filter only the values emitted within the specified duration // if no duration provided, skip filtering - duration > 0 + duration >= 0 ? filter( (data) => this.startMonitoring! - data.timestamp.getTime() <= duration, @@ -391,23 +397,33 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { : tap(), ) .subscribe({ - next: (data: RunTransactionV1ExchangeBesu) => { + next: async (data: RunTransactionV1ExchangeEth) => { // Handle the data whenever a new value is received by the observer - this.pollTxReceiptsBesu(data); + // this includes creating the receipt, then the cross-chain event + // and check its conformance to the model, if the model is already defined + const receipt = this.pollTxReceiptsEth(data); + const ccEvent = this.createCrossChainEventFromEthReceipt( + receipt, + this.isModeling, + ); + const model = this.ccModel.getModel(CrossChainModelType.PetriNet); + if (!this.isModeling && model && this.numberEventsUnmodeledLog != 0) { + this.updateCcStateAndCheckConformance(ccEvent, model); + } }, error: (error: unknown) => { this.log.error( `${fnTag}- error`, error, - `receiving RunTransactionV1ExchangeBesu by Besu transaction observable`, - this.besuTxObservable, + `receiving RunTransactionV1ExchangeEth by Ethereum transaction observable`, + this.ethTxObservable, ); throw error; }, }); } - public watchRunTxReqWithTxId(duration: number = 0): void { + private watchRunTxReqWithTxId(duration: number = 0): void { const fnTag = `${this.className}#watchRunTxReqWithTxId()`; this.log.debug(fnTag); @@ -417,18 +433,12 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { ); return; } - if (duration < 0) { - this.log.debug( - `${fnTag}-Negative duration provided (${duration}), monitoring all transactions`, - ); - } - !this.startMonitoring || (this.startMonitoring = Date.now()); this.fabricTxObservable .pipe( // Filter only the values emitted within the specified duration // if no duration provided, skip filtering - duration > 0 + duration >= 0 ? filter( (data) => this.startMonitoring! - data.timestamp.getTime() <= duration, @@ -436,9 +446,19 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { : tap(), ) .subscribe({ - next: (data: RunTxReqWithTxId) => { + next: async (data: RunTxReqWithTxId) => { // Handle the data whenever a new value is received by the observer - this.pollTxReceiptsFabric(data); + // this includes creating the receipt, then the cross-chain event + // and check its conformance to the model, if the model is already defined + const receipt = this.pollTxReceiptsFabric(data); + const ccEvent = this.createCrossChainEventFromFabricReceipt( + receipt, + this.isModeling, + ); + const model = this.ccModel.getModel(CrossChainModelType.PetriNet); + if (!this.isModeling && model && this.numberEventsUnmodeledLog != 0) { + this.updateCcStateAndCheckConformance(ccEvent, model); + } }, error: (error: unknown) => { this.log.error( @@ -452,58 +472,55 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { }); } - public monitorTransactions(duration: number = 0): void { + public monitorTransactions(duration: number = -1): void { const fnTag = `${this.className}#monitorTransactions()`; this.log.debug(fnTag); this.startMonitoring = Date.now(); - this.watchRunTxReqWithTxId(duration); this.watchRunTransactionV1ExchangeBesu(duration); this.watchRunTransactionV1ExchangeEth(duration); + this.watchRunTxReqWithTxId(duration); return; } - private createCrossChainEventFromEthReceipt( - ethReceipt: EthereumTxReceipt, - updatingCCModel: boolean, - ): void { - const ccEventFromEth: CrossChainEvent = { - caseID: ethReceipt.caseID, - receiptID: ethReceipt.transactionID, - blockchainID: ethReceipt.blockchainID, - invocationType: ethReceipt.invocationType, - methodName: ethReceipt.methodName, - parameters: ethReceipt.parameters, - timestamp: ethReceipt.timestamp.toISOString(), - identity: ethReceipt.from, - cost: calculateGasPriceEth( - ethReceipt.gasUsed as number, - ethReceipt.effectiveGasPrice, - ), - carbonFootprint: CarbonFootPrintConstants(ethReceipt.blockchainID), - latency: millisecondsLatency(ethReceipt.timestamp), + private async updateCcStateAndCheckConformance( + ccEvent: CrossChainEvent, + model: string, + ): Promise { + const assetState: AssetState = { + assetID: ccEvent.parameters[0], + assetState: ccEvent.methodName, + ledger: ccEvent.blockchainID, + lastStateUpdate: new Date(), }; - - if (this.isModeling == false && updatingCCModel == false) { - this.uncheckedEventLog.addCrossChainEvent(ccEventFromEth); - - this.log.info( - "Added Cross Chain event from ETHEREUM for conformance checking", - ); - this.log.debug( - `Conformance Cross-chain log: ${JSON.stringify(ccEventFromEth)}`, - ); - } else { - this.crossChainLog.addCrossChainEvent(ccEventFromEth); - this.log.info("Added Cross Chain event from ETHEREUM"); - this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromEth)}`); + const ledgerHasMethod = this.addAssetToCcState(ccEvent, assetState); + await this.checkConformance(model, ledgerHasMethod); + } + + private addAssetToCcState( + ccEvent: CrossChainEvent, + assetState: AssetState, + ): boolean { + if ( + this.sourceLedger == ccEvent.blockchainID && + this.ccModel.sourceLedgerIncludesMethod(ccEvent.methodName) + ) { + this.ccModel.setAssetStateSourceLedger(this.caseID, assetState); + return true; + } else if ( + this.targetLedger == ccEvent.blockchainID && + this.ccModel.targetLedgerIncludesMethod(ccEvent.methodName) + ) { + this.ccModel.setAssetStateTargetLedger(this.caseID, assetState); + return true; } + return false; } private createCrossChainEventFromBesuReceipt( besuReceipt: BesuV2TxReceipt, updatingCCModel: boolean, - ): void { + ): CrossChainEvent { const ccEventFromBesu: CrossChainEvent = { caseID: besuReceipt.caseID, receiptID: besuReceipt.transactionID, @@ -519,7 +536,7 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { }; if (this.isModeling == false && updatingCCModel == false) { - this.uncheckedEventLog.addCrossChainEvent(ccEventFromBesu); + this.unmodeledEventLog.addCrossChainEvent(ccEventFromBesu); this.log.info( "Added Cross Chain event from BESU for conformance checking", @@ -532,12 +549,51 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { this.log.info("Added Cross Chain event from BESU"); this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromBesu)}`); } + return ccEventFromBesu; + } + + private createCrossChainEventFromEthReceipt( + ethReceipt: EthereumTxReceipt, + updatingCCModel: boolean, + ): CrossChainEvent { + const ccEventFromEth: CrossChainEvent = { + caseID: ethReceipt.caseID, + receiptID: ethReceipt.transactionID, + blockchainID: ethReceipt.blockchainID, + invocationType: ethReceipt.invocationType, + methodName: ethReceipt.methodName, + parameters: ethReceipt.parameters, + timestamp: ethReceipt.timestamp.toISOString(), + identity: ethReceipt.from, + cost: calculateGasPriceEth( + ethReceipt.gasUsed as number, + ethReceipt.effectiveGasPrice, + ), + carbonFootprint: CarbonFootPrintConstants(ethReceipt.blockchainID), + latency: millisecondsLatency(ethReceipt.timestamp), + }; + + if (this.isModeling == false && updatingCCModel == false) { + this.unmodeledEventLog.addCrossChainEvent(ccEventFromEth); + + this.log.info( + "Added Cross Chain event from ETHEREUM for conformance checking", + ); + this.log.debug( + `Conformance Cross-chain log: ${JSON.stringify(ccEventFromEth)}`, + ); + } else { + this.crossChainLog.addCrossChainEvent(ccEventFromEth); + this.log.info("Added Cross Chain event from ETHEREUM"); + this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromEth)}`); + } + return ccEventFromEth; } private createCrossChainEventFromFabricReceipt( fabricReceipt: FabricV2TxReceipt, updatingCCModel: boolean, - ): void { + ): CrossChainEvent { const ccEventFromFabric: CrossChainEvent = { caseID: fabricReceipt.caseID, receiptID: fabricReceipt.transactionID, @@ -553,7 +609,7 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { }; if (this.isModeling == false && updatingCCModel == false) { - this.uncheckedEventLog.addCrossChainEvent(ccEventFromFabric); + this.unmodeledEventLog.addCrossChainEvent(ccEventFromFabric); this.log.info( "Added Cross Chain event from FABRIC for conformance checking", @@ -566,88 +622,13 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { this.log.info("Added Cross Chain event from FABRIC"); this.log.debug(`Cross-chain log: ${JSON.stringify(ccEventFromFabric)}`); } + return ccEventFromFabric; } - private async createCrossChainEventFromReceipt( - receipt: BesuV2TxReceipt | EthereumTxReceipt | FabricV2TxReceipt, - updatingCCModel: boolean, - ): Promise { - switch (receipt.blockchainID) { - // Process Besu transaction receipt - case LedgerType.Besu2X: - this.createCrossChainEventFromBesuReceipt( - receipt as BesuV2TxReceipt, - updatingCCModel, - ); - break; - // Process Ethereum transaction receipt - case LedgerType.Ethereum: - this.createCrossChainEventFromEthReceipt( - receipt as EthereumTxReceipt, - updatingCCModel, - ); - break; - // Process Fabric transaction receipt - case LedgerType.Fabric2: - this.createCrossChainEventFromFabricReceipt( - receipt as FabricV2TxReceipt, - updatingCCModel, - ); - break; - default: - this.log.warn( - `Tx Receipt with case ID ${receipt.caseID} is not supported`, - ); - break; - } - } - - public async txReceiptToCrossChainEventLogEntry( - updatingCCModel: boolean = false, - ): Promise { - const startTime = new Date(); - const fnTag = `${this.className}#txReceiptToCrossChainEventLogEntry()`; - this.log.debug(fnTag); - // We are processing receipts to update the CrossChainLog. - // At the end of the processing, we need to clear the transaction receipts that have been processed - // Therefore, we need a listen method that hephaestus is always running, doing polls every X seconds, followed by receipt processing (this method) - try { - this.txReceipts.forEach((receipt) => { - this.createCrossChainEventFromReceipt(receipt, updatingCCModel); - }); - // Clear receipt array - this.txReceipts = []; - const finalTime = new Date(); - this.log.debug( - `EVAL-${this.className}-RECEIPT2EVENT:${finalTime.getTime() - startTime.getTime()}`, - ); - return; - } catch (error) { - const details = this.txReceipts.map((receipt) => { - return { - caseID: receipt.caseID, - receiptID: receipt.receiptID, - blockchainID: receipt.blockchainID, - timestamp: receipt.timestamp, - invocationType: receipt.invocationType, - methodName: receipt.methodName, - parameters: receipt.parameters, - }; - }); - this.log.error( - `${fnTag} Failed to create cross chain events from transaction receipts:`, - error, - `Receipts' details:`, - JSON.stringify(details), - ); - throw error; - } - } - - // Parses the cross chain event log to updates the cross chain model + // Parses the cross chain event log to update the cross chain model // This is part of the cc model; have a set that maps case id to data structure; this data structure are the consolidated metrics for a cctx, stores each txid // run over cc log; if case id is unique create new entry, otherwise add tx to cctx, update metrics, update last update; this is an updatable model - public async aggregateCcTx(): Promise { + private async aggregateCcTx(): Promise { const startTime = new Date(); const lastAggregated = this.crossChainModel.lastAggregation; const newAggregationDate = new Date(); @@ -655,7 +636,6 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { const logEntries = this.crossChainLog.logEntries; // If entries are more recent than aggregation let metrics: CrossChainTransactionSchema = { - ccTxID: "", processedCrossChainEvents: [], latency: 0, carbonFootprint: 0, @@ -664,9 +644,12 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { latestUpdate: newAggregationDate, }; const lastAggregatedTime = new Date(lastAggregated).getTime(); + console.log(logEntries); const logsToAggregate = logEntries.filter( (log) => new Date(log.timestamp).getTime() > lastAggregatedTime, ); + console.log(logsToAggregate); + if (logsToAggregate.length === 0) { const finalTime = new Date(); @@ -676,23 +659,14 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { return; } logsToAggregate.forEach((eventEntry) => { - const key = eventEntry.caseID; + const ccTxID = eventEntry.caseID; const eventID = eventEntry.receiptID; - let latency = eventEntry.latency as number; - let carbonFootprint = eventEntry.carbonFootprint as number; - let cost = eventEntry.cost as number; + const latency = (eventEntry.latency as number) || 0; + const carbonFootprint = (eventEntry.carbonFootprint as number) || 0; + const cost = (eventEntry.cost as number) || 0; - if (!latency) { - latency = 0; - } - if (!carbonFootprint) { - carbonFootprint = 0; - } - if (!cost) { - cost = 0; - } - if (ccTxSet?.has(key)) { - const existingCCTx = ccTxSet.get(key); + if (ccTxSet?.has(ccTxID)) { + const existingCCTx = ccTxSet.get(ccTxID); const previousEvents = existingCCTx?.processedCrossChainEvents || []; const numberOfCurrentEvents = previousEvents.length + 1; const previousLatency = existingCCTx?.latency || 0; @@ -701,7 +675,6 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { const currentCost = (cost + previousCost) / numberOfCurrentEvents; const updatedMetrics = { - ccTxID: key, processedCrossChainEvents: [...previousEvents, eventID], latency: (latency + previousLatency) / numberOfCurrentEvents, carbonFootprint: @@ -717,10 +690,9 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { ), latestUpdate: lastAggregated, }; - this.crossChainModel.setCCTxs(key, updatedMetrics); + this.crossChainModel.setCCTxs(ccTxID, updatedMetrics); } else { metrics = { - ccTxID: key, processedCrossChainEvents: [eventID], latency: latency, carbonFootprint: carbonFootprint, @@ -730,7 +702,7 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { ), latestUpdate: lastAggregated, }; - this.crossChainModel.setCCTxs(key, metrics); + this.crossChainModel.setCCTxs(ccTxID, metrics); } }); this.crossChainModel.setLastAggregationDate(newAggregationDate); @@ -820,17 +792,17 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { } } - private async persistUncheckedEventLog(): Promise { + private async persistUnmodeledEventLog(): Promise { const startTime = new Date(); const logName = `hephaestus_log_${startTime.getTime()}`; const jsonFolder = path.join(__dirname, "../", "../", "test", "json"); const logPath = path.join(jsonFolder, logName + ".json"); - const fnTag = `${this.className}#persistUncheckedEventLog()`; + const fnTag = `${this.className}#persistUnmodeledEventLog()`; - const ccEvents = this.uncheckedEventLog.logEntries; + const ccLogEvents = this.unmodeledEventLog.logEntries; try { - const data = JSON.stringify(ccEvents, null, 2); + const data = JSON.stringify(ccLogEvents, null, 2); this.log.debug(data); // Create directory if it doesn't exist @@ -851,52 +823,6 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { } } - public async stopPeriodicCCModelUpdate(fileName: string = ""): Promise { - const fnTag = `${this.className}#stopPeriodicCCModelUpdate()`; - this.log.debug(fnTag); - await this.txReceiptToCrossChainEventLogEntry(true); - await this.createModel(fileName); - this.periodicUpdate = false; - } - - public async periodicCCModelUpdate( - fileName: string = "", - timeInterval: number, - ): Promise { - const fnTag = `${this.className}#periodicCCModelUpdate()`; - this.log.debug(fnTag); - - timeInterval = timeInterval < 5000 ? 5000 : timeInterval; - - this.periodicUpdate = true; - const intervalId = setInterval(async () => { - if (this.periodicUpdate == true) { - await this.txReceiptToCrossChainEventLogEntry(true); - if (fileName != "") { - await this.persistCrossChainLogCsv(fileName); - await this.persistCrossChainLogJson(fileName); - } - await this.checkConformanceAndUpdateModel(fileName); - } else { - clearInterval(intervalId); - } - }, timeInterval); - } - - public async checkConformanceAndUpdateModel(fileName: string): Promise { - const model = this.getModel(CrossChainModelType.PetriNet); - if (!model) { - return; - } - const conformanceDetails = await this.checkConformance(model); - this.filterCrossChainLogsByConformance(conformanceDetails); - const modelPM4PY = await this.createModel(fileName); - if (modelPM4PY) { - this.ccModel.setType(CrossChainModelType.PetriNet); - this.saveModel(CrossChainModelType.PetriNet, modelPM4PY); - } - } - // Receives a serialized model and saves it public saveModel(modelType: CrossChainModelType, model: string): void { this.crossChainModel.saveModel(modelType, model); @@ -907,67 +833,79 @@ export class CcModelHephaestus implements ICactusPlugin, IPluginWebService { return this.crossChainModel.getModel(modelType); } - public async createModel(fileName: string = ""): Promise { - if (fileName == "") { - fileName = await this.persistCrossChainLogCsv(); - fileName = fileName.split(".")[0]; - } + public setLedgerMethods(): void { + const logEntries = this.crossChainLog.logEntries; + logEntries.forEach((event) => { + if (this.sourceLedger == event.blockchainID) { + this.ccModel.setSourceLedgerMethod(event.methodName); + } + if (this.targetLedger == event.blockchainID) { + this.ccModel.setTargetLedgerMethod(event.methodName); + } + }); + } + + public async createModel(): Promise { + let fileName = await this.persistCrossChainLogJson(); + fileName = fileName.split(".")[0]; await this.aggregateCcTx(); const petriNet = createModelPM4PY(fileName); this.ccModel.setType(CrossChainModelType.PetriNet); this.saveModel(CrossChainModelType.PetriNet, petriNet); + this.setLedgerMethods(); return petriNet; } // creates a file with unmodeled logs and performs a conformance check - public async checkConformance(serializedCCModel: string): Promise { - const fileName = await this.persistUncheckedEventLog(); + private async checkConformance( + serializedCCModel: string, + ledgerHasMethod: boolean, + ): Promise { + const fileName = await this.persistUnmodeledEventLog(); const conformanceDetails = checkConformancePM4PY( fileName, serializedCCModel, ); - this.filterCrossChainLogsByConformance(conformanceDetails); - return conformanceDetails; + return this.filterLogsByConformance(conformanceDetails, ledgerHasMethod); } - private filterCrossChainLogsByConformance( + private filterLogsByConformance( conformanceDetails: string | undefined, - ): void { - const fnTag = `${this.className}#filterCrossChainLogsByConformance()`; + ledgerHasMethod: boolean, + ): string { + const fnTag = `${this.className}#filterLogsByConformance()`; if (!conformanceDetails) { throw new Error(`${fnTag} conformance details falsy.`); } - const entries = this.uncheckedEventLog.logEntries; const details = conformanceDetails.split("\n"); - - const misbehaviour = details[2]; - - if (misbehaviour === "[]") { - // if it conforms, add to ccmodel - entries.forEach((entry) => { - this.crossChainLog.addCrossChainEvent(entry); + const diagnosis = details[0]; + + if ( + diagnosis.includes("NON-CONFORMANCE") || + diagnosis.includes("SKIPPED ACTIVITY") || + !ledgerHasMethod + ) { + this.nonConformedCCTxs.push(this.caseID); + this.unmodeledEventLog.logEntries.forEach((event) => { + this.nonConformedCrossChainLog.addCrossChainEvent(event); }); - } else { - // else keep it in a different log of non-conformance - entries.forEach((entry) => { - this.nonConformanceCrossChainLog.addCrossChainEvent(entry); + this.unmodeledEventLog.purgeLogs(); + } else if (diagnosis.includes("PARTIAL CONFORMANCE")) { + if (this.nonConformedCCTxs.includes(this.caseID)) { + this.unmodeledEventLog.logEntries.forEach((event) => { + this.nonConformedCrossChainLog.addCrossChainEvent(event); + }); + this.unmodeledEventLog.purgeLogs(); + } + } else if (diagnosis.includes("FULL CONFORMANCE")) { + this.unmodeledEventLog.logEntries.forEach((event) => { + this.crossChainLog.addCrossChainEvent(event); }); + this.unmodeledEventLog.purgeLogs(); + this.createModel(); } - // clean uncheckedEventLog - this.uncheckedEventLog.purgeLogs(); - } - - public convertModelToProcessTree(): string | undefined { - const petriNet = this.ccModel.getModel(CrossChainModelType.PetriNet); - if (!petriNet) { - return; - } - const tree = convertToProcessTreePM4PY(petriNet); - if (!tree) { - return; - } - this.saveModel(CrossChainModelType.ProcessTree, tree); - return tree; + console.log(details); + return diagnosis; } } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts index ee7f9c29d8..c983795270 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/ccmodel-adapter.ts @@ -27,6 +27,7 @@ export function checkConformancePM4PY( const checkConformanceScript = path.join(__dirname, "check_conformance.py"); const command = `python3 ${checkConformanceScript} ${file_name} \'${serializedCCModel}\'`; + // console.log(command); try { const checkOutput = execSync(command).toString("utf-8"); return checkOutput; @@ -35,63 +36,3 @@ export function checkConformancePM4PY( throw error; } } - -export function convertToProcessTreePM4PY( - serializedCCModel: string, -): string | undefined { - const ConvertModelScript = path.join(__dirname, "convert_model.py"); - const command = `python3 ${ConvertModelScript} \'${serializedCCModel}\' ProcessTree`; - - try { - const output = execSync(command, { encoding: "utf-8" }); - return output; - } catch (error) { - console.error(`Error executing ${command}:`, error); - throw error; - } -} - -// // not needed? -// // this is just assigning the serialized process to hepheastus' ccmodel -// export function processModelToCCModelPM4PY( -// ccmodel: CrossChainModel, -// // processModel: string, -// ): CrossChainModel { -// // something like that -// // ccmodel.setModel(ccmodel.ccModelType, processModel); -// return ccmodel; -// } - -// // converts the ccmodel into process model for later conformance checking -// // if needed it's going to be different -// export function ccModelToProcessModelPM4PY( -// model: CrossChainModel, -// modelType: CrossChainModelType, -// ): string { -// let processModel: string | undefined; -// if (modelType == CrossChainModelType.PetriNet) { -// // call pm4py to make PetriNet -// processModel = model.getModel(CrossChainModelType.PetriNet); -// } else if (modelType == CrossChainModelType.ProcessTree) { -// // call pm4py to make ProcessTree -// processModel = model.getModel(CrossChainModelType.ProcessTree); -// } else { -// return "failed"; -// } - -// const processModelToCCModel = path.join( -// __dirname, -// "ccmodel_to_process_model.py", // serializes the ccmodel -// ); -// const command = `python3 ${processModelToCCModel} ${modelType} ${processModel}`; - -// try { -// const output = execSync(command, { encoding: "utf-8" }); -// console.log("Command output:", output); -// // return parseMP4PYOutput(output); -// return output; -// } catch (error) { -// console.error(`Error executing ${command}:`, error); -// throw error; -// } -// } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py index 19a3b58e5d..e2d80a3701 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/check_conformance.py @@ -146,18 +146,56 @@ def unserialize_and_check_conformance(ccLog): # check conformance: diagnostics = pm4py.conformance_diagnostics_alignments(ccLog, net, initial_marking, final_marking) - print(diagnostics) + if diagnostics == []: + print("No event log provided") + return alignment = diagnostics[0]["alignment"] - non_modeled_activities = [] - skips = [] + conforming_activities = [] + non_conforming_activities = [] + skipped_activities = [] + all_activities = [] + for activity in alignment: if activity[0] == ">>" and activity[1] != None: - skips.append(activity) + all_activities.append(activity) + skipped_activities.append(activity) elif activity[0] != ">>" and activity[1] == ">>": - non_modeled_activities.append(activity) - print(skips) - print(non_modeled_activities) + all_activities.append(activity) + non_conforming_activities.append(activity) + elif activity[0] != None and activity[1] != None: + all_activities.append(activity) + conforming_activities.append(activity) + + # Check for non-confomant behaviour + if len(non_conforming_activities) != 0: + print("NON-CONFORMANCE:") + print(non_conforming_activities) + print(file) + return + + if len(all_activities) == len(conforming_activities): + print("FULL CONFORMANCE:") + print(conforming_activities) + print(file) + return + + # If there were no skips in the case, then all the conforming activities + # will be the same as the initial activities of the model + # If not, then there were skips that cannot be ignored + ignore_skips = True + for i in range(len(conforming_activities)): + if(conforming_activities[i] != all_activities[i]): + ignore_skips = False + + if ignore_skips == True: + print("PARTIAL CONFORMANCE:") + print(conforming_activities) + print(file) + else: + print("SKIPPED ACTIVITY:") + print(skipped_activities) + print(file) ################################################################## @@ -179,9 +217,9 @@ def main(): exit(1) if __name__ == "__main__": - # if len(sys.argv) != 3: - # print("Usage: python3 check_conformance_json.py file_with_new_logs serialized_ccmodel") - # exit(1) + if len(sys.argv) != 3: + print("Usage: python3 check_conformance.py file_with_new_logs serialized_ccmodel") + exit(1) file = sys.argv[1] serialized_ccmodel = sys.argv[2] diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py index bbf2360586..e2f528a8e3 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/convert_model.py @@ -106,18 +106,13 @@ def unserialize_model(model): def main(): (petri_net, initial_marking, final_marking) = unserialize_model(serialized_model) - if(convertion_type == "ProcessTree"): - process_tree = pm4py.convert_to_process_tree(petri_net, initial_marking, final_marking) - print(process_tree) - if(convertion_type == "BPMN"): - bpmn = pm4py.convert_to_bpmn(petri_net, initial_marking, final_marking) - print(bpmn) + process_tree = pm4py.convert_to_process_tree(petri_net, initial_marking, final_marking) + print(process_tree) if __name__ == "__main__": - if len(sys.argv) != 3: - print("Usage: python3 convert_model_csv.py serialized_model type_to_convert_to") + if len(sys.argv) != 2: + print("Usage: python3 convert_model.py serialized_model") exit(1) serialized_model = sys.argv[1] - convertion_type = sys.argv[2] main() \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py index d92751c9e9..cb1fd8f96e 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/main/typescript/pm4py-adapter/create_model.py @@ -77,7 +77,7 @@ def main(): if __name__ == "__main__": if len(sys.argv) != 2: - print("Usage: python3 create_model_csv.py file_with_logs") + print("Usage: python3 create_model.py file_with_logs") exit(1) file = sys.argv[1] diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv deleted file mode 100644 index b53c925f56..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-basic-test.csv +++ /dev/null @@ -1,2 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -basic-TEST;txID1;2024-05-27T09:05:43.640Z;FABRIC_2;FabricContractInvocationType.SEND;methodName2;0,2;person 1;0;0.00018;4 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv index a44a57f6bd..87ff7e29c8 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-4-events.csv @@ -1,5 +1,5 @@ caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -BESU_MONITORING;0xe6800f6ff8d1a8ea5ee677dbb9320f849d28a8a533608affea5ef138be088736;2024-05-27T09:34:25.795Z;BESU_2X;SEND;createAsset;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;3457 -BESU_MONITORING;0x320482edd9e264453bbd7dee3826b7f9960fcaa27ce70398e21eee9be14423aa;2024-05-27T09:34:27.303Z;BESU_2X;SEND;lockAsset;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;1953 -BESU_MONITORING;0x99ae2b0951af4d674734bdc8ba21838eb2df3aefa7d2bc54f51c12ad713c06b5;2024-05-27T09:34:28.641Z;BESU_2X;SEND;isPresent;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b;0x627306090abab3a6e1400e9345bc60c78a8bef57;25157;0.00018;615 -BESU_MONITORING;0xd2da2adaf8f4e39dbd55ff8b42179efd67d402c58a61cdd30ca8d142be955f5c;2024-05-27T09:34:29.246Z;BESU_2X;SEND;deleteAsset;e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;11 \ No newline at end of file +BESU_MONITORING;0x4b9b973b3f26195955c6094c5958a805f76e9cf4e8159dad86c8d9be019fee96;2024-07-03T14:49:17.072Z;BESU_2X;SEND;createAsset;4b4af0e7-b664-4a3c-8f7d-32919a455655,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;1 +BESU_MONITORING;0x7c861111674f27f07bbb2386696e004d95d584098e15a5b2f810cb3f96f1c4a0;2024-07-03T14:49:17.905Z;BESU_2X;SEND;lockAsset;4b4af0e7-b664-4a3c-8f7d-32919a455655;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;0 +BESU_MONITORING;0xa6b9fbbbb18fcc56757ebc13bc966ddf69fb57c2e04277e58dbb38a6030e6c4e;2024-07-03T14:49:19.044Z;BESU_2X;SEND;isPresent;4b4af0e7-b664-4a3c-8f7d-32919a455655;0x627306090abab3a6e1400e9345bc60c78a8bef57;25157;0.00018;0 +BESU_MONITORING;0x865068c8e203fcdf4131900215e592d8c40a0f4bc96da91f43c66c4b81603d68;2024-07-03T14:49:19.538Z;BESU_2X;SEND;deleteAsset;4b4af0e7-b664-4a3c-8f7d-32919a455655;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;0 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv deleted file mode 100644 index 5f19ca27f8..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events-3-cases.csv +++ /dev/null @@ -1,28 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -BESU_ETHEREUM_FABRIC_1;0x6b2082f5ca10801ab311fefa9fd5fc0ddcca253da5707232ac07599585d88fb4;2024-05-20T10:32:59.263Z;BESU_2X;SEND;createAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;110153 -BESU_ETHEREUM_FABRIC_1;0x8bcbdc64574f2767526685aedb2197158da87c619a4bb7bf64e3aaa00ac72872;2024-05-20T10:33:00.553Z;BESU_2X;SEND;lockAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;108865 -BESU_ETHEREUM_FABRIC_1;0x8068f71dc71de14e80c8b6be2042c2001ac383c42bc363608df5510277cedc81;2024-05-20T10:33:01.883Z;BESU_2X;SEND;deleteAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;107535 -BESU_ETHEREUM_FABRIC_1;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-20T10:33:07.943Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;129786009655382;0;101476 -BESU_ETHEREUM_FABRIC_1;0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9;2024-05-20T10:33:12.103Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;41156218131450;0;97316 -BESU_ETHEREUM_FABRIC_1;0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c;2024-05-20T10:33:17.246Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955165049120;0;92174 -BESU_ETHEREUM_FABRIC_1;453887cf863ff5329f47ba82b0a6de9d63a1b7eb07be932ac4d6fd71c03f1227;2024-05-20T10:33:23.599Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,10,owner1;user1;0;0.00018;85821 -BESU_ETHEREUM_FABRIC_1;547e59b76a912a65638585f42d33e264cefe1898a10cfeafd97929a6547dfd96;2024-05-20T10:33:29.855Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,owner2;user1;0;0.00018;79566 -BESU_ETHEREUM_FABRIC_1;9486bee925044c747d5faa942449f899d3c8a8c9e9a42ffe37ca46278545e636;2024-05-20T10:33:35.386Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850;user1;0;0.00018;74035 -BESU_ETHEREUM_FABRIC_2;0xafac857fc46846e2c6bb651a1c406606f58357211fb65f6887617a5cac878c23;2024-05-20T10:33:36.055Z;BESU_2X;SEND;createAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;73367 -BESU_ETHEREUM_FABRIC_2;0x5061e439a6cff371957872531932990013c6e052d82b7ab199785c2fd7e74e93;2024-05-20T10:33:38.902Z;BESU_2X;SEND;lockAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;70520 -BESU_ETHEREUM_FABRIC_2;0xe72063132b259c1a57e202cb5321258102767816b1240f513499faa04af8781d;2024-05-20T10:33:40.054Z;BESU_2X;SEND;deleteAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;69369 -BESU_ETHEREUM_FABRIC_2;0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708;2024-05-20T10:33:47.139Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103394573872490;0;62284 -BESU_ETHEREUM_FABRIC_2;0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2;2024-05-20T10:33:52.281Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538215602250;0;57143 -BESU_ETHEREUM_FABRIC_2;0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16;2024-05-20T10:33:57.501Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079554985280;0;51924 -BESU_ETHEREUM_FABRIC_2;525368f5e7ebbed3edd2cb5f52fcc5f441bbdff5863fc08597b87402abaa681e;2024-05-20T10:34:03.161Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,10,owner1;user1;0;0.00018;46264 -BESU_ETHEREUM_FABRIC_2;5374737a2ac9149c4068a776249c2bc5b45e80b34c5f37a9340966a4edf2c4a4;2024-05-20T10:34:08.645Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,owner2;user1;0;0.00018;40780 -BESU_ETHEREUM_FABRIC_2;67fdd728e47ab2ae655ecca44bda5999067cf11c2e79bd317ee6ad03dd5eb5cf;2024-05-20T10:34:14.183Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850;user1;0;0.00018;35243 -BESU_ETHEREUM_FABRIC_3;0xf7e10e0fa005951955ab2e03d1742430d4b9e73303c07cadf640148460f1859e;2024-05-20T10:34:15.031Z;BESU_2X;SEND;createAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;34395 -BESU_ETHEREUM_FABRIC_3;0xe96e1c157a0c42487428da97c6a97c548bcd4d17b25fdbc8d8ca747adfbeeac6;2024-05-20T10:34:16.505Z;BESU_2X;SEND;lockAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;32922 -BESU_ETHEREUM_FABRIC_3;0x03abead1107ae01dff9bdfb941124e80adc0609bd613461152c0df7d902a1c63;2024-05-20T10:34:17.879Z;BESU_2X;SEND;deleteAsset;fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;31548 -BESU_ETHEREUM_FABRIC_3;0xdaf77bc2c7bdba632dd34d7ff8036dcb18c3fcfcfa8a34e315099a674c662351;2024-05-20T10:34:22.191Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;95004006312862;0;27237 -BESU_ETHEREUM_FABRIC_3;0x3e8cc1e7762ebbf015fbcc7527be575ce932bad1e52c277ef5ad06978f46c90f;2024-05-20T10:34:27.469Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31116241250400;0;21959 -BESU_ETHEREUM_FABRIC_3;0xbf8a4b150c4c431b415829e5722840f1e7541109507b7ca497f7bc2453b64fed;2024-05-20T10:34:32.014Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31893607627440;0;17414 -BESU_ETHEREUM_FABRIC_3;8e2146a7989e14efbc97d369a98d8203401dfbd034df77fcb66f7b32e4a50e99;2024-05-20T10:34:38.174Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,10,owner1;user1;0;0.00018;11255 -BESU_ETHEREUM_FABRIC_3;cd118aeed54618ead4514f17c2682178f4f788b7e5f7f0d0772744ae22e9f9b2;2024-05-20T10:34:43.744Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850,owner2;user1;0;0.00018;5685 -BESU_ETHEREUM_FABRIC_3;93f066ba9539c48b32a11b2e6cd469cab38e9cb4e78be4385f259286afb674cb;2024-05-20T10:34:49.405Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850;user1;0;0.00018;25 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv deleted file mode 100644 index 231f0be83a..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-besu-ethereum-fabric-events.csv +++ /dev/null @@ -1,28 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -BESU_ETHEREUM_FABRIC_1;0xb81ed2022db3f730c182da98690974fa6b2b1f4ae503d4d9c9160c160a0cc589;2024-05-27T09:15:37.576Z;BESU_2X;SEND;createAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;116909 -BESU_ETHEREUM_FABRIC_1;0x3957718d932e5c08f5183d7e354f27e92bbf1f7bad03f23300bce9190e0e9c1d;2024-05-27T09:15:39.273Z;BESU_2X;SEND;lockAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;115213 -BESU_ETHEREUM_FABRIC_1;0xc23ab99376855ab985aa8964ce2da5a6d7ff4539c34b33daf54d927396547808;2024-05-27T09:15:40.109Z;BESU_2X;SEND;deleteAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;114379 -BESU_ETHEREUM_FABRIC_1;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-27T09:15:46.123Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;129786009655382;0;108366 -BESU_ETHEREUM_FABRIC_1;0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9;2024-05-27T09:15:51.381Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;41156218131450;0;103109 -BESU_ETHEREUM_FABRIC_1;0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c;2024-05-27T09:15:56.367Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955165049120;0;98124 -BESU_ETHEREUM_FABRIC_1;88ab44939551ea52c8abdb2779163278a07713bf397b215cce2dac9be478b08a;2024-05-27T09:16:03.019Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;966c0c39-b39a-49de-bf00-82b62444615a,10,owner1;user1;0;0.00018;91472 -BESU_ETHEREUM_FABRIC_1;04a5f33f1461b1f446086dcd435cedfb7f690b35b4359f87724a18755fd12bbb;2024-05-27T09:16:08.577Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;966c0c39-b39a-49de-bf00-82b62444615a,owner2;user1;0;0.00018;85916 -BESU_ETHEREUM_FABRIC_1;5f25721a387592f30d493aa455025aff308c7009b7b05d45949006e7e964094f;2024-05-27T09:16:14.245Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;966c0c39-b39a-49de-bf00-82b62444615a;user1;0;0.00018;80250 -BESU_ETHEREUM_FABRIC_2;0x9198a615db48db3c018bef59d47dfb93568dbbf6d04a56acb595db24d192fc06;2024-05-27T09:16:15.243Z;BESU_2X;SEND;createAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;79254 -BESU_ETHEREUM_FABRIC_2;0x1451b68f1f59a5425cb442075c2a8504ad08d0fe605180ee3a02e9019f82c3f3;2024-05-27T09:16:17.305Z;BESU_2X;SEND;lockAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;77194 -BESU_ETHEREUM_FABRIC_2;0x0801c6aecd6d105d0249d51868050395cad9b5e17f56ee4654c2ec47cbf49f82;2024-05-27T09:16:18.359Z;BESU_2X;SEND;deleteAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;76141 -BESU_ETHEREUM_FABRIC_2;0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708;2024-05-27T09:16:26.125Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103394573872490;0;68378 -BESU_ETHEREUM_FABRIC_2;0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2;2024-05-27T09:16:31.184Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538215602250;0;63331 -BESU_ETHEREUM_FABRIC_2;0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16;2024-05-27T09:16:36.363Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079554985280;0;58154 -BESU_ETHEREUM_FABRIC_2;ec20bf8b8418971e43685ba2b6bee62c845dd272d901af92a158d21e982a8d47;2024-05-27T09:16:43.981Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;966c0c39-b39a-49de-bf00-82b62444615a,10,owner1;user1;0;0.00018;50536 -BESU_ETHEREUM_FABRIC_2;d68666a62b997c8527718aba35b7fddef109dafee2273133b618847e2a8074c6;2024-05-27T09:16:51.969Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;966c0c39-b39a-49de-bf00-82b62444615a,owner2;user1;0;0.00018;42549 -BESU_ETHEREUM_FABRIC_2;5cbf80fe64c979d92f0e35f40bd130a05772d36268c2ee3f73d2aad463359978;2024-05-27T09:16:59.118Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;966c0c39-b39a-49de-bf00-82b62444615a;user1;0;0.00018;35400 -BESU_ETHEREUM_FABRIC_3;0x4985326b838f116fa612b9c1d81335ea4ee957a20c54a44ae42579ec4710a99a;2024-05-27T09:17:00.202Z;BESU_2X;SEND;createAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94,10;0x627306090abab3a6e1400e9345bc60c78a8bef57;91441;0.00018;34317 -BESU_ETHEREUM_FABRIC_3;0x967eb4286a012277a74270dce024c9c0872739c0733f8211b206ccf16432a122;2024-05-27T09:17:01.250Z;BESU_2X;SEND;lockAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;30543;0.00018;33269 -BESU_ETHEREUM_FABRIC_3;0x7d6c1bdfaafd4b5f4799450da507b517603d2963291649ec832d191944dca56d;2024-05-27T09:17:02.477Z;BESU_2X;SEND;deleteAsset;024505e9-8b77-4fcf-a9f1-63d2fe838f94;0x627306090abab3a6e1400e9345bc60c78a8bef57;20705;0.00018;32051 -BESU_ETHEREUM_FABRIC_3;0x8f63925f9c4e05884840fc15df27f41cd75d97a13a3aa3a34ed8497cde5af522;2024-05-27T09:17:06.542Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;94325755557346;0;27986 -BESU_ETHEREUM_FABRIC_3;0x972b7d58b0cd9e3e603c577f2cb4fabd8a64ed0c070d55950bf403e27f446390;2024-05-27T09:17:11.777Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30920461153200;0;22752 -BESU_ETHEREUM_FABRIC_3;0x5bcfdbf3d6b1baf09446a581afb9b9dd76298639f7bda9db71f6a60d8d55ea15;2024-05-27T09:17:16.969Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31716906746400;0;17563 -BESU_ETHEREUM_FABRIC_3;0e1e5982732b3426ca1feb4a0585d48adc3ee67706c7c92289ace06d949a4fad;2024-05-27T09:17:22.893Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;966c0c39-b39a-49de-bf00-82b62444615a,10,owner1;user1;0;0.00018;11640 -BESU_ETHEREUM_FABRIC_3;b925b6b6e68a07c12be5fe01a58869f844cd73d88254f3b427a65ac52eae7a32;2024-05-27T09:17:28.417Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;966c0c39-b39a-49de-bf00-82b62444615a,owner2;user1;0;0.00018;6116 -BESU_ETHEREUM_FABRIC_3;b99476b1334e81083ae88ae4991d72af4ca91adb63022ee8e37cde0beae10621;2024-05-27T09:17:34.473Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;966c0c39-b39a-49de-bf00-82b62444615a;user1;0;0.00018;60 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv deleted file mode 100644 index cf9950b9c0..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-3-unmodeled-events.csv +++ /dev/null @@ -1,4 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -ETHEREUM_MONITORING;0xc0730eff8158a22803060879fd555b04d3940733b58f3b5d73698ea693e5d8de;2024-05-17T14:52:01.098Z;ETHEREUM;SEND;createAsset;asset2,10;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103396064181676;0;10250 -ETHEREUM_MONITORING;0x319fc6d76fc7216599060623d0613fea997d164b8c7fbab08635190556d12162;2024-05-17T14:52:06.257Z;ETHEREUM;SEND;lockAsset;asset2;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538645761600;0;5091 -ETHEREUM_MONITORING;0x6ea284a62910fd25c30722aa7b20b325cc5f4304f25cd10d0186041b39e7e95e;2024-05-17T14:52:11.337Z;ETHEREUM;SEND;deleteAsset;asset2;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079943209040;0;13 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv index 634807ddfc..b659bd964c 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-ethereum-4-events.csv @@ -1,5 +1,5 @@ caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -ETHEREUM_MONITORING;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-27T09:33:21.366Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;135530010970738;0;15298 -ETHEREUM_MONITORING;0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72;2024-05-27T09:33:26.632Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42814248832950;0;10033 -ETHEREUM_MONITORING;0xdddabe51b7894122aed2ec29891c8de590b727cfbea99dbdabc55feb1ba04718;2024-05-27T09:33:31.653Z;ETHEREUM;SEND;isPresent;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33945972851475;0;5012 -ETHEREUM_MONITORING;0x154f57cfdd1c482a246377a80ddcaaa1e14d92678882a119cb0cdf96ebb83d7e;2024-05-27T09:33:36.658Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955256397680;0;7 \ No newline at end of file +ETHEREUM_MONITORING;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-07-03T14:46:35.443Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;135530010970738;0;1 +ETHEREUM_MONITORING;0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72;2024-07-03T14:46:40.391Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42814248832950;0;0 +ETHEREUM_MONITORING;0xdddabe51b7894122aed2ec29891c8de590b727cfbea99dbdabc55feb1ba04718;2024-07-03T14:46:45.348Z;ETHEREUM;SEND;isPresent;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33945972851475;0;0 +ETHEREUM_MONITORING;0x154f57cfdd1c482a246377a80ddcaaa1e14d92678882a119cb0cdf96ebb83d7e;2024-07-03T14:46:50.435Z;ETHEREUM;SEND;deleteAsset;asset1,owner1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;40955256397680;0;0 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv index ad9d3bffc0..798899d3ba 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-fabric-4-events.csv @@ -1,5 +1,5 @@ caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -FABRIC_MONITORING;4b21851915d609fc0541037a569ce502ac9b87a415664755494422e4e8cb30dc;2024-05-27T09:31:47.774Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231,10,owner1;user1;0;0.00018;16298 -FABRIC_MONITORING;e26794398de369ba8ee2eb97235ef5d1dceceb8fda57413732a5550bf5cc420f;2024-05-27T09:31:53.120Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231,owner2;user1;0;0.00018;10952 -FABRIC_MONITORING;fa3bbd9ec8cb372e09211e057074fcf03f0c5f178c7ae098fbd3ead0956d17a4;2024-05-27T09:31:58.521Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231,owner1;user1;0;0.00018;5552 -FABRIC_MONITORING;677867c703fa64b1a4651a5c661ccd4cf2ca84259a64eae534d88d7cc3cafe48;2024-05-27T09:32:04.061Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;78fffaa3-06ed-4daa-bedc-8f7d72992231;user1;0;0.00018;12 \ No newline at end of file +FABRIC_MONITORING;33542c28f8cd5e7c3cf2e36090365d2bb4f58a57f0af5641edcd73302363814b;2024-07-03T14:44:24.035Z;FABRIC_2;FabricContractInvocationType.SEND;CreateAsset;2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939,10,owner1;user1;0;0.00018;0 +FABRIC_MONITORING;897772958c7ff6f916e9898599c89d9423e494a9bcb973e3081708ccbae22228;2024-07-03T14:44:29.269Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939,owner2;user1;0;0.00018;0 +FABRIC_MONITORING;33d6f0d65caaab85bedd667476c5618f0b9f806ff252a4de28ddabfad8404357;2024-07-03T14:44:34.487Z;FABRIC_2;FabricContractInvocationType.SEND;TransferAsset;2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939,owner1;user1;0;0.00018;0 +FABRIC_MONITORING;479b9bd62032c1e0f3792b3a5fe04a4b501313aa693b59193e268b74575f8d62;2024-07-03T14:44:39.720Z;FABRIC_2;FabricContractInvocationType.SEND;DeleteAsset;2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939;user1;0;0.00018;0 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv b/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv deleted file mode 100644 index 4299f0a23d..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/csv/example-dummy-periodic-update.csv +++ /dev/null @@ -1,29 +0,0 @@ -caseID;receiptID;timestamp;blockchainID;invocationType;methodName;parameters;identity;cost;carbonFootprint;latency -CCMODEL_UPDATE;0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b;2024-05-27T09:40:42.941Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;135530010970738;0;4921 -CCMODEL_UPDATE;0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72;2024-05-27T09:40:49.281Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42814248832950;0;8580 -CCMODEL_UPDATE;0x5121ac2440d82d580bc30c9e445365871a0bbd7310580bd7e7617d66abdc0d33;2024-05-27T09:40:52.233Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;42451616646000;0;5628 -CCMODEL_UPDATE;0x3be2b1b2c1bec476f0d37cb6990b2ae7b54804a166262aef639ba6993d64e896;2024-05-27T09:40:57.247Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;120363911294810;0;615 -CCMODEL_UPDATE;0x1ae44035a0580491f47933802ca3f99c11ca524b9c2add9169b67079d1085d56;2024-05-27T09:41:02.421Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;38436488700900;0;5440 -CCMODEL_UPDATE;0xb64d1e48f4f69bf930950bc13d9c05513642af08dbdd5079f428db0fc17c839d;2024-05-27T09:41:07.408Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;38500479768000;0;454 -CCMODEL_UPDATE;0xb299fbed0ff28d4b29404142d8bee7b33a6ac2d480f22af3fdac030e9197e955;2024-05-27T09:41:12.385Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;110203266779032;0;5476 -CCMODEL_UPDATE;0xf88b5da58aa42c36a798cbbb773da6650e27dd55ab9a870f542e899b827720ba;2024-05-27T09:41:17.387Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;35503574548200;0;475 -CCMODEL_UPDATE;0x620e72017b4bc4689c11d329504a8ea73729ed3f4eae2c73c7d2ad440f1d3463;2024-05-27T09:41:22.263Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;35853385067280;0;5598 -CCMODEL_UPDATE;0xaaf8cacf1951a808f769e87a32304952d9bbdb3eeb2e56fde12959c5d775b49f;2024-05-27T09:41:27.170Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;103396064181676;0;692 -CCMODEL_UPDATE;0xb205b16fac624e125354b93d9d9b542b6dbbf84816c6ed32a9e8ddd0c89cde50;2024-05-27T09:41:32.195Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;33538645761600;0;5666 -CCMODEL_UPDATE;0x621becfe651fee97f77384c62b1730c6c0f364bf40f4be96fcc871c25d2410bc;2024-05-27T09:41:37.087Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;34079943209040;0;775 -CCMODEL_UPDATE;0xa9ba355c1b6c24475762f8d85e3fe31373488d4ed5767d85cdd8bad701b635d3;2024-05-27T09:41:42.152Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;98835525300660;0;5710 -CCMODEL_UPDATE;0xadf19829cc25a097e457ed78fe9430fb0d306820ed91adbb94e538a291535849;2024-05-27T09:41:47.039Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;32222226180300;0;823 -CCMODEL_UPDATE;0x39d64d6a97e476d64ebee18f8769fea61f8619ada119c58264dab2a04f8b11be;2024-05-27T09:41:52.133Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;32891811777840;0;5728 -CCMODEL_UPDATE;0xebfd45ff34e3ff7bd33d3c9bb5379877b7b0fd08e4357045dac805ed19cee100;2024-05-27T09:41:57.039Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;95780155968798;0;823 -CCMODEL_UPDATE;0xe280efdc199b8635b392024bf969d7a78f7de3aaef64499c01dc240c425da1c2;2024-05-27T09:42:02.152Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31340280308100;0;5709 -CCMODEL_UPDATE;0x96129a0b72d96b2bb3c7d359cf0d7d444f814b18614889b07a391af1d12314f2;2024-05-27T09:42:07.066Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;32095813562880;0;796 -CCMODEL_UPDATE;0xd3d2045c8d79914a43bf0d0fa48233cb0c6d3d8d4c623767badeb6f5157e9876;2024-05-27T09:42:12.164Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;93733186606720;0;5697 -CCMODEL_UPDATE;0xd5d911f6b56aaa9539605c428404558111b31701753843d7e37b8732967b721b;2024-05-27T09:42:17.148Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30749413489950;0;714 -CCMODEL_UPDATE;0xcbc1a5c07d93f980362adaf84f66db3127e7d5745cca0117cbf9f05078d6b03b;2024-05-27T09:42:22.248Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31562528045760;0;5613 -CCMODEL_UPDATE;0x9cd9db21f05539f6dff370095d8d1763f0914b5d197405d30fc941d8c090c678;2024-05-27T09:42:27.135Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;92361802785924;0;727 -CCMODEL_UPDATE;0x6adbc6ffea1acadabe5c67cef94a855383c38b58a5b8ff296b48e399f30a4ad3;2024-05-27T09:42:32.319Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30353557405200;0;5542 -CCMODEL_UPDATE;0x96ecf2aa1876492afddccf5e2a0083e21b1c85b24550fc0e4c7437699729ce18;2024-05-27T09:42:37.207Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;31205249014320;0;655 -CCMODEL_UPDATE;0xcf6652ab02e110b03816ba739c83a600424e9ee0611c34544ca4a239081018be;2024-05-27T09:42:42.165Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;91443032771380;0;5696 -CCMODEL_UPDATE;0x76ea903dabc8a71125125ee782e22d06cebb3923cdeb0186236186145b299c2e;2024-05-27T09:42:47.055Z;ETHEREUM;SEND;lockAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30088350292200;0;806 -CCMODEL_UPDATE;0x60fb968f395815fc788974d19ccb11fa5e361b74e9d9ae1bd2224b8f03be395f;2024-05-27T09:42:52.213Z;ETHEREUM;SEND;deleteAsset;asset1;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;30965886922560;0;5648 -CCMODEL_UPDATE;0x13b53c3379a666e719caa33ea0161d08594e663f90e268f25017c2e7068290c8;2024-05-27T09:42:57.111Z;ETHEREUM;SEND;createAsset;asset1,5;0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0;90827495125774;0;751 \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb deleted file mode 100644 index 460facfb36..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process mining-checkpoint.ipynb +++ /dev/null @@ -1,286 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-2fed1eb2-9dc1-47ec-b7f2-f355b444c690.json']\n", - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" - ] - } - ], - "source": [ - "import os\n", - "path = os.getcwd()\n", - "parent = os.path.dirname(path)\n", - "\n", - "\n", - "# Change path if necessary\n", - "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", - "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", - "\n", - "import sys\n", - "\n", - "if __name__ == '__main__':\n", - " print(sys.argv)\n", - " print(file_path)\n", - "\n", - "\n", - "\n", - "# import sys\n", - "\n", - "# accept command line arguments\n", - "# inputArg1 = sys.argv[1]\n", - "\n", - "#print('inputArg1: ',inputArg1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "# uncomment if problems with dependencies\n", - "#%pip install pm4py\n", - "#%pip install pandas\n", - "import pm4py\n", - "import datetime as dt\n", - "import time\n", - "import pandas\n", - "\n", - "# process mining\n", - "from pm4py.algo.discovery.alpha import algorithm as alpha_miner\n", - "from pm4py.algo.discovery.inductive import algorithm as inductive_miner\n", - "from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner\n", - "from pm4py.algo.discovery.dfg import algorithm as dfg_discovery\n", - "\n", - "# viz\n", - "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", - "from pm4py.visualization.process_tree import visualizer as pt_visualizer\n", - "from pm4py.visualization.heuristics_net import visualizer as hn_visualizer\n", - "from pm4py.visualization.dfg import visualizer as dfg_visualization\n", - "\n", - "from pm4py.objects.conversion.process_tree import converter as pt_converter\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "def import_csv_original(file_path):\n", - " event_log = pandas.read_csv(file_path, sep=';')\n", - " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", - " return event_log\n", - "\n", - "def getStartActivities(event_log):\n", - " s = pm4py.get_start_activities(event_log)\n", - " print(\"Start activities: {}\\n\".format(s))\n", - " return s\n", - "def getEndActivities(event_log):\n", - " e = pm4py.get_end_activities(event_log)\n", - " print(\"End activities: {}\\n\".format(e))\n", - " return (e)\n", - "\n", - "def getAttributeFromLog(event_log, attr):\n", - " entries = pm4py.get_event_attribute_values(event_log,attr)\n", - " print(\"Entries: {}\\n\".format(entries))\n", - " return entries" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" - ] - }, - { - "ename": "FileNotFoundError", - "evalue": "[Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[4], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(file_path)\n\u001b[0;32m----> 2\u001b[0m log \u001b[38;5;241m=\u001b[39m \u001b[43mimport_csv_original\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m log_other_model \u001b[38;5;241m=\u001b[39m import_csv_original(file_path_other_model)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(log)\n", - "Cell \u001b[0;32mIn[3], line 2\u001b[0m, in \u001b[0;36mimport_csv_original\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mimport_csv_original\u001b[39m(file_path):\n\u001b[0;32m----> 2\u001b[0m event_log \u001b[38;5;241m=\u001b[39m \u001b[43mpandas\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msep\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m;\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m event_log \u001b[38;5;241m=\u001b[39m pm4py\u001b[38;5;241m.\u001b[39mformat_dataframe(event_log, case_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcaseID\u001b[39m\u001b[38;5;124m'\u001b[39m, activity_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmethodName\u001b[39m\u001b[38;5;124m'\u001b[39m, timestamp_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtimestamp\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m event_log\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:912\u001b[0m, in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[0m\n\u001b[1;32m 899\u001b[0m kwds_defaults \u001b[38;5;241m=\u001b[39m _refine_defaults_read(\n\u001b[1;32m 900\u001b[0m dialect,\n\u001b[1;32m 901\u001b[0m delimiter,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 908\u001b[0m dtype_backend\u001b[38;5;241m=\u001b[39mdtype_backend,\n\u001b[1;32m 909\u001b[0m )\n\u001b[1;32m 910\u001b[0m kwds\u001b[38;5;241m.\u001b[39mupdate(kwds_defaults)\n\u001b[0;32m--> 912\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:577\u001b[0m, in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m 574\u001b[0m _validate_names(kwds\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnames\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m))\n\u001b[1;32m 576\u001b[0m \u001b[38;5;66;03m# Create the parser.\u001b[39;00m\n\u001b[0;32m--> 577\u001b[0m parser \u001b[38;5;241m=\u001b[39m \u001b[43mTextFileReader\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m chunksize \u001b[38;5;129;01mor\u001b[39;00m iterator:\n\u001b[1;32m 580\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m parser\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1407\u001b[0m, in \u001b[0;36mTextFileReader.__init__\u001b[0;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[1;32m 1404\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moptions[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m kwds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 1406\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles: IOHandles \u001b[38;5;241m|\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m-> 1407\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_engine \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_make_engine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mengine\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1661\u001b[0m, in \u001b[0;36mTextFileReader._make_engine\u001b[0;34m(self, f, engine)\u001b[0m\n\u001b[1;32m 1659\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m mode:\n\u001b[1;32m 1660\u001b[0m mode \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m-> 1661\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;241m=\u001b[39m \u001b[43mget_handle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1662\u001b[0m \u001b[43m \u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1663\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1664\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1665\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcompression\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1666\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemory_map\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmemory_map\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1667\u001b[0m \u001b[43m \u001b[49m\u001b[43mis_text\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mis_text\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1668\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding_errors\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstrict\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1669\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstorage_options\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1670\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1671\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1672\u001b[0m f \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles\u001b[38;5;241m.\u001b[39mhandle\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/common.py:859\u001b[0m, in \u001b[0;36mget_handle\u001b[0;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[1;32m 854\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(handle, \u001b[38;5;28mstr\u001b[39m):\n\u001b[1;32m 855\u001b[0m \u001b[38;5;66;03m# Check whether the filename is to be opened in binary mode.\u001b[39;00m\n\u001b[1;32m 856\u001b[0m \u001b[38;5;66;03m# Binary mode does not support 'encoding' and 'newline'.\u001b[39;00m\n\u001b[1;32m 857\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mencoding \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mmode:\n\u001b[1;32m 858\u001b[0m \u001b[38;5;66;03m# Encoding\u001b[39;00m\n\u001b[0;32m--> 859\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[1;32m 860\u001b[0m \u001b[43m \u001b[49m\u001b[43mhandle\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 861\u001b[0m \u001b[43m \u001b[49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 862\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 863\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 864\u001b[0m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 865\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 866\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 867\u001b[0m \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[1;32m 868\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mopen\u001b[39m(handle, ioargs\u001b[38;5;241m.\u001b[39mmode)\n", - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'" - ] - } - ], - "source": [ - "print(file_path)\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "print(log)\n", - "print(\"lenght is\", len(log))\n", - "print(log_other_model)\n", - "print(\"lenght is\", len(log_other_model))\n", - "startAct = getStartActivities(log)\n", - "endAct = getEndActivities(log)\n", - "timestamps = getAttributeFromLog(log, \"timestamp\")\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Install graphviz, if not done already\n", - "Open a terminal window and intall graphviz with:\n", - "`sudo apt install graphviz`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "#Another way to discover the tree\n", - "# # create the process tree\n", - "#tree = inductive_miner.apply_tree(log)\n", - "\n", - "# viz\n", - "#gviz = pt_visualizer.apply(tree)\n", - "#pt_visualizer.view(gviz)# convert the process tree to a petri net\n", - "\n", - "start_time = time.perf_counter()\n", - "process_tree = pm4py.discover_process_tree_inductive(log)\n", - "print(process_tree)\n", - "end_time = time.perf_counter()\n", - "pm4py.view_process_tree(process_tree)\n", - "\n", - "parameters = {pn_visualizer.Variants.FREQUENCY.value.Parameters.FORMAT: \"png\"}" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "dfg, start_activities, end_activities = pm4py.discover_dfg(log)\n", - "pm4py.view_dfg(dfg, start_activities, end_activities)\n", - "\n", - "map = pm4py.discover_heuristics_net(log)\n", - "print(map)\n", - "pm4py.view_heuristics_net(map)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "# heuristics miner\n", - "net, im, fm = heuristics_miner.apply(log)\n", - "\n", - "# viz\n", - "gviz = pn_visualizer.apply(net, im, fm)\n", - "pn_visualizer.view(gviz)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.10" - }, - "vscode": { - "interpreter": { - "hash": "994fd3bf715f7d00910c6929cedf6117267fec036ef9d2716f71f2b8e3dc9b3e" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb deleted file mode 100644 index c6c5ef6fd5..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/.ipynb_checkpoints/process_conformance-checkpoint.ipynb +++ /dev/null @@ -1,186 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-85cfe7fb-4cec-4b85-affb-ff95bb09e084.json']\n", - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures\n", - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" - ] - } - ], - "source": [ - "import os\n", - "# uncomment if problems with dependencies\n", - "# %pip install pm4py\n", - "# %pip install pandas\n", - "import pm4py\n", - "import datetime as dt\n", - "import time\n", - "import pandas\n", - "\n", - "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", - "\n", - "path = os.getcwd()\n", - "parent = os.path.dirname(path)\n", - "\n", - "# Change path if necessary \n", - "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", - "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", - "\n", - "import sys\n", - "\n", - "if __name__ == '__main__':\n", - " print(sys.argv)\n", - " print(parent)\n", - " print(file_path)\n", - "\n", - "\n", - "\n", - "# import sys\n", - "\n", - "# accept command line arguments\n", - "# inputArg1 = sys.argv[1]\n", - "\n", - "#print('inputArg1: ',inputArg1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "def import_csv_original(file_path):\n", - " event_log = pandas.read_csv(file_path, sep=';')\n", - " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", - " return event_log\n", - "\n", - "def getStartActivities(event_log):\n", - " s = pm4py.get_start_activities(event_log)\n", - " print(\"Start activities: {}\\n\".format(s))\n", - " return s\n", - "def getEndActivities(event_log):\n", - " e = pm4py.get_end_activities(event_log)\n", - " print(\"End activities: {}\\n\".format(e))\n", - " return (e)\n", - "\n", - "def getAttributeFromLog(event_log, attr):\n", - " entries = pm4py.get_event_attribute_values(event_log,attr)\n", - " print(\"Entries: {}\\n\".format(entries))\n", - " return entries\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" - ] - } - ], - "source": [ - "\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "\n", - "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", - "\n", - "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", - "\n", - "print(aligned_traces)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAABe0AAACUCAIAAACBVZWTAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdeTxU/fcA8DtjX4ZESlS28JRIVKSNyNIuS7YopZ1SoUeLlKJF2hSpLNlVUp42WcrWRosKxVMioZKyLzO/P+7vO9/5WsaY7c7ovP/olTt3OTPjuHPPfO754EgkEgIAAAAAAAAAAAAAOB4e6wAAAAAAAAAAAAAAAE2gjgMAAAAAAAAAAADAHaCOAwAAAAAAAAAAAMAdeLEOAAAAAAAAAAAAwEZVVVVeXh7WUbCKtbU11iEA5sNBn2MAAAAAAAAAAH+mxMREGxsbrKNgFbjeH5LgvioAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO7Ay57DdHR0fPjwobS0tKKior6+vqmpqbm5ubm5WUJCQkREREREZPTo0SoqKioqKmPGjGFPSABwNcgpAKj4+fNnWVlZSUnJp0+fmpubGxoampqaEAQRFRVFc0ReXl5VVVVFRWXYsGFYBwsAN/n8+XNpaWlZWVlNTQ163mloaEDPO6KioiNGjFBUVFRTU1NSUuLn58c6WAAAAGBoYmEdp7Gx8eHDh5mZmZmZmcXFxV1dXTgcTlZWduTIkeTzfUVFBXr9WVVV1dDQgCAIgUDQ09MzMDAwMDDQ0dHh4eFhXYQAcBfIKQCo+Pfff9HsyMrKqqqqQhBEQEBAXl6eXLtBEKSurg6t6Xz8+LG9vR1BEDk5ublz56IJoqCggPFzAIDzdHV1PX/+HE2uvLw8tCQ6fPhwWVlZ9LwjISFRW1uL1nRqa2urq6tJJBIvL6+6urqBgYGhoeHs2bPFxMSwfh4AAADA0IEjkUjM3WNHR0daWlpkZOTt27e7uromTZpkYGAwY8YMdGiAkJBQfxvW19eXlpa+efPm4cOHGRkZX79+HTlypK2t7cqVK7W0tJgbJABcBHIKACpqa2vj4uIiIyNfvHghLCysr68/d+7cKVOmqKiojBs3rr/CZXd396dPn8rKygoLCzMzM3Nzc1tbW6dMmbJy5UpbW1tpaWk2PwsAOFBhYWFUVFRcXFxdXZ2MjAxakZkwYYKampqUlFR/W7W2tpaVlZWWlubl5WVmZr5+/ZqPj8/c3NzJycnc3BwG6QAAOFBiYqKNjQ3WUbAK06/3AUcgMU9dXd3ff/89fPhwPB5vbGwcFRVVX19P997evHmzf//+8ePHIwiiqal55cqVzs5OJkYLAOeDnAKAiqdPn1pYWPDy8oqLi69ZsyYjI6O9vZ2+XbW1tT148GD16tViYmK8vLzLly9//vw5c6MFgFt0dnZGR0draGggCKKionLgwIF3797Rvbe6urrIyMh58+bh8XhJSUkfHx9GTmQAAMAKCQkJGF+TsxLWry5gCeaMx/n69WtAQMCFCxdERETc3NxWrVolKyvL+G5R+fn5ISEh8fHx48aN8/b2dnZ25uVlU1sfALACOQUAFXl5eX5+fnfv3tXR0fHw8Fi6dCmVgWmD0trampKSEhQU9OzZM1NT07179+rp6TFlzwBwvq6urkuXLgUGBlZWVtra2m7YsIGJv/9VVVURERGnTp1qaWlxdXX18vIaOXIks3YOAAA0IpFI3759+/79+7dv39D/1NXVvX379sqVK1iHxipMud4HnIbROk53d/fZs2f37t0rKiq6c+fOtWvXCgsLMys4ShUVFQEBAZGRkRMmTAgJCYEP1mCogpwCgIra2lpPT8/o6OhZs2b9/fffJiYmLDrQnTt3/P39c3NznZycAgMD4U4rMOTl5uZu3LixpKRk1apVnp6eioqKrDhKS0tLWFjYsWPHmpubDxw4sGHDBujaBgBgll+/ftXV1ZHLNOi/vZdQXv8SCARpaWlxcfHCwkIMI2cpqOMMSQzVcYqKilxcXN68ebNjxw4fHx8WXW1SKi0t3bx584MHD1xcXIKCgggEAquPCAA7QU4BQEVYWJiXlxeBQAgODrawsGDDEa9evbp169bm5uYjR46sWbOGDUcEgP1+/fq1bdu2y5cvGxsbnzlzBr39lqWam5sPHjwYFBSkrq5+8eLFyZMns/qIAACu1tra2kChpqbmy5cvPZZUVVV1dHSQNxEUFJSgMHr0aBkZmR5LZGVlBQQEEOiPA7gQ/XWcs2fPbt++XU9P7/z586qqqswNi7qEhAR3d3cxMbGEhARo1wqGDMgpAPrT2Ni4Zs2a69eve3h47Nu3D518ij2ampp8fX1PnDhhZWUVFhYG0+6AIaawsNDGxqapqenUqVNWVlbsPHRJScm6deuePHkSFBS0YcMGdh4aAMA5GhoaehdlKJfU1NSgc7CSSUhI9C7K9F5CewxQxwFch546TlNTk7Ozc0pKyp49e/bs2YPH41kRGXU1NTX29vb5+fnBwcHr1q1jfwAAMBHkFABUFBUVWVlZNTc3x8TEGBoaYhJDenq6g4MDgUBITk7W1NTEJAYAmC4kJMTDw2PmzJlXrlwZNWoU+wPo7u728/M7ePCgpaXlpUuX2FmiBQCwGjqIpndRhvLH2tpaIpFI3gQdRNNnUYa8ZNSoUUz/qAx1HMB1Bl3Hqa+vNzc3r6ysjI+PNzAwYFFYtOju7t6/f//Bgwe9vb39/f1xOByGwQBAN8gpAKjIyMhYunSpjo5OXFwctl1Ra2pqbG1ti4qKUlJSsE1VABhHIpG8vb2PHj26b9++3bt3Y9uk5sGDB7a2tgoKCmlpaVRmNAcAcAjyXU593t+ELqmvr+/q6iJvQnmXU48yDflHaWlprGbegDoO4DqDq+N8+vTJxMSkvb397t27KioqrAuLdtHR0S4uLra2tuHh4Xx8fFiHA8DgQE4BQEVKSoqtra25uXlMTIygoCDW4SAdHR1OTk7Xrl2Ljo62trbGOhwA6NTd3b1hw4bLly+HhoauXr0a63AQBEEqKipMTExIJNLdu3eVlJSwDgeAPxSr29BwLKjjAK4ziJJndXX1nDlzhg0blpWVhcng2z45OjoOHz7c2tq6u7s7OjoaRhAALgI5BQAVycnJK1as2LRp04kTJzC52bA3fn7+mJgYNzc3Ozs7Hh6e5cuXYx0RAINGJBKdnJxSUlJSU1PNzMywDuf/KSoqPnz40NTUdN68ebm5ubKyslhHBMBQw3gbGkVFRQbb0AAAmIXW8TiNjY1z5szp6up6+PDh8OHDWR3WYGVkZJibm7u4uJw9exbrWAaWn58fFBSEdRRDWVJSEtYhDAxyiokgp2inp6fn4eGBdRQDy8zMNDc3X716NWf+Bm7bti0kJOTWrVvGxsZYxzKwoKCg/Px8rKMY+jw8PPT09LCOYmDbt28/c+ZMamqqiYkJ1rH09P3799mzZ+NwOM48MwLAmbioDQ3HgvE4gOvQNB6nra3N3Ny8oaEhNzeXM0+rhoaGERER9vb28vLyO3fuxDqcAXz+/Dk5OdnS0hLrQIagqqqqgoICrKMYGOQUc0FO0YgrsgNBkBcvXixdunTZsmWnT5/GOpa+HT9+vKamxtLS8uHDh5zf9jg/P7+goEBXVxfrQIay5ORkKysrzq/jBAYGBgcHx8fHc2ARB0EQSUnJO3fu6OvrL168+MGDBxx+IwYArMZ4GxpFRUWOakMDAGAWmnLYw8PjzZs3BQUFcnJyrA6IbitWrPjy5Yunp6eOjg5XdKDkijEjXIdbqumQU6wAOTUgNk8qTJ/GxkZLS0sdHZ2IiAiO/SYQj8dHRUXNnz/fysrq2bNnnD8Zua6uLiQIS3HFLagPHjz4+++/T5w4wcl/CsaMGXPnzh09PT103BDW4QDAEoy3oVFUVNTX1+e6NjQAAGYZuI6TlJR07ty52NhYNTU1NgTECA8Pj7y8PHQ+ERkZGazDAaBvkFMAULFx48ampqYrV67w8/NjHQs1/Pz8CQkJWlpaa9euTUhIwDocAAZQV1fn6Oi4fPlyNzc3rGMZwIQJE8LDw62trfX19W1tbbEOB4DBgTY0AAA2GKCO8+nTpzVr1mzevJlbzqPh4eHa2tqrV6++ffs21rEA0AfIKQCoCAsLS0hIuHfvHlfUDUeOHBkVFWViYnLx4kUXFxeswwGgXyQSycHBQUREJDw8HOtYaGJlZbV+/foNGzbo6+uPHTsW63AAQBBmtKEh3+X0x7ahAQAwywB1HHd399GjRx87dow90TBu2LBh0dHRs2bNio+PX7FiBdbhANAT5BQA/amtrfX29t6+fbuhoSHWsdDKyMho69atnp6eixcvHjFiBNbhANC32NjYBw8e5OXlcf49gGQnTpzIyMjYtm3b1atXsY4FDHHQhgYAwHWo/XG5c+fOjRs30tPTuetOyxkzZqxatWrbtm1mZmbi4uJYhwPAf0FOAUCFp6enqKjonj17sA5kcHx9fRMSEry9vS9evIh1LAD04devX56enq6urtOnT8c6lkEQFBQ8c+bM/Pnz09LSFixYgHU4gCtBGxoAwFDVbx2no6Nj48aNtra28+bNY2dATBEQEJCSkuLv73/kyBGsYwHg/0FOAUBFXl5edHR0cnKyqKgo1rEMDoFACAoKWrFiBdddJ4M/hK+vb2dnp7+/P9aBDJqxsbGVldXWrVvnz5/Px8eHdTiAs0AbGsAsHR0dNTU1WEcBwOD0W8eJjo6urq4ODAxk1pF+//6dkZHx/Pnz4uLi79+///r1S1hYWEJCYvz48dra2nPnzmXixD1SUlK7d+/evXv3zp07YaA74BBMzyl2gpwCrObn5zdr1iwLCwusA6GHtbX1yZMn/fz80tLSsI4FgP9RW1t7/vz5wMDA4cOHYx0LPY4cOaKiohITE+Ps7Ix1LIBNoA0NYJ329vaKiooP/1FSUlJaWlpTU0P56wQAV+i7jtPd3R0YGOjk5DRmzBjGj/Hw4cNTp06lpaW1tbX1tw4Oh9PX11+7dq29vT0PDw/jB3V1dT18+HBwcDA3fgEFhh7m5hQmIKcA6xQVFd27d+/OnTtYB0I/Hx+fBQsWPH/+XFtbG+tYAPivEydOiImJrVmzButA6CQvL+/g4ODv7+/o6MiUz4cAQ9CGBrATkUh88+YNWq8pLy8vKSkpKyv7+vUriURCEERAQACHw5EvTseNG/fp0ydM4wVgcPr+q5eUlFRRUfHPP/8wuPeXL19u3bo1KytrwDVJJFJOTk5OTs6BAwcCAwMZ/0pWWFh427ZtAQEBnp6e0NEDYI5ZOYUhyCnAOv7+/jo6OvPnz8c6EPqZmZlNmTIlMDAwMTER61gA+H8/f/48d+6cj4+PkJAQ1rHQz9vbOyoq6urVq9bW1ljHAvoGbWgAB8LhcC4uLk+fPuXn5yeRSJ2dnZSPtre3o//h4+NTUFDw9PTk3no3+DP1Xce5cOHCkiVLlJWV6d4vkUj09/c/cOBAj5wZ0IcPH5YvX25tbX3+/HkJCQm6A0AQZMOGDX5+fomJiWvXrmVkPwAwjvGc4gSQU4AVamtrb9y4ER0djXUgDMHhcNu3b3d2dq6vr4d7DwGHSEhI6OrqWr9+PdaBMERFRWXRokUXLlyAOg4moA0N4FI4HO7gwYMmJiaUBcQeeHl5ZWRkMjMzc3Jy2BkbAIzro45TVVWVlZV1/fp1unfa2tpqZ2eXkpJC9x4SExNfvnx5+/ZtBQUFunciLi6+ZMmS6OhouOYE2GI8pzgE5BRghZiYGGFh4SVLlmAdCKOWLVu2cePG+Pj4LVu2YB0LAAiCIJGRkRYWFlw013h/HB0draysqqqqmNhLEUAbGjDkzZ8/X19f//Hjx5Q365Hx8vIOHz48KysLqoqAG/VRx4mMjJSQkDA1NaVvj+3t7WZmZtnZ2YwFhpSWls6YMSMvL4+RUo6jo+PChQsrKioUFRUZjAcAujGYUxwFcgowXXR0tI2NDVff94ESEhJatmxZdHQ01HEAJ/jw4UNBQYGvry/WgTDBwoULJSQkYmNjPT09sY6FC0AbGgDIAgICZs2a1Xs5Ly8vgUDIzMxk5EoTAAz18ef4+vXr1tbW/Pz89O1x1apVjBdxUF+/fjU3N8/Ly6P7Bqv58+dLSkqmpKR4eHgwJSQA6MBgTnEUyCnAXBUVFS9evAgKCsI6EOaws7ObP39+ZWXl2LFjsY4F/OmuXbs2YsSIefPmYR0IE/Dz81tYWFy7du0Pr+NAGxoABoVIJH769Gn06NH19fWUvT54eHgEBATu378/YcIEDMMDgBE96zg/f/588eKFj48PfbsLDQ2Ni4tjOKr/Kikp2bRpU2xsLH2b8/Lyzp07NzMzE645AVYYzClOAzkFmCszM1NYWHjGjBlYB8Ics2bNEhQUzMzMdHJywjoW8KfLyMiYN2/ekJnjycjI6PLly79+/aLlNrGqqipBQUEpKSk2BMYs0IYGACYikUjXr1/fu3dvSUmJqakp5UwjeDyel5f39u3blPNLWltbQwcuwF161nGysrJIJNLs2bPp2Nfnz5937tzJjKj+R1xcnI2NDd2tEwwNDb28vDo7O/n4+JgbGAC0YCSnOBPkFGCizMxMfX39IfNVsKCgoJ6eHtRxAOY6Oztzc3OHzEg3BEHmzZtHJBIfPny4cOFCKqs9efLk+PHj165d++eff4yNjdkWHhXQhgYANktPT9+1a9fz588XLFgQGxuroaGxcOHCe/fudXZ24nA4PB6fkpLS581WAHCRnnWchw8fampqSkpK0rEvPz+/379/MyOqnry9vRctWkTf6crQ0PD379+FhYXTp09nemBDRnp6urGx8evXr9XV1Wnfqrq6euzYsa6urufOneO02DgHIznFmbg0p7y9vQMDAxEEuX37NiO9imjfDyQILbKzszdu3Ih1FMxkaGh44cIFrKOg35s3b44cOZKRkVFXVzdixAglJSVTU9Ply5erqKiw4nBw9mGRZ8+eNTU1zZ07F+tAmEZSUnLSpElZWVl91nG6u7uvXbt2/Pjxx48f8/HxdXd3f/v2jdUhQRsaADhNbm7u7t27s7KyjIyMnj17NmXKFHT5oUOH0CE5OBwuOTl5aPSsBH+4nueJ169fa2lp0bGjz58/R0ZGMiOkPpSUlCQmJq5YsYKObVVUVERFRd+8ecNd15xcISoqikgkxsfHnzhxQlBQEOtwOBTdOcWxuDSnAgICnJ2d//rrL7btBxJkQD9//qyqqhpiCaKlpVVZWUnj3R+cJj4+3tnZ2d3d/eHDh7Kysg0NDVlZWTt37ty/f39bWxvW0f0XJNeAiouLCQSCsrIy1oEw0+TJk4uLi3ss/P3796VLl44ePfrlyxf0Cz90uCgjdRxoQwMA1ykoKPD3979165a+vn52dnaPgfAaGhqWlpbJyclRUVFDYH5MAJDedZzS0lL6hqFGRkZSto9iuvDwcPrqODgcTllZubS0lOkh9dDY2JiYmLh8+fLhw4ez+lgcIiIiwsrKKikp6fr167a2tliHwz5dXV2hoaFWVlbS0tIDrkx3TnEstuUUgiBRUVHTpk1TU1Njw7GY7o9NkKKios+fP5uamg7Y2xv9LVJVVWVLXGyCPp2ysjIdHR2WHujhw4ft7e2GhobMaoBSXFzs7Ozs4eFx6NAhdMnIkSNtbGwmTpw4bdo0phyCWf7Y5Lp58+aIESN0dXUHXLO0tFRFRQWHw7EhKrZRVVWlnEmjoqIiLCzs7NmzbW1t6JiX7u5u9CE8Ht9fHQfa0AAwxBQXF/v5+SUnJ+vq6j548MDQ0LDP1Q4cOGBkZGRvb8/m8ABgFRKF5uZm9I5B0uBpaGiwNE4eHp6vX7/SERiJRELb69C3Le2+fPmCIAgvL6+5uXlsbGxzc3N/ayYkJPR45ftz586d6dOnCwoKysnJLV++vKCggEQinT59Gn1NTp8+vX79enQyLxsbG3STmzdvamtrCwgISEtLr1u3rrGxEV1eX1+/Y8cOJSUlAQEBTU1NynfZy8uL8qUeN24c9V2hcnJyNDQ0ysvLEQQxNjbuEfmHDx8WL14sKSkpKiq6ZMmS/Px86sv7O1x/sTH+2jIC/V6ah4dn3rx5ERERPV4ZSozkFCdjT06RSCS0BZ26uvrRo0crKyv7W43G9/3du3cIgty+fZu8hJxiw4cPd3Bw+PLlC+X6fSZgj/1Q3tYRFxdH3pYzE8TS0tLS0nLAF4pBV65cQRCEQCC4uLhkZGR0d3f3t2ZkZKSAgEBXVxerQ2Knrq4uAQGBK1eusPpA6P19kpKSbm5u+fn5RCKxvzVpfN9tbW35+Ph+/PjR3wpw9qECQZCEhATq6zBu7dq1CILIycn5+PgUFxdTWXPhwoV2dnasjofNrl69isfjW1panj17Zmdnx8PD09/9R3x8fLNnz/bw8HByclqwYIGurq6SklKPIXI4HE5KSkpNTU1fX3/JkiUuLi7e3t7Hjh2LiIi4efNmfn5+WVkZlfM7AABzb9++dXR0xOPxGhoaiYmJWIcDhpT29vbi4uKrV68eO3Zs9+7d27Ztc3V1tbKycnZ23rRpk5eXV0BAQGRkZEFBQUNDAyYR/s+VD3px8vLly8HuhQ03ITPyCWnXrl2ampr0bUs7tI6DIAgPDw8OhxMQEFixYsXNmzc7Ojp6rEnjNefNmzfxePzu3bu/fftWXV1tZ2cnIiKCPoT2IZKXl09MTGxqajp9+jT6STolJQWHw+3Zs+fHjx8vXrxQU1MzNDREP9y7u7u7u7t/+/bt9+/fV65cERAQoPwIeP/+fQRBXr9+TV5CZVeoNWvWHDlyhEQi6enp4fH4HtfYmpqaNjY2tbW1DQ0N7u7u5Mj7W07lcL1jo4KddRwEQfB4PB6P5+PjW7Zs2dWrV1tbW3usSXdOcTj25BSJRELvuMHhcLy8vDgcTk9P79y5c9++feuxGn11HDTF/v777/r6+nfv3k2dOlVZWfnXr1+Uj/aZgJT7aWtrW7Ro0dmzZ3scizMThG11HHQUANoJW0pKatu2bU+ePOm9pp+fn6qqKqvjYb/x48cfPHiQ1UcJDAxEX2H0X1lZ2f6u7Wl83yUkJLS0tKivA2ef/jDyKYV2a9euRYdfoW+6mpra4cOHP3782HvNSZMm+fj4sDoeNnvy5AnynyFv1Bvt43A4GRmZ6dOnL1iwYOXKlR4eHv7+/uHh4devX3/06NHbt2/r6uqolJgBABzu48ePrq6uPDw8EyZMSExMpPJNBgC0+/fffy9duuTo6KikpISebfF4vJyc3KRJk3R1dY2MjKysrMzMzGbPnq2tra2oqEi+VVZaWtrU1DQwMPDJkyds+3ryf658Hj9+jCBInx8IqLt79y4zCjUD8PLyou9JBgQEKCgo0Lct7ch1HDL0Q4aoqKiDg0Nqair5TaXxmlNVVXXSpEnkH3///j18+HDy/xEEWbNmTY9NVFRU1NXVyT/evHkTQZAHDx703vmiRYvWrVtH/rH3p1Xqu2pubh42bFhVVRWJRDp79iyCIJQXLa2trQjFJ9rOzk5paWkqy6kfjpPrOGRolUFYWBh9r8nFO7pzisOxJ6dI/6njkOFwOB4eHjweb2BgEBkZSa650FfHUVVVpfytKyoqQhAkICCA/Gh/CUjeT0tLi6mp6YULF3ociGMThG11nB5t6dE/hqNHj/by8nr37h15zR07dkydOpXV8bCftra2p6cnq48SGBjYo9cGeiObsrLyvn373r9/T16Tlve9sbERQRAzMzPqq8HZpz8Iu+o4PUagoMmloaERHBxcU1NDXnPcuHFotWvIaG5uXr16Nfqs0S9R+vu4iJo1axbWIQMAmK+ystLNzU1AQEBBQSE0NHSIDekFmHj9+vXOnTsVFBQQBBESEpo3b97+/fsTExNfvnzZ+0t6St3d3RUVFXfu3AkODra1tR01ahSCIOLi4itWrEhLS+vs7GRp2P9zFkQ/nxEIBOqnxt4+fPgw2E3oQPdRCAQCiybSog5tGNTU1JSYmLh48WIZGRl3d/ecnBxatq2qqiotLaXs0SUqKvr9+3fKdXrcy1ZVVVVWVkY5OQXahvbBgwe99z98+PCysjIqR6e+q6tXr06ZMkVWVhZBEBsbGz4+voiICPLKgoKCU6dO3bVrV1JSUmtrKy8vb21tLZXlg4qcM6FnkZaWlvj4+MWLF48YMWLdunU5OTm/fv1C6MopDodVTqF/MdGpZ1etWiUpKblgwYKkpCTK2UBohKbYnDlzyEsmT54sJiaWnp6O0JaAzc3NCxYsEBcXX7NmTY+dQ4L0gP4x/PLlS1BQ0F9//aWiouLr61tRUfH79++hlx0IdgmCdl398OHDoUOHxo8fr6mpefLkya9fv9K+BxrbqcDZh3OgyfX69evt27fLysrq6emFhYX9+vVr6CWXsLAwei9hTEzMuXPnli5dKiwsjCAIHx9fn7+3dXV17A4RAMBK9fX13t7eKioqKSkpp06dKisrQ4fkYB0X4FZNTU2nTp3S1taeNGlSUlKSra1tVlZWQ0NDenr63r17raysNDQ0qM+lgMfjFRQUTExM3N3dY2Nja2pqiouLDxw4UFVVtXDhwjFjxnh4eLx//55F8f/Ptzro505RUdHB7qVHQzgWofsoBAKhsbHR2tqaufH0QGUuD/SzdX19/fnz50+dOoU2xy0rK6MyjSt6qxr1lslCQkK9Nzlz5syZM2col1dWViII8vbt2927d+fl5dXV1ZFIJARBJk+eTI44Z9AAACAASURBVP3o/e0KQZDLly87Ojqi/5eUlDQ1Nb158+ajR49mzZqFLrx79+7Bgwe3bt3q4OBgZGS0d+9e9MNxn8sHPNxgsfq9JhKJ/T2EFhQaGxsvX74cFhaGvoOfPn0aYt2vCQTCz58/Wf06IwjSo3RChjazJBKJ9+7du337NjoqITMzc86cOQN+SYvqM8UkJSXR5bQk4JYtWzQ1NZOTkx8/ftxj6i5OTpCSkhJWv3HofS59PoRec3748MHf39/Pz09SUlJWVvb79++SkpIsDYnN0IIgq1/n0tJS6q8zem3v4eEhJSU1btw46lNoiYmJSUhI1NTU0HJoOPv06cSJE8nJyXRsSLsXL170uRytcSMI8uTJkydPnmzZsqWrq6ukpKStrW0ozeeFVqZERETs7OxcXV07Ojry8/MfPHhw586dwsLC7u5ufn5+8hxS/Z0+AABc58ePH6dOnQoKChISEvL19XV3dx9Kf9kA+/348eP06dOnTp3q6OiwtrYOCgqaPXs2U2YGmDhx4sSJE7ds2VJRUXHlypWoqKhTp05ZW1vv2rVr0qRJjO+fEk0XPANiz3SkLS0tbDgKh5CSkkIQ5MePH4PdpPdg/ujo6M7OTiMjo8+fP2dlZaFDvJycnPq7AKC+KwRBPn36lJWVtXr1atx/oAPRKb8UlZCQOH78eHV1dXZ2dltb2+zZs9GelH0up344AFihzxT7/v07upyWBNy9e3dqaqqmpubKlSsp/zpBggAuZW5uXlxc/PPnz8FuCGcfgAl+fv45c+b4+fk9efLkx48fqamp69evHz9+PPooHb/JAHCd7u7uT58+PX/+PDs7Oy0tLSkp6f79+/n5+a9evaqvr8c6OiZoamoKDAxUUlI6c+aMj4/Px48fvby8oIgD6NbS0rJ37155eflTp065ubl9+vTp4sWLc+bMoVLEqa+vf/XqVV5e3v3795OSktLS0rKzs58/f15ZWUmeJLE3RUXFvXv3lpWVxcTEvHnzRlNTc9myZegHEqah/OCC3lDw/fv3nndfDQQd6cpq8+fPH2xgqLNnz0pJSdG3Le1698chQ3sWjBgxws3N7dGjR7T3x6G8ab+6ulpAQADt8IqOnOrdlUNNTc3AwIByiYaGRnx8fElJCYIgR48eJS9fsWIFZZ9adAw5ZReA/nZFIpF8fX3t7e0pH2pqapKSkhIVFW1qaiKRSDU1NZSRo7+y8fHx/S2nfrjesVGBVX8cMrRzgbi4uKur66NHj9D2CnTkFIdjT06RevXHIUO75PDx8ZmbmycmJsbExNDyvvfujzNx4kTyo7374/SXgJT7efPmjaCg4KZNm8hrcnKCYNUfhwzt5TF+/Ph9+/aVl5evW7fO0NCQ1fGw39y5czds2MDqo/Tuj9PjdSb3TKHxfX/79q2goGDv5rhBQUFiYmLo3zE4+/QHwag/DorcO0xXVzc0NLSxsXH48OHnzp1jdTxshl6XZmRkUF/ty5cv0dHRzs7OLS0t7AkMALbp7OzMzc09ePCghYXFxIkT+zsLoIYPH66rq7tq1aoLFy58+PAB69gHp6mpKTg4WFpamkAgeHl5/fz5E+uIANe7ceOGvLy8uLh4YGAguclmb+/fvw8LC1u1atX06dPRqTn7IyAgoK6uvnz5cn9//7y8vP4a4hCJxNTU1EmTJgkKCu7bt496zx3aMafPcXh4OJVnyCy2trb0PcmAgABFRUX6tqUd0/scU06X8/HjRxMTE1dXV/Sh/j5Jp6Wl8fDwHD58uL6+vr6+ftu2bRMmTGhtbW1raxsxYoSGhsabN29aW1vv3r0rLi5O+Un67du3CIIkJSXV19ePGjXq6dOn/e2KSCQqKSm9ffu2x6H9/f0RBImIiCCRSOjI/KCgoMbGxoaGBk9PT0FBwfLy8v6WU4m8z9iovGjQ55g92JNTJBb3OSbPV/Xt27eSkpJp06YpKyuTZ5mlkoA99nPixAkcDnfv3j0SicThCQJ9jtlDW1ub7sb8tGNun2NUcnKykJCQt7f3v//+29HR8fHjx4MHDwoKCkZHR6MrwNmnPwj0OWa9iooKBEGovxEADEnNzc1XrlxZuHAh2v5CVlbWysrKx8cnOjo6Ly+vvLy8trYWLWf/+PHj8+fPJSUl6enpZ8+edXNzMzIyEhERQRBk7Nix69evz83NxfrZDKC9vT00NFRGRkZERMTLy+vHjx9YRwS43tevXxcvXozD4ezt7SnPlWREIjEnJ2fdunVjxoxBEERERMTIyMjd3T0kJCQ9Pb2kpOTz58/or2JTU9PXr1/Ly8vz8vKioqJ8fHysrKzQtn0EAmHRokUxMTF9fovQ2dl5/PhxAoGgpKSUlZXF+JNizrzj+fn5A9RgmMHf35++J8ml846TSKTbt29PmzZNQEBg9OjRHh4e6CfLuLg4ypelx5T1d+/e1dXVFRAQGDlypJ2d3efPn9HlT548mTVrlqio6JgxY1xdXS0tLdHNyb/KGzduFBcXFxMT27hxY3+7omydUFRURD6ol5cXebmJiQmJRLp165axsbGkpKSYmNjMmTPJU430t5xK5H3G1h+Yd5w9uHHeccrfUvJX+uQUk5CQsLe3//LlC+UmfSbg0aNHyfvZtGnT7du3yT+OHDmSwxOEA+cdV1FRYXU87KesrMyN846j3rx54+joKCMjw8/PLysra2FhkZOTgz4EZx8qEA6bd1xDQ2PozTuOjppEO0MB8IcoLCx0dnYmEAh8fHyLFy8+f/48HSnQ3t7+6NEjX19ftEMHepLiwNHiHR0dkZGRCgoK/Pz8rq6ufV5vAzBYDx48GDVqlJKSUp/DOb99++bn56ekpIQgiIaGhp+f36NHj3pfvw+opKTk3LlzCxcu5OPjExMTW716NeXHFbKqqqqlS5fy8PD4+fl1d3fT83z+43+ufFpaWvB4/PXr1we7l5aWlj4H+jLXnTt36HuSNjY2S5cupW9b2qF1HF5eXnNz89jY2Obm5v7WZE+t4c/EzjoODw/PvHnzIiIiyCM4eqM7pzgce3KKRCJpa2sjCKKurn706FG0e26fIKdoxLY6DoIgBALBxcUlIyODylkqKipKQEBgiE0a2tXVxc/PHxMTw+oDoXc0S0pKurm55efnE4nE/tZkz/v+h2NbHQdBEDk5uf5qdmSLFi2ys7NjdTxslpycjMfjmTUiHQAOl5OTY25ujsPh0MkH0VbxjCsqKtq2bZukpKSoqOiOHTs4pFbS3d2dmJiorKzMx8fn6upaVVWFdURgKOjq6vL19eXh4bGysup9vfbly5ft27eLioqi3zi+ePGCKQetra0NDg7W1NTE4XALFizocwTcqVOnBAQEjIyMamtr6T5QzyufsWPHBgYG0rEjY2NjlhZxCAQC3WfuyZMns2GI+8+fP8PCwmipbcM1J+uw57Xt7Ow8c+YMjYlHd05xMvbkFIlEioyMpLwNpz+QUzRiz/V8YWHhjRs32tvbB1wTvfGwoqKC1SGxEzrBJBtu/cjOzr537x4tVTCo47ABe+o4qamp+fn5tKy5Y8cObW1tVsfDZocOHVJQUMA6CgBYrry8fMGCBQiC6Ovr//PPP6w4xO/fv48dOyYjIyMkJLR//34My6No6xANDQ08Hm9lZcV1fXwAx2pra7O0tBQUFDx79myPh1pbW/ft2ycoKCgjI3P8+HH0nkTmIhKJaWlpM2bMQBBk0aJFvT/rPnv2TElJSUFBge5Bpj1bUaqqqpaWltJRZ7GxsWGkTDOgxYsX09ecnEQiffjwgcoM38wiLi6+du3aITa9NOgTLy/vpk2b0PnjB0R3TnEstuUUgiArV65UU1Njw4EAE2lpaS1evBjt1UKdqqoqgiBDLEHQp8OGBJk9e7axsTF6lw34QyxatEhXV5eWNVVVVcvKykj9Tw3GjUpLS9HBbuinXqzDQRAEwQGOhPXvBf3a29sPHDigrq7+77//pqen5+TkmJmZseJAoqKi27dvr6io2L9//9GjRzU0NO7evcuKA1GXnp6uo6OzdOlSVVXVd+/eJSYmore3AMCgpqamxYsXp6en3717d+PGjZQP3b59W11d/fjx4wcOHPj33389PDzQBlLMhcPhzM3Nc3Nz79279+HDB3V1dX9//46ODvIK2traT58+lZGR0dPTo69HTc+bodTV1bOysujY0YoVK3bt2sW6Ke7c3Nzo27C0tLSpqUldXZ258QBAI7pzimNBTgFmERcXl5OTKywsNDU1xToWpikqKho7dqyYmBjWgYA/mrq6+u/fvz98+ECeh3sIKCoqampqWrVqVWdnp7i4uLa29tT/GDt2LFZRbd26VU9PD6ujgx7y8/ODg4OxjoJOHz9+XLFixevXrz09PXft2kV9LiqmEBQU3Llzp729vbe3t6mpqaOjY2hoqJCQEKuPiyBITk6Oj4/Pw4cPjYyMnj171t/8pADQ4fv37/Pnz6+pqcnOztbQ0CAvb29v9/T0PHXq1MKFCzMyMthz4jA2Nn758mVISMiePXuuXbuWkJCgrKyMPiQhIXHv3j1LS8v58+enpqYaGBgMas896zhz5sw5efLkt2/fpKSkBrUjERGR7du3e3t7D2orGpmZmU2bNo2+bTMyMggEAvx1AFihO6c4FuQUYKK5c+dmZWX9/fffWAfCNBkZGYM9EwPAdDo6OgQCITMzc8jUcb5//15cXHzjxg1TU9PS0tLnz58/f/48JyfnxIkTHR0dw4YNmzhx4syZM/X19adOnTpq1CgGD9fR0dHa2iouLj7gmnp6etbW1gweDjARl9Zxrl275uLioqio+PLlS/JlHnuMHj06Kipq2bJlq1evfvPmDeV1Jivk5+fv3r07IyPDyMjoyZMnU6dOZd2xwB+oubl5wYIFP378yM3NVVBQIC9H66Rv376Ni4tbsWIFO0Pi4+Nzd3dfunSpjY3NlClTwsLCyAGIiIikpqY6OjouWbIkIyNDR0eH9t32vK9q7ty5OBzu4cOHdITo7u6ODpJnLgEBgaCgILo3z8jImDNnDjqzAwDsx0hOcSbIKcBEBgYGubm57e3tWAfCHG1tbfn5+VDHAZjj5eXV19fPzMzEOhCmefDgAR6Pnz17Ni8v78SJE1euXHny5MmcnJwfP36gE/EoKirevHlz6dKlMjIyo0ePXrRoka+v782bN799+0bH4Z4/f66qqnrlyhUOuYELDG2BgYHLly9ftGhRTk4Om4s4ZMuWLSsqKuLl5Z06dWpOTg4rDvHq1Stra+sZM2a0t7dnZGTcv38fijiAuTo7O62srMrLy+/cuUNZxCkoKNDR0ens7CwsLGRzEYds3Lhx2dnZq1atsrW1pRz7wsfHFx0dPXPmTDMzs0G1GuhZxxEXF9fS0rp//z4dwQkKCl6+fJnp9+r7+fnR3SCjq6srKyvL0NCQuSEBQDtGcooDQU4B5jI0NGxpacnNzcU6EOZ4+PBhW1sbJAjgBIaGhuiEcVgHwhz379/X0dHpfceiiIjIzJkz3d3do6Ki3rx509DQ8OjRIy8vLwkJiaSkpMWLF48YMYJc1klPT29ubqblcM+ePauvr1+5cuWMGTNevXrFgicEAIIgSHd39/r163fv3n3x4sWoqCj23NPUH3l5+aysrLlz586fP//mzZtM3PPbt2+tra0nT55cWVmZmpqak5MDX3gAVnBxccnJyblz5w7l4JLU1FRDQ8M5c+bk5uZiVSdFCQgInDx5MjQ09NixYxs2bCCfoPn4+JKSkhQVFc3MzOrq6mjcW886DoIgFhYWSUlJlG14aKenp3f69Gk6NuyPjY3Nzp076d78zp07P378WLJkCRNDAmCwGMkpTgM5BZhLXl5+ypQpcXFxWAfCHLGxsdOmTRszZgzWgQCAWFhY1NfXp6enYx0IE3R0dFy/ft3CwmLANcXExCjLOl++fElNTXV1dUUQ5Ny5c8bGxuLi4pTDedra2vrcz+PHj/F4PDqliJaWlpubW2NjI5OfFfjjdXd329vbR0VFJScnr169GutwEARBhISEkpOT7e3tLSws4uPjGd/hv//+u27dOg0NjXfv3iUkJOTn5y9atIjx3QLQW0hISGxsbHJysra2NnlhfHz88uXLHR0dExMT6Zs0ielcXV2TkpIiIiIcHBzIpRwREZG0tDQcDufo6EgkEmnZT8/+OAiCrFy5cs+ePbdv36bvUm3Dhg21tbX79++nY9sejI2NIyMjGWk7Hx0dPWvWLEVFRcaDAYBuDOYUR4GcAkzn6Oi4b9++kydPCgsLYx0LQ1paWq5du3bo0CGsAwEAQRBESUlJT08vOjraxMQE61gYdfPmzYaGBltb28FuKCMjs2jRIvJ145cvX57/h5+f348fP/j4+MaPH6+tra2trT1z5szJkyej48rz8vK6uroQBEH/PXfuXGxsbFBQkKOjI1dPhwQ4yqZNm1JTU//555+5c+diHct/8fDwhIWFEQgEJycnCQkJuv+AVFZW+vv7X7p0SVlZ+dKlSw4ODnh8HwMImKKqqiovL49FOwcIgnB+F7BXr17t2LFjz5498+fPJy+8c+fOypUr3d3djx07hmFsvS1btuyff/4xNzffvHnzuXPn0IVSUlIJCQkzZ848fPiwj4/PwHvpczbyefPmLVu2jL6ZzFEhISEM3mC1cuXKjo4ORmJoaGgQEhK6cOECIzthhYSEhP5eecAgjn1tGc8pTgA5xe0sLS0tLS2xjqKn2tpaXl7emJgYrANhVHR0NB8fX11dHdaB9MSZ7/sQgyBIQkIC1lH0dP78eWFh4Z8/f2IdCKOWLFlibGzM3H12d3e/ffs2Kipqy5Ytenp66Pe0oqKis2fP3rJlS+9iDTqhta6u7suXL8k74cz3/U/GRZ8H9uzZw8PDc/XqVawD6RuRSFy1apWwsHBubu5gt62trfXy8hIUFBw3blxoaGhnZycrIqSEvu+AdVj9DjKosbFRWVnZ0NCwu7ubvPDx48eioqIODg5EIhHD2KhITU3l5eXdt28f5cKTJ0/y8vJmZ2cPuHnf70p8fDwPD09ZWRkjkeXm5qqoqNDxiyIuLn7x4kVGDo3y9/cXFxfnwI8vXHSO4Toc+9oyJacwBznF7Tj2en758uXa2tpYR8EQIpGopaVlZWWFdSB94Nj3fShBOPJ6vqGhQUxMLCAgAOtAGFJSUsLDw5OYmMjSo3R0dBQWFoaFha1du5ZKAwVeXl48Hr9lyxb0VMiZ7/ufjFs+D8THx+NwOKZc77BOR0eHmZnZqFGjvn79SuMm37598/LyEhISkpOTCw4ObmtrY2mEZNzyvnMjrnht3dzcpKSkampqyEtqampGjhy5cOFCNpQRGREWFobD4ShPcEQicfHixePHj29tbaW+bd/D2ywtLZWUlAIDA+mowpDNmDHj5cuXAQEBtE+3zM/Pv379+rdv3zJ+j2hzc3NwcPDmzZtpmTMSAFZjSk5hC3IKsI6Pj09hYeHdu3exDoR+aWlpRUVFXl5eWAcCwH8NGzZsw4YNQUFBLS0tWMdCv8OHDysrKy9fvpylR+Hj49PS0lq7di1ayulvTsauri4ikXju3DklJaWwsDCWhgSGqg8fPqxbt27z5s0c0hOnP3x8fAkJCWJiYra2tgN2TP/9+3dgYKCSktLFixf37dtXVlbm7u4uICDAnlDBn+z169chISFHjhwZNWoUuoRIJK5cuZJAIMTExPDy9tFGhnOsXbt2/fr1Li4uZWVl6BIcDnf27NmampojR45Q37bvOg4PD4+Xl1d0dHRlZSUjkQkKCnp5eX38+DE8PNzY2JjK66ipqenv719eXn7u3LnRo0czclBUaGhoS0vL1q1bGd8VAIxjVk5hCHIKsI6WlpaJicnBgwexDoR+hw4dWrBgAWVrPQA4gYeHR1NTU3h4ONaB0Onff/+NjY3dtWsX6zpr9PbkyRPqbSa7urq+f/++bt06BEG497QOMNHe3m5tba2srHz06FGsYxkYeiWcl5d3+PDh/tZpbm4ODAwcN27ckSNHtm7dWl5ejg7JYWec4I9FJBLXrVs3ffp0Z2dn8sIDBw48evQoMTGx9xSHHCgoKEhZWdnOzo48JY6cnNzevXsDAgIqKiqobNjvSdHBwUFOTs7T05Px4ERERFxcXO7du/fr16/8/PwLFy4EBAT4+PgcPHjw7Nmz9+7d+/79+4sXL/7++285OTnGD4cgSH19vb+//6ZNm2gfCgQAqzExp9gPcgqw2t69e3Nzc69evYp1IPRISEh4/Pjx3r17sQ4EgJ6kpaXXr19/4MCB79+/Yx0LPXbu3CkvL29nZ8fOgxYUFPQefYDH4/n4+MjlJH5+frTlf3Z2dm1tLTvDA1ztyJEj79+/T0hI4JaxKjo6OgEBAX5+fm/fvu3xUEdHR1hYmLKy8sGDB11dXcvLy319fbniyhkMGbGxsU+fPg0JCSE3NSsuLvb39z9y5IiWlha2sdFIUFAwISHh3bt3lM2Yt27dqqSkNMC03VTuubpz5w6CIP/88w9zbv9io1WrVsnIyHBgFw8UV9xnyKU4/LWFnGIRDn/fOQeH90lxcnKSk5P7/fs31oEMzq9fv2RlZdesWYN1IP3i8Pd9aEA4uE/Kr1+/Ro8e7erqinUgg4bea5mWlsbOg9bX1yMIQjlZh6Sk5NSpU9GZ9SIjIx89evTlyxd0ZU5+3/9MHP554OPHj8LCwkeOHME6kMHp7u6eNm3arFmzyP1iOzo6QkNDZWVlhYWF3dzcaG+gwyIc/r5zNU5+bbu7uydOnOjk5EReQiQS586dq6OjQ9nwmCv4+/sLCQlVVFSQl1y/fh2Hw7169aq/TajdMGZiYrJs2bJt27YZGBhwyHTrtMjNzY2IiEhISIAuHoDTQE4BQMWRI0fU1NT279/PFaPNyfbt29fW1kZlzDkA2CIQCMeOHXNwcFi1apWuri7W4dCqtbV18+bNlpaW5ubm7DxuXV3dli1bFCkICwuzMwAwhG3atEleXp7rblHH4/GnT5/W09OLi4tbsWLF1atXd+3a9fnzZ2dnZ19fXxkZGawDBH+oa9euvXv3jnK2sujo6EePHj1+/Jidt+IyxY4dO6Kjo7dt25aSkoIuWbJkibq6ekBAQExMTJ+bDND4Jzg4WENDw8PDIyQkhMnBssbPnz8dHR3NzMysrKywjgWAPkBOAdAfaWnpo0ePurq6mpiYGBkZYR0OTe7du3fy5MmLFy/CLYeAk9na2kZGRjo4ODx//pxbKvJbt26tr68/ceIEm487YcKEU6dOsfmg4E+Qm5ublpaWnp7eXxdtTjZt2jRnZ2dvb29fX9+PHz86Ozvv2bNnzJgxWMcF/miBgYHLly+fOHEi+mNnZ+e+fftcXFxobFbY2Njo7u7OygCRSZMmbd++nZY1+fn5g4ODTU1NHz9+PH36dARBcDjcrl27HB0dfX19x48f33uTAeo4Y8eODQ8Pt7KymjlzJptvTqYDiURycXFpaWm5ePEi1rEA0DfIKQCocHFxyczMtLe3LyoqYkrPe5aqra11cnKytLSk7K4HAGeKiorS0tJas2ZNUlIS1rEMLDEx8cKFC8nJyczqnAgA5vz9/fX09ObNm4d1IHTy8fGJioqaN2/e7du3lZSUsA4H/Ony8vKePXt27tw58pKYmJjq6updu3bRuIfW1tbIyEjWRPf/TExMaKzjoCvr6+v7+/unpqaiS6ytrX18fM6fP3/8+PHe6w884sjS0nLz5s0bNmzo3d2K0xw7duzGjRsJCQnkWccA4ECQUwBQERISIi4uTtm3nzO1t7dbWVmJiYlx70xA4I8iLS0dExNz/fp19o9wGazi4uI1a9Zs2bLFwsIC61gAYI6XL1/euXOHq9vhKyoq2traVlZWKigoYB0LAEhUVNTEiRN1dHTQH4lE4tGjRx0cHOTl5TGNiyHe3t63bt0qLCxEf+Th4Vm5cmVMTExXV1fvlWmaUP3YsWMvXrwwNTXNzc3l2BF0sbGx3t7eR48enTNnDtax0ATuUmGFqqoqrEOgCeQUK0BODaigoIDzu2OIiYklJyfPnj175cqVsbGxnHmHM5FIdHR0fPXqVU5ODoFAwDqcgRUUFECCgLlz5wYEBOzYsUNGRmbFihVYh9O3yspKU1NTLS0t7uqT1R81NbXS0tL+HkUnb2VnPAiCPH/+3M3N7cWLFy0tLbKysox8cKqurh47dqyrqyvlV+JMl56ebmxs/Pr1a3V1ddYdhdVOnjypqalpYmKCdSAM2bVr18SJE9PT0+fPn491LOCP1tHRkZyc7O3tTV5y7969d+/ecem0p2QLFiyYNGlSSEgI+TtCJycnPz+/9PR0U1PTHivT9PlYQEDg1q1bkpKS8+bNq6urY3K8zJCRkbF69ert27d7eHhgHcvAxowZY2lpiXUUQ5OcnBxXvLaQU8wFOUUjXV1dPT09rKMYmIaGxo0bN27cuLFp0yasY+mbh4fHjRs3kpOTueK6Qk9Pj/Prd9zO0tKSY4vylHbs2LFt27aVK1ei8ydymu/fv5uamkpISKSkpPDz82MdDnP8+++/6NwiaGWK/CNWA6Ps7e1lZWVra2vfvn3LYAvnqKgoIpEYHx/f1tbGrPCGpNbW1mvXrq1evZo8NTKX+uuvv3R1daOjo7EOBPzpUlNTf/78SdmhIioqSl9fX01NDcOoGIfD4ZydnZOSklpbW9ElCgoKM2bMiIqK6mNt2mfDqqqqGjdunIaGBnm2RQ5x8+ZNYWFhR0dH8mR4AHAFyCkAqEhOTubh4dm8eTNHTR7Z3d29adMmHh6ea9euYR0LAPQgEon29vbCwsK3bt3COpb/UV1draGhIS8vX11djXUstEIGmndcVVWVSh3Hx8eHxQH2hF4bhIaGMmVvKioq6EC/2NhYpuywT/fv30cQ5PXr17SszJlzJF+5coWXlxfzybmZIiQkRERE5NevX1gH8j84830fGjjztXV23a7yqQAAIABJREFUdp4zZw75x8bGRmFh4cH+ZaupqWF1XcbExGSwT622tpaXlzc+Pp68JDg4WEJCoqurq8eagxivLisrm52d3dHRMWPGjLKyMtY94UGJioqysLCwsrK6dOkStxe5wZ8GcgoAKpYvX56cnBweHm5packhX/Z2dHTY2dmFh4fHxsYuW7YM63AAoAcOh4uMjLS3t1+yZAnn9LAvLy+fM2dOZ2dndnY25/c4p11JSUl/zRq2bt168ODBM2fO4HA4HA535syZDRs2DB8+HIfDoXe9ffv2befOncrKyoKCgpMnT75x4wZ5W/JW58+fd3NzExcXl5WV9fPzI69QXl6+ZMkSKSkpAoGwdOnSgoICdCshISEEQdatW4fD4cij9G/duqWjoyMoKDhy5Mj169f/+vWL8hC9A0Pl5uYKCgoGBAQgCHL58uUez67PAKgs7y8Mb29vY2NjBEEmTZqEw+G4tPNFXFycmZnZyJEjsQ6ECWxsbDo7O2/evIl1IOCPlpmZaWhoSP4xJSWFSCRaW1tjGBKzSEtLGxsbx8XFkZcYGho2NDS8ePGi56qDLRHV19dPmzZtxIgR6enpg92Wubq6unx8fHA43O7du2HUAOBekFMAUJGRkSEmJjZ37tyamhpsI6murp41a9awYcOys7OxjQQAxhGJxF27duFwuL179/b+lo/N7t27JyUlpaen9+3bN2wjGSxkoPE4lHqMxyH7/fs3giDy8vKJiYlNTU2nT5+2sbEhkUju7u7u7u7fvn37/fv3lStXBAQEiouLe2yF3oX669evkydPIgiSlZWFPqqpqWljY1NbW9vQ0ODu7i4iIkK51YULF8j7SUlJweFwe/bs+fHjx4sXL9TU1AwNDdHPAP0FhlqzZs2RI0dIJJKenh4ej6+srKR8Uv0F0N9yKmFw+3iczs5OAoFw/vx5rANhmtmzZ69atQrrKP4HB77vQwYHvrYfPnxAEOTRo0fkJY6OjvPmzRvsfjhzPA6JRDpz5gyBQOjs7ER/JBKJI0eORP/eUqLnXWlqarKxscHj8Rie+6urq+fMmSMkJBQeHo5JAAAwEeQUAFS8fPly/PjxI0eOvH//PlYx3L17V1paWlVVlcZrCQC4QmhoqKCgoIGBAVa396LfH+DxeDs7u+bmZkxiYAQT6zhr1qyhvvmiRYvWrVvXY6vVq1ejP3Z1dQkLCx84cID0n5unyIF1dnZKS0tTbkVZx1FRUVFXVyf/iI6zePDgAfXAmpubhw0bVlVVRSKRzp49iyDIwYMHyY/2FwCVwKiEwe11nNzcXARBysrKsA6EaXx9fceOHYt1FP+DA9/3IYMDX9vw8HBhYeH29nbyEjk5Oco/QTTi2DoOOqPx48ePyUtsbGzMzMx6rEbPPCAiIiLx8fFnz549cuSIgYEB++dOjo2NnTx58tevXwsKClxcXNh8dACYDnIKACo0NDSeP39uYGBgYmKyY8eOpqYmdh799+/f27ZtMzMzMzIyevr0KVc0NgaARq6urvn5+dXV1ZMnT46Pj2fz0d+8eTNnzpygoKDz58/HxMQw2HOX22loaFBfYfjw4b1vwZ40aRL6Hx4eHikpKXTmBEFBwalTp+7atQttlsnLy1tbW9vnPquqqsrKyubOnUteMn36dARBHjx4QD2wq1evTpkyRVZWFkEQGxsbPj6+iIgI8qP9BdDfclrC4DSPHz9G61wDyszMlJOTGz9+PKtDYhtDQ8PKysry8nKsAxmcqqoqHAUeHp7hw4fPnDnzyJEj6E18A/L29ka3paVPfHp6Og6HKy4uHlSQ1dXVPDw8GzZsGNRWg0VfbJyjqKhoypQp5F7479+/r6qqMjAwwDYqJvrrr79Gjx6dkZFBXjJ9+vSioqIeq9E/n+v69esLCgpaWlomT57s5eXV3NxM965o9+7dO0NDQ0dHRwsLi2fPng14zgOAi0BOAdAfAoEQFxd34cKFy5cvq6mpJSYmsue4CQkJampq0dHR4eHhMTExXDHFOACDMnny5GfPni1ZssTe3t7IyKikpIQNB21qatq5c6eWllZ7e3tBQcHatWvZcFAOh3auofT27VsLC4tRo0bh8Xi0q1FDQ0OPdURFRcn/5+PjIxKJ6P/v3r27dOnSrVu3Dhs2bMGCBY8fP+7zoN++fUMoWuHgcDhpaWkEQSorK6kEhiDI5cuXHRwc0P9LSkqampp++PDh0aNH5BX6C6DP5bSEwWkCAwNHjhy5du3a58+fU1+zsLBwiM0YOG3aNF5e3sLCQqwDGRw5OTkSieTk5ITezdfR0fH69evVq1efPXtWQ0Pj9evXA+4hICDg3bt3LA0S5oCjRUlJiaqqKvnHwsJCPj4+HR0dDENiOl1dXcq/Laqqql+/fv358yflOvTXcRAE0dTUfPz4cXBwcFhY2Pjx44OCglh35fn+/XsXFxdNTc1fv37l5+efP3+e8tQFwNAAOQUAFatXry4pKZk/f/6KFSv09fX/+ecfFh2IRCKlpaXNmDHD1tbWzMyspKRk1apVLDoWAJgjEAhhYWG5ubk/fvzQ0NBYs2YN2n2AFZqamo4fPz5+/PiLFy+ePHny8ePH8P1Bnzo7O42MjD5//pyVlYV2SXByciKRSDRuLiEhcfz48erq6uzs7La2ttmzZ/c5ekJKSgpBEE9Pzx7D9alPLP3p06esrCx0Fm0UehsU5ZCc/gLoczl9YWCrsbGxtbU1IiJCR0dHQ0MjLCysv7GiJSUl3D4Xcg8CAgLjxo0rLS1l9YHa29vRGh8r8PDwyMrKrl69+unTpwiCmJub0zjAiqUiIiKsrKx+/vx5/fp1rGNhty9fvtC4ZmlpKWUdp6SkREFBgTw8Z2hQVVWlTDH0+b5//55yHYbqOAiC8PDwbNy4sbS01M7Obt++ffLy8n5+fp8/f2Zwt2QkEiknJ8fe3v6vv/7KyckJDQ19/PjxtGnTmLV/ADgN5BQAVIwYMeLSpUv5+fnDhg1buHChtrZ2TExMS0sLs/bf0tISExOjra29aNEiSUnJgoKC8PBw9BoDgKFNV1f36dOn58+fz87OVlNTs7e3z83Npb1wMKDKysr9+/crKCj4+vo6ODiUlpZu2LABj2f0g+hQVVFRUVNTY2Njo6amxsPDgyBIe3s7jdt+/fqVfL+Vrq7uhQsXOjo6nj171ntNOTk5NTU19DqWTFNTE+2I0Z+IiAg7OzvKgktTU5OUlFRiYiL65VN/AfS3nHoYnPlLgt6J09XVhSBIcXHxxo0bpaWlXV1de4xS6e7urqiooLzmHBp6XGSyyI8fP2RkZExNTa9cucK6Iou0tPShQ4eqqqrOnz9PXtjn7Gl9GtQ8a9R3+4fPAefo6KisrHzgwAHqXyQ0NzdXV1dT5lSPss7QoKqq+v79++7ubvRHeXl5AQGBnklHR+ud/tTX1+/evVtKSgqPxxsYGFy6dOnr16/07YpIJL58+XLv3r2KiooIgmhpacXFxWE+nwIAbAY5BQAVhYWFlpaWfHx8BALB2dn53r17ra2t9O2qpaXl7t27Tk5OBAKBj4/PysqqqKiIudECwC26urpiYmImT56MIIiSktK+fftevXpF9ySGNTU1Fy9enDt3Lh6PHzFixN69e7luUioqEOb1OabsPUwikdra2kaMGKGhofHmzZvW1ta7d++Ki4trampS2UpJSWnTpk2k/zTvDAoKamxsbGho8PT0FBQULC8v73OrtLQ0Hh6ew4cP19fX19fXb9u2bcKECejf0j4DIxKJSkpKb9++7fEs/P39EQSJiIigEgCVwKiEgTYNTEpKqq+vHzVq1NOnT6m8yOQKlKCgoISEhIyMzIQJE7S1tfX19RcuXGhlZeXo6Ojm5ubl5bVv377g4ODQ0NDIyMjU1NT79+8/evSouLi4vLy8urqaPFNMf/ocYsPHx4cgyKRJk0JDQ3///k0ikSoqKhAEKSgooL43rrN169bp06ez+ijoAA08Ho/H4/n5+a2srFJSUtra2nqvSXsvXvJ9VZQaGxtxOJyBgQH6I5XZ09D7qm7fvj3gmr37c1NZGfWHzwE3Z84cBEF4eXnR65QTJ0702YAfbRNWWFhIXjJ16lQPDw86jsixfY5JJFJeXh6CIB8/fiQvUVRUPHz4MOU6zH9X2tvbU1JSli9fLiAggMPh1NXV3dzc4uLiCgsLm5qaqGz49evXrKyskJAQGxsb9LbY0aNHb9++/eXLl0wPEgAuAjkFABV1dXUnT55E74sWFBQ0NDQ8cOBAWlra+/fvqXwQ7+zsfP/+fVpamp+fn4GBgaCgIIIg06ZNO3XqVH19PTvjB4BjvXjxwsPDQ0ZGBkGQkSNHrlixIiQkJDs7u7a2lspWTU1NhYWFcXFxW7ZsmThxIpqYlpaWN27c6OjoYFvw7IHQXMcRFxcnf7JH75BCxcXFUX7ob2hoID/05MmTWbNmiYqKjhkzxtXV1dLSEl2npqaGcit7e3vKQbtKSkokEunWrVvGxsaSkpJiYmIzZ85EJ346ffo05bHIs/bevXtXV1dXQEBg5MiRdnZ2nz9/7i8wysseymK3l5dXj+uWPgOgsry/MFAbN24UFxcXExPbuHEj9dcZveZMTEwMDQ0NDg4OCAjw8vJyc3Nbu3atlZXVggUL5s2bp62t/ddff8nLy0tISFC5F4NAIEhLSysqKk6ePFlXV9fIyMjCwsLe3t7V1XXnzp0SEhL9bYj20BUSElq7dm1sbCyCIB8+fKDll4SLHDhwQEVFhdVH6XGjDR8fHw6HExERcXBwSE1NpTzFM1jHIZFIkpKSioqK6P+pzJ7Wo44zqHnWqKxMgjng/lPHIScR+nZPmzYtODi4rq6OvBraNYYyp5SUlA4dOkTHETm5joMOvXnx4gV5iaampo+PD+U6OBLzRsz20NTU9H/t3WtUE2ceBvBJALGScLFyExAEmwTFUu60QZEgakOtFqroFtB1ba3UWql4tGK91SpsCy0uWN3WgqBolbUiIIuXRJAVUG6KIAGhVkFEogYSFhBD9sPsZnMAKWhgAJ/fp+TlJfMMYTjMP+8lJydHIBAIhcLr16+TIw/NzMyMjIwYDAaDwdDR0ZFIJFKpVCaT1dXVNTc3EwShq6vL5XK9vLx4PJ6Dg8PwHEsJQAlcUwB9uHPnjlAoFAgEFy9eJFfHHDNmzKRJk/T09PT09Mjln2QyWXNzs0QiuXv37pMnTwiCsLS09PT05PF4PB7PwsKC4nMAGH7kcnlJSQl5cV2+fJkcma+vr29mZsZgMJhMpr6+fmtrq0wmk0qlTU1N9fX1BEFoaWlNnz6dvLLIYgTV5zEoaDTaL7/8snjxYqqDwH8dP348ICBgQHc3XV1dzc3Nra2tbW1tLS0tMpmsra2N/FeKfCCVStva2sjfcPJBS0vLtWvX+j/TLTY2NiQkhEajPdc5DUd79+6NiIjo/4Imz6ehoWHixIk928eMGfPkyRM9Pb2AgICgoCAul3vixIl+vu/Lly9PSUnpuZjRq6++qq+vX1NTU1dXZ2FhsWbNGmXds6mpycjIaPPmzV9//XVlZaWtrW1mZua8efP67nn+/HkfH5+ysjJym8u+OxMEkZSUlJCQQO7R9vDhQ1NTU0tLS9X1UFxdXR8+fBgREfHOO++orj7ea/uAsvXtOa6p5zNr1qzs7OxujeSsUhqNNnv27KVLl/r5+RUVFc2aNauxsZH8iJogCBMTky1btqxZs2agR7x//z75QcXgmTt3bn92N+uJzJaTkzNjxgyyZcaMGQ4ODnv37lX20VRPxt4wGAw+n8/n8wmC6OzsrK2traysrKmpEYvF5J/C1tZWa2tr8p8AExMTFovFZrPJLQwBoCdcUwB9mDRp0rJly5YtW0YQREtLS1VVlUgkun37tlQqlUgk5D9tpqam+vr6TCbTysqKzWazWCxdXV2qgwMMaxoaGs7Ozs7Ozhs2bCAIor6+XiQSVVVV3b9/n7zXffz4sbGx8ZQpUxgMhqGhobW1NYfDsba2JueYAAxzdDrdwMCgj/E1vRo3blwfX9XS0urs7GQymY6OjtnZ2X5+fqOpiEMQBJPJlEgkJ06cGNSj9NygjUR+DNPc3BwfH//3v//d3Nz8Bdd5JCf62dvbEyq7p8XGxqr26bl7Wv979qdzfHx8UFAQ+ZjcAy4tLe3SpUvK2/isrKxdu3atW7cuMDBw9uzZW7dudXNze1b7gLL1x2C/1wRB9LpSuHKBmHPnzmVlZa1atYo8a21tbWUfqVQ6+j4qIDdIVV0WislkdlslahDrOKq0tLTYbPboW4IIgCq4pgD6oKurS955Uh0EYLQxMzMzMzPj8XhUBwGgjEKh6LktNI1G09TU7OzsNDc39/Pzmz9/vqenZ1paWnZ2tnLgwKgxduzYjo4OykeidXZ2EgRRV1dXV1dHEERGRoavr+9zvM7p06cVCgX5Qaly97TIyMi+v6v/Pf+wM7kHnFAoXLFihWp7QkKCso5D7vUWFRWVn58fHh4+c+bMiooKGxubXtsHlK0/huC97vuDZ7Kg097eTo7Z2bNnz86dO8l5kR0dHaplndGBPCPVvzNjx47t9mcHMywAAAAAAAD6hVyAmXysoaFBo9HodDqXy42MjKyurr57925MTMzs2bO1tLR0dHQIgiC38RpNpFKprq7u8y380X99z9si7+GNjY3Xrl27Y8cOgiCer4jT2NgYHh5uYWGxatUqYiCbuA1on7W+Ow//PeAG+71WKBRTpkx51tE1NDTodLqWlhafzw8PDycIYvPmzcrFrXR0dEbfJUaOTlIdZySTychBOkqo4wAAAAAAAPSLcgIIk8lcvHhxcnLyw4cPL126FBoa2u1etOfkiNFBKpV2u6UcMuR+Rrq6ugEBAefOnWtoaIiJiel1+7C+yeXy+vr6n3/+2cXFhU6nZ2RkKM8oKioqJycnIiJCLBaLxeLPP//86dOnCxYs6PkiffQkF16prKwUi8WmpqaFhYXP6qxQKJKSksjyhJKOjk5oaKhMJktJSSFbbty48d1337W0tEgkkgMHDowdO9bFxaWP9gFlG+hPb2iQS4bT6fSZM2fGx8c/fPgwIyODHDbV94SjUYA8I9W5/y0tLajjAAAAAAAAPA+FQhEWFnbx4sVHjx4lJycvWbJEX1+/156o46iLpqYmnU7X1tZesGDB6dOnxWJxYmLi7Nmz+7/wUF1dHY1GO3ToUGtrK7kd0vTp0w8ePLhmzZrr168rR7UQBMHn88+cOZOammpubm5nZ9fY2JiVlTV27NhNmzbZ2toSBPH2228HBgb20ZMgCFtb25CQkJUrV9rY2Pj5+Tk7O/faWSKR0On0mpqaqVOnlpaWKjNs2rSJrOwsX7583rx5JiYm6enpmZmZ1tbWlpaWly9fzsjIsLa2flb7QLOp7X1SB+VmVS4uLlFRUQ0NDQKBIDg4mPyV63lN6erqjspLjPjfySpbul10Q7Q+DgAAAAAAwEhnbGz8zTff9KeniYkJQRD19fXPMWBkOKuvrydPbWiQE2qCgoJ8fX3JSsRzMDc3V/R706U5c+bMmTOnW2NERERERER/epLi4uLIHcT77txrqp7H8vX17XXi2LPaB5pt+Jg2bdqyZcsCAgJ63UVUT0+PIAiJRKJsMTY2JvdJHE3IM1K9yiQSCXnuSqjjAAAAAAAAqJmhoeH48eNFIpG3tzfVWdRJJBKpDmAZJHQ6fc6cOUuXLn3vvfe63cHC6MPhcDw9PZcuXdp30dPMzExbW/vWrVvu7u5kC5vNFolEQ5Jx6FRWVk6YMOHVV18ln7a2tjY0NJAjrZRQxwEAAAAAAFA/FotVVVVFdQo1E4lE/v7+g30UY2PjrKyswT4KDBP79+/vTzcNDQ0bGxvVa4rNZp8+fXrQclGjqqpKdVfi6upqhULRrcKF9XEAAAAAAADUj8PhlJeXU51CncRi8YMHD0bZTDEYQboNwOFwOA0NDY8ePaIwktqVl5er1nFEIpGmpubkyZNV+6COAwAAAAAAoH5vvfXW5cuXnzx5QnUQtbl48aKGhoabmxvVQeAlxeFwKioqlE/ffPNNDQ2NnJwcCiOpV0dHR35+PpfLVbZUVFRYW1srt1onoY4DAAAAAACgfjwe79///veVK1eoDqI2AoHAycnpWVt0AQw2d3f38vJysVhMPtXX17e3txcKhdSmUqO8vLy2tjYej6dsycnJeeutt7p1Qx0HAAAAAABA/WxsbCZNmiQQCKgOojYCgcDLy4vqFPDy8vT0pNPp2dnZyhYej3fhwgUKI6mXQCCwtra2srIin7a3t+fn5/e86FDHAQAAAAAAGBR8Pj8lJYXqFOpx48YNkUj0rI2uAYaAnp6eo6Oj6gAcPp9fXl5+8+ZNClOpUUpKCp/PVz7Nzc1tb29XHZ5DQh0HAAAAAABgUAQGBpaVlZWWllIdRA0SExMtLS09PDyoDgIvNR6Pp7qXmaenp4WFxeHDhymMpC6FhYU3b94MCgpStpw9e5bFYpmbm3friToOAAAAAADAoOByuSwWKykpieogL6qrq+vo0aNBQUE0Go3qLPBSe//992/dulVQUEA+pdPpgYGBhw4dksvl1AZ7cUlJSa+99pqLiwv5tKur69ixY4sWLerZE3UcAAAAAACAwRIUFHTo0CGZTEZ1kBeSmpp679491ZECAJRwdna2s7NTrY0uW7bs3r176enpFKZ6cVKp9PDhw8uXL1eWSoVC4d27dwMDA3t2Rh0HAAAAAABgsISEhDx58uTAgQNUB3khu3fvXrhwIYvFojoIAPHBBx8cPXq0o6ODfMpms999993du3dTm+oF7du3r7Ozc/Xq1cqWpKQkV1dXDofTs7PmEAYDAAAAAAB4uYwfP37VqlXffvttSEjIK6+8QnWc55GZmVlYWPjDDz9QHQSAIAgiMDDwyy+/TElJ+eCDD8iW8PBwV1fX8+fPz549uz+vYGBgkJaWNpgZCSMjo/53bm9vj4mJ+eSTTwwMDMgWsVickpISGRnZa3+aQqFQQ0YAAAAAgJcJVgkZnobn3U1DQ4ONjc2OHTs2bNhAdZYBk8vlbm5uxsbGGRkZVGfpxfHjxwMCAobn+z7SDeefbWBgYHFx8Y0bN+j0/84xmjt3rkQiycvLU7aMIHv27Nm1a9dvv/2mrP5s2bJl//79t2/fZjAYPftjPA4AAAAAwID98ssvVEeAEcPU1HTjxo3bt29fvHixpaUl1XEG5sCBA9euXSsuLqY6CMD/hYeH29nZnT59euHChWRLdHS0g4PDTz/99NFHH1GbbaDu3r379ddfh4eHK4s4LS0tcXFxGzZs6LWIQ2A8DgAAAAAAwGDr6Oiwt7efPn36iRMnqM4yAA8ePOBwOB999FFERATVWXo3nMeMjHTD/Gfr7+9/586dK1euKEdHrl+/PiEhobKy0tDQkNpsA/Lee++Vl5eXlZVpa2uTLbt27YqKirp9+7aenl6v3zLyRhwBAAAAAACMLNra2jExMf/4xz9G0EguhUKxatUqJpP55ZdfUp0FoLutW7eWlJQcOnRI2bJ9+/Zx48apLhU8/CUnJ6empu7bt09ZxKmrq4uMjFy/fv2zijgE6jgAAAAAAABDYO7cuZ988snKlStFIhHVWfolJiYmLS0tPj5eR0eH6iwA3dnb24eEhISFhYnFYrKFyWQePnz41KlTsbGx1Gbrp1u3bq1evfqzzz5TXZ45NDTUxMQkLCysj29EHQcAAAAAAGAofPvtt2w2e+nSpe3t7VRn+QMFBQUbN27cuXMnj8ejOgtA73bt2qWtra06XszT03Pbtm1hYWGFhYUUBuuPtrY2f39/NputuinVuXPnUlJSYmJixo4d28f3Yn0cAAAAAACAIVJTU+Pq6jpz5syUlBQNDQ2q4/SupqaGy+U6Ojqmp6cP891/yDVcRtBstREkLy/v+++/H+YVgyNHjgQHB//zn//08fEhW7q6uvh8/vXr1//1r39NnjyZ2njP8vTpU39//9zc3MLCQmXIx48fOzg4uLi4/OEqWqjjAAAAAAAADJ2CggJvb29/f/+EhIRhuIF9U1OTh4eHrq6uQCBgMplUx/kDZB2H6hSj2fCvGAQFBZ09e7akpGTixIlki1Qq9fLykkgkubm5JiYm1MbrSaFQfPjhh8nJyefOneNyucpGf3//q1evlpSUTJgwoe9XQB0HAAAAAABgSKWlpfn5+X366adRUVHDqpTT2Ng4b9681tbW3Nxc5S7IAMOZTCZzcXExNja+cOGCcoxbY2Ojh4cHg8HIysoaVr/JCoXi888/j42NPXXqlK+vr7I9Ojp648aNAoFgxowZf/giw3qMHAAAAAAAwOgzf/78pKSkuLi45cuXd3Z2Uh3nv2praz08PFpbW8+ePTusbn0B+sBgMI4dO1ZQUKC6NrCxsfHZs2dlMpmHh8dvv/1GYTxVnZ2dwcHB+/btO3z4sGoR5/z585s2bfrqq6/6U8QhUMcBAAAAAAAYekuWLElLSzt58uTChQubm5upjkNcuXKFy+Xq6+vn5uZaWVlRHQdgAOzt7RMSEvbu3au6ZvDkyZNzc3OZTCaXyx0Oyx5LJJL58+enpqZmZGSoTgYsLi728/NbvHjxxo0b+/lSqOMAAAAAAABQYM6cOQKBoKSkxMnJqaioiKoYCoUiJiZmxowZDg4OQqEQI3FgJAoICIiNjf3iiy8OHjyobDQ2NhYKha+//rqHh8ff/vY3CuNdvXrV0dGxrKxMKBSq7jJeW1vr6+vr4uJy8ODB/k+xRB0HAAAAAACAGi4uLiUlJZMnT+Zyud9//71cLh/iAA8ePPDz8wsLC9u2bVt6ejqDwRjiAADqsnr16s2bN3/88cfx8fHKRl1d3TNnzoSHh4eGhvr7+zc1NQ1xKrlcHh0d7eHhwWKxSktLnZyclF+qrKzk8XgWFhapqana2tr9f02N7du3qz8pAAAAAAAA9AODwQgsMhr+AAAGDElEQVQMDKTRaFu2bElLS3vjjTfMzMyG4LhyuXz//v1+fn6PHj06deoUmWEIjgsweHg8nra29tq1axUKxaxZs8hGGo3m6ek5c+bMuLi47777Tk9Pz9HRcWh+2/Pz8xcuXHj06NFt27b98MMPqnXSq1ev+vj4mJubnzlzRl9ff0Avi/E4AAAAAAAAVKLT6Vu2bLl27Zquru6bb775l7/8pba2dlCPmJmZ6ebmtm7dug8//LCiomLmzJmDejiAIbNx48aYmJivvvpq3bp1qgPcZs2aVVFRsWLFirVr17q5uWVlZQ1qjJqamhUrVnC5XAMDg2vXrm3evJlO/3/5JT093cvLy93dXSgU/uEu4z2hjgMAAAAAAEA9W1vbCxcuJCUlXbx4kc1mBwcHV1RUqPcQXV1dv/76q7OzM5/PNzY2Li0tjYyM1NHRUe9RAKj16aefJicnHzhwwNvb+969e8p2BoPxzTfflJSUTJgwYd68eS4uLqdOnerq6lLv0SsqKoKDgzkcTk5OzpEjRy5cuMDhcJRfffr0aXh4+IIFC5YsWXLy5Mlx48Y9xyFQxwEAAAAAABgWaDTan/70p+rq6uTk5KKiomnTpjk7O8fExLz4oh4VFRXbt2+fMmWKv7+/qalpQUFBRkbG1KlT1RIbYLgJCAgoKioSi8X29vaZmZmqX5o2bVpmZmZpaamtre37779vYWHx2WeflZSUvOARJRJJYmKij4+PnZ1dcXHxwYMHKysrlyxZotqnvr6ex+NFR0dHR0f/9NNPmpqaz3csmkKheMG4AAAAAAAAoF5dXV3nz59PSkr69ddfOzs73d3deTwej8dzdXXt55KoYrE4OztbIBBcuHBBJBJZWVkFBgYGBwe/9tprgx0eYDiQSqUff/zxsWPHVq5cuWfPnvHjx3frUFVVlZiYePjw4d9//53D4Xh7e3t5eXl6evZzrlNHR8eVK1cEAoFAIMjLyxszZoyfn19QUJC3t7fqLCqCILq6un788cfNmzcbGRkdP358+vTpL3JeqOMAAAAAAAAMXzKZ7PTp0+fOnRMKhb///rumpqaVlRWLxWKxWIaGhoz/kUgkLS0tMpmsvr6+qqqqsrLywYMHGhoaTk5OPB6Pz+d7eHhgJWN4CR09enT9+vWdnZ2RkZF//vOfe14FXV1dly5dyszMFAgExcXFcrncyMiIw+Gw2eyJEycymUwmk6mvry/7nwcPHlRXV4tEotu3b8vlcisrKy8vLx8fn/nz5/e641tRUVFISEhJScnatWt37Njx4jMZUccBAAAAAAAYGWpqaoqKisgyTW1tbVNTk/Le0sDAgMlkMhgMExMTNpvNZrM5HI67u7uenh7VqQEo1tLSsnXr1ri4uNdffz08PHzhwoXdxssoSSSSgoKCmzdvikSiqqqq+/fvy2QyqVT6+PFjZc3U0NDQxsaGw+GwWCwnJydra+tnHffGjRu7d+8+fvw4l8uNi4uzs7NTy+mgjgMAAAAAAAAAo1xZWdnOnTtPnjzJ4XC++OKLRYsW9XOK4nMoKCiIiIhITU21s7PbsmXLokWL1DgaDnUcAAAAAAAAAHgp1NTU/PWvf/35558ZDMb8+fODg4O9vb3VVWSpr69PSUlJSEgoLS194403QkNDAwMDnzX257mhjgMAAAAAAAAAL5H6+vojR44kJiaWl5fb2Nj4+PjweLxZs2YZGhoO9KU6Ojry8vLIBcXz8/MNDAyWLFkSFBTk5uY2CMEJAnUcAAAAAAAAAHg5FRcXp6SkCIXCwsJCuVxua2s7depUFovFZrOnTJliYGBAroljYGCgXItKIpHcuXOnqqqKXKmqtLS0ra3N2tqax+O98847b7/99pgxYwY1M+o4AAAAAAAAAPBSk0ql2dnZeXl5IpFIJBJVV1d3dHQ8qzONRrO0tCTLPY6Ojl5eXpaWlkMWFXUcAAAAAAAAAID/k8vl9+7da25uJsfgPH78WEdHhxybo6+vb2pq+sorr1CVDXUcAAAAAAAAAICRQc3LJgMAAAAAAAAAwCBBHQcAAAAAAAAAYGRAHQcAAAAAAAAAYGT4D9D731X6hs6CAAAAAElFTkSuQmCC", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" - ] - } - ], - "source": [ - "\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "\n", - "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", - "\n", - "gviz = pn_visualizer.apply(net, initial_marking, final_marking)\n", - "pn_visualizer.view(gviz)\n", - "\n", - "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", - "\n", - "print(aligned_traces)\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.10" - }, - "vscode": { - "interpreter": { - "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb deleted file mode 100644 index 460facfb36..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process mining.ipynb +++ /dev/null @@ -1,286 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-2fed1eb2-9dc1-47ec-b7f2-f355b444c690.json']\n", - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" - ] - } - ], - "source": [ - "import os\n", - "path = os.getcwd()\n", - "parent = os.path.dirname(path)\n", - "\n", - "\n", - "# Change path if necessary\n", - "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", - "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", - "\n", - "import sys\n", - "\n", - "if __name__ == '__main__':\n", - " print(sys.argv)\n", - " print(file_path)\n", - "\n", - "\n", - "\n", - "# import sys\n", - "\n", - "# accept command line arguments\n", - "# inputArg1 = sys.argv[1]\n", - "\n", - "#print('inputArg1: ',inputArg1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "# uncomment if problems with dependencies\n", - "#%pip install pm4py\n", - "#%pip install pandas\n", - "import pm4py\n", - "import datetime as dt\n", - "import time\n", - "import pandas\n", - "\n", - "# process mining\n", - "from pm4py.algo.discovery.alpha import algorithm as alpha_miner\n", - "from pm4py.algo.discovery.inductive import algorithm as inductive_miner\n", - "from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner\n", - "from pm4py.algo.discovery.dfg import algorithm as dfg_discovery\n", - "\n", - "# viz\n", - "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", - "from pm4py.visualization.process_tree import visualizer as pt_visualizer\n", - "from pm4py.visualization.heuristics_net import visualizer as hn_visualizer\n", - "from pm4py.visualization.dfg import visualizer as dfg_visualization\n", - "\n", - "from pm4py.objects.conversion.process_tree import converter as pt_converter\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "def import_csv_original(file_path):\n", - " event_log = pandas.read_csv(file_path, sep=';')\n", - " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", - " return event_log\n", - "\n", - "def getStartActivities(event_log):\n", - " s = pm4py.get_start_activities(event_log)\n", - " print(\"Start activities: {}\\n\".format(s))\n", - " return s\n", - "def getEndActivities(event_log):\n", - " e = pm4py.get_end_activities(event_log)\n", - " print(\"End activities: {}\\n\".format(e))\n", - " return (e)\n", - "\n", - "def getAttributeFromLog(event_log, attr):\n", - " entries = pm4py.get_event_attribute_values(event_log,attr)\n", - " print(\"Entries: {}\\n\".format(entries))\n", - " return entries" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" - ] - }, - { - "ename": "FileNotFoundError", - "evalue": "[Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[4], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(file_path)\n\u001b[0;32m----> 2\u001b[0m log \u001b[38;5;241m=\u001b[39m \u001b[43mimport_csv_original\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m log_other_model \u001b[38;5;241m=\u001b[39m import_csv_original(file_path_other_model)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28mprint\u001b[39m(log)\n", - "Cell \u001b[0;32mIn[3], line 2\u001b[0m, in \u001b[0;36mimport_csv_original\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mimport_csv_original\u001b[39m(file_path):\n\u001b[0;32m----> 2\u001b[0m event_log \u001b[38;5;241m=\u001b[39m \u001b[43mpandas\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfile_path\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msep\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m;\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3\u001b[0m event_log \u001b[38;5;241m=\u001b[39m pm4py\u001b[38;5;241m.\u001b[39mformat_dataframe(event_log, case_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcaseID\u001b[39m\u001b[38;5;124m'\u001b[39m, activity_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmethodName\u001b[39m\u001b[38;5;124m'\u001b[39m, timestamp_key\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtimestamp\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m event_log\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:912\u001b[0m, in \u001b[0;36mread_csv\u001b[0;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[0m\n\u001b[1;32m 899\u001b[0m kwds_defaults \u001b[38;5;241m=\u001b[39m _refine_defaults_read(\n\u001b[1;32m 900\u001b[0m dialect,\n\u001b[1;32m 901\u001b[0m delimiter,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 908\u001b[0m dtype_backend\u001b[38;5;241m=\u001b[39mdtype_backend,\n\u001b[1;32m 909\u001b[0m )\n\u001b[1;32m 910\u001b[0m kwds\u001b[38;5;241m.\u001b[39mupdate(kwds_defaults)\n\u001b[0;32m--> 912\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:577\u001b[0m, in \u001b[0;36m_read\u001b[0;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[1;32m 574\u001b[0m _validate_names(kwds\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnames\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m))\n\u001b[1;32m 576\u001b[0m \u001b[38;5;66;03m# Create the parser.\u001b[39;00m\n\u001b[0;32m--> 577\u001b[0m parser \u001b[38;5;241m=\u001b[39m \u001b[43mTextFileReader\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 579\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m chunksize \u001b[38;5;129;01mor\u001b[39;00m iterator:\n\u001b[1;32m 580\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m parser\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1407\u001b[0m, in \u001b[0;36mTextFileReader.__init__\u001b[0;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[1;32m 1404\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moptions[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m kwds[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhas_index_names\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 1406\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles: IOHandles \u001b[38;5;241m|\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m-> 1407\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_engine \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_make_engine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mengine\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py:1661\u001b[0m, in \u001b[0;36mTextFileReader._make_engine\u001b[0;34m(self, f, engine)\u001b[0m\n\u001b[1;32m 1659\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m mode:\n\u001b[1;32m 1660\u001b[0m mode \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m-> 1661\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;241m=\u001b[39m \u001b[43mget_handle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1662\u001b[0m \u001b[43m \u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1663\u001b[0m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1664\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1665\u001b[0m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcompression\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1666\u001b[0m \u001b[43m \u001b[49m\u001b[43mmemory_map\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmemory_map\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1667\u001b[0m \u001b[43m \u001b[49m\u001b[43mis_text\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mis_text\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1668\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mencoding_errors\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstrict\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1669\u001b[0m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstorage_options\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1670\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1671\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1672\u001b[0m f \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhandles\u001b[38;5;241m.\u001b[39mhandle\n", - "File \u001b[0;32m~/.local/lib/python3.8/site-packages/pandas/io/common.py:859\u001b[0m, in \u001b[0;36mget_handle\u001b[0;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[1;32m 854\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(handle, \u001b[38;5;28mstr\u001b[39m):\n\u001b[1;32m 855\u001b[0m \u001b[38;5;66;03m# Check whether the filename is to be opened in binary mode.\u001b[39;00m\n\u001b[1;32m 856\u001b[0m \u001b[38;5;66;03m# Binary mode does not support 'encoding' and 'newline'.\u001b[39;00m\n\u001b[1;32m 857\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mencoding \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m ioargs\u001b[38;5;241m.\u001b[39mmode:\n\u001b[1;32m 858\u001b[0m \u001b[38;5;66;03m# Encoding\u001b[39;00m\n\u001b[0;32m--> 859\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[1;32m 860\u001b[0m \u001b[43m \u001b[49m\u001b[43mhandle\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 861\u001b[0m \u001b[43m \u001b[49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 862\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mioargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 863\u001b[0m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 864\u001b[0m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 865\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 866\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 867\u001b[0m \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[1;32m 868\u001b[0m handle \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mopen\u001b[39m(handle, ioargs\u001b[38;5;241m.\u001b[39mmode)\n", - "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv'" - ] - } - ], - "source": [ - "print(file_path)\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "print(log)\n", - "print(\"lenght is\", len(log))\n", - "print(log_other_model)\n", - "print(\"lenght is\", len(log_other_model))\n", - "startAct = getStartActivities(log)\n", - "endAct = getEndActivities(log)\n", - "timestamps = getAttributeFromLog(log, \"timestamp\")\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Install graphviz, if not done already\n", - "Open a terminal window and intall graphviz with:\n", - "`sudo apt install graphviz`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "#Another way to discover the tree\n", - "# # create the process tree\n", - "#tree = inductive_miner.apply_tree(log)\n", - "\n", - "# viz\n", - "#gviz = pt_visualizer.apply(tree)\n", - "#pt_visualizer.view(gviz)# convert the process tree to a petri net\n", - "\n", - "start_time = time.perf_counter()\n", - "process_tree = pm4py.discover_process_tree_inductive(log)\n", - "print(process_tree)\n", - "end_time = time.perf_counter()\n", - "pm4py.view_process_tree(process_tree)\n", - "\n", - "parameters = {pn_visualizer.Variants.FREQUENCY.value.Parameters.FORMAT: \"png\"}" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "dfg, start_activities, end_activities = pm4py.discover_dfg(log)\n", - "pm4py.view_dfg(dfg, start_activities, end_activities)\n", - "\n", - "map = pm4py.discover_heuristics_net(log)\n", - "print(map)\n", - "pm4py.view_heuristics_net(map)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "# heuristics miner\n", - "net, im, fm = heuristics_miner.apply(log)\n", - "\n", - "# viz\n", - "gviz = pn_visualizer.apply(net, im, fm)\n", - "pn_visualizer.view(gviz)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.10" - }, - "vscode": { - "interpreter": { - "hash": "994fd3bf715f7d00910c6929cedf6117267fec036ef9d2716f71f2b8e3dc9b3e" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb b/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb deleted file mode 100644 index c6c5ef6fd5..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/fixtures/python/process_conformance.ipynb +++ /dev/null @@ -1,186 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py', '-f', '/home/bruno/.local/share/jupyter/runtime/kernel-85cfe7fb-4cec-4b85-affb-ff95bb09e084.json']\n", - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures\n", - "/home/bruno/Documentos/blockchain-integration-framework/packages/cactus-plugin-cc-tx-visualization/src/test/fixtures/../csv/use-case-besu-fabric-6-events.csv\n" - ] - } - ], - "source": [ - "import os\n", - "# uncomment if problems with dependencies\n", - "# %pip install pm4py\n", - "# %pip install pandas\n", - "import pm4py\n", - "import datetime as dt\n", - "import time\n", - "import pandas\n", - "\n", - "from pm4py.visualization.petri_net import visualizer as pn_visualizer\n", - "\n", - "path = os.getcwd()\n", - "parent = os.path.dirname(path)\n", - "\n", - "# Change path if necessary \n", - "file_path = parent + \"/../csv/example-dummy-6-events.csv\"\n", - "file_path_other_model = parent + \"/../csv/example-dummy-ethereum-4-events.csv\"\n", - "\n", - "import sys\n", - "\n", - "if __name__ == '__main__':\n", - " print(sys.argv)\n", - " print(parent)\n", - " print(file_path)\n", - "\n", - "\n", - "\n", - "# import sys\n", - "\n", - "# accept command line arguments\n", - "# inputArg1 = sys.argv[1]\n", - "\n", - "#print('inputArg1: ',inputArg1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false, - "jupyter": { - "outputs_hidden": false - }, - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "def import_csv_original(file_path):\n", - " event_log = pandas.read_csv(file_path, sep=';')\n", - " event_log = pm4py.format_dataframe(event_log, case_id='caseID', activity_key='methodName', timestamp_key='timestamp')\n", - " return event_log\n", - "\n", - "def getStartActivities(event_log):\n", - " s = pm4py.get_start_activities(event_log)\n", - " print(\"Start activities: {}\\n\".format(s))\n", - " return s\n", - "def getEndActivities(event_log):\n", - " e = pm4py.get_end_activities(event_log)\n", - " print(\"End activities: {}\\n\".format(e))\n", - " return (e)\n", - "\n", - "def getAttributeFromLog(event_log, attr):\n", - " entries = pm4py.get_event_attribute_values(event_log,attr)\n", - " print(\"Entries: {}\\n\".format(entries))\n", - " return entries\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" - ] - } - ], - "source": [ - "\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "\n", - "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", - "\n", - "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", - "\n", - "print(aligned_traces)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAABe0AAACUCAIAAACBVZWTAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOzdeTxU/fcA8DtjX4ZESlS28JRIVKSNyNIuS7YopZ1SoUeLlKJF2hSpLNlVUp42WcrWRosKxVMioZKyLzO/P+7vO9/5WsaY7c7ovP/olTt3OTPjuHPPfO754EgkEgIAAAAAAAAAAAAAOB4e6wAAAAAAAAAAAAAAAE2gjgMAAAAAAAAAAADAHaCOAwAAAAAAAAAAAMAdeLEOAAAAAAAAAAAAwEZVVVVeXh7WUbCKtbU11iEA5sNBn2MAAAAAAAAAAH+mxMREGxsbrKNgFbjeH5LgvioAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO4AdRwAAAAAAAAAAAAA7gB1HAAAAAAAAAAAAADuAHUcAAAAAAAAAAAAAO7Ay57DdHR0fPjwobS0tKKior6+vqmpqbm5ubm5WUJCQkREREREZPTo0SoqKioqKmPGjGFPSABwNcgpAKj4+fNnWVlZSUnJp0+fmpubGxoampqaEAQRFRVFc0ReXl5VVVVFRWXYsGFYBwsAN/n8+XNpaWlZWVlNTQ163mloaEDPO6KioiNGjFBUVFRTU1NSUuLn58c6WAAAAGBoYmEdp7Gx8eHDh5mZmZmZmcXFxV1dXTgcTlZWduTIkeTzfUVFBXr9WVVV1dDQgCAIgUDQ09MzMDAwMDDQ0dHh4eFhXYQAcBfIKQCo+Pfff9HsyMrKqqqqQhBEQEBAXl6eXLtBEKSurg6t6Xz8+LG9vR1BEDk5ublz56IJoqCggPFzAIDzdHV1PX/+HE2uvLw8tCQ6fPhwWVlZ9LwjISFRW1uL1nRqa2urq6tJJBIvL6+6urqBgYGhoeHs2bPFxMSwfh4AAADA0IEjkUjM3WNHR0daWlpkZOTt27e7uromTZpkYGAwY8YMdGiAkJBQfxvW19eXlpa+efPm4cOHGRkZX79+HTlypK2t7cqVK7W0tJgbJABcBHIKACpqa2vj4uIiIyNfvHghLCysr68/d+7cKVOmqKiojBs3rr/CZXd396dPn8rKygoLCzMzM3Nzc1tbW6dMmbJy5UpbW1tpaWk2PwsAOFBhYWFUVFRcXFxdXZ2MjAxakZkwYYKampqUlFR/W7W2tpaVlZWWlubl5WVmZr5+/ZqPj8/c3NzJycnc3BwG6QAAOFBiYqKNjQ3WUbAK06/3AUcgMU9dXd3ff/89fPhwPB5vbGwcFRVVX19P997evHmzf//+8ePHIwiiqal55cqVzs5OJkYLAOeDnAKAiqdPn1pYWPDy8oqLi69ZsyYjI6O9vZ2+XbW1tT148GD16tViYmK8vLzLly9//vw5c6MFgFt0dnZGR0draGggCKKionLgwIF3797Rvbe6urrIyMh58+bh8XhJSUkfHx9GTmQAAMAKCQkJGF+TsxLWry5gCeaMx/n69WtAQMCFCxdERETc3NxWrVolKyvL+G5R+fn5ISEh8fHx48aN8/b2dnZ25uVlU1sfALACOQUAFXl5eX5+fnfv3tXR0fHw8Fi6dCmVgWmD0trampKSEhQU9OzZM1NT07179+rp6TFlzwBwvq6urkuXLgUGBlZWVtra2m7YsIGJv/9VVVURERGnTp1qaWlxdXX18vIaOXIks3YOAAA0IpFI3759+/79+7dv39D/1NXVvX379sqVK1iHxipMud4HnIbROk53d/fZs2f37t0rKiq6c+fOtWvXCgsLMys4ShUVFQEBAZGRkRMmTAgJCYEP1mCogpwCgIra2lpPT8/o6OhZs2b9/fffJiYmLDrQnTt3/P39c3NznZycAgMD4U4rMOTl5uZu3LixpKRk1apVnp6eioqKrDhKS0tLWFjYsWPHmpubDxw4sGHDBujaBgBgll+/ftXV1ZHLNOi/vZdQXv8SCARpaWlxcfHCwkIMI2cpqOMMSQzVcYqKilxcXN68ebNjxw4fHx8WXW1SKi0t3bx584MHD1xcXIKCgggEAquPCAA7QU4BQEVYWJiXlxeBQAgODrawsGDDEa9evbp169bm5uYjR46sWbOGDUcEgP1+/fq1bdu2y5cvGxsbnzlzBr39lqWam5sPHjwYFBSkrq5+8eLFyZMns/qIAACu1tra2kChpqbmy5cvPZZUVVV1dHSQNxEUFJSgMHr0aBkZmR5LZGVlBQQEEOiPA7gQ/XWcs2fPbt++XU9P7/z586qqqswNi7qEhAR3d3cxMbGEhARo1wqGDMgpAPrT2Ni4Zs2a69eve3h47Nu3D518ij2ampp8fX1PnDhhZWUVFhYG0+6AIaawsNDGxqapqenUqVNWVlbsPHRJScm6deuePHkSFBS0YcMGdh4aAMA5GhoaehdlKJfU1NSgc7CSSUhI9C7K9F5CewxQxwFch546TlNTk7Ozc0pKyp49e/bs2YPH41kRGXU1NTX29vb5+fnBwcHr1q1jfwAAMBHkFABUFBUVWVlZNTc3x8TEGBoaYhJDenq6g4MDgUBITk7W1NTEJAYAmC4kJMTDw2PmzJlXrlwZNWoU+wPo7u728/M7ePCgpaXlpUuX2FmiBQCwGjqIpndRhvLH2tpaIpFI3gQdRNNnUYa8ZNSoUUz/qAx1HMB1Bl3Hqa+vNzc3r6ysjI+PNzAwYFFYtOju7t6/f//Bgwe9vb39/f1xOByGwQBAN8gpAKjIyMhYunSpjo5OXFwctl1Ra2pqbG1ti4qKUlJSsE1VABhHIpG8vb2PHj26b9++3bt3Y9uk5sGDB7a2tgoKCmlpaVRmNAcAcAjyXU593t+ELqmvr+/q6iJvQnmXU48yDflHaWlprGbegDoO4DqDq+N8+vTJxMSkvb397t27KioqrAuLdtHR0S4uLra2tuHh4Xx8fFiHA8DgQE4BQEVKSoqtra25uXlMTIygoCDW4SAdHR1OTk7Xrl2Ljo62trbGOhwA6NTd3b1hw4bLly+HhoauXr0a63AQBEEqKipMTExIJNLdu3eVlJSwDgeAPxSr29BwLKjjAK4ziJJndXX1nDlzhg0blpWVhcng2z45OjoOHz7c2tq6u7s7OjoaRhAALgI5BQAVycnJK1as2LRp04kTJzC52bA3fn7+mJgYNzc3Ozs7Hh6e5cuXYx0RAINGJBKdnJxSUlJSU1PNzMywDuf/KSoqPnz40NTUdN68ebm5ubKyslhHBMBQw3gbGkVFRQbb0AAAmIXW8TiNjY1z5szp6up6+PDh8OHDWR3WYGVkZJibm7u4uJw9exbrWAaWn58fFBSEdRRDWVJSEtYhDAxyiokgp2inp6fn4eGBdRQDy8zMNDc3X716NWf+Bm7bti0kJOTWrVvGxsZYxzKwoKCg/Px8rKMY+jw8PPT09LCOYmDbt28/c+ZMamqqiYkJ1rH09P3799mzZ+NwOM48MwLAmbioDQ3HgvE4gOvQNB6nra3N3Ny8oaEhNzeXM0+rhoaGERER9vb28vLyO3fuxDqcAXz+/Dk5OdnS0hLrQIagqqqqgoICrKMYGOQUc0FO0YgrsgNBkBcvXixdunTZsmWnT5/GOpa+HT9+vKamxtLS8uHDh5zf9jg/P7+goEBXVxfrQIay5ORkKysrzq/jBAYGBgcHx8fHc2ARB0EQSUnJO3fu6OvrL168+MGDBxx+IwYArMZ4GxpFRUWOakMDAGAWmnLYw8PjzZs3BQUFcnJyrA6IbitWrPjy5Yunp6eOjg5XdKDkijEjXIdbqumQU6wAOTUgNk8qTJ/GxkZLS0sdHZ2IiAiO/SYQj8dHRUXNnz/fysrq2bNnnD8Zua6uLiQIS3HFLagPHjz4+++/T5w4wcl/CsaMGXPnzh09PT103BDW4QDAEoy3oVFUVNTX1+e6NjQAAGYZuI6TlJR07ty52NhYNTU1NgTECA8Pj7y8PHQ+ERkZGazDAaBvkFMAULFx48ampqYrV67w8/NjHQs1/Pz8CQkJWlpaa9euTUhIwDocAAZQV1fn6Oi4fPlyNzc3rGMZwIQJE8LDw62trfX19W1tbbEOB4DBgTY0AAA2GKCO8+nTpzVr1mzevJlbzqPh4eHa2tqrV6++ffs21rEA0AfIKQCoCAsLS0hIuHfvHlfUDUeOHBkVFWViYnLx4kUXFxeswwGgXyQSycHBQUREJDw8HOtYaGJlZbV+/foNGzbo6+uPHTsW63AAQBBmtKEh3+X0x7ahAQAwywB1HHd399GjRx87dow90TBu2LBh0dHRs2bNio+PX7FiBdbhANAT5BQA/amtrfX29t6+fbuhoSHWsdDKyMho69atnp6eixcvHjFiBNbhANC32NjYBw8e5OXlcf49gGQnTpzIyMjYtm3b1atXsY4FDHHQhgYAwHWo/XG5c+fOjRs30tPTuetOyxkzZqxatWrbtm1mZmbi4uJYhwPAf0FOAUCFp6enqKjonj17sA5kcHx9fRMSEry9vS9evIh1LAD04devX56enq6urtOnT8c6lkEQFBQ8c+bM/Pnz09LSFixYgHU4gCtBGxoAwFDVbx2no6Nj48aNtra28+bNY2dATBEQEJCSkuLv73/kyBGsYwHg/0FOAUBFXl5edHR0cnKyqKgo1rEMDoFACAoKWrFiBdddJ4M/hK+vb2dnp7+/P9aBDJqxsbGVldXWrVvnz5/Px8eHdTiAs0AbGsAsHR0dNTU1WEcBwOD0W8eJjo6urq4ODAxk1pF+//6dkZHx/Pnz4uLi79+///r1S1hYWEJCYvz48dra2nPnzmXixD1SUlK7d+/evXv3zp07YaA74BBMzyl2gpwCrObn5zdr1iwLCwusA6GHtbX1yZMn/fz80tLSsI4FgP9RW1t7/vz5wMDA4cOHYx0LPY4cOaKiohITE+Ps7Ix1LIBNoA0NYJ329vaKiooP/1FSUlJaWlpTU0P56wQAV+i7jtPd3R0YGOjk5DRmzBjGj/Hw4cNTp06lpaW1tbX1tw4Oh9PX11+7dq29vT0PDw/jB3V1dT18+HBwcDA3fgEFhh7m5hQmIKcA6xQVFd27d+/OnTtYB0I/Hx+fBQsWPH/+XFtbG+tYAPivEydOiImJrVmzButA6CQvL+/g4ODv7+/o6MiUz4cAQ9CGBrATkUh88+YNWq8pLy8vKSkpKyv7+vUriURCEERAQACHw5EvTseNG/fp0ydM4wVgcPr+q5eUlFRRUfHPP/8wuPeXL19u3bo1KytrwDVJJFJOTk5OTs6BAwcCAwMZ/0pWWFh427ZtAQEBnp6e0NEDYI5ZOYUhyCnAOv7+/jo6OvPnz8c6EPqZmZlNmTIlMDAwMTER61gA+H8/f/48d+6cj4+PkJAQ1rHQz9vbOyoq6urVq9bW1ljHAvoGbWgAB8LhcC4uLk+fPuXn5yeRSJ2dnZSPtre3o//h4+NTUFDw9PTk3no3+DP1Xce5cOHCkiVLlJWV6d4vkUj09/c/cOBAj5wZ0IcPH5YvX25tbX3+/HkJCQm6A0AQZMOGDX5+fomJiWvXrmVkPwAwjvGc4gSQU4AVamtrb9y4ER0djXUgDMHhcNu3b3d2dq6vr4d7DwGHSEhI6OrqWr9+PdaBMERFRWXRokUXLlyAOg4moA0N4FI4HO7gwYMmJiaUBcQeeHl5ZWRkMjMzc3Jy2BkbAIzro45TVVWVlZV1/fp1unfa2tpqZ2eXkpJC9x4SExNfvnx5+/ZtBQUFunciLi6+ZMmS6OhouOYE2GI8pzgE5BRghZiYGGFh4SVLlmAdCKOWLVu2cePG+Pj4LVu2YB0LAAiCIJGRkRYWFlw013h/HB0draysqqqqmNhLEUAbGjDkzZ8/X19f//Hjx5Q365Hx8vIOHz48KysLqoqAG/VRx4mMjJSQkDA1NaVvj+3t7WZmZtnZ2YwFhpSWls6YMSMvL4+RUo6jo+PChQsrKioUFRUZjAcAujGYUxwFcgowXXR0tI2NDVff94ESEhJatmxZdHQ01HEAJ/jw4UNBQYGvry/WgTDBwoULJSQkYmNjPT09sY6FC0AbGgDIAgICZs2a1Xs5Ly8vgUDIzMxk5EoTAAz18ef4+vXr1tbW/Pz89O1x1apVjBdxUF+/fjU3N8/Ly6P7Bqv58+dLSkqmpKR4eHgwJSQA6MBgTnEUyCnAXBUVFS9evAgKCsI6EOaws7ObP39+ZWXl2LFjsY4F/OmuXbs2YsSIefPmYR0IE/Dz81tYWFy7du0Pr+NAGxoABoVIJH769Gn06NH19fWUvT54eHgEBATu378/YcIEDMMDgBE96zg/f/588eKFj48PfbsLDQ2Ni4tjOKr/Kikp2bRpU2xsLH2b8/Lyzp07NzMzE645AVYYzClOAzkFmCszM1NYWHjGjBlYB8Ics2bNEhQUzMzMdHJywjoW8KfLyMiYN2/ekJnjycjI6PLly79+/aLlNrGqqipBQUEpKSk2BMYs0IYGACYikUjXr1/fu3dvSUmJqakp5UwjeDyel5f39u3blPNLWltbQwcuwF161nGysrJIJNLs2bPp2Nfnz5937tzJjKj+R1xcnI2NDd2tEwwNDb28vDo7O/n4+JgbGAC0YCSnOBPkFGCizMxMfX39IfNVsKCgoJ6eHtRxAOY6Oztzc3OHzEg3BEHmzZtHJBIfPny4cOFCKqs9efLk+PHj165d++eff4yNjdkWHhXQhgYANktPT9+1a9fz588XLFgQGxuroaGxcOHCe/fudXZ24nA4PB6fkpLS581WAHCRnnWchw8fampqSkpK0rEvPz+/379/MyOqnry9vRctWkTf6crQ0PD379+FhYXTp09nemBDRnp6urGx8evXr9XV1Wnfqrq6euzYsa6urufOneO02DgHIznFmbg0p7y9vQMDAxEEuX37NiO9imjfDyQILbKzszdu3Ih1FMxkaGh44cIFrKOg35s3b44cOZKRkVFXVzdixAglJSVTU9Ply5erqKiw4nBw9mGRZ8+eNTU1zZ07F+tAmEZSUnLSpElZWVl91nG6u7uvXbt2/Pjxx48f8/HxdXd3f/v2jdUhQRsaADhNbm7u7t27s7KyjIyMnj17NmXKFHT5oUOH0CE5OBwuOTl5aPSsBH+4nueJ169fa2lp0bGjz58/R0ZGMiOkPpSUlCQmJq5YsYKObVVUVERFRd+8ecNd15xcISoqikgkxsfHnzhxQlBQEOtwOBTdOcWxuDSnAgICnJ2d//rrL7btBxJkQD9//qyqqhpiCaKlpVVZWUnj3R+cJj4+3tnZ2d3d/eHDh7Kysg0NDVlZWTt37ty/f39bWxvW0f0XJNeAiouLCQSCsrIy1oEw0+TJk4uLi3ss/P3796VLl44ePfrlyxf0Cz90uCgjdRxoQwMA1ykoKPD3979165a+vn52dnaPgfAaGhqWlpbJyclRUVFDYH5MAJDedZzS0lL6hqFGRkZSto9iuvDwcPrqODgcTllZubS0lOkh9dDY2JiYmLh8+fLhw4ez+lgcIiIiwsrKKikp6fr167a2tliHwz5dXV2hoaFWVlbS0tIDrkx3TnEstuUUgiBRUVHTpk1TU1Njw7GY7o9NkKKios+fP5uamg7Y2xv9LVJVVWVLXGyCPp2ysjIdHR2WHujhw4ft7e2GhobMaoBSXFzs7Ozs4eFx6NAhdMnIkSNtbGwmTpw4bdo0phyCWf7Y5Lp58+aIESN0dXUHXLO0tFRFRQWHw7EhKrZRVVWlnEmjoqIiLCzs7NmzbW1t6JiX7u5u9CE8Ht9fHQfa0AAwxBQXF/v5+SUnJ+vq6j548MDQ0LDP1Q4cOGBkZGRvb8/m8ABgFRKF5uZm9I5B0uBpaGiwNE4eHp6vX7/SERiJRELb69C3Le2+fPmCIAgvL6+5uXlsbGxzc3N/ayYkJPR45ftz586d6dOnCwoKysnJLV++vKCggEQinT59Gn1NTp8+vX79enQyLxsbG3STmzdvamtrCwgISEtLr1u3rrGxEV1eX1+/Y8cOJSUlAQEBTU1NynfZy8uL8qUeN24c9V2hcnJyNDQ0ysvLEQQxNjbuEfmHDx8WL14sKSkpKiq6ZMmS/Px86sv7O1x/sTH+2jIC/V6ah4dn3rx5ERERPV4ZSozkFCdjT06RSCS0BZ26uvrRo0crKyv7W43G9/3du3cIgty+fZu8hJxiw4cPd3Bw+PLlC+X6fSZgj/1Q3tYRFxdH3pYzE8TS0tLS0nLAF4pBV65cQRCEQCC4uLhkZGR0d3f3t2ZkZKSAgEBXVxerQ2Knrq4uAQGBK1eusPpA6P19kpKSbm5u+fn5RCKxvzVpfN9tbW35+Ph+/PjR3wpw9qECQZCEhATq6zBu7dq1CILIycn5+PgUFxdTWXPhwoV2dnasjofNrl69isfjW1panj17Zmdnx8PD09/9R3x8fLNnz/bw8HByclqwYIGurq6SklKPIXI4HE5KSkpNTU1fX3/JkiUuLi7e3t7Hjh2LiIi4efNmfn5+WVkZlfM7AABzb9++dXR0xOPxGhoaiYmJWIcDhpT29vbi4uKrV68eO3Zs9+7d27Ztc3V1tbKycnZ23rRpk5eXV0BAQGRkZEFBQUNDAyYR/s+VD3px8vLly8HuhQ03ITPyCWnXrl2ampr0bUs7tI6DIAgPDw8OhxMQEFixYsXNmzc7Ojp6rEnjNefNmzfxePzu3bu/fftWXV1tZ2cnIiKCPoT2IZKXl09MTGxqajp9+jT6STolJQWHw+3Zs+fHjx8vXrxQU1MzNDREP9y7u7u7u7t/+/bt9+/fV65cERAQoPwIeP/+fQRBXr9+TV5CZVeoNWvWHDlyhEQi6enp4fH4HtfYmpqaNjY2tbW1DQ0N7u7u5Mj7W07lcL1jo4KddRwEQfB4PB6P5+PjW7Zs2dWrV1tbW3usSXdOcTj25BSJRELvuMHhcLy8vDgcTk9P79y5c9++feuxGn11HDTF/v777/r6+nfv3k2dOlVZWfnXr1+Uj/aZgJT7aWtrW7Ro0dmzZ3scizMThG11HHQUANoJW0pKatu2bU+ePOm9pp+fn6qqKqvjYb/x48cfPHiQ1UcJDAxEX2H0X1lZ2f6u7Wl83yUkJLS0tKivA2ef/jDyKYV2a9euRYdfoW+6mpra4cOHP3782HvNSZMm+fj4sDoeNnvy5AnynyFv1Bvt43A4GRmZ6dOnL1iwYOXKlR4eHv7+/uHh4devX3/06NHbt2/r6uqolJgBABzu48ePrq6uPDw8EyZMSExMpPJNBgC0+/fffy9duuTo6KikpISebfF4vJyc3KRJk3R1dY2MjKysrMzMzGbPnq2tra2oqEi+VVZaWtrU1DQwMPDJkyds+3ryf658Hj9+jCBInx8IqLt79y4zCjUD8PLyou9JBgQEKCgo0Lct7ch1HDL0Q4aoqKiDg0Nqair5TaXxmlNVVXXSpEnkH3///j18+HDy/xEEWbNmTY9NVFRU1NXVyT/evHkTQZAHDx703vmiRYvWrVtH/rH3p1Xqu2pubh42bFhVVRWJRDp79iyCIJQXLa2trQjFJ9rOzk5paWkqy6kfjpPrOGRolUFYWBh9r8nFO7pzisOxJ6dI/6njkOFwOB4eHjweb2BgEBkZSa650FfHUVVVpfytKyoqQhAkICCA/Gh/CUjeT0tLi6mp6YULF3ociGMThG11nB5t6dE/hqNHj/by8nr37h15zR07dkydOpXV8bCftra2p6cnq48SGBjYo9cGeiObsrLyvn373r9/T16Tlve9sbERQRAzMzPqq8HZpz8Iu+o4PUagoMmloaERHBxcU1NDXnPcuHFotWvIaG5uXr16Nfqs0S9R+vu4iJo1axbWIQMAmK+ystLNzU1AQEBBQSE0NHSIDekFmHj9+vXOnTsVFBQQBBESEpo3b97+/fsTExNfvnzZ+0t6St3d3RUVFXfu3AkODra1tR01ahSCIOLi4itWrEhLS+vs7GRp2P9zFkQ/nxEIBOqnxt4+fPgw2E3oQPdRCAQCiybSog5tGNTU1JSYmLh48WIZGRl3d/ecnBxatq2qqiotLaXs0SUqKvr9+3fKdXrcy1ZVVVVWVkY5OQXahvbBgwe99z98+PCysjIqR6e+q6tXr06ZMkVWVhZBEBsbGz4+voiICPLKgoKCU6dO3bVrV1JSUmtrKy8vb21tLZXlg4qcM6FnkZaWlvj4+MWLF48YMWLdunU5OTm/fv1C6MopDodVTqF/MdGpZ1etWiUpKblgwYKkpCTK2UBohKbYnDlzyEsmT54sJiaWnp6O0JaAzc3NCxYsEBcXX7NmTY+dQ4L0gP4x/PLlS1BQ0F9//aWiouLr61tRUfH79++hlx0IdgmCdl398OHDoUOHxo8fr6mpefLkya9fv9K+BxrbqcDZh3OgyfX69evt27fLysrq6emFhYX9+vVr6CWXsLAwei9hTEzMuXPnli5dKiwsjCAIHx9fn7+3dXV17A4RAMBK9fX13t7eKioqKSkpp06dKisrQ4fkYB0X4FZNTU2nTp3S1taeNGlSUlKSra1tVlZWQ0NDenr63r17raysNDQ0qM+lgMfjFRQUTExM3N3dY2Nja2pqiouLDxw4UFVVtXDhwjFjxnh4eLx//55F8f/Ptzro505RUdHB7qVHQzgWofsoBAKhsbHR2tqaufH0QGUuD/SzdX19/fnz50+dOoU2xy0rK6MyjSt6qxr1lslCQkK9Nzlz5syZM2col1dWViII8vbt2927d+fl5dXV1ZFIJARBJk+eTI44Z9AAACAASURBVP3o/e0KQZDLly87Ojqi/5eUlDQ1Nb158+ajR49mzZqFLrx79+7Bgwe3bt3q4OBgZGS0d+9e9MNxn8sHPNxgsfq9JhKJ/T2EFhQaGxsvX74cFhaGvoOfPn0aYt2vCQTCz58/Wf06IwjSo3RChjazJBKJ9+7du337NjoqITMzc86cOQN+SYvqM8UkJSXR5bQk4JYtWzQ1NZOTkx8/ftxj6i5OTpCSkhJWv3HofS59PoRec3748MHf39/Pz09SUlJWVvb79++SkpIsDYnN0IIgq1/n0tJS6q8zem3v4eEhJSU1btw46lNoiYmJSUhI1NTU0HJoOPv06cSJE8nJyXRsSLsXL170uRytcSMI8uTJkydPnmzZsqWrq6ukpKStrW0ozeeFVqZERETs7OxcXV07Ojry8/MfPHhw586dwsLC7u5ufn5+8hxS/Z0+AABc58ePH6dOnQoKChISEvL19XV3dx9Kf9kA+/348eP06dOnTp3q6OiwtrYOCgqaPXs2U2YGmDhx4sSJE7ds2VJRUXHlypWoqKhTp05ZW1vv2rVr0qRJjO+fEk0XPANiz3SkLS0tbDgKh5CSkkIQ5MePH4PdpPdg/ujo6M7OTiMjo8+fP2dlZaFDvJycnPq7AKC+KwRBPn36lJWVtXr1atx/oAPRKb8UlZCQOH78eHV1dXZ2dltb2+zZs9GelH0up344AFihzxT7/v07upyWBNy9e3dqaqqmpubKlSsp/zpBggAuZW5uXlxc/PPnz8FuCGcfgAl+fv45c+b4+fk9efLkx48fqamp69evHz9+PPooHb/JAHCd7u7uT58+PX/+PDs7Oy0tLSkp6f79+/n5+a9evaqvr8c6OiZoamoKDAxUUlI6c+aMj4/Px48fvby8oIgD6NbS0rJ37155eflTp065ubl9+vTp4sWLc+bMoVLEqa+vf/XqVV5e3v3795OSktLS0rKzs58/f15ZWUmeJLE3RUXFvXv3lpWVxcTEvHnzRlNTc9myZegHEqah/OCC3lDw/fv3nndfDQQd6cpq8+fPH2xgqLNnz0pJSdG3Le1698chQ3sWjBgxws3N7dGjR7T3x6G8ab+6ulpAQADt8IqOnOrdlUNNTc3AwIByiYaGRnx8fElJCYIgR48eJS9fsWIFZZ9adAw5ZReA/nZFIpF8fX3t7e0pH2pqapKSkhIVFW1qaiKRSDU1NZSRo7+y8fHx/S2nfrjesVGBVX8cMrRzgbi4uKur66NHj9D2CnTkFIdjT06RevXHIUO75PDx8ZmbmycmJsbExNDyvvfujzNx4kTyo7374/SXgJT7efPmjaCg4KZNm8hrcnKCYNUfhwzt5TF+/Ph9+/aVl5evW7fO0NCQ1fGw39y5czds2MDqo/Tuj9PjdSb3TKHxfX/79q2goGDv5rhBQUFiYmLo3zE4+/QHwag/DorcO0xXVzc0NLSxsXH48OHnzp1jdTxshl6XZmRkUF/ty5cv0dHRzs7OLS0t7AkMALbp7OzMzc09ePCghYXFxIkT+zsLoIYPH66rq7tq1aoLFy58+PAB69gHp6mpKTg4WFpamkAgeHl5/fz5E+uIANe7ceOGvLy8uLh4YGAguclmb+/fvw8LC1u1atX06dPRqTn7IyAgoK6uvnz5cn9//7y8vP4a4hCJxNTU1EmTJgkKCu7bt496zx3aMafPcXh4OJVnyCy2trb0PcmAgABFRUX6tqUd0/scU06X8/HjRxMTE1dXV/Sh/j5Jp6Wl8fDwHD58uL6+vr6+ftu2bRMmTGhtbW1raxsxYoSGhsabN29aW1vv3r0rLi5O+Un67du3CIIkJSXV19ePGjXq6dOn/e2KSCQqKSm9ffu2x6H9/f0RBImIiCCRSOjI/KCgoMbGxoaGBk9PT0FBwfLy8v6WU4m8z9iovGjQ55g92JNTJBb3OSbPV/Xt27eSkpJp06YpKyuTZ5mlkoA99nPixAkcDnfv3j0SicThCQJ9jtlDW1ub7sb8tGNun2NUcnKykJCQt7f3v//+29HR8fHjx4MHDwoKCkZHR6MrwNmnPwj0OWa9iooKBEGovxEADEnNzc1XrlxZuHAh2v5CVlbWysrKx8cnOjo6Ly+vvLy8trYWLWf/+PHj8+fPJSUl6enpZ8+edXNzMzIyEhERQRBk7Nix69evz83NxfrZDKC9vT00NFRGRkZERMTLy+vHjx9YRwS43tevXxcvXozD4ezt7SnPlWREIjEnJ2fdunVjxoxBEERERMTIyMjd3T0kJCQ9Pb2kpOTz58/or2JTU9PXr1/Ly8vz8vKioqJ8fHysrKzQtn0EAmHRokUxMTF9fovQ2dl5/PhxAoGgpKSUlZXF+JNizrzj+fn5A9RgmMHf35++J8ml846TSKTbt29PmzZNQEBg9OjRHh4e6CfLuLg4ypelx5T1d+/e1dXVFRAQGDlypJ2d3efPn9HlT548mTVrlqio6JgxY1xdXS0tLdHNyb/KGzduFBcXFxMT27hxY3+7omydUFRURD6ol5cXebmJiQmJRLp165axsbGkpKSYmNjMmTPJU430t5xK5H3G1h+Yd5w9uHHeccrfUvJX+uQUk5CQsLe3//LlC+UmfSbg0aNHyfvZtGnT7du3yT+OHDmSwxOEA+cdV1FRYXU87KesrMyN846j3rx54+joKCMjw8/PLysra2FhkZOTgz4EZx8qEA6bd1xDQ2PozTuOjppEO0MB8IcoLCx0dnYmEAh8fHyLFy8+f/48HSnQ3t7+6NEjX19ftEMHepLiwNHiHR0dkZGRCgoK/Pz8rq6ufV5vAzBYDx48GDVqlJKSUp/DOb99++bn56ekpIQgiIaGhp+f36NHj3pfvw+opKTk3LlzCxcu5OPjExMTW716NeXHFbKqqqqlS5fy8PD4+fl1d3fT83z+43+ufFpaWvB4/PXr1we7l5aWlj4H+jLXnTt36HuSNjY2S5cupW9b2qF1HF5eXnNz89jY2Obm5v7WZE+t4c/EzjoODw/PvHnzIiIiyCM4eqM7pzgce3KKRCJpa2sjCKKurn706FG0e26fIKdoxLY6DoIgBALBxcUlIyODylkqKipKQEBgiE0a2tXVxc/PHxMTw+oDoXc0S0pKurm55efnE4nE/tZkz/v+h2NbHQdBEDk5uf5qdmSLFi2ys7NjdTxslpycjMfjmTUiHQAOl5OTY25ujsPh0MkH0VbxjCsqKtq2bZukpKSoqOiOHTs4pFbS3d2dmJiorKzMx8fn6upaVVWFdURgKOjq6vL19eXh4bGysup9vfbly5ft27eLioqi3zi+ePGCKQetra0NDg7W1NTE4XALFizocwTcqVOnBAQEjIyMamtr6T5QzyufsWPHBgYG0rEjY2NjlhZxCAQC3WfuyZMns2GI+8+fP8PCwmipbcM1J+uw57Xt7Ow8c+YMjYlHd05xMvbkFIlEioyMpLwNpz+QUzRiz/V8YWHhjRs32tvbB1wTvfGwoqKC1SGxEzrBJBtu/cjOzr537x4tVTCo47ABe+o4qamp+fn5tKy5Y8cObW1tVsfDZocOHVJQUMA6CgBYrry8fMGCBQiC6Ovr//PPP6w4xO/fv48dOyYjIyMkJLR//34My6No6xANDQ08Hm9lZcV1fXwAx2pra7O0tBQUFDx79myPh1pbW/ft2ycoKCgjI3P8+HH0nkTmIhKJaWlpM2bMQBBk0aJFvT/rPnv2TElJSUFBge5Bpj1bUaqqqpaWltJRZ7GxsWGkTDOgxYsX09ecnEQiffjwgcoM38wiLi6+du3aITa9NOgTLy/vpk2b0PnjB0R3TnEstuUUgiArV65UU1Njw4EAE2lpaS1evBjt1UKdqqoqgiBDLEHQp8OGBJk9e7axsTF6lw34QyxatEhXV5eWNVVVVcvKykj9Tw3GjUpLS9HBbuinXqzDQRAEwQGOhPXvBf3a29sPHDigrq7+77//pqen5+TkmJmZseJAoqKi27dvr6io2L9//9GjRzU0NO7evcuKA1GXnp6uo6OzdOlSVVXVd+/eJSYmore3AMCgpqamxYsXp6en3717d+PGjZQP3b59W11d/fjx4wcOHPj33389PDzQBlLMhcPhzM3Nc3Nz79279+HDB3V1dX9//46ODvIK2traT58+lZGR0dPTo69HTc+bodTV1bOysujY0YoVK3bt2sW6Ke7c3Nzo27C0tLSpqUldXZ258QBAI7pzimNBTgFmERcXl5OTKywsNDU1xToWpikqKho7dqyYmBjWgYA/mrq6+u/fvz98+ECeh3sIKCoqampqWrVqVWdnp7i4uLa29tT/GDt2LFZRbd26VU9PD6ujgx7y8/ODg4OxjoJOHz9+XLFixevXrz09PXft2kV9LiqmEBQU3Llzp729vbe3t6mpqaOjY2hoqJCQEKuPiyBITk6Oj4/Pw4cPjYyMnj171t/8pADQ4fv37/Pnz6+pqcnOztbQ0CAvb29v9/T0PHXq1MKFCzMyMthz4jA2Nn758mVISMiePXuuXbuWkJCgrKyMPiQhIXHv3j1LS8v58+enpqYaGBgMas896zhz5sw5efLkt2/fpKSkBrUjERGR7du3e3t7D2orGpmZmU2bNo2+bTMyMggEAvx1AFihO6c4FuQUYKK5c+dmZWX9/fffWAfCNBkZGYM9EwPAdDo6OgQCITMzc8jUcb5//15cXHzjxg1TU9PS0tLnz58/f/48JyfnxIkTHR0dw4YNmzhx4syZM/X19adOnTpq1CgGD9fR0dHa2iouLj7gmnp6etbW1gweDjARl9Zxrl275uLioqio+PLlS/JlHnuMHj06Kipq2bJlq1evfvPmDeV1Jivk5+fv3r07IyPDyMjoyZMnU6dOZd2xwB+oubl5wYIFP378yM3NVVBQIC9H66Rv376Ni4tbsWIFO0Pi4+Nzd3dfunSpjY3NlClTwsLCyAGIiIikpqY6OjouWbIkIyNDR0eH9t32vK9q7ty5OBzu4cOHdITo7u6ODpJnLgEBgaCgILo3z8jImDNnDjqzAwDsx0hOcSbIKcBEBgYGubm57e3tWAfCHG1tbfn5+VDHAZjj5eXV19fPzMzEOhCmefDgAR6Pnz17Ni8v78SJE1euXHny5MmcnJwfP36gE/EoKirevHlz6dKlMjIyo0ePXrRoka+v782bN799+0bH4Z4/f66qqnrlyhUOuYELDG2BgYHLly9ftGhRTk4Om4s4ZMuWLSsqKuLl5Z06dWpOTg4rDvHq1Stra+sZM2a0t7dnZGTcv38fijiAuTo7O62srMrLy+/cuUNZxCkoKNDR0ens7CwsLGRzEYds3Lhx2dnZq1atsrW1pRz7wsfHFx0dPXPmTDMzs0G1GuhZxxEXF9fS0rp//z4dwQkKCl6+fJnp9+r7+fnR3SCjq6srKyvL0NCQuSEBQDtGcooDQU4B5jI0NGxpacnNzcU6EOZ4+PBhW1sbJAjgBIaGhuiEcVgHwhz379/X0dHpfceiiIjIzJkz3d3do6Ki3rx509DQ8OjRIy8vLwkJiaSkpMWLF48YMYJc1klPT29ubqblcM+ePauvr1+5cuWMGTNevXrFgicEAIIgSHd39/r163fv3n3x4sWoqCj23NPUH3l5+aysrLlz586fP//mzZtM3PPbt2+tra0nT55cWVmZmpqak5MDX3gAVnBxccnJyblz5w7l4JLU1FRDQ8M5c+bk5uZiVSdFCQgInDx5MjQ09NixYxs2bCCfoPn4+JKSkhQVFc3MzOrq6mjcW886DoIgFhYWSUlJlG14aKenp3f69Gk6NuyPjY3Nzp076d78zp07P378WLJkCRNDAmCwGMkpTgM5BZhLXl5+ypQpcXFxWAfCHLGxsdOmTRszZgzWgQCAWFhY1NfXp6enYx0IE3R0dFy/ft3CwmLANcXExCjLOl++fElNTXV1dUUQ5Ny5c8bGxuLi4pTDedra2vrcz+PHj/F4PDqliJaWlpubW2NjI5OfFfjjdXd329vbR0VFJScnr169GutwEARBhISEkpOT7e3tLSws4uPjGd/hv//+u27dOg0NjXfv3iUkJOTn5y9atIjx3QLQW0hISGxsbHJysra2NnlhfHz88uXLHR0dExMT6Zs0ielcXV2TkpIiIiIcHBzIpRwREZG0tDQcDufo6EgkEmnZT8/+OAiCrFy5cs+ePbdv36bvUm3Dhg21tbX79++nY9sejI2NIyMjGWk7Hx0dPWvWLEVFRcaDAYBuDOYUR4GcAkzn6Oi4b9++kydPCgsLYx0LQ1paWq5du3bo0CGsAwEAQRBESUlJT08vOjraxMQE61gYdfPmzYaGBltb28FuKCMjs2jRIvJ145cvX57/h5+f348fP/j4+MaPH6+tra2trT1z5szJkyej48rz8vK6uroQBEH/PXfuXGxsbFBQkKOjI1dPhwQ4yqZNm1JTU//555+5c+diHct/8fDwhIWFEQgEJycnCQkJuv+AVFZW+vv7X7p0SVlZ+dKlSw4ODnh8HwMImKKqqiovL49FOwcIgnB+F7BXr17t2LFjz5498+fPJy+8c+fOypUr3d3djx07hmFsvS1btuyff/4xNzffvHnzuXPn0IVSUlIJCQkzZ848fPiwj4/PwHvpczbyefPmLVu2jL6ZzFEhISEM3mC1cuXKjo4ORmJoaGgQEhK6cOECIzthhYSEhP5eecAgjn1tGc8pTgA5xe0sLS0tLS2xjqKn2tpaXl7emJgYrANhVHR0NB8fX11dHdaB9MSZ7/sQgyBIQkIC1lH0dP78eWFh4Z8/f2IdCKOWLFlibGzM3H12d3e/ffs2Kipqy5Ytenp66Pe0oqKis2fP3rJlS+9iDTqhta6u7suXL8k74cz3/U/GRZ8H9uzZw8PDc/XqVawD6RuRSFy1apWwsHBubu5gt62trfXy8hIUFBw3blxoaGhnZycrIqSEvu+AdVj9DjKosbFRWVnZ0NCwu7ubvPDx48eioqIODg5EIhHD2KhITU3l5eXdt28f5cKTJ0/y8vJmZ2cPuHnf70p8fDwPD09ZWRkjkeXm5qqoqNDxiyIuLn7x4kVGDo3y9/cXFxfnwI8vXHSO4Toc+9oyJacwBznF7Tj2en758uXa2tpYR8EQIpGopaVlZWWFdSB94Nj3fShBOPJ6vqGhQUxMLCAgAOtAGFJSUsLDw5OYmMjSo3R0dBQWFoaFha1du5ZKAwVeXl48Hr9lyxb0VMiZ7/ufjFs+D8THx+NwOKZc77BOR0eHmZnZqFGjvn79SuMm37598/LyEhISkpOTCw4ObmtrY2mEZNzyvnMjrnht3dzcpKSkampqyEtqampGjhy5cOFCNpQRGREWFobD4ShPcEQicfHixePHj29tbaW+bd/D2ywtLZWUlAIDA+mowpDNmDHj5cuXAQEBtE+3zM/Pv379+rdv3zJ+j2hzc3NwcPDmzZtpmTMSAFZjSk5hC3IKsI6Pj09hYeHdu3exDoR+aWlpRUVFXl5eWAcCwH8NGzZsw4YNQUFBLS0tWMdCv8OHDysrKy9fvpylR+Hj49PS0lq7di1ayulvTsauri4ikXju3DklJaWwsDCWhgSGqg8fPqxbt27z5s0c0hOnP3x8fAkJCWJiYra2tgN2TP/9+3dgYKCSktLFixf37dtXVlbm7u4uICDAnlDBn+z169chISFHjhwZNWoUuoRIJK5cuZJAIMTExPDy9tFGhnOsXbt2/fr1Li4uZWVl6BIcDnf27NmampojR45Q37bvOg4PD4+Xl1d0dHRlZSUjkQkKCnp5eX38+DE8PNzY2JjK66ipqenv719eXn7u3LnRo0czclBUaGhoS0vL1q1bGd8VAIxjVk5hCHIKsI6WlpaJicnBgwexDoR+hw4dWrBgAWVrPQA4gYeHR1NTU3h4ONaB0Onff/+NjY3dtWsX6zpr9PbkyRPqbSa7urq+f/++bt06BEG497QOMNHe3m5tba2srHz06FGsYxkYeiWcl5d3+PDh/tZpbm4ODAwcN27ckSNHtm7dWl5ejg7JYWec4I9FJBLXrVs3ffp0Z2dn8sIDBw48evQoMTGx9xSHHCgoKEhZWdnOzo48JY6cnNzevXsDAgIqKiqobNjvSdHBwUFOTs7T05Px4ERERFxcXO7du/fr16/8/PwLFy4EBAT4+PgcPHjw7Nmz9+7d+/79+4sXL/7++285OTnGD4cgSH19vb+//6ZNm2gfCgQAqzExp9gPcgqw2t69e3Nzc69evYp1IPRISEh4/Pjx3r17sQ4EgJ6kpaXXr19/4MCB79+/Yx0LPXbu3CkvL29nZ8fOgxYUFPQefYDH4/n4+MjlJH5+frTlf3Z2dm1tLTvDA1ztyJEj79+/T0hI4JaxKjo6OgEBAX5+fm/fvu3xUEdHR1hYmLKy8sGDB11dXcvLy319fbniyhkMGbGxsU+fPg0JCSE3NSsuLvb39z9y5IiWlha2sdFIUFAwISHh3bt3lM2Yt27dqqSkNMC03VTuubpz5w6CIP/88w9zbv9io1WrVsnIyHBgFw8UV9xnyKU4/LWFnGIRDn/fOQeH90lxcnKSk5P7/fs31oEMzq9fv2RlZdesWYN1IP3i8Pd9aEA4uE/Kr1+/Ro8e7erqinUgg4bea5mWlsbOg9bX1yMIQjlZh6Sk5NSpU9GZ9SIjIx89evTlyxd0ZU5+3/9MHP554OPHj8LCwkeOHME6kMHp7u6eNm3arFmzyP1iOzo6QkNDZWVlhYWF3dzcaG+gwyIc/r5zNU5+bbu7uydOnOjk5EReQiQS586dq6OjQ9nwmCv4+/sLCQlVVFSQl1y/fh2Hw7169aq/TajdMGZiYrJs2bJt27YZGBhwyHTrtMjNzY2IiEhISIAuHoDTQE4BQMWRI0fU1NT279/PFaPNyfbt29fW1kZlzDkA2CIQCMeOHXNwcFi1apWuri7W4dCqtbV18+bNlpaW5ubm7DxuXV3dli1bFCkICwuzMwAwhG3atEleXp7rblHH4/GnT5/W09OLi4tbsWLF1atXd+3a9fnzZ2dnZ19fXxkZGawDBH+oa9euvXv3jnK2sujo6EePHj1+/Jidt+IyxY4dO6Kjo7dt25aSkoIuWbJkibq6ekBAQExMTJ+bDND4Jzg4WENDw8PDIyQkhMnBssbPnz8dHR3NzMysrKywjgWAPkBOAdAfaWnpo0ePurq6mpiYGBkZYR0OTe7du3fy5MmLFy/CLYeAk9na2kZGRjo4ODx//pxbKvJbt26tr68/ceIEm487YcKEU6dOsfmg4E+Qm5ublpaWnp7eXxdtTjZt2jRnZ2dvb29fX9+PHz86Ozvv2bNnzJgxWMcF/miBgYHLly+fOHEi+mNnZ+e+fftcXFxobFbY2Njo7u7OygCRSZMmbd++nZY1+fn5g4ODTU1NHz9+PH36dARBcDjcrl27HB0dfX19x48f33uTAeo4Y8eODQ8Pt7KymjlzJptvTqYDiURycXFpaWm5ePEi1rEA0DfIKQCocHFxyczMtLe3LyoqYkrPe5aqra11cnKytLSk7K4HAGeKiorS0tJas2ZNUlIS1rEMLDEx8cKFC8nJyczqnAgA5vz9/fX09ObNm4d1IHTy8fGJioqaN2/e7du3lZSUsA4H/Ony8vKePXt27tw58pKYmJjq6updu3bRuIfW1tbIyEjWRPf/TExMaKzjoCvr6+v7+/unpqaiS6ytrX18fM6fP3/8+PHe6w884sjS0nLz5s0bNmzo3d2K0xw7duzGjRsJCQnkWccA4ECQUwBQERISIi4uTtm3nzO1t7dbWVmJiYlx70xA4I8iLS0dExNz/fp19o9wGazi4uI1a9Zs2bLFwsIC61gAYI6XL1/euXOHq9vhKyoq2traVlZWKigoYB0LAEhUVNTEiRN1dHTQH4lE4tGjRx0cHOTl5TGNiyHe3t63bt0qLCxEf+Th4Vm5cmVMTExXV1fvlWmaUP3YsWMvXrwwNTXNzc3l2BF0sbGx3t7eR48enTNnDtax0ATuUmGFqqoqrEOgCeQUK0BODaigoIDzu2OIiYklJyfPnj175cqVsbGxnHmHM5FIdHR0fPXqVU5ODoFAwDqcgRUUFECCgLlz5wYEBOzYsUNGRmbFihVYh9O3yspKU1NTLS0t7uqT1R81NbXS0tL+HkUnb2VnPAiCPH/+3M3N7cWLFy0tLbKysox8cKqurh47dqyrqyvlV+JMl56ebmxs/Pr1a3V1ddYdhdVOnjypqalpYmKCdSAM2bVr18SJE9PT0+fPn491LOCP1tHRkZyc7O3tTV5y7969d+/ecem0p2QLFiyYNGlSSEgI+TtCJycnPz+/9PR0U1PTHivT9PlYQEDg1q1bkpKS8+bNq6urY3K8zJCRkbF69ert27d7eHhgHcvAxowZY2lpiXUUQ5OcnBxXvLaQU8wFOUUjXV1dPT09rKMYmIaGxo0bN27cuLFp0yasY+mbh4fHjRs3kpOTueK6Qk9Pj/Prd9zO0tKSY4vylHbs2LFt27aVK1ei8ydymu/fv5uamkpISKSkpPDz82MdDnP8+++/6NwiaGWK/CNWA6Ps7e1lZWVra2vfvn3LYAvnqKgoIpEYHx/f1tbGrPCGpNbW1mvXrq1evZo8NTKX+uuvv3R1daOjo7EOBPzpUlNTf/78SdmhIioqSl9fX01NDcOoGIfD4ZydnZOSklpbW9ElCgoKM2bMiIqK6mNt2mfDqqqqGjdunIaGBnm2RQ5x8+ZNYWFhR0dH8mR4AHAFyCkAqEhOTubh4dm8eTNHTR7Z3d29adMmHh6ea9euYR0LAPQgEon29vbCwsK3bt3COpb/UV1draGhIS8vX11djXUstEIGmndcVVWVSh3Hx8eHxQH2hF4bhIaGMmVvKioq6EC/2NhYpuywT/fv30cQ5PXr17SszJlzJF+5coWXlxfzybmZIiQkRERE5NevX1gH8j84830fGjjztXV23a7yqQAAIABJREFUdp4zZw75x8bGRmFh4cH+ZaupqWF1XcbExGSwT622tpaXlzc+Pp68JDg4WEJCoqurq8eagxivLisrm52d3dHRMWPGjLKyMtY94UGJioqysLCwsrK6dOkStxe5wZ8GcgoAKpYvX56cnBweHm5packhX/Z2dHTY2dmFh4fHxsYuW7YM63AAoAcOh4uMjLS3t1+yZAnn9LAvLy+fM2dOZ2dndnY25/c4p11JSUl/zRq2bt168ODBM2fO4HA4HA535syZDRs2DB8+HIfDoXe9ffv2befOncrKyoKCgpMnT75x4wZ5W/JW58+fd3NzExcXl5WV9fPzI69QXl6+ZMkSKSkpAoGwdOnSgoICdCshISEEQdatW4fD4cij9G/duqWjoyMoKDhy5Mj169f/+vWL8hC9A0Pl5uYKCgoGBAQgCHL58uUez67PAKgs7y8Mb29vY2NjBEEmTZqEw+G4tPNFXFycmZnZyJEjsQ6ECWxsbDo7O2/evIl1IOCPlpmZaWhoSP4xJSWFSCRaW1tjGBKzSEtLGxsbx8XFkZcYGho2NDS8ePGi56qDLRHV19dPmzZtxIgR6enpg92Wubq6unx8fHA43O7du2HUAOBekFMAUJGRkSEmJjZ37tyamhpsI6murp41a9awYcOys7OxjQQAxhGJxF27duFwuL179/b+lo/N7t27JyUlpaen9+3bN2wjGSxkoPE4lHqMxyH7/fs3giDy8vKJiYlNTU2nT5+2sbEhkUju7u7u7u7fvn37/fv3lStXBAQEiouLe2yF3oX669evkydPIgiSlZWFPqqpqWljY1NbW9vQ0ODu7i4iIkK51YULF8j7SUlJweFwe/bs+fHjx4sXL9TU1AwNDdHPAP0FhlqzZs2RI0dIJJKenh4ej6+srKR8Uv0F0N9yKmFw+3iczs5OAoFw/vx5rANhmtmzZ69atQrrKP4HB77vQwYHvrYfPnxAEOTRo0fkJY6OjvPmzRvsfjhzPA6JRDpz5gyBQOjs7ER/JBKJI0eORP/eUqLnXWlqarKxscHj8Rie+6urq+fMmSMkJBQeHo5JAAAwEeQUAFS8fPly/PjxI0eOvH//PlYx3L17V1paWlVVlcZrCQC4QmhoqKCgoIGBAVa396LfH+DxeDs7u+bmZkxiYAQT6zhr1qyhvvmiRYvWrVvXY6vVq1ejP3Z1dQkLCx84cID0n5unyIF1dnZKS0tTbkVZx1FRUVFXVyf/iI6zePDgAfXAmpubhw0bVlVVRSKRzp49iyDIwYMHyY/2FwCVwKiEwe11nNzcXARBysrKsA6EaXx9fceOHYt1FP+DA9/3IYMDX9vw8HBhYeH29nbyEjk5Oco/QTTi2DoOOqPx48ePyUtsbGzMzMx6rEbPPCAiIiLx8fFnz549cuSIgYEB++dOjo2NnTx58tevXwsKClxcXNh8dACYDnIKACo0NDSeP39uYGBgYmKyY8eOpqYmdh799+/f27ZtMzMzMzIyevr0KVc0NgaARq6urvn5+dXV1ZMnT46Pj2fz0d+8eTNnzpygoKDz58/HxMQw2HOX22loaFBfYfjw4b1vwZ40aRL6Hx4eHikpKXTmBEFBwalTp+7atQttlsnLy1tbW9vnPquqqsrKyubOnUteMn36dARBHjx4QD2wq1evTpkyRVZWFkEQGxsbPj6+iIgI8qP9BdDfclrC4DSPHz9G61wDyszMlJOTGz9+PKtDYhtDQ8PKysry8nKsAxmcqqoqHAUeHp7hw4fPnDnzyJEj6E18A/L29ka3paVPfHp6Og6HKy4uHlSQ1dXVPDw8GzZsGNRWg0VfbJyjqKhoypQp5F7479+/r6qqMjAwwDYqJvrrr79Gjx6dkZFBXjJ9+vSioqIeq9E/n+v69esLCgpaWlomT57s5eXV3NxM965o9+7dO0NDQ0dHRwsLi2fPng14zgOAi0BOAdAfAoEQFxd34cKFy5cvq6mpJSYmsue4CQkJampq0dHR4eHhMTExXDHFOACDMnny5GfPni1ZssTe3t7IyKikpIQNB21qatq5c6eWllZ7e3tBQcHatWvZcFAOh3auofT27VsLC4tRo0bh8Xi0q1FDQ0OPdURFRcn/5+PjIxKJ6P/v3r27dOnSrVu3Dhs2bMGCBY8fP+7zoN++fUMoWuHgcDhpaWkEQSorK6kEhiDI5cuXHRwc0P9LSkqampp++PDh0aNH5BX6C6DP5bSEwWkCAwNHjhy5du3a58+fU1+zsLBwiM0YOG3aNF5e3sLCQqwDGRw5OTkSieTk5ITezdfR0fH69evVq1efPXtWQ0Pj9evXA+4hICDg3bt3LA0S5oCjRUlJiaqqKvnHwsJCPj4+HR0dDENiOl1dXcq/Laqqql+/fv358yflOvTXcRAE0dTUfPz4cXBwcFhY2Pjx44OCglh35fn+/XsXFxdNTc1fv37l5+efP3+e8tQFwNAAOQUAFatXry4pKZk/f/6KFSv09fX/+ecfFh2IRCKlpaXNmDHD1tbWzMyspKRk1apVLDoWAJgjEAhhYWG5ubk/fvzQ0NBYs2YN2n2AFZqamo4fPz5+/PiLFy+ePHny8ePH8P1Bnzo7O42MjD5//pyVlYV2SXByciKRSDRuLiEhcfz48erq6uzs7La2ttmzZ/c5ekJKSgpBEE9Pzx7D9alPLP3p06esrCx0Fm0UehsU5ZCc/gLoczl9YWCrsbGxtbU1IiJCR0dHQ0MjLCysv7GiJSUl3D4Xcg8CAgLjxo0rLS1l9YHa29vRGh8r8PDwyMrKrl69+unTpwiCmJub0zjAiqUiIiKsrKx+/vx5/fp1rGNhty9fvtC4ZmlpKWUdp6SkREFBgTw8Z2hQVVWlTDH0+b5//55yHYbqOAiC8PDwbNy4sbS01M7Obt++ffLy8n5+fp8/f2Zwt2QkEiknJ8fe3v6vv/7KyckJDQ19/PjxtGnTmLV/ADgN5BQAVIwYMeLSpUv5+fnDhg1buHChtrZ2TExMS0sLs/bf0tISExOjra29aNEiSUnJgoKC8PBw9BoDgKFNV1f36dOn58+fz87OVlNTs7e3z83Npb1wMKDKysr9+/crKCj4+vo6ODiUlpZu2LABj2f0g+hQVVFRUVNTY2Njo6amxsPDgyBIe3s7jdt+/fqVfL+Vrq7uhQsXOjo6nj171ntNOTk5NTU19DqWTFNTE+2I0Z+IiAg7OzvKgktTU5OUlFRiYiL65VN/AfS3nHoYnPlLgt6J09XVhSBIcXHxxo0bpaWlXV1de4xS6e7urqiooLzmHBp6XGSyyI8fP2RkZExNTa9cucK6Iou0tPShQ4eqqqrOnz9PXtjn7Gl9GtQ8a9R3+4fPAefo6KisrHzgwAHqXyQ0NzdXV1dT5lSPss7QoKqq+v79++7ubvRHeXl5AQGBnklHR+ud/tTX1+/evVtKSgqPxxsYGFy6dOnr16/07YpIJL58+XLv3r2KiooIgmhpacXFxWE+nwIAbAY5BQAVhYWFlpaWfHx8BALB2dn53r17ra2t9O2qpaXl7t27Tk5OBAKBj4/PysqqqKiIudECwC26urpiYmImT56MIIiSktK+fftevXpF9ySGNTU1Fy9enDt3Lh6PHzFixN69e7luUioqEOb1OabsPUwikdra2kaMGKGhofHmzZvW1ta7d++Ki4trampS2UpJSWnTpk2k/zTvDAoKamxsbGho8PT0FBQULC8v73OrtLQ0Hh6ew4cP19fX19fXb9u2bcKECejf0j4DIxKJSkpKb9++7fEs/P39EQSJiIigEgCVwKiEgTYNTEpKqq+vHzVq1NOnT6m8yOQKlKCgoISEhIyMzIQJE7S1tfX19RcuXGhlZeXo6Ojm5ubl5bVv377g4ODQ0NDIyMjU1NT79+8/evSouLi4vLy8urqaPFNMf/ocYsPHx4cgyKRJk0JDQ3///k0ikSoqKhAEKSgooL43rrN169bp06ez+ijoAA08Ho/H4/n5+a2srFJSUtra2nqvSXsvXvJ9VZQaGxtxOJyBgQH6I5XZ09D7qm7fvj3gmr37c1NZGfWHzwE3Z84cBEF4eXnR65QTJ0702YAfbRNWWFhIXjJ16lQPDw86jsixfY5JJFJeXh6CIB8/fiQvUVRUPHz4MOU6zH9X2tvbU1JSli9fLiAggMPh1NXV3dzc4uLiCgsLm5qaqGz49evXrKyskJAQGxsb9LbY0aNHb9++/eXLl0wPEgAuAjkFABV1dXUnT55E74sWFBQ0NDQ8cOBAWlra+/fvqXwQ7+zsfP/+fVpamp+fn4GBgaCgIIIg06ZNO3XqVH19PTvjB4BjvXjxwsPDQ0ZGBkGQkSNHrlixIiQkJDs7u7a2lspWTU1NhYWFcXFxW7ZsmThxIpqYlpaWN27c6OjoYFvw7IHQXMcRFxcnf7JH75BCxcXFUX7ob2hoID/05MmTWbNmiYqKjhkzxtXV1dLSEl2npqaGcit7e3vKQbtKSkokEunWrVvGxsaSkpJiYmIzZ85EJ346ffo05bHIs/bevXtXV1dXQEBg5MiRdnZ2nz9/7i8wysseymK3l5dXj+uWPgOgsry/MFAbN24UFxcXExPbuHEj9dcZveZMTEwMDQ0NDg4OCAjw8vJyc3Nbu3atlZXVggUL5s2bp62t/ddff8nLy0tISFC5F4NAIEhLSysqKk6ePFlXV9fIyMjCwsLe3t7V1XXnzp0SEhL9bYj20BUSElq7dm1sbCyCIB8+fKDll4SLHDhwQEVFhdVH6XGjDR8fHw6HExERcXBwSE1NpTzFM1jHIZFIkpKSioqK6P+pzJ7Wo44zqHnWqKxMgjng/lPHIScR+nZPmzYtODi4rq6OvBraNYYyp5SUlA4dOkTHETm5joMOvXnx4gV5iaampo+PD+U6OBLzRsz20NTU9H/t3WtUE2ceBvBJALGScLFyExAEmwTFUu60QZEgakOtFqroFtB1ba3UWql4tGK91SpsCy0uWN3WgqBolbUiIIuXRJAVUG6KIAGhVkFEogYSFhBD9sPsZnMAKWhgAJ/fp+TlJfMMYTjMP+8lJydHIBAIhcLr16+TIw/NzMyMjIwYDAaDwdDR0ZFIJFKpVCaT1dXVNTc3EwShq6vL5XK9vLx4PJ6Dg8PwHEsJQAlcUwB9uHPnjlAoFAgEFy9eJFfHHDNmzKRJk/T09PT09Mjln2QyWXNzs0QiuXv37pMnTwiCsLS09PT05PF4PB7PwsKC4nMAGH7kcnlJSQl5cV2+fJkcma+vr29mZsZgMJhMpr6+fmtrq0wmk0qlTU1N9fX1BEFoaWlNnz6dvLLIYgTV5zEoaDTaL7/8snjxYqqDwH8dP348ICBgQHc3XV1dzc3Nra2tbW1tLS0tMpmsra2N/FeKfCCVStva2sjfcPJBS0vLtWvX+j/TLTY2NiQkhEajPdc5DUd79+6NiIjo/4Imz6ehoWHixIk928eMGfPkyRM9Pb2AgICgoCAul3vixIl+vu/Lly9PSUnpuZjRq6++qq+vX1NTU1dXZ2FhsWbNGmXds6mpycjIaPPmzV9//XVlZaWtrW1mZua8efP67nn+/HkfH5+ysjJym8u+OxMEkZSUlJCQQO7R9vDhQ1NTU0tLS9X1UFxdXR8+fBgREfHOO++orj7ea/uAsvXtOa6p5zNr1qzs7OxujeSsUhqNNnv27KVLl/r5+RUVFc2aNauxsZH8iJogCBMTky1btqxZs2agR7x//z75QcXgmTt3bn92N+uJzJaTkzNjxgyyZcaMGQ4ODnv37lX20VRPxt4wGAw+n8/n8wmC6OzsrK2traysrKmpEYvF5J/C1tZWa2tr8p8AExMTFovFZrPJLQwBoCdcUwB9mDRp0rJly5YtW0YQREtLS1VVlUgkun37tlQqlUgk5D9tpqam+vr6TCbTysqKzWazWCxdXV2qgwMMaxoaGs7Ozs7Ozhs2bCAIor6+XiQSVVVV3b9/n7zXffz4sbGx8ZQpUxgMhqGhobW1NYfDsba2JueYAAxzdDrdwMCgj/E1vRo3blwfX9XS0urs7GQymY6OjtnZ2X5+fqOpiEMQBJPJlEgkJ06cGNSj9NygjUR+DNPc3BwfH//3v//d3Nz8Bdd5JCf62dvbEyq7p8XGxqr26bl7Wv979qdzfHx8UFAQ+ZjcAy4tLe3SpUvK2/isrKxdu3atW7cuMDBw9uzZW7dudXNze1b7gLL1x2C/1wRB9LpSuHKBmHPnzmVlZa1atYo8a21tbWUfqVQ6+j4qIDdIVV0WislkdlslahDrOKq0tLTYbPboW4IIgCq4pgD6oKurS955Uh0EYLQxMzMzMzPj8XhUBwGgjEKh6LktNI1G09TU7OzsNDc39/Pzmz9/vqenZ1paWnZ2tnLgwKgxduzYjo4OykeidXZ2EgRRV1dXV1dHEERGRoavr+9zvM7p06cVCgX5Qaly97TIyMi+v6v/Pf+wM7kHnFAoXLFihWp7QkKCso5D7vUWFRWVn58fHh4+c+bMiooKGxubXtsHlK0/huC97vuDZ7Kg097eTo7Z2bNnz86dO8l5kR0dHaplndGBPCPVvzNjx47t9mcHMywAAAAAAAD6hVyAmXysoaFBo9HodDqXy42MjKyurr57925MTMzs2bO1tLR0dHQIgiC38RpNpFKprq7u8y380X99z9si7+GNjY3Xrl27Y8cOgiCer4jT2NgYHh5uYWGxatUqYiCbuA1on7W+Ow//PeAG+71WKBRTpkx51tE1NDTodLqWlhafzw8PDycIYvPmzcrFrXR0dEbfJUaOTlIdZySTychBOkqo4wAAAAAAAPSLcgIIk8lcvHhxcnLyw4cPL126FBoa2u1etOfkiNFBKpV2u6UcMuR+Rrq6ugEBAefOnWtoaIiJiel1+7C+yeXy+vr6n3/+2cXFhU6nZ2RkKM8oKioqJycnIiJCLBaLxeLPP//86dOnCxYs6PkiffQkF16prKwUi8WmpqaFhYXP6qxQKJKSksjyhJKOjk5oaKhMJktJSSFbbty48d1337W0tEgkkgMHDowdO9bFxaWP9gFlG+hPb2iQS4bT6fSZM2fGx8c/fPgwIyODHDbV94SjUYA8I9W5/y0tLajjAAAAAAAAPA+FQhEWFnbx4sVHjx4lJycvWbJEX1+/156o46iLpqYmnU7X1tZesGDB6dOnxWJxYmLi7Nmz+7/wUF1dHY1GO3ToUGtrK7kd0vTp0w8ePLhmzZrr168rR7UQBMHn88+cOZOammpubm5nZ9fY2JiVlTV27NhNmzbZ2toSBPH2228HBgb20ZMgCFtb25CQkJUrV9rY2Pj5+Tk7O/faWSKR0On0mpqaqVOnlpaWKjNs2rSJrOwsX7583rx5JiYm6enpmZmZ1tbWlpaWly9fzsjIsLa2flb7QLOp7X1SB+VmVS4uLlFRUQ0NDQKBIDg4mPyV63lN6erqjspLjPjfySpbul10Q7Q+DgAAAAAAwEhnbGz8zTff9KeniYkJQRD19fXPMWBkOKuvrydPbWiQE2qCgoJ8fX3JSsRzMDc3V/R706U5c+bMmTOnW2NERERERER/epLi4uLIHcT77txrqp7H8vX17XXi2LPaB5pt+Jg2bdqyZcsCAgJ63UVUT0+PIAiJRKJsMTY2JvdJHE3IM1K9yiQSCXnuSqjjAAAAAAAAqJmhoeH48eNFIpG3tzfVWdRJJBKpDmAZJHQ6fc6cOUuXLn3vvfe63cHC6MPhcDw9PZcuXdp30dPMzExbW/vWrVvu7u5kC5vNFolEQ5Jx6FRWVk6YMOHVV18ln7a2tjY0NJAjrZRQxwEAAAAAAFA/FotVVVVFdQo1E4lE/v7+g30UY2PjrKyswT4KDBP79+/vTzcNDQ0bGxvVa4rNZp8+fXrQclGjqqpKdVfi6upqhULRrcKF9XEAAAAAAADUj8PhlJeXU51CncRi8YMHD0bZTDEYQboNwOFwOA0NDY8ePaIwktqVl5er1nFEIpGmpubkyZNV+6COAwAAAAAAoH5vvfXW5cuXnzx5QnUQtbl48aKGhoabmxvVQeAlxeFwKioqlE/ffPNNDQ2NnJwcCiOpV0dHR35+PpfLVbZUVFRYW1srt1onoY4DAAAAAACgfjwe79///veVK1eoDqI2AoHAycnpWVt0AQw2d3f38vJysVhMPtXX17e3txcKhdSmUqO8vLy2tjYej6dsycnJeeutt7p1Qx0HAAAAAABA/WxsbCZNmiQQCKgOojYCgcDLy4vqFPDy8vT0pNPp2dnZyhYej3fhwgUKI6mXQCCwtra2srIin7a3t+fn5/e86FDHAQAAAAAAGBR8Pj8lJYXqFOpx48YNkUj0rI2uAYaAnp6eo6Oj6gAcPp9fXl5+8+ZNClOpUUpKCp/PVz7Nzc1tb29XHZ5DQh0HAAAAAABgUAQGBpaVlZWWllIdRA0SExMtLS09PDyoDgIvNR6Pp7qXmaenp4WFxeHDhymMpC6FhYU3b94MCgpStpw9e5bFYpmbm3friToOAAAAAADAoOByuSwWKykpieogL6qrq+vo0aNBQUE0Go3qLPBSe//992/dulVQUEA+pdPpgYGBhw4dksvl1AZ7cUlJSa+99pqLiwv5tKur69ixY4sWLerZE3UcAAAAAACAwRIUFHTo0CGZTEZ1kBeSmpp679491ZECAJRwdna2s7NTrY0uW7bs3r176enpFKZ6cVKp9PDhw8uXL1eWSoVC4d27dwMDA3t2Rh0HAAAAAABgsISEhDx58uTAgQNUB3khu3fvXrhwIYvFojoIAPHBBx8cPXq0o6ODfMpms999993du3dTm+oF7du3r7Ozc/Xq1cqWpKQkV1dXDofTs7PmEAYDAAAAAAB4uYwfP37VqlXffvttSEjIK6+8QnWc55GZmVlYWPjDDz9QHQSAIAgiMDDwyy+/TElJ+eCDD8iW8PBwV1fX8+fPz549uz+vYGBgkJaWNpgZCSMjo/53bm9vj4mJ+eSTTwwMDMgWsVickpISGRnZa3+aQqFQQ0YAAAAAgJcJVgkZnobn3U1DQ4ONjc2OHTs2bNhAdZYBk8vlbm5uxsbGGRkZVGfpxfHjxwMCAobn+z7SDeefbWBgYHFx8Y0bN+j0/84xmjt3rkQiycvLU7aMIHv27Nm1a9dvv/2mrP5s2bJl//79t2/fZjAYPftjPA4AAAAAwID98ssvVEeAEcPU1HTjxo3bt29fvHixpaUl1XEG5sCBA9euXSsuLqY6CMD/hYeH29nZnT59euHChWRLdHS0g4PDTz/99NFHH1GbbaDu3r379ddfh4eHK4s4LS0tcXFxGzZs6LWIQ2A8DgAAAAAAwGDr6Oiwt7efPn36iRMnqM4yAA8ePOBwOB999FFERATVWXo3nMeMjHTD/Gfr7+9/586dK1euKEdHrl+/PiEhobKy0tDQkNpsA/Lee++Vl5eXlZVpa2uTLbt27YqKirp9+7aenl6v3zLyRhwBAAAAAACMLNra2jExMf/4xz9G0EguhUKxatUqJpP55ZdfUp0FoLutW7eWlJQcOnRI2bJ9+/Zx48apLhU8/CUnJ6empu7bt09ZxKmrq4uMjFy/fv2zijgE6jgAAAAAAABDYO7cuZ988snKlStFIhHVWfolJiYmLS0tPj5eR0eH6iwA3dnb24eEhISFhYnFYrKFyWQePnz41KlTsbGx1Gbrp1u3bq1evfqzzz5TXZ45NDTUxMQkLCysj29EHQcAAAAAAGAofPvtt2w2e+nSpe3t7VRn+QMFBQUbN27cuXMnj8ejOgtA73bt2qWtra06XszT03Pbtm1hYWGFhYUUBuuPtrY2f39/NputuinVuXPnUlJSYmJixo4d28f3Yn0cAAAAAACAIVJTU+Pq6jpz5syUlBQNDQ2q4/SupqaGy+U6Ojqmp6cP891/yDVcRtBstREkLy/v+++/H+YVgyNHjgQHB//zn//08fEhW7q6uvh8/vXr1//1r39NnjyZ2njP8vTpU39//9zc3MLCQmXIx48fOzg4uLi4/OEqWqjjAAAAAAAADJ2CggJvb29/f/+EhIRhuIF9U1OTh4eHrq6uQCBgMplUx/kDZB2H6hSj2fCvGAQFBZ09e7akpGTixIlki1Qq9fLykkgkubm5JiYm1MbrSaFQfPjhh8nJyefOneNyucpGf3//q1evlpSUTJgwoe9XQB0HAAAAAABgSKWlpfn5+X366adRUVHDqpTT2Ng4b9681tbW3Nxc5S7IAMOZTCZzcXExNja+cOGCcoxbY2Ojh4cHg8HIysoaVr/JCoXi888/j42NPXXqlK+vr7I9Ojp648aNAoFgxowZf/giw3qMHAAAAAAAwOgzf/78pKSkuLi45cuXd3Z2Uh3nv2praz08PFpbW8+ePTusbn0B+sBgMI4dO1ZQUKC6NrCxsfHZs2dlMpmHh8dvv/1GYTxVnZ2dwcHB+/btO3z4sGoR5/z585s2bfrqq6/6U8QhUMcBAAAAAAAYekuWLElLSzt58uTChQubm5upjkNcuXKFy+Xq6+vn5uZaWVlRHQdgAOzt7RMSEvbu3au6ZvDkyZNzc3OZTCaXyx0Oyx5LJJL58+enpqZmZGSoTgYsLi728/NbvHjxxo0b+/lSqOMAAAAAAABQYM6cOQKBoKSkxMnJqaioiKoYCoUiJiZmxowZDg4OQqEQI3FgJAoICIiNjf3iiy8OHjyobDQ2NhYKha+//rqHh8ff/vY3CuNdvXrV0dGxrKxMKBSq7jJeW1vr6+vr4uJy8ODB/k+xRB0HAAAAAACAGi4uLiUlJZMnT+Zyud9//71cLh/iAA8ePPDz8wsLC9u2bVt6ejqDwRjiAADqsnr16s2bN3/88cfx8fHKRl1d3TNnzoSHh4eGhvr7+zc1NQ1xKrlcHh0d7eHhwWKxSktLnZyclF+qrKzk8XgWFhapqana2tr9f02N7du3qz8pAAAAAAAA9AODwQgsMhr+AAAGDElEQVQMDKTRaFu2bElLS3vjjTfMzMyG4LhyuXz//v1+fn6PHj06deoUmWEIjgsweHg8nra29tq1axUKxaxZs8hGGo3m6ek5c+bMuLi47777Tk9Pz9HRcWh+2/Pz8xcuXHj06NFt27b98MMPqnXSq1ev+vj4mJubnzlzRl9ff0Avi/E4AAAAAAAAVKLT6Vu2bLl27Zquru6bb775l7/8pba2dlCPmJmZ6ebmtm7dug8//LCiomLmzJmDejiAIbNx48aYmJivvvpq3bp1qgPcZs2aVVFRsWLFirVr17q5uWVlZQ1qjJqamhUrVnC5XAMDg2vXrm3evJlO/3/5JT093cvLy93dXSgU/uEu4z2hjgMAAAAAAEA9W1vbCxcuJCUlXbx4kc1mBwcHV1RUqPcQXV1dv/76q7OzM5/PNzY2Li0tjYyM1NHRUe9RAKj16aefJicnHzhwwNvb+969e8p2BoPxzTfflJSUTJgwYd68eS4uLqdOnerq6lLv0SsqKoKDgzkcTk5OzpEjRy5cuMDhcJRfffr0aXh4+IIFC5YsWXLy5Mlx48Y9xyFQxwEAAAAAABgWaDTan/70p+rq6uTk5KKiomnTpjk7O8fExLz4oh4VFRXbt2+fMmWKv7+/qalpQUFBRkbG1KlT1RIbYLgJCAgoKioSi8X29vaZmZmqX5o2bVpmZmZpaamtre37779vYWHx2WeflZSUvOARJRJJYmKij4+PnZ1dcXHxwYMHKysrlyxZotqnvr6ex+NFR0dHR0f/9NNPmpqaz3csmkKheMG4AAAAAAAAoF5dXV3nz59PSkr69ddfOzs73d3deTwej8dzdXXt55KoYrE4OztbIBBcuHBBJBJZWVkFBgYGBwe/9tprgx0eYDiQSqUff/zxsWPHVq5cuWfPnvHjx3frUFVVlZiYePjw4d9//53D4Xh7e3t5eXl6evZzrlNHR8eVK1cEAoFAIMjLyxszZoyfn19QUJC3t7fqLCqCILq6un788cfNmzcbGRkdP358+vTpL3JeqOMAAAAAAAAMXzKZ7PTp0+fOnRMKhb///rumpqaVlRWLxWKxWIaGhoz/kUgkLS0tMpmsvr6+qqqqsrLywYMHGhoaTk5OPB6Pz+d7eHhgJWN4CR09enT9+vWdnZ2RkZF//vOfe14FXV1dly5dyszMFAgExcXFcrncyMiIw+Gw2eyJEycymUwmk6mvry/7nwcPHlRXV4tEotu3b8vlcisrKy8vLx8fn/nz5/e641tRUVFISEhJScnatWt37Njx4jMZUccBAAAAAAAYGWpqaoqKisgyTW1tbVNTk/Le0sDAgMlkMhgMExMTNpvNZrM5HI67u7uenh7VqQEo1tLSsnXr1ri4uNdffz08PHzhwoXdxssoSSSSgoKCmzdvikSiqqqq+/fvy2QyqVT6+PFjZc3U0NDQxsaGw+GwWCwnJydra+tnHffGjRu7d+8+fvw4l8uNi4uzs7NTy+mgjgMAAAAAAAAAo1xZWdnOnTtPnjzJ4XC++OKLRYsW9XOK4nMoKCiIiIhITU21s7PbsmXLokWL1DgaDnUcAAAAAAAAAHgp1NTU/PWvf/35558ZDMb8+fODg4O9vb3VVWSpr69PSUlJSEgoLS194403QkNDAwMDnzX257mhjgMAAAAAAAAAL5H6+vojR44kJiaWl5fb2Nj4+PjweLxZs2YZGhoO9KU6Ojry8vLIBcXz8/MNDAyWLFkSFBTk5uY2CMEJAnUcAAAAAAAAAHg5FRcXp6SkCIXCwsJCuVxua2s7depUFovFZrOnTJliYGBAroljYGCgXItKIpHcuXOnqqqKXKmqtLS0ra3N2tqax+O98847b7/99pgxYwY1M+o4AAAAAAAAAPBSk0ql2dnZeXl5IpFIJBJVV1d3dHQ8qzONRrO0tCTLPY6Ojl5eXpaWlkMWFXUcAAAAAAAAAID/k8vl9+7da25uJsfgPH78WEdHhxybo6+vb2pq+sorr1CVDXUcAAAAAAAAAICRQc3LJgMAAAAAAAAAwCBBHQcAAAAAAAAAYGRAHQcAAAAAAAAAYGT4D9D731X6hs6CAAAAAElFTkSuQmCC", - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[{'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}, {'alignment': [('InitializeAsset', '>>'), ('>>', 'createAsset'), ('>>', 'lockAsset'), ('CreateAsset', 'CreateAsset'), ('LockAsset', '>>'), ('TransferAsset', 'TransferAsset'), ('>>', None), ('TransferAsset', 'TransferAsset'), ('DeleteAsset', 'DeleteAsset')], 'cost': 40001, 'visited_states': 9, 'queued_states': 23, 'traversed_arcs': 24, 'lp_solved': 2, 'fitness': 0.6363636363636364, 'bwc': 110000}]\n" - ] - } - ], - "source": [ - "\n", - "log = import_csv_original(file_path)\n", - "log_other_model = import_csv_original(file_path_other_model)\n", - "\n", - "net, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)\n", - "\n", - "gviz = pn_visualizer.apply(net, initial_marking, final_marking)\n", - "pn_visualizer.view(gviz)\n", - "\n", - "aligned_traces = pm4py.conformance_diagnostics_alignments(log_other_model, net, initial_marking, final_marking)\n", - "\n", - "print(aligned_traces)\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.10" - }, - "vscode": { - "interpreter": { - "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" - } - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json deleted file mode 100644 index c09113c41f..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-basic-test.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "caseID": "basic-TEST", - "receiptID": "txID1", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "methodName2", - "parameters": [ - "0", - "2" - ], - "timestamp": "2024-05-27T09:05:43.640Z", - "identity": "person 1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 4 - } -] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json index be97efbdd9..505e13e7b1 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-4-events.json @@ -1,63 +1,63 @@ [ { "caseID": "BESU_MONITORING", - "receiptID": "0xe6800f6ff8d1a8ea5ee677dbb9320f849d28a8a533608affea5ef138be088736", + "receiptID": "0x4b9b973b3f26195955c6094c5958a805f76e9cf4e8159dad86c8d9be019fee96", "blockchainID": "BESU_2X", "invocationType": "SEND", "methodName": "createAsset", "parameters": [ - "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b", + "4b4af0e7-b664-4a3c-8f7d-32919a455655", 10 ], - "timestamp": "2024-05-27T09:34:25.795Z", + "timestamp": "2024-07-03T14:49:17.072Z", "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", "cost": 91441, "carbonFootprint": 0.00018, - "latency": 3457 + "latency": 1 }, { "caseID": "BESU_MONITORING", - "receiptID": "0x320482edd9e264453bbd7dee3826b7f9960fcaa27ce70398e21eee9be14423aa", + "receiptID": "0x7c861111674f27f07bbb2386696e004d95d584098e15a5b2f810cb3f96f1c4a0", "blockchainID": "BESU_2X", "invocationType": "SEND", "methodName": "lockAsset", "parameters": [ - "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b" + "4b4af0e7-b664-4a3c-8f7d-32919a455655" ], - "timestamp": "2024-05-27T09:34:27.303Z", + "timestamp": "2024-07-03T14:49:17.905Z", "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", "cost": 30543, "carbonFootprint": 0.00018, - "latency": 1953 + "latency": 0 }, { "caseID": "BESU_MONITORING", - "receiptID": "0x99ae2b0951af4d674734bdc8ba21838eb2df3aefa7d2bc54f51c12ad713c06b5", + "receiptID": "0xa6b9fbbbb18fcc56757ebc13bc966ddf69fb57c2e04277e58dbb38a6030e6c4e", "blockchainID": "BESU_2X", "invocationType": "SEND", "methodName": "isPresent", "parameters": [ - "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b" + "4b4af0e7-b664-4a3c-8f7d-32919a455655" ], - "timestamp": "2024-05-27T09:34:28.641Z", + "timestamp": "2024-07-03T14:49:19.044Z", "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", "cost": 25157, "carbonFootprint": 0.00018, - "latency": 615 + "latency": 0 }, { "caseID": "BESU_MONITORING", - "receiptID": "0xd2da2adaf8f4e39dbd55ff8b42179efd67d402c58a61cdd30ca8d142be955f5c", + "receiptID": "0x865068c8e203fcdf4131900215e592d8c40a0f4bc96da91f43c66c4b81603d68", "blockchainID": "BESU_2X", "invocationType": "SEND", "methodName": "deleteAsset", "parameters": [ - "e59eeb10-ab45-4d44-95b3-f4ecbabd3f3b" + "4b4af0e7-b664-4a3c-8f7d-32919a455655" ], - "timestamp": "2024-05-27T09:34:29.246Z", + "timestamp": "2024-07-03T14:49:19.538Z", "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", "cost": 20705, "carbonFootprint": 0.00018, - "latency": 11 + "latency": 0 } ] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json deleted file mode 100644 index 1fcd8d1fa4..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events-3-cases.json +++ /dev/null @@ -1,425 +0,0 @@ -[ - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x6b2082f5ca10801ab311fefa9fd5fc0ddcca253da5707232ac07599585d88fb4", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c", - 10 - ], - "timestamp": "2024-05-20T10:32:59.263Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 91441, - "carbonFootprint": 0.00018, - "latency": 110153 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x8bcbdc64574f2767526685aedb2197158da87c619a4bb7bf64e3aaa00ac72872", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" - ], - "timestamp": "2024-05-20T10:33:00.553Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 30543, - "carbonFootprint": 0.00018, - "latency": 108865 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x8068f71dc71de14e80c8b6be2042c2001ac383c42bc363608df5510277cedc81", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" - ], - "timestamp": "2024-05-20T10:33:01.883Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 20705, - "carbonFootprint": 0.00018, - "latency": 107535 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-20T10:33:07.943Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 129786009655382, - "carbonFootprint": 0, - "latency": 101476 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-20T10:33:12.103Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 41156218131450, - "carbonFootprint": 0, - "latency": 97316 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1", - "owner1" - ], - "timestamp": "2024-05-20T10:33:17.246Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 40955165049120, - "carbonFootprint": 0, - "latency": 92174 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "453887cf863ff5329f47ba82b0a6de9d63a1b7eb07be932ac4d6fd71c03f1227", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "CreateAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", - "10", - "owner1" - ], - "timestamp": "2024-05-20T10:33:23.599Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 85821 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "547e59b76a912a65638585f42d33e264cefe1898a10cfeafd97929a6547dfd96", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "TransferAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", - "owner2" - ], - "timestamp": "2024-05-20T10:33:29.855Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 79566 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "9486bee925044c747d5faa942449f899d3c8a8c9e9a42ffe37ca46278545e636", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "DeleteAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850" - ], - "timestamp": "2024-05-20T10:33:35.386Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 74035 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0xafac857fc46846e2c6bb651a1c406606f58357211fb65f6887617a5cac878c23", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c", - 10 - ], - "timestamp": "2024-05-20T10:33:36.055Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 91441, - "carbonFootprint": 0.00018, - "latency": 73367 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x5061e439a6cff371957872531932990013c6e052d82b7ab199785c2fd7e74e93", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" - ], - "timestamp": "2024-05-20T10:33:38.902Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 30543, - "carbonFootprint": 0.00018, - "latency": 70520 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0xe72063132b259c1a57e202cb5321258102767816b1240f513499faa04af8781d", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" - ], - "timestamp": "2024-05-20T10:33:40.054Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 20705, - "carbonFootprint": 0.00018, - "latency": 69369 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-20T10:33:47.139Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 103394573872490, - "carbonFootprint": 0, - "latency": 62284 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-20T10:33:52.281Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 33538215602250, - "carbonFootprint": 0, - "latency": 57143 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1", - "owner1" - ], - "timestamp": "2024-05-20T10:33:57.501Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 34079554985280, - "carbonFootprint": 0, - "latency": 51924 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "525368f5e7ebbed3edd2cb5f52fcc5f441bbdff5863fc08597b87402abaa681e", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "CreateAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", - "10", - "owner1" - ], - "timestamp": "2024-05-20T10:34:03.161Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 46264 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "5374737a2ac9149c4068a776249c2bc5b45e80b34c5f37a9340966a4edf2c4a4", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "TransferAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", - "owner2" - ], - "timestamp": "2024-05-20T10:34:08.645Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 40780 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "67fdd728e47ab2ae655ecca44bda5999067cf11c2e79bd317ee6ad03dd5eb5cf", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "DeleteAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850" - ], - "timestamp": "2024-05-20T10:34:14.183Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 35243 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0xf7e10e0fa005951955ab2e03d1742430d4b9e73303c07cadf640148460f1859e", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c", - 10 - ], - "timestamp": "2024-05-20T10:34:15.031Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 91441, - "carbonFootprint": 0.00018, - "latency": 34395 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0xe96e1c157a0c42487428da97c6a97c548bcd4d17b25fdbc8d8ca747adfbeeac6", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" - ], - "timestamp": "2024-05-20T10:34:16.505Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 30543, - "carbonFootprint": 0.00018, - "latency": 32922 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x03abead1107ae01dff9bdfb941124e80adc0609bd613461152c0df7d902a1c63", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "fe99ebeb-d7d8-4b7b-828b-89e4c914fe0c" - ], - "timestamp": "2024-05-20T10:34:17.879Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 20705, - "carbonFootprint": 0.00018, - "latency": 31548 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0xdaf77bc2c7bdba632dd34d7ff8036dcb18c3fcfcfa8a34e315099a674c662351", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-20T10:34:22.191Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 95004006312862, - "carbonFootprint": 0, - "latency": 27237 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x3e8cc1e7762ebbf015fbcc7527be575ce932bad1e52c277ef5ad06978f46c90f", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-20T10:34:27.469Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 31116241250400, - "carbonFootprint": 0, - "latency": 21959 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0xbf8a4b150c4c431b415829e5722840f1e7541109507b7ca497f7bc2453b64fed", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1", - "owner1" - ], - "timestamp": "2024-05-20T10:34:32.014Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 31893607627440, - "carbonFootprint": 0, - "latency": 17414 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "8e2146a7989e14efbc97d369a98d8203401dfbd034df77fcb66f7b32e4a50e99", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "CreateAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", - "10", - "owner1" - ], - "timestamp": "2024-05-20T10:34:38.174Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 11255 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "cd118aeed54618ead4514f17c2682178f4f788b7e5f7f0d0772744ae22e9f9b2", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "TransferAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850", - "owner2" - ], - "timestamp": "2024-05-20T10:34:43.744Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 5685 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "93f066ba9539c48b32a11b2e6cd469cab38e9cb4e78be4385f259286afb674cb", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "DeleteAsset", - "parameters": [ - "519c8966-cb7d-4cbc-8ee4-dc7fa1fc5850" - ], - "timestamp": "2024-05-20T10:34:49.405Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 25 - } -] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json deleted file mode 100644 index 263cd1cc4b..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-besu-ethereum-fabric-events.json +++ /dev/null @@ -1,425 +0,0 @@ -[ - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0xb81ed2022db3f730c182da98690974fa6b2b1f4ae503d4d9c9160c160a0cc589", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94", - 10 - ], - "timestamp": "2024-05-27T09:15:37.576Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 91441, - "carbonFootprint": 0.00018, - "latency": 116909 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x3957718d932e5c08f5183d7e354f27e92bbf1f7bad03f23300bce9190e0e9c1d", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94" - ], - "timestamp": "2024-05-27T09:15:39.273Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 30543, - "carbonFootprint": 0.00018, - "latency": 115213 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0xc23ab99376855ab985aa8964ce2da5a6d7ff4539c34b33daf54d927396547808", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94" - ], - "timestamp": "2024-05-27T09:15:40.109Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 20705, - "carbonFootprint": 0.00018, - "latency": 114379 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:15:46.123Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 129786009655382, - "carbonFootprint": 0, - "latency": 108366 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x9a28d1480e72257d585fb854bbeb840e08c12e37d9e0665888184aaad2892fa9", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:15:51.381Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 41156218131450, - "carbonFootprint": 0, - "latency": 103109 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "0x4c5a867c54cd89dbe8c2fd2131401d9fa7a4e8def2ff3635fc3222df6d45057c", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1", - "owner1" - ], - "timestamp": "2024-05-27T09:15:56.367Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 40955165049120, - "carbonFootprint": 0, - "latency": 98124 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "88ab44939551ea52c8abdb2779163278a07713bf397b215cce2dac9be478b08a", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "CreateAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a", - "10", - "owner1" - ], - "timestamp": "2024-05-27T09:16:03.019Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 91472 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "04a5f33f1461b1f446086dcd435cedfb7f690b35b4359f87724a18755fd12bbb", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "TransferAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a", - "owner2" - ], - "timestamp": "2024-05-27T09:16:08.577Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 85916 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_1", - "receiptID": "5f25721a387592f30d493aa455025aff308c7009b7b05d45949006e7e964094f", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "DeleteAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a" - ], - "timestamp": "2024-05-27T09:16:14.245Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 80250 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x9198a615db48db3c018bef59d47dfb93568dbbf6d04a56acb595db24d192fc06", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94", - 10 - ], - "timestamp": "2024-05-27T09:16:15.243Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 91441, - "carbonFootprint": 0.00018, - "latency": 79254 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x1451b68f1f59a5425cb442075c2a8504ad08d0fe605180ee3a02e9019f82c3f3", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94" - ], - "timestamp": "2024-05-27T09:16:17.305Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 30543, - "carbonFootprint": 0.00018, - "latency": 77194 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x0801c6aecd6d105d0249d51868050395cad9b5e17f56ee4654c2ec47cbf49f82", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94" - ], - "timestamp": "2024-05-27T09:16:18.359Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 20705, - "carbonFootprint": 0.00018, - "latency": 76141 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x8fc2d26d58c153f941eb38d2455c8388ccc29f75a9e9c4367e4264b6c6395708", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:16:26.125Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 103394573872490, - "carbonFootprint": 0, - "latency": 68378 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0x219f64ee149bf347d9dd31a80d9dc3ec859423245ff3fdd75f6c8dc46991c4c2", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:16:31.184Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 33538215602250, - "carbonFootprint": 0, - "latency": 63331 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "0xb4f7ed38e06cfc4fa9e524bcbab5f438d4f8f08bd08ddc36ed62079c668b3a16", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1", - "owner1" - ], - "timestamp": "2024-05-27T09:16:36.363Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 34079554985280, - "carbonFootprint": 0, - "latency": 58154 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "ec20bf8b8418971e43685ba2b6bee62c845dd272d901af92a158d21e982a8d47", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "CreateAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a", - "10", - "owner1" - ], - "timestamp": "2024-05-27T09:16:43.981Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 50536 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "d68666a62b997c8527718aba35b7fddef109dafee2273133b618847e2a8074c6", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "TransferAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a", - "owner2" - ], - "timestamp": "2024-05-27T09:16:51.969Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 42549 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_2", - "receiptID": "5cbf80fe64c979d92f0e35f40bd130a05772d36268c2ee3f73d2aad463359978", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "DeleteAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a" - ], - "timestamp": "2024-05-27T09:16:59.118Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 35400 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x4985326b838f116fa612b9c1d81335ea4ee957a20c54a44ae42579ec4710a99a", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94", - 10 - ], - "timestamp": "2024-05-27T09:17:00.202Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 91441, - "carbonFootprint": 0.00018, - "latency": 34317 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x967eb4286a012277a74270dce024c9c0872739c0733f8211b206ccf16432a122", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94" - ], - "timestamp": "2024-05-27T09:17:01.250Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 30543, - "carbonFootprint": 0.00018, - "latency": 33269 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x7d6c1bdfaafd4b5f4799450da507b517603d2963291649ec832d191944dca56d", - "blockchainID": "BESU_2X", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "024505e9-8b77-4fcf-a9f1-63d2fe838f94" - ], - "timestamp": "2024-05-27T09:17:02.477Z", - "identity": "0x627306090abab3a6e1400e9345bc60c78a8bef57", - "cost": 20705, - "carbonFootprint": 0.00018, - "latency": 32051 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x8f63925f9c4e05884840fc15df27f41cd75d97a13a3aa3a34ed8497cde5af522", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:17:06.542Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 94325755557346, - "carbonFootprint": 0, - "latency": 27986 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x972b7d58b0cd9e3e603c577f2cb4fabd8a64ed0c070d55950bf403e27f446390", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:17:11.777Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 30920461153200, - "carbonFootprint": 0, - "latency": 22752 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0x5bcfdbf3d6b1baf09446a581afb9b9dd76298639f7bda9db71f6a60d8d55ea15", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1", - "owner1" - ], - "timestamp": "2024-05-27T09:17:16.969Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 31716906746400, - "carbonFootprint": 0, - "latency": 17563 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "0e1e5982732b3426ca1feb4a0585d48adc3ee67706c7c92289ace06d949a4fad", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "CreateAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a", - "10", - "owner1" - ], - "timestamp": "2024-05-27T09:17:22.893Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 11640 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "b925b6b6e68a07c12be5fe01a58869f844cd73d88254f3b427a65ac52eae7a32", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "TransferAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a", - "owner2" - ], - "timestamp": "2024-05-27T09:17:28.417Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 6116 - }, - { - "caseID": "BESU_ETHEREUM_FABRIC_3", - "receiptID": "b99476b1334e81083ae88ae4991d72af4ca91adb63022ee8e37cde0beae10621", - "blockchainID": "FABRIC_2", - "invocationType": "FabricContractInvocationType.SEND", - "methodName": "DeleteAsset", - "parameters": [ - "966c0c39-b39a-49de-bf00-82b62444615a" - ], - "timestamp": "2024-05-27T09:17:34.473Z", - "identity": "user1", - "cost": 0, - "carbonFootprint": 0.00018, - "latency": 60 - } -] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json deleted file mode 100644 index aad876857b..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-3-unmodeled-events.json +++ /dev/null @@ -1,48 +0,0 @@ -[ - { - "caseID": "ETHEREUM_MONITORING", - "receiptID": "0xc0730eff8158a22803060879fd555b04d3940733b58f3b5d73698ea693e5d8de", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset2", - 10 - ], - "timestamp": "2024-05-17T14:52:01.098Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 103396064181676, - "carbonFootprint": 0, - "latency": 10250 - }, - { - "caseID": "ETHEREUM_MONITORING", - "receiptID": "0x319fc6d76fc7216599060623d0613fea997d164b8c7fbab08635190556d12162", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset2" - ], - "timestamp": "2024-05-17T14:52:06.257Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 33538645761600, - "carbonFootprint": 0, - "latency": 5091 - }, - { - "caseID": "ETHEREUM_MONITORING", - "receiptID": "0x6ea284a62910fd25c30722aa7b20b325cc5f4304f25cd10d0186041b39e7e95e", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset2" - ], - "timestamp": "2024-05-17T14:52:11.337Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 34079943209040, - "carbonFootprint": 0, - "latency": 13 - } -] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json index 7961841699..c2b0dc3411 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-ethereum-4-events.json @@ -9,11 +9,11 @@ "asset1", 5 ], - "timestamp": "2024-05-27T09:33:21.366Z", + "timestamp": "2024-07-03T14:46:35.443Z", "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", "cost": 135530010970738, "carbonFootprint": 0, - "latency": 15298 + "latency": 1 }, { "caseID": "ETHEREUM_MONITORING", @@ -24,11 +24,11 @@ "parameters": [ "asset1" ], - "timestamp": "2024-05-27T09:33:26.632Z", + "timestamp": "2024-07-03T14:46:40.391Z", "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", "cost": 42814248832950, "carbonFootprint": 0, - "latency": 10033 + "latency": 0 }, { "caseID": "ETHEREUM_MONITORING", @@ -40,11 +40,11 @@ "asset1", "owner1" ], - "timestamp": "2024-05-27T09:33:31.653Z", + "timestamp": "2024-07-03T14:46:45.348Z", "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", "cost": 33945972851475, "carbonFootprint": 0, - "latency": 5012 + "latency": 0 }, { "caseID": "ETHEREUM_MONITORING", @@ -56,10 +56,10 @@ "asset1", "owner1" ], - "timestamp": "2024-05-27T09:33:36.658Z", + "timestamp": "2024-07-03T14:46:50.435Z", "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", "cost": 40955256397680, "carbonFootprint": 0, - "latency": 7 + "latency": 0 } ] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json index 22e8d70b03..0b0c453b7f 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-fabric-4-events.json @@ -1,66 +1,66 @@ [ { "caseID": "FABRIC_MONITORING", - "receiptID": "4b21851915d609fc0541037a569ce502ac9b87a415664755494422e4e8cb30dc", + "receiptID": "33542c28f8cd5e7c3cf2e36090365d2bb4f58a57f0af5641edcd73302363814b", "blockchainID": "FABRIC_2", "invocationType": "FabricContractInvocationType.SEND", "methodName": "CreateAsset", "parameters": [ - "78fffaa3-06ed-4daa-bedc-8f7d72992231", + "2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939", "10", "owner1" ], - "timestamp": "2024-05-27T09:31:47.774Z", + "timestamp": "2024-07-03T14:44:24.035Z", "identity": "user1", "cost": 0, "carbonFootprint": 0.00018, - "latency": 16298 + "latency": 0 }, { "caseID": "FABRIC_MONITORING", - "receiptID": "e26794398de369ba8ee2eb97235ef5d1dceceb8fda57413732a5550bf5cc420f", + "receiptID": "897772958c7ff6f916e9898599c89d9423e494a9bcb973e3081708ccbae22228", "blockchainID": "FABRIC_2", "invocationType": "FabricContractInvocationType.SEND", "methodName": "TransferAsset", "parameters": [ - "78fffaa3-06ed-4daa-bedc-8f7d72992231", + "2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939", "owner2" ], - "timestamp": "2024-05-27T09:31:53.120Z", + "timestamp": "2024-07-03T14:44:29.269Z", "identity": "user1", "cost": 0, "carbonFootprint": 0.00018, - "latency": 10952 + "latency": 0 }, { "caseID": "FABRIC_MONITORING", - "receiptID": "fa3bbd9ec8cb372e09211e057074fcf03f0c5f178c7ae098fbd3ead0956d17a4", + "receiptID": "33d6f0d65caaab85bedd667476c5618f0b9f806ff252a4de28ddabfad8404357", "blockchainID": "FABRIC_2", "invocationType": "FabricContractInvocationType.SEND", "methodName": "TransferAsset", "parameters": [ - "78fffaa3-06ed-4daa-bedc-8f7d72992231", + "2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939", "owner1" ], - "timestamp": "2024-05-27T09:31:58.521Z", + "timestamp": "2024-07-03T14:44:34.487Z", "identity": "user1", "cost": 0, "carbonFootprint": 0.00018, - "latency": 5552 + "latency": 0 }, { "caseID": "FABRIC_MONITORING", - "receiptID": "677867c703fa64b1a4651a5c661ccd4cf2ca84259a64eae534d88d7cc3cafe48", + "receiptID": "479b9bd62032c1e0f3792b3a5fe04a4b501313aa693b59193e268b74575f8d62", "blockchainID": "FABRIC_2", "invocationType": "FabricContractInvocationType.SEND", "methodName": "DeleteAsset", "parameters": [ - "78fffaa3-06ed-4daa-bedc-8f7d72992231" + "2a57d2e0-10ef-4358-9ddb-4c5c0c0ba939" ], - "timestamp": "2024-05-27T09:32:04.061Z", + "timestamp": "2024-07-03T14:44:39.720Z", "identity": "user1", "cost": 0, "carbonFootprint": 0.00018, - "latency": 12 + "latency": 0 } ] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json b/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json deleted file mode 100644 index 8b4e9fbbbb..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/json/example-dummy-periodic-update.json +++ /dev/null @@ -1,432 +0,0 @@ -[ - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x1d37b5ea2741eb9b7ca8bf49ae3b563c0632ab3660953ef6298650a8248b313b", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:40:42.941Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 135530010970738, - "carbonFootprint": 0, - "latency": 4921 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xd3732704dc43d1a1035974655cd62ee9cbad0e1a76449aba26f8d25d3833ac72", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:40:49.281Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 42814248832950, - "carbonFootprint": 0, - "latency": 8580 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x5121ac2440d82d580bc30c9e445365871a0bbd7310580bd7e7617d66abdc0d33", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:40:52.233Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 42451616646000, - "carbonFootprint": 0, - "latency": 5628 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x3be2b1b2c1bec476f0d37cb6990b2ae7b54804a166262aef639ba6993d64e896", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:40:57.247Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 120363911294810, - "carbonFootprint": 0, - "latency": 615 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x1ae44035a0580491f47933802ca3f99c11ca524b9c2add9169b67079d1085d56", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:02.421Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 38436488700900, - "carbonFootprint": 0, - "latency": 5440 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xb64d1e48f4f69bf930950bc13d9c05513642af08dbdd5079f428db0fc17c839d", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:07.408Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 38500479768000, - "carbonFootprint": 0, - "latency": 454 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xb299fbed0ff28d4b29404142d8bee7b33a6ac2d480f22af3fdac030e9197e955", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:41:12.385Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 110203266779032, - "carbonFootprint": 0, - "latency": 5476 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xf88b5da58aa42c36a798cbbb773da6650e27dd55ab9a870f542e899b827720ba", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:17.387Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 35503574548200, - "carbonFootprint": 0, - "latency": 475 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x620e72017b4bc4689c11d329504a8ea73729ed3f4eae2c73c7d2ad440f1d3463", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:22.263Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 35853385067280, - "carbonFootprint": 0, - "latency": 5598 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xaaf8cacf1951a808f769e87a32304952d9bbdb3eeb2e56fde12959c5d775b49f", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:41:27.170Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 103396064181676, - "carbonFootprint": 0, - "latency": 692 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xb205b16fac624e125354b93d9d9b542b6dbbf84816c6ed32a9e8ddd0c89cde50", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:32.195Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 33538645761600, - "carbonFootprint": 0, - "latency": 5666 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x621becfe651fee97f77384c62b1730c6c0f364bf40f4be96fcc871c25d2410bc", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:37.087Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 34079943209040, - "carbonFootprint": 0, - "latency": 775 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xa9ba355c1b6c24475762f8d85e3fe31373488d4ed5767d85cdd8bad701b635d3", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:41:42.152Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 98835525300660, - "carbonFootprint": 0, - "latency": 5710 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xadf19829cc25a097e457ed78fe9430fb0d306820ed91adbb94e538a291535849", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:47.039Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 32222226180300, - "carbonFootprint": 0, - "latency": 823 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x39d64d6a97e476d64ebee18f8769fea61f8619ada119c58264dab2a04f8b11be", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:41:52.133Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 32891811777840, - "carbonFootprint": 0, - "latency": 5728 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xebfd45ff34e3ff7bd33d3c9bb5379877b7b0fd08e4357045dac805ed19cee100", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:41:57.039Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 95780155968798, - "carbonFootprint": 0, - "latency": 823 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xe280efdc199b8635b392024bf969d7a78f7de3aaef64499c01dc240c425da1c2", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:02.152Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 31340280308100, - "carbonFootprint": 0, - "latency": 5709 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x96129a0b72d96b2bb3c7d359cf0d7d444f814b18614889b07a391af1d12314f2", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:07.066Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 32095813562880, - "carbonFootprint": 0, - "latency": 796 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xd3d2045c8d79914a43bf0d0fa48233cb0c6d3d8d4c623767badeb6f5157e9876", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:42:12.164Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 93733186606720, - "carbonFootprint": 0, - "latency": 5697 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xd5d911f6b56aaa9539605c428404558111b31701753843d7e37b8732967b721b", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:17.148Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 30749413489950, - "carbonFootprint": 0, - "latency": 714 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xcbc1a5c07d93f980362adaf84f66db3127e7d5745cca0117cbf9f05078d6b03b", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:22.248Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 31562528045760, - "carbonFootprint": 0, - "latency": 5613 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x9cd9db21f05539f6dff370095d8d1763f0914b5d197405d30fc941d8c090c678", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:42:27.135Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 92361802785924, - "carbonFootprint": 0, - "latency": 727 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x6adbc6ffea1acadabe5c67cef94a855383c38b58a5b8ff296b48e399f30a4ad3", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:32.319Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 30353557405200, - "carbonFootprint": 0, - "latency": 5542 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x96ecf2aa1876492afddccf5e2a0083e21b1c85b24550fc0e4c7437699729ce18", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:37.207Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 31205249014320, - "carbonFootprint": 0, - "latency": 655 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0xcf6652ab02e110b03816ba739c83a600424e9ee0611c34544ca4a239081018be", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:42:42.165Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 91443032771380, - "carbonFootprint": 0, - "latency": 5696 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x76ea903dabc8a71125125ee782e22d06cebb3923cdeb0186236186145b299c2e", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "lockAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:47.055Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 30088350292200, - "carbonFootprint": 0, - "latency": 806 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x60fb968f395815fc788974d19ccb11fa5e361b74e9d9ae1bd2224b8f03be395f", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "deleteAsset", - "parameters": [ - "asset1" - ], - "timestamp": "2024-05-27T09:42:52.213Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 30965886922560, - "carbonFootprint": 0, - "latency": 5648 - }, - { - "caseID": "CCMODEL_UPDATE", - "receiptID": "0x13b53c3379a666e719caa33ea0161d08594e663f90e268f25017c2e7068290c8", - "blockchainID": "ETHEREUM", - "invocationType": "SEND", - "methodName": "createAsset", - "parameters": [ - "asset1", - 5 - ], - "timestamp": "2024-05-27T09:42:57.111Z", - "identity": "0x6a2ec8c50ba1a9ce47c52d1cb5b7136ee9d0ccc0", - "cost": 90827495125774, - "carbonFootprint": 0, - "latency": 751 - } -] \ No newline at end of file diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol b/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol index a3139b7ba9..adedf45613 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/solidity/lock-asset-contract/lock-asset.sol @@ -7,64 +7,64 @@ pragma solidity >=0.7.0; struct Asset{ - address creator; - bool isLock; - uint size; + address creator; + bool isLock; + uint size; } contract LockAsset { mapping (string => Asset) assets; mapping (string => bool) assetExists; - function createAsset( string calldata id, uint size) public{ - require(size>0); - assets[id].size= size; - assets[id].creator = msg.sender; - assets[id].isLock = false; - assetExists[id] = true; + constructor() { + } + + function createAsset( string calldata id, uint size) public { + require(size>0); + assets[id].size= size; + assets[id].creator = msg.sender; + assets[id].isLock = false; + assetExists[id] = true; } function getAsset(string calldata id) public view returns (Asset memory) { - return assets[id]; + return assets[id]; } - //Don't care if it is already locked function lockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); + bool exists = assetExists[id]; + require(exists); - assets[id].isLock = true; + assets[id].isLock = true; } - //Don't care if it is already unlocked function unLockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); + bool exists = assetExists[id]; + require(exists); - assets[id].isLock = false; + assets[id].isLock = false; } function deleteAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); + bool exists = assetExists[id]; + require(exists); - //an asset could only be deleted if it is already locked - bool assetIsLocked = assets[id].isLock; - require(assetIsLocked); + //an asset can only be deleted if it is locked + bool assetIsLocked = assets[id].isLock; + require(assetIsLocked); - delete assets[id]; - assetExists[id] = false; + delete assets[id]; + assetExists[id] = false; } function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; + return assetExists[id]; } function isAssetLocked(string calldata id) public view returns (bool) { - bool exists = assetExists[id]; - require(exists); + bool exists = assetExists[id]; + require(exists); - //an asset could only be deleted if it is already locked - return assets[id].isLock; + return assets[id].isLock; } } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts deleted file mode 100644 index c411b7e24f..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/basic-mock-test.test.ts +++ /dev/null @@ -1,125 +0,0 @@ -import "jest-extended"; -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; -import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; -import { v4 as uuidv4 } from "uuid"; -import { - FabricContractInvocationType, - RunTxReqWithTxId, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { ReplaySubject } from "rxjs"; - -const testCase = "simulate basic transaction without connectors"; -const logLevel: LogLevelDesc = "TRACE"; -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "Hephaestus", -}); - -let fabricReplaySubject: ReplaySubject; -let hephaestusOptions: IPluginCcModelHephaestusOptions; -let hephaestus: CcModelHephaestus; - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - fabricReplaySubject = new ReplaySubject(); - - hephaestusOptions = { - instanceId: uuidv4(), - logLevel: logLevel, - fabricTxObservable: fabricReplaySubject.asObservable(), - }; - - hephaestus = new CcModelHephaestus(hephaestusOptions); -}); - -test(testCase, async () => { - hephaestus.setCaseId("basic-TEST"); - expect(hephaestus).toBeTruthy(); - log.info("hephaestus plugin is ok"); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - expect(hephaestus.numberEventsLog).toEqual(0); - - const txSim1: RunTxReqWithTxId = { - request: { - signingCredential: { - keychainId: "keychainId", - keychainRef: "person 1", - }, - channelName: "channelName", - contractName: "contractName", - invocationType: FabricContractInvocationType.Send, - methodName: "methodName", - params: ["0", "2"], - }, - transactionId: "txID1", - timestamp: new Date(), - }; - fabricReplaySubject.next(txSim1); - log.debug(txSim1); - - await new Promise((f) => setTimeout(f, 3000)); - - // only monitoring the last 1000 miliseconds - // txSim1 will not be monitored - hephaestus.monitorTransactions(1000); - - const txSim2: RunTxReqWithTxId = { - request: { - signingCredential: { - keychainId: "keychainId", - keychainRef: "person 1", - }, - channelName: "channelName", - contractName: "contractName", - invocationType: FabricContractInvocationType.Send, - methodName: "methodName2", - params: ["0", "2"], - }, - transactionId: "txID1", - timestamp: new Date(), - }; - fabricReplaySubject.next(txSim2); - log.debug(txSim2); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(1); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - expect(hephaestus.numberEventsLog).toEqual(1); - - const logNameCsv = await hephaestus.persistCrossChainLogCsv( - "example-dummy-basic-test", - ); - expect(logNameCsv).toBeTruthy(); - - const logNameJson = await hephaestus.persistCrossChainLogJson( - "example-dummy-basic-test", - ); - expect(logNameJson).toBeTruthy(); -}); - -afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/besu-ethereum-asset-transfer.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/besu-ethereum-asset-transfer.test.ts new file mode 100644 index 0000000000..d73e9cfe39 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/besu-ethereum-asset-transfer.test.ts @@ -0,0 +1,778 @@ +import "jest-extended"; +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; +import { Server as SocketIoServer } from "socket.io"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { + Configuration, + Constants, + LedgerType, +} from "@hyperledger/cactus-core-api"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import bodyParser from "body-parser"; +import http from "http"; +import { + Web3SigningCredentialType as Web3SigningCredentialTypeBesu, + PluginLedgerConnectorBesu, + EthContractInvocationType as EthContractInvocationTypeBesu, + ReceiptType, + IPluginLedgerConnectorBesuOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { + BesuTestLedger, + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import Web3 from "web3"; +import { Account } from "web3-core"; +import express from "express"; +import { AddressInfo } from "net"; +import { v4 as uuidv4 } from "uuid"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const logLevel: LogLevelDesc = "INFO"; + +let besuLedger: BesuTestLedger; +let besuContractName: string; +let rpcApiHttpHostBesu: string; +let rpcApiWsHost: string; +let web3Besu: Web3; +let firstHighNetWorthAccount: string; +let besuConnector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let testEthAccountBesu: Account; +let keychainPluginBesu: PluginKeychainMemory; + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; +const keychainEntryKey = uuidv4(); +let testEthAccount: Account; +let web3Eth: InstanceType; +let addressInfo; +let address: string; +let port: number; +let apiHost: string; +let apiConfig; +let ethereumLedger: GethTestLedger; +let ethereumApiClient: EthereumApi; +let ethereumConnector: PluginLedgerConnectorEthereum; +let rpcApiHttpHostEthereum: string; +let keychainPluginEthereum: PluginKeychainMemory; +const expressAppEthereum = express(); +expressAppEthereum.use(bodyParser.json({ limit: "250mb" })); +const ethereumServer = http.createServer(expressAppEthereum); +const wsApi = new SocketIoServer(ethereumServer, { + path: Constants.SocketIoConnectionPathV1, +}); + +let hephaestus: CcModelHephaestus; +let hephaestusOptions: IPluginCcModelHephaestusOptions; +let modeledTransactions: number; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "besu-ethereum-asset-transfer.test", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + besuLedger = new BesuTestLedger(); + await besuLedger.start(); + + rpcApiHttpHostBesu = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3Besu = new Web3(rpcApiHttpHostBesu); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + testEthAccountBesu = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + besuContractName = "LockAsset"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPluginBesu = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + keychainPluginBesu.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPluginBesu], + }); + + const options: IPluginLedgerConnectorBesuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost: rpcApiHttpHostBesu, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + besuConnector = new PluginLedgerConnectorBesu(options); + pluginRegistry.add(besuConnector); + + await besuConnector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: testEthAccountBesu.address, + value: 10e9, + gas: 1000000, + }, + }); + const balance = await web3Besu.eth.getBalance(testEthAccountBesu.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + + log.info("Connector initialized"); + + const deployOut = await besuConnector.deployContract({ + keychainId: keychainPluginBesu.getKeychainId(), + contractName: LockAssetContractJson.contractName, + contractAbi: LockAssetContractJson.abi, + constructorArgs: [], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + bytecode: LockAssetContractJson.bytecode, + gas: 1000000, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.transactionReceipt).toBeTruthy(); + expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); + log.info("Contract Deployed successfully"); + } + { + ethereumLedger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ethereumLedger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server: ethereumServer, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + ethereumApiClient = new EthereumApi(apiConfig); + rpcApiHttpHostEthereum = await ethereumLedger.getRpcApiHttpHost(); + web3Eth = new Web3(rpcApiHttpHostEthereum); + testEthAccount = web3Eth.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPluginEthereum = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPluginEthereum.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + ethereumConnector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHostEthereum, + logLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPluginEthereum] }), + }); + + await ethereumConnector.getOrCreateWebServices(); + await ethereumConnector.registerWebServices(expressAppEthereum, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await ethereumApiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3Eth.utils.toWei("5000", "ether"); + await ethereumApiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3Eth.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + } + { + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + besuTxObservable: besuConnector.getTxSubjectObservable(), + ethTxObservable: ethereumConnector.getTxSubjectObservable(), + sourceLedger: LedgerType.Besu2X, + targetLedger: LedgerType.Ethereum, + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + } + { + const { success: createResBesu1 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["asset1_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu1).toBeTruthy(); + + const { success: createResBesu2 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["asset2_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu2).toBeTruthy(); + + const { success: createResBesu3 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["test1_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu3).toBeTruthy(); + + const { success: createResBesu4 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["test2_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu4).toBeTruthy(); + + const { success: createResBesu5 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["test3_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu5).toBeTruthy(); + + const { success: createResBesu6 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["test4_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu6).toBeTruthy(); + + const createResEth1 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["test5_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth1).toBeTruthy(); + } + { + hephaestus.monitorTransactions(0); + + hephaestus.setCaseId("cctx1"); + + const { success: lockResBesu1 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: ["asset1_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu1).toBeTruthy(); + + const { success: deleteResBesu1 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "deleteAsset", + params: ["asset1_besu"], + signingCredential: { + ethAccount: testEthAccountBesu.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(deleteResBesu1).toBeTruthy(); + + const createResEth1 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth1).toBeTruthy(); + modeledTransactions = 3; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + hephaestus.setCaseId("cctx2"); + + const { success: lockResBesu2 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: ["asset2_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu2).toBeTruthy(); + + const { success: deleteResBesu2 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "deleteAsset", + params: ["asset2_besu"], + signingCredential: { + ethAccount: testEthAccountBesu.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(deleteResBesu2).toBeTruthy(); + + const createResEth2 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset2_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth2).toBeTruthy(); + + modeledTransactions = 6; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const model = await hephaestus.createModel(); + expect(model).toBeTruthy(); + expect(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)) + .toBeTruthy; + hephaestus.setIsModeling(false); + } +}); + +test("Tx1 - Unlock after lock", async () => { + hephaestus.setCaseId("unmodeled_cctx1"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const { success: lockResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: ["test1_asset_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const { success: unlockResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "unLockAsset", + params: ["test1_asset_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(unlockResBesu).toBeTruthy(); + + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx2 - Skip escrow", async () => { + hephaestus.setCaseId("unmodeled_cctx2"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const createResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["test2_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx3 - Skip burn", async () => { + hephaestus.setCaseId("unmodeled_cctx3"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const { success: lockResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: ["test3_asset_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const createResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["test3_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx4 - Double mint", async () => { + hephaestus.setCaseId("unmodeled_cctx4"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const { success: lockResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: ["test4_asset_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const { success: deleteResBesu1 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "deleteAsset", + params: ["test4_asset_besu"], + signingCredential: { + ethAccount: testEthAccountBesu.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(deleteResBesu1).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(2); + + const createResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["test4_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + modeledTransactions += 3; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const createResEth2 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["test4_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth2).toBeTruthy(); + + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); +}); + +test("Tx5 - Asset transfer from Ethereum to Besu", async () => { + hephaestus.setCaseId("unmodeled_cctx5"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["test5_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); + + const deleteResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["test5_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + + const { success: createResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["test5_asset_eth", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + + expect(hephaestus.numberEventsNonConformedLog).toEqual(3); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +afterAll(async () => { + console.log(hephaestus.ccModel.getCrossChainState()); + console.log(hephaestus.ccModel); + + await besuLedger.stop(); + await besuLedger.destroy(); + + await ethereumConnector.shutdown(); + await ethereumLedger.stop(); + await ethereumLedger.destroy(); + await Servers.shutdown(ethereumServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts index b3560e3fe4..e9c5867b58 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-conformance-checking.test.ts @@ -18,7 +18,11 @@ import { v4 as uuidv4 } from "uuid"; import { Server as SocketIoServer } from "socket.io"; import { AddressInfo } from "net"; import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + Configuration, + Constants, + LedgerType, +} from "@hyperledger/cactus-core-api"; import { IListenOptions, Logger, @@ -81,6 +85,8 @@ describe("Test cross-chain model serialization and conformance checking", () => let hephaestus: CcModelHephaestus; let hephaestusOptions: IPluginCcModelHephaestusOptions; + let totalTxs = 0; + ////////////////////////////////// // Environment Setup ////////////////////////////////// @@ -180,6 +186,8 @@ describe("Test cross-chain model serialization and conformance checking", () => instanceId: uuidv4(), logLevel: testLogLevel, ethTxObservable: connector.getTxSubjectObservable(), + sourceLedger: LedgerType.Ethereum, + targetLedger: LedgerType.Ethereum, }; hephaestus = new CcModelHephaestus(hephaestusOptions); @@ -252,14 +260,7 @@ describe("Test cross-chain model serialization and conformance checking", () => caseNumber++; } - const totalTxs = txsPerCase * numberOfCases; - - expect(hephaestus.numberUnprocessedReceipts).toEqual(totalTxs); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); + totalTxs = txsPerCase * numberOfCases; expect(hephaestus.numberEventsLog).toEqual(totalTxs); const model = await hephaestus.createModel(); @@ -270,7 +271,7 @@ describe("Test cross-chain model serialization and conformance checking", () => hephaestus.setIsModeling(false); }); - test("Check confomity of unmodeled transactions", async () => { + test("Check confomity of unmodeled transaction when they happen", async () => { const createResEth = await apiClient.invokeContractV1({ contract: { contractName: LockAssetContractJson.contractName, @@ -287,6 +288,7 @@ describe("Test cross-chain model serialization and conformance checking", () => }); expect(createResEth).toBeTruthy(); expect(createResEth.data).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); const lockResEth = await apiClient.invokeContractV1({ contract: { @@ -305,6 +307,7 @@ describe("Test cross-chain model serialization and conformance checking", () => expect(lockResEth).toBeTruthy(); expect(lockResEth.data).toBeTruthy(); expect(lockResEth.status).toBe(200); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(2); const deleteResEth = await apiClient.invokeContractV1({ contract: { @@ -324,129 +327,9 @@ describe("Test cross-chain model serialization and conformance checking", () => expect(deleteResEth.data).toBeTruthy(); expect(deleteResEth.status).toBe(200); - expect(hephaestus.numberEventsUncheckedLog).toEqual(0); - expect(hephaestus.numberUnprocessedReceipts).toEqual(3); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - expect(hephaestus.numberEventsUncheckedLog).toEqual(3); - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - - const serializedCCModel = hephaestus.getModel(CrossChainModelType.PetriNet); - expect(serializedCCModel).toBeTruthy(); - - const conformanceDetails = await hephaestus.checkConformance( - serializedCCModel!, - ); - expect(conformanceDetails).toBeTruthy(); - console.log(conformanceDetails); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - expect(hephaestus.numberEventsUncheckedLog).toEqual(0); - - const tree = hephaestus.convertModelToProcessTree(); - expect(tree).toBeTruthy(); - expect( - hephaestus.ccModel.getModel(CrossChainModelType.ProcessTree), - ).toBeTruthy(); - console.log(hephaestus.ccModel.getModel(CrossChainModelType.ProcessTree)); - }); - - test("Check confomity of unmodeled transactions that should not conform", async () => { - const createResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: ["asset3", 10], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(createResEth).toBeTruthy(); - expect(createResEth.data).toBeTruthy(); - - const lockResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: ["asset3"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(lockResEth).toBeTruthy(); - expect(lockResEth.data).toBeTruthy(); - expect(lockResEth.status).toBe(200); - - const deleteResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAsset", - params: ["asset3"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deleteResEth).toBeTruthy(); - expect(deleteResEth.data).toBeTruthy(); - expect(deleteResEth.status).toBe(200); - - const getResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "getAsset", - params: ["asset3"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(getResEth).toBeTruthy(); - expect(getResEth.data).toBeTruthy(); - expect(getResEth.status).toBe(200); - - expect(hephaestus.numberEventsUncheckedLog).toEqual(0); - expect(hephaestus.numberUnprocessedReceipts).toEqual(4); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - expect(hephaestus.numberEventsUncheckedLog).toEqual(4); - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - - const serializedCCModel = hephaestus.getModel(CrossChainModelType.PetriNet); - expect(serializedCCModel).toBeTruthy(); - - const conformanceDetails = await hephaestus.checkConformance( - serializedCCModel!, - ); - expect(conformanceDetails).toBeTruthy(); - console.log(conformanceDetails); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - expect(hephaestus.numberEventsUncheckedLog).toEqual(0); - expect(hephaestus.numberEventsNonConformanceLog).toEqual(4); - - const tree = hephaestus.convertModelToProcessTree(); - expect(tree).toBeTruthy(); - expect(hephaestus.getModel(CrossChainModelType.ProcessTree)).toBeTruthy(); - console.log(hephaestus.getModel(CrossChainModelType.ProcessTree)); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(totalTxs + 3); }); afterAll(async () => { diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts deleted file mode 100644 index b9517fd912..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-periodic-update.test.ts +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright 2020-2022 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -////////////////////////////////// -// Constants -////////////////////////////////// - -const testLogLevel: LogLevelDesc = "info"; - -import "jest-extended"; -import express from "express"; -import bodyParser from "body-parser"; -import http from "http"; -import Web3 from "web3"; -import { v4 as uuidv4 } from "uuid"; -import { Server as SocketIoServer } from "socket.io"; -import { AddressInfo } from "net"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { - IListenOptions, - Logger, - LoggerProvider, - Servers, - LogLevelDesc, -} from "@hyperledger/cactus-common"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; -import { - EthContractInvocationType, - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, - DefaultApi as EthereumApi, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { Account } from "web3-core"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; -import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; -import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; -import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; - -const log: Logger = LoggerProvider.getOrCreate({ - label: "cross-chain-model-periodic-update.test", - level: testLogLevel, -}); -log.info("Test started"); - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; - -describe("Test the periodic update of the cross-chain model", () => { - const keychainEntryKey = uuidv4(); - let testEthAccount: Account, - web3: InstanceType, - addressInfo, - address: string, - port: number, - apiHost: string, - apiConfig, - ledger: GethTestLedger, - apiClient: EthereumApi, - connector: PluginLedgerConnectorEthereum, - rpcApiHttpHost: string, - keychainPlugin: PluginKeychainMemory; - - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - const server = http.createServer(expressApp); - const wsApi = new SocketIoServer(server, { - path: Constants.SocketIoConnectionPathV1, - }); - - let hephaestus: CcModelHephaestus; - let hephaestusOptions: IPluginCcModelHephaestusOptions; - const fileName = "example-dummy-periodic-update"; - - ////////////////////////////////// - // Environment Setup - ////////////////////////////////// - - beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel: testLogLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel: testLogLevel }); - fail("Pruning didn't throw OK"); - }); - - ledger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ledger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - - apiConfig = new Configuration({ basePath: apiHost }); - apiClient = new EthereumApi(apiConfig); - rpcApiHttpHost = await ledger.getRpcApiHttpHost(); - web3 = new Web3(rpcApiHttpHost); - testEthAccount = web3.eth.accounts.create(); - - log.info("Create PluginKeychainMemory..."); - const keychainEntryValue = testEthAccount.privateKey; - keychainPlugin = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel: testLogLevel, - }); - - keychainPlugin.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - log.info("Create PluginLedgerConnectorEthereum..."); - connector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost: rpcApiHttpHost, - logLevel: testLogLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), - }); - - await connector.getOrCreateWebServices(); - await connector.registerWebServices(expressApp, wsApi); - - log.info("Deploy Contract..."); - const deployOut = await apiClient.deployContract({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - log.info("contract deployed successfully"); - - const initTransferValue = web3.utils.toWei("5000", "ether"); - await apiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: initTransferValue, - }, - }); - const balance = await web3.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toBe(initTransferValue); - - hephaestusOptions = { - instanceId: uuidv4(), - logLevel: testLogLevel, - ethTxObservable: connector.getTxSubjectObservable(), - }; - - hephaestus = new CcModelHephaestus(hephaestusOptions); - expect(hephaestus).toBeTruthy(); - log.info("hephaestus plugin initialized successfully"); - }); - - test("update cross-chain model across 10 cases", async () => { - hephaestus.setCaseId("CCMODEL_UPDATE"); - hephaestus.monitorTransactions(); - - await hephaestus.periodicCCModelUpdate(fileName, 10000); - - const numberOfCases = 10; - const txsPerCase = 3; - let caseNumber = 1; - - while (numberOfCases >= caseNumber) { - const createResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: ["asset1", 5], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(createResEth).toBeTruthy(); - expect(createResEth.data).toBeTruthy(); - - const lockResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: ["asset1"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(lockResEth).toBeTruthy(); - expect(lockResEth.data).toBeTruthy(); - expect(lockResEth.status).toBe(200); - - const deleteResEth = await apiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPlugin.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAsset", - params: ["asset1"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deleteResEth).toBeTruthy(); - expect(deleteResEth.data).toBeTruthy(); - expect(deleteResEth.status).toBe(200); - - caseNumber++; - } - - const totalTxs = txsPerCase * numberOfCases; - - await hephaestus.stopPeriodicCCModelUpdate(fileName); - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - expect(hephaestus.numberEventsLog).toEqual(totalTxs); - - console.log(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)); - }); - - afterAll(async () => { - log.info("Shutdown connector..."); - await connector.shutdown(); - - log.info("Stop and destroy the test ledger..."); - await ledger.stop(); - await ledger.destroy(); - - log.info("Shutdown server..."); - await Servers.shutdown(server); - - log.info("Prune docker..."); - const pruning = pruneDockerAllIfGithubAction({ logLevel: testLogLevel }); - await expect(pruning).resolves.toBeTruthy(); - }); -}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts index 18cf5da629..d08ec9062d 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/cross-chain-model-serialization.test.ts @@ -18,7 +18,11 @@ import { v4 as uuidv4 } from "uuid"; import { Server as SocketIoServer } from "socket.io"; import { AddressInfo } from "net"; import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + Configuration, + Constants, + LedgerType, +} from "@hyperledger/cactus-core-api"; import { IListenOptions, Logger, @@ -180,6 +184,8 @@ describe("Test cross-chain model serialization", () => { instanceId: uuidv4(), logLevel: testLogLevel, ethTxObservable: connector.getTxSubjectObservable(), + sourceLedger: LedgerType.Ethereum, + targetLedger: LedgerType.Ethereum, }; hephaestus = new CcModelHephaestus(hephaestusOptions); @@ -254,12 +260,6 @@ describe("Test cross-chain model serialization", () => { const totalTxs = txsPerCase * numberOfCases; - expect(hephaestus.numberUnprocessedReceipts).toEqual(totalTxs); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); expect(hephaestus.numberEventsLog).toEqual(totalTxs); const model = await hephaestus.createModel(); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/ethereum-fabric-asset-transfer.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/ethereum-fabric-asset-transfer.test.ts new file mode 100644 index 0000000000..2080879ade --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/ethereum-fabric-asset-transfer.test.ts @@ -0,0 +1,868 @@ +import "jest-extended"; +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; +import { Server as SocketIoServer } from "socket.io"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { + Configuration, + Constants, + LedgerType, +} from "@hyperledger/cactus-core-api"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { DiscoveryOptions } from "fabric-network"; +import bodyParser from "body-parser"; +import path from "path"; +import http, { Server } from "http"; +import fs from "fs-extra"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, + DefaultApi as EthereumApi, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { + Configuration as ConfigurationFabric, + DefaultEventHandlerStrategy, + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FileBase64, + ChainCodeProgrammingLanguage, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + Containers, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import Web3 from "web3"; +import { Account } from "web3-core"; +import express from "express"; +import { AddressInfo } from "net"; +import { v4 as uuidv4 } from "uuid"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const logLevel: LogLevelDesc = "INFO"; + +let fabricServer: Server; +let fabricSigningCredential: FabricSigningCredential; +let fabricLedger: FabricTestLedgerV1; +let fabricContractName: string; +let channelName: string; +let config: ConfigurationFabric; +let fabricApiClient: FabricApi; +let fabricConnector: PluginLedgerConnectorFabric; + +const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; +const containerImageVersion = "2023-07-27-2a8c48ed6"; +const keychainEntryKey = uuidv4(); +let testEthAccount: Account; +let web3Eth: InstanceType; +let addressInfo; +let address: string; +let port: number; +let apiHost: string; +let apiConfig; +let ethereumLedger: GethTestLedger; +let ethereumApiClient: EthereumApi; +let ethereumConnector: PluginLedgerConnectorEthereum; +let rpcApiHttpHostEthereum: string; +let keychainPluginEthereum: PluginKeychainMemory; +const expressAppEthereum = express(); +expressAppEthereum.use(bodyParser.json({ limit: "250mb" })); +const ethereumServer = http.createServer(expressAppEthereum); +const wsApi = new SocketIoServer(ethereumServer, { + path: Constants.SocketIoConnectionPathV1, +}); + +let hephaestus: CcModelHephaestus; +let hephaestusOptions: IPluginCcModelHephaestusOptions; +let modeledTransactions: number; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "ethereum-fabric-asset-transfer.test", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + log.info("Fabric Ledger started"); + + const channelId = "mychannel"; + channelName = channelId; + + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + const sshConfig = await fabricLedger.getSshConfig(); + log.info("admin enrolled"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + const keychainPluginFabric = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPluginFabric], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel, + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressAppFabric = express(); + expressAppFabric.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressAppFabric); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + const apiUrl = `http://${address}:${port}`; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressAppFabric); + + config = new ConfigurationFabric({ basePath: apiUrl }); + + fabricApiClient = new FabricApi(config); + + // deploy contracts ... + fabricContractName = "basic-asset-transfer-2"; + const contractRelPath = + "../fabric-contracts/lock-asset/chaincode-typescript"; + + const contractDir = path.join(__dirname, contractRelPath); + + // ├── package.json + // ├── src + // │ ├── assetTransfer.ts + // │ ├── asset.ts + // │ ├── index.ts + // │ └── ITraceableContract.ts + // ├── tsconfig.json + // -------- + const sourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./asset.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./assetTransfer.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await fabricApiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles, + ccName: fabricContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "basic-asset-transfer-2", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + } + { + ethereumLedger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ethereumLedger.start(); + + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server: ethereumServer, + }; + addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + ({ address, port } = addressInfo); + apiHost = `http://${address}:${port}`; + + apiConfig = new Configuration({ basePath: apiHost }); + ethereumApiClient = new EthereumApi(apiConfig); + rpcApiHttpHostEthereum = await ethereumLedger.getRpcApiHttpHost(); + web3Eth = new Web3(rpcApiHttpHostEthereum); + testEthAccount = web3Eth.eth.accounts.create(); + + log.info("Create PluginKeychainMemory..."); + const keychainEntryValue = testEthAccount.privateKey; + keychainPluginEthereum = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPluginEthereum.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + log.info("Create PluginLedgerConnectorEthereum..."); + ethereumConnector = new PluginLedgerConnectorEthereum({ + rpcApiHttpHost: rpcApiHttpHostEthereum, + logLevel, + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry({ plugins: [keychainPluginEthereum] }), + }); + + await ethereumConnector.getOrCreateWebServices(); + await ethereumConnector.registerWebServices(expressAppEthereum, wsApi); + + log.info("Deploy Contract..."); + const deployOut = await ethereumApiClient.deployContract({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.data).toBeTruthy(); + expect(deployOut.data.transactionReceipt).toBeTruthy(); + expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); + log.info("contract deployed successfully"); + + const initTransferValue = web3Eth.utils.toWei("5000", "ether"); + await ethereumApiClient.runTransactionV1({ + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + transactionConfig: { + from: WHALE_ACCOUNT_ADDRESS, + to: testEthAccount.address, + value: initTransferValue, + }, + }); + const balance = await web3Eth.eth.getBalance(testEthAccount.address); + expect(balance).toBeTruthy(); + expect(balance.toString()).toBe(initTransferValue); + } + { + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + ethTxObservable: ethereumConnector.getTxSubjectObservable(), + fabricTxObservable: fabricConnector.getTxSubjectObservable(), + sourceLedger: LedgerType.Ethereum, + targetLedger: LedgerType.Fabric2, + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + } + { + const createResEth1 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset1_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth1).toBeTruthy(); + + const createResEth2 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset2_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth2).toBeTruthy(); + + const createResEth3 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["tx1_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth3).toBeTruthy(); + + const createResEth4 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["tx2_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth4).toBeTruthy(); + + const createResEth5 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["tx3_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth5).toBeTruthy(); + + const createResEth6 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["tx4_asset_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth6).toBeTruthy(); + + const createResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx5_asset_fabric", "10", "owner1"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric).toBeTruthy(); + } + { + hephaestus.monitorTransactions(0); + + hephaestus.setCaseId("cctx1"); + + const lockResEth1 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset1_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth1).toBeTruthy(); + + const deleteResEth1 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset1_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth1).toBeTruthy(); + + const createResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset1_fabric", "10", "owner_fabric"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric1).toBeTruthy(); + modeledTransactions = 3; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + hephaestus.setCaseId("cctx2"); + + const lockResEth2 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["asset2_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth2).toBeTruthy(); + + const deleteResEth2 = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["asset2_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth2).toBeTruthy(); + + const createResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset2_fabric", "10", "owner_fabric"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric2).toBeTruthy(); + + modeledTransactions = 6; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const model = await hephaestus.createModel(); + expect(model).toBeTruthy(); + expect(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)) + .toBeTruthy; + hephaestus.setIsModeling(false); + } +}); + +test("Tx1 - Unlock after lock", async () => { + hephaestus.setCaseId("unmodeled_cctx1"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["tx1_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const unlockResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "unLockAsset", + params: ["tx1_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(unlockResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx2 - Skip escrow", async () => { + hephaestus.setCaseId("unmodeled_cctx2"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const createResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx2_asset_fabric", "10", "owner1"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx3 - Skip burn", async () => { + hephaestus.setCaseId("unmodeled_cctx3"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["tx3_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const createResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx3_asset_fabric", "10", "owner2"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx4 - Double mint", async () => { + hephaestus.setCaseId("unmodeled_cctx4"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "lockAsset", + params: ["tx4_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(lockResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const deleteResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "deleteAsset", + params: ["tx4_asset_eth"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deleteResEth).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(2); + + const createResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx4_asset_fabric", "10", "owner3"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric1).toBeTruthy(); + modeledTransactions += 3; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + + const createResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx4_asset_fabric", "10", "owner3"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric2).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx5 - Asset transfer from Fabric to Ethereum", async () => { + hephaestus.setCaseId("unmodeled_cctx5"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx5_asset_fabric"], + methodName: "LockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(lockResFabric1).toBeTruthy(); + + const deleteResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx5_asset_fabric"], + methodName: "DeleteAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(deleteResFabric1).toBeTruthy(); + + const createResEth = await ethereumApiClient.invokeContractV1({ + contract: { + contractName: LockAssetContractJson.contractName, + keychainId: keychainPluginEthereum.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "createAsset", + params: ["asset2_eth", 10], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(createResEth).toBeTruthy(); + + expect(hephaestus.numberEventsNonConformedLog).toEqual(3); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +afterAll(async () => { + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await ethereumConnector.shutdown(); + await ethereumLedger.stop(); + await ethereumLedger.destroy(); + await Servers.shutdown(ethereumServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/fabric-besu-asset-transfer.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/fabric-besu-asset-transfer.test.ts new file mode 100644 index 0000000000..4766fee7f5 --- /dev/null +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/fabric-besu-asset-transfer.test.ts @@ -0,0 +1,800 @@ +import "jest-extended"; +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { LedgerType } from "@hyperledger/cactus-core-api"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { DiscoveryOptions } from "fabric-network"; +import bodyParser from "body-parser"; +import path from "path"; +import http, { Server } from "http"; +import fs from "fs-extra"; +import { + Web3SigningCredentialType as Web3SigningCredentialTypeBesu, + PluginLedgerConnectorBesu, + EthContractInvocationType as EthContractInvocationTypeBesu, + ReceiptType, + IPluginLedgerConnectorBesuOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { + Configuration as ConfigurationFabric, + DefaultEventHandlerStrategy, + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FileBase64, + ChainCodeProgrammingLanguage, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + BesuTestLedger, + Containers, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import Web3 from "web3"; +import { Account } from "web3-core"; +import express from "express"; +import { AddressInfo } from "net"; +import { v4 as uuidv4 } from "uuid"; +import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; +import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; +import { CrossChainModelType } from "../../../main/typescript/models/crosschain-model"; + +const logLevel: LogLevelDesc = "INFO"; + +let fabricServer: Server; +let fabricSigningCredential: FabricSigningCredential; +let fabricLedger: FabricTestLedgerV1; +let fabricContractName: string; +let channelName: string; +let config: ConfigurationFabric; +let fabricApiClient: FabricApi; +let fabricConnector: PluginLedgerConnectorFabric; + +let besuLedger: BesuTestLedger; +let besuContractName: string; +let rpcApiHttpHostBesu: string; +let rpcApiWsHost: string; +let web3Besu: Web3; +let firstHighNetWorthAccount: string; +let besuConnector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let testEthAccountBesu: Account; +let keychainPluginBesu: PluginKeychainMemory; + +let hephaestus: CcModelHephaestus; +let hephaestusOptions: IPluginCcModelHephaestusOptions; +let modeledTransactions: number; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "fabric-besu-asset-transfer.test", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + log.info("Fabric Ledger started"); + + const channelId = "mychannel"; + channelName = channelId; + + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + const sshConfig = await fabricLedger.getSshConfig(); + log.info("admin enrolled"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + const keychainPluginFabric = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPluginFabric], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel, + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressAppFabric = express(); + expressAppFabric.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressAppFabric); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + const apiUrl = `http://${address}:${port}`; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressAppFabric); + + config = new ConfigurationFabric({ basePath: apiUrl }); + + fabricApiClient = new FabricApi(config); + + // deploy contracts ... + fabricContractName = "basic-asset-transfer-2"; + const contractRelPath = + "../fabric-contracts/lock-asset/chaincode-typescript"; + + const contractDir = path.join(__dirname, contractRelPath); + + // ├── package.json + // ├── src + // │ ├── assetTransfer.ts + // │ ├── asset.ts + // │ ├── index.ts + // │ └── ITraceableContract.ts + // ├── tsconfig.json + // -------- + const sourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./asset.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./assetTransfer.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + sourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await fabricApiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles, + ccName: fabricContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "basic-asset-transfer-2", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + } + { + besuLedger = new BesuTestLedger(); + await besuLedger.start(); + + rpcApiHttpHostBesu = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3Besu = new Web3(rpcApiHttpHostBesu); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + testEthAccountBesu = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + besuContractName = "LockAsset"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPluginBesu = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + keychainPluginBesu.set( + LockAssetContractJson.contractName, + JSON.stringify(LockAssetContractJson), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPluginBesu], + }); + + const options: IPluginLedgerConnectorBesuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost: rpcApiHttpHostBesu, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + besuConnector = new PluginLedgerConnectorBesu(options); + pluginRegistry.add(besuConnector); + + await besuConnector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: testEthAccountBesu.address, + value: 10e9, + gas: 1000000, + }, + }); + const balance = await web3Besu.eth.getBalance(testEthAccountBesu.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + + log.info("Connector initialized"); + + const deployOut = await besuConnector.deployContract({ + keychainId: keychainPluginBesu.getKeychainId(), + contractName: LockAssetContractJson.contractName, + contractAbi: LockAssetContractJson.abi, + constructorArgs: [], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + bytecode: LockAssetContractJson.bytecode, + gas: 1000000, + }); + expect(deployOut).toBeTruthy(); + expect(deployOut.transactionReceipt).toBeTruthy(); + expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); + log.info("Contract Deployed successfully"); + } + { + hephaestusOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + besuTxObservable: besuConnector.getTxSubjectObservable(), + fabricTxObservable: fabricConnector.getTxSubjectObservable(), + sourceLedger: LedgerType.Fabric2, + targetLedger: LedgerType.Besu2X, + }; + + hephaestus = new CcModelHephaestus(hephaestusOptions); + expect(hephaestus).toBeTruthy(); + log.info("hephaestus plugin initialized successfully"); + } + { + const createResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset1_fabric", "10", "owner1"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric1).toBeTruthy(); + + const createResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset2_fabric", "10", "owner2"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric2).toBeTruthy(); + + const createResFabric3 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx1_asset_fabric", "10", "owner3"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric3).toBeTruthy(); + + const createResFabric4 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx2_asset_fabric", "10", "owner4"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric4).toBeTruthy(); + + const createResFabric5 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx3_asset_fabric", "10", "owner5"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric5).toBeTruthy(); + + const createResFabric6 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx4_asset_fabric", "10", "owner6"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric6).toBeTruthy(); + + const { success: createResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["tx5_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + } + { + hephaestus.monitorTransactions(0); + + hephaestus.setCaseId("cctx1"); + + const lockResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset1_fabric"], + methodName: "LockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(lockResFabric1).toBeTruthy(); + + const deleteResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset1_fabric"], + methodName: "DeleteAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(deleteResFabric1).toBeTruthy(); + + const { success: createResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["asset1_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + modeledTransactions = 3; + + hephaestus.setCaseId("cctx2"); + + const lockResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset2_fabric"], + methodName: "LockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(lockResFabric2).toBeTruthy(); + + const deleteResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["asset2_fabric"], + methodName: "DeleteAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(deleteResFabric2).toBeTruthy(); + + const { success: createResBesu2 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["asset2_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu2).toBeTruthy(); + + modeledTransactions = 6; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const model = await hephaestus.createModel(); + expect(model).toBeTruthy(); + expect(hephaestus.ccModel.getModel(CrossChainModelType.PetriNet)) + .toBeTruthy; + hephaestus.setIsModeling(false); + } +}); + +test("Tx1 - Unlock after lock", async () => { + hephaestus.setCaseId("unmodeled_cctx1"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx1_asset_fabric"], + methodName: "LockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(lockResFabric1).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const unlockResFabric1 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx1_asset_fabric"], + methodName: "UnlockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(unlockResFabric1).toBeTruthy(); + + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx2 - Skip escrow", async () => { + hephaestus.setCaseId("unmodeled_cctx2"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const { success: createResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["tx2_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx3 - Skip burn", async () => { + hephaestus.setCaseId("unmodeled_cctx3"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx3_asset_fabric"], + methodName: "LockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(lockResFabric).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const { success: createResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["tx3_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(2); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +test("Tx4 - Double mint", async () => { + hephaestus.setCaseId("unmodeled_cctx4"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const lockResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx4_asset_fabric"], + methodName: "LockAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(lockResFabric2).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(1); + + const deleteResFabric2 = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx4_asset_fabric"], + methodName: "DeleteAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(deleteResFabric2).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(2); + + const { success: createResBesu1 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["tx4_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu1).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + modeledTransactions += 3; + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const { success: createResBesu2 } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "createAsset", + params: ["tx4_asset_besu", 10], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(createResBesu2).toBeTruthy(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(1); +}); + +test("Tx5 - Asset transfer from Besu to Fabric", async () => { + hephaestus.setCaseId("unmodeled_cctx5"); + hephaestus.purgeNonConformedEvents(); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsNonConformedLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); + + const { success: lockResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "lockAsset", + params: ["tx5_asset_besu"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(lockResBesu).toBeTruthy(); + + const { success: deleteResBesu } = await besuConnector.invokeContract({ + contractName: besuContractName, + keychainId: keychainPluginBesu.getKeychainId(), + invocationType: EthContractInvocationTypeBesu.Send, + methodName: "deleteAsset", + params: ["tx5_asset_besu"], + signingCredential: { + ethAccount: testEthAccountBesu.address, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialTypeBesu.PrivateKeyHex, + }, + gas: 1000000, + }); + expect(deleteResBesu).toBeTruthy(); + + const createResFabric = await fabricApiClient.runTransactionV1({ + contractName: fabricContractName, + channelName, + params: ["tx5_asset_fabric", "10", "fabric_owner"], + methodName: "CreateAsset", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(createResFabric).toBeTruthy(); + + expect(hephaestus.numberEventsNonConformedLog).toEqual(3); + expect(hephaestus.numberEventsUnmodeledLog).toEqual(0); + expect(hephaestus.numberEventsLog).toEqual(modeledTransactions); +}); + +afterAll(async () => { + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await besuLedger.stop(); + await besuLedger.destroy(); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts index a5e52a411c..23573fc85c 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-besu-events.test.ts @@ -21,6 +21,7 @@ import { Account } from "web3-core"; import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { LedgerType } from "@hyperledger/cactus-core-api"; const logLevel: LogLevelDesc = "INFO"; @@ -140,11 +141,14 @@ beforeAll(async () => { expect(deployOut.transactionReceipt).toBeTruthy(); expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); log.info("Contract Deployed successfully"); - + } + { hephaestusOptions = { instanceId: uuidv4(), logLevel: logLevel, besuTxObservable: connector.getTxSubjectObservable(), + sourceLedger: LedgerType.Besu2X, + targetLedger: LedgerType.Besu2X, }; hephaestus = new CcModelHephaestus(hephaestusOptions); @@ -217,12 +221,6 @@ test("monitor Besu transactions", async () => { }); expect(deleteResBesu).toBeTruthy(); - expect(hephaestus.numberUnprocessedReceipts).toEqual(4); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); expect(hephaestus.numberEventsLog).toEqual(4); await hephaestus.persistCrossChainLogCsv("example-dummy-besu-4-events"); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts index ef8860bf7c..386eba9c3d 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-ethereum-events.test.ts @@ -18,7 +18,11 @@ import { v4 as uuidv4 } from "uuid"; import { Server as SocketIoServer } from "socket.io"; import { AddressInfo } from "net"; import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; +import { + Configuration, + Constants, + LedgerType, +} from "@hyperledger/cactus-core-api"; import { IListenOptions, Logger, @@ -179,6 +183,8 @@ describe("Ethereum contract deploy and invoke while monitoring", () => { instanceId: uuidv4(), logLevel: testLogLevel, ethTxObservable: connector.getTxSubjectObservable(), + sourceLedger: LedgerType.Ethereum, + targetLedger: LedgerType.Ethereum, }; hephaestus = new CcModelHephaestus(hephaestusOptions); @@ -261,12 +267,6 @@ describe("Ethereum contract deploy and invoke while monitoring", () => { expect(deleteResEth.data).toBeTruthy(); expect(deleteResEth.status).toBe(200); - expect(hephaestus.numberUnprocessedReceipts).toEqual(4); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); expect(hephaestus.numberEventsLog).toEqual(4); await hephaestus.persistCrossChainLogCsv("example-dummy-ethereum-4-events"); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts index f305c7529c..a0bbe4c065 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts +++ b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-4-fabric-events.test.ts @@ -37,6 +37,7 @@ import { AddressInfo } from "net"; import { v4 as uuidv4 } from "uuid"; import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; +import { LedgerType } from "@hyperledger/cactus-core-api"; let server: Server; @@ -279,11 +280,14 @@ beforeAll(async () => { keychainId, keychainRef: keychainEntryKey, }; - + } + { hephaestusOptions = { instanceId: uuidv4(), logLevel: logLevel, fabricTxObservable: fabricConnector.getTxSubjectObservable(), + sourceLedger: LedgerType.Fabric2, + targetLedger: LedgerType.Fabric2, }; hephaestus = new CcModelHephaestus(hephaestusOptions); @@ -336,12 +340,6 @@ test("monitor Fabric transactions", async () => { }); expect(deleteResFabric).toBeTruthy(); - expect(hephaestus.numberUnprocessedReceipts).toEqual(4); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); expect(hephaestus.numberEventsLog).toEqual(4); await hephaestus.persistCrossChainLogCsv("example-dummy-fabric-4-events"); diff --git a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts b/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts deleted file mode 100644 index 5e7e998814..0000000000 --- a/packages/cactus-plugin-ccmodel-hephaestus/src/test/typescript/integration/monitor-besu-ethereum-fabric-events.test.ts +++ /dev/null @@ -1,705 +0,0 @@ -import "jest-extended"; -import { - IListenOptions, - LogLevelDesc, - LoggerProvider, - Servers, -} from "@hyperledger/cactus-common"; -import { Server as SocketIoServer } from "socket.io"; -import { PluginRegistry } from "@hyperledger/cactus-core"; -import { Configuration, Constants } from "@hyperledger/cactus-core-api"; -import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; -import { DiscoveryOptions } from "fabric-network"; -import bodyParser from "body-parser"; -import path from "path"; -import http, { Server } from "http"; -import fs from "fs-extra"; -import { - Web3SigningCredentialType as Web3SigningCredentialTypeBesu, - PluginLedgerConnectorBesu, - EthContractInvocationType as EthContractInvocationTypeBesu, - ReceiptType, - IPluginLedgerConnectorBesuOptions, -} from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { - GethTestLedger, - WHALE_ACCOUNT_ADDRESS, -} from "@hyperledger/cactus-test-geth-ledger"; -import { - EthContractInvocationType, - PluginLedgerConnectorEthereum, - Web3SigningCredentialType, - DefaultApi as EthereumApi, -} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; -import { - Configuration as ConfigurationFabric, - DefaultEventHandlerStrategy, - FabricSigningCredential, - IPluginLedgerConnectorFabricOptions, - PluginLedgerConnectorFabric, - DefaultApi as FabricApi, - FileBase64, - ChainCodeProgrammingLanguage, - FabricContractInvocationType, -} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { - BesuTestLedger, - Containers, - FABRIC_25_LTS_AIO_FABRIC_VERSION, - FABRIC_25_LTS_AIO_IMAGE_VERSION, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - FabricTestLedgerV1, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import Web3 from "web3"; -import { Account } from "web3-core"; -import express from "express"; -import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; -import { CcModelHephaestus } from "../../../main/typescript/plugin-ccmodel-hephaestus"; -import { IPluginCcModelHephaestusOptions } from "../../../main/typescript"; -import LockAssetContractJson from "../../solidity/lock-asset-contract/LockAsset.json"; - -const logLevel: LogLevelDesc = "INFO"; - -let fabricServer: Server; -let fabricSigningCredential: FabricSigningCredential; -let fabricLedger: FabricTestLedgerV1; -let fabricContractName: string; -let channelName: string; -let config: ConfigurationFabric; -let fabricApiClient: FabricApi; -let fabricConnector: PluginLedgerConnectorFabric; -const FABRIC_ASSET_ID = uuidv4(); - -let besuLedger: BesuTestLedger; -let besuContractName: string; -let rpcApiHttpHostBesu: string; -let rpcApiWsHost: string; -let web3Besu: Web3; -let firstHighNetWorthAccount: string; -let besuConnector: PluginLedgerConnectorBesu; -let besuKeyPair: { privateKey: string }; -let testEthAccountBesu: Account; -let keychainPluginBesu: PluginKeychainMemory; -const BESU_ASSET_ID = uuidv4(); - -const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; -const containerImageVersion = "2023-07-27-2a8c48ed6"; -const keychainEntryKey = uuidv4(); -let testEthAccount: Account; -let web3Eth: InstanceType; -let addressInfo; -let address: string; -let port: number; -let apiHost: string; -let apiConfig; -let ethereumLedger: GethTestLedger; -let ethereumApiClient: EthereumApi; -let ethereumConnector: PluginLedgerConnectorEthereum; -let rpcApiHttpHostEthereum: string; -let keychainPluginEthereum: PluginKeychainMemory; -const expressAppEthereum = express(); -expressAppEthereum.use(bodyParser.json({ limit: "250mb" })); -const ethereumServer = http.createServer(expressAppEthereum); -const wsApi = new SocketIoServer(ethereumServer, { - path: Constants.SocketIoConnectionPathV1, -}); - -let hephaestus: CcModelHephaestus; -let hephaestusOptions: IPluginCcModelHephaestusOptions; - -const log = LoggerProvider.getOrCreate({ - level: logLevel, - label: "monitor-besu-ethereum-fabric-events.test.test", -}); - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - { - fabricLedger = new FabricTestLedgerV1({ - emitContainerLogs: true, - publishAllPorts: true, - imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", - imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, - envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, - }); - - await fabricLedger.start(); - log.info("Fabric Ledger started"); - - const channelId = "mychannel"; - channelName = channelId; - - const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); - expect(connectionProfile).not.toBeUndefined(); - const enrollAdminOut = await fabricLedger.enrollAdmin(); - const adminWallet = enrollAdminOut[1]; - const [userIdentity] = await fabricLedger.enrollUser(adminWallet); - const sshConfig = await fabricLedger.getSshConfig(); - log.info("admin enrolled"); - - const keychainInstanceId = uuidv4(); - const keychainId = uuidv4(); - const keychainEntryKey = "user1"; - const keychainEntryValue = JSON.stringify(userIdentity); - - const keychainPluginFabric = new PluginKeychainMemory({ - instanceId: keychainInstanceId, - keychainId, - logLevel, - backend: new Map([ - [keychainEntryKey, keychainEntryValue], - ["some-other-entry-key", "some-other-entry-value"], - ]), - }); - - const pluginRegistry = new PluginRegistry({ - plugins: [keychainPluginFabric], - }); - - const discoveryOptions: DiscoveryOptions = { - enabled: true, - asLocalhost: true, - }; - - const pluginOptions: IPluginLedgerConnectorFabricOptions = { - instanceId: uuidv4(), - dockerBinary: "/usr/local/bin/docker", - peerBinary: "/fabric-samples/bin/peer", - goBinary: "/usr/local/go/bin/go", - pluginRegistry, - cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - sshConfig, - logLevel, - connectionProfile, - discoveryOptions, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, - commitTimeout: 300, - }, - }; - fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); - - const expressAppFabric = express(); - expressAppFabric.use(bodyParser.json({ limit: "250mb" })); - fabricServer = http.createServer(expressAppFabric); - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: fabricServer, - }; - const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - const { address, port } = addressInfo; - const apiUrl = `http://${address}:${port}`; - - await fabricConnector.getOrCreateWebServices(); - await fabricConnector.registerWebServices(expressAppFabric); - - config = new ConfigurationFabric({ basePath: apiUrl }); - - fabricApiClient = new FabricApi(config); - - // deploy contracts ... - fabricContractName = "basic-asset-transfer-2"; - const contractRelPath = - "../fabric-contracts/lock-asset/chaincode-typescript"; - - const contractDir = path.join(__dirname, contractRelPath); - - // ├── package.json - // ├── src - // │ ├── assetTransfer.ts - // │ ├── asset.ts - // │ ├── index.ts - // │ └── ITraceableContract.ts - // ├── tsconfig.json - // -------- - const sourceFiles: FileBase64[] = []; - { - const filename = "./tsconfig.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./package.json"; - const relativePath = "./"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./index.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./asset.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - { - const filename = "./assetTransfer.ts"; - const relativePath = "./src/"; - const filePath = path.join(contractDir, relativePath, filename); - const buffer = await fs.readFile(filePath); - sourceFiles.push({ - body: buffer.toString("base64"), - filepath: relativePath, - filename, - }); - } - - const res = await fabricApiClient.deployContractV1({ - channelId, - ccVersion: "1.0.0", - sourceFiles, - ccName: fabricContractName, - targetOrganizations: [ - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, - ], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: "basic-asset-transfer-2", - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }); - - const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - expect(packageIds).toBeTruthy(); - expect(packageIds).toBeArray(); - - expect(approveForMyOrgList).toBeTruthy(); - expect(approveForMyOrgList).toBeArray(); - - expect(installList).toBeTruthy(); - expect(installList).toBeArray(); - expect(queryInstalledList).toBeTruthy(); - expect(queryInstalledList).toBeArray(); - - expect(commit).toBeTruthy(); - expect(packaging).toBeTruthy(); - expect(queryCommitted).toBeTruthy(); - log.info("Contract deployed"); - - fabricSigningCredential = { - keychainId, - keychainRef: keychainEntryKey, - }; - } - { - besuLedger = new BesuTestLedger(); - await besuLedger.start(); - - rpcApiHttpHostBesu = await besuLedger.getRpcApiHttpHost(); - rpcApiWsHost = await besuLedger.getRpcApiWsHost(); - web3Besu = new Web3(rpcApiHttpHostBesu); - firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); - - testEthAccountBesu = await besuLedger.createEthTestAccount(); - - besuKeyPair = { - privateKey: besuLedger.getGenesisAccountPrivKey(), - }; - - besuContractName = "LockAsset"; - - const keychainEntryValue = besuKeyPair.privateKey; - const keychainEntryKey = uuidv4(); - keychainPluginBesu = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - keychainPluginBesu.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - const pluginRegistry = new PluginRegistry({ - plugins: [keychainPluginBesu], - }); - - const options: IPluginLedgerConnectorBesuOptions = { - instanceId: uuidv4(), - rpcApiHttpHost: rpcApiHttpHostBesu, - rpcApiWsHost, - pluginRegistry, - logLevel, - }; - besuConnector = new PluginLedgerConnectorBesu(options); - pluginRegistry.add(besuConnector); - - await besuConnector.transact({ - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialTypeBesu.PrivateKeyHex, - }, - consistencyStrategy: { - blockConfirmations: 0, - receiptType: ReceiptType.NodeTxPoolAck, - }, - transactionConfig: { - from: firstHighNetWorthAccount, - to: testEthAccountBesu.address, - value: 10e9, - gas: 1000000, - }, - }); - const balance = await web3Besu.eth.getBalance(testEthAccountBesu.address); - expect(balance).toBeTruthy(); - expect(parseInt(balance, 10)).toBeGreaterThan(10e9); - - log.info("Connector initialized"); - - const deployOut = await besuConnector.deployContract({ - keychainId: keychainPluginBesu.getKeychainId(), - contractName: LockAssetContractJson.contractName, - contractAbi: LockAssetContractJson.abi, - constructorArgs: [], - web3SigningCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialTypeBesu.PrivateKeyHex, - }, - bytecode: LockAssetContractJson.bytecode, - gas: 1000000, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.transactionReceipt).toBeTruthy(); - expect(deployOut.transactionReceipt.contractAddress).toBeTruthy(); - log.info("Contract Deployed successfully"); - } - { - ethereumLedger = new GethTestLedger({ - containerImageName, - containerImageVersion, - }); - await ethereumLedger.start(); - - const listenOptions: IListenOptions = { - hostname: "127.0.0.1", - port: 0, - server: ethereumServer, - }; - addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; - ({ address, port } = addressInfo); - apiHost = `http://${address}:${port}`; - - apiConfig = new Configuration({ basePath: apiHost }); - ethereumApiClient = new EthereumApi(apiConfig); - rpcApiHttpHostEthereum = await ethereumLedger.getRpcApiHttpHost(); - web3Eth = new Web3(rpcApiHttpHostEthereum); - testEthAccount = web3Eth.eth.accounts.create(); - - log.info("Create PluginKeychainMemory..."); - const keychainEntryValue = testEthAccount.privateKey; - keychainPluginEthereum = new PluginKeychainMemory({ - instanceId: uuidv4(), - keychainId: uuidv4(), - backend: new Map([[keychainEntryKey, keychainEntryValue]]), - logLevel, - }); - - keychainPluginEthereum.set( - LockAssetContractJson.contractName, - JSON.stringify(LockAssetContractJson), - ); - - log.info("Create PluginLedgerConnectorEthereum..."); - ethereumConnector = new PluginLedgerConnectorEthereum({ - rpcApiHttpHost: rpcApiHttpHostEthereum, - logLevel, - instanceId: uuidv4(), - pluginRegistry: new PluginRegistry({ plugins: [keychainPluginEthereum] }), - }); - - await ethereumConnector.getOrCreateWebServices(); - await ethereumConnector.registerWebServices(expressAppEthereum, wsApi); - - log.info("Deploy Contract..."); - const deployOut = await ethereumApiClient.deployContract({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPluginEthereum.getKeychainId(), - }, - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deployOut).toBeTruthy(); - expect(deployOut.data).toBeTruthy(); - expect(deployOut.data.transactionReceipt).toBeTruthy(); - expect(deployOut.data.transactionReceipt.contractAddress).toBeTruthy(); - log.info("contract deployed successfully"); - - const initTransferValue = web3Eth.utils.toWei("5000", "ether"); - await ethereumApiClient.runTransactionV1({ - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - transactionConfig: { - from: WHALE_ACCOUNT_ADDRESS, - to: testEthAccount.address, - value: initTransferValue, - }, - }); - const balance = await web3Eth.eth.getBalance(testEthAccount.address); - expect(balance).toBeTruthy(); - expect(balance.toString()).toBe(initTransferValue); - } - { - hephaestusOptions = { - instanceId: uuidv4(), - logLevel: logLevel, - besuTxObservable: besuConnector.getTxSubjectObservable(), - ethTxObservable: ethereumConnector.getTxSubjectObservable(), - fabricTxObservable: fabricConnector.getTxSubjectObservable(), - }; - - hephaestus = new CcModelHephaestus(hephaestusOptions); - expect(hephaestus).toBeTruthy(); - log.info("hephaestus plugin initialized successfully"); - } -}); - -test("Monitor Besu, Ethereum and Fabric transactions", async () => { - hephaestus.setCaseId("BESU_ETHEREUM_FABRIC_MONITORING_3_CASES"); - hephaestus.monitorTransactions(); - - const numberOfCases = 3; - const txsPerCase = 9; - let caseNumber = 1; - - while (numberOfCases >= caseNumber) { - hephaestus.setCaseId("BESU_ETHEREUM_FABRIC_" + caseNumber); - { - const { success: createResBesu } = await besuConnector.invokeContract({ - contractName: besuContractName, - keychainId: keychainPluginBesu.getKeychainId(), - invocationType: EthContractInvocationTypeBesu.Send, - methodName: "createAsset", - params: [BESU_ASSET_ID, 10], - signingCredential: { - ethAccount: firstHighNetWorthAccount, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialTypeBesu.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(createResBesu).toBeTruthy(); - - const { success: lockResBesu } = await besuConnector.invokeContract({ - contractName: besuContractName, - keychainId: keychainPluginBesu.getKeychainId(), - invocationType: EthContractInvocationTypeBesu.Send, - methodName: "lockAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: testEthAccountBesu.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialTypeBesu.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(lockResBesu).toBeTruthy(); - - const { success: deleteResBesu } = await besuConnector.invokeContract({ - contractName: besuContractName, - keychainId: keychainPluginBesu.getKeychainId(), - invocationType: EthContractInvocationTypeBesu.Send, - methodName: "deleteAsset", - params: [BESU_ASSET_ID], - signingCredential: { - ethAccount: testEthAccountBesu.address, - secret: besuKeyPair.privateKey, - type: Web3SigningCredentialTypeBesu.PrivateKeyHex, - }, - gas: 1000000, - }); - expect(deleteResBesu).toBeTruthy(); - } - { - const createResEth = await ethereumApiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPluginEthereum.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "createAsset", - params: ["asset1", 5], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(createResEth).toBeTruthy(); - expect(createResEth.data).toBeTruthy(); - - const lockResEth = await ethereumApiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPluginEthereum.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "lockAsset", - params: ["asset1"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(lockResEth).toBeTruthy(); - expect(lockResEth.data).toBeTruthy(); - expect(lockResEth.status).toBe(200); - - const deleteResEth = await ethereumApiClient.invokeContractV1({ - contract: { - contractName: LockAssetContractJson.contractName, - keychainId: keychainPluginEthereum.getKeychainId(), - }, - invocationType: EthContractInvocationType.Send, - methodName: "deleteAsset", - params: ["asset1", "owner1"], - web3SigningCredential: { - ethAccount: WHALE_ACCOUNT_ADDRESS, - secret: "", - type: Web3SigningCredentialType.GethKeychainPassword, - }, - }); - expect(deleteResEth).toBeTruthy(); - expect(deleteResEth.data).toBeTruthy(); - expect(deleteResEth.status).toBe(200); - } - { - const createResFabric = await fabricApiClient.runTransactionV1({ - contractName: fabricContractName, - channelName, - params: [FABRIC_ASSET_ID, "10", "owner1"], - methodName: "CreateAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - expect(createResFabric).toBeTruthy(); - - const transferResFabric = await fabricApiClient.runTransactionV1({ - contractName: fabricContractName, - channelName, - params: [FABRIC_ASSET_ID, "owner2"], - methodName: "TransferAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - expect(transferResFabric).toBeTruthy(); - - const deleteResFabric = await fabricApiClient.runTransactionV1({ - contractName: fabricContractName, - channelName, - params: [FABRIC_ASSET_ID], - methodName: "DeleteAsset", - invocationType: FabricContractInvocationType.Send, - signingCredential: fabricSigningCredential, - }); - expect(deleteResFabric).toBeTruthy(); - } - - caseNumber++; - } - - const totalTxs = txsPerCase * numberOfCases; - expect(hephaestus.numberUnprocessedReceipts).toEqual(totalTxs); - expect(hephaestus.numberEventsLog).toEqual(0); - - await hephaestus.txReceiptToCrossChainEventLogEntry(); - - expect(hephaestus.numberUnprocessedReceipts).toEqual(0); - expect(hephaestus.numberEventsLog).toEqual(totalTxs); - - await hephaestus.persistCrossChainLogCsv( - "example-dummy-besu-ethereum-fabric-events", - ); - await hephaestus.persistCrossChainLogJson( - "example-dummy-besu-ethereum-fabric-events", - ); -}); - -afterAll(async () => { - await fabricLedger.stop(); - await fabricLedger.destroy(); - await Servers.shutdown(fabricServer); - - await besuLedger.stop(); - await besuLedger.destroy(); - - await ethereumConnector.shutdown(); - await ethereumLedger.stop(); - await ethereumLedger.destroy(); - await Servers.shutdown(ethereumServer); - - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - log.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/yarn.lock b/yarn.lock index 01158e4230..85fdab5278 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6725,9 +6725,9 @@ __metadata: linkType: hard "@cspell/dict-software-terms@npm:^3.4.9": - version: 3.4.10 - resolution: "@cspell/dict-software-terms@npm:3.4.10" - checksum: 10/f5bdee39e463d279e4f907cc7771342ab97f330d088b07acb2fc53747e98a2403dd249bdd5303a23fe61cd54029099a0ae83c63fdd3c8085a6f0b131ad001012 + version: 3.4.9 + resolution: "@cspell/dict-software-terms@npm:3.4.9" + checksum: 10/2fc21d7fefbd0269b760d2f634b22d6e54bd71dd3c03d96b59931fd1ef0c7380b6596e578621f907823eb8423bbdd297f56d8eaa150f2bbb23ed0559656c7523 languageName: node linkType: hard @@ -13927,8 +13927,8 @@ __metadata: linkType: hard "@npmcli/arborist@npm:^7.5.3": - version: 7.5.4 - resolution: "@npmcli/arborist@npm:7.5.4" + version: 7.5.3 + resolution: "@npmcli/arborist@npm:7.5.3" dependencies: "@isaacs/string-locale-compare": "npm:^1.1.0" "@npmcli/fs": "npm:^3.1.1" @@ -13967,7 +13967,7 @@ __metadata: walk-up-path: "npm:^3.0.1" bin: arborist: bin/index.js - checksum: 10/b77170754f419171e5ca2abfb679a9c811443e2b67036916a62eda81fd069f12c98186941cd73a0d36c2ec76cda638b43ceeb4c5fae39de1bb9df825432f3ef7 + checksum: 10/e149df712a2396f59e348ff32d763f62bbdf576f3976110f47b10cd912a91cce76c83f859bb0f97f4ca5273f15a270df54a702190753772f3539a3f10307b6ed languageName: node linkType: hard @@ -14331,12 +14331,12 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-request-log@npm:^5.3.1": - version: 5.3.1 - resolution: "@octokit/plugin-request-log@npm:5.3.1" +"@octokit/plugin-request-log@npm:^5.1.0": + version: 5.3.0 + resolution: "@octokit/plugin-request-log@npm:5.3.0" peerDependencies: "@octokit/core": ">=6" - checksum: 10/a27e163282c8d0ba8feee4d3cbbd1b62e1aa89a892877f7a9876fc17ddde3e1e1af922e6664221a0cabae99b8a7a2a5215b9ec2ee5222edb50e06298e99022b0 + checksum: 10/8c918b14f0687e8a3d9c7c81ef1092a49de07681940cc1aee0aeb7e3dd8ac64f69af5d65932eec32f6db4af3dca80541ad3bb13ac0fa44af3e2340ed91909272 languageName: node linkType: hard @@ -14361,14 +14361,14 @@ __metadata: linkType: hard "@octokit/request@npm:^9.0.0": - version: 9.1.3 - resolution: "@octokit/request@npm:9.1.3" + version: 9.1.1 + resolution: "@octokit/request@npm:9.1.1" dependencies: "@octokit/endpoint": "npm:^10.0.0" "@octokit/request-error": "npm:^6.0.1" "@octokit/types": "npm:^13.1.0" universal-user-agent: "npm:^7.0.2" - checksum: 10/b445f263157a2c608d8cfa89162be5f5d39551607d0ec973c3fdf9d3fd3753e33861c4e34942f5dbf47576ac91a99238ed482f2d6c6af3f9070e0b190b3f07a2 + checksum: 10/aef47d85751c387c6ef29e70b3b86c9033fc7940361092c80728f7e99cc0ba54ddd00bbecb4422e50df78744600cfb8a1a2bc6916c5b6440677aa8ebd6b9b291 languageName: node linkType: hard @@ -14378,7 +14378,7 @@ __metadata: dependencies: "@octokit/core": "npm:^6.1.2" "@octokit/plugin-paginate-rest": "npm:^11.0.0" - "@octokit/plugin-request-log": "npm:^5.3.1" + "@octokit/plugin-request-log": "npm:^5.1.0" "@octokit/plugin-rest-endpoint-methods": "npm:^13.0.0" checksum: 10/f67fbb1b3e9568f352933c55703cd33354183e48710a146f6a1c5930419006d2d97c08f5b0a29a56fffc9e53f01b34bae2681a577f604172f4331644b85a9779 languageName: node @@ -21723,24 +21723,6 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.19.0": - version: 1.19.0 - resolution: "body-parser@npm:1.19.0" - dependencies: - bytes: "npm:3.1.0" - content-type: "npm:~1.0.4" - debug: "npm:2.6.9" - depd: "npm:~1.1.2" - http-errors: "npm:1.7.2" - iconv-lite: "npm:0.4.24" - on-finished: "npm:~2.3.0" - qs: "npm:6.7.0" - raw-body: "npm:2.4.0" - type-is: "npm:~1.6.17" - checksum: 10/6ed5f3f42f3038301673d90ea1616f7670e78795018904cf581d361523bfa24a7b6d998015d9cdd02668cd70e85d8b3b4b40023e4128e8aec1ddaf6ed1693dc1 - languageName: node - linkType: hard - "body-parser@npm:1.20.1": version: 1.20.1 resolution: "body-parser@npm:1.20.1" @@ -21761,9 +21743,9 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" +"body-parser@npm:1.20.2, body-parser@npm:^1.10.0": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21773,17 +21755,17 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.13.0" + qs: "npm:6.11.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca + checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a languageName: node linkType: hard -"body-parser@npm:^1.10.0": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21793,11 +21775,11 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.11.0" + qs: "npm:6.13.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a + checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca languageName: node linkType: hard @@ -22364,13 +22346,6 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.1.0": - version: 3.1.0 - resolution: "bytes@npm:3.1.0" - checksum: 10/7c3b21c5d9d44ed455460d5d36a31abc6fa2ce3807964ba60a4b03fd44454c8cf07bb0585af83bfde1c5cc2ea4bbe5897bc3d18cd15e0acf25a3615a35aba2df - languageName: node - linkType: hard - "bytes@npm:3.1.2": version: 3.1.2 resolution: "bytes@npm:3.1.2" @@ -32436,19 +32411,6 @@ __metadata: languageName: node linkType: hard -"http-errors@npm:1.7.2": - version: 1.7.2 - resolution: "http-errors@npm:1.7.2" - dependencies: - depd: "npm:~1.1.2" - inherits: "npm:2.0.3" - setprototypeof: "npm:1.1.1" - statuses: "npm:>= 1.5.0 < 2" - toidentifier: "npm:1.0.0" - checksum: 10/cf8da344b181599d19a2bfedcbe7c946945a907f2825a0c89e119ce9f9c9a421a49898afe3291485b40ffbbd587b62326f9becc7aa053036eff2559d9436defb - languageName: node - linkType: hard - "http-errors@npm:2.0.0": version: 2.0.0 resolution: "http-errors@npm:2.0.0" @@ -37954,14 +37916,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a - languageName: node - linkType: hard - -"lru-cache@npm:^10.2.2": +"lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": version: 10.3.0 resolution: "lru-cache@npm:10.3.0" checksum: 10/37e921aedbd1f4062475d9fa6760391fa7adfaaee3a5a6cbedd1d6d0b46705c14012312c1edb2b13f119eae6584a48f73c158d118828d42475b44a7abf7d05ab @@ -44600,13 +44555,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.7.0": - version: 6.7.0 - resolution: "qs@npm:6.7.0" - checksum: 10/d8f4b216c6777853c17586dc17fa685fb4e14269dbf6e860add6c0c61fd12137dc7aa4bf5066a794ba9a8dbb9c11e9ef20b72db763228701be95546ea807213a - languageName: node - linkType: hard - "qs@npm:^6.11.0, qs@npm:^6.9.4": version: 6.11.2 resolution: "qs@npm:6.11.2" @@ -44756,18 +44704,6 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.4.0": - version: 2.4.0 - resolution: "raw-body@npm:2.4.0" - dependencies: - bytes: "npm:3.1.0" - http-errors: "npm:1.7.2" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10/aa2c506055f32448211a4933c728b6a3d715101975328071ad4aad210a19e5cadd7666d1acc139ed59c7519e5a044a1a19285d4b4bb542d93de6187acf4a5ebf - languageName: node - linkType: hard - "raw-body@npm:2.5.1": version: 2.5.1 resolution: "raw-body@npm:2.5.1" @@ -47390,13 +47326,6 @@ __metadata: languageName: node linkType: hard -"setprototypeof@npm:1.1.1": - version: 1.1.1 - resolution: "setprototypeof@npm:1.1.1" - checksum: 10/b8fcf5b4b8325ea638712ed6e62f8e0ffac69eef1390305a5331046992424e484d4d6603a18d84d4c08c3def50b9195d9e707b747aed5eec15ee66a2a6508318 - languageName: node - linkType: hard - "setprototypeof@npm:1.2.0": version: 1.2.0 resolution: "setprototypeof@npm:1.2.0" @@ -47789,13 +47718,6 @@ __metadata: languageName: node linkType: hard -"socket.io-adapter@npm:~2.4.0": - version: 2.4.0 - resolution: "socket.io-adapter@npm:2.4.0" - checksum: 10/e10c8c36a1b0744432d9fb7266c69268fb11cacb548e95f5feb7708c1438c4c1e034abf3eee56dc3fd4d5524aba4e5a306a402f0c15efb1334be364a05bfad04 - languageName: node - linkType: hard - "socket.io-adapter@npm:~2.5.2": version: 2.5.5 resolution: "socket.io-adapter@npm:2.5.5" @@ -47828,20 +47750,6 @@ __metadata: languageName: node linkType: hard -"socket.io@npm:4.5.4": - version: 4.5.4 - resolution: "socket.io@npm:4.5.4" - dependencies: - accepts: "npm:~1.3.4" - base64id: "npm:~2.0.0" - debug: "npm:~4.3.2" - engine.io: "npm:~6.2.1" - socket.io-adapter: "npm:~2.4.0" - socket.io-parser: "npm:~4.2.1" - checksum: 10/5e599eb7cab24124ad7ef7718ef09e16f2587a0891588cc11b77d3ff7572de82d9d07bf7feb870c38f36c8a1a90b8ff4b8d5ce224a3390d45b085e400e92b9cf - languageName: node - linkType: hard - "socket.io@npm:4.6.2": version: 4.6.2 resolution: "socket.io@npm:4.6.2" @@ -48524,7 +48432,7 @@ __metadata: languageName: node linkType: hard -"statuses@npm:>= 1.4.0 < 2, statuses@npm:>= 1.5.0 < 2": +"statuses@npm:>= 1.4.0 < 2": version: 1.5.0 resolution: "statuses@npm:1.5.0" checksum: 10/c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c @@ -50271,13 +50179,6 @@ __metadata: languageName: node linkType: hard -"toidentifier@npm:1.0.0": - version: 1.0.0 - resolution: "toidentifier@npm:1.0.0" - checksum: 10/199e6bfca1531d49b3506cff02353d53ec987c9ee10ee272ca6484ed97f1fc10fb77c6c009079ca16d5c5be4a10378178c3cacdb41ce9ec954c3297c74c6053e - languageName: node - linkType: hard - "toidentifier@npm:1.0.1": version: 1.0.1 resolution: "toidentifier@npm:1.0.1" @@ -51007,7 +50908,7 @@ __metadata: languageName: node linkType: hard -"type-is@npm:^1.6.18, type-is@npm:^1.6.4, type-is@npm:~1.6.17, type-is@npm:~1.6.18": +"type-is@npm:^1.6.18, type-is@npm:^1.6.4, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" dependencies: From bcc982d0e6b913c14c8f9873702ca6c8cc099fec Mon Sep 17 00:00:00 2001 From: eduv09 Date: Thu, 6 Jun 2024 08:21:36 +0000 Subject: [PATCH 26/49] feat(satp-hermes): add skeleton for stage0 Signed-off-by: eduv09 --- packages/cactus-plugin-satp-hermes/.gitignore | 6 - .../proto/cacti/satp/v02/common/message.proto | 29 +- .../main/proto/cacti/satp/v02/stage_0.proto | 27 +- .../src/main/typescript/blo/dispatcher.ts | 2 +- .../core/stage-handlers/stage0-handler.ts | 91 + .../typescript/core/stage-handlers/stage0.ts | 3 - .../client/stage0-client-service.ts | 407 +++ .../server/stage0-server-service.ts | 432 +++ .../src/main/typescript/core/types.ts | 4 + .../typescript-axios/.gitignore | 4 + .../typescript-axios/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../typescript-axios/.openapi-generator/FILES | 9 + .../gateway-client/typescript-axios/api.ts | 2678 +++++++++++++++++ .../typescript-axios/git_push.sh | 57 + .../proto/cacti/satp/v02/common/message_pb.ts | 102 +- .../proto/cacti/satp/v02/stage_0_connect.ts | 17 +- .../proto/cacti/satp/v02/stage_0_pb.ts | 177 +- .../src/main/typescript/gol/satp-manager.ts | 6 + .../web-services/status-endpoint.ts | 2 +- 20 files changed, 4006 insertions(+), 71 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.gitignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.npmignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator-ignore create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index 2d414222df..0dd84e46a9 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -1,7 +1 @@ -src/main/typescript/generated/gateway-client/typescript-axios/.gitignore -src/main/typescript/generated/gateway-client/typescript-axios/.npmignore -src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator-ignore -src/main/typescript/generated/gateway-client/typescript-axios/api.ts -src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh -src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES src/main/typescript/fabric-contracts/satp/chaincode-typescript/.yarn/ diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto index b73dcc0c77..2d20e6b9d0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -92,18 +92,23 @@ message NetworkCapabilities { enum MessageType { MESSAGE_TYPE_UNSPECIFIED = 0; - MESSAGE_TYPE_INIT_PROPOSAL = 1; - MESSAGE_TYPE_INIT_RECEIPT = 2; - MESSAGE_TYPE_INIT_REJECT = 3; - MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 4; - MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 5; - MESSAGE_TYPE_LOCK_ASSERT = 6; - MESSAGE_TYPE_ASSERTION_RECEIPT = 7; - MESSAGE_TYPE_COMMIT_PREPARE = 8; - MESSAGE_TYPE_COMMIT_READY = 9; - MESSAGE_TYPE_COMMIT_FINAL = 10; - MESSAGE_TYPE_ACK_COMMIT_FINAL = 11; - MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 12; + MESSAGE_TYPE_PRE_INIT_PROPOSAL = 1; + MESSAGE_TYPE_PRE_INIT_RECEIPT = 2; + MESSAGE_TYPE_PRE_INIT_REJECT = 3; + MESSAGE_TYPE_PRE_TRANSFER_COMMENCE_REQUEST = 4; + MESSAGE_TYPE_PRE_TRANSFER_COMMENCE_RESPONSE = 5; + MESSAGE_TYPE_INIT_PROPOSAL = 6; + MESSAGE_TYPE_INIT_RECEIPT = 7; + MESSAGE_TYPE_INIT_REJECT = 8; + MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 9; + MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 10; + MESSAGE_TYPE_LOCK_ASSERT = 11; + MESSAGE_TYPE_ASSERTION_RECEIPT = 12; + MESSAGE_TYPE_COMMIT_PREPARE = 13; + MESSAGE_TYPE_COMMIT_READY = 14; + MESSAGE_TYPE_COMMIT_FINAL = 15; + MESSAGE_TYPE_ACK_COMMIT_FINAL = 16; + MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 17; } message CommonSatp { diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto index 2b7e609776..242ef80582 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto @@ -4,21 +4,38 @@ package cacti.satp.v02; import "cacti/satp/v02/common/message.proto"; +message PrivacyPolicy { + string name = 1; + repeated string arguments = 2; +} message PreTransferVerificationAndContextEstablishmentRequest { cacti.satp.v02.common.CommonSatp context = 1; - cacti.satp.v02.common.TransferClaims transferClaims = 2; - // todo other fields + cacti.satp.v02.common.TransferClaims transfer_claims = 2; // needed ? + repeated PrivacyPolicy processPolicies = 3; + repeated PrivacyPolicy mergePolicies = 4; } // TODO message PreTransferVerificationAndContextEstablishmentResponse { - + cacti.satp.v02.common.CommonSatp context = 1; + repeated PrivacyPolicy processPolicies_counter_proposal = 2; + repeated PrivacyPolicy mergePolicies_counter_proposal = 3; + string hash_pre_transfer_verification_and_context = 4; + string timestamp = 5; +} +message PreTransferCommenceRequestMessage { + cacti.satp.v02.common.CommonSatp common = 1; + string hash_pre_transfer_verification_and_context = 2; + string client_transfer_number = 3; +} +message PreTransferCommenceResponseMessage { + cacti.satp.v02.common.CommonSatp common = 1; } - service SatpStage0Service { // util RPCs // step RPCs - rpc TransferProposalClaims(PreTransferVerificationAndContextEstablishmentRequest) returns (PreTransferVerificationAndContextEstablishmentResponse) {}; + rpc PreTransferProposalClaims(PreTransferVerificationAndContextEstablishmentRequest) returns (PreTransferVerificationAndContextEstablishmentResponse) {}; + rpc PreTransferCommence(PreTransferCommenceRequestMessage) returns (PreTransferCommenceResponseMessage) {} // todo other rpcs } \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 5299cb2b9d..bcaf97b4a0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -16,7 +16,7 @@ import { GetStatusEndpointV1 } from "../web-services/status-endpoint"; import { StatusRequest, StatusResponse, -} from "../generated/gateway-client/typescript-axios"; +} from "../generated/gateway-client/typescript-axios/api"; import { ExecuteGetStatus } from "./admin/get-status-handler-service"; import { ISATPManagerOptions, SATPManager } from "../gol/satp-manager"; import { GatewayOrchestrator } from "../gol/gateway-orchestrator"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts new file mode 100644 index 0000000000..6d6c58e1c7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -0,0 +1,91 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPSession } from "../satp-session"; +import { Stage0ServerService } from "../stage-services/server/stage0-server-service"; +import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { ConnectRouter } from "@connectrpc/connect"; +import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; +import { + PreTransferCommenceRequestMessage, + PreTransferCommenceResponseMessage, + PreTransferVerificationAndContextEstablishmentRequest, + PreTransferVerificationAndContextEstablishmentResponse, +} from "../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { Stage0ClientService } from "../stage-services/client/stage0-client-service"; + +export class Stage0SATPHandler implements SATPHandler { + public static readonly CLASS_NAME = "Stage0SATPHandler"; + private session: SATPSession; + private serverService: Stage0ServerService; + private clientService: Stage0ClientService; + private logger: Logger; + constructor(ops: SATPHandlerOptions) { + this.session = ops.session; + this.serverService = ops.serverService as Stage0ServerService; + this.clientService = ops.clientService as Stage0ClientService; + this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); + this.logger.trace(`Initialized ${Stage0SATPHandler.CLASS_NAME}`); + } + + getHandlerIdentifier(): string { + return Stage0SATPHandler.CLASS_NAME; + } + + getSessionId(): string { + return this.session.getSessionData().id; + } + + async PreTransferProposalImplementation( + req: PreTransferVerificationAndContextEstablishmentRequest, + ): Promise { + try { + console.log("Received TransferProposalRequest", req); + const sessionData = + await this.serverService.checkPreTransferProposalRequestMessage( + req, + this.session, + ); + const message = await this.serverService.preTransferProposalResponse( + req, + this.session, + ); + console.log("message", message); + console.log("Returning response", sessionData); + const response = + new PreTransferVerificationAndContextEstablishmentResponse(); + return response; + } catch (error) { + console.error("Error handling TransferProposalRequest:", error); + throw new Error("Failed to process TransferProposalRequest"); + } + } + + async PreTransferCommenceImplementation( + req: PreTransferCommenceRequestMessage, + ): Promise { + try { + console.log("Received TransferCommenceRequest", req); + const sessionData = + await this.serverService.checkTransferCommenceRequestMessage( + req, + this.session, + ); + const message = await this.serverService.transferCommenceResponse( + req, + this.session, + ); + console.log("Returning response", message); + console.log("Returning response", sessionData); + const response = new PreTransferCommenceResponseMessage(); + return response; + } catch (error) { + console.error("Error handling TransferCommenceRequest:", error); + throw new Error("Failed to process TransferCommenceRequest"); + } + } + setupRouter(router: ConnectRouter): void { + router.service(SatpStage0Service, { + preTransferProposalClaims: this.PreTransferProposalImplementation, + preTransferCommence: this.PreTransferCommenceImplementation, + }); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0.ts deleted file mode 100644 index 69c7d8b514..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class SatpStage0 { - public static readonly CLASS_NAME = "SatpStage0"; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts new file mode 100644 index 0000000000..9097fef01e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -0,0 +1,407 @@ +import { + TransferCommenceRequestMessage, + TransferProposalRequestMessage, + TransferProposalReceiptMessage, +} from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { + MessageType, + CommonSatp, + TransferClaims, + NetworkCapabilities, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SATP_VERSION } from "../../constants"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { + getMessageHash, + saveHash, + saveSignature, + checkSessionData, +} from "../../session-utils"; +import { SupportedChain } from "../../types"; +import { SATPSession } from "../../../core/satp-session"; +import { + SATPService, + SATPServiceType, + ISATPClientServiceOptions, + ISATPServiceOptions, +} from "../satp-service"; + +export class Stage0ClientService extends SATPService { + public static readonly SATP_STAGE = "0"; + public static readonly SERVICE_TYPE = SATPServiceType.Client; + + constructor(ops: ISATPClientServiceOptions) { + // for now stage1serverservice does not have any different options than the SATPService class + + const commonOptions: ISATPServiceOptions = { + stage: Stage0ClientService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage0ClientService.SERVICE_TYPE, + }; + super(commonOptions); + } + + async transferProposalRequest( + sessionID: string, + session: SATPSession, + supportedDLTs: SupportedChain[], + ): Promise { + const stepTag = `transferProposalRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + const sessionData = session.getSessionData(); + + if (sessionData == undefined || !checkSessionData(sessionData)) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + + if ( + !supportedDLTs.includes( + sessionData.senderGatewayNetworkId as SupportedChain, + ) + ) { + throw new Error( //todo change this to the transferClaims check + `${fnTag}, recipient gateway dlt system is not supported by this gateway`, + ); + } + + if (sessionData.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.PRE_INIT_PROPOSAL; + commonBody.sessionId = sessionData.id; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.resourceUrl = ""; + + if (sessionData.transferContextId != undefined) { + commonBody.transferContextId = sessionData.transferContextId; + } + + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.hashPreviousMessage = ""; + + const transferInitClaims = new TransferClaims(); + transferInitClaims.digitalAssetId = sessionData.digitalAssetId; + transferInitClaims.assetProfileId = sessionData.assetProfileId; + transferInitClaims.verifiedOriginatorEntityId = + sessionData.verifiedOriginatorEntityId; + transferInitClaims.verifiedBeneficiaryEntityId = + sessionData.verifiedBeneficiaryEntityId; + transferInitClaims.originatorPubkey = sessionData.originatorPubkey; + transferInitClaims.beneficiaryPubkey = sessionData.beneficiaryPubkey; + transferInitClaims.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + transferInitClaims.recipientGatewayNetworkId = + sessionData.recipientGatewayNetworkId; + transferInitClaims.clientGatewayPubkey = sessionData.clientGatewayPubkey; + transferInitClaims.serverGatewayPubkey = sessionData.serverGatewayPubkey; + transferInitClaims.senderGatewayOwnerId = sessionData.senderGatewayOwnerId; + transferInitClaims.receiverGatewayOwnerId = + sessionData.receiverGatewayOwnerId; + + sessionData.hashTransferInitClaims = getHash(transferInitClaims); + + const networkCapabilities = new NetworkCapabilities(); + networkCapabilities.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + networkCapabilities.signatureAlgorithm = sessionData.signatureAlgorithm; + networkCapabilities.lockType = sessionData.lockType; + networkCapabilities.lockExpirationTime = sessionData.lockExpirationTime; + networkCapabilities.credentialProfile = sessionData.credentialProfile; + networkCapabilities.loggingProfile = sessionData.loggingProfile; + networkCapabilities.accessControlProfile = sessionData.accessControlProfile; + + if (sessionData.permissions != undefined) { + this.Log.info(`${fnTag}, Optional variable loaded: permissions...`); + networkCapabilities.permissions = sessionData.permissions; + } + + if (sessionData.developerUrn != undefined) { + this.Log.info(`${fnTag}, Optional variable loaded: developerUrn...`); + networkCapabilities.developerUrn = sessionData.developerUrn; + } + + if (sessionData.applicationProfile != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: applicationProfile...`, + ); + networkCapabilities.applicationProfile = sessionData.applicationProfile; + } + + if (sessionData.subsequentCalls != undefined) { + this.Log.info(`${fnTag}, Optional variable loaded: subsequentCalls...`); + networkCapabilities.subsequentCalls = sessionData.subsequentCalls; + } + + if (sessionData.history != undefined) { + this.Log.info(`${fnTag}, Optional variable loaded: history...`); + networkCapabilities.history = sessionData.history; + } + + const transferProposalRequestMessage = new TransferProposalRequestMessage(); + transferProposalRequestMessage.common = commonBody; + transferProposalRequestMessage.transferInitClaims = transferInitClaims; + transferProposalRequestMessage.networkCapabilities = networkCapabilities; + + if (sessionData.transferClaimsFormat != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: transferInitClaimsFormat...`, + ); + transferProposalRequestMessage.transferInitClaimsFormat = + sessionData.transferClaimsFormat; + } + if (sessionData.multipleCancelsAllowed != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: multipleCancelsAllowed...`, + ); + transferProposalRequestMessage.multipleCancelsAllowed = + sessionData.multipleCancelsAllowed; + } + if (sessionData.multipleClaimsAllowed != undefined) { + this.Log.info( + `${fnTag}, Optional variable loaded: multipleClaimsAllowed...`, + ); + transferProposalRequestMessage.multipleClaimsAllowed = + sessionData.multipleClaimsAllowed; + } + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(transferProposalRequestMessage)), + ); + + transferProposalRequestMessage.common.signature = messageSignature; + + saveSignature(sessionData, MessageType.INIT_PROPOSAL, messageSignature); + + saveHash( + sessionData, + MessageType.INIT_PROPOSAL, + getHash(transferProposalRequestMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionID, + type: "transferProposalRequest", + operation: "validate", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info(`${fnTag}, sending TransferProposalRequest...`); + + return transferProposalRequestMessage; + } + + async transferCommenceRequest( + response: TransferProposalReceiptMessage, + session: SATPSession, + ): Promise { + const stepTag = `transferCommenceRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (!response || !response.common) { + throw new Error("Response or response.common is undefined"); + } + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error("Session data not loaded successfully"); + } + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; + commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); + + //todo check when reject + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_RECEIPT, + ); + + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.sessionId = sessionData.id; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const transferCommenceRequestMessage = new TransferCommenceRequestMessage(); + transferCommenceRequestMessage.common = commonBody; + transferCommenceRequestMessage.hashTransferInitClaims = + sessionData.hashTransferInitClaims; + + // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), + ); + + transferCommenceRequestMessage.common.signature = messageSignature; + + saveSignature( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + getHash(transferCommenceRequestMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferCommenceRequest", + operation: "validate", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info(`${fnTag}, sending TransferCommenceRequest...`); + + return transferCommenceRequestMessage; + } + + async checkTransferProposalReceiptMessage( + response: TransferProposalReceiptMessage, + session: SATPSession, + ): Promise { + const stepTag = `checkTransferProposalReceiptMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + if (response.common == undefined) { + throw new Error(`${fnTag}, message has no satp common body`); + } + + if ( + response.common.version == undefined || + response.common.sequenceNumber == undefined || + response.common.hashPreviousMessage == undefined || + response.timestamp == undefined + ) { + throw new Error(`${fnTag}, satp common body is missing required fields`); + } + + // const sessionId = response.common.sessionId; + + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${response.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not loaded correctly`); + } + + if (response.common.version != sessionData.version) { + throw new Error(`${fnTag}, TransferCommenceRequest version mismatch`); + } + + if ( + response.common.messageType != MessageType.INIT_RECEIPT && + response.common.messageType != MessageType.INIT_REJECT + ) { + throw new Error( + `${fnTag}, wrong message type for TransferCommenceRequest()`, + ); + } + + if ( + response.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt Message sequence number is wrong`, + ); + } + + if ( + response.common.hashPreviousMessage == undefined || + response.common.hashPreviousMessage != + getMessageHash(sessionData, MessageType.INIT_PROPOSAL) + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt previous message hash does not match the one that was sent`, + ); + } + + if ( + response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt serverIdentity public key does not match the one that was sent`, + ); + } + + if ( + response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature(this.Signer, response, sessionData.serverGatewayPubkey) + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt message signature verification failed`, + ); + } + + if ( + response.common.messageType == MessageType.INIT_REJECT && + response.transferCounterClaims == undefined + ) { + sessionData.completed = true; + return false; + } else if ( + response.common.messageType == MessageType.INIT_REJECT && + response.transferCounterClaims != undefined + ) { + if ( + await this.checkProposedTransferClaims(response.transferCounterClaims) + ) { + sessionData.proposedTransferInitClaims = getHash( + response.transferCounterClaims, + ); + return true; + } else { + this.Log.info( + `TransferProposalReceipt proposedTransferClaims were rejected`, + ); + sessionData.completed = true; + return false; + } + } + this.Log.info(`TransferProposalReceipt passed all checks.`); + return true; + } + + async checkProposedTransferClaims( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + counterTransfer: TransferClaims, + ): Promise { + //const fnTag = `${this.className}#checkCounterTransferClaims()`; + //todo + return true; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts new file mode 100644 index 0000000000..0b659ab4ee --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -0,0 +1,432 @@ +import { + PreTransferCommenceRequestMessage, + PreTransferCommenceResponseMessage, + PreTransferVerificationAndContextEstablishmentRequest, + PreTransferVerificationAndContextEstablishmentResponse, +} from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { + MessageType, + CommonSatp, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SATP_VERSION } from "../../constants"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { + TimestampType, + getMessageHash, + getMessageTimestamp, + saveHash, + saveSignature, +} from "../../session-utils"; +import { SupportedChain } from "../../types"; +import { SATPSession } from "../../../core/satp-session"; +import { + SATPService, + SATPServiceType, + ISATPServerServiceOptions, + ISATPServiceOptions, +} from "../satp-service"; + +export class Stage0ServerService extends SATPService { + public static readonly SATP_STAGE = "0"; + public static readonly SERVICE_TYPE = SATPServiceType.Server; + + constructor(ops: ISATPServerServiceOptions) { + // for now stage0serverservice does not have any different options than the SATPService class + + const commonOptions: ISATPServiceOptions = { + stage: Stage0ServerService.SATP_STAGE, + loggerOptions: ops.loggerOptions, + serviceName: ops.serviceName, + signer: ops.signer, + serviceType: Stage0ServerService.SERVICE_TYPE, + }; + super(commonOptions); + } + + async preTransferProposalResponse( + request: PreTransferVerificationAndContextEstablishmentRequest, + session: SATPSession | undefined, + ): Promise { + const stepTag = `transferProposalResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (request.context == undefined || request.transferClaims == undefined) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (session == undefined) { + throw new Error(`${fnTag}, session is undefined`); + } + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.context.sessionId}`, + ); + } + + saveSignature( + sessionData, + MessageType.PRE_INIT_PROPOSAL, + request.context.signature, + ); + + sessionData.sourceLedgerAssetId = + request.transferClaims.verifiedOriginatorEntityId; + sessionData.recipientLedgerAssetId = + request.transferClaims.verifiedBeneficiaryEntityId; // todo shouldn't be the server to create this id? + + sessionData.hashTransferInitClaims = getHash(request.transferClaims); + + saveHash(sessionData, MessageType.PRE_INIT_PROPOSAL, getHash(request)); + + sessionData.lastSequenceNumber = request.context.sequenceNumber + BigInt(1); + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + + commonBody.sessionId = sessionData.id; + commonBody.sequenceNumber = request.context.sequenceNumber + BigInt(1); + commonBody.resourceUrl = request.context.resourceUrl; + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.PRE_INIT_PROPOSAL, + ); + + const preTransferProposalReceiptMessage = + new PreTransferVerificationAndContextEstablishmentResponse(); + preTransferProposalReceiptMessage.context = commonBody; + preTransferProposalReceiptMessage.hashPreTransferVerificationAndContext = + sessionData.hashTransferInitClaims; + preTransferProposalReceiptMessage.timestamp = getMessageTimestamp( + sessionData, + MessageType.PRE_INIT_PROPOSAL, + TimestampType.RECEIVED, + ); + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(preTransferProposalReceiptMessage)), + ); + + preTransferProposalReceiptMessage.context.signature = messageSignature; + + saveSignature(sessionData, commonBody.messageType, messageSignature); + + saveHash( + sessionData, + commonBody.messageType, + getHash(preTransferProposalReceiptMessage), + ); + + // TODO: store logs in the database using session ID; refactor storelog not to need gateway as input + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferProposalResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + this.Log.info( + `${fnTag}, sending PreTransferVerificationAndContextEstablishmentResponse...`, + ); + + return preTransferProposalReceiptMessage; + } + + async transferCommenceResponse( + request: PreTransferCommenceRequestMessage, + session: SATPSession | undefined, + ): Promise { + const stepTag = `transferCommenceResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (request.common == undefined) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (session == undefined) { + throw new Error(`${fnTag}, session is undefined`); + } + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + ); + } + + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + getHash(request), + ); + + const commonBody = new CommonSatp(); + commonBody.version = sessionData.version; + commonBody.messageType = MessageType.PRE_TRANSFER_COMMENCE_RESPONSE; + commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + ); + + commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; + commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.sessionId = sessionData.id; + + const preTransferCommenceResponseMessage = + new PreTransferCommenceResponseMessage(); + preTransferCommenceResponseMessage.common = commonBody; + + sessionData.lastSequenceNumber = commonBody.sequenceNumber; + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(preTransferCommenceResponseMessage)), + ); + + preTransferCommenceResponseMessage.common.signature = messageSignature; + + saveSignature( + sessionData, + MessageType.PRE_TRANSFER_COMMENCE_RESPONSE, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.PRE_TRANSFER_COMMENCE_RESPONSE, + getHash(preTransferCommenceResponseMessage), + ); + + /* + await storeLog(gateway, { + sessionID: sessionData.id, + type: "transferCommenceResponse", + operation: "lock", + data: JSON.stringify(sessionData), + }); + */ + + this.Log.info(`${fnTag}, sending PreTransferCommenceResponseMessage...`); + + return preTransferCommenceResponseMessage; + } + + async checkPreTransferProposalRequestMessage( + request: PreTransferVerificationAndContextEstablishmentRequest, + session: SATPSession | undefined, + //supportedDLTs: SupportedChain[], + ): Promise { + const stepTag = `checkTransferProposalRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if ( + request.context == undefined || + request.context.version == undefined || + request.context.messageType == undefined || + request.context.sessionId == undefined || + // request.context.transferContextId == undefined || + request.context.sequenceNumber == undefined || + request.context.resourceUrl == undefined || + // request.context.actionResponse == undefined || + // request.context.payloadProfile == undefined || + // request.context.applicationProfile == undefined || + request.context.signature == undefined || + request.context.clientGatewayPubkey == undefined || + request.context.serverGatewayPubkey == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (request.context.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + if ( + !verifySignature( + this.Signer, + request.context, + request.context.clientGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferProposalRequest message signature verification failed`, + ); + } + + if (request.context.messageType != MessageType.INIT_PROPOSAL) { + throw new Error( + `${fnTag}, wrong message type for TransferProposalRequest`, + ); + } + + if (request.transferClaims == undefined) { + throw new Error( + `${fnTag}, TransferProposalRequest message does not contain transfer initialization claims`, + ); + } + + const senderId = request.transferClaims + .senderGatewayNetworkId as SupportedChain; + + this.Log.info(`TransferProposalRequest passed all checks.`); + + if (!this.checkTransferClaims(request.transferClaims)) { + throw new Error(); + } + return true; + } + + async checkTransferCommenceRequestMessage( + request: PreTransferCommenceRequestMessage, + session: SATPSession | undefined, + ): Promise { + const stepTag = `checkTransferCommenceRequestMessage()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if ( + request.common == undefined || + request.common.version == undefined || + request.common.messageType == undefined || + request.common.sessionId == undefined || + // request.common.transferContextId == undefined || + request.common.sequenceNumber == undefined || + request.common.resourceUrl == undefined || + // request.common.actionResponse == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + request.common.signature == undefined || + request.common.clientGatewayPubkey == undefined || + request.common.serverGatewayPubkey == undefined + ) { + throw new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); + } + + if (request.common.version != SATP_VERSION) { + throw new Error(`${fnTag}, unsupported SATP version`); + } + + if (session == undefined) { + throw new Error(`${fnTag}, session is undefined`); + } + const sessionData = session.getSessionData(); + + if (sessionData == undefined) { + throw new Error( + `${fnTag}, session data not found for session id ${request.common.sessionId}`, + ); + } + + if ( + sessionData.serverGatewayPubkey == undefined || + sessionData.hashes == undefined || + sessionData.hashes.stage1 == undefined || + sessionData.hashes.stage1.transferProposalReceiptMessageHash == + undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw new Error(`${fnTag}, session data was not load correctly`); + } + + if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { + throw new Error( + `${fnTag}, TransferCommenceRequest serverIdentity public key does not match the one that was sent`, + ); + } + + if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { + throw new Error( + `${fnTag}, TransferCommenceRequest clientIdentity public key does not match the one that was sent`, + ); + } + + if ( + !verifySignature( + this.Signer, + request.common, + request.common.clientGatewayPubkey, + ) + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message signature verification failed`, + ); + } + + if (request.common.messageType != MessageType.TRANSFER_COMMENCE_REQUEST) { + throw new Error( + `${fnTag}, wrong message type for TransferCommenceRequest`, + ); + } + + if ( + request.common.sequenceNumber != + sessionData.lastSequenceNumber + BigInt(1) + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest Message sequence number is wrong`, + ); + } + + if ( + request.common.hashPreviousMessage != + sessionData.hashes.stage1.transferProposalReceiptMessageHash + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, + ); + } + + if ( + request.hashPreTransferVerificationAndContext == undefined || + request.hashPreTransferVerificationAndContext != + sessionData.hashTransferInitClaims + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message does not contain transfer claims`, + ); + } + + if ( + !verifySignature(this.Signer, request, sessionData.clientGatewayPubkey) + ) { + throw new Error( + `${fnTag}, TransferCommenceRequest message signature verification failed`, + ); + } + + this.Log.info(`TransferCommenceRequest passed all checks.`); + return sessionData; + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + private checkTransferClaims(transferClaims: TransferClaims): boolean { + //todo + return true; + } + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + private counterProposalTransferClaims( + oldClaims: TransferClaims, + ): TransferClaims { + //todo + return oldClaims; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index cc9260dc1c..5c61c8c6d7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -11,6 +11,8 @@ import { ConnectRouter } from "@connectrpc/connect"; import { SATPGateway } from "../plugin-satp-hermes-gateway"; import { SATPService } from "../types/satp-protocol"; import { PromiseClient as PromiseConnectClient } from "@connectrpc/connect"; +import { IPrivacyPolicyValue } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-creation/privacy-policies"; +import { IMergePolicyValue } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-merging/merge-policies"; export type SATPConnectHandler = ( gateway: SATPGateway, @@ -81,6 +83,8 @@ export interface SATPGatewayConfig { environment?: "development" | "production"; enableOpenAPI?: boolean; validationOptions?: ValidatorOptions; + privacyPolicies?: IPrivacyPolicyValue[]; + mergePolicies?: IMergePolicyValue[]; } // export interface SATPBridgeConfig { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.gitignore new file mode 100644 index 0000000000..149b576547 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.npmignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.npmignore new file mode 100644 index 0000000000..999d88df69 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES new file mode 100644 index 0000000000..16b445eee6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES @@ -0,0 +1,9 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts new file mode 100644 index 0000000000..5009672823 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts @@ -0,0 +1,2678 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SATP Gateway Client (Business Logic Orchestrator) + * SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; + +/** + * An Error + * @export + * @interface APIError + */ +export interface APIError { + /** + * HTTP error type + * @type {string} + * @memberof APIError + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof APIError + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof APIError + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof APIError + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof APIError + */ + 'timestamp': string; +} +/** + * + * @export + * @interface Action + */ +export interface Action { + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Action + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. + * @type {string} + * @memberof Action + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Action + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. + * @type {number} + * @memberof Action + */ + 'slippage'?: number; + /** + * A blockchain address. + * @type {string} + * @memberof Action + */ + 'fromAddress'?: string; + /** + * A blockchain address. + * @type {string} + * @memberof Action + */ + 'toAddress'?: string; +} +/** + * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 + * @export + * @enum {string} + */ + +export const AuthzJwtClaim = { + /** + * The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL. + */ + iss: 'Hyperledger Labs - Carbon Accounting Tool' +} as const; + +export type AuthzJwtClaim = typeof AuthzJwtClaim[keyof typeof AuthzJwtClaim]; + + +/** + * + * @export + * @enum {string} + */ + +export const AuthzScope = { + /** + * Identities with the group:admin scope are administrators of the system. + */ + GroupAdmin: 'group:admin', + /** + * Identities with the group:user scope are end users of the system who only have authorization to perform a limited set of actions. + */ + GroupUser: 'group:user' +} as const; + +export type AuthzScope = typeof AuthzScope[keyof typeof AuthzScope]; + + +/** + * Information about the bridge used for the token transfer. + * @export + * @interface BridgeInfo + */ +export interface BridgeInfo { + /** + * The address of the token being transferred. + * @type {string} + * @memberof BridgeInfo + */ + 'tokenAddress'?: string; +} +/** + * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + * @export + * @interface Cancel200Response + */ +export interface Cancel200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Cancel200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; + /** + * Indicates whether the cancel operation was successful. + * @type {boolean} + * @memberof Cancel200Response + */ + 'cancelSuccessful': boolean; +} +/** + * Request to cancel an ongoing transaction session, identified by the session ID. + * @export + * @interface CancelRequest + */ +export interface CancelRequest { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof CancelRequest + */ + 'sessionID': string; +} +/** + * Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. + * @export + * @interface CancelResponse + */ +export interface CancelResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof CancelResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; + /** + * Indicates whether the cancel operation was successful. + * @type {boolean} + * @memberof CancelResponse + */ + 'cancelSuccessful': boolean; +} +/** + * + * @export + * @interface Chain + */ +export interface Chain { + /** + * A unique identifier for the blockchain network. + * @type {string} + * @memberof Chain + */ + 'chainId': string; + /** + * The name of the blockchain network. + * @type {string} + * @memberof Chain + */ + 'chainName': string; + /** + * The type of blockchain network (e.g., \'evm\', \'fabric\'). + * @type {string} + * @memberof Chain + */ + 'chainType': string; + /** + * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). + * @type {string} + * @memberof Chain + */ + 'networkName': string; +} +/** + * + * @export + * @interface Chains1Inner + */ +export interface Chains1Inner { + /** + * A unique identifier for the blockchain network. + * @type {string} + * @memberof Chains1Inner + */ + 'chainId': string; + /** + * The name of the blockchain network. + * @type {string} + * @memberof Chains1Inner + */ + 'chainName': string; + /** + * The type of blockchain network (e.g., \'evm\', \'fabric\'). + * @type {string} + * @memberof Chains1Inner + */ + 'chainType': string; + /** + * The specific network name within the blockchain (e.g., \'mainnet\', \'testnet\'). + * @type {string} + * @memberof Chains1Inner + */ + 'networkName': string; +} +/** + * Response schema for a continue request, returning the status of the SATP session. + * @export + * @interface Continue200Response + */ +export interface Continue200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Continue200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Schema for a request to continue a paused transaction session. + * @export + * @interface ContinueRequest + */ +export interface ContinueRequest { + /** + * A unique identifier for the transaction session to be continued. + * @type {string} + * @memberof ContinueRequest + */ + 'sessionId': string; + /** + * A unique identifier for the transaction context. + * @type {string} + * @memberof ContinueRequest + */ + 'contextId': string; +} +/** + * Response schema for a continue request, returning the status of the SATP session. + * @export + * @interface ContinueResponse + */ +export interface ContinueResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof ContinueResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * + * @export + * @enum {string} + */ + +export const CredentialProfile = { + Saml: 'SAML', + Oauth: 'OAUTH', + X509: 'X509' +} as const; + +export type CredentialProfile = typeof CredentialProfile[keyof typeof CredentialProfile]; + + +/** + * Supported DLT protocols. + * @export + * @enum {string} + */ + +export const DLTProtocol = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type DLTProtocol = typeof DLTProtocol[keyof typeof DLTProtocol]; + + +/** + * Provides an estimation for a transaction, including costs, amounts, and execution duration. + * @export + * @interface Estimate + */ +export interface Estimate { + /** + * A blockchain address. + * @type {string} + * @memberof Estimate + */ + 'approvalAddress'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmountMin'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'fromAmount'?: string; + /** + * A collection of fee costs associated with the transaction. + * @type {Array} + * @memberof Estimate + */ + 'feeCosts'?: Array; + /** + * A collection of estimated gas costs for executing the transaction. + * @type {Array} + * @memberof Estimate + */ + 'gasCosts'?: Array; + /** + * The estimated duration for the transaction execution in seconds. + * @type {number} + * @memberof Estimate + */ + 'executionDuration'?: number; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'fromAmountUSD'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof Estimate + */ + 'toAmountUSD'?: string; + /** + * The tool or service used to generate this estimate. + * @type {string} + * @memberof Estimate + */ + 'tool'?: string; +} +/** + * Details about a specific fee cost associated with the transaction. + * @export + * @interface FeeCost + */ +export interface FeeCost { + /** + * Name of the fee cost. + * @type {string} + * @memberof FeeCost + */ + 'name'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof FeeCost + */ + 'amount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof FeeCost + */ + 'amountUSD'?: string; + /** + * The symbol of a token + * @type {string} + * @memberof FeeCost + */ + 'token'?: string; + /** + * Indicates if the fee is included in the transaction amount. + * @type {boolean} + * @memberof FeeCost + */ + 'included'?: boolean; +} +/** + * + * @export + * @interface GasCost + */ +export interface GasCost { + /** + * The type of the gas cost. + * @type {string} + * @memberof GasCost + */ + 'type'?: string; + /** + * The gas price, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'price'?: string; + /** + * The estimated gas required, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'estimate'?: string; + /** + * The gas limit for the transaction, specified as a string to maintain precision. + * @type {string} + * @memberof GasCost + */ + 'limit'?: string; + /** + * The amount of gas required in the gas currency. + * @type {string} + * @memberof GasCost + */ + 'amount'?: string; + /** + * The amount of gas required in USD. + * @type {string} + * @memberof GasCost + */ + 'amountUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GasCost + */ + 'token'?: GetRoutes200ResponseRoutesInnerFromToken; +} +/** + * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + * @export + * @interface GetAudit200Response + */ +export interface GetAudit200Response { + /** + * An array of strings representing proofs. + * @type {Array} + * @memberof GetAudit200Response + */ + 'proofs'?: Array; + /** + * The start datetime of the audit period. + * @type {string} + * @memberof GetAudit200Response + */ + 'auditStartTime'?: string; + /** + * The end datetime of the audit period. + * @type {string} + * @memberof GetAudit200Response + */ + 'auditEndTime'?: string; +} +/** + * Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. + * @export + * @interface GetAuditRequest + */ +export interface GetAuditRequest { + /** + * The start datetime for the audit. + * @type {string} + * @memberof GetAuditRequest + */ + 'auditStartDate'?: string; + /** + * The end datetime for the audit. + * @type {string} + * @memberof GetAuditRequest + */ + 'auditEndDate'?: string; + /** + * Include proofs generated from each gateway transaction. + * @type {boolean} + * @memberof GetAuditRequest + */ + 'includeProofs'?: boolean; +} +/** + * Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. + * @export + * @interface GetAuditResponse + */ +export interface GetAuditResponse { + /** + * An array of strings representing proofs. + * @type {Array} + * @memberof GetAuditResponse + */ + 'proofs'?: Array; + /** + * The start datetime of the audit period. + * @type {string} + * @memberof GetAuditResponse + */ + 'auditStartTime'?: string; + /** + * The end datetime of the audit period. + * @type {string} + * @memberof GetAuditResponse + */ + 'auditEndTime'?: string; +} +/** + * + * @export + * @interface GetHealthCheck200Response + */ +export interface GetHealthCheck200Response { + /** + * + * @type {string} + * @memberof GetHealthCheck200Response + */ + 'status'?: string; +} +/** + * A collection of available and unavailable routes + * @export + * @interface GetRoutes200Response + */ +export interface GetRoutes200Response { + /** + * A collection of route objects + * @type {Array} + * @memberof GetRoutes200Response + */ + 'routes': Array; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInner + */ +export interface GetRoutes200ResponseRoutesInner { + /** + * A unique identifier of the route. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'id': string; + /** + * A unique identifier for the gateway. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'gatewayID': string; + /** + * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'mode': GetRoutes200ResponseRoutesInnerModeEnum; + /** + * The ID of the DLT Network where the operation will originate. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromDLTNetworkID'?: string; + /** + * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromAmountUSD'?: number; + /** + * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The ID of the DLT Network where the operation will end. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toDLTNetworkID'?: string; + /** + * The expected amount to be received in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmountUSD'?: string; + /** + * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmount'?: string; + /** + * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toAmountMin'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The expected gas cost in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'gasCostUSD'?: string; + /** + * Whether chain switching is enabled or not. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'containsSwitchChain'?: boolean; + /** + * List of steps involved in this route, adjusted for mode. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'steps'?: Array; + /** + * + * @type {GetRoutes200ResponseRoutesInnerInsurance} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInner + */ + 'tags'?: Array; +} + +export const GetRoutes200ResponseRoutesInnerModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type GetRoutes200ResponseRoutesInnerModeEnum = typeof GetRoutes200ResponseRoutesInnerModeEnum[keyof typeof GetRoutes200ResponseRoutesInnerModeEnum]; + +/** + * Metadata detailing a supported token + * @export + * @interface GetRoutes200ResponseRoutesInnerFromToken + */ +export interface GetRoutes200ResponseRoutesInnerFromToken { + /** + * The network of the DLT being interacted with. TODO: implement network identification draft + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'chainID': string; + /** + * Supported DLT protocols. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'chainType': GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'address': string; + /** + * The name of the token. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'name'?: string; + /** + * The symbol of the token. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'symbol': string; + /** + * How many decimals the token supports. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'decimals': number; + /** + * The logo of a token, chain, dex etc. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'logoURI'?: string; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'tags'?: Array; + /** + * The current price of the token in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'priceUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} + * @memberof GetRoutes200ResponseRoutesInnerFromToken + */ + 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; +} + +export const GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum = typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum[keyof typeof GetRoutes200ResponseRoutesInnerFromTokenChainTypeEnum]; + +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ +export interface GetRoutes200ResponseRoutesInnerFromTokenExtensions { + /** + * + * @type {{ [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ + 'bridgeInfo'?: { [key: string]: GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue; }; + /** + * Indicates whether the token is verified. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensions + */ + 'verified'?: boolean; +} +/** + * Information about the bridge used for the token transfer. + * @export + * @interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + */ +export interface GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { + /** + * The address of the token being transferred. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue + */ + 'tokenAddress'?: string; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerInsurance + */ +export interface GetRoutes200ResponseRoutesInnerInsurance { + /** + * The state of insurance applicability for the transaction. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerInsurance + */ + 'state'?: GetRoutes200ResponseRoutesInnerInsuranceStateEnum; + /** + * The fee amount for insurance, represented in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerInsurance + */ + 'feeAmountUsd'?: string; +} + +export const GetRoutes200ResponseRoutesInnerInsuranceStateEnum = { + NotInsurable: 'NOT_INSURABLE', + Insurable: 'INSURABLE', + Insured: 'INSURED' +} as const; + +export type GetRoutes200ResponseRoutesInnerInsuranceStateEnum = typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum[keyof typeof GetRoutes200ResponseRoutesInnerInsuranceStateEnum]; + +/** + * Details a single step within a route including actions and estimates. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInner { + /** + * Id of the step + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'id'?: string; + /** + * Type of the step, typically describing the action, e.g., \'swap\'. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'type'?: string; + /** + * Tool used in the step, e.g., \'stargate\'. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'tool'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * IDs of further steps included within this step, allowing for nested actions without direct recursion. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInner + */ + 'includedStepIds'?: Array; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerAction + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerAction { + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The amount of \'fromToken\' to be transferred, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The maximum acceptable difference between the expected price of the \'toToken\' and the price at the time of the transfer. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'slippage'?: number; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'fromAddress'?: string; + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerAction + */ + 'toAddress'?: string; +} +/** + * Provides an estimation for a transaction, including costs, amounts, and execution duration. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimate { + /** + * A blockchain address. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'approvalAddress'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmountMin'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'fromAmount'?: string; + /** + * A collection of fee costs associated with the transaction. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'feeCosts'?: Array; + /** + * A collection of estimated gas costs for executing the transaction. + * @type {Array} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'gasCosts'?: Array; + /** + * The estimated duration for the transaction execution in seconds. + * @type {number} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'executionDuration'?: number; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'fromAmountUSD'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'toAmountUSD'?: string; + /** + * The tool or service used to generate this estimate. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimate + */ + 'tool'?: string; +} +/** + * Details about a specific fee cost associated with the transaction. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { + /** + * Name of the fee cost. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'name'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'amount'?: string; + /** + * The amount in string format including all decimals. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'amountUSD'?: string; + /** + * The symbol of a token + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'token'?: string; + /** + * Indicates if the fee is included in the transaction amount. + * @type {boolean} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner + */ + 'included'?: boolean; +} +/** + * + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { + /** + * The type of the gas cost. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'type'?: string; + /** + * The gas price, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'price'?: string; + /** + * The estimated gas required, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'estimate'?: string; + /** + * The gas limit for the transaction, specified as a string to maintain precision. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'limit'?: string; + /** + * The amount of gas required in the gas currency. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'amount'?: string; + /** + * The amount of gas required in USD. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'amountUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner + */ + 'token'?: GetRoutes200ResponseRoutesInnerFromToken; +} +/** + * Describes integration or tool details such as bridges or exchanges involved in the transaction. + * @export + * @interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ +export interface GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { + /** + * A unique identifier for the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'key': string; + /** + * The name of the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'name': string; + /** + * URL to the logo of the integration or tool. + * @type {string} + * @memberof GetRoutes200ResponseRoutesInnerStepsInnerToolDetails + */ + 'logoURI': string; +} +/** + * + * @export + * @interface HealthCheckResponse + */ +export interface HealthCheckResponse { + /** + * + * @type {string} + * @memberof HealthCheckResponse + */ + 'status'?: string; +} +/** + * Details a single step within a route including actions and estimates. + * @export + * @interface IncludedStep + */ +export interface IncludedStep { + /** + * Id of the step + * @type {string} + * @memberof IncludedStep + */ + 'id'?: string; + /** + * Type of the step, typically describing the action, e.g., \'swap\'. + * @type {string} + * @memberof IncludedStep + */ + 'type'?: string; + /** + * Tool used in the step, e.g., \'stargate\'. + * @type {string} + * @memberof IncludedStep + */ + 'tool'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerAction} + * @memberof IncludedStep + */ + 'action'?: GetRoutes200ResponseRoutesInnerStepsInnerAction; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerEstimate} + * @memberof IncludedStep + */ + 'estimate'?: GetRoutes200ResponseRoutesInnerStepsInnerEstimate; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof IncludedStep + */ + 'toolDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * + * @type {GetRoutes200ResponseRoutesInnerStepsInnerToolDetails} + * @memberof IncludedStep + */ + 'integrationDetails'?: GetRoutes200ResponseRoutesInnerStepsInnerToolDetails; + /** + * IDs of further steps included within this step, allowing for nested actions without direct recursion. + * @type {Array} + * @memberof IncludedStep + */ + 'includedStepIds'?: Array; +} +/** + * + * @export + * @interface Insurance + */ +export interface Insurance { + /** + * The state of insurance applicability for the transaction. + * @type {string} + * @memberof Insurance + */ + 'state'?: InsuranceStateEnum; + /** + * The fee amount for insurance, represented in USD. + * @type {string} + * @memberof Insurance + */ + 'feeAmountUsd'?: string; +} + +export const InsuranceStateEnum = { + NotInsurable: 'NOT_INSURABLE', + Insurable: 'INSURABLE', + Insured: 'INSURED' +} as const; + +export type InsuranceStateEnum = typeof InsuranceStateEnum[keyof typeof InsuranceStateEnum]; + +/** + * Describes integration or tool details such as bridges or exchanges involved in the transaction. + * @export + * @interface IntegrationDetails + */ +export interface IntegrationDetails { + /** + * A unique identifier for the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'key': string; + /** + * The name of the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'name': string; + /** + * URL to the logo of the integration or tool. + * @type {string} + * @memberof IntegrationDetails + */ + 'logoURI': string; +} +/** + * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + * @export + * @interface Pause200Response + */ +export interface Pause200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Pause200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. + * @export + * @interface PauseRequest + */ +export interface PauseRequest { + /** + * + * @type {string} + * @memberof PauseRequest + */ + 'sessionId'?: string; + /** + * + * @type {string} + * @memberof PauseRequest + */ + 'contextId'?: string; +} +/** + * Response for a pause transaction request. Returns the current status of the SATP session post-pause action. + * @export + * @interface PauseResponse + */ +export interface PauseResponse { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof PauseResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * + * @export + * @interface Route + */ +export interface Route { + /** + * A unique identifier of the route. + * @type {string} + * @memberof Route + */ + 'id': string; + /** + * A unique identifier for the gateway. + * @type {string} + * @memberof Route + */ + 'gatewayID': string; + /** + * The mode of operation for this route - \'data\' for arbitrary payload handling, \'transfer\' for asset transfer. + * @type {string} + * @memberof Route + */ + 'mode': RouteModeEnum; + /** + * The ID of the DLT Network where the operation will originate. + * @type {string} + * @memberof Route + */ + 'fromDLTNetworkID'?: string; + /** + * The amount of \'fromToken\' to be transferred in USD, specified as a string to maintain precision. + * @type {number} + * @memberof Route + */ + 'fromAmountUSD'?: number; + /** + * The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'fromAmount'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Route + */ + 'fromToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The ID of the DLT Network where the operation will end. + * @type {string} + * @memberof Route + */ + 'toDLTNetworkID'?: string; + /** + * The expected amount to be received in USD. + * @type {string} + * @memberof Route + */ + 'toAmountUSD'?: string; + /** + * The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'toAmount'?: string; + /** + * The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). + * @type {string} + * @memberof Route + */ + 'toAmountMin'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromToken} + * @memberof Route + */ + 'toToken'?: GetRoutes200ResponseRoutesInnerFromToken; + /** + * The expected gas cost in USD. + * @type {string} + * @memberof Route + */ + 'gasCostUSD'?: string; + /** + * Whether chain switching is enabled or not. + * @type {boolean} + * @memberof Route + */ + 'containsSwitchChain'?: boolean; + /** + * List of steps involved in this route, adjusted for mode. + * @type {Array} + * @memberof Route + */ + 'steps'?: Array; + /** + * + * @type {GetRoutes200ResponseRoutesInnerInsurance} + * @memberof Route + */ + 'insurance'?: GetRoutes200ResponseRoutesInnerInsurance; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof Route + */ + 'tags'?: Array; +} + +export const RouteModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type RouteModeEnum = typeof RouteModeEnum[keyof typeof RouteModeEnum]; + +/** + * A collection of available and unavailable routes + * @export + * @interface RoutesResponse + */ +export interface RoutesResponse { + /** + * A collection of route objects + * @type {Array} + * @memberof RoutesResponse + */ + 'routes': Array; +} +/** + * Request for retrieving the current status of a session, identified by the session ID. + * @export + * @interface StatusRequest + */ +export interface StatusRequest { + /** + * The ID of the session for which the status is being requested. + * @type {string} + * @memberof StatusRequest + */ + 'sessionID': string; +} +/** + * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. + * @export + * @interface StatusResponse + */ +export interface StatusResponse { + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'status': StatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'substatus': StatusResponseSubstatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'stage': StatusResponseStageEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'step': StatusResponseStepEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'startTime': string; + /** + * + * @type {Transact200ResponseStatusResponseOriginChain} + * @memberof StatusResponse + */ + 'originChain': Transact200ResponseStatusResponseOriginChain; + /** + * + * @type {Transact200ResponseStatusResponseDestinationChain} + * @memberof StatusResponse + */ + 'destinationChain': Transact200ResponseStatusResponseDestinationChain; +} + +export const StatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type StatusResponseStatusEnum = typeof StatusResponseStatusEnum[keyof typeof StatusResponseStatusEnum]; +export const StatusResponseSubstatusEnum = { + WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', + WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', + BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', + ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', + RefundInProgress: 'REFUND_IN_PROGRESS', + UnknownError: 'UNKNOWN_ERROR', + Completed: 'COMPLETED', + Partial: 'PARTIAL', + Refunded: 'REFUNDED', + NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' +} as const; + +export type StatusResponseSubstatusEnum = typeof StatusResponseSubstatusEnum[keyof typeof StatusResponseSubstatusEnum]; +export const StatusResponseStageEnum = { + Stage0: 'STAGE0', + Stage1: 'STAGE1', + Stage2: 'STAGE2', + Stage3: 'STAGE3' +} as const; + +export type StatusResponseStageEnum = typeof StatusResponseStageEnum[keyof typeof StatusResponseStageEnum]; +export const StatusResponseStepEnum = { + TransferInitializationClaims: 'transfer-initialization-claims', + ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', + TransferProposalMessage: 'transfer-proposal-message', + TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', + TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', + TransferCommenceMessage: 'transfer-commence-message', + CommenceResponseMessage: 'commence-response-message', + LockAssertionMessage: 'lock-assertion-message', + LockAssertionReceiptMessage: 'lock-assertion-receipt-message', + CommitPreparationMessage: 'commit-preparation-message', + CommitReadyMessage: 'commit-ready-message', + CommitFinalAssertionMessage: 'commit-final-assertion-message', + CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', + TransferCompleteMessage: 'transfer-complete-message', + RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', + RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', + RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', + RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', + RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', + RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', + RollbackCommenceResponseMessage: 'rollback-commence-response-message', + RollbackLockAssertionMessage: 'rollback-lock-assertion-message', + RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', + RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', + RollbackCommitReadyMessage: 'rollback-commit-ready-message', + RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', + RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', + RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' +} as const; + +export type StatusResponseStepEnum = typeof StatusResponseStepEnum[keyof typeof StatusResponseStepEnum]; + +/** + * Metadata detailing a supported token + * @export + * @interface Token + */ +export interface Token { + /** + * The network of the DLT being interacted with. TODO: implement network identification draft + * @type {string} + * @memberof Token + */ + 'chainID': string; + /** + * Supported DLT protocols. + * @type {string} + * @memberof Token + */ + 'chainType': TokenChainTypeEnum; + /** + * A blockchain address. + * @type {string} + * @memberof Token + */ + 'address': string; + /** + * The name of the token. + * @type {string} + * @memberof Token + */ + 'name'?: string; + /** + * The symbol of the token. + * @type {string} + * @memberof Token + */ + 'symbol': string; + /** + * How many decimals the token supports. + * @type {number} + * @memberof Token + */ + 'decimals': number; + /** + * The logo of a token, chain, dex etc. + * @type {string} + * @memberof Token + */ + 'logoURI'?: string; + /** + * List of tags identifiers providing additional context or categorization. + * @type {Array} + * @memberof Token + */ + 'tags'?: Array; + /** + * The current price of the token in USD. + * @type {string} + * @memberof Token + */ + 'priceUSD'?: string; + /** + * + * @type {GetRoutes200ResponseRoutesInnerFromTokenExtensions} + * @memberof Token + */ + 'extensions'?: GetRoutes200ResponseRoutesInnerFromTokenExtensions; +} + +export const TokenChainTypeEnum = { + HyperledgerFabric: 'HyperledgerFabric', + HyperledgerBesu: 'HyperledgerBesu' +} as const; + +export type TokenChainTypeEnum = typeof TokenChainTypeEnum[keyof typeof TokenChainTypeEnum]; + +/** + * Response schema for a transaction request. Includes the session ID and the current status of the transaction. + * @export + * @interface Transact200Response + */ +export interface Transact200Response { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof Transact200Response + */ + 'sessionID': string; + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Transact200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. + * @export + * @interface Transact200ResponseStatusResponse + */ +export interface Transact200ResponseStatusResponse { + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'status': Transact200ResponseStatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'substatus': Transact200ResponseStatusResponseSubstatusEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'stage': Transact200ResponseStatusResponseStageEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'step': Transact200ResponseStatusResponseStepEnum; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'startTime': string; + /** + * + * @type {Transact200ResponseStatusResponseOriginChain} + * @memberof Transact200ResponseStatusResponse + */ + 'originChain': Transact200ResponseStatusResponseOriginChain; + /** + * + * @type {Transact200ResponseStatusResponseDestinationChain} + * @memberof Transact200ResponseStatusResponse + */ + 'destinationChain': Transact200ResponseStatusResponseDestinationChain; +} + +export const Transact200ResponseStatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type Transact200ResponseStatusResponseStatusEnum = typeof Transact200ResponseStatusResponseStatusEnum[keyof typeof Transact200ResponseStatusResponseStatusEnum]; +export const Transact200ResponseStatusResponseSubstatusEnum = { + WaitSourceConfirmations: 'WAIT_SOURCE_CONFIRMATIONS', + WaitDestinationTransaction: 'WAIT_DESTINATION_TRANSACTION', + BridgeNotAvailable: 'BRIDGE_NOT_AVAILABLE', + ChainNotAvailable: 'CHAIN_NOT_AVAILABLE', + RefundInProgress: 'REFUND_IN_PROGRESS', + UnknownError: 'UNKNOWN_ERROR', + Completed: 'COMPLETED', + Partial: 'PARTIAL', + Refunded: 'REFUNDED', + NotProcessableRefundNeeded: 'NOT_PROCESSABLE_REFUND_NEEDED' +} as const; + +export type Transact200ResponseStatusResponseSubstatusEnum = typeof Transact200ResponseStatusResponseSubstatusEnum[keyof typeof Transact200ResponseStatusResponseSubstatusEnum]; +export const Transact200ResponseStatusResponseStageEnum = { + Stage0: 'STAGE0', + Stage1: 'STAGE1', + Stage2: 'STAGE2', + Stage3: 'STAGE3' +} as const; + +export type Transact200ResponseStatusResponseStageEnum = typeof Transact200ResponseStatusResponseStageEnum[keyof typeof Transact200ResponseStatusResponseStageEnum]; +export const Transact200ResponseStatusResponseStepEnum = { + TransferInitializationClaims: 'transfer-initialization-claims', + ConveyanceOfNetworkCapabilitiesAndParameters: 'conveyance-of-network-capabilities-and-parameters', + TransferProposalMessage: 'transfer-proposal-message', + TransferProposalReceiptMessage: 'transfer-proposal-receipt-message', + TransferProposalRejectAndConditionalRejectMessage: 'transfer-proposal-reject-and-conditional-reject-message', + TransferCommenceMessage: 'transfer-commence-message', + CommenceResponseMessage: 'commence-response-message', + LockAssertionMessage: 'lock-assertion-message', + LockAssertionReceiptMessage: 'lock-assertion-receipt-message', + CommitPreparationMessage: 'commit-preparation-message', + CommitReadyMessage: 'commit-ready-message', + CommitFinalAssertionMessage: 'commit-final-assertion-message', + CommitFinalAcknowledgementReceiptMessage: 'commit-final-acknowledgement-receipt-message', + TransferCompleteMessage: 'transfer-complete-message', + RollbackTransferInitializationClaims: 'rollback-transfer-initialization-claims', + RollbackConveyanceOfNetworkCapabilitiesAndParameters: 'rollback-conveyance-of-network-capabilities-and-parameters', + RollbackTransferProposalMessage: 'rollback-transfer-proposal-message', + RollbackTransferProposalReceiptMessage: 'rollback-transfer-proposal-receipt-message', + RollbackTransferProposalRejectAndConditionalRejectMessage: 'rollback-transfer-proposal-reject-and-conditional-reject-message', + RollbackTransferCommenceMessage: 'rollback-transfer-commence-message', + RollbackCommenceResponseMessage: 'rollback-commence-response-message', + RollbackLockAssertionMessage: 'rollback-lock-assertion-message', + RollbackLockAssertionReceiptMessage: 'rollback-lock-assertion-receipt-message', + RollbackCommitPreparationMessage: 'rollback-commit-preparation-message', + RollbackCommitReadyMessage: 'rollback-commit-ready-message', + RollbackCommitFinalAssertionMessage: 'rollback-commit-final-assertion-message', + RollbackCommitFinalAcknowledgementReceiptMessage: 'rollback-commit-final-acknowledgement-receipt-message', + RollbackTransferCompleteMessage: 'rollback-transfer-complete-message' +} as const; + +export type Transact200ResponseStatusResponseStepEnum = typeof Transact200ResponseStatusResponseStepEnum[keyof typeof Transact200ResponseStatusResponseStepEnum]; + +/** + * + * @export + * @interface Transact200ResponseStatusResponseDestinationChain + */ +export interface Transact200ResponseStatusResponseDestinationChain { + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseDestinationChain + */ + 'dltProtocol'?: any; + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseDestinationChain + */ + 'dltSubnetworkID'?: any; +} +/** + * + * @export + * @interface Transact200ResponseStatusResponseOriginChain + */ +export interface Transact200ResponseStatusResponseOriginChain { + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseOriginChain + */ + 'dltProtocol'?: any; + /** + * + * @type {any} + * @memberof Transact200ResponseStatusResponseOriginChain + */ + 'dltSubnetworkID'?: any; +} +/** + * An Error + * @export + * @interface TransactDefaultResponse + */ +export interface TransactDefaultResponse { + /** + * HTTP error type + * @type {string} + * @memberof TransactDefaultResponse + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof TransactDefaultResponse + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof TransactDefaultResponse + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof TransactDefaultResponse + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof TransactDefaultResponse + */ + 'timestamp': string; +} +/** + * Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. + * @export + * @interface TransactRequest + */ +export interface TransactRequest { + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'contextID': string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'mode': TransactRequestModeEnum; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'payload'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromDLTNetworkID'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toDLTNetworkID'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromAmount'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'fromToken'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toAmount'?: string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'toToken'?: string; +} + +export const TransactRequestModeEnum = { + Data: 'data', + Transfer: 'transfer' +} as const; + +export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; + +/** + * Response schema for a transaction request. Includes the session ID and the current status of the transaction. + * @export + * @interface TransactResponse + */ +export interface TransactResponse { + /** + * Unique identifier (UUID) for the session. + * @type {string} + * @memberof TransactResponse + */ + 'sessionID': string; + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof TransactResponse + */ + 'statusResponse': Transact200ResponseStatusResponse; +} + +/** + * AdminApi - axios parameter creator + * @export + */ +export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _continue: async (continueRequest: ContinueRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'continueRequest' is not null or undefined + assertParamExists('_continue', 'continueRequest', continueRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/continue`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(continueRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAudit: async (auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (auditStartDate !== undefined) { + localVarQueryParameter['auditStartDate'] = (auditStartDate as any instanceof Date) ? + (auditStartDate as any).toISOString() : + auditStartDate; + } + + if (auditEndDate !== undefined) { + localVarQueryParameter['auditEndDate'] = (auditEndDate as any instanceof Date) ? + (auditEndDate as any).toISOString() : + auditEndDate; + } + + if (includeProofs !== undefined) { + localVarQueryParameter['includeProofs'] = includeProofs; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHealthCheck: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatus: async (sessionID: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'sessionID' is not null or undefined + assertParamExists('getStatus', 'sessionID', sessionID) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (sessionID !== undefined) { + localVarQueryParameter['SessionID'] = sessionID; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pause: async (pauseRequest: PauseRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'pauseRequest' is not null or undefined + assertParamExists('pause', 'pauseRequest', pauseRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(pauseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AdminApi - functional programming interface + * @export + */ +export const AdminApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator._continue(continueRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAudit(auditStartDate, auditEndDate, includeProofs, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHealthCheck(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheck(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatus(sessionID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getStatus(sessionID, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.pause(pauseRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * AdminApi - factory interface + * @export + */ +export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AdminApiFp(configuration) + return { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + _continue(continueRequest: ContinueRequest, options?: any): AxiosPromise { + return localVarFp._continue(continueRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: any): AxiosPromise { + return localVarFp.getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(axios, basePath)); + }, + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHealthCheck(options?: any): AxiosPromise { + return localVarFp.getHealthCheck(options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatus(sessionID: string, options?: any): AxiosPromise { + return localVarFp.getStatus(sessionID, options).then((request) => request(axios, basePath)); + }, + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + pause(pauseRequest: PauseRequest, options?: any): AxiosPromise { + return localVarFp.pause(pauseRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AdminApi - object-oriented interface + * @export + * @class AdminApi + * @extends {BaseAPI} + */ +export class AdminApi extends BaseAPI { + /** + * Attempts to continue a previously paused transaction intent, resuming its execution. + * @summary Continue a paused transaction session + * @param {ContinueRequest} continueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public _continue(continueRequest: ContinueRequest, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration)._continue(continueRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. + * @summary Audit transactions + * @param {string} [auditStartDate] The start date for the audit period. + * @param {string} [auditEndDate] The end date for the audit period. + * @param {boolean} [includeProofs] Include proofs generated from each gateway transaction. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getAudit(auditStartDate?: string, auditEndDate?: string, includeProofs?: boolean, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getAudit(auditStartDate, auditEndDate, includeProofs, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Responds if SATP Hermes is on + * @summary Health check endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getHealthCheck(options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getHealthCheck(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve the status of a SATP session + * @summary Get SATP current session data + * @param {string} sessionID Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getStatus(sessionID: string, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getStatus(sessionID, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Attempts to pause a previously submitted transaction intent, temporarily halting its execution. + * @summary Pause a transaction session + * @param {PauseRequest} pauseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public pause(pauseRequest: PauseRequest, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).pause(pauseRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * TransactionApi - axios parameter creator + * @export + */ +export const TransactionApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel: async (cancelRequest: CancelRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'cancelRequest' is not null or undefined + assertParamExists('cancel', 'cancelRequest', cancelRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cancelRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getIntegrations: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoutes: async (fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'fromNetworkID' is not null or undefined + assertParamExists('getRoutes', 'fromNetworkID', fromNetworkID) + // verify required parameter 'fromAmount' is not null or undefined + assertParamExists('getRoutes', 'fromAmount', fromAmount) + // verify required parameter 'fromToken' is not null or undefined + assertParamExists('getRoutes', 'fromToken', fromToken) + // verify required parameter 'toDLTNetwork' is not null or undefined + assertParamExists('getRoutes', 'toDLTNetwork', toDLTNetwork) + // verify required parameter 'toToken' is not null or undefined + assertParamExists('getRoutes', 'toToken', toToken) + // verify required parameter 'fromAddress' is not null or undefined + assertParamExists('getRoutes', 'fromAddress', fromAddress) + // verify required parameter 'toAddress' is not null or undefined + assertParamExists('getRoutes', 'toAddress', toAddress) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (fromNetworkID !== undefined) { + localVarQueryParameter['fromNetworkID'] = fromNetworkID; + } + + if (fromAmount !== undefined) { + localVarQueryParameter['fromAmount'] = fromAmount; + } + + if (fromToken !== undefined) { + localVarQueryParameter['fromToken'] = fromToken; + } + + if (toDLTNetwork !== undefined) { + localVarQueryParameter['toDLTNetwork'] = toDLTNetwork; + } + + if (toToken !== undefined) { + localVarQueryParameter['toToken'] = toToken; + } + + if (fromAddress !== undefined) { + localVarQueryParameter['fromAddress'] = fromAddress; + } + + if (toAddress !== undefined) { + localVarQueryParameter['toAddress'] = toAddress; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact: async (transactRequest: TransactRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactRequest' is not null or undefined + assertParamExists('transact', 'transactRequest', transactRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransactionApi - functional programming interface + * @export + */ +export const TransactionApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactionApiAxiosParamCreator(configuration) + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(cancelRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getIntegrations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getIntegrations(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async transact(transactRequest: TransactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.transact(transactRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * TransactionApi - factory interface + * @export + */ +export const TransactionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactionApiFp(configuration) + return { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel(cancelRequest: CancelRequest, options?: any): AxiosPromise { + return localVarFp.cancel(cancelRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getIntegrations(options?: any): AxiosPromise> { + return localVarFp.getIntegrations(options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: any): AxiosPromise { + return localVarFp.getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(axios, basePath)); + }, + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact(transactRequest: TransactRequest, options?: any): AxiosPromise { + return localVarFp.transact(transactRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransactionApi - object-oriented interface + * @export + * @class TransactionApi + * @extends {BaseAPI} + */ +export class TransactionApi extends BaseAPI { + /** + * Attempts to cancel a previously submitted transaction intent using its session ID. + * @summary Cancel a transaction session + * @param {CancelRequest} cancelRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public cancel(cancelRequest: CancelRequest, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).cancel(cancelRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves metadata about each supported blockchain networks, chains, and other systems. + * @summary Get supported integrations + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public getIntegrations(options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).getIntegrations(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a list of possible routes for swapping one asset for another across multiple exchanges + * @summary Get a list of routes for a gateway-to-gateway asset transfer + * @param {string} fromNetworkID The sending DLT Network. + * @param {string} fromAmount The amount that should be sent including all decimals. + * @param {string} fromToken The token that should be transferred. Can be the address or the symbol. + * @param {string} toDLTNetwork The receiving DLT Network. + * @param {string} toToken The token that should be transferred to. Can be the address or the symbol. + * @param {string} fromAddress The sending wallet address. + * @param {string} toAddress The receiving wallet address. If none is provided, the fromAddress will be used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public getRoutes(fromNetworkID: string, fromAmount: string, fromToken: string, toDLTNetwork: string, toToken: string, fromAddress: string, toAddress: string, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).getRoutes(fromNetworkID, fromAmount, fromToken, toDLTNetwork, toToken, fromAddress, toAddress, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactionApi + */ + public transact(transactRequest: TransactRequest, options?: AxiosRequestConfig) { + return TransactionApiFp(this.configuration).transact(transactRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index e6d0eb22c8..d1814315ae 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -42,80 +42,110 @@ export enum MessageType { UNSPECIFIED = 0, /** - * @generated from enum value: MESSAGE_TYPE_INIT_PROPOSAL = 1; + * @generated from enum value: MESSAGE_TYPE_PRE_INIT_PROPOSAL = 1; */ - INIT_PROPOSAL = 1, + PRE_INIT_PROPOSAL = 1, /** - * @generated from enum value: MESSAGE_TYPE_INIT_RECEIPT = 2; + * @generated from enum value: MESSAGE_TYPE_PRE_INIT_RECEIPT = 2; */ - INIT_RECEIPT = 2, + PRE_INIT_RECEIPT = 2, /** - * @generated from enum value: MESSAGE_TYPE_INIT_REJECT = 3; + * @generated from enum value: MESSAGE_TYPE_PRE_INIT_REJECT = 3; */ - INIT_REJECT = 3, + PRE_INIT_REJECT = 3, /** - * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 4; + * @generated from enum value: MESSAGE_TYPE_PRE_TRANSFER_COMMENCE_REQUEST = 4; */ - TRANSFER_COMMENCE_REQUEST = 4, + PRE_TRANSFER_COMMENCE_REQUEST = 4, /** - * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 5; + * @generated from enum value: MESSAGE_TYPE_PRE_TRANSFER_COMMENCE_RESPONSE = 5; */ - TRANSFER_COMMENCE_RESPONSE = 5, + PRE_TRANSFER_COMMENCE_RESPONSE = 5, /** - * @generated from enum value: MESSAGE_TYPE_LOCK_ASSERT = 6; + * @generated from enum value: MESSAGE_TYPE_INIT_PROPOSAL = 6; */ - LOCK_ASSERT = 6, + INIT_PROPOSAL = 6, /** - * @generated from enum value: MESSAGE_TYPE_ASSERTION_RECEIPT = 7; + * @generated from enum value: MESSAGE_TYPE_INIT_RECEIPT = 7; */ - ASSERTION_RECEIPT = 7, + INIT_RECEIPT = 7, /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_PREPARE = 8; + * @generated from enum value: MESSAGE_TYPE_INIT_REJECT = 8; */ - COMMIT_PREPARE = 8, + INIT_REJECT = 8, /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_READY = 9; + * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST = 9; */ - COMMIT_READY = 9, + TRANSFER_COMMENCE_REQUEST = 9, /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_FINAL = 10; + * @generated from enum value: MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE = 10; */ - COMMIT_FINAL = 10, + TRANSFER_COMMENCE_RESPONSE = 10, /** - * @generated from enum value: MESSAGE_TYPE_ACK_COMMIT_FINAL = 11; + * @generated from enum value: MESSAGE_TYPE_LOCK_ASSERT = 11; */ - ACK_COMMIT_FINAL = 11, + LOCK_ASSERT = 11, /** - * @generated from enum value: MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 12; + * @generated from enum value: MESSAGE_TYPE_ASSERTION_RECEIPT = 12; */ - COMMIT_TRANSFER_COMPLETE = 12, + ASSERTION_RECEIPT = 12, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_PREPARE = 13; + */ + COMMIT_PREPARE = 13, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_READY = 14; + */ + COMMIT_READY = 14, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_FINAL = 15; + */ + COMMIT_FINAL = 15, + + /** + * @generated from enum value: MESSAGE_TYPE_ACK_COMMIT_FINAL = 16; + */ + ACK_COMMIT_FINAL = 16, + + /** + * @generated from enum value: MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 17; + */ + COMMIT_TRANSFER_COMPLETE = 17, } // Retrieve enum metadata with: proto3.getEnumType(MessageType) proto3.util.setEnumType(MessageType, "cacti.satp.v02.common.MessageType", [ { no: 0, name: "MESSAGE_TYPE_UNSPECIFIED" }, - { no: 1, name: "MESSAGE_TYPE_INIT_PROPOSAL" }, - { no: 2, name: "MESSAGE_TYPE_INIT_RECEIPT" }, - { no: 3, name: "MESSAGE_TYPE_INIT_REJECT" }, - { no: 4, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST" }, - { no: 5, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE" }, - { no: 6, name: "MESSAGE_TYPE_LOCK_ASSERT" }, - { no: 7, name: "MESSAGE_TYPE_ASSERTION_RECEIPT" }, - { no: 8, name: "MESSAGE_TYPE_COMMIT_PREPARE" }, - { no: 9, name: "MESSAGE_TYPE_COMMIT_READY" }, - { no: 10, name: "MESSAGE_TYPE_COMMIT_FINAL" }, - { no: 11, name: "MESSAGE_TYPE_ACK_COMMIT_FINAL" }, - { no: 12, name: "MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE" }, + { no: 1, name: "MESSAGE_TYPE_PRE_INIT_PROPOSAL" }, + { no: 2, name: "MESSAGE_TYPE_PRE_INIT_RECEIPT" }, + { no: 3, name: "MESSAGE_TYPE_PRE_INIT_REJECT" }, + { no: 4, name: "MESSAGE_TYPE_PRE_TRANSFER_COMMENCE_REQUEST" }, + { no: 5, name: "MESSAGE_TYPE_PRE_TRANSFER_COMMENCE_RESPONSE" }, + { no: 6, name: "MESSAGE_TYPE_INIT_PROPOSAL" }, + { no: 7, name: "MESSAGE_TYPE_INIT_RECEIPT" }, + { no: 8, name: "MESSAGE_TYPE_INIT_REJECT" }, + { no: 9, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_REQUEST" }, + { no: 10, name: "MESSAGE_TYPE_TRANSFER_COMMENCE_RESPONSE" }, + { no: 11, name: "MESSAGE_TYPE_LOCK_ASSERT" }, + { no: 12, name: "MESSAGE_TYPE_ASSERTION_RECEIPT" }, + { no: 13, name: "MESSAGE_TYPE_COMMIT_PREPARE" }, + { no: 14, name: "MESSAGE_TYPE_COMMIT_READY" }, + { no: 15, name: "MESSAGE_TYPE_COMMIT_FINAL" }, + { no: 16, name: "MESSAGE_TYPE_ACK_COMMIT_FINAL" }, + { no: 17, name: "MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE" }, ]); /** diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts index 788bc328e8..9063d3bc6d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { PreTransferVerificationAndContextEstablishmentRequest, PreTransferVerificationAndContextEstablishmentResponse } from "./stage_0_pb.js"; +import { PreTransferCommenceRequestMessage, PreTransferCommenceResponseMessage, PreTransferVerificationAndContextEstablishmentRequest, PreTransferVerificationAndContextEstablishmentResponse } from "./stage_0_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -17,14 +17,23 @@ export const SatpStage0Service = { /** * step RPCs * - * @generated from rpc cacti.satp.v02.SatpStage0Service.TransferProposalClaims + * @generated from rpc cacti.satp.v02.SatpStage0Service.PreTransferProposalClaims */ - transferProposalClaims: { - name: "TransferProposalClaims", + preTransferProposalClaims: { + name: "PreTransferProposalClaims", I: PreTransferVerificationAndContextEstablishmentRequest, O: PreTransferVerificationAndContextEstablishmentResponse, kind: MethodKind.Unary, }, + /** + * @generated from rpc cacti.satp.v02.SatpStage0Service.PreTransferCommence + */ + preTransferCommence: { + name: "PreTransferCommence", + I: PreTransferCommenceRequestMessage, + O: PreTransferCommenceResponseMessage, + kind: MethodKind.Unary, + }, } } as const; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts index 6edec95886..b3bdb76eee 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -7,6 +7,49 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM import { Message, proto3 } from "@bufbuild/protobuf"; import { CommonSatp, TransferClaims } from "./common/message_pb.js"; +/** + * @generated from message cacti.satp.v02.PrivacyPolicy + */ +export class PrivacyPolicy extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: repeated string arguments = 2; + */ + arguments: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.PrivacyPolicy"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "arguments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PrivacyPolicy { + return new PrivacyPolicy().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PrivacyPolicy { + return new PrivacyPolicy().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PrivacyPolicy { + return new PrivacyPolicy().fromJsonString(jsonString, options); + } + + static equals(a: PrivacyPolicy | PlainMessage | undefined, b: PrivacyPolicy | PlainMessage | undefined): boolean { + return proto3.util.equals(PrivacyPolicy, a, b); + } +} + /** * @generated from message cacti.satp.v02.PreTransferVerificationAndContextEstablishmentRequest */ @@ -17,12 +60,22 @@ export class PreTransferVerificationAndContextEstablishmentRequest extends Messa context?: CommonSatp; /** - * todo other fields + * needed ? * - * @generated from field: cacti.satp.v02.common.TransferClaims transferClaims = 2; + * @generated from field: cacti.satp.v02.common.TransferClaims transfer_claims = 2; */ transferClaims?: TransferClaims; + /** + * @generated from field: repeated cacti.satp.v02.PrivacyPolicy processPolicies = 3; + */ + processPolicies: PrivacyPolicy[] = []; + + /** + * @generated from field: repeated cacti.satp.v02.PrivacyPolicy mergePolicies = 4; + */ + mergePolicies: PrivacyPolicy[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -32,7 +85,9 @@ export class PreTransferVerificationAndContextEstablishmentRequest extends Messa static readonly typeName = "cacti.satp.v02.PreTransferVerificationAndContextEstablishmentRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "context", kind: "message", T: CommonSatp }, - { no: 2, name: "transferClaims", kind: "message", T: TransferClaims }, + { no: 2, name: "transfer_claims", kind: "message", T: TransferClaims }, + { no: 3, name: "processPolicies", kind: "message", T: PrivacyPolicy, repeated: true }, + { no: 4, name: "mergePolicies", kind: "message", T: PrivacyPolicy, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { @@ -58,6 +113,31 @@ export class PreTransferVerificationAndContextEstablishmentRequest extends Messa * @generated from message cacti.satp.v02.PreTransferVerificationAndContextEstablishmentResponse */ export class PreTransferVerificationAndContextEstablishmentResponse extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp context = 1; + */ + context?: CommonSatp; + + /** + * @generated from field: repeated cacti.satp.v02.PrivacyPolicy processPolicies_counter_proposal = 2; + */ + processPoliciesCounterProposal: PrivacyPolicy[] = []; + + /** + * @generated from field: repeated cacti.satp.v02.PrivacyPolicy mergePolicies_counter_proposal = 3; + */ + mergePoliciesCounterProposal: PrivacyPolicy[] = []; + + /** + * @generated from field: string hash_pre_transfer_verification_and_context = 4; + */ + hashPreTransferVerificationAndContext = ""; + + /** + * @generated from field: string timestamp = 5; + */ + timestamp = ""; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -66,6 +146,11 @@ export class PreTransferVerificationAndContextEstablishmentResponse extends Mess static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.PreTransferVerificationAndContextEstablishmentResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "context", kind: "message", T: CommonSatp }, + { no: 2, name: "processPolicies_counter_proposal", kind: "message", T: PrivacyPolicy, repeated: true }, + { no: 3, name: "mergePolicies_counter_proposal", kind: "message", T: PrivacyPolicy, repeated: true }, + { no: 4, name: "hash_pre_transfer_verification_and_context", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { @@ -85,3 +170,89 @@ export class PreTransferVerificationAndContextEstablishmentResponse extends Mess } } +/** + * @generated from message cacti.satp.v02.PreTransferCommenceRequestMessage + */ +export class PreTransferCommenceRequestMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + /** + * @generated from field: string hash_pre_transfer_verification_and_context = 2; + */ + hashPreTransferVerificationAndContext = ""; + + /** + * @generated from field: string client_transfer_number = 3; + */ + clientTransferNumber = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.PreTransferCommenceRequestMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 2, name: "hash_pre_transfer_verification_and_context", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferCommenceRequestMessage { + return new PreTransferCommenceRequestMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferCommenceRequestMessage { + return new PreTransferCommenceRequestMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PreTransferCommenceRequestMessage { + return new PreTransferCommenceRequestMessage().fromJsonString(jsonString, options); + } + + static equals(a: PreTransferCommenceRequestMessage | PlainMessage | undefined, b: PreTransferCommenceRequestMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(PreTransferCommenceRequestMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.PreTransferCommenceResponseMessage + */ +export class PreTransferCommenceResponseMessage extends Message { + /** + * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + */ + common?: CommonSatp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.PreTransferCommenceResponseMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "common", kind: "message", T: CommonSatp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferCommenceResponseMessage { + return new PreTransferCommenceResponseMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferCommenceResponseMessage { + return new PreTransferCommenceResponseMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PreTransferCommenceResponseMessage { + return new PreTransferCommenceResponseMessage().fromJsonString(jsonString, options); + } + + static equals(a: PreTransferCommenceResponseMessage | PlainMessage | undefined, b: PreTransferCommenceResponseMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(PreTransferCommenceResponseMessage, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 5a0a645d7a..ccbf22ab88 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -5,6 +5,8 @@ import { Logger, LoggerProvider, } from "@hyperledger/cactus-common"; +import { Stage0SATPHandler } from "../core/stage-handlers/stage0-handler"; +import { Stage0ServerService } from "../core/stage-services/server/stage0-server-service"; import { Stage1SATPHandler } from "../core/stage-handlers/stage1-handler"; import { Stage1ServerService } from "../core/stage-services/server/stage1-server-service"; @@ -12,6 +14,7 @@ import { Stage2ServerService } from "../core/stage-services/server/stage2-server import { Stage3ServerService } from "../core/stage-services/server/stage3-server-service"; import { SATPSession } from "../core/satp-session"; import { SupportedChain } from "../core/types"; +import { Stage0ClientService } from "../core/stage-services/client/stage0-client-service"; import { Stage1ClientService } from "../core/stage-services/client/stage1-client-service"; import { Stage2ClientService } from "../core/stage-services/client/stage2-client-service"; import { Stage3ClientService } from "../core/stage-services/client/stage3-client-service"; @@ -66,12 +69,15 @@ export class SATPManager { this.sessions = options.sessions || new Map(); const handlersClasses = [ + Stage0SATPHandler, Stage1SATPHandler, Stage2SATPHandler, Stage3SATPHandler, ]; const serviceClasses = [ + Stage0ServerService, + Stage0ClientService, Stage1ServerService, Stage1ClientService, Stage2ServerService, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts index e93d8a639c..bffe734ec1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/status-endpoint.ts @@ -16,7 +16,7 @@ import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; import OAS from "../../json/openapi-blo-bundled.json"; import { IRequestOptions } from "../core/types"; -import { StatusRequest } from "../generated/gateway-client/typescript-axios"; +import { StatusRequest } from "../generated/gateway-client/typescript-axios/api"; export class GetStatusEndpointV1 implements IWebServiceEndpoint { public static readonly CLASS_NAME = "GetStatusEndpointV1"; From f52973386050e5b4a78732303bde4222dcf5acfa Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Wed, 31 Jul 2024 17:16:44 +0100 Subject: [PATCH 27/49] feat(satp-hermes): services tests bug correction session functionalities Signed-off-by: Carlos Amaro feat(satp-hermes): errors file and other fixes Signed-off-by: Carlos Amaro feat(satp-hermes): fix packages versions Signed-off-by: Carlos Amaro --- .../proto/cacti/satp/v02/common/message.proto | 7 +- .../proto/cacti/satp/v02/common/session.proto | 2 +- .../main/proto/cacti/satp/v02/stage_1.proto | 4 + .../main/proto/cacti/satp/v02/stage_2.proto | 2 +- .../main/proto/cacti/satp/v02/stage_3.proto | 6 +- .../src/main/typescript/core/satp-session.ts | 90 ++- .../typescript/core/sender-satp-protocol.ts | 8 +- .../src/main/typescript/core/session-utils.ts | 5 + .../core/stage-handlers/stage0-handler.ts | 113 ++- .../core/stage-handlers/stage1-handler.ts | 64 +- .../core/stage-handlers/stage2-handler.ts | 41 +- .../core/stage-handlers/stage3-handler.ts | 96 ++- .../client/stage0-client-service.ts | 10 +- .../client/stage1-client-service.ts | 69 +- .../client/stage2-client-service.ts | 161 ++-- .../client/stage3-client-service.ts | 330 ++++---- .../typescript/core/stage-services/errors.ts | 117 +++ .../stage-services/satp-bridge/besu-bridge.ts | 12 +- .../satp-bridge/fabric-bridge.ts | 5 +- .../satp-bridge/satp-bridge-manager.ts | 9 +- .../core/stage-services/satp-service.ts | 4 +- .../server/stage0-server-service.ts | 28 +- .../server/stage1-server-service.ts | 253 +++--- .../server/stage2-server-service.ts | 127 +-- .../server/stage3-server-service.ts | 359 +++++---- .../src/main/typescript/core/types.ts | 1 + .../src/main/typescript/gateway-utils.ts | 42 +- .../proto/cacti/satp/v02/common/message_pb.ts | 18 +- .../proto/cacti/satp/v02/common/session_pb.ts | 12 +- .../proto/cacti/satp/v02/stage_1_pb.ts | 24 + .../proto/cacti/satp/v02/stage_2_pb.ts | 12 +- .../proto/cacti/satp/v02/stage_3_pb.ts | 12 +- .../typescript/gol/satp-bridges-manager.ts | 137 ++-- .../src/main/typescript/gol/satp-manager.ts | 27 +- .../typescript/plugin-satp-hermes-gateway.ts | 2 +- .../types/blockchain-interaction.ts | 10 +- .../main/typescript/types/satp-protocol.ts | 4 +- .../integration/bridge/besu-bridge.test.ts | 4 +- .../integration/bridge/fabric-bridge.test.ts | 4 +- .../unit/satp-bridge-manager.test.ts | 145 ---- .../src/test/typescript/unit/services.test.ts | 736 ++++++++++++++++++ 41 files changed, 2108 insertions(+), 1004 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto index 2d20e6b9d0..88f464488c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -123,10 +123,9 @@ message CommonSatp { PayloadProfile payload_profile = 11; Payload payload = 13; string payload_hash = 14; - string signature = 15; - string client_gateway_pubkey = 16; - string server_gateway_pubkey = 17; - string hash_previous_message = 18; + string client_gateway_pubkey = 15; + string server_gateway_pubkey = 16; + string hash_previous_message = 17; } message ActionResponse { diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index 9bfa59cc09..f5ac206ea0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -66,7 +66,7 @@ message SessionData { cacti.satp.v02.common.TransferClaimsFormat transfer_claims_format = 56; string client_transfer_number = 57; string server_transfer_number = 58; - string lock_assertion_expiration = 59; + uint64 lock_assertion_expiration = 59; cacti.satp.v02.common.AssetProfile asset_profile = 60; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto index 1423e41242..8a36c5c6f4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto @@ -11,6 +11,7 @@ message TransferProposalRequestMessage { cacti.satp.v02.common.NetworkCapabilities network_capabilities = 4; bool multiple_claims_allowed = 5; bool multiple_cancels_allowed = 6; + string client_signature = 7; } message TransferProposalReceiptMessage { @@ -18,17 +19,20 @@ message TransferProposalReceiptMessage { string hash_transfer_init_claims = 2; cacti.satp.v02.common.TransferClaims transfer_counter_claims = 3; string timestamp = 4; + string server_signature = 5; } message TransferCommenceRequestMessage { cacti.satp.v02.common.CommonSatp common = 1; string hash_transfer_init_claims = 2; string client_transfer_number = 3; + string client_signature = 4; } message TransferCommenceResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; string server_transfer_number = 2; + string server_signature = 3; } service SatpStage1Service { diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto index 8e946b4b91..955711f0d5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_2.proto @@ -10,7 +10,7 @@ message LockAssertionRequestMessage { cacti.satp.v02.common.CommonSatp common = 1; cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 2; cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 3; - string lock_assertion_expiration = 4; + uint64 lock_assertion_expiration = 4; string client_transfer_number = 5; string client_signature = 6; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto index 0f96e0dd1d..13b738a1db 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto @@ -21,7 +21,7 @@ message CommitReadyResponseMessage { message CommitFinalAssertionRequestMessage { cacti.satp.v02.common.CommonSatp common = 1; - string burn_assertion_claim = 2; + cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 2; cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 3; string client_transfer_number = 4; string client_signature = 5; @@ -30,7 +30,7 @@ message CommitFinalAssertionRequestMessage { message CommitFinalAcknowledgementReceiptResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; - string assignment_assertion_claim = 2; + cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 2; cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 3; string server_transfer_number = 4; string server_signature = 5; @@ -47,4 +47,4 @@ service SatpStage3Service { rpc CommitPreparation(CommitPreparationRequestMessage) returns (CommitReadyResponseMessage) {} rpc CommitFinalAssertion(CommitFinalAssertionRequestMessage) returns (CommitFinalAcknowledgementReceiptResponseMessage) {} rpc TransferComplete(TransferCompleteRequestMessage) returns (google.protobuf.Empty) {} -} +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index 3a8f316e0a..db3b168121 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -1,27 +1,97 @@ import { v4 as uuidv4 } from "uuid"; -import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; +import { + MessageStagesHashes, + MessageStagesSignatures, + MessageStagesTimestamps, + SessionData, + Stage1Hashes, + Stage1Signatures, + Stage1Timestamps, + Stage2Hashes, + Stage2Signatures, + Stage2Timestamps, + Stage3Hashes, + Stage3Signatures, + Stage3Timestamps, +} from "../generated/proto/cacti/satp/v02/common/session_pb"; // Define interface on protos export interface ISATPSessionOptions { contextID: string; + sessionID?: string; + server: boolean; + client: boolean; } export class SATPSession { public static readonly CLASS_NAME = "SATPSession"; - private sessionData: SessionData; + private clientSessionData: SessionData | undefined; + private serverSessionData: SessionData | undefined; constructor(ops: ISATPSessionOptions) { - this.sessionData = new SessionData(); - this.sessionData.transferContextId = ops.contextID; - this.sessionData.id = this.generateSessionID(); + if (!ops.server && !ops.client) { + throw new Error(`${SATPSession.CLASS_NAME}#constructor(), at least one of server or client must be true + `); + } + if (ops.server) { + this.serverSessionData = new SessionData(); + this.serverSessionData.transferContextId = ops.contextID; + this.serverSessionData.id = this.generateSessionID(ops.contextID); + this.initialize(this.serverSessionData); + } + + if (ops.client) { + this.clientSessionData = new SessionData(); + this.clientSessionData.transferContextId = ops.contextID; + this.clientSessionData.id = this.generateSessionID(ops.contextID); + this.initialize(this.clientSessionData); + } + } + + private generateSessionID(contextId: string): string { + return uuidv4() + "-" + contextId; + } + + private initialize(sessionData: SessionData): void { + sessionData.hashes = new MessageStagesHashes(); + sessionData.signatures = new MessageStagesSignatures(); + sessionData.processedTimestamps = new MessageStagesTimestamps(); + sessionData.receivedTimestamps = new MessageStagesTimestamps(); + + sessionData.processedTimestamps.stage1 = new Stage1Timestamps(); + sessionData.processedTimestamps.stage2 = new Stage2Timestamps(); + sessionData.processedTimestamps.stage3 = new Stage3Timestamps(); + + sessionData.receivedTimestamps.stage1 = new Stage1Timestamps(); + sessionData.receivedTimestamps.stage2 = new Stage2Timestamps(); + sessionData.receivedTimestamps.stage3 = new Stage3Timestamps(); + + sessionData.hashes.stage1 = new Stage1Hashes(); + sessionData.hashes.stage2 = new Stage2Hashes(); + sessionData.hashes.stage3 = new Stage3Hashes(); + + sessionData.signatures.stage1 = new Stage1Signatures(); + sessionData.signatures.stage2 = new Stage2Signatures(); + sessionData.signatures.stage3 = new Stage3Signatures(); + } + + public getServerSessionData(): SessionData | undefined { + return this.serverSessionData; + } + + public getClientSessionData(): SessionData | undefined { + return this.clientSessionData; + } + + public hasServerSessionData(): boolean { + return this.serverSessionData !== undefined; } - private generateSessionID(): string { - return (this.sessionData.id = - uuidv4() + "-" + this.sessionData.transferContextId); + public hasClientSessionData(): boolean { + return this.clientSessionData !== undefined; } - public getSessionData(): SessionData { - return this.sessionData; + public getSessionId(): string { + return this.serverSessionData?.id || this.clientSessionData?.id || ""; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts index 62b6f2fb2b..143c4cc61b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts @@ -53,13 +53,11 @@ export class SenderSATPProtocol { httpVersion: "1.1", }); - const handlers = this.satpManager.getSATPHandlers( - session.getSessionData().id, - ); + const handlers = this.satpManager.getSATPHandlers(session.getSessionId()); if (!handlers) { throw new Error( - `No handlers found for session ${session.getSessionData().id}`, + `No handlers found for session ${session.getSessionId()}`, ); } @@ -71,7 +69,7 @@ export class SenderSATPProtocol { const requestTransferProposal = await ( satpHandlers.get("Stage1SATPHandler") as Stage1SATPHandler - ).TransferProposalRequest(); + ).TransferProposalRequest(session.getSessionId()); if (!requestTransferProposal) { throw new Error(`Failed to create TransferProposalRequest`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts index 160eabd490..aed061f862 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts @@ -25,6 +25,11 @@ export enum TimestampType { RECEIVED = "RECEIVED", } +export enum SessionType { + SERVER = "SERVER", + CLIENT = "CLIENT", +} + export function createSessionData( id: string, version: string, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts index 6d6c58e1c7..711e05a0fc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -14,78 +14,77 @@ import { Stage0ClientService } from "../stage-services/client/stage0-client-serv export class Stage0SATPHandler implements SATPHandler { public static readonly CLASS_NAME = "Stage0SATPHandler"; - private session: SATPSession; + private sessions: Map; private serverService: Stage0ServerService; private clientService: Stage0ClientService; private logger: Logger; constructor(ops: SATPHandlerOptions) { - this.session = ops.session; + this.sessions = ops.sessions; this.serverService = ops.serverService as Stage0ServerService; this.clientService = ops.clientService as Stage0ClientService; this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); this.logger.trace(`Initialized ${Stage0SATPHandler.CLASS_NAME}`); } + getHandlerSessions(): string[] { + return Array.from(this.sessions.keys()); + } getHandlerIdentifier(): string { return Stage0SATPHandler.CLASS_NAME; } - getSessionId(): string { - return this.session.getSessionData().id; - } + // async PreTransferProposalImplementation( + // req: PreTransferVerificationAndContextEstablishmentRequest, + // ): Promise { + // try { + // console.log("Received TransferProposalRequest", req); + // const sessionData = + // await this.serverService.checkPreTransferProposalRequestMessage( + // req, + // this.session, + // ); + // const message = await this.serverService.preTransferProposalResponse( + // req, + // this.session, + // ); + // console.log("message", message); + // console.log("Returning response", sessionData); + // const response = + // new PreTransferVerificationAndContextEstablishmentResponse(); + // return response; + // } catch (error) { + // console.error("Error handling TransferProposalRequest:", error); + // throw new Error("Failed to process TransferProposalRequest"); + // } + // } - async PreTransferProposalImplementation( - req: PreTransferVerificationAndContextEstablishmentRequest, - ): Promise { - try { - console.log("Received TransferProposalRequest", req); - const sessionData = - await this.serverService.checkPreTransferProposalRequestMessage( - req, - this.session, - ); - const message = await this.serverService.preTransferProposalResponse( - req, - this.session, - ); - console.log("message", message); - console.log("Returning response", sessionData); - const response = - new PreTransferVerificationAndContextEstablishmentResponse(); - return response; - } catch (error) { - console.error("Error handling TransferProposalRequest:", error); - throw new Error("Failed to process TransferProposalRequest"); - } - } - - async PreTransferCommenceImplementation( - req: PreTransferCommenceRequestMessage, - ): Promise { - try { - console.log("Received TransferCommenceRequest", req); - const sessionData = - await this.serverService.checkTransferCommenceRequestMessage( - req, - this.session, - ); - const message = await this.serverService.transferCommenceResponse( - req, - this.session, - ); - console.log("Returning response", message); - console.log("Returning response", sessionData); - const response = new PreTransferCommenceResponseMessage(); - return response; - } catch (error) { - console.error("Error handling TransferCommenceRequest:", error); - throw new Error("Failed to process TransferCommenceRequest"); - } - } + // async PreTransferCommenceImplementation( + // req: PreTransferCommenceRequestMessage, + // ): Promise { + // try { + // console.log("Received TransferCommenceRequest", req); + // const sessionData = + // await this.serverService.checkTransferCommenceRequestMessage( + // req, + // this.session, + // ); + // const message = await this.serverService.transferCommenceResponse( + // req, + // this.session, + // ); + // console.log("Returning response", message); + // console.log("Returning response", sessionData); + // const response = new PreTransferCommenceResponseMessage(); + // return response; + // } catch (error) { + // console.error("Error handling TransferCommenceRequest:", error); + // throw new Error("Failed to process TransferCommenceRequest"); + // } + // } setupRouter(router: ConnectRouter): void { - router.service(SatpStage0Service, { - preTransferProposalClaims: this.PreTransferProposalImplementation, - preTransferCommence: this.PreTransferCommenceImplementation, - }); + // router.service(SatpStage0Service, { + // preTransferProposalClaims: this.PreTransferProposalImplementation, + // preTransferCommence: this.PreTransferCommenceImplementation, + // }); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 884b514f36..51556ad706 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -15,14 +15,14 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; export class Stage1SATPHandler implements SATPHandler { public static readonly CLASS_NAME = "Stage1SATPHandler"; - private session: SATPSession; + private sessions: Map; private serverService: Stage1ServerService; private clientService: Stage1ClientService; private supportedDLTs: SupportedChain[]; private logger: Logger; constructor(ops: SATPHandlerOptions) { - this.session = ops.session; + this.sessions = ops.sessions; this.serverService = ops.serverService as Stage1ServerService; this.clientService = ops.clientService as Stage1ClientService; this.supportedDLTs = ops.supportedDLTs; @@ -34,8 +34,8 @@ export class Stage1SATPHandler implements SATPHandler { return Stage1SATPHandler.CLASS_NAME; } - getSessionId(): string { - return this.session.getSessionData().id; + getHandlerSessions(): string[] { + return Array.from(this.sessions.keys()); } public get Log(): Logger { @@ -51,15 +51,25 @@ export class Stage1SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Transfer Proposal...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + if (!req.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(req.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const sessionData = await this.serverService.checkTransferProposalRequestMessage( req, - this.session, + session, this.supportedDLTs, ); const message = await this.serverService.transferProposalResponse( req, - this.session, + session, ); this.Log.debug(`${fnTag}, Returning response: ${message}`); this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); @@ -82,14 +92,24 @@ export class Stage1SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Transfer Commence...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + if (!req.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(req.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const sessionData = await this.serverService.checkTransferCommenceRequestMessage( req, - this.session, + session, ); const message = await this.serverService.transferCommenceResponse( req, - this.session, + session, ); this.Log.debug(`${fnTag}, Returning response: ${message}`); this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); @@ -113,14 +133,22 @@ export class Stage1SATPHandler implements SATPHandler { } //client side - public async TransferProposalRequest(): Promise { + public async TransferProposalRequest( + sessionId: string, + ): Promise { const stepTag = `TransferProposalRequest()`; const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, Transfer Proposal Request...`); + + const session = this.sessions.get(sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const requestTransferProposal = await this.clientService.transferProposalRequest( - this.session, + session, this.supportedDLTs, ); @@ -145,16 +173,22 @@ export class Stage1SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Transfer Commence Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); + if (!response.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(response.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + await this.clientService.checkTransferProposalReceiptMessage( response, - this.session, + session, ); const requestTransferCommence = - await this.clientService.transferCommenceRequest( - response, - this.session, - ); + await this.clientService.transferCommenceRequest(response, session); if (!requestTransferCommence) { throw new Error(`${fnTag}, Failed to create TransferCommenceRequest`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index dcccccdd74..c722377e46 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -13,14 +13,14 @@ import { Stage2ClientService } from "../stage-services/client/stage2-client-serv import { TransferCommenceResponseMessage } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; export class Stage2SATPHandler implements SATPHandler { public static readonly CLASS_NAME = "Stage2SATPHandler"; - private session: SATPSession; + private sessions: Map; private serverService: Stage2ServerService; private clientService: Stage2ClientService; private supportedDLTs: SupportedChain[]; private logger: Logger; constructor(ops: SATPHandlerOptions) { - this.session = ops.session; + this.sessions = ops.sessions; this.serverService = ops.serverService as Stage2ServerService; this.clientService = ops.clientService as Stage2ClientService; this.supportedDLTs = ops.supportedDLTs; @@ -36,8 +36,8 @@ export class Stage2SATPHandler implements SATPHandler { return Stage2SATPHandler.CLASS_NAME; } - getSessionId(): string { - return this.session.getSessionData().id; + getHandlerSessions(): string[] { + return Array.from(this.sessions.keys()); } async LockAssertionImplementation( @@ -49,14 +49,21 @@ export class Stage2SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Lock Assertion...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + if (!req.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(req.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const sessionData = - await this.serverService.checkLockAssertionRequestMessage( - req, - this.session, - ); + await this.serverService.checkLockAssertionRequestMessage(req, session); const message = await this.serverService.lockAssertionResponse( req, - this.session, + session, ); this.Log.debug(`${fnTag}, Returning response: ${message}`); this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); @@ -85,16 +92,26 @@ export class Stage2SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Lock Assertion Request Message...`); this.Log.debug(`${fnTag}, Response: ${response}`); + + if (!response.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(response.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + await this.clientService.checkTransferCommenceResponseMessage( response, - this.session, + session, ); - await this.clientService.lockAsset(this.session); + await this.clientService.lockAsset(session); const request = await this.clientService.lockAssertionRequest( response, - this.session, + session, ); if (!request) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index c53f2b1941..658a86ed67 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -17,14 +17,14 @@ import { Stage3ClientService } from "../stage-services/client/stage3-client-serv export class Stage3SATPHandler implements SATPHandler { public static readonly CLASS_NAME = "Stage3SATPHandler"; - private session: SATPSession; + private sessions: Map; private clientService: Stage3ClientService; private serverService: Stage3ServerService; private supportedDLTs: SupportedChain[]; private logger: Logger; constructor(ops: SATPHandlerOptions) { - this.session = ops.session; + this.sessions = ops.sessions; this.serverService = ops.serverService as Stage3ServerService; this.clientService = ops.clientService as Stage3ClientService; this.supportedDLTs = ops.supportedDLTs; @@ -36,8 +36,8 @@ export class Stage3SATPHandler implements SATPHandler { return Stage3SATPHandler.CLASS_NAME; } - getSessionId(): string { - return this.session.getSessionData().id; + getHandlerSessions(): string[] { + return Array.from(this.sessions.keys()); } public get Log(): Logger { @@ -53,15 +53,25 @@ export class Stage3SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Commit Preparation...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + if (!req.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(req.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const sessionData = await this.serverService.checkCommitPreparationRequestMessage( req, - this.session, + session, ); - await this.serverService.mintAsset(this.session); + await this.serverService.mintAsset(session); - const message = await this.serverService.commitReady(req, this.session); + const message = await this.serverService.commitReady(req, session); this.Log.debug(`${fnTag}, Returning response: ${message}`); this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); @@ -84,18 +94,28 @@ export class Stage3SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Commit Final Assertion...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + if (!req.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(req.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const sessionData = await this.serverService.checkCommitFinalAssertionRequestMessage( req, - this.session, + session, ); - await this.serverService.assignAsset(this.session); + await this.serverService.assignAsset(session); const message = await this.serverService.commitFinalAcknowledgementReceiptResponse( req, - this.session, + session, ); this.Log.debug(`${fnTag}, Returning response: ${message}`); this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); @@ -118,10 +138,20 @@ export class Stage3SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Transfer Complete...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + if (!req.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(req.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + const sessionData = await this.serverService.checkTransferCompleteRequestMessage( req, - this.session, + session, ); this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); @@ -152,14 +182,24 @@ export class Stage3SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Commit Preparation Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); + + if (!response.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(response.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + await this.clientService.checkCommitReadyResponseMessage( response, - this.session, + session, ); const request = await this.clientService.commitPreparation( response, - this.session, + session, ); if (!request) { @@ -181,16 +221,26 @@ export class Stage3SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Commit Preparation Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); + + if (!response.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(response.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + await this.clientService.checkCommitReadyResponseMessage( response, - this.session, + session, ); - await this.clientService.burnAsset(this.session); + await this.clientService.burnAsset(session); const request = await this.clientService.commitFinalAssertion( response, - this.session, + session, ); if (!request) { @@ -214,14 +264,24 @@ export class Stage3SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Transfer Complete Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); + + if (!response.common?.sessionId) { + throw new Error(`${fnTag}, Session Id not found`); + } + + const session = this.sessions.get(response.common?.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + await this.clientService.checkCommitFinalAcknowledgementReceiptResponseMessage( response, - this.session, + session, ); const request = await this.clientService.transferComplete( response, - this.session, + session, ); if (!request) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts index 9097fef01e..aa09838890 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -56,7 +56,7 @@ export class Stage0ClientService extends SATPService { const stepTag = `transferProposalRequest()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined || !checkSessionData(sessionData)) { throw new Error(`${fnTag}, session data is not correctly initialized`); @@ -180,7 +180,7 @@ export class Stage0ClientService extends SATPService { sign(this.Signer, JSON.stringify(transferProposalRequestMessage)), ); - transferProposalRequestMessage.common.signature = messageSignature; + transferProposalRequestMessage.clientSignature = messageSignature; saveSignature(sessionData, MessageType.INIT_PROPOSAL, messageSignature); @@ -214,7 +214,7 @@ export class Stage0ClientService extends SATPService { throw new Error("Response or response.common is undefined"); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { throw new Error("Session data not loaded successfully"); @@ -248,7 +248,7 @@ export class Stage0ClientService extends SATPService { sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), ); - transferCommenceRequestMessage.common.signature = messageSignature; + transferCommenceRequestMessage.clientSignature = messageSignature; saveSignature( sessionData, @@ -296,7 +296,7 @@ export class Stage0ClientService extends SATPService { // const sessionId = response.common.sessionId; - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { throw new Error( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index f98305679f..a73e11a828 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -30,7 +30,6 @@ import { ISATPClientServiceOptions, ISATPServiceOptions, } from "../satp-service"; -import { ACCEPTANCE } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; export class Stage1ClientService extends SATPService { public static readonly SATP_STAGE = "1"; @@ -57,7 +56,7 @@ export class Stage1ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferProposalRequest...`); - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined || !checkSessionData(sessionData)) { throw new Error(`${fnTag}, session data is not correctly initialized`); @@ -81,7 +80,8 @@ export class Stage1ClientService extends SATPService { commonBody.version = sessionData.version; commonBody.messageType = MessageType.INIT_PROPOSAL; commonBody.sessionId = sessionData.id; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + commonBody.sequenceNumber = sessionData.lastSequenceNumber = + sessionData.lastSequenceNumber + BigInt(1); commonBody.resourceUrl = ""; if (sessionData.transferContextId != undefined) { @@ -128,12 +128,12 @@ export class Stage1ClientService extends SATPService { networkCapabilities.permissions = sessionData.permissions; } - if (sessionData.developerUrn != undefined) { + if (sessionData.developerUrn != "") { this.Log.info(`${fnTag}, Optional variable loaded: developerUrn...`); networkCapabilities.developerUrn = sessionData.developerUrn; } - if (sessionData.applicationProfile != undefined) { + if (sessionData.applicationProfile != "") { this.Log.info( `${fnTag}, Optional variable loaded: applicationProfile...`, ); @@ -145,7 +145,7 @@ export class Stage1ClientService extends SATPService { networkCapabilities.subsequentCalls = sessionData.subsequentCalls; } - if (sessionData.history != undefined) { + if (sessionData.history.length > 0) { this.Log.info(`${fnTag}, Optional variable loaded: history...`); networkCapabilities.history = sessionData.history; } @@ -162,14 +162,14 @@ export class Stage1ClientService extends SATPService { transferProposalRequestMessage.transferInitClaimsFormat = sessionData.transferClaimsFormat; } - if (sessionData.multipleCancelsAllowed != undefined) { + if (sessionData.multipleCancelsAllowed) { this.Log.info( `${fnTag}, Optional variable loaded: multipleCancelsAllowed...`, ); transferProposalRequestMessage.multipleCancelsAllowed = sessionData.multipleCancelsAllowed; } - if (sessionData.multipleClaimsAllowed != undefined) { + if (sessionData.multipleClaimsAllowed) { this.Log.info( `${fnTag}, Optional variable loaded: multipleClaimsAllowed...`, ); @@ -181,7 +181,7 @@ export class Stage1ClientService extends SATPService { sign(this.Signer, JSON.stringify(transferProposalRequestMessage)), ); - transferProposalRequestMessage.common.signature = messageSignature; + transferProposalRequestMessage.clientSignature = messageSignature; saveSignature(sessionData, MessageType.INIT_PROPOSAL, messageSignature); @@ -212,11 +212,11 @@ export class Stage1ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferCommenceRequest...`); - if (response.common == undefined) { + if (!response || !response.common) { throw new Error("Response or response.common is undefined"); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { throw new Error("Session data not loaded successfully"); @@ -227,21 +227,16 @@ export class Stage1ClientService extends SATPService { commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); - if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_ACCEPTED) { - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.INIT_RECEIPT, - ); - } else if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_CONDITIONAL) { - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.INIT_REJECT, - ); - } + //todo check when reject + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_RECEIPT, + ); commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; commonBody.sessionId = sessionData.id; + commonBody.transferContextId = sessionData.transferContextId; sessionData.lastSequenceNumber = commonBody.sequenceNumber; @@ -250,21 +245,13 @@ export class Stage1ClientService extends SATPService { transferCommenceRequestMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; - if (sessionData.transferContextId != undefined) { - transferCommenceRequestMessage.common.transferContextId = - sessionData.transferContextId; - } - - if (sessionData.clientTransferNumber != undefined) { - transferCommenceRequestMessage.clientTransferNumber = - sessionData.clientTransferNumber; - } + // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), ); - transferCommenceRequestMessage.common.signature = messageSignature; + transferCommenceRequestMessage.clientSignature = messageSignature; saveSignature( sessionData, @@ -311,7 +298,9 @@ export class Stage1ClientService extends SATPService { throw new Error(`${fnTag}, satp common body is missing required fields`); } - const sessionData = session.getSessionData(); + // const sessionId = response.common.sessionId; + + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { throw new Error( @@ -344,7 +333,7 @@ export class Stage1ClientService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) ) { throw new Error( - `${fnTag}, TransferProposalReceipt Message sequence number is wrong`, + `${fnTag}, TransferProposalReceipt Message sequence number is wrong got: ${response.common.sequenceNumber} expected to be ${sessionData.lastSequenceNumber + BigInt(1)}`, ); } @@ -382,15 +371,6 @@ export class Stage1ClientService extends SATPService { ); } - if ( - sessionData.transferContextId != undefined && - response.common.transferContextId != sessionData.transferContextId - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt transferContextId mismatch or not received`, - ); - } - if ( response.common.messageType == MessageType.INIT_REJECT && response.transferCounterClaims == undefined @@ -416,6 +396,9 @@ export class Stage1ClientService extends SATPService { return false; } } + + saveHash(sessionData, MessageType.INIT_RECEIPT, getHash(response)); + this.Log.info(`${fnTag}, TransferProposalReceipt passed all checks.`); return true; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 9a9887506d..63a743acc6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -3,6 +3,7 @@ import { SATP_VERSION } from "../../constants"; import { CommonSatp, LockAssertionClaim, + LockAssertionClaimFormat, MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; @@ -21,6 +22,23 @@ import { } from "../satp-service"; import { ISATPServiceOptions } from "../satp-service"; import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { + HashMissMatch, + MessageTypeMissMatch, + MissingBridgeManager, + MissingClientGatewayPubkey, + MissingLockAssertionClaim, + MissingLockAssertionClaimFormat, + MissingLockAssertionExpiration, + MissingSatpCommonBody, + MissingServerGatewayPubkey, + SATPVersionUnsupported, + SequenceNumberMissMatch, + SessionDataNotLoadedCorrectly, + SessionUndefined, + SignatureVerificationFailed, + TransferContextIdMissMatch, +} from "../errors"; export class Stage2ClientService extends SATPService { public static readonly SATP_STAGE = "2"; @@ -40,9 +58,7 @@ export class Stage2ClientService extends SATPService { super(commonOptions); if (ops.bridgeManager == undefined) { - throw new Error( - `${this.getServiceIdentifier()}#constructor(), bridgeManager is missing`, - ); + throw MissingBridgeManager(`${this.getServiceIdentifier()}#constructor`); } this.bridgeManager = ops.bridgeManager; } @@ -55,24 +71,25 @@ export class Stage2ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, lockAssertionRequest...`); + if (session == undefined) { + throw SessionUndefined(`${fnTag}`); + } + if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + throw MissingSatpCommonBody(`${fnTag}`); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(`${fnTag}`); } - saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); - const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.LOCK_ASSERT; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + sessionData.lastSequenceNumber = commonBody.sequenceNumber = + response.common.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, @@ -83,15 +100,26 @@ export class Stage2ClientService extends SATPService { commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - const lockAssertionRequestMessage = new LockAssertionRequestMessage(); lockAssertionRequestMessage.common = commonBody; + if (sessionData.lockAssertionClaim == undefined) { + throw MissingLockAssertionClaim(fnTag); + } lockAssertionRequestMessage.lockAssertionClaim = sessionData.lockAssertionClaim; + + if (sessionData.lockAssertionClaimFormat == undefined) { + throw MissingLockAssertionClaimFormat(fnTag); + } lockAssertionRequestMessage.lockAssertionClaimFormat = sessionData.lockAssertionClaimFormat; + if (sessionData.lockAssertionExpiration == undefined) { + throw MissingLockAssertionExpiration(fnTag); + } + + lockAssertionRequestMessage.lockAssertionExpiration = + sessionData.lockAssertionExpiration; if (sessionData.transferContextId != undefined) { lockAssertionRequestMessage.common.transferContextId = @@ -106,7 +134,7 @@ export class Stage2ClientService extends SATPService { sign(this.Signer, JSON.stringify(lockAssertionRequestMessage)), ); - lockAssertionRequestMessage.common.signature = messageSignature; + lockAssertionRequestMessage.clientSignature = messageSignature; saveSignature(sessionData, MessageType.LOCK_ASSERT, messageSignature); @@ -144,84 +172,78 @@ export class Stage2ClientService extends SATPService { response.common.sessionId == undefined || response.common.sequenceNumber == undefined || response.common.resourceUrl == undefined || - response.common.signature == undefined || + response.serverSignature == undefined || response.common.clientGatewayPubkey == undefined || response.common.serverGatewayPubkey == undefined || response.common.hashPreviousMessage == undefined ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); + throw MissingSatpCommonBody(fnTag); } if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); + throw SATPVersionUnsupported( + fnTag, + response.common.version, + SATP_VERSION, + ); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not load correctly`); + throw SessionDataNotLoadedCorrectly(fnTag); } if ( response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey ) { - throw new Error( - `${fnTag}, TransferCommenceResponse serverIdentity public key does not match the one that was sent`, - ); + throw MissingServerGatewayPubkey(fnTag); } if ( response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey ) { - throw new Error( - `${fnTag}, TransferCommenceResponse clientIdentity public key does not match the one that was sent`, - ); + throw MissingClientGatewayPubkey(fnTag); } if ( !verifySignature( this.Signer, - response.common, + response, response.common.serverGatewayPubkey, ) ) { - throw new Error( - `${fnTag}, TransferCommenceResponse message signature verification failed`, - ); + throw SignatureVerificationFailed(fnTag); } if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceResponse `, + throw MessageTypeMissMatch( + fnTag, + response.common.messageType.toString(), + MessageType.TRANSFER_COMMENCE_RESPONSE.toString(), ); } if ( + sessionData.lastSequenceNumber == undefined || response.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) + sessionData.lastSequenceNumber + BigInt(1) ) { - throw new Error( - `${fnTag}, TransferCommenceResponse sequence number is wrong`, + throw SequenceNumberMissMatch( + fnTag, + response.common.sequenceNumber, + sessionData.lastSequenceNumber, ); } if ( response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST) ) { - throw new Error( - `${fnTag}, TransferCommenceResponse previous message hash does not match the one that was sent`, + throw HashMissMatch( + fnTag, + response.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST), ); } @@ -229,8 +251,10 @@ export class Stage2ClientService extends SATPService { sessionData.transferContextId != undefined && response.common.transferContextId != sessionData.transferContextId ) { - throw new Error( - `${fnTag}, transferContextId does not match the one that was sent`, + throw TransferContextIdMissMatch( + fnTag, + response.common.transferContextId, + sessionData.transferContextId, ); } @@ -241,6 +265,12 @@ export class Stage2ClientService extends SATPService { sessionData.serverTransferNumber = response.serverTransferNumber; } + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + getHash(response), + ); + this.Log.info(`${fnTag}, TransferCommenceResponse passed all checks.`); } @@ -249,7 +279,10 @@ export class Stage2ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.info(`${fnTag}, Locking Asset...`); - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); + if (sessionData == undefined) { + throw SessionDataNotLoadedCorrectly(fnTag); + } const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountFromOriginator; @@ -258,19 +291,23 @@ export class Stage2ClientService extends SATPService { throw new Error(`${fnTag}, Asset ID is missing`); } - // const bridge = this.bridgeManager.getBridge( - // sessionData.senderGatewayNetworkId, - // ); + const bridge = this.bridgeManager.getBridge( + sessionData.senderGatewayNetworkId, + ); + + sessionData.lockAssertionClaim = new LockAssertionClaim(); + sessionData.lockAssertionClaim.receipt = await bridge.lockAsset( + assetId, + Number(amount), + ); + + sessionData.lockAssertionClaimFormat = new LockAssertionClaimFormat(); - // sessionData.lockAssertionClaim = new LockAssertionClaim(); - // sessionData.lockAssertionClaim.receipt = await bridge.lockAsset( - // assetId, - // Number(amount), - // ); + sessionData.lockAssertionExpiration = BigInt(99999999999); //todo implement - // sessionData.lockAssertionClaim.signature = bufArray2HexStr( - // sign(this.Signer, sessionData.lockAssertionClaim.receipt), - // ); + sessionData.lockAssertionClaim.signature = bufArray2HexStr( + sign(this.Signer, sessionData.lockAssertionClaim.receipt), + ); } catch (error) { throw new Error(`${fnTag}, Failed to process Lock Asset ${error}`); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 8f07ceffa7..cbd1bd0777 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -27,6 +27,23 @@ import { import { SATPSession } from "../../satp-session"; import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { + HashMissMatch, + MessageTypeMissMatch, + MissingAssignmentAssertionClaim, + MissingBridgeManager, + MissingBurnAssertionClaim, + MissingClientGatewayPubkey, + MissingMintAssertionClaim, + MissingSatpCommonBody, + MissingServerGatewayPubkey, + SATPVersionUnsupported, + SequenceNumberMissMatch, + SessionDataNotLoadedCorrectly, + SessionUndefined, + SignatureVerificationFailed, + TransferContextIdMissMatch, +} from "../errors"; export class Stage3ClientService extends SATPService { public static readonly SATP_STAGE = "3"; @@ -46,9 +63,7 @@ export class Stage3ClientService extends SATPService { super(commonOptions); if (ops.bridgeManager == undefined) { - throw new Error( - `${this.getServiceIdentifier()}#constructor(), bridgeManager is missing`, - ); + throw MissingBridgeManager(`${this.getServiceIdentifier()}#constructor`); } this.bridgeManager = ops.bridgeManager; } @@ -61,24 +76,25 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CommitPreparation...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); + if (response.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_PREPARE; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + sessionData.lastSequenceNumber = commonBody.sequenceNumber = + response.common.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.ASSERTION_RECEIPT, @@ -87,8 +103,6 @@ export class Stage3ClientService extends SATPService { commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - const commitPreparationRequestMessage = new CommitPreparationRequestMessage(); commitPreparationRequestMessage.common = commonBody; @@ -107,7 +121,7 @@ export class Stage3ClientService extends SATPService { sign(this.Signer, JSON.stringify(commitPreparationRequestMessage)), ); - commitPreparationRequestMessage.common.signature = messageSignature; + commitPreparationRequestMessage.clientSignature = messageSignature; saveSignature(sessionData, MessageType.COMMIT_PREPARE, messageSignature); @@ -139,25 +153,25 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CommitFinalAssertion...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); + if (response.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_FINAL; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - + sessionData.lastSequenceNumber = commonBody.sequenceNumber = + response.common.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.COMMIT_READY, @@ -167,12 +181,14 @@ export class Stage3ClientService extends SATPService { commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - const commitFinalAssertionRequestMessage = new CommitFinalAssertionRequestMessage(); commitFinalAssertionRequestMessage.common = commonBody; + if (sessionData.burnAssertionClaim == undefined) { + throw MissingBurnAssertionClaim(fnTag); + } + commitFinalAssertionRequestMessage.burnAssertionClaim = sessionData.burnAssertionClaim; @@ -195,7 +211,7 @@ export class Stage3ClientService extends SATPService { sign(this.Signer, JSON.stringify(commitFinalAssertionRequestMessage)), ); - commitFinalAssertionRequestMessage.common.signature = messageSignature; + commitFinalAssertionRequestMessage.clientSignature = messageSignature; saveSignature(sessionData, MessageType.COMMIT_FINAL, messageSignature); @@ -226,24 +242,25 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, TransferComplete...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); + if (response.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + sessionData.lastSequenceNumber = commonBody.sequenceNumber = + response.common.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, @@ -254,8 +271,6 @@ export class Stage3ClientService extends SATPService { commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - const transferCompleteRequestMessage = new TransferCompleteRequestMessage(); transferCompleteRequestMessage.common = commonBody; @@ -278,7 +293,7 @@ export class Stage3ClientService extends SATPService { sign(this.Signer, JSON.stringify(transferCompleteRequestMessage)), ); - transferCompleteRequestMessage.common.signature = messageSignature; + transferCompleteRequestMessage.clientSignature = messageSignature; saveSignature( sessionData, @@ -314,32 +329,37 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CheckLockAssertionReceiptMessage...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } + const sessionData = session.getClientSessionData(); - if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { - throw new Error(`${fnTag}, message type is not ASSERTION_RECEIPT`); + if ( + sessionData == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined + ) { + throw SessionDataNotLoadedCorrectly(fnTag); } - const sessionData = session.getSessionData(); + if (response.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, + if (response.common.version != SATP_VERSION) { + throw SATPVersionUnsupported( + fnTag, + response.common.version, + SATP_VERSION, ); } - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { + throw MessageTypeMissMatch( + fnTag, + response.common.messageType.toString(), + MessageType.ASSERTION_RECEIPT.toString(), ); } @@ -347,43 +367,55 @@ export class Stage3ClientService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) != response.common.sequenceNumber ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); + throw SequenceNumberMissMatch( + fnTag, + response.common.sequenceNumber, + sessionData.lastSequenceNumber + BigInt(1), + ); } if ( response.common.hashPreviousMessage != getMessageHash(sessionData, MessageType.LOCK_ASSERT) ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); + throw HashMissMatch( + fnTag, + response.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.LOCK_ASSERT), + ); } if ( sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey ) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if ( sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey ) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if ( !verifySignature( this.Signer, - response.common, + response, response.common.serverGatewayPubkey, ) ) { - throw new Error(`${fnTag}, message signature verification failed`); + throw SignatureVerificationFailed(fnTag); } if ( sessionData.transferContextId != undefined && response.common.transferContextId != sessionData.transferContextId ) { - throw new Error(`${fnTag}, transferContextId does not match`); + throw TransferContextIdMissMatch( + fnTag, + response.common.transferContextId, + sessionData.transferContextId, + ); } if ( @@ -396,13 +428,6 @@ export class Stage3ClientService extends SATPService { ); } - if ( - sessionData.transferContextId != undefined && - response.common.transferContextId != sessionData.transferContextId - ) { - throw new Error(`${fnTag}, transferContextId does not match`); - } - if ( sessionData.serverTransferNumber != undefined && response.serverTransferNumber != sessionData.serverTransferNumber @@ -413,6 +438,8 @@ export class Stage3ClientService extends SATPService { ); } + saveHash(sessionData, MessageType.ASSERTION_RECEIPT, getHash(response)); + this.Log.info(`${fnTag}, LockAssertionReceiptMessage passed all checks.`); } @@ -424,32 +451,37 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CommitReadyResponse...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } + const sessionData = session.getClientSessionData(); - if (response.common.messageType != MessageType.COMMIT_READY) { - throw new Error(`${fnTag}, message type is not COMMIT_READY`); + if ( + sessionData == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined + ) { + throw SessionDataNotLoadedCorrectly(fnTag); } - const sessionData = session.getSessionData(); + if (response.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, + if (response.common.version != SATP_VERSION) { + throw SATPVersionUnsupported( + fnTag, + response.common.version, + SATP_VERSION, ); } - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + if (response.common.messageType != MessageType.COMMIT_READY) { + throw MessageTypeMissMatch( + fnTag, + response.common.messageType.toString(), + MessageType.COMMIT_READY.toString(), ); } @@ -457,36 +489,44 @@ export class Stage3ClientService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) != response.common.sequenceNumber ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); + throw SequenceNumberMissMatch( + fnTag, + response.common.sequenceNumber, + sessionData.lastSequenceNumber + BigInt(1), + ); } if ( response.common.hashPreviousMessage != getMessageHash(sessionData, MessageType.COMMIT_PREPARE) ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); + throw HashMissMatch( + fnTag, + response.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.COMMIT_PREPARE), + ); } if ( sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey ) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if ( sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey ) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + throw MissingServerGatewayPubkey(fnTag); } if ( !verifySignature( this.Signer, - response.common, + response, response.common.serverGatewayPubkey, ) ) { - throw new Error(`${fnTag}, message signature verification failed`); + throw SignatureVerificationFailed(fnTag); } if (response.mintAssertionClaimFormat != undefined) { @@ -499,7 +539,7 @@ export class Stage3ClientService extends SATPService { if (response.mintAssertionClaim == undefined) { //todo - throw new Error(`${fnTag}, mintAssertionClaims is missing`); + throw MissingMintAssertionClaim(fnTag); } sessionData.mintAssertionClaim = response.mintAssertionClaim; @@ -508,7 +548,11 @@ export class Stage3ClientService extends SATPService { sessionData.transferContextId != undefined && response.common.transferContextId != sessionData.transferContextId ) { - throw new Error(`${fnTag}, transferContextId does not match`); + throw TransferContextIdMissMatch( + fnTag, + response.common.transferContextId, + sessionData.transferContextId, + ); } if ( @@ -521,6 +565,8 @@ export class Stage3ClientService extends SATPService { ); } + saveHash(sessionData, MessageType.COMMIT_READY, getHash(response)); + this.Log.info(`${fnTag}, CommitReadyResponseMessage passed all checks.`); } @@ -532,32 +578,37 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CommitFinalAcknowledgementReceipt...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - if (response.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } + const sessionData = session.getClientSessionData(); - if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { - throw new Error(`${fnTag}, message type is not ACK_COMMIT_FINAL`); + if ( + sessionData == undefined || + sessionData.lastSequenceNumber == undefined || + sessionData.version == undefined + ) { + throw SessionDataNotLoadedCorrectly(fnTag); } - const sessionData = session.getSessionData(); + if (response.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, + if (response.common.version != SATP_VERSION) { + throw SATPVersionUnsupported( + fnTag, + response.common.version, + SATP_VERSION, ); } - if ( - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${response.common.sessionId}`, + if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { + throw MessageTypeMissMatch( + fnTag, + response.common.messageType.toString(), + MessageType.ACK_COMMIT_FINAL.toString(), ); } @@ -565,47 +616,59 @@ export class Stage3ClientService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) != response.common.sequenceNumber ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); + throw SequenceNumberMissMatch( + fnTag, + response.common.sequenceNumber, + sessionData.lastSequenceNumber + BigInt(1), + ); } if ( response.common.hashPreviousMessage != getMessageHash(sessionData, MessageType.COMMIT_FINAL) ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); + throw HashMissMatch( + fnTag, + response.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.COMMIT_FINAL), + ); } if ( sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey ) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if ( sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey ) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + throw MissingServerGatewayPubkey(fnTag); } if ( !verifySignature( this.Signer, - response.common, + response, response.common.serverGatewayPubkey, ) ) { - throw new Error(`${fnTag}, message signature verification failed`); + throw SignatureVerificationFailed(fnTag); } if ( sessionData.transferContextId != undefined && response.common.transferContextId != sessionData.transferContextId ) { - throw new Error(`${fnTag}, transferContextId does not match`); + throw TransferContextIdMissMatch( + fnTag, + response.common.transferContextId, + sessionData.transferContextId, + ); } if (response.assignmentAssertionClaim == undefined) { - throw new Error(`${fnTag}, assignmentAssertionClaim is missing`); + throw MissingAssignmentAssertionClaim(fnTag); } sessionData.assignmentAssertionClaim = response.assignmentAssertionClaim; @@ -628,6 +691,8 @@ export class Stage3ClientService extends SATPService { ); } + saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(response)); + this.Log.info( `${fnTag}, CommitFinalAcknowledgementReceiptResponseMessage passed all checks.`, ); @@ -638,7 +703,10 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, Burning Asset...`); - const sessionData = session.getSessionData(); + const sessionData = session.getClientSessionData(); + if (sessionData == undefined) { + throw new Error(`${fnTag}, Session data is missing`); + } const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountFromOriginator; @@ -647,18 +715,18 @@ export class Stage3ClientService extends SATPService { throw new Error(`${fnTag}, Asset ID is missing`); } - // const bridge = this.bridgeManager.getBridge( - // sessionData.senderGatewayNetworkId, - // ); - - // sessionData.burnAssertionClaim = new BurnAssertionClaim(); - // sessionData.burnAssertionClaim.receipt = await bridge.burnAsset( - // assetId, - // Number(amount), - // ); - // sessionData.burnAssertionClaim.signature = bufArray2HexStr( - // sign(this.Signer, sessionData.burnAssertionClaim.receipt), - // ); + const bridge = this.bridgeManager.getBridge( + sessionData.senderGatewayNetworkId, + ); + + sessionData.burnAssertionClaim = new BurnAssertionClaim(); + sessionData.burnAssertionClaim.receipt = await bridge.burnAsset( + assetId, + Number(amount), + ); + sessionData.burnAssertionClaim.signature = bufArray2HexStr( + sign(this.Signer, sessionData.burnAssertionClaim.receipt), + ); } catch (error) { throw new Error(`${fnTag}, Failed to process Burn Asset ${error}`); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts new file mode 100644 index 0000000000..da52363ef3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts @@ -0,0 +1,117 @@ +export function MissingSatpCommonBody(fnTag: string): Error { + return new Error( + `${fnTag}, message satp common body is missing or is missing required fields`, + ); +} + +export function SessionUndefined(fnTag: string): Error { + return new Error(`${fnTag}, session undefined`); +} + +export function SessionDataNotLoadedCorrectly(fnTag: string): Error { + return new Error(`${fnTag}, session data was not load correctly`); +} + +export function SATPVersionUnsupported( + fnTag: string, + unsupported: string, + supported: string, +): Error { + return new Error( + `${fnTag}, unsupported SATP version \n received: ${unsupported}, supported: ${supported}`, + ); +} + +export function SignatureVerificationFailed(fnTag: string): Error { + return new Error(`${fnTag}, message signature verification failed`); +} + +export function MessageTypeMissMatch( + fnTag: string, + received: string, + expected: string, +): Error { + return new Error( + `${fnTag}, message type miss match \n received: ${received} \n expected: ${expected}`, + ); +} + +export function MissingTransferInitClaims(fnTag: string): Error { + return new Error(`${fnTag}, transferInitClaims missing or missmatch`); +} + +export function MissingNetworkCapabilities(fnTag: string): Error { + return new Error( + `${fnTag}, message does not contain network capabilities and parameters`, + ); +} + +export function DLTNotSupported(fnTag: string, dlt: string): Error { + return new Error(`${fnTag}, DLT not supported \n received: ${dlt}`); +} + +export function MissingServerGatewayPubkey(fnTag: string): Error { + return new Error(`${fnTag}, serverGatewayPubkey missing or missmatch`); +} + +export function MissingClientGatewayPubkey(fnTag: string): Error { + return new Error(`${fnTag}, clientGatewayPubkey missing or missmatch`); +} + +export function SequenceNumberMissMatch( + fnTag: string, + received: bigint, + expected: bigint, +): Error { + return new Error( + `${fnTag}, sequence number missmatch \n received: ${received} \n expected: ${expected}`, + ); +} + +export function HashMissMatch( + fnTag: string, + received: string, + expected: string, +): Error { + return new Error( + `${fnTag}, hash missmatch \n received: ${received} \n expected: ${expected}`, + ); +} + +export function TransferContextIdMissMatch( + fnTag: string, + received: string, + expected: string, +): Error { + return new Error( + `${fnTag}, transferContextId missing or missmatch \n received: ${received} \n expected: ${expected}`, + ); +} + +export function MissingBridgeManager(fnTag: string): Error { + return new Error(`${fnTag}, bridge manager missing`); +} + +export function MissingLockAssertionClaim(fnTag: string): Error { + return new Error(`${fnTag}, lockAssertionClaim missing`); +} + +export function MissingLockAssertionClaimFormat(fnTag: string): Error { + return new Error(`${fnTag}, lockAssertionClaimFormat missing`); +} + +export function MissingLockAssertionExpiration(fnTag: string): Error { + return new Error(`${fnTag}, lockAssertionExpiration missing`); +} + +export function MissingBurnAssertionClaim(fnTag: string): Error { + return new Error(`${fnTag}, burnAssertionClaim missing`); +} + +export function MissingMintAssertionClaim(fnTag: string): Error { + return new Error(`${fnTag}, mintAssertionClaim missing`); +} + +export function MissingAssignmentAssertionClaim(fnTag: string): Error { + return new Error(`${fnTag}, assignmentAssertionClaim missing`); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts index c7fb4ed40b..d7f79203e5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts @@ -13,7 +13,11 @@ import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; import { StrategyBesu } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-besu"; import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; import { BesuAsset, getVarTypes } from "./types/besu-asset"; -import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; import { InteractionsRequest } from "../../../generated/SATPWrapperContract"; import { getInteractionType } from "./types/asset"; import { InteractionData } from "./types/interact"; @@ -35,17 +39,17 @@ export class BesuBridge implements NetworkBridge { private options: IPluginLedgerConnectorBesuOptions; private config: BesuConfig; - constructor(besuConfig: BesuConfig) { + constructor(besuConfig: BesuConfig, level?: LogLevelDesc) { this.config = besuConfig; this.options = besuConfig.options; - const level = this.config.logLevel || "INFO"; const label = BesuBridge.CLASS_NAME; + level = level || "INFO"; this.log = LoggerProvider.getOrCreate({ label, level }); this.connector = new PluginLedgerConnectorBesu(besuConfig.options); this.bungee = new PluginBungeeHermes(besuConfig.bungeeOptions); - this.bungee.addStrategy(this.network, new StrategyBesu("INFO")); + this.bungee.addStrategy(this.network, new StrategyBesu(level)); } public async wrapAsset(asset: BesuAsset): Promise { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts index 59d7b860c6..6762fea50a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts @@ -33,12 +33,13 @@ export class FabricBridge implements NetworkBridge { options: IPluginLedgerConnectorFabricOptions; config: FabricConfig; - constructor(fabricConfig: FabricConfig, level: LogLevelDesc) { + constructor(fabricConfig: FabricConfig, level?: LogLevelDesc) { this.config = fabricConfig; this.options = fabricConfig.options; this.connector = new PluginLedgerConnectorFabric(fabricConfig.options); this.bungee = new PluginBungeeHermes(fabricConfig.bungeeOptions); - this.bungee.addStrategy(this.network, new StrategyFabric("INFO")); + level = level || "INFO"; + this.bungee.addStrategy(this.network, new StrategyFabric(level)); this.log = LoggerProvider.getOrCreate({ label: StrategyFabric.CLASS_NAME, level, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts index 55ace0586e..1e4f9daefd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -5,7 +5,7 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPBridgeConfig } from "../../types"; import { Asset } from "./types/asset"; -export class SatpBridgeManager implements BridgeManager { +export class SATPBridgeManager implements BridgeManager { public static readonly CLASS_NAME = "FabricBridgeManager"; private _log: Logger; @@ -15,9 +15,8 @@ export class SatpBridgeManager implements BridgeManager { } constructor(private config: SATPBridgeConfig) { - const level = "INFO"; - const label = SatpBridgeManager.CLASS_NAME; - this._log = LoggerProvider.getOrCreate({ level, label }); + const label = SATPBridgeManager.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level: config.logLevel, label }); } public async wrapAsset(asset: Asset): Promise { @@ -58,7 +57,7 @@ export class SatpBridgeManager implements BridgeManager { } public get className(): string { - return SatpBridgeManager.CLASS_NAME; + return SATPBridgeManager.CLASS_NAME; } public async lockAsset(assetId: string, amount: number): Promise { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts index 75812e5f11..089e049a32 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts @@ -7,8 +7,8 @@ import { import { SATPBridgesManager } from "../../gol/satp-bridges-manager"; export enum SATPServiceType { - Server, - Client, + Server = "Server", + Client = "Client", } export type ISATPServiceOptions = { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts index 0b659ab4ee..c099221770 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -66,7 +66,7 @@ export class Stage0ServerService extends SATPService { if (session == undefined) { throw new Error(`${fnTag}, session is undefined`); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { throw new Error( @@ -74,11 +74,11 @@ export class Stage0ServerService extends SATPService { ); } - saveSignature( - sessionData, - MessageType.PRE_INIT_PROPOSAL, - request.context.signature, - ); + // saveSignature( + // sessionData, + // MessageType.PRE_INIT_PROPOSAL, + // request.context.signature, + // ); sessionData.sourceLedgerAssetId = request.transferClaims.verifiedOriginatorEntityId; @@ -119,7 +119,7 @@ export class Stage0ServerService extends SATPService { sign(this.Signer, JSON.stringify(preTransferProposalReceiptMessage)), ); - preTransferProposalReceiptMessage.context.signature = messageSignature; + // preTransferProposalReceiptMessage.context.signature = messageSignature; saveSignature(sessionData, commonBody.messageType, messageSignature); @@ -161,7 +161,7 @@ export class Stage0ServerService extends SATPService { if (session == undefined) { throw new Error(`${fnTag}, session is undefined`); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { throw new Error( @@ -198,7 +198,7 @@ export class Stage0ServerService extends SATPService { sign(this.Signer, JSON.stringify(preTransferCommenceResponseMessage)), ); - preTransferCommenceResponseMessage.common.signature = messageSignature; + // preTransferCommenceResponseMessage.common.signature = messageSignature; saveSignature( sessionData, @@ -245,7 +245,7 @@ export class Stage0ServerService extends SATPService { // request.context.actionResponse == undefined || // request.context.payloadProfile == undefined || // request.context.applicationProfile == undefined || - request.context.signature == undefined || + // request.context.signature == undefined || request.context.clientGatewayPubkey == undefined || request.context.serverGatewayPubkey == undefined ) { @@ -282,8 +282,8 @@ export class Stage0ServerService extends SATPService { ); } - const senderId = request.transferClaims - .senderGatewayNetworkId as SupportedChain; + // const senderId = request.transferClaims + // .senderGatewayNetworkId as SupportedChain; this.Log.info(`TransferProposalRequest passed all checks.`); @@ -311,7 +311,7 @@ export class Stage0ServerService extends SATPService { // request.common.actionResponse == undefined || // request.common.payloadProfile == undefined || // request.common.applicationProfile == undefined || - request.common.signature == undefined || + // request.common.signature == undefined || request.common.clientGatewayPubkey == undefined || request.common.serverGatewayPubkey == undefined ) { @@ -327,7 +327,7 @@ export class Stage0ServerService extends SATPService { if (session == undefined) { throw new Error(`${fnTag}, session is undefined`); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { throw new Error( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index 0efb0df4a1..44401e0faa 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -8,7 +8,8 @@ import { MessageType, CommonSatp, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +// eslint-disable-next-line prettier/prettier +import { ACCEPTANCE, SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { SATP_VERSION } from "../../constants"; import { bufArray2HexStr, @@ -32,7 +33,22 @@ import { ISATPServerServiceOptions, ISATPServiceOptions, } from "../satp-service"; - +import { + DLTNotSupported, + HashMissMatch, + MessageTypeMissMatch, + MissingClientGatewayPubkey, + MissingNetworkCapabilities, + MissingSatpCommonBody, + MissingServerGatewayPubkey, + MissingTransferInitClaims, + SATPVersionUnsupported, + SequenceNumberMissMatch, + SessionDataNotLoadedCorrectly, + SessionUndefined, + SignatureVerificationFailed, + TransferContextIdMissMatch, +} from "../errors"; export class Stage1ServerService extends SATPService { public static readonly SATP_STAGE = "1"; public static readonly SERVICE_TYPE = SATPServiceType.Server; @@ -63,28 +79,18 @@ export class Stage1ServerService extends SATPService { request.transferInitClaims == undefined || request.networkCapabilities == undefined ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); + throw MissingSatpCommonBody(fnTag); } if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveSignature( - sessionData, - MessageType.INIT_PROPOSAL, - request.common.signature, - ); - sessionData.sourceLedgerAssetId = request.transferInitClaims.verifiedOriginatorEntityId; sessionData.recipientLedgerAssetId = @@ -92,18 +98,17 @@ export class Stage1ServerService extends SATPService { sessionData.hashTransferInitClaims = getHash(request.transferInitClaims); - saveHash(sessionData, MessageType.INIT_PROPOSAL, getHash(request)); - - sessionData.lastSequenceNumber = request.common.sequenceNumber + BigInt(1); - const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.sessionId = sessionData.id; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + sessionData.lastSequenceNumber = commonBody.sequenceNumber = + request.common.sequenceNumber + BigInt(1); commonBody.resourceUrl = request.common.resourceUrl; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.transferContextId = sessionData.transferContextId; + commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.INIT_PROPOSAL, @@ -119,6 +124,7 @@ export class Stage1ServerService extends SATPService { TimestampType.RECEIVED, ); + //TODO implement reject /* if (reject) { commonBody.messageType = MessageType.INIT_REJECT; @@ -139,17 +145,14 @@ export class Stage1ServerService extends SATPService { sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; } */ - - if (sessionData.transferContextId != undefined) { - transferProposalReceiptMessage.common.transferContextId = - sessionData.transferContextId; - } + commonBody.messageType = MessageType.INIT_RECEIPT; + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferProposalReceiptMessage)), ); - transferProposalReceiptMessage.common.signature = messageSignature; + transferProposalReceiptMessage.serverSignature = messageSignature; saveSignature(sessionData, commonBody.messageType, messageSignature); @@ -181,33 +184,24 @@ export class Stage1ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferCommenceResponse...`); - if (request.common == undefined) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - getHash(request), - ); + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.TRANSFER_COMMENCE_RESPONSE; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); + sessionData.lastSequenceNumber = commonBody.sequenceNumber = + request.common.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.TRANSFER_COMMENCE_REQUEST, @@ -216,28 +210,18 @@ export class Stage1ServerService extends SATPService { commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; commonBody.sessionId = sessionData.id; + commonBody.resourceUrl = request.common.resourceUrl; + commonBody.transferContextId = sessionData.transferContextId; const transferCommenceResponseMessage = new TransferCommenceResponseMessage(); transferCommenceResponseMessage.common = commonBody; - if (sessionData.transferContextId != undefined) { - transferCommenceResponseMessage.common.transferContextId = - sessionData.transferContextId; - } - - if (sessionData.serverTransferNumber != undefined) { - transferCommenceResponseMessage.serverTransferNumber = - sessionData.serverTransferNumber; - } - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferCommenceResponseMessage)), ); - transferCommenceResponseMessage.common.signature = messageSignature; + transferCommenceResponseMessage.serverSignature = messageSignature; saveSignature( sessionData, @@ -273,22 +257,13 @@ export class Stage1ServerService extends SATPService { const stepTag = `checkTransferProposalRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkTransferProposalRequestMessage...`); - if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); - } - const sessionData = session.getSessionData(); - - if (request.common == undefined) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); + throw SessionUndefined(fnTag); } + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } if ( @@ -298,55 +273,51 @@ export class Stage1ServerService extends SATPService { request.common.sessionId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - request.common.signature == undefined || + // request.common.actionResponse == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + request.clientSignature == undefined || request.common.clientGatewayPubkey == undefined || request.common.serverGatewayPubkey == undefined ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); + throw MissingSatpCommonBody(fnTag); } if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); + throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); } if ( - !verifySignature( - this.Signer, - request.common, - request.common.clientGatewayPubkey, - ) + !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) ) { - throw new Error( - `${fnTag}, TransferProposalRequest message signature verification failed`, - ); + throw SignatureVerificationFailed(fnTag); } if (request.common.messageType != MessageType.INIT_PROPOSAL) { - throw new Error( - `${fnTag}, wrong message type for TransferProposalRequest`, + throw MessageTypeMissMatch( + fnTag, + request.common.messageType.toString(), + MessageType.INIT_PROPOSAL.toString(), ); } if (request.transferInitClaims == undefined) { - throw new Error( - `${fnTag}, TransferProposalRequest message does not contain transfer initialization claims`, - ); + throw MissingTransferInitClaims(fnTag); } if (request.networkCapabilities == undefined) { - throw new Error( - `${fnTag}, TransferProposalRequest message does not contain network capabilities and parameters`, - ); + throw MissingNetworkCapabilities(fnTag); } + const senderId = request.transferInitClaims .senderGatewayNetworkId as SupportedChain; if (!supportedDLTs.includes(senderId)) { - throw new Error( //todo change this to the transferClaims check - `${fnTag}, recipient gateway dlt system is not supported by this gateway`, - ); + throw DLTNotSupported(fnTag, senderId); //todo change this to the transferClaims check + } + + if (!this.checkTransferClaims(request.transferInitClaims)) { + throw new Error(); } this.Log.info(`TransferProposalRequest passed all checks.`); @@ -379,10 +350,14 @@ export class Stage1ServerService extends SATPService { sessionData.accessControlProfile = request.networkCapabilities.accessControlProfile; - this.Log.info(`Session data created for session id ${sessionData.id}`); - if (!this.checkTransferClaims(request.transferInitClaims)) { - throw new Error(); - } + this.Log.info( + `${fnTag}, Session data created for session id ${sessionData.id}`, + ); + + saveHash(sessionData, MessageType.INIT_PROPOSAL, getHash(request)); + + this.Log.info(`${fnTag}, TransferProposalRequest passed all checks.`); + return sessionData; } @@ -400,33 +375,28 @@ export class Stage1ServerService extends SATPService { request.common.sessionId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - request.common.signature == undefined || + // request.common.actionResponse == undefined || + // request.common.payloadProfile == undefined || + // request.common.applicationProfile == undefined || + request.clientSignature == undefined || request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined || - request.common.hashPreviousMessage == undefined || - request.common.signature == undefined + request.common.serverGatewayPubkey == undefined ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); + throw MissingSatpCommonBody(fnTag); } if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); + throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); } if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } + const sessionData = session.getServerSessionData(); if ( + sessionData == undefined || sessionData.serverGatewayPubkey == undefined || sessionData.hashes == undefined || sessionData.hashes.stage1 == undefined || @@ -434,36 +404,28 @@ export class Stage1ServerService extends SATPService { undefined || sessionData.lastSequenceNumber == undefined ) { - throw new Error(`${fnTag}, session data was not load correctly`); + throw SessionDataNotLoadedCorrectly(fnTag); } if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest serverIdentity public key does not match the one that was sent`, - ); + throw MissingServerGatewayPubkey(fnTag); } if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest clientIdentity public key does not match the one that was sent`, - ); + throw MissingClientGatewayPubkey(fnTag); } if ( - !verifySignature( - this.Signer, - request.common, - request.common.clientGatewayPubkey, - ) + !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message signature verification failed`, - ); + throw SignatureVerificationFailed(fnTag); } if (request.common.messageType != MessageType.TRANSFER_COMMENCE_REQUEST) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceRequest`, + throw MessageTypeMissMatch( + fnTag, + request.common.messageType.toString(), + MessageType.TRANSFER_COMMENCE_REQUEST.toString(), ); } @@ -471,8 +433,10 @@ export class Stage1ServerService extends SATPService { request.common.sequenceNumber != sessionData.lastSequenceNumber + BigInt(1) ) { - throw new Error( - `${fnTag}, TransferCommenceRequest Message sequence number is wrong`, + throw SequenceNumberMissMatch( + fnTag, + request.common.sequenceNumber, + sessionData.lastSequenceNumber + BigInt(1), ); } @@ -480,8 +444,10 @@ export class Stage1ServerService extends SATPService { request.common.hashPreviousMessage != sessionData.hashes.stage1.transferProposalReceiptMessageHash ) { - throw new Error( - `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, + throw HashMissMatch( + fnTag, + request.common.hashPreviousMessage, + sessionData.hashes.stage1.transferProposalReceiptMessageHash, ); } @@ -489,25 +455,23 @@ export class Stage1ServerService extends SATPService { request.hashTransferInitClaims == undefined || request.hashTransferInitClaims != sessionData.hashTransferInitClaims ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message does not contain transfer claims`, - ); + throw MissingTransferInitClaims(fnTag); } if ( !verifySignature(this.Signer, request, sessionData.clientGatewayPubkey) ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message signature verification failed`, - ); + throw SignatureVerificationFailed(fnTag); } if ( sessionData.transferContextId != undefined && request.common.transferContextId != sessionData.transferContextId ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message transfer context id does not match the one that was sent`, + throw TransferContextIdMissMatch( + fnTag, + request.common.transferContextId, + sessionData.transferContextId, ); } @@ -518,7 +482,14 @@ export class Stage1ServerService extends SATPService { sessionData.clientTransferNumber = request.clientTransferNumber; } + saveHash( + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + getHash(request), + ); + this.Log.info(`${fnTag}, TransferCommenceRequest passed all checks.`); + return sessionData; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 5cdd9d06b5..1551c131d1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -22,6 +22,22 @@ import { ISATPServiceOptions, } from "../satp-service"; import { SATPSession } from "../../../core/satp-session"; +import { + HashMissMatch, + MessageTypeMissMatch, + MissingClientGatewayPubkey, + MissingLockAssertionClaim, + MissingLockAssertionClaimFormat, + MissingLockAssertionExpiration, + MissingSatpCommonBody, + MissingServerGatewayPubkey, + SATPVersionUnsupported, + SequenceNumberMissMatch, + SessionDataNotLoadedCorrectly, + SessionUndefined, + SignatureVerificationFailed, + TransferContextIdMissMatch, +} from "../errors"; export class Stage2ServerService extends SATPService { public static readonly SATP_STAGE = "2"; public static readonly SERVICE_TYPE = SATPServiceType.Server; @@ -45,19 +61,19 @@ export class Stage2ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, lockAssertionResponse...`); - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; @@ -90,7 +106,7 @@ export class Stage2ServerService extends SATPService { sign(this.Signer, JSON.stringify(lockAssertionReceiptMessage)), ); - lockAssertionReceiptMessage.common.signature = messageSignature; + lockAssertionReceiptMessage.serverSignature = messageSignature; saveSignature(sessionData, MessageType.ASSERTION_RECEIPT, messageSignature); @@ -122,6 +138,20 @@ export class Stage2ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkLockAssertionRequestMessage...`); + if (session == undefined) { + throw SessionUndefined(fnTag); + } + + const sessionData = session.getServerSessionData(); + + if ( + sessionData == undefined || + sessionData.serverGatewayPubkey == undefined || + sessionData.lastSequenceNumber == undefined + ) { + throw SessionDataNotLoadedCorrectly(fnTag); + } + if ( request.common == undefined || request.common.version == undefined || @@ -129,69 +159,48 @@ export class Stage2ServerService extends SATPService { request.common.sessionId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - request.common.signature == undefined || + request.clientSignature == undefined || request.common.clientGatewayPubkey == undefined || request.common.serverGatewayPubkey == undefined || request.common.hashPreviousMessage == undefined ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); + throw MissingSatpCommonBody(fnTag); } if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not load correctly`); + throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); } if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { - throw new Error( - `${fnTag}, LockAssertionRequest serverIdentity public key does not match the one that was sent`, - ); + throw MissingServerGatewayPubkey(fnTag); } if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { - throw new Error( - `${fnTag}, LockAssertionRequest clientIdentity public key does not match the one that was sent`, - ); + throw MissingClientGatewayPubkey(fnTag); } if ( - !verifySignature( - this.Signer, - request.common, - request.common.serverGatewayPubkey, - ) + !verifySignature(this.Signer, request, request.common.serverGatewayPubkey) ) { - throw new Error( - `${fnTag}, LockAssertionRequest message signature verification failed`, - ); + throw SignatureVerificationFailed(fnTag); } if (request.common.messageType != MessageType.LOCK_ASSERT) { - throw new Error(`${fnTag}, wrong message type for LockAssertionRequest`); + throw MessageTypeMissMatch( + fnTag, + request.common.messageType.toString(), + MessageType.LOCK_ASSERT.toString(), + ); } if ( request.common.sequenceNumber != sessionData.lastSequenceNumber + BigInt(1) ) { - throw new Error( - `${fnTag}, LockAssertionRequest Message sequence number is wrong`, + throw SequenceNumberMissMatch( + fnTag, + request.common.sequenceNumber, + sessionData.lastSequenceNumber, ); } @@ -199,31 +208,27 @@ export class Stage2ServerService extends SATPService { request.common.hashPreviousMessage != getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) ) { - throw new Error( - `${fnTag}, LockAssertionRequest previous message hash does not match the one that was sent`, + throw HashMissMatch( + fnTag, + request.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE), ); } if (request.lockAssertionClaim == undefined) { - throw new Error( - `${fnTag}, LockAssertionRequest lockAssertionClaim is missing`, - ); + throw MissingLockAssertionClaim(fnTag); } sessionData.lockAssertionClaim = request.lockAssertionClaim; if (request.lockAssertionClaimFormat == undefined) { - throw new Error( - `${fnTag}, LockAssertionRequest lockAssertionFormat is missing`, - ); + throw MissingLockAssertionClaimFormat(fnTag); } - sessionData.lockAssertionClaimFormat = request.lockAssertionClaimFormat; + sessionData.lockAssertionClaimFormat = request.lockAssertionClaimFormat; //todo check if valid if (request.lockAssertionExpiration == undefined) { - throw new Error( - `${fnTag}, LockAssertionRequest lockAssertionExpiration is missing`, - ); + throw MissingLockAssertionExpiration(fnTag); } sessionData.lockAssertionExpiration = request.lockAssertionExpiration; //todo check if expired @@ -232,8 +237,10 @@ export class Stage2ServerService extends SATPService { sessionData.transferContextId != undefined && request.common.transferContextId != sessionData.transferContextId ) { - throw new Error( - `${fnTag}, LockAssertionRequest transferContextId does not match the one that was sent`, + throw TransferContextIdMissMatch( + fnTag, + request.common.transferContextId, + sessionData.transferContextId, ); } @@ -247,6 +254,8 @@ export class Stage2ServerService extends SATPService { ); } + saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); + this.Log.info(`${fnTag}, LockAssertionRequest passed all checks.`); return sessionData; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 4d75c0b865..114f19b61d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -28,6 +28,23 @@ import { } from "../satp-service"; import { SATPSession } from "../../../core/satp-session"; import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { + HashMissMatch, + MessageTypeMissMatch, + MissingAssignmentAssertionClaim, + MissingBridgeManager, + MissingBurnAssertionClaim, + MissingClientGatewayPubkey, + MissingMintAssertionClaim, + MissingSatpCommonBody, + MissingServerGatewayPubkey, + SATPVersionUnsupported, + SequenceNumberMissMatch, + SessionDataNotLoadedCorrectly, + SessionUndefined, + SignatureVerificationFailed, + TransferContextIdMissMatch, +} from "../errors"; export class Stage3ServerService extends SATPService { public static readonly SATP_STAGE = "3"; @@ -46,9 +63,7 @@ export class Stage3ServerService extends SATPService { }; super(commonOptions); if (ops.bridgeManager == undefined) { - throw new Error( - `${this.getServiceIdentifier()}#constructor() bridgeManager is required`, - ); + throw MissingBridgeManager(`${this.getServiceIdentifier()}#constructor`); } this.bridgeManager = ops.bridgeManager; } @@ -61,19 +76,19 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, commitReady...`); - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; @@ -92,6 +107,10 @@ export class Stage3ServerService extends SATPService { const commitReadyMessage = new CommitReadyResponseMessage(); commitReadyMessage.common = commonBody; + if (sessionData.mintAssertionClaim == undefined) { + throw MissingMintAssertionClaim(fnTag); + } + commitReadyMessage.mintAssertionClaim = sessionData.mintAssertionClaim; commitReadyMessage.mintAssertionClaimFormat = sessionData.mintAssertionClaimFormat; @@ -110,6 +129,8 @@ export class Stage3ServerService extends SATPService { sign(this.Signer, JSON.stringify(commitReadyMessage)), ); + commitReadyMessage.serverSignature = messageSignature; + saveSignature(sessionData, MessageType.COMMIT_READY, messageSignature); saveHash( @@ -139,19 +160,19 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, commitFinalAcknowledgementReceiptResponse...`); - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); + throw SessionDataNotLoadedCorrectly(fnTag); } - saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; @@ -171,6 +192,10 @@ export class Stage3ServerService extends SATPService { new CommitFinalAcknowledgementReceiptResponseMessage(); commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; + if (sessionData.assignmentAssertionClaim == undefined) { + throw MissingAssignmentAssertionClaim(fnTag); + } + commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = sessionData.assignmentAssertionClaim; @@ -196,9 +221,16 @@ export class Stage3ServerService extends SATPService { ), ); + commitFinalAcknowledgementReceiptResponseMessage.serverSignature = + messageSignature; + saveSignature(sessionData, MessageType.ACK_COMMIT_FINAL, messageSignature); - saveHash(sessionData, MessageType.ACK_COMMIT_FINAL, getHash(request)); + saveHash( + sessionData, + MessageType.ACK_COMMIT_FINAL, + getHash(commitFinalAcknowledgementReceiptResponseMessage), + ); /* await storeLog(gateway, { @@ -223,33 +255,34 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkCommitPreparationRequestMessage...`); - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - if (request.common.messageType != MessageType.COMMIT_PREPARE) { - throw new Error(`${fnTag}, message type is not COMMIT_PREPARE`); - } - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } + const sessionData = session.getServerSessionData(); if ( + sessionData == undefined || sessionData.lastSequenceNumber == undefined || sessionData.version == undefined || sessionData.signatures == undefined ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + throw SessionDataNotLoadedCorrectly(fnTag); + } + + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } + + if (request.common.version != SATP_VERSION) { + throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); + } + + if (request.common.messageType != MessageType.COMMIT_PREPARE) { + throw MessageTypeMissMatch( + fnTag, + request.common.messageType.toString(), + MessageType.COMMIT_PREPARE.toString(), ); } @@ -257,39 +290,47 @@ export class Stage3ServerService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) != request.common.sequenceNumber ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); + throw SequenceNumberMissMatch( + fnTag, + sessionData.lastSequenceNumber, + request.common.sequenceNumber, + ); } if ( getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != request.common.hashPreviousMessage ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); + throw HashMissMatch( + fnTag, + request.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT), + ); } if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + throw MissingServerGatewayPubkey(fnTag); } if ( - !verifySignature( - this.Signer, - request.common, - request.common.clientGatewayPubkey, - ) + !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) ) { - throw new Error(`${fnTag}, message signature verification failed`); + throw SignatureVerificationFailed(fnTag); } if ( sessionData.transferContextId != undefined && request.common.transferContextId != sessionData.transferContextId ) { - throw new Error(`${fnTag}, transferContextId does not match`); + throw TransferContextIdMissMatch( + fnTag, + request.common.transferContextId, + sessionData.transferContextId, + ); } if ( @@ -302,6 +343,8 @@ export class Stage3ServerService extends SATPService { ); } + saveHash(sessionData, MessageType.COMMIT_PREPARE, getHash(request)); + this.Log.info( `${fnTag}, CommitPreparationRequestMessage passed all checks.`, ); @@ -317,33 +360,34 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkCommitFinalAssertionRequestMessage...`); - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (request.common.messageType != MessageType.COMMIT_FINAL) { - throw new Error(`${fnTag}, message type is not COMMIT_FINAL`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } + const sessionData = session.getServerSessionData(); if ( + sessionData == undefined || sessionData.lastSequenceNumber == undefined || sessionData.version == undefined || sessionData.signatures == undefined ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + throw SessionDataNotLoadedCorrectly(fnTag); + } + + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } + + if (request.common.version != SATP_VERSION) { + throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); + } + + if (request.common.messageType != MessageType.COMMIT_FINAL) { + throw MessageTypeMissMatch( + fnTag, + request.common.messageType.toString(), + MessageType.COMMIT_FINAL.toString(), ); } @@ -351,43 +395,51 @@ export class Stage3ServerService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) != request.common.sequenceNumber ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); + throw SequenceNumberMissMatch( + fnTag, + request.common.sequenceNumber, + sessionData.lastSequenceNumber, + ); } if ( getMessageHash(sessionData, MessageType.COMMIT_READY) != request.common.hashPreviousMessage ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); + throw HashMissMatch( + fnTag, + request.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.COMMIT_READY), + ); } if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + throw MissingServerGatewayPubkey(fnTag); } if ( - !verifySignature( - this.Signer, - request.common, - request.common.clientGatewayPubkey, - ) + !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) ) { - throw new Error(`${fnTag}, message signature verification failed`); + throw SignatureVerificationFailed(fnTag); } if ( sessionData.transferContextId != undefined && request.common.transferContextId != sessionData.transferContextId ) { - throw new Error(`${fnTag}, transferContextId does not match`); + throw TransferContextIdMissMatch( + fnTag, + request.common.transferContextId, + sessionData.transferContextId, + ); } //todo check burn if (request.burnAssertionClaim == undefined) { - throw new Error(`${fnTag}, mintAssertionClaims is missing`); + throw MissingBurnAssertionClaim(fnTag); } sessionData.burnAssertionClaim = request.burnAssertionClaim; @@ -409,6 +461,8 @@ export class Stage3ServerService extends SATPService { ); } + saveHash(sessionData, MessageType.COMMIT_FINAL, getHash(request)); + this.Log.info( `${fnTag}, CommitFinalAssertionRequestMessage passed all checks.`, ); @@ -424,37 +478,34 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkTransferCompleteRequestMessage...`); - if (request.common == undefined) { - throw new Error(`${fnTag}, message common body is missing`); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, message version is not ${SATP_VERSION}`); - } - - if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { - throw new Error(`${fnTag}, message type is not COMMIT_TRANSFER_COMPLETE`); + if (session == undefined) { + throw SessionUndefined(fnTag); } - this.Log.info( - `${fnTag}, TransferCompleteRequestMessage passed all checks.`, - ); - - const sessionData = session.getSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } + const sessionData = session.getServerSessionData(); if ( + sessionData == undefined || sessionData.lastSequenceNumber == undefined || sessionData.version == undefined || sessionData.signatures == undefined ) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, + throw SessionDataNotLoadedCorrectly(fnTag); + } + + if (request.common == undefined) { + throw MissingSatpCommonBody(fnTag); + } + + if (request.common.version != SATP_VERSION) { + throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); + } + + if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { + throw MessageTypeMissMatch( + fnTag, + request.common.messageType.toString(), + MessageType.COMMIT_TRANSFER_COMPLETE.toString(), ); } @@ -462,39 +513,47 @@ export class Stage3ServerService extends SATPService { sessionData.lastSequenceNumber + BigInt(1) != request.common.sequenceNumber ) { - throw new Error(`${fnTag}, sequenceNumber does not match`); + throw SequenceNumberMissMatch( + fnTag, + request.common.sequenceNumber, + sessionData.lastSequenceNumber, + ); } if ( - getMessageHash(sessionData, MessageType.COMMIT_FINAL) != + getMessageHash(sessionData, MessageType.ACK_COMMIT_FINAL) != request.common.hashPreviousMessage ) { - throw new Error(`${fnTag}, hashPreviousMessage does not match`); + throw HashMissMatch( + fnTag, + request.common.hashPreviousMessage, + getMessageHash(sessionData, MessageType.ACK_COMMIT_FINAL), + ); } if ( getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST) != request.hashTransferCommence ) { - throw new Error(`${fnTag}, hashTransferCommence does not match`); + throw HashMissMatch( + fnTag, + request.hashTransferCommence, + getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST), + ); } if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw new Error(`${fnTag}, clientGatewayPubkey does not match`); + throw MissingClientGatewayPubkey(fnTag); } if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw new Error(`${fnTag}, serverGatewayPubkey does not match`); + throw MissingServerGatewayPubkey(fnTag); } if ( - !verifySignature( - this.Signer, - request.common, - request.common.clientGatewayPubkey, - ) + !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) ) { - throw new Error(`${fnTag}, message signature verification failed`); + throw SignatureVerificationFailed(fnTag); } this.Log.info( @@ -505,7 +564,11 @@ export class Stage3ServerService extends SATPService { sessionData.transferContextId != undefined && request.common.transferContextId != sessionData.transferContextId ) { - throw new Error(`${fnTag}, transferContextId does not match`); + throw TransferContextIdMissMatch( + fnTag, + request.common.transferContextId, + sessionData.transferContextId, + ); } if ( @@ -521,6 +584,12 @@ export class Stage3ServerService extends SATPService { `${fnTag}, TransferCompleteRequestMessage passed all checks.`, ); + saveHash( + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, + getHash(request), + ); + return sessionData; } async mintAsset(session: SATPSession): Promise { @@ -528,7 +597,10 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.info(`${fnTag}, Minting Asset...`); - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); + if (sessionData == undefined) { + throw new Error(`${fnTag}, Session data not found`); + } const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountToBeneficiary; @@ -539,18 +611,18 @@ export class Stage3ServerService extends SATPService { throw new Error(`${fnTag}, Asset ID is missing`); } - // const bridge = this.bridgeManager.getBridge( - // sessionData.recipientGatewayNetworkId, - // ); - - // sessionData.mintAssertionClaim = new MintAssertionClaim(); - // sessionData.mintAssertionClaim.receipt = await bridge.mintAsset( - // assetId, - // Number(amount), - // ); - // sessionData.mintAssertionClaim.signature = bufArray2HexStr( - // sign(this.Signer, sessionData.mintAssertionClaim.receipt), - // ); + const bridge = this.bridgeManager.getBridge( + sessionData.recipientGatewayNetworkId, + ); + + sessionData.mintAssertionClaim = new MintAssertionClaim(); + sessionData.mintAssertionClaim.receipt = await bridge.mintAsset( + assetId, + Number(amount), + ); + sessionData.mintAssertionClaim.signature = bufArray2HexStr( + sign(this.Signer, sessionData.mintAssertionClaim.receipt), + ); } catch (error) { throw new Error(`${fnTag}, Failed to process Mint Asset ${error}`); } @@ -561,7 +633,10 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.info(`${fnTag}, Assigning Asset...`); - const sessionData = session.getSessionData(); + const sessionData = session.getServerSessionData(); + if (sessionData == undefined) { + throw new Error(`${fnTag}, Session data not found`); + } const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountToBeneficiary; const recipient = sessionData.transferInitClaims?.beneficiaryPubkey; @@ -576,19 +651,19 @@ export class Stage3ServerService extends SATPService { throw new Error(`${fnTag}, Asset ID is missing`); } - // const bridge = this.bridgeManager.getBridge( - // sessionData.recipientGatewayNetworkId, - // ); - - // sessionData.assignmentAssertionClaim = new AssignmentAssertionClaim(); - // sessionData.assignmentAssertionClaim.receipt = await bridge.assignAsset( - // assetId, - // recipient, - // Number(amount), - // ); - // sessionData.assignmentAssertionClaim.signature = bufArray2HexStr( - // sign(this.Signer, sessionData.assignmentAssertionClaim.receipt), - // ); + const bridge = this.bridgeManager.getBridge( + sessionData.recipientGatewayNetworkId, + ); + + sessionData.assignmentAssertionClaim = new AssignmentAssertionClaim(); + sessionData.assignmentAssertionClaim.receipt = await bridge.assignAsset( + assetId, + recipient, + Number(amount), + ); + sessionData.assignmentAssertionClaim.signature = bufArray2HexStr( + sign(this.Signer, sessionData.assignmentAssertionClaim.receipt), + ); } catch (error) { throw new Error(`${fnTag}, Failed to process Assign Asset ${error}`); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 5c61c8c6d7..386a6f06b9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -124,4 +124,5 @@ export interface RemoteLog { export interface SATPBridgeConfig { network: NetworkBridge; + logLevel?: LogLevelDesc; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index fc168aa4a4..d5de011eb6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -17,19 +17,37 @@ export function verifySignature( obj: any, pubKey: string, ): boolean { - const sourceSignature = new Uint8Array(Buffer.from(obj.signature, "hex")); - const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); - - const signature = obj.signature; - obj.signature = ""; - if ( - !objectSigner.verify(JSON.stringify(obj), sourceSignature, sourcePubkey) - ) { - return false; - } + const copy = JSON.parse(JSON.stringify(obj)); - obj.signature = signature; - return true; + if (copy.clientSignature) { + const sourceSignature = new Uint8Array( + Buffer.from(copy.clientSignature, "hex"), + ); + const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); + + copy.clientSignature = ""; + if ( + !objectSigner.verify(JSON.stringify(copy), sourceSignature, sourcePubkey) + ) { + return false; + } + return true; + } else if (copy.serverSignature) { + const sourceSignature = new Uint8Array( + Buffer.from(copy.serverSignature, "hex"), + ); + const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); + + copy.serverSignature = ""; + if ( + !objectSigner.verify(JSON.stringify(copy), sourceSignature, sourcePubkey) + ) { + return false; + } + return true; + } else { + throw new Error("No signature found in the object"); + } } export async function storeProof( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index d1814315ae..ac13a62b54 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -1030,22 +1030,17 @@ export class CommonSatp extends Message { payloadHash = ""; /** - * @generated from field: string signature = 15; - */ - signature = ""; - - /** - * @generated from field: string client_gateway_pubkey = 16; + * @generated from field: string client_gateway_pubkey = 15; */ clientGatewayPubkey = ""; /** - * @generated from field: string server_gateway_pubkey = 17; + * @generated from field: string server_gateway_pubkey = 16; */ serverGatewayPubkey = ""; /** - * @generated from field: string hash_previous_message = 18; + * @generated from field: string hash_previous_message = 17; */ hashPreviousMessage = ""; @@ -1068,10 +1063,9 @@ export class CommonSatp extends Message { { no: 11, name: "payload_profile", kind: "message", T: PayloadProfile }, { no: 13, name: "payload", kind: "message", T: Payload }, { no: 14, name: "payload_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 15, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 16, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 17, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 18, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 15, name: "client_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 16, name: "server_gateway_pubkey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 17, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): CommonSatp { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 8825e5e212..6ec707d790 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -260,7 +260,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 45; */ - lockAssertionClaim = ""; + lockAssertionClaim?: LockAssertionClaim; /** * @generated from field: cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 46; @@ -280,7 +280,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 49; */ - burnAssertionClaim = ""; + burnAssertionClaim?: BurnAssertionClaim; /** * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 50; @@ -290,7 +290,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 51; */ - assignmentAssertionClaim = ""; + assignmentAssertionClaim?: AssignmentAssertionClaim; /** * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 52; @@ -328,9 +328,9 @@ export class SessionData extends Message { serverTransferNumber = ""; /** - * @generated from field: string lock_assertion_expiration = 59; + * @generated from field: uint64 lock_assertion_expiration = 59; */ - lockAssertionExpiration = ""; + lockAssertionExpiration = protoInt64.zero; /** * @generated from field: cacti.satp.v02.common.AssetProfile asset_profile = 60; @@ -403,7 +403,7 @@ export class SessionData extends Message { { no: 56, name: "transfer_claims_format", kind: "message", T: TransferClaimsFormat }, { no: 57, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 58, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 59, name: "lock_assertion_expiration", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 59, name: "lock_assertion_expiration", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 60, name: "asset_profile", kind: "message", T: AssetProfile }, ]); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts index 4a6e7dc4cd..498ac7b5e2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -41,6 +41,11 @@ export class TransferProposalRequestMessage extends Message) { super(); proto3.util.initPartial(data, this); @@ -55,6 +60,7 @@ export class TransferProposalRequestMessage extends Message): TransferProposalRequestMessage { @@ -98,6 +104,11 @@ export class TransferProposalReceiptMessage extends Message) { super(); proto3.util.initPartial(data, this); @@ -110,6 +121,7 @@ export class TransferProposalReceiptMessage extends Message): TransferProposalReceiptMessage { @@ -148,6 +160,11 @@ export class TransferCommenceRequestMessage extends Message) { super(); proto3.util.initPartial(data, this); @@ -159,6 +176,7 @@ export class TransferCommenceRequestMessage extends Message): TransferCommenceRequestMessage { @@ -192,6 +210,11 @@ export class TransferCommenceResponseMessage extends Message) { super(); proto3.util.initPartial(data, this); @@ -202,6 +225,7 @@ export class TransferCommenceResponseMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, { no: 2, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TransferCommenceResponseMessage { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts index f646d858e9..2dcddb32d3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -4,7 +4,7 @@ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; import { CommonSatp, LockAssertionClaim, LockAssertionClaimFormat } from "./common/message_pb.js"; /** @@ -17,9 +17,9 @@ export class LockAssertionRequestMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "burn_assertion_claim", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, { no: 3, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, { no: 4, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -188,9 +188,9 @@ export class CommitFinalAcknowledgementReceiptResponseMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "assignment_assertion_claim", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, { no: 3, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, { no: 4, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts index 22f63d434f..9ca79aafd9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts @@ -3,21 +3,21 @@ import { Logger, LoggerProvider, } from "@hyperledger/cactus-common"; -// import { BesuBridge } from "../core/stage-services/satp-bridge/besu-bridge"; -// import { FabricBridge } from "../core/stage-services/satp-bridge/fabric-bridge"; -// import { NetworkBridge } from "../core/stage-services/satp-bridge/network-bridge-interface"; -// import { SATPBridge } from "../core/stage-services/satp-bridge/satp-bridge"; -import { SupportedChain } from "../core/types"; -// import { -// FabricConfig, -// BesuConfig, -// BridgeConfig, -// } from "../types/blockchain-interaction"; +import { BesuBridge } from "../core/stage-services/satp-bridge/besu-bridge"; +import { FabricBridge } from "../core/stage-services/satp-bridge/fabric-bridge"; +import { NetworkBridge } from "../core/stage-services/satp-bridge/network-bridge"; +import { SATPBridgeManager } from "../core/stage-services/satp-bridge/satp-bridge-manager"; +import { SATPBridgeConfig, SupportedChain } from "../core/types"; +import { + FabricConfig, + BesuConfig, + NetworkConfig, +} from "../types/blockchain-interaction"; import { ValidatorOptions } from "class-validator"; export interface ISATPBridgesOptions { logLevel?: LogLevelDesc; - //networks: BridgeConfig[]; + networks: NetworkConfig[]; validationOptions?: ValidatorOptions; supportedDLTs: SupportedChain[]; } @@ -25,68 +25,81 @@ export interface ISATPBridgesOptions { export class SATPBridgesManager { static CLASS_NAME: string = "SATPBridgesManager"; - // bridges: Map = new Map(); + bridges: Map = new Map< + string, + SATPBridgeManager + >(); + log: Logger; + level: LogLevelDesc | undefined; + constructor(private config: ISATPBridgesOptions) { this.log = LoggerProvider.getOrCreate({ level: config.logLevel, label: SATPBridgesManager.CLASS_NAME, }); - // config.networks.map((bridgeConfig) => { - // let bridge: NetworkBridge; - // switch (bridgeConfig.network) { - // case SupportedChain.FABRIC: - // bridge = new FabricBridge(bridgeConfig as FabricConfig); - // break; - // case SupportedChain.BESU: - // bridge = new BesuBridge(bridgeConfig as BesuConfig); - // break; - // default: - // throw new Error(`Unsupported network: ${bridgeConfig.network}`); - // } - // const config: SATPBridgeConfig = { - // network: bridge, - // logLevel: bridgeConfig.logLevel, - // }; - // const satp = new SATPBridge(config); - // this.bridges.set(bridgeConfig.network, satp); - // }); + this.level = this.config.logLevel; + + this.log.debug(`Creating ${SATPBridgesManager.CLASS_NAME}...`); + + config.networks.map((bridgeConfig) => { + let bridge: NetworkBridge; + switch (bridgeConfig.network) { + case SupportedChain.FABRIC: + bridge = new FabricBridge(bridgeConfig as FabricConfig, this.level); + break; + case SupportedChain.BESU: + bridge = new BesuBridge(bridgeConfig as BesuConfig); + break; + default: + throw new Error(`Unsupported network: ${bridgeConfig.network}`); + } + + this.log.debug(`Creating 2 ${SATPBridgesManager.CLASS_NAME}...`); + + const config: SATPBridgeConfig = { + network: bridge, + logLevel: this.level, + }; + const satp = new SATPBridgeManager(config); + this.bridges.set(bridgeConfig.network, satp); + }); } - // public getBridge(network: string): SATPBridge { - // if (!this.bridges.has(network)) { - // throw new Error(`Bridge for network ${network} not found`); - // } - // return this.bridges.get(network) as SATPBridge; - // } + public getBridge(network: string): SATPBridgeManager { + if (!this.bridges.has(network)) { + throw new Error(`Bridge for network ${network} not found`); + } + return this.bridges.get(network) as SATPBridgeManager; + } - // public getBridgesList(): string[] { - // return Array.from(this.bridges.keys()); - // } + public getBridgesList(): string[] { + return Array.from(this.bridges.keys()); + } - // public addBridgeFromConfig(bridgeConfig: BridgeConfig) { - // let bridge: NetworkBridge; - // switch (bridgeConfig.network) { - // case SupportedChain.FABRIC: - // bridge = new FabricBridge(bridgeConfig as FabricConfig); - // break; - // case SupportedChain.BESU: - // bridge = new BesuBridge(bridgeConfig as BesuConfig); - // break; - // default: - // throw new Error(`Unsupported network: ${bridgeConfig.network}`); - // } - // const config: SATPBridgeConfig = { - // network: bridge, - // logLevel: bridgeConfig.logLevel, - // }; - // const satp = new SATPBridge(config); - // this.bridges.set(bridgeConfig.network, satp); - // } + public addBridgeFromConfig(networkConfig: NetworkConfig) { + let bridge: NetworkBridge; + switch (networkConfig.network) { + case SupportedChain.FABRIC: + bridge = new FabricBridge(networkConfig as FabricConfig, this.level); + break; + case SupportedChain.BESU: + bridge = new BesuBridge(networkConfig as BesuConfig, this.level); + break; + default: + throw new Error(`Unsupported network: ${networkConfig.network}`); + } + const config: SATPBridgeConfig = { + network: bridge, + logLevel: this.level, + }; + const satp = new SATPBridgeManager(config); + this.bridges.set(networkConfig.network, satp); + } - // public addBridge(network: string, bridge: SATPBridge): void { - // this.bridges.set(network, bridge); - // } + public addBridge(network: string, bridge: SATPBridgeManager): void { + this.bridges.set(network, bridge); + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index ccbf22ab88..89f8a5d702 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -108,7 +108,7 @@ export class SATPManager { this.handlers = this.initializeHandlers(handlersClasses, handlersOptions); for (const handler of this.handlers) { - const sessionId = mockSession.getSessionData().id; + const sessionId = mockSession.getSessionId(); const handlerMap = this.satpHandlers.get(sessionId); if (handlerMap == undefined) { this.satpHandlers.set(sessionId, new Map()); @@ -164,6 +164,10 @@ export class SATPManager { return this.satpHandlers.get(sessionId); } + public getHandlers(): SATPHandler[] { + return this.handlers; + } + public getOrCreateSession( sessionId?: string, contextID?: string, @@ -179,8 +183,12 @@ export class SATPManager { } private createNewSession(contextID: string): SATPSession { - const session = new SATPSession({ contextID: contextID }); - this.sessions?.set(session.getSessionData().id, session); + const session = new SATPSession({ + contextID: contextID, + server: true, //todo implement the separation of server and client + client: true, + }); + this.sessions?.set(session.getSessionId(), session); return session; } @@ -230,11 +238,13 @@ export class SATPManager { serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], level: LogLevelDesc = "DEBUG", ): SATPHandlerOptions[] { + const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlerOptions()`; + this.logger.info(`${fnTag}, Initializing handlers options...`); + const handlersOptions: SATPHandlerOptions[] = []; - const mockSession = this.getOrCreateSession(); try { - for (let i = 0; i < serviceClasses.length / 2; i++) { + for (let i = 1; i <= serviceClasses.length / 2; i++) { const serverService = this.getServiceByStage( SATPServiceType.Server, i.toString(), @@ -246,7 +256,7 @@ export class SATPManager { ); const handlerOptions: SATPHandlerOptions = { - session: mockSession, + sessions: this.sessions, serverService: serverService, clientService: clientService, supportedDLTs: this.supportedDLTs, @@ -265,6 +275,8 @@ export class SATPManager { handlersClasses: (new (options: SATPHandlerOptions) => SATPHandler)[], handlersOptions: SATPHandlerOptions[], ): SATPHandler[] { + const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlers()`; + this.logger.info(`${fnTag}, Initializing handlers...`); const handlers: SATPHandler[] = []; if (handlersClasses.length === 0) { throw new Error("No handlers provided"); @@ -276,7 +288,8 @@ export class SATPManager { if (handlersClasses.length !== handlersOptions.length) { throw new Error( - "Number of handler classes and options do not match. Each handler class needs an options object.", + `Number of handler classes and options do not match. Each handler class needs an options object.\n \ + Classes: ${handlersClasses.length}, Options: ${handlersOptions.length}`, ); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index 55bee1be83..c0b71257dd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -126,7 +126,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { const bridgesManagerOptions: ISATPBridgesOptions = { logLevel: this.config.logLevel, supportedDLTs: this.config.gid!.supportedDLTs, - // networks: [], //todo add networks + networks: [], //todo add networks }; if (this.config.gid) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts index f4a83a82e3..948da87f4a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts @@ -9,22 +9,23 @@ import { Web3SigningCredential, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; -import { LogLevelDesc } from "@hyperledger/cactus-common"; // inject gateway, get connectors export type SATPLedgerConnector = string; // TODO Define lock interfaces and strategy pattern for locking (as function of locking blockchain) (see what smart contract implementations return) -export interface FabricConfig { +export interface NetworkConfig { + network: string; +} +export interface FabricConfig extends NetworkConfig { signingCredential: FabricSigningCredential; channelName: string; contractName: string; options: IPluginLedgerConnectorFabricOptions; bungeeOptions: IPluginBungeeHermesOptions; - logLevel?: LogLevelDesc; } -export interface BesuConfig { +export interface BesuConfig extends NetworkConfig { keychainId: string; signingCredential: Web3SigningCredential; contractName: string; @@ -32,7 +33,6 @@ export interface BesuConfig { gas: number; options: IPluginLedgerConnectorBesuOptions; bungeeOptions: IPluginBungeeHermesOptions; - logLevel?: LogLevelDesc; } export interface TransactionResponse { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index 9fbe9a40dc..6c441a0e1e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -15,11 +15,11 @@ import { export interface SATPHandler { setupRouter(router: ConnectRouter): void; getHandlerIdentifier(): string; - getSessionId(): string; + getHandlerSessions(): string[]; } export interface SATPHandlerOptions { - session: SATPSession; + sessions: Map; serverService: SATPService; clientService: SATPService; supportedDLTs: SupportedChain[]; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts index 099c368482..3e4adb859a 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts @@ -206,11 +206,12 @@ beforeAll(async () => { pluginBungeeHermesOptions = { keyPair: Secp256k1Keys.generateKeyPairsBuffer(), instanceId: uuidv4(), - //pluginRegistry: new PluginRegistry(), + pluginRegistry: new PluginRegistry(), logLevel, }; besuConfig = { + network: "BESU", keychainId: keychainPlugin2.getKeychainId(), signingCredential: { ethAccount: bridgeEthAccount.address, @@ -222,7 +223,6 @@ beforeAll(async () => { options: besuOptions, bungeeOptions: pluginBungeeHermesOptions, gas: 9999999999999, - logLevel, }; const giveRoleRes = await testing_connector.invokeContract({ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts index fea1d1122b..d9c6f82b23 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts @@ -629,7 +629,7 @@ beforeAll(async () => { pluginBungeeFabricOptions = { keyPair: Secp256k1Keys.generateKeyPairsBuffer(), instanceId: uuidv4(), - //pluginRegistry: new PluginRegistry(), + pluginRegistry: new PluginRegistry(), logLevel, }; @@ -651,12 +651,12 @@ beforeAll(async () => { }; fabricConfig = { + network: "FABRIC", signingCredential: bridgeFabricSigningCredential, channelName: fabricChannelName, contractName: satpWrapperContractName, options: pluginOptionsFabricBridge, bungeeOptions: pluginBungeeFabricOptions, - logLevel, } as FabricConfig; // networkDetails = { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts deleted file mode 100644 index 5350589cad..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts +++ /dev/null @@ -1,145 +0,0 @@ -import "jest-extended"; -import { - Containers, - pruneDockerAllIfGithubAction, -} from "@hyperledger/cactus-test-tooling"; -import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; - -import { SATPBridgeConfig } from "../../../main/typescript/core/types"; -import { SatpBridgeManager } from "../../../main/typescript/core/stage-services/satp-bridge/satp-bridge-manager"; -import { NetworkBridge } from "../../../main/typescript/core/stage-services/satp-bridge/network-bridge"; -import { - Asset, - TokenType, -} from "../../../main/typescript/core/stage-services/satp-bridge/types/asset"; - -const logLevel: LogLevelDesc = "DEBUG"; -const logger = LoggerProvider.getOrCreate({ - level: logLevel, - label: "satp-bridge-manager-test", -}); - -let network: NetworkBridge; - -beforeAll(async () => { - pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - logger.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); - - network = { - runTransaction: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - getReceipt: jest.fn().mockReturnValue("testReceipt"), - network: "testNetwork", - networkName: function (): string { - return this.network; - }, - wrapAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - unwrapAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - lockAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - unlockAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - mintAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - burnAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - assignAsset: jest.fn().mockReturnValue({ - transactionId: "testTransaction", - output: "testOutput", - }), - }; -}); - -describe("SATP bridge function testing", () => { - test("Lock asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const assetId = "testAssetId"; - const receipt = await bridgeManager.lockAsset(assetId, 2); - expect(receipt).toBeDefined(); - }); - test("Unlock asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const assetId = "testAssetId"; - const receipt = await bridgeManager.unlockAsset(assetId, 2); - expect(receipt).toBeDefined(); - }); - test("Mint asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const assetId = "testAssetId"; - const receipt = await bridgeManager.mintAsset(assetId, 2); - expect(receipt).toBeDefined(); - }); - test("Burn asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const assetId = "testAssetId"; - const receipt = await bridgeManager.burnAsset(assetId, 2); - expect(receipt).toBeDefined(); - }); - test("Assign asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const assetId = "testAssetId"; - const recipient = "testRecipient"; - const receipt = await bridgeManager.assignAsset(assetId, recipient, 2); - expect(receipt).toBeDefined(); - }); - test("Verify wrap asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const asset: Asset = { - tokenId: "testAssetId", - tokenType: TokenType.ERC20, - owner: "testOwner", - amount: 0, - ontology: "", - }; - const receipt = await bridgeManager.wrapAsset(asset); - expect(receipt).toBeDefined(); - }); - - test("Verify unwrap asset function works", async () => { - const bridgeConfig: SATPBridgeConfig = { network }; - const bridgeManager = new SatpBridgeManager(bridgeConfig); - const assetId = "testAssetId"; - const receipt = await bridgeManager.unwrapAsset(assetId); - expect(receipt).toBeDefined(); - }); -}); - -afterAll(async () => { - await pruneDockerAllIfGithubAction({ logLevel }) - .then(() => { - logger.info("Pruning throw OK"); - }) - .catch(async () => { - await Containers.logDiagnostics({ logLevel }); - fail("Pruning didn't throw OK"); - }); -}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts new file mode 100644 index 0000000000..a93038dc2f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts @@ -0,0 +1,736 @@ +import { + JsObjectSigner, + LogLevelDesc, + Secp256k1Keys, +} from "@hyperledger/cactus-common"; +import { SATPBridgesManager } from "../../../main/typescript/gol/satp-bridges-manager"; +import { SupportedChain } from "../../../main/typescript/core/types"; + +import { + ISATPServiceOptions, + SATPService, + SATPServiceType, +} from "../../../main/typescript/core/stage-services/satp-service"; +import { Stage1ClientService } from "../../../main/typescript/core/stage-services/client/stage1-client-service"; +import { Stage2ClientService } from "../../../main/typescript/core/stage-services/client/stage2-client-service"; +import { Stage3ClientService } from "../../../main/typescript/core/stage-services/client/stage3-client-service"; +import { Stage1ServerService } from "../../../main/typescript/core/stage-services/server/stage1-server-service"; +import { Stage2ServerService } from "../../../main/typescript/core/stage-services/server/stage2-server-service"; +import { Stage3ServerService } from "../../../main/typescript/core/stage-services/server/stage3-server-service"; +import { SATPSession } from "../../../main/typescript/core/satp-session"; +import { SATP_VERSION } from "../../../main/typescript/core/constants"; +import { + AssignmentAssertionClaim, + BurnAssertionClaim, + CredentialProfile, + LockAssertionClaim, + LockType, + MessageType, + MintAssertionClaim, + SignatureAlgorithm, +} from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { + TransferCommenceRequestMessage, + TransferCommenceResponseMessage, + TransferProposalReceiptMessage, + TransferProposalRequestMessage, +} from "../../../main/typescript/generated/proto/cacti/satp/v02/stage_1_pb"; +import { + LockAssertionRequestMessage, + LockAssertionReceiptMessage, +} from "../../../main/typescript/generated/proto/cacti/satp/v02/stage_2_pb"; +import { SessionData } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/session_pb"; +import { + CommitFinalAcknowledgementReceiptResponseMessage, + CommitFinalAssertionRequestMessage, + CommitPreparationRequestMessage, + CommitReadyResponseMessage, + TransferCompleteRequestMessage, +} from "../../../main/typescript/generated/proto/cacti/satp/v02/stage_3_pb"; + +import { getMessageHash } from "../../../main/typescript/core/session-utils"; + +const logLevel: LogLevelDesc = "DEBUG"; + +const serviceClasses = [ + Stage1ServerService, + Stage1ClientService, + Stage2ServerService, + Stage2ClientService, + Stage3ServerService, + Stage3ClientService, +]; + +const keyPairs = Secp256k1Keys.generateKeyPairsBuffer(); + +const signer = new JsObjectSigner({ + privateKey: keyPairs.privateKey, +}); + +const supportedDLTs = [SupportedChain.FABRIC, SupportedChain.BESU]; + +let bridgeManager: SATPBridgesManager; + +let mockSession: SATPSession; + +let satpClientService1: Stage1ClientService; +let satpClientService2: Stage2ClientService; +let satpClientService3: Stage3ClientService; +let satpServerService1: Stage1ServerService; +let satpServerService2: Stage2ServerService; +let satpServerService3: Stage3ServerService; + +let transferProposalRequestMessage: TransferProposalRequestMessage; +let transferProposalResponseMessage: TransferProposalReceiptMessage; +let transferCommenceRequestMessage: TransferCommenceRequestMessage; +let transferCommenceResponseMessage: TransferCommenceResponseMessage; +let lockAssertionRequestMessage: LockAssertionRequestMessage; +let lockAssertionReceiptMessage: LockAssertionReceiptMessage; +let commitPreparationRequestMessage: CommitPreparationRequestMessage; +let commitReadyResponseMessage: CommitReadyResponseMessage; +let commitFinalAssertionRequestMessage: CommitFinalAssertionRequestMessage; +let commitFinalAcknowledgementReceiptResponseMessage: CommitFinalAcknowledgementReceiptResponseMessage; +let transferCompleteRequestMessage: TransferCompleteRequestMessage; + +beforeAll(async () => { + bridgeManager = new SATPBridgesManager({ + supportedDLTs: supportedDLTs, + networks: [], + logLevel: logLevel, + }); + + mockSession = new SATPSession({ + contextID: "MOCK_CONTEXT_ID", + server: true, + client: true, + }); + + const serviceOptions = initializeServiceOptions( + serviceClasses, + logLevel, + "SATPService", + ); + + for (const service of initializeServices(serviceClasses, serviceOptions)) { + switch (service.constructor) { + case Stage1ServerService: + satpServerService1 = service as Stage1ServerService; + break; + case Stage1ClientService: + satpClientService1 = service as Stage1ClientService; + break; + case Stage2ServerService: + satpServerService2 = service as Stage2ServerService; + break; + case Stage2ClientService: + satpClientService2 = service as Stage2ClientService; + break; + case Stage3ServerService: + satpServerService3 = service as Stage3ServerService; + break; + case Stage3ClientService: + satpClientService3 = service as Stage3ClientService; + break; + default: + break; + } + } +}); +describe("SATP Services Testing", () => { + it("Service1Client transferProposalRequest", async () => { + expect(satpClientService1).toBeDefined(); + expect(satpClientService1.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#1`, + ); + + const sessionData = mockSession.getClientSessionData(); + if (!sessionData) { + throw new Error("Session data not found"); + } + + sessionData.version = SATP_VERSION; + sessionData.clientGatewayPubkey = Buffer.from(keyPairs.publicKey).toString( + "hex", + ); + sessionData.serverGatewayPubkey = sessionData.clientGatewayPubkey; + sessionData.originatorPubkey = sessionData.clientGatewayPubkey; + sessionData.beneficiaryPubkey = sessionData.clientGatewayPubkey; + sessionData.digitalAssetId = "MOCK_DIGITAL_ASSET_ID"; + sessionData.assetProfileId = "MOCK_ASSET_PROFILE_ID"; + sessionData.verifiedOriginatorEntityId = + "MOCK_VERIFIED_ORIGINATOR_ENTITY_ID"; + sessionData.verifiedBeneficiaryEntityId = + "MOCK_VERIFIED_BENEFICIARY_ENTITY_ID"; + sessionData.receiverGatewayOwnerId = "MOCK_RECEIVER_GATEWAY_OWNER_ID"; + sessionData.senderGatewayOwnerId = SupportedChain.FABRIC; + sessionData.senderGatewayNetworkId = SupportedChain.BESU; + sessionData.signatureAlgorithm = SignatureAlgorithm.RSA; + sessionData.lockType = LockType.FAUCET; + sessionData.lockExpirationTime = BigInt(1000); + sessionData.credentialProfile = CredentialProfile.X509; + sessionData.loggingProfile = "MOCK_LOGGING_PROFILE"; + sessionData.accessControlProfile = "MOCK_ACCESS_CONTROL_PROFILE"; + + transferProposalRequestMessage = + (await satpClientService1.transferProposalRequest( + mockSession, + supportedDLTs, + )) as TransferProposalRequestMessage; + + expect(transferProposalRequestMessage).toBeInstanceOf( + TransferProposalRequestMessage, + ); + + expect(transferProposalRequestMessage.common?.transferContextId).toBe( + sessionData.transferContextId, + ); + expect(transferProposalRequestMessage.common?.version).toBe(SATP_VERSION); + expect(transferProposalRequestMessage.common?.clientGatewayPubkey).toBe( + sessionData.clientGatewayPubkey, + ); + expect(transferProposalRequestMessage.common?.serverGatewayPubkey).toBe( + sessionData.serverGatewayPubkey, + ); + expect( + transferProposalRequestMessage.transferInitClaims?.originatorPubkey, + ).toBe(sessionData.originatorPubkey); + expect( + transferProposalRequestMessage.transferInitClaims?.beneficiaryPubkey, + ).toBe(sessionData.beneficiaryPubkey); + expect( + transferProposalRequestMessage.transferInitClaims?.digitalAssetId, + ).toBe("MOCK_DIGITAL_ASSET_ID"); + expect( + transferProposalRequestMessage.transferInitClaims?.assetProfileId, + ).toBe("MOCK_ASSET_PROFILE_ID"); + expect( + transferProposalRequestMessage.transferInitClaims + ?.verifiedOriginatorEntityId, + ).toBe("MOCK_VERIFIED_ORIGINATOR_ENTITY_ID"); + expect( + transferProposalRequestMessage.transferInitClaims + ?.verifiedBeneficiaryEntityId, + ).toBe("MOCK_VERIFIED_BENEFICIARY_ENTITY_ID"); + expect( + transferProposalRequestMessage.transferInitClaims?.receiverGatewayOwnerId, + ).toBe("MOCK_RECEIVER_GATEWAY_OWNER_ID"); + expect( + transferProposalRequestMessage.transferInitClaims?.senderGatewayOwnerId, + ).toBe(SupportedChain.FABRIC); + expect( + transferProposalRequestMessage.transferInitClaims?.senderGatewayNetworkId, + ).toBe(SupportedChain.BESU); + expect( + transferProposalRequestMessage.networkCapabilities?.signatureAlgorithm, + ).toBe(SignatureAlgorithm.RSA); + expect(transferProposalRequestMessage.networkCapabilities?.lockType).toBe( + LockType.FAUCET, + ); + expect( + transferProposalRequestMessage.networkCapabilities?.lockExpirationTime, + ).toBe(BigInt(1000)); + expect( + transferProposalRequestMessage.networkCapabilities?.credentialProfile, + ).toBe(CredentialProfile.X509); + expect( + transferProposalRequestMessage.networkCapabilities?.loggingProfile, + ).toBe("MOCK_LOGGING_PROFILE"); + expect( + transferProposalRequestMessage.networkCapabilities?.accessControlProfile, + ).toBe("MOCK_ACCESS_CONTROL_PROFILE"); + }); + it("Service1Server checkTransferProposalRequestMessage", async () => { + expect(satpServerService1).toBeDefined(); + expect(satpServerService1.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#1`, + ); + + await satpServerService1.checkTransferProposalRequestMessage( + transferProposalRequestMessage, + mockSession, + supportedDLTs, + ); + }); + it("Service1Server transferProposalResponse", async () => { + transferProposalResponseMessage = + (await satpServerService1.transferProposalResponse( + transferProposalRequestMessage, + mockSession, + )) as TransferProposalReceiptMessage; + + expect(transferProposalResponseMessage).toBeInstanceOf( + TransferProposalReceiptMessage, + ); + expect(transferProposalResponseMessage.common?.transferContextId).toBe( + transferProposalRequestMessage.common?.transferContextId, + ); + expect(transferProposalResponseMessage.common?.version).toBe(SATP_VERSION); + expect(transferProposalResponseMessage.common?.clientGatewayPubkey).toBe( + transferProposalRequestMessage.common?.clientGatewayPubkey, + ); + expect(transferProposalResponseMessage.common?.serverGatewayPubkey).toBe( + transferProposalRequestMessage.common?.serverGatewayPubkey, + ); + expect( + transferProposalResponseMessage.hashTransferInitClaims, + ).toBeDefined(); + }); + it("Service1Client checkTransferProposalReceiptMessage", async () => { + await satpClientService1.checkTransferProposalReceiptMessage( + transferProposalResponseMessage, + mockSession, + ); + }); + it("Service1Client transferCommenceRequest", async () => { + transferCommenceRequestMessage = + (await satpClientService1.transferCommenceRequest( + transferProposalResponseMessage, + mockSession, + )) as TransferCommenceRequestMessage; + + expect(transferCommenceRequestMessage).toBeInstanceOf( + TransferCommenceRequestMessage, + ); + expect(transferCommenceRequestMessage.common?.messageType).toBe( + MessageType.TRANSFER_COMMENCE_REQUEST, + ); + expect(transferCommenceRequestMessage.common?.transferContextId).toBe( + transferProposalResponseMessage.common?.transferContextId, + ); + expect(transferCommenceRequestMessage.common?.version).toBe(SATP_VERSION); + expect(transferCommenceRequestMessage.common?.clientGatewayPubkey).toBe( + transferProposalResponseMessage.common?.clientGatewayPubkey, + ); + expect(transferCommenceRequestMessage.common?.serverGatewayPubkey).toBe( + transferProposalResponseMessage.common?.serverGatewayPubkey, + ); + expect(transferCommenceRequestMessage.hashTransferInitClaims).toBeDefined(); + expect( + transferCommenceRequestMessage.common?.hashPreviousMessage, + ).toBeDefined(); + }); + + it("Service1Server checkTransferCommenceRequestMessage", async () => { + expect(satpServerService1).toBeDefined(); + expect(satpServerService1.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#1`, + ); + + await satpServerService1.checkTransferCommenceRequestMessage( + transferCommenceRequestMessage, + mockSession, + ); + }); + + it("Service1Server transferCommenceResponse", async () => { + transferCommenceResponseMessage = + (await satpServerService1.transferCommenceResponse( + transferCommenceRequestMessage, + mockSession, + )) as TransferCommenceResponseMessage; + + expect(transferCommenceResponseMessage).toBeDefined(); + expect(transferCommenceResponseMessage.common?.transferContextId).toBe( + transferCommenceRequestMessage.common?.transferContextId, + ); + expect(transferCommenceResponseMessage.common?.messageType).toBe( + MessageType.TRANSFER_COMMENCE_RESPONSE, + ); + expect(transferCommenceResponseMessage.common?.clientGatewayPubkey).toBe( + transferCommenceRequestMessage.common?.clientGatewayPubkey, + ); + expect(transferCommenceResponseMessage.common?.serverGatewayPubkey).toBe( + transferCommenceRequestMessage.common?.serverGatewayPubkey, + ); + expect( + transferCommenceResponseMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(transferCommenceResponseMessage.serverSignature).toBeDefined(); + }); + it("Service2Client checkTransferCommenceResponseMessage", async () => { + expect(satpClientService2).toBeDefined(); + expect(satpClientService2.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#2`, + ); + + await satpClientService2.checkTransferCommenceResponseMessage( + transferCommenceResponseMessage, + mockSession, + ); + }); + it("Service2Client lockAssertionRequest", async () => { + //mock claims + + (mockSession.getClientSessionData() as SessionData).lockAssertionClaim = + new LockAssertionClaim(); + + ( + mockSession.getClientSessionData() as SessionData + ).lockAssertionClaimFormat = new LockAssertionClaim(); + + (mockSession.getClientSessionData() as SessionData).lockExpirationTime = + BigInt(1000); + + lockAssertionRequestMessage = + (await satpClientService2.lockAssertionRequest( + transferCommenceResponseMessage, + mockSession, + )) as LockAssertionRequestMessage; + + expect(lockAssertionRequestMessage).toBeDefined(); + expect(lockAssertionRequestMessage.common?.messageType).toBe( + MessageType.LOCK_ASSERT, + ); + expect(lockAssertionRequestMessage.common?.transferContextId).toBe( + transferCommenceResponseMessage.common?.transferContextId, + ); + expect(lockAssertionRequestMessage.common?.version).toBe(SATP_VERSION); + expect(lockAssertionRequestMessage.common?.clientGatewayPubkey).toBe( + transferCommenceResponseMessage.common?.clientGatewayPubkey, + ); + expect(lockAssertionRequestMessage.common?.serverGatewayPubkey).toBe( + transferCommenceResponseMessage.common?.serverGatewayPubkey, + ); + expect( + lockAssertionRequestMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(lockAssertionRequestMessage.common?.sequenceNumber).toBeDefined(); + expect(lockAssertionRequestMessage.lockAssertionClaim).toBeDefined(); + expect(lockAssertionRequestMessage.lockAssertionClaimFormat).toBeDefined(); + expect(lockAssertionRequestMessage.lockAssertionExpiration).toBeDefined(); + expect(lockAssertionRequestMessage.clientTransferNumber).toBeDefined(); + expect(lockAssertionRequestMessage.clientSignature).toBeDefined(); + expect( + lockAssertionRequestMessage.common?.hashPreviousMessage, + ).toBeDefined(); + }); + it("Service2Server checkLockAssertionRequestMessage", async () => { + expect(satpServerService2).toBeDefined(); + expect(satpServerService2.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#2`, + ); + + await satpServerService2.checkLockAssertionRequestMessage( + lockAssertionRequestMessage, + mockSession, + ); + }); + it("Service2Server lockAssertionResponse", async () => { + lockAssertionReceiptMessage = + (await satpServerService2.lockAssertionResponse( + lockAssertionRequestMessage, + mockSession, + )) as LockAssertionReceiptMessage; + + expect(lockAssertionReceiptMessage).toBeDefined(); + expect(lockAssertionReceiptMessage.common?.transferContextId).toBe( + lockAssertionRequestMessage.common?.transferContextId, + ); + expect(lockAssertionReceiptMessage.common?.version).toBe(SATP_VERSION); + expect(lockAssertionReceiptMessage.common?.messageType).toBe( + MessageType.ASSERTION_RECEIPT, + ); + expect(lockAssertionReceiptMessage.common?.clientGatewayPubkey).toBe( + lockAssertionRequestMessage.common?.clientGatewayPubkey, + ); + expect(lockAssertionReceiptMessage.common?.serverGatewayPubkey).toBe( + lockAssertionRequestMessage.common?.serverGatewayPubkey, + ); + expect( + lockAssertionReceiptMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(lockAssertionReceiptMessage.serverSignature).toBeDefined(); + }); + it("Service3Client checkLockAssertionReceiptMessage", async () => { + expect(satpClientService3).toBeDefined(); + expect(satpClientService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#3`, + ); + + await satpClientService3.checkLockAssertionReceiptMessage( + lockAssertionReceiptMessage, + mockSession, + ); + }); + it("Service3Client commitPreparation", async () => { + expect(satpClientService3).toBeDefined(); + expect(satpClientService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#3`, + ); + commitPreparationRequestMessage = + (await satpClientService3.commitPreparation( + lockAssertionReceiptMessage, + mockSession, + )) as CommitPreparationRequestMessage; + + expect(commitPreparationRequestMessage).toBeDefined(); + expect(commitPreparationRequestMessage.common?.sessionId).toBe( + mockSession.getSessionId(), + ); + expect(commitPreparationRequestMessage.common?.transferContextId).toBe( + lockAssertionReceiptMessage.common?.transferContextId, + ); + expect(commitPreparationRequestMessage.common?.version).toBe(SATP_VERSION); + expect(commitPreparationRequestMessage.common?.messageType).toBe( + MessageType.COMMIT_PREPARE, + ); + expect(commitPreparationRequestMessage.common?.clientGatewayPubkey).toBe( + lockAssertionReceiptMessage.common?.clientGatewayPubkey, + ); + expect(commitPreparationRequestMessage.common?.serverGatewayPubkey).toBe( + lockAssertionReceiptMessage.common?.serverGatewayPubkey, + ); + expect( + commitPreparationRequestMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(commitPreparationRequestMessage.clientSignature).toBeDefined(); + }); + it("Service3Server checkCommitPreparationRequestMessage", async () => { + expect(satpServerService3).toBeDefined(); + expect(satpServerService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#3`, + ); + + await satpServerService3.checkCommitPreparationRequestMessage( + commitPreparationRequestMessage, + mockSession, + ); + }); + it("Service3Server commitReady", async () => { + expect(satpServerService3).toBeDefined(); + expect(satpServerService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#3`, + ); + //mock claims + (mockSession.getServerSessionData() as SessionData).mintAssertionClaim = + new MintAssertionClaim(); + + commitReadyResponseMessage = (await satpServerService3.commitReady( + commitPreparationRequestMessage, + mockSession, + )) as CommitReadyResponseMessage; + + expect(commitReadyResponseMessage).toBeDefined(); + expect(commitReadyResponseMessage.common?.sessionId).toBe( + commitPreparationRequestMessage.common?.sessionId, + ); + expect(commitReadyResponseMessage.common?.transferContextId).toBe( + commitPreparationRequestMessage.common?.transferContextId, + ); + expect(commitReadyResponseMessage.common?.version).toBe(SATP_VERSION); + expect(commitReadyResponseMessage.common?.messageType).toBe( + MessageType.COMMIT_READY, + ); + expect(commitReadyResponseMessage.common?.clientGatewayPubkey).toBe( + commitPreparationRequestMessage.common?.clientGatewayPubkey, + ); + expect(commitReadyResponseMessage.common?.serverGatewayPubkey).toBe( + commitPreparationRequestMessage.common?.serverGatewayPubkey, + ); + expect( + commitReadyResponseMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(commitReadyResponseMessage.serverSignature).toBeDefined(); + }); + it("Service3Client checkCommitReadyResponseMessage", async () => { + expect(satpClientService3).toBeDefined(); + expect(satpClientService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#3`, + ); + await satpClientService3.checkCommitReadyResponseMessage( + commitReadyResponseMessage, + mockSession, + ); + }); + it("Service3Client commitFinalAssertion", async () => { + expect(satpClientService3).toBeDefined(); + expect(satpClientService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#3`, + ); + + //mock claims + (mockSession.getClientSessionData() as SessionData).burnAssertionClaim = + new BurnAssertionClaim(); + + commitFinalAssertionRequestMessage = + (await satpClientService3.commitFinalAssertion( + commitReadyResponseMessage, + mockSession, + )) as CommitFinalAssertionRequestMessage; + + expect(commitFinalAssertionRequestMessage).toBeDefined(); + expect(commitFinalAssertionRequestMessage.common?.sessionId).toBe( + commitReadyResponseMessage.common?.sessionId, + ); + expect(commitFinalAssertionRequestMessage.common?.transferContextId).toBe( + commitReadyResponseMessage.common?.transferContextId, + ); + expect(commitFinalAssertionRequestMessage.common?.version).toBe( + SATP_VERSION, + ); + expect(commitFinalAssertionRequestMessage.common?.messageType).toBe( + MessageType.COMMIT_FINAL, + ); + expect(commitFinalAssertionRequestMessage.common?.clientGatewayPubkey).toBe( + commitReadyResponseMessage.common?.clientGatewayPubkey, + ); + expect(commitFinalAssertionRequestMessage.common?.serverGatewayPubkey).toBe( + commitReadyResponseMessage.common?.serverGatewayPubkey, + ); + expect(commitFinalAssertionRequestMessage.burnAssertionClaim).toBeDefined(); + expect( + commitFinalAssertionRequestMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(commitFinalAssertionRequestMessage.clientSignature).toBeDefined(); + }); + it("Service3Server checkCommitFinalAssertionRequestMessage", async () => { + expect(satpServerService3).toBeDefined(); + expect(satpServerService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#3`, + ); + + await satpServerService3.checkCommitFinalAssertionRequestMessage( + commitFinalAssertionRequestMessage, + mockSession, + ); + }); + it("Service3Server commitFinalAcknowledgementReceiptResponse", async () => { + expect(satpServerService3).toBeDefined(); + expect(satpServerService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#3`, + ); + + //mock claims + ( + mockSession.getServerSessionData() as SessionData + ).assignmentAssertionClaim = new AssignmentAssertionClaim(); + + commitFinalAcknowledgementReceiptResponseMessage = + (await satpServerService3.commitFinalAcknowledgementReceiptResponse( + commitFinalAssertionRequestMessage, + mockSession, + )) as CommitFinalAcknowledgementReceiptResponseMessage; + + expect(commitFinalAcknowledgementReceiptResponseMessage).toBeDefined(); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common?.sessionId, + ).toBe(commitFinalAssertionRequestMessage.common?.sessionId); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.transferContextId, + ).toBe(commitFinalAssertionRequestMessage.common?.transferContextId); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common?.version, + ).toBe(SATP_VERSION); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common?.messageType, + ).toBe(MessageType.ACK_COMMIT_FINAL); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.clientGatewayPubkey, + ).toBe(commitFinalAssertionRequestMessage.common?.clientGatewayPubkey); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.serverGatewayPubkey, + ).toBe(commitFinalAssertionRequestMessage.common?.serverGatewayPubkey); + expect( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.hashPreviousMessage, + ).toBeDefined(); + expect( + commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim, + ).toBeDefined(); + expect( + commitFinalAcknowledgementReceiptResponseMessage.serverSignature, + ).toBeDefined(); + }); + it("Service3Client checkCommitFinalAcknowledgementReceiptResponseMessage", async () => { + expect(satpClientService3).toBeDefined(); + expect(satpClientService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#3`, + ); + + await satpClientService3.checkCommitFinalAcknowledgementReceiptResponseMessage( + commitFinalAcknowledgementReceiptResponseMessage, + mockSession, + ); + }); + it("Service3Client transferComplete", async () => { + expect(satpClientService3).toBeDefined(); + expect(satpClientService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#3`, + ); + + transferCompleteRequestMessage = (await satpClientService3.transferComplete( + commitFinalAcknowledgementReceiptResponseMessage, + mockSession, + )) as TransferCompleteRequestMessage; + + expect(transferCompleteRequestMessage).toBeDefined(); + expect(transferCompleteRequestMessage.common?.sessionId).toBe( + commitFinalAcknowledgementReceiptResponseMessage.common?.sessionId, + ); + expect(transferCompleteRequestMessage.common?.transferContextId).toBe( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.transferContextId, + ); + expect(transferCompleteRequestMessage.common?.version).toBe(SATP_VERSION); + expect(transferCompleteRequestMessage.common?.messageType).toBe( + MessageType.COMMIT_TRANSFER_COMPLETE, + ); + expect(transferCompleteRequestMessage.common?.clientGatewayPubkey).toBe( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.clientGatewayPubkey, + ); + expect(transferCompleteRequestMessage.common?.serverGatewayPubkey).toBe( + commitFinalAcknowledgementReceiptResponseMessage.common + ?.serverGatewayPubkey, + ); + expect(transferCompleteRequestMessage.hashTransferCommence).toBe( + getMessageHash( + mockSession.getClientSessionData(), + MessageType.TRANSFER_COMMENCE_REQUEST, + ), + ); + expect( + transferCompleteRequestMessage.common?.hashPreviousMessage, + ).toBeDefined(); + expect(transferCompleteRequestMessage.clientSignature).toBeDefined(); + }); + it("Service3Server checkTransferCompleteRequestMessage", async () => { + expect(satpServerService3).toBeDefined(); + expect(satpServerService3.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#3`, + ); + + await satpServerService3.checkTransferCompleteRequestMessage( + transferCompleteRequestMessage, + mockSession, + ); + }); +}); + +function initializeServiceOptions( + serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + logLevel: LogLevelDesc, + label: string, +): ISATPServiceOptions[] { + return serviceClasses.map((_, index) => ({ + signer: signer, + stage: index.toString() as "0" | "1" | "2" | "3", + loggerOptions: { level: logLevel, label }, + serviceName: `Service-${index}`, + serviceType: + index % 2 === 0 ? SATPServiceType.Server : SATPServiceType.Client, + bridgeManager: bridgeManager, + })); +} + +function initializeServices( + serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + serviceOptions: ISATPServiceOptions[], +): SATPService[] { + return serviceClasses.map( + (ServiceClass, index) => new ServiceClass(serviceOptions[index]), + ); +} From f31309c885cdb3192bc9986c0179c040a8a273ff Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 9 Aug 2024 15:27:21 +0100 Subject: [PATCH 28/49] feat(satp-hermes): add satp-plugin cli (wip) Signed-off-by: Rafael Belchior --- packages/cactus-plugin-satp-hermes/.gitignore | 1 + .../cactus-plugin-satp-hermes/package.json | 2 + .../src/main/typescript/.env.example | 38 ++++++ .../plugin-satp-hermes-gateway-cli.ts | 76 ++++++++++++ .../acceptance/gateway-cli-startup.test.ts | 108 ++++++++++++++++++ .../acceptance/gateway-docker.test.ts | 3 + yarn.lock | 15 +-- 7 files changed, 236 insertions(+), 7 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-cli-startup.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-docker.test.ts diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index 0dd84e46a9..82a8be6362 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -1 +1,2 @@ src/main/typescript/fabric-contracts/satp/chaincode-typescript/.yarn/ +src/main/typescript/.env diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 08d4d6ae0d..448653a1e2 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -64,6 +64,7 @@ "lint:eslint": "eslint './src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", "lint:protobuf": "buf lint --path src/main/proto --verbose", + "start-gateway": "ts-node satp-gateway-cli.ts", "pretsc": "npm run generate-sdk", "tsc": "tsc --project ./tsconfig.yml", "watch": "tsc --build --watch" @@ -96,6 +97,7 @@ "class-transformer": "0.5.1", "class-validator": "0.14.1", "crypto-js": "4.2.0", + "dotenv": "16.4.5", "ethereum-abi-types-generator": "1.3.4", "ethers": "6.13.1", "express": "4.17.2", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example b/packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example new file mode 100644 index 0000000000..5f11c435e1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example @@ -0,0 +1,38 @@ +# CREDENTIALs +SATP_PRIVATE_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef +SATP_PUBLIC_KEY=fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 + + +# SATP Gateway Configuration +SATP_LOG_LEVEL=INFO + +# Environment and API +SATP_NODE_ENV=development +SATP_ENABLE_OPEN_API=true + +# Gateway Identity +SATP_GATEWAY_ID=gateway1 +SATP_GATEWAY_NAME=ExampleGateway +SATP_GATEWAY_VERSION=v02,v02,v02 +SATP_SUPPORTED_DLTS=FabricSATPGateway,BesuSATPGateway + +# Proof and Ports +SATP_PROOF_ID=proof123 +SATP_GATEWAY_SERVER_PORT=3010 +SATP_GATEWAY_CLIENT_PORT=3011 +SATP_GATEWAY_GRPC_PORT=3012 + +# Gateway Address +SATP_GATEWAY_ADDRESS=http://localhost:3010 + +# Counter Party Gateways (JSON array) +SATP_COUNTER_PARTY_GATEWAYS=[{"id":"gateway2","name":"OtherGateway","address":"http://other-gateway:3010"}] + +# Validation Options (JSON object) +SATP_VALIDATION_OPTIONS={"skipMissingProperties":true} + +# Privacy Policies (JSON array) +SATP_PRIVACY_POLICIES=[{"policy":"GDPR","policyHash":"hash123"}] + +# Merge Policies (JSON array) +SATP_MERGE_POLICIES=[{"policy":"LatestWins","policyHash":"hash456"}] diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts new file mode 100644 index 0000000000..7080204cee --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts @@ -0,0 +1,76 @@ +#!/usr/bin/env node + +import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; +import { SATPGateway, SATPGatewayConfig } from "./plugin-satp-hermes-gateway"; +import { SupportedChain, DraftVersions, CurrentDrafts } from "./core/types"; +import dotenv from "dotenv"; + +export async function launchGateway(env?: NodeJS.ProcessEnv): Promise { + dotenv.config(); + + const logLevel: LogLevelDesc = + (env?.SATP_LOG_LEVEL as LogLevelDesc) || "INFO"; + const logger = LoggerProvider.getOrCreate({ + level: logLevel, + label: "SATP-Gateway", + }); + + // Parse the version string into DraftVersions object + const parseVersion = (versionString: string): DraftVersions => { + const [Core, Architecture, Crash] = versionString.split(","); + return { + [CurrentDrafts.Core]: Core, + [CurrentDrafts.Architecture]: Architecture, + [CurrentDrafts.Crash]: Crash, + }; + }; + + const gatewayConfig: SATPGatewayConfig = { + gid: { + id: env?.SATP_GATEWAY_ID || "", + name: env?.SATP_GATEWAY_NAME, + version: env?.SATP_GATEWAY_VERSION + ? [parseVersion(env.SATP_GATEWAY_VERSION)] + : [], + supportedDLTs: + env?.SATP_SUPPORTED_DLTS?.split(",").map( + (dlt) => dlt as SupportedChain, + ) || [], + proofID: env?.SATP_PROOF_ID, + gatewayServerPort: parseInt(env?.SATP_GATEWAY_SERVER_PORT || "0", 10), + gatewayClientPort: parseInt(env?.SATP_GATEWAY_CLIENT_PORT || "0", 10), + gatewayGrpcPort: parseInt(env?.SATP_GATEWAY_GRPC_PORT || "0", 10), + address: env?.SATP_GATEWAY_ADDRESS as + | `http://${string}` + | `https://${string}` + | undefined, + }, + counterPartyGateways: JSON.parse(env?.SATP_COUNTER_PARTY_GATEWAYS || "[]"), + logLevel, + keyPair: { + privateKey: Buffer.from(env?.SATP_PRIVATE_KEY || "", "hex"), + publicKey: Buffer.from(env?.SATP_PUBLIC_KEY || "", "hex"), + }, + environment: + (env?.SATP_NODE_ENV as "development" | "production") || "development", + enableOpenAPI: env?.SATP_ENABLE_OPEN_API === "true", + validationOptions: JSON.parse(env?.SATP_VALIDATION_OPTIONS || "{}"), + privacyPolicies: JSON.parse(env?.SATP_PRIVACY_POLICIES || "[]"), + mergePolicies: JSON.parse(env?.SATP_MERGE_POLICIES || "[]"), + }; + + const gateway = new SATPGateway(gatewayConfig); + try { + logger.info("Starting SATP Gateway..."); + await gateway.startup(); + logger.info("SATP Gateway started successfully"); + } catch (ex) { + logger.error(`SATP Gateway crashed. Exiting...`, ex); + await gateway.shutdown(); + process.exit(-1); + } +} + +if (require.main === module) { + launchGateway(process.env); +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-cli-startup.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-cli-startup.test.ts new file mode 100644 index 0000000000..ef651546a8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-cli-startup.test.ts @@ -0,0 +1,108 @@ +/* +import "jest-extended"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +import { + SATPGateway, + SATPGatewayConfig, +} from "../../../main/typescript/plugin-satp-hermes-gateway"; +import { PluginFactorySATPGateway } from "../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import { SupportedChain } from "./../../../main/typescript/core/types"; +import axios from "axios"; + +const logLevel: LogLevelDesc = "INFO"; + +const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, +}; +const factory = new PluginFactorySATPGateway(factoryOptions); + +describe("SATPGateway Client", () => { + let gateway: SATPGateway; + + beforeAll(async () => { + const options: SATPGatewayConfig = { + logLevel: "INFO", + gid: { + id: "testGateway", + name: "TestGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "testProofID", + gatewayClientPort: 3020, + address: "http://localhost", + }, + }; + gateway = await factory.create(options); + await gateway.startup(); + }); + + afterAll(async () => { + await gateway.shutdown(); + await pruneDockerAllIfGithubAction({ logLevel }); + }); + + it("should respond to client requests", async () => { + const clientPort = gateway.Identity.gatewayClientPort; + const baseUrl = `http://localhost:${clientPort}`; + + // Test the health endpoint + const healthResponse = await axios.get(`${baseUrl}/health`); + expect(healthResponse.status).toBe(200); + expect(healthResponse.data).toHaveProperty("status", "OK"); + + // Test getting gateway identity + const identityResponse = await axios.get( + `${baseUrl}/api/v1/gateway/identity`, + ); + expect(identityResponse.status).toBe(200); + expect(identityResponse.data).toMatchObject({ + id: "testGateway", + name: "TestGateway", + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "testProofID", + }); + + // Test unsupported endpoint + try { + await axios.get(`${baseUrl}/unsupported`); + } catch (error) { + expect(error.response.status).toBe(404); + } + }); + + it("should handle client errors gracefully", async () => { + const clientPort = gateway.Identity.gatewayClientPort; + const baseUrl = `http://localhost:${clientPort}`; + + // Test invalid request body + try { + await axios.post(`${baseUrl}/api/v1/some/endpoint`, { + invalidData: true, + }); + } catch (error) { + expect(error.response.status).toBe(400); + } + + // Test unauthorized access + try { + await axios.get(`${baseUrl}/api/v1/protected/resource`); + } catch (error) { + expect(error.response.status).toBe(401); + } + }); +}); +*/ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-docker.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-docker.test.ts new file mode 100644 index 0000000000..c267693963 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-docker.test.ts @@ -0,0 +1,3 @@ +/* + todo test satp container pulling and instantation; test working via docker +*/ diff --git a/yarn.lock b/yarn.lock index 85fdab5278..460cf3ded2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10902,6 +10902,7 @@ __metadata: class-transformer: "npm:0.5.1" class-validator: "npm:0.14.1" crypto-js: "npm:4.2.0" + dotenv: "npm:16.4.5" ethereum-abi-types-generator: "npm:1.3.4" ethers: "npm:6.13.1" express: "npm:4.21.0" @@ -26486,6 +26487,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:16.4.5, dotenv@npm:^16.4.5": + version: 16.4.5 + resolution: "dotenv@npm:16.4.5" + checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8 + languageName: node + linkType: hard + "dotenv@npm:8.6.0, dotenv@npm:^8.2.0": version: 8.6.0 resolution: "dotenv@npm:8.6.0" @@ -26500,13 +26508,6 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.4.5": - version: 16.4.5 - resolution: "dotenv@npm:16.4.5" - checksum: 10/55a3134601115194ae0f924e54473459ed0d9fc340ae610b676e248cca45aa7c680d86365318ea964e6da4e2ea80c4514c1adab5adb43d6867fb57ff068f95c8 - languageName: node - linkType: hard - "dotignore@npm:^0.1.2": version: 0.1.2 resolution: "dotignore@npm:0.1.2" From 11e724b0478d89944b80127099c2a8bcbaf413bc Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Fri, 9 Aug 2024 16:20:06 +0100 Subject: [PATCH 29/49] chore(satp-hermes): fix satp build process Signed-off-by: Rafael Belchior --- .gitignore | 1 - packages/cactus-plugin-satp-hermes/.gitignore | 1 + .../cache/solidity-files-cache.json | 1 + packages/cactus-plugin-satp-hermes/package.json | 5 +++-- .../gateway-client/typescript-axios/.openapi-generator/FILES | 1 - .../src/solidity/generated/Context.sol/Context.json | 2 +- .../generated/ITraceableContract.sol/ITraceableContract.json | 2 +- .../src/solidity/generated/Math.sol/Math.json | 2 +- .../src/solidity/generated/Ownable.sol/Ownable.json | 2 +- .../src/solidity/generated/SignedMath.sol/SignedMath.json | 2 +- .../src/solidity/generated/Strings.sol/Strings.json | 2 +- ...352889f726.json => 26ba0bad9cd6a2a223b826c990b4cd8e.json} | 2 +- .../build-info/974845d0475a59734bc898d56133545f.json | 1 - .../satp-wrapper-without-json.sol/SATPWrapperContract.json | 2 +- .../generated/satp-wrapper.sol/SATPWrapperContract.json | 2 +- .../solidity/generated/AccessControl.sol/AccessControl.json | 2 +- .../src/test/solidity/generated/Context.sol/Context.json | 2 +- .../src/test/solidity/generated/ERC165.sol/ERC165.json | 2 +- .../src/test/solidity/generated/ERC20.sol/ERC20.json | 2 +- .../generated/IAccessControl.sol/IAccessControl.json | 2 +- .../src/test/solidity/generated/IERC165.sol/IERC165.json | 2 +- .../src/test/solidity/generated/IERC20.sol/IERC20.json | 2 +- .../generated/IERC20Metadata.sol/IERC20Metadata.json | 2 +- .../generated/ITraceableContract.sol/ITraceableContract.json | 2 +- .../src/test/solidity/generated/Math.sol/Math.json | 2 +- .../test/solidity/generated/SignedMath.sol/SignedMath.json | 2 +- .../src/test/solidity/generated/Strings.sol/Strings.json | 2 +- ...3568be37c1.json => 23be7e36c4198d02aebf9d5d6258914a.json} | 2 +- .../build-info/84d52643d45e1addd104736585542010.json | 1 - .../generated/draft-IERC6093.sol/IERC1155Errors.json | 2 +- .../solidity/generated/draft-IERC6093.sol/IERC20Errors.json | 2 +- .../solidity/generated/draft-IERC6093.sol/IERC721Errors.json | 2 +- .../satp-contract-interface.sol/SATPContractInterface.json | 2 +- .../test/solidity/generated/satp-erc20.sol/SATPContract.json | 2 +- 34 files changed, 32 insertions(+), 33 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json rename packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/{08aaa4179bf88c82656a7f352889f726.json => 26ba0bad9cd6a2a223b826c990b4cd8e.json} (87%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json rename packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/{707a9b7be39daaaf674e343568be37c1.json => 23be7e36c4198d02aebf9d5d6258914a.json} (94%) delete mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json diff --git a/.gitignore b/.gitignore index fa8ef2403c..3942ca6e40 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,3 @@ tools/docker/geth-testnet/data-geth1/ .history/ .manual-geth-artillery-config.yaml packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/fixtures/go/asset-transfer-private-data/chaincode-go/chaincode-go -packages/cactus-plugin-satp-hermes/.config diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index 82a8be6362..da6665bbc3 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -1,2 +1,3 @@ src/main/typescript/fabric-contracts/satp/chaincode-typescript/.yarn/ src/main/typescript/.env +packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json diff --git a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json new file mode 100644 index 0000000000..46372ef060 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json @@ -0,0 +1 @@ +{"_format":"","paths":{"artifacts":"src/solidity/generated","build_infos":"src/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"lastModificationDate":1721844842602,"contentHash":"d3c790edc9ccf808a17c5a6cd13614fd","sourceName":"node_modules/@openzeppelin/contracts/access/Ownable.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"Ownable":{"0.8.20":{"path":"Ownable.sol/Ownable.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1721844842606,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1721844842616,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1721844842612,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1721844842613,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"src/solidity/ITraceableContract.sol":{"lastModificationDate":1723214831340,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/solidity/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"src/solidity/satp-wrapper-without-json.sol":{"lastModificationDate":1723214831340,"contentHash":"6bf8a1d02b875a68cf65af7dcc0c9c46","sourceName":"src/solidity/satp-wrapper-without-json.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/Ownable.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/solidity/ITraceableContract.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPWrapperContract":{"0.8.20":{"path":"satp-wrapper-without-json.sol/SATPWrapperContract.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"src/solidity/satp-wrapper.sol":{"lastModificationDate":1723214831340,"contentHash":"3796cb4be7c06c5c8912e8137293b8a9","sourceName":"src/solidity/satp-wrapper.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/Ownable.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/solidity/ITraceableContract.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPWrapperContract":{"0.8.20":{"path":"satp-wrapper.sol/SATPWrapperContract.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true}},"builds":["26ba0bad9cd6a2a223b826c990b4cd8e"]} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 448653a1e2..b6a7c52a82 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -44,7 +44,7 @@ "dist/*" ], "scripts": { - "build": "run-p tsc codegen", + "build": "run-s codegen tsc", "build-proto": "buf build --path src/main/proto --verbose", "build:dev:backend:postbuild": "mkdir -p ./dist/lib/knex && cp -r ./src/knex/* ./dist/lib/knex", "bundle-openapi-json": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/json/openapi-blo-bundled.json -r -t json", @@ -60,13 +60,14 @@ "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/gateway-client/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", + "preinstall": "curl -L https://foundry.paradigm.xyz | bash && foundryup", "lint": "run-p 'lint:*'", "lint:eslint": "eslint './src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", "lint:protobuf": "buf lint --path src/main/proto --verbose", "start-gateway": "ts-node satp-gateway-cli.ts", "pretsc": "npm run generate-sdk", - "tsc": "tsc --project ./tsconfig.yml", + "tsc": "tsc --project ./tsconfig.json", "watch": "tsc --build --watch" }, "jest": { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES index 16b445eee6..a80cd4f07b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES @@ -1,6 +1,5 @@ .gitignore .npmignore -.openapi-generator-ignore api.ts base.ts common.ts diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json index 10c223ce86..962a3346c0 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Context.sol/Context.json @@ -1 +1 @@ -{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file +{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json index 9f45686972..6b1ec88e19 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/ITraceableContract.sol/ITraceableContract.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":5} \ No newline at end of file +{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":5} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json index a3f5304faf..7de936fc15 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Math.sol/Math.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:3:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:3;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:3:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file +{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f39f62735cb38c7a736c9b865f54c87892797fd6969470a18bf76bcc100c7f464736f6c63430008140033","sourceMap":"203:14914:3:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:3;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f39f62735cb38c7a736c9b865f54c87892797fd6969470a18bf76bcc100c7f464736f6c63430008140033","sourceMap":"203:14914:3:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json index f83a9ee073..680002d669 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Ownable.sol/Ownable.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the address provided by the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"}],"devdoc":{"kind":"dev","methods":{"constructor":{"details":"Initializes the contract setting the address provided by the deployer as the initial owner."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":"Ownable"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file +{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the address provided by the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"}],"devdoc":{"kind":"dev","methods":{"constructor":{"details":"Initializes the contract setting the address provided by the deployer as the initial owner."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":"Ownable"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json index 535ade9288..a4e082c444 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/SignedMath.sol/SignedMath.json @@ -1 +1 @@ -{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:4:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:4;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:4:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file +{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203ffaee4a0d294008ac0f86736a534d67532dcf993b53e053e992698dc7fb316164736f6c63430008140033","sourceMap":"216:1047:4:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:4;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203ffaee4a0d294008ac0f86736a534d67532dcf993b53e053e992698dc7fb316164736f6c63430008140033","sourceMap":"216:1047:4:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json index 91ae15029a..5356945014 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/Strings.sol/Strings.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:2:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:2;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:2:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file +{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f715825e4cd02d630e04530bd55d46aeb82684c956449063ccb0f633c0748e364736f6c63430008140033","sourceMap":"251:2847:2:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:2;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f715825e4cd02d630e04530bd55d46aeb82684c956449063ccb0f633c0748e364736f6c63430008140033","sourceMap":"251:2847:2:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/26ba0bad9cd6a2a223b826c990b4cd8e.json similarity index 87% rename from packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json rename to packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/26ba0bad9cd6a2a223b826c990b4cd8e.json index 096c3b0645..814541d7c9 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/08aaa4179bf88c82656a7f352889f726.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/26ba0bad9cd6a2a223b826c990b4cd8e.json @@ -1 +1 @@ -{"id":"08aaa4179bf88c82656a7f352889f726","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file +{"id":"26ba0bad9cd6a2a223b826c990b4cd8e","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json deleted file mode 100644 index 83723e5a30..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/974845d0475a59734bc898d56133545f.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"974845d0475a59734bc898d56133545f","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json index 74d5babbd6..f29a35873c 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper-without-json.sol/SATPWrapperContract.json @@ -1 +1 @@ -{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"},{"name":"role_given","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"string","indexed":false,"internalType":"string"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620020cb380380620020cb8339810160408190526200003491620000ea565b816001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f816200009a565b50600480546001600160a01b0319166001600160a01b03939093169290921790915560015562000126565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060408385031215620000fe57600080fd5b82516001600160a01b03811681146200011657600080fd5b6020939093015192949293505050565b611f9580620001366000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063c1733f6811610066578063c1733f6814610208578063d9cf884c14610228578063e1efb5961461023b578063f2fde38b1461024e57600080fd5b80638da5cb5b146101ba578063a1bc17c5146101cb578063b48272cc146101de578063b5bfddea146101f157600080fd5b80634534ba17116100d35780634534ba17146101755780635137b8a714610188578063715018a61461019d5780638d7d180b146101a757600080fd5b806304c2320b146100fa578063056b01ce146101275780631255c1891461014a575b600080fd5b61010d6101083660046118f6565b610261565b60405161011e959493929190611983565b60405180910390f35b61013a6101353660046119cd565b6103bf565b604051901515815260200161011e565b60045461015d906001600160a01b031681565b6040516001600160a01b03909116815260200161011e565b61013a610183366004611a29565b61058e565b610190610792565b60405161011e9190611a80565b6101a561086b565b005b61013a6101b5366004611ae2565b61087f565b6000546001600160a01b031661015d565b61013a6101d93660046118f6565b610b19565b61013a6101ec3660046119cd565b610d14565b6101fa60015481565b60405190815260200161011e565b61021b6102163660046118f6565b610ef4565b60405161011e9190611b67565b61013a6102363660046119cd565b6110b9565b61013a6102493660046119cd565b6113e6565b6101a561025c366004611bd7565b6115c5565b8051602081830181018051600282529282019190930120915280546001820180546001600160a01b03909216929161029890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546102c490611bf2565b80156103115780601f106102e657610100808354040283529160200191610311565b820191906000526020600020905b8154815290600101906020018083116102f457829003601f168201915b50505050509080600201805461032690611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461035290611bf2565b801561039f5780601f106103745761010080835404028352916020019161039f565b820191906000526020600020905b81548152906001019060200180831161038257829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006103c9611603565b60006001600160a01b03166002846040516103e49190611c2c565b908152604051908190036020019020546001600160a01b031603610426578260405163c0bab25f60e01b815260040161041d9190611c48565b60405180910390fd5b60006002846040516104389190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104979190611c2c565b6000604051808303816000865af19150503d80600081146104d4576040519150601f19603f3d011682016040523d82523d6000602084013e6104d9565b606091505b50509050806105235760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b826002856040516105349190611c2c565b9081526020016040518091039020600401819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6848460405161057a929190611c5b565b60405180910390a160019150505b92915050565b6000610598611603565b816002856040516105a99190611c2c565b90815260200160405180910390206004015410156106095760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b6564604482015260640161041d565b600060028560405161061b9190611c2c565b908152604051908190036020018120543060248301526001600160a01b03868116604484015260648301869052169060840160408051601f198184030181529181526020820180516001600160e01b0316632fa96a2760e11b179052516106829190611c2c565b6000604051808303816000865af19150503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b50509050806107155760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c65640000000000000000604482015260640161041d565b826002866040516107269190611c2c565b908152602001604051809103902060040160008282546107469190611c93565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c9061077f90879087908790611ca6565b60405180910390a1506001949350505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156108625783829060005260206000200180546107d590611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461080190611bf2565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050815260200190600101906107b6565b50505050905090565b610873611603565b61087d6000611630565b565b6000610889611603565b60006001600160a01b03166002846040516108a49190611c2c565b908152604051908190036020019020546001600160a01b0316146108dd57826040516319eac8d160e21b815260040161041d9190611c48565b60015460405160248101919091523060448201526000906001600160a01b0387169060640160408051601f198184030181529181526020820180516001600160e01b03166328545c0d60e01b179052516109379190611c2c565b6000604051808303816000865af19150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109c2576002846040516109929190611c2c565b9081526040519081900360200181205463118cdaa760e01b82526001600160a01b0316600482015260240161041d565b6040518060a00160405280876001600160a01b03168152602001868152602001858152602001846001600160a01b031681526020016000815250600285604051610a0c9190611c2c565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610a4b9082611d23565b5060408201516002820190610a609082611d23565b506060820151600382810180546001600160a01b0319166001600160a01b039093169290921790915560809092015160049091015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610acf8582611d23565b507f57951acaa6aa023b66ff5ae829f011ec74aedd1a40654570a33708280743e88186868686604051610b059493929190611de3565b60405180910390a150600195945050505050565b6000610b23611603565b60006001600160a01b0316600283604051610b3e9190611c2c565b908152604051908190036020019020546001600160a01b031603610b77578160405163c0bab25f60e01b815260040161041d9190611c48565b6000600283604051610b899190611c2c565b9081526020016040518091039020600401541115610bbc5781604051635be9608560e11b815260040161041d9190611c48565b610c6e600283604051610bcf9190611c2c565b90815260200160405180910390206002018054610beb90611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1790611bf2565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050611680565b600282604051610c7e9190611c2c565b90815260405190819003602001902080546001600160a01b03191681556000610caa6001830182611805565b610cb8600283016000611805565b506003810180546001600160a01b031916905560006004909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610d03908490611c48565b60405180910390a15060015b919050565b6000610d1e611603565b81600284604051610d2f9190611c2c565b9081526020016040518091039020600401541015610d8f5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b65640000604482015260640161041d565b6000600284604051610da19190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b0316632770a7eb60e21b17905251610e009190611c2c565b6000604051808303816000865af19150503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5050905080610e8c5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b82600285604051610e9d9190611c2c565b90815260200160405180910390206004016000828254610ebd9190611c93565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee999061057a9086908690611c5b565b610f386040518060a0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b600282604051610f489190611c2c565b90815260408051918290036020908101832060a0840190925281546001600160a01b0316835260018201805491840191610f8190611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fad90611bf2565b8015610ffa5780601f10610fcf57610100808354040283529160200191610ffa565b820191906000526020600020905b815481529060010190602001808311610fdd57829003601f168201915b5050505050815260200160028201805461101390611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461103f90611bf2565b801561108c5780601f106110615761010080835404028352916020019161108c565b820191906000526020600020905b81548152906001019060200180831161106f57829003601f168201915b505050918352505060038201546001600160a01b0316602082015260049091015460409091015292915050565b60006110c3611603565b60006001600160a01b03166002846040516110de9190611c2c565b908152604051908190036020019020546001600160a01b031603611117578260405163c0bab25f60e01b815260040161041d9190611c48565b816002846040516111289190611c2c565b908152602001604051809103902060040154101561115d57828260405163076abcf360e51b815260040161041d929190611c5b565b600060028460405161116f9190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b179052516111ce9190611c2c565b6000604051808303816000865af19150503d806000811461120b576040519150601f19603f3d011682016040523d82523d6000602084013e611210565b606091505b505090508061123457836040516358300fe760e01b815260040161041d9190611c48565b60006002856040516112469190611c2c565b908152604051908190036020018120546001600160a01b0316903090600290611270908990611c2c565b908152604051908190036020018120600301546001600160a01b03169060029061129b908a90611c2c565b908152604051908190036020018120600401546001600160a01b039384166024830152919092166044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516113049190611c2c565b6000604051808303816000865af19150503d8060008114611341576040519150601f19603f3d011682016040523d82523d6000602084013e611346565b606091505b5050905080156113cb57836002866040516113619190611c2c565b908152602001604051809103902060040160008282546113819190611c93565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906113b89087908790611c5b565b60405180910390a1600192505050610588565b846040516358300fe760e01b815260040161041d9190611c48565b60006113f0611603565b60006001600160a01b031660028460405161140b9190611c2c565b908152604051908190036020019020546001600160a01b031603611444578260405163c0bab25f60e01b815260040161041d9190611c48565b60006002846040516114569190611c2c565b908152604051908190036020018120546001600160a01b03169060029061147e908790611c2c565b908152604051908190036020018120600301546001600160a01b031660248201523060448201526064810185905260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516114e49190611c2c565b6000604051808303816000865af19150503d8060008114611521576040519150601f19603f3d011682016040523d82523d6000602084013e611526565b606091505b5050905080156115aa57826002856040516115419190611c2c565b908152602001604051809103902060040160008282546115619190611e2c565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc9797906115989086908690611c5b565b60405180910390a16001915050610588565b8360405163412204b560e11b815260040161041d9190611c48565b6115cd611603565b6001600160a01b0381166115f757604051631e4fbdf760e01b81526000600482015260240161041d565b61160081611630565b50565b6000546001600160a01b0316331461087d5760405163118cdaa760e01b815233600482015260240161041d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117da5761173c600382815481106116a3576116a3611e3f565b9060005260206000200180546116b890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546116e490611bf2565b80156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505050836117de565b156117c8576003805461175190600190611c93565b8154811061176157611761611e3f565b906000526020600020016003828154811061177e5761177e611e3f565b9060005260206000200190816117949190611e55565b5060038054806117a6576117a6611f30565b6001900381819060005260206000200160006117c29190611805565b90555050565b806117d281611f46565b915050611683565b5050565b6000815183511480156117fe575081805190602001208380519060200120145b9392505050565b50805461181190611bf2565b6000825580601f10611821575050565b601f01602090049060005260206000209081019061160091905b8082111561184f576000815560010161183b565b5090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261187a57600080fd5b813567ffffffffffffffff8082111561189557611895611853565b604051601f8301601f19908116603f011681019082821181831017156118bd576118bd611853565b816040528381528660208588010111156118d657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561190857600080fd5b813567ffffffffffffffff81111561191f57600080fd5b61192b84828501611869565b949350505050565b60005b8381101561194e578181015183820152602001611936565b50506000910152565b6000815180845261196f816020860160208601611933565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526119a560a0840188611957565b83810360408501526119b78188611957565b9590911660608401525050608001529392505050565b600080604083850312156119e057600080fd5b823567ffffffffffffffff8111156119f757600080fd5b611a0385828601611869565b95602094909401359450505050565b80356001600160a01b0381168114610d0f57600080fd5b600080600060608486031215611a3e57600080fd5b833567ffffffffffffffff811115611a5557600080fd5b611a6186828701611869565b935050611a7060208501611a12565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ad557603f19888603018452611ac3858351611957565b94509285019290850190600101611aa7565b5092979650505050505050565b60008060008060808587031215611af857600080fd5b611b0185611a12565b9350602085013567ffffffffffffffff80821115611b1e57600080fd5b611b2a88838901611869565b94506040870135915080821115611b4057600080fd5b50611b4d87828801611869565b925050611b5c60608601611a12565b905092959194509250565b60208152600060018060a01b03808451166020840152602084015160a06040850152611b9660c0850182611957565b90506040850151601f19858303016060860152611bb38282611957565b915050816060860151166080850152608085015160a0850152809250505092915050565b600060208284031215611be957600080fd5b6117fe82611a12565b600181811c90821680611c0657607f821691505b602082108103611c2657634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611c3e818460208701611933565b9190910192915050565b6020815260006117fe6020830184611957565b604081526000611c6e6040830185611957565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058857610588611c7d565b606081526000611cb96060830186611957565b6001600160a01b039490941660208301525060400152919050565b601f821115611d1e57600081815260208120601f850160051c81016020861015611cfb5750805b601f850160051c820191505b81811015611d1a57828155600101611d07565b5050505b505050565b815167ffffffffffffffff811115611d3d57611d3d611853565b611d5181611d4b8454611bf2565b84611cd4565b602080601f831160018114611d865760008415611d6e5750858301515b600019600386901b1c1916600185901b178555611d1a565b600085815260208120601f198616915b82811015611db557888601518255948401946001909101908401611d96565b5085821015611dd35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b03808716835260806020840152611e056080840187611957565b8381036040850152611e178187611957565b92505080841660608401525095945050505050565b8082018082111561058857610588611c7d565b634e487b7160e01b600052603260045260246000fd5b818103611e60575050565b611e6a8254611bf2565b67ffffffffffffffff811115611e8257611e82611853565b611e9081611d4b8454611bf2565b6000601f821160018114611ec45760008315611eac5750848201545b600019600385901b1c1916600184901b178455611f29565b600085815260209020601f19841690600086815260209020845b83811015611efe5782860154825560019586019590910190602001611ede565b5085831015611f1c5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b600060018201611f5857611f58611c7d565b506001019056fea2646970667358221220225cb2753a2630cfbc6258111a8866e031dff580edaff7495e38d9172ce6ee3164736f6c63430008140033","sourceMap":"689:5698:6:-:0;;;1317:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1383:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;516:51:8;489:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1410:14:6::1;:41:::0;;-1:-1:-1;;;;;;1410:41:6::1;-1:-1:-1::0;;;;;1410:41:6;;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;1461:24:6;689:5698;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:351:8:-;93:6;101;154:2;142:9;133:7;129:23;125:32;122:52;;;170:1;167;160:12;122:52;196:16;;-1:-1:-1;;;;;241:31:8;;231:42;;221:70;;287:1;284;277:12;221:70;355:2;340:18;;;;334:25;310:5;;334:25;;-1:-1:-1;;;14:351:8:o;370:203::-;689:5698:6;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063c1733f6811610066578063c1733f6814610208578063d9cf884c14610228578063e1efb5961461023b578063f2fde38b1461024e57600080fd5b80638da5cb5b146101ba578063a1bc17c5146101cb578063b48272cc146101de578063b5bfddea146101f157600080fd5b80634534ba17116100d35780634534ba17146101755780635137b8a714610188578063715018a61461019d5780638d7d180b146101a757600080fd5b806304c2320b146100fa578063056b01ce146101275780631255c1891461014a575b600080fd5b61010d6101083660046118f6565b610261565b60405161011e959493929190611983565b60405180910390f35b61013a6101353660046119cd565b6103bf565b604051901515815260200161011e565b60045461015d906001600160a01b031681565b6040516001600160a01b03909116815260200161011e565b61013a610183366004611a29565b61058e565b610190610792565b60405161011e9190611a80565b6101a561086b565b005b61013a6101b5366004611ae2565b61087f565b6000546001600160a01b031661015d565b61013a6101d93660046118f6565b610b19565b61013a6101ec3660046119cd565b610d14565b6101fa60015481565b60405190815260200161011e565b61021b6102163660046118f6565b610ef4565b60405161011e9190611b67565b61013a6102363660046119cd565b6110b9565b61013a6102493660046119cd565b6113e6565b6101a561025c366004611bd7565b6115c5565b8051602081830181018051600282529282019190930120915280546001820180546001600160a01b03909216929161029890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546102c490611bf2565b80156103115780601f106102e657610100808354040283529160200191610311565b820191906000526020600020905b8154815290600101906020018083116102f457829003601f168201915b50505050509080600201805461032690611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461035290611bf2565b801561039f5780601f106103745761010080835404028352916020019161039f565b820191906000526020600020905b81548152906001019060200180831161038257829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006103c9611603565b60006001600160a01b03166002846040516103e49190611c2c565b908152604051908190036020019020546001600160a01b031603610426578260405163c0bab25f60e01b815260040161041d9190611c48565b60405180910390fd5b60006002846040516104389190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104979190611c2c565b6000604051808303816000865af19150503d80600081146104d4576040519150601f19603f3d011682016040523d82523d6000602084013e6104d9565b606091505b50509050806105235760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b826002856040516105349190611c2c565b9081526020016040518091039020600401819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6848460405161057a929190611c5b565b60405180910390a160019150505b92915050565b6000610598611603565b816002856040516105a99190611c2c565b90815260200160405180910390206004015410156106095760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b6564604482015260640161041d565b600060028560405161061b9190611c2c565b908152604051908190036020018120543060248301526001600160a01b03868116604484015260648301869052169060840160408051601f198184030181529181526020820180516001600160e01b0316632fa96a2760e11b179052516106829190611c2c565b6000604051808303816000865af19150503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b50509050806107155760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c65640000000000000000604482015260640161041d565b826002866040516107269190611c2c565b908152602001604051809103902060040160008282546107469190611c93565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c9061077f90879087908790611ca6565b60405180910390a1506001949350505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156108625783829060005260206000200180546107d590611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461080190611bf2565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050815260200190600101906107b6565b50505050905090565b610873611603565b61087d6000611630565b565b6000610889611603565b60006001600160a01b03166002846040516108a49190611c2c565b908152604051908190036020019020546001600160a01b0316146108dd57826040516319eac8d160e21b815260040161041d9190611c48565b60015460405160248101919091523060448201526000906001600160a01b0387169060640160408051601f198184030181529181526020820180516001600160e01b03166328545c0d60e01b179052516109379190611c2c565b6000604051808303816000865af19150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109c2576002846040516109929190611c2c565b9081526040519081900360200181205463118cdaa760e01b82526001600160a01b0316600482015260240161041d565b6040518060a00160405280876001600160a01b03168152602001868152602001858152602001846001600160a01b031681526020016000815250600285604051610a0c9190611c2c565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610a4b9082611d23565b5060408201516002820190610a609082611d23565b506060820151600382810180546001600160a01b0319166001600160a01b039093169290921790915560809092015160049091015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610acf8582611d23565b507f57951acaa6aa023b66ff5ae829f011ec74aedd1a40654570a33708280743e88186868686604051610b059493929190611de3565b60405180910390a150600195945050505050565b6000610b23611603565b60006001600160a01b0316600283604051610b3e9190611c2c565b908152604051908190036020019020546001600160a01b031603610b77578160405163c0bab25f60e01b815260040161041d9190611c48565b6000600283604051610b899190611c2c565b9081526020016040518091039020600401541115610bbc5781604051635be9608560e11b815260040161041d9190611c48565b610c6e600283604051610bcf9190611c2c565b90815260200160405180910390206002018054610beb90611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1790611bf2565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050611680565b600282604051610c7e9190611c2c565b90815260405190819003602001902080546001600160a01b03191681556000610caa6001830182611805565b610cb8600283016000611805565b506003810180546001600160a01b031916905560006004909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610d03908490611c48565b60405180910390a15060015b919050565b6000610d1e611603565b81600284604051610d2f9190611c2c565b9081526020016040518091039020600401541015610d8f5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b65640000604482015260640161041d565b6000600284604051610da19190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b0316632770a7eb60e21b17905251610e009190611c2c565b6000604051808303816000865af19150503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5050905080610e8c5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b82600285604051610e9d9190611c2c565b90815260200160405180910390206004016000828254610ebd9190611c93565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee999061057a9086908690611c5b565b610f386040518060a0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b600282604051610f489190611c2c565b90815260408051918290036020908101832060a0840190925281546001600160a01b0316835260018201805491840191610f8190611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fad90611bf2565b8015610ffa5780601f10610fcf57610100808354040283529160200191610ffa565b820191906000526020600020905b815481529060010190602001808311610fdd57829003601f168201915b5050505050815260200160028201805461101390611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461103f90611bf2565b801561108c5780601f106110615761010080835404028352916020019161108c565b820191906000526020600020905b81548152906001019060200180831161106f57829003601f168201915b505050918352505060038201546001600160a01b0316602082015260049091015460409091015292915050565b60006110c3611603565b60006001600160a01b03166002846040516110de9190611c2c565b908152604051908190036020019020546001600160a01b031603611117578260405163c0bab25f60e01b815260040161041d9190611c48565b816002846040516111289190611c2c565b908152602001604051809103902060040154101561115d57828260405163076abcf360e51b815260040161041d929190611c5b565b600060028460405161116f9190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b179052516111ce9190611c2c565b6000604051808303816000865af19150503d806000811461120b576040519150601f19603f3d011682016040523d82523d6000602084013e611210565b606091505b505090508061123457836040516358300fe760e01b815260040161041d9190611c48565b60006002856040516112469190611c2c565b908152604051908190036020018120546001600160a01b0316903090600290611270908990611c2c565b908152604051908190036020018120600301546001600160a01b03169060029061129b908a90611c2c565b908152604051908190036020018120600401546001600160a01b039384166024830152919092166044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516113049190611c2c565b6000604051808303816000865af19150503d8060008114611341576040519150601f19603f3d011682016040523d82523d6000602084013e611346565b606091505b5050905080156113cb57836002866040516113619190611c2c565b908152602001604051809103902060040160008282546113819190611c93565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906113b89087908790611c5b565b60405180910390a1600192505050610588565b846040516358300fe760e01b815260040161041d9190611c48565b60006113f0611603565b60006001600160a01b031660028460405161140b9190611c2c565b908152604051908190036020019020546001600160a01b031603611444578260405163c0bab25f60e01b815260040161041d9190611c48565b60006002846040516114569190611c2c565b908152604051908190036020018120546001600160a01b03169060029061147e908790611c2c565b908152604051908190036020018120600301546001600160a01b031660248201523060448201526064810185905260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516114e49190611c2c565b6000604051808303816000865af19150503d8060008114611521576040519150601f19603f3d011682016040523d82523d6000602084013e611526565b606091505b5050905080156115aa57826002856040516115419190611c2c565b908152602001604051809103902060040160008282546115619190611e2c565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc9797906115989086908690611c5b565b60405180910390a16001915050610588565b8360405163412204b560e11b815260040161041d9190611c48565b6115cd611603565b6001600160a01b0381166115f757604051631e4fbdf760e01b81526000600482015260240161041d565b61160081611630565b50565b6000546001600160a01b0316331461087d5760405163118cdaa760e01b815233600482015260240161041d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117da5761173c600382815481106116a3576116a3611e3f565b9060005260206000200180546116b890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546116e490611bf2565b80156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505050836117de565b156117c8576003805461175190600190611c93565b8154811061176157611761611e3f565b906000526020600020016003828154811061177e5761177e611e3f565b9060005260206000200190816117949190611e55565b5060038054806117a6576117a6611f30565b6001900381819060005260206000200160006117c29190611805565b90555050565b806117d281611f46565b915050611683565b5050565b6000815183511480156117fe575081805190602001208380519060200120145b9392505050565b50805461181190611bf2565b6000825580601f10611821575050565b601f01602090049060005260206000209081019061160091905b8082111561184f576000815560010161183b565b5090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261187a57600080fd5b813567ffffffffffffffff8082111561189557611895611853565b604051601f8301601f19908116603f011681019082821181831017156118bd576118bd611853565b816040528381528660208588010111156118d657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561190857600080fd5b813567ffffffffffffffff81111561191f57600080fd5b61192b84828501611869565b949350505050565b60005b8381101561194e578181015183820152602001611936565b50506000910152565b6000815180845261196f816020860160208601611933565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526119a560a0840188611957565b83810360408501526119b78188611957565b9590911660608401525050608001529392505050565b600080604083850312156119e057600080fd5b823567ffffffffffffffff8111156119f757600080fd5b611a0385828601611869565b95602094909401359450505050565b80356001600160a01b0381168114610d0f57600080fd5b600080600060608486031215611a3e57600080fd5b833567ffffffffffffffff811115611a5557600080fd5b611a6186828701611869565b935050611a7060208501611a12565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ad557603f19888603018452611ac3858351611957565b94509285019290850190600101611aa7565b5092979650505050505050565b60008060008060808587031215611af857600080fd5b611b0185611a12565b9350602085013567ffffffffffffffff80821115611b1e57600080fd5b611b2a88838901611869565b94506040870135915080821115611b4057600080fd5b50611b4d87828801611869565b925050611b5c60608601611a12565b905092959194509250565b60208152600060018060a01b03808451166020840152602084015160a06040850152611b9660c0850182611957565b90506040850151601f19858303016060860152611bb38282611957565b915050816060860151166080850152608085015160a0850152809250505092915050565b600060208284031215611be957600080fd5b6117fe82611a12565b600181811c90821680611c0657607f821691505b602082108103611c2657634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611c3e818460208701611933565b9190910192915050565b6020815260006117fe6020830184611957565b604081526000611c6e6040830185611957565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058857610588611c7d565b606081526000611cb96060830186611957565b6001600160a01b039490941660208301525060400152919050565b601f821115611d1e57600081815260208120601f850160051c81016020861015611cfb5750805b601f850160051c820191505b81811015611d1a57828155600101611d07565b5050505b505050565b815167ffffffffffffffff811115611d3d57611d3d611853565b611d5181611d4b8454611bf2565b84611cd4565b602080601f831160018114611d865760008415611d6e5750858301515b600019600386901b1c1916600185901b178555611d1a565b600085815260208120601f198616915b82811015611db557888601518255948401946001909101908401611d96565b5085821015611dd35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b03808716835260806020840152611e056080840187611957565b8381036040850152611e178187611957565b92505080841660608401525095945050505050565b8082018082111561058857610588611c7d565b634e487b7160e01b600052603260045260246000fd5b818103611e60575050565b611e6a8254611bf2565b67ffffffffffffffff811115611e8257611e82611853565b611e9081611d4b8454611bf2565b6000601f821160018114611ec45760008315611eac5750848201545b600019600385901b1c1916600184901b178455611f29565b600085815260209020601f19841690600086815260209020845b83811015611efe5782860154825560019586019590910190602001611ede565b5085831015611f1c5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b600060018201611f5857611f58611c7d565b506001019056fea2646970667358221220225cb2753a2630cfbc6258111a8866e031dff580edaff7495e38d9172ce6ee3164736f6c63430008140033","sourceMap":"689:5698:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;792:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4259:525;;;;;;:::i;:::-;;:::i;:::-;;;2948:14:8;;2941:22;2923:41;;2911:2;2896:18;4259:525:6;2783:187:8;886:29:6;;;;;-1:-1:-1;;;;;886:29:6;;;;;;-1:-1:-1;;;;;3139:32:8;;;3121:51;;3109:2;3094:18;886:29:6;2975:203:8;5285:579:6;;;;;;:::i;:::-;;:::i;5882:94::-;;;:::i;:::-;;;;;;;:::i;2293:101:0:-;;;:::i;:::-;;1498:753:6;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2257:431:6;;;;;;:::i;:::-;;:::i;4790:489::-;;;;;;:::i;:::-;;:::i;755:26::-;;;;;;;;;5481:25:8;;;5469:2;5454:18;755:26:6;5335:177:8;6264:121:6;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3285:967::-;;;;;;:::i;:::-;;:::i;2694:584::-;;;;;;:::i;:::-;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;792:40:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;792:40:6;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;792:40:6;;;;;;;;;;;-1:-1:-1;;;;;792:40:6;;;-1:-1:-1;792:40:6;:::o;4259:525::-;4340:12;1531:13:0;:11;:13::i;:::-;4410:1:6::1;-1:-1:-1::0;;;;;4367:45:6::1;:6;4374:7;4367:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4367:31:6::1;:45:::0;4364:107:::1;;4452:7;4434:26;;-1:-1:-1::0;;;4434:26:6::1;;;;;;;;:::i;:::-;;;;;;;;4364:107;4482:16;4504:6;4511:7;4504:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;4598:4:::1;4541:71;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;4504:31:6::1;::::0;7556:18:8;;4541:71:6::1;::::0;;-1:-1:-1;;4541:71:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;4541:71:6::1;-1:-1:-1::0;;;4541:71:6::1;::::0;;4504:109;::::1;::::0;4541:71;4504:109:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4481:132;;;4640:11;4632:46;;;::::0;-1:-1:-1;;;4632:46:6;;8182:2:8;4632:46:6::1;::::0;::::1;8164:21:8::0;8221:2;8201:18;;;8194:30;-1:-1:-1;;;8240:18:8;;;8233:52;8302:18;;4632:46:6::1;7980:346:8::0;4632:46:6::1;4714:6;4689;4696:7;4689:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4735:21;4740:7;4749:6;4735:21;;;;;;;:::i;:::-;;;;;;;;4773:4;4766:11;;;1554:1:0;4259:525:6::0;;;;:::o;5285:579::-;5394:12;1531:13:0;:11;:13::i;:::-;5452:6:6::1;5426;5433:7;5426:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5418:77;;;::::0;-1:-1:-1;;;5418:77:6;;8829:2:8;5418:77:6::1;::::0;::::1;8811:21:8::0;;;8848:18;;;8841:30;8907:34;8887:18;;;8880:62;8959:18;;5418:77:6::1;8627:356:8::0;5418:77:6::1;5507:18;5531:6;5538:7;5531:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;5635:4:::1;5568:99;::::0;::::1;9228:34:8::0;-1:-1:-1;;;;;9298:15:8;;;9278:18;;;9271:43;9330:18;;;9323:34;;;5531:31:6::1;::::0;9163:18:8;;5568:99:6::1;::::0;;-1:-1:-1;;5568:99:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;5568:99:6::1;-1:-1:-1::0;;;5568:99:6::1;::::0;;5531:137;::::1;::::0;5568:99;5531:137:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5506:162;;;5686:13;5678:50;;;::::0;-1:-1:-1;;;5678:50:6;;9570:2:8;5678:50:6::1;::::0;::::1;9552:21:8::0;9609:2;9589:18;;;9582:30;9648:26;9628:18;;;9621:54;9692:18;;5678:50:6::1;9368:348:8::0;5678:50:6::1;5765:6;5739;5746:7;5739:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5795:41:6::1;::::0;::::1;::::0;::::1;::::0;5802:7;;5811:16;;5829:6;;5795:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5853:4:6::1;::::0;5285:579;-1:-1:-1;;;;5285:579:6:o;5882:94::-;5932:15;5966:3;5959:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5882:94;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;1498:753:6:-;1628:16;1531:13:0;:11;:13::i;:::-;1702:1:6::1;-1:-1:-1::0;;;;;1659:45:6::1;:6;1666:7;1659:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;1659:31:6::1;:45;1656:110;;1747:7;1727:28;;-1:-1:-1::0;;;1727:28:6::1;;;;;;;;:::i;1656:110::-;1885:11;::::0;1827:85:::1;::::0;::::1;::::0;::::1;10553:25:8::0;;;;1906:4:6::1;10594:18:8::0;;;10587:60;1781:19:6::1;::::0;-1:-1:-1;;;;;1806:20:6;::::1;::::0;10526:18:8;;1827:85:6::1;::::0;;-1:-1:-1;;1827:85:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;1827:85:6::1;-1:-1:-1::0;;;1827:85:6::1;::::0;;1806:107;::::1;::::0;1827:85;1806:107:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1780:133;;;1932:14;1928:111;;1996:6;2003:7;1996:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;1969:59:6;;-1:-1:-1;;;;;1996:31:6::1;1969:59;::::0;::::1;3121:51:8::0;3094:18;;1969:59:6::1;2975:203:8::0;1928:111:6::1;2067:52;;;;;;;;2073:15;-1:-1:-1::0;;;;;2067:52:6::1;;;;;2090:9;2067:52;;;;2101:7;2067:52;;;;2110:5;-1:-1:-1::0;;;;;2067:52:6::1;;;;;2117:1;2067:52;;::::0;2049:6:::1;2056:7;2049:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;::::1;::::0;;;;;;;;:70;;;;-1:-1:-1;;;;;;2049:70:6::1;-1:-1:-1::0;;;;;2049:70:6;;::::1;;::::0;;;;::::1;::::0;-1:-1:-1;2049:70:6;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2049:70:6::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2049:70:6::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;2049:70:6::1;-1:-1:-1::0;;;;;2049:70:6;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2134:17;;-1:-1:-1;2134:17:6;::::1;::::0;;-1:-1:-1;2134:17:6;;;;;::::1;;2143:7:::0;2134:17;::::1;:::i;:::-;;2175:48;2180:15;2197:9;2208:7;2217:5;2175:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2240:4:6::1;::::0;1498:753;-1:-1:-1;;;;;1498:753:6:o;2257:431::-;2324:12;1531:13:0;:11;:13::i;:::-;2394:1:6::1;-1:-1:-1::0;;;;;2351:45:6::1;:6;2358:7;2351:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2351:31:6::1;:45:::0;2348:108:::1;;2437:7;2419:26;;-1:-1:-1::0;;;2419:26:6::1;;;;;;;;:::i;2348:108::-;2493:1;2468:6;2475:7;2468:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;2465:83;;;2529:7;2517:20;;-1:-1:-1::0;;;2517:20:6::1;;;;;;;;:::i;2465:83::-;2557:40;2573:6;2580:7;2573:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;2557:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;2614:6;2621:7;2614:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;2607:22;;-1:-1:-1;;;;;;2607:22:6::1;::::0;;2614:15:::1;2607:22;::::0;;::::1;2614:15:::0;2607:22:::1;:::i;:::-;;;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;2607:22:6::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2607:22:6::1;::::0;;::::1;;::::0;;::::1;::::0;2645:15:::1;::::0;::::1;::::0;::::1;::::0;2652:7;;2645:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;2677:4:6::1;1554:1:0;2257:431:6::0;;;:::o;4790:489::-;4871:12;1531:13:0;:11;:13::i;:::-;4929:6:6::1;4903;4910:7;4903:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4895:75;;;::::0;-1:-1:-1;;;4895:75:6;;13652:2:8;4895:75:6::1;::::0;::::1;13634:21:8::0;13691:2;13671:18;;;13664:30;13730:32;13710:18;;;13703:60;13780:18;;4895:75:6::1;13450:354:8::0;4895:75:6::1;4982:16;5004:6;5011:7;5004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;5099:4:::1;5041:72;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;5004:31:6::1;::::0;7556:18:8;;5041:72:6::1;::::0;;-1:-1:-1;;5041:72:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;5041:72:6::1;-1:-1:-1::0;;;5041:72:6::1;::::0;;5004:110;::::1;::::0;5041:72;5004:110:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:133;;;5133:11;5125:46;;;::::0;-1:-1:-1;;;5125:46:6;;14011:2:8;5125:46:6::1;::::0;::::1;13993:21:8::0;14050:2;14030:18;;;14023:30;-1:-1:-1;;;14069:18:8;;;14062:52;14131:18;;5125:46:6::1;13809:346:8::0;5125:46:6::1;5208:6;5182;5189:7;5182:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5230:21:6::1;::::0;::::1;::::0;::::1;::::0;5235:7;;5244:6;;5230:21:::1;:::i;6264:121::-:0;6326:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6326:18:6;6363:6;6370:7;6363:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;6356:22;;;;;;;;-1:-1:-1;;;;;6356:22:6;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6356:22:6;;;-1:-1:-1;;6356:22:6;;;;-1:-1:-1;;;;;6356:22:6;;;;;;;;;;;;;;;;6264:121;-1:-1:-1;;6264:121:6:o;3285:967::-;3368:12;1531:13:0;:11;:13::i;:::-;3448:1:6::1;-1:-1:-1::0;;;;;3405:45:6::1;:6;3412:7;3405:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3405:31:6::1;:45:::0;3402:107:::1;;3490:7;3472:26;;-1:-1:-1::0;;;3472:26:6::1;;;;;;;;:::i;3402:107::-;3547:6;3522;3529:7;3522:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;3519:108;;;3600:7;3609:6;3576:40;;-1:-1:-1::0;;;3576:40:6::1;;;;;;;;;:::i;3519:108::-;3638:17;3660:6;3667:7;3660:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;3757:4:::1;3697:74;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;3660:31:6::1;::::0;7556:18:8;;3697:74:6::1;::::0;;-1:-1:-1;;3697:74:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3697:74:6::1;-1:-1:-1::0;;;3697:74:6::1;::::0;;3660:112;::::1;::::0;3697:74;3660:112:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3637:135;;;3786:12;3782:75;;3838:7;3821:25;;-1:-1:-1::0;;;3821:25:6::1;;;;;;;;:::i;3782:75::-;3868:18;3891:6;3898:7;3891:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3891:31:6::1;::::0;3997:4:::1;::::0;4004:6:::1;::::0;:15:::1;::::0;4011:7;;4004:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:21:::1;;::::0;-1:-1:-1;;;;;4004:21:6::1;::::0;4027:6:::1;::::0;:15:::1;::::0;4034:7;;4027:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:22:::1;;::::0;-1:-1:-1;;;;;9246:15:8;;;3928:122:6::1;::::0;::::1;9228:34:8::0;9298:15;;;;9278:18;;;9271:43;9330:18;;;9323:34;9163:18;;3928:122:6::1;::::0;;-1:-1:-1;;3928:122:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3928:122:6::1;-1:-1:-1::0;;;3928:122:6::1;::::0;;3891:160;::::1;::::0;3928:122;3891:160:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3867:184;;;4064:13;4061:142;;;4119:6;4093;4100:7;4093:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4144:23:6::1;::::0;::::1;::::0;::::1;::::0;4151:7;;4160:6;;4144:23:::1;:::i;:::-;;;;;;;;4188:4;4181:11;;;;;;4061:142;4237:7;4220:25;;-1:-1:-1::0;;;4220:25:6::1;;;;;;;;:::i;2694:584::-:0;2775:12;1531:13:0;:11;:13::i;:::-;2845:1:6::1;-1:-1:-1::0;;;;;2802:45:6::1;:6;2809:7;2802:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2802:31:6::1;:45:::0;2799:107:::1;;2887:7;2869:26;;-1:-1:-1::0;;;2869:26:6::1;;;;;;;;:::i;2799:107::-;2917:16;2938:6;2945:7;2938:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2938:31:6::1;::::0;3036:6:::1;::::0;:15:::1;::::0;3043:7;;3036:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:21:::1;;::::0;-1:-1:-1;;;;;3036:21:6::1;2975:106;::::0;::::1;9228:34:8::0;3067:4:6::1;9278:18:8::0;;;9271:43;9330:18;;;9323:34;;;9163:18;;2975:106:6::1;::::0;;-1:-1:-1;;2975:106:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2975:106:6::1;-1:-1:-1::0;;;2975:106:6::1;::::0;;2938:144;::::1;::::0;2975:106;2938:144:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2916:166;;;3096:11;3093:138;;;3149:6;3123;3130:7;3123:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3174:21:6::1;::::0;::::1;::::0;::::1;::::0;3179:7;;3188:6;;3174:21:::1;:::i;:::-;;;;;;;;3216:4;3209:11;;;;;3093:138;3263:7;3248:23;;-1:-1:-1::0;;;3248:23:6::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3121:51:8::0;3094:18;;2672:31:0::1;2975:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3121:51:8;3094:18;;1901:40:0;2975:203:8;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5982:276:6:-;6050:9;6045:207;6069:3;:10;6065:14;;6045:207;;;6104:25;6118:3;6122:1;6118:6;;;;;;;;:::i;:::-;;;;;;;;6104:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6126:2;6104:13;:25::i;:::-;6100:142;;;6158:3;6162:10;;:14;;6175:1;;6162:14;:::i;:::-;6158:19;;;;;;;;:::i;:::-;;;;;;;;6149:3;6153:1;6149:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6195:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;6045:207;5982:276;:::o;6100:142::-;6081:3;;;;:::i;:::-;;;;6045:207;;;;5982:276;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;;3086:1;3070:19;;;;;;3063:1;3047:19;;;;;;:42;3009:80;3002:87;2914:182;-1:-1:-1;;;2914:182:2:o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:719;189:5;242:3;235:4;227:6;223:17;219:27;209:55;;260:1;257;250:12;209:55;296:6;283:20;322:18;359:2;355;352:10;349:36;;;365:18;;:::i;:::-;440:2;434:9;408:2;494:13;;-1:-1:-1;;490:22:8;;;514:2;486:31;482:40;470:53;;;538:18;;;558:22;;;535:46;532:72;;;584:18;;:::i;:::-;624:10;620:2;613:22;659:2;651:6;644:18;705:3;698:4;693:2;685:6;681:15;677:26;674:35;671:55;;;722:1;719;712:12;671:55;786:2;779:4;771:6;767:17;760:4;752:6;748:17;735:54;833:1;826:4;821:2;813:6;809:15;805:26;798:37;853:6;844:15;;;;;;146:719;;;;:::o;870:322::-;939:6;992:2;980:9;971:7;967:23;963:32;960:52;;;1008:1;1005;998:12;960:52;1048:9;1035:23;1081:18;1073:6;1070:30;1067:50;;;1113:1;1110;1103:12;1067:50;1136;1178:7;1169:6;1158:9;1154:22;1136:50;:::i;:::-;1126:60;870:322;-1:-1:-1;;;;870:322:8:o;1197:250::-;1282:1;1292:113;1306:6;1303:1;1300:13;1292:113;;;1382:11;;;1376:18;1363:11;;;1356:39;1328:2;1321:10;1292:113;;;-1:-1:-1;;1439:1:8;1421:16;;1414:27;1197:250::o;1452:271::-;1494:3;1532:5;1526:12;1559:6;1554:3;1547:19;1575:76;1644:6;1637:4;1632:3;1628:14;1621:4;1614:5;1610:16;1575:76;:::i;:::-;1705:2;1684:15;-1:-1:-1;;1680:29:8;1671:39;;;;1712:4;1667:50;;1452:271;-1:-1:-1;;1452:271:8:o;1728:655::-;1972:4;2018:1;2014;2009:3;2005:11;2001:19;2059:2;2051:6;2047:15;2036:9;2029:34;2099:3;2094:2;2083:9;2079:18;2072:31;2126:46;2167:3;2156:9;2152:19;2144:6;2126:46;:::i;:::-;2220:9;2212:6;2208:22;2203:2;2192:9;2188:18;2181:50;2248:33;2274:6;2266;2248:33;:::i;:::-;2317:15;;;;2312:2;2297:18;;2290:43;-1:-1:-1;;2364:3:8;2349:19;2342:35;2240:41;1728:655;-1:-1:-1;;;1728:655:8:o;2388:390::-;2466:6;2474;2527:2;2515:9;2506:7;2502:23;2498:32;2495:52;;;2543:1;2540;2533:12;2495:52;2583:9;2570:23;2616:18;2608:6;2605:30;2602:50;;;2648:1;2645;2638:12;2602:50;2671;2713:7;2704:6;2693:9;2689:22;2671:50;:::i;:::-;2661:60;2768:2;2753:18;;;;2740:32;;-1:-1:-1;;;;2388:390:8:o;3183:173::-;3251:20;;-1:-1:-1;;;;;3300:31:8;;3290:42;;3280:70;;3346:1;3343;3336:12;3361:464;3448:6;3456;3464;3517:2;3505:9;3496:7;3492:23;3488:32;3485:52;;;3533:1;3530;3523:12;3485:52;3573:9;3560:23;3606:18;3598:6;3595:30;3592:50;;;3638:1;3635;3628:12;3592:50;3661;3703:7;3694:6;3683:9;3679:22;3661:50;:::i;:::-;3651:60;;;3730:38;3764:2;3753:9;3749:18;3730:38;:::i;:::-;3720:48;;3815:2;3804:9;3800:18;3787:32;3777:42;;3361:464;;;;;:::o;3830:803::-;3992:4;4021:2;4061;4050:9;4046:18;4091:2;4080:9;4073:21;4114:6;4149;4143:13;4180:6;4172;4165:22;4218:2;4207:9;4203:18;4196:25;;4280:2;4270:6;4267:1;4263:14;4252:9;4248:30;4244:39;4230:53;;4318:2;4310:6;4306:15;4339:1;4349:255;4363:6;4360:1;4357:13;4349:255;;;4456:2;4452:7;4440:9;4432:6;4428:22;4424:36;4419:3;4412:49;4484:40;4517:6;4508;4502:13;4484:40;:::i;:::-;4474:50;-1:-1:-1;4582:12:8;;;;4547:15;;;;4385:1;4378:9;4349:255;;;-1:-1:-1;4621:6:8;;3830:803;-1:-1:-1;;;;;;;3830:803:8:o;4638:692::-;4744:6;4752;4760;4768;4821:3;4809:9;4800:7;4796:23;4792:33;4789:53;;;4838:1;4835;4828:12;4789:53;4861:29;4880:9;4861:29;:::i;:::-;4851:39;;4941:2;4930:9;4926:18;4913:32;4964:18;5005:2;4997:6;4994:14;4991:34;;;5021:1;5018;5011:12;4991:34;5044:50;5086:7;5077:6;5066:9;5062:22;5044:50;:::i;:::-;5034:60;;5147:2;5136:9;5132:18;5119:32;5103:48;;5176:2;5166:8;5163:16;5160:36;;;5192:1;5189;5182:12;5160:36;;5215:52;5259:7;5248:8;5237:9;5233:24;5215:52;:::i;:::-;5205:62;;;5286:38;5320:2;5309:9;5305:18;5286:38;:::i;:::-;5276:48;;4638:692;;;;;;;:::o;5517:792::-;5692:2;5681:9;5674:21;5655:4;5731:1;5727;5722:3;5718:11;5714:19;5788:2;5779:6;5773:13;5769:22;5764:2;5753:9;5749:18;5742:50;5839:2;5831:6;5827:15;5821:22;5879:4;5874:2;5863:9;5859:18;5852:32;5907:52;5954:3;5943:9;5939:19;5925:12;5907:52;:::i;:::-;5893:66;;6008:2;6000:6;5996:15;5990:22;6080:2;6076:7;6064:9;6056:6;6052:22;6048:36;6043:2;6032:9;6028:18;6021:64;6108:41;6142:6;6126:14;6108:41;:::i;:::-;6094:55;;;6214:2;6208;6200:6;6196:15;6190:22;6186:31;6180:3;6169:9;6165:19;6158:60;6274:3;6266:6;6262:16;6256:23;6249:4;6238:9;6234:20;6227:53;6297:6;6289:14;;;;5517:792;;;;:::o;6314:186::-;6373:6;6426:2;6414:9;6405:7;6401:23;6397:32;6394:52;;;6442:1;6439;6432:12;6394:52;6465:29;6484:9;6465:29;:::i;6505:380::-;6584:1;6580:12;;;;6627;;;6648:61;;6702:4;6694:6;6690:17;6680:27;;6648:61;6755:2;6747:6;6744:14;6724:18;6721:38;6718:161;;6801:10;6796:3;6792:20;6789:1;6782:31;6836:4;6833:1;6826:15;6864:4;6861:1;6854:15;6718:161;;6505:380;;;:::o;6890:289::-;7021:3;7059:6;7053:13;7075:66;7134:6;7129:3;7122:4;7114:6;7110:17;7075:66;:::i;:::-;7157:16;;;;;6890:289;-1:-1:-1;;6890:289:8:o;7184:220::-;7333:2;7322:9;7315:21;7296:4;7353:45;7394:2;7383:9;7379:18;7371:6;7353:45;:::i;8331:291::-;8508:2;8497:9;8490:21;8471:4;8528:45;8569:2;8558:9;8554:18;8546:6;8528:45;:::i;:::-;8520:53;;8609:6;8604:2;8593:9;8589:18;8582:34;8331:291;;;;;:::o;9721:127::-;9782:10;9777:3;9773:20;9770:1;9763:31;9813:4;9810:1;9803:15;9837:4;9834:1;9827:15;9853:128;9920:9;;;9941:11;;;9938:37;;;9955:18;;:::i;9986:388::-;10191:2;10180:9;10173:21;10154:4;10211:45;10252:2;10241:9;10237:18;10229:6;10211:45;:::i;:::-;-1:-1:-1;;;;;10292:32:8;;;;10287:2;10272:18;;10265:60;-1:-1:-1;10356:2:8;10341:18;10334:34;10203:53;9986:388;-1:-1:-1;9986:388:8:o;10784:545::-;10886:2;10881:3;10878:11;10875:448;;;10922:1;10947:5;10943:2;10936:17;10992:4;10988:2;10978:19;11062:2;11050:10;11046:19;11043:1;11039:27;11033:4;11029:38;11098:4;11086:10;11083:20;11080:47;;;-1:-1:-1;11121:4:8;11080:47;11176:2;11171:3;11167:12;11164:1;11160:20;11154:4;11150:31;11140:41;;11231:82;11249:2;11242:5;11239:13;11231:82;;;11294:17;;;11275:1;11264:13;11231:82;;;11235:3;;;10875:448;10784:545;;;:::o;11505:1352::-;11631:3;11625:10;11658:18;11650:6;11647:30;11644:56;;;11680:18;;:::i;:::-;11709:97;11799:6;11759:38;11791:4;11785:11;11759:38;:::i;:::-;11753:4;11709:97;:::i;:::-;11861:4;;11925:2;11914:14;;11942:1;11937:663;;;;12644:1;12661:6;12658:89;;;-1:-1:-1;12713:19:8;;;12707:26;12658:89;-1:-1:-1;;11462:1:8;11458:11;;;11454:24;11450:29;11440:40;11486:1;11482:11;;;11437:57;12760:81;;11907:944;;11937:663;10731:1;10724:14;;;10768:4;10755:18;;-1:-1:-1;;11973:20:8;;;12091:236;12105:7;12102:1;12099:14;12091:236;;;12194:19;;;12188:26;12173:42;;12286:27;;;;12254:1;12242:14;;;;12121:19;;12091:236;;;12095:3;12355:6;12346:7;12343:19;12340:201;;;12416:19;;;12410:26;-1:-1:-1;;12499:1:8;12495:14;;;12511:3;12491:24;12487:37;12483:42;12468:58;12453:74;;12340:201;-1:-1:-1;;;;;12587:1:8;12571:14;;;12567:22;12554:36;;-1:-1:-1;11505:1352:8:o;12862:583::-;13078:4;13124:1;13120;13115:3;13111:11;13107:19;13165:2;13157:6;13153:15;13142:9;13135:34;13205:3;13200:2;13189:9;13185:18;13178:31;13232:46;13273:3;13262:9;13258:19;13250:6;13232:46;:::i;:::-;13326:9;13318:6;13314:22;13309:2;13298:9;13294:18;13287:50;13354:33;13380:6;13372;13354:33;:::i;:::-;13346:41;;;13435:2;13427:6;13423:15;13418:2;13407:9;13403:18;13396:43;;12862:583;;;;;;;:::o;14160:125::-;14225:9;;;14246:10;;;14243:36;;;14259:18;;:::i;14290:127::-;14351:10;14346:3;14342:20;14339:1;14332:31;14382:4;14379:1;14372:15;14406:4;14403:1;14396:15;14422:1435;14541:3;14535:4;14532:13;14529:26;;14548:5;;14422:1435::o;14529:26::-;14578:37;14610:3;14604:10;14578:37;:::i;:::-;14638:18;14630:6;14627:30;14624:56;;;14660:18;;:::i;:::-;14689:97;14779:6;14739:38;14771:4;14765:11;14739:38;:::i;14689:97::-;14812:1;14840:2;14832:6;14829:14;14857:1;14852:748;;;;15644:1;15661:6;15658:89;;;-1:-1:-1;15713:19:8;;;15707:26;15658:89;-1:-1:-1;;11462:1:8;11458:11;;;11454:24;11450:29;11440:40;11486:1;11482:11;;;11437:57;15760:81;;14822:1029;;14852:748;10731:1;10724:14;;;10768:4;10755:18;;-1:-1:-1;;14888:20:8;;;10731:1;10724:14;;;10768:4;10755:18;;15052:9;15074:251;15088:7;15085:1;15082:14;15074:251;;;15170:21;;;15164:28;15149:44;;15220:1;15293:18;;;;15248:15;;;;15111:4;15104:12;15074:251;;;15078:3;15353:6;15344:7;15341:19;15338:203;;;15414:21;;;15408:28;-1:-1:-1;;15499:1:8;15495:14;;;15511:3;15491:24;15487:37;15483:42;15468:58;15453:74;;15338:203;;;;15587:1;15578:6;15575:1;15571:14;15567:22;15561:4;15554:36;14822:1029;;;;14422:1435;;:::o;15862:127::-;15923:10;15918:3;15914:20;15911:1;15904:31;15954:4;15951:1;15944:15;15978:4;15975:1;15968:15;15994:135;16033:3;16054:17;;;16051:43;;16074:18;;:::i;:::-;-1:-1:-1;16121:1:8;16110:13;;15994:135::o","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,string,string,address)":"8d7d180b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"role_given\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper-without-json.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper-without-json.sol\":{\"keccak256\":\"0x8da1f5da60631c7fd64cc6c7114f18c8e409d7b38038a81e4cd802afac4232be\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://9472f7dad3a205e7dcefe74107f36a9a75e384ef83963c6e7342910b1b5f8b57\",\"dweb:/ipfs/QmfZU5Yhcujs8tWkwbEs7UV8gLLUXz6CnG8frF2yeNAH2L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"},{"internalType":"bytes32","name":"role_given","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"string","name":"tokenType","type":"string","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper-without-json.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper-without-json.sol":{"keccak256":"0x8da1f5da60631c7fd64cc6c7114f18c8e409d7b38038a81e4cd802afac4232be","urls":["bzz-raw://9472f7dad3a205e7dcefe74107f36a9a75e384ef83963c6e7342910b1b5f8b57","dweb:/ipfs/QmfZU5Yhcujs8tWkwbEs7UV8gLLUXz6CnG8frF2yeNAH2L"],"license":"GPL-3.0"}},"version":1},"id":6} \ No newline at end of file +{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"},{"name":"role_given","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"string","internalType":"string"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"string","indexed":false,"internalType":"string"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620020cb380380620020cb8339810160408190526200003491620000ea565b816001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f816200009a565b50600480546001600160a01b0319166001600160a01b03939093169290921790915560015562000126565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060408385031215620000fe57600080fd5b82516001600160a01b03811681146200011657600080fd5b6020939093015192949293505050565b611f9580620001366000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063c1733f6811610066578063c1733f6814610208578063d9cf884c14610228578063e1efb5961461023b578063f2fde38b1461024e57600080fd5b80638da5cb5b146101ba578063a1bc17c5146101cb578063b48272cc146101de578063b5bfddea146101f157600080fd5b80634534ba17116100d35780634534ba17146101755780635137b8a714610188578063715018a61461019d5780638d7d180b146101a757600080fd5b806304c2320b146100fa578063056b01ce146101275780631255c1891461014a575b600080fd5b61010d6101083660046118f6565b610261565b60405161011e959493929190611983565b60405180910390f35b61013a6101353660046119cd565b6103bf565b604051901515815260200161011e565b60045461015d906001600160a01b031681565b6040516001600160a01b03909116815260200161011e565b61013a610183366004611a29565b61058e565b610190610792565b60405161011e9190611a80565b6101a561086b565b005b61013a6101b5366004611ae2565b61087f565b6000546001600160a01b031661015d565b61013a6101d93660046118f6565b610b19565b61013a6101ec3660046119cd565b610d14565b6101fa60015481565b60405190815260200161011e565b61021b6102163660046118f6565b610ef4565b60405161011e9190611b67565b61013a6102363660046119cd565b6110b9565b61013a6102493660046119cd565b6113e6565b6101a561025c366004611bd7565b6115c5565b8051602081830181018051600282529282019190930120915280546001820180546001600160a01b03909216929161029890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546102c490611bf2565b80156103115780601f106102e657610100808354040283529160200191610311565b820191906000526020600020905b8154815290600101906020018083116102f457829003601f168201915b50505050509080600201805461032690611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461035290611bf2565b801561039f5780601f106103745761010080835404028352916020019161039f565b820191906000526020600020905b81548152906001019060200180831161038257829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006103c9611603565b60006001600160a01b03166002846040516103e49190611c2c565b908152604051908190036020019020546001600160a01b031603610426578260405163c0bab25f60e01b815260040161041d9190611c48565b60405180910390fd5b60006002846040516104389190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104979190611c2c565b6000604051808303816000865af19150503d80600081146104d4576040519150601f19603f3d011682016040523d82523d6000602084013e6104d9565b606091505b50509050806105235760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b826002856040516105349190611c2c565b9081526020016040518091039020600401819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6848460405161057a929190611c5b565b60405180910390a160019150505b92915050565b6000610598611603565b816002856040516105a99190611c2c565b90815260200160405180910390206004015410156106095760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b6564604482015260640161041d565b600060028560405161061b9190611c2c565b908152604051908190036020018120543060248301526001600160a01b03868116604484015260648301869052169060840160408051601f198184030181529181526020820180516001600160e01b0316632fa96a2760e11b179052516106829190611c2c565b6000604051808303816000865af19150503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b50509050806107155760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c65640000000000000000604482015260640161041d565b826002866040516107269190611c2c565b908152602001604051809103902060040160008282546107469190611c93565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c9061077f90879087908790611ca6565b60405180910390a1506001949350505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156108625783829060005260206000200180546107d590611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461080190611bf2565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050815260200190600101906107b6565b50505050905090565b610873611603565b61087d6000611630565b565b6000610889611603565b60006001600160a01b03166002846040516108a49190611c2c565b908152604051908190036020019020546001600160a01b0316146108dd57826040516319eac8d160e21b815260040161041d9190611c48565b60015460405160248101919091523060448201526000906001600160a01b0387169060640160408051601f198184030181529181526020820180516001600160e01b03166328545c0d60e01b179052516109379190611c2c565b6000604051808303816000865af19150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109c2576002846040516109929190611c2c565b9081526040519081900360200181205463118cdaa760e01b82526001600160a01b0316600482015260240161041d565b6040518060a00160405280876001600160a01b03168152602001868152602001858152602001846001600160a01b031681526020016000815250600285604051610a0c9190611c2c565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610a4b9082611d23565b5060408201516002820190610a609082611d23565b506060820151600382810180546001600160a01b0319166001600160a01b039093169290921790915560809092015160049091015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610acf8582611d23565b507f57951acaa6aa023b66ff5ae829f011ec74aedd1a40654570a33708280743e88186868686604051610b059493929190611de3565b60405180910390a150600195945050505050565b6000610b23611603565b60006001600160a01b0316600283604051610b3e9190611c2c565b908152604051908190036020019020546001600160a01b031603610b77578160405163c0bab25f60e01b815260040161041d9190611c48565b6000600283604051610b899190611c2c565b9081526020016040518091039020600401541115610bbc5781604051635be9608560e11b815260040161041d9190611c48565b610c6e600283604051610bcf9190611c2c565b90815260200160405180910390206002018054610beb90611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1790611bf2565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050611680565b600282604051610c7e9190611c2c565b90815260405190819003602001902080546001600160a01b03191681556000610caa6001830182611805565b610cb8600283016000611805565b506003810180546001600160a01b031916905560006004909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610d03908490611c48565b60405180910390a15060015b919050565b6000610d1e611603565b81600284604051610d2f9190611c2c565b9081526020016040518091039020600401541015610d8f5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b65640000604482015260640161041d565b6000600284604051610da19190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b0316632770a7eb60e21b17905251610e009190611c2c565b6000604051808303816000865af19150503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5050905080610e8c5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b82600285604051610e9d9190611c2c565b90815260200160405180910390206004016000828254610ebd9190611c93565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee999061057a9086908690611c5b565b610f386040518060a0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b600282604051610f489190611c2c565b90815260408051918290036020908101832060a0840190925281546001600160a01b0316835260018201805491840191610f8190611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fad90611bf2565b8015610ffa5780601f10610fcf57610100808354040283529160200191610ffa565b820191906000526020600020905b815481529060010190602001808311610fdd57829003601f168201915b5050505050815260200160028201805461101390611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461103f90611bf2565b801561108c5780601f106110615761010080835404028352916020019161108c565b820191906000526020600020905b81548152906001019060200180831161106f57829003601f168201915b505050918352505060038201546001600160a01b0316602082015260049091015460409091015292915050565b60006110c3611603565b60006001600160a01b03166002846040516110de9190611c2c565b908152604051908190036020019020546001600160a01b031603611117578260405163c0bab25f60e01b815260040161041d9190611c48565b816002846040516111289190611c2c565b908152602001604051809103902060040154101561115d57828260405163076abcf360e51b815260040161041d929190611c5b565b600060028460405161116f9190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b179052516111ce9190611c2c565b6000604051808303816000865af19150503d806000811461120b576040519150601f19603f3d011682016040523d82523d6000602084013e611210565b606091505b505090508061123457836040516358300fe760e01b815260040161041d9190611c48565b60006002856040516112469190611c2c565b908152604051908190036020018120546001600160a01b0316903090600290611270908990611c2c565b908152604051908190036020018120600301546001600160a01b03169060029061129b908a90611c2c565b908152604051908190036020018120600401546001600160a01b039384166024830152919092166044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516113049190611c2c565b6000604051808303816000865af19150503d8060008114611341576040519150601f19603f3d011682016040523d82523d6000602084013e611346565b606091505b5050905080156113cb57836002866040516113619190611c2c565b908152602001604051809103902060040160008282546113819190611c93565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906113b89087908790611c5b565b60405180910390a1600192505050610588565b846040516358300fe760e01b815260040161041d9190611c48565b60006113f0611603565b60006001600160a01b031660028460405161140b9190611c2c565b908152604051908190036020019020546001600160a01b031603611444578260405163c0bab25f60e01b815260040161041d9190611c48565b60006002846040516114569190611c2c565b908152604051908190036020018120546001600160a01b03169060029061147e908790611c2c565b908152604051908190036020018120600301546001600160a01b031660248201523060448201526064810185905260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516114e49190611c2c565b6000604051808303816000865af19150503d8060008114611521576040519150601f19603f3d011682016040523d82523d6000602084013e611526565b606091505b5050905080156115aa57826002856040516115419190611c2c565b908152602001604051809103902060040160008282546115619190611e2c565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc9797906115989086908690611c5b565b60405180910390a16001915050610588565b8360405163412204b560e11b815260040161041d9190611c48565b6115cd611603565b6001600160a01b0381166115f757604051631e4fbdf760e01b81526000600482015260240161041d565b61160081611630565b50565b6000546001600160a01b0316331461087d5760405163118cdaa760e01b815233600482015260240161041d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117da5761173c600382815481106116a3576116a3611e3f565b9060005260206000200180546116b890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546116e490611bf2565b80156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505050836117de565b156117c8576003805461175190600190611c93565b8154811061176157611761611e3f565b906000526020600020016003828154811061177e5761177e611e3f565b9060005260206000200190816117949190611e55565b5060038054806117a6576117a6611f30565b6001900381819060005260206000200160006117c29190611805565b90555050565b806117d281611f46565b915050611683565b5050565b6000815183511480156117fe575081805190602001208380519060200120145b9392505050565b50805461181190611bf2565b6000825580601f10611821575050565b601f01602090049060005260206000209081019061160091905b8082111561184f576000815560010161183b565b5090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261187a57600080fd5b813567ffffffffffffffff8082111561189557611895611853565b604051601f8301601f19908116603f011681019082821181831017156118bd576118bd611853565b816040528381528660208588010111156118d657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561190857600080fd5b813567ffffffffffffffff81111561191f57600080fd5b61192b84828501611869565b949350505050565b60005b8381101561194e578181015183820152602001611936565b50506000910152565b6000815180845261196f816020860160208601611933565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526119a560a0840188611957565b83810360408501526119b78188611957565b9590911660608401525050608001529392505050565b600080604083850312156119e057600080fd5b823567ffffffffffffffff8111156119f757600080fd5b611a0385828601611869565b95602094909401359450505050565b80356001600160a01b0381168114610d0f57600080fd5b600080600060608486031215611a3e57600080fd5b833567ffffffffffffffff811115611a5557600080fd5b611a6186828701611869565b935050611a7060208501611a12565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ad557603f19888603018452611ac3858351611957565b94509285019290850190600101611aa7565b5092979650505050505050565b60008060008060808587031215611af857600080fd5b611b0185611a12565b9350602085013567ffffffffffffffff80821115611b1e57600080fd5b611b2a88838901611869565b94506040870135915080821115611b4057600080fd5b50611b4d87828801611869565b925050611b5c60608601611a12565b905092959194509250565b60208152600060018060a01b03808451166020840152602084015160a06040850152611b9660c0850182611957565b90506040850151601f19858303016060860152611bb38282611957565b915050816060860151166080850152608085015160a0850152809250505092915050565b600060208284031215611be957600080fd5b6117fe82611a12565b600181811c90821680611c0657607f821691505b602082108103611c2657634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611c3e818460208701611933565b9190910192915050565b6020815260006117fe6020830184611957565b604081526000611c6e6040830185611957565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058857610588611c7d565b606081526000611cb96060830186611957565b6001600160a01b039490941660208301525060400152919050565b601f821115611d1e57600081815260208120601f850160051c81016020861015611cfb5750805b601f850160051c820191505b81811015611d1a57828155600101611d07565b5050505b505050565b815167ffffffffffffffff811115611d3d57611d3d611853565b611d5181611d4b8454611bf2565b84611cd4565b602080601f831160018114611d865760008415611d6e5750858301515b600019600386901b1c1916600185901b178555611d1a565b600085815260208120601f198616915b82811015611db557888601518255948401946001909101908401611d96565b5085821015611dd35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b03808716835260806020840152611e056080840187611957565b8381036040850152611e178187611957565b92505080841660608401525095945050505050565b8082018082111561058857610588611c7d565b634e487b7160e01b600052603260045260246000fd5b818103611e60575050565b611e6a8254611bf2565b67ffffffffffffffff811115611e8257611e82611853565b611e9081611d4b8454611bf2565b6000601f821160018114611ec45760008315611eac5750848201545b600019600385901b1c1916600184901b178455611f29565b600085815260209020601f19841690600086815260209020845b83811015611efe5782860154825560019586019590910190602001611ede565b5085831015611f1c5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b600060018201611f5857611f58611c7d565b506001019056fea264697066735822122005a3428b8bd0508dbbaa0c29eae233a4d12d2b0fda9feef2c7e03b0a834ad28764736f6c63430008140033","sourceMap":"689:5698:6:-:0;;;1317:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1383:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;516:51:8;489:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1410:14:6::1;:41:::0;;-1:-1:-1;;;;;;1410:41:6::1;-1:-1:-1::0;;;;;1410:41:6;;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;1461:24:6;689:5698;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:351:8:-;93:6;101;154:2;142:9;133:7;129:23;125:32;122:52;;;170:1;167;160:12;122:52;196:16;;-1:-1:-1;;;;;241:31:8;;231:42;;221:70;;287:1;284;277:12;221:70;355:2;340:18;;;;334:25;310:5;;334:25;;-1:-1:-1;;;14:351:8:o;370:203::-;689:5698:6;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063c1733f6811610066578063c1733f6814610208578063d9cf884c14610228578063e1efb5961461023b578063f2fde38b1461024e57600080fd5b80638da5cb5b146101ba578063a1bc17c5146101cb578063b48272cc146101de578063b5bfddea146101f157600080fd5b80634534ba17116100d35780634534ba17146101755780635137b8a714610188578063715018a61461019d5780638d7d180b146101a757600080fd5b806304c2320b146100fa578063056b01ce146101275780631255c1891461014a575b600080fd5b61010d6101083660046118f6565b610261565b60405161011e959493929190611983565b60405180910390f35b61013a6101353660046119cd565b6103bf565b604051901515815260200161011e565b60045461015d906001600160a01b031681565b6040516001600160a01b03909116815260200161011e565b61013a610183366004611a29565b61058e565b610190610792565b60405161011e9190611a80565b6101a561086b565b005b61013a6101b5366004611ae2565b61087f565b6000546001600160a01b031661015d565b61013a6101d93660046118f6565b610b19565b61013a6101ec3660046119cd565b610d14565b6101fa60015481565b60405190815260200161011e565b61021b6102163660046118f6565b610ef4565b60405161011e9190611b67565b61013a6102363660046119cd565b6110b9565b61013a6102493660046119cd565b6113e6565b6101a561025c366004611bd7565b6115c5565b8051602081830181018051600282529282019190930120915280546001820180546001600160a01b03909216929161029890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546102c490611bf2565b80156103115780601f106102e657610100808354040283529160200191610311565b820191906000526020600020905b8154815290600101906020018083116102f457829003601f168201915b50505050509080600201805461032690611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461035290611bf2565b801561039f5780601f106103745761010080835404028352916020019161039f565b820191906000526020600020905b81548152906001019060200180831161038257829003601f168201915b50505050600383015460049093015491926001600160a01b031691905085565b60006103c9611603565b60006001600160a01b03166002846040516103e49190611c2c565b908152604051908190036020019020546001600160a01b031603610426578260405163c0bab25f60e01b815260040161041d9190611c48565b60405180910390fd5b60006002846040516104389190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104979190611c2c565b6000604051808303816000865af19150503d80600081146104d4576040519150601f19603f3d011682016040523d82523d6000602084013e6104d9565b606091505b50509050806105235760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b826002856040516105349190611c2c565b9081526020016040518091039020600401819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6848460405161057a929190611c5b565b60405180910390a160019150505b92915050565b6000610598611603565b816002856040516105a99190611c2c565b90815260200160405180910390206004015410156106095760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b6564604482015260640161041d565b600060028560405161061b9190611c2c565b908152604051908190036020018120543060248301526001600160a01b03868116604484015260648301869052169060840160408051601f198184030181529181526020820180516001600160e01b0316632fa96a2760e11b179052516106829190611c2c565b6000604051808303816000865af19150503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b50509050806107155760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c65640000000000000000604482015260640161041d565b826002866040516107269190611c2c565b908152602001604051809103902060040160008282546107469190611c93565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c9061077f90879087908790611ca6565b60405180910390a1506001949350505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156108625783829060005260206000200180546107d590611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461080190611bf2565b801561084e5780601f106108235761010080835404028352916020019161084e565b820191906000526020600020905b81548152906001019060200180831161083157829003601f168201915b5050505050815260200190600101906107b6565b50505050905090565b610873611603565b61087d6000611630565b565b6000610889611603565b60006001600160a01b03166002846040516108a49190611c2c565b908152604051908190036020019020546001600160a01b0316146108dd57826040516319eac8d160e21b815260040161041d9190611c48565b60015460405160248101919091523060448201526000906001600160a01b0387169060640160408051601f198184030181529181526020820180516001600160e01b03166328545c0d60e01b179052516109379190611c2c565b6000604051808303816000865af19150503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109c2576002846040516109929190611c2c565b9081526040519081900360200181205463118cdaa760e01b82526001600160a01b0316600482015260240161041d565b6040518060a00160405280876001600160a01b03168152602001868152602001858152602001846001600160a01b031681526020016000815250600285604051610a0c9190611c2c565b90815260405160209181900382019020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610a4b9082611d23565b5060408201516002820190610a609082611d23565b506060820151600382810180546001600160a01b0319166001600160a01b039093169290921790915560809092015160049091015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610acf8582611d23565b507f57951acaa6aa023b66ff5ae829f011ec74aedd1a40654570a33708280743e88186868686604051610b059493929190611de3565b60405180910390a150600195945050505050565b6000610b23611603565b60006001600160a01b0316600283604051610b3e9190611c2c565b908152604051908190036020019020546001600160a01b031603610b77578160405163c0bab25f60e01b815260040161041d9190611c48565b6000600283604051610b899190611c2c565b9081526020016040518091039020600401541115610bbc5781604051635be9608560e11b815260040161041d9190611c48565b610c6e600283604051610bcf9190611c2c565b90815260200160405180910390206002018054610beb90611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1790611bf2565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050611680565b600282604051610c7e9190611c2c565b90815260405190819003602001902080546001600160a01b03191681556000610caa6001830182611805565b610cb8600283016000611805565b506003810180546001600160a01b031916905560006004909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610d03908490611c48565b60405180910390a15060015b919050565b6000610d1e611603565b81600284604051610d2f9190611c2c565b9081526020016040518091039020600401541015610d8f5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b65640000604482015260640161041d565b6000600284604051610da19190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b0316632770a7eb60e21b17905251610e009190611c2c565b6000604051808303816000865af19150503d8060008114610e3d576040519150601f19603f3d011682016040523d82523d6000602084013e610e42565b606091505b5050905080610e8c5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b604482015260640161041d565b82600285604051610e9d9190611c2c565b90815260200160405180910390206004016000828254610ebd9190611c93565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee999061057a9086908690611c5b565b610f386040518060a0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b600282604051610f489190611c2c565b90815260408051918290036020908101832060a0840190925281546001600160a01b0316835260018201805491840191610f8190611bf2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fad90611bf2565b8015610ffa5780601f10610fcf57610100808354040283529160200191610ffa565b820191906000526020600020905b815481529060010190602001808311610fdd57829003601f168201915b5050505050815260200160028201805461101390611bf2565b80601f016020809104026020016040519081016040528092919081815260200182805461103f90611bf2565b801561108c5780601f106110615761010080835404028352916020019161108c565b820191906000526020600020905b81548152906001019060200180831161106f57829003601f168201915b505050918352505060038201546001600160a01b0316602082015260049091015460409091015292915050565b60006110c3611603565b60006001600160a01b03166002846040516110de9190611c2c565b908152604051908190036020019020546001600160a01b031603611117578260405163c0bab25f60e01b815260040161041d9190611c48565b816002846040516111289190611c2c565b908152602001604051809103902060040154101561115d57828260405163076abcf360e51b815260040161041d929190611c5b565b600060028460405161116f9190611c2c565b90815260405190819003602001812054306024830152604482018590526001600160a01b03169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b179052516111ce9190611c2c565b6000604051808303816000865af19150503d806000811461120b576040519150601f19603f3d011682016040523d82523d6000602084013e611210565b606091505b505090508061123457836040516358300fe760e01b815260040161041d9190611c48565b60006002856040516112469190611c2c565b908152604051908190036020018120546001600160a01b0316903090600290611270908990611c2c565b908152604051908190036020018120600301546001600160a01b03169060029061129b908a90611c2c565b908152604051908190036020018120600401546001600160a01b039384166024830152919092166044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516113049190611c2c565b6000604051808303816000865af19150503d8060008114611341576040519150601f19603f3d011682016040523d82523d6000602084013e611346565b606091505b5050905080156113cb57836002866040516113619190611c2c565b908152602001604051809103902060040160008282546113819190611c93565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906113b89087908790611c5b565b60405180910390a1600192505050610588565b846040516358300fe760e01b815260040161041d9190611c48565b60006113f0611603565b60006001600160a01b031660028460405161140b9190611c2c565b908152604051908190036020019020546001600160a01b031603611444578260405163c0bab25f60e01b815260040161041d9190611c48565b60006002846040516114569190611c2c565b908152604051908190036020018120546001600160a01b03169060029061147e908790611c2c565b908152604051908190036020018120600301546001600160a01b031660248201523060448201526064810185905260840160408051601f198184030181529181526020820180516001600160e01b03166317d5759960e31b179052516114e49190611c2c565b6000604051808303816000865af19150503d8060008114611521576040519150601f19603f3d011682016040523d82523d6000602084013e611526565b606091505b5050905080156115aa57826002856040516115419190611c2c565b908152602001604051809103902060040160008282546115619190611e2c565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc9797906115989086908690611c5b565b60405180910390a16001915050610588565b8360405163412204b560e11b815260040161041d9190611c48565b6115cd611603565b6001600160a01b0381166115f757604051631e4fbdf760e01b81526000600482015260240161041d565b61160081611630565b50565b6000546001600160a01b0316331461087d5760405163118cdaa760e01b815233600482015260240161041d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117da5761173c600382815481106116a3576116a3611e3f565b9060005260206000200180546116b890611bf2565b80601f01602080910402602001604051908101604052809291908181526020018280546116e490611bf2565b80156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505050836117de565b156117c8576003805461175190600190611c93565b8154811061176157611761611e3f565b906000526020600020016003828154811061177e5761177e611e3f565b9060005260206000200190816117949190611e55565b5060038054806117a6576117a6611f30565b6001900381819060005260206000200160006117c29190611805565b90555050565b806117d281611f46565b915050611683565b5050565b6000815183511480156117fe575081805190602001208380519060200120145b9392505050565b50805461181190611bf2565b6000825580601f10611821575050565b601f01602090049060005260206000209081019061160091905b8082111561184f576000815560010161183b565b5090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261187a57600080fd5b813567ffffffffffffffff8082111561189557611895611853565b604051601f8301601f19908116603f011681019082821181831017156118bd576118bd611853565b816040528381528660208588010111156118d657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561190857600080fd5b813567ffffffffffffffff81111561191f57600080fd5b61192b84828501611869565b949350505050565b60005b8381101561194e578181015183820152602001611936565b50506000910152565b6000815180845261196f816020860160208601611933565b601f01601f19169290920160200192915050565b600060018060a01b03808816835260a060208401526119a560a0840188611957565b83810360408501526119b78188611957565b9590911660608401525050608001529392505050565b600080604083850312156119e057600080fd5b823567ffffffffffffffff8111156119f757600080fd5b611a0385828601611869565b95602094909401359450505050565b80356001600160a01b0381168114610d0f57600080fd5b600080600060608486031215611a3e57600080fd5b833567ffffffffffffffff811115611a5557600080fd5b611a6186828701611869565b935050611a7060208501611a12565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ad557603f19888603018452611ac3858351611957565b94509285019290850190600101611aa7565b5092979650505050505050565b60008060008060808587031215611af857600080fd5b611b0185611a12565b9350602085013567ffffffffffffffff80821115611b1e57600080fd5b611b2a88838901611869565b94506040870135915080821115611b4057600080fd5b50611b4d87828801611869565b925050611b5c60608601611a12565b905092959194509250565b60208152600060018060a01b03808451166020840152602084015160a06040850152611b9660c0850182611957565b90506040850151601f19858303016060860152611bb38282611957565b915050816060860151166080850152608085015160a0850152809250505092915050565b600060208284031215611be957600080fd5b6117fe82611a12565b600181811c90821680611c0657607f821691505b602082108103611c2657634e487b7160e01b600052602260045260246000fd5b50919050565b60008251611c3e818460208701611933565b9190910192915050565b6020815260006117fe6020830184611957565b604081526000611c6e6040830185611957565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058857610588611c7d565b606081526000611cb96060830186611957565b6001600160a01b039490941660208301525060400152919050565b601f821115611d1e57600081815260208120601f850160051c81016020861015611cfb5750805b601f850160051c820191505b81811015611d1a57828155600101611d07565b5050505b505050565b815167ffffffffffffffff811115611d3d57611d3d611853565b611d5181611d4b8454611bf2565b84611cd4565b602080601f831160018114611d865760008415611d6e5750858301515b600019600386901b1c1916600185901b178555611d1a565b600085815260208120601f198616915b82811015611db557888601518255948401946001909101908401611d96565b5085821015611dd35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b03808716835260806020840152611e056080840187611957565b8381036040850152611e178187611957565b92505080841660608401525095945050505050565b8082018082111561058857610588611c7d565b634e487b7160e01b600052603260045260246000fd5b818103611e60575050565b611e6a8254611bf2565b67ffffffffffffffff811115611e8257611e82611853565b611e9081611d4b8454611bf2565b6000601f821160018114611ec45760008315611eac5750848201545b600019600385901b1c1916600184901b178455611f29565b600085815260209020601f19841690600086815260209020845b83811015611efe5782860154825560019586019590910190602001611ede565b5085831015611f1c5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b600060018201611f5857611f58611c7d565b506001019056fea264697066735822122005a3428b8bd0508dbbaa0c29eae233a4d12d2b0fda9feef2c7e03b0a834ad28764736f6c63430008140033","sourceMap":"689:5698:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;792:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4259:525;;;;;;:::i;:::-;;:::i;:::-;;;2948:14:8;;2941:22;2923:41;;2911:2;2896:18;4259:525:6;2783:187:8;886:29:6;;;;;-1:-1:-1;;;;;886:29:6;;;;;;-1:-1:-1;;;;;3139:32:8;;;3121:51;;3109:2;3094:18;886:29:6;2975:203:8;5285:579:6;;;;;;:::i;:::-;;:::i;5882:94::-;;;:::i;:::-;;;;;;;:::i;2293:101:0:-;;;:::i;:::-;;1498:753:6;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2257:431:6;;;;;;:::i;:::-;;:::i;4790:489::-;;;;;;:::i;:::-;;:::i;755:26::-;;;;;;;;;5481:25:8;;;5469:2;5454:18;755:26:6;5335:177:8;6264:121:6;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3285:967::-;;;;;;:::i;:::-;;:::i;2694:584::-;;;;;;:::i;:::-;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;792:40:6:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;792:40:6;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;792:40:6;;;;;;;;;;;-1:-1:-1;;;;;792:40:6;;;-1:-1:-1;792:40:6;:::o;4259:525::-;4340:12;1531:13:0;:11;:13::i;:::-;4410:1:6::1;-1:-1:-1::0;;;;;4367:45:6::1;:6;4374:7;4367:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4367:31:6::1;:45:::0;4364:107:::1;;4452:7;4434:26;;-1:-1:-1::0;;;4434:26:6::1;;;;;;;;:::i;:::-;;;;;;;;4364:107;4482:16;4504:6;4511:7;4504:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;4598:4:::1;4541:71;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;4504:31:6::1;::::0;7556:18:8;;4541:71:6::1;::::0;;-1:-1:-1;;4541:71:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;4541:71:6::1;-1:-1:-1::0;;;4541:71:6::1;::::0;;4504:109;::::1;::::0;4541:71;4504:109:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4481:132;;;4640:11;4632:46;;;::::0;-1:-1:-1;;;4632:46:6;;8182:2:8;4632:46:6::1;::::0;::::1;8164:21:8::0;8221:2;8201:18;;;8194:30;-1:-1:-1;;;8240:18:8;;;8233:52;8302:18;;4632:46:6::1;7980:346:8::0;4632:46:6::1;4714:6;4689;4696:7;4689:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4735:21;4740:7;4749:6;4735:21;;;;;;;:::i;:::-;;;;;;;;4773:4;4766:11;;;1554:1:0;4259:525:6::0;;;;:::o;5285:579::-;5394:12;1531:13:0;:11;:13::i;:::-;5452:6:6::1;5426;5433:7;5426:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5418:77;;;::::0;-1:-1:-1;;;5418:77:6;;8829:2:8;5418:77:6::1;::::0;::::1;8811:21:8::0;;;8848:18;;;8841:30;8907:34;8887:18;;;8880:62;8959:18;;5418:77:6::1;8627:356:8::0;5418:77:6::1;5507:18;5531:6;5538:7;5531:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;5635:4:::1;5568:99;::::0;::::1;9228:34:8::0;-1:-1:-1;;;;;9298:15:8;;;9278:18;;;9271:43;9330:18;;;9323:34;;;5531:31:6::1;::::0;9163:18:8;;5568:99:6::1;::::0;;-1:-1:-1;;5568:99:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;5568:99:6::1;-1:-1:-1::0;;;5568:99:6::1;::::0;;5531:137;::::1;::::0;5568:99;5531:137:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5506:162;;;5686:13;5678:50;;;::::0;-1:-1:-1;;;5678:50:6;;9570:2:8;5678:50:6::1;::::0;::::1;9552:21:8::0;9609:2;9589:18;;;9582:30;9648:26;9628:18;;;9621:54;9692:18;;5678:50:6::1;9368:348:8::0;5678:50:6::1;5765:6;5739;5746:7;5739:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5795:41:6::1;::::0;::::1;::::0;::::1;::::0;5802:7;;5811:16;;5829:6;;5795:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5853:4:6::1;::::0;5285:579;-1:-1:-1;;;;5285:579:6:o;5882:94::-;5932:15;5966:3;5959:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5882:94;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;1498:753:6:-;1628:16;1531:13:0;:11;:13::i;:::-;1702:1:6::1;-1:-1:-1::0;;;;;1659:45:6::1;:6;1666:7;1659:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;1659:31:6::1;:45;1656:110;;1747:7;1727:28;;-1:-1:-1::0;;;1727:28:6::1;;;;;;;;:::i;1656:110::-;1885:11;::::0;1827:85:::1;::::0;::::1;::::0;::::1;10553:25:8::0;;;;1906:4:6::1;10594:18:8::0;;;10587:60;1781:19:6::1;::::0;-1:-1:-1;;;;;1806:20:6;::::1;::::0;10526:18:8;;1827:85:6::1;::::0;;-1:-1:-1;;1827:85:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;1827:85:6::1;-1:-1:-1::0;;;1827:85:6::1;::::0;;1806:107;::::1;::::0;1827:85;1806:107:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1780:133;;;1932:14;1928:111;;1996:6;2003:7;1996:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;1969:59:6;;-1:-1:-1;;;;;1996:31:6::1;1969:59;::::0;::::1;3121:51:8::0;3094:18;;1969:59:6::1;2975:203:8::0;1928:111:6::1;2067:52;;;;;;;;2073:15;-1:-1:-1::0;;;;;2067:52:6::1;;;;;2090:9;2067:52;;;;2101:7;2067:52;;;;2110:5;-1:-1:-1::0;;;;;2067:52:6::1;;;;;2117:1;2067:52;;::::0;2049:6:::1;2056:7;2049:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;::::1;::::0;;;;;;;;:70;;;;-1:-1:-1;;;;;;2049:70:6::1;-1:-1:-1::0;;;;;2049:70:6;;::::1;;::::0;;;;::::1;::::0;-1:-1:-1;2049:70:6;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2049:70:6::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2049:70:6::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;2049:70:6::1;-1:-1:-1::0;;;;;2049:70:6;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2134:17;;-1:-1:-1;2134:17:6;::::1;::::0;;-1:-1:-1;2134:17:6;;;;;::::1;;2143:7:::0;2134:17;::::1;:::i;:::-;;2175:48;2180:15;2197:9;2208:7;2217:5;2175:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2240:4:6::1;::::0;1498:753;-1:-1:-1;;;;;1498:753:6:o;2257:431::-;2324:12;1531:13:0;:11;:13::i;:::-;2394:1:6::1;-1:-1:-1::0;;;;;2351:45:6::1;:6;2358:7;2351:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2351:31:6::1;:45:::0;2348:108:::1;;2437:7;2419:26;;-1:-1:-1::0;;;2419:26:6::1;;;;;;;;:::i;2348:108::-;2493:1;2468:6;2475:7;2468:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;2465:83;;;2529:7;2517:20;;-1:-1:-1::0;;;2517:20:6::1;;;;;;;;:::i;2465:83::-;2557:40;2573:6;2580:7;2573:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;2557:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;2614:6;2621:7;2614:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;2607:22;;-1:-1:-1;;;;;;2607:22:6::1;::::0;;2614:15:::1;2607:22;::::0;;::::1;2614:15:::0;2607:22:::1;:::i;:::-;;;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;2607:22:6::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2607:22:6::1;::::0;;::::1;;::::0;;::::1;::::0;2645:15:::1;::::0;::::1;::::0;::::1;::::0;2652:7;;2645:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;2677:4:6::1;1554:1:0;2257:431:6::0;;;:::o;4790:489::-;4871:12;1531:13:0;:11;:13::i;:::-;4929:6:6::1;4903;4910:7;4903:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4895:75;;;::::0;-1:-1:-1;;;4895:75:6;;13652:2:8;4895:75:6::1;::::0;::::1;13634:21:8::0;13691:2;13671:18;;;13664:30;13730:32;13710:18;;;13703:60;13780:18;;4895:75:6::1;13450:354:8::0;4895:75:6::1;4982:16;5004:6;5011:7;5004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;5099:4:::1;5041:72;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;5004:31:6::1;::::0;7556:18:8;;5041:72:6::1;::::0;;-1:-1:-1;;5041:72:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;5041:72:6::1;-1:-1:-1::0;;;5041:72:6::1;::::0;;5004:110;::::1;::::0;5041:72;5004:110:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:133;;;5133:11;5125:46;;;::::0;-1:-1:-1;;;5125:46:6;;14011:2:8;5125:46:6::1;::::0;::::1;13993:21:8::0;14050:2;14030:18;;;14023:30;-1:-1:-1;;;14069:18:8;;;14062:52;14131:18;;5125:46:6::1;13809:346:8::0;5125:46:6::1;5208:6;5182;5189:7;5182:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5230:21:6::1;::::0;::::1;::::0;::::1;::::0;5235:7;;5244:6;;5230:21:::1;:::i;6264:121::-:0;6326:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6326:18:6;6363:6;6370:7;6363:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;6356:22;;;;;;;;-1:-1:-1;;;;;6356:22:6;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6356:22:6;;;-1:-1:-1;;6356:22:6;;;;-1:-1:-1;;;;;6356:22:6;;;;;;;;;;;;;;;;6264:121;-1:-1:-1;;6264:121:6:o;3285:967::-;3368:12;1531:13:0;:11;:13::i;:::-;3448:1:6::1;-1:-1:-1::0;;;;;3405:45:6::1;:6;3412:7;3405:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3405:31:6::1;:45:::0;3402:107:::1;;3490:7;3472:26;;-1:-1:-1::0;;;3472:26:6::1;;;;;;;;:::i;3402:107::-;3547:6;3522;3529:7;3522:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;3519:108;;;3600:7;3609:6;3576:40;;-1:-1:-1::0;;;3576:40:6::1;;;;;;;;;:::i;3519:108::-;3638:17;3660:6;3667:7;3660:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;3757:4:::1;3697:74;::::0;::::1;7583:51:8::0;7650:18;;;7643:34;;;-1:-1:-1;;;;;3660:31:6::1;::::0;7556:18:8;;3697:74:6::1;::::0;;-1:-1:-1;;3697:74:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3697:74:6::1;-1:-1:-1::0;;;3697:74:6::1;::::0;;3660:112;::::1;::::0;3697:74;3660:112:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3637:135;;;3786:12;3782:75;;3838:7;3821:25;;-1:-1:-1::0;;;3821:25:6::1;;;;;;;;:::i;3782:75::-;3868:18;3891:6;3898:7;3891:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3891:31:6::1;::::0;3997:4:::1;::::0;4004:6:::1;::::0;:15:::1;::::0;4011:7;;4004:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:21:::1;;::::0;-1:-1:-1;;;;;4004:21:6::1;::::0;4027:6:::1;::::0;:15:::1;::::0;4034:7;;4027:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:22:::1;;::::0;-1:-1:-1;;;;;9246:15:8;;;3928:122:6::1;::::0;::::1;9228:34:8::0;9298:15;;;;9278:18;;;9271:43;9330:18;;;9323:34;9163:18;;3928:122:6::1;::::0;;-1:-1:-1;;3928:122:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;3928:122:6::1;-1:-1:-1::0;;;3928:122:6::1;::::0;;3891:160;::::1;::::0;3928:122;3891:160:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3867:184;;;4064:13;4061:142;;;4119:6;4093;4100:7;4093:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4144:23:6::1;::::0;::::1;::::0;::::1;::::0;4151:7;;4160:6;;4144:23:::1;:::i;:::-;;;;;;;;4188:4;4181:11;;;;;;4061:142;4237:7;4220:25;;-1:-1:-1::0;;;4220:25:6::1;;;;;;;;:::i;2694:584::-:0;2775:12;1531:13:0;:11;:13::i;:::-;2845:1:6::1;-1:-1:-1::0;;;;;2802:45:6::1;:6;2809:7;2802:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2802:31:6::1;:45:::0;2799:107:::1;;2887:7;2869:26;;-1:-1:-1::0;;;2869:26:6::1;;;;;;;;:::i;2799:107::-;2917:16;2938:6;2945:7;2938:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2938:31:6::1;::::0;3036:6:::1;::::0;:15:::1;::::0;3043:7;;3036:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:21:::1;;::::0;-1:-1:-1;;;;;3036:21:6::1;2975:106;::::0;::::1;9228:34:8::0;3067:4:6::1;9278:18:8::0;;;9271:43;9330:18;;;9323:34;;;9163:18;;2975:106:6::1;::::0;;-1:-1:-1;;2975:106:6;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2975:106:6::1;-1:-1:-1::0;;;2975:106:6::1;::::0;;2938:144;::::1;::::0;2975:106;2938:144:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2916:166;;;3096:11;3093:138;;;3149:6;3123;3130:7;3123:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3174:21:6::1;::::0;::::1;::::0;::::1;::::0;3179:7;;3188:6;;3174:21:::1;:::i;:::-;;;;;;;;3216:4;3209:11;;;;;3093:138;3263:7;3248:23;;-1:-1:-1::0;;;3248:23:6::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3121:51:8::0;3094:18;;2672:31:0::1;2975:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3121:51:8;3094:18;;1901:40:0;2975:203:8;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5982:276:6:-;6050:9;6045:207;6069:3;:10;6065:14;;6045:207;;;6104:25;6118:3;6122:1;6118:6;;;;;;;;:::i;:::-;;;;;;;;6104:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6126:2;6104:13;:25::i;:::-;6100:142;;;6158:3;6162:10;;:14;;6175:1;;6162:14;:::i;:::-;6158:19;;;;;;;;:::i;:::-;;;;;;;;6149:3;6153:1;6149:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6195:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;6045:207;5982:276;:::o;6100:142::-;6081:3;;;;:::i;:::-;;;;6045:207;;;;5982:276;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;;3086:1;3070:19;;;;;;3063:1;3047:19;;;;;;:42;3009:80;3002:87;2914:182;-1:-1:-1;;;2914:182:2:o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:719;189:5;242:3;235:4;227:6;223:17;219:27;209:55;;260:1;257;250:12;209:55;296:6;283:20;322:18;359:2;355;352:10;349:36;;;365:18;;:::i;:::-;440:2;434:9;408:2;494:13;;-1:-1:-1;;490:22:8;;;514:2;486:31;482:40;470:53;;;538:18;;;558:22;;;535:46;532:72;;;584:18;;:::i;:::-;624:10;620:2;613:22;659:2;651:6;644:18;705:3;698:4;693:2;685:6;681:15;677:26;674:35;671:55;;;722:1;719;712:12;671:55;786:2;779:4;771:6;767:17;760:4;752:6;748:17;735:54;833:1;826:4;821:2;813:6;809:15;805:26;798:37;853:6;844:15;;;;;;146:719;;;;:::o;870:322::-;939:6;992:2;980:9;971:7;967:23;963:32;960:52;;;1008:1;1005;998:12;960:52;1048:9;1035:23;1081:18;1073:6;1070:30;1067:50;;;1113:1;1110;1103:12;1067:50;1136;1178:7;1169:6;1158:9;1154:22;1136:50;:::i;:::-;1126:60;870:322;-1:-1:-1;;;;870:322:8:o;1197:250::-;1282:1;1292:113;1306:6;1303:1;1300:13;1292:113;;;1382:11;;;1376:18;1363:11;;;1356:39;1328:2;1321:10;1292:113;;;-1:-1:-1;;1439:1:8;1421:16;;1414:27;1197:250::o;1452:271::-;1494:3;1532:5;1526:12;1559:6;1554:3;1547:19;1575:76;1644:6;1637:4;1632:3;1628:14;1621:4;1614:5;1610:16;1575:76;:::i;:::-;1705:2;1684:15;-1:-1:-1;;1680:29:8;1671:39;;;;1712:4;1667:50;;1452:271;-1:-1:-1;;1452:271:8:o;1728:655::-;1972:4;2018:1;2014;2009:3;2005:11;2001:19;2059:2;2051:6;2047:15;2036:9;2029:34;2099:3;2094:2;2083:9;2079:18;2072:31;2126:46;2167:3;2156:9;2152:19;2144:6;2126:46;:::i;:::-;2220:9;2212:6;2208:22;2203:2;2192:9;2188:18;2181:50;2248:33;2274:6;2266;2248:33;:::i;:::-;2317:15;;;;2312:2;2297:18;;2290:43;-1:-1:-1;;2364:3:8;2349:19;2342:35;2240:41;1728:655;-1:-1:-1;;;1728:655:8:o;2388:390::-;2466:6;2474;2527:2;2515:9;2506:7;2502:23;2498:32;2495:52;;;2543:1;2540;2533:12;2495:52;2583:9;2570:23;2616:18;2608:6;2605:30;2602:50;;;2648:1;2645;2638:12;2602:50;2671;2713:7;2704:6;2693:9;2689:22;2671:50;:::i;:::-;2661:60;2768:2;2753:18;;;;2740:32;;-1:-1:-1;;;;2388:390:8:o;3183:173::-;3251:20;;-1:-1:-1;;;;;3300:31:8;;3290:42;;3280:70;;3346:1;3343;3336:12;3361:464;3448:6;3456;3464;3517:2;3505:9;3496:7;3492:23;3488:32;3485:52;;;3533:1;3530;3523:12;3485:52;3573:9;3560:23;3606:18;3598:6;3595:30;3592:50;;;3638:1;3635;3628:12;3592:50;3661;3703:7;3694:6;3683:9;3679:22;3661:50;:::i;:::-;3651:60;;;3730:38;3764:2;3753:9;3749:18;3730:38;:::i;:::-;3720:48;;3815:2;3804:9;3800:18;3787:32;3777:42;;3361:464;;;;;:::o;3830:803::-;3992:4;4021:2;4061;4050:9;4046:18;4091:2;4080:9;4073:21;4114:6;4149;4143:13;4180:6;4172;4165:22;4218:2;4207:9;4203:18;4196:25;;4280:2;4270:6;4267:1;4263:14;4252:9;4248:30;4244:39;4230:53;;4318:2;4310:6;4306:15;4339:1;4349:255;4363:6;4360:1;4357:13;4349:255;;;4456:2;4452:7;4440:9;4432:6;4428:22;4424:36;4419:3;4412:49;4484:40;4517:6;4508;4502:13;4484:40;:::i;:::-;4474:50;-1:-1:-1;4582:12:8;;;;4547:15;;;;4385:1;4378:9;4349:255;;;-1:-1:-1;4621:6:8;;3830:803;-1:-1:-1;;;;;;;3830:803:8:o;4638:692::-;4744:6;4752;4760;4768;4821:3;4809:9;4800:7;4796:23;4792:33;4789:53;;;4838:1;4835;4828:12;4789:53;4861:29;4880:9;4861:29;:::i;:::-;4851:39;;4941:2;4930:9;4926:18;4913:32;4964:18;5005:2;4997:6;4994:14;4991:34;;;5021:1;5018;5011:12;4991:34;5044:50;5086:7;5077:6;5066:9;5062:22;5044:50;:::i;:::-;5034:60;;5147:2;5136:9;5132:18;5119:32;5103:48;;5176:2;5166:8;5163:16;5160:36;;;5192:1;5189;5182:12;5160:36;;5215:52;5259:7;5248:8;5237:9;5233:24;5215:52;:::i;:::-;5205:62;;;5286:38;5320:2;5309:9;5305:18;5286:38;:::i;:::-;5276:48;;4638:692;;;;;;;:::o;5517:792::-;5692:2;5681:9;5674:21;5655:4;5731:1;5727;5722:3;5718:11;5714:19;5788:2;5779:6;5773:13;5769:22;5764:2;5753:9;5749:18;5742:50;5839:2;5831:6;5827:15;5821:22;5879:4;5874:2;5863:9;5859:18;5852:32;5907:52;5954:3;5943:9;5939:19;5925:12;5907:52;:::i;:::-;5893:66;;6008:2;6000:6;5996:15;5990:22;6080:2;6076:7;6064:9;6056:6;6052:22;6048:36;6043:2;6032:9;6028:18;6021:64;6108:41;6142:6;6126:14;6108:41;:::i;:::-;6094:55;;;6214:2;6208;6200:6;6196:15;6190:22;6186:31;6180:3;6169:9;6165:19;6158:60;6274:3;6266:6;6262:16;6256:23;6249:4;6238:9;6234:20;6227:53;6297:6;6289:14;;;;5517:792;;;;:::o;6314:186::-;6373:6;6426:2;6414:9;6405:7;6401:23;6397:32;6394:52;;;6442:1;6439;6432:12;6394:52;6465:29;6484:9;6465:29;:::i;6505:380::-;6584:1;6580:12;;;;6627;;;6648:61;;6702:4;6694:6;6690:17;6680:27;;6648:61;6755:2;6747:6;6744:14;6724:18;6721:38;6718:161;;6801:10;6796:3;6792:20;6789:1;6782:31;6836:4;6833:1;6826:15;6864:4;6861:1;6854:15;6718:161;;6505:380;;;:::o;6890:289::-;7021:3;7059:6;7053:13;7075:66;7134:6;7129:3;7122:4;7114:6;7110:17;7075:66;:::i;:::-;7157:16;;;;;6890:289;-1:-1:-1;;6890:289:8:o;7184:220::-;7333:2;7322:9;7315:21;7296:4;7353:45;7394:2;7383:9;7379:18;7371:6;7353:45;:::i;8331:291::-;8508:2;8497:9;8490:21;8471:4;8528:45;8569:2;8558:9;8554:18;8546:6;8528:45;:::i;:::-;8520:53;;8609:6;8604:2;8593:9;8589:18;8582:34;8331:291;;;;;:::o;9721:127::-;9782:10;9777:3;9773:20;9770:1;9763:31;9813:4;9810:1;9803:15;9837:4;9834:1;9827:15;9853:128;9920:9;;;9941:11;;;9938:37;;;9955:18;;:::i;9986:388::-;10191:2;10180:9;10173:21;10154:4;10211:45;10252:2;10241:9;10237:18;10229:6;10211:45;:::i;:::-;-1:-1:-1;;;;;10292:32:8;;;;10287:2;10272:18;;10265:60;-1:-1:-1;10356:2:8;10341:18;10334:34;10203:53;9986:388;-1:-1:-1;9986:388:8:o;10784:545::-;10886:2;10881:3;10878:11;10875:448;;;10922:1;10947:5;10943:2;10936:17;10992:4;10988:2;10978:19;11062:2;11050:10;11046:19;11043:1;11039:27;11033:4;11029:38;11098:4;11086:10;11083:20;11080:47;;;-1:-1:-1;11121:4:8;11080:47;11176:2;11171:3;11167:12;11164:1;11160:20;11154:4;11150:31;11140:41;;11231:82;11249:2;11242:5;11239:13;11231:82;;;11294:17;;;11275:1;11264:13;11231:82;;;11235:3;;;10875:448;10784:545;;;:::o;11505:1352::-;11631:3;11625:10;11658:18;11650:6;11647:30;11644:56;;;11680:18;;:::i;:::-;11709:97;11799:6;11759:38;11791:4;11785:11;11759:38;:::i;:::-;11753:4;11709:97;:::i;:::-;11861:4;;11925:2;11914:14;;11942:1;11937:663;;;;12644:1;12661:6;12658:89;;;-1:-1:-1;12713:19:8;;;12707:26;12658:89;-1:-1:-1;;11462:1:8;11458:11;;;11454:24;11450:29;11440:40;11486:1;11482:11;;;11437:57;12760:81;;11907:944;;11937:663;10731:1;10724:14;;;10768:4;10755:18;;-1:-1:-1;;11973:20:8;;;12091:236;12105:7;12102:1;12099:14;12091:236;;;12194:19;;;12188:26;12173:42;;12286:27;;;;12254:1;12242:14;;;;12121:19;;12091:236;;;12095:3;12355:6;12346:7;12343:19;12340:201;;;12416:19;;;12410:26;-1:-1:-1;;12499:1:8;12495:14;;;12511:3;12491:24;12487:37;12483:42;12468:58;12453:74;;12340:201;-1:-1:-1;;;;;12587:1:8;12571:14;;;12567:22;12554:36;;-1:-1:-1;11505:1352:8:o;12862:583::-;13078:4;13124:1;13120;13115:3;13111:11;13107:19;13165:2;13157:6;13153:15;13142:9;13135:34;13205:3;13200:2;13189:9;13185:18;13178:31;13232:46;13273:3;13262:9;13258:19;13250:6;13232:46;:::i;:::-;13326:9;13318:6;13314:22;13309:2;13298:9;13294:18;13287:50;13354:33;13380:6;13372;13354:33;:::i;:::-;13346:41;;;13435:2;13427:6;13423:15;13418:2;13407:9;13403:18;13396:43;;12862:583;;;;;;;:::o;14160:125::-;14225:9;;;14246:10;;;14243:36;;;14259:18;;:::i;14290:127::-;14351:10;14346:3;14342:20;14339:1;14332:31;14382:4;14379:1;14372:15;14406:4;14403:1;14396:15;14422:1435;14541:3;14535:4;14532:13;14529:26;;14548:5;;14422:1435::o;14529:26::-;14578:37;14610:3;14604:10;14578:37;:::i;:::-;14638:18;14630:6;14627:30;14624:56;;;14660:18;;:::i;:::-;14689:97;14779:6;14739:38;14771:4;14765:11;14739:38;:::i;14689:97::-;14812:1;14840:2;14832:6;14829:14;14857:1;14852:748;;;;15644:1;15661:6;15658:89;;;-1:-1:-1;15713:19:8;;;15707:26;15658:89;-1:-1:-1;;11462:1:8;11458:11;;;11454:24;11450:29;11440:40;11486:1;11482:11;;;11437:57;15760:81;;14822:1029;;14852:748;10731:1;10724:14;;;10768:4;10755:18;;-1:-1:-1;;14888:20:8;;;10731:1;10724:14;;;10768:4;10755:18;;15052:9;15074:251;15088:7;15085:1;15082:14;15074:251;;;15170:21;;;15164:28;15149:44;;15220:1;15293:18;;;;15248:15;;;;15111:4;15104:12;15074:251;;;15078:3;15353:6;15344:7;15341:19;15338:203;;;15414:21;;;15408:28;-1:-1:-1;;15499:1:8;15495:14;;;15511:3;15491:24;15487:37;15483:42;15468:58;15453:74;;15338:203;;;;15587:1;15578:6;15575:1;15571:14;15567:22;15561:4;15554:36;14822:1029;;;;14422:1435;;:::o;15862:127::-;15923:10;15918:3;15914:20;15911:1;15904:31;15954:4;15951:1;15944:15;15978:4;15975:1;15968:15;15994:135;16033:3;16054:17;;;16051:43;;16074:18;;:::i;:::-;-1:-1:-1;16121:1:8;16110:13;;15994:135::o","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,string,string,address)":"8d7d180b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"role_given\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"tokenType\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper-without-json.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper-without-json.sol\":{\"keccak256\":\"0x8da1f5da60631c7fd64cc6c7114f18c8e409d7b38038a81e4cd802afac4232be\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://9472f7dad3a205e7dcefe74107f36a9a75e384ef83963c6e7342910b1b5f8b57\",\"dweb:/ipfs/QmfZU5Yhcujs8tWkwbEs7UV8gLLUXz6CnG8frF2yeNAH2L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"},{"internalType":"bytes32","name":"role_given","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"string","name":"tokenType","type":"string","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"string","name":"tokenType","type":"string"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper-without-json.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper-without-json.sol":{"keccak256":"0x8da1f5da60631c7fd64cc6c7114f18c8e409d7b38038a81e4cd802afac4232be","urls":["bzz-raw://9472f7dad3a205e7dcefe74107f36a9a75e384ef83963c6e7342910b1b5f8b57","dweb:/ipfs/QmfZU5Yhcujs8tWkwbEs7UV8gLLUXz6CnG8frF2yeNAH2L"],"license":"GPL-3.0"}},"version":1},"id":6} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json index 250c49c927..a1ed6ed5c3 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json @@ -1 +1 @@ -{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"tokensInteractions","inputs":[{"name":"","type":"string","internalType":"string"},{"name":"","type":"uint8","internalType":"enum InteractionType"}],"outputs":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"available","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"interactions","type":"tuple[]","internalType":"struct InteractionSignature[]","components":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"functionsSignature","type":"string[]","internalType":"string[]"},{"name":"variables","type":"uint8[][]","internalType":"enum VarType[][]"},{"name":"available","type":"bool","internalType":"bool"}]}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"uint8","indexed":false,"internalType":"enum TokenType"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b5060405162002c7738038062002c778339810160408190526200003491620000e6565b806001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f8162000096565b50600480546001600160a01b0319166001600160a01b039290921691909117905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f957600080fd5b81516001600160a01b03811681146200011157600080fd5b9392505050565b612b4f80620001286000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220d2d5a88633237cc5040d057e26c565ffe5bb3210798fece3ead31992c778084364736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;1703:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1749:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:8;428:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1776:14:7::1;:41:::0;;-1:-1:-1;;;;;;1776:41:7::1;-1:-1:-1::0;;;;;1776:41:7;;;::::1;::::0;;;::::1;::::0;;1008:8352;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:290:8:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:8;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:8:o;309:203::-;1008:8352:7;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220d2d5a88633237cc5040d057e26c565ffe5bb3210798fece3ead31992c778084364736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1074:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4469:419;;;;;;:::i;:::-;;:::i;:::-;;;3609:14:8;;3602:22;3584:41;;3572:2;3557:18;4469:419:7;3444:187:8;1269:29:7;;;;;-1:-1:-1;;;;;1269:29:7;;;;;;-1:-1:-1;;;;;3800:32:8;;;3782:51;;3770:2;3755:18;1269:29:7;3636:203:8;5281:461:7;;;;;;:::i;:::-;;:::i;5760:94::-;;;:::i;:::-;;;;;;;:::i;1830:816::-;;;;;;:::i;:::-;;:::i;2293:101:0:-;;;:::i;:::-;;2652:252:7;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2910:431:7;;;;;;:::i;:::-;;:::i;4894:381::-;;;;;;:::i;:::-;;:::i;6142:121::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3838:624::-;;;;;;:::i;:::-;;:::i;3347:484::-;;;;;;:::i;:::-;;:::i;1149:94::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:94:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;1074:40:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;;;1074:40:7;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1074:40:7;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;1074:40:7;:::o;4469:419::-;4550:12;1531:13:0;:11;:13::i;:::-;4620:1:7::1;-1:-1:-1::0;;;;;4577:45:7::1;:6;4584:7;4577:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4577:31:7::1;:45:::0;4574:107:::1;;4662:7;4644:26;;-1:-1:-1::0;;;4644:26:7::1;;;;;;;;:::i;:::-;;;;;;;;4574:107;4707:47;4716:7;4725:20;4747:6;4707:8;:47::i;:::-;4699:83;;;::::0;-1:-1:-1;;;4699:83:7;;15099:2:8;4699:83:7::1;::::0;::::1;15081:21:8::0;15138:2;15118:18;;;15111:30;-1:-1:-1;;;15157:18:8;;;15150:52;15219:18;;4699:83:7::1;14897:346:8::0;4699:83:7::1;4818:6;4793;4800:7;4793:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4839:21;4844:7;4853:6;4839:21;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;4877:4:7::1;1554:1:0;4469:419:7::0;;;;:::o;5281:461::-;5390:12;1531:13:0;:11;:13::i;:::-;5448:6:7::1;5422;5429:7;5422:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5414:77;;;::::0;-1:-1:-1;;;5414:77:7;;15746:2:8;5414:77:7::1;::::0;::::1;15728:21:8::0;;;15765:18;;;15758:30;15824:34;15804:18;;;15797:62;15876:18;;5414:77:7::1;15544:356:8::0;5414:77:7::1;5510:67;5519:7;5528:22;5552:6;5560:16;5510:8;:67::i;:::-;5502:104;;;::::0;-1:-1:-1;;;5502:104:7;;16107:2:8;5502:104:7::1;::::0;::::1;16089:21:8::0;16146:2;16126:18;;;16119:30;16185:26;16165:18;;;16158:54;16229:18;;5502:104:7::1;15905:348:8::0;5502:104:7::1;5643:6;5617;5624:7;5617:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5673:41:7::1;::::0;::::1;::::0;::::1;::::0;5680:7;;5689:16;;5707:6;;5673:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5731:4:7::1;5281:461:::0;;;;;:::o;5760:94::-;5810:15;5844:3;5837:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5760:94;:::o;1830:816::-;2001:16;1531:13:0;:11;:13::i;:::-;2075:1:7::1;-1:-1:-1::0;;;;;2032:45:7::1;:6;2039:7;2032:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2032:31:7::1;:45;2029:110;;2120:7;2100:28;;-1:-1:-1::0;;;2100:28:7::1;;;;;;;;:::i;2029:110::-;2149:53;2180:7;2189:12;2149:30;:53::i;:::-;2216:18;2235:7;2216:27;;;;;;:::i;:::-;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;2244:30:::1;2216:59;::::0;;;;;;;;:69:::1;::::0;::::1;;2213:221;;;2309:49;2318:7;2327:30;2309:8;:49::i;:::-;2301:122;;;::::0;-1:-1:-1;;;2301:122:7;;17118:2:8;2301:122:7::1;::::0;::::1;17100:21:8::0;17157:2;17137:18;;;17130:30;17196:34;17176:18;;;17169:62;17267:30;17247:18;;;17240:58;17315:19;;2301:122:7::1;16916:424:8::0;2301:122:7::1;2462:52;;;;;;;;2468:15;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2485:9;2462:52;;;;;;;;:::i;:::-;;;;;2496:7;2462:52;;;;2505:5;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2512:1;2462:52;;::::0;2444:6:::1;2451:7;2444:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;:70;;;;-1:-1:-1;;;;;2444:70:7;;::::1;-1:-1:-1::0;;;;;;2444:70:7;::::1;::::0;::::1;::::0;;;;::::1;::::0;:15;;;;-1:-1:-1;;;;;;2444:70:7;;-1:-1:-1;;;2444:70:7;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2444:70:7::1;-1:-1:-1::0;;;;;2444:70:7;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2529:17;;-1:-1:-1;2529:17:7;::::1;::::0;;-1:-1:-1;2529:17:7;;;;;::::1;;2538:7:::0;2529:17;::::1;:::i;:::-;;2570:48;2575:15;2592:9;2603:7;2612:5;2570:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2635:4:7::1;1830:816:::0;;;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2652:252:7:-;2778:16;1531:13:0;:11;:13::i;:::-;2813:4:7::1;:9;2823:15:::0;2840:9;2851:7;2860:5;2894:1:::1;2867:29;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2867:29:7::1;;;;;;;;;;;;;;;;;2813:84;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2806:91;;1554:1:0;2652:252:7::0;;;;;;:::o;2910:431::-;2977:12;1531:13:0;:11;:13::i;:::-;3047:1:7::1;-1:-1:-1::0;;;;;3004:45:7::1;:6;3011:7;3004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3004:31:7::1;:45:::0;3001:108:::1;;3090:7;3072:26;;-1:-1:-1::0;;;3072:26:7::1;;;;;;;;:::i;3001:108::-;3146:1;3121:6;3128:7;3121:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;3118:83;;;3182:7;3170:20;;-1:-1:-1::0;;;3170:20:7::1;;;;;;;;:::i;3118:83::-;3210:40;3226:6;3233:7;3226:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;3210:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;3267:6;3274:7;3267:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;3260:22;;-1:-1:-1;;;;;;3260:22:7;;;3267:15:::1;3260:22;::::0;;::::1;3267:15:::0;3260:22:::1;:::i;:::-;-1:-1:-1::0;3260:22:7::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;3260:22:7::1;::::0;;::::1;;::::0;;::::1;::::0;3298:15:::1;::::0;::::1;::::0;::::1;::::0;3305:7;;3298:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;3330:4:7::1;1554:1:0;2910:431:7::0;;;:::o;4894:381::-;4975:12;1531:13:0;:11;:13::i;:::-;5033:6:7::1;5007;5014:7;5007:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4999:75;;;::::0;-1:-1:-1;;;4999:75:7;;24155:2:8;4999:75:7::1;::::0;::::1;24137:21:8::0;24194:2;24174:18;;;24167:30;24233:32;24213:18;;;24206:60;24283:18;;4999:75:7::1;23953:354:8::0;4999:75:7::1;5093:47;5102:7;5111:20;5133:6;5093:8;:47::i;:::-;5085:82;;;::::0;-1:-1:-1;;;5085:82:7;;24514:2:8;5085:82:7::1;::::0;::::1;24496:21:8::0;24553:2;24533:18;;;24526:30;-1:-1:-1;;;24572:18:8;;;24565:52;24634:18;;5085:82:7::1;24312:346:8::0;5085:82:7::1;5204:6;5178;5185:7;5178:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5226:21:7::1;::::0;::::1;::::0;::::1;::::0;5231:7;;5240:6;;5226:21:::1;:::i;6142:121::-:0;6204:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6204:18:7;6241:6;6248:7;6241:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6234:22;;;;;;;;-1:-1:-1;;;;;6234:22:7;;;;6241:15;;6234:22;;;-1:-1:-1;;;6234:22:7;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6234:22:7;;;-1:-1:-1;;6234:22:7;;;;-1:-1:-1;;;;;6234:22:7;;;;;;;;;;;;;;;;6142:121;-1:-1:-1;;6142:121:7:o;3838:624::-;3921:12;1531:13:0;:11;:13::i;:::-;4001:1:7::1;-1:-1:-1::0;;;;;3958:45:7::1;:6;3965:7;3958:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3958:31:7::1;:45:::0;3955:107:::1;;4043:7;4025:26;;-1:-1:-1::0;;;4025:26:7::1;;;;;;;;:::i;3955:107::-;4100:6;4075;4082:7;4075:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;4072:108;;;4153:7;4162:6;4129:40;;-1:-1:-1::0;;;4129:40:7::1;;;;;;;;;:::i;4072:108::-;4190:18;4211:49;4220:7;4229:22;4253:6;4211:8;:49::i;:::-;4190:70;;4274:13;4271:142;;;4329:6;4303;4310:7;4303:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4354:23:7::1;::::0;::::1;::::0;::::1;::::0;4361:7;;4370:6;;4354:23:::1;:::i;:::-;;;;;;;;4398:4;4391:11;;;;;4271:142;4447:7;4430:25;;-1:-1:-1::0;;;4430:25:7::1;;;;;;;;:::i;3347:484::-:0;3428:12;1531:13:0;:11;:13::i;:::-;3498:1:7::1;-1:-1:-1::0;;;;;3455:45:7::1;:6;3462:7;3455:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3455:31:7::1;:45:::0;3452:107:::1;;3540:7;3522:26;;-1:-1:-1::0;;;3522:26:7::1;;;;;;;;:::i;3452:107::-;3569:16;3588:47;3597:7;3606:20;3628:6;3588:8;:47::i;:::-;3569:66;;3649:11;3646:138;;;3702:6;3676;3683:7;3676:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3727:21:7::1;::::0;::::1;::::0;::::1;::::0;3732:7;;3741:6;;3727:21:::1;:::i;3646:138::-;3816:7;3801:23;;-1:-1:-1::0;;;3801:23:7::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3782:51:8::0;3755:18;;2672:31:0::1;3636:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3782:51:8;3755:18;;1901:40:0;3636:203:8;6742:200:7;6850:12;6881:54;6890:7;6899:15;6916:6;6932:1;6948:888;7074:4;7095:18;7114:7;7095:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7123:15;7095:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7095:44:7;:54;;;;;7090:98;;-1:-1:-1;7172:5:7;7165:12;;7090:98;7203:6;7198:598;7219:18;7238:7;7219:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7247:15;7219:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7219:44:7;:63;;:70;7215:74;;7198:598;;;7310:23;7370:18;7389:7;7370:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7398:15;7370:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:63;;7434:1;7370:66;;;;;;;;:::i;:::-;;;;;;;;7353:84;;;;;;;;:::i;:::-;;;;;;;;;;;;;7343:95;;;;;;7310:129;;7454:26;7483:137;7503:16;7521:98;7534:18;7553:7;7534:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7562:15;7534:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:54;;7589:1;7534:57;;;;;;;;:::i;:::-;;;;;;;;7521:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7593:7;7602:8;7612:6;7521:12;:98::i;:::-;7483:19;:137::i;:::-;7454:166;;7636:16;7658:6;7665:7;7658:15;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;7658:31:7;;:51;;7695:13;;7658:51;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7635:74;;;7728:11;7723:63;;7766:5;7759:12;;;;;;;;7723:63;7296:500;;;7291:3;;;;;:::i;:::-;;;;7198:598;;;-1:-1:-1;7821:4:7;;6948:888;-1:-1:-1;;;;;6948:888:7:o;6269:281::-;6399:6;6395:149;6415:12;:19;6411:1;:23;6395:149;;;6518:12;6531:1;6518:15;;;;;;;;:::i;:::-;;;;;;;6455:18;6474:7;6455:27;;;;;;:::i;:::-;;;;;;;;;;;;;:60;6483:12;6496:1;6483:15;;;;;;;;:::i;:::-;;;;;;;:31;;;6455:60;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;6455:60:7;:78;;;;:60;;-1:-1:-1;;6455:78:7;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;-1:-1:-1;;6455:78:7;;;;;;;;;;6436:3;;;;:::i;:::-;;;;6395:149;;;;6269:281;;:::o;6556:180::-;6649:12;6680:49;6689:7;6698:15;6715:1;6726;6680:8;:49::i;:::-;6673:56;6556:180;-1:-1:-1;;;6556:180:7:o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5860:276:7:-;5928:9;5923:207;5947:3;:10;5943:14;;5923:207;;;5982:25;5996:3;6000:1;5996:6;;;;;;;;:::i;:::-;;;;;;;;5982:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6004:2;5982:13;:25::i;:::-;5978:142;;;6036:3;6040:10;;:14;;6053:1;;6040:14;:::i;:::-;6036:19;;;;;;;;:::i;:::-;;;;;;;;6027:3;6031:1;6027:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6073:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;5923:207;5860:276;:::o;5978:142::-;5959:3;;;;:::i;:::-;;;;5923:207;;;;5860:276;:::o;8230:1128::-;8361:14;8386:28;8429:9;:16;-1:-1:-1;;;;;8417:29:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8386:60;;8461:6;8456:866;8477:9;:16;8473:1;:20;8456:866;;;8534:14;8518:9;8528:1;8518:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8514:798;;8587:25;;;8606:4;8587:25;;;3782:51:8;3755:18;8587:25:7;;;;;;;;;;;;;8568:13;8582:1;8568:16;;;;;;;;:::i;:::-;;;;;;:44;;;;8514:798;;;8653:15;8637:9;8647:1;8637:12;;;;;;;;:::i;:::-;;;;;;;:31;;;;;;;;:::i;:::-;;8633:679;;8718:7;8707:19;;;;;;;;:::i;8633:679::-;8767:14;8751:9;8761:1;8751:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8747:565;;8820:18;;;;;;27922:25:8;;;27895:18;8820::7;27776:177:8;8747:565:7;8879:13;8863:9;8873:1;8863:12;;;;;;;;:::i;:::-;;;;;;;:29;;;;;;;;:::i;:::-;;8859:453;;8942:6;8949:7;8942:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:21;;;-1:-1:-1;;;;;8942:21:7;8931:33;;;3782:51:8;3755:18;8931:33:7;3636:203:8;8859:453:7;9005:23;8989:9;8999:1;8989:12;;;;;;;;:::i;:::-;;;;;;;:39;;;;;;;;:::i;:::-;;8985:327;;9078:6;9085:7;9078:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;9078:31:7;9067:43;;;3782:51:8;3755:18;9067:43:7;3636:203:8;8985:327:7;9151:16;9135:9;9145:1;9135:12;;;;;;;;:::i;:::-;;;;;;;:32;;;;;;;;:::i;:::-;;9131:181;;9206:20;;;-1:-1:-1;;;;;3800:32:8;;9206:20:7;;;3782:51:8;3755:18;9206:20:7;3636:203:8;9131:181:7;9265:32;;-1:-1:-1;;;9265:32:7;;28160:2:8;9265:32:7;;;28142:21:8;28199:2;28179:18;;;28172:30;-1:-1:-1;;;28218:18:8;;;28211:52;28280:18;;9265:32:7;27958:346:8;9131:181:7;8495:3;;;;:::i;:::-;;;;8456:866;;;-1:-1:-1;9338:13:7;8230:1128;-1:-1:-1;;;;;8230:1128:7:o;7842:382::-;8003:34;;;-1:-1:-1;;;;;;28448:33:8;;8003:34:7;;;28436:46:8;8003:34:7;;;;;;;;;28498:11:8;;;;8003:34:7;;;8052:9;8047:141;8071:13;:20;8067:1;:24;8047:141;;;8145:13;8160;8174:1;8160:16;;;;;;;;:::i;:::-;;;;;;;8128:49;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8112:65;;8093:3;;;;;:::i;:::-;;;;8047:141;;;;7842:382;;;;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;-1:-1:-1;;3070:19:2;;;;;;;3047;;;;;;;;;;:42;;2914:182::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;218:2;212:9;260:3;248:16;;-1:-1:-1;;;;;279:34:8;;315:22;;;276:62;273:88;;;341:18;;:::i;:::-;377:2;370:22;146:252;:::o;403:275::-;474:2;468:9;539:2;520:13;;-1:-1:-1;;516:27:8;504:40;;-1:-1:-1;;;;;559:34:8;;595:22;;;556:62;553:88;;;621:18;;:::i;:::-;657:2;650:22;403:275;;-1:-1:-1;403:275:8:o;683:531::-;726:5;779:3;772:4;764:6;760:17;756:27;746:55;;797:1;794;787:12;746:55;833:6;820:20;-1:-1:-1;;;;;855:2:8;852:26;849:52;;;881:18;;:::i;:::-;925:55;968:2;949:13;;-1:-1:-1;;945:27:8;974:4;941:38;925:55;:::i;:::-;1005:2;996:7;989:19;1051:3;1044:4;1039:2;1031:6;1027:15;1023:26;1020:35;1017:55;;;1068:1;1065;1058:12;1017:55;1133:2;1126:4;1118:6;1114:17;1107:4;1098:7;1094:18;1081:55;1181:1;1156:16;;;1174:4;1152:27;1145:38;;;;1160:7;683:531;-1:-1:-1;;;683:531:8:o;1219:322::-;1288:6;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;-1:-1:-1;;;;;1422:6:8;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485;1527:7;1518:6;1507:9;1503:22;1485:50;:::i;1546:127::-;1607:10;1602:3;1598:20;1595:1;1588:31;1638:4;1635:1;1628:15;1662:4;1659:1;1652:15;1678:140;1759:1;1752:5;1749:12;1739:46;;1765:18;;:::i;:::-;1794;;1678:140::o;1823:250::-;1908:1;1918:113;1932:6;1929:1;1926:13;1918:113;;;2008:11;;;2002:18;1989:11;;;1982:39;1954:2;1947:10;1918:113;;;-1:-1:-1;;2065:1:8;2047:16;;2040:27;1823:250::o;2078:271::-;2120:3;2158:5;2152:12;2185:6;2180:3;2173:19;2201:76;2270:6;2263:4;2258:3;2254:14;2247:4;2240:5;2236:16;2201:76;:::i;:::-;2331:2;2310:15;-1:-1:-1;;2306:29:8;2297:39;;;;2338:4;2293:50;;2078:271;-1:-1:-1;;2078:271:8:o;2354:594::-;-1:-1:-1;;;;;2665:15:8;;;2647:34;;2590:4;;2690:53;2739:2;2724:18;;2716:6;2690:53;:::i;:::-;2779:3;2774:2;2763:9;2759:18;2752:31;2800:46;2841:3;2830:9;2826:19;2818:6;2800:46;:::i;:::-;2882:15;;2877:2;2862:18;;2855:43;-1:-1:-1;2929:3:8;2914:19;2907:35;2792:54;2354:594;-1:-1:-1;;;2354:594:8:o;2953:390::-;3031:6;3039;3092:2;3080:9;3071:7;3067:23;3063:32;3060:52;;;3108:1;3105;3098:12;3060:52;3148:9;3135:23;-1:-1:-1;;;;;3173:6:8;3170:30;3167:50;;;3213:1;3210;3203:12;3167:50;3236;3278:7;3269:6;3258:9;3254:22;3236:50;:::i;:::-;3226:60;3333:2;3318:18;;;;3305:32;;-1:-1:-1;;;;2953:390:8:o;3844:173::-;3912:20;;-1:-1:-1;;;;;3961:31:8;;3951:42;;3941:70;;4007:1;4004;3997:12;4022:464;4109:6;4117;4125;4178:2;4166:9;4157:7;4153:23;4149:32;4146:52;;;4194:1;4191;4184:12;4146:52;4234:9;4221:23;-1:-1:-1;;;;;4259:6:8;4256:30;4253:50;;;4299:1;4296;4289:12;4253:50;4322;4364:7;4355:6;4344:9;4340:22;4322:50;:::i;:::-;4312:60;;;4391:38;4425:2;4414:9;4410:18;4391:38;:::i;:::-;4381:48;;4476:2;4465:9;4461:18;4448:32;4438:42;;4022:464;;;;;:::o;4491:803::-;4653:4;4682:2;4722;4711:9;4707:18;4752:2;4741:9;4734:21;4775:6;4810;4804:13;4841:6;4833;4826:22;4879:2;4868:9;4864:18;4857:25;;4941:2;4931:6;4928:1;4924:14;4913:9;4909:30;4905:39;4891:53;;4979:2;4971:6;4967:15;5000:1;5010:255;5024:6;5021:1;5018:13;5010:255;;;5117:2;5113:7;5101:9;5093:6;5089:22;5085:36;5080:3;5073:49;5145:40;5178:6;5169;5163:13;5145:40;:::i;:::-;5135:50;-1:-1:-1;5243:12:8;;;;5208:15;;;;5046:1;5039:9;5010:255;;;-1:-1:-1;5282:6:8;;4491:803;-1:-1:-1;;;;;;;4491:803:8:o;5299:150::-;5374:20;;5423:1;5413:12;;5403:40;;5439:1;5436;5429:12;5454:203;5534:4;-1:-1:-1;;;;;5559:6:8;5556:30;5553:56;;;5589:18;;:::i;:::-;-1:-1:-1;5634:1:8;5630:14;5646:4;5626:25;;5454:203::o;5662:156::-;5743:20;;5792:1;5782:12;;5772:40;;5808:1;5805;5798:12;5823:1931;5892:5;5945:3;5938:4;5930:6;5926:17;5922:27;5912:55;;5963:1;5960;5953:12;5912:55;5999:6;5986:20;6025:4;6049:80;6065:63;6125:2;6065:63;:::i;:::-;6049:80;:::i;:::-;6163:15;;;6225:1;6265:11;;;6253:24;;6249:33;;;6194:12;;;;6151:3;6294:15;;;6291:35;;;6322:1;6319;6312:12;6291:35;6358:2;6350:6;6346:15;6370:1355;6386:6;6381:3;6378:15;6370:1355;;;6472:3;6459:17;-1:-1:-1;;;;;6495:11:8;6492:35;6489:125;;;6568:1;6597:2;6593;6586:14;6489:125;6637:24;;6696:2;6688:11;;6684:21;-1:-1:-1;6674:119:8;;6747:1;6776:2;6772;6765:14;6674:119;6837:2;6833;6829:11;6816:25;6864:2;6892:80;6908:63;6968:2;6908:63;:::i;6892:80::-;7016:17;;;7110:11;;;7102:20;;7098:29;;;7055:14;;;;7143:17;;;7140:107;;;7201:1;7230:2;7226;7219:14;7140:107;7273:11;;;;7297:355;7315:8;7308:5;7305:19;7297:355;;;7409:5;7396:19;7383:32;;7452:1;7445:5;7442:12;7432:129;;7505:1;7539:3;7534;7527:16;7432:129;7578:20;;;7336:14;;;;7624;;;;7297:355;;;7665:18;;-1:-1:-1;;;7703:12:8;;;;-1:-1:-1;6403:12:8;;6370:1355;;;-1:-1:-1;7743:5:8;;5823:1931;-1:-1:-1;;;;;;;5823:1931:8:o;7759:118::-;7845:5;7838:13;7831:21;7824:5;7821:32;7811:60;;7867:1;7864;7857:12;7882:128;7947:20;;7976:28;7947:20;7976:28;:::i;8015:3590::-;8197:6;8205;8213;8221;8229;8282:3;8270:9;8261:7;8257:23;8253:33;8250:53;;;8299:1;8296;8289:12;8250:53;8322:29;8341:9;8322:29;:::i;:::-;8312:39;;8370:45;8411:2;8400:9;8396:18;8370:45;:::i;:::-;8360:55;;-1:-1:-1;;;;;8458:2:8;8447:9;8443:18;8430:32;8427:56;8424:76;;;8496:1;8493;8486:12;8424:76;8519;8587:7;8580:2;8569:9;8565:18;8552:32;8541:9;8537:48;8519:76;:::i;:::-;8509:86;;8614:38;8648:2;8637:9;8633:18;8614:38;:::i;:::-;8604:48;;-1:-1:-1;;;;;8695:3:8;8684:9;8680:19;8667:33;8664:57;8661:77;;;8734:1;8731;8724:12;8661:77;8823:7;8816:4;8808:3;8797:9;8793:19;8780:33;8769:9;8765:49;8761:60;8757:74;8747:102;;8845:1;8842;8835:12;8747:102;8869:141;8885:124;9001:3;8990:9;8986:19;8973:33;8962:9;8958:49;8945:63;8885:124;:::i;8869:141::-;9112:3;9097:19;;9084:33;9069:49;;9056:63;;9044:76;;;9145:2;9136:12;;;;9032:3;9226:1;9222:71;;;;9167:127;;;9163:136;9160:149;-1:-1:-1;9157:169:8;;;9322:1;9319;9312:12;9157:169;9401:2;9393:3;9382:9;9378:19;9365:33;9354:9;9350:49;9346:58;9413:2162;9559:3;9544:19;;9531:33;9516:49;;9503:63;;9500:1;9496:71;9441:127;9570:2;9437:136;9429:145;;9413:2162;;;-1:-1:-1;;;;;9648:3:8;9635:17;9632:41;9629:61;;;9686:1;9683;9676:12;9629:61;9781:3;9768:17;9760:3;9749:9;9745:19;9732:33;9721:9;9717:49;9713:73;9838:3;9832:2;9828:7;9823:2;9814:7;9810:16;9806:30;9802:40;9799:60;;;9855:1;9852;9845:12;9799:60;9885:22;;:::i;:::-;9934:44;9974:2;9970;9966:11;9934:44;:::i;:::-;9927:5;9920:59;-1:-1:-1;;;;;10019:2:8;10015;10011:11;9998:25;9995:49;9992:69;;;10057:1;10054;10047:12;9992:69;10133:7;10128:2;10121;10117;10113:11;10100:25;10096:2;10092:34;10088:43;10084:57;10074:85;;10155:1;10152;10145:12;10074:85;10185:135;10201:118;10314:2;10307;10303;10299:11;10286:25;10282:2;10278:34;10274:43;10261:57;10201:118;:::i;10185:135::-;10431:2;10424;10416:11;;;10403:25;10395:34;;10391:43;;;10378:57;10364:72;;;10458:14;;;;10364:72;10539:1;10535:65;10495:106;10491:115;-1:-1:-1;;10485:148:8;;;10629:1;10626;10619:12;10485:148;10699:2;10692;10688;10684:11;10671:25;10667:2;10663:34;10659:43;10715:463;10857:2;10834:11;;;10821:25;10813:34;;10849:2;10809:43;;10796:57;10793:1;10789:65;10749:106;10745:115;10735:126;;10715:463;;;-1:-1:-1;;;;;10951:5:8;10938:19;10935:43;10932:63;;;10991:1;10988;10981:12;10932:63;11026:97;11115:7;11110:2;11101:5;11088:19;11081:2;11077;11073:11;11060:25;11056:2;11052:34;11048:60;11044:69;11026:97;:::i;:::-;11012:112;;11161:2;11150:14;;;;10885;10715:463;;;-1:-1:-1;11209:2:8;11198:14;;11191:29;-1:-1:-1;;;;;;11260:2:8;11252:11;;11239:25;11236:49;11233:69;;;11298:1;11295;11288:12;11233:69;11338:97;11427:7;11422:2;11415;11411;11407:11;11394:25;11390:2;11386:34;11382:43;11338:97;:::i;:::-;11333:2;11326:5;11322:14;11315:121;11472:29;11496:3;11492:2;11488:12;11472:29;:::i;:::-;11467:2;11456:14;;11449:53;11515:18;;-1:-1:-1;11562:2:8;11553:12;;;;9592;9413:2162;;;9417:3;11594:5;11584:15;;;;8015:3590;;;;;;;;:::o;11610:566::-;11720:6;11728;11736;11744;11797:3;11785:9;11776:7;11772:23;11768:33;11765:53;;;11814:1;11811;11804:12;11765:53;11837:29;11856:9;11837:29;:::i;:::-;11827:39;;11885:45;11926:2;11915:9;11911:18;11885:45;:::i;:::-;11875:55;;11981:2;11970:9;11966:18;11953:32;-1:-1:-1;;;;;12000:6:8;11997:30;11994:50;;;12040:1;12037;12030:12;11994:50;12063;12105:7;12096:6;12085:9;12081:22;12063:50;:::i;:::-;12053:60;;;12132:38;12166:2;12155:9;12151:18;12132:38;:::i;:::-;12122:48;;11610:566;;;;;;;:::o;12181:725::-;12356:2;12345:9;12338:21;12319:4;12395:1;12391;12386:3;12382:11;12378:19;12452:2;12443:6;12437:13;12433:22;12428:2;12417:9;12413:18;12406:50;12503:2;12495:6;12491:15;12485:22;12516:59;12571:2;12560:9;12556:18;12542:12;12516:59;:::i;:::-;;12624:2;12616:6;12612:15;12606:22;12664:4;12659:2;12648:9;12644:18;12637:32;12692:54;12741:3;12730:9;12726:19;12710:14;12692:54;:::i;:::-;12678:68;;12811:2;12805;12797:6;12793:15;12787:22;12783:31;12777:3;12766:9;12762:19;12755:60;12871:3;12863:6;12859:16;12853:23;12846:4;12835:9;12831:20;12824:53;12894:6;12886:14;;;;12181:725;;;;:::o;12911:429::-;13009:6;13017;13070:2;13058:9;13049:7;13045:23;13041:32;13038:52;;;13086:1;13083;13076:12;13038:52;13126:9;13113:23;-1:-1:-1;;;;;13151:6:8;13148:30;13145:50;;;13191:1;13188;13181:12;13145:50;13214;13256:7;13247:6;13236:9;13232:22;13214:50;:::i;:::-;13204:60;;;13283:51;13330:2;13319:9;13315:18;13283:51;:::i;:::-;13273:61;;12911:429;;;;;:::o;13345:146::-;13432:1;13425:5;13422:12;13412:46;;13438:18;;:::i;13496:301::-;13670:2;13655:18;;13682:50;13659:9;13714:6;13682:50;:::i;:::-;13782:6;13775:14;13768:22;13763:2;13752:9;13748:18;13741:50;13496:301;;;;;:::o;13802:186::-;13861:6;13914:2;13902:9;13893:7;13889:23;13885:32;13882:52;;;13930:1;13927;13920:12;13882:52;13953:29;13972:9;13953:29;:::i;13993:380::-;14072:1;14068:12;;;;14115;;;14136:61;;14190:4;14182:6;14178:17;14168:27;;14136:61;14243:2;14235:6;14232:14;14212:18;14209:38;14206:161;;14289:10;14284:3;14280:20;14277:1;14270:31;14324:4;14321:1;14314:15;14352:4;14349:1;14342:15;14206:161;;13993:380;;;:::o;14378:289::-;14509:3;14547:6;14541:13;14563:66;14622:6;14617:3;14610:4;14602:6;14598:17;14563:66;:::i;:::-;14645:16;;;;;14378:289;-1:-1:-1;;14378:289:8:o;14672:220::-;14821:2;14810:9;14803:21;14784:4;14841:45;14882:2;14871:9;14867:18;14859:6;14841:45;:::i;15248:291::-;15425:2;15414:9;15407:21;15388:4;15445:45;15486:2;15475:9;15471:18;15463:6;15445:45;:::i;:::-;15437:53;;15526:6;15521:2;15510:9;15506:18;15499:34;15248:291;;;;;:::o;16258:127::-;16319:10;16314:3;16310:20;16307:1;16300:31;16350:4;16347:1;16340:15;16374:4;16371:1;16364:15;16390:128;16457:9;;;16478:11;;;16475:37;;;16492:18;;:::i;16523:388::-;16728:2;16717:9;16710:21;16691:4;16748:45;16789:2;16778:9;16774:18;16766:6;16748:45;:::i;:::-;-1:-1:-1;;;;;16829:32:8;;;;16824:2;16809:18;;16802:60;-1:-1:-1;16893:2:8;16878:18;16871:34;16740:53;16523:388;-1:-1:-1;16523:388:8:o;17471:545::-;17573:2;17568:3;17565:11;17562:448;;;17609:1;17634:5;17630:2;17623:17;17679:4;17675:2;17665:19;17749:2;17737:10;17733:19;17730:1;17726:27;17720:4;17716:38;17785:4;17773:10;17770:20;17767:47;;;-1:-1:-1;17808:4:8;17767:47;17863:2;17858:3;17854:12;17851:1;17847:20;17841:4;17837:31;17827:41;;17918:82;17936:2;17929:5;17926:13;17918:82;;;17981:17;;;17962:1;17951:13;17918:82;;;17922:3;;;17471:545;;;:::o;18192:1352::-;18318:3;18312:10;-1:-1:-1;;;;;18337:6:8;18334:30;18331:56;;;18367:18;;:::i;:::-;18396:97;18486:6;18446:38;18478:4;18472:11;18446:38;:::i;:::-;18440:4;18396:97;:::i;:::-;18548:4;;18612:2;18601:14;;18629:1;18624:663;;;;19331:1;19348:6;19345:89;;;-1:-1:-1;19400:19:8;;;19394:26;19345:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;19447:81;;18594:944;;18624:663;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;18660:20:8;;;18778:236;18792:7;18789:1;18786:14;18778:236;;;18881:19;;;18875:26;18860:42;;18973:27;;;;18941:1;18929:14;;;;18808:19;;18778:236;;;18782:3;19042:6;19033:7;19030:19;19027:201;;;19103:19;;;19097:26;-1:-1:-1;;19186:1:8;19182:14;;;19198:3;19178:24;19174:37;19170:42;19155:58;19140:74;;19027:201;-1:-1:-1;;;;;19274:1:8;19258:14;;;19254:22;19241:36;;-1:-1:-1;18192:1352:8:o;19549:522::-;-1:-1:-1;;;;;19832:15:8;;;19814:34;;19757:4;;19857:53;19906:2;19891:18;;19883:6;19857:53;:::i;:::-;19946:3;19941:2;19930:9;19926:18;19919:31;19967:46;20008:3;19997:9;19993:19;19985:6;19967:46;:::i;:::-;19959:54;;20061:2;20053:6;20049:15;20044:2;20033:9;20029:18;20022:43;;19549:522;;;;;;;:::o;20076:1127::-;20144:3;20182:5;20176:12;20209:6;20204:3;20197:19;20235:4;20264:2;20259:3;20255:12;20248:19;;20289:3;20329:6;20326:1;20322:14;20317:3;20313:24;20371:2;20364:5;20360:14;20392:1;20413;20423:754;20439:6;20434:3;20431:15;20423:754;;;20504:16;;;20492:29;;20544:13;;20616:9;;20638:22;;;20724:11;;;;20682:13;;;;20759:1;20773:298;20789:8;20784:3;20781:17;20773:298;;;20868:8;20862:15;20911:1;20907:2;20904:9;20894:43;;20917:18;;:::i;:::-;20954:17;;21040;;;;20997:14;;;;20817:1;20808:11;20773:298;;;-1:-1:-1;;21155:12:8;;;;21092:5;-1:-1:-1;;21120:15:8;;;;20465:1;20456:11;20423:754;;;-1:-1:-1;21193:4:8;;20076:1127;-1:-1:-1;;;;;;;;20076:1127:8:o;21208:2490::-;-1:-1:-1;;;;;21667:15:8;;;21649:34;;21570:4;;21599:3;;21702:2;21713:53;21747:18;;;21739:6;21713:53;:::i;:::-;21785:2;21823;21818;21807:9;21803:18;21796:30;21849:45;21890:2;21879:9;21875:18;21867:6;21849:45;:::i;:::-;21913:2;21963;21955:6;21951:15;21946:2;21935:9;21931:18;21924:43;21986:3;21976:13;;22037:9;22029:6;22025:22;22020:2;22009:9;22005:18;21998:50;22068:6;22103;22097:13;22134:6;22126;22119:22;22169:2;22161:6;22157:15;22150:22;;22228:2;22218:6;22215:1;22211:14;22203:6;22199:27;22195:36;22266:2;22258:6;22254:15;22287:1;22297:1372;22311:6;22308:1;22305:13;22297:1372;;;22401:2;22397:7;22388:6;22380;22376:19;22372:33;22367:3;22360:46;22435:6;22429:13;22481:2;22473:6;22469:15;22497:50;22540:6;22535:2;22529:9;22497:50;:::i;:::-;22586:11;;;22580:18;22618:15;;;22611:27;;;22699:19;;22731:24;;;;22839:1;22835:16;;;22823:29;;22819:38;;;22886:21;;;;22777:15;;;;22931:1;22945:297;22961:8;22956:3;22953:17;22945:297;;;23067:3;23063:8;23054:6;23046;23042:19;23038:34;23031:5;23024:49;23100:42;23135:6;23124:8;23118:15;23100:42;:::i;:::-;23090:52;-1:-1:-1;23171:17:8;;;;23214:14;;;;22989:1;22980:11;22945:297;;;22949:3;;;;23291:2;23287;23283:11;23277:18;23344:6;23336;23332:19;23327:2;23319:6;23315:15;23308:44;23379:67;23439:6;23423:14;23379:67;:::i;:::-;23487:11;;;23481:18;3418:13;;3411:21;23544:15;;;3399:34;23481:18;23365:81;-1:-1:-1;23512:48:8;;-1:-1:-1;3348:91:8;23512:48;23647:12;;;;23583:6;-1:-1:-1;;23612:15:8;;;;22333:1;22326:9;22297:1372;;;22301:3;;23686:6;23678:14;;;;;;;;;;;21208:2490;;;;;;;;:::o;23703:245::-;23770:6;23823:2;23811:9;23802:7;23798:23;23794:32;23791:52;;;23839:1;23836;23829:12;23791:52;23871:9;23865:16;23890:28;23912:5;23890:28;:::i;24663:125::-;24728:9;;;24749:10;;;24746:36;;;24762:18;;:::i;24793:127::-;24854:10;24849:3;24845:20;24842:1;24835:31;24885:4;24882:1;24875:15;24909:4;24906:1;24899:15;24925:842;25053:3;25082:1;25115:6;25109:13;25145:36;25171:9;25145:36;:::i;:::-;25200:1;25217:18;;;25244:133;;;;25391:1;25386:356;;;;25210:532;;25244:133;-1:-1:-1;;25277:24:8;;25265:37;;25350:14;;25343:22;25331:35;;25322:45;;;-1:-1:-1;25244:133:8;;25386:356;25417:6;25414:1;25407:17;25447:4;25492:2;25489:1;25479:16;25517:1;25531:165;25545:6;25542:1;25539:13;25531:165;;;25623:14;;25610:11;;;25603:35;25666:16;;;;25560:10;;25531:165;;;25535:3;;;25725:6;25720:3;25716:16;25709:23;;25210:532;-1:-1:-1;25758:3:8;;24925:842;-1:-1:-1;;;;;;24925:842:8:o;26064:135::-;26103:3;26124:17;;;26121:43;;26144:18;;:::i;:::-;-1:-1:-1;26191:1:8;26180:13;;26064:135::o;26204:1435::-;26323:3;26317:4;26314:13;26311:26;;26330:5;;26204:1435::o;26311:26::-;26360:37;26392:3;26386:10;26360:37;:::i;:::-;-1:-1:-1;;;;;26412:6:8;26409:30;26406:56;;;26442:18;;:::i;:::-;26471:97;26561:6;26521:38;26553:4;26547:11;26521:38;:::i;26471:97::-;26594:1;26622:2;26614:6;26611:14;26639:1;26634:748;;;;27426:1;27443:6;27440:89;;;-1:-1:-1;27495:19:8;;;27489:26;27440:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;27542:81;;26604:1029;;26634:748;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;26670:20:8;;;17418:1;17411:14;;;17455:4;17442:18;;26834:9;26856:251;26870:7;26867:1;26864:14;26856:251;;;26952:21;;;26946:28;26931:44;;27002:1;27075:18;;;;27030:15;;;;26893:4;26886:12;26856:251;;;26860:3;27135:6;27126:7;27123:19;27120:203;;;27196:21;;;27190:28;-1:-1:-1;;27281:1:8;27277:14;;;27293:3;27273:24;27269:37;27265:42;27250:58;27235:74;;27120:203;;;;27369:1;27360:6;27357:1;27353:14;27349:22;27343:4;27336:36;26604:1029;;;;26204:1435;;:::o;27644:127::-;27705:10;27700:3;27696:20;27693:1;27686:31;27736:4;27733:1;27726:15;27760:4;27757:1;27750:15;28520:492;28695:3;28733:6;28727:13;28749:66;28808:6;28803:3;28796:4;28788:6;28784:17;28749:66;:::i;:::-;28878:13;;28837:16;;;;28900:70;28878:13;28837:16;28947:4;28935:17;;28900:70;:::i;:::-;28986:20;;28520:492;-1:-1:-1;;;;28520:492:8:o","linkReferences":{}},"methodIdentifiers":{"assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","tokensInteractions(string,uint8)":"ea8f547f","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,uint8,string,address)":"72d4c33b","wrap(address,uint8,string,address,(uint8,string[],uint8[][],bool)[])":"623662ad"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"enum InteractionType\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"tokensInteractions\",\"outputs\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"functionsSignature\",\"type\":\"string[]\"},{\"internalType\":\"enum VarType[][]\",\"name\":\"variables\",\"type\":\"uint8[][]\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"internalType\":\"struct InteractionSignature[]\",\"name\":\"interactions\",\"type\":\"tuple[]\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper.sol\":{\"keccak256\":\"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b\",\"dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"enum TokenType","name":"tokenType","type":"uint8","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"enum InteractionType","name":"","type":"uint8"}],"stateMutability":"view","type":"function","name":"tokensInteractions","outputs":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"bool","name":"available","type":"bool"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"struct InteractionSignature[]","name":"interactions","type":"tuple[]","components":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"string[]","name":"functionsSignature","type":"string[]"},{"internalType":"enum VarType[][]","name":"variables","type":"uint8[][]"},{"internalType":"bool","name":"available","type":"bool"}]}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper.sol":{"keccak256":"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29","urls":["bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b","dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC"],"license":"GPL-3.0"}},"version":1},"id":7} \ No newline at end of file +{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"tokensInteractions","inputs":[{"name":"","type":"string","internalType":"string"},{"name":"","type":"uint8","internalType":"enum InteractionType"}],"outputs":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"available","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"interactions","type":"tuple[]","internalType":"struct InteractionSignature[]","components":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"functionsSignature","type":"string[]","internalType":"string[]"},{"name":"variables","type":"uint8[][]","internalType":"enum VarType[][]"},{"name":"available","type":"bool","internalType":"bool"}]}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"uint8","indexed":false,"internalType":"enum TokenType"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b5060405162002c7738038062002c778339810160408190526200003491620000e6565b806001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f8162000096565b50600480546001600160a01b0319166001600160a01b039290921691909117905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f957600080fd5b81516001600160a01b03811681146200011157600080fd5b9392505050565b612b4f80620001286000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220cbd06ceff5239642be8eb500f3fd96da9c5b22d5435614c0fd5c273970d8434764736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;1703:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1749:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:8;428:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1776:14:7::1;:41:::0;;-1:-1:-1;;;;;;1776:41:7::1;-1:-1:-1::0;;;;;1776:41:7;;;::::1;::::0;;;::::1;::::0;;1008:8352;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:290:8:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:8;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:8:o;309:203::-;1008:8352:7;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220cbd06ceff5239642be8eb500f3fd96da9c5b22d5435614c0fd5c273970d8434764736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1074:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4469:419;;;;;;:::i;:::-;;:::i;:::-;;;3609:14:8;;3602:22;3584:41;;3572:2;3557:18;4469:419:7;3444:187:8;1269:29:7;;;;;-1:-1:-1;;;;;1269:29:7;;;;;;-1:-1:-1;;;;;3800:32:8;;;3782:51;;3770:2;3755:18;1269:29:7;3636:203:8;5281:461:7;;;;;;:::i;:::-;;:::i;5760:94::-;;;:::i;:::-;;;;;;;:::i;1830:816::-;;;;;;:::i;:::-;;:::i;2293:101:0:-;;;:::i;:::-;;2652:252:7;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2910:431:7;;;;;;:::i;:::-;;:::i;4894:381::-;;;;;;:::i;:::-;;:::i;6142:121::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3838:624::-;;;;;;:::i;:::-;;:::i;3347:484::-;;;;;;:::i;:::-;;:::i;1149:94::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:94:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;1074:40:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;;;1074:40:7;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1074:40:7;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;1074:40:7;:::o;4469:419::-;4550:12;1531:13:0;:11;:13::i;:::-;4620:1:7::1;-1:-1:-1::0;;;;;4577:45:7::1;:6;4584:7;4577:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4577:31:7::1;:45:::0;4574:107:::1;;4662:7;4644:26;;-1:-1:-1::0;;;4644:26:7::1;;;;;;;;:::i;:::-;;;;;;;;4574:107;4707:47;4716:7;4725:20;4747:6;4707:8;:47::i;:::-;4699:83;;;::::0;-1:-1:-1;;;4699:83:7;;15099:2:8;4699:83:7::1;::::0;::::1;15081:21:8::0;15138:2;15118:18;;;15111:30;-1:-1:-1;;;15157:18:8;;;15150:52;15219:18;;4699:83:7::1;14897:346:8::0;4699:83:7::1;4818:6;4793;4800:7;4793:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4839:21;4844:7;4853:6;4839:21;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;4877:4:7::1;1554:1:0;4469:419:7::0;;;;:::o;5281:461::-;5390:12;1531:13:0;:11;:13::i;:::-;5448:6:7::1;5422;5429:7;5422:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5414:77;;;::::0;-1:-1:-1;;;5414:77:7;;15746:2:8;5414:77:7::1;::::0;::::1;15728:21:8::0;;;15765:18;;;15758:30;15824:34;15804:18;;;15797:62;15876:18;;5414:77:7::1;15544:356:8::0;5414:77:7::1;5510:67;5519:7;5528:22;5552:6;5560:16;5510:8;:67::i;:::-;5502:104;;;::::0;-1:-1:-1;;;5502:104:7;;16107:2:8;5502:104:7::1;::::0;::::1;16089:21:8::0;16146:2;16126:18;;;16119:30;16185:26;16165:18;;;16158:54;16229:18;;5502:104:7::1;15905:348:8::0;5502:104:7::1;5643:6;5617;5624:7;5617:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5673:41:7::1;::::0;::::1;::::0;::::1;::::0;5680:7;;5689:16;;5707:6;;5673:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5731:4:7::1;5281:461:::0;;;;;:::o;5760:94::-;5810:15;5844:3;5837:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5760:94;:::o;1830:816::-;2001:16;1531:13:0;:11;:13::i;:::-;2075:1:7::1;-1:-1:-1::0;;;;;2032:45:7::1;:6;2039:7;2032:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2032:31:7::1;:45;2029:110;;2120:7;2100:28;;-1:-1:-1::0;;;2100:28:7::1;;;;;;;;:::i;2029:110::-;2149:53;2180:7;2189:12;2149:30;:53::i;:::-;2216:18;2235:7;2216:27;;;;;;:::i;:::-;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;2244:30:::1;2216:59;::::0;;;;;;;;:69:::1;::::0;::::1;;2213:221;;;2309:49;2318:7;2327:30;2309:8;:49::i;:::-;2301:122;;;::::0;-1:-1:-1;;;2301:122:7;;17118:2:8;2301:122:7::1;::::0;::::1;17100:21:8::0;17157:2;17137:18;;;17130:30;17196:34;17176:18;;;17169:62;17267:30;17247:18;;;17240:58;17315:19;;2301:122:7::1;16916:424:8::0;2301:122:7::1;2462:52;;;;;;;;2468:15;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2485:9;2462:52;;;;;;;;:::i;:::-;;;;;2496:7;2462:52;;;;2505:5;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2512:1;2462:52;;::::0;2444:6:::1;2451:7;2444:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;:70;;;;-1:-1:-1;;;;;2444:70:7;;::::1;-1:-1:-1::0;;;;;;2444:70:7;::::1;::::0;::::1;::::0;;;;::::1;::::0;:15;;;;-1:-1:-1;;;;;;2444:70:7;;-1:-1:-1;;;2444:70:7;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2444:70:7::1;-1:-1:-1::0;;;;;2444:70:7;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2529:17;;-1:-1:-1;2529:17:7;::::1;::::0;;-1:-1:-1;2529:17:7;;;;;::::1;;2538:7:::0;2529:17;::::1;:::i;:::-;;2570:48;2575:15;2592:9;2603:7;2612:5;2570:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2635:4:7::1;1830:816:::0;;;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2652:252:7:-;2778:16;1531:13:0;:11;:13::i;:::-;2813:4:7::1;:9;2823:15:::0;2840:9;2851:7;2860:5;2894:1:::1;2867:29;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2867:29:7::1;;;;;;;;;;;;;;;;;2813:84;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2806:91;;1554:1:0;2652:252:7::0;;;;;;:::o;2910:431::-;2977:12;1531:13:0;:11;:13::i;:::-;3047:1:7::1;-1:-1:-1::0;;;;;3004:45:7::1;:6;3011:7;3004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3004:31:7::1;:45:::0;3001:108:::1;;3090:7;3072:26;;-1:-1:-1::0;;;3072:26:7::1;;;;;;;;:::i;3001:108::-;3146:1;3121:6;3128:7;3121:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;3118:83;;;3182:7;3170:20;;-1:-1:-1::0;;;3170:20:7::1;;;;;;;;:::i;3118:83::-;3210:40;3226:6;3233:7;3226:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;3210:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;3267:6;3274:7;3267:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;3260:22;;-1:-1:-1;;;;;;3260:22:7;;;3267:15:::1;3260:22;::::0;;::::1;3267:15:::0;3260:22:::1;:::i;:::-;-1:-1:-1::0;3260:22:7::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;3260:22:7::1;::::0;;::::1;;::::0;;::::1;::::0;3298:15:::1;::::0;::::1;::::0;::::1;::::0;3305:7;;3298:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;3330:4:7::1;1554:1:0;2910:431:7::0;;;:::o;4894:381::-;4975:12;1531:13:0;:11;:13::i;:::-;5033:6:7::1;5007;5014:7;5007:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4999:75;;;::::0;-1:-1:-1;;;4999:75:7;;24155:2:8;4999:75:7::1;::::0;::::1;24137:21:8::0;24194:2;24174:18;;;24167:30;24233:32;24213:18;;;24206:60;24283:18;;4999:75:7::1;23953:354:8::0;4999:75:7::1;5093:47;5102:7;5111:20;5133:6;5093:8;:47::i;:::-;5085:82;;;::::0;-1:-1:-1;;;5085:82:7;;24514:2:8;5085:82:7::1;::::0;::::1;24496:21:8::0;24553:2;24533:18;;;24526:30;-1:-1:-1;;;24572:18:8;;;24565:52;24634:18;;5085:82:7::1;24312:346:8::0;5085:82:7::1;5204:6;5178;5185:7;5178:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5226:21:7::1;::::0;::::1;::::0;::::1;::::0;5231:7;;5240:6;;5226:21:::1;:::i;6142:121::-:0;6204:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6204:18:7;6241:6;6248:7;6241:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6234:22;;;;;;;;-1:-1:-1;;;;;6234:22:7;;;;6241:15;;6234:22;;;-1:-1:-1;;;6234:22:7;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6234:22:7;;;-1:-1:-1;;6234:22:7;;;;-1:-1:-1;;;;;6234:22:7;;;;;;;;;;;;;;;;6142:121;-1:-1:-1;;6142:121:7:o;3838:624::-;3921:12;1531:13:0;:11;:13::i;:::-;4001:1:7::1;-1:-1:-1::0;;;;;3958:45:7::1;:6;3965:7;3958:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3958:31:7::1;:45:::0;3955:107:::1;;4043:7;4025:26;;-1:-1:-1::0;;;4025:26:7::1;;;;;;;;:::i;3955:107::-;4100:6;4075;4082:7;4075:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;4072:108;;;4153:7;4162:6;4129:40;;-1:-1:-1::0;;;4129:40:7::1;;;;;;;;;:::i;4072:108::-;4190:18;4211:49;4220:7;4229:22;4253:6;4211:8;:49::i;:::-;4190:70;;4274:13;4271:142;;;4329:6;4303;4310:7;4303:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4354:23:7::1;::::0;::::1;::::0;::::1;::::0;4361:7;;4370:6;;4354:23:::1;:::i;:::-;;;;;;;;4398:4;4391:11;;;;;4271:142;4447:7;4430:25;;-1:-1:-1::0;;;4430:25:7::1;;;;;;;;:::i;3347:484::-:0;3428:12;1531:13:0;:11;:13::i;:::-;3498:1:7::1;-1:-1:-1::0;;;;;3455:45:7::1;:6;3462:7;3455:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3455:31:7::1;:45:::0;3452:107:::1;;3540:7;3522:26;;-1:-1:-1::0;;;3522:26:7::1;;;;;;;;:::i;3452:107::-;3569:16;3588:47;3597:7;3606:20;3628:6;3588:8;:47::i;:::-;3569:66;;3649:11;3646:138;;;3702:6;3676;3683:7;3676:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3727:21:7::1;::::0;::::1;::::0;::::1;::::0;3732:7;;3741:6;;3727:21:::1;:::i;3646:138::-;3816:7;3801:23;;-1:-1:-1::0;;;3801:23:7::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3782:51:8::0;3755:18;;2672:31:0::1;3636:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3782:51:8;3755:18;;1901:40:0;3636:203:8;6742:200:7;6850:12;6881:54;6890:7;6899:15;6916:6;6932:1;6948:888;7074:4;7095:18;7114:7;7095:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7123:15;7095:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7095:44:7;:54;;;;;7090:98;;-1:-1:-1;7172:5:7;7165:12;;7090:98;7203:6;7198:598;7219:18;7238:7;7219:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7247:15;7219:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7219:44:7;:63;;:70;7215:74;;7198:598;;;7310:23;7370:18;7389:7;7370:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7398:15;7370:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:63;;7434:1;7370:66;;;;;;;;:::i;:::-;;;;;;;;7353:84;;;;;;;;:::i;:::-;;;;;;;;;;;;;7343:95;;;;;;7310:129;;7454:26;7483:137;7503:16;7521:98;7534:18;7553:7;7534:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7562:15;7534:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:54;;7589:1;7534:57;;;;;;;;:::i;:::-;;;;;;;;7521:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7593:7;7602:8;7612:6;7521:12;:98::i;:::-;7483:19;:137::i;:::-;7454:166;;7636:16;7658:6;7665:7;7658:15;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;7658:31:7;;:51;;7695:13;;7658:51;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7635:74;;;7728:11;7723:63;;7766:5;7759:12;;;;;;;;7723:63;7296:500;;;7291:3;;;;;:::i;:::-;;;;7198:598;;;-1:-1:-1;7821:4:7;;6948:888;-1:-1:-1;;;;;6948:888:7:o;6269:281::-;6399:6;6395:149;6415:12;:19;6411:1;:23;6395:149;;;6518:12;6531:1;6518:15;;;;;;;;:::i;:::-;;;;;;;6455:18;6474:7;6455:27;;;;;;:::i;:::-;;;;;;;;;;;;;:60;6483:12;6496:1;6483:15;;;;;;;;:::i;:::-;;;;;;;:31;;;6455:60;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;6455:60:7;:78;;;;:60;;-1:-1:-1;;6455:78:7;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;-1:-1:-1;;6455:78:7;;;;;;;;;;6436:3;;;;:::i;:::-;;;;6395:149;;;;6269:281;;:::o;6556:180::-;6649:12;6680:49;6689:7;6698:15;6715:1;6726;6680:8;:49::i;:::-;6673:56;6556:180;-1:-1:-1;;;6556:180:7:o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5860:276:7:-;5928:9;5923:207;5947:3;:10;5943:14;;5923:207;;;5982:25;5996:3;6000:1;5996:6;;;;;;;;:::i;:::-;;;;;;;;5982:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6004:2;5982:13;:25::i;:::-;5978:142;;;6036:3;6040:10;;:14;;6053:1;;6040:14;:::i;:::-;6036:19;;;;;;;;:::i;:::-;;;;;;;;6027:3;6031:1;6027:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6073:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;5923:207;5860:276;:::o;5978:142::-;5959:3;;;;:::i;:::-;;;;5923:207;;;;5860:276;:::o;8230:1128::-;8361:14;8386:28;8429:9;:16;-1:-1:-1;;;;;8417:29:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8386:60;;8461:6;8456:866;8477:9;:16;8473:1;:20;8456:866;;;8534:14;8518:9;8528:1;8518:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8514:798;;8587:25;;;8606:4;8587:25;;;3782:51:8;3755:18;8587:25:7;;;;;;;;;;;;;8568:13;8582:1;8568:16;;;;;;;;:::i;:::-;;;;;;:44;;;;8514:798;;;8653:15;8637:9;8647:1;8637:12;;;;;;;;:::i;:::-;;;;;;;:31;;;;;;;;:::i;:::-;;8633:679;;8718:7;8707:19;;;;;;;;:::i;8633:679::-;8767:14;8751:9;8761:1;8751:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8747:565;;8820:18;;;;;;27922:25:8;;;27895:18;8820::7;27776:177:8;8747:565:7;8879:13;8863:9;8873:1;8863:12;;;;;;;;:::i;:::-;;;;;;;:29;;;;;;;;:::i;:::-;;8859:453;;8942:6;8949:7;8942:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:21;;;-1:-1:-1;;;;;8942:21:7;8931:33;;;3782:51:8;3755:18;8931:33:7;3636:203:8;8859:453:7;9005:23;8989:9;8999:1;8989:12;;;;;;;;:::i;:::-;;;;;;;:39;;;;;;;;:::i;:::-;;8985:327;;9078:6;9085:7;9078:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;9078:31:7;9067:43;;;3782:51:8;3755:18;9067:43:7;3636:203:8;8985:327:7;9151:16;9135:9;9145:1;9135:12;;;;;;;;:::i;:::-;;;;;;;:32;;;;;;;;:::i;:::-;;9131:181;;9206:20;;;-1:-1:-1;;;;;3800:32:8;;9206:20:7;;;3782:51:8;3755:18;9206:20:7;3636:203:8;9131:181:7;9265:32;;-1:-1:-1;;;9265:32:7;;28160:2:8;9265:32:7;;;28142:21:8;28199:2;28179:18;;;28172:30;-1:-1:-1;;;28218:18:8;;;28211:52;28280:18;;9265:32:7;27958:346:8;9131:181:7;8495:3;;;;:::i;:::-;;;;8456:866;;;-1:-1:-1;9338:13:7;8230:1128;-1:-1:-1;;;;;8230:1128:7:o;7842:382::-;8003:34;;;-1:-1:-1;;;;;;28448:33:8;;8003:34:7;;;28436:46:8;8003:34:7;;;;;;;;;28498:11:8;;;;8003:34:7;;;8052:9;8047:141;8071:13;:20;8067:1;:24;8047:141;;;8145:13;8160;8174:1;8160:16;;;;;;;;:::i;:::-;;;;;;;8128:49;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8112:65;;8093:3;;;;;:::i;:::-;;;;8047:141;;;;7842:382;;;;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;-1:-1:-1;;3070:19:2;;;;;;;3047;;;;;;;;;;:42;;2914:182::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;218:2;212:9;260:3;248:16;;-1:-1:-1;;;;;279:34:8;;315:22;;;276:62;273:88;;;341:18;;:::i;:::-;377:2;370:22;146:252;:::o;403:275::-;474:2;468:9;539:2;520:13;;-1:-1:-1;;516:27:8;504:40;;-1:-1:-1;;;;;559:34:8;;595:22;;;556:62;553:88;;;621:18;;:::i;:::-;657:2;650:22;403:275;;-1:-1:-1;403:275:8:o;683:531::-;726:5;779:3;772:4;764:6;760:17;756:27;746:55;;797:1;794;787:12;746:55;833:6;820:20;-1:-1:-1;;;;;855:2:8;852:26;849:52;;;881:18;;:::i;:::-;925:55;968:2;949:13;;-1:-1:-1;;945:27:8;974:4;941:38;925:55;:::i;:::-;1005:2;996:7;989:19;1051:3;1044:4;1039:2;1031:6;1027:15;1023:26;1020:35;1017:55;;;1068:1;1065;1058:12;1017:55;1133:2;1126:4;1118:6;1114:17;1107:4;1098:7;1094:18;1081:55;1181:1;1156:16;;;1174:4;1152:27;1145:38;;;;1160:7;683:531;-1:-1:-1;;;683:531:8:o;1219:322::-;1288:6;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;-1:-1:-1;;;;;1422:6:8;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485;1527:7;1518:6;1507:9;1503:22;1485:50;:::i;1546:127::-;1607:10;1602:3;1598:20;1595:1;1588:31;1638:4;1635:1;1628:15;1662:4;1659:1;1652:15;1678:140;1759:1;1752:5;1749:12;1739:46;;1765:18;;:::i;:::-;1794;;1678:140::o;1823:250::-;1908:1;1918:113;1932:6;1929:1;1926:13;1918:113;;;2008:11;;;2002:18;1989:11;;;1982:39;1954:2;1947:10;1918:113;;;-1:-1:-1;;2065:1:8;2047:16;;2040:27;1823:250::o;2078:271::-;2120:3;2158:5;2152:12;2185:6;2180:3;2173:19;2201:76;2270:6;2263:4;2258:3;2254:14;2247:4;2240:5;2236:16;2201:76;:::i;:::-;2331:2;2310:15;-1:-1:-1;;2306:29:8;2297:39;;;;2338:4;2293:50;;2078:271;-1:-1:-1;;2078:271:8:o;2354:594::-;-1:-1:-1;;;;;2665:15:8;;;2647:34;;2590:4;;2690:53;2739:2;2724:18;;2716:6;2690:53;:::i;:::-;2779:3;2774:2;2763:9;2759:18;2752:31;2800:46;2841:3;2830:9;2826:19;2818:6;2800:46;:::i;:::-;2882:15;;2877:2;2862:18;;2855:43;-1:-1:-1;2929:3:8;2914:19;2907:35;2792:54;2354:594;-1:-1:-1;;;2354:594:8:o;2953:390::-;3031:6;3039;3092:2;3080:9;3071:7;3067:23;3063:32;3060:52;;;3108:1;3105;3098:12;3060:52;3148:9;3135:23;-1:-1:-1;;;;;3173:6:8;3170:30;3167:50;;;3213:1;3210;3203:12;3167:50;3236;3278:7;3269:6;3258:9;3254:22;3236:50;:::i;:::-;3226:60;3333:2;3318:18;;;;3305:32;;-1:-1:-1;;;;2953:390:8:o;3844:173::-;3912:20;;-1:-1:-1;;;;;3961:31:8;;3951:42;;3941:70;;4007:1;4004;3997:12;4022:464;4109:6;4117;4125;4178:2;4166:9;4157:7;4153:23;4149:32;4146:52;;;4194:1;4191;4184:12;4146:52;4234:9;4221:23;-1:-1:-1;;;;;4259:6:8;4256:30;4253:50;;;4299:1;4296;4289:12;4253:50;4322;4364:7;4355:6;4344:9;4340:22;4322:50;:::i;:::-;4312:60;;;4391:38;4425:2;4414:9;4410:18;4391:38;:::i;:::-;4381:48;;4476:2;4465:9;4461:18;4448:32;4438:42;;4022:464;;;;;:::o;4491:803::-;4653:4;4682:2;4722;4711:9;4707:18;4752:2;4741:9;4734:21;4775:6;4810;4804:13;4841:6;4833;4826:22;4879:2;4868:9;4864:18;4857:25;;4941:2;4931:6;4928:1;4924:14;4913:9;4909:30;4905:39;4891:53;;4979:2;4971:6;4967:15;5000:1;5010:255;5024:6;5021:1;5018:13;5010:255;;;5117:2;5113:7;5101:9;5093:6;5089:22;5085:36;5080:3;5073:49;5145:40;5178:6;5169;5163:13;5145:40;:::i;:::-;5135:50;-1:-1:-1;5243:12:8;;;;5208:15;;;;5046:1;5039:9;5010:255;;;-1:-1:-1;5282:6:8;;4491:803;-1:-1:-1;;;;;;;4491:803:8:o;5299:150::-;5374:20;;5423:1;5413:12;;5403:40;;5439:1;5436;5429:12;5454:203;5534:4;-1:-1:-1;;;;;5559:6:8;5556:30;5553:56;;;5589:18;;:::i;:::-;-1:-1:-1;5634:1:8;5630:14;5646:4;5626:25;;5454:203::o;5662:156::-;5743:20;;5792:1;5782:12;;5772:40;;5808:1;5805;5798:12;5823:1931;5892:5;5945:3;5938:4;5930:6;5926:17;5922:27;5912:55;;5963:1;5960;5953:12;5912:55;5999:6;5986:20;6025:4;6049:80;6065:63;6125:2;6065:63;:::i;:::-;6049:80;:::i;:::-;6163:15;;;6225:1;6265:11;;;6253:24;;6249:33;;;6194:12;;;;6151:3;6294:15;;;6291:35;;;6322:1;6319;6312:12;6291:35;6358:2;6350:6;6346:15;6370:1355;6386:6;6381:3;6378:15;6370:1355;;;6472:3;6459:17;-1:-1:-1;;;;;6495:11:8;6492:35;6489:125;;;6568:1;6597:2;6593;6586:14;6489:125;6637:24;;6696:2;6688:11;;6684:21;-1:-1:-1;6674:119:8;;6747:1;6776:2;6772;6765:14;6674:119;6837:2;6833;6829:11;6816:25;6864:2;6892:80;6908:63;6968:2;6908:63;:::i;6892:80::-;7016:17;;;7110:11;;;7102:20;;7098:29;;;7055:14;;;;7143:17;;;7140:107;;;7201:1;7230:2;7226;7219:14;7140:107;7273:11;;;;7297:355;7315:8;7308:5;7305:19;7297:355;;;7409:5;7396:19;7383:32;;7452:1;7445:5;7442:12;7432:129;;7505:1;7539:3;7534;7527:16;7432:129;7578:20;;;7336:14;;;;7624;;;;7297:355;;;7665:18;;-1:-1:-1;;;7703:12:8;;;;-1:-1:-1;6403:12:8;;6370:1355;;;-1:-1:-1;7743:5:8;;5823:1931;-1:-1:-1;;;;;;;5823:1931:8:o;7759:118::-;7845:5;7838:13;7831:21;7824:5;7821:32;7811:60;;7867:1;7864;7857:12;7882:128;7947:20;;7976:28;7947:20;7976:28;:::i;8015:3590::-;8197:6;8205;8213;8221;8229;8282:3;8270:9;8261:7;8257:23;8253:33;8250:53;;;8299:1;8296;8289:12;8250:53;8322:29;8341:9;8322:29;:::i;:::-;8312:39;;8370:45;8411:2;8400:9;8396:18;8370:45;:::i;:::-;8360:55;;-1:-1:-1;;;;;8458:2:8;8447:9;8443:18;8430:32;8427:56;8424:76;;;8496:1;8493;8486:12;8424:76;8519;8587:7;8580:2;8569:9;8565:18;8552:32;8541:9;8537:48;8519:76;:::i;:::-;8509:86;;8614:38;8648:2;8637:9;8633:18;8614:38;:::i;:::-;8604:48;;-1:-1:-1;;;;;8695:3:8;8684:9;8680:19;8667:33;8664:57;8661:77;;;8734:1;8731;8724:12;8661:77;8823:7;8816:4;8808:3;8797:9;8793:19;8780:33;8769:9;8765:49;8761:60;8757:74;8747:102;;8845:1;8842;8835:12;8747:102;8869:141;8885:124;9001:3;8990:9;8986:19;8973:33;8962:9;8958:49;8945:63;8885:124;:::i;8869:141::-;9112:3;9097:19;;9084:33;9069:49;;9056:63;;9044:76;;;9145:2;9136:12;;;;9032:3;9226:1;9222:71;;;;9167:127;;;9163:136;9160:149;-1:-1:-1;9157:169:8;;;9322:1;9319;9312:12;9157:169;9401:2;9393:3;9382:9;9378:19;9365:33;9354:9;9350:49;9346:58;9413:2162;9559:3;9544:19;;9531:33;9516:49;;9503:63;;9500:1;9496:71;9441:127;9570:2;9437:136;9429:145;;9413:2162;;;-1:-1:-1;;;;;9648:3:8;9635:17;9632:41;9629:61;;;9686:1;9683;9676:12;9629:61;9781:3;9768:17;9760:3;9749:9;9745:19;9732:33;9721:9;9717:49;9713:73;9838:3;9832:2;9828:7;9823:2;9814:7;9810:16;9806:30;9802:40;9799:60;;;9855:1;9852;9845:12;9799:60;9885:22;;:::i;:::-;9934:44;9974:2;9970;9966:11;9934:44;:::i;:::-;9927:5;9920:59;-1:-1:-1;;;;;10019:2:8;10015;10011:11;9998:25;9995:49;9992:69;;;10057:1;10054;10047:12;9992:69;10133:7;10128:2;10121;10117;10113:11;10100:25;10096:2;10092:34;10088:43;10084:57;10074:85;;10155:1;10152;10145:12;10074:85;10185:135;10201:118;10314:2;10307;10303;10299:11;10286:25;10282:2;10278:34;10274:43;10261:57;10201:118;:::i;10185:135::-;10431:2;10424;10416:11;;;10403:25;10395:34;;10391:43;;;10378:57;10364:72;;;10458:14;;;;10364:72;10539:1;10535:65;10495:106;10491:115;-1:-1:-1;;10485:148:8;;;10629:1;10626;10619:12;10485:148;10699:2;10692;10688;10684:11;10671:25;10667:2;10663:34;10659:43;10715:463;10857:2;10834:11;;;10821:25;10813:34;;10849:2;10809:43;;10796:57;10793:1;10789:65;10749:106;10745:115;10735:126;;10715:463;;;-1:-1:-1;;;;;10951:5:8;10938:19;10935:43;10932:63;;;10991:1;10988;10981:12;10932:63;11026:97;11115:7;11110:2;11101:5;11088:19;11081:2;11077;11073:11;11060:25;11056:2;11052:34;11048:60;11044:69;11026:97;:::i;:::-;11012:112;;11161:2;11150:14;;;;10885;10715:463;;;-1:-1:-1;11209:2:8;11198:14;;11191:29;-1:-1:-1;;;;;;11260:2:8;11252:11;;11239:25;11236:49;11233:69;;;11298:1;11295;11288:12;11233:69;11338:97;11427:7;11422:2;11415;11411;11407:11;11394:25;11390:2;11386:34;11382:43;11338:97;:::i;:::-;11333:2;11326:5;11322:14;11315:121;11472:29;11496:3;11492:2;11488:12;11472:29;:::i;:::-;11467:2;11456:14;;11449:53;11515:18;;-1:-1:-1;11562:2:8;11553:12;;;;9592;9413:2162;;;9417:3;11594:5;11584:15;;;;8015:3590;;;;;;;;:::o;11610:566::-;11720:6;11728;11736;11744;11797:3;11785:9;11776:7;11772:23;11768:33;11765:53;;;11814:1;11811;11804:12;11765:53;11837:29;11856:9;11837:29;:::i;:::-;11827:39;;11885:45;11926:2;11915:9;11911:18;11885:45;:::i;:::-;11875:55;;11981:2;11970:9;11966:18;11953:32;-1:-1:-1;;;;;12000:6:8;11997:30;11994:50;;;12040:1;12037;12030:12;11994:50;12063;12105:7;12096:6;12085:9;12081:22;12063:50;:::i;:::-;12053:60;;;12132:38;12166:2;12155:9;12151:18;12132:38;:::i;:::-;12122:48;;11610:566;;;;;;;:::o;12181:725::-;12356:2;12345:9;12338:21;12319:4;12395:1;12391;12386:3;12382:11;12378:19;12452:2;12443:6;12437:13;12433:22;12428:2;12417:9;12413:18;12406:50;12503:2;12495:6;12491:15;12485:22;12516:59;12571:2;12560:9;12556:18;12542:12;12516:59;:::i;:::-;;12624:2;12616:6;12612:15;12606:22;12664:4;12659:2;12648:9;12644:18;12637:32;12692:54;12741:3;12730:9;12726:19;12710:14;12692:54;:::i;:::-;12678:68;;12811:2;12805;12797:6;12793:15;12787:22;12783:31;12777:3;12766:9;12762:19;12755:60;12871:3;12863:6;12859:16;12853:23;12846:4;12835:9;12831:20;12824:53;12894:6;12886:14;;;;12181:725;;;;:::o;12911:429::-;13009:6;13017;13070:2;13058:9;13049:7;13045:23;13041:32;13038:52;;;13086:1;13083;13076:12;13038:52;13126:9;13113:23;-1:-1:-1;;;;;13151:6:8;13148:30;13145:50;;;13191:1;13188;13181:12;13145:50;13214;13256:7;13247:6;13236:9;13232:22;13214:50;:::i;:::-;13204:60;;;13283:51;13330:2;13319:9;13315:18;13283:51;:::i;:::-;13273:61;;12911:429;;;;;:::o;13345:146::-;13432:1;13425:5;13422:12;13412:46;;13438:18;;:::i;13496:301::-;13670:2;13655:18;;13682:50;13659:9;13714:6;13682:50;:::i;:::-;13782:6;13775:14;13768:22;13763:2;13752:9;13748:18;13741:50;13496:301;;;;;:::o;13802:186::-;13861:6;13914:2;13902:9;13893:7;13889:23;13885:32;13882:52;;;13930:1;13927;13920:12;13882:52;13953:29;13972:9;13953:29;:::i;13993:380::-;14072:1;14068:12;;;;14115;;;14136:61;;14190:4;14182:6;14178:17;14168:27;;14136:61;14243:2;14235:6;14232:14;14212:18;14209:38;14206:161;;14289:10;14284:3;14280:20;14277:1;14270:31;14324:4;14321:1;14314:15;14352:4;14349:1;14342:15;14206:161;;13993:380;;;:::o;14378:289::-;14509:3;14547:6;14541:13;14563:66;14622:6;14617:3;14610:4;14602:6;14598:17;14563:66;:::i;:::-;14645:16;;;;;14378:289;-1:-1:-1;;14378:289:8:o;14672:220::-;14821:2;14810:9;14803:21;14784:4;14841:45;14882:2;14871:9;14867:18;14859:6;14841:45;:::i;15248:291::-;15425:2;15414:9;15407:21;15388:4;15445:45;15486:2;15475:9;15471:18;15463:6;15445:45;:::i;:::-;15437:53;;15526:6;15521:2;15510:9;15506:18;15499:34;15248:291;;;;;:::o;16258:127::-;16319:10;16314:3;16310:20;16307:1;16300:31;16350:4;16347:1;16340:15;16374:4;16371:1;16364:15;16390:128;16457:9;;;16478:11;;;16475:37;;;16492:18;;:::i;16523:388::-;16728:2;16717:9;16710:21;16691:4;16748:45;16789:2;16778:9;16774:18;16766:6;16748:45;:::i;:::-;-1:-1:-1;;;;;16829:32:8;;;;16824:2;16809:18;;16802:60;-1:-1:-1;16893:2:8;16878:18;16871:34;16740:53;16523:388;-1:-1:-1;16523:388:8:o;17471:545::-;17573:2;17568:3;17565:11;17562:448;;;17609:1;17634:5;17630:2;17623:17;17679:4;17675:2;17665:19;17749:2;17737:10;17733:19;17730:1;17726:27;17720:4;17716:38;17785:4;17773:10;17770:20;17767:47;;;-1:-1:-1;17808:4:8;17767:47;17863:2;17858:3;17854:12;17851:1;17847:20;17841:4;17837:31;17827:41;;17918:82;17936:2;17929:5;17926:13;17918:82;;;17981:17;;;17962:1;17951:13;17918:82;;;17922:3;;;17471:545;;;:::o;18192:1352::-;18318:3;18312:10;-1:-1:-1;;;;;18337:6:8;18334:30;18331:56;;;18367:18;;:::i;:::-;18396:97;18486:6;18446:38;18478:4;18472:11;18446:38;:::i;:::-;18440:4;18396:97;:::i;:::-;18548:4;;18612:2;18601:14;;18629:1;18624:663;;;;19331:1;19348:6;19345:89;;;-1:-1:-1;19400:19:8;;;19394:26;19345:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;19447:81;;18594:944;;18624:663;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;18660:20:8;;;18778:236;18792:7;18789:1;18786:14;18778:236;;;18881:19;;;18875:26;18860:42;;18973:27;;;;18941:1;18929:14;;;;18808:19;;18778:236;;;18782:3;19042:6;19033:7;19030:19;19027:201;;;19103:19;;;19097:26;-1:-1:-1;;19186:1:8;19182:14;;;19198:3;19178:24;19174:37;19170:42;19155:58;19140:74;;19027:201;-1:-1:-1;;;;;19274:1:8;19258:14;;;19254:22;19241:36;;-1:-1:-1;18192:1352:8:o;19549:522::-;-1:-1:-1;;;;;19832:15:8;;;19814:34;;19757:4;;19857:53;19906:2;19891:18;;19883:6;19857:53;:::i;:::-;19946:3;19941:2;19930:9;19926:18;19919:31;19967:46;20008:3;19997:9;19993:19;19985:6;19967:46;:::i;:::-;19959:54;;20061:2;20053:6;20049:15;20044:2;20033:9;20029:18;20022:43;;19549:522;;;;;;;:::o;20076:1127::-;20144:3;20182:5;20176:12;20209:6;20204:3;20197:19;20235:4;20264:2;20259:3;20255:12;20248:19;;20289:3;20329:6;20326:1;20322:14;20317:3;20313:24;20371:2;20364:5;20360:14;20392:1;20413;20423:754;20439:6;20434:3;20431:15;20423:754;;;20504:16;;;20492:29;;20544:13;;20616:9;;20638:22;;;20724:11;;;;20682:13;;;;20759:1;20773:298;20789:8;20784:3;20781:17;20773:298;;;20868:8;20862:15;20911:1;20907:2;20904:9;20894:43;;20917:18;;:::i;:::-;20954:17;;21040;;;;20997:14;;;;20817:1;20808:11;20773:298;;;-1:-1:-1;;21155:12:8;;;;21092:5;-1:-1:-1;;21120:15:8;;;;20465:1;20456:11;20423:754;;;-1:-1:-1;21193:4:8;;20076:1127;-1:-1:-1;;;;;;;;20076:1127:8:o;21208:2490::-;-1:-1:-1;;;;;21667:15:8;;;21649:34;;21570:4;;21599:3;;21702:2;21713:53;21747:18;;;21739:6;21713:53;:::i;:::-;21785:2;21823;21818;21807:9;21803:18;21796:30;21849:45;21890:2;21879:9;21875:18;21867:6;21849:45;:::i;:::-;21913:2;21963;21955:6;21951:15;21946:2;21935:9;21931:18;21924:43;21986:3;21976:13;;22037:9;22029:6;22025:22;22020:2;22009:9;22005:18;21998:50;22068:6;22103;22097:13;22134:6;22126;22119:22;22169:2;22161:6;22157:15;22150:22;;22228:2;22218:6;22215:1;22211:14;22203:6;22199:27;22195:36;22266:2;22258:6;22254:15;22287:1;22297:1372;22311:6;22308:1;22305:13;22297:1372;;;22401:2;22397:7;22388:6;22380;22376:19;22372:33;22367:3;22360:46;22435:6;22429:13;22481:2;22473:6;22469:15;22497:50;22540:6;22535:2;22529:9;22497:50;:::i;:::-;22586:11;;;22580:18;22618:15;;;22611:27;;;22699:19;;22731:24;;;;22839:1;22835:16;;;22823:29;;22819:38;;;22886:21;;;;22777:15;;;;22931:1;22945:297;22961:8;22956:3;22953:17;22945:297;;;23067:3;23063:8;23054:6;23046;23042:19;23038:34;23031:5;23024:49;23100:42;23135:6;23124:8;23118:15;23100:42;:::i;:::-;23090:52;-1:-1:-1;23171:17:8;;;;23214:14;;;;22989:1;22980:11;22945:297;;;22949:3;;;;23291:2;23287;23283:11;23277:18;23344:6;23336;23332:19;23327:2;23319:6;23315:15;23308:44;23379:67;23439:6;23423:14;23379:67;:::i;:::-;23487:11;;;23481:18;3418:13;;3411:21;23544:15;;;3399:34;23481:18;23365:81;-1:-1:-1;23512:48:8;;-1:-1:-1;3348:91:8;23512:48;23647:12;;;;23583:6;-1:-1:-1;;23612:15:8;;;;22333:1;22326:9;22297:1372;;;22301:3;;23686:6;23678:14;;;;;;;;;;;21208:2490;;;;;;;;:::o;23703:245::-;23770:6;23823:2;23811:9;23802:7;23798:23;23794:32;23791:52;;;23839:1;23836;23829:12;23791:52;23871:9;23865:16;23890:28;23912:5;23890:28;:::i;24663:125::-;24728:9;;;24749:10;;;24746:36;;;24762:18;;:::i;24793:127::-;24854:10;24849:3;24845:20;24842:1;24835:31;24885:4;24882:1;24875:15;24909:4;24906:1;24899:15;24925:842;25053:3;25082:1;25115:6;25109:13;25145:36;25171:9;25145:36;:::i;:::-;25200:1;25217:18;;;25244:133;;;;25391:1;25386:356;;;;25210:532;;25244:133;-1:-1:-1;;25277:24:8;;25265:37;;25350:14;;25343:22;25331:35;;25322:45;;;-1:-1:-1;25244:133:8;;25386:356;25417:6;25414:1;25407:17;25447:4;25492:2;25489:1;25479:16;25517:1;25531:165;25545:6;25542:1;25539:13;25531:165;;;25623:14;;25610:11;;;25603:35;25666:16;;;;25560:10;;25531:165;;;25535:3;;;25725:6;25720:3;25716:16;25709:23;;25210:532;-1:-1:-1;25758:3:8;;24925:842;-1:-1:-1;;;;;;24925:842:8:o;26064:135::-;26103:3;26124:17;;;26121:43;;26144:18;;:::i;:::-;-1:-1:-1;26191:1:8;26180:13;;26064:135::o;26204:1435::-;26323:3;26317:4;26314:13;26311:26;;26330:5;;26204:1435::o;26311:26::-;26360:37;26392:3;26386:10;26360:37;:::i;:::-;-1:-1:-1;;;;;26412:6:8;26409:30;26406:56;;;26442:18;;:::i;:::-;26471:97;26561:6;26521:38;26553:4;26547:11;26521:38;:::i;26471:97::-;26594:1;26622:2;26614:6;26611:14;26639:1;26634:748;;;;27426:1;27443:6;27440:89;;;-1:-1:-1;27495:19:8;;;27489:26;27440:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;27542:81;;26604:1029;;26634:748;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;26670:20:8;;;17418:1;17411:14;;;17455:4;17442:18;;26834:9;26856:251;26870:7;26867:1;26864:14;26856:251;;;26952:21;;;26946:28;26931:44;;27002:1;27075:18;;;;27030:15;;;;26893:4;26886:12;26856:251;;;26860:3;27135:6;27126:7;27123:19;27120:203;;;27196:21;;;27190:28;-1:-1:-1;;27281:1:8;27277:14;;;27293:3;27273:24;27269:37;27265:42;27250:58;27235:74;;27120:203;;;;27369:1;27360:6;27357:1;27353:14;27349:22;27343:4;27336:36;26604:1029;;;;26204:1435;;:::o;27644:127::-;27705:10;27700:3;27696:20;27693:1;27686:31;27736:4;27733:1;27726:15;27760:4;27757:1;27750:15;28520:492;28695:3;28733:6;28727:13;28749:66;28808:6;28803:3;28796:4;28788:6;28784:17;28749:66;:::i;:::-;28878:13;;28837:16;;;;28900:70;28878:13;28837:16;28947:4;28935:17;;28900:70;:::i;:::-;28986:20;;28520:492;-1:-1:-1;;;;28520:492:8:o","linkReferences":{}},"methodIdentifiers":{"assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","tokensInteractions(string,uint8)":"ea8f547f","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,uint8,string,address)":"72d4c33b","wrap(address,uint8,string,address,(uint8,string[],uint8[][],bool)[])":"623662ad"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"enum InteractionType\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"tokensInteractions\",\"outputs\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"functionsSignature\",\"type\":\"string[]\"},{\"internalType\":\"enum VarType[][]\",\"name\":\"variables\",\"type\":\"uint8[][]\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"internalType\":\"struct InteractionSignature[]\",\"name\":\"interactions\",\"type\":\"tuple[]\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper.sol\":{\"keccak256\":\"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b\",\"dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"enum TokenType","name":"tokenType","type":"uint8","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"enum InteractionType","name":"","type":"uint8"}],"stateMutability":"view","type":"function","name":"tokensInteractions","outputs":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"bool","name":"available","type":"bool"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"struct InteractionSignature[]","name":"interactions","type":"tuple[]","components":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"string[]","name":"functionsSignature","type":"string[]"},{"internalType":"enum VarType[][]","name":"variables","type":"uint8[][]"},{"internalType":"bool","name":"available","type":"bool"}]}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper.sol":{"keccak256":"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29","urls":["bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b","dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC"],"license":"GPL-3.0"}},"version":1},"id":7} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json index 513e66d200..790a09cb76 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/AccessControl.sol/AccessControl.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"DEFAULT_ADMIN_ROLE()":"a217fddf","getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ```solidity bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ```solidity function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} to enforce additional security measures for this role.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":\"AccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":"AccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file +{"abi":[{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"DEFAULT_ADMIN_ROLE()":"a217fddf","getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ```solidity bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ```solidity function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} to enforce additional security measures for this role.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":\"AccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":"AccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json index bacc9c1124..e366f0e25d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Context.sol/Context.json @@ -1 +1 @@ -{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":6} \ No newline at end of file +{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":6} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json index ee441896f8..2bbb49c299 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC165.sol/ERC165.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC165} interface. Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check for the additional interface id that will be supported. For example: ```solidity function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); } ```\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":\"ERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":"ERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":8} \ No newline at end of file +{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC165} interface. Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check for the additional interface id that will be supported. For example: ```solidity function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); } ```\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":\"ERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":"ERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":8} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json index aa20313267..1777306f45 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ERC20.sol/ERC20.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"details\":\"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"constructor":{"details":"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":"ERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"details\":\"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"constructor":{"details":"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":"ERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json index 791f1bdfbe..84ec54fd99 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IAccessControl.sol/IAccessControl.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"External interface of AccessControl declared to support ERC165 detection.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":\"IAccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":"IAccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file +{"abi":[{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"External interface of AccessControl declared to support ERC165 detection.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":\"IAccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":"IAccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json index 30a0fe04c9..008daae218 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC165.sol/IERC165.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":"IERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":9} \ No newline at end of file +{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":"IERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":9} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json index 5384bded8f..8227f5734a 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20.sol/IERC20.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":"IERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":"IERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json index 07229e1a56..01f7d45e7c 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/IERC20Metadata.sol/IERC20Metadata.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for the optional metadata functions from the ERC20 standard.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"decimals()\":{\"details\":\"Returns the decimals places of the token.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":\"IERC20Metadata\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"decimals()":{"details":"Returns the decimals places of the token."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":"IERC20Metadata"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"}},"version":1},"id":5} \ No newline at end of file +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for the optional metadata functions from the ERC20 standard.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"decimals()\":{\"details\":\"Returns the decimals places of the token.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":\"IERC20Metadata\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"decimals()":{"details":"Returns the decimals places of the token."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":"IERC20Metadata"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"}},"version":1},"id":5} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json index a146e1a378..acb2c89057 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/ITraceableContract.sol/ITraceableContract.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"src/test/solidity/contracts/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/test/solidity/contracts/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":12} \ No newline at end of file +{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"src/test/solidity/contracts/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/test/solidity/contracts/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":12} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json index 53313e9845..cfbd2a34a6 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Math.sol/Math.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:10:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:10;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ded3e8bc0679fcce2816c02dfd528b8736823a3e41892597fda4fd183761d13064736f6c63430008140033","sourceMap":"203:14914:10:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":10} \ No newline at end of file +{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f39f62735cb38c7a736c9b865f54c87892797fd6969470a18bf76bcc100c7f464736f6c63430008140033","sourceMap":"203:14914:10:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:10;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201f39f62735cb38c7a736c9b865f54c87892797fd6969470a18bf76bcc100c7f464736f6c63430008140033","sourceMap":"203:14914:10:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":10} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json index 57693e62d9..cc68804d13 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/SignedMath.sol/SignedMath.json @@ -1 +1 @@ -{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:11:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:11;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e5ae67f1789a47f54dce4fcb694aee9d701ca31c03d35dd9c4229bf994f6871464736f6c63430008140033","sourceMap":"216:1047:11:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":11} \ No newline at end of file +{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203ffaee4a0d294008ac0f86736a534d67532dcf993b53e053e992698dc7fb316164736f6c63430008140033","sourceMap":"216:1047:11:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:11;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203ffaee4a0d294008ac0f86736a534d67532dcf993b53e053e992698dc7fb316164736f6c63430008140033","sourceMap":"216:1047:11:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":11} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json index 47e06f9293..930f47d20e 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/Strings.sol/Strings.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:7:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:7;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200d25eac5768461b9b89befb063ab5993ce9a534edc3a14e3ebf3630f2bab43ac64736f6c63430008140033","sourceMap":"251:2847:7:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":7} \ No newline at end of file +{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f715825e4cd02d630e04530bd55d46aeb82684c956449063ccb0f633c0748e364736f6c63430008140033","sourceMap":"251:2847:7:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:7;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f715825e4cd02d630e04530bd55d46aeb82684c956449063ccb0f633c0748e364736f6c63430008140033","sourceMap":"251:2847:7:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":7} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/23be7e36c4198d02aebf9d5d6258914a.json similarity index 94% rename from packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json rename to packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/23be7e36c4198d02aebf9d5d6258914a.json index 042f29bd74..702ba6a2e6 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/707a9b7be39daaaf674e343568be37c1.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/23be7e36c4198d02aebf9d5d6258914a.json @@ -1 +1 @@ -{"id":"707a9b7be39daaaf674e343568be37c1","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file +{"id":"23be7e36c4198d02aebf9d5d6258914a","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json deleted file mode 100644 index 480d9452fc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/84d52643d45e1addd104736585542010.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"84d52643d45e1addd104736585542010","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json index 53636f677f..8f211b5c74 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC1155Errors.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"ERC1155InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidArrayLength","inputs":[{"name":"idsLength","type":"uint256","internalType":"uint256"},{"name":"valuesLength","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155MissingApprovalForAll","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\",\"errors\":{\"ERC1155InsufficientBalance(address,uint256,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC1155InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC1155InvalidArrayLength(uint256,uint256)\":[{\"details\":\"Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. Used in batch transfers.\",\"params\":{\"idsLength\":\"Length of the array of token identifiers\",\"valuesLength\":\"Length of the array of token amounts\"}}],\"ERC1155InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC1155InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC1155InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC1155MissingApprovalForAll(address,address)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"owner\":\"Address of the current owner of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC1155Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC1155InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC1155InvalidApprover"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"type":"error","name":"ERC1155InvalidArrayLength"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC1155InvalidOperator"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC1155InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC1155InvalidSender"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC1155MissingApprovalForAll"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC1155Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file +{"abi":[{"type":"error","name":"ERC1155InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidArrayLength","inputs":[{"name":"idsLength","type":"uint256","internalType":"uint256"},{"name":"valuesLength","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155MissingApprovalForAll","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\",\"errors\":{\"ERC1155InsufficientBalance(address,uint256,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC1155InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC1155InvalidArrayLength(uint256,uint256)\":[{\"details\":\"Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. Used in batch transfers.\",\"params\":{\"idsLength\":\"Length of the array of token identifiers\",\"valuesLength\":\"Length of the array of token amounts\"}}],\"ERC1155InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC1155InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC1155InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC1155MissingApprovalForAll(address,address)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"owner\":\"Address of the current owner of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC1155Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC1155InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC1155InvalidApprover"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"type":"error","name":"ERC1155InvalidArrayLength"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC1155InvalidOperator"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC1155InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC1155InvalidSender"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC1155MissingApprovalForAll"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC1155Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json index 5694de72c9..0565355cc7 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC20Errors.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC20Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC20Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file +{"abi":[{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC20Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC20Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json index df81b48cb5..7f6c51c70b 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/draft-IERC6093.sol/IERC721Errors.json @@ -1 +1 @@ -{"abi":[{"type":"error","name":"ERC721IncorrectOwner","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InsufficientApproval","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NonexistentToken","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\",\"errors\":{\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC721Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721IncorrectOwner"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721InsufficientApproval"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC721InvalidApprover"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC721InvalidOperator"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721InvalidOwner"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC721InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC721InvalidSender"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721NonexistentToken"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC721Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file +{"abi":[{"type":"error","name":"ERC721IncorrectOwner","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InsufficientApproval","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NonexistentToken","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\",\"errors\":{\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC721Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721IncorrectOwner"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721InsufficientApproval"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC721InvalidApprover"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC721InvalidOperator"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721InvalidOwner"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC721InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC721InvalidSender"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721NonexistentToken"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC721Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json index 4f8edb48f5..902354028d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-contract-interface.sol/SATPContractInterface.json @@ -1 +1 @@ -{"abi":[{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"assign(address,address,uint256)":"5f52d44e","burn(address,uint256)":"9dc29fac","hasPermission(address)":"97128e00","mint(address,uint256)":"40c10f19","transfer(address,address,uint256)":"beabacc8"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/satp-contract-interface.sol\":\"SATPContractInterface\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"src/test/solidity/contracts/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/satp-contract-interface.sol":"SATPContractInterface"},"evmVersion":"paris","libraries":{}},"sources":{"src/test/solidity/contracts/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"}},"version":1},"id":13} \ No newline at end of file +{"abi":[{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"assign(address,address,uint256)":"5f52d44e","burn(address,uint256)":"9dc29fac","hasPermission(address)":"97128e00","mint(address,uint256)":"40c10f19","transfer(address,address,uint256)":"beabacc8"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/satp-contract-interface.sol\":\"SATPContractInterface\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"src/test/solidity/contracts/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/satp-contract-interface.sol":"SATPContractInterface"},"evmVersion":"paris","libraries":{}},"sources":{"src/test/solidity/contracts/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"}},"version":1},"id":13} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json index cc4e24965b..a242adf82c 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/satp-erc20.sol/SATPContract.json @@ -1 +1 @@ -{"abi":[{"type":"constructor","inputs":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_id","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"OWNER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"checkBalance","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getId","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"giveRole","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"id","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]},{"type":"error","name":"noPermission","inputs":[{"name":"adr","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620014a4380380620014a48339810160408190526200003491620001d2565b6040518060400160405280600981526020016829a0aa282a37b5b2b760b91b815250604051806040016040528060048152602001630534154560e41b815250816004908162000084919062000357565b50600562000093828262000357565b505050620000c87fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e836200010d60201b60201c565b50620000f57f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f836200010d565b50600662000104828262000357565b50505062000423565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16620001b2576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001693390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001b6565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620001e657600080fd5b82516001600160a01b0381168114620001fe57600080fd5b602084810151919350906001600160401b03808211156200021e57600080fd5b818601915086601f8301126200023357600080fd5b815181811115620002485762000248620001bc565b604051601f8201601f19908116603f01168101908382118183101715620002735762000273620001bc565b8160405282815289868487010111156200028c57600080fd5b600093505b82841015620002b0578484018601518185018701529285019262000291565b60008684830101528096505050505050509250929050565b600181811c90821680620002dd57607f821691505b602082108103620002fe57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035257600081815260208120601f850160051c810160208610156200032d5750805b601f850160051c820191505b818110156200034e5782815560010162000339565b5050505b505050565b81516001600160401b03811115620003735762000373620001bc565b6200038b81620003848454620002c8565b8462000304565b602080601f831160018114620003c35760008415620003aa5750858301515b600019600386901b1c1916600185901b1785556200034e565b600085815260208120601f198616915b82811015620003f457888601518255948401946001909101908401620003d3565b5085821015620004135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61107180620004336000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa26469706673582212205c19eccd79b954f812cf3dba1e11836a0d878689eee985130dcc211dc0b7ac2064736f6c63430008140033","sourceMap":"341:2002:14:-:0;;;595:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1896:113:3;;;;;;;;;;;;;-1:-1:-1;;;1896:113:3;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:3;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:3;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;679:30:14::1;542:23;702:6;679:10;;;:30;;:::i;:::-;-1:-1:-1::0;719:31:14::1;475:24;743:6:::0;719:10:::1;:31::i;:::-;-1:-1:-1::0;761:2:14::1;:8;766:3:::0;761:2;:8:::1;:::i;:::-;;595:181:::0;;341:2002;;6179:316:0;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:6;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6272:217;6179:316;;;;:::o;14:127:15:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1209;235:6;243;296:2;284:9;275:7;271:23;267:32;264:52;;;312:1;309;302:12;264:52;338:16;;-1:-1:-1;;;;;383:31:15;;373:42;;363:70;;429:1;426;419:12;363:70;476:2;507:18;;;501:25;452:5;;-1:-1:-1;476:2:15;-1:-1:-1;;;;;575:14:15;;;572:34;;;602:1;599;592:12;572:34;640:6;629:9;625:22;615:32;;685:7;678:4;674:2;670:13;666:27;656:55;;707:1;704;697:12;656:55;736:2;730:9;758:2;754;751:10;748:36;;;764:18;;:::i;:::-;839:2;833:9;807:2;893:13;;-1:-1:-1;;889:22:15;;;913:2;885:31;881:40;869:53;;;937:18;;;957:22;;;934:46;931:72;;;983:18;;:::i;:::-;1023:10;1019:2;1012:22;1058:2;1050:6;1043:18;1098:7;1093:2;1088;1084;1080:11;1076:20;1073:33;1070:53;;;1119:1;1116;1109:12;1070:53;1141:1;1132:10;;1151:129;1165:2;1162:1;1159:9;1151:129;;;1253:10;;;1249:19;;1243:26;1222:14;;;1218:23;;1211:59;1176:10;;;;1151:129;;;1322:1;1317:2;1312;1304:6;1300:15;1296:24;1289:35;1343:6;1333:16;;;;;;;;146:1209;;;;;:::o;1360:380::-;1439:1;1435:12;;;;1482;;;1503:61;;1557:4;1549:6;1545:17;1535:27;;1503:61;1610:2;1602:6;1599:14;1579:18;1576:38;1573:161;;1656:10;1651:3;1647:20;1644:1;1637:31;1691:4;1688:1;1681:15;1719:4;1716:1;1709:15;1573:161;;1360:380;;;:::o;1871:545::-;1973:2;1968:3;1965:11;1962:448;;;2009:1;2034:5;2030:2;2023:17;2079:4;2075:2;2065:19;2149:2;2137:10;2133:19;2130:1;2126:27;2120:4;2116:38;2185:4;2173:10;2170:20;2167:47;;;-1:-1:-1;2208:4:15;2167:47;2263:2;2258:3;2254:12;2251:1;2247:20;2241:4;2237:31;2227:41;;2318:82;2336:2;2329:5;2326:13;2318:82;;;2381:17;;;2362:1;2351:13;2318:82;;;2322:3;;;1962:448;1871:545;;;:::o;2592:1352::-;2712:10;;-1:-1:-1;;;;;2734:30:15;;2731:56;;;2767:18;;:::i;:::-;2796:97;2886:6;2846:38;2878:4;2872:11;2846:38;:::i;:::-;2840:4;2796:97;:::i;:::-;2948:4;;3012:2;3001:14;;3029:1;3024:663;;;;3731:1;3748:6;3745:89;;;-1:-1:-1;3800:19:15;;;3794:26;3745:89;-1:-1:-1;;2549:1:15;2545:11;;;2541:24;2537:29;2527:40;2573:1;2569:11;;;2524:57;3847:81;;2994:944;;3024:663;1818:1;1811:14;;;1855:4;1842:18;;-1:-1:-1;;3060:20:15;;;3178:236;3192:7;3189:1;3186:14;3178:236;;;3281:19;;;3275:26;3260:42;;3373:27;;;;3341:1;3329:14;;;;3208:19;;3178:236;;;3182:3;3442:6;3433:7;3430:19;3427:201;;;3503:19;;;3497:26;-1:-1:-1;;3586:1:15;3582:14;;;3598:3;3578:24;3574:37;3570:42;3555:58;3540:74;;3427:201;-1:-1:-1;;;;;3674:1:15;3658:14;;;3654:22;3641:36;;-1:-1:-1;2592:1352:15:o;:::-;341:2002:14;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa26469706673582212205c19eccd79b954f812cf3dba1e11836a0d878689eee985130dcc211dc0b7ac2064736f6c63430008140033","sourceMap":"341:2002:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:0;;;;;;:::i;:::-;;:::i;:::-;;;470:14:15;;463:22;445:41;;433:2;418:18;2565:202:0;;;;;;;;2074:89:3;;;:::i;:::-;;;;;;;:::i;4293:186::-;;;;;;:::i;:::-;;:::i;3144:97::-;3222:12;;3144:97;;;1733:25:15;;;1721:2;1706:18;3144:97:3;1587:177:15;5039:244:3;;;;;;:::i;:::-;;:::i;3810:120:0:-;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;:::-;;3002:82:3;;;3075:2;2870:36:15;;2858:2;2843:18;3002:82:3;2728:184:15;5328:245:0;;;;;;:::i;:::-;;:::i;782:161:14:-;;;;;;:::i;:::-;;:::i;1588:174::-;;;:::i;:::-;;;;;;;:::i;1768:79::-;;;:::i;2228:113::-;;;;;;:::i;:::-;;:::i;1116:264::-;;;;;;:::i;:::-;;:::i;3299:116:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:3;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2854:136:0;;;;;;:::i;:::-;;:::i;2276:93:3:-;;;:::i;2017:205:14:-;;;;;;:::i;:::-;;:::i;949:161::-;;;;;;:::i;:::-;;:::i;2187:49:0:-;;2232:4;2187:49;;3610:178:3;;;;;;:::i;:::-;;:::i;572:16:14:-;;;:::i;437:62::-;;-1:-1:-1;;;;;;;;;;;437:62:14;;1386:196;;;;;;:::i;:::-;;:::i;1853:158::-;;;;;;:::i;:::-;;:::i;4642:138:0:-;;;;;;:::i;:::-;;:::i;3846:140:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:3;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;505:60:14;;542:23;505:60;;2565:202:0;2650:4;-1:-1:-1;;;;;;2673:47:0;;-1:-1:-1;;;2673:47:0;;:87;;-1:-1:-1;;;;;;;;;;861:40:8;;;2724:36:0;2666:94;2565:202;-1:-1:-1;;2565:202:0:o;2074:89:3:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:6;4420:31:3;735:10:6;4436:7:3;4445:5;4420:8;:31::i;:::-;-1:-1:-1;4468:4:3;;4293:186;-1:-1:-1;;;4293:186:3:o;5039:244::-;5126:4;735:10:6;5182:37:3;5198:4;735:10:6;5213:5:3;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:3;;5039:244;-1:-1:-1;;;;5039:244:3:o;4226:136:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;5328:245::-;-1:-1:-1;;;;;5421:34:0;;735:10:6;5421:34:0;5417:102;;5478:30;;-1:-1:-1;;;5478:30:0;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;782:161:14:-;869:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;893:22:14::1;899:7;908:6;893:5;:22::i;1588:174::-:0;1691:15;;;1704:1;1691:15;;;;;;;;;1638;;1665:23;;1691:15;;;;;;;;;;;;;;;;;;;;;1665:41;;1729:2;1716:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;1724:1;1716:10;;;;;;;;:::i;:::-;;;;;;;;;;:15;1748:7;1588:174;-1:-1:-1;1588:174:14:o;1768:79::-;1806:13;1838:2;1831:9;;;;;:::i;2228:113::-;-1:-1:-1;;;;;3390:18:3;;2290:7:14;3390:18:3;;;:9;:18;;;;;;2316::14;3299:116:3;1116:264:14;1221:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;-1:-1:-1;;;;;1253:20:14;::::1;735:10:6::0;1253:20:14::1;1245:63;;;::::0;-1:-1:-1;;;1245:63:14;;5032:2:15;1245:63:14::1;::::0;::::1;5014:21:15::0;5071:2;5051:18;;;5044:30;5110:32;5090:18;;;5083:60;5160:18;;1245:63:14::1;;;;;;;;2854:136:0::0;2931:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;;;;2854:136::o;2276:93:3:-;2323:13;2355:7;2348:14;;;;;:::i;2017:205:14:-;2080:12;2107:29;-1:-1:-1;;;;;;;;;;;2128:7:14;2107;:29::i;:::-;2104:69;;;-1:-1:-1;2158:4:14;;2017:205;-1:-1:-1;2017:205:14:o;2104:69::-;2194:21;;-1:-1:-1;;;2194:21:14;;-1:-1:-1;;;;;5353:32:15;;2194:21:14;;;5335:51:15;5308:18;;2194:21:14;5189:203:15;949:161:14;1036:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1060:22:14::1;1066:7;1075:6;1060:5;:22::i;3610:178:3:-:0;3679:4;735:10:6;3733:27:3;735:10:6;3750:2:3;3754:5;3733:9;:27::i;572:16:14:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1386:196::-;1493:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1517:37:14::1;1530:4;1536:9;1547:6;1517:12;:37::i;:::-;-1:-1:-1::0;1571:4:14::1;::::0;1386:196;-1:-1:-1;;;;;1386:196:14:o;1853:158::-;1927:12;542:23;2464:16:0;2475:4;2464:10;:16::i;:::-;1951:32:14::1;-1:-1:-1::0;;;;;;;;;;;1975:7:14::1;1951:10;:32::i;:::-;;2000:4;1993:11;;2490:1:0;1853:158:14::0;;;;:::o;4642:138:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;8989:128:3:-:0;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;10663:477::-;-1:-1:-1;;;;;3952:18:3;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:3;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:3;;-1:-1:-1;;;;;5617:32:15;;10936:60:3;;;5599:51:15;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;10936:60:3;5397:345:15;10881:130:3;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;5656:300::-;-1:-1:-1;;;;;5739:18:3;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:3;;5807:1;5780:30;;;5335:51:15;5308:18;;5780:30:3;5189:203:15;5735:86:3;-1:-1:-1;;;;;5834:16:3;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:3;;5902:1;5873:32;;;5335:51:15;5308:18;;5873:32:3;5189:203:15;5830:86:3;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;3199:103:0:-;3265:30;3276:4;735:10:6;3265::0;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;6277:22;6285:4;6291:7;6277;:22::i;:::-;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:6;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6466:12;;6730:317;6808:4;6828:22;6836:4;6842:7;6828;:22::i;:::-;6824:217;;;6898:5;6866:12;;;;;;;;;;;-1:-1:-1;;;;;6866:29:0;;;;;;;;;;:37;;-1:-1:-1;;6866:37:0;;;6922:40;735:10:6;;6866:12:0;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:0;6976:11;;7721:208:3;-1:-1:-1;;;;;7791:21:3;;7787:91;;7835:32;;-1:-1:-1;;;7835:32:3;;7864:1;7835:32;;;5335:51:15;5308:18;;7835:32:3;5189:203:15;7787:91:3;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;8247:206::-;-1:-1:-1;;;;;8317:21:3;;8313:89;;8361:30;;-1:-1:-1;;;8361:30:3;;8388:1;8361:30;;;5335:51:15;5308:18;;8361:30:3;5189:203:15;8313:89:3;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;9949:432::-;-1:-1:-1;;;;;10061:19:3;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:3;;10132:1;10103:32;;;5335:51:15;5308:18;;10103:32:3;5189:203:15;10057:89:3;-1:-1:-1;;;;;10159:21:3;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:3;;10231:1;10203:31;;;5335:51:15;5308:18;;10203:31:3;5189:203:15;10155:90:3;-1:-1:-1;;;;;10254:18:3;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:3;10342:5;-1:-1:-1;;;;;10333:31:3;;10358:5;10333:31;;;;1733:25:15;;1721:2;1706:18;;1587:177;10333:31:3;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:3;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:3;;-1:-1:-1;6356:540:3;;-1:-1:-1;;;;;6570:15:3;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:3;;-1:-1:-1;;;;;5617:32:15;;6649:50:3;;;5599:51:15;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;6649:50:3;5397:345:15;6599:115:3;-1:-1:-1;;;;;6834:15:3;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:3;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:3;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:3;7355:4;-1:-1:-1;;;;;7346:25:3;;7365:5;7346:25;;;;1733::15;;1721:2;1706:18;;1587:177;7346:25:3;;;;;;;;6271:1107;;;:::o;3432:197:0:-;3520:22;3528:4;3534:7;3520;:22::i;:::-;3515:108;;3565:47;;-1:-1:-1;;;3565:47:0;;-1:-1:-1;;;;;6166:32:15;;3565:47:0;;;6148:51:15;6215:18;;;6208:34;;;6121:18;;3565:47:0;5974:274:15;14:286;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:15;;209:43;;199:71;;266:1;263;256:12;199:71;289:5;14:286;-1:-1:-1;;;14:286:15:o;497:423::-;539:3;577:5;571:12;604:6;599:3;592:19;629:1;639:162;653:6;650:1;647:13;639:162;;;715:4;771:13;;;767:22;;761:29;743:11;;;739:20;;732:59;668:12;639:162;;;643:3;846:1;839:4;830:6;825:3;821:16;817:27;810:38;909:4;902:2;898:7;893:2;885:6;881:15;877:29;872:3;868:39;864:50;857:57;;;497:423;;;;:::o;925:220::-;1074:2;1063:9;1056:21;1037:4;1094:45;1135:2;1124:9;1120:18;1112:6;1094:45;:::i;1150:173::-;1218:20;;-1:-1:-1;;;;;1267:31:15;;1257:42;;1247:70;;1313:1;1310;1303:12;1247:70;1150:173;;;:::o;1328:254::-;1396:6;1404;1457:2;1445:9;1436:7;1432:23;1428:32;1425:52;;;1473:1;1470;1463:12;1425:52;1496:29;1515:9;1496:29;:::i;:::-;1486:39;1572:2;1557:18;;;;1544:32;;-1:-1:-1;;;1328:254:15:o;1769:328::-;1846:6;1854;1862;1915:2;1903:9;1894:7;1890:23;1886:32;1883:52;;;1931:1;1928;1921:12;1883:52;1954:29;1973:9;1954:29;:::i;:::-;1944:39;;2002:38;2036:2;2025:9;2021:18;2002:38;:::i;:::-;1992:48;;2087:2;2076:9;2072:18;2059:32;2049:42;;1769:328;;;;;:::o;2102:180::-;2161:6;2214:2;2202:9;2193:7;2189:23;2185:32;2182:52;;;2230:1;2227;2220:12;2182:52;-1:-1:-1;2253:23:15;;2102:180;-1:-1:-1;2102:180:15:o;2469:254::-;2537:6;2545;2598:2;2586:9;2577:7;2573:23;2569:32;2566:52;;;2614:1;2611;2604:12;2566:52;2650:9;2637:23;2627:33;;2679:38;2713:2;2702:9;2698:18;2679:38;:::i;:::-;2669:48;;2469:254;;;;;:::o;2917:803::-;3079:4;3108:2;3148;3137:9;3133:18;3178:2;3167:9;3160:21;3201:6;3236;3230:13;3267:6;3259;3252:22;3305:2;3294:9;3290:18;3283:25;;3367:2;3357:6;3354:1;3350:14;3339:9;3335:30;3331:39;3317:53;;3405:2;3397:6;3393:15;3426:1;3436:255;3450:6;3447:1;3444:13;3436:255;;;3543:2;3539:7;3527:9;3519:6;3515:22;3511:36;3506:3;3499:49;3571:40;3604:6;3595;3589:13;3571:40;:::i;:::-;3561:50;-1:-1:-1;3669:12:15;;;;3634:15;;;;3472:1;3465:9;3436:255;;;-1:-1:-1;3708:6:15;;2917:803;-1:-1:-1;;;;;;;2917:803:15:o;3725:186::-;3784:6;3837:2;3825:9;3816:7;3812:23;3808:32;3805:52;;;3853:1;3850;3843:12;3805:52;3876:29;3895:9;3876:29;:::i;3916:260::-;3984:6;3992;4045:2;4033:9;4024:7;4020:23;4016:32;4013:52;;;4061:1;4058;4051:12;4013:52;4084:29;4103:9;4084:29;:::i;:::-;4074:39;;4132:38;4166:2;4155:9;4151:18;4132:38;:::i;4181:380::-;4260:1;4256:12;;;;4303;;;4324:61;;4378:4;4370:6;4366:17;4356:27;;4324:61;4431:2;4423:6;4420:14;4400:18;4397:38;4394:161;;4477:10;4472:3;4468:20;4465:1;4458:31;4512:4;4509:1;4502:15;4540:4;4537:1;4530:15;4698:127;4759:10;4754:3;4750:20;4747:1;4740:31;4790:4;4787:1;4780:15;4814:4;4811:1;4804:15;5747:222;5812:9;;;5833:10;;;5830:133;;;5885:10;5880:3;5876:20;5873:1;5866:31;5920:4;5917:1;5910:15;5948:4;5945:1;5938:15","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","DEFAULT_ADMIN_ROLE()":"a217fddf","OWNER_ROLE()":"e58378bb","allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","assign(address,address,uint256)":"5f52d44e","balanceOf(address)":"70a08231","burn(address,uint256)":"9dc29fac","checkBalance(address)":"5f515226","decimals()":"313ce567","getAllAssetsIDs()":"5137b8a7","getId()":"5d1ca631","getRoleAdmin(bytes32)":"248a9ca3","giveRole(address)":"c375110d","grantRole(bytes32,address)":"2f2ff15d","hasPermission(address)":"97128e00","hasRole(bytes32,address)":"91d14854","id()":"af640d0f","mint(address,uint256)":"40c10f19","name()":"06fdde03","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,address,uint256)":"beabacc8","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_id\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adr\",\"type\":\"address\"}],\"name\":\"noPermission\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"checkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"giveRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"id\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/satp-erc20.sol\":\"SATPContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\",\":web3js-quorum/=node_modules/web3js-quorum/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/test/solidity/contracts/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/test/solidity/contracts/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]},\"src/test/solidity/contracts/satp-erc20.sol\":{\"keccak256\":\"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac\",\"dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_id","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"type":"error","name":"noPermission"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"checkBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getId","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"giveRole","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"id","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"name()":{"details":"Returns the name of the token."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/","web3js-quorum/=node_modules/web3js-quorum/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/satp-erc20.sol":"SATPContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/test/solidity/contracts/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/test/solidity/contracts/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"},"src/test/solidity/contracts/satp-erc20.sol":{"keccak256":"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989","urls":["bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac","dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8"],"license":"GPL-3.0"}},"version":1},"id":14} \ No newline at end of file +{"abi":[{"type":"constructor","inputs":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_id","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"OWNER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"checkBalance","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getId","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"giveRole","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"id","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]},{"type":"error","name":"noPermission","inputs":[{"name":"adr","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620014a4380380620014a48339810160408190526200003491620001d2565b6040518060400160405280600981526020016829a0aa282a37b5b2b760b91b815250604051806040016040528060048152602001630534154560e41b815250816004908162000084919062000357565b50600562000093828262000357565b505050620000c87fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e836200010d60201b60201c565b50620000f57f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f836200010d565b50600662000104828262000357565b50505062000423565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16620001b2576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001693390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001b6565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620001e657600080fd5b82516001600160a01b0381168114620001fe57600080fd5b602084810151919350906001600160401b03808211156200021e57600080fd5b818601915086601f8301126200023357600080fd5b815181811115620002485762000248620001bc565b604051601f8201601f19908116603f01168101908382118183101715620002735762000273620001bc565b8160405282815289868487010111156200028c57600080fd5b600093505b82841015620002b0578484018601518185018701529285019262000291565b60008684830101528096505050505050509250929050565b600181811c90821680620002dd57607f821691505b602082108103620002fe57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035257600081815260208120601f850160051c810160208610156200032d5750805b601f850160051c820191505b818110156200034e5782815560010162000339565b5050505b505050565b81516001600160401b03811115620003735762000373620001bc565b6200038b81620003848454620002c8565b8462000304565b602080601f831160018114620003c35760008415620003aa5750858301515b600019600386901b1c1916600185901b1785556200034e565b600085815260208120601f198616915b82811015620003f457888601518255948401946001909101908401620003d3565b5085821015620004135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61107180620004336000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa2646970667358221220b4b95b25157e6f2741c159517e9cc2bde5e44e8afada81f262595fef023ea77964736f6c63430008140033","sourceMap":"341:2002:14:-:0;;;595:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1896:113:3;;;;;;;;;;;;;-1:-1:-1;;;1896:113:3;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:3;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:3;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;679:30:14::1;542:23;702:6;679:10;;;:30;;:::i;:::-;-1:-1:-1::0;719:31:14::1;475:24;743:6:::0;719:10:::1;:31::i;:::-;-1:-1:-1::0;761:2:14::1;:8;766:3:::0;761:2;:8:::1;:::i;:::-;;595:181:::0;;341:2002;;6179:316:0;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:6;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6272:217;6179:316;;;;:::o;14:127:15:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1209;235:6;243;296:2;284:9;275:7;271:23;267:32;264:52;;;312:1;309;302:12;264:52;338:16;;-1:-1:-1;;;;;383:31:15;;373:42;;363:70;;429:1;426;419:12;363:70;476:2;507:18;;;501:25;452:5;;-1:-1:-1;476:2:15;-1:-1:-1;;;;;575:14:15;;;572:34;;;602:1;599;592:12;572:34;640:6;629:9;625:22;615:32;;685:7;678:4;674:2;670:13;666:27;656:55;;707:1;704;697:12;656:55;736:2;730:9;758:2;754;751:10;748:36;;;764:18;;:::i;:::-;839:2;833:9;807:2;893:13;;-1:-1:-1;;889:22:15;;;913:2;885:31;881:40;869:53;;;937:18;;;957:22;;;934:46;931:72;;;983:18;;:::i;:::-;1023:10;1019:2;1012:22;1058:2;1050:6;1043:18;1098:7;1093:2;1088;1084;1080:11;1076:20;1073:33;1070:53;;;1119:1;1116;1109:12;1070:53;1141:1;1132:10;;1151:129;1165:2;1162:1;1159:9;1151:129;;;1253:10;;;1249:19;;1243:26;1222:14;;;1218:23;;1211:59;1176:10;;;;1151:129;;;1322:1;1317:2;1312;1304:6;1300:15;1296:24;1289:35;1343:6;1333:16;;;;;;;;146:1209;;;;;:::o;1360:380::-;1439:1;1435:12;;;;1482;;;1503:61;;1557:4;1549:6;1545:17;1535:27;;1503:61;1610:2;1602:6;1599:14;1579:18;1576:38;1573:161;;1656:10;1651:3;1647:20;1644:1;1637:31;1691:4;1688:1;1681:15;1719:4;1716:1;1709:15;1573:161;;1360:380;;;:::o;1871:545::-;1973:2;1968:3;1965:11;1962:448;;;2009:1;2034:5;2030:2;2023:17;2079:4;2075:2;2065:19;2149:2;2137:10;2133:19;2130:1;2126:27;2120:4;2116:38;2185:4;2173:10;2170:20;2167:47;;;-1:-1:-1;2208:4:15;2167:47;2263:2;2258:3;2254:12;2251:1;2247:20;2241:4;2237:31;2227:41;;2318:82;2336:2;2329:5;2326:13;2318:82;;;2381:17;;;2362:1;2351:13;2318:82;;;2322:3;;;1962:448;1871:545;;;:::o;2592:1352::-;2712:10;;-1:-1:-1;;;;;2734:30:15;;2731:56;;;2767:18;;:::i;:::-;2796:97;2886:6;2846:38;2878:4;2872:11;2846:38;:::i;:::-;2840:4;2796:97;:::i;:::-;2948:4;;3012:2;3001:14;;3029:1;3024:663;;;;3731:1;3748:6;3745:89;;;-1:-1:-1;3800:19:15;;;3794:26;3745:89;-1:-1:-1;;2549:1:15;2545:11;;;2541:24;2537:29;2527:40;2573:1;2569:11;;;2524:57;3847:81;;2994:944;;3024:663;1818:1;1811:14;;;1855:4;1842:18;;-1:-1:-1;;3060:20:15;;;3178:236;3192:7;3189:1;3186:14;3178:236;;;3281:19;;;3275:26;3260:42;;3373:27;;;;3341:1;3329:14;;;;3208:19;;3178:236;;;3182:3;3442:6;3433:7;3430:19;3427:201;;;3503:19;;;3497:26;-1:-1:-1;;3586:1:15;3582:14;;;3598:3;3578:24;3574:37;3570:42;3555:58;3540:74;;3427:201;-1:-1:-1;;;;;3674:1:15;3658:14;;;3654:22;3641:36;;-1:-1:-1;2592:1352:15:o;:::-;341:2002:14;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa2646970667358221220b4b95b25157e6f2741c159517e9cc2bde5e44e8afada81f262595fef023ea77964736f6c63430008140033","sourceMap":"341:2002:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:0;;;;;;:::i;:::-;;:::i;:::-;;;470:14:15;;463:22;445:41;;433:2;418:18;2565:202:0;;;;;;;;2074:89:3;;;:::i;:::-;;;;;;;:::i;4293:186::-;;;;;;:::i;:::-;;:::i;3144:97::-;3222:12;;3144:97;;;1733:25:15;;;1721:2;1706:18;3144:97:3;1587:177:15;5039:244:3;;;;;;:::i;:::-;;:::i;3810:120:0:-;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;:::-;;3002:82:3;;;3075:2;2870:36:15;;2858:2;2843:18;3002:82:3;2728:184:15;5328:245:0;;;;;;:::i;:::-;;:::i;782:161:14:-;;;;;;:::i;:::-;;:::i;1588:174::-;;;:::i;:::-;;;;;;;:::i;1768:79::-;;;:::i;2228:113::-;;;;;;:::i;:::-;;:::i;1116:264::-;;;;;;:::i;:::-;;:::i;3299:116:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:3;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2854:136:0;;;;;;:::i;:::-;;:::i;2276:93:3:-;;;:::i;2017:205:14:-;;;;;;:::i;:::-;;:::i;949:161::-;;;;;;:::i;:::-;;:::i;2187:49:0:-;;2232:4;2187:49;;3610:178:3;;;;;;:::i;:::-;;:::i;572:16:14:-;;;:::i;437:62::-;;-1:-1:-1;;;;;;;;;;;437:62:14;;1386:196;;;;;;:::i;:::-;;:::i;1853:158::-;;;;;;:::i;:::-;;:::i;4642:138:0:-;;;;;;:::i;:::-;;:::i;3846:140:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:3;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;505:60:14;;542:23;505:60;;2565:202:0;2650:4;-1:-1:-1;;;;;;2673:47:0;;-1:-1:-1;;;2673:47:0;;:87;;-1:-1:-1;;;;;;;;;;861:40:8;;;2724:36:0;2666:94;2565:202;-1:-1:-1;;2565:202:0:o;2074:89:3:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:6;4420:31:3;735:10:6;4436:7:3;4445:5;4420:8;:31::i;:::-;-1:-1:-1;4468:4:3;;4293:186;-1:-1:-1;;;4293:186:3:o;5039:244::-;5126:4;735:10:6;5182:37:3;5198:4;735:10:6;5213:5:3;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:3;;5039:244;-1:-1:-1;;;;5039:244:3:o;4226:136:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;5328:245::-;-1:-1:-1;;;;;5421:34:0;;735:10:6;5421:34:0;5417:102;;5478:30;;-1:-1:-1;;;5478:30:0;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;782:161:14:-;869:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;893:22:14::1;899:7;908:6;893:5;:22::i;1588:174::-:0;1691:15;;;1704:1;1691:15;;;;;;;;;1638;;1665:23;;1691:15;;;;;;;;;;;;;;;;;;;;;1665:41;;1729:2;1716:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;1724:1;1716:10;;;;;;;;:::i;:::-;;;;;;;;;;:15;1748:7;1588:174;-1:-1:-1;1588:174:14:o;1768:79::-;1806:13;1838:2;1831:9;;;;;:::i;2228:113::-;-1:-1:-1;;;;;3390:18:3;;2290:7:14;3390:18:3;;;:9;:18;;;;;;2316::14;3299:116:3;1116:264:14;1221:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;-1:-1:-1;;;;;1253:20:14;::::1;735:10:6::0;1253:20:14::1;1245:63;;;::::0;-1:-1:-1;;;1245:63:14;;5032:2:15;1245:63:14::1;::::0;::::1;5014:21:15::0;5071:2;5051:18;;;5044:30;5110:32;5090:18;;;5083:60;5160:18;;1245:63:14::1;;;;;;;;2854:136:0::0;2931:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;;;;2854:136::o;2276:93:3:-;2323:13;2355:7;2348:14;;;;;:::i;2017:205:14:-;2080:12;2107:29;-1:-1:-1;;;;;;;;;;;2128:7:14;2107;:29::i;:::-;2104:69;;;-1:-1:-1;2158:4:14;;2017:205;-1:-1:-1;2017:205:14:o;2104:69::-;2194:21;;-1:-1:-1;;;2194:21:14;;-1:-1:-1;;;;;5353:32:15;;2194:21:14;;;5335:51:15;5308:18;;2194:21:14;5189:203:15;949:161:14;1036:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1060:22:14::1;1066:7;1075:6;1060:5;:22::i;3610:178:3:-:0;3679:4;735:10:6;3733:27:3;735:10:6;3750:2:3;3754:5;3733:9;:27::i;572:16:14:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1386:196::-;1493:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1517:37:14::1;1530:4;1536:9;1547:6;1517:12;:37::i;:::-;-1:-1:-1::0;1571:4:14::1;::::0;1386:196;-1:-1:-1;;;;;1386:196:14:o;1853:158::-;1927:12;542:23;2464:16:0;2475:4;2464:10;:16::i;:::-;1951:32:14::1;-1:-1:-1::0;;;;;;;;;;;1975:7:14::1;1951:10;:32::i;:::-;;2000:4;1993:11;;2490:1:0;1853:158:14::0;;;;:::o;4642:138:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;8989:128:3:-:0;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;10663:477::-;-1:-1:-1;;;;;3952:18:3;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:3;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:3;;-1:-1:-1;;;;;5617:32:15;;10936:60:3;;;5599:51:15;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;10936:60:3;5397:345:15;10881:130:3;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;5656:300::-;-1:-1:-1;;;;;5739:18:3;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:3;;5807:1;5780:30;;;5335:51:15;5308:18;;5780:30:3;5189:203:15;5735:86:3;-1:-1:-1;;;;;5834:16:3;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:3;;5902:1;5873:32;;;5335:51:15;5308:18;;5873:32:3;5189:203:15;5830:86:3;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;3199:103:0:-;3265:30;3276:4;735:10:6;3265::0;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;6277:22;6285:4;6291:7;6277;:22::i;:::-;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:6;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6466:12;;6730:317;6808:4;6828:22;6836:4;6842:7;6828;:22::i;:::-;6824:217;;;6898:5;6866:12;;;;;;;;;;;-1:-1:-1;;;;;6866:29:0;;;;;;;;;;:37;;-1:-1:-1;;6866:37:0;;;6922:40;735:10:6;;6866:12:0;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:0;6976:11;;7721:208:3;-1:-1:-1;;;;;7791:21:3;;7787:91;;7835:32;;-1:-1:-1;;;7835:32:3;;7864:1;7835:32;;;5335:51:15;5308:18;;7835:32:3;5189:203:15;7787:91:3;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;8247:206::-;-1:-1:-1;;;;;8317:21:3;;8313:89;;8361:30;;-1:-1:-1;;;8361:30:3;;8388:1;8361:30;;;5335:51:15;5308:18;;8361:30:3;5189:203:15;8313:89:3;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;9949:432::-;-1:-1:-1;;;;;10061:19:3;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:3;;10132:1;10103:32;;;5335:51:15;5308:18;;10103:32:3;5189:203:15;10057:89:3;-1:-1:-1;;;;;10159:21:3;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:3;;10231:1;10203:31;;;5335:51:15;5308:18;;10203:31:3;5189:203:15;10155:90:3;-1:-1:-1;;;;;10254:18:3;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:3;10342:5;-1:-1:-1;;;;;10333:31:3;;10358:5;10333:31;;;;1733:25:15;;1721:2;1706:18;;1587:177;10333:31:3;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:3;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:3;;-1:-1:-1;6356:540:3;;-1:-1:-1;;;;;6570:15:3;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:3;;-1:-1:-1;;;;;5617:32:15;;6649:50:3;;;5599:51:15;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;6649:50:3;5397:345:15;6599:115:3;-1:-1:-1;;;;;6834:15:3;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:3;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:3;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:3;7355:4;-1:-1:-1;;;;;7346:25:3;;7365:5;7346:25;;;;1733::15;;1721:2;1706:18;;1587:177;7346:25:3;;;;;;;;6271:1107;;;:::o;3432:197:0:-;3520:22;3528:4;3534:7;3520;:22::i;:::-;3515:108;;3565:47;;-1:-1:-1;;;3565:47:0;;-1:-1:-1;;;;;6166:32:15;;3565:47:0;;;6148:51:15;6215:18;;;6208:34;;;6121:18;;3565:47:0;5974:274:15;14:286;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:15;;209:43;;199:71;;266:1;263;256:12;199:71;289:5;14:286;-1:-1:-1;;;14:286:15:o;497:423::-;539:3;577:5;571:12;604:6;599:3;592:19;629:1;639:162;653:6;650:1;647:13;639:162;;;715:4;771:13;;;767:22;;761:29;743:11;;;739:20;;732:59;668:12;639:162;;;643:3;846:1;839:4;830:6;825:3;821:16;817:27;810:38;909:4;902:2;898:7;893:2;885:6;881:15;877:29;872:3;868:39;864:50;857:57;;;497:423;;;;:::o;925:220::-;1074:2;1063:9;1056:21;1037:4;1094:45;1135:2;1124:9;1120:18;1112:6;1094:45;:::i;1150:173::-;1218:20;;-1:-1:-1;;;;;1267:31:15;;1257:42;;1247:70;;1313:1;1310;1303:12;1247:70;1150:173;;;:::o;1328:254::-;1396:6;1404;1457:2;1445:9;1436:7;1432:23;1428:32;1425:52;;;1473:1;1470;1463:12;1425:52;1496:29;1515:9;1496:29;:::i;:::-;1486:39;1572:2;1557:18;;;;1544:32;;-1:-1:-1;;;1328:254:15:o;1769:328::-;1846:6;1854;1862;1915:2;1903:9;1894:7;1890:23;1886:32;1883:52;;;1931:1;1928;1921:12;1883:52;1954:29;1973:9;1954:29;:::i;:::-;1944:39;;2002:38;2036:2;2025:9;2021:18;2002:38;:::i;:::-;1992:48;;2087:2;2076:9;2072:18;2059:32;2049:42;;1769:328;;;;;:::o;2102:180::-;2161:6;2214:2;2202:9;2193:7;2189:23;2185:32;2182:52;;;2230:1;2227;2220:12;2182:52;-1:-1:-1;2253:23:15;;2102:180;-1:-1:-1;2102:180:15:o;2469:254::-;2537:6;2545;2598:2;2586:9;2577:7;2573:23;2569:32;2566:52;;;2614:1;2611;2604:12;2566:52;2650:9;2637:23;2627:33;;2679:38;2713:2;2702:9;2698:18;2679:38;:::i;:::-;2669:48;;2469:254;;;;;:::o;2917:803::-;3079:4;3108:2;3148;3137:9;3133:18;3178:2;3167:9;3160:21;3201:6;3236;3230:13;3267:6;3259;3252:22;3305:2;3294:9;3290:18;3283:25;;3367:2;3357:6;3354:1;3350:14;3339:9;3335:30;3331:39;3317:53;;3405:2;3397:6;3393:15;3426:1;3436:255;3450:6;3447:1;3444:13;3436:255;;;3543:2;3539:7;3527:9;3519:6;3515:22;3511:36;3506:3;3499:49;3571:40;3604:6;3595;3589:13;3571:40;:::i;:::-;3561:50;-1:-1:-1;3669:12:15;;;;3634:15;;;;3472:1;3465:9;3436:255;;;-1:-1:-1;3708:6:15;;2917:803;-1:-1:-1;;;;;;;2917:803:15:o;3725:186::-;3784:6;3837:2;3825:9;3816:7;3812:23;3808:32;3805:52;;;3853:1;3850;3843:12;3805:52;3876:29;3895:9;3876:29;:::i;3916:260::-;3984:6;3992;4045:2;4033:9;4024:7;4020:23;4016:32;4013:52;;;4061:1;4058;4051:12;4013:52;4084:29;4103:9;4084:29;:::i;:::-;4074:39;;4132:38;4166:2;4155:9;4151:18;4132:38;:::i;4181:380::-;4260:1;4256:12;;;;4303;;;4324:61;;4378:4;4370:6;4366:17;4356:27;;4324:61;4431:2;4423:6;4420:14;4400:18;4397:38;4394:161;;4477:10;4472:3;4468:20;4465:1;4458:31;4512:4;4509:1;4502:15;4540:4;4537:1;4530:15;4698:127;4759:10;4754:3;4750:20;4747:1;4740:31;4790:4;4787:1;4780:15;4814:4;4811:1;4804:15;5747:222;5812:9;;;5833:10;;;5830:133;;;5885:10;5880:3;5876:20;5873:1;5866:31;5920:4;5917:1;5910:15;5948:4;5945:1;5938:15","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","DEFAULT_ADMIN_ROLE()":"a217fddf","OWNER_ROLE()":"e58378bb","allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","assign(address,address,uint256)":"5f52d44e","balanceOf(address)":"70a08231","burn(address,uint256)":"9dc29fac","checkBalance(address)":"5f515226","decimals()":"313ce567","getAllAssetsIDs()":"5137b8a7","getId()":"5d1ca631","getRoleAdmin(bytes32)":"248a9ca3","giveRole(address)":"c375110d","grantRole(bytes32,address)":"2f2ff15d","hasPermission(address)":"97128e00","hasRole(bytes32,address)":"91d14854","id()":"af640d0f","mint(address,uint256)":"40c10f19","name()":"06fdde03","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,address,uint256)":"beabacc8","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_id\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adr\",\"type\":\"address\"}],\"name\":\"noPermission\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"checkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"giveRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"id\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/test/solidity/contracts/satp-erc20.sol\":\"SATPContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/test/solidity/contracts/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/test/solidity/contracts/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]},\"src/test/solidity/contracts/satp-erc20.sol\":{\"keccak256\":\"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac\",\"dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_id","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"type":"error","name":"noPermission"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"checkBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getId","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"giveRole","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"id","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"name()":{"details":"Returns the name of the token."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/test/solidity/contracts/satp-erc20.sol":"SATPContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/test/solidity/contracts/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/test/solidity/contracts/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"},"src/test/solidity/contracts/satp-erc20.sol":{"keccak256":"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989","urls":["bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac","dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8"],"license":"GPL-3.0"}},"version":1},"id":14} \ No newline at end of file From 8b887aa3464480f5a5c13a5c4480544777f7233c Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Tue, 13 Aug 2024 14:36:54 +0100 Subject: [PATCH 30/49] feat(satp-hermes): satp-manager and gol refactor Signed-off-by: Carlos Amaro --- .../main/proto/cacti/satp/v02/stage_0.proto | 6 + .../src/main/typescript/blo/dispatcher.ts | 1 + .../typescript/core/sender-satp-protocol.ts | 167 ----------- .../core/stage-handlers/stage0-handler.ts | 10 +- .../core/stage-handlers/stage1-handler.ts | 10 +- .../core/stage-handlers/stage2-handler.ts | 10 +- .../core/stage-handlers/stage3-handler.ts | 10 +- .../src/main/typescript/core/types.ts | 2 +- .../proto/cacti/satp/v02/stage_0_connect.ts | 17 +- .../proto/cacti/satp/v02/stage_0_pb.ts | 37 +++ .../typescript/gol/gateway-orchestrator.ts | 29 +- .../src/main/typescript/gol/satp-manager.ts | 264 ++++++++++++++---- .../main/typescript/types/satp-protocol.ts | 10 +- .../test/solidity/satp-erc20-interact.json | 1 + 14 files changed, 328 insertions(+), 246 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto index 242ef80582..7172208c82 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package cacti.satp.v02; import "cacti/satp/v02/common/message.proto"; +import "google/protobuf/empty.proto"; message PrivacyPolicy { string name = 1; @@ -31,8 +32,13 @@ message PreTransferCommenceRequestMessage { message PreTransferCommenceResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; } + +message PublicKey { + string public_key = 1; +} service SatpStage0Service { // util RPCs + rpc GetPublicKey(google.protobuf.Empty) returns (PublicKey) {}; // step RPCs rpc PreTransferProposalClaims(PreTransferVerificationAndContextEstablishmentRequest) returns (PreTransferVerificationAndContextEstablishmentResponse) {}; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index bcaf97b4a0..966de6ef1c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -61,6 +61,7 @@ export class BLODispatcher { signer: signer, supportedDLTs: this.orchestrator.supportedDLTs, bridgeManager: this.bridgeManager, + orquestrator: this.orchestrator, }; this.manager = new SATPManager(SATPManagerOpts); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts deleted file mode 100644 index 143c4cc61b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/sender-satp-protocol.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { createPromiseClient } from "@connectrpc/connect"; -import { - LogLevelDesc, - Logger, - LoggerProvider, -} from "@hyperledger/cactus-common"; -import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; -import { createConnectTransport } from "@connectrpc/connect-node"; -import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; -import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; -import { SATPManager } from "../gol/satp-manager"; -import { SATPSession } from "./satp-session"; -import { SATPHandler } from "../types/satp-protocol"; -import { Stage1SATPHandler } from "./stage-handlers/stage1-handler"; -import { Stage2SATPHandler } from "./stage-handlers/stage2-handler"; -import { Stage3SATPHandler } from "./stage-handlers/stage3-handler"; - -export interface ISenderSATPProtocolOptions { - logLevel?: LogLevelDesc; - serverPath: string; - sessionId: string; - satpManager: SATPManager; -} - -export interface SATPTransferRequest { - sessionId: string; -} - -export class SenderSATPProtocol { - public static readonly CLASS_NAME = "SenderSATPProtocol"; - - private satpManager: SATPManager; - - readonly log: Logger; - constructor(private config: ISenderSATPProtocolOptions) { - this.log = LoggerProvider.getOrCreate({ - label: SenderSATPProtocol.CLASS_NAME, - level: config.logLevel || "INFO", - }); - this.satpManager = config.satpManager; - } - - public async initiateTransfer(session: SATPSession): Promise { - this.log.info(`Initiating Transfer`); - this.log.info(`Session: ${JSON.stringify(session)}`); - - if (!session) { - throw new Error(`Session with id ${this.config.sessionId} not found`); - } - - const transport = createConnectTransport({ - baseUrl: this.config.serverPath, - httpVersion: "1.1", - }); - - const handlers = this.satpManager.getSATPHandlers(session.getSessionId()); - - if (!handlers) { - throw new Error( - `No handlers found for session ${session.getSessionId()}`, - ); - } - - const satpHandlers: Map = handlers; - - const clientSatpStage1 = createPromiseClient(SatpStage1Service, transport); - const clientSatpStage2 = createPromiseClient(SatpStage2Service, transport); - const clientSatpStage3 = createPromiseClient(SatpStage3Service, transport); - - const requestTransferProposal = await ( - satpHandlers.get("Stage1SATPHandler") as Stage1SATPHandler - ).TransferProposalRequest(session.getSessionId()); - - if (!requestTransferProposal) { - throw new Error(`Failed to create TransferProposalRequest`); - } - - const responseTransferProposal = await clientSatpStage1.transferProposal( - requestTransferProposal, - ); - - this.log.info( - `responseTransferProposal: ${JSON.stringify(responseTransferProposal)}`, - ); - - const requestTransferCommence = await ( - satpHandlers.get("Stage1SATPHandler") as Stage1SATPHandler - ).TransferCommenceRequest(responseTransferProposal); - - if (!requestTransferCommence) { - throw new Error(`Failed to create TransferCommenceRequest`); - } - - const responseTransferCommence = await clientSatpStage1.transferCommence( - requestTransferCommence, - ); - - this.log.info( - `responseTransferCommence: ${JSON.stringify(responseTransferCommence)}`, - ); - - this.log.info(`Stage 1 completed`); - - const requestLockAssertion = await ( - satpHandlers.get("Stage2SATPHandler") as Stage2SATPHandler - ).LockAssertionRequest(responseTransferCommence); - - if (!requestLockAssertion) { - throw new Error(`Failed to create LockAssertionRequest`); - } - - const responseLockAssertion = - await clientSatpStage2.lockAssertion(requestLockAssertion); - - this.log.info( - `responseLockAssertion: ${JSON.stringify(responseLockAssertion)}`, - ); - - this.log.info(`Stage 2 completed`); - - const requestCommitPreparation = await ( - satpHandlers.get("Stage3SATPHandler") as Stage3SATPHandler - ).CommitPreparationRequest(responseLockAssertion); - - if (!requestCommitPreparation) { - throw new Error(`Failed to create CommitPreparationRequest`); - } - - const responseCommitPreparation = await clientSatpStage3.commitPreparation( - requestCommitPreparation, - ); - this.log.info( - `responseCommitPreparation: ${JSON.stringify(responseCommitPreparation)}`, - ); - - const requestCommitFinalAssertion = await ( - satpHandlers.get("Stage3SATPHandler") as Stage3SATPHandler - ).CommitFinalAssertionRequest(responseLockAssertion); - - if (!requestCommitFinalAssertion) { - throw new Error(`Failed to create CommitFinalAssertionRequest`); - } - - const responseCommitFinalAssertion = - await clientSatpStage3.commitFinalAssertion(requestCommitFinalAssertion); - this.log.info( - `responseCommitFinalAssertion: ${JSON.stringify(responseCommitFinalAssertion)}`, - ); - - const RequestTransferComplete = await ( - satpHandlers.get("Stage3SATPHandler") as Stage3SATPHandler - ).TransferCompleteRequest(responseCommitFinalAssertion); - - if (!RequestTransferComplete) { - throw new Error(`Failed to create TransferCompleteRequest`); - } - - const responseTransferComplete = await clientSatpStage3.transferComplete( - RequestTransferComplete, - ); - this.log.info( - `responseTransferComplete: ${JSON.stringify(responseTransferComplete)}`, - ); - - this.log.info(`Stage 3 completed`); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts index 711e05a0fc..93f29c04bc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -1,7 +1,11 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPSession } from "../satp-session"; import { Stage0ServerService } from "../stage-services/server/stage0-server-service"; -import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { + SATPHandler, + SATPHandlerOptions, + SATPHandlerType, +} from "../../types/satp-protocol"; import { ConnectRouter } from "@connectrpc/connect"; import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; import { @@ -13,7 +17,7 @@ import { import { Stage0ClientService } from "../stage-services/client/stage0-client-service"; export class Stage0SATPHandler implements SATPHandler { - public static readonly CLASS_NAME = "Stage0SATPHandler"; + public static readonly CLASS_NAME = SATPHandlerType.STAGE0; private sessions: Map; private serverService: Stage0ServerService; private clientService: Stage0ClientService; @@ -29,7 +33,7 @@ export class Stage0SATPHandler implements SATPHandler { return Array.from(this.sessions.keys()); } - getHandlerIdentifier(): string { + getHandlerIdentifier(): SATPHandlerType { return Stage0SATPHandler.CLASS_NAME; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 51556ad706..3e9514c9f0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -10,11 +10,15 @@ import { SATPSession } from "../satp-session"; import { Stage1ServerService } from "../stage-services/server/stage1-server-service"; import { Stage1ClientService } from "../stage-services/client/stage1-client-service"; import { SupportedChain } from "../types"; -import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { + SATPHandler, + SATPHandlerOptions, + SATPHandlerType, +} from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; export class Stage1SATPHandler implements SATPHandler { - public static readonly CLASS_NAME = "Stage1SATPHandler"; + public static readonly CLASS_NAME = SATPHandlerType.STAGE1; private sessions: Map; private serverService: Stage1ServerService; private clientService: Stage1ClientService; @@ -30,7 +34,7 @@ export class Stage1SATPHandler implements SATPHandler { this.logger.trace(`Initialized ${Stage1SATPHandler.CLASS_NAME}`); } - getHandlerIdentifier(): string { + getHandlerIdentifier(): SATPHandlerType { return Stage1SATPHandler.CLASS_NAME; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index c722377e46..d9bf680194 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -3,7 +3,11 @@ import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_ import { Stage2ServerService } from "../stage-services/server/stage2-server-service"; import { SATPSession } from "../satp-session"; import { SupportedChain } from "../types"; -import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { + SATPHandler, + SATPHandlerOptions, + SATPHandlerType, +} from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { LockAssertionReceiptMessage, @@ -12,7 +16,7 @@ import { import { Stage2ClientService } from "../stage-services/client/stage2-client-service"; import { TransferCommenceResponseMessage } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; export class Stage2SATPHandler implements SATPHandler { - public static readonly CLASS_NAME = "Stage2SATPHandler"; + public static readonly CLASS_NAME = SATPHandlerType.STAGE2; private sessions: Map; private serverService: Stage2ServerService; private clientService: Stage2ClientService; @@ -32,7 +36,7 @@ export class Stage2SATPHandler implements SATPHandler { return this.logger; } - getHandlerIdentifier(): string { + getHandlerIdentifier(): SATPHandlerType { return Stage2SATPHandler.CLASS_NAME; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index 658a86ed67..a24e083c8f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -10,13 +10,17 @@ import { import { Stage3ServerService } from "../stage-services/server/stage3-server-service"; import { SATPSession } from "../satp-session"; import { SupportedChain } from "../types"; -import { SATPHandler, SATPHandlerOptions } from "../../types/satp-protocol"; +import { + SATPHandler, + SATPHandlerOptions, + SATPHandlerType, +} from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { Empty } from "@bufbuild/protobuf"; import { Stage3ClientService } from "../stage-services/client/stage3-client-service"; export class Stage3SATPHandler implements SATPHandler { - public static readonly CLASS_NAME = "Stage3SATPHandler"; + public static readonly CLASS_NAME = SATPHandlerType.STAGE3; private sessions: Map; private clientService: Stage3ClientService; private serverService: Stage3ServerService; @@ -32,7 +36,7 @@ export class Stage3SATPHandler implements SATPHandler { this.logger.trace(`Initialized ${Stage3SATPHandler.CLASS_NAME}`); } - getHandlerIdentifier(): string { + getHandlerIdentifier(): SATPHandlerType { return Stage3SATPHandler.CLASS_NAME; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 386a6f06b9..162d2181e6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -55,7 +55,7 @@ export type GatewayChannel = { toGatewayID: string; sessions: Map; supportedDLTs: SupportedChain[]; - clients: PromiseConnectClient[]; + clients: Map>; }; export type Address = diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts index 9063d3bc6d..fe85c7ea67 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts @@ -3,17 +3,26 @@ /* eslint-disable */ // @ts-nocheck -import { PreTransferCommenceRequestMessage, PreTransferCommenceResponseMessage, PreTransferVerificationAndContextEstablishmentRequest, PreTransferVerificationAndContextEstablishmentResponse } from "./stage_0_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; +import { Empty, MethodKind } from "@bufbuild/protobuf"; +import { PreTransferCommenceRequestMessage, PreTransferCommenceResponseMessage, PreTransferVerificationAndContextEstablishmentRequest, PreTransferVerificationAndContextEstablishmentResponse, PublicKey } from "./stage_0_pb.js"; /** - * util RPCs - * * @generated from service cacti.satp.v02.SatpStage0Service */ export const SatpStage0Service = { typeName: "cacti.satp.v02.SatpStage0Service", methods: { + /** + * util RPCs + * + * @generated from rpc cacti.satp.v02.SatpStage0Service.GetPublicKey + */ + getPublicKey: { + name: "GetPublicKey", + I: Empty, + O: PublicKey, + kind: MethodKind.Unary, + }, /** * step RPCs * diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts index b3bdb76eee..5a7a7b0b48 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -256,3 +256,40 @@ export class PreTransferCommenceResponseMessage extends Message { + /** + * @generated from field: string public_key = 1; + */ + publicKey = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.PublicKey"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PublicKey { + return new PublicKey().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PublicKey { + return new PublicKey().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PublicKey { + return new PublicKey().fromJsonString(jsonString, options); + } + + static equals(a: PublicKey | PlainMessage | undefined, b: PublicKey | PlainMessage | undefined): boolean { + return proto3.util.equals(PublicKey, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index 5dd70d9c1f..63338744ba 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -87,6 +87,7 @@ export class GatewayOrchestrator { public get ourGateway(): GatewayIdentity { return this.localGateway; } + async startupGatewayOrchestrator(): Promise { if (this.counterPartyGateways.values.length === 0) { this.logger.info("No gateways to connect to"); @@ -96,6 +97,17 @@ export class GatewayOrchestrator { } } + public getChannel(dlt: SupportedChain): GatewayChannel { + const channels = Array.from(this.channels.values()); + const channel = channels.find((channel) => { + return channel.supportedDLTs.includes(dlt); + }); + if (!channel) { + throw new Error(`No channel found for DLT ${dlt}`); + } + return channel; + } + public getChannels(): Map { return this.channels; } @@ -192,20 +204,25 @@ export class GatewayOrchestrator { private createConnectClients( identity: GatewayIdentity, - ): PromiseConnectClient[] { + ): Map> { // one function for each client type; aggregate in array const transport = createConnectTransport({ baseUrl: identity.address + ":" + identity.gatewayGrpcPort, httpVersion: "1.1", }); - const stage0Client = this.createStage0ServiceClient(transport); - const stage1Client = this.createStage1ServiceClient(transport); - const stage2Client = this.createStage2ServiceClient(transport); - const stage3Client = this.createStage3ServiceClient(transport); + const clients: Map< + string, + PromiseConnectClient + > = new Map(); + + clients.set("0", this.createStage0ServiceClient(transport)); + clients.set("1", this.createStage1ServiceClient(transport)); + clients.set("2", this.createStage2ServiceClient(transport)); + clients.set("3", this.createStage3ServiceClient(transport)); // todo perform healthcheck on startup; should be in stage 0 - return [stage0Client, stage1Client, stage2Client, stage3Client]; + return clients; } private createStage0ServiceClient( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 89f8a5d702..7400950d22 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -23,11 +23,21 @@ import { SATPHandler, SATPServiceType, SATPHandlerOptions, + SATPHandlerType, } from "../types/satp-protocol"; import { ISATPServiceOptions } from "../core/stage-services/satp-service"; import { Stage2SATPHandler } from "../core/stage-handlers/stage2-handler"; import { Stage3SATPHandler } from "../core/stage-handlers/stage3-handler"; import { SATPBridgesManager } from "./satp-bridges-manager"; +import { GatewayOrchestrator } from "./gateway-orchestrator"; +import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; +//import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; +import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; +import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; +import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; +import { PromiseClient as PromiseConnectClient } from "@connectrpc/connect"; +import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; +import { Empty } from "@bufbuild/protobuf"; export interface ISATPManagerOptions { logLevel?: LogLevelDesc; @@ -36,6 +46,7 @@ export interface ISATPManagerOptions { signer: JsObjectSigner; supportedDLTs: SupportedChain[]; bridgeManager: SATPBridgesManager; + orquestrator: GatewayOrchestrator; } export class SATPManager { @@ -46,13 +57,15 @@ export class SATPManager { private signer: JsObjectSigner; public supportedDLTs: SupportedChain[] = []; private sessions: Map; - private handlers: SATPHandler[] = []; + private readonly satpServices: Map< + string, + Map + > = new Map(); + private readonly satpHandlers: Map = new Map(); - private readonly bridgeManager: SATPBridgesManager; + private readonly bridgesManager: SATPBridgesManager; - private readonly satpServices: SATPService[] = []; - private readonly satpHandlers: Map> = - new Map(); + private readonly orquestrator: GatewayOrchestrator; constructor(public readonly options: ISATPManagerOptions) { const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; @@ -65,7 +78,8 @@ export class SATPManager { this.logger.info(`Instantiated ${this.className} OK`); this.supportedDLTs = options.supportedDLTs; this.signer = options.signer; - this.bridgeManager = options.bridgeManager; + this.bridgesManager = options.bridgeManager; + this.orquestrator = options.orquestrator; this.sessions = options.sessions || new Map(); const handlersClasses = [ @@ -91,9 +105,7 @@ export class SATPManager { level, label, ); - this.satpServices = this.initializeServices(serviceClasses, serviceOptions); - - const mockSession = this.getOrCreateSession(); + this.initializeServices(serviceClasses, serviceOptions); if (serviceClasses.length % 2 !== 0) { throw new Error( @@ -105,18 +117,7 @@ export class SATPManager { level, ); - this.handlers = this.initializeHandlers(handlersClasses, handlersOptions); - - for (const handler of this.handlers) { - const sessionId = mockSession.getSessionId(); - const handlerMap = this.satpHandlers.get(sessionId); - if (handlerMap == undefined) { - this.satpHandlers.set(sessionId, new Map()); - } - this.satpHandlers - .get(sessionId) - ?.set(handler.getHandlerIdentifier(), handler); - } + this.initializeHandlers(handlersClasses, handlersOptions); } public getServiceByStage( @@ -127,10 +128,8 @@ export class SATPManager { throw new Error("Invalid stageId"); } - const service = this.satpServices.find( - (service) => - service.serviceType === serviceType && service.stage === stageId, - ); + const service = this.satpServices.get(stageId)?.get(serviceType); + if (service == undefined) { throw new Error( `Service not found for stageId=${stageId} and serviceType=${serviceType}`, @@ -158,14 +157,8 @@ export class SATPManager { return this.supportedDLTs; } - public getSATPHandlers( - sessionId: string, - ): Map | undefined { - return this.satpHandlers.get(sessionId); - } - - public getHandlers(): SATPHandler[] { - return this.handlers; + public getSATPHandler(type: SATPHandlerType): SATPHandler | undefined { + return this.satpHandlers.get(type); } public getOrCreateSession( @@ -192,19 +185,6 @@ export class SATPManager { return session; } - getOrCreateServices() { - const fnTag = `${SATPManager.CLASS_NAME}#getOrCreateServices()`; - this.logger.info( - `${fnTag}, Registering gRPCservices on instanceId=${this.instanceId}`, - ); - if (Array.isArray(this.endpoints)) { - return this.endpoints; - } - - this.endpoints = this.handlers; - return this.endpoints; - } - get StageHandlers() { throw new Error("Not implemented yet"); } @@ -214,6 +194,8 @@ export class SATPManager { logLevel: LogLevelDesc, label: string, ): ISATPServiceOptions[] { + const fnTag = `${SATPManager.CLASS_NAME}#initializeServiceOptions()`; + this.logger.info(`${fnTag}, Initializing services options...`); return serviceClasses.map((_, index) => ({ signer: this.signer, stage: index.toString() as "0" | "1" | "2" | "3", @@ -221,17 +203,41 @@ export class SATPManager { serviceName: `Service-${index}`, serviceType: index % 2 === 0 ? SATPServiceType.Server : SATPServiceType.Client, - bridgeManager: this.bridgeManager, + bridgeManager: this.bridgesManager, })); } private initializeServices( serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], serviceOptions: ISATPServiceOptions[], - ): SATPService[] { - return serviceClasses.map( - (ServiceClass, index) => new ServiceClass(serviceOptions[index]), - ); + ): void { + const fnTag = `${SATPManager.CLASS_NAME}#initializeServices()`; + this.logger.info(`${fnTag}, Initializing services...`); + + if (serviceClasses.length === 0) { + throw new Error("No services provided"); + } + + if (serviceOptions.length === 0) { + throw new Error("No services options provided"); + } + + if (serviceClasses.length !== serviceOptions.length) { + throw new Error( + `Number of services classes and options do not match. Each service class needs an options object.\n \ + Classes: ${serviceClasses.length}, Options: ${serviceOptions.length}`, + ); + } + + serviceClasses.forEach((ServiceClass, index) => { + const service = new ServiceClass(serviceOptions[index]); + if (!this.satpServices.has(service.stage)) { + this.satpServices.set(service.stage, new Map()); + } + this.satpServices + .get(service.serviceType) + ?.set(service.serviceType, service); + }); } private initializeHandlerOptions( @@ -260,6 +266,7 @@ export class SATPManager { serverService: serverService, clientService: clientService, supportedDLTs: this.supportedDLTs, + stage: i.toString() as "0" | "1" | "2" | "3", loggerOptions: { level: level, label: `SATPHandler-Stage${i}` }, }; handlersOptions.push(handlerOptions); @@ -274,10 +281,10 @@ export class SATPManager { private initializeHandlers( handlersClasses: (new (options: SATPHandlerOptions) => SATPHandler)[], handlersOptions: SATPHandlerOptions[], - ): SATPHandler[] { + ): void { const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlers()`; this.logger.info(`${fnTag}, Initializing handlers...`); - const handlers: SATPHandler[] = []; + if (handlersClasses.length === 0) { throw new Error("No handlers provided"); } @@ -297,10 +304,157 @@ export class SATPManager { if (index < handlersClasses.length) { const HandlerClass = handlersClasses[index]; const handler = new HandlerClass(options); - handlers.push(handler); + this.satpHandlers.set(handler.getHandlerIdentifier(), handler); } }); + } + + public async initiateTransfer(session: SATPSession): Promise { + const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlers()`; + this.logger.info(`${fnTag}, Initiating Transfer`); + this.logger.debug( + `SessionData: ${JSON.stringify(session.getClientSessionData())}`, + ); + + if (!session.getClientSessionData()) { + throw new Error(`${fnTag}, Session not found`); + } + + const channel = this.orquestrator.getChannel( + session.getClientSessionData() + ?.recipientGatewayNetworkId as SupportedChain, + ); + + if (!channel) { + throw new Error(`${fnTag}, Channel not found`); + } + + const sessionData: SessionData = + session.getClientSessionData() as SessionData; + + const clientSatpStage0: PromiseConnectClient = + channel.clients.get("0") as PromiseConnectClient< + typeof SatpStage0Service + >; + const clientSatpStage1: PromiseConnectClient = + channel.clients.get("1") as PromiseConnectClient< + typeof SatpStage1Service + >; + const clientSatpStage2: PromiseConnectClient = + channel.clients.get("2") as PromiseConnectClient< + typeof SatpStage2Service + >; + const clientSatpStage3: PromiseConnectClient = + channel.clients.get("3") as PromiseConnectClient< + typeof SatpStage3Service + >; + + const serverGatewayPubkey = (await clientSatpStage0.getPublicKey(Empty)) + .publicKey; + + if (!serverGatewayPubkey) { + throw new Error(`${fnTag}, Failed to get serverGatewayPubkey`); + } + + sessionData.serverGatewayPubkey = serverGatewayPubkey; + + this.logger.info(`${fnTag}, Stage 0`); + + const requestTransferProposal = await ( + this.getSATPHandler(SATPHandlerType.STAGE1) as Stage1SATPHandler + ).TransferProposalRequest(session.getSessionId()); + + if (!requestTransferProposal) { + throw new Error(`${fnTag}, Failed to create TransferProposalRequest`); + } + + const responseTransferProposal = await clientSatpStage1.transferProposal( + requestTransferProposal, + ); + + this.logger.info( + `${fnTag}, responseTransferProposal: ${JSON.stringify(responseTransferProposal)}`, + ); + + const requestTransferCommence = await ( + this.getSATPHandler(SATPHandlerType.STAGE1) as Stage1SATPHandler + ).TransferCommenceRequest(responseTransferProposal); + + if (!requestTransferCommence) { + throw new Error(`${fnTag}, Failed to create TransferCommenceRequest`); + } + + const responseTransferCommence = await clientSatpStage1.transferCommence( + requestTransferCommence, + ); + + this.logger.info( + `${fnTag}, responseTransferCommence: ${JSON.stringify(responseTransferCommence)}`, + ); + + this.logger.info(`${fnTag}, Stage 1 completed`); + + const requestLockAssertion = await ( + this.getSATPHandler(SATPHandlerType.STAGE2) as Stage2SATPHandler + ).LockAssertionRequest(responseTransferCommence); + + if (!requestLockAssertion) { + throw new Error(`${fnTag}, Failed to create LockAssertionRequest`); + } + + const responseLockAssertion = + await clientSatpStage2.lockAssertion(requestLockAssertion); + + this.logger.info( + `${fnTag}, responseLockAssertion: ${JSON.stringify(responseLockAssertion)}`, + ); + + this.logger.info(`${fnTag}, Stage 2 completed`); + + const requestCommitPreparation = await ( + this.getSATPHandler(SATPHandlerType.STAGE3) as Stage3SATPHandler + ).CommitPreparationRequest(responseLockAssertion); + + if (!requestCommitPreparation) { + throw new Error(`${fnTag}, Failed to create CommitPreparationRequest`); + } + + const responseCommitPreparation = await clientSatpStage3.commitPreparation( + requestCommitPreparation, + ); + this.logger.info( + `${fnTag}, responseCommitPreparation: ${JSON.stringify(responseCommitPreparation)}`, + ); + + const requestCommitFinalAssertion = await ( + this.getSATPHandler(SATPHandlerType.STAGE3) as Stage3SATPHandler + ).CommitFinalAssertionRequest(responseLockAssertion); + + if (!requestCommitFinalAssertion) { + throw new Error(`${fnTag}, Failed to create CommitFinalAssertionRequest`); + } + + const responseCommitFinalAssertion = + await clientSatpStage3.commitFinalAssertion(requestCommitFinalAssertion); + this.logger.info( + `${fnTag}, responseCommitFinalAssertion: ${JSON.stringify(responseCommitFinalAssertion)}`, + ); + + const RequestTransferComplete = await ( + this.getSATPHandler(SATPHandlerType.STAGE3) as Stage3SATPHandler + ).TransferCompleteRequest(responseCommitFinalAssertion); + + if (!RequestTransferComplete) { + throw new Error(`${fnTag}, Failed to create TransferCompleteRequest`); + } + + const responseTransferComplete = await clientSatpStage3.transferComplete( + RequestTransferComplete, + ); + this.logger.info( + `${fnTag}, responseTransferComplete: ${JSON.stringify(responseTransferComplete)}`, + ); - return handlers; + this.logger.info(`${fnTag}, Stage 3 completed`); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index 6c441a0e1e..653c274231 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -12,9 +12,16 @@ import { * Handlers implementing this interface must provide mechanisms to setup routes and handle * protocol-specific requests based on the stage they are designed for. */ + +export enum SATPHandlerType { + STAGE0 = "Stage0SATPHandler", + STAGE1 = "Stage1SATPHandler", + STAGE2 = "Stage2SATPHandler", + STAGE3 = "Stage3SATPHandler", +} export interface SATPHandler { setupRouter(router: ConnectRouter): void; - getHandlerIdentifier(): string; + getHandlerIdentifier(): SATPHandlerType; getHandlerSessions(): string[]; } @@ -24,5 +31,6 @@ export interface SATPHandlerOptions { clientService: SATPService; supportedDLTs: SupportedChain[]; loggerOptions: ILoggerOptions; + stage: string; } export { SATPService, SATPServiceType }; diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json index fd1c73cebe..b047543d6d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json @@ -44,6 +44,7 @@ } ] }, + "bytecode": "", "ownerSignature": "", "bridgeSignature": "" } \ No newline at end of file From 7aee472b64cd6943c4c649ae0be8da611bf527c8 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Wed, 14 Aug 2024 12:38:52 +0100 Subject: [PATCH 31/49] fix(satp-hermes): fix handler and service intialization Signed-off-by: Rafael Belchior --- .../src/main/typescript/core/errors.ts | 27 +++--- .../client/stage0-client-service.ts | 1 + .../client/stage1-client-service.ts | 1 + .../client/stage2-client-service.ts | 1 + .../client/stage3-client-service.ts | 1 + .../core/stage-services/satp-service.ts | 23 ++++- .../server/stage0-server-service.ts | 5 +- .../server/stage1-server-service.ts | 6 +- .../server/stage2-server-service.ts | 1 + .../server/stage3-server-service.ts | 1 + .../src/main/typescript/core/types.ts | 16 +--- .../typescript/gol/gateway-orchestrator.ts | 6 +- .../src/main/typescript/gol/satp-manager.ts | 93 ++++++++++++------- .../main/typescript/types/satp-protocol.ts | 36 ++++++- 14 files changed, 148 insertions(+), 70 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts index 0eb24f198b..9a3f4ebe54 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts @@ -1,8 +1,9 @@ -export class SATPError extends Error { +export class SATPInternalError extends Error { constructor( - message: string, + public message: string, + // TODO internal error codes public code: number = 500, - public internalErrorId?: string, + public traceID?: string, public trace?: string, ) { super(message); @@ -12,35 +13,37 @@ export class SATPError extends Error { } } -export class BootstrapError extends SATPError { - constructor(internalErrorId?: string, trace?: string) { +export class BootstrapError extends SATPInternalError { + constructor(traceID?: string, trace?: string) { super( "Bootstrap already called in this Gateway Manager", 409, - internalErrorId, + traceID, trace, ); } } -export class NonExistantGatewayIdentity extends SATPError { - constructor(id: string, internalErrorId?: string, trace?: string) { - super(`Gateway with id ${id} does not exist`, 404, internalErrorId, trace); +export class NonExistantGatewayIdentity extends SATPInternalError { + constructor(id: string, traceID?: string, trace?: string) { + super(`Gateway with id ${id} does not exist`, 404, traceID, trace); } } -export class GetStatusError extends SATPError { +export class GetStatusError extends SATPInternalError { constructor( sessionID: string, message: string, - internalErrorId?: string, + traceID?: string, trace?: string, ) { super( `Could not GetStatus at Session: with id ${sessionID}. Reason: ${message}`, 400, - internalErrorId, + traceID, trace, ); } } +// TODO client-facing error logic, maps SATPInternalErrors to user friendly errors +export class SATPError extends Error {} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts index aa09838890..786c693aa7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -34,6 +34,7 @@ import { export class Stage0ClientService extends SATPService { public static readonly SATP_STAGE = "0"; public static readonly SERVICE_TYPE = SATPServiceType.Client; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; constructor(ops: ISATPClientServiceOptions) { // for now stage1serverservice does not have any different options than the SATPService class diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index a73e11a828..2d6caeaa19 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -34,6 +34,7 @@ import { export class Stage1ClientService extends SATPService { public static readonly SATP_STAGE = "1"; public static readonly SERVICE_TYPE = SATPServiceType.Client; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; constructor(ops: ISATPClientServiceOptions) { // for now stage1serverservice does not have any different options than the SATPService class diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 63a743acc6..33e7122a9f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -43,6 +43,7 @@ import { export class Stage2ClientService extends SATPService { public static readonly SATP_STAGE = "2"; public static readonly SERVICE_TYPE = SATPServiceType.Client; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; private bridgeManager: SATPBridgesManager; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index cbd1bd0777..f19cb6877f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -48,6 +48,7 @@ import { export class Stage3ClientService extends SATPService { public static readonly SATP_STAGE = "3"; public static readonly SERVICE_TYPE = SATPServiceType.Client; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; private bridgeManager: SATPBridgesManager; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts index 089e049a32..dc666b1f3c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-service.ts @@ -5,21 +5,42 @@ import { ILoggerOptions, } from "@hyperledger/cactus-common"; import { SATPBridgesManager } from "../../gol/satp-bridges-manager"; +import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; +import { SatpStage1Service } from "../../generated/proto/cacti/satp/v02/stage_1_connect"; +import { SatpStage2Service } from "../../generated/proto/cacti/satp/v02/stage_2_connect"; +import { SatpStage3Service } from "../../generated/proto/cacti/satp/v02/stage_3_connect"; export enum SATPServiceType { Server = "Server", Client = "Client", } +export type SATPStagesV02 = "0" | "1" | "2" | "3"; + export type ISATPServiceOptions = { serviceName: string; - stage: "0" | "1" | "2" | "3"; + stage: SATPStagesV02; loggerOptions: ILoggerOptions; signer: JsObjectSigner; serviceType: SATPServiceType; bridgeManager?: SATPBridgesManager; }; +export interface SATPServiceStatic { + new (options: ISATPServiceOptions): SATPService; + readonly SERVICE_TYPE: SATPServiceType; + readonly SATP_STAGE: string; + // service name serves as an internal, hardcoded service name. One can assign a more user-friendly service name via the SATPService constructor + readonly SATP_SERVICE_INTERNAL_NAME: string; + get ServiceType(): SATPServiceType; +} + +export type SATPServiceInstance = + | (typeof SatpStage0Service & SATPServiceStatic) + | (typeof SatpStage1Service & SATPServiceStatic) + | (typeof SatpStage2Service & SATPServiceStatic) + | (typeof SatpStage3Service & SATPServiceStatic); + export type ISATPServerServiceOptions = ISATPServiceOptions; export type ISATPClientServiceOptions = ISATPServiceOptions; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts index c099221770..747d10760c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -24,7 +24,6 @@ import { saveHash, saveSignature, } from "../../session-utils"; -import { SupportedChain } from "../../types"; import { SATPSession } from "../../../core/satp-session"; import { SATPService, @@ -36,6 +35,7 @@ import { export class Stage0ServerService extends SATPService { public static readonly SATP_STAGE = "0"; public static readonly SERVICE_TYPE = SATPServiceType.Server; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; constructor(ops: ISATPServerServiceOptions) { // for now stage0serverservice does not have any different options than the SATPService class @@ -234,6 +234,9 @@ export class Stage0ServerService extends SATPService { const stepTag = `checkTransferProposalRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + // todo use session; + session; + if ( request.context == undefined || request.context.version == undefined || diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index 44401e0faa..f6ac52e937 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -9,7 +9,10 @@ import { CommonSatp, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; // eslint-disable-next-line prettier/prettier -import { ACCEPTANCE, SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { + ACCEPTANCE, + SessionData, +} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { SATP_VERSION } from "../../constants"; import { bufArray2HexStr, @@ -52,6 +55,7 @@ import { export class Stage1ServerService extends SATPService { public static readonly SATP_STAGE = "1"; public static readonly SERVICE_TYPE = SATPServiceType.Server; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; constructor(ops: ISATPServerServiceOptions) { // for now stage1serverservice does not have any different options than the SATPService class diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 1551c131d1..1c01eb4b78 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -41,6 +41,7 @@ import { export class Stage2ServerService extends SATPService { public static readonly SATP_STAGE = "2"; public static readonly SERVICE_TYPE = SATPServiceType.Server; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; constructor(ops: ISATPServerServiceOptions) { const commonOptions: ISATPServiceOptions = { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 114f19b61d..7634d9416f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -49,6 +49,7 @@ import { export class Stage3ServerService extends SATPService { public static readonly SATP_STAGE = "3"; public static readonly SERVICE_TYPE = SATPServiceType.Server; + public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; private bridgeManager: SATPBridgesManager; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 162d2181e6..80b9b70d8e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -3,29 +3,20 @@ import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; import { ISignerKeyPairs } from "@hyperledger/cactus-common/dist/lib/main/typescript/signer-key-pairs"; import { SATPSession } from "./satp-session"; -import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; -import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; -import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; -import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; import { ConnectRouter } from "@connectrpc/connect"; import { SATPGateway } from "../plugin-satp-hermes-gateway"; import { SATPService } from "../types/satp-protocol"; import { PromiseClient as PromiseConnectClient } from "@connectrpc/connect"; import { IPrivacyPolicyValue } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-creation/privacy-policies"; import { IMergePolicyValue } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-merging/merge-policies"; +import { NetworkBridge } from "./stage-services/satp-bridge/network-bridge"; +import { SATPServiceInstance } from "./stage-services/satp-service"; export type SATPConnectHandler = ( gateway: SATPGateway, service: SATPService, ) => (router: ConnectRouter) => void; -export type SATPServiceClient = - | typeof SatpStage0Service - | typeof SatpStage1Service - | typeof SatpStage2Service - | typeof SatpStage3Service; -import { NetworkBridge } from "./stage-services/satp-bridge/network-bridge"; - export enum CurrentDrafts { Core = "Core", Architecture = "Architecture", @@ -55,7 +46,7 @@ export type GatewayChannel = { toGatewayID: string; sessions: Map; supportedDLTs: SupportedChain[]; - clients: Map>; + clients: Map>; }; export type Address = @@ -126,3 +117,4 @@ export interface SATPBridgeConfig { network: NetworkBridge; logLevel?: LogLevelDesc; } +export { SATPServiceInstance }; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index 63338744ba..18d59d24fa 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -10,7 +10,7 @@ import { GatewayIdentity, GatewayChannel, SupportedChain, - SATPServiceClient, + SATPServiceInstance, } from "../core/types"; import { PromiseClient as PromiseConnectClient, @@ -204,7 +204,7 @@ export class GatewayOrchestrator { private createConnectClients( identity: GatewayIdentity, - ): Map> { + ): Map> { // one function for each client type; aggregate in array const transport = createConnectTransport({ baseUrl: identity.address + ":" + identity.gatewayGrpcPort, @@ -213,7 +213,7 @@ export class GatewayOrchestrator { const clients: Map< string, - PromiseConnectClient + PromiseConnectClient > = new Map(); clients.set("0", this.createStage0ServiceClient(transport)); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 7400950d22..dfa48a7152 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -24,8 +24,14 @@ import { SATPServiceType, SATPHandlerOptions, SATPHandlerType, + ISATPHandler, + SATPHandlerInstance, } from "../types/satp-protocol"; -import { ISATPServiceOptions } from "../core/stage-services/satp-service"; +import { + ISATPServiceOptions, + SATPServiceInstance, + SATPStagesV02, +} from "../core/stage-services/satp-service"; import { Stage2SATPHandler } from "../core/stage-handlers/stage2-handler"; import { Stage3SATPHandler } from "../core/stage-handlers/stage3-handler"; import { SATPBridgesManager } from "./satp-bridges-manager"; @@ -57,6 +63,7 @@ export class SATPManager { private signer: JsObjectSigner; public supportedDLTs: SupportedChain[] = []; private sessions: Map; + // maps stage to client/service and service class private readonly satpServices: Map< string, Map @@ -83,21 +90,21 @@ export class SATPManager { this.sessions = options.sessions || new Map(); const handlersClasses = [ - Stage0SATPHandler, - Stage1SATPHandler, - Stage2SATPHandler, - Stage3SATPHandler, + Stage0SATPHandler as unknown as SATPHandlerInstance, + Stage1SATPHandler as unknown as SATPHandlerInstance, + Stage2SATPHandler as unknown as SATPHandlerInstance, + Stage3SATPHandler as unknown as SATPHandlerInstance, ]; const serviceClasses = [ - Stage0ServerService, - Stage0ClientService, - Stage1ServerService, - Stage1ClientService, - Stage2ServerService, - Stage2ClientService, - Stage3ServerService, - Stage3ClientService, + Stage0ServerService as unknown as SATPServiceInstance, + Stage0ClientService as unknown as SATPServiceInstance, + Stage1ServerService as unknown as SATPServiceInstance, + Stage1ClientService as unknown as SATPServiceInstance, + Stage2ServerService as unknown as SATPServiceInstance, + Stage2ClientService as unknown as SATPServiceInstance, + Stage3ServerService as unknown as SATPServiceInstance, + Stage3ClientService as unknown as SATPServiceInstance, ]; const serviceOptions = this.initializeServiceOptions( @@ -122,17 +129,22 @@ export class SATPManager { public getServiceByStage( serviceType: SATPServiceType, - stageId: string, + stageID: string, ): SATPService { - if (isNaN(Number(stageId))) { + // we assume stages are numbers + if (isNaN(Number(stageID))) { throw new Error("Invalid stageId"); } - const service = this.satpServices.get(stageId)?.get(serviceType); + if (!this.satpServices) { + throw new Error("No satp services defined"); + } + + const service = this.satpServices.get(stageID)?.get(serviceType); if (service == undefined) { throw new Error( - `Service not found for stageId=${stageId} and serviceType=${serviceType}`, + `Service not found for stageId=${stageID} and serviceType=${serviceType}`, ); } return service; @@ -190,25 +202,27 @@ export class SATPManager { } private initializeServiceOptions( - serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + serviceClasses: SATPServiceInstance[], logLevel: LogLevelDesc, label: string, ): ISATPServiceOptions[] { const fnTag = `${SATPManager.CLASS_NAME}#initializeServiceOptions()`; this.logger.info(`${fnTag}, Initializing services options...`); - return serviceClasses.map((_, index) => ({ + this.logger.info( + `Initializing ${serviceClasses.length} services options...`, + ); + return serviceClasses.map((serviceClass) => ({ signer: this.signer, - stage: index.toString() as "0" | "1" | "2" | "3", + stage: serviceClass.SATP_STAGE as SATPStagesV02, loggerOptions: { level: logLevel, label }, - serviceName: `Service-${index}`, - serviceType: - index % 2 === 0 ? SATPServiceType.Server : SATPServiceType.Client, + // we can pass whatever name we wish; in this case we are using the internal service name + serviceType: serviceClass.SERVICE_TYPE, + serviceName: serviceClass.SATP_SERVICE_INTERNAL_NAME, bridgeManager: this.bridgesManager, })); } - private initializeServices( - serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + serviceClasses: SATPServiceInstance[], serviceOptions: ISATPServiceOptions[], ): void { const fnTag = `${SATPManager.CLASS_NAME}#initializeServices()`; @@ -232,33 +246,37 @@ export class SATPManager { serviceClasses.forEach((ServiceClass, index) => { const service = new ServiceClass(serviceOptions[index]); if (!this.satpServices.has(service.stage)) { + // initialize map this.satpServices.set(service.stage, new Map()); } - this.satpServices - .get(service.serviceType) - ?.set(service.serviceType, service); + this.satpServices.get(service.stage)?.set(service.serviceType, service); }); } private initializeHandlerOptions( - serviceClasses: (new (options: ISATPServiceOptions) => SATPService)[], + serviceClasses: SATPServiceInstance[], level: LogLevelDesc = "DEBUG", ): SATPHandlerOptions[] { const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlerOptions()`; this.logger.info(`${fnTag}, Initializing handlers options...`); const handlersOptions: SATPHandlerOptions[] = []; - + if (serviceClasses.length % 2 != 0) { + throw new Error( + "Error intializing handler options - a pair number of services are expected", + ); + } try { - for (let i = 1; i <= serviceClasses.length / 2; i++) { + for (let i = 0; i <= serviceClasses.length / 2 - 1; i++) { + const serviceIndex = i.toString() as SATPStagesV02; const serverService = this.getServiceByStage( SATPServiceType.Server, - i.toString(), + serviceIndex, ); const clientService = this.getServiceByStage( SATPServiceType.Client, - i.toString(), + serviceIndex, ); const handlerOptions: SATPHandlerOptions = { @@ -266,8 +284,11 @@ export class SATPManager { serverService: serverService, clientService: clientService, supportedDLTs: this.supportedDLTs, - stage: i.toString() as "0" | "1" | "2" | "3", - loggerOptions: { level: level, label: `SATPHandler-Stage${i}` }, + stage: serviceIndex, + loggerOptions: { + level: level, + label: `SATPHandler-Stage${serviceIndex}`, + }, }; handlersOptions.push(handlerOptions); } @@ -279,7 +300,7 @@ export class SATPManager { } private initializeHandlers( - handlersClasses: (new (options: SATPHandlerOptions) => SATPHandler)[], + handlersClasses: SATPHandlerInstance[], handlersOptions: SATPHandlerOptions[], ): void { const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlers()`; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index 653c274231..86b4cd45d9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -3,10 +3,16 @@ import { SupportedChain } from "../core/types"; import { ConnectRouter } from "@connectrpc/connect"; import { SATPSession } from "../core/satp-session"; import { + ISATPServiceOptions, SATPService, SATPServiceType, } from "../core/stage-services/satp-service"; +import { Stage0SATPHandler } from "../core/stage-handlers/stage0-handler"; +import { Stage1SATPHandler } from "../core/stage-handlers/stage1-handler"; +import { Stage2SATPHandler } from "../core/stage-handlers/stage2-handler"; +import { Stage3SATPHandler } from "../core/stage-handlers/stage3-handler"; + /** * Represents a handler for various stages of the SATP (Secure Asset Transfer Protocol). * Handlers implementing this interface must provide mechanisms to setup routes and handle @@ -14,11 +20,33 @@ import { */ export enum SATPHandlerType { - STAGE0 = "Stage0SATPHandler", - STAGE1 = "Stage1SATPHandler", - STAGE2 = "Stage2SATPHandler", - STAGE3 = "Stage3SATPHandler", + STAGE0 = "stage-0-handler", + STAGE1 = "stage-1-handler", + STAGE2 = "stage-2-handler", + STAGE3 = "stage-3-handler", +} + +export interface SATPServiceStatic { + new (options: ISATPServiceOptions): SATPService; + readonly SERVICE_TYPE: SATPServiceType; + readonly SATP_STAGE: string; + // service name serves as an internal, hardcoded service name. One can assign a more user-friendly service name via the SATPService constructor + readonly SATP_SERVICE_INTERNAL_NAME: string; + get ServiceType(): SATPServiceType; } +export interface ISATPHandler { + new (options: SATPHandlerOptions): SATPHandler; + getHandlerSessions(): string[]; + getHandlerIdentifier(): SATPHandlerType; + setupRouter(router: ConnectRouter): void; +} + +export type SATPHandlerInstance = + | (typeof Stage0SATPHandler & ISATPHandler) + | (typeof Stage1SATPHandler & ISATPHandler) + | (typeof Stage2SATPHandler & ISATPHandler) + | (typeof Stage3SATPHandler & ISATPHandler); + export interface SATPHandler { setupRouter(router: ConnectRouter): void; getHandlerIdentifier(): SATPHandlerType; From 86db76f7f5a3e52ecc4533f922080da85def22f4 Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Mon, 19 Aug 2024 14:11:27 +0100 Subject: [PATCH 32/49] fix(satp-hermes): service errors and some stage bugs Signed-off-by: Carlos Amaro feat(satp-hermes): satp rejection Signed-off-by: Carlos Amaro feat(satp-hermes): handler bug correction and errors Signed-off-by: Carlos Amaro fix(satp-hermes): bridge erros and log messages Signed-off-by: Carlos Amaro fix(satp-hermes): some error fixes Signed-off-by: Carlos Amaro fix(satp-hermes): some fixes requested Signed-off-by: Carlos Amaro Signed-off-by: Rafael Belchior --- .../cache/solidity-files-cache.json | 2 +- .../proto/cacti/satp/v02/common/session.proto | 1 + .../main/proto/cacti/satp/v02/stage_1.proto | 2 +- .../blo/admin/get-status-handler-service.ts | 2 +- .../typescript/core/errors/bridge-erros.ts | 35 ++ .../core/{errors.ts => errors/satp-errors.ts} | 2 +- .../core/errors/satp-handler-errors.ts | 25 + .../core/errors/satp-service-errors.ts | 168 +++++++ .../src/main/typescript/core/satp-session.ts | 76 ++- .../src/main/typescript/core/session-utils.ts | 72 +-- .../core/stage-handlers/handler-utils.ts | 8 + .../core/stage-handlers/stage1-handler.ts | 70 ++- .../core/stage-handlers/stage2-handler.ts | 41 +- .../core/stage-handlers/stage3-handler.ts | 138 +++--- .../client/stage0-client-service.ts | 383 --------------- .../client/stage1-client-service.ts | 147 ++---- .../client/stage2-client-service.ts | 182 ++------ .../client/stage3-client-service.ts | 408 ++++------------ .../core/stage-services/data-verifier.ts | 140 ++++++ .../typescript/core/stage-services/errors.ts | 117 ----- .../stage-services/satp-bridge/besu-bridge.ts | 79 ++-- .../satp-bridge/fabric-bridge.ts | 86 +++- .../satp-bridge/satp-bridge-manager.ts | 15 +- .../server/stage0-server-service.ts | 408 +--------------- .../server/stage1-server-service.ts | 441 ++++++++---------- .../server/stage2-server-service.ts | 155 ++---- .../server/stage3-server-service.ts | 358 ++++---------- .../proto/cacti/satp/v02/common/session_pb.ts | 6 + .../proto/cacti/satp/v02/stage_1_pb.ts | 4 +- .../src/main/typescript/gol/satp-manager.ts | 1 + .../src/test/typescript/unit/services.test.ts | 7 +- 31 files changed, 1211 insertions(+), 2368 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/bridge-erros.ts rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/{errors.ts => errors/satp-errors.ts} (96%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/handler-utils.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts diff --git a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json index 46372ef060..fd506e80f5 100644 --- a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json +++ b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json @@ -1 +1 @@ -{"_format":"","paths":{"artifacts":"src/solidity/generated","build_infos":"src/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"lastModificationDate":1721844842602,"contentHash":"d3c790edc9ccf808a17c5a6cd13614fd","sourceName":"node_modules/@openzeppelin/contracts/access/Ownable.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"Ownable":{"0.8.20":{"path":"Ownable.sol/Ownable.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1721844842606,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1721844842616,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1721844842612,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1721844842613,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"src/solidity/ITraceableContract.sol":{"lastModificationDate":1723214831340,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/solidity/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"src/solidity/satp-wrapper-without-json.sol":{"lastModificationDate":1723214831340,"contentHash":"6bf8a1d02b875a68cf65af7dcc0c9c46","sourceName":"src/solidity/satp-wrapper-without-json.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/Ownable.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/solidity/ITraceableContract.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPWrapperContract":{"0.8.20":{"path":"satp-wrapper-without-json.sol/SATPWrapperContract.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true},"src/solidity/satp-wrapper.sol":{"lastModificationDate":1723214831340,"contentHash":"3796cb4be7c06c5c8912e8137293b8a9","sourceName":"src/solidity/satp-wrapper.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/Ownable.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/solidity/ITraceableContract.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPWrapperContract":{"0.8.20":{"path":"satp-wrapper.sol/SATPWrapperContract.json","build_id":"26ba0bad9cd6a2a223b826c990b4cd8e"}}},"seenByCompiler":true}},"builds":["26ba0bad9cd6a2a223b826c990b4cd8e"]} \ No newline at end of file +{"_format":"","paths":{"artifacts":"src/test/solidity/generated","build_infos":"src/test/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"lastModificationDate":1722543467180,"contentHash":"4c80b7fdf559a9a348e832a57d072a0b","sourceName":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"AccessControl":{"0.8.20":{"path":"AccessControl.sol/AccessControl.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"lastModificationDate":1722543467188,"contentHash":"e3a14b0714caaaa82d58fa0bc3756079","sourceName":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IAccessControl":{"0.8.20":{"path":"IAccessControl.sol/IAccessControl.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"lastModificationDate":1722543467228,"contentHash":"4aefc698f77ecbace7f401257dfe182d","sourceName":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC1155Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC1155Errors.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}},"IERC20Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC20Errors.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}},"IERC721Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC721Errors.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"lastModificationDate":1722543467264,"contentHash":"c6375ef25e84c90b3d15f9ec4eef218f","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC20":{"0.8.20":{"path":"ERC20.sol/ERC20.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"lastModificationDate":1722543467288,"contentHash":"5517c8678c18eb1a8ba58810e7ca39ca","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC20":{"0.8.20":{"path":"IERC20.sol/IERC20.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"lastModificationDate":1722543467280,"contentHash":"4c02fa6f7ae7b6c289cef80424f0c875","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol"],"versionRequirement":"^0.8.20","artifacts":{"IERC20Metadata":{"0.8.20":{"path":"IERC20Metadata.sol/IERC20Metadata.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1722543467200,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1722543467216,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"lastModificationDate":1722543467204,"contentHash":"6a55c353946e471d9792965d06208295","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC165":{"0.8.20":{"path":"ERC165.sol/ERC165.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"lastModificationDate":1722543467208,"contentHash":"de0163561b417b800d01749cbbe2147e","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC165":{"0.8.20":{"path":"IERC165.sol/IERC165.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1722543467208,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1722543467208,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"src/test/solidity/contracts/ITraceableContract.sol":{"lastModificationDate":1722542120772,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/test/solidity/contracts/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-contract-interface.sol":{"lastModificationDate":1722542120772,"contentHash":"2411a0d6a3ea8e5f85c97e6ae77fead4","sourceName":"src/test/solidity/contracts/satp-contract-interface.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"SATPContractInterface":{"0.8.20":{"path":"satp-contract-interface.sol/SATPContractInterface.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-erc20.sol":{"lastModificationDate":1722542120772,"contentHash":"5ecdb78db9a7b063ee9e0a5702733bd6","sourceName":"src/test/solidity/contracts/satp-erc20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/AccessControl.sol","node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/test/solidity/contracts/ITraceableContract.sol","src/test/solidity/contracts/satp-contract-interface.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPContract":{"0.8.20":{"path":"satp-erc20.sol/SATPContract.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true}},"builds":["1850d4b29fc5f56323d9fed285466abb"]} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index f5ac206ea0..ec33400858 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -68,6 +68,7 @@ message SessionData { string server_transfer_number = 58; uint64 lock_assertion_expiration = 59; cacti.satp.v02.common.AssetProfile asset_profile = 60; + string resource_url = 61; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto index 8a36c5c6f4..02a18bac5b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_1.proto @@ -19,7 +19,7 @@ message TransferProposalReceiptMessage { string hash_transfer_init_claims = 2; cacti.satp.v02.common.TransferClaims transfer_counter_claims = 3; string timestamp = 4; - string server_signature = 5; + string server_signature = 6; } message TransferCommenceRequestMessage { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index 626e05ea1c..5a6589b2e4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -1,4 +1,4 @@ -import { GetStatusError } from "../../core/errors"; +import { GetStatusError } from "../../core/errors/satp-errors"; import { StatusRequest, StatusResponse, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/bridge-erros.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/bridge-erros.ts new file mode 100644 index 0000000000..448775cb53 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/bridge-erros.ts @@ -0,0 +1,35 @@ +export class BridgeInternalError extends Error { + constructor( + public message: string, + // TODO internal error codes + public code: number = 500, + public traceID?: string, + public trace?: string, + ) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); // make sure prototype chain is set to error + //this.stack = trace || new Error().stack; + } +} + +export class OntologyError extends BridgeInternalError { + constructor(tag: string) { + super( + `${tag}, undefined Ontology, ontology is required to interact with tokens`, + 500, + ); + } +} + +export class TransactionError extends BridgeInternalError { + constructor(tag: string) { + super(`${tag}, Transaction failed`, 500); + } +} + +export class TransactionIdUndefinedError extends BridgeInternalError { + constructor(tag: string) { + super(`${tag}, Transaction id undefined`, 500); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-errors.ts similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-errors.ts index 9a3f4ebe54..8c6f4bb9e2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-errors.ts @@ -9,7 +9,7 @@ export class SATPInternalError extends Error { super(message); this.name = this.constructor.name; Object.setPrototypeOf(this, new.target.prototype); // make sure prototype chain is set to error - this.stack = trace || new Error().stack; + //this.stack = trace || new Error().stack; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts new file mode 100644 index 0000000000..04e2ad1a01 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts @@ -0,0 +1,25 @@ +import { SATPInternalError } from "./satp-errors"; + +export class SessionNotFoundError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, session not found`, 500); + } +} + +export class SessionIdNotFoundError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, session id not found`, 500); + } +} + +export class FailedToCreateMessageError extends SATPInternalError { + constructor(tag: string, message: string) { + super(`${tag}, failed to create message: ${message}`, 500); + } +} + +export class FailedToProcessError extends SATPInternalError { + constructor(tag: string, message: string) { + super(`${tag}, failed to process: ${message}`, 500); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts new file mode 100644 index 0000000000..c5962c983f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts @@ -0,0 +1,168 @@ +import { SATPInternalError } from "./satp-errors"; + +export class SatpCommonBodyError extends SATPInternalError { + constructor(fnTag: string, data: string) { + super( + `${fnTag}, message satp common body is missing or is missing required fields \n ${data}`, + 400, + ); + } +} +export class SessionError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, session undefined`, 500); + } +} + +export class SessionDataNotLoadedCorrectlyError extends SATPInternalError { + constructor(fnTag: string, data: string) { + super(`${fnTag}, session data was not loaded correctly \n ${data}`, 500); + } +} + +export class SessionCompletedError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, session data already completed`, 500); + } +} + +export class SATPVersionError extends SATPInternalError { + constructor(fnTag: string, unsupported: string, supported: string) { + super( + `${fnTag}, unsupported SATP version \n received: ${unsupported}, supported: ${supported}`, + 400, + ); + } +} + +export class SignatureVerificationError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, message signature verification failed`, 400); + } +} + +export class SignatureMissingError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, message signature missing`, 400); + } +} + +export class MessageTypeError extends SATPInternalError { + constructor(fnTag: string, received: string, expected: string) { + super( + `${fnTag}, message type miss match \n received: ${received} \n expected: ${expected}`, + 400, + ); + } +} + +export class TransferInitClaimsError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, transferInitClaims missing or faulty`, 400); + } +} + +export class TransferInitClaimsHashError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, transferInitClaims hash missing or missmatch`, 400); + } +} + +export class NetworkCapabilitiesError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, NetworkCapabilitiesError missing or faulty`, 400); + } +} + +export class DLTNotSupportedError extends SATPInternalError { + constructor(fnTag: string, dlt: string) { + super(`${fnTag}, DLT not supported \n received: ${dlt}`, 400); + } +} + +export class ServerGatewayPubkeyError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, serverGatewayPubkey missing or missmatch`, 400); + } +} + +export class ClientGatewayPubkeyError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, clientGatewayPubkey missing or missmatch`, 400); + } +} + +export class SequenceNumberError extends SATPInternalError { + constructor(fnTag: string, received: bigint, expected: bigint) { + super( + `${fnTag}, sequence number missmatch \n received: ${received} \n expected: ${expected}`, + 400, + ); + } +} + +export class HashError extends SATPInternalError { + constructor(fnTag: string, received: string, expected: string) { + super( + `${fnTag}, hash missmatch \n received: ${received} \n expected: ${expected}`, + 400, + ); + } +} + +export class TransferContextIdError extends SATPInternalError { + constructor(fnTag: string, received: string, expected: string) { + super( + `${fnTag}, transferContextId missing or missmatch \n received: ${received} \n expected: ${expected}`, + 400, + ); + } +} + +export class MissingBridgeManagerError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, bridge manager missing`, 400); + } +} + +export class LockAssertionClaimError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, lockAssertionClaim missing or faulty`, 400); + } +} + +export class LockAssertionClaimFormatError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, lockAssertionClaimFormat missing`, 400); + } +} + +export class LockAssertionExpirationError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, lockAssertionExpiration missing or faulty`, 400); + } +} + +export class BurnAssertionClaimError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, burnAssertionClaim missing or faulty`, 400); + } +} + +export class MintAssertionClaimError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, mintAssertionClaim missing or faulty`, 400); + } +} + +export class AssignmentAssertionClaimError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, assignmentAssertionClaim missing or faulty`, 400); + } +} + +export class ResourceUrlError extends SATPInternalError { + constructor(fnTag: string) { + super(`${fnTag}, resourceUrl missing or missmatch`, 400); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index db3b168121..432f3c6cdf 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -14,6 +14,14 @@ import { Stage3Signatures, Stage3Timestamps, } from "../generated/proto/cacti/satp/v02/common/session_pb"; +import { + SATPVersionError, + SessionCompletedError, + SessionDataNotLoadedCorrectlyError, +} from "./errors/satp-service-errors"; +import { SATP_VERSION } from "./constants"; +import { LockType } from "../generated/proto/cacti/satp/v02/common/message_pb"; +import { SessionType } from "./session-utils"; // Define interface on protos export interface ISATPSessionOptions { @@ -75,11 +83,21 @@ export class SATPSession { sessionData.signatures.stage3 = new Stage3Signatures(); } - public getServerSessionData(): SessionData | undefined { + public getServerSessionData(): SessionData { + if (this.serverSessionData == undefined) { + throw new Error( + `${SATPSession.CLASS_NAME}#getServerSessionData(), serverSessionData is undefined`, + ); + } return this.serverSessionData; } - public getClientSessionData(): SessionData | undefined { + public getClientSessionData(): SessionData { + if (this.clientSessionData == undefined) { + throw new Error( + `${SATPSession.CLASS_NAME}#getClientSessionData(), clientSessionData is undefined`, + ); + } return this.clientSessionData; } @@ -94,4 +112,58 @@ export class SATPSession { public getSessionId(): string { return this.serverSessionData?.id || this.clientSessionData?.id || ""; } + + public verify(tag: string, type: SessionType): void { + let sessionData: SessionData | undefined; + if (type == SessionType.SERVER) { + sessionData = this.getServerSessionData(); + } else if (type == SessionType.CLIENT) { + sessionData = this.getClientSessionData(); + } else { + throw new Error( + `${SATPSession.CLASS_NAME}#verify(), sessionData type is not valid`, + ); + } + + if (sessionData == undefined) { + throw new SessionDataNotLoadedCorrectlyError(tag, "undefined"); + } + + if (sessionData.completed) { + throw new SessionCompletedError("Session already completed"); + } + + if ( + sessionData.version == "" || + sessionData.id == "" || + sessionData.digitalAssetId == "" || + sessionData.originatorPubkey == "" || + sessionData.beneficiaryPubkey == "" || + sessionData.senderGatewayNetworkId == "" || + sessionData.recipientGatewayNetworkId == "" || + sessionData.clientGatewayPubkey == "" || + sessionData.serverGatewayPubkey == "" || + sessionData.senderGatewayOwnerId == "" || + sessionData.receiverGatewayOwnerId == "" || + // sessionData.maxRetries == undefined || + // sessionData.maxTimeout == undefined || + sessionData.senderGatewayNetworkId == "" || + sessionData.signatureAlgorithm == undefined || + sessionData.lockType == LockType.UNSPECIFIED || + sessionData.lockExpirationTime == BigInt(0) || + sessionData.credentialProfile == undefined || + sessionData.loggingProfile == "" || + sessionData.accessControlProfile == "" || + // sessionData.lastSequenceNumber == BigInt(0) || + sessionData.transferContextId == "" + ) { + throw new SessionDataNotLoadedCorrectlyError( + tag, + JSON.stringify(sessionData), + ); + } + if (sessionData.version != SATP_VERSION) { + throw new SATPVersionError(tag, sessionData.version, SATP_VERSION); + } + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts index aed061f862..c0065f88c6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts @@ -292,6 +292,47 @@ export function saveSignature( } } +export function getPreviousMessageType( + sessionData: SessionData | undefined, + type: MessageType, +): MessageType { + if (sessionData == undefined) { + throw new Error("No session data provided"); + } + + switch (type) { + case MessageType.INIT_PROPOSAL: + MessageType.UNSPECIFIED; + case MessageType.INIT_RECEIPT: + return MessageType.INIT_PROPOSAL; + case MessageType.INIT_REJECT: + return MessageType.INIT_PROPOSAL; + case MessageType.TRANSFER_COMMENCE_REQUEST: + if (sessionData.hashes?.stage1?.transferProposalRejectMessageHash) { + return MessageType.INIT_REJECT; + } + return MessageType.INIT_RECEIPT; + case MessageType.TRANSFER_COMMENCE_RESPONSE: + return MessageType.TRANSFER_COMMENCE_REQUEST; + case MessageType.LOCK_ASSERT: + return MessageType.TRANSFER_COMMENCE_RESPONSE; + case MessageType.ASSERTION_RECEIPT: + return MessageType.LOCK_ASSERT; + case MessageType.COMMIT_PREPARE: + return MessageType.ASSERTION_RECEIPT; + case MessageType.COMMIT_READY: + return MessageType.COMMIT_PREPARE; + case MessageType.COMMIT_FINAL: + return MessageType.COMMIT_READY; + case MessageType.ACK_COMMIT_FINAL: + return MessageType.COMMIT_FINAL; + case MessageType.COMMIT_TRANSFER_COMPLETE: + return MessageType.ACK_COMMIT_FINAL; + default: + throw new Error("Message type not found"); + } +} + export function getMessageHash( sessionData: SessionData | undefined, messageType: MessageType, @@ -399,34 +440,3 @@ export function getMessageTimestamp( throw new Error("Message hash not found"); } } - -export function checkSessionData(sessionData: SessionData): boolean { - if ( - sessionData.version == undefined || - sessionData.id == undefined || - sessionData.digitalAssetId == undefined || - sessionData.originatorPubkey == undefined || - sessionData.beneficiaryPubkey == undefined || - sessionData.senderGatewayNetworkId == undefined || - sessionData.recipientGatewayNetworkId == undefined || - sessionData.clientGatewayPubkey == undefined || - sessionData.serverGatewayPubkey == undefined || - sessionData.senderGatewayOwnerId == undefined || - sessionData.receiverGatewayOwnerId == undefined || - // sessionData.maxRetries == undefined || - // sessionData.maxTimeout == undefined || - sessionData.senderGatewayNetworkId == undefined || - sessionData.signatureAlgorithm == undefined || - sessionData.lockType == undefined || - sessionData.lockExpirationTime == undefined || - sessionData.credentialProfile == undefined || - sessionData.loggingProfile == undefined || - sessionData.accessControlProfile == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.multipleClaimsAllowed == undefined || - sessionData.multipleCancelsAllowed == undefined - ) { - return false; - } - return true; -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/handler-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/handler-utils.ts new file mode 100644 index 0000000000..9b7190cc14 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/handler-utils.ts @@ -0,0 +1,8 @@ +import { SessionIdNotFoundError } from "../errors/satp-handler-errors"; + +export function getSessionId(obj: any): string { + if (!obj.common.sessionId) { + throw new SessionIdNotFoundError("getSessionId"); + } + return obj.common.sessionId; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 3e9514c9f0..fe3529803f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -16,6 +16,12 @@ import { SATPHandlerType, } from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { + FailedToCreateMessageError, + FailedToProcessError, + SessionNotFoundError, +} from "../errors/satp-handler-errors"; +import { getSessionId } from "./handler-utils"; export class Stage1SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE1; @@ -56,34 +62,30 @@ export class Stage1SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Transfer Proposal...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); - if (!req.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(req.common?.sessionId); + const session = this.sessions.get(getSessionId(req)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } - const sessionData = - await this.serverService.checkTransferProposalRequestMessage( - req, - session, - this.supportedDLTs, - ); + await this.serverService.checkTransferProposalRequestMessage( + req, + session, + this.supportedDLTs, + ); + const message = await this.serverService.transferProposalResponse( req, session, ); + this.Log.debug(`${fnTag}, Returning response: ${message}`); - this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); if (!message) { - throw new Error(`${fnTag}, Failed to create TransferProposalReceipt`); + throw new FailedToCreateMessageError(fnTag, "TransferProposalReceipt"); } return message; } catch (error) { - throw new Error(`${fnTag}, Failed to process TransferProposal ${error}`); + throw new FailedToProcessError(fnTag, "TransferProposalRequest"); } } @@ -97,35 +99,27 @@ export class Stage1SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Transfer Commence...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); - if (!req.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(req.common?.sessionId); + const session = this.sessions.get(getSessionId(req)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } - const sessionData = - await this.serverService.checkTransferCommenceRequestMessage( - req, - session, - ); + await this.serverService.checkTransferCommenceRequestMessage( + req, + session, + ); const message = await this.serverService.transferCommenceResponse( req, session, ); this.Log.debug(`${fnTag}, Returning response: ${message}`); - this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); if (!message) { - throw new Error(`${fnTag}, Failed to create TransferCommenceResponse`); + throw new FailedToCreateMessageError(fnTag, "TransferCommenceResponse"); } return message; } catch (error) { - throw new Error( - `${fnTag}, Failed to process TransferCommenceRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "TransferCommenceResponse"); } } @@ -157,13 +151,11 @@ export class Stage1SATPHandler implements SATPHandler { ); if (!requestTransferProposal) { - throw new Error(`${fnTag}, Failed to create TransferProposalRequest`); + throw new FailedToCreateMessageError(fnTag, "TransferProposalRequest"); } return requestTransferProposal; } catch (error) { - throw new Error( - `${fnTag}, Failed to process TransferProposalRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "TransferProposalRequest"); } } @@ -181,7 +173,7 @@ export class Stage1SATPHandler implements SATPHandler { throw new Error(`${fnTag}, Session Id not found`); } - const session = this.sessions.get(response.common?.sessionId); + const session = this.sessions.get(getSessionId(response)); if (!session) { throw new Error(`${fnTag}, Session not found`); } @@ -195,14 +187,12 @@ export class Stage1SATPHandler implements SATPHandler { await this.clientService.transferCommenceRequest(response, session); if (!requestTransferCommence) { - throw new Error(`${fnTag}, Failed to create TransferCommenceRequest`); + throw new FailedToCreateMessageError(fnTag, "TransferCommenceRequest"); } return requestTransferCommence; } catch (error) { - throw new Error( - `${fnTag}, Failed to process TransferCommenceRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "TransferCommenceRequest"); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index d9bf680194..aa5cd93b49 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -15,6 +15,12 @@ import { } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; import { Stage2ClientService } from "../stage-services/client/stage2-client-service"; import { TransferCommenceResponseMessage } from "../../generated/proto/cacti/satp/v02/stage_1_pb"; +import { + FailedToCreateMessageError, + FailedToProcessError, + SessionNotFoundError, +} from "../errors/satp-handler-errors"; +import { getSessionId } from "./handler-utils"; export class Stage2SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE2; private sessions: Map; @@ -54,30 +60,29 @@ export class Stage2SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Lock Assertion...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); - if (!req.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(req.common?.sessionId); + const session = this.sessions.get(getSessionId(req)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } - const sessionData = - await this.serverService.checkLockAssertionRequestMessage(req, session); + await this.serverService.checkLockAssertionRequestMessage(req, session); + const message = await this.serverService.lockAssertionResponse( req, session, ); + this.Log.debug(`${fnTag}, Returning response: ${message}`); - this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); if (!message) { - throw new Error(`${fnTag}, Failed to create LockAssertionReceipt`); + throw new FailedToCreateMessageError( + fnTag, + "LockAssertionImplementation", + ); } return message; } catch (error) { - throw new Error(`${fnTag}, Failed to process LockAssertion ${error}`); + throw new FailedToProcessError(fnTag, "LockAssertionImplementation"); } } @@ -97,13 +102,9 @@ export class Stage2SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Lock Assertion Request Message...`); this.Log.debug(`${fnTag}, Response: ${response}`); - if (!response.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(response.common?.sessionId); + const session = this.sessions.get(getSessionId(response)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } await this.clientService.checkTransferCommenceResponseMessage( @@ -119,13 +120,11 @@ export class Stage2SATPHandler implements SATPHandler { ); if (!request) { - throw new Error(`${fnTag}, Failed to create LockAssertionRequest`); + throw new FailedToCreateMessageError(fnTag, "LockAssertionRequest"); } return request; } catch (error) { - throw new Error( - `${fnTag}, Failed to process LockAssertionRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "LockAssertionRequest"); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index a24e083c8f..1290d632b6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -18,6 +18,12 @@ import { import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { Empty } from "@bufbuild/protobuf"; import { Stage3ClientService } from "../stage-services/client/stage3-client-service"; +import { getSessionId } from "./handler-utils"; +import { + FailedToCreateMessageError, + FailedToProcessError, + SessionNotFoundError, +} from "../errors/satp-handler-errors"; export class Stage3SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE3; @@ -58,34 +64,29 @@ export class Stage3SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Commit Preparation...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); - if (!req.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(req.common?.sessionId); + const session = this.sessions.get(getSessionId(req)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } - const sessionData = - await this.serverService.checkCommitPreparationRequestMessage( - req, - session, - ); + await this.serverService.checkCommitPreparationRequestMessage( + req, + session, + ); await this.serverService.mintAsset(session); const message = await this.serverService.commitReady(req, session); this.Log.debug(`${fnTag}, Returning response: ${message}`); - this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); - const response = new CommitReadyResponseMessage(); - return response; + if (!message) { + throw new FailedToCreateMessageError(fnTag, "CommitPreparationRequest"); + } + + return message; } catch (error) { - throw new Error( - `${fnTag}, Failed to process CommitPreparationRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "CommitPreparationRequest"); } } @@ -99,20 +100,15 @@ export class Stage3SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Commit Final Assertion...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); - if (!req.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(req.common?.sessionId); + const session = this.sessions.get(getSessionId(req)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } - const sessionData = - await this.serverService.checkCommitFinalAssertionRequestMessage( - req, - session, - ); + await this.serverService.checkCommitFinalAssertionRequestMessage( + req, + session, + ); await this.serverService.assignAsset(session); @@ -121,15 +117,19 @@ export class Stage3SATPHandler implements SATPHandler { req, session, ); + this.Log.debug(`${fnTag}, Returning response: ${message}`); - this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); - const response = new CommitFinalAcknowledgementReceiptResponseMessage(); - return response; + if (!message) { + throw new FailedToCreateMessageError( + fnTag, + "CommitFinalAssertionRequest", + ); + } + + return message; } catch (error) { - throw new Error( - `${fnTag}, Failed to process CommitFinalAssertionRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "CommitFinalAssertionRequest"); } } @@ -143,28 +143,19 @@ export class Stage3SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Transfer Complete...`); this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); - if (!req.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(req.common?.sessionId); + const session = this.sessions.get(getSessionId(req)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } - const sessionData = - await this.serverService.checkTransferCompleteRequestMessage( - req, - session, - ); - - this.Log.debug(`${fnTag}, Session Data: ${sessionData}`); + await this.serverService.checkTransferCompleteRequestMessage( + req, + session, + ); return new Empty({}); } catch (error) { - throw new Error( - `${fnTag}, Failed to process TransferCompleteRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "TransferCompleteRequest"); } } @@ -187,13 +178,9 @@ export class Stage3SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Commit Preparation Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); - if (!response.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(response.common?.sessionId); + const session = this.sessions.get(getSessionId(response)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } await this.clientService.checkCommitReadyResponseMessage( @@ -207,13 +194,11 @@ export class Stage3SATPHandler implements SATPHandler { ); if (!request) { - throw new Error(`${fnTag}, Failed to create TransferProposalRequest`); + throw new FailedToCreateMessageError(fnTag, "TransferProposalRequest"); } return request; } catch (error) { - throw new Error( - `${fnTag}, Failed to process commitPreparationRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "TransferProposalRequest"); } } @@ -223,16 +208,12 @@ export class Stage3SATPHandler implements SATPHandler { const stepTag = `CommitFinalAssertionRequest()`; const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { - this.Log.debug(`${fnTag}, Commit Preparation Request...`); + this.Log.debug(`${fnTag}, Commit Final Assertion Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); - if (!response.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(response.common?.sessionId); + const session = this.sessions.get(getSessionId(response)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } await this.clientService.checkCommitReadyResponseMessage( @@ -248,15 +229,14 @@ export class Stage3SATPHandler implements SATPHandler { ); if (!request) { - throw new Error( - `${fnTag}, Failed to create CommitFinalAssertionRequest`, + throw new FailedToCreateMessageError( + fnTag, + "CommitFinalAssertionRequest", ); } return request; } catch (error) { - throw new Error( - `${fnTag}, Failed to process CommitFinalAssertionRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "CommitFinalAssertionRequest"); } } @@ -269,13 +249,9 @@ export class Stage3SATPHandler implements SATPHandler { this.Log.debug(`${fnTag}, Transfer Complete Request...`); this.Log.debug(`${fnTag}, Response: ${response}`); - if (!response.common?.sessionId) { - throw new Error(`${fnTag}, Session Id not found`); - } - - const session = this.sessions.get(response.common?.sessionId); + const session = this.sessions.get(getSessionId(response)); if (!session) { - throw new Error(`${fnTag}, Session not found`); + throw new SessionNotFoundError(fnTag); } await this.clientService.checkCommitFinalAcknowledgementReceiptResponseMessage( @@ -289,13 +265,11 @@ export class Stage3SATPHandler implements SATPHandler { ); if (!request) { - throw new Error(`${fnTag}, Failed to create TransferCompleteRequest`); + throw new FailedToCreateMessageError(fnTag, "TransferCompleteRequest"); } return request; } catch (error) { - throw new Error( - `${fnTag}, Failed to process TransferCompleteRequest ${error}`, - ); + throw new FailedToProcessError(fnTag, "TransferCompleteRequest"); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts index 786c693aa7..9bd9a8b6de 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -1,29 +1,3 @@ -import { - TransferCommenceRequestMessage, - TransferProposalRequestMessage, - TransferProposalReceiptMessage, -} from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; -import { - MessageType, - CommonSatp, - TransferClaims, - NetworkCapabilities, -} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SATP_VERSION } from "../../constants"; -import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; -import { - getMessageHash, - saveHash, - saveSignature, - checkSessionData, -} from "../../session-utils"; -import { SupportedChain } from "../../types"; -import { SATPSession } from "../../../core/satp-session"; import { SATPService, SATPServiceType, @@ -48,361 +22,4 @@ export class Stage0ClientService extends SATPService { }; super(commonOptions); } - - async transferProposalRequest( - sessionID: string, - session: SATPSession, - supportedDLTs: SupportedChain[], - ): Promise { - const stepTag = `transferProposalRequest()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - - const sessionData = session.getClientSessionData(); - - if (sessionData == undefined || !checkSessionData(sessionData)) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } - - if ( - !supportedDLTs.includes( - sessionData.senderGatewayNetworkId as SupportedChain, - ) - ) { - throw new Error( //todo change this to the transferClaims check - `${fnTag}, recipient gateway dlt system is not supported by this gateway`, - ); - } - - if (sessionData.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - - const commonBody = new CommonSatp(); - commonBody.version = sessionData.version; - commonBody.messageType = MessageType.PRE_INIT_PROPOSAL; - commonBody.sessionId = sessionData.id; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.resourceUrl = ""; - - if (sessionData.transferContextId != undefined) { - commonBody.transferContextId = sessionData.transferContextId; - } - - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - commonBody.hashPreviousMessage = ""; - - const transferInitClaims = new TransferClaims(); - transferInitClaims.digitalAssetId = sessionData.digitalAssetId; - transferInitClaims.assetProfileId = sessionData.assetProfileId; - transferInitClaims.verifiedOriginatorEntityId = - sessionData.verifiedOriginatorEntityId; - transferInitClaims.verifiedBeneficiaryEntityId = - sessionData.verifiedBeneficiaryEntityId; - transferInitClaims.originatorPubkey = sessionData.originatorPubkey; - transferInitClaims.beneficiaryPubkey = sessionData.beneficiaryPubkey; - transferInitClaims.senderGatewayNetworkId = - sessionData.senderGatewayNetworkId; - transferInitClaims.recipientGatewayNetworkId = - sessionData.recipientGatewayNetworkId; - transferInitClaims.clientGatewayPubkey = sessionData.clientGatewayPubkey; - transferInitClaims.serverGatewayPubkey = sessionData.serverGatewayPubkey; - transferInitClaims.senderGatewayOwnerId = sessionData.senderGatewayOwnerId; - transferInitClaims.receiverGatewayOwnerId = - sessionData.receiverGatewayOwnerId; - - sessionData.hashTransferInitClaims = getHash(transferInitClaims); - - const networkCapabilities = new NetworkCapabilities(); - networkCapabilities.senderGatewayNetworkId = - sessionData.senderGatewayNetworkId; - networkCapabilities.signatureAlgorithm = sessionData.signatureAlgorithm; - networkCapabilities.lockType = sessionData.lockType; - networkCapabilities.lockExpirationTime = sessionData.lockExpirationTime; - networkCapabilities.credentialProfile = sessionData.credentialProfile; - networkCapabilities.loggingProfile = sessionData.loggingProfile; - networkCapabilities.accessControlProfile = sessionData.accessControlProfile; - - if (sessionData.permissions != undefined) { - this.Log.info(`${fnTag}, Optional variable loaded: permissions...`); - networkCapabilities.permissions = sessionData.permissions; - } - - if (sessionData.developerUrn != undefined) { - this.Log.info(`${fnTag}, Optional variable loaded: developerUrn...`); - networkCapabilities.developerUrn = sessionData.developerUrn; - } - - if (sessionData.applicationProfile != undefined) { - this.Log.info( - `${fnTag}, Optional variable loaded: applicationProfile...`, - ); - networkCapabilities.applicationProfile = sessionData.applicationProfile; - } - - if (sessionData.subsequentCalls != undefined) { - this.Log.info(`${fnTag}, Optional variable loaded: subsequentCalls...`); - networkCapabilities.subsequentCalls = sessionData.subsequentCalls; - } - - if (sessionData.history != undefined) { - this.Log.info(`${fnTag}, Optional variable loaded: history...`); - networkCapabilities.history = sessionData.history; - } - - const transferProposalRequestMessage = new TransferProposalRequestMessage(); - transferProposalRequestMessage.common = commonBody; - transferProposalRequestMessage.transferInitClaims = transferInitClaims; - transferProposalRequestMessage.networkCapabilities = networkCapabilities; - - if (sessionData.transferClaimsFormat != undefined) { - this.Log.info( - `${fnTag}, Optional variable loaded: transferInitClaimsFormat...`, - ); - transferProposalRequestMessage.transferInitClaimsFormat = - sessionData.transferClaimsFormat; - } - if (sessionData.multipleCancelsAllowed != undefined) { - this.Log.info( - `${fnTag}, Optional variable loaded: multipleCancelsAllowed...`, - ); - transferProposalRequestMessage.multipleCancelsAllowed = - sessionData.multipleCancelsAllowed; - } - if (sessionData.multipleClaimsAllowed != undefined) { - this.Log.info( - `${fnTag}, Optional variable loaded: multipleClaimsAllowed...`, - ); - transferProposalRequestMessage.multipleClaimsAllowed = - sessionData.multipleClaimsAllowed; - } - - const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferProposalRequestMessage)), - ); - - transferProposalRequestMessage.clientSignature = messageSignature; - - saveSignature(sessionData, MessageType.INIT_PROPOSAL, messageSignature); - - saveHash( - sessionData, - MessageType.INIT_PROPOSAL, - getHash(transferProposalRequestMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionID, - type: "transferProposalRequest", - operation: "validate", - data: JSON.stringify(sessionData), - }); - */ - this.Log.info(`${fnTag}, sending TransferProposalRequest...`); - - return transferProposalRequestMessage; - } - - async transferCommenceRequest( - response: TransferProposalReceiptMessage, - session: SATPSession, - ): Promise { - const stepTag = `transferCommenceRequest()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - - if (!response || !response.common) { - throw new Error("Response or response.common is undefined"); - } - - const sessionData = session.getClientSessionData(); - - if (sessionData == undefined) { - throw new Error("Session data not loaded successfully"); - } - - const commonBody = new CommonSatp(); - commonBody.version = sessionData.version; - commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; - commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); - - //todo check when reject - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.INIT_RECEIPT, - ); - - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - commonBody.sessionId = sessionData.id; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const transferCommenceRequestMessage = new TransferCommenceRequestMessage(); - transferCommenceRequestMessage.common = commonBody; - transferCommenceRequestMessage.hashTransferInitClaims = - sessionData.hashTransferInitClaims; - - // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; - - const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), - ); - - transferCommenceRequestMessage.clientSignature = messageSignature; - - saveSignature( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - messageSignature, - ); - - saveHash( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - getHash(transferCommenceRequestMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "transferCommenceRequest", - operation: "validate", - data: JSON.stringify(sessionData), - }); - */ - this.Log.info(`${fnTag}, sending TransferCommenceRequest...`); - - return transferCommenceRequestMessage; - } - - async checkTransferProposalReceiptMessage( - response: TransferProposalReceiptMessage, - session: SATPSession, - ): Promise { - const stepTag = `checkTransferProposalReceiptMessage()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - if (response.common == undefined) { - throw new Error(`${fnTag}, message has no satp common body`); - } - - if ( - response.common.version == undefined || - response.common.sequenceNumber == undefined || - response.common.hashPreviousMessage == undefined || - response.timestamp == undefined - ) { - throw new Error(`${fnTag}, satp common body is missing required fields`); - } - - // const sessionId = response.common.sessionId; - - const sessionData = session.getClientSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not loaded correctly`); - } - - if (response.common.version != sessionData.version) { - throw new Error(`${fnTag}, TransferCommenceRequest version mismatch`); - } - - if ( - response.common.messageType != MessageType.INIT_RECEIPT && - response.common.messageType != MessageType.INIT_REJECT - ) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceRequest()`, - ); - } - - if ( - response.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt Message sequence number is wrong`, - ); - } - - if ( - response.common.hashPreviousMessage == undefined || - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.INIT_PROPOSAL) - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt previous message hash does not match the one that was sent`, - ); - } - - if ( - response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt serverIdentity public key does not match the one that was sent`, - ); - } - - if ( - response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !verifySignature(this.Signer, response, sessionData.serverGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt message signature verification failed`, - ); - } - - if ( - response.common.messageType == MessageType.INIT_REJECT && - response.transferCounterClaims == undefined - ) { - sessionData.completed = true; - return false; - } else if ( - response.common.messageType == MessageType.INIT_REJECT && - response.transferCounterClaims != undefined - ) { - if ( - await this.checkProposedTransferClaims(response.transferCounterClaims) - ) { - sessionData.proposedTransferInitClaims = getHash( - response.transferCounterClaims, - ); - return true; - } else { - this.Log.info( - `TransferProposalReceipt proposedTransferClaims were rejected`, - ); - sessionData.completed = true; - return false; - } - } - this.Log.info(`TransferProposalReceipt passed all checks.`); - return true; - } - - async checkProposedTransferClaims( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - counterTransfer: TransferClaims, - ): Promise { - //const fnTag = `${this.className}#checkCounterTransferClaims()`; - //todo - return true; - } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 2d6caeaa19..c371aecaaf 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -9,18 +9,12 @@ import { TransferClaims, NetworkCapabilities, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SATP_VERSION } from "../../constants"; -import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { getMessageHash, saveHash, saveSignature, - checkSessionData, + SessionType, } from "../../session-utils"; import { SupportedChain } from "../../types"; import { SATPSession } from "../../../core/satp-session"; @@ -30,6 +24,9 @@ import { ISATPClientServiceOptions, ISATPServiceOptions, } from "../satp-service"; +import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; +import { ACCEPTANCE } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SessionError } from "../../errors/satp-service-errors"; export class Stage1ClientService extends SATPService { public static readonly SATP_STAGE = "1"; @@ -57,12 +54,14 @@ export class Stage1ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferProposalRequest...`); - const sessionData = session.getClientSessionData(); - - if (sessionData == undefined || !checkSessionData(sessionData)) { - throw new Error(`${fnTag}, session data is not correctly initialized`); + if (session == undefined) { + throw new SessionError(fnTag); } + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + if ( !supportedDLTs.includes( sessionData.senderGatewayNetworkId as SupportedChain, @@ -73,17 +72,13 @@ export class Stage1ClientService extends SATPService { ); } - if (sessionData.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.INIT_PROPOSAL; commonBody.sessionId = sessionData.id; commonBody.sequenceNumber = sessionData.lastSequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.resourceUrl = ""; + commonBody.resourceUrl = sessionData.resourceUrl; if (sessionData.transferContextId != undefined) { commonBody.transferContextId = sessionData.transferContextId; @@ -213,20 +208,18 @@ export class Stage1ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferCommenceRequest...`); - if (!response || !response.common) { - throw new Error("Response or response.common is undefined"); + if (session == undefined) { + throw new SessionError(fnTag); } - const sessionData = session.getClientSessionData(); + session.verify(fnTag, SessionType.CLIENT); - if (sessionData == undefined) { - throw new Error("Session data not loaded successfully"); - } + const sessionData = session.getClientSessionData(); const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; - commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); + commonBody.sequenceNumber = response.common!.sequenceNumber + BigInt(1); //todo check when reject commonBody.hashPreviousMessage = getMessageHash( @@ -238,6 +231,7 @@ export class Stage1ClientService extends SATPService { commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; commonBody.sessionId = sessionData.id; commonBody.transferContextId = sessionData.transferContextId; + commonBody.resourceUrl = sessionData.resourceUrl; sessionData.lastSequenceNumber = commonBody.sequenceNumber; @@ -246,8 +240,6 @@ export class Stage1ClientService extends SATPService { transferCommenceRequestMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; - // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; - const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), ); @@ -286,102 +278,42 @@ export class Stage1ClientService extends SATPService { const stepTag = `checkTransferProposalReceiptMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkTransferProposalReceiptMessage...`); - if (response.common == undefined) { - throw new Error(`${fnTag}, message has no satp common body`); - } - if ( - response.common.version == undefined || - response.common.sequenceNumber == undefined || - response.common.hashPreviousMessage == undefined || - response.timestamp == undefined - ) { - throw new Error(`${fnTag}, satp common body is missing required fields`); + if (session == undefined) { + throw new SessionError(fnTag); } - // const sessionId = response.common.sessionId; + session.verify(fnTag, SessionType.CLIENT); const sessionData = session.getClientSessionData(); - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${response.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not loaded correctly`); - } - - if (response.common.version != sessionData.version) { - throw new Error(`${fnTag}, TransferCommenceRequest version mismatch`); - } - - if ( - response.common.messageType != MessageType.INIT_RECEIPT && - response.common.messageType != MessageType.INIT_REJECT - ) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceRequest()`, - ); - } - - if ( - response.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt Message sequence number is wrong got: ${response.common.sequenceNumber} expected to be ${sessionData.lastSequenceNumber + BigInt(1)}`, - ); - } - - if ( - response.common.hashPreviousMessage == undefined || - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.INIT_PROPOSAL) - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt previous message hash does not match the one that was sent`, - ); - } - - if ( - response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt serverIdentity public key does not match the one that was sent`, - ); - } - - if ( - response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt clientIdentity public key does not match the one that was sent`, - ); - } + commonBodyVerifier( + fnTag, + response.common, + sessionData, + MessageType.INIT_RECEIPT, + MessageType.INIT_REJECT, + ); - if ( - !verifySignature(this.Signer, response, sessionData.serverGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferProposalReceipt message signature verification failed`, - ); - } + signatureVerifier(fnTag, this.Signer, response, sessionData); if ( - response.common.messageType == MessageType.INIT_REJECT && + response.common!.messageType == MessageType.INIT_REJECT && response.transferCounterClaims == undefined ) { + this.Log.info( + `${fnTag}, TransferProposalReceipt proposedTransferClaims were rejected`, + ); + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; sessionData.completed = true; + saveHash(sessionData, MessageType.INIT_REJECT, getHash(response)); return false; } else if ( - response.common.messageType == MessageType.INIT_REJECT && + response.common!.messageType == MessageType.INIT_REJECT && response.transferCounterClaims != undefined ) { + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_CONDITIONAL; + saveHash(sessionData, MessageType.INIT_REJECT, getHash(response)); if ( await this.checkProposedTransferClaims(response.transferCounterClaims) ) { @@ -391,13 +323,14 @@ export class Stage1ClientService extends SATPService { return true; } else { this.Log.info( - `${fnTag}, TransferProposalReceipt proposedTransferClaims were rejected`, + `${fnTag}, TransferProposalReceipt proposedTransferClaims were rejected conditional`, ); sessionData.completed = true; return false; } } + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; saveHash(sessionData, MessageType.INIT_RECEIPT, getHash(response)); this.Log.info(`${fnTag}, TransferProposalReceipt passed all checks.`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 33e7122a9f..7a5a96a137 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -1,5 +1,4 @@ import { TransferCommenceResponseMessage } from "../../../generated/proto/cacti/satp/v02/stage_1_pb"; -import { SATP_VERSION } from "../../constants"; import { CommonSatp, LockAssertionClaim, @@ -7,13 +6,13 @@ import { MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { LockAssertionRequestMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; + getMessageHash, + saveHash, + saveSignature, + SessionType, +} from "../../session-utils"; import { SATPSession } from "../../../core/satp-session"; import { SATPService, @@ -22,23 +21,14 @@ import { } from "../satp-service"; import { ISATPServiceOptions } from "../satp-service"; import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { - HashMissMatch, - MessageTypeMissMatch, - MissingBridgeManager, - MissingClientGatewayPubkey, - MissingLockAssertionClaim, - MissingLockAssertionClaimFormat, - MissingLockAssertionExpiration, - MissingSatpCommonBody, - MissingServerGatewayPubkey, - SATPVersionUnsupported, - SequenceNumberMissMatch, - SessionDataNotLoadedCorrectly, - SessionUndefined, - SignatureVerificationFailed, - TransferContextIdMissMatch, -} from "../errors"; + LockAssertionExpirationError, + MissingBridgeManagerError, + LockAssertionClaimError, + LockAssertionClaimFormatError, + SessionError, +} from "../../errors/satp-service-errors"; export class Stage2ClientService extends SATPService { public static readonly SATP_STAGE = "2"; @@ -59,7 +49,9 @@ export class Stage2ClientService extends SATPService { super(commonOptions); if (ops.bridgeManager == undefined) { - throw MissingBridgeManager(`${this.getServiceIdentifier()}#constructor`); + throw new MissingBridgeManagerError( + `${this.getServiceIdentifier()}#constructor`, + ); } this.bridgeManager = ops.bridgeManager; } @@ -73,50 +65,49 @@ export class Stage2ClientService extends SATPService { this.Log.debug(`${fnTag}, lockAssertionRequest...`); if (session == undefined) { - throw SessionUndefined(`${fnTag}`); + throw new SessionError(fnTag); } - if (response.common == undefined) { - throw MissingSatpCommonBody(`${fnTag}`); - } + session.verify(fnTag, SessionType.CLIENT); const sessionData = session.getClientSessionData(); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(`${fnTag}`); - } - const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.LOCK_ASSERT; sessionData.lastSequenceNumber = commonBody.sequenceNumber = - response.common.sequenceNumber + BigInt(1); + response.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE, ); - commonBody.sessionId = response.common.sessionId; + //response was already verified in the check function so we can use ! to tell TS to trust us + commonBody.sessionId = response.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.resourceUrl = sessionData.resourceUrl; const lockAssertionRequestMessage = new LockAssertionRequestMessage(); lockAssertionRequestMessage.common = commonBody; if (sessionData.lockAssertionClaim == undefined) { - throw MissingLockAssertionClaim(fnTag); + throw new LockAssertionClaimError(fnTag); } lockAssertionRequestMessage.lockAssertionClaim = sessionData.lockAssertionClaim; if (sessionData.lockAssertionClaimFormat == undefined) { - throw MissingLockAssertionClaimFormat(fnTag); + throw new LockAssertionClaimFormatError(fnTag); } lockAssertionRequestMessage.lockAssertionClaimFormat = sessionData.lockAssertionClaimFormat; - if (sessionData.lockAssertionExpiration == undefined) { - throw MissingLockAssertionExpiration(fnTag); + if ( + sessionData.lockAssertionExpiration == undefined || + sessionData.lockAssertionExpiration == BigInt(0) + ) { + throw new LockAssertionExpirationError(fnTag); } lockAssertionRequestMessage.lockAssertionExpiration = @@ -158,106 +149,30 @@ export class Stage2ClientService extends SATPService { return lockAssertionRequestMessage; } - checkTransferCommenceResponseMessage( + async checkTransferCommenceResponseMessage( response: TransferCommenceResponseMessage, session: SATPSession, - ): void { + ): Promise { const stepTag = `checkTransferCommenceResponseMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkTransferCommenceResponseMessage...`); - if ( - response.common == undefined || - response.common.version == undefined || - response.common.messageType == undefined || - response.common.sessionId == undefined || - response.common.sequenceNumber == undefined || - response.common.resourceUrl == undefined || - response.serverSignature == undefined || - response.common.clientGatewayPubkey == undefined || - response.common.serverGatewayPubkey == undefined || - response.common.hashPreviousMessage == undefined - ) { - throw MissingSatpCommonBody(fnTag); + if (session == undefined) { + throw new SessionError(fnTag); } - if (response.common.version != SATP_VERSION) { - throw SATPVersionUnsupported( - fnTag, - response.common.version, - SATP_VERSION, - ); - } + session.verify(fnTag, SessionType.CLIENT); const sessionData = session.getClientSessionData(); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if ( - response.common.serverGatewayPubkey != sessionData.serverGatewayPubkey - ) { - throw MissingServerGatewayPubkey(fnTag); - } - - if ( - response.common.clientGatewayPubkey != sessionData.clientGatewayPubkey - ) { - throw MissingClientGatewayPubkey(fnTag); - } - - if ( - !verifySignature( - this.Signer, - response, - response.common.serverGatewayPubkey, - ) - ) { - throw SignatureVerificationFailed(fnTag); - } - - if (response.common.messageType != MessageType.TRANSFER_COMMENCE_RESPONSE) { - throw MessageTypeMissMatch( - fnTag, - response.common.messageType.toString(), - MessageType.TRANSFER_COMMENCE_RESPONSE.toString(), - ); - } - - if ( - sessionData.lastSequenceNumber == undefined || - response.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw SequenceNumberMissMatch( - fnTag, - response.common.sequenceNumber, - sessionData.lastSequenceNumber, - ); - } - - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST) - ) { - throw HashMissMatch( - fnTag, - response.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST), - ); - } + commonBodyVerifier( + fnTag, + response.common, + sessionData, + MessageType.TRANSFER_COMMENCE_RESPONSE, + ); - if ( - sessionData.transferContextId != undefined && - response.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - response.common.transferContextId, - sessionData.transferContextId, - ); - } + signatureVerifier(fnTag, this.Signer, response, sessionData); if (response.serverTransferNumber != undefined) { this.Log.info( @@ -280,12 +195,17 @@ export class Stage2ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.info(`${fnTag}, Locking Asset...`); - const sessionData = session.getClientSessionData(); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); + + if (session == undefined) { + throw new SessionError(fnTag); } - const assetId = sessionData.transferInitClaims?.digitalAssetId; - const amount = sessionData.transferInitClaims?.amountFromOriginator; + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + + const assetId = sessionData?.transferInitClaims?.digitalAssetId; + const amount = sessionData?.transferInitClaims?.amountFromOriginator; this.Log.debug(`${fnTag}, Lock Asset ID: ${assetId} amount: ${amount}`); if (assetId == undefined) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index f19cb6877f..e7674a09b3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -11,13 +11,13 @@ import { CommitReadyResponseMessage, TransferCompleteRequestMessage, } from "../../../generated/proto/cacti/satp/v02/stage_3_pb"; +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; + getMessageHash, + saveHash, + saveSignature, + SessionType, +} from "../../session-utils"; import { SATPService, ISATPClientServiceOptions, @@ -27,23 +27,14 @@ import { import { SATPSession } from "../../satp-session"; import { LockAssertionReceiptMessage } from "../../../generated/proto/cacti/satp/v02/stage_2_pb"; import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { - HashMissMatch, - MessageTypeMissMatch, - MissingAssignmentAssertionClaim, - MissingBridgeManager, - MissingBurnAssertionClaim, - MissingClientGatewayPubkey, - MissingMintAssertionClaim, - MissingSatpCommonBody, - MissingServerGatewayPubkey, - SATPVersionUnsupported, - SequenceNumberMissMatch, - SessionDataNotLoadedCorrectly, - SessionUndefined, - SignatureVerificationFailed, - TransferContextIdMissMatch, -} from "../errors"; + AssignmentAssertionClaimError, + BurnAssertionClaimError, + MintAssertionClaimError, + MissingBridgeManagerError, + SessionError, +} from "../../errors/satp-service-errors"; export class Stage3ClientService extends SATPService { public static readonly SATP_STAGE = "3"; @@ -64,7 +55,9 @@ export class Stage3ClientService extends SATPService { super(commonOptions); if (ops.bridgeManager == undefined) { - throw MissingBridgeManager(`${this.getServiceIdentifier()}#constructor`); + throw new MissingBridgeManagerError( + `${this.getServiceIdentifier()}#constructor`, + ); } this.bridgeManager = ops.bridgeManager; } @@ -78,31 +71,26 @@ export class Stage3ClientService extends SATPService { this.Log.debug(`${fnTag}, CommitPreparation...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getClientSessionData(); + session.verify(fnTag, SessionType.CLIENT); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (response.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getClientSessionData(); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_PREPARE; sessionData.lastSequenceNumber = commonBody.sequenceNumber = - response.common.sequenceNumber + BigInt(1); + response.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.ASSERTION_RECEIPT, ); - commonBody.sessionId = response.common.sessionId; + commonBody.sessionId = response.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.resourceUrl = sessionData.resourceUrl; const commitPreparationRequestMessage = new CommitPreparationRequestMessage(); @@ -155,39 +143,34 @@ export class Stage3ClientService extends SATPService { this.Log.debug(`${fnTag}, CommitFinalAssertion...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getClientSessionData(); + session.verify(fnTag, SessionType.CLIENT); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (response.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getClientSessionData(); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_FINAL; sessionData.lastSequenceNumber = commonBody.sequenceNumber = - response.common.sequenceNumber + BigInt(1); + response.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.COMMIT_READY, ); - commonBody.sessionId = response.common.sessionId; + commonBody.sessionId = response.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.resourceUrl = sessionData.resourceUrl; const commitFinalAssertionRequestMessage = new CommitFinalAssertionRequestMessage(); commitFinalAssertionRequestMessage.common = commonBody; if (sessionData.burnAssertionClaim == undefined) { - throw MissingBurnAssertionClaim(fnTag); + throw new BurnAssertionClaimError(fnTag); } commitFinalAssertionRequestMessage.burnAssertionClaim = @@ -244,31 +227,27 @@ export class Stage3ClientService extends SATPService { this.Log.debug(`${fnTag}, TransferComplete...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getClientSessionData(); + session.verify(fnTag, SessionType.CLIENT); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (response.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getClientSessionData(); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_TRANSFER_COMPLETE; + commonBody.resourceUrl = sessionData.resourceUrl; + sessionData.lastSequenceNumber = commonBody.sequenceNumber = - response.common.sequenceNumber + BigInt(1); + response.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.ACK_COMMIT_FINAL, ); - commonBody.sessionId = response.common.sessionId; + commonBody.sessionId = response.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -322,112 +301,30 @@ export class Stage3ClientService extends SATPService { return transferCompleteRequestMessage; } - checkLockAssertionReceiptMessage( + async checkLockAssertionReceiptMessage( response: LockAssertionReceiptMessage, session: SATPSession, - ): void { + ): Promise { const stepTag = `checkLockAssertionReceiptMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CheckLockAssertionReceiptMessage...`); if (session == undefined) { - throw SessionUndefined(fnTag); - } - - const sessionData = session.getClientSessionData(); - - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (response.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } - - if (response.common.version != SATP_VERSION) { - throw SATPVersionUnsupported( - fnTag, - response.common.version, - SATP_VERSION, - ); - } - - if (response.common.messageType != MessageType.ASSERTION_RECEIPT) { - throw MessageTypeMissMatch( - fnTag, - response.common.messageType.toString(), - MessageType.ASSERTION_RECEIPT.toString(), - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - response.common.sequenceNumber - ) { - throw SequenceNumberMissMatch( - fnTag, - response.common.sequenceNumber, - sessionData.lastSequenceNumber + BigInt(1), - ); + throw new SessionError(fnTag); } - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.LOCK_ASSERT) - ) { - throw HashMissMatch( - fnTag, - response.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.LOCK_ASSERT), - ); - } + session.verify(fnTag, SessionType.CLIENT); - if ( - sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey - ) { - throw MissingClientGatewayPubkey(fnTag); - } - - if ( - sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey - ) { - throw MissingClientGatewayPubkey(fnTag); - } + const sessionData = session.getClientSessionData(); - if ( - !verifySignature( - this.Signer, - response, - response.common.serverGatewayPubkey, - ) - ) { - throw SignatureVerificationFailed(fnTag); - } + commonBodyVerifier( + fnTag, + response.common, + sessionData, + MessageType.ASSERTION_RECEIPT, + ); - if ( - sessionData.transferContextId != undefined && - response.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - response.common.transferContextId, - sessionData.transferContextId, - ); - } - - if ( - sessionData.serverTransferNumber != undefined && - response.serverTransferNumber != sessionData.serverTransferNumber - ) { - // This does not throw an error because the serverTransferNumber is only meaningful to the server. - this.Log.info( - `${fnTag}, serverTransferNumber does not match the one that was sent`, - ); - } + signatureVerifier(fnTag, this.Signer, response, sessionData); if ( sessionData.serverTransferNumber != undefined && @@ -444,91 +341,30 @@ export class Stage3ClientService extends SATPService { this.Log.info(`${fnTag}, LockAssertionReceiptMessage passed all checks.`); } - checkCommitReadyResponseMessage( + async checkCommitReadyResponseMessage( response: CommitReadyResponseMessage, session: SATPSession, - ): void { + ): Promise { const stepTag = `checkCommitReadyResponseMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CommitReadyResponse...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getClientSessionData(); + session.verify(fnTag, SessionType.CLIENT); - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (response.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } - - if (response.common.version != SATP_VERSION) { - throw SATPVersionUnsupported( - fnTag, - response.common.version, - SATP_VERSION, - ); - } - - if (response.common.messageType != MessageType.COMMIT_READY) { - throw MessageTypeMissMatch( - fnTag, - response.common.messageType.toString(), - MessageType.COMMIT_READY.toString(), - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - response.common.sequenceNumber - ) { - throw SequenceNumberMissMatch( - fnTag, - response.common.sequenceNumber, - sessionData.lastSequenceNumber + BigInt(1), - ); - } - - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.COMMIT_PREPARE) - ) { - throw HashMissMatch( - fnTag, - response.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.COMMIT_PREPARE), - ); - } - - if ( - sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey - ) { - throw MissingClientGatewayPubkey(fnTag); - } + const sessionData = session.getClientSessionData(); - if ( - sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey - ) { - throw MissingServerGatewayPubkey(fnTag); - } + commonBodyVerifier( + fnTag, + response.common, + sessionData, + MessageType.COMMIT_READY, + ); - if ( - !verifySignature( - this.Signer, - response, - response.common.serverGatewayPubkey, - ) - ) { - throw SignatureVerificationFailed(fnTag); - } + signatureVerifier(fnTag, this.Signer, response, sessionData); if (response.mintAssertionClaimFormat != undefined) { //todo @@ -540,22 +376,11 @@ export class Stage3ClientService extends SATPService { if (response.mintAssertionClaim == undefined) { //todo - throw MissingMintAssertionClaim(fnTag); + throw new MintAssertionClaimError(fnTag); } sessionData.mintAssertionClaim = response.mintAssertionClaim; - if ( - sessionData.transferContextId != undefined && - response.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - response.common.transferContextId, - sessionData.transferContextId, - ); - } - if ( sessionData.serverTransferNumber != undefined && response.serverTransferNumber != sessionData.serverTransferNumber @@ -571,105 +396,33 @@ export class Stage3ClientService extends SATPService { this.Log.info(`${fnTag}, CommitReadyResponseMessage passed all checks.`); } - checkCommitFinalAcknowledgementReceiptResponseMessage( + async checkCommitFinalAcknowledgementReceiptResponseMessage( response: CommitFinalAcknowledgementReceiptResponseMessage, session: SATPSession, - ): void { + ): Promise { const stepTag = `checkCommitFinalAcknowledgementReceiptResponseMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, CommitFinalAcknowledgementReceipt...`); if (session == undefined) { - throw SessionUndefined(fnTag); - } - - const sessionData = session.getClientSessionData(); - - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (response.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } - - if (response.common.version != SATP_VERSION) { - throw SATPVersionUnsupported( - fnTag, - response.common.version, - SATP_VERSION, - ); - } - - if (response.common.messageType != MessageType.ACK_COMMIT_FINAL) { - throw MessageTypeMissMatch( - fnTag, - response.common.messageType.toString(), - MessageType.ACK_COMMIT_FINAL.toString(), - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - response.common.sequenceNumber - ) { - throw SequenceNumberMissMatch( - fnTag, - response.common.sequenceNumber, - sessionData.lastSequenceNumber + BigInt(1), - ); + throw new SessionError(fnTag); } - if ( - response.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.COMMIT_FINAL) - ) { - throw HashMissMatch( - fnTag, - response.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.COMMIT_FINAL), - ); - } - - if ( - sessionData.clientGatewayPubkey != response.common.clientGatewayPubkey - ) { - throw MissingClientGatewayPubkey(fnTag); - } + session.verify(fnTag, SessionType.CLIENT); - if ( - sessionData.serverGatewayPubkey != response.common.serverGatewayPubkey - ) { - throw MissingServerGatewayPubkey(fnTag); - } + const sessionData = session.getClientSessionData(); - if ( - !verifySignature( - this.Signer, - response, - response.common.serverGatewayPubkey, - ) - ) { - throw SignatureVerificationFailed(fnTag); - } + commonBodyVerifier( + fnTag, + response.common, + sessionData, + MessageType.ACK_COMMIT_FINAL, + ); - if ( - sessionData.transferContextId != undefined && - response.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - response.common.transferContextId, - sessionData.transferContextId, - ); - } + signatureVerifier(fnTag, this.Signer, response, sessionData); if (response.assignmentAssertionClaim == undefined) { - throw MissingAssignmentAssertionClaim(fnTag); + throw new AssignmentAssertionClaimError(fnTag); } sessionData.assignmentAssertionClaim = response.assignmentAssertionClaim; @@ -683,7 +436,7 @@ export class Stage3ClientService extends SATPService { } if ( - sessionData.serverTransferNumber != undefined && + sessionData.serverTransferNumber != "" && response.serverTransferNumber != sessionData.serverTransferNumber ) { // This does not throw an error because the serverTransferNumber is only meaningful to the server. @@ -704,10 +457,15 @@ export class Stage3ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, Burning Asset...`); - const sessionData = session.getClientSessionData(); - if (sessionData == undefined) { - throw new Error(`${fnTag}, Session data is missing`); + + if (session == undefined) { + throw new SessionError(fnTag); } + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountFromOriginator; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts new file mode 100644 index 0000000000..c82bfe7438 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts @@ -0,0 +1,140 @@ +import { JsObjectSigner } from "@hyperledger/cactus-common"; +import { verifySignature } from "../../gateway-utils"; +import { + CommonSatp, + MessageType, +} from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SATP_VERSION } from "../constants"; +import { + ClientGatewayPubkeyError, + HashError, + MessageTypeError, + ResourceUrlError, + SatpCommonBodyError, + SATPVersionError, + SequenceNumberError, + ServerGatewayPubkeyError, + SessionDataNotLoadedCorrectlyError, + SignatureMissingError, + SignatureVerificationError, + TransferContextIdError, +} from "../errors/satp-service-errors"; +import { getMessageHash, getPreviousMessageType } from "../session-utils"; + +export function commonBodyVerifier( + tag: string, + common: CommonSatp | undefined, + sessionData: SessionData | undefined, + messageStage: MessageType, + messageStage2?: MessageType, // this is only used in stage 1 when the message received can be either or 2 types +): void { + if (sessionData == undefined) { + throw new SessionDataNotLoadedCorrectlyError(tag, "undefined"); + } + + if (common == undefined) { + throw new SatpCommonBodyError(tag, "undefined"); + } + + if ( + common.version == "" || + common.messageType == undefined || + common.sessionId == "" || + common.sequenceNumber == undefined || + common.resourceUrl == "" || + common.clientGatewayPubkey == "" || + common.serverGatewayPubkey == "" || + (common.hashPreviousMessage == "" && + messageStage != MessageType.INIT_PROPOSAL) + ) { + throw new SatpCommonBodyError(tag, JSON.stringify(common)); + } + + if (common.version != SATP_VERSION) { + throw new SATPVersionError(tag, common.version, SATP_VERSION); + } + + if (common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { + throw new ServerGatewayPubkeyError(tag); + } + + if (common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { + throw new ClientGatewayPubkeyError(tag); + } + + if (common.sequenceNumber != sessionData.lastSequenceNumber + BigInt(1)) { + throw new SequenceNumberError( + tag, + common.sequenceNumber, + sessionData.lastSequenceNumber, + ); + } + + if (common.transferContextId != sessionData.transferContextId) { + throw new TransferContextIdError( + tag, + common.transferContextId, + sessionData.transferContextId, + ); + } + + if (common.resourceUrl != sessionData.resourceUrl) { + throw new ResourceUrlError(tag); + } + + if ( + common.messageType != messageStage && + common.messageType != messageStage2 + ) { + throw new MessageTypeError( + tag, + common.messageType.toString(), + messageStage.toString(), + ); + } + + if ( + common.hashPreviousMessage != + getMessageHash( + sessionData, + getPreviousMessageType(sessionData, messageStage), + ) + ) { + throw new HashError( + tag, + common.hashPreviousMessage, + getMessageHash( + sessionData, + getPreviousMessageType(sessionData, messageStage), + ), + ); + } +} + +export function signatureVerifier( + tag: string, + signer: JsObjectSigner, + message: any, + sessionData: SessionData | undefined, +) { + if (sessionData == undefined) { + throw new SessionDataNotLoadedCorrectlyError(tag, "undefined"); + } + + if (message.serverSignature != "") { + if ( + !verifySignature(signer, message, sessionData?.serverGatewayPubkey || "") + ) { + throw new SignatureVerificationError(tag); + } + } else if (message.clientSignature != "") { + if ( + !verifySignature(signer, message, sessionData?.clientGatewayPubkey || "") + ) { + throw new SignatureVerificationError(tag); + } + } else { + throw new SignatureMissingError(tag); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts deleted file mode 100644 index da52363ef3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/errors.ts +++ /dev/null @@ -1,117 +0,0 @@ -export function MissingSatpCommonBody(fnTag: string): Error { - return new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); -} - -export function SessionUndefined(fnTag: string): Error { - return new Error(`${fnTag}, session undefined`); -} - -export function SessionDataNotLoadedCorrectly(fnTag: string): Error { - return new Error(`${fnTag}, session data was not load correctly`); -} - -export function SATPVersionUnsupported( - fnTag: string, - unsupported: string, - supported: string, -): Error { - return new Error( - `${fnTag}, unsupported SATP version \n received: ${unsupported}, supported: ${supported}`, - ); -} - -export function SignatureVerificationFailed(fnTag: string): Error { - return new Error(`${fnTag}, message signature verification failed`); -} - -export function MessageTypeMissMatch( - fnTag: string, - received: string, - expected: string, -): Error { - return new Error( - `${fnTag}, message type miss match \n received: ${received} \n expected: ${expected}`, - ); -} - -export function MissingTransferInitClaims(fnTag: string): Error { - return new Error(`${fnTag}, transferInitClaims missing or missmatch`); -} - -export function MissingNetworkCapabilities(fnTag: string): Error { - return new Error( - `${fnTag}, message does not contain network capabilities and parameters`, - ); -} - -export function DLTNotSupported(fnTag: string, dlt: string): Error { - return new Error(`${fnTag}, DLT not supported \n received: ${dlt}`); -} - -export function MissingServerGatewayPubkey(fnTag: string): Error { - return new Error(`${fnTag}, serverGatewayPubkey missing or missmatch`); -} - -export function MissingClientGatewayPubkey(fnTag: string): Error { - return new Error(`${fnTag}, clientGatewayPubkey missing or missmatch`); -} - -export function SequenceNumberMissMatch( - fnTag: string, - received: bigint, - expected: bigint, -): Error { - return new Error( - `${fnTag}, sequence number missmatch \n received: ${received} \n expected: ${expected}`, - ); -} - -export function HashMissMatch( - fnTag: string, - received: string, - expected: string, -): Error { - return new Error( - `${fnTag}, hash missmatch \n received: ${received} \n expected: ${expected}`, - ); -} - -export function TransferContextIdMissMatch( - fnTag: string, - received: string, - expected: string, -): Error { - return new Error( - `${fnTag}, transferContextId missing or missmatch \n received: ${received} \n expected: ${expected}`, - ); -} - -export function MissingBridgeManager(fnTag: string): Error { - return new Error(`${fnTag}, bridge manager missing`); -} - -export function MissingLockAssertionClaim(fnTag: string): Error { - return new Error(`${fnTag}, lockAssertionClaim missing`); -} - -export function MissingLockAssertionClaimFormat(fnTag: string): Error { - return new Error(`${fnTag}, lockAssertionClaimFormat missing`); -} - -export function MissingLockAssertionExpiration(fnTag: string): Error { - return new Error(`${fnTag}, lockAssertionExpiration missing`); -} - -export function MissingBurnAssertionClaim(fnTag: string): Error { - return new Error(`${fnTag}, burnAssertionClaim missing`); -} - -export function MissingMintAssertionClaim(fnTag: string): Error { - return new Error(`${fnTag}, mintAssertionClaim missing`); -} - -export function MissingAssignmentAssertionClaim(fnTag: string): Error { - return new Error(`${fnTag}, assignmentAssertionClaim missing`); -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts index d7f79203e5..a6bb0b2902 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts @@ -21,6 +21,8 @@ import { import { InteractionsRequest } from "../../../generated/SATPWrapperContract"; import { getInteractionType } from "./types/asset"; import { InteractionData } from "./types/interact"; +import { OntologyError } from "../../errors/bridge-erros"; +import { TransactionError } from "fabric-network"; interface BesuResponse { success: boolean; @@ -53,14 +55,13 @@ export class BesuBridge implements NetworkBridge { } public async wrapAsset(asset: BesuAsset): Promise { + const fnTag = `${BesuBridge.CLASS_NAME}}#wrapAsset`; this.log.debug( - `${BesuBridge.CLASS_NAME}#wrapAsset Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.contractAddress}, ${asset.tokenType}}`, + `${fnTag}, Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.contractAddress}, ${asset.tokenType}}`, ); if (asset.ontology === undefined) { - throw new Error( - `${BesuBridge.CLASS_NAME}#wrapAsset: Ontology is required to interact with tokens`, - ); + throw new OntologyError(fnTag); } const interactions = this.interactionList(asset.ontology); @@ -82,7 +83,7 @@ export class BesuBridge implements NetworkBridge { })) as BesuResponse; if (!response.success) { - throw new Error(`${BesuBridge.CLASS_NAME}#wrapAsset:Transaction failed`); + throw new TransactionError(fnTag); } return { @@ -91,9 +92,8 @@ export class BesuBridge implements NetworkBridge { }; } public async unwrapAsset(assetId: string): Promise { - this.log.debug( - `${BesuBridge.CLASS_NAME}#UnwrapAsset Unwrapping Asset: ${assetId}`, - ); + const fnTag = `${BesuBridge.CLASS_NAME}}#unwrapAsset`; + this.log.debug(`${fnTag}, Unwrapping Asset: ${assetId}`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -104,9 +104,7 @@ export class BesuBridge implements NetworkBridge { gas: this.config.gas, })) as BesuResponse; if (!response.success) { - throw new Error( - `${BesuBridge.CLASS_NAME}#unwrapAsset:Transaction failed`, - ); + throw new TransactionError(fnTag); } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", @@ -117,9 +115,8 @@ export class BesuBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug( - `${BesuBridge.CLASS_NAME}#lockAsset Locking Asset: ${assetId} amount: ${amount}`, - ); + const fnTag = `${BesuBridge.CLASS_NAME}}#lockAsset`; + this.log.debug(`${fnTag}, Locking Asset: ${assetId} amount: ${amount}`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -130,7 +127,7 @@ export class BesuBridge implements NetworkBridge { gas: this.config.gas, })) as BesuResponse; if (!response.success) { - throw new Error(`${BesuBridge.CLASS_NAME}#lockAsset:Transaction failed}`); + throw new TransactionError(fnTag); } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", @@ -141,9 +138,8 @@ export class BesuBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug( - `${BesuBridge.CLASS_NAME}#unlockAsset Unlocking Asset: ${assetId} amount: ${amount}`, - ); + const fnTag = `${BesuBridge.CLASS_NAME}}#unlockAsset`; + this.log.debug(`${fnTag}, Unlocking Asset: ${assetId} amount: ${amount}`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -154,9 +150,7 @@ export class BesuBridge implements NetworkBridge { gas: this.config.gas, })) as BesuResponse; if (!response.success) { - throw new Error( - `${BesuBridge.CLASS_NAME}#unlockAsset:Transaction failed}`, - ); + throw new TransactionError(fnTag); } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", @@ -167,9 +161,8 @@ export class BesuBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug( - `${BesuBridge.CLASS_NAME}#mintAsset Minting Asset: ${assetId} amount: ${amount}`, - ); + const fnTag = `${BesuBridge.CLASS_NAME}}#mintAsset`; + this.log.debug(`${fnTag}, Minting Asset: ${assetId} amount: ${amount}`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -180,7 +173,7 @@ export class BesuBridge implements NetworkBridge { gas: this.config.gas, })) as BesuResponse; if (!response.success) { - throw new Error(`${BesuBridge.CLASS_NAME}#mintAsset:Transaction failed}`); + throw new TransactionError(fnTag); } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", @@ -191,9 +184,8 @@ export class BesuBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug( - `${BesuBridge.CLASS_NAME}#burnAsset Burning Asset: ${assetId} amount: ${amount}`, - ); + const fnTag = `${BesuBridge.CLASS_NAME}}#burnAsset`; + this.log.debug(`${fnTag}, Burning Asset: ${assetId} amount: ${amount}`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -204,7 +196,7 @@ export class BesuBridge implements NetworkBridge { gas: this.config.gas, })) as BesuResponse; if (!response.success) { - throw new Error(`${BesuBridge.CLASS_NAME}#burnAsset:Transaction failed}`); + throw new TransactionError(fnTag); } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", @@ -216,8 +208,9 @@ export class BesuBridge implements NetworkBridge { to: string, amount: number, ): Promise { + const fnTag = `${BesuBridge.CLASS_NAME}}#assignAsset`; this.log.debug( - `${BesuBridge.CLASS_NAME}#assignAsset Assigning Asset: ${assetId} amount: ${amount} to: ${to}`, + `${fnTag}, Assigning Asset: ${assetId} amount: ${amount} to: ${to}`, ); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, @@ -229,9 +222,7 @@ export class BesuBridge implements NetworkBridge { gas: this.config.gas, })) as BesuResponse; if (!response.success) { - throw new Error( - `${BesuBridge.CLASS_NAME}#assignAsset:Transaction failed}`, - ); + throw new TransactionError(fnTag); } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", @@ -240,7 +231,8 @@ export class BesuBridge implements NetworkBridge { } public async getAssets(): Promise { - this.log.debug(`${BesuBridge.CLASS_NAME}#getAssets Getting Assets`); + const fnTag = `${BesuBridge.CLASS_NAME}}#getAssets`; + this.log.debug(`${fnTag}, Getting Assets`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -252,14 +244,15 @@ export class BesuBridge implements NetworkBridge { })) as BesuResponse; if (!response.success) { - throw new Error(`${BesuBridge.CLASS_NAME}#getAssets: Transaction failed`); + throw new TransactionError(fnTag); } return response.callOutput as string[]; } public async getAsset(assetId: string): Promise { - this.log.debug(`${BesuBridge.CLASS_NAME}#getAsset Getting Asset`); + const fnTag = `${BesuBridge.CLASS_NAME}}#getAsset`; + this.log.debug(`${fnTag}, Getting Asset`); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -271,7 +264,7 @@ export class BesuBridge implements NetworkBridge { })) as BesuResponse; if (!response.success) { - throw new Error(`${BesuBridge.CLASS_NAME}#getAsset: Transaction failed`); + throw new TransactionError(fnTag); } return response.callOutput as BesuAsset; @@ -286,7 +279,10 @@ export class BesuBridge implements NetworkBridge { params: string[], invocationType: EthContractInvocationType, ): Promise { - this.log.debug(`Running Transaction: ${methodName}`); + const fnTag = `${BesuBridge.CLASS_NAME}}#runTransaction`; + this.log.debug( + `${fnTag}, Running Transaction: ${methodName} with params: ${params}`, + ); const response = (await this.connector.invokeContract({ contractName: this.config.contractName, keychainId: this.config.keychainId, @@ -298,9 +294,7 @@ export class BesuBridge implements NetworkBridge { })) as BesuResponse; if (!response.success) { - throw new Error( - `${BesuBridge.CLASS_NAME}#runTransaction:Transaction failed}`, - ); + throw new TransactionError(fnTag); } return { @@ -314,8 +308,9 @@ export class BesuBridge implements NetworkBridge { assetId: string, transactionHash: string, ): Promise { + const fnTag = `${BesuBridge.CLASS_NAME}}#getReceipt`; this.log.debug( - `Getting Receipt: ${assetId} transactionHash: ${transactionHash}`, + `${fnTag}, Getting Receipt: ${assetId} transactionHash: ${transactionHash}`, ); //todo needs implementation const networkDetails = { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts index 6762fea50a..f4e8046135 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts @@ -20,6 +20,7 @@ import { NetworkBridge } from "./network-bridge"; import { InteractionSignature } from "./types/fabric-asset"; import { InteractionData } from "./types/interact"; import { getInteractionType } from "./types/asset"; +import { OntologyError, TransactionError } from "../../errors/bridge-erros"; export class FabricBridge implements NetworkBridge { public static readonly CLASS_NAME = "FabricBridge"; @@ -46,12 +47,12 @@ export class FabricBridge implements NetworkBridge { }); } public async wrapAsset(asset: FabricAsset): Promise { - this.log.debug(`Wrapping Asset: ${asset.tokenId}`); - + const fnTag = `${FabricBridge.CLASS_NAME}}#wrapAsset`; + this.log.debug( + `${fnTag}, Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.tokenType}}`, + ); if (asset.ontology === undefined) { - throw new Error( - `${FabricBridge.CLASS_NAME}#wrapAsset: Ontology is required to interact with tokens`, - ); + throw new OntologyError(fnTag); } const interactions = this.interactionList(asset.ontology); @@ -73,13 +74,18 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, }; } public async unwrapAsset(assetId: string): Promise { - this.log.debug(`Unwrapping Asset: ${assetId}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#unwrapAsset`; + this.log.debug(`${fnTag}, Unwrapping Asset: ${assetId}`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -89,6 +95,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, @@ -98,7 +108,8 @@ export class FabricBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug(`Locking Asset: ${assetId} amount: ${amount}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#lockAsset`; + this.log.debug(`${fnTag}, Locking Asset: ${assetId} amount: ${amount}`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -108,6 +119,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, @@ -117,7 +132,8 @@ export class FabricBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug(`Unlocking Asset: ${assetId} amount: ${amount}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#unlockAsset`; + this.log.debug(`${fnTag}, Unlocking Asset: ${assetId} amount: ${amount}`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -127,6 +143,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, @@ -136,7 +156,8 @@ export class FabricBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug(`Minting Asset: ${assetId} amount: ${amount}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#mintAsset`; + this.log.debug(`${fnTag}, Minting Asset: ${assetId} amount: ${amount}`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -146,6 +167,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, @@ -155,7 +180,8 @@ export class FabricBridge implements NetworkBridge { assetId: string, amount: number, ): Promise { - this.log.debug(`Burning Asset: ${assetId} amount: ${amount}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#burnAsset`; + this.log.debug(`${fnTag}, Burning Asset: ${assetId} amount: ${amount}`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -165,6 +191,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, @@ -175,7 +205,10 @@ export class FabricBridge implements NetworkBridge { to: string, amount: number, ): Promise { - this.log.debug(`Assigning Asset: ${assetId} to: ${to} amount: ${amount}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#assignAsset`; + this.log.debug( + `${fnTag}, Assigning Asset: ${assetId} amount: ${amount} to: ${to}`, + ); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -185,6 +218,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, output: response.functionOutput, @@ -192,7 +229,8 @@ export class FabricBridge implements NetworkBridge { } public async getAsset(assetId: string): Promise { - this.log.debug(`Getting Asset: ${assetId}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#getAsset`; + this.log.debug(`${fnTag}, Getting Asset`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -202,13 +240,18 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Call, }); + if (response == undefined) { + throw new TransactionError(fnTag); + } + const token = JSON.parse(response.functionOutput) as FabricAsset; return token; } public async getClientId(): Promise { - this.log.debug(`Getting Client Id`); + const fnTag = `${FabricBridge.CLASS_NAME}}#getClientId`; + this.log.debug(`${fnTag}, Getting Client Id`); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -218,6 +261,10 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Call, }); + if (response == undefined) { + throw new TransactionError(fnTag); + } + return response.functionOutput; } @@ -229,7 +276,10 @@ export class FabricBridge implements NetworkBridge { methodName: string, params: string[], ): Promise { - this.log.debug(`Running Transaction: ${methodName} with params: ${params}`); + const fnTag = `${FabricBridge.CLASS_NAME}}#runTransaction`; + this.log.debug( + `${fnTag}, Running Transaction: ${methodName} with params: ${params}`, + ); const response = await this.connector.transact({ signingCredential: this.config.signingCredential, channelName: this.config.channelName, @@ -239,9 +289,12 @@ export class FabricBridge implements NetworkBridge { invocationType: FabricContractInvocationType.Send, }); + if (response == undefined || response.transactionId == "") { + throw new TransactionError(fnTag); + } + return { transactionId: response.transactionId, - transactionReceipt: "response.transactionReceipt", output: response.functionOutput, }; } @@ -250,8 +303,9 @@ export class FabricBridge implements NetworkBridge { assetId: string, transactionId: string, ): Promise { + const fnTag = `${FabricBridge.CLASS_NAME}}#getReceipt`; this.log.debug( - `Getting Receipt for Asset: ${assetId} Transaction: ${transactionId}`, + `${fnTag}, Getting Receipt: ${assetId} transactionHash: ${transactionId}`, ); //todo needs implementation const networkDetails = { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts index 1e4f9daefd..c582714c88 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -4,6 +4,7 @@ import { BridgeManager } from "./bridge-manager"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPBridgeConfig } from "../../types"; import { Asset } from "./types/asset"; +import { TransactionIdUndefinedError } from "../../errors/bridge-erros"; export class SATPBridgeManager implements BridgeManager { public static readonly CLASS_NAME = "FabricBridgeManager"; @@ -25,7 +26,7 @@ export class SATPBridgeManager implements BridgeManager { const response = await this.config.network.wrapAsset(asset); if (response.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = this.config.network.getReceipt( @@ -43,7 +44,7 @@ export class SATPBridgeManager implements BridgeManager { const response = await this.config.network.unwrapAsset(assetId); if (response.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = this.config.network.getReceipt( @@ -66,7 +67,7 @@ export class SATPBridgeManager implements BridgeManager { const response = await this.config.network.lockAsset(assetId, amount); if (response.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = await this.config.network.getReceipt( @@ -85,7 +86,7 @@ export class SATPBridgeManager implements BridgeManager { const response = await this.config.network.unlockAsset(assetId, amount); if (response.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = await this.config.network.getReceipt( @@ -104,7 +105,7 @@ export class SATPBridgeManager implements BridgeManager { const transaction = await this.config.network.mintAsset(assetId, amount); if (transaction.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = await this.config.network.getReceipt( @@ -123,7 +124,7 @@ export class SATPBridgeManager implements BridgeManager { const transaction = await this.config.network.burnAsset(assetId, amount); if (transaction.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = await this.config.network.getReceipt( @@ -150,7 +151,7 @@ export class SATPBridgeManager implements BridgeManager { ); if (response.transactionId == undefined) { - throw new Error(`${fnTag}, transactionId is undefined`); + throw new TransactionIdUndefinedError(fnTag); } const receipt = await this.config.network.getReceipt( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts index 747d10760c..a1304df153 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -1,30 +1,4 @@ -import { - PreTransferCommenceRequestMessage, - PreTransferCommenceResponseMessage, - PreTransferVerificationAndContextEstablishmentRequest, - PreTransferVerificationAndContextEstablishmentResponse, -} from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; -import { - MessageType, - CommonSatp, -} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { SATP_VERSION } from "../../constants"; -import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; -import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { - TimestampType, - getMessageHash, - getMessageTimestamp, - saveHash, - saveSignature, -} from "../../session-utils"; -import { SATPSession } from "../../../core/satp-session"; +import { Token } from "../../../public-api"; import { SATPService, SATPServiceType, @@ -50,386 +24,12 @@ export class Stage0ServerService extends SATPService { super(commonOptions); } - async preTransferProposalResponse( - request: PreTransferVerificationAndContextEstablishmentRequest, - session: SATPSession | undefined, - ): Promise { - const stepTag = `transferProposalResponse()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - - if (request.context == undefined || request.transferClaims == undefined) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - - if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); - } - const sessionData = session.getServerSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.context.sessionId}`, - ); - } - - // saveSignature( - // sessionData, - // MessageType.PRE_INIT_PROPOSAL, - // request.context.signature, - // ); - - sessionData.sourceLedgerAssetId = - request.transferClaims.verifiedOriginatorEntityId; - sessionData.recipientLedgerAssetId = - request.transferClaims.verifiedBeneficiaryEntityId; // todo shouldn't be the server to create this id? - - sessionData.hashTransferInitClaims = getHash(request.transferClaims); - - saveHash(sessionData, MessageType.PRE_INIT_PROPOSAL, getHash(request)); - - sessionData.lastSequenceNumber = request.context.sequenceNumber + BigInt(1); - - const commonBody = new CommonSatp(); - commonBody.version = sessionData.version; - - commonBody.sessionId = sessionData.id; - commonBody.sequenceNumber = request.context.sequenceNumber + BigInt(1); - commonBody.resourceUrl = request.context.resourceUrl; - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.PRE_INIT_PROPOSAL, - ); - - const preTransferProposalReceiptMessage = - new PreTransferVerificationAndContextEstablishmentResponse(); - preTransferProposalReceiptMessage.context = commonBody; - preTransferProposalReceiptMessage.hashPreTransferVerificationAndContext = - sessionData.hashTransferInitClaims; - preTransferProposalReceiptMessage.timestamp = getMessageTimestamp( - sessionData, - MessageType.PRE_INIT_PROPOSAL, - TimestampType.RECEIVED, - ); - - const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(preTransferProposalReceiptMessage)), - ); - - // preTransferProposalReceiptMessage.context.signature = messageSignature; - - saveSignature(sessionData, commonBody.messageType, messageSignature); - - saveHash( - sessionData, - commonBody.messageType, - getHash(preTransferProposalReceiptMessage), - ); - - // TODO: store logs in the database using session ID; refactor storelog not to need gateway as input - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "transferProposalResponse", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - this.Log.info( - `${fnTag}, sending PreTransferVerificationAndContextEstablishmentResponse...`, - ); - - return preTransferProposalReceiptMessage; - } - - async transferCommenceResponse( - request: PreTransferCommenceRequestMessage, - session: SATPSession | undefined, - ): Promise { - const stepTag = `transferCommenceResponse()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - - if (request.common == undefined) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - - if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); - } - const sessionData = session.getServerSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not loaded correctly ${request.common.sessionId}`, - ); - } - - saveHash( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - getHash(request), - ); - - const commonBody = new CommonSatp(); - commonBody.version = sessionData.version; - commonBody.messageType = MessageType.PRE_TRANSFER_COMMENCE_RESPONSE; - commonBody.sequenceNumber = sessionData.lastSequenceNumber + BigInt(1); - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.TRANSFER_COMMENCE_REQUEST, - ); - - commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; - commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; - commonBody.sessionId = sessionData.id; - - const preTransferCommenceResponseMessage = - new PreTransferCommenceResponseMessage(); - preTransferCommenceResponseMessage.common = commonBody; - - sessionData.lastSequenceNumber = commonBody.sequenceNumber; - - const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(preTransferCommenceResponseMessage)), - ); - - // preTransferCommenceResponseMessage.common.signature = messageSignature; - - saveSignature( - sessionData, - MessageType.PRE_TRANSFER_COMMENCE_RESPONSE, - messageSignature, - ); - - saveHash( - sessionData, - MessageType.PRE_TRANSFER_COMMENCE_RESPONSE, - getHash(preTransferCommenceResponseMessage), - ); - - /* - await storeLog(gateway, { - sessionID: sessionData.id, - type: "transferCommenceResponse", - operation: "lock", - data: JSON.stringify(sessionData), - }); - */ - - this.Log.info(`${fnTag}, sending PreTransferCommenceResponseMessage...`); - - return preTransferCommenceResponseMessage; - } - - async checkPreTransferProposalRequestMessage( - request: PreTransferVerificationAndContextEstablishmentRequest, - session: SATPSession | undefined, - //supportedDLTs: SupportedChain[], - ): Promise { - const stepTag = `checkTransferProposalRequestMessage()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - - // todo use session; - session; - - if ( - request.context == undefined || - request.context.version == undefined || - request.context.messageType == undefined || - request.context.sessionId == undefined || - // request.context.transferContextId == undefined || - request.context.sequenceNumber == undefined || - request.context.resourceUrl == undefined || - // request.context.actionResponse == undefined || - // request.context.payloadProfile == undefined || - // request.context.applicationProfile == undefined || - // request.context.signature == undefined || - request.context.clientGatewayPubkey == undefined || - request.context.serverGatewayPubkey == undefined - ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - - if (request.context.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - - if ( - !verifySignature( - this.Signer, - request.context, - request.context.clientGatewayPubkey, - ) - ) { - throw new Error( - `${fnTag}, TransferProposalRequest message signature verification failed`, - ); - } - - if (request.context.messageType != MessageType.INIT_PROPOSAL) { - throw new Error( - `${fnTag}, wrong message type for TransferProposalRequest`, - ); - } - - if (request.transferClaims == undefined) { - throw new Error( - `${fnTag}, TransferProposalRequest message does not contain transfer initialization claims`, - ); - } - - // const senderId = request.transferClaims - // .senderGatewayNetworkId as SupportedChain; - - this.Log.info(`TransferProposalRequest passed all checks.`); - - if (!this.checkTransferClaims(request.transferClaims)) { - throw new Error(); - } - return true; - } - - async checkTransferCommenceRequestMessage( - request: PreTransferCommenceRequestMessage, - session: SATPSession | undefined, - ): Promise { - const stepTag = `checkTransferCommenceRequestMessage()`; - const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - - if ( - request.common == undefined || - request.common.version == undefined || - request.common.messageType == undefined || - request.common.sessionId == undefined || - // request.common.transferContextId == undefined || - request.common.sequenceNumber == undefined || - request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || - // request.common.signature == undefined || - request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined - ) { - throw new Error( - `${fnTag}, message satp common body is missing or is missing required fields`, - ); - } - - if (request.common.version != SATP_VERSION) { - throw new Error(`${fnTag}, unsupported SATP version`); - } - - if (session == undefined) { - throw new Error(`${fnTag}, session is undefined`); - } - const sessionData = session.getServerSessionData(); - - if (sessionData == undefined) { - throw new Error( - `${fnTag}, session data not found for session id ${request.common.sessionId}`, - ); - } - - if ( - sessionData.serverGatewayPubkey == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferProposalReceiptMessageHash == - undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw new Error(`${fnTag}, session data was not load correctly`); - } - - if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest serverIdentity public key does not match the one that was sent`, - ); - } - - if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { - throw new Error( - `${fnTag}, TransferCommenceRequest clientIdentity public key does not match the one that was sent`, - ); - } - - if ( - !verifySignature( - this.Signer, - request.common, - request.common.clientGatewayPubkey, - ) - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message signature verification failed`, - ); - } - - if (request.common.messageType != MessageType.TRANSFER_COMMENCE_REQUEST) { - throw new Error( - `${fnTag}, wrong message type for TransferCommenceRequest`, - ); - } - - if ( - request.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest Message sequence number is wrong`, - ); - } - - if ( - request.common.hashPreviousMessage != - sessionData.hashes.stage1.transferProposalReceiptMessageHash - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest previous message hash does not match the one that was sent`, - ); - } - - if ( - request.hashPreTransferVerificationAndContext == undefined || - request.hashPreTransferVerificationAndContext != - sessionData.hashTransferInitClaims - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message does not contain transfer claims`, - ); - } - - if ( - !verifySignature(this.Signer, request, sessionData.clientGatewayPubkey) - ) { - throw new Error( - `${fnTag}, TransferCommenceRequest message signature verification failed`, - ); - } - - this.Log.info(`TransferCommenceRequest passed all checks.`); - return sessionData; - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - private checkTransferClaims(transferClaims: TransferClaims): boolean { + public async getPubKey(): Promise { //todo - return true; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - private counterProposalTransferClaims( - oldClaims: TransferClaims, - ): TransferClaims { + public async wrapToken(token: Token) { //todo - return oldClaims; + return token; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index f6ac52e937..f5fd51fb1b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -7,21 +7,18 @@ import { import { MessageType, CommonSatp, + NetworkCapabilities, + SignatureAlgorithm, + LockType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; // eslint-disable-next-line prettier/prettier import { ACCEPTANCE, - SessionData, } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { SATP_VERSION } from "../../constants"; -import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { + SessionType, TimestampType, getMessageHash, getMessageTimestamp, @@ -36,22 +33,14 @@ import { ISATPServerServiceOptions, ISATPServiceOptions, } from "../satp-service"; +import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { - DLTNotSupported, - HashMissMatch, - MessageTypeMissMatch, - MissingClientGatewayPubkey, - MissingNetworkCapabilities, - MissingSatpCommonBody, - MissingServerGatewayPubkey, - MissingTransferInitClaims, - SATPVersionUnsupported, - SequenceNumberMissMatch, - SessionDataNotLoadedCorrectly, - SessionUndefined, - SignatureVerificationFailed, - TransferContextIdMissMatch, -} from "../errors"; + DLTNotSupportedError, + NetworkCapabilitiesError, + SessionError, + TransferInitClaimsError, + TransferInitClaimsHashError, +} from "../../errors/satp-service-errors"; export class Stage1ServerService extends SATPService { public static readonly SATP_STAGE = "1"; public static readonly SERVICE_TYPE = SATPServiceType.Server; @@ -72,33 +61,24 @@ export class Stage1ServerService extends SATPService { async transferProposalResponse( request: TransferProposalRequestMessage, - session: SATPSession | undefined, + session: SATPSession, ): Promise { const stepTag = `transferProposalResponse()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferProposalResponse...`); - if ( - request.common == undefined || - request.transferInitClaims == undefined || - request.networkCapabilities == undefined - ) { - throw MissingSatpCommonBody(fnTag); - } - if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + session.verify(fnTag, SessionType.SERVER); + + const sessionData = session.getServerSessionData(); sessionData.sourceLedgerAssetId = - request.transferInitClaims.verifiedOriginatorEntityId; + request.transferInitClaims!.verifiedOriginatorEntityId; sessionData.recipientLedgerAssetId = - request.transferInitClaims.verifiedBeneficiaryEntityId; // todo shouldn't be the server to create this id? + request.transferInitClaims!.verifiedBeneficiaryEntityId; // todo shouldn't be the server to create this id? sessionData.hashTransferInitClaims = getHash(request.transferInitClaims); @@ -107,11 +87,11 @@ export class Stage1ServerService extends SATPService { commonBody.sessionId = sessionData.id; sessionData.lastSequenceNumber = commonBody.sequenceNumber = - request.common.sequenceNumber + BigInt(1); - commonBody.resourceUrl = request.common.resourceUrl; + request.common!.sequenceNumber + BigInt(1); commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; commonBody.transferContextId = sessionData.transferContextId; + commonBody.resourceUrl = sessionData.resourceUrl; commonBody.hashPreviousMessage = getMessageHash( sessionData, @@ -119,38 +99,28 @@ export class Stage1ServerService extends SATPService { ); const transferProposalReceiptMessage = new TransferProposalReceiptMessage(); - transferProposalReceiptMessage.common = commonBody; - transferProposalReceiptMessage.hashTransferInitClaims = - sessionData.hashTransferInitClaims; - transferProposalReceiptMessage.timestamp = getMessageTimestamp( - sessionData, - MessageType.INIT_PROPOSAL, - TimestampType.RECEIVED, - ); - - //TODO implement reject - /* - if (reject) { + if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_REJECTED) { + transferProposalReceiptMessage.common = commonBody; commonBody.messageType = MessageType.INIT_REJECT; - const counterProposalTransferClaims = this.counterProposalTransferClaims( - request.transferInitClaims, + transferProposalReceiptMessage.timestamp = getMessageTimestamp( + sessionData, + MessageType.INIT_REJECT, + TimestampType.RECEIVED, ); - - if (!counterProposalTransferClaims) { - this.Log.info(`${fnTag}, ProposalTransferClaims were rejected...`); - sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; - } else { - sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_CONDITIONAL; - transferProposalReceiptMessage.transferCounterClaims = - counterProposalTransferClaims; - } } else { - commonBody.messageType = MessageType.INIT_RECEIPT; sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; + transferProposalReceiptMessage.common = commonBody; + transferProposalReceiptMessage.hashTransferInitClaims = + sessionData.hashTransferInitClaims; + commonBody.messageType = MessageType.INIT_RECEIPT; + transferProposalReceiptMessage.timestamp = getMessageTimestamp( + sessionData, + MessageType.INIT_PROPOSAL, + TimestampType.RECEIVED, + ); } - */ - commonBody.messageType = MessageType.INIT_RECEIPT; - sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; + + //TODO implement conditional reject const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferProposalReceiptMessage)), @@ -182,30 +152,25 @@ export class Stage1ServerService extends SATPService { async transferCommenceResponse( request: TransferCommenceRequestMessage, - session: SATPSession | undefined, + session: SATPSession, ): Promise { const stepTag = `transferCommenceResponse()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferCommenceResponse...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + session.verify(fnTag, SessionType.SERVER); - if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getServerSessionData(); const commonBody = new CommonSatp(); commonBody.version = sessionData.version; commonBody.messageType = MessageType.TRANSFER_COMMENCE_RESPONSE; sessionData.lastSequenceNumber = commonBody.sequenceNumber = - request.common.sequenceNumber + BigInt(1); + request.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.TRANSFER_COMMENCE_REQUEST, @@ -214,8 +179,8 @@ export class Stage1ServerService extends SATPService { commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; commonBody.sessionId = sessionData.id; - commonBody.resourceUrl = request.common.resourceUrl; commonBody.transferContextId = sessionData.transferContextId; + commonBody.resourceUrl = sessionData.resourceUrl; const transferCommenceResponseMessage = new TransferCommenceResponseMessage(); @@ -255,104 +220,75 @@ export class Stage1ServerService extends SATPService { async checkTransferProposalRequestMessage( request: TransferProposalRequestMessage, - session: SATPSession | undefined, + session: SATPSession, supportedDLTs: SupportedChain[], - ): Promise { + ): Promise { const stepTag = `checkTransferProposalRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkTransferProposalRequestMessage...`); - if (session == undefined) { - throw SessionUndefined(fnTag); - } - const sessionData = session.getServerSessionData(); - - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if ( - request.common == undefined || - request.common.version == undefined || - request.common.messageType == undefined || - request.common.sessionId == undefined || - request.common.sequenceNumber == undefined || - request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || - request.clientSignature == undefined || - request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined - ) { - throw MissingSatpCommonBody(fnTag); - } - if (request.common.version != SATP_VERSION) { - throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); - } - - if ( - !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); + if (session == undefined) { + throw new SessionError(fnTag); } - if (request.common.messageType != MessageType.INIT_PROPOSAL) { - throw MessageTypeMissMatch( - fnTag, - request.common.messageType.toString(), - MessageType.INIT_PROPOSAL.toString(), - ); - } + const sessionData = session.getServerSessionData(); - if (request.transferInitClaims == undefined) { - throw MissingTransferInitClaims(fnTag); - } + this.checkNetworkCapabilities(request.networkCapabilities, fnTag); - if (request.networkCapabilities == undefined) { - throw MissingNetworkCapabilities(fnTag); + if (this.checkTransferClaims(request.transferInitClaims, fnTag)) { + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; + } else { + this.Log.info(`${fnTag}, TransferProposalRequest was rejected...`); + sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_REJECTED; + return; } - const senderId = request.transferInitClaims + const senderId = request.transferInitClaims! .senderGatewayNetworkId as SupportedChain; if (!supportedDLTs.includes(senderId)) { - throw DLTNotSupported(fnTag, senderId); //todo change this to the transferClaims check - } - - if (!this.checkTransferClaims(request.transferInitClaims)) { - throw new Error(); + throw new DLTNotSupportedError(fnTag, senderId); //todo change this to the transferClaims check } - this.Log.info(`TransferProposalRequest passed all checks.`); - - sessionData.version = request.common.version; - sessionData.digitalAssetId = request.transferInitClaims.digitalAssetId; - sessionData.originatorPubkey = request.transferInitClaims.originatorPubkey; + sessionData.version = request.common!.version; + sessionData.digitalAssetId = request.transferInitClaims!.digitalAssetId; + sessionData.originatorPubkey = request.transferInitClaims!.originatorPubkey; sessionData.beneficiaryPubkey = - request.transferInitClaims.beneficiaryPubkey; + request.transferInitClaims!.beneficiaryPubkey; sessionData.senderGatewayNetworkId = - request.transferInitClaims.senderGatewayNetworkId; + request.transferInitClaims!.senderGatewayNetworkId; sessionData.recipientGatewayNetworkId = - request.transferInitClaims.recipientGatewayNetworkId; + request.transferInitClaims!.recipientGatewayNetworkId; sessionData.clientGatewayPubkey = - request.transferInitClaims.clientGatewayPubkey; + request.transferInitClaims!.clientGatewayPubkey; sessionData.serverGatewayPubkey = - request.transferInitClaims.serverGatewayPubkey; + request.transferInitClaims!.serverGatewayPubkey; sessionData.receiverGatewayOwnerId = - request.transferInitClaims.receiverGatewayOwnerId; + request.transferInitClaims!.receiverGatewayOwnerId; sessionData.senderGatewayOwnerId = - request.transferInitClaims.senderGatewayOwnerId; + request.transferInitClaims!.senderGatewayOwnerId; sessionData.signatureAlgorithm = - request.networkCapabilities.signatureAlgorithm; - sessionData.lockType = request.networkCapabilities.lockType; + request.networkCapabilities!.signatureAlgorithm; + sessionData.lockType = request.networkCapabilities!.lockType; sessionData.lockExpirationTime = - request.networkCapabilities.lockExpirationTime; + request.networkCapabilities!.lockExpirationTime; sessionData.credentialProfile = - request.networkCapabilities.credentialProfile; - sessionData.loggingProfile = request.networkCapabilities.loggingProfile; + request.networkCapabilities!.credentialProfile; + sessionData.loggingProfile = request.networkCapabilities!.loggingProfile; sessionData.accessControlProfile = - request.networkCapabilities.accessControlProfile; + request.networkCapabilities!.accessControlProfile; + sessionData.resourceUrl = request.common!.resourceUrl; + + session.verify(fnTag, SessionType.SERVER); + + commonBodyVerifier( + fnTag, + request.common, + sessionData, + MessageType.INIT_PROPOSAL, + ); + + signatureVerifier(fnTag, this.Signer, request, sessionData); this.Log.info( `${fnTag}, Session data created for session id ${sessionData.id}`, @@ -361,122 +297,37 @@ export class Stage1ServerService extends SATPService { saveHash(sessionData, MessageType.INIT_PROPOSAL, getHash(request)); this.Log.info(`${fnTag}, TransferProposalRequest passed all checks.`); - - return sessionData; } async checkTransferCommenceRequestMessage( request: TransferCommenceRequestMessage, - session: SATPSession | undefined, - ): Promise { + session: SATPSession, + ): Promise { const stepTag = `checkTransferCommenceRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; - if ( - request.common == undefined || - request.common.version == undefined || - request.common.messageType == undefined || - request.common.sessionId == undefined || - request.common.sequenceNumber == undefined || - request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || - request.clientSignature == undefined || - request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined - ) { - throw MissingSatpCommonBody(fnTag); - } - - if (request.common.version != SATP_VERSION) { - throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); - } - if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); - - if ( - sessionData == undefined || - sessionData.serverGatewayPubkey == undefined || - sessionData.hashes == undefined || - sessionData.hashes.stage1 == undefined || - sessionData.hashes.stage1.transferProposalReceiptMessageHash == - undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + session.verify(fnTag, SessionType.SERVER); - if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { - throw MissingServerGatewayPubkey(fnTag); - } - - if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { - throw MissingClientGatewayPubkey(fnTag); - } - - if ( - !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); - } + const sessionData = session.getServerSessionData(); - if (request.common.messageType != MessageType.TRANSFER_COMMENCE_REQUEST) { - throw MessageTypeMissMatch( - fnTag, - request.common.messageType.toString(), - MessageType.TRANSFER_COMMENCE_REQUEST.toString(), - ); - } + commonBodyVerifier( + fnTag, + request.common, + sessionData, + MessageType.TRANSFER_COMMENCE_REQUEST, + ); - if ( - request.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw SequenceNumberMissMatch( - fnTag, - request.common.sequenceNumber, - sessionData.lastSequenceNumber + BigInt(1), - ); - } + signatureVerifier(fnTag, this.Signer, request, sessionData); if ( - request.common.hashPreviousMessage != - sessionData.hashes.stage1.transferProposalReceiptMessageHash - ) { - throw HashMissMatch( - fnTag, - request.common.hashPreviousMessage, - sessionData.hashes.stage1.transferProposalReceiptMessageHash, - ); - } - - if ( - request.hashTransferInitClaims == undefined || + request.hashTransferInitClaims == "" || request.hashTransferInitClaims != sessionData.hashTransferInitClaims ) { - throw MissingTransferInitClaims(fnTag); - } - - if ( - !verifySignature(this.Signer, request, sessionData.clientGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); - } - - if ( - sessionData.transferContextId != undefined && - request.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - request.common.transferContextId, - sessionData.transferContextId, - ); + throw new TransferInitClaimsHashError(fnTag); } if (request.clientTransferNumber != undefined) { @@ -493,12 +344,98 @@ export class Stage1ServerService extends SATPService { ); this.Log.info(`${fnTag}, TransferCommenceRequest passed all checks.`); + } - return sessionData; + private checkTransferClaims( + transferClaims: TransferClaims | undefined, + tag: string, + ): boolean { + if (transferClaims == undefined) { + throw new TransferInitClaimsError(tag); + } + if (transferClaims.digitalAssetId == "") { + this.Log.error(`${tag}, digitalAssetId is missing`); + } + if (transferClaims.assetProfileId == "") { + this.Log.error(`${tag}, assetProfileId is missing`); + return false; + } + if (transferClaims.verifiedOriginatorEntityId == "") { + this.Log.error(`${tag}, verifiedOriginatorEntityId is missing`); + return false; + } + if (transferClaims.verifiedBeneficiaryEntityId == "") { + this.Log.error(`${tag}, verifiedBeneficiaryEntityId is missing`); + } + if (transferClaims.originatorPubkey == "") { + this.Log.error(`${tag}, originatorPubkey is missing`); + return false; + } + if (transferClaims.beneficiaryPubkey == "") { + this.Log.error(`${tag}, beneficiaryPubkey is missing`); + return false; + } + if (transferClaims.senderGatewayNetworkId != "") { + this.Log.info(`${tag}, optional variable senderGatewayNetworkId loaded`); + } + if (transferClaims.recipientGatewayNetworkId != "") { + this.Log.info( + `${tag}, optional variable recipientGatewayNetworkId loaded`, + ); + } + if (transferClaims.clientGatewayPubkey == "") { + this.Log.error(`${tag}, clientGatewayPubkey is missing`); + return false; + } + if (transferClaims.serverGatewayPubkey == "") { + this.Log.error(`${tag}, serverGatewayPubkey is missing`); + return false; + } + if (transferClaims.senderGatewayOwnerId != "") { + this.Log.info(`${tag}, optional variable senderGatewayNetworkId loaded`); + } + if (transferClaims.receiverGatewayOwnerId != "") { + this.Log.info(`${tag}, optional variable receiverGatewayOwnerId loaded`); + } + //todo + return true; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - private checkTransferClaims(transferClaims: TransferClaims): boolean { + private checkNetworkCapabilities( + networkCapabilities: NetworkCapabilities | undefined, + tag: string, + ): boolean { + if (networkCapabilities == undefined) { + throw new NetworkCapabilitiesError(tag); + } + if (networkCapabilities.senderGatewayNetworkId == "") { + } + if ( + networkCapabilities.signatureAlgorithm == SignatureAlgorithm.UNSPECIFIED + ) { + } + if (networkCapabilities.supportedSignatureAlgorithms.length == 0) { + } + if (networkCapabilities.lockType == LockType.UNSPECIFIED) { + } + if (networkCapabilities.lockExpirationTime == BigInt(0)) { + } + if (networkCapabilities.permissions == undefined) { + } + if (networkCapabilities.developerUrn == "") { + } + if (networkCapabilities.credentialProfile == undefined) { + } + if (networkCapabilities.applicationProfile == "") { + } + if (networkCapabilities.loggingProfile == "") { + } + if (networkCapabilities.accessControlProfile == "") { + } + if (networkCapabilities.subsequentCalls == undefined) { + } + if (networkCapabilities.history == undefined) { + } //todo return true; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 1c01eb4b78..15dd69e987 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -7,14 +7,13 @@ import { CommonSatp, MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; + getMessageHash, + saveHash, + saveSignature, + SessionType, +} from "../../session-utils"; import { SATPService, SATPServiceType, @@ -22,22 +21,13 @@ import { ISATPServiceOptions, } from "../satp-service"; import { SATPSession } from "../../../core/satp-session"; +import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { - HashMissMatch, - MessageTypeMissMatch, - MissingClientGatewayPubkey, - MissingLockAssertionClaim, - MissingLockAssertionClaimFormat, - MissingLockAssertionExpiration, - MissingSatpCommonBody, - MissingServerGatewayPubkey, - SATPVersionUnsupported, - SequenceNumberMissMatch, - SessionDataNotLoadedCorrectly, - SessionUndefined, - SignatureVerificationFailed, - TransferContextIdMissMatch, -} from "../errors"; + LockAssertionClaimError, + LockAssertionClaimFormatError, + LockAssertionExpirationError, + SessionError, +} from "../../errors/satp-service-errors"; export class Stage2ServerService extends SATPService { public static readonly SATP_STAGE = "2"; public static readonly SERVICE_TYPE = SATPServiceType.Server; @@ -63,30 +53,25 @@ export class Stage2ServerService extends SATPService { this.Log.debug(`${fnTag}, lockAssertionResponse...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); - - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + session.verify(fnTag, SessionType.SERVER); - if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getServerSessionData(); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.ASSERTION_RECEIPT; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.sequenceNumber = request.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.LOCK_ASSERT, ); - commonBody.sessionId = request.common.sessionId; + commonBody.sessionId = request.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.resourceUrl = sessionData.resourceUrl; sessionData.lastSequenceNumber = commonBody.sequenceNumber; @@ -134,119 +119,48 @@ export class Stage2ServerService extends SATPService { async checkLockAssertionRequestMessage( request: LockAssertionRequestMessage, session: SATPSession, - ): Promise { + ): Promise { const stepTag = `checkLockAssertionRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkLockAssertionRequestMessage...`); if (session == undefined) { - throw SessionUndefined(fnTag); - } - - const sessionData = session.getServerSessionData(); - - if ( - sessionData == undefined || - sessionData.serverGatewayPubkey == undefined || - sessionData.lastSequenceNumber == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); + throw new SessionError(fnTag); } - if ( - request.common == undefined || - request.common.version == undefined || - request.common.messageType == undefined || - request.common.sessionId == undefined || - request.common.sequenceNumber == undefined || - request.common.resourceUrl == undefined || - request.clientSignature == undefined || - request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined || - request.common.hashPreviousMessage == undefined - ) { - throw MissingSatpCommonBody(fnTag); - } + session.verify(fnTag, SessionType.SERVER); - if (request.common.version != SATP_VERSION) { - throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); - } - - if (request.common.serverGatewayPubkey != sessionData.serverGatewayPubkey) { - throw MissingServerGatewayPubkey(fnTag); - } - - if (request.common.clientGatewayPubkey != sessionData.clientGatewayPubkey) { - throw MissingClientGatewayPubkey(fnTag); - } - - if ( - !verifySignature(this.Signer, request, request.common.serverGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); - } - - if (request.common.messageType != MessageType.LOCK_ASSERT) { - throw MessageTypeMissMatch( - fnTag, - request.common.messageType.toString(), - MessageType.LOCK_ASSERT.toString(), - ); - } + const sessionData = session.getServerSessionData(); - if ( - request.common.sequenceNumber != - sessionData.lastSequenceNumber + BigInt(1) - ) { - throw SequenceNumberMissMatch( - fnTag, - request.common.sequenceNumber, - sessionData.lastSequenceNumber, - ); - } + commonBodyVerifier( + fnTag, + request.common, + sessionData, + MessageType.LOCK_ASSERT, + ); - if ( - request.common.hashPreviousMessage != - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE) - ) { - throw HashMissMatch( - fnTag, - request.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_RESPONSE), - ); - } + signatureVerifier(fnTag, this.Signer, request, sessionData); if (request.lockAssertionClaim == undefined) { - throw MissingLockAssertionClaim(fnTag); + throw new LockAssertionClaimError(fnTag); } sessionData.lockAssertionClaim = request.lockAssertionClaim; if (request.lockAssertionClaimFormat == undefined) { - throw MissingLockAssertionClaimFormat(fnTag); + throw new LockAssertionClaimFormatError(fnTag); } sessionData.lockAssertionClaimFormat = request.lockAssertionClaimFormat; //todo check if valid - if (request.lockAssertionExpiration == undefined) { - throw MissingLockAssertionExpiration(fnTag); + if (request.lockAssertionExpiration == BigInt(0)) { + throw new LockAssertionExpirationError(fnTag); } sessionData.lockAssertionExpiration = request.lockAssertionExpiration; //todo check if expired if ( - sessionData.transferContextId != undefined && - request.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - request.common.transferContextId, - sessionData.transferContextId, - ); - } - - if ( - sessionData.clientTransferNumber != undefined && + sessionData.clientTransferNumber != "" && request.clientTransferNumber != sessionData.clientTransferNumber ) { // This does not throw an error because the clientTransferNumber is only meaningful to the client. @@ -258,6 +172,5 @@ export class Stage2ServerService extends SATPService { saveHash(sessionData, MessageType.LOCK_ASSERT, getHash(request)); this.Log.info(`${fnTag}, LockAssertionRequest passed all checks.`); - return sessionData; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 7634d9416f..0831f815d7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -12,14 +12,13 @@ import { MessageType, MintAssertionClaim, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; -import { SessionData } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { - bufArray2HexStr, - getHash, - sign, - verifySignature, -} from "../../../gateway-utils"; -import { getMessageHash, saveHash, saveSignature } from "../../session-utils"; + getMessageHash, + saveHash, + saveSignature, + SessionType, +} from "../../session-utils"; import { SATPService, SATPServiceType, @@ -28,23 +27,14 @@ import { } from "../satp-service"; import { SATPSession } from "../../../core/satp-session"; import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { - HashMissMatch, - MessageTypeMissMatch, - MissingAssignmentAssertionClaim, - MissingBridgeManager, - MissingBurnAssertionClaim, - MissingClientGatewayPubkey, - MissingMintAssertionClaim, - MissingSatpCommonBody, - MissingServerGatewayPubkey, - SATPVersionUnsupported, - SequenceNumberMissMatch, - SessionDataNotLoadedCorrectly, - SessionUndefined, - SignatureVerificationFailed, - TransferContextIdMissMatch, -} from "../errors"; + AssignmentAssertionClaimError, + BurnAssertionClaimError, + MintAssertionClaimError, + MissingBridgeManagerError, + SessionError, +} from "../../errors/satp-service-errors"; export class Stage3ServerService extends SATPService { public static readonly SATP_STAGE = "3"; @@ -64,7 +54,9 @@ export class Stage3ServerService extends SATPService { }; super(commonOptions); if (ops.bridgeManager == undefined) { - throw MissingBridgeManager(`${this.getServiceIdentifier()}#constructor`); + throw new MissingBridgeManagerError( + `${this.getServiceIdentifier()}#constructor`, + ); } this.bridgeManager = ops.bridgeManager; } @@ -78,30 +70,25 @@ export class Stage3ServerService extends SATPService { this.Log.debug(`${fnTag}, commitReady...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); + session.verify(fnTag, SessionType.SERVER); - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } - - if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getServerSessionData(); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.COMMIT_READY; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.sequenceNumber = request.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.COMMIT_PREPARE, ); - commonBody.sessionId = request.common.sessionId; + commonBody.sessionId = request.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.resourceUrl = sessionData.resourceUrl; sessionData.lastSequenceNumber = commonBody.sequenceNumber; @@ -109,7 +96,7 @@ export class Stage3ServerService extends SATPService { commitReadyMessage.common = commonBody; if (sessionData.mintAssertionClaim == undefined) { - throw MissingMintAssertionClaim(fnTag); + throw new MintAssertionClaimError(fnTag); } commitReadyMessage.mintAssertionClaim = sessionData.mintAssertionClaim; @@ -162,30 +149,25 @@ export class Stage3ServerService extends SATPService { this.Log.debug(`${fnTag}, commitFinalAcknowledgementReceiptResponse...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); - - if (sessionData == undefined) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + session.verify(fnTag, SessionType.SERVER); - if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } + const sessionData = session.getServerSessionData(); const commonBody = new CommonSatp(); commonBody.version = SATP_VERSION; commonBody.messageType = MessageType.ACK_COMMIT_FINAL; - commonBody.sequenceNumber = request.common.sequenceNumber + BigInt(1); + commonBody.sequenceNumber = request.common!.sequenceNumber + BigInt(1); commonBody.hashPreviousMessage = getMessageHash( sessionData, MessageType.COMMIT_FINAL, ); - commonBody.sessionId = request.common.sessionId; + commonBody.sessionId = request.common!.sessionId; commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; + commonBody.resourceUrl = sessionData.resourceUrl; sessionData.lastSequenceNumber = commonBody.sequenceNumber; @@ -194,7 +176,7 @@ export class Stage3ServerService extends SATPService { commitFinalAcknowledgementReceiptResponseMessage.common = commonBody; if (sessionData.assignmentAssertionClaim == undefined) { - throw MissingAssignmentAssertionClaim(fnTag); + throw new AssignmentAssertionClaimError(fnTag); } commitFinalAcknowledgementReceiptResponseMessage.assignmentAssertionClaim = @@ -251,91 +233,32 @@ export class Stage3ServerService extends SATPService { async checkCommitPreparationRequestMessage( request: CommitPreparationRequestMessage, session: SATPSession, - ): Promise { + ): Promise { const stepTag = `checkCommitPreparationRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkCommitPreparationRequestMessage...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); + session.verify(fnTag, SessionType.SERVER); - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + const sessionData = session.getServerSessionData(); if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } - - if (request.common.version != SATP_VERSION) { - throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); - } - - if (request.common.messageType != MessageType.COMMIT_PREPARE) { - throw MessageTypeMissMatch( - fnTag, - request.common.messageType.toString(), - MessageType.COMMIT_PREPARE.toString(), - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - request.common.sequenceNumber - ) { - throw SequenceNumberMissMatch( + commonBodyVerifier( fnTag, - sessionData.lastSequenceNumber, - request.common.sequenceNumber, + request.common, + sessionData, + MessageType.COMMIT_PREPARE, ); } - if ( - getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT) != - request.common.hashPreviousMessage - ) { - throw HashMissMatch( - fnTag, - request.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.ASSERTION_RECEIPT), - ); - } - - if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw MissingClientGatewayPubkey(fnTag); - } - - if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw MissingServerGatewayPubkey(fnTag); - } - - if ( - !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); - } - - if ( - sessionData.transferContextId != undefined && - request.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - request.common.transferContextId, - sessionData.transferContextId, - ); - } + signatureVerifier(fnTag, this.Signer, request, sessionData); if ( - sessionData.clientTransferNumber != undefined && + sessionData.clientTransferNumber != "" && request.clientTransferNumber != sessionData.clientTransferNumber ) { // This does not throw an error because the clientTransferNumber is only meaningful to the client. @@ -349,98 +272,38 @@ export class Stage3ServerService extends SATPService { this.Log.info( `${fnTag}, CommitPreparationRequestMessage passed all checks.`, ); - - return sessionData; } async checkCommitFinalAssertionRequestMessage( request: CommitFinalAssertionRequestMessage, session: SATPSession, - ): Promise { + ): Promise { const stepTag = `checkCommitFinalAssertionRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkCommitFinalAssertionRequestMessage...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); + session.verify(fnTag, SessionType.SERVER); - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + const sessionData = session.getServerSessionData(); if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } - - if (request.common.version != SATP_VERSION) { - throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); - } - - if (request.common.messageType != MessageType.COMMIT_FINAL) { - throw MessageTypeMissMatch( - fnTag, - request.common.messageType.toString(), - MessageType.COMMIT_FINAL.toString(), - ); - } - - if ( - sessionData.lastSequenceNumber + BigInt(1) != - request.common.sequenceNumber - ) { - throw SequenceNumberMissMatch( + commonBodyVerifier( fnTag, - request.common.sequenceNumber, - sessionData.lastSequenceNumber, + request.common, + sessionData, + MessageType.COMMIT_FINAL, ); } - if ( - getMessageHash(sessionData, MessageType.COMMIT_READY) != - request.common.hashPreviousMessage - ) { - throw HashMissMatch( - fnTag, - request.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.COMMIT_READY), - ); - } - - if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw MissingClientGatewayPubkey(fnTag); - } + signatureVerifier(fnTag, this.Signer, request, sessionData); - if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw MissingServerGatewayPubkey(fnTag); - } - - if ( - !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); - } - - if ( - sessionData.transferContextId != undefined && - request.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - request.common.transferContextId, - sessionData.transferContextId, - ); - } //todo check burn if (request.burnAssertionClaim == undefined) { - throw MissingBurnAssertionClaim(fnTag); + throw new BurnAssertionClaimError(fnTag); } sessionData.burnAssertionClaim = request.burnAssertionClaim; @@ -467,110 +330,34 @@ export class Stage3ServerService extends SATPService { this.Log.info( `${fnTag}, CommitFinalAssertionRequestMessage passed all checks.`, ); - - return sessionData; } async checkTransferCompleteRequestMessage( request: TransferCompleteRequestMessage, session: SATPSession, - ): Promise { + ): Promise { const stepTag = `checkTransferCompleteRequestMessage()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, checkTransferCompleteRequestMessage...`); if (session == undefined) { - throw SessionUndefined(fnTag); + throw new SessionError(fnTag); } - const sessionData = session.getServerSessionData(); + session.verify(fnTag, SessionType.SERVER); - if ( - sessionData == undefined || - sessionData.lastSequenceNumber == undefined || - sessionData.version == undefined || - sessionData.signatures == undefined - ) { - throw SessionDataNotLoadedCorrectly(fnTag); - } + const sessionData = session.getServerSessionData(); if (request.common == undefined) { - throw MissingSatpCommonBody(fnTag); - } - - if (request.common.version != SATP_VERSION) { - throw SATPVersionUnsupported(fnTag, request.common.version, SATP_VERSION); - } - - if (request.common.messageType != MessageType.COMMIT_TRANSFER_COMPLETE) { - throw MessageTypeMissMatch( + commonBodyVerifier( fnTag, - request.common.messageType.toString(), - MessageType.COMMIT_TRANSFER_COMPLETE.toString(), + request.common, + sessionData, + MessageType.COMMIT_TRANSFER_COMPLETE, ); } - if ( - sessionData.lastSequenceNumber + BigInt(1) != - request.common.sequenceNumber - ) { - throw SequenceNumberMissMatch( - fnTag, - request.common.sequenceNumber, - sessionData.lastSequenceNumber, - ); - } - - if ( - getMessageHash(sessionData, MessageType.ACK_COMMIT_FINAL) != - request.common.hashPreviousMessage - ) { - throw HashMissMatch( - fnTag, - request.common.hashPreviousMessage, - getMessageHash(sessionData, MessageType.ACK_COMMIT_FINAL), - ); - } - - if ( - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST) != - request.hashTransferCommence - ) { - throw HashMissMatch( - fnTag, - request.hashTransferCommence, - getMessageHash(sessionData, MessageType.TRANSFER_COMMENCE_REQUEST), - ); - } - - if (sessionData.clientGatewayPubkey != request.common.clientGatewayPubkey) { - throw MissingClientGatewayPubkey(fnTag); - } - - if (sessionData.serverGatewayPubkey != request.common.serverGatewayPubkey) { - throw MissingServerGatewayPubkey(fnTag); - } - - if ( - !verifySignature(this.Signer, request, request.common.clientGatewayPubkey) - ) { - throw SignatureVerificationFailed(fnTag); - } - - this.Log.info( - `${fnTag}, TransferCompleteRequestMessage passed all checks.`, - ); - - if ( - sessionData.transferContextId != undefined && - request.common.transferContextId != sessionData.transferContextId - ) { - throw TransferContextIdMissMatch( - fnTag, - request.common.transferContextId, - sessionData.transferContextId, - ); - } + signatureVerifier(fnTag, this.Signer, request, sessionData); if ( sessionData.clientTransferNumber != undefined && @@ -591,17 +378,25 @@ export class Stage3ServerService extends SATPService { getHash(request), ); - return sessionData; + this.Log.info( + `${fnTag}, TransferCompleteRequestMessage passed all checks.`, + ); } + async mintAsset(session: SATPSession): Promise { const stepTag = `mintAsset()`; const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.info(`${fnTag}, Minting Asset...`); - const sessionData = session.getServerSessionData(); - if (sessionData == undefined) { - throw new Error(`${fnTag}, Session data not found`); + + if (session == undefined) { + throw new SessionError(fnTag); } + + session.verify(fnTag, SessionType.SERVER); + + const sessionData = session.getServerSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountToBeneficiary; @@ -634,10 +429,15 @@ export class Stage3ServerService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; try { this.Log.info(`${fnTag}, Assigning Asset...`); - const sessionData = session.getServerSessionData(); - if (sessionData == undefined) { - throw new Error(`${fnTag}, Session data not found`); + + if (session == undefined) { + throw new SessionError(fnTag); } + + session.verify(fnTag, SessionType.SERVER); + + const sessionData = session.getServerSessionData(); + const assetId = sessionData.transferInitClaims?.digitalAssetId; const amount = sessionData.transferInitClaims?.amountToBeneficiary; const recipient = sessionData.transferInitClaims?.beneficiaryPubkey; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 6ec707d790..39ea829e99 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -337,6 +337,11 @@ export class SessionData extends Message { */ assetProfile?: AssetProfile; + /** + * @generated from field: string resource_url = 61; + */ + resourceUrl = ""; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -405,6 +410,7 @@ export class SessionData extends Message { { no: 58, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 59, name: "lock_assertion_expiration", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 60, name: "asset_profile", kind: "message", T: AssetProfile }, + { no: 61, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts index 498ac7b5e2..e40e13871f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -105,7 +105,7 @@ export class TransferProposalReceiptMessage extends Message): TransferProposalReceiptMessage { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index dfa48a7152..02ea361a6f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -221,6 +221,7 @@ export class SATPManager { bridgeManager: this.bridgesManager, })); } + private initializeServices( serviceClasses: SATPServiceInstance[], serviceOptions: ISATPServiceOptions[], diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts index a93038dc2f..4782c1d440 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts @@ -153,8 +153,8 @@ describe("SATP Services Testing", () => { "hex", ); sessionData.serverGatewayPubkey = sessionData.clientGatewayPubkey; - sessionData.originatorPubkey = sessionData.clientGatewayPubkey; - sessionData.beneficiaryPubkey = sessionData.clientGatewayPubkey; + sessionData.originatorPubkey = "MOCK_ORIGINATOR_PUBKEY"; + sessionData.beneficiaryPubkey = "MOCK_BENEFICIARY_PUBKEY"; sessionData.digitalAssetId = "MOCK_DIGITAL_ASSET_ID"; sessionData.assetProfileId = "MOCK_ASSET_PROFILE_ID"; sessionData.verifiedOriginatorEntityId = @@ -162,6 +162,7 @@ describe("SATP Services Testing", () => { sessionData.verifiedBeneficiaryEntityId = "MOCK_VERIFIED_BENEFICIARY_ENTITY_ID"; sessionData.receiverGatewayOwnerId = "MOCK_RECEIVER_GATEWAY_OWNER_ID"; + sessionData.recipientGatewayNetworkId = "MOCK_RECIPIENT_GATEWAY_NETWORK_ID"; sessionData.senderGatewayOwnerId = SupportedChain.FABRIC; sessionData.senderGatewayNetworkId = SupportedChain.BESU; sessionData.signatureAlgorithm = SignatureAlgorithm.RSA; @@ -170,6 +171,8 @@ describe("SATP Services Testing", () => { sessionData.credentialProfile = CredentialProfile.X509; sessionData.loggingProfile = "MOCK_LOGGING_PROFILE"; sessionData.accessControlProfile = "MOCK_ACCESS_CONTROL_PROFILE"; + sessionData.resourceUrl = "MOCK_RESOURCE_URL"; + sessionData.lockAssertionExpiration = BigInt(99999); transferProposalRequestMessage = (await satpClientService1.transferProposalRequest( From 008a807eec0a40e1dcf79503dd974b360d5c879e Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Fri, 23 Aug 2024 17:12:08 +0100 Subject: [PATCH 33/49] feat(satp-hermes): stage0, bug fixing and test e2e Co-authored-by: eduv09 Signed-off-by: Carlos Amaro fix(satp-hermes): error messages in stage0 Signed-off-by: Carlos Amaro feat(satp-hermes): service tests added stage0 and error handling Signed-off-by: Carlos Amaro feat(satp-hermes): test e2e Signed-off-by: Carlos Amaro fix(satp-hermes): fix bugs and test e2e working transfer Signed-off-by: Carlos Amaro fix(stap-hermes): bugs and 2 gateway test Signed-off-by: Carlos Amaro --- .../cactus-plugin-satp-hermes/package.json | 15 +- .../gateway-client/.openapi-generator/FILES | 4 + .../go/generated/gateway-client/README.md | 2 + .../generated/gateway-client/api/openapi.yaml | 105 +- .../go/generated/gateway-client/docs/Asset.md | 171 +++ .../gateway-client/docs/TransactRequest.md | 128 +- .../docs/TransactRequestSourceAsset.md | 171 +++ .../gateway-client/docs/TransactionApi.md | 2 +- .../generated/gateway-client/model_asset.go | 279 ++++ .../gateway-client/model_transact_request.go | 258 ++-- .../model_transact_request_source_asset.go | 279 ++++ .../src/main/json/openapi-blo-bundled.json | 189 ++- .../proto/cacti/satp/v02/common/message.proto | 39 + .../proto/cacti/satp/v02/common/session.proto | 50 +- .../main/proto/cacti/satp/v02/stage_0.proto | 79 +- .../src/main/typescript/blo/dispatcher.ts | 18 +- .../transaction/transact-handler-service.ts | 114 ++ .../src/main/typescript/core/constants.ts | 1 - .../core/errors/satp-handler-errors.ts | 23 +- .../core/errors/satp-service-errors.ts | 243 +++- .../src/main/typescript/core/satp-session.ts | 198 ++- .../src/main/typescript/core/session-utils.ts | 250 +++- .../core/stage-handlers/stage0-handler.ts | 250 +++- .../core/stage-handlers/stage1-handler.ts | 37 +- .../core/stage-handlers/stage2-handler.ts | 20 +- .../core/stage-handlers/stage3-handler.ts | 49 +- .../client/stage0-client-service.ts | 307 ++++- .../client/stage1-client-service.ts | 64 +- .../client/stage2-client-service.ts | 15 +- .../client/stage3-client-service.ts | 15 +- .../core/stage-services/data-verifier.ts | 8 +- .../stage-services/satp-bridge/besu-bridge.ts | 7 + .../satp-bridge/satp-bridge-manager.ts | 47 +- .../stage-services/satp-bridge/types/asset.ts | 10 + .../satp-bridge/types/besu-asset.ts | 1 - .../satp-bridge/types/fabric-asset.ts | 1 - .../server/stage0-server-service.ts | 391 +++++- .../server/stage1-server-service.ts | 24 +- .../server/stage3-server-service.ts | 31 +- .../core/stage-services/service-utils.ts | 70 ++ .../src/main/typescript/core/types.ts | 5 +- .../src/main/typescript/gateway-utils.ts | 2 + .../gateway-client/typescript-axios/api.ts | 110 +- .../cacti/satp/v02/common/health_connect.ts | 2 +- .../proto/cacti/satp/v02/common/message_pb.ts | 243 ++++ .../cacti/satp/v02/common/session_connect.ts | 2 +- .../proto/cacti/satp/v02/common/session_pb.ts | 261 +++- .../cacti/satp/v02/crash_recovery_connect.ts | 2 +- .../proto/cacti/satp/v02/stage_0_connect.ts | 40 +- .../proto/cacti/satp/v02/stage_0_pb.ts | 370 ++++-- .../proto/cacti/satp/v02/stage_1_connect.ts | 2 +- .../proto/cacti/satp/v02/stage_2_connect.ts | 2 +- .../proto/cacti/satp/v02/stage_3_connect.ts | 2 +- .../typescript/gol/gateway-orchestrator.ts | 130 +- .../typescript/gol/satp-bridges-manager.ts | 2 - .../src/main/typescript/gol/satp-manager.ts | 134 +- .../network-identification/resolve-gateway.ts | 66 +- .../typescript/plugin-satp-hermes-gateway.ts | 68 +- .../types/blockchain-interaction.ts | 4 + .../main/typescript/types/satp-protocol.ts | 10 + .../src/main/yml/bol/openapi-blo-bundled.yml | 132 +- .../src/main/yml/bol/schemas.yml | 41 +- ...satp-end-to-end-transfer-1-gateway.test.ts | 1084 ++++++++++++++++ ...atp-end-to-end-transfer-2-gateways.test.ts | 1117 +++++++++++++++++ .../src/test/typescript/unit/services.test.ts | 261 +++- yarn.lock | 113 +- 66 files changed, 7249 insertions(+), 921 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index b6a7c52a82..e93d543dcb 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -65,7 +65,7 @@ "lint:eslint": "eslint './src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", "lint:protobuf": "buf lint --path src/main/proto --verbose", - "start-gateway": "ts-node satp-gateway-cli.ts", + "start-gateway": "ts-node /src/main/typescript/plugin-satp-hermes-gateway-cli.ts", "pretsc": "npm run generate-sdk", "tsc": "tsc --project ./tsconfig.json", "watch": "tsc --build --watch" @@ -104,11 +104,13 @@ "express": "4.17.2", "fabric-network": "2.2.19", "fs-extra": "11.2.0", + "google-protobuf": "3.21.2", "hardhat": "2.22.5", "knex": "2.4.0", "kubo-rpc-client": "3.0.1", "npm-run-all": "4.1.5", "openzeppelin-solidity": "3.4.2", + "safe-stable-stringify": "2.5.0", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", @@ -120,14 +122,15 @@ }, "devDependencies": { "@apidevtools/swagger-cli": "4.0.4", - "@bufbuild/buf": "1.29.0", - "@bufbuild/protobuf": "1.7.2", + "@bufbuild/buf": "1.30.0", "@bufbuild/protoc-gen-es": "1.8.0", - "@quobix/vacuum": "^0.9.10", + "@grpc/proto-loader": "0.7.13", + "@quobix/vacuum": "0.9.16", "@types/body-parser": "1.19.4", "@types/crypto-js": "4.0.1", "@types/express": "5.0.0", "@types/fs-extra": "11.0.4", + "@types/google-protobuf": "3.15.5", "@types/node": "18.18.2", "@types/swagger-ui-express": "4.1.6", "@types/tape": "4.13.4", @@ -135,7 +138,11 @@ "body-parser": "1.20.3", "express": "4.21.0", "fabric-network": "2.2.20", + "grpc-tools": "1.12.4", + "grpc_tools_node_protoc_ts": "5.3.3", "kubo-rpc-client": "3.0.1", + "make-dir-cli": "3.1.0", + "protobufjs": "7.2.5", "swagger-cli": "4.0.4", "typescript": "5.5.2" }, diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES index e101cc77cb..183ff7f779 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES @@ -9,6 +9,7 @@ configuration.go docs/APIError.md docs/Action.md docs/AdminApi.md +docs/Asset.md docs/AuthzJwtClaim.md docs/AuthzScope.md docs/BridgeInfo.md @@ -59,6 +60,7 @@ docs/Transact200ResponseStatusResponseDestinationChain.md docs/Transact200ResponseStatusResponseOriginChain.md docs/TransactDefaultResponse.md docs/TransactRequest.md +docs/TransactRequestSourceAsset.md docs/TransactResponse.md docs/TransactionApi.md git_push.sh @@ -66,6 +68,7 @@ go.mod go.sum model_action.go model_api_error.go +model_asset.go model_authz_jwt_claim.go model_authz_scope.go model_bridge_info.go @@ -116,6 +119,7 @@ model_transact_200_response_status_response_destination_chain.go model_transact_200_response_status_response_origin_chain.go model_transact_default_response.go model_transact_request.go +model_transact_request_source_asset.go model_transact_response.go response.go utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md index da330b7e19..5bc8df928c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md @@ -103,6 +103,7 @@ Class | Method | HTTP request | Description - [APIError](docs/APIError.md) - [Action](docs/Action.md) + - [Asset](docs/Asset.md) - [AuthzJwtClaim](docs/AuthzJwtClaim.md) - [AuthzScope](docs/AuthzScope.md) - [BridgeInfo](docs/BridgeInfo.md) @@ -153,6 +154,7 @@ Class | Method | HTTP request | Description - [Transact200ResponseStatusResponseOriginChain](docs/Transact200ResponseStatusResponseOriginChain.md) - [TransactDefaultResponse](docs/TransactDefaultResponse.md) - [TransactRequest](docs/TransactRequest.md) + - [TransactRequestSourceAsset](docs/TransactRequestSourceAsset.md) - [TransactResponse](docs/TransactResponse.md) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml index e16c9333cd..dc98f2438b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml @@ -592,20 +592,54 @@ components: - sessionID type: object x-category: request + Asset: + description: An asset + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string + required: + - contractName + - ontology + - owner + type: object TransactRequest: description: "Request schema for initiating a transaction. Includes details\ \ such as the transaction context, mode (data or transfer), payload, and information\ \ about the source and destination DLT networks." example: mode: transfer + beneficiaryPubkey: beneficiaryPubkey + destinyAsset: + owner: owner + mspId: mspId + contractAddress: contractAddress + contractName: contractName + channelName: channelName + ontology: ontology payload: "{\"data\":\"example payload\"}" fromAmount: "100" toAmount: "95" + sourceAsset: + owner: owner + mspId: mspId + contractAddress: contractAddress + contractName: contractName + channelName: channelName + ontology: ontology + originatorPubkey: originatorPubkey contextID: 123e4567-e89b-12d3-a456-426614174000 toDLTNetworkID: network2 fromDLTNetworkID: network1 - fromToken: TOKEN1 - toToken: TOKEN2 properties: contextID: example: 123e4567-e89b-12d3-a456-426614174000 @@ -629,18 +663,28 @@ components: fromAmount: example: "100" type: string - fromToken: - example: TOKEN1 - type: string toAmount: example: "95" type: string - toToken: - example: TOKEN2 + beneficiaryPubkey: + type: string + originatorPubkey: type: string + sourceAsset: + $ref: '#/components/schemas/Transact_request_sourceAsset' + destinyAsset: + $ref: '#/components/schemas/Transact_request_sourceAsset' required: + - beneficiaryPubkey - contextID + - destinyAsset + - fromAmount + - fromDLTNetworkID - mode + - originatorPubkey + - sourceAsset + - toAmount + - toDLTNetworkID type: object TransactResponse: description: Response schema for a transaction request. Includes the session @@ -1181,6 +1225,33 @@ components: token: $ref: '#/components/schemas/GetRoutes_200_response_routes_inner_fromToken' type: object + Transact_request_sourceAsset: + description: An asset + example: + owner: owner + mspId: mspId + contractAddress: contractAddress + contractName: contractName + channelName: channelName + ontology: ontology + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string + required: + - contractName + - ontology + - owner + type: object Transact_request: description: "Request schema for initiating a transaction. Includes details\ \ such as the transaction context, mode (data or transfer), payload, and information\ @@ -1208,18 +1279,28 @@ components: fromAmount: example: "100" type: string - fromToken: - example: TOKEN1 - type: string toAmount: example: "95" type: string - toToken: - example: TOKEN2 + beneficiaryPubkey: + type: string + originatorPubkey: type: string + sourceAsset: + $ref: '#/components/schemas/Transact_request_sourceAsset' + destinyAsset: + $ref: '#/components/schemas/Transact_request_sourceAsset' required: + - beneficiaryPubkey - contextID + - destinyAsset + - fromAmount + - fromDLTNetworkID - mode + - originatorPubkey + - sourceAsset + - toAmount + - toDLTNetworkID type: object Transact_200_response_statusResponse_originChain: example: diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md new file mode 100644 index 0000000000..943cdc53a3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md @@ -0,0 +1,171 @@ +# Asset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | | +**Ontology** | **string** | | +**ContractName** | **string** | | +**ContractAddress** | Pointer to **string** | | [optional] +**MspId** | Pointer to **string** | | [optional] +**ChannelName** | Pointer to **string** | | [optional] + +## Methods + +### NewAsset + +`func NewAsset(owner string, ontology string, contractName string, ) *Asset` + +NewAsset instantiates a new Asset object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetWithDefaults + +`func NewAssetWithDefaults() *Asset` + +NewAssetWithDefaults instantiates a new Asset object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *Asset) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *Asset) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *Asset) SetOwner(v string)` + +SetOwner sets Owner field to given value. + + +### GetOntology + +`func (o *Asset) GetOntology() string` + +GetOntology returns the Ontology field if non-nil, zero value otherwise. + +### GetOntologyOk + +`func (o *Asset) GetOntologyOk() (*string, bool)` + +GetOntologyOk returns a tuple with the Ontology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOntology + +`func (o *Asset) SetOntology(v string)` + +SetOntology sets Ontology field to given value. + + +### GetContractName + +`func (o *Asset) GetContractName() string` + +GetContractName returns the ContractName field if non-nil, zero value otherwise. + +### GetContractNameOk + +`func (o *Asset) GetContractNameOk() (*string, bool)` + +GetContractNameOk returns a tuple with the ContractName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContractName + +`func (o *Asset) SetContractName(v string)` + +SetContractName sets ContractName field to given value. + + +### GetContractAddress + +`func (o *Asset) GetContractAddress() string` + +GetContractAddress returns the ContractAddress field if non-nil, zero value otherwise. + +### GetContractAddressOk + +`func (o *Asset) GetContractAddressOk() (*string, bool)` + +GetContractAddressOk returns a tuple with the ContractAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContractAddress + +`func (o *Asset) SetContractAddress(v string)` + +SetContractAddress sets ContractAddress field to given value. + +### HasContractAddress + +`func (o *Asset) HasContractAddress() bool` + +HasContractAddress returns a boolean if a field has been set. + +### GetMspId + +`func (o *Asset) GetMspId() string` + +GetMspId returns the MspId field if non-nil, zero value otherwise. + +### GetMspIdOk + +`func (o *Asset) GetMspIdOk() (*string, bool)` + +GetMspIdOk returns a tuple with the MspId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMspId + +`func (o *Asset) SetMspId(v string)` + +SetMspId sets MspId field to given value. + +### HasMspId + +`func (o *Asset) HasMspId() bool` + +HasMspId returns a boolean if a field has been set. + +### GetChannelName + +`func (o *Asset) GetChannelName() string` + +GetChannelName returns the ChannelName field if non-nil, zero value otherwise. + +### GetChannelNameOk + +`func (o *Asset) GetChannelNameOk() (*string, bool)` + +GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChannelName + +`func (o *Asset) SetChannelName(v string)` + +SetChannelName sets ChannelName field to given value. + +### HasChannelName + +`func (o *Asset) HasChannelName() bool` + +HasChannelName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md index 5e7c595240..983b991ac6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md @@ -7,18 +7,20 @@ Name | Type | Description | Notes **ContextID** | **string** | | **Mode** | **string** | | **Payload** | Pointer to **string** | | [optional] -**FromDLTNetworkID** | Pointer to **string** | | [optional] -**ToDLTNetworkID** | Pointer to **string** | | [optional] -**FromAmount** | Pointer to **string** | | [optional] -**FromToken** | Pointer to **string** | | [optional] -**ToAmount** | Pointer to **string** | | [optional] -**ToToken** | Pointer to **string** | | [optional] +**FromDLTNetworkID** | **string** | | +**ToDLTNetworkID** | **string** | | +**FromAmount** | **string** | | +**ToAmount** | **string** | | +**BeneficiaryPubkey** | **string** | | +**OriginatorPubkey** | **string** | | +**SourceAsset** | [**TransactRequestSourceAsset**](TransactRequestSourceAsset.md) | | +**DestinyAsset** | [**TransactRequestSourceAsset**](TransactRequestSourceAsset.md) | | ## Methods ### NewTransactRequest -`func NewTransactRequest(contextID string, mode string, ) *TransactRequest` +`func NewTransactRequest(contextID string, mode string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset, ) *TransactRequest` NewTransactRequest instantiates a new TransactRequest object This constructor will assign default values to properties that have it defined, @@ -117,11 +119,6 @@ and a boolean to check if the value has been set. SetFromDLTNetworkID sets FromDLTNetworkID field to given value. -### HasFromDLTNetworkID - -`func (o *TransactRequest) HasFromDLTNetworkID() bool` - -HasFromDLTNetworkID returns a boolean if a field has been set. ### GetToDLTNetworkID @@ -142,11 +139,6 @@ and a boolean to check if the value has been set. SetToDLTNetworkID sets ToDLTNetworkID field to given value. -### HasToDLTNetworkID - -`func (o *TransactRequest) HasToDLTNetworkID() bool` - -HasToDLTNetworkID returns a boolean if a field has been set. ### GetFromAmount @@ -167,86 +159,106 @@ and a boolean to check if the value has been set. SetFromAmount sets FromAmount field to given value. -### HasFromAmount -`func (o *TransactRequest) HasFromAmount() bool` +### GetToAmount -HasFromAmount returns a boolean if a field has been set. +`func (o *TransactRequest) GetToAmount() string` -### GetFromToken +GetToAmount returns the ToAmount field if non-nil, zero value otherwise. -`func (o *TransactRequest) GetFromToken() string` +### GetToAmountOk -GetFromToken returns the FromToken field if non-nil, zero value otherwise. +`func (o *TransactRequest) GetToAmountOk() (*string, bool)` -### GetFromTokenOk +GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -`func (o *TransactRequest) GetFromTokenOk() (*string, bool)` +### SetToAmount -GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +`func (o *TransactRequest) SetToAmount(v string)` -### SetFromToken +SetToAmount sets ToAmount field to given value. -`func (o *TransactRequest) SetFromToken(v string)` -SetFromToken sets FromToken field to given value. +### GetBeneficiaryPubkey -### HasFromToken +`func (o *TransactRequest) GetBeneficiaryPubkey() string` -`func (o *TransactRequest) HasFromToken() bool` +GetBeneficiaryPubkey returns the BeneficiaryPubkey field if non-nil, zero value otherwise. -HasFromToken returns a boolean if a field has been set. +### GetBeneficiaryPubkeyOk -### GetToAmount +`func (o *TransactRequest) GetBeneficiaryPubkeyOk() (*string, bool)` -`func (o *TransactRequest) GetToAmount() string` +GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -GetToAmount returns the ToAmount field if non-nil, zero value otherwise. +### SetBeneficiaryPubkey -### GetToAmountOk +`func (o *TransactRequest) SetBeneficiaryPubkey(v string)` -`func (o *TransactRequest) GetToAmountOk() (*string, bool)` +SetBeneficiaryPubkey sets BeneficiaryPubkey field to given value. -GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. -### SetToAmount +### GetOriginatorPubkey -`func (o *TransactRequest) SetToAmount(v string)` +`func (o *TransactRequest) GetOriginatorPubkey() string` -SetToAmount sets ToAmount field to given value. +GetOriginatorPubkey returns the OriginatorPubkey field if non-nil, zero value otherwise. + +### GetOriginatorPubkeyOk + +`func (o *TransactRequest) GetOriginatorPubkeyOk() (*string, bool)` + +GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -### HasToAmount +### SetOriginatorPubkey -`func (o *TransactRequest) HasToAmount() bool` +`func (o *TransactRequest) SetOriginatorPubkey(v string)` -HasToAmount returns a boolean if a field has been set. +SetOriginatorPubkey sets OriginatorPubkey field to given value. -### GetToToken -`func (o *TransactRequest) GetToToken() string` +### GetSourceAsset -GetToToken returns the ToToken field if non-nil, zero value otherwise. +`func (o *TransactRequest) GetSourceAsset() TransactRequestSourceAsset` -### GetToTokenOk +GetSourceAsset returns the SourceAsset field if non-nil, zero value otherwise. -`func (o *TransactRequest) GetToTokenOk() (*string, bool)` +### GetSourceAssetOk -GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise +`func (o *TransactRequest) GetSourceAssetOk() (*TransactRequestSourceAsset, bool)` + +GetSourceAssetOk returns a tuple with the SourceAsset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetToToken +### SetSourceAsset + +`func (o *TransactRequest) SetSourceAsset(v TransactRequestSourceAsset)` + +SetSourceAsset sets SourceAsset field to given value. + + +### GetDestinyAsset -`func (o *TransactRequest) SetToToken(v string)` +`func (o *TransactRequest) GetDestinyAsset() TransactRequestSourceAsset` + +GetDestinyAsset returns the DestinyAsset field if non-nil, zero value otherwise. + +### GetDestinyAssetOk + +`func (o *TransactRequest) GetDestinyAssetOk() (*TransactRequestSourceAsset, bool)` + +GetDestinyAssetOk returns a tuple with the DestinyAsset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -SetToToken sets ToToken field to given value. +### SetDestinyAsset -### HasToToken +`func (o *TransactRequest) SetDestinyAsset(v TransactRequestSourceAsset)` -`func (o *TransactRequest) HasToToken() bool` +SetDestinyAsset sets DestinyAsset field to given value. -HasToToken returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md new file mode 100644 index 0000000000..2c1bf0579d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md @@ -0,0 +1,171 @@ +# TransactRequestSourceAsset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | | +**Ontology** | **string** | | +**ContractName** | **string** | | +**ContractAddress** | Pointer to **string** | | [optional] +**MspId** | Pointer to **string** | | [optional] +**ChannelName** | Pointer to **string** | | [optional] + +## Methods + +### NewTransactRequestSourceAsset + +`func NewTransactRequestSourceAsset(owner string, ontology string, contractName string, ) *TransactRequestSourceAsset` + +NewTransactRequestSourceAsset instantiates a new TransactRequestSourceAsset object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactRequestSourceAssetWithDefaults + +`func NewTransactRequestSourceAssetWithDefaults() *TransactRequestSourceAsset` + +NewTransactRequestSourceAssetWithDefaults instantiates a new TransactRequestSourceAsset object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *TransactRequestSourceAsset) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *TransactRequestSourceAsset) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *TransactRequestSourceAsset) SetOwner(v string)` + +SetOwner sets Owner field to given value. + + +### GetOntology + +`func (o *TransactRequestSourceAsset) GetOntology() string` + +GetOntology returns the Ontology field if non-nil, zero value otherwise. + +### GetOntologyOk + +`func (o *TransactRequestSourceAsset) GetOntologyOk() (*string, bool)` + +GetOntologyOk returns a tuple with the Ontology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOntology + +`func (o *TransactRequestSourceAsset) SetOntology(v string)` + +SetOntology sets Ontology field to given value. + + +### GetContractName + +`func (o *TransactRequestSourceAsset) GetContractName() string` + +GetContractName returns the ContractName field if non-nil, zero value otherwise. + +### GetContractNameOk + +`func (o *TransactRequestSourceAsset) GetContractNameOk() (*string, bool)` + +GetContractNameOk returns a tuple with the ContractName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContractName + +`func (o *TransactRequestSourceAsset) SetContractName(v string)` + +SetContractName sets ContractName field to given value. + + +### GetContractAddress + +`func (o *TransactRequestSourceAsset) GetContractAddress() string` + +GetContractAddress returns the ContractAddress field if non-nil, zero value otherwise. + +### GetContractAddressOk + +`func (o *TransactRequestSourceAsset) GetContractAddressOk() (*string, bool)` + +GetContractAddressOk returns a tuple with the ContractAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContractAddress + +`func (o *TransactRequestSourceAsset) SetContractAddress(v string)` + +SetContractAddress sets ContractAddress field to given value. + +### HasContractAddress + +`func (o *TransactRequestSourceAsset) HasContractAddress() bool` + +HasContractAddress returns a boolean if a field has been set. + +### GetMspId + +`func (o *TransactRequestSourceAsset) GetMspId() string` + +GetMspId returns the MspId field if non-nil, zero value otherwise. + +### GetMspIdOk + +`func (o *TransactRequestSourceAsset) GetMspIdOk() (*string, bool)` + +GetMspIdOk returns a tuple with the MspId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMspId + +`func (o *TransactRequestSourceAsset) SetMspId(v string)` + +SetMspId sets MspId field to given value. + +### HasMspId + +`func (o *TransactRequestSourceAsset) HasMspId() bool` + +HasMspId returns a boolean if a field has been set. + +### GetChannelName + +`func (o *TransactRequestSourceAsset) GetChannelName() string` + +GetChannelName returns the ChannelName field if non-nil, zero value otherwise. + +### GetChannelNameOk + +`func (o *TransactRequestSourceAsset) GetChannelNameOk() (*string, bool)` + +GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChannelName + +`func (o *TransactRequestSourceAsset) SetChannelName(v string)` + +SetChannelName sets ChannelName field to given value. + +### HasChannelName + +`func (o *TransactRequestSourceAsset) HasChannelName() bool` + +HasChannelName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md index 2321303ad9..1149778379 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md @@ -237,7 +237,7 @@ import ( ) func main() { - transactRequest := *openapiclient.NewTransactRequest("123e4567-e89b-12d3-a456-426614174000", "transfer") // TransactRequest | + transactRequest := *openapiclient.NewTransactRequest("123e4567-e89b-12d3-a456-426614174000", "transfer", "network1", "network2", "100", "95", "BeneficiaryPubkey_example", "OriginatorPubkey_example", *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example"), *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example")) // TransactRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go new file mode 100644 index 0000000000..40c45a69fe --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go @@ -0,0 +1,279 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the Asset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Asset{} + +// Asset An asset +type Asset struct { + Owner string `json:"owner"` + Ontology string `json:"ontology"` + ContractName string `json:"contractName"` + ContractAddress *string `json:"contractAddress,omitempty"` + MspId *string `json:"mspId,omitempty"` + ChannelName *string `json:"channelName,omitempty"` +} + +// NewAsset instantiates a new Asset object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAsset(owner string, ontology string, contractName string) *Asset { + this := Asset{} + this.Owner = owner + this.Ontology = ontology + this.ContractName = contractName + return &this +} + +// NewAssetWithDefaults instantiates a new Asset object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetWithDefaults() *Asset { + this := Asset{} + return &this +} + +// GetOwner returns the Owner field value +func (o *Asset) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *Asset) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *Asset) SetOwner(v string) { + o.Owner = v +} + +// GetOntology returns the Ontology field value +func (o *Asset) GetOntology() string { + if o == nil { + var ret string + return ret + } + + return o.Ontology +} + +// GetOntologyOk returns a tuple with the Ontology field value +// and a boolean to check if the value has been set. +func (o *Asset) GetOntologyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ontology, true +} + +// SetOntology sets field value +func (o *Asset) SetOntology(v string) { + o.Ontology = v +} + +// GetContractName returns the ContractName field value +func (o *Asset) GetContractName() string { + if o == nil { + var ret string + return ret + } + + return o.ContractName +} + +// GetContractNameOk returns a tuple with the ContractName field value +// and a boolean to check if the value has been set. +func (o *Asset) GetContractNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContractName, true +} + +// SetContractName sets field value +func (o *Asset) SetContractName(v string) { + o.ContractName = v +} + +// GetContractAddress returns the ContractAddress field value if set, zero value otherwise. +func (o *Asset) GetContractAddress() string { + if o == nil || IsNil(o.ContractAddress) { + var ret string + return ret + } + return *o.ContractAddress +} + +// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetContractAddressOk() (*string, bool) { + if o == nil || IsNil(o.ContractAddress) { + return nil, false + } + return o.ContractAddress, true +} + +// HasContractAddress returns a boolean if a field has been set. +func (o *Asset) HasContractAddress() bool { + if o != nil && !IsNil(o.ContractAddress) { + return true + } + + return false +} + +// SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field. +func (o *Asset) SetContractAddress(v string) { + o.ContractAddress = &v +} + +// GetMspId returns the MspId field value if set, zero value otherwise. +func (o *Asset) GetMspId() string { + if o == nil || IsNil(o.MspId) { + var ret string + return ret + } + return *o.MspId +} + +// GetMspIdOk returns a tuple with the MspId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetMspIdOk() (*string, bool) { + if o == nil || IsNil(o.MspId) { + return nil, false + } + return o.MspId, true +} + +// HasMspId returns a boolean if a field has been set. +func (o *Asset) HasMspId() bool { + if o != nil && !IsNil(o.MspId) { + return true + } + + return false +} + +// SetMspId gets a reference to the given string and assigns it to the MspId field. +func (o *Asset) SetMspId(v string) { + o.MspId = &v +} + +// GetChannelName returns the ChannelName field value if set, zero value otherwise. +func (o *Asset) GetChannelName() string { + if o == nil || IsNil(o.ChannelName) { + var ret string + return ret + } + return *o.ChannelName +} + +// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Asset) GetChannelNameOk() (*string, bool) { + if o == nil || IsNil(o.ChannelName) { + return nil, false + } + return o.ChannelName, true +} + +// HasChannelName returns a boolean if a field has been set. +func (o *Asset) HasChannelName() bool { + if o != nil && !IsNil(o.ChannelName) { + return true + } + + return false +} + +// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. +func (o *Asset) SetChannelName(v string) { + o.ChannelName = &v +} + +func (o Asset) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Asset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["owner"] = o.Owner + toSerialize["ontology"] = o.Ontology + toSerialize["contractName"] = o.ContractName + if !IsNil(o.ContractAddress) { + toSerialize["contractAddress"] = o.ContractAddress + } + if !IsNil(o.MspId) { + toSerialize["mspId"] = o.MspId + } + if !IsNil(o.ChannelName) { + toSerialize["channelName"] = o.ChannelName + } + return toSerialize, nil +} + +type NullableAsset struct { + value *Asset + isSet bool +} + +func (v NullableAsset) Get() *Asset { + return v.value +} + +func (v *NullableAsset) Set(val *Asset) { + v.value = val + v.isSet = true +} + +func (v NullableAsset) IsSet() bool { + return v.isSet +} + +func (v *NullableAsset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAsset(val *Asset) *NullableAsset { + return &NullableAsset{value: val, isSet: true} +} + +func (v NullableAsset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAsset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go index a3bb88bc87..2669a7cb74 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go @@ -22,22 +22,32 @@ type TransactRequest struct { ContextID string `json:"contextID"` Mode string `json:"mode"` Payload *string `json:"payload,omitempty"` - FromDLTNetworkID *string `json:"fromDLTNetworkID,omitempty"` - ToDLTNetworkID *string `json:"toDLTNetworkID,omitempty"` - FromAmount *string `json:"fromAmount,omitempty"` - FromToken *string `json:"fromToken,omitempty"` - ToAmount *string `json:"toAmount,omitempty"` - ToToken *string `json:"toToken,omitempty"` + FromDLTNetworkID string `json:"fromDLTNetworkID"` + ToDLTNetworkID string `json:"toDLTNetworkID"` + FromAmount string `json:"fromAmount"` + ToAmount string `json:"toAmount"` + BeneficiaryPubkey string `json:"beneficiaryPubkey"` + OriginatorPubkey string `json:"originatorPubkey"` + SourceAsset TransactRequestSourceAsset `json:"sourceAsset"` + DestinyAsset TransactRequestSourceAsset `json:"destinyAsset"` } // NewTransactRequest instantiates a new TransactRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTransactRequest(contextID string, mode string) *TransactRequest { +func NewTransactRequest(contextID string, mode string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset) *TransactRequest { this := TransactRequest{} this.ContextID = contextID this.Mode = mode + this.FromDLTNetworkID = fromDLTNetworkID + this.ToDLTNetworkID = toDLTNetworkID + this.FromAmount = fromAmount + this.ToAmount = toAmount + this.BeneficiaryPubkey = beneficiaryPubkey + this.OriginatorPubkey = originatorPubkey + this.SourceAsset = sourceAsset + this.DestinyAsset = destinyAsset return &this } @@ -129,196 +139,196 @@ func (o *TransactRequest) SetPayload(v string) { o.Payload = &v } -// GetFromDLTNetworkID returns the FromDLTNetworkID field value if set, zero value otherwise. +// GetFromDLTNetworkID returns the FromDLTNetworkID field value func (o *TransactRequest) GetFromDLTNetworkID() string { - if o == nil || IsNil(o.FromDLTNetworkID) { + if o == nil { var ret string return ret } - return *o.FromDLTNetworkID + + return o.FromDLTNetworkID } -// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value if set, nil otherwise +// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value // and a boolean to check if the value has been set. func (o *TransactRequest) GetFromDLTNetworkIDOk() (*string, bool) { - if o == nil || IsNil(o.FromDLTNetworkID) { + if o == nil { return nil, false } - return o.FromDLTNetworkID, true -} - -// HasFromDLTNetworkID returns a boolean if a field has been set. -func (o *TransactRequest) HasFromDLTNetworkID() bool { - if o != nil && !IsNil(o.FromDLTNetworkID) { - return true - } - - return false + return &o.FromDLTNetworkID, true } -// SetFromDLTNetworkID gets a reference to the given string and assigns it to the FromDLTNetworkID field. +// SetFromDLTNetworkID sets field value func (o *TransactRequest) SetFromDLTNetworkID(v string) { - o.FromDLTNetworkID = &v + o.FromDLTNetworkID = v } -// GetToDLTNetworkID returns the ToDLTNetworkID field value if set, zero value otherwise. +// GetToDLTNetworkID returns the ToDLTNetworkID field value func (o *TransactRequest) GetToDLTNetworkID() string { - if o == nil || IsNil(o.ToDLTNetworkID) { + if o == nil { var ret string return ret } - return *o.ToDLTNetworkID + + return o.ToDLTNetworkID } -// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value if set, nil otherwise +// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value // and a boolean to check if the value has been set. func (o *TransactRequest) GetToDLTNetworkIDOk() (*string, bool) { - if o == nil || IsNil(o.ToDLTNetworkID) { + if o == nil { return nil, false } - return o.ToDLTNetworkID, true -} - -// HasToDLTNetworkID returns a boolean if a field has been set. -func (o *TransactRequest) HasToDLTNetworkID() bool { - if o != nil && !IsNil(o.ToDLTNetworkID) { - return true - } - - return false + return &o.ToDLTNetworkID, true } -// SetToDLTNetworkID gets a reference to the given string and assigns it to the ToDLTNetworkID field. +// SetToDLTNetworkID sets field value func (o *TransactRequest) SetToDLTNetworkID(v string) { - o.ToDLTNetworkID = &v + o.ToDLTNetworkID = v } -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. +// GetFromAmount returns the FromAmount field value func (o *TransactRequest) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { + if o == nil { var ret string return ret } - return *o.FromAmount + + return o.FromAmount } -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise +// GetFromAmountOk returns a tuple with the FromAmount field value // and a boolean to check if the value has been set. func (o *TransactRequest) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { + if o == nil { return nil, false } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *TransactRequest) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false + return &o.FromAmount, true } -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. +// SetFromAmount sets field value func (o *TransactRequest) SetFromAmount(v string) { - o.FromAmount = &v + o.FromAmount = v } -// GetFromToken returns the FromToken field value if set, zero value otherwise. -func (o *TransactRequest) GetFromToken() string { - if o == nil || IsNil(o.FromToken) { +// GetToAmount returns the ToAmount field value +func (o *TransactRequest) GetToAmount() string { + if o == nil { var ret string return ret } - return *o.FromToken + + return o.ToAmount } -// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise +// GetToAmountOk returns a tuple with the ToAmount field value // and a boolean to check if the value has been set. -func (o *TransactRequest) GetFromTokenOk() (*string, bool) { - if o == nil || IsNil(o.FromToken) { +func (o *TransactRequest) GetToAmountOk() (*string, bool) { + if o == nil { return nil, false } - return o.FromToken, true -} - -// HasFromToken returns a boolean if a field has been set. -func (o *TransactRequest) HasFromToken() bool { - if o != nil && !IsNil(o.FromToken) { - return true - } - - return false + return &o.ToAmount, true } -// SetFromToken gets a reference to the given string and assigns it to the FromToken field. -func (o *TransactRequest) SetFromToken(v string) { - o.FromToken = &v +// SetToAmount sets field value +func (o *TransactRequest) SetToAmount(v string) { + o.ToAmount = v } -// GetToAmount returns the ToAmount field value if set, zero value otherwise. -func (o *TransactRequest) GetToAmount() string { - if o == nil || IsNil(o.ToAmount) { +// GetBeneficiaryPubkey returns the BeneficiaryPubkey field value +func (o *TransactRequest) GetBeneficiaryPubkey() string { + if o == nil { var ret string return ret } - return *o.ToAmount + + return o.BeneficiaryPubkey } -// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise +// GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field value // and a boolean to check if the value has been set. -func (o *TransactRequest) GetToAmountOk() (*string, bool) { - if o == nil || IsNil(o.ToAmount) { +func (o *TransactRequest) GetBeneficiaryPubkeyOk() (*string, bool) { + if o == nil { return nil, false } - return o.ToAmount, true + return &o.BeneficiaryPubkey, true } -// HasToAmount returns a boolean if a field has been set. -func (o *TransactRequest) HasToAmount() bool { - if o != nil && !IsNil(o.ToAmount) { - return true +// SetBeneficiaryPubkey sets field value +func (o *TransactRequest) SetBeneficiaryPubkey(v string) { + o.BeneficiaryPubkey = v +} + +// GetOriginatorPubkey returns the OriginatorPubkey field value +func (o *TransactRequest) GetOriginatorPubkey() string { + if o == nil { + var ret string + return ret } - return false + return o.OriginatorPubkey } -// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. -func (o *TransactRequest) SetToAmount(v string) { - o.ToAmount = &v +// GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetOriginatorPubkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OriginatorPubkey, true } -// GetToToken returns the ToToken field value if set, zero value otherwise. -func (o *TransactRequest) GetToToken() string { - if o == nil || IsNil(o.ToToken) { - var ret string +// SetOriginatorPubkey sets field value +func (o *TransactRequest) SetOriginatorPubkey(v string) { + o.OriginatorPubkey = v +} + +// GetSourceAsset returns the SourceAsset field value +func (o *TransactRequest) GetSourceAsset() TransactRequestSourceAsset { + if o == nil { + var ret TransactRequestSourceAsset return ret } - return *o.ToToken + + return o.SourceAsset } -// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise +// GetSourceAssetOk returns a tuple with the SourceAsset field value // and a boolean to check if the value has been set. -func (o *TransactRequest) GetToTokenOk() (*string, bool) { - if o == nil || IsNil(o.ToToken) { +func (o *TransactRequest) GetSourceAssetOk() (*TransactRequestSourceAsset, bool) { + if o == nil { return nil, false } - return o.ToToken, true + return &o.SourceAsset, true } -// HasToToken returns a boolean if a field has been set. -func (o *TransactRequest) HasToToken() bool { - if o != nil && !IsNil(o.ToToken) { - return true +// SetSourceAsset sets field value +func (o *TransactRequest) SetSourceAsset(v TransactRequestSourceAsset) { + o.SourceAsset = v +} + +// GetDestinyAsset returns the DestinyAsset field value +func (o *TransactRequest) GetDestinyAsset() TransactRequestSourceAsset { + if o == nil { + var ret TransactRequestSourceAsset + return ret } - return false + return o.DestinyAsset +} + +// GetDestinyAssetOk returns a tuple with the DestinyAsset field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetDestinyAssetOk() (*TransactRequestSourceAsset, bool) { + if o == nil { + return nil, false + } + return &o.DestinyAsset, true } -// SetToToken gets a reference to the given string and assigns it to the ToToken field. -func (o *TransactRequest) SetToToken(v string) { - o.ToToken = &v +// SetDestinyAsset sets field value +func (o *TransactRequest) SetDestinyAsset(v TransactRequestSourceAsset) { + o.DestinyAsset = v } func (o TransactRequest) MarshalJSON() ([]byte, error) { @@ -336,24 +346,14 @@ func (o TransactRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.Payload) { toSerialize["payload"] = o.Payload } - if !IsNil(o.FromDLTNetworkID) { - toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID - } - if !IsNil(o.ToDLTNetworkID) { - toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.FromToken) { - toSerialize["fromToken"] = o.FromToken - } - if !IsNil(o.ToAmount) { - toSerialize["toAmount"] = o.ToAmount - } - if !IsNil(o.ToToken) { - toSerialize["toToken"] = o.ToToken - } + toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID + toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID + toSerialize["fromAmount"] = o.FromAmount + toSerialize["toAmount"] = o.ToAmount + toSerialize["beneficiaryPubkey"] = o.BeneficiaryPubkey + toSerialize["originatorPubkey"] = o.OriginatorPubkey + toSerialize["sourceAsset"] = o.SourceAsset + toSerialize["destinyAsset"] = o.DestinyAsset return toSerialize, nil } diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go new file mode 100644 index 0000000000..efa04419c1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go @@ -0,0 +1,279 @@ +/* +SATP Gateway Client (Business Logic Orchestrator) + +SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the TransactRequestSourceAsset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactRequestSourceAsset{} + +// TransactRequestSourceAsset An asset +type TransactRequestSourceAsset struct { + Owner string `json:"owner"` + Ontology string `json:"ontology"` + ContractName string `json:"contractName"` + ContractAddress *string `json:"contractAddress,omitempty"` + MspId *string `json:"mspId,omitempty"` + ChannelName *string `json:"channelName,omitempty"` +} + +// NewTransactRequestSourceAsset instantiates a new TransactRequestSourceAsset object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactRequestSourceAsset(owner string, ontology string, contractName string) *TransactRequestSourceAsset { + this := TransactRequestSourceAsset{} + this.Owner = owner + this.Ontology = ontology + this.ContractName = contractName + return &this +} + +// NewTransactRequestSourceAssetWithDefaults instantiates a new TransactRequestSourceAsset object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactRequestSourceAssetWithDefaults() *TransactRequestSourceAsset { + this := TransactRequestSourceAsset{} + return &this +} + +// GetOwner returns the Owner field value +func (o *TransactRequestSourceAsset) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *TransactRequestSourceAsset) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *TransactRequestSourceAsset) SetOwner(v string) { + o.Owner = v +} + +// GetOntology returns the Ontology field value +func (o *TransactRequestSourceAsset) GetOntology() string { + if o == nil { + var ret string + return ret + } + + return o.Ontology +} + +// GetOntologyOk returns a tuple with the Ontology field value +// and a boolean to check if the value has been set. +func (o *TransactRequestSourceAsset) GetOntologyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ontology, true +} + +// SetOntology sets field value +func (o *TransactRequestSourceAsset) SetOntology(v string) { + o.Ontology = v +} + +// GetContractName returns the ContractName field value +func (o *TransactRequestSourceAsset) GetContractName() string { + if o == nil { + var ret string + return ret + } + + return o.ContractName +} + +// GetContractNameOk returns a tuple with the ContractName field value +// and a boolean to check if the value has been set. +func (o *TransactRequestSourceAsset) GetContractNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContractName, true +} + +// SetContractName sets field value +func (o *TransactRequestSourceAsset) SetContractName(v string) { + o.ContractName = v +} + +// GetContractAddress returns the ContractAddress field value if set, zero value otherwise. +func (o *TransactRequestSourceAsset) GetContractAddress() string { + if o == nil || IsNil(o.ContractAddress) { + var ret string + return ret + } + return *o.ContractAddress +} + +// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestSourceAsset) GetContractAddressOk() (*string, bool) { + if o == nil || IsNil(o.ContractAddress) { + return nil, false + } + return o.ContractAddress, true +} + +// HasContractAddress returns a boolean if a field has been set. +func (o *TransactRequestSourceAsset) HasContractAddress() bool { + if o != nil && !IsNil(o.ContractAddress) { + return true + } + + return false +} + +// SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field. +func (o *TransactRequestSourceAsset) SetContractAddress(v string) { + o.ContractAddress = &v +} + +// GetMspId returns the MspId field value if set, zero value otherwise. +func (o *TransactRequestSourceAsset) GetMspId() string { + if o == nil || IsNil(o.MspId) { + var ret string + return ret + } + return *o.MspId +} + +// GetMspIdOk returns a tuple with the MspId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestSourceAsset) GetMspIdOk() (*string, bool) { + if o == nil || IsNil(o.MspId) { + return nil, false + } + return o.MspId, true +} + +// HasMspId returns a boolean if a field has been set. +func (o *TransactRequestSourceAsset) HasMspId() bool { + if o != nil && !IsNil(o.MspId) { + return true + } + + return false +} + +// SetMspId gets a reference to the given string and assigns it to the MspId field. +func (o *TransactRequestSourceAsset) SetMspId(v string) { + o.MspId = &v +} + +// GetChannelName returns the ChannelName field value if set, zero value otherwise. +func (o *TransactRequestSourceAsset) GetChannelName() string { + if o == nil || IsNil(o.ChannelName) { + var ret string + return ret + } + return *o.ChannelName +} + +// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactRequestSourceAsset) GetChannelNameOk() (*string, bool) { + if o == nil || IsNil(o.ChannelName) { + return nil, false + } + return o.ChannelName, true +} + +// HasChannelName returns a boolean if a field has been set. +func (o *TransactRequestSourceAsset) HasChannelName() bool { + if o != nil && !IsNil(o.ChannelName) { + return true + } + + return false +} + +// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. +func (o *TransactRequestSourceAsset) SetChannelName(v string) { + o.ChannelName = &v +} + +func (o TransactRequestSourceAsset) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactRequestSourceAsset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["owner"] = o.Owner + toSerialize["ontology"] = o.Ontology + toSerialize["contractName"] = o.ContractName + if !IsNil(o.ContractAddress) { + toSerialize["contractAddress"] = o.ContractAddress + } + if !IsNil(o.MspId) { + toSerialize["mspId"] = o.MspId + } + if !IsNil(o.ChannelName) { + toSerialize["channelName"] = o.ChannelName + } + return toSerialize, nil +} + +type NullableTransactRequestSourceAsset struct { + value *TransactRequestSourceAsset + isSet bool +} + +func (v NullableTransactRequestSourceAsset) Get() *TransactRequestSourceAsset { + return v.value +} + +func (v *NullableTransactRequestSourceAsset) Set(val *TransactRequestSourceAsset) { + v.value = val + v.isSet = true +} + +func (v NullableTransactRequestSourceAsset) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactRequestSourceAsset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactRequestSourceAsset(val *TransactRequestSourceAsset) *NullableTransactRequestSourceAsset { + return &NullableTransactRequestSourceAsset{value: val, isSet: true} +} + +func (v NullableTransactRequestSourceAsset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactRequestSourceAsset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json index 3d121dfd3f..2b42e56f90 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json @@ -58,7 +58,15 @@ "type": "object", "required": [ "contextID", - "mode" + "mode", + "fromDLTNetworkID", + "toDLTNetworkID", + "fromAmount", + "toAmount", + "beneficiaryPubkey", + "originatorPubkey", + "sourceAsset", + "destinyAsset" ], "properties": { "contextID": { @@ -90,17 +98,73 @@ "type": "string", "example": "100" }, - "fromToken": { - "type": "string", - "example": "TOKEN1" - }, "toAmount": { "type": "string", "example": "95" }, - "toToken": { - "type": "string", - "example": "TOKEN2" + "beneficiaryPubkey": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "sourceAsset": { + "description": "An asset", + "type": "object", + "required": [ + "owner", + "ontology", + "contractName" + ], + "properties": { + "owner": { + "type": "string" + }, + "ontology": { + "type": "string" + }, + "contractName": { + "type": "string" + }, + "contractAddress": { + "type": "string" + }, + "mspId": { + "type": "string" + }, + "channelName": { + "type": "string" + } + } + }, + "destinyAsset": { + "description": "An asset", + "type": "object", + "required": [ + "owner", + "ontology", + "contractName" + ], + "properties": { + "owner": { + "type": "string" + }, + "ontology": { + "type": "string" + }, + "contractName": { + "type": "string" + }, + "contractAddress": { + "type": "string" + }, + "mspId": { + "type": "string" + }, + "channelName": { + "type": "string" + } + } } } } @@ -2659,12 +2723,49 @@ }, "example": "123e4567-e89b-12d3-a456-426614174000" }, + "Asset": { + "description": "An asset", + "type": "object", + "required": [ + "owner", + "ontology", + "contractName" + ], + "properties": { + "owner": { + "type": "string" + }, + "ontology": { + "type": "string" + }, + "contractName": { + "type": "string" + }, + "contractAddress": { + "type": "string" + }, + "mspId": { + "type": "string" + }, + "channelName": { + "type": "string" + } + } + }, "TransactRequest": { "description": "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks.", "type": "object", "required": [ "contextID", - "mode" + "mode", + "fromDLTNetworkID", + "toDLTNetworkID", + "fromAmount", + "toAmount", + "beneficiaryPubkey", + "originatorPubkey", + "sourceAsset", + "destinyAsset" ], "properties": { "contextID": { @@ -2696,17 +2797,73 @@ "type": "string", "example": "100" }, - "fromToken": { - "type": "string", - "example": "TOKEN1" - }, "toAmount": { "type": "string", "example": "95" }, - "toToken": { - "type": "string", - "example": "TOKEN2" + "beneficiaryPubkey": { + "type": "string" + }, + "originatorPubkey": { + "type": "string" + }, + "sourceAsset": { + "description": "An asset", + "type": "object", + "required": [ + "owner", + "ontology", + "contractName" + ], + "properties": { + "owner": { + "type": "string" + }, + "ontology": { + "type": "string" + }, + "contractName": { + "type": "string" + }, + "contractAddress": { + "type": "string" + }, + "mspId": { + "type": "string" + }, + "channelName": { + "type": "string" + } + } + }, + "destinyAsset": { + "description": "An asset", + "type": "object", + "required": [ + "owner", + "ontology", + "contractName" + ], + "properties": { + "owner": { + "type": "string" + }, + "ontology": { + "type": "string" + }, + "contractName": { + "type": "string" + }, + "contractAddress": { + "type": "string" + }, + "mspId": { + "type": "string" + }, + "channelName": { + "type": "string" + } + } } } }, diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto index 88f464488c..912f5a216a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -38,12 +38,19 @@ message TransferClaims { uint64 max_timeout = 14; string amount_from_originator = 15; string amount_to_beneficiary = 16; + repeated PrivacyPolicy processPolicies = 17; + repeated PrivacyPolicy mergePolicies = 18; } message TransferClaimsFormat { } +message PrivacyPolicy { + string name = 1; + repeated string arguments = 2; + } + message Permissions { } @@ -109,6 +116,10 @@ enum MessageType { MESSAGE_TYPE_COMMIT_FINAL = 15; MESSAGE_TYPE_ACK_COMMIT_FINAL = 16; MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 17; + MESSAGE_TYPE_NEW_SESSION_REQUEST = 18; + MESSAGE_TYPE_NEW_SESSION_RESPONSE = 19; + MESSAGE_TYPE_PRE_SATP_TRANSFER_REQUEST = 20; + MESSAGE_TYPE_PRE_SATP_TRANSFER_RESPONSE = 21; } message CommonSatp { @@ -235,3 +246,31 @@ message AssignmentAssertionClaim { string signature = 2; } +message WrapAssertionClaim { + string receipt = 1; + string signature = 2; +} + +enum TokenType { + TOKEN_TYPE_ERC20 = 0; + TOKEN_TYPE_ERC721 = 1; + TOKEN_TYPE_ERC1155 = 2; + TOKEN_TYPE_NONSTANDARD = 3; +} + +message Asset { + string token_id = 1; + TokenType token_type = 2; + string owner = 3; + uint64 amount = 4; + string ontology = 5; + string contract_name = 7; + //besu + string contract_address = 6; + //fabric + string msp_id = 8; + string channel_name = 9; + + +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto index ec33400858..a4f0de9bc9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/session.proto @@ -68,14 +68,28 @@ message SessionData { string server_transfer_number = 58; uint64 lock_assertion_expiration = 59; cacti.satp.v02.common.AssetProfile asset_profile = 60; - string resource_url = 61; + string sender_contract_ontology = 61; + string receiver_contract_ontology = 62; + string resource_url = 63; + cacti.satp.v02.common.WrapAssertionClaim sender_wrap_assertion_claim = 64; + cacti.satp.v02.common.WrapAssertionClaim receiver_wrap_assertion_claim = 65; + cacti.satp.v02.common.Asset sender_asset = 66; + cacti.satp.v02.common.Asset receiver_asset = 67; } message MessageStagesHashes { - Stage1Hashes stage1 = 1; - Stage2Hashes stage2 = 2; - Stage3Hashes stage3 = 3; + Stage0Hashes stage0 = 1; + Stage1Hashes stage1 = 2; + Stage2Hashes stage2 = 3; + Stage3Hashes stage3 = 4; +} + +message Stage0Hashes { + string new_session_request_message_hash = 1; + string new_session_response_message_hash = 2; + string pre_satp_transfer_request_message_hash = 3; + string pre_satp_transfer_response_message_hash = 4; } message Stage1Hashes { @@ -100,9 +114,17 @@ message Stage3Hashes { } message MessageStagesSignatures { - Stage1Signatures stage1 = 1; - Stage2Signatures stage2 = 2; - Stage3Signatures stage3 = 3; + Stage0Signatures stage0 = 1; + Stage1Signatures stage1 = 2; + Stage2Signatures stage2 = 3; + Stage3Signatures stage3 = 4; +} + +message Stage0Signatures { + string new_session_request_message_signature = 1; + string new_session_response_message_signature = 2; + string pre_satp_transfer_request_message_signature = 3; + string pre_satp_transfer_response_message_signature = 4; } message Stage1Signatures { @@ -127,9 +149,17 @@ message Stage3Signatures { } message MessageStagesTimestamps { - Stage1Timestamps stage1 = 1; - Stage2Timestamps stage2 = 2; - Stage3Timestamps stage3 = 3; + Stage0Timestamps stage0 = 1; + Stage1Timestamps stage1 = 2; + Stage2Timestamps stage2 = 3; + Stage3Timestamps stage3 = 4; +} + +message Stage0Timestamps { + string new_session_request_message_timestamp = 1; + string new_session_response_message_timestamp = 2; + string pre_satp_transfer_request_message_timestamp = 3; + string pre_satp_transfer_response_message_timestamp = 4; } message Stage1Timestamps { diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto index 7172208c82..fb551c9902 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_0.proto @@ -5,43 +5,64 @@ package cacti.satp.v02; import "cacti/satp/v02/common/message.proto"; import "google/protobuf/empty.proto"; -message PrivacyPolicy { - string name = 1; - repeated string arguments = 2; +enum STATUS { + STATUS_UNSPECIFIED = 0; + STATUS_ACCEPTED = 1; + STATUS_REJECTED = 2; } -message PreTransferVerificationAndContextEstablishmentRequest { - cacti.satp.v02.common.CommonSatp context = 1; - cacti.satp.v02.common.TransferClaims transfer_claims = 2; // needed ? - repeated PrivacyPolicy processPolicies = 3; - repeated PrivacyPolicy mergePolicies = 4; + +message NewSessionRequest { + string session_id = 1; + string context_id = 2; + string client_transfer_number = 3; + string sender_gateway_network_id = 4; + string recipient_gateway_network_id = 5; + string gateway_id = 6; //TODO FIX this change so it gets the gateway ID from channel + string client_signature = 7; } -// TODO -message PreTransferVerificationAndContextEstablishmentResponse { - cacti.satp.v02.common.CommonSatp context = 1; - repeated PrivacyPolicy processPolicies_counter_proposal = 2; - repeated PrivacyPolicy mergePolicies_counter_proposal = 3; - string hash_pre_transfer_verification_and_context = 4; - string timestamp = 5; +message NewSessionResponse { + string session_id = 1; + string context_id = 2; + STATUS status = 3; + string hash_previous_message = 4; + string sender_gateway_network_id = 5; + string recipient_gateway_network_id = 6; + string server_signature = 7; } -message PreTransferCommenceRequestMessage { - cacti.satp.v02.common.CommonSatp common = 1; - string hash_pre_transfer_verification_and_context = 2; + +message PreSATPTransferRequest { + string session_id = 1; + string context_id = 2; string client_transfer_number = 3; + string sender_gateway_network_id = 4; + string recipient_gateway_network_id = 5; + cacti.satp.v02.common.Asset sender_asset = 6; + cacti.satp.v02.common.Asset receiver_asset = 7; + cacti.satp.v02.common.WrapAssertionClaim wrap_assertion_claim = 8; + string hash_previous_message = 9; + string client_signature = 10; +} + +message PreSATPTransferResponse { + string session_id = 1; + string context_id = 2; + cacti.satp.v02.common.WrapAssertionClaim wrap_assertion_claim = 3; + string hash_previous_message = 4; + string recipient_token_id = 5; + string server_signature = 6; } -message PreTransferCommenceResponseMessage { - cacti.satp.v02.common.CommonSatp common = 1; + +message CheckRequest { + string check = 1; } -message PublicKey { - string public_key = 1; +message CheckResponse { + string check = 1; } -service SatpStage0Service { - // util RPCs - rpc GetPublicKey(google.protobuf.Empty) returns (PublicKey) {}; - // step RPCs - rpc PreTransferProposalClaims(PreTransferVerificationAndContextEstablishmentRequest) returns (PreTransferVerificationAndContextEstablishmentResponse) {}; - rpc PreTransferCommence(PreTransferCommenceRequestMessage) returns (PreTransferCommenceResponseMessage) {} - // todo other rpcs +service SatpStage0Service { + rpc NewSession(NewSessionRequest) returns (NewSessionResponse) {} + rpc PreSATPTransfer(PreSATPTransferRequest) returns (PreSATPTransferResponse) {} + rpc Check(CheckRequest) returns (CheckResponse) {} } \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 966de6ef1c..8b4441f2df 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -16,11 +16,14 @@ import { GetStatusEndpointV1 } from "../web-services/status-endpoint"; import { StatusRequest, StatusResponse, + TransactRequest, + TransactResponse, } from "../generated/gateway-client/typescript-axios/api"; import { ExecuteGetStatus } from "./admin/get-status-handler-service"; import { ISATPManagerOptions, SATPManager } from "../gol/satp-manager"; import { GatewayOrchestrator } from "../gol/gateway-orchestrator"; import { SATPBridgesManager } from "../gol/satp-bridges-manager"; +import { ExecuteTransact } from "./transaction/transact-handler-service"; export interface BLODispatcherOptions { logger: Logger; @@ -29,6 +32,7 @@ export interface BLODispatcherOptions { orchestrator: GatewayOrchestrator; signer: JsObjectSigner; bridgesManager: SATPBridgesManager; + pubKey: string; } export class BLODispatcher { @@ -61,7 +65,8 @@ export class BLODispatcher { signer: signer, supportedDLTs: this.orchestrator.supportedDLTs, bridgeManager: this.bridgeManager, - orquestrator: this.orchestrator, + orchestrator: this.orchestrator, + pubKey: options.pubKey, }; this.manager = new SATPManager(SATPManagerOpts); @@ -111,8 +116,15 @@ export class BLODispatcher { return ExecuteGetStatus(this.logger, req); } - public async Transact(req: StatusRequest): Promise { - return ExecuteGetStatus(this.logger, req); + public async Transact(req: TransactRequest): Promise { + //TODO pre-verify verify input + const res = await ExecuteTransact( + this.logger, + req, + this.manager, + this.orchestrator, + ); + return res; } // get channel by caller; give needed client from orchestrator to handler to call // for all channels, find session id on request diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts index 65b3dba385..5b6e7b74d4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts @@ -1 +1,115 @@ +import { Logger } from "@hyperledger/cactus-common"; +import { + TransactRequest, + TransactResponse, + Transact200ResponseStatusResponseOriginChain, + StatusResponse, +} from "../../public-api"; +import { SATPManager } from "../../gol/satp-manager"; +import { populateClientSessionData } from "../../core/session-utils"; +import { + CredentialProfile, + LockType, + SignatureAlgorithm, +} from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { GatewayOrchestrator } from "../../gol/gateway-orchestrator"; +import { GatewayIdentity } from "../../core/types"; +import { SATP_VERSION } from "../../core/constants"; + // todo +export async function ExecuteTransact( + logger: Logger, + req: TransactRequest, + manager: SATPManager, + gol: GatewayOrchestrator, +): Promise { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const fn = "BLO#transact-handler-service#ExecuteTransact"; + + //TODO check input for valid strings... + const ourGateway: GatewayIdentity = gol.ourGateway; + const senderGatewayOwnerId: string = ourGateway.id; + + //This data is set in satpManager GOL + const serverGatewayPubkey: string = ""; + const receiverGatewayOwnerId: string = ""; + + //Default, make it configurable by injecting sign function + const signatureAlgorithm: SignatureAlgorithm = SignatureAlgorithm.ECDSA; + + //Default, TODO + const lockType: LockType = LockType.DESTROYBURN; + //In milliseconds (5min) + const lockExpirationTime: bigint = BigInt(1000 * 60 * 5); + + const credentialProfile: CredentialProfile = CredentialProfile.UNSPECIFIED; + const loggingProfile: string = "MOCK_LOGGING_PROFILE"; + const accessControlProfile: string = "MOCK_ACCESS_CONTROL_PROFILE"; + + //todo verify ontologies signatures, validation, etc. + + let session = manager.getOrCreateSession(undefined, req.contextID); + session = populateClientSessionData( + session, + SATP_VERSION, + req.sourceAsset.contractAddress, + req.destinyAsset.contractAddress, + req.originatorPubkey, + req.beneficiaryPubkey, + req.fromDLTNetworkID, + req.toDLTNetworkID, + manager.pubKey, + serverGatewayPubkey, + receiverGatewayOwnerId, + senderGatewayOwnerId, + signatureAlgorithm, + lockType, + lockExpirationTime, + credentialProfile, + loggingProfile ? loggingProfile : "", + accessControlProfile, + req.sourceAsset.ontology, + req.destinyAsset.ontology, + req.fromAmount, + req.toAmount, + req.sourceAsset.mspId ? req.sourceAsset.mspId : "", + req.sourceAsset.channelName ? req.sourceAsset.channelName : "", + req.destinyAsset.mspId ? req.destinyAsset.mspId : "", + req.destinyAsset.channelName ? req.destinyAsset.channelName : "", + req.sourceAsset.contractName, + req.destinyAsset.contractName, + req.sourceAsset.owner, + req.destinyAsset.owner, + ); + await manager.initiateTransfer(session); + + //mock + const originChain: Transact200ResponseStatusResponseOriginChain = { + dltProtocol: "besu", + dltSubnetworkID: "v24.4.0-RC1", + }; + + const destinationChain: Transact200ResponseStatusResponseOriginChain = { + dltProtocol: "besu", + dltSubnetworkID: "v24.4.0-RC1", + }; + + const mock: StatusResponse = { + status: "DONE", + substatus: "COMPLETED", + stage: "STAGE3", + step: "transfer-complete-message", + startTime: "2023-03-14T16:50:06.662Z", + originChain: originChain, + destinationChain: destinationChain, + }; + + logger.info(req); + // logger.error("GetStatusService not implemented"); + // throw new GetStatusError(req.sessionID, "GetStatusService not implemented"); + + return { + sessionID: session.getSessionId(), + statusResponse: mock, + }; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts index 9d3773228e..bf18c70f4c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -1,5 +1,4 @@ export const DEFAULT_PORT_GATEWAY_SERVER = 3010; export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; -export const DEFAULT_PORT_GATEWAY_GRPC = 4010; export const SATP_VERSION = "v02"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts index 04e2ad1a01..fe37880ffe 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-handler-errors.ts @@ -13,13 +13,28 @@ export class SessionIdNotFoundError extends SATPInternalError { } export class FailedToCreateMessageError extends SATPInternalError { - constructor(tag: string, message: string) { - super(`${tag}, failed to create message: ${message}`, 500); + constructor(tag: string, message: string, cause?: Error) { + super( + `${tag}, failed to create message: ${message} \n stack: ${cause}`, + 500, + ); } } export class FailedToProcessError extends SATPInternalError { - constructor(tag: string, message: string) { - super(`${tag}, failed to process: ${message}`, 500); + constructor(tag: string, message: string, cause?: Error) { + super(`${tag}, failed to process: ${message} \n stack: ${cause}`, 500); + } +} + +export class SenderGatewayNetworkIdError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, senderGatewayNetworkId is empty`, 500); + } +} + +export class PubKeyError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, pubKey not found`, 500); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts index c5962c983f..548f59f6d7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/errors/satp-service-errors.ts @@ -1,168 +1,299 @@ import { SATPInternalError } from "./satp-errors"; export class SatpCommonBodyError extends SATPInternalError { - constructor(fnTag: string, data: string) { + constructor(tag: string, data: string) { super( - `${fnTag}, message satp common body is missing or is missing required fields \n ${data}`, + `${tag}, message satp common body is missing or is missing required fields \n ${data}`, 400, ); } } export class SessionError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, session undefined`, 500); + constructor(tag: string) { + super(`${tag}, session undefined`, 500); + } +} + +export class SessionIdError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, session id undefined`, 500); + } +} + +export class SessionMissMatchError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, session missmatch`, 500); } } export class SessionDataNotLoadedCorrectlyError extends SATPInternalError { - constructor(fnTag: string, data: string) { - super(`${fnTag}, session data was not loaded correctly \n ${data}`, 500); + constructor(tag: string, data: string, stack?: Error) { + super( + `${tag}, session data was not loaded correctly \n ${data} \n stack: ${stack} `, + 500, + ); + } +} + +export class SessionDataNotAvailableError extends SATPInternalError { + constructor(tag: string, type: string) { + super(`${tag}, ${type} session data not available`, 500); } } export class SessionCompletedError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, session data already completed`, 500); + constructor(tag: string) { + super(`${tag}, session data already completed`, 500); } } export class SATPVersionError extends SATPInternalError { - constructor(fnTag: string, unsupported: string, supported: string) { - super( - `${fnTag}, unsupported SATP version \n received: ${unsupported}, supported: ${supported}`, - 400, - ); + constructor(tag: string, unsupported?: string, supported?: string) { + if (!supported) { + super(`${tag}, SATP version is missing`, 400); + } else { + super( + `${tag}, unsupported SATP version \n received: ${unsupported}, supported: ${supported}`, + 400, + ); + } + } +} + +export class SignatureAlgorithmError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, signature algorithm is missing`, 400); } } export class SignatureVerificationError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, message signature verification failed`, 400); + constructor(tag: string) { + super(`${tag}, message signature verification failed`, 400); } } export class SignatureMissingError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, message signature missing`, 400); + constructor(tag: string) { + super(`${tag}, message signature missing`, 400); + } +} + +export class LockTypeError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, lock type missing`, 400); + } +} + +export class lockExpirationTimeError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, lock expiration time missing`, 400); + } +} + +export class CredentialProfileError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, credential profile missing`, 400); + } +} + +export class LoggingProfileError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, logging profile missing`, 400); + } +} + +export class AccessControlProfileError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, access control profile missing`, 400); } } export class MessageTypeError extends SATPInternalError { - constructor(fnTag: string, received: string, expected: string) { + constructor(tag: string, received: string, expected: string) { super( - `${fnTag}, message type miss match \n received: ${received} \n expected: ${expected}`, + `${tag}, message type miss match \n received: ${received} \n expected: ${expected}`, 400, ); } } export class TransferInitClaimsError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, transferInitClaims missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, transferInitClaims missing or faulty`, 400); } } export class TransferInitClaimsHashError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, transferInitClaims hash missing or missmatch`, 400); + constructor(tag: string) { + super(`${tag}, transferInitClaims hash missing or missmatch`, 400); } } export class NetworkCapabilitiesError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, NetworkCapabilitiesError missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, NetworkCapabilitiesError missing or faulty`, 400); } } export class DLTNotSupportedError extends SATPInternalError { - constructor(fnTag: string, dlt: string) { - super(`${fnTag}, DLT not supported \n received: ${dlt}`, 400); + constructor(tag: string, dlt: string) { + super(`${tag}, DLT not supported \n received: ${dlt}`, 400); } } export class ServerGatewayPubkeyError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, serverGatewayPubkey missing or missmatch`, 400); + constructor(tag: string) { + super(`${tag}, serverGatewayPubkey missing or missmatch`, 400); } } export class ClientGatewayPubkeyError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, clientGatewayPubkey missing or missmatch`, 400); + constructor(tag: string) { + super(`${tag}, clientGatewayPubkey missing or missmatch`, 400); } } export class SequenceNumberError extends SATPInternalError { - constructor(fnTag: string, received: bigint, expected: bigint) { + constructor(tag: string, received: bigint, expected: bigint) { super( - `${fnTag}, sequence number missmatch \n received: ${received} \n expected: ${expected}`, + `${tag}, sequence number missmatch \n received: ${received} \n expected: ${expected}`, 400, ); } } export class HashError extends SATPInternalError { - constructor(fnTag: string, received: string, expected: string) { + constructor(tag: string, received: string, expected: string) { super( - `${fnTag}, hash missmatch \n received: ${received} \n expected: ${expected}`, + `${tag}, hash missmatch \n received: ${received} \n expected: ${expected}`, 400, ); } } export class TransferContextIdError extends SATPInternalError { - constructor(fnTag: string, received: string, expected: string) { - super( - `${fnTag}, transferContextId missing or missmatch \n received: ${received} \n expected: ${expected}`, - 400, - ); + constructor(tag: string, received?: string, expected?: string) { + if (!received || !expected) { + super(`${tag}, transferContextId missing or missmatch`, 400); + } else { + super( + `${tag}, transferContextId missing or missmatch \n received: ${received} \n expected: ${expected}`, + 400, + ); + } } } export class MissingBridgeManagerError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, bridge manager missing`, 400); + constructor(tag: string) { + super(`${tag}, bridge manager missing`, 400); } } export class LockAssertionClaimError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, lockAssertionClaim missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, lockAssertionClaim missing or faulty`, 400); } } export class LockAssertionClaimFormatError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, lockAssertionClaimFormat missing`, 400); + constructor(tag: string) { + super(`${tag}, lockAssertionClaimFormat missing`, 400); } } export class LockAssertionExpirationError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, lockAssertionExpiration missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, lockAssertionExpiration missing or faulty`, 400); } } export class BurnAssertionClaimError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, burnAssertionClaim missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, burnAssertionClaim missing or faulty`, 400); } } export class MintAssertionClaimError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, mintAssertionClaim missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, mintAssertionClaim missing or faulty`, 400); } } export class AssignmentAssertionClaimError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, assignmentAssertionClaim missing or faulty`, 400); + constructor(tag: string) { + super(`${tag}, assignmentAssertionClaim missing or faulty`, 400); } } export class ResourceUrlError extends SATPInternalError { - constructor(fnTag: string) { - super(`${fnTag}, resourceUrl missing or missmatch`, 400); + constructor(tag: string) { + super(`${tag}, resourceUrl missing or missmatch`, 400); + } +} + +export class GatewayNetworkIdError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, gatewayNetworkId missing or missmatch`, 400); + } +} + +export class OntologyContractError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, ontologyContract missing or has problems`, 400); + } +} + +export class LedgerAssetIdError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, ledgerAssetId missing`, 400); + } +} + +export class LedgerAssetError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, ledgerAsset missing`, 400); + } +} + +export class NetworkIdError extends SATPInternalError { + constructor(tag: string, type: string) { + super(`${tag}, ${type} networkId missing or missmatch`, 400); + } +} + +export class AssetMissing extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, asset missing`, 400); + } +} + +export class WrapAssertionClaimError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, Wrap Assertion Claim missing or faulty`, 400); + } +} + +export class TokenIdMissingError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, tokenId missing`, 400); + } +} + +export class MissingRecipientError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, Recipient is missing`, 400); + } +} + +export class DigitalAssetIdError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, DigitalAssetId is missing`, 400); + } +} + +export class PubKeyError extends SATPInternalError { + constructor(tag: string) { + super(`${tag}, PubKey is missing`, 400); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index 432f3c6cdf..0080cd8d67 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -4,6 +4,9 @@ import { MessageStagesSignatures, MessageStagesTimestamps, SessionData, + Stage0Hashes, + Stage0Signatures, + Stage0Timestamps, Stage1Hashes, Stage1Signatures, Stage1Timestamps, @@ -15,12 +18,28 @@ import { Stage3Timestamps, } from "../generated/proto/cacti/satp/v02/common/session_pb"; import { + AccessControlProfileError, + ClientGatewayPubkeyError, + CredentialProfileError, + DigitalAssetIdError, + GatewayNetworkIdError, + lockExpirationTimeError, + LockTypeError, + LoggingProfileError, + PubKeyError, SATPVersionError, + ServerGatewayPubkeyError, SessionCompletedError, SessionDataNotLoadedCorrectlyError, + SessionIdError, + SignatureAlgorithmError, + TransferContextIdError, } from "./errors/satp-service-errors"; import { SATP_VERSION } from "./constants"; -import { LockType } from "../generated/proto/cacti/satp/v02/common/message_pb"; +import { + LockType, + SignatureAlgorithm, +} from "../generated/proto/cacti/satp/v02/common/message_pb"; import { SessionType } from "./session-utils"; // Define interface on protos @@ -44,14 +63,16 @@ export class SATPSession { if (ops.server) { this.serverSessionData = new SessionData(); this.serverSessionData.transferContextId = ops.contextID; - this.serverSessionData.id = this.generateSessionID(ops.contextID); + this.serverSessionData.id = + ops.sessionID || this.generateSessionID(ops.contextID); this.initialize(this.serverSessionData); } if (ops.client) { this.clientSessionData = new SessionData(); this.clientSessionData.transferContextId = ops.contextID; - this.clientSessionData.id = this.generateSessionID(ops.contextID); + this.clientSessionData.id = + ops.sessionID || this.generateSessionID(ops.contextID); this.initialize(this.clientSessionData); } } @@ -66,18 +87,22 @@ export class SATPSession { sessionData.processedTimestamps = new MessageStagesTimestamps(); sessionData.receivedTimestamps = new MessageStagesTimestamps(); + sessionData.processedTimestamps.stage0 = new Stage0Timestamps(); sessionData.processedTimestamps.stage1 = new Stage1Timestamps(); sessionData.processedTimestamps.stage2 = new Stage2Timestamps(); sessionData.processedTimestamps.stage3 = new Stage3Timestamps(); + sessionData.receivedTimestamps.stage0 = new Stage0Timestamps(); sessionData.receivedTimestamps.stage1 = new Stage1Timestamps(); sessionData.receivedTimestamps.stage2 = new Stage2Timestamps(); sessionData.receivedTimestamps.stage3 = new Stage3Timestamps(); + sessionData.hashes.stage0 = new Stage0Hashes(); sessionData.hashes.stage1 = new Stage1Hashes(); sessionData.hashes.stage2 = new Stage2Hashes(); sessionData.hashes.stage3 = new Stage3Hashes(); + sessionData.signatures.stage0 = new Stage0Signatures(); sessionData.signatures.stage1 = new Stage1Signatures(); sessionData.signatures.stage2 = new Stage2Signatures(); sessionData.signatures.stage3 = new Stage3Signatures(); @@ -101,6 +126,44 @@ export class SATPSession { return this.clientSessionData; } + public createSessionData( + type: SessionType, + sessionId: string, + contextId: string, + ): void { + if (type == SessionType.SERVER) { + if (this.serverSessionData !== undefined) { + throw new Error( + `${SATPSession.CLASS_NAME}#createSessionData(), serverSessionData already defined`, + ); + } + } else if (type == SessionType.CLIENT) { + if (this.clientSessionData !== undefined) { + throw new Error( + `${SATPSession.CLASS_NAME}#createSessionData(), clientSessionData already defined`, + ); + } + } else { + throw new Error( + `${SATPSession.CLASS_NAME}#createSessionData(), sessionData type is not valid`, + ); + } + + const sessionData = new SessionData(); + sessionData.transferContextId = contextId; + sessionData.id = sessionId; + this.initialize(sessionData); + + switch (type) { + case SessionType.SERVER: + this.serverSessionData = sessionData; + break; + case SessionType.CLIENT: + this.clientSessionData = sessionData; + break; + } + } + public hasServerSessionData(): boolean { return this.serverSessionData !== undefined; } @@ -110,60 +173,103 @@ export class SATPSession { } public getSessionId(): string { + console.log("serverSessionId: ", this.serverSessionData?.id); + console.log("clientSessionId: ", this.clientSessionData?.id); return this.serverSessionData?.id || this.clientSessionData?.id || ""; } public verify(tag: string, type: SessionType): void { let sessionData: SessionData | undefined; - if (type == SessionType.SERVER) { - sessionData = this.getServerSessionData(); - } else if (type == SessionType.CLIENT) { - sessionData = this.getClientSessionData(); - } else { - throw new Error( - `${SATPSession.CLASS_NAME}#verify(), sessionData type is not valid`, - ); - } + try { + if (type == SessionType.SERVER) { + sessionData = this.getServerSessionData(); + } else if (type == SessionType.CLIENT) { + sessionData = this.getClientSessionData(); + } else { + throw new Error( + `${SATPSession.CLASS_NAME}#verify(), sessionData type is not valid`, + ); + } - if (sessionData == undefined) { - throw new SessionDataNotLoadedCorrectlyError(tag, "undefined"); - } + if (sessionData == undefined) { + throw new SessionDataNotLoadedCorrectlyError(tag, "undefined"); + } - if (sessionData.completed) { - throw new SessionCompletedError("Session already completed"); - } - - if ( - sessionData.version == "" || - sessionData.id == "" || - sessionData.digitalAssetId == "" || - sessionData.originatorPubkey == "" || - sessionData.beneficiaryPubkey == "" || - sessionData.senderGatewayNetworkId == "" || - sessionData.recipientGatewayNetworkId == "" || - sessionData.clientGatewayPubkey == "" || - sessionData.serverGatewayPubkey == "" || - sessionData.senderGatewayOwnerId == "" || - sessionData.receiverGatewayOwnerId == "" || - // sessionData.maxRetries == undefined || - // sessionData.maxTimeout == undefined || - sessionData.senderGatewayNetworkId == "" || - sessionData.signatureAlgorithm == undefined || - sessionData.lockType == LockType.UNSPECIFIED || - sessionData.lockExpirationTime == BigInt(0) || - sessionData.credentialProfile == undefined || - sessionData.loggingProfile == "" || - sessionData.accessControlProfile == "" || - // sessionData.lastSequenceNumber == BigInt(0) || - sessionData.transferContextId == "" - ) { + if (sessionData.completed) { + throw new SessionCompletedError("Session already completed"); + } + if (sessionData.id == "") { + throw new SessionIdError(tag); + } + if (sessionData.digitalAssetId == "") { + throw new DigitalAssetIdError(tag); + } + if (sessionData.originatorPubkey == "") { + throw new PubKeyError(tag); + } + if (sessionData.beneficiaryPubkey == "") { + throw new PubKeyError(tag); + } + if (sessionData.senderGatewayNetworkId == "") { + throw new GatewayNetworkIdError(tag); + } + if (sessionData.recipientGatewayNetworkId == "") { + throw new GatewayNetworkIdError(tag); + } + if (sessionData.clientGatewayPubkey == "") { + throw new ClientGatewayPubkeyError(tag); + } + if (sessionData.serverGatewayPubkey == "") { + throw new ServerGatewayPubkeyError(tag); + } + if (sessionData.senderGatewayOwnerId == "") { + throw new GatewayNetworkIdError(tag); + } + if (sessionData.receiverGatewayOwnerId == "") { + throw new GatewayNetworkIdError(tag); + } + if (sessionData.signatureAlgorithm == SignatureAlgorithm.UNSPECIFIED) { + throw new SignatureAlgorithmError(tag); + } + if (sessionData.lockType == LockType.UNSPECIFIED) { + throw new LockTypeError(tag); + } + if (sessionData.lockExpirationTime == BigInt(0)) { + throw new lockExpirationTimeError(tag); + } + if (sessionData.credentialProfile == undefined) { + throw new CredentialProfileError(tag); + } + if (sessionData.loggingProfile == "") { + throw new LoggingProfileError(tag); + } + if (sessionData.accessControlProfile == "") { + throw new AccessControlProfileError(tag); + } + if (sessionData.transferContextId == "") { + throw new TransferContextIdError(tag); + } + if ( + // sessionData.maxRetries == undefined || + // sessionData.maxTimeout == undefined || + // sessionData.lastSequenceNumber == BigInt(0) || + false + ) { + throw new SessionDataNotLoadedCorrectlyError( + tag, + JSON.stringify(sessionData), + ); + } + if (sessionData.version != SATP_VERSION) { + throw new SATPVersionError(tag, sessionData.version, SATP_VERSION); + } + } catch (error) { + console.error(`${tag}, error: ${error}`); throw new SessionDataNotLoadedCorrectlyError( tag, JSON.stringify(sessionData), + error, ); } - if (sessionData.version != SATP_VERSION) { - throw new SATPVersionError(tag, sessionData.version, SATP_VERSION); - } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts index c0065f88c6..a799f9e730 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts @@ -1,25 +1,17 @@ import { + Asset, CredentialProfile, LockType, MessageType, SignatureAlgorithm, } from "../generated/proto/cacti/satp/v02/common/message_pb"; import { - MessageStagesHashes, - MessageStagesSignatures, MessageStagesTimestamps, SessionData, - Stage1Hashes, - Stage1Signatures, - Stage1Timestamps, - Stage2Hashes, - Stage2Signatures, - Stage2Timestamps, - Stage3Hashes, - Stage3Signatures, - Stage3Timestamps, } from "../generated/proto/cacti/satp/v02/common/session_pb"; +import { SATPSession } from "./satp-session"; +import { v4 as uuidv4 } from "uuid"; export enum TimestampType { PROCESSED = "PROCESSED", RECEIVED = "RECEIVED", @@ -30,10 +22,11 @@ export enum SessionType { CLIENT = "CLIENT", } -export function createSessionData( - id: string, +export function populateClientSessionData( + session: SATPSession, version: string, - digitalAssetId: string, + sourceContractAddress: string | undefined, + destinyContractAddress: string | undefined, originatorPubkey: string, beneficiaryPubkey: string, senderGatewayNetworkId: string, @@ -48,32 +41,26 @@ export function createSessionData( credentialProfile: CredentialProfile, loggingProfile: string, accessControlProfile: string, -): SessionData { - const sessionData = new SessionData(); - sessionData.processedTimestamps = new MessageStagesTimestamps(); - sessionData.receivedTimestamps = new MessageStagesTimestamps(); - sessionData.hashes = new MessageStagesHashes(); - sessionData.signatures = new MessageStagesSignatures(); - - sessionData.processedTimestamps.stage1 = new Stage1Timestamps(); - sessionData.processedTimestamps.stage2 = new Stage2Timestamps(); - sessionData.processedTimestamps.stage3 = new Stage3Timestamps(); - - sessionData.receivedTimestamps.stage1 = new Stage1Timestamps(); - sessionData.receivedTimestamps.stage2 = new Stage2Timestamps(); - sessionData.receivedTimestamps.stage3 = new Stage3Timestamps(); - - sessionData.hashes.stage1 = new Stage1Hashes(); - sessionData.hashes.stage2 = new Stage2Hashes(); - sessionData.hashes.stage3 = new Stage3Hashes(); - - sessionData.signatures.stage1 = new Stage1Signatures(); - sessionData.signatures.stage2 = new Stage2Signatures(); - sessionData.signatures.stage3 = new Stage3Signatures(); - - sessionData.id = id; + senderContractOntology: string, + receiverContractOntology: string, + fromAmount: string, + toAmount: string, + sourceMspId: string, + sourceChannelName: string, + destinyMspId: string, + destinyChannelName: string, + sourceContractName: string, + destinyContractName: string, + sourceOwner: string, + destinyOwner: string, +): SATPSession { + const fn = "session_utils#populateClientSessionData"; + const sessionData = session.getClientSessionData(); + if (!sessionData) { + throw new Error(fn + ":Session Data is undefined"); + } sessionData.version = version; - sessionData.digitalAssetId = digitalAssetId; + sessionData.digitalAssetId = uuidv4(); sessionData.originatorPubkey = originatorPubkey; sessionData.beneficiaryPubkey = beneficiaryPubkey; sessionData.senderGatewayNetworkId = senderGatewayNetworkId; @@ -88,9 +75,135 @@ export function createSessionData( sessionData.credentialProfile = credentialProfile; sessionData.loggingProfile = loggingProfile; sessionData.accessControlProfile = accessControlProfile; + sessionData.senderContractOntology = senderContractOntology; + sessionData.receiverContractOntology = receiverContractOntology; + const senderAsset: Asset = new Asset(); + senderAsset.tokenId = uuidv4() + "-" + sessionData.transferContextId; + senderAsset.owner = sourceOwner; + senderAsset.ontology = senderContractOntology; + senderAsset.contractName = sourceContractName; + senderAsset.contractAddress = sourceContractAddress || ""; + senderAsset.amount = BigInt(fromAmount); + + senderAsset.mspId = sourceMspId; + senderAsset.channelName = sourceChannelName; + sessionData.senderAsset = senderAsset; + + const receiverAsset: Asset = new Asset(); + receiverAsset.tokenId = ""; + receiverAsset.owner = destinyOwner; + receiverAsset.ontology = receiverContractOntology; + receiverAsset.contractName = destinyContractName; + receiverAsset.contractAddress = destinyContractAddress || ""; + receiverAsset.amount = BigInt(toAmount); + + receiverAsset.mspId = destinyMspId; + receiverAsset.channelName = destinyChannelName; + sessionData.receiverAsset = receiverAsset; + + //todo check THis + + sessionData.resourceUrl = "MOCK_RESOURCE_URL"; + + return session; +} - return sessionData; +export function copySessionDataAttributes( + srcSessionData: SessionData, + destSessionData: SessionData, + sessionId?: string, + contextId?: string, +): void { + destSessionData.id = sessionId || srcSessionData.id; + destSessionData.version = srcSessionData.version; + destSessionData.transferContextId = + contextId || srcSessionData.transferContextId; + destSessionData.hashes = srcSessionData.hashes; + destSessionData.payloadProfile = srcSessionData.payloadProfile; + destSessionData.signatures = srcSessionData.signatures; + destSessionData.maxRetries = srcSessionData.maxRetries; + destSessionData.maxTimeout = srcSessionData.maxTimeout; + destSessionData.loggingProfile = srcSessionData.loggingProfile; + destSessionData.recipientBasePath = srcSessionData.recipientBasePath; + destSessionData.sourceBasePath = srcSessionData.sourceBasePath; + destSessionData.accessControlProfile = srcSessionData.accessControlProfile; + destSessionData.applicationProfile = srcSessionData.applicationProfile; + destSessionData.lastSequenceNumber = srcSessionData.lastSequenceNumber; + destSessionData.senderGatewayNetworkId = + srcSessionData.senderGatewayNetworkId; + destSessionData.recipientGatewayNetworkId = + srcSessionData.recipientGatewayNetworkId; + destSessionData.sourceLedgerAssetId = srcSessionData.sourceLedgerAssetId; + destSessionData.recipientLedgerAssetId = + srcSessionData.recipientLedgerAssetId; + destSessionData.serverGatewayPubkey = srcSessionData.serverGatewayPubkey; + destSessionData.clientGatewayPubkey = srcSessionData.clientGatewayPubkey; + destSessionData.verifiedOriginatorEntityId = + srcSessionData.verifiedOriginatorEntityId; + destSessionData.verifiedBeneficiaryEntityId = + srcSessionData.verifiedBeneficiaryEntityId; + destSessionData.assetProfileId = srcSessionData.assetProfileId; + destSessionData.digitalAssetId = srcSessionData.digitalAssetId; + destSessionData.originatorPubkey = srcSessionData.originatorPubkey; + destSessionData.beneficiaryPubkey = srcSessionData.beneficiaryPubkey; + destSessionData.senderGatewayOwnerId = srcSessionData.senderGatewayOwnerId; + destSessionData.receiverGatewayOwnerId = + srcSessionData.receiverGatewayOwnerId; + destSessionData.hashTransferInitClaims = + srcSessionData.hashTransferInitClaims; + destSessionData.transferInitClaims = srcSessionData.transferInitClaims; + destSessionData.proposedTransferInitClaims = + srcSessionData.proposedTransferInitClaims; + destSessionData.signatureAlgorithm = srcSessionData.signatureAlgorithm; + destSessionData.lockType = srcSessionData.lockType; + destSessionData.lockExpirationTime = srcSessionData.lockExpirationTime; + destSessionData.permissions = srcSessionData.permissions; + destSessionData.developerUrn = srcSessionData.developerUrn; + destSessionData.credentialProfile = srcSessionData.credentialProfile; + destSessionData.subsequentCalls = srcSessionData.subsequentCalls; + destSessionData.history = srcSessionData.history; + destSessionData.multipleClaimsAllowed = srcSessionData.multipleClaimsAllowed; + destSessionData.multipleCancelsAllowed = + srcSessionData.multipleCancelsAllowed; + destSessionData.lastMessageReceivedTimestamp = + srcSessionData.lastMessageReceivedTimestamp; + destSessionData.processedTimestamps = srcSessionData.processedTimestamps; + destSessionData.receivedTimestamps = srcSessionData.receivedTimestamps; + destSessionData.lockAssertionClaim = srcSessionData.lockAssertionClaim; + destSessionData.lockAssertionClaimFormat = + srcSessionData.lockAssertionClaimFormat; + destSessionData.mintAssertionClaim = srcSessionData.mintAssertionClaim; + destSessionData.mintAssertionClaimFormat = + srcSessionData.mintAssertionClaimFormat; + destSessionData.burnAssertionClaim = srcSessionData.burnAssertionClaim; + destSessionData.burnAssertionClaimFormat = + srcSessionData.burnAssertionClaimFormat; + destSessionData.assignmentAssertionClaim = + srcSessionData.assignmentAssertionClaim; + destSessionData.assignmentAssertionClaimFormat = + srcSessionData.assignmentAssertionClaimFormat; + destSessionData.completed = srcSessionData.completed; + destSessionData.acceptance = srcSessionData.acceptance; + destSessionData.lastMessageHash = srcSessionData.lastMessageHash; + destSessionData.transferClaimsFormat = srcSessionData.transferClaimsFormat; + destSessionData.clientTransferNumber = srcSessionData.clientTransferNumber; + destSessionData.serverTransferNumber = srcSessionData.serverTransferNumber; + destSessionData.lockAssertionExpiration = + srcSessionData.lockAssertionExpiration; + destSessionData.assetProfile = srcSessionData.assetProfile; + destSessionData.senderContractOntology = + srcSessionData.senderContractOntology; + destSessionData.receiverContractOntology = + srcSessionData.receiverContractOntology; + destSessionData.resourceUrl = srcSessionData.resourceUrl; + destSessionData.senderWrapAssertionClaim = + srcSessionData.senderWrapAssertionClaim; + destSessionData.receiverWrapAssertionClaim = + srcSessionData.receiverWrapAssertionClaim; + destSessionData.senderAsset = srcSessionData.senderAsset; + destSessionData.receiverAsset = srcSessionData.receiverAsset; } + export function saveTimestamp( session: SessionData | undefined, stageMessage: MessageType, @@ -123,6 +236,7 @@ export function saveTimestamp( if ( timestamps == undefined || + timestamps.stage0 == undefined || timestamps.stage1 == undefined || timestamps.stage2 == undefined || timestamps.stage3 == undefined @@ -131,6 +245,18 @@ export function saveTimestamp( } switch (stageMessage) { + case MessageType.NEW_SESSION_REQUEST: + timestamps.stage0.newSessionRequestMessageTimestamp = timestamp; + break; + case MessageType.NEW_SESSION_RESPONSE: + timestamps.stage0.newSessionResponseMessageTimestamp = timestamp; + break; + case MessageType.PRE_SATP_TRANSFER_REQUEST: + timestamps.stage0.preSatpTransferRequestMessageTimestamp = timestamp; + break; + case MessageType.PRE_SATP_TRANSFER_RESPONSE: + timestamps.stage0.preSatpTransferResponseMessageTimestamp = timestamp; + break; case MessageType.INIT_PROPOSAL: timestamps.stage1.transferProposalRequestMessageTimestamp = timestamp; break; @@ -184,6 +310,7 @@ export function saveHash( if ( hashes == undefined || + hashes.stage0 == undefined || hashes.stage1 == undefined || hashes.stage2 == undefined || hashes.stage3 == undefined @@ -192,6 +319,18 @@ export function saveHash( } switch (stageMessage) { + case MessageType.NEW_SESSION_REQUEST: + hashes.stage0.newSessionRequestMessageHash = hash; + break; + case MessageType.NEW_SESSION_RESPONSE: + hashes.stage0.newSessionResponseMessageHash = hash; + break; + case MessageType.PRE_SATP_TRANSFER_REQUEST: + hashes.stage0.preSatpTransferRequestMessageHash = hash; + break; + case MessageType.PRE_SATP_TRANSFER_RESPONSE: + hashes.stage0.preSatpTransferResponseMessageHash = hash; + break; case MessageType.INIT_PROPOSAL: hashes.stage1.transferProposalRequestMessageHash = hash; break; @@ -244,6 +383,7 @@ export function saveSignature( if ( signatures == undefined || + signatures.stage0 == undefined || signatures.stage1 == undefined || signatures.stage2 == undefined || signatures.stage3 == undefined @@ -252,6 +392,18 @@ export function saveSignature( } switch (stageMessage) { + case MessageType.NEW_SESSION_REQUEST: + signatures.stage0.newSessionRequestMessageSignature = signature; + break; + case MessageType.NEW_SESSION_RESPONSE: + signatures.stage0.newSessionResponseMessageSignature = signature; + break; + case MessageType.PRE_SATP_TRANSFER_REQUEST: + signatures.stage0.preSatpTransferRequestMessageSignature = signature; + break; + case MessageType.PRE_SATP_TRANSFER_RESPONSE: + signatures.stage0.preSatpTransferResponseMessageSignature = signature; + break; case MessageType.INIT_PROPOSAL: signatures.stage1.transferProposalRequestMessageSignature = signature; break; @@ -343,6 +495,7 @@ export function getMessageHash( if ( sessionData.hashes == undefined || + sessionData.hashes.stage0 == undefined || sessionData.hashes.stage1 == undefined || sessionData.hashes.stage2 == undefined || sessionData.hashes.stage3 == undefined @@ -351,6 +504,14 @@ export function getMessageHash( } switch (messageType) { + case MessageType.NEW_SESSION_REQUEST: + return sessionData.hashes.stage0.newSessionRequestMessageHash; + case MessageType.NEW_SESSION_RESPONSE: + return sessionData.hashes.stage0.newSessionResponseMessageHash; + case MessageType.PRE_SATP_TRANSFER_REQUEST: + return sessionData.hashes.stage0.preSatpTransferRequestMessageHash; + case MessageType.PRE_SATP_TRANSFER_RESPONSE: + return sessionData.hashes.stage0.preSatpTransferResponseMessageHash; case MessageType.INIT_PROPOSAL: return sessionData.hashes.stage1.transferProposalRequestMessageHash; case MessageType.INIT_RECEIPT: @@ -403,6 +564,7 @@ export function getMessageTimestamp( if ( timestamps == undefined || + timestamps.stage0 == undefined || timestamps.stage1 == undefined || timestamps.stage2 == undefined || timestamps.stage3 == undefined @@ -411,6 +573,14 @@ export function getMessageTimestamp( } switch (stageMessage) { + case MessageType.NEW_SESSION_REQUEST: + return timestamps.stage0.newSessionRequestMessageTimestamp; + case MessageType.NEW_SESSION_RESPONSE: + return timestamps.stage0.newSessionResponseMessageTimestamp; + case MessageType.PRE_SATP_TRANSFER_REQUEST: + return timestamps.stage0.preSatpTransferRequestMessageTimestamp; + case MessageType.PRE_SATP_TRANSFER_RESPONSE: + return timestamps.stage0.preSatpTransferResponseMessageTimestamp; case MessageType.INIT_PROPOSAL: return timestamps.stage1.transferProposalRequestMessageTimestamp; case MessageType.INIT_RECEIPT: diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts index 93f29c04bc..4e024836e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -5,29 +5,42 @@ import { SATPHandler, SATPHandlerOptions, SATPHandlerType, + Stage, } from "../../types/satp-protocol"; -import { ConnectRouter } from "@connectrpc/connect"; +import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; import { - PreTransferCommenceRequestMessage, - PreTransferCommenceResponseMessage, - PreTransferVerificationAndContextEstablishmentRequest, - PreTransferVerificationAndContextEstablishmentResponse, + CheckRequest, + CheckResponse, + NewSessionRequest, + NewSessionResponse, + PreSATPTransferRequest, + PreSATPTransferResponse, } from "../../generated/proto/cacti/satp/v02/stage_0_pb"; import { Stage0ClientService } from "../stage-services/client/stage0-client-service"; - +import { + FailedToCreateMessageError, + FailedToProcessError, + PubKeyError, + SenderGatewayNetworkIdError, + SessionNotFoundError, +} from "../errors/satp-handler-errors"; export class Stage0SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE0; private sessions: Map; private serverService: Stage0ServerService; private clientService: Stage0ClientService; private logger: Logger; + private pubKeys: Map; + private gatewayId: string; constructor(ops: SATPHandlerOptions) { this.sessions = ops.sessions; this.serverService = ops.serverService as Stage0ServerService; this.clientService = ops.clientService as Stage0ClientService; this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); this.logger.trace(`Initialized ${Stage0SATPHandler.CLASS_NAME}`); + this.pubKeys = ops.pubkeys; + this.gatewayId = ops.gatewayId; } getHandlerSessions(): string[] { return Array.from(this.sessions.keys()); @@ -37,58 +50,179 @@ export class Stage0SATPHandler implements SATPHandler { return Stage0SATPHandler.CLASS_NAME; } - // async PreTransferProposalImplementation( - // req: PreTransferVerificationAndContextEstablishmentRequest, - // ): Promise { - // try { - // console.log("Received TransferProposalRequest", req); - // const sessionData = - // await this.serverService.checkPreTransferProposalRequestMessage( - // req, - // this.session, - // ); - // const message = await this.serverService.preTransferProposalResponse( - // req, - // this.session, - // ); - // console.log("message", message); - // console.log("Returning response", sessionData); - // const response = - // new PreTransferVerificationAndContextEstablishmentResponse(); - // return response; - // } catch (error) { - // console.error("Error handling TransferProposalRequest:", error); - // throw new Error("Failed to process TransferProposalRequest"); - // } - // } - - // async PreTransferCommenceImplementation( - // req: PreTransferCommenceRequestMessage, - // ): Promise { - // try { - // console.log("Received TransferCommenceRequest", req); - // const sessionData = - // await this.serverService.checkTransferCommenceRequestMessage( - // req, - // this.session, - // ); - // const message = await this.serverService.transferCommenceResponse( - // req, - // this.session, - // ); - // console.log("Returning response", message); - // console.log("Returning response", sessionData); - // const response = new PreTransferCommenceResponseMessage(); - // return response; - // } catch (error) { - // console.error("Error handling TransferCommenceRequest:", error); - // throw new Error("Failed to process TransferCommenceRequest"); - // } - // } + getStage(): string { + return Stage.STAGE0; + } + + public get Log(): Logger { + return this.logger; + } + + private async NewSessionImplementation( + req: NewSessionRequest, + context: HandlerContext, + ): Promise { + const stepTag = `NewSessionImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, New Session...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + let session = this.sessions.get(req.sessionId); + + if (req.gatewayId == "") { + throw new SenderGatewayNetworkIdError(fnTag); + } + + if (!this.pubKeys.has(req.gatewayId)) { + throw new PubKeyError(fnTag); + } + + session = await this.serverService.checkNewSessionRequest( + req, + session, + this.pubKeys.get(req.gatewayId)!, + ); + + this.sessions.set(session.getSessionId(), session); + + const message = await this.serverService.newSessionResponse(req, session); + + if (!message) { + throw new FailedToCreateMessageError(fnTag, "NewSessionResponse"); + } + + this.Log.debug(`${fnTag}, Returning response: ${message}`); + + return message; + } catch (error) { + throw new FailedToCreateMessageError(fnTag, "NewSessionResponse", error); + } + } + + private async PreSATPTransferImplementation( + req: PreSATPTransferRequest, + context: HandlerContext, + ): Promise { + const stepTag = `PreSATPTransferImplementation()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, PreSATPTransfer...`); + this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + + const session = this.sessions.get(req.sessionId); + + if (!session) { + throw new SessionNotFoundError(fnTag); + } + + await this.serverService.checkPreSATPTransferRequest(req, session); + + await this.serverService.wrapToken(session); + + const message = await this.serverService.preSATPTransferResponse( + req, + session, + ); + + if (!message) { + throw new FailedToCreateMessageError(fnTag, "PreSATPTransferResponse"); + } + + this.Log.debug(`${fnTag}, Returning response: ${message}`); + + return message; + } catch (error) { + throw new FailedToCreateMessageError(fnTag, "NewSessionResponse", error); + } + } + setupRouter(router: ConnectRouter): void { - // router.service(SatpStage0Service, { - // preTransferProposalClaims: this.PreTransferProposalImplementation, - // preTransferCommence: this.PreTransferCommenceImplementation, - // }); + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; + router.service(SatpStage0Service, { + async check(req: CheckRequest): Promise { + return new CheckResponse({ check: req.check }); + }, + async newSession(req, context): Promise { + return await that.NewSessionImplementation(req, context); + }, + async preSATPTransfer(req, context): Promise { + return await that.PreSATPTransferImplementation(req, context); + }, + // newSession: this.NewSessionImplementation, + //preSATPTransfer: this.PreSATPTransferImplementation, + }); + } + + //client side + + public async NewSessionRequest( + sessionId: string, + ): Promise { + const stepTag = `NewSessionRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, New Session Request...`); + + const session = this.sessions.get(sessionId); + + if (!session) { + throw new SessionNotFoundError(fnTag); + } + + const message = await this.clientService.newSessionRequest( + session, + this.gatewayId, + ); + + if (!message) { + throw new FailedToCreateMessageError(fnTag, "NewSessionRequest"); + } + + return message; + } catch (error) { + throw new FailedToProcessError(fnTag, "NewSessionRequest", error); + } + } + + public async PreSATPTransferRequest( + response: NewSessionResponse, + sessionId: string, + ): Promise { + const stepTag = `PreSATPTransferRequest()`; + const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; + try { + this.Log.debug(`${fnTag}, Pre SATP Transfer Request...`); + + const session = this.sessions.get(sessionId); + + if (!session) { + throw new SessionNotFoundError(fnTag); + } + + const newSession = await this.clientService.checkNewSessionResponse( + response, + session, + Array.from(this.sessions.keys()), + ); + + if (newSession.getSessionId() != session.getSessionId()) { + this.sessions.set(newSession.getSessionId(), newSession); + this.sessions.delete(session.getSessionId()); + } + + await this.clientService.wrapToken(session); + + const message = await this.clientService.preSATPTransferRequest(session); + + if (!message) { + throw new FailedToCreateMessageError(fnTag, "PreSATPTransferRequest"); + } + + return message; + } catch (error) { + throw new FailedToProcessError(fnTag, "PreSATPTransferRequest", error); + } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index fe3529803f..6dec68a438 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -14,6 +14,7 @@ import { SATPHandler, SATPHandlerOptions, SATPHandlerType, + Stage, } from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { @@ -22,6 +23,7 @@ import { SessionNotFoundError, } from "../errors/satp-handler-errors"; import { getSessionId } from "./handler-utils"; +import { PreSATPTransferResponse } from "../../generated/proto/cacti/satp/v02/stage_0_pb"; export class Stage1SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE1; @@ -47,6 +49,9 @@ export class Stage1SATPHandler implements SATPHandler { getHandlerSessions(): string[] { return Array.from(this.sessions.keys()); } + getStage(): string { + return Stage.STAGE1; + } public get Log(): Logger { return this.logger; @@ -78,14 +83,16 @@ export class Stage1SATPHandler implements SATPHandler { session, ); - this.Log.debug(`${fnTag}, Returning response: ${message}`); + this.Log.debug( + `${fnTag}, Returning response: ${JSON.stringify(message)}`, + ); if (!message) { throw new FailedToCreateMessageError(fnTag, "TransferProposalReceipt"); } return message; } catch (error) { - throw new FailedToProcessError(fnTag, "TransferProposalRequest"); + throw new FailedToProcessError(fnTag, "TransferProposalRequest", error); } } @@ -112,27 +119,39 @@ export class Stage1SATPHandler implements SATPHandler { req, session, ); - this.Log.debug(`${fnTag}, Returning response: ${message}`); + + this.Log.debug( + `${fnTag}, Returning response: ${JSON.stringify(message)}`, + ); if (!message) { throw new FailedToCreateMessageError(fnTag, "TransferCommenceResponse"); } return message; } catch (error) { - throw new FailedToProcessError(fnTag, "TransferCommenceResponse"); + throw new FailedToProcessError(fnTag, "TransferCommenceResponse", error); } } setupRouter(router: ConnectRouter): void { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; router.service(SatpStage1Service, { - transferProposal: this.TransferProposalImplementation, - transferCommence: this.TransferCommenceImplementation, + async transferProposal(req, context) { + return await that.TransferProposalImplementation(req, context)!; + }, + async transferCommence(req, context) { + return that.TransferCommenceImplementation(req, context); + }, + // transferProposal: this.TransferProposalImplementation, + // transferCommence: this.TransferCommenceImplementation, }); } //client side public async TransferProposalRequest( sessionId: string, + response: PreSATPTransferResponse, ): Promise { const stepTag = `TransferProposalRequest()`; const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; @@ -144,6 +163,8 @@ export class Stage1SATPHandler implements SATPHandler { throw new Error(`${fnTag}, Session not found`); } + await this.clientService.checkPreSATPTransferResponse(response, session); + const requestTransferProposal = await this.clientService.transferProposalRequest( session, @@ -155,7 +176,7 @@ export class Stage1SATPHandler implements SATPHandler { } return requestTransferProposal; } catch (error) { - throw new FailedToProcessError(fnTag, "TransferProposalRequest"); + throw new FailedToProcessError(fnTag, "TransferProposalRequest", error); } } @@ -192,7 +213,7 @@ export class Stage1SATPHandler implements SATPHandler { return requestTransferCommence; } catch (error) { - throw new FailedToProcessError(fnTag, "TransferCommenceRequest"); + throw new FailedToProcessError(fnTag, "TransferCommenceRequest", error); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index aa5cd93b49..cdff4b874f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -7,6 +7,7 @@ import { SATPHandler, SATPHandlerOptions, SATPHandlerType, + Stage, } from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { @@ -50,6 +51,10 @@ export class Stage2SATPHandler implements SATPHandler { return Array.from(this.sessions.keys()); } + getStage(): string { + return Stage.STAGE2; + } + async LockAssertionImplementation( req: LockAssertionRequestMessage, context: HandlerContext, @@ -82,13 +87,22 @@ export class Stage2SATPHandler implements SATPHandler { } return message; } catch (error) { - throw new FailedToProcessError(fnTag, "LockAssertionImplementation"); + throw new FailedToProcessError( + fnTag, + "LockAssertionImplementation", + error, + ); } } setupRouter(router: ConnectRouter): void { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; router.service(SatpStage2Service, { - lockAssertion: this.LockAssertionImplementation, + async lockAssertion(req, context) { + return await that.LockAssertionImplementation(req, context); + }, + //lockAssertion: this.LockAssertionImplementation, }); } @@ -124,7 +138,7 @@ export class Stage2SATPHandler implements SATPHandler { } return request; } catch (error) { - throw new FailedToProcessError(fnTag, "LockAssertionRequest"); + throw new FailedToProcessError(fnTag, "LockAssertionRequest", error); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index 1290d632b6..571f3a403c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -14,6 +14,7 @@ import { SATPHandler, SATPHandlerOptions, SATPHandlerType, + Stage, } from "../../types/satp-protocol"; import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { Empty } from "@bufbuild/protobuf"; @@ -24,6 +25,7 @@ import { FailedToProcessError, SessionNotFoundError, } from "../errors/satp-handler-errors"; +import { LockAssertionReceiptMessage } from "../../generated/proto/cacti/satp/v02/stage_2_pb"; export class Stage3SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE3; @@ -54,6 +56,10 @@ export class Stage3SATPHandler implements SATPHandler { return this.logger; } + getStage(): string { + return Stage.STAGE3; + } + async CommitPreparationImplementation( req: CommitPreparationRequestMessage, context: HandlerContext, @@ -86,7 +92,7 @@ export class Stage3SATPHandler implements SATPHandler { return message; } catch (error) { - throw new FailedToProcessError(fnTag, "CommitPreparationRequest"); + throw new FailedToProcessError(fnTag, "CommitPreparationRequest", error); } } @@ -129,7 +135,11 @@ export class Stage3SATPHandler implements SATPHandler { return message; } catch (error) { - throw new FailedToProcessError(fnTag, "CommitFinalAssertionRequest"); + throw new FailedToProcessError( + fnTag, + "CommitFinalAssertionRequest", + error, + ); } } @@ -155,22 +165,33 @@ export class Stage3SATPHandler implements SATPHandler { return new Empty({}); } catch (error) { - throw new FailedToProcessError(fnTag, "TransferCompleteRequest"); + throw new FailedToProcessError(fnTag, "TransferCompleteRequest", error); } } setupRouter(router: ConnectRouter): void { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; router.service(SatpStage3Service, { - commitPreparation: this.CommitPreparationImplementation, - commitFinalAssertion: this.CommitFinalAssertionImplementation, - transferComplete: this.TransferCompleteImplementation, + async commitPreparation(req, context) { + return await that.CommitPreparationImplementation(req, context); + }, + async commitFinalAssertion(req, context) { + return await that.CommitFinalAssertionImplementation(req, context); + }, + async transferComplete(req, context) { + return await that.TransferCompleteImplementation(req, context); + }, + // commitPreparation: this.CommitPreparationImplementation, + // commitFinalAssertion: this.CommitFinalAssertionImplementation, + // transferComplete: this.TransferCompleteImplementation, }); } //client side async CommitPreparationRequest( - response: CommitReadyResponseMessage, + response: LockAssertionReceiptMessage, ): Promise { const stepTag = `CommitPreparationRequest()`; const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; @@ -183,7 +204,7 @@ export class Stage3SATPHandler implements SATPHandler { throw new SessionNotFoundError(fnTag); } - await this.clientService.checkCommitReadyResponseMessage( + await this.clientService.checkLockAssertionReceiptMessage( response, session, ); @@ -194,11 +215,11 @@ export class Stage3SATPHandler implements SATPHandler { ); if (!request) { - throw new FailedToCreateMessageError(fnTag, "TransferProposalRequest"); + throw new FailedToCreateMessageError(fnTag, "CommitPreparationRequest"); } return request; } catch (error) { - throw new FailedToProcessError(fnTag, "TransferProposalRequest"); + throw new FailedToProcessError(fnTag, "CommitPreparationRequest", error); } } @@ -236,7 +257,11 @@ export class Stage3SATPHandler implements SATPHandler { } return request; } catch (error) { - throw new FailedToProcessError(fnTag, "CommitFinalAssertionRequest"); + throw new FailedToProcessError( + fnTag, + "CommitFinalAssertionRequest", + error, + ); } } @@ -269,7 +294,7 @@ export class Stage3SATPHandler implements SATPHandler { } return request; } catch (error) { - throw new FailedToProcessError(fnTag, "TransferCompleteRequest"); + throw new FailedToProcessError(fnTag, "TransferCompleteRequest", error); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts index 9bd9a8b6de..7c79cc541f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -1,18 +1,55 @@ +import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; +import { + MessageType, + WrapAssertionClaim, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { + NewSessionRequest, + NewSessionResponse, + PreSATPTransferRequest, +} from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { FailedToProcessError } from "../../errors/satp-handler-errors"; +import { + GatewayNetworkIdError, + HashError, + LedgerAssetError, + LedgerAssetIdError, + MissingBridgeManagerError, + OntologyContractError, + SessionError, + SessionIdError, + SessionMissMatchError, + SignatureVerificationError, + TransferContextIdError, +} from "../../errors/satp-service-errors"; +import { SATPSession } from "../../satp-session"; +import { + copySessionDataAttributes, + getMessageHash, + saveHash, + saveSignature, + SessionType, +} from "../../session-utils"; +import { SupportedChain } from "../../types"; +import { signatureVerifier } from "../data-verifier"; +import { Asset } from "../satp-bridge/types/asset"; import { SATPService, SATPServiceType, ISATPClientServiceOptions, ISATPServiceOptions, } from "../satp-service"; +import { protoToAsset } from "../service-utils"; export class Stage0ClientService extends SATPService { public static readonly SATP_STAGE = "0"; public static readonly SERVICE_TYPE = SATPServiceType.Client; public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; - constructor(ops: ISATPClientServiceOptions) { - // for now stage1serverservice does not have any different options than the SATPService class + private bridgeManager: SATPBridgesManager; + constructor(ops: ISATPClientServiceOptions) { const commonOptions: ISATPServiceOptions = { stage: Stage0ClientService.SATP_STAGE, loggerOptions: ops.loggerOptions, @@ -21,5 +58,271 @@ export class Stage0ClientService extends SATPService { serviceType: Stage0ClientService.SERVICE_TYPE, }; super(commonOptions); + if (ops.bridgeManager == undefined) { + throw new MissingBridgeManagerError( + `${this.getServiceIdentifier()}#constructor`, + ); + } + this.bridgeManager = ops.bridgeManager; + } + + public async newSessionRequest( + session: SATPSession, + thisGatewayId: string, + ): Promise { + const stepTag = `newSessionRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (session == undefined) { + throw new SessionError(fnTag); + } + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + + const newSessionRequestMessage = new NewSessionRequest(); + newSessionRequestMessage.sessionId = sessionData.id; + newSessionRequestMessage.contextId = sessionData.transferContextId; + newSessionRequestMessage.recipientGatewayNetworkId = + sessionData.recipientGatewayNetworkId; + newSessionRequestMessage.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + newSessionRequestMessage.gatewayId = thisGatewayId; + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(newSessionRequestMessage)), + ); + + newSessionRequestMessage.clientSignature = messageSignature; + + saveSignature( + sessionData, + MessageType.NEW_SESSION_REQUEST, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.NEW_SESSION_REQUEST, + getHash(newSessionRequestMessage), + ); + + this.Log.info(`${fnTag}, sending NewSessionRequest...`); + + return newSessionRequestMessage; + } + + public async checkNewSessionResponse( + response: NewSessionResponse, + session: SATPSession, + sessionIds: string[], + ): Promise { + const stepTag = `checkNewSessionResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (session == undefined) { + throw new SessionError(fnTag); + } + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + + if (response.sessionId == "") { + throw new SessionIdError(fnTag); + } + + if ( + response.contextId == "" || + response.contextId != sessionData.transferContextId + ) { + throw new TransferContextIdError( + fnTag, + response.contextId, + sessionData.transferContextId, + ); + } + + if (response.serverSignature == "") { + throw new SignatureVerificationError(fnTag); + } + + if ( + response.recipientGatewayNetworkId == "" || + response.recipientGatewayNetworkId != + sessionData.recipientGatewayNetworkId + ) { + throw new GatewayNetworkIdError(fnTag); + } + + if ( + response.senderGatewayNetworkId == "" || + response.senderGatewayNetworkId != sessionData.senderGatewayNetworkId + ) { + throw new GatewayNetworkIdError(fnTag); + } + + if ( + response.hashPreviousMessage != + getMessageHash(sessionData, MessageType.NEW_SESSION_REQUEST) + ) { + throw new HashError( + fnTag, + response.hashPreviousMessage, + getMessageHash(sessionData, MessageType.NEW_SESSION_REQUEST), + ); + } + + signatureVerifier(fnTag, this.Signer, response, sessionData); + + if (sessionData.id != response.sessionId) { + if (sessionIds.includes(response.sessionId)) { + throw new SessionMissMatchError(fnTag); + } + + session = new SATPSession({ + contextID: response.contextId, + sessionID: response.sessionId, + server: false, + client: true, + }); + + copySessionDataAttributes( + sessionData, + session.getClientSessionData(), + response.sessionId, + response.contextId, + ); + } + return session; + } + + public async preSATPTransferRequest( + session: SATPSession, + ): Promise { + const stepTag = `preSATPTransferRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (session == undefined) { + throw new SessionError(fnTag); + } + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + + if (sessionData.receiverContractOntology == "") { + //TODO check ontology + throw new OntologyContractError(fnTag); + } + + if (sessionData.senderAsset?.tokenId == "") { + throw new LedgerAssetIdError(fnTag); + } + + if (sessionData.senderGatewayNetworkId == "") { + throw new GatewayNetworkIdError(fnTag); + } + + if (sessionData.senderAsset == undefined) { + throw new LedgerAssetError(fnTag); + } + + if (sessionData.receiverAsset == undefined) { + throw new LedgerAssetError(fnTag); + } + + const preSATPTransferRequest = new PreSATPTransferRequest(); + preSATPTransferRequest.sessionId = sessionData.id; + preSATPTransferRequest.contextId = sessionData.transferContextId; + preSATPTransferRequest.clientTransferNumber = + sessionData.clientTransferNumber; + preSATPTransferRequest.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + preSATPTransferRequest.recipientGatewayNetworkId = + sessionData.recipientGatewayNetworkId; + preSATPTransferRequest.senderAsset = sessionData.senderAsset; + preSATPTransferRequest.receiverAsset = sessionData.receiverAsset; + preSATPTransferRequest.wrapAssertionClaim = + sessionData.senderWrapAssertionClaim; + preSATPTransferRequest.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.NEW_SESSION_RESPONSE, + ); + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(preSATPTransferRequest)), + ); + + preSATPTransferRequest.clientSignature = messageSignature; + + saveSignature( + sessionData, + MessageType.PRE_SATP_TRANSFER_REQUEST, + messageSignature, + ); + + saveHash( + sessionData, + MessageType.PRE_SATP_TRANSFER_REQUEST, + getHash(preSATPTransferRequest), + ); + + this.Log.info(`${fnTag}, sending PreSATPTransferRequest...`); + + return preSATPTransferRequest; + } + + public async wrapToken(session: SATPSession): Promise { + const stepTag = `wrapToken()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + try { + this.Log.info(`${fnTag}, Wrapping Asset...`); + + if (session == undefined) { + throw new SessionError(fnTag); + } + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + + if (sessionData.senderGatewayNetworkId == "") { + throw new GatewayNetworkIdError(fnTag); + } + + if (sessionData.senderAsset == undefined) { + throw new LedgerAssetError(fnTag); + } + + const token: Asset = protoToAsset( + sessionData.senderAsset, + sessionData.senderGatewayNetworkId as SupportedChain, + ); + + const assetId = token.tokenId; + const amount = token.amount.toString(); + + this.Log.debug(`${fnTag}, Wrap: ${JSON.stringify(token)}`); + + this.Log.debug(`${fnTag}, Wrap Asset ID: ${assetId} amount: ${amount}`); + if (assetId == undefined) { + throw new LedgerAssetIdError(fnTag); + } + + const bridge = this.bridgeManager.getBridge( + sessionData.senderGatewayNetworkId, + ); + + sessionData.senderWrapAssertionClaim = new WrapAssertionClaim(); + sessionData.senderWrapAssertionClaim.receipt = + await bridge.wrapAsset(token); + + sessionData.senderWrapAssertionClaim.signature = bufArray2HexStr( + sign(this.Signer, sessionData.senderWrapAssertionClaim.receipt), + ); + } catch (error) { + throw new FailedToProcessError(fnTag, "WrapToken"); + } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index c371aecaaf..7c7e693861 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -26,7 +26,14 @@ import { } from "../satp-service"; import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { ACCEPTANCE } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; -import { SessionError } from "../../errors/satp-service-errors"; +import { + HashError, + SessionError, + TokenIdMissingError, + TransferContextIdError, + WrapAssertionClaimError, +} from "../../errors/satp-service-errors"; +import { PreSATPTransferResponse } from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; export class Stage1ClientService extends SATPService { public static readonly SATP_STAGE = "1"; @@ -271,6 +278,61 @@ export class Stage1ClientService extends SATPService { return transferCommenceRequestMessage; } + async checkPreSATPTransferResponse( + response: PreSATPTransferResponse, + session: SATPSession, + ): Promise { + const stepTag = `checkPreSATPTransferResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + this.Log.debug(`${fnTag}, checkPreSATPTransferResponse...`); + + if (session == undefined) { + throw new SessionError(fnTag); + } + + session.verify(fnTag, SessionType.CLIENT); + + const sessionData = session.getClientSessionData(); + + if ( + response.contextId == "" || + response.contextId != sessionData.transferContextId + ) { + throw new TransferContextIdError( + fnTag, + response.contextId, + sessionData.transferContextId, + ); + } + + if (response.wrapAssertionClaim == undefined) { + throw new WrapAssertionClaimError(fnTag); + } + + if (response.recipientTokenId == "") { + throw new TokenIdMissingError(fnTag); + } + + if ( + response.hashPreviousMessage != + getMessageHash(sessionData, MessageType.PRE_SATP_TRANSFER_REQUEST) + ) { + throw new HashError( + fnTag, + response.hashPreviousMessage, + getMessageHash(sessionData, MessageType.PRE_SATP_TRANSFER_REQUEST), + ); + } + + signatureVerifier(fnTag, this.Signer, response, sessionData); + + sessionData.receiverAsset!.tokenId = response.recipientTokenId; + + saveHash(sessionData, MessageType.PRE_SATP_TRANSFER_RESPONSE, fnTag); + + this.Log.info(`${fnTag}, PreSATPTransferResponse passed all checks.`); + } + async checkTransferProposalReceiptMessage( response: TransferProposalReceiptMessage, session: SATPSession, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index 7a5a96a137..d63dbb1879 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -28,7 +28,9 @@ import { LockAssertionClaimError, LockAssertionClaimFormatError, SessionError, + TokenIdMissingError, } from "../../errors/satp-service-errors"; +import { FailedToProcessError } from "../../errors/satp-handler-errors"; export class Stage2ClientService extends SATPService { public static readonly SATP_STAGE = "2"; @@ -204,12 +206,17 @@ export class Stage2ClientService extends SATPService { const sessionData = session.getClientSessionData(); - const assetId = sessionData?.transferInitClaims?.digitalAssetId; - const amount = sessionData?.transferInitClaims?.amountFromOriginator; + const assetId = sessionData.senderAsset?.tokenId; + const amount = sessionData.senderAsset?.amount; this.Log.debug(`${fnTag}, Lock Asset ID: ${assetId} amount: ${amount}`); + if (assetId == undefined) { - throw new Error(`${fnTag}, Asset ID is missing`); + throw new TokenIdMissingError(fnTag); + } + + if (amount == undefined) { + throw new Error(`${fnTag}, Amount is missing`); } const bridge = this.bridgeManager.getBridge( @@ -230,7 +237,7 @@ export class Stage2ClientService extends SATPService { sign(this.Signer, sessionData.lockAssertionClaim.receipt), ); } catch (error) { - throw new Error(`${fnTag}, Failed to process Lock Asset ${error}`); + throw new FailedToProcessError(fnTag, "LockAsset"); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index e7674a09b3..682f4dcf0f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -34,7 +34,9 @@ import { MintAssertionClaimError, MissingBridgeManagerError, SessionError, + TokenIdMissingError, } from "../../errors/satp-service-errors"; +import { FailedToProcessError } from "../../errors/satp-handler-errors"; export class Stage3ClientService extends SATPService { public static readonly SATP_STAGE = "3"; @@ -466,12 +468,17 @@ export class Stage3ClientService extends SATPService { const sessionData = session.getClientSessionData(); - const assetId = sessionData.transferInitClaims?.digitalAssetId; - const amount = sessionData.transferInitClaims?.amountFromOriginator; + const assetId = sessionData.senderAsset?.tokenId; + const amount = sessionData.senderAsset?.amount; this.Log.debug(`${fnTag}, Burn Asset ID: ${assetId} amount: ${amount}`); + if (assetId == undefined) { - throw new Error(`${fnTag}, Asset ID is missing`); + throw new TokenIdMissingError(fnTag); + } + + if (amount == undefined) { + throw new Error(`${fnTag}, Amount is missing`); } const bridge = this.bridgeManager.getBridge( @@ -487,7 +494,7 @@ export class Stage3ClientService extends SATPService { sign(this.Signer, sessionData.burnAssertionClaim.receipt), ); } catch (error) { - throw new Error(`${fnTag}, Failed to process Burn Asset ${error}`); + throw new FailedToProcessError(fnTag, "BurnAsset"); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts index c82bfe7438..33ce5295af 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts @@ -48,6 +48,7 @@ export function commonBodyVerifier( (common.hashPreviousMessage == "" && messageStage != MessageType.INIT_PROPOSAL) ) { + console.error("errorcommon", JSON.stringify(common)); throw new SatpCommonBodyError(tag, JSON.stringify(common)); } @@ -122,13 +123,16 @@ export function signatureVerifier( throw new SessionDataNotLoadedCorrectlyError(tag, "undefined"); } - if (message.serverSignature != "") { + if (message.serverSignature != undefined && message.serverSignature != "") { if ( !verifySignature(signer, message, sessionData?.serverGatewayPubkey || "") ) { throw new SignatureVerificationError(tag); } - } else if (message.clientSignature != "") { + } else if ( + message.clientSignature != undefined && + message.clientSignature != "" + ) { if ( !verifySignature(signer, message, sessionData?.clientGatewayPubkey || "") ) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts index a6bb0b2902..702e619f7a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts @@ -52,6 +52,13 @@ export class BesuBridge implements NetworkBridge { this.connector = new PluginLedgerConnectorBesu(besuConfig.options); this.bungee = new PluginBungeeHermes(besuConfig.bungeeOptions); this.bungee.addStrategy(this.network, new StrategyBesu(level)); + + //TODO is this needed? + if (besuConfig.besuAssets) { + besuConfig.besuAssets.forEach(async (asset) => { + await this.wrapAsset(asset); + }); + } } public async wrapAsset(asset: BesuAsset): Promise { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts index c582714c88..cf75f0449d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -7,7 +7,7 @@ import { Asset } from "./types/asset"; import { TransactionIdUndefinedError } from "../../errors/bridge-erros"; export class SATPBridgeManager implements BridgeManager { - public static readonly CLASS_NAME = "FabricBridgeManager"; + public static readonly CLASS_NAME = "SATPBridgeManager"; private _log: Logger; @@ -29,10 +29,11 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = this.config.network.getReceipt( - asset.tokenId, - response.transactionId, - ); + const receipt = ""; + // this.config.network.getReceipt( + // asset.tokenId, + // response.transactionId, + // ); this.log.info(`${fnTag}, proof of the asset wrapping: ${receipt}`); @@ -70,10 +71,11 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = await this.config.network.getReceipt( - assetId, - response.transactionId, - ); + const receipt = ""; + // this.config.network.getReceipt( + // asset.tokenId, + // response.transactionId, + // ); this.log.info(`${fnTag}, proof of the asset lock: ${receipt}`); @@ -108,10 +110,11 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = await this.config.network.getReceipt( - assetId, - transaction.transactionId, - ); + const receipt = ""; + // this.config.network.getReceipt( + // asset.tokenId, + // response.transactionId, + // ); this.log.info(`${fnTag}, proof of the asset creation: ${receipt}`); @@ -127,10 +130,11 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = await this.config.network.getReceipt( - assetId, - transaction.transactionId, - ); + const receipt = ""; + // this.config.network.getReceipt( + // asset.tokenId, + // response.transactionId, + // ); this.log.info(`${fnTag}, proof of the asset deletion: ${receipt}`); @@ -154,10 +158,11 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = await this.config.network.getReceipt( - assetId, - response.transactionId, - ); + const receipt = ""; + // this.config.network.getReceipt( + // asset.tokenId, + // response.transactionId, + // ); this.log.info(`${fnTag}, proof of the asset assignment: ${receipt}`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts index 2c743e415f..4f613e8020 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts @@ -1,9 +1,11 @@ +import { v4 as uuidv4 } from "uuid"; export interface Asset { tokenId: string; tokenType: TokenType; owner: string; amount: number; ontology: string; + contractName: string; } //When there is new token type, add it here or it will break the code @@ -32,3 +34,11 @@ export function getInteractionType(stringType: string) { stringType.toUpperCase() as keyof typeof InteractionType ]; } + +export function createAssetId( + contextId: string, + tokenType: TokenType, + networkId: string, +): string { + return `${uuidv4()}-${contextId}-${tokenType}-${networkId}`; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts index af5847b08b..f3ddfadee7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts @@ -1,7 +1,6 @@ import { Asset } from "./asset"; export interface BesuAsset extends Asset { - contractName: string; contractAddress: string; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts index 6b0fc4e368..d8f8c0481a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts @@ -2,7 +2,6 @@ import { Asset, InteractionType } from "./asset"; export interface FabricAsset extends Asset { mspId: string; - contractName: string; channelName: string; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts index a1304df153..c741382e2b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -1,18 +1,57 @@ -import { Token } from "../../../public-api"; +import { + bufArray2HexStr, + getHash, + sign, + verifySignature, +} from "../../../gateway-utils"; +import { + MessageType, + WrapAssertionClaim, +} from "../../../generated/proto/cacti/satp/v02/common/message_pb"; +import { + NewSessionRequest, + NewSessionResponse, + PreSATPTransferRequest, + PreSATPTransferResponse, + STATUS, +} from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { + AssetMissing, + GatewayNetworkIdError, + LedgerAssetError, + MissingBridgeManagerError, + NetworkIdError, + SessionDataNotAvailableError, + SessionError, + SessionIdError, + SignatureMissingError, + SignatureVerificationError, +} from "../../errors/satp-service-errors"; +import { SATPSession } from "../../satp-session"; +import { + getMessageHash, + saveHash, + saveSignature, + SessionType, +} from "../../session-utils"; +import { Asset, createAssetId } from "../satp-bridge/types/asset"; import { SATPService, SATPServiceType, ISATPServerServiceOptions, ISATPServiceOptions, } from "../satp-service"; - +import { protoToAsset } from "../service-utils"; export class Stage0ServerService extends SATPService { public static readonly SATP_STAGE = "0"; public static readonly SERVICE_TYPE = SATPServiceType.Server; public static readonly SATP_SERVICE_INTERNAL_NAME = `stage-${this.SATP_STAGE}-${SATPServiceType[this.SERVICE_TYPE].toLowerCase()}`; + private bridgeManager: SATPBridgesManager; + constructor(ops: ISATPServerServiceOptions) { - // for now stage0serverservice does not have any different options than the SATPService class + // for now stage1serverservice does not have any different options than the SATPService class const commonOptions: ISATPServiceOptions = { stage: Stage0ServerService.SATP_STAGE, @@ -22,14 +61,350 @@ export class Stage0ServerService extends SATPService { serviceType: Stage0ServerService.SERVICE_TYPE, }; super(commonOptions); + if (ops.bridgeManager == undefined) { + throw new MissingBridgeManagerError( + `${this.getServiceIdentifier()}#constructor`, + ); + } + this.bridgeManager = ops.bridgeManager; + } + + public async checkNewSessionRequest( + request: NewSessionRequest, + session: SATPSession | undefined, + clientPubKey: string, + ): Promise { + const stepTag = `checkNewSessionRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (request == undefined) { + throw new Error(`${fnTag}, Request is undefined`); + } + + if (request.clientSignature == "") { + throw new SignatureMissingError(fnTag); + } + + if (request.sessionId == "") { + throw new SessionIdError(fnTag); + } + + if (request.senderGatewayNetworkId == "") { + throw new NetworkIdError(fnTag, "Sender"); + } + + if (request.recipientGatewayNetworkId == "") { + throw new NetworkIdError(fnTag, "Recipient"); + } + + if (!verifySignature(this.Signer, request, clientPubKey)) { + throw new SignatureVerificationError(fnTag); + } + + if (session == undefined) { + this.Log.debug(`${fnTag}, Session is undefined needs to be created`); + session = new SATPSession({ + contextID: request.contextId, + sessionID: request.sessionId, + server: true, + client: false, + }); + } else if (!session.hasServerSessionData()) { + this.Log.debug(`${fnTag}, Session does not have server session data`); + session.createSessionData( + SessionType.SERVER, + request.sessionId, + request.contextId, + ); + } else { + this.Log.debug(`${fnTag}, Session is already has a server session`); + session = new SATPSession({ + contextID: request.contextId, + server: true, + client: false, + }); + this.Log.debug( + `${fnTag}, Session created with new sessionID ${session.getSessionId()}`, + ); + } + + const newSessionData = session.getServerSessionData(); + + newSessionData.clientGatewayPubkey = clientPubKey; + newSessionData.senderGatewayNetworkId = request.senderGatewayNetworkId; + newSessionData.recipientGatewayNetworkId = + request.recipientGatewayNetworkId; + + saveSignature( + newSessionData, + MessageType.NEW_SESSION_REQUEST, + request.clientSignature, + ); + + saveHash(newSessionData, MessageType.NEW_SESSION_REQUEST, getHash(request)); + + this.Log.info(`${fnTag}, NewSessionRequest passed all checks.`); + return session; + } + + public async checkPreSATPTransferRequest( + request: PreSATPTransferRequest, + session: SATPSession, + ): Promise { + const stepTag = `checkPreSATPTransferRequest()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (session == undefined) { + throw new SessionError(fnTag); + } + + if (!session.hasServerSessionData()) { + throw new Error(`${fnTag}, Session Data is missing`); + } + + const sessionData = session.getServerSessionData(); + + if (request.sessionId != sessionData.id) { + throw new Error(`${fnTag}, Session ID does not match`); + } + + if (request.senderGatewayNetworkId != sessionData.senderGatewayNetworkId) { + throw new Error(`${fnTag}, Sender Gateway Network ID does not match`); + } + + if ( + request.recipientGatewayNetworkId != sessionData.recipientGatewayNetworkId + ) { + throw new Error(`${fnTag}, Recipient Gateway Network ID does not match`); + } + + if (request.senderAsset == undefined) { + throw new Error(`${fnTag}, Sender Asset is missing`); + } + + if (request.receiverAsset == undefined) { + throw new Error(`${fnTag}, Receiver Asset is missing`); + } + + if ( + request.hashPreviousMessage != + getMessageHash(sessionData, MessageType.NEW_SESSION_RESPONSE) + ) { + throw new Error(`${fnTag}, Hash of previous message does not match`); + } + + if (request.clientSignature == "") { + throw new Error(`${fnTag}, Client Signature is missing`); + } + + if ( + !verifySignature(this.Signer, request, sessionData.clientGatewayPubkey) + ) { + throw new Error(`${fnTag}, Client Signature is invalid`); + } + + if (request.senderAsset == undefined) { + throw new Error(`${fnTag}, Sender Asset is missing`); + } + + sessionData.senderAsset = request.senderAsset; + + if (request.receiverAsset == undefined) { + throw new Error(`${fnTag}, Receiver Asset is missing`); + } + + if (request.wrapAssertionClaim == undefined) { + throw new Error(`${fnTag}, Wrap Assertion Claim is missing`); + } + + if (request.clientTransferNumber != "") { + this.Log.info( + `${fnTag}, Optional variable loaded: clientTransferNumber...`, + ); + sessionData.clientTransferNumber = request.clientTransferNumber; + } + + saveSignature( + sessionData, + MessageType.PRE_SATP_TRANSFER_REQUEST, + request.clientSignature, + ); + + saveHash( + sessionData, + MessageType.PRE_SATP_TRANSFER_REQUEST, + getHash(request), + ); + + //TODO maybe do a hard copy, reason: after the hash because this changes the req object + sessionData.receiverAsset = request.receiverAsset; + + sessionData.receiverAsset.tokenId = createAssetId( + request.contextId, + request.receiverAsset.tokenType, + sessionData.recipientGatewayNetworkId, + ); + + this.Log.info(`${fnTag}, PreSATPTransferRequest passed all checks.`); } - public async getPubKey(): Promise { - //todo + public async newSessionResponse( + request: NewSessionRequest, + session: SATPSession, + ): Promise { + const stepTag = `newSessionResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (session == undefined) { + throw new SessionError(fnTag); + } + + if (!session.hasServerSessionData()) { + throw new SessionDataNotAvailableError("server", fnTag); + } + const sessionData = session.getServerSessionData(); + + const newSessionResponse = new NewSessionResponse(); + + if (sessionData.id != request.sessionId) { + newSessionResponse.status = STATUS.STATUS_REJECTED; + } else { + newSessionResponse.status = STATUS.STATUS_ACCEPTED; + } + newSessionResponse.sessionId = sessionData.id; + newSessionResponse.contextId = sessionData.transferContextId; + newSessionResponse.recipientGatewayNetworkId = + sessionData.recipientGatewayNetworkId; + newSessionResponse.senderGatewayNetworkId = + sessionData.senderGatewayNetworkId; + + newSessionResponse.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.NEW_SESSION_REQUEST, + ); + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(newSessionResponse)), + ); + + newSessionResponse.serverSignature = messageSignature; + + saveSignature( + sessionData, + MessageType.NEW_SESSION_REQUEST, + messageSignature, + ); + + saveHash(sessionData, MessageType.NEW_SESSION_REQUEST, fnTag); + + this.Log.info(`${fnTag}, sending NewSessionRequest...`); + + return newSessionResponse; } - public async wrapToken(token: Token) { - //todo - return token; + public async preSATPTransferResponse( + request: PreSATPTransferRequest, + session: SATPSession, + ): Promise { + const stepTag = `preSATPTransferResponse()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + + if (session == undefined) { + throw new SessionError(fnTag); + } + + if (!session.hasServerSessionData()) { + throw new SessionDataNotAvailableError("server", fnTag); + } + + const sessionData = session.getServerSessionData(); + + const preSATPTransferResponse = new PreSATPTransferResponse(); + + preSATPTransferResponse.sessionId = sessionData.id; + preSATPTransferResponse.contextId = sessionData.transferContextId; + + preSATPTransferResponse.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.PRE_SATP_TRANSFER_REQUEST, + ); + + if (request.receiverAsset == undefined) { + throw new AssetMissing(fnTag); + } + + preSATPTransferResponse.wrapAssertionClaim = + sessionData.receiverWrapAssertionClaim; + preSATPTransferResponse.recipientTokenId = + sessionData.receiverAsset!.tokenId; + + const messageSignature = bufArray2HexStr( + sign(this.Signer, JSON.stringify(preSATPTransferResponse)), + ); + + preSATPTransferResponse.serverSignature = messageSignature; + + saveSignature( + sessionData, + MessageType.PRE_SATP_TRANSFER_REQUEST, + messageSignature, + ); + + saveHash(sessionData, MessageType.PRE_SATP_TRANSFER_REQUEST, fnTag); + + this.Log.info(`${fnTag}, sending PreSATPTransferResponse...`); + + return preSATPTransferResponse; + } + + public async wrapToken(session: SATPSession): Promise { + const stepTag = `wrapToken()`; + const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; + try { + this.Log.info(`${fnTag}, Wrapping Asset...`); + + if (session == undefined) { + throw new SessionError(fnTag); + } + + //TODO: check if is necessary to verify more things + + const sessionData = session.getServerSessionData(); + + if (sessionData.recipientGatewayNetworkId == "") { + throw new GatewayNetworkIdError(fnTag); + } + + if (sessionData.receiverAsset == undefined) { + throw new LedgerAssetError(fnTag); + } + + const token: Asset = protoToAsset( + sessionData.receiverAsset, + sessionData.recipientGatewayNetworkId, + ); + + const assetId = token.tokenId; + const amount = token.amount.toString(); + + this.Log.debug(`${fnTag}, Wrap Asset ID: ${assetId} amount: ${amount}`); + if (assetId == undefined) { + throw new Error(`${fnTag}, Asset ID is missing`); + } + + const bridge = this.bridgeManager.getBridge( + sessionData.recipientGatewayNetworkId, + ); + + sessionData.receiverWrapAssertionClaim = new WrapAssertionClaim(); + sessionData.receiverWrapAssertionClaim.receipt = + await bridge.wrapAsset(token); + + sessionData.receiverWrapAssertionClaim.signature = bufArray2HexStr( + sign(this.Signer, sessionData.receiverWrapAssertionClaim.receipt), + ); + } catch (error) { + throw new Error(`${fnTag}, Failed to process Wrap Asset ${error}`); + } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index f5fd51fb1b..fdf658d724 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -71,7 +71,12 @@ export class Stage1ServerService extends SATPService { throw new SessionError(fnTag); } - session.verify(fnTag, SessionType.SERVER); + if ( + session.getServerSessionData().acceptance == + ACCEPTANCE.ACCEPTANCE_ACCEPTED + ) { + session.verify(fnTag, SessionType.SERVER); + } const sessionData = session.getServerSessionData(); @@ -236,6 +241,7 @@ export class Stage1ServerService extends SATPService { this.checkNetworkCapabilities(request.networkCapabilities, fnTag); if (this.checkTransferClaims(request.transferInitClaims, fnTag)) { + this.Log.info(`${fnTag}, TransferProposalRequest was accepted...`); sessionData.acceptance = ACCEPTANCE.ACCEPTANCE_ACCEPTED; } else { this.Log.info(`${fnTag}, TransferProposalRequest was rejected...`); @@ -243,11 +249,11 @@ export class Stage1ServerService extends SATPService { return; } - const senderId = request.transferInitClaims! - .senderGatewayNetworkId as SupportedChain; + const receiverId = request.transferInitClaims! + .recipientGatewayNetworkId as SupportedChain; - if (!supportedDLTs.includes(senderId)) { - throw new DLTNotSupportedError(fnTag, senderId); //todo change this to the transferClaims check + if (!supportedDLTs.includes(receiverId)) { + throw new DLTNotSupportedError(fnTag, receiverId); //todo change this to the transferClaims check } sessionData.version = request.common!.version; @@ -330,7 +336,7 @@ export class Stage1ServerService extends SATPService { throw new TransferInitClaimsHashError(fnTag); } - if (request.clientTransferNumber != undefined) { + if (request.clientTransferNumber != "") { this.Log.info( `${fnTag}, Optional variable loaded: clientTransferNumber...`, ); @@ -358,18 +364,18 @@ export class Stage1ServerService extends SATPService { } if (transferClaims.assetProfileId == "") { this.Log.error(`${tag}, assetProfileId is missing`); - return false; + //return false; } if (transferClaims.verifiedOriginatorEntityId == "") { this.Log.error(`${tag}, verifiedOriginatorEntityId is missing`); - return false; + //return false; } if (transferClaims.verifiedBeneficiaryEntityId == "") { this.Log.error(`${tag}, verifiedBeneficiaryEntityId is missing`); } if (transferClaims.originatorPubkey == "") { this.Log.error(`${tag}, originatorPubkey is missing`); - return false; + //return false; } if (transferClaims.beneficiaryPubkey == "") { this.Log.error(`${tag}, beneficiaryPubkey is missing`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 0831f815d7..408f068377 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -33,8 +33,11 @@ import { BurnAssertionClaimError, MintAssertionClaimError, MissingBridgeManagerError, + MissingRecipientError, SessionError, + TokenIdMissingError, } from "../../errors/satp-service-errors"; +import { FailedToProcessError } from "../../errors/satp-handler-errors"; export class Stage3ServerService extends SATPService { public static readonly SATP_STAGE = "3"; @@ -397,14 +400,18 @@ export class Stage3ServerService extends SATPService { const sessionData = session.getServerSessionData(); - const assetId = sessionData.transferInitClaims?.digitalAssetId; - const amount = sessionData.transferInitClaims?.amountToBeneficiary; + const assetId = sessionData.receiverAsset?.tokenId; + const amount = sessionData.receiverAsset?.amount; this.logger.debug( `${fnTag}, Mint Asset ID: ${assetId} amount: ${amount}`, ); if (assetId == undefined) { - throw new Error(`${fnTag}, Asset ID is missing`); + throw new TokenIdMissingError(fnTag); + } + + if (amount == undefined) { + throw new Error(`${fnTag}, Amount is missing`); } const bridge = this.bridgeManager.getBridge( @@ -420,7 +427,7 @@ export class Stage3ServerService extends SATPService { sign(this.Signer, sessionData.mintAssertionClaim.receipt), ); } catch (error) { - throw new Error(`${fnTag}, Failed to process Mint Asset ${error}`); + throw new FailedToProcessError(fnTag, "MintAsset"); } } @@ -438,18 +445,22 @@ export class Stage3ServerService extends SATPService { const sessionData = session.getServerSessionData(); - const assetId = sessionData.transferInitClaims?.digitalAssetId; - const amount = sessionData.transferInitClaims?.amountToBeneficiary; - const recipient = sessionData.transferInitClaims?.beneficiaryPubkey; + const assetId = sessionData.receiverAsset?.tokenId; + const amount = sessionData.receiverAsset?.amount; + const recipient = sessionData.receiverAsset?.owner; if (recipient == undefined) { - throw new Error(`${fnTag}, Recipient is missing`); + throw new MissingRecipientError(fnTag); } this.logger.debug( `${fnTag}, Assign Asset ID: ${assetId} amount: ${amount} recipient: ${recipient}`, ); if (assetId == undefined) { - throw new Error(`${fnTag}, Asset ID is missing`); + throw new TokenIdMissingError(fnTag); + } + + if (amount == undefined) { + throw new Error(`${fnTag}, Amount is missing`); } const bridge = this.bridgeManager.getBridge( @@ -466,7 +477,7 @@ export class Stage3ServerService extends SATPService { sign(this.Signer, sessionData.assignmentAssertionClaim.receipt), ); } catch (error) { - throw new Error(`${fnTag}, Failed to process Assign Asset ${error}`); + throw new FailedToProcessError(fnTag, "AssignAsset"); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts new file mode 100644 index 0000000000..dd1be75994 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts @@ -0,0 +1,70 @@ +import { Asset as ProtoAsset } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { SupportedChain } from "../types"; +import { Asset } from "./satp-bridge/types/asset"; +import { BesuAsset } from "./satp-bridge/types/besu-asset"; +import { FabricAsset } from "./satp-bridge/types/fabric-asset"; + +export function assetToProto( + asset: Asset, + networkId: SupportedChain, +): ProtoAsset { + const protoAsset = new ProtoAsset(); + protoAsset.tokenId = asset.tokenId; + protoAsset.tokenType = asset.tokenType; + protoAsset.owner = asset.owner; + protoAsset.amount = BigInt(asset.amount); + + switch (networkId) { + case SupportedChain.BESU: + protoAsset.contractAddress = (asset as BesuAsset).contractAddress; + break; + case SupportedChain.FABRIC: + protoAsset.mspId = (asset as FabricAsset).mspId; + protoAsset.channelName = (asset as FabricAsset).channelName; + break; + default: + throw new Error(`Unsupported networkId: ${networkId}`); + } + return protoAsset; +} + +export function protoToAsset(asset: ProtoAsset, networkId: string): Asset { + const assetObj: Asset = { + tokenId: asset.tokenId, + tokenType: asset.tokenType.valueOf(), + owner: asset.owner, + amount: Number(asset.amount), + ontology: asset.ontology, + contractName: asset.contractName, + }; + + switch (networkId) { + case SupportedChain.BESU: + (assetObj as BesuAsset).contractAddress = asset.contractAddress; + break; + case SupportedChain.FABRIC: + (assetObj as FabricAsset).mspId = asset.mspId; + (assetObj as FabricAsset).channelName = asset.channelName; + break; + default: + throw new Error(`Unsupported networkId: ${networkId}`); + } + return assetObj; +} + +export function compareProtoAsset( + asset1: ProtoAsset, + asset2: ProtoAsset, +): boolean { + return ( + asset1.tokenId === asset2.tokenId && + asset1.tokenType === asset2.tokenType && + asset1.owner === asset2.owner && + asset1.amount === asset2.amount && + asset1.ontology === asset2.ontology && + asset1.contractName === asset2.contractName && + asset1.mspId === asset2.mspId && + asset1.channelName === asset2.channelName && + asset1.contractAddress === asset2.contractAddress + ); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 80b9b70d8e..d17ce0d53b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -11,6 +11,7 @@ import { IPrivacyPolicyValue } from "@hyperledger/cactus-plugin-bungee-hermes/di import { IMergePolicyValue } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-merging/merge-policies"; import { NetworkBridge } from "./stage-services/satp-bridge/network-bridge"; import { SATPServiceInstance } from "./stage-services/satp-service"; +import { NetworkConfig } from "../types/blockchain-interaction"; export type SATPConnectHandler = ( gateway: SATPGateway, @@ -52,10 +53,11 @@ export type GatewayChannel = { export type Address = | `http://${string}` | `https://${string}` - | `${number}.${number}.${number}.${number}.`; + | `${number}.${number}.${number}.${number}`; export type GatewayIdentity = { id: string; + pubKey?: string; name?: string; version: DraftVersions[]; supportedDLTs: SupportedChain[]; @@ -76,6 +78,7 @@ export interface SATPGatewayConfig { validationOptions?: ValidatorOptions; privacyPolicies?: IPrivacyPolicyValue[]; mergePolicies?: IMergePolicyValue[]; + bridgesConfig?: NetworkConfig[]; } // export interface SATPBridgeConfig { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index d5de011eb6..50ed95ab34 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -23,6 +23,7 @@ export function verifySignature( const sourceSignature = new Uint8Array( Buffer.from(copy.clientSignature, "hex"), ); + const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); copy.clientSignature = ""; @@ -36,6 +37,7 @@ export function verifySignature( const sourceSignature = new Uint8Array( Buffer.from(copy.serverSignature, "hex"), ); + const sourcePubkey = new Uint8Array(Buffer.from(pubKey, "hex")); copy.serverSignature = ""; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts index 5009672823..91f69c4e4a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts @@ -103,6 +103,49 @@ export interface Action { */ 'toAddress'?: string; } +/** + * An asset + * @export + * @interface Asset + */ +export interface Asset { + /** + * + * @type {string} + * @memberof Asset + */ + 'owner': string; + /** + * + * @type {string} + * @memberof Asset + */ + 'ontology': string; + /** + * + * @type {string} + * @memberof Asset + */ + 'contractName': string; + /** + * + * @type {string} + * @memberof Asset + */ + 'contractAddress'?: string; + /** + * + * @type {string} + * @memberof Asset + */ + 'mspId'?: string; + /** + * + * @type {string} + * @memberof Asset + */ + 'channelName'?: string; +} /** * Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 * @export @@ -1856,37 +1899,49 @@ export interface TransactRequest { * @type {string} * @memberof TransactRequest */ - 'fromDLTNetworkID'?: string; + 'fromDLTNetworkID': string; /** * * @type {string} * @memberof TransactRequest */ - 'toDLTNetworkID'?: string; + 'toDLTNetworkID': string; /** * * @type {string} * @memberof TransactRequest */ - 'fromAmount'?: string; + 'fromAmount': string; /** * * @type {string} * @memberof TransactRequest */ - 'fromToken'?: string; + 'toAmount': string; /** * * @type {string} * @memberof TransactRequest */ - 'toAmount'?: string; + 'beneficiaryPubkey': string; /** * * @type {string} * @memberof TransactRequest */ - 'toToken'?: string; + 'originatorPubkey': string; + /** + * + * @type {TransactRequestSourceAsset} + * @memberof TransactRequest + */ + 'sourceAsset': TransactRequestSourceAsset; + /** + * + * @type {TransactRequestSourceAsset} + * @memberof TransactRequest + */ + 'destinyAsset': TransactRequestSourceAsset; } export const TransactRequestModeEnum = { @@ -1896,6 +1951,49 @@ export const TransactRequestModeEnum = { export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; +/** + * An asset + * @export + * @interface TransactRequestSourceAsset + */ +export interface TransactRequestSourceAsset { + /** + * + * @type {string} + * @memberof TransactRequestSourceAsset + */ + 'owner': string; + /** + * + * @type {string} + * @memberof TransactRequestSourceAsset + */ + 'ontology': string; + /** + * + * @type {string} + * @memberof TransactRequestSourceAsset + */ + 'contractName': string; + /** + * + * @type {string} + * @memberof TransactRequestSourceAsset + */ + 'contractAddress'?: string; + /** + * + * @type {string} + * @memberof TransactRequestSourceAsset + */ + 'mspId'?: string; + /** + * + * @type {string} + * @memberof TransactRequestSourceAsset + */ + 'channelName'?: string; +} /** * Response schema for a transaction request. Includes the session ID and the current status of the transaction. * @export diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts index 6868d89652..74a983f613 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/common/health.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index ac13a62b54..36d20c534e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -125,6 +125,26 @@ export enum MessageType { * @generated from enum value: MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE = 17; */ COMMIT_TRANSFER_COMPLETE = 17, + + /** + * @generated from enum value: MESSAGE_TYPE_NEW_SESSION_REQUEST = 18; + */ + NEW_SESSION_REQUEST = 18, + + /** + * @generated from enum value: MESSAGE_TYPE_NEW_SESSION_RESPONSE = 19; + */ + NEW_SESSION_RESPONSE = 19, + + /** + * @generated from enum value: MESSAGE_TYPE_PRE_SATP_TRANSFER_REQUEST = 20; + */ + PRE_SATP_TRANSFER_REQUEST = 20, + + /** + * @generated from enum value: MESSAGE_TYPE_PRE_SATP_TRANSFER_RESPONSE = 21; + */ + PRE_SATP_TRANSFER_RESPONSE = 21, } // Retrieve enum metadata with: proto3.getEnumType(MessageType) proto3.util.setEnumType(MessageType, "cacti.satp.v02.common.MessageType", [ @@ -146,6 +166,10 @@ proto3.util.setEnumType(MessageType, "cacti.satp.v02.common.MessageType", [ { no: 15, name: "MESSAGE_TYPE_COMMIT_FINAL" }, { no: 16, name: "MESSAGE_TYPE_ACK_COMMIT_FINAL" }, { no: 17, name: "MESSAGE_TYPE_COMMIT_TRANSFER_COMPLETE" }, + { no: 18, name: "MESSAGE_TYPE_NEW_SESSION_REQUEST" }, + { no: 19, name: "MESSAGE_TYPE_NEW_SESSION_RESPONSE" }, + { no: 20, name: "MESSAGE_TYPE_PRE_SATP_TRANSFER_REQUEST" }, + { no: 21, name: "MESSAGE_TYPE_PRE_SATP_TRANSFER_RESPONSE" }, ]); /** @@ -360,6 +384,38 @@ proto3.util.setEnumType(Error, "cacti.satp.v02.common.Error", [ { no: 11, name: "ERROR_MESSAGE_OUT_OF_SEQUENCE" }, ]); +/** + * @generated from enum cacti.satp.v02.common.TokenType + */ +export enum TokenType { + /** + * @generated from enum value: TOKEN_TYPE_ERC20 = 0; + */ + ERC20 = 0, + + /** + * @generated from enum value: TOKEN_TYPE_ERC721 = 1; + */ + ERC721 = 1, + + /** + * @generated from enum value: TOKEN_TYPE_ERC1155 = 2; + */ + ERC1155 = 2, + + /** + * @generated from enum value: TOKEN_TYPE_NONSTANDARD = 3; + */ + NONSTANDARD = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(TokenType) +proto3.util.setEnumType(TokenType, "cacti.satp.v02.common.TokenType", [ + { no: 0, name: "TOKEN_TYPE_ERC20" }, + { no: 1, name: "TOKEN_TYPE_ERC721" }, + { no: 2, name: "TOKEN_TYPE_ERC1155" }, + { no: 3, name: "TOKEN_TYPE_NONSTANDARD" }, +]); + /** * TODO: define the common parameters to every protocol message * @@ -559,6 +615,16 @@ export class TransferClaims extends Message { */ amountToBeneficiary = ""; + /** + * @generated from field: repeated cacti.satp.v02.common.PrivacyPolicy processPolicies = 17; + */ + processPolicies: PrivacyPolicy[] = []; + + /** + * @generated from field: repeated cacti.satp.v02.common.PrivacyPolicy mergePolicies = 18; + */ + mergePolicies: PrivacyPolicy[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -583,6 +649,8 @@ export class TransferClaims extends Message { { no: 14, name: "max_timeout", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 15, name: "amount_from_originator", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 16, name: "amount_to_beneficiary", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 17, name: "processPolicies", kind: "message", T: PrivacyPolicy, repeated: true }, + { no: 18, name: "mergePolicies", kind: "message", T: PrivacyPolicy, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TransferClaims { @@ -633,6 +701,49 @@ export class TransferClaimsFormat extends Message { } } +/** + * @generated from message cacti.satp.v02.common.PrivacyPolicy + */ +export class PrivacyPolicy extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: repeated string arguments = 2; + */ + arguments: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.PrivacyPolicy"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "arguments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PrivacyPolicy { + return new PrivacyPolicy().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PrivacyPolicy { + return new PrivacyPolicy().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PrivacyPolicy { + return new PrivacyPolicy().fromJsonString(jsonString, options); + } + + static equals(a: PrivacyPolicy | PlainMessage | undefined, b: PrivacyPolicy | PlainMessage | undefined): boolean { + return proto3.util.equals(PrivacyPolicy, a, b); + } +} + /** * @generated from message cacti.satp.v02.common.Permissions */ @@ -1589,3 +1700,135 @@ export class AssignmentAssertionClaim extends Message } } +/** + * @generated from message cacti.satp.v02.common.WrapAssertionClaim + */ +export class WrapAssertionClaim extends Message { + /** + * @generated from field: string receipt = 1; + */ + receipt = ""; + + /** + * @generated from field: string signature = 2; + */ + signature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.WrapAssertionClaim"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WrapAssertionClaim { + return new WrapAssertionClaim().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WrapAssertionClaim { + return new WrapAssertionClaim().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WrapAssertionClaim { + return new WrapAssertionClaim().fromJsonString(jsonString, options); + } + + static equals(a: WrapAssertionClaim | PlainMessage | undefined, b: WrapAssertionClaim | PlainMessage | undefined): boolean { + return proto3.util.equals(WrapAssertionClaim, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.common.Asset + */ +export class Asset extends Message { + /** + * @generated from field: string token_id = 1; + */ + tokenId = ""; + + /** + * @generated from field: cacti.satp.v02.common.TokenType token_type = 2; + */ + tokenType = TokenType.ERC20; + + /** + * @generated from field: string owner = 3; + */ + owner = ""; + + /** + * @generated from field: uint64 amount = 4; + */ + amount = protoInt64.zero; + + /** + * @generated from field: string ontology = 5; + */ + ontology = ""; + + /** + * @generated from field: string contract_name = 7; + */ + contractName = ""; + + /** + * besu + * + * @generated from field: string contract_address = 6; + */ + contractAddress = ""; + + /** + * fabric + * + * @generated from field: string msp_id = 8; + */ + mspId = ""; + + /** + * @generated from field: string channel_name = 9; + */ + channelName = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Asset"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "token_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "token_type", kind: "enum", T: proto3.getEnumType(TokenType) }, + { no: 3, name: "owner", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "amount", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 5, name: "ontology", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "contract_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "contract_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "msp_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "channel_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Asset { + return new Asset().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Asset { + return new Asset().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Asset { + return new Asset().fromJsonString(jsonString, options); + } + + static equals(a: Asset | PlainMessage | undefined, b: Asset | PlainMessage | undefined): boolean { + return proto3.util.equals(Asset, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts index cd60e5eb81..1368f0bc01 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/common/session.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 39ea829e99..29c9d725f3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { AssetProfile, AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, History, LockAssertionClaim, LockAssertionClaimFormat, LockType, MintAssertionClaim, MintAssertionClaimFormat, PayloadProfile, Permissions, SignatureAlgorithm, SubsequentCalls, TransferClaims, TransferClaimsFormat } from "./message_pb.js"; +import { Asset, AssetProfile, AssignmentAssertionClaim, AssignmentAssertionClaimFormat, BurnAssertionClaim, BurnAssertionClaimFormat, CredentialProfile, History, LockAssertionClaim, LockAssertionClaimFormat, LockType, MintAssertionClaim, MintAssertionClaimFormat, PayloadProfile, Permissions, SignatureAlgorithm, SubsequentCalls, TransferClaims, TransferClaimsFormat, WrapAssertionClaim } from "./message_pb.js"; /** * @generated from enum cacti.satp.v02.common.ACCEPTANCE @@ -338,10 +338,40 @@ export class SessionData extends Message { assetProfile?: AssetProfile; /** - * @generated from field: string resource_url = 61; + * @generated from field: string sender_contract_ontology = 61; + */ + senderContractOntology = ""; + + /** + * @generated from field: string receiver_contract_ontology = 62; + */ + receiverContractOntology = ""; + + /** + * @generated from field: string resource_url = 63; */ resourceUrl = ""; + /** + * @generated from field: cacti.satp.v02.common.WrapAssertionClaim sender_wrap_assertion_claim = 64; + */ + senderWrapAssertionClaim?: WrapAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.WrapAssertionClaim receiver_wrap_assertion_claim = 65; + */ + receiverWrapAssertionClaim?: WrapAssertionClaim; + + /** + * @generated from field: cacti.satp.v02.common.Asset sender_asset = 66; + */ + senderAsset?: Asset; + + /** + * @generated from field: cacti.satp.v02.common.Asset receiver_asset = 67; + */ + receiverAsset?: Asset; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -410,7 +440,13 @@ export class SessionData extends Message { { no: 58, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 59, name: "lock_assertion_expiration", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 60, name: "asset_profile", kind: "message", T: AssetProfile }, - { no: 61, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 61, name: "sender_contract_ontology", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 62, name: "receiver_contract_ontology", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 63, name: "resource_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 64, name: "sender_wrap_assertion_claim", kind: "message", T: WrapAssertionClaim }, + { no: 65, name: "receiver_wrap_assertion_claim", kind: "message", T: WrapAssertionClaim }, + { no: 66, name: "sender_asset", kind: "message", T: Asset }, + { no: 67, name: "receiver_asset", kind: "message", T: Asset }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): SessionData { @@ -435,17 +471,22 @@ export class SessionData extends Message { */ export class MessageStagesHashes extends Message { /** - * @generated from field: cacti.satp.v02.common.Stage1Hashes stage1 = 1; + * @generated from field: cacti.satp.v02.common.Stage0Hashes stage0 = 1; + */ + stage0?: Stage0Hashes; + + /** + * @generated from field: cacti.satp.v02.common.Stage1Hashes stage1 = 2; */ stage1?: Stage1Hashes; /** - * @generated from field: cacti.satp.v02.common.Stage2Hashes stage2 = 2; + * @generated from field: cacti.satp.v02.common.Stage2Hashes stage2 = 3; */ stage2?: Stage2Hashes; /** - * @generated from field: cacti.satp.v02.common.Stage3Hashes stage3 = 3; + * @generated from field: cacti.satp.v02.common.Stage3Hashes stage3 = 4; */ stage3?: Stage3Hashes; @@ -457,9 +498,10 @@ export class MessageStagesHashes extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.MessageStagesHashes"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stage1", kind: "message", T: Stage1Hashes }, - { no: 2, name: "stage2", kind: "message", T: Stage2Hashes }, - { no: 3, name: "stage3", kind: "message", T: Stage3Hashes }, + { no: 1, name: "stage0", kind: "message", T: Stage0Hashes }, + { no: 2, name: "stage1", kind: "message", T: Stage1Hashes }, + { no: 3, name: "stage2", kind: "message", T: Stage2Hashes }, + { no: 4, name: "stage3", kind: "message", T: Stage3Hashes }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesHashes { @@ -479,6 +521,61 @@ export class MessageStagesHashes extends Message { } } +/** + * @generated from message cacti.satp.v02.common.Stage0Hashes + */ +export class Stage0Hashes extends Message { + /** + * @generated from field: string new_session_request_message_hash = 1; + */ + newSessionRequestMessageHash = ""; + + /** + * @generated from field: string new_session_response_message_hash = 2; + */ + newSessionResponseMessageHash = ""; + + /** + * @generated from field: string pre_satp_transfer_request_message_hash = 3; + */ + preSatpTransferRequestMessageHash = ""; + + /** + * @generated from field: string pre_satp_transfer_response_message_hash = 4; + */ + preSatpTransferResponseMessageHash = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage0Hashes"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "new_session_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "new_session_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "pre_satp_transfer_request_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "pre_satp_transfer_response_message_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage0Hashes { + return new Stage0Hashes().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage0Hashes { + return new Stage0Hashes().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage0Hashes { + return new Stage0Hashes().fromJsonString(jsonString, options); + } + + static equals(a: Stage0Hashes | PlainMessage | undefined, b: Stage0Hashes | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage0Hashes, a, b); + } +} + /** * @generated from message cacti.satp.v02.common.Stage1Hashes */ @@ -649,17 +746,22 @@ export class Stage3Hashes extends Message { */ export class MessageStagesSignatures extends Message { /** - * @generated from field: cacti.satp.v02.common.Stage1Signatures stage1 = 1; + * @generated from field: cacti.satp.v02.common.Stage0Signatures stage0 = 1; + */ + stage0?: Stage0Signatures; + + /** + * @generated from field: cacti.satp.v02.common.Stage1Signatures stage1 = 2; */ stage1?: Stage1Signatures; /** - * @generated from field: cacti.satp.v02.common.Stage2Signatures stage2 = 2; + * @generated from field: cacti.satp.v02.common.Stage2Signatures stage2 = 3; */ stage2?: Stage2Signatures; /** - * @generated from field: cacti.satp.v02.common.Stage3Signatures stage3 = 3; + * @generated from field: cacti.satp.v02.common.Stage3Signatures stage3 = 4; */ stage3?: Stage3Signatures; @@ -671,9 +773,10 @@ export class MessageStagesSignatures extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.MessageStagesSignatures"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stage1", kind: "message", T: Stage1Signatures }, - { no: 2, name: "stage2", kind: "message", T: Stage2Signatures }, - { no: 3, name: "stage3", kind: "message", T: Stage3Signatures }, + { no: 1, name: "stage0", kind: "message", T: Stage0Signatures }, + { no: 2, name: "stage1", kind: "message", T: Stage1Signatures }, + { no: 3, name: "stage2", kind: "message", T: Stage2Signatures }, + { no: 4, name: "stage3", kind: "message", T: Stage3Signatures }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesSignatures { @@ -693,6 +796,61 @@ export class MessageStagesSignatures extends Message { } } +/** + * @generated from message cacti.satp.v02.common.Stage0Signatures + */ +export class Stage0Signatures extends Message { + /** + * @generated from field: string new_session_request_message_signature = 1; + */ + newSessionRequestMessageSignature = ""; + + /** + * @generated from field: string new_session_response_message_signature = 2; + */ + newSessionResponseMessageSignature = ""; + + /** + * @generated from field: string pre_satp_transfer_request_message_signature = 3; + */ + preSatpTransferRequestMessageSignature = ""; + + /** + * @generated from field: string pre_satp_transfer_response_message_signature = 4; + */ + preSatpTransferResponseMessageSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage0Signatures"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "new_session_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "new_session_response_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "pre_satp_transfer_request_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "pre_satp_transfer_response_message_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage0Signatures { + return new Stage0Signatures().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage0Signatures { + return new Stage0Signatures().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage0Signatures { + return new Stage0Signatures().fromJsonString(jsonString, options); + } + + static equals(a: Stage0Signatures | PlainMessage | undefined, b: Stage0Signatures | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage0Signatures, a, b); + } +} + /** * @generated from message cacti.satp.v02.common.Stage1Signatures */ @@ -863,17 +1021,22 @@ export class Stage3Signatures extends Message { */ export class MessageStagesTimestamps extends Message { /** - * @generated from field: cacti.satp.v02.common.Stage1Timestamps stage1 = 1; + * @generated from field: cacti.satp.v02.common.Stage0Timestamps stage0 = 1; + */ + stage0?: Stage0Timestamps; + + /** + * @generated from field: cacti.satp.v02.common.Stage1Timestamps stage1 = 2; */ stage1?: Stage1Timestamps; /** - * @generated from field: cacti.satp.v02.common.Stage2Timestamps stage2 = 2; + * @generated from field: cacti.satp.v02.common.Stage2Timestamps stage2 = 3; */ stage2?: Stage2Timestamps; /** - * @generated from field: cacti.satp.v02.common.Stage3Timestamps stage3 = 3; + * @generated from field: cacti.satp.v02.common.Stage3Timestamps stage3 = 4; */ stage3?: Stage3Timestamps; @@ -885,9 +1048,10 @@ export class MessageStagesTimestamps extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.MessageStagesTimestamps"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stage1", kind: "message", T: Stage1Timestamps }, - { no: 2, name: "stage2", kind: "message", T: Stage2Timestamps }, - { no: 3, name: "stage3", kind: "message", T: Stage3Timestamps }, + { no: 1, name: "stage0", kind: "message", T: Stage0Timestamps }, + { no: 2, name: "stage1", kind: "message", T: Stage1Timestamps }, + { no: 3, name: "stage2", kind: "message", T: Stage2Timestamps }, + { no: 4, name: "stage3", kind: "message", T: Stage3Timestamps }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): MessageStagesTimestamps { @@ -907,6 +1071,61 @@ export class MessageStagesTimestamps extends Message { } } +/** + * @generated from message cacti.satp.v02.common.Stage0Timestamps + */ +export class Stage0Timestamps extends Message { + /** + * @generated from field: string new_session_request_message_timestamp = 1; + */ + newSessionRequestMessageTimestamp = ""; + + /** + * @generated from field: string new_session_response_message_timestamp = 2; + */ + newSessionResponseMessageTimestamp = ""; + + /** + * @generated from field: string pre_satp_transfer_request_message_timestamp = 3; + */ + preSatpTransferRequestMessageTimestamp = ""; + + /** + * @generated from field: string pre_satp_transfer_response_message_timestamp = 4; + */ + preSatpTransferResponseMessageTimestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.Stage0Timestamps"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "new_session_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "new_session_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "pre_satp_transfer_request_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "pre_satp_transfer_response_message_timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Stage0Timestamps { + return new Stage0Timestamps().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Stage0Timestamps { + return new Stage0Timestamps().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Stage0Timestamps { + return new Stage0Timestamps().fromJsonString(jsonString, options); + } + + static equals(a: Stage0Timestamps | PlainMessage | undefined, b: Stage0Timestamps | PlainMessage | undefined): boolean { + return proto3.util.equals(Stage0Timestamps, a, b); + } +} + /** * @generated from message cacti.satp.v02.common.Stage1Timestamps */ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts index 5989c0b6ba..de4bca5b35 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/crash_recovery.proto (package cacti.satp.v02.crash, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts index fe85c7ea67..b9619c447a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_connect.ts @@ -1,10 +1,10 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck -import { Empty, MethodKind } from "@bufbuild/protobuf"; -import { PreTransferCommenceRequestMessage, PreTransferCommenceResponseMessage, PreTransferVerificationAndContextEstablishmentRequest, PreTransferVerificationAndContextEstablishmentResponse, PublicKey } from "./stage_0_pb.js"; +import { CheckRequest, CheckResponse, NewSessionRequest, NewSessionResponse, PreSATPTransferRequest, PreSATPTransferResponse } from "./stage_0_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; /** * @generated from service cacti.satp.v02.SatpStage0Service @@ -13,34 +13,30 @@ export const SatpStage0Service = { typeName: "cacti.satp.v02.SatpStage0Service", methods: { /** - * util RPCs - * - * @generated from rpc cacti.satp.v02.SatpStage0Service.GetPublicKey + * @generated from rpc cacti.satp.v02.SatpStage0Service.NewSession */ - getPublicKey: { - name: "GetPublicKey", - I: Empty, - O: PublicKey, + newSession: { + name: "NewSession", + I: NewSessionRequest, + O: NewSessionResponse, kind: MethodKind.Unary, }, /** - * step RPCs - * - * @generated from rpc cacti.satp.v02.SatpStage0Service.PreTransferProposalClaims + * @generated from rpc cacti.satp.v02.SatpStage0Service.PreSATPTransfer */ - preTransferProposalClaims: { - name: "PreTransferProposalClaims", - I: PreTransferVerificationAndContextEstablishmentRequest, - O: PreTransferVerificationAndContextEstablishmentResponse, + preSATPTransfer: { + name: "PreSATPTransfer", + I: PreSATPTransferRequest, + O: PreSATPTransferResponse, kind: MethodKind.Unary, }, /** - * @generated from rpc cacti.satp.v02.SatpStage0Service.PreTransferCommence + * @generated from rpc cacti.satp.v02.SatpStage0Service.Check */ - preTransferCommence: { - name: "PreTransferCommence", - I: PreTransferCommenceRequestMessage, - O: PreTransferCommenceResponseMessage, + check: { + name: "Check", + I: CheckRequest, + O: CheckResponse, kind: MethodKind.Unary, }, } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts index 5a7a7b0b48..cacc514805 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -5,291 +5,411 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { CommonSatp, TransferClaims } from "./common/message_pb.js"; +import { Asset, WrapAssertionClaim } from "./common/message_pb.js"; /** - * @generated from message cacti.satp.v02.PrivacyPolicy + * @generated from enum cacti.satp.v02.STATUS */ -export class PrivacyPolicy extends Message { +export enum STATUS { /** - * @generated from field: string name = 1; + * @generated from enum value: STATUS_UNSPECIFIED = 0; */ - name = ""; + STATUS_UNSPECIFIED = 0, /** - * @generated from field: repeated string arguments = 2; + * @generated from enum value: STATUS_ACCEPTED = 1; */ - arguments: string[] = []; + STATUS_ACCEPTED = 1, - constructor(data?: PartialMessage) { + /** + * @generated from enum value: STATUS_REJECTED = 2; + */ + STATUS_REJECTED = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(STATUS) +proto3.util.setEnumType(STATUS, "cacti.satp.v02.STATUS", [ + { no: 0, name: "STATUS_UNSPECIFIED" }, + { no: 1, name: "STATUS_ACCEPTED" }, + { no: 2, name: "STATUS_REJECTED" }, +]); + +/** + * @generated from message cacti.satp.v02.NewSessionRequest + */ +export class NewSessionRequest extends Message { + /** + * @generated from field: string session_id = 1; + */ + sessionId = ""; + + /** + * @generated from field: string context_id = 2; + */ + contextId = ""; + + /** + * @generated from field: string client_transfer_number = 3; + */ + clientTransferNumber = ""; + + /** + * @generated from field: string sender_gateway_network_id = 4; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: string recipient_gateway_network_id = 5; + */ + recipientGatewayNetworkId = ""; + + /** + * TODO FIX this change so it gets the gateway ID from channel + * + * @generated from field: string gateway_id = 6; + */ + gatewayId = ""; + + /** + * @generated from field: string client_signature = 7; + */ + clientSignature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.PrivacyPolicy"; + static readonly typeName = "cacti.satp.v02.NewSessionRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "arguments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "gateway_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): PrivacyPolicy { - return new PrivacyPolicy().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): NewSessionRequest { + return new NewSessionRequest().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): PrivacyPolicy { - return new PrivacyPolicy().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): NewSessionRequest { + return new NewSessionRequest().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): PrivacyPolicy { - return new PrivacyPolicy().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): NewSessionRequest { + return new NewSessionRequest().fromJsonString(jsonString, options); } - static equals(a: PrivacyPolicy | PlainMessage | undefined, b: PrivacyPolicy | PlainMessage | undefined): boolean { - return proto3.util.equals(PrivacyPolicy, a, b); + static equals(a: NewSessionRequest | PlainMessage | undefined, b: NewSessionRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(NewSessionRequest, a, b); } } /** - * @generated from message cacti.satp.v02.PreTransferVerificationAndContextEstablishmentRequest + * @generated from message cacti.satp.v02.NewSessionResponse */ -export class PreTransferVerificationAndContextEstablishmentRequest extends Message { +export class NewSessionResponse extends Message { /** - * @generated from field: cacti.satp.v02.common.CommonSatp context = 1; + * @generated from field: string session_id = 1; */ - context?: CommonSatp; + sessionId = ""; /** - * needed ? - * - * @generated from field: cacti.satp.v02.common.TransferClaims transfer_claims = 2; + * @generated from field: string context_id = 2; */ - transferClaims?: TransferClaims; + contextId = ""; /** - * @generated from field: repeated cacti.satp.v02.PrivacyPolicy processPolicies = 3; + * @generated from field: cacti.satp.v02.STATUS status = 3; */ - processPolicies: PrivacyPolicy[] = []; + status = STATUS.STATUS_UNSPECIFIED; /** - * @generated from field: repeated cacti.satp.v02.PrivacyPolicy mergePolicies = 4; + * @generated from field: string hash_previous_message = 4; */ - mergePolicies: PrivacyPolicy[] = []; + hashPreviousMessage = ""; - constructor(data?: PartialMessage) { + /** + * @generated from field: string sender_gateway_network_id = 5; + */ + senderGatewayNetworkId = ""; + + /** + * @generated from field: string recipient_gateway_network_id = 6; + */ + recipientGatewayNetworkId = ""; + + /** + * @generated from field: string server_signature = 7; + */ + serverSignature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.PreTransferVerificationAndContextEstablishmentRequest"; + static readonly typeName = "cacti.satp.v02.NewSessionResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "context", kind: "message", T: CommonSatp }, - { no: 2, name: "transfer_claims", kind: "message", T: TransferClaims }, - { no: 3, name: "processPolicies", kind: "message", T: PrivacyPolicy, repeated: true }, - { no: 4, name: "mergePolicies", kind: "message", T: PrivacyPolicy, repeated: true }, + { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "status", kind: "enum", T: proto3.getEnumType(STATUS) }, + { no: 4, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { - return new PreTransferVerificationAndContextEstablishmentRequest().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): NewSessionResponse { + return new NewSessionResponse().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { - return new PreTransferVerificationAndContextEstablishmentRequest().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): NewSessionResponse { + return new NewSessionResponse().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): PreTransferVerificationAndContextEstablishmentRequest { - return new PreTransferVerificationAndContextEstablishmentRequest().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): NewSessionResponse { + return new NewSessionResponse().fromJsonString(jsonString, options); } - static equals(a: PreTransferVerificationAndContextEstablishmentRequest | PlainMessage | undefined, b: PreTransferVerificationAndContextEstablishmentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(PreTransferVerificationAndContextEstablishmentRequest, a, b); + static equals(a: NewSessionResponse | PlainMessage | undefined, b: NewSessionResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(NewSessionResponse, a, b); } } /** - * TODO - * - * @generated from message cacti.satp.v02.PreTransferVerificationAndContextEstablishmentResponse + * @generated from message cacti.satp.v02.PreSATPTransferRequest */ -export class PreTransferVerificationAndContextEstablishmentResponse extends Message { +export class PreSATPTransferRequest extends Message { + /** + * @generated from field: string session_id = 1; + */ + sessionId = ""; + + /** + * @generated from field: string context_id = 2; + */ + contextId = ""; + /** - * @generated from field: cacti.satp.v02.common.CommonSatp context = 1; + * @generated from field: string client_transfer_number = 3; */ - context?: CommonSatp; + clientTransferNumber = ""; /** - * @generated from field: repeated cacti.satp.v02.PrivacyPolicy processPolicies_counter_proposal = 2; + * @generated from field: string sender_gateway_network_id = 4; */ - processPoliciesCounterProposal: PrivacyPolicy[] = []; + senderGatewayNetworkId = ""; /** - * @generated from field: repeated cacti.satp.v02.PrivacyPolicy mergePolicies_counter_proposal = 3; + * @generated from field: string recipient_gateway_network_id = 5; */ - mergePoliciesCounterProposal: PrivacyPolicy[] = []; + recipientGatewayNetworkId = ""; /** - * @generated from field: string hash_pre_transfer_verification_and_context = 4; + * @generated from field: cacti.satp.v02.common.Asset sender_asset = 6; */ - hashPreTransferVerificationAndContext = ""; + senderAsset?: Asset; /** - * @generated from field: string timestamp = 5; + * @generated from field: cacti.satp.v02.common.Asset receiver_asset = 7; */ - timestamp = ""; + receiverAsset?: Asset; - constructor(data?: PartialMessage) { + /** + * @generated from field: cacti.satp.v02.common.WrapAssertionClaim wrap_assertion_claim = 8; + */ + wrapAssertionClaim?: WrapAssertionClaim; + + /** + * @generated from field: string hash_previous_message = 9; + */ + hashPreviousMessage = ""; + + /** + * @generated from field: string client_signature = 10; + */ + clientSignature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.PreTransferVerificationAndContextEstablishmentResponse"; + static readonly typeName = "cacti.satp.v02.PreSATPTransferRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "context", kind: "message", T: CommonSatp }, - { no: 2, name: "processPolicies_counter_proposal", kind: "message", T: PrivacyPolicy, repeated: true }, - { no: 3, name: "mergePolicies_counter_proposal", kind: "message", T: PrivacyPolicy, repeated: true }, - { no: 4, name: "hash_pre_transfer_verification_and_context", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "sender_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "recipient_gateway_network_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "sender_asset", kind: "message", T: Asset }, + { no: 7, name: "receiver_asset", kind: "message", T: Asset }, + { no: 8, name: "wrap_assertion_claim", kind: "message", T: WrapAssertionClaim }, + { no: 9, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { - return new PreTransferVerificationAndContextEstablishmentResponse().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): PreSATPTransferRequest { + return new PreSATPTransferRequest().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { - return new PreTransferVerificationAndContextEstablishmentResponse().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): PreSATPTransferRequest { + return new PreSATPTransferRequest().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): PreTransferVerificationAndContextEstablishmentResponse { - return new PreTransferVerificationAndContextEstablishmentResponse().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): PreSATPTransferRequest { + return new PreSATPTransferRequest().fromJsonString(jsonString, options); } - static equals(a: PreTransferVerificationAndContextEstablishmentResponse | PlainMessage | undefined, b: PreTransferVerificationAndContextEstablishmentResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(PreTransferVerificationAndContextEstablishmentResponse, a, b); + static equals(a: PreSATPTransferRequest | PlainMessage | undefined, b: PreSATPTransferRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(PreSATPTransferRequest, a, b); } } /** - * @generated from message cacti.satp.v02.PreTransferCommenceRequestMessage + * @generated from message cacti.satp.v02.PreSATPTransferResponse */ -export class PreTransferCommenceRequestMessage extends Message { +export class PreSATPTransferResponse extends Message { /** - * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + * @generated from field: string session_id = 1; */ - common?: CommonSatp; + sessionId = ""; /** - * @generated from field: string hash_pre_transfer_verification_and_context = 2; + * @generated from field: string context_id = 2; */ - hashPreTransferVerificationAndContext = ""; + contextId = ""; /** - * @generated from field: string client_transfer_number = 3; + * @generated from field: cacti.satp.v02.common.WrapAssertionClaim wrap_assertion_claim = 3; */ - clientTransferNumber = ""; + wrapAssertionClaim?: WrapAssertionClaim; - constructor(data?: PartialMessage) { + /** + * @generated from field: string hash_previous_message = 4; + */ + hashPreviousMessage = ""; + + /** + * @generated from field: string recipient_token_id = 5; + */ + recipientTokenId = ""; + + /** + * @generated from field: string server_signature = 6; + */ + serverSignature = ""; + + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.PreTransferCommenceRequestMessage"; + static readonly typeName = "cacti.satp.v02.PreSATPTransferResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "hash_pre_transfer_verification_and_context", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "wrap_assertion_claim", kind: "message", T: WrapAssertionClaim }, + { no: 4, name: "hash_previous_message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "recipient_token_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferCommenceRequestMessage { - return new PreTransferCommenceRequestMessage().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): PreSATPTransferResponse { + return new PreSATPTransferResponse().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferCommenceRequestMessage { - return new PreTransferCommenceRequestMessage().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): PreSATPTransferResponse { + return new PreSATPTransferResponse().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): PreTransferCommenceRequestMessage { - return new PreTransferCommenceRequestMessage().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): PreSATPTransferResponse { + return new PreSATPTransferResponse().fromJsonString(jsonString, options); } - static equals(a: PreTransferCommenceRequestMessage | PlainMessage | undefined, b: PreTransferCommenceRequestMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(PreTransferCommenceRequestMessage, a, b); + static equals(a: PreSATPTransferResponse | PlainMessage | undefined, b: PreSATPTransferResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(PreSATPTransferResponse, a, b); } } /** - * @generated from message cacti.satp.v02.PreTransferCommenceResponseMessage + * @generated from message cacti.satp.v02.CheckRequest */ -export class PreTransferCommenceResponseMessage extends Message { +export class CheckRequest extends Message { /** - * @generated from field: cacti.satp.v02.common.CommonSatp common = 1; + * @generated from field: string check = 1; */ - common?: CommonSatp; + check = ""; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.PreTransferCommenceResponseMessage"; + static readonly typeName = "cacti.satp.v02.CheckRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "common", kind: "message", T: CommonSatp }, + { no: 1, name: "check", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): PreTransferCommenceResponseMessage { - return new PreTransferCommenceResponseMessage().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): CheckRequest { + return new CheckRequest().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): PreTransferCommenceResponseMessage { - return new PreTransferCommenceResponseMessage().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): CheckRequest { + return new CheckRequest().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): PreTransferCommenceResponseMessage { - return new PreTransferCommenceResponseMessage().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): CheckRequest { + return new CheckRequest().fromJsonString(jsonString, options); } - static equals(a: PreTransferCommenceResponseMessage | PlainMessage | undefined, b: PreTransferCommenceResponseMessage | PlainMessage | undefined): boolean { - return proto3.util.equals(PreTransferCommenceResponseMessage, a, b); + static equals(a: CheckRequest | PlainMessage | undefined, b: CheckRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CheckRequest, a, b); } } /** - * @generated from message cacti.satp.v02.PublicKey + * @generated from message cacti.satp.v02.CheckResponse */ -export class PublicKey extends Message { +export class CheckResponse extends Message { /** - * @generated from field: string public_key = 1; + * @generated from field: string check = 1; */ - publicKey = ""; + check = ""; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "cacti.satp.v02.PublicKey"; + static readonly typeName = "cacti.satp.v02.CheckResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "public_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "check", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): PublicKey { - return new PublicKey().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): CheckResponse { + return new CheckResponse().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): PublicKey { - return new PublicKey().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): CheckResponse { + return new CheckResponse().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): PublicKey { - return new PublicKey().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): CheckResponse { + return new CheckResponse().fromJsonString(jsonString, options); } - static equals(a: PublicKey | PlainMessage | undefined, b: PublicKey | PlainMessage | undefined): boolean { - return proto3.util.equals(PublicKey, a, b); + static equals(a: CheckResponse | PlainMessage | undefined, b: CheckResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CheckResponse, a, b); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts index 342989c8be..0efa818289 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts index 1acc5ea289..b21c863cea 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts index d7e1779400..533133fd22 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts,js_import_style=module" +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,js_import_style=module" // @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index 18d59d24fa..468846b0cb 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -17,6 +17,10 @@ import { Transport as ConnectTransport, } from "@connectrpc/connect"; +import { Express } from "express"; + +import { expressConnectMiddleware } from "@connectrpc/connect-express"; + import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_connect"; @@ -25,22 +29,25 @@ import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_con export interface IGatewayOrchestratorOptions { logLevel?: LogLevelDesc; localGateway: GatewayIdentity; - counterPartyGateways: GatewayIdentity[] | undefined; + counterPartyGateways?: GatewayIdentity[]; signer: JsObjectSigner; } //import { COREDispatcher, COREDispatcherOptions } from "../core/dispatcher"; import { createPromiseClient } from "@connectrpc/connect"; -import { createConnectTransport } from "@connectrpc/connect-node"; +import { createGrpcWebTransport } from "@connectrpc/connect-node"; import { getGatewaySeeds, resolveGatewayID, } from "../network-identification/resolve-gateway"; +import { SATPHandler, Stage } from "../types/satp-protocol"; export class GatewayOrchestrator { public readonly label = "GatewayOrchestrator"; + private expressServer: Express | undefined; protected localGateway: GatewayIdentity; private counterPartyGateways: Map = new Map(); + private handlers: Map = new Map(); // TODO!: add logic to manage sessions (parallelization, user input, freeze, unfreeze, rollback, recovery) private channels: Map = new Map(); @@ -62,9 +69,11 @@ export class GatewayOrchestrator { this.logger.info( `Initializing gateway connection manager with ${seedGateways} seed gateways`, ); + const allCounterPartyGateways = seedGateways.concat( options.counterPartyGateways ?? [], ); + // populate counterPartyGateways this.counterPartyGateways = new Map( allCounterPartyGateways.map((gateway) => [gateway.id, gateway]), @@ -74,6 +83,11 @@ export class GatewayOrchestrator { `Gateway Connection Manager bootstrapped with ${allCounterPartyGateways.length} gateways`, ); + this.channels.set( + this.localGateway.id, + this.createChannel(this.localGateway), + ); + this.addGateways(allCounterPartyGateways); const numberGatewayChannels = this.connectToCounterPartyGateways(); if (numberGatewayChannels > 0) { @@ -88,6 +102,30 @@ export class GatewayOrchestrator { return this.localGateway; } + public addGOLServer(server: Express): void { + this.expressServer = server; + } + + public startServices(): void { + for (const stage of this.handlers.keys()) { + this.logger.info( + `Setting up routes for stage ${`/${this.handlers.get(stage)!.getStage()}`}`, + ); + this.expressServer!.use( + `/${this.handlers.get(stage)!.getStage()}`, + expressConnectMiddleware({ + routes: this.handlers + .get(stage)! + .setupRouter.bind(this.handlers.get(stage)!), + }), + ); + } + } + + public addHandlers(handlers: Map): void { + this.handlers = handlers; + } + async startupGatewayOrchestrator(): Promise { if (this.counterPartyGateways.values.length === 0) { this.logger.info("No gateways to connect to"); @@ -97,13 +135,27 @@ export class GatewayOrchestrator { } } + public getGatewayIdentity(id: string): GatewayIdentity | undefined { + if (this.localGateway.id === id) { + return this.localGateway; + } else { + return this.counterPartyGateways.get(id); + } + } + + public getCounterPartyGateway(id: string): GatewayIdentity | undefined { + return this.counterPartyGateways.get(id); + } + public getChannel(dlt: SupportedChain): GatewayChannel { const channels = Array.from(this.channels.values()); const channel = channels.find((channel) => { return channel.supportedDLTs.includes(dlt); }); if (!channel) { - throw new Error(`No channel found for DLT ${dlt}`); + throw new Error( + `No channel found for DLT ${dlt} \n available channels: ${JSON.stringify(channels)}`, + ); } return channel; } @@ -114,11 +166,18 @@ export class GatewayOrchestrator { isSelfId(id: string): boolean { return id === this.localGateway.id; } + getSelfId(): string { + return this.localGateway.id; + } isInCounterPartyGateways(id: string): boolean { return this.counterPartyGateways.has(id); } + getCounterPartyGateways(): Map { + return this.counterPartyGateways; + } + isInChannels(id: string): boolean { return this.channels.has(id); } @@ -134,9 +193,8 @@ export class GatewayOrchestrator { filterNewIds(ids: string[]): string[] { return ids.filter((id) => { return ( - !this.isInCounterPartyGateways(id) && - !this.isInChannels(id) && - !this.isSelfId(id) + // !this.isInCounterPartyGateways(id) && + !this.isInChannels(id) && !this.isSelfId(id) ); }); } @@ -156,7 +214,7 @@ export class GatewayOrchestrator { return 0; } - // get gateway identtiies from counterPartyGateways + // get gateway identities from counterPartyGateways const gatewaysToAdd = idsToAdd.map( (id) => this.counterPartyGateways.get(id)!, ); @@ -189,7 +247,9 @@ export class GatewayOrchestrator { clients: clients, supportedDLTs: identity.supportedDLTs, }; - + this.logger.info( + `Created channel to gateway ${identity.id} \n supported DLTs: ${identity.supportedDLTs}`, + ); return channel; } @@ -206,8 +266,50 @@ export class GatewayOrchestrator { identity: GatewayIdentity, ): Map> { // one function for each client type; aggregate in array - const transport = createConnectTransport({ - baseUrl: identity.address + ":" + identity.gatewayGrpcPort, + this.logger.debug( + `Creating clients for gateway ${JSON.stringify(identity)}`, + ); + const transport0 = createGrpcWebTransport({ + baseUrl: + identity.address + + ":" + + identity.gatewayServerPort + + `/${Stage.STAGE0}`, + httpVersion: "1.1", + }); + + this.logger.debug( + "Transport:" + + identity.address + + ":" + + identity.gatewayServerPort + + `/${Stage.STAGE0}`, + ); + + const transport1 = createGrpcWebTransport({ + baseUrl: + identity.address + + ":" + + identity.gatewayServerPort + + `/${Stage.STAGE1}`, + httpVersion: "1.1", + }); + + const transport2 = createGrpcWebTransport({ + baseUrl: + identity.address + + ":" + + identity.gatewayServerPort + + `/${Stage.STAGE2}`, + httpVersion: "1.1", + }); + + const transport3 = createGrpcWebTransport({ + baseUrl: + identity.address + + ":" + + identity.gatewayServerPort + + `/${Stage.STAGE3}`, httpVersion: "1.1", }); @@ -216,10 +318,10 @@ export class GatewayOrchestrator { PromiseConnectClient > = new Map(); - clients.set("0", this.createStage0ServiceClient(transport)); - clients.set("1", this.createStage1ServiceClient(transport)); - clients.set("2", this.createStage2ServiceClient(transport)); - clients.set("3", this.createStage3ServiceClient(transport)); + clients.set("0", this.createStage0ServiceClient(transport0)); + clients.set("1", this.createStage1ServiceClient(transport1)); + clients.set("2", this.createStage2ServiceClient(transport2)); + clients.set("3", this.createStage3ServiceClient(transport3)); // todo perform healthcheck on startup; should be in stage 0 return clients; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts index 9ca79aafd9..d4221ccb96 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts @@ -57,8 +57,6 @@ export class SATPBridgesManager { throw new Error(`Unsupported network: ${bridgeConfig.network}`); } - this.log.debug(`Creating 2 ${SATPBridgesManager.CLASS_NAME}...`); - const config: SATPBridgeConfig = { network: bridge, logLevel: this.level, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 02ea361a6f..4b96bebbb5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -13,7 +13,7 @@ import { Stage1ServerService } from "../core/stage-services/server/stage1-server import { Stage2ServerService } from "../core/stage-services/server/stage2-server-service"; import { Stage3ServerService } from "../core/stage-services/server/stage3-server-service"; import { SATPSession } from "../core/satp-session"; -import { SupportedChain } from "../core/types"; +import { GatewayIdentity, SupportedChain } from "../core/types"; import { Stage0ClientService } from "../core/stage-services/client/stage0-client-service"; import { Stage1ClientService } from "../core/stage-services/client/stage1-client-service"; import { Stage2ClientService } from "../core/stage-services/client/stage2-client-service"; @@ -24,7 +24,6 @@ import { SATPServiceType, SATPHandlerOptions, SATPHandlerType, - ISATPHandler, SATPHandlerInstance, } from "../types/satp-protocol"; import { @@ -43,16 +42,16 @@ import { SatpStage2Service } from "../generated/proto/cacti/satp/v02/stage_2_con import { SatpStage3Service } from "../generated/proto/cacti/satp/v02/stage_3_connect"; import { PromiseClient as PromiseConnectClient } from "@connectrpc/connect"; import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; -import { Empty } from "@bufbuild/protobuf"; export interface ISATPManagerOptions { logLevel?: LogLevelDesc; instanceId: string; sessions?: Map; signer: JsObjectSigner; + pubKey: string; supportedDLTs: SupportedChain[]; bridgeManager: SATPBridgesManager; - orquestrator: GatewayOrchestrator; + orchestrator: GatewayOrchestrator; } export class SATPManager { @@ -69,10 +68,13 @@ export class SATPManager { Map > = new Map(); private readonly satpHandlers: Map = new Map(); + private _pubKey: string; private readonly bridgesManager: SATPBridgesManager; - private readonly orquestrator: GatewayOrchestrator; + private readonly orchestrator: GatewayOrchestrator; + + private gatewaysPubKeys: Map = new Map(); constructor(public readonly options: ISATPManagerOptions) { const fnTag = `${SATPManager.CLASS_NAME}#constructor()`; @@ -86,7 +88,9 @@ export class SATPManager { this.supportedDLTs = options.supportedDLTs; this.signer = options.signer; this.bridgesManager = options.bridgeManager; - this.orquestrator = options.orquestrator; + this.orchestrator = options.orchestrator; + this._pubKey = options.pubKey; + this.loadPubKeys(this.orchestrator.getCounterPartyGateways()); this.sessions = options.sessions || new Map(); const handlersClasses = [ @@ -125,6 +129,12 @@ export class SATPManager { ); this.initializeHandlers(handlersClasses, handlersOptions); + + this.orchestrator.addHandlers(this.satpHandlers); + } + + public get pubKey(): string { + return this._pubKey; } public getServiceByStage( @@ -177,10 +187,12 @@ export class SATPManager { sessionId?: string, contextID?: string, ): SATPSession { - let session: SATPSession; if (!sessionId) { + //TODO maybe compare to "" + if (!contextID) { + throw new Error("ContextID missing"); + } return this.createNewSession(contextID || "MOCK_CONTEXT_ID"); - return session; } else { const existingSession = this.sessions.get(sessionId); return existingSession || this.createNewSession("MOCK_CONTEXT_ID"); @@ -190,7 +202,7 @@ export class SATPManager { private createNewSession(contextID: string): SATPSession { const session = new SATPSession({ contextID: contextID, - server: true, //todo implement the separation of server and client + server: false, client: true, }); this.sessions?.set(session.getSessionId(), session); @@ -285,6 +297,8 @@ export class SATPManager { serverService: serverService, clientService: clientService, supportedDLTs: this.supportedDLTs, + pubkeys: this.gatewaysPubKeys, + gatewayId: this.orchestrator.ourGateway.id, stage: serviceIndex, loggerOptions: { level: level, @@ -332,7 +346,7 @@ export class SATPManager { } public async initiateTransfer(session: SATPSession): Promise { - const fnTag = `${SATPManager.CLASS_NAME}#initializeHandlers()`; + const fnTag = `${SATPManager.CLASS_NAME}#initiateTransfer()`; this.logger.info(`${fnTag}, Initiating Transfer`); this.logger.debug( `SessionData: ${JSON.stringify(session.getClientSessionData())}`, @@ -341,8 +355,8 @@ export class SATPManager { if (!session.getClientSessionData()) { throw new Error(`${fnTag}, Session not found`); } - - const channel = this.orquestrator.getChannel( + //maybe get a suitable gateway first. + const channel = this.orchestrator.getChannel( session.getClientSessionData() ?.recipientGatewayNetworkId as SupportedChain, ); @@ -350,29 +364,66 @@ export class SATPManager { if (!channel) { throw new Error(`${fnTag}, Channel not found`); } - + const counterGatewayID = this.orchestrator.getGatewayIdentity( + channel.toGatewayID, + ); + if (!counterGatewayID) { + throw new Error(`${fnTag}, counterparty gateway ID not found`); + } const sessionData: SessionData = session.getClientSessionData() as SessionData; + sessionData.receiverGatewayOwnerId = channel.toGatewayID; + const clientSatpStage0: PromiseConnectClient = channel.clients.get("0") as PromiseConnectClient< typeof SatpStage0Service >; + + if (!clientSatpStage0) { + throw new Error(`${fnTag}, Failed to get clientSatpStage0`); + } + const clientSatpStage1: PromiseConnectClient = channel.clients.get("1") as PromiseConnectClient< typeof SatpStage1Service >; + + if (!clientSatpStage1) { + throw new Error(`${fnTag}, Failed to get clientSatpStage1`); + } + const clientSatpStage2: PromiseConnectClient = channel.clients.get("2") as PromiseConnectClient< typeof SatpStage2Service >; + + if (!clientSatpStage2) { + throw new Error(`${fnTag}, Failed to get clientSatpStage2`); + } const clientSatpStage3: PromiseConnectClient = channel.clients.get("3") as PromiseConnectClient< typeof SatpStage3Service >; - const serverGatewayPubkey = (await clientSatpStage0.getPublicKey(Empty)) - .publicKey; + if (!clientSatpStage3) { + throw new Error(`${fnTag}, Failed to get clientSatpStage3`); + } + + const check = await clientSatpStage0.check({ check: "check" }); + + this.logger.info(`${fnTag}, check: ${JSON.stringify(check)}`); + + if (!check) { + throw new Error(`${fnTag}, Failed to check`); + } + + if (check.check !== "check") { + throw new Error(`${fnTag}, check failed`); + } + + //TODO: implement GetPubKey service + const serverGatewayPubkey = counterGatewayID.pubKey; if (!serverGatewayPubkey) { throw new Error(`${fnTag}, Failed to get serverGatewayPubkey`); @@ -380,11 +431,46 @@ export class SATPManager { sessionData.serverGatewayPubkey = serverGatewayPubkey; - this.logger.info(`${fnTag}, Stage 0`); + const newSessionRequest = await ( + this.getSATPHandler(SATPHandlerType.STAGE0) as Stage0SATPHandler + ).NewSessionRequest(session.getSessionId()); + + if (!newSessionRequest) { + throw new Error(`${fnTag}, Failed to create NewSessionRequest`); + } + + const responseNewSession = + await clientSatpStage0.newSession(newSessionRequest); + + this.logger.info( + `${fnTag}, responseNewSession: ${JSON.stringify(responseNewSession)}`, + ); + + if (!responseNewSession) { + throw new Error(`${fnTag}, Failed to create NewSessionRequest`); + } + + const requestPreSATPTransfer = await ( + this.getSATPHandler(SATPHandlerType.STAGE0) as Stage0SATPHandler + ).PreSATPTransferRequest(responseNewSession, session.getSessionId()); + + if (!requestPreSATPTransfer) { + throw new Error(`${fnTag}, Failed to create PreSATPTransferRequest`); + } + + const responsePreSATPTransfer = await clientSatpStage0.preSATPTransfer( + requestPreSATPTransfer, + ); + + this.logger.info( + `${fnTag}, responsePreSATPTransfer: ${JSON.stringify(responsePreSATPTransfer)}`, + ); + + this.logger.info(`${fnTag}, Stage 0 completed`); const requestTransferProposal = await ( this.getSATPHandler(SATPHandlerType.STAGE1) as Stage1SATPHandler - ).TransferProposalRequest(session.getSessionId()); + ).TransferProposalRequest(session.getSessionId(), responsePreSATPTransfer); if (!requestTransferProposal) { throw new Error(`${fnTag}, Failed to create TransferProposalRequest`); @@ -450,7 +536,7 @@ export class SATPManager { const requestCommitFinalAssertion = await ( this.getSATPHandler(SATPHandlerType.STAGE3) as Stage3SATPHandler - ).CommitFinalAssertionRequest(responseLockAssertion); + ).CommitFinalAssertionRequest(responseCommitPreparation); if (!requestCommitFinalAssertion) { throw new Error(`${fnTag}, Failed to create CommitFinalAssertionRequest`); @@ -479,4 +565,16 @@ export class SATPManager { this.logger.info(`${fnTag}, Stage 3 completed`); } + + private loadPubKeys(gateways: Map): void { + gateways.forEach((gateway) => { + if (gateway.pubKey) { + this.gatewaysPubKeys.set(gateway.id, gateway.pubKey); + } + }); + this.gatewaysPubKeys.set( + this.orchestrator.getSelfId(), + this.orchestrator.ourGateway.pubKey!, + ); + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts index f7df2e1659..72ecfcdc08 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts @@ -50,37 +50,37 @@ export function getGatewaySeeds(logger: Logger): GatewayIdentity[] { const fnTag = `#getGatewaySeeds()`; logger.trace(`Entering ${fnTag}`); - const mockGatewayIdentity: GatewayIdentity[] = [ - { - id: "1", - name: "Gateway1", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], - proofID: "mockProofID1", - gatewayServerPort: 3011, - address: "http://localhost", - }, - { - id: "2", - name: "Gateway2", - version: [ - { - Core: "1.0", - Architecture: "1.0", - Crash: "1.0", - }, - ], - supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], - proofID: "mockProofID1", - gatewayServerPort: 3014, - address: "http://localhost", - }, - ]; - return mockGatewayIdentity; + // const mockGatewayIdentity: GatewayIdentity[] = [ + // { + // id: "1", + // name: "Gateway1", + // version: [ + // { + // Core: "1.0", + // Architecture: "1.0", + // Crash: "1.0", + // }, + // ], + // supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + // proofID: "mockProofID1", + // gatewayServerPort: 3011, + // address: "http://localhost", + // }, + // { + // id: "2", + // name: "Gateway2", + // version: [ + // { + // Core: "1.0", + // Architecture: "1.0", + // Crash: "1.0", + // }, + // ], + // supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + // proofID: "mockProofID1", + // gatewayServerPort: 3014, + // address: "http://localhost", + // }, + // ]; + return []; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index c0b71257dd..f3a608d1f7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -79,6 +79,8 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { private BLOApplication?: Express; private BLOServer?: http.Server; private BLODispatcher?: BLODispatcher; + private GOLApplication?: Express; + private GOLServer?: http.Server; private readonly OAS: JsonObject; public OAPIServerEnabled: boolean = false; @@ -126,9 +128,15 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { const bridgesManagerOptions: ISATPBridgesOptions = { logLevel: this.config.logLevel, supportedDLTs: this.config.gid!.supportedDLTs, - networks: [], //todo add networks + networks: options.bridgesConfig ? options.bridgesConfig : [], }; + this.bridgesManager = new SATPBridgesManager(bridgesManagerOptions); + + if (!this.bridgesManager) { + throw new Error("BridgesManager is not defined"); + } + if (this.config.gid) { this.logger.info( "Initializing gateway connection manager with seed gateways", @@ -140,12 +148,6 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { throw new Error("GatewayIdentity is not defined"); } - this.bridgesManager = new SATPBridgesManager(bridgesManagerOptions); - - if (!this.bridgesManager) { - throw new Error("BridgesManager is not defined"); - } - this.instanceId = uuidv4(); const dispatcherOps: BLODispatcherOptions = { logger: this.logger, @@ -154,6 +156,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { orchestrator: this.gatewayOrchestrator, signer: this.signer, bridgesManager: this.bridgesManager, + pubKey: this.pubKey, }; this.supportedDltIDs = this.config.gid!.supportedDLTs; @@ -182,6 +185,11 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { return `@hyperledger/cactus-plugin-satp-hermes`; } + //for testing + public getBLODispatcher(): BLODispatcher | undefined { + return this.BLODispatcher; + } + public async onPluginInit(): Promise { const fnTag = `${this.className}#onPluginInit()`; this.logger.trace(`Entering ${fnTag}`); @@ -252,6 +260,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { if (!pluginOptions.gid) { pluginOptions.gid = { id: id, + pubKey: bufArray2HexStr(pluginOptions.keyPair.publicKey), name: id, version: [ { @@ -275,6 +284,12 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { pluginOptions.gid.name = id; } + if (!pluginOptions.gid.pubKey) { + pluginOptions.gid.pubKey = bufArray2HexStr( + pluginOptions.keyPair.publicKey, + ); + } + if (!pluginOptions.gid.version) { pluginOptions.gid.version = [ { @@ -326,7 +341,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { /** * Startup Methods * ---------------- - * This section includes methods responsible for starting up the server and its associated services independently of the existance of a Hyperledger Cacti Node. + * This section includes methods responsible for starting up the server and its associated services independently of the existence of a Hyperledger Cacti Node. * It ensures that both the GatewayServer and BLOServer are initiated concurrently for efficient launch. */ public async startup(): Promise { @@ -334,6 +349,8 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { this.logger.trace(`Entering ${fnTag}`); await Promise.all([this.startupBLOServer(), this.setupOpenAPIServer()]); + + await Promise.all([this.startupGOLServer()]); } protected async startupBLOServer(): Promise { @@ -378,6 +395,40 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { }); } + protected async startupGOLServer(): Promise { + // starts GOL + const fnTag = `${this.className}#startupGOLServer()`; + this.logger.trace(`Entering ${fnTag}`); + this.logger.info("Starting GOL server"); + + const port = + this.options.gid?.gatewayServerPort ?? DEFAULT_PORT_GATEWAY_SERVER; + + return new Promise(async (resolve, reject) => { + if (!this.GOLServer) { + this.GOLApplication = express(); + + this.gatewayOrchestrator.addGOLServer(this.GOLApplication!); + this.gatewayOrchestrator.startServices(); + + this.GOLServer = http.createServer(this.GOLApplication); + + this.GOLServer.listen(port, () => { + this.logger.info(`GOL server started and listening on port ${port}`); + resolve(); + }); + + this.GOLServer.on("error", (error) => { + this.logger.error(`GOL server failed to start: ${error}`); + reject(error); + }); + } else { + this.logger.warn("GOL Server already running."); + resolve(); + } + }); + } + public setupOpenAPIServer(): void { if (!this.OAPIServerEnabled) { this.logger.debug("OpenAPI server is disabled"); @@ -401,6 +452,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { swaggerUi.setup(this.OAS) as express.RequestHandler, ); } + /** * Gateway Connection Methods * -------------------------- diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts index 948da87f4a..283f7b23c3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts @@ -9,6 +9,8 @@ import { Web3SigningCredential, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { BesuAsset } from "../core/stage-services/satp-bridge/types/besu-asset"; +import { FabricAsset } from "../core/stage-services/satp-bridge/types/fabric-asset"; // inject gateway, get connectors export type SATPLedgerConnector = string; @@ -24,6 +26,7 @@ export interface FabricConfig extends NetworkConfig { contractName: string; options: IPluginLedgerConnectorFabricOptions; bungeeOptions: IPluginBungeeHermesOptions; + fabricAssets?: FabricAsset[]; } export interface BesuConfig extends NetworkConfig { keychainId: string; @@ -33,6 +36,7 @@ export interface BesuConfig extends NetworkConfig { gas: number; options: IPluginLedgerConnectorBesuOptions; bungeeOptions: IPluginBungeeHermesOptions; + besuAssets?: BesuAsset[]; } export interface TransactionResponse { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts index 86b4cd45d9..624a7326c1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-protocol.ts @@ -26,6 +26,13 @@ export enum SATPHandlerType { STAGE3 = "stage-3-handler", } +export enum Stage { + STAGE0 = "stage-0", + STAGE1 = "stage-1", + STAGE2 = "stage-2", + STAGE3 = "stage-3", +} + export interface SATPServiceStatic { new (options: ISATPServiceOptions): SATPService; readonly SERVICE_TYPE: SATPServiceType; @@ -51,6 +58,7 @@ export interface SATPHandler { setupRouter(router: ConnectRouter): void; getHandlerIdentifier(): SATPHandlerType; getHandlerSessions(): string[]; + getStage(): string; } export interface SATPHandlerOptions { @@ -58,6 +66,8 @@ export interface SATPHandlerOptions { serverService: SATPService; clientService: SATPService; supportedDLTs: SupportedChain[]; + pubkeys: Map; + gatewayId: string; loggerOptions: ILoggerOptions; stage: string; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml index ae3f997a2d..6b67993f6e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml @@ -54,6 +54,14 @@ paths: required: - contextID - mode + - fromDLTNetworkID + - toDLTNetworkID + - fromAmount + - toAmount + - beneficiaryPubkey + - originatorPubkey + - sourceAsset + - destinyAsset properties: contextID: type: string @@ -77,15 +85,53 @@ paths: fromAmount: type: string example: '100' - fromToken: - type: string - example: TOKEN1 toAmount: type: string example: '95' - toToken: + beneficiaryPubkey: + type: string + originatorPubkey: type: string - example: TOKEN2 + sourceAsset: + description: An asset + type: object + required: + - owner + - ontology + - contractName + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string + destinyAsset: + description: An asset + type: object + required: + - owner + - ontology + - contractName + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string required: true responses: '200': @@ -2037,12 +2083,40 @@ components: type: string description: The ID of the session for which the status is being requested. example: 123e4567-e89b-12d3-a456-426614174000 + Asset: + description: An asset + type: object + required: + - owner + - ontology + - contractName + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string TransactRequest: description: 'Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks.' type: object required: - contextID - mode + - fromDLTNetworkID + - toDLTNetworkID + - fromAmount + - toAmount + - beneficiaryPubkey + - originatorPubkey + - sourceAsset + - destinyAsset properties: contextID: type: string @@ -2066,15 +2140,53 @@ components: fromAmount: type: string example: '100' - fromToken: - type: string - example: TOKEN1 toAmount: type: string example: '95' - toToken: + beneficiaryPubkey: + type: string + originatorPubkey: type: string - example: TOKEN2 + sourceAsset: + description: An asset + type: object + required: + - owner + - ontology + - contractName + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string + destinyAsset: + description: An asset + type: object + required: + - owner + - ontology + - contractName + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string TransactResponse: description: Response schema for a transaction request. Includes the session ID and the current status of the transaction. type: object diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml index ab79555139..029b95f124 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml @@ -193,12 +193,40 @@ StatusRequest: type: string description: The ID of the session for which the status is being requested. example: "123e4567-e89b-12d3-a456-426614174000" +Asset: + description: "An asset" + type: object + required: + - owner + - ontology + - contractName + properties: + owner: + type: string + ontology: + type: string + contractName: + type: string + contractAddress: + type: string + mspId: + type: string + channelName: + type: string TransactRequest: description: "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks." type: object required: - contextID - mode + - fromDLTNetworkID + - toDLTNetworkID + - fromAmount + - toAmount + - beneficiaryPubkey + - originatorPubkey + - sourceAsset + - destinyAsset properties: contextID: type: string @@ -222,15 +250,18 @@ TransactRequest: fromAmount: type: string example: "100" - fromToken: - type: string - example: "TOKEN1" toAmount: type: string example: "95" - toToken: + beneficiaryPubkey: + type: string + originatorPubkey: type: string - example: "TOKEN2" + sourceAsset: + $ref: ./schemas.yml#/Asset + destinyAsset: + $ref: ./schemas.yml#/Asset + TransactResponse: description: "Response schema for a transaction request. Includes the session ID and the current status of the transaction." diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts new file mode 100644 index 0000000000..75ae8423f3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts @@ -0,0 +1,1084 @@ +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import { v4 as uuidv4 } from "uuid"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; + +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + BesuConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { Account } from "web3-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { + SATPGatewayConfig, + SATPGateway, + PluginFactorySATPGateway, + TransactRequest, + Asset, +} from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let fabricServer: Server; + +let besuLedger: BesuTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeBesuOptions: IPluginBungeeHermesOptions; + +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup besu ledger + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + pluginRegistry.add(testing_connector); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeBesuOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + network: SupportedChain.BESU, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); +describe("SATPGateway sending a token from Besu to Fabric", () => { + it("should realize a transfer", async () => { + //setup satp gateway + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + const factory = new PluginFactorySATPGateway(factoryOptions); + + const gatewayIdentity = { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + } as GatewayIdentity; + + const options: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity, + counterPartyGateways: [], //only knows itself + bridgesConfig: [besuConfig, fabricConfig], + }; + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + // default servers + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.gatewayClientPort).toBe(3011); + expect(identity.address).toBe("http://localhost"); + await gateway.startup(); + + const dispatcher = gateway.getBLODispatcher(); + + expect(dispatcher).toBeTruthy(); + const sourceAsset: Asset = { + owner: firstHighNetWorthAccount, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const destinyAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.BESU, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + mode: "transfer", + originatorPubkey: assigneeEthAccount.address, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + destinyAsset, + }; + + const res = await dispatcher?.Transact(req); + log.info(res?.statusResponse); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + log.info("Amount was transfer correctly to the Owner account"); + + await gateway.shutdown(); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts new file mode 100644 index 0000000000..3105d085bf --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts @@ -0,0 +1,1117 @@ +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import { v4 as uuidv4 } from "uuid"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; + +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + BesuConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { Account } from "web3-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { + SATPGatewayConfig, + SATPGateway, + PluginFactorySATPGateway, + TransactRequest, + Asset, +} from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); +let fabricServer: Server; + +let besuLedger: BesuTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeBesuOptions: IPluginBungeeHermesOptions; + +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup besu ledger + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + pluginRegistry.add(testing_connector); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeBesuOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + network: SupportedChain.BESU, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); +describe("2 SATPGateway sending a token from Besu to Fabric", () => { + it("should realize a transfer", async () => { + //setup satp gateway + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + const factory = new PluginFactorySATPGateway(factoryOptions); + + const gatewayIdentity1 = { + id: "mockID-1", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + } as GatewayIdentity; + + const gatewayIdentity2 = { + id: "mockID-2", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address: "http://localhost" as Address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + } as GatewayIdentity; + + const options1: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity1, + counterPartyGateways: [gatewayIdentity2], //only knows itself + bridgesConfig: [besuConfig], + }; + + const options2: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity2, + counterPartyGateways: [gatewayIdentity1], //only knows itself + bridgesConfig: [fabricConfig], + }; + const gateway1 = await factory.create(options1); + expect(gateway1).toBeInstanceOf(SATPGateway); + + const identity1 = gateway1.Identity; + // default servers + expect(identity1.gatewayServerPort).toBe(3010); + expect(identity1.gatewayClientPort).toBe(3011); + expect(identity1.address).toBe("http://localhost"); + await gateway1.startup(); + + const gateway2 = await factory.create(options2); + expect(gateway2).toBeInstanceOf(SATPGateway); + + const identity2 = gateway2.Identity; + // default servers + expect(identity2.gatewayServerPort).toBe(3110); + expect(identity2.gatewayClientPort).toBe(3111); + expect(identity2.address).toBe("http://localhost"); + await gateway2.startup(); + + const dispatcher = gateway1.getBLODispatcher(); + + expect(dispatcher).toBeTruthy(); + const sourceAsset: Asset = { + owner: firstHighNetWorthAccount, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const destinyAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.BESU, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + mode: "transfer", + originatorPubkey: assigneeEthAccount.address, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + destinyAsset, + }; + + const res = await dispatcher?.Transact(req); + log.info(res?.statusResponse); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + log.info("Amount was transfer correctly to the Owner account"); + + await gateway1.shutdown(); + await gateway2.shutdown(); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts index 4782c1d440..40fa1fc8a8 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts @@ -20,6 +20,7 @@ import { Stage3ServerService } from "../../../main/typescript/core/stage-service import { SATPSession } from "../../../main/typescript/core/satp-session"; import { SATP_VERSION } from "../../../main/typescript/core/constants"; import { + Asset, AssignmentAssertionClaim, BurnAssertionClaim, CredentialProfile, @@ -49,10 +50,22 @@ import { } from "../../../main/typescript/generated/proto/cacti/satp/v02/stage_3_pb"; import { getMessageHash } from "../../../main/typescript/core/session-utils"; +import { Stage0ClientService } from "../../../main/typescript/core/stage-services/client/stage0-client-service"; +import { Stage0ServerService } from "../../../main/typescript/core/stage-services/server/stage0-server-service"; +import { + NewSessionRequest, + NewSessionResponse, + PreSATPTransferRequest, + PreSATPTransferResponse, + STATUS, +} from "../../../main/typescript/generated/proto/cacti/satp/v02/stage_0_pb"; +import { TokenType } from "../../../main/typescript/core/stage-services/satp-bridge/types/asset"; const logLevel: LogLevelDesc = "DEBUG"; const serviceClasses = [ + Stage0ClientService, + Stage0ServerService, Stage1ServerService, Stage1ClientService, Stage2ServerService, @@ -73,6 +86,8 @@ let bridgeManager: SATPBridgesManager; let mockSession: SATPSession; +let satpClientService0: Stage0ClientService; +let satpServerService0: Stage0ServerService; let satpClientService1: Stage1ClientService; let satpClientService2: Stage2ClientService; let satpClientService3: Stage3ClientService; @@ -80,6 +95,10 @@ let satpServerService1: Stage1ServerService; let satpServerService2: Stage2ServerService; let satpServerService3: Stage3ServerService; +let newSessionRequestMessage: NewSessionRequest; +let newSessionResponseMessage: NewSessionResponse; +let preSATPTransferRequestMessage: PreSATPTransferRequest; +let preSATPTransferResponseMessage: PreSATPTransferResponse; let transferProposalRequestMessage: TransferProposalRequestMessage; let transferProposalResponseMessage: TransferProposalReceiptMessage; let transferCommenceRequestMessage: TransferCommenceRequestMessage; @@ -92,6 +111,8 @@ let commitFinalAssertionRequestMessage: CommitFinalAssertionRequestMessage; let commitFinalAcknowledgementReceiptResponseMessage: CommitFinalAcknowledgementReceiptResponseMessage; let transferCompleteRequestMessage: TransferCompleteRequestMessage; +const sessionIDs: string[] = []; + beforeAll(async () => { bridgeManager = new SATPBridgesManager({ supportedDLTs: supportedDLTs, @@ -101,10 +122,12 @@ beforeAll(async () => { mockSession = new SATPSession({ contextID: "MOCK_CONTEXT_ID", - server: true, + server: false, client: true, }); + sessionIDs.push(mockSession.getSessionId()); + const serviceOptions = initializeServiceOptions( serviceClasses, logLevel, @@ -113,6 +136,12 @@ beforeAll(async () => { for (const service of initializeServices(serviceClasses, serviceOptions)) { switch (service.constructor) { + case Stage0ClientService: + satpClientService0 = service as Stage0ClientService; + break; + case Stage0ServerService: + satpServerService0 = service as Stage0ServerService; + break; case Stage1ServerService: satpServerService1 = service as Stage1ServerService; break; @@ -137,12 +166,7 @@ beforeAll(async () => { } }); describe("SATP Services Testing", () => { - it("Service1Client transferProposalRequest", async () => { - expect(satpClientService1).toBeDefined(); - expect(satpClientService1.getServiceIdentifier()).toBe( - `${SATPServiceType.Client}#1`, - ); - + it("Service0Client newSessionRequest", async () => { const sessionData = mockSession.getClientSessionData(); if (!sessionData) { throw new Error("Session data not found"); @@ -162,8 +186,8 @@ describe("SATP Services Testing", () => { sessionData.verifiedBeneficiaryEntityId = "MOCK_VERIFIED_BENEFICIARY_ENTITY_ID"; sessionData.receiverGatewayOwnerId = "MOCK_RECEIVER_GATEWAY_OWNER_ID"; - sessionData.recipientGatewayNetworkId = "MOCK_RECIPIENT_GATEWAY_NETWORK_ID"; - sessionData.senderGatewayOwnerId = SupportedChain.FABRIC; + sessionData.recipientGatewayNetworkId = SupportedChain.FABRIC; + sessionData.senderGatewayOwnerId = "MOCK_SENDER_GATEWAY_OWNER_ID"; sessionData.senderGatewayNetworkId = SupportedChain.BESU; sessionData.signatureAlgorithm = SignatureAlgorithm.RSA; sessionData.lockType = LockType.FAUCET; @@ -173,6 +197,209 @@ describe("SATP Services Testing", () => { sessionData.accessControlProfile = "MOCK_ACCESS_CONTROL_PROFILE"; sessionData.resourceUrl = "MOCK_RESOURCE_URL"; sessionData.lockAssertionExpiration = BigInt(99999); + sessionData.receiverContractOntology = "MOCK_RECEIVER_CONTRACT_ONTOLOGY"; //TODO when implemented verification of Contract Ontology change this + sessionData.senderContractOntology = "MOCK_SENDER_CONTRACT_ONTOLOGY"; + sessionData.sourceLedgerAssetId = "MOCK_SOURCE_LEDGER_ASSET_ID"; + sessionData.senderAsset = new Asset(); + sessionData.senderAsset.tokenId = "MOCK_TOKEN_ID"; + sessionData.senderAsset.tokenType = TokenType.ERC20; + sessionData.senderAsset.amount = BigInt(0); + sessionData.senderAsset.owner = "MOCK_SENDER_ASSET_OWNER"; + sessionData.senderAsset.ontology = "MOCK_SENDER_ASSET_ONTOLOGY"; + sessionData.senderAsset.contractName = "MOCK_SENDER_ASSET_CONTRACT_NAME"; + sessionData.senderAsset.contractAddress = + "MOCK_SENDER_ASSET_CONTRACT_ADDRESS"; + sessionData.receiverAsset = new Asset(); + + sessionData.receiverAsset.tokenType = TokenType.ERC20; + sessionData.receiverAsset.amount = BigInt(0); + sessionData.receiverAsset.owner = "MOCK_RECEIVER_ASSET_OWNER"; + sessionData.receiverAsset.ontology = "MOCK_RECEIVER_ASSET_ONTOLOGY"; + sessionData.receiverAsset.contractName = + "MOCK_RECEIVER_ASSET_CONTRACT_NAME"; + sessionData.receiverAsset.mspId = "MOCK_RECEIVER_ASSET_MSP_ID"; + sessionData.receiverAsset.channelName = "MOCK_CHANNEL_ID"; + expect(satpClientService1).toBeDefined(); + expect(satpClientService1.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#1`, + ); + + newSessionRequestMessage = await satpClientService0.newSessionRequest( + mockSession, + SupportedChain.BESU, + ); + + expect(newSessionRequestMessage).toBeDefined(); + expect(newSessionRequestMessage.contextId).toBe( + mockSession.getClientSessionData()?.transferContextId, + ); + expect(newSessionRequestMessage.senderGatewayNetworkId).toBe( + mockSession.getClientSessionData().senderGatewayNetworkId, + ); + expect(newSessionRequestMessage.recipientGatewayNetworkId).toBe( + mockSession.getClientSessionData().recipientGatewayNetworkId, + ); + expect(newSessionRequestMessage.clientSignature).not.toBe(""); + }); + it("Service0Server checkNewSessionRequest", async () => { + expect(satpServerService0).toBeDefined(); + expect(satpServerService0.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#0`, + ); + + await satpServerService0.checkNewSessionRequest( + newSessionRequestMessage, + mockSession, + Buffer.from(keyPairs.publicKey).toString("hex"), + ); + + expect(mockSession.getServerSessionData()).toBeDefined(); + expect(mockSession.getServerSessionData()?.transferContextId).toBe( + newSessionRequestMessage.contextId, + ); + expect(mockSession.getServerSessionData()?.senderGatewayNetworkId).toBe( + newSessionRequestMessage.senderGatewayNetworkId, + ); + expect(mockSession.getServerSessionData()?.recipientGatewayNetworkId).toBe( + newSessionRequestMessage.recipientGatewayNetworkId, + ); + }); + it("Service0Server newSessionResponse", async () => { + newSessionResponseMessage = await satpServerService0.newSessionResponse( + newSessionRequestMessage, + mockSession, + ); + + expect(newSessionResponseMessage).toBeDefined(); + expect(newSessionResponseMessage.contextId).toBe( + mockSession.getClientSessionData()?.transferContextId, + ); + expect(newSessionResponseMessage.senderGatewayNetworkId).toBe( + mockSession.getClientSessionData().senderGatewayNetworkId, + ); + expect(newSessionResponseMessage.recipientGatewayNetworkId).toBe( + mockSession.getClientSessionData().recipientGatewayNetworkId, + ); + expect(newSessionResponseMessage.status).toBe(STATUS.STATUS_ACCEPTED); + expect(newSessionResponseMessage.hashPreviousMessage).not.toBe(""); + expect(newSessionResponseMessage.serverSignature).not.toBe(""); + }); + it("Service0Client checkNewSessionResponse", async () => { + expect(satpClientService0).toBeDefined(); + expect(satpClientService0.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#0`, + ); + + await satpClientService0.checkNewSessionResponse( + newSessionResponseMessage, + mockSession, + sessionIDs, + ); + }); + it("Service0Client preSATPTransferRequest", async () => { + expect(satpClientService0).toBeDefined(); + expect(satpClientService0.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#0`, + ); + + const sessionData = mockSession.getClientSessionData(); + if (!sessionData) { + throw new Error("Session data not found"); + } + + sessionData.senderWrapAssertionClaim = new AssignmentAssertionClaim(); + + preSATPTransferRequestMessage = + await satpClientService0.preSATPTransferRequest(mockSession); + + expect(preSATPTransferRequestMessage).toBeDefined(); + expect(preSATPTransferRequestMessage.sessionId).toBe(sessionData.id); + expect(preSATPTransferRequestMessage.contextId).toBe( + sessionData.transferContextId, + ); + expect(preSATPTransferRequestMessage.senderGatewayNetworkId).toBe( + sessionData.senderGatewayNetworkId, + ); + expect(preSATPTransferRequestMessage.recipientGatewayNetworkId).toBe( + sessionData.recipientGatewayNetworkId, + ); + expect(preSATPTransferRequestMessage.senderAsset).toBeDefined(); + expect(preSATPTransferRequestMessage.receiverAsset).toBeDefined(); + expect(preSATPTransferRequestMessage.wrapAssertionClaim).toBeDefined(); + expect(preSATPTransferRequestMessage.hashPreviousMessage).toBeDefined(); + expect(preSATPTransferRequestMessage.clientSignature).toBeDefined(); + }); + it("Service0Server checkPreSATPTransferRequest", async () => { + expect(satpServerService0).toBeDefined(); + expect(satpServerService0.getServiceIdentifier()).toBe( + `${SATPServiceType.Server}#0`, + ); + + await satpServerService0.checkPreSATPTransferRequest( + preSATPTransferRequestMessage, + mockSession, + ); + + expect(mockSession.getServerSessionData()).toBeDefined(); + expect(mockSession.getServerSessionData()?.senderAsset).toBe( + preSATPTransferRequestMessage.senderAsset, + ); + expect(mockSession.getServerSessionData()?.receiverAsset).toBe( + preSATPTransferRequestMessage.receiverAsset, + ); + }); + it("Service0Server preSATPTransferResponse", async () => { + const sessionData = mockSession.getServerSessionData(); + if (!sessionData) { + throw new Error("Session data not found"); + } + + sessionData.receiverWrapAssertionClaim = new AssignmentAssertionClaim(); + + preSATPTransferResponseMessage = + await satpServerService0.preSATPTransferResponse( + preSATPTransferRequestMessage, + mockSession, + ); + + expect(preSATPTransferResponseMessage).toBeDefined(); + expect(preSATPTransferResponseMessage.sessionId).toBe( + preSATPTransferRequestMessage.sessionId, + ); + expect(preSATPTransferResponseMessage.contextId).toBe( + newSessionResponseMessage.contextId, + ); + expect(preSATPTransferResponseMessage.wrapAssertionClaim).toBeDefined(); + expect(preSATPTransferResponseMessage.hashPreviousMessage).toBeDefined(); + expect(preSATPTransferResponseMessage.serverSignature).toBeDefined(); + expect(preSATPTransferResponseMessage.recipientTokenId).toBeDefined(); + }); + it("Service1Client checkPreSATPTransferResponse", async () => { + expect(satpClientService1).toBeDefined(); + expect(satpClientService1.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#1`, + ); + + await satpClientService1.checkPreSATPTransferResponse( + preSATPTransferResponseMessage, + mockSession, + ); + + expect(mockSession.getClientSessionData()).toBeDefined(); + expect(mockSession.getClientSessionData()?.receiverAsset?.tokenId).toBe( + preSATPTransferResponseMessage.recipientTokenId, + ); + }); + it("Service1Client transferProposalRequest", async () => { + expect(satpClientService1).toBeDefined(); + expect(satpClientService1.getServiceIdentifier()).toBe( + `${SATPServiceType.Client}#1`, + ); + + const sessionData = mockSession.getClientSessionData(); + if (!sessionData) { + throw new Error("Session data not found"); + } transferProposalRequestMessage = (await satpClientService1.transferProposalRequest( @@ -219,10 +446,14 @@ describe("SATP Services Testing", () => { ).toBe("MOCK_RECEIVER_GATEWAY_OWNER_ID"); expect( transferProposalRequestMessage.transferInitClaims?.senderGatewayOwnerId, - ).toBe(SupportedChain.FABRIC); + ).toBe("MOCK_SENDER_GATEWAY_OWNER_ID"); expect( transferProposalRequestMessage.transferInitClaims?.senderGatewayNetworkId, ).toBe(SupportedChain.BESU); + expect( + transferProposalRequestMessage.transferInitClaims + ?.recipientGatewayNetworkId, + ).toBe(SupportedChain.FABRIC); expect( transferProposalRequestMessage.networkCapabilities?.signatureAlgorithm, ).toBe(SignatureAlgorithm.RSA); @@ -364,15 +595,13 @@ describe("SATP Services Testing", () => { it("Service2Client lockAssertionRequest", async () => { //mock claims - (mockSession.getClientSessionData() as SessionData).lockAssertionClaim = + mockSession.getClientSessionData().lockAssertionClaim = new LockAssertionClaim(); - ( - mockSession.getClientSessionData() as SessionData - ).lockAssertionClaimFormat = new LockAssertionClaim(); + mockSession.getClientSessionData().lockAssertionClaimFormat = + new LockAssertionClaim(); - (mockSession.getClientSessionData() as SessionData).lockExpirationTime = - BigInt(1000); + mockSession.getClientSessionData().lockExpirationTime = BigInt(1000); lockAssertionRequestMessage = (await satpClientService2.lockAssertionRequest( diff --git a/yarn.lock b/yarn.lock index 460cf3ded2..e08e6e3a9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5764,13 +5764,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-darwin-arm64@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf-darwin-arm64@npm:1.29.0" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@bufbuild/buf-darwin-arm64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-darwin-arm64@npm:1.30.0" @@ -5778,13 +5771,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-darwin-x64@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf-darwin-x64@npm:1.29.0" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@bufbuild/buf-darwin-x64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-darwin-x64@npm:1.30.0" @@ -5792,13 +5778,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-linux-aarch64@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf-linux-aarch64@npm:1.29.0" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - "@bufbuild/buf-linux-aarch64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-linux-aarch64@npm:1.30.0" @@ -5806,13 +5785,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-linux-x64@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf-linux-x64@npm:1.29.0" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - "@bufbuild/buf-linux-x64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-linux-x64@npm:1.30.0" @@ -5820,13 +5792,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-win32-arm64@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf-win32-arm64@npm:1.29.0" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@bufbuild/buf-win32-arm64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-win32-arm64@npm:1.30.0" @@ -5834,13 +5799,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf-win32-x64@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf-win32-x64@npm:1.29.0" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@bufbuild/buf-win32-x64@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf-win32-x64@npm:1.30.0" @@ -5848,37 +5806,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/buf@npm:1.29.0": - version: 1.29.0 - resolution: "@bufbuild/buf@npm:1.29.0" - dependencies: - "@bufbuild/buf-darwin-arm64": "npm:1.29.0" - "@bufbuild/buf-darwin-x64": "npm:1.29.0" - "@bufbuild/buf-linux-aarch64": "npm:1.29.0" - "@bufbuild/buf-linux-x64": "npm:1.29.0" - "@bufbuild/buf-win32-arm64": "npm:1.29.0" - "@bufbuild/buf-win32-x64": "npm:1.29.0" - dependenciesMeta: - "@bufbuild/buf-darwin-arm64": - optional: true - "@bufbuild/buf-darwin-x64": - optional: true - "@bufbuild/buf-linux-aarch64": - optional: true - "@bufbuild/buf-linux-x64": - optional: true - "@bufbuild/buf-win32-arm64": - optional: true - "@bufbuild/buf-win32-x64": - optional: true - bin: - buf: bin/buf - protoc-gen-buf-breaking: bin/protoc-gen-buf-breaking - protoc-gen-buf-lint: bin/protoc-gen-buf-lint - checksum: 10/f966e764b9ef92d514361c6999c1633e57c79143317cf9d6dd3a12750e60e244c4e5d45bcf01fa3993a07d69a14011c95477ac365e889abeb742df51d2696294 - languageName: node - linkType: hard - "@bufbuild/buf@npm:1.30.0": version: 1.30.0 resolution: "@bufbuild/buf@npm:1.30.0" @@ -5917,13 +5844,6 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protobuf@npm:1.7.2": - version: 1.7.2 - resolution: "@bufbuild/protobuf@npm:1.7.2" - checksum: 10/f23ccc77066100157043cf36bd2506acdcb235f0a902f7662fbbb992e78df4202780aeb55bd2e3fd1945bd9e52a4fca759351f333f2ff779e32996e13eb56d34 - languageName: node - linkType: hard - "@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": version: 1.8.0 resolution: "@bufbuild/protobuf@npm:1.8.0" @@ -8993,6 +8913,16 @@ __metadata: languageName: node linkType: hard +"@grpc/grpc-js@npm:1.11.1": + version: 1.11.1 + resolution: "@grpc/grpc-js@npm:1.11.1" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/28fb8d0bbccc0a8f9f73899e6f982e5e762e8f0c009eb9234d4067021f96896479be76463f8a02b80d13ecfd52817ae6d0a189f6cfe22fd32df0505bf577a720 + languageName: node + linkType: hard + "@grpc/grpc-js@npm:1.11.3": version: 1.11.3 resolution: "@grpc/grpc-js@npm:1.11.3" @@ -10891,6 +10821,7 @@ __metadata: "@types/crypto-js": "npm:4.0.1" "@types/express": "npm:5.0.0" "@types/fs-extra": "npm:11.0.4" + "@types/google-protobuf": "npm:3.15.5" "@types/node": "npm:18.18.2" "@types/swagger-ui-express": "npm:4.1.6" "@types/tape": "npm:4.13.4" @@ -10908,11 +10839,17 @@ __metadata: express: "npm:4.21.0" fabric-network: "npm:2.2.20" fs-extra: "npm:11.2.0" + google-protobuf: "npm:3.21.2" + grpc-tools: "npm:1.12.4" + grpc_tools_node_protoc_ts: "npm:5.3.3" hardhat: "npm:2.22.5" knex: "npm:2.4.0" kubo-rpc-client: "npm:3.0.1" + make-dir-cli: "npm:3.1.0" npm-run-all: "npm:4.1.5" openzeppelin-solidity: "npm:3.4.2" + protobufjs: "npm:7.2.5" + safe-stable-stringify: "npm:2.5.0" secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" @@ -15057,7 +14994,7 @@ __metadata: languageName: node linkType: hard -"@quobix/vacuum@npm:^0.9.10": +"@quobix/vacuum@npm:0.9.16": version: 0.9.16 resolution: "@quobix/vacuum@npm:0.9.16" dependencies: @@ -31487,6 +31424,13 @@ __metadata: languageName: node linkType: hard +"google-protobuf@npm:3.21.2": + version: 3.21.2 + resolution: "google-protobuf@npm:3.21.2" + checksum: 10/b376c2e47fb0419b41b901e4da8f3827fe9594ffb7887708b9c241f36005d0b9f2edc7b3f05795f6793924a241e767f67831732eae0f23bdbb337b56a6ab4e26 + languageName: node + linkType: hard + "google-protobuf@npm:3.21.4": version: 3.21.4 resolution: "google-protobuf@npm:3.21.4" @@ -46699,6 +46643,13 @@ __metadata: languageName: node linkType: hard +"safe-stable-stringify@npm:2.5.0": + version: 2.5.0 + resolution: "safe-stable-stringify@npm:2.5.0" + checksum: 10/2697fa186c17c38c3ca5309637b4ac6de2f1c3d282da27cd5e1e3c88eca0fb1f9aea568a6aabdf284111592c8782b94ee07176f17126031be72ab1313ed46c5c + languageName: node + linkType: hard + "safe-stable-stringify@npm:^2.3.1": version: 2.3.1 resolution: "safe-stable-stringify@npm:2.3.1" From 365332f1f69207753f378936b3e7d1e72aaaf95e Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Thu, 5 Sep 2024 16:59:07 +0100 Subject: [PATCH 34/49] feat(satp-hermes): openApi transact implementation Signed-off-by: Carlos Amaro --- .../generated/gateway-client/api/openapi.yaml | 23 +- .../gateway-client/docs/TransactRequest.md | 23 +- .../gateway-client/docs/TransactionApi.md | 2 +- .../gateway-client/model_transact_request.go | 29 +- .../src/main/json/openapi-blo-bundled.json | 32 +- .../src/main/typescript/blo/dispatcher.ts | 23 + .../transaction/transact-handler-service.ts | 4 +- .../src/main/typescript/core/constants.ts | 1 + .../src/main/typescript/core/types.ts | 3 +- .../gateway-client/typescript-axios/api.ts | 14 - .../plugin-satp-hermes-gateway-cli.ts | 2 +- .../typescript/plugin-satp-hermes-gateway.ts | 73 +- .../web-services/transact-endpoint.ts | 88 ++ .../src/main/yml/bol/openapi-blo-bundled.yml | 24 +- .../src/main/yml/bol/openapi-blo.yml | 6 +- .../src/main/yml/bol/schemas.yml | 9 +- .../gateway-blo-get-status.test.ts | 3 +- .../integration/gateway-init-startup.test.ts | 18 +- ...to-end-transfer-2-gateways-openapi.test.ts | 1131 +++++++++++++++++ 19 files changed, 1336 insertions(+), 172 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/transact-endpoint.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml index dc98f2438b..b8145bcd70 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml @@ -66,6 +66,10 @@ paths: summary: Submit a transaction intent tags: - transaction + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel: post: description: Attempts to cancel a previously submitted transaction intent using @@ -617,7 +621,6 @@ components: \ such as the transaction context, mode (data or transfer), payload, and information\ \ about the source and destination DLT networks." example: - mode: transfer beneficiaryPubkey: beneficiaryPubkey destinyAsset: owner: owner @@ -643,13 +646,7 @@ components: properties: contextID: example: 123e4567-e89b-12d3-a456-426614174000 - format: uuid - type: string - mode: - enum: - - data - - transfer - example: transfer + format: string type: string payload: example: "{\"data\":\"example payload\"}" @@ -680,7 +677,6 @@ components: - destinyAsset - fromAmount - fromDLTNetworkID - - mode - originatorPubkey - sourceAsset - toAmount @@ -1259,13 +1255,7 @@ components: properties: contextID: example: 123e4567-e89b-12d3-a456-426614174000 - format: uuid - type: string - mode: - enum: - - data - - transfer - example: transfer + format: string type: string payload: example: "{\"data\":\"example payload\"}" @@ -1296,7 +1286,6 @@ components: - destinyAsset - fromAmount - fromDLTNetworkID - - mode - originatorPubkey - sourceAsset - toAmount diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md index 983b991ac6..37525e16dd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ContextID** | **string** | | -**Mode** | **string** | | **Payload** | Pointer to **string** | | [optional] **FromDLTNetworkID** | **string** | | **ToDLTNetworkID** | **string** | | @@ -20,7 +19,7 @@ Name | Type | Description | Notes ### NewTransactRequest -`func NewTransactRequest(contextID string, mode string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset, ) *TransactRequest` +`func NewTransactRequest(contextID string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset, ) *TransactRequest` NewTransactRequest instantiates a new TransactRequest object This constructor will assign default values to properties that have it defined, @@ -55,26 +54,6 @@ and a boolean to check if the value has been set. SetContextID sets ContextID field to given value. -### GetMode - -`func (o *TransactRequest) GetMode() string` - -GetMode returns the Mode field if non-nil, zero value otherwise. - -### GetModeOk - -`func (o *TransactRequest) GetModeOk() (*string, bool)` - -GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMode - -`func (o *TransactRequest) SetMode(v string)` - -SetMode sets Mode field to given value. - - ### GetPayload `func (o *TransactRequest) GetPayload() string` diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md index 1149778379..03466cd9c2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md @@ -237,7 +237,7 @@ import ( ) func main() { - transactRequest := *openapiclient.NewTransactRequest("123e4567-e89b-12d3-a456-426614174000", "transfer", "network1", "network2", "100", "95", "BeneficiaryPubkey_example", "OriginatorPubkey_example", *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example"), *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example")) // TransactRequest | + transactRequest := *openapiclient.NewTransactRequest("123e4567-e89b-12d3-a456-426614174000", "network1", "network2", "100", "95", "BeneficiaryPubkey_example", "OriginatorPubkey_example", *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example"), *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example")) // TransactRequest | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go index 2669a7cb74..d596bae7e0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go @@ -20,7 +20,6 @@ var _ MappedNullable = &TransactRequest{} // TransactRequest Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. type TransactRequest struct { ContextID string `json:"contextID"` - Mode string `json:"mode"` Payload *string `json:"payload,omitempty"` FromDLTNetworkID string `json:"fromDLTNetworkID"` ToDLTNetworkID string `json:"toDLTNetworkID"` @@ -36,10 +35,9 @@ type TransactRequest struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTransactRequest(contextID string, mode string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset) *TransactRequest { +func NewTransactRequest(contextID string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset) *TransactRequest { this := TransactRequest{} this.ContextID = contextID - this.Mode = mode this.FromDLTNetworkID = fromDLTNetworkID this.ToDLTNetworkID = toDLTNetworkID this.FromAmount = fromAmount @@ -83,30 +81,6 @@ func (o *TransactRequest) SetContextID(v string) { o.ContextID = v } -// GetMode returns the Mode field value -func (o *TransactRequest) GetMode() string { - if o == nil { - var ret string - return ret - } - - return o.Mode -} - -// GetModeOk returns a tuple with the Mode field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetModeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mode, true -} - -// SetMode sets field value -func (o *TransactRequest) SetMode(v string) { - o.Mode = v -} - // GetPayload returns the Payload field value if set, zero value otherwise. func (o *TransactRequest) GetPayload() string { if o == nil || IsNil(o.Payload) { @@ -342,7 +316,6 @@ func (o TransactRequest) MarshalJSON() ([]byte, error) { func (o TransactRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["contextID"] = o.ContextID - toSerialize["mode"] = o.Mode if !IsNil(o.Payload) { toSerialize["payload"] = o.Payload } diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json index 2b42e56f90..1d58cfa2e7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json @@ -47,10 +47,17 @@ "tags": [ "transaction" ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact" + } + }, "summary": "Submit a transaction intent", "description": "Allows users to queue intents for transactions based on specified parameters.", "operationId": "Transact", "requestBody": { + "required": true, "content": { "application/json": { "schema": { @@ -58,7 +65,6 @@ "type": "object", "required": [ "contextID", - "mode", "fromDLTNetworkID", "toDLTNetworkID", "fromAmount", @@ -71,17 +77,9 @@ "properties": { "contextID": { "type": "string", - "format": "uuid", + "format": "string", "example": "123e4567-e89b-12d3-a456-426614174000" }, - "mode": { - "type": "string", - "enum": [ - "data", - "transfer" - ], - "example": "transfer" - }, "payload": { "type": "string", "example": "{\"data\":\"example payload\"}" @@ -169,8 +167,7 @@ } } } - }, - "required": true + } }, "responses": { "200": { @@ -2757,7 +2754,6 @@ "type": "object", "required": [ "contextID", - "mode", "fromDLTNetworkID", "toDLTNetworkID", "fromAmount", @@ -2770,17 +2766,9 @@ "properties": { "contextID": { "type": "string", - "format": "uuid", + "format": "string", "example": "123e4567-e89b-12d3-a456-426614174000" }, - "mode": { - "type": "string", - "enum": [ - "data", - "transfer" - ], - "example": "transfer" - }, "payload": { "type": "string", "example": "{\"data\":\"example payload\"}" diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 8b4441f2df..96a04873ba 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -24,6 +24,7 @@ import { ISATPManagerOptions, SATPManager } from "../gol/satp-manager"; import { GatewayOrchestrator } from "../gol/gateway-orchestrator"; import { SATPBridgesManager } from "../gol/satp-bridges-manager"; import { ExecuteTransact } from "./transaction/transact-handler-service"; +import { TransactEndpointV1 } from "../web-services/transact-endpoint"; export interface BLODispatcherOptions { logger: Logger; @@ -39,6 +40,7 @@ export class BLODispatcher { public static readonly CLASS_NAME = "BLODispatcher"; private readonly logger: Logger; private endpoints: IWebServiceEndpoint[] | undefined; + private OAPIEndpoints: IWebServiceEndpoint[] | undefined; private readonly instanceId: string; private manager: SATPManager; private orchestrator: GatewayOrchestrator; @@ -95,6 +97,26 @@ export class BLODispatcher { return theEndpoints; } + public async getOrCreateOAPIWebServices(): Promise { + const fnTag = `${BLODispatcher.CLASS_NAME}#getOrCreateOAPIWebServices()`; + this.logger.info( + `${fnTag}, Registering webservices on instanceId=${this.instanceId}`, + ); + + if (Array.isArray(this.OAPIEndpoints)) { + return this.OAPIEndpoints; + } + + const transactEndpointV1 = new TransactEndpointV1({ + dispatcher: this, + logLevel: this.options.logLevel, + }); + + const theEndpoints = [transactEndpointV1]; + this.OAPIEndpoints = theEndpoints; + return theEndpoints; + } + private getTargetGatewayClient(id: string) { const channels = Array.from(this.orchestrator.getChannels()); channels.filter((ch) => { @@ -118,6 +140,7 @@ export class BLODispatcher { public async Transact(req: TransactRequest): Promise { //TODO pre-verify verify input + this.logger.info(`Transact request: ${req}`); const res = await ExecuteTransact( this.logger, req, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts index 5b6e7b74d4..835c34f2b8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts @@ -21,13 +21,13 @@ export async function ExecuteTransact( logger: Logger, req: TransactRequest, manager: SATPManager, - gol: GatewayOrchestrator, + orchestrator: GatewayOrchestrator, ): Promise { // eslint-disable-next-line @typescript-eslint/no-unused-vars const fn = "BLO#transact-handler-service#ExecuteTransact"; //TODO check input for valid strings... - const ourGateway: GatewayIdentity = gol.ourGateway; + const ourGateway: GatewayIdentity = orchestrator.ourGateway; const senderGatewayOwnerId: string = ourGateway.id; //This data is set in satpManager GOL diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts index bf18c70f4c..176b8a960d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -1,4 +1,5 @@ export const DEFAULT_PORT_GATEWAY_SERVER = 3010; export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; +export const DEFAULT_PORT_GATEWAY_API = 4010; export const SATP_VERSION = "v02"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index d17ce0d53b..7076a9b3de 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -64,7 +64,8 @@ export type GatewayIdentity = { proofID?: string; gatewayServerPort?: number; gatewayClientPort?: number; - gatewayGrpcPort?: number; + gatewayOpenAPIPort?: number; + gatewayUIPort?: number; address?: Address; }; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts index 91f69c4e4a..928cbd9aaa 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts @@ -1882,12 +1882,6 @@ export interface TransactRequest { * @memberof TransactRequest */ 'contextID': string; - /** - * - * @type {string} - * @memberof TransactRequest - */ - 'mode': TransactRequestModeEnum; /** * * @type {string} @@ -1943,14 +1937,6 @@ export interface TransactRequest { */ 'destinyAsset': TransactRequestSourceAsset; } - -export const TransactRequestModeEnum = { - Data: 'data', - Transfer: 'transfer' -} as const; - -export type TransactRequestModeEnum = typeof TransactRequestModeEnum[keyof typeof TransactRequestModeEnum]; - /** * An asset * @export diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts index 7080204cee..1b830bb5ed 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts @@ -39,7 +39,7 @@ export async function launchGateway(env?: NodeJS.ProcessEnv): Promise { proofID: env?.SATP_PROOF_ID, gatewayServerPort: parseInt(env?.SATP_GATEWAY_SERVER_PORT || "0", 10), gatewayClientPort: parseInt(env?.SATP_GATEWAY_CLIENT_PORT || "0", 10), - gatewayGrpcPort: parseInt(env?.SATP_GATEWAY_GRPC_PORT || "0", 10), + gatewayOpenAPIPort: parseInt(env?.DEFAULT_PORT_GATEWAY_API || "0", 10), address: env?.SATP_GATEWAY_ADDRESS as | `http://${string}` | `https://${string}` diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index f3a608d1f7..2d590deece 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -33,6 +33,7 @@ export { SATPGatewayConfig }; import express, { Express } from "express"; import http from "http"; import { + DEFAULT_PORT_GATEWAY_API, DEFAULT_PORT_GATEWAY_CLIENT, DEFAULT_PORT_GATEWAY_SERVER, } from "./core/constants"; @@ -53,6 +54,7 @@ import { ISATPBridgesOptions, SATPBridgesManager, } from "./gol/satp-bridges-manager"; +import bodyParser from "body-parser"; export class SATPGateway implements IPluginWebService, ICactusPlugin { // todo more checks; example port from config is between 3000 and 9000 @@ -190,6 +192,14 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { return this.BLODispatcher; } + getBLOServer(): http.Server | undefined { + return this.BLOServer; + } + + getBLOApplication(): Express | undefined { + return this.BLOApplication; + } + public async onPluginInit(): Promise { const fnTag = `${this.className}#onPluginInit()`; this.logger.trace(`Entering ${fnTag}`); @@ -319,6 +329,10 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { pluginOptions.gid.gatewayClientPort = DEFAULT_PORT_GATEWAY_CLIENT; } + if (!pluginOptions.gid.gatewayOpenAPIPort) { + pluginOptions.gid.gatewayOpenAPIPort = DEFAULT_PORT_GATEWAY_API; + } + if (!pluginOptions.logLevel) { pluginOptions.logLevel = "DEBUG"; } @@ -348,7 +362,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { const fnTag = `${this.className}#startup()`; this.logger.trace(`Entering ${fnTag}`); - await Promise.all([this.startupBLOServer(), this.setupOpenAPIServer()]); + await Promise.all([this.startupBLOServer()]); await Promise.all([this.startupGOLServer()]); } @@ -359,7 +373,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { this.logger.trace(`Entering ${fnTag}`); this.logger.info("Starting BOL server"); const port = - this.options.gid?.gatewayClientPort ?? DEFAULT_PORT_GATEWAY_CLIENT; + this.options.gid?.gatewayOpenAPIPort ?? DEFAULT_PORT_GATEWAY_API; return new Promise(async (resolve, reject) => { if (!this.BLOApplication || !this.BLOServer) { @@ -367,6 +381,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { throw new Error("BLODispatcher is not defined"); } this.BLOApplication = express(); + this.BLOApplication.use(bodyParser.json({ limit: "50mb" })); try { const webServices = await this.BLODispatcher.getOrCreateWebServices(); for (const service of webServices) { @@ -377,19 +392,41 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { throw new Error(`Failed to register web services: ${error}`); } + if (this.OAPIServerEnabled) { + this.logger.debug("OpenAPI server is enabled"); + + try { + const webServices = + await this.BLODispatcher.getOrCreateOAPIWebServices(); + for (const service of webServices) { + this.logger.debug( + `Registering OpenAPI web service: ${service.getPath()}`, + ); + await service.registerExpress(this.BLOApplication); + } + this.BLOApplication.use( + "/api-docs", + swaggerUi.serve as express.RequestHandler[], + swaggerUi.setup(this.OAS) as express.RequestHandler, + ); + } catch (error) { + throw new Error(`Error to register OpenAPI web services: ${error}`); + } + } + this.BLOServer = http.createServer(this.BLOApplication); this.BLOServer.listen(port, () => { - this.logger.info(`BOL server started and listening on port ${port}`); + this.logger.info(`BLO server started and listening on port ${port}`); resolve(); }); this.BLOServer.on("error", (error) => { - this.logger.error(`BOL server failed to start: ${error}`); + this.logger.error(`BLO server failed to start: ${error}`); reject(error); }); } else { - this.logger.warn("BOL Server already running."); + this.logger.warn("BLO Server already running."); resolve(); } }); @@ -404,6 +441,8 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { const port = this.options.gid?.gatewayServerPort ?? DEFAULT_PORT_GATEWAY_SERVER; + //TODO create a server for the client part + return new Promise(async (resolve, reject) => { if (!this.GOLServer) { this.GOLApplication = express(); @@ -429,30 +468,6 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { }); } - public setupOpenAPIServer(): void { - if (!this.OAPIServerEnabled) { - this.logger.debug("OpenAPI server is disabled"); - return; - } - - if (!this.BLOApplication) { - this.logger.debug( - "BLOApplication is not defined. Not initializing OpenAPI server", - ); - return; - } - - if (!this.OAS) { - throw new Error("OpenAPI spec is not set"); - } - // Type assertion here - this.BLOApplication.use( - "/api-docs", - swaggerUi.serve as express.RequestHandler[], - swaggerUi.setup(this.OAS) as express.RequestHandler, - ); - } - /** * Gateway Connection Methods * -------------------------- diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/transact-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/transact-endpoint.ts new file mode 100644 index 0000000000..ac30bb56b8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/transact-endpoint.ts @@ -0,0 +1,88 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../core/types"; +import OAS from "../../json/openapi-blo-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { TransactRequest } from "../generated/gateway-client/typescript-axios/api"; + +export class TransactEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "TransactEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return TransactEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.dispatcher, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact"] { + return OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact"]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact"] + .post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + const reqBody: TransactRequest = req.body; + this.log.debug("reqBody: ", reqBody); + try { + const result = await this.options.dispatcher.Transact(reqBody); + res.json(result); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml index 6b67993f6e..374e1b4997 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml @@ -42,10 +42,15 @@ paths: post: tags: - transaction + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact summary: Submit a transaction intent description: Allows users to queue intents for transactions based on specified parameters. operationId: Transact requestBody: + required: true content: application/json: schema: @@ -53,7 +58,6 @@ paths: type: object required: - contextID - - mode - fromDLTNetworkID - toDLTNetworkID - fromAmount @@ -65,14 +69,8 @@ paths: properties: contextID: type: string - format: uuid + format: string example: 123e4567-e89b-12d3-a456-426614174000 - mode: - type: string - enum: - - data - - transfer - example: transfer payload: type: string example: '{"data":"example payload"}' @@ -132,7 +130,6 @@ paths: type: string channelName: type: string - required: true responses: '200': description: Transaction successfully queued @@ -2108,7 +2105,6 @@ components: type: object required: - contextID - - mode - fromDLTNetworkID - toDLTNetworkID - fromAmount @@ -2120,14 +2116,8 @@ components: properties: contextID: type: string - format: uuid + format: string example: 123e4567-e89b-12d3-a456-426614174000 - mode: - type: string - enum: - - data - - transfer - example: transfer payload: type: string example: '{"data":"example payload"}' diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml index 83fbab2cb7..f9c33f25b5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml @@ -42,15 +42,19 @@ paths: post: tags: - transaction + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact summary: Submit a transaction intent description: Allows users to queue intents for transactions based on specified parameters. operationId: Transact requestBody: + required: true content: application/json: schema: $ref: ./schemas.yml#/TransactRequest - required: true responses: '200': description: Transaction successfully queued diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml index 029b95f124..d9778e770c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml @@ -218,7 +218,6 @@ TransactRequest: type: object required: - contextID - - mode - fromDLTNetworkID - toDLTNetworkID - fromAmount @@ -230,14 +229,8 @@ TransactRequest: properties: contextID: type: string - format: uuid + format: string example: "123e4567-e89b-12d3-a456-426614174000" - mode: - type: string - enum: - - data - - transfer - example: transfer payload: type: string example: '{"data":"example payload"}' diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts index a3404a7b10..71cd2a3eea 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-blo-get-status.test.ts @@ -56,6 +56,7 @@ describe("GetStatus Endpoint and Functionality testing", () => { proofID: "mockProofID10", gatewayServerPort: 3010, gatewayClientPort: 3011, + gatewayOpenAPIPort: 4010, address: "http://localhost", }, }; @@ -65,7 +66,7 @@ describe("GetStatus Endpoint and Functionality testing", () => { try { await gateway.startup(); const address = options.gid!.address!; - const port = options.gid!.gatewayClientPort!; + const port = options.gid!.gatewayOpenAPIPort!; //const apiType = "AdminApi"; const adminApiClient = createClient("AdminApi", address, port, logger); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts index b4b9b8355c..54766843c0 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts @@ -19,9 +19,9 @@ import { SupportedChain, } from "./../../../main/typescript/core/types"; -const logLevel: LogLevelDesc = "INFO"; +const logLevel: LogLevelDesc = "DEBUG"; const logger = LoggerProvider.getOrCreate({ - level: "INFO", + level: logLevel, label: "satp-gateway-orchestrator-init-test", }); const factoryOptions: IPluginFactoryOptions = { @@ -69,7 +69,7 @@ describe("SATPGateway initialization", () => { it("should initiate gateway with custom config", async () => { const options: SATPGatewayConfig = { - logLevel: "INFO", + logLevel: logLevel, gid: { id: "mockID", name: "CustomGateway", @@ -112,7 +112,7 @@ describe("SATPGateway initialization", () => { it("should launch gateway server", async () => { const options: SATPGatewayConfig = { - logLevel: "INFO", + logLevel: logLevel, gid: { id: "mockID", name: "CustomGateway", @@ -225,7 +225,7 @@ describe("SATPGateway startup", () => { test("initiates custom config Gateway Coordinator", async () => { const options: SATPGatewayConfig = { - logLevel: "INFO", + logLevel: logLevel, gid: { id: "mockID", name: "CustomGateway", @@ -268,7 +268,7 @@ describe("SATPGateway startup", () => { test("Gateway Server launches", async () => { const options: SATPGatewayConfig = { - logLevel: "INFO", + logLevel: logLevel, gid: { id: "mockID", name: "CustomGateway", @@ -282,7 +282,9 @@ describe("SATPGateway startup", () => { supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", gatewayClientPort: 3010, - address: "https://localhost", + gatewayServerPort: 3011, + gatewayOpenAPIPort: 4010, + address: "http://localhost", }, }; const gateway = await factory.create(options); @@ -290,7 +292,7 @@ describe("SATPGateway startup", () => { const identity = gateway.Identity; expect(identity.gatewayClientPort).toBe(3010); - expect(identity.address).toBe("https://localhost"); + expect(identity.address).toBe("http://localhost"); await gateway.startup(); await gateway.shutdown(); }); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts new file mode 100644 index 0000000000..24434e9b07 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts @@ -0,0 +1,1131 @@ +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import { v4 as uuidv4 } from "uuid"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; + +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + BesuConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { Account } from "web3-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { + SATPGatewayConfig, + SATPGateway, + PluginFactorySATPGateway, + Asset, + TransactRequest, +} from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { createClient } from "../test-utils"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "SATP - Hermes", +}); +let fabricServer: Server; + +let besuLedger: BesuTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeBesuOptions: IPluginBungeeHermesOptions; + +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup besu ledger + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + pluginRegistry.add(testing_connector); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeBesuOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + network: SupportedChain.BESU, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); +describe("2 SATPGateway sending a token from Besu to Fabric using openApi to request transact method", () => { + it("should realize a transfer", async () => { + //setup satp gateway + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + const factory = new PluginFactorySATPGateway(factoryOptions); + + const gatewayIdentity1 = { + id: "mockID-1", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + } as GatewayIdentity; + + const gatewayIdentity2 = { + id: "mockID-2", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address: "http://localhost" as Address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + } as GatewayIdentity; + + const options1: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity1, + counterPartyGateways: [gatewayIdentity2], //only knows itself + bridgesConfig: [besuConfig], + }; + + const options2: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity2, + counterPartyGateways: [gatewayIdentity1], //only knows itself + bridgesConfig: [fabricConfig], + }; + const gateway1 = await factory.create(options1); + expect(gateway1).toBeInstanceOf(SATPGateway); + + const identity1 = gateway1.Identity; + // default servers + expect(identity1.gatewayServerPort).toBe(3010); + expect(identity1.gatewayClientPort).toBe(3011); + expect(identity1.gatewayOpenAPIPort).toBe(4010); + expect(identity1.address).toBe("http://localhost"); + await gateway1.startup(); + + const gateway2 = await factory.create(options2); + expect(gateway2).toBeInstanceOf(SATPGateway); + + const identity2 = gateway2.Identity; + // default servers + expect(identity2.gatewayServerPort).toBe(3110); + expect(identity2.gatewayClientPort).toBe(3111); + expect(identity2.gatewayOpenAPIPort).toBe(4110); + expect(identity2.address).toBe("http://localhost"); + await gateway2.startup(); + + const dispatcher = gateway1.getBLODispatcher(); + + expect(dispatcher).toBeTruthy(); + const sourceAsset: Asset = { + owner: firstHighNetWorthAccount, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const destinyAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.BESU, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + originatorPubkey: assigneeEthAccount.address, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + destinyAsset, + }; + + const address = options1.gid!.address!; + const port = options1.gid!.gatewayOpenAPIPort!; + + const transactionApiClient = createClient( + "TransactionApi", + address, + port, + log, + ); + + const res = await transactionApiClient.transact(req as TransactRequest); + + log.info(res?.data.statusResponse); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + log.info("Amount was transfer correctly to the Owner account"); + + await gateway1.shutdown(); + await gateway2.shutdown(); + }); +}); From f2afd89458ef2bd5fd8398cc7f0470faf2ff5cfc Mon Sep 17 00:00:00 2001 From: Eduardo Vasques Date: Fri, 6 Sep 2024 20:04:58 +0000 Subject: [PATCH 35/49] feat(satp-hermes): improve admin endpoints Signed-off-by: Eduardo Vasques --- .../src/main/json/openapi-blo-bundled.json | 64 +++++++++++ .../blo/admin/get-status-handler-service.ts | 102 +++++++++++++++--- .../src/main/typescript/blo/dispatcher.ts | 15 ++- .../transaction/transact-handler-service.ts | 35 ++---- .../client/stage3-client-service.ts | 2 +- .../server/stage3-server-service.ts | 1 + .../gateway-client/typescript-axios/api.ts | 68 ++++++++++++ .../src/main/typescript/gol/satp-manager.ts | 2 +- .../typescript/plugin-satp-hermes-gateway.ts | 2 + .../get-all-session-ids-endpoints.ts | 98 +++++++++++++++++ .../src/main/yml/bol/openapi-blo-bundled.yml | 43 ++++++++ .../src/main/yml/bol/openapi-blo.yml | 29 +++++ .../src/main/yml/bol/schemas.yml | 10 ++ ...satp-end-to-end-transfer-1-gateway.test.ts | 5 +- ...to-end-transfer-2-gateways-openapi.test.ts | 7 +- ...atp-end-to-end-transfer-2-gateways.test.ts | 1 - 16 files changed, 434 insertions(+), 50 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/get-all-session-ids-endpoints.ts diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json index 1d58cfa2e7..19cd7659b8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json @@ -744,6 +744,58 @@ } } }, + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids": { + "get": { + "summary": "Get SATP session ids", + "description": "Retrieve the all SATP session IDs", + "operationId": "GetSessionIds", + "tags": [ + "admin" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids" + } + }, + "parameters": [ + { + "name": "SessionsRequest", + "in": "query", + "schema": { + "type": "object", + "description": "Empty object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "nullable": false + }, + "description": "Array with session Ids" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, "/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck": { "get": { "summary": "Health check endpoint", @@ -2398,6 +2450,18 @@ ], "example": "OAUTH" }, + "AllSessionIdsRequest": { + "type": "object", + "description": "Empty object" + }, + "AllSessionIdsResponse": { + "type": "array", + "items": { + "type": "string", + "nullable": false + }, + "description": "Array with session Ids" + }, "getAuditRequest": { "description": "Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs.", "type": "object", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index 5a6589b2e4..a2e119a222 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -2,20 +2,26 @@ import { GetStatusError } from "../../core/errors/satp-errors"; import { StatusRequest, StatusResponse, + StatusResponseStageEnum, + StatusResponseStatusEnum, + StatusResponseSubstatusEnum, Transact200ResponseStatusResponseOriginChain, } from "../../generated/gateway-client/typescript-axios/api"; import { Logger } from "@hyperledger/cactus-common"; +import { SATPManager } from "../../gol/satp-manager"; +import { SupportedChain } from "../../core/types"; export async function ExecuteGetStatus( logger: Logger, req: StatusRequest, + manager: SATPManager, ): Promise { const fnTag = `GetStatusHandler`; logger.info(`${fnTag}, Obtaining status for sessionID=${req.sessionID}`); try { const processedRequest = req; - const result = await GetStatusService(logger, processedRequest); + const result = await GetStatusService(logger, processedRequest, manager); return result; } catch (error) { if (error instanceof GetStatusError) { @@ -32,24 +38,94 @@ export async function ExecuteGetStatus( export async function GetStatusService( logger: Logger, req: StatusRequest, + manager: SATPManager, ): Promise { // Implement the logic for getting status here; call core - const originChain: Transact200ResponseStatusResponseOriginChain = { - dltProtocol: "besu", - dltSubnetworkID: "v24.4.0-RC1", - }; - const destinationChain: Transact200ResponseStatusResponseOriginChain = { - dltProtocol: "fabric", - dltSubnetworkID: "v2.0.0", - }; + const session = manager.getSession(req.sessionID); + if (!session) { + throw new GetStatusError(req.sessionID, " Session not found."); + } + let sessionData; + if (session.hasClientSessionData()) { + sessionData = session.getClientSessionData(); + } else if (session.hasServerSessionData()) { + sessionData = session.getServerSessionData(); + } else { + throw new GetStatusError( + req.sessionID, + " Session does not have session data.", + ); + } + let status: StatusResponseStatusEnum = StatusResponseStatusEnum.Invalid; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + let substatus: StatusResponseSubstatusEnum = + StatusResponseSubstatusEnum.Completed; + const startTime = + sessionData.receivedTimestamps?.stage0?.newSessionRequestMessageTimestamp; + let originChain: Transact200ResponseStatusResponseOriginChain; + let destinationChain: Transact200ResponseStatusResponseOriginChain; + if (sessionData.senderGatewayNetworkId === SupportedChain.BESU) { + originChain = { + dltProtocol: "besu", + dltSubnetworkID: "v24.4.0-RC1", + }; + destinationChain = { + dltProtocol: "fabric", + dltSubnetworkID: "v2.0.0", + }; + } else { + originChain = { + dltProtocol: "fabric", + dltSubnetworkID: "v2.0.0", + }; + destinationChain = { + dltProtocol: "besu", + dltSubnetworkID: "v24.4.0-RC1", + }; + } + if (!sessionData.hashes) { + return { + status: StatusResponseStatusEnum.Invalid, + substatus: StatusResponseSubstatusEnum.UnknownError, + stage: StatusResponseStageEnum.Stage0, + step: "transfer-complete-message", + startTime: startTime || "undefined", + originChain: originChain, + destinationChain: destinationChain, + }; + } + logger.info("completed? " + sessionData.completed); + logger.info("stage0: " + sessionData.hashes.stage0); + logger.info("stage1: " + sessionData.hashes.stage1); + logger.info("stage2: " + sessionData.hashes.stage2); + logger.info("stage3: " + sessionData.hashes.stage3); + if (sessionData.hashes?.stage3 && sessionData.completed) { + substatus = StatusResponseSubstatusEnum.Completed; + status = StatusResponseStatusEnum.Done; + } else { + status = StatusResponseStatusEnum.Pending; + if (sessionData.hashes?.stage0) { + substatus = StatusResponseSubstatusEnum.Partial; + } else { + status = StatusResponseStatusEnum.Invalid; + substatus = StatusResponseSubstatusEnum.UnknownError; + } + } + + let count = -1; + Object.entries(sessionData.hashes).forEach((stage) => { + if (stage[1]) { + ++count; + } + }); const mock: StatusResponse = { - status: "DONE", - substatus: "COMPLETED", - stage: "STAGE3", + status: status, + substatus, + stage: ("STAGE" + count) as StatusResponseStageEnum, step: "transfer-complete-message", - startTime: "2023-03-14T16:50:06.662Z", + startTime: startTime || "undefined", originChain: originChain, destinationChain: destinationChain, }; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 96a04873ba..53e0254370 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -25,6 +25,7 @@ import { GatewayOrchestrator } from "../gol/gateway-orchestrator"; import { SATPBridgesManager } from "../gol/satp-bridges-manager"; import { ExecuteTransact } from "./transaction/transact-handler-service"; import { TransactEndpointV1 } from "../web-services/transact-endpoint"; +import { GetSessionIdsEndpointV1 } from "../web-services/get-all-session-ids-endpoints"; export interface BLODispatcherOptions { logger: Logger; @@ -91,8 +92,12 @@ export class BLODispatcher { dispatcher: this, logLevel: this.options.logLevel, }); + const getSessionIdsEndpointV1 = new GetSessionIdsEndpointV1({ + dispatcher: this, + logLevel: this.options.logLevel, + }); - const theEndpoints = [getStatusEndpointV1]; + const theEndpoints = [getStatusEndpointV1, getSessionIdsEndpointV1]; this.endpoints = theEndpoints; return theEndpoints; } @@ -135,7 +140,7 @@ export class BLODispatcher { } public async GetStatus(req: StatusRequest): Promise { - return ExecuteGetStatus(this.logger, req); + return ExecuteGetStatus(this.logger, req, this.manager); } public async Transact(req: TransactRequest): Promise { @@ -149,6 +154,12 @@ export class BLODispatcher { ); return res; } + + public async GetSessionIds(): Promise { + this.logger.info(`Get Session Ids request`); + const res = Array.from(await this.manager.getSessions().keys()); + return res; + } // get channel by caller; give needed client from orchestrator to handler to call // for all channels, find session id on request // TODO implement handlers GetAudit, Transact, Cancel, Routes diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts index 835c34f2b8..0751b14bbc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts @@ -1,10 +1,5 @@ import { Logger } from "@hyperledger/cactus-common"; -import { - TransactRequest, - TransactResponse, - Transact200ResponseStatusResponseOriginChain, - StatusResponse, -} from "../../public-api"; +import { TransactRequest, TransactResponse } from "../../public-api"; import { SATPManager } from "../../gol/satp-manager"; import { populateClientSessionData } from "../../core/session-utils"; import { @@ -15,6 +10,7 @@ import { import { GatewayOrchestrator } from "../../gol/gateway-orchestrator"; import { GatewayIdentity } from "../../core/types"; import { SATP_VERSION } from "../../core/constants"; +import { GetStatusService } from "../admin/get-status-handler-service"; // todo export async function ExecuteTransact( @@ -83,33 +79,16 @@ export async function ExecuteTransact( ); await manager.initiateTransfer(session); - //mock - const originChain: Transact200ResponseStatusResponseOriginChain = { - dltProtocol: "besu", - dltSubnetworkID: "v24.4.0-RC1", - }; - - const destinationChain: Transact200ResponseStatusResponseOriginChain = { - dltProtocol: "besu", - dltSubnetworkID: "v24.4.0-RC1", - }; - - const mock: StatusResponse = { - status: "DONE", - substatus: "COMPLETED", - stage: "STAGE3", - step: "transfer-complete-message", - startTime: "2023-03-14T16:50:06.662Z", - originChain: originChain, - destinationChain: destinationChain, - }; - logger.info(req); // logger.error("GetStatusService not implemented"); // throw new GetStatusError(req.sessionID, "GetStatusService not implemented"); return { sessionID: session.getSessionId(), - statusResponse: mock, + statusResponse: await GetStatusService( + logger, + { sessionID: session.getSessionId() }, + manager, + ), }; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 682f4dcf0f..79ea265ae6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -282,7 +282,7 @@ export class Stage3ClientService extends SATPService { MessageType.COMMIT_TRANSFER_COMPLETE, messageSignature, ); - + sessionData.completed = true; saveHash( sessionData, MessageType.COMMIT_TRANSFER_COMPLETE, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 408f068377..7a9be9f1b1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -374,6 +374,7 @@ export class Stage3ServerService extends SATPService { this.Log.info( `${fnTag}, TransferCompleteRequestMessage passed all checks.`, ); + sessionData.completed = true; saveHash( sessionData, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts index 928cbd9aaa..bedfb7cf0c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts @@ -2112,6 +2112,41 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the all SATP session IDs + * @summary Get SATP session ids + * @param {object} [sessionsRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionIds: async (sessionsRequest?: object, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (sessionsRequest !== undefined) { + localVarQueryParameter['SessionsRequest'] = sessionsRequest; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -2238,6 +2273,17 @@ export const AdminApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheck(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Retrieve the all SATP session IDs + * @summary Get SATP session ids + * @param {object} [sessionsRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSessionIds(sessionsRequest?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionIds(sessionsRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Retrieve the status of a SATP session * @summary Get SATP current session data @@ -2301,6 +2347,16 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath getHealthCheck(options?: any): AxiosPromise { return localVarFp.getHealthCheck(options).then((request) => request(axios, basePath)); }, + /** + * Retrieve the all SATP session IDs + * @summary Get SATP session ids + * @param {object} [sessionsRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionIds(sessionsRequest?: object, options?: any): AxiosPromise> { + return localVarFp.getSessionIds(sessionsRequest, options).then((request) => request(axios, basePath)); + }, /** * Retrieve the status of a SATP session * @summary Get SATP current session data @@ -2368,6 +2424,18 @@ export class AdminApi extends BaseAPI { return AdminApiFp(this.configuration).getHealthCheck(options).then((request) => request(this.axios, this.basePath)); } + /** + * Retrieve the all SATP session IDs + * @summary Get SATP session ids + * @param {object} [sessionsRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminApi + */ + public getSessionIds(sessionsRequest?: object, options?: AxiosRequestConfig) { + return AdminApiFp(this.configuration).getSessionIds(sessionsRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Retrieve the status of a SATP session * @summary Get SATP current session data diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 4b96bebbb5..1edac6b0f8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -164,7 +164,7 @@ export class SATPManager { return SATPManager.CLASS_NAME; } - public getSessions(): Map | undefined { + public getSessions(): Map { return this.sessions; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index 2d590deece..a417c931e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -533,6 +533,8 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { this.logger.debug(`Entering ${fnTag}`); if (this.BLOServer) { try { + await this.GOLServer?.close(); + await this.BLOServer.closeAllConnections(); await this.BLOServer.close(); this.BLOServer = undefined; this.logger.info("Server shut down"); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/get-all-session-ids-endpoints.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/get-all-session-ids-endpoints.ts new file mode 100644 index 0000000000..b50a6a1489 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/get-all-session-ids-endpoints.ts @@ -0,0 +1,98 @@ +import type { Express, Request, Response } from "express"; + +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; +import { + Logger, + Checks, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; + +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; + +import OAS from "../../json/openapi-blo-bundled.json"; +import { IRequestOptions } from "../core/types"; + +export class GetSessionIdsEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "GetSessionIdsEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return GetSessionIdsEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.dispatcher, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getPath(): string { + const apiPath = + OAS.paths[ + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids" + ]; + return apiPath.get["x-hyperledger-cacti"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = + OAS.paths[ + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids" + ]; + return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; + } + + public getOperationId(): string { + return OAS.paths[ + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids" + ].get.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + // TODO discover way to inherit OAS schema and have request types here + // parameter checks should be enforced by the type system + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + const result = await this.options.dispatcher.GetSessionIds(); + res.status(200).json(result); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml index 374e1b4997..dbd5785fd9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml @@ -577,6 +577,40 @@ paths: description: Transaction not found '500': description: Internal server error + /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids: + get: + summary: Get SATP session ids + description: Retrieve the all SATP session IDs + operationId: GetSessionIds + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids + parameters: + - name: SessionsRequest + in: query + schema: + type: object + description: Empty object + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + type: string + nullable: false + description: Array with session Ids + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck: get: summary: Health check endpoint @@ -1821,6 +1855,15 @@ components: - OAUTH - X509 example: OAUTH + AllSessionIdsRequest: + type: object + description: Empty object + AllSessionIdsResponse: + type: array + items: + type: string + nullable: false + description: Array with session Ids getAuditRequest: description: Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. type: object diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml index f9c33f25b5..f03a37c97c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo.yml @@ -129,6 +129,35 @@ paths: description: Transaction not found '500': description: Internal server error + /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids: + get: + summary: Get SATP session ids + description: Retrieve the all SATP session IDs + operationId: GetSessionIds + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids + parameters: + - name: SessionsRequest + in: query + schema: + $ref: "./schemas.yml#/AllSessionIdsRequest" + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: "./schemas.yml#/AllSessionIdsResponse" + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck: get: summary: Health check endpoint diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml index d9778e770c..1bcfbec878 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml @@ -27,6 +27,16 @@ CredentialProfile: - OAUTH - X509 example: OAUTH +AllSessionIdsRequest: + type: object + description: Empty object + +AllSessionIdsResponse: + type: array + items: + type: string + nullable: false + description: Array with session Ids getAuditRequest: description: "Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs." type: object diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts index 75ae8423f3..d2ab23eb83 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts @@ -171,7 +171,7 @@ beforeAll(async () => { imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), - logLevel, + logLevel: "INFO", }); await fabricLedger.start(); @@ -1002,7 +1002,6 @@ describe("SATPGateway sending a token from Besu to Fabric", () => { toDLTNetworkID: SupportedChain.FABRIC, fromAmount: "100", toAmount: "1", - mode: "transfer", originatorPubkey: assigneeEthAccount.address, beneficiaryPubkey: fabricUser.credentials.certificate, sourceAsset, @@ -1078,7 +1077,7 @@ describe("SATPGateway sending a token from Besu to Fabric", () => { expect(responseBalance2.data).not.toBeUndefined(); expect(responseBalance2.data.functionOutput).toBe("1"); log.info("Amount was transfer correctly to the Owner account"); - + log.info(res?.statusResponse); await gateway.shutdown(); }); }); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts index 24434e9b07..fdc95c76a3 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts @@ -1053,11 +1053,16 @@ describe("2 SATPGateway sending a token from Besu to Fabric using openApi to req port, log, ); + const adminApi = createClient("AdminApi", address, port, log); const res = await transactionApiClient.transact(req as TransactRequest); - log.info(res?.data.statusResponse); + const sessions = await adminApi.getSessionIds({}); + expect(sessions.data).toBeTruthy(); + expect(sessions.data.length).toBe(1); + expect(sessions.data[0]).toBe(res.data.sessionID); + const responseBalanceOwner = await testing_connector.invokeContract({ contractName: erc20TokenContract, keychainId: keychainPlugin1.getKeychainId(), diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts index 3105d085bf..a41c7989ee 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts @@ -1034,7 +1034,6 @@ describe("2 SATPGateway sending a token from Besu to Fabric", () => { toDLTNetworkID: SupportedChain.FABRIC, fromAmount: "100", toAmount: "1", - mode: "transfer", originatorPubkey: assigneeEthAccount.address, beneficiaryPubkey: fabricUser.credentials.certificate, sourceAsset, From a0036a7fd20ba67167ea6947eeef829727065567 Mon Sep 17 00:00:00 2001 From: eduv09 Date: Tue, 3 Sep 2024 17:58:37 +0000 Subject: [PATCH 36/49] refactor(cbdc-example): added gateways and contracts Signed-off-by: Carlos Amaro refactor(cbdc-example): update with new satp-plugin Signed-off-by: eduv09 refactor(cbdc-example): fixes Signed-off-by: Carlos Amaro < --- .../.gitignore | 2 + .../Dockerfile | 69 + .../README.md | 38 + .../foundry.toml | 4 + .../healthcheck.sh | 3 + .../package.json | 51 +- .../process.env | 8 + .../run-cbdc-app.sh | 14 + .../src/crypto-material/crypto-material.json | 41 + .../asset-reference/typescript/.gitignore | 16 + .../asset-reference/typescript/package.json | 64 + .../src/asset-reference-contract.spec.ts | 293 ++ .../src/asset-reference-contract.ts | 332 ++ .../typescript/src/asset-reference.ts | 20 + .../asset-reference/typescript/src/index.ts | 9 + .../asset-reference/typescript/tsconfig.json | 20 + .../cbdc-erc-20/javascript/.gitignore | 78 + .../crypto-material/crypto-material.json | 22 + .../cbdc-erc-20/javascript/index.js | 12 + .../cbdc-erc-20/javascript/lib/tokenERC20.js | 689 +++ .../cbdc-erc-20/javascript/package.json | 49 + .../javascript/test/tokenERC20.test.js | 397 ++ .../chaincode-typescript/.gitignore | 17 + .../chaincode-typescript/lib/tokenERC20.js | 516 +++ .../chaincode-typescript/package.json | 64 + .../src/ITraceableContract.ts | 13 + .../chaincode-typescript/src/index.ts | 9 + .../src/satp-contract-interface.ts | 32 + .../chaincode-typescript/src/satp-contract.ts | 174 + .../chaincode-typescript/src/tokenERC20.ts | 565 +++ .../test/satp-contract.test.ts | 230 + .../test/tokenERC20.test.js | 397 ++ .../chaincode-typescript/tsconfig.json | 19 + .../chaincode-typescript/yarn.lock | 3747 +++++++++++++++++ .../chaincode-typescript/.gitignore | 17 + .../chaincode-typescript/package.json | 65 + .../src/ITraceableContract.ts | 13 + .../chaincode-typescript/src/index.ts | 9 + .../src/interaction-signature.ts | 31 + .../chaincode-typescript/src/satp-wrapper.ts | 517 +++ .../chaincode-typescript/src/token.ts | 29 + .../test/satp-wrapper.test.ts | 418 ++ .../chaincode-typescript/tsconfig.json | 19 + .../chaincode-typescript/yarn.lock | 3662 ++++++++++++++++ .../main/typescript/cbdc-bridging-app-cli.ts | 89 + .../src/main/typescript/cbdc-bridging-app.ts | 235 ++ .../src/main/typescript/index.ts | 1 + .../src/main/typescript/index.web.ts | 1 + .../cbdc-bridging-app-dummy-infrastructure.ts | 942 +++++ .../src/main/typescript/public-api.ts | 2 + .../solidity/cbdc-erc-20/CBDCcontract.json | 2495 +++++++++++ .../cbdc-erc-20/cbdc-contract-test.sol | 49 + .../src/solidity/cbdc-erc-20/cbdc-erc-20.sol | 60 + .../src/solidity/main/ITraceableContract.sol | 10 + .../AccessControl.sol/AccessControl.json | 1 + .../main/generated/Context.sol/Context.json | 1 + .../main/generated/ERC165.sol/ERC165.json | 1 + .../main/generated/ERC20.sol/ERC20.json | 1 + .../IAccessControl.sol/IAccessControl.json | 1 + .../main/generated/IERC165.sol/IERC165.json | 1 + .../main/generated/IERC20.sol/IERC20.json | 1 + .../IERC20Metadata.sol/IERC20Metadata.json | 1 + .../ITraceableContract.json | 1 + .../main/generated/Math.sol/Math.json | 1 + .../main/generated/Ownable.sol/Ownable.json | 1 + .../generated/SignedMath.sol/SignedMath.json | 1 + .../main/generated/Strings.sol/Strings.json | 1 + .../533d2c5e3c1a73b85c754b76cd8b9ca2.json | 1 + .../draft-IERC6093.sol/IERC1155Errors.json | 1 + .../draft-IERC6093.sol/IERC20Errors.json | 1 + .../draft-IERC6093.sol/IERC721Errors.json | 1 + .../SATPContractInterface.json | 1 + .../satp-erc20.sol/SATPContract.json | 1 + .../satp-wrapper.sol/SATPWrapperContract.json | 1 + .../solidity/main/satp-contract-interface.sol | 20 + .../src/solidity/main/satp-erc20.sol | 74 + .../src/solidity/main/satp-wrapper.sol | 251 ++ .../src/solidity/test/satp-erc20-test.sol | 63 + .../src/solidity/test/satp-wrapper-test.sol | 162 + .../test/typescript/cucumber/besu-helper.ts | 116 + .../test/typescript/cucumber/fabric-helper.ts | 161 + .../cucumber/features/besu-gateway.feature | 40 + .../cucumber/features/bridge-back.feature | 67 + .../cucumber/features/bridge-out.feature | 42 + .../cucumber/features/fabric-gateway.feature | 57 + .../cucumber/steps/besu-gateway.steps.ts | 170 + .../cucumber/steps/bridge-back.steps.ts | 126 + .../cucumber/steps/bridge-out.steps.ts | 163 + .../test/typescript/cucumber/steps/common.ts | 76 + .../cucumber/steps/fabric-gateway.steps.ts | 191 + .../integration/api-surface.test.ts | 6 + .../cbdc-app-setup-infrastucture.test.ts | 59 + .../test/typescript/unit/api-surface.test.ts | 6 + .../supervisord.conf | 25 + .../tsconfig.json | 54 + .../src/App.tsx | 8 +- .../src/api-calls/besu-api.tsx | 8 +- .../src/api-calls/fabric-api.tsx | 12 +- .../src/components/ActionsContainer.tsx | 56 +- .../src/components/AssetReferencesTable.tsx | 4 +- .../src/components/Ledger.tsx | 96 +- .../components/dialogs/BridgeBackDialog.tsx | 20 +- .../components/dialogs/BridgeOutDialog.tsx | 14 +- .../dialogs/ConnectionErrorDialog.tsx | 8 +- .../src/components/dialogs/EscrowDialog.tsx | 12 +- .../src/components/dialogs/MintDialog.tsx | 12 +- .../src/components/dialogs/TransferDialog.tsx | 12 +- .../src/index.tsx | 13 +- .../src/models/AssetReference.tsx | 24 +- .../src/pages/HomePage.tsx | 22 +- yarn.lock | 2668 +++++++++++- 111 files changed, 21357 insertions(+), 259 deletions(-) create mode 100644 examples/cactus-example-cbdc-bridging-backend/.gitignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/Dockerfile create mode 100644 examples/cactus-example-cbdc-bridging-backend/README.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/foundry.toml create mode 100644 examples/cactus-example-cbdc-bridging-backend/healthcheck.sh create mode 100644 examples/cactus-example-cbdc-bridging-backend/process.env create mode 100755 examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/.gitignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/package.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/index.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/tsconfig.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/yarn.lock create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/package.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock create mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts create mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts create mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts create mode 100755 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/ITraceableContract.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/AccessControl.sol/AccessControl.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Context.sol/Context.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC165.sol/ERC165.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC20.sol/ERC20.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IAccessControl.sol/IAccessControl.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC165.sol/IERC165.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20.sol/IERC20.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20Metadata.sol/IERC20Metadata.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ITraceableContract.sol/ITraceableContract.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Math.sol/Math.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Ownable.sol/Ownable.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/SignedMath.sol/SignedMath.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Strings.sol/Strings.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/533d2c5e3c1a73b85c754b76cd8b9ca2.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC1155Errors.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC20Errors.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC721Errors.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-contract-interface.sol/SATPContractInterface.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-erc20.sol/SATPContract.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-wrapper.sol/SATPWrapperContract.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-contract-interface.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-erc20.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-wrapper.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/supervisord.conf create mode 100644 examples/cactus-example-cbdc-bridging-backend/tsconfig.json diff --git a/examples/cactus-example-cbdc-bridging-backend/.gitignore b/examples/cactus-example-cbdc-bridging-backend/.gitignore new file mode 100644 index 0000000000..ba03cdfb8e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/.gitignore @@ -0,0 +1,2 @@ +cache/ + diff --git a/examples/cactus-example-cbdc-bridging-backend/Dockerfile b/examples/cactus-example-cbdc-bridging-backend/Dockerfile new file mode 100644 index 0000000000..0276cab7a8 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/Dockerfile @@ -0,0 +1,69 @@ +FROM cruizba/ubuntu-dind:19.03.11 + +USER root + +RUN apt-get update +RUN apt -y upgrade + +# Need curl for healthchecks +RUN apt-get -y install --no-install-recommends curl + +# The file binary is used to inspect exectubles when debugging container image issues +RUN apt-get -y install --no-install-recommends file + +RUN apt-get -y install --no-install-recommends ca-certificates +RUN apt-get -y install --no-install-recommends tzdata + +RUN apt-get -y install --no-install-recommends git +RUN apt-get -y install --no-install-recommends apt-utils + +RUN apt -y install --no-install-recommends default-jdk + +ARG APP=/usr/src/app/cactus/ +COPY . ${APP} + +ENV TZ=Etc/UTC + +RUN mkdir -p ${APP} + +RUN mkdir -p "${APP}/log/" + +WORKDIR ${APP} + +SHELL ["/bin/bash", "--login", "-i", "-c"] +# Installing Node Version Manager (nvm) +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash + +RUN source ~/.bashrc && \ + nvm install 16.8.0 && \ + npm install -g yarn && \ + npm run configure + +SHELL ["/bin/bash", "--login", "-c"] + +COPY ./examples/cactus-example-cbdc-bridging-backend/healthcheck.sh / + +ENV API_HOST=localhost +ENV API_SERVER_1_PORT=4000 +ENV API_SERVER_2_PORT=4100 +ENV API_HOST_FRONTEND=localhost +ENV API_PORT_FRONTEND=2000 + +COPY examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/fabric-contracts +COPY examples/cactus-example-cbdc-bridging-backend/supervisord.conf /etc/supervisord.conf +COPY examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh /run-cbdc-app.sh +RUN chmod +x /run-cbdc-app.sh + +# supervisord web ui/dashboard +EXPOSE 9001 +# API #1 +EXPOSE 4000 +# API #2 +EXPOSE 4100 + +# Extend the parent image's entrypoint +# https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script +ENTRYPOINT ["/usr/bin/supervisord"] +CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] +HEALTHCHECK --interval=1s --timeout=5s --start-period=20s --retries=250 \ + CMD /usr/src/app/cactus/examples/cbdc-bridge-app/healthcheck.sh diff --git a/examples/cactus-example-cbdc-bridging-backend/README.md b/examples/cactus-example-cbdc-bridging-backend/README.md new file mode 100644 index 0000000000..c401469412 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/README.md @@ -0,0 +1,38 @@ +# Hyperledger Cactus Example - CBDC Bridging between Fabric and Besu Backend + +## Running the Test Suites + +> Make sure you have all the dependencies set up as explained in `BUILD.md` + +On the terminal, issue the following commands in the project root: + +1. `npm run configure` +2. `npm run start:example-cbdc-bridging-app` + +Wait for the output to show the message `CbdcBridgingApp running...` + +In a second terminal run the following commands from the project root: +3. `cd examples/cactus-example-cbdc-bridging-backend` +4. `npm run test` + +## Running the Example Application Locally + +> Make sure you have all the dependencies set up as explained in `BUILD.md` + +On the terminal, issue the following commands: + +1. `npm run configure` +2. `npm run start:example-cbdc-bridging-app` + +Wait for the output to show the message `CbdcBridgingApp running...` + +## Debugging the Example Application Locally + +On the terminal, issue the following commands (steps 1 to 6) and then perform the rest of the steps manually. + +1. `npm run configure` +2. Locate the `.vscode/template.launch.json` file +3. Within that file locate the entry named `"Example: CBDC Bridging Fabric-EVM App"` +4. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file +5. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: CBDC Bridging Fabric-EVM App"` which starts the application +6. Wait for the output to show the message `CbdcBridgingApp running...` diff --git a/examples/cactus-example-cbdc-bridging-backend/foundry.toml b/examples/cactus-example-cbdc-bridging-backend/foundry.toml new file mode 100644 index 0000000000..c966ded7e0 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/foundry.toml @@ -0,0 +1,4 @@ +[profile.default] +solc-version = "0.8.20" +evm-version = "paris" +libs = ["node_modules", "lib"] \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh b/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh new file mode 100644 index 0000000000..a4f7037da3 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl -v -i -X OPTIONS http://127.0.0.1:${API_SERVER_1_PORT} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index 5411fa1c73..ef826da5f2 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -27,8 +27,8 @@ }, "contributors": [ { - "name": "Please add yourself to the list of contributors", - "email": "your.name@example.com", + "name": "Eduardo Vasques", + "email": "eduardovasques10@tecnico.ulisboa.pt", "url": "https://example.com" }, { @@ -45,6 +45,9 @@ ], "scripts": { "build:dev:backend:postbuild": "mkdir -p ./dist/lib/fabric-contracts && cp -r ./src/fabric-contracts/* ./dist/lib/fabric-contracts/", + "forge": "forge build ./src/solidity/main/*.sol --out ./src/solidity/main/generated", + "forge:all": "run-s 'forge' 'forge:test'", + "forge:test": "forge build ./src/solidity/test/*.sol --out ./src/solidity/test/generated", "solidity": "hardhat compile", "start": "node dist/lib/main/typescript/cbdc-bridging-app-cli.js dotenv_config_path=./process.env", "test": "nyc cucumber-js ./src/test/typescript/cucumber/features/*.feature --require-module ts-node/register --require './src/test/typescript/cucumber/*/*.ts'", @@ -55,45 +58,51 @@ "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" }, "dependencies": { - "@hyperledger/cactus-api-client": "2.0.0", - "@hyperledger/cactus-cmd-api-server": "2.0.0", - "@hyperledger/cactus-common": "2.0.0", - "@hyperledger/cactus-core": "2.0.0", - "@hyperledger/cactus-core-api": "2.0.0", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", - "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0", - "@hyperledger/cactus-plugin-satp-hermes": "2.0.0", - "@hyperledger/cactus-test-tooling": "2.0.0", - "@openzeppelin/contracts": "4.9.6", + "@foundry-rs/hardhat-forge": "0.1.17", + "@hyperledger/cactus-api-client": "2.0.0-rc.7", + "@hyperledger/cactus-cmd-api-server": "2.0.0-rc.7", + "@hyperledger/cactus-common": "2.0.0-rc.7", + "@hyperledger/cactus-core": "2.0.0-rc.7", + "@hyperledger/cactus-core-api": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-keychain-memory": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-satp-hermes": "2.0.0-rc.7", + "@hyperledger/cactus-test-tooling": "2.0.0-rc.7", + "@openzeppelin/contracts": "5.0.2", "@openzeppelin/contracts-upgradeable": "4.9.6", "async-exit-hook": "2.0.1", "axios": "1.7.7", + "body-parser": "1.20.3", "crypto-js": "4.2.0", - "dotenv": "16.0.1", + "dotenv": "16.4.5", + "express": "4.21.0", "fabric-network": "2.2.20", - "fs-extra": "11.2.0", + "fs-extra": "10.1.0", + "hardhat": "2.22.5", "knex": "2.5.1", "kubo-rpc-client": "3.0.1", "nyc": "13.1.0", "openapi-types": "12.1.3", + "socket.io": "4.6.2", "sqlite3": "5.1.5", "typescript-optional": "2.0.1", - "uuid": "10.0.0", + "uuid": "9.0.1", "web3-core": "1.10.1", "web3-utils": "1.10.1" }, "devDependencies": { "@types/crypto-js": "4.1.1", "@types/cucumber": "4.0.4", - "@types/express": "5.0.0", + "@types/express": "4.17.21", "@types/express-jwt": "6.0.2", - "@types/fs-extra": "11.0.4", + "@types/fs-extra": "9.0.13", "@types/node": "18.11.9", - "@types/uuid": "10.0.0", + "@types/uuid": "9.0.8", "cucumber": "5.0.3", + "ethereum-abi-types-generator": "1.3.4", "hardhat": "2.17.2", "http-status-codes": "2.1.4", "jose": "4.15.5", diff --git a/examples/cactus-example-cbdc-bridging-backend/process.env b/examples/cactus-example-cbdc-bridging-backend/process.env new file mode 100644 index 0000000000..351fca7848 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/process.env @@ -0,0 +1,8 @@ +API_HOST=localhost +API_SERVER_1_PORT=4000 +API_SERVER_2_PORT=4100 +API_HOST_FRONTEND=localhost +API_PORT_FRONTEND=2000 +API_CRPC_HOST=localhost +API_SERVER_1_CRPC_PORT=6000 +API_SERVER_2_CRPC_PORT=6100 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh b/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh new file mode 100755 index 0000000000..5eba756f93 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh @@ -0,0 +1,14 @@ +#!/bin/bash +function main() +{ + echo "Sleeping to let dockerd spin up" + sleep 10 + + docker pull ghcr.io/hyperledger/cactus-besu-all-in-one:2021-01-08-7a055c3 + docker pull ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2 + docker pull ipfs/go-ipfs:v0.8.0 + + /root/.nvm/versions/node/v16.8.0/bin/node -r ts-node/register /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/main/typescript/cbdc-bridging-app-cli.js +} + +main diff --git a/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json new file mode 100644 index 0000000000..c046879484 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/crypto-material/crypto-material.json @@ -0,0 +1,41 @@ +{ "info": { + "description": "this file contains data to be used for testing purposes only. It should not be changed. It should remain consistent with the crypto material in the fabric chaincode" + }, + "accounts": { + "userA": { + "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", + "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", + "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" + }, + "bridge": { + "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", + "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", + "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" + }, + "userB": { + "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", + "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", + "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" + } + }, + "gateways": { + "gateway1": { + "publicKey": "02e2beaa887c53d0ddb8383e2c49553545f50ae19074b4c7f79238dcb59f4b5fcb", + "privateKey": "206021a8ffaba949d21e32c02d76d2dc13da25e8197532ab300bb49d91397e52" + }, + "gateway2": { + "publicKey": "02309ff54e58748616aa81245c1a4457f11fab47dcdb45b107dbcde24ee772b609", + "privateKey": "6bb4c730739969ff3429be71dd62d05459e61bc3f2956326449ae2ca7de50fb6" + } + }, + "keychains": { + "keychain1": { + "id": "df05d3c2-ddd5-4074-aae3-526564217459", + "ref": "bridge1" + }, + "keychain2": { + "id": "d741fb4a-c95c-4205-8afa-758a9423234f", + "ref": "bridge2" + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore new file mode 100644 index 0000000000..79bfe1a3e0 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/.gitignore @@ -0,0 +1,16 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json + +# Compiled TypeScript files +dist + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json new file mode 100644 index 0000000000..af06cbdfab --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/package.json @@ -0,0 +1,64 @@ +{ + "name": "asset-reference-contract", + "version": "1.0.0", + "description": "Asset Reference contract implemented in TypeScript", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "lint": "tslint -c tslint.json 'src/**/*.ts'", + "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", + "start": "fabric-chaincode-node start", + "build": "tsc", + "build:watch": "tsc -w", + "prepublishOnly": "npm run build" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "^2.4.1", + "fabric-shim": "2.4.1" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", + "@types/node": "18.11.9", + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.3.3", + "winston": "^3.2.1" + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "coverage/**", + "dist/**" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": true, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts new file mode 100644 index 0000000000..9109626447 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.spec.ts @@ -0,0 +1,293 @@ +/* + * SPDX-License-Identifier: Apache 2.0 + */ + +import { Context } from "fabric-contract-api"; +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { AssetReferenceContract } from "."; + +import * as winston from "winston"; +import * as chai from "chai"; +import * as chaiAsPromised from "chai-as-promised"; +import * as sinon from "sinon"; +import * as sinonChai from "sinon-chai"; + +const bridgedOutAmountKey = "amountBridgedOut"; + +const USER_A_FABRIC_ID = + "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; + +const USER_A_ETH_ADDRESS = + "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +class TestContext extends Context { + public stub: sinon.SinonStubbedInstance = + sinon.createStubInstance(ChaincodeStub); + public clientIdentity: sinon.SinonStubbedInstance = + sinon.createStubInstance(ClientIdentity); + public logging = { + getLogger: sinon + .stub() + .returns(sinon.createStubInstance(winston.createLogger().constructor)), + setLevel: sinon.stub(), + }; +} + +describe("AssetReference", () => { + let contract: AssetReferenceContract; + let ctx: TestContext; + + beforeEach(() => { + contract = new AssetReferenceContract(); + ctx = new TestContext(); + ctx.clientIdentity.getMSPID.resolves("Org2MSP"); + ctx.stub.getState.withArgs(bridgedOutAmountKey).resolves(Buffer.from("50")); + ctx.stub.getState + .withArgs("1001") + .resolves( + Buffer.from( + `{"id":"1001","isLocked":false,"numberTokens":10,"recipient":"${USER_A_FABRIC_ID}"}`, + ), + ); + ctx.stub.getState + .withArgs("1002") + .resolves( + Buffer.from( + `{"id":"1002","isLocked":true,"numberTokens":30,"recipient":"${USER_A_FABRIC_ID}"}`, + ), + ); + }); + + describe("#assetReferenceExists", () => { + it("should return true for an asset reference", async () => { + await contract.AssetReferenceExists(ctx, "1001").should.eventually.be + .true; + }); + + it("should return false for an asset reference that does not exist", async () => { + await contract.AssetReferenceExists(ctx, "1003").should.eventually.be + .false; + }); + }); + + describe("#createAssetReference", () => { + it("should create an asset reference", async () => { + await contract.CreateAssetReference(ctx, "1003", 100, USER_A_FABRIC_ID); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"id":"1003","isLocked":false,"numberTokens":100,"recipient":"${USER_A_FABRIC_ID}"}`, + ), + ); + }); + + it("should throw an error for an asset reference that already exists", async () => { + await contract + .CreateAssetReference(ctx, "1001", 100, USER_A_FABRIC_ID) + .should.be.rejectedWith( + /The asset reference with ID 1001 already exists/, + ); + }); + }); + + describe("#readAssetReference", () => { + it("should return an asset reference", async () => { + await contract + .ReadAssetReference(ctx, "1001") + .should.eventually.deep.equal({ + id: "1001", + isLocked: false, + numberTokens: 10, + recipient: USER_A_FABRIC_ID, + }); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .ReadAssetReference(ctx, "1003") + .should.be.rejectedWith(/The asset reference 1003 does not exist/); + }); + }); + + describe("#IsAssetReferenceLocked", () => { + it("should return true for a locked asset reference", async () => { + const result1 = await contract.IsAssetReferenceLocked(ctx, "1001"); + const result2 = await contract.IsAssetReferenceLocked(ctx, "1002"); + chai.expect(result1).to.be.false; + chai.expect(result2).to.be.true; + + await contract + .IsAssetReferenceLocked(ctx, "1003") + .should.be.rejectedWith(/The asset reference 1003 does not exist/); + }); + }); + + describe("#lockAssetReference", () => { + it("should lock an asset reference", async () => { + await contract.LockAssetReference(ctx, "1001"); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"id":"1001","isLocked":true,"numberTokens":10,"recipient":"${USER_A_FABRIC_ID}"}`, + ), + ); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .LockAssetReference(ctx, "1003") + .should.be.rejectedWith(/The asset reference 1003 does not exist/); + }); + + it("should throw an error for an asset reference already locked", async () => { + await contract + .LockAssetReference(ctx, "1002") + .should.be.rejectedWith(/The asset reference 1002 is already locked/); + }); + }); + + describe("#unlockAssetReference", () => { + it("should unlock an asset reference", async () => { + await contract.UnlockAssetReference(ctx, "1002"); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"id":"1002","isLocked":false,"numberTokens":30,"recipient":"${USER_A_FABRIC_ID}"}`, + ), + ); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .UnlockAssetReference(ctx, "1003") + .should.be.rejectedWith(/The asset reference 1003 does not exist/); + }); + }); + + describe("#deleteAssetReference", () => { + it("should delete an asset reference", async () => { + await contract.DeleteAssetReference(ctx, "1001"); + ctx.stub.deleteState.should.have.been.calledOnceWithExactly("1001"); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .DeleteAssetReference(ctx, "1003") + .should.be.rejectedWith(/The asset reference 1003 does not exist/); + }); + }); + + describe("#GetBridgedOutAmount", () => { + it("should increase bridged out amount", async () => { + await contract.IncreaseBridgedAmount(ctx, 1001); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + bridgedOutAmountKey, + Buffer.from("1051"), + ); + }); + + it("should decrease bridged out amount", async () => { + await contract.DecreaseBridgedAmount(ctx, 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + bridgedOutAmountKey, + Buffer.from("40"), + ); + }); + + it("should thrown an error trying to decrease bridged out", async () => { + await contract + .DecreaseBridgedAmount(ctx, 100) + .should.be.rejectedWith(/Bridged back too many tokens/); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .DeleteAssetReference(ctx, "1003") + .should.be.rejectedWith(/The asset reference 1003 does not exist/); + }); + }); + + describe("#Refund", () => { + it("should decrease bridged out amount", async () => { + await contract.Refund(ctx, 20, USER_A_FABRIC_ID, USER_A_ETH_ADDRESS); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + bridgedOutAmountKey, + Buffer.from("30"), + ); + }); + }); + + describe("#checkValidTransfer", () => { + const assetID = "1001"; + const amount1 = "10"; + const amount2 = "500"; + + it("should be a valid transfer bridging out CBDC to own address", async () => { + await contract.CheckValidBridgeOut( + ctx, + assetID, + amount1, + USER_A_FABRIC_ID, + USER_A_ETH_ADDRESS, + ).should.not.be.rejected; + }); + + it("should throw an error transfer CBDC escrowed by another user", async () => { + await contract + .CheckValidBridgeOut( + ctx, + assetID, + amount1, + "USER_B_FABRIC_ID", + USER_A_ETH_ADDRESS, + ) + .should.be.rejectedWith( + /it is not possible to transfer tokens escrowed by another user/, + ); + }); + + it("should throw an error bridging out more than the escrowed CBDC", async () => { + await contract + .CheckValidBridgeOut( + ctx, + assetID, + amount2, + USER_A_FABRIC_ID, + USER_A_ETH_ADDRESS, + ) + .should.be.rejectedWith( + /it is not possible to transfer a different amount of CBDC than the ones escrowed/, + ); + }); + }); + + describe("#operations", () => { + const number1 = 10; + const number2 = 500; + + it("add two numbers", () => { + const result = contract.add(number1, number2); + chai.expect(result).to.equal(number1 + number2); + }); + + it("subtract two numbers", () => { + const result = contract.sub(number2, number1); + chai.expect(result).to.equal(number2 - number1); + }); + }); + + describe("#checkPermission", () => { + it("user from organization other than Org2 is not authorized to perform operations", () => { + ctx.clientIdentity.getMSPID.resolves("Org1MSP"); + contract + .LockAssetReference(ctx, "1001") + .should.be.rejectedWith( + `client is not authorized to perform the operation. Org1MSP != "Org2MSP"`, + ); + }); + }); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts new file mode 100644 index 0000000000..3a1f1d6904 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference-contract.ts @@ -0,0 +1,332 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + Context, + Contract, + Info, + Returns, + Transaction, +} from "fabric-contract-api"; +import { AssetReference } from "./asset-reference"; + +const bridgedOutAmountKey = "amountBridgedOut"; + +@Info({ + title: "AssetReferenceContract", + description: "Smart contract for trading assets", +}) +export class AssetReferenceContract extends Contract { + // AssetReferenceExists returns true when asset with given ID exists in world state. + @Transaction(false) + @Returns("boolean") + public async AssetReferenceExists( + ctx: Context, + id: string, + ): Promise { + const assetJSON = await ctx.stub.getState(id); + return !!assetJSON && assetJSON.length > 0; + } + + // IsAssetReferenceLocked returns true when asset with given ID is locked in world state. + @Transaction(false) + @Returns("boolean") + public async IsAssetReferenceLocked( + ctx: Context, + id: string, + ): Promise { + const assetJSON = await ctx.stub.getState(id); + + if (assetJSON && assetJSON.length > 0) { + const asset = JSON.parse(assetJSON.toString()); + return asset.isLocked; + } else { + throw new Error(`The asset reference ${id} does not exist`); + } + } + + // CreateAssetReference issues a new asset to the world state with given details. + @Transaction() + public async CreateAssetReference( + ctx: Context, + assetId: string, + numberTokens: number, + recipient: string, + ): Promise { + console.log( + "Creating new asset reference with id: " + + assetId + + " representing " + + numberTokens + + " tokens", + ); + const exists: boolean = await this.AssetReferenceExists(ctx, assetId); + if (exists) { + throw new Error(`The asset reference with ID ${assetId} already exists`); + } + + const asset: AssetReference = { + id: assetId, + isLocked: false, + numberTokens: numberTokens, + recipient: recipient, + }; + + const buffer: Buffer = Buffer.from(JSON.stringify(asset)); + await ctx.stub.putState(assetId, buffer); + } + + @Transaction() + public async Refund( + ctx: Context, + numberTokens: number, + finalFabricIdentity: string, + ethAddress: string, + ): Promise { + await this.CheckPermission(ctx); + + console.log( + "Calling refund tokens to " + finalFabricIdentity + " from " + ethAddress, + ); + await ctx.stub.invokeChaincode( + "cbdc", + ["Refund", finalFabricIdentity, numberTokens.toString(), ethAddress], + ctx.stub.getChannelID(), + ); + + await this.DecreaseBridgedAmount(ctx, numberTokens); + } + + @Transaction(false) + @Returns("AssetReference") + public async ReadAssetReference( + ctx: Context, + assetId: string, + ): Promise { + const exists: boolean = await this.AssetReferenceExists(ctx, assetId); + if (!exists) { + throw new Error(`The asset reference ${assetId} does not exist`); + } + const data: Uint8Array = await ctx.stub.getState(assetId); + const asset: AssetReference = JSON.parse(data.toString()) as AssetReference; + return asset; + } + + @Transaction() + public async LockAssetReference( + ctx: Context, + assetId: string, + ): Promise { + await this.CheckPermission(ctx); + + const exists: boolean = await this.AssetReferenceExists(ctx, assetId); + if (!exists) { + throw new Error(`The asset reference ${assetId} does not exist`); + } + + if (await this.IsAssetReferenceLocked(ctx, assetId)) { + throw new Error(`The asset reference ${assetId} is already locked`); + } + + const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); + asset.isLocked = true; + const buffer: Buffer = Buffer.from(JSON.stringify(asset)); + + console.log("Locking asset reference with id: " + assetId); + await ctx.stub.putState(assetId, buffer); + } + + @Transaction(false) + public async CheckValidBridgeOut( + ctx: Context, + assetId: string, + amount: string, + fabricID: string, + ethAddress: string, + ): Promise { + // check if this transfer is allowed + const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); + + if (asset.recipient != fabricID) { + throw new Error( + `it is not possible to transfer tokens escrowed by another user`, + ); + } + + if (asset.numberTokens != parseInt(amount)) { + throw new Error( + `it is not possible to transfer a different amount of CBDC than the ones escrowed`, + ); + } + + await ctx.stub.invokeChaincode( + "cbdc", + ["checkAddressMapping", fabricID, ethAddress], + ctx.stub.getChannelID(), + ); + } + + @Transaction(false) + public async CheckValidBridgeBack( + ctx: Context, + fabricID: string, + ethAddress: string, + ): Promise { + await ctx.stub.invokeChaincode( + "cbdc", + ["checkAddressMapping", fabricID, ethAddress], + ctx.stub.getChannelID(), + ); + } + + @Transaction() + public async UnlockAssetReference( + ctx: Context, + assetId: string, + ): Promise { + await this.CheckPermission(ctx); + + const exists: boolean = await this.AssetReferenceExists(ctx, assetId); + if (!exists) { + throw new Error(`The asset reference ${assetId} does not exist`); + } + + const asset: AssetReference = await this.ReadAssetReference(ctx, assetId); + asset.isLocked = false; + const buffer: Buffer = Buffer.from(JSON.stringify(asset)); + + console.log("Unlocking asset reference with id: " + assetId); + await ctx.stub.putState(assetId, buffer); + } + + @Transaction() + public async DeleteAssetReference( + ctx: Context, + assetId: string, + ): Promise { + await this.CheckPermission(ctx); + + const exists: boolean = await this.AssetReferenceExists(ctx, assetId); + if (!exists) { + throw new Error(`The asset reference ${assetId} does not exist`); + } + const asset = await this.ReadAssetReference(ctx, assetId); + await this.IncreaseBridgedAmount(ctx, asset.numberTokens); + + console.log("Deleting asset reference with id: " + assetId); + await ctx.stub.deleteState(assetId); + } + + @Transaction(false) + public async GetBridgedOutAmount(ctx: Context): Promise { + const amountBytes = await ctx.stub.getState(bridgedOutAmountKey); + + let amountValue; + // If value doesn't yet exist, we'll create it with a value of 0 + if (!amountBytes || amountBytes.length === 0) { + amountValue = 0; + } else { + amountValue = parseInt(amountBytes.toString()); + } + + return amountValue; + } + + @Transaction() + public async IncreaseBridgedAmount( + ctx: Context, + value: number, + ): Promise { + await this.CheckPermission(ctx); + + const newBalance = this.add(await this.GetBridgedOutAmount(ctx), value); + await ctx.stub.putState( + bridgedOutAmountKey, + Buffer.from(newBalance.toString()), + ); + } + + @Transaction() + public async DecreaseBridgedAmount( + ctx: Context, + value: number, + ): Promise { + await this.CheckPermission(ctx); + + const newBalance = this.sub(await this.GetBridgedOutAmount(ctx), value); + + if (newBalance < 0) { + throw new Error(`Bridged back too many tokens`); + } + await ctx.stub.putState( + bridgedOutAmountKey, + Buffer.from(newBalance.toString()), + ); + } + + // GetAllAssets returns all assets found in the world state. + @Transaction(false) + public async GetAllAssetReferences(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + const strValue = Buffer.from(result.value.value.toString()).toString( + "utf8", + ); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + @Transaction() + public async ResetState(ctx: Context): Promise { + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + console.log(result.value); + await ctx.stub.putState(result.value.key, undefined); + result = await iterator.next(); + } + + await ctx.stub.putState(bridgedOutAmountKey, Buffer.from("0")); + } + + // add two number checking for overflow + add(a, b) { + const c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + const c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } + + private async CheckPermission(ctx: Context) { + // this needs to be called by entity2 (the bridging entity) + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if (clientMSPID !== "Org2MSP") { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID} != "Org2MSP"`, + ); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts new file mode 100644 index 0000000000..cab2df353e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/asset-reference.ts @@ -0,0 +1,20 @@ +/* + SPDX-License-Identifier: Apache-2.0 +*/ + +import { Object, Property } from "fabric-contract-api"; + +@Object() +export class AssetReference { + @Property() + public id: string; + + @Property() + public isLocked: boolean; + + @Property() + public numberTokens: number; + + @Property() + public recipient: string; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts new file mode 100644 index 0000000000..97998610fb --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { AssetReferenceContract } from "./asset-reference-contract"; + +export { AssetReferenceContract } from "./asset-reference-contract"; + +export const contracts: any[] = [AssetReferenceContract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json new file mode 100644 index 0000000000..4004da493c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/asset-reference/typescript/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "target": "es2017", + "moduleResolution": "node", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "skipLibCheck": true + }, + "include": [ + "./src/**/*", + "src/**/*.json" + ], + "exclude": [ + "./src/**/*.spec.ts" + ] +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore new file mode 100644 index 0000000000..c84ff1dbdd --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/.gitignore @@ -0,0 +1,78 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json new file mode 100644 index 0000000000..1ec43cca91 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/crypto-material/crypto-material.json @@ -0,0 +1,22 @@ +{ + "info": { + "description": "this file contains data to be used for testing purposes only. It should not be changed. It should remain consistent with the crypto material in the fabric chaincode" + }, + "accounts": { + "userA": { + "ethAddress": "0x1A86D6f4b5D30A07D1a94bb232eF916AFe5DbDbc", + "privateKey": "0xb47c3ba5a816dbbb2271db721e76e6c80e58fe54972d26a42f00bc97a92a2535", + "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" + }, + "bridge": { + "ethAddress": "0xf28d5769171bfbD2B3628d722e58129a6aE15022", + "privateKey": "0x2917bd3b0dced512d3555f171a0979fedd37bb0593883089396d9b893aa0505d", + "fabricID": "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com" + }, + "userB": { + "ethAddress": "0xB264c626D7D09789AbfD2a431A28a054366e7b63", + "privateKey": "0xfe95d40663e60e9a8a2e1f4153c9e207ac26d928e8a5631647735d91e93be402", + "fabricID": "x509::/OU=org1/OU=client/OU=department1/CN=userB::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com" + } + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js new file mode 100644 index 0000000000..2c63fa92a5 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/index.js @@ -0,0 +1,12 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const tokenERC20Contract = require("./lib/tokenERC20.js"); + +module.exports.TokenERC20Contract = tokenERC20Contract; +module.exports.contracts = [tokenERC20Contract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js new file mode 100644 index 0000000000..0ce3d715ba --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/lib/tokenERC20.js @@ -0,0 +1,689 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Contract } = require("fabric-contract-api"); +const CryptoMaterial = require("../crypto-material/crypto-material.json"); + +const accounts = [ + { + fabric: CryptoMaterial.accounts.userA.fabricID, + ethereum: CryptoMaterial.accounts.userA.ethAddress, + }, + { + fabric: CryptoMaterial.accounts.userB.fabricID, + ethereum: CryptoMaterial.accounts.userB.ethAddress, + }, + { + fabric: CryptoMaterial.accounts.bridge.fabricID, + ethereum: CryptoMaterial.accounts.bridge.ethAddress, + }, +]; + +const FABRIC_BRIDGE_IDENTITY = CryptoMaterial.accounts.bridge.fabricID; + +// Define objectType names for prefix +const balancePrefix = "balance"; +const allowancePrefix = "allowance"; +const addressPrefix = "address"; + +// Define key names for options +const nameKey = "name"; +const symbolKey = "symbol"; +const decimalsKey = "decimals"; +const totalSupplyKey = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx, owner) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [owner]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx, to, value) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from = ctx.clientIdentity.getID(); + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom(ctx, from, to, value) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer(ctx, from, to, value) { + if (from === to) { + throw new Error( + `cannot transfer to and from same client account: ${from}`, + ); + } + + // Convert value from string to int + const valueInt = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [from]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance = parseInt(fromCurrentBalanceBytes.toString()); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recipient + const toBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [to]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + async Approve(ctx, spender, value) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner = ctx.clientIdentity.getID(); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + let valueInt = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance(ctx, owner, spender) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize(ctx, name, symbol, decimals) { + // Check minter authorization - this sample assumes Org1 is the central banker with privilege to set Options for these tokens + const clientMSPID = ctx.clientIdentity.getMSPID(); + if (clientMSPID !== "Org1MSP") { + throw new Error("client is not authorized to initialize contract"); + } + + //check contract options are not already set, client is not authorized to change them once initialized + const nameBytes = await ctx.stub.getState(nameKey); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + + await this.initializeAddressMapping(ctx); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + async Mint(ctx, amount) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter = ctx.clientIdentity.getID(); + + // Check minter authorization - this sample assumes Org1 is the central banker with privilege to mint new tokens + const clientMSPID = ctx.clientIdentity.getMSPID(); + + if (clientMSPID !== "Org1MSP") { + throw new Error("client is not authorized to mint new tokens"); + } + + const amountInt = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx, amount) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Check minter authorization - this sample assumes Org1 is the central banker with privilege to burn tokens + const clientMSPID = ctx.clientIdentity.getMSPID(); + if (clientMSPID !== "Org1MSP") { + throw new Error("client is not authorized to mint new tokens"); + } + + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance = parseInt(currentBalanceBytes.toString()); + const updatedBalance = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + async ClientAccountBalance(ctx) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + return clientAccountID; + } + + //Checks that contract options have been already initialized + async CheckInitialized(ctx) { + const nameBytes = await ctx.stub.getState(nameKey); + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + /** + * Escrow transfers tokens from client account to the bridging entity account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Escrow(ctx, value, id) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from = ctx.clientIdentity.getID(); + + const transferResp = await this._transfer( + ctx, + from, + FABRIC_BRIDGE_IDENTITY, + value, + ); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { + from, + FABRIC_BRIDGE_IDENTITY, + value: parseInt(value), + }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + // this means that the transfer was made to the bridging entity + await ctx.stub.invokeChaincode( + "asset-reference-contract", + ["CreateAssetReference", id, value.toString(), from.toString()], + ctx.stub.getChannelID(), + ); + } + + /** + * Refunds transfers tokens from the bridging entity account to the client account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Refund(ctx, to, value, eth_address) { + //check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from = ctx.clientIdentity.getID(); + + if (from !== FABRIC_BRIDGE_IDENTITY) { + throw new Error("client is not authorized to refund tokens"); + } + + const clientEthAddress = await this.getAddressMapping(ctx, to); + + if (clientEthAddress !== eth_address) { + throw new Error( + "client is not authorized to bridge back tokens to another client account", + ); + } + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { + from, + FABRIC_BRIDGE_IDENTITY, + value: parseInt(value), + }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + } + + async initializeAddressMapping(ctx) { + // initialize mapping between Fabric Identities and Ethereum addresses + for (let account of accounts) { + const addressKey = ctx.stub.createCompositeKey(addressPrefix, [ + account.fabric, + ]); + + // additionally initialize all addresses to 0 + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ + account.fabric, + ]); + + await ctx.stub.putState(addressKey, Buffer.from(account.ethereum)); + await ctx.stub.putState(balanceKey, Buffer.from("0")); + } + } + + async getAddressMapping(ctx, fabricID) { + await this.CheckInitialized(ctx); + + const addressKey = ctx.stub.createCompositeKey(addressPrefix, [fabricID]); + + console.log("retrieving address with key: " + addressKey); + const addressBytes = await ctx.stub.getState(addressKey); + if (!addressBytes || addressBytes.length === 0) { + throw new Error(`the account ${fabricID} does not exist`); + } + const address = addressBytes.toString(); + + return address; + } + + async checkAddressMapping(ctx, fabricID, ethAddress) { + const storedAddress = await this.getAddressMapping(ctx, fabricID); + + if (storedAddress != ethAddress) { + throw new Error(`it is not possible to bridge CBDC to another user.`); + } + } + + // add two number checking for overflow + add(a, b) { + let c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + let c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } + + /** + * Testing purposes function + */ + async ResetState(ctx) { + for (let account of accounts) { + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ + account.fabric, + ]); + await ctx.stub.putState(balanceKey, Buffer.from("0")); + } + } +} + +module.exports = TokenERC20Contract; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json new file mode 100644 index 0000000000..e516e5e60c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/package.json @@ -0,0 +1,49 @@ +{ + "name": "cbdc", + "version": "0.0.1", + "description": "Token-ERC20 contract implemented in JavaScript", + "main": "index.js", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "test": "nyc mocha --recursive", + "mocha": "mocha --recursive", + "start": "fabric-chaincode-node start" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "^2.2.3", + "fabric-shim": "^2.0.0" + }, + "devDependencies": { + "@types/sinon-chai": "^3.2.8", + "chai": "^4.1.2", + "chai-as-promised": "^7.1.1", + "mocha": "^8.0.1", + "nyc": "^14.1.1", + "sinon": "^6.0.0", + "sinon-chai": "^3.2.0" + }, + "nyc": { + "exclude": [ + "coverage/**", + "test/**", + "index.js", + ".eslintrc.js" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": false, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js new file mode 100644 index 0000000000..8481b9af8b --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/cbdc-erc-20/javascript/test/tokenERC20.test.js @@ -0,0 +1,397 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Context } = require("fabric-contract-api"); +const { ChaincodeStub, ClientIdentity } = require("fabric-shim"); + +const { TokenERC20Contract } = require("../lib/tokenERC20"); + +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +const sinon = require("sinon"); +const expect = chai.expect; + +chai.should(); +chai.use(chaiAsPromised); + +describe("Chaincode", () => { + let sandbox; + let token; + let ctx; + let mockStub; + let mockClientIdentity; + + beforeEach("Sandbox creation", async () => { + sandbox = sinon.createSandbox(); + token = new TokenERC20Contract("token-erc20"); + + ctx = sinon.createStubInstance(Context); + mockStub = sinon.createStubInstance(ChaincodeStub); + ctx.stub = mockStub; + mockClientIdentity = sinon.createStubInstance(ClientIdentity); + ctx.clientIdentity = mockClientIdentity; + + await token.Initialize(ctx, "some name", "some symbol", "2"); + + mockStub.putState.resolves("some state"); + mockStub.setEvent.returns("set event"); + }); + + afterEach("Sandbox restoration", () => { + sandbox.restore(); + }); + + describe("#TokenName", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.TokenName(ctx); + sinon.assert.calledWith(mockStub.getState, "name"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Symbol", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.Symbol(ctx); + sinon.assert.calledWith(mockStub.getState, "symbol"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Decimals", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("2")); + + const response = await token.Decimals(ctx); + sinon.assert.calledWith(mockStub.getState, "decimals"); + expect(response).to.equals(2); + }); + }); + + describe("#TotalSupply", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("10000")); + + const response = await token.TotalSupply(ctx); + sinon.assert.calledWith(mockStub.getState, "totalSupply"); + expect(response).to.equals(10000); + }); + }); + + describe("#BalanceOf", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.BalanceOf(ctx, "Alice"); + expect(response).to.equals(1000); + }); + }); + + describe("#_transfer", () => { + it("should fail when the sender and the recipient are the same", async () => { + await expect( + token._transfer(ctx, "Alice", "Alice", "1000"), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("500")); + + await expect( + token._transfer(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "client account Alice has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(null); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Transfer", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + sinon.stub(token, "_transfer").returns(true); + + const response = await token.Transfer(ctx, "Bob", "1000"); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#TransferFrom", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("0")); + + await expect( + token.TransferFrom(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("3000")); + + sinon.stub(token, "_transfer").returns(true); + + const response = await token.TransferFrom(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Alice_Charlie", + Buffer.from("2000"), + ); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Approve", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Dave"); + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + + const response = await token.Approve(ctx, "Ellen", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Dave_Eve", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Allowance", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.Allowance(ctx, "Dave", "Eve"); + expect(response).to.equals(1000); + }); + }); + + describe("#Initialize", () => { + it("should work", async () => { + //we consider it has already been initialized in the before-each statement + sinon.assert.calledWith( + mockStub.putState, + "name", + Buffer.from("some name"), + ); + sinon.assert.calledWith( + mockStub.putState, + "symbol", + Buffer.from("some symbol"), + ); + sinon.assert.calledWith(mockStub.putState, "decimals", Buffer.from("2")); + }); + + it("should failed if called a second time", async () => { + //we consider it has already been initialized in the before-each statement + await expect( + await token.Initialize(ctx, "some name", "some symbol", "2"), + ).to.be.rejectedWith( + Error, + "contract options are already set, client is not authorized to change them", + ); + }); + }); + + describe("#Mint", () => { + it("should add token to a new account and a new total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(null); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to the existing account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("2000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to a new account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Burn", () => { + it("should work", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Burn(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#ClientAccountBalance", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.ClientAccountBalance(ctx); + expect(response).to.equals(1000); + }); + }); + + describe("#ClientAccountID", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("x509::{subject DN}::{issuer DN}"); + + const response = await token.ClientAccountID(ctx); + sinon.assert.calledOnce(mockClientIdentity.getID); + expect(response).to.equals("x509::{subject DN}::{issuer DN}"); + }); + }); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/.gitignore new file mode 100644 index 0000000000..1dc2dbe2a8 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/.gitignore @@ -0,0 +1,17 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json +.yarn/ + +# Compiled TypeScript files +dist + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js new file mode 100644 index 0000000000..f04e64cb64 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js @@ -0,0 +1,516 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Contract } = require("fabric-contract-api"); + +// Define objectType names for prefix +const balancePrefix = "balance"; +const allowancePrefix = "allowance"; + +// Define key names for options +const nameKey = "name"; +const symbolKey = "symbol"; +const decimalsKey = "decimals"; +const totalSupplyKey = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx, owner) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [owner]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx, to, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from = ctx.clientIdentity.getID(); + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom(ctx, from, to, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer(ctx, from, to, value) { + if (from === to) { + throw new Error("cannot transfer to and from same client account"); + } + + // Convert value from string to int + const valueInt = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [from]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance = parseInt(fromCurrentBalanceBytes.toString()); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recepient + const toBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [to]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + async Approve(ctx, spender, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner = ctx.clientIdentity.getID(); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + let valueInt = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance(ctx, owner, spender) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize(ctx, name, symbol, decimals) { + // Check contract options are not already set, client is not authorized to change them once intitialized + const nameBytes = await ctx.stub.getState(nameKey); + console.log("nameBytes: ", nameBytes); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + async Mint(ctx, amount) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx, amount) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance = parseInt(currentBalanceBytes.toString()); + const updatedBalance = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + async ClientAccountBalance(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + return clientAccountID; + } + + // Checks that contract options have been already initialized + async CheckInitialized(ctx) { + const nameBytes = await ctx.stub.getState(nameKey); + + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + // add two number checking for overflow + add(a, b) { + let c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + let c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } +} + +module.exports = TokenERC20Contract; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/package.json new file mode 100644 index 0000000000..2594a3ae2f --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/package.json @@ -0,0 +1,64 @@ +{ + "name": "satp-contract", + "version": "1.0.0", + "description": "SATP contract implemented in TypeScript", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "lint": "tslint -c tslint.json 'src/**/*.ts'", + "test": "nyc mocha -r ts-node/register test/**/*.test.ts", + "start": "fabric-chaincode-node start", + "build": "tsc", + "build:watch": "tsc -w", + "prepublishOnly": "npm run build" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "^2.4.1", + "fabric-shim": "2.4.1" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", + "@types/node": "18.11.9", + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.5.2", + "winston": "^3.2.1" + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "coverage/**", + "dist/**" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": true, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts new file mode 100644 index 0000000000..f0596b3843 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +export interface ITraceableContract { + // GetAllAssetsKey returns all assets key found in the world state. + GetAllAssetsKey(ctx: Context): Promise; + + // GetAllTxByKey returns all transations for a specific key. + GetAllTxByKey(ctx: Context, key: string): Promise; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..420ce3ba19 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SATPContract } from "./satp-contract"; + +export { SATPContract } from "./satp-contract"; + +export const contracts: any[] = [SATPContract]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts new file mode 100644 index 0000000000..d3651eb3c5 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +/* + * Smart Contract Interface to define the methods needed by SATP Wrapper Contract. + */ + +export interface SATPContractInterface { + // mint creates new tokens with the given amount and assigns them to the owner. + mint(ctx: Context, amount: string): Promise; + // burn destroys the given amount of tokens from the owner. + burn(ctx: Context, amount: string): Promise; + // assign assigns the given amount of tokens from the owner to the target, without approval. + assign( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise; + // transfer transfers the given amount of tokens from the sender to the target, with approval needed. + transfer( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise; + // hasPermission checks if the clientMSPID has the permission to perform actions. + hasPermission(ctx: Context, clientMSPID: string): Promise; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract.ts new file mode 100644 index 0000000000..684a0c1ec7 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/satp-contract.ts @@ -0,0 +1,174 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context, Info, Returns, Transaction } from "fabric-contract-api"; +import { ITraceableContract } from "./ITraceableContract"; + +import TokenERC20Contract from "./tokenERC20"; +import { SATPContractInterface } from "./satp-contract-interface"; + +@Info({ + title: "SATPContract", + description: "SATP ERC20 contract for trading asset", +}) +export class SATPContract + extends TokenERC20Contract + implements ITraceableContract, SATPContractInterface +{ + constructor() { + super("SATP-token"); + } + + @Transaction() + public async InitToken( + ctx: Context, + owner: string, + id: string, + ): Promise { + await super.Initialize(ctx, "SATPContract", "SATP", "2"); + + await ctx.stub.putState("ID", Buffer.from(id)); + await ctx.stub.putState("owner", Buffer.from(owner)); + return true; + } + + @Transaction() + public async setBridge(ctx: Context, bridge: string): Promise { + this.checkPermission(ctx); + await ctx.stub.putState("bridge", Buffer.from(bridge)); + return true; + } + + @Transaction(false) + @Returns("string") + public async GetAllAssetsKey(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + allResults.push(result.value.key); + result = await iterator.next(); + } + return allResults.toString(); + } + + // GetAllTxByKey returns all transations for a specific key. + @Transaction(false) + @Returns("string") + public async GetAllTxByKey(ctx: Context, key: string): Promise { + const allResults = []; + const iterator = await ctx.stub.getHistoryForKey(key); + let result = await iterator.next(); + while (!result.done) { + const strValue = JSON.stringify(result); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + @Transaction() + public async mint(ctx: Context, amount: string): Promise { + this.checkPermission(ctx); + await super.Mint(ctx, amount); + return true; + } + + @Transaction() + public async burn(ctx: Context, amount: string): Promise { + this.checkPermission(ctx); + await this.Burn(ctx, amount); + return true; + } + + @Transaction() + public async assign( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + const clientID = await ctx.clientIdentity.getID(); + + if (from !== clientID) { + throw new Error( + `client is not authorized to perform the operation. ${clientID} != ${from}`, + ); + } + await this._transfer(ctx, from, to, amount); + return true; + } + + @Transaction() + public async transferFrom( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + await this.TransferFrom(ctx, from, to, amount); + return true; + } + + @Transaction() + public async transfer( + ctx: Context, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + await this.Transfer(ctx, to, amount); + return true; + } + + private async checkPermission(ctx: Context) { + let owner = await ctx.stub.getState("owner"); + let bridge = await ctx.stub.getState("bridge"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + } + + @Transaction() + public async hasPermission( + ctx: Context, + clientMSPID: string, + ): Promise { + let owner = await ctx.stub.getState("owner"); + let bridge = await ctx.stub.getState("bridge"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + return true; + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts new file mode 100644 index 0000000000..4ae3089c5f --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts @@ -0,0 +1,565 @@ +import { Context, Contract, Transaction } from "fabric-contract-api"; + +// Define objectType names for prefix +const balancePrefix: string = "balance"; +const allowancePrefix: string = "allowance"; + +// Define key names for options +const nameKey: string = "name"; +const symbolKey: string = "symbol"; +const decimalsKey: string = "decimals"; +const totalSupplyKey: string = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals: number = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply: number = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx: Context, owner: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + owner, + ]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx: Context, to: string, value: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from: string = ctx.clientIdentity.getID(); + + const transferResp: boolean = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom( + ctx: Context, + from: string, + to: string, + value: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender: string = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance: number = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt: number = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp: boolean = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance: number = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer( + ctx: Context, + from: string, + to: string, + value: string, + ): Promise { + if (from === to) { + throw new Error("cannot transfer to and from same client account"); + } + + // Convert value from string to int + const valueInt: number = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + from, + ]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance: number = parseInt( + fromCurrentBalanceBytes.toString(), + ); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recepient + const toBalanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + to, + ]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance: number; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance: number = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance: number = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + @Transaction(true) + async Approve( + ctx: Context, + spender: string, + value: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner: string = ctx.clientIdentity.getID(); + + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const valueInt: number = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance( + ctx: Context, + owner: string, + spender: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance: number = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize( + ctx: Context, + name: string, + symbol: string, + decimals: string, + ): Promise { + // Check contract options are not already set, client is not authorized to change them once intitialized + const nameBytes = await ctx.stub.getState(nameKey); + console.log("nameBytes: ", nameBytes); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + @Transaction(true) + async Mint(ctx: Context, amount: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const minter: string = ctx.clientIdentity.getID(); + + const amountInt: number = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + minter, + ]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance: number; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance: number = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply: number; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx: Context, amount: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter: string = ctx.clientIdentity.getID(); + + const amountInt: number = parseInt(amount); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + minter, + ]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance: number = parseInt(currentBalanceBytes.toString()); + const updatedBalance: number = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply: number = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + @Transaction(false) + async ClientAccountBalance(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * ClientIDAccountBalance returns the balance of the given client's account. + * The clientID must be a valid clientID as returned by the ClientAccountID() function. + * */ + @Transaction(false) + async ClientIDAccountBalance(ctx: Context, id: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [id]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${id} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + return clientAccountID; + } + + // Checks that contract options have been already initialized + async CheckInitialized(ctx: Context): Promise { + const nameBytes = await ctx.stub.getState(nameKey); + + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + // add two number checking for overflow + add(a: number, b: number): number { + const c: number = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a: number, b: number): number { + const c: number = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } +} + +export default TokenERC20Contract; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts new file mode 100644 index 0000000000..95daf7b306 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts @@ -0,0 +1,230 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { SATPContract } from "./../src/satp-contract"; + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import sinon from "sinon"; +import sinonChai from "sinon-chai"; +import { expect } from "chai"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +describe("SATPContract", () => { + let contract: SATPContract; + let sandbox; + let ctx; + + beforeEach(async () => { + sandbox = sinon.createSandbox(); + contract = new SATPContract(); + ctx = sinon.createStubInstance(ChaincodeStub); + ctx.stub = sinon.createStubInstance(ChaincodeStub); + ctx.clientIdentity = sinon.createStubInstance(ClientIdentity); + + ctx.clientIdentity.getMSPID.returns("Org1MSP"); + ctx.stub.getState.withArgs("owner").resolves("Org1MSP"); + ctx.stub.getState.withArgs("bridge").resolves("bridge"); + + await contract.InitToken(ctx, "Org1MSP"); + ctx.stub.getState.withArgs("name").resolves("SATPContract"); + }); + + afterEach(() => { + sandbox.restore(); + }); + + describe("#mint", () => { + it("should add token to a new account and a new total supply", async () => { + ctx.clientIdentity.getID.returns("Org1MSP"); + ctx.stub.createCompositeKey.returns("balance_Org1MSP"); + ctx.stub.getState.withArgs("balance_Org1MSP").resolves(null); + ctx.stub.getState.withArgs("totalSupply").resolves(null); + + const response = await contract.mint(ctx, 1000); + + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Org1MSP", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#burn", () => { + it("should work", async () => { + ctx.clientIdentity.getID.returns("Org1MSP"); + ctx.stub.createCompositeKey.returns("balance_Org1MSP"); + ctx.stub.getState + .withArgs("balance_Org1MSP") + .resolves(Buffer.from("1000")); + ctx.stub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await contract.burn(ctx, 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Org1MSP", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#assign", () => { + it("should fail when the sender and the recipient are the same", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + await expect( + contract.assign(ctx, "bridge", "bridge", 1000), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the message sender does not have permition", async () => { + ctx.clientIdentity.getMSPID.returns("attacker"); + await expect( + contract.assign(ctx, "bridge", "attacker", 1000), + ).to.be.rejectedWith( + Error, + "client is not authorized to perform the operation. attacker", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState.withArgs("balance_bridge").resolves(Buffer.from("500")); + + await expect( + contract.assign(ctx, "bridge", "Alice", 1000), + ).to.be.rejectedWith( + Error, + "client account bridge has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState + .withArgs("balance_bridge") + .resolves(Buffer.from("1000")); + + ctx.stub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + ctx.stub.getState.withArgs("balance_Bob").resolves(null); + + const response = await contract.assign(ctx, "bridge", "Bob", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_bridge", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState + .withArgs("balance_bridge") + .resolves(Buffer.from("1000")); + + ctx.stub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + ctx.stub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await contract.assign(ctx, "bridge", "Bob", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_bridge", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + describe("#transfer", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.clientIdentity.getID.returns("bridge"); + + ctx.stub.createCompositeKey + .withArgs("allowance", ["owner", "bridge"]) + .returns("allowance_owner_bridge"); + ctx.stub.getState + .withArgs("allowance_owner_bridge") + .resolves(Buffer.from("0")); + + await expect( + contract.transfer(ctx, "owner", "bridge", 1000), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.clientIdentity.getID.returns("bridge"); + + ctx.stub.createCompositeKey + .withArgs("allowance", ["owner", "bridge"]) + .returns("allowance_owner_bridge"); + ctx.stub.getState + .withArgs("allowance_owner_bridge") + .resolves(Buffer.from("3000")); + + sinon.stub(contract, "_transfer").resolves(true); + + const response = await contract.transfer(ctx, "owner", "bridge", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "allowance_owner_bridge", + Buffer.from("2000"), + ); + const event = { from: "owner", to: "bridge", value: 1000 }; + sinon.assert.calledWith( + ctx.stub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js new file mode 100644 index 0000000000..0f11a84957 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js @@ -0,0 +1,397 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Context } = require("fabric-contract-api"); +const { ChaincodeStub, ClientIdentity } = require("fabric-shim"); + +const { TokenERC20Contract } = require("../lib/tokenERC20"); + +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +const sinon = require("sinon"); +const expect = chai.expect; + +chai.should(); +chai.use(chaiAsPromised); + +describe("Chaincode", () => { + let sandbox; + let token; + let ctx; + let mockStub; + let mockClientIdentity; + + beforeEach("Sandbox creation", async () => { + sandbox = sinon.createSandbox(); + token = new TokenERC20Contract("token-erc20"); + + ctx = sinon.createStubInstance(Context); + mockStub = sinon.createStubInstance(ChaincodeStub); + ctx.stub = mockStub; + mockClientIdentity = sinon.createStubInstance(ClientIdentity); + ctx.clientIdentity = mockClientIdentity; + + await token.Initialize(ctx, "some name", "some symbol", "2"); + + mockStub.putState.resolves("some state"); + mockStub.setEvent.returns("set event"); + }); + + afterEach("Sandbox restoration", () => { + sandbox.restore(); + }); + + describe("#TokenName", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.TokenName(ctx); + sinon.assert.calledWith(mockStub.getState, "name"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Symbol", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.Symbol(ctx); + sinon.assert.calledWith(mockStub.getState, "symbol"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Decimals", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("2")); + + const response = await token.Decimals(ctx); + sinon.assert.calledWith(mockStub.getState, "decimals"); + expect(response).to.equals(2); + }); + }); + + describe("#TotalSupply", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("10000")); + + const response = await token.TotalSupply(ctx); + sinon.assert.calledWith(mockStub.getState, "totalSupply"); + expect(response).to.equals(10000); + }); + }); + + describe("#BalanceOf", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.BalanceOf(ctx, "Alice"); + expect(response).to.equals(1000); + }); + }); + + describe("#_transfer", () => { + it("should fail when the sender and the receipient are the same", async () => { + await expect( + token._transfer(ctx, "Alice", "Alice", "1000"), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("500")); + + await expect( + token._transfer(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "client account Alice has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(null); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Transfer", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + sinon.stub(token, "_transfer").returns(true); + + const response = await token.Transfer(ctx, "Bob", "1000"); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#TransferFrom", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("0")); + + await expect( + token.TransferFrom(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("3000")); + + sinon.stub(token, "_transfer").returns(true); + + const response = await token.TransferFrom(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Alice_Charlie", + Buffer.from("2000"), + ); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Approve", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Dave"); + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + + const response = await token.Approve(ctx, "Ellen", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Dave_Eve", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Allowance", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.Allowance(ctx, "Dave", "Eve"); + expect(response).to.equals(1000); + }); + }); + + describe("#Initialize", () => { + it("should work", async () => { + // We consider it has already been initialized in the before-each statement + sinon.assert.calledWith( + mockStub.putState, + "name", + Buffer.from("some name"), + ); + sinon.assert.calledWith( + mockStub.putState, + "symbol", + Buffer.from("some symbol"), + ); + sinon.assert.calledWith(mockStub.putState, "decimals", Buffer.from("2")); + }); + + it("should failed if called a second time", async () => { + // We consider it has already been initialized in the before-each statement + await expect( + await token.Initialize(ctx, "some name", "some symbol", "2"), + ).to.be.rejectedWith( + Error, + "contract options are already set, client is not authorized to change them", + ); + }); + }); + + describe("#Mint", () => { + it("should add token to a new account and a new total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(null); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to the existing account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("2000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to a new account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Burn", () => { + it("should work", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Burn(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#ClientAccountBalance", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.ClientAccountBalance(ctx); + expect(response).to.equals(1000); + }); + }); + + describe("#ClientAccountID", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("x509::{subject DN}::{issuer DN}"); + + const response = await token.ClientAccountID(ctx); + sinon.assert.calledOnce(mockClientIdentity.getID); + expect(response).to.equals("x509::{subject DN}::{issuer DN}"); + }); + }); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/tsconfig.json new file mode 100644 index 0000000000..a1c5ccb234 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "target": "es2017", + "moduleResolution": "node", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "skipLibCheck": true, + }, + "include": [ + "./src/**/*" + ], + "exclude": [ + "./src/**/*.test.ts" + ] +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/yarn.lock b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/yarn.lock new file mode 100644 index 0000000000..8e3447999e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/yarn.lock @@ -0,0 +1,3747 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/code-frame@npm:7.24.2" + dependencies: + "@babel/highlight": "npm:^7.24.2" + picocolors: "npm:^1.0.0" + checksum: 10/7db8f5b36ffa3f47a37f58f61e3d130b9ecad21961f3eede7e2a4ac2c7e4a5efb6e9d03a810c669bc986096831b6c0dfc2c3082673d93351b82359c1b03e0590 + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.23.5": + version: 7.24.4 + resolution: "@babel/compat-data@npm:7.24.4" + checksum: 10/e51faec0ac8259f03cc5029d2b4a944b4fee44cb5188c11530769d5beb81f384d031dba951febc3e33dbb48ceb8045b1184f5c1ac4c5f86ab1f5e951e9aaf7af + languageName: node + linkType: hard + +"@babel/core@npm:^7.7.5": + version: 7.24.5 + resolution: "@babel/core@npm:7.24.5" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" + "@babel/helper-compilation-targets": "npm:^7.23.6" + "@babel/helper-module-transforms": "npm:^7.24.5" + "@babel/helpers": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/b0d02c51f39cc4c6f8fcaab7052d17dea63aab36d7e2567bfbad074e5a027df737ebcaf3029c3a659bc719bbac806311c2e8786be1d686abd093c48a6068395c + languageName: node + linkType: hard + +"@babel/generator@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/generator@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/7a3782f1d2f824025a538444a0fce44f5b30a7b013984279561bcb3450eec91a41526533fd0b25b1a6fde627bebd0e645c0ea2aa907cc15c7f3da2d9eb71f069 + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-compilation-targets@npm:7.23.6" + dependencies: + "@babel/compat-data": "npm:^7.23.5" + "@babel/helper-validator-option": "npm:^7.23.5" + browserslist: "npm:^4.22.2" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 + languageName: node + linkType: hard + +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": "npm:^7.22.15" + "@babel/types": "npm:^7.23.0" + checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d + languageName: node + linkType: hard + +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" + dependencies: + "@babel/types": "npm:^7.22.5" + checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.24.3": + version: 7.24.3 + resolution: "@babel/helper-module-imports@npm:7.24.3" + dependencies: + "@babel/types": "npm:^7.24.0" + checksum: 10/42fe124130b78eeb4bb6af8c094aa749712be0f4606f46716ce74bc18a5ea91c918c547c8bb2307a2e4b33f163e4ad2cb6a7b45f80448e624eae45b597ea3499 + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-module-transforms@npm:7.24.5" + dependencies: + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-module-imports": "npm:^7.24.3" + "@babel/helper-simple-access": "npm:^7.24.5" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/helper-validator-identifier": "npm:^7.24.5" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/1a91e8abc2f427f8273ce3b99ef7b9c013eb3628221428553e0d4bc9c6db2e73bc4fc1b8535bd258544936accab9380e0d095f2449f913cad650ddee744b2124 + languageName: node + linkType: hard + +"@babel/helper-simple-access@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-simple-access@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10/db8768a16592faa1bde9061cac3d903bdbb2ddb2a7e9fb73c5904daee1f1b1dc69ba4d249dc22c45885c0d4b54fd0356ee78e6d67a9a90330c7dd37e6cd3acff + languageName: node + linkType: hard + +"@babel/helper-split-export-declaration@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-split-export-declaration@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10/84777b6304ef0fe6501038985b61aaa118082688aa54eca8265f14f3ae2e01adf137e9111f4eb9870e0e9bc23901e0b8859bb2a9e4362ddf89d05e1c409c2422 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/helper-string-parser@npm:7.24.1" + checksum: 10/04c0ede77b908b43e6124753b48bc485528112a9335f0a21a226bff1ace75bb6e64fab24c85cb4b1610ef3494dacd1cb807caeb6b79a7b36c43d48c289b35949 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-string-parser@npm:7.24.7" + checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-validator-identifier@npm:7.24.5" + checksum: 10/38aaf6a64a0ea2e84766165b461deda3c24fd2173dff18419a2cc9e1ea1d3e709039aee94db29433a07011492717c80900a5eb564cdca7d137757c3c69e26898 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 10/537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helpers@npm:7.24.5" + dependencies: + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + checksum: 10/efd74325823c70a32aa9f5e263c8eb0a1f729f5e9ea168e3226fa92a10b1702593b76034812e9f7b560d6447f9cd446bad231d7086af842129c6596306300094 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.24.2": + version: 7.24.5 + resolution: "@babel/highlight@npm:7.24.5" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.5" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/afde0403154ad69ecd58a98903058e776760444bf4d0363fb740a8596bc6278b72c5226637c4f6b3674d70acb1665207fe2fcecfe93a74f2f4ab033e89fd7e8c + languageName: node + linkType: hard + +"@babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/parser@npm:7.24.5" + bin: + parser: ./bin/babel-parser.js + checksum: 10/f5ed1c5fd4b0045a364fb906f54fd30e2fff93a45069068b6d80d3ab2b64f5569c90fb41d39aff80fb7e925ca4d44917965a76776a3ca11924ec1fae3be5d1ea + languageName: node + linkType: hard + +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/template@npm:7.24.0" + dependencies: + "@babel/code-frame": "npm:^7.23.5" + "@babel/parser": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" + checksum: 10/8c538338c7de8fac8ada691a5a812bdcbd60bd4a4eb5adae2cc9ee19773e8fb1a724312a00af9e1ce49056ffd3c3475e7287b5668cf6360bfb3f8ac827a06ffe + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/traverse@npm:7.24.5" + dependencies: + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-function-name": "npm:^7.23.0" + "@babel/helper-hoist-variables": "npm:^7.22.5" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/e237de56e0c30795293fdb6f2cb09a75e6230836e3dc67dc4fa21781eb4d5842996bf3af95bc57ac5c7e6e97d06446f14732d0952eb57d5d9643de7c4f95bee6 + languageName: node + linkType: hard + +"@babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/types@npm:7.24.5" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.1" + "@babel/helper-validator-identifier": "npm:^7.24.5" + to-fast-properties: "npm:^2.0.0" + checksum: 10/259e7512476ae64830e73f2addf143159232bcbf0eba6a6a27cab25a960cd353a11c826eb54185fdf7d8d9865922cbcd6522149e9ec55b967131193f9c9111a1 + languageName: node + linkType: hard + +"@babel/types@npm:^7.8.3": + version: 7.24.7 + resolution: "@babel/types@npm:7.24.7" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/ad3c8c0d6fb4acb0bb74bb5b4bb849b181bf6185677ef9c59c18856c81e43628d0858253cf232f0eca806f02e08eff85a1d3e636a3e94daea737597796b0b430 + languageName: node + linkType: hard + +"@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + +"@dabh/diagnostics@npm:^2.0.2": + version: 2.0.3 + resolution: "@dabh/diagnostics@npm:2.0.3" + dependencies: + colorspace: "npm:1.1.x" + enabled: "npm:2.0.x" + kuler: "npm:^2.0.0" + checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 + languageName: node + linkType: hard + +"@fidm/asn1@npm:^1.0.4": + version: 1.0.4 + resolution: "@fidm/asn1@npm:1.0.4" + checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f + languageName: node + linkType: hard + +"@fidm/x509@npm:^1.2.1": + version: 1.2.1 + resolution: "@fidm/x509@npm:1.2.1" + dependencies: + "@fidm/asn1": "npm:^1.0.4" + tweetnacl: "npm:^1.0.1" + checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 + languageName: node + linkType: hard + +"@grpc/grpc-js@npm:^1.4.1": + version: 1.10.9 + resolution: "@grpc/grpc-js@npm:1.10.9" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/8991a997798f19ae849d0f274280f5fdba981048f77211744a301e22207620bb24661d0dfaea51ee6259c5c8e6c159b62fe2499c879d9f14decf20957c219124 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.6.6": + version: 0.6.13 + resolution: "@grpc/proto-loader@npm:0.6.13" + dependencies: + "@types/long": "npm:^4.0.1" + lodash.camelcase: "npm:^4.3.0" + long: "npm:^4.0.0" + protobufjs: "npm:^6.11.3" + yargs: "npm:^16.2.0" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/a881bea00a1ab1c8d50e4bdf106c7e74f905121116fbcda91b9688548da1267edf1302bb754164a6f60ece82a949a28cefc503bfe058ffc1531dc26fa5188df3 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" + dependencies: + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: 10/89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 + languageName: node + linkType: hard + +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 + languageName: node + linkType: hard + +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 + languageName: node + linkType: hard + +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 + languageName: node + linkType: hard + +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 + languageName: node + linkType: hard + +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 + languageName: node + linkType: hard + +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 + languageName: node + linkType: hard + +"@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 + languageName: node + linkType: hard + +"@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": + version: 1.8.6 + resolution: "@sinonjs/commons@npm:1.8.6" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^6.0.0, @sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395 + languageName: node + linkType: hard + +"@sinonjs/samsam@npm:^5.3.1": + version: 5.3.1 + resolution: "@sinonjs/samsam@npm:5.3.1" + dependencies: + "@sinonjs/commons": "npm:^1.6.0" + lodash.get: "npm:^4.4.2" + type-detect: "npm:^4.0.8" + checksum: 10/6850b9980f042a844072a34ce3ca80b098d4550c8c7a83b2b2e7beb1e06ad19608699544b7a8b0c7db882528d8b74321dfd185d0651cff08cbe793cb73dd39d3 + languageName: node + linkType: hard + +"@sinonjs/text-encoding@npm:^0.7.1": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 + languageName: node + linkType: hard + +"@types/chai-as-promised@npm:^7.1.2": + version: 7.1.8 + resolution: "@types/chai-as-promised@npm:7.1.8" + dependencies: + "@types/chai": "npm:*" + checksum: 10/88e2d42f14d1de19ba1c7b5c35f263fef37d3ad241c71f5eb59b10763706f3902f4131b93854c9c6ed520081c7e36be555849f202418357f905bea71178b7d02 + languageName: node + linkType: hard + +"@types/chai@npm:*, @types/chai@npm:^4.2.11": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: 10/f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f + languageName: node + linkType: hard + +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: 10/68afa05fb20949d88345876148a76f6ccff5433310e720db51ac5ca21cb8cc6714286dbe04713840ddbd25a8b56b7a23aa87d08472fabf06463a6f2ed4967707 + languageName: node + linkType: hard + +"@types/mocha@npm:^7.0.2": + version: 7.0.2 + resolution: "@types/mocha@npm:7.0.2" + checksum: 10/8d9cfcd2fcaf0dcd4840c2f54e737e88b3999c334b363b0ed184db40e765da20befa8281211b351d213781231a2372bfb4ca043e9ee8188885bf7be83c2928fd + languageName: node + linkType: hard + +"@types/node@npm:18.11.9, @types/node@npm:>=13.7.0": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae + languageName: node + linkType: hard + +"@types/node@npm:^16.11.1": + version: 16.18.97 + resolution: "@types/node@npm:16.18.97" + checksum: 10/c7ffc135852b658ab6737f818492cab4f43a1c092ad4b032dd591c0ab2f66781191df4ddd08ba91436d7ee64c259987f94da8fa97e3b7d8d0fd5dae6f2775c26 + languageName: node + linkType: hard + +"@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + +"@types/sinon@npm:*, @types/sinon@npm:^7.5.2": + version: 7.5.2 + resolution: "@types/sinon@npm:7.5.2" + checksum: 10/66163c371dd84f1c485ae4c60401e4cfdb376974c85d91123dcc8c38334ecc4909c4ae9ffc5008bf0f5212593c7d91f70f460963c01510d2dfe93a689fc8e9ea + languageName: node + linkType: hard + +"@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + +"@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 10/ee8fe811becd830f5e276ec63469ec66c22503eb140064580e712c9fccadfd54157c462188640ba6765d5c21f829e7120eb37afb5ead512684b9a1ab86d2db66 + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv@npm:^6.12.2": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 + languageName: node + linkType: hard + +"archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 + languageName: node + linkType: hard + +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + +"async@npm:^3.2.3": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 + languageName: node + linkType: hard + +"browserslist@npm:^4.22.2": + version: 4.23.0 + resolution: "browserslist@npm:4.23.0" + dependencies: + caniuse-lite: "npm:^1.0.30001587" + electron-to-chromium: "npm:^1.4.668" + node-releases: "npm:^2.0.14" + update-browserslist-db: "npm:^1.0.13" + bin: + browserslist: cli.js + checksum: 10/496c3862df74565dd942b4ae65f502c575cbeba1fa4a3894dad7aa3b16130dc3033bc502d8848147f7b625154a284708253d9598bcdbef5a1e34cf11dc7bad8e + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"builtin-modules@npm:^1.1.1": + version: 1.1.1 + resolution: "builtin-modules@npm:1.1.1" + checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.3 + resolution: "cacache@npm:18.0.3" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/d4c161f071524bb636334b8cf94780c014e29c180a886b8184da8f2f44d2aca88d5664797c661e9f74bdbd34697c2f231ed7c24c256cecbb0a0563ad1ada2219 + languageName: node + linkType: hard + +"caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" + dependencies: + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"camelcase@npm:^6.0.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001587": + version: 1.0.30001621 + resolution: "caniuse-lite@npm:1.0.30001621" + checksum: 10/238187b8565edd98b041829a4157ff23406e8b573a8f5a7f7d75fd6bd46c508e4d1a07eb4a0086cfa1bce2f45fcd3b08ea7ffc36584ef2b1d38f8215b7301853 + languageName: node + linkType: hard + +"chai-as-promised@npm:^7.1.1": + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" + dependencies: + check-error: "npm:^1.0.2" + peerDependencies: + chai: ">= 2.1.2 < 6" + checksum: 10/be372540dad92ef85cde3954bc0e9b0b33e4e6454f3740b17bfb16e36eda638911619089c05a4e4f2bf6722563bf893bb78c2af59b318c23abb2199e5c20ca1f + languageName: node + linkType: hard + +"chai@npm:^4.2.0": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 10/c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae + languageName: node + linkType: hard + +"chalk@npm:^2.3.0, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + +"chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + +"check-error@npm:^1.0.2, check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + +"chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"class-transformer@npm:^0.4.0": + version: 0.4.0 + resolution: "class-transformer@npm:0.4.0" + checksum: 10/4751bbcf0ec8a754053eca1cce2e6d883a8fc7d400fac32368b18f05353e22e8415f7223a53daa35705e6d690516f221ec1c46e68c7ad731e31c4f8e46101fb8 + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + +"color-name@npm:1.1.3, color-name@npm:^1.0.0": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"color-string@npm:^1.6.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + +"color@npm:^3.1.3": + version: 3.2.1 + resolution: "color@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.3" + color-string: "npm:^1.6.0" + checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae + languageName: node + linkType: hard + +"colorspace@npm:1.1.x": + version: 1.1.4 + resolution: "colorspace@npm:1.1.4" + dependencies: + color: "npm:^3.1.3" + text-hex: "npm:1.0.x" + checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 + languageName: node + linkType: hard + +"commander@npm:^2.12.1": + version: 2.15.1 + resolution: "commander@npm:2.15.1" + checksum: 10/6f4545833348d61dd0c3b285c7f0dc9bc8b1bdac38b512d263184918811382c646c38d58c1102caeff0eb57d4bbd526efc5e6116a78b6af7c1aad6fb628678a8 + languageName: node + linkType: hard + +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + +"convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 + languageName: node + linkType: hard + +"debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/723a9570dcd15d146ea4992f0dca12467d1b00f534abb42473df166d36826fcae8bab045aef59ac2f407b47a23266110bc0e646df8ac82f7800c11384f82050e + languageName: node + linkType: hard + +"debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/0073c3bcbd9cb7d71dd5f6b55be8701af42df3e56e911186dfa46fac3a5b9eb7ce7f377dd1d3be6db8977221f8eb333d945216f645cf56f6b688cd484837d255 + languageName: node + linkType: hard + +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 10/12ce93ae63de187e77b076d3d51bfc28b11f98910a22c18714cce112791195e86a94f97788180994614b14562a86c9763f67c69f785e4586f806b5df39bf9301 + languageName: node + linkType: hard + +"default-require-extensions@npm:^3.0.0": + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" + dependencies: + strip-bom: "npm:^4.0.0" + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 + languageName: node + linkType: hard + +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c + languageName: node + linkType: hard + +"diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.4.668": + version: 1.4.782 + resolution: "electron-to-chromium@npm:1.4.782" + checksum: 10/d5550876e4ee04df75e3bf6e0809de2b8d6129dd1ef3a8508020c0620bc814c496b5852b3a99cfe1bb79662c8dd5182ae18844af089414e6e92790d5deeea864 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + +"enabled@npm:2.0.x": + version: 2.0.0 + resolution: "enabled@npm:2.0.0" + checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + +"es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + languageName: node + linkType: hard + +"escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd + languageName: node + linkType: hard + +"fabric-contract-api@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-contract-api@npm:2.4.1" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.4.1" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.3" + checksum: 10/3708814be206f3130e0264bc591a67a2ed631b9979af3e7589ca7b8e61c8f098a6fae0acb931f5211c8346a728e0f8d112671a20fd9ecdafbe48695b082e1226 + languageName: node + linkType: hard + +"fabric-contract-api@npm:^2.4.1": + version: 2.5.4 + resolution: "fabric-contract-api@npm:2.5.4" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.5.4" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + checksum: 10/09001db44761f9afa50ba8af7f0740fd7a33bce0a6e4ee597767169f2b187f13a13d2a1713400f42e3eaf53c999fd0ae0d07619faf6da8344efbe6a6e9ffc4bb + languageName: node + linkType: hard + +"fabric-shim-api@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-shim-api@npm:2.4.1" + checksum: 10/fa344ba5d45faafaccff05be21fb822ba39e3fd93fdaaafe8790d579e136f17795f6438a7fb399e2b40126f8d45cfd2596bdebe606743e6920851958ed6f856b + languageName: node + linkType: hard + +"fabric-shim-api@npm:2.5.4": + version: 2.5.4 + resolution: "fabric-shim-api@npm:2.5.4" + checksum: 10/aee691043d245a99dd8c8dd44ca7e29feb2de60e44bcc572050bfefa17a8e64d978c8264308d4ce079e5f1ec3779e58d962af9adc52bdeb0b579fe857b4bacad + languageName: node + linkType: hard + +"fabric-shim@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-shim@npm:2.4.1" + dependencies: + "@fidm/x509": "npm:^1.2.1" + "@grpc/grpc-js": "npm:^1.4.1" + "@grpc/proto-loader": "npm:^0.6.6" + "@types/node": "npm:^16.11.1" + ajv: "npm:^6.12.2" + fabric-contract-api: "npm:2.4.1" + fabric-shim-api: "npm:2.4.1" + fs-extra: "npm:^10.0.0" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.3" + yargs: "npm:^17.2.1" + yargs-parser: "npm:^20.2.9" + bin: + fabric-chaincode-node: cli.js + checksum: 10/5684f966fdfff43d5f9d45598445be5232f015a702b1cadfc6d82d701d524db8cfffc174376aca13cc15fe9377b0942422fa7d299fd6c4fc9af8e8017a88276f + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + +"fast-safe-stringify@npm:^2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 + languageName: node + linkType: hard + +"fecha@npm:^4.2.0": + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + +"find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 + languageName: node + linkType: hard + +"find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + +"fn.name@npm:1.x.x": + version: 1.1.0 + resolution: "fn.name@npm:1.1.0" + checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 + languageName: node + linkType: hard + +"foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/77b33b3c438a499201727ca84de39a66350ccd54a8805df712773e963cefb5c4632dbc4386109e97a0df8fb1585aee95fa35acb07587e3e04cfacabfc0ae15dc + languageName: node + linkType: hard + +"fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be + languageName: node + linkType: hard + +"fs-extra@npm:^10.0.0": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/05ce2c3b59049bcb7b52001acd000e44b3c4af4ec1f8839f383ef41ec0048e3cfa7fd8a637b1bddfefad319145db89be91f4b7c1db2908205d38bf91e7d1d3b7 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 10/3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + +"get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + +"glob@npm:7.2.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.2 + resolution: "glob@npm:10.4.2" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 + languageName: node + linkType: hard + +"glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 10/1391a9add951964de566adc0aee8b0e2b2321e768c1fdccb7a8e156d6a6cd7ea72782883ba8c2c307baf524e3059519423b72e585eba5e7a5f6e83a1e2359b0d + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" + dependencies: + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a + languageName: node + linkType: hard + +"hasown@npm:^2.0.0": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.4 + resolution: "https-proxy-agent@npm:7.0.4" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + +"is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: "npm:^2.0.0" + checksum: 10/d53bd0cc24b0a0351fb4b206ee3908f71b9bbf1c47e9c9e14e5f06d292af1663704d2abd7e67700d6487b2b7864e0d0f6f10a1edf1892864bdffcb197d1845a2 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + +"istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" + dependencies: + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" + dependencies: + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 + languageName: node + linkType: hard + +"istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.0.2": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.0 + resolution: "jackspeak@npm:3.4.0" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b + languageName: node + linkType: hard + +"js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + +"js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" + dependencies: + graceful-fs: "npm:^4.1.6" + universalify: "npm:^2.0.0" + dependenciesMeta: + graceful-fs: + optional: true + checksum: 10/03014769e7dc77d4cf05fa0b534907270b60890085dd5e4d60a382ff09328580651da0b8b4cdf44d91e4c8ae64d91791d965f05707beff000ed494a38b6fec85 + languageName: node + linkType: hard + +"just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 + languageName: node + linkType: hard + +"kuler@npm:^2.0.0": + version: 2.0.0 + resolution: "kuler@npm:2.0.0" + checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 + languageName: node + linkType: hard + +"lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 + languageName: node + linkType: hard + +"lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 + languageName: node + linkType: hard + +"log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"logform@npm:^2.3.2, logform@npm:^2.4.0": + version: 2.6.0 + resolution: "logform@npm:2.6.0" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/92de5696a529a7ccf4359fe65a21fce2398ba20c4b4e5769cba187b8fde01d590a22d3c83f797d31b436f49770fb1b2f28646e7c881d30b8d1f4080a05ae7006 + languageName: node + linkType: hard + +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 10/8296e2ba7bab30f9cfabb81ebccff89c819af6a7a78b4bb5a70ea411aa764ee0532f7441381549dfa6a1a98d72abe9138bfcf99f4fa41238629849bc035b845b + languageName: node + linkType: hard + +"long@npm:^5.0.0": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 + languageName: node + linkType: hard + +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: 10/ff1a496d30b5eaec2c9079080965bb0cede203cf878371f7033a007f1e54cd4aa13cc8abf7ccec4c994a83a22ed5476e83a55bb57cc07e6c1547a42937e42c37 + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + +"make-dir@npm:^3.0.0, make-dir@npm:^3.0.2": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 + languageName: node + linkType: hard + +"minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/27e49fb720116face9588c29634404edc0c6677e5448ba01b4ec6179002461cc4fabc842497a0537edc5aa87bc93e65cfb0fe6dc32b850563429a64836dd1d54 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.4 + resolution: "minimatch@npm:9.0.4" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/4cdc18d112b164084513e890d6323370db14c22249d536ad1854539577a895e690a27513dc346392f61a4a50afbbd8abc88f3f25558bfbbbb862cd56508b20f5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.3": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: "npm:^1.2.6" + bin: + mkdirp: bin/cmd.js + checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + +"mocha@npm:^9.2.0": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": "npm:1.1.2" + ansi-colors: "npm:4.1.1" + browser-stdout: "npm:1.3.1" + chokidar: "npm:3.5.3" + debug: "npm:4.3.3" + diff: "npm:5.0.0" + escape-string-regexp: "npm:4.0.0" + find-up: "npm:5.0.0" + glob: "npm:7.2.0" + growl: "npm:1.10.5" + he: "npm:1.2.0" + js-yaml: "npm:4.1.0" + log-symbols: "npm:4.1.0" + minimatch: "npm:4.2.1" + ms: "npm:2.1.3" + nanoid: "npm:3.3.1" + serialize-javascript: "npm:6.0.0" + strip-json-comments: "npm:3.1.1" + supports-color: "npm:8.1.1" + which: "npm:2.0.2" + workerpool: "npm:6.2.0" + yargs: "npm:16.2.0" + yargs-parser: "npm:20.2.4" + yargs-unparser: "npm:2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 10/8ee58bff8694ad4013fc0fbb5670c5ec6d8404c601df2d4ae798fad01dd03b5f9395347cf59167006b315a14813a6f839290d60dcbdee8ef4246afe43609d2dc + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + +"nise@npm:^4.0.4": + version: 4.1.0 + resolution: "nise@npm:4.1.0" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + "@sinonjs/fake-timers": "npm:^6.0.0" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/ff7c2e316c8ae8327573417fefcc84070d9dcfa423b123d014d21db5f7de07580f76a85143c2f91eaf5f1a979f3f9a3721e3652753e58ddaa703aa8d65539b0b + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.1.0 + resolution: "node-gyp@npm:10.1.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.3.5" + tar: "npm:^6.1.2" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/89e105e495e66cd4568af3cf79cdeb67d670eb069e33163c7781d3366470a30367c9bd8dea59e46db16370020139e5bf78b1fbc03284cb571754dfaa59744db5 + languageName: node + linkType: hard + +"node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" + dependencies: + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab + languageName: node + linkType: hard + +"node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"nyc@npm:^15.0.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" + dependencies: + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"one-time@npm:^1.0.0": + version: 1.0.0 + resolution: "one-time@npm:1.0.0" + dependencies: + fn.name: "npm:1.x.x" + checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 + languageName: node + linkType: hard + +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"package-hash@npm:^4.0.0": + version: 4.0.0 + resolution: "package-hash@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + +"path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + languageName: node + linkType: hard + +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + +"pkg-dir@npm:^4.1.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + +"process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" + dependencies: + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + +"protobufjs@npm:^6.11.3": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/long": "npm:^4.0.1" + "@types/node": "npm:>=13.7.0" + long: "npm:^4.0.0" + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: 10/6b7fd7540d74350d65c38f69f398c9995ae019da070e79d9cd464a458c6d19b40b07c9a026be4e10704c824a344b603307745863310c50026ebd661ce4da0663 + languageName: node + linkType: hard + +"protobufjs@npm:^7.2.5": + version: 7.3.0 + resolution: "protobufjs@npm:7.3.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/aff4aa2a3a2f011accb51e23fcae122acbee35cb761abe51f799675a61ab39ad9a506911f307e0fdb9a1703bed1f522cfbdaafaeefd2b3aaca2ddc18f03029d9 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + +"readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + +"reflect-metadata@npm:^0.1.13": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + +"release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" + dependencies: + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + +"resolve@npm:^1.3.2": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.3.2#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + +"rimraf@npm:^3.0.0": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + +"safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + +"safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + +"satp-contract@workspace:.": + version: 0.0.0-use.local + resolution: "satp-contract@workspace:." + dependencies: + "@types/chai": "npm:^4.2.11" + "@types/chai-as-promised": "npm:^7.1.2" + "@types/mocha": "npm:^7.0.2" + "@types/node": "npm:18.11.9" + "@types/sinon": "npm:^7.5.2" + "@types/sinon-chai": "npm:^3.2.3" + chai: "npm:^4.2.0" + chai-as-promised: "npm:^7.1.1" + fabric-contract-api: "npm:^2.4.1" + fabric-shim: "npm:2.4.1" + mocha: "npm:^9.2.0" + nyc: "npm:^15.0.0" + sinon: "npm:^9.0.1" + sinon-chai: "npm:^3.5.0" + ts-node: "npm:^8.8.1" + tslint: "npm:^6.1.0" + typescript: "npm:5.3.3" + winston: "npm:^3.2.1" + languageName: unknown + linkType: soft + +"semver@npm:^5.3.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + +"semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.5.3": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 + languageName: node + linkType: hard + +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.2": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + +"simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + +"sinon-chai@npm:^3.5.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe + languageName: node + linkType: hard + +"sinon@npm:^9.0.1": + version: 9.2.4 + resolution: "sinon@npm:9.2.4" + dependencies: + "@sinonjs/commons": "npm:^1.8.1" + "@sinonjs/fake-timers": "npm:^6.0.1" + "@sinonjs/samsam": "npm:^5.3.1" + diff: "npm:^4.0.2" + nise: "npm:^4.0.4" + supports-color: "npm:^7.1.0" + checksum: 10/4597c12e2490b22aaae5fb1edca169a10e71dee73c13d2d12d6d9fa7f3bdbdb53ec5ad52c631c301fb3eab79471a30b05be65155c30ca415169470ea4789eae6 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.3 + resolution: "socks-proxy-agent@npm:8.0.3" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.7.1" + checksum: 10/c2112c66d6322e497d68e913c3780f3683237fd394bfd480b9283486a86e36095d0020db96145d88f8ccd9cc73261b98165b461f9c1bf5dc17abfe75c18029ce + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.17": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0, source-map@npm:^0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + +"spawn-wrap@npm:^2.0.0": + version: 2.0.0 + resolution: "spawn-wrap@npm:2.0.0" + dependencies: + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + languageName: node + linkType: hard + +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + languageName: node + linkType: hard + +"stack-trace@npm:0.0.x": + version: 0.0.10 + resolution: "stack-trace@npm:0.0.10" + checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + +"strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.4.0 + resolution: "supports-color@npm:5.4.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/11a1faa8e02c1c4f528cdfea6a41d4c823c0b9d7280e14684bbac554c6a32a1c800c0fcc5d148764a071fd94be5c2dbd301cd1fe95daa029296c4ef36ae62d01 + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 + languageName: node + linkType: hard + +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + +"text-hex@npm:1.0.x": + version: 1.0.0 + resolution: "text-hex@npm:1.0.0" + checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a + languageName: node + linkType: hard + +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + +"triple-beam@npm:^1.3.0": + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 + languageName: node + linkType: hard + +"ts-node@npm:^8.8.1": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/1431026e6e9e8971ecaba14fdf9960541918c0560344d95e4942b765dbd96d5648b99ca02a5090046130aa9870164b82ba8090a4eda048d19da3ad7aceeb0b49 + languageName: node + linkType: hard + +"tslib@npm:^1.13.0, tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb + languageName: node + linkType: hard + +"tslint@npm:^6.1.0": + version: 6.1.3 + resolution: "tslint@npm:6.1.3" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + builtin-modules: "npm:^1.1.1" + chalk: "npm:^2.3.0" + commander: "npm:^2.12.1" + diff: "npm:^4.0.1" + glob: "npm:^7.1.1" + js-yaml: "npm:^3.13.1" + minimatch: "npm:^3.0.4" + mkdirp: "npm:^0.5.3" + resolve: "npm:^1.3.2" + semver: "npm:^5.3.0" + tslib: "npm:^1.13.0" + tsutils: "npm:^2.29.0" + peerDependencies: + typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + bin: + tslint: bin/tslint + checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + languageName: node + linkType: hard + +"tsutils@npm:^2.29.0": + version: 2.29.0 + resolution: "tsutils@npm:2.29.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + languageName: node + linkType: hard + +"tweetnacl@npm:^1.0.1": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 + languageName: node + linkType: hard + +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + +"type-fest@npm:^0.8.0": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + +"typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 + languageName: node + linkType: hard + +"universalify@npm:^2.0.0": + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 10/ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.0.13": + version: 1.0.16 + resolution: "update-browserslist-db@npm:1.0.16" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/071bf0b2fb8568db6cd42ee2598ac9b87c794a7229fcbf1b035ae7f883e770c07143f16a5371525d5bcb94b99f9a1b279036142b0195ffd4cf5a0008fc4a500e + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"winston-transport@npm:^4.7.0": + version: 4.7.0 + resolution: "winston-transport@npm:4.7.0" + dependencies: + logform: "npm:^2.3.2" + readable-stream: "npm:^3.6.0" + triple-beam: "npm:^1.3.0" + checksum: 10/c8eae7b110e68396edcf26aec86608bd8ac98f3cc05961064e2e577b023d9c4aa485546cacba84efaf48b7d6b1e282dc211fd959ee16cbd31d34476d96daea43 + languageName: node + linkType: hard + +"winston@npm:^3.2.1, winston@npm:^3.3.3, winston@npm:^3.7.2": + version: 3.13.0 + resolution: "winston@npm:3.13.0" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.4.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/436675598359af27e4eabde2ce578cf77da893ffd57d0479f037fef939e8eb721031f0102b14399eee93b3412b545946c431d1fff23db3beeac2ffa395537f7b + languageName: node + linkType: hard + +"workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 10/c7dce6eae02098d70fe9924503bd95688564a1316cbb96fe55600f7ede0e66f1f2fea4d18aaec71fcee32373d17eda0bf87ac4dac8e5823e90ca1524aac90bdc + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/0d64f2d438e0b555e693b95aee7b2689a12c3be5ac458192a1ce28f542a6e9e59ddfecc37520910c2c88eb1f82a5411260566dba5064e8f9895e76e169e76187 + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 10/392870b2a100bbc643bc035fe3a89cef5591b719c7bdc8721bcdb3d27ab39fa4870acdca67b0ee096e146d769f311d68eda6b8195a6d970f227795061923013f + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + +"yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: 10/db8f251ae40e24782d5c089ed86883ba3c0ce7f3c174002a67ec500802f928df9d505fea5d04829769221ce20b0f69f6fb1138fbb2e2fb102e3e9d426d20edab + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: "npm:^5.0.0" + decamelize: "npm:^1.2.0" + checksum: 10/235bcbad5b7ca13e5abc54df61d42f230857c6f83223a38e4ed7b824681875b7f8b6ed52139d88a3ad007050f28dc0324b3c805deac7db22ae3b4815dae0e1bf + languageName: node + linkType: hard + +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.9": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: "npm:^6.0.0" + decamelize: "npm:^4.0.0" + flat: "npm:^5.0.2" + is-plain-obj: "npm:^2.1.0" + checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0, yargs@npm:^16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e + languageName: node + linkType: hard + +"yargs@npm:^15.0.2": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: "npm:^6.0.0" + decamelize: "npm:^1.2.0" + find-up: "npm:^4.1.0" + get-caller-file: "npm:^2.0.1" + require-directory: "npm:^2.1.1" + require-main-filename: "npm:^2.0.0" + set-blocking: "npm:^2.0.0" + string-width: "npm:^4.2.0" + which-module: "npm:^2.0.0" + y18n: "npm:^4.0.0" + yargs-parser: "npm:^18.1.2" + checksum: 10/bbcc82222996c0982905b668644ca363eebe6ffd6a572fbb52f0c0e8146661d8ce5af2a7df546968779bb03d1e4186f3ad3d55dfaadd1c4f0d5187c0e3a5ba16 + languageName: node + linkType: hard + +"yargs@npm:^17.2.1, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore new file mode 100644 index 0000000000..1dc2dbe2a8 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore @@ -0,0 +1,17 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json +.yarn/ + +# Compiled TypeScript files +dist + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/package.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/package.json new file mode 100644 index 0000000000..8a267e2feb --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/package.json @@ -0,0 +1,65 @@ +{ + "name": "satp-wrapper-contract", + "version": "1.0.0", + "description": "SATP Wrapper contract implemented in TypeScript", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "lint": "tslint -c tslint.json 'src/**/*.ts'", + "test": "nyc mocha -r ts-node/register test/**/*.test.ts", + "start": "fabric-chaincode-node start", + "build": "tsc", + "build:watch": "tsc -w", + "prepublishOnly": "npm run build" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "^2.4.1", + "fabric-shim": "^2.4.1" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", + "@types/node": "18.11.9", + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.3.3", + "winston": "^3.2.1" + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "coverage/**", + "dist/**" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": true, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } + } + \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts new file mode 100644 index 0000000000..f0596b3843 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +export interface ITraceableContract { + // GetAllAssetsKey returns all assets key found in the world state. + GetAllAssetsKey(ctx: Context): Promise; + + // GetAllTxByKey returns all transations for a specific key. + GetAllTxByKey(ctx: Context, key: string): Promise; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..537c947067 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SATPContractWrapper } from "./satp-wrapper"; + +export { SATPContractWrapper } from "./satp-wrapper"; + +export const contracts: any[] = [SATPContractWrapper]; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts new file mode 100644 index 0000000000..e8b691516c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +export enum InteractionSignatureType { + MINT = 0, + BURN = 1, + ASSIGN = 2, + CHECKPERMITION = 3, + LOCK = 4, + UNLOCK = 5, +} + +export enum VarType { + CONTRACTNAME = 0, + CHANNELNAME = 1, + TOKENID = 2, + OWNER = 3, + OWNERMSPID = 4, + AMOUNT = 5, + BRIDGE = 6, + BRIDGEMSPID = 7, + RECEIVER = 8, + MSPID = 9, +} + +export class InteractionSignature { + type: InteractionSignatureType; + functionsSignature: string[]; + variables: VarType[][]; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts new file mode 100644 index 0000000000..14c2719384 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts @@ -0,0 +1,517 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + Context, + Info, + Returns, + Transaction, + Contract, +} from "fabric-contract-api"; +import { ITraceableContract } from "./ITraceableContract"; + +import { Token } from "./token"; +import { + InteractionSignatureType, + VarType, + InteractionSignature, +} from "./interaction-signature"; + +@Info({ + title: "SATPContractWrapper", + description: "SATP Wrapper contract for trading assets", +}) +export class SATPContractWrapper + extends Contract + implements ITraceableContract +{ + constructor() { + super(); + } + + @Transaction() + public async Initialize(ctx: Context, ownerMSPID: string): Promise { + await ctx.stub.putState("ownerMSPID", Buffer.from(ownerMSPID)); + return true; + } + + @Transaction() + public async setBridge( + ctx: Context, + bridgeMSPID: string, + bridgeID: string, + ): Promise { + await this.checkPermission(ctx); + await ctx.stub.putState("bridgeMSPID", Buffer.from(bridgeMSPID)); + await ctx.stub.putState("bridgeID", Buffer.from(bridgeID)); + return true; + } + + @Transaction() + public async getToken(ctx: Context, tokenId: string): Promise { + const valueBytes = await ctx.stub.getState(tokenId); + + if (!valueBytes || valueBytes.length === 0) { + throw new Error(`Asset with ID ${tokenId} does not exist`); + } + + return JSON.parse(valueBytes.toString()) as Token; + } + + @Transaction() + @Returns("boolean") + public async wrap( + ctx: Context, + tokenType: string, + tokenId: string, + owner: string, + mspId: string, + channelName: string, + contractName: string, + interactions: string, + ): Promise { + await this.checkPermission(ctx); + + const valueBytes = await ctx.stub.getState(tokenId); + + const bridge = await ctx.stub.getState("bridgeMSPID"); + + if (valueBytes && valueBytes.length > 0) { + throw new Error( + `Asset with ID ${tokenId} is already wrapped ${valueBytes.toString()}`, + ); + } + + if (!bridge || bridge.length === 0) { + throw new Error(`Bridge is not set`); + } + + const list = await this.createNonStandardTokenOntology( + ctx, + tokenId, + interactions, + ); + + const checkPermission = await this.getOntologyMethodFromList( + list, + InteractionSignatureType.CHECKPERMITION, + ); + + const token: Token = { + tokenType: tokenType, + tokenId: tokenId, + owner: owner, + mspId: mspId, + channelName: channelName, + contractName: contractName, + amount: 0, + }; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + + try { + if (checkPermission) { + await this.interact(ctx, checkPermission, token); + } + } catch (error) { + await ctx.stub.deleteState(tokenId); //maybe is not needed + throw new Error(`Wrap failed: ${error}`); + } + + return true; + } + + @Transaction() + @Returns("boolean") + public async unwrap(ctx: Context, tokenId: string): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount > 0) { + throw new Error("Token has locked amount"); + } + + await ctx.stub.deleteState(tokenId); + + for (const interactionType in InteractionSignatureType) { + await ctx.stub.deleteState(tokenId + ":" + interactionType); + } + + return true; + } + + @Transaction() + @Returns("number") + public async lockedAmount(ctx: Context, tokenId: string): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + return token.amount; + } + + @Transaction() + @Returns("boolean") + public async lock( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + // const to = await ctx.clientIdentity.getID(); + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.LOCK), + token, + amount, + ); + + token.amount += amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + public async unlock( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error( + "No sufficient amount locked, total tried to unlock: " + + amount + + " total locked: " + + token.amount, + ); + } + + await this.interact( + ctx, + await this.getOntologyMethod( + ctx, + tokenId, + InteractionSignatureType.UNLOCK, + ), + token, + amount, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async mint( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.MINT), + token, + amount, + ); + + token.amount += amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async burn( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error("No sufficient amount locked"); + } + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.BURN), + token, + amount, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async assign( + ctx: Context, + tokenId: string, + to: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error("No sufficient amount locked"); + } + + //const from = await ctx.clientIdentity.getID(); + + await this.interact( + ctx, + await this.getOntologyMethod( + ctx, + tokenId, + InteractionSignatureType.ASSIGN, + ), + token, + amount, + to, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction(false) + @Returns("string") + public async GetAsset(ctx: Context, id: string): Promise { + const assetBytes = await ctx.stub.getState(id); // get the asset from chaincode state + if (!assetBytes || assetBytes.length === 0) { + throw new Error(`Asset with key ${id} does not exist`); + } + return JSON.parse(assetBytes.toString()); + } + + // GetAllAssetsKey returns all assets key found in the world state. + @Transaction(false) + @Returns("string") + public async GetAllAssetsKey(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + allResults.push(result.value.key); + result = await iterator.next(); + } + return allResults.toString(); + } + + // GetAllTxByKey returns all transations for a specific key. + @Transaction(false) + @Returns("string") + public async GetAllTxByKey(ctx: Context, key: string): Promise { + const allResults = []; + const iterator = await ctx.stub.getHistoryForKey(key); + let result = await iterator.next(); + while (!result.done) { + const strValue = JSON.stringify(result); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + // add two number checking for overflow + add(a, b) { + const c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + const c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } + + private async checkPermission(ctx: Context) { + let owner = await ctx.stub.getState("ownerMSPID"); + let bridge = await ctx.stub.getState("bridgeMSPID"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `wrapper: client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + } + + @Transaction(false) + @Returns("string") + async ClientAccountID(ctx: Context): Promise { + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + return clientAccountID; + } + + private async createNonStandardTokenOntology( + ctx: Context, + tokenId: string, + interactions: string, + ): Promise { + const interactionsJson = JSON.parse(interactions) as InteractionSignature[]; + for (const interaction of interactionsJson) { + await ctx.stub.putState( + tokenId + "-" + interaction.type, + Buffer.from(JSON.stringify(interaction)), + ); + } + return interactionsJson; + } + + private async getOntologyMethod( + ctx: Context, + tokenId: string, + interactionType: InteractionSignatureType, + ): Promise { + const valueBytes = await ctx.stub.getState(tokenId + "-" + interactionType); + + if (!valueBytes || valueBytes.length === 0) { + throw new Error( + `Asset method with ID ${tokenId} and ${interactionType} does not exist`, + ); + } + return JSON.parse(valueBytes.toString()) as InteractionSignature; + } + + private async getOntologyMethodFromList( + interactions: InteractionSignature[], + interactionType: InteractionSignatureType, + ): Promise { + for (const interaction of interactions) { + if (interaction.type === interactionType) { + return interaction; + } + } + return undefined; + //throw new Error(`Interaction type ${interactionType} not found`); + } + + private async interact( + ctx: Context, + interaction: InteractionSignature, + token: Token, + amount?: number, + receiver?: string, + ): Promise { + for (let i = 0; i < interaction.functionsSignature.length; i++) { + const response = await ctx.stub.invokeChaincode( + token.contractName, + await this.dynamicParams( + ctx, + interaction.functionsSignature[i], + interaction.variables[i], + token, + amount, + receiver, + ), + token.channelName, + ); + + if (response.status !== 200) { + throw new Error( + `Interact failed: ${response.message} ${response.payload}`, + ); + } + } + } + + private async dynamicParams( + ctx: Context, + functionSignature: string, + variables: VarType[], + token: Token, + amount?: number, + receiver?: string, + ): Promise { + const list = []; + list.push(functionSignature); + for (const variable of variables) { + switch (variable) { + case VarType.CONTRACTNAME: + list.push(token.contractName); + break; + case VarType.CHANNELNAME: + list.push(token.channelName); + break; + case VarType.TOKENID: + list.push(token.tokenId); + break; + case VarType.OWNER: + list.push(token.owner); + break; + case VarType.OWNERMSPID: + list.push(token.mspId); + break; + case VarType.BRIDGE: + list.push(await ctx.stub.getState("bridgeID")); + break; + case VarType.BRIDGEMSPID: + list.push(await ctx.stub.getState("bridgeMSPID")); + break; + case VarType.AMOUNT: + list.push(amount.toString()); + break; + case VarType.BRIDGE: + list.push(await ctx.stub.getState("bridge")); + break; + case VarType.RECEIVER: + list.push(receiver); + break; + case VarType.MSPID: + list.push(await ctx.clientIdentity.getMSPID()); + break; + } + } + return list; + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts new file mode 100644 index 0000000000..eca6d255df --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts @@ -0,0 +1,29 @@ +/* + SPDX-License-Identifier: Apache-2.0 +*/ + +import { Object, Property } from "fabric-contract-api"; + +@Object() +export class Token { + @Property() + tokenType: string; + + @Property() + tokenId: string; + + @Property() + owner: string; + + @Property() + mspId: string; + + @Property() + channelName: string; + + @Property() + contractName: string; + + @Property() + amount: number; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts new file mode 100644 index 0000000000..59f2f0cde1 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts @@ -0,0 +1,418 @@ +/* + * SPDX-License-Identifier: Apache 2.0 + */ + +import { Context } from "fabric-contract-api"; +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { SATPContractWrapper } from "../src/satp-wrapper"; + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import sinon from "sinon"; +import sinonChai from "sinon-chai"; +import { TokenType } from "../src/token"; + +const bridgedOutAmountKey = "amountBridgedOut"; + +const USER_A_FABRIC_ID = + "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +describe("Wrapper", () => { + let ctx; + let contract: SATPContractWrapper; + + beforeEach(() => { + contract = new SATPContractWrapper("bridge_address"); + ctx = sinon.createStubInstance(Context); + ctx.stub = sinon.createStubInstance(ChaincodeStub); + ctx.clientIdentity = sinon.createStubInstance(ClientIdentity); + + ctx.clientIdentity.getMSPID.resolves("bridge"); + ctx.stub.getState.withArgs(bridgedOutAmountKey).resolves(Buffer.from("50")); + ctx.stub.getState + .withArgs("1001") + .resolves( + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":0}`, + ), + ); + ctx.stub.getState + .withArgs("1002") + .resolves( + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":99}`, + ), + ); + + ctx.stub.getState.withArgs("owner").resolves("Org1MSP"); + ctx.stub.getState.withArgs("bridge").resolves("bridge"); + }); + + describe("#tokenExists", () => { + it("should return true for a token reference", async () => { + (await contract.getToken(ctx, "1001")).should.not.be.undefined; + }); + + it("should throw an error for a token reference that does not exist", async () => { + await contract + .getToken(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#wrap", () => { + it("should wrap an asset", async () => { + await contract.wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1003", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"address":"chainCodeID","tokenType":"ERC20","tokenId":"1003","owner":"${USER_A_FABRIC_ID}","channelName":"channelName","contractName":"contractName","amount":0}`, + ), + ); + }); + it("should throw an error for an asset that already exists", async () => { + await contract + .wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1001", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ) + .should.be.rejectedWith(/Asset with ID 1001 is already wrapped/); + }); + }); + + describe("#unwrap", () => { + it("should delete an asset reference", async () => { + await contract.unwrap(ctx, "1001"); + ctx.stub.deleteState.should.have.been.calledOnceWithExactly("1001"); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .unwrap(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + + it("should throw an error for an asset reference with locked amount", async () => { + await contract + .unwrap(ctx, "1002") + .should.be.rejectedWith(/Token has locked amount/); + }); + }); + + describe("#createAssetReference", () => { + it("should create an asset reference", async () => { + await contract.wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1003", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"address":"chainCodeID","tokenType":"ERC20","tokenId":"1003","owner":"${USER_A_FABRIC_ID}","channelName":"channelName","contractName":"contractName","amount":0}`, + ), + ); + }); + + it("should throw an error for an asset reference that already exists", async () => { + await contract + .wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1001", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ) + .should.be.rejectedWith(/Asset with ID 1001 is already wrapped/); + }); + }); + + describe("#getToken", () => { + it("should return a token reference", async () => { + await contract.getToken(ctx, "1001").should.eventually.deep.equal({ + address: "token_address", + tokenType: TokenType.ERC20, + tokenId: 1001, + owner: USER_A_FABRIC_ID, + channelName: "channel", + contractName: "contract", + amount: 0, + }); + }); + + it("should throw an error for a token reference that does not exist", async () => { + await contract + .getToken(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#IsLocked", () => { + it("should return true for a locked asset reference", async () => { + const result1 = await contract.lockedAmount(ctx, "1001"); + const result2 = await contract.lockedAmount(ctx, "1002"); + chai.expect(result1).to.be.equal(0); + chai.expect(result2).to.be.equal(99); + + await contract + .lockedAmount(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#lockAsset", () => { + it("should lock an asset", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract", + ["transfer", USER_A_FABRIC_ID, "bridge", "10"], + "channel", + ) + .resolves({ status: 200 }); + await contract.lock(ctx, "1001", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":10}`, + ), + ); + }); + + it("should throw and error if response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract", + ["transfer", USER_A_FABRIC_ID, "bridge", "10"], + "channel", + ) + .resolves({ status: 404 }); + await contract + .lock(ctx, "1001", 10) + .should.be.rejectedWith(/Lock failed/); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .lock(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#unlockAsset", () => { + it("should unlock an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 200 }); + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["transfer", USER_A_FABRIC_ID, "bridge", "30"], + "channel2", + ) + .resolves({ status: 200 }); + await contract.unlock(ctx, "1002", 30); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":69}`, + ), + ); + }); + + it("should throw and error if the amount to unlock is greater than the locked amount", async () => { + await contract + .unlock(ctx, "1002", 100) + .should.be.rejectedWith( + /No sufficient amount locked, total tried to unlock: 100 total locked: 99/, + ); + }); + + it("should throw an error if approve response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 404 }); + await contract + .unlock(ctx, "1002", 30) + .should.be.rejectedWith(/Approve failed/); + }); + + it("should throw an error if transfer response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 200 }); + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["transfer", USER_A_FABRIC_ID, "bridge", "30"], + "channel2", + ) + .resolves({ status: 404 }); + await contract + .unlock(ctx, "1002", 30) + .should.be.rejectedWith(/Unlock failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .unlock(ctx, "1003", 99) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#mint", () => { + it("should mint an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract", ["mint", "10"], "channel") + .resolves({ status: 200 }); + await contract.mint(ctx, "1001", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":10}`, + ), + ); + }); + it("should throw and error if status response is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract", ["mint", "10"], "channel") + .resolves({ status: 404 }); + await contract + .mint(ctx, "1001", 10) + .should.be.rejectedWith(/Mint failed/); + }); + it("should throw an error for an asset that does not exist", async () => { + await contract + .burn(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#burn", () => { + it("should burn an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["burn", "10"], "channel2") + .resolves({ status: 200 }); + await contract.burn(ctx, "1002", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":89}`, + ), + ); + }); + + it("should throw an error if the amount to burn is greater than the locked amount", async () => { + await contract + .burn(ctx, "1002", 100) + .should.be.rejectedWith(/No sufficient amount locked/); + }); + + it("should throw and error if status response is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["burn", "10"], "channel2") + .resolves({ status: 404 }); + await contract + .burn(ctx, "1002", 10) + .should.be.rejectedWith(/Burn failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .burn(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#assign", () => { + it("should assign an asset", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["assign", "bridge", USER_A_FABRIC_ID, "99"], + "channel2", + ) + .resolves({ status: 200 }); + await contract.assign(ctx, "1002", USER_A_FABRIC_ID, 99); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":0}`, + ), + ); + }); + + it("should throw an error when the response is not 200", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["assign", "bridge", USER_A_FABRIC_ID, "99"], + "channel2", + ) + .resolves({ status: 404 }); + await contract + .assign(ctx, "1002", USER_A_FABRIC_ID, 99) + .should.be.rejectedWith(/Assign failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .assign(ctx, "1003", USER_A_FABRIC_ID, 10) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + + it("should throw an error if no amount available to assign", async () => { + await contract + .assign(ctx, "1002", USER_A_FABRIC_ID, 100) + .should.be.rejectedWith(/No sufficient amount locked/); + }); + }); + + describe("#operations", () => { + const number1 = 10; + const number2 = 500; + + it("add two numbers", () => { + const result = contract.add(number1, number2); + chai.expect(result).to.equal(number1 + number2); + }); + + it("subtract two numbers", () => { + const result = contract.sub(number2, number1); + chai.expect(result).to.equal(number2 - number1); + }); + }); + + describe("#checkPermission", () => { + it("user from organization other than Org2 is not authorized to perform operations", () => { + ctx.clientIdentity.getMSPID.resolves("Org1MSP"); + contract + .lock(ctx, "1001", 10) + .should.be.rejectedWith( + `client is not authorized to perform the operation. Org1MSP"`, + ); + }); + }); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json new file mode 100644 index 0000000000..a1c5ccb234 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "target": "es2017", + "moduleResolution": "node", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "skipLibCheck": true, + }, + "include": [ + "./src/**/*" + ], + "exclude": [ + "./src/**/*.test.ts" + ] +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock new file mode 100644 index 0000000000..3261b6e7da --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock @@ -0,0 +1,3662 @@ +# This file is generated by running "yarn install" inside your project. + # Manual changes might be lost - proceed with caution! + + __metadata: + version: 8 + cacheKey: 10 + + "@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/code-frame@npm:7.24.7" + dependencies: + "@babel/highlight": "npm:^7.24.7" + picocolors: "npm:^1.0.0" + checksum: 10/4812e94885ba7e3213d49583a155fdffb05292330f0a9b2c41b49288da70cf3c746a3fda0bf1074041a6d741c33f8d7be24be5e96f41ef77395eeddc5c9ff624 + languageName: node + linkType: hard + + "@babel/compat-data@npm:^7.24.8": + version: 7.24.9 + resolution: "@babel/compat-data@npm:7.24.9" + checksum: 10/fcdbf3dd978305880f06ae20a23f4f68a8eddbe64fc5d2fbc98dfe4cdf15c174cff41e3a8eb9d935f9f3a68d3a23fa432044082ee9768a2ed4b15f769b8f6853 + languageName: node + linkType: hard + + "@babel/core@npm:^7.7.5": + version: 7.24.9 + resolution: "@babel/core@npm:7.24.9" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.24.9" + "@babel/helper-compilation-targets": "npm:^7.24.8" + "@babel/helper-module-transforms": "npm:^7.24.9" + "@babel/helpers": "npm:^7.24.8" + "@babel/parser": "npm:^7.24.8" + "@babel/template": "npm:^7.24.7" + "@babel/traverse": "npm:^7.24.8" + "@babel/types": "npm:^7.24.9" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/f00a372fa547f6e21f4db1b6e521e6eb01f77f5931726897aae6f4cf29a687f615b9b77147b539e851a68bf94e4850bcfba7eb11091dd8e2bc625f6d831ce257 + languageName: node + linkType: hard + + "@babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9": + version: 7.24.10 + resolution: "@babel/generator@npm:7.24.10" + dependencies: + "@babel/types": "npm:^7.24.9" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/c2491fb7d985527a165546cbcf9e5f6a2518f2a968c7564409c012acce1019056b21e67a152af89b3f4d4a295ca2e75a1a16858152f750efbc4b5087f0cb7253 + languageName: node + linkType: hard + + "@babel/helper-compilation-targets@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-compilation-targets@npm:7.24.8" + dependencies: + "@babel/compat-data": "npm:^7.24.8" + "@babel/helper-validator-option": "npm:^7.24.8" + browserslist: "npm:^4.23.1" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/3489280d07b871af565b32f9b11946ff9a999fac0db9bec5df960760f6836c7a4b52fccb9d64229ccce835d37a43afb85659beb439ecedde04dcea7eb062a143 + languageName: node + linkType: hard + + "@babel/helper-environment-visitor@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-environment-visitor@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/079d86e65701b29ebc10baf6ed548d17c19b808a07aa6885cc141b690a78581b180ee92b580d755361dc3b16adf975b2d2058b8ce6c86675fcaf43cf22f2f7c6 + languageName: node + linkType: hard + + "@babel/helper-function-name@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-function-name@npm:7.24.7" + dependencies: + "@babel/template": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/2ceb3d9b2b35a0fc4100fc06ed7be3bc38f03ff0bf128ff0edbc0cc7dd842967b1496fc70b5c616c747d7711c2b87e7d025c8888f48740631d6148a9d3614f85 + languageName: node + linkType: hard + + "@babel/helper-hoist-variables@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-hoist-variables@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/6cfdcf2289cd12185dcdbdf2435fa8d3447b797ac75851166de9fc8503e2fd0021db6baf8dfbecad3753e582c08e6a3f805c8d00cbed756060a877d705bd8d8d + languageName: node + linkType: hard + + "@babel/helper-module-imports@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-module-imports@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/df8bfb2bb18413aa151ecd63b7d5deb0eec102f924f9de6bc08022ced7ed8ca7fed914562d2f6fa5b59b74a5d6e255dc35612b2bc3b8abf361e13f61b3704770 + languageName: node + linkType: hard + + "@babel/helper-module-transforms@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/helper-module-transforms@npm:7.24.9" + dependencies: + "@babel/helper-environment-visitor": "npm:^7.24.7" + "@babel/helper-module-imports": "npm:^7.24.7" + "@babel/helper-simple-access": "npm:^7.24.7" + "@babel/helper-split-export-declaration": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/eaed9cb93edb11626758f76bfb482f9c3b6583f6756813c5ef849d6d52bbe7c2cb39f61646758e860732d14c2588b60eb4e2af78d7751450649a8d3d7ca41697 + languageName: node + linkType: hard + + "@babel/helper-simple-access@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-simple-access@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/5083e190186028e48fc358a192e4b93ab320bd016103caffcfda81302a13300ccce46c9cd255ae520c25d2a6a9b47671f93e5fe5678954a2329dc0a685465c49 + languageName: node + linkType: hard + + "@babel/helper-split-export-declaration@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-split-export-declaration@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/ff04a3071603c87de0d6ee2540b7291ab36305b329bd047cdbb6cbd7db335a12f9a77af1cf708779f75f13c4d9af46093c00b34432e50b2411872c658d1a2e5e + languageName: node + linkType: hard + + "@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 10/6d1bf8f27dd725ce02bdc6dffca3c95fb9ab8a06adc2edbd9c1c9d68500274230d1a609025833ed81981eff560045b6b38f7b4c6fb1ab19fc90e5004e3932535 + languageName: node + linkType: hard + + "@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + + "@babel/helper-validator-option@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-validator-option@npm:7.24.8" + checksum: 10/a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c + languageName: node + linkType: hard + + "@babel/helpers@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helpers@npm:7.24.8" + dependencies: + "@babel/template": "npm:^7.24.7" + "@babel/types": "npm:^7.24.8" + checksum: 10/61c08a2baa87382a87c7110e9b5574c782603e247b7e6267769ee0e8b7b54b70ff05f16466f05bb318622b7ac28e79b449edff565abf5adcb1adb1b0f42fee9c + languageName: node + linkType: hard + + "@babel/highlight@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.7" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/69b73f38cdd4f881b09b939a711e76646da34f4834f4ce141d7a49a6bb1926eab1c594148970a8aa9360398dff800f63aade4e81fafdd7c8d8a8489ea93bfec1 + languageName: node + linkType: hard + + "@babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/parser@npm:7.24.8" + bin: + parser: ./bin/babel-parser.js + checksum: 10/e44b8327da46e8659bc9fb77f66e2dc4364dd66495fb17d046b96a77bf604f0446f1e9a89cf2f011d78fc3f5cdfbae2e9e0714708e1c985988335683b2e781ef + languageName: node + linkType: hard + + "@babel/template@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/template@npm:7.24.7" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/parser": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/5975d404ef51cf379515eb0f80b115981d0b9dff5539e53a47516644abb8c83d7559f5b083eb1d4977b20d8359ebb2f911ccd4f729143f8958fdc465f976d843 + languageName: node + linkType: hard + + "@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/traverse@npm:7.24.8" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.24.8" + "@babel/helper-environment-visitor": "npm:^7.24.7" + "@babel/helper-function-name": "npm:^7.24.7" + "@babel/helper-hoist-variables": "npm:^7.24.7" + "@babel/helper-split-export-declaration": "npm:^7.24.7" + "@babel/parser": "npm:^7.24.8" + "@babel/types": "npm:^7.24.8" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/47d8ecf8cfff58fe621fc4d8454b82c97c407816d8f9c435caa0c849ea7c357b91119a06f3c69f21a0228b5d06ac0b44f49d1f78cff032d6266317707f1fe615 + languageName: node + linkType: hard + + "@babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9, @babel/types@npm:^7.8.3": + version: 7.24.9 + resolution: "@babel/types@npm:7.24.9" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/21873a08a124646824aa230de06af52149ab88206dca59849dcb3003990a6306ec2cdaa4147ec1127c0cfc5f133853cfc18f80d7f6337b6662a3c378ed565f15 + languageName: node + linkType: hard + + "@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + + "@dabh/diagnostics@npm:^2.0.2": + version: 2.0.3 + resolution: "@dabh/diagnostics@npm:2.0.3" + dependencies: + colorspace: "npm:1.1.x" + enabled: "npm:2.0.x" + kuler: "npm:^2.0.0" + checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 + languageName: node + linkType: hard + + "@fidm/asn1@npm:^1.0.4": + version: 1.0.4 + resolution: "@fidm/asn1@npm:1.0.4" + checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f + languageName: node + linkType: hard + + "@fidm/x509@npm:^1.2.1": + version: 1.2.1 + resolution: "@fidm/x509@npm:1.2.1" + dependencies: + "@fidm/asn1": "npm:^1.0.4" + tweetnacl: "npm:^1.0.1" + checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 + languageName: node + linkType: hard + + "@grpc/grpc-js@npm:^1.9.0": + version: 1.11.0 + resolution: "@grpc/grpc-js@npm:1.11.0" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/d41f8d666a228ff0b09855448319ad0400e2079312d032447e86e4b1d7e8bb8a01d653de36b529b35eb07f5cfd6996a6153c8700248a8a32f5fad2e03df06445 + languageName: node + linkType: hard + + "@grpc/grpc-js@npm:~1.10.9": + version: 1.10.11 + resolution: "@grpc/grpc-js@npm:1.10.11" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/fe08e39702b2b567453e2a25bae9eaa84bde1712e3ef463f89be5163a305f4663a1a57188f812677e225422d7ea9c10adf94fc9124548d0953b85f21f78d9808 + languageName: node + linkType: hard + + "@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" + dependencies: + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 + languageName: node + linkType: hard + + "@hyperledger/fabric-protos@npm:~0.2.1": + version: 0.2.1 + resolution: "@hyperledger/fabric-protos@npm:0.2.1" + dependencies: + "@grpc/grpc-js": "npm:^1.9.0" + google-protobuf: "npm:^3.21.0" + checksum: 10/9873eccf5707ecc6a10b7d803053e5cd17b44a30f946c50acf2e07a65d2e7980c87aee84241b1140afd888abc25d8e7c730ba796bb8c50cdfbf0cb2b2138f436 + languageName: node + linkType: hard + + "@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + + "@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + + "@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + + "@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 + languageName: node + linkType: hard + + "@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + + "@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + + "@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + + "@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + + "@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 + languageName: node + linkType: hard + + "@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a + languageName: node + linkType: hard + + "@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd + languageName: node + linkType: hard + + "@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + + "@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 + languageName: node + linkType: hard + + "@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 + languageName: node + linkType: hard + + "@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 + languageName: node + linkType: hard + + "@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 + languageName: node + linkType: hard + + "@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 + languageName: node + linkType: hard + + "@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 + languageName: node + linkType: hard + + "@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + + "@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 + languageName: node + linkType: hard + + "@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 + languageName: node + linkType: hard + + "@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 + languageName: node + linkType: hard + + "@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": + version: 1.8.6 + resolution: "@sinonjs/commons@npm:1.8.6" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 + languageName: node + linkType: hard + + "@sinonjs/fake-timers@npm:^6.0.0, @sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395 + languageName: node + linkType: hard + + "@sinonjs/samsam@npm:^5.3.1": + version: 5.3.1 + resolution: "@sinonjs/samsam@npm:5.3.1" + dependencies: + "@sinonjs/commons": "npm:^1.6.0" + lodash.get: "npm:^4.4.2" + type-detect: "npm:^4.0.8" + checksum: 10/6850b9980f042a844072a34ce3ca80b098d4550c8c7a83b2b2e7beb1e06ad19608699544b7a8b0c7db882528d8b74321dfd185d0651cff08cbe793cb73dd39d3 + languageName: node + linkType: hard + + "@sinonjs/text-encoding@npm:^0.7.1": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 + languageName: node + linkType: hard + + "@types/chai-as-promised@npm:^7.1.2": + version: 7.1.8 + resolution: "@types/chai-as-promised@npm:7.1.8" + dependencies: + "@types/chai": "npm:*" + checksum: 10/88e2d42f14d1de19ba1c7b5c35f263fef37d3ad241c71f5eb59b10763706f3902f4131b93854c9c6ed520081c7e36be555849f202418357f905bea71178b7d02 + languageName: node + linkType: hard + + "@types/chai@npm:*, @types/chai@npm:^4.2.11": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: 10/f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f + languageName: node + linkType: hard + + "@types/mocha@npm:^7.0.2": + version: 7.0.2 + resolution: "@types/mocha@npm:7.0.2" + checksum: 10/8d9cfcd2fcaf0dcd4840c2f54e737e88b3999c334b363b0ed184db40e765da20befa8281211b351d213781231a2372bfb4ca043e9ee8188885bf7be83c2928fd + languageName: node + linkType: hard + + "@types/node@npm:18.11.9": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae + languageName: node + linkType: hard + + "@types/node@npm:>=13.7.0": + version: 20.14.10 + resolution: "@types/node@npm:20.14.10" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10/672892cf94d0d95cf052f11271990686a0fd204cd1e5fe7a4ef240e5315e06711765dc47b9ec98627d3adac18b8c92bb7e2d8db21d18faa20bc3e3203a143e79 + languageName: node + linkType: hard + + "@types/node@npm:^16.11.1": + version: 16.18.101 + resolution: "@types/node@npm:16.18.101" + checksum: 10/97592d3b2e29711a2c98ca3e9f6e52c8792d57e4ad45a18d68cdd6f9386615738d476b5366169ccae38099b60f6d63d15a2a6dced8e804f70dc32cc5b8f36c0c + languageName: node + linkType: hard + + "@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + + "@types/sinon@npm:*": + version: 17.0.3 + resolution: "@types/sinon@npm:17.0.3" + dependencies: + "@types/sinonjs__fake-timers": "npm:*" + checksum: 10/3f82b4a477c0c57fa4f4f4fb7585cb72c2a65a7e41e5271b54edca296c8dc242c2d8e709de7a8f16af8693c87cb3ad9d96981069ae683f7197a1134892035833 + languageName: node + linkType: hard + + "@types/sinon@npm:^7.5.2": + version: 7.5.2 + resolution: "@types/sinon@npm:7.5.2" + checksum: 10/66163c371dd84f1c485ae4c60401e4cfdb376974c85d91123dcc8c38334ecc4909c4ae9ffc5008bf0f5212593c7d91f70f460963c01510d2dfe93a689fc8e9ea + languageName: node + linkType: hard + + "@types/sinonjs__fake-timers@npm:*": + version: 8.1.5 + resolution: "@types/sinonjs__fake-timers@npm:8.1.5" + checksum: 10/3a0b285fcb8e1eca435266faa27ffff206608b69041022a42857274e44d9305822e85af5e7a43a9fae78d2ab7dc0fcb49f3ae3bda1fa81f0203064dbf5afd4f6 + languageName: node + linkType: hard + + "@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + + "@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 10/ee8fe811becd830f5e276ec63469ec66c22503eb140064580e712c9fccadfd54157c462188640ba6765d5c21f829e7120eb37afb5ead512684b9a1ab86d2db66 + languageName: node + linkType: hard + + "abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + + "agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 + languageName: node + linkType: hard + + "aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + + "ajv@npm:^6.12.2": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + + "ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 + languageName: node + linkType: hard + + "ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + + "ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + + "ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + + "ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + + "ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + + "anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + + "append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 + languageName: node + linkType: hard + + "archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 + languageName: node + linkType: hard + + "arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 + languageName: node + linkType: hard + + "argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + + "argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + + "assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + + "async@npm:^3.2.3": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + languageName: node + linkType: hard + + "balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + + "binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + + "brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + + "brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + + "braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + + "browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 + languageName: node + linkType: hard + + "browserslist@npm:^4.23.1": + version: 4.23.2 + resolution: "browserslist@npm:4.23.2" + dependencies: + caniuse-lite: "npm:^1.0.30001640" + electron-to-chromium: "npm:^1.4.820" + node-releases: "npm:^2.0.14" + update-browserslist-db: "npm:^1.1.0" + bin: + browserslist: cli.js + checksum: 10/326a98b1c39bcc9a99b197f15790dc28e122b1aead3257c837421899377ac96239123f26868698085b3d9be916d72540602738e1f857e86a387e810af3fda6e5 + languageName: node + linkType: hard + + "buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + + "builtin-modules@npm:^1.1.1": + version: 1.1.1 + resolution: "builtin-modules@npm:1.1.1" + checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c + languageName: node + linkType: hard + + "cacache@npm:^18.0.0": + version: 18.0.4 + resolution: "cacache@npm:18.0.4" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/ca2f7b2d3003f84d362da9580b5561058ccaecd46cba661cbcff0375c90734b610520d46b472a339fd032d91597ad6ed12dde8af81571197f3c9772b5d35b104 + languageName: node + linkType: hard + + "caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" + dependencies: + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 + languageName: node + linkType: hard + + "camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + + "camelcase@npm:^6.0.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + + "caniuse-lite@npm:^1.0.30001640": + version: 1.0.30001642 + resolution: "caniuse-lite@npm:1.0.30001642" + checksum: 10/8d80ea82be453ae0fdfea8766d82740a4945c1b99189650f29bfc458d4e235d7e99027a8f8bc5a4228d8c4457ba896315284b0703f300353ad5f09d8e693de10 + languageName: node + linkType: hard + + "chai-as-promised@npm:^7.1.1": + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" + dependencies: + check-error: "npm:^1.0.2" + peerDependencies: + chai: ">= 2.1.2 < 6" + checksum: 10/be372540dad92ef85cde3954bc0e9b0b33e4e6454f3740b17bfb16e36eda638911619089c05a4e4f2bf6722563bf893bb78c2af59b318c23abb2199e5c20ca1f + languageName: node + linkType: hard + + "chai@npm:^4.2.0": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 10/c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae + languageName: node + linkType: hard + + "chalk@npm:^2.3.0, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + + "chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + + "check-error@npm:^1.0.2, check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + + "chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + languageName: node + linkType: hard + + "chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + + "class-transformer@npm:^0.4.0": + version: 0.4.0 + resolution: "class-transformer@npm:0.4.0" + checksum: 10/4751bbcf0ec8a754053eca1cce2e6d883a8fc7d400fac32368b18f05353e22e8415f7223a53daa35705e6d690516f221ec1c46e68c7ad731e31c4f8e46101fb8 + languageName: node + linkType: hard + + "clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + + "cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab + languageName: node + linkType: hard + + "cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + + "cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + + "color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + + "color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + + "color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + + "color-name@npm:^1.0.0, color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + + "color-string@npm:^1.6.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + + "color@npm:^3.1.3": + version: 3.2.1 + resolution: "color@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.3" + color-string: "npm:^1.6.0" + checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae + languageName: node + linkType: hard + + "colorspace@npm:1.1.x": + version: 1.1.4 + resolution: "colorspace@npm:1.1.4" + dependencies: + color: "npm:^3.1.3" + text-hex: "npm:1.0.x" + checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 + languageName: node + linkType: hard + + "commander@npm:^2.12.1": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + + "commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c + languageName: node + linkType: hard + + "concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + + "convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 + languageName: node + linkType: hard + + "convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + + "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce + languageName: node + linkType: hard + + "debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 + languageName: node + linkType: hard + + "debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/723a9570dcd15d146ea4992f0dca12467d1b00f534abb42473df166d36826fcae8bab045aef59ac2f407b47a23266110bc0e646df8ac82f7800c11384f82050e + languageName: node + linkType: hard + + "decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + + "decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + + "deep-eql@npm:^4.1.3": + version: 4.1.4 + resolution: "deep-eql@npm:4.1.4" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 10/f04f4d581f044a824a6322fe4f68fbee4d6780e93fc710cd9852cbc82bfc7010df00f0e05894b848abbe14dc3a25acac44f424e181ae64d12f2ab9d0a875a5ef + languageName: node + linkType: hard + + "default-require-extensions@npm:^3.0.0": + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" + dependencies: + strip-bom: "npm:^4.0.0" + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 + languageName: node + linkType: hard + + "diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c + languageName: node + linkType: hard + + "diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 + languageName: node + linkType: hard + + "eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + + "electron-to-chromium@npm:^1.4.820": + version: 1.4.828 + resolution: "electron-to-chromium@npm:1.4.828" + checksum: 10/5962877ab1239f93683729b07403ffa89559aad358b863d11f40edbc073a79414238296a628bc602a07eedcf41e9fa01b4a84d6813237dfeb4183b0e387b6136 + languageName: node + linkType: hard + + "emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + + "emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + + "enabled@npm:2.0.x": + version: 2.0.0 + resolution: "enabled@npm:2.0.0" + checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 + languageName: node + linkType: hard + + "encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + + "env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + + "err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + + "es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 + languageName: node + linkType: hard + + "escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + languageName: node + linkType: hard + + "escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + + "escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + + "esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + + "exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd + languageName: node + linkType: hard + + "fabric-contract-api@npm:2.5.6, fabric-contract-api@npm:^2.4.1": + version: 2.5.6 + resolution: "fabric-contract-api@npm:2.5.6" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.5.6" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + checksum: 10/fe47af74162dcc7fb4342726829b8d8c309caae00d59fd882c8c8009c49b5bf39e6ba00e239b4df4af0ba5027b0781a29584e656a20321f33989d72dc1ffbaf9 + languageName: node + linkType: hard + + "fabric-shim-api@npm:2.5.6": + version: 2.5.6 + resolution: "fabric-shim-api@npm:2.5.6" + checksum: 10/d24c6f23c5d25fda6794410d5155f80df68fa8f3b5d40c68df275e5ab3ac126d3bcf345ba7dc34c3471e58c31be047227879359c282283b3392b4f8b1b5cdd39 + languageName: node + linkType: hard + + "fabric-shim@npm:^2.4.1": + version: 2.5.6 + resolution: "fabric-shim@npm:2.5.6" + dependencies: + "@fidm/x509": "npm:^1.2.1" + "@grpc/grpc-js": "npm:~1.10.9" + "@hyperledger/fabric-protos": "npm:~0.2.1" + "@types/node": "npm:^16.11.1" + ajv: "npm:^6.12.2" + fabric-contract-api: "npm:2.5.6" + fabric-shim-api: "npm:2.5.6" + fast-safe-stringify: "npm:^2.1.1" + long: "npm:^5.2.3" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + yargs: "npm:^17.4.0" + yargs-parser: "npm:^21.0.1" + bin: + fabric-chaincode-node: cli.js + checksum: 10/ac21dd16ba6bfef868ba5215e2f8530cda9541d897f9b53f93b55c06130a7f6c9c5a87e0ac30f11de37338253feecb0f7378531e085af71d46c0b482555cad7c + languageName: node + linkType: hard + + "fast-deep-equal@npm:^3.1.1": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + + "fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + + "fast-safe-stringify@npm:^2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 + languageName: node + linkType: hard + + "fecha@npm:^4.2.0": + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 + languageName: node + linkType: hard + + "fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + + "find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 + languageName: node + linkType: hard + + "find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + + "find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + + "flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + + "fn.name@npm:1.x.x": + version: 1.1.0 + resolution: "fn.name@npm:1.1.0" + checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 + languageName: node + linkType: hard + + "foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e + languageName: node + linkType: hard + + "foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/77b33b3c438a499201727ca84de39a66350ccd54a8805df712773e963cefb5c4632dbc4386109e97a0df8fb1585aee95fa35acb07587e3e04cfacabfc0ae15dc + languageName: node + linkType: hard + + "fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be + languageName: node + linkType: hard + + "fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec + languageName: node + linkType: hard + + "fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + + "fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + + "fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + + "fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + + "function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + + "gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + + "get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + + "get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 10/3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + + "get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + + "get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + + "glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + + "glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b + languageName: node + linkType: hard + + "glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac + languageName: node + linkType: hard + + "glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + + "globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + + "google-protobuf@npm:^3.21.0": + version: 3.21.4 + resolution: "google-protobuf@npm:3.21.4" + checksum: 10/0d87fe8ef221d105cbaa808f4024bd577638524d8e461469e3733f2e4933391ad4da86b7fcbd11e8781bee04eacf2e8ba19aaacd5f9deb336a220485841d980f + languageName: node + linkType: hard + + "graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + + "growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 10/1391a9add951964de566adc0aee8b0e2b2321e768c1fdccb7a8e156d6a6cd7ea72782883ba8c2c307baf524e3059519423b72e585eba5e7a5f6e83a1e2359b0d + languageName: node + linkType: hard + + "has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + + "has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + + "hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" + dependencies: + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a + languageName: node + linkType: hard + + "hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + + "he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + + "html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + + "http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + + "http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + + "https-proxy-agent@npm:^7.0.1": + version: 7.0.5 + resolution: "https-proxy-agent@npm:7.0.5" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/6679d46159ab3f9a5509ee80c3a3fc83fba3a920a5e18d32176c3327852c3c00ad640c0c4210a8fd70ea3c4a6d3a1b375bf01942516e7df80e2646bdc77658ab + languageName: node + linkType: hard + + "iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + + "imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + + "indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + + "inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + + "inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + + "ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + + "is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + + "is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + + "is-core-module@npm:^2.13.0": + version: 2.14.0 + resolution: "is-core-module@npm:2.14.0" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10/1e0d1a16cb3a94746f6a28db09ccab4562860c94c74bacedb3a6729736d61cfb97001d2052f9622637aa7ea8e0643a3f0f4f16965c70ba6ce30a8ccfe8074af8 + languageName: node + linkType: hard + + "is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + + "is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + + "is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + + "is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + + "is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + + "is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + + "is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + + "is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + + "is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + + "is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + + "isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + + "isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + + "isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + + "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + + "istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" + dependencies: + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 + languageName: node + linkType: hard + + "istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" + dependencies: + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 + languageName: node + linkType: hard + + "istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e + languageName: node + linkType: hard + + "istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + + "istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 + languageName: node + linkType: hard + + "istanbul-reports@npm:^3.0.2": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + + "jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 + languageName: node + linkType: hard + + "js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + + "js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + + "js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + + "jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + + "jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 + languageName: node + linkType: hard + + "json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + + "json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + + "just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 + languageName: node + linkType: hard + + "kuler@npm:^2.0.0": + version: 2.0.0 + resolution: "kuler@npm:2.0.0" + checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 + languageName: node + linkType: hard + + "locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + + "locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + + "lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 + languageName: node + linkType: hard + + "lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 + languageName: node + linkType: hard + + "lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 + languageName: node + linkType: hard + + "log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + + "logform@npm:^2.6.0, logform@npm:^2.6.1": + version: 2.6.1 + resolution: "logform@npm:2.6.1" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/e67f414787fbfe1e6a997f4c84300c7e06bee3d0bd579778af667e24b36db3ea200ed195d41b61311ff738dab7faabc615a07b174b22fe69e0b2f39e985be64b + languageName: node + linkType: hard + + "long@npm:^5.0.0, long@npm:^5.2.3": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 + languageName: node + linkType: hard + + "loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a + languageName: node + linkType: hard + + "lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + + "make-dir@npm:^3.0.0, make-dir@npm:^3.0.2": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + languageName: node + linkType: hard + + "make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + + "make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + + "make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 + languageName: node + linkType: hard + + "minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/27e49fb720116face9588c29634404edc0c6677e5448ba01b4ec6179002461cc4fabc842497a0537edc5aa87bc93e65cfb0fe6dc32b850563429a64836dd1d54 + languageName: node + linkType: hard + + "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + + "minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 + languageName: node + linkType: hard + + "minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + + "minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + + "minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 + languageName: node + linkType: hard + + "minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + + "minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + + "minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + + "minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + + "minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 + languageName: node + linkType: hard + + "minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 + languageName: node + linkType: hard + + "mkdirp@npm:^0.5.3": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: "npm:^1.2.6" + bin: + mkdirp: bin/cmd.js + checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + + "mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + + "mocha@npm:^9.2.0": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": "npm:1.1.2" + ansi-colors: "npm:4.1.1" + browser-stdout: "npm:1.3.1" + chokidar: "npm:3.5.3" + debug: "npm:4.3.3" + diff: "npm:5.0.0" + escape-string-regexp: "npm:4.0.0" + find-up: "npm:5.0.0" + glob: "npm:7.2.0" + growl: "npm:1.10.5" + he: "npm:1.2.0" + js-yaml: "npm:4.1.0" + log-symbols: "npm:4.1.0" + minimatch: "npm:4.2.1" + ms: "npm:2.1.3" + nanoid: "npm:3.3.1" + serialize-javascript: "npm:6.0.0" + strip-json-comments: "npm:3.1.1" + supports-color: "npm:8.1.1" + which: "npm:2.0.2" + workerpool: "npm:6.2.0" + yargs: "npm:16.2.0" + yargs-parser: "npm:20.2.4" + yargs-unparser: "npm:2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 10/8ee58bff8694ad4013fc0fbb5670c5ec6d8404c601df2d4ae798fad01dd03b5f9395347cf59167006b315a14813a6f839290d60dcbdee8ef4246afe43609d2dc + languageName: node + linkType: hard + + "ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + + "ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + + "nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 + languageName: node + linkType: hard + + "negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + + "nise@npm:^4.0.4": + version: 4.1.0 + resolution: "nise@npm:4.1.0" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + "@sinonjs/fake-timers": "npm:^6.0.0" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/ff7c2e316c8ae8327573417fefcc84070d9dcfa423b123d014d21db5f7de07580f76a85143c2f91eaf5f1a979f3f9a3721e3652753e58ddaa703aa8d65539b0b + languageName: node + linkType: hard + + "node-gyp@npm:latest": + version: 10.2.0 + resolution: "node-gyp@npm:10.2.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^4.1.0" + semver: "npm:^7.3.5" + tar: "npm:^6.2.1" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/41773093b1275751dec942b985982fd4e7a69b88cae719b868babcef3880ee6168aaec8dcaa8cd0b9fa7c84873e36cc549c6cac6a124ee65ba4ce1f1cc108cfe + languageName: node + linkType: hard + + "node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" + dependencies: + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab + languageName: node + linkType: hard + + "node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 + languageName: node + linkType: hard + + "nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + + "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + + "nyc@npm:^15.0.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" + dependencies: + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 + languageName: node + linkType: hard + + "once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + + "one-time@npm:^1.0.0": + version: 1.0.0 + resolution: "one-time@npm:1.0.0" + dependencies: + fn.name: "npm:1.x.x" + checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 + languageName: node + linkType: hard + + "p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + + "p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + + "p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + + "p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + + "p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 + languageName: node + linkType: hard + + "p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + + "p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + + "package-hash@npm:^4.0.0": + version: 4.0.0 + resolution: "package-hash@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + languageName: node + linkType: hard + + "package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + + "path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + + "path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + + "path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + + "path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + + "path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + + "path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + languageName: node + linkType: hard + + "pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + + "picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + + "pkg-dir@npm:^4.1.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + + "proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + + "process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" + dependencies: + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + languageName: node + linkType: hard + + "promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + + "protobufjs@npm:^7.2.5": + version: 7.3.2 + resolution: "protobufjs@npm:7.3.2" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/816604aa0649a93fd5d3ef2858ef038f482d18eebcfb4201fe85c0d3bcccc12410f9e3e73262f1219e6b5bed4f27b28c3bf7c931c409dfb1fd563a304d541d89 + languageName: node + linkType: hard + + "punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + + "randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + + "readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.2": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + + "readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + + "reflect-metadata@npm:^0.1.13": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + + "release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" + dependencies: + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 + languageName: node + linkType: hard + + "require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + + "require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd + languageName: node + linkType: hard + + "resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + + "resolve@npm:^1.3.2": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + languageName: node + linkType: hard + + "resolve@patch:resolve@npm%3A^1.3.2#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + languageName: node + linkType: hard + + "retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + + "rimraf@npm:^3.0.0": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + + "safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + + "safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 + languageName: node + linkType: hard + + "safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + + "satp-wrapper-contract@workspace:.": + version: 0.0.0-use.local + resolution: "satp-wrapper-contract@workspace:." + dependencies: + "@types/chai": "npm:^4.2.11" + "@types/chai-as-promised": "npm:^7.1.2" + "@types/mocha": "npm:^7.0.2" + "@types/node": "npm:18.11.9" + "@types/sinon": "npm:^7.5.2" + "@types/sinon-chai": "npm:^3.2.3" + chai: "npm:^4.2.0" + chai-as-promised: "npm:^7.1.1" + fabric-contract-api: "npm:^2.4.1" + fabric-shim: "npm:^2.4.1" + mocha: "npm:^9.2.0" + nyc: "npm:^15.0.0" + sinon: "npm:^9.0.1" + sinon-chai: "npm:^3.5.0" + ts-node: "npm:^8.8.1" + tslint: "npm:^6.1.0" + typescript: "npm:5.3.3" + winston: "npm:^3.2.1" + languageName: unknown + linkType: soft + + "semver@npm:^5.3.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + + "semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + + "semver@npm:^7.3.5, semver@npm:^7.5.3": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 + languageName: node + linkType: hard + + "serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + languageName: node + linkType: hard + + "set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef + languageName: node + linkType: hard + + "shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + + "shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + + "signal-exit@npm:^3.0.2": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + + "signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + + "simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + + "sinon-chai@npm:^3.5.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe + languageName: node + linkType: hard + + "sinon@npm:^9.0.1": + version: 9.2.4 + resolution: "sinon@npm:9.2.4" + dependencies: + "@sinonjs/commons": "npm:^1.8.1" + "@sinonjs/fake-timers": "npm:^6.0.1" + "@sinonjs/samsam": "npm:^5.3.1" + diff: "npm:^4.0.2" + nise: "npm:^4.0.4" + supports-color: "npm:^7.1.0" + checksum: 10/4597c12e2490b22aaae5fb1edca169a10e71dee73c13d2d12d6d9fa7f3bdbdb53ec5ad52c631c301fb3eab79471a30b05be65155c30ca415169470ea4789eae6 + languageName: node + linkType: hard + + "smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + + "socks-proxy-agent@npm:^8.0.3": + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10/c8e7c2b398338b49a0a0f4d2bae5c0602aeeca6b478b99415927b6c5db349ca258448f2c87c6958ebf83eea17d42cbc5d1af0bfecb276cac10b9658b0f07f7d7 + languageName: node + linkType: hard + + "socks@npm:^2.8.3": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb + languageName: node + linkType: hard + + "source-map-support@npm:^0.5.17": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + + "source-map@npm:^0.6.0, source-map@npm:^0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + + "spawn-wrap@npm:^2.0.0": + version: 2.0.0 + resolution: "spawn-wrap@npm:2.0.0" + dependencies: + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + languageName: node + linkType: hard + + "sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + + "sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + + "ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + languageName: node + linkType: hard + + "stack-trace@npm:0.0.x": + version: 0.0.10 + resolution: "stack-trace@npm:0.0.10" + checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 + languageName: node + linkType: hard + + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + + "string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + + "string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + + "strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + + "strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + + "strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + + "strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + + "supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + + "supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b + languageName: node + linkType: hard + + "supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + + "supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + + "tar@npm:^6.1.11, tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 + languageName: node + linkType: hard + + "test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + + "text-hex@npm:1.0.x": + version: 1.0.0 + resolution: "text-hex@npm:1.0.0" + checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a + languageName: node + linkType: hard + + "to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + + "to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + + "triple-beam@npm:^1.3.0": + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 + languageName: node + linkType: hard + + "ts-node@npm:^8.8.1": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/1431026e6e9e8971ecaba14fdf9960541918c0560344d95e4942b765dbd96d5648b99ca02a5090046130aa9870164b82ba8090a4eda048d19da3ad7aceeb0b49 + languageName: node + linkType: hard + + "tslib@npm:^1.13.0, tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb + languageName: node + linkType: hard + + "tslint@npm:^6.1.0": + version: 6.1.3 + resolution: "tslint@npm:6.1.3" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + builtin-modules: "npm:^1.1.1" + chalk: "npm:^2.3.0" + commander: "npm:^2.12.1" + diff: "npm:^4.0.1" + glob: "npm:^7.1.1" + js-yaml: "npm:^3.13.1" + minimatch: "npm:^3.0.4" + mkdirp: "npm:^0.5.3" + resolve: "npm:^1.3.2" + semver: "npm:^5.3.0" + tslib: "npm:^1.13.0" + tsutils: "npm:^2.29.0" + peerDependencies: + typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + bin: + tslint: bin/tslint + checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + languageName: node + linkType: hard + + "tsutils@npm:^2.29.0": + version: 2.29.0 + resolution: "tsutils@npm:2.29.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + languageName: node + linkType: hard + + "tweetnacl@npm:^1.0.1": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 + languageName: node + linkType: hard + + "type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + + "type-fest@npm:^0.8.0": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + + "typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + + "typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + + "typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + + "undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd + languageName: node + linkType: hard + + "unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + + "unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 + languageName: node + linkType: hard + + "update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/d70b9efeaf4601aadb1a4f6456a7a5d9118e0063d995866b8e0c5e0cf559482671dab6ce7b079f9536b06758a344fbd83f974b965211e1c6e8d1958540b0c24c + languageName: node + linkType: hard + + "uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + + "util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + + "uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + + "which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + + "which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + + "which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + + "winston-transport@npm:^4.7.0": + version: 4.7.1 + resolution: "winston-transport@npm:4.7.1" + dependencies: + logform: "npm:^2.6.1" + readable-stream: "npm:^3.6.2" + triple-beam: "npm:^1.3.0" + checksum: 10/bc48c921ec9b4a71c1445bf274aa6b00c01089a6c26fc0b19534f8a32fa2710c6766c9e6db53a23492c20772934025d312dd9fb08df157ccb6579ad6b9dae9a7 + languageName: node + linkType: hard + + "winston@npm:^3.2.1, winston@npm:^3.7.2": + version: 3.13.1 + resolution: "winston@npm:3.13.1" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.6.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/bc78202708800f74b94a2cc4fbdd46569dea90f939ad2149a936b2deee612d63a512f9e5725251349090bc12ba35351dd67336b3c92bf094892f9ea03d34fdc4 + languageName: node + linkType: hard + + "workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 10/c7dce6eae02098d70fe9924503bd95688564a1316cbb96fe55600f7ede0e66f1f2fea4d18aaec71fcee32373d17eda0bf87ac4dac8e5823e90ca1524aac90bdc + languageName: node + linkType: hard + + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + + "wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/0d64f2d438e0b555e693b95aee7b2689a12c3be5ac458192a1ce28f542a6e9e59ddfecc37520910c2c88eb1f82a5411260566dba5064e8f9895e76e169e76187 + languageName: node + linkType: hard + + "wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + + "wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + + "write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + + "y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 10/392870b2a100bbc643bc035fe3a89cef5591b719c7bdc8721bcdb3d27ab39fa4870acdca67b0ee096e146d769f311d68eda6b8195a6d970f227795061923013f + languageName: node + linkType: hard + + "y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + + "yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + + "yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + + "yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: 10/db8f251ae40e24782d5c089ed86883ba3c0ce7f3c174002a67ec500802f928df9d505fea5d04829769221ce20b0f69f6fb1138fbb2e2fb102e3e9d426d20edab + languageName: node + linkType: hard + + "yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: "npm:^5.0.0" + decamelize: "npm:^1.2.0" + checksum: 10/235bcbad5b7ca13e5abc54df61d42f230857c6f83223a38e4ed7b824681875b7f8b6ed52139d88a3ad007050f28dc0324b3c805deac7db22ae3b4815dae0e1bf + languageName: node + linkType: hard + + "yargs-parser@npm:^20.2.2": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + + "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + + "yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: "npm:^6.0.0" + decamelize: "npm:^4.0.0" + flat: "npm:^5.0.2" + is-plain-obj: "npm:^2.1.0" + checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + + "yargs@npm:16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e + languageName: node + linkType: hard + + "yargs@npm:^15.0.2": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: "npm:^6.0.0" + decamelize: "npm:^1.2.0" + find-up: "npm:^4.1.0" + get-caller-file: "npm:^2.0.1" + require-directory: "npm:^2.1.1" + require-main-filename: "npm:^2.0.0" + set-blocking: "npm:^2.0.0" + string-width: "npm:^4.2.0" + which-module: "npm:^2.0.0" + y18n: "npm:^4.0.0" + yargs-parser: "npm:^18.1.2" + checksum: 10/bbcc82222996c0982905b668644ca363eebe6ffd6a572fbb52f0c0e8146661d8ce5af2a7df546968779bb03d1e4186f3ad3d55dfaadd1c4f0d5187c0e3a5ba16 + languageName: node + linkType: hard + + "yargs@npm:^17.4.0, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + + "yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + + "yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard + \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts new file mode 100755 index 0000000000..fac106c0e7 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts @@ -0,0 +1,89 @@ +#!/usr/bin/env node + +import { + AuthorizationProtocol, + ConfigService, + IAuthorizationConfig, +} from "@hyperledger/cactus-cmd-api-server"; +import { LoggerProvider } from "@hyperledger/cactus-common"; +import { ICbdcBridgingApp, CbdcBridgingApp } from "./cbdc-bridging-app"; +import CryptoMaterial from "../../crypto-material/crypto-material.json"; +import "dotenv/config"; + +export async function launchApp( + env?: NodeJS.ProcessEnv, + args?: string[], +): Promise { + const configService = new ConfigService(); + const exampleConfig = await configService.newExampleConfig(); + exampleConfig.configFile = ""; + exampleConfig.authorizationConfigJson = JSON.stringify( + exampleConfig.authorizationConfigJson, + ) as unknown as IAuthorizationConfig; + exampleConfig.authorizationProtocol = AuthorizationProtocol.NONE; + + const convictConfig = + await configService.newExampleConfigConvict(exampleConfig); + + env = await configService.newExampleConfigEnv(convictConfig.getProperties()); + + const config = await configService.getOrCreate({ args, env }); + const serverOptions = config.getProperties(); + + LoggerProvider.setLogLevel(serverOptions.logLevel); + + const clientGatewayKeyPair = { + privateKey: Uint8Array.from( + Buffer.from(CryptoMaterial.gateways["gateway1"].privateKey, "hex"), + ), + publicKey: Uint8Array.from( + Buffer.from(CryptoMaterial.gateways["gateway1"].publicKey, "hex"), + ), + }; + + const serverGatewayKeyPair = { + privateKey: Uint8Array.from( + Buffer.from(CryptoMaterial.gateways["gateway2"].privateKey, "hex"), + ), + publicKey: Uint8Array.from( + Buffer.from(CryptoMaterial.gateways["gateway2"].publicKey, "hex"), + ), + }; + + if ( + process.env.API_HOST == undefined || + process.env.API_SERVER_1_PORT == undefined || + process.env.API_SERVER_2_PORT == undefined || + process.env.API_CRPC_HOST == undefined || + process.env.API_SERVER_1_CRPC_PORT == undefined || + process.env.API_SERVER_2_CRPC_PORT == undefined + ) { + throw new Error("Env variables not set"); + } + + const appOptions: ICbdcBridgingApp = { + apiHost: process.env.API_HOST, + apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), + apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), + //clientGatewayKeyPair: clientGatewayKeyPair, + //serverGatewayKeyPair: serverGatewayKeyPair, + logLevel: "DEBUG", + apiCrpcHost: process.env.API_CRPC_HOST, + apiServer1CrpcPort: parseInt(process.env.API_SERVER_1_CRPC_PORT), + apiServer2CrpcPort: parseInt(process.env.API_SERVER_2_CRPC_PORT), + }; + + const cbdcBridgingApp = new CbdcBridgingApp(appOptions); + try { + await cbdcBridgingApp.start(); + console.info("CbdcBridgingApp running..."); + } catch (ex) { + console.error(`CbdcBridgingApp crashed. Existing...`, ex); + await cbdcBridgingApp.stop(); + process.exit(-1); + } +} + +if (require.main === module) { + launchApp(); +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts new file mode 100644 index 0000000000..3c93199c14 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts @@ -0,0 +1,235 @@ +import { AddressInfo } from "net"; +import { v4 as uuidv4 } from "uuid"; +import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { + IListenOptions, + LogLevelDesc, + Logger, + LoggerProvider, + Servers, +} from "@hyperledger/cactus-common"; +import { + ApiServer, + AuthorizationProtocol, + ConfigService, + ICactusApiServerOptions, +} from "@hyperledger/cactus-cmd-api-server"; +import { + Configuration, + SATPGateway, +} from "@hyperledger/cactus-plugin-satp-hermes/"; +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 express from "express"; +import bodyParser from "body-parser"; +import http, { Server } from "http"; +import { Constants } from "@hyperledger/cactus-core-api"; + +import { Server as SocketIoServer } from "socket.io"; + +export interface ICbdcBridgingApp { + apiHost: string; + apiServer1Port: number; + apiServer2Port: number; + apiGateway1ServerPort: number; + apiGateway1ClientPort: number; + apiGateway1BloPort: number; + apiGateway2ServerPort: number; + apiGateway2ClientPort: number; + apiGateway2BloPort: number; + + + logLevel?: LogLevelDesc; + apiServerOptions?: ICactusApiServerOptions; + disableSignalHandlers?: true; +} + +interface ICrpcOptions { + host: string; + port: number; +} + +export type ShutdownHook = () => Promise; +export class CbdcBridgingApp { + private readonly log: Logger; + private readonly shutdownHooks: ShutdownHook[]; + readonly infrastructure: CbdcBridgingAppDummyInfrastructure; + + public constructor(public readonly options: ICbdcBridgingApp) { + const fnTag = "CbdcBridgingApp#constructor()"; + + if (!options) { + throw new Error(`${fnTag} options parameter is falsy`); + } + const { logLevel } = options; + + const level = logLevel || "INFO"; + const label = "cbdc-bridging-app"; + this.log = LoggerProvider.getOrCreate({ level, label }); + + this.shutdownHooks = []; + + this.infrastructure = new CbdcBridgingAppDummyInfrastructure({ + logLevel: level, + }); + } + + public async start()/*: Promise */{ + this.log.debug(`Starting CBDC Bridging App...`); + + if (!this.options.disableSignalHandlers) { + exitHook((callback: IAsyncExitHookDoneCallback) => { + this.stop().then(callback); + }); + this.log.debug(`Registered signal handlers for graceful auto-shutdown`); + } + + await this.infrastructure.start(); + this.onShutdown(() => this.infrastructure.stop()); + this.log.info("Creating Fabric Connector"); + const fabricPlugin = + await this.infrastructure.createFabricLedgerConnector(); + this.log.info("Creating Besu Connector"); + const besuPlugin = await this.infrastructure.createBesuLedgerConnector(); + + let addressInfoA: AddressInfo; + let addressInfoB: AddressInfo; + + // Reserve the ports where the API Servers will run + { + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const fabricServer = http.createServer(expressApp); + + const listenOptions: IListenOptions = { + hostname: this.options.apiHost, + port: this.options.apiServer1Port, + server: fabricServer, + }; + addressInfoA = (await Servers.listen(listenOptions)) as AddressInfo; + + await fabricPlugin.getOrCreateWebServices(); + await fabricPlugin.registerWebServices(expressApp); + + } + + { + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const besuServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: this.options.apiHost, + port: this.options.apiServer2Port, + server: besuServer, + }; + addressInfoB = (await Servers.listen(listenOptions)) as AddressInfo; + await besuPlugin.getOrCreateWebServices(); + const wsApi = new SocketIoServer(besuServer, { + path: Constants.SocketIoConnectionPathV1, + }); + await besuPlugin.registerWebServices(expressApp, wsApi); + } + + const nodeApiHostA = `http://${this.options.apiHost}:${addressInfoA.port}`; + const nodeApiHostB = `http://${this.options.apiHost}:${addressInfoB.port}`; + + const fabricApiClient = new FabricApi( + new Configuration({ basePath: nodeApiHostA }), + ); + + const besuApiClient = new BesuApi( + new Configuration({ basePath: nodeApiHostB }), + ); + + this.log.info("Deploying chaincode and smart contracts..."); + + await this.infrastructure.deployFabricSATPContract(fabricApiClient); + + await this.infrastructure.deployFabricWrapperContract( + fabricApiClient, + ); + this.log.info("Fabric Chaincode Deployed"); + await this.infrastructure.deployBesuContracts(besuApiClient); + + await this.infrastructure.initializeContractsAndAddPermitions(fabricApiClient, besuApiClient); + + this.log.info(`Chaincode and smart Contracts deployed.`); + + const gatways = await this.infrastructure.createSATPGateways(); + + for(const gateway of gatways){ + await gateway.startup(); + } + + this.log.info(`SATP Gateways started.`); + + return { + fabricApiClient, + besuApiClient, + }; + } + + public async stop(): Promise { + for (const hook of this.shutdownHooks) { + await hook(); // FIXME add timeout here so that shutdown does not hang + } + } + + public onShutdown(hook: ShutdownHook): void { + this.shutdownHooks.push(hook); + } + + public async startNode( + httpServerApi: Server, + pluginRegistry: PluginRegistry, + crpcOptions: ICrpcOptions, + ): Promise { + this.log.info(`Starting API Server node...`); + + const addressInfoApi = httpServerApi.address() as AddressInfo; + + let config; + if (this.options.apiServerOptions) { + config = this.options.apiServerOptions; + } else { + const configService = new ConfigService(); + const convictConfig = await configService.getOrCreate(); + config = convictConfig.getProperties(); + config.configFile = ""; + config.apiCorsDomainCsv = `http://${process.env.API_HOST_FRONTEND}:${process.env.API_PORT_FRONTEND}`; + config.cockpitCorsDomainCsv = `http://${process.env.API_HOST_FRONTEND}:${process.env.API_PORT_FRONTEND}`; + config.apiPort = addressInfoApi.port; + config.apiHost = addressInfoApi.address; + config.grpcPort = 0; + config.logLevel = this.options.logLevel || "INFO"; + config.authorizationProtocol = AuthorizationProtocol.NONE; + config.crpcHost = crpcOptions.host; + config.crpcPort = crpcOptions.port; + } + + const apiServer = new ApiServer({ + config, + httpServerApi, + pluginRegistry, + }); + + this.onShutdown(() => apiServer.shutdown()); + + await apiServer.start(); + + return apiServer; + } +} + +export interface IStartInfo { + readonly apiServer1: ApiServer; + readonly apiServer2: ApiServer; + //readonly fabricGatewayApi: SatpApi; + //readonly besuGatewayApi: SatpApi; + readonly besuApiClient: BesuApi; + readonly fabricApiClient: FabricApi; + readonly fabricSatpGateway: SATPGateway; + readonly besuSatpGateway: SATPGateway; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts new file mode 100755 index 0000000000..87cb558397 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.ts @@ -0,0 +1 @@ +export * from "./public-api"; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts new file mode 100755 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/index.web.ts @@ -0,0 +1 @@ +export {}; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts new file mode 100644 index 0000000000..400ed90fce --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts @@ -0,0 +1,942 @@ +import path from "path"; +import { v4 as uuidv4 } from "uuid"; +import fs from "fs-extra"; +import { + Logger, + Checks, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, +} from "@hyperledger/cactus-common"; +import { + BesuTestLedger, + DEFAULT_FABRIC_2_AIO_IMAGE_NAME, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, +} from "@hyperledger/cactus-test-tooling"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + DefaultApi as FabricApi, + ChainCodeProgrammingLanguage, + DefaultEventHandlerStrategy, + DeploymentTargetOrgFabric2x, + FabricContractInvocationType, + FileBase64, + PluginLedgerConnectorFabric, + IPluginLedgerConnectorFabricOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + DefaultApi as BesuApi, + DeployContractSolidityBytecodeV1Request, + EthContractInvocationType, + PluginFactoryLedgerConnector, + PluginLedgerConnectorBesu, + Web3SigningCredentialType, + InvokeContractV1Request as BesuInvokeContractV1Request, + IPluginLedgerConnectorBesuOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import SATPContract from "../../../solidity/main/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/main/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { PluginFactorySATPGateway, SATPGateway, SATPGatewayConfig } from "@hyperledger/cactus-plugin-satp-hermes"; +import { IPluginFactoryOptions, PluginImportType } from "@hyperledger/cactus-core-api"; +import CryptoMaterial from "../../../crypto-material/crypto-material.json"; +import { SupportedChain, GatewayIdentity, DraftVersions } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/core/types"; +import { FabricConfig, NetworkConfig } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction"; + +export interface ICbdcBridgingAppDummyInfrastructureOptions { + logLevel?: LogLevelDesc; +} + +export class CbdcBridgingAppDummyInfrastructure { + public static readonly CLASS_NAME = "CbdcBridgingAppDummyInfrastructure"; + // TODO: Move this to the FabricTestLedger class where it belongs. + public static readonly FABRIC_2_AIO_CLI_CFG_DIR = + "/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/"; + public static readonly SATP_CONTRACT = "SATPContract"; + public static readonly SATP_WRAPPER = "SATPWrapperContract"; + public static readonly FABRIC_ASSET_ID = "FabricAssetID"; + public static readonly BESU_ASSET_ID = "BesuAssetID"; + private static readonly FABRIC_CHANNEL_NAME = "mychannel"; + + private readonly besu: BesuTestLedger; + private readonly fabric: FabricTestLedgerV1; + private readonly log: Logger; + private besuFirstHighNetWorthAccount: string = ""; + private besuFirstHighNetWorthAccountPriv: string = ""; + + private besuOptions: IPluginLedgerConnectorBesuOptions | undefined; + private fabricOptions: IPluginLedgerConnectorFabricOptions | undefined; + + private besuContractAddress: string | undefined; + private besuWrapperContractAddress: string | undefined; + + private userIdentity1: any; + + private fabricKeychainPlugin: PluginKeychainMemory | undefined; + + private readonly gatewayFactory = new PluginFactorySATPGateway({ + pluginImportType: PluginImportType.Local, + }); + + public get className(): string { + return CbdcBridgingAppDummyInfrastructure.CLASS_NAME; + } + + public get orgCfgDir(): string { + return CbdcBridgingAppDummyInfrastructure.FABRIC_2_AIO_CLI_CFG_DIR; + } + + constructor( + public readonly options: ICbdcBridgingAppDummyInfrastructureOptions, + ) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + + this.log = LoggerProvider.getOrCreate({ level, label }); + + this.besu = new BesuTestLedger({ + logLevel: level || "DEBUG", + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + + this.fabric = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel: level || "DEBUG", + }); + } + + public get org1Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { + return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1; + } + + public get org2Env(): NodeJS.ProcessEnv & DeploymentTargetOrgFabric2x { + return FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2; + } + + public get draftVersions(): DraftVersions[] { + return [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ]; + } + + public async start(): Promise { + try { + this.log.info(`Starting dummy infrastructure...`); + await Promise.all([this.besu.start(), this.fabric.start()]); + this.besuFirstHighNetWorthAccount = this.besu.getGenesisAccountPubKey(); + this.besuFirstHighNetWorthAccountPriv = this.besu.getGenesisAccountPrivKey(); + this.log.info(`Started dummy infrastructure OK`); + } catch (ex) { + this.log.error(`Starting of dummy infrastructure crashed: `, ex); + throw ex; + } + } + + public async stop(): Promise { + try { + this.log.info(`Stopping...`); + await Promise.all([ + this.besu.stop().then(() => this.besu.destroy()), + this.fabric.stop().then(() => this.fabric.destroy()), + ]); + this.log.info(`Stopped OK`); + } catch (ex) { + this.log.error(`Stopping crashed: `, ex); + throw ex; + } + } + + public async createFabricLedgerConnector(): Promise { + const connectionProfileOrg1 = await this.fabric.getConnectionProfileOrg1(); + const enrollAdminOutOrg1 = await this.fabric.enrollAdmin(); + const adminWalletOrg1 = enrollAdminOutOrg1[1]; + [this.userIdentity1] = await this.fabric.enrollUserV2({ + wallet: adminWalletOrg1, + enrollmentID: "userA", + organization: "org1", + }); + const [userIdentity2] = await this.fabric.enrollUserV2({ + wallet: adminWalletOrg1, + enrollmentID: "userB", + organization: "org1", + }); + + const enrollAdminOutOrg2 = await this.fabric.enrollAdminV2({ + organization: "org2", + }); + const adminWalletOrg2 = enrollAdminOutOrg2[1]; + const [bridgeIdentity] = await this.fabric.enrollUserV2({ + wallet: adminWalletOrg2, + enrollmentID: "bridge", + organization: "org2", + }); + + const [adminIdentityOrg2] = await this.fabric.enrollUserV2({ + wallet: adminWalletOrg2, + enrollmentID: "adminUser", + organization: "org2", + }); + + const sshConfig = await this.fabric.getSshConfig(); + + const keychainEntryKey1 = "userA"; + const keychainEntryValue1 = JSON.stringify(this.userIdentity1); + + const keychainEntryKey2 = "userB"; + const keychainEntryValue2 = JSON.stringify(userIdentity2); + + const keychainEntryKey3 = "bridge"; + const keychainEntryValue3 = JSON.stringify(bridgeIdentity); + + const keychainEntryKey4 = "adminUser"; + const keychainEntryValue4 = JSON.stringify(adminIdentityOrg2); + + this.fabricKeychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: CryptoMaterial.keychains.keychain1.id, + logLevel: this.options.logLevel || "INFO", + backend: new Map([ + [keychainEntryKey1, keychainEntryValue1], + [keychainEntryKey2, keychainEntryValue2], + [keychainEntryKey3, keychainEntryValue3], + [keychainEntryKey4, keychainEntryValue4], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [this.fabricKeychainPlugin] }); + + this.fabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: this.org1Env, + sshConfig, + connectionProfile: connectionProfileOrg1, + logLevel: this.options.logLevel || "INFO", + discoveryOptions: { + enabled: true, + asLocalhost: true, + }, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + } + this.log.info(`Creating Fabric Connector...`); + return new PluginLedgerConnectorFabric(this.fabricOptions); + } + + public async createBesuLedgerConnector(): Promise { + const rpcApiHttpHost = await this.besu.getRpcApiHttpHost(); + const rpcApiWsHost = await this.besu.getRpcApiWsHost(); + + const keychainEntryKey = CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT; + const keychainEntryValue = JSON.stringify(SATPContract); + + const keychainEntryKey2 = CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER; + const keychainEntryValue2 = JSON.stringify(SATPWrapperContract); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: CryptoMaterial.keychains.keychain2.id, + logLevel: undefined, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + [keychainEntryKey2, keychainEntryValue2], + ]), + }); + + this.besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), + logLevel: this.options.logLevel || "INFO", + }; + + this.log.info(`Creating Besu Connector...`); + const factory = new PluginFactoryLedgerConnector({ + pluginImportType: PluginImportType.Local, + }); + + const besuConnector = await factory.create(this.besuOptions); + + const accounts = [ + CryptoMaterial.accounts.userA.ethAddress, + CryptoMaterial.accounts.userB.ethAddress, + CryptoMaterial.accounts.bridge.ethAddress, + ]; + + for (const account of accounts) { + await this.besu.sendEthToAccount(account); + } + + return besuConnector; + } + + public async createSATPGateway( + id: string, + name: string, + hostPath: string, + serverPort: number, + clientPort: number, + apiPort: number, + supportedDLTs: SupportedChain[], + proofID: string, + version: DraftVersions[], + logLevel: LogLevelDesc, + counterPartyGateways: GatewayIdentity[], + bridgesConfig: NetworkConfig[], + ): Promise {~ + this.log.info(`Creating Source Gateway...`); + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + const factory = new PluginFactorySATPGateway(factoryOptions); + + const gatewayIdentity = { + id, + name, + version, + supportedDLTs, + proofID, + address: `http://${hostPath}`, + gatewayServerPort: serverPort, + gatewayClientPort: clientPort, + gatewayOpenAPIPort: apiPort, + } as GatewayIdentity; + + const options: SATPGatewayConfig = { + logLevel: logLevel, + gid: gatewayIdentity, + counterPartyGateways, + bridgesConfig: bridgesConfig, + }; + return await factory.create(options); + } + + public async createSATPGateways(): Promise { + const fnTag = `${this.className}#createSATPGateways()`; + const logLevel = this.options.logLevel || "INFO"; + + const fabricGatewayIdentity = { + id: "fabric-satp-gateway-id", + name: "Fabric SATP Gateway", + version: this.draftVersions, + supportedDLTs: [SupportedChain.FABRIC], + proofID: "fabricGatewayProofID", + address: `http://localhost`, + gatewayServerPort: 3010, + gatewayClientPort: 3011, + gatewayOpenAPIPort: 4010, + } as GatewayIdentity; + + const besuGatewayIdentity = { + id: "besu-satp-gateway-id", + name: "Besu SATP Gateway", + version: this.draftVersions, + supportedDLTs: [SupportedChain.FABRIC], + proofID: "besuGatewayProofID", + address: `http://localhost`, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + } as GatewayIdentity; + + const pluginBungeeFabricOptions = { //todo change this when bungee is implemented + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginBungeeBesuOptions = { //todo change this when bungee is implemented + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain2.id, + keychainRef: CryptoMaterial.keychains.keychain2.ref, + }, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + options: this.fabricOptions, + bungeeOptions: pluginBungeeFabricOptions, + } as FabricConfig; + + const besuConfig = { + network: SupportedChain.BESU, + keychainId: CryptoMaterial.keychains.keychain2.id, + signingCredential: { + ethAccount: CryptoMaterial.accounts.bridge.ethAddress, + secret: CryptoMaterial.accounts.bridge.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + contractAddress: this.besuWrapperContractAddress, + options: this.besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + }; + + const besuGatewayOptions = { + logLevel: logLevel, + gid: besuGatewayIdentity, + counterPartyGateways: [fabricGatewayIdentity], + bridgesConfig: [besuConfig], + }; + + const fabricGatewayOptions = { + logLevel: logLevel, + gid: fabricGatewayIdentity, + counterPartyGateways: [besuGatewayIdentity], + bridgesConfig: [fabricConfig], + }; + + const besuGateway = await this.gatewayFactory.create(besuGatewayOptions); + + this.log.info(`Besu Gateway created`); + + const fabricGateway = await this.gatewayFactory.create(fabricGatewayOptions); + + this.log.info(`Fabric Gateway created`); + + + return [fabricGateway, besuGateway]; + } + + public async deployFabricSATPContract( + fabricApiClient: FabricApi, + ): Promise { + const channelId = "mychannel"; + + const contractName = CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT + + const contractRelPath = + "../../../fabric-contracts/satp-contract/chaincode-typescript"; + const contractDir = path.join(__dirname, contractRelPath); + + // ├── package.json + // ├── src + // │ ├── assetTransfer.ts + // │ ├── asset.ts + // │ └── index.ts + // ├── tsconfig.json + // └── tslint.json + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(contractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + this.log.info(`Deploying Fabric SATP contract in API`); + + const res = await fabricApiClient + .deployContractV1( + { + channelId: channelId, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: contractName, + targetOrganizations: [this.org1Env, this.org2Env], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: contractName, + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }, + // { + // maxContentLength: Infinity, + // maxBodyLength: Infinity, + // }, + ); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + Checks.truthy(packageIds, `packageIds truthy OK`); + Checks.truthy( + Array.isArray(packageIds), + `Array.isArray(packageIds) truthy OK`, + ); + + Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); + Checks.truthy( + Array.isArray(approveForMyOrgList), + `Array.isArray(approveForMyOrgList) truthy OK`, + ); + Checks.truthy(installList, `installList truthy OK`); + Checks.truthy( + Array.isArray(installList), + `Array.isArray(installList) truthy OK`, + ); + Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); + Checks.truthy( + Array.isArray(queryInstalledList), + `Array.isArray(queryInstalledList) truthy OK`, + ); + Checks.truthy(commit, `commit truthy OK`); + Checks.truthy(packaging, `packaging truthy OK`); + Checks.truthy(queryCommitted, `queryCommitted truthy OK`); + this.log.info("SATP Contract deployed"); + } + + + public async deployFabricWrapperContract( + fabricApiClient: FabricApi, + ): Promise { + const channelId = "mychannel"; + + const contractName = CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER; + + const contractRelPath = "../../../fabric-contracts/satp-wrapper/chaincode-typescript"; + const contractDir = path.join(__dirname, contractRelPath); + + // ├── package.json + // ├── index.js + // ├── lib + // │ ├── tokenERC20.js + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + contractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + await fabricApiClient + .deployContractV1( + { + channelId, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: contractName, + targetOrganizations: [this.org1Env, this.org2Env], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: contractName, + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 120, + }, + { + maxContentLength: Infinity, + maxBodyLength: Infinity, + }, + ) + .then(async (res: { data: { packageIds: any; lifecycle: any } }) => { + const { packageIds, lifecycle } = res.data; + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + Checks.truthy(packageIds, `packageIds truthy OK`); + Checks.truthy( + Array.isArray(packageIds), + `Array.isArray(packageIds) truthy OK`, + ); + Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); + Checks.truthy( + Array.isArray(approveForMyOrgList), + `Array.isArray(approveForMyOrgList) truthy OK`, + ); + Checks.truthy(installList, `installList truthy OK`); + Checks.truthy( + Array.isArray(installList), + `Array.isArray(installList) truthy OK`, + ); + Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); + Checks.truthy( + Array.isArray(queryInstalledList), + `Array.isArray(queryInstalledList) truthy OK`, + ); + Checks.truthy(commit, `commit truthy OK`); + Checks.truthy(packaging, `packaging truthy OK`); + Checks.truthy(queryCommitted, `queryCommitted truthy OK`); + }) + .catch(() => console.log("trying to deploy fabric contract again")); + } + + public async deployBesuContracts(besuApiClient: BesuApi): Promise { + const fnTag = `${this.className}#deployBesuContracts()`; + + const deployCbdcContractResponse = + await besuApiClient.deployContractSolBytecodeV1({ + keychainId: CryptoMaterial.keychains.keychain2.id, + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + contractAbi: SATPContract.abi, + constructorArgs: [this.besuFirstHighNetWorthAccount, CbdcBridgingAppDummyInfrastructure.BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: this.besuFirstHighNetWorthAccount, + secret: this.besuFirstHighNetWorthAccountPriv, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 10000000, + } as DeployContractSolidityBytecodeV1Request); + + if (deployCbdcContractResponse == undefined) { + throw new Error(`${fnTag}, error when deploying CBDC smart contract`); + } + + this.besuContractAddress = deployCbdcContractResponse.data.transactionReceipt.contractAddress ?? ""; + + const deployWrapperContractResponse = + await besuApiClient.deployContractSolBytecodeV1({ + keychainId: CryptoMaterial.keychains.keychain2.id, + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [ + CryptoMaterial.accounts["bridge"].ethAddress, + ], + web3SigningCredential: { + ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, + secret: CryptoMaterial.accounts["bridge"].privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 10000000, + } as DeployContractSolidityBytecodeV1Request); + + if (deployWrapperContractResponse == undefined) { + throw new Error( + `${fnTag}, error when deploying Asset Reference smart contract`, + ); + } + + this.besuWrapperContractAddress = deployWrapperContractResponse.data.transactionReceipt.contractAddress ?? ""; + + const giveRoleRes = await besuApiClient.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [deployWrapperContractResponse.data.transactionReceipt.contractAddress], + signingCredential: { + ethAccount: this.besuFirstHighNetWorthAccount, + secret: this.besuFirstHighNetWorthAccountPriv, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + Checks.truthy(giveRoleRes, "giveRoleRes"); + } + + public async initializeContractsAndAddPermitions(fabricApiClient: FabricApi, besuApiClient: BesuApi) { + + const fabricInitializeResponse = await fabricApiClient.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [this.userIdentity1.mspId, CbdcBridgingAppDummyInfrastructure.FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin?.getKeychainId()!, + keychainRef: "userA", + }, + }); + + Checks.truthy(fabricInitializeResponse, "fabricInitializeResponse"); + Checks.truthy(fabricInitializeResponse.status, "fabricInitializeResponse.data"); + + if(fabricInitializeResponse.status < 200 || fabricInitializeResponse.status > 299) { + throw new Error("Failed to initialize CBDC Fabric contract"); + } + + const fabricWrapperInitializeResponse = await fabricApiClient.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: ["Org2MSP"], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin?.getKeychainId()!, + keychainRef: "adminUser", + }, + }); + + Checks.truthy(fabricWrapperInitializeResponse, "fabricWrapperInitializeResponse"); + Checks.truthy(fabricWrapperInitializeResponse.status, "fabricWrapperInitializeResponse.data"); + + if(fabricWrapperInitializeResponse.status < 200 || fabricWrapperInitializeResponse.status > 299) { + throw new Error("Failed to initialize Wrapper Fabric contract"); + } + + const setBridgeWrapperResponse = await fabricApiClient.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: ["Org2MSP", CryptoMaterial.accounts.bridge.fabricID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin?.getKeychainId()!, + keychainRef: "adminUser", + }, + }); + + Checks.truthy(setBridgeWrapperResponse, "setBridgeWrapperResponse"); + Checks.truthy(setBridgeWrapperResponse.status, "setBridgeResponse.data"); + + if(setBridgeWrapperResponse.status < 200 || setBridgeWrapperResponse.status > 299) { + throw new Error("Failed to set Bridge Fabric contract"); + } + + const setBridgeCBDCResponse = await fabricApiClient.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin?.getKeychainId()!, + keychainRef: "userA", + }, + }); + + Checks.truthy(setBridgeCBDCResponse, "setBridgeCBDCResponse"); + Checks.truthy(setBridgeCBDCResponse.status, "setBridgeCBDCResponse.data"); + + if(setBridgeCBDCResponse.status < 200 || setBridgeCBDCResponse.status > 299) { + throw new Error("Failed to set Bridge Fabric contract"); + } + + const besuInitializeResponse = await besuApiClient.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [this.besuWrapperContractAddress], + signingCredential: { + ethAccount: this.besuFirstHighNetWorthAccount, + secret: this.besuFirstHighNetWorthAccountPriv, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + Checks.truthy(besuInitializeResponse, "besuInitializeResponse"); + Checks.truthy(besuInitializeResponse.status, "besuInitializeResponse.data"); + + if(besuInitializeResponse.status < 200 || besuInitializeResponse.status > 299) { + throw new Error("Failed to initialize CBDC Besu contract"); + } + + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts new file mode 100755 index 0000000000..811cb8cbb3 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/public-api.ts @@ -0,0 +1,2 @@ +export { CbdcBridgingApp } from "./cbdc-bridging-app"; +//export { launchApp } from "./cbdc-bridging-app-cli"; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json new file mode 100644 index 0000000000..506ad749f3 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/CBDCcontract.json @@ -0,0 +1,2495 @@ +{ + "contractName": "CBDCcontract", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "string", + "name": "asset_ref_id", + "type": "string" + } + ], + "name": "escrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + } + ], + "name": "resetBalanceOf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contract_address", + "type": "address" + } + ], + "name": "setAssetReferenceContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"asset_ref_id\",\"type\":\"string\"}],\"name\":\"escrow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"resetBalanceOf\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"setAssetReferenceContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Create a sample ERC20 standard token\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"SampleERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol\":\"CBDCcontract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol\":{\"keccak256\":\"0x0b74316abddd0f7e38c33034c987eb21560c8ef86d7b03c194a1050c09fee74e\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b0a6ec93f638b1304b1e2ff5fc3dbaa0f5c98ee988c7d8e0a8d4c4eba35cb223\",\"dweb:/ipfs/QmQwRUJN7XPMpTod9SPiNyC6nmKiCHS7pgmmQjAsjYTLVo\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e12cbaa7378fd9b62280e4e1d164bedcb4399ce238f5f98fc0eefb7e50577981\",\"dweb:/ipfs/QmXRoFGUgfsaRkoPT5bxNMtSayKTQ8GZATLPXf69HcRA51\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xd1d8caaeb45f78e0b0715664d56c220c283c89bf8b8c02954af86404d6b367f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://300a0cc7be3b26c96c22a47ffa9530a585e1c4f2dba3021d9bf309dc63007487\",\"dweb:/ipfs/QmQmxsvxK6CaJmQ4D8vDCYPLHMqcMmZLcBqedG4GFAbzu9\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2c3d0973630ed74f2b5ce3944677a885dc70ec32fc83b35f55045a10224da32b\",\"dweb:/ipfs/QmbefZ5RoEZKNHXCALfh683PnaNYzKPcKMFjyY1DVAgq8A\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a376d3dda2cb70536c0a45c208b29b34ac560c4cb4f513a42079f96ba47d2dd\",\"dweb:/ipfs/QmZQg6gn1sUpM8wHzwNvSnihumUCAhxD119MpXeKp8B9s8\"]},\"/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}", + "bytecode": "6080604052600680546001600160a01b031990811673f28d5769171bfbd2b3628d722e58129a6ae15022179091556007805490911690553480156200004357600080fd5b506040518060400160405280601a81526020017f43656e7472616c42616e6b4469676974616c43757272656e6379000000000000815250604051806040016040528060048152602001634342444360e01b815250620000b1620000ab620000d760201b60201c565b620000db565b6004620000bf8382620001d0565b506005620000ce8282620001d0565b5050506200029c565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200015657607f821691505b6020821081036200017757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001cb57600081815260208120601f850160051c81016020861015620001a65750805b601f850160051c820191505b81811015620001c757828155600101620001b2565b5050505b505050565b81516001600160401b03811115620001ec57620001ec6200012b565b6200020481620001fd845462000141565b846200017d565b602080601f8311600181146200023c5760008415620002235750858301515b600019600386901b1c1916600185901b178555620001c7565b600085815260208120601f198616915b828110156200026d578886015182559484019460019091019084016200024c565b50858210156200028c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6111c980620002ac6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b411461025b578063a457c2d714610263578063a9059cbb14610276578063dd62ed3e14610289578063f2fde38b146102c257600080fd5b806342966c68146101e957806370a08231146101fc578063715018a6146102255780638d1a450d1461022d5780638da5cb5b1461024057600080fd5b8063313ce567116100f4578063313ce5671461018c5780633459feb21461019b57806339509351146101b057806340c10f19146101c3578063417d11af146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102d5565b60405161013b9190610e40565b60405180910390f35b610157610152366004610e8f565b610367565b604051901515815260200161013b565b6003545b60405190815260200161013b565b610157610187366004610eb9565b61037e565b6040516012815260200161013b565b6101ae6101a9366004610ef5565b61042d565b005b6101576101be366004610e8f565b6104ad565b6101ae6101d1366004610e8f565b6104e9565b6101ae6101e4366004610f6a565b610521565b6101ae6101f7366004610fe6565b61062f565b61016b61020a366004610fff565b6001600160a01b031660009081526001602052604090205490565b6101ae610672565b6101ae61023b366004610fff565b6106a8565b6000546040516001600160a01b03909116815260200161013b565b61012e6106f4565b610157610271366004610e8f565b610703565b610157610284366004610e8f565b61079c565b61016b610297366004611021565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101ae6102d0366004610fff565b6107a9565b6060600480546102e490611054565b80601f016020809104026020016040519081016040528092919081815260200182805461031090611054565b801561035d5780601f106103325761010080835404028352916020019161035d565b820191906000526020600020905b81548152906001019060200180831161034057829003601f168201915b5050505050905090565b6000610374338484610841565b5060015b92915050565b600061038b848484610966565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104155760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104228533858403610841565b506001949350505050565b6000805b828110156104a75761046384848381811061044e5761044e61108e565b905060200201602081019061020a9190610fff565b915061049584848381811061047a5761047a61108e565b905060200201602081019061048f9190610fff565b83610b34565b8061049f816110ba565b915050610431565b50505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103749185906104e49086906110d3565b610841565b6000546001600160a01b031633146105135760405162461bcd60e51b815260040161040c906110e6565b61051d8282610c7a565b5050565b610529610d59565b60065461053f906001600160a01b03168461079c565b506007546040516000916001600160a01b03169061056790859085908890339060240161111b565b60408051601f198184030181529181526020820180516001600160e01b031663331de64960e11b1790525161059c9190611164565b6000604051808303816000865af19150503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50509050806104a75760405162461bcd60e51b815260206004820181905260248201527f63726561746541737365745265666572656e63652063616c6c206661696c6564604482015260640161040c565b6000546001600160a01b031633146106595760405162461bcd60e51b815260040161040c906110e6565b60065461066f906001600160a01b031682610b34565b50565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161040c906110e6565b6106a66000610dcc565b565b6000546001600160a01b031633146106d25760405162461bcd60e51b815260040161040c906110e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060600580546102e490611054565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156107855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161040c565b6107923385858403610841565b5060019392505050565b6000610374338484610966565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161040c906110e6565b6001600160a01b0381166108385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040c565b61066f81610dcc565b6001600160a01b0383166108a35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b0382166109045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109ca5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610a2c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b6001600160a01b03831660009081526001602052604090205481811015610aa45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161040c565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610adb9084906110d3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b2791815260200190565b60405180910390a36104a7565b6001600160a01b038216610b945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161040c565b6001600160a01b03821660009081526001602052604090205481811015610c085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161040c565b6001600160a01b0383166000908152600160205260408120838303905560038054849290610c37908490611180565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610959565b6001600160a01b038216610cd05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040c565b8060036000828254610ce291906110d3565b90915550506001600160a01b03821660009081526001602052604081208054839290610d0f9084906110d3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6007546001600160a01b03166106a65760405162461bcd60e51b815260206004820152603260248201527f43424443636f6e74726163743a206173736574207265666572656e636520636f6044820152711b9d1c9858dd081b9bdd081919599a5b995960721b606482015260840161040c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b6020815260008251806020840152610e5f816040850160208701610e1c565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610e8a57600080fd5b919050565b60008060408385031215610ea257600080fd5b610eab83610e73565b946020939093013593505050565b600080600060608486031215610ece57600080fd5b610ed784610e73565b9250610ee560208501610e73565b9150604084013590509250925092565b60008060208385031215610f0857600080fd5b823567ffffffffffffffff80821115610f2057600080fd5b818501915085601f830112610f3457600080fd5b813581811115610f4357600080fd5b8660208260051b8501011115610f5857600080fd5b60209290920196919550909350505050565b600080600060408486031215610f7f57600080fd5b83359250602084013567ffffffffffffffff80821115610f9e57600080fd5b818601915086601f830112610fb257600080fd5b813581811115610fc157600080fd5b876020828501011115610fd357600080fd5b6020830194508093505050509250925092565b600060208284031215610ff857600080fd5b5035919050565b60006020828403121561101157600080fd5b61101a82610e73565b9392505050565b6000806040838503121561103457600080fd5b61103d83610e73565b915061104b60208401610e73565b90509250929050565b600181811c9082168061106857607f821691505b60208210810361108857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110cc576110cc6110a4565b5060010190565b80820180821115610378576103786110a4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60608152836060820152838560808301376000608085830181019190915260208201939093526001600160a01b03919091166040820152601f909201601f191690910101919050565b60008251611176818460208701610e1c565b9190910192915050565b81810381811115610378576103786110a456fea26469706673582212208e0d27b796e78bc197361bd99b802d95e06f14b4ad47842414086729e5f6ad7c64736f6c63430008100033", + "deployedBytecode": "608060405234801561001057600080fd5b50600436106101215760003560e01c806342966c68116100ad57806395d89b411161007157806395d89b411461025b578063a457c2d714610263578063a9059cbb14610276578063dd62ed3e14610289578063f2fde38b146102c257600080fd5b806342966c68146101e957806370a08231146101fc578063715018a6146102255780638d1a450d1461022d5780638da5cb5b1461024057600080fd5b8063313ce567116100f4578063313ce5671461018c5780633459feb21461019b57806339509351146101b057806340c10f19146101c3578063417d11af146101d657600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e6102d5565b60405161013b9190610e40565b60405180910390f35b610157610152366004610e8f565b610367565b604051901515815260200161013b565b6003545b60405190815260200161013b565b610157610187366004610eb9565b61037e565b6040516012815260200161013b565b6101ae6101a9366004610ef5565b61042d565b005b6101576101be366004610e8f565b6104ad565b6101ae6101d1366004610e8f565b6104e9565b6101ae6101e4366004610f6a565b610521565b6101ae6101f7366004610fe6565b61062f565b61016b61020a366004610fff565b6001600160a01b031660009081526001602052604090205490565b6101ae610672565b6101ae61023b366004610fff565b6106a8565b6000546040516001600160a01b03909116815260200161013b565b61012e6106f4565b610157610271366004610e8f565b610703565b610157610284366004610e8f565b61079c565b61016b610297366004611021565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101ae6102d0366004610fff565b6107a9565b6060600480546102e490611054565b80601f016020809104026020016040519081016040528092919081815260200182805461031090611054565b801561035d5780601f106103325761010080835404028352916020019161035d565b820191906000526020600020905b81548152906001019060200180831161034057829003601f168201915b5050505050905090565b6000610374338484610841565b5060015b92915050565b600061038b848484610966565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104155760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104228533858403610841565b506001949350505050565b6000805b828110156104a75761046384848381811061044e5761044e61108e565b905060200201602081019061020a9190610fff565b915061049584848381811061047a5761047a61108e565b905060200201602081019061048f9190610fff565b83610b34565b8061049f816110ba565b915050610431565b50505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916103749185906104e49086906110d3565b610841565b6000546001600160a01b031633146105135760405162461bcd60e51b815260040161040c906110e6565b61051d8282610c7a565b5050565b610529610d59565b60065461053f906001600160a01b03168461079c565b506007546040516000916001600160a01b03169061056790859085908890339060240161111b565b60408051601f198184030181529181526020820180516001600160e01b031663331de64960e11b1790525161059c9190611164565b6000604051808303816000865af19150503d80600081146105d9576040519150601f19603f3d011682016040523d82523d6000602084013e6105de565b606091505b50509050806104a75760405162461bcd60e51b815260206004820181905260248201527f63726561746541737365745265666572656e63652063616c6c206661696c6564604482015260640161040c565b6000546001600160a01b031633146106595760405162461bcd60e51b815260040161040c906110e6565b60065461066f906001600160a01b031682610b34565b50565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161040c906110e6565b6106a66000610dcc565b565b6000546001600160a01b031633146106d25760405162461bcd60e51b815260040161040c906110e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060600580546102e490611054565b3360009081526002602090815260408083206001600160a01b0386168452909152812054828110156107855760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161040c565b6107923385858403610841565b5060019392505050565b6000610374338484610966565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161040c906110e6565b6001600160a01b0381166108385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161040c565b61066f81610dcc565b6001600160a01b0383166108a35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161040c565b6001600160a01b0382166109045760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161040c565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109ca5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161040c565b6001600160a01b038216610a2c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161040c565b6001600160a01b03831660009081526001602052604090205481811015610aa45760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161040c565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610adb9084906110d3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b2791815260200190565b60405180910390a36104a7565b6001600160a01b038216610b945760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161040c565b6001600160a01b03821660009081526001602052604090205481811015610c085760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161040c565b6001600160a01b0383166000908152600160205260408120838303905560038054849290610c37908490611180565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610959565b6001600160a01b038216610cd05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161040c565b8060036000828254610ce291906110d3565b90915550506001600160a01b03821660009081526001602052604081208054839290610d0f9084906110d3565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6007546001600160a01b03166106a65760405162461bcd60e51b815260206004820152603260248201527f43424443636f6e74726163743a206173736574207265666572656e636520636f6044820152711b9d1c9858dd081b9bdd081919599a5b995960721b606482015260840161040c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b83811015610e37578181015183820152602001610e1f565b50506000910152565b6020815260008251806020840152610e5f816040850160208701610e1c565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114610e8a57600080fd5b919050565b60008060408385031215610ea257600080fd5b610eab83610e73565b946020939093013593505050565b600080600060608486031215610ece57600080fd5b610ed784610e73565b9250610ee560208501610e73565b9150604084013590509250925092565b60008060208385031215610f0857600080fd5b823567ffffffffffffffff80821115610f2057600080fd5b818501915085601f830112610f3457600080fd5b813581811115610f4357600080fd5b8660208260051b8501011115610f5857600080fd5b60209290920196919550909350505050565b600080600060408486031215610f7f57600080fd5b83359250602084013567ffffffffffffffff80821115610f9e57600080fd5b818601915086601f830112610fb257600080fd5b813581811115610fc157600080fd5b876020828501011115610fd357600080fd5b6020830194508093505050509250925092565b600060208284031215610ff857600080fd5b5035919050565b60006020828403121561101157600080fd5b61101a82610e73565b9392505050565b6000806040838503121561103457600080fd5b61103d83610e73565b915061104b60208401610e73565b90509250929050565b600181811c9082168061106857607f821691505b60208210810361108857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110cc576110cc6110a4565b5060010190565b80820180821115610378576103786110a4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60608152836060820152838560808301376000608085830181019190915260208201939093526001600160a01b03919091166040820152601f909201601f191690910101919050565b60008251611176818460208701610e1c565b9190910192915050565b81810381811115610378576103786110a456fea26469706673582212208e0d27b796e78bc197361bd99b802d95e06f14b4ad47842414086729e5f6ad7c64736f6c63430008100033", + "sourceMap": "319:1524:0:-:0;;;366:76;;;-1:-1:-1;;;;;;366:76:0;;;399:42;366:76;;;;448:39;;;;;;;;494:65;;;;;;;;;;1963:113:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1963:113:2;;;921:32:1;940:12;:10;;;:12;;:::i;:::-;921:18;:32::i;:::-;2029:5:2;:13;2037:5;2029;:13;:::i;:::-;-1:-1:-1;2052:7:2;:17;2062:7;2052;:17;:::i;:::-;;1963:113;;319:1524:0;;640:96:5;719:10;;640:96::o;2270:187:1:-;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:1;;;-1:-1:-1;;;;;;2378:17:1;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;14:127:6:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:380;225:1;221:12;;;;268;;;289:61;;343:4;335:6;331:17;321:27;;289:61;396:2;388:6;385:14;365:18;362:38;359:161;;442:10;437:3;433:20;430:1;423:31;477:4;474:1;467:15;505:4;502:1;495:15;359:161;;146:380;;;:::o;657:545::-;759:2;754:3;751:11;748:448;;;795:1;820:5;816:2;809:17;865:4;861:2;851:19;935:2;923:10;919:19;916:1;912:27;906:4;902:38;971:4;959:10;956:20;953:47;;;-1:-1:-1;994:4:6;953:47;1049:2;1044:3;1040:12;1037:1;1033:20;1027:4;1023:31;1013:41;;1104:82;1122:2;1115:5;1112:13;1104:82;;;1167:17;;;1148:1;1137:13;1104:82;;;1108:3;;;748:448;657:545;;;:::o;1378:1352::-;1498:10;;-1:-1:-1;;;;;1520:30:6;;1517:56;;;1553:18;;:::i;:::-;1582:97;1672:6;1632:38;1664:4;1658:11;1632:38;:::i;:::-;1626:4;1582:97;:::i;:::-;1734:4;;1798:2;1787:14;;1815:1;1810:663;;;;2517:1;2534:6;2531:89;;;-1:-1:-1;2586:19:6;;;2580:26;2531:89;-1:-1:-1;;1335:1:6;1331:11;;;1327:24;1323:29;1313:40;1359:1;1355:11;;;1310:57;2633:81;;1780:944;;1810:663;604:1;597:14;;;641:4;628:18;;-1:-1:-1;;1846:20:6;;;1964:236;1978:7;1975:1;1972:14;1964:236;;;2067:19;;;2061:26;2046:42;;2159:27;;;;2127:1;2115:14;;;;1994:19;;1964:236;;;1968:3;2228:6;2219:7;2216:19;2213:201;;;2289:19;;;2283:26;-1:-1:-1;;2372:1:6;2368:14;;;2384:3;2364:24;2360:37;2356:42;2341:58;2326:74;;2213:201;-1:-1:-1;;;;;2460:1:6;2444:14;;;2440:22;2427:36;;-1:-1:-1;1378:1352:6:o;:::-;319:1524:0;;;;;;", + "deployedSourceMap": "319:1524:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2141:98:2;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4238:166;;;;;;:::i;:::-;;:::i;:::-;;;1272:14:6;;1265:22;1247:41;;1235:2;1220:18;4238:166:2;1107:187:6;3229:106:2;3316:12;;3229:106;;;1445:25:6;;;1433:2;1418:18;3229:106:2;1299:177:6;4871:478:2;;;;;;:::i;:::-;;:::i;3078:91::-;;;3160:2;1956:36:6;;1944:2;1929:18;3078:91:2;1814:184:6;1600:241:0;;;;;;:::i;:::-;;:::i;:::-;;5744:212:2;;;;;;:::i;:::-;;:::i;705:105:0:-;;;;;;:::i;:::-;;:::i;917:381::-;;;;;;:::i;:::-;;:::i;816:95::-;;;;;;:::i;:::-;;:::i;3393:125:2:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3493:18:2;3467:7;3493:18;;;:9;:18;;;;;;;3393:125;1668:101:1;;;:::i;565:134:0:-;;;;;;:::i;:::-;;:::i;1036:85:1:-;1082:7;1108:6;1036:85;;-1:-1:-1;;;;;1108:6:1;;;3810:51:6;;3798:2;3783:18;1036:85:1;3664:203:6;2352:102:2;;;:::i;6443:405::-;;;;;;:::i;:::-;;:::i;3721:172::-;;;;;;:::i;:::-;;:::i;3951:149::-;;;;;;:::i;:::-;-1:-1:-1;;;;;4066:18:2;;;4040:7;4066:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3951:149;1918:198:1;;;;;;:::i;:::-;;:::i;2141:98:2:-;2195:13;2227:5;2220:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2141:98;:::o;4238:166::-;4321:4;4337:39;719:10:5;4360:7:2;4369:6;4337:8;:39::i;:::-;-1:-1:-1;4393:4:2;4238:166;;;;;:::o;4871:478::-;5007:4;5023:36;5033:6;5041:9;5052:6;5023:9;:36::i;:::-;-1:-1:-1;;;;;5097:19:2;;5070:24;5097:19;;;:11;:19;;;;;;;;719:10:5;5097:33:2;;;;;;;;5148:26;;;;5140:79;;;;-1:-1:-1;;;5140:79:2;;4724:2:6;5140:79:2;;;4706:21:6;4763:2;4743:18;;;4736:30;4802:34;4782:18;;;4775:62;-1:-1:-1;;;4853:18:6;;;4846:38;4901:19;;5140:79:2;;;;;;;;;5253:57;5262:6;719:10:5;5303:6:2;5284:16;:25;5253:8;:57::i;:::-;-1:-1:-1;5338:4:2;;4871:478;-1:-1:-1;;;;4871:478:2:o;1600:241:0:-;1672:14;;1696:139;1713:19;;;1696:139;;;1762:22;1772:8;;1781:1;1772:11;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;1762:22::-;1753:31;;1798:26;1804:8;;1813:1;1804:11;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;1817:6;1798:5;:26::i;:::-;1734:3;;;;:::i;:::-;;;;1696:139;;;;1662:179;1600:241;;:::o;5744:212:2:-;719:10:5;5832:4:2;5880:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;5880:34:2;;;;;;;;;;5832:4;;5848:80;;5871:7;;5880:47;;5917:10;;5880:47;:::i;:::-;5848:8;:80::i;705:105:0:-;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;781:22:0::1;787:7;796:6;781:5;:22::i;:::-;705:105:::0;;:::o;917:381::-;1515:24;:22;:24::i;:::-;1023:14:::1;::::0;1014:32:::1;::::0;-1:-1:-1;;;;;1023:14:0::1;1039:6:::0;1014:8:::1;:32::i;:::-;-1:-1:-1::0;1076:18:0::1;::::0;1113:105:::1;::::0;1058:12:::1;::::0;-1:-1:-1;;;;;1076:18:0::1;::::0;1113:105:::1;::::0;1185:12;;;;1199:6;;1207:10:::1;::::0;1113:105:::1;;;:::i;:::-;;::::0;;-1:-1:-1;;1113:105:0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;1113:105:0::1;-1:-1:-1::0;;;1113:105:0::1;::::0;;1076:152;::::1;::::0;1113:105;1076:152:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1057:171;;;1247:7;1239:52;;;::::0;-1:-1:-1;;;1239:52:0;;6888:2:6;1239:52:0::1;::::0;::::1;6870:21:6::0;;;6907:18;;;6900:30;6966:34;6946:18;;;6939:62;7018:18;;1239:52:0::1;6686:356:6::0;816:95:0;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;881:14:0::1;::::0;875:29:::1;::::0;-1:-1:-1;;;;;881:14:0::1;897:6:::0;875:5:::1;:29::i;:::-;816:95:::0;:::o;1668:101:1:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;565:134:0:-;1082:7:1;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;655:18:0::1;:37:::0;;-1:-1:-1;;;;;;655:37:0::1;-1:-1:-1::0;;;;;655:37:0;;;::::1;::::0;;;::::1;::::0;;565:134::o;2352:102:2:-;2408:13;2440:7;2433:14;;;;;:::i;6443:405::-;719:10:5;6536:4:2;6579:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;6579:34:2;;;;;;;;;;6631:35;;;;6623:85;;;;-1:-1:-1;;;6623:85:2;;7249:2:6;6623:85:2;;;7231:21:6;7288:2;7268:18;;;7261:30;7327:34;7307:18;;;7300:62;-1:-1:-1;;;7378:18:6;;;7371:35;7423:19;;6623:85:2;7047:401:6;6623:85:2;6742:67;719:10:5;6765:7:2;6793:15;6774:16;:34;6742:8;:67::i;:::-;-1:-1:-1;6837:4:2;;6443:405;-1:-1:-1;;;6443:405:2:o;3721:172::-;3807:4;3823:42;719:10:5;3847:9:2;3858:6;3823:9;:42::i;1918:198:1:-;1082:7;1108:6;-1:-1:-1;;;;;1108:6:1;719:10:5;1248:23:1;1240:68;;;;-1:-1:-1;;;1240:68:1;;;;;;;:::i;:::-;-1:-1:-1;;;;;2006:22:1;::::1;1998:73;;;::::0;-1:-1:-1;;;1998:73:1;;7655:2:6;1998:73:1::1;::::0;::::1;7637:21:6::0;7694:2;7674:18;;;7667:30;7733:34;7713:18;;;7706:62;-1:-1:-1;;;7784:18:6;;;7777:36;7830:19;;1998:73:1::1;7453:402:6::0;1998:73:1::1;2081:28;2100:8;2081:18;:28::i;10019:370:2:-:0;-1:-1:-1;;;;;10150:19:2;;10142:68;;;;-1:-1:-1;;;10142:68:2;;8062:2:6;10142:68:2;;;8044:21:6;8101:2;8081:18;;;8074:30;8140:34;8120:18;;;8113:62;-1:-1:-1;;;8191:18:6;;;8184:34;8235:19;;10142:68:2;7860:400:6;10142:68:2;-1:-1:-1;;;;;10228:21:2;;10220:68;;;;-1:-1:-1;;;10220:68:2;;8467:2:6;10220:68:2;;;8449:21:6;8506:2;8486:18;;;8479:30;8545:34;8525:18;;;8518:62;-1:-1:-1;;;8596:18:6;;;8589:32;8638:19;;10220:68:2;8265:398:6;10220:68:2;-1:-1:-1;;;;;10299:18:2;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10350:32;;1445:25:6;;;10350:32:2;;1418:18:6;10350:32:2;;;;;;;;10019:370;;;:::o;7322:713::-;-1:-1:-1;;;;;7457:20:2;;7449:70;;;;-1:-1:-1;;;7449:70:2;;8870:2:6;7449:70:2;;;8852:21:6;8909:2;8889:18;;;8882:30;8948:34;8928:18;;;8921:62;-1:-1:-1;;;8999:18:6;;;8992:35;9044:19;;7449:70:2;8668:401:6;7449:70:2;-1:-1:-1;;;;;7537:23:2;;7529:71;;;;-1:-1:-1;;;7529:71:2;;9276:2:6;7529:71:2;;;9258:21:6;9315:2;9295:18;;;9288:30;9354:34;9334:18;;;9327:62;-1:-1:-1;;;9405:18:6;;;9398:33;9448:19;;7529:71:2;9074:399:6;7529:71:2;-1:-1:-1;;;;;7693:17:2;;7669:21;7693:17;;;:9;:17;;;;;;7728:23;;;;7720:74;;;;-1:-1:-1;;;7720:74:2;;9680:2:6;7720:74:2;;;9662:21:6;9719:2;9699:18;;;9692:30;9758:34;9738:18;;;9731:62;-1:-1:-1;;;9809:18:6;;;9802:36;9855:19;;7720:74:2;9478:402:6;7720:74:2;-1:-1:-1;;;;;7828:17:2;;;;;;;:9;:17;;;;;;7848:22;;;7828:42;;7890:20;;;;;;;;:30;;7864:6;;7828:17;7890:30;;7864:6;;7890:30;:::i;:::-;;;;;;;;7953:9;-1:-1:-1;;;;;7936:35:2;7945:6;-1:-1:-1;;;;;7936:35:2;;7964:6;7936:35;;;;1445:25:6;;1433:2;1418:18;;1299:177;7936:35:2;;;;;;;;7982:46;9020:576;;-1:-1:-1;;;;;9103:21:2;;9095:67;;;;-1:-1:-1;;;9095:67:2;;10087:2:6;9095:67:2;;;10069:21:6;10126:2;10106:18;;;10099:30;10165:34;10145:18;;;10138:62;-1:-1:-1;;;10216:18:6;;;10209:31;10257:19;;9095:67:2;9885:397:6;9095:67:2;-1:-1:-1;;;;;9258:18:2;;9233:22;9258:18;;;:9;:18;;;;;;9294:24;;;;9286:71;;;;-1:-1:-1;;;9286:71:2;;10489:2:6;9286:71:2;;;10471:21:6;10528:2;10508:18;;;10501:30;10567:34;10547:18;;;10540:62;-1:-1:-1;;;10618:18:6;;;10611:32;10660:19;;9286:71:2;10287:398:6;9286:71:2;-1:-1:-1;;;;;9391:18:2;;;;;;:9;:18;;;;;9412:23;;;9391:44;;9455:12;:22;;9429:6;;9391:18;9455:22;;9429:6;;9455:22;:::i;:::-;;;;-1:-1:-1;;9493:37:2;;1445:25:6;;;9519:1:2;;-1:-1:-1;;;;;9493:37:2;;;;;1433:2:6;1418:18;9493:37:2;1299:177:6;8311:389:2;-1:-1:-1;;;;;8394:21:2;;8386:65;;;;-1:-1:-1;;;8386:65:2;;11025:2:6;8386:65:2;;;11007:21:6;11064:2;11044:18;;;11037:30;11103:33;11083:18;;;11076:61;11154:18;;8386:65:2;10823:355:6;8386:65:2;8538:6;8522:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;8554:18:2;;;;;;:9;:18;;;;;:28;;8576:6;;8554:18;:28;;8576:6;;8554:28;:::i;:::-;;;;-1:-1:-1;;8597:37:2;;1445:25:6;;;-1:-1:-1;;;;;8597:37:2;;;8614:1;;8597:37;;1433:2:6;1418:18;8597:37:2;;;;;;;705:105:0;;:::o;1304:168::-;1378:18;;-1:-1:-1;;;;;1378:18:0;1370:95;;;;-1:-1:-1;;;1370:95:0;;11385:2:6;1370:95:0;;;11367:21:6;11424:2;11404:18;;;11397:30;11463:34;11443:18;;;11436:62;-1:-1:-1;;;11514:18:6;;;11507:48;11572:19;;1370:95:0;11183:414:6;2270:187:1;2343:16;2362:6;;-1:-1:-1;;;;;2378:17:1;;;-1:-1:-1;;;;;;2378:17:1;;;;;;2410:40;;2362:6;;;;;;;2410:40;;2343:16;2410:40;2333:124;2270:187;:::o;14:250:6:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:6;238:16;;231:27;14:250::o;269:396::-;418:2;407:9;400:21;381:4;450:6;444:13;493:6;488:2;477:9;473:18;466:34;509:79;581:6;576:2;565:9;561:18;556:2;548:6;544:15;509:79;:::i;:::-;649:2;628:15;-1:-1:-1;;624:29:6;609:45;;;;656:2;605:54;;269:396;-1:-1:-1;;269:396:6:o;670:173::-;738:20;;-1:-1:-1;;;;;787:31:6;;777:42;;767:70;;833:1;830;823:12;767:70;670:173;;;:::o;848:254::-;916:6;924;977:2;965:9;956:7;952:23;948:32;945:52;;;993:1;990;983:12;945:52;1016:29;1035:9;1016:29;:::i;:::-;1006:39;1092:2;1077:18;;;;1064:32;;-1:-1:-1;;;848:254:6:o;1481:328::-;1558:6;1566;1574;1627:2;1615:9;1606:7;1602:23;1598:32;1595:52;;;1643:1;1640;1633:12;1595:52;1666:29;1685:9;1666:29;:::i;:::-;1656:39;;1714:38;1748:2;1737:9;1733:18;1714:38;:::i;:::-;1704:48;;1799:2;1788:9;1784:18;1771:32;1761:42;;1481:328;;;;;:::o;2003:615::-;2089:6;2097;2150:2;2138:9;2129:7;2125:23;2121:32;2118:52;;;2166:1;2163;2156:12;2118:52;2206:9;2193:23;2235:18;2276:2;2268:6;2265:14;2262:34;;;2292:1;2289;2282:12;2262:34;2330:6;2319:9;2315:22;2305:32;;2375:7;2368:4;2364:2;2360:13;2356:27;2346:55;;2397:1;2394;2387:12;2346:55;2437:2;2424:16;2463:2;2455:6;2452:14;2449:34;;;2479:1;2476;2469:12;2449:34;2532:7;2527:2;2517:6;2514:1;2510:14;2506:2;2502:23;2498:32;2495:45;2492:65;;;2553:1;2550;2543:12;2492:65;2584:2;2576:11;;;;;2606:6;;-1:-1:-1;2003:615:6;;-1:-1:-1;;;;2003:615:6:o;2623:660::-;2703:6;2711;2719;2772:2;2760:9;2751:7;2747:23;2743:32;2740:52;;;2788:1;2785;2778:12;2740:52;2824:9;2811:23;2801:33;;2885:2;2874:9;2870:18;2857:32;2908:18;2949:2;2941:6;2938:14;2935:34;;;2965:1;2962;2955:12;2935:34;3003:6;2992:9;2988:22;2978:32;;3048:7;3041:4;3037:2;3033:13;3029:27;3019:55;;3070:1;3067;3060:12;3019:55;3110:2;3097:16;3136:2;3128:6;3125:14;3122:34;;;3152:1;3149;3142:12;3122:34;3197:7;3192:2;3183:6;3179:2;3175:15;3171:24;3168:37;3165:57;;;3218:1;3215;3208:12;3165:57;3249:2;3245;3241:11;3231:21;;3271:6;3261:16;;;;;2623:660;;;;;:::o;3288:180::-;3347:6;3400:2;3388:9;3379:7;3375:23;3371:32;3368:52;;;3416:1;3413;3406:12;3368:52;-1:-1:-1;3439:23:6;;3288:180;-1:-1:-1;3288:180:6:o;3473:186::-;3532:6;3585:2;3573:9;3564:7;3560:23;3556:32;3553:52;;;3601:1;3598;3591:12;3553:52;3624:29;3643:9;3624:29;:::i;:::-;3614:39;3473:186;-1:-1:-1;;;3473:186:6:o;3872:260::-;3940:6;3948;4001:2;3989:9;3980:7;3976:23;3972:32;3969:52;;;4017:1;4014;4007:12;3969:52;4040:29;4059:9;4040:29;:::i;:::-;4030:39;;4088:38;4122:2;4111:9;4107:18;4088:38;:::i;:::-;4078:48;;3872:260;;;;;:::o;4137:380::-;4216:1;4212:12;;;;4259;;;4280:61;;4334:4;4326:6;4322:17;4312:27;;4280:61;4387:2;4379:6;4376:14;4356:18;4353:38;4350:161;;4433:10;4428:3;4424:20;4421:1;4414:31;4468:4;4465:1;4458:15;4496:4;4493:1;4486:15;4350:161;;4137:380;;;:::o;4931:127::-;4992:10;4987:3;4983:20;4980:1;4973:31;5023:4;5020:1;5013:15;5047:4;5044:1;5037:15;5063:127;5124:10;5119:3;5115:20;5112:1;5105:31;5155:4;5152:1;5145:15;5179:4;5176:1;5169:15;5195:135;5234:3;5255:17;;;5252:43;;5275:18;;:::i;:::-;-1:-1:-1;5322:1:6;5311:13;;5195:135::o;5335:125::-;5400:9;;;5421:10;;;5418:36;;;5434:18;;:::i;5465:356::-;5667:2;5649:21;;;5686:18;;;5679:30;5745:34;5740:2;5725:18;;5718:62;5812:2;5797:18;;5465:356::o;5826:563::-;6041:2;6030:9;6023:21;6080:6;6075:2;6064:9;6060:18;6053:34;6138:6;6130;6124:3;6113:9;6109:19;6096:49;6195:1;6189:3;6165:22;;;6161:32;;6154:43;;;;6300:4;6285:20;;6278:36;;;;-1:-1:-1;;;;;6350:32:6;;;;6345:2;6330:18;;6323:60;6258:2;6237:15;;;-1:-1:-1;;6233:29:6;6218:45;;;6214:55;;;-1:-1:-1;5826:563:6:o;6394:287::-;6523:3;6561:6;6555:13;6577:66;6636:6;6631:3;6624:4;6616:6;6612:17;6577:66;:::i;:::-;6659:16;;;;;6394:287;-1:-1:-1;;6394:287:6:o;10690:128::-;10757:9;;;10778:11;;;10775:37;;;10792:18;;:::i", + "sourcePath": "/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol", + "compiler": { + "name": "solc", + "version": "0.8.16+commit.07a7930e" + }, + "ast": { + "absolutePath": "/home/andre_9a/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol", + "exportedSymbols": { + "CBDCcontract": [ + 162 + ], + "Context": [ + 938 + ], + "ERC20": [ + 813 + ], + "IERC20": [ + 891 + ], + "IERC20Metadata": [ + 916 + ], + "Ownable": [ + 267 + ] + }, + "id": 163, + "license": "GPL-3.0", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "37:24:0" + }, + { + "absolutePath": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol", + "file": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/access/Ownable.sol", + "id": 2, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 163, + "sourceUnit": 268, + "src": "63:87:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", + "file": "/home/andre_9a/cactus/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol", + "id": 3, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 163, + "sourceUnit": 814, + "src": "151:90:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5, + "name": "Ownable", + "nameLocations": [ + "344:7:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 267, + "src": "344:7:0" + }, + "id": 6, + "nodeType": "InheritanceSpecifier", + "src": "344:7:0" + }, + { + "baseName": { + "id": 7, + "name": "ERC20", + "nameLocations": [ + "353:5:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 813, + "src": "353:5:0" + }, + "id": 8, + "nodeType": "InheritanceSpecifier", + "src": "353:5:0" + } + ], + "canonicalName": "CBDCcontract", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4, + "nodeType": "StructuredDocumentation", + "src": "243:74:0", + "text": " @title SampleERC20\n @dev Create a sample ERC20 standard token" + }, + "fullyImplemented": true, + "id": 162, + "linearizedBaseContracts": [ + 162, + 813, + 916, + 891, + 267, + 938 + ], + "name": "CBDCcontract", + "nameLocation": "328:12:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 14, + "mutability": "mutable", + "name": "bridge_address", + "nameLocation": "374:14:0", + "nodeType": "VariableDeclaration", + "scope": 162, + "src": "366:76:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "366:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "307866323864353736393137316266624432423336323864373232653538313239613661453135303232", + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "399:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xf28d5769171bfbD2B3628d722e58129a6aE15022" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "391:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 10, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "391:7:0", + "typeDescriptions": {} + } + }, + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "391:51:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 20, + "mutability": "mutable", + "name": "asset_ref_contract", + "nameLocation": "456:18:0", + "nodeType": "VariableDeclaration", + "scope": 162, + "src": "448:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "448:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "arguments": [ + { + "hexValue": "30", + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "485:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "477:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 16, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "477:7:0", + "typeDescriptions": {} + } + }, + "id": 19, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "477:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "552:7:0", + "statements": [] + }, + "id": 28, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "hexValue": "43656e7472616c42616e6b4469676974616c43757272656e6379", + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "514:28:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1e522a826804464981a3e2267dfbb8df03bd96487a0a7d8d35033a23e211146a", + "typeString": "literal_string \"CentralBankDigitalCurrency\"" + }, + "value": "CentralBankDigitalCurrency" + }, + { + "hexValue": "43424443", + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "544:6:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c71aa5a70a4f17bfd28bb6a719471c9c3eaa418d8bb831941073ae5e16c15076", + "typeString": "literal_string \"CBDC\"" + }, + "value": "CBDC" + } + ], + "id": 25, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 22, + "name": "ERC20", + "nameLocations": [ + "508:5:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 813, + "src": "508:5:0" + }, + "nodeType": "ModifierInvocation", + "src": "508:43:0" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 21, + "nodeType": "ParameterList", + "parameters": [], + "src": "505:2:0" + }, + "returnParameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [], + "src": "552:0:0" + }, + "scope": 162, + "src": "494:65:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "645:54:0", + "statements": [ + { + "expression": { + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 35, + "name": "asset_ref_contract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "655:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 36, + "name": "contract_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "676:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "655:37:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 38, + "nodeType": "ExpressionStatement", + "src": "655:37:0" + } + ] + }, + "functionSelector": "8d1a450d", + "id": 40, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 33, + "kind": "modifierInvocation", + "modifierName": { + "id": 32, + "name": "onlyOwner", + "nameLocations": [ + "635:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 209, + "src": "635:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "635:9:0" + } + ], + "name": "setAssetReferenceContract", + "nameLocation": "574:25:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "mutability": "mutable", + "name": "contract_address", + "nameLocation": "608:16:0", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "600:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "600:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "599:26:0" + }, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "645:0:0" + }, + "scope": 162, + "src": "565:134:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 54, + "nodeType": "Block", + "src": "771:39:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 50, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "787:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 51, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "796:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 49, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 673, + "src": "781:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "781:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 53, + "nodeType": "ExpressionStatement", + "src": "781:22:0" + } + ] + }, + "functionSelector": "40c10f19", + "id": 55, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 47, + "kind": "modifierInvocation", + "modifierName": { + "id": 46, + "name": "onlyOwner", + "nameLocations": [ + "761:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 209, + "src": "761:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "761:9:0" + } + ], + "name": "mint", + "nameLocation": "714:4:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 45, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "mutability": "mutable", + "name": "account", + "nameLocation": "727:7:0", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "719:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "719:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 44, + "mutability": "mutable", + "name": "amount", + "nameLocation": "744:6:0", + "nodeType": "VariableDeclaration", + "scope": 55, + "src": "736:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 43, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "736:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "718:33:0" + }, + "returnParameters": { + "id": 48, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:0:0" + }, + "scope": 162, + "src": "705:105:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 67, + "nodeType": "Block", + "src": "865:46:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 63, + "name": "bridge_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "881:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 64, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "897:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 62, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 745, + "src": "875:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "875:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 66, + "nodeType": "ExpressionStatement", + "src": "875:29:0" + } + ] + }, + "functionSelector": "42966c68", + "id": 68, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 60, + "kind": "modifierInvocation", + "modifierName": { + "id": 59, + "name": "onlyOwner", + "nameLocations": [ + "855:9:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 209, + "src": "855:9:0" + }, + "nodeType": "ModifierInvocation", + "src": "855:9:0" + } + ], + "name": "burn", + "nameLocation": "825:4:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 58, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 57, + "mutability": "mutable", + "name": "amount", + "nameLocation": "838:6:0", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "830:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 56, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "829:16:0" + }, + "returnParameters": { + "id": 61, + "nodeType": "ParameterList", + "parameters": [], + "src": "865:0:0" + }, + "scope": 162, + "src": "816:95:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 101, + "nodeType": "Block", + "src": "1004:294:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 78, + "name": "bridge_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 14, + "src": "1023:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 79, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "1039:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 77, + "name": "transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 387, + "src": "1014:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 80, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1014:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 81, + "nodeType": "ExpressionStatement", + "src": "1014:32:0" + }, + { + "assignments": [ + 83, + null + ], + "declarations": [ + { + "constant": false, + "id": 83, + "mutability": "mutable", + "name": "success", + "nameLocation": "1063:7:0", + "nodeType": "VariableDeclaration", + "scope": 101, + "src": "1058:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 82, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1058:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 95, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "63726561746541737365745265666572656e636528737472696e672c75696e743235362c6164647265737329", + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1137:46:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_663bcc920598c723df9b3a760a5a7d3abac3eae3f6190deac4bbb6aba0477d08", + "typeString": "literal_string \"createAssetReference(string,uint256,address)\"" + }, + "value": "createAssetReference(string,uint256,address)" + }, + { + "id": 89, + "name": "asset_ref_id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "1185:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "id": 90, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "1199:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 91, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1207:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1211:6:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1207:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_663bcc920598c723df9b3a760a5a7d3abac3eae3f6190deac4bbb6aba0477d08", + "typeString": "literal_string \"createAssetReference(string,uint256,address)\"" + }, + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 86, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "1113:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 87, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1117:19:0", + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "1113:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1113:105:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 84, + "name": "asset_ref_contract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1076:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1095:4:0", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "1076:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1076:152:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1057:171:0" + }, + { + "expression": { + "arguments": [ + { + "id": 97, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 83, + "src": "1247:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "63726561746541737365745265666572656e63652063616c6c206661696c6564", + "id": 98, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1256:34:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93169b227269284795eb472a6a53f2c082e0e5a5494d86528976ebe95cb05d72", + "typeString": "literal_string \"createAssetReference call failed\"" + }, + "value": "createAssetReference call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93169b227269284795eb472a6a53f2c082e0e5a5494d86528976ebe95cb05d72", + "typeString": "literal_string \"createAssetReference call failed\"" + } + ], + "id": 96, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1239:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 100, + "nodeType": "ExpressionStatement", + "src": "1239:52:0" + } + ] + }, + "functionSelector": "417d11af", + "id": 102, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 75, + "kind": "modifierInvocation", + "modifierName": { + "id": 74, + "name": "checkARContract", + "nameLocations": [ + "988:15:0" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 123, + "src": "988:15:0" + }, + "nodeType": "ModifierInvocation", + "src": "988:15:0" + } + ], + "name": "escrow", + "nameLocation": "926:6:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 70, + "mutability": "mutable", + "name": "amount", + "nameLocation": "941:6:0", + "nodeType": "VariableDeclaration", + "scope": 102, + "src": "933:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 72, + "mutability": "mutable", + "name": "asset_ref_id", + "nameLocation": "965:12:0", + "nodeType": "VariableDeclaration", + "scope": 102, + "src": "949:28:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 71, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "949:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "932:46:0" + }, + "returnParameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [], + "src": "1004:0:0" + }, + "scope": 162, + "src": "917:381:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 115, + "nodeType": "Block", + "src": "1360:112:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 106, + "name": "asset_ref_contract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1378:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 109, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1408:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1400:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 107, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1400:7:0", + "typeDescriptions": {} + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1400:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1378:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "43424443636f6e74726163743a206173736574207265666572656e636520636f6e7472616374206e6f7420646566696e6564", + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1412:52:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_81032450132c43b9f8878276153b2ea85a9c962c1591b18b864a02232e1beff8", + "typeString": "literal_string \"CBDCcontract: asset reference contract not defined\"" + }, + "value": "CBDCcontract: asset reference contract not defined" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_81032450132c43b9f8878276153b2ea85a9c962c1591b18b864a02232e1beff8", + "typeString": "literal_string \"CBDCcontract: asset reference contract not defined\"" + } + ], + "id": 105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1370:95:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 114, + "nodeType": "ExpressionStatement", + "src": "1370:95:0" + } + ] + }, + "id": 116, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkAssetRefContract", + "nameLocation": "1313:22:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 103, + "nodeType": "ParameterList", + "parameters": [], + "src": "1335:2:0" + }, + "returnParameters": { + "id": 104, + "nodeType": "ParameterList", + "parameters": [], + "src": "1360:0:0" + }, + "scope": 162, + "src": "1304:168:0", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 122, + "nodeType": "Block", + "src": "1505:52:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 118, + "name": "_checkAssetRefContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "1515:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1515:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "1515:24:0" + }, + { + "id": 121, + "nodeType": "PlaceholderStatement", + "src": "1549:1:0" + } + ] + }, + "id": 123, + "name": "checkARContract", + "nameLocation": "1487:15:0", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 117, + "nodeType": "ParameterList", + "parameters": [], + "src": "1502:2:0" + }, + "src": "1478:79:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 160, + "nodeType": "Block", + "src": "1662:179:0", + "statements": [ + { + "assignments": [ + 130 + ], + "declarations": [ + { + "constant": false, + "id": 130, + "mutability": "mutable", + "name": "toBurn", + "nameLocation": "1680:6:0", + "nodeType": "VariableDeclaration", + "scope": 160, + "src": "1672:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1672:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 131, + "nodeType": "VariableDeclarationStatement", + "src": "1672:14:0" + }, + { + "body": { + "id": 158, + "nodeType": "Block", + "src": "1739:96:0", + "statements": [ + { + "expression": { + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 143, + "name": "toBurn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1753:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 145, + "name": "accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1772:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 147, + "indexExpression": { + "id": 146, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "1781:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1772:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 144, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "1762:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1762:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1753:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 150, + "nodeType": "ExpressionStatement", + "src": "1753:31:0" + }, + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 152, + "name": "accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1804:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 154, + "indexExpression": { + "id": 153, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "1813:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1804:11:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 155, + "name": "toBurn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1817:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 151, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 745, + "src": "1798:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1798:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "ExpressionStatement", + "src": "1798:26:0" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 136, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "1713:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 137, + "name": "accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "1717:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1726:6:0", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1717:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1713:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 159, + "initializationExpression": { + "assignments": [ + 133 + ], + "declarations": [ + { + "constant": false, + "id": 133, + "mutability": "mutable", + "name": "i", + "nameLocation": "1706:1:0", + "nodeType": "VariableDeclaration", + "scope": 159, + "src": "1701:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 132, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1701:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 135, + "initialValue": { + "hexValue": "30", + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1710:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1701:10:0" + }, + "loopExpression": { + "expression": { + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1734:3:0", + "subExpression": { + "id": 140, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "1734:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 142, + "nodeType": "ExpressionStatement", + "src": "1734:3:0" + }, + "nodeType": "ForStatement", + "src": "1696:139:0" + } + ] + }, + "functionSelector": "3459feb2", + "id": 161, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "resetBalanceOf", + "nameLocation": "1609:14:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 126, + "mutability": "mutable", + "name": "accounts", + "nameLocation": "1643:8:0", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "1624:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1624:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ArrayTypeName", + "src": "1624:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1623:29:0" + }, + "returnParameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [], + "src": "1662:0:0" + }, + "scope": 162, + "src": "1600:241:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 163, + "src": "319:1524:0", + "usedErrors": [] + } + ], + "src": "37:1807:0" + }, + "functionHashes": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "burn(uint256)": "42966c68", + "decimals()": "313ce567", + "decreaseAllowance(address,uint256)": "a457c2d7", + "escrow(uint256,string)": "417d11af", + "increaseAllowance(address,uint256)": "39509351", + "mint(address,uint256)": "40c10f19", + "name()": "06fdde03", + "owner()": "8da5cb5b", + "renounceOwnership()": "715018a6", + "resetBalanceOf(address[])": "3459feb2", + "setAssetReferenceContract(address)": "8d1a450d", + "symbol()": "95d89b41", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd", + "transferOwnership(address)": "f2fde38b" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "910600", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "allowance(address,address)": "infinite", + "approve(address,uint256)": "24644", + "balanceOf(address)": "2582", + "burn(uint256)": "55148", + "decimals()": "200", + "decreaseAllowance(address,uint256)": "26933", + "escrow(uint256,string)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "mint(address,uint256)": "infinite", + "name()": "infinite", + "owner()": "2412", + "renounceOwnership()": "28181", + "resetBalanceOf(address[])": "infinite", + "setAssetReferenceContract(address)": "26800", + "symbol()": "infinite", + "totalSupply()": "2349", + "transfer(address,uint256)": "infinite", + "transferFrom(address,address,uint256)": "infinite", + "transferOwnership(address)": "28419" + }, + "internal": { + "_checkAssetRefContract()": "infinite" + } + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol new file mode 100644 index 0000000000..61b1d6e250 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-contract-test.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; +import "remix_tests.sol"; +import "../contracts/CBDCcontract.sol"; +import "../contracts/AssetReferenceContract.sol"; + +contract CBDCcontractTest { + + address bridge_address = address(0xf28d5769171bfbD2B3628d722e58129a6aE15022); + AssetReferenceContract assetRefContract; + CBDCcontract cbdcContract; + + function beforeEach () public { + cbdcContract = new CBDCcontract(); + assetRefContract = new AssetReferenceContract(address(cbdcContract)); + + cbdcContract.setAssetReferenceContract(address(assetRefContract)); + cbdcContract.setAssetReferenceContract(address(assetRefContract)); + assetRefContract.addOwner(address(cbdcContract)); + } + + function testTokenNameAndSymbol () public { + Assert.equal(cbdcContract.name(), "CentralBankDigitalCurrency", "token name did not match"); + Assert.equal(cbdcContract.symbol(), "CBDC", "token symbol did not match"); + } + + function mintEscrowAndBurnTokens () public { + cbdcContract.mint(address(this), 222); + uint256 balance = cbdcContract.balanceOf(address(this)); + Assert.equal(balance, 222, "tokens minted did not match"); + } + + function escrowTokens() public { + cbdcContract.mint(address(this), 222); + cbdcContract.escrow(222, "id1"); + + Assert.equal(assetRefContract.isPresent("id1"), true, "asset reference should be present"); + Assert.equal(cbdcContract.balanceOf(bridge_address), 222, "bridge balance not updated"); + } + + function burnTokens() public { + cbdcContract.mint(address(this), 222); + cbdcContract.escrow(222, "id1"); + cbdcContract.burn(222); + + Assert.equal(cbdcContract.balanceOf(bridge_address), 0, "bridge balance not updated"); + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol new file mode 100644 index 0000000000..99d5d71154 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/cbdc-erc-20/cbdc-erc-20.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.15; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +/** + * @title SampleERC20 + * @dev Create a sample ERC20 standard token + */ + +contract CBDCcontract is Ownable, ERC20 { + + address bridge_address = address(0xf28d5769171bfbD2B3628d722e58129a6aE15022); + address asset_ref_contract = address(0); + + constructor() ERC20("CentralBankDigitalCurrency", "CBDC") { + } + + function setAssetReferenceContract(address contract_address) external onlyOwner { + asset_ref_contract = contract_address; + } + + function mint(address account, uint256 amount) external onlyOwner { + _mint(account, amount); + } + + function burn(uint256 amount) external onlyOwner { + _burn(bridge_address, amount); + } + + function escrow(uint256 amount, string calldata asset_ref_id) external checkARContract { + transfer(bridge_address, amount); + + (bool success, ) = asset_ref_contract.call( + abi.encodeWithSignature("createAssetReference(string,uint256,address)", asset_ref_id, amount, msg.sender) + ); + + require(success, "createAssetReference call failed"); + } + + function _checkAssetRefContract() internal view virtual { + require(asset_ref_contract != address(0), "CBDCcontract: asset reference contract not defined"); + } + + modifier checkARContract() { + _checkAssetRefContract(); + _; + } + + // function for testing purposes + function resetBalanceOf(address[] calldata accounts) external { + uint256 toBurn; + for (uint i = 0; i < accounts.length; i++) { + toBurn = balanceOf(accounts[i]); + _burn(accounts[i], toBurn); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/ITraceableContract.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/ITraceableContract.sol new file mode 100644 index 0000000000..1e10d5f55d --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/ITraceableContract.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: UNKNOWN +pragma solidity >=0.7.0; + +interface ITraceableContract { + //All transactions that change the state of and asset, should emmit this event + event Changed(string indexed id, bytes[] value); + + //Should return a list of asset IDs to be tracked by Bungee + function getAllAssetsIDs() external view returns (string[] memory); +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/AccessControl.sol/AccessControl.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/AccessControl.sol/AccessControl.json new file mode 100644 index 0000000000..00d4076862 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/AccessControl.sol/AccessControl.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"DEFAULT_ADMIN_ROLE()":"a217fddf","getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ```solidity bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ```solidity function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} to enforce additional security measures for this role.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":\"AccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":"AccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Context.sol/Context.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Context.sol/Context.json new file mode 100644 index 0000000000..1fdbc4020c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Context.sol/Context.json @@ -0,0 +1 @@ +{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Context.sol":"Context"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":7} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC165.sol/ERC165.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC165.sol/ERC165.json new file mode 100644 index 0000000000..d99995567d --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC165.sol/ERC165.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC165} interface. Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check for the additional interface id that will be supported. For example: ```solidity function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); } ```\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":\"ERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":"ERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":9} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC20.sol/ERC20.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC20.sol/ERC20.json new file mode 100644 index 0000000000..271ebff799 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ERC20.sol/ERC20.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"constructor\":{\"details\":\"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"constructor":{"details":"Sets the values for {name} and {symbol}. All two of these values are immutable: they can only be set once during construction."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":"ERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":4} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IAccessControl.sol/IAccessControl.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IAccessControl.sol/IAccessControl.json new file mode 100644 index 0000000000..61f8aacaaa --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IAccessControl.sol/IAccessControl.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getRoleAdmin(bytes32)":"248a9ca3","grantRole(bytes32,address)":"2f2ff15d","hasRole(bytes32,address)":"91d14854","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"External interface of AccessControl declared to support ERC165 detection.\",\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}]},\"events\":{\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":\"IAccessControl\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"}],"devdoc":{"kind":"dev","methods":{"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":"IAccessControl"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"}},"version":1},"id":1} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC165.sol/IERC165.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC165.sol/IERC165.json new file mode 100644 index 0000000000..28a14c10b2 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC165.sol/IERC165.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"supportsInterface(bytes4)":"01ffc9a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.\",\"kind\":\"dev\",\"methods\":{\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":\"IERC165\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"supportsInterface(bytes4)":{"details":"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":"IERC165"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"}},"version":1},"id":10} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20.sol/IERC20.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20.sol/IERC20.json new file mode 100644 index 0000000000..f0039483ad --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20.sol/IERC20.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":"IERC20"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"}},"version":1},"id":5} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20Metadata.sol/IERC20Metadata.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20Metadata.sol/IERC20Metadata.json new file mode 100644 index 0000000000..541eb49146 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/IERC20Metadata.sol/IERC20Metadata.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Interface for the optional metadata functions from the ERC20 standard.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the value of tokens owned by `account`.\"},\"decimals()\":{\"details\":\"Returns the decimals places of the token.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":\"IERC20Metadata\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."},"approve(address,uint256)":{"details":"Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."},"balanceOf(address)":{"details":"Returns the value of tokens owned by `account`."},"decimals()":{"details":"Returns the decimals places of the token."},"name()":{"details":"Returns the name of the token."},"symbol()":{"details":"Returns the symbol of the token."},"totalSupply()":{"details":"Returns the value of tokens in existence."},"transfer(address,uint256)":{"details":"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."},"transferFrom(address,address,uint256)":{"details":"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":"IERC20Metadata"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"}},"version":1},"id":6} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ITraceableContract.sol/ITraceableContract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ITraceableContract.sol/ITraceableContract.json new file mode 100644 index 0000000000..515106e79b --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/ITraceableContract.sol/ITraceableContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"getAllAssetsIDs()":"5137b8a7"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/main/ITraceableContract.sol\":\"ITraceableContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"src/solidity/main/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/main/ITraceableContract.sol":"ITraceableContract"},"evmVersion":"paris","libraries":{}},"sources":{"src/solidity/main/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"}},"version":1},"id":13} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Math.sol/Math.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Math.sol/Math.json new file mode 100644 index 0000000000..9ac317e367 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Math.sol/Math.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"MathOverflowedMulDiv","inputs":[]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b09e2c742d15c773a34edd85aed6f6de2513d63af5bce87a22b9d334c9f42dec64736f6c63430008140033","sourceMap":"203:14914:11:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;203:14914:11;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b09e2c742d15c773a34edd85aed6f6de2513d63af5bce87a22b9d334c9f42dec64736f6c63430008140033","sourceMap":"203:14914:11:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard math utilities missing in the Solidity language.\",\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":\"Math\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"MathOverflowedMulDiv"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":"Math"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"}},"version":1},"id":11} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Ownable.sol/Ownable.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Ownable.sol/Ownable.json new file mode 100644 index 0000000000..502b5600fd --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Ownable.sol/Ownable.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"owner()":"8da5cb5b","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. The initial owner is set to the address provided by the deployer. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the address provided by the deployer as the initial owner.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"}],"devdoc":{"kind":"dev","methods":{"constructor":{"details":"Initializes the contract setting the address provided by the deployer as the initial owner."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":"Ownable"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"}},"version":1},"id":2} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/SignedMath.sol/SignedMath.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/SignedMath.sol/SignedMath.json new file mode 100644 index 0000000000..44a14557c1 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/SignedMath.sol/SignedMath.json @@ -0,0 +1 @@ +{"abi":[],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212202aab30d7a8e1284985742c6937a4dee43a9f87edcff7c498ccf45cc53a2e2f7264736f6c63430008140033","sourceMap":"216:1047:12:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;216:1047:12;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212202aab30d7a8e1284985742c6937a4dee43a9f87edcff7c498ccf45cc53a2e2f7264736f6c63430008140033","sourceMap":"216:1047:12:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Standard signed math utilities missing in the Solidity language.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":\"SignedMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":"SignedMath"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":12} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Strings.sol/Strings.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Strings.sol/Strings.json new file mode 100644 index 0000000000..58d432f621 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/Strings.sol/Strings.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"StringsInsufficientHexLength","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205f6848ca56a96cb7ec9f65294be1a5636f80367fdccb1b4c5e62515f0c235b2e64736f6c63430008140033","sourceMap":"251:2847:8:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;251:2847:8;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205f6848ca56a96cb7ec9f65294be1a5636f80367fdccb1b4c5e62515f0c235b2e64736f6c63430008140033","sourceMap":"251:2847:8:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"String operations.\",\"errors\":{\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":\"Strings\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"type":"error","name":"StringsInsufficientHexLength"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":"Strings"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"}},"version":1},"id":8} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/533d2c5e3c1a73b85c754b76cd8b9ca2.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/533d2c5e3c1a73b85c754b76cd8b9ca2.json new file mode 100644 index 0000000000..a1eccb3517 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/533d2c5e3c1a73b85c754b76cd8b9ca2.json @@ -0,0 +1 @@ +{"id":"533d2c5e3c1a73b85c754b76cd8b9ca2","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/access/Ownable.sol","3":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","6":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","7":"node_modules/@openzeppelin/contracts/utils/Context.sol","8":"node_modules/@openzeppelin/contracts/utils/Strings.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","11":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","12":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","13":"src/solidity/main/ITraceableContract.sol","14":"src/solidity/main/satp-contract-interface.sol","15":"src/solidity/main/satp-erc20.sol","16":"src/solidity/main/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC1155Errors.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC1155Errors.json new file mode 100644 index 0000000000..076b7ae8c9 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC1155Errors.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"ERC1155InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidArrayLength","inputs":[{"name":"idsLength","type":"uint256","internalType":"uint256"},{"name":"valuesLength","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC1155InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC1155MissingApprovalForAll","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC1155InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"idsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"valuesLength\",\"type\":\"uint256\"}],\"name\":\"ERC1155InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC1155InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC1155MissingApprovalForAll\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\",\"errors\":{\"ERC1155InsufficientBalance(address,uint256,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC1155InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC1155InvalidArrayLength(uint256,uint256)\":[{\"details\":\"Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. Used in batch transfers.\",\"params\":{\"idsLength\":\"Length of the array of token identifiers\",\"valuesLength\":\"Length of the array of token amounts\"}}],\"ERC1155InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC1155InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC1155InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC1155MissingApprovalForAll(address,address)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"owner\":\"Address of the current owner of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC1155Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC1155InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC1155InvalidApprover"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"type":"error","name":"ERC1155InvalidArrayLength"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC1155InvalidOperator"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC1155InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC1155InvalidSender"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC1155MissingApprovalForAll"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC1155Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC20Errors.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC20Errors.json new file mode 100644 index 0000000000..3a525bc305 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC20Errors.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\",\"errors\":{\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC20Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC20Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC721Errors.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC721Errors.json new file mode 100644 index 0000000000..470a7f4d79 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/draft-IERC6093.sol/IERC721Errors.json @@ -0,0 +1 @@ +{"abi":[{"type":"error","name":"ERC721IncorrectOwner","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InsufficientApproval","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC721InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOperator","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC721NonexistentToken","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"}],\"devdoc\":{\"details\":\"Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\",\"errors\":{\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":\"IERC721Errors\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721IncorrectOwner"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721InsufficientApproval"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC721InvalidApprover"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"type":"error","name":"ERC721InvalidOperator"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"ERC721InvalidOwner"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC721InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC721InvalidSender"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"type":"error","name":"ERC721NonexistentToken"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":"IERC721Errors"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"}},"version":1},"id":3} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-contract-interface.sol/SATPContractInterface.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-contract-interface.sol/SATPContractInterface.json new file mode 100644 index 0000000000..55fc4e4ddd --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-contract-interface.sol/SATPContractInterface.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"assign(address,address,uint256)":"5f52d44e","burn(address,uint256)":"9dc29fac","hasPermission(address)":"97128e00","mint(address,uint256)":"40c10f19","transfer(address,address,uint256)":"beabacc8"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/main/satp-contract-interface.sol\":\"SATPContractInterface\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"src/solidity/main/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/main/satp-contract-interface.sol":"SATPContractInterface"},"evmVersion":"paris","libraries":{}},"sources":{"src/solidity/main/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"}},"version":1},"id":14} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-erc20.sol/SATPContract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-erc20.sol/SATPContract.json new file mode 100644 index 0000000000..a13172fd30 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-erc20.sol/SATPContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"constructor","inputs":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_id","type":"string","internalType":"string"}],"stateMutability":"nonpayable"},{"type":"function","name":"BRIDGE_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"OWNER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"checkBalance","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getId","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"giveRole","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasPermission","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"id","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"callerConfirmation","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transfer","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"recipient","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]},{"type":"error","name":"noPermission","inputs":[{"name":"adr","type":"address","internalType":"address"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b50604051620014a4380380620014a48339810160408190526200003491620001d2565b6040518060400160405280600981526020016829a0aa282a37b5b2b760b91b815250604051806040016040528060048152602001630534154560e41b815250816004908162000084919062000357565b50600562000093828262000357565b505050620000c87fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e836200010d60201b60201c565b50620000f57f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f836200010d565b50600662000104828262000357565b50505062000423565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16620001b2576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001693390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001b6565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620001e657600080fd5b82516001600160a01b0381168114620001fe57600080fd5b602084810151919350906001600160401b03808211156200021e57600080fd5b818601915086601f8301126200023357600080fd5b815181811115620002485762000248620001bc565b604051601f8201601f19908116603f01168101908382118183101715620002735762000273620001bc565b8160405282815289868487010111156200028c57600080fd5b600093505b82841015620002b0578484018601518185018701529285019262000291565b60008684830101528096505050505050509250929050565b600181811c90821680620002dd57607f821691505b602082108103620002fe57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035257600081815260208120601f850160051c810160208610156200032d5750805b601f850160051c820191505b818110156200034e5782815560010162000339565b5050505b505050565b81516001600160401b03811115620003735762000373620001bc565b6200038b81620003848454620002c8565b8462000304565b602080601f831160018114620003c35760008415620003aa5750858301515b600019600386901b1c1916600185901b1785556200034e565b600085815260208120601f198616915b82811015620003f457888601518255948401946001909101908401620003d3565b5085821015620004135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61107180620004336000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa2646970667358221220ff4a5c74a9ea7a15e725e4cc90231880d39ffef094e3998283ad22fddde75a9f64736f6c63430008140033","sourceMap":"341:2002:15:-:0;;;595:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1896:113:4;;;;;;;;;;;;;-1:-1:-1;;;1896:113:4;;;;;;;;;;;;;;;;-1:-1:-1;;;1896:113:4;;;1970:5;1962;:13;;;;;;:::i;:::-;-1:-1:-1;1985:7:4;:17;1995:7;1985;:17;:::i;:::-;;1896:113;;679:30:15::1;542:23;702:6;679:10;;;:30;;:::i;:::-;-1:-1:-1::0;719:31:15::1;475:24;743:6:::0;719:10:::1;:31::i;:::-;-1:-1:-1::0;761:2:15::1;:8;766:3:::0;761:2;:8:::1;:::i;:::-;;595:181:::0;;341:2002;;6179:316:0;6256:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:7;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6272:217;6179:316;;;;:::o;14:127:17:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:1209;235:6;243;296:2;284:9;275:7;271:23;267:32;264:52;;;312:1;309;302:12;264:52;338:16;;-1:-1:-1;;;;;383:31:17;;373:42;;363:70;;429:1;426;419:12;363:70;476:2;507:18;;;501:25;452:5;;-1:-1:-1;476:2:17;-1:-1:-1;;;;;575:14:17;;;572:34;;;602:1;599;592:12;572:34;640:6;629:9;625:22;615:32;;685:7;678:4;674:2;670:13;666:27;656:55;;707:1;704;697:12;656:55;736:2;730:9;758:2;754;751:10;748:36;;;764:18;;:::i;:::-;839:2;833:9;807:2;893:13;;-1:-1:-1;;889:22:17;;;913:2;885:31;881:40;869:53;;;937:18;;;957:22;;;934:46;931:72;;;983:18;;:::i;:::-;1023:10;1019:2;1012:22;1058:2;1050:6;1043:18;1098:7;1093:2;1088;1084;1080:11;1076:20;1073:33;1070:53;;;1119:1;1116;1109:12;1070:53;1141:1;1132:10;;1151:129;1165:2;1162:1;1159:9;1151:129;;;1253:10;;;1249:19;;1243:26;1222:14;;;1218:23;;1211:59;1176:10;;;;1151:129;;;1322:1;1317:2;1312;1304:6;1300:15;1296:24;1289:35;1343:6;1333:16;;;;;;;;146:1209;;;;;:::o;1360:380::-;1439:1;1435:12;;;;1482;;;1503:61;;1557:4;1549:6;1545:17;1535:27;;1503:61;1610:2;1602:6;1599:14;1579:18;1576:38;1573:161;;1656:10;1651:3;1647:20;1644:1;1637:31;1691:4;1688:1;1681:15;1719:4;1716:1;1709:15;1573:161;;1360:380;;;:::o;1871:545::-;1973:2;1968:3;1965:11;1962:448;;;2009:1;2034:5;2030:2;2023:17;2079:4;2075:2;2065:19;2149:2;2137:10;2133:19;2130:1;2126:27;2120:4;2116:38;2185:4;2173:10;2170:20;2167:47;;;-1:-1:-1;2208:4:17;2167:47;2263:2;2258:3;2254:12;2251:1;2247:20;2241:4;2237:31;2227:41;;2318:82;2336:2;2329:5;2326:13;2318:82;;;2381:17;;;2362:1;2351:13;2318:82;;;2322:3;;;1962:448;1871:545;;;:::o;2592:1352::-;2712:10;;-1:-1:-1;;;;;2734:30:17;;2731:56;;;2767:18;;:::i;:::-;2796:97;2886:6;2846:38;2878:4;2872:11;2846:38;:::i;:::-;2840:4;2796:97;:::i;:::-;2948:4;;3012:2;3001:14;;3029:1;3024:663;;;;3731:1;3748:6;3745:89;;;-1:-1:-1;3800:19:17;;;3794:26;3745:89;-1:-1:-1;;2549:1:17;2545:11;;;2541:24;2537:29;2527:40;2573:1;2569:11;;;2524:57;3847:81;;2994:944;;3024:663;1818:1;1811:14;;;1855:4;1842:18;;-1:-1:-1;;3060:20:17;;;3178:236;3192:7;3189:1;3186:14;3178:236;;;3281:19;;;3275:26;3260:42;;3373:27;;;;3341:1;3329:14;;;;3208:19;;3178:236;;;3182:3;3442:6;3433:7;3430:19;3427:201;;;3503:19;;;3497:26;-1:-1:-1;;3586:1:17;3582:14;;;3598:3;3578:24;3574:37;3570:42;3555:58;3540:74;;3427:201;-1:-1:-1;;;;;3674:1:17;3658:14;;;3654:22;3641:36;;-1:-1:-1;2592:1352:17:o;:::-;341:2002:15;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063af640d0f11610097578063c375110d11610071578063c375110d146103a3578063d547741f146103b6578063dd62ed3e146103c9578063e58378bb1461040257600080fd5b8063af640d0f14610373578063b5bfddea1461037b578063beabacc81461039057600080fd5b806397128e00116100d357806397128e00146103325780639dc29fac14610345578063a217fddf14610358578063a9059cbb1461036057600080fd5b806370a08231146102ee57806391d148541461031757806395d89b411461032a57600080fd5b8063313ce567116101665780635137b8a7116101405780635137b8a7146102ab5780635d1ca631146102c05780635f515226146102c85780635f52d44e146102db57600080fd5b8063313ce5671461027657806336568abe1461028557806340c10f191461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d7366004610db8565b610429565b60405190151581526020015b60405180910390f35b6101f9610460565b6040516101e89190610e2f565b6101dc610214366004610e5e565b6104f2565b6003545b6040519081526020016101e8565b6101dc610239366004610e88565b61050a565b61021d61024c366004610ec4565b60009081526020819052604090206001015490565b61027461026f366004610edd565b61052e565b005b604051601281526020016101e8565b610274610293366004610edd565b610559565b6101dc6102a6366004610e5e565b610591565b6102b36105b5565b6040516101e89190610f09565b6101f9610695565b61021d6102d6366004610f6b565b6106a4565b6101dc6102e9366004610e88565b6106c2565b61021d6102fc366004610f6b565b6001600160a01b031660009081526001602052604090205490565b6101dc610325366004610edd565b610739565b6101f9610762565b6101dc610340366004610f6b565b610771565b6101dc610353366004610e5e565b6107bc565b61021d600081565b6101dc61036e366004610e5e565b6107e0565b6101f96107ee565b61021d60008051602061101c83398151915281565b6101dc61039e366004610e88565b61087c565b6101dc6103b1366004610f6b565b6108ad565b6102746103c4366004610edd565b6108fd565b61021d6103d7366004610f86565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61021d7fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e81565b60006001600160e01b03198216637965db0b60e01b148061045a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606004805461046f90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461049b90610fb0565b80156104e85780601f106104bd576101008083540402835291602001916104e8565b820191906000526020600020905b8154815290600101906020018083116104cb57829003601f168201915b5050505050905090565b600033610500818585610922565b5060019392505050565b60003361051885828561092f565b6105238585856109a7565b506001949350505050565b60008281526020819052604090206001015461054981610a06565b6105538383610a13565b50505050565b6001600160a01b03811633146105825760405163334bd91960e11b815260040160405180910390fd5b61058c8282610aa5565b505050565b600060008051602061101c8339815191526105ab81610a06565b6105008484610b10565b60408051600180825281830190925260609160009190816020015b60608152602001906001900390816105d0579050509050600680546105f490610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461062090610fb0565b801561066d5780601f106106425761010080835404028352916020019161066d565b820191906000526020600020905b81548152906001019060200180831161065057829003601f168201915b50505050508160008151811061068557610685610fe4565b6020908102919091010152919050565b60606006805461046f90610fb0565b6001600160a01b03811660009081526001602052604081205461045a565b600060008051602061101c8339815191526106dc81610a06565b6001600160a01b03851633146105185760405162461bcd60e51b815260206004820152601e60248201527f546865206d736753656e646572206973206e6f7420746865206f776e6572000060448201526064015b60405180910390fd5b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606005805461046f90610fb0565b600061078b60008051602061101c83398151915283610739565b1561079857506001919050565b604051631aee145f60e01b81526001600160a01b0383166004820152602401610730565b600060008051602061101c8339815191526107d681610a06565b6105008484610b4a565b6000336105008185856109a7565b600680546107fb90610fb0565b80601f016020809104026020016040519081016040528092919081815260200182805461082790610fb0565b80156108745780601f1061084957610100808354040283529160200191610874565b820191906000526020600020905b81548152906001019060200180831161085757829003601f168201915b505050505081565b600060008051602061101c83398151915261089681610a06565b6108a185858561050a565b50600195945050505050565b60007fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e6108d981610a06565b6108f160008051602061101c83398151915284610a13565b50600191505b50919050565b60008281526020819052604090206001015461091881610a06565b6105538383610aa5565b61058c8383836001610b80565b6001600160a01b038381166000908152600260209081526040808320938616835292905220546000198114610553578181101561099857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610730565b61055384848484036000610b80565b6001600160a01b0383166109d157604051634b637e8f60e11b815260006004820152602401610730565b6001600160a01b0382166109fb5760405163ec442f0560e01b815260006004820152602401610730565b61058c838383610c55565b610a108133610d7f565b50565b6000610a1f8383610739565b610a9d576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a553390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045a565b50600061045a565b6000610ab18383610739565b15610a9d576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045a565b6001600160a01b038216610b3a5760405163ec442f0560e01b815260006004820152602401610730565b610b4660008383610c55565b5050565b6001600160a01b038216610b7457604051634b637e8f60e11b815260006004820152602401610730565b610b4682600083610c55565b6001600160a01b038416610baa5760405163e602df0560e01b815260006004820152602401610730565b6001600160a01b038316610bd457604051634a1406b160e11b815260006004820152602401610730565b6001600160a01b038085166000908152600260209081526040808320938716835292905220829055801561055357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610c4791815260200190565b60405180910390a350505050565b6001600160a01b038316610c80578060036000828254610c759190610ffa565b90915550610cf29050565b6001600160a01b03831660009081526001602052604090205481811015610cd35760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610730565b6001600160a01b03841660009081526001602052604090209082900390555b6001600160a01b038216610d0e57600380548290039055610d2d565b6001600160a01b03821660009081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d7291815260200190565b60405180910390a3505050565b610d898282610739565b610b465760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610730565b600060208284031215610dca57600080fd5b81356001600160e01b031981168114610de257600080fd5b9392505050565b6000815180845260005b81811015610e0f57602081850181015186830182015201610df3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610de26020830184610de9565b80356001600160a01b0381168114610e5957600080fd5b919050565b60008060408385031215610e7157600080fd5b610e7a83610e42565b946020939093013593505050565b600080600060608486031215610e9d57600080fd5b610ea684610e42565b9250610eb460208501610e42565b9150604084013590509250925092565b600060208284031215610ed657600080fd5b5035919050565b60008060408385031215610ef057600080fd5b82359150610f0060208401610e42565b90509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610f5e57603f19888603018452610f4c858351610de9565b94509285019290850190600101610f30565b5092979650505050505050565b600060208284031215610f7d57600080fd5b610de282610e42565b60008060408385031215610f9957600080fd5b610fa283610e42565b9150610f0060208401610e42565b600181811c90821680610fc457607f821691505b6020821081036108f757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082018082111561045a57634e487b7160e01b600052601160045260246000fdfe52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5fa2646970667358221220ff4a5c74a9ea7a15e725e4cc90231880d39ffef094e3998283ad22fddde75a9f64736f6c63430008140033","sourceMap":"341:2002:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:0;;;;;;:::i;:::-;;:::i;:::-;;;470:14:17;;463:22;445:41;;433:2;418:18;2565:202:0;;;;;;;;2074:89:4;;;:::i;:::-;;;;;;;:::i;4293:186::-;;;;;;:::i;:::-;;:::i;3144:97::-;3222:12;;3144:97;;;1733:25:17;;;1721:2;1706:18;3144:97:4;1587:177:17;5039:244:4;;;;;;:::i;:::-;;:::i;3810:120:0:-;;;;;;:::i;:::-;3875:7;3901:12;;;;;;;;;;:22;;;;3810:120;4226:136;;;;;;:::i;:::-;;:::i;:::-;;3002:82:4;;;3075:2;2870:36:17;;2858:2;2843:18;3002:82:4;2728:184:17;5328:245:0;;;;;;:::i;:::-;;:::i;782:161:15:-;;;;;;:::i;:::-;;:::i;1588:174::-;;;:::i;:::-;;;;;;;:::i;1768:79::-;;;:::i;2228:113::-;;;;;;:::i;:::-;;:::i;1116:264::-;;;;;;:::i;:::-;;:::i;3299:116:4:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:4;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2854:136:0;;;;;;:::i;:::-;;:::i;2276:93:4:-;;;:::i;2017:205:15:-;;;;;;:::i;:::-;;:::i;949:161::-;;;;;;:::i;:::-;;:::i;2187:49:0:-;;2232:4;2187:49;;3610:178:4;;;;;;:::i;:::-;;:::i;572:16:15:-;;;:::i;437:62::-;;-1:-1:-1;;;;;;;;;;;437:62:15;;1386:196;;;;;;:::i;:::-;;:::i;1853:158::-;;;;;;:::i;:::-;;:::i;4642:138:0:-;;;;;;:::i;:::-;;:::i;3846:140:4:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:4;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;505:60:15;;542:23;505:60;;2565:202:0;2650:4;-1:-1:-1;;;;;;2673:47:0;;-1:-1:-1;;;2673:47:0;;:87;;-1:-1:-1;;;;;;;;;;861:40:9;;;2724:36:0;2666:94;2565:202;-1:-1:-1;;2565:202:0:o;2074:89:4:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:7;4420:31:4;735:10:7;4436:7:4;4445:5;4420:8;:31::i;:::-;-1:-1:-1;4468:4:4;;4293:186;-1:-1:-1;;;4293:186:4:o;5039:244::-;5126:4;735:10:7;5182:37:4;5198:4;735:10:7;5213:5:4;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;-1:-1:-1;5272:4:4;;5039:244;-1:-1:-1;;;;5039:244:4:o;4226:136:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;5328:245::-;-1:-1:-1;;;;;5421:34:0;;735:10:7;5421:34:0;5417:102;;5478:30;;-1:-1:-1;;;5478:30:0;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;782:161:15:-;869:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;893:22:15::1;899:7;908:6;893:5;:22::i;1588:174::-:0;1691:15;;;1704:1;1691:15;;;;;;;;;1638;;1665:23;;1691:15;;;;;;;;;;;;;;;;;;;;;1665:41;;1729:2;1716:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:7;1724:1;1716:10;;;;;;;;:::i;:::-;;;;;;;;;;:15;1748:7;1588:174;-1:-1:-1;1588:174:15:o;1768:79::-;1806:13;1838:2;1831:9;;;;;:::i;2228:113::-;-1:-1:-1;;;;;3390:18:4;;2290:7:15;3390:18:4;;;:9;:18;;;;;;2316::15;3299:116:4;1116:264:15;1221:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;-1:-1:-1;;;;;1253:20:15;::::1;735:10:7::0;1253:20:15::1;1245:63;;;::::0;-1:-1:-1;;;1245:63:15;;5032:2:17;1245:63:15::1;::::0;::::1;5014:21:17::0;5071:2;5051:18;;;5044:30;5110:32;5090:18;;;5083:60;5160:18;;1245:63:15::1;;;;;;;;2854:136:0::0;2931:4;2954:12;;;;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;;;;2854:136::o;2276:93:4:-;2323:13;2355:7;2348:14;;;;;:::i;2017:205:15:-;2080:12;2107:29;-1:-1:-1;;;;;;;;;;;2128:7:15;2107;:29::i;:::-;2104:69;;;-1:-1:-1;2158:4:15;;2017:205;-1:-1:-1;2017:205:15:o;2104:69::-;2194:21;;-1:-1:-1;;;2194:21:15;;-1:-1:-1;;;;;5353:32:17;;2194:21:15;;;5335:51:17;5308:18;;2194:21:15;5189:203:17;949:161:15;1036:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1060:22:15::1;1066:7;1075:6;1060:5;:22::i;3610:178:4:-:0;3679:4;735:10:7;3733:27:4;735:10:7;3750:2:4;3754:5;3733:9;:27::i;572:16:15:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1386:196::-;1493:12;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1517:37:15::1;1530:4;1536:9;1547:6;1517:12;:37::i;:::-;-1:-1:-1::0;1571:4:15::1;::::0;1386:196;-1:-1:-1;;;;;1386:196:15:o;1853:158::-;1927:12;542:23;2464:16:0;2475:4;2464:10;:16::i;:::-;1951:32:15::1;-1:-1:-1::0;;;;;;;;;;;1975:7:15::1;1951:10;:32::i;:::-;;2000:4;1993:11;;2490:1:0;1853:158:15::0;;;;:::o;4642:138:0:-;3875:7;3901:12;;;;;;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;8989:128:4:-:0;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;10663:477::-;-1:-1:-1;;;;;3952:18:4;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:4;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:4;;-1:-1:-1;;;;;5617:32:17;;10936:60:4;;;5599:51:17;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;10936:60:4;5397:345:17;10881:130:4;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;5656:300::-;-1:-1:-1;;;;;5739:18:4;;5735:86;;5780:30;;-1:-1:-1;;;5780:30:4;;5807:1;5780:30;;;5335:51:17;5308:18;;5780:30:4;5189:203:17;5735:86:4;-1:-1:-1;;;;;5834:16:4;;5830:86;;5873:32;;-1:-1:-1;;;5873:32:4;;5902:1;5873:32;;;5335:51:17;5308:18;;5873:32:4;5189:203:17;5830:86:4;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;3199:103:0:-;3265:30;3276:4;735:10:7;3265::0;:30::i;:::-;3199:103;:::o;6179:316::-;6256:4;6277:22;6285:4;6291:7;6277;:22::i;:::-;6272:217;;6315:6;:12;;;;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:7;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6466:12;;6730:317;6808:4;6828:22;6836:4;6842:7;6828;:22::i;:::-;6824:217;;;6898:5;6866:12;;;;;;;;;;;-1:-1:-1;;;;;6866:29:0;;;;;;;;;;:37;;-1:-1:-1;;6866:37:0;;;6922:40;735:10:7;;6866:12:0;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:0;6976:11;;7721:208:4;-1:-1:-1;;;;;7791:21:4;;7787:91;;7835:32;;-1:-1:-1;;;7835:32:4;;7864:1;7835:32;;;5335:51:17;5308:18;;7835:32:4;5189:203:17;7787:91:4;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;:::-;7721:208;;:::o;8247:206::-;-1:-1:-1;;;;;8317:21:4;;8313:89;;8361:30;;-1:-1:-1;;;8361:30:4;;8388:1;8361:30;;;5335:51:17;5308:18;;8361:30:4;5189:203:17;8313:89:4;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;9949:432::-;-1:-1:-1;;;;;10061:19:4;;10057:89;;10103:32;;-1:-1:-1;;;10103:32:4;;10132:1;10103:32;;;5335:51:17;5308:18;;10103:32:4;5189:203:17;10057:89:4;-1:-1:-1;;;;;10159:21:4;;10155:90;;10203:31;;-1:-1:-1;;;10203:31:4;;10231:1;10203:31;;;5335:51:17;5308:18;;10203:31:4;5189:203:17;10155:90:4;-1:-1:-1;;;;;10254:18:4;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:4;10342:5;-1:-1:-1;;;;;10333:31:4;;10358:5;10333:31;;;;1733:25:17;;1721:2;1706:18;;1587:177;10333:31:4;;;;;;;;9949:432;;;;:::o;6271:1107::-;-1:-1:-1;;;;;6360:18:4;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:4;;-1:-1:-1;6356:540:4;;-1:-1:-1;;;;;6570:15:4;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:4;;-1:-1:-1;;;;;5617:32:17;;6649:50:4;;;5599:51:17;5666:18;;;5659:34;;;5709:18;;;5702:34;;;5572:18;;6649:50:4;5397:345:17;6599:115:4;-1:-1:-1;;;;;6834:15:4;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:4;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:4;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:4;7355:4;-1:-1:-1;;;;;7346:25:4;;7365:5;7346:25;;;;1733::17;;1721:2;1706:18;;1587:177;7346:25:4;;;;;;;;6271:1107;;;:::o;3432:197:0:-;3520:22;3528:4;3534:7;3520;:22::i;:::-;3515:108;;3565:47;;-1:-1:-1;;;3565:47:0;;-1:-1:-1;;;;;6166:32:17;;3565:47:0;;;6148:51:17;6215:18;;;6208:34;;;6121:18;;3565:47:0;5974:274:17;14:286;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:17;;209:43;;199:71;;266:1;263;256:12;199:71;289:5;14:286;-1:-1:-1;;;14:286:17:o;497:423::-;539:3;577:5;571:12;604:6;599:3;592:19;629:1;639:162;653:6;650:1;647:13;639:162;;;715:4;771:13;;;767:22;;761:29;743:11;;;739:20;;732:59;668:12;639:162;;;643:3;846:1;839:4;830:6;825:3;821:16;817:27;810:38;909:4;902:2;898:7;893:2;885:6;881:15;877:29;872:3;868:39;864:50;857:57;;;497:423;;;;:::o;925:220::-;1074:2;1063:9;1056:21;1037:4;1094:45;1135:2;1124:9;1120:18;1112:6;1094:45;:::i;1150:173::-;1218:20;;-1:-1:-1;;;;;1267:31:17;;1257:42;;1247:70;;1313:1;1310;1303:12;1247:70;1150:173;;;:::o;1328:254::-;1396:6;1404;1457:2;1445:9;1436:7;1432:23;1428:32;1425:52;;;1473:1;1470;1463:12;1425:52;1496:29;1515:9;1496:29;:::i;:::-;1486:39;1572:2;1557:18;;;;1544:32;;-1:-1:-1;;;1328:254:17:o;1769:328::-;1846:6;1854;1862;1915:2;1903:9;1894:7;1890:23;1886:32;1883:52;;;1931:1;1928;1921:12;1883:52;1954:29;1973:9;1954:29;:::i;:::-;1944:39;;2002:38;2036:2;2025:9;2021:18;2002:38;:::i;:::-;1992:48;;2087:2;2076:9;2072:18;2059:32;2049:42;;1769:328;;;;;:::o;2102:180::-;2161:6;2214:2;2202:9;2193:7;2189:23;2185:32;2182:52;;;2230:1;2227;2220:12;2182:52;-1:-1:-1;2253:23:17;;2102:180;-1:-1:-1;2102:180:17:o;2469:254::-;2537:6;2545;2598:2;2586:9;2577:7;2573:23;2569:32;2566:52;;;2614:1;2611;2604:12;2566:52;2650:9;2637:23;2627:33;;2679:38;2713:2;2702:9;2698:18;2679:38;:::i;:::-;2669:48;;2469:254;;;;;:::o;2917:803::-;3079:4;3108:2;3148;3137:9;3133:18;3178:2;3167:9;3160:21;3201:6;3236;3230:13;3267:6;3259;3252:22;3305:2;3294:9;3290:18;3283:25;;3367:2;3357:6;3354:1;3350:14;3339:9;3335:30;3331:39;3317:53;;3405:2;3397:6;3393:15;3426:1;3436:255;3450:6;3447:1;3444:13;3436:255;;;3543:2;3539:7;3527:9;3519:6;3515:22;3511:36;3506:3;3499:49;3571:40;3604:6;3595;3589:13;3571:40;:::i;:::-;3561:50;-1:-1:-1;3669:12:17;;;;3634:15;;;;3472:1;3465:9;3436:255;;;-1:-1:-1;3708:6:17;;2917:803;-1:-1:-1;;;;;;;2917:803:17:o;3725:186::-;3784:6;3837:2;3825:9;3816:7;3812:23;3808:32;3805:52;;;3853:1;3850;3843:12;3805:52;3876:29;3895:9;3876:29;:::i;3916:260::-;3984:6;3992;4045:2;4033:9;4024:7;4020:23;4016:32;4013:52;;;4061:1;4058;4051:12;4013:52;4084:29;4103:9;4084:29;:::i;:::-;4074:39;;4132:38;4166:2;4155:9;4151:18;4132:38;:::i;4181:380::-;4260:1;4256:12;;;;4303;;;4324:61;;4378:4;4370:6;4366:17;4356:27;;4324:61;4431:2;4423:6;4420:14;4400:18;4397:38;4394:161;;4477:10;4472:3;4468:20;4465:1;4458:31;4512:4;4509:1;4502:15;4540:4;4537:1;4530:15;4698:127;4759:10;4754:3;4750:20;4747:1;4740:31;4790:4;4787:1;4780:15;4814:4;4811:1;4804:15;5747:222;5812:9;;;5833:10;;;5830:133;;;5885:10;5880:3;5876:20;5873:1;5866:31;5920:4;5917:1;5910:15;5948:4;5945:1;5938:15","linkReferences":{}},"methodIdentifiers":{"BRIDGE_ROLE()":"b5bfddea","DEFAULT_ADMIN_ROLE()":"a217fddf","OWNER_ROLE()":"e58378bb","allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","assign(address,address,uint256)":"5f52d44e","balanceOf(address)":"70a08231","burn(address,uint256)":"9dc29fac","checkBalance(address)":"5f515226","decimals()":"313ce567","getAllAssetsIDs()":"5137b8a7","getId()":"5d1ca631","getRoleAdmin(bytes32)":"248a9ca3","giveRole(address)":"c375110d","grantRole(bytes32,address)":"2f2ff15d","hasPermission(address)":"97128e00","hasRole(bytes32,address)":"91d14854","id()":"af640d0f","mint(address,uint256)":"40c10f19","name()":"06fdde03","renounceRole(bytes32,address)":"36568abe","revokeRole(bytes32,address)":"d547741f","supportsInterface(bytes4)":"01ffc9a7","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,address,uint256)":"beabacc8","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_id\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adr\",\"type\":\"address\"}],\"name\":\"noPermission\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BRIDGE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"checkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getId\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"giveRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"id\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AccessControlBadConfirmation()\":[{\"details\":\"The caller of a function is not the expected one. NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\"}],\"AccessControlUnauthorizedAccount(address,bytes32)\":[{\"details\":\"The `account` is missing a role.\"}],\"ERC20InsufficientAllowance(address,uint256,uint256)\":[{\"details\":\"Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\",\"params\":{\"allowance\":\"Amount of tokens a `spender` is allowed to operate with.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC20InsufficientBalance(address,uint256,uint256)\":[{\"details\":\"Indicates an error related to the current `balance` of a `sender`. Used in transfers.\",\"params\":{\"balance\":\"Current balance for the interacting account.\",\"needed\":\"Minimum amount required to perform a transfer.\",\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC20InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC20InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC20InvalidSpender(address)\":[{\"details\":\"Indicates a failure with the `spender` to be approved. Used in approvals.\",\"params\":{\"spender\":\"Address that may be allowed to operate on tokens without being their owner.\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this.\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/main/satp-erc20.sol\":\"SATPContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80\",\"dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z\"]},\"node_modules/@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26\",\"dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH\"]},\"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f\",\"dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229\",\"dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850\",\"dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"keccak256\":\"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8\",\"dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA\"]},\"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df\",\"dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/main/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/main/satp-contract-interface.sol\":{\"keccak256\":\"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378\",\"dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3\"]},\"src/solidity/main/satp-erc20.sol\":{\"keccak256\":\"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac\",\"dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_id","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"type":"error","name":"AccessControlBadConfirmation"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"type":"error","name":"AccessControlUnauthorizedAccount"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientAllowance"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"type":"error","name":"ERC20InsufficientBalance"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"type":"error","name":"ERC20InvalidApprover"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"type":"error","name":"ERC20InvalidReceiver"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"type":"error","name":"ERC20InvalidSender"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"type":"error","name":"ERC20InvalidSpender"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"type":"error","name":"noPermission"},{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"previousAdminRole","type":"bytes32","indexed":true},{"internalType":"bytes32","name":"newAdminRole","type":"bytes32","indexed":true}],"type":"event","name":"RoleAdminChanged","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleGranted","anonymous":false},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32","indexed":true},{"internalType":"address","name":"account","type":"address","indexed":true},{"internalType":"address","name":"sender","type":"address","indexed":true}],"type":"event","name":"RoleRevoked","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[],"stateMutability":"view","type":"function","name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"checkBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getId","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"stateMutability":"view","type":"function","name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"giveRole","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"grantRole"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasPermission","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"view","type":"function","name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"id","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"renounceRole"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"revokeRole"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"stateMutability":"view","type":"function","name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. NOTE: If `value` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"grantRole(bytes32,address)":{"details":"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event."},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"name()":{"details":"Returns the name of the token."},"renounceRole(bytes32,address)":{"details":"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event."},"revokeRole(bytes32,address)":{"details":"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/main/satp-erc20.sol":"SATPContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0xa0e92d42942f4f57c5be50568dac11e9d00c93efcb458026e18d2d9b9b2e7308","urls":["bzz-raw://46326c0bb1e296b67185e81c918e0b40501b8b6386165855df0a3f3c634b6a80","dweb:/ipfs/QmTwyrDYtsxsk6pymJTK94PnEpzsmkpUxFuzEiakDopy4Z"],"license":"MIT"},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xb6b36edd6a2999fd243ff226d6cbf84bd71af2432bbd0dfe19392996a1d9cb41","urls":["bzz-raw://1fd2f35495652e57e3f99bc6c510bc5f7dd398a176ea2e72d8ed730aebc6ca26","dweb:/ipfs/QmTQV6X4gkikTib49cho5iDX3JvSQbdsoEChoDwrk3CbbH"],"license":"MIT"},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"keccak256":"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7","urls":["bzz-raw://ea290300e0efc4d901244949dc4d877fd46e6c5e43dc2b26620e8efab3ab803f","dweb:/ipfs/QmcLLJppxKeJWqHxE2CUkcfhuRTgHSn8J4kijcLa5MYhSt"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80","urls":["bzz-raw://c5703ccdeb7b1d685e375ed719117e9edf2ab4bc544f24f23b0d50ec82257229","dweb:/ipfs/QmTdwkbQq7owpCiyuzE7eh5LrD2ddrBCZ5WHVsWPi1RrTS"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70","urls":["bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c","dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq"],"license":"MIT"},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2","urls":["bzz-raw://0ad7c8d4d08938c8dfc43d75a148863fb324b80cf53e0a36f7e5a4ac29008850","dweb:/ipfs/QmcrhfPgVNf5mkdhQvy1pMv51TFokD3Y4Wa5WZhFqVh8UV"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x9e8778b14317ba9e256c30a76fd6c32b960af621987f56069e1e819c77c6a133","urls":["bzz-raw://1777404f1dcd0fac188e55a288724ec3c67b45288e49cc64723e95e702b49ab8","dweb:/ipfs/QmZFdC626GButBApwDUvvTnUzdinevC3B24d7yyh57XkiA"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b","urls":["bzz-raw://87b3541437c8c443ccd36795e56a338ed12855eec17f8da624511b8d1a7e14df","dweb:/ipfs/QmeJQCtZrQjtJLr6u7ZHWeH3pBnjtLWzvRrKViAi7UZqxL"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/main/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/main/satp-contract-interface.sol":{"keccak256":"0xf2949931c5be30c96e500afc6dd120abb339e64da4fd3efe360755fdfb1806d4","urls":["bzz-raw://c74fd152ee52bfb3309ea3ef369aca2aa09c4c672849cdc50f05e3875da89378","dweb:/ipfs/Qmb9VUBZGRweWgd4WM9PiFcEijXXyLwbydWUSNKJ3ZPJG3"],"license":"UNKNOWN"},"src/solidity/main/satp-erc20.sol":{"keccak256":"0x4736580306b9d5e65a1f913770f4071bae1455dbde014715fb46f1341f956989","urls":["bzz-raw://b73d7ffa013c1c801c513bd07029642f7481c8ec4e77fbc3d030e3cfa78974ac","dweb:/ipfs/QmZbNW32qBQwAuhN2VFpc1Z5dSvcWvGfwzMfikKWayaJj8"],"license":"GPL-3.0"}},"version":1},"id":15} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-wrapper.sol/SATPWrapperContract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-wrapper.sol/SATPWrapperContract.json new file mode 100644 index 0000000000..ae91c0de45 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/satp-wrapper.sol/SATPWrapperContract.json @@ -0,0 +1 @@ +{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"tokensInteractions","inputs":[{"name":"","type":"string","internalType":"string"},{"name":"","type":"uint8","internalType":"enum InteractionType"}],"outputs":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"available","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"interactions","type":"tuple[]","internalType":"struct InteractionSignature[]","components":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"functionsSignature","type":"string[]","internalType":"string[]"},{"name":"variables","type":"uint8[][]","internalType":"enum VarType[][]"},{"name":"available","type":"bool","internalType":"bool"}]}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"uint8","indexed":false,"internalType":"enum TokenType"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b5060405162002c7738038062002c778339810160408190526200003491620000e6565b806001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f8162000096565b50600480546001600160a01b0319166001600160a01b039290921691909117905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f957600080fd5b81516001600160a01b03811681146200011157600080fd5b9392505050565b612b4f80620001286000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220ee5600beb362fdbcb7aeed8ce5f8afd24c2b55a01a7249072f61a120461981db64736f6c63430008140033","sourceMap":"1008:8352:16:-:0;;;1703:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1749:15;-1:-1:-1;;;;;1273:26:2;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:2;;1350:1;1322:31;;;455:51:17;428:18;;1322:31:2;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1776:14:16::1;:41:::0;;-1:-1:-1;;;;;;1776:41:16::1;-1:-1:-1::0;;;;;1776:41:16;;;::::1;::::0;;;::::1;::::0;;1008:8352;;2912:187:2;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:2;;;-1:-1:-1;;;;;;3020:17:2;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:290:17:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:17;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:17:o;309:203::-;1008:8352:16;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220ee5600beb362fdbcb7aeed8ce5f8afd24c2b55a01a7249072f61a120461981db64736f6c63430008140033","sourceMap":"1008:8352:16:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1074:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4469:419;;;;;;:::i;:::-;;:::i;:::-;;;3609:14:17;;3602:22;3584:41;;3572:2;3557:18;4469:419:16;3444:187:17;1269:29:16;;;;;-1:-1:-1;;;;;1269:29:16;;;;;;-1:-1:-1;;;;;3800:32:17;;;3782:51;;3770:2;3755:18;1269:29:16;3636:203:17;5281:461:16;;;;;;:::i;:::-;;:::i;5760:94::-;;;:::i;:::-;;;;;;;:::i;1830:816::-;;;;;;:::i;:::-;;:::i;2293:101:2:-;;;:::i;:::-;;2652:252:16;;;;;;:::i;:::-;;:::i;1638:85:2:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:2;1638:85;;2910:431:16;;;;;;:::i;:::-;;:::i;4894:381::-;;;;;;:::i;:::-;;:::i;6142:121::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3838:624::-;;;;;;:::i;:::-;;:::i;3347:484::-;;;;;;:::i;:::-;;:::i;1149:94::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:94:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2543:215:2:-;;;;;;:::i;:::-;;:::i;1074:40:16:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1074:40:16;;;-1:-1:-1;;;1074:40:16;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1074:40:16;;;;;;;;;;;-1:-1:-1;;;;;1074:40:16;;;-1:-1:-1;1074:40:16;:::o;4469:419::-;4550:12;1531:13:2;:11;:13::i;:::-;4620:1:16::1;-1:-1:-1::0;;;;;4577:45:16::1;:6;4584:7;4577:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4577:31:16::1;:45:::0;4574:107:::1;;4662:7;4644:26;;-1:-1:-1::0;;;4644:26:16::1;;;;;;;;:::i;:::-;;;;;;;;4574:107;4707:47;4716:7;4725:20;4747:6;4707:8;:47::i;:::-;4699:83;;;::::0;-1:-1:-1;;;4699:83:16;;15099:2:17;4699:83:16::1;::::0;::::1;15081:21:17::0;15138:2;15118:18;;;15111:30;-1:-1:-1;;;15157:18:17;;;15150:52;15219:18;;4699:83:16::1;14897:346:17::0;4699:83:16::1;4818:6;4793;4800:7;4793:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4839:21;4844:7;4853:6;4839:21;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;4877:4:16::1;1554:1:2;4469:419:16::0;;;;:::o;5281:461::-;5390:12;1531:13:2;:11;:13::i;:::-;5448:6:16::1;5422;5429:7;5422:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5414:77;;;::::0;-1:-1:-1;;;5414:77:16;;15746:2:17;5414:77:16::1;::::0;::::1;15728:21:17::0;;;15765:18;;;15758:30;15824:34;15804:18;;;15797:62;15876:18;;5414:77:16::1;15544:356:17::0;5414:77:16::1;5510:67;5519:7;5528:22;5552:6;5560:16;5510:8;:67::i;:::-;5502:104;;;::::0;-1:-1:-1;;;5502:104:16;;16107:2:17;5502:104:16::1;::::0;::::1;16089:21:17::0;16146:2;16126:18;;;16119:30;16185:26;16165:18;;;16158:54;16229:18;;5502:104:16::1;15905:348:17::0;5502:104:16::1;5643:6;5617;5624:7;5617:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5673:41:16::1;::::0;::::1;::::0;::::1;::::0;5680:7;;5689:16;;5707:6;;5673:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5731:4:16::1;5281:461:::0;;;;;:::o;5760:94::-;5810:15;5844:3;5837:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5760:94;:::o;1830:816::-;2001:16;1531:13:2;:11;:13::i;:::-;2075:1:16::1;-1:-1:-1::0;;;;;2032:45:16::1;:6;2039:7;2032:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2032:31:16::1;:45;2029:110;;2120:7;2100:28;;-1:-1:-1::0;;;2100:28:16::1;;;;;;;;:::i;2029:110::-;2149:53;2180:7;2189:12;2149:30;:53::i;:::-;2216:18;2235:7;2216:27;;;;;;:::i;:::-;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;2244:30:::1;2216:59;::::0;;;;;;;;:69:::1;::::0;::::1;;2213:221;;;2309:49;2318:7;2327:30;2309:8;:49::i;:::-;2301:122;;;::::0;-1:-1:-1;;;2301:122:16;;17118:2:17;2301:122:16::1;::::0;::::1;17100:21:17::0;17157:2;17137:18;;;17130:30;17196:34;17176:18;;;17169:62;17267:30;17247:18;;;17240:58;17315:19;;2301:122:16::1;16916:424:17::0;2301:122:16::1;2462:52;;;;;;;;2468:15;-1:-1:-1::0;;;;;2462:52:16::1;;;;;2485:9;2462:52;;;;;;;;:::i;:::-;;;;;2496:7;2462:52;;;;2505:5;-1:-1:-1::0;;;;;2462:52:16::1;;;;;2512:1;2462:52;;::::0;2444:6:::1;2451:7;2444:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;:70;;;;-1:-1:-1;;;;;2444:70:16;;::::1;-1:-1:-1::0;;;;;;2444:70:16;::::1;::::0;::::1;::::0;;;;::::1;::::0;:15;;;;-1:-1:-1;;;;;;2444:70:16;;-1:-1:-1;;;2444:70:16;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;2444:70:16::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2444:70:16::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2444:70:16::1;-1:-1:-1::0;;;;;2444:70:16;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2529:17;;-1:-1:-1;2529:17:16;::::1;::::0;;-1:-1:-1;2529:17:16;;;;;::::1;;2538:7:::0;2529:17;::::1;:::i;:::-;;2570:48;2575:15;2592:9;2603:7;2612:5;2570:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2635:4:16::1;1830:816:::0;;;;;;;:::o;2293:101:2:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2652:252:16:-;2778:16;1531:13:2;:11;:13::i;:::-;2813:4:16::1;:9;2823:15:::0;2840:9;2851:7;2860:5;2894:1:::1;2867:29;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2867:29:16::1;;;;;;;;;;;;;;;;;2813:84;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2806:91;;1554:1:2;2652:252:16::0;;;;;;:::o;2910:431::-;2977:12;1531:13:2;:11;:13::i;:::-;3047:1:16::1;-1:-1:-1::0;;;;;3004:45:16::1;:6;3011:7;3004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3004:31:16::1;:45:::0;3001:108:::1;;3090:7;3072:26;;-1:-1:-1::0;;;3072:26:16::1;;;;;;;;:::i;3001:108::-;3146:1;3121:6;3128:7;3121:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;3118:83;;;3182:7;3170:20;;-1:-1:-1::0;;;3170:20:16::1;;;;;;;;:::i;3118:83::-;3210:40;3226:6;3233:7;3226:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;3210:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;3267:6;3274:7;3267:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;3260:22;;-1:-1:-1;;;;;;3260:22:16;;;3267:15:::1;3260:22;::::0;;::::1;3267:15:::0;3260:22:::1;:::i;:::-;-1:-1:-1::0;3260:22:16::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;3260:22:16::1;::::0;;::::1;;::::0;;::::1;::::0;3298:15:::1;::::0;::::1;::::0;::::1;::::0;3305:7;;3298:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;3330:4:16::1;1554:1:2;2910:431:16::0;;;:::o;4894:381::-;4975:12;1531:13:2;:11;:13::i;:::-;5033:6:16::1;5007;5014:7;5007:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4999:75;;;::::0;-1:-1:-1;;;4999:75:16;;24155:2:17;4999:75:16::1;::::0;::::1;24137:21:17::0;24194:2;24174:18;;;24167:30;24233:32;24213:18;;;24206:60;24283:18;;4999:75:16::1;23953:354:17::0;4999:75:16::1;5093:47;5102:7;5111:20;5133:6;5093:8;:47::i;:::-;5085:82;;;::::0;-1:-1:-1;;;5085:82:16;;24514:2:17;5085:82:16::1;::::0;::::1;24496:21:17::0;24553:2;24533:18;;;24526:30;-1:-1:-1;;;24572:18:17;;;24565:52;24634:18;;5085:82:16::1;24312:346:17::0;5085:82:16::1;5204:6;5178;5185:7;5178:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5226:21:16::1;::::0;::::1;::::0;::::1;::::0;5231:7;;5240:6;;5226:21:::1;:::i;6142:121::-:0;6204:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6204:18:16;6241:6;6248:7;6241:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6234:22;;;;;;;;-1:-1:-1;;;;;6234:22:16;;;;6241:15;;6234:22;;;-1:-1:-1;;;6234:22:16;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6234:22:16;;;-1:-1:-1;;6234:22:16;;;;-1:-1:-1;;;;;6234:22:16;;;;;;;;;;;;;;;;6142:121;-1:-1:-1;;6142:121:16:o;3838:624::-;3921:12;1531:13:2;:11;:13::i;:::-;4001:1:16::1;-1:-1:-1::0;;;;;3958:45:16::1;:6;3965:7;3958:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3958:31:16::1;:45:::0;3955:107:::1;;4043:7;4025:26;;-1:-1:-1::0;;;4025:26:16::1;;;;;;;;:::i;3955:107::-;4100:6;4075;4082:7;4075:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;4072:108;;;4153:7;4162:6;4129:40;;-1:-1:-1::0;;;4129:40:16::1;;;;;;;;;:::i;4072:108::-;4190:18;4211:49;4220:7;4229:22;4253:6;4211:8;:49::i;:::-;4190:70;;4274:13;4271:142;;;4329:6;4303;4310:7;4303:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4354:23:16::1;::::0;::::1;::::0;::::1;::::0;4361:7;;4370:6;;4354:23:::1;:::i;:::-;;;;;;;;4398:4;4391:11;;;;;4271:142;4447:7;4430:25;;-1:-1:-1::0;;;4430:25:16::1;;;;;;;;:::i;3347:484::-:0;3428:12;1531:13:2;:11;:13::i;:::-;3498:1:16::1;-1:-1:-1::0;;;;;3455:45:16::1;:6;3462:7;3455:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3455:31:16::1;:45:::0;3452:107:::1;;3540:7;3522:26;;-1:-1:-1::0;;;3522:26:16::1;;;;;;;;:::i;3452:107::-;3569:16;3588:47;3597:7;3606:20;3628:6;3588:8;:47::i;:::-;3569:66;;3649:11;3646:138;;;3702:6;3676;3683:7;3676:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3727:21:16::1;::::0;::::1;::::0;::::1;::::0;3732:7;;3741:6;;3727:21:::1;:::i;3646:138::-;3816:7;3801:23;;-1:-1:-1::0;;;3801:23:16::1;;;;;;;;:::i;2543:215:2:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:2;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:2;;2700:1:::1;2672:31;::::0;::::1;3782:51:17::0;3755:18;;2672:31:2::1;3636:203:17::0;2623:91:2::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:2;735:10:7;1855:23:2;1851:101;;1901:40;;-1:-1:-1;;;1901:40:2;;735:10:7;1901:40:2;;;3782:51:17;3755:18;;1901:40:2;3636:203:17;6742:200:16;6850:12;6881:54;6890:7;6899:15;6916:6;6932:1;6948:888;7074:4;7095:18;7114:7;7095:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7123:15;7095:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7095:44:16;:54;;;;;7090:98;;-1:-1:-1;7172:5:16;7165:12;;7090:98;7203:6;7198:598;7219:18;7238:7;7219:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7247:15;7219:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7219:44:16;:63;;:70;7215:74;;7198:598;;;7310:23;7370:18;7389:7;7370:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7398:15;7370:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:63;;7434:1;7370:66;;;;;;;;:::i;:::-;;;;;;;;7353:84;;;;;;;;:::i;:::-;;;;;;;;;;;;;7343:95;;;;;;7310:129;;7454:26;7483:137;7503:16;7521:98;7534:18;7553:7;7534:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7562:15;7534:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:54;;7589:1;7534:57;;;;;;;;:::i;:::-;;;;;;;;7521:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7593:7;7602:8;7612:6;7521:12;:98::i;:::-;7483:19;:137::i;:::-;7454:166;;7636:16;7658:6;7665:7;7658:15;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;7658:31:16;;:51;;7695:13;;7658:51;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7635:74;;;7728:11;7723:63;;7766:5;7759:12;;;;;;;;7723:63;7296:500;;;7291:3;;;;;:::i;:::-;;;;7198:598;;;-1:-1:-1;7821:4:16;;6948:888;-1:-1:-1;;;;;6948:888:16:o;6269:281::-;6399:6;6395:149;6415:12;:19;6411:1;:23;6395:149;;;6518:12;6531:1;6518:15;;;;;;;;:::i;:::-;;;;;;;6455:18;6474:7;6455:27;;;;;;:::i;:::-;;;;;;;;;;;;;:60;6483:12;6496:1;6483:15;;;;;;;;:::i;:::-;;;;;;;:31;;;6455:60;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;6455:60:16;:78;;;;:60;;-1:-1:-1;;6455:78:16;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;6455:78:16;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:16;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:16;;;;;;;;;;;;-1:-1:-1;;6455:78:16;;;;;;;;;;6436:3;;;;:::i;:::-;;;;6395:149;;;;6269:281;;:::o;6556:180::-;6649:12;6680:49;6689:7;6698:15;6715:1;6726;6680:8;:49::i;:::-;6673:56;6556:180;-1:-1:-1;;;6556:180:16:o;2912:187:2:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:2;;;-1:-1:-1;;;;;;3020:17:2;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5860:276:16:-;5928:9;5923:207;5947:3;:10;5943:14;;5923:207;;;5982:25;5996:3;6000:1;5996:6;;;;;;;;:::i;:::-;;;;;;;;5982:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6004:2;5982:13;:25::i;:::-;5978:142;;;6036:3;6040:10;;:14;;6053:1;;6040:14;:::i;:::-;6036:19;;;;;;;;:::i;:::-;;;;;;;;6027:3;6031:1;6027:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6073:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;5923:207;5860:276;:::o;5978:142::-;5959:3;;;;:::i;:::-;;;;5923:207;;;;5860:276;:::o;8230:1128::-;8361:14;8386:28;8429:9;:16;-1:-1:-1;;;;;8417:29:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8386:60;;8461:6;8456:866;8477:9;:16;8473:1;:20;8456:866;;;8534:14;8518:9;8528:1;8518:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8514:798;;8587:25;;;8606:4;8587:25;;;3782:51:17;3755:18;8587:25:16;;;;;;;;;;;;;8568:13;8582:1;8568:16;;;;;;;;:::i;:::-;;;;;;:44;;;;8514:798;;;8653:15;8637:9;8647:1;8637:12;;;;;;;;:::i;:::-;;;;;;;:31;;;;;;;;:::i;:::-;;8633:679;;8718:7;8707:19;;;;;;;;:::i;8633:679::-;8767:14;8751:9;8761:1;8751:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8747:565;;8820:18;;;;;;27922:25:17;;;27895:18;8820::16;27776:177:17;8747:565:16;8879:13;8863:9;8873:1;8863:12;;;;;;;;:::i;:::-;;;;;;;:29;;;;;;;;:::i;:::-;;8859:453;;8942:6;8949:7;8942:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:21;;;-1:-1:-1;;;;;8942:21:16;8931:33;;;3782:51:17;3755:18;8931:33:16;3636:203:17;8859:453:16;9005:23;8989:9;8999:1;8989:12;;;;;;;;:::i;:::-;;;;;;;:39;;;;;;;;:::i;:::-;;8985:327;;9078:6;9085:7;9078:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;9078:31:16;9067:43;;;3782:51:17;3755:18;9067:43:16;3636:203:17;8985:327:16;9151:16;9135:9;9145:1;9135:12;;;;;;;;:::i;:::-;;;;;;;:32;;;;;;;;:::i;:::-;;9131:181;;9206:20;;;-1:-1:-1;;;;;3800:32:17;;9206:20:16;;;3782:51:17;3755:18;9206:20:16;3636:203:17;9131:181:16;9265:32;;-1:-1:-1;;;9265:32:16;;28160:2:17;9265:32:16;;;28142:21:17;28199:2;28179:18;;;28172:30;-1:-1:-1;;;28218:18:17;;;28211:52;28280:18;;9265:32:16;27958:346:17;9131:181:16;8495:3;;;;:::i;:::-;;;;8456:866;;;-1:-1:-1;9338:13:16;8230:1128;-1:-1:-1;;;;;8230:1128:16:o;7842:382::-;8003:34;;;-1:-1:-1;;;;;;28448:33:17;;8003:34:16;;;28436:46:17;8003:34:16;;;;;;;;;28498:11:17;;;;8003:34:16;;;8052:9;8047:141;8071:13;:20;8067:1;:24;8047:141;;;8145:13;8160;8174:1;8160:16;;;;;;;;:::i;:::-;;;;;;;8128:49;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8112:65;;8093:3;;;;;:::i;:::-;;;;8047:141;;;;7842:382;;;;:::o;2914:182:8:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;-1:-1:-1;;3070:19:8;;;;;;;3047;;;;;;;;;;:42;;2914:182::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;14:127:17:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;218:2;212:9;260:3;248:16;;-1:-1:-1;;;;;279:34:17;;315:22;;;276:62;273:88;;;341:18;;:::i;:::-;377:2;370:22;146:252;:::o;403:275::-;474:2;468:9;539:2;520:13;;-1:-1:-1;;516:27:17;504:40;;-1:-1:-1;;;;;559:34:17;;595:22;;;556:62;553:88;;;621:18;;:::i;:::-;657:2;650:22;403:275;;-1:-1:-1;403:275:17:o;683:531::-;726:5;779:3;772:4;764:6;760:17;756:27;746:55;;797:1;794;787:12;746:55;833:6;820:20;-1:-1:-1;;;;;855:2:17;852:26;849:52;;;881:18;;:::i;:::-;925:55;968:2;949:13;;-1:-1:-1;;945:27:17;974:4;941:38;925:55;:::i;:::-;1005:2;996:7;989:19;1051:3;1044:4;1039:2;1031:6;1027:15;1023:26;1020:35;1017:55;;;1068:1;1065;1058:12;1017:55;1133:2;1126:4;1118:6;1114:17;1107:4;1098:7;1094:18;1081:55;1181:1;1156:16;;;1174:4;1152:27;1145:38;;;;1160:7;683:531;-1:-1:-1;;;683:531:17:o;1219:322::-;1288:6;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;-1:-1:-1;;;;;1422:6:17;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485;1527:7;1518:6;1507:9;1503:22;1485:50;:::i;1546:127::-;1607:10;1602:3;1598:20;1595:1;1588:31;1638:4;1635:1;1628:15;1662:4;1659:1;1652:15;1678:140;1759:1;1752:5;1749:12;1739:46;;1765:18;;:::i;:::-;1794;;1678:140::o;1823:250::-;1908:1;1918:113;1932:6;1929:1;1926:13;1918:113;;;2008:11;;;2002:18;1989:11;;;1982:39;1954:2;1947:10;1918:113;;;-1:-1:-1;;2065:1:17;2047:16;;2040:27;1823:250::o;2078:271::-;2120:3;2158:5;2152:12;2185:6;2180:3;2173:19;2201:76;2270:6;2263:4;2258:3;2254:14;2247:4;2240:5;2236:16;2201:76;:::i;:::-;2331:2;2310:15;-1:-1:-1;;2306:29:17;2297:39;;;;2338:4;2293:50;;2078:271;-1:-1:-1;;2078:271:17:o;2354:594::-;-1:-1:-1;;;;;2665:15:17;;;2647:34;;2590:4;;2690:53;2739:2;2724:18;;2716:6;2690:53;:::i;:::-;2779:3;2774:2;2763:9;2759:18;2752:31;2800:46;2841:3;2830:9;2826:19;2818:6;2800:46;:::i;:::-;2882:15;;2877:2;2862:18;;2855:43;-1:-1:-1;2929:3:17;2914:19;2907:35;2792:54;2354:594;-1:-1:-1;;;2354:594:17:o;2953:390::-;3031:6;3039;3092:2;3080:9;3071:7;3067:23;3063:32;3060:52;;;3108:1;3105;3098:12;3060:52;3148:9;3135:23;-1:-1:-1;;;;;3173:6:17;3170:30;3167:50;;;3213:1;3210;3203:12;3167:50;3236;3278:7;3269:6;3258:9;3254:22;3236:50;:::i;:::-;3226:60;3333:2;3318:18;;;;3305:32;;-1:-1:-1;;;;2953:390:17:o;3844:173::-;3912:20;;-1:-1:-1;;;;;3961:31:17;;3951:42;;3941:70;;4007:1;4004;3997:12;4022:464;4109:6;4117;4125;4178:2;4166:9;4157:7;4153:23;4149:32;4146:52;;;4194:1;4191;4184:12;4146:52;4234:9;4221:23;-1:-1:-1;;;;;4259:6:17;4256:30;4253:50;;;4299:1;4296;4289:12;4253:50;4322;4364:7;4355:6;4344:9;4340:22;4322:50;:::i;:::-;4312:60;;;4391:38;4425:2;4414:9;4410:18;4391:38;:::i;:::-;4381:48;;4476:2;4465:9;4461:18;4448:32;4438:42;;4022:464;;;;;:::o;4491:803::-;4653:4;4682:2;4722;4711:9;4707:18;4752:2;4741:9;4734:21;4775:6;4810;4804:13;4841:6;4833;4826:22;4879:2;4868:9;4864:18;4857:25;;4941:2;4931:6;4928:1;4924:14;4913:9;4909:30;4905:39;4891:53;;4979:2;4971:6;4967:15;5000:1;5010:255;5024:6;5021:1;5018:13;5010:255;;;5117:2;5113:7;5101:9;5093:6;5089:22;5085:36;5080:3;5073:49;5145:40;5178:6;5169;5163:13;5145:40;:::i;:::-;5135:50;-1:-1:-1;5243:12:17;;;;5208:15;;;;5046:1;5039:9;5010:255;;;-1:-1:-1;5282:6:17;;4491:803;-1:-1:-1;;;;;;;4491:803:17:o;5299:150::-;5374:20;;5423:1;5413:12;;5403:40;;5439:1;5436;5429:12;5454:203;5534:4;-1:-1:-1;;;;;5559:6:17;5556:30;5553:56;;;5589:18;;:::i;:::-;-1:-1:-1;5634:1:17;5630:14;5646:4;5626:25;;5454:203::o;5662:156::-;5743:20;;5792:1;5782:12;;5772:40;;5808:1;5805;5798:12;5823:1931;5892:5;5945:3;5938:4;5930:6;5926:17;5922:27;5912:55;;5963:1;5960;5953:12;5912:55;5999:6;5986:20;6025:4;6049:80;6065:63;6125:2;6065:63;:::i;:::-;6049:80;:::i;:::-;6163:15;;;6225:1;6265:11;;;6253:24;;6249:33;;;6194:12;;;;6151:3;6294:15;;;6291:35;;;6322:1;6319;6312:12;6291:35;6358:2;6350:6;6346:15;6370:1355;6386:6;6381:3;6378:15;6370:1355;;;6472:3;6459:17;-1:-1:-1;;;;;6495:11:17;6492:35;6489:125;;;6568:1;6597:2;6593;6586:14;6489:125;6637:24;;6696:2;6688:11;;6684:21;-1:-1:-1;6674:119:17;;6747:1;6776:2;6772;6765:14;6674:119;6837:2;6833;6829:11;6816:25;6864:2;6892:80;6908:63;6968:2;6908:63;:::i;6892:80::-;7016:17;;;7110:11;;;7102:20;;7098:29;;;7055:14;;;;7143:17;;;7140:107;;;7201:1;7230:2;7226;7219:14;7140:107;7273:11;;;;7297:355;7315:8;7308:5;7305:19;7297:355;;;7409:5;7396:19;7383:32;;7452:1;7445:5;7442:12;7432:129;;7505:1;7539:3;7534;7527:16;7432:129;7578:20;;;7336:14;;;;7624;;;;7297:355;;;7665:18;;-1:-1:-1;;;7703:12:17;;;;-1:-1:-1;6403:12:17;;6370:1355;;;-1:-1:-1;7743:5:17;;5823:1931;-1:-1:-1;;;;;;;5823:1931:17:o;7759:118::-;7845:5;7838:13;7831:21;7824:5;7821:32;7811:60;;7867:1;7864;7857:12;7882:128;7947:20;;7976:28;7947:20;7976:28;:::i;8015:3590::-;8197:6;8205;8213;8221;8229;8282:3;8270:9;8261:7;8257:23;8253:33;8250:53;;;8299:1;8296;8289:12;8250:53;8322:29;8341:9;8322:29;:::i;:::-;8312:39;;8370:45;8411:2;8400:9;8396:18;8370:45;:::i;:::-;8360:55;;-1:-1:-1;;;;;8458:2:17;8447:9;8443:18;8430:32;8427:56;8424:76;;;8496:1;8493;8486:12;8424:76;8519;8587:7;8580:2;8569:9;8565:18;8552:32;8541:9;8537:48;8519:76;:::i;:::-;8509:86;;8614:38;8648:2;8637:9;8633:18;8614:38;:::i;:::-;8604:48;;-1:-1:-1;;;;;8695:3:17;8684:9;8680:19;8667:33;8664:57;8661:77;;;8734:1;8731;8724:12;8661:77;8823:7;8816:4;8808:3;8797:9;8793:19;8780:33;8769:9;8765:49;8761:60;8757:74;8747:102;;8845:1;8842;8835:12;8747:102;8869:141;8885:124;9001:3;8990:9;8986:19;8973:33;8962:9;8958:49;8945:63;8885:124;:::i;8869:141::-;9112:3;9097:19;;9084:33;9069:49;;9056:63;;9044:76;;;9145:2;9136:12;;;;9032:3;9226:1;9222:71;;;;9167:127;;;9163:136;9160:149;-1:-1:-1;9157:169:17;;;9322:1;9319;9312:12;9157:169;9401:2;9393:3;9382:9;9378:19;9365:33;9354:9;9350:49;9346:58;9413:2162;9559:3;9544:19;;9531:33;9516:49;;9503:63;;9500:1;9496:71;9441:127;9570:2;9437:136;9429:145;;9413:2162;;;-1:-1:-1;;;;;9648:3:17;9635:17;9632:41;9629:61;;;9686:1;9683;9676:12;9629:61;9781:3;9768:17;9760:3;9749:9;9745:19;9732:33;9721:9;9717:49;9713:73;9838:3;9832:2;9828:7;9823:2;9814:7;9810:16;9806:30;9802:40;9799:60;;;9855:1;9852;9845:12;9799:60;9885:22;;:::i;:::-;9934:44;9974:2;9970;9966:11;9934:44;:::i;:::-;9927:5;9920:59;-1:-1:-1;;;;;10019:2:17;10015;10011:11;9998:25;9995:49;9992:69;;;10057:1;10054;10047:12;9992:69;10133:7;10128:2;10121;10117;10113:11;10100:25;10096:2;10092:34;10088:43;10084:57;10074:85;;10155:1;10152;10145:12;10074:85;10185:135;10201:118;10314:2;10307;10303;10299:11;10286:25;10282:2;10278:34;10274:43;10261:57;10201:118;:::i;10185:135::-;10431:2;10424;10416:11;;;10403:25;10395:34;;10391:43;;;10378:57;10364:72;;;10458:14;;;;10364:72;10539:1;10535:65;10495:106;10491:115;-1:-1:-1;;10485:148:17;;;10629:1;10626;10619:12;10485:148;10699:2;10692;10688;10684:11;10671:25;10667:2;10663:34;10659:43;10715:463;10857:2;10834:11;;;10821:25;10813:34;;10849:2;10809:43;;10796:57;10793:1;10789:65;10749:106;10745:115;10735:126;;10715:463;;;-1:-1:-1;;;;;10951:5:17;10938:19;10935:43;10932:63;;;10991:1;10988;10981:12;10932:63;11026:97;11115:7;11110:2;11101:5;11088:19;11081:2;11077;11073:11;11060:25;11056:2;11052:34;11048:60;11044:69;11026:97;:::i;:::-;11012:112;;11161:2;11150:14;;;;10885;10715:463;;;-1:-1:-1;11209:2:17;11198:14;;11191:29;-1:-1:-1;;;;;;11260:2:17;11252:11;;11239:25;11236:49;11233:69;;;11298:1;11295;11288:12;11233:69;11338:97;11427:7;11422:2;11415;11411;11407:11;11394:25;11390:2;11386:34;11382:43;11338:97;:::i;:::-;11333:2;11326:5;11322:14;11315:121;11472:29;11496:3;11492:2;11488:12;11472:29;:::i;:::-;11467:2;11456:14;;11449:53;11515:18;;-1:-1:-1;11562:2:17;11553:12;;;;9592;9413:2162;;;9417:3;11594:5;11584:15;;;;8015:3590;;;;;;;;:::o;11610:566::-;11720:6;11728;11736;11744;11797:3;11785:9;11776:7;11772:23;11768:33;11765:53;;;11814:1;11811;11804:12;11765:53;11837:29;11856:9;11837:29;:::i;:::-;11827:39;;11885:45;11926:2;11915:9;11911:18;11885:45;:::i;:::-;11875:55;;11981:2;11970:9;11966:18;11953:32;-1:-1:-1;;;;;12000:6:17;11997:30;11994:50;;;12040:1;12037;12030:12;11994:50;12063;12105:7;12096:6;12085:9;12081:22;12063:50;:::i;:::-;12053:60;;;12132:38;12166:2;12155:9;12151:18;12132:38;:::i;:::-;12122:48;;11610:566;;;;;;;:::o;12181:725::-;12356:2;12345:9;12338:21;12319:4;12395:1;12391;12386:3;12382:11;12378:19;12452:2;12443:6;12437:13;12433:22;12428:2;12417:9;12413:18;12406:50;12503:2;12495:6;12491:15;12485:22;12516:59;12571:2;12560:9;12556:18;12542:12;12516:59;:::i;:::-;;12624:2;12616:6;12612:15;12606:22;12664:4;12659:2;12648:9;12644:18;12637:32;12692:54;12741:3;12730:9;12726:19;12710:14;12692:54;:::i;:::-;12678:68;;12811:2;12805;12797:6;12793:15;12787:22;12783:31;12777:3;12766:9;12762:19;12755:60;12871:3;12863:6;12859:16;12853:23;12846:4;12835:9;12831:20;12824:53;12894:6;12886:14;;;;12181:725;;;;:::o;12911:429::-;13009:6;13017;13070:2;13058:9;13049:7;13045:23;13041:32;13038:52;;;13086:1;13083;13076:12;13038:52;13126:9;13113:23;-1:-1:-1;;;;;13151:6:17;13148:30;13145:50;;;13191:1;13188;13181:12;13145:50;13214;13256:7;13247:6;13236:9;13232:22;13214:50;:::i;:::-;13204:60;;;13283:51;13330:2;13319:9;13315:18;13283:51;:::i;:::-;13273:61;;12911:429;;;;;:::o;13345:146::-;13432:1;13425:5;13422:12;13412:46;;13438:18;;:::i;13496:301::-;13670:2;13655:18;;13682:50;13659:9;13714:6;13682:50;:::i;:::-;13782:6;13775:14;13768:22;13763:2;13752:9;13748:18;13741:50;13496:301;;;;;:::o;13802:186::-;13861:6;13914:2;13902:9;13893:7;13889:23;13885:32;13882:52;;;13930:1;13927;13920:12;13882:52;13953:29;13972:9;13953:29;:::i;13993:380::-;14072:1;14068:12;;;;14115;;;14136:61;;14190:4;14182:6;14178:17;14168:27;;14136:61;14243:2;14235:6;14232:14;14212:18;14209:38;14206:161;;14289:10;14284:3;14280:20;14277:1;14270:31;14324:4;14321:1;14314:15;14352:4;14349:1;14342:15;14206:161;;13993:380;;;:::o;14378:289::-;14509:3;14547:6;14541:13;14563:66;14622:6;14617:3;14610:4;14602:6;14598:17;14563:66;:::i;:::-;14645:16;;;;;14378:289;-1:-1:-1;;14378:289:17:o;14672:220::-;14821:2;14810:9;14803:21;14784:4;14841:45;14882:2;14871:9;14867:18;14859:6;14841:45;:::i;15248:291::-;15425:2;15414:9;15407:21;15388:4;15445:45;15486:2;15475:9;15471:18;15463:6;15445:45;:::i;:::-;15437:53;;15526:6;15521:2;15510:9;15506:18;15499:34;15248:291;;;;;:::o;16258:127::-;16319:10;16314:3;16310:20;16307:1;16300:31;16350:4;16347:1;16340:15;16374:4;16371:1;16364:15;16390:128;16457:9;;;16478:11;;;16475:37;;;16492:18;;:::i;16523:388::-;16728:2;16717:9;16710:21;16691:4;16748:45;16789:2;16778:9;16774:18;16766:6;16748:45;:::i;:::-;-1:-1:-1;;;;;16829:32:17;;;;16824:2;16809:18;;16802:60;-1:-1:-1;16893:2:17;16878:18;16871:34;16740:53;16523:388;-1:-1:-1;16523:388:17:o;17471:545::-;17573:2;17568:3;17565:11;17562:448;;;17609:1;17634:5;17630:2;17623:17;17679:4;17675:2;17665:19;17749:2;17737:10;17733:19;17730:1;17726:27;17720:4;17716:38;17785:4;17773:10;17770:20;17767:47;;;-1:-1:-1;17808:4:17;17767:47;17863:2;17858:3;17854:12;17851:1;17847:20;17841:4;17837:31;17827:41;;17918:82;17936:2;17929:5;17926:13;17918:82;;;17981:17;;;17962:1;17951:13;17918:82;;;17922:3;;;17471:545;;;:::o;18192:1352::-;18318:3;18312:10;-1:-1:-1;;;;;18337:6:17;18334:30;18331:56;;;18367:18;;:::i;:::-;18396:97;18486:6;18446:38;18478:4;18472:11;18446:38;:::i;:::-;18440:4;18396:97;:::i;:::-;18548:4;;18612:2;18601:14;;18629:1;18624:663;;;;19331:1;19348:6;19345:89;;;-1:-1:-1;19400:19:17;;;19394:26;19345:89;-1:-1:-1;;18149:1:17;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;19447:81;;18594:944;;18624:663;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;18660:20:17;;;18778:236;18792:7;18789:1;18786:14;18778:236;;;18881:19;;;18875:26;18860:42;;18973:27;;;;18941:1;18929:14;;;;18808:19;;18778:236;;;18782:3;19042:6;19033:7;19030:19;19027:201;;;19103:19;;;19097:26;-1:-1:-1;;19186:1:17;19182:14;;;19198:3;19178:24;19174:37;19170:42;19155:58;19140:74;;19027:201;-1:-1:-1;;;;;19274:1:17;19258:14;;;19254:22;19241:36;;-1:-1:-1;18192:1352:17:o;19549:522::-;-1:-1:-1;;;;;19832:15:17;;;19814:34;;19757:4;;19857:53;19906:2;19891:18;;19883:6;19857:53;:::i;:::-;19946:3;19941:2;19930:9;19926:18;19919:31;19967:46;20008:3;19997:9;19993:19;19985:6;19967:46;:::i;:::-;19959:54;;20061:2;20053:6;20049:15;20044:2;20033:9;20029:18;20022:43;;19549:522;;;;;;;:::o;20076:1127::-;20144:3;20182:5;20176:12;20209:6;20204:3;20197:19;20235:4;20264:2;20259:3;20255:12;20248:19;;20289:3;20329:6;20326:1;20322:14;20317:3;20313:24;20371:2;20364:5;20360:14;20392:1;20413;20423:754;20439:6;20434:3;20431:15;20423:754;;;20504:16;;;20492:29;;20544:13;;20616:9;;20638:22;;;20724:11;;;;20682:13;;;;20759:1;20773:298;20789:8;20784:3;20781:17;20773:298;;;20868:8;20862:15;20911:1;20907:2;20904:9;20894:43;;20917:18;;:::i;:::-;20954:17;;21040;;;;20997:14;;;;20817:1;20808:11;20773:298;;;-1:-1:-1;;21155:12:17;;;;21092:5;-1:-1:-1;;21120:15:17;;;;20465:1;20456:11;20423:754;;;-1:-1:-1;21193:4:17;;20076:1127;-1:-1:-1;;;;;;;;20076:1127:17:o;21208:2490::-;-1:-1:-1;;;;;21667:15:17;;;21649:34;;21570:4;;21599:3;;21702:2;21713:53;21747:18;;;21739:6;21713:53;:::i;:::-;21785:2;21823;21818;21807:9;21803:18;21796:30;21849:45;21890:2;21879:9;21875:18;21867:6;21849:45;:::i;:::-;21913:2;21963;21955:6;21951:15;21946:2;21935:9;21931:18;21924:43;21986:3;21976:13;;22037:9;22029:6;22025:22;22020:2;22009:9;22005:18;21998:50;22068:6;22103;22097:13;22134:6;22126;22119:22;22169:2;22161:6;22157:15;22150:22;;22228:2;22218:6;22215:1;22211:14;22203:6;22199:27;22195:36;22266:2;22258:6;22254:15;22287:1;22297:1372;22311:6;22308:1;22305:13;22297:1372;;;22401:2;22397:7;22388:6;22380;22376:19;22372:33;22367:3;22360:46;22435:6;22429:13;22481:2;22473:6;22469:15;22497:50;22540:6;22535:2;22529:9;22497:50;:::i;:::-;22586:11;;;22580:18;22618:15;;;22611:27;;;22699:19;;22731:24;;;;22839:1;22835:16;;;22823:29;;22819:38;;;22886:21;;;;22777:15;;;;22931:1;22945:297;22961:8;22956:3;22953:17;22945:297;;;23067:3;23063:8;23054:6;23046;23042:19;23038:34;23031:5;23024:49;23100:42;23135:6;23124:8;23118:15;23100:42;:::i;:::-;23090:52;-1:-1:-1;23171:17:17;;;;23214:14;;;;22989:1;22980:11;22945:297;;;22949:3;;;;23291:2;23287;23283:11;23277:18;23344:6;23336;23332:19;23327:2;23319:6;23315:15;23308:44;23379:67;23439:6;23423:14;23379:67;:::i;:::-;23487:11;;;23481:18;3418:13;;3411:21;23544:15;;;3399:34;23481:18;23365:81;-1:-1:-1;23512:48:17;;-1:-1:-1;3348:91:17;23512:48;23647:12;;;;23583:6;-1:-1:-1;;23612:15:17;;;;22333:1;22326:9;22297:1372;;;22301:3;;23686:6;23678:14;;;;;;;;;;;21208:2490;;;;;;;;:::o;23703:245::-;23770:6;23823:2;23811:9;23802:7;23798:23;23794:32;23791:52;;;23839:1;23836;23829:12;23791:52;23871:9;23865:16;23890:28;23912:5;23890:28;:::i;24663:125::-;24728:9;;;24749:10;;;24746:36;;;24762:18;;:::i;24793:127::-;24854:10;24849:3;24845:20;24842:1;24835:31;24885:4;24882:1;24875:15;24909:4;24906:1;24899:15;24925:842;25053:3;25082:1;25115:6;25109:13;25145:36;25171:9;25145:36;:::i;:::-;25200:1;25217:18;;;25244:133;;;;25391:1;25386:356;;;;25210:532;;25244:133;-1:-1:-1;;25277:24:17;;25265:37;;25350:14;;25343:22;25331:35;;25322:45;;;-1:-1:-1;25244:133:17;;25386:356;25417:6;25414:1;25407:17;25447:4;25492:2;25489:1;25479:16;25517:1;25531:165;25545:6;25542:1;25539:13;25531:165;;;25623:14;;25610:11;;;25603:35;25666:16;;;;25560:10;;25531:165;;;25535:3;;;25725:6;25720:3;25716:16;25709:23;;25210:532;-1:-1:-1;25758:3:17;;24925:842;-1:-1:-1;;;;;;24925:842:17:o;26064:135::-;26103:3;26124:17;;;26121:43;;26144:18;;:::i;:::-;-1:-1:-1;26191:1:17;26180:13;;26064:135::o;26204:1435::-;26323:3;26317:4;26314:13;26311:26;;26330:5;;26204:1435::o;26311:26::-;26360:37;26392:3;26386:10;26360:37;:::i;:::-;-1:-1:-1;;;;;26412:6:17;26409:30;26406:56;;;26442:18;;:::i;:::-;26471:97;26561:6;26521:38;26553:4;26547:11;26521:38;:::i;26471:97::-;26594:1;26622:2;26614:6;26611:14;26639:1;26634:748;;;;27426:1;27443:6;27440:89;;;-1:-1:-1;27495:19:17;;;27489:26;27440:89;-1:-1:-1;;18149:1:17;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;27542:81;;26604:1029;;26634:748;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;26670:20:17;;;17418:1;17411:14;;;17455:4;17442:18;;26834:9;26856:251;26870:7;26867:1;26864:14;26856:251;;;26952:21;;;26946:28;26931:44;;27002:1;27075:18;;;;27030:15;;;;26893:4;26886:12;26856:251;;;26860:3;27135:6;27126:7;27123:19;27120:203;;;27196:21;;;27190:28;-1:-1:-1;;27281:1:17;27277:14;;;27293:3;27273:24;27269:37;27265:42;27250:58;27235:74;;27120:203;;;;27369:1;27360:6;27357:1;27353:14;27349:22;27343:4;27336:36;26604:1029;;;;26204:1435;;:::o;27644:127::-;27705:10;27700:3;27696:20;27693:1;27686:31;27736:4;27733:1;27726:15;27760:4;27757:1;27750:15;28520:492;28695:3;28733:6;28727:13;28749:66;28808:6;28803:3;28796:4;28788:6;28784:17;28749:66;:::i;:::-;28878:13;;28837:16;;;;28900:70;28878:13;28837:16;28947:4;28935:17;;28900:70;:::i;:::-;28986:20;;28520:492;-1:-1:-1;;;;28520:492:17:o","linkReferences":{}},"methodIdentifiers":{"assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","tokensInteractions(string,uint8)":"ea8f547f","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,uint8,string,address)":"72d4c33b","wrap(address,uint8,string,address,(uint8,string[],uint8[][],bool)[])":"623662ad"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"enum InteractionType\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"tokensInteractions\",\"outputs\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"functionsSignature\",\"type\":\"string[]\"},{\"internalType\":\"enum VarType[][]\",\"name\":\"variables\",\"type\":\"uint8[][]\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"internalType\":\"struct InteractionSignature[]\",\"name\":\"interactions\",\"type\":\"tuple[]\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/main/satp-wrapper.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/main/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/main/satp-wrapper.sol\":{\"keccak256\":\"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b\",\"dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"enum TokenType","name":"tokenType","type":"uint8","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"enum InteractionType","name":"","type":"uint8"}],"stateMutability":"view","type":"function","name":"tokensInteractions","outputs":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"bool","name":"available","type":"bool"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"struct InteractionSignature[]","name":"interactions","type":"tuple[]","components":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"string[]","name":"functionsSignature","type":"string[]"},{"internalType":"enum VarType[][]","name":"variables","type":"uint8[][]"},{"internalType":"bool","name":"available","type":"bool"}]}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/main/satp-wrapper.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/main/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/main/satp-wrapper.sol":{"keccak256":"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29","urls":["bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b","dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC"],"license":"GPL-3.0"}},"version":1},"id":16} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-contract-interface.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-contract-interface.sol new file mode 100644 index 0000000000..1432b1559d --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-contract-interface.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: UNKNOWN + +pragma solidity >=0.7.0; + +/* + * Smart Contract Interface to define the methods needed by SATP Wrapper Contract. + */ + +interface SATPContractInterface { + // mint creates new tokens with the given amount and assigns them to the owner. + function mint(address account, uint256 amount) external returns (bool); + // burn destroys the given amount of tokens from the owner. + function burn(address account, uint256 amount) external returns (bool); + // assign assigns the given amount of tokens from the owner to the target, without approval. + function assign(address from, address recipient, uint256 amount) external returns (bool); + // transfer transfers the given amount of tokens from the sender to the target, with approval needed. + function transfer(address from, address recipient, uint256 amount) external returns (bool); + // checks if the given account has the given role. + function hasPermission(address account) external view returns (bool); +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-erc20.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-erc20.sol new file mode 100644 index 0000000000..51c09dbb0e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-erc20.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "./ITraceableContract.sol"; + +import "./satp-contract-interface.sol"; + +error noPermission(address adr); + +contract SATPContract is AccessControl, ERC20, ITraceableContract, SATPContractInterface { + + bytes32 public constant BRIDGE_ROLE = keccak256("BRIDGE_ROLE"); + bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE"); + + string public id; + + constructor(address _owner, string memory _id) ERC20("SATPToken", "SATP") { + _grantRole(OWNER_ROLE, _owner); + _grantRole(BRIDGE_ROLE, _owner); + + id = _id; + } + + function mint(address account, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + _mint(account, amount); + return true; + } + + function burn(address account, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + _burn(account, amount); + return true; + } + + function assign(address from, address recipient, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + require(from == _msgSender(), "The msgSender is not the owner"); + _transfer(from, recipient, amount); + return true; + } + + function transfer(address from, address recipient, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + transferFrom(from, recipient, amount); + return true; + } + + function getAllAssetsIDs() external view returns (string[] memory) { + string[] memory myArray = new string[](1); + myArray[0] = id; + return myArray; + } + + function getId() view public returns (string memory) { + return id; + } + + function giveRole(address account) external onlyRole(OWNER_ROLE) returns (bool success) { + _grantRole(BRIDGE_ROLE, account); + return true; + } + + function hasPermission(address account) external view returns (bool success) { + if(hasRole(BRIDGE_ROLE, account)){ + return true; + } + revert noPermission(account); + } + + function checkBalance(address account) external view returns (uint256) { + return balanceOf(account); + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-wrapper.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-wrapper.sol new file mode 100644 index 0000000000..83c8ce1855 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/satp-wrapper.sol @@ -0,0 +1,251 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "./ITraceableContract.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; + +enum TokenType { ERC20, ERC721, ERC1155, OTHER } +enum InteractionType { MINT, BURN, ASSIGN, CHECKPERMITION, LOCK, UNLOCK } +enum VarType {CONTRACTADDRESS, TOKENTYPE, TOKENID, OWNER, AMOUNT, BRIDGE, RECEIVER} + +struct Token { + address contractAddress; + TokenType tokenType; + string tokenId; + address owner; + uint amount; //ammount that is approved by the contract owner +} + + +struct InteractionSignature { + InteractionType interactionType; + string[] functionsSignature; + VarType[][] variables; + bool available; +} + +error TokenNotAvailable(string tokenId); + +error TokenAlreadyWrapped(string tokenId); + +error TokenNotLocked(string tokenId); + +error TokenLocked(string tokenId); + +error TokenNotUnlocked(string tokenId); + +error InsuficientAmountLocked(string tokenId, uint256 amount); + +contract SATPWrapperContract is Ownable, ITraceableContract{ + + mapping (string => Token) public tokens; //contract address to Token + + mapping (string => mapping(InteractionType => InteractionSignature)) public tokensInteractions; + + string[] ids; + + address public bridge_address; + + event Wrap(address contractAddress, TokenType tokenType, string tokenId, address owner); + event Unwrap(string tokenId); + event Lock(string tokenId, uint256 amount); + event Unlock(string tokenId, uint256 amount); + event Mint(string tokenId, uint256 amount); + event Burn(string tokenId, uint256 amount); + event Assign(string tokenId, address receiver_account, uint256 amount); + + constructor(address _bridge_address) Ownable(_bridge_address) { + bridge_address = address(_bridge_address); + } + + function wrap(address contractAddress, TokenType tokenType, string memory tokenId, address owner, InteractionSignature[] memory interactions ) external onlyOwner returns (bool wrapSuccess) { + if(tokens[tokenId].contractAddress != address(0)) { + revert TokenAlreadyWrapped(tokenId); + } + + createNonStandardTokenOntology(tokenId, interactions); + + if(tokensInteractions[tokenId][InteractionType.CHECKPERMITION].available) { + require(interact(tokenId, InteractionType.CHECKPERMITION), "Contract does not have permission to interact with the token"); + } + + tokens[tokenId] = Token(contractAddress, tokenType, tokenId, owner, 0); + + ids.push(tokenId); + + emit Wrap(contractAddress, tokenType, tokenId, owner); + return true; + } + + function wrap(address contractAddress, TokenType tokenType, string memory tokenId, address owner) external onlyOwner returns (bool wrapSuccess) { + return this.wrap(contractAddress, tokenType, tokenId, owner, new InteractionSignature[](0)); + } + + function unwrap(string memory tokenId) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)) { + revert TokenNotAvailable(tokenId); + } + if(tokens[tokenId].amount > 0) { + revert TokenLocked(tokenId); + } + deleteFromArray(tokens[tokenId].tokenId); + delete tokens[tokenId]; + + emit Unwrap(tokenId); + return true; + } + + function lock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + bool lockSuccess = interact(tokenId, InteractionType.LOCK, amount); + + if(lockSuccess) { + tokens[tokenId].amount += amount; + emit Lock(tokenId, amount); + return true; + } + + revert TokenNotLocked(tokenId); + } + + function unlock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { //ammount + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + if(tokens[tokenId].amount < amount) { + revert InsuficientAmountLocked(tokenId, amount); + } + + bool unlockSuccess = interact(tokenId, InteractionType.UNLOCK, amount); + + if(unlockSuccess) { + tokens[tokenId].amount -= amount; + emit Unlock(tokenId, amount); + return true; + } + + revert TokenNotUnlocked(tokenId); + } + + function mint(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + require(interact(tokenId, InteractionType.MINT, amount) , "mint asset call failed"); + + tokens[tokenId].amount = amount; + emit Mint(tokenId, amount); + return true; + } + + function burn(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "burn asset asset is not locked"); + + require(interact(tokenId, InteractionType.BURN, amount), "burn asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Burn(tokenId, amount); + return true; + } + + function assign(string memory tokenId, address receiver_account, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "assign asset asset is not locked"); + + require(interact(tokenId, InteractionType.ASSIGN, amount, receiver_account), "assign asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Assign(tokenId, receiver_account, amount); + return true; + } + + + function getAllAssetsIDs() external view returns (string[] memory) { + return ids; + } + + function deleteFromArray(string memory id) internal { + for (uint256 i = 0; i < ids.length; i++) { + if (Strings.equal(ids[i], id)) { + ids[i] = ids[ids.length - 1]; + ids.pop(); + break; + } + } + } + + function getToken(string memory tokenId) view public returns (Token memory token) { + return tokens[tokenId]; + } + + function createNonStandardTokenOntology(string memory tokenId, InteractionSignature[] memory interactions) internal { + for(uint i = 0; i < interactions.length; i++) { + tokensInteractions[tokenId][interactions[i].interactionType] = interactions[i]; + } + } + + function interact(string memory tokenId, InteractionType interactionType) internal returns (bool success) { + return interact(tokenId, interactionType, 0, address(0)); + } + + function interact(string memory tokenId, InteractionType interactionType, uint256 amount) internal returns (bool success) { + return interact(tokenId, interactionType, amount, address(0)); + } + + function interact(string memory tokenId, InteractionType interactionType, uint256 amount, address receiver) internal returns (bool) { + if (!tokensInteractions[tokenId][interactionType].available) { + return false; + } + + for (uint i = 0; i < tokensInteractions[tokenId][interactionType].functionsSignature.length; i++) { + bytes4 functionSelector = bytes4(keccak256(abi.encodePacked(tokensInteractions[tokenId][interactionType].functionsSignature[i]))); + + bytes memory encodedParams = encodeDynamicParams(functionSelector, encodeParams(tokensInteractions[tokenId][interactionType].variables[i], tokenId, receiver, amount)); + + (bool callSuccess, ) = tokens[tokenId].contractAddress.call(encodedParams); + if (!callSuccess) { + return false; + } + } + + return true; + } + + function encodeDynamicParams(bytes4 functionSelector, bytes[] memory dynamicParams) internal pure returns (bytes memory encodedParams) { + encodedParams = abi.encodePacked(functionSelector); + for (uint256 i = 0; i < dynamicParams.length; i++) { + encodedParams = abi.encodePacked(encodedParams, dynamicParams[i]); + } + return encodedParams; + } + + function encodeParams(VarType[] memory variables, string memory tokenId, address receiver, uint256 amount) internal view returns (bytes[] memory){ + bytes[] memory dynamicParams = new bytes[](variables.length); + for (uint i = 0; i < variables.length; i++) { + if (variables[i] == VarType.BRIDGE) { + dynamicParams[i] = abi.encode(address(this)); + } else if (variables[i] == VarType.TOKENID) { + dynamicParams[i] = abi.encode(tokenId); + } else if (variables[i] == VarType.AMOUNT) { + dynamicParams[i] = abi.encode(amount); + } else if (variables[i] == VarType.OWNER) { + dynamicParams[i] = abi.encode(tokens[tokenId].owner); + } else if (variables[i] == VarType.CONTRACTADDRESS) { + dynamicParams[i] = abi.encode(tokens[tokenId].contractAddress); + } else if (variables[i] == VarType.RECEIVER) { + dynamicParams[i] = abi.encode(receiver); + } else { + revert("Variable not supported"); + } + } + return dynamicParams; + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol new file mode 100644 index 0000000000..cd46b6ee79 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.15; + +import "./../contracts/satp-erc20.sol"; +import "remix_tests.sol"; +import "remix_accounts.sol"; + +import "remix_accounts.sol"; + +contract SATPContractTest { + + SATPContract satpContract; + + function beforeEach () public { + satpContract = new SATPContract(address(this), "ID1"); + } + + function testTokenNameAndSymbol () public { + Assert.equal(satpContract.name(), "SATPToken", "token name did not match"); + Assert.equal(satpContract.symbol(), "SATP", "token symbol did not match"); + } + + function mintTokens () public { + satpContract.mint(address(this), 99); + uint256 balance = satpContract.balanceOf(address(this)); + Assert.equal(balance, 99, "tokens minted did not match"); + } + + function mintToOtherAccoutTokens () public { + satpContract.mint(TestsAccounts.getAccount(1), 99); + uint256 balance = satpContract.balanceOf(TestsAccounts.getAccount(1)); + Assert.equal(balance, 99, "tokens minted did not match"); + } + + function burnTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + satpContract.mint(address(this), 99); + satpContract.burn(address(this), 99); + uint256 balance = satpContract.balanceOf(address(this)); + Assert.equal(balance, initBalance, "tokens burned did not match"); + } + + function assignTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + + satpContract.mint(address(this), 99); + + satpContract.assign(address(this), TestsAccounts.getAccount(1), 99); + + Assert.equal(satpContract.balanceOf(TestsAccounts.getAccount(1)), 99, "tokens not assigned"); + Assert.equal(satpContract.balanceOf(address(this)), initBalance, "balance of account did not change"); + } + + function transferTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + satpContract.mint(address(this), 99); + satpContract.approve(address(this), 99); + satpContract.transfer(address(this), TestsAccounts.getAccount(1), 99); + Assert.equal(satpContract.balanceOf(TestsAccounts.getAccount(1)), 99, "tokens not transferred"); + Assert.equal(satpContract.balanceOf(address(this)), initBalance, "balance of account did not change"); + } +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol new file mode 100644 index 0000000000..2ba3e52521 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.4.22 <0.9.0; + +// This import is automatically injected by Remix +import "remix_tests.sol"; + +// This import is required to use custom transaction context +// Although it may fail compilation in 'Solidity Compiler' plugin +// But it will work fine in 'Solidity Unit Testing' plugin +import "remix_accounts.sol"; +import "../contracts/satp-wrapper.sol"; +import "./../contracts/satp-erc20.sol"; + +contract SATPWrapTest { + + SATPContract contract1; + SATPContract contract2; + + InteractionSignature[] signatures; + + SATPWrapperContract wrapperContract; + + string[] lockInteractions; + Types[][] lockVariables; + string[] unlockInteractions; + Types[][] unlockVariables; + string[] minInteractions; + Types[][] mintVariables; + string[] burnInteractions; + Types[][] burnVariables; + string[] assignInteractions; + Types[][] assignVariables; + string[] checkPermissionInteractions; + Types[][] checkPermissionVariables; + + function beforeEach() public { + // Remix does not offer a set of methods that can change the msg.sender so every contract owner is the same + + wrapperContract = new SATPWrapperContract(address(this)); + + contract1 = new SATPContract(address(wrapperContract), "ID1"); + contract2 = new SATPContract(address(this), "ID2"); + + lockInteractions.push("transfer(address,address,uint256)"); + + lockVariables.push([Types.OWNER, Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory lock = InteractionSignature(InteractionType.LOCK,lockInteractions,lockVariables, true); + signatures.push(lock); + + unlockInteractions.push("approve(address,uint256)"); + unlockInteractions.push("transfer(address,address,uint256)"); + + unlockVariables.push([Types.BRIDGE, Types.AMOUNT]); + unlockVariables.push([Types.BRIDGE, Types.OWNER, Types.AMOUNT]); + InteractionSignature memory unlock = InteractionSignature(InteractionType.UNLOCK,lockInteractions,lockVariables, true); + signatures.push(unlock); + + + minInteractions.push("mint(address,uint256)"); + + mintVariables.push([Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory mint = InteractionSignature(InteractionType.MINT,lockInteractions,lockVariables, true); + signatures.push(mint); + + + burnInteractions.push("burn(address,uint256)"); + + burnVariables.push([Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory burn = InteractionSignature(InteractionType.BURN,lockInteractions,lockVariables, true); + signatures.push(burn); + + + assignInteractions.push("assign(address,address,uint256)"); + + assignVariables.push([Types.BRIDGE, Types.RECEIVER, Types.AMOUNT]); + InteractionSignature memory assign = InteractionSignature(InteractionType.ASSIGN,lockInteractions,lockVariables, true); + signatures.push(assign); + + checkPermissionInteractions.push("hasPermission(address)"); + + checkPermissionVariables.push([Types.BRIDGE]); + InteractionSignature memory checkPermition = InteractionSignature(InteractionType.CHECKPERMITION,lockInteractions,lockVariables, true); + signatures.push(checkPermition); + } + + function checkWrap() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + Token memory tokenReceived = wrapperContract.getToken(contract1.getId()); + + Assert.equal(tokenReceived.contractAddress, address(contract1), "Tokens don't match"); + + Assert.equal(wrapperContract.getAllAssetsIDs()[0], contract1.getId(), "Ids don't match"); + } + + function checkWrapTokenAlreadyWrapped() public { + + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + try wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + + function checkUnwrap() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + wrapperContract.unwrap(contract1.getId()); + + Token memory tokenReceived = wrapperContract.getToken(contract1.getId()); + + Assert.notEqual(tokenReceived.contractAddress, address(contract1), "Tokens don't match"); + } + + function checkUnwrapATokenNotWrapped() public { + try wrapperContract.unwrap(contract1.getId()) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + + function checkUnwrapATokenWithValueLocked() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + wrapperContract.mint(contract1.getId(), 10); + + try wrapperContract.unwrap(contract1.getId()) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + function checkMint() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + + wrapperContract.mint(contract1.getId(), 10); + + Assert.equal(contract1.balanceOf(address(wrapperContract)), 10, "Token not minted"); + } + + function checkMintATokenNotWrapped() public { + try wrapperContract.mint(contract1.getId(), 10) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } +} + \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts new file mode 100644 index 0000000000..4ae10f035a --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts @@ -0,0 +1,116 @@ +import axios from "axios"; +import CryptoMaterial from "../../../crypto-material/crypto-material.json"; +import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; +import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; + +const BESU_CONTRACT_CBDC_ERC20_NAME = CBDCcontractJson.contractName; +const BESU_CONTRACT_ASSET_REF_NAME = AssetReferenceContractJson.contractName; + +export async function lockBesuAssetReference( + userAddress: string, + prkAddress: string, + assetRefID: string, +): Promise { + await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_ASSET_REF_NAME, + invocationType: "SEND", + methodName: "lockAssetReference", + gas: 1000000, + params: [assetRefID], + signingCredential: { + ethAccount: userAddress, + secret: prkAddress, + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); +} + +export async function getBesuBalance(address: string): Promise { + const response = await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + invocationType: "CALL", + methodName: "balanceOf", + gas: 1000000, + params: [address], + signingCredential: { + ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, + secret: CryptoMaterial.accounts["bridge"].privateKey, + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + + return parseInt(response.data.callOutput); +} + +export async function isBesuAssetReference( + assetRefID: string, +): Promise { + const response = await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_ASSET_REF_NAME, + invocationType: "CALL", + methodName: "isPresent", + gas: 1000000, + params: [assetRefID], + signingCredential: { + ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, + secret: CryptoMaterial.accounts["bridge"].privateKey, + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + + return response.data.callOutput; +} + +export async function resetBesu(): Promise { + await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + invocationType: "SEND", + methodName: "resetBalanceOf", + gas: 1000000, + params: [ + [ + CryptoMaterial.accounts["userA"].ethAddress, + CryptoMaterial.accounts["userB"].ethAddress, + CryptoMaterial.accounts["bridge"].ethAddress, + ], + ], + signingCredential: { + ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, + secret: CryptoMaterial.accounts["bridge"].privateKey, + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + + await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_ASSET_REF_NAME, + invocationType: "SEND", + methodName: "resetAssetRefsList", + gas: 1000000, + params: [], + signingCredential: { + ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, + secret: CryptoMaterial.accounts["bridge"].privateKey, + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts new file mode 100644 index 0000000000..4188182bfc --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts @@ -0,0 +1,161 @@ +import axios from "axios"; +import { getUserFromPseudonim } from "./steps/common"; +import CryptoMaterial from "../../../crypto-material/crypto-material.json"; + +const FABRIC_CHANNEL_NAME = "mychannel"; +const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; +const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; + +export async function getFabricBalance(identity: string): Promise { + const response = await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [identity], + methodName: "BalanceOf", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, + }, + ); + + return parseInt(response.data.functionOutput); +} + +export async function readFabricAssetReference( + assetRefID: string, +): Promise { + const response = await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [assetRefID], + methodName: "ReadAssetReference", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, + }, + ); + + return JSON.parse(response.data.functionOutput); +} + +export async function fabricAssetReferenceExists( + assetRefID: string, +): Promise { + const response = await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [assetRefID], + methodName: "AssetReferenceExists", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, + }, + ); + + return response.data.functionOutput; +} + +export async function lockFabricAssetReference( + user: string, + assetRefID: string, +): Promise { + return axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [assetRefID], + methodName: "LockAssetReference", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(user), + }, + }, + ); +} + +export async function deleteFabricAssetReference( + user: string, + assetRefID: string, +): Promise { + return axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [assetRefID], + methodName: "DeleteAssetReference", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(user), + }, + }, + ); +} + +export async function refundFabricTokens( + finalUserFabricID: string, + amount: number, + finalUserEthAddress: string, +): Promise { + return axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [amount.toString(), finalUserFabricID, finalUserEthAddress], + methodName: "Refund", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "bridge", + }, + }, + ); +} + +export async function resetFabric(): Promise { + await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [], + methodName: "ResetState", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, + }, + ); + + await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [], + methodName: "ResetState", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, + }, + ); +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature new file mode 100644 index 0000000000..28d48164cf --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/besu-gateway.feature @@ -0,0 +1,40 @@ +@besu +Feature: Hyperledger Besu gateway is working properly + + Scenario: Alice successfully escrows CBDC + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + Then "alice" has 0 CBDC available in the sidechain + Then "bob" has 500 CBDC available in the sidechain + + Scenario: Alice successfully creates an asset reference in the Besu network + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + Then the asset reference smart contract has an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" + + Scenario: Alice successfully locks an asset reference in the Besu network + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + Then the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" is locked in the sidechain + + Scenario: Alice successfully locks an asset reference in the Besu network + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + Then "charlie" fails to lock the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + + Scenario: Alice successfully deletes an asset reference in the Besu network + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + When bob deletes the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + Then the asset reference smart contract has no asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" + + Scenario: BridgeEntity deletes an asset reference and burns tokens in the Besu network + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + When bob locks the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + When bob deletes the asset reference with id "889242f8-58ae-449e-b938-fa28fdca65b6" in the sidechain + Then "alice" has 0 CBDC available in the sidechain + Then "bob" has 0 CBDC available in the sidechain diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature new file mode 100644 index 0000000000..09da8ebfd3 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-back.feature @@ -0,0 +1,67 @@ +Feature: Client successfully bridges back CBDC + + @bridgeBack + @fabric + @besu + Scenario: Client successfully initiates bridge back of CBDC to own address in the source chain + Given "alice" with 500 CBDC available in the source chain + Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain + Then "alice" initiates bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain + + @bridgeBack + @fabric + @besu + Scenario: Client initiates bridge back of CBDC and accounts have consistent balances in both chains + Given "alice" with 500 CBDC available in the source chain + Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain + Then "alice" initiates bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain + Then "alice" has 0 CBDC available in the sidechain + Then "bob" has 0 CBDC available in the sidechain + Then "alice" has 500 CBDC available in the source chain + Then "bob" has 0 CBDC available in the source chain + + @bridgeBack + @fabric + @besu + Scenario: Client successfully initiates bridge back half of the escrowed CBDC to own address in the source chain + Given "alice" with 500 CBDC available in the source chain + Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 250 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain + Then "alice" initiates bridge back of 250 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" to "alice" address in the source chain + Then "alice" has 250 CBDC available in the sidechain + Then "bob" has 0 CBDC available in the sidechain + Then "alice" has 250 CBDC available in the source chain + Then "bob" has 250 CBDC available in the source chain + + @bridgeBack + @fabric + @besu + Scenario: Client fails to initiate bridge back of double the escrowed CBDC to own address in the source chain + Given "alice" with 500 CBDC available in the source chain + Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain + Then "alice" fails to initiate bridge back of 10000 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" + + @bridgeBack + @fabric + @besu + Scenario: Impersonator fails to initiate bridge back of CBDC escrowed by another user address but transfer + Given "alice" with 500 CBDC available in the sidechain smart contract + When "alice" escrows 500 CBDC and creates an asset reference with id "d25fbcbb-0895-4905-b8d5-502d5e83b122" in the sidechain + Then "charlie" fails to initiate bridge back of 500 CBDC referenced by id "d25fbcbb-0895-4905-b8d5-502d5e83b122" + Then "alice" has 0 CBDC available in the source chain + Then "alice" has 0 CBDC available in the sidechain + Then "bob" has 0 CBDC available in the source chain + Then "bob" has 500 CBDC available in the sidechain + Then "charlie" has 0 CBDC available in the source chain + Then "charlie" has 0 CBDC available in the sidechain diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature new file mode 100644 index 0000000000..04106f15a3 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/bridge-out.feature @@ -0,0 +1,42 @@ +Feature: Client successfully bridges out CBDC + + @bridgeOut + @fabric + @besu + Scenario: Chaincode correctly tracks amount of bridged out CBDC when running bridging protocol + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + When "alice" initiates bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain + Then the bridged out amount in the chaincode is 500 CBDC + + @bridgeOut + @fabric + @besu + Scenario: Client successfully initiates bridge out of CBDC to own address in the sidechain + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + When "alice" initiates bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain + Then "alice" has 0 CBDC available in the source chain + Then "bob" has 500 CBDC available in the source chain + Then "alice" has 500 CBDC available in the sidechain + + @bridgeOut + @fabric + Scenario: Client initiates bridge out of CBDC to another user address and the operation fails + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Then "alice" tries to initiate bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "charlie" address in the sidechain and operation fails because "it is not possible to bridge CBDC to another user" + + @bridgeOut + @fabric + Scenario: Impersonator tries initiates bridge out of other user CBDC and the operation fails + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Then "charlie" tries to initiate bridge out of 500 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "charlie" address in the sidechain and operation fails because "it is not possible to transfer tokens escrowed by another user" + + @bridgeOut + @fabric + Scenario: Client tries initiates bridge out of more CBDC than the amount escrowed and the operation fails + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Then "alice" tries to initiate bridge out of 1000 CBDC referenced by id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" to "alice" address in the sidechain and operation fails because "it is not possible to transfer a different amount of CBDC than the ones escrowed" diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature new file mode 100644 index 0000000000..1d299be865 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/features/fabric-gateway.feature @@ -0,0 +1,57 @@ +@fabric +Feature: Hyperledger Fabric gateway is working properly + + Scenario: Alice successfully escrows CBDC in the source chain + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + Then "alice" has 0 CBDC available in the source chain + Then "bob" has 500 CBDC available in the source chain + + Scenario: Alice successfully creates an asset reference + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + Then the asset reference chaincode has an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" + + Scenario: Alice successfully locks an asset reference + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + When "bob" locks the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + Then the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" is locked in the source chain + + Scenario: Alice successfully locks an asset reference and Bob tries to lock the same + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + When "bob" locks the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + Then "charlie" fails to lock the asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + + Scenario: Alice successfully escrows 500 CBDC and tries to transfer to Bob + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + Then "alice" fails to transfer 500 CBDC to "charlie" + + Scenario: Alice successfully deletes an asset reference + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + When "bob" locks and deletes an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + Then the asset reference chaincode has no asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" + + Scenario: BridgeEntity successfully refunds CBDC + Given "alice" with 500 CBDC available in the source chain + Given "alice" escrows 500 CBDC and creates an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + When "bob" locks and deletes an asset reference with id "00ed12e4-044e-46ff-98ef-a4e25f519b57" in the source chain + When bob refunds 500 CBDC to "alice" in the source chain + Then "bob" has 0 CBDC available in the source chain + Then "alice" has 500 CBDC available in the source chain + + Scenario: Chaincode correctly tracks amount of bridged out CBDC (1) + Given "alice" with 500 CBDC available in the source chain + When "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + When "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + Then the bridged out amount in the chaincode is 500 CBDC + + Scenario: Chaincode correctly tracks amount of bridged out CBDC (2) + Given "alice" with 500 CBDC available in the source chain + Given "alice" escrows 500 CBDC and creates an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + When "bob" locks and deletes an asset reference with id "c5dfbd04-a71b-4848-92d1-78cd1fafaaf1" in the source chain + When bob refunds 500 CBDC to "alice" in the source chain + Then the bridged out amount in the chaincode is 0 CBDC \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts new file mode 100644 index 0000000000..42f40df8b6 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts @@ -0,0 +1,170 @@ +import { Given, When, Then, Before, After } from "cucumber"; +import axios from "axios"; +import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; +import { + getBesuBalance, + isBesuAssetReference, + lockBesuAssetReference, + resetBesu, +} from "../besu-helper"; +import AssetReferenceContractJson from "../../../../solidity/asset-reference-contract/AssetReferenceContract.json"; +import CBDCcontractJson from "../../../../solidity/cbdc-erc-20/CBDCcontract.json"; +import { + getEthAddress, + getPrvKey, + assertEqual, + assertStringContains, +} from "./common"; + +const BESU_CONTRACT_CBDC_ERC20_NAME = CBDCcontractJson.contractName; +const BESU_CONTRACT_ASSET_REF_NAME = AssetReferenceContractJson.contractName; + +Before({ timeout: 20 * 1000, tags: "@besu" }, async function () { + await resetBesu(); +}); + +After({ timeout: 20 * 1000, tags: "@besu" }, async function () { + await resetBesu(); +}); + +Given( + "{string} with {int} CBDC available in the sidechain smart contract", + { timeout: 10 * 1000 }, + async function (user: string, amount: number) { + await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_ASSET_REF_NAME, + invocationType: "SEND", + methodName: "mint", + gas: 1000000, + params: [getEthAddress(user), amount], + signingCredential: { + ethAccount: getEthAddress(user), + secret: getPrvKey("bob"), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + }, +); + +When( + "{string} escrows {int} CBDC and creates an asset reference with id {string} in the sidechain", + { timeout: 10 * 1000 }, + async function (user: string, amount: number, assetRefID: string) { + await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + invocationType: "SEND", + methodName: "escrow", + gas: 1000000, + params: [amount, assetRefID], + signingCredential: { + ethAccount: getEthAddress(user), + secret: getPrvKey(user), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + }, +); + +When( + "bob locks the asset reference with id {string} in the sidechain", + { timeout: 10 * 1000 }, + async function (assetRefID: string) { + await lockBesuAssetReference( + getEthAddress("bob"), + getPrvKey("bob"), + assetRefID, + ); + }, +); + +When( + "bob deletes the asset reference with id {string} in the sidechain", + { timeout: 10 * 1000 }, + async function (assetRefID: string) { + await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_ASSET_REF_NAME, + invocationType: "SEND", + methodName: "deleteAssetReference", + gas: 1000000, + params: [assetRefID], + signingCredential: { + ethAccount: getEthAddress("bob"), + secret: getPrvKey("bob"), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + }, +); + +Then( + "the asset reference smart contract has an asset reference with id {string}", + async function (assetRefID: string) { + assertEqual(await isBesuAssetReference(assetRefID), true); + }, +); + +Then( + "the asset reference smart contract has no asset reference with id {string}", + async function (assetRefID: string) { + assertEqual(await isBesuAssetReference(assetRefID), false); + }, +); + +Then( + "{string} has {int} CBDC available in the sidechain", + async function (user: string, amount: number) { + assertEqual(await getBesuBalance(getEthAddress(user)), amount); + }, +); + +Then( + "the asset reference with id {string} is locked in the sidechain", + async function (assetRefID: string) { + const response = await axios.post( + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_ASSET_REF_NAME, + invocationType: "CALL", + methodName: "isAssetLocked", + gas: 1000000, + params: [assetRefID], + signingCredential: { + ethAccount: getEthAddress("alice"), + secret: getPrvKey("alice"), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + + assertEqual(response.data.callOutput, true); + }, +); + +Then( + "{string} fails to lock the asset reference with id {string} in the sidechain", + async function (user: string, assetRefID: string) { + await lockBesuAssetReference( + getEthAddress(user), + getPrvKey(user), + assetRefID, + ).catch((err) => { + assertStringContains( + err.response.data.error, + `Transaction has been reverted by the EVM`, + ); + }); + }, +); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts new file mode 100644 index 0000000000..65a9ad9c87 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts @@ -0,0 +1,126 @@ +import { Then } from "cucumber"; +import axios from "axios"; +import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; +import { getFabricId, getEthAddress, assertEqual } from "./common"; + +const MAX_RETRIES = 5; +const MAX_TIMEOUT = 5000; + +Then( + "{string} initiates bridge back of {int} CBDC referenced by id {string} to {string} address in the source chain", + { timeout: 60 * 1000 }, + async function ( + user: string, + amount: number, + assetRefID: string, + finalUser: string, + ) { + const address = getEthAddress(user); + const fabricID = getFabricId(finalUser); + + const assetProfile = { + expirationDate: new Date(2060, 11, 24).toString(), + issuer: "CB1", + assetCode: "CBDC1", + // since there is no link with the asset information, + // we are just passing the asset parameters like this + // [amountBeingTransferred, fabricID, ethAddress] + keyInformationLink: [amount.toString(), fabricID, address], + }; + + const response = await axios.post( + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", + { + clientGatewayConfiguration: { + apiHost: `http://127.0.0.1:4100`, + }, + serverGatewayConfiguration: { + apiHost: `http://127.0.0.1:4000`, + }, + version: "0.0.0", + loggingProfile: "dummyLoggingProfile", + accessControlProfile: "dummyAccessControlProfile", + applicationProfile: "dummyApplicationProfile", + payloadProfile: { + assetProfile, + capabilities: "", + }, + assetProfile: assetProfile, + assetControlProfile: "dummyAssetControlProfile", + beneficiaryPubkey: "dummyPubKey", + clientDltSystem: "DLT2", + originatorPubkey: "dummyPubKey", + recipientGatewayDltSystem: "DLT1", + recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, + serverDltSystem: "DLT1", + sourceGatewayDltSystem: "DLT2", + clientIdentityPubkey: "", + serverIdentityPubkey: "", + maxRetries: MAX_RETRIES, + maxTimeout: MAX_TIMEOUT, + sourceLedgerAssetID: assetRefID, + recipientLedgerAssetID: "FABRIC_ASSET_ID", + }, + ); + + assertEqual(response.status, 200); + }, +); + +Then( + "{string} fails to initiate bridge back of {int} CBDC referenced by id {string}", + { timeout: 60 * 1000 }, + async function (user: string, amount: number, assetRefID: string) { + const address = getEthAddress(user); + const fabricID = getFabricId(user); + + const assetProfile = { + expirationDate: new Date(2060, 11, 24).toString(), + issuer: "CB1", + assetCode: "CBDC1", + // since there is no link with the asset information, + // we are just passing the asset parameters like this + // [amountBeingTransferred, fabricID, ethAddress] + keyInformationLink: [amount.toString(), fabricID, address], + }; + + await axios + .post( + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", + { + clientGatewayConfiguration: { + apiHost: `http://127.0.0.1:4100`, + }, + serverGatewayConfiguration: { + apiHost: `http://127.0.0.1:4000`, + }, + version: "0.0.0", + loggingProfile: "dummyLoggingProfile", + accessControlProfile: "dummyAccessControlProfile", + applicationProfile: "dummyApplicationProfile", + payloadProfile: { + assetProfile, + capabilities: "", + }, + assetProfile: assetProfile, + assetControlProfile: "dummyAssetControlProfile", + beneficiaryPubkey: "dummyPubKey", + clientDltSystem: "DLT2", + originatorPubkey: "dummyPubKey", + recipientGatewayDltSystem: "DLT1", + recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, + serverDltSystem: "DLT1", + sourceGatewayDltSystem: "DLT2", + clientIdentityPubkey: "", + serverIdentityPubkey: "", + maxRetries: MAX_RETRIES, + maxTimeout: MAX_TIMEOUT, + sourceLedgerAssetID: assetRefID, + recipientLedgerAssetID: "FABRIC_ASSET_ID", + }, + ) + .catch((err) => { + assertEqual(err.response.status, 500); + }); + }, +); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts new file mode 100644 index 0000000000..509813deda --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts @@ -0,0 +1,163 @@ +import { When, Then } from "cucumber"; +import axios from "axios"; +import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; +import { + getUserFromPseudonim, + getFabricId, + getEthAddress, + assertEqual, + assertStringContains, +} from "./common"; + +const MAX_RETRIES = 5; +const MAX_TIMEOUT = 5000; + +const FABRIC_CHANNEL_NAME = "mychannel"; +const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; + +Then( + "the bridged out amount in the chaincode is {int} CBDC", + async function (amount: string) { + const response = await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [], + methodName: "GetBridgedOutAmount", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim("bob"), + }, + }, + ); + + assertEqual(parseInt(response.data.functionOutput), amount); + }, +); + +When( + "{string} initiates bridge out of {int} CBDC referenced by id {string} to {string} address in the sidechain", + { timeout: 60 * 1000 }, + async function ( + user: string, + amount: number, + assetRefID: string, + finalUser: string, + ) { + const fabricID = getFabricId(user); + const address = getEthAddress(finalUser); + + const assetProfile = { + expirationDate: new Date(2060, 11, 24).toString(), + issuer: "CB1", + assetCode: "CBDC1", + // since there is no link with the asset information, + // we are just passing the asset parameters like this + // [amountBeingTransferred, fabricID, ethAddress] + keyInformationLink: [amount.toString(), fabricID, address], + }; + + const response = await axios.post( + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", + { + clientGatewayConfiguration: { + apiHost: `http://127.0.0.1:4000`, + }, + serverGatewayConfiguration: { + apiHost: `http://127.0.0.1:4100`, + }, + version: "0.0.0", + loggingProfile: "dummyLoggingProfile", + accessControlProfile: "dummyAccessControlProfile", + applicationProfile: "dummyApplicationProfile", + payloadProfile: { + assetProfile, + capabilities: "", + }, + assetProfile: assetProfile, + assetControlProfile: "dummyAssetControlProfile", + beneficiaryPubkey: "dummyPubKey", + clientDltSystem: "DLT1", + originatorPubkey: "dummyPubKey", + recipientGatewayDltSystem: "DLT2", + recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, + serverDltSystem: "DLT2", + sourceGatewayDltSystem: "DLT1", + clientIdentityPubkey: "", + serverIdentityPubkey: "", + maxRetries: MAX_RETRIES, + maxTimeout: MAX_TIMEOUT, + sourceLedgerAssetID: assetRefID, + recipientLedgerAssetID: "FABRIC_ASSET_ID", + }, + ); + + assertEqual(response.status, 200); + }, +); + +Then( + "{string} tries to initiate bridge out of {int} CBDC referenced by id {string} to {string} address in the sidechain and operation fails because {string}", + { timeout: 60 * 1000 }, + async function ( + user: string, + amount: number, + assetRefID: string, + finalUser: string, + failureReason: string, + ) { + const fabricID = getFabricId(user); + const address = getEthAddress(finalUser); + + const assetProfile = { + expirationDate: new Date(2060, 11, 24).toString(), + issuer: "CB1", + assetCode: "CBDC1", + // since there is no link with the asset information, + // we are just passing the asset parameters like this + // [amountBeingTransferred, fabricID, ethAddress] + keyInformationLink: [amount.toString(), fabricID, address], + }; + + await axios + .post( + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", + { + clientGatewayConfiguration: { + apiHost: `http://127.0.0.1:4000`, + }, + serverGatewayConfiguration: { + apiHost: `http://127.0.0.1:4100`, + }, + version: "0.0.0", + loggingProfile: "dummyLoggingProfile", + accessControlProfile: "dummyAccessControlProfile", + applicationProfile: "dummyApplicationProfile", + payloadProfile: { + assetProfile, + capabilities: "", + }, + assetProfile: assetProfile, + assetControlProfile: "dummyAssetControlProfile", + beneficiaryPubkey: "dummyPubKey", + clientDltSystem: "DLT1", + originatorPubkey: "dummyPubKey", + recipientGatewayDltSystem: "DLT2", + recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, + serverDltSystem: "DLT2", + sourceGatewayDltSystem: "DLT1", + clientIdentityPubkey: "", + serverIdentityPubkey: "", + maxRetries: MAX_RETRIES, + maxTimeout: MAX_TIMEOUT, + sourceLedgerAssetID: assetRefID, + recipientLedgerAssetID: "BESU_ASSET_ID", + }, + ) + .catch((err) => { + assertStringContains(err.response.data.error, failureReason); + }); + }, +); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts new file mode 100644 index 0000000000..4ed244ab7f --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/common.ts @@ -0,0 +1,76 @@ +import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; + +export function getUserFromPseudonim(user: string): string { + switch (user) { + case "alice": + return "userA"; + case "charlie": + return "userB"; + case "bob": + return "bridge"; + default: + throw Error("Invalid user provided"); + } +} + +export function getFabricId(user: string): string { + switch (getUserFromPseudonim(user)) { + case "userA": + return CryptoMaterial.accounts["userA"].fabricID; + case "userB": + return CryptoMaterial.accounts["userB"].fabricID; + case "bridge": + return CryptoMaterial.accounts["bridge"].fabricID; + default: + throw Error("Invalid user provided"); + } +} + +export function getEthAddress(user: string): string { + switch (getUserFromPseudonim(user)) { + case "userA": + return CryptoMaterial.accounts["userA"].ethAddress; + case "userB": + return CryptoMaterial.accounts["userB"].ethAddress; + case "bridge": + return CryptoMaterial.accounts["bridge"].ethAddress; + default: + throw Error("Invalid user provided"); + } +} + +export function getPrvKey(user: string): string { + switch (getUserFromPseudonim(user)) { + case "userA": + return CryptoMaterial.accounts["userA"].privateKey; + case "userB": + return CryptoMaterial.accounts["userB"].privateKey; + case "bridge": + return CryptoMaterial.accounts["bridge"].privateKey; + default: + throw Error("Invalid user provided"); + } +} + +export function assertEqual(value_1: unknown, value_2: unknown) { + if (value_1 !== value_2) { + throw Error(`Expected ${value_1} to be equal to ${value_2}`); + } +} + +export function assertStringContains( + mainString: string, + subString: string, +): void { + if (!mainString.includes(subString)) { + throw new Error(`String "${mainString}" does not contain "${subString}"`); + } +} + +export function assertNonNullish( + value: TValue, +): asserts value is NonNullable { + if (value === null || value === undefined) { + throw Error(`${value} was expected to be non-null`); + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts new file mode 100644 index 0000000000..e95a08a7ce --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts @@ -0,0 +1,191 @@ +import { Given, When, Then, Before, After } from "cucumber"; +import axios from "axios"; +import CryptoMaterial from "../../../../crypto-material/crypto-material.json"; +import { + getEthAddress, + getFabricId, + getUserFromPseudonim, + assertEqual, + assertNonNullish, + assertStringContains, +} from "./common"; +import { + deleteFabricAssetReference, + fabricAssetReferenceExists, + getFabricBalance, + lockFabricAssetReference, + readFabricAssetReference, + resetFabric, + refundFabricTokens, +} from "../fabric-helper"; + +const FABRIC_CHANNEL_NAME = "mychannel"; +const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; +const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; + +Before({ timeout: 20 * 1000, tags: "@fabric" }, async function () { + await resetFabric(); +}); + +After({ timeout: 20 * 1000, tags: "@fabric" }, async function () { + await resetFabric(); +}); + +Given( + "{string} with {int} CBDC available in the source chain", + { timeout: 10 * 1000 }, + async function (user: string, amount: number) { + await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [amount.toString()], + methodName: "Mint", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim("alice"), + }, + }, + ); + + assertEqual(await getFabricBalance(getFabricId(user)), amount); + }, +); + +When( + "{string} escrows {int} CBDC and creates an asset reference with id {string} in the source chain", + { timeout: 10 * 1000 }, + async function (user: string, amount: number, assetRefID: string) { + await axios.post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [amount.toString(), assetRefID], + methodName: "Escrow", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(user), + }, + }, + ); + }, +); + +When( + "{string} locks the asset reference with id {string} in the source chain", + { timeout: 10 * 1000 }, + async function (user: string, assetRefID: string) { + await lockFabricAssetReference(user, assetRefID); + }, +); + +When( + "{string} locks and deletes an asset reference with id {string} in the source chain", + { timeout: 10 * 1000 }, + async function (user: string, assetRefID: string) { + await lockFabricAssetReference(user, assetRefID); + await deleteFabricAssetReference(user, assetRefID); + }, +); + +When( + "bob refunds {int} CBDC to {string} in the source chain", + { timeout: 10 * 1000 }, + async function (amount: number, userTo: string) { + const finalUserFabricID = getFabricId(userTo); + const finalUserEthAddress = getEthAddress(userTo); + + await refundFabricTokens(finalUserFabricID, amount, finalUserEthAddress); + }, +); + +Then( + "{string} fails to lock the asset reference with id {string} in the source chain", + { timeout: 10 * 1000 }, + async function (user: string, assetRefID: string) { + return axios + .post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [assetRefID], + methodName: "LockAssetReference", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(user), + }, + }, + ) + .catch((err) => { + assertStringContains( + err.response.data.error, + `client is not authorized to perform the operation`, + ); + }); + }, +); + +Then( + "{string} fails to transfer {int} CBDC to {string}", + { timeout: 10 * 1000 }, + async function (userFrom: string, amount: number, userTo: string) { + const recipient = getFabricId(userTo); + + axios + .post( + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [recipient, amount.toString()], + methodName: "Transfer", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(userFrom), + }, + }, + ) + .catch((err) => { + assertStringContains(err.response.data.error, `has insufficient funds`); + }); + }, +); + +Then( + "{string} has {int} CBDC available in the source chain", + { timeout: 10 * 1000 }, + async function (user: string, amount: number) { + assertEqual(await getFabricBalance(getFabricId(user)), amount); + }, +); + +Then( + "the asset reference chaincode has an asset reference with id {string}", + { timeout: 10 * 1000 }, + async function (assetRefID: string) { + assertNonNullish(await readFabricAssetReference(assetRefID)); + }, +); + +Then( + "the asset reference with id {string} is locked in the source chain", + { timeout: 10 * 1000 }, + async function (assetRefID: string) { + assertEqual((await readFabricAssetReference(assetRefID)).isLocked, true); + }, +); + +Then( + "the asset reference chaincode has no asset reference with id {string}", + { timeout: 10 * 1000 }, + async function (assetRefID: string) { + assertEqual(await fabricAssetReferenceExists(assetRefID), "false"); + }, +); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts new file mode 100644 index 0000000000..34aba3a0ae --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/api-surface.test.ts @@ -0,0 +1,6 @@ +import * as apiSurface from "../../../main/typescript/public-api"; +import "jest-extended"; + +test("Library can be loaded", async () => { + expect(apiSurface).toBeTruthy(); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts new file mode 100644 index 0000000000..7a6daa1f37 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts @@ -0,0 +1,59 @@ +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; +import { pruneDockerAllIfGithubAction, Containers } from "@hyperledger/cactus-test-tooling"; +import { CbdcBridgingApp } from "../../../main/typescript"; +import { ICbdcBridgingApp } from "../../../main/typescript/cbdc-bridging-app"; + +const logLevel: LogLevelDesc = "DEBUG"; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + } +); + +afterAll(async () => { + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +describe("Setup CBDC app infrastructure", () => { + let app: CbdcBridgingApp; + it("Should setup everything successfully", async () => { + const options: ICbdcBridgingApp = { + apiServer1Port: 4000, + apiServer2Port: 4100, + apiHost: "localhost", + apiGateway1ServerPort: 3010, + apiGateway1ClientPort: 4011, + apiGateway1BloPort: 4010, + apiGateway2ServerPort: 3110, + apiGateway2ClientPort: 3111, + apiGateway2BloPort: 4110, + logLevel, + }; + app = new CbdcBridgingApp(options); + expect(app).toBeDefined(); + + await app.start(); + }); + + it("Should shutdown everything successfully", async () => { + await app.stop(); + }); +}) \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts new file mode 100644 index 0000000000..34aba3a0ae --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/unit/api-surface.test.ts @@ -0,0 +1,6 @@ +import * as apiSurface from "../../../main/typescript/public-api"; +import "jest-extended"; + +test("Library can be loaded", async () => { + expect(apiSurface).toBeTruthy(); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/supervisord.conf b/examples/cactus-example-cbdc-bridging-backend/supervisord.conf new file mode 100644 index 0000000000..8a836ce1b4 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/supervisord.conf @@ -0,0 +1,25 @@ +[supervisord] +logfile = /usr/src/app/cactus/log/supervisord.log +logfile_maxbytes = 50MB +logfile_backups=10 +loglevel = info + +[program:dockerd] +command=/usr/local/bin/dockerd +autostart=true +autorestart=true +stderr_logfile=/usr/src/app/cactus/log/dockerd.err.log +stdout_logfile=/usr/src/app/cactus/log/dockerd.out.log + +[program:cbdc-bridge-app-backend] +command=/run-cbdc-app.sh +autostart=true +autorestart=unexpected +exitcodes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 + +[inet_http_server] +port = 0.0.0.0:9001 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json new file mode 100644 index 0000000000..3d723037bc --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json @@ -0,0 +1,54 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./dist/lib/", + "declarationDir": "dist/lib", + "rootDir": "./src", + "moduleResolution": "Node16", + "module": "Node16", + "tsBuildInfoFile": "../../.build-cache/cactus-example-cbdc-bridging-backend.tsbuildinfo", + }, + "references": [ + { + "path": "../../extensions/cactus-plugin-object-store-ipfs" + }, + { + "path": "../../packages/cactus-api-client/tsconfig.json" + }, + { + "path": "../../packages/cactus-cmd-api-server/tsconfig.json" + }, + { + "path": "../../packages/cactus-common/tsconfig.json" + }, + { + "path": "../../packages/cactus-core/tsconfig.json" + }, + { + "path": "../../packages/cactus-core-api/tsconfig.json" + }, + { + "path": "../../packages/cactus-plugin-keychain-memory/tsconfig.json" + }, + { + "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" + }, + { + "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" + }, + { + "path": "../../packages/cactus-plugin-satp-hermes/tsconfig.json" + }, + { + "path": "../../packages/cactus-test-tooling/tsconfig.json" + } + ], + "include": [ + "./src", + "src/**/*.json" + ], + "exclude": [ + "./src/fabric-contracts" + ] +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx index bfd71aab57..7e73dd240f 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx @@ -1,7 +1,7 @@ -import React from 'react'; -import HomePage from './pages/HomePage'; -import { CssBaseline } from '@mui/material'; -import './App.css'; +import React from "react"; +import HomePage from "./pages/HomePage"; +import { CssBaseline } from "@mui/material"; +import "./App.css"; function App() { return ( 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 3aecf5ed30..1c379aa2d1 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 @@ -33,7 +33,7 @@ export async function transferTokensBesu( export async function escrowTokensBesu( frontendUserFrom: string, amount: number, - assetRefID: string + assetRefID: string, ) { const from = getEthAddress(frontendUserFrom); @@ -84,7 +84,11 @@ export async function getAssetReferencesBesu(frontendUser: string) { }); } -export async function bridgeBackTokensBesu(frontendUser: string, amount: number, assetRefID: string) { +export async function bridgeBackTokensBesu( + frontendUser: string, + amount: number, + assetRefID: string, +) { const address = getEthAddress(frontendUser); const fabricID = getFabricId(frontendUser); 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 9bb5fd2748..4d49a93a5d 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 @@ -73,7 +73,11 @@ export async function transferTokensFabric( } } -export async function escrowTokensFabric(frontendUser: string, amount: string, assetRefID: string) { +export async function escrowTokensFabric( + frontendUser: string, + amount: string, + assetRefID: string, +) { const response = await axios.post( "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { @@ -94,7 +98,11 @@ export async function escrowTokensFabric(frontendUser: string, amount: string, a } } -export async function bridgeOutTokensFabric(frontendUser: string, amount: string, assetRefID: string) { +export async function bridgeOutTokensFabric( + frontendUser: string, + amount: string, + assetRefID: string, +) { const fabricID = getFabricId(frontendUser); const address = getEthAddress(frontendUser); diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx index 015b2d7de6..0b16f4c275 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx @@ -1,5 +1,6 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import { useState, useEffect } from "react"; -import { styled } from '@mui/material/styles'; +import { styled } from "@mui/material/styles"; import Button, { ButtonProps } from "@mui/material/Button"; import Grid from "@mui/material/Grid"; import CircularProgress from "@mui/material/CircularProgress"; @@ -20,7 +21,7 @@ const NormalButton = styled(Button)(({ theme }) => ({ background: "#2B9BF6", color: "#FFFFFF", border: "0.5px solid #000000", - '&:disabled': { + "&:disabled": { border: "0", }, })); @@ -37,15 +38,15 @@ const CriticalButton = styled(Button)(({ theme }) => ({ backgroundColor: "#444444", color: "#FFFFFF", }, - '&:disabled': { + "&:disabled": { border: "0", }, })); export interface IActionsContainerOptions { - user: string; - ledger: string; - assetRefs: Array + user: string; + ledger: string; + assetRefs: Array; } export default function ActionsContainer(props: IActionsContainerOptions) { @@ -78,25 +79,35 @@ export default function ActionsContainer(props: IActionsContainerOptions) {
{loading ? (
- +
) : ( - + {props.user} - + {amount} CBDC @@ -117,7 +128,6 @@ export default function ActionsContainer(props: IActionsContainerOptions) { fullWidth disabled={amount === 0} onClick={() => setTransferDialog(true)} - > Transfer @@ -128,7 +138,6 @@ export default function ActionsContainer(props: IActionsContainerOptions) { variant="contained" disabled={amount === 0} onClick={() => setTransferDialog(true)} - > Transfer @@ -139,7 +148,6 @@ export default function ActionsContainer(props: IActionsContainerOptions) { variant="contained" disabled={amount === 0} onClick={() => setTransferDialog(true)} - > Transfer @@ -151,7 +159,6 @@ export default function ActionsContainer(props: IActionsContainerOptions) { variant="contained" disabled={amount === 0} onClick={() => setEscrowDialog(true)} - > Escrow @@ -182,7 +189,6 @@ export default function ActionsContainer(props: IActionsContainerOptions) { ).length === 0 } onClick={() => setBridgeBackDialog(true)} - > Bridge Back @@ -219,4 +225,4 @@ export default function ActionsContainer(props: IActionsContainerOptions) { />
); -} \ No newline at end of file +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx index 23e1efa17c..7fcc2af5fd 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx @@ -52,7 +52,9 @@ export interface IAssetReferencesTableOptions { assetRefs: AssetReference[]; } -export default function AssetReferencesTable(props: IAssetReferencesTableOptions) { +export default function AssetReferencesTable( + props: IAssetReferencesTableOptions, +) { return (
{props.assetRefs && ( diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx index 5a1d93e8fe..5d6e0e64bb 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx @@ -16,10 +16,10 @@ export default function Ledger(props: ILedgerOptions) { useEffect(() => { async function fetchData() { if (props.ledger === "Fabric") { - let list = await getAssetReferencesFabric("Alice"); + const list = await getAssetReferencesFabric("Alice"); setAssetReferences(list); } else { - let list = await getAssetReferencesBesu("Alice"); + const list = await getAssetReferencesBesu("Alice"); setAssetReferences(list); } } @@ -28,19 +28,45 @@ export default function Ledger(props: ILedgerOptions) { }, [props.ledger]); return ( - +

Hyperledger {props.ledger}

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

Org1

:

--

} + {props.ledger === "Fabric" ? ( +

+ Org1 +

+ ) : ( +

+ -- +

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

Org2

:

--

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

+ Org2 +

+ ) : ( +

+ -- +

+ )} + ); -} \ No newline at end of file +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx index ca20585d62..dfad91d593 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx @@ -15,9 +15,9 @@ import { import { AssetReference } from "../../models/AssetReference"; export interface IBridgeBackDialogOptions { - user: string - open: boolean - onClose: () => any + user: string; + open: boolean; + onClose: () => any; } export default function BridgeBackDialog(props: IBridgeBackDialogOptions) { @@ -29,7 +29,9 @@ export default function BridgeBackDialog(props: IBridgeBackDialogOptions) { useEffect(() => { async function fetchData() { const list = await getAssetReferencesBesu(props.user); - setAssetRefs(list.filter((asset: AssetReference) => asset.recipient === props.user)); + setAssetRefs( + list.filter((asset: AssetReference) => asset.recipient === props.user), + ); } if (props.open) { @@ -48,14 +50,16 @@ export default function BridgeBackDialog(props: IBridgeBackDialogOptions) { setErrorMessage("Please choose a valid Asset Reference ID"); } else { setSending(true); - const assetRef = assetRefs.find( - (asset) => asset.id === assetRefID, - ); + const assetRef = assetRefs.find((asset) => asset.id === assetRefID); if (assetRef === undefined) { setErrorMessage("Something went wrong. Asset Reference not found"); return; } - await bridgeBackTokensBesu(props.user, parseInt(assetRef.numberTokens), assetRefID); + await bridgeBackTokensBesu( + props.user, + parseInt(assetRef.numberTokens), + assetRefID, + ); props.onClose(); } }; diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx index f359d71661..ad5a6da0fc 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx @@ -29,7 +29,9 @@ export default function BridgeOutDialog(props: IBridgeOutDialogOptions) { useEffect(() => { async function fetchData() { const list = await getAssetReferencesFabric(props.user); - setAssetRefs(list.filter((asset: AssetReference) => asset.recipient === props.user)); + setAssetRefs( + list.filter((asset: AssetReference) => asset.recipient === props.user), + ); } if (props.open) { @@ -48,14 +50,16 @@ export default function BridgeOutDialog(props: IBridgeOutDialogOptions) { setErrorMessage("Please choose a valid Asset Reference ID"); } else { setSending(true); - const assetRef = assetRefs.find( - (asset) => asset.id === assetRefID, - ); + const assetRef = assetRefs.find((asset) => asset.id === assetRefID); if (assetRef === undefined) { setErrorMessage("Something went wrong. Asset Reference not found"); return; } - await bridgeOutTokensFabric(props.user, assetRef.numberTokens, assetRefID); + await bridgeOutTokensFabric( + props.user, + assetRef.numberTokens, + assetRefID, + ); props.onClose(); } }; diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx index e619d2032f..f390cd256d 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ConnectionErrorDialog.tsx @@ -4,11 +4,13 @@ import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; export interface IConnectionErrorDialogOptions { - open: boolean - onClose: () => any + open: boolean; + onClose: () => any; } -export default function ConnectionErrorDialog(props: IConnectionErrorDialogOptions) { +export default function ConnectionErrorDialog( + props: IConnectionErrorDialogOptions, +) { const handleClose = (event: any, reason: any) => { if (reason && reason === "backdropClick") { return; diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx index 056426d0b5..6e24e46bfd 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx @@ -12,10 +12,10 @@ import { escrowTokensFabric } from "../../api-calls/fabric-api"; import { escrowTokensBesu } from "../../api-calls/besu-api"; export interface IEscrowDialogOptions { - open: boolean - user: string - ledger: string - onClose: () => any + open: boolean; + user: string; + ledger: string; + onClose: () => any; } export default function EscrowDialog(props: IEscrowDialogOptions) { @@ -32,7 +32,9 @@ export default function EscrowDialog(props: IEscrowDialogOptions) { } }, [props.open]); - const handleChangeAmount = (event: ChangeEvent) => { + const handleChangeAmount = ( + event: ChangeEvent, + ) => { const value = parseInt(event.target.value); if (value < 0) { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx index 15f7badd05..ebf28ff573 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx @@ -10,13 +10,13 @@ import Alert from "@mui/material/Alert"; import { mintTokensFabric } from "../../api-calls/fabric-api"; export interface IMintDialogOptions { - open: boolean - user: string - onClose: () => any + open: boolean; + user: string; + onClose: () => any; } export default function MintDialog(props: IMintDialogOptions) { - const [amount, setAmount] = useState(0); + const [amount, setAmount] = useState(0); const [errorMessage, setErrorMessage] = useState(""); const [sending, setSending] = useState(false); @@ -27,7 +27,9 @@ export default function MintDialog(props: IMintDialogOptions) { } }, [props.open]); - const handleChangeAmount = (event: ChangeEvent) => { + const handleChangeAmount = ( + event: ChangeEvent, + ) => { const value = parseInt(event.target.value); if (value < 0) { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx index 06edcea061..c87fcbe7ff 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx @@ -14,10 +14,10 @@ import { transferTokensBesu } from "../../api-calls/besu-api"; const recipients = ["Alice", "Charlie", "Bridge"]; export interface ITransferDialogOptions { - open: boolean - ledger: string - user: string - onClose: () => any + open: boolean; + ledger: string; + user: string; + onClose: () => any; } export default function TransferDialog(props: ITransferDialogOptions) { @@ -34,7 +34,9 @@ export default function TransferDialog(props: ITransferDialogOptions) { } }, [props.open]); - const handleChangeAmount = (event: ChangeEvent) => { + const handleChangeAmount = ( + event: ChangeEvent, + ) => { const value = parseInt(event.target.value); if (value < 0) { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx index b768844254..e36f828320 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx @@ -1,14 +1,13 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; +import React from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import App from "./App"; const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement + document.getElementById("root") as HTMLElement, ); root.render( - + , ); - diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx index a83c60a2a5..fba5413a43 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/models/AssetReference.tsx @@ -1,13 +1,17 @@ export interface AssetReference { - id: string - recipient: string - numberTokens: string + id: string; + recipient: string; + numberTokens: string; } -export function createAssetReference(id: string, recipient: string, numberTokens: string): AssetReference { - return { - id: id, - recipient: recipient, - numberTokens: numberTokens - } -} \ No newline at end of file +export function createAssetReference( + id: string, + recipient: string, + numberTokens: string, +): AssetReference { + return { + id: id, + recipient: recipient, + numberTokens: numberTokens, + }; +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx index f7b88cdcfa..88af29bd31 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import { useState, useEffect } from "react"; import Grid from "@mui/material/Grid"; import Ledger from "../components/Ledger"; @@ -10,7 +11,7 @@ import ConnectionErrorDialog from "../components/dialogs/ConnectionErrorDialog"; export default function HomePage() { const [errorDialog, setErrorDialog] = useState(false); - useEffect(() => { + /*useEffect(() => { const checkConnection = async () => { await checkApiServer1Connection() .then(() => setErrorDialog(false)) @@ -19,18 +20,21 @@ export default function HomePage() { await checkApiServer2Connection() .then(() => setErrorDialog(false)) .catch(() => setErrorDialog(true)); - } + }; checkConnection(); - }, []); + }, []);*/ return (
- + @@ -75,4 +79,4 @@ function BridgeImage() { ); -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index e08e6e3a9a..031903a4cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1900,6 +1900,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.4.0": + version: 7.25.6 + resolution: "@babel/generator@npm:7.25.6" + dependencies: + "@babel/types": "npm:^7.25.6" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/541e4fbb6ea7806f44232d70f25bf09dee9a57fe43d559e375536870ca5261ebb4647fec3af40dcbb3325ea2a49aff040e12a4e6f88609eaa88f10c4e27e31f8 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:7.22.5, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" @@ -3171,6 +3183,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.0, @babel/parser@npm:^7.4.3": + version: 7.25.6 + resolution: "@babel/parser@npm:7.25.6" + dependencies: + "@babel/types": "npm:^7.25.6" + bin: + parser: ./bin/babel-parser.js + checksum: 10/830aab72116aa14eb8d61bfa8f9d69fc8f3a43d909ce993cb4350ae14d3af1a2f740a54410a22d821c48a253263643dfecbc094f9608e6a70ce9ff3c0bbfe91a + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5": version: 7.22.15 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.15" @@ -5598,6 +5621,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.4.0": + version: 7.25.0 + resolution: "@babel/template@npm:7.25.0" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/parser": "npm:^7.25.0" + "@babel/types": "npm:^7.25.0" + checksum: 10/07ebecf6db8b28244b7397628e09c99e7a317b959b926d90455c7253c88df3677a5a32d1501d9749fe292a263ff51a4b6b5385bcabd5dadd3a48036f4d4949e0 + languageName: node + linkType: hard + "@babel/traverse@npm:>=7.23.2": version: 7.23.2 resolution: "@babel/traverse@npm:7.23.2" @@ -5757,6 +5791,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.0, @babel/types@npm:^7.25.6, @babel/types@npm:^7.4.0": + version: 7.25.6 + resolution: "@babel/types@npm:7.25.6" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/7b54665e1b51f525fe0f451efdd9fe7a4a6dfba3fd4956c3530bc77336b66ffe3d78c093796ed044119b5d213176af7cf326f317a2057c538d575c6cefcb3562 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -5948,6 +5993,13 @@ __metadata: languageName: node linkType: hard +"@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + "@commitlint/cli@npm:17.7.1": version: 17.7.1 resolution: "@commitlint/cli@npm:17.7.1" @@ -7856,6 +7908,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.6.4": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" + dependencies: + crc-32: "npm:^1.2.0" + ethereumjs-util: "npm:^7.1.5" + checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 + languageName: node + linkType: hard + "@ethereumjs/common@npm:4.0.0, @ethereumjs/common@npm:^4.0.0": version: 4.0.0 resolution: "@ethereumjs/common@npm:4.0.0" @@ -7876,16 +7938,6 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^2.6.4": - version: 2.6.5 - resolution: "@ethereumjs/common@npm:2.6.5" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 - languageName: node - linkType: hard - "@ethereumjs/rlp@npm:^4.0.1": version: 4.0.1 resolution: "@ethereumjs/rlp@npm:4.0.1" @@ -7914,6 +7966,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/tx@npm:3.5.2, @ethereumjs/tx@npm:^3.3.2": + version: 3.5.2 + resolution: "@ethereumjs/tx@npm:3.5.2" + dependencies: + "@ethereumjs/common": "npm:^2.6.4" + ethereumjs-util: "npm:^7.1.5" + checksum: 10/891e12738206229ac428685536844f7765e8547ae794462b1e406399445bf1f6f918af6ebc33ee5fa4a1340f14f48871a579f11c0e1d7c142ba0dd525bae5df5 + languageName: node + linkType: hard + "@ethereumjs/tx@npm:5.0.0": version: 5.0.0 resolution: "@ethereumjs/tx@npm:5.0.0" @@ -7931,16 +7993,6 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^3.3.2": - version: 3.5.2 - resolution: "@ethereumjs/tx@npm:3.5.2" - dependencies: - "@ethereumjs/common": "npm:^2.6.4" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/891e12738206229ac428685536844f7765e8547ae794462b1e406399445bf1f6f918af6ebc33ee5fa4a1340f14f48871a579f11c0e1d7c142ba0dd525bae5df5 - languageName: node - linkType: hard - "@ethereumjs/util@npm:^8.1.0": version: 8.1.0 resolution: "@ethereumjs/util@npm:8.1.0" @@ -12288,7 +12340,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24": +"@jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -16986,6 +17038,20 @@ __metadata: languageName: node linkType: hard +"@types/crypto-js@npm:4.1.1": + version: 4.1.1 + resolution: "@types/crypto-js@npm:4.1.1" + checksum: 10/822e798b97ef6f8f4d3114151547c90569b253356e3fb2f6d9bf44c072148a1e9a90685b439cced0374d72fc9c187bf25a77d64d42493c472850e9ea21eb2cbd + languageName: node + linkType: hard + +"@types/cucumber@npm:4.0.4": + version: 4.0.4 + resolution: "@types/cucumber@npm:4.0.4" + checksum: 10/c296941f0e80344c2a752fe21da73865788225e2914c189d875d9bd00dc408e7509e50d3584de9bf954837243fd26fa5f17e90d147dc79614b2b7d8af4a5dbf8 + languageName: node + linkType: hard + "@types/debug@npm:4.1.12": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -17134,6 +17200,16 @@ __metadata: languageName: node linkType: hard +"@types/express-jwt@npm:6.0.2": + version: 6.0.2 + resolution: "@types/express-jwt@npm:6.0.2" + dependencies: + "@types/express": "npm:*" + "@types/express-unless": "npm:*" + checksum: 10/0fffb222216173342ba9fa53878153012563827645ccc59e3ed46b9facd1249ba3967fd38a28417a40fb669d5b5182c75b7992813e516adc6be9b95a0559e807 + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": version: 4.17.28 resolution: "@types/express-serve-static-core@npm:4.17.28" @@ -17179,6 +17255,15 @@ __metadata: languageName: node linkType: hard +"@types/express-unless@npm:*": + version: 0.5.3 + resolution: "@types/express-unless@npm:0.5.3" + dependencies: + "@types/express": "npm:*" + checksum: 10/5c76425ff7490123f3c072c942ae6d18bb3cbf91d5d9857c52fca1f9a3d11b72413dbfb3e4af28fdd7f745d1a443f90daadbcf7daff714d608eef10bd7c8763c + languageName: node + linkType: hard + "@types/express@npm:*": version: 4.17.13 resolution: "@types/express@npm:4.17.13" @@ -17203,6 +17288,18 @@ __metadata: languageName: node linkType: hard +"@types/express@npm:4.17.21, @types/express@npm:^4.17.18": + version: 4.17.21 + resolution: "@types/express@npm:4.17.21" + dependencies: + "@types/body-parser": "npm:*" + "@types/express-serve-static-core": "npm:^4.17.33" + "@types/qs": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/7a6d26cf6f43d3151caf4fec66ea11c9d23166e4f3102edfe45a94170654a54ea08cf3103d26b3928d7ebcc24162c90488e33986b7e3a5f8941225edd5eb18c7 + languageName: node + linkType: hard + "@types/express@npm:5.0.0": version: 5.0.0 resolution: "@types/express@npm:5.0.0" @@ -17239,18 +17336,6 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:^4.17.18": - version: 4.17.21 - resolution: "@types/express@npm:4.17.21" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/7a6d26cf6f43d3151caf4fec66ea11c9d23166e4f3102edfe45a94170654a54ea08cf3103d26b3928d7ebcc24162c90488e33986b7e3a5f8941225edd5eb18c7 - languageName: node - linkType: hard - "@types/fs-extra@npm:11.0.4": version: 11.0.4 resolution: "@types/fs-extra@npm:11.0.4" @@ -17261,6 +17346,15 @@ __metadata: languageName: node linkType: hard +"@types/fs-extra@npm:9.0.13": + version: 9.0.13 + resolution: "@types/fs-extra@npm:9.0.13" + dependencies: + "@types/node": "npm:*" + checksum: 10/ac545e377248039c596ef27d9f277b813507ebdd95d05f32fe7e9c67eb1ed567dafb4ba59f5fdcb6601dd7fd396ff9ba24f8c122e89cef096cdc17987c50a7fa + languageName: node + linkType: hard + "@types/glob@npm:*, @types/glob@npm:^7.1.1": version: 7.2.0 resolution: "@types/glob@npm:7.2.0" @@ -18408,6 +18502,13 @@ __metadata: languageName: node linkType: hard +"@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + "@types/trusted-types@npm:^2.0.2": version: 2.0.3 resolution: "@types/trusted-types@npm:2.0.3" @@ -18438,6 +18539,13 @@ __metadata: languageName: node linkType: hard +"@types/uuid@npm:9.0.8": + version: 9.0.8 + resolution: "@types/uuid@npm:9.0.8" + checksum: 10/b8c60b7ba8250356b5088302583d1704a4e1a13558d143c549c408bf8920535602ffc12394ede77f8a8083511b023704bc66d1345792714002bfa261b17c5275 + languageName: node + linkType: hard + "@types/validator@npm:^13.11.8": version: 13.12.2 resolution: "@types/validator@npm:13.12.2" @@ -19407,7 +19515,7 @@ __metadata: languageName: node linkType: hard -"abortcontroller-polyfill@npm:^1.7.3": +"abortcontroller-polyfill@npm:^1.7.3, abortcontroller-polyfill@npm:^1.7.5": version: 1.7.5 resolution: "abortcontroller-polyfill@npm:1.7.5" checksum: 10/aac398f7fc076235fe731adaffd2c319fe6c1527af8ca561890242d5396351350e0705726478778dc90326a69a4c044890c156fe867cba7f3ffeb670f8665a51 @@ -19443,6 +19551,15 @@ __metadata: languageName: node linkType: hard +"abstract-leveldown@npm:^5.0.0, abstract-leveldown@npm:~5.0.0": + version: 5.0.0 + resolution: "abstract-leveldown@npm:5.0.0" + dependencies: + xtend: "npm:~4.0.0" + checksum: 10/bce08839fc5a9be06308c3c9669c5b5b31932b8994fb44599c9190a02592fd4eee7441bfc1de780ce7c2cadfa23e865e57a80f34f0005c8b4218a905518ad21f + languageName: node + linkType: hard + "abstract-leveldown@npm:^6.2.1": version: 6.3.0 resolution: "abstract-leveldown@npm:6.3.0" @@ -19465,6 +19582,15 @@ __metadata: languageName: node linkType: hard +"abstract-leveldown@npm:~2.6.0": + version: 2.6.3 + resolution: "abstract-leveldown@npm:2.6.3" + dependencies: + xtend: "npm:~4.0.0" + checksum: 10/3f9db6c3c77991018adcad133acb2e084446d7583753c46343ec3ba6ff60ab89cd1aa3813b2131ccc92191863802cacbca3240490fadde20118845267643c543 + languageName: node + linkType: hard + "abstract-leveldown@npm:~2.7.1": version: 2.7.2 resolution: "abstract-leveldown@npm:2.7.2" @@ -19767,6 +19893,15 @@ __metadata: languageName: node linkType: hard +"ajv-keywords@npm:^1.0.0": + version: 1.5.1 + resolution: "ajv-keywords@npm:1.5.1" + peerDependencies: + ajv: ">=4.10.0" + checksum: 10/e7eaae4f41d0c4178b611aa63f4dc2e94cb069a8c9017fe68f34cea5a5eefe5430e93906b7abe8b093f4a6297487ebbbd09ad065b323a7d59ea352d401266557 + languageName: node + linkType: hard + "ajv-keywords@npm:^2.1.0": version: 2.1.1 resolution: "ajv-keywords@npm:2.1.1" @@ -19820,6 +19955,16 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^4.7.0": + version: 4.11.8 + resolution: "ajv@npm:4.11.8" + dependencies: + co: "npm:^4.6.0" + json-stable-stringify: "npm:^1.0.1" + checksum: 10/dc008cdd33190af18a0f807f9823a16b0d756a5f26bbcaa50d6ed72f86d419654d9e9c35853e5ba81ef535485d8931c37fc71da53b3bb7a15e278ee141c616b7 + languageName: node + linkType: hard + "ajv@npm:^5.2.3, ajv@npm:^5.3.0": version: 5.5.2 resolution: "ajv@npm:5.5.2" @@ -19891,6 +20036,13 @@ __metadata: languageName: node linkType: hard +"ansi-escapes@npm:^1.1.0": + version: 1.4.0 + resolution: "ansi-escapes@npm:1.4.0" + checksum: 10/287f18ea70cde710dbb83b6b6c4e1d62fcb962b951a601d976df69478a4ebdff6305691e3befb9053d740060544929732b8bade7a9781611dcd2b997e6bda3d6 + languageName: node + linkType: hard + "ansi-escapes@npm:^3.0.0": version: 3.2.0 resolution: "ansi-escapes@npm:3.2.0" @@ -19907,6 +20059,15 @@ __metadata: languageName: node linkType: hard +"ansi-gray@npm:^0.1.1": + version: 0.1.1 + resolution: "ansi-gray@npm:0.1.1" + dependencies: + ansi-wrap: "npm:0.1.0" + checksum: 10/b1f0cfefe43fb2f2f2f324daa578f528b7079514261e9ed060de05e21d99797e5fabf69d500c466c263f9c6302751a2c0709ab52324912cdee71be249deffbf7 + languageName: node + linkType: hard + "ansi-html-community@npm:^0.0.8": version: 0.0.8 resolution: "ansi-html-community@npm:0.0.8" @@ -19990,6 +20151,13 @@ __metadata: languageName: node linkType: hard +"ansi-wrap@npm:0.1.0": + version: 0.1.0 + resolution: "ansi-wrap@npm:0.1.0" + checksum: 10/f24f652a5e450c0561cbc7d298ffa62dcd33c72f9da34fd3c24538dbf82de8fc21b7f924dc30cd9d01360bd2893d1954f0a60eee0550ca629bb148dcbeef5c5b + languageName: node + linkType: hard + "ansicolors@npm:~0.3.2": version: 0.3.2 resolution: "ansicolors@npm:0.3.2" @@ -20199,6 +20367,15 @@ __metadata: languageName: node linkType: hard +"append-transform@npm:^1.0.0": + version: 1.0.0 + resolution: "append-transform@npm:1.0.0" + dependencies: + default-require-extensions: "npm:^2.0.0" + checksum: 10/65fc4fe074aa1cf291763a5835b1e209b5e407597d6662c30b0921928be8a074f75e69e751ddf388ad16411dd61cb70351a10914090b354a7a447c7bc164b0ac + languageName: node + linkType: hard + "append-transform@npm:^2.0.0": version: 2.0.0 resolution: "append-transform@npm:2.0.0" @@ -20485,6 +20662,19 @@ __metadata: languageName: node linkType: hard +"array.prototype.find@npm:^2.0.1": + version: 2.2.3 + resolution: "array.prototype.find@npm:2.2.3" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/8ee81d37de9c8574a94f4773dffa40b4d200deca11b00f7176dcb328a9ddcf75fef117c97ccce1ab8345b7184c107553156908e7dcaf0d42f1a395a04bbe803e + languageName: node + linkType: hard + "array.prototype.findlastindex@npm:^1.2.2": version: 1.2.2 resolution: "array.prototype.findlastindex@npm:1.2.2" @@ -20615,7 +20805,7 @@ __metadata: languageName: node linkType: hard -"arrify@npm:^1.0.1": +"arrify@npm:^1.0.0, arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" checksum: 10/745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 @@ -20712,6 +20902,17 @@ __metadata: languageName: node linkType: hard +"assertion-error-formatter@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error-formatter@npm:2.0.1" + dependencies: + diff: "npm:^3.0.0" + pad-right: "npm:^0.2.2" + repeat-string: "npm:^1.6.1" + checksum: 10/6c054ba5adec3e84d145aeecfc1ade92559ae1ab1a53539fc4dbdd309e0f1ed2b813a01cf7e3300a72ce77d1db52f4379869bc3ec5250918ab36443a6cd375ef + languageName: node + linkType: hard + "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -20747,7 +20948,7 @@ __metadata: languageName: node linkType: hard -"async-eventemitter@npm:0.2.4": +"async-eventemitter@npm:0.2.4, async-eventemitter@npm:^0.2.2": version: 0.2.4 resolution: "async-eventemitter@npm:0.2.4" dependencies: @@ -20788,7 +20989,14 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.4.0": +"async@npm:^1.4.2": + version: 1.5.2 + resolution: "async@npm:1.5.2" + checksum: 10/8afcdcee05168250926a3e7bd4dfaa74b681a74f634bae2af424fb716042461cbd20a375d9bc2534daa50a2d45286c9b174952fb239cee4ab8d6351a40c65327 + languageName: node + linkType: hard + +"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.6.0, async@npm:^2.6.1": version: 2.6.4 resolution: "async@npm:2.6.4" dependencies: @@ -20804,6 +21012,13 @@ __metadata: languageName: node linkType: hard +"async@npm:^3.1.0": + version: 3.2.6 + resolution: "async@npm:3.2.6" + checksum: 10/cb6e0561a3c01c4b56a799cc8bab6ea5fef45f069ab32500b6e19508db270ef2dffa55e5aed5865c5526e9907b1f8be61b27530823b411ffafb5e1538c86c368 + languageName: node + linkType: hard + "async@npm:^3.2.3": version: 3.2.3 resolution: "async@npm:3.2.3" @@ -21027,7 +21242,7 @@ __metadata: languageName: node linkType: hard -"babel-code-frame@npm:^6.22.0": +"babel-code-frame@npm:^6.16.0, babel-code-frame@npm:^6.22.0": version: 6.26.0 resolution: "babel-code-frame@npm:6.26.0" dependencies: @@ -21343,6 +21558,16 @@ __metadata: languageName: node linkType: hard +"babel-runtime@npm:^6.11.6": + version: 6.26.0 + resolution: "babel-runtime@npm:6.26.0" + dependencies: + core-js: "npm:^2.4.0" + regenerator-runtime: "npm:^0.11.0" + checksum: 10/2cdf0f083b9598a43cdb11cbf1e7060584079a9a2230f06aec997ba81e887ef17fdcb5ad813a484ee099e06d2de0cea832bdd3011c06325acb284284c754ee8f + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -21441,6 +21666,13 @@ __metadata: languageName: node linkType: hard +"becke-ch--regex--s0-0-v1--base--pl--lib@npm:^1.2.0": + version: 1.4.0 + resolution: "becke-ch--regex--s0-0-v1--base--pl--lib@npm:1.4.0" + checksum: 10/c86e2ec70a6530a0efded204c6d27b5648e8713c6175178bea6fd1867aaaec601c9b228070fcf4b43f387ddad63fddfe935d7298f9adf7a4cff403bb5ed6ff4d + languageName: node + linkType: hard + "before-after-hook@npm:^3.0.2": version: 3.0.2 resolution: "before-after-hook@npm:3.0.2" @@ -21626,7 +21858,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:3.7.2, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": +"bluebird@npm:3.7.2, bluebird@npm:^3.4.1, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 @@ -21681,7 +21913,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.2, body-parser@npm:^1.10.0": +"body-parser@npm:1.20.2, body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": version: 1.20.2 resolution: "body-parser@npm:1.20.2" dependencies: @@ -22138,7 +22370,7 @@ __metadata: languageName: node linkType: hard -"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0": +"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb @@ -22173,6 +22405,15 @@ __metadata: languageName: node linkType: hard +"buffer-xor@npm:^2.0.1": + version: 2.0.2 + resolution: "buffer-xor@npm:2.0.2" + dependencies: + safe-buffer: "npm:^5.1.1" + checksum: 10/78226fcae9f4a0b4adec69dffc049f26f6bab240dfdd1b3f6fe07c4eb6b90da202ea5c363f98af676156ee39450a06405fddd9e8965f68a5327edcc89dcbe5d0 + languageName: node + linkType: hard + "buffer@npm:4.9.2": version: 4.9.2 resolution: "buffer@npm:4.9.2" @@ -22491,6 +22732,18 @@ __metadata: languageName: node linkType: hard +"caching-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "caching-transform@npm:2.0.0" + dependencies: + make-dir: "npm:^1.0.0" + md5-hex: "npm:^2.0.0" + package-hash: "npm:^2.0.0" + write-file-atomic: "npm:^2.0.0" + checksum: 10/83275a2529b4c65cc5c59b548ec5a0e7829883518235c45ff67e344d1bca6720d7233837b88e881e940f4e372503e1265df326f18dd4d717375e87fabca6dba2 + languageName: node + linkType: hard + "caching-transform@npm:^4.0.0": version: 4.0.0 resolution: "caching-transform@npm:4.0.0" @@ -22869,7 +23122,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^1.1.3": +"chalk@npm:^1.0.0, chalk@npm:^1.1.1, chalk@npm:^1.1.3": version: 1.1.3 resolution: "chalk@npm:1.1.3" dependencies: @@ -22925,6 +23178,32 @@ __metadata: languageName: node linkType: hard +"change-case@npm:^3.0.1": + version: 3.1.0 + resolution: "change-case@npm:3.1.0" + dependencies: + camel-case: "npm:^3.0.0" + constant-case: "npm:^2.0.0" + dot-case: "npm:^2.1.0" + header-case: "npm:^1.0.0" + is-lower-case: "npm:^1.1.0" + is-upper-case: "npm:^1.1.0" + lower-case: "npm:^1.1.1" + lower-case-first: "npm:^1.0.0" + no-case: "npm:^2.3.2" + param-case: "npm:^2.1.0" + pascal-case: "npm:^2.0.0" + path-case: "npm:^2.1.0" + sentence-case: "npm:^2.1.0" + snake-case: "npm:^2.1.0" + swap-case: "npm:^1.1.0" + title-case: "npm:^2.1.0" + upper-case: "npm:^1.1.1" + upper-case-first: "npm:^1.1.0" + checksum: 10/04ecb4db5ea15b71db7d229fd4fb4034e3f8a4f3e79c3729994eb9339f401b2b18cd5e01f19c1a6a607716ad32206cdee40812df76d9808629e8694f847da8a9 + languageName: node + linkType: hard + "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -22967,6 +23246,15 @@ __metadata: languageName: node linkType: hard +"checkpoint-store@npm:^1.1.0": + version: 1.1.0 + resolution: "checkpoint-store@npm:1.1.0" + dependencies: + functional-red-black-tree: "npm:^1.0.1" + checksum: 10/94e921ccb222c7970615e8b2bcd956dbd52f15a1c397af0447dbdef8ecd32ffe342e394d39e55f2912278a460f3736de777b5b57a5baf229c0a6bd04d2465511 + languageName: node + linkType: hard + "cheerio-select@npm:^2.1.0": version: 2.1.0 resolution: "cheerio-select@npm:2.1.0" @@ -23198,6 +23486,15 @@ __metadata: languageName: node linkType: hard +"cli-cursor@npm:^1.0.1": + version: 1.0.2 + resolution: "cli-cursor@npm:1.0.2" + dependencies: + restore-cursor: "npm:^1.0.1" + checksum: 10/e3b4400d5e925ed11c7596f82e80e170693f69ac6f0f21da2a400043c37548dd780f985a1a5ef1ffb038e36fc6711d1d4f066b104eed851ae76e34bd883cf2bf + languageName: node + linkType: hard + "cli-cursor@npm:^2.1.0": version: 2.1.0 resolution: "cli-cursor@npm:2.1.0" @@ -23244,6 +23541,20 @@ __metadata: languageName: node linkType: hard +"cli-table3@npm:^0.5.1": + version: 0.5.1 + resolution: "cli-table3@npm:0.5.1" + dependencies: + colors: "npm:^1.1.2" + object-assign: "npm:^4.1.0" + string-width: "npm:^2.1.1" + dependenciesMeta: + colors: + optional: true + checksum: 10/5b4aaa81943c9030e3366aaf20cc4be0792397d82dea3a1660e80ce49edded4dcc722f9bf272354061c5bfa3f4236ad2fdc86bc7bb0bbf7e4b8e8d3b418b955a + languageName: node + linkType: hard + "cli-truncate@npm:2.1.0, cli-truncate@npm:^2.1.0": version: 2.1.0 resolution: "cli-truncate@npm:2.1.0" @@ -23621,7 +23932,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^10.0.1": +"commander@npm:^10.0.0, commander@npm:^10.0.1": version: 10.0.1 resolution: "commander@npm:10.0.1" checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb @@ -23635,7 +23946,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.12.1, commander@npm:^2.15.0, commander@npm:^2.20.0, commander@npm:^2.20.3, commander@npm:^2.8.1": +"commander@npm:^2.12.1, commander@npm:^2.13.0, commander@npm:^2.15.0, commander@npm:^2.19.0, commander@npm:^2.20.0, commander@npm:^2.20.3, commander@npm:^2.8.1, commander@npm:^2.9.0": version: 2.20.3 resolution: "commander@npm:2.20.3" checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b @@ -23915,6 +24226,13 @@ __metadata: languageName: node linkType: hard +"contains-path@npm:^0.1.0": + version: 0.1.0 + resolution: "contains-path@npm:0.1.0" + checksum: 10/94ecfd944e0bc51be8d3fc596dcd17d705bd4c8a1a627952a3a8c5924bac01c7ea19034cf40b4b4f89e576cdead130a7e5fd38f5f7f07ef67b4b261d875871e3 + languageName: node + linkType: hard + "content-disposition@npm:0.5.4, content-disposition@npm:^0.5.3": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" @@ -24172,6 +24490,13 @@ __metadata: languageName: node linkType: hard +"cookie@npm:0.7.1": + version: 0.7.1 + resolution: "cookie@npm:0.7.1" + checksum: 10/aec6a6aa0781761bf55d60447d6be08861d381136a0fe94aa084fddd4f0300faa2b064df490c6798adfa1ebaef9e0af9b08a189c823e0811b8b313b3d9a03380 + languageName: node + linkType: hard + "cookie@npm:^0.4.1, cookie@npm:~0.4.1": version: 0.4.2 resolution: "cookie@npm:0.4.2" @@ -24245,6 +24570,13 @@ __metadata: languageName: node linkType: hard +"core-js-pure@npm:^3.0.1": + version: 3.38.1 + resolution: "core-js-pure@npm:3.38.1" + checksum: 10/7dfd59bf3a09277056ac2ef87e49b49d77340952e99ee12b3e1e53bf7e1f34a8ee1fb6026f286b1ba29957f5728664430ccd1ff86983c7ae5fa411d4da74d3de + languageName: node + linkType: hard + "core-js-pure@npm:^3.23.3": version: 3.32.1 resolution: "core-js-pure@npm:3.32.1" @@ -24252,6 +24584,13 @@ __metadata: languageName: node linkType: hard +"core-js@npm:^2.4.0": + version: 2.6.12 + resolution: "core-js@npm:2.6.12" + checksum: 10/7c624eb00a59c74c769d5d80f751f3bf1fc6201205b6562f27286ad5e00bbca1483f2f7eb0c2854b86f526ef5c7dc958b45f2ff536f8a31b8e9cb1a13a96efca + languageName: node + linkType: hard + "core-js@npm:^3.19.2": version: 3.32.1 resolution: "core-js@npm:3.32.1" @@ -25152,6 +25491,61 @@ __metadata: languageName: node linkType: hard +"cucumber-expressions@npm:^6.0.0": + version: 6.6.2 + resolution: "cucumber-expressions@npm:6.6.2" + dependencies: + becke-ch--regex--s0-0-v1--base--pl--lib: "npm:^1.2.0" + checksum: 10/9878c49c8217fd95915c9537509c54979c2d749bb3beb8b306905511b675e087de08a4191017fa175bb432a8b0a83efa6d037351d5135ab51ca8dc8e8f8edff1 + languageName: node + linkType: hard + +"cucumber-tag-expressions@npm:^1.1.1": + version: 1.1.1 + resolution: "cucumber-tag-expressions@npm:1.1.1" + checksum: 10/50a355f08359930ee3e7b766083b2e1c443324cc2c983ea9b8d23b45f8e0e10a7fb5da3d3d7c88bc6fa08cb6559e2c48f0acfc8078a8311ebee08b4d5bc91acb + languageName: node + linkType: hard + +"cucumber@npm:5.0.3": + version: 5.0.3 + resolution: "cucumber@npm:5.0.3" + dependencies: + assertion-error-formatter: "npm:^2.0.1" + babel-runtime: "npm:^6.11.6" + bluebird: "npm:^3.4.1" + cli-table3: "npm:^0.5.1" + colors: "npm:^1.1.2" + commander: "npm:^2.9.0" + cross-spawn: "npm:^6.0.5" + cucumber-expressions: "npm:^6.0.0" + cucumber-tag-expressions: "npm:^1.1.1" + duration: "npm:^0.2.1" + escape-string-regexp: "npm:^1.0.5" + figures: "npm:2.0.0" + gherkin: "npm:^5.0.0" + glob: "npm:^7.1.3" + indent-string: "npm:^3.1.0" + is-generator: "npm:^1.0.2" + is-stream: "npm:^1.1.0" + knuth-shuffle-seeded: "npm:^1.0.6" + lodash: "npm:^4.17.10" + mz: "npm:^2.4.0" + progress: "npm:^2.0.0" + resolve: "npm:^1.3.3" + serialize-error: "npm:^2.1.0" + stack-chain: "npm:^2.0.0" + stacktrace-js: "npm:^2.0.0" + string-argv: "npm:0.1.1" + title-case: "npm:^2.1.1" + util-arity: "npm:^1.0.2" + verror: "npm:^1.9.0" + bin: + cucumber-js: ./bin/cucumber-js + checksum: 10/610544885dbd8ac110f80c9407d2d1907467bf3fe38541f2d7b0c0124acbc8136a43df9f70d85847038b00e1d312792bca60ed83b434c24645ac667f0fa112f3 + languageName: node + linkType: hard + "cycle@npm:1.0.x": version: 1.0.3 resolution: "cycle@npm:1.0.3" @@ -25169,6 +25563,16 @@ __metadata: languageName: node linkType: hard +"d@npm:^1.0.2": + version: 1.0.2 + resolution: "d@npm:1.0.2" + dependencies: + es5-ext: "npm:^0.10.64" + type: "npm:^2.7.2" + checksum: 10/a3f45ef964622f683f6a1cb9b8dcbd75ce490cd2f4ac9794099db3d8f0e2814d412d84cd3fe522e58feb1f273117bb480f29c5381f6225f0abca82517caaa77a + languageName: node + linkType: hard + "dag-jose@npm:^4.0.0": version: 4.0.0 resolution: "dag-jose@npm:4.0.0" @@ -25234,6 +25638,39 @@ __metadata: languageName: node linkType: hard +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10/5919a39a18ee919573336158fd162fdf8ada1bc23a139f28543fd45fac48e0ea4a3ad3bfde91de124d4106e65c4a7525f6a84c20ba0797ec890a77a96d13a82a + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10/f33c65e58d8d0432ad79761f2e8a579818d724b5dc6dc4e700489b762d963ab30873c0f1c37d8f2ed12ef51c706d1195f64422856d25f067457aeec50cc40aac + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10/96f34f151bf02affb7b9f98762fb7aca1dd5f4553cb57b80bce750ca609c15d33ca659568ef1d422f7e35680736cbccb893a3d4b012760c758c1446bbdc4c6db + languageName: node + linkType: hard + "dataloader@npm:2.1.0": version: 2.1.0 resolution: "dataloader@npm:2.1.0" @@ -25271,14 +25708,14 @@ __metadata: languageName: node linkType: hard -"debug-log@npm:^1.0.1": +"debug-log@npm:^1.0.0, debug-log@npm:^1.0.1": version: 1.0.1 resolution: "debug-log@npm:1.0.1" checksum: 10/1439f9dac2e77cd915abd534b8876dd655cd86214e3bab8f78fff284b61fda3a143bad56ed71071fcbfbe11cc8c453ff719e1512f24c3b1056d12fa0b4db8520 languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0": +"debug@npm:2.6.9, debug@npm:^2.1.1, debug@npm:^2.2.0, debug@npm:^2.3.3, debug@npm:^2.6.0": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -25605,6 +26042,15 @@ __metadata: languageName: node linkType: hard +"default-require-extensions@npm:^2.0.0": + version: 2.0.0 + resolution: "default-require-extensions@npm:2.0.0" + dependencies: + strip-bom: "npm:^3.0.0" + checksum: 10/a0b18bdcdee93018ee39161208c193f274d5f6553c32f518ad86eba92edf6485d194012ffb402e8207f9b80f2da2c6de48e0189fd63bd682f0760e4dbd35cb79 + languageName: node + linkType: hard + "default-require-extensions@npm:^3.0.0": version: 3.0.0 resolution: "default-require-extensions@npm:3.0.0" @@ -25646,6 +26092,25 @@ __metadata: languageName: node linkType: hard +"deferred-leveldown@npm:~1.2.1": + version: 1.2.2 + resolution: "deferred-leveldown@npm:1.2.2" + dependencies: + abstract-leveldown: "npm:~2.6.0" + checksum: 10/17a79955e8191264c79422235dc5eea46fa1b5be43c06d50bfb149679721ec389168198ac2edf6635bd02372db19c1b0db5154d502b2ee93c33f0ad9644597be + languageName: node + linkType: hard + +"deferred-leveldown@npm:~4.0.0": + version: 4.0.2 + resolution: "deferred-leveldown@npm:4.0.2" + dependencies: + abstract-leveldown: "npm:~5.0.0" + inherits: "npm:^2.0.3" + checksum: 10/124de023a7f6d4b7109a2a8cdb361e533702035386718ab047960a763e993532854a027b7712caeb68d22e5c4358074fb5c3f7e7d7860dae16f3e482759d2cd6 + languageName: node + linkType: hard + "deferred-leveldown@npm:~5.3.0": version: 5.3.0 resolution: "deferred-leveldown@npm:5.3.0" @@ -25750,6 +26215,20 @@ __metadata: languageName: node linkType: hard +"deglob@npm:^2.1.0": + version: 2.1.1 + resolution: "deglob@npm:2.1.1" + dependencies: + find-root: "npm:^1.0.0" + glob: "npm:^7.0.5" + ignore: "npm:^3.0.9" + pkg-config: "npm:^1.1.0" + run-parallel: "npm:^1.1.2" + uniq: "npm:^1.0.1" + checksum: 10/cf1ae819dbdbf9bcd88f86a6e9abc7f28eb65702d5a01292572717e89c339ffc7cd8cd3ab1c76e345b93af2c986da35a2238839cbb6cb63574927add780d4cf7 + languageName: node + linkType: hard + "del-cli@npm:5.1.0": version: 5.1.0 resolution: "del-cli@npm:5.1.0" @@ -26072,7 +26551,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^3.5.0": +"diff@npm:^3.0.0, diff@npm:^3.1.0, diff@npm:^3.5.0": version: 3.5.0 resolution: "diff@npm:3.5.0" checksum: 10/cfbc2df98d6f8eb82c0f7735c8468695f65189d31f95a708d4c97cd96a8083fdfd83d87a067a29924ae7d8ff64f578e7da78391af537815750268555fe0df9f0 @@ -26180,7 +26659,17 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^2.1.0": +"doctrine@npm:1.5.0, doctrine@npm:^1.2.2": + version: 1.5.0 + resolution: "doctrine@npm:1.5.0" + dependencies: + esutils: "npm:^2.0.2" + isarray: "npm:^1.0.0" + checksum: 10/3ac7d891225f95292f9b9cfc1fe24e75e05ea53b08706298bbf4bf2451f8e1b9de25b1017f5dac23a8deeb8f3ba15fe2c1b454e78d1e97a0921af30aa6d5e753 + languageName: node + linkType: hard + +"doctrine@npm:^2.0.0, doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" dependencies: @@ -26496,6 +26985,16 @@ __metadata: languageName: node linkType: hard +"duration@npm:^0.2.1": + version: 0.2.2 + resolution: "duration@npm:0.2.2" + dependencies: + d: "npm:1" + es5-ext: "npm:~0.10.46" + checksum: 10/823c7d1d06c5126346147e5271ddce1c1bd186c110beaac3d18f22a83a1725d4a66c29bbefe1a550cd49a093727978a01708628c2f0d479eb2abd9e0afb77554 + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -26739,6 +27238,19 @@ __metadata: languageName: node linkType: hard +"encoding-down@npm:~5.0.0": + version: 5.0.4 + resolution: "encoding-down@npm:5.0.4" + dependencies: + abstract-leveldown: "npm:^5.0.0" + inherits: "npm:^2.0.3" + level-codec: "npm:^9.0.0" + level-errors: "npm:^2.0.0" + xtend: "npm:^4.0.1" + checksum: 10/aed668bb68e0db1f93979eb784f88d2350b268b1d4e2096a3421e4d0a4232fa928ff1af8b0131d4553f6189254bc9668053dc5e5d00b7230b5590e9e2c5bba22 + languageName: node + linkType: hard + "encoding@npm:^0.1.12, encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -27115,6 +27627,60 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2": + version: 1.23.3 + resolution: "es-abstract@npm:1.23.3" + dependencies: + array-buffer-byte-length: "npm:^1.0.1" + arraybuffer.prototype.slice: "npm:^1.0.3" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + data-view-buffer: "npm:^1.0.1" + data-view-byte-length: "npm:^1.0.1" + data-view-byte-offset: "npm:^1.0.0" + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-set-tostringtag: "npm:^2.0.3" + es-to-primitive: "npm:^1.2.1" + function.prototype.name: "npm:^1.1.6" + get-intrinsic: "npm:^1.2.4" + get-symbol-description: "npm:^1.0.2" + globalthis: "npm:^1.0.3" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.2" + internal-slot: "npm:^1.0.7" + is-array-buffer: "npm:^3.0.4" + is-callable: "npm:^1.2.7" + is-data-view: "npm:^1.0.1" + is-negative-zero: "npm:^2.0.3" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.3" + is-string: "npm:^1.0.7" + is-typed-array: "npm:^1.1.13" + is-weakref: "npm:^1.0.2" + object-inspect: "npm:^1.13.1" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.5" + regexp.prototype.flags: "npm:^1.5.2" + safe-array-concat: "npm:^1.1.2" + safe-regex-test: "npm:^1.0.3" + string.prototype.trim: "npm:^1.2.9" + string.prototype.trimend: "npm:^1.0.8" + string.prototype.trimstart: "npm:^1.0.8" + typed-array-buffer: "npm:^1.0.2" + typed-array-byte-length: "npm:^1.0.1" + typed-array-byte-offset: "npm:^1.0.2" + typed-array-length: "npm:^1.0.6" + unbox-primitive: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10/2da795a6a1ac5fc2c452799a409acc2e3692e06dc6440440b076908617188899caa562154d77263e3053bcd9389a07baa978ab10ac3b46acc399bd0c77be04cb + languageName: node + linkType: hard + "es-array-method-boxes-properly@npm:^1.0.0": version: 1.0.0 resolution: "es-array-method-boxes-properly@npm:1.0.0" @@ -27191,6 +27757,15 @@ __metadata: languageName: node linkType: hard +"es-object-atoms@npm:^1.0.0": + version: 1.0.0 + resolution: "es-object-atoms@npm:1.0.0" + dependencies: + es-errors: "npm:^1.3.0" + checksum: 10/f8910cf477e53c0615f685c5c96210591841850871b81924fcf256bfbaa68c254457d994a4308c60d15b20805e7f61ce6abc669375e01a5349391a8c1767584f + languageName: node + linkType: hard + "es-set-tostringtag@npm:^2.0.1": version: 2.0.1 resolution: "es-set-tostringtag@npm:2.0.1" @@ -27242,7 +27817,7 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:~0.10.14": +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:^0.10.64, es5-ext@npm:~0.10.14, es5-ext@npm:~0.10.46": version: 0.10.64 resolution: "es5-ext@npm:0.10.64" dependencies: @@ -27261,7 +27836,7 @@ __metadata: languageName: node linkType: hard -"es6-iterator@npm:^2.0.3": +"es6-iterator@npm:^2.0.3, es6-iterator@npm:~2.0.1, es6-iterator@npm:~2.0.3": version: 2.0.3 resolution: "es6-iterator@npm:2.0.3" dependencies: @@ -27272,6 +27847,20 @@ __metadata: languageName: node linkType: hard +"es6-map@npm:^0.1.3": + version: 0.1.5 + resolution: "es6-map@npm:0.1.5" + dependencies: + d: "npm:1" + es5-ext: "npm:~0.10.14" + es6-iterator: "npm:~2.0.1" + es6-set: "npm:~0.1.5" + es6-symbol: "npm:~3.1.1" + event-emitter: "npm:~0.3.5" + checksum: 10/ca271c8efcd5b03bc430fe7508803b8b47c1db2956299b538a68244a3473d176536ee10db2db3b31174c71f83d6a6d67dff8311ad25ec6e71a7ffae01f4ca9d2 + languageName: node + linkType: hard + "es6-object-assign@npm:^1.1.0": version: 1.1.0 resolution: "es6-object-assign@npm:1.1.0" @@ -27286,6 +27875,20 @@ __metadata: languageName: node linkType: hard +"es6-set@npm:~0.1.5": + version: 0.1.6 + resolution: "es6-set@npm:0.1.6" + dependencies: + d: "npm:^1.0.1" + es5-ext: "npm:^0.10.62" + es6-iterator: "npm:~2.0.3" + es6-symbol: "npm:^3.1.3" + event-emitter: "npm:^0.3.5" + type: "npm:^2.7.2" + checksum: 10/45e8a4432edf71be7e0b7415ec434f62e294a6cb790646a5475b01ac13fda820141eab9fa7d18e91f4e5977bdf8d27d944123fafd15740a1c7f832a2caf45ba4 + languageName: node + linkType: hard + "es6-symbol@npm:^3.0.2, es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": version: 3.1.3 resolution: "es6-symbol@npm:3.1.3" @@ -27296,6 +27899,28 @@ __metadata: languageName: node linkType: hard +"es6-symbol@npm:~3.1.1": + version: 3.1.4 + resolution: "es6-symbol@npm:3.1.4" + dependencies: + d: "npm:^1.0.2" + ext: "npm:^1.7.0" + checksum: 10/3743119fe61f89e2f049a6ce52bd82fab5f65d13e2faa72453b73f95c15292c3cb9bdf3747940d504517e675e45fd375554c6b5d35d2bcbefd35f5489ecba546 + languageName: node + linkType: hard + +"es6-weak-map@npm:^2.0.1": + version: 2.0.3 + resolution: "es6-weak-map@npm:2.0.3" + dependencies: + d: "npm:1" + es5-ext: "npm:^0.10.46" + es6-iterator: "npm:^2.0.3" + es6-symbol: "npm:^3.1.1" + checksum: 10/5958a321cf8dfadc82b79eeaa57dc855893a4afd062b4ef5c9ded0010d3932099311272965c3d3fdd3c85df1d7236013a570e704fa6c1f159bbf979c203dd3a3 + languageName: node + linkType: hard + "esbuild-wasm@npm:0.18.17": version: 0.18.17 resolution: "esbuild-wasm@npm:0.18.17" @@ -27625,6 +28250,18 @@ __metadata: languageName: node linkType: hard +"escope@npm:^3.6.0": + version: 3.6.0 + resolution: "escope@npm:3.6.0" + dependencies: + es6-map: "npm:^0.1.3" + es6-weak-map: "npm:^2.0.1" + esrecurse: "npm:^4.1.0" + estraverse: "npm:^4.1.1" + checksum: 10/8a656e71f01b7f4a3a262c2a9ea54654975e093f3b89f1b4ef5767fbf94567f8196772963b967ffb7a4aa9b211c5e47ba3a7e9f05828af5169183ac4f6eb2da9 + languageName: node + linkType: hard + "eslint-config-prettier@npm:9.1.0": version: 9.1.0 resolution: "eslint-config-prettier@npm:9.1.0" @@ -27660,6 +28297,29 @@ __metadata: languageName: node linkType: hard +"eslint-config-standard-jsx@npm:4.0.2": + version: 4.0.2 + resolution: "eslint-config-standard-jsx@npm:4.0.2" + peerDependencies: + eslint: ">=3.19.0" + eslint-plugin-react: ">=6.10.3" + checksum: 10/192133bbcf22967c75eff498c50c9c5ab29d616cae35274b99d99aa1fb0910a832352422ed6e2dbfb6adfd35b988cea138421885a1755dabf53088de20f88dd0 + languageName: node + linkType: hard + +"eslint-config-standard@npm:10.2.1": + version: 10.2.1 + resolution: "eslint-config-standard@npm:10.2.1" + peerDependencies: + eslint: ">=3.19.0" + eslint-plugin-import: ">=2.2.0" + eslint-plugin-node: ">=4.2.2" + eslint-plugin-promise: ">=3.5.0" + eslint-plugin-standard: ">=3.0.0" + checksum: 10/9fbcdcd0934cfb547fff0f73b8e2c94295b4d59adbe0bc935421f6360b219906d144bce5666189a0165212b141b0e3eaba4a76edec567adfe13b06227e2fefb4 + languageName: node + linkType: hard + "eslint-config-standard@npm:17.1.0": version: 17.1.0 resolution: "eslint-config-standard@npm:17.1.0" @@ -27672,6 +28332,17 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-node@npm:^0.2.0": + version: 0.2.3 + resolution: "eslint-import-resolver-node@npm:0.2.3" + dependencies: + debug: "npm:^2.2.0" + object-assign: "npm:^4.0.1" + resolve: "npm:^1.1.6" + checksum: 10/942425aff3c581fb174a53c40a55332fa3910f248147251d4b61a932a22761a5680ab3f419d12bc21dfff3e264c8c44b92c3ec8c0147dd2e67affbc8185dd170 + languageName: node + linkType: hard + "eslint-import-resolver-node@npm:^0.3.7, eslint-import-resolver-node@npm:^0.3.9": version: 0.3.9 resolution: "eslint-import-resolver-node@npm:0.3.9" @@ -27683,6 +28354,18 @@ __metadata: languageName: node linkType: hard +"eslint-module-utils@npm:^2.0.0": + version: 2.9.0 + resolution: "eslint-module-utils@npm:2.9.0" + dependencies: + debug: "npm:^3.2.7" + peerDependenciesMeta: + eslint: + optional: true + checksum: 10/13e001c96a6ce8d3d7ad6798c9b86351820c9c4a9abc5a152e84b838d7937a781471b0128ee690d18def226741fc96e8c5cff78c059bdcafe9ab8625777fcf2a + languageName: node + linkType: hard + "eslint-module-utils@npm:^2.8.0": version: 2.8.0 resolution: "eslint-module-utils@npm:2.8.0" @@ -27775,6 +28458,26 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-import@npm:~2.2.0": + version: 2.2.0 + resolution: "eslint-plugin-import@npm:2.2.0" + dependencies: + builtin-modules: "npm:^1.1.1" + contains-path: "npm:^0.1.0" + debug: "npm:^2.2.0" + doctrine: "npm:1.5.0" + eslint-import-resolver-node: "npm:^0.2.0" + eslint-module-utils: "npm:^2.0.0" + has: "npm:^1.0.1" + lodash.cond: "npm:^4.3.0" + minimatch: "npm:^3.0.3" + pkg-up: "npm:^1.0.0" + peerDependencies: + eslint: 2.x - 3.x + checksum: 10/646734c8b1bf355ec1d0b2c90a51e5e9a7c764b12570e93b7ab6085db5df3f9aef718e941874148543b3eac61fcc7fb3668169d8e18b4b08b88ccefe054f942b + languageName: node + linkType: hard + "eslint-plugin-jest@npm:^25.3.0": version: 25.7.0 resolution: "eslint-plugin-jest@npm:25.7.0" @@ -27834,6 +28537,21 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-node@npm:~4.2.2": + version: 4.2.3 + resolution: "eslint-plugin-node@npm:4.2.3" + dependencies: + ignore: "npm:^3.0.11" + minimatch: "npm:^3.0.2" + object-assign: "npm:^4.0.1" + resolve: "npm:^1.1.7" + semver: "npm:5.3.0" + peerDependencies: + eslint: ">=3.1.0" + checksum: 10/72bdc48d39588c204f626cbcc20fa74321f46729a57814ca3472382bbeb5aef6d035cd683f40d3a5f3ebf817be76358a7fa7aa7eeca71979d44d9032048b7dc5 + languageName: node + linkType: hard + "eslint-plugin-prettier@npm:5.1.3": version: 5.1.3 resolution: "eslint-plugin-prettier@npm:5.1.3" @@ -27863,6 +28581,13 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-promise@npm:~3.5.0": + version: 3.5.0 + resolution: "eslint-plugin-promise@npm:3.5.0" + checksum: 10/e40b70e0eab0b7c31c0cffebbd4e334e7244c6a381e377bb191232e302830546f04cf54336cee10b8b73a7a29af42f2577db272de44019194b60226e3245dbd6 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.3.0": version: 4.6.0 resolution: "eslint-plugin-react-hooks@npm:4.6.0" @@ -27898,6 +28623,21 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-react@npm:~6.10.0": + version: 6.10.3 + resolution: "eslint-plugin-react@npm:6.10.3" + dependencies: + array.prototype.find: "npm:^2.0.1" + doctrine: "npm:^1.2.2" + has: "npm:^1.0.1" + jsx-ast-utils: "npm:^1.3.4" + object.assign: "npm:^4.0.4" + peerDependencies: + eslint: ^2.0.0 || ^3.0.0 + checksum: 10/461c9ae99fcbcd2b3e15b49ac5afcd80ac59890f23e95022c7bb3c6d7cdf737d108bc0ca76495f41ea693d692c6f94a0a9679d8a0f344571b2e48522300c1487 + languageName: node + linkType: hard + "eslint-plugin-standard@npm:5.0.0": version: 5.0.0 resolution: "eslint-plugin-standard@npm:5.0.0" @@ -27907,6 +28647,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-standard@npm:~3.0.1": + version: 3.0.1 + resolution: "eslint-plugin-standard@npm:3.0.1" + peerDependencies: + eslint: ">=3.19.0" + checksum: 10/7aa7b941bfa09eee5d2501ad7c5e39655a847a404e3d57cdacd0c58a361157f6cf20a70523e6ba3bf24ebb9356c53abe57c2214c37e4ef2746be460700e5b141 + languageName: node + linkType: hard + "eslint-plugin-testing-library@npm:^5.0.1": version: 5.11.1 resolution: "eslint-plugin-testing-library@npm:5.11.1" @@ -27918,7 +28667,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": +"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.0.0, eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -28144,6 +28893,51 @@ __metadata: languageName: node linkType: hard +"eslint@npm:~3.19.0": + version: 3.19.0 + resolution: "eslint@npm:3.19.0" + dependencies: + babel-code-frame: "npm:^6.16.0" + chalk: "npm:^1.1.3" + concat-stream: "npm:^1.5.2" + debug: "npm:^2.1.1" + doctrine: "npm:^2.0.0" + escope: "npm:^3.6.0" + espree: "npm:^3.4.0" + esquery: "npm:^1.0.0" + estraverse: "npm:^4.2.0" + esutils: "npm:^2.0.2" + file-entry-cache: "npm:^2.0.0" + glob: "npm:^7.0.3" + globals: "npm:^9.14.0" + ignore: "npm:^3.2.0" + imurmurhash: "npm:^0.1.4" + inquirer: "npm:^0.12.0" + is-my-json-valid: "npm:^2.10.0" + is-resolvable: "npm:^1.0.0" + js-yaml: "npm:^3.5.1" + json-stable-stringify: "npm:^1.0.0" + levn: "npm:^0.3.0" + lodash: "npm:^4.0.0" + mkdirp: "npm:^0.5.0" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.8.2" + path-is-inside: "npm:^1.0.1" + pluralize: "npm:^1.2.1" + progress: "npm:^1.1.8" + require-uncached: "npm:^1.0.2" + shelljs: "npm:^0.7.5" + strip-bom: "npm:^3.0.0" + strip-json-comments: "npm:~2.0.1" + table: "npm:^3.7.8" + text-table: "npm:~0.2.0" + user-home: "npm:^2.0.0" + bin: + eslint: ./bin/eslint.js + checksum: 10/38bbd71dd73a516c760feb4d7457cb192a288fed9facbe71c46d3088e69de37884503fb9b97a09b27c6ef4ade1c6072bd072dec08a00374069896ed9a0a82bad + languageName: node + linkType: hard + "esm@npm:3.2.25, esm@npm:^3.2.25": version: 3.2.25 resolution: "esm@npm:3.2.25" @@ -28163,7 +28957,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:^3.5.4": +"espree@npm:^3.4.0, espree@npm:^3.5.4": version: 3.5.4 resolution: "espree@npm:3.5.4" dependencies: @@ -28212,7 +29006,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1": +"estraverse@npm:^4.1.1, estraverse@npm:^4.2.0": version: 4.3.0 resolution: "estraverse@npm:4.3.0" checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb @@ -28289,6 +29083,18 @@ __metadata: languageName: node linkType: hard +"ethashjs@npm:~0.0.7": + version: 0.0.8 + resolution: "ethashjs@npm:0.0.8" + dependencies: + async: "npm:^2.1.2" + buffer-xor: "npm:^2.0.1" + ethereumjs-util: "npm:^7.0.2" + miller-rabin: "npm:^4.0.0" + checksum: 10/5364b2603df6cd0462d0408063fdf716ae6ed96b4dbc09278dde79132f94a92b458021446aa7db83568338d1cf3be180e140eda4c727e89261a01adf10574488 + languageName: node + linkType: hard + "ethereum-abi-types-generator@npm:1.3.4": version: 1.3.4 resolution: "ethereum-abi-types-generator@npm:1.3.4" @@ -28375,6 +29181,48 @@ __metadata: languageName: node linkType: hard +"ethereumjs-account@npm:^3.0.0": + version: 3.0.0 + resolution: "ethereumjs-account@npm:3.0.0" + dependencies: + ethereumjs-util: "npm:^6.0.0" + rlp: "npm:^2.2.1" + safe-buffer: "npm:^5.1.1" + checksum: 10/64dbe026d29aca12c79596cf4085fb27e209988f11b7d5bf3a1f2aadaaa517d90d722680c8b525144c26a2d9cd8494aa26ac088fa80b358cc3e28024f7ddbe81 + languageName: node + linkType: hard + +"ethereumjs-block@npm:^2.2.2, ethereumjs-block@npm:~2.2.2": + version: 2.2.2 + resolution: "ethereumjs-block@npm:2.2.2" + dependencies: + async: "npm:^2.0.1" + ethereumjs-common: "npm:^1.5.0" + ethereumjs-tx: "npm:^2.1.1" + ethereumjs-util: "npm:^5.0.0" + merkle-patricia-tree: "npm:^2.1.2" + checksum: 10/5179e91d27acc3614199d8098449f16de7927e14239a996c8e7af6e2f65867048a3125ab79af4bac4f828228d332a0ae5837997b5bb259bd2dab2fe6dde455ac + languageName: node + linkType: hard + +"ethereumjs-blockchain@npm:^4.0.3": + version: 4.0.4 + resolution: "ethereumjs-blockchain@npm:4.0.4" + dependencies: + async: "npm:^2.6.1" + ethashjs: "npm:~0.0.7" + ethereumjs-block: "npm:~2.2.2" + ethereumjs-common: "npm:^1.5.0" + ethereumjs-util: "npm:^6.1.0" + flow-stoplight: "npm:^1.0.0" + level-mem: "npm:^3.0.1" + lru-cache: "npm:^5.1.1" + rlp: "npm:^2.2.2" + semaphore: "npm:^1.1.0" + checksum: 10/70041abc21eece9401d47b984608ae11dd55b1ae2c30551fc7c9387d1215ba5ae595641bcfe4fdff01da001707af3887611fcb6f2d027bcf7db6befa3bff2f0f + languageName: node + linkType: hard + "ethereumjs-common@npm:1.5.2, ethereumjs-common@npm:^1.5.0": version: 1.5.2 resolution: "ethereumjs-common@npm:1.5.2" @@ -28382,7 +29230,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-tx@npm:2.1.2, ethereumjs-tx@npm:^2.1.2": +"ethereumjs-tx@npm:2.1.2, ethereumjs-tx@npm:^2.1.1, ethereumjs-tx@npm:^2.1.2": version: 2.1.2 resolution: "ethereumjs-tx@npm:2.1.2" dependencies: @@ -28392,7 +29240,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:6.2.1, ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.2.1": +"ethereumjs-util@npm:6.2.1, ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.1.0, ethereumjs-util@npm:^6.2.0, ethereumjs-util@npm:^6.2.1": version: 6.2.1 resolution: "ethereumjs-util@npm:6.2.1" dependencies: @@ -28407,6 +29255,21 @@ __metadata: languageName: node linkType: hard +"ethereumjs-util@npm:^5.0.0": + version: 5.2.1 + resolution: "ethereumjs-util@npm:5.2.1" + dependencies: + bn.js: "npm:^4.11.0" + create-hash: "npm:^1.1.2" + elliptic: "npm:^6.5.2" + ethereum-cryptography: "npm:^0.1.3" + ethjs-util: "npm:^0.1.3" + rlp: "npm:^2.0.0" + safe-buffer: "npm:^5.1.1" + checksum: 10/f3957c7ccb4abe55c894ab1d039ecfbac1ce3025f4adfee61722760440b704f13dd056fdd9eaaa2be1154c17bba152e1c7f93ce91da3d3d1314de9c479003f9b + languageName: node + linkType: hard + "ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": version: 7.1.4 resolution: "ethereumjs-util@npm:7.1.4" @@ -28420,7 +29283,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -28433,6 +29296,29 @@ __metadata: languageName: node linkType: hard +"ethereumjs-vm@npm:4.1.3": + version: 4.1.3 + resolution: "ethereumjs-vm@npm:4.1.3" + dependencies: + async: "npm:^2.1.2" + async-eventemitter: "npm:^0.2.2" + core-js-pure: "npm:^3.0.1" + ethereumjs-account: "npm:^3.0.0" + ethereumjs-block: "npm:^2.2.2" + ethereumjs-blockchain: "npm:^4.0.3" + ethereumjs-common: "npm:^1.5.0" + ethereumjs-tx: "npm:^2.1.2" + ethereumjs-util: "npm:^6.2.0" + fake-merkle-patricia-tree: "npm:^1.0.1" + functional-red-black-tree: "npm:^1.0.1" + merkle-patricia-tree: "npm:^2.3.2" + rustbn.js: "npm:~0.2.0" + safe-buffer: "npm:^5.1.1" + util.promisify: "npm:^1.0.0" + checksum: 10/6101649632df0762155d952109d17ae735121009fbad704f83884e6aa5a898153bb4fba9856d218bede8c9bb41fa2c600b6a92e9e3dfcbac230076569a0a1b7e + languageName: node + linkType: hard + "ethers@npm:6.12.1": version: 6.12.1 resolution: "ethers@npm:6.12.1" @@ -28492,7 +29378,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^4.0.32, ethers@npm:^4.0.47": +"ethers@npm:^4.0.32, ethers@npm:^4.0.40, ethers@npm:^4.0.47": version: 4.0.49 resolution: "ethers@npm:4.0.49" dependencies: @@ -28557,7 +29443,7 @@ __metadata: languageName: node linkType: hard -"ethjs-util@npm:0.1.6, ethjs-util@npm:^0.1.6": +"ethjs-util@npm:0.1.6, ethjs-util@npm:^0.1.3, ethjs-util@npm:^0.1.6": version: 0.1.6 resolution: "ethjs-util@npm:0.1.6" dependencies: @@ -28567,7 +29453,7 @@ __metadata: languageName: node linkType: hard -"event-emitter@npm:^0.3.5": +"event-emitter@npm:^0.3.5, event-emitter@npm:~0.3.5": version: 0.3.5 resolution: "event-emitter@npm:0.3.5" dependencies: @@ -28732,6 +29618,13 @@ __metadata: languageName: node linkType: hard +"exit-hook@npm:^1.0.0": + version: 1.1.1 + resolution: "exit-hook@npm:1.1.1" + checksum: 10/1b4f16da7c202cd336ca07acb052922639182b4e2f1ad4007ed481bb774ce93469f505dec1371d9cd580ac54146a9fd260f053b0e4a48fa87c49fa3dc4a3f144 + languageName: node + linkType: hard + "exit-on-epipe@npm:~1.0.1": version: 1.0.1 resolution: "exit-on-epipe@npm:1.0.1" @@ -28936,6 +29829,17 @@ __metadata: languageName: node linkType: hard +"express-ws@npm:^4.0.0": + version: 4.0.0 + resolution: "express-ws@npm:4.0.0" + dependencies: + ws: "npm:^5.2.0" + peerDependencies: + express: ^4.0.0 || ^5.0.0-alpha.1 + checksum: 10/5caa16bc6ca109ce4b4380794537d0e915758f3cc9e780f675bc992e843cd554c8deb01cedd75734d8f029b003eac1c32eed4ca885b9a359b8bfefd015d003ec + languageName: node + linkType: hard + "express@npm:4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" @@ -29014,6 +29918,45 @@ __metadata: languageName: node linkType: hard +"express@npm:^4.16.3": + version: 4.21.1 + resolution: "express@npm:4.21.1" + dependencies: + accepts: "npm:~1.3.8" + array-flatten: "npm:1.1.1" + body-parser: "npm:1.20.3" + content-disposition: "npm:0.5.4" + content-type: "npm:~1.0.4" + cookie: "npm:0.7.1" + cookie-signature: "npm:1.0.6" + debug: "npm:2.6.9" + depd: "npm:2.0.0" + encodeurl: "npm:~2.0.0" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + finalhandler: "npm:1.3.1" + fresh: "npm:0.5.2" + http-errors: "npm:2.0.0" + merge-descriptors: "npm:1.0.3" + methods: "npm:~1.1.2" + on-finished: "npm:2.4.1" + parseurl: "npm:~1.3.3" + path-to-regexp: "npm:0.1.10" + proxy-addr: "npm:~2.0.7" + qs: "npm:6.13.0" + range-parser: "npm:~1.2.1" + safe-buffer: "npm:5.2.1" + send: "npm:0.19.0" + serve-static: "npm:1.16.2" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + type-is: "npm:~1.6.18" + utils-merge: "npm:1.0.1" + vary: "npm:~1.1.2" + checksum: 10/5d4a36dd03c1d1cce93172e9b185b5cd13a978d29ee03adc51cd278be7b4a514ae2b63e2fdaec0c00fdc95c6cfb396d9dd1da147917ffd337d6cd0778e08c9bc + languageName: node + linkType: hard + "ext@npm:^1.1.2": version: 1.6.0 resolution: "ext@npm:1.6.0" @@ -29023,6 +29966,15 @@ __metadata: languageName: node linkType: hard +"ext@npm:^1.7.0": + version: 1.7.0 + resolution: "ext@npm:1.7.0" + dependencies: + type: "npm:^2.7.2" + checksum: 10/666a135980b002df0e75c8ac6c389140cdc59ac953db62770479ee2856d58ce69d2f845e5f2586716350b725400f6945e51e9159573158c39f369984c72dcd84 + languageName: node + linkType: hard + "extend-shallow@npm:^2.0.1": version: 2.0.1 resolution: "extend-shallow@npm:2.0.1" @@ -29232,6 +30184,15 @@ __metadata: languageName: node linkType: hard +"fake-merkle-patricia-tree@npm:^1.0.1": + version: 1.0.1 + resolution: "fake-merkle-patricia-tree@npm:1.0.1" + dependencies: + checkpoint-store: "npm:^1.1.0" + checksum: 10/db445809b41a3b99db604cfd943a894a1a10d6e0fe50d4192331fc9b411ef88f544c33c40cdbf5b04d57633799d13eaf2a690c501b026863539acb941880321c + languageName: node + linkType: hard + "fast-check@npm:3.1.1": version: 3.1.1 resolution: "fast-check@npm:3.1.1" @@ -29535,7 +30496,7 @@ __metadata: languageName: node linkType: hard -"figures@npm:^2.0.0": +"figures@npm:2.0.0, figures@npm:^2.0.0": version: 2.0.0 resolution: "figures@npm:2.0.0" dependencies: @@ -29544,6 +30505,16 @@ __metadata: languageName: node linkType: hard +"figures@npm:^1.3.5": + version: 1.7.0 + resolution: "figures@npm:1.7.0" + dependencies: + escape-string-regexp: "npm:^1.0.5" + object-assign: "npm:^4.1.0" + checksum: 10/3a815f8a3b488f818e661694112b4546ddff799aa6a07c864c46dadff923af74021f84d42ded402432a98c3208acebf2d096f3a7cc3d1a7b19a2cdc9cbcaea2e + languageName: node + linkType: hard + "figures@npm:^3.0.0, figures@npm:^3.2.0": version: 3.2.0 resolution: "figures@npm:3.2.0" @@ -29730,6 +30701,17 @@ __metadata: languageName: node linkType: hard +"find-cache-dir@npm:^2.0.0": + version: 2.1.0 + resolution: "find-cache-dir@npm:2.1.0" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^2.0.0" + pkg-dir: "npm:^3.0.0" + checksum: 10/60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 + languageName: node + linkType: hard + "find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1": version: 3.3.2 resolution: "find-cache-dir@npm:3.3.2" @@ -29762,7 +30744,7 @@ __metadata: languageName: node linkType: hard -"find-root@npm:^1.1.0": +"find-root@npm:^1.0.0, find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" checksum: 10/caa799c976a14925ba7f31ca1a226fe73d3aa270f4f1b623fcfeb1c6e263111db4beb807d8acd31bd4d48d44c343b93688a9288dfbccca27463c36a0301b0bb9 @@ -29796,7 +30778,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^2.1.0": +"find-up@npm:^2.0.0, find-up@npm:^2.1.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" dependencies: @@ -29915,6 +30897,13 @@ __metadata: languageName: node linkType: hard +"flow-stoplight@npm:^1.0.0": + version: 1.0.0 + resolution: "flow-stoplight@npm:1.0.0" + checksum: 10/e5bfbbb7274f444a926392243eb286292d0da1c8af3ca21d9f2e71a00631b8c0e29b5aba9cc9039c2d2ffc8b80714bb8f48ed6c93b01ca856304b38224e44192 + languageName: node + linkType: hard + "fmt-subs@npm:^1.1.1": version: 1.1.1 resolution: "fmt-subs@npm:1.1.1" @@ -30445,7 +31434,7 @@ __metadata: languageName: node linkType: hard -"functional-red-black-tree@npm:^1.0.1": +"functional-red-black-tree@npm:^1.0.1, functional-red-black-tree@npm:~1.0.1": version: 1.0.1 resolution: "functional-red-black-tree@npm:1.0.1" checksum: 10/debe73e92204341d1fa5f89614e44284d3add26dee660722978d8c50829170f87d1c74768f68c251d215ae461c11db7bac13101c77f4146ff051da75466f7a12 @@ -30876,6 +31865,15 @@ __metadata: languageName: node linkType: hard +"gherkin@npm:^5.0.0": + version: 5.1.0 + resolution: "gherkin@npm:5.1.0" + bin: + gherkin-javascript: bin/gherkin + checksum: 10/e2f74b7f0e36c1a4e38cb670439b078c41d4268f988c487f4a51acc85ea566c433f4c9426527a9d5c8dd0a7258593557597fd778b961d8025548b7452c55881a + languageName: node + linkType: hard + "git-hooks-list@npm:1.0.3": version: 1.0.3 resolution: "git-hooks-list@npm:1.0.3" @@ -31049,7 +32047,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.2, glob@npm:^7.2.3": +"glob@npm:^7.0.3, glob@npm:^7.1.2, glob@npm:^7.2.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -31199,6 +32197,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^9.14.0": + version: 9.18.0 + resolution: "globals@npm:9.18.0" + checksum: 10/492600be44eb7ae107d37fa8536fb98f36a6f051c1420cd912a6de307758d502b9930a8f7beda0e74a98a5613aae464c828bb81418fc335c9ff4707ba9fd9070 + languageName: node + linkType: hard + "globalthis@npm:^1.0.2, globalthis@npm:^1.0.3": version: 1.0.3 resolution: "globalthis@npm:1.0.3" @@ -32005,6 +33010,13 @@ __metadata: languageName: node linkType: hard +"has@npm:^1.0.1": + version: 1.0.4 + resolution: "has@npm:1.0.4" + checksum: 10/c245f332fe78c7b6b8753857240ac12b3286f995f656a33c77e0f5baab7d0157e6ddb1c34940ffd2bffc51f75ede50cd8b29ff65c13e336376aca8cf3df58043 + languageName: node + linkType: hard + "has@npm:^1.0.3": version: 1.0.3 resolution: "has@npm:1.0.3" @@ -32083,6 +33095,15 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + "hdr-histogram-js@npm:^2.0.1": version: 2.0.3 resolution: "hdr-histogram-js@npm:2.0.3" @@ -32682,7 +33703,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^3.3.3": +"ignore@npm:^3.0.11, ignore@npm:^3.0.9, ignore@npm:^3.2.0, ignore@npm:^3.3.3": version: 3.3.10 resolution: "ignore@npm:3.3.10" checksum: 10/7cbe87d9ed0e6b710ed76f040733f4d1dbed7aa573b579949d6cc25572a72c69d546acda11c2d4bf202691ddda5db8078d32a50a6623eade424d81e6f1d32133 @@ -32719,6 +33740,13 @@ __metadata: languageName: node linkType: hard +"immediate@npm:~3.2.3": + version: 3.2.3 + resolution: "immediate@npm:3.2.3" + checksum: 10/fcc2223bdaeac9ba378543658c4c6420a61b6eef2e8447f4b274a2964721d1c707b37725768af20226c8ea66b5b9e7ca982e28c36fc4c2d1af318c1fd4a9e687 + languageName: node + linkType: hard + "immer@npm:^9.0.7": version: 9.0.21 resolution: "immer@npm:9.0.21" @@ -32776,6 +33804,13 @@ __metadata: languageName: node linkType: hard +"indent-string@npm:^3.1.0": + version: 3.2.0 + resolution: "indent-string@npm:3.2.0" + checksum: 10/a0b72603bba6c985d367fda3a25aad16423d2056b22a7e83ee2dd9ce0ce3d03d1e078644b679087aa7edf1cfb457f0d96d9eeadc0b12f38582088cc00e995d2f + languageName: node + linkType: hard + "indent-string@npm:^4.0.0": version: 4.0.0 resolution: "indent-string@npm:4.0.0" @@ -33003,6 +34038,27 @@ __metadata: languageName: node linkType: hard +"inquirer@npm:^0.12.0": + version: 0.12.0 + resolution: "inquirer@npm:0.12.0" + dependencies: + ansi-escapes: "npm:^1.1.0" + ansi-regex: "npm:^2.0.0" + chalk: "npm:^1.0.0" + cli-cursor: "npm:^1.0.1" + cli-width: "npm:^2.0.0" + figures: "npm:^1.3.5" + lodash: "npm:^4.3.0" + readline2: "npm:^1.0.1" + run-async: "npm:^0.1.0" + rx-lite: "npm:^3.1.2" + string-width: "npm:^1.0.1" + strip-ansi: "npm:^3.0.0" + through: "npm:^2.3.6" + checksum: 10/43a5e31fb28348627a1775eee1162966fe97fff39ec0114ef2e1ca09961e2bb3875d5bf8377469ccf01e341c9029214b950fa8581e6760a8ebec6b0f7423606f + languageName: node + linkType: hard + "inquirer@npm:^3.0.6": version: 3.3.0 resolution: "inquirer@npm:3.3.0" @@ -33558,6 +34614,15 @@ __metadata: languageName: node linkType: hard +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: "npm:^1.1.13" + checksum: 10/4ba4562ac2b2ec005fefe48269d6bd0152785458cd253c746154ffb8a8ab506a29d0cfb3b74af87513843776a88e4981ae25c89457bf640a33748eab1a7216b5 + languageName: node + linkType: hard + "is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" @@ -33706,6 +34771,13 @@ __metadata: languageName: node linkType: hard +"is-generator@npm:^1.0.2": + version: 1.0.3 + resolution: "is-generator@npm:1.0.3" + checksum: 10/416ab44184fcb75923fd07cdffd05cbfc27c13d75ab9d5df441180f9689def4ba4e430a249b1b39669c651e9ea697c107493391e8265ab78ffe22e5eafb34c6b + languageName: node + linkType: hard + "is-glob@npm:^2.0.0, is-glob@npm:^2.0.1": version: 2.0.1 resolution: "is-glob@npm:2.0.1" @@ -33794,7 +34866,7 @@ __metadata: languageName: node linkType: hard -"is-my-json-valid@npm:^2.20.6": +"is-my-json-valid@npm:^2.10.0, is-my-json-valid@npm:^2.20.6": version: 2.20.6 resolution: "is-my-json-valid@npm:2.20.6" dependencies: @@ -34422,7 +35494,7 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^2.0.1": +"istanbul-lib-coverage@npm:^2.0.1, istanbul-lib-coverage@npm:^2.0.5": version: 2.0.5 resolution: "istanbul-lib-coverage@npm:2.0.5" checksum: 10/57b7d67dd004977e9b3b1ab9584cea06d7359cb6fa85570880e35b3db8ed04bf60ffd3a4a0067c79d7105f8b0935334315e38b9bb47f4192b5c4727659c6a575 @@ -34445,6 +35517,15 @@ __metadata: languageName: node linkType: hard +"istanbul-lib-hook@npm:^2.0.1": + version: 2.0.7 + resolution: "istanbul-lib-hook@npm:2.0.7" + dependencies: + append-transform: "npm:^1.0.0" + checksum: 10/a6a8c3a8af08e1783079aaf32bdd4459fe118eb757068efcdae20e1d86ef982080cd7350f7420aabf970736fce6c3e800b77e83fcd173ddb8e60774c43a7bbb4 + languageName: node + linkType: hard + "istanbul-lib-hook@npm:^3.0.0": version: 3.0.0 resolution: "istanbul-lib-hook@npm:3.0.0" @@ -34469,6 +35550,21 @@ __metadata: languageName: node linkType: hard +"istanbul-lib-instrument@npm:^3.0.0": + version: 3.3.0 + resolution: "istanbul-lib-instrument@npm:3.3.0" + dependencies: + "@babel/generator": "npm:^7.4.0" + "@babel/parser": "npm:^7.4.3" + "@babel/template": "npm:^7.4.0" + "@babel/traverse": "npm:^7.4.3" + "@babel/types": "npm:^7.4.0" + istanbul-lib-coverage: "npm:^2.0.5" + semver: "npm:^6.0.0" + checksum: 10/6e5d7347ded2d50a0c86b15177ec35f3e6e5dc8ccb9b885dccd3640b5983b76c364ae04ff7b2e953dbd53fa2301d60c4b8061ddcb53d962beb3b425467fb7558 + languageName: node + linkType: hard + "istanbul-lib-instrument@npm:^4.0.0": version: 4.0.3 resolution: "istanbul-lib-instrument@npm:4.0.3" @@ -34535,6 +35631,17 @@ __metadata: languageName: node linkType: hard +"istanbul-lib-report@npm:^2.0.2": + version: 2.0.8 + resolution: "istanbul-lib-report@npm:2.0.8" + dependencies: + istanbul-lib-coverage: "npm:^2.0.5" + make-dir: "npm:^2.1.0" + supports-color: "npm:^6.1.0" + checksum: 10/acd9f662c56784c84faa117605e49955caa92fb8ccd3c15031390b2b801c909eb640ab51d3bb6befdca84290dda5039de2308dc2618c32ecdbe5e1ee8183de75 + languageName: node + linkType: hard + "istanbul-lib-report@npm:^3.0.0": version: 3.0.0 resolution: "istanbul-lib-report@npm:3.0.0" @@ -34559,6 +35666,19 @@ __metadata: languageName: node linkType: hard +"istanbul-lib-source-maps@npm:^2.0.1": + version: 2.0.1 + resolution: "istanbul-lib-source-maps@npm:2.0.1" + dependencies: + debug: "npm:^3.1.0" + istanbul-lib-coverage: "npm:^2.0.1" + make-dir: "npm:^1.3.0" + rimraf: "npm:^2.6.2" + source-map: "npm:^0.6.1" + checksum: 10/f53e0d7c24e9e454e08ecc02b3ec84f580b4dea92897827ae1873b057acd9580756d002063b035564141eadda673e1f6a33a38daa67018777c1c83742c33caad + languageName: node + linkType: hard + "istanbul-lib-source-maps@npm:^4.0.0": version: 4.0.1 resolution: "istanbul-lib-source-maps@npm:4.0.1" @@ -34579,6 +35699,15 @@ __metadata: languageName: node linkType: hard +"istanbul-reports@npm:^2.0.1": + version: 2.2.7 + resolution: "istanbul-reports@npm:2.2.7" + dependencies: + html-escaper: "npm:^2.0.0" + checksum: 10/10e6822d676511fc65a79d506e2267ecb52fe2623c5e628bb09b0df0225f2b6121046683329fbd5eee26988f43f8390771a29440afa1dd35c3ebc8f32894b24e + languageName: node + linkType: hard + "istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3": version: 3.1.4 resolution: "istanbul-reports@npm:3.1.4" @@ -35909,7 +37038,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.0, js-yaml@npm:^3.14.1, js-yaml@npm:^3.9.1": +"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1, js-yaml@npm:^3.14.0, js-yaml@npm:^3.14.1, js-yaml@npm:^3.5.1, js-yaml@npm:^3.9.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -36126,6 +37255,18 @@ __metadata: languageName: node linkType: hard +"json-stable-stringify@npm:^1.0.0": + version: 1.1.1 + resolution: "json-stable-stringify@npm:1.1.1" + dependencies: + call-bind: "npm:^1.0.5" + isarray: "npm:^2.0.5" + jsonify: "npm:^0.0.1" + object-keys: "npm:^1.1.1" + checksum: 10/60853c1f63451319b5c7953465a555aa816cf84e60e3ca36b6c05225d8fdc4615127fb4ecb92f9f5ad880c552ab8cbae9a519f78b995e7788d6d89e57afafdeb + languageName: node + linkType: hard + "json-stringify-nice@npm:^1.1.4": version: 1.1.4 resolution: "json-stringify-nice@npm:1.1.4" @@ -36301,6 +37442,13 @@ __metadata: languageName: node linkType: hard +"jsx-ast-utils@npm:^1.3.4": + version: 1.4.1 + resolution: "jsx-ast-utils@npm:1.4.1" + checksum: 10/7682d3165fef499aed99f0162cdca3801d3eb2939c1097f7d6db41d5bfc9131966689bd9ef05568955e500a57594a00b967dd9e5e16fb36459e83879c17d2de4 + languageName: node + linkType: hard + "jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" @@ -36584,6 +37732,54 @@ __metadata: languageName: node linkType: hard +"knex@npm:2.5.1": + version: 2.5.1 + resolution: "knex@npm:2.5.1" + dependencies: + colorette: "npm:2.0.19" + commander: "npm:^10.0.0" + debug: "npm:4.3.4" + escalade: "npm:^3.1.1" + esm: "npm:^3.2.25" + get-package-type: "npm:^0.1.0" + getopts: "npm:2.3.0" + interpret: "npm:^2.2.0" + lodash: "npm:^4.17.21" + pg-connection-string: "npm:2.6.1" + rechoir: "npm:^0.8.0" + resolve-from: "npm:^5.0.0" + tarn: "npm:^3.0.2" + tildify: "npm:2.0.0" + peerDependenciesMeta: + better-sqlite3: + optional: true + mysql: + optional: true + mysql2: + optional: true + pg: + optional: true + pg-native: + optional: true + sqlite3: + optional: true + tedious: + optional: true + bin: + knex: bin/cli.js + checksum: 10/7ab53dfdc382633d890355c15cb4d6e501560cdbc2b03c77f7fc098bdb55a85dfd37e5e8a7f5f38d351c82d5ab77e5e924376ec60e4a0f746901c387ce09b397 + languageName: node + linkType: hard + +"knuth-shuffle-seeded@npm:^1.0.6": + version: 1.0.6 + resolution: "knuth-shuffle-seeded@npm:1.0.6" + dependencies: + seed-random: "npm:~2.2.0" + checksum: 10/1bf533232cba7a9701791ef94df4e5afd4d561f8f94e54e83a598292746a3fa6f5bc7676e694718f1247addf80e43179eb46ad971508bb35dd7e3f47b523dc39 + languageName: node + linkType: hard + "kubo-rpc-client-esm-cjs@npm:3.0.1": version: 3.0.1 resolution: "kubo-rpc-client-esm-cjs@npm:3.0.1" @@ -36823,6 +38019,13 @@ __metadata: languageName: node linkType: hard +"level-codec@npm:~7.0.0": + version: 7.0.1 + resolution: "level-codec@npm:7.0.1" + checksum: 10/76a8a814cab0bdd45d10ee17f5a642c28996500de6684a08611925c4c342ace0587e028903afd35cc2991749c22196a735976743385f4a9dadd1273c97902420 + languageName: node + linkType: hard + "level-concat-iterator@npm:^3.0.0": version: 3.1.0 resolution: "level-concat-iterator@npm:3.1.0" @@ -36839,6 +38042,15 @@ __metadata: languageName: node linkType: hard +"level-errors@npm:^1.0.3": + version: 1.1.2 + resolution: "level-errors@npm:1.1.2" + dependencies: + errno: "npm:~0.1.1" + checksum: 10/18c22fd574ff31567642a85d9a306604a32cbe969b8469fee29620c10488214a6b5e6bbf19e3b5e2042859e4b81041af537319c18132a1aaa56d4ed5981157b7 + languageName: node + linkType: hard + "level-errors@npm:^2.0.0, level-errors@npm:~2.0.0": version: 2.0.1 resolution: "level-errors@npm:2.0.1" @@ -36848,6 +38060,15 @@ __metadata: languageName: node linkType: hard +"level-errors@npm:~1.0.3": + version: 1.0.5 + resolution: "level-errors@npm:1.0.5" + dependencies: + errno: "npm:~0.1.1" + checksum: 10/ae5d5c042c52975aa1543120fe5e1bf3d382c3f64aa9f036a616c6bf4b2de841eea4fc26107e96fe70ba34a21565e7902f9cafcf9ec699de0d98b02d53b42467 + languageName: node + linkType: hard + "level-filesystem@npm:^1.0.1": version: 1.2.0 resolution: "level-filesystem@npm:1.2.0" @@ -36890,6 +38111,29 @@ __metadata: languageName: node linkType: hard +"level-iterator-stream@npm:~1.3.0": + version: 1.3.1 + resolution: "level-iterator-stream@npm:1.3.1" + dependencies: + inherits: "npm:^2.0.1" + level-errors: "npm:^1.0.3" + readable-stream: "npm:^1.0.33" + xtend: "npm:^4.0.0" + checksum: 10/ed9a865cc02ff2edfbc231ab8bf911f4645c0571bfadc5c55a1893435a0c9990bbf8b0176c5f5838cf4117937c6b196e09d24a14da007c25c6c00c989e92fe72 + languageName: node + linkType: hard + +"level-iterator-stream@npm:~3.0.0": + version: 3.0.1 + resolution: "level-iterator-stream@npm:3.0.1" + dependencies: + inherits: "npm:^2.0.1" + readable-stream: "npm:^2.3.6" + xtend: "npm:^4.0.0" + checksum: 10/53ff9825fcdf44f73210d3d3979add8f2ba1a928ce6313928adc6258ae58107b112b43e4632f6fedf9e0455b6ccd24969338b633f63846c0d4a8fe516495e5f2 + languageName: node + linkType: hard + "level-iterator-stream@npm:~4.0.0": version: 4.0.2 resolution: "level-iterator-stream@npm:4.0.2" @@ -36927,6 +38171,16 @@ __metadata: languageName: node linkType: hard +"level-mem@npm:^3.0.1": + version: 3.0.1 + resolution: "level-mem@npm:3.0.1" + dependencies: + level-packager: "npm:~4.0.0" + memdown: "npm:~3.0.0" + checksum: 10/e4c680922afc3c8cd4502d761ab610c8aa7bcacde2550a0a463e1db069eeb55b6b7bec0bb7fda564cec82422944776f9909fe101b0d7746ad8f4f7446ec2a5cd + languageName: node + linkType: hard + "level-packager@npm:^5.1.0": version: 5.1.1 resolution: "level-packager@npm:5.1.1" @@ -36937,6 +38191,16 @@ __metadata: languageName: node linkType: hard +"level-packager@npm:~4.0.0": + version: 4.0.1 + resolution: "level-packager@npm:4.0.1" + dependencies: + encoding-down: "npm:~5.0.0" + levelup: "npm:^3.0.0" + checksum: 10/7521845db87475daaa001bf80748c6e1c53a3a14dd1d14daaffe168c02a0d559b88b86e565ff30fef5a00368ba47a16aea3b96588831423fdc6e0252155371b3 + languageName: node + linkType: hard + "level-peek@npm:1.0.6, level-peek@npm:^1.0.6": version: 1.0.6 resolution: "level-peek@npm:1.0.6" @@ -37000,6 +38264,16 @@ __metadata: languageName: node linkType: hard +"level-ws@npm:0.0.0": + version: 0.0.0 + resolution: "level-ws@npm:0.0.0" + dependencies: + readable-stream: "npm:~1.0.15" + xtend: "npm:~2.1.1" + checksum: 10/ee85b24c8fac8c48185af0dce6b87228c3ef941b2241793fe7201f7676a1588beb1cad5db1fbad75532628a28aaee50a4fbfd510c8da35faffc348a9fd05c272 + languageName: node + linkType: hard + "level@npm:6.0.1": version: 6.0.1 resolution: "level@npm:6.0.1" @@ -37073,6 +38347,33 @@ __metadata: languageName: node linkType: hard +"levelup@npm:^1.2.1": + version: 1.3.9 + resolution: "levelup@npm:1.3.9" + dependencies: + deferred-leveldown: "npm:~1.2.1" + level-codec: "npm:~7.0.0" + level-errors: "npm:~1.0.3" + level-iterator-stream: "npm:~1.3.0" + prr: "npm:~1.0.1" + semver: "npm:~5.4.1" + xtend: "npm:~4.0.0" + checksum: 10/2d7ce905a08b8073f3d012d66fdf7582111cc699da64772f0ebbb0dc225566674ef528d7167f6a7be9a0686a883623f638a9583c7b1a3e8cdcea40018666f2ca + languageName: node + linkType: hard + +"levelup@npm:^3.0.0": + version: 3.1.1 + resolution: "levelup@npm:3.1.1" + dependencies: + deferred-leveldown: "npm:~4.0.0" + level-errors: "npm:~2.0.0" + level-iterator-stream: "npm:~3.0.0" + xtend: "npm:~4.0.0" + checksum: 10/df3ecd82b21261c21a6e07bd780f7fc212d0988e02c0a3801e4f49fcfb6f4f277ed803c839bc8334cf21316835d43bcc33839c7d660da7d60e0728996bf78698 + languageName: node + linkType: hard + "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -37423,6 +38724,13 @@ __metadata: languageName: node linkType: hard +"lodash.cond@npm:^4.3.0": + version: 4.5.2 + resolution: "lodash.cond@npm:4.5.2" + checksum: 10/3c4b129baee08e97413dfed1d00d4ea72bb33d6193ad7158c10a0685433012ab4e8a938c41252c26392b8ee8871523974886ed1c58a17fe456c057f8b9cf7c02 + languageName: node + linkType: hard + "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -37730,6 +39038,20 @@ __metadata: languageName: node linkType: hard +"logform@npm:^2.6.0, logform@npm:^2.6.1": + version: 2.6.1 + resolution: "logform@npm:2.6.1" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/e67f414787fbfe1e6a997f4c84300c7e06bee3d0bd579778af667e24b36db3ea200ed195d41b61311ff738dab7faabc615a07b174b22fe69e0b2f39e985be64b + languageName: node + linkType: hard + "loglevel-plugin-prefix@npm:0.8.4": version: 0.8.4 resolution: "loglevel-plugin-prefix@npm:0.8.4" @@ -38023,7 +39345,7 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:^1.0.0": +"make-dir@npm:^1.0.0, make-dir@npm:^1.3.0": version: 1.3.0 resolution: "make-dir@npm:1.3.0" dependencies: @@ -38032,7 +39354,7 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:^2.1.0": +"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": version: 2.1.0 resolution: "make-dir@npm:2.1.0" dependencies: @@ -38287,6 +39609,15 @@ __metadata: languageName: node linkType: hard +"md5-hex@npm:^2.0.0": + version: 2.0.0 + resolution: "md5-hex@npm:2.0.0" + dependencies: + md5-o-matic: "npm:^0.1.1" + checksum: 10/2d4ab121347ab66dfdfc7f38c6c29f24c4c0c0f9faf036216b1b9f717a8495465d09bca32b86b9e96c12516e85e881fef75533a3ade554eef8de3f57d25db7df + languageName: node + linkType: hard + "md5-o-matic@npm:^0.1.1": version: 0.1.1 resolution: "md5-o-matic@npm:0.1.1" @@ -38360,7 +39691,7 @@ __metadata: languageName: node linkType: hard -"memdown@npm:1.4.1": +"memdown@npm:1.4.1, memdown@npm:^1.0.0": version: 1.4.1 resolution: "memdown@npm:1.4.1" dependencies: @@ -38374,6 +39705,20 @@ __metadata: languageName: node linkType: hard +"memdown@npm:~3.0.0": + version: 3.0.0 + resolution: "memdown@npm:3.0.0" + dependencies: + abstract-leveldown: "npm:~5.0.0" + functional-red-black-tree: "npm:~1.0.1" + immediate: "npm:~3.2.3" + inherits: "npm:~2.0.1" + ltgt: "npm:~2.2.0" + safe-buffer: "npm:~5.1.1" + checksum: 10/c3b9d58f32ae8694b1a2daa4c3a7aafd08ac986df9a6de56b9630920d69955b8b1df4c54ca2021d2e0c80153b53142cab469b39e311eb36dab9436798414e640 + languageName: node + linkType: hard + "memfs@npm:^3.1.2": version: 3.5.3 resolution: "memfs@npm:3.5.3" @@ -38525,6 +39870,29 @@ __metadata: languageName: node linkType: hard +"merge@npm:^1.2.0": + version: 1.2.1 + resolution: "merge@npm:1.2.1" + checksum: 10/2298c4fdcf64561f320b92338681f7ffcafafb579a6e294066ae3e7bd10ae25df363903d2f028072733b9f79a1f75d2b999aef98ad5d73de13641da39cda0913 + languageName: node + linkType: hard + +"merkle-patricia-tree@npm:^2.1.2, merkle-patricia-tree@npm:^2.3.2": + version: 2.3.2 + resolution: "merkle-patricia-tree@npm:2.3.2" + dependencies: + async: "npm:^1.4.2" + ethereumjs-util: "npm:^5.0.0" + level-ws: "npm:0.0.0" + levelup: "npm:^1.2.1" + memdown: "npm:^1.0.0" + readable-stream: "npm:^2.0.0" + rlp: "npm:^2.0.0" + semaphore: "npm:>=1.0.1" + checksum: 10/4188bd5b163719bd9c5da45ba356fac753a0f0ac0b9990923b5f064852e083334abd5e4d838dcd35ee50d884dad5c52adbd103387c89d20be3ec47b51784946a + languageName: node + linkType: hard + "merkletreejs@npm:0.3.11": version: 0.3.11 resolution: "merkletreejs@npm:0.3.11" @@ -38812,7 +40180,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.2, minimatch@npm:^3.0.3, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -39449,6 +40817,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:0.0.5": + version: 0.0.5 + resolution: "mute-stream@npm:0.0.5" + checksum: 10/a2a3b25fa0e6adf3516f51b1d8bd0cc48e256fc9384c3c5bd3a5c3635e0823d6dee4c28909a3f2a9d8782d7d8daa3a8c081163d881e4d7f30ff17e7d2eabde76 + languageName: node + linkType: hard + "mute-stream@npm:0.0.7": version: 0.0.7 resolution: "mute-stream@npm:0.0.7" @@ -39470,7 +40845,7 @@ __metadata: languageName: node linkType: hard -"mz@npm:^2.7.0": +"mz@npm:^2.4.0, mz@npm:^2.7.0": version: 2.7.0 resolution: "mz@npm:2.7.0" dependencies: @@ -40793,6 +42168,41 @@ __metadata: languageName: node linkType: hard +"nyc@npm:13.1.0": + version: 13.1.0 + resolution: "nyc@npm:13.1.0" + dependencies: + archy: "npm:^1.0.0" + arrify: "npm:^1.0.1" + caching-transform: "npm:^2.0.0" + convert-source-map: "npm:^1.6.0" + debug-log: "npm:^1.0.1" + find-cache-dir: "npm:^2.0.0" + find-up: "npm:^3.0.0" + foreground-child: "npm:^1.5.6" + glob: "npm:^7.1.3" + istanbul-lib-coverage: "npm:^2.0.1" + istanbul-lib-hook: "npm:^2.0.1" + istanbul-lib-instrument: "npm:^3.0.0" + istanbul-lib-report: "npm:^2.0.2" + istanbul-lib-source-maps: "npm:^2.0.1" + istanbul-reports: "npm:^2.0.1" + make-dir: "npm:^1.3.0" + merge-source-map: "npm:^1.1.0" + resolve-from: "npm:^4.0.0" + rimraf: "npm:^2.6.2" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^1.4.2" + test-exclude: "npm:^5.0.0" + uuid: "npm:^3.3.2" + yargs: "npm:11.1.0" + yargs-parser: "npm:^9.0.2" + bin: + nyc: ./bin/nyc.js + checksum: 10/30e4247e5d2fae022d327eb55286d9f60f14334664be93ef222f786a527a7bd25160efe70bf218539f6e694e34fb98f58272730fd1be01d12c050092dd3742a3 + languageName: node + linkType: hard + "nyc@npm:^15.1.0": version: 15.1.0 resolution: "nyc@npm:15.1.0" @@ -40941,6 +42351,18 @@ __metadata: languageName: node linkType: hard +"object.assign@npm:^4.0.4, object.assign@npm:^4.1.5": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" + dependencies: + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + has-symbols: "npm:^1.0.3" + object-keys: "npm:^1.1.1" + checksum: 10/dbb22da4cda82e1658349ea62b80815f587b47131b3dd7a4ab7f84190ab31d206bbd8fe7e26ae3220c55b65725ac4529825f6142154211220302aa6b1518045d + languageName: node + linkType: hard + "object.assign@npm:^4.1.2": version: 4.1.2 resolution: "object.assign@npm:4.1.2" @@ -40965,18 +42387,6 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.5": - version: 4.1.5 - resolution: "object.assign@npm:4.1.5" - dependencies: - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10/dbb22da4cda82e1658349ea62b80815f587b47131b3dd7a4ab7f84190ab31d206bbd8fe7e26ae3220c55b65725ac4529825f6142154211220302aa6b1518045d - languageName: node - linkType: hard - "object.entries@npm:^1.1.6": version: 1.1.7 resolution: "object.entries@npm:1.1.7" @@ -41023,6 +42433,21 @@ __metadata: languageName: node linkType: hard +"object.getownpropertydescriptors@npm:^2.1.6": + version: 2.1.8 + resolution: "object.getownpropertydescriptors@npm:2.1.8" + dependencies: + array.prototype.reduce: "npm:^1.0.6" + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + gopd: "npm:^1.0.1" + safe-array-concat: "npm:^1.1.2" + checksum: 10/8c50f52e0d702d30836f3d2772ba02807ca25a5381be6f9470c6d143ee0bad01bce3fff0fedea2bdbc0c9297e4eb7785ffee5739f6a3a7c60fcd622b42f8a9fb + languageName: node + linkType: hard + "object.groupby@npm:^1.0.0": version: 1.0.0 resolution: "object.groupby@npm:1.0.0" @@ -41179,6 +42604,13 @@ __metadata: languageName: node linkType: hard +"onetime@npm:^1.0.0": + version: 1.1.0 + resolution: "onetime@npm:1.1.0" + checksum: 10/751f45ddeba213600c215280cb937efd7b530b498277c9605f9ee0e5e2022b3463e23fd6d1800e793e128301adee12ed4aba41242e50fbc0d631a9e171aef361 + languageName: node + linkType: hard + "onetime@npm:^2.0.0": version: 2.0.1 resolution: "onetime@npm:2.0.1" @@ -41334,7 +42766,7 @@ __metadata: languageName: node linkType: hard -"os-homedir@npm:^1.0.1": +"os-homedir@npm:^1.0.0, os-homedir@npm:^1.0.1": version: 1.0.2 resolution: "os-homedir@npm:1.0.2" checksum: 10/af609f5a7ab72de2f6ca9be6d6b91a599777afc122ac5cad47e126c1f67c176fe9b52516b9eeca1ff6ca0ab8587fe66208bc85e40a3940125f03cdb91408e9d2 @@ -41711,6 +43143,18 @@ __metadata: languageName: node linkType: hard +"package-hash@npm:^2.0.0": + version: 2.0.0 + resolution: "package-hash@npm:2.0.0" + dependencies: + graceful-fs: "npm:^4.1.11" + lodash.flattendeep: "npm:^4.4.0" + md5-hex: "npm:^2.0.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/21c2e6be90d14fffdb960110df20f2942bf8e37157fd9071de1f4e3ae3d41cc3bbf153bed2a053d61d8ef73d0ec9c40805c44804c8063c8f7c1ebd8632085dae + languageName: node + linkType: hard + "package-hash@npm:^4.0.0": version: 4.0.0 resolution: "package-hash@npm:4.0.0" @@ -41832,6 +43276,15 @@ __metadata: languageName: node linkType: hard +"pad-right@npm:^0.2.2": + version: 0.2.2 + resolution: "pad-right@npm:0.2.2" + dependencies: + repeat-string: "npm:^1.5.2" + checksum: 10/090fe065f979e04b251e4b33706caf5817c973f1106e445ffaee3a742e1495b0892db858ee25383f97dd048262ba969559d43f31beb385d780c9a0a24f3063d0 + languageName: node + linkType: hard + "pako@npm:^1.0.3, pako@npm:~1.0.5": version: 1.0.11 resolution: "pako@npm:1.0.11" @@ -42195,7 +43648,7 @@ __metadata: languageName: node linkType: hard -"path-is-inside@npm:^1.0.2": +"path-is-inside@npm:^1.0.1, path-is-inside@npm:^1.0.2": version: 1.0.2 resolution: "path-is-inside@npm:1.0.2" checksum: 10/0b5b6c92d3018b82afb1f74fe6de6338c4c654de4a96123cb343f2b747d5606590ac0c890f956ed38220a4ab59baddfd7b713d78a62d240b20b14ab801fa02cb @@ -42372,6 +43825,13 @@ __metadata: languageName: node linkType: hard +"pg-connection-string@npm:2.6.1": + version: 2.6.1 + resolution: "pg-connection-string@npm:2.6.1" + checksum: 10/882344a47e1ecf3a91383e0809bf2ac48facea97fcec0358d6e060e1cbcb8737acde419b4c86f05da4ce4a16634ee50fff1d2bb787d73b52ccbfde697243ad8a + languageName: node + linkType: hard + "pg-int8@npm:1.0.1": version: 1.0.1 resolution: "pg-int8@npm:1.0.1" @@ -42626,6 +44086,27 @@ __metadata: languageName: node linkType: hard +"pkg-conf@npm:^2.0.0, pkg-conf@npm:^2.1.0": + version: 2.1.0 + resolution: "pkg-conf@npm:2.1.0" + dependencies: + find-up: "npm:^2.0.0" + load-json-file: "npm:^4.0.0" + checksum: 10/b50775157262abd1bfb4d3d948f3fc6c009d10266c6507d4de296af4e2cbb6d2738310784432185886d83144466fbb286b6e8ff0bc23dc5ee7d81810dc6c4788 + languageName: node + linkType: hard + +"pkg-config@npm:^1.1.0": + version: 1.1.1 + resolution: "pkg-config@npm:1.1.1" + dependencies: + debug-log: "npm:^1.0.0" + find-root: "npm:^1.0.0" + xtend: "npm:^4.0.1" + checksum: 10/951d904f0ba050e4e71b5143a518615f12b91416f11c68a00a2c5e2ddb56d9abbb7e66cbf7d182f7c424c0741e73f3f60790c0fd6723bc6449ab82c18fecee28 + languageName: node + linkType: hard + "pkg-dir@npm:^1.0.0": version: 1.0.0 resolution: "pkg-dir@npm:1.0.0" @@ -42635,6 +44116,15 @@ __metadata: languageName: node linkType: hard +"pkg-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "pkg-dir@npm:3.0.0" + dependencies: + find-up: "npm:^3.0.0" + checksum: 10/70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 + languageName: node + linkType: hard + "pkg-dir@npm:^4.1.0, pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" @@ -42671,6 +44161,15 @@ __metadata: languageName: node linkType: hard +"pkg-up@npm:^1.0.0": + version: 1.0.0 + resolution: "pkg-up@npm:1.0.0" + dependencies: + find-up: "npm:^1.0.0" + checksum: 10/cffd99b39385147a42a4c7822326777be05be1fbbc3d6e20aa5d82a2d8e9a78de28488b0edb8331329ee27f0ad08aa3a5793566983701df2e5edc430654d617f + languageName: node + linkType: hard + "pkg-up@npm:^3.1.0": version: 3.1.0 resolution: "pkg-up@npm:3.1.0" @@ -42725,6 +44224,13 @@ __metadata: languageName: node linkType: hard +"pluralize@npm:^1.2.1": + version: 1.2.1 + resolution: "pluralize@npm:1.2.1" + checksum: 10/b6d1e873ac7fa0e1c3edd92ed650f53940a1d8e923ba4890899a2bd1495df4183a2408969945ce404293a181f706fd0ff4c1ec75fe13442de0d5ffc6ba5d4cd7 + languageName: node + linkType: hard + "pluralize@npm:^7.0.0": version: 7.0.0 resolution: "pluralize@npm:7.0.0" @@ -44160,6 +45666,13 @@ __metadata: languageName: node linkType: hard +"progress@npm:^1.1.8": + version: 1.1.8 + resolution: "progress@npm:1.1.8" + checksum: 10/873189b8ac74a0dcd23f3287646e8af360b71f6c40fbab572f7898093a6212c37c34cefcb20bfd583dc4f6c44ff98b1b8bce4dcaf67214175e99c0ba6d698839 + languageName: node + linkType: hard + "progress@npm:^2.0.0, progress@npm:^2.0.3": version: 2.0.3 resolution: "progress@npm:2.0.3" @@ -45057,6 +46570,16 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^4.0.0": + version: 4.0.0 + resolution: "read-pkg-up@npm:4.0.0" + dependencies: + find-up: "npm:^3.0.0" + read-pkg: "npm:^3.0.0" + checksum: 10/dd867d9a912707bc11340aebc91780be9f36f34ee1d27a5dafb8520e0cb6344138b80eb8bf8325bebf519d26ecf14cbf6190d9e5f765f0120da5ede4013f4d13 + languageName: node + linkType: hard + "read-pkg-up@npm:^7.0.1": version: 7.0.1 resolution: "read-pkg-up@npm:7.0.1" @@ -45150,7 +46673,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4": +"readable-stream@npm:1.1.14, readable-stream@npm:^1.0.26-4, readable-stream@npm:^1.0.33": version: 1.1.14 resolution: "readable-stream@npm:1.1.14" dependencies: @@ -45162,7 +46685,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:2 || 3": +"readable-stream@npm:2 || 3, readable-stream@npm:^3.6.2": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -45184,7 +46707,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.1.4, readable-stream@npm:^2.3.8": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.1.4, readable-stream@npm:^2.3.6, readable-stream@npm:^2.3.8": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -45234,7 +46757,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:~1.0.26, readable-stream@npm:~1.0.26-4": +"readable-stream@npm:~1.0.15, readable-stream@npm:~1.0.26, readable-stream@npm:~1.0.26-4": version: 1.0.34 resolution: "readable-stream@npm:1.0.34" dependencies: @@ -45255,6 +46778,17 @@ __metadata: languageName: node linkType: hard +"readline2@npm:^1.0.1": + version: 1.0.1 + resolution: "readline2@npm:1.0.1" + dependencies: + code-point-at: "npm:^1.0.0" + is-fullwidth-code-point: "npm:^1.0.0" + mute-stream: "npm:0.0.5" + checksum: 10/7ac8ffa917af89f042bb24f695b1333158d83e26f398108f6d4ce7ca3ab6bccb6fa32623d9254ea1dc5420db7e6ce0b0fc527108645ababf6e280d8db3fe8a89 + languageName: node + linkType: hard + "real-require@npm:^0.2.0": version: 0.2.0 resolution: "real-require@npm:0.2.0" @@ -45440,6 +46974,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.11.0": + version: 0.11.1 + resolution: "regenerator-runtime@npm:0.11.1" + checksum: 10/64e62d78594c227e7d5269811bca9e4aa6451332adaae8c79a30cab0fa98733b1ad90bdb9d038095c340c6fad3b414a49a8d9e0b6b424ab7ff8f94f35704f8a2 + languageName: node + linkType: hard + "regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.4, regenerator-runtime@npm:^0.13.9": version: 0.13.11 resolution: "regenerator-runtime@npm:0.13.11" @@ -45628,6 +47169,83 @@ __metadata: languageName: node linkType: hard +"remix-lib@npm:0.4.30": + version: 0.4.30 + resolution: "remix-lib@npm:0.4.30" + dependencies: + async: "npm:^2.1.2" + ethereumjs-block: "npm:^2.2.2" + ethereumjs-tx: "npm:^2.1.2" + ethereumjs-util: "npm:^6.2.0" + ethereumjs-vm: "npm:4.1.3" + ethers: "npm:^4.0.40" + events: "npm:^3.0.0" + solc: "npm:^0.6.0" + web3: "npm:^1.2.4" + checksum: 10/b78a309af142febe6a6cdd124d32a07d59e80ba786d5c42e7a898b304241fcfa5fe9ed67d3db40af43fa631bf68212845fbc2785612e0cc3800edeae2a7d04fc + languageName: node + linkType: hard + +"remix-simulator@npm:0.1.9-beta.6": + version: 0.1.9-beta.6 + resolution: "remix-simulator@npm:0.1.9-beta.6" + dependencies: + ansi-gray: "npm:^0.1.1" + async: "npm:^3.1.0" + body-parser: "npm:^1.18.2" + color-support: "npm:^1.1.3" + commander: "npm:^2.19.0" + cors: "npm:^2.8.5" + ethereumjs-block: "npm:^2.2.2" + ethereumjs-util: "npm:^6.2.0" + express: "npm:^4.16.3" + express-ws: "npm:^4.0.0" + merge: "npm:^1.2.0" + remix-lib: "npm:0.4.30" + standard: "npm:^10.0.3" + time-stamp: "npm:^2.0.0" + web3: "npm:^1.2.4" + bin: + ethsim: ./bin/ethsim + remix-simulator: ./bin/ethsim + checksum: 10/1cc8920fd91f018a999ee4cd4563299f29f35d84e38e2912edfedc4e73637524a639632c1624d027747a834feba70d188fc2512a6dec82a0161bc419e08c35ba + languageName: node + linkType: hard + +"remix-solidity@npm:0.3.31": + version: 0.3.31 + resolution: "remix-solidity@npm:0.3.31" + dependencies: + eslint-scope: "npm:^5.0.0" + remix-lib: "npm:0.4.30" + solc: "npm:^0.6.0" + webworkify: "npm:^1.2.1" + checksum: 10/1f52865c2693c7da281e0e77a129e9a87ba47237a4f09989dd6ed26d55bc20fbdcf156aaaaafd44cefebcf82ed1f87ea70b3585a4a026ce6611b35c65b6bf8db + languageName: node + linkType: hard + +"remix-tests@npm:0.1.34": + version: 0.1.34 + resolution: "remix-tests@npm:0.1.34" + dependencies: + async: "npm:^2.6.0" + change-case: "npm:^3.0.1" + colors: "npm:^1.1.2" + commander: "npm:^2.13.0" + remix-lib: "npm:0.4.30" + remix-simulator: "npm:0.1.9-beta.6" + remix-solidity: "npm:0.3.31" + signale: "npm:^1.4.0" + web3: "npm:^1.2.4" + winston: "npm:^3.0.0" + peerDependencies: + yo-yoify: ^4.3.0 + bin: + remix-tests: ./bin/remix-tests + checksum: 10/aaa5af910b650d7ec4a6b7bd347137abfcc0989c1562f1e9dc6c2c927d07fd0e51a69af7c16c4cd4d8dbb6cba531bd82bf5d8014234b7e6d57a3b60933e4b5b8 + languageName: node + linkType: hard + "remove-trailing-separator@npm:^1.0.1": version: 1.1.0 resolution: "remove-trailing-separator@npm:1.1.0" @@ -45648,7 +47266,7 @@ __metadata: languageName: node linkType: hard -"repeat-string@npm:^1.6.1": +"repeat-string@npm:^1.5.2, repeat-string@npm:^1.6.1": version: 1.6.1 resolution: "repeat-string@npm:1.6.1" checksum: 10/1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 @@ -45815,7 +47433,7 @@ __metadata: languageName: node linkType: hard -"require-uncached@npm:^1.0.3": +"require-uncached@npm:^1.0.2, require-uncached@npm:^1.0.3": version: 1.0.3 resolution: "require-uncached@npm:1.0.3" dependencies: @@ -46031,7 +47649,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.22.8, resolve@npm:^1.19.0, resolve@npm:^1.22.0, resolve@npm:^1.22.2, resolve@npm:^1.22.3": +"resolve@npm:1.22.8, resolve@npm:^1.19.0, resolve@npm:^1.22.0, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.3.3": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -46105,7 +47723,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin": +"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.3.3#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -46184,6 +47802,16 @@ __metadata: languageName: node linkType: hard +"restore-cursor@npm:^1.0.1": + version: 1.0.1 + resolution: "restore-cursor@npm:1.0.1" + dependencies: + exit-hook: "npm:^1.0.0" + onetime: "npm:^1.0.0" + checksum: 10/e40bd1a540d69970341fc734dfada908815a44f91903211f34d32c47da33f6e7824bbc97f6e76aff387137d6b2a1ada3d3d2dc1b654b8accdc8ed5721c46cbfa + languageName: node + linkType: hard + "restore-cursor@npm:^2.0.0": version: 2.0.0 resolution: "restore-cursor@npm:2.0.0" @@ -46334,7 +47962,7 @@ __metadata: languageName: node linkType: hard -"rlp@npm:2.2.7, rlp@npm:^2.2.3, rlp@npm:^2.2.4": +"rlp@npm:2.2.7, rlp@npm:^2.0.0, rlp@npm:^2.2.1, rlp@npm:^2.2.2, rlp@npm:^2.2.3, rlp@npm:^2.2.4": version: 2.2.7 resolution: "rlp@npm:2.2.7" dependencies: @@ -46450,6 +48078,15 @@ __metadata: languageName: node linkType: hard +"run-async@npm:^0.1.0": + version: 0.1.0 + resolution: "run-async@npm:0.1.0" + dependencies: + once: "npm:^1.3.0" + checksum: 10/66fd3ada4036a77a70fbf5063d66bf88df77fa9cbf20516115a6a09431ba66621f353e6fefecd10f9cb6a3345b5fe007a438dbf3f6020fbfd5732634cd4d3e15 + languageName: node + linkType: hard + "run-async@npm:^2.2.0, run-async@npm:^2.4.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -46473,7 +48110,7 @@ __metadata: languageName: node linkType: hard -"run-parallel@npm:^1.1.9": +"run-parallel@npm:^1.1.2, run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" dependencies: @@ -46519,6 +48156,13 @@ __metadata: languageName: node linkType: hard +"rx-lite@npm:^3.1.2": + version: 3.1.2 + resolution: "rx-lite@npm:3.1.2" + checksum: 10/e11d3b1a044e0fe5af82b923dee68aa83b193bf3ad8128cf70e033cbc414f175011a644419c25fe62f75a6f20a1f2aee3b407847dae129fa8df1198b618fb1b2 + languageName: node + linkType: hard + "rxjs@npm:7.8.0": version: 7.8.0 resolution: "rxjs@npm:7.8.0" @@ -46582,6 +48226,18 @@ __metadata: languageName: node linkType: hard +"safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" + dependencies: + call-bind: "npm:^1.0.7" + get-intrinsic: "npm:^1.2.4" + has-symbols: "npm:^1.0.3" + isarray: "npm:^2.0.5" + checksum: 10/a54f8040d7cb696a1ee38d19cc71ab3cfb654b9b81bae00c6459618cfad8214ece7e6666592f9c925aafef43d0a20c5e6fbb3413a2b618e1ce9d516a2e6dcfc5 + languageName: node + linkType: hard + "safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": version: 5.1.2 resolution: "safe-buffer@npm:5.1.2" @@ -46972,6 +48628,13 @@ __metadata: languageName: node linkType: hard +"seed-random@npm:~2.2.0": + version: 2.2.0 + resolution: "seed-random@npm:2.2.0" + checksum: 10/af4da53206a7fa4b76f4f1bbd1713b10f2e7e4f25a22d1f9247f0e4b5ac86eb8f018338f5fd7f0fe822905f12987aa1d6f4eebf596c5c20afa4a01b0327db624 + languageName: node + linkType: hard + "seek-bzip@npm:^1.0.5": version: 1.0.6 resolution: "seek-bzip@npm:1.0.6" @@ -47000,6 +48663,13 @@ __metadata: languageName: node linkType: hard +"semaphore@npm:>=1.0.1, semaphore@npm:^1.1.0": + version: 1.1.0 + resolution: "semaphore@npm:1.1.0" + checksum: 10/7a62e0486ab2e361aecf5d88ecb99f42236bb9fbe29e432644d8af371e78c559dc3f2fbef0f57f716491071c214bdf1a15f1f398445b20423278750e2290ea37 + languageName: node + linkType: hard + "semver-compare@npm:^1.0.0": version: 1.0.0 resolution: "semver-compare@npm:1.0.0" @@ -47097,6 +48767,13 @@ __metadata: languageName: node linkType: hard +"serialize-error@npm:^2.1.0": + version: 2.1.0 + resolution: "serialize-error@npm:2.1.0" + checksum: 10/28464a6f65e6becd6e49fb782aff06573fdbf3d19f161a20228179842fed05c75a34110e54c3ee020b00240f9e11d8bee9b9fee5d04e0bc0bef1fdbf2baa297e + languageName: node + linkType: hard + "serialize-error@npm:^8.0.1": version: 8.1.0 resolution: "serialize-error@npm:8.1.0" @@ -47395,6 +49072,19 @@ __metadata: languageName: node linkType: hard +"shelljs@npm:^0.7.5": + version: 0.7.8 + resolution: "shelljs@npm:0.7.8" + dependencies: + glob: "npm:^7.0.0" + interpret: "npm:^1.0.0" + rechoir: "npm:^0.6.2" + bin: + shjs: ./bin/shjs + checksum: 10/c30b6a204167fcb54d2019a83be1e0f7b03346883d0454cd588911ea88843dbf1383ceb6e745fdea2da4b343644b57d373bc3802aaf74d53765adca8adc89b3a + languageName: node + linkType: hard + "shiki@npm:^1.9.0": version: 1.9.0 resolution: "shiki@npm:1.9.0" @@ -47441,6 +49131,17 @@ __metadata: languageName: node linkType: hard +"signale@npm:^1.4.0": + version: 1.4.0 + resolution: "signale@npm:1.4.0" + dependencies: + chalk: "npm:^2.3.2" + figures: "npm:^2.0.0" + pkg-conf: "npm:^2.1.0" + checksum: 10/0659f7168ce4322f62123e74fd537956b032b1ebac9ffc8fcf3a631082c491186c7715eeb41fc6930187923679b85609cb8923789af594e5be4e7aa06acfffa4 + languageName: node + linkType: hard + "sigstore@npm:^1.3.0": version: 1.9.0 resolution: "sigstore@npm:1.9.0" @@ -47590,6 +49291,13 @@ __metadata: languageName: node linkType: hard +"slice-ansi@npm:0.0.4": + version: 0.0.4 + resolution: "slice-ansi@npm:0.0.4" + checksum: 10/481d969c6aa771b27d7baacd6fe321751a0b9eb410274bda10ca81ea641bbfe747e428025d6d8f15bd635fdcfd57e8b2d54681ee6b0ce0c40f78644b144759e3 + languageName: node + linkType: hard + "slice-ansi@npm:1.0.0": version: 1.0.0 resolution: "slice-ansi@npm:1.0.0" @@ -47860,6 +49568,24 @@ __metadata: languageName: node linkType: hard +"solc@npm:^0.6.0": + version: 0.6.12 + resolution: "solc@npm:0.6.12" + dependencies: + command-exists: "npm:^1.2.8" + commander: "npm:3.0.2" + fs-extra: "npm:^0.30.0" + js-sha3: "npm:0.8.0" + memorystream: "npm:^0.3.1" + require-from-string: "npm:^2.0.0" + semver: "npm:^5.5.0" + tmp: "npm:0.0.33" + bin: + solcjs: solcjs + checksum: 10/27c665d182baf9120e489ac1ce1dc2b66237801d4386328b734d37bb44e596e687aacbc140b19bf4531c2549c2779a53f95ac25078ae24dcd0be8823e2081f17 + languageName: node + linkType: hard + "sonic-boom@npm:^4.0.1": version: 4.1.0 resolution: "sonic-boom@npm:4.1.0" @@ -48003,6 +49729,13 @@ __metadata: languageName: node linkType: hard +"source-map@npm:0.5.6": + version: 0.5.6 + resolution: "source-map@npm:0.5.6" + checksum: 10/c62fe98e106c762307eea3a982242c1a76a31bc762da10fe2dda12252d423c163e0cd45d313330c8bd040cc5121702511138252308f72b8a9273825e81e4db30 + languageName: node + linkType: hard + "source-map@npm:0.6.1, source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -48326,6 +50059,22 @@ __metadata: languageName: node linkType: hard +"stack-chain@npm:^2.0.0": + version: 2.0.0 + resolution: "stack-chain@npm:2.0.0" + checksum: 10/1ab6aafa6c0d4194d4cf15eac9e4121492da79596268eed6d9101e91e2cea1c5998638faf74968b7aed1ff5f76b35e7390cdd56c156cca4a8f02244716786ae8 + languageName: node + linkType: hard + +"stack-generator@npm:^2.0.5": + version: 2.0.10 + resolution: "stack-generator@npm:2.0.10" + dependencies: + stackframe: "npm:^1.3.4" + checksum: 10/4fc3978a934424218a0aa9f398034e1f78153d5ff4f4ff9c62478c672debb47dd58de05b09fc3900530cbb526d72c93a6e6c9353bacc698e3b1c00ca3dda0c47 + languageName: node + linkType: hard + "stack-trace@npm:0.0.x": version: 0.0.10 resolution: "stack-trace@npm:0.0.10" @@ -48358,6 +50107,27 @@ __metadata: languageName: node linkType: hard +"stacktrace-gps@npm:^3.0.4": + version: 3.1.2 + resolution: "stacktrace-gps@npm:3.1.2" + dependencies: + source-map: "npm:0.5.6" + stackframe: "npm:^1.3.4" + checksum: 10/21cb60ce0990f7a661e964cf4bdef1e70dda2286fb628fbd0fd1e69e8925138433d08ed84969de2d396b3b91515e15336a502f777c26587db89f3933d6f63f9b + languageName: node + linkType: hard + +"stacktrace-js@npm:^2.0.0": + version: 2.0.2 + resolution: "stacktrace-js@npm:2.0.2" + dependencies: + error-stack-parser: "npm:^2.0.6" + stack-generator: "npm:^2.0.5" + stacktrace-gps: "npm:^3.0.4" + checksum: 10/e5f60a09852687e4a9206927fe1078e24d63e00a71a2dcddd67940e9504a54931a3454439d5b4e3e0e62aeb979be810573e8d3332fbef0dbfa335a8781b4b57c + languageName: node + linkType: hard + "stacktrace-parser@npm:^0.1.10": version: 0.1.10 resolution: "stacktrace-parser@npm:0.1.10" @@ -48367,6 +50137,37 @@ __metadata: languageName: node linkType: hard +"standard-engine@npm:~7.0.0": + version: 7.0.0 + resolution: "standard-engine@npm:7.0.0" + dependencies: + deglob: "npm:^2.1.0" + get-stdin: "npm:^5.0.1" + minimist: "npm:^1.1.0" + pkg-conf: "npm:^2.0.0" + checksum: 10/71c40c189e22595b7e3674763ac3a032ac5ab19ad612fc8f66981284635965b1f0961f2e44440c16fe2b2064f2fc2a5a6f18637c2e135d67582d3e921fc9d7cf + languageName: node + linkType: hard + +"standard@npm:^10.0.3": + version: 10.0.3 + resolution: "standard@npm:10.0.3" + dependencies: + eslint: "npm:~3.19.0" + eslint-config-standard: "npm:10.2.1" + eslint-config-standard-jsx: "npm:4.0.2" + eslint-plugin-import: "npm:~2.2.0" + eslint-plugin-node: "npm:~4.2.2" + eslint-plugin-promise: "npm:~3.5.0" + eslint-plugin-react: "npm:~6.10.0" + eslint-plugin-standard: "npm:~3.0.1" + standard-engine: "npm:~7.0.0" + bin: + standard: ./bin/cmd.js + checksum: 10/09bf6e229f01be7fd5f2f01f7800ded0878c57739db8659d6e19a902621b0b8d34fec21eee26fe874eaf8ddba624af53e09015eb443ec47a1eb3305e3b5223c5 + languageName: node + linkType: hard + "static-extend@npm:^0.1.1": version: 0.1.2 resolution: "static-extend@npm:0.1.2" @@ -48550,6 +50351,13 @@ __metadata: languageName: node linkType: hard +"string-argv@npm:0.1.1": + version: 0.1.1 + resolution: "string-argv@npm:0.1.1" + checksum: 10/880e327b230f5a7e6a4b7e348617b32b45db3e420815b10b59bfe285e0ddb82ef73b6770d5e610ca73d1eb513df0a35661268d6e06c6d7663defb247a8b94765 + languageName: node + linkType: hard + "string-argv@npm:0.3.1": version: 0.3.1 resolution: "string-argv@npm:0.3.1" @@ -48713,6 +50521,18 @@ __metadata: languageName: node linkType: hard +"string.prototype.trim@npm:^1.2.9": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.0" + es-object-atoms: "npm:^1.0.0" + checksum: 10/b2170903de6a2fb5a49bb8850052144e04b67329d49f1343cdc6a87cb24fb4e4b8ad00d3e273a399b8a3d8c32c89775d93a8f43cb42fbff303f25382079fb58a + languageName: node + linkType: hard + "string.prototype.trimend@npm:^1.0.4": version: 1.0.4 resolution: "string.prototype.trimend@npm:1.0.4" @@ -48745,6 +50565,17 @@ __metadata: languageName: node linkType: hard +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/c2e862ae724f95771da9ea17c27559d4eeced9208b9c20f69bbfcd1b9bc92375adf8af63a103194dba17c4cc4a5cb08842d929f415ff9d89c062d44689c8761b + languageName: node + linkType: hard + "string.prototype.trimstart@npm:^1.0.4": version: 1.0.4 resolution: "string.prototype.trimstart@npm:1.0.4" @@ -48777,6 +50608,17 @@ __metadata: languageName: node linkType: hard +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/160167dfbd68e6f7cb9f51a16074eebfce1571656fc31d40c3738ca9e30e35496f2c046fe57b6ad49f65f238a152be8c86fd9a2dd58682b5eba39dad995b3674 + languageName: node + linkType: hard + "string_decoder@npm:^1.1.1, string_decoder@npm:^1.3.0": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" @@ -49118,6 +50960,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^6.1.0": + version: 6.1.0 + resolution: "supports-color@npm:6.1.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/78a5c43b9e478966ed41ed923a942dfd6209bf3bcc826a01435cfec98d5a17ca5d866effd2b6be438c16cd73b99f4a4397fcbb282e6f653e39046e1335334189 + languageName: node + linkType: hard + "supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" @@ -49365,6 +51216,20 @@ __metadata: languageName: node linkType: hard +"table@npm:^3.7.8": + version: 3.8.3 + resolution: "table@npm:3.8.3" + dependencies: + ajv: "npm:^4.7.0" + ajv-keywords: "npm:^1.0.0" + chalk: "npm:^1.1.1" + lodash: "npm:^4.0.0" + slice-ansi: "npm:0.0.4" + string-width: "npm:^2.0.0" + checksum: 10/2909eedc40712da7373b47b3fc18896c0ed21fbc1379c25c9d5f1fbef2184b3a7ba7d840a7359e1ce2b63ae32b971f6d006b81a3a04ee3eb05340a5a4f402e5c + languageName: node + linkType: hard + "tablemark@npm:^3.0.0": version: 3.0.0 resolution: "tablemark@npm:3.0.0" @@ -49877,6 +51742,18 @@ __metadata: languageName: node linkType: hard +"test-exclude@npm:^5.0.0": + version: 5.2.3 + resolution: "test-exclude@npm:5.2.3" + dependencies: + glob: "npm:^7.1.3" + minimatch: "npm:^3.0.4" + read-pkg-up: "npm:^4.0.0" + require-main-filename: "npm:^2.0.0" + checksum: 10/90f5ebf975da303377f1ee65cc80b78a91abcfe43a12f5e08ebd76a993b237cd34bfda1c79eeb3c8ab179d0dd09753efae56711eec9d267177869f7ee8c423df + languageName: node + linkType: hard + "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -50006,6 +51883,13 @@ __metadata: languageName: node linkType: hard +"time-stamp@npm:^2.0.0": + version: 2.2.0 + resolution: "time-stamp@npm:2.2.0" + checksum: 10/b602ea7c86793989fb22cf5aec35307e78af3e3c4f9ef7efdf0dabe296def23684985a55fb56a37143d80256f07f17768916d80995cd197aa3a811470d2e6f54 + languageName: node + linkType: hard + "timed-out@npm:^4.0.0, timed-out@npm:^4.0.1": version: 4.0.1 resolution: "timed-out@npm:4.0.1" @@ -50038,7 +51922,7 @@ __metadata: languageName: node linkType: hard -"title-case@npm:^2.1.0": +"title-case@npm:^2.1.0, title-case@npm:^2.1.1": version: 2.1.1 resolution: "title-case@npm:2.1.1" dependencies: @@ -50430,6 +52314,24 @@ __metadata: languageName: node linkType: hard +"ts-node@npm:7.0.1": + version: 7.0.1 + resolution: "ts-node@npm:7.0.1" + dependencies: + arrify: "npm:^1.0.0" + buffer-from: "npm:^1.1.0" + diff: "npm:^3.1.0" + make-error: "npm:^1.1.1" + minimist: "npm:^1.2.0" + mkdirp: "npm:^0.5.1" + source-map-support: "npm:^0.5.6" + yn: "npm:^2.0.0" + bin: + ts-node: dist/bin.js + checksum: 10/c1e0f1582867c34a03a25b1861e86922b9576931d473d48cd13275400832972350c4564e5f2c2df5817be6acbbb8e1dedf43bdd6f8c0f06b15d3530562a08a90 + languageName: node + linkType: hard + "ts-node@npm:8.9.1": version: 8.9.1 resolution: "ts-node@npm:8.9.1" @@ -50990,6 +52892,20 @@ __metadata: languageName: node linkType: hard +"typed-array-length@npm:^1.0.6": + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + possible-typed-array-names: "npm:^1.0.0" + checksum: 10/05e96cf4ff836743ebfc593d86133b8c30e83172cb5d16c56814d7bacfed57ce97e87ada9c4b2156d9aaa59f75cdef01c25bd9081c7826e0b869afbefc3e8c39 + languageName: node + linkType: hard + "typed-assert@npm:^1.0.8": version: 1.0.9 resolution: "typed-assert@npm:1.0.9" @@ -51358,6 +53274,13 @@ __metadata: languageName: node linkType: hard +"uniq@npm:^1.0.1": + version: 1.0.1 + resolution: "uniq@npm:1.0.1" + checksum: 10/8206535f83745ea83f9da7035f3b983fd6ed5e35b8ed7745441944e4065b616bc67cf0d0a23a86b40ee0074426f0607f0a138f9b78e124eb6a7a6a6966055709 + languageName: node + linkType: hard + "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -51694,6 +53617,15 @@ __metadata: languageName: node linkType: hard +"user-home@npm:^2.0.0": + version: 2.0.0 + resolution: "user-home@npm:2.0.0" + dependencies: + os-homedir: "npm:^1.0.0" + checksum: 10/a3329faa959fcd9e3e01a03347ca974f7f6b8896e6a634f29c61d8d5b61557d853c6fc5a6dff1a28e2da85b400d0e4490368a28de452ba8c41a2bf3a92cb110a + languageName: node + linkType: hard + "utf-8-validate@npm:5.0.7": version: 5.0.7 resolution: "utf-8-validate@npm:5.0.7" @@ -51728,6 +53660,13 @@ __metadata: languageName: node linkType: hard +"util-arity@npm:^1.0.2": + version: 1.1.0 + resolution: "util-arity@npm:1.1.0" + checksum: 10/f1c4c36395eccfa8a153c7aedf3eaf4acc5b2e9696b8ef7113312b0389f67702d973a593e39af715d6673cfe11f33fc53648e1f2209efdc4c66637fec161c5d7 + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -51735,6 +53674,21 @@ __metadata: languageName: node linkType: hard +"util.promisify@npm:^1.0.0": + version: 1.1.2 + resolution: "util.promisify@npm:1.1.2" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + for-each: "npm:^0.3.3" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + object.getownpropertydescriptors: "npm:^2.1.6" + safe-array-concat: "npm:^1.0.0" + checksum: 10/90c139773aedfe0cda48f2e43fb96bb0b45ab1d9544ed0cc1949d6acda17053dcb60ed1d3d0a1e121f0e2c26ca21e84dc589a5f06ec33059a4c742e7cba4584f + languageName: node + linkType: hard + "util.promisify@npm:~1.0.0": version: 1.0.1 resolution: "util.promisify@npm:1.0.1" @@ -51822,6 +53776,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:9.0.1, uuid@npm:^9.0.0, uuid@npm:^9.0.1": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 + languageName: node + linkType: hard + "uuid@npm:^3.3.2, uuid@npm:^3.3.3": version: 3.4.0 resolution: "uuid@npm:3.4.0" @@ -51831,15 +53794,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0, uuid@npm:^9.0.1": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10/9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 - languageName: node - linkType: hard - "v8-compile-cache-lib@npm:^3.0.0": version: 3.0.0 resolution: "v8-compile-cache-lib@npm:3.0.0" @@ -51962,6 +53916,17 @@ __metadata: languageName: node linkType: hard +"verror@npm:^1.9.0": + version: 1.10.1 + resolution: "verror@npm:1.10.1" + dependencies: + assert-plus: "npm:^1.0.0" + core-util-is: "npm:1.0.2" + extsprintf: "npm:^1.2.0" + checksum: 10/2b24eb830ecee7be69ab84192946074d7e8a85a42b0784d9874a28f52616065953ab4297975c87045879505fe9a6ac38dedad29a7470bbe0324540e5b6e92f62 + languageName: node + linkType: hard + "visit-values@npm:^2.0.0": version: 2.0.0 resolution: "visit-values@npm:2.0.0" @@ -52151,6 +54116,17 @@ __metadata: languageName: node linkType: hard +"web3-bzz@npm:1.10.4": + version: 1.10.4 + resolution: "web3-bzz@npm:1.10.4" + dependencies: + "@types/node": "npm:^12.12.6" + got: "npm:12.1.0" + swarm-js: "npm:^0.1.40" + checksum: 10/03b9e48e85d97c0a0d2fdec06fb42188adaf81e83c35ab73b3f6eafbdda2b43c0a9ed1a3b4ce86360544818eec34c056f0e4b67395685df97c1901f4a1c4a02e + languageName: node + linkType: hard + "web3-bzz@npm:1.6.1": version: 1.6.1 resolution: "web3-bzz@npm:1.6.1" @@ -52194,6 +54170,26 @@ __metadata: languageName: node linkType: hard +"web3-core-helpers@npm:1.10.1": + version: 1.10.1 + resolution: "web3-core-helpers@npm:1.10.1" + dependencies: + web3-eth-iban: "npm:1.10.1" + web3-utils: "npm:1.10.1" + checksum: 10/b0ca784b08861b3add442dbf7c7d2326180973b962d8d781f5ca6393099b694dfb29bdd07ae50134620c1588f6d734b8b8ee6e345fc8b494340505d352f8098c + languageName: node + linkType: hard + +"web3-core-helpers@npm:1.10.4": + version: 1.10.4 + resolution: "web3-core-helpers@npm:1.10.4" + dependencies: + web3-eth-iban: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/9c22942827bed0e46ae491a0bee3cd60cea636f9b0408b11bb341b0370e58a94358025657405142c2a24f3912a8f947e6e977d594d9ba66e11dedce3c5c4a7f4 + languageName: node + linkType: hard + "web3-core-helpers@npm:1.6.1": version: 1.6.1 resolution: "web3-core-helpers@npm:1.6.1" @@ -52237,6 +54233,32 @@ __metadata: languageName: node linkType: hard +"web3-core-method@npm:1.10.1": + version: 1.10.1 + resolution: "web3-core-method@npm:1.10.1" + dependencies: + "@ethersproject/transactions": "npm:^5.6.2" + web3-core-helpers: "npm:1.10.1" + web3-core-promievent: "npm:1.10.1" + web3-core-subscriptions: "npm:1.10.1" + web3-utils: "npm:1.10.1" + checksum: 10/fe011256c0a034769dea7cb150cf4a7ee6cab82b03cf6dd001745e362a3c5da892dc1d82c4858ad0d39036b139d9edb1b296b565ba96baacedb7a44fde974812 + languageName: node + linkType: hard + +"web3-core-method@npm:1.10.4": + version: 1.10.4 + resolution: "web3-core-method@npm:1.10.4" + dependencies: + "@ethersproject/transactions": "npm:^5.6.2" + web3-core-helpers: "npm:1.10.4" + web3-core-promievent: "npm:1.10.4" + web3-core-subscriptions: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/d942beba3999c084333f5c808ada2a90930d55d148d5f8cc51a2135f8ab3f101fa5ce0d732a60830e8cad2af844bbed6cf0b6250863003adafb08c7ffa9fbd5f + languageName: node + linkType: hard + "web3-core-method@npm:1.6.1": version: 1.6.1 resolution: "web3-core-method@npm:1.6.1" @@ -52285,6 +54307,24 @@ __metadata: languageName: node linkType: hard +"web3-core-promievent@npm:1.10.1": + version: 1.10.1 + resolution: "web3-core-promievent@npm:1.10.1" + dependencies: + eventemitter3: "npm:4.0.4" + checksum: 10/cd9bc5c067782f374ad4aa69536f382c0c0528a545f9ea8763e605de297cb78bdbc0ea708601d099f8d6ceaae11529062357309a6e037db3673601d7f9a63e88 + languageName: node + linkType: hard + +"web3-core-promievent@npm:1.10.4": + version: 1.10.4 + resolution: "web3-core-promievent@npm:1.10.4" + dependencies: + eventemitter3: "npm:4.0.4" + checksum: 10/a792c74aa5c91dc63fb493af04628ecfa08b9e6ceea402dfe53f718b019c41d63a0200bf3045dd23ec3c42b8d7474ac96eb4cb4456060becc551c2cacbd02bb1 + languageName: node + linkType: hard + "web3-core-promievent@npm:1.6.1": version: 1.6.1 resolution: "web3-core-promievent@npm:1.6.1" @@ -52325,6 +54365,32 @@ __metadata: languageName: node linkType: hard +"web3-core-requestmanager@npm:1.10.1": + version: 1.10.1 + resolution: "web3-core-requestmanager@npm:1.10.1" + dependencies: + util: "npm:^0.12.5" + web3-core-helpers: "npm:1.10.1" + web3-providers-http: "npm:1.10.1" + web3-providers-ipc: "npm:1.10.1" + web3-providers-ws: "npm:1.10.1" + checksum: 10/03b5399fcb7660fb45012d032a749e41fddd4f00674d4bdb4ac7fc3f08836637c7e1d0660d3a0e127aa0368d63a034ee2b22645cf3730c0f56e62b71a7ea2cf3 + languageName: node + linkType: hard + +"web3-core-requestmanager@npm:1.10.4": + version: 1.10.4 + resolution: "web3-core-requestmanager@npm:1.10.4" + dependencies: + util: "npm:^0.12.5" + web3-core-helpers: "npm:1.10.4" + web3-providers-http: "npm:1.10.4" + web3-providers-ipc: "npm:1.10.4" + web3-providers-ws: "npm:1.10.4" + checksum: 10/c26bf616cc156b2198bf634084978d66cf384cf2b174324b6ada071a8c9e9be7855d72c09453308d1a46b50874c18ff9b75193f8736c2b285cdc32209391880c + languageName: node + linkType: hard + "web3-core-requestmanager@npm:1.6.1": version: 1.6.1 resolution: "web3-core-requestmanager@npm:1.6.1" @@ -52374,6 +54440,26 @@ __metadata: languageName: node linkType: hard +"web3-core-subscriptions@npm:1.10.1": + version: 1.10.1 + resolution: "web3-core-subscriptions@npm:1.10.1" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.10.1" + checksum: 10/d022a849e46f8365b8843205e92b6d3c28017fa9fd3b74c72553b0d1fef83f88fd674dec5a72d6c7082c20f1f5f82d9c3c8dccbb284a4a1c60cd8ce91e326181 + languageName: node + linkType: hard + +"web3-core-subscriptions@npm:1.10.4": + version: 1.10.4 + resolution: "web3-core-subscriptions@npm:1.10.4" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.10.4" + checksum: 10/b1652988c0925ab1d5c27e67a816ec6bcb32f37f59c7314e1f02552233fbc486a0de579aeb660d77d82452b63e9feaa98317ec7897cd7aeb140595c8e176d0eb + languageName: node + linkType: hard + "web3-core-subscriptions@npm:1.6.1": version: 1.6.1 resolution: "web3-core-subscriptions@npm:1.6.1" @@ -52419,6 +54505,36 @@ __metadata: languageName: node linkType: hard +"web3-core@npm:1.10.1": + version: 1.10.1 + resolution: "web3-core@npm:1.10.1" + dependencies: + "@types/bn.js": "npm:^5.1.1" + "@types/node": "npm:^12.12.6" + bignumber.js: "npm:^9.0.0" + web3-core-helpers: "npm:1.10.1" + web3-core-method: "npm:1.10.1" + web3-core-requestmanager: "npm:1.10.1" + web3-utils: "npm:1.10.1" + checksum: 10/196d77da7f1fdc45bd37220baa8875960cc393c30dd16036b7b798fc10b13257bebccfeb7ee2abee8a252bec39608912421a4c108f84af8905ba1b583b8123b4 + languageName: node + linkType: hard + +"web3-core@npm:1.10.4": + version: 1.10.4 + resolution: "web3-core@npm:1.10.4" + dependencies: + "@types/bn.js": "npm:^5.1.1" + "@types/node": "npm:^12.12.6" + bignumber.js: "npm:^9.0.0" + web3-core-helpers: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-core-requestmanager: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/138c5abff27a48d16584fdbe56b940f9efe7cd2463d768f42c5fcdfc97d0dc4fc41e09ff1ffb8c8ff79b22a69e9efbf5af27c4b6a0d888c351202f03a8b01b8e + languageName: node + linkType: hard + "web3-core@npm:1.6.1": version: 1.6.1 resolution: "web3-core@npm:1.6.1" @@ -52586,6 +54702,16 @@ __metadata: languageName: node linkType: hard +"web3-eth-abi@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth-abi@npm:1.10.4" + dependencies: + "@ethersproject/abi": "npm:^5.6.3" + web3-utils: "npm:1.10.4" + checksum: 10/c601e45303c607a18f6f8e793aa9c5432fcaf83a34732dc9667b7e2eeb53a4cb8c2dec6fff9f33061fcc5130ec6c8f656f3c3ef962d7ff2af3247f828cffe559 + languageName: node + linkType: hard + "web3-eth-abi@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-abi@npm:1.6.1" @@ -52699,6 +54825,24 @@ __metadata: languageName: node linkType: hard +"web3-eth-accounts@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth-accounts@npm:1.10.4" + dependencies: + "@ethereumjs/common": "npm:2.6.5" + "@ethereumjs/tx": "npm:3.5.2" + "@ethereumjs/util": "npm:^8.1.0" + eth-lib: "npm:0.2.8" + scrypt-js: "npm:^3.0.1" + uuid: "npm:^9.0.0" + web3-core: "npm:1.10.4" + web3-core-helpers: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/994c9f8b3fd8c5fc72e1f2ca6770ad61a2618de2ddc38a898a7d956d22cbdedac7cc683319252a7c9a26c06f337942bf5af84a4ff4001e784e90d061c2733fc2 + languageName: node + linkType: hard + "web3-eth-accounts@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-accounts@npm:1.6.1" @@ -52832,6 +54976,22 @@ __metadata: languageName: node linkType: hard +"web3-eth-contract@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth-contract@npm:1.10.4" + dependencies: + "@types/bn.js": "npm:^5.1.1" + web3-core: "npm:1.10.4" + web3-core-helpers: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-core-promievent: "npm:1.10.4" + web3-core-subscriptions: "npm:1.10.4" + web3-eth-abi: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/8b0aa58c268b4be94a2ee14ff7fbdd9a2a20b912e580a69cbbbf57493331f60b96d88108ad4deabac3c3810d94483c449b1e5a06b414bc7b1ef326c682603836 + languageName: node + linkType: hard + "web3-eth-contract@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-contract@npm:1.6.1" @@ -52941,6 +55101,22 @@ __metadata: languageName: node linkType: hard +"web3-eth-ens@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth-ens@npm:1.10.4" + dependencies: + content-hash: "npm:^2.5.2" + eth-ens-namehash: "npm:2.0.8" + web3-core: "npm:1.10.4" + web3-core-helpers: "npm:1.10.4" + web3-core-promievent: "npm:1.10.4" + web3-eth-abi: "npm:1.10.4" + web3-eth-contract: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/1296b523a79bd46dc2485d21888454dbca7b7005af5156e58f2515e09f8b30973697a8032429fdaab01d2f8e3e605716789875dadc87cadd3ec9a2ce5d182742 + languageName: node + linkType: hard + "web3-eth-ens@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-ens@npm:1.6.1" @@ -53033,6 +55209,26 @@ __metadata: languageName: node linkType: hard +"web3-eth-iban@npm:1.10.1": + version: 1.10.1 + resolution: "web3-eth-iban@npm:1.10.1" + dependencies: + bn.js: "npm:^5.2.1" + web3-utils: "npm:1.10.1" + checksum: 10/c3e3c9c551a812cbdb2c88d016902d22b029c821294f4499a5e5147d3b45727076069c6beb5d76dbe83b2b0187f236458ce17502855a419e12eaf8c1e3c6d1c7 + languageName: node + linkType: hard + +"web3-eth-iban@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth-iban@npm:1.10.4" + dependencies: + bn.js: "npm:^5.2.1" + web3-utils: "npm:1.10.4" + checksum: 10/b5e33aaf3d41608ed59ea98c703271eefcd30aea15163cda4bc8713f9716eb40b816e8047022ebf71391250983acfe58e65551461109a53e266f4b824c4a0678 + languageName: node + linkType: hard + "web3-eth-iban@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-iban@npm:1.6.1" @@ -53101,6 +55297,20 @@ __metadata: languageName: node linkType: hard +"web3-eth-personal@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth-personal@npm:1.10.4" + dependencies: + "@types/node": "npm:^12.12.6" + web3-core: "npm:1.10.4" + web3-core-helpers: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-net: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/1b0818aa3dc9d58ece45af85ea57ddd3fbc3cd2d8b325e18f2071236ab9e9ba2e878d3f77fddfb9ab1a37ee441209f07302638b13c86bc372b2e22989dc1d903 + languageName: node + linkType: hard + "web3-eth-personal@npm:1.6.1": version: 1.6.1 resolution: "web3-eth-personal@npm:1.6.1" @@ -53191,6 +55401,26 @@ __metadata: languageName: node linkType: hard +"web3-eth@npm:1.10.4": + version: 1.10.4 + resolution: "web3-eth@npm:1.10.4" + dependencies: + web3-core: "npm:1.10.4" + web3-core-helpers: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-core-subscriptions: "npm:1.10.4" + web3-eth-abi: "npm:1.10.4" + web3-eth-accounts: "npm:1.10.4" + web3-eth-contract: "npm:1.10.4" + web3-eth-ens: "npm:1.10.4" + web3-eth-iban: "npm:1.10.4" + web3-eth-personal: "npm:1.10.4" + web3-net: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/0da77f76715711cbae7ec0f13300cf5cf364eed2955077f55462f162de9e133305d6534203f50aa786f496b4064d6b46577f30b8f8d0a0cad4476f7e7f30980e + languageName: node + linkType: hard + "web3-eth@npm:1.6.1": version: 1.6.1 resolution: "web3-eth@npm:1.6.1" @@ -53319,6 +55549,17 @@ __metadata: languageName: node linkType: hard +"web3-net@npm:1.10.4": + version: 1.10.4 + resolution: "web3-net@npm:1.10.4" + dependencies: + web3-core: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/7f28f58ed1521bd805d63340994be436812e771e8edaa00aea568fa7ae3374746fb5f5aa6ac67632862a739833dfea6ffa92f4df4bca7c394b2608c603e1eda6 + languageName: node + linkType: hard + "web3-net@npm:1.6.1": version: 1.6.1 resolution: "web3-net@npm:1.6.1" @@ -53388,6 +55629,30 @@ __metadata: languageName: node linkType: hard +"web3-providers-http@npm:1.10.1": + version: 1.10.1 + resolution: "web3-providers-http@npm:1.10.1" + dependencies: + abortcontroller-polyfill: "npm:^1.7.3" + cross-fetch: "npm:^3.1.4" + es6-promise: "npm:^4.2.8" + web3-core-helpers: "npm:1.10.1" + checksum: 10/0e64cebbe735a4bcc4574443b60311c3f85647331954ce624d9a73c6f99b47cac38609e55e349e53a336d457a4e24b98a3b920f2f1ac725ae4b6648cc2deea82 + languageName: node + linkType: hard + +"web3-providers-http@npm:1.10.4": + version: 1.10.4 + resolution: "web3-providers-http@npm:1.10.4" + dependencies: + abortcontroller-polyfill: "npm:^1.7.5" + cross-fetch: "npm:^4.0.0" + es6-promise: "npm:^4.2.8" + web3-core-helpers: "npm:1.10.4" + checksum: 10/2ff27d45cc7c7b1e8f07a7917fe1502fef59e211b2ee97851369f9b6dab99ce81b0bef50f9ecf36286137fc41f1230f04b55b090d30f870fbc5ef1972d165b5f + languageName: node + linkType: hard + "web3-providers-http@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-http@npm:1.6.1" @@ -53454,6 +55719,26 @@ __metadata: languageName: node linkType: hard +"web3-providers-ipc@npm:1.10.1": + version: 1.10.1 + resolution: "web3-providers-ipc@npm:1.10.1" + dependencies: + oboe: "npm:2.1.5" + web3-core-helpers: "npm:1.10.1" + checksum: 10/bb176d7460130e1781d19778f7ac058873bdf26ed9f82adcfe4c3572e5dc4df558a41bbe7f22858659cf8cb136abf8420f916890f389a5158eeb2e88b7bdd05a + languageName: node + linkType: hard + +"web3-providers-ipc@npm:1.10.4": + version: 1.10.4 + resolution: "web3-providers-ipc@npm:1.10.4" + dependencies: + oboe: "npm:2.1.5" + web3-core-helpers: "npm:1.10.4" + checksum: 10/cd33a954f59ba3a9ca466dca0d6563f46c56879dc249d885b8edfee077f9f58ccf591ba06855e1d69baba52a8719c03684b0ba7b33d836bfdd4c6166e289c0d4 + languageName: node + linkType: hard + "web3-providers-ipc@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ipc@npm:1.6.1" @@ -53517,6 +55802,28 @@ __metadata: languageName: node linkType: hard +"web3-providers-ws@npm:1.10.1": + version: 1.10.1 + resolution: "web3-providers-ws@npm:1.10.1" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.10.1" + websocket: "npm:^1.0.32" + checksum: 10/ff5e1bc56f6ba587e12414d9cd795df749cf48729cb4bcc15fdc81e9459cc86f3f9a4f01617af87f0d19708599cff787f00bd192c9f6b454d109eca818510b19 + languageName: node + linkType: hard + +"web3-providers-ws@npm:1.10.4": + version: 1.10.4 + resolution: "web3-providers-ws@npm:1.10.4" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.10.4" + websocket: "npm:^1.0.32" + checksum: 10/98cb76473ae1060e21ff474768a04c6dcd91724f24a1fac2d4a5f186a35bd2f119605fbb28423dfe5be33755b1e5808b10514ddaf326b57573b447efc84ef730 + languageName: node + linkType: hard + "web3-providers-ws@npm:1.6.1": version: 1.6.1 resolution: "web3-providers-ws@npm:1.6.1" @@ -53623,6 +55930,18 @@ __metadata: languageName: node linkType: hard +"web3-shh@npm:1.10.4": + version: 1.10.4 + resolution: "web3-shh@npm:1.10.4" + dependencies: + web3-core: "npm:1.10.4" + web3-core-method: "npm:1.10.4" + web3-core-subscriptions: "npm:1.10.4" + web3-net: "npm:1.10.4" + checksum: 10/73e497ba841ad378481fa786790fc929808b67d5824a41f48943332033a239028afb360723bcd463254fb0298c767289d749796718c07a3718e944b9b5fb156d + languageName: node + linkType: hard + "web3-shh@npm:1.6.1": version: 1.6.1 resolution: "web3-shh@npm:1.6.1" @@ -53723,6 +56042,38 @@ __metadata: languageName: node linkType: hard +"web3-utils@npm:1.10.1": + version: 1.10.1 + resolution: "web3-utils@npm:1.10.1" + dependencies: + "@ethereumjs/util": "npm:^8.1.0" + bn.js: "npm:^5.2.1" + ethereum-bloom-filters: "npm:^1.0.6" + ethereum-cryptography: "npm:^2.1.2" + ethjs-unit: "npm:0.1.6" + number-to-bn: "npm:1.7.0" + randombytes: "npm:^2.1.0" + utf8: "npm:3.0.0" + checksum: 10/0a8a65cf8efe8b7dc6bae413f6508c23c44af05d124ce408335c8ed42da582171b6a9a20cc2d55d93fd609972e0d9d8c35284ec4d0ca8871a7f7ed283bb858df + languageName: node + linkType: hard + +"web3-utils@npm:1.10.4, web3-utils@npm:^1.0.0-beta.31, web3-utils@npm:^1.3.4": + version: 1.10.4 + resolution: "web3-utils@npm:1.10.4" + dependencies: + "@ethereumjs/util": "npm:^8.1.0" + bn.js: "npm:^5.2.1" + ethereum-bloom-filters: "npm:^1.0.6" + ethereum-cryptography: "npm:^2.1.2" + ethjs-unit: "npm:0.1.6" + number-to-bn: "npm:1.7.0" + randombytes: "npm:^2.1.0" + utf8: "npm:3.0.0" + checksum: 10/3e586b638cdae9fa45b7698e8a511ae2cbf60e219a900351ae38d384beaaf67424ac6e1d9c5098c3fb8f2ff3cc65a70d977a20bdce3dad542cb50deb666ea2a3 + languageName: node + linkType: hard + "web3-utils@npm:1.6.1": version: 1.6.1 resolution: "web3-utils@npm:1.6.1" @@ -53794,22 +56145,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:^1.0.0-beta.31, web3-utils@npm:^1.3.4": - version: 1.10.4 - resolution: "web3-utils@npm:1.10.4" - dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/3e586b638cdae9fa45b7698e8a511ae2cbf60e219a900351ae38d384beaaf67424ac6e1d9c5098c3fb8f2ff3cc65a70d977a20bdce3dad542cb50deb666ea2a3 - languageName: node - linkType: hard - "web3-validator@npm:2.0.2": version: 2.0.2 resolution: "web3-validator@npm:2.0.2" @@ -54033,6 +56368,21 @@ __metadata: languageName: node linkType: hard +"web3@npm:^1.2.4": + version: 1.10.4 + resolution: "web3@npm:1.10.4" + dependencies: + web3-bzz: "npm:1.10.4" + web3-core: "npm:1.10.4" + web3-eth: "npm:1.10.4" + web3-eth-personal: "npm:1.10.4" + web3-net: "npm:1.10.4" + web3-shh: "npm:1.10.4" + web3-utils: "npm:1.10.4" + checksum: 10/3e6132a6fe7a76d071ab89cd4895f816d0af2fea5db04721483e9850e23f8c955a905ad3e583473aff3dcdab6e385eb6d7f727cc05738fb795aeadc0075e2179 + languageName: node + linkType: hard + "web3js-quorum@npm:22.4.0": version: 22.4.0 resolution: "web3js-quorum@npm:22.4.0" @@ -54422,6 +56772,13 @@ __metadata: languageName: node linkType: hard +"webworkify@npm:^1.2.1": + version: 1.5.0 + resolution: "webworkify@npm:1.5.0" + checksum: 10/2ee5b8e418da45657544bfb397599d60abc009c59d1b92f73c46a6beb9a1e08d6fabab36cd823bc4e8da0c2e498b4cf883aa5d3704d98cafe1b5faa23b92ffcc + languageName: node + linkType: hard + "wget-improved@npm:3.4.0": version: 3.4.0 resolution: "wget-improved@npm:3.4.0" @@ -54594,6 +56951,19 @@ __metadata: languageName: node linkType: hard +"which-typed-array@npm:^1.1.15": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.2" + checksum: 10/c3b6a99beadc971baa53c3ee5b749f2b9bdfa3b3b9a70650dd8511a48b61d877288b498d424712e9991d16019633086bd8b5923369460d93463c5825fa36c448 + languageName: node + linkType: hard + "which-typed-array@npm:^1.1.2": version: 1.1.7 resolution: "which-typed-array@npm:1.1.7" @@ -54711,6 +57081,17 @@ __metadata: languageName: node linkType: hard +"winston-transport@npm:^4.7.0": + version: 4.7.1 + resolution: "winston-transport@npm:4.7.1" + dependencies: + logform: "npm:^2.6.1" + readable-stream: "npm:^3.6.2" + triple-beam: "npm:^1.3.0" + checksum: 10/bc48c921ec9b4a71c1445bf274aa6b00c01089a6c26fc0b19534f8a32fa2710c6766c9e6db53a23492c20772934025d312dd9fb08df157ccb6579ad6b9dae9a7 + languageName: node + linkType: hard + "winston@npm:3.10.0": version: 3.10.0 resolution: "winston@npm:3.10.0" @@ -54744,6 +57125,25 @@ __metadata: languageName: node linkType: hard +"winston@npm:^3.0.0": + version: 3.14.2 + resolution: "winston@npm:3.14.2" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.6.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/ba818714606175f27c38c42b22913e65f17987a0c8c41bcc73d55f3be8d70d629313f45e312ec02eea7bf074f9abee3f228746140245eb5258487c4161f3a798 + languageName: node + linkType: hard + "winston@npm:^3.3.3": version: 3.6.0 resolution: "winston@npm:3.6.0" @@ -55067,6 +57467,17 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^2.0.0": + version: 2.4.3 + resolution: "write-file-atomic@npm:2.4.3" + dependencies: + graceful-fs: "npm:^4.1.11" + imurmurhash: "npm:^0.1.4" + signal-exit: "npm:^3.0.2" + checksum: 10/15ce863dce07075d0decedd7c9094f4461e46139d28a758c53162f24c0791c16cd2e7a76baa5b47b1a851fbb51e16f2fab739afb156929b22628f3225437135c + languageName: node + linkType: hard + "write-file-atomic@npm:^3.0.0, write-file-atomic@npm:^3.0.3": version: 3.0.3 resolution: "write-file-atomic@npm:3.0.3" @@ -55320,7 +57731,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.0, xtend@npm:^4.0.2, xtend@npm:~4.0.0": +"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: 10/ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -55337,7 +57748,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:~2.1.2": +"xtend@npm:~2.1.1, xtend@npm:~2.1.2": version: 2.1.2 resolution: "xtend@npm:2.1.2" dependencies: @@ -55623,6 +58034,13 @@ __metadata: languageName: node linkType: hard +"yn@npm:^2.0.0": + version: 2.0.0 + resolution: "yn@npm:2.0.0" + checksum: 10/9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 + languageName: node + linkType: hard + "yn@npm:^4.0.0": version: 4.0.0 resolution: "yn@npm:4.0.0" From 24ec6f7d83183ecc03d20feb264fca84e140b59a Mon Sep 17 00:00:00 2001 From: eduv09 Date: Tue, 3 Sep 2024 17:58:37 +0000 Subject: [PATCH 37/49] refactor(cbdc-app): frontend update and some fixes Signed-off-by: Eduardo Vasques fix(satp-hermes): bug fixing Signed-off-by: Carlos Amaro fix(cbdc-example): bug fixing Signed-off-by: Carlos Amaro feat(cbdc): final fixes Signed-off-by: Eduardo Vasques fix(cbdc-example): remove unecessary variable Signed-off-by: Carlos Amaro fix(satp-hermes): remove unessary logs Signed-off-by: Carlos Amaro fix(cbdc-example): docker ports Signed-off-by: Carlos Amaro --- .../Dockerfile | 19 +- .../package.json | 1 + .../process.env | 9 +- .../run-cbdc-app.sh | 7 +- .../chaincode-typescript/src/tokenERC20.ts | 6 +- .../main/typescript/cbdc-bridging-app-cli.ts | 28 +-- .../src/main/typescript/cbdc-bridging-app.ts | 3 + .../cbdc-bridging-app-dummy-infrastructure.ts | 128 +++++++++++-- .../cbdc-app-setup-infrastucture.test.ts | 6 +- .../src/api-calls/besu-api.tsx | 168 +++++++++++++----- .../src/api-calls/fabric-api.tsx | 143 +++++++++------ .../src/api-calls/gateway-api.tsx | 161 +++++++++++++++++ .../src/components/ActionsContainer.tsx | 83 ++------- .../src/components/AssetReferencesTable.tsx | 34 ++-- .../src/components/Ledger.tsx | 22 +-- .../components/dialogs/BridgeBackDialog.tsx | 109 ------------ .../components/dialogs/BridgeOutDialog.tsx | 109 ------------ .../src/components/dialogs/MintDialog.tsx | 11 +- ...{EscrowDialog.tsx => PermissionDialog.tsx} | 47 ++--- .../src/components/dialogs/TransferDialog.tsx | 123 ++++++++++--- .../src/models/SessionReference.tsx | 23 +++ .../src/ontology/besu-erc20-ontology.json | 50 ++++++ .../src/ontology/fabric-erc20-ontology.json | 38 ++++ .../cactus-plugin-satp-hermes/package.json | 1 + .../core/stage-handlers/stage0-handler.ts | 8 +- .../core/stage-handlers/stage1-handler.ts | 8 +- .../typescript/plugin-satp-hermes-gateway.ts | 5 +- ...to-end-transfer-2-gateways-openapi.test.ts | 47 ++++- ...atp-end-to-end-transfer-2-gateways.test.ts | 48 ++++- yarn.lock | 1 + 30 files changed, 933 insertions(+), 513 deletions(-) create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx rename examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/{EscrowDialog.tsx => PermissionDialog.tsx} (61%) create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/models/SessionReference.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/ontology/besu-erc20-ontology.json create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/ontology/fabric-erc20-ontology.json diff --git a/examples/cactus-example-cbdc-bridging-backend/Dockerfile b/examples/cactus-example-cbdc-bridging-backend/Dockerfile index 0276cab7a8..b6e51b97c6 100644 --- a/examples/cactus-example-cbdc-bridging-backend/Dockerfile +++ b/examples/cactus-example-cbdc-bridging-backend/Dockerfile @@ -32,10 +32,10 @@ WORKDIR ${APP} SHELL ["/bin/bash", "--login", "-i", "-c"] # Installing Node Version Manager (nvm) -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash RUN source ~/.bashrc && \ - nvm install 16.8.0 && \ + nvm install 18.18.2 && \ npm install -g yarn && \ npm run configure @@ -48,6 +48,12 @@ ENV API_SERVER_1_PORT=4000 ENV API_SERVER_2_PORT=4100 ENV API_HOST_FRONTEND=localhost ENV API_PORT_FRONTEND=2000 +ENV API_GATEWAY_1_BLO_PORT=4010 +ENV API_GATEWAY_2_BLO_PORT=4110 +ENV API_GATEWAY_1_CLIENT_PORT=3011 +ENV API_GATEWAY_2_CLIENT_PORT=3111 +ENV API_GATEWAY_1_SERVER_PORT=3010 +ENV API_GATEWAY_2_SERVER_PORT=3110 COPY examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/fabric-contracts COPY examples/cactus-example-cbdc-bridging-backend/supervisord.conf /etc/supervisord.conf @@ -61,6 +67,15 @@ EXPOSE 4000 # API #2 EXPOSE 4100 +EXPOSE 4010 +EXPOSE 4110 +EXPOSE 3011 +EXPOSE 3111 +EXPOSE 3010 +EXPOSE 3110 +#to the dummy server that exposes to the frontend the besu-satp contract address +EXPOSE 9999 + # Extend the parent image's entrypoint # https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index ef826da5f2..fc8b979f77 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -76,6 +76,7 @@ "async-exit-hook": "2.0.1", "axios": "1.7.7", "body-parser": "1.20.3", + "cors": "2.8.5", "crypto-js": "4.2.0", "dotenv": "16.4.5", "express": "4.21.0", diff --git a/examples/cactus-example-cbdc-bridging-backend/process.env b/examples/cactus-example-cbdc-bridging-backend/process.env index 351fca7848..ef94b13892 100644 --- a/examples/cactus-example-cbdc-bridging-backend/process.env +++ b/examples/cactus-example-cbdc-bridging-backend/process.env @@ -3,6 +3,9 @@ API_SERVER_1_PORT=4000 API_SERVER_2_PORT=4100 API_HOST_FRONTEND=localhost API_PORT_FRONTEND=2000 -API_CRPC_HOST=localhost -API_SERVER_1_CRPC_PORT=6000 -API_SERVER_2_CRPC_PORT=6100 \ No newline at end of file +API_GATEWAY_1_BLO_PORT=4010 +API_GATEWAY_2_BLO_PORT=4110 +API_GATEWAY_1_CLIENT_PORT=3011 +API_GATEWAY_2_CLIENT_PORT=3111 +API_GATEWAY_1_SERVER_PORT=3010 +API_GATEWAY_2_SERVER_PORT=3110 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh b/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh index 5eba756f93..18975e2f47 100755 --- a/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh +++ b/examples/cactus-example-cbdc-bridging-backend/run-cbdc-app.sh @@ -4,11 +4,10 @@ function main() echo "Sleeping to let dockerd spin up" sleep 10 - docker pull ghcr.io/hyperledger/cactus-besu-all-in-one:2021-01-08-7a055c3 - docker pull ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2 - docker pull ipfs/go-ipfs:v0.8.0 + docker pull ghcr.io/hyperledger/cactus-besu-all-in-one:2024-06-09-cc2f9c5 + docker pull ghcr.io/hyperledger/cactus-fabric2-all-in-one:v1.0.0-rc.22024-03-03--issue-2945-fabric-v2-5-6 - /root/.nvm/versions/node/v16.8.0/bin/node -r ts-node/register /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/main/typescript/cbdc-bridging-app-cli.js + /root/.nvm/versions/node/v18.18.2/bin/node -r ts-node/register /usr/src/app/cactus/examples/cactus-example-cbdc-bridging-backend/dist/lib/main/typescript/cbdc-bridging-app-cli.js } main diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts index 4ae3089c5f..2f844511b3 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts @@ -91,7 +91,8 @@ class TokenERC20Contract extends Contract { const balanceBytes = await ctx.stub.getState(balanceKey); if (!balanceBytes || balanceBytes.length === 0) { - throw new Error(`the account ${owner} does not exist`); + //throw new Error(`the account ${owner} does not exist`); + return 0; } const balance: number = parseInt(balanceBytes.toString()); @@ -513,7 +514,8 @@ class TokenERC20Contract extends Contract { const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [id]); const balanceBytes = await ctx.stub.getState(balanceKey); if (!balanceBytes || balanceBytes.length === 0) { - throw new Error(`the account ${id} does not exist`); + //throw new Error(`the account ${id} does not exist`); + return 0; } const balance: number = parseInt(balanceBytes.toString()); diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts index fac106c0e7..5725fbff22 100755 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts @@ -54,23 +54,27 @@ export async function launchApp( process.env.API_HOST == undefined || process.env.API_SERVER_1_PORT == undefined || process.env.API_SERVER_2_PORT == undefined || - process.env.API_CRPC_HOST == undefined || - process.env.API_SERVER_1_CRPC_PORT == undefined || - process.env.API_SERVER_2_CRPC_PORT == undefined + process.env.API_GATEWAY_1_BLO_PORT == undefined || + process.env.API_GATEWAY_2_BLO_PORT == undefined || + process.env.API_GATEWAY_1_CLIENT_PORT == undefined || + process.env.API_GATEWAY_2_CLIENT_PORT == undefined || + process.env.API_GATEWAY_1_SERVER_PORT == undefined || + process.env.API_GATEWAY_2_SERVER_PORT == undefined ) { throw new Error("Env variables not set"); } const appOptions: ICbdcBridgingApp = { - apiHost: process.env.API_HOST, - apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), - apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), - //clientGatewayKeyPair: clientGatewayKeyPair, - //serverGatewayKeyPair: serverGatewayKeyPair, - logLevel: "DEBUG", - apiCrpcHost: process.env.API_CRPC_HOST, - apiServer1CrpcPort: parseInt(process.env.API_SERVER_1_CRPC_PORT), - apiServer2CrpcPort: parseInt(process.env.API_SERVER_2_CRPC_PORT), + apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), + apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), + apiHost: process.env.API_HOST, + apiGateway1ServerPort: parseInt(process.env.API_GATEWAY_1_SERVER_PORT), + apiGateway1ClientPort: parseInt(process.env.API_GATEWAY_1_CLIENT_PORT), + apiGateway1BloPort: parseInt(process.env.API_GATEWAY_1_BLO_PORT), + apiGateway2ServerPort: parseInt(process.env.API_GATEWAY_2_SERVER_PORT), + apiGateway2ClientPort: parseInt(process.env.API_GATEWAY_2_CLIENT_PORT), + apiGateway2BloPort: parseInt(process.env.API_GATEWAY_2_BLO_PORT), + logLevel: "DEBUG", }; const cbdcBridgingApp = new CbdcBridgingApp(appOptions); 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 3c93199c14..9dc3082b5d 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 @@ -26,6 +26,7 @@ import express from "express"; import bodyParser from "body-parser"; import http, { Server } from "http"; import { Constants } from "@hyperledger/cactus-core-api"; +import cors from "cors"; import { Server as SocketIoServer } from "socket.io"; @@ -100,6 +101,7 @@ export class CbdcBridgingApp { // Reserve the ports where the API Servers will run { const expressApp = express(); + expressApp.use(cors()); expressApp.use(bodyParser.json({ limit: "250mb" })); const fabricServer = http.createServer(expressApp); @@ -118,6 +120,7 @@ export class CbdcBridgingApp { { const expressApp = express(); expressApp.use(bodyParser.json({ limit: "250mb" })); + expressApp.use(cors()); const besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { hostname: this.options.apiHost, 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 400ed90fce..826530f8a4 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 @@ -1,3 +1,5 @@ +import express from "express"; +import cors from "cors"; import path from "path"; import { v4 as uuidv4 } from "uuid"; import fs from "fs-extra"; @@ -44,8 +46,9 @@ import SATPWrapperContract from "../../../solidity/main/generated/satp-wrapper.s import { PluginFactorySATPGateway, SATPGateway, SATPGatewayConfig } from "@hyperledger/cactus-plugin-satp-hermes"; import { IPluginFactoryOptions, PluginImportType } from "@hyperledger/cactus-core-api"; import CryptoMaterial from "../../../crypto-material/crypto-material.json"; -import { SupportedChain, GatewayIdentity, DraftVersions } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/core/types"; +import { SupportedChain, GatewayIdentity, DraftVersions, Address } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/core/types"; import { FabricConfig, NetworkConfig } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction"; +import { bufArray2HexStr } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils"; export interface ICbdcBridgingAppDummyInfrastructureOptions { logLevel?: LogLevelDesc; @@ -69,7 +72,7 @@ export class CbdcBridgingAppDummyInfrastructure { private besuFirstHighNetWorthAccountPriv: string = ""; private besuOptions: IPluginLedgerConnectorBesuOptions | undefined; - private fabricOptions: IPluginLedgerConnectorFabricOptions | undefined; + private fabricConnectorBridgeOptions: IPluginLedgerConnectorFabricOptions | undefined; private besuContractAddress: string | undefined; private besuWrapperContractAddress: string | undefined; @@ -164,6 +167,8 @@ export class CbdcBridgingAppDummyInfrastructure { public async createFabricLedgerConnector(): Promise { const connectionProfileOrg1 = await this.fabric.getConnectionProfileOrg1(); + const connectionProfileOrg2 = await this.fabric.getConnectionProfileOrgX("org2"); + const enrollAdminOutOrg1 = await this.fabric.enrollAdmin(); const adminWalletOrg1 = enrollAdminOutOrg1[1]; [this.userIdentity1] = await this.fabric.enrollUserV2({ @@ -201,7 +206,7 @@ export class CbdcBridgingAppDummyInfrastructure { const keychainEntryKey2 = "userB"; const keychainEntryValue2 = JSON.stringify(userIdentity2); - const keychainEntryKey3 = "bridge"; + const keychainEntryKey3 = CryptoMaterial.keychains.keychain2.ref; const keychainEntryValue3 = JSON.stringify(bridgeIdentity); const keychainEntryKey4 = "adminUser"; @@ -219,9 +224,20 @@ export class CbdcBridgingAppDummyInfrastructure { ]), }); + const bridgeKeychainPlugin = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: CryptoMaterial.keychains.keychain2.id, + logLevel: this.options.logLevel || "INFO", + backend: new Map([ + [keychainEntryKey3, keychainEntryValue3], + ]), + }); + const pluginRegistry = new PluginRegistry({ plugins: [this.fabricKeychainPlugin] }); - this.fabricOptions = { + const bridgePluginRegistry = new PluginRegistry({ plugins: [bridgeKeychainPlugin] }); + + const fabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", @@ -240,8 +256,29 @@ export class CbdcBridgingAppDummyInfrastructure { commitTimeout: 300, }, } + + this.fabricConnectorBridgeOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: bridgePluginRegistry, + cliContainerEnv: this.org2Env, + sshConfig, + connectionProfile: connectionProfileOrg2, + logLevel: this.options.logLevel || "INFO", + discoveryOptions: { + enabled: true, + asLocalhost: true, + }, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + this.log.info(`Creating Fabric Connector...`); - return new PluginLedgerConnectorFabric(this.fabricOptions); + return new PluginLedgerConnectorFabric(fabricOptions); } public async createBesuLedgerConnector(): Promise { @@ -337,6 +374,10 @@ export class CbdcBridgingAppDummyInfrastructure { const fnTag = `${this.className}#createSATPGateways()`; const logLevel = this.options.logLevel || "INFO"; + const fabricGatewayKeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + + const besuGatewayKeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const fabricGatewayIdentity = { id: "fabric-satp-gateway-id", name: "Fabric SATP Gateway", @@ -353,7 +394,7 @@ export class CbdcBridgingAppDummyInfrastructure { id: "besu-satp-gateway-id", name: "Besu SATP Gateway", version: this.draftVersions, - supportedDLTs: [SupportedChain.FABRIC], + supportedDLTs: [SupportedChain.BESU], proofID: "besuGatewayProofID", address: `http://localhost`, gatewayServerPort: 3110, @@ -383,7 +424,7 @@ export class CbdcBridgingAppDummyInfrastructure { }, channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, - options: this.fabricOptions, + options: this.fabricConnectorBridgeOptions, bungeeOptions: pluginBungeeFabricOptions, } as FabricConfig; @@ -402,18 +443,44 @@ export class CbdcBridgingAppDummyInfrastructure { gas: 999999999999999, }; - const besuGatewayOptions = { + const besuGatewayOptions: SATPGatewayConfig = { logLevel: logLevel, gid: besuGatewayIdentity, - counterPartyGateways: [fabricGatewayIdentity], + counterPartyGateways: [{ + id: "fabric-satp-gateway-id", + name: "Fabric SATP Gateway", + version: this.draftVersions, + supportedDLTs: [SupportedChain.FABRIC], + proofID: "fabricGatewayProofID", + address: `http://localhost`, + gatewayServerPort: 3010, + gatewayClientPort: 3011, + gatewayOpenAPIPort: 4010, + pubKey: bufArray2HexStr(fabricGatewayKeyPair.publicKey), + } as GatewayIdentity], bridgesConfig: [besuConfig], + enableOpenAPI: true, + keyPair: besuGatewayKeyPair, }; const fabricGatewayOptions = { logLevel: logLevel, gid: fabricGatewayIdentity, - counterPartyGateways: [besuGatewayIdentity], + counterPartyGateways: [{ + id: "besu-satp-gateway-id", + name: "Besu SATP Gateway", + version: this.draftVersions, + supportedDLTs: [SupportedChain.BESU], + proofID: "besuGatewayProofID", + address: `http://localhost`, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + pubKey: bufArray2HexStr(besuGatewayKeyPair.publicKey), + } as GatewayIdentity], bridgesConfig: [fabricConfig], + enableOpenAPI: true, + keyPair: fabricGatewayKeyPair, }; const besuGateway = await this.gatewayFactory.create(besuGatewayOptions); @@ -550,9 +617,6 @@ export class CbdcBridgingAppDummyInfrastructure { ); const { packageIds, lifecycle, success } = res.data; - expect(res.status).toBe(200); - expect(success).toBe(true); - expect(lifecycle).not.toBeUndefined(); const { approveForMyOrgList, @@ -796,7 +860,7 @@ export class CbdcBridgingAppDummyInfrastructure { } this.besuContractAddress = deployCbdcContractResponse.data.transactionReceipt.contractAddress ?? ""; - + await this.startDummyServer(this.besuContractAddress); const deployWrapperContractResponse = await besuApiClient.deployContractSolBytecodeV1({ keychainId: CryptoMaterial.keychains.keychain2.id, @@ -835,6 +899,19 @@ export class CbdcBridgingAppDummyInfrastructure { }, gas: 1000000, }); + const giveRoleRes1 = await besuApiClient.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [CryptoMaterial.accounts["bridge"].ethAddress], + signingCredential: { + ethAccount: this.besuFirstHighNetWorthAccount, + secret: this.besuFirstHighNetWorthAccountPriv, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); Checks.truthy(giveRoleRes, "giveRoleRes"); } @@ -939,4 +1016,27 @@ export class CbdcBridgingAppDummyInfrastructure { } } + + async startDummyServer(address: string){ + //just to send contract address to the frontend at each run + const app = express(); + app.use(cors()); + const port = 9999; + + // Example endpoint that returns the contract address + app.get('/contract-address', (_req: any, res: { json: (arg0: { address: string; }) => void; }) => { + // Replace this with the actual logic to retrieve the contract address + const contractAddress = address; + res.json({ address: contractAddress }); + }); + app.get('/wrapper-address', (_req: any, res: { json: (arg0: { address: string; }) => void; }) => { + // Replace this with the actual logic to retrieve the contract address + const contractAddress = this.besuWrapperContractAddress!; + res.json({ address: contractAddress }); + }); + + app.listen(port, () => { + //console.log(`Server running on http://localhost:${port}`); + }); + } } \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts index 7a6daa1f37..c900161f7e 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts @@ -53,7 +53,7 @@ describe("Setup CBDC app infrastructure", () => { await app.start(); }); - it("Should shutdown everything successfully", async () => { - await app.stop(); - }); + /*it("Should shutdown everything successfully", async () => { + //await app.stop(); + });*/ }) \ No newline at end of file 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 1c379aa2d1..d6aec4656f 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 @@ -1,25 +1,27 @@ import axios from "axios"; import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getEthAddress, getEthUserPrKey, getFabricId } from "./common"; +import { getEthAddress, getEthUserPrKey } from "./common"; -const BESU_CONTRACT_CBDC_ERC20_NAME = "CBDCcontract"; -const BESU_CONTRACT_ASSET_REF_NAME = "AssetReferenceContract"; +const BESU_CONTRACT_CBDC_ERC20_NAME = "SATPContract"; +const BESU_CONTRACT_WRAPPER_NAME = "SATPWrapperContract"; -export async function transferTokensBesu( +export async function authorizeNTokensBesu( frontendUserFrom: string, - frontendUserTo: string, amount: number, ) { + const response = await fetch("http://localhost:9999/wrapper-address"); + const data = await response.json(); + const wrapperAddress = data.address; + const from = getEthAddress(frontendUserFrom); - const to = getEthAddress(frontendUserTo); - await axios.post( + const res = await axios.post( "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "SEND", - methodName: "transfer", + methodName: "approve", gas: 1000000, - params: [to, amount], + params: [wrapperAddress, amount], signingCredential: { ethAccount: from, secret: getEthUserPrKey(frontendUserFrom), @@ -28,8 +30,41 @@ export async function transferTokensBesu( keychainId: CryptoMaterial.keychains.keychain2.id, }, ); + if (res.status !== 200) { + throw Error(res.status + " :" + res.data); + } } +export async function transferTokensBesu( + frontendUserFrom: string, + frontendUserTo: string, + amount: number, +) { + const from = getEthAddress(frontendUserFrom); + const to = getEthAddress(frontendUserTo); + try { + await axios.post( + "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + invocationType: "SEND", + methodName: "transfer", + gas: 1000000, + params: [to, amount], + signingCredential: { + ethAccount: from, + secret: getEthUserPrKey(frontendUserFrom), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + } catch (error) { + console.error(error); + } +} + +/* export async function escrowTokensBesu( frontendUserFrom: string, amount: number, @@ -54,36 +89,43 @@ export async function escrowTokensBesu( }, ); } +*/ export async function getAssetReferencesBesu(frontendUser: string) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const from = getEthAddress(frontendUser); - - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_ASSET_REF_NAME, - invocationType: "CALL", - methodName: "getAllAssetReferences", - gas: 1000000, - params: [], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUser), - type: "PRIVATE_KEY_HEX", + try { + const response = await axios.post( + "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_WRAPPER_NAME, + invocationType: "CALL", + methodName: "getAllAssets", + gas: 1000000, + params: [], + signingCredential: { + ethAccount: CryptoMaterial.accounts.bridge.ethAddress, + secret: getEthUserPrKey("bridge"), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); + ); - return response.data.callOutput.map((asset: any) => { - return { - id: asset[0], - numberTokens: asset[2], - recipient: getUserFromEthAddress(asset[3]), - }; - }); + return response.data.callOutput.map((asset: any) => { + return { + id: asset[2], + numberTokens: asset[4], + owner: getUserFromEthAddress(asset[3]), + }; + }); + } catch (error) { + console.error(error); + return []; + } } +/* export async function bridgeBackTokensBesu( frontendUser: string, amount: number, @@ -137,28 +179,56 @@ export async function bridgeBackTokensBesu( }, ); } - +*/ export async function getBesuBalance(frontendUser: string) { const userEthAddress = getEthAddress(frontendUser); - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "CALL", - methodName: "balanceOf", - gas: 1000000, - params: [userEthAddress], - signingCredential: { - ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, - secret: CryptoMaterial.accounts["bridge"].privateKey, - type: "PRIVATE_KEY_HEX", + try { + const response = await axios.post( + "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + invocationType: "CALL", + methodName: "checkBalance", + gas: 900000000, + params: [userEthAddress], + signingCredential: { + ethAccount: userEthAddress, + secret: getEthUserPrKey(frontendUser), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); + ); - return parseInt(response.data.callOutput); + return parseInt(response.data.callOutput); + } catch (error) { + console.error(error); + return -1; + } +} +export async function mintTokensBesu(user: string, amount: number) { + const userEthAddress = getEthAddress(user); + try { + await axios.post( + "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: "SEND", + methodName: "mint", + params: [userEthAddress, amount], + signingCredential: { + ethAccount: getEthAddress("Bridge"), + secret: getEthUserPrKey("Bridge"), + type: "PRIVATE_KEY_HEX", + }, + gas: 1000000, + }, + ); + } catch (error) { + console.error(error.msg); + } } function getUserFromEthAddress(ethAddress: string) { 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 4d49a93a5d..5b4b25b769 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 @@ -1,27 +1,35 @@ import axios from "axios"; import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getUserFromPseudonim, getEthAddress, getFabricId } from "./common"; +import { getUserFromPseudonim, getFabricId } from "./common"; const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "cbdc"; -const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; +const FABRIC_CONTRACT_CBDC_ERC20_NAME = "SATPContract"; +const FABRIC_CONTRACT_WRAPPER_NAME = "SATPWrapperContract"; export async function getFabricBalance(frontendUser: string) { const fabricID = getFabricId(frontendUser); - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [fabricID], - methodName: "BalanceOf", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", + let response; + try { + response = await axios.post( + "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [fabricID], + methodName: "ClientIDAccountBalance", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, }, - }, - ); + ); + } catch (error) { + //TODO fix + console.error(error.msg); + return -1; + } + console.log(response); return parseInt(response.data.functionOutput); } @@ -33,7 +41,7 @@ export async function mintTokensFabric(frontendUser: string, amount: string) { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, params: [amount.toString()], - methodName: "Mint", + methodName: "mint", invocationType: "FabricContractInvocationType.SEND", signingCredential: { keychainId: CryptoMaterial.keychains.keychain1.id, @@ -53,26 +61,30 @@ export async function transferTokensFabric( amount: string, ) { const to = getFabricId(frontendUserTo); - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [to, amount.toString()], - methodName: "Transfer", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUserFrom), + try { + const response = await axios.post( + "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [to, amount.toString()], + methodName: "transfer", + invocationType: "FabricContractInvocationType.SEND", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(frontendUserFrom), + }, }, - }, - ); - - if (response.status === 200) { - // throw error + ); + if (response.status === 200) { + // throw error + } + } catch (error) { + throw error; + console.error(error); } } - +/* export async function escrowTokensFabric( frontendUser: string, amount: string, @@ -96,8 +108,8 @@ export async function escrowTokensFabric( if (response.status === 200) { // throw error } -} - +}*/ +/* export async function bridgeOutTokensFabric( frontendUser: string, amount: string, @@ -151,29 +163,60 @@ export async function bridgeOutTokensFabric( }, ); } +*/ +export async function getAssetReferencesFabric( + frontendUser: string, +): Promise { + try { + const response = await axios.post( + "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_WRAPPER_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [], + methodName: "getAllAssets", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(frontendUser), + }, + }, + ); + const array = Array.from(response.data.functionOutput).map((asset) => { + return JSON.parse(asset as string); + }); + return array + .filter((asset: any) => typeof asset === "object") + .map((asset: any) => { + asset.owner = getUserFromFabricId(asset.recipient); + return { + id: asset.id, + numberTokens: asset.amount, + owner: asset.owner, + }; + }); + } catch (error) { + //TODO fix + console.error(error); + return []; + } +} -export async function getAssetReferencesFabric(frontendUser: string) { - const response = await axios.post( +export async function authorizeNTokensFabric(user: string, amount: string) { + await axios.post( "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { - contractName: FABRIC_CONTRACT_ASSET_REF_NAME, + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "GetAllAssetReferences", - invocationType: "FabricContractInvocationType.CALL", + params: [CryptoMaterial.accounts.bridge.fabricID, amount], + methodName: "Approve", + invocationType: "FabricContractInvocationType.SEND", signingCredential: { keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), + keychainRef: getUserFromPseudonim(user), }, }, ); - - return JSON.parse(response.data.functionOutput) - .filter((asset: any) => typeof asset === "object") - .map((asset: any) => { - asset.recipient = getUserFromFabricId(asset.recipient); - return asset; - }); } export function getUserFromFabricId(fabricID: string): string { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx new file mode 100644 index 0000000000..1598c4b73f --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx @@ -0,0 +1,161 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import axios from "axios"; +import CryptoMaterial from "../crypto-material/crypto-material.json"; +import { getEthAddress, getEthUserPrKey } from "./common"; +import { getUserFromPseudonim, getFabricId } from "./common"; +import { + createSessionReference, + SessionReference, +} from "../models/SessionReference"; + +import BesuSATPInteraction from "../ontology/besu-erc20-ontology.json"; +import FabricSATPInteraction from "../ontology/fabric-erc20-ontology.json"; +import { uuidV4 } from "web3-utils"; + +const FABRIC_CHANNEL_NAME = "mychannel"; +const CONTRACT_CBDC_ERC20_NAME = "SATPContract"; +const CONTRACT_WRAPPER_NAME = "SATPWrapperContract"; + +export async function getSessionReferencesBridge(port: string): Promise { + try { + const response = await axios.get( + `http://localhost:${port}/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids`, + {}, + ); + if (response.status !== 200) { + return [ + { + id: "MockID", + status: "undefined", + substatus: "undefined", + originLedger: "undefined", + destinyLedger: "undefined", + }, + ]; + } + const ids = response.data; + + const sessionsData = []; + for (const id of ids) { + try { + const sessionData = await axios.get( + `http://localhost:${port}/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`, + { + params: { SessionID: id }, + }, + ); + const data: SessionReference = createSessionReference( + id, + sessionData.data.status, + sessionData.data.substatus, + sessionData.data.originChain.dltProtocol, + sessionData.data.destinationChain.dltProtocol, + ); + sessionsData.push(data); + } catch (error) { + sessionsData.push({ + id: "MockID", + status: "undefined", + substatus: "undefined", + originLedger: "undefined", + destinyLedger: "undefined", + }); + } + } + return sessionsData; + } catch (error) { + console.log(error); + return [ + { + id: "MockID", + status: "undefined", + substatus: "undefined", + originLedger: "undefined", + destinyLedger: "undefined", + }, + ]; + } +} + +export async function bridgeTokens( + sender: string, + recipient: string, + sourceChain: string, + destinyChain: string, + originAmount: number, + destinyAmount: number, +) { + let senderAddress; + let receiverAddress; + let port; + let sourceAsset; + let destinyAsset; + //only way we found to pass contract address from backend to frontend at each run of tests + const response = await fetch("http://localhost:9999/contract-address"); + const data = await response.json(); + const besuContractAddress = data.address; + + let fromDLTNetworkID; + let toDLTNetworkID; + + if (sourceChain === "Fabric") { + senderAddress = getFabricId(sender); + sourceAsset = setFabricAsset(senderAddress as string); + fromDLTNetworkID = "FabricSATPGateway"; + port = "4010"; + } else { + fromDLTNetworkID = "BesuSATPGateway"; + senderAddress = getEthAddress(sender); + sourceAsset = setBesuAsset(senderAddress as string, besuContractAddress); + port = "4110"; + } + + if (destinyChain === "Fabric") { + toDLTNetworkID = "FabricSATPGateway"; + receiverAddress = getFabricId(recipient); + destinyAsset = setFabricAsset(receiverAddress as string); + } else { + toDLTNetworkID = "BesuSATPGateway"; + receiverAddress = getEthAddress(recipient); + destinyAsset = setBesuAsset(receiverAddress as string, besuContractAddress); + } + try { + await axios.post( + `http://localhost:${port}/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`, + { + contextID: "MockID", + fromDLTNetworkID, + toDLTNetworkID, + fromAmount: originAmount, + toAmount: destinyAmount, + receiver: receiverAddress, + originatorPubkey: senderAddress, + beneficiaryPubkey: receiverAddress, + sourceAsset, + destinyAsset, + }, + ); + } catch (error) { + throw error; + //return true; + } + + function setBesuAsset(owner: string, contractAddress: string) { + return { + owner, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: CONTRACT_CBDC_ERC20_NAME, + contractAddress, + }; + } + + function setFabricAsset(owner: string) { + return { + owner, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + mspId: "Org1MSP", + }; + } +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx index 0b16f4c275..876a08f291 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx @@ -6,12 +6,10 @@ import Grid from "@mui/material/Grid"; import CircularProgress from "@mui/material/CircularProgress"; import MintDialog from "./dialogs/MintDialog"; import TransferDialog from "./dialogs/TransferDialog"; -import EscrowDialog from "./dialogs/EscrowDialog"; -import BridgeOutDialog from "./dialogs/BridgeOutDialog"; -import BridgeBackDialog from "./dialogs/BridgeBackDialog"; +import PermissionDialog from "./dialogs/PermissionDialog"; import { getFabricBalance } from "../api-calls/fabric-api"; import { getBesuBalance } from "../api-calls/besu-api"; -import { AssetReference } from "../models/AssetReference"; +import { SessionReference } from "../models/SessionReference"; const NormalButton = styled(Button)(({ theme }) => ({ margin: "auto", @@ -46,16 +44,14 @@ const CriticalButton = styled(Button)(({ theme }) => ({ export interface IActionsContainerOptions { user: string; ledger: string; - assetRefs: Array; + sessionRefs: Array; } export default function ActionsContainer(props: IActionsContainerOptions) { const [amount, setAmount] = useState(0); const [mintDialog, setMintDialog] = useState(false); const [transferDialog, setTransferDialog] = useState(false); - const [escrowDialog, setEscrowDialog] = useState(false); - const [bridgeOutDialog, setBridgeOutDialog] = useState(false); - const [bridgeBackDialog, setBridgeBackDialog] = useState(false); + const [permissionDialog, setGivePermissionDialog] = useState(false); const [loading, setLoading] = useState(false); useEffect(() => { @@ -111,7 +107,7 @@ export default function ActionsContainer(props: IActionsContainerOptions) { {amount} CBDC - {props.user !== "Bridge" && props.ledger !== "Besu" && ( + {props.user !== "Bridge" && ( )} {props.user === "Bridge" ? ( - - setTransferDialog(true)} - > - Transfer - - + ) : props.ledger === "Besu" ? ( - + )} {props.user !== "Bridge" && ( - - + setEscrowDialog(true)} + onClick={() => setGivePermissionDialog(true)} > - Escrow - + Give Permission + )} + {props.user !== "Bridge" && } {props.ledger === "Fabric" && props.user !== "Bridge" && ( - - asset.recipient === props.user, - ).length === 0 - } - onClick={() => setBridgeOutDialog(true)} - > - Bridge Out - - + )} {props.ledger === "Besu" && props.user !== "Bridge" && ( - - asset.recipient === props.user, - ).length === 0 - } - onClick={() => setBridgeBackDialog(true)} - > - Bridge Back - - + )} )} setMintDialog(false)} /> setTransferDialog(false)} /> - setEscrowDialog(false)} - /> - setBridgeOutDialog(false)} - /> - setBridgeBackDialog(false)} + onClose={() => setGivePermissionDialog(false)} />
); diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx index 7fcc2af5fd..8fe613ec06 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx @@ -4,7 +4,7 @@ import TableCell from "@mui/material/TableCell"; import TableContainer from "@mui/material/TableContainer"; import TableHead from "@mui/material/TableHead"; import TableRow from "@mui/material/TableRow"; -import { AssetReference } from "../models/AssetReference"; +import { SessionReference } from "../models/SessionReference"; const headCells = [ { @@ -12,11 +12,10 @@ const headCells = [ first: true, label: "ID", }, - { id: "amount", numeric: true, label: "Amount" }, - { - id: "owner", - label: "Owner", - }, + { id: "status", label: "Status" }, + { id: "substatus", label: "Substatus" }, + { id: "origin", label: "Origin" }, + { id: "destiny", label: "Destiny" }, ]; function ItemsTableHead() { @@ -47,31 +46,38 @@ function ItemsTableHead() { ); } -export interface IAssetReferencesTableOptions { +export interface ISessionReferencesTableOptions { ledger: string; - assetRefs: AssetReference[]; + sessionRefs: SessionReference[]; } -export default function AssetReferencesTable( - props: IAssetReferencesTableOptions, +export default function SessionReferencesTable( + props: ISessionReferencesTableOptions, ) { return (
- {props.assetRefs && ( + {props.sessionRefs && ( - {props.assetRefs.map((row) => ( + {props.sessionRefs.map((row) => ( {row.id} - {row.numberTokens} - {row.recipient} + {row.status} + {row.substatus} + {row.originLedger} + {row.destinyLedger} ))} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx index 5d6e0e64bb..5e6393534b 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx @@ -2,8 +2,7 @@ import { useState, useEffect } from "react"; import Paper from "@mui/material/Paper"; import Grid from "@mui/material/Grid"; import ActionsContainer from "./ActionsContainer"; -import { getAssetReferencesFabric } from "../api-calls/fabric-api"; -import { getAssetReferencesBesu } from "../api-calls/besu-api"; +import { getSessionReferencesBridge } from "../api-calls/gateway-api"; import AssetReferencesTable from "./AssetReferencesTable"; export interface ILedgerOptions { @@ -11,15 +10,15 @@ export interface ILedgerOptions { } export default function Ledger(props: ILedgerOptions) { - const [assetReferences, setAssetReferences] = useState([]); + const [sessionReferences, setAssetReferences] = useState([]); useEffect(() => { async function fetchData() { if (props.ledger === "Fabric") { - const list = await getAssetReferencesFabric("Alice"); + const list = await getSessionReferencesBridge("4010"); setAssetReferences(list); } else { - const list = await getAssetReferencesBesu("Alice"); + const list = await getSessionReferencesBridge("4110"); setAssetReferences(list); } } @@ -70,7 +69,7 @@ export default function Ledger(props: ILedgerOptions) { @@ -85,7 +84,7 @@ export default function Ledger(props: ILedgerOptions) { @@ -121,11 +120,14 @@ export default function Ledger(props: ILedgerOptions) { -

Asset References

- +

Sessions Status

+ ); } diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx deleted file mode 100644 index dfad91d593..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeBackDialog.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { useEffect, useState } from "react"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import MenuItem from "@mui/material/MenuItem"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { - bridgeBackTokensBesu, - getAssetReferencesBesu, -} from "../../api-calls/besu-api"; -import { AssetReference } from "../../models/AssetReference"; - -export interface IBridgeBackDialogOptions { - user: string; - open: boolean; - onClose: () => any; -} - -export default function BridgeBackDialog(props: IBridgeBackDialogOptions) { - const [assetRefs, setAssetRefs] = useState([]); - const [assetRefID, setAssetRefID] = useState(""); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - async function fetchData() { - const list = await getAssetReferencesBesu(props.user); - setAssetRefs( - list.filter((asset: AssetReference) => asset.recipient === props.user), - ); - } - - if (props.open) { - setSending(false); - setAssetRefID(""); - fetchData(); - } - }, [props.open, props.user]); - - const handleChangeAssetRefID = (event: SelectChangeEvent) => { - setAssetRefID(event.target.value); - }; - - const performBridgeBackTransaction = async () => { - if (assetRefID === "") { - setErrorMessage("Please choose a valid Asset Reference ID"); - } else { - setSending(true); - const assetRef = assetRefs.find((asset) => asset.id === assetRefID); - if (assetRef === undefined) { - setErrorMessage("Something went wrong. Asset Reference not found"); - return; - } - await bridgeBackTokensBesu( - props.user, - parseInt(assetRef.numberTokens), - assetRefID, - ); - props.onClose(); - } - }; - - return ( - - {"Bridge Back CBDC"} - - - Select the {props.user}"s Asset Reference that represents the amount - to bridge back. - - {assetRefs.length === 0 ? ( - - Must escrow tokens before trying to bridge back CBDC. - - ) : ( - - )} - {errorMessage !== "" && {errorMessage}} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx deleted file mode 100644 index ad5a6da0fc..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/BridgeOutDialog.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { useEffect, useState } from "react"; -import DialogActions from "@mui/material/DialogActions"; -import DialogContent from "@mui/material/DialogContent"; -import DialogContentText from "@mui/material/DialogContentText"; -import DialogTitle from "@mui/material/DialogTitle"; -import MenuItem from "@mui/material/MenuItem"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; -import Button from "@mui/material/Button"; -import Dialog from "@mui/material/Dialog"; -import Alert from "@mui/material/Alert"; -import { - bridgeOutTokensFabric, - getAssetReferencesFabric, -} from "../../api-calls/fabric-api"; -import { AssetReference } from "../../models/AssetReference"; - -export interface IBridgeOutDialogOptions { - user: string; - open: boolean; - onClose: () => any; -} - -export default function BridgeOutDialog(props: IBridgeOutDialogOptions) { - const [assetRefs, setAssetRefs] = useState([]); - const [assetRefID, setAssetRefID] = useState(""); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); - - useEffect(() => { - async function fetchData() { - const list = await getAssetReferencesFabric(props.user); - setAssetRefs( - list.filter((asset: AssetReference) => asset.recipient === props.user), - ); - } - - if (props.open) { - setSending(false); - setAssetRefID(""); - fetchData(); - } - }, [props.open, props.user]); - - const handleChangeAssetRefID = (event: SelectChangeEvent) => { - setAssetRefID(event.target.value); - }; - - const performBridgeOutTransaction = async () => { - if (assetRefID === "") { - setErrorMessage("Please choose a valid Asset Reference ID"); - } else { - setSending(true); - const assetRef = assetRefs.find((asset) => asset.id === assetRefID); - if (assetRef === undefined) { - setErrorMessage("Something went wrong. Asset Reference not found"); - return; - } - await bridgeOutTokensFabric( - props.user, - assetRef.numberTokens, - assetRefID, - ); - props.onClose(); - } - }; - - return ( - - {"Bridge Out CBDC"} - - - Select the {props.user}"s Asset Reference that represents the amount - to bridge out. - - {assetRefs.length === 0 ? ( - - Must escrow tokens before trying to bridge out CBDC. - - ) : ( - - )} - {errorMessage !== "" && {errorMessage}} - - - {sending ? ( - - ) : ( -
- - -
- )} -
-
- ); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx index ebf28ff573..bf03a6f447 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx @@ -8,10 +8,13 @@ import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; import { mintTokensFabric } from "../../api-calls/fabric-api"; +import { mintTokensBesu } from "../../api-calls/besu-api"; +//import { mintTokensFabric } from "../../api-calls/fabric-api"; export interface IMintDialogOptions { open: boolean; user: string; + ledger: string; onClose: () => any; } @@ -46,7 +49,11 @@ export default function MintDialog(props: IMintDialogOptions) { setErrorMessage("Amount must be a positive value"); } else { setSending(true); - await mintTokensFabric(props.user, amount.toString()); + if (props.ledger === "Fabric") { + await mintTokensFabric(props.user, amount.toString()); + } else { + await mintTokensBesu(props.user, amount); + } props.onClose(); } }; @@ -84,7 +91,7 @@ export default function MintDialog(props: IMintDialogOptions) { ) : (
- +
)} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx similarity index 61% rename from examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx rename to examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx index 6e24e46bfd..d84c61d00a 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/EscrowDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx @@ -1,5 +1,4 @@ -import { ChangeEvent, useEffect, useState } from "react"; -import { v4 as uuidv4 } from "uuid"; +import { useState, useEffect, ChangeEvent } from "react"; import DialogActions from "@mui/material/DialogActions"; import DialogContent from "@mui/material/DialogContent"; import DialogContentText from "@mui/material/DialogContentText"; @@ -8,26 +7,26 @@ import TextField from "@mui/material/TextField"; import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; -import { escrowTokensFabric } from "../../api-calls/fabric-api"; -import { escrowTokensBesu } from "../../api-calls/besu-api"; +import { authorizeNTokensFabric } from "../../api-calls/fabric-api"; +import { authorizeNTokensBesu } from "../../api-calls/besu-api"; -export interface IEscrowDialogOptions { +export interface IPermissionDialogOptions { open: boolean; user: string; ledger: string; onClose: () => any; } -export default function EscrowDialog(props: IEscrowDialogOptions) { - const [assetRefID, setAssetRefID] = useState(""); - const [amount, setAmount] = useState(0); - const [errorMessage, setErrorMessage] = useState(""); - const [sending, setSending] = useState(false); +export default function setGivePermissionDialog( + props: IPermissionDialogOptions, +) { + const [amount, setAmount] = useState(0); + const [errorMessage, setErrorMessage] = useState(""); + const [sending, setSending] = useState(false); useEffect(() => { if (props.open) { setSending(false); - setAssetRefID(uuidv4()); setAmount(0); } }, [props.open]); @@ -46,40 +45,28 @@ export default function EscrowDialog(props: IEscrowDialogOptions) { } }; - const performEscrowTransaction = async () => { + const performAccessTransaction = async () => { if (amount === 0) { setErrorMessage("Amount must be a positive value"); } else { setSending(true); if (props.ledger === "Fabric") { - await escrowTokensFabric(props.user, amount.toString(), assetRefID); + await authorizeNTokensFabric(props.user, amount.toString()); } else { - await escrowTokensBesu(props.user, amount, assetRefID); + await authorizeNTokensBesu(props.user, amount); } - props.onClose(); } }; return ( - {"Escrow CBDC"} + {"Give Permission"} - Select the recipient of the CBDC and how many you would like to - transfer from {props.user}"s address? + How many tokens would you like to give permission to {props.user}"s + address? - - + )} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx index c87fcbe7ff..96de98d79d 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx @@ -11,8 +11,10 @@ import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; import { transferTokensFabric } from "../../api-calls/fabric-api"; import { transferTokensBesu } from "../../api-calls/besu-api"; +import { bridgeTokens } from "../../api-calls/gateway-api"; -const recipients = ["Alice", "Charlie", "Bridge"]; +const recipients = ["Alice", "Charlie"]; +const chains = ["Fabric", "Besu"]; export interface ITransferDialogOptions { open: boolean; ledger: string; @@ -22,7 +24,9 @@ export interface ITransferDialogOptions { export default function TransferDialog(props: ITransferDialogOptions) { const [recipient, setRecipient] = useState(""); - const [amount, setAmount] = useState(0); + const [originAmount, setSourceAmount] = useState(0); + const [destinyAmount, setDestinyAmount] = useState(0); + const [destinyChain, setDestinyChain] = useState(""); const [errorMessage, setErrorMessage] = useState(""); const [sending, setSending] = useState(false); @@ -30,21 +34,36 @@ export default function TransferDialog(props: ITransferDialogOptions) { if (props.open) { setSending(false); setRecipient(""); - setAmount(0); + setSourceAmount(0); + setDestinyAmount(0); + setDestinyChain(""); } }, [props.open]); - const handleChangeAmount = ( + const handleChangeOriginAmount = ( event: ChangeEvent, ) => { const value = parseInt(event.target.value); if (value < 0) { setErrorMessage("Amount must be a positive value"); - setAmount(0); + setSourceAmount(0); } else { setErrorMessage(""); - setAmount(value); + setSourceAmount(value); + } + }; + const handleChangeDestinyAmount = ( + event: ChangeEvent, + ) => { + const value = parseInt(event.target.value); + + if (value < 0) { + setErrorMessage("Amount must be a positive value"); + setDestinyAmount(0); + } else { + setErrorMessage(""); + setDestinyAmount(value); } }; @@ -52,15 +71,34 @@ export default function TransferDialog(props: ITransferDialogOptions) { setRecipient(event.target.value); }; + const handleChangeDestinyChain = (event: SelectChangeEvent) => { + setDestinyChain(event.target.value); + }; + const performTransferTransaction = async () => { - if (amount === 0) { - setErrorMessage("Amount must be a positive value"); + if (originAmount === 0 || destinyAmount === 0) { + setErrorMessage("Amounts must be a positive value"); } else { setSending(true); - if (props.ledger === "Fabric") { - await transferTokensFabric(props.user, recipient, amount.toString()); + if (props.ledger === destinyChain) { + if (props.ledger === "Fabric") { + await transferTokensFabric( + props.user, + recipient, + originAmount.toString(), + ); + } else { + await transferTokensBesu(props.user, recipient, originAmount); + } } else { - await transferTokensBesu(props.user, recipient, amount); + await bridgeTokens( + props.user, + recipient, + props.ledger, + destinyChain, + originAmount, + destinyAmount, + ); } props.onClose(); @@ -72,7 +110,7 @@ export default function TransferDialog(props: ITransferDialogOptions) { {"Transfer CBDC"} - Select the recipient of the CBDC and how many you would like to + Select the recipient of the CBDC, target chain, and how many you would transfer from {props.user}"s address? + + {errorMessage !== "" && ( diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/models/SessionReference.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/models/SessionReference.tsx new file mode 100644 index 0000000000..f5dde8d84c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/models/SessionReference.tsx @@ -0,0 +1,23 @@ +export interface SessionReference { + id: string; + status: string; + substatus: string; + originLedger: string; + destinyLedger: string; +} + +export function createSessionReference( + id: string, + status: string, + substatus: string, + originLedger: string, + destinyLedger: string, +): SessionReference { + return { + id, + status, + substatus, + originLedger, + destinyLedger, + }; +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/ontology/besu-erc20-ontology.json b/examples/cactus-example-cbdc-bridging-frontend/src/ontology/besu-erc20-ontology.json new file mode 100644 index 0000000000..b047543d6d --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/ontology/besu-erc20-ontology.json @@ -0,0 +1,50 @@ +{ + "name": "SATP-ERC20", + "contract": "solidity", + "ontology": { + "lock": [{ + "functionSignature": "transfer(address,address,uint256)", + "variables": ["owner", "bridge", "amount"], + "available": true + } + ], + "unlock": [{ + "functionSignature": "approve(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + }, + { + "functionSignature": "transfer(address,address,uint256)", + "variables": ["bridge", "owner", "amount"], + "available": true + } + ], + "mint": [{ + "functionSignature": "mint(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + } + ], + "burn": [{ + "functionSignature": "burn(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + } + ], + "assign": [{ + "functionSignature": "assign(address,address,uint256)", + "variables": ["bridge", "receiver", "amount"], + "available": true + } + ], + "checkPermission": [{ + "functionSignature": "hasPermission(address)", + "variables": ["bridge"], + "available": true + } + ] + }, + "bytecode": "", + "ownerSignature": "", + "bridgeSignature": "" +} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/ontology/fabric-erc20-ontology.json b/examples/cactus-example-cbdc-bridging-frontend/src/ontology/fabric-erc20-ontology.json new file mode 100644 index 0000000000..472d18de98 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/ontology/fabric-erc20-ontology.json @@ -0,0 +1,38 @@ +{ + "name": "SATP-ERC20", + "contract": "fabric", + "ontology": { + "lock": [{ + "functionSignature": "transferFrom", + "variables": ["owner", "bridge", "amount"] + } + ], + "unlock": [{ + "functionSignature": "transfer", + "variables": ["owner", "amount"] + } + ], + "mint": [{ + "functionSignature": "mint", + "variables": ["amount"] + } + ], + "burn": [{ + "functionSignature": "burn", + "variables": ["amount"] + } + ], + "assign": [{ + "functionSignature": "assign", + "variables": ["bridge", "receiver", "amount"] + } + ], + "checkPermission": [{ + "functionSignature": "hasPermission", + "variables": ["bridgeMSPID"] + } + ] + }, + "ownerSignature": "", + "bridgeSignature": "" +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index e93d543dcb..69645aaca1 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -97,6 +97,7 @@ "body-parser": "1.20.2", "class-transformer": "0.5.1", "class-validator": "0.14.1", + "cors": "2.8.5", "crypto-js": "4.2.0", "dotenv": "16.4.5", "ethereum-abi-types-generator": "1.3.4", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts index 4e024836e9..b123f94af0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -66,7 +66,9 @@ export class Stage0SATPHandler implements SATPHandler { const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, New Session...`); - this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + this.Log.debug( + `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + ); let session = this.sessions.get(req.sessionId); @@ -108,7 +110,9 @@ export class Stage0SATPHandler implements SATPHandler { const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, PreSATPTransfer...`); - this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + this.Log.debug( + `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + ); const session = this.sessions.get(req.sessionId); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 6dec68a438..cb18227693 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -65,7 +65,9 @@ export class Stage1SATPHandler implements SATPHandler { const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, Transfer Proposal...`); - this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + this.Log.debug( + `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + ); const session = this.sessions.get(getSessionId(req)); if (!session) { @@ -104,7 +106,9 @@ export class Stage1SATPHandler implements SATPHandler { const fnTag = `${this.getHandlerIdentifier()}#${stepTag}`; try { this.Log.debug(`${fnTag}, Transfer Commence...`); - this.Log.debug(`${fnTag}, Request: ${req}, Context: ${context}`); + this.Log.debug( + `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + ); const session = this.sessions.get(getSessionId(req)); if (!session) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index a417c931e9..453c96b26f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -55,7 +55,7 @@ import { SATPBridgesManager, } from "./gol/satp-bridges-manager"; import bodyParser from "body-parser"; - +import cors from "cors"; export class SATPGateway implements IPluginWebService, ICactusPlugin { // todo more checks; example port from config is between 3000 and 9000 @IsDefined() @@ -381,7 +381,8 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { throw new Error("BLODispatcher is not defined"); } this.BLOApplication = express(); - this.BLOApplication.use(bodyParser.json({ limit: "50mb" })); + this.BLOApplication.use(bodyParser.json({ limit: "250mb" })); + this.BLOApplication.use(cors()); try { const webServices = await this.BLODispatcher.getOrCreateWebServices(); for (const service of webServices) { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts index fdc95c76a3..123267d79b 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts @@ -75,6 +75,7 @@ import { import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; import { createClient } from "../test-utils"; +import { bufArray2HexStr } from "../../../main/typescript/gateway-utils"; const logLevel: LogLevelDesc = "DEBUG"; const log = LoggerProvider.getOrCreate({ @@ -963,6 +964,8 @@ describe("2 SATPGateway sending a token from Besu to Fabric using openApi to req address: "http://localhost" as Address, } as GatewayIdentity; + const gateway1KeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const gatewayIdentity2 = { id: "mockID-2", name: "CustomGateway", @@ -981,18 +984,58 @@ describe("2 SATPGateway sending a token from Besu to Fabric using openApi to req gatewayOpenAPIPort: 4110, } as GatewayIdentity; + const gateway2KeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const options1: SATPGatewayConfig = { logLevel: "DEBUG", gid: gatewayIdentity1, - counterPartyGateways: [gatewayIdentity2], //only knows itself + counterPartyGateways: [ + // this need to be like this because the shared memory was being altered + { + id: "mockID-2", + name: "CustomGateway", + pubKey: bufArray2HexStr(gateway2KeyPair.publicKey), + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address: "http://localhost" as Address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + }, + ], bridgesConfig: [besuConfig], + keyPair: gateway1KeyPair, }; const options2: SATPGatewayConfig = { logLevel: "DEBUG", gid: gatewayIdentity2, - counterPartyGateways: [gatewayIdentity1], //only knows itself + counterPartyGateways: [ + { + id: "mockID-1", + name: "CustomGateway", + pubKey: bufArray2HexStr(gateway1KeyPair.publicKey), + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + }, + ], bridgesConfig: [fabricConfig], + keyPair: gateway2KeyPair, }; const gateway1 = await factory.create(options1); expect(gateway1).toBeInstanceOf(SATPGateway); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts index a41c7989ee..e9ade116f2 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts @@ -74,6 +74,7 @@ import { } from "@hyperledger/cactus-core-api"; import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { bufArray2HexStr } from "../../../main/typescript/gateway-utils"; const logLevel: LogLevelDesc = "DEBUG"; const log = LoggerProvider.getOrCreate({ @@ -962,6 +963,8 @@ describe("2 SATPGateway sending a token from Besu to Fabric", () => { address: "http://localhost" as Address, } as GatewayIdentity; + const gateway1KeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const gatewayIdentity2 = { id: "mockID-2", name: "CustomGateway", @@ -977,20 +980,61 @@ describe("2 SATPGateway sending a token from Besu to Fabric", () => { address: "http://localhost" as Address, gatewayServerPort: 3110, gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, } as GatewayIdentity; + const gateway2KeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const options1: SATPGatewayConfig = { logLevel: "DEBUG", gid: gatewayIdentity1, - counterPartyGateways: [gatewayIdentity2], //only knows itself + counterPartyGateways: [ + // this need to be like this because the shared memory was being altered + { + id: "mockID-2", + name: "CustomGateway", + pubKey: bufArray2HexStr(gateway2KeyPair.publicKey), + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address: "http://localhost" as Address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + }, + ], bridgesConfig: [besuConfig], + keyPair: gateway1KeyPair, }; const options2: SATPGatewayConfig = { logLevel: "DEBUG", gid: gatewayIdentity2, - counterPartyGateways: [gatewayIdentity1], //only knows itself + counterPartyGateways: [ + { + id: "mockID-1", + name: "CustomGateway", + pubKey: bufArray2HexStr(gateway1KeyPair.publicKey), + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + }, + ], bridgesConfig: [fabricConfig], + keyPair: gateway2KeyPair, }; const gateway1 = await factory.create(options1); expect(gateway1).toBeInstanceOf(SATPGateway); diff --git a/yarn.lock b/yarn.lock index 031903a4cb..94631ef390 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10884,6 +10884,7 @@ __metadata: body-parser: "npm:1.20.3" class-transformer: "npm:0.5.1" class-validator: "npm:0.14.1" + cors: "npm:2.8.5" crypto-js: "npm:4.2.0" dotenv: "npm:16.4.5" ethereum-abi-types-generator: "npm:1.3.4" From 4a3ff89f84e897f8554839d9f708b619539bd88a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Augusto?= Date: Mon, 16 Sep 2024 21:13:55 +0100 Subject: [PATCH 38/49] docs(example-cbdc): update frontend to match new functionality * Separated Transfer functionality into local blockchain transfers and cross-chain transfers * Added new table with the state of token approvals made to the bridge * Highlight cross-chain functionality with red coloring * add helper page with instructions on how to use app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Augusto --- .../chaincode-typescript/src/tokenERC20.ts | 1 + .../package.json | 1 + .../src/App.tsx | 16 +- .../src/api-calls/besu-api.tsx | 30 ++++ .../src/api-calls/fabric-api.tsx | 28 +++- .../src/api-calls/gateway-api.tsx | 22 +-- .../src/components/ActionsContainer.tsx | 104 ++++++++----- .../src/components/ApprovalsTable.tsx | 75 ++++++++++ .../src/components/AssetReferencesTable.tsx | 2 +- .../src/components/Ledger.tsx | 122 ++++++--------- .../src/components/buttons/CriticalButton.tsx | 19 +++ .../src/components/buttons/NormalButton.tsx | 15 ++ .../dialogs/CrossChainTransferDialog.tsx | 140 ++++++++++++++++++ .../src/components/dialogs/MintDialog.tsx | 3 +- .../components/dialogs/PermissionDialog.tsx | 18 ++- .../src/components/dialogs/TransferDialog.tsx | 119 ++++----------- .../components/docs/DummyActionsContainer.tsx | 56 +++++++ .../src/index.tsx | 2 + .../src/pages/Helper.tsx | 107 +++++++++++++ .../src/pages/HomePage.tsx | 14 +- yarn.lock | 32 ++++ 21 files changed, 694 insertions(+), 232 deletions(-) create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/buttons/CriticalButton.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/buttons/NormalButton.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/components/docs/DummyActionsContainer.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/pages/Helper.tsx diff --git a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts index 2f844511b3..043b1b943f 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/fabric-contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts @@ -307,6 +307,7 @@ class TokenERC20Contract extends Contract { * @param {String} spender The spender who are able to transfer the tokens * @returns {Number} Return the amount of remaining tokens allowed to spent */ + @Transaction(false) async Allowance( ctx: Context, owner: string, diff --git a/examples/cactus-example-cbdc-bridging-frontend/package.json b/examples/cactus-example-cbdc-bridging-frontend/package.json index 98071a1deb..3f57dbb9bf 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/package.json +++ b/examples/cactus-example-cbdc-bridging-frontend/package.json @@ -36,6 +36,7 @@ "axios": "1.7.7", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-router-dom": "^6.2.1", "react-scripts": "5.0.1", "typescript": "5.5.2", "uuid": "10.0.0", diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx index 7e73dd240f..3fa4a8c6ff 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx @@ -1,14 +1,18 @@ -import React from "react"; +import { BrowserRouter, Routes, Route } from "react-router-dom"; import HomePage from "./pages/HomePage"; -import { CssBaseline } from "@mui/material"; +import Helper from "./pages/Helper"; import "./App.css"; function App() { return ( - <> - - - + + + + } /> + } /> + + + ); } 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 d6aec4656f..5e150aae43 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 @@ -35,6 +35,36 @@ export async function authorizeNTokensBesu( } } +export async function fetchAmountApprovedToBridge(frontendUser: string) { + const response = await fetch("http://localhost:9999/wrapper-address"); + const data = await response.json(); + const wrapperAddress = data.address; + + try { + const from = getEthAddress(frontendUser); + const response = await axios.post( + "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + { + contractName: BESU_CONTRACT_CBDC_ERC20_NAME, + invocationType: "CALL", + methodName: "allowance", + gas: 1000000, + params: [from, wrapperAddress], + signingCredential: { + ethAccount: from, + secret: getEthUserPrKey(frontendUser), + type: "PRIVATE_KEY_HEX", + }, + keychainId: CryptoMaterial.keychains.keychain2.id, + }, + ); + return parseInt(response.data.callOutput); + } catch (error) { + // there is no allowance, so we will return 0 + return 0; + } +} + export async function transferTokensBesu( frontendUserFrom: string, frontendUserTo: string, 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 5b4b25b769..986ebe9378 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 @@ -29,7 +29,6 @@ export async function getFabricBalance(frontendUser: string) { console.error(error.msg); return -1; } - console.log(response); return parseInt(response.data.functionOutput); } @@ -219,6 +218,33 @@ export async function authorizeNTokensFabric(user: string, amount: string) { ); } +export async function fetchAmountApprovedToBridge(frontendUser: string) { + const owner = getFabricId(frontendUser); + let response; + + try { + response = await axios.post( + "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + { + contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, + channelName: FABRIC_CHANNEL_NAME, + params: [owner, CryptoMaterial.accounts.bridge.fabricID], + methodName: "Allowance", + invocationType: "FabricContractInvocationType.CALL", + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: getUserFromPseudonim(frontendUser), + }, + }, + ); + } catch (error) { + // there is no allowance, so we will return 0 + return 0; + } + + return parseInt(response.data.functionOutput); +} + export function getUserFromFabricId(fabricID: string): string { switch (fabricID) { case CryptoMaterial.accounts["userA"].fabricID: diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx index 1598c4b73f..2ae5306335 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx @@ -81,15 +81,14 @@ export async function bridgeTokens( sender: string, recipient: string, sourceChain: string, - destinyChain: string, - originAmount: number, - destinyAmount: number, + destinationChain: string, + amount: number, ) { let senderAddress; let receiverAddress; let port; let sourceAsset; - let destinyAsset; + let destinationAsset; //only way we found to pass contract address from backend to frontend at each run of tests const response = await fetch("http://localhost:9999/contract-address"); const data = await response.json(); @@ -110,14 +109,17 @@ export async function bridgeTokens( port = "4110"; } - if (destinyChain === "Fabric") { + if (destinationChain === "Fabric") { toDLTNetworkID = "FabricSATPGateway"; receiverAddress = getFabricId(recipient); - destinyAsset = setFabricAsset(receiverAddress as string); + destinationAsset = setFabricAsset(receiverAddress as string); } else { toDLTNetworkID = "BesuSATPGateway"; receiverAddress = getEthAddress(recipient); - destinyAsset = setBesuAsset(receiverAddress as string, besuContractAddress); + destinationAsset = setBesuAsset( + receiverAddress as string, + besuContractAddress, + ); } try { await axios.post( @@ -126,13 +128,13 @@ export async function bridgeTokens( contextID: "MockID", fromDLTNetworkID, toDLTNetworkID, - fromAmount: originAmount, - toAmount: destinyAmount, + fromAmount: amount, + toAmount: amount, receiver: receiverAddress, originatorPubkey: senderAddress, beneficiaryPubkey: receiverAddress, sourceAsset, - destinyAsset, + destinyAsset: destinationAsset, }, ); } catch (error) { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx index 876a08f291..61268cd5b9 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx @@ -1,56 +1,61 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { useState, useEffect } from "react"; -import { styled } from "@mui/material/styles"; -import Button, { ButtonProps } from "@mui/material/Button"; +import Paper from "@mui/material/Paper"; import Grid from "@mui/material/Grid"; import CircularProgress from "@mui/material/CircularProgress"; import MintDialog from "./dialogs/MintDialog"; +import CrossChainTransferDialog from "./dialogs/CrossChainTransferDialog"; import TransferDialog from "./dialogs/TransferDialog"; import PermissionDialog from "./dialogs/PermissionDialog"; import { getFabricBalance } from "../api-calls/fabric-api"; import { getBesuBalance } from "../api-calls/besu-api"; import { SessionReference } from "../models/SessionReference"; +import { NormalButton } from "./buttons/NormalButton"; +import { CriticalButton } from "./buttons/CriticalButton"; -const NormalButton = styled(Button)(({ theme }) => ({ - margin: "auto", - width: "100%", - fontSize: "13px", - textTransform: "none", - background: "#2B9BF6", - color: "#FFFFFF", - border: "0.5px solid #000000", - "&:disabled": { - border: "0", - }, -})); +// const NormalButton = styled(Button)(({ theme }) => ({ +// margin: "auto", +// width: "100%", +// fontSize: "13px", +// textTransform: "none", +// background: "#2B9BF6", +// color: "#FFFFFF", +// border: "0.5px solid #000000", +// "&:disabled": { +// border: "0", +// }, +// })); -const CriticalButton = styled(Button)(({ theme }) => ({ - margin: "auto", - width: "100%", - fontSize: "13px", - textTransform: "none", - background: "#FF584B", - color: "#FFFFFF", - border: "0.5px solid #000000", - "&:hover": { - backgroundColor: "#444444", - color: "#FFFFFF", - }, - "&:disabled": { - border: "0", - }, -})); +// const CriticalButton = styled(Button)(({ theme }) => ({ +// margin: "auto", +// width: "100%", +// fontSize: "13px", +// textTransform: "none", +// background: "#FF584B", +// color: "#FFFFFF", +// border: "0.5px solid #000000", +// "&:hover": { +// backgroundColor: "#444444", +// color: "#FFFFFF", +// }, +// "&:disabled": { +// border: "0", +// }, +// })); export interface IActionsContainerOptions { user: string; ledger: string; sessionRefs: Array; + tokensApproved: number; } export default function ActionsContainer(props: IActionsContainerOptions) { const [amount, setAmount] = useState(0); const [mintDialog, setMintDialog] = useState(false); const [transferDialog, setTransferDialog] = useState(false); + const [crossChainTransferDialog, setCrossChainTransferDialog] = + useState(false); const [permissionDialog, setGivePermissionDialog] = useState(false); const [loading, setLoading] = useState(false); @@ -72,7 +77,13 @@ export default function ActionsContainer(props: IActionsContainerOptions) { }, [props.user, props.ledger]); return ( -
+ {loading ? (
)} {props.user !== "Bridge" && ( - - + setGivePermissionDialog(true)} > - Give Permission - + Approval + + + )} + {props.user !== "Bridge" && ( + + setCrossChainTransferDialog(true)} + > + Bridge + )} - {props.user !== "Bridge" && } {props.ledger === "Fabric" && props.user !== "Bridge" && ( )} @@ -170,14 +191,23 @@ export default function ActionsContainer(props: IActionsContainerOptions) { open={transferDialog} user={props.user} ledger={props.ledger} + balance={amount} onClose={() => setTransferDialog(false)} /> + setCrossChainTransferDialog(false)} + /> setGivePermissionDialog(false)} /> -
+ ); } diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx new file mode 100644 index 0000000000..aaea6f4030 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx @@ -0,0 +1,75 @@ +import Table from "@mui/material/Table"; +import TableBody from "@mui/material/TableBody"; +import TableCell from "@mui/material/TableCell"; +import TableContainer from "@mui/material/TableContainer"; +import TableHead from "@mui/material/TableHead"; +import TableRow from "@mui/material/TableRow"; +import { SessionReference } from "../models/SessionReference"; + +const headCells = [ + { + id: "User", + first: true, + label: "User", + }, + { id: "Amount", label: "Amount" }, +]; + +function ItemsTableHead() { + return ( + + + {headCells.map((headCell) => ( + + {headCell.label} + + ))} + + + ); +} + +export interface IApprovalsTableOptions { + ledger: string; + sessionRefs: SessionReference[]; + aliceApprovals: number; + charlieApprovals: number; +} + +export default function ApprovalsTable(props: IApprovalsTableOptions) { + return ( + +
+ + + + + Alice + + {props.aliceApprovals} + + + + Charlie + + {props.charlieApprovals} + + +
+
+ ); +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx index 8fe613ec06..f8211a46ec 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx @@ -15,7 +15,7 @@ const headCells = [ { id: "status", label: "Status" }, { id: "substatus", label: "Substatus" }, { id: "origin", label: "Origin" }, - { id: "destiny", label: "Destiny" }, + { id: "destination", label: "Destination" }, ]; function ItemsTableHead() { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx index 5e6393534b..a3c96fb155 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx @@ -2,8 +2,12 @@ import { useState, useEffect } from "react"; import Paper from "@mui/material/Paper"; import Grid from "@mui/material/Grid"; import ActionsContainer from "./ActionsContainer"; +import CircularProgress from "@mui/material/CircularProgress"; import { getSessionReferencesBridge } from "../api-calls/gateway-api"; +import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridgeFabric } from "../api-calls/fabric-api"; +import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridgeBesu } from "../api-calls/besu-api"; import AssetReferencesTable from "./AssetReferencesTable"; +import ApprovalsTable from "./ApprovalsTable"; export interface ILedgerOptions { ledger: string; @@ -11,16 +15,32 @@ export interface ILedgerOptions { export default function Ledger(props: ILedgerOptions) { const [sessionReferences, setAssetReferences] = useState([]); + const [aliceApprovals, setAliceApprovals] = useState(0); + const [charlieApprovals, setCharlieApprovals] = useState(0); + const [loading, setLoading] = useState(true); useEffect(() => { async function fetchData() { if (props.ledger === "Fabric") { const list = await getSessionReferencesBridge("4010"); setAssetReferences(list); + + const alice = await fetchAmountApprovedToBridgeFabric("Alice"); + setAliceApprovals(alice); + + const charlie = await fetchAmountApprovedToBridgeFabric("Charlie"); + setCharlieApprovals(charlie); } else { const list = await getSessionReferencesBridge("4110"); setAssetReferences(list); + + const alice = await fetchAmountApprovedToBridgeBesu("Alice"); + setAliceApprovals(alice); + + const charlie = await fetchAmountApprovedToBridgeBesu("Charlie"); + setCharlieApprovals(charlie); } + setLoading(false); } fetchData(); @@ -36,93 +56,41 @@ export default function Ledger(props: ILedgerOptions) { }} >

Hyperledger {props.ledger}

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

- Org1 -

- ) : ( -

- -- -

- )} - - - + - - - + - {props.ledger === "Fabric" ? ( -

- Org2 -

+

Token Approvals to Bridge

+ {loading ? ( +
+ +
) : ( -

- -- -

- )} - - - + )}

Sessions Status

(({}) => ({ + margin: "auto", + width: "100%", + fontSize: "13px", + textTransform: "none", + background: "#FF584B", + color: "#FFFFFF", + border: "0.5px solid #000000", + "&:hover": { + backgroundColor: "#444444", + color: "#FFFFFF", + }, + "&:disabled": { + border: "0", + }, +})); diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/buttons/NormalButton.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/buttons/NormalButton.tsx new file mode 100644 index 0000000000..8c140de929 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/buttons/NormalButton.tsx @@ -0,0 +1,15 @@ +import { styled } from "@mui/material/styles"; +import Button, { ButtonProps } from "@mui/material/Button"; + +export const NormalButton = styled(Button)(({}) => ({ + margin: "auto", + width: "100%", + fontSize: "13px", + textTransform: "none", + background: "#2B9BF6", + color: "#FFFFFF", + border: "0.5px solid #000000", + "&:disabled": { + border: "0", + }, +})); diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx new file mode 100644 index 0000000000..2100ce68b3 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx @@ -0,0 +1,140 @@ +import { useState, useEffect, ChangeEvent } from "react"; +import DialogActions from "@mui/material/DialogActions"; +import DialogContent from "@mui/material/DialogContent"; +import DialogContentText from "@mui/material/DialogContentText"; +import DialogTitle from "@mui/material/DialogTitle"; +import TextField from "@mui/material/TextField"; +import MenuItem from "@mui/material/MenuItem"; +import Select, { SelectChangeEvent } from "@mui/material/Select"; +import Button from "@mui/material/Button"; +import Dialog from "@mui/material/Dialog"; +import Alert from "@mui/material/Alert"; +import { bridgeTokens } from "../../api-calls/gateway-api"; + +const recipients = ["Alice", "Charlie"]; + +export interface ICrossChainTransferDialogOptions { + open: boolean; + ledger: string; + user: string; + tokensApproved: number; + onClose: () => unknown; +} + +export default function CrossChainTransferDialog( + props: ICrossChainTransferDialogOptions, +) { + const [recipient, setRecipient] = useState(""); + const [amount, setAmount] = useState(0); + const [errorMessage, setErrorMessage] = useState(""); + const [sending, setSending] = useState(false); + + useEffect(() => { + if (props.open) { + setSending(false); + setRecipient(""); + setAmount(0); + } + }, [props.open]); + + const handleChangeamount = ( + event: ChangeEvent, + ) => { + const value = parseInt(event.target.value); + + if (value < 0) { + setErrorMessage("Amount must be a positive value"); + setAmount(0); + } else { + setErrorMessage(""); + setAmount(value); + } + + if (value > props.tokensApproved) { + setErrorMessage( + "Amount must be lower or equal to the amount approved to the bridge", + ); + setAmount(props.tokensApproved); + } else { + setErrorMessage(""); + setAmount(value); + } + }; + + const handleChangeRecipient = (event: SelectChangeEvent) => { + setRecipient(event.target.value); + }; + + const performCrossChainTransaction = async () => { + if (amount === 0) { + setErrorMessage("Amounts must be a positive value"); + } else { + setSending(true); + await bridgeTokens( + props.user, + recipient, + props.ledger, + props.ledger === "Fabric" ? "Besu" : "Fabric", + amount, + ); + } + + props.onClose(); + }; + + return ( + + {"Cross-Chain Transfer CBDC"} + + + Select the recipient of the tokens and the amount to transfer to the + other blockchain + + + + {errorMessage !== "" && ( + + {errorMessage} + + )} + + + {sending ? ( + + ) : ( +
+ + +
+ )} +
+
+ ); +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx index bf03a6f447..973b012b12 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/MintDialog.tsx @@ -9,13 +9,12 @@ import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; import { mintTokensFabric } from "../../api-calls/fabric-api"; import { mintTokensBesu } from "../../api-calls/besu-api"; -//import { mintTokensFabric } from "../../api-calls/fabric-api"; export interface IMintDialogOptions { open: boolean; user: string; ledger: string; - onClose: () => any; + onClose: () => unknown; } export default function MintDialog(props: IMintDialogOptions) { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx index d84c61d00a..9c9ddb474d 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx @@ -14,7 +14,8 @@ export interface IPermissionDialogOptions { open: boolean; user: string; ledger: string; - onClose: () => any; + balance: number; + onClose: () => unknown; } export default function setGivePermissionDialog( @@ -43,6 +44,14 @@ export default function setGivePermissionDialog( setErrorMessage(""); setAmount(value); } + + if (value > props.balance) { + setErrorMessage("Amount must be lower or equal to user's balance"); + setAmount(props.balance); + } else { + setErrorMessage(""); + setAmount(value); + } }; const performAccessTransaction = async () => { @@ -61,11 +70,10 @@ export default function setGivePermissionDialog( return ( - {"Give Permission"} + {"Approve Funds to Bridge"} - How many tokens would you like to give permission to {props.user}"s - address? + How many tokens can the bridge use on your behalf? - +
)} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx index 96de98d79d..11892d2245 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/TransferDialog.tsx @@ -11,59 +11,50 @@ import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; import { transferTokensFabric } from "../../api-calls/fabric-api"; import { transferTokensBesu } from "../../api-calls/besu-api"; -import { bridgeTokens } from "../../api-calls/gateway-api"; const recipients = ["Alice", "Charlie"]; -const chains = ["Fabric", "Besu"]; + export interface ITransferDialogOptions { open: boolean; ledger: string; user: string; + balance: number; onClose: () => any; } export default function TransferDialog(props: ITransferDialogOptions) { - const [recipient, setRecipient] = useState(""); - const [originAmount, setSourceAmount] = useState(0); - const [destinyAmount, setDestinyAmount] = useState(0); - const [destinyChain, setDestinyChain] = useState(""); const [errorMessage, setErrorMessage] = useState(""); + const [recipient, setRecipient] = useState(""); + const [amount, setAmount] = useState(0); const [sending, setSending] = useState(false); useEffect(() => { if (props.open) { setSending(false); setRecipient(""); - setSourceAmount(0); - setDestinyAmount(0); - setDestinyChain(""); + setAmount(0); } }, [props.open]); - const handleChangeOriginAmount = ( + const handleChangeamount = ( event: ChangeEvent, ) => { const value = parseInt(event.target.value); if (value < 0) { setErrorMessage("Amount must be a positive value"); - setSourceAmount(0); + setAmount(0); } else { setErrorMessage(""); - setSourceAmount(value); + setAmount(value); } - }; - const handleChangeDestinyAmount = ( - event: ChangeEvent, - ) => { - const value = parseInt(event.target.value); - if (value < 0) { - setErrorMessage("Amount must be a positive value"); - setDestinyAmount(0); + if (value > props.balance) { + setErrorMessage("Amount must be lower or equal to current balance"); + setAmount(props.balance); } else { setErrorMessage(""); - setDestinyAmount(value); + setAmount(value); } }; @@ -71,38 +62,19 @@ export default function TransferDialog(props: ITransferDialogOptions) { setRecipient(event.target.value); }; - const handleChangeDestinyChain = (event: SelectChangeEvent) => { - setDestinyChain(event.target.value); - }; - - const performTransferTransaction = async () => { - if (originAmount === 0 || destinyAmount === 0) { + const performLocalTransferTransaction = async () => { + if (amount === 0) { setErrorMessage("Amounts must be a positive value"); } else { setSending(true); - if (props.ledger === destinyChain) { - if (props.ledger === "Fabric") { - await transferTokensFabric( - props.user, - recipient, - originAmount.toString(), - ); - } else { - await transferTokensBesu(props.user, recipient, originAmount); - } + + if (props.ledger === "Fabric") { + await transferTokensFabric(props.user, recipient, amount.toString()); } else { - await bridgeTokens( - props.user, - recipient, - props.ledger, - destinyChain, - originAmount, - destinyAmount, - ); + await transferTokensBesu(props.user, recipient, amount); } - - props.onClose(); } + props.onClose(); }; return ( @@ -110,8 +82,7 @@ export default function TransferDialog(props: ITransferDialogOptions) { {"Transfer CBDC"} - Select the recipient of the CBDC, target chain, and how many you would - transfer from {props.user}"s address? + Select the recipient of the tokens and the amount to transfer - - {errorMessage !== "" && ( @@ -190,7 +125,7 @@ export default function TransferDialog(props: ITransferDialogOptions) { ) : (
- +
)} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/docs/DummyActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/docs/DummyActionsContainer.tsx new file mode 100644 index 0000000000..9032cee2d5 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/docs/DummyActionsContainer.tsx @@ -0,0 +1,56 @@ +import Paper from "@mui/material/Paper"; +import Grid from "@mui/material/Grid"; +import { NormalButton } from "../buttons/NormalButton"; +import { CriticalButton } from "../buttons/CriticalButton"; + +export default function DummyActionsContainer() { + return ( + + + + {"User A"} + + + + XXX CBDC + + + Mint + + + Transfer + + + Approval + + + Bridge + + + + ); +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx index e36f828320..efa5f33648 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/index.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { CssBaseline } from "@mui/material"; import ReactDOM from "react-dom/client"; import "./index.css"; import App from "./App"; @@ -8,6 +9,7 @@ const root = ReactDOM.createRoot( ); root.render( + , ); diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/pages/Helper.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/pages/Helper.tsx new file mode 100644 index 0000000000..abad05f93a --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/pages/Helper.tsx @@ -0,0 +1,107 @@ +import Typography from "@mui/material/Typography"; +import Box from "@mui/material/Box"; +import { Grid } from "@mui/material"; +import DummyActionsContainer from "../components/docs/DummyActionsContainer"; +import { NormalButton } from "../components/buttons/NormalButton"; +import { CriticalButton } from "../components/buttons/CriticalButton"; + +export default function Helper() { + return ( + + + Instructions + + + This application is a demonstration of a Central Bank Digital Currency + (CBDC) bridging solution between two blockchains (Hyperledger Fabric and + Hyperledger Besu) using the Secure Asset Transfer Protocol (SATP). The + application allows users to transfer tokens between the two blockchains. + + + + How to Use + + + Each user starts with a balance of 0 CBDC tokens on both Fabric and + Besu. Each user has a box that displays the user's name, the balance of + CBDC tokens, and the actions that the user can perform. The actions have + different colors based on being related to local actions (i.e., in the + same blockchain) (in blue) or related to cross-chain functionality + (red). + + + + + + + Mint + + + + To mint tokens to the user's account, click on the "Mint" button and + enter the amount of tokens to mint. + + + + Transfer + + + + The "Transfer" button allows the user to transfer a certain amount + of tokens in the same blockchain -- i.e., in the context of the same + smart contract. Select the recipient of the tokens and the amount to + transfer. The amount of tokens to transfer is capped by the user's + balance. The Transfer button is disabled if the user has no tokens. + + + + Approval + + + + The "Approval" button is used to approve the bridge to spend tokens + on on behalf of the user. This is a necessary step before initiating + cross-chain interaction. The approval button is disabled if the user + has no tokens. + + + + Bridge + + + + The "Bridge" button is used to transfer tokens between the two + blockchains using SATP. The bridge button is disabled if the user + has no tokens or if the user has not approved the bridge to spend + tokens on behalf of the user. The user must select the amount of + tokens to transfer and the recipient's address. The amount is capped + by the amount of tokens the user has approved the bridge to spend. + Once this action is executed, the user's balance is updated on both + blockchains and the id and status of the session are displayed on + the screen. + + + + + + Other Relevant Resources + + + For more information, visit the following resources: + + + + ); +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx index 88af29bd31..1c738fe3d8 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx @@ -6,6 +6,8 @@ import { checkApiServer1Connection, checkApiServer2Connection, } from "../api-calls/common"; +import IconButton from "@mui/material/IconButton"; +import HelpIcon from "@mui/icons-material/Help"; import ConnectionErrorDialog from "../components/dialogs/ConnectionErrorDialog"; export default function HomePage() { @@ -56,13 +58,23 @@ export default function HomePage() { function BridgeImage() { return ( <> + + + +
=16.8" + react-dom: ">=16.8" + checksum: 10/4eee37839bd1a660807c090b4d272e4aa9b95d8a9a932cdcdf7c5b10735f39b6db73bad79b08a3012386a7e225ff6bf60435e2741fb7c68e137ac5a6295d4308 + languageName: node + linkType: hard + "react-router@npm:6.21.3": version: 6.21.3 resolution: "react-router@npm:6.21.3" @@ -46399,6 +46420,17 @@ __metadata: languageName: node linkType: hard +"react-router@npm:6.26.2": + version: 6.26.2 + resolution: "react-router@npm:6.26.2" + dependencies: + "@remix-run/router": "npm:1.19.2" + peerDependencies: + react: ">=16.8" + checksum: 10/496e855b53e61066c1791e354f5d79eab56a128d9722fdc6486c3ecd3b3a0bf9968e927028f429893b157f3cc10fc09e890a055847723ee242663e7995fedc9d + languageName: node + linkType: hard + "react-scripts@npm:5.0.1": version: 5.0.1 resolution: "react-scripts@npm:5.0.1" From f397eb378bd94df906575c3759deb26d2b553234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Augusto?= Date: Tue, 17 Sep 2024 11:17:45 +0100 Subject: [PATCH 39/49] docs(cbdc-example): remove unused variables and unused code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Created new Docker Image and updated README.md Signed-off-by: André Augusto --- .../.eslintrc.js | 6 + .../README.md | 17 ++- .../src/api-calls/besu-api.tsx | 119 +----------------- .../src/api-calls/fabric-api.tsx | 81 ------------ .../src/api-calls/gateway-api.tsx | 7 +- .../src/components/ActionsContainer.tsx | 31 ----- .../src/components/Ledger.tsx | 4 +- ...esTable.tsx => SessionReferencesTable.tsx} | 0 .../src/pages/HomePage.tsx | 33 +++-- .../tsconfig.tsbuildinfo | 2 +- 10 files changed, 38 insertions(+), 262 deletions(-) create mode 100644 examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js rename examples/cactus-example-cbdc-bridging-frontend/src/components/{AssetReferencesTable.tsx => SessionReferencesTable.tsx} (100%) diff --git a/examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js b/examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js new file mode 100644 index 0000000000..28436a1f6d --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + parser: "@typescript-eslint/parser", // Specifies the ESLint parser + rules: { + "@typescript-eslint/no-explicit-any": "off", + }, +}; diff --git a/examples/cactus-example-cbdc-bridging-frontend/README.md b/examples/cactus-example-cbdc-bridging-frontend/README.md index 2bab60b487..0f48db329e 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/README.md +++ b/examples/cactus-example-cbdc-bridging-frontend/README.md @@ -4,14 +4,21 @@ ### Using a pre-built image -`docker run -p 2000:2000 aaugusto11/cactus-example-cbdc-bridging-frontend` +`docker run -p 2000:2000 aaugusto11/cactus-example-cbdc-bridging-frontend:v2` -### Building the image +### Building the image locally -```docker build -t cbdc-app-frontend . -docker run -p 2000:2000 cbdc-app-frontend``` +``` +docker build -t cbdc-app-frontend . -## `npm start` +docker run -p 2000:2000 cbdc-app-frontend +``` + +### Running in debug mode + +``` +npm start +``` Runs the app in the development mode.\ Open [http://localhost:2000](http://localhost:2000) to view it in the browser. 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 5e150aae43..5a493ffad7 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 @@ -3,7 +3,6 @@ import CryptoMaterial from "../crypto-material/crypto-material.json"; import { getEthAddress, getEthUserPrKey } from "./common"; const BESU_CONTRACT_CBDC_ERC20_NAME = "SATPContract"; -const BESU_CONTRACT_WRAPPER_NAME = "SATPWrapperContract"; export async function authorizeNTokensBesu( frontendUserFrom: string, @@ -94,122 +93,6 @@ export async function transferTokensBesu( } } -/* -export async function escrowTokensBesu( - frontendUserFrom: string, - amount: number, - assetRefID: string, -) { - const from = getEthAddress(frontendUserFrom); - - await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "escrow", - gas: 1000000, - params: [amount, assetRefID], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUserFrom), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); -} -*/ - -export async function getAssetReferencesBesu(frontendUser: string) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const from = getEthAddress(frontendUser); - try { - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_WRAPPER_NAME, - invocationType: "CALL", - methodName: "getAllAssets", - gas: 1000000, - params: [], - signingCredential: { - ethAccount: CryptoMaterial.accounts.bridge.ethAddress, - secret: getEthUserPrKey("bridge"), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return response.data.callOutput.map((asset: any) => { - return { - id: asset[2], - numberTokens: asset[4], - owner: getUserFromEthAddress(asset[3]), - }; - }); - } catch (error) { - console.error(error); - return []; - } -} - -/* -export async function bridgeBackTokensBesu( - frontendUser: string, - amount: number, - assetRefID: string, -) { - const address = getEthAddress(frontendUser); - const fabricID = getFabricId(frontendUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios.post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://localhost:4100`, - }, - serverGatewayConfiguration: { - apiHost: `http://localhost:4000`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT2", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT1", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway1"].publicKey, - serverDltSystem: "DLT1", - sourceGatewayDltSystem: "DLT2", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: 5, - maxTimeout: 5000, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); -} -*/ export async function getBesuBalance(frontendUser: string) { const userEthAddress = getEthAddress(frontendUser); @@ -261,7 +144,7 @@ export async function mintTokensBesu(user: string, amount: number) { } } -function getUserFromEthAddress(ethAddress: string) { +export function getUserFromEthAddress(ethAddress: string) { switch (ethAddress) { case CryptoMaterial.accounts["userA"].ethAddress: return "Alice"; 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 986ebe9378..f0aad577bd 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 @@ -25,8 +25,6 @@ export async function getFabricBalance(frontendUser: string) { }, ); } catch (error) { - //TODO fix - console.error(error.msg); return -1; } @@ -83,86 +81,7 @@ export async function transferTokensFabric( console.error(error); } } -/* -export async function escrowTokensFabric( - frontendUser: string, - amount: string, - assetRefID: string, -) { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString(), assetRefID], - methodName: "Escrow", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - if (response.status === 200) { - // throw error - } -}*/ -/* -export async function bridgeOutTokensFabric( - frontendUser: string, - amount: string, - assetRefID: string, -) { - const fabricID = getFabricId(frontendUser); - const address = getEthAddress(frontendUser); - - const assetProfile = { - expirationDate: new Date(2060, 11, 24).toString(), - issuer: "CB1", - assetCode: "CBDC1", - // since there is no link with the asset information, - // we are just passing the asset parameters like this - // [amountBeingTransferred, fabricID, ethAddress] - keyInformationLink: [amount.toString(), fabricID, address], - }; - - await axios.post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", - { - clientGatewayConfiguration: { - apiHost: `http://localhost:4000`, - }, - serverGatewayConfiguration: { - apiHost: `http://localhost:4100`, - }, - version: "0.0.0", - loggingProfile: "dummyLoggingProfile", - accessControlProfile: "dummyAccessControlProfile", - applicationProfile: "dummyApplicationProfile", - payloadProfile: { - assetProfile, - capabilities: "", - }, - assetProfile: assetProfile, - assetControlProfile: "dummyAssetControlProfile", - beneficiaryPubkey: "dummyPubKey", - clientDltSystem: "DLT1", - originatorPubkey: "dummyPubKey", - recipientGatewayDltSystem: "DLT2", - recipientGatewayPubkey: CryptoMaterial.gateways["gateway2"].publicKey, - serverDltSystem: "DLT2", - sourceGatewayDltSystem: "DLT1", - clientIdentityPubkey: "", - serverIdentityPubkey: "", - maxRetries: 5, - maxTimeout: 5000, - sourceLedgerAssetID: assetRefID, - recipientLedgerAssetID: "FABRIC_ASSET_ID", - }, - ); -} -*/ export async function getAssetReferencesFabric( frontendUser: string, ): Promise { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx index 2ae5306335..0bbafe78c6 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx @@ -1,8 +1,5 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getEthAddress, getEthUserPrKey } from "./common"; -import { getUserFromPseudonim, getFabricId } from "./common"; +import { getEthAddress, getFabricId } from "./common"; import { createSessionReference, SessionReference, @@ -10,11 +7,9 @@ import { import BesuSATPInteraction from "../ontology/besu-erc20-ontology.json"; import FabricSATPInteraction from "../ontology/fabric-erc20-ontology.json"; -import { uuidV4 } from "web3-utils"; const FABRIC_CHANNEL_NAME = "mychannel"; const CONTRACT_CBDC_ERC20_NAME = "SATPContract"; -const CONTRACT_WRAPPER_NAME = "SATPWrapperContract"; export async function getSessionReferencesBridge(port: string): Promise { try { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx index 61268cd5b9..a932cbb4e3 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import { useState, useEffect } from "react"; import Paper from "@mui/material/Paper"; import Grid from "@mui/material/Grid"; @@ -13,36 +12,6 @@ import { SessionReference } from "../models/SessionReference"; import { NormalButton } from "./buttons/NormalButton"; import { CriticalButton } from "./buttons/CriticalButton"; -// const NormalButton = styled(Button)(({ theme }) => ({ -// margin: "auto", -// width: "100%", -// fontSize: "13px", -// textTransform: "none", -// background: "#2B9BF6", -// color: "#FFFFFF", -// border: "0.5px solid #000000", -// "&:disabled": { -// border: "0", -// }, -// })); - -// const CriticalButton = styled(Button)(({ theme }) => ({ -// margin: "auto", -// width: "100%", -// fontSize: "13px", -// textTransform: "none", -// background: "#FF584B", -// color: "#FFFFFF", -// border: "0.5px solid #000000", -// "&:hover": { -// backgroundColor: "#444444", -// color: "#FFFFFF", -// }, -// "&:disabled": { -// border: "0", -// }, -// })); - export interface IActionsContainerOptions { user: string; ledger: string; diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx index a3c96fb155..50bf2ae7f6 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx @@ -6,7 +6,7 @@ import CircularProgress from "@mui/material/CircularProgress"; import { getSessionReferencesBridge } from "../api-calls/gateway-api"; import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridgeFabric } from "../api-calls/fabric-api"; import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridgeBesu } from "../api-calls/besu-api"; -import AssetReferencesTable from "./AssetReferencesTable"; +import SessionReferencesTable from "./SessionReferencesTable"; import ApprovalsTable from "./ApprovalsTable"; export interface ILedgerOptions { @@ -92,7 +92,7 @@ export default function Ledger(props: ILedgerOptions) { /> )}

Sessions Status

- diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/SessionReferencesTable.tsx similarity index 100% rename from examples/cactus-example-cbdc-bridging-frontend/src/components/AssetReferencesTable.tsx rename to examples/cactus-example-cbdc-bridging-frontend/src/components/SessionReferencesTable.tsx diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx index 1c738fe3d8..d7f242996b 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/pages/HomePage.tsx @@ -1,11 +1,10 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import { useState, useEffect } from "react"; import Grid from "@mui/material/Grid"; import Ledger from "../components/Ledger"; -import { - checkApiServer1Connection, - checkApiServer2Connection, -} from "../api-calls/common"; +// import { +// checkApiServer1Connection, +// checkApiServer2Connection, +// } from "../api-calls/common"; import IconButton from "@mui/material/IconButton"; import HelpIcon from "@mui/icons-material/Help"; import ConnectionErrorDialog from "../components/dialogs/ConnectionErrorDialog"; @@ -13,19 +12,17 @@ import ConnectionErrorDialog from "../components/dialogs/ConnectionErrorDialog"; export default function HomePage() { const [errorDialog, setErrorDialog] = useState(false); - /*useEffect(() => { - const checkConnection = async () => { - await checkApiServer1Connection() - .then(() => setErrorDialog(false)) - .catch(() => setErrorDialog(true)); - - await checkApiServer2Connection() - .then(() => setErrorDialog(false)) - .catch(() => setErrorDialog(true)); - }; - - checkConnection(); - }, []);*/ + useEffect(() => { + // const checkConnection = async () => { + // await checkApiServer1Connection() + // .then(() => setErrorDialog(false)) + // .catch(() => setErrorDialog(true)); + // await checkApiServer2Connection() + // .then(() => setErrorDialog(false)) + // .catch(() => setErrorDialog(true)); + // }; + // checkConnection(); + }, []); return (
diff --git a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo b/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo index 93c2cf18b2..1b29cddb58 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo +++ b/examples/cactus-example-cbdc-bridging-frontend/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/@types/react/ts5.0/global.d.ts","./node_modules/csstype/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/scheduler/tracing.d.ts","./node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react/ts5.0/jsx-runtime.d.ts","./node_modules/@mui/types/index.d.ts","./node_modules/@mui/styled-engine/node_modules/csstype/index.d.ts","./node_modules/@emotion/utils/types/index.d.ts","./node_modules/@emotion/cache/types/index.d.ts","./node_modules/@emotion/serialize/types/index.d.ts","./node_modules/@emotion/react/types/jsx-namespace.d.ts","./node_modules/@emotion/react/types/helper.d.ts","./node_modules/@emotion/react/types/theming.d.ts","./node_modules/@emotion/react/types/index.d.ts","./node_modules/@emotion/styled/types/base.d.ts","./node_modules/@emotion/styled/types/index.d.ts","./node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.d.ts","./node_modules/@mui/styled-engine/StyledEngineProvider/index.d.ts","./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/styled-engine/GlobalStyles/index.d.ts","./node_modules/@mui/styled-engine/index.d.ts","./node_modules/@mui/system/createTheme/createBreakpoints.d.ts","./node_modules/@mui/system/createTheme/shape.d.ts","./node_modules/@mui/system/createTheme/createSpacing.d.ts","./node_modules/@mui/system/node_modules/csstype/index.d.ts","./node_modules/@mui/system/styleFunctionSx/StandardCssProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/styleFunctionSx.d.ts","./node_modules/@mui/system/styleFunctionSx/extendSxProp.d.ts","./node_modules/@mui/system/style.d.ts","./node_modules/@mui/system/styleFunctionSx/defaultSxConfig.d.ts","./node_modules/@mui/system/styleFunctionSx/index.d.ts","./node_modules/@mui/system/createTheme/createTheme.d.ts","./node_modules/@mui/system/createTheme/index.d.ts","./node_modules/@mui/system/Box/Box.d.ts","./node_modules/@mui/system/Box/boxClasses.d.ts","./node_modules/@mui/system/Box/index.d.ts","./node_modules/@mui/system/breakpoints.d.ts","./node_modules/@mui/private-theming/defaultTheme/index.d.ts","./node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.d.ts","./node_modules/@mui/private-theming/ThemeProvider/index.d.ts","./node_modules/@mui/private-theming/useTheme/useTheme.d.ts","./node_modules/@mui/private-theming/useTheme/index.d.ts","./node_modules/@mui/private-theming/index.d.ts","./node_modules/@mui/system/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/system/GlobalStyles/index.d.ts","./node_modules/@mui/system/spacing.d.ts","./node_modules/@mui/system/createBox.d.ts","./node_modules/@mui/system/createStyled.d.ts","./node_modules/@mui/system/styled.d.ts","./node_modules/@mui/system/useThemeProps/useThemeProps.d.ts","./node_modules/@mui/system/useThemeProps/getThemeProps.d.ts","./node_modules/@mui/system/useThemeProps/index.d.ts","./node_modules/@mui/system/useTheme.d.ts","./node_modules/@mui/system/useThemeWithoutDefault.d.ts","./node_modules/@mui/system/colorManipulator.d.ts","./node_modules/@mui/system/ThemeProvider/ThemeProvider.d.ts","./node_modules/@mui/system/ThemeProvider/index.d.ts","./node_modules/@mui/system/cssVars/getInitColorSchemeScript.d.ts","./node_modules/@mui/system/cssVars/useCurrentColorScheme.d.ts","./node_modules/@mui/system/cssVars/createCssVarsProvider.d.ts","./node_modules/@mui/system/cssVars/prepareCssVars.d.ts","./node_modules/@mui/system/cssVars/createCssVarsTheme.d.ts","./node_modules/@mui/system/cssVars/index.d.ts","./node_modules/@mui/system/cssVars/createGetCssVar.d.ts","./node_modules/@mui/system/cssVars/cssVarsParser.d.ts","./node_modules/@mui/system/responsivePropType.d.ts","./node_modules/@mui/system/Container/containerClasses.d.ts","./node_modules/@mui/system/Container/ContainerProps.d.ts","./node_modules/@mui/system/Container/createContainer.d.ts","./node_modules/@mui/system/Container/Container.d.ts","./node_modules/@mui/system/Container/index.d.ts","./node_modules/@mui/system/Unstable_Grid/GridProps.d.ts","./node_modules/@mui/system/Unstable_Grid/Grid.d.ts","./node_modules/@mui/system/Unstable_Grid/createGrid.d.ts","./node_modules/@mui/system/Unstable_Grid/gridClasses.d.ts","./node_modules/@mui/system/Unstable_Grid/traverseBreakpoints.d.ts","./node_modules/@mui/system/Unstable_Grid/index.d.ts","./node_modules/@mui/system/Stack/StackProps.d.ts","./node_modules/@mui/system/Stack/Stack.d.ts","./node_modules/@mui/system/Stack/createStack.d.ts","./node_modules/@mui/system/Stack/stackClasses.d.ts","./node_modules/@mui/system/Stack/index.d.ts","./node_modules/@mui/system/index.d.ts","./node_modules/@mui/material/styles/identifier.d.ts","./node_modules/@mui/material/node_modules/csstype/index.d.ts","./node_modules/@mui/material/styles/createMixins.d.ts","./node_modules/@mui/material/colors/amber.d.ts","./node_modules/@mui/material/colors/blue.d.ts","./node_modules/@mui/material/colors/blueGrey.d.ts","./node_modules/@mui/material/colors/brown.d.ts","./node_modules/@mui/material/colors/common.d.ts","./node_modules/@mui/material/colors/cyan.d.ts","./node_modules/@mui/material/colors/deepOrange.d.ts","./node_modules/@mui/material/colors/deepPurple.d.ts","./node_modules/@mui/material/colors/green.d.ts","./node_modules/@mui/material/colors/grey.d.ts","./node_modules/@mui/material/colors/indigo.d.ts","./node_modules/@mui/material/colors/lightBlue.d.ts","./node_modules/@mui/material/colors/lightGreen.d.ts","./node_modules/@mui/material/colors/lime.d.ts","./node_modules/@mui/material/colors/orange.d.ts","./node_modules/@mui/material/colors/pink.d.ts","./node_modules/@mui/material/colors/purple.d.ts","./node_modules/@mui/material/colors/red.d.ts","./node_modules/@mui/material/colors/teal.d.ts","./node_modules/@mui/material/colors/yellow.d.ts","./node_modules/@mui/material/colors/index.d.ts","./node_modules/@mui/utils/node_modules/@types/prop-types/index.d.ts","./node_modules/@mui/utils/chainPropTypes/chainPropTypes.d.ts","./node_modules/@mui/utils/chainPropTypes/index.d.ts","./node_modules/@mui/utils/deepmerge.d.ts","./node_modules/@mui/utils/elementAcceptingRef.d.ts","./node_modules/@mui/utils/elementTypeAcceptingRef.d.ts","./node_modules/@mui/utils/exactProp/exactProp.d.ts","./node_modules/@mui/utils/exactProp/index.d.ts","./node_modules/@mui/utils/formatMuiErrorMessage.d.ts","./node_modules/@mui/utils/getDisplayName.d.ts","./node_modules/@mui/utils/HTMLElementType/HTMLElementType.d.ts","./node_modules/@mui/utils/HTMLElementType/index.d.ts","./node_modules/@mui/utils/ponyfillGlobal/ponyfillGlobal.d.ts","./node_modules/@mui/utils/ponyfillGlobal/index.d.ts","./node_modules/@mui/utils/refType.d.ts","./node_modules/@mui/utils/capitalize/capitalize.d.ts","./node_modules/@mui/utils/capitalize/index.d.ts","./node_modules/@mui/utils/createChainedFunction.d.ts","./node_modules/@mui/utils/debounce/debounce.d.ts","./node_modules/@mui/utils/debounce/index.d.ts","./node_modules/@mui/utils/deprecatedPropType.d.ts","./node_modules/@mui/utils/isMuiElement.d.ts","./node_modules/@mui/utils/ownerDocument/ownerDocument.d.ts","./node_modules/@mui/utils/ownerDocument/index.d.ts","./node_modules/@mui/utils/ownerWindow/ownerWindow.d.ts","./node_modules/@mui/utils/ownerWindow/index.d.ts","./node_modules/@mui/utils/requirePropFactory.d.ts","./node_modules/@mui/utils/setRef.d.ts","./node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.d.ts","./node_modules/@mui/utils/useEnhancedEffect/index.d.ts","./node_modules/@mui/utils/useId/useId.d.ts","./node_modules/@mui/utils/useId/index.d.ts","./node_modules/@mui/utils/unsupportedProp.d.ts","./node_modules/@mui/utils/useControlled/useControlled.d.ts","./node_modules/@mui/utils/useControlled/index.d.ts","./node_modules/@mui/utils/useEventCallback/useEventCallback.d.ts","./node_modules/@mui/utils/useEventCallback/index.d.ts","./node_modules/@mui/utils/useForkRef/useForkRef.d.ts","./node_modules/@mui/utils/useForkRef/index.d.ts","./node_modules/@mui/utils/useIsFocusVisible.d.ts","./node_modules/@mui/utils/getScrollbarSize.d.ts","./node_modules/@mui/utils/scrollLeft.d.ts","./node_modules/@mui/utils/usePreviousProps.d.ts","./node_modules/@mui/utils/getValidReactChildren.d.ts","./node_modules/@mui/utils/visuallyHidden.d.ts","./node_modules/@mui/utils/integerPropType.d.ts","./node_modules/@mui/utils/resolveProps.d.ts","./node_modules/@mui/utils/composeClasses/composeClasses.d.ts","./node_modules/@mui/utils/composeClasses/index.d.ts","./node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.d.ts","./node_modules/@mui/utils/generateUtilityClass/index.d.ts","./node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.d.ts","./node_modules/@mui/utils/generateUtilityClasses/index.d.ts","./node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.d.ts","./node_modules/@mui/utils/ClassNameGenerator/index.d.ts","./node_modules/@mui/utils/index.d.ts","./node_modules/@mui/material/utils/capitalize.d.ts","./node_modules/@mui/material/utils/createChainedFunction.d.ts","./node_modules/@mui/material/OverridableComponent.d.ts","./node_modules/@mui/material/SvgIcon/svgIconClasses.d.ts","./node_modules/@mui/material/SvgIcon/SvgIcon.d.ts","./node_modules/@mui/material/SvgIcon/index.d.ts","./node_modules/@mui/material/utils/createSvgIcon.d.ts","./node_modules/@mui/material/utils/debounce.d.ts","./node_modules/@mui/material/utils/deprecatedPropType.d.ts","./node_modules/@mui/material/utils/isMuiElement.d.ts","./node_modules/@mui/material/utils/ownerDocument.d.ts","./node_modules/@mui/material/utils/ownerWindow.d.ts","./node_modules/@mui/material/utils/requirePropFactory.d.ts","./node_modules/@mui/material/utils/setRef.d.ts","./node_modules/@mui/material/utils/useEnhancedEffect.d.ts","./node_modules/@mui/material/utils/useId.d.ts","./node_modules/@mui/material/utils/unsupportedProp.d.ts","./node_modules/@mui/material/utils/useControlled.d.ts","./node_modules/@mui/material/utils/useEventCallback.d.ts","./node_modules/@mui/material/utils/useForkRef.d.ts","./node_modules/@mui/material/utils/useIsFocusVisible.d.ts","./node_modules/@mui/base/ClassNameGenerator/index.d.ts","./node_modules/@mui/material/utils/index.d.ts","./node_modules/@types/react-transition-group/node_modules/@types/react/ts5.0/global.d.ts","./node_modules/@types/react-transition-group/node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react-transition-group/Transition.d.ts","./node_modules/@mui/material/transitions/transition.d.ts","./node_modules/@mui/material/Accordion/accordionClasses.d.ts","./node_modules/@mui/material/Paper/paperClasses.d.ts","./node_modules/@mui/material/Paper/Paper.d.ts","./node_modules/@mui/material/Accordion/Accordion.d.ts","./node_modules/@mui/material/Accordion/index.d.ts","./node_modules/@mui/material/AccordionActions/accordionActionsClasses.d.ts","./node_modules/@mui/material/AccordionActions/AccordionActions.d.ts","./node_modules/@mui/material/AccordionActions/index.d.ts","./node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.d.ts","./node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts","./node_modules/@mui/material/AccordionDetails/index.d.ts","./node_modules/@mui/material/ButtonBase/touchRippleClasses.d.ts","./node_modules/@mui/material/ButtonBase/TouchRipple.d.ts","./node_modules/@mui/material/ButtonBase/buttonBaseClasses.d.ts","./node_modules/@mui/material/ButtonBase/ButtonBase.d.ts","./node_modules/@mui/material/ButtonBase/index.d.ts","./node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts","./node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts","./node_modules/@mui/material/AccordionSummary/index.d.ts","./node_modules/@mui/material/Paper/index.d.ts","./node_modules/@mui/material/Alert/alertClasses.d.ts","./node_modules/@mui/material/Alert/Alert.d.ts","./node_modules/@mui/material/Alert/index.d.ts","./node_modules/@mui/material/AlertTitle/alertTitleClasses.d.ts","./node_modules/@mui/material/AlertTitle/AlertTitle.d.ts","./node_modules/@mui/material/AlertTitle/index.d.ts","./node_modules/@mui/material/AppBar/appBarClasses.d.ts","./node_modules/@mui/material/AppBar/AppBar.d.ts","./node_modules/@mui/material/AppBar/index.d.ts","./node_modules/@mui/base/utils/appendOwnerState.d.ts","./node_modules/@mui/base/utils/areArraysEqual.d.ts","./node_modules/@mui/base/utils/ClassNameConfigurator.d.ts","./node_modules/@mui/base/utils/types.d.ts","./node_modules/@mui/base/utils/extractEventHandlers.d.ts","./node_modules/@mui/base/utils/isHostComponent.d.ts","./node_modules/@mui/base/utils/resolveComponentProps.d.ts","./node_modules/clsx/clsx.d.ts","./node_modules/@mui/base/utils/mergeSlotProps.d.ts","./node_modules/@mui/base/utils/useSlotProps.d.ts","./node_modules/@mui/base/utils/prepareForSlot.d.ts","./node_modules/@mui/base/utils/PolymorphicComponent.d.ts","./node_modules/@mui/base/utils/index.d.ts","./node_modules/@mui/base/Badge/Badge.types.d.ts","./node_modules/@mui/base/Badge/Badge.d.ts","./node_modules/@mui/base/Badge/badgeClasses.d.ts","./node_modules/@mui/base/Badge/index.d.ts","./node_modules/@mui/base/utils/MuiCancellableEvent.d.ts","./node_modules/@mui/base/useButton/useButton.types.d.ts","./node_modules/@mui/base/useButton/useButton.d.ts","./node_modules/@mui/base/useButton/index.d.ts","./node_modules/@mui/base/Button/Button.types.d.ts","./node_modules/@mui/base/Button/Button.d.ts","./node_modules/@mui/base/Button/buttonClasses.d.ts","./node_modules/@mui/base/Button/index.d.ts","./node_modules/@mui/base/ClickAwayListener/ClickAwayListener.d.ts","./node_modules/@mui/base/ClickAwayListener/index.d.ts","./node_modules/@mui/base/composeClasses/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./node_modules/@mui/base/Dropdown/Dropdown.types.d.ts","./node_modules/@mui/base/Dropdown/Dropdown.d.ts","./node_modules/@mui/base/Dropdown/index.d.ts","./node_modules/@mui/base/FocusTrap/FocusTrap.types.d.ts","./node_modules/@mui/base/FocusTrap/FocusTrap.d.ts","./node_modules/@mui/base/FocusTrap/index.d.ts","./node_modules/@mui/base/FormControl/FormControl.types.d.ts","./node_modules/@mui/base/FormControl/FormControl.d.ts","./node_modules/@mui/base/FormControl/FormControlContext.d.ts","./node_modules/@mui/base/FormControl/formControlClasses.d.ts","./node_modules/@mui/base/FormControl/useFormControlContext.d.ts","./node_modules/@mui/base/FormControl/index.d.ts","./node_modules/@mui/base/useInput/useInput.types.d.ts","./node_modules/@mui/base/useInput/useInput.d.ts","./node_modules/@mui/base/useInput/index.d.ts","./node_modules/@mui/base/Input/Input.types.d.ts","./node_modules/@mui/base/Input/Input.d.ts","./node_modules/@mui/base/Input/inputClasses.d.ts","./node_modules/@mui/base/Input/index.d.ts","./node_modules/@mui/base/useList/listActions.types.d.ts","./node_modules/@mui/base/utils/useControllableReducer.types.d.ts","./node_modules/@mui/base/useList/ListContext.d.ts","./node_modules/@mui/base/useList/useList.types.d.ts","./node_modules/@mui/base/useList/useList.d.ts","./node_modules/@mui/base/useList/useListItem.types.d.ts","./node_modules/@mui/base/useList/useListItem.d.ts","./node_modules/@mui/base/useList/listReducer.d.ts","./node_modules/@mui/base/useList/index.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItem.types.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItem.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItemContextStabilizer.d.ts","./node_modules/@mui/base/useMenuItem/index.d.ts","./node_modules/@mui/base/useCompound/useCompoundParent.d.ts","./node_modules/@mui/base/useCompound/useCompoundItem.d.ts","./node_modules/@mui/base/useCompound/index.d.ts","./node_modules/@mui/base/useMenu/MenuProvider.d.ts","./node_modules/@mui/base/useMenu/useMenu.types.d.ts","./node_modules/@mui/base/useMenu/useMenu.d.ts","./node_modules/@mui/base/useMenu/index.d.ts","./node_modules/@popperjs/core/lib/enums.d.ts","./node_modules/@popperjs/core/lib/modifiers/popperOffsets.d.ts","./node_modules/@popperjs/core/lib/modifiers/flip.d.ts","./node_modules/@popperjs/core/lib/modifiers/hide.d.ts","./node_modules/@popperjs/core/lib/modifiers/offset.d.ts","./node_modules/@popperjs/core/lib/modifiers/eventListeners.d.ts","./node_modules/@popperjs/core/lib/modifiers/computeStyles.d.ts","./node_modules/@popperjs/core/lib/modifiers/arrow.d.ts","./node_modules/@popperjs/core/lib/modifiers/preventOverflow.d.ts","./node_modules/@popperjs/core/lib/modifiers/applyStyles.d.ts","./node_modules/@popperjs/core/lib/types.d.ts","./node_modules/@popperjs/core/lib/modifiers/index.d.ts","./node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts","./node_modules/@popperjs/core/lib/createPopper.d.ts","./node_modules/@popperjs/core/lib/popper-lite.d.ts","./node_modules/@popperjs/core/lib/popper.d.ts","./node_modules/@popperjs/core/lib/index.d.ts","./node_modules/@popperjs/core/index.d.ts","./node_modules/@mui/base/Portal/Portal.types.d.ts","./node_modules/@mui/base/Portal/Portal.d.ts","./node_modules/@mui/base/Portal/index.d.ts","./node_modules/@mui/base/Popper/Popper.types.d.ts","./node_modules/@mui/base/Popper/Popper.d.ts","./node_modules/@mui/base/Popper/popperClasses.d.ts","./node_modules/@mui/base/Popper/index.d.ts","./node_modules/@mui/base/Menu/Menu.types.d.ts","./node_modules/@mui/base/Menu/Menu.d.ts","./node_modules/@mui/base/Menu/menuClasses.d.ts","./node_modules/@mui/base/Menu/index.d.ts","./node_modules/@mui/base/MenuButton/MenuButton.types.d.ts","./node_modules/@mui/base/MenuButton/MenuButton.d.ts","./node_modules/@mui/base/MenuButton/menuButtonClasses.d.ts","./node_modules/@mui/base/MenuButton/index.d.ts","./node_modules/@mui/base/MenuItem/MenuItem.types.d.ts","./node_modules/@mui/base/MenuItem/MenuItem.d.ts","./node_modules/@mui/base/MenuItem/menuItemClasses.d.ts","./node_modules/@mui/base/MenuItem/index.d.ts","./node_modules/@mui/base/Modal/Modal.types.d.ts","./node_modules/@mui/base/Modal/Modal.d.ts","./node_modules/@mui/base/Modal/modalClasses.d.ts","./node_modules/@mui/base/Modal/index.d.ts","./node_modules/@mui/base/NoSsr/NoSsr.types.d.ts","./node_modules/@mui/base/NoSsr/NoSsr.d.ts","./node_modules/@mui/base/NoSsr/index.d.ts","./node_modules/@mui/base/unstable_useNumberInput/numberInputAction.types.d.ts","./node_modules/@mui/base/unstable_useNumberInput/useNumberInput.types.d.ts","./node_modules/@mui/base/Unstable_NumberInput/NumberInput.types.d.ts","./node_modules/@mui/base/Unstable_NumberInput/NumberInput.d.ts","./node_modules/@mui/base/Unstable_NumberInput/numberInputClasses.d.ts","./node_modules/@mui/base/Unstable_NumberInput/index.d.ts","./node_modules/@mui/base/OptionGroup/OptionGroup.types.d.ts","./node_modules/@mui/base/OptionGroup/OptionGroup.d.ts","./node_modules/@mui/base/OptionGroup/optionGroupClasses.d.ts","./node_modules/@mui/base/OptionGroup/index.d.ts","./node_modules/@mui/base/useOption/useOption.types.d.ts","./node_modules/@mui/base/useOption/useOption.d.ts","./node_modules/@mui/base/useOption/useOptionContextStabilizer.d.ts","./node_modules/@mui/base/useOption/index.d.ts","./node_modules/@mui/base/Option/Option.types.d.ts","./node_modules/@mui/base/Option/Option.d.ts","./node_modules/@mui/base/Option/optionClasses.d.ts","./node_modules/@mui/base/Option/index.d.ts","./node_modules/@floating-ui/utils/src/index.d.ts","./node_modules/@floating-ui/utils/src/types.d.ts","./node_modules/@floating-ui/core/src/computePosition.d.ts","./node_modules/@floating-ui/core/src/detectOverflow.d.ts","./node_modules/@floating-ui/core/src/middleware/arrow.d.ts","./node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts","./node_modules/@floating-ui/core/src/middleware/flip.d.ts","./node_modules/@floating-ui/core/src/middleware/hide.d.ts","./node_modules/@floating-ui/core/src/middleware/inline.d.ts","./node_modules/@floating-ui/core/src/middleware/offset.d.ts","./node_modules/@floating-ui/core/src/middleware/shift.d.ts","./node_modules/@floating-ui/core/src/middleware/size.d.ts","./node_modules/@floating-ui/core/src/types.d.ts","./node_modules/@floating-ui/dom/src/autoUpdate.d.ts","./node_modules/@floating-ui/dom/src/platform.d.ts","./node_modules/@floating-ui/utils/dom/src/index.d.ts","./node_modules/@floating-ui/utils/dom/src/types.d.ts","./node_modules/@floating-ui/dom/src/index.d.ts","./node_modules/@floating-ui/dom/src/types.d.ts","./node_modules/@floating-ui/react-dom/src/arrow.d.ts","./node_modules/@floating-ui/react-dom/src/useFloating.d.ts","./node_modules/@floating-ui/react-dom/src/types.d.ts","./node_modules/@mui/base/Unstable_Popup/Popup.types.d.ts","./node_modules/@mui/base/Unstable_Popup/Popup.d.ts","./node_modules/@mui/base/Unstable_Popup/popupClasses.d.ts","./node_modules/@mui/base/Unstable_Popup/index.d.ts","./node_modules/@mui/base/useSelect/SelectProvider.d.ts","./node_modules/@mui/base/useSelect/useSelect.types.d.ts","./node_modules/@mui/base/useSelect/useSelect.d.ts","./node_modules/@mui/base/useSelect/index.d.ts","./node_modules/@mui/base/Select/Select.types.d.ts","./node_modules/@mui/base/Select/Select.d.ts","./node_modules/@mui/base/Select/selectClasses.d.ts","./node_modules/@mui/base/Select/index.d.ts","./node_modules/@mui/base/useSlider/useSlider.types.d.ts","./node_modules/@mui/base/useSlider/useSlider.d.ts","./node_modules/@mui/base/useSlider/index.d.ts","./node_modules/@mui/base/Slider/Slider.types.d.ts","./node_modules/@mui/base/Slider/Slider.d.ts","./node_modules/@mui/base/Slider/sliderClasses.d.ts","./node_modules/@mui/base/Slider/index.d.ts","./node_modules/@mui/base/useSnackbar/useSnackbar.types.d.ts","./node_modules/@mui/base/useSnackbar/useSnackbar.d.ts","./node_modules/@mui/base/useSnackbar/index.d.ts","./node_modules/@mui/base/Snackbar/Snackbar.types.d.ts","./node_modules/@mui/base/Snackbar/Snackbar.d.ts","./node_modules/@mui/base/Snackbar/snackbarClasses.d.ts","./node_modules/@mui/base/Snackbar/index.d.ts","./node_modules/@mui/base/useSwitch/useSwitch.types.d.ts","./node_modules/@mui/base/useSwitch/useSwitch.d.ts","./node_modules/@mui/base/useSwitch/index.d.ts","./node_modules/@mui/base/Switch/Switch.types.d.ts","./node_modules/@mui/base/Switch/Switch.d.ts","./node_modules/@mui/base/Switch/switchClasses.d.ts","./node_modules/@mui/base/Switch/index.d.ts","./node_modules/@mui/base/TablePagination/TablePaginationActions.types.d.ts","./node_modules/@mui/base/TablePagination/TablePaginationActions.d.ts","./node_modules/@mui/base/TablePagination/common.types.d.ts","./node_modules/@mui/base/TablePagination/TablePagination.types.d.ts","./node_modules/@mui/base/TablePagination/TablePagination.d.ts","./node_modules/@mui/base/TablePagination/tablePaginationClasses.d.ts","./node_modules/@mui/base/TablePagination/index.d.ts","./node_modules/@mui/base/useTabPanel/useTabPanel.types.d.ts","./node_modules/@mui/base/useTabPanel/useTabPanel.d.ts","./node_modules/@mui/base/useTabPanel/index.d.ts","./node_modules/@mui/base/TabPanel/TabPanel.types.d.ts","./node_modules/@mui/base/TabPanel/TabPanel.d.ts","./node_modules/@mui/base/TabPanel/tabPanelClasses.d.ts","./node_modules/@mui/base/TabPanel/index.d.ts","./node_modules/@mui/base/Tabs/TabsContext.d.ts","./node_modules/@mui/base/useTabs/TabsProvider.d.ts","./node_modules/@mui/base/useTabs/useTabs.types.d.ts","./node_modules/@mui/base/useTabs/useTabs.d.ts","./node_modules/@mui/base/useTabs/index.d.ts","./node_modules/@mui/base/useTabsList/TabsListProvider.d.ts","./node_modules/@mui/base/useTabsList/useTabsList.types.d.ts","./node_modules/@mui/base/useTabsList/useTabsList.d.ts","./node_modules/@mui/base/useTabsList/index.d.ts","./node_modules/@mui/base/TabsList/TabsList.types.d.ts","./node_modules/@mui/base/TabsList/TabsList.d.ts","./node_modules/@mui/base/TabsList/tabsListClasses.d.ts","./node_modules/@mui/base/TabsList/index.d.ts","./node_modules/@mui/base/Tabs/Tabs.types.d.ts","./node_modules/@mui/base/Tabs/Tabs.d.ts","./node_modules/@mui/base/Tabs/tabsClasses.d.ts","./node_modules/@mui/base/Tabs/index.d.ts","./node_modules/@mui/base/useTab/useTab.types.d.ts","./node_modules/@mui/base/useTab/useTab.d.ts","./node_modules/@mui/base/useTab/index.d.ts","./node_modules/@mui/base/Tab/Tab.types.d.ts","./node_modules/@mui/base/Tab/Tab.d.ts","./node_modules/@mui/base/Tab/tabClasses.d.ts","./node_modules/@mui/base/Tab/index.d.ts","./node_modules/@mui/base/TextareaAutosize/TextareaAutosize.types.d.ts","./node_modules/@mui/base/TextareaAutosize/TextareaAutosize.d.ts","./node_modules/@mui/base/TextareaAutosize/index.d.ts","./node_modules/@mui/base/useAutocomplete/useAutocomplete.d.ts","./node_modules/@mui/base/useAutocomplete/index.d.ts","./node_modules/@mui/base/useBadge/useBadge.types.d.ts","./node_modules/@mui/base/useBadge/useBadge.d.ts","./node_modules/@mui/base/useBadge/index.d.ts","./node_modules/@mui/base/useDropdown/useDropdown.types.d.ts","./node_modules/@mui/base/useDropdown/DropdownContext.d.ts","./node_modules/@mui/base/useDropdown/useDropdown.d.ts","./node_modules/@mui/base/useDropdown/index.d.ts","./node_modules/@mui/base/useMenuButton/useMenuButton.types.d.ts","./node_modules/@mui/base/useMenuButton/useMenuButton.d.ts","./node_modules/@mui/base/useMenuButton/index.d.ts","./node_modules/@mui/base/unstable_useNumberInput/useNumberInput.d.ts","./node_modules/@mui/base/unstable_useNumberInput/index.d.ts","./node_modules/@mui/base/unstable_useModal/useModal.types.d.ts","./node_modules/@mui/base/unstable_useModal/useModal.d.ts","./node_modules/@mui/base/unstable_useModal/ModalManager.d.ts","./node_modules/@mui/base/unstable_useModal/index.d.ts","./node_modules/@mui/base/index.d.ts","./node_modules/@mui/material/Chip/chipClasses.d.ts","./node_modules/@mui/material/Chip/Chip.d.ts","./node_modules/@mui/material/Chip/index.d.ts","./node_modules/@mui/material/Popper/Popper.d.ts","./node_modules/@mui/material/Popper/index.d.ts","./node_modules/@mui/material/Autocomplete/autocompleteClasses.d.ts","./node_modules/@mui/material/Autocomplete/Autocomplete.d.ts","./node_modules/@mui/material/Autocomplete/index.d.ts","./node_modules/@mui/material/Avatar/avatarClasses.d.ts","./node_modules/@mui/material/Avatar/Avatar.d.ts","./node_modules/@mui/material/Avatar/index.d.ts","./node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts","./node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts","./node_modules/@mui/material/AvatarGroup/index.d.ts","./node_modules/@mui/material/Fade/Fade.d.ts","./node_modules/@mui/material/Fade/index.d.ts","./node_modules/@mui/material/Backdrop/backdropClasses.d.ts","./node_modules/@mui/material/Backdrop/Backdrop.d.ts","./node_modules/@mui/material/Backdrop/index.d.ts","./node_modules/@mui/material/Badge/badgeClasses.d.ts","./node_modules/@mui/material/Badge/Badge.d.ts","./node_modules/@mui/material/Badge/index.d.ts","./node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.d.ts","./node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts","./node_modules/@mui/material/BottomNavigation/index.d.ts","./node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses.d.ts","./node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts","./node_modules/@mui/material/BottomNavigationAction/index.d.ts","./node_modules/@mui/material/Box/Box.d.ts","./node_modules/@mui/material/Box/boxClasses.d.ts","./node_modules/@mui/material/Box/index.d.ts","./node_modules/@mui/material/Breadcrumbs/breadcrumbsClasses.d.ts","./node_modules/@mui/material/Breadcrumbs/Breadcrumbs.d.ts","./node_modules/@mui/material/Breadcrumbs/index.d.ts","./node_modules/@mui/material/Button/buttonClasses.d.ts","./node_modules/@mui/material/Button/Button.d.ts","./node_modules/@mui/material/Button/index.d.ts","./node_modules/@mui/material/ButtonGroup/buttonGroupClasses.d.ts","./node_modules/@mui/material/ButtonGroup/ButtonGroup.d.ts","./node_modules/@mui/material/ButtonGroup/index.d.ts","./node_modules/@mui/material/Card/cardClasses.d.ts","./node_modules/@mui/material/Card/Card.d.ts","./node_modules/@mui/material/Card/index.d.ts","./node_modules/@mui/material/CardActionArea/cardActionAreaClasses.d.ts","./node_modules/@mui/material/CardActionArea/CardActionArea.d.ts","./node_modules/@mui/material/CardActionArea/index.d.ts","./node_modules/@mui/material/CardActions/cardActionsClasses.d.ts","./node_modules/@mui/material/CardActions/CardActions.d.ts","./node_modules/@mui/material/CardActions/index.d.ts","./node_modules/@mui/material/CardContent/cardContentClasses.d.ts","./node_modules/@mui/material/CardContent/CardContent.d.ts","./node_modules/@mui/material/CardContent/index.d.ts","./node_modules/@mui/material/styles/createTypography.d.ts","./node_modules/@mui/material/Typography/typographyClasses.d.ts","./node_modules/@mui/material/Typography/Typography.d.ts","./node_modules/@mui/material/Typography/index.d.ts","./node_modules/@mui/material/CardHeader/cardHeaderClasses.d.ts","./node_modules/@mui/material/CardHeader/CardHeader.d.ts","./node_modules/@mui/material/CardHeader/index.d.ts","./node_modules/@mui/material/CardMedia/cardMediaClasses.d.ts","./node_modules/@mui/material/CardMedia/CardMedia.d.ts","./node_modules/@mui/material/CardMedia/index.d.ts","./node_modules/@mui/material/internal/switchBaseClasses.d.ts","./node_modules/@mui/material/internal/SwitchBase.d.ts","./node_modules/@mui/material/Checkbox/checkboxClasses.d.ts","./node_modules/@mui/material/Checkbox/Checkbox.d.ts","./node_modules/@mui/material/Checkbox/index.d.ts","./node_modules/@mui/material/CircularProgress/circularProgressClasses.d.ts","./node_modules/@mui/material/CircularProgress/CircularProgress.d.ts","./node_modules/@mui/material/CircularProgress/index.d.ts","./node_modules/@mui/material/ClickAwayListener/index.d.ts","./node_modules/@mui/material/Collapse/collapseClasses.d.ts","./node_modules/@mui/material/Collapse/Collapse.d.ts","./node_modules/@mui/material/Collapse/index.d.ts","./node_modules/@mui/material/Container/containerClasses.d.ts","./node_modules/@mui/material/Container/Container.d.ts","./node_modules/@mui/material/Container/index.d.ts","./node_modules/@mui/material/CssBaseline/CssBaseline.d.ts","./node_modules/@mui/material/CssBaseline/index.d.ts","./node_modules/@mui/material/darkScrollbar/index.d.ts","./node_modules/@mui/material/Portal/index.d.ts","./node_modules/@mui/material/Modal/modalClasses.d.ts","./node_modules/@mui/material/Modal/Modal.d.ts","./node_modules/@mui/material/Modal/index.d.ts","./node_modules/@mui/material/Dialog/dialogClasses.d.ts","./node_modules/@mui/material/Dialog/Dialog.d.ts","./node_modules/@mui/material/Dialog/index.d.ts","./node_modules/@mui/material/DialogActions/dialogActionsClasses.d.ts","./node_modules/@mui/material/DialogActions/DialogActions.d.ts","./node_modules/@mui/material/DialogActions/index.d.ts","./node_modules/@mui/material/DialogContent/dialogContentClasses.d.ts","./node_modules/@mui/material/DialogContent/DialogContent.d.ts","./node_modules/@mui/material/DialogContent/index.d.ts","./node_modules/@mui/material/DialogContentText/dialogContentTextClasses.d.ts","./node_modules/@mui/material/DialogContentText/DialogContentText.d.ts","./node_modules/@mui/material/DialogContentText/index.d.ts","./node_modules/@mui/material/DialogTitle/dialogTitleClasses.d.ts","./node_modules/@mui/material/DialogTitle/DialogTitle.d.ts","./node_modules/@mui/material/DialogTitle/index.d.ts","./node_modules/@mui/material/Divider/dividerClasses.d.ts","./node_modules/@mui/material/Divider/Divider.d.ts","./node_modules/@mui/material/Divider/index.d.ts","./node_modules/@mui/material/Slide/Slide.d.ts","./node_modules/@mui/material/Slide/index.d.ts","./node_modules/@mui/material/Drawer/drawerClasses.d.ts","./node_modules/@mui/material/Drawer/Drawer.d.ts","./node_modules/@mui/material/Drawer/index.d.ts","./node_modules/@mui/material/Fab/fabClasses.d.ts","./node_modules/@mui/material/Fab/Fab.d.ts","./node_modules/@mui/material/Fab/index.d.ts","./node_modules/@mui/material/InputBase/inputBaseClasses.d.ts","./node_modules/@mui/material/InputBase/InputBase.d.ts","./node_modules/@mui/material/InputBase/index.d.ts","./node_modules/@mui/material/FilledInput/filledInputClasses.d.ts","./node_modules/@mui/material/FilledInput/FilledInput.d.ts","./node_modules/@mui/material/FilledInput/index.d.ts","./node_modules/@mui/material/FormControl/formControlClasses.d.ts","./node_modules/@mui/material/FormControl/FormControl.d.ts","./node_modules/@mui/material/FormControl/FormControlContext.d.ts","./node_modules/@mui/material/FormControl/useFormControl.d.ts","./node_modules/@mui/material/FormControl/index.d.ts","./node_modules/@mui/material/FormControlLabel/formControlLabelClasses.d.ts","./node_modules/@mui/material/FormControlLabel/FormControlLabel.d.ts","./node_modules/@mui/material/FormControlLabel/index.d.ts","./node_modules/@mui/material/FormGroup/formGroupClasses.d.ts","./node_modules/@mui/material/FormGroup/FormGroup.d.ts","./node_modules/@mui/material/FormGroup/index.d.ts","./node_modules/@mui/material/FormHelperText/formHelperTextClasses.d.ts","./node_modules/@mui/material/FormHelperText/FormHelperText.d.ts","./node_modules/@mui/material/FormHelperText/index.d.ts","./node_modules/@mui/material/FormLabel/formLabelClasses.d.ts","./node_modules/@mui/material/FormLabel/FormLabel.d.ts","./node_modules/@mui/material/FormLabel/index.d.ts","./node_modules/@mui/material/Unstable_Grid2/Grid2Props.d.ts","./node_modules/@mui/material/Unstable_Grid2/Grid2.d.ts","./node_modules/@mui/material/Unstable_Grid2/grid2Classes.d.ts","./node_modules/@mui/material/Unstable_Grid2/index.d.ts","./node_modules/@mui/material/Grow/Grow.d.ts","./node_modules/@mui/material/Grow/index.d.ts","./node_modules/@mui/material/Hidden/Hidden.d.ts","./node_modules/@mui/material/Hidden/index.d.ts","./node_modules/@mui/material/Icon/iconClasses.d.ts","./node_modules/@mui/material/Icon/Icon.d.ts","./node_modules/@mui/material/Icon/index.d.ts","./node_modules/@mui/material/IconButton/iconButtonClasses.d.ts","./node_modules/@mui/material/IconButton/IconButton.d.ts","./node_modules/@mui/material/IconButton/index.d.ts","./node_modules/@mui/material/ImageList/imageListClasses.d.ts","./node_modules/@mui/material/ImageList/ImageList.d.ts","./node_modules/@mui/material/ImageList/index.d.ts","./node_modules/@mui/material/ImageListItem/imageListItemClasses.d.ts","./node_modules/@mui/material/ImageListItem/ImageListItem.d.ts","./node_modules/@mui/material/ImageListItem/index.d.ts","./node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses.d.ts","./node_modules/@mui/material/ImageListItemBar/ImageListItemBar.d.ts","./node_modules/@mui/material/ImageListItemBar/index.d.ts","./node_modules/@mui/material/Input/inputClasses.d.ts","./node_modules/@mui/material/Input/Input.d.ts","./node_modules/@mui/material/Input/index.d.ts","./node_modules/@mui/material/InputAdornment/inputAdornmentClasses.d.ts","./node_modules/@mui/material/InputAdornment/InputAdornment.d.ts","./node_modules/@mui/material/InputAdornment/index.d.ts","./node_modules/@mui/material/InputLabel/inputLabelClasses.d.ts","./node_modules/@mui/material/InputLabel/InputLabel.d.ts","./node_modules/@mui/material/InputLabel/index.d.ts","./node_modules/@mui/material/LinearProgress/linearProgressClasses.d.ts","./node_modules/@mui/material/LinearProgress/LinearProgress.d.ts","./node_modules/@mui/material/LinearProgress/index.d.ts","./node_modules/@mui/material/Link/linkClasses.d.ts","./node_modules/@mui/material/Link/Link.d.ts","./node_modules/@mui/material/Link/index.d.ts","./node_modules/@mui/material/List/listClasses.d.ts","./node_modules/@mui/material/List/List.d.ts","./node_modules/@mui/material/List/index.d.ts","./node_modules/@mui/material/ListItem/listItemClasses.d.ts","./node_modules/@mui/material/ListItem/ListItem.d.ts","./node_modules/@mui/material/ListItem/index.d.ts","./node_modules/@mui/material/ListItemAvatar/listItemAvatarClasses.d.ts","./node_modules/@mui/material/ListItemAvatar/ListItemAvatar.d.ts","./node_modules/@mui/material/ListItemAvatar/index.d.ts","./node_modules/@mui/material/ListItemButton/listItemButtonClasses.d.ts","./node_modules/@mui/material/ListItemButton/ListItemButton.d.ts","./node_modules/@mui/material/ListItemButton/index.d.ts","./node_modules/@mui/material/ListItemIcon/listItemIconClasses.d.ts","./node_modules/@mui/material/ListItemIcon/ListItemIcon.d.ts","./node_modules/@mui/material/ListItemIcon/index.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/index.d.ts","./node_modules/@mui/material/ListItemText/listItemTextClasses.d.ts","./node_modules/@mui/material/ListItemText/ListItemText.d.ts","./node_modules/@mui/material/ListItemText/index.d.ts","./node_modules/@mui/material/ListSubheader/listSubheaderClasses.d.ts","./node_modules/@mui/material/ListSubheader/ListSubheader.d.ts","./node_modules/@mui/material/ListSubheader/index.d.ts","./node_modules/@mui/material/Popover/popoverClasses.d.ts","./node_modules/@mui/material/Popover/Popover.d.ts","./node_modules/@mui/material/Popover/index.d.ts","./node_modules/@mui/material/MenuList/MenuList.d.ts","./node_modules/@mui/material/MenuList/index.d.ts","./node_modules/@mui/material/Menu/menuClasses.d.ts","./node_modules/@mui/material/Menu/Menu.d.ts","./node_modules/@mui/material/Menu/index.d.ts","./node_modules/@mui/material/MenuItem/menuItemClasses.d.ts","./node_modules/@mui/material/MenuItem/MenuItem.d.ts","./node_modules/@mui/material/MenuItem/index.d.ts","./node_modules/@mui/material/MobileStepper/mobileStepperClasses.d.ts","./node_modules/@mui/material/MobileStepper/MobileStepper.d.ts","./node_modules/@mui/material/MobileStepper/index.d.ts","./node_modules/@mui/material/NativeSelect/NativeSelectInput.d.ts","./node_modules/@mui/material/NativeSelect/nativeSelectClasses.d.ts","./node_modules/@mui/material/NativeSelect/NativeSelect.d.ts","./node_modules/@mui/material/NativeSelect/index.d.ts","./node_modules/@mui/material/NoSsr/index.d.ts","./node_modules/@mui/material/OutlinedInput/outlinedInputClasses.d.ts","./node_modules/@mui/material/OutlinedInput/OutlinedInput.d.ts","./node_modules/@mui/material/OutlinedInput/index.d.ts","./node_modules/@mui/material/usePagination/usePagination.d.ts","./node_modules/@mui/material/Pagination/paginationClasses.d.ts","./node_modules/@mui/material/Pagination/Pagination.d.ts","./node_modules/@mui/material/Pagination/index.d.ts","./node_modules/@mui/material/PaginationItem/paginationItemClasses.d.ts","./node_modules/@mui/material/PaginationItem/PaginationItem.d.ts","./node_modules/@mui/material/PaginationItem/index.d.ts","./node_modules/@mui/material/Radio/radioClasses.d.ts","./node_modules/@mui/material/Radio/Radio.d.ts","./node_modules/@mui/material/Radio/index.d.ts","./node_modules/@mui/material/RadioGroup/RadioGroup.d.ts","./node_modules/@mui/material/RadioGroup/RadioGroupContext.d.ts","./node_modules/@mui/material/RadioGroup/useRadioGroup.d.ts","./node_modules/@mui/material/RadioGroup/index.d.ts","./node_modules/@mui/material/Rating/ratingClasses.d.ts","./node_modules/@mui/material/Rating/Rating.d.ts","./node_modules/@mui/material/Rating/index.d.ts","./node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses.d.ts","./node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline.d.ts","./node_modules/@mui/material/ScopedCssBaseline/index.d.ts","./node_modules/@mui/material/Select/SelectInput.d.ts","./node_modules/@mui/material/Select/selectClasses.d.ts","./node_modules/@mui/material/Select/Select.d.ts","./node_modules/@mui/material/Select/index.d.ts","./node_modules/@mui/material/Skeleton/skeletonClasses.d.ts","./node_modules/@mui/material/Skeleton/Skeleton.d.ts","./node_modules/@mui/material/Skeleton/index.d.ts","./node_modules/@mui/material/Slider/SliderValueLabel.types.d.ts","./node_modules/@mui/material/Slider/SliderValueLabel.d.ts","./node_modules/@mui/material/Slider/sliderClasses.d.ts","./node_modules/@mui/material/Slider/Slider.d.ts","./node_modules/@mui/material/Slider/index.d.ts","./node_modules/@mui/material/SnackbarContent/snackbarContentClasses.d.ts","./node_modules/@mui/material/SnackbarContent/SnackbarContent.d.ts","./node_modules/@mui/material/SnackbarContent/index.d.ts","./node_modules/@mui/material/Snackbar/snackbarClasses.d.ts","./node_modules/@mui/material/Snackbar/Snackbar.d.ts","./node_modules/@mui/material/Snackbar/index.d.ts","./node_modules/@mui/material/transitions/index.d.ts","./node_modules/@mui/material/SpeedDial/speedDialClasses.d.ts","./node_modules/@mui/material/SpeedDial/SpeedDial.d.ts","./node_modules/@mui/material/SpeedDial/index.d.ts","./node_modules/@mui/material/Tooltip/tooltipClasses.d.ts","./node_modules/@mui/material/Tooltip/Tooltip.d.ts","./node_modules/@mui/material/Tooltip/index.d.ts","./node_modules/@mui/material/SpeedDialAction/speedDialActionClasses.d.ts","./node_modules/@mui/material/SpeedDialAction/SpeedDialAction.d.ts","./node_modules/@mui/material/SpeedDialAction/index.d.ts","./node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses.d.ts","./node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.d.ts","./node_modules/@mui/material/SpeedDialIcon/index.d.ts","./node_modules/@mui/material/Stack/Stack.d.ts","./node_modules/@mui/material/Stack/stackClasses.d.ts","./node_modules/@mui/material/Stack/index.d.ts","./node_modules/@mui/material/Step/stepClasses.d.ts","./node_modules/@mui/material/Step/Step.d.ts","./node_modules/@mui/material/Step/StepContext.d.ts","./node_modules/@mui/material/Step/index.d.ts","./node_modules/@mui/material/StepButton/stepButtonClasses.d.ts","./node_modules/@mui/material/StepButton/StepButton.d.ts","./node_modules/@mui/material/StepButton/index.d.ts","./node_modules/@mui/material/StepConnector/stepConnectorClasses.d.ts","./node_modules/@mui/material/StepConnector/StepConnector.d.ts","./node_modules/@mui/material/StepConnector/index.d.ts","./node_modules/@mui/material/StepContent/stepContentClasses.d.ts","./node_modules/@mui/material/StepContent/StepContent.d.ts","./node_modules/@mui/material/StepContent/index.d.ts","./node_modules/@mui/material/StepIcon/stepIconClasses.d.ts","./node_modules/@mui/material/StepIcon/StepIcon.d.ts","./node_modules/@mui/material/StepIcon/index.d.ts","./node_modules/@mui/material/StepLabel/stepLabelClasses.d.ts","./node_modules/@mui/material/StepLabel/StepLabel.d.ts","./node_modules/@mui/material/StepLabel/index.d.ts","./node_modules/@mui/material/Stepper/stepperClasses.d.ts","./node_modules/@mui/material/Stepper/Stepper.d.ts","./node_modules/@mui/material/Stepper/StepperContext.d.ts","./node_modules/@mui/material/Stepper/index.d.ts","./node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.d.ts","./node_modules/@mui/material/SwipeableDrawer/index.d.ts","./node_modules/@mui/material/Switch/switchClasses.d.ts","./node_modules/@mui/material/Switch/Switch.d.ts","./node_modules/@mui/material/Switch/index.d.ts","./node_modules/@mui/material/Tab/tabClasses.d.ts","./node_modules/@mui/material/Tab/Tab.d.ts","./node_modules/@mui/material/Tab/index.d.ts","./node_modules/@mui/material/Table/tableClasses.d.ts","./node_modules/@mui/material/Table/Table.d.ts","./node_modules/@mui/material/Table/index.d.ts","./node_modules/@mui/material/TableBody/tableBodyClasses.d.ts","./node_modules/@mui/material/TableBody/TableBody.d.ts","./node_modules/@mui/material/TableBody/index.d.ts","./node_modules/@mui/material/TableCell/tableCellClasses.d.ts","./node_modules/@mui/material/TableCell/TableCell.d.ts","./node_modules/@mui/material/TableCell/index.d.ts","./node_modules/@mui/material/TableContainer/tableContainerClasses.d.ts","./node_modules/@mui/material/TableContainer/TableContainer.d.ts","./node_modules/@mui/material/TableContainer/index.d.ts","./node_modules/@mui/material/TableFooter/tableFooterClasses.d.ts","./node_modules/@mui/material/TableFooter/TableFooter.d.ts","./node_modules/@mui/material/TableFooter/index.d.ts","./node_modules/@mui/material/TableHead/tableHeadClasses.d.ts","./node_modules/@mui/material/TableHead/TableHead.d.ts","./node_modules/@mui/material/TableHead/index.d.ts","./node_modules/@mui/material/TablePagination/TablePaginationActions.d.ts","./node_modules/@mui/material/TablePagination/tablePaginationClasses.d.ts","./node_modules/@mui/material/TablePagination/TablePagination.d.ts","./node_modules/@mui/material/TablePagination/index.d.ts","./node_modules/@mui/material/TableRow/tableRowClasses.d.ts","./node_modules/@mui/material/TableRow/TableRow.d.ts","./node_modules/@mui/material/TableRow/index.d.ts","./node_modules/@mui/material/TableSortLabel/tableSortLabelClasses.d.ts","./node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts","./node_modules/@mui/material/TableSortLabel/index.d.ts","./node_modules/@mui/material/TabScrollButton/tabScrollButtonClasses.d.ts","./node_modules/@mui/material/TabScrollButton/TabScrollButton.d.ts","./node_modules/@mui/material/TabScrollButton/index.d.ts","./node_modules/@mui/material/Tabs/tabsClasses.d.ts","./node_modules/@mui/material/Tabs/Tabs.d.ts","./node_modules/@mui/material/Tabs/index.d.ts","./node_modules/@mui/material/TextField/textFieldClasses.d.ts","./node_modules/@mui/material/TextField/TextField.d.ts","./node_modules/@mui/material/TextField/index.d.ts","./node_modules/@mui/material/TextareaAutosize/index.d.ts","./node_modules/@mui/material/ToggleButton/toggleButtonClasses.d.ts","./node_modules/@mui/material/ToggleButton/ToggleButton.d.ts","./node_modules/@mui/material/ToggleButton/index.d.ts","./node_modules/@mui/material/ToggleButtonGroup/toggleButtonGroupClasses.d.ts","./node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.d.ts","./node_modules/@mui/material/ToggleButtonGroup/index.d.ts","./node_modules/@mui/material/Toolbar/toolbarClasses.d.ts","./node_modules/@mui/material/Toolbar/Toolbar.d.ts","./node_modules/@mui/material/Toolbar/index.d.ts","./node_modules/@mui/material/useMediaQuery/useMediaQuery.d.ts","./node_modules/@mui/material/useMediaQuery/index.d.ts","./node_modules/@mui/material/useScrollTrigger/useScrollTrigger.d.ts","./node_modules/@mui/material/useScrollTrigger/index.d.ts","./node_modules/@mui/material/Zoom/Zoom.d.ts","./node_modules/@mui/material/Zoom/index.d.ts","./node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts","./node_modules/@mui/material/useAutocomplete/index.d.ts","./node_modules/@mui/material/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/material/GlobalStyles/index.d.ts","./node_modules/@mui/material/generateUtilityClass/index.d.ts","./node_modules/@mui/material/generateUtilityClasses/index.d.ts","./node_modules/@mui/material/Unstable_TrapFocus/index.d.ts","./node_modules/@mui/material/index.d.ts","./node_modules/@mui/material/styles/createPalette.d.ts","./node_modules/@mui/material/styles/shadows.d.ts","./node_modules/@mui/material/styles/createTransitions.d.ts","./node_modules/@mui/material/styles/zIndex.d.ts","./node_modules/@mui/material/styles/props.d.ts","./node_modules/@mui/material/styles/overrides.d.ts","./node_modules/@mui/material/styles/variants.d.ts","./node_modules/@mui/material/styles/components.d.ts","./node_modules/@mui/material/styles/createTheme.d.ts","./node_modules/@mui/material/styles/adaptV4Theme.d.ts","./node_modules/@mui/material/styles/createStyles.d.ts","./node_modules/@mui/material/styles/responsiveFontSizes.d.ts","./node_modules/@mui/material/styles/useTheme.d.ts","./node_modules/@mui/material/styles/useThemeProps.d.ts","./node_modules/@mui/material/styles/styled.d.ts","./node_modules/@mui/material/styles/ThemeProvider.d.ts","./node_modules/@mui/material/styles/cssUtils.d.ts","./node_modules/@mui/material/styles/makeStyles.d.ts","./node_modules/@mui/material/styles/withStyles.d.ts","./node_modules/@mui/material/styles/withTheme.d.ts","./node_modules/@mui/material/styles/experimental_extendTheme.d.ts","./node_modules/@mui/material/styles/CssVarsProvider.d.ts","./node_modules/@mui/material/styles/getOverlayAlpha.d.ts","./node_modules/@mui/material/styles/shouldSkipGeneratingVar.d.ts","./node_modules/@mui/material/styles/excludeVariablesFromRoot.d.ts","./node_modules/@mui/material/styles/index.d.ts","./node_modules/@mui/material/Grid/gridClasses.d.ts","./node_modules/@mui/material/Grid/Grid.d.ts","./node_modules/@mui/material/Grid/index.d.ts","./node_modules/axios/index.d.ts","./src/crypto-material/crypto-material.json","./src/api-calls/common.tsx","./src/api-calls/fabric-api.tsx","./src/components/dialogs/MintDialog.tsx","./src/api-calls/besu-api.tsx","./src/components/dialogs/TransferDialog.tsx","./node_modules/@types/uuid/index.d.ts","./src/components/dialogs/EscrowDialog.tsx","./src/models/AssetReference.tsx","./src/components/dialogs/BridgeOutDialog.tsx","./src/components/dialogs/BridgeBackDialog.tsx","./src/components/ActionsContainer.tsx","./src/components/AssetReferencesTable.tsx","./src/components/Ledger.tsx","./src/components/dialogs/ConnectionErrorDialog.tsx","./src/pages/HomePage.tsx","./src/App.tsx","./node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react-dom/client.d.ts","./src/index.tsx","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","./node_modules/@types/react-dom/index.d.ts","./node_modules/react-scripts/lib/react-app.d.ts","./src/react-app-env.d.ts","../../node_modules/@types/adm-zip/util.d.ts","../../node_modules/@types/adm-zip/index.d.ts","../../node_modules/@types/babel__generator/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/http-cache-semantics/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/node-fetch/node_modules/form-data/index.d.ts","../../node_modules/@types/node-fetch/externals.d.ts","../../node_modules/@types/node-fetch/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/scheduler/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/through/index.d.ts","../../node_modules/@types/tape/index.d.ts","../../node_modules/@types/tape-promise/node_modules/@types/tape/index.d.ts","../../node_modules/@types/tape-promise/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../node_modules/@types/yoga-layout/index.d.ts","../../typings/async-exit-hook/index.d.ts","../../typings/convict-format-with-validator/index.d.ts","../../typings/es-main/index.d.ts","../../typings/is-port-reachable/index.d.ts","../../node_modules/web3-types/lib/commonjs/error_types.d.ts","../../node_modules/web3-types/lib/commonjs/primitives_types.d.ts","../../node_modules/web3-types/lib/commonjs/eth_types.d.ts","../../node_modules/web3-types/lib/commonjs/apis/eth_execution_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/web3_eth_execution_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/web3_net_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/eth_personal_api.d.ts","../../node_modules/web3-types/lib/commonjs/data_format_types.d.ts","../../node_modules/web3-types/lib/commonjs/utility_types.d.ts","../../node_modules/web3-types/lib/commonjs/eth_abi_types.d.ts","../../node_modules/web3-types/lib/commonjs/json_rpc_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_api_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_deferred_promise_type.d.ts","../../node_modules/web3-types/lib/commonjs/web3_base_provider.d.ts","../../node_modules/web3-types/lib/commonjs/eth_contract_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_base_wallet.d.ts","../../node_modules/web3-types/lib/commonjs/index.d.ts","../../node_modules/web3-core/lib/commonjs/types.d.ts","../../node_modules/web3-core/lib/commonjs/web3_event_emitter.d.ts","../../node_modules/web3-core/lib/commonjs/web3_request_manager.d.ts","../../node_modules/web3-core/lib/commonjs/web3_subscription_manager.d.ts","../../node_modules/web3-core/lib/commonjs/web3_subscriptions.d.ts","../../node_modules/web3-utils/lib/commonjs/converters.d.ts","../../node_modules/zod/lib/helpers/typeAliases.d.ts","../../node_modules/zod/lib/helpers/util.d.ts","../../node_modules/zod/lib/ZodError.d.ts","../../node_modules/zod/lib/locales/en.d.ts","../../node_modules/zod/lib/errors.d.ts","../../node_modules/zod/lib/helpers/parseUtil.d.ts","../../node_modules/zod/lib/helpers/enumUtil.d.ts","../../node_modules/zod/lib/helpers/errorUtil.d.ts","../../node_modules/zod/lib/helpers/partialUtil.d.ts","../../node_modules/zod/lib/types.d.ts","../../node_modules/zod/lib/external.d.ts","../../node_modules/zod/lib/index.d.ts","../../node_modules/zod/index.d.ts","../../node_modules/web3-validator/lib/commonjs/types.d.ts","../../node_modules/web3-validator/lib/commonjs/web3_validator.d.ts","../../node_modules/web3-validator/lib/commonjs/default_validator.d.ts","../../node_modules/web3-validator/lib/commonjs/utils.d.ts","../../node_modules/web3-errors/lib/commonjs/error_codes.d.ts","../../node_modules/web3-errors/lib/commonjs/web3_error_base.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/account_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/connection_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/contract_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/ens_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/generic_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/provider_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/signature_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/transaction_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/utils_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/response_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/core_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/rpc_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/rpc_error_messages.d.ts","../../node_modules/web3-errors/lib/commonjs/index.d.ts","../../node_modules/web3-validator/lib/commonjs/errors.d.ts","../../node_modules/web3-validator/lib/commonjs/constants.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/address.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/block.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/bloom.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/boolean.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/bytes.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/eth.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/filter.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/numbers.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/string.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/topic.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/object.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/index.d.ts","../../node_modules/web3-validator/lib/commonjs/index.d.ts","../../node_modules/web3-utils/lib/commonjs/validation.d.ts","../../node_modules/web3-utils/lib/commonjs/formatter.d.ts","../../node_modules/web3-utils/lib/commonjs/hash.d.ts","../../node_modules/web3-utils/lib/commonjs/random.d.ts","../../node_modules/web3-utils/lib/commonjs/string_manipulation.d.ts","../../node_modules/web3-utils/lib/commonjs/objects.d.ts","../../node_modules/web3-utils/lib/commonjs/promise_helpers.d.ts","../../node_modules/web3-utils/lib/commonjs/json_rpc.d.ts","../../node_modules/web3-utils/lib/commonjs/web3_deferred_promise.d.ts","../../node_modules/web3-utils/lib/commonjs/chunk_response_parser.d.ts","../../node_modules/web3-utils/lib/commonjs/uuid.d.ts","../../node_modules/web3-utils/lib/commonjs/web3_eip1193_provider.d.ts","../../node_modules/web3-utils/lib/commonjs/socket_provider.d.ts","../../node_modules/web3-utils/lib/commonjs/uint8array.d.ts","../../node_modules/web3-utils/lib/commonjs/index.d.ts","../../node_modules/web3-core/lib/commonjs/web3_batch_request.d.ts","../../node_modules/web3-core/lib/commonjs/web3_context.d.ts","../../node_modules/web3-core/lib/commonjs/web3_config.d.ts","../../node_modules/web3-core/lib/commonjs/utils.d.ts","../../node_modules/web3-core/lib/commonjs/formatters.d.ts","../../node_modules/web3-core/lib/commonjs/web3_promi_event.d.ts","../../node_modules/web3-core/lib/commonjs/index.d.ts","../../node_modules/web3-eth/lib/commonjs/types.d.ts","../../node_modules/web3-eth/lib/commonjs/web3_subscriptions.d.ts","../../node_modules/web3-eth/lib/commonjs/web3_eth.d.ts","../../node_modules/web3-eth/lib/commonjs/schemas.d.ts","../../node_modules/web3-eth/lib/commonjs/validation.d.ts","../../node_modules/web3-eth/lib/commonjs/rpc_method_wrappers.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/format_transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/enums.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/common.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/address.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/utils.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/index.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/baseTransaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/eip1559Transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/eip2930Transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/legacyTransaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/transactionFactory.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/index.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/wallet.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/account.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/schemas.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/index.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/prepare_transaction_for_signing.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/detect_transaction_type.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/transaction_builder.d.ts","../../node_modules/web3-eth/lib/commonjs/index.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/config.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/types.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/log_subscription.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/contract.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/encoding.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/index.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/abi/ens/PublicResolver.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/ens.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/index.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/types.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/iban.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/index.d.ts","../../node_modules/web3-eth-personal/lib/commonjs/personal.d.ts","../../node_modules/web3-eth-personal/lib/commonjs/index.d.ts","../../node_modules/web3-net/lib/commonjs/net.d.ts","../../node_modules/web3-net/lib/commonjs/rpc_method_wrappers.d.ts","../../node_modules/web3-net/lib/commonjs/index.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/errors_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/events_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/functions_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/logs_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/parameters_api.d.ts","../../node_modules/@ethersproject/bytes/lib/index.d.ts","../../node_modules/@ethersproject/bignumber/lib/bignumber.d.ts","../../node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts","../../node_modules/@ethersproject/bignumber/lib/index.d.ts","../../node_modules/@ethersproject/abi/lib/fragments.d.ts","../../node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts","../../node_modules/@ethersproject/abi/lib/abi-coder.d.ts","../../node_modules/@ethersproject/properties/lib/index.d.ts","../../node_modules/@ethersproject/abi/lib/interface.d.ts","../../node_modules/@ethersproject/abi/lib/index.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/utils.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/decode_contract_error_data.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/eip_712.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/types.d.ts","../../node_modules/web3/lib/commonjs/web3.d.ts","../../node_modules/web3-providers-http/lib/commonjs/types.d.ts","../../node_modules/web3-providers-http/lib/commonjs/index.d.ts","../../node_modules/isomorphic-ws/index.d.ts","../../node_modules/web3-providers-ws/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/eth.exports.d.ts","../../node_modules/web3/lib/commonjs/providers.exports.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/web3-types/src/primitives_types.ts","../../node_modules/web3-types/src/eth_types.ts","../../node_modules/web3-rpc-methods/lib/commonjs/eth_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/net_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/personal_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/index.d.ts","../../node_modules/buffer/index.d.ts","../../typings/web3js-quorum/index.d.ts","./node_modules/@types/react-dom/node_modules/@types/react/ts5.0/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1cd0c5f52256a99ffee5c9f9f964100bc2cb34372801588b76032a4caf85edd2","affectsGlobalScope":true},"097be2e0b1fe3b3fbb093259f6043fdf59c88f9db681c39ce90f76c5f038ca8a","f1cbfb4a882d5292086a912bc20cc69eef140ab0eb583c7e5dc9a3333393000a","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","531cd80e4dba2620d86844a50e7d21b89436e56a14e66d6774e99b3759ac69ad","c83a76ad0bf69b0176042adfc65f8c6be7dd1141b66cfa20954520315dcf2c1a","af99fcbddd1d45ac4b1ab3d21ef6665c3a4c78003f3dcf2855f406e0d41f5545","cd805bb241b70dcb5eb3ddf78a23c561c81528a0e4baeb10ccfb967705c9132b","83e56d3337e1a6dbafdbe5a2502a84c330b1a328ed2860d689b2ded82b1f5c95","f186de91b1c50640e4d2bef41307ee06446d7ec76f787d4384ef808981025546","4886055af73784b27ea115b68763c1c0c30df8528ba50e7d1d3e0922c6e7d8e3","e0407a1b8afc9b03d6b3063a3c8a80f4c769146bbd39fccd5ade9df5c4ffb703","ae1d409a961b46f0b0c2b1dbb51ddf298e161698b7ebc3360dbae8cd6837f06e","cc051639247f18781cd39ae70ae4606902fb5e7ea104c1b2a4927af5cfd05693","40a5bb1733bb8fb3ffa425b92db062334f9b998ba8ad4390cc8008cc2ce701ed","0cc48e862938eccfe92ba6c7daaf5fa144bbc60ed8d547c33dadeff1ab788cd5","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","cb5945305653cc61b0b16a840c8ad2bd6006450a2f91012b3974cc413214a139","1f4ae6e7f749aa9a53317baa0e26dc98317f87c54a323250f0aa6d8689fcb5ac","1bfd2c00081dd582489d1d0dd64d270b9c8bc5a62cc9882865b405bf8c2d9b03","8ec030fc57edbbd19ad4752695ef72f7e68747092a66476422e04f9a9dffeef3","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","8ea05ab5a1250aa9d98070151c3981a85f5fd05185454f6c871ca2a988feb725","0e1f5fa05f1097f2cc3a1581afc7270af08d31be123f3a8e92a5b4080858861e","655638506266d44bc4815f7fda912d712114e200aa11ce4dee055d357dba96c5","4df00cb9ba2bc813c1c5fb996d0282133346b3d320c2b8e6e77c5b8f426182b8","03fd06fcc894c94effaef2fc57d92c9e2871c6a5adb2db7136859a6ceff3f91a","f9a7c89ccff78b8a80e7caa18cda3ddf3718a26a3640dd50b299d90ac405f9be","9c78ad8f4f43db74529e2f40798ca4a8f9a2b09cad5363c400aa7ce691691ad8","4680182e054eef3b7eca5d9168a70191033b4da65cf8d013a6ced7ff6948bc80","f2e258dede3b70e146e3ea257edb8e3a4c59ad9ac5061a60154f5998d55b031b","3bd6ffa4f64fbbc031c1503c3ce63fa6e2134deb673c8571130a3675d91fcb17","1083ae62e780d862a001f7baeb2c8eb49589da9faf2e10e471ddd117b2d1f40a","53fd33fd439c753899684518742fef08106dc63afcc1c9f62353eff3601e7fdb","9a2e75d1d72d7463cb3a0d4a01c5648bdb4f54866acaffb0360da91234c0df8c","2d157fcd4056b3190ae9427cc822f395d30076594ee803fb7623b17570c8f4a5","47dada41ced5a0e23c415fb8599b1b8c848fdd1df1b2f02b2e756558be9b3153","b0a59b88d6d32ed5734ac9413f8a9e34773d4b7b0eddaeccdecee24ab8a4457d","492dae861616e49ded6e82df7110868489b8f80cebb5f56bbe05bbf829f8a6fc","dd4e64e454be95294aceb5286575faa08af11ebacc2c524310be108c1abd2a84","3711c896e72680d79cfc4df36cae172b7dbb72e11936e5e9545f5351e6ed0962","fdb706b594619f05e73b97213d760f59ed1514b302f58b4b46d86fe77757c031","f0623fef3752e3b67ed969c7e1c311528b5b54e3b43d8bbc26073ae34387d9a6","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","c6b95b2822c6d373dccf05fcd48d3ac615831fc98ed4bcd8fcbe41dfdd8a7ea4","91df8ed021ba6bde734d38d901a2d3664d2c804000299fd9df66290cc300b21c","b7071465f540ceb78d697e547f495d7ba4fddb94f9443bb73c9ba3ef495aaae7","54b0087a8523d0a289460fb3ac4b9ed55633977f2eb7e7f4bba5ff2c1ba972e0","62a0503a7f38a521fac641f3b258516ce3229852cd297920af25f798e319bbe9","7b7840c394a0c5bf219576439776edb4447e9228f0fbbb2a29caa8f4cf6a95fd","794d96375f04d39dc8513db4479a0023d3b8074b9738e38f7c0ac62d9696431d","656b3a9ee8a2eb73218ccddedbaf412751787b303bf5b0e293f2c60443aeeb08","e78dd7346725ac2d936a296d601e01f55eefabd010bee84cd03e20f55bd61a8c","701793d7bdb9be9d8d1ca80092377c9c323899130fa5da8af06b25cc7e2309d7","6c4925eb55a080d0335bbf728fd0824d0e4848d554aa8dd260b83ea8ac7866cd","492dae861616e49ded6e82df7110868489b8f80cebb5f56bbe05bbf829f8a6fc","5ffdfaccf283453aa793c4ed59cb30c3a30bf8c25f9a096b3211c23ccd19e976","5e19a4ddd649b5274e911ed719ef20e76b2b50b195cff0a6128974fa7136a5ed","5c686a3b785db3d56350c9155f8cbc83c741279a186422e813fec9c0b15babdd","0ad44f4aeb0ec1e2f8212fa0d28034a958ccbfb9f281e611d94bbf042b76b1ef","9a390abc9db6ac661fd36034c0737416e64092b00ad415ef0bc72629542a15bd","9e6c51f61f922f70bf41473a10ca72f8fb6218587a5d305544bc64ca9ebe6768","0f6b337b59b211dd99e8758c9a1906f9dd7027b74bb6e9cb11a14ed1264a54b2","0c5b829baca9b48adbeef6c026e028e10944ef215d3947db17c3f1a0354ebdd1","4b247257463a862b001ae097a3b5b1b90dc536f26b5c10860f46a086d404dbde","d0f2ddd588d6e73c08eb89d8e1bd6913b4e76a556497b81384321f4b308a08f7","d302d9806295f7018e115f0841222106ea13ff08a84b6a65c2a6840161fe06ef","6fb8d589421e9fcb4d885775748fa5a2607d30f7d323b99f39178b0134b24908","ca8d83f4683985cea219b3171d4e2255e270c31fd1c9fa9fee870147928a1a28","01bb683a8d7029615a664f16371d85d6c423f939e642127f267c699b8fdaee67","6f9ccfe772d526c448050c16f5c5e803be9e4250886a5f1bd9710178877d5749","bf11293cd047c76a515ba6e51fe3d9b7c643d1291795183c03ade5caed92cbc3","112df68e96c858f1283368006f6e520981414294c0f6cea7e1d0b15a50ea0ded","d2b80289f4d6e739fa686931a59934d53da37f295f3ad2de994c06c56f9f115f","fe5c41a6b647b418c0b1f8a5b0ae5570f197a15183bf39f1d0f85c5ef779839b","b9eb41c2fe73fd3a4fa20abdb6c8ec11ad75c5047c4a0acea1f54aa412e27087","851df6f9fda2d1de63c60947414b16d0bbace00ba63870268cf9b9ef42411d1a","e0a885c5ea202b9fc29b95447841cc9bfaaecdcbea8930d3b86437e21f24bb8f","1e40aa57e7c8fb77cd6ff7fd4f43d3c71ad9a34cee73786c379c1c2dc6ba5717","08f4c7fe2450260b0765a77c33fb31ec2f74135a3a73b8a66ae23b42477d5b44","603938fc65aab423081f090ca51bccadbbc7b82448b4318ed081df2b1cb915e8","b28232605a97028777b6eaf17263b099dd364be7e5584308ed30fbcbcd4ce64c","36250794500a1817291da6e52645a2c56005488be135970f51d8c5ed5f3d3e8d","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","98461c5f55d1b191d145af33a258679cc93b41f876315b20f567655642726c11","05034631dc7665c544420c87919787415718eb904c7e377a2deed50f174726c5","cd2b5bd606dbef4a5a0d0ed510e2d53dac00f0ef92db994e1f72ce4525d918d3","ba2151c63fe743790a29e9e8de924e65d5bcb4f51cff999b825afbaf135d592d","2e51f8457814a3e4aa3b73ca27c14d36928a348f85c003bc3b1b8d8797cf0fc9","c4cdadeb3aecf4031106c52c2fb782ba5cdcd7dbefd0a3aba2fd9850f8cdd478","5f4a10115c06510164e18ac8a5b5db1f615f096a40d5c69726bb32309af93252","58e3f7eeaadad8a3f69dff6a59566e9eaa15b11facd397e2b9e199fdb2a84533","537b5657a19792461eefee12e406dbccb7b3fbbf4117e7a443e81e925f6e1b43","c3be2a86d6ab205269fdb5f1da4ab6e7d825f8e119ecc235fc587cec2af2c8f1","a35dd28e140a6ded634995e25fc6c1d1f85eb59ebb18c3afaf5c66de43972fbf","be4bc9c39dd458aa3a993a48dbbfb09be898bf30f3276660b012401ebcc54cbf","25b92cc86a4aa9b088a1abb16c60547951859d4ae12fc909e23d675e6046b4a6","dbe50a407dca6d6143ac10dc3f4a09816ca2604788851d086e621d990eac1662","8b226b564befbf10933d0e3c0f179c522aa024f1472022d9fe35a0addd6e17d1","43d7bf6b658159db2ec49152852d3b25113b50ead0a0088564a83bbc30b5a61d","4ab69812962d1cf86bccfd350af2e07ce74267e90071888f823e1402212bc100","efe27b07f8f5f9dc29e2c64bae34e21c3f755895adb0aa9813733860d5fa41af","c6ca120560597056bb69d12cf8b3f2e05aa15ad6cd2deda6f7b25ebad41b15ea","0bd118496029e7bde27d232865e91eb1e8bd5f1aafdbd8365c2f8862c2122326","8a9fac3501784d42eed037c9b3702a64e51ab0cf862c19a82851b712703e32ff","e00aed0f8e5f35807d735a1fc5424e3a15fcf4052eab5cc59887006db55d5ee7","9ed09d4538e25fc79cefc5e7b5bfbae0464f06d2984f19da009f85d13656c211","38ff09c15f8e6e63f3bcefdfd3259a4fc9b7b337c3fb71a099b95b406cb37bbe","95a5c5e7219403a0d64058de4786e152e71540e824d22d165062489433f21830","32c59dc2691898bcf265c8773e270833b5395b84b97e654cc79db3896af0c79c","7e6942c0b65718725efce0b7fbc5ba928f98a58d7ee9c76ab867556e632b09ff","193b2976612865809ef6fe8b0e0e82dac7ae38a38272960e847e51a30c1a89ad","d8aba69bc718a4fe83c4b9cd272e069a38ec26fd13fbfa43100290ccf1db334c","abcad16e71ad34d3a084e09d37e18346e815acb6d427d3bf963d24444beca822","0f8ab698d1aae2e431ef1be17cc4deffbd49cd19bc1955396ed0dfab01ea3601","26efbde3de3f0c08a94c834ae3edacc28d607674ec604cc059f6dfaada86d216","ddb649b17c362fcf7eed5b9d02eb8ec2bc750e1b3c7192f27adf68ee66847d16","c34bbec1fc5b38f8dbc4c5168193ded6c3711dff5a2d11476bfcdef7ab912d19","46a0b34e1264c4d25ca6646ff0e6cfaa7275ea1ae5a6bc23d4dfd84edf2f2b2e","ced781fd7ea93eb9aa8849bead6b4fc77de4c65331199f4c5b09602c55433c78","fa0ca60be1656ec39e73a9665c107714deca1d97ab7560c62c11c3b284b1eae4","af560c1ff8c707db02ceaf6b3cef02a112c3d75aacadefdd16fd34d1b2229285","e53812b1443dc6bc4e4a69889e3f2b070e37e2b2e2a8de83f2abca3095713bb4","0bd75aa3ce7c1bb233ca29713389cf31cbc4a120d5d23259e0d57812cebcb88a","1fe5971464c95d43d6b783baaf1cabd7c7dc18a01e61077328eb69ce422713df","ebc21e72f3dac91cad3151ddb0bda00063abf1a33026e9be567bb48d85425afd","506f2dd82ae2d9db53d80e21068cb73c483627bb0ebcb8755e93921a2c37b9cb","e86d6b8729dd50078ba088c5074e1c75b89ac5d9eae3f23bd40e836fa0fea955","366da5435836cb0b67247c1a236b449c61aa04fc081665fc7167d80f33fa474b","565f1f221d85fac877f79f93c28fc707c6bbdf7d42fc863aad8225378e4d3d5b","4433dfb23dfb3d272e5909bb251bcbdac65f2b82b407c877ca6ddbf18906e1f5","ebf38053e880b270a69df4860cb1717c456dfaa319d48c88ff49dc45d7134491","1f5973936b80ca510f224b60f2ba970d166be8d8d6fb3ea203d6ad17b10eb920","23f02e8d1ee8019ff837c24e861dcdda70ba155c16a5d157e326cd24a2f9410c","1e8b2624aec425d4735d0f70a5d6cef1f46ecef33370572f70143ceddf85987a","4794c47a68f28eda1d001528fcc5a5fa93f079b3a44d3f97c37d29fa00e93c72","991f4269755278892fbf4c2e2a5d0882a77181310143663755f3b33c71edfeae","b6633c7eae89dd869110002a5c7709263a0f92d499350db2dd4660d0ea81f661","28caba7d9bc8ce812dcf2dc0d27e2b13fa12e75b2b83d3598be16ef3d10c5981","6756086988b5faafb5b0f605f761cd13d4878dc0aca5700e62a79bc3ea6673c2","2a8239b8bee35d3c6793237d428417773ace21b0db27d590e2de4057be8d8d40","1ba9c459522f344c0c069d59428c6fb01bd73e202f8d3d4daf5f5401e1c994cd","103790c6f7fbc7475796f802b76a9412f2a9d1aec6b3412fbc73ee1ae4928fb4","6cbdbaf73d4d277154ce14c64151df4afe8a3d23ec97e7e548f1aaac7e1d035c","2a8e824199271710a46286173586b543ca0f413aeb526709fc59045cf044c44d","5bd3f45bfb146a939c3e0739f9f401358c4cc3b69e433b0234b8f26031a0e300","99bc165363dc39f365aa43cd9ee1e8e852c90a75ba331b61e80b86e6ee28c1b5","b2f527d9297256ef42ec14997a44d4a8a437ffdb510886038562642577ca4c14","ac215a4bb2a5dccb63c39a2eca31a4bf3fd5b78556f94decb2b93909a4480dcf","bb645cc3b8b3ba8ebd06335894c39b5810c7a15cef55f13e3611e802cc90ecae","8be64f740292d91daa049e86c60a4cc955b74049ff5a5f4fa2965bd4b955ece3","fe74d49fff1914ec5ca6b8f3b7ea5f1b92ae06f9d4b4c35c7426ada9c13e9e28","dea7f3ed19e4d06fd55e8d8256811b8fd6d50dc58b786162ff2b1dc5fa5f2200","2f0995efcb2d2d9d3926adee3cb523cd1bd3352be72a0b178cf3e9c9624ce349","6da586222c97b893743b885bb6277102a2a6e5b0f4e8577e3ad18bf43e1227e5","e2785ea1337f71dd4a9fbba7ed714865ee42e2eb952c03ad69a3f440e3f0cb36","c48e28d82c22f46175446a0a9bfab97d8b4d0448d30d6512356fa726d8613003","36d655378874cdba5bb48544f02f261566e4b5fc9da6d059568aa81b9490e2e8","e9aa694406c00009f8bb4a8a29235f219b5cb81c34184bb3ee957764918aaacf","4dca5a6b9792762913ae2a230b782b351405c243244c35ff0a938347144787d2","1b34b58370cbd65fa5a3a58838c3961079d28867a044a2fa449902fe6a5998d9","29eef090b44de47e1265b91a5d5dcc36d989c478b0410b81e0825d13c16f7e8e","27fff93cb53ae9a40c88586558463d9a9565c4951643d80597ce4e2f3e1fbb74","073b157e1b9f89ee0b8067b0b2202a63667d7f3a2d66f2432cc04742796a0c67","065c5e60926dd6d00a85f2e3295aacf71912528416f4e4db53f44be891ef07a8","2d393910ac74ddee8ed6714d156c7155c276dd815f33c114b87d084cde8577f4","0c6096abba365f60377043a7b707e48769bd11a2ae1dac33790d651557f797b1","9df4da519d58916b856971122d79e200f2a3be01fd2a0b4e2a556cc618007824","9d459e023609e74bbc8da58e71d21fafd293bad7130da8fe9c12b2200750ca36","3544b93ce1c4afc26e27889bc1683efb5fa96ccf470c8bb5432fac6111422aa2","6d7180a99a3385df5c383a82d4ceaabeecc227fa83eb9c7c8e7edbcde284ab4c","52d872949bec72fdbd43c683f2de8e6c99812e520d4242140cbb1def52077b52","cfbd3062c931b1e325f9b3d6fc1ebd25246951a0b90267d35af580dc8048490a","0ebcddd81acec871f2a6bb726f6611d367d5c4f6c2ad6ed46a5edaee52e1ecf3","6d6d1b9c3cc0148d3aa40f3f87f6f616a38ad8c1b68b8151b866186a6c85798d","6d754d32de2cfc04c15c77fbe0eda31a2e2e4886b2e4c5e6fec5e24a07d40bb9","13431dd53835377d79adc5e6fb65642cae90612804d18161c6538a348b817c55","4d6b3f10cab65e78389a1618ca68a5258a6b6d2eafc0f454190e011cc0a90d1d","edbf50304ae52ed829961d62d446dd1e3f4fbda1f0e1db1c8934e05b3b73d3be","7880a5552a9c6fe2fed8a970430085ae9b753d5778033e6a704fa6e0aa164589","9c32dc593fd45d6da83ac6e7265247f13da9a4c0beb58f254fd78f97bd883dd5","27e25e7fb2df5c76ce24a2cb6fdacdd031fabe665b4203ba1e8a82efd7ccad85","233fbf69bc142b400afb9aa69f6289593936bc53dcfb464206dd4e65a4194f91","febca747ee287631620e4dd6246ec216dcd4087a5c70b470dee1ab7c6345fb21","c3af43e4c7eab04386d418fbbec22aa2a0a49e995006e79b6ba7ca8bf1b916f6",{"version":"549df62b64a71004aee17685b445a8289013daf96246ce4d9b087d13d7a27a61","affectsGlobalScope":true},{"version":"c14856169f9aa2236e3eaa1748fca0998410c688c69eb248d3d551c220107857","affectsGlobalScope":true},"e27ecc0d7bbbb4b12c9688e2f728e09c0be5a73dff4257008790f60cc6df5d54","9a31aa1eb20cda88b8bb3294036a984a921d64b5e9aa06ca369f8070b2981f81","00cfb9eec13120c639c2ee240b4c0a6baf0604998ff5e515d180de34c8f4fafe","acfcac1415f507f54249ad589297781f3c73b9bfacff1ab9b52b341282d977b7","15e1baa92231dfb9db3cf4ca4a8d2970cfd1e39af7a2116626afda7d33417d92","ee3d1e52d8dc76a01215ad1afe59552639c9b0c09c74dca5ef4a709538277609","bc5ce122aa88a6a2b5a60c538abdd43d2081f1bd7a05c06ee69ba07deab62133","78365b5144a60a751277379c0f3f5e9d1a972c305d5e27d58b1ae920cc0569a5","dc66fb9d538514e75bf3750edb6648961775139c5917217cde4b071666e27e8f","790cfcddd6b7cebbd6d1bc6e70cbdb92acf1b4ab436e5e5dad3437c81a51c2e8","74f567556362194022d151211deaaca8e7c51c4733015be3d0b318df5869eb94","78fca22391d0029ceab9c7e424fea085ba38d0cdefacdd413d04bdb80974cae7","c4285f0b817f5480a4ffe86a977980018dfa65b8918a33af4d8a28150be77869","44b9dbe317108baaa35f5c3d4a1ab7d183001f24517923396e938040c656e590","afa60ee9164efe27fd39fd758994eb8537459ed6bd9c9f0cbba3fa75a14608e6","809aa3df6126d49ec51cbd7038ac0f2bb58f973e048d2c6cfbec76a8cc67d33b","7bccc20bd71f3808e0c4027c7378d1481e9b04af4bf520885a99acf2a2cd09b5","0fa6899ee1f2be4f6d8641a444fbf598af4129acf30bce77f27466b3d0a86cf6","677d6e58592ce107c0c81666e729a52cf0315614108c3838dee7c1f7cd9fdd50","80d210d6e3a8f7a85323e19c7ef7f145ecaf7a29c8ec210c90810736a4a3ef1f","61296e04fa2cb74b694d71d82fcd25416bbbc7c4decebf3e10d521c7fe27a976","69fc3c1f25e765e817ecfc91968fbf6934e4ba304ff998c31b3d0cfc56772957","fd60dd30696507f20e2267d069e30be39f9e7cc55d3e55c947653324fc36c411","eae144f031cb58fc7c94cb2d405c00cba94414a675cab9dd3d88b12a59602f8e","f369dea98bf5569c323f39110018bc30696595504922861cae1522918c9e0701","9680eb7d6043a005972d9241edb571ce9fefa0fb48a23b992c2c9eeef9ec6b76","d76e33115d9942600b6165e8ce3f0eb04a421d20a00d55d76380e02377ec6397","91dc72de609fc31f6b5d86741abfa61efb70a56c843e160182a5bc1a786d964d","2b7d8cabdc3ee40c9e5ed3876d8e9ba2f04a0bf810e2babdb10dc0d371686996","5e14d466f5874656e7fc9588f41ca3211d8f442406bf82482c262ad59e9b43dc","4fd346095bed1cfb30362b6209da2dbd5534a27f49ffcea8e9df14de750fe8e0","6af7d9b2ad1170827701e982a1b95769f3a7b08ea162c192dece873876d09f0d","4bc9bdf594a28cadaf9cc499be2ada848816cb7a04b378972bf45873347971d5","6a4c90f6e3689f67e8a9c631d3ff77d4a7bac080a59f89c58a056281c326b1a9","b9307a714468f1d53e3888f7fd18719e29857ca54bc964a4f3e97581d35471c5","c6427b5dfd9a5cc9ff0550aeed7ef42e65c024a4e49a34f8f1db7b825a2e6f55","1c2ebb5979676c2d7f77c70f31351ff4f67649c9ae691b1fc9d0dc8426437640","81221f7fd89dfd601cc335f254d495fe5700d781f5aaa2cf5f43a31f5383d306","791b7d18616176562896692cdeff84662d2b2ffe3fc33fce2ce338eaa8a8288e","a1cca32c01d9c6d99287fe9d5f25bfb96fba2eabe4cc3e5aec4be0280c15685d","53af44d9509a4c7a9c5928f2141b9621568cd334a4661238fc691e96df7a40e9","b032354f740087e7cc3961da4e87bfa26085d0bc47e04a875d2d9191b68b6ac9","099513a066b37554a605ad177febf4a06ec6d328f1e73d7ac6caf6bc7d0f831a","38578caefd4849aeb72eae5bbeffd8c1461f356bd639df8ccfbf28b925a42584","c6cae95a5b59dff4560051d64521d405deaf2cb2cd90c8639ee7ad75edde0420","dad039587a49a7fc846296ffed0f06cb2a74212d2c790319ec78c3a0c8bce191","b3f74f9b3bd37bc1d94b2d1497573ba6949fd6b301decf93f19538a5c94d63a2","f25b6382d578b787f4312885e3bad371d3d12f9355705263451bcdc68ae7dd74","8ef51fdb94c367e62b740c9be71b3da249265da0501d87151d689879cc575ebc","2a69d1875d56d105f4da73dd0c2c15b02bf28a8be62d5bc20e8ce6567f04ae0e","53cd187bdbfaf22effa99d7dcc8bbad24be8338dc86159a0e2ef24baac4688c4","e2af9d295596a2d18b03476b60994612cd6e24fafffa960b625755025bef2cb4","ac0a0f97c8d727010f54076ae2a6e3117a87dc9404655f6253b96a16994482ae","ba4fc9a7ca9026a2c6a92a209f1b0c00bff74c45942bd7bc4ca21d6091bf4950","9452b044c447276df6982174706b00c0b935f649a6dc3a355b6f012f15e0828c","8a094da2d461d39b5193a9dc61d92b9e8a0caab6dadef87c659b27310b36e221","6f084b6cc2c5dac837b075fe50104fe90b2791efd9966ba0f005966b14dfa3be","f99027d6ba00ccca3d7eeacb764bd81b31e8276d0a6e64eee2eb1e0a269dcacf","eb04fd51a9c7a020dc8bd2b1fb0e686073521f8f25543e502de6138249866a43",{"version":"49a253ec027e56c55c7450a0c331cfe96212b3d1cc215b1710ba94a083404cf3","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"7e95f2b14f9f05c25bd295dc1c083472151701d02c87920f6a4e6041b248de75","affectsGlobalScope":true},"c40b6647c870e1e67fc2df5e544fe37f1ae026daa6a3f1a6b94451707cc01326","d6a7eb9345d3b1ef9e389be7bf405fc2591e38f1c36814e859998dbbb8ad1a60","186d15d1dba88283c0e725ca1c5dd3a072388d37eb08b9f6c1c96ef106692917","aca8bc66a0cd441ebbf1cac593435bf7851d7ff420847f69d350539ee5827837","016df5bb6a9c3daa61c4e14af44af06add0da2ec7ce1b817c8dc37b72ca9f2b0","a764d234d0c6a8cd8b8c5d2737815eeb1c5f2f281b1b391d13a17cb6320b16dd","a529f025c54e6a3abce74d6e7fbf34fc7368ebd86f7e5637fba8f8fdd1537f51","7c1e205e270040fd95d0fe5fd98178454b4407956cc076ef2814499be17fbbb4","b8caf47bfd6b34656edf507ea52cf5fb8aa2a3d1e74ca7373e24524e00c1c3f1","78d57e439bb793883e65eddb73d7acfcd918324cf2a398664c4fbccc554b9e9a","13c3334b04a40f27d2b46c6a4dc4ba4c97daaebe47aadd78e49de8c1074c7d38","1d7138e1a985cefe057a2e8a9b247c761ebd6b6dcdae1c75e298fdbcc0a53bc3","6acff4ec8cc752a1d47f508125da4680c38575b5a6f649c5c4bd3158a022e416","38b0abc5f6daec02f3621c6cccdace9b036e4a96e667e46b119911d885606d13","75e321f38288277d4b684b798c11cc7af369e27cd1f80d48e7370c6f0a737f2c","7624ccf46aad0e7e307e095c7fb4b0b7f6ad4b7aa79024273ca890f04789df81","89f79facf5004c8fb0ac9f1d4f37ff4451bdbe65d37dd1d4ba11566a731749be","16896749524d99091e19d7e838e2bb38683ce5d6ed77dfc055c2e0c391187ae0","d5618da90a2bdeaaae7fabeca487be904c0be5c521f5c2bee7e63176ef2faf68","e3d574fd616fc56c3d84695910cadb468f716d598e07b2974c490ea973b834b4","a7ae283e914ae51002ce6736f6b890beabbb26b5fff7b31df907ad0046e5564a","56f65f7e39e076c4f94f4d68be69a45e7063007807b7858a7c3f9f8586da0df9","08c00b415e40e543bdefc6cf02d188b5dc13f6afa34bda0a7d90282f31b1b19d","c686101093d60519f07e285b16915ca135ab262518b58d963eef87cdf7e3e87a","b6aabead380560f400f49e7bb44a16eba36ec97e212d92a911744c8132bb89a1","0d9e21abee6ed3c94313ec3fba4f70224b8bbe8305b9a56e34529ae0fa914457","6b24035a9365cf9fb0b2d2d6da3298a315cea78264a1cb7e115fb63714535aea","556420a0e672fe4468b4bd90c339c9d38356a1b00b341b188918efd7d2500b3a","77b6a3789ee02e721fe15287c447033f66074bf4ba2bb8830b9ce0e0f0c2c1d0","59ca8a91095b876e2aeced4a9494955d339b048da9377e696901c983424bfdc7","66643e4b6b8b2b7698ace44ce5d96ac42448e9d8a0bf30967ab6d2b89dd93603","35c58226caecf2ba4b3ea9b0328e53a35e6395f029c78627c00d19a65dd3ac31","6d88bd7c02bdd10dac1998aa504e376d5e9b9a415b3c9a11c844be89721a084a","2e6b919c6058f6805604051979f3fbbbea107cfe9aa64e8cfa46c2066b2cc710","28d5456af078eae8159bab5d74fb424eb505e292dae44893d6eba1199ddb7531","dc1535b4f86b2b452c716ef64a2230c62a1a09d9a3f84e50af62a47623074f1c","703eded3671d955c3ed60dedcce6e3d55ead7cf3a0562b4ab6c94984c9c523b5","bdf0a6a3909d90ca8c7ef1116cf21280c350b69e53a0b39a727c01f65b7e0976","46d6c573b0419d0f0a0cf7244e28fb8224adfd863bee309c86d38beffa4215f0","70a29119482d358ab4f28d28ee2dcd05d6cbf8e678068855d016e10a9256ec12","869ac759ae8f304536d609082732cb025a08dcc38237fe619caf3fcdd41dde6f","0ea900fe6565f9133e06bce92e3e9a4b5a69234e83d40b7df2e1752b8d2b5002","e5408f95ca9ac5997c0fea772d68b1bf390e16c2a8cad62858553409f2b12412","3c1332a48695617fc5c8a1aead8f09758c2e73018bd139882283fb5a5b8536a6","9260b03453970e98ce9b1ad851275acd9c7d213c26c7d86bae096e8e9db4e62b","083838d2f5fea0c28f02ce67087101f43bd6e8697c51fd48029261653095080c","969132719f0f5822e669f6da7bd58ea0eb47f7899c1db854f8f06379f753b365","94ca5d43ff6f9dc8b1812b0770b761392e6eac1948d99d2da443dc63c32b2ec1","2cbc88cf54c50e74ee5642c12217e6fd5415e1b35232d5666d53418bae210b3b","ccb226557417c606f8b1bba85d178f4bcea3f8ae67b0e86292709a634a1d389d","5ea98f44cc9de1fe05d037afe4813f3dcd3a8c5de43bdd7db24624a364fad8e6","5260a62a7d326565c7b42293ed427e4186b9d43d6f160f50e134a18385970d02","0b3fc2d2d41ad187962c43cb38117d0aee0d3d515c8a6750aaea467da76b42aa","ed219f328224100dad91505388453a8c24a97367d1bc13dcec82c72ab13012b7","6847b17c96eb44634daa112849db0c9ade344fe23e6ced190b7eeb862beca9f4","d479a5128f27f63b58d57a61e062bd68fa43b684271449a73a4d3e3666a599a7","6f308b141358ac799edc3e83e887441852205dc1348310d30b62c69438b93ca0","43277e48c8674595dba4386374d23b4bfbd144aa6ea42468405050bfc8c7b0e8","ffc483211113c0e91d9d5258d4df93d4b1b8e740a3767f2a63d3ef631fbf00e4","0b454b1f7a282454d14e314fabeae904cb0c4af397556ef0fcb782d3f863ea59","e3ca8d058c3d2a6eb59acb6f236d19d21fb8dc18236e91267242e4f3554bbab9","aa92d3d47e1d586dd028314aab21d1424e02450bb1621ab264b42dc09c27191b","0081455199e151f55f191895fd64c80692fbc52e98a45f6f50719ff3304883fd","1f85a39514162015084e6cd6fe900e73570a62374c25cb72a95239127367b06c","b62d1c9cadf282b5bb4c22f22767db50fc396024addfd50efa81629025230f38","82b6eef18079b1112f035c9b6b73406c2f0b3d2a52858ca91670afe78e0ace84","f71d62fbaba155d97fb38af371eeaf1dbe5b2ef7c3196e867a4c964b986c383b","83f8d4b047edcf6ba782f43f8f7bf13cd1bec2cf9d69c9594d900da5d14ed61b","e6ffc3fbd5583ff84e4b800380ba26ece906021cb6c8b40ec25c8d34a128735a","bd4e06a52d0dfe96a0ec55ae483a14e4cebd647fd0896b575519de9baf602231","97044228a7fb6800326735b6c812f32e4e1e54ff13a7c55969642cc751566ab4","1c7276811c37fa9ff8425e4e29c81c2d4a1a40826d146e3ac32849442af4f8a8","1614081b7588a98f2514b6a692b630c45c7f81978a7e40ab3e0fb46cb69fba1e","b2216b7f241cac0a8ae34a8f01d272f523f82f099bd8aa7aadec96862eb4475d","310a3152e5ef38ff351ad49c5bdbb8e627c86af52a66f5388130da48d7c5b685","41f95048e870e070e6cb31cb67f9920286a1bbb3731289350704f332b474b887","65a46ddb5fb8fa18b1d89f3281a344b7d12a9d74c3c797e27e7299bdb9dec2a2","3791025431f85737d4b88a860e484ba343db864ea1468a7f8d516e82aead9f5f","58fcdda8b720a302372871eb4a809800070090fd6623f6861465c68555d4f4dd","12cc1a0a5397ea1129e7e2c2537db119a92135284a817e13b8b3a1d91892723b","cb22feee63d3d834d1d446f67f20c8fef997ccc73277783a968050d765679ae3","ea78386d121d4d364887f4737b41b8a8ae0aec4c1fb470c439577d907dcd3552","1a5e53f2ff80f392d393790d11ecf08756bf09fae5d76539759bdd295de4016a","e43924ecb2cfa4cfbf1ebab53ffe0d19ebb993fde223312fc08e3cdcf4f0a084","6706f767bc354c40796fb3e86e19a45a61e8f2f1252589f113d58bbfb5522349","03b8ec2c192503f543e0fa7278abc935bde14b95b27179ff3277d6d4e3cd9067","14549e44e55cdea27ec0165fd014070078795d591fd46e988d6233d6d697439a","c28f1af0a8ba652aa54fd105f092b1a8b7add94a224b5651c225d731957d407d","5b7ba74c4c952a69a45cf0d33c4109c884bdb5036eb6be524603dcee7250d96a","c8d32ada2162ab18c2c632ad609ede9bf238bdbafac3598c4980eebbf855a04f","20bafa4c4229eaa5e6388601e19e602509c0fadd2b658c6ebf437b33dc4e88a1","db73427eab3bbaf3f26b5b2efdb37b2d92182cbb6123f8caaef97af2107b07cc","f77898431875dbd6d3a9b7be78813583bc78fbe737bdf3cb9c86a8c8475e4a58","1fb1c750395bb65d4015d9a2bbd15153112cad918b59069463d87d4fe287f337","e0504139189a5b96643513e670e83de419716bbe8368383326df58cba4481264","70d3eb12157434a1ab5ccc8c057c830ebdba1ab59a55a757e6d4364ea9441252","7935c48fba73ee5d74a43fb17f58057663700dce9ea74fd673ca243fff9c7f59","683a8ce632ab7be2208c81e453ce544ed47261b85585c654ba2dc65bd3715588","d1ebf01d8322a8fd0b4e81b65eeb9321a04a55c868df00e55080a219fe1fd9cf","d6a93af9db7a30f9e8cedbee8472e29a194fed7c5f6575ec45ef3430600cbbbb","40ad2717c23b8583214c4a4b8fcb6d03a1ea452585cecad4b14f3f87d4d9c12a","db8fc5c1917265860fd2a6963989985322e37882515284e5a33e3e61362798e3","4336423981fc67f99d5c364a64ec671641d4a5a796dee33bc4ddbc852da7de72","8dc56f817d20cf0717842ac1dcf3ac1a450ac3c667f1285754901e4af97bbe47","72156b7624d678a2686a22a45014218be4da7147f1058a5a5072fe981c492dd5","a20d054b8be41316bcc29752c5b9b42fab727b887a076a3af3bee18813d6e8c2","2eba4ddfbd6837ef33e58644f7dffbfe465d7222f9a9101789f02427f9541488","bb82c16e8371bfc6ee2ffd0095fd321d6acfa57c6c6445019567fec1b6b5e92a","6c65126b657a275259c4759b2b2f7b04879e61bc6c51df025b3748f87652a9eb","a5ad75d3dd3d3df0f62cb7a8ea12e76e0b4a3143ecde9e29c9cc0586b88365c0","03cd482c80ad0b724ca7d55cef7e3823d593b7cced98d7ef9d1bf757c5055b77","e93f395b0d6e68525181a6ecb3e7b81b1c5bf551f32f6cebbdffdef354fbe4a3","b881b069efb9d55b4b4b98de76d8c3920a29254e24f8f0c38557186e38cf6955","25729786d7655a5d7cf18269b89cea8e606e66644657f26fb1283a0deee40727","1f542c79756fda13fdeda2c6c90a560ebddb14758eb5c3278ef8b750a03c9bec","b0ed00813c153e350a56faa8c15668bf21375928e9b88bcc482d20f1f8415179","a1d67050e5303d6d327c11546d2bcd5643bff251e7be230e8e78ab93d051ce39","9140f2acce87195a28377cb0c079de679eb3ee4aa027f2c69f8a70f5c58231f4","93557733190db162b067dd324a0516b8cd4313fda14c228468d865145245ed04","8ace7c551f55726a0bd825aa163fa5789a1f816a236739ca122ca80aac13661f","2597f47a65f63ee775d4c8a9ac9923f6e3422e19130401253c407acba2a17712","825151a14f9661a82fc1a0603c0c288e3225e7a153b0399d4f81f5693bf5fc5a","e73d0a1df69652595185fd648818bf9debc5ce526d030854acfa944ac1db9b50","0cd8d79e4f122d26a2fef1d8a34a68bb7dc1c6a5d511e819518195f236343647","233d663fa903a3ec45f473d7f71cf13262957fe5c5a6a5cc189ec19b26481ea2","55b03f6dd6e296e7b41510fe4f8a406ba7a59f53595a6a7e7ed562ef8038bc3e","e266c6b72f344c3eb7955a398ec4ac675e0df59e639b63cc4a1bcfc6e4eb5316","dfdc5300faad162936a4e139d4fc330fc61b5ef82a31d6aed862c0a8fd7817be","d7f0de67440e497c0c6fc4244152f52a91e2ec3548e9b23bc6e478d4a4e6489a","8ec8468d92d5721a71c4f5f8dff24ce6937d7d0a0b17b83d2450eb44ab32b266","8eae581e0eda5fe040284edee93b219db215fedf4685726bd0774da8316ff679","067c4091e4fea77b1c8e425cba69c423792eff44c195f6f196c60078e3aafdbc","5b58e0cc5d58dbd9135eee1d282a9bd0fc39e8afc606bf2898b470aa8f43e85d","22e7bbd2dbd7aa1941d9324694f4f16efef7811f99d8e73e5da78b04c69f030b","656ebbbd307cdb14912532cb388161356310df830bf6b281dcb4dfa155967653","09ad48e0148ac0f0a2e094f86a37793623b94d2b2133dae34d9cc45ae8b25c5e","c1b720e5dfb938e3102ba8943099eb9832e7ab1823b3b0b1fc66ac2744bb7cf2","2ac362a2246894116abca93289432a3bb46a8081cfbc73c7520b17dba535dd8a","2e28d2679d987933af3ab70f024ed692424571a3d764e52c14678938ee877c56","502f4a28393ec8f62613650ddcf8fc15a693051ef228de55a9fd352ec84a89aa","53c907f9df131b180da03274336bfc21fd0ddc9ce8be765500304dedf5fccfe9","61e344cc879b58a08d51dd2d4d72d151dde138aa1ea67eb6bf52aaae3c4689da","ebf2133a2364ca7d2f8601780fc2a22c2029fd7166ea2a569c7f8f94aaaca2f6","c63b692cfa586093795740c783f71bca0a4f9b8c015d2ca885d12a5e34c9d2a0","d9499d9d0a720b79ef25ae3b7e473f0063df7fc05daae087e575e230698819fd","5dfa630a735c28092a6f56c73a8beff33621f06801a09db9ade86b124c14c07c","2134658a3b19b838ac0a27442454c11bac0715c1a85fe19365b80d47df1e3106","98fc20a7333fb38a2c524a308ee24caab2512974df52b5a6514aabf5cbeab551","1390f82f3c8e80758011e0061c6d1284cc98fb624b90e1f7195c74449e2899c7","319d665994afd8a457b08b99da56a5290454ec0510bb4686b876c8e0fa8191c5","18f2043782620b0303f0412845e40183e498f10a50065d6fc27c5f653a2c5a2c","5f3f3e895ce2597da54b2d9a6c70cc96ce15fe2b00181a412c7d514c596226a2","d732fcfd57106e33b80f5c7ab81687efa43c29b262fdc50274f8f42c3f2cf578","0de5e8652d98e245505ec0ac102280fff4f84f6638861d774d2d351634f1221e","a37aa3bc6ca997c40a51f6d6c414dfb38f223da70e0e4d1136e77f7c3ff0d7eb","cc637b85b208012472941fa039ae6a45fa7bd1c97d91c5659bb4bf600a57b7de","5adc95373b6445f769c67b0d273880a4d67424ba48d6fd329f5456abbdaa8515","93180bd2360c30eec60a3421788f7ecec82275d4de8f51ddb7d4c31344142310","0d87e71a1fe0dce77fd5b18505ee0b548dbbb118af70bbb9e6a39bbc49e08c6e","0cd2114470dcccd06e15369eeca461f3de145e0b793cbda17be99e853baa758d","d5abdb0287faa72707fbce69ed0b6172568670f628f0fde40ac2b10b8f6f028c","fba1184b51e62e9e706632d08df836caef230df4415b41f61dfd91aa29137294","9b4e2f5d760beeae26e5b5c34955079885c8ba8779e4ffd1898a7192a239af6e","ae202294074b2c27b098d87fbfbca3220f5b039e18e65329e7a8a3feb4eeb441","0a0cbff8384422716e06feb725438c76f2b6cc5148ab0903c252c12a78019a72","a2c8b27e3c5e491d296f41109145eaaf589a7435141f0b7e5987b328093ee1af","5180c7ec07768babb88b9e11b680cf070d51c9173e1f3816d685d43350b7a0e1","f31b5c73107611868e39011bfbae4973c238e608db701a8d0692f7fbda21949c","ae428a4c9b1c6ff027e7de2ad67b6b8b092e647c6112f12042aadf762027c5a2","e10bce59494bf7f496c879add3368ae09bed7b76309fb2d3f675e31903cb0e96","4d9681a5ffc480eb2f0e0b4418feeb11f6ae8389b44e76c4d3c633edac779a6c","154b88944cd9d4ad688b93d71d720b8c479f87dc62025d1491bcfc9f1846f883","ad1133b4c2b99fadf0df3ab9bda032d20250fbc227dedc501e642570ef54a217","e1975f4602e0b16ac9ae0a657f4d2f85554017b3e52086707e54f82d14b5630f","2f6bbaa70bc312c46c379085d518c696017a69e4e9779c6c75f6908967b5cc6b","0d070d22463e7ea8e0f824c16d0613dd9d05b5be5d24caa03e5076cb01953161","7fcbcacb40b90f9806697dbae89759ca2e4479c58654f0e1fbcd984ba069e99c","04c27833330e91ad003f663a9f564ae0fc78095604264c998e15c1f341c79e2d","0cfad192241b90669f14a92ca48e141acdd82b414597a18081ff9b492329e07b","e63c3791c63c157a57e2ac2d772b3f85b3688de1acdc53c1270fa61ff2aa1451","227dca4c323e1394cb4b70ec85c9d917ffbd7a7f3e12d2215c2054e5076e3cad","d9c4e110532223b7c17511a63709efab6374f7de87beccf616f57a0125d91281","00828b6cb8616900c552903ddb8fffd0eef85b4aa2805f21d5dfcf7450e26fc8","d76f7df64edf0f562ad6b1478b024b0bfd9db290a63c745d473163e18bc69bf6","436153283d8d35af2e83c229489cad8f11270ef2129814f6133322dc89b3443e","17fac66304bc4b3feeca45f3d4c69b1a351ff28c9e3ee586ae637991a961d666","7ac41ad39142caecc58d455413d971fde4733bccf907d60091728e5695e6d97a","0aac590361ca87c929c08fe84fd809a051f1db7d4dceeebdcad932b49d4e0a89","fa602820776c3f67cfd41e4316d3a3444b9a198d56eb1006541fc55cc670baf7","f5fadf29086bc0f5c80c490058274dcdedd87e4c6c523d23d1c8debe0b4a6af6","cd5f0bce17430ad990b0561c43ed86fe42a8557ddaa5f24befb728f6af320122","e36b2240e73f3a8f6620fcd10e0ac48454373df9b2cc8a872a93c8984ed3d249","f64dcc75b161cffc8585555ef53692e79a7c923e126d182721d1be48c3557dfe","332a7bcc2034b28bb3880a1a1ebc2e271c30e647c49d96b324359e34c991f627","6b66f3c16dd2e4cb7a1cc0429390ba3aa41e5b7769e982f8387efe4c46e467a6","2980f81ad167cdd9a5f1a2eecec5a7bf1b2987570e55a48152fe7628e9d519b1","e2a96a068dd8c1da21ea331e9b87deda6cb83314a4f2e29f1e3c58c3703bb0a1","1a9227bb7e286c36f7328949f0691e875cac8acba9d8c5c6ea8655e9e3455999","33f0026dde6c2b078f31a79c0c8ba910420652be8481ea3a0cf02c981298353b","4892c7959b3258deba1085514743de4b3ad9c27a7ad5ca22ea0d3fb131eb0cf9","c0f52fa967a92544614aa43151d61476365da94984ba730b946924b817e429e5","66e749e5756f7e4f4d5f84819105c0967af881141c34c635d1542758fa03f54c","866f1d25b5ddf0a23a0cee8fac130c8a9e390fbbe5438f81922f3abaf9babe80","915b8b0012b1d1b394d376b1e05619812f6443f48e5fdaf0fc0404863b4085ad","c70786f8082fe55207146c7a71f8d296e7d9a809bc19d616374cd1b128ab6b14","f05e709b82b33299649753aacfc80b088c71d9dba0df1faa2e6f52435796d5c3","35298e76f5ad88c494e571e1eafc4bd9aa0b094a8a6dfbd400728cfbebc9e0db","d8f578851fdb18b04024f70dc6645f3a18a10640596e9e65755052432748839e","f88ce0fc9207a3154b8bb99318f2273c5d285c7fb86c848b566ae6a8b5d02105","5ee33d14c81a3cb45aead86f20f4de2f40c24af79c7a8c42f542a106f70648ca","d9cbdffd821c0dcd6bf8094fd3122f48cc3ee6f0aa20978cf5db4ea83f42794b","eac88829a7be36f669b887accc271158414773ec613eca7917972ce86860d12d","07a147e0ea9beaded07e0fb3f4026c80ca41f577e36b8f8165d747a2d05ddb88","993cfd2e4619d91dd3b0aa07ef82e7f68ba62f54fee0f98720359ce7b1cebc38","66c26dc0b8b2cd4533f753d7e08022dd126ab9a7a5150f771eb0cdc012c7e88a","cf16c79dc11af3cc69d17386752f498be53cd146a14fcc271c5f1563cf955740","e815da49be69908f884704843129f8d9250ff7c0f74e5ccf1988c24a05965e0e","593b36474f166e9a5ed8cfe1590800bd17e7d9f366845e17e4357be6ffc869da","3541ec2884b8ca7517ce60c453fd73c8b44ac57e6e6c511337fd24ba9ede8561","d397f4b80d4a32a85d0ac373fd8a6c9659c47444139e1a89da87d216494029b5","d3cada72f48c32c01ac688071426edba2df6481e62efa85a9321393ed2af6184","25e66cd03924f6eb2183f667a330433ffa0473a868a8fab1f264351971c678f6","edaaf00a300387eb1d6a9f6ce0ca6a218772d5cc05a79b6757a5f2291f597ad2","e648cc0ba42b6f18788088a10757b89e33ab9d308df3a5cce8b8e7ff15e2b22f","eacb287abb4b8f701cc2456147626a8a1eb1a84578f3374dfdf3a5cbb75ede9b","6fc82a3017aaa92364e97c6c44e43c049ce0a3072551edd0f23fba27f3c4df98","b96bec9e77061e5853b4fa63d6ea8cf4250773702676e300420b7735c34f9901","8f393ad285420fd008f8b4fb6b5990e19eaa34b8183b46d9cb720bbdcaa7c31e","9431bb0e7be533433eddda58a880ddc2f884f0f71dd2e8065afbbf97bb3a6a61","7705bb666bdd4085a9787d5c2ac6b23020b3246115eafcb4f453bd9c1448edba","f4d43aa1331941b39fa38a255a16eb8855cc2926ce02a73cc06dde067c473900","9921f71db289a60c25a161d036c2885085cd3f06672d9913b37342333993cf3e","032080b7d162c23bbdfdc18aa87fb8858f6a1d58a0d3756bb59cc28020556cfc","9ac7c4093cadbd5ed6920f9cba6fc6652d814ec9ea0991160987e4feea437481","f75ce377d83090f4180590fe78c9431b3d9bdf494373f0418c58e62937e890c9","6f0cd0e219049f8cce5d0400fc6b8bc841bbfe361d76bdd2ed9a131efa26057c","41ddaa11b8c9f1515a76c1ee2a498cfa8265cb04d57942f2c6eed26e01f270f1","2ea50238f239ef3217965ea0a5ac6ffa2acb94bd03a912e7edae4cdb90496b16","2e0e61e27e6a2ac52977927088197535eaa62a90638af4badedab162672b9ca5","8a62f9f4d9309bfded918fda52f8360e31b626105477db019af20064b0dd8961","057dc3da750916d3983709948a7b5a6ef9788378d38a60bb7458b30f79101800","e0d28cd0b097b81bf31e230d9296920688bd3f21f54bca7f5a3b3cd4ab4a7e66","307ea4b485b73de6f48c6c41f0e8be1fed56673f584972bcb541fd59cccd9860","fa7d28cc714e9d5256d2d5d2d7895a85e5db44987b41cc39f047598dbd3e3fe0","5c09513e6f0bd934425d0d3ddfbdd3cdf4fdeba8a186e903df3c48043116e3d6","53fd33fd439c753899684518742fef08106dc63afcc1c9f62353eff3601e7fdb","9a2e75d1d72d7463cb3a0d4a01c5648bdb4f54866acaffb0360da91234c0df8c","566c068aa63e89d1ae9dc45c7375333a7c55e44cdb97c3adba9b7b09f0bd9edd","eba59f556977e6b108d087ea901e4e326ee0d579c5e4312a87743af6fa8f768c","9ac5c75774da8cdc4d6e0a7ab1a775a00e8f8b13d26c1eecd13230f3882668fd","407d830c83a0659a44e68ba0716fb8ca06b5f58318aa4d5ee99fc0fcd8cd837b","90e965c72d8be19722cdd324090e638e13960f55431d8631f10d13d767f614ff","183e0a4b07d3e6b6715344771e5a4e73e516246dcea97384e5349c42691742c8","7bfaba8b6e1191bd01ecb395930bf46291a3decfca0674393ee35f331e8841c6","a30509a8f0d5edeedcfa55d019de4b5bec780f6fb2480bba53afdbe4dbbf3437","31ba7047f9570c93a5fd3d9264cac8e15ddc83d28f79bdb52fa55bf864c409b9","991dc1a3af1fe5ae31575c7942032c6766bdeb77ef9610ac675f5f9146452a82","7409032e1584e62125a2c131f93a61e44d137d031c8a2f86102d478c0f9916bd","6c31318d3e0c181c9b859eeb8730701e7942d521fc9110873c6a8210ed9e2464","221737ac28b53fc9b0849a9dfa5ca5df6e5ae34e29de779ceb240b009f413c7b","2212bb6cf1ad9a7ddef76e66de820e280086a2780f60a580aed15b7e603de652","0fe4061cfe1eab8c542bbc0b2cd2c203630c5de51941d8b8114c4428505d6135","fc48d98061f4df7793e74a5c4da299d6fa832f1a94f888d9e304dca5587c48bf","8fe0548141d2ebdcec1887bdd86ad369863e6fac5bdcaf5d94174d573371a7ad","ddec19525a3a6d2d5128692249af3ff927989304aa6850a420cea5d655b80ebc","8fbc2183ce22abd6cce28e0be737391132f09449c9312f2deb2c2b93b2762f36","f2eabd920475a6771d78c8c2a8651f44e0e7420cacc29552a7c49eafb5194b3b","f65b67af065b6e88888ce795af1e0d201276d21a8d8d38dbbd0eb5432ac0cab0","76910f9a58a63ed7d477876407541d58cbe4f6d39bedcb8fcaeaa2df73cb234e","2de05e675f52f159ca92df214053286c2a148bc177f2b27c8c1c77bd4b2f19d6","2bd818afebb7c057375c9038483dc2fa1b3a0423f58222e397351e7e6bc40c1e","b68e17021361507cbb11a8c5b1d7291c28e5f97a3a7c24520026b57b37b88629","4ea4c0883edfccd974d63f7a530a61b1584f5b503f6b488ea87127097d43bf93","49b28f502c819005c4a9d32c00b09792fcbcf8c2af2f3f63f4499534a41b92f3","2609c35f3d947adebe6e486d6d8b5e7b2864a80bb99898478b6fde940ab71e44","012a639df4fdce95209d28156bbe33e6a7753b1fe4cc6b24a59a7bd57d720a35","f9a76bf9c808adda8a018ad18e1c1ee8813a2c3f38d53ee7c1eb2a9130d0f5ab","892b371df653d6787b8449e611c0206f561c3bea8fb3e41eac0a6570f43bfed2","7ba9e4a3c87707d2e19f86e8ca04c070dd1c2fafe5517bd6b6574a75c60737a2","bd702a3e21c0ad5d6a109739d239b6f825b69f53abd3ae07d90d8f05d7c2508b","a554c07dd44e34fe953391fddd09fdc3cccdbe291f6393c391529f04ff88d883","3a35d3dd2646bf45052cf5924875d63bd20e24ee58e07d09d66a0cfb77949f57","df24accdcf6a15915053cb96127f69f7d29fb7286951d58d4b8ca9361f8bffd2","ed85b89477b0830ea36dfa5a5216f5949e362cb826a9bbf5973e245b4bff303e","47e3667256f389c853bb1a8954bee33abe94788326d65ab1b1334e59a705ce3e","679c5345cf9eff4a5b7f14bd5b89e4bf13d75ade530b8ff8fcb25114b6747ec1","4b00bee2d5bcff299870eb1f6f069130bf14c595ca96b32a200ccae51c5a1974","efc83ca4f330b801f1b1244f49dcbd2c3a6864af09468e216a1400043141567e","06a88a089750af8956b92bde835a0b5d9489197ad541d033ef89db4457fda78f","2a412555ff316ca06ef90dd936584f7e3cfde321d9aab67c7dece93470d3ca4a","8aab697bda333592e3895adf37eb2870d675ed73dc3b21eaafd224b90c4b31b8","301d6c8d2f806679285ca006c6ee74ddd2372da29e018d18400f971543dcdc5b","ac0a84a5b1487392bbd89deaaf75e37ff97badb5cebc5b125816cce6c994dc49","a32c5ba30045011c135979cbfe7e02aed0cf0cd53a1dfbbc952c29a023470aa9","b972bef785abdf30030b19f64b568f7952b8166dc01ca4ddc2ac6919a5649a6a","b8a6419ec42bf4d8eed52f187e161b7dee898c96faf691713fe1a4ae0d89234b","ef94292bc93dc9aa8910f63dd8bad99a034f69a8bfd4b930ca8ccdff1a209689","1b6fdc41af60370262aef54e35a53bbcfe9e529378df9d4fa05adf6e7e0e2fd1","113b28ad7cd0298c919e8b8dbd0e17b6c456c3723c09e2bac3ea2727ad578a2f","385488081e845bec1ec9bf7bd18b5d7e2d3939401099c4e3b121106845204733","ee390c2487bca09cf2c55e18e929b7f4bf648d83f4bc0f9fceeeb74db84b27eb","f30f19ef7afc42af1923bbb4b0b62ba0cbefc5c2b0929d5fa73bcad861d21ed1","3717cf65a204081e3323d5592b6671cc5b1314a2d2cc96df407adff995f716f3","4f551d073794c7367a01329ffdcd70b6eb84fc3abf2c4f0ae8b756fe231e5da3","aa293bb454ae810e7d15a3040ee730114e9276db4ce713f27678d638c3ab308f","d4083eab88a986f2fcff672be3477a79849f25be3eca5a0fde6d745dac3fdea9","07b7d50913d14676f5193ad47bd45eedd6dabb648bde58ad92a13e62f606accc","ad98cc620e52903b28e98f50ca4466da4c6dd05f04baf944ae009ac14e440b33","cb41a8d1704595b290fb4bda78ff88dd45dcdb7a039003eedf7c4d50d0196866","8277897a81fc2a61b6367d26a66dcef94e2dc5db26c485444a824edeb86fd052","3e4879f89becf4fc8406d220c5df19084c89c14a7dc931849452dbe058d85dda","81807c39ffddf0f980ff2c71b5fce8a5f57b6d85ee8f9860a0c00270f4b4b3ca","58fbfe0eecffaf78787e599e47c5a7e7195455199cab13da8b64f26ca928b261","9538786a06bbb280f2e12a8a7a07bf47ca7172253347093176badf449a3d20cb","95578ac9452eb3f422aaf44830dea4704b9f2144f05e88c0000d4c271a9d6589","c992118f3b620c121b1d1e2a1e4978aa05028eac3405311716ef642a98af2d88","3b3eff18597e0ea86f12438ad927f4574b3fe059985b3f09fd87542b69a1fd0b","4128d4e6d5485d7b327fb5381d599014cdf529acb6a693dcb25a74b7c22867e1","e82b756ada2d110d9f8a77948c3ff9e5055b8e926f41e5f034a58ee8e1d82f5b","59bc67c98670c8c2e527f4bc135f3addc61073a9c86fd7db12655a117edd4223","3a83a2afe970f19b052a0788db74199ce9e483a63c809bfb5e73a32493fa9480","802d9627ae0266a3f1a58eff366a08655851d85964e3a8fbb5e0f88b78f741d1","3afa1cde2398e3081bd31d85277ac529e66cb78cba646acb29015133711039d5","9f8929beba5b8015b7e57926f643fa20f3613159d5304480d5ffc9a8f94dbcab","bc58bb3e15e393d07447a3f1d077fa1bac309a2049b8e395ab02fe99ed72f5d2","f11f9a1d67876a869d99f3145cc63cd1db5ef0034cdbef3930366d4bedbb4d60","54152ff949273b841096858c4a309b872628e1fd71b5929572afdbf8e6972ae5","2b31116136a566c08f2eae951d71172365d02aeb7095f684afa44fbc2b9f7b4c","92307dd94cfb0ac601d622976f10278624679021d9b4c6f85a45cabf99ff11d0","ca89bcfc267f6844c95dcaf2952b161abfa88a5d6c30ba1d63e6e784d7fc90d5","b22b9588d6fcd635a15192411508a24130ac6ae82c55c7fea66bcf5753408e91","69da9257d179f2dc2e1bacfe8852eb4301fff47b438930c1d275b949382fd912","9a8b68f6890738b4ae116a662b6b44be7553892289ad6e1fdc810e4b193e02c4","b2c799fef2f83db2a3604c1c1402b4838898249920262731fdf6a77289acbb13","51cb90bf50d5d2a2d00c5f545fda3167783c22b328a6d33e429392b93d516209","5726ea415eee459efddf8bd50c10f7400273a57fd8dc3d57151e652b328872fc","7e2ca088c326d04643db1c30255f7ec1bede74c09ea190a351869734d8aa1085","4aa45fe87f629109259eeba322b63f4be0b35ce21fe7b7c25aeac50ca54353db","824fbd9c2147716a111d2620e8acaf86e5ec386fa4d54d2b718fe2a77d7299ce","16d160f0397cdb35f79a6d6eb3e2b6c059a0557fa0f67ac7c08b48eddaece743","440eac6e41fba99add73b42ef4e50da2f008bbe114e2c62c0cc303cf328832b5","7ecea9576f765ab161ea44e415c76475a2c66dc70788b4866c3e5e11092fa3dd","cefbd3c11ff2a8d66c078d323f8f3394a4ecb324d05910e40b2fe15e324c7b9b","7d4f144cc3bd5122b4fa82145a64dac96bdb81335a78effa24cb473bee4ec3e0","699eb3908c4db81ac35f40f525bf052f0675479474a8218d0ac01c2b839851da","dba61a7e471bf5151825b2db98cbbf08a697c8e30e3d3323c7d56066df0e7375","847ab80030c5a0570704af5baccb5f79da6245a540a25c1110575bdeb3194288","6edc3bf1facfb28ab6db246e18853c83d6714f47133874b2a8c3e59d015e1aaf","b7e4785625d92f0b12ce9302e34f4dae9ad98149e6a37fba6b9789105a56c217","a62dc16d997566082c3d3149fe10555174cb9be548a6a12657cc4811df4e7659","fb8f91a174bd96a3fc5174fa9e51812a4706166f3250c9014b77aa0cee81e6a4","95f17d89eeca73b054b34f26d91aaed589c556ccac2ac8dd1a59cd8b9c7517d3","36d340a49463a448d2d3b1eb4c2a62da754e4ea09c92848c07d62c8d3b3ddd64","1a0fc724d26754b15d02f70589e49e1510b5f031c16c0f36d033491b10e04e7f","20d7df13f5c0f787c1c7c1c66c13e38f65a6ce33f317971868784f6687ea1311","6111febce84b4710e447c60e17d350bcc66a26b15633de6a21bca6c1b657837f","bd42e75f00e559514fd8c0f8b1efdff737ebfd9dfc4d420b7942ac8921530b6e","5562936e2855eb85ce404bfa74d2bd678340b0e188d9ee51002ac4bb0f90efd7","c5eb943b1adad8a47c75a3a5994e078602d227ed1ad379c4f69a0df06ccc4982","f964c8f47956ebd6790b5f85c753c3a02ed97f80428d458da112701efa531e86","e5311e43122ff95645b583a1594471c4ada8ee2e0c915033310f8b6e35faa2b8","061b29f5901cf6e5075df73eaf060940684cb5fad8cda7daa4dba5d0c8493a81","8c5e22bb09bb7e396fecbd16438342715a8f2f8d747a0b8264c82753fa610f60","82fa37c8de2b352f1fa687c2ef167139122680e7e33b81059e196a79f17ae3d8","d3b9bd1e0e7cf1110c72f2c88c6368b3482339597584ee92c40eef4e1474dad4","1fdcb5089fe9fcc3a9870d120db60cc99aaa60c861a7751ab04e808cc8b41fd8","993970369eaf0685907de6beaf02a724bc5e825a618e727440e1c70a4d7aefd0","f5c87373923bd38aa64e582adfe18fd1121cae948d6b14b22e4b212402ed1318","0d6749f9522cdabea764e7e4ef90f36d15cce8d4d6a130d82de493a500495ca5","61cc506c619fc6b01125bf85429977d0ddd8ff85eb97c2c44e76a2feed3b9741","0172b7fa1834ae521c4f0e6a60cdf6f134a7bc3e9ea9139328e7d105678d574a","353e434635d5413f8cc0cc02dc014d2e80518dec03beb42eeb48edcefa3d19d9","e0acd5de151570de992d110034fbc446ef313391b96ef11fbb6372f24f4cd01f","0c4757684299f1e79cef07152c176cceed642ef5621a176f008a1daa48cfe9b5","8320ac9d1af2097dd0f146f5a61cec3188e1fc87c8b06150d56440a37a21aaff","81ded5824e3256137844d3da9d5e9dac2ef174ad41a23c47fd2aa92187776473","bf4e62a7052096266a9ef000a860c2dcabc0d8a6e99a491e1ecd849e4eaad4e6","541dce26752db36391695715fd07e23ab8365fe8f0bfa22fb1988040647f7220","addaaa4bdc115c69c6e94cceb4e9a78833360d0adc0224cef93c8c0533f2010c","cb67ac394fc7cdddbf955a43e68c1ed05b03276d8688b5070b1f445439a4844b","93c3f399a49a8f0ca7f59b77b20f15e2ea646d76dcc1aa67b016620b77dad7df","8808c90d091012683be4ed8717a2f60cc950aca514c10b43c796b76d73e37b8f","2aa8383c54f8fe4ff08402cb843a9743f66b4448ab8d662e17206c41a12f1c1f","32bf1f74a876afd0ffc272e5b3608fecb1da2da3bf29abdf0b63fb79a79503f8","d2998c46b1c0296e7832b6742b2079bb5d95208e9e00b668841223d964388c5e","e63916b13d1771a1a4ba88978e04c9095aa11bd71431ee35cf18c0641f5ead90","e06a8867a9a2ec503f9b8614734bb82e58824a4a2eee94cda1f522767993a973","ef7e6c333c1b36eaa8faa36accc28ae350874c80efb77c6f1e33eb8b5b4f019d","a8b4834a0506a47b4c7328f4477e41c046f5ec89975577c32a280cf895ee9b72","a8f7305348698c11d9a0fc1839d4cbb094cbf31cef96ee76bd883b0e2de243f4","71dfe61836aa4fdb3caa716917af367c8ce5a14b34feb092b6f6828125477efc","dca0b75bb270baf50f0c2d457c9554af09f04a96c9a30f24d9811821caf60d2b","dff8f02234faac11ec1098f7813a2f08b95b37d472a8eddb9864c2947ee28446","a8d2a8105510385c1581b0c4e05b35d1421102c86e7d6324c44457f4f552df79","030f27adaaee1cfacca3bfa4a177214de5ec43637e2e314c273adf7ee6151458","750eb28a121bfda70e7c697d50f2df3363e9d9b2b74c81088bec2d3bc8d3ad68","3f57dd7e6f67221339b13bc2b288d2b2cb4b3a9260f3f2d381cb19e046682dd3","8bafb5241d4dcde05aa64ea393dc9b683596686885a21d700d0731b38f1fbdc7","502b5d9948de17a1358e68b9ac80dad58590476184f314b2e440d381aa969745","7b8e0925554e436b354b3673de07547356d7985149b8babbb07f3c09782122bc","7246e9b6d9fc705a0990e7a0b6f92e8692d9190d3f5aedcccbd597d5ff0df7c7","d2b04e90889d746abf99b4c59486793f9fea741b705cfd4edab3d509c126477a","2c174b1dce71b4052fcccbb84bffbd41fa45e4442e183dafee599238b770e869","bed2ed24c753afb04dcec65f7568f971d84362fb51fcac820e8ee1855ea76bc6","1f222372836b1ed57997de12464e9e11dc91ead0c077c09520b48f81da40b9f4","8941f30402a12b791af6873dc5f67262b4aa4cc02edf5bf3282413cae2b3d549","7c4dbd82e16b34a81804383b9c28da2cbfad04ed7882ab654056b58a8ec94ec5","8d5e423573fa5dff24971d868f62bdea17b9b4d953b255b0067d312f02895ebb","352676f620ddbc4088b0978e85e39a713a7a470175b1e6c5ae3fd4dfa1c9d651","c70e2678280eb78852223365f81f11c6fb904daa0f22e9672b83bbe315598971","401edf8f46652f4dd13a4358b011c8b887f43f80ea0c5f6f082048a622368262","3dd786a4584f638ae3fb03ff809f138ce8f4d8e6e879a52e099cd33d4507ae73","236e49024cf65958ba8ae35a9f1c5d0f8b0bdfe041af414ca35767c6d4c920fc","09db36cf75bc53cd67d8fc8722ad858df44503d3167b5d49825cd4b8be6f4076","47c250c77c56a40fb602b45a7515ce31f2fb83417c4a96eb4039fdcc2895309d","fb607236d72aba12bf6df811ae50b7ac780a1ec06239525c5aeaf5be5ceaf3b0","a914d868f9ec6a488ebc253461283ea92009a07e9e0167abd36caa082d6d75c4","37c195bb44127feba9a6562aeee6308c94e649f600146c7dab350c7726a5be9c","cc62668f61863e8c4cfb5aa7edf1c675af6c770167861148223f74d6cf4a52d3","b5a3e5d212ff2df914d6883e4d0b46fcd7ece4933133ea816ef724423f801af0","cec7a459158b8d3ebc89a6beb9302e3d3dee70a02f9989baee7f3e426f283c79","d62a65c939304424b6d6b08ab97fb488dad098062c5ae90a64ce6e3f6b9a2af2","c81f6bce73f3c3d453a012ef6c3d0f28567f93cbcd6a9c6d2cb606e8d3a487a3","3ef3a61002755c9661191d667c2d491dc169ea302f60c045c9c1fd1774ac8407","a11253e1d20bc720789d85374a8f3bb2fb2db3d8dc50475017f1768f9adf9484","c47b2c8b92a16e532389b929c7dfa3ee41d47b69ce35c83354add05df0e99ea6","3b73783154d7a87e5952b09ab6e3d9d77ffe5e0c7120011d7eac6257ae55c117","e6416c3d6a90d1370a43f21ba361140ef2a012b14c5b96c6a824bb5295768a14","aa7443532c7c4fa930709fe30e0bf642e4040867b0c180278d60cd04f2832d20","269737ec036e6b904a583995a5eef3acec3fd58c7d9f5c752dcdb0fd790087fc","17c23451de85c6d5455aaf5719c4173aa4562fcd163fb5ba72a6bcd222741d4e","57ceab261617261d3bc3356322f0e5b971a8d549e0817f7e112b62738f323593","ab63739e2f5354d2829ece988d74f377ffcfd9072580c43878ae56c20a15e12d","39ef22cb2067a2b384a86e391705ea84f7481eeae0fa35d7be2545e896af3bcf","8b6a017a2b1d83bc1327b484bf2a223fab583b1ca750f11c1c2bb4f74522f600","0242e7d32b7c7fd9a7944c689e0b87c425dbd39cbc5278290469af2a8ab83ca1","f408fb593ad8b84ce2ac6040641475658060fc4c0efb24cc05804a1e45ebea88","3de736734eac8f35f54adee94296d2a086eb53a68be870e12c4d51eb1eeb5162","1707af876374f577f5b7ed9993a3715e192bd9558a0b7df8206803dcedd73fba","ebc138e51212ed0f884ac5310237298c50b48d45b7902597f85604ad6851cff6","3d276c4026971487be0dc16fb160f784216d19b79dc551ca9df72985c6a539fd","48a0a08da06c2251d2090aaae263ecd5f820a7b85ff0c42a0a13718f7e552bab","89b20c074a5abe9208d39e7153ab01726c44a9fce77e9b46bb86f3cf4882ad0f","caa3c9ea2ebb523eb857ab8019c0a1980e4d94250bd16a9d51b95210d0950386","af357489e64b057dc99b7f42852aa61972d1db4836a8c284c88db68ca8d9abb7","4cdbc6e2f9ea733c647c4f134b3707a66d7579455e2901dafb79f93d9127fac0","d5148561c435367869a0e6ead443cdc3ebcb36cea7f35fedaf6e2bcf9865e436","7c08e5514a423ea5d08163cbc21f3858b9bd5a7dd233c93f9dd8a02952f06db1","21a511987dd4319b5ea9a3723c07c5b8598b5a3e0fc22c720baf74759bcac3e8","3eea6cbdf32fce708775ac2c4d8dd9faf964a0408ceaa4f86f3ad2380b8bdd39","127a73727ba0f2ab580280c8a8228762bee9d33a1cc58b607132da57ae0b274d","7db22639eeacc5a7105a692bcaa13de10eb49382a0130922dbd7a3745a2c0f36","311cccecab649ce5438dfc8d891bb192fd9669fd0a58d9b8b09538978247610c","1727ed355e4e8509313556dc0a0fff5b5e636b49ab28f6bc3fecdce16b96c7cb","cf5e6d1eb6d851978b44663bdbb35e38d3cb31a7a4f787739a2ccfcbabad5176","8dd0da2e6dbe83f210166b3b28675c22f7b3c8cd66ca5ed948416a725ee8a73a","72e4a806db5cfec09a48c5a87a242e6ac4d433a79413eb8cf0bfa9527f9dadc5","f7cbd2a4d0149c99bba024defaaf5f6d87ca997316d9ad1c59336d7b5f0e581e","4cfa0530d70202980104c4b0e5053edab8e9b05534b74ffe53f39bfa0da3d2d6","e448f86b862b39e330b447215e46a0e16d92e0000144b7c6d7a4960ff7eeaf80","aa43139555f1aa62e661801869f5ee6eafff4b5dffa297b26089b9d5002399f1","f5308c02a5baa5114490988da2aaa844eb9e2709b1adbe02661f6a5a5920b12a","dbbcc037763d1b04677ca9547b511286ca031025df934efeff142ca4cbd8c137","fb11357bb5704cecdba8fe197e009fb4cdf4e549aa41150e0e2f61ccff78c916","1e4ead35526cd960fee44faef4725f27b3ca29363f818bf73a76b33d4e0750b5","678f81852d7e64789179d255632885b66027cae24146088e0061cfacafee4152","e8925419dc50fbbfdc7e9435988650f7232742763cb2a6cf0ae71f4ed76e4383","171792728ee2bad492204152640940a15304a58749b57459d49840afc9c4abf7","0c3412cd915aaf6145bcae2c5730b733ee717089c6fe14d0182d2055accb5500","d4158e6b810baa401b3fc374b3f5af9cf49c3ac367eb37d6f66300feadcae609","6a50c27254f43a06c80822a0645c0e8ec85bdf9c111540c6762a784a588c0201","81cbbaf1089bc937bcced90dd4f018dd0c11bc66a234e06b4dbaf8932e86f512","4d64f3826fdf9d29710e704f75dae5a691a9f3210b5c618a72733a104d199265","b4c990def8f1e184f2033dc8da367b124ce4ded291d9a5f8285266b9e638e13f","5edaecf61850e689c92168580fe06fe310b77280c3577e85fa937f4ba1986671","59bd2fca2c764fda52c249a0759d3057d6548606e1b628409eaa0d9c9b9f759a","ac525ff7ef0d54b4798d5b74e6b970efaa5801b5a1a9433ea6b5f49358a14178","dffabe54aff3652fe5bb1577c95c05326efc4fd3f768fc4270bec3c8434931b5","d548ae7c6156b677da39f06d228a89339765e2a6762f5273e71932c247f342b7","b8605131fd1cc77ef0ec0fa909f840e4a0017593682e50f8c3c3decb10443e69","f40cf16f9b6d2274dd6ad83e0679d51de268548c2f4b3f64a7b85b025edaa705","00ec15c82e4e5b5082ee95f281878201700857493f9e617a6b1f1558054d16db","aaeec79faff5fc86de8d2c34093167d96fb7fb9a8ea5703bb78a8db45ddf5553","01a54c0f358c3c2f704c1cfb7a9d17d1c1181e3402cf75b827967a4880b06d72","a1b428dfb854a2df4b9921c0ad9561d2b270088f41e6126c935ad7e74dc5ae4a","b5d04666cbdb15c6c672a78765c0e80af9b689518b9f4e603bd5d47fff789e8b","3a78bcdab37d955b8726e540928ed741d1a5546dee6ffc3de9c9d4ad834a1437","40d76080f9e55d4bf608fbfa425becff2ff14cd83821202e283626359910a59c","d791919d7f29ed0cd5c7f375d238882dab29a43aa07010a967c7e0cf50a2bf4b","79cd9ee099d926504d2c5281df43e3b013ed1cdb413808ce78c6c8e41a95ef07","e4eceee438d823c529f596806842c342cd8620088d41ceb6b756064c664f3a08","8fbf3eabdfa459a67d9f7d25d73a5ab4457bbf2704ed0225262bdf4d1f64e9a3","c02f0b1b01ef6df02734f8d776efd371efafbe4a4da559fd5e597a97005a2b7e","75a50890f1ba583165adcd02e72a62f68e733ed94e6919cb43f090fc9d049b6d","ea23e5ccd5246fb2045a764b0a1aba6cbc8566e68609c7b5f4e6624aacd2acbc","5fec3cd8cba2bb9025288a16245eb2795f1daf77e40cec8c83c0efe10d9e9262","bf96e3cd8ac82645c19c2ff81770a133c75d54b0ee98086bed5e6acdfbd54f6c","6d84b7cb7e4d9db0ed8ca5ab79061661f6a4e9ab1fb9e44e2df551eb1c5affed","ed82f10019e7ca0d4a04cf15f838ebd2102d45c71273f619bbae1f9012ecf6b2","97181768db0a446bcea80e6449e884f6d68d85e324e4ea923b2c3c284ab7b80a","31a8272b826e3aad468c7d378faac6bd584a207c33266e293c9a365fec23f3f9","86461eb21861b7f6f570baf4f58c50184ea4f29eb1ae11e9344a746ec1ed8a9d","7ca5cbc45d37cd33c255d0911a1cf346f94a8c55f95714fa1db723e69367d3dc","55584d80df8d11a0029d486e5c3f2139736136e6e9b5c105b52ac1f711d22afb","aa173b596a454f04c5e8d65353723b68c0c86a872ca6fcf4ded09921e39b2d0c","2bc76065771be133978a14314bf9e0a562a28377b113852fd89e76406135dba9","8206f461526ad23d935843b9154db3da603b72e2e4629c70261093ea6a4fa2a4","f2c969536e3b97cc4db373d347c4780cf0e0a0c17befb7badc9b5dbad7652fa0","c0f7e3054a476fe3bb35577b03af576cb2c9d0054a687bc4dc72cccd1aacc65d","fe990c9d7d8408b5a7e897b7bd705bf6b547c65ff20b450ed9234ecf3dbeae7c","5ad5ab6e4ed985a205b631c9deeb6a47c5f2277fa550f3dd30903dfd30e64e46","f98905b0043d1c0ad988a9cc5ab583acec308482d2c31d31da84c0616f2f0d64","ec033abf3a3102ab9cfa6a9e7dffd5039d4cb7cca132ffd26e2fe83f4b3e7861","2e4597763802a3e96d5efe9059e4dd976d410f5e5df411200dfd16c2e96fe4ed","291025a5b950003bb695197781fc77b2a1fd0eed93e9176ec6e1e6a21e195615","dc6d099154278a16fc5f7ea0aea33e91a79a7ed0bfc39f364cec08f36c3d00ae","3903abddae7bc93a45dc2a21044fda2e5828f5171406c894b8480c55a64be568","d3f03803d9165bd3cb740c0b304657adebb48bc2b92436b0e9ec4a1e6a14823d","d3b9079ef5d29d89219767d9b063331a74ab113fe837e620a02efb7f5920d7ec","44a1a32a8477427b076edf7911cc008fc9f01ed593270806812d673419893a89","3272ee1bd9d15f9c5b7ee04e78ad993cde0e9fe840cdb6745adae4309f1d6259","ea6914af1c8816de78e112f4a825aaa8ce1661cf3d002328fc523ba9b0fe872e","3f60955be9da72f0c8c536b5b9553da1d499f91ff38d844a5053ce5cd87a3b79","1761017a42df74ef2b3ef3764ca764d1b843ea377b5042c7828d3c81af498a94","c798189a7ad24587872bca1fc8c7b986b73297295b19a658a5e80c92cb05b974","24260141be30158c6242d2548ddeeeb19c7412997a759c81524a68b60811c050","4c7e372a8042e2e70fd52aa2668d6e5b892d45cb8519e1d02e69417bf5494a56","766d958840f9449394ff5ee9ac8a4c4ed9d86d65c2a387a0c2dcf728b1ad1c93","f0950ee2de5b3dce7a7bf2907e0f0f38f593611a79fb8421e93c097bac63cf54","a3b36911d8bf20bd2f3e43e3b2aff8cceda729f7fca3557e469d5ef3f23f37ce","cb3a04ad5c0a544478a85baaaa51ce6ea17e374773ac9b35e9c4fd5954171cf8","4caa861c4e842f0613db58a66a005b3fd4fcb0a89341922d1dbe055685ade863","5380c75f0cbab7c65c3cbac98e1a1800bc09620e9650a27490e91ec2b8030f19","ca9341a685db323ea017a909cec7162778e0633e007f60032d6995ccac7ccce7","22f26a9373ee588b1ddb3456d839db953fb3c6fed72e25d31c3b582f0136dfb7","f8d698c6794fc3c5116d9af4b75b674942947a58fb689bb9e93b30fcbd12912c","77e4ad68601bdc499fd7eb2fb60902568107bc9fcf0ac42f209b454701a8860b","e9e1b41a02b3114837eee6e57d8a65965b6edf8e82a406b19595069273c73136","e1e922a6918a483f15c54092d66509839306fd586169d08cce7cb568dda887d0","774f43648cb10a2b999b38750e948c662b79deb59996a4bb6b08e026e888895a","6bb62f95f072b3f9e4ea992709d0cb0b5404db6e43f276e18ff840223aab6e42","10916b0a66fbd2a9b2c4396e1823940417b2b6487df7ed2256f653bbb82ddc63","d43d918a425a086113ee6cc901185771c0052b9a8568fb240a1f6801e7d66cbf","28c2481527e93759b7a871a62d79a23aa8745fe9c4f4465ef688d84ded0eddb0","da4ebc8c9666e0893aa19779a33a9af11e3e1ececd858ea10e27d071f2714ed5","d6a50ecc2edc5c8d11b26681726b74249399eef9978f853545c099a2edd3b434","6a18a20d75ef00cb5a3915746d6ebc092364b49e23a76286a3a5689e36edacdf","d15169764fd16f79814993cd2dc12cc6d7494487dc62a78b33d33e2468b74011","013600ce63487c1696ea3b4cf60f401cdc24e74d1b0ac836a0193aeec632e2fe","da7f7f21cf449e1a9cc262b43c4fe9f5d272ce4c54dc972158f9034c06c8e68c","7fdc105ed18934e4499cf20809154e517c1c41ce3850a69ca61fa0dd587d6919","9c2faa7239c5785950d9852f56ddf2c66adc00f2279faca943ac6b283ae84fec","876f27bea23ee1bdcd7ffa26b38e150a67b0456c509e611548b6f986a7e9f90a","e959169468568c1cf3463df3ee7160ea2f8361619d1d10e2f62497059b4b0126","ca9be90bb0409c07e622a4e03b968974c5736cccad75533c60fb14dcbec7c73b","5fce52f0bfcaaa29de93470d9fb19a1bd52714bb8b2001b160ed75ceed1e174b","a5d2e760f70944dc42357d7b69e86dc74f33bf98e948a115357e1882d5230ed4","0f71d78c1866fff1148880acbed18aaf4ea3d6fa13ce7e1f29255545ee9a1f90","ec94d5d3a4f131ad79abfade176f9fb7472e6a8f202015bb4f7f29b0f0bf0e32","26bf29b117497cbef2cc48133940dcc84ac25eb2e8c59bc7a9065a786707dc64","d62cddcff2083b8a9b99bab5d47e65202ce73f32c8e970ab1515f7b07bf36049","80bb561bd66489e524790d47a287833179baacd89ae2b60532c7f92023f48cc2","456b7187f14e1d2477b74bfa9271e4825bd51183254624b44c5f6005766b8ff0","e4114911dd8dbd6249b4e508966e640e6c8a6d7d6620be759c1dbf104a9b1ed1","cadde74af3321fe5dfb348dc1d72e19c6a11475d990a2809aa8a8a0c968ff968","e8447d11f3a33668faee3a0175b0c0e7f653b46896d127b8b42402eb8e811ead","d3afb6e0fbb2ff982a1aa1f8192754d1fc26f5b80c9e1b79fd29f60a4c8ee4b9","a273bb46ef5465ad1fe1b7bb5b1fddcc119fe788c4e73e226834a186fa052798","a1af0abffba61d11fe81b8338e62f2b7f4e5ef73828a162bb380d9cacc54e111","6c8e9cb096ddabfa76e8e9ef77977a44f39cf77f1c8309ab1398b822fa3f7c05","94ba095ba3e0fc474c0106211ad66c7f6c19aad4d62af9427e38069d9c0ed3ca","c213260636f4285d47880791a15b1452a22ad47841fee501c08368cc6f93dbdd","706bfe9d17e578e4d5f546c9b66ae83fc08a86b2e2c640597dbe3b5666a272e0","f8f4cbcdd78975372b40f887fe6dfae1ed68b73e416319bbce7c953edca909c2","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","c850c70698b79645345bb3d781b9cbcab82c6f94ac1a801261ab0cece5beeef4","a1169652d59c748c5ec81a332734e2eb2a0294bc1abd941e39ddc1cf6c0a3868","8c627c78904e33e9ea3254e9a8c8b1cfa1d3f5482406766286452f9c8a5c06b3","de077f870623c23f0b66400d6e948ec3be83f591a7ae1343a6dc80f2eb64cfca","726f455f0c65adaedcf799b2f0670610294ce1ef9ebe333d78c7ff9fd932ceb6","4165eca67f3344524716c2818892d0330f3cfee91eb3f53eb9918c3de6351715","6cc7b9937aaf140567dffcbb8cc7e5be37f159d2d970a6cd6029804bde96498a","92d50ec4ddb64d487c7875f1228e210d3caacc906e1965ec3c4dd32e4030d1ef","a1b67f80bf98af46430ad7b494465b1ed5597c96b47248cedae3b01a554de9f7","50d04f69a9ba22994bd6e4cabd20ca24cd95040bd747c777d178fb993d4f4c4d","af4220aa50c809f7fab954561da809da8a218c2d27dda489a64fb2d4ddf030a0","3ae58316451195ddc9121caae22a11fcbfe413e016bc1769ad236d91992c35fd","6be7b7b6338faddd702df171c62909a9230ed5eed562c6611c772d939b1665f1","261c41c9919bebafccdef0c501c7eaf7034258b3c027a22b1166cd096834556f","7ac116a9a8c012220f82014b63dd744115d09a6fa83021f909c87ddac2e39cb2","dcace0ae137b984b07797e26916a923fda2ef10a4c7e93d6a853c2b7516f3612","6231cded9a3b79d8a9c355048efed866c8eaeb4f2cd395951752cdab6318da10","c6d860360ececa1e5e01a4b39fac1e9db8924627c30726932db4f7109f0a551f","947c89d7df64c322d26c487b53867889d340824e2845c0d87d5504bce6532542","44319d05d0f9897a465338569dceacaee5b7d8aa9883b46fd585cc7bad08860f","e3b9222330621eac375f6bc4b52ea78c8469b4c94ae2a8b09fb1d1c3113307d3","4485370e15e4376b92686fd39336d9027b26b371248e25e1cb2d0244e94a1fa1","99e8e188456e5dc71e60d7790267772ad0f22e854fef5d40d8ecb48981fc3296","b88c260399542fb51f72a67584d6390c0e1b68c361b3b927e817a57f93121148","3d478291a40c83d3e3dde0d82d8f78725e8c727aeca3483276649eceda315fe0","fec94ed8b3f32b29a0ff4b1d393d8abbe988c3689db6fae36bf9dc18c5ea799f","18cbbf6b5435252e0b8e76b51d80f697d188cc6cc023265982a83e82c3ad59b7","f2a48883bd34468767d72a12463abc79dfc968713363a28968ed7c20e88a60f4","0319c1171fff27474e6fa314db32cbaf2f18718f786fe2dcd5512cf30f0622d8","cafdbf1ffebb3354670421e295bda97e24b3d947d0375468885b1096408f7b35","42627c2284e23bd6970ea7ca521469f140b6abbf10286f31bd002b0c152ca63c","0937afe2eb89fbc701b206fa225bccdf857c2a35932e16fa27683478ed19364f","ad58a5c0408f9297576a7e5e8c63189a0a93bb2b33bdef332edcef900ce04d48","e1dfe6c074da6a71d51bed7a5e5653922f6570965eb697bc14e7aca5dd3e26aa","2fdba54a4e42205851d822eccb069389ffc0e2eb87dac0f4b76ce989c3f4bf0d","060fe85d5e1fdbbc9380e36685546b1e92431a3fc2eb872fd9222ba76d524bb2","ef0b484dd4ff90c8015aa2f7be803f0ef0155822534b8f9632667aa388ef8535","17e47fc7fa45d83560247b020755d70e77b4d627d46010fe9938f427dc5707de","83498540925959aa5c22f7341f58d810c08b62ee81fbb5cea2bbdf506f0561f0","20a964e86b18b09464d5263893dd1fdfaec3457bb52ec52ee958b31218e41c94","7d2b7fe4adb76d8253f20e4dbdce044f1cdfab4902ec33c3604585f553883f7d","db7b913bca77272355d5ad4e928f8060d3057b9e7586076841ac9fed5876a4db","bd4c4df6d56a6e65df127347fd7a3bd14bc2d1f2675fda7be962117a568c90ed","ad815ef1c08422148534344b38520472d66b2ca3db16b9081fbb5dba79d946cc","a1ca4035e0c1a7b9f47c9f1b917c1045cdd9a127779616cab4846c039e1336d4","ed3ce2909e9fe451aa8f79e8f98070c5061af5cc3db99ae416af16d8d87b7f45","e3d29092d719e94ccbd48e499f46209c8dbb62d4ccd5454be43763a71a78e7a5","7e6e35fdfc3581a130f0f5fbe189506273ca5645935ad5adb6fad91f27bc58b7","2167c3ebc2a6ede83721f5212162a650fe226cbd7ad0e6b444956811f12b4dba","66093b51dabdca5c8004fbd78bb31f9bff83d56fc903fb2f0dcb6f49d7823dfc","5e231bfd216f6bc3c9cd1679aafa993bf036cb62adda12b74b5b4e46a0f31f80",{"version":"c14856169f9aa2236e3eaa1748fca0998410c688c69eb248d3d551c220107857","affectsGlobalScope":true},"c83e65334a9dc08a338f994a34bd70328c626976881d71d6aaa8dc7d66b08d96","51ce227f2bea429203e9ca434553a6a13d5214f87276e1ed2fb068e1826467d8","d655233b800bf949a46bdf90c9830d1aa4e3017864e2f18ec25ad4c3511e891e","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"b934b72617b1474639ef1886668032537a2ed5dcc875c303dc33f207c64daac1","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"ad0d1ec49330f9155698108dcd923031626500d80006e94cc07102c7be907ec8","affectsGlobalScope":true},"fa9257e0d44930c1c6765fec51133a65721a8cdfc385d92926b64f78c662b7bb","6816b69b0921d55c3fe01e614a11af57e87209b8ef96b73c09bcce827a71d7d7",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","f0b2fdef21dda3803b6e59e1060a9f420a7b3a3d59082c403be4364292ebd941","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","73e88763806a21b32aff5a66d4930124606bc5e77f796ea3ff8b6878ff787fa8","ac4b69257d71eee424b839167dda625a771f0d20276beaf822b5e49368539df7","888ec73828164f7a89bf11a173f2e6721e777571c606f03b625956cce2365cf6","06ccebc2c2db57d6bdbca63b71c4ae5e6ddc42d972fd8f122d4c1a28aa111b25",{"version":"81e8508d1e82278f5d3fee936f267e00c308af36219bfcee2631f9513c9c4017","affectsGlobalScope":true},"0218d6df259111a1a4c6bc76cd538932c6c051fd2ae5754f6cb189fbbd0bb6fc","58e6ce808ad556f72c4b882546b7cd023c7f5804c854edf77b6a8a6b59b68644","8e2dd46692f03737289f1b23fc90ad329d726a8b234f756a1453d61a39587356","e220ee6feb1efdda44d46231bd68769fee59e75cad5f02d21732c8057bcb3cb1","288dd0c774a5c6e3964084c7a2bc8cc6b746d70f44a9892d028d04f915cf7ebc","d61c7c41eb1960b1285e242fd102c162b65c0522985b839fadda59874308a170",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"f7011a8d17a06e60dc591fd89b7bf40507d36a5a4d5913fa0eff4e18da001759","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","fb0989383c6109f20281b3d31265293daefdd76d0d30551782c1654e93704f48",{"version":"84f318e5d442b89f65186b61af2abfaaa253a067b3819ec55250e44b09b80a57","affectsGlobalScope":true},{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","22d48bfb37261136423ac687f1fa7bd4dda3083f767416d409a8260cf92bc8fc","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","77f7b6094b3422cc09eb2e919493287ed02380cff73d0452e17149d40dbf157d","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","698ab660b477b9c2cd5ccbd99e7e7df8b4a6134c1f5711fa615ed7aab51cb7f7","33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637","a4471d2bdba495b2a6a30b8765d5e0282fa7009d88345a9528f73c37869d3b93",{"version":"aee7013623e7632fba449d4df1da92925b27d9b816cb05546044dbfe54c88ef4","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c9d70d3d7191a66a81cb554557f8ed1cf736ea8397c44a864fe52689de18865a","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"77c64e668dc7e3db451a6c966e475bc9594678a3675489dc8fc2c1240b83c524","affectsGlobalScope":true},{"version":"28bd780c376b5bb4fbd9fc97881d15066bafac834c6e6f5aa8eff744961e14c8","affectsGlobalScope":true},"196aeae43911b66bac5d87d7eba460c4d27561257737931f5a1e6e1babcf55a6","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"88003d9ab15507806f41b120be6d407c1afe566c2f6689ebe3a034dd5ec0c8dc","7ac7ef12f7ece6464d83d2d56fea727260fb954fdd51a967e94f97b8595b714b",{"version":"9c52d1e0414faa6ee331024f249f9c1ab11a5c432c37370c2c74ba933aee25fc","affectsGlobalScope":true},"57eda4c4c04a1dca45c62857326882ce9cc948c4b52973c0e3c3b7e4c3fa3990","0e0b0baaf6e3845418c2741c9b47478cf6fc086ef8dd5ad4b9ab91499e51de28","ca6e8a62a3e4f5cc3fea6ab45c2e5e128db4d90d81d70547a65047e3f13996f1","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","dd5647a9ccccb2b074dca8a02b00948ac293091ebe73fdf2e6e98f718819f669",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","a1c79f857f5c7754e14c93949dad8cfefcd7df2ecc0dc9dd79a30fd493e28449","8566fa84085caa46340393b1704ecd368491918fb45bd688d6e89736aec73a2f","dc33ce27fbeaf0ea3da556c80a6cc8af9d13eb443088c8f25cdc39fca8e756f6","ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","cab425b5559edac18327eb2c3c0f47e7e9f71b667290b7689faafd28aac69eae","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","6d969939c4a63f70f2aa49e88da6f64b655c8e6799612807bef41ccff6ea0da9",{"version":"b2fdcc3836d425833af10e536ae5491c34e218bc71870f12a401720f874b6ce4","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","626bccaba2f61f03abe558a39501631565389a748bc47dd52b305c80176333c1","3663d1b50f356656a314e5df169bb51cb9d5fd75905fa703f75db6bb32030568","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","656424ca784760c679bf2677d8aaf55d1cb8452cd0ac04bbe1c0f659f45f8c11","bed28de34a5dd2b08d47b584da338e5fba92de84ce8727dd153d9ec16bc0f2e4","9d7673eb21625c65e4c18ae351a7f64dbee479711d9ca19b4357480a869ee8c6","6745e41d07e777a049bb25425bb1c6c1a9b437bc2568ca8eef03daa8e8913ac0","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","b4358a89fcd9c579f84a6c68e2ce44ca91b07e4db3f8f403c2b7a72c1a1e04b6","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750","7693b0547e3b004443fa1f4327b61617e7317757a3e947ccc200c91111c77eca","9764711e9c9dd50a87bb08f1b5dff3abdb9c8dd500777b9908932c45381126d9","8a1285bd27f3717fbee30e79502d603908f69b9815992682f948da70a8ccc6d1","7d1b1c3ab41597780f02dd80c9ac797dfe8f57ea5d6ca99fc910f695b2e01438","064ac03a8141188b9d5ffbfabf32d923e61f8fa6db97b6d164608f43a6c26fe0","160b5730ca7e6d145fa31a69ce859d43f16590829a9c67a28b2a9dc61b5a9263","b6c14e4a3d812bc972e9193bee0f1025f8ec0c0f2e09a2becda8b924ff966360","86112f3c5926d6d259c26f87c3bd9b070c491a2ac4fdee00d921cf41a8b339bd","fed56561917bb49fd85453c70d0756c2bb3fcc50004b2163979944bac451dba3","82db2f05f8d7f32975fccbb3a51d12c4c78e19053568d956236a24d90511a490","8d7a9d62859bfa613cfb03f663aeb589eb1b47db70995b6551cd5944ed64b101","e82ee3992f4be2ecfe7e423fb72b5e925d631bde1c29b51b75dca1f11e1582fd","4856886035f7c5018871f5dc04ebc02ba8340145315dfcee58a5a7cc98b6cbbc","337a8fc9c94a375e84904aaa5572fcf331839ba871eb834af3665158f532a7d4","97f561ab6d9524d8a13a1d294d4d1bf2dbaef4f689493ce770519795b7f93adf","55c99108d658e4a834d4e1f11719400117ef52cce0699959ae86ef2fc42c7d79","d84e2a13989decbb8428400528850d628900daa1c07f15f8476f967f533d6c71","31859fea9d1ae6618a13c79545519a0095505dc0a6b44785d9d1830bd1289153","0600cc4f9b5b639b63b0c25e869b76d7dc78023018f3b1aeb9596460b94c137e","9a2aa0246d885b28eee53207ab118ee99d583b56394c4651a912453e3032ec01","7108d5ae8a27080b178291373d9d5fb56f93a30be42e1f89c06960e393be21e1","c028332d0042231b71a867175027816f12e89143368255300ce747d89cdd7015","6b26577c4ac04c2b6c4fd58e9333f62f345dfbdec7bf21399ff6495513805ddf","51b4ca86d69860c3eef276667a5daa7ead1f16e62a58b76d610a901d36b9e6a5","4eeadb5094a05f61accb3ecac48a607abb57a60e7967282a798e33a7c7889880","9aa9f3604061edf424645090a355f8d276bfac833b6e471eeccda49dd099b534","52fe5499e9a0318a7b711f018b7e6f326cc56b0d6c07b82b583c440100655980","e8cbc84550a53fc46c701c9650162cb6b39499bc58d9764778a1280f4b48a088","5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","7a01f546ace66019156e4232a1bee2fabc2f8eabeb052473d926ee1693956265","fb53b1c6a6c799b7e3cc2de3fb5c9a1c04a1c60d4380a37792d84c5f8b33933b","8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","c2cb3c8ff388781258ea9ddbcd8a947f751bddd6886e1d3b3ea09ddaa895df80","f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","2a317fff5810a628d205a507998a77521120b462b03d36babf6eb387da991bee","f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","eb94afb533a949c56d2e1a2dc2efc30a6461d99b8c14203f62acc581075b84c6","d57dc90cf2914e9715ca06526e4359687eef4609a855e627b27ec02f520ed141","2c72068196824b34051a7e36d6b40f0674ab1688b6ae7065c86a7e4e06b8a42a","f849ecc47ea31a2865f4ce486acb695e069373bde23b007ad553309ff827a0f4","930307e0325aa06e5a44cdcdcd6a4264b5c9bd7f550741a8200c99d249924bdb","b6698642d6d810f41c1e097547f0d198965bf3e368ffceb1bb334d315d7b90d0","77501dd0dc066ad07724489d2963d8cc2404a4321bb2af3e94fe2ca0abad3748","d84dde63862880c889e14ea335ea9121386bc5083583e63e18f30eb33ff61e88","ed632676e0948143136adf72a84ce9aabc7ffce448684f25b1e4846bf69f0482","5d4df8c9f8abed8279c174d9c60c3655357cf104bcab5215b1d6b5d6001db86c","ef75f365177ed58c756044035983a193c7429b9bee22ea00d623cd7fd075940e","bc4415c6ba0f39ec85d4bc18b814ed2b8bd5ec383b114c1831c466bc4a81a1e7","b964bbfb128776de105cf51b89068a88c5f453f3da10cc09ed55dfee1f623357","6f8826e3e6ad422c1640bdf49584fe27393007db9c2102975540b811f7da7114","4650472d5e9a88ae0201e4c8b3b5b7cfd563d73cdd58cf6bf285a786f961459c","11941686ae11a1df09867c4c708804ea4b784340bca08475c2f54faa4c7312dd","45661a01b995096a7a5bc1ba5bd62ee4796b76e2672e77fed150f4149dfe680b","9a1466470d6c6ad67fa196db6349c069437954b6d50326dd6900bf82c916f30a","2103b3929e059d5ad0f309c2df59130f3318cebf3374e8585344d7f569d29b50","7d32292417987c8f27481cbb1e02ed929a93f28a544dc9ed6b06cc87bd0c7fb7","6a8541f64972beda81cf0a7153834f2ce5ad948e4a5d1874df23bf9b3af0412c","51b6041423db970ebefd2c82090c1e5a609567451685d9121988024e4877d245","fe7858617d56c01d33a4f2aa07fb59afc2ec25e2e21a65d6195d06c54ad73324","634dc12b645d9778863e756e228df771fe8f0ff1e9a66ce9f9170671a12c10eb","3fc0b6667ae8a11d159b971eee16d48ed19258cc40e84e868b887bc9300719ef","75a4036897fe1f22ec67b53243794d0678097f9446055464f5fc70acae27a581","85d984a7e1df02180d45d73422a8f9ddffb612b82f5798e99a9d828728954f94","344970be0bb949f4eba790269cdc6f8bde9a8deec139dc752a84c92edb0f8e04","041db1e87b5bbe7906050219db4685b8bede8dc3bd90e6a872d50f10fdf799dc","5c70d9c10523c301ff49da01161b355dfc475560dabfb51a78e43f9a8ffa33a4","c1ff8b883bfc2f121ee6321569238c77a970a577df88743a508be6a650016d31","81c993d28cb68e34562400e27bad5a8a473745c10bd987a520496dc87dcf9b25","66e5935ebb1d30a66fe5057325d4789ec8ff5c067f5f41a04874830f087f2bb7","1c7e4a0d444fe2da1e6c552a4a61644a09dc103c7a229c66f015418f931aff00","0c61dda8d874351856552fb11fbd9c9bc14f101dc5a022ffbb23cdd81e46e395","9057974336ab8820d5b75b34a87fb25e147361107973f0de204aef4cd43b4c20","15b82e9aaec4a13ee5294f4735dabcf33cb21dcccfa4c0ca9ae99340724a8eab","73aed2d115f52cf593e7b79d8ac50d13d7b2eaae84a358b12991d464390ef8d4","e2fef5d21ffc32bd9aaea37e3de49122350ef0d69c6966174895530e8f6b1975","c91d8057814e1734d7c5d92cbce0813733aa835feeb323f1bc9ce14289deeef5","674a3dc13d859309c44b890dd33974fcfe8d88aae34dc8475b06324d89a30ebe","f15fb8ef7b3caeb40d3d1983b97de2f364cd90116096f0913a76dcd9c878af70","52d92a0732ef4e9197e04768dc112e7b54acd3a45247837328c3aa74025fc7c2","347e84717dab8c91ca34f6e19e2d3e00912d73615d4aa96baffb470859179755","0c09b7fcf2274f771e4bbda7446b9d152a3ebfa7d5c5b2f4b6b0e8fd1504c076","971ee8138ca5c258da1c52d9a431d55eda25b72042ba2a02d5bc5d256649b116","e3f2204febc95c35142202250624debbbedee84d112fd04bae9e078e00ad7bf1","464579134297cc667140d83eaff4c52838fefbe8da34411a6d51967bce55c8af","023dd8d594eb4cd812cb2764414fbefdc1958b893f0a3904350ebea1fe6ca8a6","7731f90b03432c5f2796297001add673be152d6bde5f5a041d46c58f3f17c9cb","a7f8c6ad6c4acacf6d1221112be83795abcddce132116f7bfb1ea9f8e6efd311","acdd42e2aeec1a0e240b07421b550247c55fd22182087b0250e7772a14b6e752","6149f0d50450fd9caca6b1127ae0cbb714862d6f0b254b75e92fb3955305ea39","26d4990dea0683ce5e0ced1bec20e266e9a7af7c95fb9a04fcd428926c6aa0c3","21799733e9d3118d87736d9103cb096c71a07d60c9d8d52f9fb14c0ac646b2d0","358de0eaf54eb09328512259573bfe70d6efdbd1e014d9c75d7fc87768d2909b","d47caa1b38569776cae336d8fc7703b8403013cb230ba7920305327ed0a377c6","34864f625b8143c63a9d0f18f0792ac59688ec6ed9c2ebbd7f2a6d3fb2969a13","864c4a707dbaf5127fc40d7a96e541d05b8d88b5129cdcfd2850435bd3bb90d6","d8a9d8c06be68531702ccb8e3c123b6358660b3ca87f00624e984fda60ea2ab7","cb0bf4b6a49fe19baeb5b1fb1c1682dcdf66cd8abfb3a99499719669b4315c3e","cba525d08e2167b05180dabe0a7784e9b3e292c4ff439372827a7a7c4b5e129c","747c476518a7b710d032641e641c5ffb7b329514bdba4213c276a14799360228","c1b5cda3000f68126de279e94c97e08af97502127893e61c88661441805368b7","37134b4d62a4a84e33f1980f4e43e4f8f988c52e6267931788fd93423bbbbc24","82b2fd66587d4c1028b1a178c0997d9a3d261d6fc73d4f84b15b30fcf46456f3","4d170d05f9c68a28dec552b5382a0e66031a3644954e9c383f26e22c6bd8c503","60a0ca95f29f7c9896cb2f673dba3458c60ae9e9351e677b5d8fd964ab2e9392","94178e04d70cce66e8c45789f5475a6d220d92832d2dfc06cee39cf19bebf6fa","f43bf91240d66e67b18a2621a75e31e67f418cdb9ba2d0135a905fe4a25f1ce8","a7f2c4e68794f763a25b7895a57db3d70f2feaf22ccbca68df4bc96d696d5c5f","009acb63dcd0e8fd1c959d7e0297d6f95a4c5565ed712c7a117dff559798fda2","d3e479b5cb24f4fe768d5bc7f961bd215d0ef3a6994f4865d48d0e7882c2e631","e829051be498b66bf5350adb6e9c0f2d79d98fbcd6faf6bc688f8b4644612e3f","386d74f1e6947c10eaf5e9974583424f8eb0c744b85dafcea8cf2799a527a385","65ceb367297a12f2e758d7d9b8b82f3ef272ed986e0167d8abc2f74d14dec449","1ad48bebbbe1fc750c85b52004c275ac3bbf29e28c7ee85aed9fbb10cd2553ca","7ac36a55b0387738a0890696fc42b27f2fae6f2de195fae86d3db9b300aaa062","9362f44676071b1fac20889ec3e436d73966a8f28ed33ccd733ae68740c6b93c","856f12b0e19ff9bdf0a82659a33eed57185a6880fb25a331fba0a8f1f7061c47","ca20a9fd1cd85947f6ddd21e4e4148dc958282bbcc320ddca59621678aeab54d","ac9d20c49bf26a18802cfae968cdee10050a74e02bdeaa4d43b4adf2b2f98c31","8a6998fb8567e5b868df0664b2d59a57b26f33dbec874cacc1fcec15fd970e64","fe04a77761a0e2a2664b032a78262ce538ac2bde2e92d16841fcd0e567b37c0a","d6cff435e8177dd56937f23d5d9069aaadc850b040b6680bf4e61679bb21b2e6","a85886b0850bad64be7e7acf7e56fb7ea3ffffd3ee3901c01b2345162bd5d5e1","ad97f2e2dfb1478f1ce410e3b717cab85ae22e044cca1da8992714ba1066c34d","ac8c1eda841c6c13c31fa7be583ea73b5bad55a2949fa1238ad48d978b6cee15","503704e476c9ec10bc3e67520e1412145499c8c9e482acf2da80e1cfe59e0e60","0ffc6b30a950c1d7843ba381048503a89ea9acefd8edef49ddb0fe99c4697ddb","f605e543c4bfccaa4e6246bd517bbeeec00e745a5f7fb5b0a0a8e8aff493e4df","712755f18f5dad7207d42498a1497ae50507207f3c1a968944e7dda72a970bdc","ddb19ffcdf9959d765b126e4b135d4cf212566bbf0bde6852323a260e0c0f26e","c28b849f8211024b8ddeec3202c7a7600f902e3218009441faf845ba32a1265e","273f4e80ccb9aa5d56106abdf9dbf7991ae806d7017c53ecbfe658ae6448346e","a65d0fb8dce2ccd0ca448c7fb3499f3fa9e346ec572f0c27d942c081a05c245d","ba8f1c0fa9d761daf83de565030932f9036c57fbd60bfbf1a8432fe72437727d","3afaad1395dfaa2b077eb6ac843432a45af3b4982bc7163e90580aeb9f840831","d34655825ebc24da098276aa4301281ff086859568d9ac46d9abacc9ab4a4657","5c86b6af74967907c4655d64405abfd986281159294ec997906c04b0d4bbc2d9","80ba4067392cf4b2193d539dbdb4cef17c7cc876fb849276861e11e9478a43cf","418e7ad170cb62e0ab8d921a5c4a5a913468050f54f4d6a346b0acd48309722a","b8f33e4a3416072f88692fe50a3c05c859f981c1b620a43360512db14a10ea5c","4b6c98445cd593d52437a7d5a310dcd4d4acd086fd03f548da10ccaaff7c8cf5","d7d70b2d2a63d189afc13d80a5b68c5b0cf7d02cc6fa1e03b8ef87b93d55210f","f550cd86ca6ce8d0988639b967c4ed3d49d823a48ad87b5df77645dd7082b0d5","046d9123a02230dcc01278db49e3aea5ab59a1033fa5bfb92be0047086fea2c4","272a9d0390645b3db0a1b98616e7f37f67d38507920d6704faad63a8615848ef","1fcb8b15db812281d69a3090d488903f9e93033004aef9d8889ca3ad0753a96f","bdf5a95eb0a2dd1d39805bdf51b46ba012bb9b92b2ddaae16219595bba7678a5","9f794a0e8550a03baff865a3961cc22afbd85bc4ba9672bdda036971928f85f4","66a697d1e4cdbf25cdce4644a8085a8563041fa8c7731d4d9f5e8f22e66ba72c","a0c8e17f4d1ea2704c62d7349bc3b8d9a12e3761b5960cb44144d3f0333b3fcb","3471c0df3d0391e1dffe6e8bf150294531b2b71a2afa5f2b86e52bf84a5db60a","5d4df4de055eddf3187094f938a640f8d96e4c551a47d6686596fdb6ba4c3014","8bc2cad630da1033c1fd8d7df2bffb18af0da6113bd086a8bbec04a2471a1e00","a1059d1bbc8ad46bfe668b8450e7e8002887c4ab987bdb96d6108d8023f8bb8f","5134885e9648e2c6745f8aa1c3e7f5ab3b3617258b3d81ca02de6655ede3d74e","57f50c6c0bf4fc7e0e5c6780c82a632463a8d084f9a646a4bb569d583287d4f4","457e8d96dbe3a99af586632d666d203cdcd9fe85c57d80a7f09e934b6d51f8d0","fd583efaca2c616317d662111ec0e37268873353310a558474c8d8af85b4013d","3821663dc2b3bfa49ed679104c92452c2c95812becc122757d199472d1381763","6d3856cf4a0896f78869fe581820ad08a3e579cf7f2273e4e848d208f11579aa","cc85e44779900ba71b5068e78dd21eb91d6abb643d499dc167ebbc3afecf1d61","939048ad3ce1f0d3e937a9360dc22fc36e9d1bc1abe3bdf444cfbcc3def8992a","aac718097f25a3b5907124e462c1adbce1ae3eddb9a2ee2cbd89194c4ef8a6f0","1442a75050bad91356b11dcea6dfb877154d1f2e00f863a9b17ba5e903659503","7fc9c58237c8e80c0f4812accadc896453bf369ca10198b23f210304c921f6ea","6c8d980b4d9fc04a89ffa3a6f3eb6fc114cd160a2f37b8c426bb2bbd6016de26","e505fc108417f2cdc32afa758f7dd52d96ee8635de7af714c2b28ccf2bc32685","af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9","b187f2879a16a3f843472814f9b93c445e21d1b9c0600d1b6faf02e9e5bffc0b","ab093a307eaa4c4a97c5f219320aeda8d9cc7a50548032973c02f505a76e9187","43a4150b910aa81033f7adf077e76d6ed1e569c46082c32e6d1d6ab1678377d7","7301a7544a127c860e8de266bfd348293dcf8c9822c5123ab1cf533745d7c0e4","9398a0f1e4385f30d59b81b695884127c6c02836505d3d50ce3bb0d19bbe26e6","7994500b2750ab3ca65d61488c9af7970d663d870d69ef3999d2ab6bbe558111","b5e012cad69d351ae22d9151dd64be8323907fd226abd45010f450e0006ddabb","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","6e6cbf46b6d75d417f37b637037fb5d97a1d9cd0c1d7fdcce16d86e3db9db458"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"inlineSourceMap":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"removeComments":false,"skipLibCheck":true,"strict":true,"target":1,"useUnknownInCatchVariables":false},"fileIdsList":[[65,985],[61,985],[61,66,67,68,69,70,985],[61,67,71,985],[61,69,71,985],[58,65,985],[71,72,985],[985],[425,985],[416,425,985],[414,415,416,417,418,419,420,421,422,423,424,985],[431,985],[425,426,427,429,431,985],[425,426,427,429,430,985],[61,431,985],[61,431,432,433,985],[434,985],[428,985],[414,985],[413,985],[290,292,985],[61,63,291,985],[292,293,294,985],[290,300,985],[61,63,290,291,299,985],[300,301,302,985],[222,985],[304,985],[61,312,985],[311,985],[312,313,985],[311,315,985],[315,316,985],[290,318,985],[61,318,985],[318,319,320,321,322,985],[318,985],[290,327,985],[61,63,291,323,326,985],[327,328,329,985],[290,376,985],[61,63,291,339,350,375,985],[376,377,378,985],[61,380,985],[282,311,985],[380,381,382,985],[290,384,985],[61,63,291,343,985],[384,385,386,985],[290,388,985],[61,63,291,371,985],[388,389,390,985],[311,392,985],[392,393,985],[409,985],[61,63,291,408,985],[409,410,411,985],[290,401,985],[61,291,985],[401,402,403,985],[291,372,985],[61,291,368,371,985],[372,373,374,985],[61,369,985],[369,370,985],[443,985],[61,63,291,375,408,442,985],[443,444,445,985],[290,450,985],[61,63,291,449,985],[450,451,452,985],[291,457,985],[61,291,305,456,985],[457,458,459,985],[290,464,985],[63,291,311,463,985],[464,465,466,985],[291,502,985],[61,63,290,291,303,501,985],[502,503,504,985],[291,478,985],[61,63,291,477,985],[478,479,480,985],[291,471,985],[61,291,469,470,985],[291,468,985],[468,469,470,471,472,473,985],[291,495,985],[61,63,290,291,985],[482,495,496,497,985],[291,491,985],[61,63,291,490,985],[491,492,493,985],[61,506,985],[506,507,985],[63,397,985],[63,291,311,323,396,985],[397,398,399,985],[61,435,985],[291,311,371,434,985],[435,436,437,985],[291,295,299,303,305,306,314,317,323,326,330,343,350,371,375,379,383,387,391,394,400,404,408,412,438,442,446,449,453,456,460,463,467,474,477,481,486,490,494,498,501,505,508,510,513,517,520,522,526,985],[523,524,525,985],[523,985],[291,311,371,985],[396,521,985],[396,985],[61,323,332,395,985],[509,985],[511,512,985],[511,985],[297,298,985],[297,985],[61,296,985],[344,345,985],[344,985],[61,514,985],[514,515,516,985],[514,515,985],[311,515,985],[324,325,985],[324,985],[61,323,985],[61,331,334,985],[331,333,334,335,336,337,338,985],[334,985],[332,334,985],[61,63,296,331,332,333,985],[336,985],[61,333,343,346,985],[347,348,349,985],[348,985],[61,339,343,347,985],[518,519,985],[518,985],[340,341,342,985],[340,985],[296,299,311,985],[339,985],[405,406,407,985],[405,985],[311,339,985],[61,333,346,408,985],[439,440,441,985],[440,985],[61,296,339,405,439,985],[447,448,985],[447,985],[454,455,985],[454,985],[461,462,985],[461,985],[499,500,985],[499,985],[61,299,985],[475,476,985],[475,985],[61,346,482,985],[483,484,485,985],[61,484,985],[311,483,985],[61,333,346,486,985],[487,488,489,985],[488,985],[61,339,487,985],[61,63,985],[282,985],[279,280,281,282,283,284,285,287,288,289,290,985],[61,63,282,286,985],[61,63,279,287,985],[61,142,225,249,250,252,890,985],[250,253,985],[61,142,255,890,985],[255,256,985],[61,142,258,890,985],[258,259,985],[61,142,225,265,266,890,985],[266,267,985],[61,63,142,269,270,890,985],[270,271,985],[61,142,273,890,985],[273,274,985],[61,63,142,225,252,276,890,985],[276,277,985],[61,63,142,269,527,530,532,533,890,985],[533,534,985],[61,63,142,225,536,916,985],[536,537,985],[61,63,142,538,539,890,985],[539,540,985],[61,142,225,249,543,544,916,985],[544,545,985],[61,63,142,225,291,547,916,985],[547,548,985],[61,142,225,550,890,985],[550,551,985],[61,142,225,265,553,890,985],[553,554,985],[63,142,225,916,985],[556,557,985],[61,142,225,228,527,559,916,985],[559,560,985],[61,63,142,225,265,562,916,985],[562,563,985],[61,142,225,262,263,916,985],[61,261,890,985],[261,263,264,985],[61,63,142,225,565,890,985],[565,566,985],[61,63,142,225,269,568,890,985],[568,569,985],[61,142,225,265,571,890,985],[571,572,985],[61,142,574,890,985],[574,575,985],[61,142,225,577,890,985],[577,578,985],[61,142,225,583,584,890,985],[584,585,985],[61,142,225,587,890,985],[587,588,985],[61,63,142,591,592,890,985],[592,593,985],[61,63,142,225,528,890,985],[528,529,985],[61,63,142,595,890,985],[595,596,985],[305,985],[61,142,249,599,890,985],[599,600,985],[61,142,225,602,916,985],[142,985],[602,603,985],[61,916,985],[605,985],[61,142,249,269,611,612,890,985],[612,613,985],[61,142,615,890,985],[615,616,985],[61,142,618,890,985],[618,619,985],[61,142,225,583,621,916,985],[621,622,985],[61,142,225,583,624,916,985],[624,625,985],[61,63,142,225,627,890,985],[627,628,985],[61,142,249,269,611,631,632,890,985],[632,633,985],[61,63,142,225,265,635,890,985],[635,636,985],[61,249,985],[542,985],[142,640,641,890,985],[641,642,985],[61,63,142,225,644,916,985],[61,645,985],[644,645,646,647,985],[646,985],[61,142,583,649,890,985],[649,650,985],[61,142,652,890,985],[652,653,985],[61,63,142,225,655,916,985],[655,656,985],[61,63,142,225,658,916,985],[658,659,985],[142,916,985],[885,985],[61,63,142,225,916,917,985],[917,918,985],[665,985],[61,142,985],[667,985],[61,63,142,225,669,916,985],[669,670,985],[61,63,142,225,265,672,890,985],[672,673,985],[61,63,142,225,675,890,985],[675,676,985],[61,142,225,678,890,985],[678,679,985],[61,142,681,890,985],[681,682,985],[142,640,684,890,985],[684,685,985],[61,142,225,687,890,985],[687,688,985],[61,63,142,638,890,916,985],[638,639,985],[61,63,142,225,660,690,916,985],[690,691,985],[61,63,142,693,890,985],[693,694,985],[61,63,142,225,583,696,916,985],[696,697,985],[61,142,225,699,890,985],[699,700,985],[61,142,225,265,702,916,985],[702,703,985],[142,705,890,985],[705,706,985],[61,142,225,265,708,916,985],[708,709,985],[61,142,711,890,985],[711,712,985],[61,142,714,890,985],[714,715,985],[61,142,583,717,890,985],[717,718,985],[61,142,225,720,890,985],[720,721,985],[61,142,249,269,725,727,728,890,916,985],[728,729,985],[61,142,225,265,731,916,985],[731,732,985],[61,225,701,985],[726,985],[61,142,269,695,734,890,985],[734,735,985],[61,63,142,225,527,546,608,609,916,985],[526,609,610,985],[61,142,686,737,738,890,985],[61,142,890,985],[738,739,985],[394,985],[61,142,640,742,890,985],[742,743,985],[61,63,916,985],[61,63,142,745,746,890,916,985],[746,747,985],[61,63,142,225,745,749,916,985],[749,750,985],[61,63,142,225,251,916,985],[251,252,985],[61,142,249,269,527,611,723,890,916,985],[723,724,985],[61,142,375,916,985],[375,531,985],[371,985],[61,63,142,591,752,890,985],[752,753,985],[61,654,985],[755,757,985],[756,985],[61,63,142,759,890,985],[759,760,985],[61,142,225,762,916,985],[762,763,985],[61,142,686,730,744,765,766,890,985],[61,142,730,890,985],[766,767,985],[61,63,142,225,769,890,985],[769,770,985],[630,985],[61,63,142,225,449,527,773,774,916,985],[61,772,985],[774,775,985],[61,142,249,305,779,780,890,916,985],[780,781,985],[61,142,269,777,890,916,985],[777,778,985],[61,142,637,783,784,890,916,985],[784,785,985],[61,142,637,789,790,890,916,985],[790,791,985],[61,142,793,890,916,985],[793,794,985],[61,142,225,899,985],[796,797,985],[61,142,225,799,916,985],[799,800,801,985],[61,142,225,265,803,916,985],[803,804,985],[61,142,806,890,916,985],[806,807,985],[61,142,249,809,890,916,985],[809,810,985],[61,142,812,890,916,985],[812,813,985],[61,142,814,815,890,916,985],[815,816,985],[61,142,225,269,818,916,985],[818,819,820,985],[61,63,142,225,226,916,985],[226,227,985],[61,634,985],[822,985],[61,63,142,591,824,890,985],[824,825,985],[61,142,225,265,827,890,985],[827,828,985],[61,142,265,527,858,890,985],[858,859,985],[61,63,142,225,830,890,985],[830,831,985],[61,142,225,833,890,985],[833,834,985],[61,63,142,836,890,985],[836,837,985],[61,142,225,839,890,985],[839,840,985],[61,142,225,842,890,985],[842,843,985],[61,142,225,845,890,985],[845,846,985],[61,142,225,674,768,838,848,849,916,985],[61,673,985],[849,850,985],[61,142,225,852,890,985],[852,853,985],[61,142,225,265,855,890,985],[855,856,985],[61,63,142,225,228,527,860,861,916,985],[861,862,985],[61,63,142,640,643,648,657,686,692,744,768,864,890,916,985],[864,865,985],[508,985],[61,63,142,225,265,868,890,985],[868,869,985],[61,63,142,871,890,916,985],[871,872,985],[61,63,142,225,874,890,985],[874,875,985],[61,142,249,532,787,890,985],[787,788,985],[61,63,142,225,580,581,916,985],[581,582,985],[63,661,985],[61,63,136,142,916,985],[136,985],[661,662,663,985],[317,985],[881,985],[146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,985],[61,63,166,228,245,254,257,260,265,268,269,272,275,278,306,530,532,535,538,541,543,546,549,552,555,558,561,564,567,570,573,576,579,583,586,589,594,597,598,601,604,606,607,608,611,614,617,620,623,626,629,631,634,637,640,643,648,651,654,657,660,664,666,668,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,741,744,748,751,754,758,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,823,826,829,832,835,838,841,844,847,851,854,857,860,863,866,867,870,873,876,878,880,882,884,886,887,888,889,916,919,985],[61,265,590,890,985],[61,142,311,911,985],[142,145,580,891,892,893,894,895,896,897,899,985],[895,896,897,985],[64,142,985],[890,985],[142,145,580,891,892,893,894,898,985],[61,64,891,985],[580,985],[63,142,891,892,894,898,899,985],[142,143,145,580,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,985],[142,228,254,257,260,262,265,268,269,272,275,278,375,530,535,538,541,546,549,552,555,561,564,567,570,573,576,579,583,586,589,594,597,601,604,611,614,617,620,623,626,629,634,637,640,643,648,651,654,657,660,664,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,744,748,751,754,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,826,829,832,835,838,841,844,847,851,854,857,863,866,870,873,876,895,919,985],[228,254,257,260,262,265,268,269,272,275,278,530,532,535,538,541,546,549,552,555,561,564,567,570,573,576,579,583,586,589,594,597,601,604,606,611,614,617,620,623,626,629,634,637,640,643,648,651,654,657,660,664,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,744,748,751,754,758,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,823,826,829,832,835,838,841,844,847,851,854,857,863,866,870,873,876,878,919,985],[142,580,899,985],[142,899,985],[899,985],[898,899,985],[142,895,899,985],[249,985],[61,248,985],[883,985],[510,985],[877,985],[879,985],[228,985],[223,224,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,985],[97,985],[98,985],[97,99,101,985],[100,985],[61,71,985],[76,985],[74,985],[64,71,73,75,77,985],[61,63,90,92,985],[93,94,985],[63,127,985],[61,63,90,92,126,985],[61,63,78,92,127,985],[126,127,129,985],[61,78,92,985],[103,985],[63,137,985],[61,63,90,92,95,985],[61,63,78,79,81,107,137,985],[137,138,139,140,985],[102,985],[115,985],[63,131,985],[61,63,78,107,131,985],[131,132,133,134,135,985],[79,985],[78,79,90,92,985],[63,92,95,985],[61,78,90,92,985],[63,985],[78,79,80,81,90,985],[91,985],[61,117,118,985],[120,985],[117,119,120,121,985],[78,79,80,81,88,90,92,95,96,102,104,105,106,107,108,111,112,113,114,116,120,121,122,123,124,125,128,130,136,141,985],[95,985],[78,95,985],[83,985],[64,985],[88,95,985],[86,985],[83,84,85,86,87,89,985],[64,78,83,84,85,985],[107,985],[92,985],[109,110,985],[220,985],[177,985],[182,985],[167,985],[168,985],[214,985],[185,985],[173,985],[216,985],[218,985],[169,170,171,172,174,175,176,178,180,181,183,184,186,187,188,190,192,193,194,196,198,199,201,203,205,206,207,208,209,210,211,212,213,215,217,219,221,985],[189,985],[191,985],[179,985],[200,985],[195,985],[202,985],[204,985],[197,985],[367,985],[361,363,985],[351,361,362,364,365,366,985],[361,985],[351,361,985],[352,353,354,355,356,357,358,359,360,985],[352,356,357,360,361,364,985],[352,353,354,355,356,357,358,359,360,361,362,364,365,985],[351,352,353,354,355,356,357,358,359,360,985],[247,985],[58,59,60,985,1271],[58,59,60,246,985],[57,58,59,60,985],[61,311,985,992,993],[61,62,890,936,985],[62,920,921,922,985],[62,920,921,985],[61,62,564,597,916,919,923,924,925,926,928,929,930,931,985],[62,832,835,838,841,847,854,929,985],[61,62,269,919,923,925,932,933,985],[61,62,272,564,614,617,620,623,626,733,768,925,929,985],[61,62,272,564,614,617,620,623,626,733,768,923,929,985],[62,272,614,620,626,985],[61,62,272,564,614,617,620,623,626,866,923,925,927,985],[61,62,272,564,614,617,620,623,626,866,923,985],[61,62,272,564,614,617,620,623,626,733,768,866,923,925,985],[62,985],[61,62,937,939,985],[61,62,919,922,934,935,985],[985,994],[985,1239,1243,1244],[985,1239,1242],[985,1242],[985,1243,1245,1247],[985,1239,1242,1243,1244,1245,1246],[985,1239],[985,1239,1240],[985,1240,1241],[985,1024],[957,985,992,996],[985,998,999,1001,1004,1006],[985,1000],[985,998],[985,998,1001],[985,1011,1012],[985,1009,1010,1011],[957,985,992],[956,957,985,992,1015],[985,1019],[985,1020],[985,1026,1029],[956,985,992],[959,984,985,992,1034,1035],[959,973,985,992],[941,985],[944,985],[945,950,976,985],[946,956,957,964,973,984,985],[946,947,956,964,985],[948,985],[949,950,957,965,985],[950,973,981,985],[951,953,956,964,985],[952,985],[953,954,985],[955,956,985],[956,985],[956,957,958,973,984,985],[956,957,958,973,985],[956,959,964,973,984,985],[956,957,959,960,964,973,981,984,985],[959,961,973,981,984,985],[941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991],[956,962,985],[963,984,985],[953,956,964,973,985],[965,985],[966,985],[944,967,985],[968,983,985,989],[969,985],[970,985],[956,971,985],[971,972,985,987],[945,956,973,974,975,985],[945,973,975,985],[973,974,985],[976,985],[977,985],[956,979,980,985],[979,980,985],[950,964,981,985],[982,985],[964,983,985],[945,959,970,984,985],[950,985],[973,985,986],[985,987],[985,988],[945,950,956,958,967,973,984,985,987,989],[973,985,990],[58,59,60,307,985],[985,1041,1080],[985,1041,1065,1080],[985,1080],[985,1041],[985,1041,1066,1080],[985,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079],[985,1066,1080],[985,1084],[985,992],[985,992,1082],[973,985,992],[956,959,961,973,981,984,985,990,992],[985,1088],[944,985,992,1022,1028],[985,1087],[985,1026],[985,1023,1027],[985,1025],[985,1111],[985,1112,1113,1114,1115,1116,1181,1182,1183,1184,1185,1186],[985,1111,1114,1180],[985,1111,1112,1113,1182],[985,1111,1112,1114,1115,1116,1181,1183],[985,1113],[985,1111,1113],[985,1111,1114,1116],[985,1111,1113,1114,1115],[985,1136],[985,1111,1136],[985,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149],[985,1111,1150],[985,1234,1235,1236,1237,1238,1249,1250,1251],[985,1111,1248],[985,1111,1208],[956,985,992,1111,1195,1196],[985,1195,1196,1197,1200],[985,1195],[985,1196],[985,1201,1207,1208,1209,1210,1211],[985,1111,1198,1199,1201],[985,1197,1199,1202],[985,1199,1203,1204,1205,1206],[985,1199,1208],[985,1111,1196,1197,1198],[985,1111,1199,1207],[985,1111,1187,1216,1218,1219],[985,1111,1218],[985,1218,1219,1220,1221],[985,1111,1187,1218],[985,1111,1187,1216,1219],[985,1111,1187,1222,1223],[985,1217,1224],[985,1111,1226],[985,1226,1227],[985,1229],[985,1111,1187],[985,1188,1189,1190,1191,1192,1193,1194,1213,1214,1215],[985,1111,1187,1188],[985,1111,1165,1191],[985,1111,1187,1212],[985,1111,1188],[985,1111,1187,1188,1189],[985,1231,1232],[985,1111,1255],[959,985,992,1087,1111,1180,1257],[985,1111,1187,1263],[985,1264,1265,1266],[985,1096,1097],[985,1097,1098],[985,1096],[985,1096,1097,1103],[985,1096,1097,1098,1108],[985,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110],[985,1105],[964,985,992,1095,1098,1099,1105,1106,1107],[985,1261,1262],[985,1261],[956,985,992,1111],[985,1111,1165],[985,1117,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179],[985,1111,1175,1177],[985,1132],[985,1131,1132,1133,1134,1151,1152,1164],[985,1111,1130],[985,1131],[985,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163],[985,1111,1131],[985,1212,1216,1222,1225,1228,1230,1252],[985,1111,1150,1165,1180,1187,1216,1222,1228,1230,1233,1253,1254,1256,1258,1259,1260,1267],[985,1180,1256,1258],[985,1111,1212,1216,1222,1225,1228,1230,1233,1252],[985,1111,1180,1187,1216,1225,1228,1230,1233,1253],[985,1129],[985,1118,1119,1129],[985,1120,1121],[985,1118,1119,1120,1122,1123,1127],[985,1119,1120],[985,1128],[985,1120],[985,1118,1119,1120,1123,1124,1125,1126],[945,985,1180,1187,1216,1268]],"referencedMap":[[66,1],[69,2],[71,3],[68,4],[70,5],[67,6],[72,4],[73,7],[65,8],[415,9],[416,9],[417,9],[418,10],[419,9],[420,10],[421,9],[422,9],[423,10],[424,10],[425,11],[426,12],[430,13],[427,12],[431,14],[432,15],[434,16],[433,17],[428,8],[429,18],[413,19],[414,20],[293,21],[292,22],[294,8],[295,23],[301,24],[300,25],[302,8],[303,26],[244,27],[304,2],[305,28],[313,29],[312,30],[314,31],[316,32],[315,2],[317,33],[319,34],[318,22],[320,35],[321,8],[323,36],[322,37],[328,38],[327,39],[330,40],[329,8],[377,41],[376,42],[379,43],[378,8],[381,44],[380,45],[383,46],[382,8],[385,47],[384,48],[387,49],[386,8],[389,50],[388,51],[391,52],[390,8],[393,53],[392,2],[394,54],[410,55],[409,56],[412,57],[411,8],[402,58],[401,59],[404,60],[403,8],[373,61],[372,62],[375,63],[374,8],[370,64],[369,2],[371,65],[444,66],[443,67],[446,68],[445,8],[451,69],[450,70],[453,71],[452,8],[458,72],[457,73],[460,74],[459,8],[465,75],[464,76],[467,77],[466,8],[503,78],[502,79],[505,80],[504,8],[479,81],[478,82],[481,83],[480,8],[472,84],[471,85],[469,86],[468,59],[470,8],[474,87],[473,8],[496,88],[495,89],[482,2],[498,90],[497,8],[492,91],[491,92],[494,93],[493,8],[507,94],[506,2],[508,95],[398,96],[397,97],[400,98],[399,8],[436,99],[435,100],[438,101],[437,8],[306,27],[527,102],[525,8],[526,103],[524,104],[523,105],[522,106],[395,8],[521,107],[396,108],[510,109],[509,2],[513,110],[512,111],[511,30],[299,112],[298,113],[297,114],[346,115],[345,116],[344,2],[515,117],[517,118],[516,119],[514,120],[326,121],[325,122],[324,123],[333,124],[339,125],[331,30],[338,126],[335,127],[334,128],[337,129],[336,30],[347,130],[350,131],[349,132],[348,133],[520,134],[519,135],[518,30],[343,136],[341,137],[340,138],[342,139],[408,140],[406,141],[405,142],[407,139],[439,143],[442,144],[441,145],[440,146],[449,147],[448,148],[447,2],[456,149],[455,150],[454,30],[463,151],[462,152],[461,2],[501,153],[500,154],[499,155],[477,156],[476,157],[475,30],[483,158],[486,159],[485,160],[484,161],[487,162],[490,163],[489,164],[488,165],[281,2],[296,8],[290,166],[279,166],[280,8],[283,167],[291,168],[284,2],[287,169],[289,2],[285,8],[282,2],[332,30],[288,170],[253,171],[250,8],[254,172],[256,173],[255,8],[257,174],[259,175],[258,8],[260,176],[267,177],[266,8],[268,178],[271,179],[270,8],[272,180],[274,181],[273,8],[275,182],[277,183],[276,8],[278,184],[534,185],[533,8],[535,186],[537,187],[536,8],[538,188],[540,189],[539,8],[541,190],[545,191],[544,8],[546,192],[548,193],[547,8],[549,194],[551,195],[550,8],[552,196],[554,197],[553,8],[555,198],[556,199],[557,8],[558,200],[560,201],[559,8],[561,202],[563,203],[562,8],[564,204],[264,205],[262,206],[263,8],[265,207],[261,8],[566,208],[565,8],[567,209],[569,210],[568,8],[570,211],[572,212],[571,8],[573,213],[575,214],[574,8],[576,215],[578,216],[577,8],[579,217],[585,218],[584,8],[586,219],[588,220],[587,8],[589,221],[593,222],[592,8],[594,223],[529,224],[528,8],[530,225],[596,226],[595,8],[597,227],[598,228],[600,229],[599,8],[601,230],[603,231],[602,232],[604,233],[605,234],[606,235],[613,236],[612,8],[614,237],[616,238],[615,8],[617,239],[619,240],[618,8],[620,241],[622,242],[621,8],[623,243],[625,244],[624,8],[626,245],[628,246],[627,8],[629,247],[633,248],[632,8],[634,249],[636,250],[635,8],[637,251],[542,252],[543,253],[642,254],[641,8],[643,255],[645,256],[646,257],[644,8],[648,258],[647,259],[650,260],[649,8],[651,261],[653,262],[652,8],[654,263],[656,264],[655,8],[657,265],[659,266],[658,8],[660,267],[885,268],[886,269],[918,270],[917,8],[919,271],[665,252],[666,272],[667,273],[668,274],[670,275],[669,8],[671,276],[673,277],[672,8],[674,278],[676,279],[675,8],[677,280],[679,281],[678,8],[680,282],[682,283],[681,8],[683,284],[685,285],[686,286],[684,8],[688,287],[689,288],[687,8],[639,289],[640,290],[638,8],[691,291],[692,292],[690,8],[694,293],[695,294],[693,8],[697,295],[698,296],[696,8],[700,297],[701,298],[699,8],[703,299],[704,300],[702,8],[706,301],[707,302],[705,8],[709,303],[710,304],[708,8],[712,305],[713,306],[711,8],[715,307],[716,308],[714,8],[718,309],[719,310],[717,8],[721,311],[722,312],[720,8],[729,313],[730,314],[728,8],[732,315],[733,316],[731,8],[726,317],[727,318],[735,319],[736,320],[734,8],[610,321],[611,322],[609,8],[739,323],[737,324],[740,325],[738,8],[741,326],[743,327],[744,328],[742,8],[225,329],[747,330],[748,331],[746,8],[750,332],[751,333],[749,8],[252,334],[269,335],[251,8],[724,336],[725,337],[723,8],[531,338],[532,339],[608,340],[753,341],[754,342],[752,8],[755,343],[756,2],[758,344],[757,345],[760,346],[761,347],[759,8],[763,348],[764,349],[762,8],[767,350],[765,351],[768,352],[766,8],[770,353],[771,354],[769,8],[630,252],[631,355],[775,356],[773,357],[772,30],[776,358],[774,8],[781,359],[782,360],[780,8],[778,361],[779,362],[777,8],[785,363],[786,364],[784,8],[791,365],[792,366],[790,8],[794,367],[795,368],[793,8],[796,369],[798,370],[797,232],[800,371],[801,2],[802,372],[799,8],[804,373],[805,374],[803,8],[807,375],[808,376],[806,8],[810,377],[811,378],[809,8],[813,379],[814,380],[812,8],[816,381],[817,382],[815,8],[819,383],[820,2],[821,384],[818,8],[227,385],[228,386],[226,8],[822,387],[823,388],[825,389],[826,390],[824,8],[828,391],[829,392],[827,8],[859,393],[860,394],[858,8],[831,395],[832,396],[830,8],[834,397],[835,398],[833,8],[837,399],[838,400],[836,8],[840,401],[841,402],[839,8],[843,403],[844,404],[842,8],[846,405],[847,406],[845,8],[850,407],[848,408],[851,409],[849,8],[853,410],[854,411],[852,8],[856,412],[857,413],[855,8],[862,414],[863,415],[861,8],[865,416],[866,417],[864,8],[867,418],[869,419],[870,420],[868,8],[872,421],[873,422],[871,8],[875,423],[876,424],[874,8],[788,425],[789,426],[787,8],[582,427],[583,428],[581,8],[662,429],[661,430],[663,431],[664,432],[889,433],[881,252],[882,434],[146,8],[147,8],[148,8],[149,8],[150,8],[151,8],[152,8],[153,8],[154,8],[155,8],[166,435],[156,8],[157,8],[158,8],[159,8],[160,8],[161,8],[162,8],[163,8],[164,8],[165,8],[607,8],[887,27],[888,27],[890,436],[591,437],[590,8],[144,8],[912,438],[906,232],[900,439],[898,440],[145,441],[891,442],[901,8],[899,443],[893,8],[580,444],[907,445],[915,8],[911,446],[913,8],[143,8],[916,447],[908,8],[896,448],[895,449],[902,450],[892,8],[914,8],[905,451],[903,452],[904,453],[897,454],[909,8],[910,8],[894,8],[783,455],[249,456],[884,457],[883,458],[878,459],[877,8],[745,2],[880,460],[879,8],[223,27],[224,27],[229,461],[230,27],[231,27],[245,462],[232,27],[233,27],[234,27],[235,27],[236,27],[239,27],[240,27],[237,27],[241,27],[242,27],[238,27],[243,27],[98,463],[99,464],[97,8],[102,465],[101,466],[100,463],[76,467],[77,468],[74,2],[75,469],[78,470],[64,8],[93,471],[94,8],[95,472],[129,473],[127,474],[126,8],[128,475],[130,476],[103,477],[104,478],[138,479],[137,480],[139,481],[141,482],[140,8],[115,483],[116,484],[132,485],[131,480],[133,486],[134,8],[136,487],[135,488],[96,489],[114,8],[106,490],[107,491],[79,492],[81,8],[91,493],[92,494],[80,8],[119,495],[121,496],[123,8],[124,8],[117,2],[122,497],[120,8],[118,8],[142,498],[82,8],[125,8],[105,499],[88,500],[84,501],[85,502],[83,502],[89,503],[87,504],[90,505],[86,506],[108,507],[112,508],[110,8],[111,509],[109,8],[113,8],[63,2],[220,8],[221,510],[177,8],[178,511],[182,8],[183,512],[168,513],[169,514],[214,8],[215,515],[184,8],[185,8],[186,516],[170,8],[187,8],[171,513],[172,513],[173,513],[174,517],[175,8],[216,8],[217,518],[218,8],[219,519],[176,2],[207,8],[210,2],[222,520],[212,513],[188,8],[167,8],[190,521],[189,8],[192,522],[191,8],[180,523],[179,8],[181,513],[193,2],[213,8],[208,8],[194,2],[199,8],[201,524],[200,8],[196,525],[195,2],[203,526],[202,8],[205,527],[204,2],[198,528],[197,8],[206,2],[209,8],[211,2],[368,529],[364,530],[351,8],[367,531],[360,532],[358,533],[357,533],[356,532],[353,533],[354,532],[362,534],[355,533],[352,532],[359,533],[365,535],[366,536],[361,537],[363,533],[59,8],[939,538],[993,538],[938,539],[248,538],[246,8],[247,540],[57,8],[61,541],[62,2],[60,8],[927,8],[920,8],[286,8],[58,8],[994,542],[937,543],[925,544],[922,545],[923,544],[932,546],[933,547],[934,548],[931,549],[930,550],[935,551],[928,552],[924,553],[926,554],[921,555],[940,556],[929,555],[936,557],[995,558],[1245,559],[1244,560],[1243,561],[1248,562],[1247,563],[1240,564],[1241,565],[1242,566],[1239,8],[1246,8],[1022,8],[1025,567],[1024,8],[997,568],[996,8],[1008,569],[1000,8],[1001,570],[1007,8],[999,571],[998,8],[1004,572],[1002,570],[1003,8],[1006,571],[1005,8],[1013,573],[1009,8],[1012,574],[1011,8],[1014,575],[1016,576],[1017,575],[1018,8],[1019,8],[1020,577],[1021,578],[1030,579],[1010,8],[1031,8],[1032,580],[1015,8],[1033,8],[1035,8],[1036,581],[1034,582],[941,583],[942,583],[944,584],[945,585],[946,586],[947,587],[948,588],[949,589],[950,590],[951,591],[952,592],[953,593],[954,593],[955,594],[956,595],[957,596],[958,597],[943,8],[991,8],[959,598],[960,599],[961,600],[992,601],[962,602],[963,603],[964,604],[965,605],[966,606],[967,607],[968,608],[969,609],[970,610],[971,611],[972,612],[973,613],[975,614],[974,615],[976,616],[977,617],[978,8],[979,618],[980,619],[981,620],[982,621],[983,622],[984,623],[985,624],[986,625],[987,626],[988,627],[989,628],[990,629],[1037,8],[1038,8],[309,8],[307,8],[311,630],[1261,30],[1039,582],[1040,8],[310,8],[1065,631],[1066,632],[1041,633],[1044,633],[1063,631],[1064,631],[1054,631],[1053,634],[1051,631],[1046,631],[1059,631],[1057,631],[1061,631],[1045,631],[1058,631],[1062,631],[1047,631],[1048,631],[1060,631],[1042,631],[1049,631],[1050,631],[1052,631],[1056,631],[1067,635],[1055,631],[1043,631],[1080,636],[1079,8],[1074,635],[1076,637],[1075,635],[1068,635],[1069,635],[1071,635],[1073,635],[1077,637],[1078,637],[1070,637],[1072,637],[1081,8],[1085,638],[1084,639],[1083,640],[1082,641],[1086,8],[1087,642],[1088,8],[1089,643],[1090,8],[1269,8],[1023,8],[308,8],[1029,644],[1257,645],[1027,646],[1028,647],[1026,648],[11,8],[12,8],[14,8],[13,8],[2,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[3,8],[4,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[9,8],[51,8],[52,8],[53,8],[54,8],[55,8],[1,8],[10,8],[56,8],[1185,649],[1187,650],[1112,649],[1184,649],[1181,651],[1183,652],[1182,653],[1113,580],[1186,654],[1114,655],[1115,656],[1116,657],[1135,8],[1137,658],[1138,659],[1139,659],[1147,658],[1140,658],[1141,658],[1142,658],[1146,659],[1149,8],[1148,659],[1143,658],[1144,659],[1145,658],[1150,660],[1136,649],[1234,649],[1235,649],[1236,649],[1237,649],[1238,649],[1250,661],[1251,649],[1252,662],[1249,663],[1210,664],[1197,665],[1195,8],[1201,666],[1196,667],[1200,668],[1212,669],[1211,8],[1198,8],[1202,670],[1203,671],[1204,671],[1207,672],[1205,671],[1206,673],[1199,674],[1208,675],[1209,664],[1220,676],[1221,677],[1222,678],[1219,679],[1218,680],[1223,8],[1217,8],[1224,681],[1225,682],[1227,683],[1228,684],[1226,8],[1230,685],[1229,686],[1216,687],[1193,688],[1191,8],[1188,661],[1214,688],[1194,689],[1213,690],[1215,686],[1192,691],[1190,692],[1189,686],[1233,693],[1231,686],[1232,686],[1256,694],[1255,8],[1258,695],[1264,696],[1267,697],[1265,686],[1266,686],[1098,698],[1101,698],[1099,699],[1100,700],[1102,700],[1095,8],[1104,701],[1109,702],[1097,700],[1111,703],[1105,8],[1096,8],[1103,700],[1106,704],[1108,705],[1110,698],[1107,8],[1263,706],[1262,707],[1175,708],[1117,649],[1167,709],[1168,649],[1180,710],[1173,649],[1171,8],[1172,639],[1169,8],[1178,711],[1170,649],[1179,8],[1176,8],[1166,709],[1174,649],[1177,708],[1152,8],[1133,712],[1151,661],[1165,713],[1131,714],[1134,715],[1153,715],[1154,8],[1155,715],[1156,715],[1157,715],[1158,8],[1159,649],[1164,716],[1160,715],[1163,8],[1161,715],[1162,8],[1132,717],[1259,718],[1268,719],[1260,720],[1253,721],[1254,722],[1130,723],[1120,724],[1122,725],[1128,726],[1124,8],[1125,8],[1123,727],[1126,723],[1118,8],[1119,8],[1129,728],[1121,729],[1127,730],[1091,8],[1092,8],[1093,8],[1094,8],[1270,731]],"exportedModulesMap":[[66,1],[69,2],[71,3],[68,4],[70,5],[67,6],[72,4],[73,7],[65,8],[415,9],[416,9],[417,9],[418,10],[419,9],[420,10],[421,9],[422,9],[423,10],[424,10],[425,11],[426,12],[430,13],[427,12],[431,14],[432,15],[434,16],[433,17],[428,8],[429,18],[413,19],[414,20],[293,21],[292,22],[294,8],[295,23],[301,24],[300,25],[302,8],[303,26],[244,27],[304,2],[305,28],[313,29],[312,30],[314,31],[316,32],[315,2],[317,33],[319,34],[318,22],[320,35],[321,8],[323,36],[322,37],[328,38],[327,39],[330,40],[329,8],[377,41],[376,42],[379,43],[378,8],[381,44],[380,45],[383,46],[382,8],[385,47],[384,48],[387,49],[386,8],[389,50],[388,51],[391,52],[390,8],[393,53],[392,2],[394,54],[410,55],[409,56],[412,57],[411,8],[402,58],[401,59],[404,60],[403,8],[373,61],[372,62],[375,63],[374,8],[370,64],[369,2],[371,65],[444,66],[443,67],[446,68],[445,8],[451,69],[450,70],[453,71],[452,8],[458,72],[457,73],[460,74],[459,8],[465,75],[464,76],[467,77],[466,8],[503,78],[502,79],[505,80],[504,8],[479,81],[478,82],[481,83],[480,8],[472,84],[471,85],[469,86],[468,59],[470,8],[474,87],[473,8],[496,88],[495,89],[482,2],[498,90],[497,8],[492,91],[491,92],[494,93],[493,8],[507,94],[506,2],[508,95],[398,96],[397,97],[400,98],[399,8],[436,99],[435,100],[438,101],[437,8],[306,27],[527,102],[525,8],[526,103],[524,104],[523,105],[522,106],[395,8],[521,107],[396,108],[510,109],[509,2],[513,110],[512,111],[511,30],[299,112],[298,113],[297,114],[346,115],[345,116],[344,2],[515,117],[517,118],[516,119],[514,120],[326,121],[325,122],[324,123],[333,124],[339,125],[331,30],[338,126],[335,127],[334,128],[337,129],[336,30],[347,130],[350,131],[349,132],[348,133],[520,134],[519,135],[518,30],[343,136],[341,137],[340,138],[342,139],[408,140],[406,141],[405,142],[407,139],[439,143],[442,144],[441,145],[440,146],[449,147],[448,148],[447,2],[456,149],[455,150],[454,30],[463,151],[462,152],[461,2],[501,153],[500,154],[499,155],[477,156],[476,157],[475,30],[483,158],[486,159],[485,160],[484,161],[487,162],[490,163],[489,164],[488,165],[281,2],[296,8],[290,166],[279,166],[280,8],[283,167],[291,168],[284,2],[287,169],[289,2],[285,8],[282,2],[332,30],[288,170],[253,171],[250,8],[254,172],[256,173],[255,8],[257,174],[259,175],[258,8],[260,176],[267,177],[266,8],[268,178],[271,179],[270,8],[272,180],[274,181],[273,8],[275,182],[277,183],[276,8],[278,184],[534,185],[533,8],[535,186],[537,187],[536,8],[538,188],[540,189],[539,8],[541,190],[545,191],[544,8],[546,192],[548,193],[547,8],[549,194],[551,195],[550,8],[552,196],[554,197],[553,8],[555,198],[556,199],[557,8],[558,200],[560,201],[559,8],[561,202],[563,203],[562,8],[564,204],[264,205],[262,206],[263,8],[265,207],[261,8],[566,208],[565,8],[567,209],[569,210],[568,8],[570,211],[572,212],[571,8],[573,213],[575,214],[574,8],[576,215],[578,216],[577,8],[579,217],[585,218],[584,8],[586,219],[588,220],[587,8],[589,221],[593,222],[592,8],[594,223],[529,224],[528,8],[530,225],[596,226],[595,8],[597,227],[598,228],[600,229],[599,8],[601,230],[603,231],[602,232],[604,233],[605,234],[606,235],[613,236],[612,8],[614,237],[616,238],[615,8],[617,239],[619,240],[618,8],[620,241],[622,242],[621,8],[623,243],[625,244],[624,8],[626,245],[628,246],[627,8],[629,247],[633,248],[632,8],[634,249],[636,250],[635,8],[637,251],[542,252],[543,253],[642,254],[641,8],[643,255],[645,256],[646,257],[644,8],[648,258],[647,259],[650,260],[649,8],[651,261],[653,262],[652,8],[654,263],[656,264],[655,8],[657,265],[659,266],[658,8],[660,267],[885,268],[886,269],[918,270],[917,8],[919,271],[665,252],[666,272],[667,273],[668,274],[670,275],[669,8],[671,276],[673,277],[672,8],[674,278],[676,279],[675,8],[677,280],[679,281],[678,8],[680,282],[682,283],[681,8],[683,284],[685,285],[686,286],[684,8],[688,287],[689,288],[687,8],[639,289],[640,290],[638,8],[691,291],[692,292],[690,8],[694,293],[695,294],[693,8],[697,295],[698,296],[696,8],[700,297],[701,298],[699,8],[703,299],[704,300],[702,8],[706,301],[707,302],[705,8],[709,303],[710,304],[708,8],[712,305],[713,306],[711,8],[715,307],[716,308],[714,8],[718,309],[719,310],[717,8],[721,311],[722,312],[720,8],[729,313],[730,314],[728,8],[732,315],[733,316],[731,8],[726,317],[727,318],[735,319],[736,320],[734,8],[610,321],[611,322],[609,8],[739,323],[737,324],[740,325],[738,8],[741,326],[743,327],[744,328],[742,8],[225,329],[747,330],[748,331],[746,8],[750,332],[751,333],[749,8],[252,334],[269,335],[251,8],[724,336],[725,337],[723,8],[531,338],[532,339],[608,340],[753,341],[754,342],[752,8],[755,343],[756,2],[758,344],[757,345],[760,346],[761,347],[759,8],[763,348],[764,349],[762,8],[767,350],[765,351],[768,352],[766,8],[770,353],[771,354],[769,8],[630,252],[631,355],[775,356],[773,357],[772,30],[776,358],[774,8],[781,359],[782,360],[780,8],[778,361],[779,362],[777,8],[785,363],[786,364],[784,8],[791,365],[792,366],[790,8],[794,367],[795,368],[793,8],[796,369],[798,370],[797,232],[800,371],[801,2],[802,372],[799,8],[804,373],[805,374],[803,8],[807,375],[808,376],[806,8],[810,377],[811,378],[809,8],[813,379],[814,380],[812,8],[816,381],[817,382],[815,8],[819,383],[820,2],[821,384],[818,8],[227,385],[228,386],[226,8],[822,387],[823,388],[825,389],[826,390],[824,8],[828,391],[829,392],[827,8],[859,393],[860,394],[858,8],[831,395],[832,396],[830,8],[834,397],[835,398],[833,8],[837,399],[838,400],[836,8],[840,401],[841,402],[839,8],[843,403],[844,404],[842,8],[846,405],[847,406],[845,8],[850,407],[848,408],[851,409],[849,8],[853,410],[854,411],[852,8],[856,412],[857,413],[855,8],[862,414],[863,415],[861,8],[865,416],[866,417],[864,8],[867,418],[869,419],[870,420],[868,8],[872,421],[873,422],[871,8],[875,423],[876,424],[874,8],[788,425],[789,426],[787,8],[582,427],[583,428],[581,8],[662,429],[661,430],[663,431],[664,432],[889,433],[881,252],[882,434],[146,8],[147,8],[148,8],[149,8],[150,8],[151,8],[152,8],[153,8],[154,8],[155,8],[166,435],[156,8],[157,8],[158,8],[159,8],[160,8],[161,8],[162,8],[163,8],[164,8],[165,8],[607,8],[887,27],[888,27],[890,436],[591,437],[590,8],[144,8],[912,438],[906,232],[900,439],[898,440],[145,441],[891,442],[901,8],[899,443],[893,8],[580,444],[907,445],[915,8],[911,446],[913,8],[143,8],[916,447],[908,8],[896,448],[895,449],[902,450],[892,8],[914,8],[905,451],[903,452],[904,453],[897,454],[909,8],[910,8],[894,8],[783,455],[249,456],[884,457],[883,458],[878,459],[877,8],[745,2],[880,460],[879,8],[223,27],[224,27],[229,461],[230,27],[231,27],[245,462],[232,27],[233,27],[234,27],[235,27],[236,27],[239,27],[240,27],[237,27],[241,27],[242,27],[238,27],[243,27],[98,463],[99,464],[97,8],[102,465],[101,466],[100,463],[76,467],[77,468],[74,2],[75,469],[78,470],[64,8],[93,471],[94,8],[95,472],[129,473],[127,474],[126,8],[128,475],[130,476],[103,477],[104,478],[138,479],[137,480],[139,481],[141,482],[140,8],[115,483],[116,484],[132,485],[131,480],[133,486],[134,8],[136,487],[135,488],[96,489],[114,8],[106,490],[107,491],[79,492],[81,8],[91,493],[92,494],[80,8],[119,495],[121,496],[123,8],[124,8],[117,2],[122,497],[120,8],[118,8],[142,498],[82,8],[125,8],[105,499],[88,500],[84,501],[85,502],[83,502],[89,503],[87,504],[90,505],[86,506],[108,507],[112,508],[110,8],[111,509],[109,8],[113,8],[63,2],[220,8],[221,510],[177,8],[178,511],[182,8],[183,512],[168,513],[169,514],[214,8],[215,515],[184,8],[185,8],[186,516],[170,8],[187,8],[171,513],[172,513],[173,513],[174,517],[175,8],[216,8],[217,518],[218,8],[219,519],[176,2],[207,8],[210,2],[222,520],[212,513],[188,8],[167,8],[190,521],[189,8],[192,522],[191,8],[180,523],[179,8],[181,513],[193,2],[213,8],[208,8],[194,2],[199,8],[201,524],[200,8],[196,525],[195,2],[203,526],[202,8],[205,527],[204,2],[198,528],[197,8],[206,2],[209,8],[211,2],[368,529],[364,530],[351,8],[367,531],[360,532],[358,533],[357,533],[356,532],[353,533],[354,532],[362,534],[355,533],[352,532],[359,533],[365,535],[366,536],[361,537],[363,533],[59,8],[939,538],[993,538],[938,539],[248,538],[246,8],[247,540],[57,8],[61,541],[62,2],[60,8],[927,8],[920,8],[286,8],[58,8],[994,542],[937,543],[925,544],[922,545],[923,544],[932,546],[933,547],[934,548],[931,549],[930,550],[935,551],[928,552],[924,553],[926,554],[921,555],[940,556],[929,555],[936,557],[995,558],[1245,559],[1244,560],[1243,561],[1248,562],[1247,563],[1240,564],[1241,565],[1242,566],[1239,8],[1246,8],[1022,8],[1025,567],[1024,8],[997,568],[996,8],[1008,569],[1000,8],[1001,570],[1007,8],[999,571],[998,8],[1004,572],[1002,570],[1003,8],[1006,571],[1005,8],[1013,573],[1009,8],[1012,574],[1011,8],[1014,575],[1016,576],[1017,575],[1018,8],[1019,8],[1020,577],[1021,578],[1030,579],[1010,8],[1031,8],[1032,580],[1015,8],[1033,8],[1035,8],[1036,581],[1034,582],[941,583],[942,583],[944,584],[945,585],[946,586],[947,587],[948,588],[949,589],[950,590],[951,591],[952,592],[953,593],[954,593],[955,594],[956,595],[957,596],[958,597],[943,8],[991,8],[959,598],[960,599],[961,600],[992,601],[962,602],[963,603],[964,604],[965,605],[966,606],[967,607],[968,608],[969,609],[970,610],[971,611],[972,612],[973,613],[975,614],[974,615],[976,616],[977,617],[978,8],[979,618],[980,619],[981,620],[982,621],[983,622],[984,623],[985,624],[986,625],[987,626],[988,627],[989,628],[990,629],[1037,8],[1038,8],[309,8],[307,8],[311,630],[1261,30],[1039,582],[1040,8],[310,8],[1065,631],[1066,632],[1041,633],[1044,633],[1063,631],[1064,631],[1054,631],[1053,634],[1051,631],[1046,631],[1059,631],[1057,631],[1061,631],[1045,631],[1058,631],[1062,631],[1047,631],[1048,631],[1060,631],[1042,631],[1049,631],[1050,631],[1052,631],[1056,631],[1067,635],[1055,631],[1043,631],[1080,636],[1079,8],[1074,635],[1076,637],[1075,635],[1068,635],[1069,635],[1071,635],[1073,635],[1077,637],[1078,637],[1070,637],[1072,637],[1081,8],[1085,638],[1084,639],[1083,640],[1082,641],[1086,8],[1087,642],[1088,8],[1089,643],[1090,8],[1269,8],[1023,8],[308,8],[1029,644],[1257,645],[1027,646],[1028,647],[1026,648],[11,8],[12,8],[14,8],[13,8],[2,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[3,8],[4,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[9,8],[51,8],[52,8],[53,8],[54,8],[55,8],[1,8],[10,8],[56,8],[1185,649],[1187,650],[1112,649],[1184,649],[1181,651],[1183,652],[1182,653],[1113,580],[1186,654],[1114,655],[1115,656],[1116,657],[1135,8],[1137,658],[1138,659],[1139,659],[1147,658],[1140,658],[1141,658],[1142,658],[1146,659],[1149,8],[1148,659],[1143,658],[1144,659],[1145,658],[1150,660],[1136,649],[1234,649],[1235,649],[1236,649],[1237,649],[1238,649],[1250,661],[1251,649],[1252,662],[1249,663],[1210,664],[1197,665],[1195,8],[1201,666],[1196,667],[1200,668],[1212,669],[1211,8],[1198,8],[1202,670],[1203,671],[1204,671],[1207,672],[1205,671],[1206,673],[1199,674],[1208,675],[1209,664],[1220,676],[1221,677],[1222,678],[1219,679],[1218,680],[1223,8],[1217,8],[1224,681],[1225,682],[1227,683],[1228,684],[1226,8],[1230,685],[1229,686],[1216,687],[1193,688],[1191,8],[1188,661],[1214,688],[1194,689],[1213,690],[1215,686],[1192,691],[1190,692],[1189,686],[1233,693],[1231,686],[1232,686],[1256,694],[1255,8],[1258,695],[1264,696],[1267,697],[1265,686],[1266,686],[1098,698],[1101,698],[1099,699],[1100,700],[1102,700],[1095,8],[1104,701],[1109,702],[1097,700],[1111,703],[1105,8],[1096,8],[1103,700],[1106,704],[1108,705],[1110,698],[1107,8],[1263,706],[1262,707],[1175,708],[1117,649],[1167,709],[1168,649],[1180,710],[1173,649],[1171,8],[1172,639],[1169,8],[1178,711],[1170,649],[1179,8],[1176,8],[1166,709],[1174,649],[1177,708],[1152,8],[1133,712],[1151,661],[1165,713],[1131,714],[1134,715],[1153,715],[1154,8],[1155,715],[1156,715],[1157,715],[1158,8],[1159,649],[1164,716],[1160,715],[1163,8],[1161,715],[1162,8],[1132,717],[1259,718],[1268,719],[1260,720],[1253,721],[1254,722],[1130,723],[1120,724],[1122,725],[1128,726],[1124,8],[1125,8],[1123,727],[1126,723],[1118,8],[1119,8],[1129,728],[1121,729],[1127,730],[1091,8],[1092,8],[1093,8],[1094,8],[1270,731]],"semanticDiagnosticsPerFile":[66,69,71,68,70,67,72,73,65,415,416,417,418,419,420,421,422,423,424,425,426,430,427,431,432,434,433,428,429,413,414,293,292,294,295,301,300,302,303,244,304,305,313,312,314,316,315,317,319,318,320,321,323,322,328,327,330,329,377,376,379,378,381,380,383,382,385,384,387,386,389,388,391,390,393,392,394,410,409,412,411,402,401,404,403,373,372,375,374,370,369,371,444,443,446,445,451,450,453,452,458,457,460,459,465,464,467,466,503,502,505,504,479,478,481,480,472,471,469,468,470,474,473,496,495,482,498,497,492,491,494,493,507,506,508,398,397,400,399,436,435,438,437,306,527,525,526,524,523,522,395,521,396,510,509,513,512,511,299,298,297,346,345,344,515,517,516,514,326,325,324,333,339,331,338,335,334,337,336,347,350,349,348,520,519,518,343,341,340,342,408,406,405,407,439,442,441,440,449,448,447,456,455,454,463,462,461,501,500,499,477,476,475,483,486,485,484,487,490,489,488,281,296,290,279,280,283,291,284,287,289,285,282,332,288,253,250,254,256,255,257,259,258,260,267,266,268,271,270,272,274,273,275,277,276,278,534,533,535,537,536,538,540,539,541,545,544,546,548,547,549,551,550,552,554,553,555,556,557,558,560,559,561,563,562,564,264,262,263,265,261,566,565,567,569,568,570,572,571,573,575,574,576,578,577,579,585,584,586,588,587,589,593,592,594,529,528,530,596,595,597,598,600,599,601,603,602,604,605,606,613,612,614,616,615,617,619,618,620,622,621,623,625,624,626,628,627,629,633,632,634,636,635,637,542,543,642,641,643,645,646,644,648,647,650,649,651,653,652,654,656,655,657,659,658,660,885,886,918,917,919,665,666,667,668,670,669,671,673,672,674,676,675,677,679,678,680,682,681,683,685,686,684,688,689,687,639,640,638,691,692,690,694,695,693,697,698,696,700,701,699,703,704,702,706,707,705,709,710,708,712,713,711,715,716,714,718,719,717,721,722,720,729,730,728,732,733,731,726,727,735,736,734,610,611,609,739,737,740,738,741,743,744,742,225,747,748,746,750,751,749,252,269,251,724,725,723,531,532,608,753,754,752,755,756,758,757,760,761,759,763,764,762,767,765,768,766,770,771,769,630,631,775,773,772,776,774,781,782,780,778,779,777,785,786,784,791,792,790,794,795,793,796,798,797,800,801,802,799,804,805,803,807,808,806,810,811,809,813,814,812,816,817,815,819,820,821,818,227,228,226,822,823,825,826,824,828,829,827,859,860,858,831,832,830,834,835,833,837,838,836,840,841,839,843,844,842,846,847,845,850,848,851,849,853,854,852,856,857,855,862,863,861,865,866,864,867,869,870,868,872,873,871,875,876,874,788,789,787,582,583,581,662,661,663,664,889,881,882,146,147,148,149,150,151,152,153,154,155,166,156,157,158,159,160,161,162,163,164,165,607,887,888,890,591,590,144,912,906,900,898,145,891,901,899,893,580,907,915,911,913,143,916,908,896,895,902,892,914,905,903,904,897,909,910,894,783,249,884,883,878,877,745,880,879,223,224,229,230,231,245,232,233,234,235,236,239,240,237,241,242,238,243,98,99,97,102,101,100,76,77,74,75,78,64,93,94,95,129,127,126,128,130,103,104,138,137,139,141,140,115,116,132,131,133,134,136,135,96,114,106,107,79,81,91,92,80,119,121,123,124,117,122,120,118,142,82,125,105,88,84,85,83,89,87,90,86,108,112,110,111,109,113,63,220,221,177,178,182,183,168,169,214,215,184,185,186,170,187,171,172,173,174,175,216,217,218,219,176,207,210,222,212,188,167,190,189,192,191,180,179,181,193,213,208,194,199,201,200,196,195,203,202,205,204,198,197,206,209,211,368,364,351,367,360,358,357,356,353,354,362,355,352,359,365,366,361,363,59,939,993,938,248,246,247,57,61,62,60,927,920,286,58,994,937,925,922,923,932,933,934,931,930,935,928,924,926,921,940,929,936,995,1245,1244,1243,1248,1247,1240,1241,1242,1239,1246,1022,1025,1024,997,996,1008,1000,1001,1007,999,998,1004,1002,1003,1006,1005,1013,1009,1012,1011,1014,1016,1017,1018,1019,1020,1021,1030,1010,1031,1032,1015,1033,1035,1036,1034,941,942,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,943,991,959,960,961,992,962,963,964,965,966,967,968,969,970,971,972,973,975,974,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,1037,1038,309,307,311,1261,1039,1040,310,1065,1066,1041,1044,1063,1064,1054,1053,1051,1046,1059,1057,1061,1045,1058,1062,1047,1048,1060,1042,1049,1050,1052,1056,1067,1055,1043,1080,1079,1074,1076,1075,1068,1069,1071,1073,1077,1078,1070,1072,1081,1085,1084,1083,1082,1086,1087,1088,1089,1090,1269,1023,308,1029,1257,1027,1028,1026,11,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,54,55,1,10,56,1185,1187,1112,1184,1181,1183,1182,1113,1186,1114,1115,1116,1135,1137,1138,1139,1147,1140,1141,1142,1146,1149,1148,1143,1144,1145,1150,1136,1234,1235,1236,1237,1238,1250,1251,1252,1249,1210,1197,1195,1201,1196,1200,1212,1211,1198,1202,1203,1204,1207,1205,1206,1199,1208,1209,1220,1221,1222,1219,1218,1223,1217,1224,1225,1227,1228,1226,1230,1229,1216,1193,1191,1188,1214,1194,1213,1215,1192,1190,1189,1233,1231,1232,1256,1255,1258,1264,1267,1265,1266,1098,1101,1099,1100,1102,1095,1104,1109,1097,1111,1105,1096,1103,1106,1108,1110,1107,1263,1262,1175,1117,1167,1168,1180,1173,1171,1172,1169,1178,1170,1179,1176,1166,1174,1177,1152,1133,1151,1165,1131,1134,1153,1154,1155,1156,1157,1158,1159,1164,1160,1163,1161,1162,1132,1259,1268,1260,1253,1254,1130,1120,1122,1128,1124,1125,1123,1126,1118,1119,1129,1121,1127,1091,1092,1093,1094,1270],"affectedFilesPendingEmit":[[66,1],[69,1],[71,1],[68,1],[70,1],[67,1],[72,1],[73,1],[65,1],[415,1],[416,1],[417,1],[418,1],[419,1],[420,1],[421,1],[422,1],[423,1],[424,1],[425,1],[426,1],[430,1],[427,1],[431,1],[432,1],[434,1],[433,1],[428,1],[429,1],[413,1],[414,1],[293,1],[292,1],[294,1],[295,1],[301,1],[300,1],[302,1],[303,1],[244,1],[304,1],[305,1],[313,1],[312,1],[314,1],[316,1],[315,1],[317,1],[319,1],[318,1],[320,1],[321,1],[323,1],[322,1],[328,1],[327,1],[330,1],[329,1],[377,1],[376,1],[379,1],[378,1],[381,1],[380,1],[383,1],[382,1],[385,1],[384,1],[387,1],[386,1],[389,1],[388,1],[391,1],[390,1],[393,1],[392,1],[394,1],[410,1],[409,1],[412,1],[411,1],[402,1],[401,1],[404,1],[403,1],[373,1],[372,1],[375,1],[374,1],[370,1],[369,1],[371,1],[444,1],[443,1],[446,1],[445,1],[451,1],[450,1],[453,1],[452,1],[458,1],[457,1],[460,1],[459,1],[465,1],[464,1],[467,1],[466,1],[503,1],[502,1],[505,1],[504,1],[479,1],[478,1],[481,1],[480,1],[472,1],[471,1],[469,1],[468,1],[470,1],[474,1],[473,1],[496,1],[495,1],[482,1],[498,1],[497,1],[492,1],[491,1],[494,1],[493,1],[507,1],[506,1],[508,1],[398,1],[397,1],[400,1],[399,1],[436,1],[435,1],[438,1],[437,1],[306,1],[527,1],[525,1],[526,1],[524,1],[523,1],[522,1],[395,1],[521,1],[396,1],[510,1],[509,1],[513,1],[512,1],[511,1],[299,1],[298,1],[297,1],[346,1],[345,1],[344,1],[515,1],[517,1],[516,1],[514,1],[326,1],[325,1],[324,1],[333,1],[339,1],[331,1],[338,1],[335,1],[334,1],[337,1],[336,1],[347,1],[350,1],[349,1],[348,1],[520,1],[519,1],[518,1],[343,1],[341,1],[340,1],[342,1],[408,1],[406,1],[405,1],[407,1],[439,1],[442,1],[441,1],[440,1],[449,1],[448,1],[447,1],[456,1],[455,1],[454,1],[463,1],[462,1],[461,1],[501,1],[500,1],[499,1],[477,1],[476,1],[475,1],[483,1],[486,1],[485,1],[484,1],[487,1],[490,1],[489,1],[488,1],[281,1],[296,1],[290,1],[279,1],[280,1],[283,1],[291,1],[284,1],[287,1],[289,1],[285,1],[282,1],[332,1],[288,1],[253,1],[250,1],[254,1],[256,1],[255,1],[257,1],[259,1],[258,1],[260,1],[267,1],[266,1],[268,1],[271,1],[270,1],[272,1],[274,1],[273,1],[275,1],[277,1],[276,1],[278,1],[534,1],[533,1],[535,1],[537,1],[536,1],[538,1],[540,1],[539,1],[541,1],[545,1],[544,1],[546,1],[548,1],[547,1],[549,1],[551,1],[550,1],[552,1],[554,1],[553,1],[555,1],[556,1],[557,1],[558,1],[560,1],[559,1],[561,1],[563,1],[562,1],[564,1],[264,1],[262,1],[263,1],[265,1],[261,1],[566,1],[565,1],[567,1],[569,1],[568,1],[570,1],[572,1],[571,1],[573,1],[575,1],[574,1],[576,1],[578,1],[577,1],[579,1],[585,1],[584,1],[586,1],[588,1],[587,1],[589,1],[593,1],[592,1],[594,1],[529,1],[528,1],[530,1],[596,1],[595,1],[597,1],[598,1],[600,1],[599,1],[601,1],[603,1],[602,1],[604,1],[605,1],[606,1],[613,1],[612,1],[614,1],[616,1],[615,1],[617,1],[619,1],[618,1],[620,1],[622,1],[621,1],[623,1],[625,1],[624,1],[626,1],[628,1],[627,1],[629,1],[633,1],[632,1],[634,1],[636,1],[635,1],[637,1],[542,1],[543,1],[642,1],[641,1],[643,1],[645,1],[646,1],[644,1],[648,1],[647,1],[650,1],[649,1],[651,1],[653,1],[652,1],[654,1],[656,1],[655,1],[657,1],[659,1],[658,1],[660,1],[885,1],[886,1],[918,1],[917,1],[919,1],[665,1],[666,1],[667,1],[668,1],[670,1],[669,1],[671,1],[673,1],[672,1],[674,1],[676,1],[675,1],[677,1],[679,1],[678,1],[680,1],[682,1],[681,1],[683,1],[685,1],[686,1],[684,1],[688,1],[689,1],[687,1],[639,1],[640,1],[638,1],[691,1],[692,1],[690,1],[694,1],[695,1],[693,1],[697,1],[698,1],[696,1],[700,1],[701,1],[699,1],[703,1],[704,1],[702,1],[706,1],[707,1],[705,1],[709,1],[710,1],[708,1],[712,1],[713,1],[711,1],[715,1],[716,1],[714,1],[718,1],[719,1],[717,1],[721,1],[722,1],[720,1],[729,1],[730,1],[728,1],[732,1],[733,1],[731,1],[726,1],[727,1],[735,1],[736,1],[734,1],[610,1],[611,1],[609,1],[739,1],[737,1],[740,1],[738,1],[741,1],[743,1],[744,1],[742,1],[225,1],[747,1],[748,1],[746,1],[750,1],[751,1],[749,1],[252,1],[269,1],[251,1],[724,1],[725,1],[723,1],[531,1],[532,1],[608,1],[753,1],[754,1],[752,1],[755,1],[756,1],[758,1],[757,1],[760,1],[761,1],[759,1],[763,1],[764,1],[762,1],[767,1],[765,1],[768,1],[766,1],[770,1],[771,1],[769,1],[630,1],[631,1],[775,1],[773,1],[772,1],[776,1],[774,1],[781,1],[782,1],[780,1],[778,1],[779,1],[777,1],[785,1],[786,1],[784,1],[791,1],[792,1],[790,1],[794,1],[795,1],[793,1],[796,1],[798,1],[797,1],[800,1],[801,1],[802,1],[799,1],[804,1],[805,1],[803,1],[807,1],[808,1],[806,1],[810,1],[811,1],[809,1],[813,1],[814,1],[812,1],[816,1],[817,1],[815,1],[819,1],[820,1],[821,1],[818,1],[227,1],[228,1],[226,1],[822,1],[823,1],[825,1],[826,1],[824,1],[828,1],[829,1],[827,1],[859,1],[860,1],[858,1],[831,1],[832,1],[830,1],[834,1],[835,1],[833,1],[837,1],[838,1],[836,1],[840,1],[841,1],[839,1],[843,1],[844,1],[842,1],[846,1],[847,1],[845,1],[850,1],[848,1],[851,1],[849,1],[853,1],[854,1],[852,1],[856,1],[857,1],[855,1],[862,1],[863,1],[861,1],[865,1],[866,1],[864,1],[867,1],[869,1],[870,1],[868,1],[872,1],[873,1],[871,1],[875,1],[876,1],[874,1],[788,1],[789,1],[787,1],[582,1],[583,1],[581,1],[662,1],[661,1],[663,1],[664,1],[889,1],[881,1],[882,1],[146,1],[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[166,1],[156,1],[157,1],[158,1],[159,1],[160,1],[161,1],[162,1],[163,1],[164,1],[165,1],[607,1],[887,1],[888,1],[890,1],[591,1],[590,1],[144,1],[912,1],[906,1],[900,1],[898,1],[145,1],[891,1],[901,1],[899,1],[893,1],[580,1],[907,1],[915,1],[911,1],[913,1],[143,1],[916,1],[908,1],[896,1],[895,1],[902,1],[892,1],[914,1],[905,1],[903,1],[904,1],[897,1],[909,1],[910,1],[894,1],[783,1],[249,1],[884,1],[883,1],[878,1],[877,1],[745,1],[880,1],[879,1],[223,1],[224,1],[229,1],[230,1],[231,1],[245,1],[232,1],[233,1],[234,1],[235,1],[236,1],[239,1],[240,1],[237,1],[241,1],[242,1],[238,1],[243,1],[98,1],[99,1],[97,1],[102,1],[101,1],[100,1],[76,1],[77,1],[74,1],[75,1],[78,1],[64,1],[93,1],[94,1],[95,1],[129,1],[127,1],[126,1],[128,1],[130,1],[103,1],[104,1],[138,1],[137,1],[139,1],[141,1],[140,1],[115,1],[116,1],[132,1],[131,1],[133,1],[134,1],[136,1],[135,1],[96,1],[114,1],[106,1],[107,1],[79,1],[81,1],[91,1],[92,1],[80,1],[119,1],[121,1],[123,1],[124,1],[117,1],[122,1],[120,1],[118,1],[142,1],[82,1],[125,1],[105,1],[88,1],[84,1],[85,1],[83,1],[89,1],[87,1],[90,1],[86,1],[108,1],[112,1],[110,1],[111,1],[109,1],[113,1],[63,1],[220,1],[221,1],[177,1],[178,1],[182,1],[183,1],[168,1],[169,1],[214,1],[215,1],[184,1],[185,1],[186,1],[170,1],[187,1],[171,1],[172,1],[173,1],[174,1],[175,1],[216,1],[217,1],[218,1],[219,1],[176,1],[207,1],[210,1],[222,1],[212,1],[188,1],[167,1],[190,1],[189,1],[192,1],[191,1],[180,1],[179,1],[181,1],[193,1],[213,1],[208,1],[194,1],[199,1],[201,1],[200,1],[196,1],[195,1],[203,1],[202,1],[205,1],[204,1],[198,1],[197,1],[206,1],[209,1],[211,1],[368,1],[364,1],[351,1],[367,1],[360,1],[358,1],[357,1],[356,1],[353,1],[354,1],[362,1],[355,1],[352,1],[359,1],[365,1],[366,1],[361,1],[363,1],[59,1],[939,1],[993,1],[938,1],[248,1],[246,1],[247,1],[57,1],[61,1],[62,1],[60,1],[927,1],[920,1],[286,1],[58,1],[994,1],[937,1],[925,1],[922,1],[923,1],[932,1],[933,1],[934,1],[931,1],[930,1],[935,1],[928,1],[924,1],[926,1],[921,1],[940,1],[929,1],[936,1],[995,1],[1245,1],[1244,1],[1243,1],[1248,1],[1247,1],[1240,1],[1241,1],[1242,1],[1239,1],[1246,1],[1022,1],[1025,1],[1024,1],[997,1],[996,1],[1008,1],[1000,1],[1001,1],[1007,1],[999,1],[998,1],[1004,1],[1002,1],[1003,1],[1006,1],[1005,1],[1013,1],[1009,1],[1012,1],[1011,1],[1014,1],[1016,1],[1017,1],[1018,1],[1019,1],[1020,1],[1021,1],[1030,1],[1010,1],[1031,1],[1032,1],[1015,1],[1033,1],[1035,1],[1036,1],[1034,1],[941,1],[942,1],[944,1],[945,1],[946,1],[947,1],[948,1],[949,1],[950,1],[951,1],[952,1],[953,1],[954,1],[955,1],[956,1],[957,1],[958,1],[943,1],[991,1],[959,1],[960,1],[961,1],[992,1],[962,1],[963,1],[964,1],[965,1],[966,1],[967,1],[968,1],[969,1],[970,1],[971,1],[972,1],[973,1],[975,1],[974,1],[976,1],[977,1],[978,1],[979,1],[980,1],[981,1],[982,1],[983,1],[984,1],[985,1],[986,1],[987,1],[988,1],[989,1],[990,1],[1037,1],[1038,1],[309,1],[307,1],[311,1],[1261,1],[1039,1],[1040,1],[310,1],[1065,1],[1066,1],[1041,1],[1044,1],[1063,1],[1064,1],[1054,1],[1053,1],[1051,1],[1046,1],[1059,1],[1057,1],[1061,1],[1045,1],[1058,1],[1062,1],[1047,1],[1048,1],[1060,1],[1042,1],[1049,1],[1050,1],[1052,1],[1056,1],[1067,1],[1055,1],[1043,1],[1080,1],[1079,1],[1074,1],[1076,1],[1075,1],[1068,1],[1069,1],[1071,1],[1073,1],[1077,1],[1078,1],[1070,1],[1072,1],[1081,1],[1085,1],[1084,1],[1083,1],[1082,1],[1086,1],[1087,1],[1088,1],[1089,1],[1090,1],[1269,1],[1023,1],[308,1],[1029,1],[1257,1],[1027,1],[1028,1],[1026,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[1185,1],[1187,1],[1112,1],[1184,1],[1181,1],[1183,1],[1182,1],[1113,1],[1186,1],[1114,1],[1115,1],[1116,1],[1135,1],[1137,1],[1138,1],[1139,1],[1147,1],[1140,1],[1141,1],[1142,1],[1146,1],[1149,1],[1148,1],[1143,1],[1144,1],[1145,1],[1150,1],[1136,1],[1234,1],[1235,1],[1236,1],[1237,1],[1238,1],[1250,1],[1251,1],[1252,1],[1249,1],[1210,1],[1197,1],[1195,1],[1201,1],[1196,1],[1200,1],[1212,1],[1211,1],[1198,1],[1202,1],[1203,1],[1204,1],[1207,1],[1205,1],[1206,1],[1199,1],[1208,1],[1209,1],[1220,1],[1221,1],[1222,1],[1219,1],[1218,1],[1223,1],[1217,1],[1224,1],[1225,1],[1227,1],[1228,1],[1226,1],[1230,1],[1229,1],[1216,1],[1193,1],[1191,1],[1188,1],[1214,1],[1194,1],[1213,1],[1215,1],[1192,1],[1190,1],[1189,1],[1233,1],[1231,1],[1232,1],[1256,1],[1255,1],[1258,1],[1264,1],[1267,1],[1265,1],[1266,1],[1098,1],[1101,1],[1099,1],[1100,1],[1102,1],[1095,1],[1104,1],[1109,1],[1097,1],[1111,1],[1105,1],[1096,1],[1103,1],[1106,1],[1108,1],[1110,1],[1107,1],[1263,1],[1262,1],[1175,1],[1117,1],[1167,1],[1168,1],[1180,1],[1173,1],[1171,1],[1172,1],[1169,1],[1178,1],[1170,1],[1179,1],[1176,1],[1166,1],[1174,1],[1177,1],[1152,1],[1133,1],[1151,1],[1165,1],[1131,1],[1134,1],[1153,1],[1154,1],[1155,1],[1156,1],[1157,1],[1158,1],[1159,1],[1164,1],[1160,1],[1163,1],[1161,1],[1162,1],[1132,1],[1259,1],[1268,1],[1260,1],[1253,1],[1254,1],[1130,1],[1120,1],[1122,1],[1128,1],[1124,1],[1125,1],[1123,1],[1126,1],[1118,1],[1119,1],[1129,1],[1121,1],[1127,1],[1091,1],[1092,1],[1093,1],[1094,1],[1270,1]]},"version":"4.9.5"} \ No newline at end of file +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/@types/react/ts5.0/global.d.ts","./node_modules/csstype/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/scheduler/tracing.d.ts","./node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react/ts5.0/jsx-runtime.d.ts","./node_modules/@mui/types/index.d.ts","./node_modules/@mui/styled-engine/node_modules/csstype/index.d.ts","./node_modules/@emotion/utils/types/index.d.ts","./node_modules/@emotion/cache/types/index.d.ts","./node_modules/@emotion/serialize/types/index.d.ts","./node_modules/@emotion/react/types/jsx-namespace.d.ts","./node_modules/@emotion/react/types/helper.d.ts","./node_modules/@emotion/react/types/theming.d.ts","./node_modules/@emotion/react/types/index.d.ts","./node_modules/@emotion/styled/types/base.d.ts","./node_modules/@emotion/styled/types/index.d.ts","./node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.d.ts","./node_modules/@mui/styled-engine/StyledEngineProvider/index.d.ts","./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/styled-engine/GlobalStyles/index.d.ts","./node_modules/@mui/styled-engine/index.d.ts","./node_modules/@mui/system/createTheme/createBreakpoints.d.ts","./node_modules/@mui/system/createTheme/shape.d.ts","./node_modules/@mui/system/createTheme/createSpacing.d.ts","./node_modules/@mui/system/node_modules/csstype/index.d.ts","./node_modules/@mui/system/styleFunctionSx/StandardCssProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/AliasesCSSProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/OverwriteCSSProperties.d.ts","./node_modules/@mui/system/styleFunctionSx/styleFunctionSx.d.ts","./node_modules/@mui/system/styleFunctionSx/extendSxProp.d.ts","./node_modules/@mui/system/style.d.ts","./node_modules/@mui/system/styleFunctionSx/defaultSxConfig.d.ts","./node_modules/@mui/system/styleFunctionSx/index.d.ts","./node_modules/@mui/system/createTheme/createTheme.d.ts","./node_modules/@mui/system/createTheme/index.d.ts","./node_modules/@mui/system/Box/Box.d.ts","./node_modules/@mui/system/Box/boxClasses.d.ts","./node_modules/@mui/system/Box/index.d.ts","./node_modules/@mui/system/breakpoints.d.ts","./node_modules/@mui/private-theming/defaultTheme/index.d.ts","./node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.d.ts","./node_modules/@mui/private-theming/ThemeProvider/index.d.ts","./node_modules/@mui/private-theming/useTheme/useTheme.d.ts","./node_modules/@mui/private-theming/useTheme/index.d.ts","./node_modules/@mui/private-theming/index.d.ts","./node_modules/@mui/system/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/system/GlobalStyles/index.d.ts","./node_modules/@mui/system/spacing.d.ts","./node_modules/@mui/system/createBox.d.ts","./node_modules/@mui/system/createStyled.d.ts","./node_modules/@mui/system/styled.d.ts","./node_modules/@mui/system/useThemeProps/useThemeProps.d.ts","./node_modules/@mui/system/useThemeProps/getThemeProps.d.ts","./node_modules/@mui/system/useThemeProps/index.d.ts","./node_modules/@mui/system/useTheme.d.ts","./node_modules/@mui/system/useThemeWithoutDefault.d.ts","./node_modules/@mui/system/colorManipulator.d.ts","./node_modules/@mui/system/ThemeProvider/ThemeProvider.d.ts","./node_modules/@mui/system/ThemeProvider/index.d.ts","./node_modules/@mui/system/cssVars/getInitColorSchemeScript.d.ts","./node_modules/@mui/system/cssVars/useCurrentColorScheme.d.ts","./node_modules/@mui/system/cssVars/createCssVarsProvider.d.ts","./node_modules/@mui/system/cssVars/prepareCssVars.d.ts","./node_modules/@mui/system/cssVars/createCssVarsTheme.d.ts","./node_modules/@mui/system/cssVars/index.d.ts","./node_modules/@mui/system/cssVars/createGetCssVar.d.ts","./node_modules/@mui/system/cssVars/cssVarsParser.d.ts","./node_modules/@mui/system/responsivePropType.d.ts","./node_modules/@mui/system/Container/containerClasses.d.ts","./node_modules/@mui/system/Container/ContainerProps.d.ts","./node_modules/@mui/system/Container/createContainer.d.ts","./node_modules/@mui/system/Container/Container.d.ts","./node_modules/@mui/system/Container/index.d.ts","./node_modules/@mui/system/Unstable_Grid/GridProps.d.ts","./node_modules/@mui/system/Unstable_Grid/Grid.d.ts","./node_modules/@mui/system/Unstable_Grid/createGrid.d.ts","./node_modules/@mui/system/Unstable_Grid/gridClasses.d.ts","./node_modules/@mui/system/Unstable_Grid/traverseBreakpoints.d.ts","./node_modules/@mui/system/Unstable_Grid/index.d.ts","./node_modules/@mui/system/Stack/StackProps.d.ts","./node_modules/@mui/system/Stack/Stack.d.ts","./node_modules/@mui/system/Stack/createStack.d.ts","./node_modules/@mui/system/Stack/stackClasses.d.ts","./node_modules/@mui/system/Stack/index.d.ts","./node_modules/@mui/system/index.d.ts","./node_modules/@mui/material/styles/identifier.d.ts","./node_modules/@mui/material/node_modules/csstype/index.d.ts","./node_modules/@mui/material/styles/createMixins.d.ts","./node_modules/@mui/material/colors/amber.d.ts","./node_modules/@mui/material/colors/blue.d.ts","./node_modules/@mui/material/colors/blueGrey.d.ts","./node_modules/@mui/material/colors/brown.d.ts","./node_modules/@mui/material/colors/common.d.ts","./node_modules/@mui/material/colors/cyan.d.ts","./node_modules/@mui/material/colors/deepOrange.d.ts","./node_modules/@mui/material/colors/deepPurple.d.ts","./node_modules/@mui/material/colors/green.d.ts","./node_modules/@mui/material/colors/grey.d.ts","./node_modules/@mui/material/colors/indigo.d.ts","./node_modules/@mui/material/colors/lightBlue.d.ts","./node_modules/@mui/material/colors/lightGreen.d.ts","./node_modules/@mui/material/colors/lime.d.ts","./node_modules/@mui/material/colors/orange.d.ts","./node_modules/@mui/material/colors/pink.d.ts","./node_modules/@mui/material/colors/purple.d.ts","./node_modules/@mui/material/colors/red.d.ts","./node_modules/@mui/material/colors/teal.d.ts","./node_modules/@mui/material/colors/yellow.d.ts","./node_modules/@mui/material/colors/index.d.ts","./node_modules/@mui/utils/node_modules/@types/prop-types/index.d.ts","./node_modules/@mui/utils/chainPropTypes/chainPropTypes.d.ts","./node_modules/@mui/utils/chainPropTypes/index.d.ts","./node_modules/@mui/utils/deepmerge.d.ts","./node_modules/@mui/utils/elementAcceptingRef.d.ts","./node_modules/@mui/utils/elementTypeAcceptingRef.d.ts","./node_modules/@mui/utils/exactProp/exactProp.d.ts","./node_modules/@mui/utils/exactProp/index.d.ts","./node_modules/@mui/utils/formatMuiErrorMessage.d.ts","./node_modules/@mui/utils/getDisplayName.d.ts","./node_modules/@mui/utils/HTMLElementType/HTMLElementType.d.ts","./node_modules/@mui/utils/HTMLElementType/index.d.ts","./node_modules/@mui/utils/ponyfillGlobal/ponyfillGlobal.d.ts","./node_modules/@mui/utils/ponyfillGlobal/index.d.ts","./node_modules/@mui/utils/refType.d.ts","./node_modules/@mui/utils/capitalize/capitalize.d.ts","./node_modules/@mui/utils/capitalize/index.d.ts","./node_modules/@mui/utils/createChainedFunction.d.ts","./node_modules/@mui/utils/debounce/debounce.d.ts","./node_modules/@mui/utils/debounce/index.d.ts","./node_modules/@mui/utils/deprecatedPropType.d.ts","./node_modules/@mui/utils/isMuiElement.d.ts","./node_modules/@mui/utils/ownerDocument/ownerDocument.d.ts","./node_modules/@mui/utils/ownerDocument/index.d.ts","./node_modules/@mui/utils/ownerWindow/ownerWindow.d.ts","./node_modules/@mui/utils/ownerWindow/index.d.ts","./node_modules/@mui/utils/requirePropFactory.d.ts","./node_modules/@mui/utils/setRef.d.ts","./node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.d.ts","./node_modules/@mui/utils/useEnhancedEffect/index.d.ts","./node_modules/@mui/utils/useId/useId.d.ts","./node_modules/@mui/utils/useId/index.d.ts","./node_modules/@mui/utils/unsupportedProp.d.ts","./node_modules/@mui/utils/useControlled/useControlled.d.ts","./node_modules/@mui/utils/useControlled/index.d.ts","./node_modules/@mui/utils/useEventCallback/useEventCallback.d.ts","./node_modules/@mui/utils/useEventCallback/index.d.ts","./node_modules/@mui/utils/useForkRef/useForkRef.d.ts","./node_modules/@mui/utils/useForkRef/index.d.ts","./node_modules/@mui/utils/useIsFocusVisible.d.ts","./node_modules/@mui/utils/getScrollbarSize.d.ts","./node_modules/@mui/utils/scrollLeft.d.ts","./node_modules/@mui/utils/usePreviousProps.d.ts","./node_modules/@mui/utils/getValidReactChildren.d.ts","./node_modules/@mui/utils/visuallyHidden.d.ts","./node_modules/@mui/utils/integerPropType.d.ts","./node_modules/@mui/utils/resolveProps.d.ts","./node_modules/@mui/utils/composeClasses/composeClasses.d.ts","./node_modules/@mui/utils/composeClasses/index.d.ts","./node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.d.ts","./node_modules/@mui/utils/generateUtilityClass/index.d.ts","./node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.d.ts","./node_modules/@mui/utils/generateUtilityClasses/index.d.ts","./node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.d.ts","./node_modules/@mui/utils/ClassNameGenerator/index.d.ts","./node_modules/@mui/utils/index.d.ts","./node_modules/@mui/material/utils/capitalize.d.ts","./node_modules/@mui/material/utils/createChainedFunction.d.ts","./node_modules/@mui/material/OverridableComponent.d.ts","./node_modules/@mui/material/SvgIcon/svgIconClasses.d.ts","./node_modules/@mui/material/SvgIcon/SvgIcon.d.ts","./node_modules/@mui/material/SvgIcon/index.d.ts","./node_modules/@mui/material/utils/createSvgIcon.d.ts","./node_modules/@mui/material/utils/debounce.d.ts","./node_modules/@mui/material/utils/deprecatedPropType.d.ts","./node_modules/@mui/material/utils/isMuiElement.d.ts","./node_modules/@mui/material/utils/ownerDocument.d.ts","./node_modules/@mui/material/utils/ownerWindow.d.ts","./node_modules/@mui/material/utils/requirePropFactory.d.ts","./node_modules/@mui/material/utils/setRef.d.ts","./node_modules/@mui/material/utils/useEnhancedEffect.d.ts","./node_modules/@mui/material/utils/useId.d.ts","./node_modules/@mui/material/utils/unsupportedProp.d.ts","./node_modules/@mui/material/utils/useControlled.d.ts","./node_modules/@mui/material/utils/useEventCallback.d.ts","./node_modules/@mui/material/utils/useForkRef.d.ts","./node_modules/@mui/material/utils/useIsFocusVisible.d.ts","./node_modules/@mui/base/ClassNameGenerator/index.d.ts","./node_modules/@mui/material/utils/index.d.ts","./node_modules/@types/react-transition-group/node_modules/@types/react/ts5.0/global.d.ts","./node_modules/@types/react-transition-group/node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react-transition-group/Transition.d.ts","./node_modules/@mui/material/transitions/transition.d.ts","./node_modules/@mui/material/Accordion/accordionClasses.d.ts","./node_modules/@mui/material/Paper/paperClasses.d.ts","./node_modules/@mui/material/Paper/Paper.d.ts","./node_modules/@mui/material/Accordion/Accordion.d.ts","./node_modules/@mui/material/Accordion/index.d.ts","./node_modules/@mui/material/AccordionActions/accordionActionsClasses.d.ts","./node_modules/@mui/material/AccordionActions/AccordionActions.d.ts","./node_modules/@mui/material/AccordionActions/index.d.ts","./node_modules/@mui/material/AccordionDetails/accordionDetailsClasses.d.ts","./node_modules/@mui/material/AccordionDetails/AccordionDetails.d.ts","./node_modules/@mui/material/AccordionDetails/index.d.ts","./node_modules/@mui/material/ButtonBase/touchRippleClasses.d.ts","./node_modules/@mui/material/ButtonBase/TouchRipple.d.ts","./node_modules/@mui/material/ButtonBase/buttonBaseClasses.d.ts","./node_modules/@mui/material/ButtonBase/ButtonBase.d.ts","./node_modules/@mui/material/ButtonBase/index.d.ts","./node_modules/@mui/material/AccordionSummary/accordionSummaryClasses.d.ts","./node_modules/@mui/material/AccordionSummary/AccordionSummary.d.ts","./node_modules/@mui/material/AccordionSummary/index.d.ts","./node_modules/@mui/material/Paper/index.d.ts","./node_modules/@mui/material/Alert/alertClasses.d.ts","./node_modules/@mui/material/Alert/Alert.d.ts","./node_modules/@mui/material/Alert/index.d.ts","./node_modules/@mui/material/AlertTitle/alertTitleClasses.d.ts","./node_modules/@mui/material/AlertTitle/AlertTitle.d.ts","./node_modules/@mui/material/AlertTitle/index.d.ts","./node_modules/@mui/material/AppBar/appBarClasses.d.ts","./node_modules/@mui/material/AppBar/AppBar.d.ts","./node_modules/@mui/material/AppBar/index.d.ts","./node_modules/@mui/base/utils/appendOwnerState.d.ts","./node_modules/@mui/base/utils/areArraysEqual.d.ts","./node_modules/@mui/base/utils/ClassNameConfigurator.d.ts","./node_modules/@mui/base/utils/types.d.ts","./node_modules/@mui/base/utils/extractEventHandlers.d.ts","./node_modules/@mui/base/utils/isHostComponent.d.ts","./node_modules/@mui/base/utils/resolveComponentProps.d.ts","./node_modules/clsx/clsx.d.ts","./node_modules/@mui/base/utils/mergeSlotProps.d.ts","./node_modules/@mui/base/utils/useSlotProps.d.ts","./node_modules/@mui/base/utils/prepareForSlot.d.ts","./node_modules/@mui/base/utils/PolymorphicComponent.d.ts","./node_modules/@mui/base/utils/index.d.ts","./node_modules/@mui/base/Badge/Badge.types.d.ts","./node_modules/@mui/base/Badge/Badge.d.ts","./node_modules/@mui/base/Badge/badgeClasses.d.ts","./node_modules/@mui/base/Badge/index.d.ts","./node_modules/@mui/base/utils/MuiCancellableEvent.d.ts","./node_modules/@mui/base/useButton/useButton.types.d.ts","./node_modules/@mui/base/useButton/useButton.d.ts","./node_modules/@mui/base/useButton/index.d.ts","./node_modules/@mui/base/Button/Button.types.d.ts","./node_modules/@mui/base/Button/Button.d.ts","./node_modules/@mui/base/Button/buttonClasses.d.ts","./node_modules/@mui/base/Button/index.d.ts","./node_modules/@mui/base/ClickAwayListener/ClickAwayListener.d.ts","./node_modules/@mui/base/ClickAwayListener/index.d.ts","./node_modules/@mui/base/composeClasses/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./node_modules/@mui/base/Dropdown/Dropdown.types.d.ts","./node_modules/@mui/base/Dropdown/Dropdown.d.ts","./node_modules/@mui/base/Dropdown/index.d.ts","./node_modules/@mui/base/FocusTrap/FocusTrap.types.d.ts","./node_modules/@mui/base/FocusTrap/FocusTrap.d.ts","./node_modules/@mui/base/FocusTrap/index.d.ts","./node_modules/@mui/base/FormControl/FormControl.types.d.ts","./node_modules/@mui/base/FormControl/FormControl.d.ts","./node_modules/@mui/base/FormControl/FormControlContext.d.ts","./node_modules/@mui/base/FormControl/formControlClasses.d.ts","./node_modules/@mui/base/FormControl/useFormControlContext.d.ts","./node_modules/@mui/base/FormControl/index.d.ts","./node_modules/@mui/base/useInput/useInput.types.d.ts","./node_modules/@mui/base/useInput/useInput.d.ts","./node_modules/@mui/base/useInput/index.d.ts","./node_modules/@mui/base/Input/Input.types.d.ts","./node_modules/@mui/base/Input/Input.d.ts","./node_modules/@mui/base/Input/inputClasses.d.ts","./node_modules/@mui/base/Input/index.d.ts","./node_modules/@mui/base/useList/listActions.types.d.ts","./node_modules/@mui/base/utils/useControllableReducer.types.d.ts","./node_modules/@mui/base/useList/ListContext.d.ts","./node_modules/@mui/base/useList/useList.types.d.ts","./node_modules/@mui/base/useList/useList.d.ts","./node_modules/@mui/base/useList/useListItem.types.d.ts","./node_modules/@mui/base/useList/useListItem.d.ts","./node_modules/@mui/base/useList/listReducer.d.ts","./node_modules/@mui/base/useList/index.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItem.types.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItem.d.ts","./node_modules/@mui/base/useMenuItem/useMenuItemContextStabilizer.d.ts","./node_modules/@mui/base/useMenuItem/index.d.ts","./node_modules/@mui/base/useCompound/useCompoundParent.d.ts","./node_modules/@mui/base/useCompound/useCompoundItem.d.ts","./node_modules/@mui/base/useCompound/index.d.ts","./node_modules/@mui/base/useMenu/MenuProvider.d.ts","./node_modules/@mui/base/useMenu/useMenu.types.d.ts","./node_modules/@mui/base/useMenu/useMenu.d.ts","./node_modules/@mui/base/useMenu/index.d.ts","./node_modules/@popperjs/core/lib/enums.d.ts","./node_modules/@popperjs/core/lib/modifiers/popperOffsets.d.ts","./node_modules/@popperjs/core/lib/modifiers/flip.d.ts","./node_modules/@popperjs/core/lib/modifiers/hide.d.ts","./node_modules/@popperjs/core/lib/modifiers/offset.d.ts","./node_modules/@popperjs/core/lib/modifiers/eventListeners.d.ts","./node_modules/@popperjs/core/lib/modifiers/computeStyles.d.ts","./node_modules/@popperjs/core/lib/modifiers/arrow.d.ts","./node_modules/@popperjs/core/lib/modifiers/preventOverflow.d.ts","./node_modules/@popperjs/core/lib/modifiers/applyStyles.d.ts","./node_modules/@popperjs/core/lib/types.d.ts","./node_modules/@popperjs/core/lib/modifiers/index.d.ts","./node_modules/@popperjs/core/lib/utils/detectOverflow.d.ts","./node_modules/@popperjs/core/lib/createPopper.d.ts","./node_modules/@popperjs/core/lib/popper-lite.d.ts","./node_modules/@popperjs/core/lib/popper.d.ts","./node_modules/@popperjs/core/lib/index.d.ts","./node_modules/@popperjs/core/index.d.ts","./node_modules/@mui/base/Portal/Portal.types.d.ts","./node_modules/@mui/base/Portal/Portal.d.ts","./node_modules/@mui/base/Portal/index.d.ts","./node_modules/@mui/base/Popper/Popper.types.d.ts","./node_modules/@mui/base/Popper/Popper.d.ts","./node_modules/@mui/base/Popper/popperClasses.d.ts","./node_modules/@mui/base/Popper/index.d.ts","./node_modules/@mui/base/Menu/Menu.types.d.ts","./node_modules/@mui/base/Menu/Menu.d.ts","./node_modules/@mui/base/Menu/menuClasses.d.ts","./node_modules/@mui/base/Menu/index.d.ts","./node_modules/@mui/base/MenuButton/MenuButton.types.d.ts","./node_modules/@mui/base/MenuButton/MenuButton.d.ts","./node_modules/@mui/base/MenuButton/menuButtonClasses.d.ts","./node_modules/@mui/base/MenuButton/index.d.ts","./node_modules/@mui/base/MenuItem/MenuItem.types.d.ts","./node_modules/@mui/base/MenuItem/MenuItem.d.ts","./node_modules/@mui/base/MenuItem/menuItemClasses.d.ts","./node_modules/@mui/base/MenuItem/index.d.ts","./node_modules/@mui/base/Modal/Modal.types.d.ts","./node_modules/@mui/base/Modal/Modal.d.ts","./node_modules/@mui/base/Modal/modalClasses.d.ts","./node_modules/@mui/base/Modal/index.d.ts","./node_modules/@mui/base/NoSsr/NoSsr.types.d.ts","./node_modules/@mui/base/NoSsr/NoSsr.d.ts","./node_modules/@mui/base/NoSsr/index.d.ts","./node_modules/@mui/base/unstable_useNumberInput/numberInputAction.types.d.ts","./node_modules/@mui/base/unstable_useNumberInput/useNumberInput.types.d.ts","./node_modules/@mui/base/Unstable_NumberInput/NumberInput.types.d.ts","./node_modules/@mui/base/Unstable_NumberInput/NumberInput.d.ts","./node_modules/@mui/base/Unstable_NumberInput/numberInputClasses.d.ts","./node_modules/@mui/base/Unstable_NumberInput/index.d.ts","./node_modules/@mui/base/OptionGroup/OptionGroup.types.d.ts","./node_modules/@mui/base/OptionGroup/OptionGroup.d.ts","./node_modules/@mui/base/OptionGroup/optionGroupClasses.d.ts","./node_modules/@mui/base/OptionGroup/index.d.ts","./node_modules/@mui/base/useOption/useOption.types.d.ts","./node_modules/@mui/base/useOption/useOption.d.ts","./node_modules/@mui/base/useOption/useOptionContextStabilizer.d.ts","./node_modules/@mui/base/useOption/index.d.ts","./node_modules/@mui/base/Option/Option.types.d.ts","./node_modules/@mui/base/Option/Option.d.ts","./node_modules/@mui/base/Option/optionClasses.d.ts","./node_modules/@mui/base/Option/index.d.ts","./node_modules/@floating-ui/utils/src/index.d.ts","./node_modules/@floating-ui/utils/src/types.d.ts","./node_modules/@floating-ui/core/src/computePosition.d.ts","./node_modules/@floating-ui/core/src/detectOverflow.d.ts","./node_modules/@floating-ui/core/src/middleware/arrow.d.ts","./node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts","./node_modules/@floating-ui/core/src/middleware/flip.d.ts","./node_modules/@floating-ui/core/src/middleware/hide.d.ts","./node_modules/@floating-ui/core/src/middleware/inline.d.ts","./node_modules/@floating-ui/core/src/middleware/offset.d.ts","./node_modules/@floating-ui/core/src/middleware/shift.d.ts","./node_modules/@floating-ui/core/src/middleware/size.d.ts","./node_modules/@floating-ui/core/src/types.d.ts","./node_modules/@floating-ui/dom/src/autoUpdate.d.ts","./node_modules/@floating-ui/dom/src/platform.d.ts","./node_modules/@floating-ui/utils/dom/src/index.d.ts","./node_modules/@floating-ui/utils/dom/src/types.d.ts","./node_modules/@floating-ui/dom/src/index.d.ts","./node_modules/@floating-ui/dom/src/types.d.ts","./node_modules/@floating-ui/react-dom/src/arrow.d.ts","./node_modules/@floating-ui/react-dom/src/useFloating.d.ts","./node_modules/@floating-ui/react-dom/src/types.d.ts","./node_modules/@mui/base/Unstable_Popup/Popup.types.d.ts","./node_modules/@mui/base/Unstable_Popup/Popup.d.ts","./node_modules/@mui/base/Unstable_Popup/popupClasses.d.ts","./node_modules/@mui/base/Unstable_Popup/index.d.ts","./node_modules/@mui/base/useSelect/SelectProvider.d.ts","./node_modules/@mui/base/useSelect/useSelect.types.d.ts","./node_modules/@mui/base/useSelect/useSelect.d.ts","./node_modules/@mui/base/useSelect/index.d.ts","./node_modules/@mui/base/Select/Select.types.d.ts","./node_modules/@mui/base/Select/Select.d.ts","./node_modules/@mui/base/Select/selectClasses.d.ts","./node_modules/@mui/base/Select/index.d.ts","./node_modules/@mui/base/useSlider/useSlider.types.d.ts","./node_modules/@mui/base/useSlider/useSlider.d.ts","./node_modules/@mui/base/useSlider/index.d.ts","./node_modules/@mui/base/Slider/Slider.types.d.ts","./node_modules/@mui/base/Slider/Slider.d.ts","./node_modules/@mui/base/Slider/sliderClasses.d.ts","./node_modules/@mui/base/Slider/index.d.ts","./node_modules/@mui/base/useSnackbar/useSnackbar.types.d.ts","./node_modules/@mui/base/useSnackbar/useSnackbar.d.ts","./node_modules/@mui/base/useSnackbar/index.d.ts","./node_modules/@mui/base/Snackbar/Snackbar.types.d.ts","./node_modules/@mui/base/Snackbar/Snackbar.d.ts","./node_modules/@mui/base/Snackbar/snackbarClasses.d.ts","./node_modules/@mui/base/Snackbar/index.d.ts","./node_modules/@mui/base/useSwitch/useSwitch.types.d.ts","./node_modules/@mui/base/useSwitch/useSwitch.d.ts","./node_modules/@mui/base/useSwitch/index.d.ts","./node_modules/@mui/base/Switch/Switch.types.d.ts","./node_modules/@mui/base/Switch/Switch.d.ts","./node_modules/@mui/base/Switch/switchClasses.d.ts","./node_modules/@mui/base/Switch/index.d.ts","./node_modules/@mui/base/TablePagination/TablePaginationActions.types.d.ts","./node_modules/@mui/base/TablePagination/TablePaginationActions.d.ts","./node_modules/@mui/base/TablePagination/common.types.d.ts","./node_modules/@mui/base/TablePagination/TablePagination.types.d.ts","./node_modules/@mui/base/TablePagination/TablePagination.d.ts","./node_modules/@mui/base/TablePagination/tablePaginationClasses.d.ts","./node_modules/@mui/base/TablePagination/index.d.ts","./node_modules/@mui/base/useTabPanel/useTabPanel.types.d.ts","./node_modules/@mui/base/useTabPanel/useTabPanel.d.ts","./node_modules/@mui/base/useTabPanel/index.d.ts","./node_modules/@mui/base/TabPanel/TabPanel.types.d.ts","./node_modules/@mui/base/TabPanel/TabPanel.d.ts","./node_modules/@mui/base/TabPanel/tabPanelClasses.d.ts","./node_modules/@mui/base/TabPanel/index.d.ts","./node_modules/@mui/base/Tabs/TabsContext.d.ts","./node_modules/@mui/base/useTabs/TabsProvider.d.ts","./node_modules/@mui/base/useTabs/useTabs.types.d.ts","./node_modules/@mui/base/useTabs/useTabs.d.ts","./node_modules/@mui/base/useTabs/index.d.ts","./node_modules/@mui/base/useTabsList/TabsListProvider.d.ts","./node_modules/@mui/base/useTabsList/useTabsList.types.d.ts","./node_modules/@mui/base/useTabsList/useTabsList.d.ts","./node_modules/@mui/base/useTabsList/index.d.ts","./node_modules/@mui/base/TabsList/TabsList.types.d.ts","./node_modules/@mui/base/TabsList/TabsList.d.ts","./node_modules/@mui/base/TabsList/tabsListClasses.d.ts","./node_modules/@mui/base/TabsList/index.d.ts","./node_modules/@mui/base/Tabs/Tabs.types.d.ts","./node_modules/@mui/base/Tabs/Tabs.d.ts","./node_modules/@mui/base/Tabs/tabsClasses.d.ts","./node_modules/@mui/base/Tabs/index.d.ts","./node_modules/@mui/base/useTab/useTab.types.d.ts","./node_modules/@mui/base/useTab/useTab.d.ts","./node_modules/@mui/base/useTab/index.d.ts","./node_modules/@mui/base/Tab/Tab.types.d.ts","./node_modules/@mui/base/Tab/Tab.d.ts","./node_modules/@mui/base/Tab/tabClasses.d.ts","./node_modules/@mui/base/Tab/index.d.ts","./node_modules/@mui/base/TextareaAutosize/TextareaAutosize.types.d.ts","./node_modules/@mui/base/TextareaAutosize/TextareaAutosize.d.ts","./node_modules/@mui/base/TextareaAutosize/index.d.ts","./node_modules/@mui/base/useAutocomplete/useAutocomplete.d.ts","./node_modules/@mui/base/useAutocomplete/index.d.ts","./node_modules/@mui/base/useBadge/useBadge.types.d.ts","./node_modules/@mui/base/useBadge/useBadge.d.ts","./node_modules/@mui/base/useBadge/index.d.ts","./node_modules/@mui/base/useDropdown/useDropdown.types.d.ts","./node_modules/@mui/base/useDropdown/DropdownContext.d.ts","./node_modules/@mui/base/useDropdown/useDropdown.d.ts","./node_modules/@mui/base/useDropdown/index.d.ts","./node_modules/@mui/base/useMenuButton/useMenuButton.types.d.ts","./node_modules/@mui/base/useMenuButton/useMenuButton.d.ts","./node_modules/@mui/base/useMenuButton/index.d.ts","./node_modules/@mui/base/unstable_useNumberInput/useNumberInput.d.ts","./node_modules/@mui/base/unstable_useNumberInput/index.d.ts","./node_modules/@mui/base/unstable_useModal/useModal.types.d.ts","./node_modules/@mui/base/unstable_useModal/useModal.d.ts","./node_modules/@mui/base/unstable_useModal/ModalManager.d.ts","./node_modules/@mui/base/unstable_useModal/index.d.ts","./node_modules/@mui/base/index.d.ts","./node_modules/@mui/material/Chip/chipClasses.d.ts","./node_modules/@mui/material/Chip/Chip.d.ts","./node_modules/@mui/material/Chip/index.d.ts","./node_modules/@mui/material/Popper/Popper.d.ts","./node_modules/@mui/material/Popper/index.d.ts","./node_modules/@mui/material/Autocomplete/autocompleteClasses.d.ts","./node_modules/@mui/material/Autocomplete/Autocomplete.d.ts","./node_modules/@mui/material/Autocomplete/index.d.ts","./node_modules/@mui/material/Avatar/avatarClasses.d.ts","./node_modules/@mui/material/Avatar/Avatar.d.ts","./node_modules/@mui/material/Avatar/index.d.ts","./node_modules/@mui/material/AvatarGroup/avatarGroupClasses.d.ts","./node_modules/@mui/material/AvatarGroup/AvatarGroup.d.ts","./node_modules/@mui/material/AvatarGroup/index.d.ts","./node_modules/@mui/material/Fade/Fade.d.ts","./node_modules/@mui/material/Fade/index.d.ts","./node_modules/@mui/material/Backdrop/backdropClasses.d.ts","./node_modules/@mui/material/Backdrop/Backdrop.d.ts","./node_modules/@mui/material/Backdrop/index.d.ts","./node_modules/@mui/material/Badge/badgeClasses.d.ts","./node_modules/@mui/material/Badge/Badge.d.ts","./node_modules/@mui/material/Badge/index.d.ts","./node_modules/@mui/material/BottomNavigation/bottomNavigationClasses.d.ts","./node_modules/@mui/material/BottomNavigation/BottomNavigation.d.ts","./node_modules/@mui/material/BottomNavigation/index.d.ts","./node_modules/@mui/material/BottomNavigationAction/bottomNavigationActionClasses.d.ts","./node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.d.ts","./node_modules/@mui/material/BottomNavigationAction/index.d.ts","./node_modules/@mui/material/Box/Box.d.ts","./node_modules/@mui/material/Box/boxClasses.d.ts","./node_modules/@mui/material/Box/index.d.ts","./node_modules/@mui/material/Breadcrumbs/breadcrumbsClasses.d.ts","./node_modules/@mui/material/Breadcrumbs/Breadcrumbs.d.ts","./node_modules/@mui/material/Breadcrumbs/index.d.ts","./node_modules/@mui/material/Button/buttonClasses.d.ts","./node_modules/@mui/material/Button/Button.d.ts","./node_modules/@mui/material/Button/index.d.ts","./node_modules/@mui/material/ButtonGroup/buttonGroupClasses.d.ts","./node_modules/@mui/material/ButtonGroup/ButtonGroup.d.ts","./node_modules/@mui/material/ButtonGroup/index.d.ts","./node_modules/@mui/material/Card/cardClasses.d.ts","./node_modules/@mui/material/Card/Card.d.ts","./node_modules/@mui/material/Card/index.d.ts","./node_modules/@mui/material/CardActionArea/cardActionAreaClasses.d.ts","./node_modules/@mui/material/CardActionArea/CardActionArea.d.ts","./node_modules/@mui/material/CardActionArea/index.d.ts","./node_modules/@mui/material/CardActions/cardActionsClasses.d.ts","./node_modules/@mui/material/CardActions/CardActions.d.ts","./node_modules/@mui/material/CardActions/index.d.ts","./node_modules/@mui/material/CardContent/cardContentClasses.d.ts","./node_modules/@mui/material/CardContent/CardContent.d.ts","./node_modules/@mui/material/CardContent/index.d.ts","./node_modules/@mui/material/styles/createTypography.d.ts","./node_modules/@mui/material/Typography/typographyClasses.d.ts","./node_modules/@mui/material/Typography/Typography.d.ts","./node_modules/@mui/material/Typography/index.d.ts","./node_modules/@mui/material/CardHeader/cardHeaderClasses.d.ts","./node_modules/@mui/material/CardHeader/CardHeader.d.ts","./node_modules/@mui/material/CardHeader/index.d.ts","./node_modules/@mui/material/CardMedia/cardMediaClasses.d.ts","./node_modules/@mui/material/CardMedia/CardMedia.d.ts","./node_modules/@mui/material/CardMedia/index.d.ts","./node_modules/@mui/material/internal/switchBaseClasses.d.ts","./node_modules/@mui/material/internal/SwitchBase.d.ts","./node_modules/@mui/material/Checkbox/checkboxClasses.d.ts","./node_modules/@mui/material/Checkbox/Checkbox.d.ts","./node_modules/@mui/material/Checkbox/index.d.ts","./node_modules/@mui/material/CircularProgress/circularProgressClasses.d.ts","./node_modules/@mui/material/CircularProgress/CircularProgress.d.ts","./node_modules/@mui/material/CircularProgress/index.d.ts","./node_modules/@mui/material/ClickAwayListener/index.d.ts","./node_modules/@mui/material/Collapse/collapseClasses.d.ts","./node_modules/@mui/material/Collapse/Collapse.d.ts","./node_modules/@mui/material/Collapse/index.d.ts","./node_modules/@mui/material/Container/containerClasses.d.ts","./node_modules/@mui/material/Container/Container.d.ts","./node_modules/@mui/material/Container/index.d.ts","./node_modules/@mui/material/CssBaseline/CssBaseline.d.ts","./node_modules/@mui/material/CssBaseline/index.d.ts","./node_modules/@mui/material/darkScrollbar/index.d.ts","./node_modules/@mui/material/Portal/index.d.ts","./node_modules/@mui/material/Modal/modalClasses.d.ts","./node_modules/@mui/material/Modal/Modal.d.ts","./node_modules/@mui/material/Modal/index.d.ts","./node_modules/@mui/material/Dialog/dialogClasses.d.ts","./node_modules/@mui/material/Dialog/Dialog.d.ts","./node_modules/@mui/material/Dialog/index.d.ts","./node_modules/@mui/material/DialogActions/dialogActionsClasses.d.ts","./node_modules/@mui/material/DialogActions/DialogActions.d.ts","./node_modules/@mui/material/DialogActions/index.d.ts","./node_modules/@mui/material/DialogContent/dialogContentClasses.d.ts","./node_modules/@mui/material/DialogContent/DialogContent.d.ts","./node_modules/@mui/material/DialogContent/index.d.ts","./node_modules/@mui/material/DialogContentText/dialogContentTextClasses.d.ts","./node_modules/@mui/material/DialogContentText/DialogContentText.d.ts","./node_modules/@mui/material/DialogContentText/index.d.ts","./node_modules/@mui/material/DialogTitle/dialogTitleClasses.d.ts","./node_modules/@mui/material/DialogTitle/DialogTitle.d.ts","./node_modules/@mui/material/DialogTitle/index.d.ts","./node_modules/@mui/material/Divider/dividerClasses.d.ts","./node_modules/@mui/material/Divider/Divider.d.ts","./node_modules/@mui/material/Divider/index.d.ts","./node_modules/@mui/material/Slide/Slide.d.ts","./node_modules/@mui/material/Slide/index.d.ts","./node_modules/@mui/material/Drawer/drawerClasses.d.ts","./node_modules/@mui/material/Drawer/Drawer.d.ts","./node_modules/@mui/material/Drawer/index.d.ts","./node_modules/@mui/material/Fab/fabClasses.d.ts","./node_modules/@mui/material/Fab/Fab.d.ts","./node_modules/@mui/material/Fab/index.d.ts","./node_modules/@mui/material/InputBase/inputBaseClasses.d.ts","./node_modules/@mui/material/InputBase/InputBase.d.ts","./node_modules/@mui/material/InputBase/index.d.ts","./node_modules/@mui/material/FilledInput/filledInputClasses.d.ts","./node_modules/@mui/material/FilledInput/FilledInput.d.ts","./node_modules/@mui/material/FilledInput/index.d.ts","./node_modules/@mui/material/FormControl/formControlClasses.d.ts","./node_modules/@mui/material/FormControl/FormControl.d.ts","./node_modules/@mui/material/FormControl/FormControlContext.d.ts","./node_modules/@mui/material/FormControl/useFormControl.d.ts","./node_modules/@mui/material/FormControl/index.d.ts","./node_modules/@mui/material/FormControlLabel/formControlLabelClasses.d.ts","./node_modules/@mui/material/FormControlLabel/FormControlLabel.d.ts","./node_modules/@mui/material/FormControlLabel/index.d.ts","./node_modules/@mui/material/FormGroup/formGroupClasses.d.ts","./node_modules/@mui/material/FormGroup/FormGroup.d.ts","./node_modules/@mui/material/FormGroup/index.d.ts","./node_modules/@mui/material/FormHelperText/formHelperTextClasses.d.ts","./node_modules/@mui/material/FormHelperText/FormHelperText.d.ts","./node_modules/@mui/material/FormHelperText/index.d.ts","./node_modules/@mui/material/FormLabel/formLabelClasses.d.ts","./node_modules/@mui/material/FormLabel/FormLabel.d.ts","./node_modules/@mui/material/FormLabel/index.d.ts","./node_modules/@mui/material/Unstable_Grid2/Grid2Props.d.ts","./node_modules/@mui/material/Unstable_Grid2/Grid2.d.ts","./node_modules/@mui/material/Unstable_Grid2/grid2Classes.d.ts","./node_modules/@mui/material/Unstable_Grid2/index.d.ts","./node_modules/@mui/material/Grow/Grow.d.ts","./node_modules/@mui/material/Grow/index.d.ts","./node_modules/@mui/material/Hidden/Hidden.d.ts","./node_modules/@mui/material/Hidden/index.d.ts","./node_modules/@mui/material/Icon/iconClasses.d.ts","./node_modules/@mui/material/Icon/Icon.d.ts","./node_modules/@mui/material/Icon/index.d.ts","./node_modules/@mui/material/IconButton/iconButtonClasses.d.ts","./node_modules/@mui/material/IconButton/IconButton.d.ts","./node_modules/@mui/material/IconButton/index.d.ts","./node_modules/@mui/material/ImageList/imageListClasses.d.ts","./node_modules/@mui/material/ImageList/ImageList.d.ts","./node_modules/@mui/material/ImageList/index.d.ts","./node_modules/@mui/material/ImageListItem/imageListItemClasses.d.ts","./node_modules/@mui/material/ImageListItem/ImageListItem.d.ts","./node_modules/@mui/material/ImageListItem/index.d.ts","./node_modules/@mui/material/ImageListItemBar/imageListItemBarClasses.d.ts","./node_modules/@mui/material/ImageListItemBar/ImageListItemBar.d.ts","./node_modules/@mui/material/ImageListItemBar/index.d.ts","./node_modules/@mui/material/Input/inputClasses.d.ts","./node_modules/@mui/material/Input/Input.d.ts","./node_modules/@mui/material/Input/index.d.ts","./node_modules/@mui/material/InputAdornment/inputAdornmentClasses.d.ts","./node_modules/@mui/material/InputAdornment/InputAdornment.d.ts","./node_modules/@mui/material/InputAdornment/index.d.ts","./node_modules/@mui/material/InputLabel/inputLabelClasses.d.ts","./node_modules/@mui/material/InputLabel/InputLabel.d.ts","./node_modules/@mui/material/InputLabel/index.d.ts","./node_modules/@mui/material/LinearProgress/linearProgressClasses.d.ts","./node_modules/@mui/material/LinearProgress/LinearProgress.d.ts","./node_modules/@mui/material/LinearProgress/index.d.ts","./node_modules/@mui/material/Link/linkClasses.d.ts","./node_modules/@mui/material/Link/Link.d.ts","./node_modules/@mui/material/Link/index.d.ts","./node_modules/@mui/material/List/listClasses.d.ts","./node_modules/@mui/material/List/List.d.ts","./node_modules/@mui/material/List/index.d.ts","./node_modules/@mui/material/ListItem/listItemClasses.d.ts","./node_modules/@mui/material/ListItem/ListItem.d.ts","./node_modules/@mui/material/ListItem/index.d.ts","./node_modules/@mui/material/ListItemAvatar/listItemAvatarClasses.d.ts","./node_modules/@mui/material/ListItemAvatar/ListItemAvatar.d.ts","./node_modules/@mui/material/ListItemAvatar/index.d.ts","./node_modules/@mui/material/ListItemButton/listItemButtonClasses.d.ts","./node_modules/@mui/material/ListItemButton/ListItemButton.d.ts","./node_modules/@mui/material/ListItemButton/index.d.ts","./node_modules/@mui/material/ListItemIcon/listItemIconClasses.d.ts","./node_modules/@mui/material/ListItemIcon/ListItemIcon.d.ts","./node_modules/@mui/material/ListItemIcon/index.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.d.ts","./node_modules/@mui/material/ListItemSecondaryAction/index.d.ts","./node_modules/@mui/material/ListItemText/listItemTextClasses.d.ts","./node_modules/@mui/material/ListItemText/ListItemText.d.ts","./node_modules/@mui/material/ListItemText/index.d.ts","./node_modules/@mui/material/ListSubheader/listSubheaderClasses.d.ts","./node_modules/@mui/material/ListSubheader/ListSubheader.d.ts","./node_modules/@mui/material/ListSubheader/index.d.ts","./node_modules/@mui/material/Popover/popoverClasses.d.ts","./node_modules/@mui/material/Popover/Popover.d.ts","./node_modules/@mui/material/Popover/index.d.ts","./node_modules/@mui/material/MenuList/MenuList.d.ts","./node_modules/@mui/material/MenuList/index.d.ts","./node_modules/@mui/material/Menu/menuClasses.d.ts","./node_modules/@mui/material/Menu/Menu.d.ts","./node_modules/@mui/material/Menu/index.d.ts","./node_modules/@mui/material/MenuItem/menuItemClasses.d.ts","./node_modules/@mui/material/MenuItem/MenuItem.d.ts","./node_modules/@mui/material/MenuItem/index.d.ts","./node_modules/@mui/material/MobileStepper/mobileStepperClasses.d.ts","./node_modules/@mui/material/MobileStepper/MobileStepper.d.ts","./node_modules/@mui/material/MobileStepper/index.d.ts","./node_modules/@mui/material/NativeSelect/NativeSelectInput.d.ts","./node_modules/@mui/material/NativeSelect/nativeSelectClasses.d.ts","./node_modules/@mui/material/NativeSelect/NativeSelect.d.ts","./node_modules/@mui/material/NativeSelect/index.d.ts","./node_modules/@mui/material/NoSsr/index.d.ts","./node_modules/@mui/material/OutlinedInput/outlinedInputClasses.d.ts","./node_modules/@mui/material/OutlinedInput/OutlinedInput.d.ts","./node_modules/@mui/material/OutlinedInput/index.d.ts","./node_modules/@mui/material/usePagination/usePagination.d.ts","./node_modules/@mui/material/Pagination/paginationClasses.d.ts","./node_modules/@mui/material/Pagination/Pagination.d.ts","./node_modules/@mui/material/Pagination/index.d.ts","./node_modules/@mui/material/PaginationItem/paginationItemClasses.d.ts","./node_modules/@mui/material/PaginationItem/PaginationItem.d.ts","./node_modules/@mui/material/PaginationItem/index.d.ts","./node_modules/@mui/material/Radio/radioClasses.d.ts","./node_modules/@mui/material/Radio/Radio.d.ts","./node_modules/@mui/material/Radio/index.d.ts","./node_modules/@mui/material/RadioGroup/RadioGroup.d.ts","./node_modules/@mui/material/RadioGroup/RadioGroupContext.d.ts","./node_modules/@mui/material/RadioGroup/useRadioGroup.d.ts","./node_modules/@mui/material/RadioGroup/index.d.ts","./node_modules/@mui/material/Rating/ratingClasses.d.ts","./node_modules/@mui/material/Rating/Rating.d.ts","./node_modules/@mui/material/Rating/index.d.ts","./node_modules/@mui/material/ScopedCssBaseline/scopedCssBaselineClasses.d.ts","./node_modules/@mui/material/ScopedCssBaseline/ScopedCssBaseline.d.ts","./node_modules/@mui/material/ScopedCssBaseline/index.d.ts","./node_modules/@mui/material/Select/SelectInput.d.ts","./node_modules/@mui/material/Select/selectClasses.d.ts","./node_modules/@mui/material/Select/Select.d.ts","./node_modules/@mui/material/Select/index.d.ts","./node_modules/@mui/material/Skeleton/skeletonClasses.d.ts","./node_modules/@mui/material/Skeleton/Skeleton.d.ts","./node_modules/@mui/material/Skeleton/index.d.ts","./node_modules/@mui/material/Slider/SliderValueLabel.types.d.ts","./node_modules/@mui/material/Slider/SliderValueLabel.d.ts","./node_modules/@mui/material/Slider/sliderClasses.d.ts","./node_modules/@mui/material/Slider/Slider.d.ts","./node_modules/@mui/material/Slider/index.d.ts","./node_modules/@mui/material/SnackbarContent/snackbarContentClasses.d.ts","./node_modules/@mui/material/SnackbarContent/SnackbarContent.d.ts","./node_modules/@mui/material/SnackbarContent/index.d.ts","./node_modules/@mui/material/Snackbar/snackbarClasses.d.ts","./node_modules/@mui/material/Snackbar/Snackbar.d.ts","./node_modules/@mui/material/Snackbar/index.d.ts","./node_modules/@mui/material/transitions/index.d.ts","./node_modules/@mui/material/SpeedDial/speedDialClasses.d.ts","./node_modules/@mui/material/SpeedDial/SpeedDial.d.ts","./node_modules/@mui/material/SpeedDial/index.d.ts","./node_modules/@mui/material/Tooltip/tooltipClasses.d.ts","./node_modules/@mui/material/Tooltip/Tooltip.d.ts","./node_modules/@mui/material/Tooltip/index.d.ts","./node_modules/@mui/material/SpeedDialAction/speedDialActionClasses.d.ts","./node_modules/@mui/material/SpeedDialAction/SpeedDialAction.d.ts","./node_modules/@mui/material/SpeedDialAction/index.d.ts","./node_modules/@mui/material/SpeedDialIcon/speedDialIconClasses.d.ts","./node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.d.ts","./node_modules/@mui/material/SpeedDialIcon/index.d.ts","./node_modules/@mui/material/Stack/Stack.d.ts","./node_modules/@mui/material/Stack/stackClasses.d.ts","./node_modules/@mui/material/Stack/index.d.ts","./node_modules/@mui/material/Step/stepClasses.d.ts","./node_modules/@mui/material/Step/Step.d.ts","./node_modules/@mui/material/Step/StepContext.d.ts","./node_modules/@mui/material/Step/index.d.ts","./node_modules/@mui/material/StepButton/stepButtonClasses.d.ts","./node_modules/@mui/material/StepButton/StepButton.d.ts","./node_modules/@mui/material/StepButton/index.d.ts","./node_modules/@mui/material/StepConnector/stepConnectorClasses.d.ts","./node_modules/@mui/material/StepConnector/StepConnector.d.ts","./node_modules/@mui/material/StepConnector/index.d.ts","./node_modules/@mui/material/StepContent/stepContentClasses.d.ts","./node_modules/@mui/material/StepContent/StepContent.d.ts","./node_modules/@mui/material/StepContent/index.d.ts","./node_modules/@mui/material/StepIcon/stepIconClasses.d.ts","./node_modules/@mui/material/StepIcon/StepIcon.d.ts","./node_modules/@mui/material/StepIcon/index.d.ts","./node_modules/@mui/material/StepLabel/stepLabelClasses.d.ts","./node_modules/@mui/material/StepLabel/StepLabel.d.ts","./node_modules/@mui/material/StepLabel/index.d.ts","./node_modules/@mui/material/Stepper/stepperClasses.d.ts","./node_modules/@mui/material/Stepper/Stepper.d.ts","./node_modules/@mui/material/Stepper/StepperContext.d.ts","./node_modules/@mui/material/Stepper/index.d.ts","./node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.d.ts","./node_modules/@mui/material/SwipeableDrawer/index.d.ts","./node_modules/@mui/material/Switch/switchClasses.d.ts","./node_modules/@mui/material/Switch/Switch.d.ts","./node_modules/@mui/material/Switch/index.d.ts","./node_modules/@mui/material/Tab/tabClasses.d.ts","./node_modules/@mui/material/Tab/Tab.d.ts","./node_modules/@mui/material/Tab/index.d.ts","./node_modules/@mui/material/Table/tableClasses.d.ts","./node_modules/@mui/material/Table/Table.d.ts","./node_modules/@mui/material/Table/index.d.ts","./node_modules/@mui/material/TableBody/tableBodyClasses.d.ts","./node_modules/@mui/material/TableBody/TableBody.d.ts","./node_modules/@mui/material/TableBody/index.d.ts","./node_modules/@mui/material/TableCell/tableCellClasses.d.ts","./node_modules/@mui/material/TableCell/TableCell.d.ts","./node_modules/@mui/material/TableCell/index.d.ts","./node_modules/@mui/material/TableContainer/tableContainerClasses.d.ts","./node_modules/@mui/material/TableContainer/TableContainer.d.ts","./node_modules/@mui/material/TableContainer/index.d.ts","./node_modules/@mui/material/TableFooter/tableFooterClasses.d.ts","./node_modules/@mui/material/TableFooter/TableFooter.d.ts","./node_modules/@mui/material/TableFooter/index.d.ts","./node_modules/@mui/material/TableHead/tableHeadClasses.d.ts","./node_modules/@mui/material/TableHead/TableHead.d.ts","./node_modules/@mui/material/TableHead/index.d.ts","./node_modules/@mui/material/TablePagination/TablePaginationActions.d.ts","./node_modules/@mui/material/TablePagination/tablePaginationClasses.d.ts","./node_modules/@mui/material/TablePagination/TablePagination.d.ts","./node_modules/@mui/material/TablePagination/index.d.ts","./node_modules/@mui/material/TableRow/tableRowClasses.d.ts","./node_modules/@mui/material/TableRow/TableRow.d.ts","./node_modules/@mui/material/TableRow/index.d.ts","./node_modules/@mui/material/TableSortLabel/tableSortLabelClasses.d.ts","./node_modules/@mui/material/TableSortLabel/TableSortLabel.d.ts","./node_modules/@mui/material/TableSortLabel/index.d.ts","./node_modules/@mui/material/TabScrollButton/tabScrollButtonClasses.d.ts","./node_modules/@mui/material/TabScrollButton/TabScrollButton.d.ts","./node_modules/@mui/material/TabScrollButton/index.d.ts","./node_modules/@mui/material/Tabs/tabsClasses.d.ts","./node_modules/@mui/material/Tabs/Tabs.d.ts","./node_modules/@mui/material/Tabs/index.d.ts","./node_modules/@mui/material/TextField/textFieldClasses.d.ts","./node_modules/@mui/material/TextField/TextField.d.ts","./node_modules/@mui/material/TextField/index.d.ts","./node_modules/@mui/material/TextareaAutosize/index.d.ts","./node_modules/@mui/material/ToggleButton/toggleButtonClasses.d.ts","./node_modules/@mui/material/ToggleButton/ToggleButton.d.ts","./node_modules/@mui/material/ToggleButton/index.d.ts","./node_modules/@mui/material/ToggleButtonGroup/toggleButtonGroupClasses.d.ts","./node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.d.ts","./node_modules/@mui/material/ToggleButtonGroup/index.d.ts","./node_modules/@mui/material/Toolbar/toolbarClasses.d.ts","./node_modules/@mui/material/Toolbar/Toolbar.d.ts","./node_modules/@mui/material/Toolbar/index.d.ts","./node_modules/@mui/material/useMediaQuery/useMediaQuery.d.ts","./node_modules/@mui/material/useMediaQuery/index.d.ts","./node_modules/@mui/material/useScrollTrigger/useScrollTrigger.d.ts","./node_modules/@mui/material/useScrollTrigger/index.d.ts","./node_modules/@mui/material/Zoom/Zoom.d.ts","./node_modules/@mui/material/Zoom/index.d.ts","./node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts","./node_modules/@mui/material/useAutocomplete/index.d.ts","./node_modules/@mui/material/GlobalStyles/GlobalStyles.d.ts","./node_modules/@mui/material/GlobalStyles/index.d.ts","./node_modules/@mui/material/generateUtilityClass/index.d.ts","./node_modules/@mui/material/generateUtilityClasses/index.d.ts","./node_modules/@mui/material/Unstable_TrapFocus/index.d.ts","./node_modules/@mui/material/index.d.ts","./node_modules/@mui/material/styles/createPalette.d.ts","./node_modules/@mui/material/styles/shadows.d.ts","./node_modules/@mui/material/styles/createTransitions.d.ts","./node_modules/@mui/material/styles/zIndex.d.ts","./node_modules/@mui/material/styles/props.d.ts","./node_modules/@mui/material/styles/overrides.d.ts","./node_modules/@mui/material/styles/variants.d.ts","./node_modules/@mui/material/styles/components.d.ts","./node_modules/@mui/material/styles/createTheme.d.ts","./node_modules/@mui/material/styles/adaptV4Theme.d.ts","./node_modules/@mui/material/styles/createStyles.d.ts","./node_modules/@mui/material/styles/responsiveFontSizes.d.ts","./node_modules/@mui/material/styles/useTheme.d.ts","./node_modules/@mui/material/styles/useThemeProps.d.ts","./node_modules/@mui/material/styles/styled.d.ts","./node_modules/@mui/material/styles/ThemeProvider.d.ts","./node_modules/@mui/material/styles/cssUtils.d.ts","./node_modules/@mui/material/styles/makeStyles.d.ts","./node_modules/@mui/material/styles/withStyles.d.ts","./node_modules/@mui/material/styles/withTheme.d.ts","./node_modules/@mui/material/styles/experimental_extendTheme.d.ts","./node_modules/@mui/material/styles/CssVarsProvider.d.ts","./node_modules/@mui/material/styles/getOverlayAlpha.d.ts","./node_modules/@mui/material/styles/shouldSkipGeneratingVar.d.ts","./node_modules/@mui/material/styles/excludeVariablesFromRoot.d.ts","./node_modules/@mui/material/styles/index.d.ts","./node_modules/@mui/material/Grid/gridClasses.d.ts","./node_modules/@mui/material/Grid/Grid.d.ts","./node_modules/@mui/material/Grid/index.d.ts","./node_modules/axios/index.d.ts","./src/crypto-material/crypto-material.json","./src/api-calls/common.tsx","./src/api-calls/fabric-api.tsx","./src/components/dialogs/MintDialog.tsx","./src/api-calls/besu-api.tsx","./src/components/dialogs/TransferDialog.tsx","./node_modules/@types/uuid/index.d.ts","./src/components/dialogs/EscrowDialog.tsx","./src/models/AssetReference.tsx","./src/components/dialogs/BridgeOutDialog.tsx","./src/components/dialogs/BridgeBackDialog.tsx","./src/components/ActionsContainer.tsx","./src/components/SessionReferencesTable.tsx","./src/components/Ledger.tsx","./src/components/dialogs/ConnectionErrorDialog.tsx","./src/pages/HomePage.tsx","./src/App.tsx","./node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index.d.ts","./node_modules/@types/react-dom/client.d.ts","./src/index.tsx","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","./node_modules/@types/react-dom/index.d.ts","./node_modules/react-scripts/lib/react-app.d.ts","./src/react-app-env.d.ts","../../node_modules/@types/adm-zip/util.d.ts","../../node_modules/@types/adm-zip/index.d.ts","../../node_modules/@types/babel__generator/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/http-cache-semantics/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/node-fetch/node_modules/form-data/index.d.ts","../../node_modules/@types/node-fetch/externals.d.ts","../../node_modules/@types/node-fetch/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/scheduler/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/through/index.d.ts","../../node_modules/@types/tape/index.d.ts","../../node_modules/@types/tape-promise/node_modules/@types/tape/index.d.ts","../../node_modules/@types/tape-promise/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../node_modules/@types/yoga-layout/index.d.ts","../../typings/async-exit-hook/index.d.ts","../../typings/convict-format-with-validator/index.d.ts","../../typings/es-main/index.d.ts","../../typings/is-port-reachable/index.d.ts","../../node_modules/web3-types/lib/commonjs/error_types.d.ts","../../node_modules/web3-types/lib/commonjs/primitives_types.d.ts","../../node_modules/web3-types/lib/commonjs/eth_types.d.ts","../../node_modules/web3-types/lib/commonjs/apis/eth_execution_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/web3_eth_execution_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/web3_net_api.d.ts","../../node_modules/web3-types/lib/commonjs/apis/eth_personal_api.d.ts","../../node_modules/web3-types/lib/commonjs/data_format_types.d.ts","../../node_modules/web3-types/lib/commonjs/utility_types.d.ts","../../node_modules/web3-types/lib/commonjs/eth_abi_types.d.ts","../../node_modules/web3-types/lib/commonjs/json_rpc_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_api_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_deferred_promise_type.d.ts","../../node_modules/web3-types/lib/commonjs/web3_base_provider.d.ts","../../node_modules/web3-types/lib/commonjs/eth_contract_types.d.ts","../../node_modules/web3-types/lib/commonjs/web3_base_wallet.d.ts","../../node_modules/web3-types/lib/commonjs/index.d.ts","../../node_modules/web3-core/lib/commonjs/types.d.ts","../../node_modules/web3-core/lib/commonjs/web3_event_emitter.d.ts","../../node_modules/web3-core/lib/commonjs/web3_request_manager.d.ts","../../node_modules/web3-core/lib/commonjs/web3_subscription_manager.d.ts","../../node_modules/web3-core/lib/commonjs/web3_subscriptions.d.ts","../../node_modules/web3-utils/lib/commonjs/converters.d.ts","../../node_modules/zod/lib/helpers/typeAliases.d.ts","../../node_modules/zod/lib/helpers/util.d.ts","../../node_modules/zod/lib/ZodError.d.ts","../../node_modules/zod/lib/locales/en.d.ts","../../node_modules/zod/lib/errors.d.ts","../../node_modules/zod/lib/helpers/parseUtil.d.ts","../../node_modules/zod/lib/helpers/enumUtil.d.ts","../../node_modules/zod/lib/helpers/errorUtil.d.ts","../../node_modules/zod/lib/helpers/partialUtil.d.ts","../../node_modules/zod/lib/types.d.ts","../../node_modules/zod/lib/external.d.ts","../../node_modules/zod/lib/index.d.ts","../../node_modules/zod/index.d.ts","../../node_modules/web3-validator/lib/commonjs/types.d.ts","../../node_modules/web3-validator/lib/commonjs/web3_validator.d.ts","../../node_modules/web3-validator/lib/commonjs/default_validator.d.ts","../../node_modules/web3-validator/lib/commonjs/utils.d.ts","../../node_modules/web3-errors/lib/commonjs/error_codes.d.ts","../../node_modules/web3-errors/lib/commonjs/web3_error_base.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/account_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/connection_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/contract_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/ens_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/generic_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/provider_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/signature_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/transaction_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/utils_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/response_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/core_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/rpc_errors.d.ts","../../node_modules/web3-errors/lib/commonjs/errors/rpc_error_messages.d.ts","../../node_modules/web3-errors/lib/commonjs/index.d.ts","../../node_modules/web3-validator/lib/commonjs/errors.d.ts","../../node_modules/web3-validator/lib/commonjs/constants.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/address.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/block.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/bloom.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/boolean.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/bytes.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/eth.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/filter.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/numbers.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/string.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/topic.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/object.d.ts","../../node_modules/web3-validator/lib/commonjs/validation/index.d.ts","../../node_modules/web3-validator/lib/commonjs/index.d.ts","../../node_modules/web3-utils/lib/commonjs/validation.d.ts","../../node_modules/web3-utils/lib/commonjs/formatter.d.ts","../../node_modules/web3-utils/lib/commonjs/hash.d.ts","../../node_modules/web3-utils/lib/commonjs/random.d.ts","../../node_modules/web3-utils/lib/commonjs/string_manipulation.d.ts","../../node_modules/web3-utils/lib/commonjs/objects.d.ts","../../node_modules/web3-utils/lib/commonjs/promise_helpers.d.ts","../../node_modules/web3-utils/lib/commonjs/json_rpc.d.ts","../../node_modules/web3-utils/lib/commonjs/web3_deferred_promise.d.ts","../../node_modules/web3-utils/lib/commonjs/chunk_response_parser.d.ts","../../node_modules/web3-utils/lib/commonjs/uuid.d.ts","../../node_modules/web3-utils/lib/commonjs/web3_eip1193_provider.d.ts","../../node_modules/web3-utils/lib/commonjs/socket_provider.d.ts","../../node_modules/web3-utils/lib/commonjs/uint8array.d.ts","../../node_modules/web3-utils/lib/commonjs/index.d.ts","../../node_modules/web3-core/lib/commonjs/web3_batch_request.d.ts","../../node_modules/web3-core/lib/commonjs/web3_context.d.ts","../../node_modules/web3-core/lib/commonjs/web3_config.d.ts","../../node_modules/web3-core/lib/commonjs/utils.d.ts","../../node_modules/web3-core/lib/commonjs/formatters.d.ts","../../node_modules/web3-core/lib/commonjs/web3_promi_event.d.ts","../../node_modules/web3-core/lib/commonjs/index.d.ts","../../node_modules/web3-eth/lib/commonjs/types.d.ts","../../node_modules/web3-eth/lib/commonjs/web3_subscriptions.d.ts","../../node_modules/web3-eth/lib/commonjs/web3_eth.d.ts","../../node_modules/web3-eth/lib/commonjs/schemas.d.ts","../../node_modules/web3-eth/lib/commonjs/validation.d.ts","../../node_modules/web3-eth/lib/commonjs/rpc_method_wrappers.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/format_transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/enums.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/common.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/address.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/utils.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/common/index.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/baseTransaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/eip1559Transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/eip2930Transaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/legacyTransaction.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/transactionFactory.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/tx/index.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/types.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/wallet.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/account.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/schemas.d.ts","../../node_modules/web3-eth-accounts/lib/commonjs/index.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/prepare_transaction_for_signing.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/detect_transaction_type.d.ts","../../node_modules/web3-eth/lib/commonjs/utils/transaction_builder.d.ts","../../node_modules/web3-eth/lib/commonjs/index.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/config.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/types.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/log_subscription.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/contract.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/encoding.d.ts","../../node_modules/web3-eth-contract/lib/commonjs/index.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/abi/ens/PublicResolver.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/ens.d.ts","../../node_modules/web3-eth-ens/lib/commonjs/index.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/types.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/iban.d.ts","../../node_modules/web3-eth-iban/lib/commonjs/index.d.ts","../../node_modules/web3-eth-personal/lib/commonjs/personal.d.ts","../../node_modules/web3-eth-personal/lib/commonjs/index.d.ts","../../node_modules/web3-net/lib/commonjs/net.d.ts","../../node_modules/web3-net/lib/commonjs/rpc_method_wrappers.d.ts","../../node_modules/web3-net/lib/commonjs/index.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/errors_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/events_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/functions_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/logs_api.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/api/parameters_api.d.ts","../../node_modules/@ethersproject/bytes/lib/index.d.ts","../../node_modules/@ethersproject/bignumber/lib/bignumber.d.ts","../../node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts","../../node_modules/@ethersproject/bignumber/lib/index.d.ts","../../node_modules/@ethersproject/abi/lib/fragments.d.ts","../../node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts","../../node_modules/@ethersproject/abi/lib/abi-coder.d.ts","../../node_modules/@ethersproject/properties/lib/index.d.ts","../../node_modules/@ethersproject/abi/lib/interface.d.ts","../../node_modules/@ethersproject/abi/lib/index.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/utils.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/decode_contract_error_data.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/eip_712.d.ts","../../node_modules/web3-eth-abi/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/types.d.ts","../../node_modules/web3/lib/commonjs/web3.d.ts","../../node_modules/web3-providers-http/lib/commonjs/types.d.ts","../../node_modules/web3-providers-http/lib/commonjs/index.d.ts","../../node_modules/isomorphic-ws/index.d.ts","../../node_modules/web3-providers-ws/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/eth.exports.d.ts","../../node_modules/web3/lib/commonjs/providers.exports.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/web3-types/src/primitives_types.ts","../../node_modules/web3-types/src/eth_types.ts","../../node_modules/web3-rpc-methods/lib/commonjs/eth_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/net_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/personal_rpc_methods.d.ts","../../node_modules/web3-rpc-methods/lib/commonjs/index.d.ts","../../node_modules/web3/lib/commonjs/index.d.ts","../../node_modules/buffer/index.d.ts","../../typings/web3js-quorum/index.d.ts","./node_modules/@types/react-dom/node_modules/@types/react/ts5.0/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1cd0c5f52256a99ffee5c9f9f964100bc2cb34372801588b76032a4caf85edd2","affectsGlobalScope":true},"097be2e0b1fe3b3fbb093259f6043fdf59c88f9db681c39ce90f76c5f038ca8a","f1cbfb4a882d5292086a912bc20cc69eef140ab0eb583c7e5dc9a3333393000a","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","531cd80e4dba2620d86844a50e7d21b89436e56a14e66d6774e99b3759ac69ad","c83a76ad0bf69b0176042adfc65f8c6be7dd1141b66cfa20954520315dcf2c1a","af99fcbddd1d45ac4b1ab3d21ef6665c3a4c78003f3dcf2855f406e0d41f5545","cd805bb241b70dcb5eb3ddf78a23c561c81528a0e4baeb10ccfb967705c9132b","83e56d3337e1a6dbafdbe5a2502a84c330b1a328ed2860d689b2ded82b1f5c95","f186de91b1c50640e4d2bef41307ee06446d7ec76f787d4384ef808981025546","4886055af73784b27ea115b68763c1c0c30df8528ba50e7d1d3e0922c6e7d8e3","e0407a1b8afc9b03d6b3063a3c8a80f4c769146bbd39fccd5ade9df5c4ffb703","ae1d409a961b46f0b0c2b1dbb51ddf298e161698b7ebc3360dbae8cd6837f06e","cc051639247f18781cd39ae70ae4606902fb5e7ea104c1b2a4927af5cfd05693","40a5bb1733bb8fb3ffa425b92db062334f9b998ba8ad4390cc8008cc2ce701ed","0cc48e862938eccfe92ba6c7daaf5fa144bbc60ed8d547c33dadeff1ab788cd5","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","cb5945305653cc61b0b16a840c8ad2bd6006450a2f91012b3974cc413214a139","1f4ae6e7f749aa9a53317baa0e26dc98317f87c54a323250f0aa6d8689fcb5ac","1bfd2c00081dd582489d1d0dd64d270b9c8bc5a62cc9882865b405bf8c2d9b03","8ec030fc57edbbd19ad4752695ef72f7e68747092a66476422e04f9a9dffeef3","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","8ea05ab5a1250aa9d98070151c3981a85f5fd05185454f6c871ca2a988feb725","0e1f5fa05f1097f2cc3a1581afc7270af08d31be123f3a8e92a5b4080858861e","655638506266d44bc4815f7fda912d712114e200aa11ce4dee055d357dba96c5","4df00cb9ba2bc813c1c5fb996d0282133346b3d320c2b8e6e77c5b8f426182b8","03fd06fcc894c94effaef2fc57d92c9e2871c6a5adb2db7136859a6ceff3f91a","f9a7c89ccff78b8a80e7caa18cda3ddf3718a26a3640dd50b299d90ac405f9be","9c78ad8f4f43db74529e2f40798ca4a8f9a2b09cad5363c400aa7ce691691ad8","4680182e054eef3b7eca5d9168a70191033b4da65cf8d013a6ced7ff6948bc80","f2e258dede3b70e146e3ea257edb8e3a4c59ad9ac5061a60154f5998d55b031b","3bd6ffa4f64fbbc031c1503c3ce63fa6e2134deb673c8571130a3675d91fcb17","1083ae62e780d862a001f7baeb2c8eb49589da9faf2e10e471ddd117b2d1f40a","53fd33fd439c753899684518742fef08106dc63afcc1c9f62353eff3601e7fdb","9a2e75d1d72d7463cb3a0d4a01c5648bdb4f54866acaffb0360da91234c0df8c","2d157fcd4056b3190ae9427cc822f395d30076594ee803fb7623b17570c8f4a5","47dada41ced5a0e23c415fb8599b1b8c848fdd1df1b2f02b2e756558be9b3153","b0a59b88d6d32ed5734ac9413f8a9e34773d4b7b0eddaeccdecee24ab8a4457d","492dae861616e49ded6e82df7110868489b8f80cebb5f56bbe05bbf829f8a6fc","dd4e64e454be95294aceb5286575faa08af11ebacc2c524310be108c1abd2a84","3711c896e72680d79cfc4df36cae172b7dbb72e11936e5e9545f5351e6ed0962","fdb706b594619f05e73b97213d760f59ed1514b302f58b4b46d86fe77757c031","f0623fef3752e3b67ed969c7e1c311528b5b54e3b43d8bbc26073ae34387d9a6","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","c6b95b2822c6d373dccf05fcd48d3ac615831fc98ed4bcd8fcbe41dfdd8a7ea4","91df8ed021ba6bde734d38d901a2d3664d2c804000299fd9df66290cc300b21c","b7071465f540ceb78d697e547f495d7ba4fddb94f9443bb73c9ba3ef495aaae7","54b0087a8523d0a289460fb3ac4b9ed55633977f2eb7e7f4bba5ff2c1ba972e0","62a0503a7f38a521fac641f3b258516ce3229852cd297920af25f798e319bbe9","7b7840c394a0c5bf219576439776edb4447e9228f0fbbb2a29caa8f4cf6a95fd","794d96375f04d39dc8513db4479a0023d3b8074b9738e38f7c0ac62d9696431d","656b3a9ee8a2eb73218ccddedbaf412751787b303bf5b0e293f2c60443aeeb08","e78dd7346725ac2d936a296d601e01f55eefabd010bee84cd03e20f55bd61a8c","701793d7bdb9be9d8d1ca80092377c9c323899130fa5da8af06b25cc7e2309d7","6c4925eb55a080d0335bbf728fd0824d0e4848d554aa8dd260b83ea8ac7866cd","492dae861616e49ded6e82df7110868489b8f80cebb5f56bbe05bbf829f8a6fc","5ffdfaccf283453aa793c4ed59cb30c3a30bf8c25f9a096b3211c23ccd19e976","5e19a4ddd649b5274e911ed719ef20e76b2b50b195cff0a6128974fa7136a5ed","5c686a3b785db3d56350c9155f8cbc83c741279a186422e813fec9c0b15babdd","0ad44f4aeb0ec1e2f8212fa0d28034a958ccbfb9f281e611d94bbf042b76b1ef","9a390abc9db6ac661fd36034c0737416e64092b00ad415ef0bc72629542a15bd","9e6c51f61f922f70bf41473a10ca72f8fb6218587a5d305544bc64ca9ebe6768","0f6b337b59b211dd99e8758c9a1906f9dd7027b74bb6e9cb11a14ed1264a54b2","0c5b829baca9b48adbeef6c026e028e10944ef215d3947db17c3f1a0354ebdd1","4b247257463a862b001ae097a3b5b1b90dc536f26b5c10860f46a086d404dbde","d0f2ddd588d6e73c08eb89d8e1bd6913b4e76a556497b81384321f4b308a08f7","d302d9806295f7018e115f0841222106ea13ff08a84b6a65c2a6840161fe06ef","6fb8d589421e9fcb4d885775748fa5a2607d30f7d323b99f39178b0134b24908","ca8d83f4683985cea219b3171d4e2255e270c31fd1c9fa9fee870147928a1a28","01bb683a8d7029615a664f16371d85d6c423f939e642127f267c699b8fdaee67","6f9ccfe772d526c448050c16f5c5e803be9e4250886a5f1bd9710178877d5749","bf11293cd047c76a515ba6e51fe3d9b7c643d1291795183c03ade5caed92cbc3","112df68e96c858f1283368006f6e520981414294c0f6cea7e1d0b15a50ea0ded","d2b80289f4d6e739fa686931a59934d53da37f295f3ad2de994c06c56f9f115f","fe5c41a6b647b418c0b1f8a5b0ae5570f197a15183bf39f1d0f85c5ef779839b","b9eb41c2fe73fd3a4fa20abdb6c8ec11ad75c5047c4a0acea1f54aa412e27087","851df6f9fda2d1de63c60947414b16d0bbace00ba63870268cf9b9ef42411d1a","e0a885c5ea202b9fc29b95447841cc9bfaaecdcbea8930d3b86437e21f24bb8f","1e40aa57e7c8fb77cd6ff7fd4f43d3c71ad9a34cee73786c379c1c2dc6ba5717","08f4c7fe2450260b0765a77c33fb31ec2f74135a3a73b8a66ae23b42477d5b44","603938fc65aab423081f090ca51bccadbbc7b82448b4318ed081df2b1cb915e8","b28232605a97028777b6eaf17263b099dd364be7e5584308ed30fbcbcd4ce64c","36250794500a1817291da6e52645a2c56005488be135970f51d8c5ed5f3d3e8d","4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","98461c5f55d1b191d145af33a258679cc93b41f876315b20f567655642726c11","05034631dc7665c544420c87919787415718eb904c7e377a2deed50f174726c5","cd2b5bd606dbef4a5a0d0ed510e2d53dac00f0ef92db994e1f72ce4525d918d3","ba2151c63fe743790a29e9e8de924e65d5bcb4f51cff999b825afbaf135d592d","2e51f8457814a3e4aa3b73ca27c14d36928a348f85c003bc3b1b8d8797cf0fc9","c4cdadeb3aecf4031106c52c2fb782ba5cdcd7dbefd0a3aba2fd9850f8cdd478","5f4a10115c06510164e18ac8a5b5db1f615f096a40d5c69726bb32309af93252","58e3f7eeaadad8a3f69dff6a59566e9eaa15b11facd397e2b9e199fdb2a84533","537b5657a19792461eefee12e406dbccb7b3fbbf4117e7a443e81e925f6e1b43","c3be2a86d6ab205269fdb5f1da4ab6e7d825f8e119ecc235fc587cec2af2c8f1","a35dd28e140a6ded634995e25fc6c1d1f85eb59ebb18c3afaf5c66de43972fbf","be4bc9c39dd458aa3a993a48dbbfb09be898bf30f3276660b012401ebcc54cbf","25b92cc86a4aa9b088a1abb16c60547951859d4ae12fc909e23d675e6046b4a6","dbe50a407dca6d6143ac10dc3f4a09816ca2604788851d086e621d990eac1662","8b226b564befbf10933d0e3c0f179c522aa024f1472022d9fe35a0addd6e17d1","43d7bf6b658159db2ec49152852d3b25113b50ead0a0088564a83bbc30b5a61d","4ab69812962d1cf86bccfd350af2e07ce74267e90071888f823e1402212bc100","efe27b07f8f5f9dc29e2c64bae34e21c3f755895adb0aa9813733860d5fa41af","c6ca120560597056bb69d12cf8b3f2e05aa15ad6cd2deda6f7b25ebad41b15ea","0bd118496029e7bde27d232865e91eb1e8bd5f1aafdbd8365c2f8862c2122326","8a9fac3501784d42eed037c9b3702a64e51ab0cf862c19a82851b712703e32ff","e00aed0f8e5f35807d735a1fc5424e3a15fcf4052eab5cc59887006db55d5ee7","9ed09d4538e25fc79cefc5e7b5bfbae0464f06d2984f19da009f85d13656c211","38ff09c15f8e6e63f3bcefdfd3259a4fc9b7b337c3fb71a099b95b406cb37bbe","95a5c5e7219403a0d64058de4786e152e71540e824d22d165062489433f21830","32c59dc2691898bcf265c8773e270833b5395b84b97e654cc79db3896af0c79c","7e6942c0b65718725efce0b7fbc5ba928f98a58d7ee9c76ab867556e632b09ff","193b2976612865809ef6fe8b0e0e82dac7ae38a38272960e847e51a30c1a89ad","d8aba69bc718a4fe83c4b9cd272e069a38ec26fd13fbfa43100290ccf1db334c","abcad16e71ad34d3a084e09d37e18346e815acb6d427d3bf963d24444beca822","0f8ab698d1aae2e431ef1be17cc4deffbd49cd19bc1955396ed0dfab01ea3601","26efbde3de3f0c08a94c834ae3edacc28d607674ec604cc059f6dfaada86d216","ddb649b17c362fcf7eed5b9d02eb8ec2bc750e1b3c7192f27adf68ee66847d16","c34bbec1fc5b38f8dbc4c5168193ded6c3711dff5a2d11476bfcdef7ab912d19","46a0b34e1264c4d25ca6646ff0e6cfaa7275ea1ae5a6bc23d4dfd84edf2f2b2e","ced781fd7ea93eb9aa8849bead6b4fc77de4c65331199f4c5b09602c55433c78","fa0ca60be1656ec39e73a9665c107714deca1d97ab7560c62c11c3b284b1eae4","af560c1ff8c707db02ceaf6b3cef02a112c3d75aacadefdd16fd34d1b2229285","e53812b1443dc6bc4e4a69889e3f2b070e37e2b2e2a8de83f2abca3095713bb4","0bd75aa3ce7c1bb233ca29713389cf31cbc4a120d5d23259e0d57812cebcb88a","1fe5971464c95d43d6b783baaf1cabd7c7dc18a01e61077328eb69ce422713df","ebc21e72f3dac91cad3151ddb0bda00063abf1a33026e9be567bb48d85425afd","506f2dd82ae2d9db53d80e21068cb73c483627bb0ebcb8755e93921a2c37b9cb","e86d6b8729dd50078ba088c5074e1c75b89ac5d9eae3f23bd40e836fa0fea955","366da5435836cb0b67247c1a236b449c61aa04fc081665fc7167d80f33fa474b","565f1f221d85fac877f79f93c28fc707c6bbdf7d42fc863aad8225378e4d3d5b","4433dfb23dfb3d272e5909bb251bcbdac65f2b82b407c877ca6ddbf18906e1f5","ebf38053e880b270a69df4860cb1717c456dfaa319d48c88ff49dc45d7134491","1f5973936b80ca510f224b60f2ba970d166be8d8d6fb3ea203d6ad17b10eb920","23f02e8d1ee8019ff837c24e861dcdda70ba155c16a5d157e326cd24a2f9410c","1e8b2624aec425d4735d0f70a5d6cef1f46ecef33370572f70143ceddf85987a","4794c47a68f28eda1d001528fcc5a5fa93f079b3a44d3f97c37d29fa00e93c72","991f4269755278892fbf4c2e2a5d0882a77181310143663755f3b33c71edfeae","b6633c7eae89dd869110002a5c7709263a0f92d499350db2dd4660d0ea81f661","28caba7d9bc8ce812dcf2dc0d27e2b13fa12e75b2b83d3598be16ef3d10c5981","6756086988b5faafb5b0f605f761cd13d4878dc0aca5700e62a79bc3ea6673c2","2a8239b8bee35d3c6793237d428417773ace21b0db27d590e2de4057be8d8d40","1ba9c459522f344c0c069d59428c6fb01bd73e202f8d3d4daf5f5401e1c994cd","103790c6f7fbc7475796f802b76a9412f2a9d1aec6b3412fbc73ee1ae4928fb4","6cbdbaf73d4d277154ce14c64151df4afe8a3d23ec97e7e548f1aaac7e1d035c","2a8e824199271710a46286173586b543ca0f413aeb526709fc59045cf044c44d","5bd3f45bfb146a939c3e0739f9f401358c4cc3b69e433b0234b8f26031a0e300","99bc165363dc39f365aa43cd9ee1e8e852c90a75ba331b61e80b86e6ee28c1b5","b2f527d9297256ef42ec14997a44d4a8a437ffdb510886038562642577ca4c14","ac215a4bb2a5dccb63c39a2eca31a4bf3fd5b78556f94decb2b93909a4480dcf","bb645cc3b8b3ba8ebd06335894c39b5810c7a15cef55f13e3611e802cc90ecae","8be64f740292d91daa049e86c60a4cc955b74049ff5a5f4fa2965bd4b955ece3","fe74d49fff1914ec5ca6b8f3b7ea5f1b92ae06f9d4b4c35c7426ada9c13e9e28","dea7f3ed19e4d06fd55e8d8256811b8fd6d50dc58b786162ff2b1dc5fa5f2200","2f0995efcb2d2d9d3926adee3cb523cd1bd3352be72a0b178cf3e9c9624ce349","6da586222c97b893743b885bb6277102a2a6e5b0f4e8577e3ad18bf43e1227e5","e2785ea1337f71dd4a9fbba7ed714865ee42e2eb952c03ad69a3f440e3f0cb36","c48e28d82c22f46175446a0a9bfab97d8b4d0448d30d6512356fa726d8613003","36d655378874cdba5bb48544f02f261566e4b5fc9da6d059568aa81b9490e2e8","e9aa694406c00009f8bb4a8a29235f219b5cb81c34184bb3ee957764918aaacf","4dca5a6b9792762913ae2a230b782b351405c243244c35ff0a938347144787d2","1b34b58370cbd65fa5a3a58838c3961079d28867a044a2fa449902fe6a5998d9","29eef090b44de47e1265b91a5d5dcc36d989c478b0410b81e0825d13c16f7e8e","27fff93cb53ae9a40c88586558463d9a9565c4951643d80597ce4e2f3e1fbb74","073b157e1b9f89ee0b8067b0b2202a63667d7f3a2d66f2432cc04742796a0c67","065c5e60926dd6d00a85f2e3295aacf71912528416f4e4db53f44be891ef07a8","2d393910ac74ddee8ed6714d156c7155c276dd815f33c114b87d084cde8577f4","0c6096abba365f60377043a7b707e48769bd11a2ae1dac33790d651557f797b1","9df4da519d58916b856971122d79e200f2a3be01fd2a0b4e2a556cc618007824","9d459e023609e74bbc8da58e71d21fafd293bad7130da8fe9c12b2200750ca36","3544b93ce1c4afc26e27889bc1683efb5fa96ccf470c8bb5432fac6111422aa2","6d7180a99a3385df5c383a82d4ceaabeecc227fa83eb9c7c8e7edbcde284ab4c","52d872949bec72fdbd43c683f2de8e6c99812e520d4242140cbb1def52077b52","cfbd3062c931b1e325f9b3d6fc1ebd25246951a0b90267d35af580dc8048490a","0ebcddd81acec871f2a6bb726f6611d367d5c4f6c2ad6ed46a5edaee52e1ecf3","6d6d1b9c3cc0148d3aa40f3f87f6f616a38ad8c1b68b8151b866186a6c85798d","6d754d32de2cfc04c15c77fbe0eda31a2e2e4886b2e4c5e6fec5e24a07d40bb9","13431dd53835377d79adc5e6fb65642cae90612804d18161c6538a348b817c55","4d6b3f10cab65e78389a1618ca68a5258a6b6d2eafc0f454190e011cc0a90d1d","edbf50304ae52ed829961d62d446dd1e3f4fbda1f0e1db1c8934e05b3b73d3be","7880a5552a9c6fe2fed8a970430085ae9b753d5778033e6a704fa6e0aa164589","9c32dc593fd45d6da83ac6e7265247f13da9a4c0beb58f254fd78f97bd883dd5","27e25e7fb2df5c76ce24a2cb6fdacdd031fabe665b4203ba1e8a82efd7ccad85","233fbf69bc142b400afb9aa69f6289593936bc53dcfb464206dd4e65a4194f91","febca747ee287631620e4dd6246ec216dcd4087a5c70b470dee1ab7c6345fb21","c3af43e4c7eab04386d418fbbec22aa2a0a49e995006e79b6ba7ca8bf1b916f6",{"version":"549df62b64a71004aee17685b445a8289013daf96246ce4d9b087d13d7a27a61","affectsGlobalScope":true},{"version":"c14856169f9aa2236e3eaa1748fca0998410c688c69eb248d3d551c220107857","affectsGlobalScope":true},"e27ecc0d7bbbb4b12c9688e2f728e09c0be5a73dff4257008790f60cc6df5d54","9a31aa1eb20cda88b8bb3294036a984a921d64b5e9aa06ca369f8070b2981f81","00cfb9eec13120c639c2ee240b4c0a6baf0604998ff5e515d180de34c8f4fafe","acfcac1415f507f54249ad589297781f3c73b9bfacff1ab9b52b341282d977b7","15e1baa92231dfb9db3cf4ca4a8d2970cfd1e39af7a2116626afda7d33417d92","ee3d1e52d8dc76a01215ad1afe59552639c9b0c09c74dca5ef4a709538277609","bc5ce122aa88a6a2b5a60c538abdd43d2081f1bd7a05c06ee69ba07deab62133","78365b5144a60a751277379c0f3f5e9d1a972c305d5e27d58b1ae920cc0569a5","dc66fb9d538514e75bf3750edb6648961775139c5917217cde4b071666e27e8f","790cfcddd6b7cebbd6d1bc6e70cbdb92acf1b4ab436e5e5dad3437c81a51c2e8","74f567556362194022d151211deaaca8e7c51c4733015be3d0b318df5869eb94","78fca22391d0029ceab9c7e424fea085ba38d0cdefacdd413d04bdb80974cae7","c4285f0b817f5480a4ffe86a977980018dfa65b8918a33af4d8a28150be77869","44b9dbe317108baaa35f5c3d4a1ab7d183001f24517923396e938040c656e590","afa60ee9164efe27fd39fd758994eb8537459ed6bd9c9f0cbba3fa75a14608e6","809aa3df6126d49ec51cbd7038ac0f2bb58f973e048d2c6cfbec76a8cc67d33b","7bccc20bd71f3808e0c4027c7378d1481e9b04af4bf520885a99acf2a2cd09b5","0fa6899ee1f2be4f6d8641a444fbf598af4129acf30bce77f27466b3d0a86cf6","677d6e58592ce107c0c81666e729a52cf0315614108c3838dee7c1f7cd9fdd50","80d210d6e3a8f7a85323e19c7ef7f145ecaf7a29c8ec210c90810736a4a3ef1f","61296e04fa2cb74b694d71d82fcd25416bbbc7c4decebf3e10d521c7fe27a976","69fc3c1f25e765e817ecfc91968fbf6934e4ba304ff998c31b3d0cfc56772957","fd60dd30696507f20e2267d069e30be39f9e7cc55d3e55c947653324fc36c411","eae144f031cb58fc7c94cb2d405c00cba94414a675cab9dd3d88b12a59602f8e","f369dea98bf5569c323f39110018bc30696595504922861cae1522918c9e0701","9680eb7d6043a005972d9241edb571ce9fefa0fb48a23b992c2c9eeef9ec6b76","d76e33115d9942600b6165e8ce3f0eb04a421d20a00d55d76380e02377ec6397","91dc72de609fc31f6b5d86741abfa61efb70a56c843e160182a5bc1a786d964d","2b7d8cabdc3ee40c9e5ed3876d8e9ba2f04a0bf810e2babdb10dc0d371686996","5e14d466f5874656e7fc9588f41ca3211d8f442406bf82482c262ad59e9b43dc","4fd346095bed1cfb30362b6209da2dbd5534a27f49ffcea8e9df14de750fe8e0","6af7d9b2ad1170827701e982a1b95769f3a7b08ea162c192dece873876d09f0d","4bc9bdf594a28cadaf9cc499be2ada848816cb7a04b378972bf45873347971d5","6a4c90f6e3689f67e8a9c631d3ff77d4a7bac080a59f89c58a056281c326b1a9","b9307a714468f1d53e3888f7fd18719e29857ca54bc964a4f3e97581d35471c5","c6427b5dfd9a5cc9ff0550aeed7ef42e65c024a4e49a34f8f1db7b825a2e6f55","1c2ebb5979676c2d7f77c70f31351ff4f67649c9ae691b1fc9d0dc8426437640","81221f7fd89dfd601cc335f254d495fe5700d781f5aaa2cf5f43a31f5383d306","791b7d18616176562896692cdeff84662d2b2ffe3fc33fce2ce338eaa8a8288e","a1cca32c01d9c6d99287fe9d5f25bfb96fba2eabe4cc3e5aec4be0280c15685d","53af44d9509a4c7a9c5928f2141b9621568cd334a4661238fc691e96df7a40e9","b032354f740087e7cc3961da4e87bfa26085d0bc47e04a875d2d9191b68b6ac9","099513a066b37554a605ad177febf4a06ec6d328f1e73d7ac6caf6bc7d0f831a","38578caefd4849aeb72eae5bbeffd8c1461f356bd639df8ccfbf28b925a42584","c6cae95a5b59dff4560051d64521d405deaf2cb2cd90c8639ee7ad75edde0420","dad039587a49a7fc846296ffed0f06cb2a74212d2c790319ec78c3a0c8bce191","b3f74f9b3bd37bc1d94b2d1497573ba6949fd6b301decf93f19538a5c94d63a2","f25b6382d578b787f4312885e3bad371d3d12f9355705263451bcdc68ae7dd74","8ef51fdb94c367e62b740c9be71b3da249265da0501d87151d689879cc575ebc","2a69d1875d56d105f4da73dd0c2c15b02bf28a8be62d5bc20e8ce6567f04ae0e","53cd187bdbfaf22effa99d7dcc8bbad24be8338dc86159a0e2ef24baac4688c4","e2af9d295596a2d18b03476b60994612cd6e24fafffa960b625755025bef2cb4","ac0a0f97c8d727010f54076ae2a6e3117a87dc9404655f6253b96a16994482ae","ba4fc9a7ca9026a2c6a92a209f1b0c00bff74c45942bd7bc4ca21d6091bf4950","9452b044c447276df6982174706b00c0b935f649a6dc3a355b6f012f15e0828c","8a094da2d461d39b5193a9dc61d92b9e8a0caab6dadef87c659b27310b36e221","6f084b6cc2c5dac837b075fe50104fe90b2791efd9966ba0f005966b14dfa3be","f99027d6ba00ccca3d7eeacb764bd81b31e8276d0a6e64eee2eb1e0a269dcacf","eb04fd51a9c7a020dc8bd2b1fb0e686073521f8f25543e502de6138249866a43",{"version":"49a253ec027e56c55c7450a0c331cfe96212b3d1cc215b1710ba94a083404cf3","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"7e95f2b14f9f05c25bd295dc1c083472151701d02c87920f6a4e6041b248de75","affectsGlobalScope":true},"c40b6647c870e1e67fc2df5e544fe37f1ae026daa6a3f1a6b94451707cc01326","d6a7eb9345d3b1ef9e389be7bf405fc2591e38f1c36814e859998dbbb8ad1a60","186d15d1dba88283c0e725ca1c5dd3a072388d37eb08b9f6c1c96ef106692917","aca8bc66a0cd441ebbf1cac593435bf7851d7ff420847f69d350539ee5827837","016df5bb6a9c3daa61c4e14af44af06add0da2ec7ce1b817c8dc37b72ca9f2b0","a764d234d0c6a8cd8b8c5d2737815eeb1c5f2f281b1b391d13a17cb6320b16dd","a529f025c54e6a3abce74d6e7fbf34fc7368ebd86f7e5637fba8f8fdd1537f51","7c1e205e270040fd95d0fe5fd98178454b4407956cc076ef2814499be17fbbb4","b8caf47bfd6b34656edf507ea52cf5fb8aa2a3d1e74ca7373e24524e00c1c3f1","78d57e439bb793883e65eddb73d7acfcd918324cf2a398664c4fbccc554b9e9a","13c3334b04a40f27d2b46c6a4dc4ba4c97daaebe47aadd78e49de8c1074c7d38","1d7138e1a985cefe057a2e8a9b247c761ebd6b6dcdae1c75e298fdbcc0a53bc3","6acff4ec8cc752a1d47f508125da4680c38575b5a6f649c5c4bd3158a022e416","38b0abc5f6daec02f3621c6cccdace9b036e4a96e667e46b119911d885606d13","75e321f38288277d4b684b798c11cc7af369e27cd1f80d48e7370c6f0a737f2c","7624ccf46aad0e7e307e095c7fb4b0b7f6ad4b7aa79024273ca890f04789df81","89f79facf5004c8fb0ac9f1d4f37ff4451bdbe65d37dd1d4ba11566a731749be","16896749524d99091e19d7e838e2bb38683ce5d6ed77dfc055c2e0c391187ae0","d5618da90a2bdeaaae7fabeca487be904c0be5c521f5c2bee7e63176ef2faf68","e3d574fd616fc56c3d84695910cadb468f716d598e07b2974c490ea973b834b4","a7ae283e914ae51002ce6736f6b890beabbb26b5fff7b31df907ad0046e5564a","56f65f7e39e076c4f94f4d68be69a45e7063007807b7858a7c3f9f8586da0df9","08c00b415e40e543bdefc6cf02d188b5dc13f6afa34bda0a7d90282f31b1b19d","c686101093d60519f07e285b16915ca135ab262518b58d963eef87cdf7e3e87a","b6aabead380560f400f49e7bb44a16eba36ec97e212d92a911744c8132bb89a1","0d9e21abee6ed3c94313ec3fba4f70224b8bbe8305b9a56e34529ae0fa914457","6b24035a9365cf9fb0b2d2d6da3298a315cea78264a1cb7e115fb63714535aea","556420a0e672fe4468b4bd90c339c9d38356a1b00b341b188918efd7d2500b3a","77b6a3789ee02e721fe15287c447033f66074bf4ba2bb8830b9ce0e0f0c2c1d0","59ca8a91095b876e2aeced4a9494955d339b048da9377e696901c983424bfdc7","66643e4b6b8b2b7698ace44ce5d96ac42448e9d8a0bf30967ab6d2b89dd93603","35c58226caecf2ba4b3ea9b0328e53a35e6395f029c78627c00d19a65dd3ac31","6d88bd7c02bdd10dac1998aa504e376d5e9b9a415b3c9a11c844be89721a084a","2e6b919c6058f6805604051979f3fbbbea107cfe9aa64e8cfa46c2066b2cc710","28d5456af078eae8159bab5d74fb424eb505e292dae44893d6eba1199ddb7531","dc1535b4f86b2b452c716ef64a2230c62a1a09d9a3f84e50af62a47623074f1c","703eded3671d955c3ed60dedcce6e3d55ead7cf3a0562b4ab6c94984c9c523b5","bdf0a6a3909d90ca8c7ef1116cf21280c350b69e53a0b39a727c01f65b7e0976","46d6c573b0419d0f0a0cf7244e28fb8224adfd863bee309c86d38beffa4215f0","70a29119482d358ab4f28d28ee2dcd05d6cbf8e678068855d016e10a9256ec12","869ac759ae8f304536d609082732cb025a08dcc38237fe619caf3fcdd41dde6f","0ea900fe6565f9133e06bce92e3e9a4b5a69234e83d40b7df2e1752b8d2b5002","e5408f95ca9ac5997c0fea772d68b1bf390e16c2a8cad62858553409f2b12412","3c1332a48695617fc5c8a1aead8f09758c2e73018bd139882283fb5a5b8536a6","9260b03453970e98ce9b1ad851275acd9c7d213c26c7d86bae096e8e9db4e62b","083838d2f5fea0c28f02ce67087101f43bd6e8697c51fd48029261653095080c","969132719f0f5822e669f6da7bd58ea0eb47f7899c1db854f8f06379f753b365","94ca5d43ff6f9dc8b1812b0770b761392e6eac1948d99d2da443dc63c32b2ec1","2cbc88cf54c50e74ee5642c12217e6fd5415e1b35232d5666d53418bae210b3b","ccb226557417c606f8b1bba85d178f4bcea3f8ae67b0e86292709a634a1d389d","5ea98f44cc9de1fe05d037afe4813f3dcd3a8c5de43bdd7db24624a364fad8e6","5260a62a7d326565c7b42293ed427e4186b9d43d6f160f50e134a18385970d02","0b3fc2d2d41ad187962c43cb38117d0aee0d3d515c8a6750aaea467da76b42aa","ed219f328224100dad91505388453a8c24a97367d1bc13dcec82c72ab13012b7","6847b17c96eb44634daa112849db0c9ade344fe23e6ced190b7eeb862beca9f4","d479a5128f27f63b58d57a61e062bd68fa43b684271449a73a4d3e3666a599a7","6f308b141358ac799edc3e83e887441852205dc1348310d30b62c69438b93ca0","43277e48c8674595dba4386374d23b4bfbd144aa6ea42468405050bfc8c7b0e8","ffc483211113c0e91d9d5258d4df93d4b1b8e740a3767f2a63d3ef631fbf00e4","0b454b1f7a282454d14e314fabeae904cb0c4af397556ef0fcb782d3f863ea59","e3ca8d058c3d2a6eb59acb6f236d19d21fb8dc18236e91267242e4f3554bbab9","aa92d3d47e1d586dd028314aab21d1424e02450bb1621ab264b42dc09c27191b","0081455199e151f55f191895fd64c80692fbc52e98a45f6f50719ff3304883fd","1f85a39514162015084e6cd6fe900e73570a62374c25cb72a95239127367b06c","b62d1c9cadf282b5bb4c22f22767db50fc396024addfd50efa81629025230f38","82b6eef18079b1112f035c9b6b73406c2f0b3d2a52858ca91670afe78e0ace84","f71d62fbaba155d97fb38af371eeaf1dbe5b2ef7c3196e867a4c964b986c383b","83f8d4b047edcf6ba782f43f8f7bf13cd1bec2cf9d69c9594d900da5d14ed61b","e6ffc3fbd5583ff84e4b800380ba26ece906021cb6c8b40ec25c8d34a128735a","bd4e06a52d0dfe96a0ec55ae483a14e4cebd647fd0896b575519de9baf602231","97044228a7fb6800326735b6c812f32e4e1e54ff13a7c55969642cc751566ab4","1c7276811c37fa9ff8425e4e29c81c2d4a1a40826d146e3ac32849442af4f8a8","1614081b7588a98f2514b6a692b630c45c7f81978a7e40ab3e0fb46cb69fba1e","b2216b7f241cac0a8ae34a8f01d272f523f82f099bd8aa7aadec96862eb4475d","310a3152e5ef38ff351ad49c5bdbb8e627c86af52a66f5388130da48d7c5b685","41f95048e870e070e6cb31cb67f9920286a1bbb3731289350704f332b474b887","65a46ddb5fb8fa18b1d89f3281a344b7d12a9d74c3c797e27e7299bdb9dec2a2","3791025431f85737d4b88a860e484ba343db864ea1468a7f8d516e82aead9f5f","58fcdda8b720a302372871eb4a809800070090fd6623f6861465c68555d4f4dd","12cc1a0a5397ea1129e7e2c2537db119a92135284a817e13b8b3a1d91892723b","cb22feee63d3d834d1d446f67f20c8fef997ccc73277783a968050d765679ae3","ea78386d121d4d364887f4737b41b8a8ae0aec4c1fb470c439577d907dcd3552","1a5e53f2ff80f392d393790d11ecf08756bf09fae5d76539759bdd295de4016a","e43924ecb2cfa4cfbf1ebab53ffe0d19ebb993fde223312fc08e3cdcf4f0a084","6706f767bc354c40796fb3e86e19a45a61e8f2f1252589f113d58bbfb5522349","03b8ec2c192503f543e0fa7278abc935bde14b95b27179ff3277d6d4e3cd9067","14549e44e55cdea27ec0165fd014070078795d591fd46e988d6233d6d697439a","c28f1af0a8ba652aa54fd105f092b1a8b7add94a224b5651c225d731957d407d","5b7ba74c4c952a69a45cf0d33c4109c884bdb5036eb6be524603dcee7250d96a","c8d32ada2162ab18c2c632ad609ede9bf238bdbafac3598c4980eebbf855a04f","20bafa4c4229eaa5e6388601e19e602509c0fadd2b658c6ebf437b33dc4e88a1","db73427eab3bbaf3f26b5b2efdb37b2d92182cbb6123f8caaef97af2107b07cc","f77898431875dbd6d3a9b7be78813583bc78fbe737bdf3cb9c86a8c8475e4a58","1fb1c750395bb65d4015d9a2bbd15153112cad918b59069463d87d4fe287f337","e0504139189a5b96643513e670e83de419716bbe8368383326df58cba4481264","70d3eb12157434a1ab5ccc8c057c830ebdba1ab59a55a757e6d4364ea9441252","7935c48fba73ee5d74a43fb17f58057663700dce9ea74fd673ca243fff9c7f59","683a8ce632ab7be2208c81e453ce544ed47261b85585c654ba2dc65bd3715588","d1ebf01d8322a8fd0b4e81b65eeb9321a04a55c868df00e55080a219fe1fd9cf","d6a93af9db7a30f9e8cedbee8472e29a194fed7c5f6575ec45ef3430600cbbbb","40ad2717c23b8583214c4a4b8fcb6d03a1ea452585cecad4b14f3f87d4d9c12a","db8fc5c1917265860fd2a6963989985322e37882515284e5a33e3e61362798e3","4336423981fc67f99d5c364a64ec671641d4a5a796dee33bc4ddbc852da7de72","8dc56f817d20cf0717842ac1dcf3ac1a450ac3c667f1285754901e4af97bbe47","72156b7624d678a2686a22a45014218be4da7147f1058a5a5072fe981c492dd5","a20d054b8be41316bcc29752c5b9b42fab727b887a076a3af3bee18813d6e8c2","2eba4ddfbd6837ef33e58644f7dffbfe465d7222f9a9101789f02427f9541488","bb82c16e8371bfc6ee2ffd0095fd321d6acfa57c6c6445019567fec1b6b5e92a","6c65126b657a275259c4759b2b2f7b04879e61bc6c51df025b3748f87652a9eb","a5ad75d3dd3d3df0f62cb7a8ea12e76e0b4a3143ecde9e29c9cc0586b88365c0","03cd482c80ad0b724ca7d55cef7e3823d593b7cced98d7ef9d1bf757c5055b77","e93f395b0d6e68525181a6ecb3e7b81b1c5bf551f32f6cebbdffdef354fbe4a3","b881b069efb9d55b4b4b98de76d8c3920a29254e24f8f0c38557186e38cf6955","25729786d7655a5d7cf18269b89cea8e606e66644657f26fb1283a0deee40727","1f542c79756fda13fdeda2c6c90a560ebddb14758eb5c3278ef8b750a03c9bec","b0ed00813c153e350a56faa8c15668bf21375928e9b88bcc482d20f1f8415179","a1d67050e5303d6d327c11546d2bcd5643bff251e7be230e8e78ab93d051ce39","9140f2acce87195a28377cb0c079de679eb3ee4aa027f2c69f8a70f5c58231f4","93557733190db162b067dd324a0516b8cd4313fda14c228468d865145245ed04","8ace7c551f55726a0bd825aa163fa5789a1f816a236739ca122ca80aac13661f","2597f47a65f63ee775d4c8a9ac9923f6e3422e19130401253c407acba2a17712","825151a14f9661a82fc1a0603c0c288e3225e7a153b0399d4f81f5693bf5fc5a","e73d0a1df69652595185fd648818bf9debc5ce526d030854acfa944ac1db9b50","0cd8d79e4f122d26a2fef1d8a34a68bb7dc1c6a5d511e819518195f236343647","233d663fa903a3ec45f473d7f71cf13262957fe5c5a6a5cc189ec19b26481ea2","55b03f6dd6e296e7b41510fe4f8a406ba7a59f53595a6a7e7ed562ef8038bc3e","e266c6b72f344c3eb7955a398ec4ac675e0df59e639b63cc4a1bcfc6e4eb5316","dfdc5300faad162936a4e139d4fc330fc61b5ef82a31d6aed862c0a8fd7817be","d7f0de67440e497c0c6fc4244152f52a91e2ec3548e9b23bc6e478d4a4e6489a","8ec8468d92d5721a71c4f5f8dff24ce6937d7d0a0b17b83d2450eb44ab32b266","8eae581e0eda5fe040284edee93b219db215fedf4685726bd0774da8316ff679","067c4091e4fea77b1c8e425cba69c423792eff44c195f6f196c60078e3aafdbc","5b58e0cc5d58dbd9135eee1d282a9bd0fc39e8afc606bf2898b470aa8f43e85d","22e7bbd2dbd7aa1941d9324694f4f16efef7811f99d8e73e5da78b04c69f030b","656ebbbd307cdb14912532cb388161356310df830bf6b281dcb4dfa155967653","09ad48e0148ac0f0a2e094f86a37793623b94d2b2133dae34d9cc45ae8b25c5e","c1b720e5dfb938e3102ba8943099eb9832e7ab1823b3b0b1fc66ac2744bb7cf2","2ac362a2246894116abca93289432a3bb46a8081cfbc73c7520b17dba535dd8a","2e28d2679d987933af3ab70f024ed692424571a3d764e52c14678938ee877c56","502f4a28393ec8f62613650ddcf8fc15a693051ef228de55a9fd352ec84a89aa","53c907f9df131b180da03274336bfc21fd0ddc9ce8be765500304dedf5fccfe9","61e344cc879b58a08d51dd2d4d72d151dde138aa1ea67eb6bf52aaae3c4689da","ebf2133a2364ca7d2f8601780fc2a22c2029fd7166ea2a569c7f8f94aaaca2f6","c63b692cfa586093795740c783f71bca0a4f9b8c015d2ca885d12a5e34c9d2a0","d9499d9d0a720b79ef25ae3b7e473f0063df7fc05daae087e575e230698819fd","5dfa630a735c28092a6f56c73a8beff33621f06801a09db9ade86b124c14c07c","2134658a3b19b838ac0a27442454c11bac0715c1a85fe19365b80d47df1e3106","98fc20a7333fb38a2c524a308ee24caab2512974df52b5a6514aabf5cbeab551","1390f82f3c8e80758011e0061c6d1284cc98fb624b90e1f7195c74449e2899c7","319d665994afd8a457b08b99da56a5290454ec0510bb4686b876c8e0fa8191c5","18f2043782620b0303f0412845e40183e498f10a50065d6fc27c5f653a2c5a2c","5f3f3e895ce2597da54b2d9a6c70cc96ce15fe2b00181a412c7d514c596226a2","d732fcfd57106e33b80f5c7ab81687efa43c29b262fdc50274f8f42c3f2cf578","0de5e8652d98e245505ec0ac102280fff4f84f6638861d774d2d351634f1221e","a37aa3bc6ca997c40a51f6d6c414dfb38f223da70e0e4d1136e77f7c3ff0d7eb","cc637b85b208012472941fa039ae6a45fa7bd1c97d91c5659bb4bf600a57b7de","5adc95373b6445f769c67b0d273880a4d67424ba48d6fd329f5456abbdaa8515","93180bd2360c30eec60a3421788f7ecec82275d4de8f51ddb7d4c31344142310","0d87e71a1fe0dce77fd5b18505ee0b548dbbb118af70bbb9e6a39bbc49e08c6e","0cd2114470dcccd06e15369eeca461f3de145e0b793cbda17be99e853baa758d","d5abdb0287faa72707fbce69ed0b6172568670f628f0fde40ac2b10b8f6f028c","fba1184b51e62e9e706632d08df836caef230df4415b41f61dfd91aa29137294","9b4e2f5d760beeae26e5b5c34955079885c8ba8779e4ffd1898a7192a239af6e","ae202294074b2c27b098d87fbfbca3220f5b039e18e65329e7a8a3feb4eeb441","0a0cbff8384422716e06feb725438c76f2b6cc5148ab0903c252c12a78019a72","a2c8b27e3c5e491d296f41109145eaaf589a7435141f0b7e5987b328093ee1af","5180c7ec07768babb88b9e11b680cf070d51c9173e1f3816d685d43350b7a0e1","f31b5c73107611868e39011bfbae4973c238e608db701a8d0692f7fbda21949c","ae428a4c9b1c6ff027e7de2ad67b6b8b092e647c6112f12042aadf762027c5a2","e10bce59494bf7f496c879add3368ae09bed7b76309fb2d3f675e31903cb0e96","4d9681a5ffc480eb2f0e0b4418feeb11f6ae8389b44e76c4d3c633edac779a6c","154b88944cd9d4ad688b93d71d720b8c479f87dc62025d1491bcfc9f1846f883","ad1133b4c2b99fadf0df3ab9bda032d20250fbc227dedc501e642570ef54a217","e1975f4602e0b16ac9ae0a657f4d2f85554017b3e52086707e54f82d14b5630f","2f6bbaa70bc312c46c379085d518c696017a69e4e9779c6c75f6908967b5cc6b","0d070d22463e7ea8e0f824c16d0613dd9d05b5be5d24caa03e5076cb01953161","7fcbcacb40b90f9806697dbae89759ca2e4479c58654f0e1fbcd984ba069e99c","04c27833330e91ad003f663a9f564ae0fc78095604264c998e15c1f341c79e2d","0cfad192241b90669f14a92ca48e141acdd82b414597a18081ff9b492329e07b","e63c3791c63c157a57e2ac2d772b3f85b3688de1acdc53c1270fa61ff2aa1451","227dca4c323e1394cb4b70ec85c9d917ffbd7a7f3e12d2215c2054e5076e3cad","d9c4e110532223b7c17511a63709efab6374f7de87beccf616f57a0125d91281","00828b6cb8616900c552903ddb8fffd0eef85b4aa2805f21d5dfcf7450e26fc8","d76f7df64edf0f562ad6b1478b024b0bfd9db290a63c745d473163e18bc69bf6","436153283d8d35af2e83c229489cad8f11270ef2129814f6133322dc89b3443e","17fac66304bc4b3feeca45f3d4c69b1a351ff28c9e3ee586ae637991a961d666","7ac41ad39142caecc58d455413d971fde4733bccf907d60091728e5695e6d97a","0aac590361ca87c929c08fe84fd809a051f1db7d4dceeebdcad932b49d4e0a89","fa602820776c3f67cfd41e4316d3a3444b9a198d56eb1006541fc55cc670baf7","f5fadf29086bc0f5c80c490058274dcdedd87e4c6c523d23d1c8debe0b4a6af6","cd5f0bce17430ad990b0561c43ed86fe42a8557ddaa5f24befb728f6af320122","e36b2240e73f3a8f6620fcd10e0ac48454373df9b2cc8a872a93c8984ed3d249","f64dcc75b161cffc8585555ef53692e79a7c923e126d182721d1be48c3557dfe","332a7bcc2034b28bb3880a1a1ebc2e271c30e647c49d96b324359e34c991f627","6b66f3c16dd2e4cb7a1cc0429390ba3aa41e5b7769e982f8387efe4c46e467a6","2980f81ad167cdd9a5f1a2eecec5a7bf1b2987570e55a48152fe7628e9d519b1","e2a96a068dd8c1da21ea331e9b87deda6cb83314a4f2e29f1e3c58c3703bb0a1","1a9227bb7e286c36f7328949f0691e875cac8acba9d8c5c6ea8655e9e3455999","33f0026dde6c2b078f31a79c0c8ba910420652be8481ea3a0cf02c981298353b","4892c7959b3258deba1085514743de4b3ad9c27a7ad5ca22ea0d3fb131eb0cf9","c0f52fa967a92544614aa43151d61476365da94984ba730b946924b817e429e5","66e749e5756f7e4f4d5f84819105c0967af881141c34c635d1542758fa03f54c","866f1d25b5ddf0a23a0cee8fac130c8a9e390fbbe5438f81922f3abaf9babe80","915b8b0012b1d1b394d376b1e05619812f6443f48e5fdaf0fc0404863b4085ad","c70786f8082fe55207146c7a71f8d296e7d9a809bc19d616374cd1b128ab6b14","f05e709b82b33299649753aacfc80b088c71d9dba0df1faa2e6f52435796d5c3","35298e76f5ad88c494e571e1eafc4bd9aa0b094a8a6dfbd400728cfbebc9e0db","d8f578851fdb18b04024f70dc6645f3a18a10640596e9e65755052432748839e","f88ce0fc9207a3154b8bb99318f2273c5d285c7fb86c848b566ae6a8b5d02105","5ee33d14c81a3cb45aead86f20f4de2f40c24af79c7a8c42f542a106f70648ca","d9cbdffd821c0dcd6bf8094fd3122f48cc3ee6f0aa20978cf5db4ea83f42794b","eac88829a7be36f669b887accc271158414773ec613eca7917972ce86860d12d","07a147e0ea9beaded07e0fb3f4026c80ca41f577e36b8f8165d747a2d05ddb88","993cfd2e4619d91dd3b0aa07ef82e7f68ba62f54fee0f98720359ce7b1cebc38","66c26dc0b8b2cd4533f753d7e08022dd126ab9a7a5150f771eb0cdc012c7e88a","cf16c79dc11af3cc69d17386752f498be53cd146a14fcc271c5f1563cf955740","e815da49be69908f884704843129f8d9250ff7c0f74e5ccf1988c24a05965e0e","593b36474f166e9a5ed8cfe1590800bd17e7d9f366845e17e4357be6ffc869da","3541ec2884b8ca7517ce60c453fd73c8b44ac57e6e6c511337fd24ba9ede8561","d397f4b80d4a32a85d0ac373fd8a6c9659c47444139e1a89da87d216494029b5","d3cada72f48c32c01ac688071426edba2df6481e62efa85a9321393ed2af6184","25e66cd03924f6eb2183f667a330433ffa0473a868a8fab1f264351971c678f6","edaaf00a300387eb1d6a9f6ce0ca6a218772d5cc05a79b6757a5f2291f597ad2","e648cc0ba42b6f18788088a10757b89e33ab9d308df3a5cce8b8e7ff15e2b22f","eacb287abb4b8f701cc2456147626a8a1eb1a84578f3374dfdf3a5cbb75ede9b","6fc82a3017aaa92364e97c6c44e43c049ce0a3072551edd0f23fba27f3c4df98","b96bec9e77061e5853b4fa63d6ea8cf4250773702676e300420b7735c34f9901","8f393ad285420fd008f8b4fb6b5990e19eaa34b8183b46d9cb720bbdcaa7c31e","9431bb0e7be533433eddda58a880ddc2f884f0f71dd2e8065afbbf97bb3a6a61","7705bb666bdd4085a9787d5c2ac6b23020b3246115eafcb4f453bd9c1448edba","f4d43aa1331941b39fa38a255a16eb8855cc2926ce02a73cc06dde067c473900","9921f71db289a60c25a161d036c2885085cd3f06672d9913b37342333993cf3e","032080b7d162c23bbdfdc18aa87fb8858f6a1d58a0d3756bb59cc28020556cfc","9ac7c4093cadbd5ed6920f9cba6fc6652d814ec9ea0991160987e4feea437481","f75ce377d83090f4180590fe78c9431b3d9bdf494373f0418c58e62937e890c9","6f0cd0e219049f8cce5d0400fc6b8bc841bbfe361d76bdd2ed9a131efa26057c","41ddaa11b8c9f1515a76c1ee2a498cfa8265cb04d57942f2c6eed26e01f270f1","2ea50238f239ef3217965ea0a5ac6ffa2acb94bd03a912e7edae4cdb90496b16","2e0e61e27e6a2ac52977927088197535eaa62a90638af4badedab162672b9ca5","8a62f9f4d9309bfded918fda52f8360e31b626105477db019af20064b0dd8961","057dc3da750916d3983709948a7b5a6ef9788378d38a60bb7458b30f79101800","e0d28cd0b097b81bf31e230d9296920688bd3f21f54bca7f5a3b3cd4ab4a7e66","307ea4b485b73de6f48c6c41f0e8be1fed56673f584972bcb541fd59cccd9860","fa7d28cc714e9d5256d2d5d2d7895a85e5db44987b41cc39f047598dbd3e3fe0","5c09513e6f0bd934425d0d3ddfbdd3cdf4fdeba8a186e903df3c48043116e3d6","53fd33fd439c753899684518742fef08106dc63afcc1c9f62353eff3601e7fdb","9a2e75d1d72d7463cb3a0d4a01c5648bdb4f54866acaffb0360da91234c0df8c","566c068aa63e89d1ae9dc45c7375333a7c55e44cdb97c3adba9b7b09f0bd9edd","eba59f556977e6b108d087ea901e4e326ee0d579c5e4312a87743af6fa8f768c","9ac5c75774da8cdc4d6e0a7ab1a775a00e8f8b13d26c1eecd13230f3882668fd","407d830c83a0659a44e68ba0716fb8ca06b5f58318aa4d5ee99fc0fcd8cd837b","90e965c72d8be19722cdd324090e638e13960f55431d8631f10d13d767f614ff","183e0a4b07d3e6b6715344771e5a4e73e516246dcea97384e5349c42691742c8","7bfaba8b6e1191bd01ecb395930bf46291a3decfca0674393ee35f331e8841c6","a30509a8f0d5edeedcfa55d019de4b5bec780f6fb2480bba53afdbe4dbbf3437","31ba7047f9570c93a5fd3d9264cac8e15ddc83d28f79bdb52fa55bf864c409b9","991dc1a3af1fe5ae31575c7942032c6766bdeb77ef9610ac675f5f9146452a82","7409032e1584e62125a2c131f93a61e44d137d031c8a2f86102d478c0f9916bd","6c31318d3e0c181c9b859eeb8730701e7942d521fc9110873c6a8210ed9e2464","221737ac28b53fc9b0849a9dfa5ca5df6e5ae34e29de779ceb240b009f413c7b","2212bb6cf1ad9a7ddef76e66de820e280086a2780f60a580aed15b7e603de652","0fe4061cfe1eab8c542bbc0b2cd2c203630c5de51941d8b8114c4428505d6135","fc48d98061f4df7793e74a5c4da299d6fa832f1a94f888d9e304dca5587c48bf","8fe0548141d2ebdcec1887bdd86ad369863e6fac5bdcaf5d94174d573371a7ad","ddec19525a3a6d2d5128692249af3ff927989304aa6850a420cea5d655b80ebc","8fbc2183ce22abd6cce28e0be737391132f09449c9312f2deb2c2b93b2762f36","f2eabd920475a6771d78c8c2a8651f44e0e7420cacc29552a7c49eafb5194b3b","f65b67af065b6e88888ce795af1e0d201276d21a8d8d38dbbd0eb5432ac0cab0","76910f9a58a63ed7d477876407541d58cbe4f6d39bedcb8fcaeaa2df73cb234e","2de05e675f52f159ca92df214053286c2a148bc177f2b27c8c1c77bd4b2f19d6","2bd818afebb7c057375c9038483dc2fa1b3a0423f58222e397351e7e6bc40c1e","b68e17021361507cbb11a8c5b1d7291c28e5f97a3a7c24520026b57b37b88629","4ea4c0883edfccd974d63f7a530a61b1584f5b503f6b488ea87127097d43bf93","49b28f502c819005c4a9d32c00b09792fcbcf8c2af2f3f63f4499534a41b92f3","2609c35f3d947adebe6e486d6d8b5e7b2864a80bb99898478b6fde940ab71e44","012a639df4fdce95209d28156bbe33e6a7753b1fe4cc6b24a59a7bd57d720a35","f9a76bf9c808adda8a018ad18e1c1ee8813a2c3f38d53ee7c1eb2a9130d0f5ab","892b371df653d6787b8449e611c0206f561c3bea8fb3e41eac0a6570f43bfed2","7ba9e4a3c87707d2e19f86e8ca04c070dd1c2fafe5517bd6b6574a75c60737a2","bd702a3e21c0ad5d6a109739d239b6f825b69f53abd3ae07d90d8f05d7c2508b","a554c07dd44e34fe953391fddd09fdc3cccdbe291f6393c391529f04ff88d883","3a35d3dd2646bf45052cf5924875d63bd20e24ee58e07d09d66a0cfb77949f57","df24accdcf6a15915053cb96127f69f7d29fb7286951d58d4b8ca9361f8bffd2","ed85b89477b0830ea36dfa5a5216f5949e362cb826a9bbf5973e245b4bff303e","47e3667256f389c853bb1a8954bee33abe94788326d65ab1b1334e59a705ce3e","679c5345cf9eff4a5b7f14bd5b89e4bf13d75ade530b8ff8fcb25114b6747ec1","4b00bee2d5bcff299870eb1f6f069130bf14c595ca96b32a200ccae51c5a1974","efc83ca4f330b801f1b1244f49dcbd2c3a6864af09468e216a1400043141567e","06a88a089750af8956b92bde835a0b5d9489197ad541d033ef89db4457fda78f","2a412555ff316ca06ef90dd936584f7e3cfde321d9aab67c7dece93470d3ca4a","8aab697bda333592e3895adf37eb2870d675ed73dc3b21eaafd224b90c4b31b8","301d6c8d2f806679285ca006c6ee74ddd2372da29e018d18400f971543dcdc5b","ac0a84a5b1487392bbd89deaaf75e37ff97badb5cebc5b125816cce6c994dc49","a32c5ba30045011c135979cbfe7e02aed0cf0cd53a1dfbbc952c29a023470aa9","b972bef785abdf30030b19f64b568f7952b8166dc01ca4ddc2ac6919a5649a6a","b8a6419ec42bf4d8eed52f187e161b7dee898c96faf691713fe1a4ae0d89234b","ef94292bc93dc9aa8910f63dd8bad99a034f69a8bfd4b930ca8ccdff1a209689","1b6fdc41af60370262aef54e35a53bbcfe9e529378df9d4fa05adf6e7e0e2fd1","113b28ad7cd0298c919e8b8dbd0e17b6c456c3723c09e2bac3ea2727ad578a2f","385488081e845bec1ec9bf7bd18b5d7e2d3939401099c4e3b121106845204733","ee390c2487bca09cf2c55e18e929b7f4bf648d83f4bc0f9fceeeb74db84b27eb","f30f19ef7afc42af1923bbb4b0b62ba0cbefc5c2b0929d5fa73bcad861d21ed1","3717cf65a204081e3323d5592b6671cc5b1314a2d2cc96df407adff995f716f3","4f551d073794c7367a01329ffdcd70b6eb84fc3abf2c4f0ae8b756fe231e5da3","aa293bb454ae810e7d15a3040ee730114e9276db4ce713f27678d638c3ab308f","d4083eab88a986f2fcff672be3477a79849f25be3eca5a0fde6d745dac3fdea9","07b7d50913d14676f5193ad47bd45eedd6dabb648bde58ad92a13e62f606accc","ad98cc620e52903b28e98f50ca4466da4c6dd05f04baf944ae009ac14e440b33","cb41a8d1704595b290fb4bda78ff88dd45dcdb7a039003eedf7c4d50d0196866","8277897a81fc2a61b6367d26a66dcef94e2dc5db26c485444a824edeb86fd052","3e4879f89becf4fc8406d220c5df19084c89c14a7dc931849452dbe058d85dda","81807c39ffddf0f980ff2c71b5fce8a5f57b6d85ee8f9860a0c00270f4b4b3ca","58fbfe0eecffaf78787e599e47c5a7e7195455199cab13da8b64f26ca928b261","9538786a06bbb280f2e12a8a7a07bf47ca7172253347093176badf449a3d20cb","95578ac9452eb3f422aaf44830dea4704b9f2144f05e88c0000d4c271a9d6589","c992118f3b620c121b1d1e2a1e4978aa05028eac3405311716ef642a98af2d88","3b3eff18597e0ea86f12438ad927f4574b3fe059985b3f09fd87542b69a1fd0b","4128d4e6d5485d7b327fb5381d599014cdf529acb6a693dcb25a74b7c22867e1","e82b756ada2d110d9f8a77948c3ff9e5055b8e926f41e5f034a58ee8e1d82f5b","59bc67c98670c8c2e527f4bc135f3addc61073a9c86fd7db12655a117edd4223","3a83a2afe970f19b052a0788db74199ce9e483a63c809bfb5e73a32493fa9480","802d9627ae0266a3f1a58eff366a08655851d85964e3a8fbb5e0f88b78f741d1","3afa1cde2398e3081bd31d85277ac529e66cb78cba646acb29015133711039d5","9f8929beba5b8015b7e57926f643fa20f3613159d5304480d5ffc9a8f94dbcab","bc58bb3e15e393d07447a3f1d077fa1bac309a2049b8e395ab02fe99ed72f5d2","f11f9a1d67876a869d99f3145cc63cd1db5ef0034cdbef3930366d4bedbb4d60","54152ff949273b841096858c4a309b872628e1fd71b5929572afdbf8e6972ae5","2b31116136a566c08f2eae951d71172365d02aeb7095f684afa44fbc2b9f7b4c","92307dd94cfb0ac601d622976f10278624679021d9b4c6f85a45cabf99ff11d0","ca89bcfc267f6844c95dcaf2952b161abfa88a5d6c30ba1d63e6e784d7fc90d5","b22b9588d6fcd635a15192411508a24130ac6ae82c55c7fea66bcf5753408e91","69da9257d179f2dc2e1bacfe8852eb4301fff47b438930c1d275b949382fd912","9a8b68f6890738b4ae116a662b6b44be7553892289ad6e1fdc810e4b193e02c4","b2c799fef2f83db2a3604c1c1402b4838898249920262731fdf6a77289acbb13","51cb90bf50d5d2a2d00c5f545fda3167783c22b328a6d33e429392b93d516209","5726ea415eee459efddf8bd50c10f7400273a57fd8dc3d57151e652b328872fc","7e2ca088c326d04643db1c30255f7ec1bede74c09ea190a351869734d8aa1085","4aa45fe87f629109259eeba322b63f4be0b35ce21fe7b7c25aeac50ca54353db","824fbd9c2147716a111d2620e8acaf86e5ec386fa4d54d2b718fe2a77d7299ce","16d160f0397cdb35f79a6d6eb3e2b6c059a0557fa0f67ac7c08b48eddaece743","440eac6e41fba99add73b42ef4e50da2f008bbe114e2c62c0cc303cf328832b5","7ecea9576f765ab161ea44e415c76475a2c66dc70788b4866c3e5e11092fa3dd","cefbd3c11ff2a8d66c078d323f8f3394a4ecb324d05910e40b2fe15e324c7b9b","7d4f144cc3bd5122b4fa82145a64dac96bdb81335a78effa24cb473bee4ec3e0","699eb3908c4db81ac35f40f525bf052f0675479474a8218d0ac01c2b839851da","dba61a7e471bf5151825b2db98cbbf08a697c8e30e3d3323c7d56066df0e7375","847ab80030c5a0570704af5baccb5f79da6245a540a25c1110575bdeb3194288","6edc3bf1facfb28ab6db246e18853c83d6714f47133874b2a8c3e59d015e1aaf","b7e4785625d92f0b12ce9302e34f4dae9ad98149e6a37fba6b9789105a56c217","a62dc16d997566082c3d3149fe10555174cb9be548a6a12657cc4811df4e7659","fb8f91a174bd96a3fc5174fa9e51812a4706166f3250c9014b77aa0cee81e6a4","95f17d89eeca73b054b34f26d91aaed589c556ccac2ac8dd1a59cd8b9c7517d3","36d340a49463a448d2d3b1eb4c2a62da754e4ea09c92848c07d62c8d3b3ddd64","1a0fc724d26754b15d02f70589e49e1510b5f031c16c0f36d033491b10e04e7f","20d7df13f5c0f787c1c7c1c66c13e38f65a6ce33f317971868784f6687ea1311","6111febce84b4710e447c60e17d350bcc66a26b15633de6a21bca6c1b657837f","bd42e75f00e559514fd8c0f8b1efdff737ebfd9dfc4d420b7942ac8921530b6e","5562936e2855eb85ce404bfa74d2bd678340b0e188d9ee51002ac4bb0f90efd7","c5eb943b1adad8a47c75a3a5994e078602d227ed1ad379c4f69a0df06ccc4982","f964c8f47956ebd6790b5f85c753c3a02ed97f80428d458da112701efa531e86","e5311e43122ff95645b583a1594471c4ada8ee2e0c915033310f8b6e35faa2b8","061b29f5901cf6e5075df73eaf060940684cb5fad8cda7daa4dba5d0c8493a81","8c5e22bb09bb7e396fecbd16438342715a8f2f8d747a0b8264c82753fa610f60","82fa37c8de2b352f1fa687c2ef167139122680e7e33b81059e196a79f17ae3d8","d3b9bd1e0e7cf1110c72f2c88c6368b3482339597584ee92c40eef4e1474dad4","1fdcb5089fe9fcc3a9870d120db60cc99aaa60c861a7751ab04e808cc8b41fd8","993970369eaf0685907de6beaf02a724bc5e825a618e727440e1c70a4d7aefd0","f5c87373923bd38aa64e582adfe18fd1121cae948d6b14b22e4b212402ed1318","0d6749f9522cdabea764e7e4ef90f36d15cce8d4d6a130d82de493a500495ca5","61cc506c619fc6b01125bf85429977d0ddd8ff85eb97c2c44e76a2feed3b9741","0172b7fa1834ae521c4f0e6a60cdf6f134a7bc3e9ea9139328e7d105678d574a","353e434635d5413f8cc0cc02dc014d2e80518dec03beb42eeb48edcefa3d19d9","e0acd5de151570de992d110034fbc446ef313391b96ef11fbb6372f24f4cd01f","0c4757684299f1e79cef07152c176cceed642ef5621a176f008a1daa48cfe9b5","8320ac9d1af2097dd0f146f5a61cec3188e1fc87c8b06150d56440a37a21aaff","81ded5824e3256137844d3da9d5e9dac2ef174ad41a23c47fd2aa92187776473","bf4e62a7052096266a9ef000a860c2dcabc0d8a6e99a491e1ecd849e4eaad4e6","541dce26752db36391695715fd07e23ab8365fe8f0bfa22fb1988040647f7220","addaaa4bdc115c69c6e94cceb4e9a78833360d0adc0224cef93c8c0533f2010c","cb67ac394fc7cdddbf955a43e68c1ed05b03276d8688b5070b1f445439a4844b","93c3f399a49a8f0ca7f59b77b20f15e2ea646d76dcc1aa67b016620b77dad7df","8808c90d091012683be4ed8717a2f60cc950aca514c10b43c796b76d73e37b8f","2aa8383c54f8fe4ff08402cb843a9743f66b4448ab8d662e17206c41a12f1c1f","32bf1f74a876afd0ffc272e5b3608fecb1da2da3bf29abdf0b63fb79a79503f8","d2998c46b1c0296e7832b6742b2079bb5d95208e9e00b668841223d964388c5e","e63916b13d1771a1a4ba88978e04c9095aa11bd71431ee35cf18c0641f5ead90","e06a8867a9a2ec503f9b8614734bb82e58824a4a2eee94cda1f522767993a973","ef7e6c333c1b36eaa8faa36accc28ae350874c80efb77c6f1e33eb8b5b4f019d","a8b4834a0506a47b4c7328f4477e41c046f5ec89975577c32a280cf895ee9b72","a8f7305348698c11d9a0fc1839d4cbb094cbf31cef96ee76bd883b0e2de243f4","71dfe61836aa4fdb3caa716917af367c8ce5a14b34feb092b6f6828125477efc","dca0b75bb270baf50f0c2d457c9554af09f04a96c9a30f24d9811821caf60d2b","dff8f02234faac11ec1098f7813a2f08b95b37d472a8eddb9864c2947ee28446","a8d2a8105510385c1581b0c4e05b35d1421102c86e7d6324c44457f4f552df79","030f27adaaee1cfacca3bfa4a177214de5ec43637e2e314c273adf7ee6151458","750eb28a121bfda70e7c697d50f2df3363e9d9b2b74c81088bec2d3bc8d3ad68","3f57dd7e6f67221339b13bc2b288d2b2cb4b3a9260f3f2d381cb19e046682dd3","8bafb5241d4dcde05aa64ea393dc9b683596686885a21d700d0731b38f1fbdc7","502b5d9948de17a1358e68b9ac80dad58590476184f314b2e440d381aa969745","7b8e0925554e436b354b3673de07547356d7985149b8babbb07f3c09782122bc","7246e9b6d9fc705a0990e7a0b6f92e8692d9190d3f5aedcccbd597d5ff0df7c7","d2b04e90889d746abf99b4c59486793f9fea741b705cfd4edab3d509c126477a","2c174b1dce71b4052fcccbb84bffbd41fa45e4442e183dafee599238b770e869","bed2ed24c753afb04dcec65f7568f971d84362fb51fcac820e8ee1855ea76bc6","1f222372836b1ed57997de12464e9e11dc91ead0c077c09520b48f81da40b9f4","8941f30402a12b791af6873dc5f67262b4aa4cc02edf5bf3282413cae2b3d549","7c4dbd82e16b34a81804383b9c28da2cbfad04ed7882ab654056b58a8ec94ec5","8d5e423573fa5dff24971d868f62bdea17b9b4d953b255b0067d312f02895ebb","352676f620ddbc4088b0978e85e39a713a7a470175b1e6c5ae3fd4dfa1c9d651","c70e2678280eb78852223365f81f11c6fb904daa0f22e9672b83bbe315598971","401edf8f46652f4dd13a4358b011c8b887f43f80ea0c5f6f082048a622368262","3dd786a4584f638ae3fb03ff809f138ce8f4d8e6e879a52e099cd33d4507ae73","236e49024cf65958ba8ae35a9f1c5d0f8b0bdfe041af414ca35767c6d4c920fc","09db36cf75bc53cd67d8fc8722ad858df44503d3167b5d49825cd4b8be6f4076","47c250c77c56a40fb602b45a7515ce31f2fb83417c4a96eb4039fdcc2895309d","fb607236d72aba12bf6df811ae50b7ac780a1ec06239525c5aeaf5be5ceaf3b0","a914d868f9ec6a488ebc253461283ea92009a07e9e0167abd36caa082d6d75c4","37c195bb44127feba9a6562aeee6308c94e649f600146c7dab350c7726a5be9c","cc62668f61863e8c4cfb5aa7edf1c675af6c770167861148223f74d6cf4a52d3","b5a3e5d212ff2df914d6883e4d0b46fcd7ece4933133ea816ef724423f801af0","cec7a459158b8d3ebc89a6beb9302e3d3dee70a02f9989baee7f3e426f283c79","d62a65c939304424b6d6b08ab97fb488dad098062c5ae90a64ce6e3f6b9a2af2","c81f6bce73f3c3d453a012ef6c3d0f28567f93cbcd6a9c6d2cb606e8d3a487a3","3ef3a61002755c9661191d667c2d491dc169ea302f60c045c9c1fd1774ac8407","a11253e1d20bc720789d85374a8f3bb2fb2db3d8dc50475017f1768f9adf9484","c47b2c8b92a16e532389b929c7dfa3ee41d47b69ce35c83354add05df0e99ea6","3b73783154d7a87e5952b09ab6e3d9d77ffe5e0c7120011d7eac6257ae55c117","e6416c3d6a90d1370a43f21ba361140ef2a012b14c5b96c6a824bb5295768a14","aa7443532c7c4fa930709fe30e0bf642e4040867b0c180278d60cd04f2832d20","269737ec036e6b904a583995a5eef3acec3fd58c7d9f5c752dcdb0fd790087fc","17c23451de85c6d5455aaf5719c4173aa4562fcd163fb5ba72a6bcd222741d4e","57ceab261617261d3bc3356322f0e5b971a8d549e0817f7e112b62738f323593","ab63739e2f5354d2829ece988d74f377ffcfd9072580c43878ae56c20a15e12d","39ef22cb2067a2b384a86e391705ea84f7481eeae0fa35d7be2545e896af3bcf","8b6a017a2b1d83bc1327b484bf2a223fab583b1ca750f11c1c2bb4f74522f600","0242e7d32b7c7fd9a7944c689e0b87c425dbd39cbc5278290469af2a8ab83ca1","f408fb593ad8b84ce2ac6040641475658060fc4c0efb24cc05804a1e45ebea88","3de736734eac8f35f54adee94296d2a086eb53a68be870e12c4d51eb1eeb5162","1707af876374f577f5b7ed9993a3715e192bd9558a0b7df8206803dcedd73fba","ebc138e51212ed0f884ac5310237298c50b48d45b7902597f85604ad6851cff6","3d276c4026971487be0dc16fb160f784216d19b79dc551ca9df72985c6a539fd","48a0a08da06c2251d2090aaae263ecd5f820a7b85ff0c42a0a13718f7e552bab","89b20c074a5abe9208d39e7153ab01726c44a9fce77e9b46bb86f3cf4882ad0f","caa3c9ea2ebb523eb857ab8019c0a1980e4d94250bd16a9d51b95210d0950386","af357489e64b057dc99b7f42852aa61972d1db4836a8c284c88db68ca8d9abb7","4cdbc6e2f9ea733c647c4f134b3707a66d7579455e2901dafb79f93d9127fac0","d5148561c435367869a0e6ead443cdc3ebcb36cea7f35fedaf6e2bcf9865e436","7c08e5514a423ea5d08163cbc21f3858b9bd5a7dd233c93f9dd8a02952f06db1","21a511987dd4319b5ea9a3723c07c5b8598b5a3e0fc22c720baf74759bcac3e8","3eea6cbdf32fce708775ac2c4d8dd9faf964a0408ceaa4f86f3ad2380b8bdd39","127a73727ba0f2ab580280c8a8228762bee9d33a1cc58b607132da57ae0b274d","7db22639eeacc5a7105a692bcaa13de10eb49382a0130922dbd7a3745a2c0f36","311cccecab649ce5438dfc8d891bb192fd9669fd0a58d9b8b09538978247610c","1727ed355e4e8509313556dc0a0fff5b5e636b49ab28f6bc3fecdce16b96c7cb","cf5e6d1eb6d851978b44663bdbb35e38d3cb31a7a4f787739a2ccfcbabad5176","8dd0da2e6dbe83f210166b3b28675c22f7b3c8cd66ca5ed948416a725ee8a73a","72e4a806db5cfec09a48c5a87a242e6ac4d433a79413eb8cf0bfa9527f9dadc5","f7cbd2a4d0149c99bba024defaaf5f6d87ca997316d9ad1c59336d7b5f0e581e","4cfa0530d70202980104c4b0e5053edab8e9b05534b74ffe53f39bfa0da3d2d6","e448f86b862b39e330b447215e46a0e16d92e0000144b7c6d7a4960ff7eeaf80","aa43139555f1aa62e661801869f5ee6eafff4b5dffa297b26089b9d5002399f1","f5308c02a5baa5114490988da2aaa844eb9e2709b1adbe02661f6a5a5920b12a","dbbcc037763d1b04677ca9547b511286ca031025df934efeff142ca4cbd8c137","fb11357bb5704cecdba8fe197e009fb4cdf4e549aa41150e0e2f61ccff78c916","1e4ead35526cd960fee44faef4725f27b3ca29363f818bf73a76b33d4e0750b5","678f81852d7e64789179d255632885b66027cae24146088e0061cfacafee4152","e8925419dc50fbbfdc7e9435988650f7232742763cb2a6cf0ae71f4ed76e4383","171792728ee2bad492204152640940a15304a58749b57459d49840afc9c4abf7","0c3412cd915aaf6145bcae2c5730b733ee717089c6fe14d0182d2055accb5500","d4158e6b810baa401b3fc374b3f5af9cf49c3ac367eb37d6f66300feadcae609","6a50c27254f43a06c80822a0645c0e8ec85bdf9c111540c6762a784a588c0201","81cbbaf1089bc937bcced90dd4f018dd0c11bc66a234e06b4dbaf8932e86f512","4d64f3826fdf9d29710e704f75dae5a691a9f3210b5c618a72733a104d199265","b4c990def8f1e184f2033dc8da367b124ce4ded291d9a5f8285266b9e638e13f","5edaecf61850e689c92168580fe06fe310b77280c3577e85fa937f4ba1986671","59bd2fca2c764fda52c249a0759d3057d6548606e1b628409eaa0d9c9b9f759a","ac525ff7ef0d54b4798d5b74e6b970efaa5801b5a1a9433ea6b5f49358a14178","dffabe54aff3652fe5bb1577c95c05326efc4fd3f768fc4270bec3c8434931b5","d548ae7c6156b677da39f06d228a89339765e2a6762f5273e71932c247f342b7","b8605131fd1cc77ef0ec0fa909f840e4a0017593682e50f8c3c3decb10443e69","f40cf16f9b6d2274dd6ad83e0679d51de268548c2f4b3f64a7b85b025edaa705","00ec15c82e4e5b5082ee95f281878201700857493f9e617a6b1f1558054d16db","aaeec79faff5fc86de8d2c34093167d96fb7fb9a8ea5703bb78a8db45ddf5553","01a54c0f358c3c2f704c1cfb7a9d17d1c1181e3402cf75b827967a4880b06d72","a1b428dfb854a2df4b9921c0ad9561d2b270088f41e6126c935ad7e74dc5ae4a","b5d04666cbdb15c6c672a78765c0e80af9b689518b9f4e603bd5d47fff789e8b","3a78bcdab37d955b8726e540928ed741d1a5546dee6ffc3de9c9d4ad834a1437","40d76080f9e55d4bf608fbfa425becff2ff14cd83821202e283626359910a59c","d791919d7f29ed0cd5c7f375d238882dab29a43aa07010a967c7e0cf50a2bf4b","79cd9ee099d926504d2c5281df43e3b013ed1cdb413808ce78c6c8e41a95ef07","e4eceee438d823c529f596806842c342cd8620088d41ceb6b756064c664f3a08","8fbf3eabdfa459a67d9f7d25d73a5ab4457bbf2704ed0225262bdf4d1f64e9a3","c02f0b1b01ef6df02734f8d776efd371efafbe4a4da559fd5e597a97005a2b7e","75a50890f1ba583165adcd02e72a62f68e733ed94e6919cb43f090fc9d049b6d","ea23e5ccd5246fb2045a764b0a1aba6cbc8566e68609c7b5f4e6624aacd2acbc","5fec3cd8cba2bb9025288a16245eb2795f1daf77e40cec8c83c0efe10d9e9262","bf96e3cd8ac82645c19c2ff81770a133c75d54b0ee98086bed5e6acdfbd54f6c","6d84b7cb7e4d9db0ed8ca5ab79061661f6a4e9ab1fb9e44e2df551eb1c5affed","ed82f10019e7ca0d4a04cf15f838ebd2102d45c71273f619bbae1f9012ecf6b2","97181768db0a446bcea80e6449e884f6d68d85e324e4ea923b2c3c284ab7b80a","31a8272b826e3aad468c7d378faac6bd584a207c33266e293c9a365fec23f3f9","86461eb21861b7f6f570baf4f58c50184ea4f29eb1ae11e9344a746ec1ed8a9d","7ca5cbc45d37cd33c255d0911a1cf346f94a8c55f95714fa1db723e69367d3dc","55584d80df8d11a0029d486e5c3f2139736136e6e9b5c105b52ac1f711d22afb","aa173b596a454f04c5e8d65353723b68c0c86a872ca6fcf4ded09921e39b2d0c","2bc76065771be133978a14314bf9e0a562a28377b113852fd89e76406135dba9","8206f461526ad23d935843b9154db3da603b72e2e4629c70261093ea6a4fa2a4","f2c969536e3b97cc4db373d347c4780cf0e0a0c17befb7badc9b5dbad7652fa0","c0f7e3054a476fe3bb35577b03af576cb2c9d0054a687bc4dc72cccd1aacc65d","fe990c9d7d8408b5a7e897b7bd705bf6b547c65ff20b450ed9234ecf3dbeae7c","5ad5ab6e4ed985a205b631c9deeb6a47c5f2277fa550f3dd30903dfd30e64e46","f98905b0043d1c0ad988a9cc5ab583acec308482d2c31d31da84c0616f2f0d64","ec033abf3a3102ab9cfa6a9e7dffd5039d4cb7cca132ffd26e2fe83f4b3e7861","2e4597763802a3e96d5efe9059e4dd976d410f5e5df411200dfd16c2e96fe4ed","291025a5b950003bb695197781fc77b2a1fd0eed93e9176ec6e1e6a21e195615","dc6d099154278a16fc5f7ea0aea33e91a79a7ed0bfc39f364cec08f36c3d00ae","3903abddae7bc93a45dc2a21044fda2e5828f5171406c894b8480c55a64be568","d3f03803d9165bd3cb740c0b304657adebb48bc2b92436b0e9ec4a1e6a14823d","d3b9079ef5d29d89219767d9b063331a74ab113fe837e620a02efb7f5920d7ec","44a1a32a8477427b076edf7911cc008fc9f01ed593270806812d673419893a89","3272ee1bd9d15f9c5b7ee04e78ad993cde0e9fe840cdb6745adae4309f1d6259","ea6914af1c8816de78e112f4a825aaa8ce1661cf3d002328fc523ba9b0fe872e","3f60955be9da72f0c8c536b5b9553da1d499f91ff38d844a5053ce5cd87a3b79","1761017a42df74ef2b3ef3764ca764d1b843ea377b5042c7828d3c81af498a94","c798189a7ad24587872bca1fc8c7b986b73297295b19a658a5e80c92cb05b974","24260141be30158c6242d2548ddeeeb19c7412997a759c81524a68b60811c050","4c7e372a8042e2e70fd52aa2668d6e5b892d45cb8519e1d02e69417bf5494a56","766d958840f9449394ff5ee9ac8a4c4ed9d86d65c2a387a0c2dcf728b1ad1c93","f0950ee2de5b3dce7a7bf2907e0f0f38f593611a79fb8421e93c097bac63cf54","a3b36911d8bf20bd2f3e43e3b2aff8cceda729f7fca3557e469d5ef3f23f37ce","cb3a04ad5c0a544478a85baaaa51ce6ea17e374773ac9b35e9c4fd5954171cf8","4caa861c4e842f0613db58a66a005b3fd4fcb0a89341922d1dbe055685ade863","5380c75f0cbab7c65c3cbac98e1a1800bc09620e9650a27490e91ec2b8030f19","ca9341a685db323ea017a909cec7162778e0633e007f60032d6995ccac7ccce7","22f26a9373ee588b1ddb3456d839db953fb3c6fed72e25d31c3b582f0136dfb7","f8d698c6794fc3c5116d9af4b75b674942947a58fb689bb9e93b30fcbd12912c","77e4ad68601bdc499fd7eb2fb60902568107bc9fcf0ac42f209b454701a8860b","e9e1b41a02b3114837eee6e57d8a65965b6edf8e82a406b19595069273c73136","e1e922a6918a483f15c54092d66509839306fd586169d08cce7cb568dda887d0","774f43648cb10a2b999b38750e948c662b79deb59996a4bb6b08e026e888895a","6bb62f95f072b3f9e4ea992709d0cb0b5404db6e43f276e18ff840223aab6e42","10916b0a66fbd2a9b2c4396e1823940417b2b6487df7ed2256f653bbb82ddc63","d43d918a425a086113ee6cc901185771c0052b9a8568fb240a1f6801e7d66cbf","28c2481527e93759b7a871a62d79a23aa8745fe9c4f4465ef688d84ded0eddb0","da4ebc8c9666e0893aa19779a33a9af11e3e1ececd858ea10e27d071f2714ed5","d6a50ecc2edc5c8d11b26681726b74249399eef9978f853545c099a2edd3b434","6a18a20d75ef00cb5a3915746d6ebc092364b49e23a76286a3a5689e36edacdf","d15169764fd16f79814993cd2dc12cc6d7494487dc62a78b33d33e2468b74011","013600ce63487c1696ea3b4cf60f401cdc24e74d1b0ac836a0193aeec632e2fe","da7f7f21cf449e1a9cc262b43c4fe9f5d272ce4c54dc972158f9034c06c8e68c","7fdc105ed18934e4499cf20809154e517c1c41ce3850a69ca61fa0dd587d6919","9c2faa7239c5785950d9852f56ddf2c66adc00f2279faca943ac6b283ae84fec","876f27bea23ee1bdcd7ffa26b38e150a67b0456c509e611548b6f986a7e9f90a","e959169468568c1cf3463df3ee7160ea2f8361619d1d10e2f62497059b4b0126","ca9be90bb0409c07e622a4e03b968974c5736cccad75533c60fb14dcbec7c73b","5fce52f0bfcaaa29de93470d9fb19a1bd52714bb8b2001b160ed75ceed1e174b","a5d2e760f70944dc42357d7b69e86dc74f33bf98e948a115357e1882d5230ed4","0f71d78c1866fff1148880acbed18aaf4ea3d6fa13ce7e1f29255545ee9a1f90","ec94d5d3a4f131ad79abfade176f9fb7472e6a8f202015bb4f7f29b0f0bf0e32","26bf29b117497cbef2cc48133940dcc84ac25eb2e8c59bc7a9065a786707dc64","d62cddcff2083b8a9b99bab5d47e65202ce73f32c8e970ab1515f7b07bf36049","80bb561bd66489e524790d47a287833179baacd89ae2b60532c7f92023f48cc2","456b7187f14e1d2477b74bfa9271e4825bd51183254624b44c5f6005766b8ff0","e4114911dd8dbd6249b4e508966e640e6c8a6d7d6620be759c1dbf104a9b1ed1","cadde74af3321fe5dfb348dc1d72e19c6a11475d990a2809aa8a8a0c968ff968","e8447d11f3a33668faee3a0175b0c0e7f653b46896d127b8b42402eb8e811ead","d3afb6e0fbb2ff982a1aa1f8192754d1fc26f5b80c9e1b79fd29f60a4c8ee4b9","a273bb46ef5465ad1fe1b7bb5b1fddcc119fe788c4e73e226834a186fa052798","a1af0abffba61d11fe81b8338e62f2b7f4e5ef73828a162bb380d9cacc54e111","6c8e9cb096ddabfa76e8e9ef77977a44f39cf77f1c8309ab1398b822fa3f7c05","94ba095ba3e0fc474c0106211ad66c7f6c19aad4d62af9427e38069d9c0ed3ca","c213260636f4285d47880791a15b1452a22ad47841fee501c08368cc6f93dbdd","706bfe9d17e578e4d5f546c9b66ae83fc08a86b2e2c640597dbe3b5666a272e0","f8f4cbcdd78975372b40f887fe6dfae1ed68b73e416319bbce7c953edca909c2","9e7c4846057815d55e1eaf27214286ec0768a1b463a4669e1ce37849b6cc1016","c850c70698b79645345bb3d781b9cbcab82c6f94ac1a801261ab0cece5beeef4","a1169652d59c748c5ec81a332734e2eb2a0294bc1abd941e39ddc1cf6c0a3868","8c627c78904e33e9ea3254e9a8c8b1cfa1d3f5482406766286452f9c8a5c06b3","de077f870623c23f0b66400d6e948ec3be83f591a7ae1343a6dc80f2eb64cfca","726f455f0c65adaedcf799b2f0670610294ce1ef9ebe333d78c7ff9fd932ceb6","4165eca67f3344524716c2818892d0330f3cfee91eb3f53eb9918c3de6351715","6cc7b9937aaf140567dffcbb8cc7e5be37f159d2d970a6cd6029804bde96498a","92d50ec4ddb64d487c7875f1228e210d3caacc906e1965ec3c4dd32e4030d1ef","a1b67f80bf98af46430ad7b494465b1ed5597c96b47248cedae3b01a554de9f7","50d04f69a9ba22994bd6e4cabd20ca24cd95040bd747c777d178fb993d4f4c4d","af4220aa50c809f7fab954561da809da8a218c2d27dda489a64fb2d4ddf030a0","3ae58316451195ddc9121caae22a11fcbfe413e016bc1769ad236d91992c35fd","6be7b7b6338faddd702df171c62909a9230ed5eed562c6611c772d939b1665f1","261c41c9919bebafccdef0c501c7eaf7034258b3c027a22b1166cd096834556f","7ac116a9a8c012220f82014b63dd744115d09a6fa83021f909c87ddac2e39cb2","dcace0ae137b984b07797e26916a923fda2ef10a4c7e93d6a853c2b7516f3612","6231cded9a3b79d8a9c355048efed866c8eaeb4f2cd395951752cdab6318da10","c6d860360ececa1e5e01a4b39fac1e9db8924627c30726932db4f7109f0a551f","947c89d7df64c322d26c487b53867889d340824e2845c0d87d5504bce6532542","44319d05d0f9897a465338569dceacaee5b7d8aa9883b46fd585cc7bad08860f","e3b9222330621eac375f6bc4b52ea78c8469b4c94ae2a8b09fb1d1c3113307d3","4485370e15e4376b92686fd39336d9027b26b371248e25e1cb2d0244e94a1fa1","99e8e188456e5dc71e60d7790267772ad0f22e854fef5d40d8ecb48981fc3296","b88c260399542fb51f72a67584d6390c0e1b68c361b3b927e817a57f93121148","3d478291a40c83d3e3dde0d82d8f78725e8c727aeca3483276649eceda315fe0","fec94ed8b3f32b29a0ff4b1d393d8abbe988c3689db6fae36bf9dc18c5ea799f","18cbbf6b5435252e0b8e76b51d80f697d188cc6cc023265982a83e82c3ad59b7","f2a48883bd34468767d72a12463abc79dfc968713363a28968ed7c20e88a60f4","0319c1171fff27474e6fa314db32cbaf2f18718f786fe2dcd5512cf30f0622d8","cafdbf1ffebb3354670421e295bda97e24b3d947d0375468885b1096408f7b35","42627c2284e23bd6970ea7ca521469f140b6abbf10286f31bd002b0c152ca63c","0937afe2eb89fbc701b206fa225bccdf857c2a35932e16fa27683478ed19364f","ad58a5c0408f9297576a7e5e8c63189a0a93bb2b33bdef332edcef900ce04d48","e1dfe6c074da6a71d51bed7a5e5653922f6570965eb697bc14e7aca5dd3e26aa","2fdba54a4e42205851d822eccb069389ffc0e2eb87dac0f4b76ce989c3f4bf0d","060fe85d5e1fdbbc9380e36685546b1e92431a3fc2eb872fd9222ba76d524bb2","ef0b484dd4ff90c8015aa2f7be803f0ef0155822534b8f9632667aa388ef8535","17e47fc7fa45d83560247b020755d70e77b4d627d46010fe9938f427dc5707de","83498540925959aa5c22f7341f58d810c08b62ee81fbb5cea2bbdf506f0561f0","20a964e86b18b09464d5263893dd1fdfaec3457bb52ec52ee958b31218e41c94","7d2b7fe4adb76d8253f20e4dbdce044f1cdfab4902ec33c3604585f553883f7d","db7b913bca77272355d5ad4e928f8060d3057b9e7586076841ac9fed5876a4db","bd4c4df6d56a6e65df127347fd7a3bd14bc2d1f2675fda7be962117a568c90ed","ad815ef1c08422148534344b38520472d66b2ca3db16b9081fbb5dba79d946cc","a1ca4035e0c1a7b9f47c9f1b917c1045cdd9a127779616cab4846c039e1336d4","ed3ce2909e9fe451aa8f79e8f98070c5061af5cc3db99ae416af16d8d87b7f45","e3d29092d719e94ccbd48e499f46209c8dbb62d4ccd5454be43763a71a78e7a5","7e6e35fdfc3581a130f0f5fbe189506273ca5645935ad5adb6fad91f27bc58b7","2167c3ebc2a6ede83721f5212162a650fe226cbd7ad0e6b444956811f12b4dba","66093b51dabdca5c8004fbd78bb31f9bff83d56fc903fb2f0dcb6f49d7823dfc","5e231bfd216f6bc3c9cd1679aafa993bf036cb62adda12b74b5b4e46a0f31f80",{"version":"c14856169f9aa2236e3eaa1748fca0998410c688c69eb248d3d551c220107857","affectsGlobalScope":true},"c83e65334a9dc08a338f994a34bd70328c626976881d71d6aaa8dc7d66b08d96","51ce227f2bea429203e9ca434553a6a13d5214f87276e1ed2fb068e1826467d8","d655233b800bf949a46bdf90c9830d1aa4e3017864e2f18ec25ad4c3511e891e","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"b934b72617b1474639ef1886668032537a2ed5dcc875c303dc33f207c64daac1","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"ad0d1ec49330f9155698108dcd923031626500d80006e94cc07102c7be907ec8","affectsGlobalScope":true},"fa9257e0d44930c1c6765fec51133a65721a8cdfc385d92926b64f78c662b7bb","6816b69b0921d55c3fe01e614a11af57e87209b8ef96b73c09bcce827a71d7d7",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","f0b2fdef21dda3803b6e59e1060a9f420a7b3a3d59082c403be4364292ebd941","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","73e88763806a21b32aff5a66d4930124606bc5e77f796ea3ff8b6878ff787fa8","ac4b69257d71eee424b839167dda625a771f0d20276beaf822b5e49368539df7","888ec73828164f7a89bf11a173f2e6721e777571c606f03b625956cce2365cf6","06ccebc2c2db57d6bdbca63b71c4ae5e6ddc42d972fd8f122d4c1a28aa111b25",{"version":"81e8508d1e82278f5d3fee936f267e00c308af36219bfcee2631f9513c9c4017","affectsGlobalScope":true},"0218d6df259111a1a4c6bc76cd538932c6c051fd2ae5754f6cb189fbbd0bb6fc","58e6ce808ad556f72c4b882546b7cd023c7f5804c854edf77b6a8a6b59b68644","8e2dd46692f03737289f1b23fc90ad329d726a8b234f756a1453d61a39587356","e220ee6feb1efdda44d46231bd68769fee59e75cad5f02d21732c8057bcb3cb1","288dd0c774a5c6e3964084c7a2bc8cc6b746d70f44a9892d028d04f915cf7ebc","d61c7c41eb1960b1285e242fd102c162b65c0522985b839fadda59874308a170",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"f7011a8d17a06e60dc591fd89b7bf40507d36a5a4d5913fa0eff4e18da001759","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","fb0989383c6109f20281b3d31265293daefdd76d0d30551782c1654e93704f48",{"version":"84f318e5d442b89f65186b61af2abfaaa253a067b3819ec55250e44b09b80a57","affectsGlobalScope":true},{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","22d48bfb37261136423ac687f1fa7bd4dda3083f767416d409a8260cf92bc8fc","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","77f7b6094b3422cc09eb2e919493287ed02380cff73d0452e17149d40dbf157d","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","698ab660b477b9c2cd5ccbd99e7e7df8b4a6134c1f5711fa615ed7aab51cb7f7","33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637","a4471d2bdba495b2a6a30b8765d5e0282fa7009d88345a9528f73c37869d3b93",{"version":"aee7013623e7632fba449d4df1da92925b27d9b816cb05546044dbfe54c88ef4","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c9d70d3d7191a66a81cb554557f8ed1cf736ea8397c44a864fe52689de18865a","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"77c64e668dc7e3db451a6c966e475bc9594678a3675489dc8fc2c1240b83c524","affectsGlobalScope":true},{"version":"28bd780c376b5bb4fbd9fc97881d15066bafac834c6e6f5aa8eff744961e14c8","affectsGlobalScope":true},"196aeae43911b66bac5d87d7eba460c4d27561257737931f5a1e6e1babcf55a6","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"88003d9ab15507806f41b120be6d407c1afe566c2f6689ebe3a034dd5ec0c8dc","7ac7ef12f7ece6464d83d2d56fea727260fb954fdd51a967e94f97b8595b714b",{"version":"9c52d1e0414faa6ee331024f249f9c1ab11a5c432c37370c2c74ba933aee25fc","affectsGlobalScope":true},"57eda4c4c04a1dca45c62857326882ce9cc948c4b52973c0e3c3b7e4c3fa3990","0e0b0baaf6e3845418c2741c9b47478cf6fc086ef8dd5ad4b9ab91499e51de28","ca6e8a62a3e4f5cc3fea6ab45c2e5e128db4d90d81d70547a65047e3f13996f1","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","ac65f04c2df0218cb8e54f012745cbfcc3c0e67c1f6b1e557d88842bbb72e2db","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","dd5647a9ccccb2b074dca8a02b00948ac293091ebe73fdf2e6e98f718819f669",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","a1c79f857f5c7754e14c93949dad8cfefcd7df2ecc0dc9dd79a30fd493e28449","8566fa84085caa46340393b1704ecd368491918fb45bd688d6e89736aec73a2f","dc33ce27fbeaf0ea3da556c80a6cc8af9d13eb443088c8f25cdc39fca8e756f6","ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","cab425b5559edac18327eb2c3c0f47e7e9f71b667290b7689faafd28aac69eae","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","6d969939c4a63f70f2aa49e88da6f64b655c8e6799612807bef41ccff6ea0da9",{"version":"b2fdcc3836d425833af10e536ae5491c34e218bc71870f12a401720f874b6ce4","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","626bccaba2f61f03abe558a39501631565389a748bc47dd52b305c80176333c1","3663d1b50f356656a314e5df169bb51cb9d5fd75905fa703f75db6bb32030568","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","656424ca784760c679bf2677d8aaf55d1cb8452cd0ac04bbe1c0f659f45f8c11","bed28de34a5dd2b08d47b584da338e5fba92de84ce8727dd153d9ec16bc0f2e4","9d7673eb21625c65e4c18ae351a7f64dbee479711d9ca19b4357480a869ee8c6","6745e41d07e777a049bb25425bb1c6c1a9b437bc2568ca8eef03daa8e8913ac0","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","b4358a89fcd9c579f84a6c68e2ce44ca91b07e4db3f8f403c2b7a72c1a1e04b6","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","e9eb1b173aa166892f3eddab182e49cfe59aa2e14d33aedb6b49d175ed6a3750","7693b0547e3b004443fa1f4327b61617e7317757a3e947ccc200c91111c77eca","9764711e9c9dd50a87bb08f1b5dff3abdb9c8dd500777b9908932c45381126d9","8a1285bd27f3717fbee30e79502d603908f69b9815992682f948da70a8ccc6d1","7d1b1c3ab41597780f02dd80c9ac797dfe8f57ea5d6ca99fc910f695b2e01438","064ac03a8141188b9d5ffbfabf32d923e61f8fa6db97b6d164608f43a6c26fe0","160b5730ca7e6d145fa31a69ce859d43f16590829a9c67a28b2a9dc61b5a9263","b6c14e4a3d812bc972e9193bee0f1025f8ec0c0f2e09a2becda8b924ff966360","86112f3c5926d6d259c26f87c3bd9b070c491a2ac4fdee00d921cf41a8b339bd","fed56561917bb49fd85453c70d0756c2bb3fcc50004b2163979944bac451dba3","82db2f05f8d7f32975fccbb3a51d12c4c78e19053568d956236a24d90511a490","8d7a9d62859bfa613cfb03f663aeb589eb1b47db70995b6551cd5944ed64b101","e82ee3992f4be2ecfe7e423fb72b5e925d631bde1c29b51b75dca1f11e1582fd","4856886035f7c5018871f5dc04ebc02ba8340145315dfcee58a5a7cc98b6cbbc","337a8fc9c94a375e84904aaa5572fcf331839ba871eb834af3665158f532a7d4","97f561ab6d9524d8a13a1d294d4d1bf2dbaef4f689493ce770519795b7f93adf","55c99108d658e4a834d4e1f11719400117ef52cce0699959ae86ef2fc42c7d79","d84e2a13989decbb8428400528850d628900daa1c07f15f8476f967f533d6c71","31859fea9d1ae6618a13c79545519a0095505dc0a6b44785d9d1830bd1289153","0600cc4f9b5b639b63b0c25e869b76d7dc78023018f3b1aeb9596460b94c137e","9a2aa0246d885b28eee53207ab118ee99d583b56394c4651a912453e3032ec01","7108d5ae8a27080b178291373d9d5fb56f93a30be42e1f89c06960e393be21e1","c028332d0042231b71a867175027816f12e89143368255300ce747d89cdd7015","6b26577c4ac04c2b6c4fd58e9333f62f345dfbdec7bf21399ff6495513805ddf","51b4ca86d69860c3eef276667a5daa7ead1f16e62a58b76d610a901d36b9e6a5","4eeadb5094a05f61accb3ecac48a607abb57a60e7967282a798e33a7c7889880","9aa9f3604061edf424645090a355f8d276bfac833b6e471eeccda49dd099b534","52fe5499e9a0318a7b711f018b7e6f326cc56b0d6c07b82b583c440100655980","e8cbc84550a53fc46c701c9650162cb6b39499bc58d9764778a1280f4b48a088","5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","7a01f546ace66019156e4232a1bee2fabc2f8eabeb052473d926ee1693956265","fb53b1c6a6c799b7e3cc2de3fb5c9a1c04a1c60d4380a37792d84c5f8b33933b","8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","c2cb3c8ff388781258ea9ddbcd8a947f751bddd6886e1d3b3ea09ddaa895df80","f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","2a317fff5810a628d205a507998a77521120b462b03d36babf6eb387da991bee","f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","eb94afb533a949c56d2e1a2dc2efc30a6461d99b8c14203f62acc581075b84c6","d57dc90cf2914e9715ca06526e4359687eef4609a855e627b27ec02f520ed141","2c72068196824b34051a7e36d6b40f0674ab1688b6ae7065c86a7e4e06b8a42a","f849ecc47ea31a2865f4ce486acb695e069373bde23b007ad553309ff827a0f4","930307e0325aa06e5a44cdcdcd6a4264b5c9bd7f550741a8200c99d249924bdb","b6698642d6d810f41c1e097547f0d198965bf3e368ffceb1bb334d315d7b90d0","77501dd0dc066ad07724489d2963d8cc2404a4321bb2af3e94fe2ca0abad3748","d84dde63862880c889e14ea335ea9121386bc5083583e63e18f30eb33ff61e88","ed632676e0948143136adf72a84ce9aabc7ffce448684f25b1e4846bf69f0482","5d4df8c9f8abed8279c174d9c60c3655357cf104bcab5215b1d6b5d6001db86c","ef75f365177ed58c756044035983a193c7429b9bee22ea00d623cd7fd075940e","bc4415c6ba0f39ec85d4bc18b814ed2b8bd5ec383b114c1831c466bc4a81a1e7","b964bbfb128776de105cf51b89068a88c5f453f3da10cc09ed55dfee1f623357","6f8826e3e6ad422c1640bdf49584fe27393007db9c2102975540b811f7da7114","4650472d5e9a88ae0201e4c8b3b5b7cfd563d73cdd58cf6bf285a786f961459c","11941686ae11a1df09867c4c708804ea4b784340bca08475c2f54faa4c7312dd","45661a01b995096a7a5bc1ba5bd62ee4796b76e2672e77fed150f4149dfe680b","9a1466470d6c6ad67fa196db6349c069437954b6d50326dd6900bf82c916f30a","2103b3929e059d5ad0f309c2df59130f3318cebf3374e8585344d7f569d29b50","7d32292417987c8f27481cbb1e02ed929a93f28a544dc9ed6b06cc87bd0c7fb7","6a8541f64972beda81cf0a7153834f2ce5ad948e4a5d1874df23bf9b3af0412c","51b6041423db970ebefd2c82090c1e5a609567451685d9121988024e4877d245","fe7858617d56c01d33a4f2aa07fb59afc2ec25e2e21a65d6195d06c54ad73324","634dc12b645d9778863e756e228df771fe8f0ff1e9a66ce9f9170671a12c10eb","3fc0b6667ae8a11d159b971eee16d48ed19258cc40e84e868b887bc9300719ef","75a4036897fe1f22ec67b53243794d0678097f9446055464f5fc70acae27a581","85d984a7e1df02180d45d73422a8f9ddffb612b82f5798e99a9d828728954f94","344970be0bb949f4eba790269cdc6f8bde9a8deec139dc752a84c92edb0f8e04","041db1e87b5bbe7906050219db4685b8bede8dc3bd90e6a872d50f10fdf799dc","5c70d9c10523c301ff49da01161b355dfc475560dabfb51a78e43f9a8ffa33a4","c1ff8b883bfc2f121ee6321569238c77a970a577df88743a508be6a650016d31","81c993d28cb68e34562400e27bad5a8a473745c10bd987a520496dc87dcf9b25","66e5935ebb1d30a66fe5057325d4789ec8ff5c067f5f41a04874830f087f2bb7","1c7e4a0d444fe2da1e6c552a4a61644a09dc103c7a229c66f015418f931aff00","0c61dda8d874351856552fb11fbd9c9bc14f101dc5a022ffbb23cdd81e46e395","9057974336ab8820d5b75b34a87fb25e147361107973f0de204aef4cd43b4c20","15b82e9aaec4a13ee5294f4735dabcf33cb21dcccfa4c0ca9ae99340724a8eab","73aed2d115f52cf593e7b79d8ac50d13d7b2eaae84a358b12991d464390ef8d4","e2fef5d21ffc32bd9aaea37e3de49122350ef0d69c6966174895530e8f6b1975","c91d8057814e1734d7c5d92cbce0813733aa835feeb323f1bc9ce14289deeef5","674a3dc13d859309c44b890dd33974fcfe8d88aae34dc8475b06324d89a30ebe","f15fb8ef7b3caeb40d3d1983b97de2f364cd90116096f0913a76dcd9c878af70","52d92a0732ef4e9197e04768dc112e7b54acd3a45247837328c3aa74025fc7c2","347e84717dab8c91ca34f6e19e2d3e00912d73615d4aa96baffb470859179755","0c09b7fcf2274f771e4bbda7446b9d152a3ebfa7d5c5b2f4b6b0e8fd1504c076","971ee8138ca5c258da1c52d9a431d55eda25b72042ba2a02d5bc5d256649b116","e3f2204febc95c35142202250624debbbedee84d112fd04bae9e078e00ad7bf1","464579134297cc667140d83eaff4c52838fefbe8da34411a6d51967bce55c8af","023dd8d594eb4cd812cb2764414fbefdc1958b893f0a3904350ebea1fe6ca8a6","7731f90b03432c5f2796297001add673be152d6bde5f5a041d46c58f3f17c9cb","a7f8c6ad6c4acacf6d1221112be83795abcddce132116f7bfb1ea9f8e6efd311","acdd42e2aeec1a0e240b07421b550247c55fd22182087b0250e7772a14b6e752","6149f0d50450fd9caca6b1127ae0cbb714862d6f0b254b75e92fb3955305ea39","26d4990dea0683ce5e0ced1bec20e266e9a7af7c95fb9a04fcd428926c6aa0c3","21799733e9d3118d87736d9103cb096c71a07d60c9d8d52f9fb14c0ac646b2d0","358de0eaf54eb09328512259573bfe70d6efdbd1e014d9c75d7fc87768d2909b","d47caa1b38569776cae336d8fc7703b8403013cb230ba7920305327ed0a377c6","34864f625b8143c63a9d0f18f0792ac59688ec6ed9c2ebbd7f2a6d3fb2969a13","864c4a707dbaf5127fc40d7a96e541d05b8d88b5129cdcfd2850435bd3bb90d6","d8a9d8c06be68531702ccb8e3c123b6358660b3ca87f00624e984fda60ea2ab7","cb0bf4b6a49fe19baeb5b1fb1c1682dcdf66cd8abfb3a99499719669b4315c3e","cba525d08e2167b05180dabe0a7784e9b3e292c4ff439372827a7a7c4b5e129c","747c476518a7b710d032641e641c5ffb7b329514bdba4213c276a14799360228","c1b5cda3000f68126de279e94c97e08af97502127893e61c88661441805368b7","37134b4d62a4a84e33f1980f4e43e4f8f988c52e6267931788fd93423bbbbc24","82b2fd66587d4c1028b1a178c0997d9a3d261d6fc73d4f84b15b30fcf46456f3","4d170d05f9c68a28dec552b5382a0e66031a3644954e9c383f26e22c6bd8c503","60a0ca95f29f7c9896cb2f673dba3458c60ae9e9351e677b5d8fd964ab2e9392","94178e04d70cce66e8c45789f5475a6d220d92832d2dfc06cee39cf19bebf6fa","f43bf91240d66e67b18a2621a75e31e67f418cdb9ba2d0135a905fe4a25f1ce8","a7f2c4e68794f763a25b7895a57db3d70f2feaf22ccbca68df4bc96d696d5c5f","009acb63dcd0e8fd1c959d7e0297d6f95a4c5565ed712c7a117dff559798fda2","d3e479b5cb24f4fe768d5bc7f961bd215d0ef3a6994f4865d48d0e7882c2e631","e829051be498b66bf5350adb6e9c0f2d79d98fbcd6faf6bc688f8b4644612e3f","386d74f1e6947c10eaf5e9974583424f8eb0c744b85dafcea8cf2799a527a385","65ceb367297a12f2e758d7d9b8b82f3ef272ed986e0167d8abc2f74d14dec449","1ad48bebbbe1fc750c85b52004c275ac3bbf29e28c7ee85aed9fbb10cd2553ca","7ac36a55b0387738a0890696fc42b27f2fae6f2de195fae86d3db9b300aaa062","9362f44676071b1fac20889ec3e436d73966a8f28ed33ccd733ae68740c6b93c","856f12b0e19ff9bdf0a82659a33eed57185a6880fb25a331fba0a8f1f7061c47","ca20a9fd1cd85947f6ddd21e4e4148dc958282bbcc320ddca59621678aeab54d","ac9d20c49bf26a18802cfae968cdee10050a74e02bdeaa4d43b4adf2b2f98c31","8a6998fb8567e5b868df0664b2d59a57b26f33dbec874cacc1fcec15fd970e64","fe04a77761a0e2a2664b032a78262ce538ac2bde2e92d16841fcd0e567b37c0a","d6cff435e8177dd56937f23d5d9069aaadc850b040b6680bf4e61679bb21b2e6","a85886b0850bad64be7e7acf7e56fb7ea3ffffd3ee3901c01b2345162bd5d5e1","ad97f2e2dfb1478f1ce410e3b717cab85ae22e044cca1da8992714ba1066c34d","ac8c1eda841c6c13c31fa7be583ea73b5bad55a2949fa1238ad48d978b6cee15","503704e476c9ec10bc3e67520e1412145499c8c9e482acf2da80e1cfe59e0e60","0ffc6b30a950c1d7843ba381048503a89ea9acefd8edef49ddb0fe99c4697ddb","f605e543c4bfccaa4e6246bd517bbeeec00e745a5f7fb5b0a0a8e8aff493e4df","712755f18f5dad7207d42498a1497ae50507207f3c1a968944e7dda72a970bdc","ddb19ffcdf9959d765b126e4b135d4cf212566bbf0bde6852323a260e0c0f26e","c28b849f8211024b8ddeec3202c7a7600f902e3218009441faf845ba32a1265e","273f4e80ccb9aa5d56106abdf9dbf7991ae806d7017c53ecbfe658ae6448346e","a65d0fb8dce2ccd0ca448c7fb3499f3fa9e346ec572f0c27d942c081a05c245d","ba8f1c0fa9d761daf83de565030932f9036c57fbd60bfbf1a8432fe72437727d","3afaad1395dfaa2b077eb6ac843432a45af3b4982bc7163e90580aeb9f840831","d34655825ebc24da098276aa4301281ff086859568d9ac46d9abacc9ab4a4657","5c86b6af74967907c4655d64405abfd986281159294ec997906c04b0d4bbc2d9","80ba4067392cf4b2193d539dbdb4cef17c7cc876fb849276861e11e9478a43cf","418e7ad170cb62e0ab8d921a5c4a5a913468050f54f4d6a346b0acd48309722a","b8f33e4a3416072f88692fe50a3c05c859f981c1b620a43360512db14a10ea5c","4b6c98445cd593d52437a7d5a310dcd4d4acd086fd03f548da10ccaaff7c8cf5","d7d70b2d2a63d189afc13d80a5b68c5b0cf7d02cc6fa1e03b8ef87b93d55210f","f550cd86ca6ce8d0988639b967c4ed3d49d823a48ad87b5df77645dd7082b0d5","046d9123a02230dcc01278db49e3aea5ab59a1033fa5bfb92be0047086fea2c4","272a9d0390645b3db0a1b98616e7f37f67d38507920d6704faad63a8615848ef","1fcb8b15db812281d69a3090d488903f9e93033004aef9d8889ca3ad0753a96f","bdf5a95eb0a2dd1d39805bdf51b46ba012bb9b92b2ddaae16219595bba7678a5","9f794a0e8550a03baff865a3961cc22afbd85bc4ba9672bdda036971928f85f4","66a697d1e4cdbf25cdce4644a8085a8563041fa8c7731d4d9f5e8f22e66ba72c","a0c8e17f4d1ea2704c62d7349bc3b8d9a12e3761b5960cb44144d3f0333b3fcb","3471c0df3d0391e1dffe6e8bf150294531b2b71a2afa5f2b86e52bf84a5db60a","5d4df4de055eddf3187094f938a640f8d96e4c551a47d6686596fdb6ba4c3014","8bc2cad630da1033c1fd8d7df2bffb18af0da6113bd086a8bbec04a2471a1e00","a1059d1bbc8ad46bfe668b8450e7e8002887c4ab987bdb96d6108d8023f8bb8f","5134885e9648e2c6745f8aa1c3e7f5ab3b3617258b3d81ca02de6655ede3d74e","57f50c6c0bf4fc7e0e5c6780c82a632463a8d084f9a646a4bb569d583287d4f4","457e8d96dbe3a99af586632d666d203cdcd9fe85c57d80a7f09e934b6d51f8d0","fd583efaca2c616317d662111ec0e37268873353310a558474c8d8af85b4013d","3821663dc2b3bfa49ed679104c92452c2c95812becc122757d199472d1381763","6d3856cf4a0896f78869fe581820ad08a3e579cf7f2273e4e848d208f11579aa","cc85e44779900ba71b5068e78dd21eb91d6abb643d499dc167ebbc3afecf1d61","939048ad3ce1f0d3e937a9360dc22fc36e9d1bc1abe3bdf444cfbcc3def8992a","aac718097f25a3b5907124e462c1adbce1ae3eddb9a2ee2cbd89194c4ef8a6f0","1442a75050bad91356b11dcea6dfb877154d1f2e00f863a9b17ba5e903659503","7fc9c58237c8e80c0f4812accadc896453bf369ca10198b23f210304c921f6ea","6c8d980b4d9fc04a89ffa3a6f3eb6fc114cd160a2f37b8c426bb2bbd6016de26","e505fc108417f2cdc32afa758f7dd52d96ee8635de7af714c2b28ccf2bc32685","af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9","b187f2879a16a3f843472814f9b93c445e21d1b9c0600d1b6faf02e9e5bffc0b","ab093a307eaa4c4a97c5f219320aeda8d9cc7a50548032973c02f505a76e9187","43a4150b910aa81033f7adf077e76d6ed1e569c46082c32e6d1d6ab1678377d7","7301a7544a127c860e8de266bfd348293dcf8c9822c5123ab1cf533745d7c0e4","9398a0f1e4385f30d59b81b695884127c6c02836505d3d50ce3bb0d19bbe26e6","7994500b2750ab3ca65d61488c9af7970d663d870d69ef3999d2ab6bbe558111","b5e012cad69d351ae22d9151dd64be8323907fd226abd45010f450e0006ddabb","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","6e6cbf46b6d75d417f37b637037fb5d97a1d9cd0c1d7fdcce16d86e3db9db458"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"inlineSourceMap":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"removeComments":false,"skipLibCheck":true,"strict":true,"target":1,"useUnknownInCatchVariables":false},"fileIdsList":[[65,985],[61,985],[61,66,67,68,69,70,985],[61,67,71,985],[61,69,71,985],[58,65,985],[71,72,985],[985],[425,985],[416,425,985],[414,415,416,417,418,419,420,421,422,423,424,985],[431,985],[425,426,427,429,431,985],[425,426,427,429,430,985],[61,431,985],[61,431,432,433,985],[434,985],[428,985],[414,985],[413,985],[290,292,985],[61,63,291,985],[292,293,294,985],[290,300,985],[61,63,290,291,299,985],[300,301,302,985],[222,985],[304,985],[61,312,985],[311,985],[312,313,985],[311,315,985],[315,316,985],[290,318,985],[61,318,985],[318,319,320,321,322,985],[318,985],[290,327,985],[61,63,291,323,326,985],[327,328,329,985],[290,376,985],[61,63,291,339,350,375,985],[376,377,378,985],[61,380,985],[282,311,985],[380,381,382,985],[290,384,985],[61,63,291,343,985],[384,385,386,985],[290,388,985],[61,63,291,371,985],[388,389,390,985],[311,392,985],[392,393,985],[409,985],[61,63,291,408,985],[409,410,411,985],[290,401,985],[61,291,985],[401,402,403,985],[291,372,985],[61,291,368,371,985],[372,373,374,985],[61,369,985],[369,370,985],[443,985],[61,63,291,375,408,442,985],[443,444,445,985],[290,450,985],[61,63,291,449,985],[450,451,452,985],[291,457,985],[61,291,305,456,985],[457,458,459,985],[290,464,985],[63,291,311,463,985],[464,465,466,985],[291,502,985],[61,63,290,291,303,501,985],[502,503,504,985],[291,478,985],[61,63,291,477,985],[478,479,480,985],[291,471,985],[61,291,469,470,985],[291,468,985],[468,469,470,471,472,473,985],[291,495,985],[61,63,290,291,985],[482,495,496,497,985],[291,491,985],[61,63,291,490,985],[491,492,493,985],[61,506,985],[506,507,985],[63,397,985],[63,291,311,323,396,985],[397,398,399,985],[61,435,985],[291,311,371,434,985],[435,436,437,985],[291,295,299,303,305,306,314,317,323,326,330,343,350,371,375,379,383,387,391,394,400,404,408,412,438,442,446,449,453,456,460,463,467,474,477,481,486,490,494,498,501,505,508,510,513,517,520,522,526,985],[523,524,525,985],[523,985],[291,311,371,985],[396,521,985],[396,985],[61,323,332,395,985],[509,985],[511,512,985],[511,985],[297,298,985],[297,985],[61,296,985],[344,345,985],[344,985],[61,514,985],[514,515,516,985],[514,515,985],[311,515,985],[324,325,985],[324,985],[61,323,985],[61,331,334,985],[331,333,334,335,336,337,338,985],[334,985],[332,334,985],[61,63,296,331,332,333,985],[336,985],[61,333,343,346,985],[347,348,349,985],[348,985],[61,339,343,347,985],[518,519,985],[518,985],[340,341,342,985],[340,985],[296,299,311,985],[339,985],[405,406,407,985],[405,985],[311,339,985],[61,333,346,408,985],[439,440,441,985],[440,985],[61,296,339,405,439,985],[447,448,985],[447,985],[454,455,985],[454,985],[461,462,985],[461,985],[499,500,985],[499,985],[61,299,985],[475,476,985],[475,985],[61,346,482,985],[483,484,485,985],[61,484,985],[311,483,985],[61,333,346,486,985],[487,488,489,985],[488,985],[61,339,487,985],[61,63,985],[282,985],[279,280,281,282,283,284,285,287,288,289,290,985],[61,63,282,286,985],[61,63,279,287,985],[61,142,225,249,250,252,890,985],[250,253,985],[61,142,255,890,985],[255,256,985],[61,142,258,890,985],[258,259,985],[61,142,225,265,266,890,985],[266,267,985],[61,63,142,269,270,890,985],[270,271,985],[61,142,273,890,985],[273,274,985],[61,63,142,225,252,276,890,985],[276,277,985],[61,63,142,269,527,530,532,533,890,985],[533,534,985],[61,63,142,225,536,916,985],[536,537,985],[61,63,142,538,539,890,985],[539,540,985],[61,142,225,249,543,544,916,985],[544,545,985],[61,63,142,225,291,547,916,985],[547,548,985],[61,142,225,550,890,985],[550,551,985],[61,142,225,265,553,890,985],[553,554,985],[63,142,225,916,985],[556,557,985],[61,142,225,228,527,559,916,985],[559,560,985],[61,63,142,225,265,562,916,985],[562,563,985],[61,142,225,262,263,916,985],[61,261,890,985],[261,263,264,985],[61,63,142,225,565,890,985],[565,566,985],[61,63,142,225,269,568,890,985],[568,569,985],[61,142,225,265,571,890,985],[571,572,985],[61,142,574,890,985],[574,575,985],[61,142,225,577,890,985],[577,578,985],[61,142,225,583,584,890,985],[584,585,985],[61,142,225,587,890,985],[587,588,985],[61,63,142,591,592,890,985],[592,593,985],[61,63,142,225,528,890,985],[528,529,985],[61,63,142,595,890,985],[595,596,985],[305,985],[61,142,249,599,890,985],[599,600,985],[61,142,225,602,916,985],[142,985],[602,603,985],[61,916,985],[605,985],[61,142,249,269,611,612,890,985],[612,613,985],[61,142,615,890,985],[615,616,985],[61,142,618,890,985],[618,619,985],[61,142,225,583,621,916,985],[621,622,985],[61,142,225,583,624,916,985],[624,625,985],[61,63,142,225,627,890,985],[627,628,985],[61,142,249,269,611,631,632,890,985],[632,633,985],[61,63,142,225,265,635,890,985],[635,636,985],[61,249,985],[542,985],[142,640,641,890,985],[641,642,985],[61,63,142,225,644,916,985],[61,645,985],[644,645,646,647,985],[646,985],[61,142,583,649,890,985],[649,650,985],[61,142,652,890,985],[652,653,985],[61,63,142,225,655,916,985],[655,656,985],[61,63,142,225,658,916,985],[658,659,985],[142,916,985],[885,985],[61,63,142,225,916,917,985],[917,918,985],[665,985],[61,142,985],[667,985],[61,63,142,225,669,916,985],[669,670,985],[61,63,142,225,265,672,890,985],[672,673,985],[61,63,142,225,675,890,985],[675,676,985],[61,142,225,678,890,985],[678,679,985],[61,142,681,890,985],[681,682,985],[142,640,684,890,985],[684,685,985],[61,142,225,687,890,985],[687,688,985],[61,63,142,638,890,916,985],[638,639,985],[61,63,142,225,660,690,916,985],[690,691,985],[61,63,142,693,890,985],[693,694,985],[61,63,142,225,583,696,916,985],[696,697,985],[61,142,225,699,890,985],[699,700,985],[61,142,225,265,702,916,985],[702,703,985],[142,705,890,985],[705,706,985],[61,142,225,265,708,916,985],[708,709,985],[61,142,711,890,985],[711,712,985],[61,142,714,890,985],[714,715,985],[61,142,583,717,890,985],[717,718,985],[61,142,225,720,890,985],[720,721,985],[61,142,249,269,725,727,728,890,916,985],[728,729,985],[61,142,225,265,731,916,985],[731,732,985],[61,225,701,985],[726,985],[61,142,269,695,734,890,985],[734,735,985],[61,63,142,225,527,546,608,609,916,985],[526,609,610,985],[61,142,686,737,738,890,985],[61,142,890,985],[738,739,985],[394,985],[61,142,640,742,890,985],[742,743,985],[61,63,916,985],[61,63,142,745,746,890,916,985],[746,747,985],[61,63,142,225,745,749,916,985],[749,750,985],[61,63,142,225,251,916,985],[251,252,985],[61,142,249,269,527,611,723,890,916,985],[723,724,985],[61,142,375,916,985],[375,531,985],[371,985],[61,63,142,591,752,890,985],[752,753,985],[61,654,985],[755,757,985],[756,985],[61,63,142,759,890,985],[759,760,985],[61,142,225,762,916,985],[762,763,985],[61,142,686,730,744,765,766,890,985],[61,142,730,890,985],[766,767,985],[61,63,142,225,769,890,985],[769,770,985],[630,985],[61,63,142,225,449,527,773,774,916,985],[61,772,985],[774,775,985],[61,142,249,305,779,780,890,916,985],[780,781,985],[61,142,269,777,890,916,985],[777,778,985],[61,142,637,783,784,890,916,985],[784,785,985],[61,142,637,789,790,890,916,985],[790,791,985],[61,142,793,890,916,985],[793,794,985],[61,142,225,899,985],[796,797,985],[61,142,225,799,916,985],[799,800,801,985],[61,142,225,265,803,916,985],[803,804,985],[61,142,806,890,916,985],[806,807,985],[61,142,249,809,890,916,985],[809,810,985],[61,142,812,890,916,985],[812,813,985],[61,142,814,815,890,916,985],[815,816,985],[61,142,225,269,818,916,985],[818,819,820,985],[61,63,142,225,226,916,985],[226,227,985],[61,634,985],[822,985],[61,63,142,591,824,890,985],[824,825,985],[61,142,225,265,827,890,985],[827,828,985],[61,142,265,527,858,890,985],[858,859,985],[61,63,142,225,830,890,985],[830,831,985],[61,142,225,833,890,985],[833,834,985],[61,63,142,836,890,985],[836,837,985],[61,142,225,839,890,985],[839,840,985],[61,142,225,842,890,985],[842,843,985],[61,142,225,845,890,985],[845,846,985],[61,142,225,674,768,838,848,849,916,985],[61,673,985],[849,850,985],[61,142,225,852,890,985],[852,853,985],[61,142,225,265,855,890,985],[855,856,985],[61,63,142,225,228,527,860,861,916,985],[861,862,985],[61,63,142,640,643,648,657,686,692,744,768,864,890,916,985],[864,865,985],[508,985],[61,63,142,225,265,868,890,985],[868,869,985],[61,63,142,871,890,916,985],[871,872,985],[61,63,142,225,874,890,985],[874,875,985],[61,142,249,532,787,890,985],[787,788,985],[61,63,142,225,580,581,916,985],[581,582,985],[63,661,985],[61,63,136,142,916,985],[136,985],[661,662,663,985],[317,985],[881,985],[146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,985],[61,63,166,228,245,254,257,260,265,268,269,272,275,278,306,530,532,535,538,541,543,546,549,552,555,558,561,564,567,570,573,576,579,583,586,589,594,597,598,601,604,606,607,608,611,614,617,620,623,626,629,631,634,637,640,643,648,651,654,657,660,664,666,668,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,741,744,748,751,754,758,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,823,826,829,832,835,838,841,844,847,851,854,857,860,863,866,867,870,873,876,878,880,882,884,886,887,888,889,916,919,985],[61,265,590,890,985],[61,142,311,911,985],[142,145,580,891,892,893,894,895,896,897,899,985],[895,896,897,985],[64,142,985],[890,985],[142,145,580,891,892,893,894,898,985],[61,64,891,985],[580,985],[63,142,891,892,894,898,899,985],[142,143,145,580,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,985],[142,228,254,257,260,262,265,268,269,272,275,278,375,530,535,538,541,546,549,552,555,561,564,567,570,573,576,579,583,586,589,594,597,601,604,611,614,617,620,623,626,629,634,637,640,643,648,651,654,657,660,664,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,744,748,751,754,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,826,829,832,835,838,841,844,847,851,854,857,863,866,870,873,876,895,919,985],[228,254,257,260,262,265,268,269,272,275,278,530,532,535,538,541,546,549,552,555,561,564,567,570,573,576,579,583,586,589,594,597,601,604,606,611,614,617,620,623,626,629,634,637,640,643,648,651,654,657,660,664,671,674,677,680,683,686,689,692,695,698,701,704,707,710,713,716,719,722,725,727,730,733,736,740,744,748,751,754,758,761,764,768,771,776,779,782,786,789,792,795,798,802,805,808,811,814,817,821,823,826,829,832,835,838,841,844,847,851,854,857,863,866,870,873,876,878,919,985],[142,580,899,985],[142,899,985],[899,985],[898,899,985],[142,895,899,985],[249,985],[61,248,985],[883,985],[510,985],[877,985],[879,985],[228,985],[223,224,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,985],[97,985],[98,985],[97,99,101,985],[100,985],[61,71,985],[76,985],[74,985],[64,71,73,75,77,985],[61,63,90,92,985],[93,94,985],[63,127,985],[61,63,90,92,126,985],[61,63,78,92,127,985],[126,127,129,985],[61,78,92,985],[103,985],[63,137,985],[61,63,90,92,95,985],[61,63,78,79,81,107,137,985],[137,138,139,140,985],[102,985],[115,985],[63,131,985],[61,63,78,107,131,985],[131,132,133,134,135,985],[79,985],[78,79,90,92,985],[63,92,95,985],[61,78,90,92,985],[63,985],[78,79,80,81,90,985],[91,985],[61,117,118,985],[120,985],[117,119,120,121,985],[78,79,80,81,88,90,92,95,96,102,104,105,106,107,108,111,112,113,114,116,120,121,122,123,124,125,128,130,136,141,985],[95,985],[78,95,985],[83,985],[64,985],[88,95,985],[86,985],[83,84,85,86,87,89,985],[64,78,83,84,85,985],[107,985],[92,985],[109,110,985],[220,985],[177,985],[182,985],[167,985],[168,985],[214,985],[185,985],[173,985],[216,985],[218,985],[169,170,171,172,174,175,176,178,180,181,183,184,186,187,188,190,192,193,194,196,198,199,201,203,205,206,207,208,209,210,211,212,213,215,217,219,221,985],[189,985],[191,985],[179,985],[200,985],[195,985],[202,985],[204,985],[197,985],[367,985],[361,363,985],[351,361,362,364,365,366,985],[361,985],[351,361,985],[352,353,354,355,356,357,358,359,360,985],[352,356,357,360,361,364,985],[352,353,354,355,356,357,358,359,360,361,362,364,365,985],[351,352,353,354,355,356,357,358,359,360,985],[247,985],[58,59,60,985,1271],[58,59,60,246,985],[57,58,59,60,985],[61,311,985,992,993],[61,62,890,936,985],[62,920,921,922,985],[62,920,921,985],[61,62,564,597,916,919,923,924,925,926,928,929,930,931,985],[62,832,835,838,841,847,854,929,985],[61,62,269,919,923,925,932,933,985],[61,62,272,564,614,617,620,623,626,733,768,925,929,985],[61,62,272,564,614,617,620,623,626,733,768,923,929,985],[62,272,614,620,626,985],[61,62,272,564,614,617,620,623,626,866,923,925,927,985],[61,62,272,564,614,617,620,623,626,866,923,985],[61,62,272,564,614,617,620,623,626,733,768,866,923,925,985],[62,985],[61,62,937,939,985],[61,62,919,922,934,935,985],[985,994],[985,1239,1243,1244],[985,1239,1242],[985,1242],[985,1243,1245,1247],[985,1239,1242,1243,1244,1245,1246],[985,1239],[985,1239,1240],[985,1240,1241],[985,1024],[957,985,992,996],[985,998,999,1001,1004,1006],[985,1000],[985,998],[985,998,1001],[985,1011,1012],[985,1009,1010,1011],[957,985,992],[956,957,985,992,1015],[985,1019],[985,1020],[985,1026,1029],[956,985,992],[959,984,985,992,1034,1035],[959,973,985,992],[941,985],[944,985],[945,950,976,985],[946,956,957,964,973,984,985],[946,947,956,964,985],[948,985],[949,950,957,965,985],[950,973,981,985],[951,953,956,964,985],[952,985],[953,954,985],[955,956,985],[956,985],[956,957,958,973,984,985],[956,957,958,973,985],[956,959,964,973,984,985],[956,957,959,960,964,973,981,984,985],[959,961,973,981,984,985],[941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991],[956,962,985],[963,984,985],[953,956,964,973,985],[965,985],[966,985],[944,967,985],[968,983,985,989],[969,985],[970,985],[956,971,985],[971,972,985,987],[945,956,973,974,975,985],[945,973,975,985],[973,974,985],[976,985],[977,985],[956,979,980,985],[979,980,985],[950,964,981,985],[982,985],[964,983,985],[945,959,970,984,985],[950,985],[973,985,986],[985,987],[985,988],[945,950,956,958,967,973,984,985,987,989],[973,985,990],[58,59,60,307,985],[985,1041,1080],[985,1041,1065,1080],[985,1080],[985,1041],[985,1041,1066,1080],[985,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079],[985,1066,1080],[985,1084],[985,992],[985,992,1082],[973,985,992],[956,959,961,973,981,984,985,990,992],[985,1088],[944,985,992,1022,1028],[985,1087],[985,1026],[985,1023,1027],[985,1025],[985,1111],[985,1112,1113,1114,1115,1116,1181,1182,1183,1184,1185,1186],[985,1111,1114,1180],[985,1111,1112,1113,1182],[985,1111,1112,1114,1115,1116,1181,1183],[985,1113],[985,1111,1113],[985,1111,1114,1116],[985,1111,1113,1114,1115],[985,1136],[985,1111,1136],[985,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149],[985,1111,1150],[985,1234,1235,1236,1237,1238,1249,1250,1251],[985,1111,1248],[985,1111,1208],[956,985,992,1111,1195,1196],[985,1195,1196,1197,1200],[985,1195],[985,1196],[985,1201,1207,1208,1209,1210,1211],[985,1111,1198,1199,1201],[985,1197,1199,1202],[985,1199,1203,1204,1205,1206],[985,1199,1208],[985,1111,1196,1197,1198],[985,1111,1199,1207],[985,1111,1187,1216,1218,1219],[985,1111,1218],[985,1218,1219,1220,1221],[985,1111,1187,1218],[985,1111,1187,1216,1219],[985,1111,1187,1222,1223],[985,1217,1224],[985,1111,1226],[985,1226,1227],[985,1229],[985,1111,1187],[985,1188,1189,1190,1191,1192,1193,1194,1213,1214,1215],[985,1111,1187,1188],[985,1111,1165,1191],[985,1111,1187,1212],[985,1111,1188],[985,1111,1187,1188,1189],[985,1231,1232],[985,1111,1255],[959,985,992,1087,1111,1180,1257],[985,1111,1187,1263],[985,1264,1265,1266],[985,1096,1097],[985,1097,1098],[985,1096],[985,1096,1097,1103],[985,1096,1097,1098,1108],[985,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110],[985,1105],[964,985,992,1095,1098,1099,1105,1106,1107],[985,1261,1262],[985,1261],[956,985,992,1111],[985,1111,1165],[985,1117,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179],[985,1111,1175,1177],[985,1132],[985,1131,1132,1133,1134,1151,1152,1164],[985,1111,1130],[985,1131],[985,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163],[985,1111,1131],[985,1212,1216,1222,1225,1228,1230,1252],[985,1111,1150,1165,1180,1187,1216,1222,1228,1230,1233,1253,1254,1256,1258,1259,1260,1267],[985,1180,1256,1258],[985,1111,1212,1216,1222,1225,1228,1230,1233,1252],[985,1111,1180,1187,1216,1225,1228,1230,1233,1253],[985,1129],[985,1118,1119,1129],[985,1120,1121],[985,1118,1119,1120,1122,1123,1127],[985,1119,1120],[985,1128],[985,1120],[985,1118,1119,1120,1123,1124,1125,1126],[945,985,1180,1187,1216,1268]],"referencedMap":[[66,1],[69,2],[71,3],[68,4],[70,5],[67,6],[72,4],[73,7],[65,8],[415,9],[416,9],[417,9],[418,10],[419,9],[420,10],[421,9],[422,9],[423,10],[424,10],[425,11],[426,12],[430,13],[427,12],[431,14],[432,15],[434,16],[433,17],[428,8],[429,18],[413,19],[414,20],[293,21],[292,22],[294,8],[295,23],[301,24],[300,25],[302,8],[303,26],[244,27],[304,2],[305,28],[313,29],[312,30],[314,31],[316,32],[315,2],[317,33],[319,34],[318,22],[320,35],[321,8],[323,36],[322,37],[328,38],[327,39],[330,40],[329,8],[377,41],[376,42],[379,43],[378,8],[381,44],[380,45],[383,46],[382,8],[385,47],[384,48],[387,49],[386,8],[389,50],[388,51],[391,52],[390,8],[393,53],[392,2],[394,54],[410,55],[409,56],[412,57],[411,8],[402,58],[401,59],[404,60],[403,8],[373,61],[372,62],[375,63],[374,8],[370,64],[369,2],[371,65],[444,66],[443,67],[446,68],[445,8],[451,69],[450,70],[453,71],[452,8],[458,72],[457,73],[460,74],[459,8],[465,75],[464,76],[467,77],[466,8],[503,78],[502,79],[505,80],[504,8],[479,81],[478,82],[481,83],[480,8],[472,84],[471,85],[469,86],[468,59],[470,8],[474,87],[473,8],[496,88],[495,89],[482,2],[498,90],[497,8],[492,91],[491,92],[494,93],[493,8],[507,94],[506,2],[508,95],[398,96],[397,97],[400,98],[399,8],[436,99],[435,100],[438,101],[437,8],[306,27],[527,102],[525,8],[526,103],[524,104],[523,105],[522,106],[395,8],[521,107],[396,108],[510,109],[509,2],[513,110],[512,111],[511,30],[299,112],[298,113],[297,114],[346,115],[345,116],[344,2],[515,117],[517,118],[516,119],[514,120],[326,121],[325,122],[324,123],[333,124],[339,125],[331,30],[338,126],[335,127],[334,128],[337,129],[336,30],[347,130],[350,131],[349,132],[348,133],[520,134],[519,135],[518,30],[343,136],[341,137],[340,138],[342,139],[408,140],[406,141],[405,142],[407,139],[439,143],[442,144],[441,145],[440,146],[449,147],[448,148],[447,2],[456,149],[455,150],[454,30],[463,151],[462,152],[461,2],[501,153],[500,154],[499,155],[477,156],[476,157],[475,30],[483,158],[486,159],[485,160],[484,161],[487,162],[490,163],[489,164],[488,165],[281,2],[296,8],[290,166],[279,166],[280,8],[283,167],[291,168],[284,2],[287,169],[289,2],[285,8],[282,2],[332,30],[288,170],[253,171],[250,8],[254,172],[256,173],[255,8],[257,174],[259,175],[258,8],[260,176],[267,177],[266,8],[268,178],[271,179],[270,8],[272,180],[274,181],[273,8],[275,182],[277,183],[276,8],[278,184],[534,185],[533,8],[535,186],[537,187],[536,8],[538,188],[540,189],[539,8],[541,190],[545,191],[544,8],[546,192],[548,193],[547,8],[549,194],[551,195],[550,8],[552,196],[554,197],[553,8],[555,198],[556,199],[557,8],[558,200],[560,201],[559,8],[561,202],[563,203],[562,8],[564,204],[264,205],[262,206],[263,8],[265,207],[261,8],[566,208],[565,8],[567,209],[569,210],[568,8],[570,211],[572,212],[571,8],[573,213],[575,214],[574,8],[576,215],[578,216],[577,8],[579,217],[585,218],[584,8],[586,219],[588,220],[587,8],[589,221],[593,222],[592,8],[594,223],[529,224],[528,8],[530,225],[596,226],[595,8],[597,227],[598,228],[600,229],[599,8],[601,230],[603,231],[602,232],[604,233],[605,234],[606,235],[613,236],[612,8],[614,237],[616,238],[615,8],[617,239],[619,240],[618,8],[620,241],[622,242],[621,8],[623,243],[625,244],[624,8],[626,245],[628,246],[627,8],[629,247],[633,248],[632,8],[634,249],[636,250],[635,8],[637,251],[542,252],[543,253],[642,254],[641,8],[643,255],[645,256],[646,257],[644,8],[648,258],[647,259],[650,260],[649,8],[651,261],[653,262],[652,8],[654,263],[656,264],[655,8],[657,265],[659,266],[658,8],[660,267],[885,268],[886,269],[918,270],[917,8],[919,271],[665,252],[666,272],[667,273],[668,274],[670,275],[669,8],[671,276],[673,277],[672,8],[674,278],[676,279],[675,8],[677,280],[679,281],[678,8],[680,282],[682,283],[681,8],[683,284],[685,285],[686,286],[684,8],[688,287],[689,288],[687,8],[639,289],[640,290],[638,8],[691,291],[692,292],[690,8],[694,293],[695,294],[693,8],[697,295],[698,296],[696,8],[700,297],[701,298],[699,8],[703,299],[704,300],[702,8],[706,301],[707,302],[705,8],[709,303],[710,304],[708,8],[712,305],[713,306],[711,8],[715,307],[716,308],[714,8],[718,309],[719,310],[717,8],[721,311],[722,312],[720,8],[729,313],[730,314],[728,8],[732,315],[733,316],[731,8],[726,317],[727,318],[735,319],[736,320],[734,8],[610,321],[611,322],[609,8],[739,323],[737,324],[740,325],[738,8],[741,326],[743,327],[744,328],[742,8],[225,329],[747,330],[748,331],[746,8],[750,332],[751,333],[749,8],[252,334],[269,335],[251,8],[724,336],[725,337],[723,8],[531,338],[532,339],[608,340],[753,341],[754,342],[752,8],[755,343],[756,2],[758,344],[757,345],[760,346],[761,347],[759,8],[763,348],[764,349],[762,8],[767,350],[765,351],[768,352],[766,8],[770,353],[771,354],[769,8],[630,252],[631,355],[775,356],[773,357],[772,30],[776,358],[774,8],[781,359],[782,360],[780,8],[778,361],[779,362],[777,8],[785,363],[786,364],[784,8],[791,365],[792,366],[790,8],[794,367],[795,368],[793,8],[796,369],[798,370],[797,232],[800,371],[801,2],[802,372],[799,8],[804,373],[805,374],[803,8],[807,375],[808,376],[806,8],[810,377],[811,378],[809,8],[813,379],[814,380],[812,8],[816,381],[817,382],[815,8],[819,383],[820,2],[821,384],[818,8],[227,385],[228,386],[226,8],[822,387],[823,388],[825,389],[826,390],[824,8],[828,391],[829,392],[827,8],[859,393],[860,394],[858,8],[831,395],[832,396],[830,8],[834,397],[835,398],[833,8],[837,399],[838,400],[836,8],[840,401],[841,402],[839,8],[843,403],[844,404],[842,8],[846,405],[847,406],[845,8],[850,407],[848,408],[851,409],[849,8],[853,410],[854,411],[852,8],[856,412],[857,413],[855,8],[862,414],[863,415],[861,8],[865,416],[866,417],[864,8],[867,418],[869,419],[870,420],[868,8],[872,421],[873,422],[871,8],[875,423],[876,424],[874,8],[788,425],[789,426],[787,8],[582,427],[583,428],[581,8],[662,429],[661,430],[663,431],[664,432],[889,433],[881,252],[882,434],[146,8],[147,8],[148,8],[149,8],[150,8],[151,8],[152,8],[153,8],[154,8],[155,8],[166,435],[156,8],[157,8],[158,8],[159,8],[160,8],[161,8],[162,8],[163,8],[164,8],[165,8],[607,8],[887,27],[888,27],[890,436],[591,437],[590,8],[144,8],[912,438],[906,232],[900,439],[898,440],[145,441],[891,442],[901,8],[899,443],[893,8],[580,444],[907,445],[915,8],[911,446],[913,8],[143,8],[916,447],[908,8],[896,448],[895,449],[902,450],[892,8],[914,8],[905,451],[903,452],[904,453],[897,454],[909,8],[910,8],[894,8],[783,455],[249,456],[884,457],[883,458],[878,459],[877,8],[745,2],[880,460],[879,8],[223,27],[224,27],[229,461],[230,27],[231,27],[245,462],[232,27],[233,27],[234,27],[235,27],[236,27],[239,27],[240,27],[237,27],[241,27],[242,27],[238,27],[243,27],[98,463],[99,464],[97,8],[102,465],[101,466],[100,463],[76,467],[77,468],[74,2],[75,469],[78,470],[64,8],[93,471],[94,8],[95,472],[129,473],[127,474],[126,8],[128,475],[130,476],[103,477],[104,478],[138,479],[137,480],[139,481],[141,482],[140,8],[115,483],[116,484],[132,485],[131,480],[133,486],[134,8],[136,487],[135,488],[96,489],[114,8],[106,490],[107,491],[79,492],[81,8],[91,493],[92,494],[80,8],[119,495],[121,496],[123,8],[124,8],[117,2],[122,497],[120,8],[118,8],[142,498],[82,8],[125,8],[105,499],[88,500],[84,501],[85,502],[83,502],[89,503],[87,504],[90,505],[86,506],[108,507],[112,508],[110,8],[111,509],[109,8],[113,8],[63,2],[220,8],[221,510],[177,8],[178,511],[182,8],[183,512],[168,513],[169,514],[214,8],[215,515],[184,8],[185,8],[186,516],[170,8],[187,8],[171,513],[172,513],[173,513],[174,517],[175,8],[216,8],[217,518],[218,8],[219,519],[176,2],[207,8],[210,2],[222,520],[212,513],[188,8],[167,8],[190,521],[189,8],[192,522],[191,8],[180,523],[179,8],[181,513],[193,2],[213,8],[208,8],[194,2],[199,8],[201,524],[200,8],[196,525],[195,2],[203,526],[202,8],[205,527],[204,2],[198,528],[197,8],[206,2],[209,8],[211,2],[368,529],[364,530],[351,8],[367,531],[360,532],[358,533],[357,533],[356,532],[353,533],[354,532],[362,534],[355,533],[352,532],[359,533],[365,535],[366,536],[361,537],[363,533],[59,8],[939,538],[993,538],[938,539],[248,538],[246,8],[247,540],[57,8],[61,541],[62,2],[60,8],[927,8],[920,8],[286,8],[58,8],[994,542],[937,543],[925,544],[922,545],[923,544],[932,546],[933,547],[934,548],[931,549],[930,550],[935,551],[928,552],[924,553],[926,554],[921,555],[940,556],[929,555],[936,557],[995,558],[1245,559],[1244,560],[1243,561],[1248,562],[1247,563],[1240,564],[1241,565],[1242,566],[1239,8],[1246,8],[1022,8],[1025,567],[1024,8],[997,568],[996,8],[1008,569],[1000,8],[1001,570],[1007,8],[999,571],[998,8],[1004,572],[1002,570],[1003,8],[1006,571],[1005,8],[1013,573],[1009,8],[1012,574],[1011,8],[1014,575],[1016,576],[1017,575],[1018,8],[1019,8],[1020,577],[1021,578],[1030,579],[1010,8],[1031,8],[1032,580],[1015,8],[1033,8],[1035,8],[1036,581],[1034,582],[941,583],[942,583],[944,584],[945,585],[946,586],[947,587],[948,588],[949,589],[950,590],[951,591],[952,592],[953,593],[954,593],[955,594],[956,595],[957,596],[958,597],[943,8],[991,8],[959,598],[960,599],[961,600],[992,601],[962,602],[963,603],[964,604],[965,605],[966,606],[967,607],[968,608],[969,609],[970,610],[971,611],[972,612],[973,613],[975,614],[974,615],[976,616],[977,617],[978,8],[979,618],[980,619],[981,620],[982,621],[983,622],[984,623],[985,624],[986,625],[987,626],[988,627],[989,628],[990,629],[1037,8],[1038,8],[309,8],[307,8],[311,630],[1261,30],[1039,582],[1040,8],[310,8],[1065,631],[1066,632],[1041,633],[1044,633],[1063,631],[1064,631],[1054,631],[1053,634],[1051,631],[1046,631],[1059,631],[1057,631],[1061,631],[1045,631],[1058,631],[1062,631],[1047,631],[1048,631],[1060,631],[1042,631],[1049,631],[1050,631],[1052,631],[1056,631],[1067,635],[1055,631],[1043,631],[1080,636],[1079,8],[1074,635],[1076,637],[1075,635],[1068,635],[1069,635],[1071,635],[1073,635],[1077,637],[1078,637],[1070,637],[1072,637],[1081,8],[1085,638],[1084,639],[1083,640],[1082,641],[1086,8],[1087,642],[1088,8],[1089,643],[1090,8],[1269,8],[1023,8],[308,8],[1029,644],[1257,645],[1027,646],[1028,647],[1026,648],[11,8],[12,8],[14,8],[13,8],[2,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[3,8],[4,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[9,8],[51,8],[52,8],[53,8],[54,8],[55,8],[1,8],[10,8],[56,8],[1185,649],[1187,650],[1112,649],[1184,649],[1181,651],[1183,652],[1182,653],[1113,580],[1186,654],[1114,655],[1115,656],[1116,657],[1135,8],[1137,658],[1138,659],[1139,659],[1147,658],[1140,658],[1141,658],[1142,658],[1146,659],[1149,8],[1148,659],[1143,658],[1144,659],[1145,658],[1150,660],[1136,649],[1234,649],[1235,649],[1236,649],[1237,649],[1238,649],[1250,661],[1251,649],[1252,662],[1249,663],[1210,664],[1197,665],[1195,8],[1201,666],[1196,667],[1200,668],[1212,669],[1211,8],[1198,8],[1202,670],[1203,671],[1204,671],[1207,672],[1205,671],[1206,673],[1199,674],[1208,675],[1209,664],[1220,676],[1221,677],[1222,678],[1219,679],[1218,680],[1223,8],[1217,8],[1224,681],[1225,682],[1227,683],[1228,684],[1226,8],[1230,685],[1229,686],[1216,687],[1193,688],[1191,8],[1188,661],[1214,688],[1194,689],[1213,690],[1215,686],[1192,691],[1190,692],[1189,686],[1233,693],[1231,686],[1232,686],[1256,694],[1255,8],[1258,695],[1264,696],[1267,697],[1265,686],[1266,686],[1098,698],[1101,698],[1099,699],[1100,700],[1102,700],[1095,8],[1104,701],[1109,702],[1097,700],[1111,703],[1105,8],[1096,8],[1103,700],[1106,704],[1108,705],[1110,698],[1107,8],[1263,706],[1262,707],[1175,708],[1117,649],[1167,709],[1168,649],[1180,710],[1173,649],[1171,8],[1172,639],[1169,8],[1178,711],[1170,649],[1179,8],[1176,8],[1166,709],[1174,649],[1177,708],[1152,8],[1133,712],[1151,661],[1165,713],[1131,714],[1134,715],[1153,715],[1154,8],[1155,715],[1156,715],[1157,715],[1158,8],[1159,649],[1164,716],[1160,715],[1163,8],[1161,715],[1162,8],[1132,717],[1259,718],[1268,719],[1260,720],[1253,721],[1254,722],[1130,723],[1120,724],[1122,725],[1128,726],[1124,8],[1125,8],[1123,727],[1126,723],[1118,8],[1119,8],[1129,728],[1121,729],[1127,730],[1091,8],[1092,8],[1093,8],[1094,8],[1270,731]],"exportedModulesMap":[[66,1],[69,2],[71,3],[68,4],[70,5],[67,6],[72,4],[73,7],[65,8],[415,9],[416,9],[417,9],[418,10],[419,9],[420,10],[421,9],[422,9],[423,10],[424,10],[425,11],[426,12],[430,13],[427,12],[431,14],[432,15],[434,16],[433,17],[428,8],[429,18],[413,19],[414,20],[293,21],[292,22],[294,8],[295,23],[301,24],[300,25],[302,8],[303,26],[244,27],[304,2],[305,28],[313,29],[312,30],[314,31],[316,32],[315,2],[317,33],[319,34],[318,22],[320,35],[321,8],[323,36],[322,37],[328,38],[327,39],[330,40],[329,8],[377,41],[376,42],[379,43],[378,8],[381,44],[380,45],[383,46],[382,8],[385,47],[384,48],[387,49],[386,8],[389,50],[388,51],[391,52],[390,8],[393,53],[392,2],[394,54],[410,55],[409,56],[412,57],[411,8],[402,58],[401,59],[404,60],[403,8],[373,61],[372,62],[375,63],[374,8],[370,64],[369,2],[371,65],[444,66],[443,67],[446,68],[445,8],[451,69],[450,70],[453,71],[452,8],[458,72],[457,73],[460,74],[459,8],[465,75],[464,76],[467,77],[466,8],[503,78],[502,79],[505,80],[504,8],[479,81],[478,82],[481,83],[480,8],[472,84],[471,85],[469,86],[468,59],[470,8],[474,87],[473,8],[496,88],[495,89],[482,2],[498,90],[497,8],[492,91],[491,92],[494,93],[493,8],[507,94],[506,2],[508,95],[398,96],[397,97],[400,98],[399,8],[436,99],[435,100],[438,101],[437,8],[306,27],[527,102],[525,8],[526,103],[524,104],[523,105],[522,106],[395,8],[521,107],[396,108],[510,109],[509,2],[513,110],[512,111],[511,30],[299,112],[298,113],[297,114],[346,115],[345,116],[344,2],[515,117],[517,118],[516,119],[514,120],[326,121],[325,122],[324,123],[333,124],[339,125],[331,30],[338,126],[335,127],[334,128],[337,129],[336,30],[347,130],[350,131],[349,132],[348,133],[520,134],[519,135],[518,30],[343,136],[341,137],[340,138],[342,139],[408,140],[406,141],[405,142],[407,139],[439,143],[442,144],[441,145],[440,146],[449,147],[448,148],[447,2],[456,149],[455,150],[454,30],[463,151],[462,152],[461,2],[501,153],[500,154],[499,155],[477,156],[476,157],[475,30],[483,158],[486,159],[485,160],[484,161],[487,162],[490,163],[489,164],[488,165],[281,2],[296,8],[290,166],[279,166],[280,8],[283,167],[291,168],[284,2],[287,169],[289,2],[285,8],[282,2],[332,30],[288,170],[253,171],[250,8],[254,172],[256,173],[255,8],[257,174],[259,175],[258,8],[260,176],[267,177],[266,8],[268,178],[271,179],[270,8],[272,180],[274,181],[273,8],[275,182],[277,183],[276,8],[278,184],[534,185],[533,8],[535,186],[537,187],[536,8],[538,188],[540,189],[539,8],[541,190],[545,191],[544,8],[546,192],[548,193],[547,8],[549,194],[551,195],[550,8],[552,196],[554,197],[553,8],[555,198],[556,199],[557,8],[558,200],[560,201],[559,8],[561,202],[563,203],[562,8],[564,204],[264,205],[262,206],[263,8],[265,207],[261,8],[566,208],[565,8],[567,209],[569,210],[568,8],[570,211],[572,212],[571,8],[573,213],[575,214],[574,8],[576,215],[578,216],[577,8],[579,217],[585,218],[584,8],[586,219],[588,220],[587,8],[589,221],[593,222],[592,8],[594,223],[529,224],[528,8],[530,225],[596,226],[595,8],[597,227],[598,228],[600,229],[599,8],[601,230],[603,231],[602,232],[604,233],[605,234],[606,235],[613,236],[612,8],[614,237],[616,238],[615,8],[617,239],[619,240],[618,8],[620,241],[622,242],[621,8],[623,243],[625,244],[624,8],[626,245],[628,246],[627,8],[629,247],[633,248],[632,8],[634,249],[636,250],[635,8],[637,251],[542,252],[543,253],[642,254],[641,8],[643,255],[645,256],[646,257],[644,8],[648,258],[647,259],[650,260],[649,8],[651,261],[653,262],[652,8],[654,263],[656,264],[655,8],[657,265],[659,266],[658,8],[660,267],[885,268],[886,269],[918,270],[917,8],[919,271],[665,252],[666,272],[667,273],[668,274],[670,275],[669,8],[671,276],[673,277],[672,8],[674,278],[676,279],[675,8],[677,280],[679,281],[678,8],[680,282],[682,283],[681,8],[683,284],[685,285],[686,286],[684,8],[688,287],[689,288],[687,8],[639,289],[640,290],[638,8],[691,291],[692,292],[690,8],[694,293],[695,294],[693,8],[697,295],[698,296],[696,8],[700,297],[701,298],[699,8],[703,299],[704,300],[702,8],[706,301],[707,302],[705,8],[709,303],[710,304],[708,8],[712,305],[713,306],[711,8],[715,307],[716,308],[714,8],[718,309],[719,310],[717,8],[721,311],[722,312],[720,8],[729,313],[730,314],[728,8],[732,315],[733,316],[731,8],[726,317],[727,318],[735,319],[736,320],[734,8],[610,321],[611,322],[609,8],[739,323],[737,324],[740,325],[738,8],[741,326],[743,327],[744,328],[742,8],[225,329],[747,330],[748,331],[746,8],[750,332],[751,333],[749,8],[252,334],[269,335],[251,8],[724,336],[725,337],[723,8],[531,338],[532,339],[608,340],[753,341],[754,342],[752,8],[755,343],[756,2],[758,344],[757,345],[760,346],[761,347],[759,8],[763,348],[764,349],[762,8],[767,350],[765,351],[768,352],[766,8],[770,353],[771,354],[769,8],[630,252],[631,355],[775,356],[773,357],[772,30],[776,358],[774,8],[781,359],[782,360],[780,8],[778,361],[779,362],[777,8],[785,363],[786,364],[784,8],[791,365],[792,366],[790,8],[794,367],[795,368],[793,8],[796,369],[798,370],[797,232],[800,371],[801,2],[802,372],[799,8],[804,373],[805,374],[803,8],[807,375],[808,376],[806,8],[810,377],[811,378],[809,8],[813,379],[814,380],[812,8],[816,381],[817,382],[815,8],[819,383],[820,2],[821,384],[818,8],[227,385],[228,386],[226,8],[822,387],[823,388],[825,389],[826,390],[824,8],[828,391],[829,392],[827,8],[859,393],[860,394],[858,8],[831,395],[832,396],[830,8],[834,397],[835,398],[833,8],[837,399],[838,400],[836,8],[840,401],[841,402],[839,8],[843,403],[844,404],[842,8],[846,405],[847,406],[845,8],[850,407],[848,408],[851,409],[849,8],[853,410],[854,411],[852,8],[856,412],[857,413],[855,8],[862,414],[863,415],[861,8],[865,416],[866,417],[864,8],[867,418],[869,419],[870,420],[868,8],[872,421],[873,422],[871,8],[875,423],[876,424],[874,8],[788,425],[789,426],[787,8],[582,427],[583,428],[581,8],[662,429],[661,430],[663,431],[664,432],[889,433],[881,252],[882,434],[146,8],[147,8],[148,8],[149,8],[150,8],[151,8],[152,8],[153,8],[154,8],[155,8],[166,435],[156,8],[157,8],[158,8],[159,8],[160,8],[161,8],[162,8],[163,8],[164,8],[165,8],[607,8],[887,27],[888,27],[890,436],[591,437],[590,8],[144,8],[912,438],[906,232],[900,439],[898,440],[145,441],[891,442],[901,8],[899,443],[893,8],[580,444],[907,445],[915,8],[911,446],[913,8],[143,8],[916,447],[908,8],[896,448],[895,449],[902,450],[892,8],[914,8],[905,451],[903,452],[904,453],[897,454],[909,8],[910,8],[894,8],[783,455],[249,456],[884,457],[883,458],[878,459],[877,8],[745,2],[880,460],[879,8],[223,27],[224,27],[229,461],[230,27],[231,27],[245,462],[232,27],[233,27],[234,27],[235,27],[236,27],[239,27],[240,27],[237,27],[241,27],[242,27],[238,27],[243,27],[98,463],[99,464],[97,8],[102,465],[101,466],[100,463],[76,467],[77,468],[74,2],[75,469],[78,470],[64,8],[93,471],[94,8],[95,472],[129,473],[127,474],[126,8],[128,475],[130,476],[103,477],[104,478],[138,479],[137,480],[139,481],[141,482],[140,8],[115,483],[116,484],[132,485],[131,480],[133,486],[134,8],[136,487],[135,488],[96,489],[114,8],[106,490],[107,491],[79,492],[81,8],[91,493],[92,494],[80,8],[119,495],[121,496],[123,8],[124,8],[117,2],[122,497],[120,8],[118,8],[142,498],[82,8],[125,8],[105,499],[88,500],[84,501],[85,502],[83,502],[89,503],[87,504],[90,505],[86,506],[108,507],[112,508],[110,8],[111,509],[109,8],[113,8],[63,2],[220,8],[221,510],[177,8],[178,511],[182,8],[183,512],[168,513],[169,514],[214,8],[215,515],[184,8],[185,8],[186,516],[170,8],[187,8],[171,513],[172,513],[173,513],[174,517],[175,8],[216,8],[217,518],[218,8],[219,519],[176,2],[207,8],[210,2],[222,520],[212,513],[188,8],[167,8],[190,521],[189,8],[192,522],[191,8],[180,523],[179,8],[181,513],[193,2],[213,8],[208,8],[194,2],[199,8],[201,524],[200,8],[196,525],[195,2],[203,526],[202,8],[205,527],[204,2],[198,528],[197,8],[206,2],[209,8],[211,2],[368,529],[364,530],[351,8],[367,531],[360,532],[358,533],[357,533],[356,532],[353,533],[354,532],[362,534],[355,533],[352,532],[359,533],[365,535],[366,536],[361,537],[363,533],[59,8],[939,538],[993,538],[938,539],[248,538],[246,8],[247,540],[57,8],[61,541],[62,2],[60,8],[927,8],[920,8],[286,8],[58,8],[994,542],[937,543],[925,544],[922,545],[923,544],[932,546],[933,547],[934,548],[931,549],[930,550],[935,551],[928,552],[924,553],[926,554],[921,555],[940,556],[929,555],[936,557],[995,558],[1245,559],[1244,560],[1243,561],[1248,562],[1247,563],[1240,564],[1241,565],[1242,566],[1239,8],[1246,8],[1022,8],[1025,567],[1024,8],[997,568],[996,8],[1008,569],[1000,8],[1001,570],[1007,8],[999,571],[998,8],[1004,572],[1002,570],[1003,8],[1006,571],[1005,8],[1013,573],[1009,8],[1012,574],[1011,8],[1014,575],[1016,576],[1017,575],[1018,8],[1019,8],[1020,577],[1021,578],[1030,579],[1010,8],[1031,8],[1032,580],[1015,8],[1033,8],[1035,8],[1036,581],[1034,582],[941,583],[942,583],[944,584],[945,585],[946,586],[947,587],[948,588],[949,589],[950,590],[951,591],[952,592],[953,593],[954,593],[955,594],[956,595],[957,596],[958,597],[943,8],[991,8],[959,598],[960,599],[961,600],[992,601],[962,602],[963,603],[964,604],[965,605],[966,606],[967,607],[968,608],[969,609],[970,610],[971,611],[972,612],[973,613],[975,614],[974,615],[976,616],[977,617],[978,8],[979,618],[980,619],[981,620],[982,621],[983,622],[984,623],[985,624],[986,625],[987,626],[988,627],[989,628],[990,629],[1037,8],[1038,8],[309,8],[307,8],[311,630],[1261,30],[1039,582],[1040,8],[310,8],[1065,631],[1066,632],[1041,633],[1044,633],[1063,631],[1064,631],[1054,631],[1053,634],[1051,631],[1046,631],[1059,631],[1057,631],[1061,631],[1045,631],[1058,631],[1062,631],[1047,631],[1048,631],[1060,631],[1042,631],[1049,631],[1050,631],[1052,631],[1056,631],[1067,635],[1055,631],[1043,631],[1080,636],[1079,8],[1074,635],[1076,637],[1075,635],[1068,635],[1069,635],[1071,635],[1073,635],[1077,637],[1078,637],[1070,637],[1072,637],[1081,8],[1085,638],[1084,639],[1083,640],[1082,641],[1086,8],[1087,642],[1088,8],[1089,643],[1090,8],[1269,8],[1023,8],[308,8],[1029,644],[1257,645],[1027,646],[1028,647],[1026,648],[11,8],[12,8],[14,8],[13,8],[2,8],[15,8],[16,8],[17,8],[18,8],[19,8],[20,8],[21,8],[22,8],[3,8],[4,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[9,8],[51,8],[52,8],[53,8],[54,8],[55,8],[1,8],[10,8],[56,8],[1185,649],[1187,650],[1112,649],[1184,649],[1181,651],[1183,652],[1182,653],[1113,580],[1186,654],[1114,655],[1115,656],[1116,657],[1135,8],[1137,658],[1138,659],[1139,659],[1147,658],[1140,658],[1141,658],[1142,658],[1146,659],[1149,8],[1148,659],[1143,658],[1144,659],[1145,658],[1150,660],[1136,649],[1234,649],[1235,649],[1236,649],[1237,649],[1238,649],[1250,661],[1251,649],[1252,662],[1249,663],[1210,664],[1197,665],[1195,8],[1201,666],[1196,667],[1200,668],[1212,669],[1211,8],[1198,8],[1202,670],[1203,671],[1204,671],[1207,672],[1205,671],[1206,673],[1199,674],[1208,675],[1209,664],[1220,676],[1221,677],[1222,678],[1219,679],[1218,680],[1223,8],[1217,8],[1224,681],[1225,682],[1227,683],[1228,684],[1226,8],[1230,685],[1229,686],[1216,687],[1193,688],[1191,8],[1188,661],[1214,688],[1194,689],[1213,690],[1215,686],[1192,691],[1190,692],[1189,686],[1233,693],[1231,686],[1232,686],[1256,694],[1255,8],[1258,695],[1264,696],[1267,697],[1265,686],[1266,686],[1098,698],[1101,698],[1099,699],[1100,700],[1102,700],[1095,8],[1104,701],[1109,702],[1097,700],[1111,703],[1105,8],[1096,8],[1103,700],[1106,704],[1108,705],[1110,698],[1107,8],[1263,706],[1262,707],[1175,708],[1117,649],[1167,709],[1168,649],[1180,710],[1173,649],[1171,8],[1172,639],[1169,8],[1178,711],[1170,649],[1179,8],[1176,8],[1166,709],[1174,649],[1177,708],[1152,8],[1133,712],[1151,661],[1165,713],[1131,714],[1134,715],[1153,715],[1154,8],[1155,715],[1156,715],[1157,715],[1158,8],[1159,649],[1164,716],[1160,715],[1163,8],[1161,715],[1162,8],[1132,717],[1259,718],[1268,719],[1260,720],[1253,721],[1254,722],[1130,723],[1120,724],[1122,725],[1128,726],[1124,8],[1125,8],[1123,727],[1126,723],[1118,8],[1119,8],[1129,728],[1121,729],[1127,730],[1091,8],[1092,8],[1093,8],[1094,8],[1270,731]],"semanticDiagnosticsPerFile":[66,69,71,68,70,67,72,73,65,415,416,417,418,419,420,421,422,423,424,425,426,430,427,431,432,434,433,428,429,413,414,293,292,294,295,301,300,302,303,244,304,305,313,312,314,316,315,317,319,318,320,321,323,322,328,327,330,329,377,376,379,378,381,380,383,382,385,384,387,386,389,388,391,390,393,392,394,410,409,412,411,402,401,404,403,373,372,375,374,370,369,371,444,443,446,445,451,450,453,452,458,457,460,459,465,464,467,466,503,502,505,504,479,478,481,480,472,471,469,468,470,474,473,496,495,482,498,497,492,491,494,493,507,506,508,398,397,400,399,436,435,438,437,306,527,525,526,524,523,522,395,521,396,510,509,513,512,511,299,298,297,346,345,344,515,517,516,514,326,325,324,333,339,331,338,335,334,337,336,347,350,349,348,520,519,518,343,341,340,342,408,406,405,407,439,442,441,440,449,448,447,456,455,454,463,462,461,501,500,499,477,476,475,483,486,485,484,487,490,489,488,281,296,290,279,280,283,291,284,287,289,285,282,332,288,253,250,254,256,255,257,259,258,260,267,266,268,271,270,272,274,273,275,277,276,278,534,533,535,537,536,538,540,539,541,545,544,546,548,547,549,551,550,552,554,553,555,556,557,558,560,559,561,563,562,564,264,262,263,265,261,566,565,567,569,568,570,572,571,573,575,574,576,578,577,579,585,584,586,588,587,589,593,592,594,529,528,530,596,595,597,598,600,599,601,603,602,604,605,606,613,612,614,616,615,617,619,618,620,622,621,623,625,624,626,628,627,629,633,632,634,636,635,637,542,543,642,641,643,645,646,644,648,647,650,649,651,653,652,654,656,655,657,659,658,660,885,886,918,917,919,665,666,667,668,670,669,671,673,672,674,676,675,677,679,678,680,682,681,683,685,686,684,688,689,687,639,640,638,691,692,690,694,695,693,697,698,696,700,701,699,703,704,702,706,707,705,709,710,708,712,713,711,715,716,714,718,719,717,721,722,720,729,730,728,732,733,731,726,727,735,736,734,610,611,609,739,737,740,738,741,743,744,742,225,747,748,746,750,751,749,252,269,251,724,725,723,531,532,608,753,754,752,755,756,758,757,760,761,759,763,764,762,767,765,768,766,770,771,769,630,631,775,773,772,776,774,781,782,780,778,779,777,785,786,784,791,792,790,794,795,793,796,798,797,800,801,802,799,804,805,803,807,808,806,810,811,809,813,814,812,816,817,815,819,820,821,818,227,228,226,822,823,825,826,824,828,829,827,859,860,858,831,832,830,834,835,833,837,838,836,840,841,839,843,844,842,846,847,845,850,848,851,849,853,854,852,856,857,855,862,863,861,865,866,864,867,869,870,868,872,873,871,875,876,874,788,789,787,582,583,581,662,661,663,664,889,881,882,146,147,148,149,150,151,152,153,154,155,166,156,157,158,159,160,161,162,163,164,165,607,887,888,890,591,590,144,912,906,900,898,145,891,901,899,893,580,907,915,911,913,143,916,908,896,895,902,892,914,905,903,904,897,909,910,894,783,249,884,883,878,877,745,880,879,223,224,229,230,231,245,232,233,234,235,236,239,240,237,241,242,238,243,98,99,97,102,101,100,76,77,74,75,78,64,93,94,95,129,127,126,128,130,103,104,138,137,139,141,140,115,116,132,131,133,134,136,135,96,114,106,107,79,81,91,92,80,119,121,123,124,117,122,120,118,142,82,125,105,88,84,85,83,89,87,90,86,108,112,110,111,109,113,63,220,221,177,178,182,183,168,169,214,215,184,185,186,170,187,171,172,173,174,175,216,217,218,219,176,207,210,222,212,188,167,190,189,192,191,180,179,181,193,213,208,194,199,201,200,196,195,203,202,205,204,198,197,206,209,211,368,364,351,367,360,358,357,356,353,354,362,355,352,359,365,366,361,363,59,939,993,938,248,246,247,57,61,62,60,927,920,286,58,994,937,925,922,923,932,933,934,931,930,935,928,924,926,921,940,929,936,995,1245,1244,1243,1248,1247,1240,1241,1242,1239,1246,1022,1025,1024,997,996,1008,1000,1001,1007,999,998,1004,1002,1003,1006,1005,1013,1009,1012,1011,1014,1016,1017,1018,1019,1020,1021,1030,1010,1031,1032,1015,1033,1035,1036,1034,941,942,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,943,991,959,960,961,992,962,963,964,965,966,967,968,969,970,971,972,973,975,974,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,1037,1038,309,307,311,1261,1039,1040,310,1065,1066,1041,1044,1063,1064,1054,1053,1051,1046,1059,1057,1061,1045,1058,1062,1047,1048,1060,1042,1049,1050,1052,1056,1067,1055,1043,1080,1079,1074,1076,1075,1068,1069,1071,1073,1077,1078,1070,1072,1081,1085,1084,1083,1082,1086,1087,1088,1089,1090,1269,1023,308,1029,1257,1027,1028,1026,11,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,54,55,1,10,56,1185,1187,1112,1184,1181,1183,1182,1113,1186,1114,1115,1116,1135,1137,1138,1139,1147,1140,1141,1142,1146,1149,1148,1143,1144,1145,1150,1136,1234,1235,1236,1237,1238,1250,1251,1252,1249,1210,1197,1195,1201,1196,1200,1212,1211,1198,1202,1203,1204,1207,1205,1206,1199,1208,1209,1220,1221,1222,1219,1218,1223,1217,1224,1225,1227,1228,1226,1230,1229,1216,1193,1191,1188,1214,1194,1213,1215,1192,1190,1189,1233,1231,1232,1256,1255,1258,1264,1267,1265,1266,1098,1101,1099,1100,1102,1095,1104,1109,1097,1111,1105,1096,1103,1106,1108,1110,1107,1263,1262,1175,1117,1167,1168,1180,1173,1171,1172,1169,1178,1170,1179,1176,1166,1174,1177,1152,1133,1151,1165,1131,1134,1153,1154,1155,1156,1157,1158,1159,1164,1160,1163,1161,1162,1132,1259,1268,1260,1253,1254,1130,1120,1122,1128,1124,1125,1123,1126,1118,1119,1129,1121,1127,1091,1092,1093,1094,1270],"affectedFilesPendingEmit":[[66,1],[69,1],[71,1],[68,1],[70,1],[67,1],[72,1],[73,1],[65,1],[415,1],[416,1],[417,1],[418,1],[419,1],[420,1],[421,1],[422,1],[423,1],[424,1],[425,1],[426,1],[430,1],[427,1],[431,1],[432,1],[434,1],[433,1],[428,1],[429,1],[413,1],[414,1],[293,1],[292,1],[294,1],[295,1],[301,1],[300,1],[302,1],[303,1],[244,1],[304,1],[305,1],[313,1],[312,1],[314,1],[316,1],[315,1],[317,1],[319,1],[318,1],[320,1],[321,1],[323,1],[322,1],[328,1],[327,1],[330,1],[329,1],[377,1],[376,1],[379,1],[378,1],[381,1],[380,1],[383,1],[382,1],[385,1],[384,1],[387,1],[386,1],[389,1],[388,1],[391,1],[390,1],[393,1],[392,1],[394,1],[410,1],[409,1],[412,1],[411,1],[402,1],[401,1],[404,1],[403,1],[373,1],[372,1],[375,1],[374,1],[370,1],[369,1],[371,1],[444,1],[443,1],[446,1],[445,1],[451,1],[450,1],[453,1],[452,1],[458,1],[457,1],[460,1],[459,1],[465,1],[464,1],[467,1],[466,1],[503,1],[502,1],[505,1],[504,1],[479,1],[478,1],[481,1],[480,1],[472,1],[471,1],[469,1],[468,1],[470,1],[474,1],[473,1],[496,1],[495,1],[482,1],[498,1],[497,1],[492,1],[491,1],[494,1],[493,1],[507,1],[506,1],[508,1],[398,1],[397,1],[400,1],[399,1],[436,1],[435,1],[438,1],[437,1],[306,1],[527,1],[525,1],[526,1],[524,1],[523,1],[522,1],[395,1],[521,1],[396,1],[510,1],[509,1],[513,1],[512,1],[511,1],[299,1],[298,1],[297,1],[346,1],[345,1],[344,1],[515,1],[517,1],[516,1],[514,1],[326,1],[325,1],[324,1],[333,1],[339,1],[331,1],[338,1],[335,1],[334,1],[337,1],[336,1],[347,1],[350,1],[349,1],[348,1],[520,1],[519,1],[518,1],[343,1],[341,1],[340,1],[342,1],[408,1],[406,1],[405,1],[407,1],[439,1],[442,1],[441,1],[440,1],[449,1],[448,1],[447,1],[456,1],[455,1],[454,1],[463,1],[462,1],[461,1],[501,1],[500,1],[499,1],[477,1],[476,1],[475,1],[483,1],[486,1],[485,1],[484,1],[487,1],[490,1],[489,1],[488,1],[281,1],[296,1],[290,1],[279,1],[280,1],[283,1],[291,1],[284,1],[287,1],[289,1],[285,1],[282,1],[332,1],[288,1],[253,1],[250,1],[254,1],[256,1],[255,1],[257,1],[259,1],[258,1],[260,1],[267,1],[266,1],[268,1],[271,1],[270,1],[272,1],[274,1],[273,1],[275,1],[277,1],[276,1],[278,1],[534,1],[533,1],[535,1],[537,1],[536,1],[538,1],[540,1],[539,1],[541,1],[545,1],[544,1],[546,1],[548,1],[547,1],[549,1],[551,1],[550,1],[552,1],[554,1],[553,1],[555,1],[556,1],[557,1],[558,1],[560,1],[559,1],[561,1],[563,1],[562,1],[564,1],[264,1],[262,1],[263,1],[265,1],[261,1],[566,1],[565,1],[567,1],[569,1],[568,1],[570,1],[572,1],[571,1],[573,1],[575,1],[574,1],[576,1],[578,1],[577,1],[579,1],[585,1],[584,1],[586,1],[588,1],[587,1],[589,1],[593,1],[592,1],[594,1],[529,1],[528,1],[530,1],[596,1],[595,1],[597,1],[598,1],[600,1],[599,1],[601,1],[603,1],[602,1],[604,1],[605,1],[606,1],[613,1],[612,1],[614,1],[616,1],[615,1],[617,1],[619,1],[618,1],[620,1],[622,1],[621,1],[623,1],[625,1],[624,1],[626,1],[628,1],[627,1],[629,1],[633,1],[632,1],[634,1],[636,1],[635,1],[637,1],[542,1],[543,1],[642,1],[641,1],[643,1],[645,1],[646,1],[644,1],[648,1],[647,1],[650,1],[649,1],[651,1],[653,1],[652,1],[654,1],[656,1],[655,1],[657,1],[659,1],[658,1],[660,1],[885,1],[886,1],[918,1],[917,1],[919,1],[665,1],[666,1],[667,1],[668,1],[670,1],[669,1],[671,1],[673,1],[672,1],[674,1],[676,1],[675,1],[677,1],[679,1],[678,1],[680,1],[682,1],[681,1],[683,1],[685,1],[686,1],[684,1],[688,1],[689,1],[687,1],[639,1],[640,1],[638,1],[691,1],[692,1],[690,1],[694,1],[695,1],[693,1],[697,1],[698,1],[696,1],[700,1],[701,1],[699,1],[703,1],[704,1],[702,1],[706,1],[707,1],[705,1],[709,1],[710,1],[708,1],[712,1],[713,1],[711,1],[715,1],[716,1],[714,1],[718,1],[719,1],[717,1],[721,1],[722,1],[720,1],[729,1],[730,1],[728,1],[732,1],[733,1],[731,1],[726,1],[727,1],[735,1],[736,1],[734,1],[610,1],[611,1],[609,1],[739,1],[737,1],[740,1],[738,1],[741,1],[743,1],[744,1],[742,1],[225,1],[747,1],[748,1],[746,1],[750,1],[751,1],[749,1],[252,1],[269,1],[251,1],[724,1],[725,1],[723,1],[531,1],[532,1],[608,1],[753,1],[754,1],[752,1],[755,1],[756,1],[758,1],[757,1],[760,1],[761,1],[759,1],[763,1],[764,1],[762,1],[767,1],[765,1],[768,1],[766,1],[770,1],[771,1],[769,1],[630,1],[631,1],[775,1],[773,1],[772,1],[776,1],[774,1],[781,1],[782,1],[780,1],[778,1],[779,1],[777,1],[785,1],[786,1],[784,1],[791,1],[792,1],[790,1],[794,1],[795,1],[793,1],[796,1],[798,1],[797,1],[800,1],[801,1],[802,1],[799,1],[804,1],[805,1],[803,1],[807,1],[808,1],[806,1],[810,1],[811,1],[809,1],[813,1],[814,1],[812,1],[816,1],[817,1],[815,1],[819,1],[820,1],[821,1],[818,1],[227,1],[228,1],[226,1],[822,1],[823,1],[825,1],[826,1],[824,1],[828,1],[829,1],[827,1],[859,1],[860,1],[858,1],[831,1],[832,1],[830,1],[834,1],[835,1],[833,1],[837,1],[838,1],[836,1],[840,1],[841,1],[839,1],[843,1],[844,1],[842,1],[846,1],[847,1],[845,1],[850,1],[848,1],[851,1],[849,1],[853,1],[854,1],[852,1],[856,1],[857,1],[855,1],[862,1],[863,1],[861,1],[865,1],[866,1],[864,1],[867,1],[869,1],[870,1],[868,1],[872,1],[873,1],[871,1],[875,1],[876,1],[874,1],[788,1],[789,1],[787,1],[582,1],[583,1],[581,1],[662,1],[661,1],[663,1],[664,1],[889,1],[881,1],[882,1],[146,1],[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[166,1],[156,1],[157,1],[158,1],[159,1],[160,1],[161,1],[162,1],[163,1],[164,1],[165,1],[607,1],[887,1],[888,1],[890,1],[591,1],[590,1],[144,1],[912,1],[906,1],[900,1],[898,1],[145,1],[891,1],[901,1],[899,1],[893,1],[580,1],[907,1],[915,1],[911,1],[913,1],[143,1],[916,1],[908,1],[896,1],[895,1],[902,1],[892,1],[914,1],[905,1],[903,1],[904,1],[897,1],[909,1],[910,1],[894,1],[783,1],[249,1],[884,1],[883,1],[878,1],[877,1],[745,1],[880,1],[879,1],[223,1],[224,1],[229,1],[230,1],[231,1],[245,1],[232,1],[233,1],[234,1],[235,1],[236,1],[239,1],[240,1],[237,1],[241,1],[242,1],[238,1],[243,1],[98,1],[99,1],[97,1],[102,1],[101,1],[100,1],[76,1],[77,1],[74,1],[75,1],[78,1],[64,1],[93,1],[94,1],[95,1],[129,1],[127,1],[126,1],[128,1],[130,1],[103,1],[104,1],[138,1],[137,1],[139,1],[141,1],[140,1],[115,1],[116,1],[132,1],[131,1],[133,1],[134,1],[136,1],[135,1],[96,1],[114,1],[106,1],[107,1],[79,1],[81,1],[91,1],[92,1],[80,1],[119,1],[121,1],[123,1],[124,1],[117,1],[122,1],[120,1],[118,1],[142,1],[82,1],[125,1],[105,1],[88,1],[84,1],[85,1],[83,1],[89,1],[87,1],[90,1],[86,1],[108,1],[112,1],[110,1],[111,1],[109,1],[113,1],[63,1],[220,1],[221,1],[177,1],[178,1],[182,1],[183,1],[168,1],[169,1],[214,1],[215,1],[184,1],[185,1],[186,1],[170,1],[187,1],[171,1],[172,1],[173,1],[174,1],[175,1],[216,1],[217,1],[218,1],[219,1],[176,1],[207,1],[210,1],[222,1],[212,1],[188,1],[167,1],[190,1],[189,1],[192,1],[191,1],[180,1],[179,1],[181,1],[193,1],[213,1],[208,1],[194,1],[199,1],[201,1],[200,1],[196,1],[195,1],[203,1],[202,1],[205,1],[204,1],[198,1],[197,1],[206,1],[209,1],[211,1],[368,1],[364,1],[351,1],[367,1],[360,1],[358,1],[357,1],[356,1],[353,1],[354,1],[362,1],[355,1],[352,1],[359,1],[365,1],[366,1],[361,1],[363,1],[59,1],[939,1],[993,1],[938,1],[248,1],[246,1],[247,1],[57,1],[61,1],[62,1],[60,1],[927,1],[920,1],[286,1],[58,1],[994,1],[937,1],[925,1],[922,1],[923,1],[932,1],[933,1],[934,1],[931,1],[930,1],[935,1],[928,1],[924,1],[926,1],[921,1],[940,1],[929,1],[936,1],[995,1],[1245,1],[1244,1],[1243,1],[1248,1],[1247,1],[1240,1],[1241,1],[1242,1],[1239,1],[1246,1],[1022,1],[1025,1],[1024,1],[997,1],[996,1],[1008,1],[1000,1],[1001,1],[1007,1],[999,1],[998,1],[1004,1],[1002,1],[1003,1],[1006,1],[1005,1],[1013,1],[1009,1],[1012,1],[1011,1],[1014,1],[1016,1],[1017,1],[1018,1],[1019,1],[1020,1],[1021,1],[1030,1],[1010,1],[1031,1],[1032,1],[1015,1],[1033,1],[1035,1],[1036,1],[1034,1],[941,1],[942,1],[944,1],[945,1],[946,1],[947,1],[948,1],[949,1],[950,1],[951,1],[952,1],[953,1],[954,1],[955,1],[956,1],[957,1],[958,1],[943,1],[991,1],[959,1],[960,1],[961,1],[992,1],[962,1],[963,1],[964,1],[965,1],[966,1],[967,1],[968,1],[969,1],[970,1],[971,1],[972,1],[973,1],[975,1],[974,1],[976,1],[977,1],[978,1],[979,1],[980,1],[981,1],[982,1],[983,1],[984,1],[985,1],[986,1],[987,1],[988,1],[989,1],[990,1],[1037,1],[1038,1],[309,1],[307,1],[311,1],[1261,1],[1039,1],[1040,1],[310,1],[1065,1],[1066,1],[1041,1],[1044,1],[1063,1],[1064,1],[1054,1],[1053,1],[1051,1],[1046,1],[1059,1],[1057,1],[1061,1],[1045,1],[1058,1],[1062,1],[1047,1],[1048,1],[1060,1],[1042,1],[1049,1],[1050,1],[1052,1],[1056,1],[1067,1],[1055,1],[1043,1],[1080,1],[1079,1],[1074,1],[1076,1],[1075,1],[1068,1],[1069,1],[1071,1],[1073,1],[1077,1],[1078,1],[1070,1],[1072,1],[1081,1],[1085,1],[1084,1],[1083,1],[1082,1],[1086,1],[1087,1],[1088,1],[1089,1],[1090,1],[1269,1],[1023,1],[308,1],[1029,1],[1257,1],[1027,1],[1028,1],[1026,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[1185,1],[1187,1],[1112,1],[1184,1],[1181,1],[1183,1],[1182,1],[1113,1],[1186,1],[1114,1],[1115,1],[1116,1],[1135,1],[1137,1],[1138,1],[1139,1],[1147,1],[1140,1],[1141,1],[1142,1],[1146,1],[1149,1],[1148,1],[1143,1],[1144,1],[1145,1],[1150,1],[1136,1],[1234,1],[1235,1],[1236,1],[1237,1],[1238,1],[1250,1],[1251,1],[1252,1],[1249,1],[1210,1],[1197,1],[1195,1],[1201,1],[1196,1],[1200,1],[1212,1],[1211,1],[1198,1],[1202,1],[1203,1],[1204,1],[1207,1],[1205,1],[1206,1],[1199,1],[1208,1],[1209,1],[1220,1],[1221,1],[1222,1],[1219,1],[1218,1],[1223,1],[1217,1],[1224,1],[1225,1],[1227,1],[1228,1],[1226,1],[1230,1],[1229,1],[1216,1],[1193,1],[1191,1],[1188,1],[1214,1],[1194,1],[1213,1],[1215,1],[1192,1],[1190,1],[1189,1],[1233,1],[1231,1],[1232,1],[1256,1],[1255,1],[1258,1],[1264,1],[1267,1],[1265,1],[1266,1],[1098,1],[1101,1],[1099,1],[1100,1],[1102,1],[1095,1],[1104,1],[1109,1],[1097,1],[1111,1],[1105,1],[1096,1],[1103,1],[1106,1],[1108,1],[1110,1],[1107,1],[1263,1],[1262,1],[1175,1],[1117,1],[1167,1],[1168,1],[1180,1],[1173,1],[1171,1],[1172,1],[1169,1],[1178,1],[1170,1],[1179,1],[1176,1],[1166,1],[1174,1],[1177,1],[1152,1],[1133,1],[1151,1],[1165,1],[1131,1],[1134,1],[1153,1],[1154,1],[1155,1],[1156,1],[1157,1],[1158,1],[1159,1],[1164,1],[1160,1],[1163,1],[1161,1],[1162,1],[1132,1],[1259,1],[1268,1],[1260,1],[1253,1],[1254,1],[1130,1],[1120,1],[1122,1],[1128,1],[1124,1],[1125,1],[1123,1],[1126,1],[1118,1],[1119,1],[1129,1],[1121,1],[1127,1],[1091,1],[1092,1],[1093,1],[1094,1],[1270,1]]},"version":"4.9.5"} \ No newline at end of file From 7ac9a12e8a806af11155c23e0a95089f22511cbb Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Tue, 1 Oct 2024 00:23:15 -0700 Subject: [PATCH 40/49] fix(plugin-bungee-hermes): use ledger type from core-api OpenAPI spec Also fixing a few other bugs which were all necessary to make it work after a rebase onto upstream/main as of 2024-10-10. 1. The tsconfig.json file in the root did not contain a reference to the package at `packages/cactus-plugin-ccmodel-hephaestus` so it was being excluded from the compilation. 2. express version was not up to date with the rest of the monorepo which Signed-off-by: Peter Somogyvari --- .../package.json | 4 +- .../AssetReferenceContract.json | 5778 +++++++++++++++++ .../cc32f19d615fffc1949510db91badd48.json | 1 + .../.eslintrc.js | 6 - .../package.json | 28 +- examples/test-run-transaction/package.json | 2 +- .../supply-chain-app-stub/package.json | 4 +- .../src/main/json/openapi.json | 25 +- .../src/main/json/openapi.tpl.json | 14 +- .../openapitools/client/models/LedgerType.kt | 5 +- .../generated/openapi/typescript-axios/api.ts | 1 + .../openapi/go-client/api/openapi.yaml | 1 + .../openapi/go-client/model_ledger_type.go | 2 + .../src/main/json/openapi.tpl.json | 4 +- .../package.json | 2 +- .../cache/solidity-files-cache.json | 2 +- .../cactus-plugin-satp-hermes/package.json | 2 +- .../go/generated/gateway-client/README.md | 1 + .../generated/gateway-client/api/openapi.yaml | 46 + .../go/generated/gateway-client/api_admin.go | 122 + .../generated/gateway-client/docs/AdminApi.md | 67 + .../proto/cacti/satp/v02/common/health_pb.ts | 2 +- .../proto/cacti/satp/v02/common/message_pb.ts | 2 +- .../proto/cacti/satp/v02/common/session_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_0_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_1_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_2_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_3_pb.ts | 2 +- .../proto/cacti/satp/v02/view/bungee_pb.ts | 2 +- .../typescript/gol/gateway-orchestrator.ts | 24 +- .../src/main/typescript/gol/satp-manager.ts | 17 +- .../f1899ba2ae9750a5ab49a77f29316cd5.json | 1 + .../f277531deacae890b124dd8f32ec2567.json | 1 + tsconfig.json | 3 + .../fabric/fabric-cli/package-local.json | 2 +- yarn.lock | 305 +- 36 files changed, 6254 insertions(+), 232 deletions(-) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/cc32f19d615fffc1949510db91badd48.json delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/f1899ba2ae9750a5ab49a77f29316cd5.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/f277531deacae890b124dd8f32ec2567.json diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index fc8b979f77..79d983f25e 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -46,7 +46,7 @@ "scripts": { "build:dev:backend:postbuild": "mkdir -p ./dist/lib/fabric-contracts && cp -r ./src/fabric-contracts/* ./dist/lib/fabric-contracts/", "forge": "forge build ./src/solidity/main/*.sol --out ./src/solidity/main/generated", - "forge:all": "run-s 'forge' 'forge:test'", + "forge:all": "yarn run --top-level run-s 'forge' 'forge:test'", "forge:test": "forge build ./src/solidity/test/*.sol --out ./src/solidity/test/generated", "solidity": "hardhat compile", "start": "node dist/lib/main/typescript/cbdc-bridging-app-cli.js dotenv_config_path=./process.env", @@ -97,7 +97,7 @@ "devDependencies": { "@types/crypto-js": "4.1.1", "@types/cucumber": "4.0.4", - "@types/express": "4.17.21", + "@types/express": "5.0.0", "@types/express-jwt": "6.0.2", "@types/fs-extra": "9.0.13", "@types/node": "18.11.9", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json new file mode 100644 index 0000000000..8505b55559 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/AssetReferenceContract.json @@ -0,0 +1,5778 @@ +{ + "contractName": "AssetReferenceContract", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + } + ], + "name": "OwnershipRemoved", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "addOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "checkValidBridgeBack", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "createAssetReference", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "deleteAssetReference", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllAssetReferences", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "id", + "type": "string" + }, + { + "internalType": "bool", + "name": "isLocked", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "internalType": "struct AssetReference[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "getAssetReference", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "id", + "type": "string" + }, + { + "internalType": "bool", + "name": "isLocked", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "internalType": "struct AssetReference", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "isAssetLocked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "isPresent", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "lockAssetReference", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "removeItemFromList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oldOwner", + "type": "address" + } + ], + "name": "removeOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resetAssetRefsList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "id", + "type": "string" + } + ], + "name": "unLockAssetReference", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"addOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"checkValidBridgeBack\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"createAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetReferences\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isLocked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AssetReference[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAssetReference\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"isLocked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AssetReference\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"removeItemFromList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetAssetRefsList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAssetReference\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addOwner(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"owners()\":{\"details\":\"Returns the address of the current owners.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol\":\"AssetReferenceContract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol\":{\"keccak256\":\"0x0e64f282a7a93abd1a52b21d0a9995ea0252568fa4fdb35206e7a036368528fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c700a282ac8079d8ca12e687f58d0eb8665d16f433ea0824bd0fc2424132a167\",\"dweb:/ipfs/QmPsSRdwFppSrDnrjfRVAcKQpQK4DZMW73KGNY3bNBCNsX\"]},\"/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol\":{\"keccak256\":\"0xf4bc191b290664b626acc4e62cb09c3d95a83e836f9a35f83f8ace72a5103c29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://55fe1524d9dfb3256b44560103c52b5b74313aea0362483cc18d7aa51a90f864\",\"dweb:/ipfs/QmWkcmUzyZP6uWHJtpfB2FvareUH4tXySQJmPEGuv3mgGZ\"]}},\"version\":1}", + "bytecode": "608060405234801561001057600080fd5b50604051611a0f380380611a0f83398101604081905261002f916100d3565b6100383361005d565b600180546001600160a01b0319166001600160a01b0392909216919091179055610103565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b6000602082840312156100e557600080fd5b81516001600160a01b03811681146100fc57600080fd5b9392505050565b6118fd806101126000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80637065cb4811610097578063affe39c111610066578063affe39c1146101f5578063b1fa25801461020a578063bc5482751461022a578063c8da01af1461023d57600080fd5b80637065cb48146101a95780638ef45293146101bc5780639ca27299146101cf578063ade3222b146101e257600080fd5b806342966c68116100d357806342966c681461016857806363773a6c1461017b578063663bcc921461018e5780636b4bd58c146101a157600080fd5b8063173825d9146101055780631ae4eb681461011a57806321db00b31461014257806340c10f1914610155575b600080fd5b6101186101133660046111d6565b610252565b005b61012d610128366004611241565b6102d0565b60405190151581526020015b60405180910390f35b610118610150366004611283565b610303565b61011861016336600461129c565b610476565b610118610176366004611283565b610563565b610118610189366004611241565b610647565b61011861019c3660046112c6565b610715565b6101186108fb565b6101186101b73660046111d6565b610923565b6101186101ca366004611241565b610999565b61012d6101dd3660046112c6565b6109db565b6101186101f0366004611241565b610a74565b6101fd610c4d565b6040516101399190611323565b61021d610218366004611241565b610caf565b60405161013991906113f1565b61012d610238366004611241565b610dc2565b610245610df1565b6040516101399190611404565b61025a610f14565b6001600160a01b0381166102c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206f6c64206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102cd81610fc3565b50565b6000600283836040516102e4929190611466565b9081526040519081900360200190206001015460ff1690505b92915050565b60045481106103495760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016102bb565b805b60045461035a9060019061148c565b81101561041a57600461036e82600161149f565b8154811061037e5761037e6114b2565b90600052602060002090600402016004828154811061039f5761039f6114b2565b60009182526020909120600490910201806103ba838261157b565b50600182810154908201805460ff909216151560ff1990921691909117905560028083015490820155600391820154910180546001600160a01b0319166001600160a01b039092169190911790558061041281611656565b91505061034b565b50600480548061042c5761042c61166f565b6000828152602081206000199092019160048302019061044c828261116c565b5060018101805460ff191690556000600282015560030180546001600160a01b0319169055905550565b61047e610f14565b6001546040516001600160a01b03848116602483015260448201849052600092169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104d89190611685565b6000604051808303816000865af19150503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b505090508061055e5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d0818d85b1b0819985a5b195960821b60448201526064016102bb565b505050565b61056b610f14565b600154604051602481018390526000916001600160a01b03169060440160408051601f198184030181529181526020820180516001600160e01b0316630852cd8d60e31b179052516105bd9190611685565b6000604051808303816000865af19150503d80600081146105fa576040519150601f19603f3d011682016040523d82523d6000602084013e6105ff565b606091505b50509050806106435760405162461bcd60e51b815260206004820152601060248201526f189d5c9b8818d85b1b0819985a5b195960821b60448201526064016102bb565b5050565b61064f610f14565b6106598282610dc2565b6106755760405162461bcd60e51b81526004016102bb906116a1565b61067f82826102d0565b156106da5760405162461bcd60e51b815260206004820152602560248201527f546865206173736574207265666572656e636520697320616c7265616479206c6044820152641bd8dad95960da1b60648201526084016102bb565b6001600283836040516106ee929190611466565b908152604051908190036020019020600101805491151560ff199092169190911790555050565b61071d610f14565b838360028686604051610731929190611466565b9081526040519081900360200190209161074c9190836116e3565b508160028585604051610760929190611466565b908152602001604051809103902060020181905550600060028585604051610789929190611466565b908152604051908190036020018120600101805492151560ff199093169290921790915581906002906107bf9087908790611466565b908152602001604051809103902060030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160038585604051610808929190611466565b908152604080519182900360209081018320805494151560ff199095169490941790935560a0601f870184900490930282018301905260808101858152600492829190889088908190850183828082843760009201829052509385525050506020808301829052604083018790526001600160a01b03861660609093019290925283546001810185559381522081519192600402019081906108aa908261179d565b50602082015160018201805460ff191691151591909117905560408201516002820155606090910151600390910180546001600160a01b0319166001600160a01b0390921691909117905550505050565b60005b6004548110156102cd5761091181610303565b8061091b81611656565b9150506108fe565b61092b610f14565b6001600160a01b0381166109905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102bb565b6102cd816110f6565b6109a1610f14565b6109ab8282610dc2565b6109c75760405162461bcd60e51b81526004016102bb906116a1565b6000600283836040516106ee929190611466565b60006109e78585610dc2565b610a035760405162461bcd60e51b81526004016102bb906116a1565b8260028686604051610a16929190611466565b90815260200160405180910390206002015410158015610a6b5750816001600160a01b031660028686604051610a4d929190611466565b908152604051908190036020019020600301546001600160a01b0316145b95945050505050565b610a7c610f14565b610a868282610dc2565b610aa25760405162461bcd60e51b81526004016102bb906116a1565b610aac82826102d0565b610af85760405162461bcd60e51b815260206004820152601d60248201527f546865206173736574207265666572656e6365206973206c6f636b656400000060448201526064016102bb565b610b2460028383604051610b0d929190611466565b908152602001604051809103902060020154610563565b60028282604051610b36929190611466565b9081526040519081900360200190206000610b51828261116c565b5060018101805460ff19169055600060028201819055600391820180546001600160a01b0319169055604051909190610b8d9085908590611466565b908152604051908190036020019020805491151560ff1990921691909117905560005b60045481101561055e578282604051602001610bcd929190611466565b6040516020818303038152906040528051906020012060048281548110610bf657610bf66114b2565b9060005260206000209060040201600001604051602001610c179190611851565b6040516020818303038152906040528051906020012003610c3b57610c3b81610303565b80610c4581611656565b915050610bb0565b60606000805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b5050505050905090565b604080516080810182526060808252600060208301819052828401819052908201529051600290610ce39085908590611466565b9081526020016040518091039020604051806080016040529081600082018054610d0c906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d38906114c8565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600182015460ff1615156020820152600282015460408201526003909101546001600160a01b03166060909101529392505050565b600060038383604051610dd6929190611466565b9081526040519081900360200190205460ff16905092915050565b60606004805480602002602001604051908101604052809291908181526020016000905b82821015610f0b5783829060005260206000209060040201604051806080016040529081600082018054610e48906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e74906114c8565b8015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050918352505060018281015460ff161515602080840191909152600284015460408401526003909301546001600160a01b031660609092019190915291835292019101610e15565b50505050905090565b6000805b600054811015610f7057336001600160a01b031660008281548110610f3f57610f3f6114b2565b6000918252602090912001546001600160a01b031603610f5e57600191505b80610f6881611656565b915050610f18565b506001811515146102cd5760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420616e206f776e65720060448201526064016102bb565b60005b6000548110156110be57816001600160a01b031660008281548110610fed57610fed6114b2565b6000918252602090912001546001600160a01b0316036110ac57600080546110179060019061148c565b81548110611027576110276114b2565b600091825260208220015481546001600160a01b03909116919083908110611051576110516114b2565b6000918252602082200180546001600160a01b0319166001600160a01b0393909316929092179091558054806110895761108961166f565b600082815260209020810160001990810180546001600160a01b03191690550190555b806110b681611656565b915050610fc6565b506040516001600160a01b038216907f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68190600090a250565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b508054611178906114c8565b6000825580601f10611188575050565b601f0160209004906000526020600020908101906102cd91905b808211156111b657600081556001016111a2565b5090565b80356001600160a01b03811681146111d157600080fd5b919050565b6000602082840312156111e857600080fd5b6111f1826111ba565b9392505050565b60008083601f84011261120a57600080fd5b50813567ffffffffffffffff81111561122257600080fd5b60208301915083602082850101111561123a57600080fd5b9250929050565b6000806020838503121561125457600080fd5b823567ffffffffffffffff81111561126b57600080fd5b611277858286016111f8565b90969095509350505050565b60006020828403121561129557600080fd5b5035919050565b600080604083850312156112af57600080fd5b6112b8836111ba565b946020939093013593505050565b600080600080606085870312156112dc57600080fd5b843567ffffffffffffffff8111156112f357600080fd5b6112ff878288016111f8565b90955093505060208501359150611318604086016111ba565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156113645783516001600160a01b03168352928401929184019160010161133f565b50909695505050505050565b60005b8381101561138b578181015183820152602001611373565b50506000910152565b600081516080845280518060808601526113b58160a0870160208501611370565b602084810151151590860152604080850151908601526060938401516001600160a01b0316938501939093525050601f01601f19160160a00190565b6020815260006111f16020830184611394565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561145957603f19888603018452611447858351611394565b9450928501929085019060010161142b565b5092979650505050505050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102fd576102fd611476565b808201808211156102fd576102fd611476565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806114dc57607f821691505b6020821081036114fc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561055e57600081815260208120601f850160051c8101602086101561153f5750805b601f850160051c820191505b8181101561155e5782815560010161154b565b505050505050565b600019600383901b1c191660019190911b1790565b818103611586575050565b61159082546114c8565b67ffffffffffffffff8111156115a8576115a8611502565b6115bc816115b684546114c8565b84611518565b6000601f8211600181146115ea57600083156115d85750848201545b6115e28482611566565b85555061164f565b600085815260209020601f19841690600086815260209020845b838110156116245782860154825560019586019590910190602001611604565b50858310156116425781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b60006001820161166857611668611476565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60008251611697818460208701611370565b9190910192915050565b60208082526022908201527f546865206173736574207265666572656e636520646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b67ffffffffffffffff8311156116fb576116fb611502565b61170f8361170983546114c8565b83611518565b6000601f84116001811461173d576000851561172b5750838201355b6117358682611566565b84555061164f565b600083815260209020601f19861690835b8281101561176e578685013582556020948501946001909201910161174e565b508682101561178b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b815167ffffffffffffffff8111156117b7576117b7611502565b6117c5816115b684546114c8565b602080601f8311600181146117f457600084156117e25750858301515b6117ec8582611566565b86555061155e565b600085815260208120601f198616915b8281101561182357888601518255948401946001909101908401611804565b50858210156118415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080835461185f816114c8565b60018281168015611877576001811461188c576118bb565b60ff19841687528215158302870194506118bb565b8760005260208060002060005b858110156118b25781548a820152908401908201611899565b50505082870194505b5092969550505050505056fea26469706673582212204e3defbf3329eeb8a9a2352d01161391069b644ab4b4adcc96c509b58240729a64736f6c63430008100033", + "deployedBytecode": "608060405234801561001057600080fd5b50600436106101005760003560e01c80637065cb4811610097578063affe39c111610066578063affe39c1146101f5578063b1fa25801461020a578063bc5482751461022a578063c8da01af1461023d57600080fd5b80637065cb48146101a95780638ef45293146101bc5780639ca27299146101cf578063ade3222b146101e257600080fd5b806342966c68116100d357806342966c681461016857806363773a6c1461017b578063663bcc921461018e5780636b4bd58c146101a157600080fd5b8063173825d9146101055780631ae4eb681461011a57806321db00b31461014257806340c10f1914610155575b600080fd5b6101186101133660046111d6565b610252565b005b61012d610128366004611241565b6102d0565b60405190151581526020015b60405180910390f35b610118610150366004611283565b610303565b61011861016336600461129c565b610476565b610118610176366004611283565b610563565b610118610189366004611241565b610647565b61011861019c3660046112c6565b610715565b6101186108fb565b6101186101b73660046111d6565b610923565b6101186101ca366004611241565b610999565b61012d6101dd3660046112c6565b6109db565b6101186101f0366004611241565b610a74565b6101fd610c4d565b6040516101399190611323565b61021d610218366004611241565b610caf565b60405161013991906113f1565b61012d610238366004611241565b610dc2565b610245610df1565b6040516101399190611404565b61025a610f14565b6001600160a01b0381166102c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206f6c64206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6102cd81610fc3565b50565b6000600283836040516102e4929190611466565b9081526040519081900360200190206001015460ff1690505b92915050565b60045481106103495760405162461bcd60e51b81526020600482015260126024820152711a5b99195e081bdd5d081bd988189bdd5b9960721b60448201526064016102bb565b805b60045461035a9060019061148c565b81101561041a57600461036e82600161149f565b8154811061037e5761037e6114b2565b90600052602060002090600402016004828154811061039f5761039f6114b2565b60009182526020909120600490910201806103ba838261157b565b50600182810154908201805460ff909216151560ff1990921691909117905560028083015490820155600391820154910180546001600160a01b0319166001600160a01b039092169190911790558061041281611656565b91505061034b565b50600480548061042c5761042c61166f565b6000828152602081206000199092019160048302019061044c828261116c565b5060018101805460ff191690556000600282015560030180546001600160a01b0319169055905550565b61047e610f14565b6001546040516001600160a01b03848116602483015260448201849052600092169060640160408051601f198184030181529181526020820180516001600160e01b03166340c10f1960e01b179052516104d89190611685565b6000604051808303816000865af19150503d8060008114610515576040519150601f19603f3d011682016040523d82523d6000602084013e61051a565b606091505b505090508061055e5760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d0818d85b1b0819985a5b195960821b60448201526064016102bb565b505050565b61056b610f14565b600154604051602481018390526000916001600160a01b03169060440160408051601f198184030181529181526020820180516001600160e01b0316630852cd8d60e31b179052516105bd9190611685565b6000604051808303816000865af19150503d80600081146105fa576040519150601f19603f3d011682016040523d82523d6000602084013e6105ff565b606091505b50509050806106435760405162461bcd60e51b815260206004820152601060248201526f189d5c9b8818d85b1b0819985a5b195960821b60448201526064016102bb565b5050565b61064f610f14565b6106598282610dc2565b6106755760405162461bcd60e51b81526004016102bb906116a1565b61067f82826102d0565b156106da5760405162461bcd60e51b815260206004820152602560248201527f546865206173736574207265666572656e636520697320616c7265616479206c6044820152641bd8dad95960da1b60648201526084016102bb565b6001600283836040516106ee929190611466565b908152604051908190036020019020600101805491151560ff199092169190911790555050565b61071d610f14565b838360028686604051610731929190611466565b9081526040519081900360200190209161074c9190836116e3565b508160028585604051610760929190611466565b908152602001604051809103902060020181905550600060028585604051610789929190611466565b908152604051908190036020018120600101805492151560ff199093169290921790915581906002906107bf9087908790611466565b908152602001604051809103902060030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160038585604051610808929190611466565b908152604080519182900360209081018320805494151560ff199095169490941790935560a0601f870184900490930282018301905260808101858152600492829190889088908190850183828082843760009201829052509385525050506020808301829052604083018790526001600160a01b03861660609093019290925283546001810185559381522081519192600402019081906108aa908261179d565b50602082015160018201805460ff191691151591909117905560408201516002820155606090910151600390910180546001600160a01b0319166001600160a01b0390921691909117905550505050565b60005b6004548110156102cd5761091181610303565b8061091b81611656565b9150506108fe565b61092b610f14565b6001600160a01b0381166109905760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102bb565b6102cd816110f6565b6109a1610f14565b6109ab8282610dc2565b6109c75760405162461bcd60e51b81526004016102bb906116a1565b6000600283836040516106ee929190611466565b60006109e78585610dc2565b610a035760405162461bcd60e51b81526004016102bb906116a1565b8260028686604051610a16929190611466565b90815260200160405180910390206002015410158015610a6b5750816001600160a01b031660028686604051610a4d929190611466565b908152604051908190036020019020600301546001600160a01b0316145b95945050505050565b610a7c610f14565b610a868282610dc2565b610aa25760405162461bcd60e51b81526004016102bb906116a1565b610aac82826102d0565b610af85760405162461bcd60e51b815260206004820152601d60248201527f546865206173736574207265666572656e6365206973206c6f636b656400000060448201526064016102bb565b610b2460028383604051610b0d929190611466565b908152602001604051809103902060020154610563565b60028282604051610b36929190611466565b9081526040519081900360200190206000610b51828261116c565b5060018101805460ff19169055600060028201819055600391820180546001600160a01b0319169055604051909190610b8d9085908590611466565b908152604051908190036020019020805491151560ff1990921691909117905560005b60045481101561055e578282604051602001610bcd929190611466565b6040516020818303038152906040528051906020012060048281548110610bf657610bf66114b2565b9060005260206000209060040201600001604051602001610c179190611851565b6040516020818303038152906040528051906020012003610c3b57610c3b81610303565b80610c4581611656565b915050610bb0565b60606000805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b5050505050905090565b604080516080810182526060808252600060208301819052828401819052908201529051600290610ce39085908590611466565b9081526020016040518091039020604051806080016040529081600082018054610d0c906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d38906114c8565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600182015460ff1615156020820152600282015460408201526003909101546001600160a01b03166060909101529392505050565b600060038383604051610dd6929190611466565b9081526040519081900360200190205460ff16905092915050565b60606004805480602002602001604051908101604052809291908181526020016000905b82821015610f0b5783829060005260206000209060040201604051806080016040529081600082018054610e48906114c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e74906114c8565b8015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050918352505060018281015460ff161515602080840191909152600284015460408401526003909301546001600160a01b031660609092019190915291835292019101610e15565b50505050905090565b6000805b600054811015610f7057336001600160a01b031660008281548110610f3f57610f3f6114b2565b6000918252602090912001546001600160a01b031603610f5e57600191505b80610f6881611656565b915050610f18565b506001811515146102cd5760405162461bcd60e51b815260206004820152601f60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420616e206f776e65720060448201526064016102bb565b60005b6000548110156110be57816001600160a01b031660008281548110610fed57610fed6114b2565b6000918252602090912001546001600160a01b0316036110ac57600080546110179060019061148c565b81548110611027576110276114b2565b600091825260208220015481546001600160a01b03909116919083908110611051576110516114b2565b6000918252602082200180546001600160a01b0319166001600160a01b0393909316929092179091558054806110895761108961166f565b600082815260209020810160001990810180546001600160a01b03191690550190555b806110b681611656565b915050610fc6565b506040516001600160a01b038216907f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68190600090a250565b600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560405190917fb4cd6c6140e1db788f68710738b06ef4d0df6a884a06a088433a4c2f5e036e7c91a250565b508054611178906114c8565b6000825580601f10611188575050565b601f0160209004906000526020600020908101906102cd91905b808211156111b657600081556001016111a2565b5090565b80356001600160a01b03811681146111d157600080fd5b919050565b6000602082840312156111e857600080fd5b6111f1826111ba565b9392505050565b60008083601f84011261120a57600080fd5b50813567ffffffffffffffff81111561122257600080fd5b60208301915083602082850101111561123a57600080fd5b9250929050565b6000806020838503121561125457600080fd5b823567ffffffffffffffff81111561126b57600080fd5b611277858286016111f8565b90969095509350505050565b60006020828403121561129557600080fd5b5035919050565b600080604083850312156112af57600080fd5b6112b8836111ba565b946020939093013593505050565b600080600080606085870312156112dc57600080fd5b843567ffffffffffffffff8111156112f357600080fd5b6112ff878288016111f8565b90955093505060208501359150611318604086016111ba565b905092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156113645783516001600160a01b03168352928401929184019160010161133f565b50909695505050505050565b60005b8381101561138b578181015183820152602001611373565b50506000910152565b600081516080845280518060808601526113b58160a0870160208501611370565b602084810151151590860152604080850151908601526060938401516001600160a01b0316938501939093525050601f01601f19160160a00190565b6020815260006111f16020830184611394565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561145957603f19888603018452611447858351611394565b9450928501929085019060010161142b565b5092979650505050505050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102fd576102fd611476565b808201808211156102fd576102fd611476565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806114dc57607f821691505b6020821081036114fc57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561055e57600081815260208120601f850160051c8101602086101561153f5750805b601f850160051c820191505b8181101561155e5782815560010161154b565b505050505050565b600019600383901b1c191660019190911b1790565b818103611586575050565b61159082546114c8565b67ffffffffffffffff8111156115a8576115a8611502565b6115bc816115b684546114c8565b84611518565b6000601f8211600181146115ea57600083156115d85750848201545b6115e28482611566565b85555061164f565b600085815260209020601f19841690600086815260209020845b838110156116245782860154825560019586019590910190602001611604565b50858310156116425781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b60006001820161166857611668611476565b5060010190565b634e487b7160e01b600052603160045260246000fd5b60008251611697818460208701611370565b9190910192915050565b60208082526022908201527f546865206173736574207265666572656e636520646f6573206e6f74206578696040820152611cdd60f21b606082015260800190565b67ffffffffffffffff8311156116fb576116fb611502565b61170f8361170983546114c8565b83611518565b6000601f84116001811461173d576000851561172b5750838201355b6117358682611566565b84555061164f565b600083815260209020601f19861690835b8281101561176e578685013582556020948501946001909201910161174e565b508682101561178b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b815167ffffffffffffffff8111156117b7576117b7611502565b6117c5816115b684546114c8565b602080601f8311600181146117f457600084156117e25750858301515b6117ec8582611566565b86555061155e565b600085815260208120601f198616915b8281101561182357888601518255948401946001909101908401611804565b50858210156118415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080835461185f816114c8565b60018281168015611877576001811461188c576118bb565b60ff19841687528215158302870194506118bb565b8760005260208060002060005b858110156118b25781548a820152908401908201611899565b50505082870194505b5092969550505050505056fea26469706673582212204e3defbf3329eeb8a9a2352d01161391069b644ab4b4adcc96c509b58240729a64736f6c63430008100033", + "sourceMap": "191:3466:1:-:0;;;598:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;348:26:0;2132:10;348:12;:26::i;:::-;633:13:1;:23;;-1:-1:-1;;;;;;633:23:1;-1:-1:-1;;;;;633:23:1;;;;;;;;;;191:3466;;1603:135:0;1670:7;:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;1670:22:0;-1:-1:-1;;;;;1670:22:0;;;;;;;;1707:24;;1670:22;;1707:24;;;1603:135;:::o;14:290:2:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:2;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:2:o;:::-;191:3466:1;;;;;;", + "deployedSourceMap": "191:3466:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1411:186:0;;;;;;:::i;:::-;;:::i;:::-;;2108:107:1;;;;;;:::i;:::-;;:::i;:::-;;;1317:14:2;;1310:22;1292:41;;1280:2;1265:18;2108:107:1;;;;;;;;3078:261;;;;;;:::i;:::-;;:::i;2342:234::-;;;;;;:::i;:::-;;:::i;2580:200::-;;;;;;:::i;:::-;;:::i;1062:243::-;;;;;;:::i;:::-;;:::i;665:393::-;;;;;;:::i;:::-;;:::i;3524:131::-;;;:::i;1222:183:0:-;;;;;;:::i;:::-;;:::i;1309:172:1:-;;;;;;:::i;:::-;;:::i;2784:259::-;;;;;;:::i;:::-;;:::i;1485:516::-;;;;;;:::i;:::-;;:::i;608:96:0:-;;;:::i;:::-;;;;;;;:::i;2219:119:1:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2005:99::-;;;;;;:::i;:::-;;:::i;3374:110::-;;;:::i;:::-;;;;;;;:::i;1411:186:0:-;500:13;:11;:13::i;:::-;-1:-1:-1;;;;;1493:22:0;::::1;1485:73;;;::::0;-1:-1:-1;;;1485:73:0;;5204:2:2;1485:73:0::1;::::0;::::1;5186:21:2::0;5243:2;5223:18;;;5216:30;5282:34;5262:18;;;5255:62;-1:-1:-1;;;5333:18:2;;;5326:36;5379:19;;1485:73:0::1;;;;;;;;;1568:22;1581:8;1568:12;:22::i;:::-;1411:186:::0;:::o;2108:107:1:-;2172:4;2191:6;2198:2;;2191:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:19;;;;;;-1:-1:-1;2108:107:1;;;;;:::o;3078:261::-;3149:13;:20;3140:29;;3132:60;;;;-1:-1:-1;;;3132:60:1;;5889:2:2;3132:60:1;;;5871:21:2;5928:2;5908:18;;;5901:30;-1:-1:-1;;;5947:18:2;;;5940:48;6005:18;;3132:60:1;5687:342:2;3132:60:1;3213:6;3199:111;3225:13;:20;:22;;3246:1;;3225:22;:::i;:::-;3221:1;:26;3199:111;;;3283:13;3297:5;:1;3301;3297:5;:::i;:::-;3283:20;;;;;;;;:::i;:::-;;;;;;;;;;;3264:13;3278:1;3264:16;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:39;;:16;:39;:::i;:::-;-1:-1:-1;3264:39:1;;;;;;;;;;;;;;;;-1:-1:-1;;3264:39:1;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3264:39:1;-1:-1:-1;;;;;3264:39:1;;;;;;;;;3249:3;;;;:::i;:::-;;;;3199:111;;;;3315:13;:19;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;;3315:19:1;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;3315:19:1;;;;;-1:-1:-1;;3315:19:1;;;;;;;;;;;;-1:-1:-1;;;;;;3315:19:1;;;;;-1:-1:-1;3078:261:1:o;2342:234::-;500:13:0;:11;:13::i;:::-;2431::1::1;::::0;2457:65:::1;::::0;-1:-1:-1;;;;;9825:32:2;;;2457:65:1::1;::::0;::::1;9807:51:2::0;9874:18;;;9867:34;;;2413:12:1::1;::::0;2431:13:::1;::::0;9780:18:2;;2457:65:1::1;::::0;;-1:-1:-1;;2457:65:1;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2457:65:1::1;-1:-1:-1::0;;;2457:65:1::1;::::0;;2431:97;::::1;::::0;2457:65;2431:97:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2412:116;;;2543:7;2535:36;;;::::0;-1:-1:-1;;;2535:36:1;;10406:2:2;2535:36:1::1;::::0;::::1;10388:21:2::0;10445:2;10425:18;;;10418:30;-1:-1:-1;;;10464:18:2;;;10457:46;10520:18;;2535:36:1::1;10204:340:2::0;2535:36:1::1;2406:170;2342:234:::0;;:::o;2580:200::-;500:13:0;:11;:13::i;:::-;2652::1::1;::::0;2678:48:::1;::::0;::::1;::::0;::::1;10695:25:2::0;;;2634:12:1::1;::::0;-1:-1:-1;;;;;2652:13:1::1;::::0;10668:18:2;;2678:48:1::1;::::0;;-1:-1:-1;;2678:48:1;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;2678:48:1::1;-1:-1:-1::0;;;2678:48:1::1;::::0;;2652:80;::::1;::::0;2678:48;2652:80:::1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2633:99;;;2747:7;2739:36;;;::::0;-1:-1:-1;;;2739:36:1;;10933:2:2;2739:36:1::1;::::0;::::1;10915:21:2::0;10972:2;10952:18;;;10945:30;-1:-1:-1;;;10991:18:2;;;10984:46;11047:18;;2739:36:1::1;10731:340:2::0;2739:36:1::1;2627:153;2580:200:::0;:::o;1062:243::-;500:13:0;:11;:13::i;:::-;1141::1::1;1151:2;;1141:9;:13::i;:::-;1133:60;;;;-1:-1:-1::0;;;1133:60:1::1;;;;;;;:::i;:::-;1208:17;1222:2;;1208:13;:17::i;:::-;1207:18;1199:68;;;::::0;-1:-1:-1;;;1199:68:1;;11681:2:2;1199:68:1::1;::::0;::::1;11663:21:2::0;11720:2;11700:18;;;11693:30;11759:34;11739:18;;;11732:62;-1:-1:-1;;;11810:18:2;;;11803:35;11855:19;;1199:68:1::1;11479:401:2::0;1199:68:1::1;1296:4;1274:6;1281:2;;1274:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:19:::1;;:26:::0;;;::::1;;-1:-1:-1::0;;1274:26:1;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;1062:243:1:o;665:393::-;500:13:0;:11;:13::i;:::-;785:2:1::1;;770:6;777:2;;770:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;:17:::1;::::0;;:10;:17:::1;:::i;:::-;;813:6;793;800:2;;793:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;:26;;;;847:5;825:6;832:2;;825:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:19:::1;;:27:::0;;;::::1;;-1:-1:-1::0;;825:27:1;;::::1;::::0;;;::::1;::::0;;;881:9;;858:6:::1;::::0;:10:::1;::::0;865:2;;;;858:10:::1;:::i;:::-;;;;;;;;;;;;;:20;;;:32;;;;;-1:-1:-1::0;;;;;858:32:1::1;;;;;-1:-1:-1::0;;;;;858:32:1::1;;;;;;915:4;897:11;909:2;;897:15;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;;::::1;::::0;;;;;:22;;;::::1;;-1:-1:-1::0;;897:22:1;;::::1;::::0;;;::::1;::::0;;;978:74;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;959:13:::1;::::0;897:15;;978:74;1000:2;;;;;;978:74;;1000:2;;;;978:74;::::1;;::::0;::::1;::::0;;;-1:-1:-1;978:74:1;;;-1:-1:-1;;;978:74:1::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;;;;;978:74:1;::::1;::::0;;;;;;;;959:94;;978:74;959:94;::::1;::::0;;;;;;;;;;::::1;;;::::0;;;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;959:94:1::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;959:94:1::1;::::0;::::1;;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;959:94:1::1;-1:-1:-1::0;;;;;959:94:1;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;;665:393:1:o;3524:131::-;3572:6;3567:84;3588:13;:20;3584:24;;3567:84;;;3623:21;3642:1;3623:18;:21::i;:::-;3610:3;;;;:::i;:::-;;;;3567:84;;1222:183:0;500:13;:11;:13::i;:::-;-1:-1:-1;;;;;1301:22:0;::::1;1293:73;;;::::0;-1:-1:-1;;;1293:73:0;;14655:2:2;1293:73:0::1;::::0;::::1;14637:21:2::0;14694:2;14674:18;;;14667:30;14733:34;14713:18;;;14706:62;-1:-1:-1;;;14784:18:2;;;14777:36;14830:19;;1293:73:0::1;14453:402:2::0;1293:73:0::1;1376:22;1389:8;1376:12;:22::i;1309:172:1:-:0;500:13:0;:11;:13::i;:::-;1390::1::1;1400:2;;1390:9;:13::i;:::-;1382:60;;;;-1:-1:-1::0;;;1382:60:1::1;;;;;;;:::i;:::-;1471:5;1449:6;1456:2;;1449:10;;;;;;;:::i;2784:259::-:0;2885:4;2905:13;2915:2;;2905:9;:13::i;:::-;2897:60;;;;-1:-1:-1;;;2897:60:1;;;;;;;:::i;:::-;2997:6;2976;2983:2;;2976:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;;:27;;2975:63;;;;;3033:4;-1:-1:-1;;;;;3009:28:1;:6;3016:2;;3009:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:20;;;-1:-1:-1;;;;;3009:20:1;:28;2975:63;2968:70;2784:259;-1:-1:-1;;;;;2784:259:1:o;1485:516::-;500:13:0;:11;:13::i;:::-;1566::1::1;1576:2;;1566:9;:13::i;:::-;1558:60;;;;-1:-1:-1::0;;;1558:60:1::1;;;;;;;:::i;:::-;1632:17;1646:2;;1632:13;:17::i;:::-;1624:59;;;::::0;-1:-1:-1;;;1624:59:1;;15062:2:2;1624:59:1::1;::::0;::::1;15044:21:2::0;15101:2;15081:18;;;15074:30;15140:31;15120:18;;;15113:59;15189:18;;1624:59:1::1;14860:353:2::0;1624:59:1::1;1690:23;1695:6;1702:2;;1695:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:17;;;1690:4;:23::i;:::-;1727:6;1734:2;;1727:10;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;::::1;1720:17;1727:10:::0;;1720:17:::1;:::i;:::-;-1:-1:-1::0;1720:17:1::1;::::0;::::1;::::0;;-1:-1:-1;;1720:17:1::1;::::0;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;1720:17:1::1;::::0;;1743:15:::1;::::0;1720:17;;;1743:15:::1;::::0;1755:2;;;;1743:15:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:23;;;::::1;;-1:-1:-1::0;;1743:23:1;;::::1;::::0;;;::::1;::::0;;:15:::1;1806:191;1827:13;:20:::0;1823:24;::::1;1806:191;;;1945:2;;1928:20;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1918:31;;;;;;1893:13;1907:1;1893:16;;;;;;;;:::i;:::-;;;;;;;;;;;:19;;1876:37;;;;;;;;:::i;:::-;;;;;;;;;;;;;1866:48;;;;;;:83:::0;1862:129:::1;;1961:21;1980:1;1961:18;:21::i;:::-;1849:3:::0;::::1;::::0;::::1;:::i;:::-;;;;1806:191;;608:96:0::0;655:16;690:7;683:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;683:14:0;;;;;;;;;;;;;;;;;;;;;;;608:96;:::o;2219:119:1:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2323:10:1;;:6;;:10;;2330:2;;;;2323:10;:::i;:::-;;;;;;;;;;;;;2316:17;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2316:17:1;;;-1:-1:-1;;2316:17:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2316:17:1;;;;;;;2219:119;-1:-1:-1;;;2219:119:1:o;2005:99::-;2065:4;2084:11;2096:2;;2084:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;2005:99:1;;;;:::o;3374:110::-;3428:23;3466:13;3459:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3459:20:1;;;-1:-1:-1;;3459:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3459:20:1;;;;;;;;;;;;;;;;;;;;;;;;;3374:110;:::o;777:296:0:-;832:9;864:6;859:142;880:7;:14;876:18;;859:142;;;2132:10;-1:-1:-1;;;;;919:26:0;:7;927:1;919:10;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;919:10:0;:26;915:76;;972:4;965:11;;915:76;896:3;;;;:::i;:::-;;;;859:142;;;-1:-1:-1;1026:4:0;1018:12;;;;1010:56;;;;-1:-1:-1;;;1010:56:0;;16267:2:2;1010:56:0;;;16249:21:2;16306:2;16286:18;;;16279:30;16345:33;16325:18;;;16318:61;16396:18;;1010:56:0;16065:355:2;1744:303:0;1813:6;1808:195;1829:7;:14;1825:18;;1808:195;;;1882:5;-1:-1:-1;;;;;1868:19:0;:7;1876:1;1868:10;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;1868:10:0;:19;1864:129;;1920:7;1928:14;;:18;;1945:1;;1928:18;:::i;:::-;1920:27;;;;;;;;:::i;:::-;;;;;;;;;;1907:10;;-1:-1:-1;;;;;1920:27:0;;;;;1915:1;;1907:10;;;;;;:::i;:::-;;;;;;;;;:40;;-1:-1:-1;;;;;;1907:40:0;-1:-1:-1;;;;;1907:40:0;;;;;;;;;;;1965:13;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;1965:13:0;;;;;-1:-1:-1;;;;;;1965:13:0;;;;;;1864:129;1845:3;;;;:::i;:::-;;;;1808:195;;;-1:-1:-1;2017:23:0;;-1:-1:-1;;;;;2017:23:0;;;;;;;;1744:303;:::o;1603:135::-;1670:7;:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;1670:22:0;-1:-1:-1;;;;;1670:22:0;;;;;;;;1707:24;;1670:22;;1707:24;;;1603:135;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:173:2:-;82:20;;-1:-1:-1;;;;;131:31:2;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;:::-;333:39;192:186;-1:-1:-1;;;192:186:2:o;383:348::-;435:8;445:6;499:3;492:4;484:6;480:17;476:27;466:55;;517:1;514;507:12;466:55;-1:-1:-1;540:20:2;;583:18;572:30;;569:50;;;615:1;612;605:12;569:50;652:4;644:6;640:17;628:29;;704:3;697:4;688:6;680;676:19;672:30;669:39;666:59;;;721:1;718;711:12;666:59;383:348;;;;;:::o;736:411::-;807:6;815;868:2;856:9;847:7;843:23;839:32;836:52;;;884:1;881;874:12;836:52;924:9;911:23;957:18;949:6;946:30;943:50;;;989:1;986;979:12;943:50;1028:59;1079:7;1070:6;1059:9;1055:22;1028:59;:::i;:::-;1106:8;;1002:85;;-1:-1:-1;736:411:2;-1:-1:-1;;;;736:411:2:o;1344:180::-;1403:6;1456:2;1444:9;1435:7;1431:23;1427:32;1424:52;;;1472:1;1469;1462:12;1424:52;-1:-1:-1;1495:23:2;;1344:180;-1:-1:-1;1344:180:2:o;1529:254::-;1597:6;1605;1658:2;1646:9;1637:7;1633:23;1629:32;1626:52;;;1674:1;1671;1664:12;1626:52;1697:29;1716:9;1697:29;:::i;:::-;1687:39;1773:2;1758:18;;;;1745:32;;-1:-1:-1;;;1529:254:2:o;1788:553::-;1877:6;1885;1893;1901;1954:2;1942:9;1933:7;1929:23;1925:32;1922:52;;;1970:1;1967;1960:12;1922:52;2010:9;1997:23;2043:18;2035:6;2032:30;2029:50;;;2075:1;2072;2065:12;2029:50;2114:59;2165:7;2156:6;2145:9;2141:22;2114:59;:::i;:::-;2192:8;;-1:-1:-1;2088:85:2;-1:-1:-1;;2274:2:2;2259:18;;2246:32;;-1:-1:-1;2297:38:2;2331:2;2316:18;;2297:38;:::i;:::-;2287:48;;1788:553;;;;;;;:::o;2346:658::-;2517:2;2569:21;;;2639:13;;2542:18;;;2661:22;;;2488:4;;2517:2;2740:15;;;;2714:2;2699:18;;;2488:4;2783:195;2797:6;2794:1;2791:13;2783:195;;;2862:13;;-1:-1:-1;;;;;2858:39:2;2846:52;;2953:15;;;;2918:12;;;;2894:1;2812:9;2783:195;;;-1:-1:-1;2995:3:2;;2346:658;-1:-1:-1;;;;;;2346:658:2:o;3009:250::-;3094:1;3104:113;3118:6;3115:1;3112:13;3104:113;;;3194:11;;;3188:18;3175:11;;;3168:39;3140:2;3133:10;3104:113;;;-1:-1:-1;;3251:1:2;3233:16;;3226:27;3009:250::o;3264:586::-;3321:3;3365:5;3359:12;3392:4;3387:3;3380:17;3426:12;3420:19;3471:6;3464:4;3459:3;3455:14;3448:30;3487:82;3562:6;3556:3;3551;3547:13;3540:4;3526:12;3522:23;3487:82;:::i;:::-;3632:4;3621:16;;;3615:23;3608:31;3601:39;3585:14;;;3578:63;3690:4;3679:16;;;3673:23;3657:14;;;3650:47;3750:4;3739:16;;;3733:23;-1:-1:-1;;;;;3729:49:2;3713:14;;;3706:73;;;;-1:-1:-1;;3833:2:2;3812:15;-1:-1:-1;;3808:29:2;3799:39;3766:3;3795:49;;3264:586::o;3855:277::-;4046:2;4035:9;4028:21;4009:4;4066:60;4122:2;4111:9;4107:18;4099:6;4066:60;:::i;4137:860::-;4341:4;4370:2;4410;4399:9;4395:18;4440:2;4429:9;4422:21;4463:6;4498;4492:13;4529:6;4521;4514:22;4567:2;4556:9;4552:18;4545:25;;4629:2;4619:6;4616:1;4612:14;4601:9;4597:30;4593:39;4579:53;;4667:2;4659:6;4655:15;4688:1;4698:270;4712:6;4709:1;4706:13;4698:270;;;4805:2;4801:7;4789:9;4781:6;4777:22;4773:36;4768:3;4761:49;4833:55;4881:6;4872;4866:13;4833:55;:::i;:::-;4823:65;-1:-1:-1;4946:12:2;;;;4911:15;;;;4734:1;4727:9;4698:270;;;-1:-1:-1;4985:6:2;;4137:860;-1:-1:-1;;;;;;;4137:860:2:o;5409:273::-;5594:6;5586;5581:3;5568:33;5550:3;5620:16;;5645:13;;;5620:16;5409:273;-1:-1:-1;5409:273:2:o;6034:127::-;6095:10;6090:3;6086:20;6083:1;6076:31;6126:4;6123:1;6116:15;6150:4;6147:1;6140:15;6166:128;6233:9;;;6254:11;;;6251:37;;;6268:18;;:::i;6299:125::-;6364:9;;;6385:10;;;6382:36;;;6398:18;;:::i;6429:127::-;6490:10;6485:3;6481:20;6478:1;6471:31;6521:4;6518:1;6511:15;6545:4;6542:1;6535:15;6561:380;6640:1;6636:12;;;;6683;;;6704:61;;6758:4;6750:6;6746:17;6736:27;;6704:61;6811:2;6803:6;6800:14;6780:18;6777:38;6774:161;;6857:10;6852:3;6848:20;6845:1;6838:31;6892:4;6889:1;6882:15;6920:4;6917:1;6910:15;6774:161;;6561:380;;;:::o;6946:127::-;7007:10;7002:3;6998:20;6995:1;6988:31;7038:4;7035:1;7028:15;7062:4;7059:1;7052:15;7204:545;7306:2;7301:3;7298:11;7295:448;;;7342:1;7367:5;7363:2;7356:17;7412:4;7408:2;7398:19;7482:2;7470:10;7466:19;7463:1;7459:27;7453:4;7449:38;7518:4;7506:10;7503:20;7500:47;;;-1:-1:-1;7541:4:2;7500:47;7596:2;7591:3;7587:12;7584:1;7580:20;7574:4;7570:31;7560:41;;7651:82;7669:2;7662:5;7659:13;7651:82;;;7714:17;;;7695:1;7684:13;7651:82;;;7655:3;;;7204:545;;;:::o;7754:166::-;-1:-1:-1;;7882:1:2;7878:11;;;7874:24;7870:29;7860:40;7906:1;7902:11;;;;7857:57;;7754:166::o;7925:1431::-;8040:3;8034:4;8031:13;8028:26;;8047:5;;7925:1431::o;8028:26::-;8077:37;8109:3;8103:10;8077:37;:::i;:::-;8137:18;8129:6;8126:30;8123:56;;;8159:18;;:::i;:::-;8188:97;8278:6;8238:38;8270:4;8264:11;8238:38;:::i;:::-;8232:4;8188:97;:::i;:::-;8311:1;8339:2;8331:6;8328:14;8356:1;8351:748;;;;9143:1;9160:6;9157:89;;;-1:-1:-1;9212:19:2;;;9206:26;9157:89;9272:67;9332:6;9325:5;9272:67;:::i;:::-;9266:4;9259:81;;8321:1029;;8351:748;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;8387:20:2;;;7151:1;7144:14;;;7188:4;7175:18;;8551:9;8573:251;8587:7;8584:1;8581:14;8573:251;;;8669:21;;;8663:28;8648:44;;8719:1;8792:18;;;;8747:15;;;;8610:4;8603:12;8573:251;;;8577:3;8852:6;8843:7;8840:19;8837:203;;;8913:21;;;8907:28;-1:-1:-1;;8998:1:2;8994:14;;;9010:3;8990:24;8986:37;8982:42;8967:58;8952:74;;8837:203;;;;9086:1;9077:6;9074:1;9070:14;9066:22;9060:4;9053:36;8321:1029;;;;7925:1431;;:::o;9361:135::-;9400:3;9421:17;;;9418:43;;9441:18;;:::i;:::-;-1:-1:-1;9488:1:2;9477:13;;9361:135::o;9501:127::-;9562:10;9557:3;9553:20;9550:1;9543:31;9593:4;9590:1;9583:15;9617:4;9614:1;9607:15;9912:287;10041:3;10079:6;10073:13;10095:66;10154:6;10149:3;10142:4;10134:6;10130:17;10095:66;:::i;:::-;10177:16;;;;;9912:287;-1:-1:-1;;9912:287:2:o;11076:398::-;11278:2;11260:21;;;11317:2;11297:18;;;11290:30;11356:34;11351:2;11336:18;;11329:62;-1:-1:-1;;;11422:2:2;11407:18;;11400:32;11464:3;11449:19;;11076:398::o;11885:1206::-;12009:18;12004:3;12001:27;11998:53;;;12031:18;;:::i;:::-;12060:94;12150:3;12110:38;12142:4;12136:11;12110:38;:::i;:::-;12104:4;12060:94;:::i;:::-;12180:1;12205:2;12200:3;12197:11;12222:1;12217:616;;;;12877:1;12894:3;12891:93;;;-1:-1:-1;12950:19:2;;;12937:33;12891:93;13010:64;13070:3;13063:5;13010:64;:::i;:::-;13004:4;12997:78;;12190:895;;12217:616;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;12253:17:2;;;12354:9;12376:229;12390:7;12387:1;12384:14;12376:229;;;12479:19;;;12466:33;12451:49;;12586:4;12571:20;;;;12539:1;12527:14;;;;12406:12;12376:229;;;12380:3;12633;12624:7;12621:16;12618:159;;;12757:1;12753:6;12747:3;12741;12738:1;12734:11;12730:21;12726:34;12722:39;12709:9;12704:3;12700:19;12687:33;12683:79;12675:6;12668:95;12618:159;;;12820:1;12814:3;12811:1;12807:11;12803:19;12797:4;12790:33;12190:895;;11885:1206;;;:::o;13096:1352::-;13222:3;13216:10;13249:18;13241:6;13238:30;13235:56;;;13271:18;;:::i;:::-;13300:97;13390:6;13350:38;13382:4;13376:11;13350:38;:::i;13300:97::-;13452:4;;13516:2;13505:14;;13533:1;13528:663;;;;14235:1;14252:6;14249:89;;;-1:-1:-1;14304:19:2;;;14298:26;14249:89;14364:67;14424:6;14417:5;14364:67;:::i;:::-;14358:4;14351:81;;13498:944;;13528:663;7151:1;7144:14;;;7188:4;7175:18;;-1:-1:-1;;13564:20:2;;;13682:236;13696:7;13693:1;13690:14;13682:236;;;13785:19;;;13779:26;13764:42;;13877:27;;;;13845:1;13833:14;;;;13712:19;;13682:236;;;13686:3;13946:6;13937:7;13934:19;13931:201;;;14007:19;;;14001:26;-1:-1:-1;;14090:1:2;14086:14;;;14102:3;14082:24;14078:37;14074:42;14059:58;14044:74;;13931:201;-1:-1:-1;;;;;14178:1:2;14162:14;;;14158:22;14145:36;;-1:-1:-1;13096:1352:2:o;15218:842::-;15346:3;15375:1;15408:6;15402:13;15438:36;15464:9;15438:36;:::i;:::-;15493:1;15510:18;;;15537:133;;;;15684:1;15679:356;;;;15503:532;;15537:133;-1:-1:-1;;15570:24:2;;15558:37;;15643:14;;15636:22;15624:35;;15615:45;;;-1:-1:-1;15537:133:2;;15679:356;15710:6;15707:1;15700:17;15740:4;15785:2;15782:1;15772:16;15810:1;15824:165;15838:6;15835:1;15832:13;15824:165;;;15916:14;;15903:11;;;15896:35;15959:16;;;;15853:10;;15824:165;;;15828:3;;;16018:6;16013:3;16009:16;16002:23;;15503:532;-1:-1:-1;16051:3:2;;15218:842;-1:-1:-1;;;;;;15218:842:2:o", + "sourcePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol", + "compiler": { + "name": "solc", + "version": "0.8.16+commit.07a7930e" + }, + "ast": { + "absolutePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/asset-reference-contract.sol", + "exportedSymbols": { + "AssetReference": [ + 210 + ], + "AssetReferenceContract": [ + 621 + ], + "MyOwnable": [ + 198 + ] + }, + "id": 622, + "license": "GPL-3.0", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 200, + "literals": [ + "solidity", + "^", + "0.8", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "37:24:1" + }, + { + "absolutePath": "/home/andre_9a/simple-cactus/cactus/examples/cactus-example-cbdc-bridging-backend/src/solidity/asset-reference-contract/MyOwnable.sol", + "file": "./MyOwnable.sol", + "id": 201, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 622, + "sourceUnit": 199, + "src": "63:25:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "canonicalName": "AssetReference", + "id": 210, + "members": [ + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "id", + "nameLocation": "125:2:1", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "118:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 202, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "118:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 205, + "mutability": "mutable", + "name": "isLocked", + "nameLocation": "138:8:1", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "133:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 204, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "133:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 207, + "mutability": "mutable", + "name": "amount", + "nameLocation": "157:6:1", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "152:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 206, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "152:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 209, + "mutability": "mutable", + "name": "recipient", + "nameLocation": "177:9:1", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "169:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "169:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "AssetReference", + "nameLocation": "97:14:1", + "nodeType": "StructDefinition", + "scope": 622, + "src": "90:99:1", + "visibility": "public" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 211, + "name": "MyOwnable", + "nameLocations": [ + "226:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 198, + "src": "226:9:1" + }, + "id": 212, + "nodeType": "InheritanceSpecifier", + "src": "226:9:1" + } + ], + "canonicalName": "AssetReferenceContract", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 621, + "linearizedBaseContracts": [ + 621, + 198 + ], + "name": "AssetReferenceContract", + "nameLocation": "200:22:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 214, + "mutability": "mutable", + "name": "cbdc_contract", + "nameLocation": "248:13:1", + "nodeType": "VariableDeclaration", + "scope": 621, + "src": "240:21:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "240:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 219, + "mutability": "mutable", + "name": "assets", + "nameLocation": "300:6:1", + "nodeType": "VariableDeclaration", + "scope": 621, + "src": "265:41:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string => struct AssetReference)" + }, + "typeName": { + "id": 218, + "keyType": { + "id": 215, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "274:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "nodeType": "Mapping", + "src": "265:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string => struct AssetReference)" + }, + "valueType": { + "id": 217, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 216, + "name": "AssetReference", + "nameLocations": [ + "284:14:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 210, + "src": "284:14:1" + }, + "referencedDeclaration": 210, + "src": "284:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", + "typeString": "struct AssetReference" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 223, + "mutability": "mutable", + "name": "assetExists", + "nameLocation": "335:11:1", + "nodeType": "VariableDeclaration", + "scope": 621, + "src": "310:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string => bool)" + }, + "typeName": { + "id": 222, + "keyType": { + "id": 220, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "319:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "nodeType": "Mapping", + "src": "310:24:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string => bool)" + }, + "valueType": { + "id": 221, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "329:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 227, + "mutability": "mutable", + "name": "assetRefsList", + "nameLocation": "580:13:1", + "nodeType": "VariableDeclaration", + "scope": 621, + "src": "563:30:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference[]" + }, + "typeName": { + "baseType": { + "id": 225, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 224, + "name": "AssetReference", + "nameLocations": [ + "563:14:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 210, + "src": "563:14:1" + }, + "referencedDeclaration": 210, + "src": "563:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", + "typeString": "struct AssetReference" + } + }, + "id": 226, + "nodeType": "ArrayTypeName", + "src": "563:16:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr", + "typeString": "struct AssetReference[]" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 236, + "nodeType": "Block", + "src": "627:34:1", + "statements": [ + { + "expression": { + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 232, + "name": "cbdc_contract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 214, + "src": "633:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 233, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "649:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "633:23:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 235, + "nodeType": "ExpressionStatement", + "src": "633:23:1" + } + ] + }, + "id": 237, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "account", + "nameLocation": "618:7:1", + "nodeType": "VariableDeclaration", + "scope": 237, + "src": "610:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "610:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "609:17:1" + }, + "returnParameters": { + "id": 231, + "nodeType": "ParameterList", + "parameters": [], + "src": "627:0:1" + }, + "scope": 621, + "src": "598:63:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 293, + "nodeType": "Block", + "src": "764:294:1", + "statements": [ + { + "expression": { + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 248, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "770:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 250, + "indexExpression": { + "id": 249, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "777:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "770:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 251, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "781:2:1", + "memberName": "id", + "nodeType": "MemberAccess", + "referencedDeclaration": 203, + "src": "770:13:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 252, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "785:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "src": "770:17:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 254, + "nodeType": "ExpressionStatement", + "src": "770:17:1" + }, + { + "expression": { + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 255, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "793:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 257, + "indexExpression": { + "id": 256, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "800:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "793:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 258, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "804:6:1", + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 207, + "src": "793:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 259, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "813:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "793:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "nodeType": "ExpressionStatement", + "src": "793:26:1" + }, + { + "expression": { + "id": 267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 262, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "825:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 264, + "indexExpression": { + "id": 263, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "832:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "825:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 265, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "836:8:1", + "memberName": "isLocked", + "nodeType": "MemberAccess", + "referencedDeclaration": 205, + "src": "825:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "847:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "825:27:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 268, + "nodeType": "ExpressionStatement", + "src": "825:27:1" + }, + { + "expression": { + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 269, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "858:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 271, + "indexExpression": { + "id": 270, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "865:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "858:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "869:9:1", + "memberName": "recipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 209, + "src": "858:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 273, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "881:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "858:32:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 275, + "nodeType": "ExpressionStatement", + "src": "858:32:1" + }, + { + "expression": { + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 276, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "897:11:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 278, + "indexExpression": { + "id": 277, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "909:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "897:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "915:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "897:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 281, + "nodeType": "ExpressionStatement", + "src": "897:22:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 286, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 239, + "src": "1000:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + { + "hexValue": "66616c7365", + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1010:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "id": 288, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "1023:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 289, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1037:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 285, + "name": "AssetReference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 210, + "src": "978:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_AssetReference_$210_storage_ptr_$", + "typeString": "type(struct AssetReference storage pointer)" + } + }, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "978:74:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", + "typeString": "struct AssetReference memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", + "typeString": "struct AssetReference memory" + } + ], + "expression": { + "id": 282, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "959:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "973:4:1", + "memberName": "push", + "nodeType": "MemberAccess", + "src": "959:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$_t_struct$_AssetReference_$210_storage_$returns$__$bound_to$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$", + "typeString": "function (struct AssetReference storage ref[] storage pointer,struct AssetReference storage ref)" + } + }, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "959:94:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "959:94:1" + } + ] + }, + "functionSelector": "663bcc92", + "id": 294, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 246, + "kind": "modifierInvocation", + "modifierName": { + "id": 245, + "name": "onlyOwner", + "nameLocations": [ + "754:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30, + "src": "754:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "754:9:1" + } + ], + "name": "createAssetReference", + "nameLocation": "674:20:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 239, + "mutability": "mutable", + "name": "id", + "nameLocation": "711:2:1", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "695:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 238, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "695:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 241, + "mutability": "mutable", + "name": "amount", + "nameLocation": "720:6:1", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "715:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 240, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "715:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 243, + "mutability": "mutable", + "name": "recipient", + "nameLocation": "736:9:1", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "728:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 242, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "728:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "694:52:1" + }, + "returnParameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [], + "src": "764:0:1" + }, + "scope": 621, + "src": "665:393:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 323, + "nodeType": "Block", + "src": "1127:178:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 303, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1151:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 302, + "name": "isPresent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "1141:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", + "typeString": "function (string calldata) view returns (bool)" + } + }, + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1141:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1156:36:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + }, + "value": "The asset reference does not exist" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + } + ], + "id": 301, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1133:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1133:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 307, + "nodeType": "ExpressionStatement", + "src": "1133:60:1" + }, + { + "expression": { + "arguments": [ + { + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1207:18:1", + "subExpression": { + "arguments": [ + { + "id": 310, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1222:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 309, + "name": "isAssetLocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 446, + "src": "1208:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", + "typeString": "function (string calldata) view returns (bool)" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1208:17:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546865206173736574207265666572656e636520697320616c7265616479206c6f636b6564", + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1227:39:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_64521928c09bf02b6b5471b284b9f6dfbc7431afff7624ad621932a3f25b489f", + "typeString": "literal_string \"The asset reference is already locked\"" + }, + "value": "The asset reference is already locked" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_64521928c09bf02b6b5471b284b9f6dfbc7431afff7624ad621932a3f25b489f", + "typeString": "literal_string \"The asset reference is already locked\"" + } + ], + "id": 308, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1199:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1199:68:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "1199:68:1" + }, + { + "expression": { + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 316, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "1274:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 318, + "indexExpression": { + "id": 317, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "1281:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1274:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 319, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "1285:8:1", + "memberName": "isLocked", + "nodeType": "MemberAccess", + "referencedDeclaration": 205, + "src": "1274:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1296:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1274:26:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 322, + "nodeType": "ExpressionStatement", + "src": "1274:26:1" + } + ] + }, + "functionSelector": "63773a6c", + "id": 324, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 299, + "kind": "modifierInvocation", + "modifierName": { + "id": 298, + "name": "onlyOwner", + "nameLocations": [ + "1117:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30, + "src": "1117:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "1117:9:1" + } + ], + "name": "lockAssetReference", + "nameLocation": "1071:18:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "mutability": "mutable", + "name": "id", + "nameLocation": "1106:2:1", + "nodeType": "VariableDeclaration", + "scope": 324, + "src": "1090:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 295, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1090:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1089:20:1" + }, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [], + "src": "1127:0:1" + }, + "scope": 621, + "src": "1062:243:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 345, + "nodeType": "Block", + "src": "1376:105:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 333, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 326, + "src": "1400:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 332, + "name": "isPresent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "1390:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", + "typeString": "function (string calldata) view returns (bool)" + } + }, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1390:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", + "id": 335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1405:36:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + }, + "value": "The asset reference does not exist" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + } + ], + "id": 331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1382:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1382:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 337, + "nodeType": "ExpressionStatement", + "src": "1382:60:1" + }, + { + "expression": { + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 338, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "1449:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 340, + "indexExpression": { + "id": 339, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 326, + "src": "1456:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1449:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberLocation": "1460:8:1", + "memberName": "isLocked", + "nodeType": "MemberAccess", + "referencedDeclaration": 205, + "src": "1449:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1471:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1449:27:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 344, + "nodeType": "ExpressionStatement", + "src": "1449:27:1" + } + ] + }, + "functionSelector": "8ef45293", + "id": 346, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 329, + "kind": "modifierInvocation", + "modifierName": { + "id": 328, + "name": "onlyOwner", + "nameLocations": [ + "1366:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30, + "src": "1366:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "1366:9:1" + } + ], + "name": "unLockAssetReference", + "nameLocation": "1318:20:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 326, + "mutability": "mutable", + "name": "id", + "nameLocation": "1355:2:1", + "nodeType": "VariableDeclaration", + "scope": 346, + "src": "1339:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 325, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1339:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1338:20:1" + }, + "returnParameters": { + "id": 330, + "nodeType": "ParameterList", + "parameters": [], + "src": "1376:0:1" + }, + "scope": 621, + "src": "1309:172:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 420, + "nodeType": "Block", + "src": "1552:449:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 355, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "1576:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 354, + "name": "isPresent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "1566:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", + "typeString": "function (string calldata) view returns (bool)" + } + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1566:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1581:36:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + }, + "value": "The asset reference does not exist" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + } + ], + "id": 353, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1558:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1558:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 359, + "nodeType": "ExpressionStatement", + "src": "1558:60:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 362, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "1646:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 361, + "name": "isAssetLocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 446, + "src": "1632:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", + "typeString": "function (string calldata) view returns (bool)" + } + }, + "id": 363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1632:17:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546865206173736574207265666572656e6365206973206c6f636b6564", + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1651:31:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0336abc357798e0ba342f01c1301e0e34f6dedce2787c507141be0c60e4153c9", + "typeString": "literal_string \"The asset reference is locked\"" + }, + "value": "The asset reference is locked" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0336abc357798e0ba342f01c1301e0e34f6dedce2787c507141be0c60e4153c9", + "typeString": "literal_string \"The asset reference is locked\"" + } + ], + "id": 360, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1624:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1624:59:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "1624:59:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 368, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "1695:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 370, + "indexExpression": { + "id": 369, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "1702:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1695:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 371, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1706:6:1", + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 207, + "src": "1695:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 367, + "name": "burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "1690:4:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1690:23:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 373, + "nodeType": "ExpressionStatement", + "src": "1690:23:1" + }, + { + "expression": { + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "1720:17:1", + "subExpression": { + "baseExpression": { + "id": 374, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "1727:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 376, + "indexExpression": { + "id": 375, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "1734:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1727:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "ExpressionStatement", + "src": "1720:17:1" + }, + { + "expression": { + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 379, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "1743:11:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 381, + "indexExpression": { + "id": 380, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "1755:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1743:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1761:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1743:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 384, + "nodeType": "ExpressionStatement", + "src": "1743:23:1" + }, + { + "body": { + "id": 418, + "nodeType": "Block", + "src": "1854:143:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 399, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "1893:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 401, + "indexExpression": { + "id": 400, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "1907:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1893:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 402, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1910:2:1", + "memberName": "id", + "nodeType": "MemberAccess", + "referencedDeclaration": 203, + "src": "1893:19:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "expression": { + "id": 397, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "1876:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1880:12:1", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1876:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1876:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 396, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "1866:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1866:48:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 408, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 348, + "src": "1945:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "expression": { + "id": 406, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "1928:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "1932:12:1", + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1928:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1928:20:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 405, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967288, + "src": "1918:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1918:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1866:83:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 417, + "nodeType": "IfStatement", + "src": "1862:129:1", + "trueBody": { + "id": 416, + "nodeType": "Block", + "src": "1951:40:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 413, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "1980:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 412, + "name": "removeItemFromList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 589, + "src": "1961:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "1961:21:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 415, + "nodeType": "ExpressionStatement", + "src": "1961:21:1" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 389, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "1823:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 390, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "1827:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "1841:6:1", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1827:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1823:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 419, + "initializationExpression": { + "assignments": [ + 386 + ], + "declarations": [ + { + "constant": false, + "id": 386, + "mutability": "mutable", + "name": "i", + "nameLocation": "1816:1:1", + "nodeType": "VariableDeclaration", + "scope": 419, + "src": "1811:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1811:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 388, + "initialValue": { + "hexValue": "30", + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1820:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1811:10:1" + }, + "loopExpression": { + "expression": { + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1849:3:1", + "subExpression": { + "id": 393, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "1849:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 395, + "nodeType": "ExpressionStatement", + "src": "1849:3:1" + }, + "nodeType": "ForStatement", + "src": "1806:191:1" + } + ] + }, + "functionSelector": "ade3222b", + "id": 421, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 351, + "kind": "modifierInvocation", + "modifierName": { + "id": 350, + "name": "onlyOwner", + "nameLocations": [ + "1542:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30, + "src": "1542:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "1542:9:1" + } + ], + "name": "deleteAssetReference", + "nameLocation": "1494:20:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 348, + "mutability": "mutable", + "name": "id", + "nameLocation": "1531:2:1", + "nodeType": "VariableDeclaration", + "scope": 421, + "src": "1515:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 347, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1515:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1514:20:1" + }, + "returnParameters": { + "id": 352, + "nodeType": "ParameterList", + "parameters": [], + "src": "1552:0:1" + }, + "scope": 621, + "src": "1485:516:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 432, + "nodeType": "Block", + "src": "2071:33:1", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 428, + "name": "assetExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 223, + "src": "2084:11:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", + "typeString": "mapping(string memory => bool)" + } + }, + "id": 430, + "indexExpression": { + "id": 429, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 423, + "src": "2096:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2084:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 427, + "id": 431, + "nodeType": "Return", + "src": "2077:22:1" + } + ] + }, + "functionSelector": "bc548275", + "id": 433, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPresent", + "nameLocation": "2014:9:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 424, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 423, + "mutability": "mutable", + "name": "id", + "nameLocation": "2040:2:1", + "nodeType": "VariableDeclaration", + "scope": 433, + "src": "2024:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 422, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2024:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2023:20:1" + }, + "returnParameters": { + "id": 427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 426, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 433, + "src": "2065:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 425, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2065:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2064:6:1" + }, + "scope": 621, + "src": "2005:99:1", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 445, + "nodeType": "Block", + "src": "2178:37:1", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 440, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "2191:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 442, + "indexExpression": { + "id": 441, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 435, + "src": "2198:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2191:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 443, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2202:8:1", + "memberName": "isLocked", + "nodeType": "MemberAccess", + "referencedDeclaration": 205, + "src": "2191:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 439, + "id": 444, + "nodeType": "Return", + "src": "2184:26:1" + } + ] + }, + "functionSelector": "1ae4eb68", + "id": 446, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isAssetLocked", + "nameLocation": "2117:13:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 435, + "mutability": "mutable", + "name": "id", + "nameLocation": "2147:2:1", + "nodeType": "VariableDeclaration", + "scope": 446, + "src": "2131:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 434, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2131:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2130:20:1" + }, + "returnParameters": { + "id": 439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 438, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 446, + "src": "2172:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 437, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2172:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2171:6:1" + }, + "scope": 621, + "src": "2108:107:1", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 458, + "nodeType": "Block", + "src": "2310:28:1", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 454, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "2323:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 456, + "indexExpression": { + "id": 455, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "2330:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2323:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "functionReturnParameters": 453, + "id": 457, + "nodeType": "Return", + "src": "2316:17:1" + } + ] + }, + "functionSelector": "b1fa2580", + "id": 459, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAssetReference", + "nameLocation": "2228:17:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 448, + "mutability": "mutable", + "name": "id", + "nameLocation": "2262:2:1", + "nodeType": "VariableDeclaration", + "scope": 459, + "src": "2246:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 447, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2246:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2245:20:1" + }, + "returnParameters": { + "id": 453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 452, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 459, + "src": "2287:21:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_memory_ptr", + "typeString": "struct AssetReference" + }, + "typeName": { + "id": 451, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 450, + "name": "AssetReference", + "nameLocations": [ + "2287:14:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 210, + "src": "2287:14:1" + }, + "referencedDeclaration": 210, + "src": "2287:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", + "typeString": "struct AssetReference" + } + }, + "visibility": "internal" + } + ], + "src": "2286:23:1" + }, + "scope": 621, + "src": "2219:119:1", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 485, + "nodeType": "Block", + "src": "2406:170:1", + "statements": [ + { + "assignments": [ + 469, + null + ], + "declarations": [ + { + "constant": false, + "id": 469, + "mutability": "mutable", + "name": "success", + "nameLocation": "2418:7:1", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "2413:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 468, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2413:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 479, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6d696e7428616464726573732c75696e7432353629", + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2481:23:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_40c10f19c047ae7dfa66d6312b683d2ea3dfbcb4159e96b967c5f4b0a86f2842", + "typeString": "literal_string \"mint(address,uint256)\"" + }, + "value": "mint(address,uint256)" + }, + { + "id": 475, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 461, + "src": "2506:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 476, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 463, + "src": "2515:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_40c10f19c047ae7dfa66d6312b683d2ea3dfbcb4159e96b967c5f4b0a86f2842", + "typeString": "literal_string \"mint(address,uint256)\"" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 472, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "2457:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2461:19:1", + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2457:23:1", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2457:65:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 470, + "name": "cbdc_contract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 214, + "src": "2431:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2445:4:1", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "2431:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2431:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2412:116:1" + }, + { + "expression": { + "arguments": [ + { + "id": 481, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 469, + "src": "2543:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6d696e742063616c6c206661696c6564", + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2552:18:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bf9c519459adea86d8a83bfe255ca2736ba7c8625940375bb2fc6e318ee9051b", + "typeString": "literal_string \"mint call failed\"" + }, + "value": "mint call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bf9c519459adea86d8a83bfe255ca2736ba7c8625940375bb2fc6e318ee9051b", + "typeString": "literal_string \"mint call failed\"" + } + ], + "id": 480, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2535:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2535:36:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 484, + "nodeType": "ExpressionStatement", + "src": "2535:36:1" + } + ] + }, + "functionSelector": "40c10f19", + "id": 486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 466, + "kind": "modifierInvocation", + "modifierName": { + "id": 465, + "name": "onlyOwner", + "nameLocations": [ + "2396:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30, + "src": "2396:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "2396:9:1" + } + ], + "name": "mint", + "nameLocation": "2351:4:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 461, + "mutability": "mutable", + "name": "account", + "nameLocation": "2364:7:1", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "2356:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2356:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 463, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2381:6:1", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "2373:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 462, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2373:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2355:33:1" + }, + "returnParameters": { + "id": 467, + "nodeType": "ParameterList", + "parameters": [], + "src": "2406:0:1" + }, + "scope": 621, + "src": "2342:234:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "2627:153:1", + "statements": [ + { + "assignments": [ + 494, + null + ], + "declarations": [ + { + "constant": false, + "id": 494, + "mutability": "mutable", + "name": "success", + "nameLocation": "2639:7:1", + "nodeType": "VariableDeclaration", + "scope": 509, + "src": "2634:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 493, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2634:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 503, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "6275726e2875696e7432353629", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2702:15:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_42966c689b5afe9b9b3f8a7103b2a19980d59629bfd6a20a60972312ed41d836", + "typeString": "literal_string \"burn(uint256)\"" + }, + "value": "burn(uint256)" + }, + { + "id": 500, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 488, + "src": "2719:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_42966c689b5afe9b9b3f8a7103b2a19980d59629bfd6a20a60972312ed41d836", + "typeString": "literal_string \"burn(uint256)\"" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 497, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967295, + "src": "2678:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberLocation": "2682:19:1", + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "src": "2678:23:1", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2678:48:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 495, + "name": "cbdc_contract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 214, + "src": "2652:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2666:4:1", + "memberName": "call", + "nodeType": "MemberAccess", + "src": "2652:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2652:80:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2633:99:1" + }, + { + "expression": { + "arguments": [ + { + "id": 505, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 494, + "src": "2747:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "6275726e2063616c6c206661696c6564", + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2756:18:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bd2737dababb3f3aa60c0b3e63ed3f2a6dbe45608e370c8c6df354f1d0f7216c", + "typeString": "literal_string \"burn call failed\"" + }, + "value": "burn call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bd2737dababb3f3aa60c0b3e63ed3f2a6dbe45608e370c8c6df354f1d0f7216c", + "typeString": "literal_string \"burn call failed\"" + } + ], + "id": 504, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2739:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2739:36:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 508, + "nodeType": "ExpressionStatement", + "src": "2739:36:1" + } + ] + }, + "functionSelector": "42966c68", + "id": 510, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 491, + "kind": "modifierInvocation", + "modifierName": { + "id": 490, + "name": "onlyOwner", + "nameLocations": [ + "2617:9:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 30, + "src": "2617:9:1" + }, + "nodeType": "ModifierInvocation", + "src": "2617:9:1" + } + ], + "name": "burn", + "nameLocation": "2589:4:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 489, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 488, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2602:6:1", + "nodeType": "VariableDeclaration", + "scope": 510, + "src": "2594:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 487, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2594:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2593:16:1" + }, + "returnParameters": { + "id": 492, + "nodeType": "ParameterList", + "parameters": [], + "src": "2627:0:1" + }, + "scope": 621, + "src": "2580:200:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 544, + "nodeType": "Block", + "src": "2891:152:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 523, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "2915:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + ], + "id": 522, + "name": "isPresent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "2905:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_string_calldata_ptr_$returns$_t_bool_$", + "typeString": "function (string calldata) view returns (bool)" + } + }, + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2905:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "546865206173736574207265666572656e636520646f6573206e6f74206578697374", + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2920:36:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + }, + "value": "The asset reference does not exist" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2bdeab7725adc4624b2ab32753504234c5d4b44110e9199db6e764e1c5f2e4ec", + "typeString": "literal_string \"The asset reference does not exist\"" + } + ], + "id": 521, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2897:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "2897:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 527, + "nodeType": "ExpressionStatement", + "src": "2897:60:1" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 528, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "2976:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 530, + "indexExpression": { + "id": 529, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "2983:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2976:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "2987:6:1", + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 207, + "src": "2976:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 532, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 514, + "src": "2997:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2976:27:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 534, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2975:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 535, + "name": "assets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "3009:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_AssetReference_$210_storage_$", + "typeString": "mapping(string memory => struct AssetReference storage ref)" + } + }, + "id": 537, + "indexExpression": { + "id": 536, + "name": "id", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "3016:2:1", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string calldata" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3009:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3020:9:1", + "memberName": "recipient", + "nodeType": "MemberAccess", + "referencedDeclaration": 209, + "src": "3009:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 539, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 516, + "src": "3033:4:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3009:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 541, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3008:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2975:63:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 520, + "id": 543, + "nodeType": "Return", + "src": "2968:70:1" + } + ] + }, + "functionSelector": "9ca27299", + "id": 545, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkValidBridgeBack", + "nameLocation": "2793:20:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 517, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 512, + "mutability": "mutable", + "name": "id", + "nameLocation": "2830:2:1", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "2814:18:1", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_string_calldata_ptr", + "typeString": "string" + }, + "typeName": { + "id": 511, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2814:6:1", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 514, + "mutability": "mutable", + "name": "amount", + "nameLocation": "2842:6:1", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "2834:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 513, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2834:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 516, + "mutability": "mutable", + "name": "user", + "nameLocation": "2858:4:1", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "2850:12:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2850:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2813:50:1" + }, + "returnParameters": { + "id": 520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 519, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 545, + "src": "2885:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 518, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2885:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2884:6:1" + }, + "scope": 621, + "src": "2784:259:1", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 588, + "nodeType": "Block", + "src": "3126:213:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 551, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "3140:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 552, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3149:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3163:6:1", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3149:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3140:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "696e646578206f7574206f6620626f756e64", + "id": 555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3171:20:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9bd393a5b80babd34996e9cb4b5d65af0ee420fc5edf77dbd7c6d563caa3bff2", + "typeString": "literal_string \"index out of bound\"" + }, + "value": "index out of bound" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9bd393a5b80babd34996e9cb4b5d65af0ee420fc5edf77dbd7c6d563caa3bff2", + "typeString": "literal_string \"index out of bound\"" + } + ], + "id": 550, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "3132:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3132:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 557, + "nodeType": "ExpressionStatement", + "src": "3132:60:1" + }, + { + "body": { + "id": 581, + "nodeType": "Block", + "src": "3254:56:1", + "statements": [ + { + "expression": { + "id": 579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 571, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3264:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 573, + "indexExpression": { + "id": 572, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3278:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3264:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "id": 574, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3283:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 578, + "indexExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 575, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3297:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3301:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3297:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3283:20:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "src": "3264:39:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage", + "typeString": "struct AssetReference storage ref" + } + }, + "id": 580, + "nodeType": "ExpressionStatement", + "src": "3264:39:1" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 562, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3221:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 566, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 563, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3225:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3239:6:1", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3225:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 565, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3246:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3225:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3221:26:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 582, + "initializationExpression": { + "assignments": [ + 559 + ], + "declarations": [ + { + "constant": false, + "id": 559, + "mutability": "mutable", + "name": "i", + "nameLocation": "3209:1:1", + "nodeType": "VariableDeclaration", + "scope": 582, + "src": "3204:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 558, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3204:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 561, + "initialValue": { + "id": 560, + "name": "_index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 547, + "src": "3213:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3204:15:1" + }, + "loopExpression": { + "expression": { + "id": 569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3249:3:1", + "subExpression": { + "id": 568, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3249:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 570, + "nodeType": "ExpressionStatement", + "src": "3249:3:1" + }, + "nodeType": "ForStatement", + "src": "3199:111:1" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 583, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3315:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3329:3:1", + "memberName": "pop", + "nodeType": "MemberAccess", + "src": "3315:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr_$", + "typeString": "function (struct AssetReference storage ref[] storage pointer)" + } + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3315:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 587, + "nodeType": "ExpressionStatement", + "src": "3315:19:1" + } + ] + }, + "functionSelector": "21db00b3", + "id": 589, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "removeItemFromList", + "nameLocation": "3087:18:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 548, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 547, + "mutability": "mutable", + "name": "_index", + "nameLocation": "3111:6:1", + "nodeType": "VariableDeclaration", + "scope": 589, + "src": "3106:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 546, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3106:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3105:13:1" + }, + "returnParameters": { + "id": 549, + "nodeType": "ParameterList", + "parameters": [], + "src": "3126:0:1" + }, + "scope": 621, + "src": "3078:261:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 598, + "nodeType": "Block", + "src": "3453:31:1", + "statements": [ + { + "expression": { + "id": 596, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3466:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "functionReturnParameters": 595, + "id": 597, + "nodeType": "Return", + "src": "3459:20:1" + } + ] + }, + "functionSelector": "c8da01af", + "id": 599, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getAllAssetReferences", + "nameLocation": "3383:21:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 590, + "nodeType": "ParameterList", + "parameters": [], + "src": "3404:2:1" + }, + "returnParameters": { + "id": 595, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 594, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 599, + "src": "3428:23:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_memory_ptr_$dyn_memory_ptr", + "typeString": "struct AssetReference[]" + }, + "typeName": { + "baseType": { + "id": 592, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 591, + "name": "AssetReference", + "nameLocations": [ + "3428:14:1" + ], + "nodeType": "IdentifierPath", + "referencedDeclaration": 210, + "src": "3428:14:1" + }, + "referencedDeclaration": 210, + "src": "3428:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AssetReference_$210_storage_ptr", + "typeString": "struct AssetReference" + } + }, + "id": 593, + "nodeType": "ArrayTypeName", + "src": "3428:16:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage_ptr", + "typeString": "struct AssetReference[]" + } + }, + "visibility": "internal" + } + ], + "src": "3427:25:1" + }, + "scope": 621, + "src": "3374:110:1", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 619, + "nodeType": "Block", + "src": "3561:94:1", + "statements": [ + { + "body": { + "id": 617, + "nodeType": "Block", + "src": "3615:36:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 614, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 603, + "src": "3642:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 613, + "name": "removeItemFromList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 589, + "src": "3623:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "nameLocations": [], + "names": [], + "nodeType": "FunctionCall", + "src": "3623:21:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 616, + "nodeType": "ExpressionStatement", + "src": "3623:21:1" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 606, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 603, + "src": "3584:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 607, + "name": "assetRefsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 227, + "src": "3588:13:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_AssetReference_$210_storage_$dyn_storage", + "typeString": "struct AssetReference storage ref[] storage ref" + } + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberLocation": "3602:6:1", + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3588:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3584:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 618, + "initializationExpression": { + "assignments": [ + 603 + ], + "declarations": [ + { + "constant": false, + "id": 603, + "mutability": "mutable", + "name": "i", + "nameLocation": "3577:1:1", + "nodeType": "VariableDeclaration", + "scope": 618, + "src": "3572:6:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 602, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3572:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 605, + "initialValue": { + "hexValue": "30", + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3581:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3572:10:1" + }, + "loopExpression": { + "expression": { + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3610:3:1", + "subExpression": { + "id": 610, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 603, + "src": "3610:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 612, + "nodeType": "ExpressionStatement", + "src": "3610:3:1" + }, + "nodeType": "ForStatement", + "src": "3567:84:1" + } + ] + }, + "functionSelector": "6b4bd58c", + "id": 620, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "resetAssetRefsList", + "nameLocation": "3533:18:1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 600, + "nodeType": "ParameterList", + "parameters": [], + "src": "3551:2:1" + }, + "returnParameters": { + "id": 601, + "nodeType": "ParameterList", + "parameters": [], + "src": "3561:0:1" + }, + "scope": 621, + "src": "3524:131:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 622, + "src": "191:3466:1", + "usedErrors": [] + } + ], + "src": "37:3621:1" + }, + "functionHashes": { + "addOwner(address)": "7065cb48", + "burn(uint256)": "42966c68", + "checkValidBridgeBack(string,uint256,address)": "9ca27299", + "createAssetReference(string,uint256,address)": "663bcc92", + "deleteAssetReference(string)": "ade3222b", + "getAllAssetReferences()": "c8da01af", + "getAssetReference(string)": "b1fa2580", + "isAssetLocked(string)": "1ae4eb68", + "isPresent(string)": "bc548275", + "lockAssetReference(string)": "63773a6c", + "mint(address,uint256)": "40c10f19", + "owners()": "affe39c1", + "removeItemFromList(uint256)": "21db00b3", + "removeOwner(address)": "173825d9", + "resetAssetRefsList()": "6b4bd58c", + "unLockAssetReference(string)": "8ef45293" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "1279400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addOwner(address)": "infinite", + "burn(uint256)": "infinite", + "checkValidBridgeBack(string,uint256,address)": "infinite", + "createAssetReference(string,uint256,address)": "infinite", + "deleteAssetReference(string)": "infinite", + "getAllAssetReferences()": "infinite", + "getAssetReference(string)": "infinite", + "isAssetLocked(string)": "infinite", + "isPresent(string)": "infinite", + "lockAssetReference(string)": "infinite", + "mint(address,uint256)": "infinite", + "owners()": "infinite", + "removeItemFromList(uint256)": "infinite", + "removeOwner(address)": "infinite", + "resetAssetRefsList()": "infinite", + "unLockAssetReference(string)": "infinite" + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/cc32f19d615fffc1949510db91badd48.json b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/cc32f19d615fffc1949510db91badd48.json new file mode 100644 index 0000000000..3a939939f9 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/main/generated/build-info/cc32f19d615fffc1949510db91badd48.json @@ -0,0 +1 @@ +{"id":"cc32f19d615fffc1949510db91badd48","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/access/Ownable.sol","3":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","6":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","7":"node_modules/@openzeppelin/contracts/utils/Context.sol","8":"node_modules/@openzeppelin/contracts/utils/Strings.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","11":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","12":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","13":"src/solidity/main/ITraceableContract.sol","14":"src/solidity/main/satp-contract-interface.sol","15":"src/solidity/main/satp-erc20.sol","16":"src/solidity/main/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js b/examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js deleted file mode 100644 index 28436a1f6d..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - parser: "@typescript-eslint/parser", // Specifies the ESLint parser - rules: { - "@typescript-eslint/no-explicit-any": "off", - }, -}; diff --git a/examples/cactus-example-cbdc-bridging-frontend/package.json b/examples/cactus-example-cbdc-bridging-frontend/package.json index 3f57dbb9bf..c17cb59c52 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/package.json +++ b/examples/cactus-example-cbdc-bridging-frontend/package.json @@ -22,25 +22,25 @@ ] }, "dependencies": { - "@emotion/react": "^11.11.1", - "@emotion/styled": "^11.11.0", - "@mui/icons-material": "^5.14.19", - "@mui/material": "^5.14.19", - "@testing-library/jest-dom": "^5.17.0", - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.2", + "@emotion/react": "11.11.1", + "@emotion/styled": "11.11.0", + "@mui/icons-material": "5.14.19", + "@mui/material": "5.14.19", + "@testing-library/jest-dom": "5.17.0", + "@testing-library/react": "13.4.0", + "@testing-library/user-event": "13.5.0", + "@types/jest": "27.5.2", "@types/node": "18.11.9", - "@types/react": "^18.2.39", - "@types/react-dom": "^18.2.17", + "@types/react": "18.2.39", + "@types/react-dom": "18.2.17", "axios": "1.7.7", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-router-dom": "^6.2.1", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-router-dom": "6.2.1", "react-scripts": "5.0.1", "typescript": "5.5.2", "uuid": "10.0.0", - "web-vitals": "^2.1.4" + "web-vitals": "2.1.4" }, "devDependencies": { "@types/uuid": "10.0.0" diff --git a/examples/test-run-transaction/package.json b/examples/test-run-transaction/package.json index 695033a61d..02078a7e64 100644 --- a/examples/test-run-transaction/package.json +++ b/examples/test-run-transaction/package.json @@ -21,7 +21,7 @@ "escape-html": "1.0.3", "ethereumjs-common": "1.5.2", "ethereumjs-tx": "2.1.2", - "express": "4.20.0", + "express": "4.21.0", "fabric-ca-client": "2.2.20", "fabric-network": "2.2.20", "http-errors": "1.6.3", diff --git a/examples/test-run-transaction/supply-chain-app-stub/package.json b/examples/test-run-transaction/supply-chain-app-stub/package.json index b95991c64b..75dd8cfabc 100644 --- a/examples/test-run-transaction/supply-chain-app-stub/package.json +++ b/examples/test-run-transaction/supply-chain-app-stub/package.json @@ -6,7 +6,7 @@ "dependencies": { "body-parser": "1.20.3", "cors": "2.8.5", - "express": "4.20.0", + "express": "4.21.0", "moment": "2.29.4", "ts-node": "10.9.1", "typescript": "5.5.2", @@ -14,7 +14,7 @@ }, "devDependencies": { "@types/cors": "2.8.12", - "@types/express": "4.17.21" + "@types/express": "5.0.0" }, "scripts": { "start": "node app/app.js", diff --git a/packages/cacti-plugin-consortium-static/src/main/json/openapi.json b/packages/cacti-plugin-consortium-static/src/main/json/openapi.json index 1abbbc9342..0381cc7f08 100644 --- a/packages/cacti-plugin-consortium-static/src/main/json/openapi.json +++ b/packages/cacti-plugin-consortium-static/src/main/json/openapi.json @@ -123,18 +123,6 @@ } } }, - "LedgerType": { - "description": "Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.", - "type": "string", - "enum": [ - "BESU_1X", - "BESU_2X", - "BURROW_0X", - "CORDA_4X", - "FABRIC_2", - "SAWTOOTH_1X" - ] - }, "CactusNodeMeta": { "description": "A Cactus node meta information", "type": "object", @@ -333,6 +321,19 @@ } } } + }, + "LedgerType": { + "description": "Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.", + "type": "string", + "enum": [ + "BESU_1X", + "BESU_2X", + "BURROW_0X", + "CORDA_4X", + "ETHEREUM", + "FABRIC_2", + "SAWTOOTH_1X" + ] } } }, diff --git a/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json b/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json index 1abbbc9342..f745518620 100644 --- a/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json +++ b/packages/cacti-plugin-consortium-static/src/main/json/openapi.tpl.json @@ -115,7 +115,7 @@ "$ref": "#/components/schemas/LedgerId" }, "ledgerType": { - "$ref": "#/components/schemas/LedgerType", + "$ref": "../../../../../packages/cactus-core-api/src/main/json/openapi.json#/components/schemas/LedgerType", "nullable": false }, "consortiumMemberId": { @@ -123,18 +123,6 @@ } } }, - "LedgerType": { - "description": "Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation.", - "type": "string", - "enum": [ - "BESU_1X", - "BESU_2X", - "BURROW_0X", - "CORDA_4X", - "FABRIC_2", - "SAWTOOTH_1X" - ] - }, "CactusNodeMeta": { "description": "A Cactus node meta information", "type": "object", diff --git a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt index 60fe48e4ae..298eb9b78a 100644 --- a/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt +++ b/packages/cacti-plugin-consortium-static/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LedgerType.kt @@ -22,7 +22,7 @@ import com.squareup.moshi.JsonClass /** * Enumerates the different ledger vendors and their major versions encoded within the name of the LedgerType. For example \"BESU_1X\" involves all of the [1.0.0;2.0.0) where 1.0.0 is included and anything up until, but not 2.0.0. See: https://stackoverflow.com/a/4396303/698470 for further explanation. * - * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,fABRIC2,sAWTOOTH1X + * Values: bESU1X,bESU2X,bURROW0X,cORDA4X,eTHEREUM,fABRIC2,sAWTOOTH1X */ @JsonClass(generateAdapter = false) @@ -40,6 +40,9 @@ enum class LedgerType(val value: kotlin.String) { @Json(name = "CORDA_4X") cORDA4X("CORDA_4X"), + @Json(name = "ETHEREUM") + eTHEREUM("ETHEREUM"), + @Json(name = "FABRIC_2") fABRIC2("FABRIC_2"), diff --git a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts index d420a16e30..36bcf76f2c 100644 --- a/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cacti-plugin-consortium-static/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -312,6 +312,7 @@ export const LedgerType = { Besu2X: 'BESU_2X', Burrow0X: 'BURROW_0X', Corda4X: 'CORDA_4X', + Ethereum: 'ETHEREUM', Fabric2: 'FABRIC_2', Sawtooth1X: 'SAWTOOTH_1X' } as const; diff --git a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml index 37d70a72de..d435ef83a2 100644 --- a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/api/openapi.yaml @@ -305,6 +305,7 @@ components: - BESU_2X - BURROW_0X - CORDA_4X + - ETHEREUM - FABRIC_2 - SAWTOOTH_1X type: string diff --git a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go index e493a1ec32..0f2fb114d9 100644 --- a/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go +++ b/packages/cactus-core-api/src/main/go/generated/openapi/go-client/model_ledger_type.go @@ -24,6 +24,7 @@ const ( BESU_2_X LedgerType = "BESU_2X" BURROW_0_X LedgerType = "BURROW_0X" CORDA_4_X LedgerType = "CORDA_4X" + ETHEREUM LedgerType = "ETHEREUM" FABRIC_2 LedgerType = "FABRIC_2" SAWTOOTH_1_X LedgerType = "SAWTOOTH_1X" ) @@ -34,6 +35,7 @@ var AllowedLedgerTypeEnumValues = []LedgerType{ "BESU_2X", "BURROW_0X", "CORDA_4X", + "ETHEREUM", "FABRIC_2", "SAWTOOTH_1X", } diff --git a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json index 4cc0d3870c..239399b6fa 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json +++ b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.tpl.json @@ -28,8 +28,8 @@ "PrivacyPolicyOpts": { "description": "identifier of the policy used to process a view", "type": "string", - "enum": ["pruneState"], - "x-enum-varnames": ["PruneState"] + "enum": ["pruneState", "singleTransaction"], + "x-enum-varnames": ["PruneState", "SingleTransaction"] }, "MergePolicyOpts": { "description": "identifier of the policy used to merge views (can be none)", diff --git a/packages/cactus-plugin-ccmodel-hephaestus/package.json b/packages/cactus-plugin-ccmodel-hephaestus/package.json index f407623a9a..a8012b10da 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/package.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/package.json @@ -80,7 +80,7 @@ "@hyperledger/cactus-test-tooling": "2.0.0-rc.7", "@types/express": "5.0.0", "@types/uuid": "10.0.0", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "fabric-network": "2.2.20", "socket.io": "4.6.2", "uuid": "10.0.0", diff --git a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json index fd506e80f5..0daafa87b6 100644 --- a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json +++ b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json @@ -1 +1 @@ -{"_format":"","paths":{"artifacts":"src/test/solidity/generated","build_infos":"src/test/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"lastModificationDate":1722543467180,"contentHash":"4c80b7fdf559a9a348e832a57d072a0b","sourceName":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"AccessControl":{"0.8.20":{"path":"AccessControl.sol/AccessControl.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"lastModificationDate":1722543467188,"contentHash":"e3a14b0714caaaa82d58fa0bc3756079","sourceName":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IAccessControl":{"0.8.20":{"path":"IAccessControl.sol/IAccessControl.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"lastModificationDate":1722543467228,"contentHash":"4aefc698f77ecbace7f401257dfe182d","sourceName":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC1155Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC1155Errors.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}},"IERC20Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC20Errors.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}},"IERC721Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC721Errors.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"lastModificationDate":1722543467264,"contentHash":"c6375ef25e84c90b3d15f9ec4eef218f","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC20":{"0.8.20":{"path":"ERC20.sol/ERC20.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"lastModificationDate":1722543467288,"contentHash":"5517c8678c18eb1a8ba58810e7ca39ca","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC20":{"0.8.20":{"path":"IERC20.sol/IERC20.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"lastModificationDate":1722543467280,"contentHash":"4c02fa6f7ae7b6c289cef80424f0c875","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol"],"versionRequirement":"^0.8.20","artifacts":{"IERC20Metadata":{"0.8.20":{"path":"IERC20Metadata.sol/IERC20Metadata.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1722543467200,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1722543467216,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"lastModificationDate":1722543467204,"contentHash":"6a55c353946e471d9792965d06208295","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC165":{"0.8.20":{"path":"ERC165.sol/ERC165.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"lastModificationDate":1722543467208,"contentHash":"de0163561b417b800d01749cbbe2147e","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC165":{"0.8.20":{"path":"IERC165.sol/IERC165.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1722543467208,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1722543467208,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"src/test/solidity/contracts/ITraceableContract.sol":{"lastModificationDate":1722542120772,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/test/solidity/contracts/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-contract-interface.sol":{"lastModificationDate":1722542120772,"contentHash":"2411a0d6a3ea8e5f85c97e6ae77fead4","sourceName":"src/test/solidity/contracts/satp-contract-interface.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"SATPContractInterface":{"0.8.20":{"path":"satp-contract-interface.sol/SATPContractInterface.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-erc20.sol":{"lastModificationDate":1722542120772,"contentHash":"5ecdb78db9a7b063ee9e0a5702733bd6","sourceName":"src/test/solidity/contracts/satp-erc20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/AccessControl.sol","node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/test/solidity/contracts/ITraceableContract.sol","src/test/solidity/contracts/satp-contract-interface.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPContract":{"0.8.20":{"path":"satp-erc20.sol/SATPContract.json","build_id":"1850d4b29fc5f56323d9fed285466abb"}}},"seenByCompiler":true}},"builds":["1850d4b29fc5f56323d9fed285466abb"]} \ No newline at end of file +{"_format":"","paths":{"artifacts":"src/test/solidity/generated","build_infos":"src/test/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"lastModificationDate":1728611461049,"contentHash":"4c80b7fdf559a9a348e832a57d072a0b","sourceName":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"AccessControl":{"0.8.20":{"path":"AccessControl.sol/AccessControl.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"lastModificationDate":1728611461052,"contentHash":"e3a14b0714caaaa82d58fa0bc3756079","sourceName":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IAccessControl":{"0.8.20":{"path":"IAccessControl.sol/IAccessControl.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"lastModificationDate":1728611461080,"contentHash":"4aefc698f77ecbace7f401257dfe182d","sourceName":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC1155Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC1155Errors.json","build_id":"f277531deacae890b124dd8f32ec2567"}},"IERC20Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC20Errors.json","build_id":"f277531deacae890b124dd8f32ec2567"}},"IERC721Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC721Errors.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"lastModificationDate":1728611461092,"contentHash":"c6375ef25e84c90b3d15f9ec4eef218f","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC20":{"0.8.20":{"path":"ERC20.sol/ERC20.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"lastModificationDate":1728611461099,"contentHash":"5517c8678c18eb1a8ba58810e7ca39ca","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC20":{"0.8.20":{"path":"IERC20.sol/IERC20.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"lastModificationDate":1728611461099,"contentHash":"4c02fa6f7ae7b6c289cef80424f0c875","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol"],"versionRequirement":"^0.8.20","artifacts":{"IERC20Metadata":{"0.8.20":{"path":"IERC20Metadata.sol/IERC20Metadata.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1728611461055,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1728611461061,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"lastModificationDate":1728611461057,"contentHash":"6a55c353946e471d9792965d06208295","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC165":{"0.8.20":{"path":"ERC165.sol/ERC165.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"lastModificationDate":1728611461058,"contentHash":"de0163561b417b800d01749cbbe2147e","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC165":{"0.8.20":{"path":"IERC165.sol/IERC165.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1728611461058,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1728611461059,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"src/test/solidity/contracts/ITraceableContract.sol":{"lastModificationDate":1728610668341,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/test/solidity/contracts/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-contract-interface.sol":{"lastModificationDate":1728610668341,"contentHash":"2411a0d6a3ea8e5f85c97e6ae77fead4","sourceName":"src/test/solidity/contracts/satp-contract-interface.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"SATPContractInterface":{"0.8.20":{"path":"satp-contract-interface.sol/SATPContractInterface.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-erc20.sol":{"lastModificationDate":1728610668341,"contentHash":"5ecdb78db9a7b063ee9e0a5702733bd6","sourceName":"src/test/solidity/contracts/satp-erc20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/AccessControl.sol","node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/test/solidity/contracts/ITraceableContract.sol","src/test/solidity/contracts/satp-contract-interface.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPContract":{"0.8.20":{"path":"satp-erc20.sol/SATPContract.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true}},"builds":["f277531deacae890b124dd8f32ec2567"]} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 69645aaca1..b46d959399 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -102,7 +102,7 @@ "dotenv": "16.4.5", "ethereum-abi-types-generator": "1.3.4", "ethers": "6.13.1", - "express": "4.17.2", + "express": "4.21.0", "fabric-network": "2.2.19", "fs-extra": "11.2.0", "google-protobuf": "3.21.2", diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md index 5bc8df928c..9db8be986e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md @@ -91,6 +91,7 @@ Class | Method | HTTP request | Description *AdminApi* | [**CallContinue**](docs/AdminApi.md#callcontinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session *AdminApi* | [**GetAudit**](docs/AdminApi.md#getaudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions *AdminApi* | [**GetHealthCheck**](docs/AdminApi.md#gethealthcheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint +*AdminApi* | [**GetSessionIds**](docs/AdminApi.md#getsessionids) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids | Get SATP session ids *AdminApi* | [**GetStatus**](docs/AdminApi.md#getstatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data *AdminApi* | [**Pause**](docs/AdminApi.md#pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session *TransactionApi* | [**Cancel**](docs/TransactionApi.md#cancel) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel | Cancel a transaction session diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml index b8145bcd70..c80940b690 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml @@ -137,6 +137,43 @@ paths: http: verbLowerCase: get path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/status + /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids: + get: + description: Retrieve the all SATP session IDs + operationId: GetSessionIds + parameters: + - explode: true + in: query + name: SessionsRequest + required: false + schema: + description: Empty object + type: object + style: form + responses: + "200": + content: + application/json: + schema: + description: Array with session Ids + items: + nullable: false + type: string + type: array + description: OK + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + summary: Get SATP session ids + tags: + - admin + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck: get: description: Responds if SATP Hermes is on @@ -429,6 +466,15 @@ components: - X509 example: OAUTH type: string + AllSessionIdsRequest: + description: Empty object + type: object + AllSessionIdsResponse: + description: Array with session Ids + items: + nullable: false + type: string + type: array getAuditRequest: description: Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go index 9b9e6b64be..1e3db04840 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go @@ -64,6 +64,20 @@ type AdminApi interface { // @return GetHealthCheck200Response GetHealthCheckExecute(r ApiGetHealthCheckRequest) (*GetHealthCheck200Response, *http.Response, error) + /* + GetSessionIds Get SATP session ids + + Retrieve the all SATP session IDs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetSessionIdsRequest + */ + GetSessionIds(ctx context.Context) ApiGetSessionIdsRequest + + // GetSessionIdsExecute executes the request + // @return []string + GetSessionIdsExecute(r ApiGetSessionIdsRequest) ([]string, *http.Response, error) + /* GetStatus Get SATP current session data @@ -442,6 +456,114 @@ func (a *AdminApiService) GetHealthCheckExecute(r ApiGetHealthCheckRequest) (*Ge return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetSessionIdsRequest struct { + ctx context.Context + ApiService AdminApi + sessionsRequest *map[string]interface{} +} + +func (r ApiGetSessionIdsRequest) SessionsRequest(sessionsRequest map[string]interface{}) ApiGetSessionIdsRequest { + r.sessionsRequest = &sessionsRequest + return r +} + +func (r ApiGetSessionIdsRequest) Execute() ([]string, *http.Response, error) { + return r.ApiService.GetSessionIdsExecute(r) +} + +/* +GetSessionIds Get SATP session ids + +Retrieve the all SATP session IDs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetSessionIdsRequest +*/ +func (a *AdminApiService) GetSessionIds(ctx context.Context) ApiGetSessionIdsRequest { + return ApiGetSessionIdsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []string +func (a *AdminApiService) GetSessionIdsExecute(r ApiGetSessionIdsRequest) ([]string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetSessionIds") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.sessionsRequest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "SessionsRequest", r.sessionsRequest, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetStatusRequest struct { ctx context.Context ApiService AdminApi diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md index 9cc592dde0..b5aff9434e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md +++ b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**CallContinue**](AdminApi.md#CallContinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session [**GetAudit**](AdminApi.md#GetAudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions [**GetHealthCheck**](AdminApi.md#GetHealthCheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint +[**GetSessionIds**](AdminApi.md#GetSessionIds) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids | Get SATP session ids [**GetStatus**](AdminApi.md#GetStatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data [**Pause**](AdminApi.md#Pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session @@ -210,6 +211,72 @@ No authorization required [[Back to README]](../README.md) +## GetSessionIds + +> []string GetSessionIds(ctx).SessionsRequest(sessionsRequest).Execute() + +Get SATP session ids + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" +) + +func main() { + sessionsRequest := map[string]interface{}{ ... } // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AdminApi.GetSessionIds(context.Background()).SessionsRequest(sessionsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetSessionIds``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSessionIds`: []string + fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetSessionIds`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetSessionIdsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sessionsRequest** | [**map[string]interface{}**](map[string]interface{}.md) | | + +### Return type + +**[]string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetStatus > Transact200ResponseStatusResponse GetStatus(ctx).SessionID(sessionID).Execute() diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts index 06f94e0ab6..6ef53cb139 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/common/health.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index 36d20c534e..7f8248ffdd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/common/message.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 29c9d725f3..23b33c82ad 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/common/session.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts index cacc514805..9a74c55890 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts index e40e13871f..ed70ded73b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts index 2dcddb32d3..fc39e916dc 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts index 5e64da5a95..59d65e98f9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts index e3147a8629..03e37d7dd7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" // @generated from file cacti/satp/v02/view/bungee.proto (package cacti.satp.v02.view.bungee, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index 468846b0cb..3252392242 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -41,6 +41,7 @@ import { resolveGatewayID, } from "../network-identification/resolve-gateway"; import { SATPHandler, Stage } from "../types/satp-protocol"; +import { IExpressRequestHandler } from "@hyperledger/cactus-core-api"; export class GatewayOrchestrator { public readonly label = "GatewayOrchestrator"; @@ -108,17 +109,18 @@ export class GatewayOrchestrator { public startServices(): void { for (const stage of this.handlers.keys()) { - this.logger.info( - `Setting up routes for stage ${`/${this.handlers.get(stage)!.getStage()}`}`, - ); - this.expressServer!.use( - `/${this.handlers.get(stage)!.getStage()}`, - expressConnectMiddleware({ - routes: this.handlers - .get(stage)! - .setupRouter.bind(this.handlers.get(stage)!), - }), - ); + const httpPath = `/${this.handlers.get(stage)!.getStage()}`; + this.logger.info(`Setting up routes for stage ${httpPath}`); + if (!this.expressServer) { + throw new Error(`${this.label}#startServices() expressServer falsy.`); + } + const theHandler = expressConnectMiddleware({ + routes: this.handlers + .get(stage)! + .setupRouter.bind(this.handlers.get(stage)!), + }) as IExpressRequestHandler; // FIXME(petermetz) - unsafe cast + + this.expressServer.use(httpPath, theHandler); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index 1edac6b0f8..ce1d2cc8d9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -347,18 +347,18 @@ export class SATPManager { public async initiateTransfer(session: SATPSession): Promise { const fnTag = `${SATPManager.CLASS_NAME}#initiateTransfer()`; - this.logger.info(`${fnTag}, Initiating Transfer`); - this.logger.debug( - `SessionData: ${JSON.stringify(session.getClientSessionData())}`, - ); + this.logger.debug(`${fnTag}, Initiating Transfer`); + + const clientSessionData = session.getClientSessionData(); + const clientSessionDataJson = JSON.stringify(clientSessionData); + this.logger.debug(`clientSessionDataJson=%s`, clientSessionDataJson); - if (!session.getClientSessionData()) { + if (!clientSessionData) { throw new Error(`${fnTag}, Session not found`); } //maybe get a suitable gateway first. const channel = this.orchestrator.getChannel( - session.getClientSessionData() - ?.recipientGatewayNetworkId as SupportedChain, + clientSessionData.recipientGatewayNetworkId as SupportedChain, ); if (!channel) { @@ -370,8 +370,7 @@ export class SATPManager { if (!counterGatewayID) { throw new Error(`${fnTag}, counterparty gateway ID not found`); } - const sessionData: SessionData = - session.getClientSessionData() as SessionData; + const sessionData: SessionData = clientSessionData; sessionData.receiverGatewayOwnerId = channel.toGatewayID; diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/f1899ba2ae9750a5ab49a77f29316cd5.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/f1899ba2ae9750a5ab49a77f29316cd5.json new file mode 100644 index 0000000000..6326ee7573 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/f1899ba2ae9750a5ab49a77f29316cd5.json @@ -0,0 +1 @@ +{"id":"f1899ba2ae9750a5ab49a77f29316cd5","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/f277531deacae890b124dd8f32ec2567.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/f277531deacae890b124dd8f32ec2567.json new file mode 100644 index 0000000000..80dcad821e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/f277531deacae890b124dd8f32ec2567.json @@ -0,0 +1 @@ +{"id":"f277531deacae890b124dd8f32ec2567","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 9f9b434d53..f6a6a7b64f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -139,6 +139,9 @@ { "path": "./examples/cactus-common-example-server/tsconfig.json" }, + { + "path": "./examples/cactus-example-cbdc-bridging-backend/tsconfig.json" + }, { "path": "./examples/cactus-example-carbon-accounting-backend/tsconfig.json" }, diff --git a/weaver/samples/fabric/fabric-cli/package-local.json b/weaver/samples/fabric/fabric-cli/package-local.json index 2d7618948c..fdd37ef60c 100644 --- a/weaver/samples/fabric/fabric-cli/package-local.json +++ b/weaver/samples/fabric/fabric-cli/package-local.json @@ -40,7 +40,7 @@ "@hyperledger/cacti-weaver-sdk-fabric": "file:../../../sdks/fabric/interoperation-node-sdk", "body-parser": "1.20.2", "dotenv": "8.6.0", - "express": "4.19.2", + "express": "4.21.0", "fabric-ca-client": "2.2.20", "fabric-common": "2.2.20", "fabric-network": "2.2.20", diff --git a/yarn.lock b/yarn.lock index fb71740e21..92df22cd98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5534,6 +5534,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.7.6": + version: 7.25.7 + resolution: "@babel/runtime@npm:7.25.7" + dependencies: + regenerator-runtime: "npm:^0.14.0" + checksum: 10/73411fe0f1bff3a962586cef05b30f49e554b6563767e6d84f7d79d605b2c20e7fc3df291a3aebef69043181a8f893afdab9e6672557a5c2d08b9377d6f678cd + languageName: node + linkType: hard + "@babel/runtime@npm:^7.8.4": version: 7.17.2 resolution: "@babel/runtime@npm:7.17.2" @@ -7140,14 +7149,14 @@ __metadata: languageName: node linkType: hard -"@emotion/react@npm:11.11.4": - version: 11.11.4 - resolution: "@emotion/react@npm:11.11.4" +"@emotion/react@npm:11.11.1": + version: 11.11.1 + resolution: "@emotion/react@npm:11.11.1" dependencies: "@babel/runtime": "npm:^7.18.3" "@emotion/babel-plugin": "npm:^11.11.0" "@emotion/cache": "npm:^11.11.0" - "@emotion/serialize": "npm:^1.1.3" + "@emotion/serialize": "npm:^1.1.2" "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" "@emotion/utils": "npm:^1.2.1" "@emotion/weak-memoize": "npm:^0.3.1" @@ -7157,18 +7166,18 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/e7da3a1ddc1d72a4179010bdfd17423c13b1a77bf83a8b18271e919fd382d08c62dc2313ed5347acfd1ef85bb1bae8932597647a986e8a1ea1462552716cd495 + checksum: 10/dfc140718d0a8051a74e51c379226d9de6b19f6a5dd595fb282ef72f4413695a2d012ba919f1e9eeff761c6659e6f7398da8e0e36eb7997a4fdf54cef88644ae languageName: node linkType: hard -"@emotion/react@npm:^11.11.1": - version: 11.11.1 - resolution: "@emotion/react@npm:11.11.1" +"@emotion/react@npm:11.11.4": + version: 11.11.4 + resolution: "@emotion/react@npm:11.11.4" dependencies: "@babel/runtime": "npm:^7.18.3" "@emotion/babel-plugin": "npm:^11.11.0" "@emotion/cache": "npm:^11.11.0" - "@emotion/serialize": "npm:^1.1.2" + "@emotion/serialize": "npm:^1.1.3" "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" "@emotion/utils": "npm:^1.2.1" "@emotion/weak-memoize": "npm:^0.3.1" @@ -7178,7 +7187,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/dfc140718d0a8051a74e51c379226d9de6b19f6a5dd595fb282ef72f4413695a2d012ba919f1e9eeff761c6659e6f7398da8e0e36eb7997a4fdf54cef88644ae + checksum: 10/e7da3a1ddc1d72a4179010bdfd17423c13b1a77bf83a8b18271e919fd382d08c62dc2313ed5347acfd1ef85bb1bae8932597647a986e8a1ea1462552716cd495 languageName: node linkType: hard @@ -7228,14 +7237,14 @@ __metadata: languageName: node linkType: hard -"@emotion/styled@npm:11.11.5": - version: 11.11.5 - resolution: "@emotion/styled@npm:11.11.5" +"@emotion/styled@npm:11.11.0": + version: 11.11.0 + resolution: "@emotion/styled@npm:11.11.0" dependencies: "@babel/runtime": "npm:^7.18.3" "@emotion/babel-plugin": "npm:^11.11.0" - "@emotion/is-prop-valid": "npm:^1.2.2" - "@emotion/serialize": "npm:^1.1.4" + "@emotion/is-prop-valid": "npm:^1.2.1" + "@emotion/serialize": "npm:^1.1.2" "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" "@emotion/utils": "npm:^1.2.1" peerDependencies: @@ -7244,18 +7253,18 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/a936787ef80d73066840391522d88280424de0abb56bec83d17e14bdc5a515e77e343dd171f7caae1405462e3f71815b5480dcc4e1eff5e8ff4a020f5c39341e + checksum: 10/ac471a40645ee7bc950378ff9453028078bc2e45a6317f77636e4ed27f7ea61eb549b1efefdc5433640f73246ae5ee212e6c864085dc042b6541b2ffa0e21a49 languageName: node linkType: hard -"@emotion/styled@npm:^11.11.0": - version: 11.11.0 - resolution: "@emotion/styled@npm:11.11.0" +"@emotion/styled@npm:11.11.5": + version: 11.11.5 + resolution: "@emotion/styled@npm:11.11.5" dependencies: "@babel/runtime": "npm:^7.18.3" "@emotion/babel-plugin": "npm:^11.11.0" - "@emotion/is-prop-valid": "npm:^1.2.1" - "@emotion/serialize": "npm:^1.1.2" + "@emotion/is-prop-valid": "npm:^1.2.2" + "@emotion/serialize": "npm:^1.1.4" "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" "@emotion/utils": "npm:^1.2.1" peerDependencies: @@ -7264,7 +7273,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/ac471a40645ee7bc950378ff9453028078bc2e45a6317f77636e4ed27f7ea61eb549b1efefdc5433640f73246ae5ee212e6c864085dc042b6541b2ffa0e21a49 + checksum: 10/a936787ef80d73066840391522d88280424de0abb56bec83d17e14bdc5a515e77e343dd171f7caae1405462e3f71815b5480dcc4e1eff5e8ff4a020f5c39341e languageName: node linkType: hard @@ -9223,26 +9232,26 @@ __metadata: version: 0.0.0-use.local resolution: "@hyperledger/cacti-example-cbdc-bridging-frontend@workspace:examples/cactus-example-cbdc-bridging-frontend" dependencies: - "@emotion/react": "npm:^11.11.1" - "@emotion/styled": "npm:^11.11.0" - "@mui/icons-material": "npm:^5.14.19" - "@mui/material": "npm:^5.14.19" - "@testing-library/jest-dom": "npm:^5.17.0" - "@testing-library/react": "npm:^13.4.0" - "@testing-library/user-event": "npm:^13.5.0" - "@types/jest": "npm:^27.5.2" + "@emotion/react": "npm:11.11.1" + "@emotion/styled": "npm:11.11.0" + "@mui/icons-material": "npm:5.14.19" + "@mui/material": "npm:5.14.19" + "@testing-library/jest-dom": "npm:5.17.0" + "@testing-library/react": "npm:13.4.0" + "@testing-library/user-event": "npm:13.5.0" + "@types/jest": "npm:27.5.2" "@types/node": "npm:18.11.9" - "@types/react": "npm:^18.2.39" - "@types/react-dom": "npm:^18.2.17" + "@types/react": "npm:18.2.39" + "@types/react-dom": "npm:18.2.17" "@types/uuid": "npm:10.0.0" axios: "npm:1.7.7" - react: "npm:^18.2.0" - react-dom: "npm:^18.2.0" - react-router-dom: "npm:^6.2.1" + react: "npm:18.2.0" + react-dom: "npm:18.2.0" + react-router-dom: "npm:6.2.1" react-scripts: "npm:5.0.1" typescript: "npm:5.5.2" uuid: "npm:10.0.0" - web-vitals: "npm:^2.1.4" + web-vitals: "npm:2.1.4" languageName: unknown linkType: soft @@ -12939,11 +12948,11 @@ __metadata: languageName: node linkType: hard -"@mui/icons-material@npm:5.15.10": - version: 5.15.10 - resolution: "@mui/icons-material@npm:5.15.10" +"@mui/icons-material@npm:5.14.19": + version: 5.14.19 + resolution: "@mui/icons-material@npm:5.14.19" dependencies: - "@babel/runtime": "npm:^7.23.9" + "@babel/runtime": "npm:^7.23.4" peerDependencies: "@mui/material": ^5.0.0 "@types/react": ^17.0.0 || ^18.0.0 @@ -12951,15 +12960,15 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/ce22c02dc7ed960a21f8d5ea7c4d4fc03d9f71e8a26ced02f75da1ffd6c768e6fa0682a308a03be53bffc2325a5aaf68be69f9e192b0a57c6752f7548e5b9045 + checksum: 10/648a44af9a18a39062126d80268d0d4816d408d253d46f097cf8ad525e37dad8301a7727942f4908a15c432de361dabe29de0595f3771cf8acf7da311374441e languageName: node linkType: hard -"@mui/icons-material@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/icons-material@npm:5.14.19" +"@mui/icons-material@npm:5.15.10": + version: 5.15.10 + resolution: "@mui/icons-material@npm:5.15.10" dependencies: - "@babel/runtime": "npm:^7.23.4" + "@babel/runtime": "npm:^7.23.9" peerDependencies: "@mui/material": ^5.0.0 "@types/react": ^17.0.0 || ^18.0.0 @@ -12967,7 +12976,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/648a44af9a18a39062126d80268d0d4816d408d253d46f097cf8ad525e37dad8301a7727942f4908a15c432de361dabe29de0595f3771cf8acf7da311374441e + checksum: 10/ce22c02dc7ed960a21f8d5ea7c4d4fc03d9f71e8a26ced02f75da1ffd6c768e6fa0682a308a03be53bffc2325a5aaf68be69f9e192b0a57c6752f7548e5b9045 languageName: node linkType: hard @@ -13000,19 +13009,19 @@ __metadata: languageName: node linkType: hard -"@mui/material@npm:5.15.15": - version: 5.15.15 - resolution: "@mui/material@npm:5.15.15" +"@mui/material@npm:5.14.19": + version: 5.14.19 + resolution: "@mui/material@npm:5.14.19" dependencies: - "@babel/runtime": "npm:^7.23.9" - "@mui/base": "npm:5.0.0-beta.40" - "@mui/core-downloads-tracker": "npm:^5.15.15" - "@mui/system": "npm:^5.15.15" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" - "@types/react-transition-group": "npm:^4.4.10" - clsx: "npm:^2.1.0" - csstype: "npm:^3.1.3" + "@babel/runtime": "npm:^7.23.4" + "@mui/base": "npm:5.0.0-beta.25" + "@mui/core-downloads-tracker": "npm:^5.14.19" + "@mui/system": "npm:^5.14.19" + "@mui/types": "npm:^7.2.10" + "@mui/utils": "npm:^5.14.19" + "@types/react-transition-group": "npm:^4.4.9" + clsx: "npm:^2.0.0" + csstype: "npm:^3.1.2" prop-types: "npm:^15.8.1" react-is: "npm:^18.2.0" react-transition-group: "npm:^4.4.5" @@ -13029,23 +13038,23 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10/e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b + checksum: 10/9b89bf20e5086801d8737d906d4c84023e04883a67186c4f523748740a90bee495a8c93ba7bc1272fdc0f9ee9951e2ebff149ecd63697abfba06dbfe9787f5fa languageName: node linkType: hard -"@mui/material@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/material@npm:5.14.19" +"@mui/material@npm:5.15.15": + version: 5.15.15 + resolution: "@mui/material@npm:5.15.15" dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/base": "npm:5.0.0-beta.25" - "@mui/core-downloads-tracker": "npm:^5.14.19" - "@mui/system": "npm:^5.14.19" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - "@types/react-transition-group": "npm:^4.4.9" - clsx: "npm:^2.0.0" - csstype: "npm:^3.1.2" + "@babel/runtime": "npm:^7.23.9" + "@mui/base": "npm:5.0.0-beta.40" + "@mui/core-downloads-tracker": "npm:^5.15.15" + "@mui/system": "npm:^5.15.15" + "@mui/types": "npm:^7.2.14" + "@mui/utils": "npm:^5.15.14" + "@types/react-transition-group": "npm:^4.4.10" + clsx: "npm:^2.1.0" + csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" react-is: "npm:^18.2.0" react-transition-group: "npm:^4.4.5" @@ -13062,7 +13071,7 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10/9b89bf20e5086801d8737d906d4c84023e04883a67186c4f523748740a90bee495a8c93ba7bc1272fdc0f9ee9951e2ebff149ecd63697abfba06dbfe9787f5fa + checksum: 10/e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b languageName: node linkType: hard @@ -15160,13 +15169,6 @@ __metadata: languageName: node linkType: hard -"@remix-run/router@npm:1.19.2": - version: 1.19.2 - resolution: "@remix-run/router@npm:1.19.2" - checksum: 10/31b62b66ea68bd62018189047de7b262700113438f62407df019f81a9856a08a705b2b77454be9293518e2f5f3bbf3f8b858ac19f48cb7d89f8ab56b7b630c19 - languageName: node - linkType: hard - "@rollup/plugin-babel@npm:^5.2.0": version: 5.3.1 resolution: "@rollup/plugin-babel@npm:5.3.1" @@ -16278,7 +16280,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^5.17.0": +"@testing-library/jest-dom@npm:5.17.0": version: 5.17.0 resolution: "@testing-library/jest-dom@npm:5.17.0" dependencies: @@ -16295,7 +16297,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/react@npm:^13.4.0": +"@testing-library/react@npm:13.4.0": version: 13.4.0 resolution: "@testing-library/react@npm:13.4.0" dependencies: @@ -16309,7 +16311,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/user-event@npm:^13.5.0": +"@testing-library/user-event@npm:13.5.0": version: 13.5.0 resolution: "@testing-library/user-event@npm:13.5.0" dependencies: @@ -17297,18 +17299,6 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:4.17.21, @types/express@npm:^4.17.18": - version: 4.17.21 - resolution: "@types/express@npm:4.17.21" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/7a6d26cf6f43d3151caf4fec66ea11c9d23166e4f3102edfe45a94170654a54ea08cf3103d26b3928d7ebcc24162c90488e33986b7e3a5f8941225edd5eb18c7 - languageName: node - linkType: hard - "@types/express@npm:5.0.0": version: 5.0.0 resolution: "@types/express@npm:5.0.0" @@ -17345,6 +17335,18 @@ __metadata: languageName: node linkType: hard +"@types/express@npm:^4.17.18": + version: 4.17.21 + resolution: "@types/express@npm:4.17.21" + dependencies: + "@types/body-parser": "npm:*" + "@types/express-serve-static-core": "npm:^4.17.33" + "@types/qs": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/7a6d26cf6f43d3151caf4fec66ea11c9d23166e4f3102edfe45a94170654a54ea08cf3103d26b3928d7ebcc24162c90488e33986b7e3a5f8941225edd5eb18c7 + languageName: node + linkType: hard + "@types/fs-extra@npm:11.0.4": version: 11.0.4 resolution: "@types/fs-extra@npm:11.0.4" @@ -17520,6 +17522,16 @@ __metadata: languageName: node linkType: hard +"@types/jest@npm:27.5.2": + version: 27.5.2 + resolution: "@types/jest@npm:27.5.2" + dependencies: + jest-matcher-utils: "npm:^27.0.0" + pretty-format: "npm:^27.0.0" + checksum: 10/8608696fbdea81bc9a600d1c5aeb290063357eaa55c0174e7db15087c4f483113b35f8b4c4ae364d2632cfed15a4dd674786254826b946c896de5612c8cb1a26 + languageName: node + linkType: hard + "@types/jest@npm:29.5.3": version: 29.5.3 resolution: "@types/jest@npm:29.5.3" @@ -17530,16 +17542,6 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^27.5.2": - version: 27.5.2 - resolution: "@types/jest@npm:27.5.2" - dependencies: - jest-matcher-utils: "npm:^27.0.0" - pretty-format: "npm:^27.0.0" - checksum: 10/8608696fbdea81bc9a600d1c5aeb290063357eaa55c0174e7db15087c4f483113b35f8b4c4ae364d2632cfed15a4dd674786254826b946c896de5612c8cb1a26 - languageName: node - linkType: hard - "@types/joi@npm:17.2.3": version: 17.2.3 resolution: "@types/joi@npm:17.2.3" @@ -18068,7 +18070,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:18.2.17, @types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.17": +"@types/react-dom@npm:18.2.17, @types/react-dom@npm:^18.0.0": version: 18.2.17 resolution: "@types/react-dom@npm:18.2.17" dependencies: @@ -18106,6 +18108,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:18.2.39": + version: 18.2.39 + resolution: "@types/react@npm:18.2.39" + dependencies: + "@types/prop-types": "npm:*" + "@types/scheduler": "npm:*" + csstype: "npm:^3.0.2" + checksum: 10/870f7774c676ae0f3ab6339a62b3315f5a296e89412358b15a5249a61e781a8807a2253ef7ad2ec98e7a5bea1e8c3ddd95b02226d6b8ac4a085da59b4a496564 + languageName: node + linkType: hard + "@types/react@npm:18.2.43": version: 18.2.43 resolution: "@types/react@npm:18.2.43" @@ -18128,17 +18141,6 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^18.2.39": - version: 18.2.39 - resolution: "@types/react@npm:18.2.39" - dependencies: - "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10/870f7774c676ae0f3ab6339a62b3315f5a296e89412358b15a5249a61e781a8807a2253ef7ad2ec98e7a5bea1e8c3ddd95b02226d6b8ac4a085da59b4a496564 - languageName: node - linkType: hard - "@types/readable-stream@npm:^2.3.13": version: 2.3.15 resolution: "@types/readable-stream@npm:2.3.15" @@ -21922,9 +21924,9 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.2, body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21934,17 +21936,17 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.11.0" + qs: "npm:6.13.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a + checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca languageName: node linkType: hard -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" +"body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" dependencies: bytes: "npm:3.1.2" content-type: "npm:~1.0.5" @@ -21954,11 +21956,11 @@ __metadata: http-errors: "npm:2.0.0" iconv-lite: "npm:0.4.24" on-finished: "npm:2.4.1" - qs: "npm:6.13.0" + qs: "npm:6.11.0" raw-body: "npm:2.5.2" type-is: "npm:~1.6.18" unpipe: "npm:1.0.0" - checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca + checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a languageName: node linkType: hard @@ -33164,6 +33166,15 @@ __metadata: languageName: node linkType: hard +"history@npm:^5.2.0": + version: 5.3.0 + resolution: "history@npm:5.3.0" + dependencies: + "@babel/runtime": "npm:^7.7.6" + checksum: 10/52ba685b842ca6438ff11ef459951eb13d413ae715866a8dc5f7c3b1ea0cdeb8db6aabf7254551b85f56abc205e6e2d7e1d5afb36b711b401cdaff4f2cf187e9 + languageName: node + linkType: hard + "hmac-drbg@npm:^1.0.1": version: 1.0.1 resolution: "hmac-drbg@npm:1.0.1" @@ -46289,7 +46300,7 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:18.2.0, react-dom@npm:^18.2.0": +"react-dom@npm:18.2.0": version: 18.2.0 resolution: "react-dom@npm:18.2.0" dependencies: @@ -46383,6 +46394,19 @@ __metadata: languageName: node linkType: hard +"react-router-dom@npm:6.2.1": + version: 6.2.1 + resolution: "react-router-dom@npm:6.2.1" + dependencies: + history: "npm:^5.2.0" + react-router: "npm:6.2.1" + peerDependencies: + react: ">=16.8" + react-dom: ">=16.8" + checksum: 10/8c5c93ba4ebb40460aab0ac7e50a9ab38a65fc511229ebc3b84c67633ac4579cec3942c16b3dabed9889e079ff3c1651b882feec1d1a4eb2c1de01f80cfcab27 + languageName: node + linkType: hard + "react-router-dom@npm:6.21.3": version: 6.21.3 resolution: "react-router-dom@npm:6.21.3" @@ -46396,16 +46420,14 @@ __metadata: languageName: node linkType: hard -"react-router-dom@npm:^6.2.1": - version: 6.26.2 - resolution: "react-router-dom@npm:6.26.2" +"react-router@npm:6.2.1": + version: 6.2.1 + resolution: "react-router@npm:6.2.1" dependencies: - "@remix-run/router": "npm:1.19.2" - react-router: "npm:6.26.2" + history: "npm:^5.2.0" peerDependencies: react: ">=16.8" - react-dom: ">=16.8" - checksum: 10/4eee37839bd1a660807c090b4d272e4aa9b95d8a9a932cdcdf7c5b10735f39b6db73bad79b08a3012386a7e225ff6bf60435e2741fb7c68e137ac5a6295d4308 + checksum: 10/eebdf70f3847c7576f12afd71c8bd40edbb66be887b686e3df4bcec1a792f295db305d89994cfe843bd6e59ef4a7d37086f4b396bab59c346f0923d7eb8a3683 languageName: node linkType: hard @@ -46420,17 +46442,6 @@ __metadata: languageName: node linkType: hard -"react-router@npm:6.26.2": - version: 6.26.2 - resolution: "react-router@npm:6.26.2" - dependencies: - "@remix-run/router": "npm:1.19.2" - peerDependencies: - react: ">=16.8" - checksum: 10/496e855b53e61066c1791e354f5d79eab56a128d9722fdc6486c3ecd3b3a0bf9968e927028f429893b157f3cc10fc09e890a055847723ee242663e7995fedc9d - languageName: node - linkType: hard - "react-scripts@npm:5.0.1": version: 5.0.1 resolution: "react-scripts@npm:5.0.1" @@ -46513,7 +46524,7 @@ __metadata: languageName: node linkType: hard -"react@npm:18.2.0, react@npm:^18.2.0": +"react@npm:18.2.0": version: 18.2.0 resolution: "react@npm:18.2.0" dependencies: @@ -54131,7 +54142,7 @@ __metadata: languageName: node linkType: hard -"web-vitals@npm:^2.1.4": +"web-vitals@npm:2.1.4": version: 2.1.4 resolution: "web-vitals@npm:2.1.4" checksum: 10/8d6fae84d0e4f2ea1d6da40067d8e6fd560df2a06a9f9484dbbd7a25eb5c961b97f66f2043c941866753465e0f00748773f33d3c88d8fd191e901a7207711ff1 From 21bc863dbd4f325536f7890d3a948eb1a071f65a Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Fri, 11 Oct 2024 10:25:27 -0700 Subject: [PATCH 41/49] build(plugin-satp-hermes): fix solidity lib import paths in satp tests Import paths were invalid possibly because the files were moved around within the directory tree and the imports never got updated. There are still imports which are invalid because of issues with the remix IDE test library being used but not declared as a dependency. I've opened a separate issue about fixing those problems here: https://github.com/hyperledger-cacti/cacti/issues/3585 Signed-off-by: Peter Somogyvari --- .../src/solidity/test/satp-erc20-test.sol | 4 +--- .../src/solidity/test/satp-wrapper-test.sol | 4 ++-- .../src/test/solidity/contracts/test/satp-erc20-test.sol | 4 +--- .../src/test/solidity/contracts/test/satp-wrapper-test.sol | 5 +++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol index cd46b6ee79..17ec252e48 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol @@ -2,12 +2,10 @@ pragma solidity ^0.8.15; -import "./../contracts/satp-erc20.sol"; +import "../main/satp-erc20.sol"; import "remix_tests.sol"; import "remix_accounts.sol"; -import "remix_accounts.sol"; - contract SATPContractTest { SATPContract satpContract; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol index 2ba3e52521..42d4d1c16b 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol +++ b/examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol @@ -9,8 +9,8 @@ import "remix_tests.sol"; // Although it may fail compilation in 'Solidity Compiler' plugin // But it will work fine in 'Solidity Unit Testing' plugin import "remix_accounts.sol"; -import "../contracts/satp-wrapper.sol"; -import "./../contracts/satp-erc20.sol"; +import "../main/satp-wrapper.sol"; +import "../main/satp-erc20.sol"; contract SATPWrapTest { diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol index cd46b6ee79..17ec252e48 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol @@ -2,12 +2,10 @@ pragma solidity ^0.8.15; -import "./../contracts/satp-erc20.sol"; +import "../main/satp-erc20.sol"; import "remix_tests.sol"; import "remix_accounts.sol"; -import "remix_accounts.sol"; - contract SATPContractTest { SATPContract satpContract; diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol index 2ba3e52521..7b299812ec 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol @@ -9,8 +9,9 @@ import "remix_tests.sol"; // Although it may fail compilation in 'Solidity Compiler' plugin // But it will work fine in 'Solidity Unit Testing' plugin import "remix_accounts.sol"; -import "../contracts/satp-wrapper.sol"; -import "./../contracts/satp-erc20.sol"; + +import "../../../../solidity/satp-wrapper.sol"; +import "../satp-erc20.sol"; contract SATPWrapTest { From edbcfabf7220f2dd2ad9bfc894cd922b42fc147f Mon Sep 17 00:00:00 2001 From: Carlos Amaro Date: Wed, 2 Oct 2024 12:16:22 +0100 Subject: [PATCH 42/49] refactor(cbdc-example): use oapi sdk instead of axios, cbdc-backend services, ui Signed-off-by: Carlos Amaro --- .eslintignore | 2 + .../Dockerfile | 2 - .../README.md | 27 +- .../openapitools.json | 7 + .../package.json | 30 +- .../process.env | 2 - .../src/main/go/generated/openapi}/.gitignore | 0 .../openapi}/.openapi-generator-ignore | 0 .../openapi/.openapi-generator/FILES | 53 + .../openapi/.openapi-generator/VERSION | 1 + .../main/go/generated/openapi}/.travis.yml | 0 .../src/main/go/generated/openapi/README.md | 129 + .../go/generated/openapi/api/openapi.yaml | 497 +++ .../main/go/generated/openapi/api_approve.go | 146 + .../openapi/api_get_amount_approved.go | 157 + .../go/generated/openapi/api_get_balance.go | 153 + .../openapi/api_get_sessions_references.go | 149 + .../src/main/go/generated/openapi/api_mint.go | 146 + .../main/go/generated/openapi/api_transact.go | 158 + .../main/go/generated/openapi/api_transfer.go | 146 + .../src/main/go/generated/openapi}/client.go | 74 +- .../go/generated/openapi}/configuration.go | 8 +- .../go/generated/openapi}/docs/APIError.md | 0 .../go/generated/openapi/docs/ApproveAPI.md | 73 + .../generated/openapi/docs/ApproveRequest.md | 93 + .../go/generated/openapi/docs/AssetType.md | 56 + .../generated/openapi/docs/BalanceResponse.md | 51 + .../openapi/docs/GetAmountApprovedAPI.md | 77 + .../generated/openapi/docs/GetBalanceAPI.md | 75 + .../openapi/docs/GetSessionsReferencesAPI.md | 75 + .../main/go/generated/openapi/docs/MintAPI.md | 73 + .../go/generated/openapi/docs/MintRequest.md | 93 + .../openapi/docs/SessionReference.md | 114 + .../generated/openapi/docs/StatusResponse.md | 77 + .../go/generated/openapi/docs/TransactAPI.md | 75 + .../generated/openapi/docs/TransactRequest.md | 135 + .../openapi/docs/TransactResponse.md | 22 +- .../go/generated/openapi/docs/TransferAPI.md | 73 + .../generated/openapi/docs/TransferRequest.md | 135 + .../main/go/generated/openapi}/git_push.sh | 2 +- .../src/main/go/generated/openapi/go.mod | 6 + .../src/main/go/generated/openapi}/go.sum | 0 .../go/generated/openapi}/model_api_error.go | 49 +- .../openapi/model_approve_request.go | 214 ++ .../go/generated/openapi/model_asset_type.go | 126 + .../openapi/model_balance_response.go | 158 + .../generated/openapi/model_mint_request.go | 214 ++ .../openapi/model_session_reference.go | 242 ++ .../openapi/model_status_response.go | 194 + .../openapi/model_transact_request.go | 270 ++ .../openapi}/model_transact_response.go | 87 +- .../openapi/model_transfer_request.go | 270 ++ .../main/go/generated/openapi}/response.go | 6 +- .../openapi/test/api_approve_test.go | 36 + .../test/api_get_amount_approved_test.go | 37 + .../openapi/test/api_get_balance_test.go | 37 + .../test/api_get_sessions_references_test.go | 37 + .../generated/openapi/test/api_mint_test.go | 36 + .../openapi/test/api_transact_test.go | 37 + .../openapi/test/api_transfer_test.go | 36 + .../src/main/go/generated/openapi}/utils.go | 22 +- .../src/main/json/openapi-bundled.json | 760 ++++ .../main/typescript/cbdc-bridging-app-cli.ts | 41 +- .../src/main/typescript/cbdc-bridging-app.ts | 58 +- .../openapi/typescript-axios/.gitignore | 4 + .../openapi/typescript-axios/.npmignore | 1 + .../.openapi-generator-ignore | 23 + .../typescript-axios/.openapi-generator/FILES | 8 + .../.openapi-generator/VERSION | 1 + .../generated/openapi/typescript-axios/api.ts | 1098 ++++++ .../openapi/typescript-axios/base.ts | 86 + .../openapi/typescript-axios/common.ts | 150 + .../openapi/typescript-axios/configuration.ts | 110 + .../openapi/typescript-axios/git_push.sh | 57 + .../openapi/typescript-axios/index.ts | 18 + .../cbdc-bridging-app-dummy-infrastructure.ts | 1203 ++++-- .../src/main/typescript/types.ts | 15 + .../web-services/approve-endpoint.ts | 105 + .../get-all-session-data-endpoints.ts | 100 + .../get-amount-approved-endpoint.ts | 98 + .../web-services/get-balance-endpoint.ts | 100 + .../typescript/web-services/mint-endpoint.ts | 105 + .../web-services/transact-endpoint.ts | 94 + .../web-services/transfer-endpoint.ts | 118 + .../src/main/yml/openapi-bundled.yml | 530 +++ .../src/main/yml/openapi.yml | 248 ++ .../src/main/yml/schemas.yml | 179 + .../src/ontology/besu-erc20-ontology.json | 0 .../src/ontology/fabric-erc20-ontology.json | 0 .../cbdc-app-setup-infrastucture.test.ts | 16 +- .../tsconfig.json | 4 +- .../.env | 3 +- .../README.md | 8 +- .../config-overrides.js | 9 + .../package.json | 55 +- .../src/App.tsx | 12 +- .../src/api-calls/besu-api.tsx | 158 - .../src/api-calls/common.tsx | 63 - .../src/api-calls/fabric-api.tsx | 178 - .../src/api-calls/gateway-api.tsx | 177 +- .../src/api-calls/ledgers-api.tsx | 146 + .../src/components/ActionsContainer.tsx | 43 +- .../src/components/ApprovalsTable.tsx | 2 +- .../src/components/Ledger.tsx | 45 +- .../src/components/SessionReferencesTable.tsx | 6 +- ...ermissionDialog.tsx => ApprovalDialog.tsx} | 24 +- .../dialogs/CrossChainTransferDialog.tsx | 72 +- .../src/components/dialogs/MintDialog.tsx | 22 +- .../src/components/dialogs/TransferDialog.tsx | 67 +- .../src/crypto-material/crypto-material.json | 40 - .../src/models/SessionReference.tsx | 23 - .../src/pages/HomePage.tsx | 27 +- .../tsconfig.json | 9 +- .../webpack.config.js | 17 + .../config_example.json | 256 ++ .../gateway-client/.openapi-generator/FILES | 125 - .../gateway-client/.openapi-generator/VERSION | 1 - .../go/generated/gateway-client/README.md | 186 - .../generated/gateway-client/api/openapi.yaml | 3225 ----------------- .../go/generated/gateway-client/api_admin.go | 793 ---- .../gateway-client/api_transaction.go | 609 ---- .../go/generated/gateway-client/client.go | 659 ---- .../generated/gateway-client/configuration.go | 225 -- .../generated/gateway-client/docs/Action.md | 186 - .../generated/gateway-client/docs/AdminApi.md | 410 --- .../go/generated/gateway-client/docs/Asset.md | 171 - .../gateway-client/docs/AuthzJwtClaim.md | 11 - .../gateway-client/docs/AuthzScope.md | 13 - .../gateway-client/docs/BridgeInfo.md | 56 - .../gateway-client/docs/Cancel200Response.md | 72 - .../gateway-client/docs/CancelRequest.md | 51 - .../gateway-client/docs/CancelResponse.md | 72 - .../go/generated/gateway-client/docs/Chain.md | 114 - .../gateway-client/docs/Chains1Inner.md | 114 - .../docs/Continue200Response.md | 51 - .../gateway-client/docs/ContinueRequest.md | 72 - .../gateway-client/docs/ContinueResponse.md | 51 - .../gateway-client/docs/CredentialProfile.md | 15 - .../gateway-client/docs/DLTProtocol.md | 13 - .../generated/gateway-client/docs/Estimate.md | 290 -- .../generated/gateway-client/docs/FeeCost.md | 160 - .../generated/gateway-client/docs/GasCost.md | 212 -- .../docs/GetAudit200Response.md | 108 - .../gateway-client/docs/GetAuditRequest.md | 108 - .../gateway-client/docs/GetAuditResponse.md | 108 - .../docs/GetHealthCheck200Response.md | 56 - .../docs/GetRoutes200Response.md | 51 - .../docs/GetRoutes200ResponseRoutesInner.md | 457 --- ...etRoutes200ResponseRoutesInnerFromToken.md | 265 -- ...0ResponseRoutesInnerFromTokenExtensions.md | 82 - ...InnerFromTokenExtensionsBridgeInfoValue.md | 56 - ...etRoutes200ResponseRoutesInnerInsurance.md | 82 - ...tRoutes200ResponseRoutesInnerStepsInner.md | 238 -- ...s200ResponseRoutesInnerStepsInnerAction.md | 186 - ...00ResponseRoutesInnerStepsInnerEstimate.md | 290 -- ...tesInnerStepsInnerEstimateFeeCostsInner.md | 160 - ...tesInnerStepsInnerEstimateGasCostsInner.md | 212 -- ...esponseRoutesInnerStepsInnerToolDetails.md | 93 - .../docs/HealthCheckResponse.md | 56 - .../gateway-client/docs/IncludedStep.md | 238 -- .../gateway-client/docs/Insurance.md | 82 - .../gateway-client/docs/IntegrationDetails.md | 93 - .../gateway-client/docs/Pause200Response.md | 51 - .../gateway-client/docs/PauseRequest.md | 82 - .../go/generated/gateway-client/docs/Route.md | 457 --- .../gateway-client/docs/RoutesResponse.md | 51 - .../gateway-client/docs/StatusRequest.md | 51 - .../gateway-client/docs/StatusResponse.md | 177 - .../go/generated/gateway-client/docs/Token.md | 265 -- .../docs/Transact200Response.md | 72 - .../docs/Transact200ResponseStatusResponse.md | 177 - ...0ResponseStatusResponseDestinationChain.md | 102 - ...act200ResponseStatusResponseOriginChain.md | 102 - .../docs/TransactDefaultResponse.md | 135 - .../gateway-client/docs/TransactRequest.md | 245 -- .../docs/TransactRequestSourceAsset.md | 171 - .../gateway-client/docs/TransactResponse.md | 72 - .../gateway-client/docs/TransactionApi.md | 283 -- .../main/go/generated/gateway-client/go.mod | 6 - .../generated/gateway-client/model_action.go | 310 -- .../generated/gateway-client/model_asset.go | 279 -- .../gateway-client/model_authz_jwt_claim.go | 109 - .../gateway-client/model_authz_scope.go | 111 - .../gateway-client/model_bridge_info.go | 127 - .../model_cancel_200_response.go | 145 - .../gateway-client/model_cancel_request.go | 118 - .../gateway-client/model_cancel_response.go | 145 - .../generated/gateway-client/model_chain.go | 202 -- .../gateway-client/model_chains_1_inner.go | 202 -- .../model_continue_200_response.go | 117 - .../gateway-client/model_continue_request.go | 146 - .../gateway-client/model_continue_response.go | 117 - .../model_credential_profile.go | 113 - .../gateway-client/model_dlt_protocol.go | 111 - .../gateway-client/model_estimate.go | 460 --- .../gateway-client/model_fee_cost.go | 275 -- .../gateway-client/model_gas_cost.go | 348 -- .../model_get_audit_200_response.go | 202 -- .../gateway-client/model_get_audit_request.go | 202 -- .../model_get_audit_response.go | 202 -- .../model_get_health_check_200_response.go | 126 - .../model_get_routes_200_response.go | 118 - ...el_get_routes_200_response_routes_inner.go | 689 ---- ...es_200_response_routes_inner_from_token.go | 414 --- ...onse_routes_inner_from_token_extensions.go | 163 - ...from_token_extensions_bridge_info_value.go | 127 - ...tes_200_response_routes_inner_insurance.go | 164 - ...s_200_response_routes_inner_steps_inner.go | 382 -- ...esponse_routes_inner_steps_inner_action.go | 310 -- ...ponse_routes_inner_steps_inner_estimate.go | 460 --- ...er_steps_inner_estimate_fee_costs_inner.go | 275 -- ...er_steps_inner_estimate_gas_costs_inner.go | 348 -- ...e_routes_inner_steps_inner_tool_details.go | 174 - .../model_health_check_response.go | 126 - .../gateway-client/model_included_step.go | 382 -- .../gateway-client/model_insurance.go | 164 - .../model_integration_details.go | 174 - .../model_pause_200_response.go | 117 - .../gateway-client/model_pause_request.go | 162 - .../gateway-client/model_pause_response.go | 117 - .../generated/gateway-client/model_route.go | 689 ---- .../gateway-client/model_routes_response.go | 118 - .../gateway-client/model_status_request.go | 118 - .../gateway-client/model_status_response.go | 280 -- .../generated/gateway-client/model_token.go | 414 --- .../model_transact_200_response.go | 145 - ...l_transact_200_response_status_response.go | 280 -- ...ponse_status_response_destination_chain.go | 164 - ...0_response_status_response_origin_chain.go | 164 - .../model_transact_default_response.go | 230 -- .../gateway-client/model_transact_request.go | 369 -- .../model_transact_request_source_asset.go | 279 -- .../go/generated/gateway-client/response.go | 47 - .../gateway-client/test/api_admin_test.go | 85 - .../test/api_transaction_test.go | 73 - .../main/go/generated/gateway-client/utils.go | 347 -- .../go-client/.openapi-generator/FILES | 37 - .../go-client/.openapi-generator/VERSION | 1 - .../generated/openapi/go-client/.travis.yml | 8 - .../go/generated/openapi/go-client/go.mod | 6 - .../go/generated/openapi/go-client/go.sum | 11 - .../go-client/test/api_default_test.go | 224 -- .../src/main/json/openapi-blo-bundled.json | 8 +- .../transaction/transact-handler-service.ts | 12 +- .../src/main/typescript/core/session-utils.ts | 20 +- .../server/stage1-server-service.ts | 4 +- .../gateway-client/typescript-axios/api.ts | 2 +- .../src/main/yml/bol/openapi-blo-bundled.yml | 8 +- .../src/main/yml/bol/schemas.yml | 4 +- ...satp-end-to-end-transfer-1-gateway.test.ts | 4 +- ...to-end-transfer-2-gateways-openapi.test.ts | 4 +- ...atp-end-to-end-transfer-2-gateways.test.ts | 4 +- yarn.lock | 1209 ++++-- 253 files changed, 11868 insertions(+), 28102 deletions(-) create mode 100644 examples/cactus-example-cbdc-bridging-backend/openapitools.json rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/.gitignore (100%) rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/.openapi-generator-ignore (100%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/FILES create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/VERSION rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/.travis.yml (100%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/README.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api/openapi.yaml create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_approve.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_amount_approved.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_balance.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_sessions_references.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_mint.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transact.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transfer.go rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/client.go (90%) rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/configuration.go (97%) rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/docs/APIError.md (100%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/ApproveAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/ApproveRequest.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/AssetType.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/BalanceResponse.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetAmountApprovedAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetBalanceAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetSessionsReferencesAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintRequest.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/SessionReference.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/StatusResponse.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactRequest.md rename packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseResponse.md => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactResponse.md (59%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferAPI.md create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferRequest.md rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/git_push.sh (95%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/go.mod rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/go.sum (100%) rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/model_api_error.go (80%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_approve_request.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_asset_type.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_balance_response.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_mint_request.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_session_reference.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_status_response.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_request.go rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/model_transact_response.go (51%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transfer_request.go rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/response.go (92%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_approve_test.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_amount_approved_test.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_balance_test.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_sessions_references_test.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_mint_test.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transact_test.go create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transfer_test.go rename {packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client => examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi}/utils.go (94%) create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/json/openapi-bundled.json create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.gitignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.npmignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/api.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/base.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/common.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/configuration.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/git_push.sh create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/index.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/types.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/approve-endpoint.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-all-session-data-endpoints.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-amount-approved-endpoint.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-balance-endpoint.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/mint-endpoint.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transact-endpoint.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transfer-endpoint.ts create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi-bundled.yml create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi.yml create mode 100644 examples/cactus-example-cbdc-bridging-backend/src/main/yml/schemas.yml rename examples/{cactus-example-cbdc-bridging-frontend => cactus-example-cbdc-bridging-backend}/src/ontology/besu-erc20-ontology.json (100%) rename examples/{cactus-example-cbdc-bridging-frontend => cactus-example-cbdc-bridging-backend}/src/ontology/fabric-erc20-ontology.json (100%) create mode 100644 examples/cactus-example-cbdc-bridging-frontend/config-overrides.js delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/api-calls/ledgers-api.tsx rename examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/{PermissionDialog.tsx => ApprovalDialog.tsx} (87%) delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/crypto-material/crypto-material.json delete mode 100644 examples/cactus-example-cbdc-bridging-frontend/src/models/SessionReference.tsx create mode 100644 examples/cactus-example-cbdc-bridging-frontend/webpack.config.js create mode 100644 packages/cactus-plugin-satp-hermes/config_example.json delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/FILES delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator/VERSION delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/README.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api/openapi.yaml delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_admin.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_transaction.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/client.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/configuration.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Action.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzJwtClaim.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzScope.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/BridgeInfo.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Cancel200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelRequest.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chain.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chains1Inner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Continue200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueRequest.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CredentialProfile.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/DLTProtocol.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Estimate.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/FeeCost.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GasCost.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAudit200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditRequest.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetHealthCheck200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromToken.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerInsurance.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/HealthCheckResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IncludedStep.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Insurance.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IntegrationDetails.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Pause200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseRequest.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Route.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/RoutesResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusRequest.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Token.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200Response.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseDestinationChain.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseOriginChain.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactDefaultResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactResponse.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.mod delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_action.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_jwt_claim.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_scope.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_bridge_info.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_request.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chain.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chains_1_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_request.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_credential_profile.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_dlt_protocol.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_estimate.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_fee_cost.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_gas_cost.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_request.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_health_check_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_insurance.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_action.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_health_check_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_included_step.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_insurance.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_integration_details.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_request.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_route.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_routes_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_request.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_token.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_destination_chain.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_origin_chain.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_default_response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/response.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/utils.go delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go diff --git a/.eslintignore b/.eslintignore index 90af78ce16..18915c6022 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,6 +10,8 @@ weaver/common/protos-js/**/*_pb.js **/src/main/typescript/generated/proto/** **/src/main/typescript/generated/wasm-pack/** +packages/cactus-plugin-satp-hermes/src/main/typescript/generated/* + examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/BusinessLogicBase.ts examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/LedgerOperation.ts examples/cactus-common-example-server/src/main/typescript/business-logic-plugin/app.ts diff --git a/examples/cactus-example-cbdc-bridging-backend/Dockerfile b/examples/cactus-example-cbdc-bridging-backend/Dockerfile index b6e51b97c6..9575957cfb 100644 --- a/examples/cactus-example-cbdc-bridging-backend/Dockerfile +++ b/examples/cactus-example-cbdc-bridging-backend/Dockerfile @@ -46,8 +46,6 @@ COPY ./examples/cactus-example-cbdc-bridging-backend/healthcheck.sh / ENV API_HOST=localhost ENV API_SERVER_1_PORT=4000 ENV API_SERVER_2_PORT=4100 -ENV API_HOST_FRONTEND=localhost -ENV API_PORT_FRONTEND=2000 ENV API_GATEWAY_1_BLO_PORT=4010 ENV API_GATEWAY_2_BLO_PORT=4110 ENV API_GATEWAY_1_CLIENT_PORT=3011 diff --git a/examples/cactus-example-cbdc-bridging-backend/README.md b/examples/cactus-example-cbdc-bridging-backend/README.md index c401469412..ed1a9523da 100644 --- a/examples/cactus-example-cbdc-bridging-backend/README.md +++ b/examples/cactus-example-cbdc-bridging-backend/README.md @@ -6,14 +6,14 @@ On the terminal, issue the following commands in the project root: -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` +1. `yarn run configure` +2. `yarn run start:example-cbdc-bridging-app` Wait for the output to show the message `CbdcBridgingApp running...` In a second terminal run the following commands from the project root: 3. `cd examples/cactus-example-cbdc-bridging-backend` -4. `npm run test` +4. `yarn run test` ## Running the Example Application Locally @@ -21,16 +21,31 @@ In a second terminal run the following commands from the project root: On the terminal, issue the following commands: -1. `npm run configure` -2. `npm run start:example-cbdc-bridging-app` +1. `yarn run configure` +2. `yarn run start:example-cbdc-bridging-app` Wait for the output to show the message `CbdcBridgingApp running...` +## Running with a different configuration + +There is a `process.env` file where you can change the following variables: +``` +API_HOST=localhost // the path where the backend will be running +API_SERVER_1_PORT=4000 // port assign to the FabricConnectorApi +API_SERVER_2_PORT=4100 // port assign to the BesuConnectorApi +API_GATEWAY_1_BLO_PORT=4010 // port assign to the Gateway1's OpenApi Service +API_GATEWAY_2_BLO_PORT=4110 // port assign to the Gateway2's SATP Service +API_GATEWAY_1_CLIENT_PORT=3011 // port assign to the Gateway1's SATP Client Service +API_GATEWAY_2_CLIENT_PORT=3111 // port assign to the Gateway2's SATP Client Service +API_GATEWAY_1_SERVER_PORT=3010 // port assign to the Gateway1's SATP Server Service +API_GATEWAY_2_SERVER_PORT=3110 // port assign to the Gateway2's SATP Server Service +``` + ## Debugging the Example Application Locally On the terminal, issue the following commands (steps 1 to 6) and then perform the rest of the steps manually. -1. `npm run configure` +1. `yarn run configure` 2. Locate the `.vscode/template.launch.json` file 3. Within that file locate the entry named `"Example: CBDC Bridging Fabric-EVM App"` 4. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file diff --git a/examples/cactus-example-cbdc-bridging-backend/openapitools.json b/examples/cactus-example-cbdc-bridging-backend/openapitools.json new file mode 100644 index 0000000000..2f4612ceda --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.8.0" + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index 79d983f25e..08466846b4 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -28,12 +28,15 @@ "contributors": [ { "name": "Eduardo Vasques", - "email": "eduardovasques10@tecnico.ulisboa.pt", - "url": "https://example.com" + "email": "eduardovasques10@tecnico.ulisboa.pt" }, { "name": "André Augusto", "email": "andre.augusto@tecnico.ulisboa.pt" + }, + { + "name": "Carlos Amaro", + "email": "carlosrscamaro@tecnico.ulisboa.pt" } ], "main": "dist/lib/main/typescript/index.js", @@ -46,16 +49,24 @@ "scripts": { "build:dev:backend:postbuild": "mkdir -p ./dist/lib/fabric-contracts && cp -r ./src/fabric-contracts/* ./dist/lib/fabric-contracts/", "forge": "forge build ./src/solidity/main/*.sol --out ./src/solidity/main/generated", - "forge:all": "yarn run --top-level run-s 'forge' 'forge:test'", + "forge:all": "run-s 'forge' 'forge:test'", "forge:test": "forge build ./src/solidity/test/*.sol --out ./src/solidity/test/generated", "solidity": "hardhat compile", - "start": "node dist/lib/main/typescript/cbdc-bridging-app-cli.js dotenv_config_path=./process.env", + "start": "npx ts-node ./src/main/typescript/cbdc-bridging-app-cli.ts dotenv_config_path=./process.env", "test": "nyc cucumber-js ./src/test/typescript/cucumber/features/*.feature --require-module ts-node/register --require './src/test/typescript/cucumber/*/*.ts'", "watch": "npm-watch", "webpack": "npm-run-all webpack:dev", "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", - "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js" + "webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js", + "codegen": "run-p 'codegen:*'", + "codegen:openapi": "npm run generate-sdk", + "generate-sdk": "run-p 'generate-sdk:*'", + "generate-sdk:typescript-axios": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/openapi-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", + "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/openapi.yml -g go -o ./src/main/go/generated/openapi --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated", + "bundle-openapi-yaml": "swagger-cli bundle ./src/main/yml/openapi.yml -o ./src/main/yml/openapi-bundled.yml -r -t yaml", + "bundle-openapi-json": "swagger-cli bundle ./src/main/yml/openapi.yml -o ./src/main/json/openapi-bundled.json -r -t json", + "lint:oapi": "vacuum lint -d -e ./src/main/yml/openapi-bundled.yml" }, "dependencies": { "@foundry-rs/hardhat-forge": "0.1.17", @@ -92,23 +103,28 @@ "typescript-optional": "2.0.1", "uuid": "9.0.1", "web3-core": "1.10.1", - "web3-utils": "1.10.1" + "web3-utils": "1.10.1", + "webpack": "^5.94.0" }, "devDependencies": { + "@apidevtools/swagger-cli": "4.0.4", "@types/crypto-js": "4.1.1", "@types/cucumber": "4.0.4", "@types/express": "5.0.0", "@types/express-jwt": "6.0.2", "@types/fs-extra": "9.0.13", "@types/node": "18.11.9", + "@types/swagger-ui-express": "4.1.6", "@types/uuid": "9.0.8", "cucumber": "5.0.3", "ethereum-abi-types-generator": "1.3.4", "hardhat": "2.17.2", "http-status-codes": "2.1.4", "jose": "4.15.5", + "npm-run-all": "4.1.5", "remix-tests": "0.1.34", - "ts-node": "7.0.1" + "swagger-cli": "4.0.4", + "ts-node": "10.9.2" }, "engines": { "node": ">=18", diff --git a/examples/cactus-example-cbdc-bridging-backend/process.env b/examples/cactus-example-cbdc-bridging-backend/process.env index ef94b13892..1e16235f2a 100644 --- a/examples/cactus-example-cbdc-bridging-backend/process.env +++ b/examples/cactus-example-cbdc-bridging-backend/process.env @@ -1,8 +1,6 @@ API_HOST=localhost API_SERVER_1_PORT=4000 API_SERVER_2_PORT=4100 -API_HOST_FRONTEND=localhost -API_PORT_FRONTEND=2000 API_GATEWAY_1_BLO_PORT=4010 API_GATEWAY_2_BLO_PORT=4110 API_GATEWAY_1_CLIENT_PORT=3011 diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.gitignore similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.gitignore rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.gitignore diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator-ignore b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator-ignore similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.openapi-generator-ignore rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator-ignore diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/FILES b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/FILES new file mode 100644 index 0000000000..fd50dad55e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/FILES @@ -0,0 +1,53 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_approve.go +api_get_amount_approved.go +api_get_balance.go +api_get_sessions_references.go +api_mint.go +api_transact.go +api_transfer.go +client.go +configuration.go +docs/APIError.md +docs/ApproveAPI.md +docs/ApproveRequest.md +docs/AssetType.md +docs/BalanceResponse.md +docs/GetAmountApprovedAPI.md +docs/GetBalanceAPI.md +docs/GetSessionsReferencesAPI.md +docs/MintAPI.md +docs/MintRequest.md +docs/SessionReference.md +docs/StatusResponse.md +docs/TransactAPI.md +docs/TransactRequest.md +docs/TransactResponse.md +docs/TransferAPI.md +docs/TransferRequest.md +git_push.sh +go.mod +go.sum +model_api_error.go +model_approve_request.go +model_asset_type.go +model_balance_response.go +model_mint_request.go +model_session_reference.go +model_status_response.go +model_transact_request.go +model_transact_response.go +model_transfer_request.go +response.go +test/api_approve_test.go +test/api_get_amount_approved_test.go +test/api_get_balance_test.go +test/api_get_sessions_references_test.go +test/api_mint_test.go +test/api_transact_test.go +test/api_transfer_test.go +utils.go diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/VERSION b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/VERSION new file mode 100644 index 0000000000..09a6d30847 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.8.0 diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.travis.yml b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.travis.yml similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/.travis.yml rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/.travis.yml diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/README.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/README.md new file mode 100644 index 0000000000..f8f640db66 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/README.md @@ -0,0 +1,129 @@ +# Go API client for generated + +Cactus-Example + + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 0.0.2 +- Package version: v0.0.1 +- Generator version: 7.8.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import generated "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `generated.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), generated.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `generated.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), generated.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `generated.ContextOperationServerIndices` and `generated.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), generated.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), generated.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ApproveAPI* | [**Approve**](docs/ApproveAPI.md#approve) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens | Submit a transaction intent +*GetAmountApprovedAPI* | [**GetAmountApproved**](docs/GetAmountApprovedAPI.md#getamountapproved) | **Get** /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved | Get the amount approved for a transaction +*GetBalanceAPI* | [**GetBalance**](docs/GetBalanceAPI.md#getbalance) | **Get** /api/v1/@hyperledger/cactus-example-cbdc/get-balance | +*GetSessionsReferencesAPI* | [**GetSessionsReferences**](docs/GetSessionsReferencesAPI.md#getsessionsreferences) | **Get** /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references | Get SATP current sessions data +*MintAPI* | [**Mint**](docs/MintAPI.md#mint) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens | Submit a transaction intent +*TransactAPI* | [**Transact**](docs/TransactAPI.md#transact) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/transact | Submit a transaction intent +*TransferAPI* | [**Transfer**](docs/TransferAPI.md#transfer) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens | Submit a transaction intent + + +## Documentation For Models + + - [APIError](docs/APIError.md) + - [ApproveRequest](docs/ApproveRequest.md) + - [AssetType](docs/AssetType.md) + - [BalanceResponse](docs/BalanceResponse.md) + - [MintRequest](docs/MintRequest.md) + - [SessionReference](docs/SessionReference.md) + - [StatusResponse](docs/StatusResponse.md) + - [TransactRequest](docs/TransactRequest.md) + - [TransactResponse](docs/TransactResponse.md) + - [TransferRequest](docs/TransferRequest.md) + + +## Documentation For Authorization + +Endpoints do not require authorization. + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api/openapi.yaml b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api/openapi.yaml new file mode 100644 index 0000000000..be0f773aa7 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api/openapi.yaml @@ -0,0 +1,497 @@ +openapi: 3.0.3 +info: + contact: + name: Hyperledger Cacti + description: | + Cactus-Example + title: CBDC-example backend API + version: 0.0.2 + x-logo: + altText: Cacti logo + backgroundColor: '#fafafa' + url: https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png +servers: +- url: / +tags: +- description: API endpoints for interacting with blockchains via gateways + name: transaction +- description: API endpoints for fetching information on SATP sessions + name: admin +paths: + /api/v1/@hyperledger/cactus-example-cbdc/transact: + post: + description: Allows users to queue intents for transactions based on specified + parameters. + operationId: Transact + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TransactResponse' + description: Transaction successfully queued + default: + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + description: An error occurred + summary: Submit a transaction intent + tags: + - transact + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/transact + /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references: + get: + description: Retrieve the status of a SATP sessions of a gateway + operationId: GetSessionsReferences + parameters: + - description: Unique identifier for the session. + explode: true + in: query + name: Ledger + required: false + schema: + enum: + - FABRIC + - BESU + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SessionsReferencesResponse' + description: OK + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + summary: Get SATP current sessions data + tags: + - get-sessions-references + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references + /api/v1/@hyperledger/cactus-example-cbdc/get-balance: + get: + operationId: GetBalance + parameters: + - explode: true + in: query + name: user + required: false + schema: + type: string + style: form + - explode: true + in: query + name: chain + required: false + schema: + enum: + - FABRIC + - BESU + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceResponse' + description: OK + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + tags: + - get-balance + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-balance + /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens: + post: + description: Allows users to queue intents for transactions based on specified + parameters. + operationId: Mint + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MintRequest' + required: true + responses: + "200": + description: Transaction successfully queued + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + description: An error occurred + summary: Submit a transaction intent + tags: + - mint + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens + /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens: + post: + description: Approves a certain amount to be transferred from the user's account + by the bridge. + operationId: Approve + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApproveRequest' + required: true + responses: + "200": + description: Transaction successfully queued + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + description: An error occurred + summary: Submit a transaction intent + tags: + - approve + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens + /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved: + get: + description: Get the amount approved for a transaction + operationId: GetAmountApproved + parameters: + - explode: true + in: query + name: user + required: false + schema: + type: string + style: form + - explode: true + in: query + name: chain + required: false + schema: + enum: + - FABRIC + - BESU + type: string + style: form + responses: + "200": + content: + application/json: + schema: + example: "100" + type: string + description: OK + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + summary: Get the amount approved for a transaction + tags: + - get-amount-approved + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved + /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens: + post: + description: Allows users to queue intents for transactions based on specified + parameters. + operationId: Transfer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRequest' + required: true + responses: + "200": + description: Transaction successfully queued + "400": + description: Bad request + "404": + description: Transaction not found + "500": + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + description: An error occurred + summary: Submit a transaction intent + tags: + - transfer + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens +components: + schemas: + TransactRequest: + description: "Request schema for initiating a transaction. Includes details\ + \ such as the transaction context, mode (data or transfer), payload, and information\ + \ about the source and receiver DLT networks." + example: + sourceChain: + assetType: FABRIC + amount: "100" + receiver: user2 + sender: user1 + receiverChain: + assetType: FABRIC + properties: + sender: + example: user1 + type: string + receiver: + example: user2 + type: string + sourceChain: + $ref: '#/components/schemas/AssetType' + receiverChain: + $ref: '#/components/schemas/AssetType' + amount: + example: "100" + type: string + required: + - amount + - receiver + - receiverChain + - sender + - sourceChain + type: object + AssetType: + description: Enum for the type of asset being transferred. + example: + assetType: FABRIC + properties: + assetType: + enum: + - FABRIC + - BESU + type: string + type: object + TransactResponse: + description: Response schema for a transaction request. + example: + statusResponse: + sessionID: 123e4567-e89b-12d3-a456-426614174000 + status: NOT_FOUND + properties: + statusResponse: + $ref: '#/components/schemas/StatusResponse' + required: + - statusResponse + type: object + StatusResponse: + description: Response schema for a transaction status request. + example: + sessionID: 123e4567-e89b-12d3-a456-426614174000 + status: NOT_FOUND + properties: + sessionID: + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + status: + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + type: string + required: + - status + type: object + APIError: + description: An Error + example: + code: 16384 + type: bad-request + message: Oops there's been an internal error handling + status: 500 + timestamp: 2021-07-21T17:32:28Z + properties: + type: + description: HTTP error type + example: bad-request + type: string + code: + description: Numeric error code + example: 16384 + type: integer + status: + description: HTTP status of the error + example: 500 + type: integer + message: + description: Long error description + example: Oops there's been an internal error handling + type: string + timestamp: + description: Timestamp of the error + example: 2021-07-21T17:32:28Z + type: string + required: + - code + - message + - status + - timestamp + - type + type: object + x-category: response + x-go-type: ApiError + x-go-name: ApiError + SessionsReferencesResponse: + description: Response schema for a transaction status request. + items: + $ref: '#/components/schemas/SessionReference' + type: array + SessionReference: + example: + receiverLedger: receiverLedger + id: 123e4567-e89b-12d3-a456-426614174000 + sourceLedger: sourceLedger + status: status + properties: + id: + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + status: + type: string + sourceLedger: + type: string + receiverLedger: + type: string + required: + - id + - receiverLedger + - sourceLedger + - status + type: object + BalanceResponse: + description: Response schema for an amount request. + example: + amount: "100" + properties: + amount: + example: "100" + type: string + required: + - amount + type: object + MintRequest: + description: Request schema for minting an asset. + example: + ledger: + assetType: FABRIC + amount: "100" + user: user1 + properties: + user: + example: user1 + type: string + amount: + example: "100" + type: string + ledger: + $ref: '#/components/schemas/AssetType' + required: + - amount + - ledger + - user + type: object + ApproveRequest: + description: Request schema for approving a transaction. + example: + ledger: + assetType: FABRIC + amount: "100" + user: user1 + properties: + user: + example: user1 + type: string + amount: + example: "100" + type: string + ledger: + $ref: '#/components/schemas/AssetType' + required: + - amount + - ledger + - user + type: object + TransferRequest: + description: Request schema for transferring an asset. + example: + sourceChain: + assetType: FABRIC + amount: "100" + receiverChain: + assetType: FABRIC + from: user1 + to: user2 + properties: + from: + example: user1 + type: string + to: + example: user2 + type: string + sourceChain: + $ref: '#/components/schemas/AssetType' + receiverChain: + $ref: '#/components/schemas/AssetType' + amount: + example: "100" + type: string + required: + - amount + - from + - receiverChain + - sourceChain + - to + type: object diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_approve.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_approve.go new file mode 100644 index 0000000000..4d5385f513 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_approve.go @@ -0,0 +1,146 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type ApproveAPI interface { + + /* + Approve Submit a transaction intent + + Approves a certain amount to be transferred from the user's account by the bridge. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiApproveRequest + */ + Approve(ctx context.Context) ApiApproveRequest + + // ApproveExecute executes the request + ApproveExecute(r ApiApproveRequest) (*http.Response, error) +} + +// ApproveAPIService ApproveAPI service +type ApproveAPIService service + +type ApiApproveRequest struct { + ctx context.Context + ApiService ApproveAPI + approveRequest *ApproveRequest +} + +func (r ApiApproveRequest) ApproveRequest(approveRequest ApproveRequest) ApiApproveRequest { + r.approveRequest = &approveRequest + return r +} + +func (r ApiApproveRequest) Execute() (*http.Response, error) { + return r.ApiService.ApproveExecute(r) +} + +/* +Approve Submit a transaction intent + +Approves a certain amount to be transferred from the user's account by the bridge. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiApproveRequest +*/ +func (a *ApproveAPIService) Approve(ctx context.Context) ApiApproveRequest { + return ApiApproveRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *ApproveAPIService) ApproveExecute(r ApiApproveRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApproveAPIService.Approve") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.approveRequest == nil { + return nil, reportError("approveRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.approveRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_amount_approved.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_amount_approved.go new file mode 100644 index 0000000000..2758f8d1be --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_amount_approved.go @@ -0,0 +1,157 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type GetAmountApprovedAPI interface { + + /* + GetAmountApproved Get the amount approved for a transaction + + Get the amount approved for a transaction + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAmountApprovedRequest + */ + GetAmountApproved(ctx context.Context) ApiGetAmountApprovedRequest + + // GetAmountApprovedExecute executes the request + // @return string + GetAmountApprovedExecute(r ApiGetAmountApprovedRequest) (string, *http.Response, error) +} + +// GetAmountApprovedAPIService GetAmountApprovedAPI service +type GetAmountApprovedAPIService service + +type ApiGetAmountApprovedRequest struct { + ctx context.Context + ApiService GetAmountApprovedAPI + user *string + chain *string +} + +func (r ApiGetAmountApprovedRequest) User(user string) ApiGetAmountApprovedRequest { + r.user = &user + return r +} + +func (r ApiGetAmountApprovedRequest) Chain(chain string) ApiGetAmountApprovedRequest { + r.chain = &chain + return r +} + +func (r ApiGetAmountApprovedRequest) Execute() (string, *http.Response, error) { + return r.ApiService.GetAmountApprovedExecute(r) +} + +/* +GetAmountApproved Get the amount approved for a transaction + +Get the amount approved for a transaction + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAmountApprovedRequest +*/ +func (a *GetAmountApprovedAPIService) GetAmountApproved(ctx context.Context) ApiGetAmountApprovedRequest { + return ApiGetAmountApprovedRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *GetAmountApprovedAPIService) GetAmountApprovedExecute(r ApiGetAmountApprovedRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GetAmountApprovedAPIService.GetAmountApproved") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.user != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "form", "") + } + if r.chain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "chain", r.chain, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_balance.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_balance.go new file mode 100644 index 0000000000..44b8a93815 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_balance.go @@ -0,0 +1,153 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type GetBalanceAPI interface { + + /* + GetBalance Method for GetBalance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetBalanceRequest + */ + GetBalance(ctx context.Context) ApiGetBalanceRequest + + // GetBalanceExecute executes the request + // @return BalanceResponse + GetBalanceExecute(r ApiGetBalanceRequest) (*BalanceResponse, *http.Response, error) +} + +// GetBalanceAPIService GetBalanceAPI service +type GetBalanceAPIService service + +type ApiGetBalanceRequest struct { + ctx context.Context + ApiService GetBalanceAPI + user *string + chain *string +} + +func (r ApiGetBalanceRequest) User(user string) ApiGetBalanceRequest { + r.user = &user + return r +} + +func (r ApiGetBalanceRequest) Chain(chain string) ApiGetBalanceRequest { + r.chain = &chain + return r +} + +func (r ApiGetBalanceRequest) Execute() (*BalanceResponse, *http.Response, error) { + return r.ApiService.GetBalanceExecute(r) +} + +/* +GetBalance Method for GetBalance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetBalanceRequest +*/ +func (a *GetBalanceAPIService) GetBalance(ctx context.Context) ApiGetBalanceRequest { + return ApiGetBalanceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return BalanceResponse +func (a *GetBalanceAPIService) GetBalanceExecute(r ApiGetBalanceRequest) (*BalanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BalanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GetBalanceAPIService.GetBalance") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/get-balance" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.user != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user", r.user, "form", "") + } + if r.chain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "chain", r.chain, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_sessions_references.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_sessions_references.go new file mode 100644 index 0000000000..0f26ef410d --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_get_sessions_references.go @@ -0,0 +1,149 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type GetSessionsReferencesAPI interface { + + /* + GetSessionsReferences Get SATP current sessions data + + Retrieve the status of a SATP sessions of a gateway + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetSessionsReferencesRequest + */ + GetSessionsReferences(ctx context.Context) ApiGetSessionsReferencesRequest + + // GetSessionsReferencesExecute executes the request + // @return []SessionReference + GetSessionsReferencesExecute(r ApiGetSessionsReferencesRequest) ([]SessionReference, *http.Response, error) +} + +// GetSessionsReferencesAPIService GetSessionsReferencesAPI service +type GetSessionsReferencesAPIService service + +type ApiGetSessionsReferencesRequest struct { + ctx context.Context + ApiService GetSessionsReferencesAPI + ledger *string +} + +// Unique identifier for the session. +func (r ApiGetSessionsReferencesRequest) Ledger(ledger string) ApiGetSessionsReferencesRequest { + r.ledger = &ledger + return r +} + +func (r ApiGetSessionsReferencesRequest) Execute() ([]SessionReference, *http.Response, error) { + return r.ApiService.GetSessionsReferencesExecute(r) +} + +/* +GetSessionsReferences Get SATP current sessions data + +Retrieve the status of a SATP sessions of a gateway + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetSessionsReferencesRequest +*/ +func (a *GetSessionsReferencesAPIService) GetSessionsReferences(ctx context.Context) ApiGetSessionsReferencesRequest { + return ApiGetSessionsReferencesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []SessionReference +func (a *GetSessionsReferencesAPIService) GetSessionsReferencesExecute(r ApiGetSessionsReferencesRequest) ([]SessionReference, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []SessionReference + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GetSessionsReferencesAPIService.GetSessionsReferences") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.ledger != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "Ledger", r.ledger, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_mint.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_mint.go new file mode 100644 index 0000000000..d3c8aff58e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_mint.go @@ -0,0 +1,146 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type MintAPI interface { + + /* + Mint Submit a transaction intent + + Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiMintRequest + */ + Mint(ctx context.Context) ApiMintRequest + + // MintExecute executes the request + MintExecute(r ApiMintRequest) (*http.Response, error) +} + +// MintAPIService MintAPI service +type MintAPIService service + +type ApiMintRequest struct { + ctx context.Context + ApiService MintAPI + mintRequest *MintRequest +} + +func (r ApiMintRequest) MintRequest(mintRequest MintRequest) ApiMintRequest { + r.mintRequest = &mintRequest + return r +} + +func (r ApiMintRequest) Execute() (*http.Response, error) { + return r.ApiService.MintExecute(r) +} + +/* +Mint Submit a transaction intent + +Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiMintRequest +*/ +func (a *MintAPIService) Mint(ctx context.Context) ApiMintRequest { + return ApiMintRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *MintAPIService) MintExecute(r ApiMintRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MintAPIService.Mint") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mintRequest == nil { + return nil, reportError("mintRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mintRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transact.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transact.go new file mode 100644 index 0000000000..d8c09b0e0c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transact.go @@ -0,0 +1,158 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type TransactAPI interface { + + /* + Transact Submit a transaction intent + + Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransactRequest + */ + Transact(ctx context.Context) ApiTransactRequest + + // TransactExecute executes the request + // @return TransactResponse + TransactExecute(r ApiTransactRequest) (*TransactResponse, *http.Response, error) +} + +// TransactAPIService TransactAPI service +type TransactAPIService service + +type ApiTransactRequest struct { + ctx context.Context + ApiService TransactAPI + transactRequest *TransactRequest +} + +func (r ApiTransactRequest) TransactRequest(transactRequest TransactRequest) ApiTransactRequest { + r.transactRequest = &transactRequest + return r +} + +func (r ApiTransactRequest) Execute() (*TransactResponse, *http.Response, error) { + return r.ApiService.TransactExecute(r) +} + +/* +Transact Submit a transaction intent + +Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransactRequest +*/ +func (a *TransactAPIService) Transact(ctx context.Context) ApiTransactRequest { + return ApiTransactRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TransactResponse +func (a *TransactAPIService) TransactExecute(r ApiTransactRequest) (*TransactResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TransactResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactAPIService.Transact") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/transact" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.transactRequest == nil { + return localVarReturnValue, nil, reportError("transactRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.transactRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transfer.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transfer.go new file mode 100644 index 0000000000..2ccd78c351 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/api_transfer.go @@ -0,0 +1,146 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +type TransferAPI interface { + + /* + Transfer Submit a transaction intent + + Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransferRequest + */ + Transfer(ctx context.Context) ApiTransferRequest + + // TransferExecute executes the request + TransferExecute(r ApiTransferRequest) (*http.Response, error) +} + +// TransferAPIService TransferAPI service +type TransferAPIService service + +type ApiTransferRequest struct { + ctx context.Context + ApiService TransferAPI + transferRequest *TransferRequest +} + +func (r ApiTransferRequest) TransferRequest(transferRequest TransferRequest) ApiTransferRequest { + r.transferRequest = &transferRequest + return r +} + +func (r ApiTransferRequest) Execute() (*http.Response, error) { + return r.ApiService.TransferExecute(r) +} + +/* +Transfer Submit a transaction intent + +Allows users to queue intents for transactions based on specified parameters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransferRequest +*/ +func (a *TransferAPIService) Transfer(ctx context.Context) ApiTransferRequest { + return ApiTransferRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *TransferAPIService) TransferExecute(r ApiTransferRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransferAPIService.Transfer") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.transferRequest == nil { + return nil, reportError("transferRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.transferRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v APIError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/client.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/client.go similarity index 90% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/client.go rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/client.go index e2adcc5c7f..36e187386d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/client.go +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/client.go @@ -1,14 +1,14 @@ /* -Hyperledger Cactus Plugin - Odap Hermes +CBDC-example backend API -Implementation for Odap and Hermes +Cactus-Example API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package cactus-plugin-satp-hermes +package generated import ( "bytes" @@ -35,8 +35,8 @@ import ( ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) @@ -49,7 +49,19 @@ type APIClient struct { // API Services - DefaultApi *DefaultApiService + ApproveAPI ApproveAPI + + GetAmountApprovedAPI GetAmountApprovedAPI + + GetBalanceAPI GetBalanceAPI + + GetSessionsReferencesAPI GetSessionsReferencesAPI + + MintAPI MintAPI + + TransactAPI TransactAPI + + TransferAPI TransferAPI } type service struct { @@ -68,7 +80,13 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) + c.ApproveAPI = (*ApproveAPIService)(&c.common) + c.GetAmountApprovedAPI = (*GetAmountApprovedAPIService)(&c.common) + c.GetBalanceAPI = (*GetBalanceAPIService)(&c.common) + c.GetSessionsReferencesAPI = (*GetSessionsReferencesAPIService)(&c.common) + c.MintAPI = (*MintAPIService)(&c.common) + c.TransactAPI = (*TransactAPIService)(&c.common) + c.TransferAPI = (*TransferAPIService)(&c.common) return c } @@ -142,7 +160,7 @@ func parameterValueToString( obj interface{}, key string ) string { // parameterAddToHeaderOrQuery adds the provided object to the request header or url query // supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { var v = reflect.ValueOf(obj) var value = "" if v == reflect.ValueOf(nil) { @@ -158,11 +176,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri if err != nil { return } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) return } if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) return } value = v.Type().String() + " value" @@ -174,7 +192,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri var lenIndValue = indValue.Len() for i:=0;i Approve(ctx).ApproveRequest(approveRequest).Execute() + +Submit a transaction intent + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + approveRequest := *openapiclient.NewApproveRequest("user1", "100", *openapiclient.NewAssetType()) // ApproveRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ApproveAPI.Approve(context.Background()).ApproveRequest(approveRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApproveAPI.Approve``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiApproveRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **approveRequest** | [**ApproveRequest**](ApproveRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/ApproveRequest.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/ApproveRequest.md new file mode 100644 index 0000000000..07d474e3ee --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/ApproveRequest.md @@ -0,0 +1,93 @@ +# ApproveRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**User** | **string** | | +**Amount** | **string** | | +**Ledger** | [**AssetType**](AssetType.md) | | + +## Methods + +### NewApproveRequest + +`func NewApproveRequest(user string, amount string, ledger AssetType, ) *ApproveRequest` + +NewApproveRequest instantiates a new ApproveRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApproveRequestWithDefaults + +`func NewApproveRequestWithDefaults() *ApproveRequest` + +NewApproveRequestWithDefaults instantiates a new ApproveRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUser + +`func (o *ApproveRequest) GetUser() string` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *ApproveRequest) GetUserOk() (*string, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *ApproveRequest) SetUser(v string)` + +SetUser sets User field to given value. + + +### GetAmount + +`func (o *ApproveRequest) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *ApproveRequest) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *ApproveRequest) SetAmount(v string)` + +SetAmount sets Amount field to given value. + + +### GetLedger + +`func (o *ApproveRequest) GetLedger() AssetType` + +GetLedger returns the Ledger field if non-nil, zero value otherwise. + +### GetLedgerOk + +`func (o *ApproveRequest) GetLedgerOk() (*AssetType, bool)` + +GetLedgerOk returns a tuple with the Ledger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLedger + +`func (o *ApproveRequest) SetLedger(v AssetType)` + +SetLedger sets Ledger field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/AssetType.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/AssetType.md new file mode 100644 index 0000000000..fe10be9d69 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/AssetType.md @@ -0,0 +1,56 @@ +# AssetType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetType** | Pointer to **string** | | [optional] + +## Methods + +### NewAssetType + +`func NewAssetType() *AssetType` + +NewAssetType instantiates a new AssetType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAssetTypeWithDefaults + +`func NewAssetTypeWithDefaults() *AssetType` + +NewAssetTypeWithDefaults instantiates a new AssetType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAssetType + +`func (o *AssetType) GetAssetType() string` + +GetAssetType returns the AssetType field if non-nil, zero value otherwise. + +### GetAssetTypeOk + +`func (o *AssetType) GetAssetTypeOk() (*string, bool)` + +GetAssetTypeOk returns a tuple with the AssetType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssetType + +`func (o *AssetType) SetAssetType(v string)` + +SetAssetType sets AssetType field to given value. + +### HasAssetType + +`func (o *AssetType) HasAssetType() bool` + +HasAssetType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/BalanceResponse.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/BalanceResponse.md new file mode 100644 index 0000000000..28b5446d74 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/BalanceResponse.md @@ -0,0 +1,51 @@ +# BalanceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **string** | | + +## Methods + +### NewBalanceResponse + +`func NewBalanceResponse(amount string, ) *BalanceResponse` + +NewBalanceResponse instantiates a new BalanceResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBalanceResponseWithDefaults + +`func NewBalanceResponseWithDefaults() *BalanceResponse` + +NewBalanceResponseWithDefaults instantiates a new BalanceResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAmount + +`func (o *BalanceResponse) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *BalanceResponse) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *BalanceResponse) SetAmount(v string)` + +SetAmount sets Amount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetAmountApprovedAPI.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetAmountApprovedAPI.md new file mode 100644 index 0000000000..7cbd54d4f4 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetAmountApprovedAPI.md @@ -0,0 +1,77 @@ +# \GetAmountApprovedAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAmountApproved**](GetAmountApprovedAPI.md#GetAmountApproved) | **Get** /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved | Get the amount approved for a transaction + + + +## GetAmountApproved + +> string GetAmountApproved(ctx).User(user).Chain(chain).Execute() + +Get the amount approved for a transaction + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + user := "user_example" // string | (optional) + chain := "chain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GetAmountApprovedAPI.GetAmountApproved(context.Background()).User(user).Chain(chain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GetAmountApprovedAPI.GetAmountApproved``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAmountApproved`: string + fmt.Fprintf(os.Stdout, "Response from `GetAmountApprovedAPI.GetAmountApproved`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAmountApprovedRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **string** | | + **chain** | **string** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetBalanceAPI.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetBalanceAPI.md new file mode 100644 index 0000000000..2bb9b7cfcc --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetBalanceAPI.md @@ -0,0 +1,75 @@ +# \GetBalanceAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetBalance**](GetBalanceAPI.md#GetBalance) | **Get** /api/v1/@hyperledger/cactus-example-cbdc/get-balance | + + + +## GetBalance + +> BalanceResponse GetBalance(ctx).User(user).Chain(chain).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + user := "user_example" // string | (optional) + chain := "chain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GetBalanceAPI.GetBalance(context.Background()).User(user).Chain(chain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GetBalanceAPI.GetBalance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBalance`: BalanceResponse + fmt.Fprintf(os.Stdout, "Response from `GetBalanceAPI.GetBalance`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetBalanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | **string** | | + **chain** | **string** | | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetSessionsReferencesAPI.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetSessionsReferencesAPI.md new file mode 100644 index 0000000000..208feae7fe --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/GetSessionsReferencesAPI.md @@ -0,0 +1,75 @@ +# \GetSessionsReferencesAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSessionsReferences**](GetSessionsReferencesAPI.md#GetSessionsReferences) | **Get** /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references | Get SATP current sessions data + + + +## GetSessionsReferences + +> []SessionReference GetSessionsReferences(ctx).Ledger(ledger).Execute() + +Get SATP current sessions data + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + ledger := "ledger_example" // string | Unique identifier for the session. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GetSessionsReferencesAPI.GetSessionsReferences(context.Background()).Ledger(ledger).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GetSessionsReferencesAPI.GetSessionsReferences``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetSessionsReferences`: []SessionReference + fmt.Fprintf(os.Stdout, "Response from `GetSessionsReferencesAPI.GetSessionsReferences`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetSessionsReferencesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ledger** | **string** | Unique identifier for the session. | + +### Return type + +[**[]SessionReference**](SessionReference.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintAPI.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintAPI.md new file mode 100644 index 0000000000..95d0235c47 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintAPI.md @@ -0,0 +1,73 @@ +# \MintAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Mint**](MintAPI.md#Mint) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens | Submit a transaction intent + + + +## Mint + +> Mint(ctx).MintRequest(mintRequest).Execute() + +Submit a transaction intent + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + mintRequest := *openapiclient.NewMintRequest("user1", "100", *openapiclient.NewAssetType()) // MintRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.MintAPI.Mint(context.Background()).MintRequest(mintRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MintAPI.Mint``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiMintRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mintRequest** | [**MintRequest**](MintRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintRequest.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintRequest.md new file mode 100644 index 0000000000..9c35e5eb13 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/MintRequest.md @@ -0,0 +1,93 @@ +# MintRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**User** | **string** | | +**Amount** | **string** | | +**Ledger** | [**AssetType**](AssetType.md) | | + +## Methods + +### NewMintRequest + +`func NewMintRequest(user string, amount string, ledger AssetType, ) *MintRequest` + +NewMintRequest instantiates a new MintRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMintRequestWithDefaults + +`func NewMintRequestWithDefaults() *MintRequest` + +NewMintRequestWithDefaults instantiates a new MintRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUser + +`func (o *MintRequest) GetUser() string` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *MintRequest) GetUserOk() (*string, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *MintRequest) SetUser(v string)` + +SetUser sets User field to given value. + + +### GetAmount + +`func (o *MintRequest) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *MintRequest) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *MintRequest) SetAmount(v string)` + +SetAmount sets Amount field to given value. + + +### GetLedger + +`func (o *MintRequest) GetLedger() AssetType` + +GetLedger returns the Ledger field if non-nil, zero value otherwise. + +### GetLedgerOk + +`func (o *MintRequest) GetLedgerOk() (*AssetType, bool)` + +GetLedgerOk returns a tuple with the Ledger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLedger + +`func (o *MintRequest) SetLedger(v AssetType)` + +SetLedger sets Ledger field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/SessionReference.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/SessionReference.md new file mode 100644 index 0000000000..cf6deff31f --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/SessionReference.md @@ -0,0 +1,114 @@ +# SessionReference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Status** | **string** | | +**SourceLedger** | **string** | | +**ReceiverLedger** | **string** | | + +## Methods + +### NewSessionReference + +`func NewSessionReference(id string, status string, sourceLedger string, receiverLedger string, ) *SessionReference` + +NewSessionReference instantiates a new SessionReference object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSessionReferenceWithDefaults + +`func NewSessionReferenceWithDefaults() *SessionReference` + +NewSessionReferenceWithDefaults instantiates a new SessionReference object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *SessionReference) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SessionReference) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SessionReference) SetId(v string)` + +SetId sets Id field to given value. + + +### GetStatus + +`func (o *SessionReference) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *SessionReference) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *SessionReference) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetSourceLedger + +`func (o *SessionReference) GetSourceLedger() string` + +GetSourceLedger returns the SourceLedger field if non-nil, zero value otherwise. + +### GetSourceLedgerOk + +`func (o *SessionReference) GetSourceLedgerOk() (*string, bool)` + +GetSourceLedgerOk returns a tuple with the SourceLedger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceLedger + +`func (o *SessionReference) SetSourceLedger(v string)` + +SetSourceLedger sets SourceLedger field to given value. + + +### GetReceiverLedger + +`func (o *SessionReference) GetReceiverLedger() string` + +GetReceiverLedger returns the ReceiverLedger field if non-nil, zero value otherwise. + +### GetReceiverLedgerOk + +`func (o *SessionReference) GetReceiverLedgerOk() (*string, bool)` + +GetReceiverLedgerOk returns a tuple with the ReceiverLedger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReceiverLedger + +`func (o *SessionReference) SetReceiverLedger(v string)` + +SetReceiverLedger sets ReceiverLedger field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/StatusResponse.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/StatusResponse.md new file mode 100644 index 0000000000..2dffe4d0bd --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/StatusResponse.md @@ -0,0 +1,77 @@ +# StatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionID** | Pointer to **string** | | [optional] +**Status** | **string** | | + +## Methods + +### NewStatusResponse + +`func NewStatusResponse(status string, ) *StatusResponse` + +NewStatusResponse instantiates a new StatusResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusResponseWithDefaults + +`func NewStatusResponseWithDefaults() *StatusResponse` + +NewStatusResponseWithDefaults instantiates a new StatusResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSessionID + +`func (o *StatusResponse) GetSessionID() string` + +GetSessionID returns the SessionID field if non-nil, zero value otherwise. + +### GetSessionIDOk + +`func (o *StatusResponse) GetSessionIDOk() (*string, bool)` + +GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionID + +`func (o *StatusResponse) SetSessionID(v string)` + +SetSessionID sets SessionID field to given value. + +### HasSessionID + +`func (o *StatusResponse) HasSessionID() bool` + +HasSessionID returns a boolean if a field has been set. + +### GetStatus + +`func (o *StatusResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *StatusResponse) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *StatusResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactAPI.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactAPI.md new file mode 100644 index 0000000000..90267622c8 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactAPI.md @@ -0,0 +1,75 @@ +# \TransactAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Transact**](TransactAPI.md#Transact) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/transact | Submit a transaction intent + + + +## Transact + +> TransactResponse Transact(ctx).TransactRequest(transactRequest).Execute() + +Submit a transaction intent + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + transactRequest := *openapiclient.NewTransactRequest("user1", "user2", *openapiclient.NewAssetType(), *openapiclient.NewAssetType(), "100") // TransactRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransactAPI.Transact(context.Background()).TransactRequest(transactRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransactAPI.Transact``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `Transact`: TransactResponse + fmt.Fprintf(os.Stdout, "Response from `TransactAPI.Transact`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransactRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transactRequest** | [**TransactRequest**](TransactRequest.md) | | + +### Return type + +[**TransactResponse**](TransactResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactRequest.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactRequest.md new file mode 100644 index 0000000000..c4fea91b98 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactRequest.md @@ -0,0 +1,135 @@ +# TransactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sender** | **string** | | +**Receiver** | **string** | | +**SourceChain** | [**AssetType**](AssetType.md) | | +**ReceiverChain** | [**AssetType**](AssetType.md) | | +**Amount** | **string** | | + +## Methods + +### NewTransactRequest + +`func NewTransactRequest(sender string, receiver string, sourceChain AssetType, receiverChain AssetType, amount string, ) *TransactRequest` + +NewTransactRequest instantiates a new TransactRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransactRequestWithDefaults + +`func NewTransactRequestWithDefaults() *TransactRequest` + +NewTransactRequestWithDefaults instantiates a new TransactRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSender + +`func (o *TransactRequest) GetSender() string` + +GetSender returns the Sender field if non-nil, zero value otherwise. + +### GetSenderOk + +`func (o *TransactRequest) GetSenderOk() (*string, bool)` + +GetSenderOk returns a tuple with the Sender field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSender + +`func (o *TransactRequest) SetSender(v string)` + +SetSender sets Sender field to given value. + + +### GetReceiver + +`func (o *TransactRequest) GetReceiver() string` + +GetReceiver returns the Receiver field if non-nil, zero value otherwise. + +### GetReceiverOk + +`func (o *TransactRequest) GetReceiverOk() (*string, bool)` + +GetReceiverOk returns a tuple with the Receiver field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReceiver + +`func (o *TransactRequest) SetReceiver(v string)` + +SetReceiver sets Receiver field to given value. + + +### GetSourceChain + +`func (o *TransactRequest) GetSourceChain() AssetType` + +GetSourceChain returns the SourceChain field if non-nil, zero value otherwise. + +### GetSourceChainOk + +`func (o *TransactRequest) GetSourceChainOk() (*AssetType, bool)` + +GetSourceChainOk returns a tuple with the SourceChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceChain + +`func (o *TransactRequest) SetSourceChain(v AssetType)` + +SetSourceChain sets SourceChain field to given value. + + +### GetReceiverChain + +`func (o *TransactRequest) GetReceiverChain() AssetType` + +GetReceiverChain returns the ReceiverChain field if non-nil, zero value otherwise. + +### GetReceiverChainOk + +`func (o *TransactRequest) GetReceiverChainOk() (*AssetType, bool)` + +GetReceiverChainOk returns a tuple with the ReceiverChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReceiverChain + +`func (o *TransactRequest) SetReceiverChain(v AssetType)` + +SetReceiverChain sets ReceiverChain field to given value. + + +### GetAmount + +`func (o *TransactRequest) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *TransactRequest) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *TransactRequest) SetAmount(v string)` + +SetAmount sets Amount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseResponse.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactResponse.md similarity index 59% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseResponse.md rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactResponse.md index 0a02a46c9c..fd9ea5ac92 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseResponse.md +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransactResponse.md @@ -1,46 +1,46 @@ -# PauseResponse +# TransactResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | +**StatusResponse** | [**StatusResponse**](StatusResponse.md) | | ## Methods -### NewPauseResponse +### NewTransactResponse -`func NewPauseResponse(statusResponse Transact200ResponseStatusResponse, ) *PauseResponse` +`func NewTransactResponse(statusResponse StatusResponse, ) *TransactResponse` -NewPauseResponse instantiates a new PauseResponse object +NewTransactResponse instantiates a new TransactResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewPauseResponseWithDefaults +### NewTransactResponseWithDefaults -`func NewPauseResponseWithDefaults() *PauseResponse` +`func NewTransactResponseWithDefaults() *TransactResponse` -NewPauseResponseWithDefaults instantiates a new PauseResponse object +NewTransactResponseWithDefaults instantiates a new TransactResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetStatusResponse -`func (o *PauseResponse) GetStatusResponse() Transact200ResponseStatusResponse` +`func (o *TransactResponse) GetStatusResponse() StatusResponse` GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. ### GetStatusResponseOk -`func (o *PauseResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` +`func (o *TransactResponse) GetStatusResponseOk() (*StatusResponse, bool)` GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatusResponse -`func (o *PauseResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` +`func (o *TransactResponse) SetStatusResponse(v StatusResponse)` SetStatusResponse sets StatusResponse field to given value. diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferAPI.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferAPI.md new file mode 100644 index 0000000000..bfcc080662 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferAPI.md @@ -0,0 +1,73 @@ +# \TransferAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Transfer**](TransferAPI.md#Transfer) | **Post** /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens | Submit a transaction intent + + + +## Transfer + +> Transfer(ctx).TransferRequest(transferRequest).Execute() + +Submit a transaction intent + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func main() { + transferRequest := *openapiclient.NewTransferRequest("user1", "user2", *openapiclient.NewAssetType(), *openapiclient.NewAssetType(), "100") // TransferRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TransferAPI.Transfer(context.Background()).TransferRequest(transferRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransferAPI.Transfer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransferRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transferRequest** | [**TransferRequest**](TransferRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferRequest.md b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferRequest.md new file mode 100644 index 0000000000..6679a0f011 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/docs/TransferRequest.md @@ -0,0 +1,135 @@ +# TransferRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | | +**To** | **string** | | +**SourceChain** | [**AssetType**](AssetType.md) | | +**ReceiverChain** | [**AssetType**](AssetType.md) | | +**Amount** | **string** | | + +## Methods + +### NewTransferRequest + +`func NewTransferRequest(from string, to string, sourceChain AssetType, receiverChain AssetType, amount string, ) *TransferRequest` + +NewTransferRequest instantiates a new TransferRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransferRequestWithDefaults + +`func NewTransferRequestWithDefaults() *TransferRequest` + +NewTransferRequestWithDefaults instantiates a new TransferRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFrom + +`func (o *TransferRequest) GetFrom() string` + +GetFrom returns the From field if non-nil, zero value otherwise. + +### GetFromOk + +`func (o *TransferRequest) GetFromOk() (*string, bool)` + +GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrom + +`func (o *TransferRequest) SetFrom(v string)` + +SetFrom sets From field to given value. + + +### GetTo + +`func (o *TransferRequest) GetTo() string` + +GetTo returns the To field if non-nil, zero value otherwise. + +### GetToOk + +`func (o *TransferRequest) GetToOk() (*string, bool)` + +GetToOk returns a tuple with the To field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTo + +`func (o *TransferRequest) SetTo(v string)` + +SetTo sets To field to given value. + + +### GetSourceChain + +`func (o *TransferRequest) GetSourceChain() AssetType` + +GetSourceChain returns the SourceChain field if non-nil, zero value otherwise. + +### GetSourceChainOk + +`func (o *TransferRequest) GetSourceChainOk() (*AssetType, bool)` + +GetSourceChainOk returns a tuple with the SourceChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceChain + +`func (o *TransferRequest) SetSourceChain(v AssetType)` + +SetSourceChain sets SourceChain field to given value. + + +### GetReceiverChain + +`func (o *TransferRequest) GetReceiverChain() AssetType` + +GetReceiverChain returns the ReceiverChain field if non-nil, zero value otherwise. + +### GetReceiverChainOk + +`func (o *TransferRequest) GetReceiverChainOk() (*AssetType, bool)` + +GetReceiverChainOk returns a tuple with the ReceiverChain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReceiverChain + +`func (o *TransferRequest) SetReceiverChain(v AssetType)` + +SetReceiverChain sets ReceiverChain field to given value. + + +### GetAmount + +`func (o *TransferRequest) GetAmount() string` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *TransferRequest) GetAmountOk() (*string, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *TransferRequest) SetAmount(v string)` + +SetAmount sets Amount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/git_push.sh b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/git_push.sh similarity index 95% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/git_push.sh rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/git_push.sh index caedee5072..9b8c8698b9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/git_push.sh +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/git_push.sh @@ -19,7 +19,7 @@ if [ "$git_user_id" = "" ]; then fi if [ "$git_repo_id" = "" ]; then - git_repo_id="cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" + git_repo_id="cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/go.mod b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/go.mod new file mode 100644 index 0000000000..4ec3b0aa4c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/go.mod @@ -0,0 +1,6 @@ +module github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated + +go 1.18 + +require ( +) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.sum b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/go.sum similarity index 100% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.sum rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/go.sum diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_api_error.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_api_error.go similarity index 80% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_api_error.go rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_api_error.go index d2a4a01771..05d2f9bdfb 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_api_error.go +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_api_error.go @@ -1,7 +1,7 @@ /* -SATP Gateway Client (Business Logic Orchestrator) +CBDC-example backend API -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) +Cactus-Example API version: 0.0.2 */ @@ -12,6 +12,8 @@ package generated import ( "encoding/json" + "bytes" + "fmt" ) // checks if the APIError type satisfies the MappedNullable interface at compile time @@ -31,6 +33,8 @@ type APIError struct { Timestamp string `json:"timestamp"` } +type _APIError APIError + // NewAPIError instantiates a new APIError object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -191,6 +195,47 @@ func (o APIError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *APIError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "code", + "status", + "message", + "timestamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAPIError := _APIError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAPIError) + + if err != nil { + return err + } + + *o = APIError(varAPIError) + + return err +} + type NullableAPIError struct { value *APIError isSet bool diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_approve_request.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_approve_request.go new file mode 100644 index 0000000000..e56dedea34 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_approve_request.go @@ -0,0 +1,214 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApproveRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApproveRequest{} + +// ApproveRequest Request schema for approving a transaction. +type ApproveRequest struct { + User string `json:"user"` + Amount string `json:"amount"` + Ledger AssetType `json:"ledger"` +} + +type _ApproveRequest ApproveRequest + +// NewApproveRequest instantiates a new ApproveRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApproveRequest(user string, amount string, ledger AssetType) *ApproveRequest { + this := ApproveRequest{} + this.User = user + this.Amount = amount + this.Ledger = ledger + return &this +} + +// NewApproveRequestWithDefaults instantiates a new ApproveRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApproveRequestWithDefaults() *ApproveRequest { + this := ApproveRequest{} + return &this +} + +// GetUser returns the User field value +func (o *ApproveRequest) GetUser() string { + if o == nil { + var ret string + return ret + } + + return o.User +} + +// GetUserOk returns a tuple with the User field value +// and a boolean to check if the value has been set. +func (o *ApproveRequest) GetUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.User, true +} + +// SetUser sets field value +func (o *ApproveRequest) SetUser(v string) { + o.User = v +} + +// GetAmount returns the Amount field value +func (o *ApproveRequest) GetAmount() string { + if o == nil { + var ret string + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *ApproveRequest) GetAmountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *ApproveRequest) SetAmount(v string) { + o.Amount = v +} + +// GetLedger returns the Ledger field value +func (o *ApproveRequest) GetLedger() AssetType { + if o == nil { + var ret AssetType + return ret + } + + return o.Ledger +} + +// GetLedgerOk returns a tuple with the Ledger field value +// and a boolean to check if the value has been set. +func (o *ApproveRequest) GetLedgerOk() (*AssetType, bool) { + if o == nil { + return nil, false + } + return &o.Ledger, true +} + +// SetLedger sets field value +func (o *ApproveRequest) SetLedger(v AssetType) { + o.Ledger = v +} + +func (o ApproveRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApproveRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user"] = o.User + toSerialize["amount"] = o.Amount + toSerialize["ledger"] = o.Ledger + return toSerialize, nil +} + +func (o *ApproveRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user", + "amount", + "ledger", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApproveRequest := _ApproveRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApproveRequest) + + if err != nil { + return err + } + + *o = ApproveRequest(varApproveRequest) + + return err +} + +type NullableApproveRequest struct { + value *ApproveRequest + isSet bool +} + +func (v NullableApproveRequest) Get() *ApproveRequest { + return v.value +} + +func (v *NullableApproveRequest) Set(val *ApproveRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApproveRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApproveRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApproveRequest(val *ApproveRequest) *NullableApproveRequest { + return &NullableApproveRequest{value: val, isSet: true} +} + +func (v NullableApproveRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApproveRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_asset_type.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_asset_type.go new file mode 100644 index 0000000000..071491ec81 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_asset_type.go @@ -0,0 +1,126 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" +) + +// checks if the AssetType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssetType{} + +// AssetType Enum for the type of asset being transferred. +type AssetType struct { + AssetType *string `json:"assetType,omitempty"` +} + +// NewAssetType instantiates a new AssetType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAssetType() *AssetType { + this := AssetType{} + return &this +} + +// NewAssetTypeWithDefaults instantiates a new AssetType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAssetTypeWithDefaults() *AssetType { + this := AssetType{} + return &this +} + +// GetAssetType returns the AssetType field value if set, zero value otherwise. +func (o *AssetType) GetAssetType() string { + if o == nil || IsNil(o.AssetType) { + var ret string + return ret + } + return *o.AssetType +} + +// GetAssetTypeOk returns a tuple with the AssetType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssetType) GetAssetTypeOk() (*string, bool) { + if o == nil || IsNil(o.AssetType) { + return nil, false + } + return o.AssetType, true +} + +// HasAssetType returns a boolean if a field has been set. +func (o *AssetType) HasAssetType() bool { + if o != nil && !IsNil(o.AssetType) { + return true + } + + return false +} + +// SetAssetType gets a reference to the given string and assigns it to the AssetType field. +func (o *AssetType) SetAssetType(v string) { + o.AssetType = &v +} + +func (o AssetType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssetType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AssetType) { + toSerialize["assetType"] = o.AssetType + } + return toSerialize, nil +} + +type NullableAssetType struct { + value *AssetType + isSet bool +} + +func (v NullableAssetType) Get() *AssetType { + return v.value +} + +func (v *NullableAssetType) Set(val *AssetType) { + v.value = val + v.isSet = true +} + +func (v NullableAssetType) IsSet() bool { + return v.isSet +} + +func (v *NullableAssetType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssetType(val *AssetType) *NullableAssetType { + return &NullableAssetType{value: val, isSet: true} +} + +func (v NullableAssetType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssetType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_balance_response.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_balance_response.go new file mode 100644 index 0000000000..904ec06b1c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_balance_response.go @@ -0,0 +1,158 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BalanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BalanceResponse{} + +// BalanceResponse Response schema for an amount request. +type BalanceResponse struct { + Amount string `json:"amount"` +} + +type _BalanceResponse BalanceResponse + +// NewBalanceResponse instantiates a new BalanceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBalanceResponse(amount string) *BalanceResponse { + this := BalanceResponse{} + this.Amount = amount + return &this +} + +// NewBalanceResponseWithDefaults instantiates a new BalanceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBalanceResponseWithDefaults() *BalanceResponse { + this := BalanceResponse{} + return &this +} + +// GetAmount returns the Amount field value +func (o *BalanceResponse) GetAmount() string { + if o == nil { + var ret string + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *BalanceResponse) GetAmountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *BalanceResponse) SetAmount(v string) { + o.Amount = v +} + +func (o BalanceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + return toSerialize, nil +} + +func (o *BalanceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBalanceResponse := _BalanceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBalanceResponse) + + if err != nil { + return err + } + + *o = BalanceResponse(varBalanceResponse) + + return err +} + +type NullableBalanceResponse struct { + value *BalanceResponse + isSet bool +} + +func (v NullableBalanceResponse) Get() *BalanceResponse { + return v.value +} + +func (v *NullableBalanceResponse) Set(val *BalanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceResponse(val *BalanceResponse) *NullableBalanceResponse { + return &NullableBalanceResponse{value: val, isSet: true} +} + +func (v NullableBalanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_mint_request.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_mint_request.go new file mode 100644 index 0000000000..d56a10ea67 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_mint_request.go @@ -0,0 +1,214 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MintRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MintRequest{} + +// MintRequest Request schema for minting an asset. +type MintRequest struct { + User string `json:"user"` + Amount string `json:"amount"` + Ledger AssetType `json:"ledger"` +} + +type _MintRequest MintRequest + +// NewMintRequest instantiates a new MintRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMintRequest(user string, amount string, ledger AssetType) *MintRequest { + this := MintRequest{} + this.User = user + this.Amount = amount + this.Ledger = ledger + return &this +} + +// NewMintRequestWithDefaults instantiates a new MintRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMintRequestWithDefaults() *MintRequest { + this := MintRequest{} + return &this +} + +// GetUser returns the User field value +func (o *MintRequest) GetUser() string { + if o == nil { + var ret string + return ret + } + + return o.User +} + +// GetUserOk returns a tuple with the User field value +// and a boolean to check if the value has been set. +func (o *MintRequest) GetUserOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.User, true +} + +// SetUser sets field value +func (o *MintRequest) SetUser(v string) { + o.User = v +} + +// GetAmount returns the Amount field value +func (o *MintRequest) GetAmount() string { + if o == nil { + var ret string + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *MintRequest) GetAmountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *MintRequest) SetAmount(v string) { + o.Amount = v +} + +// GetLedger returns the Ledger field value +func (o *MintRequest) GetLedger() AssetType { + if o == nil { + var ret AssetType + return ret + } + + return o.Ledger +} + +// GetLedgerOk returns a tuple with the Ledger field value +// and a boolean to check if the value has been set. +func (o *MintRequest) GetLedgerOk() (*AssetType, bool) { + if o == nil { + return nil, false + } + return &o.Ledger, true +} + +// SetLedger sets field value +func (o *MintRequest) SetLedger(v AssetType) { + o.Ledger = v +} + +func (o MintRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MintRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user"] = o.User + toSerialize["amount"] = o.Amount + toSerialize["ledger"] = o.Ledger + return toSerialize, nil +} + +func (o *MintRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "user", + "amount", + "ledger", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMintRequest := _MintRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMintRequest) + + if err != nil { + return err + } + + *o = MintRequest(varMintRequest) + + return err +} + +type NullableMintRequest struct { + value *MintRequest + isSet bool +} + +func (v NullableMintRequest) Get() *MintRequest { + return v.value +} + +func (v *NullableMintRequest) Set(val *MintRequest) { + v.value = val + v.isSet = true +} + +func (v NullableMintRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableMintRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMintRequest(val *MintRequest) *NullableMintRequest { + return &NullableMintRequest{value: val, isSet: true} +} + +func (v NullableMintRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMintRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_session_reference.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_session_reference.go new file mode 100644 index 0000000000..c3371f9138 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_session_reference.go @@ -0,0 +1,242 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SessionReference type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionReference{} + +// SessionReference struct for SessionReference +type SessionReference struct { + Id string `json:"id"` + Status string `json:"status"` + SourceLedger string `json:"sourceLedger"` + ReceiverLedger string `json:"receiverLedger"` +} + +type _SessionReference SessionReference + +// NewSessionReference instantiates a new SessionReference object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSessionReference(id string, status string, sourceLedger string, receiverLedger string) *SessionReference { + this := SessionReference{} + this.Id = id + this.Status = status + this.SourceLedger = sourceLedger + this.ReceiverLedger = receiverLedger + return &this +} + +// NewSessionReferenceWithDefaults instantiates a new SessionReference object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSessionReferenceWithDefaults() *SessionReference { + this := SessionReference{} + return &this +} + +// GetId returns the Id field value +func (o *SessionReference) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SessionReference) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SessionReference) SetId(v string) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *SessionReference) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *SessionReference) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *SessionReference) SetStatus(v string) { + o.Status = v +} + +// GetSourceLedger returns the SourceLedger field value +func (o *SessionReference) GetSourceLedger() string { + if o == nil { + var ret string + return ret + } + + return o.SourceLedger +} + +// GetSourceLedgerOk returns a tuple with the SourceLedger field value +// and a boolean to check if the value has been set. +func (o *SessionReference) GetSourceLedgerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SourceLedger, true +} + +// SetSourceLedger sets field value +func (o *SessionReference) SetSourceLedger(v string) { + o.SourceLedger = v +} + +// GetReceiverLedger returns the ReceiverLedger field value +func (o *SessionReference) GetReceiverLedger() string { + if o == nil { + var ret string + return ret + } + + return o.ReceiverLedger +} + +// GetReceiverLedgerOk returns a tuple with the ReceiverLedger field value +// and a boolean to check if the value has been set. +func (o *SessionReference) GetReceiverLedgerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReceiverLedger, true +} + +// SetReceiverLedger sets field value +func (o *SessionReference) SetReceiverLedger(v string) { + o.ReceiverLedger = v +} + +func (o SessionReference) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionReference) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["sourceLedger"] = o.SourceLedger + toSerialize["receiverLedger"] = o.ReceiverLedger + return toSerialize, nil +} + +func (o *SessionReference) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "status", + "sourceLedger", + "receiverLedger", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSessionReference := _SessionReference{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSessionReference) + + if err != nil { + return err + } + + *o = SessionReference(varSessionReference) + + return err +} + +type NullableSessionReference struct { + value *SessionReference + isSet bool +} + +func (v NullableSessionReference) Get() *SessionReference { + return v.value +} + +func (v *NullableSessionReference) Set(val *SessionReference) { + v.value = val + v.isSet = true +} + +func (v NullableSessionReference) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionReference) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionReference(val *SessionReference) *NullableSessionReference { + return &NullableSessionReference{value: val, isSet: true} +} + +func (v NullableSessionReference) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionReference) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_status_response.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_status_response.go new file mode 100644 index 0000000000..f77ed9dfce --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_status_response.go @@ -0,0 +1,194 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the StatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusResponse{} + +// StatusResponse Response schema for a transaction status request. +type StatusResponse struct { + SessionID *string `json:"sessionID,omitempty"` + Status string `json:"status"` +} + +type _StatusResponse StatusResponse + +// NewStatusResponse instantiates a new StatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStatusResponse(status string) *StatusResponse { + this := StatusResponse{} + this.Status = status + return &this +} + +// NewStatusResponseWithDefaults instantiates a new StatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStatusResponseWithDefaults() *StatusResponse { + this := StatusResponse{} + return &this +} + +// GetSessionID returns the SessionID field value if set, zero value otherwise. +func (o *StatusResponse) GetSessionID() string { + if o == nil || IsNil(o.SessionID) { + var ret string + return ret + } + return *o.SessionID +} + +// GetSessionIDOk returns a tuple with the SessionID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetSessionIDOk() (*string, bool) { + if o == nil || IsNil(o.SessionID) { + return nil, false + } + return o.SessionID, true +} + +// HasSessionID returns a boolean if a field has been set. +func (o *StatusResponse) HasSessionID() bool { + if o != nil && !IsNil(o.SessionID) { + return true + } + + return false +} + +// SetSessionID gets a reference to the given string and assigns it to the SessionID field. +func (o *StatusResponse) SetSessionID(v string) { + o.SessionID = &v +} + +// GetStatus returns the Status field value +func (o *StatusResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *StatusResponse) SetStatus(v string) { + o.Status = v +} + +func (o StatusResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SessionID) { + toSerialize["sessionID"] = o.SessionID + } + toSerialize["status"] = o.Status + return toSerialize, nil +} + +func (o *StatusResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varStatusResponse := _StatusResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varStatusResponse) + + if err != nil { + return err + } + + *o = StatusResponse(varStatusResponse) + + return err +} + +type NullableStatusResponse struct { + value *StatusResponse + isSet bool +} + +func (v NullableStatusResponse) Get() *StatusResponse { + return v.value +} + +func (v *NullableStatusResponse) Set(val *StatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusResponse(val *StatusResponse) *NullableStatusResponse { + return &NullableStatusResponse{value: val, isSet: true} +} + +func (v NullableStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_request.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_request.go new file mode 100644 index 0000000000..527a7ee3c1 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_request.go @@ -0,0 +1,270 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransactRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransactRequest{} + +// TransactRequest Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and receiver DLT networks. +type TransactRequest struct { + Sender string `json:"sender"` + Receiver string `json:"receiver"` + SourceChain AssetType `json:"sourceChain"` + ReceiverChain AssetType `json:"receiverChain"` + Amount string `json:"amount"` +} + +type _TransactRequest TransactRequest + +// NewTransactRequest instantiates a new TransactRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransactRequest(sender string, receiver string, sourceChain AssetType, receiverChain AssetType, amount string) *TransactRequest { + this := TransactRequest{} + this.Sender = sender + this.Receiver = receiver + this.SourceChain = sourceChain + this.ReceiverChain = receiverChain + this.Amount = amount + return &this +} + +// NewTransactRequestWithDefaults instantiates a new TransactRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransactRequestWithDefaults() *TransactRequest { + this := TransactRequest{} + return &this +} + +// GetSender returns the Sender field value +func (o *TransactRequest) GetSender() string { + if o == nil { + var ret string + return ret + } + + return o.Sender +} + +// GetSenderOk returns a tuple with the Sender field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetSenderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sender, true +} + +// SetSender sets field value +func (o *TransactRequest) SetSender(v string) { + o.Sender = v +} + +// GetReceiver returns the Receiver field value +func (o *TransactRequest) GetReceiver() string { + if o == nil { + var ret string + return ret + } + + return o.Receiver +} + +// GetReceiverOk returns a tuple with the Receiver field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetReceiverOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Receiver, true +} + +// SetReceiver sets field value +func (o *TransactRequest) SetReceiver(v string) { + o.Receiver = v +} + +// GetSourceChain returns the SourceChain field value +func (o *TransactRequest) GetSourceChain() AssetType { + if o == nil { + var ret AssetType + return ret + } + + return o.SourceChain +} + +// GetSourceChainOk returns a tuple with the SourceChain field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetSourceChainOk() (*AssetType, bool) { + if o == nil { + return nil, false + } + return &o.SourceChain, true +} + +// SetSourceChain sets field value +func (o *TransactRequest) SetSourceChain(v AssetType) { + o.SourceChain = v +} + +// GetReceiverChain returns the ReceiverChain field value +func (o *TransactRequest) GetReceiverChain() AssetType { + if o == nil { + var ret AssetType + return ret + } + + return o.ReceiverChain +} + +// GetReceiverChainOk returns a tuple with the ReceiverChain field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetReceiverChainOk() (*AssetType, bool) { + if o == nil { + return nil, false + } + return &o.ReceiverChain, true +} + +// SetReceiverChain sets field value +func (o *TransactRequest) SetReceiverChain(v AssetType) { + o.ReceiverChain = v +} + +// GetAmount returns the Amount field value +func (o *TransactRequest) GetAmount() string { + if o == nil { + var ret string + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *TransactRequest) GetAmountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *TransactRequest) SetAmount(v string) { + o.Amount = v +} + +func (o TransactRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sender"] = o.Sender + toSerialize["receiver"] = o.Receiver + toSerialize["sourceChain"] = o.SourceChain + toSerialize["receiverChain"] = o.ReceiverChain + toSerialize["amount"] = o.Amount + return toSerialize, nil +} + +func (o *TransactRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "sender", + "receiver", + "sourceChain", + "receiverChain", + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransactRequest := _TransactRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransactRequest) + + if err != nil { + return err + } + + *o = TransactRequest(varTransactRequest) + + return err +} + +type NullableTransactRequest struct { + value *TransactRequest + isSet bool +} + +func (v NullableTransactRequest) Get() *TransactRequest { + return v.value +} + +func (v *NullableTransactRequest) Set(val *TransactRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransactRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactRequest(val *TransactRequest) *NullableTransactRequest { + return &NullableTransactRequest{value: val, isSet: true} +} + +func (v NullableTransactRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_response.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_response.go similarity index 51% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_response.go rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_response.go index 6fccf8ecfa..285dd1525e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_response.go +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transact_response.go @@ -1,7 +1,7 @@ /* -SATP Gateway Client (Business Logic Orchestrator) +CBDC-example backend API -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) +Cactus-Example API version: 0.0.2 */ @@ -12,25 +12,26 @@ package generated import ( "encoding/json" + "bytes" + "fmt" ) // checks if the TransactResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &TransactResponse{} -// TransactResponse Response schema for a transaction request. Includes the session ID and the current status of the transaction. +// TransactResponse Response schema for a transaction request. type TransactResponse struct { - // Unique identifier (UUID) for the session. - SessionID string `json:"sessionID"` - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` + StatusResponse StatusResponse `json:"statusResponse"` } +type _TransactResponse TransactResponse + // NewTransactResponse instantiates a new TransactResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTransactResponse(sessionID string, statusResponse Transact200ResponseStatusResponse) *TransactResponse { +func NewTransactResponse(statusResponse StatusResponse) *TransactResponse { this := TransactResponse{} - this.SessionID = sessionID this.StatusResponse = statusResponse return &this } @@ -43,34 +44,10 @@ func NewTransactResponseWithDefaults() *TransactResponse { return &this } -// GetSessionID returns the SessionID field value -func (o *TransactResponse) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *TransactResponse) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *TransactResponse) SetSessionID(v string) { - o.SessionID = v -} - // GetStatusResponse returns the StatusResponse field value -func (o *TransactResponse) GetStatusResponse() Transact200ResponseStatusResponse { +func (o *TransactResponse) GetStatusResponse() StatusResponse { if o == nil { - var ret Transact200ResponseStatusResponse + var ret StatusResponse return ret } @@ -79,7 +56,7 @@ func (o *TransactResponse) GetStatusResponse() Transact200ResponseStatusResponse // GetStatusResponseOk returns a tuple with the StatusResponse field value // and a boolean to check if the value has been set. -func (o *TransactResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { +func (o *TransactResponse) GetStatusResponseOk() (*StatusResponse, bool) { if o == nil { return nil, false } @@ -87,7 +64,7 @@ func (o *TransactResponse) GetStatusResponseOk() (*Transact200ResponseStatusResp } // SetStatusResponse sets field value -func (o *TransactResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { +func (o *TransactResponse) SetStatusResponse(v StatusResponse) { o.StatusResponse = v } @@ -101,11 +78,47 @@ func (o TransactResponse) MarshalJSON() ([]byte, error) { func (o TransactResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID toSerialize["statusResponse"] = o.StatusResponse return toSerialize, nil } +func (o *TransactResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "statusResponse", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransactResponse := _TransactResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransactResponse) + + if err != nil { + return err + } + + *o = TransactResponse(varTransactResponse) + + return err +} + type NullableTransactResponse struct { value *TransactResponse isSet bool diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transfer_request.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transfer_request.go new file mode 100644 index 0000000000..26a0ce8626 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/model_transfer_request.go @@ -0,0 +1,270 @@ +/* +CBDC-example backend API + +Cactus-Example + +API version: 0.0.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package generated + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransferRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransferRequest{} + +// TransferRequest Request schema for transferring an asset. +type TransferRequest struct { + From string `json:"from"` + To string `json:"to"` + SourceChain AssetType `json:"sourceChain"` + ReceiverChain AssetType `json:"receiverChain"` + Amount string `json:"amount"` +} + +type _TransferRequest TransferRequest + +// NewTransferRequest instantiates a new TransferRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransferRequest(from string, to string, sourceChain AssetType, receiverChain AssetType, amount string) *TransferRequest { + this := TransferRequest{} + this.From = from + this.To = to + this.SourceChain = sourceChain + this.ReceiverChain = receiverChain + this.Amount = amount + return &this +} + +// NewTransferRequestWithDefaults instantiates a new TransferRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransferRequestWithDefaults() *TransferRequest { + this := TransferRequest{} + return &this +} + +// GetFrom returns the From field value +func (o *TransferRequest) GetFrom() string { + if o == nil { + var ret string + return ret + } + + return o.From +} + +// GetFromOk returns a tuple with the From field value +// and a boolean to check if the value has been set. +func (o *TransferRequest) GetFromOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.From, true +} + +// SetFrom sets field value +func (o *TransferRequest) SetFrom(v string) { + o.From = v +} + +// GetTo returns the To field value +func (o *TransferRequest) GetTo() string { + if o == nil { + var ret string + return ret + } + + return o.To +} + +// GetToOk returns a tuple with the To field value +// and a boolean to check if the value has been set. +func (o *TransferRequest) GetToOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.To, true +} + +// SetTo sets field value +func (o *TransferRequest) SetTo(v string) { + o.To = v +} + +// GetSourceChain returns the SourceChain field value +func (o *TransferRequest) GetSourceChain() AssetType { + if o == nil { + var ret AssetType + return ret + } + + return o.SourceChain +} + +// GetSourceChainOk returns a tuple with the SourceChain field value +// and a boolean to check if the value has been set. +func (o *TransferRequest) GetSourceChainOk() (*AssetType, bool) { + if o == nil { + return nil, false + } + return &o.SourceChain, true +} + +// SetSourceChain sets field value +func (o *TransferRequest) SetSourceChain(v AssetType) { + o.SourceChain = v +} + +// GetReceiverChain returns the ReceiverChain field value +func (o *TransferRequest) GetReceiverChain() AssetType { + if o == nil { + var ret AssetType + return ret + } + + return o.ReceiverChain +} + +// GetReceiverChainOk returns a tuple with the ReceiverChain field value +// and a boolean to check if the value has been set. +func (o *TransferRequest) GetReceiverChainOk() (*AssetType, bool) { + if o == nil { + return nil, false + } + return &o.ReceiverChain, true +} + +// SetReceiverChain sets field value +func (o *TransferRequest) SetReceiverChain(v AssetType) { + o.ReceiverChain = v +} + +// GetAmount returns the Amount field value +func (o *TransferRequest) GetAmount() string { + if o == nil { + var ret string + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *TransferRequest) GetAmountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *TransferRequest) SetAmount(v string) { + o.Amount = v +} + +func (o TransferRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["from"] = o.From + toSerialize["to"] = o.To + toSerialize["sourceChain"] = o.SourceChain + toSerialize["receiverChain"] = o.ReceiverChain + toSerialize["amount"] = o.Amount + return toSerialize, nil +} + +func (o *TransferRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "from", + "to", + "sourceChain", + "receiverChain", + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransferRequest := _TransferRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransferRequest) + + if err != nil { + return err + } + + *o = TransferRequest(varTransferRequest) + + return err +} + +type NullableTransferRequest struct { + value *TransferRequest + isSet bool +} + +func (v NullableTransferRequest) Get() *TransferRequest { + return v.value +} + +func (v *NullableTransferRequest) Set(val *TransferRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransferRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferRequest(val *TransferRequest) *NullableTransferRequest { + return &NullableTransferRequest{value: val, isSet: true} +} + +func (v NullableTransferRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/response.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/response.go similarity index 92% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/response.go rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/response.go index ca470973bd..8bd676ee81 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/response.go +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/response.go @@ -1,14 +1,14 @@ /* -Hyperledger Cactus Plugin - Odap Hermes +CBDC-example backend API -Implementation for Odap and Hermes +Cactus-Example API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package cactus-plugin-satp-hermes +package generated import ( "net/http" diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_approve_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_approve_test.go new file mode 100644 index 0000000000..0fe119af93 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_approve_test.go @@ -0,0 +1,36 @@ +/* +CBDC-example backend API + +Testing ApproveAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_ApproveAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApproveAPIService Approve", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.ApproveAPI.Approve(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_amount_approved_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_amount_approved_test.go new file mode 100644 index 0000000000..6cdd7a4618 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_amount_approved_test.go @@ -0,0 +1,37 @@ +/* +CBDC-example backend API + +Testing GetAmountApprovedAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_GetAmountApprovedAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test GetAmountApprovedAPIService GetAmountApproved", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GetAmountApprovedAPI.GetAmountApproved(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_balance_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_balance_test.go new file mode 100644 index 0000000000..b5806c744c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_balance_test.go @@ -0,0 +1,37 @@ +/* +CBDC-example backend API + +Testing GetBalanceAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_GetBalanceAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test GetBalanceAPIService GetBalance", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GetBalanceAPI.GetBalance(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_sessions_references_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_sessions_references_test.go new file mode 100644 index 0000000000..f0138002ef --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_get_sessions_references_test.go @@ -0,0 +1,37 @@ +/* +CBDC-example backend API + +Testing GetSessionsReferencesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_GetSessionsReferencesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test GetSessionsReferencesAPIService GetSessionsReferences", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GetSessionsReferencesAPI.GetSessionsReferences(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_mint_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_mint_test.go new file mode 100644 index 0000000000..d165c7a96e --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_mint_test.go @@ -0,0 +1,36 @@ +/* +CBDC-example backend API + +Testing MintAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_MintAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MintAPIService Mint", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.MintAPI.Mint(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transact_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transact_test.go new file mode 100644 index 0000000000..3fd45e7812 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transact_test.go @@ -0,0 +1,37 @@ +/* +CBDC-example backend API + +Testing TransactAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_TransactAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TransactAPIService Transact", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TransactAPI.Transact(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transfer_test.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transfer_test.go new file mode 100644 index 0000000000..0170f361e4 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/test/api_transfer_test.go @@ -0,0 +1,36 @@ +/* +CBDC-example backend API + +Testing TransferAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package generated + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/hyperledger/cacti/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated" +) + +func Test_generated_TransferAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TransferAPIService Transfer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.TransferAPI.Transfer(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/utils.go b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/utils.go similarity index 94% rename from packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/utils.go rename to examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/utils.go index b83a09e0e6..2e8e9e57e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/utils.go +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/go/generated/openapi/utils.go @@ -1,17 +1,19 @@ /* -Hyperledger Cactus Plugin - Odap Hermes +CBDC-example backend API -Implementation for Odap and Hermes +Cactus-Example API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package cactus-plugin-satp-hermes +package generated import ( + "bytes" "encoding/json" + "fmt" "reflect" "time" ) @@ -320,7 +322,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { @@ -345,3 +347,15 @@ func IsNil(i interface{}) bool { type MappedNullable interface { ToMap() (map[string]interface{}, error) } + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/json/openapi-bundled.json b/examples/cactus-example-cbdc-bridging-backend/src/main/json/openapi-bundled.json new file mode 100644 index 0000000000..df09bc140a --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/json/openapi-bundled.json @@ -0,0 +1,760 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "CBDC-example backend API", + "version": "0.0.2", + "description": "Cactus-Example\n", + "contact": { + "name": "Hyperledger Cacti" + }, + "x-logo": { + "altText": "Cacti logo", + "backgroundColor": "#fafafa", + "url": "https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png" + } + }, + "tags": [ + { + "name": "transaction", + "description": "API endpoints for interacting with blockchains via gateways" + }, + { + "name": "admin", + "description": "API endpoints for fetching information on SATP sessions" + } + ], + "paths": { + "/api/v1/@hyperledger/cactus-example-cbdc/transact": { + "post": { + "tags": [ + "transact" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/transact" + } + }, + "summary": "Submit a transaction intent", + "description": "Allows users to queue intents for transactions based on specified parameters.", + "operationId": "Transact", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and receiver DLT networks.", + "type": "object", + "required": [ + "sender", + "receiver", + "sourceChain", + "receiverChain", + "amount" + ], + "properties": { + "sender": { + "type": "string", + "example": "user1" + }, + "receiver": { + "type": "string", + "example": "user2" + }, + "sourceChain": { + "description": "Enum for the type of asset being transferred.", + "type": "object", + "properties": { + "assetType": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + }, + "receiverChain": { + "description": "Enum for the type of asset being transferred.", + "type": "object", + "properties": { + "assetType": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + }, + "amount": { + "type": "string", + "example": "100" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Transaction successfully queued", + "content": { + "application/json": { + "schema": { + "description": "Response schema for a transaction request.", + "type": "object", + "properties": { + "statusResponse": { + "description": "Response schema for a transaction status request.", + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED" + ] + } + }, + "required": [ + "status" + ] + } + }, + "required": [ + "statusResponse" + ] + } + } + } + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references": { + "get": { + "tags": [ + "get-sessions-references" + ], + "summary": "Get SATP current sessions data", + "description": "Retrieve the status of a SATP sessions of a gateway", + "operationId": "GetSessionsReferences", + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references" + } + }, + "parameters": [ + { + "name": "Ledger", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + }, + "description": "Unique identifier for the session." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "description": "Response schema for a transaction status request.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "status": { + "type": "string" + }, + "sourceLedger": { + "type": "string" + }, + "receiverLedger": { + "type": "string" + } + }, + "required": [ + "status", + "id", + "sourceLedger", + "receiverLedger" + ] + } + } + } + } + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/api/v1/@hyperledger/cactus-example-cbdc/get-balance": { + "get": { + "tags": [ + "get-balance" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/get-balance" + } + }, + "operationId": "GetBalance", + "parameters": [ + { + "name": "user", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "chain", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "description": "Response schema for an amount request.", + "type": "object", + "properties": { + "amount": { + "type": "string", + "example": "100" + } + }, + "required": [ + "amount" + ] + } + } + } + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens": { + "post": { + "tags": [ + "mint" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens" + } + }, + "summary": "Submit a transaction intent", + "description": "Allows users to queue intents for transactions based on specified parameters.", + "operationId": "Mint", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Request schema for minting an asset.", + "type": "object", + "properties": { + "user": { + "type": "string", + "example": "user1" + }, + "amount": { + "type": "string", + "example": "100" + }, + "ledger": { + "description": "Enum for the type of asset being transferred.", + "type": "object", + "properties": { + "assetType": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + } + }, + "required": [ + "user", + "amount", + "ledger" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Transaction successfully queued" + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens": { + "post": { + "tags": [ + "approve" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens" + } + }, + "summary": "Submit a transaction intent", + "description": "Approves a certain amount to be transferred from the user's account by the bridge.", + "operationId": "Approve", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Request schema for approving a transaction.", + "type": "object", + "properties": { + "user": { + "type": "string", + "example": "user1" + }, + "amount": { + "type": "string", + "example": "100" + }, + "ledger": { + "description": "Enum for the type of asset being transferred.", + "type": "object", + "properties": { + "assetType": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + } + }, + "required": [ + "user", + "amount", + "ledger" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Transaction successfully queued" + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + }, + "/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved": { + "get": { + "tags": [ + "get-amount-approved" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved" + } + }, + "summary": "Get the amount approved for a transaction", + "description": "Get the amount approved for a transaction", + "operationId": "GetAmountApproved", + "parameters": [ + { + "name": "user", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "chain", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "100" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens": { + "post": { + "tags": [ + "transfer" + ], + "x-hyperledger-cacti": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens" + } + }, + "summary": "Submit a transaction intent", + "description": "Allows users to queue intents for transactions based on specified parameters.", + "operationId": "Transfer", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "description": "Request schema for transferring an asset.", + "type": "object", + "properties": { + "from": { + "type": "string", + "example": "user1" + }, + "to": { + "type": "string", + "example": "user2" + }, + "sourceChain": { + "description": "Enum for the type of asset being transferred.", + "type": "object", + "properties": { + "assetType": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + }, + "receiverChain": { + "description": "Enum for the type of asset being transferred.", + "type": "object", + "properties": { + "assetType": { + "type": "string", + "enum": [ + "FABRIC", + "BESU" + ] + } + } + }, + "amount": { + "type": "string", + "example": "100" + } + }, + "required": [ + "from", + "to", + "amount", + "sourceChain", + "receiverChain" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Transaction successfully queued" + }, + "400": { + "description": "Bad request" + }, + "404": { + "description": "Transaction not found" + }, + "500": { + "description": "Internal server error" + }, + "default": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "x-category": "response", + "type": "object", + "x-go-type": "ApiError", + "x-go-name": "ApiError", + "description": "An Error", + "required": [ + "message", + "type", + "code", + "status", + "timestamp" + ], + "properties": { + "type": { + "type": "string", + "description": "HTTP error type", + "example": "bad-request" + }, + "code": { + "type": "integer", + "description": "Numeric error code", + "example": 16384 + }, + "status": { + "type": "integer", + "description": "HTTP status of the error", + "example": 500 + }, + "message": { + "type": "string", + "description": "Long error description", + "example": "Oops there's been an internal error handling" + }, + "timestamp": { + "type": "string", + "description": "Timestamp of the error", + "example": "2021-07-21T17:32:28Z" + } + } + } + } + } + } + } + } + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts index 5725fbff22..2923a6dcab 100755 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app-cli.ts @@ -7,7 +7,6 @@ import { } from "@hyperledger/cactus-cmd-api-server"; import { LoggerProvider } from "@hyperledger/cactus-common"; import { ICbdcBridgingApp, CbdcBridgingApp } from "./cbdc-bridging-app"; -import CryptoMaterial from "../../crypto-material/crypto-material.json"; import "dotenv/config"; export async function launchApp( @@ -21,7 +20,7 @@ export async function launchApp( exampleConfig.authorizationConfigJson, ) as unknown as IAuthorizationConfig; exampleConfig.authorizationProtocol = AuthorizationProtocol.NONE; - + const convictConfig = await configService.newExampleConfigConvict(exampleConfig); @@ -32,24 +31,6 @@ export async function launchApp( LoggerProvider.setLogLevel(serverOptions.logLevel); - const clientGatewayKeyPair = { - privateKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway1"].privateKey, "hex"), - ), - publicKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway1"].publicKey, "hex"), - ), - }; - - const serverGatewayKeyPair = { - privateKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway2"].privateKey, "hex"), - ), - publicKey: Uint8Array.from( - Buffer.from(CryptoMaterial.gateways["gateway2"].publicKey, "hex"), - ), - }; - if ( process.env.API_HOST == undefined || process.env.API_SERVER_1_PORT == undefined || @@ -65,16 +46,16 @@ export async function launchApp( } const appOptions: ICbdcBridgingApp = { - apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), - apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), - apiHost: process.env.API_HOST, - apiGateway1ServerPort: parseInt(process.env.API_GATEWAY_1_SERVER_PORT), - apiGateway1ClientPort: parseInt(process.env.API_GATEWAY_1_CLIENT_PORT), - apiGateway1BloPort: parseInt(process.env.API_GATEWAY_1_BLO_PORT), - apiGateway2ServerPort: parseInt(process.env.API_GATEWAY_2_SERVER_PORT), - apiGateway2ClientPort: parseInt(process.env.API_GATEWAY_2_CLIENT_PORT), - apiGateway2BloPort: parseInt(process.env.API_GATEWAY_2_BLO_PORT), - logLevel: "DEBUG", + apiServer1Port: parseInt(process.env.API_SERVER_1_PORT), + apiServer2Port: parseInt(process.env.API_SERVER_2_PORT), + apiHost: process.env.API_HOST, + apiGateway1ServerPort: parseInt(process.env.API_GATEWAY_1_SERVER_PORT), + apiGateway1ClientPort: parseInt(process.env.API_GATEWAY_1_CLIENT_PORT), + apiGateway1BloPort: parseInt(process.env.API_GATEWAY_1_BLO_PORT), + apiGateway2ServerPort: parseInt(process.env.API_GATEWAY_2_SERVER_PORT), + apiGateway2ClientPort: parseInt(process.env.API_GATEWAY_2_CLIENT_PORT), + apiGateway2BloPort: parseInt(process.env.API_GATEWAY_2_BLO_PORT), + logLevel: "DEBUG", }; const cbdcBridgingApp = new CbdcBridgingApp(appOptions); 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 9dc3082b5d..56b80a015a 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 @@ -1,5 +1,4 @@ import { AddressInfo } from "net"; -import { v4 as uuidv4 } from "uuid"; import exitHook, { IAsyncExitHookDoneCallback } from "async-exit-hook"; import { PluginRegistry } from "@hyperledger/cactus-core"; import { @@ -41,7 +40,6 @@ export interface ICbdcBridgingApp { apiGateway2ClientPort: number; apiGateway2BloPort: number; - logLevel?: LogLevelDesc; apiServerOptions?: ICactusApiServerOptions; disableSignalHandlers?: true; @@ -77,7 +75,7 @@ export class CbdcBridgingApp { }); } - public async start()/*: Promise */{ + public async start() /*: Promise */ { this.log.debug(`Starting CBDC Bridging App...`); if (!this.options.disableSignalHandlers) { @@ -111,30 +109,29 @@ export class CbdcBridgingApp { server: fabricServer, }; addressInfoA = (await Servers.listen(listenOptions)) as AddressInfo; - + await fabricPlugin.getOrCreateWebServices(); await fabricPlugin.registerWebServices(expressApp); + } + { + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + expressApp.use(cors()); + const besuServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: this.options.apiHost, + port: this.options.apiServer2Port, + server: besuServer, + }; + addressInfoB = (await Servers.listen(listenOptions)) as AddressInfo; + await besuPlugin.getOrCreateWebServices(); + const wsApi = new SocketIoServer(besuServer, { + path: Constants.SocketIoConnectionPathV1, + }); + await besuPlugin.registerWebServices(expressApp, wsApi); } - { - const expressApp = express(); - expressApp.use(bodyParser.json({ limit: "250mb" })); - expressApp.use(cors()); - const besuServer = http.createServer(expressApp); - const listenOptions: IListenOptions = { - hostname: this.options.apiHost, - port: this.options.apiServer2Port, - server: besuServer, - }; - addressInfoB = (await Servers.listen(listenOptions)) as AddressInfo; - await besuPlugin.getOrCreateWebServices(); - const wsApi = new SocketIoServer(besuServer, { - path: Constants.SocketIoConnectionPathV1, - }); - await besuPlugin.registerWebServices(expressApp, wsApi); - } - const nodeApiHostA = `http://${this.options.apiHost}:${addressInfoA.port}`; const nodeApiHostB = `http://${this.options.apiHost}:${addressInfoB.port}`; @@ -146,23 +143,24 @@ export class CbdcBridgingApp { new Configuration({ basePath: nodeApiHostB }), ); + this.infrastructure.setFabricApi(fabricApiClient); + this.infrastructure.setBesuApi(besuApiClient); + this.log.info("Deploying chaincode and smart contracts..."); - await this.infrastructure.deployFabricSATPContract(fabricApiClient); + await this.infrastructure.deployFabricSATPContract(); - await this.infrastructure.deployFabricWrapperContract( - fabricApiClient, - ); + await this.infrastructure.deployFabricWrapperContract(); this.log.info("Fabric Chaincode Deployed"); - await this.infrastructure.deployBesuContracts(besuApiClient); + await this.infrastructure.deployBesuContracts(); - await this.infrastructure.initializeContractsAndAddPermitions(fabricApiClient, besuApiClient); + await this.infrastructure.initializeContractsAndAddPermitions(); this.log.info(`Chaincode and smart Contracts deployed.`); const gatways = await this.infrastructure.createSATPGateways(); - for(const gateway of gatways){ + for (const gateway of gatways) { await gateway.startup(); } @@ -229,8 +227,6 @@ export class CbdcBridgingApp { export interface IStartInfo { readonly apiServer1: ApiServer; readonly apiServer2: ApiServer; - //readonly fabricGatewayApi: SatpApi; - //readonly besuGatewayApi: SatpApi; readonly besuApiClient: BesuApi; readonly fabricApiClient: FabricApi; readonly fabricSatpGateway: SATPGateway; diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.gitignore b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.gitignore new file mode 100644 index 0000000000..149b576547 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.npmignore b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.npmignore new file mode 100644 index 0000000000..999d88df69 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES new file mode 100644 index 0000000000..a80cd4f07b --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES @@ -0,0 +1,8 @@ +.gitignore +.npmignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION new file mode 100644 index 0000000000..09a6d30847 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.8.0 diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/api.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/api.ts new file mode 100644 index 0000000000..ef249fa9ea --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -0,0 +1,1098 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * CBDC-example backend API + * Cactus-Example + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +/** + * Request schema for approving a transaction. + * @export + * @interface ApproveRequest + */ +export interface ApproveRequest { + /** + * + * @type {string} + * @memberof ApproveRequest + */ + 'user': string; + /** + * + * @type {string} + * @memberof ApproveRequest + */ + 'amount': string; + /** + * + * @type {TransactRequestSourceChain} + * @memberof ApproveRequest + */ + 'ledger': TransactRequestSourceChain; +} +/** + * Response schema for an amount request. + * @export + * @interface GetBalance200Response + */ +export interface GetBalance200Response { + /** + * + * @type {string} + * @memberof GetBalance200Response + */ + 'amount': string; +} +/** + * + * @export + * @interface GetSessionsReferences200ResponseInner + */ +export interface GetSessionsReferences200ResponseInner { + /** + * + * @type {string} + * @memberof GetSessionsReferences200ResponseInner + */ + 'id': string; + /** + * + * @type {string} + * @memberof GetSessionsReferences200ResponseInner + */ + 'status': string; + /** + * + * @type {string} + * @memberof GetSessionsReferences200ResponseInner + */ + 'sourceLedger': string; + /** + * + * @type {string} + * @memberof GetSessionsReferences200ResponseInner + */ + 'receiverLedger': string; +} +/** + * Request schema for minting an asset. + * @export + * @interface MintRequest + */ +export interface MintRequest { + /** + * + * @type {string} + * @memberof MintRequest + */ + 'user': string; + /** + * + * @type {string} + * @memberof MintRequest + */ + 'amount': string; + /** + * + * @type {TransactRequestSourceChain} + * @memberof MintRequest + */ + 'ledger': TransactRequestSourceChain; +} +/** + * Response schema for a transaction request. + * @export + * @interface Transact200Response + */ +export interface Transact200Response { + /** + * + * @type {Transact200ResponseStatusResponse} + * @memberof Transact200Response + */ + 'statusResponse': Transact200ResponseStatusResponse; +} +/** + * Response schema for a transaction status request. + * @export + * @interface Transact200ResponseStatusResponse + */ +export interface Transact200ResponseStatusResponse { + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'sessionID'?: string; + /** + * + * @type {string} + * @memberof Transact200ResponseStatusResponse + */ + 'status': Transact200ResponseStatusResponseStatusEnum; +} + +export const Transact200ResponseStatusResponseStatusEnum = { + NotFound: 'NOT_FOUND', + Invalid: 'INVALID', + Pending: 'PENDING', + Done: 'DONE', + Failed: 'FAILED' +} as const; + +export type Transact200ResponseStatusResponseStatusEnum = typeof Transact200ResponseStatusResponseStatusEnum[keyof typeof Transact200ResponseStatusResponseStatusEnum]; + +/** + * An Error + * @export + * @interface TransactDefaultResponse + */ +export interface TransactDefaultResponse { + /** + * HTTP error type + * @type {string} + * @memberof TransactDefaultResponse + */ + 'type': string; + /** + * Numeric error code + * @type {number} + * @memberof TransactDefaultResponse + */ + 'code': number; + /** + * HTTP status of the error + * @type {number} + * @memberof TransactDefaultResponse + */ + 'status': number; + /** + * Long error description + * @type {string} + * @memberof TransactDefaultResponse + */ + 'message': string; + /** + * Timestamp of the error + * @type {string} + * @memberof TransactDefaultResponse + */ + 'timestamp': string; +} +/** + * Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and receiver DLT networks. + * @export + * @interface TransactRequest + */ +export interface TransactRequest { + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'sender': string; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'receiver': string; + /** + * + * @type {TransactRequestSourceChain} + * @memberof TransactRequest + */ + 'sourceChain': TransactRequestSourceChain; + /** + * + * @type {TransactRequestSourceChain} + * @memberof TransactRequest + */ + 'receiverChain': TransactRequestSourceChain; + /** + * + * @type {string} + * @memberof TransactRequest + */ + 'amount': string; +} +/** + * Enum for the type of asset being transferred. + * @export + * @interface TransactRequestSourceChain + */ +export interface TransactRequestSourceChain { + /** + * + * @type {string} + * @memberof TransactRequestSourceChain + */ + 'assetType'?: TransactRequestSourceChainAssetTypeEnum; +} + +export const TransactRequestSourceChainAssetTypeEnum = { + Fabric: 'FABRIC', + Besu: 'BESU' +} as const; + +export type TransactRequestSourceChainAssetTypeEnum = typeof TransactRequestSourceChainAssetTypeEnum[keyof typeof TransactRequestSourceChainAssetTypeEnum]; + +/** + * Request schema for transferring an asset. + * @export + * @interface TransferRequest + */ +export interface TransferRequest { + /** + * + * @type {string} + * @memberof TransferRequest + */ + 'from': string; + /** + * + * @type {string} + * @memberof TransferRequest + */ + 'to': string; + /** + * + * @type {TransactRequestSourceChain} + * @memberof TransferRequest + */ + 'sourceChain': TransactRequestSourceChain; + /** + * + * @type {TransactRequestSourceChain} + * @memberof TransferRequest + */ + 'receiverChain': TransactRequestSourceChain; + /** + * + * @type {string} + * @memberof TransferRequest + */ + 'amount': string; +} + +/** + * ApproveApi - axios parameter creator + * @export + */ +export const ApproveApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Approves a certain amount to be transferred from the user\'s account by the bridge. + * @summary Submit a transaction intent + * @param {ApproveRequest} approveRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approve: async (approveRequest: ApproveRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'approveRequest' is not null or undefined + assertParamExists('approve', 'approveRequest', approveRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(approveRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ApproveApi - functional programming interface + * @export + */ +export const ApproveApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ApproveApiAxiosParamCreator(configuration) + return { + /** + * Approves a certain amount to be transferred from the user\'s account by the bridge. + * @summary Submit a transaction intent + * @param {ApproveRequest} approveRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async approve(approveRequest: ApproveRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approve(approveRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ApproveApi.approve']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ApproveApi - factory interface + * @export + */ +export const ApproveApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ApproveApiFp(configuration) + return { + /** + * Approves a certain amount to be transferred from the user\'s account by the bridge. + * @summary Submit a transaction intent + * @param {ApproveRequest} approveRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + approve(approveRequest: ApproveRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.approve(approveRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ApproveApi - object-oriented interface + * @export + * @class ApproveApi + * @extends {BaseAPI} + */ +export class ApproveApi extends BaseAPI { + /** + * Approves a certain amount to be transferred from the user\'s account by the bridge. + * @summary Submit a transaction intent + * @param {ApproveRequest} approveRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApproveApi + */ + public approve(approveRequest: ApproveRequest, options?: RawAxiosRequestConfig) { + return ApproveApiFp(this.configuration).approve(approveRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * GetAmountApprovedApi - axios parameter creator + * @export + */ +export const GetAmountApprovedApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get the amount approved for a transaction + * @summary Get the amount approved for a transaction + * @param {string} [user] + * @param {GetAmountApprovedChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAmountApproved: async (user?: string, chain?: GetAmountApprovedChainEnum, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (user !== undefined) { + localVarQueryParameter['user'] = user; + } + + if (chain !== undefined) { + localVarQueryParameter['chain'] = chain; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * GetAmountApprovedApi - functional programming interface + * @export + */ +export const GetAmountApprovedApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetAmountApprovedApiAxiosParamCreator(configuration) + return { + /** + * Get the amount approved for a transaction + * @summary Get the amount approved for a transaction + * @param {string} [user] + * @param {GetAmountApprovedChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAmountApproved(user?: string, chain?: GetAmountApprovedChainEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAmountApproved(user, chain, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetAmountApprovedApi.getAmountApproved']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * GetAmountApprovedApi - factory interface + * @export + */ +export const GetAmountApprovedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetAmountApprovedApiFp(configuration) + return { + /** + * Get the amount approved for a transaction + * @summary Get the amount approved for a transaction + * @param {string} [user] + * @param {GetAmountApprovedChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAmountApproved(user?: string, chain?: GetAmountApprovedChainEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getAmountApproved(user, chain, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * GetAmountApprovedApi - object-oriented interface + * @export + * @class GetAmountApprovedApi + * @extends {BaseAPI} + */ +export class GetAmountApprovedApi extends BaseAPI { + /** + * Get the amount approved for a transaction + * @summary Get the amount approved for a transaction + * @param {string} [user] + * @param {GetAmountApprovedChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetAmountApprovedApi + */ + public getAmountApproved(user?: string, chain?: GetAmountApprovedChainEnum, options?: RawAxiosRequestConfig) { + return GetAmountApprovedApiFp(this.configuration).getAmountApproved(user, chain, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const GetAmountApprovedChainEnum = { + Fabric: 'FABRIC', + Besu: 'BESU' +} as const; +export type GetAmountApprovedChainEnum = typeof GetAmountApprovedChainEnum[keyof typeof GetAmountApprovedChainEnum]; + + +/** + * GetBalanceApi - axios parameter creator + * @export + */ +export const GetBalanceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {string} [user] + * @param {GetBalanceChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBalance: async (user?: string, chain?: GetBalanceChainEnum, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/get-balance`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (user !== undefined) { + localVarQueryParameter['user'] = user; + } + + if (chain !== undefined) { + localVarQueryParameter['chain'] = chain; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * GetBalanceApi - functional programming interface + * @export + */ +export const GetBalanceApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetBalanceApiAxiosParamCreator(configuration) + return { + /** + * + * @param {string} [user] + * @param {GetBalanceChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getBalance(user?: string, chain?: GetBalanceChainEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getBalance(user, chain, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetBalanceApi.getBalance']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * GetBalanceApi - factory interface + * @export + */ +export const GetBalanceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetBalanceApiFp(configuration) + return { + /** + * + * @param {string} [user] + * @param {GetBalanceChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getBalance(user?: string, chain?: GetBalanceChainEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getBalance(user, chain, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * GetBalanceApi - object-oriented interface + * @export + * @class GetBalanceApi + * @extends {BaseAPI} + */ +export class GetBalanceApi extends BaseAPI { + /** + * + * @param {string} [user] + * @param {GetBalanceChainEnum} [chain] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetBalanceApi + */ + public getBalance(user?: string, chain?: GetBalanceChainEnum, options?: RawAxiosRequestConfig) { + return GetBalanceApiFp(this.configuration).getBalance(user, chain, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const GetBalanceChainEnum = { + Fabric: 'FABRIC', + Besu: 'BESU' +} as const; +export type GetBalanceChainEnum = typeof GetBalanceChainEnum[keyof typeof GetBalanceChainEnum]; + + +/** + * GetSessionsReferencesApi - axios parameter creator + * @export + */ +export const GetSessionsReferencesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve the status of a SATP sessions of a gateway + * @summary Get SATP current sessions data + * @param {GetSessionsReferencesLedgerEnum} [ledger] Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionsReferences: async (ledger?: GetSessionsReferencesLedgerEnum, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (ledger !== undefined) { + localVarQueryParameter['Ledger'] = ledger; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * GetSessionsReferencesApi - functional programming interface + * @export + */ +export const GetSessionsReferencesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = GetSessionsReferencesApiAxiosParamCreator(configuration) + return { + /** + * Retrieve the status of a SATP sessions of a gateway + * @summary Get SATP current sessions data + * @param {GetSessionsReferencesLedgerEnum} [ledger] Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSessionsReferences(ledger?: GetSessionsReferencesLedgerEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionsReferences(ledger, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['GetSessionsReferencesApi.getSessionsReferences']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * GetSessionsReferencesApi - factory interface + * @export + */ +export const GetSessionsReferencesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = GetSessionsReferencesApiFp(configuration) + return { + /** + * Retrieve the status of a SATP sessions of a gateway + * @summary Get SATP current sessions data + * @param {GetSessionsReferencesLedgerEnum} [ledger] Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionsReferences(ledger?: GetSessionsReferencesLedgerEnum, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.getSessionsReferences(ledger, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * GetSessionsReferencesApi - object-oriented interface + * @export + * @class GetSessionsReferencesApi + * @extends {BaseAPI} + */ +export class GetSessionsReferencesApi extends BaseAPI { + /** + * Retrieve the status of a SATP sessions of a gateway + * @summary Get SATP current sessions data + * @param {GetSessionsReferencesLedgerEnum} [ledger] Unique identifier for the session. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GetSessionsReferencesApi + */ + public getSessionsReferences(ledger?: GetSessionsReferencesLedgerEnum, options?: RawAxiosRequestConfig) { + return GetSessionsReferencesApiFp(this.configuration).getSessionsReferences(ledger, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const GetSessionsReferencesLedgerEnum = { + Fabric: 'FABRIC', + Besu: 'BESU' +} as const; +export type GetSessionsReferencesLedgerEnum = typeof GetSessionsReferencesLedgerEnum[keyof typeof GetSessionsReferencesLedgerEnum]; + + +/** + * MintApi - axios parameter creator + * @export + */ +export const MintApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {MintRequest} mintRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + mint: async (mintRequest: MintRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'mintRequest' is not null or undefined + assertParamExists('mint', 'mintRequest', mintRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(mintRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MintApi - functional programming interface + * @export + */ +export const MintApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MintApiAxiosParamCreator(configuration) + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {MintRequest} mintRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async mint(mintRequest: MintRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.mint(mintRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['MintApi.mint']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * MintApi - factory interface + * @export + */ +export const MintApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MintApiFp(configuration) + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {MintRequest} mintRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + mint(mintRequest: MintRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.mint(mintRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MintApi - object-oriented interface + * @export + * @class MintApi + * @extends {BaseAPI} + */ +export class MintApi extends BaseAPI { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {MintRequest} mintRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MintApi + */ + public mint(mintRequest: MintRequest, options?: RawAxiosRequestConfig) { + return MintApiFp(this.configuration).mint(mintRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TransactApi - axios parameter creator + * @export + */ +export const TransactApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact: async (transactRequest: TransactRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactRequest' is not null or undefined + assertParamExists('transact', 'transactRequest', transactRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/transact`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transactRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransactApi - functional programming interface + * @export + */ +export const TransactApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransactApiAxiosParamCreator(configuration) + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async transact(transactRequest: TransactRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.transact(transactRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TransactApi.transact']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * TransactApi - factory interface + * @export + */ +export const TransactApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransactApiFp(configuration) + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transact(transactRequest: TransactRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.transact(transactRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransactApi - object-oriented interface + * @export + * @class TransactApi + * @extends {BaseAPI} + */ +export class TransactApi extends BaseAPI { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransactRequest} transactRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransactApi + */ + public transact(transactRequest: TransactRequest, options?: RawAxiosRequestConfig) { + return TransactApiFp(this.configuration).transact(transactRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TransferApi - axios parameter creator + * @export + */ +export const TransferApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransferRequest} transferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transfer: async (transferRequest: TransferRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'transferRequest' is not null or undefined + assertParamExists('transfer', 'transferRequest', transferRequest) + const localVarPath = `/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(transferRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TransferApi - functional programming interface + * @export + */ +export const TransferApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TransferApiAxiosParamCreator(configuration) + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransferRequest} transferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async transfer(transferRequest: TransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.transfer(transferRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['TransferApi.transfer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * TransferApi - factory interface + * @export + */ +export const TransferApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TransferApiFp(configuration) + return { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransferRequest} transferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + transfer(transferRequest: TransferRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.transfer(transferRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TransferApi - object-oriented interface + * @export + * @class TransferApi + * @extends {BaseAPI} + */ +export class TransferApi extends BaseAPI { + /** + * Allows users to queue intents for transactions based on specified parameters. + * @summary Submit a transaction intent + * @param {TransferRequest} transferRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TransferApi + */ + public transfer(transferRequest: TransferRequest, options?: RawAxiosRequestConfig) { + return TransferApiFp(this.configuration).transfer(transferRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/base.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/base.ts new file mode 100644 index 0000000000..87d9391082 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/base.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * CBDC-example backend API + * Cactus-Example + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +/** + * + * @export + */ +export const operationServerMap: ServerMap = { +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/common.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/common.ts new file mode 100644 index 0000000000..1d05416f2c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * CBDC-example backend API + * Cactus-Example + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/configuration.ts new file mode 100644 index 0000000000..8de5add773 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/configuration.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * CBDC-example backend API + * Cactus-Example + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/git_push.sh b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/index.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/index.ts new file mode 100644 index 0000000000..c4e2fdffd4 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * CBDC-example backend API + * Cactus-Example + * + * The version of the OpenAPI document: 0.0.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/examples/cactus-example-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 826530f8a4..37cd4fb41f 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 @@ -3,6 +3,7 @@ import cors from "cors"; import path from "path"; import { v4 as uuidv4 } from "uuid"; import fs from "fs-extra"; +import bodyParser from "body-parser"; import { Logger, Checks, @@ -12,7 +13,6 @@ import { } from "@hyperledger/cactus-common"; import { BesuTestLedger, - DEFAULT_FABRIC_2_AIO_IMAGE_NAME, FABRIC_25_LTS_AIO_FABRIC_VERSION, FABRIC_25_LTS_AIO_IMAGE_VERSION, FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, @@ -37,18 +37,45 @@ import { PluginFactoryLedgerConnector, PluginLedgerConnectorBesu, Web3SigningCredentialType, - InvokeContractV1Request as BesuInvokeContractV1Request, IPluginLedgerConnectorBesuOptions, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import { PluginRegistry } from "@hyperledger/cactus-core"; import SATPContract from "../../../solidity/main/generated/satp-erc20.sol/SATPContract.json"; import SATPWrapperContract from "../../../solidity/main/generated/satp-wrapper.sol/SATPWrapperContract.json"; -import { PluginFactorySATPGateway, SATPGateway, SATPGatewayConfig } from "@hyperledger/cactus-plugin-satp-hermes"; -import { IPluginFactoryOptions, PluginImportType } from "@hyperledger/cactus-core-api"; +import { + Configuration, + PluginFactorySATPGateway, + SATPGateway, + SATPGatewayConfig, +} from "@hyperledger/cactus-plugin-satp-hermes"; +import { + IWebServiceEndpoint, + PluginImportType, +} from "@hyperledger/cactus-core-api"; import CryptoMaterial from "../../../crypto-material/crypto-material.json"; -import { SupportedChain, GatewayIdentity, DraftVersions, Address } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/core/types"; -import { FabricConfig, NetworkConfig } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction"; +import { + SupportedChain, + GatewayIdentity, + DraftVersions, +} from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/core/types"; +import { FabricConfig } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction"; import { bufArray2HexStr } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils"; +import { SessionReference } from "../types"; + +import BesuSATPInteraction from "../../../ontology/besu-erc20-ontology.json"; +import FabricSATPInteraction from "../../../ontology/fabric-erc20-ontology.json"; +import { ApproveEndpointV1 } from "../web-services/approve-endpoint"; +import { GetSessionsDataEndpointV1 } from "../web-services/get-all-session-data-endpoints"; +import { GetBalanceEndpointV1 } from "../web-services/get-balance-endpoint"; +import { MintEndpointV1 } from "../web-services/mint-endpoint"; +import { TransactEndpointV1 } from "../web-services/transact-endpoint"; +import { TransferEndpointV1 } from "../web-services/transfer-endpoint"; +import { GetAmountApprovedEndpointV1 } from "../web-services/get-amount-approved-endpoint"; + +import { + AdminApi, + TransactionApi, +} from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api"; export interface ICbdcBridgingAppDummyInfrastructureOptions { logLevel?: LogLevelDesc; @@ -72,7 +99,9 @@ export class CbdcBridgingAppDummyInfrastructure { private besuFirstHighNetWorthAccountPriv: string = ""; private besuOptions: IPluginLedgerConnectorBesuOptions | undefined; - private fabricConnectorBridgeOptions: IPluginLedgerConnectorFabricOptions | undefined; + private fabricConnectorBridgeOptions: + | IPluginLedgerConnectorFabricOptions + | undefined; private besuContractAddress: string | undefined; private besuWrapperContractAddress: string | undefined; @@ -81,10 +110,20 @@ export class CbdcBridgingAppDummyInfrastructure { private fabricKeychainPlugin: PluginKeychainMemory | undefined; + private fabricApiTransactApi: TransactionApi | undefined; + private besuApiTransactApi: TransactionApi | undefined; + + private fabricApiAdminApi: AdminApi | undefined; + private besuApiAdminApi: AdminApi | undefined; + + private fabricConnectorApi: FabricApi | undefined; + private besuConnectorApi: BesuApi | undefined; + private readonly gatewayFactory = new PluginFactorySATPGateway({ pluginImportType: PluginImportType.Local, }); - + endpoints: any; + public get className(): string { return CbdcBridgingAppDummyInfrastructure.CLASS_NAME; } @@ -93,6 +132,14 @@ export class CbdcBridgingAppDummyInfrastructure { return CbdcBridgingAppDummyInfrastructure.FABRIC_2_AIO_CLI_CFG_DIR; } + public setFabricApi(value: FabricApi) { + this.fabricConnectorApi = value; + } + + public setBesuApi(value: BesuApi) { + this.besuConnectorApi = value; + } + constructor( public readonly options: ICbdcBridgingAppDummyInfrastructureOptions, ) { @@ -143,7 +190,8 @@ export class CbdcBridgingAppDummyInfrastructure { this.log.info(`Starting dummy infrastructure...`); await Promise.all([this.besu.start(), this.fabric.start()]); this.besuFirstHighNetWorthAccount = this.besu.getGenesisAccountPubKey(); - this.besuFirstHighNetWorthAccountPriv = this.besu.getGenesisAccountPrivKey(); + this.besuFirstHighNetWorthAccountPriv = + this.besu.getGenesisAccountPrivKey(); this.log.info(`Started dummy infrastructure OK`); } catch (ex) { this.log.error(`Starting of dummy infrastructure crashed: `, ex); @@ -167,7 +215,8 @@ export class CbdcBridgingAppDummyInfrastructure { public async createFabricLedgerConnector(): Promise { const connectionProfileOrg1 = await this.fabric.getConnectionProfileOrg1(); - const connectionProfileOrg2 = await this.fabric.getConnectionProfileOrgX("org2"); + const connectionProfileOrg2 = + await this.fabric.getConnectionProfileOrgX("org2"); const enrollAdminOutOrg1 = await this.fabric.enrollAdmin(); const adminWalletOrg1 = enrollAdminOutOrg1[1]; @@ -228,16 +277,18 @@ export class CbdcBridgingAppDummyInfrastructure { instanceId: uuidv4(), keychainId: CryptoMaterial.keychains.keychain2.id, logLevel: this.options.logLevel || "INFO", - backend: new Map([ - [keychainEntryKey3, keychainEntryValue3], - ]), + backend: new Map([[keychainEntryKey3, keychainEntryValue3]]), }); - const pluginRegistry = new PluginRegistry({ plugins: [this.fabricKeychainPlugin] }); + const pluginRegistry = new PluginRegistry({ + plugins: [this.fabricKeychainPlugin], + }); - const bridgePluginRegistry = new PluginRegistry({ plugins: [bridgeKeychainPlugin] }); + const bridgePluginRegistry = new PluginRegistry({ + plugins: [bridgeKeychainPlugin], + }); - const fabricOptions = { + const fabricOptions = { instanceId: uuidv4(), dockerBinary: "/usr/local/bin/docker", peerBinary: "/fabric-samples/bin/peer", @@ -255,7 +306,7 @@ export class CbdcBridgingAppDummyInfrastructure { strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, commitTimeout: 300, }, - } + }; this.fabricConnectorBridgeOptions = { instanceId: uuidv4(), @@ -289,7 +340,7 @@ export class CbdcBridgingAppDummyInfrastructure { const keychainEntryValue = JSON.stringify(SATPContract); const keychainEntryKey2 = CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER; - const keychainEntryValue2 = JSON.stringify(SATPWrapperContract); + const keychainEntryValue2 = JSON.stringify(SATPWrapperContract); const keychainPlugin = new PluginKeychainMemory({ instanceId: uuidv4(), @@ -329,50 +380,10 @@ export class CbdcBridgingAppDummyInfrastructure { return besuConnector; } - public async createSATPGateway( - id: string, - name: string, - hostPath: string, - serverPort: number, - clientPort: number, - apiPort: number, - supportedDLTs: SupportedChain[], - proofID: string, - version: DraftVersions[], - logLevel: LogLevelDesc, - counterPartyGateways: GatewayIdentity[], - bridgesConfig: NetworkConfig[], - ): Promise {~ - this.log.info(`Creating Source Gateway...`); - const factoryOptions: IPluginFactoryOptions = { - pluginImportType: PluginImportType.Local, - }; - const factory = new PluginFactorySATPGateway(factoryOptions); - - const gatewayIdentity = { - id, - name, - version, - supportedDLTs, - proofID, - address: `http://${hostPath}`, - gatewayServerPort: serverPort, - gatewayClientPort: clientPort, - gatewayOpenAPIPort: apiPort, - } as GatewayIdentity; - - const options: SATPGatewayConfig = { - logLevel: logLevel, - gid: gatewayIdentity, - counterPartyGateways, - bridgesConfig: bridgesConfig, - }; - return await factory.create(options); - } - public async createSATPGateways(): Promise { const fnTag = `${this.className}#createSATPGateways()`; const logLevel = this.options.logLevel || "INFO"; + this.log.info(`${fnTag} Creating SATP Gateways...`); const fabricGatewayKeyPair = Secp256k1Keys.generateKeyPairsBuffer(); @@ -402,14 +413,16 @@ export class CbdcBridgingAppDummyInfrastructure { gatewayOpenAPIPort: 4110, } as GatewayIdentity; - const pluginBungeeFabricOptions = { //todo change this when bungee is implemented + const pluginBungeeFabricOptions = { + //todo change this when bungee is implemented keyPair: Secp256k1Keys.generateKeyPairsBuffer(), instanceId: uuidv4(), pluginRegistry: new PluginRegistry(), logLevel, }; - const pluginBungeeBesuOptions = { //todo change this when bungee is implemented + const pluginBungeeBesuOptions = { + //todo change this when bungee is implemented keyPair: Secp256k1Keys.generateKeyPairsBuffer(), instanceId: uuidv4(), pluginRegistry: new PluginRegistry(), @@ -446,18 +459,20 @@ export class CbdcBridgingAppDummyInfrastructure { const besuGatewayOptions: SATPGatewayConfig = { logLevel: logLevel, gid: besuGatewayIdentity, - counterPartyGateways: [{ - id: "fabric-satp-gateway-id", - name: "Fabric SATP Gateway", - version: this.draftVersions, - supportedDLTs: [SupportedChain.FABRIC], - proofID: "fabricGatewayProofID", - address: `http://localhost`, - gatewayServerPort: 3010, - gatewayClientPort: 3011, - gatewayOpenAPIPort: 4010, - pubKey: bufArray2HexStr(fabricGatewayKeyPair.publicKey), - } as GatewayIdentity], + counterPartyGateways: [ + { + id: "fabric-satp-gateway-id", + name: "Fabric SATP Gateway", + version: this.draftVersions, + supportedDLTs: [SupportedChain.FABRIC], + proofID: "fabricGatewayProofID", + address: `http://localhost`, + gatewayServerPort: 3010, + gatewayClientPort: 3011, + gatewayOpenAPIPort: 4010, + pubKey: bufArray2HexStr(fabricGatewayKeyPair.publicKey), + } as GatewayIdentity, + ], bridgesConfig: [besuConfig], enableOpenAPI: true, keyPair: besuGatewayKeyPair, @@ -466,18 +481,20 @@ export class CbdcBridgingAppDummyInfrastructure { const fabricGatewayOptions = { logLevel: logLevel, gid: fabricGatewayIdentity, - counterPartyGateways: [{ - id: "besu-satp-gateway-id", - name: "Besu SATP Gateway", - version: this.draftVersions, - supportedDLTs: [SupportedChain.BESU], - proofID: "besuGatewayProofID", - address: `http://localhost`, - gatewayServerPort: 3110, - gatewayClientPort: 3111, - gatewayOpenAPIPort: 4110, - pubKey: bufArray2HexStr(besuGatewayKeyPair.publicKey), - } as GatewayIdentity], + counterPartyGateways: [ + { + id: "besu-satp-gateway-id", + name: "Besu SATP Gateway", + version: this.draftVersions, + supportedDLTs: [SupportedChain.BESU], + proofID: "besuGatewayProofID", + address: `http://localhost`, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + pubKey: bufArray2HexStr(besuGatewayKeyPair.publicKey), + } as GatewayIdentity, + ], bridgesConfig: [fabricConfig], enableOpenAPI: true, keyPair: fabricGatewayKeyPair, @@ -485,22 +502,33 @@ export class CbdcBridgingAppDummyInfrastructure { const besuGateway = await this.gatewayFactory.create(besuGatewayOptions); + const configurationBesuGateway = new Configuration({ + basePath: `http://localhost:${besuGatewayIdentity.gatewayOpenAPIPort}`, + }); + this.log.info(`Besu Gateway created`); - const fabricGateway = await this.gatewayFactory.create(fabricGatewayOptions); - + const fabricGateway = + await this.gatewayFactory.create(fabricGatewayOptions); + + const configurationFabricGateway = new Configuration({ + basePath: `http://localhost:${fabricGatewayIdentity.gatewayOpenAPIPort}`, + }); + this.log.info(`Fabric Gateway created`); + this.besuApiTransactApi = new TransactionApi(configurationBesuGateway); + this.besuApiAdminApi = new AdminApi(configurationBesuGateway); + this.fabricApiTransactApi = new TransactionApi(configurationFabricGateway); + this.fabricApiAdminApi = new AdminApi(configurationFabricGateway); return [fabricGateway, besuGateway]; } - public async deployFabricSATPContract( - fabricApiClient: FabricApi, - ): Promise { + public async deployFabricSATPContract(): Promise { const channelId = "mychannel"; - const contractName = CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT + const contractName = CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT; const contractRelPath = "../../../fabric-contracts/satp-contract/chaincode-typescript"; @@ -592,77 +620,78 @@ export class CbdcBridgingAppDummyInfrastructure { }); } this.log.info(`Deploying Fabric SATP contract in API`); - - const res = await fabricApiClient - .deployContractV1( - { - channelId: channelId, - ccVersion: "1.0.0", - sourceFiles: satpSourceFiles, - ccName: contractName, - targetOrganizations: [this.org1Env, this.org2Env], - caFile: - FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, - ccLabel: contractName, - ccLang: ChainCodeProgrammingLanguage.Typescript, - ccSequence: 1, - orderer: "orderer.example.com:7050", - ordererTLSHostnameOverride: "orderer.example.com", - connTimeout: 60, - }, - // { - // maxContentLength: Infinity, - // maxBodyLength: Infinity, - // }, - ); - const { packageIds, lifecycle, success } = res.data; - - const { - approveForMyOrgList, - installList, - queryInstalledList, - commit, - packaging, - queryCommitted, - } = lifecycle; - - Checks.truthy(packageIds, `packageIds truthy OK`); - Checks.truthy( - Array.isArray(packageIds), - `Array.isArray(packageIds) truthy OK`, - ); - - Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); - Checks.truthy( - Array.isArray(approveForMyOrgList), - `Array.isArray(approveForMyOrgList) truthy OK`, - ); - Checks.truthy(installList, `installList truthy OK`); - Checks.truthy( - Array.isArray(installList), - `Array.isArray(installList) truthy OK`, - ); - Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); - Checks.truthy( - Array.isArray(queryInstalledList), - `Array.isArray(queryInstalledList) truthy OK`, - ); - Checks.truthy(commit, `commit truthy OK`); - Checks.truthy(packaging, `packaging truthy OK`); - Checks.truthy(queryCommitted, `queryCommitted truthy OK`); - this.log.info("SATP Contract deployed"); + if (!this.fabricConnectorApi) { + throw new Error(`Fabric connector API not set`); } - - public async deployFabricWrapperContract( - fabricApiClient: FabricApi, - ): Promise { + const res = await this.fabricConnectorApi.deployContractV1( + { + channelId: channelId, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: contractName, + targetOrganizations: [this.org1Env, this.org2Env], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: contractName, + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }, + // { + // maxContentLength: Infinity, + // maxBodyLength: Infinity, + // }, + ); + + const { packageIds, lifecycle } = res.data; + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + Checks.truthy(packageIds, `packageIds truthy OK`); + Checks.truthy( + Array.isArray(packageIds), + `Array.isArray(packageIds) truthy OK`, + ); + + Checks.truthy(approveForMyOrgList, `approveForMyOrgList truthy OK`); + Checks.truthy( + Array.isArray(approveForMyOrgList), + `Array.isArray(approveForMyOrgList) truthy OK`, + ); + Checks.truthy(installList, `installList truthy OK`); + Checks.truthy( + Array.isArray(installList), + `Array.isArray(installList) truthy OK`, + ); + Checks.truthy(queryInstalledList, `queryInstalledList truthy OK`); + Checks.truthy( + Array.isArray(queryInstalledList), + `Array.isArray(queryInstalledList) truthy OK`, + ); + Checks.truthy(commit, `commit truthy OK`); + Checks.truthy(packaging, `packaging truthy OK`); + Checks.truthy(queryCommitted, `queryCommitted truthy OK`); + this.log.info("SATP Contract deployed"); + } + + public async deployFabricWrapperContract(): Promise { const channelId = "mychannel"; const contractName = CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER; - const contractRelPath = "../../../fabric-contracts/satp-wrapper/chaincode-typescript"; + const contractRelPath = + "../../../fabric-contracts/satp-wrapper/chaincode-typescript"; const contractDir = path.join(__dirname, contractRelPath); // ├── package.json @@ -673,11 +702,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./tsconfig.json"; const relativePath = "./"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -688,11 +713,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./package.json"; const relativePath = "./"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -703,11 +724,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./index.ts"; const relativePath = "./src/"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -718,11 +735,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./interaction-signature.ts"; const relativePath = "./src/"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -733,11 +746,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./ITraceableContract.ts"; const relativePath = "./src/"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -748,11 +757,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./satp-wrapper.ts"; const relativePath = "./src/"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -763,11 +768,7 @@ export class CbdcBridgingAppDummyInfrastructure { { const filename = "./token.ts"; const relativePath = "./src/"; - const filePath = path.join( - contractDir, - relativePath, - filename, - ); + const filePath = path.join(contractDir, relativePath, filename); const buffer = await fs.readFile(filePath); wrapperSourceFiles.push({ body: buffer.toString("base64"), @@ -776,7 +777,11 @@ export class CbdcBridgingAppDummyInfrastructure { }); } - await fabricApiClient + if (!this.fabricConnectorApi) { + throw new Error(`Fabric connector API not set`); + } + + await this.fabricConnectorApi .deployContractV1( { channelId, @@ -837,15 +842,22 @@ export class CbdcBridgingAppDummyInfrastructure { .catch(() => console.log("trying to deploy fabric contract again")); } - public async deployBesuContracts(besuApiClient: BesuApi): Promise { + public async deployBesuContracts(): Promise { const fnTag = `${this.className}#deployBesuContracts()`; + if (!this.besuConnectorApi) { + throw new Error(`${fnTag}, Besu connector API not set`); + } + const deployCbdcContractResponse = - await besuApiClient.deployContractSolBytecodeV1({ + await this.besuConnectorApi.deployContractSolBytecodeV1({ keychainId: CryptoMaterial.keychains.keychain2.id, contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, contractAbi: SATPContract.abi, - constructorArgs: [this.besuFirstHighNetWorthAccount, CbdcBridgingAppDummyInfrastructure.BESU_ASSET_ID], + constructorArgs: [ + this.besuFirstHighNetWorthAccount, + CbdcBridgingAppDummyInfrastructure.BESU_ASSET_ID, + ], web3SigningCredential: { ethAccount: this.besuFirstHighNetWorthAccount, secret: this.besuFirstHighNetWorthAccountPriv, @@ -858,17 +870,18 @@ export class CbdcBridgingAppDummyInfrastructure { if (deployCbdcContractResponse == undefined) { throw new Error(`${fnTag}, error when deploying CBDC smart contract`); } - - this.besuContractAddress = deployCbdcContractResponse.data.transactionReceipt.contractAddress ?? ""; - await this.startDummyServer(this.besuContractAddress); + + this.besuContractAddress = + deployCbdcContractResponse.data.transactionReceipt.contractAddress ?? ""; + + await this.startDummyServer(); + const deployWrapperContractResponse = - await besuApiClient.deployContractSolBytecodeV1({ + await this.besuConnectorApi.deployContractSolBytecodeV1({ keychainId: CryptoMaterial.keychains.keychain2.id, contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, contractAbi: SATPWrapperContract.abi, - constructorArgs: [ - CryptoMaterial.accounts["bridge"].ethAddress, - ], + constructorArgs: [CryptoMaterial.accounts["bridge"].ethAddress], web3SigningCredential: { ethAccount: CryptoMaterial.accounts["bridge"].ethAddress, secret: CryptoMaterial.accounts["bridge"].privateKey, @@ -884,14 +897,18 @@ export class CbdcBridgingAppDummyInfrastructure { ); } - this.besuWrapperContractAddress = deployWrapperContractResponse.data.transactionReceipt.contractAddress ?? ""; + this.besuWrapperContractAddress = + deployWrapperContractResponse.data.transactionReceipt.contractAddress ?? + ""; - const giveRoleRes = await besuApiClient.invokeContractV1({ + const giveRoleRes = await this.besuConnectorApi.invokeContractV1({ contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, keychainId: CryptoMaterial.keychains.keychain2.id, invocationType: EthContractInvocationType.Send, methodName: "giveRole", - params: [deployWrapperContractResponse.data.transactionReceipt.contractAddress], + params: [ + deployWrapperContractResponse.data.transactionReceipt.contractAddress, + ], signingCredential: { ethAccount: this.besuFirstHighNetWorthAccount, secret: this.besuFirstHighNetWorthAccountPriv, @@ -899,7 +916,7 @@ export class CbdcBridgingAppDummyInfrastructure { }, gas: 1000000, }); - const giveRoleRes1 = await besuApiClient.invokeContractV1({ + const giveRoleRes1 = await this.besuConnectorApi.invokeContractV1({ contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, keychainId: CryptoMaterial.keychains.keychain2.id, invocationType: EthContractInvocationType.Send, @@ -914,129 +931,743 @@ export class CbdcBridgingAppDummyInfrastructure { }); Checks.truthy(giveRoleRes, "giveRoleRes"); + Checks.truthy(giveRoleRes1, "giveRoleRes1"); } - public async initializeContractsAndAddPermitions(fabricApiClient: FabricApi, besuApiClient: BesuApi) { + public async initializeContractsAndAddPermitions() { + if (!this.fabricConnectorApi) { + throw new Error(`Fabric connector API not set`); + } - const fabricInitializeResponse = await fabricApiClient.runTransactionV1({ - contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, - channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, - params: [this.userIdentity1.mspId, CbdcBridgingAppDummyInfrastructure.FABRIC_ASSET_ID], - methodName: "InitToken", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId: this.fabricKeychainPlugin?.getKeychainId()!, - keychainRef: "userA", - }, - }); + if (this.fabricKeychainPlugin === undefined) { + throw new Error(`Fabric keychain plugin not set`); + } - Checks.truthy(fabricInitializeResponse, "fabricInitializeResponse"); - Checks.truthy(fabricInitializeResponse.status, "fabricInitializeResponse.data"); + const fabricInitializeResponse = + await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [ + this.userIdentity1.mspId, + CbdcBridgingAppDummyInfrastructure.FABRIC_ASSET_ID, + ], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin.getKeychainId()!, + keychainRef: "userA", + }, + }); - if(fabricInitializeResponse.status < 200 || fabricInitializeResponse.status > 299) { + Checks.truthy(fabricInitializeResponse, "fabricInitializeResponse"); + Checks.truthy( + fabricInitializeResponse.status, + "fabricInitializeResponse.data", + ); + + if ( + fabricInitializeResponse.status < 200 || + fabricInitializeResponse.status > 299 + ) { throw new Error("Failed to initialize CBDC Fabric contract"); } - const fabricWrapperInitializeResponse = await fabricApiClient.runTransactionV1({ - contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, - channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, - params: ["Org2MSP"], - methodName: "Initialize", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId: this.fabricKeychainPlugin?.getKeychainId()!, - keychainRef: "adminUser", - }, - }); - - Checks.truthy(fabricWrapperInitializeResponse, "fabricWrapperInitializeResponse"); - Checks.truthy(fabricWrapperInitializeResponse.status, "fabricWrapperInitializeResponse.data"); + const fabricWrapperInitializeResponse = + await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: ["Org2MSP"], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin.getKeychainId()!, + keychainRef: "adminUser", + }, + }); - if(fabricWrapperInitializeResponse.status < 200 || fabricWrapperInitializeResponse.status > 299) { + Checks.truthy( + fabricWrapperInitializeResponse, + "fabricWrapperInitializeResponse", + ); + Checks.truthy( + fabricWrapperInitializeResponse.status, + "fabricWrapperInitializeResponse.data", + ); + + if ( + fabricWrapperInitializeResponse.status < 200 || + fabricWrapperInitializeResponse.status > 299 + ) { throw new Error("Failed to initialize Wrapper Fabric contract"); } - const setBridgeWrapperResponse = await fabricApiClient.runTransactionV1({ - contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, - channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, - params: ["Org2MSP", CryptoMaterial.accounts.bridge.fabricID], - methodName: "setBridge", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId: this.fabricKeychainPlugin?.getKeychainId()!, - keychainRef: "adminUser", - }, - }); + const setBridgeWrapperResponse = + await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: ["Org2MSP", CryptoMaterial.accounts.bridge.fabricID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin.getKeychainId()!, + keychainRef: "adminUser", + }, + }); Checks.truthy(setBridgeWrapperResponse, "setBridgeWrapperResponse"); Checks.truthy(setBridgeWrapperResponse.status, "setBridgeResponse.data"); - if(setBridgeWrapperResponse.status < 200 || setBridgeWrapperResponse.status > 299) { + if ( + setBridgeWrapperResponse.status < 200 || + setBridgeWrapperResponse.status > 299 + ) { throw new Error("Failed to set Bridge Fabric contract"); } - const setBridgeCBDCResponse = await fabricApiClient.runTransactionV1({ - contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, - channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, - params: ["Org2MSP"], - methodName: "setBridge", - invocationType: FabricContractInvocationType.Send, - signingCredential: { - keychainId: this.fabricKeychainPlugin?.getKeychainId()!, - keychainRef: "userA", - }, - }); + const setBridgeCBDCResponse = + await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: this.fabricKeychainPlugin.getKeychainId()!, + keychainRef: "userA", + }, + }); Checks.truthy(setBridgeCBDCResponse, "setBridgeCBDCResponse"); Checks.truthy(setBridgeCBDCResponse.status, "setBridgeCBDCResponse.data"); - if(setBridgeCBDCResponse.status < 200 || setBridgeCBDCResponse.status > 299) { + if ( + setBridgeCBDCResponse.status < 200 || + setBridgeCBDCResponse.status > 299 + ) { throw new Error("Failed to set Bridge Fabric contract"); } - const besuInitializeResponse = await besuApiClient.invokeContractV1({ - contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, - keychainId: CryptoMaterial.keychains.keychain2.id, - invocationType: EthContractInvocationType.Send, - methodName: "giveRole", - params: [this.besuWrapperContractAddress], - signingCredential: { - ethAccount: this.besuFirstHighNetWorthAccount, - secret: this.besuFirstHighNetWorthAccountPriv, - type: Web3SigningCredentialType.PrivateKeyHex, + if (!this.besuConnectorApi) { + throw new Error(`Besu connector API not set`); + } + + const besuInitializeResponse = await this.besuConnectorApi.invokeContractV1( + { + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [this.besuWrapperContractAddress], + signingCredential: { + ethAccount: this.besuFirstHighNetWorthAccount, + secret: this.besuFirstHighNetWorthAccountPriv, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, }, - gas: 1000000, - }); + ); Checks.truthy(besuInitializeResponse, "besuInitializeResponse"); Checks.truthy(besuInitializeResponse.status, "besuInitializeResponse.data"); - if(besuInitializeResponse.status < 200 || besuInitializeResponse.status > 299) { + if ( + besuInitializeResponse.status < 200 || + besuInitializeResponse.status > 299 + ) { throw new Error("Failed to initialize CBDC Besu contract"); } + } + + public async getOrCreateWebServices(): Promise { + const fnTag = `${CbdcBridgingAppDummyInfrastructure.CLASS_NAME}#getOrCreateWebServices()`; + this.log.info(`${fnTag}, Registering webservices`); + + if (Array.isArray(this.endpoints)) { + return this.endpoints; + } + + const approveEndpointV1 = new ApproveEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + const gelAllSessionDataEndpointV1 = new GetSessionsDataEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + + const getBalanceEndpointV1 = new GetBalanceEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + + const mintEndpointV1 = new MintEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + + const transactEndpointV1 = new TransactEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + + const transferEndpointV1 = new TransferEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + + const getApprovedEndpointV1 = new GetAmountApprovedEndpointV1({ + infrastructure: this, + logLevel: this.options.logLevel, + }); + + const theEndpoints = [ + approveEndpointV1, + gelAllSessionDataEndpointV1, + getBalanceEndpointV1, + mintEndpointV1, + transactEndpointV1, + transferEndpointV1, + getApprovedEndpointV1, + ]; + this.endpoints = theEndpoints; + + return theEndpoints; } - async startDummyServer(address: string){ + public async getSessionsData(gateway: string): Promise { + this.log.debug(`Getting sessions data from ${gateway}`); + let api; + if (gateway === "FABRIC") { + api = this.fabricApiAdminApi; + } else { + api = this.besuApiAdminApi; + } + try { + if (api === undefined) { + throw new Error("API is undefined"); + } + const response = await api.getSessionIds(); + + if (response.status !== 200) { + return [ + { + id: "MockID", + status: "undefined", + substatus: "undefined", + sourceLedger: "undefined", + receiverLedger: "undefined", + }, + ]; + } + + const ids = response.data; + + const sessionsData = []; + for (const id of ids) { + try { + const sessionData = await api.getStatus(id); + const data: SessionReference = { + id, + status: sessionData.data.status, + substatus: sessionData.data.substatus, + sourceLedger: sessionData.data.originChain.dltProtocol, + receiverLedger: sessionData.data.destinationChain.dltProtocol, + }; + + sessionsData.push(data); + } catch (error) { + sessionsData.push({ + id: "MockID", + status: "undefined", + substatus: "undefined", + sourceLedger: "undefined", + receiverLedger: "undefined", + }); + } + } + return sessionsData; + } catch (error) { + console.log(error); + return [ + { + id: "MockID", + status: "undefined", + substatus: "undefined", + sourceLedger: "undefined", + receiverLedger: "undefined", + }, + ]; + } + } + + public async bridgeTokens( + sender: string, + recipient: string, + sourceChain: string, + destinationChain: string, + amount: number, + ) { + this.log.debug( + `Bridging tokens from ${sourceChain} to ${destinationChain}`, + ); + let senderAddress; + let receiverAddress; + let sourceAsset; + let receiverAsset; + + let fromDLTNetworkID; + let toDLTNetworkID; + let api; + + if (sourceChain === "FABRIC") { + senderAddress = this.getFabricId(sender); + sourceAsset = this.setFabricAsset(senderAddress as string); + fromDLTNetworkID = "FabricSATPGateway"; + api = this.fabricApiTransactApi; + } else { + senderAddress = this.getEthAddress(sender); + sourceAsset = this.setBesuAsset( + senderAddress as string, + this.besuContractAddress!, + ); + fromDLTNetworkID = "BesuSATPGateway"; + api = this.besuApiTransactApi; + } + + if (destinationChain === "BESU") { + toDLTNetworkID = "BesuSATPGateway"; + receiverAddress = this.getEthAddress(recipient); + receiverAsset = this.setBesuAsset( + receiverAddress as string, + this.besuContractAddress!, + ); + } else { + toDLTNetworkID = "FabricSATPGateway"; + receiverAddress = this.getFabricId(recipient); + receiverAsset = this.setFabricAsset(receiverAddress as string); + } + + if (api === undefined) { + throw new Error("API is undefined"); + } + + try { + await api.transact({ + contextID: "MockID", + fromDLTNetworkID, + toDLTNetworkID, + fromAmount: amount.toString(), + toAmount: amount.toString(), + originatorPubkey: senderAddress, + beneficiaryPubkey: receiverAddress, + sourceAsset, + receiverAsset: receiverAsset, + }); + } catch (error) { + this.log.error( + `Error bridging tokens from ${sourceChain} to ${receiverAsset}`, + ); + throw error; + } + } + + public async getFabricBalance(frontendUser: string) { + const fabricID = this.getFabricId(frontendUser); + this.log.debug(`Getting Fabric balance for user: ${frontendUser}`); + let response; + + if (this.fabricConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + response = await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [fabricID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Call, + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: "userA", + }, + }); + this.log.debug( + `Fabric - Balance for user: ${frontendUser} is ${JSON.stringify(response.data)}`, + ); + } catch (error) { + this.log.error(`Fabric - Error getting balance user: ${frontendUser}`); + return -1; + } + + return parseInt(response.data.functionOutput); + } + + public async getBesuBalance(frontendUser: string) { + const userEthAddress = this.getEthAddress(frontendUser); + this.log.debug(`Getting BESU balance for user: ${frontendUser}`); + + if (this.besuConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + const response = await this.besuConnectorApi.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [userEthAddress], + signingCredential: { + ethAccount: userEthAddress, + secret: this.getEthUserPrKey(frontendUser), + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + this.log.debug( + `BESU - Balance for user: ${frontendUser} is ${JSON.stringify(response.data)}`, + ); + this.log.debug( + `BESU - Balance for user: ${frontendUser} is ${response.data.callOutput}`, + ); + + return parseInt(response.data.callOutput); + } catch (error) { + this.log.error(`BESU - Error getting balance user: ${frontendUser}`); + return -1; + } + } + + public async mintTokensFabric(frontendUser: string, amount: string) { + this.log.debug( + `Minting Fabric tokens for user: ${frontendUser}, amount: ${amount}`, + ); + + if (this.fabricConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + const response = await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [amount], + methodName: "mint", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: this.getUserFromPseudonim(frontendUser), + }, + }); + + this.log.debug( + `Fabric - Minting tokens for user: ${frontendUser} is ${JSON.stringify(response.data)}`, + ); + } catch (error) { + console.error(error.msg); + throw new Error("Failed to mint tokens"); + } + } + + public async mintTokensBesu(user: string, amount: number) { + const userEthAddress = this.getEthAddress(user); + this.log.debug( + `Minting Besu tokens for user: ${userEthAddress}, amount: ${amount}`, + ); + + if (this.besuConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + const response = await this.besuConnectorApi.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [userEthAddress, amount], + signingCredential: { + ethAccount: this.getEthAddress("Bridge"), + secret: this.getEthUserPrKey("Bridge"), + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + this.log.debug( + `Besu - Minting tokens for user: ${user} is ${JSON.stringify(response.data)}`, + ); + } catch (error) { + console.error(error.msg); + throw new Error("Failed to mint tokens"); + } + } + + public async transferTokensFabric( + frontendUserFrom: string, + frontendUserTo: string, + amount: string, + ) { + const to = this.getFabricId(frontendUserTo); + this.log.debug( + `Transferring Fabric tokens from: ${frontendUserFrom} to: ${frontendUserTo}`, + ); + + if (this.fabricConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [to, amount], + methodName: "transfer", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: this.getUserFromPseudonim(frontendUserFrom), + }, + }); + } catch (error) { + console.error(error.msg); + throw new Error("Failed to transfer tokens"); + } + } + + public async transferTokensBesu( + frontendUserFrom: string, + frontendUserTo: string, + amount: number, + ) { + const from = this.getEthAddress(frontendUserFrom); + const to = this.getEthAddress(frontendUserTo); + this.log.debug( + `Transferring Besu tokens from: ${frontendUserFrom} to: ${frontendUserTo}`, + ); + + if (this.besuConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + await this.besuConnectorApi.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "transfer", + params: [to, amount], + signingCredential: { + ethAccount: from, + secret: this.getEthUserPrKey(frontendUserFrom), + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + } catch (error) { + console.error(error); + throw new Error("Failed to transfer tokens"); + } + } + + public async approveNTokensFabric(user: string, amount: string) { + this.log.debug(`Approving Fabric tokens for user: ${user}`); + + if (this.fabricConnectorApi === undefined) { + throw new Error("API is undefined"); + } + await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [CryptoMaterial.accounts.bridge.fabricID, amount], + methodName: "Approve", + invocationType: FabricContractInvocationType.Send, + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: this.getUserFromPseudonim(user), + }, + }); + } + + public async approveNTokensBesu(frontendUserFrom: string, amount: number) { + const from = this.getEthAddress(frontendUserFrom); + this.log.debug(`Approving Besu tokens for user: ${frontendUserFrom}`); + + if (this.besuConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + await this.besuConnectorApi.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [this.besuWrapperContractAddress, amount], + signingCredential: { + ethAccount: from, + secret: this.getEthUserPrKey(frontendUserFrom), + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + } catch (error) { + this.log.error(error); + return -1; + } + } + + public async getAmountApprovedBesu(frontendUser: string) { + const from = this.getEthAddress(frontendUser); + this.log.debug(`Getting approved balance for user: ${frontendUser}`); + + if (this.besuConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + try { + const response = await this.besuConnectorApi.invokeContractV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + keychainId: CryptoMaterial.keychains.keychain2.id, + invocationType: EthContractInvocationType.Call, + methodName: "allowance", + params: [from, this.besuWrapperContractAddress], + signingCredential: { + ethAccount: from, + secret: this.getEthUserPrKey(frontendUser), + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + return response.data.callOutput; + } catch (error) { + this.log.error( + `Besu - Error getting approved balance user: ${frontendUser}`, + ); + return "0"; + } + } + + public async getAmountApprovedFabric(frontendUser: string) { + const owner = this.getFabricId(frontendUser); + this.log.debug(`Getting Fabric approved balance for user: ${frontendUser}`); + + if (this.fabricConnectorApi === undefined) { + throw new Error("API is undefined"); + } + + let response; + try { + response = await this.fabricConnectorApi.runTransactionV1({ + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + params: [owner, CryptoMaterial.accounts.bridge.fabricID], + methodName: "Allowance", + invocationType: FabricContractInvocationType.Call, + signingCredential: { + keychainId: CryptoMaterial.keychains.keychain1.id, + keychainRef: this.getUserFromPseudonim(frontendUser), + }, + }); + } catch (error) { + this.log.error( + `Fabric - Error getting approved balance user: ${frontendUser}`, + ); + return "0"; + } + + return response.data.functionOutput; + } + + private setBesuAsset(owner: string, contractAddress: string) { + return { + owner, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + contractAddress, + }; + } + + private setFabricAsset(owner: string) { + return { + owner, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: CbdcBridgingAppDummyInfrastructure.SATP_CONTRACT, + channelName: CbdcBridgingAppDummyInfrastructure.FABRIC_CHANNEL_NAME, + mspId: "Org1MSP", + }; + } + + private getUserFromPseudonim(user: string): string { + switch (user) { + case "Alice": + return "userA"; + case "Charlie": + return "userB"; + case "Bridge": + return "bridge"; + default: + throw new Error(`User pseudonym not found for user: ${user}`); + } + } + + private getFabricId(user: string) { + switch (this.getUserFromPseudonim(user)) { + case "userA": + return CryptoMaterial.accounts["userA"].fabricID; + case "userB": + return CryptoMaterial.accounts["userB"].fabricID; + case "bridge": + return CryptoMaterial.accounts["bridge"].fabricID; + default: + throw new Error("User not found"); + } + } + + private getEthAddress(user: string) { + switch (this.getUserFromPseudonim(user)) { + case "userA": + return CryptoMaterial.accounts["userA"].ethAddress; + case "userB": + return CryptoMaterial.accounts["userB"].ethAddress; + case "bridge": + return CryptoMaterial.accounts["bridge"].ethAddress; + default: + throw new Error("User not found"); + } + } + + private getEthUserPrKey(user: string) { + switch (this.getUserFromPseudonim(user)) { + case "userA": + return CryptoMaterial.accounts["userA"].privateKey; + case "userB": + return CryptoMaterial.accounts["userB"].privateKey; + case "bridge": + return CryptoMaterial.accounts["bridge"].privateKey; + default: + throw new Error("User not found"); + } + } + + async startDummyServer() { //just to send contract address to the frontend at each run const app = express(); + app.use(bodyParser.json({ limit: "250mb" })); app.use(cors()); const port = 9999; - // Example endpoint that returns the contract address - app.get('/contract-address', (_req: any, res: { json: (arg0: { address: string; }) => void; }) => { - // Replace this with the actual logic to retrieve the contract address - const contractAddress = address; - res.json({ address: contractAddress }); - }); - app.get('/wrapper-address', (_req: any, res: { json: (arg0: { address: string; }) => void; }) => { - // Replace this with the actual logic to retrieve the contract address - const contractAddress = this.besuWrapperContractAddress!; - res.json({ address: contractAddress }); - }); + const webServices = await this.getOrCreateWebServices(); + for (const service of webServices) { + this.log.debug(`Registering web service: ${service.getPath()}`); + await service.registerExpress(app); + } app.listen(port, () => { - //console.log(`Server running on http://localhost:${port}`); + console.log(`Server running on http://localhost:${port}`); }); } -} \ No newline at end of file +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/types.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/types.ts new file mode 100644 index 0000000000..d5091fa452 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/types.ts @@ -0,0 +1,15 @@ +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { CbdcBridgingAppDummyInfrastructure } from "./infrastructure/cbdc-bridging-app-dummy-infrastructure"; + +export interface IRequestOptions { + logLevel?: LogLevelDesc; + infrastructure: CbdcBridgingAppDummyInfrastructure; +} + +export interface SessionReference { + id: string; + status: string; + substatus: string; + sourceLedger: string; + receiverLedger: string; +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/approve-endpoint.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/approve-endpoint.ts new file mode 100644 index 0000000000..65b2e4fcd4 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/approve-endpoint.ts @@ -0,0 +1,105 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../types"; +import OAS from "../../json/openapi-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { + ApproveRequest, + TransactRequestSourceChainAssetTypeEnum, +} from "../generated/openapi/typescript-axios/api"; + +export class ApproveEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "ApproveEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return ApproveEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens"] { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens"]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/approve-tokens"] + .post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + const reqBody: ApproveRequest = req.body; + this.log.debug("reqBody: ", reqBody); + try { + let result; + if ( + reqBody.ledger.assetType === + TransactRequestSourceChainAssetTypeEnum.Besu + ) { + result = await this.options.infrastructure.approveNTokensBesu( + reqBody.user, + parseInt(reqBody.amount), + ); + } else { + result = await this.options.infrastructure.approveNTokensFabric( + reqBody.user, + reqBody.amount, + ); + } + res.status(200).json(result); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-all-session-data-endpoints.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-all-session-data-endpoints.ts new file mode 100644 index 0000000000..247f353f4c --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-all-session-data-endpoints.ts @@ -0,0 +1,100 @@ +import type { Express, Request, Response } from "express"; + +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; +import { + Logger, + Checks, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; + +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; + +import OAS from "../../json/openapi-bundled.json"; +import { IRequestOptions } from "../types"; + +export class GetSessionsDataEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "GetSessionsDataEndpointV1EndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return GetSessionsDataEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getPath(): string { + const apiPath = + OAS.paths[ + "/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references" + ]; + return apiPath.get["x-hyperledger-cacti"].http.path; + } + + public getVerbLowerCase(): string { + const apiPath = + OAS.paths[ + "/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references" + ]; + return apiPath.get["x-hyperledger-cacti"].http.verbLowerCase; + } + + public getOperationId(): string { + return OAS.paths[ + "/api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references" + ].get.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + // TODO discover way to inherit OAS schema and have request types here + // parameter checks should be enforced by the type system + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + const result = await this.options.infrastructure.getSessionsData( + req.query.Ledger as string, + ); + res.status(200).json(result); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-amount-approved-endpoint.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-amount-approved-endpoint.ts new file mode 100644 index 0000000000..cff827929b --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-amount-approved-endpoint.ts @@ -0,0 +1,98 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../types"; +import OAS from "../../json/openapi-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { TransactRequestSourceChainAssetTypeEnum } from "../generated/openapi/typescript-axios/api"; + +export class GetAmountApprovedEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "GetAmountApprovedEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return GetAmountApprovedEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved"] { + return OAS.paths[ + "/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved" + ]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.get["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths[ + "/api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved" + ].get.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + let result; + if (req.query.chain === TransactRequestSourceChainAssetTypeEnum.Besu) { + result = await this.options.infrastructure.getAmountApprovedBesu( + req.query.user as string, + ); + } else { + result = await this.options.infrastructure.getAmountApprovedFabric( + req.query.user as string, + ); + } + res.status(200).json(result); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-balance-endpoint.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-balance-endpoint.ts new file mode 100644 index 0000000000..095e9b1b74 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/get-balance-endpoint.ts @@ -0,0 +1,100 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../types"; +import OAS from "../../json/openapi-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { TransactRequestSourceChainAssetTypeEnum } from "../generated/openapi/typescript-axios/api"; + +export class GetBalanceEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "GetBalanceEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return GetBalanceEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-example-cbdc/get-balance"] { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/get-balance"]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.get["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.get["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/get-balance"].get + .operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + try { + let result; + if ( + (req.query.chain as string) == + TransactRequestSourceChainAssetTypeEnum.Besu + ) { + result = await this.options.infrastructure.getBesuBalance( + req.query.user as string, + ); + } else { + result = await this.options.infrastructure.getFabricBalance( + req.query.user as string, + ); + } + res.status(200).json({ + amount: result, + }); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/mint-endpoint.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/mint-endpoint.ts new file mode 100644 index 0000000000..914a2c060b --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/mint-endpoint.ts @@ -0,0 +1,105 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../types"; +import OAS from "../../json/openapi-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { + MintRequest, + TransactRequestSourceChainAssetTypeEnum, +} from "../generated/openapi/typescript-axios/api"; + +export class MintEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "MintEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return MintEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens"] { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens"]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/mint-tokens"] + .post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + const reqBody: MintRequest = req.body; + this.log.debug("reqBody: ", reqBody); + try { + let result; + if ( + reqBody.ledger.assetType === + TransactRequestSourceChainAssetTypeEnum.Besu + ) { + result = await this.options.infrastructure.mintTokensBesu( + reqBody.user, + parseInt(reqBody.amount), + ); + } else { + result = await this.options.infrastructure.mintTokensFabric( + reqBody.user, + reqBody.amount, + ); + } + res.status(200).json(result); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transact-endpoint.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transact-endpoint.ts new file mode 100644 index 0000000000..8748785af7 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transact-endpoint.ts @@ -0,0 +1,94 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../types"; +import OAS from "../../json/openapi-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { TransactRequest } from "../generated/openapi/typescript-axios/api"; + +export class TransactEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "TransactEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return TransactEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-example-cbdc/transact"] { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/transact"]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/transact"].post + .operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + const reqBody: TransactRequest = req.body; + this.log.debug("reqBody: ", reqBody); + try { + const result = await this.options.infrastructure.bridgeTokens( + reqBody.sender, + reqBody.receiver, + reqBody.sourceChain.assetType!, + reqBody.receiverChain.assetType!, + parseInt(reqBody.amount), + ); + res.status(200).json(result); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transfer-endpoint.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transfer-endpoint.ts new file mode 100644 index 0000000000..50e86a5887 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/web-services/transfer-endpoint.ts @@ -0,0 +1,118 @@ +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import type { Express, Request, Response } from "express"; +import { IRequestOptions } from "../types"; +import OAS from "../../json/openapi-bundled.json"; +import { + handleRestEndpointException, + registerWebServiceEndpoint, +} from "@hyperledger/cactus-core"; +import { + TransactRequestSourceChainAssetTypeEnum, + TransferRequest, +} from "../generated/openapi/typescript-axios/api"; + +export class TransferEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "TransferEndpointV1"; + + private readonly log: Logger; + + public get className(): string { + return TransferEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.infrastructure, `${fnTag} arg options.connector`); + + const level = this.options.logLevel || "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens"] { + return OAS.paths[ + "/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens" + ]; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + getVerbLowerCase(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.verbLowerCase; + } + getPath(): string { + return this.oasPath.post["x-hyperledger-cacti"].http.path; + } + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public getOperationId(): string { + return OAS.paths["/api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens"] + .post.operationId; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public async handleRequest(req: Request, res: Response): Promise { + const fnTag = `${this.className}#handleRequest()`; + const reqTag = `${this.getVerbLowerCase()} - ${this.getPath()}`; + this.log.debug(reqTag); + const reqBody: TransferRequest = req.body; + this.log.debug("reqBody: ", reqBody); + try { + let result; + if ( + reqBody.sourceChain.assetType === + TransactRequestSourceChainAssetTypeEnum.Besu && + reqBody.receiverChain.assetType === + TransactRequestSourceChainAssetTypeEnum.Fabric + ) { + result = await this.options.infrastructure.transferTokensBesu( + reqBody.from, + reqBody.to, + parseInt(reqBody.amount), + ); + } else if ( + reqBody.sourceChain.assetType === + TransactRequestSourceChainAssetTypeEnum.Fabric && + reqBody.receiverChain.assetType === + TransactRequestSourceChainAssetTypeEnum.Besu + ) { + result = await this.options.infrastructure.transferTokensFabric( + reqBody.from, + reqBody.to, + reqBody.amount, + ); + } else { + throw new Error("Invalid chain combination"); + } + res.status(200).json(result); + } catch (ex) { + const errorMsg = `${reqTag} ${fnTag} Failed to transact:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi-bundled.yml b/examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi-bundled.yml new file mode 100644 index 0000000000..5470159953 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi-bundled.yml @@ -0,0 +1,530 @@ +openapi: 3.0.3 +info: + title: CBDC-example backend API + version: 0.0.2 + description: | + Cactus-Example + contact: + name: Hyperledger Cacti + x-logo: + altText: Cacti logo + backgroundColor: '#fafafa' + url: 'https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png' +tags: + - name: transaction + description: API endpoints for interacting with blockchains via gateways + - name: admin + description: API endpoints for fetching information on SATP sessions +paths: + /api/v1/@hyperledger/cactus-example-cbdc/transact: + post: + tags: + - transact + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/transact + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Transact + requestBody: + required: true + content: + application/json: + schema: + description: 'Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and receiver DLT networks.' + type: object + required: + - sender + - receiver + - sourceChain + - receiverChain + - amount + properties: + sender: + type: string + example: user1 + receiver: + type: string + example: user2 + sourceChain: + description: Enum for the type of asset being transferred. + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU + receiverChain: + description: Enum for the type of asset being transferred. + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU + amount: + type: string + example: '100' + responses: + '200': + description: Transaction successfully queued + content: + application/json: + schema: + description: Response schema for a transaction request. + type: object + properties: + statusResponse: + description: Response schema for a transaction status request. + type: object + properties: + sessionID: + type: string + example: 123e4567-e89b-12d3-a456-426614174000 + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + required: + - status + required: + - statusResponse + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references: + get: + tags: + - get-sessions-references + summary: Get SATP current sessions data + description: Retrieve the status of a SATP sessions of a gateway + operationId: GetSessionsReferences + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references + parameters: + - name: Ledger + in: query + schema: + type: string + enum: + - FABRIC + - BESU + description: Unique identifier for the session. + responses: + '200': + description: OK + content: + application/json: + schema: + description: Response schema for a transaction status request. + type: array + items: + type: object + properties: + id: + type: string + example: 123e4567-e89b-12d3-a456-426614174000 + status: + type: string + sourceLedger: + type: string + receiverLedger: + type: string + required: + - status + - id + - sourceLedger + - receiverLedger + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-example-cbdc/get-balance: + get: + tags: + - get-balance + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-balance + operationId: GetBalance + parameters: + - name: user + in: query + schema: + type: string + - name: chain + in: query + schema: + type: string + enum: + - FABRIC + - BESU + responses: + '200': + description: OK + content: + application/json: + schema: + description: Response schema for an amount request. + type: object + properties: + amount: + type: string + example: '100' + required: + - amount + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens: + post: + tags: + - mint + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Mint + requestBody: + required: true + content: + application/json: + schema: + description: Request schema for minting an asset. + type: object + properties: + user: + type: string + example: user1 + amount: + type: string + example: '100' + ledger: + description: Enum for the type of asset being transferred. + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU + required: + - user + - amount + - ledger + responses: + '200': + description: Transaction successfully queued + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens: + post: + tags: + - approve + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens + summary: Submit a transaction intent + description: Approves a certain amount to be transferred from the user's account by the bridge. + operationId: Approve + requestBody: + required: true + content: + application/json: + schema: + description: Request schema for approving a transaction. + type: object + properties: + user: + type: string + example: user1 + amount: + type: string + example: '100' + ledger: + description: Enum for the type of asset being transferred. + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU + required: + - user + - amount + - ledger + responses: + '200': + description: Transaction successfully queued + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' + /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved: + get: + tags: + - get-amount-approved + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved + summary: Get the amount approved for a transaction + description: Get the amount approved for a transaction + operationId: GetAmountApproved + parameters: + - name: user + in: query + schema: + type: string + - name: chain + in: query + schema: + type: string + enum: + - FABRIC + - BESU + responses: + '200': + description: OK + content: + application/json: + schema: + type: string + example: '100' + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens: + post: + tags: + - transfer + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Transfer + requestBody: + required: true + content: + application/json: + schema: + description: Request schema for transferring an asset. + type: object + properties: + from: + type: string + example: user1 + to: + type: string + example: user2 + sourceChain: + description: Enum for the type of asset being transferred. + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU + receiverChain: + description: Enum for the type of asset being transferred. + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU + amount: + type: string + example: '100' + required: + - from + - to + - amount + - sourceChain + - receiverChain + responses: + '200': + description: Transaction successfully queued + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + default: + description: An error occurred + content: + application/json: + schema: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: '2021-07-21T17:32:28Z' diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi.yml b/examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi.yml new file mode 100644 index 0000000000..7ff3c9c591 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/yml/openapi.yml @@ -0,0 +1,248 @@ +openapi: 3.0.3 +info: + title: CBDC-example backend API + version: 0.0.2 + description: | + Cactus-Example + contact: + name: Hyperledger Cacti + x-logo: + altText: Cacti logo + backgroundColor: '#fafafa' + url: https://github.com/hyperledger/cacti/blob/main/images/HL_Cacti_Logo_Color.png +tags: + - name: transaction + description: API endpoints for interacting with blockchains via gateways + - name: admin + description: API endpoints for fetching information on SATP sessions +paths: + /api/v1/@hyperledger/cactus-example-cbdc/transact: + post: + tags: + - transact + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/transact + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Transact + requestBody: + required: true + content: + application/json: + schema: + $ref: ./schemas.yml#/TransactRequest + responses: + '200': + description: Transaction successfully queued + content: + application/json: + schema: + $ref: ./schemas.yml#/TransactResponse + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references: + get: + tags: + - get-sessions-references + summary: Get SATP current sessions data + description: Retrieve the status of a SATP sessions of a gateway + operationId: GetSessionsReferences + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-sessions-references + parameters: + - name: Ledger + in: query + schema: + type: string + enum: + - FABRIC + - BESU + description: Unique identifier for the session. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: ./schemas.yml#/SessionsReferencesResponse + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-example-cbdc/get-balance: + get: + tags: + - get-balance + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-balance + operationId: GetBalance + parameters: + - name: user + in: query + schema: + type: string + - name: chain + in: query + schema: + type: string + enum: + - FABRIC + - BESU + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: ./schemas.yml#/BalanceResponse + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens: + post: + tags: + - mint + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/mint-tokens + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Mint + requestBody: + required: true + content: + application/json: + schema: + $ref: ./schemas.yml#/MintRequest + responses: + '200': + description: Transaction successfully queued + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens: + post: + tags: + - approve + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/approve-tokens + summary: Submit a transaction intent + description: Approves a certain amount to be transferred from the user's account by the bridge. + operationId: Approve + requestBody: + required: true + content: + application/json: + schema: + $ref: ./schemas.yml#/ApproveRequest + responses: + '200': + description: Transaction successfully queued + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError + /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved: + get: + tags: + - get-amount-approved + x-hyperledger-cacti: + http: + verbLowerCase: get + path: /api/v1/@hyperledger/cactus-example-cbdc/get-amount-approved + summary: Get the amount approved for a transaction + description: Get the amount approved for a transaction + operationId: GetAmountApproved + parameters: + - name: user + in: query + schema: + type: string + - name: chain + in: query + schema: + type: string + enum: + - FABRIC + - BESU + responses: + '200': + description: OK + content: + application/json: + schema: + type: string + example: "100" + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens: + post: + tags: + - transfer + x-hyperledger-cacti: + http: + verbLowerCase: post + path: /api/v1/@hyperledger/cactus-example-cbdc/transfer-tokens + summary: Submit a transaction intent + description: Allows users to queue intents for transactions based on specified parameters. + operationId: Transfer + requestBody: + required: true + content: + application/json: + schema: + $ref: ./schemas.yml#/TransferRequest + responses: + '200': + description: Transaction successfully queued + '400': + description: Bad request + '404': + description: Transaction not found + '500': + description: Internal server error + default: + description: An error occurred + content: + application/json: + schema: + $ref: ./schemas.yml#/APIError \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/yml/schemas.yml b/examples/cactus-example-cbdc-bridging-backend/src/main/yml/schemas.yml new file mode 100644 index 0000000000..636f28915f --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/yml/schemas.yml @@ -0,0 +1,179 @@ +AssetType: + description: "Enum for the type of asset being transferred." + type: object + properties: + assetType: + type: string + enum: + - FABRIC + - BESU +TransactRequest: + description: "Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and receiver DLT networks." + type: object + required: + - sender + - receiver + - sourceChain + - receiverChain + - amount + properties: + sender: + type: string + example: "user1" + receiver: + type: string + example: "user2" + sourceChain: + $ref: '#/AssetType' + receiverChain: + $ref: '#/AssetType' + amount: + type: string + example: "100" +TransactResponse: + description: "Response schema for a transaction request." + type: object + properties: + statusResponse: + $ref: '#/StatusResponse' + required: + - statusResponse +StatusResponse: + description: "Response schema for a transaction status request." + type: object + properties: + sessionID: + type: string + example: "123e4567-e89b-12d3-a456-426614174000" + status: + type: string + enum: + - NOT_FOUND + - INVALID + - PENDING + - DONE + - FAILED + required: + - status +APIError: + x-category: response + type: object + x-go-type: ApiError + x-go-name: ApiError + description: An Error + required: + - message + - type + - code + - status + - timestamp + properties: + type: + type: string + description: HTTP error type + example: bad-request + code: + type: integer + description: Numeric error code + example: 16384 + status: + type: integer + description: HTTP status of the error + example: 500 + message: + type: string + description: Long error description + example: Oops there's been an internal error handling + timestamp: + type: string + description: Timestamp of the error + example: "2021-07-21T17:32:28Z" +SessionsReferencesResponse: + description: "Response schema for a transaction status request." + type: array + items: + $ref: '#/SessionReference' +SessionReference: + type: object + properties: + id: + type: string + example: "123e4567-e89b-12d3-a456-426614174000" + status: + type: string + sourceLedger: + type: string + receiverLedger: + type: string + required: + - status + - id + - sourceLedger + - receiverLedger + +MintRequest: + description: "Request schema for minting an asset." + type: object + properties: + user: + type: string + example: "user1" + amount: + type: string + example: "100" + ledger: + $ref: '#/AssetType' + required: + - user + - amount + - ledger +BalanceResponse: + description: "Response schema for an amount request." + type: object + properties: + amount: + type: string + example: "100" + required: + - amount +TransferRequest: + description: "Request schema for transferring an asset." + type: object + properties: + from: + type: string + example: "user1" + to: + type: string + example: "user2" + sourceChain: + $ref: '#/AssetType' + receiverChain: + $ref: '#/AssetType' + amount: + type: string + example: "100" + required: + - from + - to + - amount + - sourceChain + - receiverChain +ApproveRequest: + description: "Request schema for approving a transaction." + type: object + properties: + user: + type: string + example: "user1" + amount: + type: string + example: "100" + ledger: + $ref: '#/AssetType' + required: + - user + - amount + - ledger + + \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/ontology/besu-erc20-ontology.json b/examples/cactus-example-cbdc-bridging-backend/src/ontology/besu-erc20-ontology.json similarity index 100% rename from examples/cactus-example-cbdc-bridging-frontend/src/ontology/besu-erc20-ontology.json rename to examples/cactus-example-cbdc-bridging-backend/src/ontology/besu-erc20-ontology.json diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/ontology/fabric-erc20-ontology.json b/examples/cactus-example-cbdc-bridging-backend/src/ontology/fabric-erc20-ontology.json similarity index 100% rename from examples/cactus-example-cbdc-bridging-frontend/src/ontology/fabric-erc20-ontology.json rename to examples/cactus-example-cbdc-bridging-backend/src/ontology/fabric-erc20-ontology.json diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts index c900161f7e..7926e2e5d0 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/integration/cbdc-app-setup-infrastucture.test.ts @@ -1,5 +1,8 @@ import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; -import { pruneDockerAllIfGithubAction, Containers } from "@hyperledger/cactus-test-tooling"; +import { + pruneDockerAllIfGithubAction, + Containers, +} from "@hyperledger/cactus-test-tooling"; import { CbdcBridgingApp } from "../../../main/typescript"; import { ICbdcBridgingApp } from "../../../main/typescript/cbdc-bridging-app"; @@ -18,8 +21,7 @@ beforeAll(async () => { await Containers.logDiagnostics({ logLevel }); fail("Pruning didn't throw OK"); }); - } -); +}); afterAll(async () => { await pruneDockerAllIfGithubAction({ logLevel }) @@ -53,7 +55,7 @@ describe("Setup CBDC app infrastructure", () => { await app.start(); }); - /*it("Should shutdown everything successfully", async () => { - //await app.stop(); - });*/ -}) \ No newline at end of file + it("Should shutdown everything successfully", async () => { + await app.stop(); + }); +}); diff --git a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json index 3d723037bc..c278ff72bf 100644 --- a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json +++ b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "jsx": "react-jsx", + "declaration": true, "composite": true, "outDir": "./dist/lib/", "declarationDir": "dist/lib", @@ -46,7 +48,7 @@ ], "include": [ "./src", - "src/**/*.json" + "src/**/*.json", ], "exclude": [ "./src/fabric-contracts" diff --git a/examples/cactus-example-cbdc-bridging-frontend/.env b/examples/cactus-example-cbdc-bridging-frontend/.env index 656ef3132a..676fc73167 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/.env +++ b/examples/cactus-example-cbdc-bridging-frontend/.env @@ -1 +1,2 @@ -PORT=2000 \ No newline at end of file +PORT=2000 +REACT_APP_BACKEND_PATH=http://localhost:9999 \ No newline at end of file diff --git a/examples/cactus-example-cbdc-bridging-frontend/README.md b/examples/cactus-example-cbdc-bridging-frontend/README.md index 0f48db329e..9089f90efd 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/README.md +++ b/examples/cactus-example-cbdc-bridging-frontend/README.md @@ -17,7 +17,13 @@ docker run -p 2000:2000 cbdc-app-frontend ### Running in debug mode ``` -npm start +yarn start +``` +### Config Variables + +``` +PORT=2000 // port where the frontend will be running +REACT_APP_BACKEND_PATH=http://localhost:9999 // set this to the path where the cbdc backend is running ``` Runs the app in the development mode.\ diff --git a/examples/cactus-example-cbdc-bridging-frontend/config-overrides.js b/examples/cactus-example-cbdc-bridging-frontend/config-overrides.js new file mode 100644 index 0000000000..7fd5ef98ad --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/config-overrides.js @@ -0,0 +1,9 @@ +const { override, addWebpackModuleRule } = require("customize-cra"); + +module.exports = override( + addWebpackModuleRule({ + test: /\.tsx?$/, + use: "ts-loader", + exclude: /node_modules/, + }), +); diff --git a/examples/cactus-example-cbdc-bridging-frontend/package.json b/examples/cactus-example-cbdc-bridging-frontend/package.json index c17cb59c52..6d2465c180 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/package.json +++ b/examples/cactus-example-cbdc-bridging-frontend/package.json @@ -4,10 +4,10 @@ "private": true, "license": "Apache-2.0", "scripts": { - "build": "react-scripts build", - "eject": "react-scripts eject", - "start": "react-scripts start", - "test": "react-scripts test" + "build": "react-app-rewired build", + "eject": "react-app-rewired eject", + "start": "react-app-rewired start", + "test": "react-app-rewired test" }, "browserslist": { "production": [ @@ -21,29 +21,56 @@ "last 1 safari version" ] }, + "contributors": [ + { + "name": "Eduardo Vasques", + "email": "eduardovasques10@tecnico.ulisboa.pt" + }, + { + "name": "André Augusto", + "email": "andre.augusto@tecnico.ulisboa.pt" + }, + { + "name": "Carlos Amaro", + "email": "carlosrscamaro@tecnico.ulisboa.pt" + } + ], "dependencies": { "@emotion/react": "11.11.1", "@emotion/styled": "11.11.0", - "@mui/icons-material": "5.14.19", - "@mui/material": "5.14.19", + "@hyperledger/cactus-example-cbdc-bridging-backend": "2.0.0-rc.7", + "@mui/icons-material": "6.1.1", + "@mui/material": "6.1.1", "@testing-library/jest-dom": "5.17.0", "@testing-library/react": "13.4.0", "@testing-library/user-event": "13.5.0", + "@types/copy-webpack-plugin": "^10.1.0", "@types/jest": "27.5.2", - "@types/node": "18.11.9", - "@types/react": "18.2.39", - "@types/react-dom": "18.2.17", + "@types/node": "^22.6.0", + "@types/react": "18.3.8", + "@types/react-dom": "18.3.0", "axios": "1.7.7", - "react": "18.2.0", - "react-dom": "18.2.0", + "copy-webpack-plugin": "^12.0.2", + "css-loader": "^7.1.2", + "html-webpack-plugin": "^5.6.0", + "react": "18.3.1", + "react-dom": "18.3.1", "react-router-dom": "6.2.1", "react-scripts": "5.0.1", - "typescript": "5.5.2", + "style-loader": "^4.0.0", + "ts-node": "^10.9.2", + "typescript": "^5.6.2", "uuid": "10.0.0", - "web-vitals": "2.1.4" + "webpack": "^5.94.0", + "webpack-cli": "5.1.4", + "webpack-dev-server": "^5.1.0" }, "devDependencies": { - "@types/uuid": "10.0.0" + "@types/customize-cra": "^1", + "@types/uuid": "10.0.0", + "customize-cra": "^1.0.0", + "react-app-rewired": "^2.2.1", + "ts-loader": "^9.5.1" }, "engines": { "node": ">=18", diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx index 3fa4a8c6ff..4eb95b48e3 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/App.tsx @@ -4,11 +4,21 @@ import Helper from "./pages/Helper"; import "./App.css"; function App() { + if ( + process.env.REACT_APP_BACKEND_PATH == undefined || + process.env.REACT_APP_BACKEND_PATH == "" + ) { + console.log("The BACKEND_PATH environment variable must be set."); + throw new Error("The BACKEND_PATH environment variable must be set."); + } return ( - } /> + } + /> } /> diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx deleted file mode 100644 index 5a493ffad7..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/besu-api.tsx +++ /dev/null @@ -1,158 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getEthAddress, getEthUserPrKey } from "./common"; - -const BESU_CONTRACT_CBDC_ERC20_NAME = "SATPContract"; - -export async function authorizeNTokensBesu( - frontendUserFrom: string, - amount: number, -) { - const response = await fetch("http://localhost:9999/wrapper-address"); - const data = await response.json(); - const wrapperAddress = data.address; - - const from = getEthAddress(frontendUserFrom); - const res = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "approve", - gas: 1000000, - params: [wrapperAddress, amount], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUserFrom), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - if (res.status !== 200) { - throw Error(res.status + " :" + res.data); - } -} - -export async function fetchAmountApprovedToBridge(frontendUser: string) { - const response = await fetch("http://localhost:9999/wrapper-address"); - const data = await response.json(); - const wrapperAddress = data.address; - - try { - const from = getEthAddress(frontendUser); - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "CALL", - methodName: "allowance", - gas: 1000000, - params: [from, wrapperAddress], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUser), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - return parseInt(response.data.callOutput); - } catch (error) { - // there is no allowance, so we will return 0 - return 0; - } -} - -export async function transferTokensBesu( - frontendUserFrom: string, - frontendUserTo: string, - amount: number, -) { - const from = getEthAddress(frontendUserFrom); - const to = getEthAddress(frontendUserTo); - try { - await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "SEND", - methodName: "transfer", - gas: 1000000, - params: [to, amount], - signingCredential: { - ethAccount: from, - secret: getEthUserPrKey(frontendUserFrom), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - } catch (error) { - console.error(error); - } -} - -export async function getBesuBalance(frontendUser: string) { - const userEthAddress = getEthAddress(frontendUser); - - try { - const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - invocationType: "CALL", - methodName: "checkBalance", - gas: 900000000, - params: [userEthAddress], - signingCredential: { - ethAccount: userEthAddress, - secret: getEthUserPrKey(frontendUser), - type: "PRIVATE_KEY_HEX", - }, - keychainId: CryptoMaterial.keychains.keychain2.id, - }, - ); - - return parseInt(response.data.callOutput); - } catch (error) { - console.error(error); - return -1; - } -} -export async function mintTokensBesu(user: string, amount: number) { - const userEthAddress = getEthAddress(user); - try { - await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", - { - contractName: BESU_CONTRACT_CBDC_ERC20_NAME, - keychainId: CryptoMaterial.keychains.keychain2.id, - invocationType: "SEND", - methodName: "mint", - params: [userEthAddress, amount], - signingCredential: { - ethAccount: getEthAddress("Bridge"), - secret: getEthUserPrKey("Bridge"), - type: "PRIVATE_KEY_HEX", - }, - gas: 1000000, - }, - ); - } catch (error) { - console.error(error.msg); - } -} - -export function getUserFromEthAddress(ethAddress: string) { - switch (ethAddress) { - case CryptoMaterial.accounts["userA"].ethAddress: - return "Alice"; - case CryptoMaterial.accounts["userB"].ethAddress: - return "Charlie"; - case CryptoMaterial.accounts["bridge"].ethAddress: - return "Bridge"; - default: - break; - } -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx deleted file mode 100644 index 70cbc97624..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/common.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; - -// Input: [Alice, Charlie, Bridge] -export function getUserFromPseudonim(user: string) { - switch (user) { - case "Alice": - return "userA"; - case "Charlie": - return "userB"; - case "Bridge": - return "bridge"; - default: - break; - } -} - -export function getFabricId(user: string) { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].fabricID; - case "userB": - return CryptoMaterial.accounts["userB"].fabricID; - case "bridge": - return CryptoMaterial.accounts["bridge"].fabricID; - default: - break; - } -} - -export function getEthAddress(user: string) { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].ethAddress; - case "userB": - return CryptoMaterial.accounts["userB"].ethAddress; - case "bridge": - return CryptoMaterial.accounts["bridge"].ethAddress; - default: - break; - } -} - -export function getEthUserPrKey(user: string) { - switch (getUserFromPseudonim(user)) { - case "userA": - return CryptoMaterial.accounts["userA"].privateKey; - case "userB": - return CryptoMaterial.accounts["userB"].privateKey; - case "bridge": - return CryptoMaterial.accounts["bridge"].privateKey; - default: - break; - } -} - -export async function checkApiServer1Connection() { - await axios.get("http://localhost:4000/api/v1/api-server/healthcheck"); -} - -export async function checkApiServer2Connection() { - await axios.get("http://localhost:4100/api/v1/api-server/healthcheck"); -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx deleted file mode 100644 index f0aad577bd..0000000000 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/fabric-api.tsx +++ /dev/null @@ -1,178 +0,0 @@ -import axios from "axios"; -import CryptoMaterial from "../crypto-material/crypto-material.json"; -import { getUserFromPseudonim, getFabricId } from "./common"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const FABRIC_CONTRACT_CBDC_ERC20_NAME = "SATPContract"; -const FABRIC_CONTRACT_WRAPPER_NAME = "SATPWrapperContract"; - -export async function getFabricBalance(frontendUser: string) { - const fabricID = getFabricId(frontendUser); - let response; - try { - response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [fabricID], - methodName: "ClientIDAccountBalance", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: "userA", - }, - }, - ); - } catch (error) { - return -1; - } - - return parseInt(response.data.functionOutput); -} - -export async function mintTokensFabric(frontendUser: string, amount: string) { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [amount.toString()], - methodName: "mint", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - - if (response.status === 200) { - // throw error - } -} - -export async function transferTokensFabric( - frontendUserFrom: string, - frontendUserTo: string, - amount: string, -) { - const to = getFabricId(frontendUserTo); - try { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [to, amount.toString()], - methodName: "transfer", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUserFrom), - }, - }, - ); - if (response.status === 200) { - // throw error - } - } catch (error) { - throw error; - console.error(error); - } -} - -export async function getAssetReferencesFabric( - frontendUser: string, -): Promise { - try { - const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_WRAPPER_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [], - methodName: "getAllAssets", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - const array = Array.from(response.data.functionOutput).map((asset) => { - return JSON.parse(asset as string); - }); - return array - .filter((asset: any) => typeof asset === "object") - .map((asset: any) => { - asset.owner = getUserFromFabricId(asset.recipient); - return { - id: asset.id, - numberTokens: asset.amount, - owner: asset.owner, - }; - }); - } catch (error) { - //TODO fix - console.error(error); - return []; - } -} - -export async function authorizeNTokensFabric(user: string, amount: string) { - await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [CryptoMaterial.accounts.bridge.fabricID, amount], - methodName: "Approve", - invocationType: "FabricContractInvocationType.SEND", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(user), - }, - }, - ); -} - -export async function fetchAmountApprovedToBridge(frontendUser: string) { - const owner = getFabricId(frontendUser); - let response; - - try { - response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", - { - contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - params: [owner, CryptoMaterial.accounts.bridge.fabricID], - methodName: "Allowance", - invocationType: "FabricContractInvocationType.CALL", - signingCredential: { - keychainId: CryptoMaterial.keychains.keychain1.id, - keychainRef: getUserFromPseudonim(frontendUser), - }, - }, - ); - } catch (error) { - // there is no allowance, so we will return 0 - return 0; - } - - return parseInt(response.data.functionOutput); -} - -export function getUserFromFabricId(fabricID: string): string { - switch (fabricID) { - case CryptoMaterial.accounts["userA"].fabricID: - return "Alice"; - case CryptoMaterial.accounts["userB"].fabricID: - return "Charlie"; - case CryptoMaterial.accounts["bridge"].fabricID: - return "Bridge"; - default: - return ""; - } -} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx index 0bbafe78c6..ed45477537 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/gateway-api.tsx @@ -1,63 +1,26 @@ -import axios from "axios"; -import { getEthAddress, getFabricId } from "./common"; +import { SessionReference } from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/types"; +/* eslint-disable @typescript-eslint/no-unused-vars */ import { - createSessionReference, - SessionReference, -} from "../models/SessionReference"; + GetSessionsReferencesApi, + TransactApi, +} from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/api"; +import { Configuration } from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/configuration"; -import BesuSATPInteraction from "../ontology/besu-erc20-ontology.json"; -import FabricSATPInteraction from "../ontology/fabric-erc20-ontology.json"; - -const FABRIC_CHANNEL_NAME = "mychannel"; -const CONTRACT_CBDC_ERC20_NAME = "SATPContract"; - -export async function getSessionReferencesBridge(port: string): Promise { +export async function getSessionReferencesBridge( + path: string, + type: "BESU" | "FABRIC", +): Promise { + const getSessionReferencesApi = new GetSessionsReferencesApi( + new Configuration({ basePath: path }), + ); try { - const response = await axios.get( - `http://localhost:${port}/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids`, - {}, - ); - if (response.status !== 200) { - return [ - { - id: "MockID", - status: "undefined", - substatus: "undefined", - originLedger: "undefined", - destinyLedger: "undefined", - }, - ]; - } - const ids = response.data; + const response = await getSessionReferencesApi.getSessionsReferences(type); - const sessionsData = []; - for (const id of ids) { - try { - const sessionData = await axios.get( - `http://localhost:${port}/api/v1/@hyperledger/cactus-plugin-satp-hermes/status`, - { - params: { SessionID: id }, - }, - ); - const data: SessionReference = createSessionReference( - id, - sessionData.data.status, - sessionData.data.substatus, - sessionData.data.originChain.dltProtocol, - sessionData.data.destinationChain.dltProtocol, - ); - sessionsData.push(data); - } catch (error) { - sessionsData.push({ - id: "MockID", - status: "undefined", - substatus: "undefined", - originLedger: "undefined", - destinyLedger: "undefined", - }); - } + if (response.status !== 200) { + throw Error(response.status + " :" + response.data); } - return sessionsData; + console.log(response.data); + return response.data as SessionReference[]; } catch (error) { console.log(error); return [ @@ -65,94 +28,42 @@ export async function getSessionReferencesBridge(port: string): Promise { id: "MockID", status: "undefined", substatus: "undefined", - originLedger: "undefined", - destinyLedger: "undefined", + sourceLedger: "undefined", + receiverLedger: "undefined", }, ]; } } -export async function bridgeTokens( +export async function transactTokens( + path: string, sender: string, - recipient: string, - sourceChain: string, - destinationChain: string, - amount: number, + receiver: string, + sourceChain: "FABRIC" | "BESU", + receiverChain: "FABRIC" | "BESU", + amount: string, ) { - let senderAddress; - let receiverAddress; - let port; - let sourceAsset; - let destinationAsset; - //only way we found to pass contract address from backend to frontend at each run of tests - const response = await fetch("http://localhost:9999/contract-address"); - const data = await response.json(); - const besuContractAddress = data.address; - - let fromDLTNetworkID; - let toDLTNetworkID; - - if (sourceChain === "Fabric") { - senderAddress = getFabricId(sender); - sourceAsset = setFabricAsset(senderAddress as string); - fromDLTNetworkID = "FabricSATPGateway"; - port = "4010"; - } else { - fromDLTNetworkID = "BesuSATPGateway"; - senderAddress = getEthAddress(sender); - sourceAsset = setBesuAsset(senderAddress as string, besuContractAddress); - port = "4110"; - } - - if (destinationChain === "Fabric") { - toDLTNetworkID = "FabricSATPGateway"; - receiverAddress = getFabricId(recipient); - destinationAsset = setFabricAsset(receiverAddress as string); - } else { - toDLTNetworkID = "BesuSATPGateway"; - receiverAddress = getEthAddress(recipient); - destinationAsset = setBesuAsset( - receiverAddress as string, - besuContractAddress, - ); - } + const transactApi = new TransactApi(new Configuration({ basePath: path })); try { - await axios.post( - `http://localhost:${port}/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact`, - { - contextID: "MockID", - fromDLTNetworkID, - toDLTNetworkID, - fromAmount: amount, - toAmount: amount, - receiver: receiverAddress, - originatorPubkey: senderAddress, - beneficiaryPubkey: receiverAddress, - sourceAsset, - destinyAsset: destinationAsset, + const response = await transactApi.transact({ + sender, + receiver, + sourceChain: { + assetType: sourceChain, }, - ); - } catch (error) { - throw error; - //return true; - } + receiverChain: { + assetType: receiverChain, + }, + amount, + }); - function setBesuAsset(owner: string, contractAddress: string) { - return { - owner, - ontology: JSON.stringify(BesuSATPInteraction), - contractName: CONTRACT_CBDC_ERC20_NAME, - contractAddress, - }; - } + if (response.status !== 200) { + throw Error(response.status + " :" + response.data); + } - function setFabricAsset(owner: string) { - return { - owner, - ontology: JSON.stringify(FabricSATPInteraction), - contractName: CONTRACT_CBDC_ERC20_NAME, - channelName: FABRIC_CHANNEL_NAME, - mspId: "Org1MSP", - }; + return true; + } catch (error) { + console.error(error); + return false; } } diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/ledgers-api.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/ledgers-api.tsx new file mode 100644 index 0000000000..113290c7a8 --- /dev/null +++ b/examples/cactus-example-cbdc-bridging-frontend/src/api-calls/ledgers-api.tsx @@ -0,0 +1,146 @@ +import { + ApproveApi, + GetAmountApprovedApi, + GetBalanceApi, + MintApi, + MintRequest, + TransferApi, +} from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/api"; +import { Configuration } from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/generated/openapi/typescript-axios/configuration"; + +export async function approveNTokens( + path: string, + ledger: "FABRIC" | "BESU", + frontendUserFrom: string, + amount: string, +) { + const approveApi = new ApproveApi(new Configuration({ basePath: path })); + try { + const res = await approveApi.approve({ + user: frontendUserFrom, + amount: amount, + ledger: { + assetType: ledger, + }, + }); + + if (res.status !== 200) { + throw Error(res.status + " :" + res.data); + } + + return true; + } catch (error) { + console.error(error); + return false; + } +} + +export async function fetchAmountApprovedToBridge( + path: string, + ledger: "FABRIC" | "BESU", + frontendUser: string, +) { + const getAmountApprovedApi = new GetAmountApprovedApi( + new Configuration({ basePath: path }), + ); + + try { + const response = await getAmountApprovedApi.getAmountApproved( + frontendUser, + ledger, + ); + + if (response.status !== 200) { + throw Error(response.status + " :" + response.data); + } + return parseInt(response.data); + } catch (error) { + console.error(error); + } +} + +export async function transferTokens( + path: string, + ledger: "FABRIC" | "BESU", + frontendUserFrom: string, + frontendUserTo: string, + amount: string, +) { + let receiverLedger: "FABRIC" | "BESU"; + if (ledger === "FABRIC") { + receiverLedger = "BESU"; + } else { + receiverLedger = "FABRIC"; + } + const transferApi = new TransferApi(new Configuration({ basePath: path })); + try { + const res = await transferApi.transfer({ + from: frontendUserFrom, + to: frontendUserTo, + amount: amount, + sourceChain: { + assetType: ledger, + }, + receiverChain: { + assetType: receiverLedger, + }, + }); + + if (res.status !== 200) { + throw Error(res.status + " :" + res.data); + } + return true; + } catch (error) { + console.error(error); + return false; + } +} + +export async function getBalance( + path: string, + ledger: "FABRIC" | "BESU", + frontendUser: string, +) { + const getBalanceApi = new GetBalanceApi( + new Configuration({ basePath: path }), + ); + try { + const response = await getBalanceApi.getBalance(frontendUser, ledger); + + if (response.status !== 200) { + throw Error(response.status + " :" + response.data); + } + if (response.data === undefined) { + return 0; + } + return parseInt(response.data.amount); + } catch (error) { + console.error(error); + return -1; + } +} +export async function mintTokens( + path: string, + ledger: "FABRIC" | "BESU", + user: string, + amount: string, +) { + const mintApi = new MintApi(new Configuration({ basePath: path })); + try { + const response = await mintApi.mint({ + user: user, + amount: amount, + ledger: { + assetType: ledger, + }, + } as MintRequest); + + if (response.status !== 200) { + throw Error(response.status + " :" + response.data); + } + return true; + } catch (error) { + console.error(error); + return false; + } +} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx index a932cbb4e3..193ea3129d 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ActionsContainer.tsx @@ -5,14 +5,14 @@ import CircularProgress from "@mui/material/CircularProgress"; import MintDialog from "./dialogs/MintDialog"; import CrossChainTransferDialog from "./dialogs/CrossChainTransferDialog"; import TransferDialog from "./dialogs/TransferDialog"; -import PermissionDialog from "./dialogs/PermissionDialog"; -import { getFabricBalance } from "../api-calls/fabric-api"; -import { getBesuBalance } from "../api-calls/besu-api"; -import { SessionReference } from "../models/SessionReference"; +import ApprovalDialog from "./dialogs/ApprovalDialog"; +import { getBalance } from "../api-calls/ledgers-api"; +import { SessionReference } from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/types"; import { NormalButton } from "./buttons/NormalButton"; import { CriticalButton } from "./buttons/CriticalButton"; export interface IActionsContainerOptions { + path: string; user: string; ledger: string; sessionRefs: Array; @@ -23,21 +23,20 @@ export default function ActionsContainer(props: IActionsContainerOptions) { const [amount, setAmount] = useState(0); const [mintDialog, setMintDialog] = useState(false); const [transferDialog, setTransferDialog] = useState(false); + const [, setErrorMessage] = useState(""); const [crossChainTransferDialog, setCrossChainTransferDialog] = useState(false); - const [permissionDialog, setGivePermissionDialog] = useState(false); + const [approvalDialog, setGiveApprovalDialog] = useState(false); const [loading, setLoading] = useState(false); useEffect(() => { async function fetchData() { - let response; - if (props.ledger === "Fabric") { - response = await getFabricBalance(props.user); - setAmount(response); - } else if (props.ledger === "Besu") { - response = await getBesuBalance(props.user); - setAmount(response); + if (props.ledger !== "FABRIC" && props.ledger !== "BESU") { + setErrorMessage("Invalid ledger"); + return; } + const response = await getBalance(props.path, props.ledger, props.user); + setAmount(response); setLoading(false); } @@ -103,7 +102,7 @@ export default function ActionsContainer(props: IActionsContainerOptions) { setTransferDialog(true)} > Transfer @@ -113,7 +112,7 @@ export default function ActionsContainer(props: IActionsContainerOptions) { setTransferDialog(true)} > Transfer @@ -124,8 +123,8 @@ export default function ActionsContainer(props: IActionsContainerOptions) { setGivePermissionDialog(true)} + disabled={amount <= 0} + onClick={() => setGiveApprovalDialog(true)} > Approval @@ -135,7 +134,7 @@ export default function ActionsContainer(props: IActionsContainerOptions) { setCrossChainTransferDialog(true)} > Bridge @@ -151,12 +150,14 @@ export default function ActionsContainer(props: IActionsContainerOptions) { )} setMintDialog(false)} /> setTransferDialog(false)} /> setCrossChainTransferDialog(false)} /> - setGivePermissionDialog(false)} + onClose={() => setGiveApprovalDialog(false)} /> ); diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx index aaea6f4030..f9dad940ae 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/ApprovalsTable.tsx @@ -4,7 +4,7 @@ import TableCell from "@mui/material/TableCell"; import TableContainer from "@mui/material/TableContainer"; import TableHead from "@mui/material/TableHead"; import TableRow from "@mui/material/TableRow"; -import { SessionReference } from "../models/SessionReference"; +import { SessionReference } from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/types"; const headCells = [ { diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx index 50bf2ae7f6..4283654708 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/Ledger.tsx @@ -4,42 +4,47 @@ import Grid from "@mui/material/Grid"; import ActionsContainer from "./ActionsContainer"; import CircularProgress from "@mui/material/CircularProgress"; import { getSessionReferencesBridge } from "../api-calls/gateway-api"; -import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridgeFabric } from "../api-calls/fabric-api"; -import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridgeBesu } from "../api-calls/besu-api"; +import { fetchAmountApprovedToBridge as fetchAmountApprovedToBridge } from "../api-calls/ledgers-api"; import SessionReferencesTable from "./SessionReferencesTable"; import ApprovalsTable from "./ApprovalsTable"; +import { SessionReference } from "@hyperledger/cactus-example-cbdc-bridging-backend/src/main/typescript/types"; export interface ILedgerOptions { + path: string; ledger: string; } export default function Ledger(props: ILedgerOptions) { - const [sessionReferences, setAssetReferences] = useState([]); + const [sessionReferences, setAssetReferences] = useState( + [], + ); const [aliceApprovals, setAliceApprovals] = useState(0); const [charlieApprovals, setCharlieApprovals] = useState(0); const [loading, setLoading] = useState(true); useEffect(() => { async function fetchData() { - if (props.ledger === "Fabric") { - const list = await getSessionReferencesBridge("4010"); - setAssetReferences(list); - - const alice = await fetchAmountApprovedToBridgeFabric("Alice"); - setAliceApprovals(alice); + if (props.ledger !== "FABRIC" && props.ledger !== "BESU") { + console.log("Invalid ledger"); + return; + } + const list = await getSessionReferencesBridge(props.path, props.ledger); + setAssetReferences(list); - const charlie = await fetchAmountApprovedToBridgeFabric("Charlie"); - setCharlieApprovals(charlie); - } else { - const list = await getSessionReferencesBridge("4110"); - setAssetReferences(list); + const alice = await fetchAmountApprovedToBridge( + props.path, + props.ledger, + "Alice", + ); - const alice = await fetchAmountApprovedToBridgeBesu("Alice"); - setAliceApprovals(alice); + setAliceApprovals(alice ?? 0); - const charlie = await fetchAmountApprovedToBridgeBesu("Charlie"); - setCharlieApprovals(charlie); - } + const charlie = await fetchAmountApprovedToBridge( + props.path, + props.ledger, + "Charlie", + ); + setCharlieApprovals(charlie ?? 0); setLoading(false); } @@ -59,6 +64,7 @@ export default function Ledger(props: ILedgerOptions) { {row.status} {row.substatus} - {row.originLedger} - {row.destinyLedger} + {row.sourceLedger} + {row.receiverLedger} ))} diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ApprovalDialog.tsx similarity index 87% rename from examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx rename to examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ApprovalDialog.tsx index 9c9ddb474d..0cd670f9c7 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/PermissionDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/ApprovalDialog.tsx @@ -7,10 +7,9 @@ import TextField from "@mui/material/TextField"; import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; -import { authorizeNTokensFabric } from "../../api-calls/fabric-api"; -import { authorizeNTokensBesu } from "../../api-calls/besu-api"; - +import { approveNTokens } from "../../api-calls/ledgers-api"; export interface IPermissionDialogOptions { + path: string; open: boolean; user: string; ledger: string; @@ -59,11 +58,22 @@ export default function setGivePermissionDialog( setErrorMessage("Amount must be a positive value"); } else { setSending(true); - if (props.ledger === "Fabric") { - await authorizeNTokensFabric(props.user, amount.toString()); - } else { - await authorizeNTokensBesu(props.user, amount); + if (props.ledger !== "FABRIC" && props.ledger !== "BESU") { + setErrorMessage("Invalid ledger"); + return; + } + + if ( + await approveNTokens( + props.path, + props.ledger, + props.user, + amount.toString(), + ) + ) { + window.location.reload(); } + props.onClose(); } }; diff --git a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx index 2100ce68b3..b59b912f22 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx +++ b/examples/cactus-example-cbdc-bridging-frontend/src/components/dialogs/CrossChainTransferDialog.tsx @@ -9,11 +9,14 @@ import Select, { SelectChangeEvent } from "@mui/material/Select"; import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; import Alert from "@mui/material/Alert"; -import { bridgeTokens } from "../../api-calls/gateway-api"; +import { transactTokens } from "../../api-calls/gateway-api"; +import FormControl from "@mui/material/FormControl"; +import { InputLabel } from "@mui/material"; const recipients = ["Alice", "Charlie"]; export interface ICrossChainTransferDialogOptions { + path: string; open: boolean; ledger: string; user: string; @@ -70,13 +73,23 @@ export default function CrossChainTransferDialog( setErrorMessage("Amounts must be a positive value"); } else { setSending(true); - await bridgeTokens( - props.user, - recipient, - props.ledger, - props.ledger === "Fabric" ? "Besu" : "Fabric", - amount, - ); + if (props.ledger !== "FABRIC" && props.ledger !== "BESU") { + setErrorMessage("Invalid ledger"); + return; + } + + if ( + await transactTokens( + props.path, + props.user, + recipient, + props.ledger, + props.ledger === "FABRIC" ? "BESU" : "FABRIC", + amount.toString(), + ) + ) { + window.location.reload(); + } } props.onClose(); @@ -87,24 +100,39 @@ export default function CrossChainTransferDialog( {"Cross-Chain Transfer CBDC"} - Select the recipient of the tokens and the amount to transfer to the + Select the tokens' recipient and the amount to be transferred to the other blockchain - + + Recipient + + + any; + onClose: () => unknown; } export default function TransferDialog(props: ITransferDialogOptions) { @@ -68,10 +69,21 @@ export default function TransferDialog(props: ITransferDialogOptions) { } else { setSending(true); - if (props.ledger === "Fabric") { - await transferTokensFabric(props.user, recipient, amount.toString()); - } else { - await transferTokensBesu(props.user, recipient, amount); + if (props.ledger !== "FABRIC" && props.ledger !== "BESU") { + setErrorMessage("Invalid ledger"); + return; + } + + if ( + await transferTokens( + props.path, + props.ledger, + props.user, + recipient, + amount.toString(), + ) + ) { + window.location.reload(); } } props.onClose(); @@ -82,23 +94,38 @@ export default function TransferDialog(props: ITransferDialogOptions) { {"Transfer CBDC"} - Select the recipient of the tokens and the amount to transfer + Select the tokens' recipient and the amount to be transferred - + + Recipient + + + (false); - useEffect(() => { - // const checkConnection = async () => { - // await checkApiServer1Connection() - // .then(() => setErrorDialog(false)) - // .catch(() => setErrorDialog(true)); - // await checkApiServer2Connection() - // .then(() => setErrorDialog(false)) - // .catch(() => setErrorDialog(true)); - // }; - // checkConnection(); - }, []); - return (
- + - + = 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAuditRequest struct { - ctx context.Context - ApiService AdminApi - auditStartDate *time.Time - auditEndDate *time.Time - includeProofs *bool -} - -// The start date for the audit period. -func (r ApiGetAuditRequest) AuditStartDate(auditStartDate time.Time) ApiGetAuditRequest { - r.auditStartDate = &auditStartDate - return r -} - -// The end date for the audit period. -func (r ApiGetAuditRequest) AuditEndDate(auditEndDate time.Time) ApiGetAuditRequest { - r.auditEndDate = &auditEndDate - return r -} - -// Include proofs generated from each gateway transaction. -func (r ApiGetAuditRequest) IncludeProofs(includeProofs bool) ApiGetAuditRequest { - r.includeProofs = &includeProofs - return r -} - -func (r ApiGetAuditRequest) Execute() (*GetAudit200Response, *http.Response, error) { - return r.ApiService.GetAuditExecute(r) -} - -/* -GetAudit Audit transactions - -Audits transactions based on provided filters such as start and end dates. Optionally includes proofs generated from each gateway transaction. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetAuditRequest -*/ -func (a *AdminApiService) GetAudit(ctx context.Context) ApiGetAuditRequest { - return ApiGetAuditRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetAudit200Response -func (a *AdminApiService) GetAuditExecute(r ApiGetAuditRequest) (*GetAudit200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetAudit200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetAudit") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/audit" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.auditStartDate != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "auditStartDate", r.auditStartDate, "") - } - if r.auditEndDate != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "auditEndDate", r.auditEndDate, "") - } - if r.includeProofs != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "includeProofs", r.includeProofs, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetHealthCheckRequest struct { - ctx context.Context - ApiService AdminApi -} - -func (r ApiGetHealthCheckRequest) Execute() (*GetHealthCheck200Response, *http.Response, error) { - return r.ApiService.GetHealthCheckExecute(r) -} - -/* -GetHealthCheck Health check endpoint - -Responds if SATP Hermes is on - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetHealthCheckRequest -*/ -func (a *AdminApiService) GetHealthCheck(ctx context.Context) ApiGetHealthCheckRequest { - return ApiGetHealthCheckRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetHealthCheck200Response -func (a *AdminApiService) GetHealthCheckExecute(r ApiGetHealthCheckRequest) (*GetHealthCheck200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetHealthCheck200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetHealthCheck") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetSessionIdsRequest struct { - ctx context.Context - ApiService AdminApi - sessionsRequest *map[string]interface{} -} - -func (r ApiGetSessionIdsRequest) SessionsRequest(sessionsRequest map[string]interface{}) ApiGetSessionIdsRequest { - r.sessionsRequest = &sessionsRequest - return r -} - -func (r ApiGetSessionIdsRequest) Execute() ([]string, *http.Response, error) { - return r.ApiService.GetSessionIdsExecute(r) -} - -/* -GetSessionIds Get SATP session ids - -Retrieve the all SATP session IDs - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSessionIdsRequest -*/ -func (a *AdminApiService) GetSessionIds(ctx context.Context) ApiGetSessionIdsRequest { - return ApiGetSessionIdsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []string -func (a *AdminApiService) GetSessionIdsExecute(r ApiGetSessionIdsRequest) ([]string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetSessionIds") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.sessionsRequest != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "SessionsRequest", r.sessionsRequest, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetStatusRequest struct { - ctx context.Context - ApiService AdminApi - sessionID *string -} - -// Unique identifier for the session. -func (r ApiGetStatusRequest) SessionID(sessionID string) ApiGetStatusRequest { - r.sessionID = &sessionID - return r -} - -func (r ApiGetStatusRequest) Execute() (*Transact200ResponseStatusResponse, *http.Response, error) { - return r.ApiService.GetStatusExecute(r) -} - -/* -GetStatus Get SATP current session data - -Retrieve the status of a SATP session - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetStatusRequest -*/ -func (a *AdminApiService) GetStatus(ctx context.Context) ApiGetStatusRequest { - return ApiGetStatusRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Transact200ResponseStatusResponse -func (a *AdminApiService) GetStatusExecute(r ApiGetStatusRequest) (*Transact200ResponseStatusResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Transact200ResponseStatusResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetStatus") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.sessionID == nil { - return localVarReturnValue, nil, reportError("sessionID is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "SessionID", r.sessionID, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPauseRequest struct { - ctx context.Context - ApiService AdminApi - pauseRequest *PauseRequest -} - -func (r ApiPauseRequest) PauseRequest(pauseRequest PauseRequest) ApiPauseRequest { - r.pauseRequest = &pauseRequest - return r -} - -func (r ApiPauseRequest) Execute() (*Pause200Response, *http.Response, error) { - return r.ApiService.PauseExecute(r) -} - -/* -Pause Pause a transaction session - -Attempts to pause a previously submitted transaction intent, temporarily halting its execution. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPauseRequest -*/ -func (a *AdminApiService) Pause(ctx context.Context) ApiPauseRequest { - return ApiPauseRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Pause200Response -func (a *AdminApiService) PauseExecute(r ApiPauseRequest) (*Pause200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Pause200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.Pause") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/pause" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.pauseRequest == nil { - return localVarReturnValue, nil, reportError("pauseRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.pauseRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_transaction.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_transaction.go deleted file mode 100644 index ef1bdc66de..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/api_transaction.go +++ /dev/null @@ -1,609 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -type TransactionApi interface { - - /* - Cancel Cancel a transaction session - - Attempts to cancel a previously submitted transaction intent using its session ID. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCancelRequest - */ - Cancel(ctx context.Context) ApiCancelRequest - - // CancelExecute executes the request - // @return Cancel200Response - CancelExecute(r ApiCancelRequest) (*Cancel200Response, *http.Response, error) - - /* - GetIntegrations Get supported integrations - - Retrieves metadata about each supported blockchain networks, chains, and other systems. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetIntegrationsRequest - */ - GetIntegrations(ctx context.Context) ApiGetIntegrationsRequest - - // GetIntegrationsExecute executes the request - // @return []Chains1Inner - GetIntegrationsExecute(r ApiGetIntegrationsRequest) ([]Chains1Inner, *http.Response, error) - - /* - GetRoutes Get a list of routes for a gateway-to-gateway asset transfer - - Get a list of possible routes for swapping one asset for another across multiple exchanges - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRoutesRequest - */ - GetRoutes(ctx context.Context) ApiGetRoutesRequest - - // GetRoutesExecute executes the request - // @return GetRoutes200Response - GetRoutesExecute(r ApiGetRoutesRequest) (*GetRoutes200Response, *http.Response, error) - - /* - Transact Submit a transaction intent - - Allows users to queue intents for transactions based on specified parameters. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTransactRequest - */ - Transact(ctx context.Context) ApiTransactRequest - - // TransactExecute executes the request - // @return Transact200Response - TransactExecute(r ApiTransactRequest) (*Transact200Response, *http.Response, error) -} - -// TransactionApiService TransactionApi service -type TransactionApiService service - -type ApiCancelRequest struct { - ctx context.Context - ApiService TransactionApi - cancelRequest *CancelRequest -} - -func (r ApiCancelRequest) CancelRequest(cancelRequest CancelRequest) ApiCancelRequest { - r.cancelRequest = &cancelRequest - return r -} - -func (r ApiCancelRequest) Execute() (*Cancel200Response, *http.Response, error) { - return r.ApiService.CancelExecute(r) -} - -/* -Cancel Cancel a transaction session - -Attempts to cancel a previously submitted transaction intent using its session ID. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCancelRequest -*/ -func (a *TransactionApiService) Cancel(ctx context.Context) ApiCancelRequest { - return ApiCancelRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Cancel200Response -func (a *TransactionApiService) CancelExecute(r ApiCancelRequest) (*Cancel200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Cancel200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.Cancel") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.cancelRequest == nil { - return localVarReturnValue, nil, reportError("cancelRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.cancelRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetIntegrationsRequest struct { - ctx context.Context - ApiService TransactionApi -} - -func (r ApiGetIntegrationsRequest) Execute() ([]Chains1Inner, *http.Response, error) { - return r.ApiService.GetIntegrationsExecute(r) -} - -/* -GetIntegrations Get supported integrations - -Retrieves metadata about each supported blockchain networks, chains, and other systems. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetIntegrationsRequest -*/ -func (a *TransactionApiService) GetIntegrations(ctx context.Context) ApiGetIntegrationsRequest { - return ApiGetIntegrationsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Chains1Inner -func (a *TransactionApiService) GetIntegrationsExecute(r ApiGetIntegrationsRequest) ([]Chains1Inner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Chains1Inner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.GetIntegrations") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoutesRequest struct { - ctx context.Context - ApiService TransactionApi - fromNetworkID *string - fromAmount *string - fromToken *string - toDLTNetwork *string - toToken *string - fromAddress *string - toAddress *string -} - -// The sending DLT Network. -func (r ApiGetRoutesRequest) FromNetworkID(fromNetworkID string) ApiGetRoutesRequest { - r.fromNetworkID = &fromNetworkID - return r -} - -// The amount that should be sent including all decimals. -func (r ApiGetRoutesRequest) FromAmount(fromAmount string) ApiGetRoutesRequest { - r.fromAmount = &fromAmount - return r -} - -// The token that should be transferred. Can be the address or the symbol. -func (r ApiGetRoutesRequest) FromToken(fromToken string) ApiGetRoutesRequest { - r.fromToken = &fromToken - return r -} - -// The receiving DLT Network. -func (r ApiGetRoutesRequest) ToDLTNetwork(toDLTNetwork string) ApiGetRoutesRequest { - r.toDLTNetwork = &toDLTNetwork - return r -} - -// The token that should be transferred to. Can be the address or the symbol. -func (r ApiGetRoutesRequest) ToToken(toToken string) ApiGetRoutesRequest { - r.toToken = &toToken - return r -} - -// The sending wallet address. -func (r ApiGetRoutesRequest) FromAddress(fromAddress string) ApiGetRoutesRequest { - r.fromAddress = &fromAddress - return r -} - -// The receiving wallet address. If none is provided, the fromAddress will be used. -func (r ApiGetRoutesRequest) ToAddress(toAddress string) ApiGetRoutesRequest { - r.toAddress = &toAddress - return r -} - -func (r ApiGetRoutesRequest) Execute() (*GetRoutes200Response, *http.Response, error) { - return r.ApiService.GetRoutesExecute(r) -} - -/* -GetRoutes Get a list of routes for a gateway-to-gateway asset transfer - -Get a list of possible routes for swapping one asset for another across multiple exchanges - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRoutesRequest -*/ -func (a *TransactionApiService) GetRoutes(ctx context.Context) ApiGetRoutesRequest { - return ApiGetRoutesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRoutes200Response -func (a *TransactionApiService) GetRoutesExecute(r ApiGetRoutesRequest) (*GetRoutes200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRoutes200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.GetRoutes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/routes" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.fromNetworkID == nil { - return localVarReturnValue, nil, reportError("fromNetworkID is required and must be specified") - } - if r.fromAmount == nil { - return localVarReturnValue, nil, reportError("fromAmount is required and must be specified") - } - if r.fromToken == nil { - return localVarReturnValue, nil, reportError("fromToken is required and must be specified") - } - if r.toDLTNetwork == nil { - return localVarReturnValue, nil, reportError("toDLTNetwork is required and must be specified") - } - if r.toToken == nil { - return localVarReturnValue, nil, reportError("toToken is required and must be specified") - } - if r.fromAddress == nil { - return localVarReturnValue, nil, reportError("fromAddress is required and must be specified") - } - if r.toAddress == nil { - return localVarReturnValue, nil, reportError("toAddress is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "fromNetworkID", r.fromNetworkID, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "fromAmount", r.fromAmount, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "fromToken", r.fromToken, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "toDLTNetwork", r.toDLTNetwork, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "toToken", r.toToken, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "fromAddress", r.fromAddress, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "toAddress", r.toAddress, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiTransactRequest struct { - ctx context.Context - ApiService TransactionApi - transactRequest *TransactRequest -} - -func (r ApiTransactRequest) TransactRequest(transactRequest TransactRequest) ApiTransactRequest { - r.transactRequest = &transactRequest - return r -} - -func (r ApiTransactRequest) Execute() (*Transact200Response, *http.Response, error) { - return r.ApiService.TransactExecute(r) -} - -/* -Transact Submit a transaction intent - -Allows users to queue intents for transactions based on specified parameters. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTransactRequest -*/ -func (a *TransactionApiService) Transact(ctx context.Context) ApiTransactRequest { - return ApiTransactRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Transact200Response -func (a *TransactionApiService) TransactExecute(r ApiTransactRequest) (*Transact200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Transact200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionApiService.Transact") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/transact" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.transactRequest == nil { - return localVarReturnValue, nil, reportError("transactRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.transactRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v TransactDefaultResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/client.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/client.go deleted file mode 100644 index 1b530a6229..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/client.go +++ /dev/null @@ -1,659 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the SATP Gateway Client (Business Logic Orchestrator) API v0.0.2 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - AdminApi AdminApi - - TransactionApi TransactionApi -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.AdminApi = (*AdminApiService)(&c.common) - c.TransactionApi = (*TransactionApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/configuration.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/configuration.go deleted file mode 100644 index 1d5aa08091..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/configuration.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/v0.0.1/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "http://{host}:{port}/api/v1/@hyperledger/cactus-plugin-satp-hermes", - Description: "Development server", - Variables: map[string]ServerVariable{ - "host": ServerVariable{ - Description: "No description provided", - DefaultValue: "localhost", - }, - "port": ServerVariable{ - Description: "No description provided", - DefaultValue: "3011", - }, - }, - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Action.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Action.md deleted file mode 100644 index c78ea1b6bb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Action.md +++ /dev/null @@ -1,186 +0,0 @@ -# Action - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**FromAmount** | Pointer to **string** | The amount of 'fromToken' to be transferred, specified as a string to maintain precision. | [optional] -**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**Slippage** | Pointer to **float32** | The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. | [optional] -**FromAddress** | Pointer to **string** | A blockchain address. | [optional] -**ToAddress** | Pointer to **string** | A blockchain address. | [optional] - -## Methods - -### NewAction - -`func NewAction() *Action` - -NewAction instantiates a new Action object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewActionWithDefaults - -`func NewActionWithDefaults() *Action` - -NewActionWithDefaults instantiates a new Action object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFromToken - -`func (o *Action) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetFromToken returns the FromToken field if non-nil, zero value otherwise. - -### GetFromTokenOk - -`func (o *Action) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromToken - -`func (o *Action) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetFromToken sets FromToken field to given value. - -### HasFromToken - -`func (o *Action) HasFromToken() bool` - -HasFromToken returns a boolean if a field has been set. - -### GetFromAmount - -`func (o *Action) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *Action) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *Action) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - -### HasFromAmount - -`func (o *Action) HasFromAmount() bool` - -HasFromAmount returns a boolean if a field has been set. - -### GetToToken - -`func (o *Action) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetToToken returns the ToToken field if non-nil, zero value otherwise. - -### GetToTokenOk - -`func (o *Action) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToToken - -`func (o *Action) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetToToken sets ToToken field to given value. - -### HasToToken - -`func (o *Action) HasToToken() bool` - -HasToToken returns a boolean if a field has been set. - -### GetSlippage - -`func (o *Action) GetSlippage() float32` - -GetSlippage returns the Slippage field if non-nil, zero value otherwise. - -### GetSlippageOk - -`func (o *Action) GetSlippageOk() (*float32, bool)` - -GetSlippageOk returns a tuple with the Slippage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSlippage - -`func (o *Action) SetSlippage(v float32)` - -SetSlippage sets Slippage field to given value. - -### HasSlippage - -`func (o *Action) HasSlippage() bool` - -HasSlippage returns a boolean if a field has been set. - -### GetFromAddress - -`func (o *Action) GetFromAddress() string` - -GetFromAddress returns the FromAddress field if non-nil, zero value otherwise. - -### GetFromAddressOk - -`func (o *Action) GetFromAddressOk() (*string, bool)` - -GetFromAddressOk returns a tuple with the FromAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAddress - -`func (o *Action) SetFromAddress(v string)` - -SetFromAddress sets FromAddress field to given value. - -### HasFromAddress - -`func (o *Action) HasFromAddress() bool` - -HasFromAddress returns a boolean if a field has been set. - -### GetToAddress - -`func (o *Action) GetToAddress() string` - -GetToAddress returns the ToAddress field if non-nil, zero value otherwise. - -### GetToAddressOk - -`func (o *Action) GetToAddressOk() (*string, bool)` - -GetToAddressOk returns a tuple with the ToAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAddress - -`func (o *Action) SetToAddress(v string)` - -SetToAddress sets ToAddress field to given value. - -### HasToAddress - -`func (o *Action) HasToAddress() bool` - -HasToAddress returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md deleted file mode 100644 index b5aff9434e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AdminApi.md +++ /dev/null @@ -1,410 +0,0 @@ -# \AdminApi - -All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CallContinue**](AdminApi.md#CallContinue) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/continue | Continue a paused transaction session -[**GetAudit**](AdminApi.md#GetAudit) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/audit | Audit transactions -[**GetHealthCheck**](AdminApi.md#GetHealthCheck) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck | Health check endpoint -[**GetSessionIds**](AdminApi.md#GetSessionIds) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/get-sessions-ids | Get SATP session ids -[**GetStatus**](AdminApi.md#GetStatus) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/status | Get SATP current session data -[**Pause**](AdminApi.md#Pause) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/pause | Pause a transaction session - - - -## CallContinue - -> Continue200Response CallContinue(ctx).ContinueRequest(continueRequest).Execute() - -Continue a paused transaction session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - continueRequest := *openapiclient.NewContinueRequest("SessionId_example", "ContextId_example") // ContinueRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.CallContinue(context.Background()).ContinueRequest(continueRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.CallContinue``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CallContinue`: Continue200Response - fmt.Fprintf(os.Stdout, "Response from `AdminApi.CallContinue`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCallContinueRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **continueRequest** | [**ContinueRequest**](ContinueRequest.md) | | - -### Return type - -[**Continue200Response**](Continue200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAudit - -> GetAudit200Response GetAudit(ctx).AuditStartDate(auditStartDate).AuditEndDate(auditEndDate).IncludeProofs(includeProofs).Execute() - -Audit transactions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - "time" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - auditStartDate := time.Now() // time.Time | The start date for the audit period. (optional) - auditEndDate := time.Now() // time.Time | The end date for the audit period. (optional) - includeProofs := true // bool | Include proofs generated from each gateway transaction. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetAudit(context.Background()).AuditStartDate(auditStartDate).AuditEndDate(auditEndDate).IncludeProofs(includeProofs).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetAudit``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAudit`: GetAudit200Response - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetAudit`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAuditRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **auditStartDate** | **time.Time** | The start date for the audit period. | - **auditEndDate** | **time.Time** | The end date for the audit period. | - **includeProofs** | **bool** | Include proofs generated from each gateway transaction. | - -### Return type - -[**GetAudit200Response**](GetAudit200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetHealthCheck - -> GetHealthCheck200Response GetHealthCheck(ctx).Execute() - -Health check endpoint - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetHealthCheck(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetHealthCheck``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetHealthCheck`: GetHealthCheck200Response - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetHealthCheck`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetHealthCheckRequest struct via the builder pattern - - -### Return type - -[**GetHealthCheck200Response**](GetHealthCheck200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetSessionIds - -> []string GetSessionIds(ctx).SessionsRequest(sessionsRequest).Execute() - -Get SATP session ids - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - sessionsRequest := map[string]interface{}{ ... } // map[string]interface{} | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetSessionIds(context.Background()).SessionsRequest(sessionsRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetSessionIds``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetSessionIds`: []string - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetSessionIds`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetSessionIdsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sessionsRequest** | [**map[string]interface{}**](map[string]interface{}.md) | | - -### Return type - -**[]string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetStatus - -> Transact200ResponseStatusResponse GetStatus(ctx).SessionID(sessionID).Execute() - -Get SATP current session data - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - sessionID := "000003e8-e0b8-21ee-ba00-325096b39f47" // string | Unique identifier for the session. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetStatus(context.Background()).SessionID(sessionID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetStatus``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetStatus`: Transact200ResponseStatusResponse - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetStatus`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetStatusRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sessionID** | **string** | Unique identifier for the session. | - -### Return type - -[**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## Pause - -> Pause200Response Pause(ctx).PauseRequest(pauseRequest).Execute() - -Pause a transaction session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - pauseRequest := *openapiclient.NewPauseRequest() // PauseRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.Pause(context.Background()).PauseRequest(pauseRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.Pause``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Pause`: Pause200Response - fmt.Fprintf(os.Stdout, "Response from `AdminApi.Pause`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPauseRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pauseRequest** | [**PauseRequest**](PauseRequest.md) | | - -### Return type - -[**Pause200Response**](Pause200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md deleted file mode 100644 index 943cdc53a3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Asset.md +++ /dev/null @@ -1,171 +0,0 @@ -# Asset - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Owner** | **string** | | -**Ontology** | **string** | | -**ContractName** | **string** | | -**ContractAddress** | Pointer to **string** | | [optional] -**MspId** | Pointer to **string** | | [optional] -**ChannelName** | Pointer to **string** | | [optional] - -## Methods - -### NewAsset - -`func NewAsset(owner string, ontology string, contractName string, ) *Asset` - -NewAsset instantiates a new Asset object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAssetWithDefaults - -`func NewAssetWithDefaults() *Asset` - -NewAssetWithDefaults instantiates a new Asset object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetOwner - -`func (o *Asset) GetOwner() string` - -GetOwner returns the Owner field if non-nil, zero value otherwise. - -### GetOwnerOk - -`func (o *Asset) GetOwnerOk() (*string, bool)` - -GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwner - -`func (o *Asset) SetOwner(v string)` - -SetOwner sets Owner field to given value. - - -### GetOntology - -`func (o *Asset) GetOntology() string` - -GetOntology returns the Ontology field if non-nil, zero value otherwise. - -### GetOntologyOk - -`func (o *Asset) GetOntologyOk() (*string, bool)` - -GetOntologyOk returns a tuple with the Ontology field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOntology - -`func (o *Asset) SetOntology(v string)` - -SetOntology sets Ontology field to given value. - - -### GetContractName - -`func (o *Asset) GetContractName() string` - -GetContractName returns the ContractName field if non-nil, zero value otherwise. - -### GetContractNameOk - -`func (o *Asset) GetContractNameOk() (*string, bool)` - -GetContractNameOk returns a tuple with the ContractName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContractName - -`func (o *Asset) SetContractName(v string)` - -SetContractName sets ContractName field to given value. - - -### GetContractAddress - -`func (o *Asset) GetContractAddress() string` - -GetContractAddress returns the ContractAddress field if non-nil, zero value otherwise. - -### GetContractAddressOk - -`func (o *Asset) GetContractAddressOk() (*string, bool)` - -GetContractAddressOk returns a tuple with the ContractAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContractAddress - -`func (o *Asset) SetContractAddress(v string)` - -SetContractAddress sets ContractAddress field to given value. - -### HasContractAddress - -`func (o *Asset) HasContractAddress() bool` - -HasContractAddress returns a boolean if a field has been set. - -### GetMspId - -`func (o *Asset) GetMspId() string` - -GetMspId returns the MspId field if non-nil, zero value otherwise. - -### GetMspIdOk - -`func (o *Asset) GetMspIdOk() (*string, bool)` - -GetMspIdOk returns a tuple with the MspId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMspId - -`func (o *Asset) SetMspId(v string)` - -SetMspId sets MspId field to given value. - -### HasMspId - -`func (o *Asset) HasMspId() bool` - -HasMspId returns a boolean if a field has been set. - -### GetChannelName - -`func (o *Asset) GetChannelName() string` - -GetChannelName returns the ChannelName field if non-nil, zero value otherwise. - -### GetChannelNameOk - -`func (o *Asset) GetChannelNameOk() (*string, bool)` - -GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelName - -`func (o *Asset) SetChannelName(v string)` - -SetChannelName sets ChannelName field to given value. - -### HasChannelName - -`func (o *Asset) HasChannelName() bool` - -HasChannelName returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzJwtClaim.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzJwtClaim.md deleted file mode 100644 index 48c6263e1b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzJwtClaim.md +++ /dev/null @@ -1,11 +0,0 @@ -# AuthzJwtClaim - -## Enum - - -* `iss` (value: `"Hyperledger Labs - Carbon Accounting Tool"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzScope.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzScope.md deleted file mode 100644 index 72eac21201..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/AuthzScope.md +++ /dev/null @@ -1,13 +0,0 @@ -# AuthzScope - -## Enum - - -* `GroupAdmin` (value: `"group:admin"`) - -* `GroupUser` (value: `"group:user"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/BridgeInfo.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/BridgeInfo.md deleted file mode 100644 index 540060af18..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/BridgeInfo.md +++ /dev/null @@ -1,56 +0,0 @@ -# BridgeInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TokenAddress** | Pointer to **string** | The address of the token being transferred. | [optional] - -## Methods - -### NewBridgeInfo - -`func NewBridgeInfo() *BridgeInfo` - -NewBridgeInfo instantiates a new BridgeInfo object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBridgeInfoWithDefaults - -`func NewBridgeInfoWithDefaults() *BridgeInfo` - -NewBridgeInfoWithDefaults instantiates a new BridgeInfo object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTokenAddress - -`func (o *BridgeInfo) GetTokenAddress() string` - -GetTokenAddress returns the TokenAddress field if non-nil, zero value otherwise. - -### GetTokenAddressOk - -`func (o *BridgeInfo) GetTokenAddressOk() (*string, bool)` - -GetTokenAddressOk returns a tuple with the TokenAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenAddress - -`func (o *BridgeInfo) SetTokenAddress(v string)` - -SetTokenAddress sets TokenAddress field to given value. - -### HasTokenAddress - -`func (o *BridgeInfo) HasTokenAddress() bool` - -HasTokenAddress returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Cancel200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Cancel200Response.md deleted file mode 100644 index 3bc8510344..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Cancel200Response.md +++ /dev/null @@ -1,72 +0,0 @@ -# Cancel200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | -**CancelSuccessful** | **bool** | Indicates whether the cancel operation was successful. | - -## Methods - -### NewCancel200Response - -`func NewCancel200Response(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool, ) *Cancel200Response` - -NewCancel200Response instantiates a new Cancel200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCancel200ResponseWithDefaults - -`func NewCancel200ResponseWithDefaults() *Cancel200Response` - -NewCancel200ResponseWithDefaults instantiates a new Cancel200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatusResponse - -`func (o *Cancel200Response) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *Cancel200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *Cancel200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - -### GetCancelSuccessful - -`func (o *Cancel200Response) GetCancelSuccessful() bool` - -GetCancelSuccessful returns the CancelSuccessful field if non-nil, zero value otherwise. - -### GetCancelSuccessfulOk - -`func (o *Cancel200Response) GetCancelSuccessfulOk() (*bool, bool)` - -GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCancelSuccessful - -`func (o *Cancel200Response) SetCancelSuccessful(v bool)` - -SetCancelSuccessful sets CancelSuccessful field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelRequest.md deleted file mode 100644 index bac0a72908..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# CancelRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionID** | **string** | Unique identifier (UUID) for the session. | - -## Methods - -### NewCancelRequest - -`func NewCancelRequest(sessionID string, ) *CancelRequest` - -NewCancelRequest instantiates a new CancelRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCancelRequestWithDefaults - -`func NewCancelRequestWithDefaults() *CancelRequest` - -NewCancelRequestWithDefaults instantiates a new CancelRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSessionID - -`func (o *CancelRequest) GetSessionID() string` - -GetSessionID returns the SessionID field if non-nil, zero value otherwise. - -### GetSessionIDOk - -`func (o *CancelRequest) GetSessionIDOk() (*string, bool)` - -GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionID - -`func (o *CancelRequest) SetSessionID(v string)` - -SetSessionID sets SessionID field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelResponse.md deleted file mode 100644 index e1feb007c4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CancelResponse.md +++ /dev/null @@ -1,72 +0,0 @@ -# CancelResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | -**CancelSuccessful** | **bool** | Indicates whether the cancel operation was successful. | - -## Methods - -### NewCancelResponse - -`func NewCancelResponse(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool, ) *CancelResponse` - -NewCancelResponse instantiates a new CancelResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCancelResponseWithDefaults - -`func NewCancelResponseWithDefaults() *CancelResponse` - -NewCancelResponseWithDefaults instantiates a new CancelResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatusResponse - -`func (o *CancelResponse) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *CancelResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *CancelResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - -### GetCancelSuccessful - -`func (o *CancelResponse) GetCancelSuccessful() bool` - -GetCancelSuccessful returns the CancelSuccessful field if non-nil, zero value otherwise. - -### GetCancelSuccessfulOk - -`func (o *CancelResponse) GetCancelSuccessfulOk() (*bool, bool)` - -GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCancelSuccessful - -`func (o *CancelResponse) SetCancelSuccessful(v bool)` - -SetCancelSuccessful sets CancelSuccessful field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chain.md deleted file mode 100644 index 07315d0b34..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chain.md +++ /dev/null @@ -1,114 +0,0 @@ -# Chain - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainId** | **string** | A unique identifier for the blockchain network. | -**ChainName** | **string** | The name of the blockchain network. | -**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | -**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | - -## Methods - -### NewChain - -`func NewChain(chainId string, chainName string, chainType string, networkName string, ) *Chain` - -NewChain instantiates a new Chain object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewChainWithDefaults - -`func NewChainWithDefaults() *Chain` - -NewChainWithDefaults instantiates a new Chain object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainId - -`func (o *Chain) GetChainId() string` - -GetChainId returns the ChainId field if non-nil, zero value otherwise. - -### GetChainIdOk - -`func (o *Chain) GetChainIdOk() (*string, bool)` - -GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainId - -`func (o *Chain) SetChainId(v string)` - -SetChainId sets ChainId field to given value. - - -### GetChainName - -`func (o *Chain) GetChainName() string` - -GetChainName returns the ChainName field if non-nil, zero value otherwise. - -### GetChainNameOk - -`func (o *Chain) GetChainNameOk() (*string, bool)` - -GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainName - -`func (o *Chain) SetChainName(v string)` - -SetChainName sets ChainName field to given value. - - -### GetChainType - -`func (o *Chain) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *Chain) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *Chain) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetNetworkName - -`func (o *Chain) GetNetworkName() string` - -GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. - -### GetNetworkNameOk - -`func (o *Chain) GetNetworkNameOk() (*string, bool)` - -GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNetworkName - -`func (o *Chain) SetNetworkName(v string)` - -SetNetworkName sets NetworkName field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chains1Inner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chains1Inner.md deleted file mode 100644 index 6946a5c6d4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Chains1Inner.md +++ /dev/null @@ -1,114 +0,0 @@ -# Chains1Inner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainId** | **string** | A unique identifier for the blockchain network. | -**ChainName** | **string** | The name of the blockchain network. | -**ChainType** | **string** | The type of blockchain network (e.g., 'evm', 'fabric'). | -**NetworkName** | **string** | The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). | - -## Methods - -### NewChains1Inner - -`func NewChains1Inner(chainId string, chainName string, chainType string, networkName string, ) *Chains1Inner` - -NewChains1Inner instantiates a new Chains1Inner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewChains1InnerWithDefaults - -`func NewChains1InnerWithDefaults() *Chains1Inner` - -NewChains1InnerWithDefaults instantiates a new Chains1Inner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainId - -`func (o *Chains1Inner) GetChainId() string` - -GetChainId returns the ChainId field if non-nil, zero value otherwise. - -### GetChainIdOk - -`func (o *Chains1Inner) GetChainIdOk() (*string, bool)` - -GetChainIdOk returns a tuple with the ChainId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainId - -`func (o *Chains1Inner) SetChainId(v string)` - -SetChainId sets ChainId field to given value. - - -### GetChainName - -`func (o *Chains1Inner) GetChainName() string` - -GetChainName returns the ChainName field if non-nil, zero value otherwise. - -### GetChainNameOk - -`func (o *Chains1Inner) GetChainNameOk() (*string, bool)` - -GetChainNameOk returns a tuple with the ChainName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainName - -`func (o *Chains1Inner) SetChainName(v string)` - -SetChainName sets ChainName field to given value. - - -### GetChainType - -`func (o *Chains1Inner) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *Chains1Inner) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *Chains1Inner) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetNetworkName - -`func (o *Chains1Inner) GetNetworkName() string` - -GetNetworkName returns the NetworkName field if non-nil, zero value otherwise. - -### GetNetworkNameOk - -`func (o *Chains1Inner) GetNetworkNameOk() (*string, bool)` - -GetNetworkNameOk returns a tuple with the NetworkName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNetworkName - -`func (o *Chains1Inner) SetNetworkName(v string)` - -SetNetworkName sets NetworkName field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Continue200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Continue200Response.md deleted file mode 100644 index 90d4ab92af..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Continue200Response.md +++ /dev/null @@ -1,51 +0,0 @@ -# Continue200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | - -## Methods - -### NewContinue200Response - -`func NewContinue200Response(statusResponse Transact200ResponseStatusResponse, ) *Continue200Response` - -NewContinue200Response instantiates a new Continue200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewContinue200ResponseWithDefaults - -`func NewContinue200ResponseWithDefaults() *Continue200Response` - -NewContinue200ResponseWithDefaults instantiates a new Continue200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatusResponse - -`func (o *Continue200Response) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *Continue200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *Continue200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueRequest.md deleted file mode 100644 index 1bdd7d3aeb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueRequest.md +++ /dev/null @@ -1,72 +0,0 @@ -# ContinueRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionId** | **string** | A unique identifier for the transaction session to be continued. | -**ContextId** | **string** | A unique identifier for the transaction context. | - -## Methods - -### NewContinueRequest - -`func NewContinueRequest(sessionId string, contextId string, ) *ContinueRequest` - -NewContinueRequest instantiates a new ContinueRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewContinueRequestWithDefaults - -`func NewContinueRequestWithDefaults() *ContinueRequest` - -NewContinueRequestWithDefaults instantiates a new ContinueRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSessionId - -`func (o *ContinueRequest) GetSessionId() string` - -GetSessionId returns the SessionId field if non-nil, zero value otherwise. - -### GetSessionIdOk - -`func (o *ContinueRequest) GetSessionIdOk() (*string, bool)` - -GetSessionIdOk returns a tuple with the SessionId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionId - -`func (o *ContinueRequest) SetSessionId(v string)` - -SetSessionId sets SessionId field to given value. - - -### GetContextId - -`func (o *ContinueRequest) GetContextId() string` - -GetContextId returns the ContextId field if non-nil, zero value otherwise. - -### GetContextIdOk - -`func (o *ContinueRequest) GetContextIdOk() (*string, bool)` - -GetContextIdOk returns a tuple with the ContextId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContextId - -`func (o *ContinueRequest) SetContextId(v string)` - -SetContextId sets ContextId field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueResponse.md deleted file mode 100644 index 5be0f5d26f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/ContinueResponse.md +++ /dev/null @@ -1,51 +0,0 @@ -# ContinueResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | - -## Methods - -### NewContinueResponse - -`func NewContinueResponse(statusResponse Transact200ResponseStatusResponse, ) *ContinueResponse` - -NewContinueResponse instantiates a new ContinueResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewContinueResponseWithDefaults - -`func NewContinueResponseWithDefaults() *ContinueResponse` - -NewContinueResponseWithDefaults instantiates a new ContinueResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatusResponse - -`func (o *ContinueResponse) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *ContinueResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *ContinueResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CredentialProfile.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CredentialProfile.md deleted file mode 100644 index 19497ed8b2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/CredentialProfile.md +++ /dev/null @@ -1,15 +0,0 @@ -# CredentialProfile - -## Enum - - -* `SAML` (value: `"SAML"`) - -* `OAUTH` (value: `"OAUTH"`) - -* `X509` (value: `"X509"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/DLTProtocol.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/DLTProtocol.md deleted file mode 100644 index c9590c4d54..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/DLTProtocol.md +++ /dev/null @@ -1,13 +0,0 @@ -# DLTProtocol - -## Enum - - -* `HYPERLEDGER_FABRIC` (value: `"HyperledgerFabric"`) - -* `HYPERLEDGER_BESU` (value: `"HyperledgerBesu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Estimate.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Estimate.md deleted file mode 100644 index d4bf934c4f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Estimate.md +++ /dev/null @@ -1,290 +0,0 @@ -# Estimate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApprovalAddress** | Pointer to **string** | A blockchain address. | [optional] -**ToAmountMin** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**ToAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**FromAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**FeeCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md) | A collection of fee costs associated with the transaction. | [optional] -**GasCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md) | A collection of estimated gas costs for executing the transaction. | [optional] -**ExecutionDuration** | Pointer to **int32** | The estimated duration for the transaction execution in seconds. | [optional] -**FromAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**ToAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**Tool** | Pointer to **string** | The tool or service used to generate this estimate. | [optional] - -## Methods - -### NewEstimate - -`func NewEstimate() *Estimate` - -NewEstimate instantiates a new Estimate object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewEstimateWithDefaults - -`func NewEstimateWithDefaults() *Estimate` - -NewEstimateWithDefaults instantiates a new Estimate object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApprovalAddress - -`func (o *Estimate) GetApprovalAddress() string` - -GetApprovalAddress returns the ApprovalAddress field if non-nil, zero value otherwise. - -### GetApprovalAddressOk - -`func (o *Estimate) GetApprovalAddressOk() (*string, bool)` - -GetApprovalAddressOk returns a tuple with the ApprovalAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApprovalAddress - -`func (o *Estimate) SetApprovalAddress(v string)` - -SetApprovalAddress sets ApprovalAddress field to given value. - -### HasApprovalAddress - -`func (o *Estimate) HasApprovalAddress() bool` - -HasApprovalAddress returns a boolean if a field has been set. - -### GetToAmountMin - -`func (o *Estimate) GetToAmountMin() string` - -GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. - -### GetToAmountMinOk - -`func (o *Estimate) GetToAmountMinOk() (*string, bool)` - -GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountMin - -`func (o *Estimate) SetToAmountMin(v string)` - -SetToAmountMin sets ToAmountMin field to given value. - -### HasToAmountMin - -`func (o *Estimate) HasToAmountMin() bool` - -HasToAmountMin returns a boolean if a field has been set. - -### GetToAmount - -`func (o *Estimate) GetToAmount() string` - -GetToAmount returns the ToAmount field if non-nil, zero value otherwise. - -### GetToAmountOk - -`func (o *Estimate) GetToAmountOk() (*string, bool)` - -GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmount - -`func (o *Estimate) SetToAmount(v string)` - -SetToAmount sets ToAmount field to given value. - -### HasToAmount - -`func (o *Estimate) HasToAmount() bool` - -HasToAmount returns a boolean if a field has been set. - -### GetFromAmount - -`func (o *Estimate) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *Estimate) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *Estimate) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - -### HasFromAmount - -`func (o *Estimate) HasFromAmount() bool` - -HasFromAmount returns a boolean if a field has been set. - -### GetFeeCosts - -`func (o *Estimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` - -GetFeeCosts returns the FeeCosts field if non-nil, zero value otherwise. - -### GetFeeCostsOk - -`func (o *Estimate) GetFeeCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool)` - -GetFeeCostsOk returns a tuple with the FeeCosts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFeeCosts - -`func (o *Estimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner)` - -SetFeeCosts sets FeeCosts field to given value. - -### HasFeeCosts - -`func (o *Estimate) HasFeeCosts() bool` - -HasFeeCosts returns a boolean if a field has been set. - -### GetGasCosts - -`func (o *Estimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` - -GetGasCosts returns the GasCosts field if non-nil, zero value otherwise. - -### GetGasCostsOk - -`func (o *Estimate) GetGasCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool)` - -GetGasCostsOk returns a tuple with the GasCosts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGasCosts - -`func (o *Estimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner)` - -SetGasCosts sets GasCosts field to given value. - -### HasGasCosts - -`func (o *Estimate) HasGasCosts() bool` - -HasGasCosts returns a boolean if a field has been set. - -### GetExecutionDuration - -`func (o *Estimate) GetExecutionDuration() int32` - -GetExecutionDuration returns the ExecutionDuration field if non-nil, zero value otherwise. - -### GetExecutionDurationOk - -`func (o *Estimate) GetExecutionDurationOk() (*int32, bool)` - -GetExecutionDurationOk returns a tuple with the ExecutionDuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExecutionDuration - -`func (o *Estimate) SetExecutionDuration(v int32)` - -SetExecutionDuration sets ExecutionDuration field to given value. - -### HasExecutionDuration - -`func (o *Estimate) HasExecutionDuration() bool` - -HasExecutionDuration returns a boolean if a field has been set. - -### GetFromAmountUSD - -`func (o *Estimate) GetFromAmountUSD() string` - -GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. - -### GetFromAmountUSDOk - -`func (o *Estimate) GetFromAmountUSDOk() (*string, bool)` - -GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmountUSD - -`func (o *Estimate) SetFromAmountUSD(v string)` - -SetFromAmountUSD sets FromAmountUSD field to given value. - -### HasFromAmountUSD - -`func (o *Estimate) HasFromAmountUSD() bool` - -HasFromAmountUSD returns a boolean if a field has been set. - -### GetToAmountUSD - -`func (o *Estimate) GetToAmountUSD() string` - -GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. - -### GetToAmountUSDOk - -`func (o *Estimate) GetToAmountUSDOk() (*string, bool)` - -GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountUSD - -`func (o *Estimate) SetToAmountUSD(v string)` - -SetToAmountUSD sets ToAmountUSD field to given value. - -### HasToAmountUSD - -`func (o *Estimate) HasToAmountUSD() bool` - -HasToAmountUSD returns a boolean if a field has been set. - -### GetTool - -`func (o *Estimate) GetTool() string` - -GetTool returns the Tool field if non-nil, zero value otherwise. - -### GetToolOk - -`func (o *Estimate) GetToolOk() (*string, bool)` - -GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTool - -`func (o *Estimate) SetTool(v string)` - -SetTool sets Tool field to given value. - -### HasTool - -`func (o *Estimate) HasTool() bool` - -HasTool returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/FeeCost.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/FeeCost.md deleted file mode 100644 index 688c101bbb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/FeeCost.md +++ /dev/null @@ -1,160 +0,0 @@ -# FeeCost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the fee cost. | [optional] -**Amount** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**AmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**Token** | Pointer to **string** | The symbol of a token | [optional] -**Included** | Pointer to **bool** | Indicates if the fee is included in the transaction amount. | [optional] - -## Methods - -### NewFeeCost - -`func NewFeeCost() *FeeCost` - -NewFeeCost instantiates a new FeeCost object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFeeCostWithDefaults - -`func NewFeeCostWithDefaults() *FeeCost` - -NewFeeCostWithDefaults instantiates a new FeeCost object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *FeeCost) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *FeeCost) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *FeeCost) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *FeeCost) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetAmount - -`func (o *FeeCost) GetAmount() string` - -GetAmount returns the Amount field if non-nil, zero value otherwise. - -### GetAmountOk - -`func (o *FeeCost) GetAmountOk() (*string, bool)` - -GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmount - -`func (o *FeeCost) SetAmount(v string)` - -SetAmount sets Amount field to given value. - -### HasAmount - -`func (o *FeeCost) HasAmount() bool` - -HasAmount returns a boolean if a field has been set. - -### GetAmountUSD - -`func (o *FeeCost) GetAmountUSD() string` - -GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. - -### GetAmountUSDOk - -`func (o *FeeCost) GetAmountUSDOk() (*string, bool)` - -GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountUSD - -`func (o *FeeCost) SetAmountUSD(v string)` - -SetAmountUSD sets AmountUSD field to given value. - -### HasAmountUSD - -`func (o *FeeCost) HasAmountUSD() bool` - -HasAmountUSD returns a boolean if a field has been set. - -### GetToken - -`func (o *FeeCost) GetToken() string` - -GetToken returns the Token field if non-nil, zero value otherwise. - -### GetTokenOk - -`func (o *FeeCost) GetTokenOk() (*string, bool)` - -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToken - -`func (o *FeeCost) SetToken(v string)` - -SetToken sets Token field to given value. - -### HasToken - -`func (o *FeeCost) HasToken() bool` - -HasToken returns a boolean if a field has been set. - -### GetIncluded - -`func (o *FeeCost) GetIncluded() bool` - -GetIncluded returns the Included field if non-nil, zero value otherwise. - -### GetIncludedOk - -`func (o *FeeCost) GetIncludedOk() (*bool, bool)` - -GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncluded - -`func (o *FeeCost) SetIncluded(v bool)` - -SetIncluded sets Included field to given value. - -### HasIncluded - -`func (o *FeeCost) HasIncluded() bool` - -HasIncluded returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GasCost.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GasCost.md deleted file mode 100644 index c42eecb7d9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GasCost.md +++ /dev/null @@ -1,212 +0,0 @@ -# GasCost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | Pointer to **string** | The type of the gas cost. | [optional] -**Price** | Pointer to **string** | The gas price, specified as a string to maintain precision. | [optional] -**Estimate** | Pointer to **string** | The estimated gas required, specified as a string to maintain precision. | [optional] -**Limit** | Pointer to **string** | The gas limit for the transaction, specified as a string to maintain precision. | [optional] -**Amount** | Pointer to **string** | The amount of gas required in the gas currency. | [optional] -**AmountUSD** | Pointer to **string** | The amount of gas required in USD. | [optional] -**Token** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] - -## Methods - -### NewGasCost - -`func NewGasCost() *GasCost` - -NewGasCost instantiates a new GasCost object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGasCostWithDefaults - -`func NewGasCostWithDefaults() *GasCost` - -NewGasCostWithDefaults instantiates a new GasCost object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetType - -`func (o *GasCost) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *GasCost) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *GasCost) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *GasCost) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetPrice - -`func (o *GasCost) GetPrice() string` - -GetPrice returns the Price field if non-nil, zero value otherwise. - -### GetPriceOk - -`func (o *GasCost) GetPriceOk() (*string, bool)` - -GetPriceOk returns a tuple with the Price field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrice - -`func (o *GasCost) SetPrice(v string)` - -SetPrice sets Price field to given value. - -### HasPrice - -`func (o *GasCost) HasPrice() bool` - -HasPrice returns a boolean if a field has been set. - -### GetEstimate - -`func (o *GasCost) GetEstimate() string` - -GetEstimate returns the Estimate field if non-nil, zero value otherwise. - -### GetEstimateOk - -`func (o *GasCost) GetEstimateOk() (*string, bool)` - -GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEstimate - -`func (o *GasCost) SetEstimate(v string)` - -SetEstimate sets Estimate field to given value. - -### HasEstimate - -`func (o *GasCost) HasEstimate() bool` - -HasEstimate returns a boolean if a field has been set. - -### GetLimit - -`func (o *GasCost) GetLimit() string` - -GetLimit returns the Limit field if non-nil, zero value otherwise. - -### GetLimitOk - -`func (o *GasCost) GetLimitOk() (*string, bool)` - -GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLimit - -`func (o *GasCost) SetLimit(v string)` - -SetLimit sets Limit field to given value. - -### HasLimit - -`func (o *GasCost) HasLimit() bool` - -HasLimit returns a boolean if a field has been set. - -### GetAmount - -`func (o *GasCost) GetAmount() string` - -GetAmount returns the Amount field if non-nil, zero value otherwise. - -### GetAmountOk - -`func (o *GasCost) GetAmountOk() (*string, bool)` - -GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmount - -`func (o *GasCost) SetAmount(v string)` - -SetAmount sets Amount field to given value. - -### HasAmount - -`func (o *GasCost) HasAmount() bool` - -HasAmount returns a boolean if a field has been set. - -### GetAmountUSD - -`func (o *GasCost) GetAmountUSD() string` - -GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. - -### GetAmountUSDOk - -`func (o *GasCost) GetAmountUSDOk() (*string, bool)` - -GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountUSD - -`func (o *GasCost) SetAmountUSD(v string)` - -SetAmountUSD sets AmountUSD field to given value. - -### HasAmountUSD - -`func (o *GasCost) HasAmountUSD() bool` - -HasAmountUSD returns a boolean if a field has been set. - -### GetToken - -`func (o *GasCost) GetToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetToken returns the Token field if non-nil, zero value otherwise. - -### GetTokenOk - -`func (o *GasCost) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToken - -`func (o *GasCost) SetToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetToken sets Token field to given value. - -### HasToken - -`func (o *GasCost) HasToken() bool` - -HasToken returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAudit200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAudit200Response.md deleted file mode 100644 index 39756787d6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAudit200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetAudit200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Proofs** | Pointer to **[]string** | An array of strings representing proofs. | [optional] -**AuditStartTime** | Pointer to **time.Time** | The start datetime of the audit period. | [optional] -**AuditEndTime** | Pointer to **time.Time** | The end datetime of the audit period. | [optional] - -## Methods - -### NewGetAudit200Response - -`func NewGetAudit200Response() *GetAudit200Response` - -NewGetAudit200Response instantiates a new GetAudit200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetAudit200ResponseWithDefaults - -`func NewGetAudit200ResponseWithDefaults() *GetAudit200Response` - -NewGetAudit200ResponseWithDefaults instantiates a new GetAudit200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetProofs - -`func (o *GetAudit200Response) GetProofs() []string` - -GetProofs returns the Proofs field if non-nil, zero value otherwise. - -### GetProofsOk - -`func (o *GetAudit200Response) GetProofsOk() (*[]string, bool)` - -GetProofsOk returns a tuple with the Proofs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProofs - -`func (o *GetAudit200Response) SetProofs(v []string)` - -SetProofs sets Proofs field to given value. - -### HasProofs - -`func (o *GetAudit200Response) HasProofs() bool` - -HasProofs returns a boolean if a field has been set. - -### GetAuditStartTime - -`func (o *GetAudit200Response) GetAuditStartTime() time.Time` - -GetAuditStartTime returns the AuditStartTime field if non-nil, zero value otherwise. - -### GetAuditStartTimeOk - -`func (o *GetAudit200Response) GetAuditStartTimeOk() (*time.Time, bool)` - -GetAuditStartTimeOk returns a tuple with the AuditStartTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuditStartTime - -`func (o *GetAudit200Response) SetAuditStartTime(v time.Time)` - -SetAuditStartTime sets AuditStartTime field to given value. - -### HasAuditStartTime - -`func (o *GetAudit200Response) HasAuditStartTime() bool` - -HasAuditStartTime returns a boolean if a field has been set. - -### GetAuditEndTime - -`func (o *GetAudit200Response) GetAuditEndTime() time.Time` - -GetAuditEndTime returns the AuditEndTime field if non-nil, zero value otherwise. - -### GetAuditEndTimeOk - -`func (o *GetAudit200Response) GetAuditEndTimeOk() (*time.Time, bool)` - -GetAuditEndTimeOk returns a tuple with the AuditEndTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuditEndTime - -`func (o *GetAudit200Response) SetAuditEndTime(v time.Time)` - -SetAuditEndTime sets AuditEndTime field to given value. - -### HasAuditEndTime - -`func (o *GetAudit200Response) HasAuditEndTime() bool` - -HasAuditEndTime returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditRequest.md deleted file mode 100644 index 97898c53b7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditRequest.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetAuditRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuditStartDate** | Pointer to **time.Time** | The start datetime for the audit. | [optional] -**AuditEndDate** | Pointer to **time.Time** | The end datetime for the audit. | [optional] -**IncludeProofs** | Pointer to **bool** | Include proofs generated from each gateway transaction. | [optional] - -## Methods - -### NewGetAuditRequest - -`func NewGetAuditRequest() *GetAuditRequest` - -NewGetAuditRequest instantiates a new GetAuditRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetAuditRequestWithDefaults - -`func NewGetAuditRequestWithDefaults() *GetAuditRequest` - -NewGetAuditRequestWithDefaults instantiates a new GetAuditRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAuditStartDate - -`func (o *GetAuditRequest) GetAuditStartDate() time.Time` - -GetAuditStartDate returns the AuditStartDate field if non-nil, zero value otherwise. - -### GetAuditStartDateOk - -`func (o *GetAuditRequest) GetAuditStartDateOk() (*time.Time, bool)` - -GetAuditStartDateOk returns a tuple with the AuditStartDate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuditStartDate - -`func (o *GetAuditRequest) SetAuditStartDate(v time.Time)` - -SetAuditStartDate sets AuditStartDate field to given value. - -### HasAuditStartDate - -`func (o *GetAuditRequest) HasAuditStartDate() bool` - -HasAuditStartDate returns a boolean if a field has been set. - -### GetAuditEndDate - -`func (o *GetAuditRequest) GetAuditEndDate() time.Time` - -GetAuditEndDate returns the AuditEndDate field if non-nil, zero value otherwise. - -### GetAuditEndDateOk - -`func (o *GetAuditRequest) GetAuditEndDateOk() (*time.Time, bool)` - -GetAuditEndDateOk returns a tuple with the AuditEndDate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuditEndDate - -`func (o *GetAuditRequest) SetAuditEndDate(v time.Time)` - -SetAuditEndDate sets AuditEndDate field to given value. - -### HasAuditEndDate - -`func (o *GetAuditRequest) HasAuditEndDate() bool` - -HasAuditEndDate returns a boolean if a field has been set. - -### GetIncludeProofs - -`func (o *GetAuditRequest) GetIncludeProofs() bool` - -GetIncludeProofs returns the IncludeProofs field if non-nil, zero value otherwise. - -### GetIncludeProofsOk - -`func (o *GetAuditRequest) GetIncludeProofsOk() (*bool, bool)` - -GetIncludeProofsOk returns a tuple with the IncludeProofs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeProofs - -`func (o *GetAuditRequest) SetIncludeProofs(v bool)` - -SetIncludeProofs sets IncludeProofs field to given value. - -### HasIncludeProofs - -`func (o *GetAuditRequest) HasIncludeProofs() bool` - -HasIncludeProofs returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditResponse.md deleted file mode 100644 index e4792d2d5e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetAuditResponse.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetAuditResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Proofs** | Pointer to **[]string** | An array of strings representing proofs. | [optional] -**AuditStartTime** | Pointer to **time.Time** | The start datetime of the audit period. | [optional] -**AuditEndTime** | Pointer to **time.Time** | The end datetime of the audit period. | [optional] - -## Methods - -### NewGetAuditResponse - -`func NewGetAuditResponse() *GetAuditResponse` - -NewGetAuditResponse instantiates a new GetAuditResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetAuditResponseWithDefaults - -`func NewGetAuditResponseWithDefaults() *GetAuditResponse` - -NewGetAuditResponseWithDefaults instantiates a new GetAuditResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetProofs - -`func (o *GetAuditResponse) GetProofs() []string` - -GetProofs returns the Proofs field if non-nil, zero value otherwise. - -### GetProofsOk - -`func (o *GetAuditResponse) GetProofsOk() (*[]string, bool)` - -GetProofsOk returns a tuple with the Proofs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProofs - -`func (o *GetAuditResponse) SetProofs(v []string)` - -SetProofs sets Proofs field to given value. - -### HasProofs - -`func (o *GetAuditResponse) HasProofs() bool` - -HasProofs returns a boolean if a field has been set. - -### GetAuditStartTime - -`func (o *GetAuditResponse) GetAuditStartTime() time.Time` - -GetAuditStartTime returns the AuditStartTime field if non-nil, zero value otherwise. - -### GetAuditStartTimeOk - -`func (o *GetAuditResponse) GetAuditStartTimeOk() (*time.Time, bool)` - -GetAuditStartTimeOk returns a tuple with the AuditStartTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuditStartTime - -`func (o *GetAuditResponse) SetAuditStartTime(v time.Time)` - -SetAuditStartTime sets AuditStartTime field to given value. - -### HasAuditStartTime - -`func (o *GetAuditResponse) HasAuditStartTime() bool` - -HasAuditStartTime returns a boolean if a field has been set. - -### GetAuditEndTime - -`func (o *GetAuditResponse) GetAuditEndTime() time.Time` - -GetAuditEndTime returns the AuditEndTime field if non-nil, zero value otherwise. - -### GetAuditEndTimeOk - -`func (o *GetAuditResponse) GetAuditEndTimeOk() (*time.Time, bool)` - -GetAuditEndTimeOk returns a tuple with the AuditEndTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuditEndTime - -`func (o *GetAuditResponse) SetAuditEndTime(v time.Time)` - -SetAuditEndTime sets AuditEndTime field to given value. - -### HasAuditEndTime - -`func (o *GetAuditResponse) HasAuditEndTime() bool` - -HasAuditEndTime returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetHealthCheck200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetHealthCheck200Response.md deleted file mode 100644 index c8d4efc8cd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetHealthCheck200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetHealthCheck200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to **string** | | [optional] - -## Methods - -### NewGetHealthCheck200Response - -`func NewGetHealthCheck200Response() *GetHealthCheck200Response` - -NewGetHealthCheck200Response instantiates a new GetHealthCheck200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetHealthCheck200ResponseWithDefaults - -`func NewGetHealthCheck200ResponseWithDefaults() *GetHealthCheck200Response` - -NewGetHealthCheck200ResponseWithDefaults instantiates a new GetHealthCheck200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatus - -`func (o *GetHealthCheck200Response) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetHealthCheck200Response) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetHealthCheck200Response) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetHealthCheck200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200Response.md deleted file mode 100644 index 8aa3a9d2a2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200Response.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetRoutes200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Routes** | [**[]GetRoutes200ResponseRoutesInner**](GetRoutes200ResponseRoutesInner.md) | A collection of route objects | - -## Methods - -### NewGetRoutes200Response - -`func NewGetRoutes200Response(routes []GetRoutes200ResponseRoutesInner, ) *GetRoutes200Response` - -NewGetRoutes200Response instantiates a new GetRoutes200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseWithDefaults - -`func NewGetRoutes200ResponseWithDefaults() *GetRoutes200Response` - -NewGetRoutes200ResponseWithDefaults instantiates a new GetRoutes200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRoutes - -`func (o *GetRoutes200Response) GetRoutes() []GetRoutes200ResponseRoutesInner` - -GetRoutes returns the Routes field if non-nil, zero value otherwise. - -### GetRoutesOk - -`func (o *GetRoutes200Response) GetRoutesOk() (*[]GetRoutes200ResponseRoutesInner, bool)` - -GetRoutesOk returns a tuple with the Routes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoutes - -`func (o *GetRoutes200Response) SetRoutes(v []GetRoutes200ResponseRoutesInner)` - -SetRoutes sets Routes field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInner.md deleted file mode 100644 index e5e2cf01e1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInner.md +++ /dev/null @@ -1,457 +0,0 @@ -# GetRoutes200ResponseRoutesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | A unique identifier of the route. | -**GatewayID** | **string** | A unique identifier for the gateway. | -**Mode** | **string** | The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. | -**FromDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will originate. | [optional] -**FromAmountUSD** | Pointer to **float64** | The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. | [optional] -**FromAmount** | Pointer to **string** | The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] -**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**ToDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will end. | [optional] -**ToAmountUSD** | Pointer to **string** | The expected amount to be received in USD. | [optional] -**ToAmount** | Pointer to **string** | The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] -**ToAmountMin** | Pointer to **string** | The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] -**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**GasCostUSD** | Pointer to **string** | The expected gas cost in USD. | [optional] -**ContainsSwitchChain** | Pointer to **bool** | Whether chain switching is enabled or not. | [optional] -**Steps** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInner**](GetRoutes200ResponseRoutesInnerStepsInner.md) | List of steps involved in this route, adjusted for mode. | [optional] -**Insurance** | Pointer to [**GetRoutes200ResponseRoutesInnerInsurance**](GetRoutes200ResponseRoutesInnerInsurance.md) | | [optional] -**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInner - -`func NewGetRoutes200ResponseRoutesInner(id string, gatewayID string, mode string, ) *GetRoutes200ResponseRoutesInner` - -NewGetRoutes200ResponseRoutesInner instantiates a new GetRoutes200ResponseRoutesInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerWithDefaults() *GetRoutes200ResponseRoutesInner` - -NewGetRoutes200ResponseRoutesInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *GetRoutes200ResponseRoutesInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetRoutes200ResponseRoutesInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetRoutes200ResponseRoutesInner) SetId(v string)` - -SetId sets Id field to given value. - - -### GetGatewayID - -`func (o *GetRoutes200ResponseRoutesInner) GetGatewayID() string` - -GetGatewayID returns the GatewayID field if non-nil, zero value otherwise. - -### GetGatewayIDOk - -`func (o *GetRoutes200ResponseRoutesInner) GetGatewayIDOk() (*string, bool)` - -GetGatewayIDOk returns a tuple with the GatewayID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGatewayID - -`func (o *GetRoutes200ResponseRoutesInner) SetGatewayID(v string)` - -SetGatewayID sets GatewayID field to given value. - - -### GetMode - -`func (o *GetRoutes200ResponseRoutesInner) GetMode() string` - -GetMode returns the Mode field if non-nil, zero value otherwise. - -### GetModeOk - -`func (o *GetRoutes200ResponseRoutesInner) GetModeOk() (*string, bool)` - -GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMode - -`func (o *GetRoutes200ResponseRoutesInner) SetMode(v string)` - -SetMode sets Mode field to given value. - - -### GetFromDLTNetworkID - -`func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkID() string` - -GetFromDLTNetworkID returns the FromDLTNetworkID field if non-nil, zero value otherwise. - -### GetFromDLTNetworkIDOk - -`func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkIDOk() (*string, bool)` - -GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromDLTNetworkID - -`func (o *GetRoutes200ResponseRoutesInner) SetFromDLTNetworkID(v string)` - -SetFromDLTNetworkID sets FromDLTNetworkID field to given value. - -### HasFromDLTNetworkID - -`func (o *GetRoutes200ResponseRoutesInner) HasFromDLTNetworkID() bool` - -HasFromDLTNetworkID returns a boolean if a field has been set. - -### GetFromAmountUSD - -`func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSD() float64` - -GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. - -### GetFromAmountUSDOk - -`func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSDOk() (*float64, bool)` - -GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmountUSD - -`func (o *GetRoutes200ResponseRoutesInner) SetFromAmountUSD(v float64)` - -SetFromAmountUSD sets FromAmountUSD field to given value. - -### HasFromAmountUSD - -`func (o *GetRoutes200ResponseRoutesInner) HasFromAmountUSD() bool` - -HasFromAmountUSD returns a boolean if a field has been set. - -### GetFromAmount - -`func (o *GetRoutes200ResponseRoutesInner) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *GetRoutes200ResponseRoutesInner) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *GetRoutes200ResponseRoutesInner) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - -### HasFromAmount - -`func (o *GetRoutes200ResponseRoutesInner) HasFromAmount() bool` - -HasFromAmount returns a boolean if a field has been set. - -### GetFromToken - -`func (o *GetRoutes200ResponseRoutesInner) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetFromToken returns the FromToken field if non-nil, zero value otherwise. - -### GetFromTokenOk - -`func (o *GetRoutes200ResponseRoutesInner) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromToken - -`func (o *GetRoutes200ResponseRoutesInner) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetFromToken sets FromToken field to given value. - -### HasFromToken - -`func (o *GetRoutes200ResponseRoutesInner) HasFromToken() bool` - -HasFromToken returns a boolean if a field has been set. - -### GetToDLTNetworkID - -`func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkID() string` - -GetToDLTNetworkID returns the ToDLTNetworkID field if non-nil, zero value otherwise. - -### GetToDLTNetworkIDOk - -`func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkIDOk() (*string, bool)` - -GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToDLTNetworkID - -`func (o *GetRoutes200ResponseRoutesInner) SetToDLTNetworkID(v string)` - -SetToDLTNetworkID sets ToDLTNetworkID field to given value. - -### HasToDLTNetworkID - -`func (o *GetRoutes200ResponseRoutesInner) HasToDLTNetworkID() bool` - -HasToDLTNetworkID returns a boolean if a field has been set. - -### GetToAmountUSD - -`func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSD() string` - -GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. - -### GetToAmountUSDOk - -`func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSDOk() (*string, bool)` - -GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountUSD - -`func (o *GetRoutes200ResponseRoutesInner) SetToAmountUSD(v string)` - -SetToAmountUSD sets ToAmountUSD field to given value. - -### HasToAmountUSD - -`func (o *GetRoutes200ResponseRoutesInner) HasToAmountUSD() bool` - -HasToAmountUSD returns a boolean if a field has been set. - -### GetToAmount - -`func (o *GetRoutes200ResponseRoutesInner) GetToAmount() string` - -GetToAmount returns the ToAmount field if non-nil, zero value otherwise. - -### GetToAmountOk - -`func (o *GetRoutes200ResponseRoutesInner) GetToAmountOk() (*string, bool)` - -GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmount - -`func (o *GetRoutes200ResponseRoutesInner) SetToAmount(v string)` - -SetToAmount sets ToAmount field to given value. - -### HasToAmount - -`func (o *GetRoutes200ResponseRoutesInner) HasToAmount() bool` - -HasToAmount returns a boolean if a field has been set. - -### GetToAmountMin - -`func (o *GetRoutes200ResponseRoutesInner) GetToAmountMin() string` - -GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. - -### GetToAmountMinOk - -`func (o *GetRoutes200ResponseRoutesInner) GetToAmountMinOk() (*string, bool)` - -GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountMin - -`func (o *GetRoutes200ResponseRoutesInner) SetToAmountMin(v string)` - -SetToAmountMin sets ToAmountMin field to given value. - -### HasToAmountMin - -`func (o *GetRoutes200ResponseRoutesInner) HasToAmountMin() bool` - -HasToAmountMin returns a boolean if a field has been set. - -### GetToToken - -`func (o *GetRoutes200ResponseRoutesInner) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetToToken returns the ToToken field if non-nil, zero value otherwise. - -### GetToTokenOk - -`func (o *GetRoutes200ResponseRoutesInner) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToToken - -`func (o *GetRoutes200ResponseRoutesInner) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetToToken sets ToToken field to given value. - -### HasToToken - -`func (o *GetRoutes200ResponseRoutesInner) HasToToken() bool` - -HasToToken returns a boolean if a field has been set. - -### GetGasCostUSD - -`func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSD() string` - -GetGasCostUSD returns the GasCostUSD field if non-nil, zero value otherwise. - -### GetGasCostUSDOk - -`func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSDOk() (*string, bool)` - -GetGasCostUSDOk returns a tuple with the GasCostUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGasCostUSD - -`func (o *GetRoutes200ResponseRoutesInner) SetGasCostUSD(v string)` - -SetGasCostUSD sets GasCostUSD field to given value. - -### HasGasCostUSD - -`func (o *GetRoutes200ResponseRoutesInner) HasGasCostUSD() bool` - -HasGasCostUSD returns a boolean if a field has been set. - -### GetContainsSwitchChain - -`func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChain() bool` - -GetContainsSwitchChain returns the ContainsSwitchChain field if non-nil, zero value otherwise. - -### GetContainsSwitchChainOk - -`func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChainOk() (*bool, bool)` - -GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContainsSwitchChain - -`func (o *GetRoutes200ResponseRoutesInner) SetContainsSwitchChain(v bool)` - -SetContainsSwitchChain sets ContainsSwitchChain field to given value. - -### HasContainsSwitchChain - -`func (o *GetRoutes200ResponseRoutesInner) HasContainsSwitchChain() bool` - -HasContainsSwitchChain returns a boolean if a field has been set. - -### GetSteps - -`func (o *GetRoutes200ResponseRoutesInner) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner` - -GetSteps returns the Steps field if non-nil, zero value otherwise. - -### GetStepsOk - -`func (o *GetRoutes200ResponseRoutesInner) GetStepsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInner, bool)` - -GetStepsOk returns a tuple with the Steps field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSteps - -`func (o *GetRoutes200ResponseRoutesInner) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner)` - -SetSteps sets Steps field to given value. - -### HasSteps - -`func (o *GetRoutes200ResponseRoutesInner) HasSteps() bool` - -HasSteps returns a boolean if a field has been set. - -### GetInsurance - -`func (o *GetRoutes200ResponseRoutesInner) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance` - -GetInsurance returns the Insurance field if non-nil, zero value otherwise. - -### GetInsuranceOk - -`func (o *GetRoutes200ResponseRoutesInner) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool)` - -GetInsuranceOk returns a tuple with the Insurance field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInsurance - -`func (o *GetRoutes200ResponseRoutesInner) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance)` - -SetInsurance sets Insurance field to given value. - -### HasInsurance - -`func (o *GetRoutes200ResponseRoutesInner) HasInsurance() bool` - -HasInsurance returns a boolean if a field has been set. - -### GetTags - -`func (o *GetRoutes200ResponseRoutesInner) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *GetRoutes200ResponseRoutesInner) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *GetRoutes200ResponseRoutesInner) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *GetRoutes200ResponseRoutesInner) HasTags() bool` - -HasTags returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromToken.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromToken.md deleted file mode 100644 index b8964106e4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromToken.md +++ /dev/null @@ -1,265 +0,0 @@ -# GetRoutes200ResponseRoutesInnerFromToken - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainID** | **string** | The network of the DLT being interacted with. TODO: implement network identification draft | -**ChainType** | **string** | Supported DLT protocols. | -**Address** | **string** | A blockchain address. | -**Name** | Pointer to **string** | The name of the token. | [optional] -**Symbol** | **string** | The symbol of the token. | -**Decimals** | **int32** | How many decimals the token supports. | -**LogoURI** | Pointer to **string** | The logo of a token, chain, dex etc. | [optional] -**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] -**PriceUSD** | Pointer to **string** | The current price of the token in USD. | [optional] -**Extensions** | Pointer to [**GetRoutes200ResponseRoutesInnerFromTokenExtensions**](GetRoutes200ResponseRoutesInnerFromTokenExtensions.md) | | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerFromToken - -`func NewGetRoutes200ResponseRoutesInnerFromToken(chainID string, chainType string, address string, symbol string, decimals int32, ) *GetRoutes200ResponseRoutesInnerFromToken` - -NewGetRoutes200ResponseRoutesInnerFromToken instantiates a new GetRoutes200ResponseRoutesInnerFromToken object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults() *GetRoutes200ResponseRoutesInnerFromToken` - -NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromToken object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainID - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainID() string` - -GetChainID returns the ChainID field if non-nil, zero value otherwise. - -### GetChainIDOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainIDOk() (*string, bool)` - -GetChainIDOk returns a tuple with the ChainID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainID - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainID(v string)` - -SetChainID sets ChainID field to given value. - - -### GetChainType - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetAddress - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddress() string` - -GetAddress returns the Address field if non-nil, zero value otherwise. - -### GetAddressOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddressOk() (*string, bool)` - -GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddress - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetAddress(v string)` - -SetAddress sets Address field to given value. - - -### GetName - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetSymbol - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbol() string` - -GetSymbol returns the Symbol field if non-nil, zero value otherwise. - -### GetSymbolOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbolOk() (*string, bool)` - -GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSymbol - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetSymbol(v string)` - -SetSymbol sets Symbol field to given value. - - -### GetDecimals - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimals() int32` - -GetDecimals returns the Decimals field if non-nil, zero value otherwise. - -### GetDecimalsOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimalsOk() (*int32, bool)` - -GetDecimalsOk returns a tuple with the Decimals field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDecimals - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetDecimals(v int32)` - -SetDecimals sets Decimals field to given value. - - -### GetLogoURI - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURI() string` - -GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. - -### GetLogoURIOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURIOk() (*string, bool)` - -GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoURI - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetLogoURI(v string)` - -SetLogoURI sets LogoURI field to given value. - -### HasLogoURI - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasLogoURI() bool` - -HasLogoURI returns a boolean if a field has been set. - -### GetTags - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasTags() bool` - -HasTags returns a boolean if a field has been set. - -### GetPriceUSD - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSD() string` - -GetPriceUSD returns the PriceUSD field if non-nil, zero value otherwise. - -### GetPriceUSDOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSDOk() (*string, bool)` - -GetPriceUSDOk returns a tuple with the PriceUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPriceUSD - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetPriceUSD(v string)` - -SetPriceUSD sets PriceUSD field to given value. - -### HasPriceUSD - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasPriceUSD() bool` - -HasPriceUSD returns a boolean if a field has been set. - -### GetExtensions - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions` - -GetExtensions returns the Extensions field if non-nil, zero value otherwise. - -### GetExtensionsOk - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool)` - -GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExtensions - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions)` - -SetExtensions sets Extensions field to given value. - -### HasExtensions - -`func (o *GetRoutes200ResponseRoutesInnerFromToken) HasExtensions() bool` - -HasExtensions returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md deleted file mode 100644 index 99390587a8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensions.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRoutes200ResponseRoutesInnerFromTokenExtensions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BridgeInfo** | Pointer to [**map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue**](GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md) | | [optional] -**Verified** | Pointer to **bool** | Indicates whether the token is verified. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerFromTokenExtensions - -`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensions() *GetRoutes200ResponseRoutesInnerFromTokenExtensions` - -NewGetRoutes200ResponseRoutesInnerFromTokenExtensions instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensions` - -NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetBridgeInfo - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfo() map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue` - -GetBridgeInfo returns the BridgeInfo field if non-nil, zero value otherwise. - -### GetBridgeInfoOk - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfoOk() (*map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue, bool)` - -GetBridgeInfoOk returns a tuple with the BridgeInfo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBridgeInfo - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetBridgeInfo(v map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue)` - -SetBridgeInfo sets BridgeInfo field to given value. - -### HasBridgeInfo - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasBridgeInfo() bool` - -HasBridgeInfo returns a boolean if a field has been set. - -### GetVerified - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerified() bool` - -GetVerified returns the Verified field if non-nil, zero value otherwise. - -### GetVerifiedOk - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerifiedOk() (*bool, bool)` - -GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerified - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetVerified(v bool)` - -SetVerified sets Verified field to given value. - -### HasVerified - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasVerified() bool` - -HasVerified returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md deleted file mode 100644 index f46c000316..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TokenAddress** | Pointer to **string** | The address of the token being transferred. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - -`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue` - -NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue` - -NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTokenAddress - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string` - -GetTokenAddress returns the TokenAddress field if non-nil, zero value otherwise. - -### GetTokenAddressOk - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool)` - -GetTokenAddressOk returns a tuple with the TokenAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenAddress - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string)` - -SetTokenAddress sets TokenAddress field to given value. - -### HasTokenAddress - -`func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool` - -HasTokenAddress returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerInsurance.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerInsurance.md deleted file mode 100644 index d79fefaa14..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerInsurance.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRoutes200ResponseRoutesInnerInsurance - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**State** | Pointer to **string** | The state of insurance applicability for the transaction. | [optional] -**FeeAmountUsd** | Pointer to **string** | The fee amount for insurance, represented in USD. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerInsurance - -`func NewGetRoutes200ResponseRoutesInnerInsurance() *GetRoutes200ResponseRoutesInnerInsurance` - -NewGetRoutes200ResponseRoutesInnerInsurance instantiates a new GetRoutes200ResponseRoutesInnerInsurance object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults() *GetRoutes200ResponseRoutesInnerInsurance` - -NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerInsurance object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetState - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetState() string` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetStateOk() (*string, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) SetState(v string)` - -SetState sets State field to given value. - -### HasState - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) HasState() bool` - -HasState returns a boolean if a field has been set. - -### GetFeeAmountUsd - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsd() string` - -GetFeeAmountUsd returns the FeeAmountUsd field if non-nil, zero value otherwise. - -### GetFeeAmountUsdOk - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsdOk() (*string, bool)` - -GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFeeAmountUsd - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) SetFeeAmountUsd(v string)` - -SetFeeAmountUsd sets FeeAmountUsd field to given value. - -### HasFeeAmountUsd - -`func (o *GetRoutes200ResponseRoutesInnerInsurance) HasFeeAmountUsd() bool` - -HasFeeAmountUsd returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInner.md deleted file mode 100644 index 746bfbaec8..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInner.md +++ /dev/null @@ -1,238 +0,0 @@ -# GetRoutes200ResponseRoutesInnerStepsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | Id of the step | [optional] -**Type** | Pointer to **string** | Type of the step, typically describing the action, e.g., 'swap'. | [optional] -**Tool** | Pointer to **string** | Tool used in the step, e.g., 'stargate'. | [optional] -**Action** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerAction**](GetRoutes200ResponseRoutesInnerStepsInnerAction.md) | | [optional] -**Estimate** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerEstimate**](GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md) | | [optional] -**ToolDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] -**IntegrationDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] -**IncludedStepIds** | Pointer to **[]string** | IDs of further steps included within this step, allowing for nested actions without direct recursion. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerStepsInner - -`func NewGetRoutes200ResponseRoutesInnerStepsInner() *GetRoutes200ResponseRoutesInnerStepsInner` - -NewGetRoutes200ResponseRoutesInnerStepsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInner` - -NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetType - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetTool - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTool() string` - -GetTool returns the Tool field if non-nil, zero value otherwise. - -### GetToolOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolOk() (*string, bool)` - -GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTool - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetTool(v string)` - -SetTool sets Tool field to given value. - -### HasTool - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasTool() bool` - -HasTool returns a boolean if a field has been set. - -### GetAction - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction` - -GetAction returns the Action field if non-nil, zero value otherwise. - -### GetActionOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool)` - -GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAction - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction)` - -SetAction sets Action field to given value. - -### HasAction - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasAction() bool` - -HasAction returns a boolean if a field has been set. - -### GetEstimate - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate` - -GetEstimate returns the Estimate field if non-nil, zero value otherwise. - -### GetEstimateOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool)` - -GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEstimate - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate)` - -SetEstimate sets Estimate field to given value. - -### HasEstimate - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasEstimate() bool` - -HasEstimate returns a boolean if a field has been set. - -### GetToolDetails - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` - -GetToolDetails returns the ToolDetails field if non-nil, zero value otherwise. - -### GetToolDetailsOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` - -GetToolDetailsOk returns a tuple with the ToolDetails field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToolDetails - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` - -SetToolDetails sets ToolDetails field to given value. - -### HasToolDetails - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasToolDetails() bool` - -HasToolDetails returns a boolean if a field has been set. - -### GetIntegrationDetails - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` - -GetIntegrationDetails returns the IntegrationDetails field if non-nil, zero value otherwise. - -### GetIntegrationDetailsOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` - -GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIntegrationDetails - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` - -SetIntegrationDetails sets IntegrationDetails field to given value. - -### HasIntegrationDetails - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIntegrationDetails() bool` - -HasIntegrationDetails returns a boolean if a field has been set. - -### GetIncludedStepIds - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIds() []string` - -GetIncludedStepIds returns the IncludedStepIds field if non-nil, zero value otherwise. - -### GetIncludedStepIdsOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIdsOk() (*[]string, bool)` - -GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludedStepIds - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIncludedStepIds(v []string)` - -SetIncludedStepIds sets IncludedStepIds field to given value. - -### HasIncludedStepIds - -`func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIncludedStepIds() bool` - -HasIncludedStepIds returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md deleted file mode 100644 index 47c505197c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerAction.md +++ /dev/null @@ -1,186 +0,0 @@ -# GetRoutes200ResponseRoutesInnerStepsInnerAction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**FromAmount** | Pointer to **string** | The amount of 'fromToken' to be transferred, specified as a string to maintain precision. | [optional] -**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**Slippage** | Pointer to **float32** | The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. | [optional] -**FromAddress** | Pointer to **string** | A blockchain address. | [optional] -**ToAddress** | Pointer to **string** | A blockchain address. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerStepsInnerAction - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerAction() *GetRoutes200ResponseRoutesInnerStepsInnerAction` - -NewGetRoutes200ResponseRoutesInnerStepsInnerAction instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerAction` - -NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFromToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetFromToken returns the FromToken field if non-nil, zero value otherwise. - -### GetFromTokenOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetFromToken sets FromToken field to given value. - -### HasFromToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromToken() bool` - -HasFromToken returns a boolean if a field has been set. - -### GetFromAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - -### HasFromAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAmount() bool` - -HasFromAmount returns a boolean if a field has been set. - -### GetToToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetToToken returns the ToToken field if non-nil, zero value otherwise. - -### GetToTokenOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetToToken sets ToToken field to given value. - -### HasToToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToToken() bool` - -HasToToken returns a boolean if a field has been set. - -### GetSlippage - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippage() float32` - -GetSlippage returns the Slippage field if non-nil, zero value otherwise. - -### GetSlippageOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippageOk() (*float32, bool)` - -GetSlippageOk returns a tuple with the Slippage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSlippage - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetSlippage(v float32)` - -SetSlippage sets Slippage field to given value. - -### HasSlippage - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasSlippage() bool` - -HasSlippage returns a boolean if a field has been set. - -### GetFromAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddress() string` - -GetFromAddress returns the FromAddress field if non-nil, zero value otherwise. - -### GetFromAddressOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddressOk() (*string, bool)` - -GetFromAddressOk returns a tuple with the FromAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAddress(v string)` - -SetFromAddress sets FromAddress field to given value. - -### HasFromAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAddress() bool` - -HasFromAddress returns a boolean if a field has been set. - -### GetToAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddress() string` - -GetToAddress returns the ToAddress field if non-nil, zero value otherwise. - -### GetToAddressOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddressOk() (*string, bool)` - -GetToAddressOk returns a tuple with the ToAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToAddress(v string)` - -SetToAddress sets ToAddress field to given value. - -### HasToAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToAddress() bool` - -HasToAddress returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md deleted file mode 100644 index 9840b2ea49..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md +++ /dev/null @@ -1,290 +0,0 @@ -# GetRoutes200ResponseRoutesInnerStepsInnerEstimate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApprovalAddress** | Pointer to **string** | A blockchain address. | [optional] -**ToAmountMin** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**ToAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**FromAmount** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**FeeCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md) | A collection of fee costs associated with the transaction. | [optional] -**GasCosts** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner**](GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md) | A collection of estimated gas costs for executing the transaction. | [optional] -**ExecutionDuration** | Pointer to **int32** | The estimated duration for the transaction execution in seconds. | [optional] -**FromAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**ToAmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**Tool** | Pointer to **string** | The tool or service used to generate this estimate. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate` - -NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate` - -NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApprovalAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddress() string` - -GetApprovalAddress returns the ApprovalAddress field if non-nil, zero value otherwise. - -### GetApprovalAddressOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddressOk() (*string, bool)` - -GetApprovalAddressOk returns a tuple with the ApprovalAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApprovalAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetApprovalAddress(v string)` - -SetApprovalAddress sets ApprovalAddress field to given value. - -### HasApprovalAddress - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasApprovalAddress() bool` - -HasApprovalAddress returns a boolean if a field has been set. - -### GetToAmountMin - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMin() string` - -GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. - -### GetToAmountMinOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMinOk() (*string, bool)` - -GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountMin - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountMin(v string)` - -SetToAmountMin sets ToAmountMin field to given value. - -### HasToAmountMin - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountMin() bool` - -HasToAmountMin returns a boolean if a field has been set. - -### GetToAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmount() string` - -GetToAmount returns the ToAmount field if non-nil, zero value otherwise. - -### GetToAmountOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountOk() (*string, bool)` - -GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmount(v string)` - -SetToAmount sets ToAmount field to given value. - -### HasToAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmount() bool` - -HasToAmount returns a boolean if a field has been set. - -### GetFromAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - -### HasFromAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmount() bool` - -HasFromAmount returns a boolean if a field has been set. - -### GetFeeCosts - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` - -GetFeeCosts returns the FeeCosts field if non-nil, zero value otherwise. - -### GetFeeCostsOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool)` - -GetFeeCostsOk returns a tuple with the FeeCosts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFeeCosts - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner)` - -SetFeeCosts sets FeeCosts field to given value. - -### HasFeeCosts - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFeeCosts() bool` - -HasFeeCosts returns a boolean if a field has been set. - -### GetGasCosts - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` - -GetGasCosts returns the GasCosts field if non-nil, zero value otherwise. - -### GetGasCostsOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCostsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool)` - -GetGasCostsOk returns a tuple with the GasCosts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGasCosts - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner)` - -SetGasCosts sets GasCosts field to given value. - -### HasGasCosts - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasGasCosts() bool` - -HasGasCosts returns a boolean if a field has been set. - -### GetExecutionDuration - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDuration() int32` - -GetExecutionDuration returns the ExecutionDuration field if non-nil, zero value otherwise. - -### GetExecutionDurationOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDurationOk() (*int32, bool)` - -GetExecutionDurationOk returns a tuple with the ExecutionDuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExecutionDuration - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetExecutionDuration(v int32)` - -SetExecutionDuration sets ExecutionDuration field to given value. - -### HasExecutionDuration - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasExecutionDuration() bool` - -HasExecutionDuration returns a boolean if a field has been set. - -### GetFromAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSD() string` - -GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. - -### GetFromAmountUSDOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSDOk() (*string, bool)` - -GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmountUSD(v string)` - -SetFromAmountUSD sets FromAmountUSD field to given value. - -### HasFromAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmountUSD() bool` - -HasFromAmountUSD returns a boolean if a field has been set. - -### GetToAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSD() string` - -GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. - -### GetToAmountUSDOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSDOk() (*string, bool)` - -GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountUSD(v string)` - -SetToAmountUSD sets ToAmountUSD field to given value. - -### HasToAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountUSD() bool` - -HasToAmountUSD returns a boolean if a field has been set. - -### GetTool - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetTool() string` - -GetTool returns the Tool field if non-nil, zero value otherwise. - -### GetToolOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToolOk() (*string, bool)` - -GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTool - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetTool(v string)` - -SetTool sets Tool field to given value. - -### HasTool - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasTool() bool` - -HasTool returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md deleted file mode 100644 index bb5e8d99ff..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner.md +++ /dev/null @@ -1,160 +0,0 @@ -# GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the fee cost. | [optional] -**Amount** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**AmountUSD** | Pointer to **string** | The amount in string format including all decimals. | [optional] -**Token** | Pointer to **string** | The symbol of a token | [optional] -**Included** | Pointer to **bool** | Indicates if the fee is included in the transaction amount. | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` - -NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner` - -NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmount() string` - -GetAmount returns the Amount field if non-nil, zero value otherwise. - -### GetAmountOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountOk() (*string, bool)` - -GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmount(v string)` - -SetAmount sets Amount field to given value. - -### HasAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmount() bool` - -HasAmount returns a boolean if a field has been set. - -### GetAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSD() string` - -GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. - -### GetAmountUSDOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSDOk() (*string, bool)` - -GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmountUSD(v string)` - -SetAmountUSD sets AmountUSD field to given value. - -### HasAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmountUSD() bool` - -HasAmountUSD returns a boolean if a field has been set. - -### GetToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetToken() string` - -GetToken returns the Token field if non-nil, zero value otherwise. - -### GetTokenOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetTokenOk() (*string, bool)` - -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetToken(v string)` - -SetToken sets Token field to given value. - -### HasToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasToken() bool` - -HasToken returns a boolean if a field has been set. - -### GetIncluded - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncluded() bool` - -GetIncluded returns the Included field if non-nil, zero value otherwise. - -### GetIncludedOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncludedOk() (*bool, bool)` - -GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncluded - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetIncluded(v bool)` - -SetIncluded sets Included field to given value. - -### HasIncluded - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasIncluded() bool` - -HasIncluded returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md deleted file mode 100644 index a13fec9594..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner.md +++ /dev/null @@ -1,212 +0,0 @@ -# GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | Pointer to **string** | The type of the gas cost. | [optional] -**Price** | Pointer to **string** | The gas price, specified as a string to maintain precision. | [optional] -**Estimate** | Pointer to **string** | The estimated gas required, specified as a string to maintain precision. | [optional] -**Limit** | Pointer to **string** | The gas limit for the transaction, specified as a string to maintain precision. | [optional] -**Amount** | Pointer to **string** | The amount of gas required in the gas currency. | [optional] -**AmountUSD** | Pointer to **string** | The amount of gas required in USD. | [optional] -**Token** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] - -## Methods - -### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` - -NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner` - -NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetType - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetPrice - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPrice() string` - -GetPrice returns the Price field if non-nil, zero value otherwise. - -### GetPriceOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPriceOk() (*string, bool)` - -GetPriceOk returns a tuple with the Price field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrice - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetPrice(v string)` - -SetPrice sets Price field to given value. - -### HasPrice - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasPrice() bool` - -HasPrice returns a boolean if a field has been set. - -### GetEstimate - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimate() string` - -GetEstimate returns the Estimate field if non-nil, zero value otherwise. - -### GetEstimateOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimateOk() (*string, bool)` - -GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEstimate - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetEstimate(v string)` - -SetEstimate sets Estimate field to given value. - -### HasEstimate - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasEstimate() bool` - -HasEstimate returns a boolean if a field has been set. - -### GetLimit - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimit() string` - -GetLimit returns the Limit field if non-nil, zero value otherwise. - -### GetLimitOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimitOk() (*string, bool)` - -GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLimit - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetLimit(v string)` - -SetLimit sets Limit field to given value. - -### HasLimit - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasLimit() bool` - -HasLimit returns a boolean if a field has been set. - -### GetAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmount() string` - -GetAmount returns the Amount field if non-nil, zero value otherwise. - -### GetAmountOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountOk() (*string, bool)` - -GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmount(v string)` - -SetAmount sets Amount field to given value. - -### HasAmount - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmount() bool` - -HasAmount returns a boolean if a field has been set. - -### GetAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSD() string` - -GetAmountUSD returns the AmountUSD field if non-nil, zero value otherwise. - -### GetAmountUSDOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSDOk() (*string, bool)` - -GetAmountUSDOk returns a tuple with the AmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmountUSD(v string)` - -SetAmountUSD sets AmountUSD field to given value. - -### HasAmountUSD - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmountUSD() bool` - -HasAmountUSD returns a boolean if a field has been set. - -### GetToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetToken returns the Token field if non-nil, zero value otherwise. - -### GetTokenOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetToken sets Token field to given value. - -### HasToken - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasToken() bool` - -HasToken returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md deleted file mode 100644 index 253f051140..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md +++ /dev/null @@ -1,93 +0,0 @@ -# GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Key** | **string** | A unique identifier for the integration or tool. | -**Name** | **string** | The name of the integration or tool. | -**LogoURI** | **string** | URL to the logo of the integration or tool. | - -## Methods - -### NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails(key string, name string, logoURI string, ) *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` - -NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults - -`func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` - -NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetKey - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetName(v string)` - -SetName sets Name field to given value. - - -### GetLogoURI - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURI() string` - -GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. - -### GetLogoURIOk - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURIOk() (*string, bool)` - -GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoURI - -`func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetLogoURI(v string)` - -SetLogoURI sets LogoURI field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/HealthCheckResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/HealthCheckResponse.md deleted file mode 100644 index b2b2c03b63..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/HealthCheckResponse.md +++ /dev/null @@ -1,56 +0,0 @@ -# HealthCheckResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to **string** | | [optional] - -## Methods - -### NewHealthCheckResponse - -`func NewHealthCheckResponse() *HealthCheckResponse` - -NewHealthCheckResponse instantiates a new HealthCheckResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewHealthCheckResponseWithDefaults - -`func NewHealthCheckResponseWithDefaults() *HealthCheckResponse` - -NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatus - -`func (o *HealthCheckResponse) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *HealthCheckResponse) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *HealthCheckResponse) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *HealthCheckResponse) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IncludedStep.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IncludedStep.md deleted file mode 100644 index edadf54431..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IncludedStep.md +++ /dev/null @@ -1,238 +0,0 @@ -# IncludedStep - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | Id of the step | [optional] -**Type** | Pointer to **string** | Type of the step, typically describing the action, e.g., 'swap'. | [optional] -**Tool** | Pointer to **string** | Tool used in the step, e.g., 'stargate'. | [optional] -**Action** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerAction**](GetRoutes200ResponseRoutesInnerStepsInnerAction.md) | | [optional] -**Estimate** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerEstimate**](GetRoutes200ResponseRoutesInnerStepsInnerEstimate.md) | | [optional] -**ToolDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] -**IntegrationDetails** | Pointer to [**GetRoutes200ResponseRoutesInnerStepsInnerToolDetails**](GetRoutes200ResponseRoutesInnerStepsInnerToolDetails.md) | | [optional] -**IncludedStepIds** | Pointer to **[]string** | IDs of further steps included within this step, allowing for nested actions without direct recursion. | [optional] - -## Methods - -### NewIncludedStep - -`func NewIncludedStep() *IncludedStep` - -NewIncludedStep instantiates a new IncludedStep object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewIncludedStepWithDefaults - -`func NewIncludedStepWithDefaults() *IncludedStep` - -NewIncludedStepWithDefaults instantiates a new IncludedStep object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *IncludedStep) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *IncludedStep) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *IncludedStep) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *IncludedStep) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetType - -`func (o *IncludedStep) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *IncludedStep) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *IncludedStep) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *IncludedStep) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetTool - -`func (o *IncludedStep) GetTool() string` - -GetTool returns the Tool field if non-nil, zero value otherwise. - -### GetToolOk - -`func (o *IncludedStep) GetToolOk() (*string, bool)` - -GetToolOk returns a tuple with the Tool field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTool - -`func (o *IncludedStep) SetTool(v string)` - -SetTool sets Tool field to given value. - -### HasTool - -`func (o *IncludedStep) HasTool() bool` - -HasTool returns a boolean if a field has been set. - -### GetAction - -`func (o *IncludedStep) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction` - -GetAction returns the Action field if non-nil, zero value otherwise. - -### GetActionOk - -`func (o *IncludedStep) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool)` - -GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAction - -`func (o *IncludedStep) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction)` - -SetAction sets Action field to given value. - -### HasAction - -`func (o *IncludedStep) HasAction() bool` - -HasAction returns a boolean if a field has been set. - -### GetEstimate - -`func (o *IncludedStep) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate` - -GetEstimate returns the Estimate field if non-nil, zero value otherwise. - -### GetEstimateOk - -`func (o *IncludedStep) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool)` - -GetEstimateOk returns a tuple with the Estimate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEstimate - -`func (o *IncludedStep) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate)` - -SetEstimate sets Estimate field to given value. - -### HasEstimate - -`func (o *IncludedStep) HasEstimate() bool` - -HasEstimate returns a boolean if a field has been set. - -### GetToolDetails - -`func (o *IncludedStep) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` - -GetToolDetails returns the ToolDetails field if non-nil, zero value otherwise. - -### GetToolDetailsOk - -`func (o *IncludedStep) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` - -GetToolDetailsOk returns a tuple with the ToolDetails field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToolDetails - -`func (o *IncludedStep) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` - -SetToolDetails sets ToolDetails field to given value. - -### HasToolDetails - -`func (o *IncludedStep) HasToolDetails() bool` - -HasToolDetails returns a boolean if a field has been set. - -### GetIntegrationDetails - -`func (o *IncludedStep) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails` - -GetIntegrationDetails returns the IntegrationDetails field if non-nil, zero value otherwise. - -### GetIntegrationDetailsOk - -`func (o *IncludedStep) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool)` - -GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIntegrationDetails - -`func (o *IncludedStep) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails)` - -SetIntegrationDetails sets IntegrationDetails field to given value. - -### HasIntegrationDetails - -`func (o *IncludedStep) HasIntegrationDetails() bool` - -HasIntegrationDetails returns a boolean if a field has been set. - -### GetIncludedStepIds - -`func (o *IncludedStep) GetIncludedStepIds() []string` - -GetIncludedStepIds returns the IncludedStepIds field if non-nil, zero value otherwise. - -### GetIncludedStepIdsOk - -`func (o *IncludedStep) GetIncludedStepIdsOk() (*[]string, bool)` - -GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludedStepIds - -`func (o *IncludedStep) SetIncludedStepIds(v []string)` - -SetIncludedStepIds sets IncludedStepIds field to given value. - -### HasIncludedStepIds - -`func (o *IncludedStep) HasIncludedStepIds() bool` - -HasIncludedStepIds returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Insurance.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Insurance.md deleted file mode 100644 index 4c687611f5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Insurance.md +++ /dev/null @@ -1,82 +0,0 @@ -# Insurance - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**State** | Pointer to **string** | The state of insurance applicability for the transaction. | [optional] -**FeeAmountUsd** | Pointer to **string** | The fee amount for insurance, represented in USD. | [optional] - -## Methods - -### NewInsurance - -`func NewInsurance() *Insurance` - -NewInsurance instantiates a new Insurance object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInsuranceWithDefaults - -`func NewInsuranceWithDefaults() *Insurance` - -NewInsuranceWithDefaults instantiates a new Insurance object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetState - -`func (o *Insurance) GetState() string` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *Insurance) GetStateOk() (*string, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *Insurance) SetState(v string)` - -SetState sets State field to given value. - -### HasState - -`func (o *Insurance) HasState() bool` - -HasState returns a boolean if a field has been set. - -### GetFeeAmountUsd - -`func (o *Insurance) GetFeeAmountUsd() string` - -GetFeeAmountUsd returns the FeeAmountUsd field if non-nil, zero value otherwise. - -### GetFeeAmountUsdOk - -`func (o *Insurance) GetFeeAmountUsdOk() (*string, bool)` - -GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFeeAmountUsd - -`func (o *Insurance) SetFeeAmountUsd(v string)` - -SetFeeAmountUsd sets FeeAmountUsd field to given value. - -### HasFeeAmountUsd - -`func (o *Insurance) HasFeeAmountUsd() bool` - -HasFeeAmountUsd returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IntegrationDetails.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IntegrationDetails.md deleted file mode 100644 index b4e531cbb6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/IntegrationDetails.md +++ /dev/null @@ -1,93 +0,0 @@ -# IntegrationDetails - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Key** | **string** | A unique identifier for the integration or tool. | -**Name** | **string** | The name of the integration or tool. | -**LogoURI** | **string** | URL to the logo of the integration or tool. | - -## Methods - -### NewIntegrationDetails - -`func NewIntegrationDetails(key string, name string, logoURI string, ) *IntegrationDetails` - -NewIntegrationDetails instantiates a new IntegrationDetails object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewIntegrationDetailsWithDefaults - -`func NewIntegrationDetailsWithDefaults() *IntegrationDetails` - -NewIntegrationDetailsWithDefaults instantiates a new IntegrationDetails object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetKey - -`func (o *IntegrationDetails) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *IntegrationDetails) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *IntegrationDetails) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *IntegrationDetails) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *IntegrationDetails) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *IntegrationDetails) SetName(v string)` - -SetName sets Name field to given value. - - -### GetLogoURI - -`func (o *IntegrationDetails) GetLogoURI() string` - -GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. - -### GetLogoURIOk - -`func (o *IntegrationDetails) GetLogoURIOk() (*string, bool)` - -GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoURI - -`func (o *IntegrationDetails) SetLogoURI(v string)` - -SetLogoURI sets LogoURI field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Pause200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Pause200Response.md deleted file mode 100644 index c18f13405d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Pause200Response.md +++ /dev/null @@ -1,51 +0,0 @@ -# Pause200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | - -## Methods - -### NewPause200Response - -`func NewPause200Response(statusResponse Transact200ResponseStatusResponse, ) *Pause200Response` - -NewPause200Response instantiates a new Pause200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPause200ResponseWithDefaults - -`func NewPause200ResponseWithDefaults() *Pause200Response` - -NewPause200ResponseWithDefaults instantiates a new Pause200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatusResponse - -`func (o *Pause200Response) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *Pause200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *Pause200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseRequest.md deleted file mode 100644 index 211f1a9dc6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/PauseRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# PauseRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionId** | Pointer to **string** | | [optional] -**ContextId** | Pointer to **string** | | [optional] - -## Methods - -### NewPauseRequest - -`func NewPauseRequest() *PauseRequest` - -NewPauseRequest instantiates a new PauseRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPauseRequestWithDefaults - -`func NewPauseRequestWithDefaults() *PauseRequest` - -NewPauseRequestWithDefaults instantiates a new PauseRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSessionId - -`func (o *PauseRequest) GetSessionId() string` - -GetSessionId returns the SessionId field if non-nil, zero value otherwise. - -### GetSessionIdOk - -`func (o *PauseRequest) GetSessionIdOk() (*string, bool)` - -GetSessionIdOk returns a tuple with the SessionId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionId - -`func (o *PauseRequest) SetSessionId(v string)` - -SetSessionId sets SessionId field to given value. - -### HasSessionId - -`func (o *PauseRequest) HasSessionId() bool` - -HasSessionId returns a boolean if a field has been set. - -### GetContextId - -`func (o *PauseRequest) GetContextId() string` - -GetContextId returns the ContextId field if non-nil, zero value otherwise. - -### GetContextIdOk - -`func (o *PauseRequest) GetContextIdOk() (*string, bool)` - -GetContextIdOk returns a tuple with the ContextId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContextId - -`func (o *PauseRequest) SetContextId(v string)` - -SetContextId sets ContextId field to given value. - -### HasContextId - -`func (o *PauseRequest) HasContextId() bool` - -HasContextId returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Route.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Route.md deleted file mode 100644 index 6e9e5117c9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Route.md +++ /dev/null @@ -1,457 +0,0 @@ -# Route - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | A unique identifier of the route. | -**GatewayID** | **string** | A unique identifier for the gateway. | -**Mode** | **string** | The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. | -**FromDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will originate. | [optional] -**FromAmountUSD** | Pointer to **float64** | The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. | [optional] -**FromAmount** | Pointer to **string** | The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] -**FromToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**ToDLTNetworkID** | Pointer to **string** | The ID of the DLT Network where the operation will end. | [optional] -**ToAmountUSD** | Pointer to **string** | The expected amount to be received in USD. | [optional] -**ToAmount** | Pointer to **string** | The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] -**ToAmountMin** | Pointer to **string** | The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). | [optional] -**ToToken** | Pointer to [**GetRoutes200ResponseRoutesInnerFromToken**](GetRoutes200ResponseRoutesInnerFromToken.md) | | [optional] -**GasCostUSD** | Pointer to **string** | The expected gas cost in USD. | [optional] -**ContainsSwitchChain** | Pointer to **bool** | Whether chain switching is enabled or not. | [optional] -**Steps** | Pointer to [**[]GetRoutes200ResponseRoutesInnerStepsInner**](GetRoutes200ResponseRoutesInnerStepsInner.md) | List of steps involved in this route, adjusted for mode. | [optional] -**Insurance** | Pointer to [**GetRoutes200ResponseRoutesInnerInsurance**](GetRoutes200ResponseRoutesInnerInsurance.md) | | [optional] -**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] - -## Methods - -### NewRoute - -`func NewRoute(id string, gatewayID string, mode string, ) *Route` - -NewRoute instantiates a new Route object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRouteWithDefaults - -`func NewRouteWithDefaults() *Route` - -NewRouteWithDefaults instantiates a new Route object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *Route) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Route) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Route) SetId(v string)` - -SetId sets Id field to given value. - - -### GetGatewayID - -`func (o *Route) GetGatewayID() string` - -GetGatewayID returns the GatewayID field if non-nil, zero value otherwise. - -### GetGatewayIDOk - -`func (o *Route) GetGatewayIDOk() (*string, bool)` - -GetGatewayIDOk returns a tuple with the GatewayID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGatewayID - -`func (o *Route) SetGatewayID(v string)` - -SetGatewayID sets GatewayID field to given value. - - -### GetMode - -`func (o *Route) GetMode() string` - -GetMode returns the Mode field if non-nil, zero value otherwise. - -### GetModeOk - -`func (o *Route) GetModeOk() (*string, bool)` - -GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMode - -`func (o *Route) SetMode(v string)` - -SetMode sets Mode field to given value. - - -### GetFromDLTNetworkID - -`func (o *Route) GetFromDLTNetworkID() string` - -GetFromDLTNetworkID returns the FromDLTNetworkID field if non-nil, zero value otherwise. - -### GetFromDLTNetworkIDOk - -`func (o *Route) GetFromDLTNetworkIDOk() (*string, bool)` - -GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromDLTNetworkID - -`func (o *Route) SetFromDLTNetworkID(v string)` - -SetFromDLTNetworkID sets FromDLTNetworkID field to given value. - -### HasFromDLTNetworkID - -`func (o *Route) HasFromDLTNetworkID() bool` - -HasFromDLTNetworkID returns a boolean if a field has been set. - -### GetFromAmountUSD - -`func (o *Route) GetFromAmountUSD() float64` - -GetFromAmountUSD returns the FromAmountUSD field if non-nil, zero value otherwise. - -### GetFromAmountUSDOk - -`func (o *Route) GetFromAmountUSDOk() (*float64, bool)` - -GetFromAmountUSDOk returns a tuple with the FromAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmountUSD - -`func (o *Route) SetFromAmountUSD(v float64)` - -SetFromAmountUSD sets FromAmountUSD field to given value. - -### HasFromAmountUSD - -`func (o *Route) HasFromAmountUSD() bool` - -HasFromAmountUSD returns a boolean if a field has been set. - -### GetFromAmount - -`func (o *Route) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *Route) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *Route) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - -### HasFromAmount - -`func (o *Route) HasFromAmount() bool` - -HasFromAmount returns a boolean if a field has been set. - -### GetFromToken - -`func (o *Route) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetFromToken returns the FromToken field if non-nil, zero value otherwise. - -### GetFromTokenOk - -`func (o *Route) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetFromTokenOk returns a tuple with the FromToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromToken - -`func (o *Route) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetFromToken sets FromToken field to given value. - -### HasFromToken - -`func (o *Route) HasFromToken() bool` - -HasFromToken returns a boolean if a field has been set. - -### GetToDLTNetworkID - -`func (o *Route) GetToDLTNetworkID() string` - -GetToDLTNetworkID returns the ToDLTNetworkID field if non-nil, zero value otherwise. - -### GetToDLTNetworkIDOk - -`func (o *Route) GetToDLTNetworkIDOk() (*string, bool)` - -GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToDLTNetworkID - -`func (o *Route) SetToDLTNetworkID(v string)` - -SetToDLTNetworkID sets ToDLTNetworkID field to given value. - -### HasToDLTNetworkID - -`func (o *Route) HasToDLTNetworkID() bool` - -HasToDLTNetworkID returns a boolean if a field has been set. - -### GetToAmountUSD - -`func (o *Route) GetToAmountUSD() string` - -GetToAmountUSD returns the ToAmountUSD field if non-nil, zero value otherwise. - -### GetToAmountUSDOk - -`func (o *Route) GetToAmountUSDOk() (*string, bool)` - -GetToAmountUSDOk returns a tuple with the ToAmountUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountUSD - -`func (o *Route) SetToAmountUSD(v string)` - -SetToAmountUSD sets ToAmountUSD field to given value. - -### HasToAmountUSD - -`func (o *Route) HasToAmountUSD() bool` - -HasToAmountUSD returns a boolean if a field has been set. - -### GetToAmount - -`func (o *Route) GetToAmount() string` - -GetToAmount returns the ToAmount field if non-nil, zero value otherwise. - -### GetToAmountOk - -`func (o *Route) GetToAmountOk() (*string, bool)` - -GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmount - -`func (o *Route) SetToAmount(v string)` - -SetToAmount sets ToAmount field to given value. - -### HasToAmount - -`func (o *Route) HasToAmount() bool` - -HasToAmount returns a boolean if a field has been set. - -### GetToAmountMin - -`func (o *Route) GetToAmountMin() string` - -GetToAmountMin returns the ToAmountMin field if non-nil, zero value otherwise. - -### GetToAmountMinOk - -`func (o *Route) GetToAmountMinOk() (*string, bool)` - -GetToAmountMinOk returns a tuple with the ToAmountMin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmountMin - -`func (o *Route) SetToAmountMin(v string)` - -SetToAmountMin sets ToAmountMin field to given value. - -### HasToAmountMin - -`func (o *Route) HasToAmountMin() bool` - -HasToAmountMin returns a boolean if a field has been set. - -### GetToToken - -`func (o *Route) GetToToken() GetRoutes200ResponseRoutesInnerFromToken` - -GetToToken returns the ToToken field if non-nil, zero value otherwise. - -### GetToTokenOk - -`func (o *Route) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool)` - -GetToTokenOk returns a tuple with the ToToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToToken - -`func (o *Route) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken)` - -SetToToken sets ToToken field to given value. - -### HasToToken - -`func (o *Route) HasToToken() bool` - -HasToToken returns a boolean if a field has been set. - -### GetGasCostUSD - -`func (o *Route) GetGasCostUSD() string` - -GetGasCostUSD returns the GasCostUSD field if non-nil, zero value otherwise. - -### GetGasCostUSDOk - -`func (o *Route) GetGasCostUSDOk() (*string, bool)` - -GetGasCostUSDOk returns a tuple with the GasCostUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGasCostUSD - -`func (o *Route) SetGasCostUSD(v string)` - -SetGasCostUSD sets GasCostUSD field to given value. - -### HasGasCostUSD - -`func (o *Route) HasGasCostUSD() bool` - -HasGasCostUSD returns a boolean if a field has been set. - -### GetContainsSwitchChain - -`func (o *Route) GetContainsSwitchChain() bool` - -GetContainsSwitchChain returns the ContainsSwitchChain field if non-nil, zero value otherwise. - -### GetContainsSwitchChainOk - -`func (o *Route) GetContainsSwitchChainOk() (*bool, bool)` - -GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContainsSwitchChain - -`func (o *Route) SetContainsSwitchChain(v bool)` - -SetContainsSwitchChain sets ContainsSwitchChain field to given value. - -### HasContainsSwitchChain - -`func (o *Route) HasContainsSwitchChain() bool` - -HasContainsSwitchChain returns a boolean if a field has been set. - -### GetSteps - -`func (o *Route) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner` - -GetSteps returns the Steps field if non-nil, zero value otherwise. - -### GetStepsOk - -`func (o *Route) GetStepsOk() (*[]GetRoutes200ResponseRoutesInnerStepsInner, bool)` - -GetStepsOk returns a tuple with the Steps field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSteps - -`func (o *Route) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner)` - -SetSteps sets Steps field to given value. - -### HasSteps - -`func (o *Route) HasSteps() bool` - -HasSteps returns a boolean if a field has been set. - -### GetInsurance - -`func (o *Route) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance` - -GetInsurance returns the Insurance field if non-nil, zero value otherwise. - -### GetInsuranceOk - -`func (o *Route) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool)` - -GetInsuranceOk returns a tuple with the Insurance field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInsurance - -`func (o *Route) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance)` - -SetInsurance sets Insurance field to given value. - -### HasInsurance - -`func (o *Route) HasInsurance() bool` - -HasInsurance returns a boolean if a field has been set. - -### GetTags - -`func (o *Route) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *Route) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *Route) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *Route) HasTags() bool` - -HasTags returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/RoutesResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/RoutesResponse.md deleted file mode 100644 index b4c5f64a92..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/RoutesResponse.md +++ /dev/null @@ -1,51 +0,0 @@ -# RoutesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Routes** | [**[]GetRoutes200ResponseRoutesInner**](GetRoutes200ResponseRoutesInner.md) | A collection of route objects | - -## Methods - -### NewRoutesResponse - -`func NewRoutesResponse(routes []GetRoutes200ResponseRoutesInner, ) *RoutesResponse` - -NewRoutesResponse instantiates a new RoutesResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRoutesResponseWithDefaults - -`func NewRoutesResponseWithDefaults() *RoutesResponse` - -NewRoutesResponseWithDefaults instantiates a new RoutesResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRoutes - -`func (o *RoutesResponse) GetRoutes() []GetRoutes200ResponseRoutesInner` - -GetRoutes returns the Routes field if non-nil, zero value otherwise. - -### GetRoutesOk - -`func (o *RoutesResponse) GetRoutesOk() (*[]GetRoutes200ResponseRoutesInner, bool)` - -GetRoutesOk returns a tuple with the Routes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoutes - -`func (o *RoutesResponse) SetRoutes(v []GetRoutes200ResponseRoutesInner)` - -SetRoutes sets Routes field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusRequest.md deleted file mode 100644 index 36168e81d1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# StatusRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionID** | **string** | The ID of the session for which the status is being requested. | - -## Methods - -### NewStatusRequest - -`func NewStatusRequest(sessionID string, ) *StatusRequest` - -NewStatusRequest instantiates a new StatusRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewStatusRequestWithDefaults - -`func NewStatusRequestWithDefaults() *StatusRequest` - -NewStatusRequestWithDefaults instantiates a new StatusRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSessionID - -`func (o *StatusRequest) GetSessionID() string` - -GetSessionID returns the SessionID field if non-nil, zero value otherwise. - -### GetSessionIDOk - -`func (o *StatusRequest) GetSessionIDOk() (*string, bool)` - -GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionID - -`func (o *StatusRequest) SetSessionID(v string)` - -SetSessionID sets SessionID field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusResponse.md deleted file mode 100644 index 5fd67dade1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/StatusResponse.md +++ /dev/null @@ -1,177 +0,0 @@ -# StatusResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | **string** | | -**Substatus** | **string** | | -**Stage** | **string** | | -**Step** | **string** | | -**StartTime** | **time.Time** | | -**OriginChain** | [**Transact200ResponseStatusResponseOriginChain**](Transact200ResponseStatusResponseOriginChain.md) | | -**DestinationChain** | [**Transact200ResponseStatusResponseDestinationChain**](Transact200ResponseStatusResponseDestinationChain.md) | | - -## Methods - -### NewStatusResponse - -`func NewStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain, ) *StatusResponse` - -NewStatusResponse instantiates a new StatusResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewStatusResponseWithDefaults - -`func NewStatusResponseWithDefaults() *StatusResponse` - -NewStatusResponseWithDefaults instantiates a new StatusResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatus - -`func (o *StatusResponse) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *StatusResponse) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *StatusResponse) SetStatus(v string)` - -SetStatus sets Status field to given value. - - -### GetSubstatus - -`func (o *StatusResponse) GetSubstatus() string` - -GetSubstatus returns the Substatus field if non-nil, zero value otherwise. - -### GetSubstatusOk - -`func (o *StatusResponse) GetSubstatusOk() (*string, bool)` - -GetSubstatusOk returns a tuple with the Substatus field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubstatus - -`func (o *StatusResponse) SetSubstatus(v string)` - -SetSubstatus sets Substatus field to given value. - - -### GetStage - -`func (o *StatusResponse) GetStage() string` - -GetStage returns the Stage field if non-nil, zero value otherwise. - -### GetStageOk - -`func (o *StatusResponse) GetStageOk() (*string, bool)` - -GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStage - -`func (o *StatusResponse) SetStage(v string)` - -SetStage sets Stage field to given value. - - -### GetStep - -`func (o *StatusResponse) GetStep() string` - -GetStep returns the Step field if non-nil, zero value otherwise. - -### GetStepOk - -`func (o *StatusResponse) GetStepOk() (*string, bool)` - -GetStepOk returns a tuple with the Step field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStep - -`func (o *StatusResponse) SetStep(v string)` - -SetStep sets Step field to given value. - - -### GetStartTime - -`func (o *StatusResponse) GetStartTime() time.Time` - -GetStartTime returns the StartTime field if non-nil, zero value otherwise. - -### GetStartTimeOk - -`func (o *StatusResponse) GetStartTimeOk() (*time.Time, bool)` - -GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStartTime - -`func (o *StatusResponse) SetStartTime(v time.Time)` - -SetStartTime sets StartTime field to given value. - - -### GetOriginChain - -`func (o *StatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain` - -GetOriginChain returns the OriginChain field if non-nil, zero value otherwise. - -### GetOriginChainOk - -`func (o *StatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool)` - -GetOriginChainOk returns a tuple with the OriginChain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOriginChain - -`func (o *StatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain)` - -SetOriginChain sets OriginChain field to given value. - - -### GetDestinationChain - -`func (o *StatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain` - -GetDestinationChain returns the DestinationChain field if non-nil, zero value otherwise. - -### GetDestinationChainOk - -`func (o *StatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool)` - -GetDestinationChainOk returns a tuple with the DestinationChain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDestinationChain - -`func (o *StatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain)` - -SetDestinationChain sets DestinationChain field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Token.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Token.md deleted file mode 100644 index 89c2fe1484..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Token.md +++ /dev/null @@ -1,265 +0,0 @@ -# Token - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ChainID** | **string** | The network of the DLT being interacted with. TODO: implement network identification draft | -**ChainType** | **string** | Supported DLT protocols. | -**Address** | **string** | A blockchain address. | -**Name** | Pointer to **string** | The name of the token. | [optional] -**Symbol** | **string** | The symbol of the token. | -**Decimals** | **int32** | How many decimals the token supports. | -**LogoURI** | Pointer to **string** | The logo of a token, chain, dex etc. | [optional] -**Tags** | Pointer to **[]string** | List of tags identifiers providing additional context or categorization. | [optional] -**PriceUSD** | Pointer to **string** | The current price of the token in USD. | [optional] -**Extensions** | Pointer to [**GetRoutes200ResponseRoutesInnerFromTokenExtensions**](GetRoutes200ResponseRoutesInnerFromTokenExtensions.md) | | [optional] - -## Methods - -### NewToken - -`func NewToken(chainID string, chainType string, address string, symbol string, decimals int32, ) *Token` - -NewToken instantiates a new Token object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTokenWithDefaults - -`func NewTokenWithDefaults() *Token` - -NewTokenWithDefaults instantiates a new Token object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetChainID - -`func (o *Token) GetChainID() string` - -GetChainID returns the ChainID field if non-nil, zero value otherwise. - -### GetChainIDOk - -`func (o *Token) GetChainIDOk() (*string, bool)` - -GetChainIDOk returns a tuple with the ChainID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainID - -`func (o *Token) SetChainID(v string)` - -SetChainID sets ChainID field to given value. - - -### GetChainType - -`func (o *Token) GetChainType() string` - -GetChainType returns the ChainType field if non-nil, zero value otherwise. - -### GetChainTypeOk - -`func (o *Token) GetChainTypeOk() (*string, bool)` - -GetChainTypeOk returns a tuple with the ChainType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChainType - -`func (o *Token) SetChainType(v string)` - -SetChainType sets ChainType field to given value. - - -### GetAddress - -`func (o *Token) GetAddress() string` - -GetAddress returns the Address field if non-nil, zero value otherwise. - -### GetAddressOk - -`func (o *Token) GetAddressOk() (*string, bool)` - -GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddress - -`func (o *Token) SetAddress(v string)` - -SetAddress sets Address field to given value. - - -### GetName - -`func (o *Token) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Token) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *Token) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *Token) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetSymbol - -`func (o *Token) GetSymbol() string` - -GetSymbol returns the Symbol field if non-nil, zero value otherwise. - -### GetSymbolOk - -`func (o *Token) GetSymbolOk() (*string, bool)` - -GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSymbol - -`func (o *Token) SetSymbol(v string)` - -SetSymbol sets Symbol field to given value. - - -### GetDecimals - -`func (o *Token) GetDecimals() int32` - -GetDecimals returns the Decimals field if non-nil, zero value otherwise. - -### GetDecimalsOk - -`func (o *Token) GetDecimalsOk() (*int32, bool)` - -GetDecimalsOk returns a tuple with the Decimals field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDecimals - -`func (o *Token) SetDecimals(v int32)` - -SetDecimals sets Decimals field to given value. - - -### GetLogoURI - -`func (o *Token) GetLogoURI() string` - -GetLogoURI returns the LogoURI field if non-nil, zero value otherwise. - -### GetLogoURIOk - -`func (o *Token) GetLogoURIOk() (*string, bool)` - -GetLogoURIOk returns a tuple with the LogoURI field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogoURI - -`func (o *Token) SetLogoURI(v string)` - -SetLogoURI sets LogoURI field to given value. - -### HasLogoURI - -`func (o *Token) HasLogoURI() bool` - -HasLogoURI returns a boolean if a field has been set. - -### GetTags - -`func (o *Token) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *Token) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *Token) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *Token) HasTags() bool` - -HasTags returns a boolean if a field has been set. - -### GetPriceUSD - -`func (o *Token) GetPriceUSD() string` - -GetPriceUSD returns the PriceUSD field if non-nil, zero value otherwise. - -### GetPriceUSDOk - -`func (o *Token) GetPriceUSDOk() (*string, bool)` - -GetPriceUSDOk returns a tuple with the PriceUSD field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPriceUSD - -`func (o *Token) SetPriceUSD(v string)` - -SetPriceUSD sets PriceUSD field to given value. - -### HasPriceUSD - -`func (o *Token) HasPriceUSD() bool` - -HasPriceUSD returns a boolean if a field has been set. - -### GetExtensions - -`func (o *Token) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions` - -GetExtensions returns the Extensions field if non-nil, zero value otherwise. - -### GetExtensionsOk - -`func (o *Token) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool)` - -GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExtensions - -`func (o *Token) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions)` - -SetExtensions sets Extensions field to given value. - -### HasExtensions - -`func (o *Token) HasExtensions() bool` - -HasExtensions returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200Response.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200Response.md deleted file mode 100644 index 385a3357a3..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200Response.md +++ /dev/null @@ -1,72 +0,0 @@ -# Transact200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionID** | **string** | Unique identifier (UUID) for the session. | -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | - -## Methods - -### NewTransact200Response - -`func NewTransact200Response(sessionID string, statusResponse Transact200ResponseStatusResponse, ) *Transact200Response` - -NewTransact200Response instantiates a new Transact200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransact200ResponseWithDefaults - -`func NewTransact200ResponseWithDefaults() *Transact200Response` - -NewTransact200ResponseWithDefaults instantiates a new Transact200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSessionID - -`func (o *Transact200Response) GetSessionID() string` - -GetSessionID returns the SessionID field if non-nil, zero value otherwise. - -### GetSessionIDOk - -`func (o *Transact200Response) GetSessionIDOk() (*string, bool)` - -GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionID - -`func (o *Transact200Response) SetSessionID(v string)` - -SetSessionID sets SessionID field to given value. - - -### GetStatusResponse - -`func (o *Transact200Response) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *Transact200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *Transact200Response) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponse.md deleted file mode 100644 index 4db9ef1c76..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponse.md +++ /dev/null @@ -1,177 +0,0 @@ -# Transact200ResponseStatusResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | **string** | | -**Substatus** | **string** | | -**Stage** | **string** | | -**Step** | **string** | | -**StartTime** | **time.Time** | | -**OriginChain** | [**Transact200ResponseStatusResponseOriginChain**](Transact200ResponseStatusResponseOriginChain.md) | | -**DestinationChain** | [**Transact200ResponseStatusResponseDestinationChain**](Transact200ResponseStatusResponseDestinationChain.md) | | - -## Methods - -### NewTransact200ResponseStatusResponse - -`func NewTransact200ResponseStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain, ) *Transact200ResponseStatusResponse` - -NewTransact200ResponseStatusResponse instantiates a new Transact200ResponseStatusResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransact200ResponseStatusResponseWithDefaults - -`func NewTransact200ResponseStatusResponseWithDefaults() *Transact200ResponseStatusResponse` - -NewTransact200ResponseStatusResponseWithDefaults instantiates a new Transact200ResponseStatusResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatus - -`func (o *Transact200ResponseStatusResponse) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *Transact200ResponseStatusResponse) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *Transact200ResponseStatusResponse) SetStatus(v string)` - -SetStatus sets Status field to given value. - - -### GetSubstatus - -`func (o *Transact200ResponseStatusResponse) GetSubstatus() string` - -GetSubstatus returns the Substatus field if non-nil, zero value otherwise. - -### GetSubstatusOk - -`func (o *Transact200ResponseStatusResponse) GetSubstatusOk() (*string, bool)` - -GetSubstatusOk returns a tuple with the Substatus field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubstatus - -`func (o *Transact200ResponseStatusResponse) SetSubstatus(v string)` - -SetSubstatus sets Substatus field to given value. - - -### GetStage - -`func (o *Transact200ResponseStatusResponse) GetStage() string` - -GetStage returns the Stage field if non-nil, zero value otherwise. - -### GetStageOk - -`func (o *Transact200ResponseStatusResponse) GetStageOk() (*string, bool)` - -GetStageOk returns a tuple with the Stage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStage - -`func (o *Transact200ResponseStatusResponse) SetStage(v string)` - -SetStage sets Stage field to given value. - - -### GetStep - -`func (o *Transact200ResponseStatusResponse) GetStep() string` - -GetStep returns the Step field if non-nil, zero value otherwise. - -### GetStepOk - -`func (o *Transact200ResponseStatusResponse) GetStepOk() (*string, bool)` - -GetStepOk returns a tuple with the Step field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStep - -`func (o *Transact200ResponseStatusResponse) SetStep(v string)` - -SetStep sets Step field to given value. - - -### GetStartTime - -`func (o *Transact200ResponseStatusResponse) GetStartTime() time.Time` - -GetStartTime returns the StartTime field if non-nil, zero value otherwise. - -### GetStartTimeOk - -`func (o *Transact200ResponseStatusResponse) GetStartTimeOk() (*time.Time, bool)` - -GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStartTime - -`func (o *Transact200ResponseStatusResponse) SetStartTime(v time.Time)` - -SetStartTime sets StartTime field to given value. - - -### GetOriginChain - -`func (o *Transact200ResponseStatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain` - -GetOriginChain returns the OriginChain field if non-nil, zero value otherwise. - -### GetOriginChainOk - -`func (o *Transact200ResponseStatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool)` - -GetOriginChainOk returns a tuple with the OriginChain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOriginChain - -`func (o *Transact200ResponseStatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain)` - -SetOriginChain sets OriginChain field to given value. - - -### GetDestinationChain - -`func (o *Transact200ResponseStatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain` - -GetDestinationChain returns the DestinationChain field if non-nil, zero value otherwise. - -### GetDestinationChainOk - -`func (o *Transact200ResponseStatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool)` - -GetDestinationChainOk returns a tuple with the DestinationChain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDestinationChain - -`func (o *Transact200ResponseStatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain)` - -SetDestinationChain sets DestinationChain field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseDestinationChain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseDestinationChain.md deleted file mode 100644 index fdff89f7a4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseDestinationChain.md +++ /dev/null @@ -1,102 +0,0 @@ -# Transact200ResponseStatusResponseDestinationChain - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DltProtocol** | Pointer to **interface{}** | | [optional] -**DltSubnetworkID** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewTransact200ResponseStatusResponseDestinationChain - -`func NewTransact200ResponseStatusResponseDestinationChain() *Transact200ResponseStatusResponseDestinationChain` - -NewTransact200ResponseStatusResponseDestinationChain instantiates a new Transact200ResponseStatusResponseDestinationChain object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransact200ResponseStatusResponseDestinationChainWithDefaults - -`func NewTransact200ResponseStatusResponseDestinationChainWithDefaults() *Transact200ResponseStatusResponseDestinationChain` - -NewTransact200ResponseStatusResponseDestinationChainWithDefaults instantiates a new Transact200ResponseStatusResponseDestinationChain object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDltProtocol - -`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocol() interface{}` - -GetDltProtocol returns the DltProtocol field if non-nil, zero value otherwise. - -### GetDltProtocolOk - -`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocolOk() (*interface{}, bool)` - -GetDltProtocolOk returns a tuple with the DltProtocol field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDltProtocol - -`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltProtocol(v interface{})` - -SetDltProtocol sets DltProtocol field to given value. - -### HasDltProtocol - -`func (o *Transact200ResponseStatusResponseDestinationChain) HasDltProtocol() bool` - -HasDltProtocol returns a boolean if a field has been set. - -### SetDltProtocolNil - -`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltProtocolNil(b bool)` - - SetDltProtocolNil sets the value for DltProtocol to be an explicit nil - -### UnsetDltProtocol -`func (o *Transact200ResponseStatusResponseDestinationChain) UnsetDltProtocol()` - -UnsetDltProtocol ensures that no value is present for DltProtocol, not even an explicit nil -### GetDltSubnetworkID - -`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkID() interface{}` - -GetDltSubnetworkID returns the DltSubnetworkID field if non-nil, zero value otherwise. - -### GetDltSubnetworkIDOk - -`func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkIDOk() (*interface{}, bool)` - -GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDltSubnetworkID - -`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltSubnetworkID(v interface{})` - -SetDltSubnetworkID sets DltSubnetworkID field to given value. - -### HasDltSubnetworkID - -`func (o *Transact200ResponseStatusResponseDestinationChain) HasDltSubnetworkID() bool` - -HasDltSubnetworkID returns a boolean if a field has been set. - -### SetDltSubnetworkIDNil - -`func (o *Transact200ResponseStatusResponseDestinationChain) SetDltSubnetworkIDNil(b bool)` - - SetDltSubnetworkIDNil sets the value for DltSubnetworkID to be an explicit nil - -### UnsetDltSubnetworkID -`func (o *Transact200ResponseStatusResponseDestinationChain) UnsetDltSubnetworkID()` - -UnsetDltSubnetworkID ensures that no value is present for DltSubnetworkID, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseOriginChain.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseOriginChain.md deleted file mode 100644 index 1c53906205..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/Transact200ResponseStatusResponseOriginChain.md +++ /dev/null @@ -1,102 +0,0 @@ -# Transact200ResponseStatusResponseOriginChain - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DltProtocol** | Pointer to **interface{}** | | [optional] -**DltSubnetworkID** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewTransact200ResponseStatusResponseOriginChain - -`func NewTransact200ResponseStatusResponseOriginChain() *Transact200ResponseStatusResponseOriginChain` - -NewTransact200ResponseStatusResponseOriginChain instantiates a new Transact200ResponseStatusResponseOriginChain object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransact200ResponseStatusResponseOriginChainWithDefaults - -`func NewTransact200ResponseStatusResponseOriginChainWithDefaults() *Transact200ResponseStatusResponseOriginChain` - -NewTransact200ResponseStatusResponseOriginChainWithDefaults instantiates a new Transact200ResponseStatusResponseOriginChain object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDltProtocol - -`func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocol() interface{}` - -GetDltProtocol returns the DltProtocol field if non-nil, zero value otherwise. - -### GetDltProtocolOk - -`func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocolOk() (*interface{}, bool)` - -GetDltProtocolOk returns a tuple with the DltProtocol field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDltProtocol - -`func (o *Transact200ResponseStatusResponseOriginChain) SetDltProtocol(v interface{})` - -SetDltProtocol sets DltProtocol field to given value. - -### HasDltProtocol - -`func (o *Transact200ResponseStatusResponseOriginChain) HasDltProtocol() bool` - -HasDltProtocol returns a boolean if a field has been set. - -### SetDltProtocolNil - -`func (o *Transact200ResponseStatusResponseOriginChain) SetDltProtocolNil(b bool)` - - SetDltProtocolNil sets the value for DltProtocol to be an explicit nil - -### UnsetDltProtocol -`func (o *Transact200ResponseStatusResponseOriginChain) UnsetDltProtocol()` - -UnsetDltProtocol ensures that no value is present for DltProtocol, not even an explicit nil -### GetDltSubnetworkID - -`func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkID() interface{}` - -GetDltSubnetworkID returns the DltSubnetworkID field if non-nil, zero value otherwise. - -### GetDltSubnetworkIDOk - -`func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkIDOk() (*interface{}, bool)` - -GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDltSubnetworkID - -`func (o *Transact200ResponseStatusResponseOriginChain) SetDltSubnetworkID(v interface{})` - -SetDltSubnetworkID sets DltSubnetworkID field to given value. - -### HasDltSubnetworkID - -`func (o *Transact200ResponseStatusResponseOriginChain) HasDltSubnetworkID() bool` - -HasDltSubnetworkID returns a boolean if a field has been set. - -### SetDltSubnetworkIDNil - -`func (o *Transact200ResponseStatusResponseOriginChain) SetDltSubnetworkIDNil(b bool)` - - SetDltSubnetworkIDNil sets the value for DltSubnetworkID to be an explicit nil - -### UnsetDltSubnetworkID -`func (o *Transact200ResponseStatusResponseOriginChain) UnsetDltSubnetworkID()` - -UnsetDltSubnetworkID ensures that no value is present for DltSubnetworkID, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactDefaultResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactDefaultResponse.md deleted file mode 100644 index 59b5689048..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactDefaultResponse.md +++ /dev/null @@ -1,135 +0,0 @@ -# TransactDefaultResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | HTTP error type | -**Code** | **int32** | Numeric error code | -**Status** | **int32** | HTTP status of the error | -**Message** | **string** | Long error description | -**Timestamp** | **string** | Timestamp of the error | - -## Methods - -### NewTransactDefaultResponse - -`func NewTransactDefaultResponse(type_ string, code int32, status int32, message string, timestamp string, ) *TransactDefaultResponse` - -NewTransactDefaultResponse instantiates a new TransactDefaultResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactDefaultResponseWithDefaults - -`func NewTransactDefaultResponseWithDefaults() *TransactDefaultResponse` - -NewTransactDefaultResponseWithDefaults instantiates a new TransactDefaultResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetType - -`func (o *TransactDefaultResponse) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *TransactDefaultResponse) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *TransactDefaultResponse) SetType(v string)` - -SetType sets Type field to given value. - - -### GetCode - -`func (o *TransactDefaultResponse) GetCode() int32` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *TransactDefaultResponse) GetCodeOk() (*int32, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *TransactDefaultResponse) SetCode(v int32)` - -SetCode sets Code field to given value. - - -### GetStatus - -`func (o *TransactDefaultResponse) GetStatus() int32` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *TransactDefaultResponse) GetStatusOk() (*int32, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *TransactDefaultResponse) SetStatus(v int32)` - -SetStatus sets Status field to given value. - - -### GetMessage - -`func (o *TransactDefaultResponse) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *TransactDefaultResponse) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *TransactDefaultResponse) SetMessage(v string)` - -SetMessage sets Message field to given value. - - -### GetTimestamp - -`func (o *TransactDefaultResponse) GetTimestamp() string` - -GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. - -### GetTimestampOk - -`func (o *TransactDefaultResponse) GetTimestampOk() (*string, bool)` - -GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimestamp - -`func (o *TransactDefaultResponse) SetTimestamp(v string)` - -SetTimestamp sets Timestamp field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md deleted file mode 100644 index 37525e16dd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequest.md +++ /dev/null @@ -1,245 +0,0 @@ -# TransactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ContextID** | **string** | | -**Payload** | Pointer to **string** | | [optional] -**FromDLTNetworkID** | **string** | | -**ToDLTNetworkID** | **string** | | -**FromAmount** | **string** | | -**ToAmount** | **string** | | -**BeneficiaryPubkey** | **string** | | -**OriginatorPubkey** | **string** | | -**SourceAsset** | [**TransactRequestSourceAsset**](TransactRequestSourceAsset.md) | | -**DestinyAsset** | [**TransactRequestSourceAsset**](TransactRequestSourceAsset.md) | | - -## Methods - -### NewTransactRequest - -`func NewTransactRequest(contextID string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset, ) *TransactRequest` - -NewTransactRequest instantiates a new TransactRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactRequestWithDefaults - -`func NewTransactRequestWithDefaults() *TransactRequest` - -NewTransactRequestWithDefaults instantiates a new TransactRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetContextID - -`func (o *TransactRequest) GetContextID() string` - -GetContextID returns the ContextID field if non-nil, zero value otherwise. - -### GetContextIDOk - -`func (o *TransactRequest) GetContextIDOk() (*string, bool)` - -GetContextIDOk returns a tuple with the ContextID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContextID - -`func (o *TransactRequest) SetContextID(v string)` - -SetContextID sets ContextID field to given value. - - -### GetPayload - -`func (o *TransactRequest) GetPayload() string` - -GetPayload returns the Payload field if non-nil, zero value otherwise. - -### GetPayloadOk - -`func (o *TransactRequest) GetPayloadOk() (*string, bool)` - -GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPayload - -`func (o *TransactRequest) SetPayload(v string)` - -SetPayload sets Payload field to given value. - -### HasPayload - -`func (o *TransactRequest) HasPayload() bool` - -HasPayload returns a boolean if a field has been set. - -### GetFromDLTNetworkID - -`func (o *TransactRequest) GetFromDLTNetworkID() string` - -GetFromDLTNetworkID returns the FromDLTNetworkID field if non-nil, zero value otherwise. - -### GetFromDLTNetworkIDOk - -`func (o *TransactRequest) GetFromDLTNetworkIDOk() (*string, bool)` - -GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromDLTNetworkID - -`func (o *TransactRequest) SetFromDLTNetworkID(v string)` - -SetFromDLTNetworkID sets FromDLTNetworkID field to given value. - - -### GetToDLTNetworkID - -`func (o *TransactRequest) GetToDLTNetworkID() string` - -GetToDLTNetworkID returns the ToDLTNetworkID field if non-nil, zero value otherwise. - -### GetToDLTNetworkIDOk - -`func (o *TransactRequest) GetToDLTNetworkIDOk() (*string, bool)` - -GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToDLTNetworkID - -`func (o *TransactRequest) SetToDLTNetworkID(v string)` - -SetToDLTNetworkID sets ToDLTNetworkID field to given value. - - -### GetFromAmount - -`func (o *TransactRequest) GetFromAmount() string` - -GetFromAmount returns the FromAmount field if non-nil, zero value otherwise. - -### GetFromAmountOk - -`func (o *TransactRequest) GetFromAmountOk() (*string, bool)` - -GetFromAmountOk returns a tuple with the FromAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromAmount - -`func (o *TransactRequest) SetFromAmount(v string)` - -SetFromAmount sets FromAmount field to given value. - - -### GetToAmount - -`func (o *TransactRequest) GetToAmount() string` - -GetToAmount returns the ToAmount field if non-nil, zero value otherwise. - -### GetToAmountOk - -`func (o *TransactRequest) GetToAmountOk() (*string, bool)` - -GetToAmountOk returns a tuple with the ToAmount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToAmount - -`func (o *TransactRequest) SetToAmount(v string)` - -SetToAmount sets ToAmount field to given value. - - -### GetBeneficiaryPubkey - -`func (o *TransactRequest) GetBeneficiaryPubkey() string` - -GetBeneficiaryPubkey returns the BeneficiaryPubkey field if non-nil, zero value otherwise. - -### GetBeneficiaryPubkeyOk - -`func (o *TransactRequest) GetBeneficiaryPubkeyOk() (*string, bool)` - -GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBeneficiaryPubkey - -`func (o *TransactRequest) SetBeneficiaryPubkey(v string)` - -SetBeneficiaryPubkey sets BeneficiaryPubkey field to given value. - - -### GetOriginatorPubkey - -`func (o *TransactRequest) GetOriginatorPubkey() string` - -GetOriginatorPubkey returns the OriginatorPubkey field if non-nil, zero value otherwise. - -### GetOriginatorPubkeyOk - -`func (o *TransactRequest) GetOriginatorPubkeyOk() (*string, bool)` - -GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOriginatorPubkey - -`func (o *TransactRequest) SetOriginatorPubkey(v string)` - -SetOriginatorPubkey sets OriginatorPubkey field to given value. - - -### GetSourceAsset - -`func (o *TransactRequest) GetSourceAsset() TransactRequestSourceAsset` - -GetSourceAsset returns the SourceAsset field if non-nil, zero value otherwise. - -### GetSourceAssetOk - -`func (o *TransactRequest) GetSourceAssetOk() (*TransactRequestSourceAsset, bool)` - -GetSourceAssetOk returns a tuple with the SourceAsset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSourceAsset - -`func (o *TransactRequest) SetSourceAsset(v TransactRequestSourceAsset)` - -SetSourceAsset sets SourceAsset field to given value. - - -### GetDestinyAsset - -`func (o *TransactRequest) GetDestinyAsset() TransactRequestSourceAsset` - -GetDestinyAsset returns the DestinyAsset field if non-nil, zero value otherwise. - -### GetDestinyAssetOk - -`func (o *TransactRequest) GetDestinyAssetOk() (*TransactRequestSourceAsset, bool)` - -GetDestinyAssetOk returns a tuple with the DestinyAsset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDestinyAsset - -`func (o *TransactRequest) SetDestinyAsset(v TransactRequestSourceAsset)` - -SetDestinyAsset sets DestinyAsset field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md deleted file mode 100644 index 2c1bf0579d..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactRequestSourceAsset.md +++ /dev/null @@ -1,171 +0,0 @@ -# TransactRequestSourceAsset - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Owner** | **string** | | -**Ontology** | **string** | | -**ContractName** | **string** | | -**ContractAddress** | Pointer to **string** | | [optional] -**MspId** | Pointer to **string** | | [optional] -**ChannelName** | Pointer to **string** | | [optional] - -## Methods - -### NewTransactRequestSourceAsset - -`func NewTransactRequestSourceAsset(owner string, ontology string, contractName string, ) *TransactRequestSourceAsset` - -NewTransactRequestSourceAsset instantiates a new TransactRequestSourceAsset object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactRequestSourceAssetWithDefaults - -`func NewTransactRequestSourceAssetWithDefaults() *TransactRequestSourceAsset` - -NewTransactRequestSourceAssetWithDefaults instantiates a new TransactRequestSourceAsset object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetOwner - -`func (o *TransactRequestSourceAsset) GetOwner() string` - -GetOwner returns the Owner field if non-nil, zero value otherwise. - -### GetOwnerOk - -`func (o *TransactRequestSourceAsset) GetOwnerOk() (*string, bool)` - -GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwner - -`func (o *TransactRequestSourceAsset) SetOwner(v string)` - -SetOwner sets Owner field to given value. - - -### GetOntology - -`func (o *TransactRequestSourceAsset) GetOntology() string` - -GetOntology returns the Ontology field if non-nil, zero value otherwise. - -### GetOntologyOk - -`func (o *TransactRequestSourceAsset) GetOntologyOk() (*string, bool)` - -GetOntologyOk returns a tuple with the Ontology field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOntology - -`func (o *TransactRequestSourceAsset) SetOntology(v string)` - -SetOntology sets Ontology field to given value. - - -### GetContractName - -`func (o *TransactRequestSourceAsset) GetContractName() string` - -GetContractName returns the ContractName field if non-nil, zero value otherwise. - -### GetContractNameOk - -`func (o *TransactRequestSourceAsset) GetContractNameOk() (*string, bool)` - -GetContractNameOk returns a tuple with the ContractName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContractName - -`func (o *TransactRequestSourceAsset) SetContractName(v string)` - -SetContractName sets ContractName field to given value. - - -### GetContractAddress - -`func (o *TransactRequestSourceAsset) GetContractAddress() string` - -GetContractAddress returns the ContractAddress field if non-nil, zero value otherwise. - -### GetContractAddressOk - -`func (o *TransactRequestSourceAsset) GetContractAddressOk() (*string, bool)` - -GetContractAddressOk returns a tuple with the ContractAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContractAddress - -`func (o *TransactRequestSourceAsset) SetContractAddress(v string)` - -SetContractAddress sets ContractAddress field to given value. - -### HasContractAddress - -`func (o *TransactRequestSourceAsset) HasContractAddress() bool` - -HasContractAddress returns a boolean if a field has been set. - -### GetMspId - -`func (o *TransactRequestSourceAsset) GetMspId() string` - -GetMspId returns the MspId field if non-nil, zero value otherwise. - -### GetMspIdOk - -`func (o *TransactRequestSourceAsset) GetMspIdOk() (*string, bool)` - -GetMspIdOk returns a tuple with the MspId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMspId - -`func (o *TransactRequestSourceAsset) SetMspId(v string)` - -SetMspId sets MspId field to given value. - -### HasMspId - -`func (o *TransactRequestSourceAsset) HasMspId() bool` - -HasMspId returns a boolean if a field has been set. - -### GetChannelName - -`func (o *TransactRequestSourceAsset) GetChannelName() string` - -GetChannelName returns the ChannelName field if non-nil, zero value otherwise. - -### GetChannelNameOk - -`func (o *TransactRequestSourceAsset) GetChannelNameOk() (*string, bool)` - -GetChannelNameOk returns a tuple with the ChannelName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChannelName - -`func (o *TransactRequestSourceAsset) SetChannelName(v string)` - -SetChannelName sets ChannelName field to given value. - -### HasChannelName - -`func (o *TransactRequestSourceAsset) HasChannelName() bool` - -HasChannelName returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactResponse.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactResponse.md deleted file mode 100644 index 94b680f3bb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactResponse.md +++ /dev/null @@ -1,72 +0,0 @@ -# TransactResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SessionID** | **string** | Unique identifier (UUID) for the session. | -**StatusResponse** | [**Transact200ResponseStatusResponse**](Transact200ResponseStatusResponse.md) | | - -## Methods - -### NewTransactResponse - -`func NewTransactResponse(sessionID string, statusResponse Transact200ResponseStatusResponse, ) *TransactResponse` - -NewTransactResponse instantiates a new TransactResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTransactResponseWithDefaults - -`func NewTransactResponseWithDefaults() *TransactResponse` - -NewTransactResponseWithDefaults instantiates a new TransactResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSessionID - -`func (o *TransactResponse) GetSessionID() string` - -GetSessionID returns the SessionID field if non-nil, zero value otherwise. - -### GetSessionIDOk - -`func (o *TransactResponse) GetSessionIDOk() (*string, bool)` - -GetSessionIDOk returns a tuple with the SessionID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionID - -`func (o *TransactResponse) SetSessionID(v string)` - -SetSessionID sets SessionID field to given value. - - -### GetStatusResponse - -`func (o *TransactResponse) GetStatusResponse() Transact200ResponseStatusResponse` - -GetStatusResponse returns the StatusResponse field if non-nil, zero value otherwise. - -### GetStatusResponseOk - -`func (o *TransactResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool)` - -GetStatusResponseOk returns a tuple with the StatusResponse field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusResponse - -`func (o *TransactResponse) SetStatusResponse(v Transact200ResponseStatusResponse)` - -SetStatusResponse sets StatusResponse field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md deleted file mode 100644 index 03466cd9c2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/docs/TransactionApi.md +++ /dev/null @@ -1,283 +0,0 @@ -# \TransactionApi - -All URIs are relative to *http://localhost:3011/api/v1/@hyperledger/cactus-plugin-satp-hermes* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Cancel**](TransactionApi.md#Cancel) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/cancel | Cancel a transaction session -[**GetIntegrations**](TransactionApi.md#GetIntegrations) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/integrations | Get supported integrations -[**GetRoutes**](TransactionApi.md#GetRoutes) | **Get** /api/v1/@hyperledger/cactus-plugin-satp-hermes/routes | Get a list of routes for a gateway-to-gateway asset transfer -[**Transact**](TransactionApi.md#Transact) | **Post** /api/v1/@hyperledger/cactus-plugin-satp-hermes/transact | Submit a transaction intent - - - -## Cancel - -> Cancel200Response Cancel(ctx).CancelRequest(cancelRequest).Execute() - -Cancel a transaction session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - cancelRequest := *openapiclient.NewCancelRequest("000003e8-e0b8-21ee-ba00-325096b39f47") // CancelRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransactionApi.Cancel(context.Background()).CancelRequest(cancelRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.Cancel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Cancel`: Cancel200Response - fmt.Fprintf(os.Stdout, "Response from `TransactionApi.Cancel`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCancelRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cancelRequest** | [**CancelRequest**](CancelRequest.md) | | - -### Return type - -[**Cancel200Response**](Cancel200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetIntegrations - -> []Chains1Inner GetIntegrations(ctx).Execute() - -Get supported integrations - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransactionApi.GetIntegrations(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.GetIntegrations``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetIntegrations`: []Chains1Inner - fmt.Fprintf(os.Stdout, "Response from `TransactionApi.GetIntegrations`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetIntegrationsRequest struct via the builder pattern - - -### Return type - -[**[]Chains1Inner**](Chains1Inner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoutes - -> GetRoutes200Response GetRoutes(ctx).FromNetworkID(fromNetworkID).FromAmount(fromAmount).FromToken(fromToken).ToDLTNetwork(toDLTNetwork).ToToken(toToken).FromAddress(fromAddress).ToAddress(toAddress).Execute() - -Get a list of routes for a gateway-to-gateway asset transfer - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - fromNetworkID := "fromNetworkID_example" // string | The sending DLT Network. - fromAmount := "1000000000000000000" // string | The amount that should be sent including all decimals. - fromToken := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The token that should be transferred. Can be the address or the symbol. - toDLTNetwork := "toDLTNetwork_example" // string | The receiving DLT Network. - toToken := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The token that should be transferred to. Can be the address or the symbol. - fromAddress := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The sending wallet address. - toAddress := "0x102A0F6D9F0F507288fE1e26740cFaD61184CCC7" // string | The receiving wallet address. If none is provided, the fromAddress will be used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransactionApi.GetRoutes(context.Background()).FromNetworkID(fromNetworkID).FromAmount(fromAmount).FromToken(fromToken).ToDLTNetwork(toDLTNetwork).ToToken(toToken).FromAddress(fromAddress).ToAddress(toAddress).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.GetRoutes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoutes`: GetRoutes200Response - fmt.Fprintf(os.Stdout, "Response from `TransactionApi.GetRoutes`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoutesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fromNetworkID** | **string** | The sending DLT Network. | - **fromAmount** | **string** | The amount that should be sent including all decimals. | - **fromToken** | **string** | The token that should be transferred. Can be the address or the symbol. | - **toDLTNetwork** | **string** | The receiving DLT Network. | - **toToken** | **string** | The token that should be transferred to. Can be the address or the symbol. | - **fromAddress** | **string** | The sending wallet address. | - **toAddress** | **string** | The receiving wallet address. If none is provided, the fromAddress will be used. | - -### Return type - -[**GetRoutes200Response**](GetRoutes200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## Transact - -> Transact200Response Transact(ctx).TransactRequest(transactRequest).Execute() - -Submit a transaction intent - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func main() { - transactRequest := *openapiclient.NewTransactRequest("123e4567-e89b-12d3-a456-426614174000", "network1", "network2", "100", "95", "BeneficiaryPubkey_example", "OriginatorPubkey_example", *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example"), *openapiclient.NewTransactRequestSourceAsset("Owner_example", "Ontology_example", "ContractName_example")) // TransactRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransactionApi.Transact(context.Background()).TransactRequest(transactRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransactionApi.Transact``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Transact`: Transact200Response - fmt.Fprintf(os.Stdout, "Response from `TransactionApi.Transact`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiTransactRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **transactRequest** | [**TransactRequest**](TransactRequest.md) | | - -### Return type - -[**Transact200Response**](Transact200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.mod b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.mod deleted file mode 100644 index 0f12e37626..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_action.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_action.go deleted file mode 100644 index 843bb4ba83..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_action.go +++ /dev/null @@ -1,310 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Action type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Action{} - -// Action struct for Action -type Action struct { - FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` - // The amount of 'fromToken' to be transferred, specified as a string to maintain precision. - FromAmount *string `json:"fromAmount,omitempty"` - ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` - // The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. - Slippage *float32 `json:"slippage,omitempty"` - // A blockchain address. - FromAddress *string `json:"fromAddress,omitempty"` - // A blockchain address. - ToAddress *string `json:"toAddress,omitempty"` -} - -// NewAction instantiates a new Action object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAction() *Action { - this := Action{} - return &this -} - -// NewActionWithDefaults instantiates a new Action object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewActionWithDefaults() *Action { - this := Action{} - return &this -} - -// GetFromToken returns the FromToken field value if set, zero value otherwise. -func (o *Action) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.FromToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.FromToken -} - -// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.FromToken) { - return nil, false - } - return o.FromToken, true -} - -// HasFromToken returns a boolean if a field has been set. -func (o *Action) HasFromToken() bool { - if o != nil && !IsNil(o.FromToken) { - return true - } - - return false -} - -// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. -func (o *Action) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.FromToken = &v -} - -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. -func (o *Action) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { - var ret string - return ret - } - return *o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { - return nil, false - } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *Action) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false -} - -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. -func (o *Action) SetFromAmount(v string) { - o.FromAmount = &v -} - -// GetToToken returns the ToToken field value if set, zero value otherwise. -func (o *Action) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.ToToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.ToToken -} - -// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.ToToken) { - return nil, false - } - return o.ToToken, true -} - -// HasToToken returns a boolean if a field has been set. -func (o *Action) HasToToken() bool { - if o != nil && !IsNil(o.ToToken) { - return true - } - - return false -} - -// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. -func (o *Action) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.ToToken = &v -} - -// GetSlippage returns the Slippage field value if set, zero value otherwise. -func (o *Action) GetSlippage() float32 { - if o == nil || IsNil(o.Slippage) { - var ret float32 - return ret - } - return *o.Slippage -} - -// GetSlippageOk returns a tuple with the Slippage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetSlippageOk() (*float32, bool) { - if o == nil || IsNil(o.Slippage) { - return nil, false - } - return o.Slippage, true -} - -// HasSlippage returns a boolean if a field has been set. -func (o *Action) HasSlippage() bool { - if o != nil && !IsNil(o.Slippage) { - return true - } - - return false -} - -// SetSlippage gets a reference to the given float32 and assigns it to the Slippage field. -func (o *Action) SetSlippage(v float32) { - o.Slippage = &v -} - -// GetFromAddress returns the FromAddress field value if set, zero value otherwise. -func (o *Action) GetFromAddress() string { - if o == nil || IsNil(o.FromAddress) { - var ret string - return ret - } - return *o.FromAddress -} - -// GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetFromAddressOk() (*string, bool) { - if o == nil || IsNil(o.FromAddress) { - return nil, false - } - return o.FromAddress, true -} - -// HasFromAddress returns a boolean if a field has been set. -func (o *Action) HasFromAddress() bool { - if o != nil && !IsNil(o.FromAddress) { - return true - } - - return false -} - -// SetFromAddress gets a reference to the given string and assigns it to the FromAddress field. -func (o *Action) SetFromAddress(v string) { - o.FromAddress = &v -} - -// GetToAddress returns the ToAddress field value if set, zero value otherwise. -func (o *Action) GetToAddress() string { - if o == nil || IsNil(o.ToAddress) { - var ret string - return ret - } - return *o.ToAddress -} - -// GetToAddressOk returns a tuple with the ToAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetToAddressOk() (*string, bool) { - if o == nil || IsNil(o.ToAddress) { - return nil, false - } - return o.ToAddress, true -} - -// HasToAddress returns a boolean if a field has been set. -func (o *Action) HasToAddress() bool { - if o != nil && !IsNil(o.ToAddress) { - return true - } - - return false -} - -// SetToAddress gets a reference to the given string and assigns it to the ToAddress field. -func (o *Action) SetToAddress(v string) { - o.ToAddress = &v -} - -func (o Action) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Action) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.FromToken) { - toSerialize["fromToken"] = o.FromToken - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.ToToken) { - toSerialize["toToken"] = o.ToToken - } - if !IsNil(o.Slippage) { - toSerialize["slippage"] = o.Slippage - } - if !IsNil(o.FromAddress) { - toSerialize["fromAddress"] = o.FromAddress - } - if !IsNil(o.ToAddress) { - toSerialize["toAddress"] = o.ToAddress - } - return toSerialize, nil -} - -type NullableAction struct { - value *Action - isSet bool -} - -func (v NullableAction) Get() *Action { - return v.value -} - -func (v *NullableAction) Set(val *Action) { - v.value = val - v.isSet = true -} - -func (v NullableAction) IsSet() bool { - return v.isSet -} - -func (v *NullableAction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAction(val *Action) *NullableAction { - return &NullableAction{value: val, isSet: true} -} - -func (v NullableAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go deleted file mode 100644 index 40c45a69fe..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_asset.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Asset type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Asset{} - -// Asset An asset -type Asset struct { - Owner string `json:"owner"` - Ontology string `json:"ontology"` - ContractName string `json:"contractName"` - ContractAddress *string `json:"contractAddress,omitempty"` - MspId *string `json:"mspId,omitempty"` - ChannelName *string `json:"channelName,omitempty"` -} - -// NewAsset instantiates a new Asset object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAsset(owner string, ontology string, contractName string) *Asset { - this := Asset{} - this.Owner = owner - this.Ontology = ontology - this.ContractName = contractName - return &this -} - -// NewAssetWithDefaults instantiates a new Asset object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAssetWithDefaults() *Asset { - this := Asset{} - return &this -} - -// GetOwner returns the Owner field value -func (o *Asset) GetOwner() string { - if o == nil { - var ret string - return ret - } - - return o.Owner -} - -// GetOwnerOk returns a tuple with the Owner field value -// and a boolean to check if the value has been set. -func (o *Asset) GetOwnerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Owner, true -} - -// SetOwner sets field value -func (o *Asset) SetOwner(v string) { - o.Owner = v -} - -// GetOntology returns the Ontology field value -func (o *Asset) GetOntology() string { - if o == nil { - var ret string - return ret - } - - return o.Ontology -} - -// GetOntologyOk returns a tuple with the Ontology field value -// and a boolean to check if the value has been set. -func (o *Asset) GetOntologyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Ontology, true -} - -// SetOntology sets field value -func (o *Asset) SetOntology(v string) { - o.Ontology = v -} - -// GetContractName returns the ContractName field value -func (o *Asset) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *Asset) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *Asset) SetContractName(v string) { - o.ContractName = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise. -func (o *Asset) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress) { - var ret string - return ret - } - return *o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Asset) GetContractAddressOk() (*string, bool) { - if o == nil || IsNil(o.ContractAddress) { - return nil, false - } - return o.ContractAddress, true -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *Asset) HasContractAddress() bool { - if o != nil && !IsNil(o.ContractAddress) { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field. -func (o *Asset) SetContractAddress(v string) { - o.ContractAddress = &v -} - -// GetMspId returns the MspId field value if set, zero value otherwise. -func (o *Asset) GetMspId() string { - if o == nil || IsNil(o.MspId) { - var ret string - return ret - } - return *o.MspId -} - -// GetMspIdOk returns a tuple with the MspId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Asset) GetMspIdOk() (*string, bool) { - if o == nil || IsNil(o.MspId) { - return nil, false - } - return o.MspId, true -} - -// HasMspId returns a boolean if a field has been set. -func (o *Asset) HasMspId() bool { - if o != nil && !IsNil(o.MspId) { - return true - } - - return false -} - -// SetMspId gets a reference to the given string and assigns it to the MspId field. -func (o *Asset) SetMspId(v string) { - o.MspId = &v -} - -// GetChannelName returns the ChannelName field value if set, zero value otherwise. -func (o *Asset) GetChannelName() string { - if o == nil || IsNil(o.ChannelName) { - var ret string - return ret - } - return *o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Asset) GetChannelNameOk() (*string, bool) { - if o == nil || IsNil(o.ChannelName) { - return nil, false - } - return o.ChannelName, true -} - -// HasChannelName returns a boolean if a field has been set. -func (o *Asset) HasChannelName() bool { - if o != nil && !IsNil(o.ChannelName) { - return true - } - - return false -} - -// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. -func (o *Asset) SetChannelName(v string) { - o.ChannelName = &v -} - -func (o Asset) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Asset) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["owner"] = o.Owner - toSerialize["ontology"] = o.Ontology - toSerialize["contractName"] = o.ContractName - if !IsNil(o.ContractAddress) { - toSerialize["contractAddress"] = o.ContractAddress - } - if !IsNil(o.MspId) { - toSerialize["mspId"] = o.MspId - } - if !IsNil(o.ChannelName) { - toSerialize["channelName"] = o.ChannelName - } - return toSerialize, nil -} - -type NullableAsset struct { - value *Asset - isSet bool -} - -func (v NullableAsset) Get() *Asset { - return v.value -} - -func (v *NullableAsset) Set(val *Asset) { - v.value = val - v.isSet = true -} - -func (v NullableAsset) IsSet() bool { - return v.isSet -} - -func (v *NullableAsset) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAsset(val *Asset) *NullableAsset { - return &NullableAsset{value: val, isSet: true} -} - -func (v NullableAsset) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAsset) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_jwt_claim.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_jwt_claim.go deleted file mode 100644 index f4678b2f82..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_jwt_claim.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "fmt" -) - -// AuthzJwtClaim Stores global constants related to the authorization of the application. Specifically enumerates the claims to validate for as per RFC 7519, section 4.1. See: https://tools.ietf.org/html/rfc7519#section-4.1 -type AuthzJwtClaim string - -// List of AuthzJwtClaim -const ( - iss AuthzJwtClaim = "Hyperledger Labs - Carbon Accounting Tool" -) - -// All allowed values of AuthzJwtClaim enum -var AllowedAuthzJwtClaimEnumValues = []AuthzJwtClaim{ - "Hyperledger Labs - Carbon Accounting Tool", -} - -func (v *AuthzJwtClaim) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := AuthzJwtClaim(value) - for _, existing := range AllowedAuthzJwtClaimEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid AuthzJwtClaim", value) -} - -// NewAuthzJwtClaimFromValue returns a pointer to a valid AuthzJwtClaim -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewAuthzJwtClaimFromValue(v string) (*AuthzJwtClaim, error) { - ev := AuthzJwtClaim(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuthzJwtClaim: valid values are %v", v, AllowedAuthzJwtClaimEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v AuthzJwtClaim) IsValid() bool { - for _, existing := range AllowedAuthzJwtClaimEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to AuthzJwtClaim value -func (v AuthzJwtClaim) Ptr() *AuthzJwtClaim { - return &v -} - -type NullableAuthzJwtClaim struct { - value *AuthzJwtClaim - isSet bool -} - -func (v NullableAuthzJwtClaim) Get() *AuthzJwtClaim { - return v.value -} - -func (v *NullableAuthzJwtClaim) Set(val *AuthzJwtClaim) { - v.value = val - v.isSet = true -} - -func (v NullableAuthzJwtClaim) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthzJwtClaim) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthzJwtClaim(val *AuthzJwtClaim) *NullableAuthzJwtClaim { - return &NullableAuthzJwtClaim{value: val, isSet: true} -} - -func (v NullableAuthzJwtClaim) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthzJwtClaim) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_scope.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_scope.go deleted file mode 100644 index 598e3de1d5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_authz_scope.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "fmt" -) - -// AuthzScope the model 'AuthzScope' -type AuthzScope string - -// List of AuthzScope -const ( - GroupAdmin AuthzScope = "group:admin" - GroupUser AuthzScope = "group:user" -) - -// All allowed values of AuthzScope enum -var AllowedAuthzScopeEnumValues = []AuthzScope{ - "group:admin", - "group:user", -} - -func (v *AuthzScope) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := AuthzScope(value) - for _, existing := range AllowedAuthzScopeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid AuthzScope", value) -} - -// NewAuthzScopeFromValue returns a pointer to a valid AuthzScope -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewAuthzScopeFromValue(v string) (*AuthzScope, error) { - ev := AuthzScope(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuthzScope: valid values are %v", v, AllowedAuthzScopeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v AuthzScope) IsValid() bool { - for _, existing := range AllowedAuthzScopeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to AuthzScope value -func (v AuthzScope) Ptr() *AuthzScope { - return &v -} - -type NullableAuthzScope struct { - value *AuthzScope - isSet bool -} - -func (v NullableAuthzScope) Get() *AuthzScope { - return v.value -} - -func (v *NullableAuthzScope) Set(val *AuthzScope) { - v.value = val - v.isSet = true -} - -func (v NullableAuthzScope) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthzScope) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthzScope(val *AuthzScope) *NullableAuthzScope { - return &NullableAuthzScope{value: val, isSet: true} -} - -func (v NullableAuthzScope) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthzScope) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_bridge_info.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_bridge_info.go deleted file mode 100644 index d92106add6..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_bridge_info.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the BridgeInfo type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BridgeInfo{} - -// BridgeInfo Information about the bridge used for the token transfer. -type BridgeInfo struct { - // The address of the token being transferred. - TokenAddress *string `json:"tokenAddress,omitempty"` -} - -// NewBridgeInfo instantiates a new BridgeInfo object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBridgeInfo() *BridgeInfo { - this := BridgeInfo{} - return &this -} - -// NewBridgeInfoWithDefaults instantiates a new BridgeInfo object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBridgeInfoWithDefaults() *BridgeInfo { - this := BridgeInfo{} - return &this -} - -// GetTokenAddress returns the TokenAddress field value if set, zero value otherwise. -func (o *BridgeInfo) GetTokenAddress() string { - if o == nil || IsNil(o.TokenAddress) { - var ret string - return ret - } - return *o.TokenAddress -} - -// GetTokenAddressOk returns a tuple with the TokenAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BridgeInfo) GetTokenAddressOk() (*string, bool) { - if o == nil || IsNil(o.TokenAddress) { - return nil, false - } - return o.TokenAddress, true -} - -// HasTokenAddress returns a boolean if a field has been set. -func (o *BridgeInfo) HasTokenAddress() bool { - if o != nil && !IsNil(o.TokenAddress) { - return true - } - - return false -} - -// SetTokenAddress gets a reference to the given string and assigns it to the TokenAddress field. -func (o *BridgeInfo) SetTokenAddress(v string) { - o.TokenAddress = &v -} - -func (o BridgeInfo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BridgeInfo) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TokenAddress) { - toSerialize["tokenAddress"] = o.TokenAddress - } - return toSerialize, nil -} - -type NullableBridgeInfo struct { - value *BridgeInfo - isSet bool -} - -func (v NullableBridgeInfo) Get() *BridgeInfo { - return v.value -} - -func (v *NullableBridgeInfo) Set(val *BridgeInfo) { - v.value = val - v.isSet = true -} - -func (v NullableBridgeInfo) IsSet() bool { - return v.isSet -} - -func (v *NullableBridgeInfo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBridgeInfo(val *BridgeInfo) *NullableBridgeInfo { - return &NullableBridgeInfo{value: val, isSet: true} -} - -func (v NullableBridgeInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBridgeInfo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_200_response.go deleted file mode 100644 index 3f4a06dde0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_200_response.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Cancel200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Cancel200Response{} - -// Cancel200Response Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. -type Cancel200Response struct { - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` - // Indicates whether the cancel operation was successful. - CancelSuccessful bool `json:"cancelSuccessful"` -} - -// NewCancel200Response instantiates a new Cancel200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCancel200Response(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool) *Cancel200Response { - this := Cancel200Response{} - this.StatusResponse = statusResponse - this.CancelSuccessful = cancelSuccessful - return &this -} - -// NewCancel200ResponseWithDefaults instantiates a new Cancel200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCancel200ResponseWithDefaults() *Cancel200Response { - this := Cancel200Response{} - return &this -} - -// GetStatusResponse returns the StatusResponse field value -func (o *Cancel200Response) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *Cancel200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *Cancel200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -// GetCancelSuccessful returns the CancelSuccessful field value -func (o *Cancel200Response) GetCancelSuccessful() bool { - if o == nil { - var ret bool - return ret - } - - return o.CancelSuccessful -} - -// GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field value -// and a boolean to check if the value has been set. -func (o *Cancel200Response) GetCancelSuccessfulOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.CancelSuccessful, true -} - -// SetCancelSuccessful sets field value -func (o *Cancel200Response) SetCancelSuccessful(v bool) { - o.CancelSuccessful = v -} - -func (o Cancel200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Cancel200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["statusResponse"] = o.StatusResponse - toSerialize["cancelSuccessful"] = o.CancelSuccessful - return toSerialize, nil -} - -type NullableCancel200Response struct { - value *Cancel200Response - isSet bool -} - -func (v NullableCancel200Response) Get() *Cancel200Response { - return v.value -} - -func (v *NullableCancel200Response) Set(val *Cancel200Response) { - v.value = val - v.isSet = true -} - -func (v NullableCancel200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCancel200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCancel200Response(val *Cancel200Response) *NullableCancel200Response { - return &NullableCancel200Response{value: val, isSet: true} -} - -func (v NullableCancel200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCancel200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_request.go deleted file mode 100644 index 87e6e244be..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the CancelRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CancelRequest{} - -// CancelRequest Request to cancel an ongoing transaction session, identified by the session ID. -type CancelRequest struct { - // Unique identifier (UUID) for the session. - SessionID string `json:"sessionID"` -} - -// NewCancelRequest instantiates a new CancelRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCancelRequest(sessionID string) *CancelRequest { - this := CancelRequest{} - this.SessionID = sessionID - return &this -} - -// NewCancelRequestWithDefaults instantiates a new CancelRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCancelRequestWithDefaults() *CancelRequest { - this := CancelRequest{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *CancelRequest) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *CancelRequest) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *CancelRequest) SetSessionID(v string) { - o.SessionID = v -} - -func (o CancelRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CancelRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - return toSerialize, nil -} - -type NullableCancelRequest struct { - value *CancelRequest - isSet bool -} - -func (v NullableCancelRequest) Get() *CancelRequest { - return v.value -} - -func (v *NullableCancelRequest) Set(val *CancelRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCancelRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCancelRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCancelRequest(val *CancelRequest) *NullableCancelRequest { - return &NullableCancelRequest{value: val, isSet: true} -} - -func (v NullableCancelRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCancelRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_response.go deleted file mode 100644 index e5c960e37a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_cancel_response.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the CancelResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CancelResponse{} - -// CancelResponse Response for a cancel transaction request. Indicates whether the cancel action was successful and includes the current session status. -type CancelResponse struct { - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` - // Indicates whether the cancel operation was successful. - CancelSuccessful bool `json:"cancelSuccessful"` -} - -// NewCancelResponse instantiates a new CancelResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCancelResponse(statusResponse Transact200ResponseStatusResponse, cancelSuccessful bool) *CancelResponse { - this := CancelResponse{} - this.StatusResponse = statusResponse - this.CancelSuccessful = cancelSuccessful - return &this -} - -// NewCancelResponseWithDefaults instantiates a new CancelResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCancelResponseWithDefaults() *CancelResponse { - this := CancelResponse{} - return &this -} - -// GetStatusResponse returns the StatusResponse field value -func (o *CancelResponse) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *CancelResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *CancelResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -// GetCancelSuccessful returns the CancelSuccessful field value -func (o *CancelResponse) GetCancelSuccessful() bool { - if o == nil { - var ret bool - return ret - } - - return o.CancelSuccessful -} - -// GetCancelSuccessfulOk returns a tuple with the CancelSuccessful field value -// and a boolean to check if the value has been set. -func (o *CancelResponse) GetCancelSuccessfulOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.CancelSuccessful, true -} - -// SetCancelSuccessful sets field value -func (o *CancelResponse) SetCancelSuccessful(v bool) { - o.CancelSuccessful = v -} - -func (o CancelResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CancelResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["statusResponse"] = o.StatusResponse - toSerialize["cancelSuccessful"] = o.CancelSuccessful - return toSerialize, nil -} - -type NullableCancelResponse struct { - value *CancelResponse - isSet bool -} - -func (v NullableCancelResponse) Get() *CancelResponse { - return v.value -} - -func (v *NullableCancelResponse) Set(val *CancelResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCancelResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCancelResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCancelResponse(val *CancelResponse) *NullableCancelResponse { - return &NullableCancelResponse{value: val, isSet: true} -} - -func (v NullableCancelResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCancelResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chain.go deleted file mode 100644 index f2e7079574..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chain.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Chain type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Chain{} - -// Chain struct for Chain -type Chain struct { - // A unique identifier for the blockchain network. - ChainId string `json:"chainId"` - // The name of the blockchain network. - ChainName string `json:"chainName"` - // The type of blockchain network (e.g., 'evm', 'fabric'). - ChainType string `json:"chainType"` - // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). - NetworkName string `json:"networkName"` -} - -// NewChain instantiates a new Chain object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewChain(chainId string, chainName string, chainType string, networkName string) *Chain { - this := Chain{} - this.ChainId = chainId - this.ChainName = chainName - this.ChainType = chainType - this.NetworkName = networkName - return &this -} - -// NewChainWithDefaults instantiates a new Chain object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewChainWithDefaults() *Chain { - this := Chain{} - return &this -} - -// GetChainId returns the ChainId field value -func (o *Chain) GetChainId() string { - if o == nil { - var ret string - return ret - } - - return o.ChainId -} - -// GetChainIdOk returns a tuple with the ChainId field value -// and a boolean to check if the value has been set. -func (o *Chain) GetChainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainId, true -} - -// SetChainId sets field value -func (o *Chain) SetChainId(v string) { - o.ChainId = v -} - -// GetChainName returns the ChainName field value -func (o *Chain) GetChainName() string { - if o == nil { - var ret string - return ret - } - - return o.ChainName -} - -// GetChainNameOk returns a tuple with the ChainName field value -// and a boolean to check if the value has been set. -func (o *Chain) GetChainNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainName, true -} - -// SetChainName sets field value -func (o *Chain) SetChainName(v string) { - o.ChainName = v -} - -// GetChainType returns the ChainType field value -func (o *Chain) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *Chain) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *Chain) SetChainType(v string) { - o.ChainType = v -} - -// GetNetworkName returns the NetworkName field value -func (o *Chain) GetNetworkName() string { - if o == nil { - var ret string - return ret - } - - return o.NetworkName -} - -// GetNetworkNameOk returns a tuple with the NetworkName field value -// and a boolean to check if the value has been set. -func (o *Chain) GetNetworkNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.NetworkName, true -} - -// SetNetworkName sets field value -func (o *Chain) SetNetworkName(v string) { - o.NetworkName = v -} - -func (o Chain) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Chain) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainId"] = o.ChainId - toSerialize["chainName"] = o.ChainName - toSerialize["chainType"] = o.ChainType - toSerialize["networkName"] = o.NetworkName - return toSerialize, nil -} - -type NullableChain struct { - value *Chain - isSet bool -} - -func (v NullableChain) Get() *Chain { - return v.value -} - -func (v *NullableChain) Set(val *Chain) { - v.value = val - v.isSet = true -} - -func (v NullableChain) IsSet() bool { - return v.isSet -} - -func (v *NullableChain) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChain(val *Chain) *NullableChain { - return &NullableChain{value: val, isSet: true} -} - -func (v NullableChain) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChain) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chains_1_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chains_1_inner.go deleted file mode 100644 index 49d8379190..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_chains_1_inner.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Chains1Inner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Chains1Inner{} - -// Chains1Inner struct for Chains1Inner -type Chains1Inner struct { - // A unique identifier for the blockchain network. - ChainId string `json:"chainId"` - // The name of the blockchain network. - ChainName string `json:"chainName"` - // The type of blockchain network (e.g., 'evm', 'fabric'). - ChainType string `json:"chainType"` - // The specific network name within the blockchain (e.g., 'mainnet', 'testnet'). - NetworkName string `json:"networkName"` -} - -// NewChains1Inner instantiates a new Chains1Inner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewChains1Inner(chainId string, chainName string, chainType string, networkName string) *Chains1Inner { - this := Chains1Inner{} - this.ChainId = chainId - this.ChainName = chainName - this.ChainType = chainType - this.NetworkName = networkName - return &this -} - -// NewChains1InnerWithDefaults instantiates a new Chains1Inner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewChains1InnerWithDefaults() *Chains1Inner { - this := Chains1Inner{} - return &this -} - -// GetChainId returns the ChainId field value -func (o *Chains1Inner) GetChainId() string { - if o == nil { - var ret string - return ret - } - - return o.ChainId -} - -// GetChainIdOk returns a tuple with the ChainId field value -// and a boolean to check if the value has been set. -func (o *Chains1Inner) GetChainIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainId, true -} - -// SetChainId sets field value -func (o *Chains1Inner) SetChainId(v string) { - o.ChainId = v -} - -// GetChainName returns the ChainName field value -func (o *Chains1Inner) GetChainName() string { - if o == nil { - var ret string - return ret - } - - return o.ChainName -} - -// GetChainNameOk returns a tuple with the ChainName field value -// and a boolean to check if the value has been set. -func (o *Chains1Inner) GetChainNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainName, true -} - -// SetChainName sets field value -func (o *Chains1Inner) SetChainName(v string) { - o.ChainName = v -} - -// GetChainType returns the ChainType field value -func (o *Chains1Inner) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *Chains1Inner) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *Chains1Inner) SetChainType(v string) { - o.ChainType = v -} - -// GetNetworkName returns the NetworkName field value -func (o *Chains1Inner) GetNetworkName() string { - if o == nil { - var ret string - return ret - } - - return o.NetworkName -} - -// GetNetworkNameOk returns a tuple with the NetworkName field value -// and a boolean to check if the value has been set. -func (o *Chains1Inner) GetNetworkNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.NetworkName, true -} - -// SetNetworkName sets field value -func (o *Chains1Inner) SetNetworkName(v string) { - o.NetworkName = v -} - -func (o Chains1Inner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Chains1Inner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainId"] = o.ChainId - toSerialize["chainName"] = o.ChainName - toSerialize["chainType"] = o.ChainType - toSerialize["networkName"] = o.NetworkName - return toSerialize, nil -} - -type NullableChains1Inner struct { - value *Chains1Inner - isSet bool -} - -func (v NullableChains1Inner) Get() *Chains1Inner { - return v.value -} - -func (v *NullableChains1Inner) Set(val *Chains1Inner) { - v.value = val - v.isSet = true -} - -func (v NullableChains1Inner) IsSet() bool { - return v.isSet -} - -func (v *NullableChains1Inner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChains1Inner(val *Chains1Inner) *NullableChains1Inner { - return &NullableChains1Inner{value: val, isSet: true} -} - -func (v NullableChains1Inner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChains1Inner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_200_response.go deleted file mode 100644 index d9bea245da..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_200_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Continue200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Continue200Response{} - -// Continue200Response Response schema for a continue request, returning the status of the SATP session. -type Continue200Response struct { - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` -} - -// NewContinue200Response instantiates a new Continue200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContinue200Response(statusResponse Transact200ResponseStatusResponse) *Continue200Response { - this := Continue200Response{} - this.StatusResponse = statusResponse - return &this -} - -// NewContinue200ResponseWithDefaults instantiates a new Continue200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContinue200ResponseWithDefaults() *Continue200Response { - this := Continue200Response{} - return &this -} - -// GetStatusResponse returns the StatusResponse field value -func (o *Continue200Response) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *Continue200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *Continue200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -func (o Continue200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Continue200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["statusResponse"] = o.StatusResponse - return toSerialize, nil -} - -type NullableContinue200Response struct { - value *Continue200Response - isSet bool -} - -func (v NullableContinue200Response) Get() *Continue200Response { - return v.value -} - -func (v *NullableContinue200Response) Set(val *Continue200Response) { - v.value = val - v.isSet = true -} - -func (v NullableContinue200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableContinue200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContinue200Response(val *Continue200Response) *NullableContinue200Response { - return &NullableContinue200Response{value: val, isSet: true} -} - -func (v NullableContinue200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContinue200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_request.go deleted file mode 100644 index 672169e029..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_request.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the ContinueRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContinueRequest{} - -// ContinueRequest Schema for a request to continue a paused transaction session. -type ContinueRequest struct { - // A unique identifier for the transaction session to be continued. - SessionId string `json:"sessionId"` - // A unique identifier for the transaction context. - ContextId string `json:"contextId"` -} - -// NewContinueRequest instantiates a new ContinueRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContinueRequest(sessionId string, contextId string) *ContinueRequest { - this := ContinueRequest{} - this.SessionId = sessionId - this.ContextId = contextId - return &this -} - -// NewContinueRequestWithDefaults instantiates a new ContinueRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContinueRequestWithDefaults() *ContinueRequest { - this := ContinueRequest{} - return &this -} - -// GetSessionId returns the SessionId field value -func (o *ContinueRequest) GetSessionId() string { - if o == nil { - var ret string - return ret - } - - return o.SessionId -} - -// GetSessionIdOk returns a tuple with the SessionId field value -// and a boolean to check if the value has been set. -func (o *ContinueRequest) GetSessionIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionId, true -} - -// SetSessionId sets field value -func (o *ContinueRequest) SetSessionId(v string) { - o.SessionId = v -} - -// GetContextId returns the ContextId field value -func (o *ContinueRequest) GetContextId() string { - if o == nil { - var ret string - return ret - } - - return o.ContextId -} - -// GetContextIdOk returns a tuple with the ContextId field value -// and a boolean to check if the value has been set. -func (o *ContinueRequest) GetContextIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContextId, true -} - -// SetContextId sets field value -func (o *ContinueRequest) SetContextId(v string) { - o.ContextId = v -} - -func (o ContinueRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContinueRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionId"] = o.SessionId - toSerialize["contextId"] = o.ContextId - return toSerialize, nil -} - -type NullableContinueRequest struct { - value *ContinueRequest - isSet bool -} - -func (v NullableContinueRequest) Get() *ContinueRequest { - return v.value -} - -func (v *NullableContinueRequest) Set(val *ContinueRequest) { - v.value = val - v.isSet = true -} - -func (v NullableContinueRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableContinueRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContinueRequest(val *ContinueRequest) *NullableContinueRequest { - return &NullableContinueRequest{value: val, isSet: true} -} - -func (v NullableContinueRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContinueRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_response.go deleted file mode 100644 index 74f3b5d9d5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_continue_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the ContinueResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContinueResponse{} - -// ContinueResponse Response schema for a continue request, returning the status of the SATP session. -type ContinueResponse struct { - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` -} - -// NewContinueResponse instantiates a new ContinueResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContinueResponse(statusResponse Transact200ResponseStatusResponse) *ContinueResponse { - this := ContinueResponse{} - this.StatusResponse = statusResponse - return &this -} - -// NewContinueResponseWithDefaults instantiates a new ContinueResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContinueResponseWithDefaults() *ContinueResponse { - this := ContinueResponse{} - return &this -} - -// GetStatusResponse returns the StatusResponse field value -func (o *ContinueResponse) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *ContinueResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *ContinueResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -func (o ContinueResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContinueResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["statusResponse"] = o.StatusResponse - return toSerialize, nil -} - -type NullableContinueResponse struct { - value *ContinueResponse - isSet bool -} - -func (v NullableContinueResponse) Get() *ContinueResponse { - return v.value -} - -func (v *NullableContinueResponse) Set(val *ContinueResponse) { - v.value = val - v.isSet = true -} - -func (v NullableContinueResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableContinueResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContinueResponse(val *ContinueResponse) *NullableContinueResponse { - return &NullableContinueResponse{value: val, isSet: true} -} - -func (v NullableContinueResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContinueResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_credential_profile.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_credential_profile.go deleted file mode 100644 index b6226e4217..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_credential_profile.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "fmt" -) - -// CredentialProfile the model 'CredentialProfile' -type CredentialProfile string - -// List of CredentialProfile -const ( - SAML CredentialProfile = "SAML" - OAUTH CredentialProfile = "OAUTH" - X509 CredentialProfile = "X509" -) - -// All allowed values of CredentialProfile enum -var AllowedCredentialProfileEnumValues = []CredentialProfile{ - "SAML", - "OAUTH", - "X509", -} - -func (v *CredentialProfile) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := CredentialProfile(value) - for _, existing := range AllowedCredentialProfileEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid CredentialProfile", value) -} - -// NewCredentialProfileFromValue returns a pointer to a valid CredentialProfile -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewCredentialProfileFromValue(v string) (*CredentialProfile, error) { - ev := CredentialProfile(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for CredentialProfile: valid values are %v", v, AllowedCredentialProfileEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v CredentialProfile) IsValid() bool { - for _, existing := range AllowedCredentialProfileEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to CredentialProfile value -func (v CredentialProfile) Ptr() *CredentialProfile { - return &v -} - -type NullableCredentialProfile struct { - value *CredentialProfile - isSet bool -} - -func (v NullableCredentialProfile) Get() *CredentialProfile { - return v.value -} - -func (v *NullableCredentialProfile) Set(val *CredentialProfile) { - v.value = val - v.isSet = true -} - -func (v NullableCredentialProfile) IsSet() bool { - return v.isSet -} - -func (v *NullableCredentialProfile) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCredentialProfile(val *CredentialProfile) *NullableCredentialProfile { - return &NullableCredentialProfile{value: val, isSet: true} -} - -func (v NullableCredentialProfile) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCredentialProfile) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_dlt_protocol.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_dlt_protocol.go deleted file mode 100644 index 10e52a3a8e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_dlt_protocol.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "fmt" -) - -// DLTProtocol Supported DLT protocols. -type DLTProtocol string - -// List of DLTProtocol -const ( - HYPERLEDGER_FABRIC DLTProtocol = "HyperledgerFabric" - HYPERLEDGER_BESU DLTProtocol = "HyperledgerBesu" -) - -// All allowed values of DLTProtocol enum -var AllowedDLTProtocolEnumValues = []DLTProtocol{ - "HyperledgerFabric", - "HyperledgerBesu", -} - -func (v *DLTProtocol) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := DLTProtocol(value) - for _, existing := range AllowedDLTProtocolEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid DLTProtocol", value) -} - -// NewDLTProtocolFromValue returns a pointer to a valid DLTProtocol -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewDLTProtocolFromValue(v string) (*DLTProtocol, error) { - ev := DLTProtocol(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DLTProtocol: valid values are %v", v, AllowedDLTProtocolEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v DLTProtocol) IsValid() bool { - for _, existing := range AllowedDLTProtocolEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to DLTProtocol value -func (v DLTProtocol) Ptr() *DLTProtocol { - return &v -} - -type NullableDLTProtocol struct { - value *DLTProtocol - isSet bool -} - -func (v NullableDLTProtocol) Get() *DLTProtocol { - return v.value -} - -func (v *NullableDLTProtocol) Set(val *DLTProtocol) { - v.value = val - v.isSet = true -} - -func (v NullableDLTProtocol) IsSet() bool { - return v.isSet -} - -func (v *NullableDLTProtocol) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDLTProtocol(val *DLTProtocol) *NullableDLTProtocol { - return &NullableDLTProtocol{value: val, isSet: true} -} - -func (v NullableDLTProtocol) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDLTProtocol) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_estimate.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_estimate.go deleted file mode 100644 index 6f6e4a4a37..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_estimate.go +++ /dev/null @@ -1,460 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Estimate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Estimate{} - -// Estimate Provides an estimation for a transaction, including costs, amounts, and execution duration. -type Estimate struct { - // A blockchain address. - ApprovalAddress *string `json:"approvalAddress,omitempty"` - // The amount in string format including all decimals. - ToAmountMin *string `json:"toAmountMin,omitempty"` - // The amount in string format including all decimals. - ToAmount *string `json:"toAmount,omitempty"` - // The amount in string format including all decimals. - FromAmount *string `json:"fromAmount,omitempty"` - // A collection of fee costs associated with the transaction. - FeeCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner `json:"feeCosts,omitempty"` - // A collection of estimated gas costs for executing the transaction. - GasCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner `json:"gasCosts,omitempty"` - // The estimated duration for the transaction execution in seconds. - ExecutionDuration *int32 `json:"executionDuration,omitempty"` - // The amount in string format including all decimals. - FromAmountUSD *string `json:"fromAmountUSD,omitempty"` - // The amount in string format including all decimals. - ToAmountUSD *string `json:"toAmountUSD,omitempty"` - // The tool or service used to generate this estimate. - Tool *string `json:"tool,omitempty"` -} - -// NewEstimate instantiates a new Estimate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEstimate() *Estimate { - this := Estimate{} - return &this -} - -// NewEstimateWithDefaults instantiates a new Estimate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEstimateWithDefaults() *Estimate { - this := Estimate{} - return &this -} - -// GetApprovalAddress returns the ApprovalAddress field value if set, zero value otherwise. -func (o *Estimate) GetApprovalAddress() string { - if o == nil || IsNil(o.ApprovalAddress) { - var ret string - return ret - } - return *o.ApprovalAddress -} - -// GetApprovalAddressOk returns a tuple with the ApprovalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetApprovalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ApprovalAddress) { - return nil, false - } - return o.ApprovalAddress, true -} - -// HasApprovalAddress returns a boolean if a field has been set. -func (o *Estimate) HasApprovalAddress() bool { - if o != nil && !IsNil(o.ApprovalAddress) { - return true - } - - return false -} - -// SetApprovalAddress gets a reference to the given string and assigns it to the ApprovalAddress field. -func (o *Estimate) SetApprovalAddress(v string) { - o.ApprovalAddress = &v -} - -// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. -func (o *Estimate) GetToAmountMin() string { - if o == nil || IsNil(o.ToAmountMin) { - var ret string - return ret - } - return *o.ToAmountMin -} - -// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetToAmountMinOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountMin) { - return nil, false - } - return o.ToAmountMin, true -} - -// HasToAmountMin returns a boolean if a field has been set. -func (o *Estimate) HasToAmountMin() bool { - if o != nil && !IsNil(o.ToAmountMin) { - return true - } - - return false -} - -// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. -func (o *Estimate) SetToAmountMin(v string) { - o.ToAmountMin = &v -} - -// GetToAmount returns the ToAmount field value if set, zero value otherwise. -func (o *Estimate) GetToAmount() string { - if o == nil || IsNil(o.ToAmount) { - var ret string - return ret - } - return *o.ToAmount -} - -// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetToAmountOk() (*string, bool) { - if o == nil || IsNil(o.ToAmount) { - return nil, false - } - return o.ToAmount, true -} - -// HasToAmount returns a boolean if a field has been set. -func (o *Estimate) HasToAmount() bool { - if o != nil && !IsNil(o.ToAmount) { - return true - } - - return false -} - -// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. -func (o *Estimate) SetToAmount(v string) { - o.ToAmount = &v -} - -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. -func (o *Estimate) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { - var ret string - return ret - } - return *o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { - return nil, false - } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *Estimate) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false -} - -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. -func (o *Estimate) SetFromAmount(v string) { - o.FromAmount = &v -} - -// GetFeeCosts returns the FeeCosts field value if set, zero value otherwise. -func (o *Estimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - if o == nil || IsNil(o.FeeCosts) { - var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - return ret - } - return o.FeeCosts -} - -// GetFeeCostsOk returns a tuple with the FeeCosts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetFeeCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool) { - if o == nil || IsNil(o.FeeCosts) { - return nil, false - } - return o.FeeCosts, true -} - -// HasFeeCosts returns a boolean if a field has been set. -func (o *Estimate) HasFeeCosts() bool { - if o != nil && !IsNil(o.FeeCosts) { - return true - } - - return false -} - -// SetFeeCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner and assigns it to the FeeCosts field. -func (o *Estimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) { - o.FeeCosts = v -} - -// GetGasCosts returns the GasCosts field value if set, zero value otherwise. -func (o *Estimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - if o == nil || IsNil(o.GasCosts) { - var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - return ret - } - return o.GasCosts -} - -// GetGasCostsOk returns a tuple with the GasCosts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetGasCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool) { - if o == nil || IsNil(o.GasCosts) { - return nil, false - } - return o.GasCosts, true -} - -// HasGasCosts returns a boolean if a field has been set. -func (o *Estimate) HasGasCosts() bool { - if o != nil && !IsNil(o.GasCosts) { - return true - } - - return false -} - -// SetGasCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner and assigns it to the GasCosts field. -func (o *Estimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) { - o.GasCosts = v -} - -// GetExecutionDuration returns the ExecutionDuration field value if set, zero value otherwise. -func (o *Estimate) GetExecutionDuration() int32 { - if o == nil || IsNil(o.ExecutionDuration) { - var ret int32 - return ret - } - return *o.ExecutionDuration -} - -// GetExecutionDurationOk returns a tuple with the ExecutionDuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetExecutionDurationOk() (*int32, bool) { - if o == nil || IsNil(o.ExecutionDuration) { - return nil, false - } - return o.ExecutionDuration, true -} - -// HasExecutionDuration returns a boolean if a field has been set. -func (o *Estimate) HasExecutionDuration() bool { - if o != nil && !IsNil(o.ExecutionDuration) { - return true - } - - return false -} - -// SetExecutionDuration gets a reference to the given int32 and assigns it to the ExecutionDuration field. -func (o *Estimate) SetExecutionDuration(v int32) { - o.ExecutionDuration = &v -} - -// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. -func (o *Estimate) GetFromAmountUSD() string { - if o == nil || IsNil(o.FromAmountUSD) { - var ret string - return ret - } - return *o.FromAmountUSD -} - -// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetFromAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.FromAmountUSD) { - return nil, false - } - return o.FromAmountUSD, true -} - -// HasFromAmountUSD returns a boolean if a field has been set. -func (o *Estimate) HasFromAmountUSD() bool { - if o != nil && !IsNil(o.FromAmountUSD) { - return true - } - - return false -} - -// SetFromAmountUSD gets a reference to the given string and assigns it to the FromAmountUSD field. -func (o *Estimate) SetFromAmountUSD(v string) { - o.FromAmountUSD = &v -} - -// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. -func (o *Estimate) GetToAmountUSD() string { - if o == nil || IsNil(o.ToAmountUSD) { - var ret string - return ret - } - return *o.ToAmountUSD -} - -// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetToAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountUSD) { - return nil, false - } - return o.ToAmountUSD, true -} - -// HasToAmountUSD returns a boolean if a field has been set. -func (o *Estimate) HasToAmountUSD() bool { - if o != nil && !IsNil(o.ToAmountUSD) { - return true - } - - return false -} - -// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. -func (o *Estimate) SetToAmountUSD(v string) { - o.ToAmountUSD = &v -} - -// GetTool returns the Tool field value if set, zero value otherwise. -func (o *Estimate) GetTool() string { - if o == nil || IsNil(o.Tool) { - var ret string - return ret - } - return *o.Tool -} - -// GetToolOk returns a tuple with the Tool field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Estimate) GetToolOk() (*string, bool) { - if o == nil || IsNil(o.Tool) { - return nil, false - } - return o.Tool, true -} - -// HasTool returns a boolean if a field has been set. -func (o *Estimate) HasTool() bool { - if o != nil && !IsNil(o.Tool) { - return true - } - - return false -} - -// SetTool gets a reference to the given string and assigns it to the Tool field. -func (o *Estimate) SetTool(v string) { - o.Tool = &v -} - -func (o Estimate) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Estimate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ApprovalAddress) { - toSerialize["approvalAddress"] = o.ApprovalAddress - } - if !IsNil(o.ToAmountMin) { - toSerialize["toAmountMin"] = o.ToAmountMin - } - if !IsNil(o.ToAmount) { - toSerialize["toAmount"] = o.ToAmount - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.FeeCosts) { - toSerialize["feeCosts"] = o.FeeCosts - } - if !IsNil(o.GasCosts) { - toSerialize["gasCosts"] = o.GasCosts - } - if !IsNil(o.ExecutionDuration) { - toSerialize["executionDuration"] = o.ExecutionDuration - } - if !IsNil(o.FromAmountUSD) { - toSerialize["fromAmountUSD"] = o.FromAmountUSD - } - if !IsNil(o.ToAmountUSD) { - toSerialize["toAmountUSD"] = o.ToAmountUSD - } - if !IsNil(o.Tool) { - toSerialize["tool"] = o.Tool - } - return toSerialize, nil -} - -type NullableEstimate struct { - value *Estimate - isSet bool -} - -func (v NullableEstimate) Get() *Estimate { - return v.value -} - -func (v *NullableEstimate) Set(val *Estimate) { - v.value = val - v.isSet = true -} - -func (v NullableEstimate) IsSet() bool { - return v.isSet -} - -func (v *NullableEstimate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEstimate(val *Estimate) *NullableEstimate { - return &NullableEstimate{value: val, isSet: true} -} - -func (v NullableEstimate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEstimate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_fee_cost.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_fee_cost.go deleted file mode 100644 index 940490ec88..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_fee_cost.go +++ /dev/null @@ -1,275 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the FeeCost type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FeeCost{} - -// FeeCost Details about a specific fee cost associated with the transaction. -type FeeCost struct { - // Name of the fee cost. - Name *string `json:"name,omitempty"` - // The amount in string format including all decimals. - Amount *string `json:"amount,omitempty"` - // The amount in string format including all decimals. - AmountUSD *string `json:"amountUSD,omitempty"` - // The symbol of a token - Token *string `json:"token,omitempty"` - // Indicates if the fee is included in the transaction amount. - Included *bool `json:"included,omitempty"` -} - -// NewFeeCost instantiates a new FeeCost object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFeeCost() *FeeCost { - this := FeeCost{} - return &this -} - -// NewFeeCostWithDefaults instantiates a new FeeCost object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFeeCostWithDefaults() *FeeCost { - this := FeeCost{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *FeeCost) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FeeCost) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *FeeCost) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *FeeCost) SetName(v string) { - o.Name = &v -} - -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *FeeCost) GetAmount() string { - if o == nil || IsNil(o.Amount) { - var ret string - return ret - } - return *o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FeeCost) GetAmountOk() (*string, bool) { - if o == nil || IsNil(o.Amount) { - return nil, false - } - return o.Amount, true -} - -// HasAmount returns a boolean if a field has been set. -func (o *FeeCost) HasAmount() bool { - if o != nil && !IsNil(o.Amount) { - return true - } - - return false -} - -// SetAmount gets a reference to the given string and assigns it to the Amount field. -func (o *FeeCost) SetAmount(v string) { - o.Amount = &v -} - -// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. -func (o *FeeCost) GetAmountUSD() string { - if o == nil || IsNil(o.AmountUSD) { - var ret string - return ret - } - return *o.AmountUSD -} - -// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FeeCost) GetAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.AmountUSD) { - return nil, false - } - return o.AmountUSD, true -} - -// HasAmountUSD returns a boolean if a field has been set. -func (o *FeeCost) HasAmountUSD() bool { - if o != nil && !IsNil(o.AmountUSD) { - return true - } - - return false -} - -// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. -func (o *FeeCost) SetAmountUSD(v string) { - o.AmountUSD = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *FeeCost) GetToken() string { - if o == nil || IsNil(o.Token) { - var ret string - return ret - } - return *o.Token -} - -// GetTokenOk returns a tuple with the Token field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FeeCost) GetTokenOk() (*string, bool) { - if o == nil || IsNil(o.Token) { - return nil, false - } - return o.Token, true -} - -// HasToken returns a boolean if a field has been set. -func (o *FeeCost) HasToken() bool { - if o != nil && !IsNil(o.Token) { - return true - } - - return false -} - -// SetToken gets a reference to the given string and assigns it to the Token field. -func (o *FeeCost) SetToken(v string) { - o.Token = &v -} - -// GetIncluded returns the Included field value if set, zero value otherwise. -func (o *FeeCost) GetIncluded() bool { - if o == nil || IsNil(o.Included) { - var ret bool - return ret - } - return *o.Included -} - -// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FeeCost) GetIncludedOk() (*bool, bool) { - if o == nil || IsNil(o.Included) { - return nil, false - } - return o.Included, true -} - -// HasIncluded returns a boolean if a field has been set. -func (o *FeeCost) HasIncluded() bool { - if o != nil && !IsNil(o.Included) { - return true - } - - return false -} - -// SetIncluded gets a reference to the given bool and assigns it to the Included field. -func (o *FeeCost) SetIncluded(v bool) { - o.Included = &v -} - -func (o FeeCost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FeeCost) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } - if !IsNil(o.AmountUSD) { - toSerialize["amountUSD"] = o.AmountUSD - } - if !IsNil(o.Token) { - toSerialize["token"] = o.Token - } - if !IsNil(o.Included) { - toSerialize["included"] = o.Included - } - return toSerialize, nil -} - -type NullableFeeCost struct { - value *FeeCost - isSet bool -} - -func (v NullableFeeCost) Get() *FeeCost { - return v.value -} - -func (v *NullableFeeCost) Set(val *FeeCost) { - v.value = val - v.isSet = true -} - -func (v NullableFeeCost) IsSet() bool { - return v.isSet -} - -func (v *NullableFeeCost) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFeeCost(val *FeeCost) *NullableFeeCost { - return &NullableFeeCost{value: val, isSet: true} -} - -func (v NullableFeeCost) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFeeCost) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_gas_cost.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_gas_cost.go deleted file mode 100644 index 328d136f2b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_gas_cost.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GasCost type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GasCost{} - -// GasCost struct for GasCost -type GasCost struct { - // The type of the gas cost. - Type *string `json:"type,omitempty"` - // The gas price, specified as a string to maintain precision. - Price *string `json:"price,omitempty"` - // The estimated gas required, specified as a string to maintain precision. - Estimate *string `json:"estimate,omitempty"` - // The gas limit for the transaction, specified as a string to maintain precision. - Limit *string `json:"limit,omitempty"` - // The amount of gas required in the gas currency. - Amount *string `json:"amount,omitempty"` - // The amount of gas required in USD. - AmountUSD *string `json:"amountUSD,omitempty"` - Token *GetRoutes200ResponseRoutesInnerFromToken `json:"token,omitempty"` -} - -// NewGasCost instantiates a new GasCost object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGasCost() *GasCost { - this := GasCost{} - return &this -} - -// NewGasCostWithDefaults instantiates a new GasCost object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGasCostWithDefaults() *GasCost { - this := GasCost{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *GasCost) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *GasCost) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *GasCost) SetType(v string) { - o.Type = &v -} - -// GetPrice returns the Price field value if set, zero value otherwise. -func (o *GasCost) GetPrice() string { - if o == nil || IsNil(o.Price) { - var ret string - return ret - } - return *o.Price -} - -// GetPriceOk returns a tuple with the Price field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetPriceOk() (*string, bool) { - if o == nil || IsNil(o.Price) { - return nil, false - } - return o.Price, true -} - -// HasPrice returns a boolean if a field has been set. -func (o *GasCost) HasPrice() bool { - if o != nil && !IsNil(o.Price) { - return true - } - - return false -} - -// SetPrice gets a reference to the given string and assigns it to the Price field. -func (o *GasCost) SetPrice(v string) { - o.Price = &v -} - -// GetEstimate returns the Estimate field value if set, zero value otherwise. -func (o *GasCost) GetEstimate() string { - if o == nil || IsNil(o.Estimate) { - var ret string - return ret - } - return *o.Estimate -} - -// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetEstimateOk() (*string, bool) { - if o == nil || IsNil(o.Estimate) { - return nil, false - } - return o.Estimate, true -} - -// HasEstimate returns a boolean if a field has been set. -func (o *GasCost) HasEstimate() bool { - if o != nil && !IsNil(o.Estimate) { - return true - } - - return false -} - -// SetEstimate gets a reference to the given string and assigns it to the Estimate field. -func (o *GasCost) SetEstimate(v string) { - o.Estimate = &v -} - -// GetLimit returns the Limit field value if set, zero value otherwise. -func (o *GasCost) GetLimit() string { - if o == nil || IsNil(o.Limit) { - var ret string - return ret - } - return *o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetLimitOk() (*string, bool) { - if o == nil || IsNil(o.Limit) { - return nil, false - } - return o.Limit, true -} - -// HasLimit returns a boolean if a field has been set. -func (o *GasCost) HasLimit() bool { - if o != nil && !IsNil(o.Limit) { - return true - } - - return false -} - -// SetLimit gets a reference to the given string and assigns it to the Limit field. -func (o *GasCost) SetLimit(v string) { - o.Limit = &v -} - -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *GasCost) GetAmount() string { - if o == nil || IsNil(o.Amount) { - var ret string - return ret - } - return *o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetAmountOk() (*string, bool) { - if o == nil || IsNil(o.Amount) { - return nil, false - } - return o.Amount, true -} - -// HasAmount returns a boolean if a field has been set. -func (o *GasCost) HasAmount() bool { - if o != nil && !IsNil(o.Amount) { - return true - } - - return false -} - -// SetAmount gets a reference to the given string and assigns it to the Amount field. -func (o *GasCost) SetAmount(v string) { - o.Amount = &v -} - -// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. -func (o *GasCost) GetAmountUSD() string { - if o == nil || IsNil(o.AmountUSD) { - var ret string - return ret - } - return *o.AmountUSD -} - -// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.AmountUSD) { - return nil, false - } - return o.AmountUSD, true -} - -// HasAmountUSD returns a boolean if a field has been set. -func (o *GasCost) HasAmountUSD() bool { - if o != nil && !IsNil(o.AmountUSD) { - return true - } - - return false -} - -// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. -func (o *GasCost) SetAmountUSD(v string) { - o.AmountUSD = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *GasCost) GetToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.Token) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.Token -} - -// GetTokenOk returns a tuple with the Token field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GasCost) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.Token) { - return nil, false - } - return o.Token, true -} - -// HasToken returns a boolean if a field has been set. -func (o *GasCost) HasToken() bool { - if o != nil && !IsNil(o.Token) { - return true - } - - return false -} - -// SetToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the Token field. -func (o *GasCost) SetToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.Token = &v -} - -func (o GasCost) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GasCost) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Price) { - toSerialize["price"] = o.Price - } - if !IsNil(o.Estimate) { - toSerialize["estimate"] = o.Estimate - } - if !IsNil(o.Limit) { - toSerialize["limit"] = o.Limit - } - if !IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } - if !IsNil(o.AmountUSD) { - toSerialize["amountUSD"] = o.AmountUSD - } - if !IsNil(o.Token) { - toSerialize["token"] = o.Token - } - return toSerialize, nil -} - -type NullableGasCost struct { - value *GasCost - isSet bool -} - -func (v NullableGasCost) Get() *GasCost { - return v.value -} - -func (v *NullableGasCost) Set(val *GasCost) { - v.value = val - v.isSet = true -} - -func (v NullableGasCost) IsSet() bool { - return v.isSet -} - -func (v *NullableGasCost) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGasCost(val *GasCost) *NullableGasCost { - return &NullableGasCost{value: val, isSet: true} -} - -func (v NullableGasCost) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGasCost) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_200_response.go deleted file mode 100644 index f92c619e5e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_200_response.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "time" -) - -// checks if the GetAudit200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetAudit200Response{} - -// GetAudit200Response Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. -type GetAudit200Response struct { - // An array of strings representing proofs. - Proofs []string `json:"proofs,omitempty"` - // The start datetime of the audit period. - AuditStartTime *time.Time `json:"auditStartTime,omitempty"` - // The end datetime of the audit period. - AuditEndTime *time.Time `json:"auditEndTime,omitempty"` -} - -// NewGetAudit200Response instantiates a new GetAudit200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetAudit200Response() *GetAudit200Response { - this := GetAudit200Response{} - return &this -} - -// NewGetAudit200ResponseWithDefaults instantiates a new GetAudit200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetAudit200ResponseWithDefaults() *GetAudit200Response { - this := GetAudit200Response{} - return &this -} - -// GetProofs returns the Proofs field value if set, zero value otherwise. -func (o *GetAudit200Response) GetProofs() []string { - if o == nil || IsNil(o.Proofs) { - var ret []string - return ret - } - return o.Proofs -} - -// GetProofsOk returns a tuple with the Proofs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAudit200Response) GetProofsOk() ([]string, bool) { - if o == nil || IsNil(o.Proofs) { - return nil, false - } - return o.Proofs, true -} - -// HasProofs returns a boolean if a field has been set. -func (o *GetAudit200Response) HasProofs() bool { - if o != nil && !IsNil(o.Proofs) { - return true - } - - return false -} - -// SetProofs gets a reference to the given []string and assigns it to the Proofs field. -func (o *GetAudit200Response) SetProofs(v []string) { - o.Proofs = v -} - -// GetAuditStartTime returns the AuditStartTime field value if set, zero value otherwise. -func (o *GetAudit200Response) GetAuditStartTime() time.Time { - if o == nil || IsNil(o.AuditStartTime) { - var ret time.Time - return ret - } - return *o.AuditStartTime -} - -// GetAuditStartTimeOk returns a tuple with the AuditStartTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAudit200Response) GetAuditStartTimeOk() (*time.Time, bool) { - if o == nil || IsNil(o.AuditStartTime) { - return nil, false - } - return o.AuditStartTime, true -} - -// HasAuditStartTime returns a boolean if a field has been set. -func (o *GetAudit200Response) HasAuditStartTime() bool { - if o != nil && !IsNil(o.AuditStartTime) { - return true - } - - return false -} - -// SetAuditStartTime gets a reference to the given time.Time and assigns it to the AuditStartTime field. -func (o *GetAudit200Response) SetAuditStartTime(v time.Time) { - o.AuditStartTime = &v -} - -// GetAuditEndTime returns the AuditEndTime field value if set, zero value otherwise. -func (o *GetAudit200Response) GetAuditEndTime() time.Time { - if o == nil || IsNil(o.AuditEndTime) { - var ret time.Time - return ret - } - return *o.AuditEndTime -} - -// GetAuditEndTimeOk returns a tuple with the AuditEndTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAudit200Response) GetAuditEndTimeOk() (*time.Time, bool) { - if o == nil || IsNil(o.AuditEndTime) { - return nil, false - } - return o.AuditEndTime, true -} - -// HasAuditEndTime returns a boolean if a field has been set. -func (o *GetAudit200Response) HasAuditEndTime() bool { - if o != nil && !IsNil(o.AuditEndTime) { - return true - } - - return false -} - -// SetAuditEndTime gets a reference to the given time.Time and assigns it to the AuditEndTime field. -func (o *GetAudit200Response) SetAuditEndTime(v time.Time) { - o.AuditEndTime = &v -} - -func (o GetAudit200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetAudit200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Proofs) { - toSerialize["proofs"] = o.Proofs - } - if !IsNil(o.AuditStartTime) { - toSerialize["auditStartTime"] = o.AuditStartTime - } - if !IsNil(o.AuditEndTime) { - toSerialize["auditEndTime"] = o.AuditEndTime - } - return toSerialize, nil -} - -type NullableGetAudit200Response struct { - value *GetAudit200Response - isSet bool -} - -func (v NullableGetAudit200Response) Get() *GetAudit200Response { - return v.value -} - -func (v *NullableGetAudit200Response) Set(val *GetAudit200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetAudit200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAudit200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAudit200Response(val *GetAudit200Response) *NullableGetAudit200Response { - return &NullableGetAudit200Response{value: val, isSet: true} -} - -func (v NullableGetAudit200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAudit200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_request.go deleted file mode 100644 index fffc0b47d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_request.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "time" -) - -// checks if the GetAuditRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetAuditRequest{} - -// GetAuditRequest Request schema for initiating an audit. Includes the start and end dates for the audit period and an option to include proofs. -type GetAuditRequest struct { - // The start datetime for the audit. - AuditStartDate *time.Time `json:"auditStartDate,omitempty"` - // The end datetime for the audit. - AuditEndDate *time.Time `json:"auditEndDate,omitempty"` - // Include proofs generated from each gateway transaction. - IncludeProofs *bool `json:"includeProofs,omitempty"` -} - -// NewGetAuditRequest instantiates a new GetAuditRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetAuditRequest() *GetAuditRequest { - this := GetAuditRequest{} - return &this -} - -// NewGetAuditRequestWithDefaults instantiates a new GetAuditRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetAuditRequestWithDefaults() *GetAuditRequest { - this := GetAuditRequest{} - return &this -} - -// GetAuditStartDate returns the AuditStartDate field value if set, zero value otherwise. -func (o *GetAuditRequest) GetAuditStartDate() time.Time { - if o == nil || IsNil(o.AuditStartDate) { - var ret time.Time - return ret - } - return *o.AuditStartDate -} - -// GetAuditStartDateOk returns a tuple with the AuditStartDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuditRequest) GetAuditStartDateOk() (*time.Time, bool) { - if o == nil || IsNil(o.AuditStartDate) { - return nil, false - } - return o.AuditStartDate, true -} - -// HasAuditStartDate returns a boolean if a field has been set. -func (o *GetAuditRequest) HasAuditStartDate() bool { - if o != nil && !IsNil(o.AuditStartDate) { - return true - } - - return false -} - -// SetAuditStartDate gets a reference to the given time.Time and assigns it to the AuditStartDate field. -func (o *GetAuditRequest) SetAuditStartDate(v time.Time) { - o.AuditStartDate = &v -} - -// GetAuditEndDate returns the AuditEndDate field value if set, zero value otherwise. -func (o *GetAuditRequest) GetAuditEndDate() time.Time { - if o == nil || IsNil(o.AuditEndDate) { - var ret time.Time - return ret - } - return *o.AuditEndDate -} - -// GetAuditEndDateOk returns a tuple with the AuditEndDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuditRequest) GetAuditEndDateOk() (*time.Time, bool) { - if o == nil || IsNil(o.AuditEndDate) { - return nil, false - } - return o.AuditEndDate, true -} - -// HasAuditEndDate returns a boolean if a field has been set. -func (o *GetAuditRequest) HasAuditEndDate() bool { - if o != nil && !IsNil(o.AuditEndDate) { - return true - } - - return false -} - -// SetAuditEndDate gets a reference to the given time.Time and assigns it to the AuditEndDate field. -func (o *GetAuditRequest) SetAuditEndDate(v time.Time) { - o.AuditEndDate = &v -} - -// GetIncludeProofs returns the IncludeProofs field value if set, zero value otherwise. -func (o *GetAuditRequest) GetIncludeProofs() bool { - if o == nil || IsNil(o.IncludeProofs) { - var ret bool - return ret - } - return *o.IncludeProofs -} - -// GetIncludeProofsOk returns a tuple with the IncludeProofs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuditRequest) GetIncludeProofsOk() (*bool, bool) { - if o == nil || IsNil(o.IncludeProofs) { - return nil, false - } - return o.IncludeProofs, true -} - -// HasIncludeProofs returns a boolean if a field has been set. -func (o *GetAuditRequest) HasIncludeProofs() bool { - if o != nil && !IsNil(o.IncludeProofs) { - return true - } - - return false -} - -// SetIncludeProofs gets a reference to the given bool and assigns it to the IncludeProofs field. -func (o *GetAuditRequest) SetIncludeProofs(v bool) { - o.IncludeProofs = &v -} - -func (o GetAuditRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetAuditRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AuditStartDate) { - toSerialize["auditStartDate"] = o.AuditStartDate - } - if !IsNil(o.AuditEndDate) { - toSerialize["auditEndDate"] = o.AuditEndDate - } - if !IsNil(o.IncludeProofs) { - toSerialize["includeProofs"] = o.IncludeProofs - } - return toSerialize, nil -} - -type NullableGetAuditRequest struct { - value *GetAuditRequest - isSet bool -} - -func (v NullableGetAuditRequest) Get() *GetAuditRequest { - return v.value -} - -func (v *NullableGetAuditRequest) Set(val *GetAuditRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetAuditRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAuditRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAuditRequest(val *GetAuditRequest) *NullableGetAuditRequest { - return &NullableGetAuditRequest{value: val, isSet: true} -} - -func (v NullableGetAuditRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAuditRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_response.go deleted file mode 100644 index 2bde4e9595..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_audit_response.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "time" -) - -// checks if the GetAuditResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetAuditResponse{} - -// GetAuditResponse Response schema for an audit request. Contains the proofs generated during the audit period and the start and end datetimes. -type GetAuditResponse struct { - // An array of strings representing proofs. - Proofs []string `json:"proofs,omitempty"` - // The start datetime of the audit period. - AuditStartTime *time.Time `json:"auditStartTime,omitempty"` - // The end datetime of the audit period. - AuditEndTime *time.Time `json:"auditEndTime,omitempty"` -} - -// NewGetAuditResponse instantiates a new GetAuditResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetAuditResponse() *GetAuditResponse { - this := GetAuditResponse{} - return &this -} - -// NewGetAuditResponseWithDefaults instantiates a new GetAuditResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetAuditResponseWithDefaults() *GetAuditResponse { - this := GetAuditResponse{} - return &this -} - -// GetProofs returns the Proofs field value if set, zero value otherwise. -func (o *GetAuditResponse) GetProofs() []string { - if o == nil || IsNil(o.Proofs) { - var ret []string - return ret - } - return o.Proofs -} - -// GetProofsOk returns a tuple with the Proofs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuditResponse) GetProofsOk() ([]string, bool) { - if o == nil || IsNil(o.Proofs) { - return nil, false - } - return o.Proofs, true -} - -// HasProofs returns a boolean if a field has been set. -func (o *GetAuditResponse) HasProofs() bool { - if o != nil && !IsNil(o.Proofs) { - return true - } - - return false -} - -// SetProofs gets a reference to the given []string and assigns it to the Proofs field. -func (o *GetAuditResponse) SetProofs(v []string) { - o.Proofs = v -} - -// GetAuditStartTime returns the AuditStartTime field value if set, zero value otherwise. -func (o *GetAuditResponse) GetAuditStartTime() time.Time { - if o == nil || IsNil(o.AuditStartTime) { - var ret time.Time - return ret - } - return *o.AuditStartTime -} - -// GetAuditStartTimeOk returns a tuple with the AuditStartTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuditResponse) GetAuditStartTimeOk() (*time.Time, bool) { - if o == nil || IsNil(o.AuditStartTime) { - return nil, false - } - return o.AuditStartTime, true -} - -// HasAuditStartTime returns a boolean if a field has been set. -func (o *GetAuditResponse) HasAuditStartTime() bool { - if o != nil && !IsNil(o.AuditStartTime) { - return true - } - - return false -} - -// SetAuditStartTime gets a reference to the given time.Time and assigns it to the AuditStartTime field. -func (o *GetAuditResponse) SetAuditStartTime(v time.Time) { - o.AuditStartTime = &v -} - -// GetAuditEndTime returns the AuditEndTime field value if set, zero value otherwise. -func (o *GetAuditResponse) GetAuditEndTime() time.Time { - if o == nil || IsNil(o.AuditEndTime) { - var ret time.Time - return ret - } - return *o.AuditEndTime -} - -// GetAuditEndTimeOk returns a tuple with the AuditEndTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuditResponse) GetAuditEndTimeOk() (*time.Time, bool) { - if o == nil || IsNil(o.AuditEndTime) { - return nil, false - } - return o.AuditEndTime, true -} - -// HasAuditEndTime returns a boolean if a field has been set. -func (o *GetAuditResponse) HasAuditEndTime() bool { - if o != nil && !IsNil(o.AuditEndTime) { - return true - } - - return false -} - -// SetAuditEndTime gets a reference to the given time.Time and assigns it to the AuditEndTime field. -func (o *GetAuditResponse) SetAuditEndTime(v time.Time) { - o.AuditEndTime = &v -} - -func (o GetAuditResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetAuditResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Proofs) { - toSerialize["proofs"] = o.Proofs - } - if !IsNil(o.AuditStartTime) { - toSerialize["auditStartTime"] = o.AuditStartTime - } - if !IsNil(o.AuditEndTime) { - toSerialize["auditEndTime"] = o.AuditEndTime - } - return toSerialize, nil -} - -type NullableGetAuditResponse struct { - value *GetAuditResponse - isSet bool -} - -func (v NullableGetAuditResponse) Get() *GetAuditResponse { - return v.value -} - -func (v *NullableGetAuditResponse) Set(val *GetAuditResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetAuditResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAuditResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAuditResponse(val *GetAuditResponse) *NullableGetAuditResponse { - return &NullableGetAuditResponse{value: val, isSet: true} -} - -func (v NullableGetAuditResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAuditResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_health_check_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_health_check_200_response.go deleted file mode 100644 index b25ba1ae46..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_health_check_200_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetHealthCheck200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetHealthCheck200Response{} - -// GetHealthCheck200Response struct for GetHealthCheck200Response -type GetHealthCheck200Response struct { - Status *string `json:"status,omitempty"` -} - -// NewGetHealthCheck200Response instantiates a new GetHealthCheck200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetHealthCheck200Response() *GetHealthCheck200Response { - this := GetHealthCheck200Response{} - return &this -} - -// NewGetHealthCheck200ResponseWithDefaults instantiates a new GetHealthCheck200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetHealthCheck200ResponseWithDefaults() *GetHealthCheck200Response { - this := GetHealthCheck200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetHealthCheck200Response) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetHealthCheck200Response) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetHealthCheck200Response) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *GetHealthCheck200Response) SetStatus(v string) { - o.Status = &v -} - -func (o GetHealthCheck200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetHealthCheck200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableGetHealthCheck200Response struct { - value *GetHealthCheck200Response - isSet bool -} - -func (v NullableGetHealthCheck200Response) Get() *GetHealthCheck200Response { - return v.value -} - -func (v *NullableGetHealthCheck200Response) Set(val *GetHealthCheck200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetHealthCheck200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetHealthCheck200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetHealthCheck200Response(val *GetHealthCheck200Response) *NullableGetHealthCheck200Response { - return &NullableGetHealthCheck200Response{value: val, isSet: true} -} - -func (v NullableGetHealthCheck200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetHealthCheck200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response.go deleted file mode 100644 index f58f5d0eda..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200Response{} - -// GetRoutes200Response A collection of available and unavailable routes -type GetRoutes200Response struct { - // A collection of route objects - Routes []GetRoutes200ResponseRoutesInner `json:"routes"` -} - -// NewGetRoutes200Response instantiates a new GetRoutes200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200Response(routes []GetRoutes200ResponseRoutesInner) *GetRoutes200Response { - this := GetRoutes200Response{} - this.Routes = routes - return &this -} - -// NewGetRoutes200ResponseWithDefaults instantiates a new GetRoutes200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseWithDefaults() *GetRoutes200Response { - this := GetRoutes200Response{} - return &this -} - -// GetRoutes returns the Routes field value -func (o *GetRoutes200Response) GetRoutes() []GetRoutes200ResponseRoutesInner { - if o == nil { - var ret []GetRoutes200ResponseRoutesInner - return ret - } - - return o.Routes -} - -// GetRoutesOk returns a tuple with the Routes field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200Response) GetRoutesOk() ([]GetRoutes200ResponseRoutesInner, bool) { - if o == nil { - return nil, false - } - return o.Routes, true -} - -// SetRoutes sets field value -func (o *GetRoutes200Response) SetRoutes(v []GetRoutes200ResponseRoutesInner) { - o.Routes = v -} - -func (o GetRoutes200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["routes"] = o.Routes - return toSerialize, nil -} - -type NullableGetRoutes200Response struct { - value *GetRoutes200Response - isSet bool -} - -func (v NullableGetRoutes200Response) Get() *GetRoutes200Response { - return v.value -} - -func (v *NullableGetRoutes200Response) Set(val *GetRoutes200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200Response(val *GetRoutes200Response) *NullableGetRoutes200Response { - return &NullableGetRoutes200Response{value: val, isSet: true} -} - -func (v NullableGetRoutes200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner.go deleted file mode 100644 index affc059c9e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner.go +++ /dev/null @@ -1,689 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInner{} - -// GetRoutes200ResponseRoutesInner struct for GetRoutes200ResponseRoutesInner -type GetRoutes200ResponseRoutesInner struct { - // A unique identifier of the route. - Id string `json:"id"` - // A unique identifier for the gateway. - GatewayID string `json:"gatewayID"` - // The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. - Mode string `json:"mode"` - // The ID of the DLT Network where the operation will originate. - FromDLTNetworkID *string `json:"fromDLTNetworkID,omitempty"` - // The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. - FromAmountUSD *float64 `json:"fromAmountUSD,omitempty"` - // The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - FromAmount *string `json:"fromAmount,omitempty"` - FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` - // The ID of the DLT Network where the operation will end. - ToDLTNetworkID *string `json:"toDLTNetworkID,omitempty"` - // The expected amount to be received in USD. - ToAmountUSD *string `json:"toAmountUSD,omitempty"` - // The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - ToAmount *string `json:"toAmount,omitempty"` - // The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - ToAmountMin *string `json:"toAmountMin,omitempty"` - ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` - // The expected gas cost in USD. - GasCostUSD *string `json:"gasCostUSD,omitempty"` - // Whether chain switching is enabled or not. - ContainsSwitchChain *bool `json:"containsSwitchChain,omitempty"` - // List of steps involved in this route, adjusted for mode. - Steps []GetRoutes200ResponseRoutesInnerStepsInner `json:"steps,omitempty"` - Insurance *GetRoutes200ResponseRoutesInnerInsurance `json:"insurance,omitempty"` - // List of tags identifiers providing additional context or categorization. - Tags []string `json:"tags,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInner instantiates a new GetRoutes200ResponseRoutesInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInner(id string, gatewayID string, mode string) *GetRoutes200ResponseRoutesInner { - this := GetRoutes200ResponseRoutesInner{} - this.Id = id - this.GatewayID = gatewayID - this.Mode = mode - return &this -} - -// NewGetRoutes200ResponseRoutesInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerWithDefaults() *GetRoutes200ResponseRoutesInner { - this := GetRoutes200ResponseRoutesInner{} - return &this -} - -// GetId returns the Id field value -func (o *GetRoutes200ResponseRoutesInner) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *GetRoutes200ResponseRoutesInner) SetId(v string) { - o.Id = v -} - -// GetGatewayID returns the GatewayID field value -func (o *GetRoutes200ResponseRoutesInner) GetGatewayID() string { - if o == nil { - var ret string - return ret - } - - return o.GatewayID -} - -// GetGatewayIDOk returns a tuple with the GatewayID field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetGatewayIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GatewayID, true -} - -// SetGatewayID sets field value -func (o *GetRoutes200ResponseRoutesInner) SetGatewayID(v string) { - o.GatewayID = v -} - -// GetMode returns the Mode field value -func (o *GetRoutes200ResponseRoutesInner) GetMode() string { - if o == nil { - var ret string - return ret - } - - return o.Mode -} - -// GetModeOk returns a tuple with the Mode field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetModeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mode, true -} - -// SetMode sets field value -func (o *GetRoutes200ResponseRoutesInner) SetMode(v string) { - o.Mode = v -} - -// GetFromDLTNetworkID returns the FromDLTNetworkID field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkID() string { - if o == nil || IsNil(o.FromDLTNetworkID) { - var ret string - return ret - } - return *o.FromDLTNetworkID -} - -// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetFromDLTNetworkIDOk() (*string, bool) { - if o == nil || IsNil(o.FromDLTNetworkID) { - return nil, false - } - return o.FromDLTNetworkID, true -} - -// HasFromDLTNetworkID returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasFromDLTNetworkID() bool { - if o != nil && !IsNil(o.FromDLTNetworkID) { - return true - } - - return false -} - -// SetFromDLTNetworkID gets a reference to the given string and assigns it to the FromDLTNetworkID field. -func (o *GetRoutes200ResponseRoutesInner) SetFromDLTNetworkID(v string) { - o.FromDLTNetworkID = &v -} - -// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSD() float64 { - if o == nil || IsNil(o.FromAmountUSD) { - var ret float64 - return ret - } - return *o.FromAmountUSD -} - -// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetFromAmountUSDOk() (*float64, bool) { - if o == nil || IsNil(o.FromAmountUSD) { - return nil, false - } - return o.FromAmountUSD, true -} - -// HasFromAmountUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasFromAmountUSD() bool { - if o != nil && !IsNil(o.FromAmountUSD) { - return true - } - - return false -} - -// SetFromAmountUSD gets a reference to the given float64 and assigns it to the FromAmountUSD field. -func (o *GetRoutes200ResponseRoutesInner) SetFromAmountUSD(v float64) { - o.FromAmountUSD = &v -} - -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { - var ret string - return ret - } - return *o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { - return nil, false - } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false -} - -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. -func (o *GetRoutes200ResponseRoutesInner) SetFromAmount(v string) { - o.FromAmount = &v -} - -// GetFromToken returns the FromToken field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.FromToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.FromToken -} - -// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.FromToken) { - return nil, false - } - return o.FromToken, true -} - -// HasFromToken returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasFromToken() bool { - if o != nil && !IsNil(o.FromToken) { - return true - } - - return false -} - -// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. -func (o *GetRoutes200ResponseRoutesInner) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.FromToken = &v -} - -// GetToDLTNetworkID returns the ToDLTNetworkID field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkID() string { - if o == nil || IsNil(o.ToDLTNetworkID) { - var ret string - return ret - } - return *o.ToDLTNetworkID -} - -// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetToDLTNetworkIDOk() (*string, bool) { - if o == nil || IsNil(o.ToDLTNetworkID) { - return nil, false - } - return o.ToDLTNetworkID, true -} - -// HasToDLTNetworkID returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasToDLTNetworkID() bool { - if o != nil && !IsNil(o.ToDLTNetworkID) { - return true - } - - return false -} - -// SetToDLTNetworkID gets a reference to the given string and assigns it to the ToDLTNetworkID field. -func (o *GetRoutes200ResponseRoutesInner) SetToDLTNetworkID(v string) { - o.ToDLTNetworkID = &v -} - -// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSD() string { - if o == nil || IsNil(o.ToAmountUSD) { - var ret string - return ret - } - return *o.ToAmountUSD -} - -// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetToAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountUSD) { - return nil, false - } - return o.ToAmountUSD, true -} - -// HasToAmountUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasToAmountUSD() bool { - if o != nil && !IsNil(o.ToAmountUSD) { - return true - } - - return false -} - -// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. -func (o *GetRoutes200ResponseRoutesInner) SetToAmountUSD(v string) { - o.ToAmountUSD = &v -} - -// GetToAmount returns the ToAmount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetToAmount() string { - if o == nil || IsNil(o.ToAmount) { - var ret string - return ret - } - return *o.ToAmount -} - -// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetToAmountOk() (*string, bool) { - if o == nil || IsNil(o.ToAmount) { - return nil, false - } - return o.ToAmount, true -} - -// HasToAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasToAmount() bool { - if o != nil && !IsNil(o.ToAmount) { - return true - } - - return false -} - -// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. -func (o *GetRoutes200ResponseRoutesInner) SetToAmount(v string) { - o.ToAmount = &v -} - -// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetToAmountMin() string { - if o == nil || IsNil(o.ToAmountMin) { - var ret string - return ret - } - return *o.ToAmountMin -} - -// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetToAmountMinOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountMin) { - return nil, false - } - return o.ToAmountMin, true -} - -// HasToAmountMin returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasToAmountMin() bool { - if o != nil && !IsNil(o.ToAmountMin) { - return true - } - - return false -} - -// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. -func (o *GetRoutes200ResponseRoutesInner) SetToAmountMin(v string) { - o.ToAmountMin = &v -} - -// GetToToken returns the ToToken field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.ToToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.ToToken -} - -// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.ToToken) { - return nil, false - } - return o.ToToken, true -} - -// HasToToken returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasToToken() bool { - if o != nil && !IsNil(o.ToToken) { - return true - } - - return false -} - -// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. -func (o *GetRoutes200ResponseRoutesInner) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.ToToken = &v -} - -// GetGasCostUSD returns the GasCostUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSD() string { - if o == nil || IsNil(o.GasCostUSD) { - var ret string - return ret - } - return *o.GasCostUSD -} - -// GetGasCostUSDOk returns a tuple with the GasCostUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetGasCostUSDOk() (*string, bool) { - if o == nil || IsNil(o.GasCostUSD) { - return nil, false - } - return o.GasCostUSD, true -} - -// HasGasCostUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasGasCostUSD() bool { - if o != nil && !IsNil(o.GasCostUSD) { - return true - } - - return false -} - -// SetGasCostUSD gets a reference to the given string and assigns it to the GasCostUSD field. -func (o *GetRoutes200ResponseRoutesInner) SetGasCostUSD(v string) { - o.GasCostUSD = &v -} - -// GetContainsSwitchChain returns the ContainsSwitchChain field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChain() bool { - if o == nil || IsNil(o.ContainsSwitchChain) { - var ret bool - return ret - } - return *o.ContainsSwitchChain -} - -// GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetContainsSwitchChainOk() (*bool, bool) { - if o == nil || IsNil(o.ContainsSwitchChain) { - return nil, false - } - return o.ContainsSwitchChain, true -} - -// HasContainsSwitchChain returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasContainsSwitchChain() bool { - if o != nil && !IsNil(o.ContainsSwitchChain) { - return true - } - - return false -} - -// SetContainsSwitchChain gets a reference to the given bool and assigns it to the ContainsSwitchChain field. -func (o *GetRoutes200ResponseRoutesInner) SetContainsSwitchChain(v bool) { - o.ContainsSwitchChain = &v -} - -// GetSteps returns the Steps field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner { - if o == nil || IsNil(o.Steps) { - var ret []GetRoutes200ResponseRoutesInnerStepsInner - return ret - } - return o.Steps -} - -// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetStepsOk() ([]GetRoutes200ResponseRoutesInnerStepsInner, bool) { - if o == nil || IsNil(o.Steps) { - return nil, false - } - return o.Steps, true -} - -// HasSteps returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasSteps() bool { - if o != nil && !IsNil(o.Steps) { - return true - } - - return false -} - -// SetSteps gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInner and assigns it to the Steps field. -func (o *GetRoutes200ResponseRoutesInner) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner) { - o.Steps = v -} - -// GetInsurance returns the Insurance field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance { - if o == nil || IsNil(o.Insurance) { - var ret GetRoutes200ResponseRoutesInnerInsurance - return ret - } - return *o.Insurance -} - -// GetInsuranceOk returns a tuple with the Insurance field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool) { - if o == nil || IsNil(o.Insurance) { - return nil, false - } - return o.Insurance, true -} - -// HasInsurance returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasInsurance() bool { - if o != nil && !IsNil(o.Insurance) { - return true - } - - return false -} - -// SetInsurance gets a reference to the given GetRoutes200ResponseRoutesInnerInsurance and assigns it to the Insurance field. -func (o *GetRoutes200ResponseRoutesInner) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance) { - o.Insurance = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInner) GetTags() []string { - if o == nil || IsNil(o.Tags) { - var ret []string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInner) GetTagsOk() ([]string, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInner) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given []string and assigns it to the Tags field. -func (o *GetRoutes200ResponseRoutesInner) SetTags(v []string) { - o.Tags = v -} - -func (o GetRoutes200ResponseRoutesInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["gatewayID"] = o.GatewayID - toSerialize["mode"] = o.Mode - if !IsNil(o.FromDLTNetworkID) { - toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID - } - if !IsNil(o.FromAmountUSD) { - toSerialize["fromAmountUSD"] = o.FromAmountUSD - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.FromToken) { - toSerialize["fromToken"] = o.FromToken - } - if !IsNil(o.ToDLTNetworkID) { - toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID - } - if !IsNil(o.ToAmountUSD) { - toSerialize["toAmountUSD"] = o.ToAmountUSD - } - if !IsNil(o.ToAmount) { - toSerialize["toAmount"] = o.ToAmount - } - if !IsNil(o.ToAmountMin) { - toSerialize["toAmountMin"] = o.ToAmountMin - } - if !IsNil(o.ToToken) { - toSerialize["toToken"] = o.ToToken - } - if !IsNil(o.GasCostUSD) { - toSerialize["gasCostUSD"] = o.GasCostUSD - } - if !IsNil(o.ContainsSwitchChain) { - toSerialize["containsSwitchChain"] = o.ContainsSwitchChain - } - if !IsNil(o.Steps) { - toSerialize["steps"] = o.Steps - } - if !IsNil(o.Insurance) { - toSerialize["insurance"] = o.Insurance - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInner struct { - value *GetRoutes200ResponseRoutesInner - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInner) Get() *GetRoutes200ResponseRoutesInner { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInner) Set(val *GetRoutes200ResponseRoutesInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInner(val *GetRoutes200ResponseRoutesInner) *NullableGetRoutes200ResponseRoutesInner { - return &NullableGetRoutes200ResponseRoutesInner{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token.go deleted file mode 100644 index 6537a62963..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token.go +++ /dev/null @@ -1,414 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerFromToken type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerFromToken{} - -// GetRoutes200ResponseRoutesInnerFromToken Metadata detailing a supported token -type GetRoutes200ResponseRoutesInnerFromToken struct { - // The network of the DLT being interacted with. TODO: implement network identification draft - ChainID string `json:"chainID"` - // Supported DLT protocols. - ChainType string `json:"chainType"` - // A blockchain address. - Address string `json:"address"` - // The name of the token. - Name *string `json:"name,omitempty"` - // The symbol of the token. - Symbol string `json:"symbol"` - // How many decimals the token supports. - Decimals int32 `json:"decimals"` - // The logo of a token, chain, dex etc. - LogoURI *string `json:"logoURI,omitempty"` - // List of tags identifiers providing additional context or categorization. - Tags []string `json:"tags,omitempty"` - // The current price of the token in USD. - PriceUSD *string `json:"priceUSD,omitempty"` - Extensions *GetRoutes200ResponseRoutesInnerFromTokenExtensions `json:"extensions,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerFromToken instantiates a new GetRoutes200ResponseRoutesInnerFromToken object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerFromToken(chainID string, chainType string, address string, symbol string, decimals int32) *GetRoutes200ResponseRoutesInnerFromToken { - this := GetRoutes200ResponseRoutesInnerFromToken{} - this.ChainID = chainID - this.ChainType = chainType - this.Address = address - this.Symbol = symbol - this.Decimals = decimals - return &this -} - -// NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromToken object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerFromTokenWithDefaults() *GetRoutes200ResponseRoutesInnerFromToken { - this := GetRoutes200ResponseRoutesInnerFromToken{} - return &this -} - -// GetChainID returns the ChainID field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainID() string { - if o == nil { - var ret string - return ret - } - - return o.ChainID -} - -// GetChainIDOk returns a tuple with the ChainID field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainID, true -} - -// SetChainID sets field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainID(v string) { - o.ChainID = v -} - -// GetChainType returns the ChainType field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetChainType(v string) { - o.ChainType = v -} - -// GetAddress returns the Address field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetAddress(v string) { - o.Address = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetName(v string) { - o.Name = &v -} - -// GetSymbol returns the Symbol field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbol() string { - if o == nil { - var ret string - return ret - } - - return o.Symbol -} - -// GetSymbolOk returns a tuple with the Symbol field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetSymbolOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Symbol, true -} - -// SetSymbol sets field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetSymbol(v string) { - o.Symbol = v -} - -// GetDecimals returns the Decimals field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimals() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Decimals -} - -// GetDecimalsOk returns a tuple with the Decimals field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetDecimalsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Decimals, true -} - -// SetDecimals sets field value -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetDecimals(v int32) { - o.Decimals = v -} - -// GetLogoURI returns the LogoURI field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURI() string { - if o == nil || IsNil(o.LogoURI) { - var ret string - return ret - } - return *o.LogoURI -} - -// GetLogoURIOk returns a tuple with the LogoURI field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetLogoURIOk() (*string, bool) { - if o == nil || IsNil(o.LogoURI) { - return nil, false - } - return o.LogoURI, true -} - -// HasLogoURI returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) HasLogoURI() bool { - if o != nil && !IsNil(o.LogoURI) { - return true - } - - return false -} - -// SetLogoURI gets a reference to the given string and assigns it to the LogoURI field. -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetLogoURI(v string) { - o.LogoURI = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTags() []string { - if o == nil || IsNil(o.Tags) { - var ret []string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetTagsOk() ([]string, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given []string and assigns it to the Tags field. -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetTags(v []string) { - o.Tags = v -} - -// GetPriceUSD returns the PriceUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSD() string { - if o == nil || IsNil(o.PriceUSD) { - var ret string - return ret - } - return *o.PriceUSD -} - -// GetPriceUSDOk returns a tuple with the PriceUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetPriceUSDOk() (*string, bool) { - if o == nil || IsNil(o.PriceUSD) { - return nil, false - } - return o.PriceUSD, true -} - -// HasPriceUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) HasPriceUSD() bool { - if o != nil && !IsNil(o.PriceUSD) { - return true - } - - return false -} - -// SetPriceUSD gets a reference to the given string and assigns it to the PriceUSD field. -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetPriceUSD(v string) { - o.PriceUSD = &v -} - -// GetExtensions returns the Extensions field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions { - if o == nil || IsNil(o.Extensions) { - var ret GetRoutes200ResponseRoutesInnerFromTokenExtensions - return ret - } - return *o.Extensions -} - -// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool) { - if o == nil || IsNil(o.Extensions) { - return nil, false - } - return o.Extensions, true -} - -// HasExtensions returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromToken) HasExtensions() bool { - if o != nil && !IsNil(o.Extensions) { - return true - } - - return false -} - -// SetExtensions gets a reference to the given GetRoutes200ResponseRoutesInnerFromTokenExtensions and assigns it to the Extensions field. -func (o *GetRoutes200ResponseRoutesInnerFromToken) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions) { - o.Extensions = &v -} - -func (o GetRoutes200ResponseRoutesInnerFromToken) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerFromToken) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainID"] = o.ChainID - toSerialize["chainType"] = o.ChainType - toSerialize["address"] = o.Address - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - toSerialize["symbol"] = o.Symbol - toSerialize["decimals"] = o.Decimals - if !IsNil(o.LogoURI) { - toSerialize["logoURI"] = o.LogoURI - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - if !IsNil(o.PriceUSD) { - toSerialize["priceUSD"] = o.PriceUSD - } - if !IsNil(o.Extensions) { - toSerialize["extensions"] = o.Extensions - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerFromToken struct { - value *GetRoutes200ResponseRoutesInnerFromToken - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromToken) Get() *GetRoutes200ResponseRoutesInnerFromToken { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromToken) Set(val *GetRoutes200ResponseRoutesInnerFromToken) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromToken) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromToken) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerFromToken(val *GetRoutes200ResponseRoutesInnerFromToken) *NullableGetRoutes200ResponseRoutesInnerFromToken { - return &NullableGetRoutes200ResponseRoutesInnerFromToken{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromToken) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromToken) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions.go deleted file mode 100644 index a0099c3234..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerFromTokenExtensions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerFromTokenExtensions{} - -// GetRoutes200ResponseRoutesInnerFromTokenExtensions struct for GetRoutes200ResponseRoutesInnerFromTokenExtensions -type GetRoutes200ResponseRoutesInnerFromTokenExtensions struct { - BridgeInfo *map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue `json:"bridgeInfo,omitempty"` - // Indicates whether the token is verified. - Verified *bool `json:"verified,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerFromTokenExtensions instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerFromTokenExtensions() *GetRoutes200ResponseRoutesInnerFromTokenExtensions { - this := GetRoutes200ResponseRoutesInnerFromTokenExtensions{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensions { - this := GetRoutes200ResponseRoutesInnerFromTokenExtensions{} - return &this -} - -// GetBridgeInfo returns the BridgeInfo field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfo() map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - if o == nil || IsNil(o.BridgeInfo) { - var ret map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - return ret - } - return *o.BridgeInfo -} - -// GetBridgeInfoOk returns a tuple with the BridgeInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetBridgeInfoOk() (*map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue, bool) { - if o == nil || IsNil(o.BridgeInfo) { - return nil, false - } - return o.BridgeInfo, true -} - -// HasBridgeInfo returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasBridgeInfo() bool { - if o != nil && !IsNil(o.BridgeInfo) { - return true - } - - return false -} - -// SetBridgeInfo gets a reference to the given map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue and assigns it to the BridgeInfo field. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetBridgeInfo(v map[string]GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) { - o.BridgeInfo = &v -} - -// GetVerified returns the Verified field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerified() bool { - if o == nil || IsNil(o.Verified) { - var ret bool - return ret - } - return *o.Verified -} - -// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) GetVerifiedOk() (*bool, bool) { - if o == nil || IsNil(o.Verified) { - return nil, false - } - return o.Verified, true -} - -// HasVerified returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) HasVerified() bool { - if o != nil && !IsNil(o.Verified) { - return true - } - - return false -} - -// SetVerified gets a reference to the given bool and assigns it to the Verified field. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensions) SetVerified(v bool) { - o.Verified = &v -} - -func (o GetRoutes200ResponseRoutesInnerFromTokenExtensions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerFromTokenExtensions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BridgeInfo) { - toSerialize["bridgeInfo"] = o.BridgeInfo - } - if !IsNil(o.Verified) { - toSerialize["verified"] = o.Verified - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions struct { - value *GetRoutes200ResponseRoutesInnerFromTokenExtensions - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) Get() *GetRoutes200ResponseRoutesInnerFromTokenExtensions { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) Set(val *GetRoutes200ResponseRoutesInnerFromTokenExtensions) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerFromTokenExtensions(val *GetRoutes200ResponseRoutesInnerFromTokenExtensions) *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions { - return &NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go deleted file mode 100644 index d6337f0003..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_from_token_extensions_bridge_info_value.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{} - -// GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue Information about the bridge used for the token transfer. -type GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue struct { - // The address of the token being transferred. - TokenAddress *string `json:"tokenAddress,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - this := GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValueWithDefaults() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - this := GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{} - return &this -} - -// GetTokenAddress returns the TokenAddress field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddress() string { - if o == nil || IsNil(o.TokenAddress) { - var ret string - return ret - } - return *o.TokenAddress -} - -// GetTokenAddressOk returns a tuple with the TokenAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) GetTokenAddressOk() (*string, bool) { - if o == nil || IsNil(o.TokenAddress) { - return nil, false - } - return o.TokenAddress, true -} - -// HasTokenAddress returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) HasTokenAddress() bool { - if o != nil && !IsNil(o.TokenAddress) { - return true - } - - return false -} - -// SetTokenAddress gets a reference to the given string and assigns it to the TokenAddress field. -func (o *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) SetTokenAddress(v string) { - o.TokenAddress = &v -} - -func (o GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.TokenAddress) { - toSerialize["tokenAddress"] = o.TokenAddress - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue struct { - value *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) Get() *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) Set(val *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue(val *GetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue { - return &NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerFromTokenExtensionsBridgeInfoValue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_insurance.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_insurance.go deleted file mode 100644 index 76404d4938..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_insurance.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerInsurance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerInsurance{} - -// GetRoutes200ResponseRoutesInnerInsurance struct for GetRoutes200ResponseRoutesInnerInsurance -type GetRoutes200ResponseRoutesInnerInsurance struct { - // The state of insurance applicability for the transaction. - State *string `json:"state,omitempty"` - // The fee amount for insurance, represented in USD. - FeeAmountUsd *string `json:"feeAmountUsd,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerInsurance instantiates a new GetRoutes200ResponseRoutesInnerInsurance object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerInsurance() *GetRoutes200ResponseRoutesInnerInsurance { - this := GetRoutes200ResponseRoutesInnerInsurance{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerInsurance object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerInsuranceWithDefaults() *GetRoutes200ResponseRoutesInnerInsurance { - this := GetRoutes200ResponseRoutesInnerInsurance{} - return &this -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerInsurance) GetState() string { - if o == nil || IsNil(o.State) { - var ret string - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerInsurance) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerInsurance) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given string and assigns it to the State field. -func (o *GetRoutes200ResponseRoutesInnerInsurance) SetState(v string) { - o.State = &v -} - -// GetFeeAmountUsd returns the FeeAmountUsd field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsd() string { - if o == nil || IsNil(o.FeeAmountUsd) { - var ret string - return ret - } - return *o.FeeAmountUsd -} - -// GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerInsurance) GetFeeAmountUsdOk() (*string, bool) { - if o == nil || IsNil(o.FeeAmountUsd) { - return nil, false - } - return o.FeeAmountUsd, true -} - -// HasFeeAmountUsd returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerInsurance) HasFeeAmountUsd() bool { - if o != nil && !IsNil(o.FeeAmountUsd) { - return true - } - - return false -} - -// SetFeeAmountUsd gets a reference to the given string and assigns it to the FeeAmountUsd field. -func (o *GetRoutes200ResponseRoutesInnerInsurance) SetFeeAmountUsd(v string) { - o.FeeAmountUsd = &v -} - -func (o GetRoutes200ResponseRoutesInnerInsurance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerInsurance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.FeeAmountUsd) { - toSerialize["feeAmountUsd"] = o.FeeAmountUsd - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerInsurance struct { - value *GetRoutes200ResponseRoutesInnerInsurance - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerInsurance) Get() *GetRoutes200ResponseRoutesInnerInsurance { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerInsurance) Set(val *GetRoutes200ResponseRoutesInnerInsurance) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerInsurance) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerInsurance) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerInsurance(val *GetRoutes200ResponseRoutesInnerInsurance) *NullableGetRoutes200ResponseRoutesInnerInsurance { - return &NullableGetRoutes200ResponseRoutesInnerInsurance{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerInsurance) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerInsurance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner.go deleted file mode 100644 index 21523c9b17..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner.go +++ /dev/null @@ -1,382 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerStepsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInner{} - -// GetRoutes200ResponseRoutesInnerStepsInner Details a single step within a route including actions and estimates. -type GetRoutes200ResponseRoutesInnerStepsInner struct { - // Id of the step - Id *string `json:"id,omitempty"` - // Type of the step, typically describing the action, e.g., 'swap'. - Type *string `json:"type,omitempty"` - // Tool used in the step, e.g., 'stargate'. - Tool *string `json:"tool,omitempty"` - Action *GetRoutes200ResponseRoutesInnerStepsInnerAction `json:"action,omitempty"` - Estimate *GetRoutes200ResponseRoutesInnerStepsInnerEstimate `json:"estimate,omitempty"` - ToolDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"toolDetails,omitempty"` - IntegrationDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"integrationDetails,omitempty"` - // IDs of further steps included within this step, allowing for nested actions without direct recursion. - IncludedStepIds []string `json:"includedStepIds,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerStepsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerStepsInner() *GetRoutes200ResponseRoutesInnerStepsInner { - this := GetRoutes200ResponseRoutesInnerStepsInner{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerStepsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInner { - this := GetRoutes200ResponseRoutesInnerStepsInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetId(v string) { - o.Id = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetType(v string) { - o.Type = &v -} - -// GetTool returns the Tool field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetTool() string { - if o == nil || IsNil(o.Tool) { - var ret string - return ret - } - return *o.Tool -} - -// GetToolOk returns a tuple with the Tool field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolOk() (*string, bool) { - if o == nil || IsNil(o.Tool) { - return nil, false - } - return o.Tool, true -} - -// HasTool returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasTool() bool { - if o != nil && !IsNil(o.Tool) { - return true - } - - return false -} - -// SetTool gets a reference to the given string and assigns it to the Tool field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetTool(v string) { - o.Tool = &v -} - -// GetAction returns the Action field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction { - if o == nil || IsNil(o.Action) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerAction - return ret - } - return *o.Action -} - -// GetActionOk returns a tuple with the Action field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool) { - if o == nil || IsNil(o.Action) { - return nil, false - } - return o.Action, true -} - -// HasAction returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasAction() bool { - if o != nil && !IsNil(o.Action) { - return true - } - - return false -} - -// SetAction gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerAction and assigns it to the Action field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction) { - o.Action = &v -} - -// GetEstimate returns the Estimate field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - if o == nil || IsNil(o.Estimate) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerEstimate - return ret - } - return *o.Estimate -} - -// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool) { - if o == nil || IsNil(o.Estimate) { - return nil, false - } - return o.Estimate, true -} - -// HasEstimate returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasEstimate() bool { - if o != nil && !IsNil(o.Estimate) { - return true - } - - return false -} - -// SetEstimate gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerEstimate and assigns it to the Estimate field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate) { - o.Estimate = &v -} - -// GetToolDetails returns the ToolDetails field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - if o == nil || IsNil(o.ToolDetails) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - return ret - } - return *o.ToolDetails -} - -// GetToolDetailsOk returns a tuple with the ToolDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { - if o == nil || IsNil(o.ToolDetails) { - return nil, false - } - return o.ToolDetails, true -} - -// HasToolDetails returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasToolDetails() bool { - if o != nil && !IsNil(o.ToolDetails) { - return true - } - - return false -} - -// SetToolDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the ToolDetails field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { - o.ToolDetails = &v -} - -// GetIntegrationDetails returns the IntegrationDetails field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - if o == nil || IsNil(o.IntegrationDetails) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - return ret - } - return *o.IntegrationDetails -} - -// GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { - if o == nil || IsNil(o.IntegrationDetails) { - return nil, false - } - return o.IntegrationDetails, true -} - -// HasIntegrationDetails returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIntegrationDetails() bool { - if o != nil && !IsNil(o.IntegrationDetails) { - return true - } - - return false -} - -// SetIntegrationDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the IntegrationDetails field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { - o.IntegrationDetails = &v -} - -// GetIncludedStepIds returns the IncludedStepIds field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIds() []string { - if o == nil || IsNil(o.IncludedStepIds) { - var ret []string - return ret - } - return o.IncludedStepIds -} - -// GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) GetIncludedStepIdsOk() ([]string, bool) { - if o == nil || IsNil(o.IncludedStepIds) { - return nil, false - } - return o.IncludedStepIds, true -} - -// HasIncludedStepIds returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) HasIncludedStepIds() bool { - if o != nil && !IsNil(o.IncludedStepIds) { - return true - } - - return false -} - -// SetIncludedStepIds gets a reference to the given []string and assigns it to the IncludedStepIds field. -func (o *GetRoutes200ResponseRoutesInnerStepsInner) SetIncludedStepIds(v []string) { - o.IncludedStepIds = v -} - -func (o GetRoutes200ResponseRoutesInnerStepsInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerStepsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Tool) { - toSerialize["tool"] = o.Tool - } - if !IsNil(o.Action) { - toSerialize["action"] = o.Action - } - if !IsNil(o.Estimate) { - toSerialize["estimate"] = o.Estimate - } - if !IsNil(o.ToolDetails) { - toSerialize["toolDetails"] = o.ToolDetails - } - if !IsNil(o.IntegrationDetails) { - toSerialize["integrationDetails"] = o.IntegrationDetails - } - if !IsNil(o.IncludedStepIds) { - toSerialize["includedStepIds"] = o.IncludedStepIds - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerStepsInner struct { - value *GetRoutes200ResponseRoutesInnerStepsInner - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInner) Get() *GetRoutes200ResponseRoutesInnerStepsInner { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInner) Set(val *GetRoutes200ResponseRoutesInnerStepsInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerStepsInner(val *GetRoutes200ResponseRoutesInnerStepsInner) *NullableGetRoutes200ResponseRoutesInnerStepsInner { - return &NullableGetRoutes200ResponseRoutesInnerStepsInner{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_action.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_action.go deleted file mode 100644 index f1148a04fd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_action.go +++ /dev/null @@ -1,310 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerStepsInnerAction type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerAction{} - -// GetRoutes200ResponseRoutesInnerStepsInnerAction struct for GetRoutes200ResponseRoutesInnerStepsInnerAction -type GetRoutes200ResponseRoutesInnerStepsInnerAction struct { - FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` - // The amount of 'fromToken' to be transferred, specified as a string to maintain precision. - FromAmount *string `json:"fromAmount,omitempty"` - ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` - // The maximum acceptable difference between the expected price of the 'toToken' and the price at the time of the transfer. - Slippage *float32 `json:"slippage,omitempty"` - // A blockchain address. - FromAddress *string `json:"fromAddress,omitempty"` - // A blockchain address. - ToAddress *string `json:"toAddress,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerAction instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerStepsInnerAction() *GetRoutes200ResponseRoutesInnerStepsInnerAction { - this := GetRoutes200ResponseRoutesInnerStepsInnerAction{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerAction object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerStepsInnerActionWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerAction { - this := GetRoutes200ResponseRoutesInnerStepsInnerAction{} - return &this -} - -// GetFromToken returns the FromToken field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.FromToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.FromToken -} - -// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.FromToken) { - return nil, false - } - return o.FromToken, true -} - -// HasFromToken returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromToken() bool { - if o != nil && !IsNil(o.FromToken) { - return true - } - - return false -} - -// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.FromToken = &v -} - -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { - var ret string - return ret - } - return *o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { - return nil, false - } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false -} - -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAmount(v string) { - o.FromAmount = &v -} - -// GetToToken returns the ToToken field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.ToToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.ToToken -} - -// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.ToToken) { - return nil, false - } - return o.ToToken, true -} - -// HasToToken returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToToken() bool { - if o != nil && !IsNil(o.ToToken) { - return true - } - - return false -} - -// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.ToToken = &v -} - -// GetSlippage returns the Slippage field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippage() float32 { - if o == nil || IsNil(o.Slippage) { - var ret float32 - return ret - } - return *o.Slippage -} - -// GetSlippageOk returns a tuple with the Slippage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetSlippageOk() (*float32, bool) { - if o == nil || IsNil(o.Slippage) { - return nil, false - } - return o.Slippage, true -} - -// HasSlippage returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasSlippage() bool { - if o != nil && !IsNil(o.Slippage) { - return true - } - - return false -} - -// SetSlippage gets a reference to the given float32 and assigns it to the Slippage field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetSlippage(v float32) { - o.Slippage = &v -} - -// GetFromAddress returns the FromAddress field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddress() string { - if o == nil || IsNil(o.FromAddress) { - var ret string - return ret - } - return *o.FromAddress -} - -// GetFromAddressOk returns a tuple with the FromAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetFromAddressOk() (*string, bool) { - if o == nil || IsNil(o.FromAddress) { - return nil, false - } - return o.FromAddress, true -} - -// HasFromAddress returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasFromAddress() bool { - if o != nil && !IsNil(o.FromAddress) { - return true - } - - return false -} - -// SetFromAddress gets a reference to the given string and assigns it to the FromAddress field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetFromAddress(v string) { - o.FromAddress = &v -} - -// GetToAddress returns the ToAddress field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddress() string { - if o == nil || IsNil(o.ToAddress) { - var ret string - return ret - } - return *o.ToAddress -} - -// GetToAddressOk returns a tuple with the ToAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) GetToAddressOk() (*string, bool) { - if o == nil || IsNil(o.ToAddress) { - return nil, false - } - return o.ToAddress, true -} - -// HasToAddress returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) HasToAddress() bool { - if o != nil && !IsNil(o.ToAddress) { - return true - } - - return false -} - -// SetToAddress gets a reference to the given string and assigns it to the ToAddress field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerAction) SetToAddress(v string) { - o.ToAddress = &v -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerAction) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerAction) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.FromToken) { - toSerialize["fromToken"] = o.FromToken - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.ToToken) { - toSerialize["toToken"] = o.ToToken - } - if !IsNil(o.Slippage) { - toSerialize["slippage"] = o.Slippage - } - if !IsNil(o.FromAddress) { - toSerialize["fromAddress"] = o.FromAddress - } - if !IsNil(o.ToAddress) { - toSerialize["toAddress"] = o.ToAddress - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerStepsInnerAction struct { - value *GetRoutes200ResponseRoutesInnerStepsInnerAction - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) Get() *GetRoutes200ResponseRoutesInnerStepsInnerAction { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerAction) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerAction(val *GetRoutes200ResponseRoutesInnerStepsInnerAction) *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction { - return &NullableGetRoutes200ResponseRoutesInnerStepsInnerAction{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate.go deleted file mode 100644 index 62d15bf400..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate.go +++ /dev/null @@ -1,460 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerStepsInnerEstimate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerEstimate{} - -// GetRoutes200ResponseRoutesInnerStepsInnerEstimate Provides an estimation for a transaction, including costs, amounts, and execution duration. -type GetRoutes200ResponseRoutesInnerStepsInnerEstimate struct { - // A blockchain address. - ApprovalAddress *string `json:"approvalAddress,omitempty"` - // The amount in string format including all decimals. - ToAmountMin *string `json:"toAmountMin,omitempty"` - // The amount in string format including all decimals. - ToAmount *string `json:"toAmount,omitempty"` - // The amount in string format including all decimals. - FromAmount *string `json:"fromAmount,omitempty"` - // A collection of fee costs associated with the transaction. - FeeCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner `json:"feeCosts,omitempty"` - // A collection of estimated gas costs for executing the transaction. - GasCosts []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner `json:"gasCosts,omitempty"` - // The estimated duration for the transaction execution in seconds. - ExecutionDuration *int32 `json:"executionDuration,omitempty"` - // The amount in string format including all decimals. - FromAmountUSD *string `json:"fromAmountUSD,omitempty"` - // The amount in string format including all decimals. - ToAmountUSD *string `json:"toAmountUSD,omitempty"` - // The tool or service used to generate this estimate. - Tool *string `json:"tool,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimate() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - this := GetRoutes200ResponseRoutesInnerStepsInnerEstimate{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - this := GetRoutes200ResponseRoutesInnerStepsInnerEstimate{} - return &this -} - -// GetApprovalAddress returns the ApprovalAddress field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddress() string { - if o == nil || IsNil(o.ApprovalAddress) { - var ret string - return ret - } - return *o.ApprovalAddress -} - -// GetApprovalAddressOk returns a tuple with the ApprovalAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetApprovalAddressOk() (*string, bool) { - if o == nil || IsNil(o.ApprovalAddress) { - return nil, false - } - return o.ApprovalAddress, true -} - -// HasApprovalAddress returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasApprovalAddress() bool { - if o != nil && !IsNil(o.ApprovalAddress) { - return true - } - - return false -} - -// SetApprovalAddress gets a reference to the given string and assigns it to the ApprovalAddress field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetApprovalAddress(v string) { - o.ApprovalAddress = &v -} - -// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMin() string { - if o == nil || IsNil(o.ToAmountMin) { - var ret string - return ret - } - return *o.ToAmountMin -} - -// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountMinOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountMin) { - return nil, false - } - return o.ToAmountMin, true -} - -// HasToAmountMin returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountMin() bool { - if o != nil && !IsNil(o.ToAmountMin) { - return true - } - - return false -} - -// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountMin(v string) { - o.ToAmountMin = &v -} - -// GetToAmount returns the ToAmount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmount() string { - if o == nil || IsNil(o.ToAmount) { - var ret string - return ret - } - return *o.ToAmount -} - -// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountOk() (*string, bool) { - if o == nil || IsNil(o.ToAmount) { - return nil, false - } - return o.ToAmount, true -} - -// HasToAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmount() bool { - if o != nil && !IsNil(o.ToAmount) { - return true - } - - return false -} - -// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmount(v string) { - o.ToAmount = &v -} - -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { - var ret string - return ret - } - return *o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { - return nil, false - } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false -} - -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmount(v string) { - o.FromAmount = &v -} - -// GetFeeCosts returns the FeeCosts field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - if o == nil || IsNil(o.FeeCosts) { - var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - return ret - } - return o.FeeCosts -} - -// GetFeeCostsOk returns a tuple with the FeeCosts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFeeCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner, bool) { - if o == nil || IsNil(o.FeeCosts) { - return nil, false - } - return o.FeeCosts, true -} - -// HasFeeCosts returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFeeCosts() bool { - if o != nil && !IsNil(o.FeeCosts) { - return true - } - - return false -} - -// SetFeeCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner and assigns it to the FeeCosts field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFeeCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) { - o.FeeCosts = v -} - -// GetGasCosts returns the GasCosts field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCosts() []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - if o == nil || IsNil(o.GasCosts) { - var ret []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - return ret - } - return o.GasCosts -} - -// GetGasCostsOk returns a tuple with the GasCosts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetGasCostsOk() ([]GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner, bool) { - if o == nil || IsNil(o.GasCosts) { - return nil, false - } - return o.GasCosts, true -} - -// HasGasCosts returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasGasCosts() bool { - if o != nil && !IsNil(o.GasCosts) { - return true - } - - return false -} - -// SetGasCosts gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner and assigns it to the GasCosts field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetGasCosts(v []GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) { - o.GasCosts = v -} - -// GetExecutionDuration returns the ExecutionDuration field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDuration() int32 { - if o == nil || IsNil(o.ExecutionDuration) { - var ret int32 - return ret - } - return *o.ExecutionDuration -} - -// GetExecutionDurationOk returns a tuple with the ExecutionDuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetExecutionDurationOk() (*int32, bool) { - if o == nil || IsNil(o.ExecutionDuration) { - return nil, false - } - return o.ExecutionDuration, true -} - -// HasExecutionDuration returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasExecutionDuration() bool { - if o != nil && !IsNil(o.ExecutionDuration) { - return true - } - - return false -} - -// SetExecutionDuration gets a reference to the given int32 and assigns it to the ExecutionDuration field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetExecutionDuration(v int32) { - o.ExecutionDuration = &v -} - -// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSD() string { - if o == nil || IsNil(o.FromAmountUSD) { - var ret string - return ret - } - return *o.FromAmountUSD -} - -// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetFromAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.FromAmountUSD) { - return nil, false - } - return o.FromAmountUSD, true -} - -// HasFromAmountUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasFromAmountUSD() bool { - if o != nil && !IsNil(o.FromAmountUSD) { - return true - } - - return false -} - -// SetFromAmountUSD gets a reference to the given string and assigns it to the FromAmountUSD field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetFromAmountUSD(v string) { - o.FromAmountUSD = &v -} - -// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSD() string { - if o == nil || IsNil(o.ToAmountUSD) { - var ret string - return ret - } - return *o.ToAmountUSD -} - -// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountUSD) { - return nil, false - } - return o.ToAmountUSD, true -} - -// HasToAmountUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasToAmountUSD() bool { - if o != nil && !IsNil(o.ToAmountUSD) { - return true - } - - return false -} - -// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetToAmountUSD(v string) { - o.ToAmountUSD = &v -} - -// GetTool returns the Tool field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetTool() string { - if o == nil || IsNil(o.Tool) { - var ret string - return ret - } - return *o.Tool -} - -// GetToolOk returns a tuple with the Tool field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) GetToolOk() (*string, bool) { - if o == nil || IsNil(o.Tool) { - return nil, false - } - return o.Tool, true -} - -// HasTool returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) HasTool() bool { - if o != nil && !IsNil(o.Tool) { - return true - } - - return false -} - -// SetTool gets a reference to the given string and assigns it to the Tool field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) SetTool(v string) { - o.Tool = &v -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimate) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ApprovalAddress) { - toSerialize["approvalAddress"] = o.ApprovalAddress - } - if !IsNil(o.ToAmountMin) { - toSerialize["toAmountMin"] = o.ToAmountMin - } - if !IsNil(o.ToAmount) { - toSerialize["toAmount"] = o.ToAmount - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.FeeCosts) { - toSerialize["feeCosts"] = o.FeeCosts - } - if !IsNil(o.GasCosts) { - toSerialize["gasCosts"] = o.GasCosts - } - if !IsNil(o.ExecutionDuration) { - toSerialize["executionDuration"] = o.ExecutionDuration - } - if !IsNil(o.FromAmountUSD) { - toSerialize["fromAmountUSD"] = o.FromAmountUSD - } - if !IsNil(o.ToAmountUSD) { - toSerialize["toAmountUSD"] = o.ToAmountUSD - } - if !IsNil(o.Tool) { - toSerialize["tool"] = o.Tool - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate struct { - value *GetRoutes200ResponseRoutesInnerStepsInnerEstimate - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) Get() *GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimate) *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate { - return &NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go deleted file mode 100644 index 36653106eb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_fee_costs_inner.go +++ /dev/null @@ -1,275 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{} - -// GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner Details about a specific fee cost associated with the transaction. -type GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner struct { - // Name of the fee cost. - Name *string `json:"name,omitempty"` - // The amount in string format including all decimals. - Amount *string `json:"amount,omitempty"` - // The amount in string format including all decimals. - AmountUSD *string `json:"amountUSD,omitempty"` - // The symbol of a token - Token *string `json:"token,omitempty"` - // Indicates if the fee is included in the transaction amount. - Included *bool `json:"included,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetName(v string) { - o.Name = &v -} - -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmount() string { - if o == nil || IsNil(o.Amount) { - var ret string - return ret - } - return *o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountOk() (*string, bool) { - if o == nil || IsNil(o.Amount) { - return nil, false - } - return o.Amount, true -} - -// HasAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmount() bool { - if o != nil && !IsNil(o.Amount) { - return true - } - - return false -} - -// SetAmount gets a reference to the given string and assigns it to the Amount field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmount(v string) { - o.Amount = &v -} - -// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSD() string { - if o == nil || IsNil(o.AmountUSD) { - var ret string - return ret - } - return *o.AmountUSD -} - -// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.AmountUSD) { - return nil, false - } - return o.AmountUSD, true -} - -// HasAmountUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasAmountUSD() bool { - if o != nil && !IsNil(o.AmountUSD) { - return true - } - - return false -} - -// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetAmountUSD(v string) { - o.AmountUSD = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetToken() string { - if o == nil || IsNil(o.Token) { - var ret string - return ret - } - return *o.Token -} - -// GetTokenOk returns a tuple with the Token field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetTokenOk() (*string, bool) { - if o == nil || IsNil(o.Token) { - return nil, false - } - return o.Token, true -} - -// HasToken returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasToken() bool { - if o != nil && !IsNil(o.Token) { - return true - } - - return false -} - -// SetToken gets a reference to the given string and assigns it to the Token field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetToken(v string) { - o.Token = &v -} - -// GetIncluded returns the Included field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncluded() bool { - if o == nil || IsNil(o.Included) { - var ret bool - return ret - } - return *o.Included -} - -// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) GetIncludedOk() (*bool, bool) { - if o == nil || IsNil(o.Included) { - return nil, false - } - return o.Included, true -} - -// HasIncluded returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) HasIncluded() bool { - if o != nil && !IsNil(o.Included) { - return true - } - - return false -} - -// SetIncluded gets a reference to the given bool and assigns it to the Included field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) SetIncluded(v bool) { - o.Included = &v -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } - if !IsNil(o.AmountUSD) { - toSerialize["amountUSD"] = o.AmountUSD - } - if !IsNil(o.Token) { - toSerialize["token"] = o.Token - } - if !IsNil(o.Included) { - toSerialize["included"] = o.Included - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner struct { - value *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) Get() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner { - return &NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateFeeCostsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go deleted file mode 100644 index a883fbf098..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_estimate_gas_costs_inner.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{} - -// GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner struct for GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner -type GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner struct { - // The type of the gas cost. - Type *string `json:"type,omitempty"` - // The gas price, specified as a string to maintain precision. - Price *string `json:"price,omitempty"` - // The estimated gas required, specified as a string to maintain precision. - Estimate *string `json:"estimate,omitempty"` - // The gas limit for the transaction, specified as a string to maintain precision. - Limit *string `json:"limit,omitempty"` - // The amount of gas required in the gas currency. - Amount *string `json:"amount,omitempty"` - // The amount of gas required in USD. - AmountUSD *string `json:"amountUSD,omitempty"` - Token *GetRoutes200ResponseRoutesInnerFromToken `json:"token,omitempty"` -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{} - return &this -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInnerWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - this := GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetType(v string) { - o.Type = &v -} - -// GetPrice returns the Price field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPrice() string { - if o == nil || IsNil(o.Price) { - var ret string - return ret - } - return *o.Price -} - -// GetPriceOk returns a tuple with the Price field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetPriceOk() (*string, bool) { - if o == nil || IsNil(o.Price) { - return nil, false - } - return o.Price, true -} - -// HasPrice returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasPrice() bool { - if o != nil && !IsNil(o.Price) { - return true - } - - return false -} - -// SetPrice gets a reference to the given string and assigns it to the Price field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetPrice(v string) { - o.Price = &v -} - -// GetEstimate returns the Estimate field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimate() string { - if o == nil || IsNil(o.Estimate) { - var ret string - return ret - } - return *o.Estimate -} - -// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetEstimateOk() (*string, bool) { - if o == nil || IsNil(o.Estimate) { - return nil, false - } - return o.Estimate, true -} - -// HasEstimate returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasEstimate() bool { - if o != nil && !IsNil(o.Estimate) { - return true - } - - return false -} - -// SetEstimate gets a reference to the given string and assigns it to the Estimate field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetEstimate(v string) { - o.Estimate = &v -} - -// GetLimit returns the Limit field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimit() string { - if o == nil || IsNil(o.Limit) { - var ret string - return ret - } - return *o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetLimitOk() (*string, bool) { - if o == nil || IsNil(o.Limit) { - return nil, false - } - return o.Limit, true -} - -// HasLimit returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasLimit() bool { - if o != nil && !IsNil(o.Limit) { - return true - } - - return false -} - -// SetLimit gets a reference to the given string and assigns it to the Limit field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetLimit(v string) { - o.Limit = &v -} - -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmount() string { - if o == nil || IsNil(o.Amount) { - var ret string - return ret - } - return *o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountOk() (*string, bool) { - if o == nil || IsNil(o.Amount) { - return nil, false - } - return o.Amount, true -} - -// HasAmount returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmount() bool { - if o != nil && !IsNil(o.Amount) { - return true - } - - return false -} - -// SetAmount gets a reference to the given string and assigns it to the Amount field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmount(v string) { - o.Amount = &v -} - -// GetAmountUSD returns the AmountUSD field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSD() string { - if o == nil || IsNil(o.AmountUSD) { - var ret string - return ret - } - return *o.AmountUSD -} - -// GetAmountUSDOk returns a tuple with the AmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.AmountUSD) { - return nil, false - } - return o.AmountUSD, true -} - -// HasAmountUSD returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasAmountUSD() bool { - if o != nil && !IsNil(o.AmountUSD) { - return true - } - - return false -} - -// SetAmountUSD gets a reference to the given string and assigns it to the AmountUSD field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetAmountUSD(v string) { - o.AmountUSD = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.Token) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.Token -} - -// GetTokenOk returns a tuple with the Token field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) GetTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.Token) { - return nil, false - } - return o.Token, true -} - -// HasToken returns a boolean if a field has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) HasToken() bool { - if o != nil && !IsNil(o.Token) { - return true - } - - return false -} - -// SetToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the Token field. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) SetToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.Token = &v -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Price) { - toSerialize["price"] = o.Price - } - if !IsNil(o.Estimate) { - toSerialize["estimate"] = o.Estimate - } - if !IsNil(o.Limit) { - toSerialize["limit"] = o.Limit - } - if !IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } - if !IsNil(o.AmountUSD) { - toSerialize["amountUSD"] = o.AmountUSD - } - if !IsNil(o.Token) { - toSerialize["token"] = o.Token - } - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner struct { - value *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) Get() *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner(val *GetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner { - return &NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerEstimateGasCostsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go deleted file mode 100644 index c321992456..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_get_routes_200_response_routes_inner_steps_inner_tool_details.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the GetRoutes200ResponseRoutesInnerStepsInnerToolDetails type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoutes200ResponseRoutesInnerStepsInnerToolDetails{} - -// GetRoutes200ResponseRoutesInnerStepsInnerToolDetails Describes integration or tool details such as bridges or exchanges involved in the transaction. -type GetRoutes200ResponseRoutesInnerStepsInnerToolDetails struct { - // A unique identifier for the integration or tool. - Key string `json:"key"` - // The name of the integration or tool. - Name string `json:"name"` - // URL to the logo of the integration or tool. - LogoURI string `json:"logoURI"` -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetails(key string, name string, logoURI string) *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - this := GetRoutes200ResponseRoutesInnerStepsInnerToolDetails{} - this.Key = key - this.Name = name - this.LogoURI = logoURI - return &this -} - -// NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults instantiates a new GetRoutes200ResponseRoutesInnerStepsInnerToolDetails object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRoutes200ResponseRoutesInnerStepsInnerToolDetailsWithDefaults() *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - this := GetRoutes200ResponseRoutesInnerStepsInnerToolDetails{} - return &this -} - -// GetKey returns the Key field value -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetName(v string) { - o.Name = v -} - -// GetLogoURI returns the LogoURI field value -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURI() string { - if o == nil { - var ret string - return ret - } - - return o.LogoURI -} - -// GetLogoURIOk returns a tuple with the LogoURI field value -// and a boolean to check if the value has been set. -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) GetLogoURIOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LogoURI, true -} - -// SetLogoURI sets field value -func (o *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) SetLogoURI(v string) { - o.LogoURI = v -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - toSerialize["logoURI"] = o.LogoURI - return toSerialize, nil -} - -type NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails struct { - value *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - isSet bool -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) Get() *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - return v.value -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) Set(val *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails(val *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - return &NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails{value: val, isSet: true} -} - -func (v NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoutes200ResponseRoutesInnerStepsInnerToolDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_health_check_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_health_check_response.go deleted file mode 100644 index 439a89681c..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_health_check_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the HealthCheckResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HealthCheckResponse{} - -// HealthCheckResponse struct for HealthCheckResponse -type HealthCheckResponse struct { - Status *string `json:"status,omitempty"` -} - -// NewHealthCheckResponse instantiates a new HealthCheckResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHealthCheckResponse() *HealthCheckResponse { - this := HealthCheckResponse{} - return &this -} - -// NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHealthCheckResponseWithDefaults() *HealthCheckResponse { - this := HealthCheckResponse{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *HealthCheckResponse) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HealthCheckResponse) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *HealthCheckResponse) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *HealthCheckResponse) SetStatus(v string) { - o.Status = &v -} - -func (o HealthCheckResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HealthCheckResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableHealthCheckResponse struct { - value *HealthCheckResponse - isSet bool -} - -func (v NullableHealthCheckResponse) Get() *HealthCheckResponse { - return v.value -} - -func (v *NullableHealthCheckResponse) Set(val *HealthCheckResponse) { - v.value = val - v.isSet = true -} - -func (v NullableHealthCheckResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableHealthCheckResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHealthCheckResponse(val *HealthCheckResponse) *NullableHealthCheckResponse { - return &NullableHealthCheckResponse{value: val, isSet: true} -} - -func (v NullableHealthCheckResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHealthCheckResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_included_step.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_included_step.go deleted file mode 100644 index 086e0c91c2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_included_step.go +++ /dev/null @@ -1,382 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the IncludedStep type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IncludedStep{} - -// IncludedStep Details a single step within a route including actions and estimates. -type IncludedStep struct { - // Id of the step - Id *string `json:"id,omitempty"` - // Type of the step, typically describing the action, e.g., 'swap'. - Type *string `json:"type,omitempty"` - // Tool used in the step, e.g., 'stargate'. - Tool *string `json:"tool,omitempty"` - Action *GetRoutes200ResponseRoutesInnerStepsInnerAction `json:"action,omitempty"` - Estimate *GetRoutes200ResponseRoutesInnerStepsInnerEstimate `json:"estimate,omitempty"` - ToolDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"toolDetails,omitempty"` - IntegrationDetails *GetRoutes200ResponseRoutesInnerStepsInnerToolDetails `json:"integrationDetails,omitempty"` - // IDs of further steps included within this step, allowing for nested actions without direct recursion. - IncludedStepIds []string `json:"includedStepIds,omitempty"` -} - -// NewIncludedStep instantiates a new IncludedStep object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIncludedStep() *IncludedStep { - this := IncludedStep{} - return &this -} - -// NewIncludedStepWithDefaults instantiates a new IncludedStep object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIncludedStepWithDefaults() *IncludedStep { - this := IncludedStep{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *IncludedStep) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *IncludedStep) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *IncludedStep) SetId(v string) { - o.Id = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *IncludedStep) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *IncludedStep) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *IncludedStep) SetType(v string) { - o.Type = &v -} - -// GetTool returns the Tool field value if set, zero value otherwise. -func (o *IncludedStep) GetTool() string { - if o == nil || IsNil(o.Tool) { - var ret string - return ret - } - return *o.Tool -} - -// GetToolOk returns a tuple with the Tool field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetToolOk() (*string, bool) { - if o == nil || IsNil(o.Tool) { - return nil, false - } - return o.Tool, true -} - -// HasTool returns a boolean if a field has been set. -func (o *IncludedStep) HasTool() bool { - if o != nil && !IsNil(o.Tool) { - return true - } - - return false -} - -// SetTool gets a reference to the given string and assigns it to the Tool field. -func (o *IncludedStep) SetTool(v string) { - o.Tool = &v -} - -// GetAction returns the Action field value if set, zero value otherwise. -func (o *IncludedStep) GetAction() GetRoutes200ResponseRoutesInnerStepsInnerAction { - if o == nil || IsNil(o.Action) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerAction - return ret - } - return *o.Action -} - -// GetActionOk returns a tuple with the Action field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetActionOk() (*GetRoutes200ResponseRoutesInnerStepsInnerAction, bool) { - if o == nil || IsNil(o.Action) { - return nil, false - } - return o.Action, true -} - -// HasAction returns a boolean if a field has been set. -func (o *IncludedStep) HasAction() bool { - if o != nil && !IsNil(o.Action) { - return true - } - - return false -} - -// SetAction gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerAction and assigns it to the Action field. -func (o *IncludedStep) SetAction(v GetRoutes200ResponseRoutesInnerStepsInnerAction) { - o.Action = &v -} - -// GetEstimate returns the Estimate field value if set, zero value otherwise. -func (o *IncludedStep) GetEstimate() GetRoutes200ResponseRoutesInnerStepsInnerEstimate { - if o == nil || IsNil(o.Estimate) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerEstimate - return ret - } - return *o.Estimate -} - -// GetEstimateOk returns a tuple with the Estimate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetEstimateOk() (*GetRoutes200ResponseRoutesInnerStepsInnerEstimate, bool) { - if o == nil || IsNil(o.Estimate) { - return nil, false - } - return o.Estimate, true -} - -// HasEstimate returns a boolean if a field has been set. -func (o *IncludedStep) HasEstimate() bool { - if o != nil && !IsNil(o.Estimate) { - return true - } - - return false -} - -// SetEstimate gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerEstimate and assigns it to the Estimate field. -func (o *IncludedStep) SetEstimate(v GetRoutes200ResponseRoutesInnerStepsInnerEstimate) { - o.Estimate = &v -} - -// GetToolDetails returns the ToolDetails field value if set, zero value otherwise. -func (o *IncludedStep) GetToolDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - if o == nil || IsNil(o.ToolDetails) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - return ret - } - return *o.ToolDetails -} - -// GetToolDetailsOk returns a tuple with the ToolDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetToolDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { - if o == nil || IsNil(o.ToolDetails) { - return nil, false - } - return o.ToolDetails, true -} - -// HasToolDetails returns a boolean if a field has been set. -func (o *IncludedStep) HasToolDetails() bool { - if o != nil && !IsNil(o.ToolDetails) { - return true - } - - return false -} - -// SetToolDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the ToolDetails field. -func (o *IncludedStep) SetToolDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { - o.ToolDetails = &v -} - -// GetIntegrationDetails returns the IntegrationDetails field value if set, zero value otherwise. -func (o *IncludedStep) GetIntegrationDetails() GetRoutes200ResponseRoutesInnerStepsInnerToolDetails { - if o == nil || IsNil(o.IntegrationDetails) { - var ret GetRoutes200ResponseRoutesInnerStepsInnerToolDetails - return ret - } - return *o.IntegrationDetails -} - -// GetIntegrationDetailsOk returns a tuple with the IntegrationDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetIntegrationDetailsOk() (*GetRoutes200ResponseRoutesInnerStepsInnerToolDetails, bool) { - if o == nil || IsNil(o.IntegrationDetails) { - return nil, false - } - return o.IntegrationDetails, true -} - -// HasIntegrationDetails returns a boolean if a field has been set. -func (o *IncludedStep) HasIntegrationDetails() bool { - if o != nil && !IsNil(o.IntegrationDetails) { - return true - } - - return false -} - -// SetIntegrationDetails gets a reference to the given GetRoutes200ResponseRoutesInnerStepsInnerToolDetails and assigns it to the IntegrationDetails field. -func (o *IncludedStep) SetIntegrationDetails(v GetRoutes200ResponseRoutesInnerStepsInnerToolDetails) { - o.IntegrationDetails = &v -} - -// GetIncludedStepIds returns the IncludedStepIds field value if set, zero value otherwise. -func (o *IncludedStep) GetIncludedStepIds() []string { - if o == nil || IsNil(o.IncludedStepIds) { - var ret []string - return ret - } - return o.IncludedStepIds -} - -// GetIncludedStepIdsOk returns a tuple with the IncludedStepIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IncludedStep) GetIncludedStepIdsOk() ([]string, bool) { - if o == nil || IsNil(o.IncludedStepIds) { - return nil, false - } - return o.IncludedStepIds, true -} - -// HasIncludedStepIds returns a boolean if a field has been set. -func (o *IncludedStep) HasIncludedStepIds() bool { - if o != nil && !IsNil(o.IncludedStepIds) { - return true - } - - return false -} - -// SetIncludedStepIds gets a reference to the given []string and assigns it to the IncludedStepIds field. -func (o *IncludedStep) SetIncludedStepIds(v []string) { - o.IncludedStepIds = v -} - -func (o IncludedStep) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IncludedStep) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Tool) { - toSerialize["tool"] = o.Tool - } - if !IsNil(o.Action) { - toSerialize["action"] = o.Action - } - if !IsNil(o.Estimate) { - toSerialize["estimate"] = o.Estimate - } - if !IsNil(o.ToolDetails) { - toSerialize["toolDetails"] = o.ToolDetails - } - if !IsNil(o.IntegrationDetails) { - toSerialize["integrationDetails"] = o.IntegrationDetails - } - if !IsNil(o.IncludedStepIds) { - toSerialize["includedStepIds"] = o.IncludedStepIds - } - return toSerialize, nil -} - -type NullableIncludedStep struct { - value *IncludedStep - isSet bool -} - -func (v NullableIncludedStep) Get() *IncludedStep { - return v.value -} - -func (v *NullableIncludedStep) Set(val *IncludedStep) { - v.value = val - v.isSet = true -} - -func (v NullableIncludedStep) IsSet() bool { - return v.isSet -} - -func (v *NullableIncludedStep) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIncludedStep(val *IncludedStep) *NullableIncludedStep { - return &NullableIncludedStep{value: val, isSet: true} -} - -func (v NullableIncludedStep) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIncludedStep) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_insurance.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_insurance.go deleted file mode 100644 index c4ed1d8ef2..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_insurance.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Insurance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Insurance{} - -// Insurance struct for Insurance -type Insurance struct { - // The state of insurance applicability for the transaction. - State *string `json:"state,omitempty"` - // The fee amount for insurance, represented in USD. - FeeAmountUsd *string `json:"feeAmountUsd,omitempty"` -} - -// NewInsurance instantiates a new Insurance object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInsurance() *Insurance { - this := Insurance{} - return &this -} - -// NewInsuranceWithDefaults instantiates a new Insurance object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInsuranceWithDefaults() *Insurance { - this := Insurance{} - return &this -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *Insurance) GetState() string { - if o == nil || IsNil(o.State) { - var ret string - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Insurance) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *Insurance) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given string and assigns it to the State field. -func (o *Insurance) SetState(v string) { - o.State = &v -} - -// GetFeeAmountUsd returns the FeeAmountUsd field value if set, zero value otherwise. -func (o *Insurance) GetFeeAmountUsd() string { - if o == nil || IsNil(o.FeeAmountUsd) { - var ret string - return ret - } - return *o.FeeAmountUsd -} - -// GetFeeAmountUsdOk returns a tuple with the FeeAmountUsd field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Insurance) GetFeeAmountUsdOk() (*string, bool) { - if o == nil || IsNil(o.FeeAmountUsd) { - return nil, false - } - return o.FeeAmountUsd, true -} - -// HasFeeAmountUsd returns a boolean if a field has been set. -func (o *Insurance) HasFeeAmountUsd() bool { - if o != nil && !IsNil(o.FeeAmountUsd) { - return true - } - - return false -} - -// SetFeeAmountUsd gets a reference to the given string and assigns it to the FeeAmountUsd field. -func (o *Insurance) SetFeeAmountUsd(v string) { - o.FeeAmountUsd = &v -} - -func (o Insurance) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Insurance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.FeeAmountUsd) { - toSerialize["feeAmountUsd"] = o.FeeAmountUsd - } - return toSerialize, nil -} - -type NullableInsurance struct { - value *Insurance - isSet bool -} - -func (v NullableInsurance) Get() *Insurance { - return v.value -} - -func (v *NullableInsurance) Set(val *Insurance) { - v.value = val - v.isSet = true -} - -func (v NullableInsurance) IsSet() bool { - return v.isSet -} - -func (v *NullableInsurance) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInsurance(val *Insurance) *NullableInsurance { - return &NullableInsurance{value: val, isSet: true} -} - -func (v NullableInsurance) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInsurance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_integration_details.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_integration_details.go deleted file mode 100644 index bff096548e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_integration_details.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the IntegrationDetails type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IntegrationDetails{} - -// IntegrationDetails Describes integration or tool details such as bridges or exchanges involved in the transaction. -type IntegrationDetails struct { - // A unique identifier for the integration or tool. - Key string `json:"key"` - // The name of the integration or tool. - Name string `json:"name"` - // URL to the logo of the integration or tool. - LogoURI string `json:"logoURI"` -} - -// NewIntegrationDetails instantiates a new IntegrationDetails object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIntegrationDetails(key string, name string, logoURI string) *IntegrationDetails { - this := IntegrationDetails{} - this.Key = key - this.Name = name - this.LogoURI = logoURI - return &this -} - -// NewIntegrationDetailsWithDefaults instantiates a new IntegrationDetails object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIntegrationDetailsWithDefaults() *IntegrationDetails { - this := IntegrationDetails{} - return &this -} - -// GetKey returns the Key field value -func (o *IntegrationDetails) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *IntegrationDetails) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *IntegrationDetails) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *IntegrationDetails) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *IntegrationDetails) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *IntegrationDetails) SetName(v string) { - o.Name = v -} - -// GetLogoURI returns the LogoURI field value -func (o *IntegrationDetails) GetLogoURI() string { - if o == nil { - var ret string - return ret - } - - return o.LogoURI -} - -// GetLogoURIOk returns a tuple with the LogoURI field value -// and a boolean to check if the value has been set. -func (o *IntegrationDetails) GetLogoURIOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LogoURI, true -} - -// SetLogoURI sets field value -func (o *IntegrationDetails) SetLogoURI(v string) { - o.LogoURI = v -} - -func (o IntegrationDetails) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IntegrationDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - toSerialize["logoURI"] = o.LogoURI - return toSerialize, nil -} - -type NullableIntegrationDetails struct { - value *IntegrationDetails - isSet bool -} - -func (v NullableIntegrationDetails) Get() *IntegrationDetails { - return v.value -} - -func (v *NullableIntegrationDetails) Set(val *IntegrationDetails) { - v.value = val - v.isSet = true -} - -func (v NullableIntegrationDetails) IsSet() bool { - return v.isSet -} - -func (v *NullableIntegrationDetails) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIntegrationDetails(val *IntegrationDetails) *NullableIntegrationDetails { - return &NullableIntegrationDetails{value: val, isSet: true} -} - -func (v NullableIntegrationDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIntegrationDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_200_response.go deleted file mode 100644 index f8caa99058..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_200_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Pause200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Pause200Response{} - -// Pause200Response Response for a pause transaction request. Returns the current status of the SATP session post-pause action. -type Pause200Response struct { - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` -} - -// NewPause200Response instantiates a new Pause200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPause200Response(statusResponse Transact200ResponseStatusResponse) *Pause200Response { - this := Pause200Response{} - this.StatusResponse = statusResponse - return &this -} - -// NewPause200ResponseWithDefaults instantiates a new Pause200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPause200ResponseWithDefaults() *Pause200Response { - this := Pause200Response{} - return &this -} - -// GetStatusResponse returns the StatusResponse field value -func (o *Pause200Response) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *Pause200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *Pause200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -func (o Pause200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Pause200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["statusResponse"] = o.StatusResponse - return toSerialize, nil -} - -type NullablePause200Response struct { - value *Pause200Response - isSet bool -} - -func (v NullablePause200Response) Get() *Pause200Response { - return v.value -} - -func (v *NullablePause200Response) Set(val *Pause200Response) { - v.value = val - v.isSet = true -} - -func (v NullablePause200Response) IsSet() bool { - return v.isSet -} - -func (v *NullablePause200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePause200Response(val *Pause200Response) *NullablePause200Response { - return &NullablePause200Response{value: val, isSet: true} -} - -func (v NullablePause200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePause200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_request.go deleted file mode 100644 index ca3360617b..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_request.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the PauseRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PauseRequest{} - -// PauseRequest Request to temporarily pause an ongoing transaction session, identified by the session and context IDs. -type PauseRequest struct { - SessionId *string `json:"sessionId,omitempty"` - ContextId *string `json:"contextId,omitempty"` -} - -// NewPauseRequest instantiates a new PauseRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPauseRequest() *PauseRequest { - this := PauseRequest{} - return &this -} - -// NewPauseRequestWithDefaults instantiates a new PauseRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPauseRequestWithDefaults() *PauseRequest { - this := PauseRequest{} - return &this -} - -// GetSessionId returns the SessionId field value if set, zero value otherwise. -func (o *PauseRequest) GetSessionId() string { - if o == nil || IsNil(o.SessionId) { - var ret string - return ret - } - return *o.SessionId -} - -// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PauseRequest) GetSessionIdOk() (*string, bool) { - if o == nil || IsNil(o.SessionId) { - return nil, false - } - return o.SessionId, true -} - -// HasSessionId returns a boolean if a field has been set. -func (o *PauseRequest) HasSessionId() bool { - if o != nil && !IsNil(o.SessionId) { - return true - } - - return false -} - -// SetSessionId gets a reference to the given string and assigns it to the SessionId field. -func (o *PauseRequest) SetSessionId(v string) { - o.SessionId = &v -} - -// GetContextId returns the ContextId field value if set, zero value otherwise. -func (o *PauseRequest) GetContextId() string { - if o == nil || IsNil(o.ContextId) { - var ret string - return ret - } - return *o.ContextId -} - -// GetContextIdOk returns a tuple with the ContextId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PauseRequest) GetContextIdOk() (*string, bool) { - if o == nil || IsNil(o.ContextId) { - return nil, false - } - return o.ContextId, true -} - -// HasContextId returns a boolean if a field has been set. -func (o *PauseRequest) HasContextId() bool { - if o != nil && !IsNil(o.ContextId) { - return true - } - - return false -} - -// SetContextId gets a reference to the given string and assigns it to the ContextId field. -func (o *PauseRequest) SetContextId(v string) { - o.ContextId = &v -} - -func (o PauseRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PauseRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.SessionId) { - toSerialize["sessionId"] = o.SessionId - } - if !IsNil(o.ContextId) { - toSerialize["contextId"] = o.ContextId - } - return toSerialize, nil -} - -type NullablePauseRequest struct { - value *PauseRequest - isSet bool -} - -func (v NullablePauseRequest) Get() *PauseRequest { - return v.value -} - -func (v *NullablePauseRequest) Set(val *PauseRequest) { - v.value = val - v.isSet = true -} - -func (v NullablePauseRequest) IsSet() bool { - return v.isSet -} - -func (v *NullablePauseRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePauseRequest(val *PauseRequest) *NullablePauseRequest { - return &NullablePauseRequest{value: val, isSet: true} -} - -func (v NullablePauseRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePauseRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_response.go deleted file mode 100644 index 7735d228c9..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_pause_response.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the PauseResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PauseResponse{} - -// PauseResponse Response for a pause transaction request. Returns the current status of the SATP session post-pause action. -type PauseResponse struct { - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` -} - -// NewPauseResponse instantiates a new PauseResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPauseResponse(statusResponse Transact200ResponseStatusResponse) *PauseResponse { - this := PauseResponse{} - this.StatusResponse = statusResponse - return &this -} - -// NewPauseResponseWithDefaults instantiates a new PauseResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPauseResponseWithDefaults() *PauseResponse { - this := PauseResponse{} - return &this -} - -// GetStatusResponse returns the StatusResponse field value -func (o *PauseResponse) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *PauseResponse) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *PauseResponse) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -func (o PauseResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PauseResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["statusResponse"] = o.StatusResponse - return toSerialize, nil -} - -type NullablePauseResponse struct { - value *PauseResponse - isSet bool -} - -func (v NullablePauseResponse) Get() *PauseResponse { - return v.value -} - -func (v *NullablePauseResponse) Set(val *PauseResponse) { - v.value = val - v.isSet = true -} - -func (v NullablePauseResponse) IsSet() bool { - return v.isSet -} - -func (v *NullablePauseResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePauseResponse(val *PauseResponse) *NullablePauseResponse { - return &NullablePauseResponse{value: val, isSet: true} -} - -func (v NullablePauseResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePauseResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_route.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_route.go deleted file mode 100644 index 5266515586..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_route.go +++ /dev/null @@ -1,689 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Route type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Route{} - -// Route struct for Route -type Route struct { - // A unique identifier of the route. - Id string `json:"id"` - // A unique identifier for the gateway. - GatewayID string `json:"gatewayID"` - // The mode of operation for this route - 'data' for arbitrary payload handling, 'transfer' for asset transfer. - Mode string `json:"mode"` - // The ID of the DLT Network where the operation will originate. - FromDLTNetworkID *string `json:"fromDLTNetworkID,omitempty"` - // The amount of 'fromToken' to be transferred in USD, specified as a string to maintain precision. - FromAmountUSD *float64 `json:"fromAmountUSD,omitempty"` - // The amount that should be sent including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - FromAmount *string `json:"fromAmount,omitempty"` - FromToken *GetRoutes200ResponseRoutesInnerFromToken `json:"fromToken,omitempty"` - // The ID of the DLT Network where the operation will end. - ToDLTNetworkID *string `json:"toDLTNetworkID,omitempty"` - // The expected amount to be received in USD. - ToAmountUSD *string `json:"toAmountUSD,omitempty"` - // The expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - ToAmount *string `json:"toAmount,omitempty"` - // The minimum expected amount to be received including all decimals (e.g., 1000000 for 1 USDC (6 decimals)). - ToAmountMin *string `json:"toAmountMin,omitempty"` - ToToken *GetRoutes200ResponseRoutesInnerFromToken `json:"toToken,omitempty"` - // The expected gas cost in USD. - GasCostUSD *string `json:"gasCostUSD,omitempty"` - // Whether chain switching is enabled or not. - ContainsSwitchChain *bool `json:"containsSwitchChain,omitempty"` - // List of steps involved in this route, adjusted for mode. - Steps []GetRoutes200ResponseRoutesInnerStepsInner `json:"steps,omitempty"` - Insurance *GetRoutes200ResponseRoutesInnerInsurance `json:"insurance,omitempty"` - // List of tags identifiers providing additional context or categorization. - Tags []string `json:"tags,omitempty"` -} - -// NewRoute instantiates a new Route object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRoute(id string, gatewayID string, mode string) *Route { - this := Route{} - this.Id = id - this.GatewayID = gatewayID - this.Mode = mode - return &this -} - -// NewRouteWithDefaults instantiates a new Route object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRouteWithDefaults() *Route { - this := Route{} - return &this -} - -// GetId returns the Id field value -func (o *Route) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *Route) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *Route) SetId(v string) { - o.Id = v -} - -// GetGatewayID returns the GatewayID field value -func (o *Route) GetGatewayID() string { - if o == nil { - var ret string - return ret - } - - return o.GatewayID -} - -// GetGatewayIDOk returns a tuple with the GatewayID field value -// and a boolean to check if the value has been set. -func (o *Route) GetGatewayIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GatewayID, true -} - -// SetGatewayID sets field value -func (o *Route) SetGatewayID(v string) { - o.GatewayID = v -} - -// GetMode returns the Mode field value -func (o *Route) GetMode() string { - if o == nil { - var ret string - return ret - } - - return o.Mode -} - -// GetModeOk returns a tuple with the Mode field value -// and a boolean to check if the value has been set. -func (o *Route) GetModeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mode, true -} - -// SetMode sets field value -func (o *Route) SetMode(v string) { - o.Mode = v -} - -// GetFromDLTNetworkID returns the FromDLTNetworkID field value if set, zero value otherwise. -func (o *Route) GetFromDLTNetworkID() string { - if o == nil || IsNil(o.FromDLTNetworkID) { - var ret string - return ret - } - return *o.FromDLTNetworkID -} - -// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetFromDLTNetworkIDOk() (*string, bool) { - if o == nil || IsNil(o.FromDLTNetworkID) { - return nil, false - } - return o.FromDLTNetworkID, true -} - -// HasFromDLTNetworkID returns a boolean if a field has been set. -func (o *Route) HasFromDLTNetworkID() bool { - if o != nil && !IsNil(o.FromDLTNetworkID) { - return true - } - - return false -} - -// SetFromDLTNetworkID gets a reference to the given string and assigns it to the FromDLTNetworkID field. -func (o *Route) SetFromDLTNetworkID(v string) { - o.FromDLTNetworkID = &v -} - -// GetFromAmountUSD returns the FromAmountUSD field value if set, zero value otherwise. -func (o *Route) GetFromAmountUSD() float64 { - if o == nil || IsNil(o.FromAmountUSD) { - var ret float64 - return ret - } - return *o.FromAmountUSD -} - -// GetFromAmountUSDOk returns a tuple with the FromAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetFromAmountUSDOk() (*float64, bool) { - if o == nil || IsNil(o.FromAmountUSD) { - return nil, false - } - return o.FromAmountUSD, true -} - -// HasFromAmountUSD returns a boolean if a field has been set. -func (o *Route) HasFromAmountUSD() bool { - if o != nil && !IsNil(o.FromAmountUSD) { - return true - } - - return false -} - -// SetFromAmountUSD gets a reference to the given float64 and assigns it to the FromAmountUSD field. -func (o *Route) SetFromAmountUSD(v float64) { - o.FromAmountUSD = &v -} - -// GetFromAmount returns the FromAmount field value if set, zero value otherwise. -func (o *Route) GetFromAmount() string { - if o == nil || IsNil(o.FromAmount) { - var ret string - return ret - } - return *o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetFromAmountOk() (*string, bool) { - if o == nil || IsNil(o.FromAmount) { - return nil, false - } - return o.FromAmount, true -} - -// HasFromAmount returns a boolean if a field has been set. -func (o *Route) HasFromAmount() bool { - if o != nil && !IsNil(o.FromAmount) { - return true - } - - return false -} - -// SetFromAmount gets a reference to the given string and assigns it to the FromAmount field. -func (o *Route) SetFromAmount(v string) { - o.FromAmount = &v -} - -// GetFromToken returns the FromToken field value if set, zero value otherwise. -func (o *Route) GetFromToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.FromToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.FromToken -} - -// GetFromTokenOk returns a tuple with the FromToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetFromTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.FromToken) { - return nil, false - } - return o.FromToken, true -} - -// HasFromToken returns a boolean if a field has been set. -func (o *Route) HasFromToken() bool { - if o != nil && !IsNil(o.FromToken) { - return true - } - - return false -} - -// SetFromToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the FromToken field. -func (o *Route) SetFromToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.FromToken = &v -} - -// GetToDLTNetworkID returns the ToDLTNetworkID field value if set, zero value otherwise. -func (o *Route) GetToDLTNetworkID() string { - if o == nil || IsNil(o.ToDLTNetworkID) { - var ret string - return ret - } - return *o.ToDLTNetworkID -} - -// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetToDLTNetworkIDOk() (*string, bool) { - if o == nil || IsNil(o.ToDLTNetworkID) { - return nil, false - } - return o.ToDLTNetworkID, true -} - -// HasToDLTNetworkID returns a boolean if a field has been set. -func (o *Route) HasToDLTNetworkID() bool { - if o != nil && !IsNil(o.ToDLTNetworkID) { - return true - } - - return false -} - -// SetToDLTNetworkID gets a reference to the given string and assigns it to the ToDLTNetworkID field. -func (o *Route) SetToDLTNetworkID(v string) { - o.ToDLTNetworkID = &v -} - -// GetToAmountUSD returns the ToAmountUSD field value if set, zero value otherwise. -func (o *Route) GetToAmountUSD() string { - if o == nil || IsNil(o.ToAmountUSD) { - var ret string - return ret - } - return *o.ToAmountUSD -} - -// GetToAmountUSDOk returns a tuple with the ToAmountUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetToAmountUSDOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountUSD) { - return nil, false - } - return o.ToAmountUSD, true -} - -// HasToAmountUSD returns a boolean if a field has been set. -func (o *Route) HasToAmountUSD() bool { - if o != nil && !IsNil(o.ToAmountUSD) { - return true - } - - return false -} - -// SetToAmountUSD gets a reference to the given string and assigns it to the ToAmountUSD field. -func (o *Route) SetToAmountUSD(v string) { - o.ToAmountUSD = &v -} - -// GetToAmount returns the ToAmount field value if set, zero value otherwise. -func (o *Route) GetToAmount() string { - if o == nil || IsNil(o.ToAmount) { - var ret string - return ret - } - return *o.ToAmount -} - -// GetToAmountOk returns a tuple with the ToAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetToAmountOk() (*string, bool) { - if o == nil || IsNil(o.ToAmount) { - return nil, false - } - return o.ToAmount, true -} - -// HasToAmount returns a boolean if a field has been set. -func (o *Route) HasToAmount() bool { - if o != nil && !IsNil(o.ToAmount) { - return true - } - - return false -} - -// SetToAmount gets a reference to the given string and assigns it to the ToAmount field. -func (o *Route) SetToAmount(v string) { - o.ToAmount = &v -} - -// GetToAmountMin returns the ToAmountMin field value if set, zero value otherwise. -func (o *Route) GetToAmountMin() string { - if o == nil || IsNil(o.ToAmountMin) { - var ret string - return ret - } - return *o.ToAmountMin -} - -// GetToAmountMinOk returns a tuple with the ToAmountMin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetToAmountMinOk() (*string, bool) { - if o == nil || IsNil(o.ToAmountMin) { - return nil, false - } - return o.ToAmountMin, true -} - -// HasToAmountMin returns a boolean if a field has been set. -func (o *Route) HasToAmountMin() bool { - if o != nil && !IsNil(o.ToAmountMin) { - return true - } - - return false -} - -// SetToAmountMin gets a reference to the given string and assigns it to the ToAmountMin field. -func (o *Route) SetToAmountMin(v string) { - o.ToAmountMin = &v -} - -// GetToToken returns the ToToken field value if set, zero value otherwise. -func (o *Route) GetToToken() GetRoutes200ResponseRoutesInnerFromToken { - if o == nil || IsNil(o.ToToken) { - var ret GetRoutes200ResponseRoutesInnerFromToken - return ret - } - return *o.ToToken -} - -// GetToTokenOk returns a tuple with the ToToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetToTokenOk() (*GetRoutes200ResponseRoutesInnerFromToken, bool) { - if o == nil || IsNil(o.ToToken) { - return nil, false - } - return o.ToToken, true -} - -// HasToToken returns a boolean if a field has been set. -func (o *Route) HasToToken() bool { - if o != nil && !IsNil(o.ToToken) { - return true - } - - return false -} - -// SetToToken gets a reference to the given GetRoutes200ResponseRoutesInnerFromToken and assigns it to the ToToken field. -func (o *Route) SetToToken(v GetRoutes200ResponseRoutesInnerFromToken) { - o.ToToken = &v -} - -// GetGasCostUSD returns the GasCostUSD field value if set, zero value otherwise. -func (o *Route) GetGasCostUSD() string { - if o == nil || IsNil(o.GasCostUSD) { - var ret string - return ret - } - return *o.GasCostUSD -} - -// GetGasCostUSDOk returns a tuple with the GasCostUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetGasCostUSDOk() (*string, bool) { - if o == nil || IsNil(o.GasCostUSD) { - return nil, false - } - return o.GasCostUSD, true -} - -// HasGasCostUSD returns a boolean if a field has been set. -func (o *Route) HasGasCostUSD() bool { - if o != nil && !IsNil(o.GasCostUSD) { - return true - } - - return false -} - -// SetGasCostUSD gets a reference to the given string and assigns it to the GasCostUSD field. -func (o *Route) SetGasCostUSD(v string) { - o.GasCostUSD = &v -} - -// GetContainsSwitchChain returns the ContainsSwitchChain field value if set, zero value otherwise. -func (o *Route) GetContainsSwitchChain() bool { - if o == nil || IsNil(o.ContainsSwitchChain) { - var ret bool - return ret - } - return *o.ContainsSwitchChain -} - -// GetContainsSwitchChainOk returns a tuple with the ContainsSwitchChain field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetContainsSwitchChainOk() (*bool, bool) { - if o == nil || IsNil(o.ContainsSwitchChain) { - return nil, false - } - return o.ContainsSwitchChain, true -} - -// HasContainsSwitchChain returns a boolean if a field has been set. -func (o *Route) HasContainsSwitchChain() bool { - if o != nil && !IsNil(o.ContainsSwitchChain) { - return true - } - - return false -} - -// SetContainsSwitchChain gets a reference to the given bool and assigns it to the ContainsSwitchChain field. -func (o *Route) SetContainsSwitchChain(v bool) { - o.ContainsSwitchChain = &v -} - -// GetSteps returns the Steps field value if set, zero value otherwise. -func (o *Route) GetSteps() []GetRoutes200ResponseRoutesInnerStepsInner { - if o == nil || IsNil(o.Steps) { - var ret []GetRoutes200ResponseRoutesInnerStepsInner - return ret - } - return o.Steps -} - -// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetStepsOk() ([]GetRoutes200ResponseRoutesInnerStepsInner, bool) { - if o == nil || IsNil(o.Steps) { - return nil, false - } - return o.Steps, true -} - -// HasSteps returns a boolean if a field has been set. -func (o *Route) HasSteps() bool { - if o != nil && !IsNil(o.Steps) { - return true - } - - return false -} - -// SetSteps gets a reference to the given []GetRoutes200ResponseRoutesInnerStepsInner and assigns it to the Steps field. -func (o *Route) SetSteps(v []GetRoutes200ResponseRoutesInnerStepsInner) { - o.Steps = v -} - -// GetInsurance returns the Insurance field value if set, zero value otherwise. -func (o *Route) GetInsurance() GetRoutes200ResponseRoutesInnerInsurance { - if o == nil || IsNil(o.Insurance) { - var ret GetRoutes200ResponseRoutesInnerInsurance - return ret - } - return *o.Insurance -} - -// GetInsuranceOk returns a tuple with the Insurance field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetInsuranceOk() (*GetRoutes200ResponseRoutesInnerInsurance, bool) { - if o == nil || IsNil(o.Insurance) { - return nil, false - } - return o.Insurance, true -} - -// HasInsurance returns a boolean if a field has been set. -func (o *Route) HasInsurance() bool { - if o != nil && !IsNil(o.Insurance) { - return true - } - - return false -} - -// SetInsurance gets a reference to the given GetRoutes200ResponseRoutesInnerInsurance and assigns it to the Insurance field. -func (o *Route) SetInsurance(v GetRoutes200ResponseRoutesInnerInsurance) { - o.Insurance = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *Route) GetTags() []string { - if o == nil || IsNil(o.Tags) { - var ret []string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Route) GetTagsOk() ([]string, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *Route) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given []string and assigns it to the Tags field. -func (o *Route) SetTags(v []string) { - o.Tags = v -} - -func (o Route) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Route) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["gatewayID"] = o.GatewayID - toSerialize["mode"] = o.Mode - if !IsNil(o.FromDLTNetworkID) { - toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID - } - if !IsNil(o.FromAmountUSD) { - toSerialize["fromAmountUSD"] = o.FromAmountUSD - } - if !IsNil(o.FromAmount) { - toSerialize["fromAmount"] = o.FromAmount - } - if !IsNil(o.FromToken) { - toSerialize["fromToken"] = o.FromToken - } - if !IsNil(o.ToDLTNetworkID) { - toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID - } - if !IsNil(o.ToAmountUSD) { - toSerialize["toAmountUSD"] = o.ToAmountUSD - } - if !IsNil(o.ToAmount) { - toSerialize["toAmount"] = o.ToAmount - } - if !IsNil(o.ToAmountMin) { - toSerialize["toAmountMin"] = o.ToAmountMin - } - if !IsNil(o.ToToken) { - toSerialize["toToken"] = o.ToToken - } - if !IsNil(o.GasCostUSD) { - toSerialize["gasCostUSD"] = o.GasCostUSD - } - if !IsNil(o.ContainsSwitchChain) { - toSerialize["containsSwitchChain"] = o.ContainsSwitchChain - } - if !IsNil(o.Steps) { - toSerialize["steps"] = o.Steps - } - if !IsNil(o.Insurance) { - toSerialize["insurance"] = o.Insurance - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - return toSerialize, nil -} - -type NullableRoute struct { - value *Route - isSet bool -} - -func (v NullableRoute) Get() *Route { - return v.value -} - -func (v *NullableRoute) Set(val *Route) { - v.value = val - v.isSet = true -} - -func (v NullableRoute) IsSet() bool { - return v.isSet -} - -func (v *NullableRoute) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRoute(val *Route) *NullableRoute { - return &NullableRoute{value: val, isSet: true} -} - -func (v NullableRoute) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRoute) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_routes_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_routes_response.go deleted file mode 100644 index 6ffcfb08f5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_routes_response.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the RoutesResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RoutesResponse{} - -// RoutesResponse A collection of available and unavailable routes -type RoutesResponse struct { - // A collection of route objects - Routes []GetRoutes200ResponseRoutesInner `json:"routes"` -} - -// NewRoutesResponse instantiates a new RoutesResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRoutesResponse(routes []GetRoutes200ResponseRoutesInner) *RoutesResponse { - this := RoutesResponse{} - this.Routes = routes - return &this -} - -// NewRoutesResponseWithDefaults instantiates a new RoutesResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRoutesResponseWithDefaults() *RoutesResponse { - this := RoutesResponse{} - return &this -} - -// GetRoutes returns the Routes field value -func (o *RoutesResponse) GetRoutes() []GetRoutes200ResponseRoutesInner { - if o == nil { - var ret []GetRoutes200ResponseRoutesInner - return ret - } - - return o.Routes -} - -// GetRoutesOk returns a tuple with the Routes field value -// and a boolean to check if the value has been set. -func (o *RoutesResponse) GetRoutesOk() ([]GetRoutes200ResponseRoutesInner, bool) { - if o == nil { - return nil, false - } - return o.Routes, true -} - -// SetRoutes sets field value -func (o *RoutesResponse) SetRoutes(v []GetRoutes200ResponseRoutesInner) { - o.Routes = v -} - -func (o RoutesResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RoutesResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["routes"] = o.Routes - return toSerialize, nil -} - -type NullableRoutesResponse struct { - value *RoutesResponse - isSet bool -} - -func (v NullableRoutesResponse) Get() *RoutesResponse { - return v.value -} - -func (v *NullableRoutesResponse) Set(val *RoutesResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRoutesResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRoutesResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRoutesResponse(val *RoutesResponse) *NullableRoutesResponse { - return &NullableRoutesResponse{value: val, isSet: true} -} - -func (v NullableRoutesResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRoutesResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_request.go deleted file mode 100644 index 4656d4e051..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the StatusRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StatusRequest{} - -// StatusRequest Request for retrieving the current status of a session, identified by the session ID. -type StatusRequest struct { - // The ID of the session for which the status is being requested. - SessionID string `json:"sessionID"` -} - -// NewStatusRequest instantiates a new StatusRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStatusRequest(sessionID string) *StatusRequest { - this := StatusRequest{} - this.SessionID = sessionID - return &this -} - -// NewStatusRequestWithDefaults instantiates a new StatusRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStatusRequestWithDefaults() *StatusRequest { - this := StatusRequest{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *StatusRequest) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *StatusRequest) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *StatusRequest) SetSessionID(v string) { - o.SessionID = v -} - -func (o StatusRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StatusRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - return toSerialize, nil -} - -type NullableStatusRequest struct { - value *StatusRequest - isSet bool -} - -func (v NullableStatusRequest) Get() *StatusRequest { - return v.value -} - -func (v *NullableStatusRequest) Set(val *StatusRequest) { - v.value = val - v.isSet = true -} - -func (v NullableStatusRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableStatusRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatusRequest(val *StatusRequest) *NullableStatusRequest { - return &NullableStatusRequest{value: val, isSet: true} -} - -func (v NullableStatusRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatusRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_response.go deleted file mode 100644 index 11a0778d86..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_status_response.go +++ /dev/null @@ -1,280 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "time" -) - -// checks if the StatusResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StatusResponse{} - -// StatusResponse Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. -type StatusResponse struct { - Status string `json:"status"` - Substatus string `json:"substatus"` - Stage string `json:"stage"` - Step string `json:"step"` - StartTime time.Time `json:"startTime"` - OriginChain Transact200ResponseStatusResponseOriginChain `json:"originChain"` - DestinationChain Transact200ResponseStatusResponseDestinationChain `json:"destinationChain"` -} - -// NewStatusResponse instantiates a new StatusResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain) *StatusResponse { - this := StatusResponse{} - this.Status = status - this.Substatus = substatus - this.Stage = stage - this.Step = step - this.StartTime = startTime - this.OriginChain = originChain - this.DestinationChain = destinationChain - return &this -} - -// NewStatusResponseWithDefaults instantiates a new StatusResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStatusResponseWithDefaults() *StatusResponse { - this := StatusResponse{} - return &this -} - -// GetStatus returns the Status field value -func (o *StatusResponse) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *StatusResponse) SetStatus(v string) { - o.Status = v -} - -// GetSubstatus returns the Substatus field value -func (o *StatusResponse) GetSubstatus() string { - if o == nil { - var ret string - return ret - } - - return o.Substatus -} - -// GetSubstatusOk returns a tuple with the Substatus field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetSubstatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Substatus, true -} - -// SetSubstatus sets field value -func (o *StatusResponse) SetSubstatus(v string) { - o.Substatus = v -} - -// GetStage returns the Stage field value -func (o *StatusResponse) GetStage() string { - if o == nil { - var ret string - return ret - } - - return o.Stage -} - -// GetStageOk returns a tuple with the Stage field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetStageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Stage, true -} - -// SetStage sets field value -func (o *StatusResponse) SetStage(v string) { - o.Stage = v -} - -// GetStep returns the Step field value -func (o *StatusResponse) GetStep() string { - if o == nil { - var ret string - return ret - } - - return o.Step -} - -// GetStepOk returns a tuple with the Step field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetStepOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Step, true -} - -// SetStep sets field value -func (o *StatusResponse) SetStep(v string) { - o.Step = v -} - -// GetStartTime returns the StartTime field value -func (o *StatusResponse) GetStartTime() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.StartTime -} - -// GetStartTimeOk returns a tuple with the StartTime field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetStartTimeOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.StartTime, true -} - -// SetStartTime sets field value -func (o *StatusResponse) SetStartTime(v time.Time) { - o.StartTime = v -} - -// GetOriginChain returns the OriginChain field value -func (o *StatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain { - if o == nil { - var ret Transact200ResponseStatusResponseOriginChain - return ret - } - - return o.OriginChain -} - -// GetOriginChainOk returns a tuple with the OriginChain field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool) { - if o == nil { - return nil, false - } - return &o.OriginChain, true -} - -// SetOriginChain sets field value -func (o *StatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain) { - o.OriginChain = v -} - -// GetDestinationChain returns the DestinationChain field value -func (o *StatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain { - if o == nil { - var ret Transact200ResponseStatusResponseDestinationChain - return ret - } - - return o.DestinationChain -} - -// GetDestinationChainOk returns a tuple with the DestinationChain field value -// and a boolean to check if the value has been set. -func (o *StatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool) { - if o == nil { - return nil, false - } - return &o.DestinationChain, true -} - -// SetDestinationChain sets field value -func (o *StatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain) { - o.DestinationChain = v -} - -func (o StatusResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StatusResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["substatus"] = o.Substatus - toSerialize["stage"] = o.Stage - toSerialize["step"] = o.Step - toSerialize["startTime"] = o.StartTime - toSerialize["originChain"] = o.OriginChain - toSerialize["destinationChain"] = o.DestinationChain - return toSerialize, nil -} - -type NullableStatusResponse struct { - value *StatusResponse - isSet bool -} - -func (v NullableStatusResponse) Get() *StatusResponse { - return v.value -} - -func (v *NullableStatusResponse) Set(val *StatusResponse) { - v.value = val - v.isSet = true -} - -func (v NullableStatusResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableStatusResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatusResponse(val *StatusResponse) *NullableStatusResponse { - return &NullableStatusResponse{value: val, isSet: true} -} - -func (v NullableStatusResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatusResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_token.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_token.go deleted file mode 100644 index 869f7c6801..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_token.go +++ /dev/null @@ -1,414 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Token type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Token{} - -// Token Metadata detailing a supported token -type Token struct { - // The network of the DLT being interacted with. TODO: implement network identification draft - ChainID string `json:"chainID"` - // Supported DLT protocols. - ChainType string `json:"chainType"` - // A blockchain address. - Address string `json:"address"` - // The name of the token. - Name *string `json:"name,omitempty"` - // The symbol of the token. - Symbol string `json:"symbol"` - // How many decimals the token supports. - Decimals int32 `json:"decimals"` - // The logo of a token, chain, dex etc. - LogoURI *string `json:"logoURI,omitempty"` - // List of tags identifiers providing additional context or categorization. - Tags []string `json:"tags,omitempty"` - // The current price of the token in USD. - PriceUSD *string `json:"priceUSD,omitempty"` - Extensions *GetRoutes200ResponseRoutesInnerFromTokenExtensions `json:"extensions,omitempty"` -} - -// NewToken instantiates a new Token object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewToken(chainID string, chainType string, address string, symbol string, decimals int32) *Token { - this := Token{} - this.ChainID = chainID - this.ChainType = chainType - this.Address = address - this.Symbol = symbol - this.Decimals = decimals - return &this -} - -// NewTokenWithDefaults instantiates a new Token object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTokenWithDefaults() *Token { - this := Token{} - return &this -} - -// GetChainID returns the ChainID field value -func (o *Token) GetChainID() string { - if o == nil { - var ret string - return ret - } - - return o.ChainID -} - -// GetChainIDOk returns a tuple with the ChainID field value -// and a boolean to check if the value has been set. -func (o *Token) GetChainIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainID, true -} - -// SetChainID sets field value -func (o *Token) SetChainID(v string) { - o.ChainID = v -} - -// GetChainType returns the ChainType field value -func (o *Token) GetChainType() string { - if o == nil { - var ret string - return ret - } - - return o.ChainType -} - -// GetChainTypeOk returns a tuple with the ChainType field value -// and a boolean to check if the value has been set. -func (o *Token) GetChainTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ChainType, true -} - -// SetChainType sets field value -func (o *Token) SetChainType(v string) { - o.ChainType = v -} - -// GetAddress returns the Address field value -func (o *Token) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *Token) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *Token) SetAddress(v string) { - o.Address = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Token) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Token) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Token) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Token) SetName(v string) { - o.Name = &v -} - -// GetSymbol returns the Symbol field value -func (o *Token) GetSymbol() string { - if o == nil { - var ret string - return ret - } - - return o.Symbol -} - -// GetSymbolOk returns a tuple with the Symbol field value -// and a boolean to check if the value has been set. -func (o *Token) GetSymbolOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Symbol, true -} - -// SetSymbol sets field value -func (o *Token) SetSymbol(v string) { - o.Symbol = v -} - -// GetDecimals returns the Decimals field value -func (o *Token) GetDecimals() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Decimals -} - -// GetDecimalsOk returns a tuple with the Decimals field value -// and a boolean to check if the value has been set. -func (o *Token) GetDecimalsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Decimals, true -} - -// SetDecimals sets field value -func (o *Token) SetDecimals(v int32) { - o.Decimals = v -} - -// GetLogoURI returns the LogoURI field value if set, zero value otherwise. -func (o *Token) GetLogoURI() string { - if o == nil || IsNil(o.LogoURI) { - var ret string - return ret - } - return *o.LogoURI -} - -// GetLogoURIOk returns a tuple with the LogoURI field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Token) GetLogoURIOk() (*string, bool) { - if o == nil || IsNil(o.LogoURI) { - return nil, false - } - return o.LogoURI, true -} - -// HasLogoURI returns a boolean if a field has been set. -func (o *Token) HasLogoURI() bool { - if o != nil && !IsNil(o.LogoURI) { - return true - } - - return false -} - -// SetLogoURI gets a reference to the given string and assigns it to the LogoURI field. -func (o *Token) SetLogoURI(v string) { - o.LogoURI = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *Token) GetTags() []string { - if o == nil || IsNil(o.Tags) { - var ret []string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Token) GetTagsOk() ([]string, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *Token) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given []string and assigns it to the Tags field. -func (o *Token) SetTags(v []string) { - o.Tags = v -} - -// GetPriceUSD returns the PriceUSD field value if set, zero value otherwise. -func (o *Token) GetPriceUSD() string { - if o == nil || IsNil(o.PriceUSD) { - var ret string - return ret - } - return *o.PriceUSD -} - -// GetPriceUSDOk returns a tuple with the PriceUSD field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Token) GetPriceUSDOk() (*string, bool) { - if o == nil || IsNil(o.PriceUSD) { - return nil, false - } - return o.PriceUSD, true -} - -// HasPriceUSD returns a boolean if a field has been set. -func (o *Token) HasPriceUSD() bool { - if o != nil && !IsNil(o.PriceUSD) { - return true - } - - return false -} - -// SetPriceUSD gets a reference to the given string and assigns it to the PriceUSD field. -func (o *Token) SetPriceUSD(v string) { - o.PriceUSD = &v -} - -// GetExtensions returns the Extensions field value if set, zero value otherwise. -func (o *Token) GetExtensions() GetRoutes200ResponseRoutesInnerFromTokenExtensions { - if o == nil || IsNil(o.Extensions) { - var ret GetRoutes200ResponseRoutesInnerFromTokenExtensions - return ret - } - return *o.Extensions -} - -// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Token) GetExtensionsOk() (*GetRoutes200ResponseRoutesInnerFromTokenExtensions, bool) { - if o == nil || IsNil(o.Extensions) { - return nil, false - } - return o.Extensions, true -} - -// HasExtensions returns a boolean if a field has been set. -func (o *Token) HasExtensions() bool { - if o != nil && !IsNil(o.Extensions) { - return true - } - - return false -} - -// SetExtensions gets a reference to the given GetRoutes200ResponseRoutesInnerFromTokenExtensions and assigns it to the Extensions field. -func (o *Token) SetExtensions(v GetRoutes200ResponseRoutesInnerFromTokenExtensions) { - o.Extensions = &v -} - -func (o Token) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Token) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["chainID"] = o.ChainID - toSerialize["chainType"] = o.ChainType - toSerialize["address"] = o.Address - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - toSerialize["symbol"] = o.Symbol - toSerialize["decimals"] = o.Decimals - if !IsNil(o.LogoURI) { - toSerialize["logoURI"] = o.LogoURI - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - if !IsNil(o.PriceUSD) { - toSerialize["priceUSD"] = o.PriceUSD - } - if !IsNil(o.Extensions) { - toSerialize["extensions"] = o.Extensions - } - return toSerialize, nil -} - -type NullableToken struct { - value *Token - isSet bool -} - -func (v NullableToken) Get() *Token { - return v.value -} - -func (v *NullableToken) Set(val *Token) { - v.value = val - v.isSet = true -} - -func (v NullableToken) IsSet() bool { - return v.isSet -} - -func (v *NullableToken) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableToken(val *Token) *NullableToken { - return &NullableToken{value: val, isSet: true} -} - -func (v NullableToken) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableToken) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response.go deleted file mode 100644 index 271862f4cb..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Transact200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Transact200Response{} - -// Transact200Response Response schema for a transaction request. Includes the session ID and the current status of the transaction. -type Transact200Response struct { - // Unique identifier (UUID) for the session. - SessionID string `json:"sessionID"` - StatusResponse Transact200ResponseStatusResponse `json:"statusResponse"` -} - -// NewTransact200Response instantiates a new Transact200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransact200Response(sessionID string, statusResponse Transact200ResponseStatusResponse) *Transact200Response { - this := Transact200Response{} - this.SessionID = sessionID - this.StatusResponse = statusResponse - return &this -} - -// NewTransact200ResponseWithDefaults instantiates a new Transact200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransact200ResponseWithDefaults() *Transact200Response { - this := Transact200Response{} - return &this -} - -// GetSessionID returns the SessionID field value -func (o *Transact200Response) GetSessionID() string { - if o == nil { - var ret string - return ret - } - - return o.SessionID -} - -// GetSessionIDOk returns a tuple with the SessionID field value -// and a boolean to check if the value has been set. -func (o *Transact200Response) GetSessionIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SessionID, true -} - -// SetSessionID sets field value -func (o *Transact200Response) SetSessionID(v string) { - o.SessionID = v -} - -// GetStatusResponse returns the StatusResponse field value -func (o *Transact200Response) GetStatusResponse() Transact200ResponseStatusResponse { - if o == nil { - var ret Transact200ResponseStatusResponse - return ret - } - - return o.StatusResponse -} - -// GetStatusResponseOk returns a tuple with the StatusResponse field value -// and a boolean to check if the value has been set. -func (o *Transact200Response) GetStatusResponseOk() (*Transact200ResponseStatusResponse, bool) { - if o == nil { - return nil, false - } - return &o.StatusResponse, true -} - -// SetStatusResponse sets field value -func (o *Transact200Response) SetStatusResponse(v Transact200ResponseStatusResponse) { - o.StatusResponse = v -} - -func (o Transact200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Transact200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["sessionID"] = o.SessionID - toSerialize["statusResponse"] = o.StatusResponse - return toSerialize, nil -} - -type NullableTransact200Response struct { - value *Transact200Response - isSet bool -} - -func (v NullableTransact200Response) Get() *Transact200Response { - return v.value -} - -func (v *NullableTransact200Response) Set(val *Transact200Response) { - v.value = val - v.isSet = true -} - -func (v NullableTransact200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableTransact200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransact200Response(val *Transact200Response) *NullableTransact200Response { - return &NullableTransact200Response{value: val, isSet: true} -} - -func (v NullableTransact200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransact200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response.go deleted file mode 100644 index 1c14b4a36e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response.go +++ /dev/null @@ -1,280 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "time" -) - -// checks if the Transact200ResponseStatusResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Transact200ResponseStatusResponse{} - -// Transact200ResponseStatusResponse Provides the current status of the SATP session including detailed information on the progress, such as substatus, stage, and step, along with the session start time and chain information. -type Transact200ResponseStatusResponse struct { - Status string `json:"status"` - Substatus string `json:"substatus"` - Stage string `json:"stage"` - Step string `json:"step"` - StartTime time.Time `json:"startTime"` - OriginChain Transact200ResponseStatusResponseOriginChain `json:"originChain"` - DestinationChain Transact200ResponseStatusResponseDestinationChain `json:"destinationChain"` -} - -// NewTransact200ResponseStatusResponse instantiates a new Transact200ResponseStatusResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransact200ResponseStatusResponse(status string, substatus string, stage string, step string, startTime time.Time, originChain Transact200ResponseStatusResponseOriginChain, destinationChain Transact200ResponseStatusResponseDestinationChain) *Transact200ResponseStatusResponse { - this := Transact200ResponseStatusResponse{} - this.Status = status - this.Substatus = substatus - this.Stage = stage - this.Step = step - this.StartTime = startTime - this.OriginChain = originChain - this.DestinationChain = destinationChain - return &this -} - -// NewTransact200ResponseStatusResponseWithDefaults instantiates a new Transact200ResponseStatusResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransact200ResponseStatusResponseWithDefaults() *Transact200ResponseStatusResponse { - this := Transact200ResponseStatusResponse{} - return &this -} - -// GetStatus returns the Status field value -func (o *Transact200ResponseStatusResponse) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *Transact200ResponseStatusResponse) SetStatus(v string) { - o.Status = v -} - -// GetSubstatus returns the Substatus field value -func (o *Transact200ResponseStatusResponse) GetSubstatus() string { - if o == nil { - var ret string - return ret - } - - return o.Substatus -} - -// GetSubstatusOk returns a tuple with the Substatus field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetSubstatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Substatus, true -} - -// SetSubstatus sets field value -func (o *Transact200ResponseStatusResponse) SetSubstatus(v string) { - o.Substatus = v -} - -// GetStage returns the Stage field value -func (o *Transact200ResponseStatusResponse) GetStage() string { - if o == nil { - var ret string - return ret - } - - return o.Stage -} - -// GetStageOk returns a tuple with the Stage field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetStageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Stage, true -} - -// SetStage sets field value -func (o *Transact200ResponseStatusResponse) SetStage(v string) { - o.Stage = v -} - -// GetStep returns the Step field value -func (o *Transact200ResponseStatusResponse) GetStep() string { - if o == nil { - var ret string - return ret - } - - return o.Step -} - -// GetStepOk returns a tuple with the Step field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetStepOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Step, true -} - -// SetStep sets field value -func (o *Transact200ResponseStatusResponse) SetStep(v string) { - o.Step = v -} - -// GetStartTime returns the StartTime field value -func (o *Transact200ResponseStatusResponse) GetStartTime() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.StartTime -} - -// GetStartTimeOk returns a tuple with the StartTime field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetStartTimeOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.StartTime, true -} - -// SetStartTime sets field value -func (o *Transact200ResponseStatusResponse) SetStartTime(v time.Time) { - o.StartTime = v -} - -// GetOriginChain returns the OriginChain field value -func (o *Transact200ResponseStatusResponse) GetOriginChain() Transact200ResponseStatusResponseOriginChain { - if o == nil { - var ret Transact200ResponseStatusResponseOriginChain - return ret - } - - return o.OriginChain -} - -// GetOriginChainOk returns a tuple with the OriginChain field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetOriginChainOk() (*Transact200ResponseStatusResponseOriginChain, bool) { - if o == nil { - return nil, false - } - return &o.OriginChain, true -} - -// SetOriginChain sets field value -func (o *Transact200ResponseStatusResponse) SetOriginChain(v Transact200ResponseStatusResponseOriginChain) { - o.OriginChain = v -} - -// GetDestinationChain returns the DestinationChain field value -func (o *Transact200ResponseStatusResponse) GetDestinationChain() Transact200ResponseStatusResponseDestinationChain { - if o == nil { - var ret Transact200ResponseStatusResponseDestinationChain - return ret - } - - return o.DestinationChain -} - -// GetDestinationChainOk returns a tuple with the DestinationChain field value -// and a boolean to check if the value has been set. -func (o *Transact200ResponseStatusResponse) GetDestinationChainOk() (*Transact200ResponseStatusResponseDestinationChain, bool) { - if o == nil { - return nil, false - } - return &o.DestinationChain, true -} - -// SetDestinationChain sets field value -func (o *Transact200ResponseStatusResponse) SetDestinationChain(v Transact200ResponseStatusResponseDestinationChain) { - o.DestinationChain = v -} - -func (o Transact200ResponseStatusResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Transact200ResponseStatusResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["status"] = o.Status - toSerialize["substatus"] = o.Substatus - toSerialize["stage"] = o.Stage - toSerialize["step"] = o.Step - toSerialize["startTime"] = o.StartTime - toSerialize["originChain"] = o.OriginChain - toSerialize["destinationChain"] = o.DestinationChain - return toSerialize, nil -} - -type NullableTransact200ResponseStatusResponse struct { - value *Transact200ResponseStatusResponse - isSet bool -} - -func (v NullableTransact200ResponseStatusResponse) Get() *Transact200ResponseStatusResponse { - return v.value -} - -func (v *NullableTransact200ResponseStatusResponse) Set(val *Transact200ResponseStatusResponse) { - v.value = val - v.isSet = true -} - -func (v NullableTransact200ResponseStatusResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableTransact200ResponseStatusResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransact200ResponseStatusResponse(val *Transact200ResponseStatusResponse) *NullableTransact200ResponseStatusResponse { - return &NullableTransact200ResponseStatusResponse{value: val, isSet: true} -} - -func (v NullableTransact200ResponseStatusResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransact200ResponseStatusResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_destination_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_destination_chain.go deleted file mode 100644 index 44c5b50c76..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_destination_chain.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Transact200ResponseStatusResponseDestinationChain type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Transact200ResponseStatusResponseDestinationChain{} - -// Transact200ResponseStatusResponseDestinationChain struct for Transact200ResponseStatusResponseDestinationChain -type Transact200ResponseStatusResponseDestinationChain struct { - DltProtocol interface{} `json:"dltProtocol,omitempty"` - DltSubnetworkID interface{} `json:"dltSubnetworkID,omitempty"` -} - -// NewTransact200ResponseStatusResponseDestinationChain instantiates a new Transact200ResponseStatusResponseDestinationChain object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransact200ResponseStatusResponseDestinationChain() *Transact200ResponseStatusResponseDestinationChain { - this := Transact200ResponseStatusResponseDestinationChain{} - return &this -} - -// NewTransact200ResponseStatusResponseDestinationChainWithDefaults instantiates a new Transact200ResponseStatusResponseDestinationChain object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransact200ResponseStatusResponseDestinationChainWithDefaults() *Transact200ResponseStatusResponseDestinationChain { - this := Transact200ResponseStatusResponseDestinationChain{} - return &this -} - -// GetDltProtocol returns the DltProtocol field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocol() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.DltProtocol -} - -// GetDltProtocolOk returns a tuple with the DltProtocol field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Transact200ResponseStatusResponseDestinationChain) GetDltProtocolOk() (*interface{}, bool) { - if o == nil || IsNil(o.DltProtocol) { - return nil, false - } - return &o.DltProtocol, true -} - -// HasDltProtocol returns a boolean if a field has been set. -func (o *Transact200ResponseStatusResponseDestinationChain) HasDltProtocol() bool { - if o != nil && IsNil(o.DltProtocol) { - return true - } - - return false -} - -// SetDltProtocol gets a reference to the given interface{} and assigns it to the DltProtocol field. -func (o *Transact200ResponseStatusResponseDestinationChain) SetDltProtocol(v interface{}) { - o.DltProtocol = v -} - -// GetDltSubnetworkID returns the DltSubnetworkID field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkID() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.DltSubnetworkID -} - -// GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Transact200ResponseStatusResponseDestinationChain) GetDltSubnetworkIDOk() (*interface{}, bool) { - if o == nil || IsNil(o.DltSubnetworkID) { - return nil, false - } - return &o.DltSubnetworkID, true -} - -// HasDltSubnetworkID returns a boolean if a field has been set. -func (o *Transact200ResponseStatusResponseDestinationChain) HasDltSubnetworkID() bool { - if o != nil && IsNil(o.DltSubnetworkID) { - return true - } - - return false -} - -// SetDltSubnetworkID gets a reference to the given interface{} and assigns it to the DltSubnetworkID field. -func (o *Transact200ResponseStatusResponseDestinationChain) SetDltSubnetworkID(v interface{}) { - o.DltSubnetworkID = v -} - -func (o Transact200ResponseStatusResponseDestinationChain) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Transact200ResponseStatusResponseDestinationChain) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.DltProtocol != nil { - toSerialize["dltProtocol"] = o.DltProtocol - } - if o.DltSubnetworkID != nil { - toSerialize["dltSubnetworkID"] = o.DltSubnetworkID - } - return toSerialize, nil -} - -type NullableTransact200ResponseStatusResponseDestinationChain struct { - value *Transact200ResponseStatusResponseDestinationChain - isSet bool -} - -func (v NullableTransact200ResponseStatusResponseDestinationChain) Get() *Transact200ResponseStatusResponseDestinationChain { - return v.value -} - -func (v *NullableTransact200ResponseStatusResponseDestinationChain) Set(val *Transact200ResponseStatusResponseDestinationChain) { - v.value = val - v.isSet = true -} - -func (v NullableTransact200ResponseStatusResponseDestinationChain) IsSet() bool { - return v.isSet -} - -func (v *NullableTransact200ResponseStatusResponseDestinationChain) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransact200ResponseStatusResponseDestinationChain(val *Transact200ResponseStatusResponseDestinationChain) *NullableTransact200ResponseStatusResponseDestinationChain { - return &NullableTransact200ResponseStatusResponseDestinationChain{value: val, isSet: true} -} - -func (v NullableTransact200ResponseStatusResponseDestinationChain) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransact200ResponseStatusResponseDestinationChain) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_origin_chain.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_origin_chain.go deleted file mode 100644 index c3429547bf..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_200_response_status_response_origin_chain.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the Transact200ResponseStatusResponseOriginChain type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Transact200ResponseStatusResponseOriginChain{} - -// Transact200ResponseStatusResponseOriginChain struct for Transact200ResponseStatusResponseOriginChain -type Transact200ResponseStatusResponseOriginChain struct { - DltProtocol interface{} `json:"dltProtocol,omitempty"` - DltSubnetworkID interface{} `json:"dltSubnetworkID,omitempty"` -} - -// NewTransact200ResponseStatusResponseOriginChain instantiates a new Transact200ResponseStatusResponseOriginChain object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransact200ResponseStatusResponseOriginChain() *Transact200ResponseStatusResponseOriginChain { - this := Transact200ResponseStatusResponseOriginChain{} - return &this -} - -// NewTransact200ResponseStatusResponseOriginChainWithDefaults instantiates a new Transact200ResponseStatusResponseOriginChain object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransact200ResponseStatusResponseOriginChainWithDefaults() *Transact200ResponseStatusResponseOriginChain { - this := Transact200ResponseStatusResponseOriginChain{} - return &this -} - -// GetDltProtocol returns the DltProtocol field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocol() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.DltProtocol -} - -// GetDltProtocolOk returns a tuple with the DltProtocol field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Transact200ResponseStatusResponseOriginChain) GetDltProtocolOk() (*interface{}, bool) { - if o == nil || IsNil(o.DltProtocol) { - return nil, false - } - return &o.DltProtocol, true -} - -// HasDltProtocol returns a boolean if a field has been set. -func (o *Transact200ResponseStatusResponseOriginChain) HasDltProtocol() bool { - if o != nil && IsNil(o.DltProtocol) { - return true - } - - return false -} - -// SetDltProtocol gets a reference to the given interface{} and assigns it to the DltProtocol field. -func (o *Transact200ResponseStatusResponseOriginChain) SetDltProtocol(v interface{}) { - o.DltProtocol = v -} - -// GetDltSubnetworkID returns the DltSubnetworkID field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkID() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.DltSubnetworkID -} - -// GetDltSubnetworkIDOk returns a tuple with the DltSubnetworkID field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Transact200ResponseStatusResponseOriginChain) GetDltSubnetworkIDOk() (*interface{}, bool) { - if o == nil || IsNil(o.DltSubnetworkID) { - return nil, false - } - return &o.DltSubnetworkID, true -} - -// HasDltSubnetworkID returns a boolean if a field has been set. -func (o *Transact200ResponseStatusResponseOriginChain) HasDltSubnetworkID() bool { - if o != nil && IsNil(o.DltSubnetworkID) { - return true - } - - return false -} - -// SetDltSubnetworkID gets a reference to the given interface{} and assigns it to the DltSubnetworkID field. -func (o *Transact200ResponseStatusResponseOriginChain) SetDltSubnetworkID(v interface{}) { - o.DltSubnetworkID = v -} - -func (o Transact200ResponseStatusResponseOriginChain) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Transact200ResponseStatusResponseOriginChain) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.DltProtocol != nil { - toSerialize["dltProtocol"] = o.DltProtocol - } - if o.DltSubnetworkID != nil { - toSerialize["dltSubnetworkID"] = o.DltSubnetworkID - } - return toSerialize, nil -} - -type NullableTransact200ResponseStatusResponseOriginChain struct { - value *Transact200ResponseStatusResponseOriginChain - isSet bool -} - -func (v NullableTransact200ResponseStatusResponseOriginChain) Get() *Transact200ResponseStatusResponseOriginChain { - return v.value -} - -func (v *NullableTransact200ResponseStatusResponseOriginChain) Set(val *Transact200ResponseStatusResponseOriginChain) { - v.value = val - v.isSet = true -} - -func (v NullableTransact200ResponseStatusResponseOriginChain) IsSet() bool { - return v.isSet -} - -func (v *NullableTransact200ResponseStatusResponseOriginChain) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransact200ResponseStatusResponseOriginChain(val *Transact200ResponseStatusResponseOriginChain) *NullableTransact200ResponseStatusResponseOriginChain { - return &NullableTransact200ResponseStatusResponseOriginChain{value: val, isSet: true} -} - -func (v NullableTransact200ResponseStatusResponseOriginChain) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransact200ResponseStatusResponseOriginChain) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_default_response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_default_response.go deleted file mode 100644 index 12d02cf2f1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_default_response.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the TransactDefaultResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactDefaultResponse{} - -// TransactDefaultResponse An Error -type TransactDefaultResponse struct { - // HTTP error type - Type string `json:"type"` - // Numeric error code - Code int32 `json:"code"` - // HTTP status of the error - Status int32 `json:"status"` - // Long error description - Message string `json:"message"` - // Timestamp of the error - Timestamp string `json:"timestamp"` -} - -// NewTransactDefaultResponse instantiates a new TransactDefaultResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactDefaultResponse(type_ string, code int32, status int32, message string, timestamp string) *TransactDefaultResponse { - this := TransactDefaultResponse{} - this.Type = type_ - this.Code = code - this.Status = status - this.Message = message - this.Timestamp = timestamp - return &this -} - -// NewTransactDefaultResponseWithDefaults instantiates a new TransactDefaultResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactDefaultResponseWithDefaults() *TransactDefaultResponse { - this := TransactDefaultResponse{} - return &this -} - -// GetType returns the Type field value -func (o *TransactDefaultResponse) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *TransactDefaultResponse) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *TransactDefaultResponse) SetType(v string) { - o.Type = v -} - -// GetCode returns the Code field value -func (o *TransactDefaultResponse) GetCode() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *TransactDefaultResponse) GetCodeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Code, true -} - -// SetCode sets field value -func (o *TransactDefaultResponse) SetCode(v int32) { - o.Code = v -} - -// GetStatus returns the Status field value -func (o *TransactDefaultResponse) GetStatus() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *TransactDefaultResponse) GetStatusOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *TransactDefaultResponse) SetStatus(v int32) { - o.Status = v -} - -// GetMessage returns the Message field value -func (o *TransactDefaultResponse) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *TransactDefaultResponse) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *TransactDefaultResponse) SetMessage(v string) { - o.Message = v -} - -// GetTimestamp returns the Timestamp field value -func (o *TransactDefaultResponse) GetTimestamp() string { - if o == nil { - var ret string - return ret - } - - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -func (o *TransactDefaultResponse) GetTimestampOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Timestamp, true -} - -// SetTimestamp sets field value -func (o *TransactDefaultResponse) SetTimestamp(v string) { - o.Timestamp = v -} - -func (o TransactDefaultResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactDefaultResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["type"] = o.Type - toSerialize["code"] = o.Code - toSerialize["status"] = o.Status - toSerialize["message"] = o.Message - toSerialize["timestamp"] = o.Timestamp - return toSerialize, nil -} - -type NullableTransactDefaultResponse struct { - value *TransactDefaultResponse - isSet bool -} - -func (v NullableTransactDefaultResponse) Get() *TransactDefaultResponse { - return v.value -} - -func (v *NullableTransactDefaultResponse) Set(val *TransactDefaultResponse) { - v.value = val - v.isSet = true -} - -func (v NullableTransactDefaultResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactDefaultResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactDefaultResponse(val *TransactDefaultResponse) *NullableTransactDefaultResponse { - return &NullableTransactDefaultResponse{value: val, isSet: true} -} - -func (v NullableTransactDefaultResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactDefaultResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go deleted file mode 100644 index d596bae7e0..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the TransactRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactRequest{} - -// TransactRequest Request schema for initiating a transaction. Includes details such as the transaction context, mode (data or transfer), payload, and information about the source and destination DLT networks. -type TransactRequest struct { - ContextID string `json:"contextID"` - Payload *string `json:"payload,omitempty"` - FromDLTNetworkID string `json:"fromDLTNetworkID"` - ToDLTNetworkID string `json:"toDLTNetworkID"` - FromAmount string `json:"fromAmount"` - ToAmount string `json:"toAmount"` - BeneficiaryPubkey string `json:"beneficiaryPubkey"` - OriginatorPubkey string `json:"originatorPubkey"` - SourceAsset TransactRequestSourceAsset `json:"sourceAsset"` - DestinyAsset TransactRequestSourceAsset `json:"destinyAsset"` -} - -// NewTransactRequest instantiates a new TransactRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactRequest(contextID string, fromDLTNetworkID string, toDLTNetworkID string, fromAmount string, toAmount string, beneficiaryPubkey string, originatorPubkey string, sourceAsset TransactRequestSourceAsset, destinyAsset TransactRequestSourceAsset) *TransactRequest { - this := TransactRequest{} - this.ContextID = contextID - this.FromDLTNetworkID = fromDLTNetworkID - this.ToDLTNetworkID = toDLTNetworkID - this.FromAmount = fromAmount - this.ToAmount = toAmount - this.BeneficiaryPubkey = beneficiaryPubkey - this.OriginatorPubkey = originatorPubkey - this.SourceAsset = sourceAsset - this.DestinyAsset = destinyAsset - return &this -} - -// NewTransactRequestWithDefaults instantiates a new TransactRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactRequestWithDefaults() *TransactRequest { - this := TransactRequest{} - return &this -} - -// GetContextID returns the ContextID field value -func (o *TransactRequest) GetContextID() string { - if o == nil { - var ret string - return ret - } - - return o.ContextID -} - -// GetContextIDOk returns a tuple with the ContextID field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetContextIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContextID, true -} - -// SetContextID sets field value -func (o *TransactRequest) SetContextID(v string) { - o.ContextID = v -} - -// GetPayload returns the Payload field value if set, zero value otherwise. -func (o *TransactRequest) GetPayload() string { - if o == nil || IsNil(o.Payload) { - var ret string - return ret - } - return *o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetPayloadOk() (*string, bool) { - if o == nil || IsNil(o.Payload) { - return nil, false - } - return o.Payload, true -} - -// HasPayload returns a boolean if a field has been set. -func (o *TransactRequest) HasPayload() bool { - if o != nil && !IsNil(o.Payload) { - return true - } - - return false -} - -// SetPayload gets a reference to the given string and assigns it to the Payload field. -func (o *TransactRequest) SetPayload(v string) { - o.Payload = &v -} - -// GetFromDLTNetworkID returns the FromDLTNetworkID field value -func (o *TransactRequest) GetFromDLTNetworkID() string { - if o == nil { - var ret string - return ret - } - - return o.FromDLTNetworkID -} - -// GetFromDLTNetworkIDOk returns a tuple with the FromDLTNetworkID field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetFromDLTNetworkIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FromDLTNetworkID, true -} - -// SetFromDLTNetworkID sets field value -func (o *TransactRequest) SetFromDLTNetworkID(v string) { - o.FromDLTNetworkID = v -} - -// GetToDLTNetworkID returns the ToDLTNetworkID field value -func (o *TransactRequest) GetToDLTNetworkID() string { - if o == nil { - var ret string - return ret - } - - return o.ToDLTNetworkID -} - -// GetToDLTNetworkIDOk returns a tuple with the ToDLTNetworkID field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetToDLTNetworkIDOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ToDLTNetworkID, true -} - -// SetToDLTNetworkID sets field value -func (o *TransactRequest) SetToDLTNetworkID(v string) { - o.ToDLTNetworkID = v -} - -// GetFromAmount returns the FromAmount field value -func (o *TransactRequest) GetFromAmount() string { - if o == nil { - var ret string - return ret - } - - return o.FromAmount -} - -// GetFromAmountOk returns a tuple with the FromAmount field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetFromAmountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FromAmount, true -} - -// SetFromAmount sets field value -func (o *TransactRequest) SetFromAmount(v string) { - o.FromAmount = v -} - -// GetToAmount returns the ToAmount field value -func (o *TransactRequest) GetToAmount() string { - if o == nil { - var ret string - return ret - } - - return o.ToAmount -} - -// GetToAmountOk returns a tuple with the ToAmount field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetToAmountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ToAmount, true -} - -// SetToAmount sets field value -func (o *TransactRequest) SetToAmount(v string) { - o.ToAmount = v -} - -// GetBeneficiaryPubkey returns the BeneficiaryPubkey field value -func (o *TransactRequest) GetBeneficiaryPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.BeneficiaryPubkey -} - -// GetBeneficiaryPubkeyOk returns a tuple with the BeneficiaryPubkey field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetBeneficiaryPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BeneficiaryPubkey, true -} - -// SetBeneficiaryPubkey sets field value -func (o *TransactRequest) SetBeneficiaryPubkey(v string) { - o.BeneficiaryPubkey = v -} - -// GetOriginatorPubkey returns the OriginatorPubkey field value -func (o *TransactRequest) GetOriginatorPubkey() string { - if o == nil { - var ret string - return ret - } - - return o.OriginatorPubkey -} - -// GetOriginatorPubkeyOk returns a tuple with the OriginatorPubkey field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetOriginatorPubkeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OriginatorPubkey, true -} - -// SetOriginatorPubkey sets field value -func (o *TransactRequest) SetOriginatorPubkey(v string) { - o.OriginatorPubkey = v -} - -// GetSourceAsset returns the SourceAsset field value -func (o *TransactRequest) GetSourceAsset() TransactRequestSourceAsset { - if o == nil { - var ret TransactRequestSourceAsset - return ret - } - - return o.SourceAsset -} - -// GetSourceAssetOk returns a tuple with the SourceAsset field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetSourceAssetOk() (*TransactRequestSourceAsset, bool) { - if o == nil { - return nil, false - } - return &o.SourceAsset, true -} - -// SetSourceAsset sets field value -func (o *TransactRequest) SetSourceAsset(v TransactRequestSourceAsset) { - o.SourceAsset = v -} - -// GetDestinyAsset returns the DestinyAsset field value -func (o *TransactRequest) GetDestinyAsset() TransactRequestSourceAsset { - if o == nil { - var ret TransactRequestSourceAsset - return ret - } - - return o.DestinyAsset -} - -// GetDestinyAssetOk returns a tuple with the DestinyAsset field value -// and a boolean to check if the value has been set. -func (o *TransactRequest) GetDestinyAssetOk() (*TransactRequestSourceAsset, bool) { - if o == nil { - return nil, false - } - return &o.DestinyAsset, true -} - -// SetDestinyAsset sets field value -func (o *TransactRequest) SetDestinyAsset(v TransactRequestSourceAsset) { - o.DestinyAsset = v -} - -func (o TransactRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contextID"] = o.ContextID - if !IsNil(o.Payload) { - toSerialize["payload"] = o.Payload - } - toSerialize["fromDLTNetworkID"] = o.FromDLTNetworkID - toSerialize["toDLTNetworkID"] = o.ToDLTNetworkID - toSerialize["fromAmount"] = o.FromAmount - toSerialize["toAmount"] = o.ToAmount - toSerialize["beneficiaryPubkey"] = o.BeneficiaryPubkey - toSerialize["originatorPubkey"] = o.OriginatorPubkey - toSerialize["sourceAsset"] = o.SourceAsset - toSerialize["destinyAsset"] = o.DestinyAsset - return toSerialize, nil -} - -type NullableTransactRequest struct { - value *TransactRequest - isSet bool -} - -func (v NullableTransactRequest) Get() *TransactRequest { - return v.value -} - -func (v *NullableTransactRequest) Set(val *TransactRequest) { - v.value = val - v.isSet = true -} - -func (v NullableTransactRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactRequest(val *TransactRequest) *NullableTransactRequest { - return &NullableTransactRequest{value: val, isSet: true} -} - -func (v NullableTransactRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go deleted file mode 100644 index efa04419c1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/model_transact_request_source_asset.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" -) - -// checks if the TransactRequestSourceAsset type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TransactRequestSourceAsset{} - -// TransactRequestSourceAsset An asset -type TransactRequestSourceAsset struct { - Owner string `json:"owner"` - Ontology string `json:"ontology"` - ContractName string `json:"contractName"` - ContractAddress *string `json:"contractAddress,omitempty"` - MspId *string `json:"mspId,omitempty"` - ChannelName *string `json:"channelName,omitempty"` -} - -// NewTransactRequestSourceAsset instantiates a new TransactRequestSourceAsset object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTransactRequestSourceAsset(owner string, ontology string, contractName string) *TransactRequestSourceAsset { - this := TransactRequestSourceAsset{} - this.Owner = owner - this.Ontology = ontology - this.ContractName = contractName - return &this -} - -// NewTransactRequestSourceAssetWithDefaults instantiates a new TransactRequestSourceAsset object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTransactRequestSourceAssetWithDefaults() *TransactRequestSourceAsset { - this := TransactRequestSourceAsset{} - return &this -} - -// GetOwner returns the Owner field value -func (o *TransactRequestSourceAsset) GetOwner() string { - if o == nil { - var ret string - return ret - } - - return o.Owner -} - -// GetOwnerOk returns a tuple with the Owner field value -// and a boolean to check if the value has been set. -func (o *TransactRequestSourceAsset) GetOwnerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Owner, true -} - -// SetOwner sets field value -func (o *TransactRequestSourceAsset) SetOwner(v string) { - o.Owner = v -} - -// GetOntology returns the Ontology field value -func (o *TransactRequestSourceAsset) GetOntology() string { - if o == nil { - var ret string - return ret - } - - return o.Ontology -} - -// GetOntologyOk returns a tuple with the Ontology field value -// and a boolean to check if the value has been set. -func (o *TransactRequestSourceAsset) GetOntologyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Ontology, true -} - -// SetOntology sets field value -func (o *TransactRequestSourceAsset) SetOntology(v string) { - o.Ontology = v -} - -// GetContractName returns the ContractName field value -func (o *TransactRequestSourceAsset) GetContractName() string { - if o == nil { - var ret string - return ret - } - - return o.ContractName -} - -// GetContractNameOk returns a tuple with the ContractName field value -// and a boolean to check if the value has been set. -func (o *TransactRequestSourceAsset) GetContractNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContractName, true -} - -// SetContractName sets field value -func (o *TransactRequestSourceAsset) SetContractName(v string) { - o.ContractName = v -} - -// GetContractAddress returns the ContractAddress field value if set, zero value otherwise. -func (o *TransactRequestSourceAsset) GetContractAddress() string { - if o == nil || IsNil(o.ContractAddress) { - var ret string - return ret - } - return *o.ContractAddress -} - -// GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestSourceAsset) GetContractAddressOk() (*string, bool) { - if o == nil || IsNil(o.ContractAddress) { - return nil, false - } - return o.ContractAddress, true -} - -// HasContractAddress returns a boolean if a field has been set. -func (o *TransactRequestSourceAsset) HasContractAddress() bool { - if o != nil && !IsNil(o.ContractAddress) { - return true - } - - return false -} - -// SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field. -func (o *TransactRequestSourceAsset) SetContractAddress(v string) { - o.ContractAddress = &v -} - -// GetMspId returns the MspId field value if set, zero value otherwise. -func (o *TransactRequestSourceAsset) GetMspId() string { - if o == nil || IsNil(o.MspId) { - var ret string - return ret - } - return *o.MspId -} - -// GetMspIdOk returns a tuple with the MspId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestSourceAsset) GetMspIdOk() (*string, bool) { - if o == nil || IsNil(o.MspId) { - return nil, false - } - return o.MspId, true -} - -// HasMspId returns a boolean if a field has been set. -func (o *TransactRequestSourceAsset) HasMspId() bool { - if o != nil && !IsNil(o.MspId) { - return true - } - - return false -} - -// SetMspId gets a reference to the given string and assigns it to the MspId field. -func (o *TransactRequestSourceAsset) SetMspId(v string) { - o.MspId = &v -} - -// GetChannelName returns the ChannelName field value if set, zero value otherwise. -func (o *TransactRequestSourceAsset) GetChannelName() string { - if o == nil || IsNil(o.ChannelName) { - var ret string - return ret - } - return *o.ChannelName -} - -// GetChannelNameOk returns a tuple with the ChannelName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransactRequestSourceAsset) GetChannelNameOk() (*string, bool) { - if o == nil || IsNil(o.ChannelName) { - return nil, false - } - return o.ChannelName, true -} - -// HasChannelName returns a boolean if a field has been set. -func (o *TransactRequestSourceAsset) HasChannelName() bool { - if o != nil && !IsNil(o.ChannelName) { - return true - } - - return false -} - -// SetChannelName gets a reference to the given string and assigns it to the ChannelName field. -func (o *TransactRequestSourceAsset) SetChannelName(v string) { - o.ChannelName = &v -} - -func (o TransactRequestSourceAsset) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransactRequestSourceAsset) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["owner"] = o.Owner - toSerialize["ontology"] = o.Ontology - toSerialize["contractName"] = o.ContractName - if !IsNil(o.ContractAddress) { - toSerialize["contractAddress"] = o.ContractAddress - } - if !IsNil(o.MspId) { - toSerialize["mspId"] = o.MspId - } - if !IsNil(o.ChannelName) { - toSerialize["channelName"] = o.ChannelName - } - return toSerialize, nil -} - -type NullableTransactRequestSourceAsset struct { - value *TransactRequestSourceAsset - isSet bool -} - -func (v NullableTransactRequestSourceAsset) Get() *TransactRequestSourceAsset { - return v.value -} - -func (v *NullableTransactRequestSourceAsset) Set(val *TransactRequestSourceAsset) { - v.value = val - v.isSet = true -} - -func (v NullableTransactRequestSourceAsset) IsSet() bool { - return v.isSet -} - -func (v *NullableTransactRequestSourceAsset) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransactRequestSourceAsset(val *TransactRequestSourceAsset) *NullableTransactRequestSourceAsset { - return &NullableTransactRequestSourceAsset{value: val, isSet: true} -} - -func (v NullableTransactRequestSourceAsset) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransactRequestSourceAsset) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/response.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/response.go deleted file mode 100644 index 4380f82140..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go deleted file mode 100644 index 4cd51095ba..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_admin_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -Testing AdminApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package generated - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func Test_generated_AdminApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test AdminApiService CallContinue", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AdminApi.CallContinue(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AdminApiService GetAudit", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AdminApi.GetAudit(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AdminApiService GetHealthCheck", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AdminApi.GetHealthCheck(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AdminApiService GetStatus", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AdminApi.GetStatus(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AdminApiService Pause", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AdminApi.Pause(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go deleted file mode 100644 index 1b848e0db1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/test/api_transaction_test.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -Testing TransactionApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package generated - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated" -) - -func Test_generated_TransactionApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test TransactionApiService Cancel", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.TransactionApi.Cancel(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test TransactionApiService GetIntegrations", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.TransactionApi.GetIntegrations(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test TransactionApiService GetRoutes", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.TransactionApi.GetRoutes(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test TransactionApiService Transact", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.TransactionApi.Transact(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/utils.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/utils.go deleted file mode 100644 index 63010ca736..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/gateway-client/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -SATP Gateway Client (Business Logic Orchestrator) - -SATP is a protocol operating between two gateways that conducts the transfer of a digital asset from one gateway to another. The protocol establishes a secure channel between the endpoints and implements a 2-phase commit to ensure the properties of transfer atomicity, consistency, isolation and durability. This API defines the gateway client facing API (business logic orchestrator, or BLO), which is named API-Type 1 in the SATP-Core specification. **Additional Resources**: - [Proposed SATP Charter](https://datatracker.ietf.org/doc/charter-ietf-satp/) - [SATP Core draft](https://datatracker.ietf.org/doc/draft-ietf-satp-core) - [SATP Crash Recovery draft](https://datatracker.ietf.org/doc/draft-belchior-satp-gateway-recovery/) - [SATP Architecture draft](https://datatracker.ietf.org/doc/draft-ietf-satp-architecture/) - [SATP Use-Cases draft](https://datatracker.ietf.org/doc/draft-ramakrishna-sat-use-cases/) - [SATP Data sharing draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-data-sharing) - [SATP View Addresses draft](https://datatracker.ietf.org/doc/draft-ramakrishna-satp-views-addresses) - -API version: 0.0.2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package generated - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES deleted file mode 100644 index 87c8b5f704..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ /dev/null @@ -1,37 +0,0 @@ -.travis.yml -README.md -api/openapi.yaml -api_default.go -client.go -configuration.go -go.mod -go.sum -model_asset_profile.go -model_client_v1_request.go -model_client_v1_request_client_gateway_configuration.go -model_commit_final_v1_request.go -model_commit_final_v1_response.go -model_commit_preparation_v1_request.go -model_commit_preparation_v1_response.go -model_credential_profile.go -model_history.go -model_local_log.go -model_lock_evidence_v1_request.go -model_lock_evidence_v1_response.go -model_payload_profile.go -model_recover_success_v1_message.go -model_recover_update_ack_v1_message.go -model_recover_update_v1_message.go -model_recover_v1_message.go -model_rollback_ack_v1_message.go -model_rollback_v1_message.go -model_satp_message.go -model_satp_message_action_response.go -model_session_data.go -model_transfer_commence_v1_request.go -model_transfer_commence_v1_response.go -model_transfer_complete_v1_request.go -model_transfer_initialization_v1_request.go -model_transfer_initialization_v1_response.go -response.go -utils.go diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml deleted file mode 100644 index f5cb2ce9a5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod deleted file mode 100644 index eb0c2317be..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.mod +++ /dev/null @@ -1,6 +0,0 @@ -module github.com/hyperledger/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client - -go 1.18 - -require ( -) diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum deleted file mode 100644 index c966c8ddfd..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go b/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go deleted file mode 100644 index 72e567c5bc..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client/test/api_default_test.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -Hyperledger Cactus Plugin - Odap Hermes - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package cactus-plugin-satp-hermes - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/hyperledger/cactus-plugin-satp-hermes/src/main/go/generated/openapi/go-client" -) - -func Test_cactus-plugin-satp-hermes_DefaultApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test DefaultApiService ClientRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.DefaultApi.ClientRequestV1(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase1TransferInitiationRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase1TransferInitiationRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase1TransferInitiationResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase1TransferInitiationResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2LockEvidenceRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2LockEvidenceRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2LockEvidenceResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2LockEvidenceResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2TransferCommenceRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2TransferCommenceRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase2TransferCommenceResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase2TransferCommenceResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitFinalRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitFinalRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitFinalResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitFinalResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitPreparationRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitPreparationRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3CommitPreparationResponseV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3CommitPreparationResponseV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService Phase3TransferCompleteRequestV1", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.Phase3TransferCompleteRequestV1(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverUpdateAckV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverUpdateAckV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverUpdateV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverUpdateV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RecoverV1Success", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RecoverV1Success(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RollbackAckV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RollbackAckV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test DefaultApiService RollbackV1Message", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.DefaultApi.RollbackV1Message(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json index 19cd7659b8..1907e160d7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi-blo-bundled.json @@ -72,7 +72,7 @@ "beneficiaryPubkey", "originatorPubkey", "sourceAsset", - "destinyAsset" + "receiverAsset" ], "properties": { "contextID": { @@ -135,7 +135,7 @@ } } }, - "destinyAsset": { + "receiverAsset": { "description": "An asset", "type": "object", "required": [ @@ -2825,7 +2825,7 @@ "beneficiaryPubkey", "originatorPubkey", "sourceAsset", - "destinyAsset" + "receiverAsset" ], "properties": { "contextID": { @@ -2888,7 +2888,7 @@ } } }, - "destinyAsset": { + "receiverAsset": { "description": "An asset", "type": "object", "required": [ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts index 0751b14bbc..ec580687c1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/transaction/transact-handler-service.ts @@ -49,7 +49,7 @@ export async function ExecuteTransact( session, SATP_VERSION, req.sourceAsset.contractAddress, - req.destinyAsset.contractAddress, + req.receiverAsset.contractAddress, req.originatorPubkey, req.beneficiaryPubkey, req.fromDLTNetworkID, @@ -65,17 +65,17 @@ export async function ExecuteTransact( loggingProfile ? loggingProfile : "", accessControlProfile, req.sourceAsset.ontology, - req.destinyAsset.ontology, + req.receiverAsset.ontology, req.fromAmount, req.toAmount, req.sourceAsset.mspId ? req.sourceAsset.mspId : "", req.sourceAsset.channelName ? req.sourceAsset.channelName : "", - req.destinyAsset.mspId ? req.destinyAsset.mspId : "", - req.destinyAsset.channelName ? req.destinyAsset.channelName : "", + req.receiverAsset.mspId ? req.receiverAsset.mspId : "", + req.receiverAsset.channelName ? req.receiverAsset.channelName : "", req.sourceAsset.contractName, - req.destinyAsset.contractName, + req.receiverAsset.contractName, req.sourceAsset.owner, - req.destinyAsset.owner, + req.receiverAsset.owner, ); await manager.initiateTransfer(session); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts index a799f9e730..eb3e8e62f2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/session-utils.ts @@ -26,7 +26,7 @@ export function populateClientSessionData( session: SATPSession, version: string, sourceContractAddress: string | undefined, - destinyContractAddress: string | undefined, + receiverContractAddress: string | undefined, originatorPubkey: string, beneficiaryPubkey: string, senderGatewayNetworkId: string, @@ -47,12 +47,12 @@ export function populateClientSessionData( toAmount: string, sourceMspId: string, sourceChannelName: string, - destinyMspId: string, - destinyChannelName: string, + receiverMspId: string, + receiverChannelName: string, sourceContractName: string, - destinyContractName: string, + receiverContractName: string, sourceOwner: string, - destinyOwner: string, + receiverOwner: string, ): SATPSession { const fn = "session_utils#populateClientSessionData"; const sessionData = session.getClientSessionData(); @@ -91,14 +91,14 @@ export function populateClientSessionData( const receiverAsset: Asset = new Asset(); receiverAsset.tokenId = ""; - receiverAsset.owner = destinyOwner; + receiverAsset.owner = receiverOwner; receiverAsset.ontology = receiverContractOntology; - receiverAsset.contractName = destinyContractName; - receiverAsset.contractAddress = destinyContractAddress || ""; + receiverAsset.contractName = receiverContractName; + receiverAsset.contractAddress = receiverContractAddress || ""; receiverAsset.amount = BigInt(toAmount); - receiverAsset.mspId = destinyMspId; - receiverAsset.channelName = destinyChannelName; + receiverAsset.mspId = receiverMspId; + receiverAsset.channelName = receiverChannelName; sessionData.receiverAsset = receiverAsset; //todo check THis diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index fdf658d724..0f2fc4e9a9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -12,9 +12,7 @@ import { LockType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; // eslint-disable-next-line prettier/prettier -import { - ACCEPTANCE, -} from "../../../generated/proto/cacti/satp/v02/common/session_pb"; +import { ACCEPTANCE } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { TransferClaims } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts index bedfb7cf0c..9308e482e4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api.ts @@ -1935,7 +1935,7 @@ export interface TransactRequest { * @type {TransactRequestSourceAsset} * @memberof TransactRequest */ - 'destinyAsset': TransactRequestSourceAsset; + 'receiverAsset': TransactRequestSourceAsset; } /** * An asset diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml index dbd5785fd9..6104a604e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/openapi-blo-bundled.yml @@ -65,7 +65,7 @@ paths: - beneficiaryPubkey - originatorPubkey - sourceAsset - - destinyAsset + - receiverAsset properties: contextID: type: string @@ -110,7 +110,7 @@ paths: type: string channelName: type: string - destinyAsset: + receiverAsset: description: An asset type: object required: @@ -2155,7 +2155,7 @@ components: - beneficiaryPubkey - originatorPubkey - sourceAsset - - destinyAsset + - receiverAsset properties: contextID: type: string @@ -2200,7 +2200,7 @@ components: type: string channelName: type: string - destinyAsset: + receiverAsset: description: An asset type: object required: diff --git a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml index 1bcfbec878..e77af7f9b5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml +++ b/packages/cactus-plugin-satp-hermes/src/main/yml/bol/schemas.yml @@ -235,7 +235,7 @@ TransactRequest: - beneficiaryPubkey - originatorPubkey - sourceAsset - - destinyAsset + - receiverAsset properties: contextID: type: string @@ -262,7 +262,7 @@ TransactRequest: type: string sourceAsset: $ref: ./schemas.yml#/Asset - destinyAsset: + receiverAsset: $ref: ./schemas.yml#/Asset diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts index d2ab23eb83..1f3e1c71ef 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts @@ -989,7 +989,7 @@ describe("SATPGateway sending a token from Besu to Fabric", () => { contractName: erc20TokenContract, contractAddress: assetContractAddress, }; - const destinyAsset: Asset = { + const receiverAsset: Asset = { owner: clientId, ontology: JSON.stringify(FabricSATPInteraction), contractName: satpContractName, @@ -1005,7 +1005,7 @@ describe("SATPGateway sending a token from Besu to Fabric", () => { originatorPubkey: assigneeEthAccount.address, beneficiaryPubkey: fabricUser.credentials.certificate, sourceAsset, - destinyAsset, + receiverAsset, }; const res = await dispatcher?.Transact(req); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts index 123267d79b..45c3f2debb 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts @@ -1068,7 +1068,7 @@ describe("2 SATPGateway sending a token from Besu to Fabric using openApi to req contractName: erc20TokenContract, contractAddress: assetContractAddress, }; - const destinyAsset: Asset = { + const receiverAsset: Asset = { owner: clientId, ontology: JSON.stringify(FabricSATPInteraction), contractName: satpContractName, @@ -1084,7 +1084,7 @@ describe("2 SATPGateway sending a token from Besu to Fabric using openApi to req originatorPubkey: assigneeEthAccount.address, beneficiaryPubkey: fabricUser.credentials.certificate, sourceAsset, - destinyAsset, + receiverAsset, }; const address = options1.gid!.address!; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts index e9ade116f2..b9f492cacf 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts @@ -1065,7 +1065,7 @@ describe("2 SATPGateway sending a token from Besu to Fabric", () => { contractName: erc20TokenContract, contractAddress: assetContractAddress, }; - const destinyAsset: Asset = { + const receiverAsset: Asset = { owner: clientId, ontology: JSON.stringify(FabricSATPInteraction), contractName: satpContractName, @@ -1081,7 +1081,7 @@ describe("2 SATPGateway sending a token from Besu to Fabric", () => { originatorPubkey: assigneeEthAccount.address, beneficiaryPubkey: fabricUser.credentials.certificate, sourceAsset, - destinyAsset, + receiverAsset, }; const res = await dispatcher?.Transact(req); diff --git a/yarn.lock b/yarn.lock index 92df22cd98..b153fd981c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5507,21 +5507,21 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.4": - version: 7.23.5 - resolution: "@babel/runtime@npm:7.23.5" +"@babel/runtime@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/runtime@npm:7.23.9" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/0f1669f639af30a0a2948ffcefa2c61935f337b0777bd94f8d7bc66bba8e7d4499e725caeb0449540d9c6d67399b733c4e719babb43ce9a0f33095aa01b42b37 + checksum: 10/9a520fe1bf72249f7dd60ff726434251858de15cccfca7aa831bd19d0d3fb17702e116ead82724659b8da3844977e5e13de2bae01eb8a798f2823a669f122be6 languageName: node linkType: hard -"@babel/runtime@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/runtime@npm:7.23.9" +"@babel/runtime@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/runtime@npm:7.25.6" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/9a520fe1bf72249f7dd60ff726434251858de15cccfca7aa831bd19d0d3fb17702e116ead82724659b8da3844977e5e13de2bae01eb8a798f2823a669f122be6 + checksum: 10/0c4134734deb20e1005ffb9165bf342e1074576621b246d8e5e41cc7cb315a885b7d98950fbf5c63619a2990a56ae82f444d35fe8c4691a0b70c2fe5673667dc languageName: node linkType: hard @@ -7117,6 +7117,19 @@ __metadata: languageName: node linkType: hard +"@emotion/cache@npm:^11.13.1": + version: 11.13.1 + resolution: "@emotion/cache@npm:11.13.1" + dependencies: + "@emotion/memoize": "npm:^0.9.0" + "@emotion/sheet": "npm:^1.4.0" + "@emotion/utils": "npm:^1.4.0" + "@emotion/weak-memoize": "npm:^0.4.0" + stylis: "npm:4.2.0" + checksum: 10/090c8ad2e5b23f1b3a95e94f1f0554a40ed1dcd844c9d31629a68ff824eff40f32d1362f67aefa440ee0aabd5a8cabcc76870fd6d77144d3ff251bdcdf1420b9 + languageName: node + linkType: hard + "@emotion/hash@npm:^0.9.1": version: 0.9.1 resolution: "@emotion/hash@npm:0.9.1" @@ -7149,6 +7162,13 @@ __metadata: languageName: node linkType: hard +"@emotion/memoize@npm:^0.9.0": + version: 0.9.0 + resolution: "@emotion/memoize@npm:0.9.0" + checksum: 10/038132359397348e378c593a773b1148cd0cf0a2285ffd067a0f63447b945f5278860d9de718f906a74c7c940ba1783ac2ca18f1c06a307b01cc0e3944e783b1 + languageName: node + linkType: hard + "@emotion/react@npm:11.11.1": version: 11.11.1 resolution: "@emotion/react@npm:11.11.1" @@ -7237,6 +7257,13 @@ __metadata: languageName: node linkType: hard +"@emotion/sheet@npm:^1.4.0": + version: 1.4.0 + resolution: "@emotion/sheet@npm:1.4.0" + checksum: 10/8ac6e9bf6b373a648f26ae7f1c24041038524f4c72f436f4f8c4761c665e58880c3229d8d89b1f7a4815dd8e5b49634d03e60187cb6f93097d7f7c1859e869d5 + languageName: node + linkType: hard + "@emotion/styled@npm:11.11.0": version: 11.11.0 resolution: "@emotion/styled@npm:11.11.0" @@ -7300,6 +7327,13 @@ __metadata: languageName: node linkType: hard +"@emotion/utils@npm:^1.4.0": + version: 1.4.1 + resolution: "@emotion/utils@npm:1.4.1" + checksum: 10/95e56fc0c9e05cf01a96268f0486ce813f1109a8653d2f575c67df9e8765d9c1b2daf09ad1ada67d933efbb08ca7990228e14b210c713daf90156b4869abe6a7 + languageName: node + linkType: hard + "@emotion/weak-memoize@npm:^0.3.1": version: 0.3.1 resolution: "@emotion/weak-memoize@npm:0.3.1" @@ -7307,6 +7341,13 @@ __metadata: languageName: node linkType: hard +"@emotion/weak-memoize@npm:^0.4.0": + version: 0.4.0 + resolution: "@emotion/weak-memoize@npm:0.4.0" + checksum: 10/db5da0e89bd752c78b6bd65a1e56231f0abebe2f71c0bd8fc47dff96408f7065b02e214080f99924f6a3bfe7ee15afc48dad999d76df86b39b16e513f7a94f52 + languageName: node + linkType: hard + "@ensdomains/address-encoder@npm:^0.1.7": version: 0.1.9 resolution: "@ensdomains/address-encoder@npm:0.1.9" @@ -8728,25 +8769,6 @@ __metadata: languageName: node linkType: hard -"@floating-ui/core@npm:^1.4.1": - version: 1.4.1 - resolution: "@floating-ui/core@npm:1.4.1" - dependencies: - "@floating-ui/utils": "npm:^0.1.1" - checksum: 10/2a2dd8a2ae443e63cb9c822785891b1194ad3a402b8252054a3c238763eab86a2f09ab89096fa7d1667e3cb7d2ff2f28b7ab07d5e5ee56544e825e5bd4665570 - languageName: node - linkType: hard - -"@floating-ui/dom@npm:^1.5.1": - version: 1.5.1 - resolution: "@floating-ui/dom@npm:1.5.1" - dependencies: - "@floating-ui/core": "npm:^1.4.1" - "@floating-ui/utils": "npm:^0.1.1" - checksum: 10/3af542d549e394feb0c74f39ef01d87debb5295b49b8852ad481a055503e5dc61768880710c83de6e49a2c100cad8671298d3c73293cb63a13e23068f0612224 - languageName: node - linkType: hard - "@floating-ui/dom@npm:^1.6.1": version: 1.6.3 resolution: "@floating-ui/dom@npm:1.6.3" @@ -8757,18 +8779,6 @@ __metadata: languageName: node linkType: hard -"@floating-ui/react-dom@npm:^2.0.4": - version: 2.0.4 - resolution: "@floating-ui/react-dom@npm:2.0.4" - dependencies: - "@floating-ui/dom": "npm:^1.5.1" - peerDependencies: - react: ">=16.8.0" - react-dom: ">=16.8.0" - checksum: 10/4240a718502c797fd2e174cd06dcd7321a6eda9c8966dbaf61864b9e16445e95649a59bfe7c19ee13f68c11f3693724d7970c7e618089a3d3915bd343639cfae - languageName: node - linkType: hard - "@floating-ui/react-dom@npm:^2.0.8": version: 2.0.8 resolution: "@floating-ui/react-dom@npm:2.0.8" @@ -8781,13 +8791,6 @@ __metadata: languageName: node linkType: hard -"@floating-ui/utils@npm:^0.1.1": - version: 0.1.1 - resolution: "@floating-ui/utils@npm:0.1.1" - checksum: 10/ba1a6d073f8af4290f9d0ecf2ca73f97a742ed9bae060bf4aec604db5642a6cc7aa38041c2c1a1ffb0dd1c99549bbfde3dc61202ad7cb91a963d2b2eea747719 - languageName: node - linkType: hard - "@floating-ui/utils@npm:^0.2.0, @floating-ui/utils@npm:^0.2.1": version: 0.2.1 resolution: "@floating-ui/utils@npm:0.2.1" @@ -9234,24 +9237,37 @@ __metadata: dependencies: "@emotion/react": "npm:11.11.1" "@emotion/styled": "npm:11.11.0" - "@mui/icons-material": "npm:5.14.19" - "@mui/material": "npm:5.14.19" + "@hyperledger/cactus-example-cbdc-bridging-backend": "npm:2.0.0-rc.7" + "@mui/icons-material": "npm:6.1.1" + "@mui/material": "npm:6.1.1" "@testing-library/jest-dom": "npm:5.17.0" "@testing-library/react": "npm:13.4.0" "@testing-library/user-event": "npm:13.5.0" + "@types/copy-webpack-plugin": "npm:^10.1.0" + "@types/customize-cra": "npm:^1" "@types/jest": "npm:27.5.2" - "@types/node": "npm:18.11.9" - "@types/react": "npm:18.2.39" - "@types/react-dom": "npm:18.2.17" + "@types/node": "npm:^22.6.0" + "@types/react": "npm:18.3.8" + "@types/react-dom": "npm:18.3.0" "@types/uuid": "npm:10.0.0" axios: "npm:1.7.7" - react: "npm:18.2.0" - react-dom: "npm:18.2.0" + copy-webpack-plugin: "npm:^12.0.2" + css-loader: "npm:^7.1.2" + customize-cra: "npm:^1.0.0" + html-webpack-plugin: "npm:^5.6.0" + react: "npm:18.3.1" + react-app-rewired: "npm:^2.2.1" + react-dom: "npm:18.3.1" react-router-dom: "npm:6.2.1" react-scripts: "npm:5.0.1" - typescript: "npm:5.5.2" + style-loader: "npm:^4.0.0" + ts-loader: "npm:^9.5.1" + ts-node: "npm:^10.9.2" + typescript: "npm:^5.6.2" uuid: "npm:10.0.0" - web-vitals: "npm:2.1.4" + webpack: "npm:^5.94.0" + webpack-cli: "npm:5.1.4" + webpack-dev-server: "npm:^5.1.0" languageName: unknown linkType: soft @@ -9887,7 +9903,7 @@ __metadata: languageName: unknown linkType: soft -"@hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend": +"@hyperledger/cactus-example-cbdc-bridging-backend@npm:2.0.0-rc.7, @hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend": version: 0.0.0-use.local resolution: "@hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend" dependencies: @@ -9924,15 +9940,18 @@ __metadata: jose: "npm:4.15.5" knex: "npm:2.5.1" kubo-rpc-client: "npm:3.0.1" + npm-run-all: "npm:4.1.5" nyc: "npm:13.1.0" openapi-types: "npm:12.1.3" remix-tests: "npm:0.1.34" sqlite3: "npm:5.1.5" - ts-node: "npm:7.0.1" + swagger-cli: "npm:4.0.4" + ts-node: "npm:10.9.2" typescript-optional: "npm:2.0.1" uuid: "npm:10.0.0" web3-core: "npm:1.10.1" web3-utils: "npm:1.10.1" + webpack: "npm:^5.94.0" languageName: unknown linkType: soft @@ -12890,28 +12909,6 @@ __metadata: languageName: node linkType: hard -"@mui/base@npm:5.0.0-beta.25": - version: 5.0.0-beta.25 - resolution: "@mui/base@npm:5.0.0-beta.25" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@floating-ui/react-dom": "npm:^2.0.4" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - "@popperjs/core": "npm:^2.11.8" - clsx: "npm:^2.0.0" - prop-types: "npm:^15.8.1" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/93cecb438ec9d5bac2440a65c295fbd2cde6aa7f1264005b0c9ef76c1332b77111f7b688209364b97344642bee0e71f2bd3b3b14039921f68a8b7111d3a513e4 - languageName: node - linkType: hard - "@mui/base@npm:5.0.0-beta.40": version: 5.0.0-beta.40 resolution: "@mui/base@npm:5.0.0-beta.40" @@ -12934,13 +12931,6 @@ __metadata: languageName: node linkType: hard -"@mui/core-downloads-tracker@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/core-downloads-tracker@npm:5.14.19" - checksum: 10/e71c886f12bbd83791638545017c0b8439c3c6b51125979fea105f938f2f5b109629d4deddd38448c05b8be10b3249334324f1505c1306c52a2b8d315a1005c3 - languageName: node - linkType: hard - "@mui/core-downloads-tracker@npm:^5.15.15": version: 5.15.15 resolution: "@mui/core-downloads-tracker@npm:5.15.15" @@ -12948,19 +12938,10 @@ __metadata: languageName: node linkType: hard -"@mui/icons-material@npm:5.14.19": - version: 5.14.19 - resolution: "@mui/icons-material@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - peerDependencies: - "@mui/material": ^5.0.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/648a44af9a18a39062126d80268d0d4816d408d253d46f097cf8ad525e37dad8301a7727942f4908a15c432de361dabe29de0595f3771cf8acf7da311374441e +"@mui/core-downloads-tracker@npm:^6.1.1": + version: 6.1.3 + resolution: "@mui/core-downloads-tracker@npm:6.1.3" + checksum: 10/e8b3bc8cce8dd3497c2d27a2e15ab989489011a1c85aedb634f4a20b71412d01f12d15a59a9824861022f12625b208e7da17a1e5d9a7e57b458ed4c82a8032eb languageName: node linkType: hard @@ -12970,9 +12951,9 @@ __metadata: dependencies: "@babel/runtime": "npm:^7.23.9" peerDependencies: - "@mui/material": ^5.0.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 + "@mui/material": ^6.1.1 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@types/react": optional: true @@ -12980,6 +12961,22 @@ __metadata: languageName: node linkType: hard +"@mui/icons-material@npm:6.1.1": + version: 6.1.1 + resolution: "@mui/icons-material@npm:6.1.1" + dependencies: + "@babel/runtime": "npm:^7.25.6" + peerDependencies: + "@mui/material": ^6.1.1 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10/65a298ef3cc369b62dec32612bb53bc958c9ac66dba94fdc404e7717f290db798e16bab0b2c5ce67efade6ab957a9bda5a18612cb4db7b5b612bfc618ae794ec + languageName: node + linkType: hard + "@mui/lab@npm:5.0.0-alpha.170": version: 5.0.0-alpha.170 resolution: "@mui/lab@npm:5.0.0-alpha.170" @@ -13009,39 +13006,6 @@ __metadata: languageName: node linkType: hard -"@mui/material@npm:5.14.19": - version: 5.14.19 - resolution: "@mui/material@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/base": "npm:5.0.0-beta.25" - "@mui/core-downloads-tracker": "npm:^5.14.19" - "@mui/system": "npm:^5.14.19" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - "@types/react-transition-group": "npm:^4.4.9" - clsx: "npm:^2.0.0" - csstype: "npm:^3.1.2" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" - react-transition-group: "npm:^4.4.5" - peerDependencies: - "@emotion/react": ^11.5.0 - "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": - optional: true - "@types/react": - optional: true - checksum: 10/9b89bf20e5086801d8737d906d4c84023e04883a67186c4f523748740a90bee495a8c93ba7bc1272fdc0f9ee9951e2ebff149ecd63697abfba06dbfe9787f5fa - languageName: node - linkType: hard - "@mui/material@npm:5.15.15": version: 5.15.15 resolution: "@mui/material@npm:5.15.15" @@ -13056,39 +13020,59 @@ __metadata: clsx: "npm:^2.1.0" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" + react-is: "npm:^18.3.1" react-transition-group: "npm:^4.4.5" peerDependencies: "@emotion/react": ^11.5.0 "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 + "@mui/material-pigment-css": ^6.1.1 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@emotion/react": optional: true "@emotion/styled": optional: true - "@types/react": + "@mui/material-pigment-css": optional: true checksum: 10/e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b languageName: node linkType: hard -"@mui/private-theming@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/private-theming@npm:5.14.19" +"@mui/material@npm:6.1.1": + version: 6.1.1 + resolution: "@mui/material@npm:6.1.1" dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/utils": "npm:^5.14.19" + "@babel/runtime": "npm:^7.25.6" + "@mui/core-downloads-tracker": "npm:^6.1.1" + "@mui/system": "npm:^6.1.1" + "@mui/types": "npm:^7.2.17" + "@mui/utils": "npm:^6.1.1" + "@popperjs/core": "npm:^2.11.8" + "@types/react-transition-group": "npm:^4.4.11" + clsx: "npm:^2.1.1" + csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" + react-is: "npm:^18.3.1" + react-transition-group: "npm:^4.4.5" peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@mui/material-pigment-css": ^6.1.1 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@mui/material-pigment-css": + optional: true "@types/react": optional: true - checksum: 10/248687351477c7794a002dd0c4ae68216b5794591407e0b4751eede8fe35db94c163642365578938dc66fbeb7a6c771c811ab2f7fa4b2bc60f663dc826084ca0 + checksum: 10/090a2ed0e95d01e52f630787f6606589f50f4b5616ec35aadb2da79233331c5531a779c369d9501efe7110420b67e81b6630f050533e4b7170783606487b300a languageName: node linkType: hard @@ -13109,24 +13093,20 @@ __metadata: languageName: node linkType: hard -"@mui/styled-engine@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/styled-engine@npm:5.14.19" +"@mui/private-theming@npm:^6.1.1": + version: 6.1.1 + resolution: "@mui/private-theming@npm:6.1.1" dependencies: - "@babel/runtime": "npm:^7.23.4" - "@emotion/cache": "npm:^11.11.0" - csstype: "npm:^3.1.2" + "@babel/runtime": "npm:^7.25.6" + "@mui/utils": "npm:^6.1.1" prop-types: "npm:^15.8.1" peerDependencies: - "@emotion/react": ^11.4.1 - "@emotion/styled": ^11.3.0 - react: ^17.0.0 || ^18.0.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: - "@emotion/react": - optional: true - "@emotion/styled": + "@types/react": optional: true - checksum: 10/210da24bcb47c8b911b0f4174ecd77ced2aa5eba442861b474fe575384d736edc9553b707be35a086ae514503c26dbfa5541a352db65fa7de970c6251365214b + checksum: 10/93b9c2bc5602124ae207bc9d0a305efceabfec2d4227db243a9fa25f9bb693a13caf9181293372279682715dcf5fcb04ea56f4b3c4905c96dd3c691a8394bb13 languageName: node linkType: hard @@ -13151,31 +13131,25 @@ __metadata: languageName: node linkType: hard -"@mui/system@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/system@npm:5.14.19" +"@mui/styled-engine@npm:^6.1.1": + version: 6.1.1 + resolution: "@mui/styled-engine@npm:6.1.1" dependencies: - "@babel/runtime": "npm:^7.23.4" - "@mui/private-theming": "npm:^5.14.19" - "@mui/styled-engine": "npm:^5.14.19" - "@mui/types": "npm:^7.2.10" - "@mui/utils": "npm:^5.14.19" - clsx: "npm:^2.0.0" - csstype: "npm:^3.1.2" + "@babel/runtime": "npm:^7.25.6" + "@emotion/cache": "npm:^11.13.1" + "@emotion/sheet": "npm:^1.4.0" + csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" peerDependencies: - "@emotion/react": ^11.5.0 + "@emotion/react": ^11.4.1 "@emotion/styled": ^11.3.0 - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@emotion/react": optional: true "@emotion/styled": optional: true - "@types/react": - optional: true - checksum: 10/68fddc614aae5dba86db134ae1b2ab7540d61e4008068ccd3c1cfa20d9f54508b9cf3ce68d2d1a4c7de237c9314206da291e987d323fa1425a12e5b36f2bc488 + checksum: 10/1520c4762539468edb1669ca84c965741dc403a93aec12cdb70b5d5a9dbcc2f4531306de344bb56ad9c68c7be4acdfe9d3372f4021203007dcc6a503f3fbc6e3 languageName: node linkType: hard @@ -13207,15 +13181,31 @@ __metadata: languageName: node linkType: hard -"@mui/types@npm:^7.2.10": - version: 7.2.10 - resolution: "@mui/types@npm:7.2.10" +"@mui/system@npm:^6.1.1": + version: 6.1.1 + resolution: "@mui/system@npm:6.1.1" + dependencies: + "@babel/runtime": "npm:^7.25.6" + "@mui/private-theming": "npm:^6.1.1" + "@mui/styled-engine": "npm:^6.1.1" + "@mui/types": "npm:^7.2.17" + "@mui/utils": "npm:^6.1.1" + clsx: "npm:^2.1.1" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true "@types/react": optional: true - checksum: 10/83067cd1da9c79f7ee82f171ba718435d8aa12c6e72c4d5d24bee9e310416ccb91cb86cb0502f463e683e9707d90befc5112509fe7af54cacd39f8556b150f9b + checksum: 10/64f61f9f91b6af3bc923fcfa806dc94b3909f92d56e373d0e8724614a9980a0bbab9bc843214e33a3465fa6efbb05f63c18bf74b32a71e86930464cfecbe856e languageName: node linkType: hard @@ -13231,21 +13221,15 @@ __metadata: languageName: node linkType: hard -"@mui/utils@npm:^5.14.19": - version: 5.14.19 - resolution: "@mui/utils@npm:5.14.19" - dependencies: - "@babel/runtime": "npm:^7.23.4" - "@types/prop-types": "npm:^15.7.11" - prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" +"@mui/types@npm:^7.2.17": + version: 7.2.17 + resolution: "@mui/types@npm:7.2.17" peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@types/react": optional: true - checksum: 10/1abbcfef21fc71805af1a4d653d9adeec252ebe4892715a0c6c49246c6cfa84f46c82e033679ab50eb2cf3ef391d9eb622c48aa78f152032aa99a996eac98806 + checksum: 10/de21ecd69e4fe22738f1437d7084747c07a1e88f6fbdea5a2927594c587aaf8cac7bd67118b8749a8c7a6f45875b937d4a20b43f531773cdfd870445a4237893 languageName: node linkType: hard @@ -13267,6 +13251,26 @@ __metadata: languageName: node linkType: hard +"@mui/utils@npm:^6.1.1": + version: 6.1.1 + resolution: "@mui/utils@npm:6.1.1" + dependencies: + "@babel/runtime": "npm:^7.25.6" + "@mui/types": "npm:^7.2.17" + "@types/prop-types": "npm:^15.7.12" + clsx: "npm:^2.1.1" + prop-types: "npm:^15.8.1" + react-is: "npm:^18.3.1" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10/11555b8595ba8f215d3e90c36ea992c17f7901465f10a992b7c7d90596bac25f0ea4f07c9a9d9cd64015828cc6b9c3dedaf5d39a039e75ab252a3d097022bbcb + languageName: node + linkType: hard + "@multiformats/base-x@npm:^4.0.1": version: 4.0.1 resolution: "@multiformats/base-x@npm:4.0.1" @@ -16777,6 +16781,19 @@ __metadata: languageName: node linkType: hard +"@types/babel__core@npm:*, @types/babel__core@npm:^7.20.5": + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" + dependencies: + "@babel/parser": "npm:^7.20.7" + "@babel/types": "npm:^7.20.7" + "@types/babel__generator": "npm:*" + "@types/babel__template": "npm:*" + "@types/babel__traverse": "npm:*" + checksum: 10/c32838d280b5ab59d62557f9e331d3831f8e547ee10b4f85cb78753d97d521270cebfc73ce501e9fb27fe71884d1ba75e18658692c2f4117543f0fc4e3e118b3 + languageName: node + linkType: hard + "@types/babel__core@npm:^7.0.0": version: 7.20.2 resolution: "@types/babel__core@npm:7.20.2" @@ -16803,19 +16820,6 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.20.5": - version: 7.20.5 - resolution: "@types/babel__core@npm:7.20.5" - dependencies: - "@babel/parser": "npm:^7.20.7" - "@babel/types": "npm:^7.20.7" - "@types/babel__generator": "npm:*" - "@types/babel__template": "npm:*" - "@types/babel__traverse": "npm:*" - checksum: 10/c32838d280b5ab59d62557f9e331d3831f8e547ee10b4f85cb78753d97d521270cebfc73ce501e9fb27fe71884d1ba75e18658692c2f4117543f0fc4e3e118b3 - languageName: node - linkType: hard - "@types/babel__generator@npm:*": version: 7.6.4 resolution: "@types/babel__generator@npm:7.6.4" @@ -16926,6 +16930,15 @@ __metadata: languageName: node linkType: hard +"@types/bonjour@npm:^3.5.13": + version: 3.5.13 + resolution: "@types/bonjour@npm:3.5.13" + dependencies: + "@types/node": "npm:*" + checksum: 10/e827570e097bd7d625a673c9c208af2d1a22fa3885c0a1646533cf24394c839c3e5f60ac1bc60c0ddcc69c0615078c9fb2c01b42596c7c582d895d974f2409ee + languageName: node + linkType: hard + "@types/bonjour@npm:^3.5.9": version: 3.5.10 resolution: "@types/bonjour@npm:3.5.10" @@ -16987,6 +17000,16 @@ __metadata: languageName: node linkType: hard +"@types/connect-history-api-fallback@npm:^1.5.4": + version: 1.5.4 + resolution: "@types/connect-history-api-fallback@npm:1.5.4" + dependencies: + "@types/express-serve-static-core": "npm:*" + "@types/node": "npm:*" + checksum: 10/e1dee43b8570ffac02d2d47a2b4ba80d3ca0dd1840632dafb221da199e59dbe3778d3d7303c9e23c6b401f37c076935a5bc2aeae1c4e5feaefe1c371fe2073fd + languageName: node + linkType: hard + "@types/connect@npm:*": version: 3.4.35 resolution: "@types/connect@npm:3.4.35" @@ -17028,6 +17051,15 @@ __metadata: languageName: node linkType: hard +"@types/copy-webpack-plugin@npm:^10.1.0": + version: 10.1.0 + resolution: "@types/copy-webpack-plugin@npm:10.1.0" + dependencies: + copy-webpack-plugin: "npm:*" + checksum: 10/c5012e9725beb34bc07ca47f5861ee0770f0c76fe04e8878142ba5d12aa91c6d330ec777378eb65ff5fbb5f05863a2b1b935318db0f3f2e754c126b181645adf + languageName: node + linkType: hard + "@types/cordova@npm:latest": version: 0.0.34 resolution: "@types/cordova@npm:0.0.34" @@ -17063,6 +17095,18 @@ __metadata: languageName: node linkType: hard +"@types/customize-cra@npm:^1": + version: 1.0.8 + resolution: "@types/customize-cra@npm:1.0.8" + dependencies: + "@types/babel__core": "npm:*" + "@types/webpack": "npm:^4" + "@types/webpack-bundle-analyzer": "npm:^3" + "@types/workbox-webpack-plugin": "npm:^5.1.8" + checksum: 10/16191bb9edbd1d4786ec2ac5ac21b9f4ce656c9b99fc0b696fe3c3a35dc4d0818013ff4978805a173f848d1c1b11bd7ac2b8285f00a10d78926cd63e8ad46d05 + languageName: node + linkType: hard + "@types/debug@npm:4.1.12": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -17335,7 +17379,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:^4.17.18": +"@types/express@npm:^4.17.18, @types/express@npm:^4.17.21": version: 4.17.21 resolution: "@types/express@npm:4.17.21" dependencies: @@ -17850,6 +17894,15 @@ __metadata: languageName: node linkType: hard +"@types/node-forge@npm:^1.3.0": + version: 1.3.11 + resolution: "@types/node-forge@npm:1.3.11" + dependencies: + "@types/node": "npm:*" + checksum: 10/670c9b377c48189186ec415e3c8ed371f141ecc1a79ab71b213b20816adeffecba44dae4f8406cc0d09e6349a4db14eb8c5893f643d8e00fa19fc035cf49dee0 + languageName: node + linkType: hard + "@types/node-vault@npm:0.9.13": version: 0.9.13 resolution: "@types/node-vault@npm:0.9.13" @@ -17924,6 +17977,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^22.6.0": + version: 22.6.0 + resolution: "@types/node@npm:22.6.0" + dependencies: + undici-types: "npm:~6.19.2" + checksum: 10/91f5609de4c3ea5878b550ddcd623395fa16d504839dd9ebf625d2a786d1d157a69bd8fecb7cfc89317d9d1680cbb499d006122706fe7bbea328c583870a2458 + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1": version: 2.4.1 resolution: "@types/normalize-package-data@npm:2.4.1" @@ -18042,6 +18104,13 @@ __metadata: languageName: node linkType: hard +"@types/prop-types@npm:^15.7.12": + version: 15.7.13 + resolution: "@types/prop-types@npm:15.7.13" + checksum: 10/8935cad87c683c665d09a055919d617fe951cb3b2d5c00544e3a913f861a2bd8d2145b51c9aa6d2457d19f3107ab40784c40205e757232f6a80cc8b1c815513c + languageName: node + linkType: hard + "@types/q@npm:^1.5.1": version: 1.5.5 resolution: "@types/q@npm:1.5.5" @@ -18079,6 +18148,15 @@ __metadata: languageName: node linkType: hard +"@types/react-dom@npm:18.3.0": + version: 18.3.0 + resolution: "@types/react-dom@npm:18.3.0" + dependencies: + "@types/react": "npm:*" + checksum: 10/6ff53f5a7b7fba952a68e114d3b542ebdc1e87a794234785ebab0bcd9bde7fb4885f21ebaf93d26dc0a1b5b93287f42cad68b78ae04dddf6b20da7aceff0beaf + languageName: node + linkType: hard + "@types/react-transition-group@npm:^4.4.10": version: 4.4.10 resolution: "@types/react-transition-group@npm:4.4.10" @@ -18088,12 +18166,12 @@ __metadata: languageName: node linkType: hard -"@types/react-transition-group@npm:^4.4.9": - version: 4.4.9 - resolution: "@types/react-transition-group@npm:4.4.9" +"@types/react-transition-group@npm:^4.4.11": + version: 4.4.11 + resolution: "@types/react-transition-group@npm:4.4.11" dependencies: "@types/react": "npm:*" - checksum: 10/74ed0985380544bd1d63d8865a452a859ed7122b35dd2cf919fa7d1f31936345671995d36c89263456f27dbb5940eac8d4607be969e27187102eecff1cc64ba3 + checksum: 10/a7f4de6e5f57d9fcdea027e22873c633f96a803c96d422db8b99a45c36a9cceb7882d152136bbc31c7158fc1827e37aea5070d369724bb71dd11b5687332bc4d languageName: node linkType: hard @@ -18108,25 +18186,24 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:18.2.39": - version: 18.2.39 - resolution: "@types/react@npm:18.2.39" +"@types/react@npm:18.2.43": + version: 18.2.43 + resolution: "@types/react@npm:18.2.43" dependencies: "@types/prop-types": "npm:*" "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 10/870f7774c676ae0f3ab6339a62b3315f5a296e89412358b15a5249a61e781a8807a2253ef7ad2ec98e7a5bea1e8c3ddd95b02226d6b8ac4a085da59b4a496564 + checksum: 10/a9d90a93380bb67623f27eba83e2d05b548109f7eb6fd591f5c4a3716bc257cc7cb078455db7ea4308d5f2ff6b4fe48d9a4a560145d9384069a2b5121bc93937 languageName: node linkType: hard -"@types/react@npm:18.2.43": - version: 18.2.43 - resolution: "@types/react@npm:18.2.43" +"@types/react@npm:18.3.8": + version: 18.3.8 + resolution: "@types/react@npm:18.3.8" dependencies: "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 10/a9d90a93380bb67623f27eba83e2d05b548109f7eb6fd591f5c4a3716bc257cc7cb078455db7ea4308d5f2ff6b4fe48d9a4a560145d9384069a2b5121bc93937 + checksum: 10/75e64e7f481c28e6c8ce6dae12f49ccc3f36c7b10b82da3eb7728ad9c02bec58a2c967105603e38665902e8db9296962c7718bc2062e2cb64a16e92333bd1f4b languageName: node linkType: hard @@ -18210,6 +18287,13 @@ __metadata: languageName: node linkType: hard +"@types/retry@npm:0.12.2": + version: 0.12.2 + resolution: "@types/retry@npm:0.12.2" + checksum: 10/e5675035717b39ce4f42f339657cae9637cf0c0051cf54314a6a2c44d38d91f6544be9ddc0280587789b6afd056be5d99dbe3e9f4df68c286c36321579b1bf4a + languageName: node + linkType: hard + "@types/retry@npm:^0.12.0": version: 0.12.1 resolution: "@types/retry@npm:0.12.1" @@ -18291,6 +18375,15 @@ __metadata: languageName: node linkType: hard +"@types/serve-index@npm:^1.9.4": + version: 1.9.4 + resolution: "@types/serve-index@npm:1.9.4" + dependencies: + "@types/express": "npm:*" + checksum: 10/72727c88d54da5b13275ebfb75dcdc4aa12417bbe9da1939e017c4c5f0c906fae843aa4e0fbfe360e7ee9df2f3d388c21abfc488f77ce58693fb57809f8ded92 + languageName: node + linkType: hard + "@types/serve-static@npm:*": version: 1.13.10 resolution: "@types/serve-static@npm:1.13.10" @@ -18312,6 +18405,17 @@ __metadata: languageName: node linkType: hard +"@types/serve-static@npm:^1.15.5": + version: 1.15.7 + resolution: "@types/serve-static@npm:1.15.7" + dependencies: + "@types/http-errors": "npm:*" + "@types/node": "npm:*" + "@types/send": "npm:*" + checksum: 10/c5a7171d5647f9fbd096ed1a26105759f3153ccf683824d99fee4c7eb9cde2953509621c56a070dd9fb1159e799e86d300cbe4e42245ebc5b0c1767e8ca94a67 + languageName: node + linkType: hard + "@types/shelljs@npm:0.8.11": version: 0.8.11 resolution: "@types/shelljs@npm:0.8.11" @@ -18357,6 +18461,22 @@ __metadata: languageName: node linkType: hard +"@types/sockjs@npm:^0.3.36": + version: 0.3.36 + resolution: "@types/sockjs@npm:0.3.36" + dependencies: + "@types/node": "npm:*" + checksum: 10/b4b5381122465d80ea8b158537c00bc82317222d3fb31fd7229ff25b31fa89134abfbab969118da55622236bf3d8fee75759f3959908b5688991f492008f29bc + languageName: node + linkType: hard + +"@types/source-list-map@npm:*": + version: 0.1.6 + resolution: "@types/source-list-map@npm:0.1.6" + checksum: 10/9cd294c121f1562062de5d241fe4d10780b1131b01c57434845fe50968e9dcf67ede444591c2b1ad6d3f9b6bc646ac02cc8f51a3577c795f9c64cf4573dcc6b1 + languageName: node + linkType: hard + "@types/ssh2-streams@npm:*, @types/ssh2-streams@npm:0.1.9": version: 0.1.9 resolution: "@types/ssh2-streams@npm:0.1.9" @@ -18442,6 +18562,13 @@ __metadata: languageName: node linkType: hard +"@types/tapable@npm:^1": + version: 1.0.12 + resolution: "@types/tapable@npm:1.0.12" + checksum: 10/adfb978a3097154be92c4a92184bb17f86a84473bd871a9a862f81676532ebec86ea61acdce999186447832e32a4d45d591d64b64131dd977ca41508165011d7 + languageName: node + linkType: hard + "@types/tape-promise@npm:4.0.1": version: 4.0.1 resolution: "@types/tape-promise@npm:4.0.1" @@ -18536,6 +18663,15 @@ __metadata: languageName: node linkType: hard +"@types/uglify-js@npm:*": + version: 3.17.5 + resolution: "@types/uglify-js@npm:3.17.5" + dependencies: + source-map: "npm:^0.6.1" + checksum: 10/87368861a3f2df071905d698c9f7a4b825e2f69dd29530283594ccddd155d4a8ff7795021af28a97d938c9557a6ea23bc3d77e076a6cf3e02f6401849e067f61 + languageName: node + linkType: hard + "@types/underscore@npm:*": version: 1.11.15 resolution: "@types/underscore@npm:1.11.15" @@ -18581,6 +18717,47 @@ __metadata: languageName: node linkType: hard +"@types/webpack-bundle-analyzer@npm:^3": + version: 3.9.9 + resolution: "@types/webpack-bundle-analyzer@npm:3.9.9" + dependencies: + "@types/webpack": "npm:^4" + checksum: 10/e5e393c4d48d2a4fd4e68a8536efa7957dba27695ce978c7f2214890c26ecc6c5d806c91f83d16ad0c91a095abc8a57006c70f75cdbff7545de1e2da250a29ba + languageName: node + linkType: hard + +"@types/webpack-sources@npm:*": + version: 3.2.3 + resolution: "@types/webpack-sources@npm:3.2.3" + dependencies: + "@types/node": "npm:*" + "@types/source-list-map": "npm:*" + source-map: "npm:^0.7.3" + checksum: 10/7b557f242efaa10e4e3e18cc4171a0c98e22898570caefdd4f7b076fe8534b5abfac92c953c6604658dcb7218507f970230352511840fe9fdea31a9af3b9a906 + languageName: node + linkType: hard + +"@types/webpack@npm:^4": + version: 4.41.39 + resolution: "@types/webpack@npm:4.41.39" + dependencies: + "@types/node": "npm:*" + "@types/tapable": "npm:^1" + "@types/uglify-js": "npm:*" + "@types/webpack-sources": "npm:*" + anymatch: "npm:^3.0.0" + source-map: "npm:^0.6.0" + checksum: 10/95a4bb66ac5a11e90a515967a01e532efc13504837865824430c5a6fe9e854c0bf650e8c95ba54207bf79e115bbb996fb9f34e5dd99e02e42586d49c9f075b93 + languageName: node + linkType: hard + +"@types/workbox-webpack-plugin@npm:^5.1.8": + version: 5.1.8 + resolution: "@types/workbox-webpack-plugin@npm:5.1.8" + checksum: 10/e2c8b833fa002694dc6d614b58efd472705f90a2b836eab88a4cad26444773e7628ed4f4d1b45ff59f2a7b9336876e28076b36a8a7e33273452b91fb0878e2f1 + languageName: node + linkType: hard + "@types/ws@npm:8.5.3, @types/ws@npm:^8.2.2": version: 8.5.3 resolution: "@types/ws@npm:8.5.3" @@ -18590,6 +18767,15 @@ __metadata: languageName: node linkType: hard +"@types/ws@npm:^8.5.10": + version: 8.5.12 + resolution: "@types/ws@npm:8.5.12" + dependencies: + "@types/node": "npm:*" + checksum: 10/d8a3ddfb5ff8fea992a043113579d61ac1ea21e8464415af9e2b01b205ed19d817821ad64ca1b3a90062d1df1c23b0f586d8351d25ca6728844df99a74e8f76d + languageName: node + linkType: hard + "@types/ws@npm:^8.5.4": version: 8.5.8 resolution: "@types/ws@npm:8.5.8" @@ -19389,6 +19575,16 @@ __metadata: languageName: node linkType: hard +"@webpack-cli/configtest@npm:^2.1.1": + version: 2.1.1 + resolution: "@webpack-cli/configtest@npm:2.1.1" + peerDependencies: + webpack: 5.x.x + webpack-cli: 5.x.x + checksum: 10/9f9f9145c2d05471fc83d426db1df85cf49f329836b0c4b9f46b6948bed4b013464c00622b136d2a0a26993ce2306976682592245b08ee717500b1db45009a72 + languageName: node + linkType: hard + "@webpack-cli/info@npm:^1.5.0": version: 1.5.0 resolution: "@webpack-cli/info@npm:1.5.0" @@ -19400,6 +19596,16 @@ __metadata: languageName: node linkType: hard +"@webpack-cli/info@npm:^2.0.2": + version: 2.0.2 + resolution: "@webpack-cli/info@npm:2.0.2" + peerDependencies: + webpack: 5.x.x + webpack-cli: 5.x.x + checksum: 10/8f9a178afca5c82e113aed1efa552d64ee5ae4fdff63fe747c096a981ec74f18a5d07bd6e89bbe6715c3e57d96eea024a410e58977169489fe1df044c10dd94e + languageName: node + linkType: hard + "@webpack-cli/serve@npm:^1.7.0": version: 1.7.0 resolution: "@webpack-cli/serve@npm:1.7.0" @@ -19412,6 +19618,19 @@ __metadata: languageName: node linkType: hard +"@webpack-cli/serve@npm:^2.0.5": + version: 2.0.5 + resolution: "@webpack-cli/serve@npm:2.0.5" + peerDependencies: + webpack: 5.x.x + webpack-cli: 5.x.x + peerDependenciesMeta: + webpack-dev-server: + optional: true + checksum: 10/20424e5c1e664e4d7ab11facee7033bb729f6acd86493138069532934c1299c1426da72942822dedb00caca8fc60cc8aec1626e610ee0e8a9679e3614f555860 + languageName: node + linkType: hard + "@wessberg/ts-evaluator@npm:0.0.27": version: 0.0.27 resolution: "@wessberg/ts-evaluator@npm:0.0.27" @@ -19931,7 +20150,7 @@ __metadata: languageName: node linkType: hard -"ajv-keywords@npm:^5.0.0": +"ajv-keywords@npm:^5.0.0, ajv-keywords@npm:^5.1.0": version: 5.1.0 resolution: "ajv-keywords@npm:5.1.0" dependencies: @@ -19954,7 +20173,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.14.0": +"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.14.0, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -20190,6 +20409,16 @@ __metadata: languageName: node linkType: hard +"anymatch@npm:^3.0.0": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + "anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" @@ -20816,7 +21045,7 @@ __metadata: languageName: node linkType: hard -"arrify@npm:^1.0.0, arrify@npm:^1.0.1": +"arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" checksum: 10/745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 @@ -21996,6 +22225,16 @@ __metadata: languageName: node linkType: hard +"bonjour-service@npm:^1.2.1": + version: 1.2.1 + resolution: "bonjour-service@npm:1.2.1" + dependencies: + fast-deep-equal: "npm:^3.1.3" + multicast-dns: "npm:^7.2.5" + checksum: 10/8350d135ab8dd998a829136984d7f74bfc0667b162ab99ac98bae54d72ff7a6003c6fb7911739dfba7c56a113bd6ab06a4d4fe6719b18e66592c345663e7d923 + languageName: node + linkType: hard + "boolbase@npm:^1.0.0": version: 1.0.0 resolution: "boolbase@npm:1.0.0" @@ -22381,7 +22620,7 @@ __metadata: languageName: node linkType: hard -"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": +"buffer-from@npm:1.1.2, buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb @@ -22513,6 +22752,15 @@ __metadata: languageName: node linkType: hard +"bundle-name@npm:^4.1.0": + version: 4.1.0 + resolution: "bundle-name@npm:4.1.0" + dependencies: + run-applescript: "npm:^7.0.0" + checksum: 10/1d966c8d2dbf4d9d394e53b724ac756c2414c45c01340b37743621f59cc565a435024b394ddcb62b9b335d1c9a31f4640eb648c3fec7f97ee74dc0694c9beb6c + languageName: node + linkType: hard + "busboy@npm:^1.0.0, busboy@npm:^1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -23314,6 +23562,25 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:^3.6.0": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/c327fb07704443f8d15f7b4a7ce93b2f0bc0e6cea07ec28a7570aa22cd51fcf0379df589403976ea956c369f25aa82d84561947e227cd925902e1751371658df + languageName: node + linkType: hard + "chownr@npm:^1.1.1, chownr@npm:^1.1.4": version: 1.1.4 resolution: "chownr@npm:1.1.4" @@ -23711,13 +23978,6 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^2.0.0": - version: 2.0.0 - resolution: "clsx@npm:2.0.0" - checksum: 10/943766d1b02fee3538c871e56638d87f973fbc2d6291ce221215ea436fdecb9be97ad323f411839c2d52c45640c449b1a53fbfe7e8b3d529b4e263308b630c9a - languageName: node - linkType: hard - "clsx@npm:^2.1.0": version: 2.1.0 resolution: "clsx@npm:2.1.0" @@ -23725,6 +23985,13 @@ __metadata: languageName: node linkType: hard +"clsx@npm:^2.1.1": + version: 2.1.1 + resolution: "clsx@npm:2.1.1" + checksum: 10/cdfb57fa6c7649bbff98d9028c2f0de2f91c86f551179541cf784b1cfdc1562dcb951955f46d54d930a3879931a980e32a46b598acaea274728dbe068deca919 + languageName: node + linkType: hard + "cmd-shim@npm:^6.0.0": version: 6.0.1 resolution: "cmd-shim@npm:6.0.1" @@ -24538,6 +24805,22 @@ __metadata: languageName: node linkType: hard +"copy-webpack-plugin@npm:*, copy-webpack-plugin@npm:^12.0.2": + version: 12.0.2 + resolution: "copy-webpack-plugin@npm:12.0.2" + dependencies: + fast-glob: "npm:^3.3.2" + glob-parent: "npm:^6.0.1" + globby: "npm:^14.0.0" + normalize-path: "npm:^3.0.0" + schema-utils: "npm:^4.2.0" + serialize-javascript: "npm:^6.0.2" + peerDependencies: + webpack: ^5.1.0 + checksum: 10/674725d4d9556b7b9a32bb85393532ef2bb75ffce785d942681b3575a86d900751f67cebbb089ddd050757f58c84edc18732e17880f12c45c9775ca94328526c + languageName: node + linkType: hard + "copy-webpack-plugin@npm:11.0.0": version: 11.0.0 resolution: "copy-webpack-plugin@npm:11.0.0" @@ -25243,6 +25526,30 @@ __metadata: languageName: node linkType: hard +"css-loader@npm:^7.1.2": + version: 7.1.2 + resolution: "css-loader@npm:7.1.2" + dependencies: + icss-utils: "npm:^5.1.0" + postcss: "npm:^8.4.33" + postcss-modules-extract-imports: "npm:^3.1.0" + postcss-modules-local-by-default: "npm:^4.0.5" + postcss-modules-scope: "npm:^3.2.0" + postcss-modules-values: "npm:^4.0.0" + postcss-value-parser: "npm:^4.2.0" + semver: "npm:^7.5.4" + peerDependencies: + "@rspack/core": 0.x || 1.x + webpack: ^5.27.0 + peerDependenciesMeta: + "@rspack/core": + optional: true + webpack: + optional: true + checksum: 10/ddde22fb103888320f60a1414a6a04638d2e9760a532a52d03c45e6e2830b32dd76c734aeef426f78dd95b2d15f77eeec3854ac53061aff02569732dc6e6801c + languageName: node + linkType: hard + "css-minimizer-webpack-plugin@npm:^3.2.0": version: 3.4.1 resolution: "css-minimizer-webpack-plugin@npm:3.4.1" @@ -25488,13 +25795,6 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.1.2": - version: 3.1.2 - resolution: "csstype@npm:3.1.2" - checksum: 10/1f39c541e9acd9562996d88bc9fb62d1cb234786ef11ed275567d4b2bd82e1ceacde25debc8de3d3b4871ae02c2933fa02614004c97190711caebad6347debc2 - languageName: node - linkType: hard - "csstype@npm:^3.1.3": version: 3.1.3 resolution: "csstype@npm:3.1.3" @@ -25557,6 +25857,15 @@ __metadata: languageName: node linkType: hard +"customize-cra@npm:^1.0.0": + version: 1.0.0 + resolution: "customize-cra@npm:1.0.0" + dependencies: + lodash.flow: "npm:^3.5.0" + checksum: 10/978acd4fa5be592813dc1cba3bad25fd41bc09d12893639c20ac1b24e29ec1bd932223510dca4977cdedc85d84a7ab5762b66f887396ba60f77aa525225e23e0 + languageName: node + linkType: hard + "cycle@npm:1.0.x": version: 1.0.3 resolution: "cycle@npm:1.0.3" @@ -26035,6 +26344,23 @@ __metadata: languageName: node linkType: hard +"default-browser-id@npm:^5.0.0": + version: 5.0.0 + resolution: "default-browser-id@npm:5.0.0" + checksum: 10/185bfaecec2c75fa423544af722a3469b20704c8d1942794a86e4364fe7d9e8e9f63241a5b769d61c8151993bc65833a5b959026fa1ccea343b3db0a33aa6deb + languageName: node + linkType: hard + +"default-browser@npm:^5.2.1": + version: 5.2.1 + resolution: "default-browser@npm:5.2.1" + dependencies: + bundle-name: "npm:^4.1.0" + default-browser-id: "npm:^5.0.0" + checksum: 10/afab7eff7b7f5f7a94d9114d1ec67273d3fbc539edf8c0f80019879d53aa71e867303c6f6d7cffeb10a6f3cfb59d4f963dba3f9c96830b4540cc7339a1bf9840 + languageName: node + linkType: hard + "default-gateway@npm:^6.0.0, default-gateway@npm:^6.0.3": version: 6.0.3 resolution: "default-gateway@npm:6.0.3" @@ -26161,6 +26487,13 @@ __metadata: languageName: node linkType: hard +"define-lazy-prop@npm:^3.0.0": + version: 3.0.0 + resolution: "define-lazy-prop@npm:3.0.0" + checksum: 10/f28421cf9ee86eecaf5f3b8fe875f13d7009c2625e97645bfff7a2a49aca678270b86c39f9c32939e5ca7ab96b551377ed4139558c795e076774287ad3af1aa4 + languageName: node + linkType: hard + "define-properties@npm:^1.1.3": version: 1.1.3 resolution: "define-properties@npm:1.1.3" @@ -26562,7 +26895,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^3.0.0, diff@npm:^3.1.0, diff@npm:^3.5.0": +"diff@npm:^3.0.0, diff@npm:^3.5.0": version: 3.5.0 resolution: "diff@npm:3.5.0" checksum: 10/cfbc2df98d6f8eb82c0f7735c8468695f65189d31f95a708d4c97cd96a8083fdfd83d87a067a29924ae7d8ff64f578e7da78391af537815750268555fe0df9f0 @@ -29929,7 +30262,7 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.16.3": +"express@npm:^4.16.3, express@npm:^4.19.2": version: 4.21.1 resolution: "express@npm:4.21.1" dependencies: @@ -32294,7 +32627,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^14.0.2": +"globby@npm:^14.0.0, globby@npm:^14.0.2": version: 14.0.2 resolution: "globby@npm:14.0.2" dependencies: @@ -33289,6 +33622,13 @@ __metadata: languageName: node linkType: hard +"html-entities@npm:^2.4.0": + version: 2.5.2 + resolution: "html-entities@npm:2.5.2" + checksum: 10/4ec12ebdf2d5ba8192c68e1aef3c1e4a4f36b29246a0a88464fe278a54517d0196d3489af46a3145c7ecacb4fc5fd50497be19eb713b810acab3f0efcf36fdc2 + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -33328,6 +33668,27 @@ __metadata: languageName: node linkType: hard +"html-webpack-plugin@npm:^5.6.0": + version: 5.6.0 + resolution: "html-webpack-plugin@npm:5.6.0" + dependencies: + "@types/html-minifier-terser": "npm:^6.0.0" + html-minifier-terser: "npm:^6.0.2" + lodash: "npm:^4.17.21" + pretty-error: "npm:^4.0.0" + tapable: "npm:^2.0.0" + peerDependencies: + "@rspack/core": 0.x || 1.x + webpack: ^5.20.0 + peerDependenciesMeta: + "@rspack/core": + optional: true + webpack: + optional: true + checksum: 10/d651f3a88a7c932c72c6a30f0fdd610b49a864a69f1ddb34562c750f1602ea471e27fd8fc32c01adadd484b38fa6b74f055d1ccce26e5f8fcf814ee0d398a121 + languageName: node + linkType: hard + "htmlparser2@npm:^6.0.0, htmlparser2@npm:^6.1.0": version: 6.1.0 resolution: "htmlparser2@npm:6.1.0" @@ -34228,6 +34589,13 @@ __metadata: languageName: node linkType: hard +"interpret@npm:^3.1.1": + version: 3.1.1 + resolution: "interpret@npm:3.1.1" + checksum: 10/bc9e11126949c4e6ff49b0b819e923a9adc8e8bf3f9d4f2d782de6d5f592774f6fee4457c10bd08c6a2146b4baee460ccb242c99e5397defa9c846af0d00505a + languageName: node + linkType: hard + "into-stream@npm:^6.0.0": version: 6.0.0 resolution: "into-stream@npm:6.0.0" @@ -34332,6 +34700,13 @@ __metadata: languageName: node linkType: hard +"ipaddr.js@npm:^2.1.0": + version: 2.2.0 + resolution: "ipaddr.js@npm:2.2.0" + checksum: 10/9e1cdd9110b3bca5d910ab70d7fb1933e9c485d9b92cb14ef39f30c412ba3fe02a553921bf696efc7149cc653453c48ccf173adb996ec27d925f1f340f872986 + languageName: node + linkType: hard + "ipfs-core-types@npm:0.14.1, ipfs-core-types@npm:^0.14.1": version: 0.14.1 resolution: "ipfs-core-types@npm:0.14.1" @@ -34683,6 +35058,15 @@ __metadata: languageName: node linkType: hard +"is-docker@npm:^3.0.0": + version: 3.0.0 + resolution: "is-docker@npm:3.0.0" + bin: + is-docker: cli.js + checksum: 10/b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90 + languageName: node + linkType: hard + "is-dotfile@npm:^1.0.0": version: 1.0.3 resolution: "is-dotfile@npm:1.0.3" @@ -34823,6 +35207,17 @@ __metadata: languageName: node linkType: hard +"is-inside-container@npm:^1.0.0": + version: 1.0.0 + resolution: "is-inside-container@npm:1.0.0" + dependencies: + is-docker: "npm:^3.0.0" + bin: + is-inside-container: cli.js + checksum: 10/c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 + languageName: node + linkType: hard + "is-installed-globally@npm:^0.4.0": version: 0.4.0 resolution: "is-installed-globally@npm:0.4.0" @@ -34930,6 +35325,13 @@ __metadata: languageName: node linkType: hard +"is-network-error@npm:^1.0.0": + version: 1.1.0 + resolution: "is-network-error@npm:1.1.0" + checksum: 10/b2fe6aac07f814a9de275efd05934c832c129e7ba292d27614e9e8eec9e043b7a0bbeaeca5d0916b0f462edbec2aa2eaee974ee0a12ac095040e9515c222c251 + languageName: node + linkType: hard + "is-npm@npm:^5.0.0": version: 5.0.0 resolution: "is-npm@npm:5.0.0" @@ -35375,6 +35777,15 @@ __metadata: languageName: node linkType: hard +"is-wsl@npm:^3.1.0": + version: 3.1.0 + resolution: "is-wsl@npm:3.1.0" + dependencies: + is-inside-container: "npm:^1.0.0" + checksum: 10/f9734c81f2f9cf9877c5db8356bfe1ff61680f1f4c1011e91278a9c0564b395ae796addb4bf33956871041476ec82c3e5260ed57b22ac91794d4ae70a1d2f0a9 + languageName: node + linkType: hard + "is-yarn-global@npm:^0.3.0": version: 0.3.0 resolution: "is-yarn-global@npm:0.3.0" @@ -37919,6 +38330,16 @@ __metadata: languageName: node linkType: hard +"launch-editor@npm:^2.6.1": + version: 2.9.1 + resolution: "launch-editor@npm:2.9.1" + dependencies: + picocolors: "npm:^1.0.0" + shell-quote: "npm:^1.8.1" + checksum: 10/69eb1e69db4f0fcd34a42bd47e9adbad27cb5413408fcc746eb7b016128ce19d71a30629534b17aa5886488936aaa959bf7dab17307ad5ed6c7247a0d145be18 + languageName: node + linkType: hard + "lcid@npm:^1.0.0": version: 1.0.0 resolution: "lcid@npm:1.0.0" @@ -38765,6 +39186,13 @@ __metadata: languageName: node linkType: hard +"lodash.flow@npm:^3.5.0": + version: 3.5.0 + resolution: "lodash.flow@npm:3.5.0" + checksum: 10/da39497f388971e1949607882e608d5b2306f025f0b5cc3953f2c25fca7db5a8dba23bd3ddeaed4b0dbd2d44c5aaa6f6f12016b5511b08a3d61de1e1c1f59eb7 + languageName: node + linkType: hard + "lodash.get@npm:^4.4.2": version: 4.4.2 resolution: "lodash.get@npm:4.4.2" @@ -42678,6 +43106,18 @@ __metadata: languageName: node linkType: hard +"open@npm:^10.0.3": + version: 10.1.0 + resolution: "open@npm:10.1.0" + dependencies: + default-browser: "npm:^5.2.1" + define-lazy-prop: "npm:^3.0.0" + is-inside-container: "npm:^1.0.0" + is-wsl: "npm:^3.1.0" + checksum: 10/a9c4105243a1b3c5312bf2aeb678f78d31f00618b5100088ee01eed2769963ea1f2dd464ac8d93cef51bba2d911e1a9c0c34a753ec7b91d6b22795903ea6647a + languageName: node + linkType: hard + "open@npm:^8.0.9": version: 8.4.0 resolution: "open@npm:8.4.0" @@ -43115,6 +43555,17 @@ __metadata: languageName: node linkType: hard +"p-retry@npm:^6.2.0": + version: 6.2.0 + resolution: "p-retry@npm:6.2.0" + dependencies: + "@types/retry": "npm:0.12.2" + is-network-error: "npm:^1.0.0" + retry: "npm:^0.13.1" + checksum: 10/1a5ac16828c96c03c354f78d643dfc7aa8f8b998e1b60e27533da2c75e5cabfb1c7f88ce312e813e09a80b056011fbb372d384132e9c92d27d052bd7c282a978 + languageName: node + linkType: hard + "p-timeout@npm:^1.1.1": version: 1.2.1 resolution: "p-timeout@npm:1.2.1" @@ -44764,6 +45215,15 @@ __metadata: languageName: node linkType: hard +"postcss-modules-extract-imports@npm:^3.1.0": + version: 3.1.0 + resolution: "postcss-modules-extract-imports@npm:3.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/00bfd3aff045fc13ded8e3bbfd8dfc73eff9a9708db1b2a132266aef6544c8d2aee7a5d7e021885f6f9bbd5565a9a9ab52990316e21ad9468a2534f87df8e849 + languageName: node + linkType: hard + "postcss-modules-local-by-default@npm:^4.0.3": version: 4.0.3 resolution: "postcss-modules-local-by-default@npm:4.0.3" @@ -44777,7 +45237,7 @@ __metadata: languageName: node linkType: hard -"postcss-modules-local-by-default@npm:^4.0.4": +"postcss-modules-local-by-default@npm:^4.0.4, postcss-modules-local-by-default@npm:^4.0.5": version: 4.0.5 resolution: "postcss-modules-local-by-default@npm:4.0.5" dependencies: @@ -44801,7 +45261,7 @@ __metadata: languageName: node linkType: hard -"postcss-modules-scope@npm:^3.1.1": +"postcss-modules-scope@npm:^3.1.1, postcss-modules-scope@npm:^3.2.0": version: 3.2.0 resolution: "postcss-modules-scope@npm:3.2.0" dependencies: @@ -46258,6 +46718,19 @@ __metadata: languageName: node linkType: hard +"react-app-rewired@npm:^2.2.1": + version: 2.2.1 + resolution: "react-app-rewired@npm:2.2.1" + dependencies: + semver: "npm:^5.6.0" + peerDependencies: + react-scripts: ">=2.1.3" + bin: + react-app-rewired: bin/index.js + checksum: 10/4ce0b5ea9537b8d2e123146ac023295a68e3952bc63b90426a1f95fc777b0c15067ec5f382962d30bb957d30c5928ae90f3499d5911d03a2202253fd84e55fb2 + languageName: node + linkType: hard + "react-dev-utils@npm:^12.0.1": version: 12.0.1 resolution: "react-dev-utils@npm:12.0.1" @@ -46312,6 +46785,18 @@ __metadata: languageName: node linkType: hard +"react-dom@npm:18.3.1": + version: 18.3.1 + resolution: "react-dom@npm:18.3.1" + dependencies: + loose-envify: "npm:^1.1.0" + scheduler: "npm:^0.23.2" + peerDependencies: + react: ^18.3.1 + checksum: 10/3f4b73a3aa083091173b29812b10394dd06f4ac06aff410b74702cfb3aa29d7b0ced208aab92d5272919b612e5cda21aeb1d54191848cf6e46e9e354f3541f81 + languageName: node + linkType: hard + "react-error-overlay@npm:^6.0.11": version: 6.0.11 resolution: "react-error-overlay@npm:6.0.11" @@ -46347,6 +46832,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:^18.3.1": + version: 18.3.1 + resolution: "react-is@npm:18.3.1" + checksum: 10/d5f60c87d285af24b1e1e7eaeb123ec256c3c8bdea7061ab3932e3e14685708221bf234ec50b21e10dd07f008f1b966a2730a0ce4ff67905b3872ff2042aec22 + languageName: node + linkType: hard + "react-native-fetch-api@npm:^3.0.0": version: 3.0.0 resolution: "react-native-fetch-api@npm:3.0.0" @@ -46533,6 +47025,15 @@ __metadata: languageName: node linkType: hard +"react@npm:18.3.1": + version: 18.3.1 + resolution: "react@npm:18.3.1" + dependencies: + loose-envify: "npm:^1.1.0" + checksum: 10/261137d3f3993eaa2368a83110466fc0e558bc2c7f7ae7ca52d94f03aac945f45146bd85e5f481044db1758a1dbb57879e2fcdd33924e2dde1bdc550ce73f7bf + languageName: node + linkType: hard + "react@npm:^17.0.2": version: 17.0.2 resolution: "react@npm:17.0.2" @@ -48122,6 +48623,13 @@ __metadata: languageName: node linkType: hard +"run-applescript@npm:^7.0.0": + version: 7.0.0 + resolution: "run-applescript@npm:7.0.0" + checksum: 10/b02462454d8b182ad4117e5d4626e9e6782eb2072925c9fac582170b0627ae3c1ea92ee9b2df7daf84b5e9ffe14eb1cf5fb70bc44b15c8a0bfcdb47987e2410c + languageName: node + linkType: hard + "run-async@npm:^0.1.0": version: 0.1.0 resolution: "run-async@npm:0.1.0" @@ -48564,6 +49072,15 @@ __metadata: languageName: node linkType: hard +"scheduler@npm:^0.23.2": + version: 0.23.2 + resolution: "scheduler@npm:0.23.2" + dependencies: + loose-envify: "npm:^1.1.0" + checksum: 10/e8d68b89d18d5b028223edf090092846868a765a591944760942b77ea1f69b17235f7e956696efbb62c8130ab90af7e0949bfb8eba7896335507317236966bc9 + languageName: node + linkType: hard + "schema-utils@npm:2.7.0": version: 2.7.0 resolution: "schema-utils@npm:2.7.0" @@ -48620,6 +49137,18 @@ __metadata: languageName: node linkType: hard +"schema-utils@npm:^4.2.0": + version: 4.2.0 + resolution: "schema-utils@npm:4.2.0" + dependencies: + "@types/json-schema": "npm:^7.0.9" + ajv: "npm:^8.9.0" + ajv-formats: "npm:^2.1.1" + ajv-keywords: "npm:^5.1.0" + checksum: 10/808784735eeb153ab7f3f787f840aa3bc63f423d2a5a7e96c9e70a0e53d0bc62d7b37ea396fc598ce19196e4fb86a72f897154b7c6ce2358bbc426166f205e14 + languageName: node + linkType: hard + "scrypt-js@npm:2.0.4": version: 2.0.4 resolution: "scrypt-js@npm:2.0.4" @@ -48707,6 +49236,16 @@ __metadata: languageName: node linkType: hard +"selfsigned@npm:^2.4.1": + version: 2.4.1 + resolution: "selfsigned@npm:2.4.1" + dependencies: + "@types/node-forge": "npm:^1.3.0" + node-forge: "npm:^1" + checksum: 10/52536623f1cfdeb2f8b9198377f2ce7931c677ea69421238d1dc1ea2983bbe258e56c19e7d1af87035cad7270f19b7e996eaab1212e724d887722502f68e17f2 + languageName: node + linkType: hard + "semaphore@npm:>=1.0.1, semaphore@npm:^1.1.0": version: 1.1.0 resolution: "semaphore@npm:1.1.0" @@ -49096,7 +49635,7 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.7.3": +"shell-quote@npm:^1.7.3, shell-quote@npm:^1.8.1": version: 1.8.1 resolution: "shell-quote@npm:1.8.1" checksum: 10/af19ab5a1ec30cb4b2f91fd6df49a7442d5c4825a2e269b3712eded10eedd7f9efeaab96d57829880733fc55bcdd8e9b1d8589b4befb06667c731d08145e274d @@ -49787,7 +50326,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:0.7.4, source-map@npm:^0.7.3": +"source-map@npm:0.7.4, source-map@npm:^0.7.3, source-map@npm:^0.7.4": version: 0.7.4 resolution: "source-map@npm:0.7.4" checksum: 10/a0f7c9b797eda93139842fd28648e868a9a03ea0ad0d9fa6602a0c1f17b7fb6a7dcca00c144476cccaeaae5042e99a285723b1a201e844ad67221bf5d428f1dc @@ -50881,6 +51420,15 @@ __metadata: languageName: node linkType: hard +"style-loader@npm:^4.0.0": + version: 4.0.0 + resolution: "style-loader@npm:4.0.0" + peerDependencies: + webpack: ^5.27.0 + checksum: 10/93f25b7e70cfca9d1d8427170384262b59a5b0e84e7191a5a26636a77799caeed46d9a3e45ee7b9afa0f69176e3b98d5a6c5e81593ff1fd0946f1c5682fd2a68 + languageName: node + linkType: hard + "stylehacks@npm:^5.1.1": version: 5.1.1 resolution: "stylehacks@npm:5.1.1" @@ -52320,6 +52868,22 @@ __metadata: languageName: node linkType: hard +"ts-loader@npm:^9.5.1": + version: 9.5.1 + resolution: "ts-loader@npm:9.5.1" + dependencies: + chalk: "npm:^4.1.0" + enhanced-resolve: "npm:^5.0.0" + micromatch: "npm:^4.0.0" + semver: "npm:^7.3.4" + source-map: "npm:^0.7.4" + peerDependencies: + typescript: "*" + webpack: ^5.0.0 + checksum: 10/a85d43bb6f72858d613290ac02d1d24e81c38ba2dcb98b90465dc97eb6c2036bf9a389542c1a7865548643e7ed39f063fdff2dbb3e5aafbc511de6a3eb275adf + languageName: node + linkType: hard + "ts-node@npm:10.9.1, ts-node@npm:^10.8.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1" @@ -52358,21 +52922,41 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:7.0.1": - version: 7.0.1 - resolution: "ts-node@npm:7.0.1" +"ts-node@npm:10.9.2, ts-node@npm:^10.9.2": + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" dependencies: - arrify: "npm:^1.0.0" - buffer-from: "npm:^1.1.0" - diff: "npm:^3.1.0" + "@cspotcode/source-map-support": "npm:^0.8.0" + "@tsconfig/node10": "npm:^1.0.7" + "@tsconfig/node12": "npm:^1.0.7" + "@tsconfig/node14": "npm:^1.0.0" + "@tsconfig/node16": "npm:^1.0.2" + acorn: "npm:^8.4.1" + acorn-walk: "npm:^8.1.1" + arg: "npm:^4.1.0" + create-require: "npm:^1.1.0" + diff: "npm:^4.0.1" make-error: "npm:^1.1.1" - minimist: "npm:^1.2.0" - mkdirp: "npm:^0.5.1" - source-map-support: "npm:^0.5.6" - yn: "npm:^2.0.0" + v8-compile-cache-lib: "npm:^3.0.1" + yn: "npm:3.1.1" + peerDependencies: + "@swc/core": ">=1.2.50" + "@swc/wasm": ">=1.2.50" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true bin: ts-node: dist/bin.js - checksum: 10/c1e0f1582867c34a03a25b1861e86922b9576931d473d48cd13275400832972350c4564e5f2c2df5817be6acbbb8e1dedf43bdd6f8c0f06b15d3530562a08a90 + ts-node-cwd: dist/bin-cwd.js + ts-node-esm: dist/bin-esm.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/a91a15b3c9f76ac462f006fa88b6bfa528130dcfb849dd7ef7f9d640832ab681e235b8a2bc58ecde42f72851cc1d5d4e22c901b0c11aa51001ea1d395074b794 languageName: node linkType: hard @@ -53069,6 +53653,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.6.2": + version: 5.6.2 + resolution: "typescript@npm:5.6.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/f95365d4898f357823e93d334ecda9fcade54f009b397c7d05b7621cd9e865981033cf89ccde0f3e3a7b73b1fdbae18e92bc77db237b43e912f053fef0f9a53b + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A4.5.2#optional!builtin": version: 4.5.2 resolution: "typescript@patch:typescript@npm%3A4.5.2#optional!builtin::version=4.5.2&hash=f1b8ea" @@ -53109,6 +53703,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": + version: 5.6.2 + resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=379a07" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/060a7349adf698477b411be4ace470aee6c2c1bd99917fdf5d33697c17ec55c64fe724eb10399387530b50e9913b41528dd8bfcca0a5fc8f8bac63fbb4580a2e + languageName: node + linkType: hard + "uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0": version: 2.1.0 resolution: "uc.micro@npm:2.1.0" @@ -54142,13 +54746,6 @@ __metadata: languageName: node linkType: hard -"web-vitals@npm:2.1.4": - version: 2.1.4 - resolution: "web-vitals@npm:2.1.4" - checksum: 10/8d6fae84d0e4f2ea1d6da40067d8e6fd560df2a06a9f9484dbbd7a25eb5c961b97f66f2043c941866753465e0f00748773f33d3c88d8fd191e901a7207711ff1 - languageName: node - linkType: hard - "web3-bzz@npm:1.10.0": version: 1.10.0 resolution: "web3-bzz@npm:1.10.0" @@ -56523,6 +57120,38 @@ __metadata: languageName: node linkType: hard +"webpack-cli@npm:5.1.4": + version: 5.1.4 + resolution: "webpack-cli@npm:5.1.4" + dependencies: + "@discoveryjs/json-ext": "npm:^0.5.0" + "@webpack-cli/configtest": "npm:^2.1.1" + "@webpack-cli/info": "npm:^2.0.2" + "@webpack-cli/serve": "npm:^2.0.5" + colorette: "npm:^2.0.14" + commander: "npm:^10.0.1" + cross-spawn: "npm:^7.0.3" + envinfo: "npm:^7.7.3" + fastest-levenshtein: "npm:^1.0.12" + import-local: "npm:^3.0.2" + interpret: "npm:^3.1.1" + rechoir: "npm:^0.8.0" + webpack-merge: "npm:^5.7.3" + peerDependencies: + webpack: 5.x.x + peerDependenciesMeta: + "@webpack-cli/generators": + optional: true + webpack-bundle-analyzer: + optional: true + webpack-dev-server: + optional: true + bin: + webpack-cli: bin/cli.js + checksum: 10/9ac3ae7c43b032051de2803d751bd3b44e1f226b931dcd56066a8e01b12734d49730903df9235e1eb1b67b2ee7451faf24a219c8f4a229c4f42c42e827eac44c + languageName: node + linkType: hard + "webpack-dev-middleware@npm:>=6.1.2": version: 7.2.1 resolution: "webpack-dev-middleware@npm:7.2.1" @@ -56589,6 +57218,51 @@ __metadata: languageName: node linkType: hard +"webpack-dev-server@npm:^5.1.0": + version: 5.1.0 + resolution: "webpack-dev-server@npm:5.1.0" + dependencies: + "@types/bonjour": "npm:^3.5.13" + "@types/connect-history-api-fallback": "npm:^1.5.4" + "@types/express": "npm:^4.17.21" + "@types/serve-index": "npm:^1.9.4" + "@types/serve-static": "npm:^1.15.5" + "@types/sockjs": "npm:^0.3.36" + "@types/ws": "npm:^8.5.10" + ansi-html-community: "npm:^0.0.8" + bonjour-service: "npm:^1.2.1" + chokidar: "npm:^3.6.0" + colorette: "npm:^2.0.10" + compression: "npm:^1.7.4" + connect-history-api-fallback: "npm:^2.0.0" + express: "npm:^4.19.2" + graceful-fs: "npm:^4.2.6" + html-entities: "npm:^2.4.0" + http-proxy-middleware: "npm:^2.0.3" + ipaddr.js: "npm:^2.1.0" + launch-editor: "npm:^2.6.1" + open: "npm:^10.0.3" + p-retry: "npm:^6.2.0" + schema-utils: "npm:^4.2.0" + selfsigned: "npm:^2.4.1" + serve-index: "npm:^1.9.1" + sockjs: "npm:^0.3.24" + spdy: "npm:^4.0.2" + webpack-dev-middleware: "npm:^7.4.2" + ws: "npm:^8.18.0" + peerDependencies: + webpack: ^5.0.0 + peerDependenciesMeta: + webpack: + optional: true + webpack-cli: + optional: true + bin: + webpack-dev-server: bin/webpack-dev-server.js + checksum: 10/f23255681cc5e2c2709b23ca7b2185aeed83b1c9912657d4512eda8685625a46d7a103a92446494a55fe2afdfab936f9bd4f037d20b52f7fdfff303e7e7199c7 + languageName: node + linkType: hard + "webpack-manifest-plugin@npm:^4.0.2": version: 4.1.1 resolution: "webpack-manifest-plugin@npm:4.1.1" @@ -56748,7 +57422,7 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5.95.0": +"webpack@npm:5.95.0, webpack@npm:^5.94.0": version: 5.95.0 resolution: "webpack@npm:5.95.0" dependencies: @@ -58078,13 +58752,6 @@ __metadata: languageName: node linkType: hard -"yn@npm:^2.0.0": - version: 2.0.0 - resolution: "yn@npm:2.0.0" - checksum: 10/9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 - languageName: node - linkType: hard - "yn@npm:^4.0.0": version: 4.0.0 resolution: "yn@npm:4.0.0" From 97916a4469a6202ed75e0b206d4f0c67178e36be Mon Sep 17 00:00:00 2001 From: Eduardo Vasques Date: Mon, 28 Oct 2024 16:56:18 -0100 Subject: [PATCH 43/49] feat(satp-hermes): bungee & ethereum bridge * added logic for satp-bridge supporting the ethereum connector * finished the integration with bungee * changed common stringify for safeStableStringify across the package * added test for the new bridge & end-to-end tests for the new features * fabric-connector: fix bug handling empty read-write sets * bungee: strategy fabric fix bug handling empty read-write sets * bungee: hole package introduce safeStableStringify * ethereum-connector: bump web3 packages versions to fix (https://github.com/web3/web3.js/issues/6798) Signed-off-by: Eduardo Vasques --- .../cbdc-bridging-app-dummy-infrastructure.ts | 3 + .../cactus-plugin-bungee-hermes/package.json | 1 + .../main/typescript/plugin-bungee-hermes.ts | 14 +- .../main/typescript/strategy/strategy-besu.ts | 6 +- .../typescript/strategy/strategy-ethereum.ts | 6 +- .../typescript/strategy/strategy-fabric.ts | 26 +- .../main/typescript/view-creation/proof.ts | 4 +- .../main/typescript/view-creation/snapshot.ts | 3 +- .../main/typescript/view-creation/state.ts | 5 +- .../view-creation/transaction-proof.ts | 3 +- .../typescript/view-creation/transaction.ts | 3 +- .../src/main/typescript/view-creation/view.ts | 7 +- .../view-merging/integrated-view.ts | 7 +- .../package.json | 6 +- .../get-transaction-receipt-by-tx-id.ts | 2 +- .../cache/solidity-files-cache.json | 2 +- .../cactus-plugin-satp-hermes/package.json | 1 + .../proto/cacti/satp/v02/common/message.proto | 31 +- .../blo/admin/get-status-handler-service.ts | 18 +- .../src/main/typescript/core/satp-session.ts | 6 +- .../core/stage-handlers/stage0-handler.ts | 6 +- .../core/stage-handlers/stage1-handler.ts | 9 +- .../client/stage0-client-service.ts | 8 +- .../client/stage1-client-service.ts | 10 +- .../client/stage2-client-service.ts | 8 +- .../client/stage3-client-service.ts | 22 +- .../core/stage-services/data-verifier.ts | 6 +- .../stage-services/satp-bridge/besu-bridge.ts | 82 +- .../satp-bridge/ethereum-bridge.ts | 415 +++++++ .../satp-bridge/fabric-bridge.ts | 83 +- .../satp-bridge/network-bridge.ts | 5 +- .../satp-bridge/satp-bridge-manager.ts | 65 +- .../types/{besu-asset.ts => evm-asset.ts} | 2 +- .../server/stage0-server-service.ts | 7 +- .../server/stage1-server-service.ts | 10 +- .../server/stage2-server-service.ts | 6 +- .../server/stage3-server-service.ts | 21 +- .../core/stage-services/service-utils.ts | 12 +- .../src/main/typescript/core/types.ts | 1 + .../src/main/typescript/gateway-utils.ts | 21 +- .../generated/SATPWrapperContract.ts | 16 +- .../proto/cacti/satp/v02/common/message_pb.ts | 131 +- .../typescript/gol/gateway-orchestrator.ts | 5 +- .../typescript/gol/satp-bridges-manager.ts | 11 + .../src/main/typescript/gol/satp-manager.ts | 22 +- .../network-identification/resolve-gateway.ts | 12 +- .../typescript/plugin-satp-hermes-gateway.ts | 7 +- .../repository/ipfs-remote-log-repository.ts | 3 +- .../types/blockchain-interaction.ts | 23 +- .../93d35733085ee70624acdfc4647920e4.json | 1 + .../b88c862f76663d3260981c0798346189.json | 1 + .../c06d59a985d3e5018c60534c7b22ef49.json | 1 + .../satp-wrapper.sol/SATPWrapperContract.json | 2 +- .../src/solidity/satp-wrapper.sol | 16 +- .../52693db7419ee2d467ee85def7d551fc.json | 1 + .../7cf317e1563df5d9a544376c9450d781.json | 1 + .../integration/bridge/besu-bridge.test.ts | 6 +- .../bridge/ethereum-bridge.test.ts | 633 ++++++++++ .../integration/bridge/fabric-bridge.test.ts | 2 + ...end-transfer-1-gateway-with-bungee.test.ts | 1086 +++++++++++++++++ ...satp-end-to-end-transfer-1-gateway.test.ts | 3 + ...to-end-transfer-2-gateways-openapi.test.ts | 3 + ...atp-end-to-end-transfer-2-gateways.test.ts | 3 + ...ric-transfer-1-gateway-with-bungee.test.ts | 1056 ++++++++++++++++ .../src/test/typescript/unit/services.test.ts | 7 +- yarn.lock | 275 ++++- 66 files changed, 4010 insertions(+), 270 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/ethereum-bridge.ts rename packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/{besu-asset.ts => evm-asset.ts} (88%) create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/93d35733085ee70624acdfc4647920e4.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/b88c862f76663d3260981c0798346189.json create mode 100644 packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/c06d59a985d3e5018c60534c7b22ef49.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/52693db7419ee2d467ee85def7d551fc.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/7cf317e1563df5d9a544376c9450d781.json create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/ethereum-bridge.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-with-bungee.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts 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 37cd4fb41f..5d8dc9612d 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 @@ -76,6 +76,7 @@ import { AdminApi, TransactionApi, } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/generated/gateway-client/typescript-axios/api"; +import { ClaimFormat } from "@hyperledger/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; export interface ICbdcBridgingAppDummyInfrastructureOptions { logLevel?: LogLevelDesc; @@ -439,6 +440,7 @@ export class CbdcBridgingAppDummyInfrastructure { contractName: CbdcBridgingAppDummyInfrastructure.SATP_WRAPPER, options: this.fabricConnectorBridgeOptions, bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, } as FabricConfig; const besuConfig = { @@ -454,6 +456,7 @@ export class CbdcBridgingAppDummyInfrastructure { options: this.besuOptions, bungeeOptions: pluginBungeeBesuOptions, gas: 999999999999999, + claimFormat: ClaimFormat.DEFAULT, }; const besuGatewayOptions: SATPGatewayConfig = { diff --git a/packages/cactus-plugin-bungee-hermes/package.json b/packages/cactus-plugin-bungee-hermes/package.json index f23f5f03ae..d85e564136 100644 --- a/packages/cactus-plugin-bungee-hermes/package.json +++ b/packages/cactus-plugin-bungee-hermes/package.json @@ -72,6 +72,7 @@ "http-errors-enhanced-cjs": "2.0.1", "key-encoder": "2.0.3", "merkletreejs": "0.3.11", + "safe-stable-stringify": "2.5.0", "typescript-optional": "2.0.1", "uuid": "10.0.0", "web3": "1.6.1", diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts index d8373dce38..15cbb1f925 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/plugin-bungee-hermes.ts @@ -7,6 +7,8 @@ import { LoggerProvider, Secp256k1Keys, } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { v4 as uuidV4 } from "uuid"; import { ICactusPlugin, @@ -231,8 +233,8 @@ export class PluginBungeeHermes implements ICactusPlugin, IPluginWebService { view.setCreator(this.pubKeyBungee); view.setKey(uuidV4()); return { - view: JSON.stringify(view), - signature: this.sign(JSON.stringify(view)), + view: safeStableStringify(view), + signature: this.sign(safeStableStringify(view)), }; } onMergeViews(request: MergeViewsRequest): MergeViewsResponse { @@ -267,7 +269,7 @@ export class PluginBungeeHermes implements ICactusPlugin, IPluginWebService { request.policyArguments ? request.policyArguments : [], ); return { - integratedView: JSON.stringify(integratedView), + integratedView: safeStableStringify(integratedView), signature: integratedView.signature, }; } @@ -287,7 +289,7 @@ export class PluginBungeeHermes implements ICactusPlugin, IPluginWebService { this.logger.info("Generating view for request: ", request); const response = this.generateView(snapshot, ti, tf, request.viewID); return { - view: JSON.stringify(response.view), + view: safeStableStringify(response.view), signature: response.signature, }; } @@ -308,7 +310,7 @@ export class PluginBungeeHermes implements ICactusPlugin, IPluginWebService { const view = new View(this.pubKeyBungee, tI, tF, snapshot, id); snapshot.pruneStates(tI, tF); - const signature = this.sign(JSON.stringify(view)); + const signature = this.sign(safeStableStringify(view)); return { view: view, signature: signature }; } @@ -414,7 +416,7 @@ export class PluginBungeeHermes implements ICactusPlugin, IPluginWebService { integratedView: integratedView, //The paper specs suggest the integratedView should be jointly signed by all participants. //That process is left to be addressed in the future - signature: this.sign(JSON.stringify(integratedView)), + signature: this.sign(safeStableStringify(integratedView)), }; } diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts index 9178e8f2fe..16e733424f 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-besu.ts @@ -5,6 +5,8 @@ import { Logger, LoggerProvider, } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { DefaultApi as BesuApi, EthContractInvocationType, @@ -170,7 +172,7 @@ export class StrategyBesu implements ObtainLedgerStrategy { "Transaction: " + log.transactionHash + "\nData: " + - JSON.stringify(log.data) + + safeStableStringify(log.data) + "\n =========== \n", ); const proof = new Proof({ @@ -185,7 +187,7 @@ export class StrategyBesu implements ObtainLedgerStrategy { transaction.setTarget(networkDetails.contractAddress as string); transaction.setPayload(txTx.input ? txTx.input : ""); //FIXME: payload = transaction input ? transactions.push(transaction); - values.push(JSON.stringify(log.data)); + values.push(safeStableStringify(log.data)); blocks.set(transaction.getId(), txBlock); } diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts index 28e189c415..51b51609af 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-ethereum.ts @@ -4,6 +4,8 @@ import { LoggerProvider, Checks, } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { Web3SigningCredential, DefaultApi as EthereumApi, @@ -214,7 +216,7 @@ export class StrategyEthereum implements ObtainLedgerStrategy { "Transaction: " + log.transactionHash + "\nData: " + - JSON.stringify(log.data) + + safeStableStringify(log.data) + "\n =========== \n", ); const proof = new Proof({ @@ -229,7 +231,7 @@ export class StrategyEthereum implements ObtainLedgerStrategy { transaction.setTarget(networkDetails.contractAddress as string); transaction.setPayload(txTx.data.input ? txTx.data.input : ""); //FIXME: payload = transaction input ? transactions.push(transaction); - values.push(JSON.stringify(log.data)); + values.push(safeStableStringify(log.data)); blocks.set(transaction.getId(), txBlock.data); } diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts index c7ccbf60cc..ebaae3d177 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/strategy/strategy-fabric.ts @@ -13,6 +13,7 @@ import { Logger, LoggerProvider, } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; import { Transaction } from "../view-creation/transaction"; import { State } from "../view-creation/state"; import { StateProof } from "../view-creation/state-proof"; @@ -101,7 +102,11 @@ export class StrategyFabric implements ObtainLedgerStrategy { mspid: receipt.transactionCreator.mspid, }), ); - assetValues.push(JSON.parse(receipt.rwsetWriteData).Value.toString()); + if (!receipt.rwsetWriteData) { + assetValues.push(""); + } else { + assetValues.push(JSON.parse(receipt.rwsetWriteData).Value.toString()); + } tx.setStateId(assetKey); tx.setTarget(receipt.channelID + ": " + receipt.chainCodeName); @@ -135,10 +140,11 @@ export class StrategyFabric implements ObtainLedgerStrategy { //only adding last block for each state, in the state proof stateProof.addBlock({ blockHash: block.hash, - blockCreator: JSON.stringify({ - mspid: last_receipt.blockMetaData.mspid, - id: last_receipt.blockMetaData.blockCreatorID, - }), + blockCreator: + safeStableStringify({ + mspid: last_receipt.blockMetaData.mspid, + id: last_receipt.blockMetaData.blockCreatorID, + }) ?? "", blockSigners: block.signers, }); @@ -170,7 +176,7 @@ export class StrategyFabric implements ObtainLedgerStrategy { if (!response) { throw new InternalServerError(`${fn} response is falsy`); } - const receiptLockRes = JSON.stringify(response); + const receiptLockRes = safeStableStringify(response); if (!receiptLockRes) { throw new InternalServerError(`${fn} receiptLockRes is falsy`); } @@ -199,7 +205,7 @@ export class StrategyFabric implements ObtainLedgerStrategy { throw new InternalServerError(`${fn} response.data is falsy`); } - const receiptLockRes = JSON.stringify(data); + const receiptLockRes = safeStableStringify(data); if (!receiptLockRes) { throw new InternalServerError(`${fn} receiptLockRes is falsy`); } @@ -275,7 +281,7 @@ export class StrategyFabric implements ObtainLedgerStrategy { ); } - const block = JSON.parse(JSON.stringify(block_data)).decodedBlock; + const block = JSON.parse(safeStableStringify(block_data)).decodedBlock; const blockSig = block.metadata.metadata[0].signatures; const sigs = []; @@ -289,7 +295,7 @@ export class StrategyFabric implements ObtainLedgerStrategy { }, signature: Buffer.from(sig.signature.data).toString("hex"), }; - sigs.push(JSON.stringify(decoded)); + sigs.push(safeStableStringify(decoded)); } return { hash: Buffer.from(block.header.data_hash.data).toString("hex"), @@ -440,7 +446,7 @@ export class StrategyFabric implements ObtainLedgerStrategy { ts, new TransactionProof(new Proof({ creator: "" }), txId), //transaction proof details are set in function 'generateLedgerStates' ); - transaction.setPayload(JSON.stringify(tx.value)); + transaction.setPayload(safeStableStringify(tx.value) ?? ""); transactions.push(transaction); } return transactions.reverse(); diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts index 69f18b79bc..c4baa74856 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/proof.ts @@ -1,6 +1,8 @@ // Proof is a general purpose type, used to represent signatures of diverse elements. // Proof may be used, for example in Fabric, to represent an transaction endorsement // Or simply the signature of a transaction upon is creation (in Besu) +import { stringify as safeStableStringify } from "safe-stable-stringify"; + export class Proof { // The term creator refers to the ID of the entity who created the signature // For example endorserID in Fabric (when Proof represents an endorsement) @@ -36,7 +38,7 @@ export class Proof { mspid: this.mspid, signature: this.signature, }; - return JSON.stringify(proof); + return safeStableStringify(proof); } public getCreator(): string { diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts index b8b73fcda2..a21166731b 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts @@ -1,4 +1,5 @@ import { State } from "./state"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class Snapshot { private id: string; @@ -99,7 +100,7 @@ export class Snapshot { stateBins: this.stateBins, }; - return JSON.stringify(snapshotJson); + return safeStableStringify(snapshotJson); } public removeState(stateId: string) { diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts index ad1ed6bb65..3564da1c3b 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts @@ -1,5 +1,6 @@ import { StateProof } from "./state-proof"; import { Transaction } from "./transaction"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class State { private id: string; @@ -36,7 +37,7 @@ export class State { for (const tx of this.transactions) { txs.push(tx.getTxJson()); - txEndorsements.push(JSON.stringify(tx.getProof())); + txEndorsements.push(safeStableStringify(tx.getProof())); } const jsonSnap = { @@ -47,7 +48,7 @@ export class State { proofs: txEndorsements, }; - return JSON.stringify(jsonSnap); + return safeStableStringify(jsonSnap); } public getTransactions() { diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts index 1e3f51f065..7196a08223 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction-proof.ts @@ -1,4 +1,5 @@ import { Proof } from "./proof"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class TransactionProof { private transactionCreator: Proof; @@ -27,7 +28,7 @@ export class TransactionProof { transactionCreator: this.transactionCreator, endorsements: this.endorsements, }; - return JSON.stringify(proof); + return safeStableStringify(proof); } public getCreator(): Proof { diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts index 07fbe6212f..b9d4c4f49b 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/transaction.ts @@ -1,5 +1,6 @@ import { Proof } from "./proof"; import { TransactionProof } from "./transaction-proof"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class Transaction { private id: string; @@ -52,7 +53,7 @@ export class Transaction { public getTxJson(): string { const tx = { Id: this.id, TimeStamp: this.timeStamp }; - return JSON.stringify(tx); + return safeStableStringify(tx); } public getProof(): TransactionProof { diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts index 9e076131f5..78cce5861c 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/view.ts @@ -5,6 +5,7 @@ import { Transaction } from "./transaction"; import { IPrivacyPolicy, IPrivacyPolicyValue } from "./privacy-policies"; import { PrivacyPolicyOpts } from "../generated/openapi/typescript-axios"; import { JsObjectSigner } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export interface IViewMetadata { viewId: string; @@ -87,9 +88,9 @@ export class View { const transactions: string[] = []; for (const state of this.snapshot.getStateBins()) { - states.push(JSON.stringify(state.getStateProof())); + states.push(safeStableStringify(state.getStateProof())); for (const transaction of state.getTransactions()) { - transactions.push(JSON.stringify(transaction.getProof())); + transactions.push(safeStableStringify(transaction.getProof())); } } @@ -112,7 +113,7 @@ export class View { tF: this.tF, snapshot: this.snapshot, }; - return JSON.stringify(viewStr); + return safeStableStringify(viewStr); // return this.snapshot.getSnapshotJson(); } public getViewProof(): { diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts index 36e8607b59..cf12e70ccc 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/integrated-view.ts @@ -8,6 +8,7 @@ import { Transaction } from "../view-creation/transaction"; import { IViewMetadata } from "../view-creation/view"; import { MergePolicyOpts } from "../generated/openapi/typescript-axios"; import { JsObjectSigner } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class IntegratedView { private id: string; @@ -114,11 +115,11 @@ export class IntegratedView { const states: string[] = []; const transactions: string[] = []; this.getAllTransactions().forEach((transaction) => { - transactions.push(JSON.stringify(transaction.getProof())); + transactions.push(safeStableStringify(transaction.getProof())); }); this.getAllStates().forEach((state) => { - states.push(JSON.stringify(state.getStateProof())); + states.push(safeStableStringify(state.getStateProof())); }); const statesTree = new MerkleTree(states, undefined, { sort: true, @@ -129,7 +130,7 @@ export class IntegratedView { hashLeaves: true, }); const viewsTree = new MerkleTree( - this.viewsMetadata.map((x) => JSON.stringify(x)), + this.viewsMetadata.map((x) => safeStableStringify(x)), undefined, { sort: true, diff --git a/packages/cactus-plugin-ledger-connector-ethereum/package.json b/packages/cactus-plugin-ledger-connector-ethereum/package.json index 4c1b066f4f..bdec5a792b 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/package.json +++ b/packages/cactus-plugin-ledger-connector-ethereum/package.json @@ -82,9 +82,9 @@ "sanitize-html": "2.12.1", "socket.io-client-fixed-types": "4.5.4", "typescript-optional": "2.0.1", - "web3": "4.4.0", - "web3-eth": "4.4.0", - "web3-eth-contract": "4.2.0" + "web3": "4.14.0", + "web3-eth": "4.10.0", + "web3-eth-contract": "4.7.0" }, "devDependencies": { "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts index b874bc0e77..887a8f4284 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/common/get-transaction-receipt-by-tx-id.ts @@ -157,7 +157,7 @@ export async function getTransactionReceiptByTxID( if (!extensionNsRwset.rwset) continue; const rwset = extensionNsRwset.rwset; - if (!rwset.writes) continue; + if (!rwset.writes || rwset.writes.length === 0) continue; const rwsetWrite = rwset.writes; if (!rwsetWrite[0].key) continue; const rwsetKey = rwsetWrite[0].key; diff --git a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json index 0daafa87b6..db9030f115 100644 --- a/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json +++ b/packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json @@ -1 +1 @@ -{"_format":"","paths":{"artifacts":"src/test/solidity/generated","build_infos":"src/test/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"lastModificationDate":1728611461049,"contentHash":"4c80b7fdf559a9a348e832a57d072a0b","sourceName":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"AccessControl":{"0.8.20":{"path":"AccessControl.sol/AccessControl.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"lastModificationDate":1728611461052,"contentHash":"e3a14b0714caaaa82d58fa0bc3756079","sourceName":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IAccessControl":{"0.8.20":{"path":"IAccessControl.sol/IAccessControl.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"lastModificationDate":1728611461080,"contentHash":"4aefc698f77ecbace7f401257dfe182d","sourceName":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC1155Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC1155Errors.json","build_id":"f277531deacae890b124dd8f32ec2567"}},"IERC20Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC20Errors.json","build_id":"f277531deacae890b124dd8f32ec2567"}},"IERC721Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC721Errors.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"lastModificationDate":1728611461092,"contentHash":"c6375ef25e84c90b3d15f9ec4eef218f","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC20":{"0.8.20":{"path":"ERC20.sol/ERC20.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"lastModificationDate":1728611461099,"contentHash":"5517c8678c18eb1a8ba58810e7ca39ca","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC20":{"0.8.20":{"path":"IERC20.sol/IERC20.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"lastModificationDate":1728611461099,"contentHash":"4c02fa6f7ae7b6c289cef80424f0c875","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol"],"versionRequirement":"^0.8.20","artifacts":{"IERC20Metadata":{"0.8.20":{"path":"IERC20Metadata.sol/IERC20Metadata.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1728611461055,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1728611461061,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"lastModificationDate":1728611461057,"contentHash":"6a55c353946e471d9792965d06208295","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC165":{"0.8.20":{"path":"ERC165.sol/ERC165.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"lastModificationDate":1728611461058,"contentHash":"de0163561b417b800d01749cbbe2147e","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC165":{"0.8.20":{"path":"IERC165.sol/IERC165.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1728611461058,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1728611461059,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"src/test/solidity/contracts/ITraceableContract.sol":{"lastModificationDate":1728610668341,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/test/solidity/contracts/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-contract-interface.sol":{"lastModificationDate":1728610668341,"contentHash":"2411a0d6a3ea8e5f85c97e6ae77fead4","sourceName":"src/test/solidity/contracts/satp-contract-interface.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"SATPContractInterface":{"0.8.20":{"path":"satp-contract-interface.sol/SATPContractInterface.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-erc20.sol":{"lastModificationDate":1728610668341,"contentHash":"5ecdb78db9a7b063ee9e0a5702733bd6","sourceName":"src/test/solidity/contracts/satp-erc20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/AccessControl.sol","node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/test/solidity/contracts/ITraceableContract.sol","src/test/solidity/contracts/satp-contract-interface.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPContract":{"0.8.20":{"path":"satp-erc20.sol/SATPContract.json","build_id":"f277531deacae890b124dd8f32ec2567"}}},"seenByCompiler":true}},"builds":["f277531deacae890b124dd8f32ec2567"]} \ No newline at end of file +{"_format":"","paths":{"artifacts":"src/test/solidity/generated","build_infos":"src/test/solidity/generated/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib","node_modules"]},"files":{"node_modules/@openzeppelin/contracts/access/AccessControl.sol":{"lastModificationDate":1730141903764,"contentHash":"4c80b7fdf559a9a348e832a57d072a0b","sourceName":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"AccessControl":{"0.8.20":{"path":"AccessControl.sol/AccessControl.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"lastModificationDate":1730141903775,"contentHash":"e3a14b0714caaaa82d58fa0bc3756079","sourceName":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IAccessControl":{"0.8.20":{"path":"IAccessControl.sol/IAccessControl.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"lastModificationDate":1730141903842,"contentHash":"4aefc698f77ecbace7f401257dfe182d","sourceName":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC1155Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC1155Errors.json","build_id":"52693db7419ee2d467ee85def7d551fc"}},"IERC20Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC20Errors.json","build_id":"52693db7419ee2d467ee85def7d551fc"}},"IERC721Errors":{"0.8.20":{"path":"draft-IERC6093.sol/IERC721Errors.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol":{"lastModificationDate":1730141903900,"contentHash":"c6375ef25e84c90b3d15f9ec4eef218f","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC20":{"0.8.20":{"path":"ERC20.sol/ERC20.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"lastModificationDate":1730141903909,"contentHash":"5517c8678c18eb1a8ba58810e7ca39ca","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC20":{"0.8.20":{"path":"IERC20.sol/IERC20.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"lastModificationDate":1730141903907,"contentHash":"4c02fa6f7ae7b6c289cef80424f0c875","sourceName":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol"],"versionRequirement":"^0.8.20","artifacts":{"IERC20Metadata":{"0.8.20":{"path":"IERC20Metadata.sol/IERC20Metadata.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"lastModificationDate":1730141903785,"contentHash":"67bfbc07588eb8683b3fd8f6f909563e","sourceName":"node_modules/@openzeppelin/contracts/utils/Context.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Context":{"0.8.20":{"path":"Context.sol/Context.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"lastModificationDate":1730141903813,"contentHash":"ba57ff4ddf1d9cae9d2009792795b7f6","sourceName":"node_modules/@openzeppelin/contracts/utils/Strings.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol"],"versionRequirement":"^0.8.20","artifacts":{"Strings":{"0.8.20":{"path":"Strings.sol/Strings.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol":{"lastModificationDate":1730141903797,"contentHash":"6a55c353946e471d9792965d06208295","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol"],"versionRequirement":"^0.8.20","artifacts":{"ERC165":{"0.8.20":{"path":"ERC165.sol/ERC165.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"lastModificationDate":1730141903799,"contentHash":"de0163561b417b800d01749cbbe2147e","sourceName":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"IERC165":{"0.8.20":{"path":"IERC165.sol/IERC165.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"lastModificationDate":1730141903802,"contentHash":"718fa8ba0ff269c92e364c1429d9de57","sourceName":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"Math":{"0.8.20":{"path":"Math.sol/Math.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"lastModificationDate":1730141903805,"contentHash":"b6c6bdc7aaca4fe5b680760a72e09d3e","sourceName":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":"^0.8.20","artifacts":{"SignedMath":{"0.8.20":{"path":"SignedMath.sol/SignedMath.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"src/test/solidity/contracts/ITraceableContract.sol":{"lastModificationDate":1730141609624,"contentHash":"231f3764075b7c107364f860e71e2141","sourceName":"src/test/solidity/contracts/ITraceableContract.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"ITraceableContract":{"0.8.20":{"path":"ITraceableContract.sol/ITraceableContract.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-contract-interface.sol":{"lastModificationDate":1730141609624,"contentHash":"2411a0d6a3ea8e5f85c97e6ae77fead4","sourceName":"src/test/solidity/contracts/satp-contract-interface.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":[],"versionRequirement":">=0.7.0","artifacts":{"SATPContractInterface":{"0.8.20":{"path":"satp-contract-interface.sol/SATPContractInterface.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true},"src/test/solidity/contracts/satp-erc20.sol":{"lastModificationDate":1730141609624,"contentHash":"5ecdb78db9a7b063ee9e0a5702733bd6","sourceName":"src/test/solidity/contracts/satp-erc20.sol","compilerSettings":{"solc":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"paris","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}},"imports":["node_modules/@openzeppelin/contracts/access/AccessControl.sol","node_modules/@openzeppelin/contracts/access/IAccessControl.sol","node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","node_modules/@openzeppelin/contracts/utils/Context.sol","node_modules/@openzeppelin/contracts/utils/Strings.sol","node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","node_modules/@openzeppelin/contracts/utils/math/Math.sol","node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","src/test/solidity/contracts/ITraceableContract.sol","src/test/solidity/contracts/satp-contract-interface.sol"],"versionRequirement":"^0.8.20","artifacts":{"SATPContract":{"0.8.20":{"path":"satp-erc20.sol/SATPContract.json","build_id":"52693db7419ee2d467ee85def7d551fc"}}},"seenByCompiler":true}},"builds":["52693db7419ee2d467ee85def7d551fc"]} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index b46d959399..86854babb9 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -126,6 +126,7 @@ "@bufbuild/buf": "1.30.0", "@bufbuild/protoc-gen-es": "1.8.0", "@grpc/proto-loader": "0.7.13", + "@hyperledger/cactus-test-geth-ledger": "2.0.0-rc.7", "@quobix/vacuum": "0.9.16", "@types/body-parser": "1.19.4", "@types/crypto-js": "4.0.1", diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto index 912f5a216a..41e7c056ce 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/common/message.proto @@ -209,46 +209,57 @@ enum Error { ERROR_MESSAGE_OUT_OF_SEQUENCE = 11; } - +enum ClaimFormat { + DEFAULT = 0; + BUNGEE = 1; +} +message WrapAssertionClaimFormat { + ClaimFormat format = 1; +} message LockAssertionClaimFormat { - + ClaimFormat format = 1; } message MintAssertionClaimFormat { - + ClaimFormat format = 1; } message BurnAssertionClaimFormat { - + ClaimFormat format = 1; } message AssignmentAssertionClaimFormat { - + ClaimFormat format = 1; } message LockAssertionClaim { string receipt = 1; - string signature = 2; + string proof = 2; + string signature = 3; } message MintAssertionClaim { string receipt = 1; - string signature = 2; + string proof = 2; + string signature = 3; } message BurnAssertionClaim { string receipt = 1; - string signature = 2; + string proof = 2; + string signature = 3; } message AssignmentAssertionClaim { string receipt = 1; - string signature = 2; + string proof = 2; + string signature = 3; } message WrapAssertionClaim { string receipt = 1; - string signature = 2; + string proof = 2; + string signature = 3; } enum TokenType { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index a2e119a222..5ea436a3ba 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -70,17 +70,31 @@ export async function GetStatusService( dltProtocol: "besu", dltSubnetworkID: "v24.4.0-RC1", }; - destinationChain = { + } else if (sessionData.senderGatewayNetworkId === SupportedChain.FABRIC) { + originChain = { dltProtocol: "fabric", dltSubnetworkID: "v2.0.0", }; } else { originChain = { + dltProtocol: "ethereum", + dltSubnetworkID: "v24.4.0-RC1", + }; + } + + if (sessionData.recipientGatewayNetworkId === SupportedChain.BESU) { + destinationChain = { + dltProtocol: "besu", + dltSubnetworkID: "v24.4.0-RC1", + }; + } else if (sessionData.recipientGatewayNetworkId === SupportedChain.FABRIC) { + destinationChain = { dltProtocol: "fabric", dltSubnetworkID: "v2.0.0", }; + } else { destinationChain = { - dltProtocol: "besu", + dltProtocol: "ethereum", dltSubnetworkID: "v24.4.0-RC1", }; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index 0080cd8d67..47b5fd5ae9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -1,4 +1,6 @@ import { v4 as uuidv4 } from "uuid"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { MessageStagesHashes, MessageStagesSignatures, @@ -257,7 +259,7 @@ export class SATPSession { ) { throw new SessionDataNotLoadedCorrectlyError( tag, - JSON.stringify(sessionData), + safeStableStringify(sessionData)!, ); } if (sessionData.version != SATP_VERSION) { @@ -267,7 +269,7 @@ export class SATPSession { console.error(`${tag}, error: ${error}`); throw new SessionDataNotLoadedCorrectlyError( tag, - JSON.stringify(sessionData), + safeStableStringify(sessionData)!, error, ); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts index b123f94af0..fd1538c74a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -7,6 +7,8 @@ import { SATPHandlerType, Stage, } from "../../types/satp-protocol"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { ConnectRouter, HandlerContext } from "@connectrpc/connect"; import { SatpStage0Service } from "../../generated/proto/cacti/satp/v02/stage_0_connect"; import { @@ -67,7 +69,7 @@ export class Stage0SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, New Session...`); this.Log.debug( - `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + `${fnTag}, Request: ${safeStableStringify(req)}, Context: ${safeStableStringify(context)}`, ); let session = this.sessions.get(req.sessionId); @@ -111,7 +113,7 @@ export class Stage0SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, PreSATPTransfer...`); this.Log.debug( - `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + `${fnTag}, Request: ${safeStableStringify(req)}, Context: ${safeStableStringify(context)}`, ); const session = this.sessions.get(req.sessionId); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index cb18227693..4f059edc34 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -24,6 +24,7 @@ import { } from "../errors/satp-handler-errors"; import { getSessionId } from "./handler-utils"; import { PreSATPTransferResponse } from "../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class Stage1SATPHandler implements SATPHandler { public static readonly CLASS_NAME = SATPHandlerType.STAGE1; @@ -66,7 +67,7 @@ export class Stage1SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Transfer Proposal...`); this.Log.debug( - `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + `${fnTag}, Request: ${safeStableStringify(req)}, Context: ${safeStableStringify(context)}`, ); const session = this.sessions.get(getSessionId(req)); @@ -86,7 +87,7 @@ export class Stage1SATPHandler implements SATPHandler { ); this.Log.debug( - `${fnTag}, Returning response: ${JSON.stringify(message)}`, + `${fnTag}, Returning response: ${safeStableStringify(message)}`, ); if (!message) { @@ -107,7 +108,7 @@ export class Stage1SATPHandler implements SATPHandler { try { this.Log.debug(`${fnTag}, Transfer Commence...`); this.Log.debug( - `${fnTag}, Request: ${JSON.stringify(req)}, Context: ${JSON.stringify(context)}`, + `${fnTag}, Request: ${safeStableStringify(req)}, Context: ${safeStableStringify(context)}`, ); const session = this.sessions.get(getSessionId(req)); @@ -125,7 +126,7 @@ export class Stage1SATPHandler implements SATPHandler { ); this.Log.debug( - `${fnTag}, Returning response: ${JSON.stringify(message)}`, + `${fnTag}, Returning response: ${safeStableStringify(message)}`, ); if (!message) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts index 7c79cc541f..f8a3d485b0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -8,6 +8,8 @@ import { NewSessionResponse, PreSATPTransferRequest, } from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; import { FailedToProcessError } from "../../errors/satp-handler-errors"; import { @@ -90,7 +92,7 @@ export class Stage0ClientService extends SATPService { sessionData.senderGatewayNetworkId; newSessionRequestMessage.gatewayId = thisGatewayId; const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(newSessionRequestMessage)), + sign(this.Signer, safeStableStringify(newSessionRequestMessage)), ); newSessionRequestMessage.clientSignature = messageSignature; @@ -251,7 +253,7 @@ export class Stage0ClientService extends SATPService { ); const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(preSATPTransferRequest)), + sign(this.Signer, safeStableStringify(preSATPTransferRequest)), ); preSATPTransferRequest.clientSignature = messageSignature; @@ -303,7 +305,7 @@ export class Stage0ClientService extends SATPService { const assetId = token.tokenId; const amount = token.amount.toString(); - this.Log.debug(`${fnTag}, Wrap: ${JSON.stringify(token)}`); + this.Log.debug(`${fnTag}, Wrap: ${safeStableStringify(token)}`); this.Log.debug(`${fnTag}, Wrap Asset ID: ${assetId} amount: ${amount}`); if (assetId == undefined) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 7c7e693861..f793b109a2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -16,6 +16,8 @@ import { saveSignature, SessionType, } from "../../session-utils"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SupportedChain } from "../../types"; import { SATPSession } from "../../../core/satp-session"; import { @@ -181,7 +183,7 @@ export class Stage1ClientService extends SATPService { } const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferProposalRequestMessage)), + sign(this.Signer, safeStableStringify(transferProposalRequestMessage)), ); transferProposalRequestMessage.clientSignature = messageSignature; @@ -199,7 +201,7 @@ export class Stage1ClientService extends SATPService { sessionID: sessionID, type: "transferProposalRequest", operation: "validate", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info(`${fnTag}, sending TransferProposalRequest...`); @@ -248,7 +250,7 @@ export class Stage1ClientService extends SATPService { sessionData.hashTransferInitClaims; const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), + sign(this.Signer, safeStableStringify(transferCommenceRequestMessage)), ); transferCommenceRequestMessage.clientSignature = messageSignature; @@ -270,7 +272,7 @@ export class Stage1ClientService extends SATPService { sessionID: sessionData.id, type: "transferCommenceRequest", operation: "validate", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info(`${fnTag}, sending TransferCommenceRequest...`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index d63dbb1879..f15d675bd4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -14,6 +14,8 @@ import { SessionType, } from "../../session-utils"; import { SATPSession } from "../../../core/satp-session"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SATPService, ISATPClientServiceOptions, @@ -125,7 +127,7 @@ export class Stage2ClientService extends SATPService { } const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(lockAssertionRequestMessage)), + sign(this.Signer, safeStableStringify(lockAssertionRequestMessage)), ); lockAssertionRequestMessage.clientSignature = messageSignature; @@ -143,7 +145,7 @@ export class Stage2ClientService extends SATPService { sessionID: sessionData.id, type: "lockAssertionRequest", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info(`${fnTag}, sending LockAssertionMessage...`); @@ -228,8 +230,10 @@ export class Stage2ClientService extends SATPService { assetId, Number(amount), ); + sessionData.lockAssertionClaim.proof = await bridge.getProof(assetId); sessionData.lockAssertionClaimFormat = new LockAssertionClaimFormat(); + sessionData.lockAssertionClaimFormat.format = bridge.getReceiptFormat(); sessionData.lockAssertionExpiration = BigInt(99999999999); //todo implement diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 79ea265ae6..99169f647a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -1,5 +1,6 @@ import { BurnAssertionClaim, + BurnAssertionClaimFormat, CommonSatp, MessageType, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; @@ -18,6 +19,8 @@ import { saveSignature, SessionType, } from "../../session-utils"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SATPService, ISATPClientServiceOptions, @@ -109,7 +112,7 @@ export class Stage3ClientService extends SATPService { } const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(commitPreparationRequestMessage)), + sign(this.Signer, safeStableStringify(commitPreparationRequestMessage)), ); commitPreparationRequestMessage.clientSignature = messageSignature; @@ -127,7 +130,7 @@ export class Stage3ClientService extends SATPService { sessionID: sessionData.id, type: "commitPreparation", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ @@ -194,7 +197,10 @@ export class Stage3ClientService extends SATPService { } const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(commitFinalAssertionRequestMessage)), + sign( + this.Signer, + safeStableStringify(commitFinalAssertionRequestMessage), + ), ); commitFinalAssertionRequestMessage.clientSignature = messageSignature; @@ -212,7 +218,7 @@ export class Stage3ClientService extends SATPService { sessionID: sessionData.id, type: "commitFinalAssertion", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info(`${fnTag}, sending CommitFinalAssertionMessage...`); @@ -272,7 +278,7 @@ export class Stage3ClientService extends SATPService { ); const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferCompleteRequestMessage)), + sign(this.Signer, safeStableStringify(transferCompleteRequestMessage)), ); transferCompleteRequestMessage.clientSignature = messageSignature; @@ -294,7 +300,7 @@ export class Stage3ClientService extends SATPService { sessionID: sessionData.id, type: "transferComplete", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ @@ -490,6 +496,10 @@ export class Stage3ClientService extends SATPService { assetId, Number(amount), ); + sessionData.burnAssertionClaim.proof = await bridge.getProof(assetId); + + sessionData.burnAssertionClaimFormat = new BurnAssertionClaimFormat(); + sessionData.burnAssertionClaimFormat.format = bridge.getReceiptFormat(); sessionData.burnAssertionClaim.signature = bufArray2HexStr( sign(this.Signer, sessionData.burnAssertionClaim.receipt), ); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts index 33ce5295af..010b2329eb 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/data-verifier.ts @@ -4,6 +4,8 @@ import { CommonSatp, MessageType, } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; import { SATP_VERSION } from "../constants"; import { @@ -48,8 +50,8 @@ export function commonBodyVerifier( (common.hashPreviousMessage == "" && messageStage != MessageType.INIT_PROPOSAL) ) { - console.error("errorcommon", JSON.stringify(common)); - throw new SatpCommonBodyError(tag, JSON.stringify(common)); + console.error("errorcommon", safeStableStringify(common)); + throw new SatpCommonBodyError(tag, safeStableStringify(common)); } if (common.version != SATP_VERSION) { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts index 702e619f7a..2469512b67 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts @@ -8,11 +8,14 @@ import { PluginLedgerConnectorBesu, RunTransactionResponse, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { NetworkBridge } from "./network-bridge"; import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; import { StrategyBesu } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-besu"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; -import { BesuAsset, getVarTypes } from "./types/besu-asset"; +import { EvmAsset, getVarTypes } from "./types/evm-asset"; import { Logger, LoggerProvider, @@ -21,8 +24,8 @@ import { import { InteractionsRequest } from "../../../generated/SATPWrapperContract"; import { getInteractionType } from "./types/asset"; import { InteractionData } from "./types/interact"; -import { OntologyError } from "../../errors/bridge-erros"; -import { TransactionError } from "fabric-network"; +import { OntologyError, TransactionError } from "../../errors/bridge-erros"; +import { ClaimFormat } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; interface BesuResponse { success: boolean; @@ -33,7 +36,7 @@ export class BesuBridge implements NetworkBridge { public static readonly CLASS_NAME = "BesuBridge"; network: string = "BESU"; - + claimFormat: ClaimFormat; public log: Logger; private connector: PluginLedgerConnectorBesu; @@ -48,7 +51,7 @@ export class BesuBridge implements NetworkBridge { level = level || "INFO"; this.log = LoggerProvider.getOrCreate({ label, level }); - + this.claimFormat = besuConfig.claimFormat; this.connector = new PluginLedgerConnectorBesu(besuConfig.options); this.bungee = new PluginBungeeHermes(besuConfig.bungeeOptions); this.bungee.addStrategy(this.network, new StrategyBesu(level)); @@ -61,7 +64,7 @@ export class BesuBridge implements NetworkBridge { } } - public async wrapAsset(asset: BesuAsset): Promise { + public async wrapAsset(asset: EvmAsset): Promise { const fnTag = `${BesuBridge.CLASS_NAME}}#wrapAsset`; this.log.debug( `${fnTag}, Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.contractAddress}, ${asset.tokenType}}`, @@ -95,7 +98,8 @@ export class BesuBridge implements NetworkBridge { return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } public async unwrapAsset(assetId: string): Promise { @@ -115,7 +119,8 @@ export class BesuBridge implements NetworkBridge { } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } public async lockAsset( @@ -138,7 +143,8 @@ export class BesuBridge implements NetworkBridge { } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } public async unlockAsset( @@ -161,7 +167,8 @@ export class BesuBridge implements NetworkBridge { } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } public async mintAsset( @@ -184,7 +191,8 @@ export class BesuBridge implements NetworkBridge { } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } public async burnAsset( @@ -207,7 +215,8 @@ export class BesuBridge implements NetworkBridge { } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } public async assignAsset( @@ -233,7 +242,8 @@ export class BesuBridge implements NetworkBridge { } return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", }; } @@ -257,7 +267,7 @@ export class BesuBridge implements NetworkBridge { return response.callOutput as string[]; } - public async getAsset(assetId: string): Promise { + public async getAsset(assetId: string): Promise { const fnTag = `${BesuBridge.CLASS_NAME}}#getAsset`; this.log.debug(`${fnTag}, Getting Asset`); const response = (await this.connector.invokeContract({ @@ -274,7 +284,7 @@ export class BesuBridge implements NetworkBridge { throw new TransactionError(fnTag); } - return response.callOutput as BesuAsset; + return response.callOutput as EvmAsset; } public networkName(): string { @@ -306,32 +316,24 @@ export class BesuBridge implements NetworkBridge { return { transactionId: response.out.transactionReceipt.transactionHash ?? "", - transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", output: response.callOutput ?? undefined, }; } - - public async getReceipt( - assetId: string, - transactionHash: string, - ): Promise { - const fnTag = `${BesuBridge.CLASS_NAME}}#getReceipt`; - this.log.debug( - `${fnTag}, Getting Receipt: ${assetId} transactionHash: ${transactionHash}`, - ); - //todo needs implementation + public async getView(assetId: string): Promise { const networkDetails = { - //connector: this.connector, - connectorApiPath: "", + connector: this.connector, + //connectorApiPath: "", signingCredential: this.config.signingCredential, contractName: this.config.contractName, contractAddress: this.config.contractAddress, keychainId: this.config.keychainId, - participant: "Org1MSP", + participant: "Org1MSP", // ?? }; const snapshot = await this.bungee.generateSnapshot( - [], + [assetId], this.network, networkDetails, ); @@ -347,14 +349,22 @@ export class BesuBridge implements NetworkBridge { throw new Error("View is undefined"); } - const view = await this.bungee.processView( - generated.view, - //PrivacyPolicyOpts.SingleTransaction, - PrivacyPolicyOpts.PruneState, - [assetId, transactionHash], + return safeStableStringify(generated); + } + public async getReceipt( + //assetId: string, + transactionId: string, + ): Promise { + const fnTag = `${BesuBridge.CLASS_NAME}}#getReceipt`; + this.log.debug( + `${fnTag}, Getting Receipt: transactionId: ${transactionId}`, ); + //TODO: implement getReceipt instead of transaction + const receipt = await this.connector.getTransaction({ + transactionHash: transactionId, + }); - return view.getViewStr(); + return safeStableStringify(receipt.transaction); } private interactionList(jsonString: string): InteractionsRequest[] { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/ethereum-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/ethereum-bridge.ts new file mode 100644 index 0000000000..ff4795c2cb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/ethereum-bridge.ts @@ -0,0 +1,415 @@ +import { + EthereumConfig, + TransactionResponse, +} from "../../../types/blockchain-interaction"; +import { + EthContractInvocationType, + InvokeRawWeb3EthMethodV1Request, + IPluginLedgerConnectorEthereumOptions, + PluginLedgerConnectorEthereum, + RunTransactionResponse, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + +import { NetworkBridge } from "./network-bridge"; +import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { StrategyEthereum } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-ethereum"; +import { EvmAsset, getVarTypes } from "./types/evm-asset"; +import { + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { InteractionsRequest } from "../../../generated/SATPWrapperContract"; +import { getInteractionType } from "./types/asset"; +import { InteractionData } from "./types/interact"; +import { OntologyError, TransactionError } from "../../errors/bridge-erros"; +import { ClaimFormat } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; + +interface EthereumResponse { + success: boolean; + out: RunTransactionResponse; + callOutput: unknown; +} +export class EthereumBridge implements NetworkBridge { + public static readonly CLASS_NAME = "EthereumBridge"; + + network: string = "ETHEREUM"; + claimFormat: ClaimFormat; + public log: Logger; + + private connector: PluginLedgerConnectorEthereum; + private bungee: PluginBungeeHermes; + private options: IPluginLedgerConnectorEthereumOptions; + private config: EthereumConfig; + + constructor(ethereumConfig: EthereumConfig, level?: LogLevelDesc) { + this.config = ethereumConfig; + this.options = ethereumConfig.options; + const label = EthereumBridge.CLASS_NAME; + + level = level || "INFO"; + this.log = LoggerProvider.getOrCreate({ label, level }); + this.claimFormat = ethereumConfig.claimFormat; + this.connector = new PluginLedgerConnectorEthereum(ethereumConfig.options); + this.bungee = new PluginBungeeHermes(ethereumConfig.bungeeOptions); + this.bungee.addStrategy(this.network, new StrategyEthereum(level)); + + //TODO is this needed? + if (ethereumConfig.ethereumAssets) { + ethereumConfig.ethereumAssets.forEach(async (asset) => { + await this.wrapAsset(asset); + }); + } + } + + public async wrapAsset(asset: EvmAsset): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#wrapAsset`; + this.log.debug( + `${fnTag}, Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.contractAddress}, ${asset.tokenType}}`, + ); + + if (asset.ontology === undefined) { + throw new OntologyError(fnTag); + } + + const interactions = this.interactionList(asset.ontology); + + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "wrap", + params: [ + asset.contractAddress, + asset.tokenType, + asset.tokenId, + asset.owner, + interactions, + ], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + + if (!response.success) { + throw new TransactionError(fnTag); + } + + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + public async unwrapAsset(assetId: string): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#unwrapAsset`; + this.log.debug(`${fnTag}, Unwrapping Asset: ${assetId}`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "unwrap", + params: [assetId], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + if (!response.success) { + throw new TransactionError(fnTag); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + public async lockAsset( + assetId: string, + amount: number, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#lockAsset`; + this.log.debug(`${fnTag}, Locking Asset: ${assetId} amount: ${amount}`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "lock", + params: [assetId, amount.toString()], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + if (!response.success) { + this.log.debug(response); + throw new TransactionError(fnTag); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + public async unlockAsset( + assetId: string, + amount: number, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#unlockAsset`; + this.log.debug(`${fnTag}, Unlocking Asset: ${assetId} amount: ${amount}`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "unlock", + params: [assetId, amount.toString()], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + if (!response.success) { + throw new TransactionError(fnTag); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + public async mintAsset( + assetId: string, + amount: number, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#mintAsset`; + this.log.debug(`${fnTag}, Minting Asset: ${assetId} amount: ${amount}`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [assetId, amount.toString()], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + if (!response.success) { + throw new TransactionError(fnTag); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + public async burnAsset( + assetId: string, + amount: number, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#burnAsset`; + this.log.debug(`${fnTag}, Burning Asset: ${assetId} amount: ${amount}`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "burn", + params: [assetId, amount.toString()], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + if (!response.success) { + throw new TransactionError(fnTag); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + public async assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#assignAsset`; + this.log.debug( + `${fnTag}, Assigning Asset: ${assetId} amount: ${amount} to: ${to}`, + ); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Send, + methodName: "assign", + params: [assetId, to, amount], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + if (!response.success) { + throw new TransactionError(fnTag); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + }; + } + + public async getAssets(): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#getAssets`; + this.log.debug(`${fnTag}, Getting Assets`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Call, + methodName: "getAllAssetsIDs", + params: [], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + + if (!response.success) { + throw new TransactionError(fnTag); + } + + return response.callOutput as string[]; + } + + public async getAsset(assetId: string): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#getAsset`; + this.log.debug(`${fnTag}, Getting Asset`); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: EthContractInvocationType.Call, + methodName: "getToken", + params: [assetId], + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + + if (!response.success) { + throw new TransactionError(fnTag); + } + + return response.callOutput as EvmAsset; + } + + public networkName(): string { + return this.network; + } + + public async runTransaction( + methodName: string, + params: string[], + invocationType: EthContractInvocationType, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#runTransaction`; + this.log.debug( + `${fnTag}, Running Transaction: ${methodName} with params: ${params}`, + ); + const response = (await this.connector.invokeContract({ + contract: { + contractName: this.config.contractName, + keychainId: this.config.keychainId, + }, + invocationType: invocationType, + methodName: methodName, + params: params, + web3SigningCredential: this.config.signingCredential, + })) as EthereumResponse; + + if (!response.success) { + throw new TransactionError(fnTag); + } + + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: + safeStableStringify(response.out.transactionReceipt) ?? "", + output: response.callOutput ?? undefined, + }; + } + public async getView(assetId: string): Promise { + const networkDetails = { + connector: this.connector, + //connectorApiPath: "", + signingCredential: this.config.signingCredential, + contractName: this.config.contractName, + contractAddress: this.config.contractAddress, + keychainId: this.config.keychainId, + participant: "Org1MSP", // ?? + }; + + const snapshot = await this.bungee.generateSnapshot( + [assetId], + this.network, + networkDetails, + ); + + const generated = this.bungee.generateView( + snapshot, + "0", + Number.MAX_SAFE_INTEGER.toString(), + undefined, + ); + + if (generated.view == undefined) { + throw new Error("View is undefined"); + } + + return safeStableStringify(generated); + } + public async getReceipt( + //assetId: string, + transactionId: string, + ): Promise { + const fnTag = `${EthereumBridge.CLASS_NAME}}#getReceipt`; + this.log.debug( + `${fnTag}, Getting Receipt: transactionId: ${transactionId}`, + ); + //TODO: implement getReceipt instead of transaction + const getTransactionReq: InvokeRawWeb3EthMethodV1Request = { + methodName: "getTransaction", + params: [transactionId], + }; + const receipt = + await this.connector.invokeRawWeb3EthMethod(getTransactionReq); + + return safeStableStringify(receipt) ?? ""; + } + + interactionList(jsonString: string): InteractionsRequest[] { + const ontologyJSON = JSON.parse(jsonString); + + const interactions: InteractionsRequest[] = []; + + for (const interaction in ontologyJSON["ontology"]) { + const functions: string[] = []; + const variables: string | number[][] = []; + + for (const signature of ontologyJSON["ontology"][ + interaction + ] as InteractionData[]) { + functions.push(signature.functionSignature); + const vars: string | number[] = []; + + for (const variable of signature.variables) { + vars.push(getVarTypes(variable)); + } + variables.push(vars); + } + + const interactionRequest: InteractionsRequest = { + interactionType: getInteractionType(interaction), + functionsSignature: functions, + variables: variables, + available: true, + }; + interactions.push(interactionRequest); + } + + return interactions; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts index f4e8046135..eefeb9b7fd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts @@ -9,6 +9,9 @@ import { FabricConfig, TransactionResponse, } from "../../../types/blockchain-interaction"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + +// eslint-disable-next-line @typescript-eslint/no-unused-vars import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; import { FabricAsset, getVarTypes } from "./types/fabric-asset"; import { @@ -21,11 +24,13 @@ import { InteractionSignature } from "./types/fabric-asset"; import { InteractionData } from "./types/interact"; import { getInteractionType } from "./types/asset"; import { OntologyError, TransactionError } from "../../errors/bridge-erros"; +import { ClaimFormat } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; export class FabricBridge implements NetworkBridge { public static readonly CLASS_NAME = "FabricBridge"; network: string = "FABRIC"; + claimFormat: ClaimFormat; public log: Logger; @@ -38,6 +43,7 @@ export class FabricBridge implements NetworkBridge { this.config = fabricConfig; this.options = fabricConfig.options; this.connector = new PluginLedgerConnectorFabric(fabricConfig.options); + this.claimFormat = fabricConfig.claimFormat; this.bungee = new PluginBungeeHermes(fabricConfig.bungeeOptions); level = level || "INFO"; this.bungee.addStrategy(this.network, new StrategyFabric(level)); @@ -68,7 +74,7 @@ export class FabricBridge implements NetworkBridge { asset.mspId, asset.channelName, asset.contractName, - JSON.stringify(interactions), + safeStableStringify(interactions), ], contractName: this.config.contractName, invocationType: FabricContractInvocationType.Send, @@ -298,50 +304,51 @@ export class FabricBridge implements NetworkBridge { output: response.functionOutput, }; } - - public async getReceipt( - assetId: string, - transactionId: string, - ): Promise { + public async getReceipt(transactionId: string): Promise { const fnTag = `${FabricBridge.CLASS_NAME}}#getReceipt`; - this.log.debug( - `${fnTag}, Getting Receipt: ${assetId} transactionHash: ${transactionId}`, - ); + this.log.debug(`${fnTag}, Getting Receipt: ${transactionId}`); + const receipt = await this.connector.getTransactionReceiptByTxID({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + contractName: "qscc", + invocationType: FabricContractInvocationType.Call, + methodName: "GetBlockByTxID", + params: [this.config.channelName, transactionId], + }); + + return safeStableStringify(receipt); + } + + public async getView(assetId: string): Promise { + const fnTag = `${FabricBridge.CLASS_NAME}}#getView`; + this.log.debug(`${fnTag}, Getting View: ${assetId}`); //todo needs implementation const networkDetails = { - //connector: this.connector, - connectorApiPath: "", //todo check this to not use api + connector: this.connector, + //connectorApiPath: "", //todo check this to not use api signingCredential: this.config.signingCredential, contractName: this.config.contractName, channelName: this.config.channelName, - participant: "Org1MSP", + participant: "Org2MSP", }; - - const snapshot = await this.bungee.generateSnapshot( - [], - this.network, - networkDetails, - ); - - const generated = this.bungee.generateView( - snapshot, - "0", - Number.MAX_SAFE_INTEGER.toString(), - undefined, - ); - - if (generated.view == undefined) { - throw new Error("View is undefined"); + try { + const snapshot = await this.bungee.generateSnapshot( + [assetId], + this.network, + networkDetails, + ); + + const generated = this.bungee.generateView( + snapshot, + "0", + Number.MAX_SAFE_INTEGER.toString(), + undefined, + ); + return safeStableStringify(generated); + } catch (error) { + console.error(error); + return ""; } - - const view = await this.bungee.processView( - generated.view, - //PrivacyPolicyOpts.SingleTransaction, - PrivacyPolicyOpts.PruneState, - [assetId, transactionId], - ); - - return view.getViewStr(); } private interactionList(jsonString: string): InteractionSignature[] { @@ -373,7 +380,7 @@ export class FabricBridge implements NetworkBridge { interactions.push(interactionRequest); } - this.log.info(`Interactions: ${JSON.stringify(interactions)}`); + this.log.info(`Interactions: ${safeStableStringify(interactions)}`); return interactions; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts index acb851090b..8dbade6b15 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts @@ -1,8 +1,10 @@ +import { ClaimFormat } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { TransactionResponse } from "../../../types/blockchain-interaction"; import { Asset } from "./types/asset"; export abstract class NetworkBridge { network!: string; + claimFormat!: ClaimFormat; public networkName(): string { return this.network; @@ -45,7 +47,8 @@ export abstract class NetworkBridge { ): Promise; public abstract getReceipt( - assetId: string, + //assetId: string, transactionId: string, ): Promise; + public abstract getView(assetId: string): Promise; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts index cf75f0449d..a26913a5ed 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ // this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). // should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output import { BridgeManager } from "./bridge-manager"; @@ -5,6 +6,7 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPBridgeConfig } from "../../types"; import { Asset } from "./types/asset"; import { TransactionIdUndefinedError } from "../../errors/bridge-erros"; +import { ClaimFormat } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; export class SATPBridgeManager implements BridgeManager { public static readonly CLASS_NAME = "SATPBridgeManager"; @@ -29,11 +31,9 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = ""; - // this.config.network.getReceipt( - // asset.tokenId, - // response.transactionId, - // ); + const receipt = await this.config.network.getReceipt( + response.transactionId, + ); this.log.info(`${fnTag}, proof of the asset wrapping: ${receipt}`); @@ -48,8 +48,7 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = this.config.network.getReceipt( - assetId, + const receipt = await this.config.network.getReceipt( response.transactionId, ); @@ -70,13 +69,9 @@ export class SATPBridgeManager implements BridgeManager { if (response.transactionId == undefined) { throw new TransactionIdUndefinedError(fnTag); } - - const receipt = ""; - // this.config.network.getReceipt( - // asset.tokenId, - // response.transactionId, - // ); - + const receipt = await this.config.network.getReceipt( + response.transactionId, + ); this.log.info(`${fnTag}, proof of the asset lock: ${receipt}`); return receipt; @@ -92,7 +87,6 @@ export class SATPBridgeManager implements BridgeManager { } const receipt = await this.config.network.getReceipt( - assetId, response.transactionId, ); @@ -110,12 +104,9 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = ""; - // this.config.network.getReceipt( - // asset.tokenId, - // response.transactionId, - // ); - + const receipt = await this.config.network.getReceipt( + transaction.transactionId, + ); this.log.info(`${fnTag}, proof of the asset creation: ${receipt}`); return receipt; @@ -130,11 +121,9 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = ""; - // this.config.network.getReceipt( - // asset.tokenId, - // response.transactionId, - // ); + const receipt = await this.config.network.getReceipt( + transaction.transactionId, + ); this.log.info(`${fnTag}, proof of the asset deletion: ${receipt}`); @@ -158,12 +147,9 @@ export class SATPBridgeManager implements BridgeManager { throw new TransactionIdUndefinedError(fnTag); } - const receipt = ""; - // this.config.network.getReceipt( - // asset.tokenId, - // response.transactionId, - // ); - + const receipt = await this.config.network.getReceipt( + response.transactionId, + ); this.log.info(`${fnTag}, proof of the asset assignment: ${receipt}`); return receipt; @@ -202,4 +188,19 @@ export class SATPBridgeManager implements BridgeManager { return true; } + getReceiptFormat() { + return this.config.network.claimFormat; + } + async getProof(assetId: string): Promise { + // different receipt/proof formats + switch (this.getReceiptFormat()) { + case ClaimFormat.DEFAULT: + return ""; + case ClaimFormat.BUNGEE: + const view = await this.config.network.getView(assetId); + return view; + default: + return ""; + } + } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/evm-asset.ts similarity index 88% rename from packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/evm-asset.ts index f3ddfadee7..dc84be8596 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/evm-asset.ts @@ -1,6 +1,6 @@ import { Asset } from "./asset"; -export interface BesuAsset extends Asset { +export interface EvmAsset extends Asset { contractAddress: string; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts index c741382e2b..8c0f103db5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -15,6 +15,8 @@ import { PreSATPTransferResponse, STATUS, } from "../../../generated/proto/cacti/satp/v02/stage_0_pb"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; import { AssetMissing, @@ -284,7 +286,7 @@ export class Stage0ServerService extends SATPService { ); const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(newSessionResponse)), + sign(this.Signer, safeStableStringify(newSessionResponse)), ); newSessionResponse.serverSignature = messageSignature; @@ -339,7 +341,7 @@ export class Stage0ServerService extends SATPService { sessionData.receiverAsset!.tokenId; const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(preSATPTransferResponse)), + sign(this.Signer, safeStableStringify(preSATPTransferResponse)), ); preSATPTransferResponse.serverSignature = messageSignature; @@ -399,7 +401,6 @@ export class Stage0ServerService extends SATPService { sessionData.receiverWrapAssertionClaim = new WrapAssertionClaim(); sessionData.receiverWrapAssertionClaim.receipt = await bridge.wrapAsset(token); - sessionData.receiverWrapAssertionClaim.signature = bufArray2HexStr( sign(this.Signer, sessionData.receiverWrapAssertionClaim.receipt), ); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index 0f2fc4e9a9..dfc9e0dde0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -23,6 +23,8 @@ import { saveHash, saveSignature, } from "../../session-utils"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SupportedChain } from "../../types"; import { SATPSession } from "../../../core/satp-session"; import { @@ -126,7 +128,7 @@ export class Stage1ServerService extends SATPService { //TODO implement conditional reject const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferProposalReceiptMessage)), + sign(this.Signer, safeStableStringify(transferProposalReceiptMessage)), ); transferProposalReceiptMessage.serverSignature = messageSignature; @@ -145,7 +147,7 @@ export class Stage1ServerService extends SATPService { sessionID: sessionData.id, type: "transferProposalResponse", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info(`${fnTag}, sending TransferProposalResponseMessage...`); @@ -190,7 +192,7 @@ export class Stage1ServerService extends SATPService { transferCommenceResponseMessage.common = commonBody; const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(transferCommenceResponseMessage)), + sign(this.Signer, safeStableStringify(transferCommenceResponseMessage)), ); transferCommenceResponseMessage.serverSignature = messageSignature; @@ -212,7 +214,7 @@ export class Stage1ServerService extends SATPService { sessionID: sessionData.id, type: "transferCommenceResponse", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts index 15dd69e987..fdbfbb156f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage2-server-service.ts @@ -20,6 +20,8 @@ import { ISATPServerServiceOptions, ISATPServiceOptions, } from "../satp-service"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SATPSession } from "../../../core/satp-session"; import { commonBodyVerifier, signatureVerifier } from "../data-verifier"; import { @@ -89,7 +91,7 @@ export class Stage2ServerService extends SATPService { } const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(lockAssertionReceiptMessage)), + sign(this.Signer, safeStableStringify(lockAssertionReceiptMessage)), ); lockAssertionReceiptMessage.serverSignature = messageSignature; @@ -107,7 +109,7 @@ export class Stage2ServerService extends SATPService { sessionID: sessionData.id, type: "lockAssertionResponse", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index 7a9be9f1b1..b898d5eba5 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -8,9 +8,11 @@ import { import { SATP_VERSION } from "../../constants"; import { AssignmentAssertionClaim, + AssignmentAssertionClaimFormat, CommonSatp, MessageType, MintAssertionClaim, + MintAssertionClaimFormat, } from "../../../generated/proto/cacti/satp/v02/common/message_pb"; import { bufArray2HexStr, getHash, sign } from "../../../gateway-utils"; import { @@ -19,6 +21,8 @@ import { saveSignature, SessionType, } from "../../session-utils"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { SATPService, SATPServiceType, @@ -117,7 +121,7 @@ export class Stage3ServerService extends SATPService { } const messageSignature = bufArray2HexStr( - sign(this.Signer, JSON.stringify(commitReadyMessage)), + sign(this.Signer, safeStableStringify(commitReadyMessage)), ); commitReadyMessage.serverSignature = messageSignature; @@ -135,7 +139,7 @@ export class Stage3ServerService extends SATPService { sessionID: sessionData.id, type: "commitReady", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info(`${fnTag}, sending commitReadyMessage...`); @@ -203,7 +207,7 @@ export class Stage3ServerService extends SATPService { const messageSignature = bufArray2HexStr( sign( this.Signer, - JSON.stringify(commitFinalAcknowledgementReceiptResponseMessage), + safeStableStringify(commitFinalAcknowledgementReceiptResponseMessage), ), ); @@ -223,7 +227,7 @@ export class Stage3ServerService extends SATPService { sessionID: sessionData.id, type: "commitFinalAcknowledgementReceiptResponse", operation: "lock", - data: JSON.stringify(sessionData), + data: safeStableStringify(sessionData), }); */ this.Log.info( @@ -424,6 +428,9 @@ export class Stage3ServerService extends SATPService { assetId, Number(amount), ); + sessionData.mintAssertionClaim.proof = await bridge.getProof(assetId); + sessionData.mintAssertionClaimFormat = new MintAssertionClaimFormat(); + sessionData.mintAssertionClaimFormat.format = bridge.getReceiptFormat(); sessionData.mintAssertionClaim.signature = bufArray2HexStr( sign(this.Signer, sessionData.mintAssertionClaim.receipt), ); @@ -474,6 +481,12 @@ export class Stage3ServerService extends SATPService { recipient, Number(amount), ); + sessionData.assignmentAssertionClaim.proof = + await bridge.getProof(assetId); + sessionData.assignmentAssertionClaimFormat = + new AssignmentAssertionClaimFormat(); + sessionData.assignmentAssertionClaimFormat.format = + bridge.getReceiptFormat(); sessionData.assignmentAssertionClaim.signature = bufArray2HexStr( sign(this.Signer, sessionData.assignmentAssertionClaim.receipt), ); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts index dd1be75994..d8bb68d20a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/service-utils.ts @@ -1,7 +1,7 @@ import { Asset as ProtoAsset } from "../../generated/proto/cacti/satp/v02/common/message_pb"; import { SupportedChain } from "../types"; import { Asset } from "./satp-bridge/types/asset"; -import { BesuAsset } from "./satp-bridge/types/besu-asset"; +import { EvmAsset } from "./satp-bridge/types/evm-asset"; import { FabricAsset } from "./satp-bridge/types/fabric-asset"; export function assetToProto( @@ -16,7 +16,10 @@ export function assetToProto( switch (networkId) { case SupportedChain.BESU: - protoAsset.contractAddress = (asset as BesuAsset).contractAddress; + protoAsset.contractAddress = (asset as EvmAsset).contractAddress; + break; + case SupportedChain.EVM: + protoAsset.contractAddress = (asset as EvmAsset).contractAddress; break; case SupportedChain.FABRIC: protoAsset.mspId = (asset as FabricAsset).mspId; @@ -39,8 +42,11 @@ export function protoToAsset(asset: ProtoAsset, networkId: string): Asset { }; switch (networkId) { + case SupportedChain.EVM: + (assetObj as EvmAsset).contractAddress = asset.contractAddress; + break; case SupportedChain.BESU: - (assetObj as BesuAsset).contractAddress = asset.contractAddress; + (assetObj as EvmAsset).contractAddress = asset.contractAddress; break; case SupportedChain.FABRIC: (assetObj as FabricAsset).mspId = asset.mspId; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 7076a9b3de..02e69f68ad 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -40,6 +40,7 @@ export type ShutdownHook = { export enum SupportedChain { FABRIC = "FabricSATPGateway", BESU = "BesuSATPGateway", + EVM = "EthereumSATPGateway", } export type GatewayChannel = { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index 50ed95ab34..ec964ebea4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -2,6 +2,7 @@ import { JsObjectSigner } from "@hyperledger/cactus-common"; import { LocalLog, RemoteLog } from "./core/types"; import { SATPGateway } from "./plugin-satp-hermes-gateway"; import { SHA256 } from "crypto-js"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export function bufArray2HexStr(array: Uint8Array): string { return Buffer.from(array).toString("hex"); @@ -17,7 +18,7 @@ export function verifySignature( obj: any, pubKey: string, ): boolean { - const copy = JSON.parse(JSON.stringify(obj)); + const copy = JSON.parse(safeStableStringify(obj)!); if (copy.clientSignature) { const sourceSignature = new Uint8Array( @@ -28,7 +29,11 @@ export function verifySignature( copy.clientSignature = ""; if ( - !objectSigner.verify(JSON.stringify(copy), sourceSignature, sourcePubkey) + !objectSigner.verify( + safeStableStringify(copy), + sourceSignature, + sourcePubkey, + ) ) { return false; } @@ -42,7 +47,11 @@ export function verifySignature( copy.serverSignature = ""; if ( - !objectSigner.verify(JSON.stringify(copy), sourceSignature, sourcePubkey) + !objectSigner.verify( + safeStableStringify(copy), + sourceSignature, + sourcePubkey, + ) ) { return false; } @@ -88,7 +97,7 @@ export async function storeLog( // Keep the order consistent with the order of the fields in the table // so that the hash matches when retrieving from the database const hash = SHA256( - JSON.stringify(localLog, [ + safeStableStringify(localLog, [ "sessionID", "type", "key", @@ -123,7 +132,7 @@ export async function storeRemoteLog( }; remoteLog.signature = bufArray2HexStr( - sign(gateway.Signer, JSON.stringify(remoteLog)), + sign(gateway.Signer, safeStableStringify(remoteLog)), ); const response = await gateway.remoteRepository?.create(remoteLog); @@ -144,5 +153,5 @@ export function getSatpLogKey( } export function getHash(object: unknown) { - return SHA256(JSON.stringify(object)).toString(); + return SHA256(safeStableStringify(object) ?? "").toString(); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts index b1f2d9df5b..74b5cfc08c 100755 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts @@ -72,7 +72,7 @@ export type SATPWrapperContractEvents = export interface SATPWrapperContractEventsContext { Assign( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -81,7 +81,7 @@ export interface SATPWrapperContractEventsContext { ): EventResponse; Burn( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -99,7 +99,7 @@ export interface SATPWrapperContractEventsContext { ): EventResponse; Lock( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -108,7 +108,7 @@ export interface SATPWrapperContractEventsContext { ): EventResponse; Mint( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -129,7 +129,7 @@ export interface SATPWrapperContractEventsContext { ): EventResponse; Unlock( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -138,7 +138,7 @@ export interface SATPWrapperContractEventsContext { ): EventResponse; Unwrap( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -147,7 +147,7 @@ export interface SATPWrapperContractEventsContext { ): EventResponse; Wrap( parameters: { - filter?: {}; + filter?: { tokenId?: string | string[] }; fromBlock?: number; toBlock?: 'latest' | number; topics?: string[]; @@ -230,9 +230,9 @@ export interface UnwrapEventEmittedResponse { tokenId: string; } export interface WrapEventEmittedResponse { + tokenId: string; contractAddress: string; tokenType: string | number; - tokenId: string; owner: string; } export interface SATPWrapperContract { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index 7f8248ffdd..55811b3d25 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -384,6 +384,26 @@ proto3.util.setEnumType(Error, "cacti.satp.v02.common.Error", [ { no: 11, name: "ERROR_MESSAGE_OUT_OF_SEQUENCE" }, ]); +/** + * @generated from enum cacti.satp.v02.common.ClaimFormat + */ +export enum ClaimFormat { + /** + * @generated from enum value: DEFAULT = 0; + */ + DEFAULT = 0, + + /** + * @generated from enum value: BUNGEE = 1; + */ + BUNGEE = 1, +} +// Retrieve enum metadata with: proto3.getEnumType(ClaimFormat) +proto3.util.setEnumType(ClaimFormat, "cacti.satp.v02.common.ClaimFormat", [ + { no: 0, name: "DEFAULT" }, + { no: 1, name: "BUNGEE" }, +]); + /** * @generated from enum cacti.satp.v02.common.TokenType */ @@ -1404,10 +1424,52 @@ export class Payload extends Message { } } +/** + * @generated from message cacti.satp.v02.common.WrapAssertionClaimFormat + */ +export class WrapAssertionClaimFormat extends Message { + /** + * @generated from field: cacti.satp.v02.common.ClaimFormat format = 1; + */ + format = ClaimFormat.DEFAULT; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.common.WrapAssertionClaimFormat"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "format", kind: "enum", T: proto3.getEnumType(ClaimFormat) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WrapAssertionClaimFormat { + return new WrapAssertionClaimFormat().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WrapAssertionClaimFormat { + return new WrapAssertionClaimFormat().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WrapAssertionClaimFormat { + return new WrapAssertionClaimFormat().fromJsonString(jsonString, options); + } + + static equals(a: WrapAssertionClaimFormat | PlainMessage | undefined, b: WrapAssertionClaimFormat | PlainMessage | undefined): boolean { + return proto3.util.equals(WrapAssertionClaimFormat, a, b); + } +} + /** * @generated from message cacti.satp.v02.common.LockAssertionClaimFormat */ export class LockAssertionClaimFormat extends Message { + /** + * @generated from field: cacti.satp.v02.common.ClaimFormat format = 1; + */ + format = ClaimFormat.DEFAULT; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1416,6 +1478,7 @@ export class LockAssertionClaimFormat extends Message static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.LockAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "format", kind: "enum", T: proto3.getEnumType(ClaimFormat) }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaimFormat { @@ -1439,6 +1502,11 @@ export class LockAssertionClaimFormat extends Message * @generated from message cacti.satp.v02.common.MintAssertionClaimFormat */ export class MintAssertionClaimFormat extends Message { + /** + * @generated from field: cacti.satp.v02.common.ClaimFormat format = 1; + */ + format = ClaimFormat.DEFAULT; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1447,6 +1515,7 @@ export class MintAssertionClaimFormat extends Message static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.MintAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "format", kind: "enum", T: proto3.getEnumType(ClaimFormat) }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaimFormat { @@ -1470,6 +1539,11 @@ export class MintAssertionClaimFormat extends Message * @generated from message cacti.satp.v02.common.BurnAssertionClaimFormat */ export class BurnAssertionClaimFormat extends Message { + /** + * @generated from field: cacti.satp.v02.common.ClaimFormat format = 1; + */ + format = ClaimFormat.DEFAULT; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1478,6 +1552,7 @@ export class BurnAssertionClaimFormat extends Message static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaimFormat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "format", kind: "enum", T: proto3.getEnumType(ClaimFormat) }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaimFormat { @@ -1501,6 +1576,11 @@ export class BurnAssertionClaimFormat extends Message * @generated from message cacti.satp.v02.common.AssignmentAssertionClaimFormat */ export class AssignmentAssertionClaimFormat extends Message { + /** + * @generated from field: cacti.satp.v02.common.ClaimFormat format = 1; + */ + format = ClaimFormat.DEFAULT; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1509,6 +1589,7 @@ export class AssignmentAssertionClaimFormat extends Message [ + { no: 1, name: "format", kind: "enum", T: proto3.getEnumType(ClaimFormat) }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaimFormat { @@ -1538,7 +1619,12 @@ export class LockAssertionClaim extends Message { receipt = ""; /** - * @generated from field: string signature = 2; + * @generated from field: string proof = 2; + */ + proof = ""; + + /** + * @generated from field: string signature = 3; */ signature = ""; @@ -1551,7 +1637,8 @@ export class LockAssertionClaim extends Message { static readonly typeName = "cacti.satp.v02.common.LockAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "proof", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): LockAssertionClaim { @@ -1581,7 +1668,12 @@ export class MintAssertionClaim extends Message { receipt = ""; /** - * @generated from field: string signature = 2; + * @generated from field: string proof = 2; + */ + proof = ""; + + /** + * @generated from field: string signature = 3; */ signature = ""; @@ -1594,7 +1686,8 @@ export class MintAssertionClaim extends Message { static readonly typeName = "cacti.satp.v02.common.MintAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "proof", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): MintAssertionClaim { @@ -1624,7 +1717,12 @@ export class BurnAssertionClaim extends Message { receipt = ""; /** - * @generated from field: string signature = 2; + * @generated from field: string proof = 2; + */ + proof = ""; + + /** + * @generated from field: string signature = 3; */ signature = ""; @@ -1637,7 +1735,8 @@ export class BurnAssertionClaim extends Message { static readonly typeName = "cacti.satp.v02.common.BurnAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "proof", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): BurnAssertionClaim { @@ -1667,7 +1766,12 @@ export class AssignmentAssertionClaim extends Message receipt = ""; /** - * @generated from field: string signature = 2; + * @generated from field: string proof = 2; + */ + proof = ""; + + /** + * @generated from field: string signature = 3; */ signature = ""; @@ -1680,7 +1784,8 @@ export class AssignmentAssertionClaim extends Message static readonly typeName = "cacti.satp.v02.common.AssignmentAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "proof", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): AssignmentAssertionClaim { @@ -1710,7 +1815,12 @@ export class WrapAssertionClaim extends Message { receipt = ""; /** - * @generated from field: string signature = 2; + * @generated from field: string proof = 2; + */ + proof = ""; + + /** + * @generated from field: string signature = 3; */ signature = ""; @@ -1723,7 +1833,8 @@ export class WrapAssertionClaim extends Message { static readonly typeName = "cacti.satp.v02.common.WrapAssertionClaim"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "receipt", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "proof", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): WrapAssertionClaim { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts index 3252392242..50063af5ee 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/gateway-orchestrator.ts @@ -18,6 +18,7 @@ import { } from "@connectrpc/connect"; import { Express } from "express"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; import { expressConnectMiddleware } from "@connectrpc/connect-express"; @@ -156,7 +157,7 @@ export class GatewayOrchestrator { }); if (!channel) { throw new Error( - `No channel found for DLT ${dlt} \n available channels: ${JSON.stringify(channels)}`, + `No channel found for DLT ${dlt} \n available channels: ${safeStableStringify(channels)}`, ); } return channel; @@ -269,7 +270,7 @@ export class GatewayOrchestrator { ): Map> { // one function for each client type; aggregate in array this.logger.debug( - `Creating clients for gateway ${JSON.stringify(identity)}`, + `Creating clients for gateway ${safeStableStringify(identity)}`, ); const transport0 = createGrpcWebTransport({ baseUrl: diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts index d4221ccb96..536c407b44 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts @@ -12,8 +12,10 @@ import { FabricConfig, BesuConfig, NetworkConfig, + EthereumConfig, } from "../types/blockchain-interaction"; import { ValidatorOptions } from "class-validator"; +import { EthereumBridge } from "../core/stage-services/satp-bridge/ethereum-bridge"; export interface ISATPBridgesOptions { logLevel?: LogLevelDesc; @@ -53,6 +55,9 @@ export class SATPBridgesManager { case SupportedChain.BESU: bridge = new BesuBridge(bridgeConfig as BesuConfig); break; + case SupportedChain.EVM: + bridge = new EthereumBridge(bridgeConfig as EthereumConfig); + break; default: throw new Error(`Unsupported network: ${bridgeConfig.network}`); } @@ -86,6 +91,12 @@ export class SATPBridgesManager { case SupportedChain.BESU: bridge = new BesuBridge(networkConfig as BesuConfig, this.level); break; + case SupportedChain.EVM: + bridge = new EthereumBridge( + networkConfig as EthereumConfig, + this.level, + ); + break; default: throw new Error(`Unsupported network: ${networkConfig.network}`); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts index ce1d2cc8d9..6806f3787b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-manager.ts @@ -5,6 +5,8 @@ import { Logger, LoggerProvider, } from "@hyperledger/cactus-common"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; + import { Stage0SATPHandler } from "../core/stage-handlers/stage0-handler"; import { Stage0ServerService } from "../core/stage-services/server/stage0-server-service"; @@ -350,7 +352,7 @@ export class SATPManager { this.logger.debug(`${fnTag}, Initiating Transfer`); const clientSessionData = session.getClientSessionData(); - const clientSessionDataJson = JSON.stringify(clientSessionData); + const clientSessionDataJson = safeStableStringify(clientSessionData); this.logger.debug(`clientSessionDataJson=%s`, clientSessionDataJson); if (!clientSessionData) { @@ -411,7 +413,7 @@ export class SATPManager { const check = await clientSatpStage0.check({ check: "check" }); - this.logger.info(`${fnTag}, check: ${JSON.stringify(check)}`); + this.logger.info(`${fnTag}, check: ${safeStableStringify(check)}`); if (!check) { throw new Error(`${fnTag}, Failed to check`); @@ -442,7 +444,7 @@ export class SATPManager { await clientSatpStage0.newSession(newSessionRequest); this.logger.info( - `${fnTag}, responseNewSession: ${JSON.stringify(responseNewSession)}`, + `${fnTag}, responseNewSession: ${safeStableStringify(responseNewSession)}`, ); if (!responseNewSession) { @@ -462,7 +464,7 @@ export class SATPManager { ); this.logger.info( - `${fnTag}, responsePreSATPTransfer: ${JSON.stringify(responsePreSATPTransfer)}`, + `${fnTag}, responsePreSATPTransfer: ${safeStableStringify(responsePreSATPTransfer)}`, ); this.logger.info(`${fnTag}, Stage 0 completed`); @@ -480,7 +482,7 @@ export class SATPManager { ); this.logger.info( - `${fnTag}, responseTransferProposal: ${JSON.stringify(responseTransferProposal)}`, + `${fnTag}, responseTransferProposal: ${safeStableStringify(responseTransferProposal)}`, ); const requestTransferCommence = await ( @@ -496,7 +498,7 @@ export class SATPManager { ); this.logger.info( - `${fnTag}, responseTransferCommence: ${JSON.stringify(responseTransferCommence)}`, + `${fnTag}, responseTransferCommence: ${safeStableStringify(responseTransferCommence)}`, ); this.logger.info(`${fnTag}, Stage 1 completed`); @@ -513,7 +515,7 @@ export class SATPManager { await clientSatpStage2.lockAssertion(requestLockAssertion); this.logger.info( - `${fnTag}, responseLockAssertion: ${JSON.stringify(responseLockAssertion)}`, + `${fnTag}, responseLockAssertion: ${safeStableStringify(responseLockAssertion)}`, ); this.logger.info(`${fnTag}, Stage 2 completed`); @@ -530,7 +532,7 @@ export class SATPManager { requestCommitPreparation, ); this.logger.info( - `${fnTag}, responseCommitPreparation: ${JSON.stringify(responseCommitPreparation)}`, + `${fnTag}, responseCommitPreparation: ${safeStableStringify(responseCommitPreparation)}`, ); const requestCommitFinalAssertion = await ( @@ -544,7 +546,7 @@ export class SATPManager { const responseCommitFinalAssertion = await clientSatpStage3.commitFinalAssertion(requestCommitFinalAssertion); this.logger.info( - `${fnTag}, responseCommitFinalAssertion: ${JSON.stringify(responseCommitFinalAssertion)}`, + `${fnTag}, responseCommitFinalAssertion: ${safeStableStringify(responseCommitFinalAssertion)}`, ); const RequestTransferComplete = await ( @@ -559,7 +561,7 @@ export class SATPManager { RequestTransferComplete, ); this.logger.info( - `${fnTag}, responseTransferComplete: ${JSON.stringify(responseTransferComplete)}`, + `${fnTag}, responseTransferComplete: ${safeStableStringify(responseTransferComplete)}`, ); this.logger.info(`${fnTag}, Stage 3 completed`); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts index 72ecfcdc08..919f5fc4ca 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/network-identification/resolve-gateway.ts @@ -21,7 +21,11 @@ export async function resolveGatewayID( Crash: "1.0", }, ], - supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + supportedDLTs: [ + SupportedChain.FABRIC, + SupportedChain.BESU, + SupportedChain.EVM, + ], proofID: "mockProofID1", gatewayServerPort: 3011, address: "http://localhost", @@ -36,7 +40,11 @@ export async function resolveGatewayID( Crash: "1.0", }, ], - supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + supportedDLTs: [ + SupportedChain.FABRIC, + SupportedChain.BESU, + SupportedChain.EVM, + ], proofID: "mockProofID1", gatewayServerPort: 3012, address: "http://localhost", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index 453c96b26f..38ed98a4b7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -279,7 +279,11 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { Crash: "v02", }, ], - supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + supportedDLTs: [ + SupportedChain.FABRIC, + SupportedChain.BESU, + SupportedChain.EVM, + ], proofID: "mockProofID1", gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, @@ -314,6 +318,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { pluginOptions.gid.supportedDLTs = [ SupportedChain.FABRIC, SupportedChain.BESU, + SupportedChain.EVM, ]; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts index ef4514f055..e11b1c553b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/ipfs-remote-log-repository.ts @@ -2,6 +2,7 @@ import { DefaultApi as ObjectStoreIpfsApi } from "@hyperledger/cactus-plugin-obj import { Configuration } from "@hyperledger/cactus-core-api"; import { IRemoteLogRepository } from "./interfaces/repository"; import { RemoteLog } from "../core/types"; +import { stringify as safeStableStringify } from "safe-stable-stringify"; export class IPFSRemoteLogRepository implements IRemoteLogRepository { public static readonly CLASS_NAME = "IPFSRemoteLogRepository"; @@ -34,7 +35,7 @@ export class IPFSRemoteLogRepository implements IRemoteLogRepository { create(log: RemoteLog): any { const fnTag = `${this.className}#create()`; - const logBase64 = Buffer.from(JSON.stringify(log)).toString("base64"); + const logBase64 = Buffer.from(safeStableStringify(log)).toString("base64"); return this.database .setObjectV1({ diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts index 283f7b23c3..2bfb16fb79 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts @@ -8,9 +8,16 @@ import { IPluginLedgerConnectorBesuOptions, Web3SigningCredential, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; + +import { + IPluginLedgerConnectorEthereumOptions, + Web3SigningCredential as Web3SigningCredentialEth, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; + import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; -import { BesuAsset } from "../core/stage-services/satp-bridge/types/besu-asset"; +import { EvmAsset } from "../core/stage-services/satp-bridge/types/evm-asset"; import { FabricAsset } from "../core/stage-services/satp-bridge/types/fabric-asset"; +import { ClaimFormat } from "../generated/proto/cacti/satp/v02/common/message_pb"; // inject gateway, get connectors export type SATPLedgerConnector = string; @@ -19,6 +26,7 @@ export type SATPLedgerConnector = string; export interface NetworkConfig { network: string; + claimFormat: ClaimFormat; } export interface FabricConfig extends NetworkConfig { signingCredential: FabricSigningCredential; @@ -36,7 +44,18 @@ export interface BesuConfig extends NetworkConfig { gas: number; options: IPluginLedgerConnectorBesuOptions; bungeeOptions: IPluginBungeeHermesOptions; - besuAssets?: BesuAsset[]; + besuAssets?: EvmAsset[]; +} + +export interface EthereumConfig extends NetworkConfig { + keychainId: string; + signingCredential: Web3SigningCredentialEth; + contractName: string; + contractAddress: string; + gas: number; + options: IPluginLedgerConnectorEthereumOptions; + bungeeOptions: IPluginBungeeHermesOptions; + ethereumAssets?: EvmAsset[]; } export interface TransactionResponse { diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/93d35733085ee70624acdfc4647920e4.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/93d35733085ee70624acdfc4647920e4.json new file mode 100644 index 0000000000..15acfa0a6e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/93d35733085ee70624acdfc4647920e4.json @@ -0,0 +1 @@ +{"id":"93d35733085ee70624acdfc4647920e4","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/b88c862f76663d3260981c0798346189.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/b88c862f76663d3260981c0798346189.json new file mode 100644 index 0000000000..5036baccbd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/b88c862f76663d3260981c0798346189.json @@ -0,0 +1 @@ +{"id":"b88c862f76663d3260981c0798346189","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/c06d59a985d3e5018c60534c7b22ef49.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/c06d59a985d3e5018c60534c7b22ef49.json new file mode 100644 index 0000000000..5ecdbb57a2 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/build-info/c06d59a985d3e5018c60534c7b22ef49.json @@ -0,0 +1 @@ +{"id":"c06d59a985d3e5018c60534c7b22ef49","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/Ownable.sol","1":"node_modules/@openzeppelin/contracts/utils/Context.sol","2":"node_modules/@openzeppelin/contracts/utils/Strings.sol","3":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","4":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","5":"src/solidity/ITraceableContract.sol","6":"src/solidity/satp-wrapper-without-json.sol","7":"src/solidity/satp-wrapper.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json index a1ed6ed5c3..5038f25c2d 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json +++ b/packages/cactus-plugin-satp-hermes/src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json @@ -1 +1 @@ -{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"tokensInteractions","inputs":[{"name":"","type":"string","internalType":"string"},{"name":"","type":"uint8","internalType":"enum InteractionType"}],"outputs":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"available","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"interactions","type":"tuple[]","internalType":"struct InteractionSignature[]","components":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"functionsSignature","type":"string[]","internalType":"string[]"},{"name":"variables","type":"uint8[][]","internalType":"enum VarType[][]"},{"name":"available","type":"bool","internalType":"bool"}]}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"uint8","indexed":false,"internalType":"enum TokenType"},{"name":"tokenId","type":"string","indexed":false,"internalType":"string"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b5060405162002c7738038062002c778339810160408190526200003491620000e6565b806001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f8162000096565b50600480546001600160a01b0319166001600160a01b039290921691909117905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f957600080fd5b81516001600160a01b03811681146200011157600080fd5b9392505050565b612b4f80620001286000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220cbd06ceff5239642be8eb500f3fd96da9c5b22d5435614c0fd5c273970d8434764736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;1703:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1749:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:8;428:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1776:14:7::1;:41:::0;;-1:-1:-1;;;;;;1776:41:7::1;-1:-1:-1::0;;;;;1776:41:7;;;::::1;::::0;;;::::1;::::0;;1008:8352;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:290:8:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:8;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:8:o;309:203::-;1008:8352:7;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e13565b6102bf565b604051610129959493929190611ec1565b60405180910390f35b610145610140366004611f05565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611f60565b6104c0565b61019b610610565b6040516101299190611fb6565b6101456101b6366004612168565b6106e9565b6101c361098a565b005b6101456101d33660046123d2565b61099e565b6000546001600160a01b0316610168565b6101456101f7366004611e13565b610a7f565b61014561020a366004611f05565b610c6c565b61022261021d366004611e13565b610da0565b6040516101299190612440565b61014561023d366004611f05565b610ef3565b610145610250366004611f05565b611042565b61029e6102633660046124a5565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b604051610129929190612502565b6101c36102ba36600461251f565b611139565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff169291906103069061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546103329061253a565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a9611177565b60006001600160a01b03166001846040516103c49190612574565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612590565b60405180910390fd5b610412836000846111a4565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b816001846040516104689190612574565b9081526020016040518091039020600301819055507f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a683836040516104ae9291906125a3565b60405180910390a15060015b92915050565b60006104ca611177565b816001856040516104db9190612574565b908152602001604051809103902060030154101561053b5760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b61054884600284866111af565b6105945760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105a59190612574565b908152602001604051809103902060030160008282546105c591906125db565b90915550506040517f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c906105fe908690869086906125ee565b60405180910390a15060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b828210156106e05783829060005260206000200180546106539061253a565b80601f016020809104026020016040519081016040528092919081815260200182805461067f9061253a565b80156106cc5780601f106106a1576101008083540402835291602001916106cc565b820191906000526020600020905b8154815290600101906020018083116106af57829003601f168201915b505050505081526020019060010190610634565b50505050905090565b60006106f3611177565b60006001600160a01b031660018560405161070e9190612574565b908152604051908190036020019020546001600160a01b03161461074757836040516319eac8d160e21b81526004016103fd9190612590565b61075184836114c8565b6002846040516107619190612574565b9081526040805160209281900383019020600360008181529190935220015460ff1615610805576107938460036115e8565b6108055760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561083157610831611e47565b8152602001858152602001846001600160a01b0316815260200160008152506001856040516108609190612574565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108ba576108ba611e47565b0217905550604082015160018201906108d3908261266a565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01610940858261266a565b507ffc4880465dc3977b851975c93dcde086945a51118c42a660991dce4cab2b0966868686866040516109769493929190612729565b60405180910390a150600195945050505050565b610992611177565b61099c60006115fe565b565b60006109a8611177565b3063623662ad868686866000604051908082528060200260200182016040528015610a1057816020015b6109fd6040805160808101909152806000815260606020820181905260408201819052600091015290565b8152602001906001900390816109d25790505b506040518663ffffffff1660e01b8152600401610a319594939291906127f7565b6020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190612925565b90505b949350505050565b6000610a89611177565b60006001600160a01b0316600183604051610aa49190612574565b908152604051908190036020019020546001600160a01b031603610add578160405163c0bab25f60e01b81526004016103fd9190612590565b6000600183604051610aef9190612574565b9081526020016040518091039020600301541115610b225781604051635be9608560e11b81526004016103fd9190612590565b610bd4600183604051610b359190612574565b90815260200160405180910390206001018054610b519061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d9061253a565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b505050505061164e565b600182604051610be49190612574565b90815260405190819003602001902080546001600160a81b03191681556000610c106001830182611b29565b506002810180546001600160a01b031916905560006003909101556040517f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490610c5b908490612590565b60405180910390a15060015b919050565b6000610c76611177565b81600184604051610c879190612574565b9081526020016040518091039020600301541015610ce75760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610cf3836001846111a4565b610d385760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d499190612574565b90815260200160405180910390206003016000828254610d6991906125db565b90915550506040517fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906104ae90859085906125a3565b610dd26040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610de29190612574565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e2857610e28611e47565b6003811115610e3957610e39611e47565b8152602001600182018054610e4d9061253a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e799061253a565b8015610ec65780601f10610e9b57610100808354040283529160200191610ec6565b820191906000526020600020905b815481529060010190602001808311610ea957829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610efd611177565b60006001600160a01b0316600184604051610f189190612574565b908152604051908190036020019020546001600160a01b031603610f51578260405163c0bab25f60e01b81526004016103fd9190612590565b81600184604051610f629190612574565b9081526020016040518091039020600301541015610f9757828260405163076abcf360e51b81526004016103fd9291906125a3565b6000610fa5846005856111a4565b905080156110275782600185604051610fbe9190612574565b90815260200160405180910390206003016000828254610fde91906125db565b90915550506040517f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e9061101590869086906125a3565b60405180910390a160019150506104ba565b836040516358300fe760e01b81526004016103fd9190612590565b600061104c611177565b60006001600160a01b03166001846040516110679190612574565b908152604051908190036020019020546001600160a01b0316036110a0578260405163c0bab25f60e01b81526004016103fd9190612590565b60006110ae846004856111a4565b9050801561111e57826001856040516110c79190612574565b908152602001604051809103902060030160008282546110e79190612942565b90915550506040517fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979061101590869086906125a3565b8360405163412204b560e11b81526004016103fd9190612590565b611141611177565b6001600160a01b03811661116b57604051631e4fbdf760e01b8152600060048201526024016103fd565b611174816115fe565b50565b6000546001600160a01b0316331461099c5760405163118cdaa760e01b81523360048201526024016103fd565b6000610a7784848460005b60006002856040516111c19190612574565b908152602001604051809103902060008560058111156111e3576111e3611e47565b60058111156111f4576111f4611e47565b815260208101919091526040016000206003015460ff1661121757506000610a77565b60005b60028660405161122a9190612574565b9081526020016040518091039020600086600581111561124c5761124c611e47565b600581111561125d5761125d611e47565b81526020810191909152604001600020600101548110156114bc57600060028760405161128a9190612574565b908152602001604051809103902060008760058111156112ac576112ac611e47565b60058111156112bd576112bd611e47565b815260200190815260200160002060010182815481106112df576112df612955565b906000526020600020016040516020016112f9919061296b565b60405160208183030381529060405280519060200120905060006114158261141060028b60405161132a9190612574565b908152602001604051809103902060008b600581111561134c5761134c611e47565b600581111561135d5761135d611e47565b8152602001908152602001600020600201868154811061137f5761137f612955565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561140357602002820191906000526020600020906000905b82829054906101000a900460ff1660068111156113e1576113e1611e47565b8152602060019283018181049485019490930390920291018084116113c25790505b50505050508b898b6117ac565b611a7b565b905060006001896040516114299190612574565b908152604051908190036020018120546001600160a01b03169061144e908490612574565b6000604051808303816000865af19150503d806000811461148b576040519150601f19603f3d011682016040523d82523d6000602084013e611490565b606091505b50509050806114a6576000945050505050610a77565b50505080806114b4906129e1565b91505061121a565b50600195945050505050565b60005b81518110156115e3578181815181106114e6576114e6612955565b60200260200101516002846040516114fe9190612574565b9081526020016040518091039020600084848151811061152057611520612955565b602002602001015160000151600581111561153d5761153d611e47565b600581111561154e5761154e611e47565b8152602081019190915260400160002081518154829060ff1916600183600581111561157c5761157c611e47565b021790555060208281015180516115999260018501920190611b63565b50604082015180516115b5916002840191602090910190611bb9565b50606091909101516003909101805460ff1916911515919091179055806115db816129e1565b9150506114cb565b505050565b60006115f783836000806111af565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b6003548110156117a85761170a6003828154811061167157611671612955565b9060005260206000200180546116869061253a565b80601f01602080910402602001604051908101604052809291908181526020018280546116b29061253a565b80156116ff5780601f106116d4576101008083540402835291602001916116ff565b820191906000526020600020905b8154815290600101906020018083116116e257829003601f168201915b505050505083611b04565b15611796576003805461171f906001906125db565b8154811061172f5761172f612955565b906000526020600020016003828154811061174c5761174c612955565b90600052602060002001908161176291906129fa565b50600380548061177457611774612ad4565b6001900381819060005260206000200160006117909190611b29565b90555050565b806117a0816129e1565b915050611651565b5050565b6060600085516001600160401b038111156117c9576117c9611d36565b6040519080825280602002602001820160405280156117fc57816020015b60608152602001906001900390816117e75790505b50905060005b8651811015611a7157600587828151811061181f5761181f612955565b6020026020010151600681111561183857611838611e47565b0361187a5760408051306020820152015b60405160208183030381529060405282828151811061186a5761186a612955565b6020026020010181905250611a5f565b600287828151811061188e5761188e612955565b602002602001015160068111156118a7576118a7611e47565b036118bd57856040516020016118499190612590565b60048782815181106118d1576118d1612955565b602002602001015160068111156118ea576118ea611e47565b0361190057604080516020810186905201611849565b600387828151811061191457611914612955565b6020026020010151600681111561192d5761192d611e47565b0361196b576001866040516119429190612574565b908152604080519182900360209081018320600201546001600160a01b03169083015201611849565b600087828151811061197f5761197f612955565b6020026020010151600681111561199857611998611e47565b036119d3576001866040516119ad9190612574565b908152604080519182900360209081018320546001600160a01b03169083015201611849565b60068782815181106119e7576119e7612955565b60200260200101516006811115611a0057611a00611e47565b03611a1e57604080516001600160a01b038716602082015201611849565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611a69816129e1565b915050611802565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611afd5781838281518110611ac057611ac0612955565b6020026020010151604051602001611ad9929190612aea565b60405160208183030381529060405291508080611af5906129e1565b915050611aa4565b5092915050565b6000815183511480156115f75750508051602091820120825192909101919091201490565b508054611b359061253a565b6000825580601f10611b45575050565b601f0160209004906000526020600020908101906111749190611c12565b828054828255906000526020600020908101928215611ba9579160200282015b82811115611ba95782518290611b99908261266a565b5091602001919060010190611b83565b50611bb5929150611c27565b5090565b828054828255906000526020600020908101928215611c06579160200282015b82811115611c065782518051611bf6918491602090910190611c44565b5091602001919060010190611bd9565b50611bb5929150611cf4565b5b80821115611bb55760008155600101611c13565b80821115611bb5576000611c3b8282611b29565b50600101611c27565b82805482825590600052602060002090601f01602090048101928215611ce85791602002820160005b83821115611cb957835183826101000a81548160ff02191690836006811115611c9857611c98611e47565b02179055509260200192600101602081600001049283019260010302611c6d565b8015611ce65782816101000a81549060ff0219169055600101602081600001049283019260010302611cb9565b505b50611bb5929150611c12565b80821115611bb5576000611d088282611d11565b50600101611cf4565b50805460008255601f0160209004906000526020600020908101906111749190611c12565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611d6e57611d6e611d36565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d9c57611d9c611d36565b604052919050565b600082601f830112611db557600080fd5b81356001600160401b03811115611dce57611dce611d36565b611de1601f8201601f1916602001611d74565b818152846020838601011115611df657600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e2557600080fd5b81356001600160401b03811115611e3b57600080fd5b610a7784828501611da4565b634e487b7160e01b600052602160045260246000fd5b60048110611e6d57611e6d611e47565b9052565b60005b83811015611e8c578181015183820152602001611e74565b50506000910152565b60008151808452611ead816020860160208601611e71565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611ede6020840188611e5d565b60a06040840152611ef260a0840187611e95565b9416606083015250608001529392505050565b60008060408385031215611f1857600080fd5b82356001600160401b03811115611f2e57600080fd5b611f3a85828601611da4565b95602094909401359450505050565b80356001600160a01b0381168114610c6757600080fd5b600080600060608486031215611f7557600080fd5b83356001600160401b03811115611f8b57600080fd5b611f9786828701611da4565b935050611fa660208501611f49565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561200b57603f19888603018452611ff9858351611e95565b94509285019290850190600101611fdd565b5092979650505050505050565b803560048110610c6757600080fd5b60006001600160401b0382111561204057612040611d36565b5060051b60200190565b803560068110610c6757600080fd5b600082601f83011261206a57600080fd5b8135602061207f61207a83612027565b611d74565b828152600592831b850182019282820191908785111561209e57600080fd5b8387015b858110156121425780356001600160401b038111156120c15760008081fd5b8801603f81018a136120d35760008081fd5b8581013560406120e561207a83612027565b82815291851b8301810191888101908d8411156121025760008081fd5b938201935b838510156121315784359250600783106121215760008081fd5b8282529389019390890190612107565b8852505050938501935084016120a2565b5090979650505050505050565b801515811461117457600080fd5b8035610c678161214f565b600080600080600060a0868803121561218057600080fd5b61218986611f49565b945061219760208701612018565b93506001600160401b03604087013511156121b157600080fd5b6121c18760408801358801611da4565b92506121cf60608701611f49565b91506001600160401b03608087013511156121e957600080fd5b86601f6080880135880101126121fe57600080fd5b61221161207a6080880135880135612027565b6080870135870180358083526020808401939260059290921b9091010189101561223a57600080fd5b602060808901358901015b60808901358901803560051b016020018110156123c2576001600160401b038135111561227157600080fd5b803560808a01358a01016080601f19828d0301121561228f57600080fd5b612297611d4c565b6122a36020830161204a565b81526001600160401b03604083013511156122bd57600080fd5b8b603f6040840135840101126122d257600080fd5b6122e861207a6020604085013585010135612027565b6020604084810135850182810135808552928401939260051b01018e101561230f57600080fd5b6040808501358501015b6040858101358601602081013560051b010181101561236b576001600160401b038135111561234757600080fd5b61235d8f60408335604089013589010101611da4565b835260209283019201612319565b506020830152506001600160401b036060830135111561238a57600080fd5b61239d8c60206060850135850101612059565b60408201526123ae6080830161215d565b606082015284525060209283019201612245565b5080925050509295509295909350565b600080600080608085870312156123e857600080fd5b6123f185611f49565b93506123ff60208601612018565b925060408501356001600160401b0381111561241a57600080fd5b61242687828801611da4565b92505061243560608601611f49565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124686040850182611e5d565b50604084015160a0606085015261248260c0850182611e95565b9050816060860151166080850152608085015160a0850152809250505092915050565b600080604083850312156124b857600080fd5b82356001600160401b038111156124ce57600080fd5b6124da85828601611da4565b9250506124e96020840161204a565b90509250929050565b60068110611e6d57611e6d611e47565b6040810161251082856124f2565b82151560208301529392505050565b60006020828403121561253157600080fd5b6115f782611f49565b600181811c9082168061254e57607f821691505b60208210810361256e57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251612586818460208701611e71565b9190910192915050565b6020815260006115f76020830184611e95565b6040815260006125b66040830185611e95565b90508260208301529392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104ba576104ba6125c5565b6060815260006126016060830186611e95565b6001600160a01b039490941660208301525060400152919050565b601f8211156115e357600081815260208120601f850160051c810160208610156126435750805b601f850160051c820191505b818110156126625782815560010161264f565b505050505050565b81516001600160401b0381111561268357612683611d36565b61269781612691845461253a565b8461261c565b602080601f8311600181146126cc57600084156126b45750858301515b600019600386901b1c1916600185901b178555612662565b600085815260208120601f198616915b828110156126fb578886015182559484019460019091019084016126dc565b50858210156127195787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682526000906127466020840187611e5d565b6080604084015261275a6080840186611e95565b915080841660608401525095945050505050565b6000815180845260208085019450848260051b86018286016000805b868110156127e9578484038a52825180518086529087019087860190845b818110156127d4578351600781106127c2576127c2611e47565b835292890192918901916001016127a8565b50509a87019a9450509185019160010161278a565b509198975050505050505050565b6001600160a01b03868116825260009060a09060206128188186018a611e5d565b6040838187015261282b8487018a611e95565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561290d57601f1987840301855281518a84016128798583516124f2565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128cc57609f198986030183526128ba858551611e95565b9450928e0192918e019160010161289e565b50505050898201518582038b8701526128e5828261276e565b92890151801515878b01529291506128fa9050565b958a019593505090880190600101612858565b50508099505050505050505050509695505050505050565b60006020828403121561293757600080fd5b81516115f78161214f565b808201808211156104ba576104ba6125c5565b634e487b7160e01b600052603260045260246000fd5b60008083546129798161253a565b6001828116801561299157600181146129a6576129d5565b60ff19841687528215158302870194506129d5565b8760005260208060002060005b858110156129cc5781548a8201529084019082016129b3565b50505082870194505b50929695505050505050565b6000600182016129f3576129f36125c5565b5060010190565b818103612a05575050565b612a0f825461253a565b6001600160401b03811115612a2657612a26611d36565b612a3481612691845461253a565b6000601f821160018114612a685760008315612a505750848201545b600019600385901b1c1916600184901b178455612acd565b600085815260209020601f19841690600086815260209020845b83811015612aa25782860154825560019586019590910190602001612a82565b5085831015612ac05781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612afc818460208801611e71565b835190830190612b10818360208801611e71565b0194935050505056fea2646970667358221220cbd06ceff5239642be8eb500f3fd96da9c5b22d5435614c0fd5c273970d8434764736f6c63430008140033","sourceMap":"1008:8352:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1074:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4469:419;;;;;;:::i;:::-;;:::i;:::-;;;3609:14:8;;3602:22;3584:41;;3572:2;3557:18;4469:419:7;3444:187:8;1269:29:7;;;;;-1:-1:-1;;;;;1269:29:7;;;;;;-1:-1:-1;;;;;3800:32:8;;;3782:51;;3770:2;3755:18;1269:29:7;3636:203:8;5281:461:7;;;;;;:::i;:::-;;:::i;5760:94::-;;;:::i;:::-;;;;;;;:::i;1830:816::-;;;;;;:::i;:::-;;:::i;2293:101:0:-;;;:::i;:::-;;2652:252:7;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2910:431:7;;;;;;:::i;:::-;;:::i;4894:381::-;;;;;;:::i;:::-;;:::i;6142:121::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3838:624::-;;;;;;:::i;:::-;;:::i;3347:484::-;;;;;;:::i;:::-;;:::i;1149:94::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:94:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;1074:40:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;;;1074:40:7;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1074:40:7;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;1074:40:7;:::o;4469:419::-;4550:12;1531:13:0;:11;:13::i;:::-;4620:1:7::1;-1:-1:-1::0;;;;;4577:45:7::1;:6;4584:7;4577:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4577:31:7::1;:45:::0;4574:107:::1;;4662:7;4644:26;;-1:-1:-1::0;;;4644:26:7::1;;;;;;;;:::i;:::-;;;;;;;;4574:107;4707:47;4716:7;4725:20;4747:6;4707:8;:47::i;:::-;4699:83;;;::::0;-1:-1:-1;;;4699:83:7;;15099:2:8;4699:83:7::1;::::0;::::1;15081:21:8::0;15138:2;15118:18;;;15111:30;-1:-1:-1;;;15157:18:8;;;15150:52;15219:18;;4699:83:7::1;14897:346:8::0;4699:83:7::1;4818:6;4793;4800:7;4793:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;:31;;;;4839:21;4844:7;4853:6;4839:21;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;4877:4:7::1;1554:1:0;4469:419:7::0;;;;:::o;5281:461::-;5390:12;1531:13:0;:11;:13::i;:::-;5448:6:7::1;5422;5429:7;5422:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5414:77;;;::::0;-1:-1:-1;;;5414:77:7;;15746:2:8;5414:77:7::1;::::0;::::1;15728:21:8::0;;;15765:18;;;15758:30;15824:34;15804:18;;;15797:62;15876:18;;5414:77:7::1;15544:356:8::0;5414:77:7::1;5510:67;5519:7;5528:22;5552:6;5560:16;5510:8;:67::i;:::-;5502:104;;;::::0;-1:-1:-1;;;5502:104:7;;16107:2:8;5502:104:7::1;::::0;::::1;16089:21:8::0;16146:2;16126:18;;;16119:30;16185:26;16165:18;;;16158:54;16229:18;;5502:104:7::1;15905:348:8::0;5502:104:7::1;5643:6;5617;5624:7;5617:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5673:41:7::1;::::0;::::1;::::0;::::1;::::0;5680:7;;5689:16;;5707:6;;5673:41:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;5731:4:7::1;5281:461:::0;;;;;:::o;5760:94::-;5810:15;5844:3;5837:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5760:94;:::o;1830:816::-;2001:16;1531:13:0;:11;:13::i;:::-;2075:1:7::1;-1:-1:-1::0;;;;;2032:45:7::1;:6;2039:7;2032:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2032:31:7::1;:45;2029:110;;2120:7;2100:28;;-1:-1:-1::0;;;2100:28:7::1;;;;;;;;:::i;2029:110::-;2149:53;2180:7;2189:12;2149:30;:53::i;:::-;2216:18;2235:7;2216:27;;;;;;:::i;:::-;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;2244:30:::1;2216:59;::::0;;;;;;;;:69:::1;::::0;::::1;;2213:221;;;2309:49;2318:7;2327:30;2309:8;:49::i;:::-;2301:122;;;::::0;-1:-1:-1;;;2301:122:7;;17118:2:8;2301:122:7::1;::::0;::::1;17100:21:8::0;17157:2;17137:18;;;17130:30;17196:34;17176:18;;;17169:62;17267:30;17247:18;;;17240:58;17315:19;;2301:122:7::1;16916:424:8::0;2301:122:7::1;2462:52;;;;;;;;2468:15;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2485:9;2462:52;;;;;;;;:::i;:::-;;;;;2496:7;2462:52;;;;2505:5;-1:-1:-1::0;;;;;2462:52:7::1;;;;;2512:1;2462:52;;::::0;2444:6:::1;2451:7;2444:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;:70;;;;-1:-1:-1;;;;;2444:70:7;;::::1;-1:-1:-1::0;;;;;;2444:70:7;::::1;::::0;::::1;::::0;;;;::::1;::::0;:15;;;;-1:-1:-1;;;;;;2444:70:7;;-1:-1:-1;;;2444:70:7;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2444:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2444:70:7::1;-1:-1:-1::0;;;;;2444:70:7;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2529:17;;-1:-1:-1;2529:17:7;::::1;::::0;;-1:-1:-1;2529:17:7;;;;;::::1;;2538:7:::0;2529:17;::::1;:::i;:::-;;2570:48;2575:15;2592:9;2603:7;2612:5;2570:48;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2635:4:7::1;1830:816:::0;;;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2652:252:7:-;2778:16;1531:13:0;:11;:13::i;:::-;2813:4:7::1;:9;2823:15:::0;2840:9;2851:7;2860:5;2894:1:::1;2867:29;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2867:29:7::1;;;;;;;;;;;;;;;;;2813:84;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2806:91;;1554:1:0;2652:252:7::0;;;;;;:::o;2910:431::-;2977:12;1531:13:0;:11;:13::i;:::-;3047:1:7::1;-1:-1:-1::0;;;;;3004:45:7::1;:6;3011:7;3004:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3004:31:7::1;:45:::0;3001:108:::1;;3090:7;3072:26;;-1:-1:-1::0;;;3072:26:7::1;;;;;;;;:::i;3001:108::-;3146:1;3121:6;3128:7;3121:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;3118:83;;;3182:7;3170:20;;-1:-1:-1::0;;;3170:20:7::1;;;;;;;;:::i;3118:83::-;3210:40;3226:6;3233:7;3226:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;3210:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;3267:6;3274:7;3267:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;3260:22;;-1:-1:-1;;;;;;3260:22:7;;;3267:15:::1;3260:22;::::0;;::::1;3267:15:::0;3260:22:::1;:::i;:::-;-1:-1:-1::0;3260:22:7::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;3260:22:7::1;::::0;;::::1;;::::0;;::::1;::::0;3298:15:::1;::::0;::::1;::::0;::::1;::::0;3305:7;;3298:15:::1;:::i;:::-;;;;;;;;-1:-1:-1::0;3330:4:7::1;1554:1:0;2910:431:7::0;;;:::o;4894:381::-;4975:12;1531:13:0;:11;:13::i;:::-;5033:6:7::1;5007;5014:7;5007:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;4999:75;;;::::0;-1:-1:-1;;;4999:75:7;;24155:2:8;4999:75:7::1;::::0;::::1;24137:21:8::0;24194:2;24174:18;;;24167:30;24233:32;24213:18;;;24206:60;24283:18;;4999:75:7::1;23953:354:8::0;4999:75:7::1;5093:47;5102:7;5111:20;5133:6;5093:8;:47::i;:::-;5085:82;;;::::0;-1:-1:-1;;;5085:82:7;;24514:2:8;5085:82:7::1;::::0;::::1;24496:21:8::0;24553:2;24533:18;;;24526:30;-1:-1:-1;;;24572:18:8;;;24565:52;24634:18;;5085:82:7::1;24312:346:8::0;5085:82:7::1;5204:6;5178;5185:7;5178:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5226:21:7::1;::::0;::::1;::::0;::::1;::::0;5231:7;;5240:6;;5226:21:::1;:::i;6142:121::-:0;6204:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6204:18:7;6241:6;6248:7;6241:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6234:22;;;;;;;;-1:-1:-1;;;;;6234:22:7;;;;6241:15;;6234:22;;;-1:-1:-1;;;6234:22:7;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6234:22:7;;;-1:-1:-1;;6234:22:7;;;;-1:-1:-1;;;;;6234:22:7;;;;;;;;;;;;;;;;6142:121;-1:-1:-1;;6142:121:7:o;3838:624::-;3921:12;1531:13:0;:11;:13::i;:::-;4001:1:7::1;-1:-1:-1::0;;;;;3958:45:7::1;:6;3965:7;3958:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3958:31:7::1;:45:::0;3955:107:::1;;4043:7;4025:26;;-1:-1:-1::0;;;4025:26:7::1;;;;;;;;:::i;3955:107::-;4100:6;4075;4082:7;4075:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;4072:108;;;4153:7;4162:6;4129:40;;-1:-1:-1::0;;;4129:40:7::1;;;;;;;;;:::i;4072:108::-;4190:18;4211:49;4220:7;4229:22;4253:6;4211:8;:49::i;:::-;4190:70;;4274:13;4271:142;;;4329:6;4303;4310:7;4303:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4354:23:7::1;::::0;::::1;::::0;::::1;::::0;4361:7;;4370:6;;4354:23:::1;:::i;:::-;;;;;;;;4398:4;4391:11;;;;;4271:142;4447:7;4430:25;;-1:-1:-1::0;;;4430:25:7::1;;;;;;;;:::i;3347:484::-:0;3428:12;1531:13:0;:11;:13::i;:::-;3498:1:7::1;-1:-1:-1::0;;;;;3455:45:7::1;:6;3462:7;3455:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3455:31:7::1;:45:::0;3452:107:::1;;3540:7;3522:26;;-1:-1:-1::0;;;3522:26:7::1;;;;;;;;:::i;3452:107::-;3569:16;3588:47;3597:7;3606:20;3628:6;3588:8;:47::i;:::-;3569:66;;3649:11;3646:138;;;3702:6;3676;3683:7;3676:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3727:21:7::1;::::0;::::1;::::0;::::1;::::0;3732:7;;3741:6;;3727:21:::1;:::i;3646:138::-;3816:7;3801:23;;-1:-1:-1::0;;;3801:23:7::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3782:51:8::0;3755:18;;2672:31:0::1;3636:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3782:51:8;3755:18;;1901:40:0;3636:203:8;6742:200:7;6850:12;6881:54;6890:7;6899:15;6916:6;6932:1;6948:888;7074:4;7095:18;7114:7;7095:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7123:15;7095:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7095:44:7;:54;;;;;7090:98;;-1:-1:-1;7172:5:7;7165:12;;7090:98;7203:6;7198:598;7219:18;7238:7;7219:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7247:15;7219:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7219:44:7;:63;;:70;7215:74;;7198:598;;;7310:23;7370:18;7389:7;7370:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7398:15;7370:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:63;;7434:1;7370:66;;;;;;;;:::i;:::-;;;;;;;;7353:84;;;;;;;;:::i;:::-;;;;;;;;;;;;;7343:95;;;;;;7310:129;;7454:26;7483:137;7503:16;7521:98;7534:18;7553:7;7534:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7562:15;7534:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:54;;7589:1;7534:57;;;;;;;;:::i;:::-;;;;;;;;7521:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7593:7;7602:8;7612:6;7521:12;:98::i;:::-;7483:19;:137::i;:::-;7454:166;;7636:16;7658:6;7665:7;7658:15;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;7658:31:7;;:51;;7695:13;;7658:51;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7635:74;;;7728:11;7723:63;;7766:5;7759:12;;;;;;;;7723:63;7296:500;;;7291:3;;;;;:::i;:::-;;;;7198:598;;;-1:-1:-1;7821:4:7;;6948:888;-1:-1:-1;;;;;6948:888:7:o;6269:281::-;6399:6;6395:149;6415:12;:19;6411:1;:23;6395:149;;;6518:12;6531:1;6518:15;;;;;;;;:::i;:::-;;;;;;;6455:18;6474:7;6455:27;;;;;;:::i;:::-;;;;;;;;;;;;;:60;6483:12;6496:1;6483:15;;;;;;;;:::i;:::-;;;;;;;:31;;;6455:60;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;6455:60:7;:78;;;;:60;;-1:-1:-1;;6455:78:7;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6455:78:7;;;;;;;;;;;;-1:-1:-1;;6455:78:7;;;;;;;;;;6436:3;;;;:::i;:::-;;;;6395:149;;;;6269:281;;:::o;6556:180::-;6649:12;6680:49;6689:7;6698:15;6715:1;6726;6680:8;:49::i;:::-;6673:56;6556:180;-1:-1:-1;;;6556:180:7:o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5860:276:7:-;5928:9;5923:207;5947:3;:10;5943:14;;5923:207;;;5982:25;5996:3;6000:1;5996:6;;;;;;;;:::i;:::-;;;;;;;;5982:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6004:2;5982:13;:25::i;:::-;5978:142;;;6036:3;6040:10;;:14;;6053:1;;6040:14;:::i;:::-;6036:19;;;;;;;;:::i;:::-;;;;;;;;6027:3;6031:1;6027:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6073:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;5923:207;5860:276;:::o;5978:142::-;5959:3;;;;:::i;:::-;;;;5923:207;;;;5860:276;:::o;8230:1128::-;8361:14;8386:28;8429:9;:16;-1:-1:-1;;;;;8417:29:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8386:60;;8461:6;8456:866;8477:9;:16;8473:1;:20;8456:866;;;8534:14;8518:9;8528:1;8518:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8514:798;;8587:25;;;8606:4;8587:25;;;3782:51:8;3755:18;8587:25:7;;;;;;;;;;;;;8568:13;8582:1;8568:16;;;;;;;;:::i;:::-;;;;;;:44;;;;8514:798;;;8653:15;8637:9;8647:1;8637:12;;;;;;;;:::i;:::-;;;;;;;:31;;;;;;;;:::i;:::-;;8633:679;;8718:7;8707:19;;;;;;;;:::i;8633:679::-;8767:14;8751:9;8761:1;8751:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8747:565;;8820:18;;;;;;27922:25:8;;;27895:18;8820::7;27776:177:8;8747:565:7;8879:13;8863:9;8873:1;8863:12;;;;;;;;:::i;:::-;;;;;;;:29;;;;;;;;:::i;:::-;;8859:453;;8942:6;8949:7;8942:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:21;;;-1:-1:-1;;;;;8942:21:7;8931:33;;;3782:51:8;3755:18;8931:33:7;3636:203:8;8859:453:7;9005:23;8989:9;8999:1;8989:12;;;;;;;;:::i;:::-;;;;;;;:39;;;;;;;;:::i;:::-;;8985:327;;9078:6;9085:7;9078:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;9078:31:7;9067:43;;;3782:51:8;3755:18;9067:43:7;3636:203:8;8985:327:7;9151:16;9135:9;9145:1;9135:12;;;;;;;;:::i;:::-;;;;;;;:32;;;;;;;;:::i;:::-;;9131:181;;9206:20;;;-1:-1:-1;;;;;3800:32:8;;9206:20:7;;;3782:51:8;3755:18;9206:20:7;3636:203:8;9131:181:7;9265:32;;-1:-1:-1;;;9265:32:7;;28160:2:8;9265:32:7;;;28142:21:8;28199:2;28179:18;;;28172:30;-1:-1:-1;;;28218:18:8;;;28211:52;28280:18;;9265:32:7;27958:346:8;9131:181:7;8495:3;;;;:::i;:::-;;;;8456:866;;;-1:-1:-1;9338:13:7;8230:1128;-1:-1:-1;;;;;8230:1128:7:o;7842:382::-;8003:34;;;-1:-1:-1;;;;;;28448:33:8;;8003:34:7;;;28436:46:8;8003:34:7;;;;;;;;;28498:11:8;;;;8003:34:7;;;8052:9;8047:141;8071:13;:20;8067:1;:24;8047:141;;;8145:13;8160;8174:1;8160:16;;;;;;;;:::i;:::-;;;;;;;8128:49;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8112:65;;8093:3;;;;;:::i;:::-;;;;8047:141;;;;7842:382;;;;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;-1:-1:-1;;3070:19:2;;;;;;;3047;;;;;;;;;;:42;;2914:182::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;218:2;212:9;260:3;248:16;;-1:-1:-1;;;;;279:34:8;;315:22;;;276:62;273:88;;;341:18;;:::i;:::-;377:2;370:22;146:252;:::o;403:275::-;474:2;468:9;539:2;520:13;;-1:-1:-1;;516:27:8;504:40;;-1:-1:-1;;;;;559:34:8;;595:22;;;556:62;553:88;;;621:18;;:::i;:::-;657:2;650:22;403:275;;-1:-1:-1;403:275:8:o;683:531::-;726:5;779:3;772:4;764:6;760:17;756:27;746:55;;797:1;794;787:12;746:55;833:6;820:20;-1:-1:-1;;;;;855:2:8;852:26;849:52;;;881:18;;:::i;:::-;925:55;968:2;949:13;;-1:-1:-1;;945:27:8;974:4;941:38;925:55;:::i;:::-;1005:2;996:7;989:19;1051:3;1044:4;1039:2;1031:6;1027:15;1023:26;1020:35;1017:55;;;1068:1;1065;1058:12;1017:55;1133:2;1126:4;1118:6;1114:17;1107:4;1098:7;1094:18;1081:55;1181:1;1156:16;;;1174:4;1152:27;1145:38;;;;1160:7;683:531;-1:-1:-1;;;683:531:8:o;1219:322::-;1288:6;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;-1:-1:-1;;;;;1422:6:8;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485;1527:7;1518:6;1507:9;1503:22;1485:50;:::i;1546:127::-;1607:10;1602:3;1598:20;1595:1;1588:31;1638:4;1635:1;1628:15;1662:4;1659:1;1652:15;1678:140;1759:1;1752:5;1749:12;1739:46;;1765:18;;:::i;:::-;1794;;1678:140::o;1823:250::-;1908:1;1918:113;1932:6;1929:1;1926:13;1918:113;;;2008:11;;;2002:18;1989:11;;;1982:39;1954:2;1947:10;1918:113;;;-1:-1:-1;;2065:1:8;2047:16;;2040:27;1823:250::o;2078:271::-;2120:3;2158:5;2152:12;2185:6;2180:3;2173:19;2201:76;2270:6;2263:4;2258:3;2254:14;2247:4;2240:5;2236:16;2201:76;:::i;:::-;2331:2;2310:15;-1:-1:-1;;2306:29:8;2297:39;;;;2338:4;2293:50;;2078:271;-1:-1:-1;;2078:271:8:o;2354:594::-;-1:-1:-1;;;;;2665:15:8;;;2647:34;;2590:4;;2690:53;2739:2;2724:18;;2716:6;2690:53;:::i;:::-;2779:3;2774:2;2763:9;2759:18;2752:31;2800:46;2841:3;2830:9;2826:19;2818:6;2800:46;:::i;:::-;2882:15;;2877:2;2862:18;;2855:43;-1:-1:-1;2929:3:8;2914:19;2907:35;2792:54;2354:594;-1:-1:-1;;;2354:594:8:o;2953:390::-;3031:6;3039;3092:2;3080:9;3071:7;3067:23;3063:32;3060:52;;;3108:1;3105;3098:12;3060:52;3148:9;3135:23;-1:-1:-1;;;;;3173:6:8;3170:30;3167:50;;;3213:1;3210;3203:12;3167:50;3236;3278:7;3269:6;3258:9;3254:22;3236:50;:::i;:::-;3226:60;3333:2;3318:18;;;;3305:32;;-1:-1:-1;;;;2953:390:8:o;3844:173::-;3912:20;;-1:-1:-1;;;;;3961:31:8;;3951:42;;3941:70;;4007:1;4004;3997:12;4022:464;4109:6;4117;4125;4178:2;4166:9;4157:7;4153:23;4149:32;4146:52;;;4194:1;4191;4184:12;4146:52;4234:9;4221:23;-1:-1:-1;;;;;4259:6:8;4256:30;4253:50;;;4299:1;4296;4289:12;4253:50;4322;4364:7;4355:6;4344:9;4340:22;4322:50;:::i;:::-;4312:60;;;4391:38;4425:2;4414:9;4410:18;4391:38;:::i;:::-;4381:48;;4476:2;4465:9;4461:18;4448:32;4438:42;;4022:464;;;;;:::o;4491:803::-;4653:4;4682:2;4722;4711:9;4707:18;4752:2;4741:9;4734:21;4775:6;4810;4804:13;4841:6;4833;4826:22;4879:2;4868:9;4864:18;4857:25;;4941:2;4931:6;4928:1;4924:14;4913:9;4909:30;4905:39;4891:53;;4979:2;4971:6;4967:15;5000:1;5010:255;5024:6;5021:1;5018:13;5010:255;;;5117:2;5113:7;5101:9;5093:6;5089:22;5085:36;5080:3;5073:49;5145:40;5178:6;5169;5163:13;5145:40;:::i;:::-;5135:50;-1:-1:-1;5243:12:8;;;;5208:15;;;;5046:1;5039:9;5010:255;;;-1:-1:-1;5282:6:8;;4491:803;-1:-1:-1;;;;;;;4491:803:8:o;5299:150::-;5374:20;;5423:1;5413:12;;5403:40;;5439:1;5436;5429:12;5454:203;5534:4;-1:-1:-1;;;;;5559:6:8;5556:30;5553:56;;;5589:18;;:::i;:::-;-1:-1:-1;5634:1:8;5630:14;5646:4;5626:25;;5454:203::o;5662:156::-;5743:20;;5792:1;5782:12;;5772:40;;5808:1;5805;5798:12;5823:1931;5892:5;5945:3;5938:4;5930:6;5926:17;5922:27;5912:55;;5963:1;5960;5953:12;5912:55;5999:6;5986:20;6025:4;6049:80;6065:63;6125:2;6065:63;:::i;:::-;6049:80;:::i;:::-;6163:15;;;6225:1;6265:11;;;6253:24;;6249:33;;;6194:12;;;;6151:3;6294:15;;;6291:35;;;6322:1;6319;6312:12;6291:35;6358:2;6350:6;6346:15;6370:1355;6386:6;6381:3;6378:15;6370:1355;;;6472:3;6459:17;-1:-1:-1;;;;;6495:11:8;6492:35;6489:125;;;6568:1;6597:2;6593;6586:14;6489:125;6637:24;;6696:2;6688:11;;6684:21;-1:-1:-1;6674:119:8;;6747:1;6776:2;6772;6765:14;6674:119;6837:2;6833;6829:11;6816:25;6864:2;6892:80;6908:63;6968:2;6908:63;:::i;6892:80::-;7016:17;;;7110:11;;;7102:20;;7098:29;;;7055:14;;;;7143:17;;;7140:107;;;7201:1;7230:2;7226;7219:14;7140:107;7273:11;;;;7297:355;7315:8;7308:5;7305:19;7297:355;;;7409:5;7396:19;7383:32;;7452:1;7445:5;7442:12;7432:129;;7505:1;7539:3;7534;7527:16;7432:129;7578:20;;;7336:14;;;;7624;;;;7297:355;;;7665:18;;-1:-1:-1;;;7703:12:8;;;;-1:-1:-1;6403:12:8;;6370:1355;;;-1:-1:-1;7743:5:8;;5823:1931;-1:-1:-1;;;;;;;5823:1931:8:o;7759:118::-;7845:5;7838:13;7831:21;7824:5;7821:32;7811:60;;7867:1;7864;7857:12;7882:128;7947:20;;7976:28;7947:20;7976:28;:::i;8015:3590::-;8197:6;8205;8213;8221;8229;8282:3;8270:9;8261:7;8257:23;8253:33;8250:53;;;8299:1;8296;8289:12;8250:53;8322:29;8341:9;8322:29;:::i;:::-;8312:39;;8370:45;8411:2;8400:9;8396:18;8370:45;:::i;:::-;8360:55;;-1:-1:-1;;;;;8458:2:8;8447:9;8443:18;8430:32;8427:56;8424:76;;;8496:1;8493;8486:12;8424:76;8519;8587:7;8580:2;8569:9;8565:18;8552:32;8541:9;8537:48;8519:76;:::i;:::-;8509:86;;8614:38;8648:2;8637:9;8633:18;8614:38;:::i;:::-;8604:48;;-1:-1:-1;;;;;8695:3:8;8684:9;8680:19;8667:33;8664:57;8661:77;;;8734:1;8731;8724:12;8661:77;8823:7;8816:4;8808:3;8797:9;8793:19;8780:33;8769:9;8765:49;8761:60;8757:74;8747:102;;8845:1;8842;8835:12;8747:102;8869:141;8885:124;9001:3;8990:9;8986:19;8973:33;8962:9;8958:49;8945:63;8885:124;:::i;8869:141::-;9112:3;9097:19;;9084:33;9069:49;;9056:63;;9044:76;;;9145:2;9136:12;;;;9032:3;9226:1;9222:71;;;;9167:127;;;9163:136;9160:149;-1:-1:-1;9157:169:8;;;9322:1;9319;9312:12;9157:169;9401:2;9393:3;9382:9;9378:19;9365:33;9354:9;9350:49;9346:58;9413:2162;9559:3;9544:19;;9531:33;9516:49;;9503:63;;9500:1;9496:71;9441:127;9570:2;9437:136;9429:145;;9413:2162;;;-1:-1:-1;;;;;9648:3:8;9635:17;9632:41;9629:61;;;9686:1;9683;9676:12;9629:61;9781:3;9768:17;9760:3;9749:9;9745:19;9732:33;9721:9;9717:49;9713:73;9838:3;9832:2;9828:7;9823:2;9814:7;9810:16;9806:30;9802:40;9799:60;;;9855:1;9852;9845:12;9799:60;9885:22;;:::i;:::-;9934:44;9974:2;9970;9966:11;9934:44;:::i;:::-;9927:5;9920:59;-1:-1:-1;;;;;10019:2:8;10015;10011:11;9998:25;9995:49;9992:69;;;10057:1;10054;10047:12;9992:69;10133:7;10128:2;10121;10117;10113:11;10100:25;10096:2;10092:34;10088:43;10084:57;10074:85;;10155:1;10152;10145:12;10074:85;10185:135;10201:118;10314:2;10307;10303;10299:11;10286:25;10282:2;10278:34;10274:43;10261:57;10201:118;:::i;10185:135::-;10431:2;10424;10416:11;;;10403:25;10395:34;;10391:43;;;10378:57;10364:72;;;10458:14;;;;10364:72;10539:1;10535:65;10495:106;10491:115;-1:-1:-1;;10485:148:8;;;10629:1;10626;10619:12;10485:148;10699:2;10692;10688;10684:11;10671:25;10667:2;10663:34;10659:43;10715:463;10857:2;10834:11;;;10821:25;10813:34;;10849:2;10809:43;;10796:57;10793:1;10789:65;10749:106;10745:115;10735:126;;10715:463;;;-1:-1:-1;;;;;10951:5:8;10938:19;10935:43;10932:63;;;10991:1;10988;10981:12;10932:63;11026:97;11115:7;11110:2;11101:5;11088:19;11081:2;11077;11073:11;11060:25;11056:2;11052:34;11048:60;11044:69;11026:97;:::i;:::-;11012:112;;11161:2;11150:14;;;;10885;10715:463;;;-1:-1:-1;11209:2:8;11198:14;;11191:29;-1:-1:-1;;;;;;11260:2:8;11252:11;;11239:25;11236:49;11233:69;;;11298:1;11295;11288:12;11233:69;11338:97;11427:7;11422:2;11415;11411;11407:11;11394:25;11390:2;11386:34;11382:43;11338:97;:::i;:::-;11333:2;11326:5;11322:14;11315:121;11472:29;11496:3;11492:2;11488:12;11472:29;:::i;:::-;11467:2;11456:14;;11449:53;11515:18;;-1:-1:-1;11562:2:8;11553:12;;;;9592;9413:2162;;;9417:3;11594:5;11584:15;;;;8015:3590;;;;;;;;:::o;11610:566::-;11720:6;11728;11736;11744;11797:3;11785:9;11776:7;11772:23;11768:33;11765:53;;;11814:1;11811;11804:12;11765:53;11837:29;11856:9;11837:29;:::i;:::-;11827:39;;11885:45;11926:2;11915:9;11911:18;11885:45;:::i;:::-;11875:55;;11981:2;11970:9;11966:18;11953:32;-1:-1:-1;;;;;12000:6:8;11997:30;11994:50;;;12040:1;12037;12030:12;11994:50;12063;12105:7;12096:6;12085:9;12081:22;12063:50;:::i;:::-;12053:60;;;12132:38;12166:2;12155:9;12151:18;12132:38;:::i;:::-;12122:48;;11610:566;;;;;;;:::o;12181:725::-;12356:2;12345:9;12338:21;12319:4;12395:1;12391;12386:3;12382:11;12378:19;12452:2;12443:6;12437:13;12433:22;12428:2;12417:9;12413:18;12406:50;12503:2;12495:6;12491:15;12485:22;12516:59;12571:2;12560:9;12556:18;12542:12;12516:59;:::i;:::-;;12624:2;12616:6;12612:15;12606:22;12664:4;12659:2;12648:9;12644:18;12637:32;12692:54;12741:3;12730:9;12726:19;12710:14;12692:54;:::i;:::-;12678:68;;12811:2;12805;12797:6;12793:15;12787:22;12783:31;12777:3;12766:9;12762:19;12755:60;12871:3;12863:6;12859:16;12853:23;12846:4;12835:9;12831:20;12824:53;12894:6;12886:14;;;;12181:725;;;;:::o;12911:429::-;13009:6;13017;13070:2;13058:9;13049:7;13045:23;13041:32;13038:52;;;13086:1;13083;13076:12;13038:52;13126:9;13113:23;-1:-1:-1;;;;;13151:6:8;13148:30;13145:50;;;13191:1;13188;13181:12;13145:50;13214;13256:7;13247:6;13236:9;13232:22;13214:50;:::i;:::-;13204:60;;;13283:51;13330:2;13319:9;13315:18;13283:51;:::i;:::-;13273:61;;12911:429;;;;;:::o;13345:146::-;13432:1;13425:5;13422:12;13412:46;;13438:18;;:::i;13496:301::-;13670:2;13655:18;;13682:50;13659:9;13714:6;13682:50;:::i;:::-;13782:6;13775:14;13768:22;13763:2;13752:9;13748:18;13741:50;13496:301;;;;;:::o;13802:186::-;13861:6;13914:2;13902:9;13893:7;13889:23;13885:32;13882:52;;;13930:1;13927;13920:12;13882:52;13953:29;13972:9;13953:29;:::i;13993:380::-;14072:1;14068:12;;;;14115;;;14136:61;;14190:4;14182:6;14178:17;14168:27;;14136:61;14243:2;14235:6;14232:14;14212:18;14209:38;14206:161;;14289:10;14284:3;14280:20;14277:1;14270:31;14324:4;14321:1;14314:15;14352:4;14349:1;14342:15;14206:161;;13993:380;;;:::o;14378:289::-;14509:3;14547:6;14541:13;14563:66;14622:6;14617:3;14610:4;14602:6;14598:17;14563:66;:::i;:::-;14645:16;;;;;14378:289;-1:-1:-1;;14378:289:8:o;14672:220::-;14821:2;14810:9;14803:21;14784:4;14841:45;14882:2;14871:9;14867:18;14859:6;14841:45;:::i;15248:291::-;15425:2;15414:9;15407:21;15388:4;15445:45;15486:2;15475:9;15471:18;15463:6;15445:45;:::i;:::-;15437:53;;15526:6;15521:2;15510:9;15506:18;15499:34;15248:291;;;;;:::o;16258:127::-;16319:10;16314:3;16310:20;16307:1;16300:31;16350:4;16347:1;16340:15;16374:4;16371:1;16364:15;16390:128;16457:9;;;16478:11;;;16475:37;;;16492:18;;:::i;16523:388::-;16728:2;16717:9;16710:21;16691:4;16748:45;16789:2;16778:9;16774:18;16766:6;16748:45;:::i;:::-;-1:-1:-1;;;;;16829:32:8;;;;16824:2;16809:18;;16802:60;-1:-1:-1;16893:2:8;16878:18;16871:34;16740:53;16523:388;-1:-1:-1;16523:388:8:o;17471:545::-;17573:2;17568:3;17565:11;17562:448;;;17609:1;17634:5;17630:2;17623:17;17679:4;17675:2;17665:19;17749:2;17737:10;17733:19;17730:1;17726:27;17720:4;17716:38;17785:4;17773:10;17770:20;17767:47;;;-1:-1:-1;17808:4:8;17767:47;17863:2;17858:3;17854:12;17851:1;17847:20;17841:4;17837:31;17827:41;;17918:82;17936:2;17929:5;17926:13;17918:82;;;17981:17;;;17962:1;17951:13;17918:82;;;17922:3;;;17471:545;;;:::o;18192:1352::-;18318:3;18312:10;-1:-1:-1;;;;;18337:6:8;18334:30;18331:56;;;18367:18;;:::i;:::-;18396:97;18486:6;18446:38;18478:4;18472:11;18446:38;:::i;:::-;18440:4;18396:97;:::i;:::-;18548:4;;18612:2;18601:14;;18629:1;18624:663;;;;19331:1;19348:6;19345:89;;;-1:-1:-1;19400:19:8;;;19394:26;19345:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;19447:81;;18594:944;;18624:663;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;18660:20:8;;;18778:236;18792:7;18789:1;18786:14;18778:236;;;18881:19;;;18875:26;18860:42;;18973:27;;;;18941:1;18929:14;;;;18808:19;;18778:236;;;18782:3;19042:6;19033:7;19030:19;19027:201;;;19103:19;;;19097:26;-1:-1:-1;;19186:1:8;19182:14;;;19198:3;19178:24;19174:37;19170:42;19155:58;19140:74;;19027:201;-1:-1:-1;;;;;19274:1:8;19258:14;;;19254:22;19241:36;;-1:-1:-1;18192:1352:8:o;19549:522::-;-1:-1:-1;;;;;19832:15:8;;;19814:34;;19757:4;;19857:53;19906:2;19891:18;;19883:6;19857:53;:::i;:::-;19946:3;19941:2;19930:9;19926:18;19919:31;19967:46;20008:3;19997:9;19993:19;19985:6;19967:46;:::i;:::-;19959:54;;20061:2;20053:6;20049:15;20044:2;20033:9;20029:18;20022:43;;19549:522;;;;;;;:::o;20076:1127::-;20144:3;20182:5;20176:12;20209:6;20204:3;20197:19;20235:4;20264:2;20259:3;20255:12;20248:19;;20289:3;20329:6;20326:1;20322:14;20317:3;20313:24;20371:2;20364:5;20360:14;20392:1;20413;20423:754;20439:6;20434:3;20431:15;20423:754;;;20504:16;;;20492:29;;20544:13;;20616:9;;20638:22;;;20724:11;;;;20682:13;;;;20759:1;20773:298;20789:8;20784:3;20781:17;20773:298;;;20868:8;20862:15;20911:1;20907:2;20904:9;20894:43;;20917:18;;:::i;:::-;20954:17;;21040;;;;20997:14;;;;20817:1;20808:11;20773:298;;;-1:-1:-1;;21155:12:8;;;;21092:5;-1:-1:-1;;21120:15:8;;;;20465:1;20456:11;20423:754;;;-1:-1:-1;21193:4:8;;20076:1127;-1:-1:-1;;;;;;;;20076:1127:8:o;21208:2490::-;-1:-1:-1;;;;;21667:15:8;;;21649:34;;21570:4;;21599:3;;21702:2;21713:53;21747:18;;;21739:6;21713:53;:::i;:::-;21785:2;21823;21818;21807:9;21803:18;21796:30;21849:45;21890:2;21879:9;21875:18;21867:6;21849:45;:::i;:::-;21913:2;21963;21955:6;21951:15;21946:2;21935:9;21931:18;21924:43;21986:3;21976:13;;22037:9;22029:6;22025:22;22020:2;22009:9;22005:18;21998:50;22068:6;22103;22097:13;22134:6;22126;22119:22;22169:2;22161:6;22157:15;22150:22;;22228:2;22218:6;22215:1;22211:14;22203:6;22199:27;22195:36;22266:2;22258:6;22254:15;22287:1;22297:1372;22311:6;22308:1;22305:13;22297:1372;;;22401:2;22397:7;22388:6;22380;22376:19;22372:33;22367:3;22360:46;22435:6;22429:13;22481:2;22473:6;22469:15;22497:50;22540:6;22535:2;22529:9;22497:50;:::i;:::-;22586:11;;;22580:18;22618:15;;;22611:27;;;22699:19;;22731:24;;;;22839:1;22835:16;;;22823:29;;22819:38;;;22886:21;;;;22777:15;;;;22931:1;22945:297;22961:8;22956:3;22953:17;22945:297;;;23067:3;23063:8;23054:6;23046;23042:19;23038:34;23031:5;23024:49;23100:42;23135:6;23124:8;23118:15;23100:42;:::i;:::-;23090:52;-1:-1:-1;23171:17:8;;;;23214:14;;;;22989:1;22980:11;22945:297;;;22949:3;;;;23291:2;23287;23283:11;23277:18;23344:6;23336;23332:19;23327:2;23319:6;23315:15;23308:44;23379:67;23439:6;23423:14;23379:67;:::i;:::-;23487:11;;;23481:18;3418:13;;3411:21;23544:15;;;3399:34;23481:18;23365:81;-1:-1:-1;23512:48:8;;-1:-1:-1;3348:91:8;23512:48;23647:12;;;;23583:6;-1:-1:-1;;23612:15:8;;;;22333:1;22326:9;22297:1372;;;22301:3;;23686:6;23678:14;;;;;;;;;;;21208:2490;;;;;;;;:::o;23703:245::-;23770:6;23823:2;23811:9;23802:7;23798:23;23794:32;23791:52;;;23839:1;23836;23829:12;23791:52;23871:9;23865:16;23890:28;23912:5;23890:28;:::i;24663:125::-;24728:9;;;24749:10;;;24746:36;;;24762:18;;:::i;24793:127::-;24854:10;24849:3;24845:20;24842:1;24835:31;24885:4;24882:1;24875:15;24909:4;24906:1;24899:15;24925:842;25053:3;25082:1;25115:6;25109:13;25145:36;25171:9;25145:36;:::i;:::-;25200:1;25217:18;;;25244:133;;;;25391:1;25386:356;;;;25210:532;;25244:133;-1:-1:-1;;25277:24:8;;25265:37;;25350:14;;25343:22;25331:35;;25322:45;;;-1:-1:-1;25244:133:8;;25386:356;25417:6;25414:1;25407:17;25447:4;25492:2;25489:1;25479:16;25517:1;25531:165;25545:6;25542:1;25539:13;25531:165;;;25623:14;;25610:11;;;25603:35;25666:16;;;;25560:10;;25531:165;;;25535:3;;;25725:6;25720:3;25716:16;25709:23;;25210:532;-1:-1:-1;25758:3:8;;24925:842;-1:-1:-1;;;;;;24925:842:8:o;26064:135::-;26103:3;26124:17;;;26121:43;;26144:18;;:::i;:::-;-1:-1:-1;26191:1:8;26180:13;;26064:135::o;26204:1435::-;26323:3;26317:4;26314:13;26311:26;;26330:5;;26204:1435::o;26311:26::-;26360:37;26392:3;26386:10;26360:37;:::i;:::-;-1:-1:-1;;;;;26412:6:8;26409:30;26406:56;;;26442:18;;:::i;:::-;26471:97;26561:6;26521:38;26553:4;26547:11;26521:38;:::i;26471:97::-;26594:1;26622:2;26614:6;26611:14;26639:1;26634:748;;;;27426:1;27443:6;27440:89;;;-1:-1:-1;27495:19:8;;;27489:26;27440:89;-1:-1:-1;;18149:1:8;18145:11;;;18141:24;18137:29;18127:40;18173:1;18169:11;;;18124:57;27542:81;;26604:1029;;26634:748;17418:1;17411:14;;;17455:4;17442:18;;-1:-1:-1;;26670:20:8;;;17418:1;17411:14;;;17455:4;17442:18;;26834:9;26856:251;26870:7;26867:1;26864:14;26856:251;;;26952:21;;;26946:28;26931:44;;27002:1;27075:18;;;;27030:15;;;;26893:4;26886:12;26856:251;;;26860:3;27135:6;27126:7;27123:19;27120:203;;;27196:21;;;27190:28;-1:-1:-1;;27281:1:8;27277:14;;;27293:3;27273:24;27269:37;27265:42;27250:58;27235:74;;27120:203;;;;27369:1;27360:6;27357:1;27353:14;27349:22;27343:4;27336:36;26604:1029;;;;26204:1435;;:::o;27644:127::-;27705:10;27700:3;27696:20;27693:1;27686:31;27736:4;27733:1;27726:15;27760:4;27757:1;27750:15;28520:492;28695:3;28733:6;28727:13;28749:66;28808:6;28803:3;28796:4;28788:6;28784:17;28749:66;:::i;:::-;28878:13;;28837:16;;;;28900:70;28878:13;28837:16;28947:4;28935:17;;28900:70;:::i;:::-;28986:20;;28520:492;-1:-1:-1;;;;28520:492:8:o","linkReferences":{}},"methodIdentifiers":{"assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","tokensInteractions(string,uint8)":"ea8f547f","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,uint8,string,address)":"72d4c33b","wrap(address,uint8,string,address,(uint8,string[],uint8[][],bool)[])":"623662ad"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"enum InteractionType\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"tokensInteractions\",\"outputs\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"functionsSignature\",\"type\":\"string[]\"},{\"internalType\":\"enum VarType[][]\",\"name\":\"variables\",\"type\":\"uint8[][]\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"internalType\":\"struct InteractionSignature[]\",\"name\":\"interactions\",\"type\":\"tuple[]\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper.sol\":{\"keccak256\":\"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b\",\"dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":false}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"enum TokenType","name":"tokenType","type":"uint8","indexed":false},{"internalType":"string","name":"tokenId","type":"string","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"enum InteractionType","name":"","type":"uint8"}],"stateMutability":"view","type":"function","name":"tokensInteractions","outputs":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"bool","name":"available","type":"bool"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"struct InteractionSignature[]","name":"interactions","type":"tuple[]","components":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"string[]","name":"functionsSignature","type":"string[]"},{"internalType":"enum VarType[][]","name":"variables","type":"uint8[][]"},{"internalType":"bool","name":"available","type":"bool"}]}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper.sol":{"keccak256":"0x12abe1795a374dd19978a26ced996c18da7f074fcb2b3c4c7dd5c1e98bae7e29","urls":["bzz-raw://b2e52c284c9d4a1feb3a7c7291833543278968460082b9d95e8284495056184b","dweb:/ipfs/QmefEsHa57kWSv6XFwmvJpM9FyfFiedHJ1GjQZHpZSEdAC"],"license":"GPL-3.0"}},"version":1},"id":7} \ No newline at end of file +{"abi":[{"type":"constructor","inputs":[{"name":"_bridge_address","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"assign","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"receiver_account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"bridge_address","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"burn","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAssetsIDs","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"token","type":"tuple","internalType":"struct Token","components":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"view"},{"type":"function","name":"lock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"mint","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"renounceOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"tokens","inputs":[{"name":"","type":"string","internalType":"string"}],"outputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"tokensInteractions","inputs":[{"name":"","type":"string","internalType":"string"},{"name":"","type":"uint8","internalType":"enum InteractionType"}],"outputs":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"available","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"unlock","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"unwrap","inputs":[{"name":"tokenId","type":"string","internalType":"string"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"},{"name":"interactions","type":"tuple[]","internalType":"struct InteractionSignature[]","components":[{"name":"interactionType","type":"uint8","internalType":"enum InteractionType"},{"name":"functionsSignature","type":"string[]","internalType":"string[]"},{"name":"variables","type":"uint8[][]","internalType":"enum VarType[][]"},{"name":"available","type":"bool","internalType":"bool"}]}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"wrap","inputs":[{"name":"contractAddress","type":"address","internalType":"address"},{"name":"tokenType","type":"uint8","internalType":"enum TokenType"},{"name":"tokenId","type":"string","internalType":"string"},{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"wrapSuccess","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Assign","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"},{"name":"receiver_account","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Changed","inputs":[{"name":"id","type":"string","indexed":true,"internalType":"string"},{"name":"value","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"Lock","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Unlock","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Unwrap","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"}],"anonymous":false},{"type":"event","name":"Wrap","inputs":[{"name":"tokenId","type":"string","indexed":true,"internalType":"string"},{"name":"contractAddress","type":"address","indexed":false,"internalType":"address"},{"name":"tokenType","type":"uint8","indexed":false,"internalType":"enum TokenType"},{"name":"owner","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"InsuficientAmountLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAlreadyWrapped","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotAvailable","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotLocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]},{"type":"error","name":"TokenNotUnlocked","inputs":[{"name":"tokenId","type":"string","internalType":"string"}]}],"bytecode":{"object":"0x60806040523480156200001157600080fd5b5060405162002caf38038062002caf8339810160408190526200003491620000e6565b806001600160a01b0381166200006457604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006f8162000096565b50600480546001600160a01b0319166001600160a01b039290921691909117905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000f957600080fd5b81516001600160a01b03811681146200011157600080fd5b9392505050565b612b8780620001286000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e8b565b6102bf565b604051610129959493929190611f39565b60405180910390f35b610145610140366004611f7d565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611fd8565b6104ce565b61019b610639565b604051610129919061202e565b6101456101b63660046121e0565b610712565b6101c36109c7565b005b6101456101d336600461244a565b6109db565b6000546001600160a01b0316610168565b6101456101f7366004611e8b565b610abc565b61014561020a366004611f7d565b610caf565b61022261021d366004611e8b565b610df6565b60405161012991906124b8565b61014561023d366004611f7d565b610f49565b610145610250366004611f7d565b6110a7565b61029e61026336600461251d565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b60405161012992919061257a565b6101c36102ba366004612597565b6111b1565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff16929190610306906125b2565b80601f0160208091040260200160405190810160405280929190818152602001828054610332906125b2565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a96111ef565b60006001600160a01b03166001846040516103c491906125ec565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612608565b60405180910390fd5b6104128360008461121c565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b8160018460405161046891906125ec565b908152604051908190036020018120600301919091556104899084906125ec565b604051908190038120838252907f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6906020015b60405180910390a25060015b92915050565b60006104d86111ef565b816001856040516104e991906125ec565b90815260200160405180910390206003015410156105495760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b6105568460028486611227565b6105a25760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105b391906125ec565b908152602001604051809103902060030160008282546105d39190612631565b90915550506040516105e69085906125ec565b604080519182900382206001600160a01b038616835260208301859052917f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c910160405180910390a25060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b8282101561070957838290600052602060002001805461067c906125b2565b80601f01602080910402602001604051908101604052809291908181526020018280546106a8906125b2565b80156106f55780601f106106ca576101008083540402835291602001916106f5565b820191906000526020600020905b8154815290600101906020018083116106d857829003601f168201915b50505050508152602001906001019061065d565b50505050905090565b600061071c6111ef565b60006001600160a01b031660018560405161073791906125ec565b908152604051908190036020019020546001600160a01b03161461077057836040516319eac8d160e21b81526004016103fd9190612608565b61077a8483611540565b60028460405161078a91906125ec565b9081526040805160209281900383019020600360008181529190935220015460ff161561082e576107bc846003611660565b61082e5760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561085a5761085a611ebf565b8152602001858152602001846001600160a01b03168152602001600081525060018560405161088991906125ec565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108e3576108e3611ebf565b0217905550604082015160018201906108fc9082612692565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b016109698582612692565b508360405161097891906125ec565b60405180910390207fdb9aba559597d42589517445706b719df3e068de14750a8d3a384c12fa6b82e68787866040516109b393929190612751565b60405180910390a250600195945050505050565b6109cf6111ef565b6109d96000611676565b565b60006109e56111ef565b3063623662ad868686866000604051908082528060200260200182016040528015610a4d57816020015b610a3a6040805160808101909152806000815260606020820181905260408201819052600091015290565b815260200190600190039081610a0f5790505b506040518663ffffffff1660e01b8152600401610a6e95949392919061280d565b6020604051808303816000875af1158015610a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab1919061293b565b90505b949350505050565b6000610ac66111ef565b60006001600160a01b0316600183604051610ae191906125ec565b908152604051908190036020019020546001600160a01b031603610b1a578160405163c0bab25f60e01b81526004016103fd9190612608565b6000600183604051610b2c91906125ec565b9081526020016040518091039020600301541115610b5f5781604051635be9608560e11b81526004016103fd9190612608565b610c11600183604051610b7291906125ec565b90815260200160405180910390206001018054610b8e906125b2565b80601f0160208091040260200160405190810160405280929190818152602001828054610bba906125b2565b8015610c075780601f10610bdc57610100808354040283529160200191610c07565b820191906000526020600020905b815481529060010190602001808311610bea57829003601f168201915b50505050506116c6565b600182604051610c2191906125ec565b90815260405190819003602001902080546001600160a81b03191681556000610c4d6001830182611ba1565b506002810180546001600160a01b03191690556000600390910155604051610c769083906125ec565b604051908190038120907f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490600090a25060015b919050565b6000610cb96111ef565b81600184604051610cca91906125ec565b9081526020016040518091039020600301541015610d2a5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610d368360018461121c565b610d7b5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d8c91906125ec565b90815260200160405180910390206003016000828254610dac9190612631565b9091555050604051610dbf9084906125ec565b604051908190038120838252907fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906020016104bc565b610e286040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610e3891906125ec565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e7e57610e7e611ebf565b6003811115610e8f57610e8f611ebf565b8152602001600182018054610ea3906125b2565b80601f0160208091040260200160405190810160405280929190818152602001828054610ecf906125b2565b8015610f1c5780601f10610ef157610100808354040283529160200191610f1c565b820191906000526020600020905b815481529060010190602001808311610eff57829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610f536111ef565b60006001600160a01b0316600184604051610f6e91906125ec565b908152604051908190036020019020546001600160a01b031603610fa7578260405163c0bab25f60e01b81526004016103fd9190612608565b81600184604051610fb891906125ec565b9081526020016040518091039020600301541015610fed57828260405163076abcf360e51b81526004016103fd929190612958565b6000610ffb8460058561121c565b9050801561108c578260018560405161101491906125ec565b908152602001604051809103902060030160008282546110349190612631565b90915550506040516110479085906125ec565b604051908190038120848252907f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906020015b60405180910390a260019150506104c8565b836040516358300fe760e01b81526004016103fd9190612608565b60006110b16111ef565b60006001600160a01b03166001846040516110cc91906125ec565b908152604051908190036020019020546001600160a01b031603611105578260405163c0bab25f60e01b81526004016103fd9190612608565b60006111138460048561121c565b90508015611196578260018560405161112c91906125ec565b9081526020016040518091039020600301600082825461114c919061297a565b909155505060405161115f9085906125ec565b604051908190038120848252907fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979060200161107a565b8360405163412204b560e11b81526004016103fd9190612608565b6111b96111ef565b6001600160a01b0381166111e357604051631e4fbdf760e01b8152600060048201526024016103fd565b6111ec81611676565b50565b6000546001600160a01b031633146109d95760405163118cdaa760e01b81523360048201526024016103fd565b6000610ab484848460005b600060028560405161123991906125ec565b9081526020016040518091039020600085600581111561125b5761125b611ebf565b600581111561126c5761126c611ebf565b815260208101919091526040016000206003015460ff1661128f57506000610ab4565b60005b6002866040516112a291906125ec565b908152602001604051809103902060008660058111156112c4576112c4611ebf565b60058111156112d5576112d5611ebf565b815260208101919091526040016000206001015481101561153457600060028760405161130291906125ec565b9081526020016040518091039020600087600581111561132457611324611ebf565b600581111561133557611335611ebf565b815260200190815260200160002060010182815481106113575761135761298d565b9060005260206000200160405160200161137191906129a3565b604051602081830303815290604052805190602001209050600061148d8261148860028b6040516113a291906125ec565b908152602001604051809103902060008b60058111156113c4576113c4611ebf565b60058111156113d5576113d5611ebf565b815260200190815260200160002060020186815481106113f7576113f761298d565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561147b57602002820191906000526020600020906000905b82829054906101000a900460ff16600681111561145957611459611ebf565b81526020600192830181810494850194909303909202910180841161143a5790505b50505050508b898b611824565b611af3565b905060006001896040516114a191906125ec565b908152604051908190036020018120546001600160a01b0316906114c69084906125ec565b6000604051808303816000865af19150503d8060008114611503576040519150601f19603f3d011682016040523d82523d6000602084013e611508565b606091505b505090508061151e576000945050505050610ab4565b505050808061152c90612a19565b915050611292565b50600195945050505050565b60005b815181101561165b5781818151811061155e5761155e61298d565b602002602001015160028460405161157691906125ec565b908152602001604051809103902060008484815181106115985761159861298d565b60200260200101516000015160058111156115b5576115b5611ebf565b60058111156115c6576115c6611ebf565b8152602081019190915260400160002081518154829060ff191660018360058111156115f4576115f4611ebf565b021790555060208281015180516116119260018501920190611bdb565b506040820151805161162d916002840191602090910190611c31565b50606091909101516003909101805460ff19169115159190911790558061165381612a19565b915050611543565b505050565b600061166f8383600080611227565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b60035481101561182057611782600382815481106116e9576116e961298d565b9060005260206000200180546116fe906125b2565b80601f016020809104026020016040519081016040528092919081815260200182805461172a906125b2565b80156117775780601f1061174c57610100808354040283529160200191611777565b820191906000526020600020905b81548152906001019060200180831161175a57829003601f168201915b505050505083611b7c565b1561180e576003805461179790600190612631565b815481106117a7576117a761298d565b90600052602060002001600382815481106117c4576117c461298d565b9060005260206000200190816117da9190612a32565b5060038054806117ec576117ec612b0c565b6001900381819060005260206000200160006118089190611ba1565b90555050565b8061181881612a19565b9150506116c9565b5050565b6060600085516001600160401b0381111561184157611841611dae565b60405190808252806020026020018201604052801561187457816020015b606081526020019060019003908161185f5790505b50905060005b8651811015611ae95760058782815181106118975761189761298d565b602002602001015160068111156118b0576118b0611ebf565b036118f25760408051306020820152015b6040516020818303038152906040528282815181106118e2576118e261298d565b6020026020010181905250611ad7565b60028782815181106119065761190661298d565b6020026020010151600681111561191f5761191f611ebf565b0361193557856040516020016118c19190612608565b60048782815181106119495761194961298d565b6020026020010151600681111561196257611962611ebf565b03611978576040805160208101869052016118c1565b600387828151811061198c5761198c61298d565b602002602001015160068111156119a5576119a5611ebf565b036119e3576001866040516119ba91906125ec565b908152604080519182900360209081018320600201546001600160a01b031690830152016118c1565b60008782815181106119f7576119f761298d565b60200260200101516006811115611a1057611a10611ebf565b03611a4b57600186604051611a2591906125ec565b908152604080519182900360209081018320546001600160a01b031690830152016118c1565b6006878281518110611a5f57611a5f61298d565b60200260200101516006811115611a7857611a78611ebf565b03611a9657604080516001600160a01b0387166020820152016118c1565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611ae181612a19565b91505061187a565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611b755781838281518110611b3857611b3861298d565b6020026020010151604051602001611b51929190612b22565b60405160208183030381529060405291508080611b6d90612a19565b915050611b1c565b5092915050565b60008151835114801561166f5750508051602091820120825192909101919091201490565b508054611bad906125b2565b6000825580601f10611bbd575050565b601f0160209004906000526020600020908101906111ec9190611c8a565b828054828255906000526020600020908101928215611c21579160200282015b82811115611c215782518290611c119082612692565b5091602001919060010190611bfb565b50611c2d929150611c9f565b5090565b828054828255906000526020600020908101928215611c7e579160200282015b82811115611c7e5782518051611c6e918491602090910190611cbc565b5091602001919060010190611c51565b50611c2d929150611d6c565b5b80821115611c2d5760008155600101611c8b565b80821115611c2d576000611cb38282611ba1565b50600101611c9f565b82805482825590600052602060002090601f01602090048101928215611d605791602002820160005b83821115611d3157835183826101000a81548160ff02191690836006811115611d1057611d10611ebf565b02179055509260200192600101602081600001049283019260010302611ce5565b8015611d5e5782816101000a81549060ff0219169055600101602081600001049283019260010302611d31565b505b50611c2d929150611c8a565b80821115611c2d576000611d808282611d89565b50600101611d6c565b50805460008255601f0160209004906000526020600020908101906111ec9190611c8a565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611de657611de6611dae565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611e1457611e14611dae565b604052919050565b600082601f830112611e2d57600080fd5b81356001600160401b03811115611e4657611e46611dae565b611e59601f8201601f1916602001611dec565b818152846020838601011115611e6e57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e9d57600080fd5b81356001600160401b03811115611eb357600080fd5b610ab484828501611e1c565b634e487b7160e01b600052602160045260246000fd5b60048110611ee557611ee5611ebf565b9052565b60005b83811015611f04578181015183820152602001611eec565b50506000910152565b60008151808452611f25816020860160208601611ee9565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611f566020840188611ed5565b60a06040840152611f6a60a0840187611f0d565b9416606083015250608001529392505050565b60008060408385031215611f9057600080fd5b82356001600160401b03811115611fa657600080fd5b611fb285828601611e1c565b95602094909401359450505050565b80356001600160a01b0381168114610caa57600080fd5b600080600060608486031215611fed57600080fd5b83356001600160401b0381111561200357600080fd5b61200f86828701611e1c565b93505061201e60208501611fc1565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561208357603f19888603018452612071858351611f0d565b94509285019290850190600101612055565b5092979650505050505050565b803560048110610caa57600080fd5b60006001600160401b038211156120b8576120b8611dae565b5060051b60200190565b803560068110610caa57600080fd5b600082601f8301126120e257600080fd5b813560206120f76120f28361209f565b611dec565b828152600592831b850182019282820191908785111561211657600080fd5b8387015b858110156121ba5780356001600160401b038111156121395760008081fd5b8801603f81018a1361214b5760008081fd5b85810135604061215d6120f28361209f565b82815291851b8301810191888101908d84111561217a5760008081fd5b938201935b838510156121a95784359250600783106121995760008081fd5b828252938901939089019061217f565b88525050509385019350840161211a565b5090979650505050505050565b80151581146111ec57600080fd5b8035610caa816121c7565b600080600080600060a086880312156121f857600080fd5b61220186611fc1565b945061220f60208701612090565b93506001600160401b036040870135111561222957600080fd5b6122398760408801358801611e1c565b925061224760608701611fc1565b91506001600160401b036080870135111561226157600080fd5b86601f60808801358801011261227657600080fd5b6122896120f2608088013588013561209f565b6080870135870180358083526020808401939260059290921b909101018910156122b257600080fd5b602060808901358901015b60808901358901803560051b0160200181101561243a576001600160401b03813511156122e957600080fd5b803560808a01358a01016080601f19828d0301121561230757600080fd5b61230f611dc4565b61231b602083016120c2565b81526001600160401b036040830135111561233557600080fd5b8b603f60408401358401011261234a57600080fd5b6123606120f2602060408501358501013561209f565b6020604084810135850182810135808552928401939260051b01018e101561238757600080fd5b6040808501358501015b6040858101358601602081013560051b01018110156123e3576001600160401b03813511156123bf57600080fd5b6123d58f60408335604089013589010101611e1c565b835260209283019201612391565b506020830152506001600160401b036060830135111561240257600080fd5b6124158c602060608501358501016120d1565b6040820152612426608083016121d5565b6060820152845250602092830192016122bd565b5080925050509295509295909350565b6000806000806080858703121561246057600080fd5b61246985611fc1565b935061247760208601612090565b925060408501356001600160401b0381111561249257600080fd5b61249e87828801611e1c565b9250506124ad60608601611fc1565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124e06040850182611ed5565b50604084015160a060608501526124fa60c0850182611f0d565b9050816060860151166080850152608085015160a0850152809250505092915050565b6000806040838503121561253057600080fd5b82356001600160401b0381111561254657600080fd5b61255285828601611e1c565b925050612561602084016120c2565b90509250929050565b60068110611ee557611ee5611ebf565b60408101612588828561256a565b82151560208301529392505050565b6000602082840312156125a957600080fd5b61166f82611fc1565b600181811c908216806125c657607f821691505b6020821081036125e657634e487b7160e01b600052602260045260246000fd5b50919050565b600082516125fe818460208701611ee9565b9190910192915050565b60208152600061166f6020830184611f0d565b634e487b7160e01b600052601160045260246000fd5b818103818111156104c8576104c861261b565b601f82111561165b57600081815260208120601f850160051c8101602086101561266b5750805b601f850160051c820191505b8181101561268a57828155600101612677565b505050505050565b81516001600160401b038111156126ab576126ab611dae565b6126bf816126b984546125b2565b84612644565b602080601f8311600181146126f457600084156126dc5750858301515b600019600386901b1c1916600185901b17855561268a565b600085815260208120601f198616915b8281101561272357888601518255948401946001909101908401612704565b50858210156127415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03848116825260608201906127706020840186611ed5565b808416604084015250949350505050565b600081518084526020808501808196508360051b810191508286016000805b868110156127ff578385038a52825180518087529087019087870190845b818110156127ea578351600781106127d8576127d8611ebf565b835292890192918901916001016127be565b50509a87019a955050918501916001016127a0565b509298975050505050505050565b6001600160a01b03868116825260009060a090602061282e8186018a611ed5565b604083818701526128418487018a611f0d565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561292357601f1987840301855281518a840161288f85835161256a565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128e257609f198986030183526128d0858551611f0d565b9450928e0192918e01916001016128b4565b50505050898201518582038b8701526128fb8282612781565b92890151801515878b01529291506129109050565b958a01959350509088019060010161286e565b50508099505050505050505050509695505050505050565b60006020828403121561294d57600080fd5b815161166f816121c7565b60408152600061296b6040830185611f0d565b90508260208301529392505050565b808201808211156104c8576104c861261b565b634e487b7160e01b600052603260045260246000fd5b60008083546129b1816125b2565b600182811680156129c957600181146129de57612a0d565b60ff1984168752821515830287019450612a0d565b8760005260208060002060005b85811015612a045781548a8201529084019082016129eb565b50505082870194505b50929695505050505050565b600060018201612a2b57612a2b61261b565b5060010190565b818103612a3d575050565b612a4782546125b2565b6001600160401b03811115612a5e57612a5e611dae565b612a6c816126b984546125b2565b6000601f821160018114612aa05760008315612a885750848201545b600019600385901b1c1916600184901b178455612b05565b600085815260209020601f19841690600086815260209020845b83811015612ada5782860154825560019586019590910190602001612aba565b5085831015612af85781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612b34818460208801611ee9565b835190830190612b48818360208801611ee9565b0194935050505056fea26469706673582212209f8c248896d6909e8ae94619c8cacd6a2bfafb79dd2931bf07993ef4b6a8816e64736f6c63430008140033","sourceMap":"1008:8408:7:-:0;;;1759:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1805:15;-1:-1:-1;;;;;1273:26:0;;1269:95;;1322:31;;-1:-1:-1;;;1322:31:0;;1350:1;1322:31;;;455:51:8;428:18;;1322:31:0;;;;;;;1269:95;1373:32;1392:12;1373:18;:32::i;:::-;-1:-1:-1;1832:14:7::1;:41:::0;;-1:-1:-1;;;;;;1832:41:7::1;-1:-1:-1::0;;;;;1832:41:7;;;::::1;::::0;;;::::1;::::0;;1008:8408;;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:290:8:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:8;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:8:o;309:203::-;1008:8408:7;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063d9cf884c11610066578063d9cf884c1461022f578063e1efb59614610242578063ea8f547f14610255578063f2fde38b146102ac57600080fd5b80638da5cb5b146101d8578063a1bc17c5146101e9578063b48272cc146101fc578063c1733f681461020f57600080fd5b80635137b8a7116100d35780635137b8a714610193578063623662ad146101a8578063715018a6146101bb57806372d4c33b146101c557600080fd5b806304c2320b14610105578063056b01ce146101325780631255c189146101555780634534ba1714610180575b600080fd5b610118610113366004611e8b565b6102bf565b604051610129959493929190611f39565b60405180910390f35b610145610140366004611f7d565b61039f565b6040519015158152602001610129565b600454610168906001600160a01b031681565b6040516001600160a01b039091168152602001610129565b61014561018e366004611fd8565b6104ce565b61019b610639565b604051610129919061202e565b6101456101b63660046121e0565b610712565b6101c36109c7565b005b6101456101d336600461244a565b6109db565b6000546001600160a01b0316610168565b6101456101f7366004611e8b565b610abc565b61014561020a366004611f7d565b610caf565b61022261021d366004611e8b565b610df6565b60405161012991906124b8565b61014561023d366004611f7d565b610f49565b610145610250366004611f7d565b6110a7565b61029e61026336600461251d565b8151602081840181018051600282529282019482019490942091909352909152600090815260409020805460039091015460ff918216911682565b60405161012992919061257a565b6101c36102ba366004612597565b6111b1565b805160208183018101805160018083529383019290940191909120929052815490820180546001600160a01b03831693600160a01b90930460ff16929190610306906125b2565b80601f0160208091040260200160405190810160405280929190818152602001828054610332906125b2565b801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b50505050600283015460039093015491926001600160a01b031691905085565b60006103a96111ef565b60006001600160a01b03166001846040516103c491906125ec565b908152604051908190036020019020546001600160a01b031603610406578260405163c0bab25f60e01b81526004016103fd9190612608565b60405180910390fd5b6104128360008461121c565b6104575760405162461bcd60e51b81526020600482015260166024820152751b5a5b9d08185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b8160018460405161046891906125ec565b908152604051908190036020018120600301919091556104899084906125ec565b604051908190038120838252907f0a4e1e5035320483d096cf114513007c4eda3853a4dca806da2d9faec60470a6906020015b60405180910390a25060015b92915050565b60006104d86111ef565b816001856040516104e991906125ec565b90815260200160405180910390206003015410156105495760405162461bcd60e51b815260206004820181905260248201527f61737369676e206173736574206173736574206973206e6f74206c6f636b656460448201526064016103fd565b6105568460028486611227565b6105a25760405162461bcd60e51b815260206004820152601860248201527f61737369676e2061737365742063616c6c206661696c6564000000000000000060448201526064016103fd565b816001856040516105b391906125ec565b908152602001604051809103902060030160008282546105d39190612631565b90915550506040516105e69085906125ec565b604080519182900382206001600160a01b038616835260208301859052917f0b3112bdbedc0251766a323a5c6ad4df77174bbc08bd61b944815ad9efe8d54c910160405180910390a25060019392505050565b60606003805480602002602001604051908101604052809291908181526020016000905b8282101561070957838290600052602060002001805461067c906125b2565b80601f01602080910402602001604051908101604052809291908181526020018280546106a8906125b2565b80156106f55780601f106106ca576101008083540402835291602001916106f5565b820191906000526020600020905b8154815290600101906020018083116106d857829003601f168201915b50505050508152602001906001019061065d565b50505050905090565b600061071c6111ef565b60006001600160a01b031660018560405161073791906125ec565b908152604051908190036020019020546001600160a01b03161461077057836040516319eac8d160e21b81526004016103fd9190612608565b61077a8483611540565b60028460405161078a91906125ec565b9081526040805160209281900383019020600360008181529190935220015460ff161561082e576107bc846003611660565b61082e5760405162461bcd60e51b815260206004820152603c60248201527f436f6e747261637420646f6573206e6f742068617665207065726d697373696f60448201527f6e20746f20696e74657261637420776974682074686520746f6b656e0000000060648201526084016103fd565b6040518060a00160405280876001600160a01b0316815260200186600381111561085a5761085a611ebf565b8152602001858152602001846001600160a01b03168152602001600081525060018560405161088991906125ec565b908152604051908190036020908101909120825181546001600160a01b039091166001600160a01b031982168117835592840151919283916001600160a81b03191617600160a01b8360038111156108e3576108e3611ebf565b0217905550604082015160018201906108fc9082612692565b5060608201516002820180546001600160a01b0319166001600160a01b0390921691909117905560809091015160039182015580546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b016109698582612692565b508360405161097891906125ec565b60405180910390207fdb9aba559597d42589517445706b719df3e068de14750a8d3a384c12fa6b82e68787866040516109b393929190612751565b60405180910390a250600195945050505050565b6109cf6111ef565b6109d96000611676565b565b60006109e56111ef565b3063623662ad868686866000604051908082528060200260200182016040528015610a4d57816020015b610a3a6040805160808101909152806000815260606020820181905260408201819052600091015290565b815260200190600190039081610a0f5790505b506040518663ffffffff1660e01b8152600401610a6e95949392919061280d565b6020604051808303816000875af1158015610a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab1919061293b565b90505b949350505050565b6000610ac66111ef565b60006001600160a01b0316600183604051610ae191906125ec565b908152604051908190036020019020546001600160a01b031603610b1a578160405163c0bab25f60e01b81526004016103fd9190612608565b6000600183604051610b2c91906125ec565b9081526020016040518091039020600301541115610b5f5781604051635be9608560e11b81526004016103fd9190612608565b610c11600183604051610b7291906125ec565b90815260200160405180910390206001018054610b8e906125b2565b80601f0160208091040260200160405190810160405280929190818152602001828054610bba906125b2565b8015610c075780601f10610bdc57610100808354040283529160200191610c07565b820191906000526020600020905b815481529060010190602001808311610bea57829003601f168201915b50505050506116c6565b600182604051610c2191906125ec565b90815260405190819003602001902080546001600160a81b03191681556000610c4d6001830182611ba1565b506002810180546001600160a01b03191690556000600390910155604051610c769083906125ec565b604051908190038120907f3855d31914452a5e7361730662e60834555d7cb26d380140894d85fd0d13b85490600090a25060015b919050565b6000610cb96111ef565b81600184604051610cca91906125ec565b9081526020016040518091039020600301541015610d2a5760405162461bcd60e51b815260206004820152601e60248201527f6275726e206173736574206173736574206973206e6f74206c6f636b6564000060448201526064016103fd565b610d368360018461121c565b610d7b5760405162461bcd60e51b8152602060048201526016602482015275189d5c9b88185cdcd95d0818d85b1b0819985a5b195960521b60448201526064016103fd565b81600184604051610d8c91906125ec565b90815260200160405180910390206003016000828254610dac9190612631565b9091555050604051610dbf9084906125ec565b604051908190038120838252907fa0237080cf48d9e1fbb9ef1f82e33b11170d047b2b540a73b457d0916d53ee99906020016104bc565b610e286040805160a0810190915260008082526020820190815260606020820181905260006040830181905291015290565b600182604051610e3891906125ec565b908152604080516020928190038301812060a0820190925281546001600160a01b03811682529092830190600160a01b900460ff166003811115610e7e57610e7e611ebf565b6003811115610e8f57610e8f611ebf565b8152602001600182018054610ea3906125b2565b80601f0160208091040260200160405190810160405280929190818152602001828054610ecf906125b2565b8015610f1c5780601f10610ef157610100808354040283529160200191610f1c565b820191906000526020600020905b815481529060010190602001808311610eff57829003601f168201915b505050918352505060028201546001600160a01b0316602082015260039091015460409091015292915050565b6000610f536111ef565b60006001600160a01b0316600184604051610f6e91906125ec565b908152604051908190036020019020546001600160a01b031603610fa7578260405163c0bab25f60e01b81526004016103fd9190612608565b81600184604051610fb891906125ec565b9081526020016040518091039020600301541015610fed57828260405163076abcf360e51b81526004016103fd929190612958565b6000610ffb8460058561121c565b9050801561108c578260018560405161101491906125ec565b908152602001604051809103902060030160008282546110349190612631565b90915550506040516110479085906125ec565b604051908190038120848252907f7b3c894115251262b174b7aeab24a57e00bc2e8853d1ef2f57a217edaa69c06e906020015b60405180910390a260019150506104c8565b836040516358300fe760e01b81526004016103fd9190612608565b60006110b16111ef565b60006001600160a01b03166001846040516110cc91906125ec565b908152604051908190036020019020546001600160a01b031603611105578260405163c0bab25f60e01b81526004016103fd9190612608565b60006111138460048561121c565b90508015611196578260018560405161112c91906125ec565b9081526020016040518091039020600301600082825461114c919061297a565b909155505060405161115f9085906125ec565b604051908190038120848252907fc480ef4e831b2ca5eb0b2f95c6564d9a56af5b3fe2383393008e3f1708dc97979060200161107a565b8360405163412204b560e11b81526004016103fd9190612608565b6111b96111ef565b6001600160a01b0381166111e357604051631e4fbdf760e01b8152600060048201526024016103fd565b6111ec81611676565b50565b6000546001600160a01b031633146109d95760405163118cdaa760e01b81523360048201526024016103fd565b6000610ab484848460005b600060028560405161123991906125ec565b9081526020016040518091039020600085600581111561125b5761125b611ebf565b600581111561126c5761126c611ebf565b815260208101919091526040016000206003015460ff1661128f57506000610ab4565b60005b6002866040516112a291906125ec565b908152602001604051809103902060008660058111156112c4576112c4611ebf565b60058111156112d5576112d5611ebf565b815260208101919091526040016000206001015481101561153457600060028760405161130291906125ec565b9081526020016040518091039020600087600581111561132457611324611ebf565b600581111561133557611335611ebf565b815260200190815260200160002060010182815481106113575761135761298d565b9060005260206000200160405160200161137191906129a3565b604051602081830303815290604052805190602001209050600061148d8261148860028b6040516113a291906125ec565b908152602001604051809103902060008b60058111156113c4576113c4611ebf565b60058111156113d5576113d5611ebf565b815260200190815260200160002060020186815481106113f7576113f761298d565b9060005260206000200180548060200260200160405190810160405280929190818152602001828054801561147b57602002820191906000526020600020906000905b82829054906101000a900460ff16600681111561145957611459611ebf565b81526020600192830181810494850194909303909202910180841161143a5790505b50505050508b898b611824565b611af3565b905060006001896040516114a191906125ec565b908152604051908190036020018120546001600160a01b0316906114c69084906125ec565b6000604051808303816000865af19150503d8060008114611503576040519150601f19603f3d011682016040523d82523d6000602084013e611508565b606091505b505090508061151e576000945050505050610ab4565b505050808061152c90612a19565b915050611292565b50600195945050505050565b60005b815181101561165b5781818151811061155e5761155e61298d565b602002602001015160028460405161157691906125ec565b908152602001604051809103902060008484815181106115985761159861298d565b60200260200101516000015160058111156115b5576115b5611ebf565b60058111156115c6576115c6611ebf565b8152602081019190915260400160002081518154829060ff191660018360058111156115f4576115f4611ebf565b021790555060208281015180516116119260018501920190611bdb565b506040820151805161162d916002840191602090910190611c31565b50606091909101516003909101805460ff19169115159190911790558061165381612a19565b915050611543565b505050565b600061166f8383600080611227565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b60035481101561182057611782600382815481106116e9576116e961298d565b9060005260206000200180546116fe906125b2565b80601f016020809104026020016040519081016040528092919081815260200182805461172a906125b2565b80156117775780601f1061174c57610100808354040283529160200191611777565b820191906000526020600020905b81548152906001019060200180831161175a57829003601f168201915b505050505083611b7c565b1561180e576003805461179790600190612631565b815481106117a7576117a761298d565b90600052602060002001600382815481106117c4576117c461298d565b9060005260206000200190816117da9190612a32565b5060038054806117ec576117ec612b0c565b6001900381819060005260206000200160006118089190611ba1565b90555050565b8061181881612a19565b9150506116c9565b5050565b6060600085516001600160401b0381111561184157611841611dae565b60405190808252806020026020018201604052801561187457816020015b606081526020019060019003908161185f5790505b50905060005b8651811015611ae95760058782815181106118975761189761298d565b602002602001015160068111156118b0576118b0611ebf565b036118f25760408051306020820152015b6040516020818303038152906040528282815181106118e2576118e261298d565b6020026020010181905250611ad7565b60028782815181106119065761190661298d565b6020026020010151600681111561191f5761191f611ebf565b0361193557856040516020016118c19190612608565b60048782815181106119495761194961298d565b6020026020010151600681111561196257611962611ebf565b03611978576040805160208101869052016118c1565b600387828151811061198c5761198c61298d565b602002602001015160068111156119a5576119a5611ebf565b036119e3576001866040516119ba91906125ec565b908152604080519182900360209081018320600201546001600160a01b031690830152016118c1565b60008782815181106119f7576119f761298d565b60200260200101516006811115611a1057611a10611ebf565b03611a4b57600186604051611a2591906125ec565b908152604080519182900360209081018320546001600160a01b031690830152016118c1565b6006878281518110611a5f57611a5f61298d565b60200260200101516006811115611a7857611a78611ebf565b03611a9657604080516001600160a01b0387166020820152016118c1565b60405162461bcd60e51b815260206004820152601660248201527515985c9a58589b19481b9bdd081cdd5c1c1bdc9d195960521b60448201526064016103fd565b80611ae181612a19565b91505061187a565b5095945050505050565b604080516001600160e01b03198416602082015281516004818303018152602490910190915260005b8251811015611b755781838281518110611b3857611b3861298d565b6020026020010151604051602001611b51929190612b22565b60405160208183030381529060405291508080611b6d90612a19565b915050611b1c565b5092915050565b60008151835114801561166f5750508051602091820120825192909101919091201490565b508054611bad906125b2565b6000825580601f10611bbd575050565b601f0160209004906000526020600020908101906111ec9190611c8a565b828054828255906000526020600020908101928215611c21579160200282015b82811115611c215782518290611c119082612692565b5091602001919060010190611bfb565b50611c2d929150611c9f565b5090565b828054828255906000526020600020908101928215611c7e579160200282015b82811115611c7e5782518051611c6e918491602090910190611cbc565b5091602001919060010190611c51565b50611c2d929150611d6c565b5b80821115611c2d5760008155600101611c8b565b80821115611c2d576000611cb38282611ba1565b50600101611c9f565b82805482825590600052602060002090601f01602090048101928215611d605791602002820160005b83821115611d3157835183826101000a81548160ff02191690836006811115611d1057611d10611ebf565b02179055509260200192600101602081600001049283019260010302611ce5565b8015611d5e5782816101000a81549060ff0219169055600101602081600001049283019260010302611d31565b505b50611c2d929150611c8a565b80821115611c2d576000611d808282611d89565b50600101611d6c565b50805460008255601f0160209004906000526020600020908101906111ec9190611c8a565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715611de657611de6611dae565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611e1457611e14611dae565b604052919050565b600082601f830112611e2d57600080fd5b81356001600160401b03811115611e4657611e46611dae565b611e59601f8201601f1916602001611dec565b818152846020838601011115611e6e57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611e9d57600080fd5b81356001600160401b03811115611eb357600080fd5b610ab484828501611e1c565b634e487b7160e01b600052602160045260246000fd5b60048110611ee557611ee5611ebf565b9052565b60005b83811015611f04578181015183820152602001611eec565b50506000910152565b60008151808452611f25816020860160208601611ee9565b601f01601f19169290920160200192915050565b6001600160a01b038681168252600090611f566020840188611ed5565b60a06040840152611f6a60a0840187611f0d565b9416606083015250608001529392505050565b60008060408385031215611f9057600080fd5b82356001600160401b03811115611fa657600080fd5b611fb285828601611e1c565b95602094909401359450505050565b80356001600160a01b0381168114610caa57600080fd5b600080600060608486031215611fed57600080fd5b83356001600160401b0381111561200357600080fd5b61200f86828701611e1c565b93505061201e60208501611fc1565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561208357603f19888603018452612071858351611f0d565b94509285019290850190600101612055565b5092979650505050505050565b803560048110610caa57600080fd5b60006001600160401b038211156120b8576120b8611dae565b5060051b60200190565b803560068110610caa57600080fd5b600082601f8301126120e257600080fd5b813560206120f76120f28361209f565b611dec565b828152600592831b850182019282820191908785111561211657600080fd5b8387015b858110156121ba5780356001600160401b038111156121395760008081fd5b8801603f81018a1361214b5760008081fd5b85810135604061215d6120f28361209f565b82815291851b8301810191888101908d84111561217a5760008081fd5b938201935b838510156121a95784359250600783106121995760008081fd5b828252938901939089019061217f565b88525050509385019350840161211a565b5090979650505050505050565b80151581146111ec57600080fd5b8035610caa816121c7565b600080600080600060a086880312156121f857600080fd5b61220186611fc1565b945061220f60208701612090565b93506001600160401b036040870135111561222957600080fd5b6122398760408801358801611e1c565b925061224760608701611fc1565b91506001600160401b036080870135111561226157600080fd5b86601f60808801358801011261227657600080fd5b6122896120f2608088013588013561209f565b6080870135870180358083526020808401939260059290921b909101018910156122b257600080fd5b602060808901358901015b60808901358901803560051b0160200181101561243a576001600160401b03813511156122e957600080fd5b803560808a01358a01016080601f19828d0301121561230757600080fd5b61230f611dc4565b61231b602083016120c2565b81526001600160401b036040830135111561233557600080fd5b8b603f60408401358401011261234a57600080fd5b6123606120f2602060408501358501013561209f565b6020604084810135850182810135808552928401939260051b01018e101561238757600080fd5b6040808501358501015b6040858101358601602081013560051b01018110156123e3576001600160401b03813511156123bf57600080fd5b6123d58f60408335604089013589010101611e1c565b835260209283019201612391565b506020830152506001600160401b036060830135111561240257600080fd5b6124158c602060608501358501016120d1565b6040820152612426608083016121d5565b6060820152845250602092830192016122bd565b5080925050509295509295909350565b6000806000806080858703121561246057600080fd5b61246985611fc1565b935061247760208601612090565b925060408501356001600160401b0381111561249257600080fd5b61249e87828801611e1c565b9250506124ad60608601611fc1565b905092959194509250565b60208152600060018060a01b0380845116602084015260208401516124e06040850182611ed5565b50604084015160a060608501526124fa60c0850182611f0d565b9050816060860151166080850152608085015160a0850152809250505092915050565b6000806040838503121561253057600080fd5b82356001600160401b0381111561254657600080fd5b61255285828601611e1c565b925050612561602084016120c2565b90509250929050565b60068110611ee557611ee5611ebf565b60408101612588828561256a565b82151560208301529392505050565b6000602082840312156125a957600080fd5b61166f82611fc1565b600181811c908216806125c657607f821691505b6020821081036125e657634e487b7160e01b600052602260045260246000fd5b50919050565b600082516125fe818460208701611ee9565b9190910192915050565b60208152600061166f6020830184611f0d565b634e487b7160e01b600052601160045260246000fd5b818103818111156104c8576104c861261b565b601f82111561165b57600081815260208120601f850160051c8101602086101561266b5750805b601f850160051c820191505b8181101561268a57828155600101612677565b505050505050565b81516001600160401b038111156126ab576126ab611dae565b6126bf816126b984546125b2565b84612644565b602080601f8311600181146126f457600084156126dc5750858301515b600019600386901b1c1916600185901b17855561268a565b600085815260208120601f198616915b8281101561272357888601518255948401946001909101908401612704565b50858210156127415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03848116825260608201906127706020840186611ed5565b808416604084015250949350505050565b600081518084526020808501808196508360051b810191508286016000805b868110156127ff578385038a52825180518087529087019087870190845b818110156127ea578351600781106127d8576127d8611ebf565b835292890192918901916001016127be565b50509a87019a955050918501916001016127a0565b509298975050505050505050565b6001600160a01b03868116825260009060a090602061282e8186018a611ed5565b604083818701526128418487018a611f0d565b6060848a168189015260809450878203858901528189518084528584019150858160051b850101868c0160005b8381101561292357601f1987840301855281518a840161288f85835161256a565b818b0151858c018d9052805191829052600582901b86018e0191908c01908e87019060005b818110156128e257609f198986030183526128d0858551611f0d565b9450928e0192918e01916001016128b4565b50505050898201518582038b8701526128fb8282612781565b92890151801515878b01529291506129109050565b958a01959350509088019060010161286e565b50508099505050505050505050509695505050505050565b60006020828403121561294d57600080fd5b815161166f816121c7565b60408152600061296b6040830185611f0d565b90508260208301529392505050565b808201808211156104c8576104c861261b565b634e487b7160e01b600052603260045260246000fd5b60008083546129b1816125b2565b600182811680156129c957600181146129de57612a0d565b60ff1984168752821515830287019450612a0d565b8760005260208060002060005b85811015612a045781548a8201529084019082016129eb565b50505082870194505b50929695505050505050565b600060018201612a2b57612a2b61261b565b5060010190565b818103612a3d575050565b612a4782546125b2565b6001600160401b03811115612a5e57612a5e611dae565b612a6c816126b984546125b2565b6000601f821160018114612aa05760008315612a885750848201545b600019600385901b1c1916600184901b178455612b05565b600085815260209020601f19841690600086815260209020845b83811015612ada5782860154825560019586019590910190602001612aba565b5085831015612af85781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b634e487b7160e01b600052603160045260246000fd5b60008351612b34818460208801611ee9565b835190830190612b48818360208801611ee9565b0194935050505056fea26469706673582212209f8c248896d6909e8ae94619c8cacd6a2bfafb79dd2931bf07993ef4b6a8816e64736f6c63430008140033","sourceMap":"1008:8408:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1074:40;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;4525:419;;;;;;:::i;:::-;;:::i;:::-;;;3609:14:8;;3602:22;3584:41;;3572:2;3557:18;4525:419:7;3444:187:8;1269:29:7;;;;;-1:-1:-1;;;;;1269:29:7;;;;;;-1:-1:-1;;;;;3800:32:8;;;3782:51;;3770:2;3755:18;1269:29:7;3636:203:8;5337:461:7;;;;;;:::i;:::-;;:::i;5816:94::-;;;:::i;:::-;;;;;;;:::i;1886:816::-;;;;;;:::i;:::-;;:::i;2293:101:0:-;;;:::i;:::-;;2708:252:7;;;;;;:::i;:::-;;:::i;1638:85:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;2966:431:7;;;;;;:::i;:::-;;:::i;4950:381::-;;;;;;:::i;:::-;;:::i;6198:121::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3894:624::-;;;;;;:::i;:::-;;:::i;3403:484::-;;;;;;:::i;:::-;;:::i;1149:94::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1149:94:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2543:215:0:-;;;;;;:::i;:::-;;:::i;1074:40:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;;;1074:40:7;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;1074:40:7;;;;;;;;;;;-1:-1:-1;;;;;1074:40:7;;;-1:-1:-1;1074:40:7;:::o;4525:419::-;4606:12;1531:13:0;:11;:13::i;:::-;4676:1:7::1;-1:-1:-1::0;;;;;4633:45:7::1;:6;4640:7;4633:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4633:31:7::1;:45:::0;4630:107:::1;;4718:7;4700:26;;-1:-1:-1::0;;;4700:26:7::1;;;;;;;;:::i;:::-;;;;;;;;4630:107;4763:47;4772:7;4781:20;4803:6;4763:8;:47::i;:::-;4755:83;;;::::0;-1:-1:-1;;;4755:83:7;;15099:2:8;4755:83:7::1;::::0;::::1;15081:21:8::0;15138:2;15118:18;;;15111:30;-1:-1:-1;;;15157:18:8;;;15150:52;15219:18;;4755:83:7::1;14897:346:8::0;4755:83:7::1;4874:6;4849;4856:7;4849:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:22:::1;;:31:::0;;;;4895:21:::1;::::0;4900:7;;4895:21:::1;:::i;:::-;;::::0;;;;::::1;::::0;;15394:25:8;;;4895:21:7;::::1;::::0;15382:2:8;15367:18;4895:21:7::1;;;;;;;;-1:-1:-1::0;4933:4:7::1;1554:1:0;4525:419:7::0;;;;:::o;5337:461::-;5446:12;1531:13:0;:11;:13::i;:::-;5504:6:7::1;5478;5485:7;5478:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5470:77;;;::::0;-1:-1:-1;;;5470:77:7;;15632:2:8;5470:77:7::1;::::0;::::1;15614:21:8::0;;;15651:18;;;15644:30;15710:34;15690:18;;;15683:62;15762:18;;5470:77:7::1;15430:356:8::0;5470:77:7::1;5566:67;5575:7;5584:22;5608:6;5616:16;5566:8;:67::i;:::-;5558:104;;;::::0;-1:-1:-1;;;5558:104:7;;15993:2:8;5558:104:7::1;::::0;::::1;15975:21:8::0;16032:2;16012:18;;;16005:30;16071:26;16051:18;;;16044:54;16115:18;;5558:104:7::1;15791:348:8::0;5558:104:7::1;5699:6;5673;5680:7;5673:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5729:41:7::1;::::0;::::1;::::0;5736:7;;5729:41:::1;:::i;:::-;;::::0;;;;;::::1;::::0;;-1:-1:-1;;;;;16601:32:8;;16583:51;;16665:2;16650:18;;16643:34;;;5729:41:7;::::1;::::0;16556:18:8;5729:41:7::1;;;;;;;-1:-1:-1::0;5787:4:7::1;5337:461:::0;;;;;:::o;5816:94::-;5866:15;5900:3;5893:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5816:94;:::o;1886:816::-;2057:16;1531:13:0;:11;:13::i;:::-;2131:1:7::1;-1:-1:-1::0;;;;;2088:45:7::1;:6;2095:7;2088:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;2088:31:7::1;:45;2085:110;;2176:7;2156:28;;-1:-1:-1::0;;;2156:28:7::1;;;;;;;;:::i;2085:110::-;2205:53;2236:7;2245:12;2205:30;:53::i;:::-;2272:18;2291:7;2272:27;;;;;;:::i;:::-;::::0;;;::::1;::::0;;::::1;::::0;;;;;;;;2300:30:::1;2272:59;::::0;;;;;;;;:69:::1;::::0;::::1;;2269:221;;;2365:49;2374:7;2383:30;2365:8;:49::i;:::-;2357:122;;;::::0;-1:-1:-1;;;2357:122:7;;16890:2:8;2357:122:7::1;::::0;::::1;16872:21:8::0;16929:2;16909:18;;;16902:30;16968:34;16948:18;;;16941:62;17039:30;17019:18;;;17012:58;17087:19;;2357:122:7::1;16688:424:8::0;2357:122:7::1;2518:52;;;;;;;;2524:15;-1:-1:-1::0;;;;;2518:52:7::1;;;;;2541:9;2518:52;;;;;;;;:::i;:::-;;;;;2552:7;2518:52;;;;2561:5;-1:-1:-1::0;;;;;2518:52:7::1;;;;;2568:1;2518:52;;::::0;2500:6:::1;2507:7;2500:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;:70;;;;-1:-1:-1;;;;;2500:70:7;;::::1;-1:-1:-1::0;;;;;;2500:70:7;::::1;::::0;::::1;::::0;;;;::::1;::::0;:15;;;;-1:-1:-1;;;;;;2500:70:7;;-1:-1:-1;;;2500:70:7;::::1;::::0;::::1;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;2500:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;2500:70:7::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;2500:70:7::1;-1:-1:-1::0;;;;;2500:70:7;;::::1;::::0;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;2585:17;;-1:-1:-1;2585:17:7;::::1;::::0;;-1:-1:-1;2585:17:7;;;;;::::1;;2594:7:::0;2585:17;::::1;:::i;:::-;;2631:7;2626:48;;;;;;:::i;:::-;;;;;;;;;2640:15;2657:9;2668:5;2626:48;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;2691:4:7::1;1886:816:::0;;;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2708:252:7:-;2834:16;1531:13:0;:11;:13::i;:::-;2869:4:7::1;:9;2879:15:::0;2896:9;2907:7;2916:5;2950:1:::1;2923:29;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2923:29:7::1;;;;;;;;;;;;;;;;;2869:84;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2862:91;;1554:1:0;2708:252:7::0;;;;;;:::o;2966:431::-;3033:12;1531:13:0;:11;:13::i;:::-;3103:1:7::1;-1:-1:-1::0;;;;;3060:45:7::1;:6;3067:7;3060:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3060:31:7::1;:45:::0;3057:108:::1;;3146:7;3128:26;;-1:-1:-1::0;;;3128:26:7::1;;;;;;;;:::i;3057:108::-;3202:1;3177:6;3184:7;3177:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:26;3174:83;;;3238:7;3226:20;;-1:-1:-1::0;;;3226:20:7::1;;;;;;;;:::i;3174:83::-;3266:40;3282:6;3289:7;3282:15;;;;;;:::i;:::-;;;;;;;;;;;;;:23;;3266:40;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:40::i;:::-;3323:6;3330:7;3323:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;3316:22;;-1:-1:-1;;;;;;3316:22:7;;;3323:15:::1;3316:22;::::0;;::::1;3323:15:::0;3316:22:::1;:::i;:::-;-1:-1:-1::0;3316:22:7::1;::::0;::::1;::::0;;-1:-1:-1;;;;;;3316:22:7::1;::::0;;::::1;;::::0;;::::1;::::0;3354:15:::1;::::0;::::1;::::0;3361:7;;3354:15:::1;:::i;:::-;;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;-1:-1:-1::0;3386:4:7::1;1554:1:0;2966:431:7::0;;;:::o;4950:381::-;5031:12;1531:13:0;:11;:13::i;:::-;5089:6:7::1;5063;5070:7;5063:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;5055:75;;;::::0;-1:-1:-1;;;5055:75:7;;23860:2:8;5055:75:7::1;::::0;::::1;23842:21:8::0;23899:2;23879:18;;;23872:30;23938:32;23918:18;;;23911:60;23988:18;;5055:75:7::1;23658:354:8::0;5055:75:7::1;5149:47;5158:7;5167:20;5189:6;5149:8;:47::i;:::-;5141:82;;;::::0;-1:-1:-1;;;5141:82:7;;24219:2:8;5141:82:7::1;::::0;::::1;24201:21:8::0;24258:2;24238:18;;;24231:30;-1:-1:-1;;;24277:18:8;;;24270:52;24339:18;;5141:82:7::1;24017:346:8::0;5141:82:7::1;5260:6;5234;5241:7;5234:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;5282:21:7::1;::::0;::::1;::::0;5287:7;;5282:21:::1;:::i;:::-;;::::0;;;;::::1;::::0;;15394:25:8;;;5282:21:7;::::1;::::0;15382:2:8;15367:18;5282:21:7::1;15248:177:8::0;6198:121:7;6260:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6260:18:7;6297:6;6304:7;6297:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6290:22;;;;;;;;-1:-1:-1;;;;;6290:22:7;;;;6297:15;;6290:22;;;-1:-1:-1;;;6290:22:7;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6290:22:7;;;-1:-1:-1;;6290:22:7;;;;-1:-1:-1;;;;;6290:22:7;;;;;;;;;;;;;;;;6198:121;-1:-1:-1;;6198:121:7:o;3894:624::-;3977:12;1531:13:0;:11;:13::i;:::-;4057:1:7::1;-1:-1:-1::0;;;;;4014:45:7::1;:6;4021:7;4014:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;4014:31:7::1;:45:::0;4011:107:::1;;4099:7;4081:26;;-1:-1:-1::0;;;4081:26:7::1;;;;;;;;:::i;4011:107::-;4156:6;4131;4138:7;4131:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:31;4128:108;;;4209:7;4218:6;4185:40;;-1:-1:-1::0;;;4185:40:7::1;;;;;;;;;:::i;4128:108::-;4246:18;4267:49;4276:7;4285:22;4309:6;4267:8;:49::i;:::-;4246:70;;4330:13;4327:142;;;4385:6;4359;4366:7;4359:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;4410:23:7::1;::::0;::::1;::::0;4417:7;;4410:23:::1;:::i;:::-;;::::0;;;;::::1;::::0;;15394:25:8;;;4410:23:7;::::1;::::0;15382:2:8;15367:18;4410:23:7::1;;;;;;;;4454:4;4447:11;;;;;4327:142;4503:7;4486:25;;-1:-1:-1::0;;;4486:25:7::1;;;;;;;;:::i;3403:484::-:0;3484:12;1531:13:0;:11;:13::i;:::-;3554:1:7::1;-1:-1:-1::0;;;;;3511:45:7::1;:6;3518:7;3511:15;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:31;-1:-1:-1;;;;;3511:31:7::1;:45:::0;3508:107:::1;;3596:7;3578:26;;-1:-1:-1::0;;;3578:26:7::1;;;;;;;;:::i;3508:107::-;3625:16;3644:47;3653:7;3662:20;3684:6;3644:8;:47::i;:::-;3625:66;;3705:11;3702:138;;;3758:6;3732;3739:7;3732:15;;;;;;:::i;:::-;;;;;;;;;;;;;:22;;;:32;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;3783:21:7::1;::::0;::::1;::::0;3788:7;;3783:21:::1;:::i;:::-;;::::0;;;;::::1;::::0;;15394:25:8;;;3783:21:7;::::1;::::0;15382:2:8;15367:18;3783:21:7::1;15248:177:8::0;3702:138:7::1;3872:7;3857:23;;-1:-1:-1::0;;;3857:23:7::1;;;;;;;;:::i;2543:215:0:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:0;::::1;2623:91;;2672:31;::::0;-1:-1:-1;;;2672:31:0;;2700:1:::1;2672:31;::::0;::::1;3782:51:8::0;3755:18;;2672:31:0::1;3636:203:8::0;2623:91:0::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;1796:162::-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:1;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:1;1901:40:0;;;3782:51:8;3755:18;;1901:40:0;3636:203:8;6798:200:7;6906:12;6937:54;6946:7;6955:15;6972:6;6988:1;7004:888;7130:4;7151:18;7170:7;7151:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7179:15;7151:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7151:44:7;:54;;;;;7146:98;;-1:-1:-1;7228:5:7;7221:12;;7146:98;7259:6;7254:598;7275:18;7294:7;7275:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7303:15;7275:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;7275:44:7;:63;;:70;7271:74;;7254:598;;;7366:23;7426:18;7445:7;7426:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7454:15;7426:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:63;;7490:1;7426:66;;;;;;;;:::i;:::-;;;;;;;;7409:84;;;;;;;;:::i;:::-;;;;;;;;;;;;;7399:95;;;;;;7366:129;;7510:26;7539:137;7559:16;7577:98;7590:18;7609:7;7590:27;;;;;;:::i;:::-;;;;;;;;;;;;;:44;7618:15;7590:44;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:54;;7645:1;7590:57;;;;;;;;:::i;:::-;;;;;;;;7577:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7649:7;7658:8;7668:6;7577:12;:98::i;:::-;7539:19;:137::i;:::-;7510:166;;7692:16;7714:6;7721:7;7714:15;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;7714:31:7;;:51;;7751:13;;7714:51;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7691:74;;;7784:11;7779:63;;7822:5;7815:12;;;;;;;;7779:63;7352:500;;;7347:3;;;;;:::i;:::-;;;;7254:598;;;-1:-1:-1;7877:4:7;;7004:888;-1:-1:-1;;;;;7004:888:7:o;6325:281::-;6455:6;6451:149;6471:12;:19;6467:1;:23;6451:149;;;6574:12;6587:1;6574:15;;;;;;;;:::i;:::-;;;;;;;6511:18;6530:7;6511:27;;;;;;:::i;:::-;;;;;;;;;;;;;:60;6539:12;6552:1;6539:15;;;;;;;;:::i;:::-;;;;;;;:31;;;6511:60;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;6511:60:7;:78;;;;:60;;-1:-1:-1;;6511:78:7;;;;;;;;;;;:::i;:::-;;;;;-1:-1:-1;6511:78:7;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6511:78:7;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6511:78:7;;;;;;;;;;;;-1:-1:-1;;6511:78:7;;;;;;;;;;6492:3;;;;:::i;:::-;;;;6451:149;;;;6325:281;;:::o;6612:180::-;6705:12;6736:49;6745:7;6754:15;6771:1;6782;6736:8;:49::i;:::-;6729:56;6612:180;-1:-1:-1;;;6612:180:7:o;2912:187:0:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;5916:276:7:-;5984:9;5979:207;6003:3;:10;5999:14;;5979:207;;;6038:25;6052:3;6056:1;6052:6;;;;;;;;:::i;:::-;;;;;;;;6038:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6060:2;6038:13;:25::i;:::-;6034:142;;;6092:3;6096:10;;:14;;6109:1;;6096:14;:::i;:::-;6092:19;;;;;;;;:::i;:::-;;;;;;;;6083:3;6087:1;6083:6;;;;;;;;:::i;:::-;;;;;;;;:28;;;;;;:::i;:::-;;6129:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;5979:207;5916:276;:::o;6034:142::-;6015:3;;;;:::i;:::-;;;;5979:207;;;;5916:276;:::o;8286:1128::-;8417:14;8442:28;8485:9;:16;-1:-1:-1;;;;;8473:29:7;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8442:60;;8517:6;8512:866;8533:9;:16;8529:1;:20;8512:866;;;8590:14;8574:9;8584:1;8574:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8570:798;;8643:25;;;8662:4;8643:25;;;3782:51:8;3755:18;8643:25:7;;;;;;;;;;;;;8624:13;8638:1;8624:16;;;;;;;;:::i;:::-;;;;;;:44;;;;8570:798;;;8709:15;8693:9;8703:1;8693:12;;;;;;;;:::i;:::-;;;;;;;:31;;;;;;;;:::i;:::-;;8689:679;;8774:7;8763:19;;;;;;;;:::i;8689:679::-;8823:14;8807:9;8817:1;8807:12;;;;;;;;:::i;:::-;;;;;;;:30;;;;;;;;:::i;:::-;;8803:565;;8876:18;;;;;;15394:25:8;;;15367:18;8876::7;15248:177:8;8803:565:7;8935:13;8919:9;8929:1;8919:12;;;;;;;;:::i;:::-;;;;;;;:29;;;;;;;;:::i;:::-;;8915:453;;8998:6;9005:7;8998:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:21;;;-1:-1:-1;;;;;8998:21:7;8987:33;;;3782:51:8;3755:18;8987:33:7;3636:203:8;8915:453:7;9061:23;9045:9;9055:1;9045:12;;;;;;;;:::i;:::-;;;;;;;:39;;;;;;;;:::i;:::-;;9041:327;;9134:6;9141:7;9134:15;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;:31;-1:-1:-1;;;;;9134:31:7;9123:43;;;3782:51:8;3755:18;9123:43:7;3636:203:8;9041:327:7;9207:16;9191:9;9201:1;9191:12;;;;;;;;:::i;:::-;;;;;;;:32;;;;;;;;:::i;:::-;;9187:181;;9262:20;;;-1:-1:-1;;;;;3800:32:8;;9262:20:7;;;3782:51:8;3755:18;9262:20:7;3636:203:8;9187:181:7;9321:32;;-1:-1:-1;;;9321:32:7;;27979:2:8;9321:32:7;;;27961:21:8;28018:2;27998:18;;;27991:30;-1:-1:-1;;;28037:18:8;;;28030:52;28099:18;;9321:32:7;27777:346:8;9187:181:7;8551:3;;;;:::i;:::-;;;;8512:866;;;-1:-1:-1;9394:13:7;8286:1128;-1:-1:-1;;;;;8286:1128:7:o;7898:382::-;8059:34;;;-1:-1:-1;;;;;;28267:33:8;;8059:34:7;;;28255:46:8;8059:34:7;;;;;;;;;28317:11:8;;;;8059:34:7;;;8108:9;8103:141;8127:13;:20;8123:1;:24;8103:141;;;8201:13;8216;8230:1;8216:16;;;;;;;;:::i;:::-;;;;;;;8184:49;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8168:65;;8149:3;;;;;:::i;:::-;;;;8103:141;;;;7898:382;;;;:::o;2914:182:2:-;2986:4;3034:1;3028:15;3015:1;3009:15;:34;:80;;;;-1:-1:-1;;3070:19:2;;;;;;;3047;;;;;;;;;;:42;;2914:182::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;14:127:8:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;218:2;212:9;260:3;248:16;;-1:-1:-1;;;;;279:34:8;;315:22;;;276:62;273:88;;;341:18;;:::i;:::-;377:2;370:22;146:252;:::o;403:275::-;474:2;468:9;539:2;520:13;;-1:-1:-1;;516:27:8;504:40;;-1:-1:-1;;;;;559:34:8;;595:22;;;556:62;553:88;;;621:18;;:::i;:::-;657:2;650:22;403:275;;-1:-1:-1;403:275:8:o;683:531::-;726:5;779:3;772:4;764:6;760:17;756:27;746:55;;797:1;794;787:12;746:55;833:6;820:20;-1:-1:-1;;;;;855:2:8;852:26;849:52;;;881:18;;:::i;:::-;925:55;968:2;949:13;;-1:-1:-1;;945:27:8;974:4;941:38;925:55;:::i;:::-;1005:2;996:7;989:19;1051:3;1044:4;1039:2;1031:6;1027:15;1023:26;1020:35;1017:55;;;1068:1;1065;1058:12;1017:55;1133:2;1126:4;1118:6;1114:17;1107:4;1098:7;1094:18;1081:55;1181:1;1156:16;;;1174:4;1152:27;1145:38;;;;1160:7;683:531;-1:-1:-1;;;683:531:8:o;1219:322::-;1288:6;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1397:9;1384:23;-1:-1:-1;;;;;1422:6:8;1419:30;1416:50;;;1462:1;1459;1452:12;1416:50;1485;1527:7;1518:6;1507:9;1503:22;1485:50;:::i;1546:127::-;1607:10;1602:3;1598:20;1595:1;1588:31;1638:4;1635:1;1628:15;1662:4;1659:1;1652:15;1678:140;1759:1;1752:5;1749:12;1739:46;;1765:18;;:::i;:::-;1794;;1678:140::o;1823:250::-;1908:1;1918:113;1932:6;1929:1;1926:13;1918:113;;;2008:11;;;2002:18;1989:11;;;1982:39;1954:2;1947:10;1918:113;;;-1:-1:-1;;2065:1:8;2047:16;;2040:27;1823:250::o;2078:271::-;2120:3;2158:5;2152:12;2185:6;2180:3;2173:19;2201:76;2270:6;2263:4;2258:3;2254:14;2247:4;2240:5;2236:16;2201:76;:::i;:::-;2331:2;2310:15;-1:-1:-1;;2306:29:8;2297:39;;;;2338:4;2293:50;;2078:271;-1:-1:-1;;2078:271:8:o;2354:594::-;-1:-1:-1;;;;;2665:15:8;;;2647:34;;2590:4;;2690:53;2739:2;2724:18;;2716:6;2690:53;:::i;:::-;2779:3;2774:2;2763:9;2759:18;2752:31;2800:46;2841:3;2830:9;2826:19;2818:6;2800:46;:::i;:::-;2882:15;;2877:2;2862:18;;2855:43;-1:-1:-1;2929:3:8;2914:19;2907:35;2792:54;2354:594;-1:-1:-1;;;2354:594:8:o;2953:390::-;3031:6;3039;3092:2;3080:9;3071:7;3067:23;3063:32;3060:52;;;3108:1;3105;3098:12;3060:52;3148:9;3135:23;-1:-1:-1;;;;;3173:6:8;3170:30;3167:50;;;3213:1;3210;3203:12;3167:50;3236;3278:7;3269:6;3258:9;3254:22;3236:50;:::i;:::-;3226:60;3333:2;3318:18;;;;3305:32;;-1:-1:-1;;;;2953:390:8:o;3844:173::-;3912:20;;-1:-1:-1;;;;;3961:31:8;;3951:42;;3941:70;;4007:1;4004;3997:12;4022:464;4109:6;4117;4125;4178:2;4166:9;4157:7;4153:23;4149:32;4146:52;;;4194:1;4191;4184:12;4146:52;4234:9;4221:23;-1:-1:-1;;;;;4259:6:8;4256:30;4253:50;;;4299:1;4296;4289:12;4253:50;4322;4364:7;4355:6;4344:9;4340:22;4322:50;:::i;:::-;4312:60;;;4391:38;4425:2;4414:9;4410:18;4391:38;:::i;:::-;4381:48;;4476:2;4465:9;4461:18;4448:32;4438:42;;4022:464;;;;;:::o;4491:803::-;4653:4;4682:2;4722;4711:9;4707:18;4752:2;4741:9;4734:21;4775:6;4810;4804:13;4841:6;4833;4826:22;4879:2;4868:9;4864:18;4857:25;;4941:2;4931:6;4928:1;4924:14;4913:9;4909:30;4905:39;4891:53;;4979:2;4971:6;4967:15;5000:1;5010:255;5024:6;5021:1;5018:13;5010:255;;;5117:2;5113:7;5101:9;5093:6;5089:22;5085:36;5080:3;5073:49;5145:40;5178:6;5169;5163:13;5145:40;:::i;:::-;5135:50;-1:-1:-1;5243:12:8;;;;5208:15;;;;5046:1;5039:9;5010:255;;;-1:-1:-1;5282:6:8;;4491:803;-1:-1:-1;;;;;;;4491:803:8:o;5299:150::-;5374:20;;5423:1;5413:12;;5403:40;;5439:1;5436;5429:12;5454:203;5534:4;-1:-1:-1;;;;;5559:6:8;5556:30;5553:56;;;5589:18;;:::i;:::-;-1:-1:-1;5634:1:8;5630:14;5646:4;5626:25;;5454:203::o;5662:156::-;5743:20;;5792:1;5782:12;;5772:40;;5808:1;5805;5798:12;5823:1931;5892:5;5945:3;5938:4;5930:6;5926:17;5922:27;5912:55;;5963:1;5960;5953:12;5912:55;5999:6;5986:20;6025:4;6049:80;6065:63;6125:2;6065:63;:::i;:::-;6049:80;:::i;:::-;6163:15;;;6225:1;6265:11;;;6253:24;;6249:33;;;6194:12;;;;6151:3;6294:15;;;6291:35;;;6322:1;6319;6312:12;6291:35;6358:2;6350:6;6346:15;6370:1355;6386:6;6381:3;6378:15;6370:1355;;;6472:3;6459:17;-1:-1:-1;;;;;6495:11:8;6492:35;6489:125;;;6568:1;6597:2;6593;6586:14;6489:125;6637:24;;6696:2;6688:11;;6684:21;-1:-1:-1;6674:119:8;;6747:1;6776:2;6772;6765:14;6674:119;6837:2;6833;6829:11;6816:25;6864:2;6892:80;6908:63;6968:2;6908:63;:::i;6892:80::-;7016:17;;;7110:11;;;7102:20;;7098:29;;;7055:14;;;;7143:17;;;7140:107;;;7201:1;7230:2;7226;7219:14;7140:107;7273:11;;;;7297:355;7315:8;7308:5;7305:19;7297:355;;;7409:5;7396:19;7383:32;;7452:1;7445:5;7442:12;7432:129;;7505:1;7539:3;7534;7527:16;7432:129;7578:20;;;7336:14;;;;7624;;;;7297:355;;;7665:18;;-1:-1:-1;;;7703:12:8;;;;-1:-1:-1;6403:12:8;;6370:1355;;;-1:-1:-1;7743:5:8;;5823:1931;-1:-1:-1;;;;;;;5823:1931:8:o;7759:118::-;7845:5;7838:13;7831:21;7824:5;7821:32;7811:60;;7867:1;7864;7857:12;7882:128;7947:20;;7976:28;7947:20;7976:28;:::i;8015:3590::-;8197:6;8205;8213;8221;8229;8282:3;8270:9;8261:7;8257:23;8253:33;8250:53;;;8299:1;8296;8289:12;8250:53;8322:29;8341:9;8322:29;:::i;:::-;8312:39;;8370:45;8411:2;8400:9;8396:18;8370:45;:::i;:::-;8360:55;;-1:-1:-1;;;;;8458:2:8;8447:9;8443:18;8430:32;8427:56;8424:76;;;8496:1;8493;8486:12;8424:76;8519;8587:7;8580:2;8569:9;8565:18;8552:32;8541:9;8537:48;8519:76;:::i;:::-;8509:86;;8614:38;8648:2;8637:9;8633:18;8614:38;:::i;:::-;8604:48;;-1:-1:-1;;;;;8695:3:8;8684:9;8680:19;8667:33;8664:57;8661:77;;;8734:1;8731;8724:12;8661:77;8823:7;8816:4;8808:3;8797:9;8793:19;8780:33;8769:9;8765:49;8761:60;8757:74;8747:102;;8845:1;8842;8835:12;8747:102;8869:141;8885:124;9001:3;8990:9;8986:19;8973:33;8962:9;8958:49;8945:63;8885:124;:::i;8869:141::-;9112:3;9097:19;;9084:33;9069:49;;9056:63;;9044:76;;;9145:2;9136:12;;;;9032:3;9226:1;9222:71;;;;9167:127;;;9163:136;9160:149;-1:-1:-1;9157:169:8;;;9322:1;9319;9312:12;9157:169;9401:2;9393:3;9382:9;9378:19;9365:33;9354:9;9350:49;9346:58;9413:2162;9559:3;9544:19;;9531:33;9516:49;;9503:63;;9500:1;9496:71;9441:127;9570:2;9437:136;9429:145;;9413:2162;;;-1:-1:-1;;;;;9648:3:8;9635:17;9632:41;9629:61;;;9686:1;9683;9676:12;9629:61;9781:3;9768:17;9760:3;9749:9;9745:19;9732:33;9721:9;9717:49;9713:73;9838:3;9832:2;9828:7;9823:2;9814:7;9810:16;9806:30;9802:40;9799:60;;;9855:1;9852;9845:12;9799:60;9885:22;;:::i;:::-;9934:44;9974:2;9970;9966:11;9934:44;:::i;:::-;9927:5;9920:59;-1:-1:-1;;;;;10019:2:8;10015;10011:11;9998:25;9995:49;9992:69;;;10057:1;10054;10047:12;9992:69;10133:7;10128:2;10121;10117;10113:11;10100:25;10096:2;10092:34;10088:43;10084:57;10074:85;;10155:1;10152;10145:12;10074:85;10185:135;10201:118;10314:2;10307;10303;10299:11;10286:25;10282:2;10278:34;10274:43;10261:57;10201:118;:::i;10185:135::-;10431:2;10424;10416:11;;;10403:25;10395:34;;10391:43;;;10378:57;10364:72;;;10458:14;;;;10364:72;10539:1;10535:65;10495:106;10491:115;-1:-1:-1;;10485:148:8;;;10629:1;10626;10619:12;10485:148;10699:2;10692;10688;10684:11;10671:25;10667:2;10663:34;10659:43;10715:463;10857:2;10834:11;;;10821:25;10813:34;;10849:2;10809:43;;10796:57;10793:1;10789:65;10749:106;10745:115;10735:126;;10715:463;;;-1:-1:-1;;;;;10951:5:8;10938:19;10935:43;10932:63;;;10991:1;10988;10981:12;10932:63;11026:97;11115:7;11110:2;11101:5;11088:19;11081:2;11077;11073:11;11060:25;11056:2;11052:34;11048:60;11044:69;11026:97;:::i;:::-;11012:112;;11161:2;11150:14;;;;10885;10715:463;;;-1:-1:-1;11209:2:8;11198:14;;11191:29;-1:-1:-1;;;;;;11260:2:8;11252:11;;11239:25;11236:49;11233:69;;;11298:1;11295;11288:12;11233:69;11338:97;11427:7;11422:2;11415;11411;11407:11;11394:25;11390:2;11386:34;11382:43;11338:97;:::i;:::-;11333:2;11326:5;11322:14;11315:121;11472:29;11496:3;11492:2;11488:12;11472:29;:::i;:::-;11467:2;11456:14;;11449:53;11515:18;;-1:-1:-1;11562:2:8;11553:12;;;;9592;9413:2162;;;9417:3;11594:5;11584:15;;;;8015:3590;;;;;;;;:::o;11610:566::-;11720:6;11728;11736;11744;11797:3;11785:9;11776:7;11772:23;11768:33;11765:53;;;11814:1;11811;11804:12;11765:53;11837:29;11856:9;11837:29;:::i;:::-;11827:39;;11885:45;11926:2;11915:9;11911:18;11885:45;:::i;:::-;11875:55;;11981:2;11970:9;11966:18;11953:32;-1:-1:-1;;;;;12000:6:8;11997:30;11994:50;;;12040:1;12037;12030:12;11994:50;12063;12105:7;12096:6;12085:9;12081:22;12063:50;:::i;:::-;12053:60;;;12132:38;12166:2;12155:9;12151:18;12132:38;:::i;:::-;12122:48;;11610:566;;;;;;;:::o;12181:725::-;12356:2;12345:9;12338:21;12319:4;12395:1;12391;12386:3;12382:11;12378:19;12452:2;12443:6;12437:13;12433:22;12428:2;12417:9;12413:18;12406:50;12503:2;12495:6;12491:15;12485:22;12516:59;12571:2;12560:9;12556:18;12542:12;12516:59;:::i;:::-;;12624:2;12616:6;12612:15;12606:22;12664:4;12659:2;12648:9;12644:18;12637:32;12692:54;12741:3;12730:9;12726:19;12710:14;12692:54;:::i;:::-;12678:68;;12811:2;12805;12797:6;12793:15;12787:22;12783:31;12777:3;12766:9;12762:19;12755:60;12871:3;12863:6;12859:16;12853:23;12846:4;12835:9;12831:20;12824:53;12894:6;12886:14;;;;12181:725;;;;:::o;12911:429::-;13009:6;13017;13070:2;13058:9;13049:7;13045:23;13041:32;13038:52;;;13086:1;13083;13076:12;13038:52;13126:9;13113:23;-1:-1:-1;;;;;13151:6:8;13148:30;13145:50;;;13191:1;13188;13181:12;13145:50;13214;13256:7;13247:6;13236:9;13232:22;13214:50;:::i;:::-;13204:60;;;13283:51;13330:2;13319:9;13315:18;13283:51;:::i;:::-;13273:61;;12911:429;;;;;:::o;13345:146::-;13432:1;13425:5;13422:12;13412:46;;13438:18;;:::i;13496:301::-;13670:2;13655:18;;13682:50;13659:9;13714:6;13682:50;:::i;:::-;13782:6;13775:14;13768:22;13763:2;13752:9;13748:18;13741:50;13496:301;;;;;:::o;13802:186::-;13861:6;13914:2;13902:9;13893:7;13889:23;13885:32;13882:52;;;13930:1;13927;13920:12;13882:52;13953:29;13972:9;13953:29;:::i;13993:380::-;14072:1;14068:12;;;;14115;;;14136:61;;14190:4;14182:6;14178:17;14168:27;;14136:61;14243:2;14235:6;14232:14;14212:18;14209:38;14206:161;;14289:10;14284:3;14280:20;14277:1;14270:31;14324:4;14321:1;14314:15;14352:4;14349:1;14342:15;14206:161;;13993:380;;;:::o;14378:289::-;14509:3;14547:6;14541:13;14563:66;14622:6;14617:3;14610:4;14602:6;14598:17;14563:66;:::i;:::-;14645:16;;;;;14378:289;-1:-1:-1;;14378:289:8:o;14672:220::-;14821:2;14810:9;14803:21;14784:4;14841:45;14882:2;14871:9;14867:18;14859:6;14841:45;:::i;16144:127::-;16205:10;16200:3;16196:20;16193:1;16186:31;16236:4;16233:1;16226:15;16260:4;16257:1;16250:15;16276:128;16343:9;;;16364:11;;;16361:37;;;16378:18;;:::i;17243:545::-;17345:2;17340:3;17337:11;17334:448;;;17381:1;17406:5;17402:2;17395:17;17451:4;17447:2;17437:19;17521:2;17509:10;17505:19;17502:1;17498:27;17492:4;17488:38;17557:4;17545:10;17542:20;17539:47;;;-1:-1:-1;17580:4:8;17539:47;17635:2;17630:3;17626:12;17623:1;17619:20;17613:4;17609:31;17599:41;;17690:82;17708:2;17701:5;17698:13;17690:82;;;17753:17;;;17734:1;17723:13;17690:82;;;17694:3;;;17243:545;;;:::o;17964:1352::-;18090:3;18084:10;-1:-1:-1;;;;;18109:6:8;18106:30;18103:56;;;18139:18;;:::i;:::-;18168:97;18258:6;18218:38;18250:4;18244:11;18218:38;:::i;:::-;18212:4;18168:97;:::i;:::-;18320:4;;18384:2;18373:14;;18401:1;18396:663;;;;19103:1;19120:6;19117:89;;;-1:-1:-1;19172:19:8;;;19166:26;19117:89;-1:-1:-1;;17921:1:8;17917:11;;;17913:24;17909:29;17899:40;17945:1;17941:11;;;17896:57;19219:81;;18366:944;;18396:663;17190:1;17183:14;;;17227:4;17214:18;;-1:-1:-1;;18432:20:8;;;18550:236;18564:7;18561:1;18558:14;18550:236;;;18653:19;;;18647:26;18632:42;;18745:27;;;;18713:1;18701:14;;;;18580:19;;18550:236;;;18554:3;18814:6;18805:7;18802:19;18799:201;;;18875:19;;;18869:26;-1:-1:-1;;18958:1:8;18954:14;;;18970:3;18950:24;18946:37;18942:42;18927:58;18912:74;;18799:201;-1:-1:-1;;;;;19046:1:8;19030:14;;;19026:22;19013:36;;-1:-1:-1;17964:1352:8:o;19321:406::-;-1:-1:-1;;;;;19591:15:8;;;19573:34;;19523:2;19508:18;;;19616:53;19665:2;19650:18;;19642:6;19616:53;:::i;:::-;19717:2;19709:6;19705:15;19700:2;19689:9;19685:18;19678:43;;19321:406;;;;;;:::o;19732:1176::-;19800:3;19838:5;19832:12;19865:6;19860:3;19853:19;19891:4;19932:2;19927:3;19923:12;19957:11;19984;19977:18;;20034:6;20031:1;20027:14;20020:5;20016:26;20004:38;;20076:2;20069:5;20065:14;20097:1;20118;20128:754;20144:6;20139:3;20136:15;20128:754;;;20209:16;;;20197:29;;20249:13;;20321:9;;20343:22;;;20429:11;;;;20387:13;;;;20464:1;20478:298;20494:8;20489:3;20486:17;20478:298;;;20573:8;20567:15;20616:1;20612:2;20609:9;20599:43;;20622:18;;:::i;:::-;20659:17;;20745;;;;20702:14;;;;20522:1;20513:11;20478:298;;;-1:-1:-1;;20860:12:8;;;;20797:5;-1:-1:-1;;20825:15:8;;;;20170:1;20161:11;20128:754;;;-1:-1:-1;20898:4:8;;19732:1176;-1:-1:-1;;;;;;;;19732:1176:8:o;20913:2490::-;-1:-1:-1;;;;;21372:15:8;;;21354:34;;21275:4;;21304:3;;21407:2;21418:53;21452:18;;;21444:6;21418:53;:::i;:::-;21490:2;21528;21523;21512:9;21508:18;21501:30;21554:45;21595:2;21584:9;21580:18;21572:6;21554:45;:::i;:::-;21618:2;21668;21660:6;21656:15;21651:2;21640:9;21636:18;21629:43;21691:3;21681:13;;21742:9;21734:6;21730:22;21725:2;21714:9;21710:18;21703:50;21773:6;21808;21802:13;21839:6;21831;21824:22;21874:2;21866:6;21862:15;21855:22;;21933:2;21923:6;21920:1;21916:14;21908:6;21904:27;21900:36;21971:2;21963:6;21959:15;21992:1;22002:1372;22016:6;22013:1;22010:13;22002:1372;;;22106:2;22102:7;22093:6;22085;22081:19;22077:33;22072:3;22065:46;22140:6;22134:13;22186:2;22178:6;22174:15;22202:50;22245:6;22240:2;22234:9;22202:50;:::i;:::-;22291:11;;;22285:18;22323:15;;;22316:27;;;22404:19;;22436:24;;;;22544:1;22540:16;;;22528:29;;22524:38;;;22591:21;;;;22482:15;;;;22636:1;22650:297;22666:8;22661:3;22658:17;22650:297;;;22772:3;22768:8;22759:6;22751;22747:19;22743:34;22736:5;22729:49;22805:42;22840:6;22829:8;22823:15;22805:42;:::i;:::-;22795:52;-1:-1:-1;22876:17:8;;;;22919:14;;;;22694:1;22685:11;22650:297;;;22654:3;;;;22996:2;22992;22988:11;22982:18;23049:6;23041;23037:19;23032:2;23024:6;23020:15;23013:44;23084:67;23144:6;23128:14;23084:67;:::i;:::-;23192:11;;;23186:18;3418:13;;3411:21;23249:15;;;3399:34;23186:18;23070:81;-1:-1:-1;23217:48:8;;-1:-1:-1;3348:91:8;23217:48;23352:12;;;;23288:6;-1:-1:-1;;23317:15:8;;;;22038:1;22031:9;22002:1372;;;22006:3;;23391:6;23383:14;;;;;;;;;;;20913:2490;;;;;;;;:::o;23408:245::-;23475:6;23528:2;23516:9;23507:7;23503:23;23499:32;23496:52;;;23544:1;23541;23534:12;23496:52;23576:9;23570:16;23595:28;23617:5;23595:28;:::i;24368:291::-;24545:2;24534:9;24527:21;24508:4;24565:45;24606:2;24595:9;24591:18;24583:6;24565:45;:::i;:::-;24557:53;;24646:6;24641:2;24630:9;24626:18;24619:34;24368:291;;;;;:::o;24664:125::-;24729:9;;;24750:10;;;24747:36;;;24763:18;;:::i;24794:127::-;24855:10;24850:3;24846:20;24843:1;24836:31;24886:4;24883:1;24876:15;24910:4;24907:1;24900:15;24926:842;25054:3;25083:1;25116:6;25110:13;25146:36;25172:9;25146:36;:::i;:::-;25201:1;25218:18;;;25245:133;;;;25392:1;25387:356;;;;25211:532;;25245:133;-1:-1:-1;;25278:24:8;;25266:37;;25351:14;;25344:22;25332:35;;25323:45;;;-1:-1:-1;25245:133:8;;25387:356;25418:6;25415:1;25408:17;25448:4;25493:2;25490:1;25480:16;25518:1;25532:165;25546:6;25543:1;25540:13;25532:165;;;25624:14;;25611:11;;;25604:35;25667:16;;;;25561:10;;25532:165;;;25536:3;;;25726:6;25721:3;25717:16;25710:23;;25211:532;-1:-1:-1;25759:3:8;;24926:842;-1:-1:-1;;;;;;24926:842:8:o;26065:135::-;26104:3;26125:17;;;26122:43;;26145:18;;:::i;:::-;-1:-1:-1;26192:1:8;26181:13;;26065:135::o;26205:1435::-;26324:3;26318:4;26315:13;26312:26;;26331:5;;26205:1435::o;26312:26::-;26361:37;26393:3;26387:10;26361:37;:::i;:::-;-1:-1:-1;;;;;26413:6:8;26410:30;26407:56;;;26443:18;;:::i;:::-;26472:97;26562:6;26522:38;26554:4;26548:11;26522:38;:::i;26472:97::-;26595:1;26623:2;26615:6;26612:14;26640:1;26635:748;;;;27427:1;27444:6;27441:89;;;-1:-1:-1;27496:19:8;;;27490:26;27441:89;-1:-1:-1;;17921:1:8;17917:11;;;17913:24;17909:29;17899:40;17945:1;17941:11;;;17896:57;27543:81;;26605:1029;;26635:748;17190:1;17183:14;;;17227:4;17214:18;;-1:-1:-1;;26671:20:8;;;17190:1;17183:14;;;17227:4;17214:18;;26835:9;26857:251;26871:7;26868:1;26865:14;26857:251;;;26953:21;;;26947:28;26932:44;;27003:1;27076:18;;;;27031:15;;;;26894:4;26887:12;26857:251;;;26861:3;27136:6;27127:7;27124:19;27121:203;;;27197:21;;;27191:28;-1:-1:-1;;27282:1:8;27278:14;;;27294:3;27274:24;27270:37;27266:42;27251:58;27236:74;;27121:203;;;;27370:1;27361:6;27358:1;27354:14;27350:22;27344:4;27337:36;26605:1029;;;;26205:1435;;:::o;27645:127::-;27706:10;27701:3;27697:20;27694:1;27687:31;27737:4;27734:1;27727:15;27761:4;27758:1;27751:15;28339:492;28514:3;28552:6;28546:13;28568:66;28627:6;28622:3;28615:4;28607:6;28603:17;28568:66;:::i;:::-;28697:13;;28656:16;;;;28719:70;28697:13;28656:16;28766:4;28754:17;;28719:70;:::i;:::-;28805:20;;28339:492;-1:-1:-1;;;;28339:492:8:o","linkReferences":{}},"methodIdentifiers":{"assign(string,address,uint256)":"4534ba17","bridge_address()":"1255c189","burn(string,uint256)":"b48272cc","getAllAssetsIDs()":"5137b8a7","getToken(string)":"c1733f68","lock(string,uint256)":"e1efb596","mint(string,uint256)":"056b01ce","owner()":"8da5cb5b","renounceOwnership()":"715018a6","tokens(string)":"04c2320b","tokensInteractions(string,uint8)":"ea8f547f","transferOwnership(address)":"f2fde38b","unlock(string,uint256)":"d9cf884c","unwrap(string)":"a1bc17c5","wrap(address,uint8,string,address)":"72d4c33b","wrap(address,uint8,string,address,(uint8,string[],uint8[][],bool)[])":"623662ad"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge_address\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InsuficientAmountLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenAlreadyWrapped\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotLocked\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"TokenNotUnlocked\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Assign\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"value\",\"type\":\"bytes[]\"}],\"name\":\"Changed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"Unwrap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Wrap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"receiver_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"assign\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssetsIDs\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"getToken\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"enum InteractionType\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"tokensInteractions\",\"outputs\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enum InteractionType\",\"name\":\"interactionType\",\"type\":\"uint8\"},{\"internalType\":\"string[]\",\"name\":\"functionsSignature\",\"type\":\"string[]\"},{\"internalType\":\"enum VarType[][]\",\"name\":\"variables\",\"type\":\"uint8[][]\"},{\"internalType\":\"bool\",\"name\":\"available\",\"type\":\"bool\"}],\"internalType\":\"struct InteractionSignature[]\",\"name\":\"interactions\",\"type\":\"tuple[]\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enum TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"tokenId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"wrapSuccess\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/solidity/satp-wrapper.sol\":\"SATPWrapperContract\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":hardhat/=node_modules/hardhat/\",\":openzeppelin-solidity/=node_modules/openzeppelin-solidity/\"]},\"sources\":{\"node_modules/@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"node_modules/@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"node_modules/@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453\",\"dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i\"]},\"node_modules/@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875\",\"dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L\"]},\"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc\",\"dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT\"]},\"src/solidity/ITraceableContract.sol\":{\"keccak256\":\"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612\",\"license\":\"UNKNOWN\",\"urls\":[\"bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1\",\"dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4\"]},\"src/solidity/satp-wrapper.sol\":{\"keccak256\":\"0x1cbbf869683c56c20ab8df3aa5572418d4deba665a690b577362edbbd0523ebe\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://4e58d5c35a6d3cb82bddfb6aec2d4e86d3ae3ed84f723b8e81b3c34e3b049129\",\"dweb:/ipfs/QmQn1ujJjeBPffG8AAxfuBFbTWhquV47RPjmq4iGQWBMgf\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.20+commit.a1b79de6"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_bridge_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"type":"error","name":"InsuficientAmountLocked"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"type":"error","name":"OwnableInvalidOwner"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"type":"error","name":"OwnableUnauthorizedAccount"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenAlreadyWrapped"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotAvailable"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotLocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"type":"error","name":"TokenNotUnlocked"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true},{"internalType":"address","name":"receiver_account","type":"address","indexed":false},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Assign","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Burn","anonymous":false},{"inputs":[{"internalType":"string","name":"id","type":"string","indexed":true},{"internalType":"bytes[]","name":"value","type":"bytes[]","indexed":false}],"type":"event","name":"Changed","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Lock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Mint","anonymous":false},{"inputs":[{"internalType":"address","name":"previousOwner","type":"address","indexed":true},{"internalType":"address","name":"newOwner","type":"address","indexed":true}],"type":"event","name":"OwnershipTransferred","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true},{"internalType":"uint256","name":"amount","type":"uint256","indexed":false}],"type":"event","name":"Unlock","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true}],"type":"event","name":"Unwrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string","indexed":true},{"internalType":"address","name":"contractAddress","type":"address","indexed":false},{"internalType":"enum TokenType","name":"tokenType","type":"uint8","indexed":false},{"internalType":"address","name":"owner","type":"address","indexed":false}],"type":"event","name":"Wrap","anonymous":false},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"receiver_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"assign","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"bridge_address","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"getAllAssetsIDs","outputs":[{"internalType":"string[]","name":"","type":"string[]"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"view","type":"function","name":"getToken","outputs":[{"internalType":"struct Token","name":"token","type":"tuple","components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"lock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}]},{"inputs":[],"stateMutability":"nonpayable","type":"function","name":"renounceOwnership"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function","name":"tokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}]},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"enum InteractionType","name":"","type":"uint8"}],"stateMutability":"view","type":"function","name":"tokensInteractions","outputs":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"bool","name":"available","type":"bool"}]},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"transferOwnership"},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"unlock","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"string","name":"tokenId","type":"string"}],"stateMutability":"nonpayable","type":"function","name":"unwrap","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"struct InteractionSignature[]","name":"interactions","type":"tuple[]","components":[{"internalType":"enum InteractionType","name":"interactionType","type":"uint8"},{"internalType":"string[]","name":"functionsSignature","type":"string[]"},{"internalType":"enum VarType[][]","name":"variables","type":"uint8[][]"},{"internalType":"bool","name":"available","type":"bool"}]}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"enum TokenType","name":"tokenType","type":"uint8"},{"internalType":"string","name":"tokenId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"function","name":"wrap","outputs":[{"internalType":"bool","name":"wrapSuccess","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","hardhat/=node_modules/hardhat/","openzeppelin-solidity/=node_modules/openzeppelin-solidity/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"src/solidity/satp-wrapper.sol":"SATPWrapperContract"},"evmVersion":"paris","libraries":{}},"sources":{"node_modules/@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb","urls":["bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6","dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2","urls":["bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12","dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792","urls":["bzz-raw://6e52e0a7765c943ef14e5bcf11e46e6139fa044be564881378349236bf2e3453","dweb:/ipfs/QmZEeeXoFPW47amyP35gfzomF9DixqqTEPwzBakv6cZw6i"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d","urls":["bzz-raw://4ece9f0b9c8daca08c76b6b5405a6446b6f73b3a15fab7ff56e296cbd4a2c875","dweb:/ipfs/QmQyRpyPRL5SQuAgj6SHmbir3foX65FJjbVTTQrA2EFg6L"],"license":"MIT"},"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol":{"keccak256":"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72","urls":["bzz-raw://7d533a1c97cd43a57cd9c465f7ee8dd0e39ae93a8fb8ff8e5303a356b081cdcc","dweb:/ipfs/QmVBEei6aTnvYNZp2CHYVNKyZS4q1KkjANfY39WVXZXVoT"],"license":"MIT"},"src/solidity/ITraceableContract.sol":{"keccak256":"0x95d8bedf23010b6a40e6a8f5d55a7d5f67866619de9efcab7fa49eb3d2488612","urls":["bzz-raw://003806e9e19c67b79cf4ec156b31b8515f5a27dad6d73a9d8c3878b1373935c1","dweb:/ipfs/QmYPFBS2C6a1RwLTSEYhNVNUzxkDu4oh7eSs75gAcZ8KA4"],"license":"UNKNOWN"},"src/solidity/satp-wrapper.sol":{"keccak256":"0x1cbbf869683c56c20ab8df3aa5572418d4deba665a690b577362edbbd0523ebe","urls":["bzz-raw://4e58d5c35a6d3cb82bddfb6aec2d4e86d3ae3ed84f723b8e81b3c34e3b049129","dweb:/ipfs/QmQn1ujJjeBPffG8AAxfuBFbTWhquV47RPjmq4iGQWBMgf"],"license":"GPL-3.0"}},"version":1},"id":7} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol index 83c8ce1855..7ae1853b9f 100644 --- a/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol +++ b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol @@ -48,13 +48,13 @@ contract SATPWrapperContract is Ownable, ITraceableContract{ address public bridge_address; - event Wrap(address contractAddress, TokenType tokenType, string tokenId, address owner); - event Unwrap(string tokenId); - event Lock(string tokenId, uint256 amount); - event Unlock(string tokenId, uint256 amount); - event Mint(string tokenId, uint256 amount); - event Burn(string tokenId, uint256 amount); - event Assign(string tokenId, address receiver_account, uint256 amount); + event Wrap(string indexed tokenId, address contractAddress, TokenType tokenType, address owner); + event Unwrap(string indexed tokenId); + event Lock(string indexed tokenId, uint256 amount); + event Unlock(string indexed tokenId, uint256 amount); + event Mint(string indexed tokenId, uint256 amount); + event Burn(string indexed tokenId, uint256 amount); + event Assign(string indexed tokenId, address receiver_account, uint256 amount); constructor(address _bridge_address) Ownable(_bridge_address) { bridge_address = address(_bridge_address); @@ -75,7 +75,7 @@ contract SATPWrapperContract is Ownable, ITraceableContract{ ids.push(tokenId); - emit Wrap(contractAddress, tokenType, tokenId, owner); + emit Wrap(tokenId, contractAddress, tokenType, owner); return true; } diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/52693db7419ee2d467ee85def7d551fc.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/52693db7419ee2d467ee85def7d551fc.json new file mode 100644 index 0000000000..2682c37d92 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/52693db7419ee2d467ee85def7d551fc.json @@ -0,0 +1 @@ +{"id":"52693db7419ee2d467ee85def7d551fc","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/7cf317e1563df5d9a544376c9450d781.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/7cf317e1563df5d9a544376c9450d781.json new file mode 100644 index 0000000000..a480f4f743 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/generated/build-info/7cf317e1563df5d9a544376c9450d781.json @@ -0,0 +1 @@ +{"id":"7cf317e1563df5d9a544376c9450d781","source_id_to_path":{"0":"node_modules/@openzeppelin/contracts/access/AccessControl.sol","1":"node_modules/@openzeppelin/contracts/access/IAccessControl.sol","2":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","3":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","4":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","5":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","6":"node_modules/@openzeppelin/contracts/utils/Context.sol","7":"node_modules/@openzeppelin/contracts/utils/Strings.sol","8":"node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol","9":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","10":"node_modules/@openzeppelin/contracts/utils/math/Math.sol","11":"node_modules/@openzeppelin/contracts/utils/math/SignedMath.sol","12":"src/test/solidity/contracts/ITraceableContract.sol","13":"src/test/solidity/contracts/satp-contract-interface.sol","14":"src/test/solidity/contracts/satp-erc20.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts index 3e4adb859a..054b729544 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts @@ -23,11 +23,12 @@ import { import Web3 from "web3"; import { Account } from "web3-core"; import { BesuBridge } from "../../../../main/typescript/core/stage-services/satp-bridge/besu-bridge"; -import { BesuAsset } from "../../../../main/typescript/core/stage-services/satp-bridge/types/besu-asset"; +import { EvmAsset } from "../../../../main/typescript/core/stage-services/satp-bridge/types/evm-asset"; import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; import { BesuConfig } from "../../../../main/typescript/types/blockchain-interaction"; import SATPInteraction from "../../../solidity/satp-erc20-interact.json"; +import { ClaimFormat } from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; const logLevel: LogLevelDesc = "DEBUG"; @@ -223,6 +224,7 @@ beforeAll(async () => { options: besuOptions, bungeeOptions: pluginBungeeHermesOptions, gas: 9999999999999, + claimFormat: ClaimFormat.DEFAULT, }; const giveRoleRes = await testing_connector.invokeContract({ @@ -272,7 +274,7 @@ describe("Besu Bridge Test", () => { contractName: erc20TokenContract, contractAddress: assetContractAddress, ontology: JSON.stringify(SATPInteraction), - } as BesuAsset; + } as EvmAsset; const response = await besuBridge.wrapAsset(asset); expect(response).toBeDefined(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/ethereum-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/ethereum-bridge.test.ts new file mode 100644 index 0000000000..856c79735f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/ethereum-bridge.test.ts @@ -0,0 +1,633 @@ +import { + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, +} from "@hyperledger/cactus-common"; +import { + pruneDockerAllIfGithubAction, + Containers, +} from "@hyperledger/cactus-test-tooling"; +import { v4 as uuidv4 } from "uuid"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import SATPContract from "../../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import Web3 from "web3"; +import { EvmAsset } from "../../../../main/typescript/core/stage-services/satp-bridge/types/evm-asset"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { EthereumConfig } from "../../../../main/typescript/types/blockchain-interaction"; +import SATPInteraction from "../../../solidity/satp-erc20-interact.json"; +import { ClaimFormat } from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { SupportedChain } from "../../../../main/typescript/core/types"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + EthContractInvocationType, + IPluginLedgerConnectorEthereumOptions, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { EthereumBridge } from "../../../../main/typescript/core/stage-services/satp-bridge/ethereum-bridge"; + +const logLevel: LogLevelDesc = "DEBUG"; + +let ethereumLedger: GethTestLedger; +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +let web3: Web3; +let testing_connector: PluginLedgerConnectorEthereum; +let bridgeEthAccount: string; +let assigneeEthAccount: string; +const ETH_ASSET_ID = uuidv4(); + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; + +let ethereumBridge: EthereumBridge; +let ethereumConfig: EthereumConfig; +let ethereumOptions: IPluginLedgerConnectorEthereumOptions; + +let assetContractAddress: string; +let wrapperContractAddress: string; +const SATPContract1 = { + contractName: "SATPContract", + abi: SATPContract.abi, + bytecode: SATPContract.bytecode.object, +}; +const SATPWrapperContract1 = { + contractName: "SATPWrapperContract", + abi: SATPWrapperContract.abi, + bytecode: SATPWrapperContract.bytecode.object, +}; +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; + const containerImageVersion = "2023-07-27-2a8c48ed6"; + ethereumLedger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ethereumLedger.start(); + + //setup ethereum ledger + rpcApiHttpHost = await ethereumLedger.getRpcApiHttpHost(); + web3 = new Web3(rpcApiHttpHost); + + bridgeEthAccount = await ethereumLedger.newEthPersonalAccount(); + assigneeEthAccount = await ethereumLedger.newEthPersonalAccount(); + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = "test"; + const keychainEntryKey = bridgeEthAccount; + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract1)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract1), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + ethereumOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorEthereum(ethereumOptions); + pluginRegistry.add(testing_connector); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + constructorArgs: [WHALE_ACCOUNT_ADDRESS, ETH_ASSET_ID], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + /*const price = await testing_connector.invokeRawWeb3EthMethod({ + methodName: "getGasPrice", + });*/ + const deployOutWrapperContract = await testing_connector.deployContract({ + contract: { + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + }, + constructorArgs: [bridgeEthAccount], + web3SigningCredential: { + ethAccount: bridgeEthAccount, + secret: "test", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + /*gasConfig: { + gas: "5000000", + gasPrice: price.toString(), + //gasLimit: block.gasLimit.toString(), + //maxPriorityFeePerGas: block.baseFeePerGas.toString(), + //maxFeePerGas: block.baseFeePerGas.toString(), + },*/ + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeHermesOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + ethereumConfig = { + network: SupportedChain.EVM, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount, + secret: "test", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: ethereumOptions, + bungeeOptions: pluginBungeeHermesOptions, + gas: 5000000, + claimFormat: ClaimFormat.BUNGEE, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [bridgeEthAccount], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } +}); + +afterAll(async () => { + await ethereumLedger.stop(); + await ethereumLedger.destroy(); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +describe("Ethereum Bridge Test", () => { + it("Should Initialize the bridge", async () => { + ethereumBridge = new EthereumBridge(ethereumConfig); + expect(ethereumBridge).toBeDefined(); + }); + it("Should Wrap a token", async () => { + const asset = { + tokenId: ETH_ASSET_ID, + tokenType: TokenType.NONSTANDARD, + owner: WHALE_ACCOUNT_ADDRESS, + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + ontology: JSON.stringify(SATPInteraction), + } as EvmAsset; + + const response = await ethereumBridge.wrapAsset(asset); + //const interactions = ethereumBridge.interactionList(asset.ontology); + /*await testing_connector.invokeRawWeb3EthContract({ + abi: SATPWrapperContract1.abi, + address: wrapperContractAddress, + invocationType: "send", + contractMethod: "wrap", + contractMethodArgs: [ + asset.contractAddress, + asset.tokenType, + asset.tokenId, + asset.owner, + interactions, + ], + });*/ + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await ethereumBridge.getAssets(); + expect(response2).toBeDefined(); + expect(response2.length).toBe(1); + expect(response2[0]).toBe(ETH_ASSET_ID); + + const response3 = await ethereumBridge.getAsset(ETH_ASSET_ID); + expect(response3).toBeDefined(); + expect(response3.tokenId).toBe(ETH_ASSET_ID); + expect(response3.tokenType.toString().replace("o", "")).toBe( + TokenType.NONSTANDARD.toString(), + ); + expect(response3.owner.toLowerCase()).toBe(WHALE_ACCOUNT_ADDRESS); + expect(response3.contractAddress.toLowerCase()).toBe(assetContractAddress); + }); + + it("Should Lock a token", async () => { + const responseMint = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [WHALE_ACCOUNT_ADDRESS, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to WHALE_ACCOUNT_ADDRESS"); + + const responseApprove = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + + const response = await ethereumBridge.lockAsset(ETH_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await ethereumBridge.getAsset(ETH_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(ETH_ASSET_ID); + expect(response2.tokenType.toString().replace("o", "")).toBe( + TokenType.NONSTANDARD.toString(), + ); + expect(response2.owner.toLowerCase()).toBe(WHALE_ACCOUNT_ADDRESS); + expect(response2.contractAddress.toLowerCase()).toBe(assetContractAddress); + expect(response2.amount.toString()).toBe("100"); + log.info("Locked 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput.toString()).toBe("100"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [WHALE_ACCOUNT_ADDRESS], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput.toString()).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + }); + + it("Should Unlock a token", async () => { + const response = await ethereumBridge.unlockAsset(ETH_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await ethereumBridge.getAsset(ETH_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(ETH_ASSET_ID); + expect(response2.tokenType.toString().replace("o", "")).toBe( + TokenType.NONSTANDARD.toString(), + ); + expect(response2.owner.toLowerCase()).toBe(WHALE_ACCOUNT_ADDRESS); + expect(response2.contractAddress.toLowerCase()).toBe(assetContractAddress); + expect(response2.amount.toString()).toBe("0"); + log.info("Unlocked 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput.toString()).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [WHALE_ACCOUNT_ADDRESS], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput.toString()).toBe("100"); + log.info("Amount was transfer correctly from the Wrapper account"); + }); + + it("Should Burn a token", async () => { + const responseApprove = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + + const response = await ethereumBridge.lockAsset(ETH_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Locked 100 tokens successfully"); + + const response2 = await ethereumBridge.burnAsset(ETH_ASSET_ID, 100); + expect(response2).toBeDefined(); + expect(response2.transactionId).toBeDefined(); + expect(response2.transactionReceipt).toBeDefined(); + log.info("Burned 100 tokens successfully"); + + const response3 = await ethereumBridge.getAsset(ETH_ASSET_ID); + expect(response3).toBeDefined(); + expect(response3.tokenId).toBe(ETH_ASSET_ID); + expect(response3.tokenType.toString().replace("o", "")).toBe( + TokenType.NONSTANDARD.toString(), + ); + expect(response3.owner.toLowerCase()).toBe(WHALE_ACCOUNT_ADDRESS); + expect(response3.contractAddress.toLowerCase()).toBe(assetContractAddress); + expect(response3.amount.toString()).toBe("0"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput.toString()).toBe("0"); + log.info("Amount was burned correctly to the Wrapper account"); + }); + + it("Should Mint a token", async () => { + const response = await ethereumBridge.mintAsset(ETH_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Minted 100 tokens successfully"); + + const response2 = await ethereumBridge.getAsset(ETH_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(ETH_ASSET_ID); + expect(response2.tokenType.toString().replace("o", "")).toBe( + TokenType.NONSTANDARD.toString(), + ); + expect(response2.owner.toLowerCase()).toBe(WHALE_ACCOUNT_ADDRESS); + expect(response2.contractAddress.toLowerCase()).toBe(assetContractAddress); + expect(response2.amount.toString()).toBe("100"); + log.info("Minted 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput.toString()).toBe("100"); + log.info("Amount was minted correctly to the Wrapper account"); + }); + + it("Should Assign a token", async () => { + const response = await ethereumBridge.assignAsset( + ETH_ASSET_ID, + assigneeEthAccount, + 100, + ); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Assigned 100 tokens successfully"); + + const response2 = await ethereumBridge.getAsset(ETH_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(ETH_ASSET_ID); + expect(response2.tokenType.toString().replace("o", "")).toBe( + TokenType.NONSTANDARD.toString(), + ); + expect(response2.contractAddress.toLowerCase()).toBe(assetContractAddress); + expect(response2.amount.toString()).toBe("0"); + log.info("Assigned 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput.toString()).toBe("0"); + log.info("Amount was assigned correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [assigneeEthAccount], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput.toString()).toBe("100"); + log.info("Amount was assigned correctly to the Assignee account"); + }); + + it("Should Unwrap a token", async () => { + const response = await ethereumBridge.unwrapAsset(ETH_ASSET_ID); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await ethereumBridge.getAssets(); + expect(response2).toBeDefined(); + expect(response2.length).toBe(0); + log.info("Unwrapped 100 tokens successfully"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts index d9c6f82b23..1565c529cb 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts @@ -46,6 +46,7 @@ import { FabricConfig } from "../../../../main/typescript/types/blockchain-inter import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; import SATPInteraction from "../../../../test/typescript/fabric/satp-erc20-interact.json"; +import { ClaimFormat } from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; let fabricServer: Server; let fabricSigningCredential: FabricSigningCredential; @@ -657,6 +658,7 @@ beforeAll(async () => { contractName: satpWrapperContractName, options: pluginOptionsFabricBridge, bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, } as FabricConfig; // networkDetails = { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-with-bungee.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-with-bungee.test.ts new file mode 100644 index 0000000000..e15b9652c3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-with-bungee.test.ts @@ -0,0 +1,1086 @@ +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import { v4 as uuidv4 } from "uuid"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; + +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + BesuConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { Account } from "web3-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { + SATPGatewayConfig, + SATPGateway, + PluginFactorySATPGateway, + TransactRequest, + Asset, +} from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let fabricServer: Server; + +let besuLedger: BesuTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeBesuOptions: IPluginBungeeHermesOptions; + +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel: "INFO", + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.BUNGEE, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup besu ledger + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + pluginRegistry.add(testing_connector); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeBesuOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + network: SupportedChain.BESU, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + claimFormat: ClaimFormat.BUNGEE, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); +describe("SATPGateway sending a token from Besu to Fabric", () => { + it("should realize a transfer", async () => { + //setup satp gateway + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + const factory = new PluginFactorySATPGateway(factoryOptions); + + const gatewayIdentity = { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + } as GatewayIdentity; + + const options: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity, + counterPartyGateways: [], //only knows itself + bridgesConfig: [besuConfig, fabricConfig], + }; + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + // default servers + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.gatewayClientPort).toBe(3011); + expect(identity.address).toBe("http://localhost"); + await gateway.startup(); + + const dispatcher = gateway.getBLODispatcher(); + + expect(dispatcher).toBeTruthy(); + const sourceAsset: Asset = { + owner: firstHighNetWorthAccount, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const receiverAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.BESU, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + originatorPubkey: assigneeEthAccount.address, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + receiverAsset, + }; + + const res = await dispatcher?.Transact(req); + log.info(res?.statusResponse); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + log.info("Amount was transfer correctly to the Owner account"); + log.info(res?.statusResponse); + await gateway.shutdown(); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts index 1f3e1c71ef..f78d58b6bf 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway.test.ts @@ -74,6 +74,7 @@ import { } from "@hyperledger/cactus-core-api"; import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; const logLevel: LogLevelDesc = "DEBUG"; const log = LoggerProvider.getOrCreate({ @@ -729,6 +730,7 @@ beforeAll(async () => { contractName: satpWrapperContractName, options: pluginOptionsFabricBridge, bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, } as FabricConfig; // networkDetails = { @@ -886,6 +888,7 @@ beforeAll(async () => { options: besuOptions, bungeeOptions: pluginBungeeBesuOptions, gas: 999999999999999, + claimFormat: ClaimFormat.DEFAULT, }; const giveRoleRes = await testing_connector.invokeContract({ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts index 45c3f2debb..38fe32f94d 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-openapi.test.ts @@ -76,6 +76,7 @@ import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-in import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; import { createClient } from "../test-utils"; import { bufArray2HexStr } from "../../../main/typescript/gateway-utils"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; const logLevel: LogLevelDesc = "DEBUG"; const log = LoggerProvider.getOrCreate({ @@ -729,6 +730,7 @@ beforeAll(async () => { contractName: satpWrapperContractName, options: pluginOptionsFabricBridge, bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, } as FabricConfig; // networkDetails = { @@ -886,6 +888,7 @@ beforeAll(async () => { options: besuOptions, bungeeOptions: pluginBungeeBesuOptions, gas: 999999999999999, + claimFormat: ClaimFormat.DEFAULT, }; const giveRoleRes = await testing_connector.invokeContract({ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts index b9f492cacf..d411a6e0dc 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways.test.ts @@ -75,6 +75,7 @@ import { import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; import { bufArray2HexStr } from "../../../main/typescript/gateway-utils"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; const logLevel: LogLevelDesc = "DEBUG"; const log = LoggerProvider.getOrCreate({ @@ -728,6 +729,7 @@ beforeAll(async () => { contractName: satpWrapperContractName, options: pluginOptionsFabricBridge, bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, } as FabricConfig; // networkDetails = { @@ -885,6 +887,7 @@ beforeAll(async () => { options: besuOptions, bungeeOptions: pluginBungeeBesuOptions, gas: 999999999999999, + claimFormat: ClaimFormat.DEFAULT, }; const giveRoleRes = await testing_connector.invokeContract({ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts new file mode 100644 index 0000000000..de8975ab02 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts @@ -0,0 +1,1056 @@ +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import { v4 as uuidv4 } from "uuid"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + EthereumConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { + SATPGatewayConfig, + SATPGateway, + PluginFactorySATPGateway, + TransactRequest, + Asset, +} from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { + EthContractInvocationType, + IPluginLedgerConnectorEthereumOptions, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let fabricServer: Server; + +let ethereumLedger: GethTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let testing_connector: PluginLedgerConnectorEthereum; +let bridgeEthAccount: string; +const ETH_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeEthOptions: IPluginBungeeHermesOptions; + +let ethereumConfig: EthereumConfig; +let ethereumOptions: IPluginLedgerConnectorEthereumOptions; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; +let fabricUser: X509Identity; + +let apiClient: FabricApi; +const SATPContract1 = { + contractName: "SATPContract", + abi: SATPContract.abi, + bytecode: SATPContract.bytecode.object, +}; +const SATPWrapperContract1 = { + contractName: "SATPWrapperContract", + abi: SATPWrapperContract.abi, + bytecode: SATPWrapperContract.bytecode.object, +}; + +afterAll(async () => { + await ethereumLedger.stop(); + await ethereumLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; + const containerImageVersion = "2023-07-27-2a8c48ed6"; + ethereumLedger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ethereumLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel: "INFO", + }); + log.info("Both Ledgers started successfully"); + } + { + //setup ethereum ledger + rpcApiHttpHost = await ethereumLedger.getRpcApiHttpHost(); + + bridgeEthAccount = await ethereumLedger.newEthPersonalAccount(); + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = "test"; + const keychainEntryKey = bridgeEthAccount; + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract1)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract1), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + ethereumOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorEthereum(ethereumOptions); + pluginRegistry.add(testing_connector); + + const deployOutSATPContract = await testing_connector.deployContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + constructorArgs: [WHALE_ACCOUNT_ADDRESS, ETH_ASSET_ID], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + const deployOutWrapperContract = await testing_connector.deployContract({ + contract: { + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + }, + constructorArgs: [bridgeEthAccount], + web3SigningCredential: { + ethAccount: bridgeEthAccount, + secret: "test", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeEthOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + ethereumConfig = { + network: SupportedChain.EVM, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount, + secret: "test", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: ethereumOptions, + bungeeOptions: pluginBungeeEthOptions, + gas: 5000000, + claimFormat: ClaimFormat.BUNGEE, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + + const responseMint = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [WHALE_ACCOUNT_ADDRESS, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + } + { + await fabricLedger.start(); + + // setup fabric ledger + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.BUNGEE, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } +}); +describe("SATPGateway sending a token from Besu to Fabric", () => { + it("should realize a transfer", async () => { + //setup satp gateway + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + const factory = new PluginFactorySATPGateway(factoryOptions); + + const gatewayIdentity = { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.EVM], + proofID: "mockProofID10", + address: "http://localhost" as Address, + } as GatewayIdentity; + + const options: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity, + counterPartyGateways: [], //only knows itself + bridgesConfig: [ethereumConfig, fabricConfig], + }; + const gateway = await factory.create(options); + expect(gateway).toBeInstanceOf(SATPGateway); + + const identity = gateway.Identity; + // default servers + expect(identity.gatewayServerPort).toBe(3010); + expect(identity.gatewayClientPort).toBe(3011); + expect(identity.address).toBe("http://localhost"); + await gateway.startup(); + + const dispatcher = gateway.getBLODispatcher(); + + expect(dispatcher).toBeTruthy(); + const sourceAsset: Asset = { + owner: WHALE_ACCOUNT_ADDRESS, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const receiverAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.EVM, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + originatorPubkey: WHALE_ACCOUNT_ADDRESS, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + receiverAsset, + }; + + const res = await dispatcher?.Transact(req); + log.info(res?.statusResponse); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [WHALE_ACCOUNT_ADDRESS], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe(BigInt(0)); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe(BigInt(0)); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + log.info("Amount was transfer correctly to the Owner account"); + log.info(res?.statusResponse); + await gateway.shutdown(); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts index 40fa1fc8a8..26f9df11a7 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/services.test.ts @@ -23,8 +23,10 @@ import { Asset, AssignmentAssertionClaim, BurnAssertionClaim, + ClaimFormat, CredentialProfile, LockAssertionClaim, + LockAssertionClaimFormat, LockType, MessageType, MintAssertionClaim, @@ -599,8 +601,9 @@ describe("SATP Services Testing", () => { new LockAssertionClaim(); mockSession.getClientSessionData().lockAssertionClaimFormat = - new LockAssertionClaim(); - + new LockAssertionClaimFormat(); + mockSession.getClientSessionData().lockAssertionClaimFormat!.format = + ClaimFormat.DEFAULT; mockSession.getClientSessionData().lockExpirationTime = BigInt(1000); lockAssertionRequestMessage = diff --git a/yarn.lock b/yarn.lock index b153fd981c..d94fd29224 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8006,6 +8006,15 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/rlp@npm:^5.0.2": + version: 5.0.2 + resolution: "@ethereumjs/rlp@npm:5.0.2" + bin: + rlp: bin/rlp.cjs + checksum: 10/2af80d98faf7f64dfb6d739c2df7da7350ff5ad52426c3219897e843ee441215db0ffa346873200a6be6d11142edb9536e66acd62436b5005fa935baaf7eb6bd + languageName: node + linkType: hard + "@ethereumjs/tx@npm:3.3.2": version: 3.3.2 resolution: "@ethereumjs/tx@npm:3.3.2" @@ -10194,6 +10203,7 @@ __metadata: http-errors-enhanced-cjs: "npm:2.0.1" key-encoder: "npm:2.0.3" merkletreejs: "npm:0.3.11" + safe-stable-stringify: "npm:2.5.0" socket.io: "npm:4.6.2" typescript-optional: "npm:2.0.1" uuid: "npm:10.0.0" @@ -10607,10 +10617,10 @@ __metadata: socket.io-client-fixed-types: "npm:4.5.4" typescript-optional: "npm:2.0.1" uuid: "npm:10.0.0" - web3: "npm:4.4.0" - web3-eth: "npm:4.4.0" + web3: "npm:4.14.0" + web3-eth: "npm:4.10.0" web3-eth-accounts: "npm:4.1.1" - web3-eth-contract: "npm:4.2.0" + web3-eth-contract: "npm:4.7.0" bin: cacti-ethereum-connector-status: dist/lib/scripts/get-ethereum-connector-status.js languageName: unknown @@ -55279,6 +55289,26 @@ __metadata: languageName: node linkType: hard +"web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.5.1, web3-core@npm:^4.6.0, web3-core@npm:^4.7.0": + version: 4.7.0 + resolution: "web3-core@npm:4.7.0" + dependencies: + web3-errors: "npm:^1.3.0" + web3-eth-accounts: "npm:^4.2.1" + web3-eth-iban: "npm:^4.0.7" + web3-providers-http: "npm:^4.2.0" + web3-providers-ipc: "npm:^4.0.7" + web3-providers-ws: "npm:^4.0.8" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + dependenciesMeta: + web3-providers-ipc: + optional: true + checksum: 10/76f740cff838f32e21992a2d263b770256562fe9cad5c7b6b220db9990b09b940ff7eb7261400dab971fc2a00bfb75ab4f89f9b5b67c4e70cac099072c177944 + languageName: node + linkType: hard + "web3-errors@npm:^1.0.2": version: 1.0.2 resolution: "web3-errors@npm:1.0.2" @@ -55333,6 +55363,15 @@ __metadata: languageName: node linkType: hard +"web3-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "web3-errors@npm:1.3.0" + dependencies: + web3-types: "npm:^1.7.0" + checksum: 10/613b01013b697dcaaad0ff9cfac8c4c69557fb0ffbc9efe86ac3eaf5179c6f18687fdcd2e53faf0a2c3ee68409491171968eb2017444cb14ffa74663ff77556f + languageName: node + linkType: hard + "web3-eth-abi@npm:1.10.0": version: 1.10.0 resolution: "web3-eth-abi@npm:1.10.0" @@ -55448,6 +55487,19 @@ __metadata: languageName: node linkType: hard +"web3-eth-abi@npm:^4.2.3, web3-eth-abi@npm:^4.3.0": + version: 4.3.0 + resolution: "web3-eth-abi@npm:4.3.0" + dependencies: + abitype: "npm:0.7.1" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/e490ad7142ae14c2def2b596551b54e83727af76a96ee4854e236cd19477028960eb944af258c42efc4646fc0b685ae4f3b3f2e0c4c75e15bfc346fc05c1ff6e + languageName: node + linkType: hard + "web3-eth-accounts@npm:1.10.0": version: 1.10.0 resolution: "web3-eth-accounts@npm:1.10.0" @@ -55601,6 +55653,21 @@ __metadata: languageName: node linkType: hard +"web3-eth-accounts@npm:^4.2.1": + version: 4.2.1 + resolution: "web3-eth-accounts@npm:4.2.1" + dependencies: + "@ethereumjs/rlp": "npm:^4.0.1" + crc-32: "npm:^1.2.2" + ethereum-cryptography: "npm:^2.0.0" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/a19a2bad97ed9cc7a82af6ce6acba906f3ed8829116bda1dcd72dd4ee7e31d332239f7464cfa89f053dffcef857fc284777474571e68878dbc2377057f9ea329 + languageName: node + linkType: hard + "web3-eth-contract@npm:1.10.0": version: 1.10.0 resolution: "web3-eth-contract@npm:1.10.0" @@ -55696,6 +55763,22 @@ __metadata: languageName: node linkType: hard +"web3-eth-contract@npm:4.7.0, web3-eth-contract@npm:^4.5.0, web3-eth-contract@npm:^4.7.0": + version: 4.7.0 + resolution: "web3-eth-contract@npm:4.7.0" + dependencies: + "@ethereumjs/rlp": "npm:^5.0.2" + web3-core: "npm:^4.5.1" + web3-errors: "npm:^1.3.0" + web3-eth: "npm:^4.8.2" + web3-eth-abi: "npm:^4.2.3" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/1ae62530fdf1389aa896af527c028e3c39ca16e2318e010d07e6b7d421abb8b1c6a6dbe834d3317098a29a6c8ad47f057d17e1c9602dc0060b689c331c3ce440 + languageName: node + linkType: hard + "web3-eth-contract@npm:^4.0.3, web3-eth-contract@npm:^4.0.5": version: 4.0.5 resolution: "web3-eth-contract@npm:4.0.5" @@ -55840,6 +55923,23 @@ __metadata: languageName: node linkType: hard +"web3-eth-ens@npm:^4.4.0": + version: 4.4.0 + resolution: "web3-eth-ens@npm:4.4.0" + dependencies: + "@adraffy/ens-normalize": "npm:^1.8.8" + web3-core: "npm:^4.5.0" + web3-errors: "npm:^1.2.0" + web3-eth: "npm:^4.8.0" + web3-eth-contract: "npm:^4.5.0" + web3-net: "npm:^4.1.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.0" + web3-validator: "npm:^2.0.6" + checksum: 10/25a1535e095d8ffcbc0641041af69e42aa60ba2989477108a5678c42a06135df9134ccc6024c89c216cb3408848e3905ee178d5b12e3bb740e895ee6ee0bd2cf + languageName: node + linkType: hard + "web3-eth-iban@npm:1.10.0": version: 1.10.0 resolution: "web3-eth-iban@npm:1.10.0" @@ -56022,6 +56122,20 @@ __metadata: languageName: node linkType: hard +"web3-eth-personal@npm:^4.1.0": + version: 4.1.0 + resolution: "web3-eth-personal@npm:4.1.0" + dependencies: + web3-core: "npm:^4.6.0" + web3-eth: "npm:^4.9.0" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.8.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/a560b0ef1f28961101c47824aa6fc71722c4e581ef5ffc5b68cf1b7db0fd5804032239f872a167a589b3c0ebe223353b8112b38e247e1f5b5ac48991e12f853c + languageName: node + linkType: hard + "web3-eth@npm:1.10.0": version: 1.10.0 resolution: "web3-eth@npm:1.10.0" @@ -56141,22 +56255,22 @@ __metadata: languageName: node linkType: hard -"web3-eth@npm:4.4.0, web3-eth@npm:^4.4.0": - version: 4.4.0 - resolution: "web3-eth@npm:4.4.0" +"web3-eth@npm:4.10.0, web3-eth@npm:^4.10.0, web3-eth@npm:^4.8.0, web3-eth@npm:^4.8.2, web3-eth@npm:^4.9.0": + version: 4.10.0 + resolution: "web3-eth@npm:4.10.0" dependencies: setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.3.2" - web3-errors: "npm:^1.1.4" - web3-eth-abi: "npm:^4.2.0" - web3-eth-accounts: "npm:^4.1.1" - web3-net: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-rpc-methods: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/1a2708d0ae5158b8acb2a605b7c987a5658ff69e378a373d08c69ef0a43faad8ae4eee1b09b83840259358f6f61511a576ee7079aac309e59260f65574244737 + web3-core: "npm:^4.7.0" + web3-errors: "npm:^1.3.0" + web3-eth-abi: "npm:^4.3.0" + web3-eth-accounts: "npm:^4.2.1" + web3-net: "npm:^4.1.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/9dcbce05e160cde8148f2ad9919c56e0ad242beb05c2a013219a7d7ab697f5ca7e3c55089d27bdff50c28eebc36a9e1ae4b8b40c57432bdf5a200ace46d8cdc8 languageName: node linkType: hard @@ -56179,6 +56293,25 @@ __metadata: languageName: node linkType: hard +"web3-eth@npm:^4.4.0": + version: 4.4.0 + resolution: "web3-eth@npm:4.4.0" + dependencies: + setimmediate: "npm:^1.0.5" + web3-core: "npm:^4.3.2" + web3-errors: "npm:^1.1.4" + web3-eth-abi: "npm:^4.2.0" + web3-eth-accounts: "npm:^4.1.1" + web3-net: "npm:^4.0.7" + web3-providers-ws: "npm:^4.0.7" + web3-rpc-methods: "npm:^1.1.4" + web3-types: "npm:^1.3.1" + web3-utils: "npm:^4.1.1" + web3-validator: "npm:^2.0.4" + checksum: 10/1a2708d0ae5158b8acb2a605b7c987a5658ff69e378a373d08c69ef0a43faad8ae4eee1b09b83840259358f6f61511a576ee7079aac309e59260f65574244737 + languageName: node + linkType: hard + "web3-net@npm:1.10.0": version: 1.10.0 resolution: "web3-net@npm:1.10.0" @@ -56258,6 +56391,18 @@ __metadata: languageName: node linkType: hard +"web3-net@npm:^4.1.0": + version: 4.1.0 + resolution: "web3-net@npm:4.1.0" + dependencies: + web3-core: "npm:^4.4.0" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.6.0" + web3-utils: "npm:^4.3.0" + checksum: 10/2899ed28d9afda9f9faee6424752cb967dabf79128bce25321318e069a41571b9bd9477b480f290fd65f07cd6c0c641def0d72f31a730705112bd14c301f4e5e + languageName: node + linkType: hard + "web3-providers-http@npm:1.10.0": version: 1.10.0 resolution: "web3-providers-http@npm:1.10.0" @@ -56350,6 +56495,18 @@ __metadata: languageName: node linkType: hard +"web3-providers-http@npm:^4.2.0": + version: 4.2.0 + resolution: "web3-providers-http@npm:4.2.0" + dependencies: + cross-fetch: "npm:^4.0.0" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + checksum: 10/812b05d1e0dd8b6c5005bdcfe3c5fbddfe6cdd082bd2654dfe171ad98c3b7ff85b0bab371c70366d2bace2cf45fbf7d2f087b4cb281dbfa12372b902b8138eeb + languageName: node + linkType: hard + "web3-providers-ipc@npm:1.10.0": version: 1.10.0 resolution: "web3-providers-ipc@npm:1.10.0" @@ -56526,6 +56683,20 @@ __metadata: languageName: node linkType: hard +"web3-providers-ws@npm:^4.0.8": + version: 4.0.8 + resolution: "web3-providers-ws@npm:4.0.8" + dependencies: + "@types/ws": "npm:8.5.3" + isomorphic-ws: "npm:^5.0.0" + web3-errors: "npm:^1.2.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + ws: "npm:^8.17.1" + checksum: 10/9b9fa96fa1fc9455fb1b632de50f542d2589710002ea2cb0cd6a5c1ed9f72960d80ce219ac66b038ea6d0a767056fe653aa258a1c084aa78d5745870cc2703b4 + languageName: node + linkType: hard + "web3-rpc-methods@npm:^1.0.2, web3-rpc-methods@npm:^1.1.1": version: 1.1.1 resolution: "web3-rpc-methods@npm:1.1.1" @@ -56559,6 +56730,31 @@ __metadata: languageName: node linkType: hard +"web3-rpc-methods@npm:^1.3.0": + version: 1.3.0 + resolution: "web3-rpc-methods@npm:1.3.0" + dependencies: + web3-core: "npm:^4.4.0" + web3-types: "npm:^1.6.0" + web3-validator: "npm:^2.0.6" + checksum: 10/8c134b1f2ae1cf94d5c452c53fe699d5951c22c62ea82084559db06722a5f0db2047be4209172ff90432c42f70cf8081fea0ea85a024e4cbcd0e037efd9acfa8 + languageName: node + linkType: hard + +"web3-rpc-providers@npm:^1.0.0-rc.2": + version: 1.0.0-rc.2 + resolution: "web3-rpc-providers@npm:1.0.0-rc.2" + dependencies: + web3-errors: "npm:^1.3.0" + web3-providers-http: "npm:^4.2.0" + web3-providers-ws: "npm:^4.0.8" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/8f1fb9a798cec61f245e6e13b796f1b43231d7bd5eb0db8b5b636b4e2facc75ee1453541237f057292ec7ecdb56ba284c29734cd17ea010c27c5580d6edea787 + languageName: node + linkType: hard + "web3-shh@npm:1.10.0": version: 1.10.0 resolution: "web3-shh@npm:1.10.0" @@ -56668,6 +56864,13 @@ __metadata: languageName: node linkType: hard +"web3-types@npm:^1.7.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1": + version: 1.8.1 + resolution: "web3-types@npm:1.8.1" + checksum: 10/e64f7e59806e1875e34a1daaa34e98043fcaebfd2fc96ab9948789129e8da73e812de62f63cf32c347c202d6ba40121f87516b183bb7074f27331fc7f90a46d9 + languageName: node + linkType: hard + "web3-utils@npm:1.10.0": version: 1.10.0 resolution: "web3-utils@npm:1.10.0" @@ -56786,6 +56989,19 @@ __metadata: languageName: node linkType: hard +"web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.1, web3-utils@npm:^4.3.2": + version: 4.3.2 + resolution: "web3-utils@npm:4.3.2" + dependencies: + ethereum-cryptography: "npm:^2.0.0" + eventemitter3: "npm:^5.0.1" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.8.1" + web3-validator: "npm:^2.0.6" + checksum: 10/3fff4418782b0fb05587c9150daedbad90a9ebadd1e3b115a71a72fea885ce10341054758087e47ab81f3cc67da812eaf9077f05e07a872e63d27299f285a81a + languageName: node + linkType: hard + "web3-validator@npm:2.0.2": version: 2.0.2 resolution: "web3-validator@npm:2.0.2" @@ -56985,6 +57201,31 @@ __metadata: languageName: node linkType: hard +"web3@npm:4.14.0": + version: 4.14.0 + resolution: "web3@npm:4.14.0" + dependencies: + web3-core: "npm:^4.7.0" + web3-errors: "npm:^1.3.0" + web3-eth: "npm:^4.10.0" + web3-eth-abi: "npm:^4.3.0" + web3-eth-accounts: "npm:^4.2.1" + web3-eth-contract: "npm:^4.7.0" + web3-eth-ens: "npm:^4.4.0" + web3-eth-iban: "npm:^4.0.7" + web3-eth-personal: "npm:^4.1.0" + web3-net: "npm:^4.1.0" + web3-providers-http: "npm:^4.2.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-rpc-providers: "npm:^1.0.0-rc.2" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/cd8db8ace62c73b7c9ae4a1e1eaec99d8c107295e75e1e6fe770c52bcce919ef17c1d84b835d33c595ac72972207f23ae5cbdcb5382656709cc91db82437fc07 + languageName: node + linkType: hard + "web3@npm:4.4.0": version: 4.4.0 resolution: "web3@npm:4.4.0" From 66538f48fb7ba0a7c6be0b9adbe156c878fea046 Mon Sep 17 00:00:00 2001 From: Bruno Mateus Date: Mon, 19 Aug 2024 12:43:30 +0100 Subject: [PATCH 44/49] feat(satp-hermes): docker and gateway runner for SATP Signed-off-by: Bruno Mateus refactor(satp-hermes): gateway container image definition with bundler Signed-off-by: Peter Somogyvari refactor(satp-hermes): merge policies type guard example Signed-off-by: Peter Somogyvari refactor(satp-hermes): type guards for SATP env variables Signed-off-by: Bruno Mateus squash! - peter's fixes for besu connectivity use LAN IP Instead of hardcoded localhost use the LAN IP of machine so that the gateway container can access it too. Why though? Because if you tell the gateway container that it should access the besu ledger via localhost then it will try to do that through the container's own localhost, which is different from the host machine's localhost (where the besu ledger is actually running). Using the actual IP address of the host machine's primary network interface resolves the ambiguity between the two differnet localhosts. Signed-off-by: Peter Somogyvari Co-authored-by: Peter Somogyvari --- .../cmd-api-server.Dockerfile.healthcheck.mjs | 5 +- .../src/main/typescript/public-api.ts | 3 + .../view-creation/privacy-policies.ts | 29 + .../typescript/view-merging/merge-policies.ts | 28 + packages/cactus-plugin-satp-hermes/.gitignore | 2 + packages/cactus-plugin-satp-hermes/README.md | 44 + .../config_example.json | 256 --- .../docker-compose.yml | 11 + .../gateway-config.json | 27 + packages/cactus-plugin-satp-hermes/makefile | 77 + .../cactus-plugin-satp-hermes/package.json | 20 +- .../satp-hermes-gateway.Dockerfile | 32 + ...atp-hermes-gateway.Dockerfile.dockerignore | 0 ...-hermes-gateway.Dockerfile.healthcheck.mjs | 53 + .../src/main/typescript/.env.example | 38 - .../src/main/typescript/blo/dispatcher.ts | 12 +- .../validateAsset.ts | 34 + .../validateBesuConfig.ts | 130 ++ .../validateBesuOptions.ts | 59 + .../validateBungeeOptions.ts | 72 + .../validateEthereumConfig.ts | 167 ++ .../validateEthereumOptions.ts | 59 + .../validateFabricConfig.ts | 128 ++ .../validateFabricOptions.ts | 272 ++++ .../validatePluginRegistryOptions.ts | 123 ++ .../validateKeyPairJSON.ts | 32 + .../validateSatpBridgesConfig.ts | 126 ++ .../validateSatpCounterPartyGateways.ts | 26 + .../validateSatpEnableOpenAPI.ts | 14 + .../validateSatpEnvironment.ts | 17 + .../validateSatpGatewayIdentity.ts | 103 ++ .../validateSatpLogLevel.ts | 30 + .../validateSatpMergePolicies.ts | 17 + .../validateSatpPrivacyPolicies.ts | 17 + .../validateSatpValidationOptions.ts | 74 + .../src/main/typescript/core/constants.ts | 3 + .../core/stage-handlers/stage0-handler.ts | 4 + .../core/stage-handlers/stage1-handler.ts | 4 + .../core/stage-handlers/stage2-handler.ts | 2 + .../core/stage-handlers/stage3-handler.ts | 6 + .../client/stage0-client-service.ts | 1 + .../client/stage2-client-service.ts | 1 + .../client/stage3-client-service.ts | 1 + .../server/stage0-server-service.ts | 1 + .../server/stage3-server-service.ts | 2 + .../typescript/gol/satp-bridges-manager.ts | 2 +- .../plugin-satp-hermes-gateway-cli.ts | 173 +- .../typescript/plugin-satp-hermes-gateway.ts | 81 +- .../web-services/health-check-endpoint.ts | 79 + .../integration/gateway-init-startup.test.ts | 32 +- ...d-transfer-1-gateway-dockerization.test.ts | 1305 +++++++++++++++ ...-transfer-2-gateways-dockerization.test.ts | 1439 +++++++++++++++++ ...c-transfer-1-gateway-dockerization.test.ts | 1263 +++++++++++++++ ...ric-transfer-1-gateway-with-bungee.test.ts | 2 +- .../SATPGatewayRunner-instantiation.test.ts | 63 + .../supervisord.conf | 16 + .../src/main/typescript/public-api.ts | 5 + .../satp-runner/satp-gateway-runner.ts | 320 ++++ yarn.lock | 22 +- 59 files changed, 6562 insertions(+), 402 deletions(-) delete mode 100644 packages/cactus-plugin-satp-hermes/config_example.json create mode 100644 packages/cactus-plugin-satp-hermes/docker-compose.yml create mode 100644 packages/cactus-plugin-satp-hermes/gateway-config.json create mode 100644 packages/cactus-plugin-satp-hermes/makefile create mode 100644 packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile create mode 100644 packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.dockerignore create mode 100644 packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.healthcheck.mjs delete mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateAsset.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuConfig.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuOptions.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBungeeOptions.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumConfig.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumOptions.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricConfig.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricOptions.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validatePluginRegistryOptions.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateKeyPairJSON.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpBridgesConfig.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpCounterPartyGateways.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnableOpenAPI.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnvironment.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpGatewayIdentity.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpLogLevel.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpMergePolicies.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpPrivacyPolicies.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpValidationOptions.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/health-check-endpoint.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-dockerization.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-dockerization.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-dockerization.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/SATPGatewayRunner-instantiation.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/supervisord.conf create mode 100644 packages/cactus-test-tooling/src/main/typescript/satp-runner/satp-gateway-runner.ts diff --git a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs b/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs index 3d2fc251c9..45d5223964 100644 --- a/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs +++ b/packages/cactus-cmd-api-server/cmd-api-server.Dockerfile.healthcheck.mjs @@ -42,10 +42,11 @@ httpModule if (exitCode === 0) { console.log("%s Healthcheck OK: ", url, statusCode, statusMessage); } else { - console.error("%s Healthcheck FAIL: ", url, statusCode, statusMessage); + console.error("%s Healthcheck FAIL_1: ", url, statusCode, statusMessage); } process.exit(exitCode); }) .on("error", (ex) => { - console.error("%s Healthcheck FAIL: ", url, ex); + console.error("%s Healthcheck FAIL_2: ", url, ex); + process.exit(1); }); diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts index ff3dd0e66d..1c8403aa70 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/public-api.ts @@ -1,6 +1,9 @@ import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; import { PluginFactoryBungeeHermes } from "./plugin-factory-bungee-hermes"; +export { isMergePolicyValueArray } from "./view-merging/merge-policies"; +export { isPrivacyPolicyValueArray } from "./view-creation/privacy-policies"; + export { PluginBungeeHermes, IPluginBungeeHermesOptions, diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts index 4e78f62009..7456816a3b 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts @@ -8,6 +8,35 @@ export interface IPrivacyPolicyValue { policy: PrivacyPolicyOpts; policyHash: string; } + +// Type guard for PrivacyPolicyOpts +export function isPrivacyPolicyOpts( + value: unknown, +): value is PrivacyPolicyOpts { + return ( + typeof value === "string" && + Object.values(PrivacyPolicyOpts).includes(value as PrivacyPolicyOpts) + ); +} + +// Type guard for IPrivacyPolicyValue +export function isPrivacyPolicyValue(obj: unknown): obj is IPrivacyPolicyValue { + return ( + typeof obj === "object" && + obj !== null && + "policy" in obj && // Ensure 'policy' key exists + isPrivacyPolicyOpts((obj as Record).policy) && // Check if policy is a valid PrivacyPolicyOpts value + typeof (obj as Record).policyHash === "string" // Ensure 'policyHash' is a string + ); +} + +// Type guard for an array of IPrivacyPolicyValue +export function isPrivacyPolicyValueArray( + input: unknown, +): input is Array { + return Array.isArray(input) && input.every(isPrivacyPolicyValue); +} + export class PrivacyPolicies { constructor() {} diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts index ec0efaa494..532cd30a95 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-merging/merge-policies.ts @@ -8,6 +8,34 @@ export interface IMergePolicyValue { policy: MergePolicyOpts; policyHash?: string; //undefined if policy is NONE } + +// Type guard for MergePolicyOpts +export function isMergePolicyOpts(value: unknown): value is MergePolicyOpts { + return ( + typeof value === "string" && + Object.values(MergePolicyOpts).includes(value as MergePolicyOpts) + ); +} + +// Type guard for IMergePolicyValue +export function isMergePolicyValue(obj: unknown): obj is IMergePolicyValue { + return ( + typeof obj === "object" && + obj !== null && + "policy" in obj && // Ensure 'policy' key exists + isMergePolicyOpts((obj as Record).policy) && // Check if policy is a valid MergePolicyOpts value + (typeof (obj as Record).policyHash === "string" || + typeof (obj as Record).policyHash === "undefined") // Ensure 'policyHash' is either a string or undefined + ); +} + +// Type guard for an array of IMergePolicyValue +export function isMergePolicyValueArray( + input: unknown, +): input is IMergePolicyValue[] { + return Array.isArray(input) && input.every(isMergePolicyValue); +} + export class MergePolicies { constructor() {} diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index da6665bbc3..33645084b6 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -1,3 +1,5 @@ src/main/typescript/fabric-contracts/satp/chaincode-typescript/.yarn/ src/main/typescript/.env packages/cactus-plugin-satp-hermes/cache/solidity-files-cache.json +src/keys/ +src/test/typescript/integration/gateway-info \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/README.md b/packages/cactus-plugin-satp-hermes/README.md index f353eb76b1..5513b7ee0c 100644 --- a/packages/cactus-plugin-satp-hermes/README.md +++ b/packages/cactus-plugin-satp-hermes/README.md @@ -155,6 +155,50 @@ const serverGatewayOptions: IBesuSATPGatewayConstructorOptions = { Note that these gateways are extensions of the [default SATP Gateway class](https://github.com/hyperledger/cactus/blob/main/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations. +## Containerization + +### Building the container image locally + +In the project root directory run these commands on the terminal: + +```sh +yarn configure +yarn lerna run build:bundle --scope=@hyperledger/cactus-plugin-satp-hermes +``` + +Build the image: + +```sh +docker build \ + --file ./packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile \ + ./packages/cactus-plugin-satp-hermes/ \ + --tag shg \ + --tag satp-hermes-gateway \ + --tag ghcr.io/hyperledger/cacti-satp-hermes-gateway:$(date +"%Y-%m-%dT%H-%M-%S" --utc)-dev-$(git rev-parse --short HEAD) +``` + +Run the image: + +```sh +docker run \ + -it \ + satp-hermes-gateway +``` + +Alternatively you can use `docker compose up --build` from within the package directory or if you +prefer to run it from the project root directory then: + +```sh +docker compose \ + --project-directory ./packages/cactus-plugin-satp-hermes/ \ + -f ./packages/cactus-plugin-satp-hermes/docker-compose.yml \ + up \ + --build +``` + + +> The `--build` flag is going to save you 99% of the time from docker compose caching your image builds against your will or knowledge during development. + ## Contributing We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do! diff --git a/packages/cactus-plugin-satp-hermes/config_example.json b/packages/cactus-plugin-satp-hermes/config_example.json deleted file mode 100644 index a6764458a9..0000000000 --- a/packages/cactus-plugin-satp-hermes/config_example.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "gid": { - "id": "mockID", - "name": "mockName", - "version": [ - { - "Core": "v02", - "Architecture": "v02", - "Crash": "v02" - } - ], - "supportedDLTs": [ "FabricSATPGateway", "BesuSATPGateway", "mockDLT"], - "proofID": "mockProofID", - "address": "http://localhost", - "gatewayServerPort": 3110, - "gatewayClientPort": 3111, - "gatewayOpenAPIPort": 4110 - - }, - "logLevel": "INFO", - "counterPartyGateways": [ - { - "id": "mockCounterPartyID1", - "name": "mockName", - "address": "http://localhost", - "pubkey": "mockPubkey", - "version": [ - { - "Core": "v02", - "Architecture": "v02", - "Crash": "v02" - } - ], - "supportedDLTs": [ "BesuSATPGateway", "mockDLT"], - "proofID": "mockProofID", - "gatewayServerPort": 3000, - "gatewayClientPort": 3001, - "gatewayOpenAPIPort": 40001 - }, - { - "id": "mockCounterPartyID2", - "name": "mockName", - "address": "http://localhost", - "pubkey": "mockPubkey", - "version": [ - { - "Core": "v02", - "Architecture": "v02", - "Crash": "v02" - } - ], - "supportedDLTs": [ "FabricSATPGateway"], - "proofID": "mockProofID", - "gatewayServerPort": 5001, - "gatewayClientPort": 5002, - "gatewayOpenAPIPort": 6001 - } - ], - "keyPair": { - "privateKey": "mockPrivateKey", - "publicKey": "mockPublicKey" - }, - "bridgesConfig": [ - { - "network": "Fabric", - "signingCredential": { - "keychainId": "mockKeychainId", - "keychainRef": "string1", - "type": "X.509", - "vaultTransitKey": { - "keyName": "mockKeyName", - "token": "mockToken" - }, - "webSocketKey": { - "sessionId": "mockSessionId", - "signature": "mockSignature" - } - }, - "channelName": "mockChannelName", - "contractName": "mockContractName", - "options": { - "instanceId": "mockInstanceId", - "dockerBinary": "/usr/local/bin/docker", - "peerBinary": "/fabric-samples/bin/peer", - "goBinary": "/usr/local/go/bin/go", - "pluginRegistryOptions": { - "keyChainOptions": { - "instanceId": "mockInstanceId", - "keychainId": "mockKeychainId", - "logLevel": "INFO", - "backend": [ - { - "keychainEntry": "mockKeychainEntry", - "keychainEntryVale": "mockKeychainEntryVale" - }, - { - "keychainEntry": "mockKeychainEntry2", - "keychainEntryVale": "mockKeychainEntryVale2" - } - ] - } - }, - "cliContainerEnv": { - "CORE_PEER_ADDRESS": "mockCORE_PEER_ADDRESS", - "CORE_PEER_LOCALMSPID": "mockCORE_PEER_LOCALMSPID", - "CORE_PEER_TLS_ROOTCERT_FILE": "mockCORE_PEER_TLS_ROOTCERT_FILE", - "CORE_PEER_MSPCONFIGPATH": "mockCORE_PEER_MSPCONFIGPATH", - "CORE_PEER_TLS_ENABLED": "mockCORE_PEER_TLS_ENABLED", - "CORE_PEER_TLS_CLIENTAUTHREQUIRED": "mockCORE_PEER_TLS_CLIENTAUTHREQUIRED", - "CORE_PEER_TLS_CLIENTROOTCAS_FILES": "mockCORE_PEER_TLS_CLIENTROOTCAS_FILES", - "CORE_PEER_TLS_CLIENTCERT_FILE": "mockCORE_PEER_TLS_CLIENTCERT" - }, - "sshConfig": { - "host": "mockHost", - "port": 22, - "username": "mockUsername", - "privateKey": "mockPrivateKey" - }, - "logLevel": "INFO", - "connectionProfile": { - "mychannel": { - "orderers": [ - "orderer.example.com" - ], - "peers": { - "peer0.org1.example.com": { - "endorsingPeer": true, - "chaincodeQuery": true, - "ledgerQuery": true, - "eventSource": true - } - } - } - }, - "discoveryOptions": { - "enabled": true, - "asLocalhost": true - }, - "eventHandlerOptions": { - "strategy": "NETWORK_SCOPE_ALLFORTX", - "commitTimeout": 300 - } - }, - "bungeeOptions": { - "keyPair": { - "privateKey": "mockPrivateKey", - "publicKey": "mockPublicKey" - }, - "instanceId": "mockInstanceId", - "pluginRegistryOptions": [ - { - "keyChainOptions": { - "instanceId": "mockInstanceId", - "keychainId": "mockKeychainId", - "logLevel": "INFO", - "backend": [ - { - "keychainEntry": "mockKeychainEntry", - "keychainEntryVale": "mockKeychainEntryVale" - }, - { - "keychainEntry": "mockKeychainEntry2", - "keychainEntryVale": "mockKeychainEntryVale2" - } - ] - } - } - - ], - "logLevel": "INFO" - } - }, - { - "network": "Besu", - "keychainId": "mockKeychainId", - "signingCredential": { - "ethAccount": "mockEthAccount", - "secret": "privateKeyMock", - "type": "PRIVATE_HEX_KEY" - }, - "contractName": "mockContractName", - "contractAddress": "mockContractAddress", - "options": { - "instanceId": "mockInstanceId", - "rpcApiHttpHost": "http://localhost", - "rpcApiWsHost": "ws://localhost", - "pluginRegistryOptions": [ - { - "keyChainOptions": { - "instanceId": "mockInstanceId", - "keychainId": "mockKeychainId", - "logLevel": "INFO", - "backend": [ - { - "keychainEntry": "mockKeychainEntry", - "keychainEntryVale": "mockKeychainEntryVale" - }, - { - "keychainEntry": "mockKeychainEntry2", - "keychainEntryVale": "mockKeychainEntryVale2" - } - ] - } - }, - { - "keyChainOptions": { - "instanceId": "mockInstanceId", - "keychainId": "mockKeychainId", - "logLevel": "INFO", - "backend": [ - { - "keychainEntry": "mockKeychainEntry", - "keychainEntryVale": "mockKeychainEntryVale" - }, - { - "keychainEntry": "mockKeychainEntry2", - "keychainEntryVale": "mockKeychainEntryVale2" - } - ] - } - } - ], - "logLevel": "INFO" - }, - "bungeeOptions": { - "keyPair": { - "privateKey": "mockPrivateKey", - "publicKey": "mockPublicKey" - }, - "instanceId": "mockInstanceId", - "pluginRegistryOptions": [ - { - "keyChainOptions": { - "instanceId": "mockInstanceId", - "keychainId": "mockKeychainId", - "logLevel": "INFO", - "backend": [ - { - "keychainEntry": "mockKeychainEntry", - "keychainEntryVale": "mockKeychainEntryVale" - }, - { - "keychainEntry": "mockKeychainEntry2", - "keychainEntryVale": "mockKeychainEntryVale2" - } - ] - } - } - ], - "logLevel": "INFO" - }, - "gas": 99999999999999 - } - ] - -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/docker-compose.yml b/packages/cactus-plugin-satp-hermes/docker-compose.yml new file mode 100644 index 0000000000..75cc6307e4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.8" + +services: + satp-hermes-gateway: + build: + context: ./ + dockerfile: satp-hermes-gateway.Dockerfile + ports: + - 3010:3010/tcp # SERVER_PORT + - 3011:3011/tcp # CLIENT_PORT + - 4010:4010/tcp # API_PORT diff --git a/packages/cactus-plugin-satp-hermes/gateway-config.json b/packages/cactus-plugin-satp-hermes/gateway-config.json new file mode 100644 index 0000000000..4406dc5289 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/gateway-config.json @@ -0,0 +1,27 @@ +{ + "gid": { + "id": "gatewayID", + "name": "gatewayName", + "version": [ + { + "Core": "v02", + "Architecture": "v02", + "Crash": "v02" + } + ], + "supportedDLTs": [ "FabricSATPGateway", "BesuSATPGateway"], + "proofID": "mockProofID", + "address": "http://localhost", + "gatewayServerPort": 3010, + "gatewayClientPort": 3011, + "gatewayOpenAPIPort": 4010 + }, + "gatewayKeyPair": { + "publicKey": "0c7556eda362eb8a9fee4505f7bee6375e2aeaa03a3c32c7309c13ab47f6640a6530af4db06b8acc5d31a26b8a7e930cf5df697b21ca1115771e9ea2e6fb1730", + "privateKey": "6039ac2c12e867a3b7d7a6becc829afbbd951270a62a1285aec003957d11efb9" + }, + "logLevel": "DEBUG", + "counterPartyGateways": [], + "environment": "development", + "enableOpenAPI": true +} diff --git a/packages/cactus-plugin-satp-hermes/makefile b/packages/cactus-plugin-satp-hermes/makefile new file mode 100644 index 0000000000..2dbc455239 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/makefile @@ -0,0 +1,77 @@ +.PHONY: setup-env generate-keys run-gateway clean + +# Define common variables +OPENSSL = openssl +KEYS_DIR = src/keys +CONFIG_FILE = gateway-config.json + +setup-env: + @echo "Setting up environment for SATP-Hermes..." + + @# Check if Node.js is installed, if not, install it + @if ! command -v node >/dev/null 2>&1; then \ + echo "Installing Node.js 18.18.2..."; \ + sudo curl -fsSL https://nodejs.org/dist/v18.18.2/node-v18.18.2-linux-x64.tar.xz | sudo tar -xJ -C /usr/local --strip-components=1; \ + fi + + @if ! command -v yarn >/dev/null 2>&1; then \ + echo "Installing Yarn..."; \ + sudo npm install -g yarn; \ + fi + + @echo "Installing dependencies and compiling the plugin..." + yarn install + yarn tsc + + @echo "Initializing databases..." + yarn db:init + + @echo "Environment setup complete." + +generate-keys: + @echo "Generating new keys..." + @mkdir -p $(KEYS_DIR) + + @echo "Generating private key..." + @$(OPENSSL) ecparam -name secp256k1 -genkey -noout -out $(KEYS_DIR)/secp256k1-privkey.pem + @echo "Private key file generated at $(KEYS_DIR)/secp256k1-privkey.pem" + + @echo "Generating public key..." + @$(OPENSSL) ec -in $(KEYS_DIR)/secp256k1-privkey.pem -pubout -out $(KEYS_DIR)/secp256k1-pubkey.pem + @echo "Public key file generated at $(KEYS_DIR)/secp256k1-pubkey.pem" + + @# Extracting private and public key in hex... + @$(OPENSSL) ec -in $(KEYS_DIR)/secp256k1-privkey.pem -text -noout | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^00//' > $(KEYS_DIR)/private.hex + @$(OPENSSL) ec -in $(KEYS_DIR)/secp256k1-pubkey.pem -pubin -text -noout | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//' > $(KEYS_DIR)/public.hex + + @echo "Updating gatewayKeyPair in gateway-config.json file..." + @PRIVATE_KEY=`cat $(KEYS_DIR)/private.hex` && \ + PUBLIC_KEY=`cat $(KEYS_DIR)/public.hex` && \ + sed -i \ + -e '/"gatewayKeyPair": {/,/}/{s/"publicKey": "[^"]*"/"publicKey": "'$$PUBLIC_KEY'"/}' \ + -e '/"gatewayKeyPair": {/,/}/{s/"privateKey": "[^"]*"/"privateKey": "'$$PRIVATE_KEY'"/}' \ + $(CONFIG_FILE) + + @echo "New secp256k1 keys generated and updated in gateway-config.json gatewayKeyPair:" + @grep -A 2 '"gatewayKeyPair"' $(CONFIG_FILE) + + @# Clean up temporary files + @rm -f $(KEYS_DIR)/private.hex $(KEYS_DIR)/public.hex + +run-gateway: generate-keys setup-env + @echo "Building SATP Gateway image and running container..." + docker compose up --build + +clean: + @echo "Cleaning up SATP-Hermes environment..." + + @echo "Rolling back database migrations..." + yarn db:rollback + + @echo "Removing SQLite database files..." + find src/knex -name "*.sqlite3" -type f -delete + + @echo "Removing generated keys..." + rm -rf $(KEYS_DIR) + + @echo "Cleanup complete." \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 86854babb9..ac4c67511d 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -35,6 +35,10 @@ { "name": "Carlos Amaro", "url": "https://github.com/LordKubaya" + }, + { + "name": "Bruno Mateus", + "url": "https://github.com/brunoffmateus" } ], "main": "dist/lib/main/typescript/index.js", @@ -44,6 +48,7 @@ "dist/*" ], "scripts": { + "build:bundle": "ncc build ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js --minify --out=./dist/bundle/ncc/ --external=fabric-common", "build": "run-s codegen tsc", "build-proto": "buf build --path src/main/proto --verbose", "build:dev:backend:postbuild": "mkdir -p ./dist/lib/knex && cp -r ./src/knex/* ./dist/lib/knex", @@ -53,6 +58,12 @@ "codegen:abi": "yarn forge:all && abi-types-generator './src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json' --output='./src/main/typescript/generated'", "codegen:openapi": "npm run generate-sdk", "codegen:proto": "npm run generate-proto", + "db:init": "run-s db:init:local db:init:remote", + "db:init:local": "knex migrate:latest --knexfile src/knex/knexfile.ts", + "db:init:remote": "knex migrate:latest --knexfile src/knex/knexfile-remote.ts", + "db:rollback": "run-s db:rollback:local db:rollback:remote", + "db:rollback:local": "knex migrate:rollback --knexfile src/knex/knexfile.ts", + "db:rollback:remote": "knex migrate:rollback --knexfile src/knex/knexfile-remote.ts", "forge": "forge build ./src/solidity/*.sol --out ./src/solidity/generated", "forge:all": "run-s 'forge' 'forge:test'", "forge:test": "forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated", @@ -60,13 +71,13 @@ "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", "generate-sdk:typescript-axios-bol": "yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/gateway-client/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file", - "preinstall": "curl -L https://foundry.paradigm.xyz | bash && foundryup", "lint": "run-p 'lint:*'", "lint:eslint": "eslint './src/**/*.{js,ts}' --quiet --fix && cspell \"*/*/src/**/*.{js,ts}\"", "lint:oapi": "vacuum lint -d -e ./src/main/yml/bol/openapi-blo-bundled.yml", "lint:protobuf": "buf lint --path src/main/proto --verbose", - "start-gateway": "ts-node /src/main/typescript/plugin-satp-hermes-gateway-cli.ts", + "preinstall": "curl -L https://foundry.paradigm.xyz | bash && foundryup", "pretsc": "npm run generate-sdk", + "start-gateway": "node ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js", "tsc": "tsc --project ./tsconfig.json", "watch": "tsc --build --watch" }, @@ -107,6 +118,7 @@ "fs-extra": "11.2.0", "google-protobuf": "3.21.2", "hardhat": "2.22.5", + "jsonc": "2.0.0", "knex": "2.4.0", "kubo-rpc-client": "3.0.1", "npm-run-all": "4.1.5", @@ -137,15 +149,19 @@ "@types/swagger-ui-express": "4.1.6", "@types/tape": "4.13.4", "@types/uuid": "10.0.0", + "@vercel/ncc": "0.38.1", "body-parser": "1.20.3", "express": "4.21.0", "fabric-network": "2.2.20", "grpc-tools": "1.12.4", "grpc_tools_node_protoc_ts": "5.3.3", + "internal-ip": "6.2.0", + "jsonc": "2.0.0", "kubo-rpc-client": "3.0.1", "make-dir-cli": "3.1.0", "protobufjs": "7.2.5", "swagger-cli": "4.0.4", + "ts-node": "10.9.1", "typescript": "5.5.2" }, "engines": { diff --git a/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile b/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile new file mode 100644 index 0000000000..74597c61b6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile @@ -0,0 +1,32 @@ +FROM node:22.4.0-bookworm-slim + +RUN apt-get update && apt-get install -y supervisor curl + +# CVE-2023-31484 - perl: CPAN.pm does not verify TLS certificates when downloading distributions over HTTPS... +RUN apt-get remove -y --allow-remove-essential perl perl-base && apt-get autoremove -y + +ARG APP_DIR=/opt/cacti/satp-hermes +WORKDIR ${APP_DIR} +RUN mkdir -p /opt/cacti/satp-hermes/log/ + +COPY ./dist/bundle/ncc/ ${APP_DIR} +COPY ./satp-hermes-gateway.Dockerfile.healthcheck.mjs ${APP_DIR} +COPY ./gateway-config.json /gateway-config.json +COPY ./src/knex/ ${APP_DIR}/src/knex/ +COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf +COPY ./supervisord.conf /etc/supervisord.conf + +# fabric-common cannot be bundled due to some exotic transitive depenedencies +# so we have to install it within the container manually. +RUN npm install fabric-common + +ENTRYPOINT ["/usr/bin/supervisord"] +CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] + + +HEALTHCHECK --interval=5s --timeout=1s --start-period=1s --retries=5 CMD [ "node", "./satp-hermes-gateway.Dockerfile.healthcheck.mjs", "http", "localhost", "4010" ] + +ENV TZ=Etc/UTC +ENV NODE_ENV=production + +EXPOSE 3010 3011 4010 diff --git a/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.dockerignore b/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.dockerignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.healthcheck.mjs b/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.healthcheck.mjs new file mode 100644 index 0000000000..f33bc143ac --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile.healthcheck.mjs @@ -0,0 +1,53 @@ +/** + * The healthcheck script for the Cacti API Server written in pure NodeJS without + * any external dependencies. + * + * USAGE + * ----- + * + * ```sh + * $ node cmd-api-server.Dockerfile.healthcheck.mjs http localhost 4000 + * http://localhost:4000/api/v1/api-server/healthcheck Healthcheck OK: 200 OK + * ``` + * + * FAQ + * --- + * + * Q: Why though? Why not just use cURL or wget + * or any other command line utility to perform HTTP requests? + * A: This has zero OS level package dependencies and will work without the + * container image having to have new software installed. This reduces the footprint + * of the image and also the attack surfaces that we have. The slight increase in + * complexity is a trade-off we consider worth having because this script is not + * part of the API server's own codebase and therefore does not affect the complexity + * of that as such. + */ + +import http from "http"; +import https from "https"; + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const [nodeBinary, script, protocol, host, port, path] = process.argv; + +const thePath = + path ?? "/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck"; +const isSecureHttp = protocol === "https"; +const httpModule = isSecureHttp ? https : http; + +const url = `${protocol}://${host}:${port}${thePath}`; + +httpModule + .get(url, (res) => { + const { statusCode, statusMessage } = res; + const exitCode = statusCode >= 200 && statusCode <= 300 ? 0 : 1; + if (exitCode === 0) { + console.log("%s Healthcheck OK: ", url, statusCode, statusMessage); + } else { + console.error("%s Healthcheck FAIL_1: ", url, statusCode, statusMessage); + } + process.exit(exitCode); + }) + .on("error", (ex) => { + console.error("%s Healthcheck FAIL_2: ", url, ex); + process.exit(1); + }); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example b/packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example deleted file mode 100644 index 5f11c435e1..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/.env.example +++ /dev/null @@ -1,38 +0,0 @@ -# CREDENTIALs -SATP_PRIVATE_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef -SATP_PUBLIC_KEY=fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 - - -# SATP Gateway Configuration -SATP_LOG_LEVEL=INFO - -# Environment and API -SATP_NODE_ENV=development -SATP_ENABLE_OPEN_API=true - -# Gateway Identity -SATP_GATEWAY_ID=gateway1 -SATP_GATEWAY_NAME=ExampleGateway -SATP_GATEWAY_VERSION=v02,v02,v02 -SATP_SUPPORTED_DLTS=FabricSATPGateway,BesuSATPGateway - -# Proof and Ports -SATP_PROOF_ID=proof123 -SATP_GATEWAY_SERVER_PORT=3010 -SATP_GATEWAY_CLIENT_PORT=3011 -SATP_GATEWAY_GRPC_PORT=3012 - -# Gateway Address -SATP_GATEWAY_ADDRESS=http://localhost:3010 - -# Counter Party Gateways (JSON array) -SATP_COUNTER_PARTY_GATEWAYS=[{"id":"gateway2","name":"OtherGateway","address":"http://other-gateway:3010"}] - -# Validation Options (JSON object) -SATP_VALIDATION_OPTIONS={"skipMissingProperties":true} - -# Privacy Policies (JSON array) -SATP_PRIVACY_POLICIES=[{"policy":"GDPR","policyHash":"hash123"}] - -# Merge Policies (JSON array) -SATP_MERGE_POLICIES=[{"policy":"LatestWins","policyHash":"hash456"}] diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 53e0254370..20be0488cd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -11,6 +11,7 @@ import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api"; //import { GatewayIdentity, GatewayChannel } from "../core/types"; //import { GetStatusError, NonExistantGatewayIdentity } from "../core/errors"; import { GetStatusEndpointV1 } from "../web-services/status-endpoint"; +import { HealthCheckEndpointV1 } from "../web-services/health-check-endpoint"; //import { GetAuditRequest, GetAuditResponse } from "../generated/gateway-client/typescript-axios"; import { @@ -97,7 +98,16 @@ export class BLODispatcher { logLevel: this.options.logLevel, }); - const theEndpoints = [getStatusEndpointV1, getSessionIdsEndpointV1]; + const healthCheckEndpointV1 = new HealthCheckEndpointV1({ + dispatcher: this, + logLevel: this.options.logLevel, + }); + + const theEndpoints = [ + getStatusEndpointV1, + getSessionIdsEndpointV1, + healthCheckEndpointV1, + ]; this.endpoints = theEndpoints; return theEndpoints; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateAsset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateAsset.ts new file mode 100644 index 0000000000..db0495ea9a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateAsset.ts @@ -0,0 +1,34 @@ +import { + Asset, + TokenType, +} from "../../core/stage-services/satp-bridge/types/asset"; + +// Type guard for TokenType +function isTokenType(obj: unknown): obj is TokenType { + return ( + typeof obj === "number" && + obj !== null && + Object.values(TokenType).includes(obj) + ); +} + +// Type guard for Asset +export function isAsset(obj: unknown): obj is Asset { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "tokenId" in obj && + typeof objRecord.tokenId === "string" && + "tokenType" in obj && + isTokenType(objRecord.tokenType) && + "owner" in obj && + typeof objRecord.owner === "string" && + "amount" in obj && + typeof objRecord.amount === "number" && + "ontology" in obj && + typeof objRecord.ontology === "string" && + "contractName" in obj && + typeof objRecord.contractName === "string" + ); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuConfig.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuConfig.ts new file mode 100644 index 0000000000..e86d7cd9a1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuConfig.ts @@ -0,0 +1,130 @@ +import { EvmAsset } from "../../core/stage-services/satp-bridge/types/evm-asset"; +import { + Web3SigningCredential, + Web3SigningCredentialCactusKeychainRef, + Web3SigningCredentialNone, + Web3SigningCredentialPrivateKeyHex, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { NetworkConfigJSON } from "../validateSatpBridgesConfig"; +import { BesuOptionsJSON, isBesuOptionsJSON } from "./validateBesuOptions"; +import { + BungeeOptionsJSON, + isBungeeOptionsJSON, + isClaimFormat, +} from "./validateBungeeOptions"; +import { ClaimFormat } from "../../generated/proto/cacti/satp/v02/common/message_pb"; +import { isEvmAssetArray } from "./validateEthereumConfig"; + +export interface BesuConfigJSON extends NetworkConfigJSON { + keychainId: string; + signingCredential: Web3SigningCredential; + contractName: string; + contractAddress: string; + gas: number; + options: BesuOptionsJSON; + bungeeOptions: BungeeOptionsJSON; + besuAssets?: EvmAsset[]; + claimFormat: ClaimFormat; +} + +// Type guard for Web3SigningCredentialType +function isWeb3SigningCredentialType( + value: unknown, +): value is Web3SigningCredentialType { + return ( + typeof value === "string" && + value !== null && + (value === Web3SigningCredentialType.CactusKeychainRef || + value === Web3SigningCredentialType.PrivateKeyHex || + value === Web3SigningCredentialType.None) + ); +} + +// Type guard for Web3SigningCredentialCactusKeychainRef +function isWeb3SigningCredentialCactusKeychainRef( + obj: unknown, +): obj is Web3SigningCredentialCactusKeychainRef { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "ethAccount" in obj && + typeof objRecord.ethAccount === "string" && + "keychainEntryKey" in obj && + typeof objRecord.keychainEntryKey === "string" && + "keychainId" in obj && + typeof objRecord.keychainId === "string" && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredentialPrivateKeyHex +function isWeb3SigningCredentialPrivateKeyHex( + obj: unknown, +): obj is Web3SigningCredentialPrivateKeyHex { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "ethAccount" in obj && + typeof objRecord.ethAccount === "string" && + "secret" in obj && + typeof objRecord.secret === "string" && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredentialNone +function isWeb3SigningCredentialNone( + obj: unknown, +): obj is Web3SigningCredentialNone { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredential +function isWeb3SigningCredential(obj: unknown): obj is Web3SigningCredential { + if (!obj || typeof obj !== "object") { + return false; + } + return ( + isWeb3SigningCredentialCactusKeychainRef(obj) || + isWeb3SigningCredentialPrivateKeyHex(obj) || + isWeb3SigningCredentialNone(obj) + ); +} + +// Type guard for BesuConfigJSON +export function isBesuConfigJSON(obj: unknown): obj is BesuConfigJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "keychainId" in obj && + typeof objRecord.keychainId === "string" && + "contractName" in obj && + typeof objRecord.contractName === "string" && + "contractAddress" in obj && + typeof objRecord.contractAddress === "string" && + "gas" in obj && + typeof objRecord.gas === "number" && + "signingCredential" in obj && + isWeb3SigningCredential(objRecord.signingCredential) && + (!("besuAssets" in obj) || isEvmAssetArray(objRecord.besuAssets)) && + "bungeeOptions" in obj && + isBungeeOptionsJSON(objRecord.bungeeOptions) && + "options" in obj && + isBesuOptionsJSON(objRecord.options) && + "claimFormat" in obj && + isClaimFormat(objRecord.claimFormat) + ); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuOptions.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuOptions.ts new file mode 100644 index 0000000000..7626ba9a78 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBesuOptions.ts @@ -0,0 +1,59 @@ +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { isLogLevelDesc } from "../validateSatpLogLevel"; +import { + createPluginRegistry, + isPluginRegistryOptionsJSON, + PluginRegistryOptionsJSON, +} from "./validatePluginRegistryOptions"; +import { IPluginLedgerConnectorBesuOptions } from "@hyperledger/cactus-plugin-ledger-connector-besu"; + +export interface BesuOptionsJSON { + instanceId: string; + rpcApiHttpHost: string; + rpcApiWsHost: string; + pluginRegistryOptions: PluginRegistryOptionsJSON; + logLevel?: LogLevelDesc; +} + +// Type guard for BesuOptionsJSON +export function isBesuOptionsJSON(obj: unknown): obj is BesuOptionsJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "instanceId" in obj && + typeof objRecord.instanceId === "string" && + "rpcApiHttpHost" in obj && + typeof objRecord.rpcApiHttpHost === "string" && + "rpcApiWsHost" in obj && + typeof objRecord.rpcApiWsHost === "string" && + "pluginRegistryOptions" in obj && + isPluginRegistryOptionsJSON(objRecord.pluginRegistryOptions) && + (!("logLevel" in obj) || isLogLevelDesc(objRecord.logLevel)) + ); +} + +// Function to create IPluginLedgerConnectorBesuOptions from BesuOptionsJSON +export function createBesuOptions( + options: BesuOptionsJSON, +): IPluginLedgerConnectorBesuOptions { + if (!options) { + throw new TypeError( + "Invalid options in BesuConfig: " + JSON.stringify(options), + ); + } + + const besuOptions: IPluginLedgerConnectorBesuOptions = { + instanceId: options.instanceId, + rpcApiHttpHost: options.rpcApiHttpHost, + rpcApiWsHost: options.rpcApiWsHost, + pluginRegistry: createPluginRegistry( + options.pluginRegistryOptions, + options.logLevel, + ), + logLevel: options.logLevel, + }; + + return besuOptions; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBungeeOptions.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBungeeOptions.ts new file mode 100644 index 0000000000..ba5d45ab14 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateBungeeOptions.ts @@ -0,0 +1,72 @@ +import { LogLevelDesc, Secp256k1Keys } from "@hyperledger/cactus-common"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/plugin-bungee-hermes"; +import { isLogLevelDesc } from "../validateSatpLogLevel"; +import { + createPluginRegistry, + isPluginRegistryOptionsJSON, + PluginRegistryOptionsJSON, +} from "./validatePluginRegistryOptions"; +import { iskeyPairJSON } from "../validateKeyPairJSON"; +import { ClaimFormat } from "../../generated/proto/cacti/satp/v02/common/message_pb"; + +export interface BungeeOptionsJSON { + instanceId: string; + pluginRegistryOptions?: PluginRegistryOptionsJSON; + keyPair?: { privateKey: string; publicKey: string }; + logLevel?: LogLevelDesc; + disableSignalHandlers?: true; +} + +// Type guard for ClaimFormat +export function isClaimFormat(obj: unknown): obj is ClaimFormat { + if (typeof obj !== "number") { + return false; + } + return Object.values(ClaimFormat).includes(obj); +} + +// Type guard for BungeeOptionsJSON +export function isBungeeOptionsJSON(obj: unknown): obj is BungeeOptionsJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "instanceId" in obj && + typeof objRecord.instanceId === "string" && + (!("pluginRegistryOptions" in obj) || + isPluginRegistryOptionsJSON(objRecord.pluginRegistryOptions)) && + (!("keyPair" in obj) || iskeyPairJSON(objRecord.keyPair)) && + (!("logLevel" in obj) || isLogLevelDesc(objRecord.logLevel)) && + (!("disableSignalHandlers" in obj) || + objRecord.disableSignalHandlers === true) + ); +} + +// Function to create IPluginBungeeHermesOptions from BungeeOptionsJSON +export function createBungeeOptions( + options: BungeeOptionsJSON, +): IPluginBungeeHermesOptions { + if (!options) { + throw new TypeError( + "Invalid bungeeOptions in NetworkConfig: " + JSON.stringify(options), + ); + } + + return { + instanceId: options.instanceId, + pluginRegistry: createPluginRegistry( + options.pluginRegistryOptions, + options.logLevel, + ), + keyPair: + options.keyPair?.privateKey && options.keyPair?.publicKey + ? { + privateKey: Buffer.from(options.keyPair.privateKey, "hex"), + publicKey: Buffer.from(options.keyPair.publicKey, "hex"), + } + : Secp256k1Keys.generateKeyPairsBuffer(), + logLevel: options.logLevel, + disableSignalHandlers: options.disableSignalHandlers, + }; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumConfig.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumConfig.ts new file mode 100644 index 0000000000..8f50aeda50 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumConfig.ts @@ -0,0 +1,167 @@ +import { EvmAsset } from "../../core/stage-services/satp-bridge/types/evm-asset"; +import { + Web3SigningCredential, + Web3SigningCredentialCactiKeychainRef, + Web3SigningCredentialGethKeychainPassword, + Web3SigningCredentialNone, + Web3SigningCredentialPrivateKeyHex, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; +import { isAsset } from "./validateAsset"; +import { NetworkConfigJSON } from "../validateSatpBridgesConfig"; +import { + EthereumOptionsJSON, + isEthereumOptionsJSON, +} from "./validateEthereumOptions"; +import { + BungeeOptionsJSON, + isBungeeOptionsJSON, + isClaimFormat, +} from "./validateBungeeOptions"; +import { ClaimFormat } from "../../generated/proto/cacti/satp/v02/common/message_pb"; + +export interface EthereumConfigJSON extends NetworkConfigJSON { + keychainId: string; + signingCredential: Web3SigningCredential; + contractName: string; + contractAddress: string; + gas: number; + options: EthereumOptionsJSON; + bungeeOptions: BungeeOptionsJSON; + ethereumAssets?: EvmAsset[]; + claimFormat: ClaimFormat; +} + +// Type guard for EvmAsset +function isEvmAsset(obj: unknown): obj is EvmAsset { + const objRecord = obj as Record; + return ( + isAsset(obj) && + "contractAddress" in obj && + typeof objRecord.contractAddress === "string" + ); +} + +// Type guard for an array of EvmAsset +export function isEvmAssetArray(input: unknown): input is Array { + return Array.isArray(input) && input.every(isEvmAsset); +} + +// Type guard for Web3SigningCredentialType +function isWeb3SigningCredentialType( + value: unknown, +): value is Web3SigningCredentialType { + return ( + typeof value === "string" && + value !== null && + (value === Web3SigningCredentialType.CactiKeychainRef || + value === Web3SigningCredentialType.GethKeychainPassword || + value === Web3SigningCredentialType.PrivateKeyHex || + value === Web3SigningCredentialType.None) + ); +} + +// Type guard for Web3SigningCredentialCactiKeychainRef +function isWeb3SigningCredentialCactiKeychainRef( + obj: unknown, +): obj is Web3SigningCredentialCactiKeychainRef { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "ethAccount" in obj && + typeof objRecord.ethAccount === "string" && + "keychainEntryKey" in obj && + typeof objRecord.keychainEntryKey === "string" && + (!("keychainId" in obj) || typeof objRecord.keychainId === "string") && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredentialGethKeychainPassword +function isWeb3SigningCredentialGethKeychainPassword( + obj: unknown, +): obj is Web3SigningCredentialGethKeychainPassword { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "ethAccount" in obj && + typeof objRecord.ethAccount === "string" && + "secret" in obj && + typeof objRecord.secret === "string" && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredentialPrivateKeyHex +function isWeb3SigningCredentialPrivateKeyHex( + obj: unknown, +): obj is Web3SigningCredentialPrivateKeyHex { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "ethAccount" in obj && + typeof objRecord.ethAccount === "string" && + "secret" in obj && + typeof objRecord.secret === "string" && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredentialNone +function isWeb3SigningCredentialNone( + obj: unknown, +): obj is Web3SigningCredentialNone { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "type" in obj && + isWeb3SigningCredentialType(objRecord.type) + ); +} + +// Type guard for Web3SigningCredential +function isWeb3SigningCredential(obj: unknown): obj is Web3SigningCredential { + if (!obj || typeof obj !== "object") { + return false; + } + return ( + isWeb3SigningCredentialCactiKeychainRef(obj) || + isWeb3SigningCredentialGethKeychainPassword(obj) || + isWeb3SigningCredentialPrivateKeyHex(obj) || + isWeb3SigningCredentialNone(obj) + ); +} + +// Type guard for EthereumConfigJSON +export function isEthereumConfigJSON(obj: unknown): obj is EthereumConfigJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "keychainId" in obj && + typeof objRecord.keychainId === "string" && + "contractName" in obj && + typeof objRecord.contractName === "string" && + "contractAddress" in obj && + typeof objRecord.contractAddress === "string" && + "gas" in obj && + typeof objRecord.gas === "number" && + "signingCredential" in obj && + isWeb3SigningCredential(objRecord.signingCredential) && + (!("ethereumAssets" in obj) || isEvmAssetArray(objRecord.ethereumAssets)) && + "bungeeOptions" in obj && + isBungeeOptionsJSON(objRecord.bungeeOptions) && + "options" in obj && + isEthereumOptionsJSON(objRecord.options) && + "claimFormat" in obj && + isClaimFormat(objRecord.claimFormat) + ); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumOptions.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumOptions.ts new file mode 100644 index 0000000000..54fb3d7113 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateEthereumOptions.ts @@ -0,0 +1,59 @@ +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { isLogLevelDesc } from "../validateSatpLogLevel"; +import { + createPluginRegistry, + isPluginRegistryOptionsJSON, + PluginRegistryOptionsJSON, +} from "./validatePluginRegistryOptions"; +import { IPluginLedgerConnectorEthereumOptions } from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; + +export interface EthereumOptionsJSON { + instanceId: string; + rpcApiHttpHost: string; + rpcApiWsHost: string; + pluginRegistryOptions: PluginRegistryOptionsJSON; + logLevel?: LogLevelDesc; +} + +export function isEthereumOptionsJSON( + obj: unknown, +): obj is EthereumOptionsJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "instanceId" in obj && + typeof objRecord.instanceId === "string" && + (!("rpcApiHttpHost" in obj) || + typeof objRecord.rpcApiHttpHost === "string") && + (!("rpcApiWsHost" in obj) || typeof objRecord.rpcApiWsHost === "string") && + "pluginRegistryOptions" in obj && + isPluginRegistryOptionsJSON(objRecord.pluginRegistryOptions) && + (!("logLevel" in obj) || isLogLevelDesc(objRecord.logLevel)) + ); +} + +// Function to create IPluginLedgerConnectorEthereumOptions from EthereumOptionsJSON +export function createEthereumOptions( + options: EthereumOptionsJSON, +): IPluginLedgerConnectorEthereumOptions { + if (!options) { + throw new TypeError( + "Invalid options in EthereumConfig: " + JSON.stringify(options), + ); + } + + const ethereumOptions: IPluginLedgerConnectorEthereumOptions = { + instanceId: options.instanceId, + rpcApiHttpHost: options.rpcApiHttpHost, + rpcApiWsHost: options.rpcApiWsHost, + pluginRegistry: createPluginRegistry( + options.pluginRegistryOptions, + options.logLevel, + ), + logLevel: options.logLevel, + }; + + return ethereumOptions; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricConfig.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricConfig.ts new file mode 100644 index 0000000000..9e5563ae27 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricConfig.ts @@ -0,0 +1,128 @@ +import { + FabricSigningCredential, + FabricSigningCredentialType, + VaultTransitKey, + WebSocketKey, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; + +import { FabricAsset } from "../../core/stage-services/satp-bridge/types/fabric-asset"; +import { isAsset } from "./validateAsset"; +import { NetworkConfigJSON } from "../validateSatpBridgesConfig"; +import { + FabricOptionsJSON, + isFabricOptionsJSON, +} from "./validateFabricOptions"; +import { + BungeeOptionsJSON, + isBungeeOptionsJSON, + isClaimFormat, +} from "./validateBungeeOptions"; +import { ClaimFormat } from "../../generated/proto/cacti/satp/v02/common/message_pb"; + +export interface FabricConfigJSON extends NetworkConfigJSON { + signingCredential: FabricSigningCredential; + channelName: string; + contractName: string; + options: FabricOptionsJSON; + bungeeOptions: BungeeOptionsJSON; + fabricAssets?: FabricAsset[]; + claimFormat: ClaimFormat; +} + +// Type guard for FabricAsset +function isFabricAsset(obj: unknown): obj is FabricAsset { + const objRecord = obj as Record; + return ( + isAsset(obj) && + "mspId" in obj && + typeof objRecord.mspId === "string" && + "channelName" in obj && + typeof objRecord.channelName === "string" + ); +} + +// Type guard for an array of FabricAsset +function isFabricAssetArray(input: unknown): input is Array { + return Array.isArray(input) && input.every(isFabricAsset); +} + +// Type guard for FabricSigningCredentialType +export function isFabricSigningCredentialType( + value: unknown, +): value is FabricSigningCredentialType { + return ( + typeof value === "string" && + value !== null && + (value === FabricSigningCredentialType.X509 || + value === FabricSigningCredentialType.VaultX509 || + value === FabricSigningCredentialType.WsX509) + ); +} + +// Type guard for VaultTransitKey +function isVaultTransitKey(obj: unknown): obj is VaultTransitKey { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "keyName" in obj && + typeof objRecord.keyName === "string" && + "token" in obj && + typeof objRecord.token === "string" + ); +} + +// Type guard for WebSocketKey +function isWebSocketKey(obj: unknown): obj is WebSocketKey { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "sessionId" in obj && + typeof objRecord.sessionId === "string" && + "signature" in obj && + typeof objRecord.signature === "string" + ); +} + +// Type guard for FabricSigningCredential +function isFabricSigningCredential( + obj: unknown, +): obj is FabricSigningCredential { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "keychainId" in obj && + typeof objRecord.keychainId === "string" && + "keychainRef" in obj && + typeof objRecord.keychainRef === "string" && + (!("type" in obj) || isFabricSigningCredentialType(objRecord.type)) && + (!("vaultTransitKey" in obj) || + isVaultTransitKey(objRecord.vaultTransitKey)) && + (!("webSocketKey" in obj) || isWebSocketKey(objRecord.webSocketKey)) + ); +} + +// Type guard for FabricConfigJSON +export function isFabricConfigJSON(obj: unknown): obj is FabricConfigJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "channelName" in obj && + typeof objRecord.channelName === "string" && + "contractName" in obj && + typeof objRecord.contractName === "string" && + "signingCredential" in obj && + isFabricSigningCredential(objRecord.signingCredential) && + (!("fabricAssets" in obj) || isFabricAssetArray(objRecord.fabricAssets)) && + "bungeeOptions" in obj && + isBungeeOptionsJSON(objRecord.bungeeOptions) && + "options" in obj && + isFabricOptionsJSON(objRecord.options) && + "claimFormat" in obj && + isClaimFormat(objRecord.claimFormat) + ); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricOptions.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricOptions.ts new file mode 100644 index 0000000000..ff22f97474 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validateFabricOptions.ts @@ -0,0 +1,272 @@ +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { isLogLevelDesc } from "../validateSatpLogLevel"; +import { + createPluginRegistry, + isPluginRegistryOptionsJSON, + PluginRegistryOptionsJSON, +} from "./validatePluginRegistryOptions"; +import { + ConnectionProfile, + ConnectionProfileClient, + DefaultEventHandlerStrategy, + FabricSigningCredentialType, + GatewayDiscoveryOptions, + GatewayEventHandlerOptions, + IPluginLedgerConnectorFabricOptions, + IVaultConfig, + IWebSocketConfig, + SignPayloadCallback, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { isFabricSigningCredentialType } from "./validateFabricConfig"; + +interface ConfigJSON { + host: string; + port: number; + username: string; + privateKey: string; +} + +export interface FabricOptionsJSON { + instanceId: string; + peerBinary: string; + dockerBinary?: string; + goBinary?: string; + cliContainerGoPath?: string; + cliContainerEnv: NodeJS.ProcessEnv; + sshConfig: ConfigJSON; + readonly sshDebugOn?: boolean; + connectionProfile: ConnectionProfile; + discoveryOptions?: GatewayDiscoveryOptions; + eventHandlerOptions?: GatewayEventHandlerOptions; + supportedIdentity?: FabricSigningCredentialType[]; + vaultConfig?: IVaultConfig; + webSocketConfig?: IWebSocketConfig; + signCallback?: SignPayloadCallback; + pluginRegistryOptions: PluginRegistryOptionsJSON; + logLevel?: LogLevelDesc; +} + +// Type guard for NodeJS.ProcessEnv +function isProcessEnv(obj: unknown): obj is NodeJS.ProcessEnv { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + Object.keys(obj).every( + (key) => + typeof objRecord[key] === "string" || + typeof objRecord[key] === "undefined", + ) && + (!("TZ" in obj) || typeof objRecord.TZ === "string") + ); +} + +// Type guard for ConfigJSON +function isConfigJSON(obj: unknown): obj is ConfigJSON { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "host" in obj && + typeof objRecord.host === "string" && + "port" in obj && + typeof objRecord.port === "number" && + "username" in obj && + typeof objRecord.username === "string" && + "privateKey" in obj && + typeof objRecord.privateKey === "string" + ); +} + +// Type guard for ConnectionProfileClient +function isConnectionProfileClient( + obj: unknown, +): obj is ConnectionProfileClient { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + (!("organization" in obj) || typeof objRecord.organization === "object") + ); +} + +// Type guard for ConnectionProfile +export function isConnectionProfile(obj: unknown): obj is ConnectionProfile { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "name" in obj && + typeof objRecord.name === "string" && + "version" in obj && + typeof objRecord.version === "string" && + "organizations" in obj && + typeof objRecord.organizations === "object" && + "peers" in obj && + typeof objRecord.peers === "object" && + (!("x-type" in obj) || typeof objRecord["x-type"] === "string") && + (!("description" in obj) || typeof objRecord.description === "string") && + (!("client" in obj) || isConnectionProfileClient(objRecord.client)) && + (!("channels" in obj) || typeof objRecord.channels === "object") && + (!("orderers" in obj) || typeof objRecord.orderers === "object") && + (!("certificateAuthorities" in obj) || + typeof objRecord.certificateAuthorities === "object") + ); +} + +// Type guard for GatewayDiscoveryOptions +function isGatewayDiscoveryOptions( + obj: unknown, +): obj is GatewayDiscoveryOptions { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + (!("asLocalhost" in obj) || typeof objRecord.asLocalhost === "boolean") && + (!("enabled" in obj) || typeof objRecord.enabled === "boolean") + ); +} + +// Type guard for DefaultEventHandlerStrategy +function isDefaultEventHandlerStrategy( + obj: unknown, +): obj is DefaultEventHandlerStrategy { + return ( + obj !== null && + typeof obj === "string" && + (obj === DefaultEventHandlerStrategy.MspidScopeAllfortx || + obj === DefaultEventHandlerStrategy.MspidScopeAnyfortx || + obj === DefaultEventHandlerStrategy.NetworkScopeAllfortx || + obj === DefaultEventHandlerStrategy.NetworkScopeAnyfortx) + ); +} + +// Type guard for GatewayEventHandlerOptions +function isGatewayEventHandlerOptions( + obj: unknown, +): obj is GatewayEventHandlerOptions { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + "strategy" in obj && + isDefaultEventHandlerStrategy(objRecord.strategy) && + (!("commitTimeout" in obj) || + typeof objRecord.commitTimeout === "number") && + (!("endorseTimeout" in obj) || typeof objRecord.endorseTimeout === "number") + ); +} + +// Type guard for IVaultConfig +function isIVaultConfig(obj: unknown): obj is IVaultConfig { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + (!("endpoint" in obj) || typeof objRecord.endpoint === "string") && + (!("transitEngineMountPath" in obj) || + typeof objRecord.transitEngineMountPath === "string") + ); +} + +// Type guard for IWebSocketConfig +function isIWebSocketConfig(obj: unknown): obj is IWebSocketConfig { + const objRecord = obj as Record; + return ( + typeof obj === "object" && + obj !== null && + (!("endpoint" in obj) || typeof objRecord.endpoint === "string") && + (!("pathPrefix" in obj) || typeof objRecord.pathPrefix === "string") && + (!("strictSSL" in obj) || typeof objRecord.strictSSL === "boolean") + ); +} + +// Type guard for SignPayloadCallback +function isSignPayloadCallback(obj: unknown): obj is SignPayloadCallback { + return ( + typeof obj === "function" && + // Check if the function accepts exactly two parameters: + obj.length === 2 && + // Check if the function returns a promise + (obj as (...args: unknown[]) => unknown)(Buffer.alloc(0), {}) instanceof + Promise + ); +} + +// Type guard for FabricOptionsJSON +export function isFabricOptionsJSON(obj: unknown): obj is FabricOptionsJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "instanceId" in obj && + typeof objRecord.instanceId === "string" && + "peerBinary" in obj && + typeof objRecord.peerBinary === "string" && + (!("dockerBinary" in obj) || typeof objRecord.dockerBinary === "string") && + (!("goBinary" in obj) || typeof objRecord.goBinary === "string") && + (!("cliContainerGoPath" in obj) || + typeof objRecord.cliContainerGoPath === "string") && + "cliContainerEnv" in obj && + isProcessEnv(objRecord.cliContainerEnv) && + "sshConfig" in obj && + isConfigJSON(obj.sshConfig) && + (!("sshDebugOn" in obj) || typeof objRecord.sshDebugOn === "boolean") && + (!("discoveryOptions" in obj) || + isGatewayDiscoveryOptions(objRecord.discoveryOptions)) && + (!("eventHandlerOptions" in obj) || + isGatewayEventHandlerOptions(objRecord.eventHandlerOptions)) && + (!("supportedIdentity" in obj) || + isFabricSigningCredentialType(objRecord.supportedIdentity)) && + (!("vaultConfig" in obj) || isIVaultConfig(objRecord.vaultConfig)) && + (!("webSocketConfig" in obj) || + isIWebSocketConfig(objRecord.webSocketConfig)) && + (!("signCallback" in obj) || + isSignPayloadCallback(objRecord.signCallback)) && + "pluginRegistryOptions" in obj && + isPluginRegistryOptionsJSON(objRecord.pluginRegistryOptions) && + (!("logLevel" in obj) || isLogLevelDesc(objRecord.logLevel)) + ); +} + +// Function to create IPluginLedgerConnectorFabricOptions from FabricOptionsJSON +export function createFabricOptions( + options: FabricOptionsJSON, +): IPluginLedgerConnectorFabricOptions { + if (!options) { + throw new TypeError( + "Invalid options in FabricConfig: " + JSON.stringify(options), + ); + } + + const fabricOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: options.instanceId, + peerBinary: options.peerBinary, + dockerBinary: options.dockerBinary, + goBinary: options.goBinary, + cliContainerGoPath: options.cliContainerGoPath, + cliContainerEnv: options.cliContainerEnv, + sshConfig: { + host: options.sshConfig.host, + port: options.sshConfig.port, + privateKey: options.sshConfig.privateKey, + username: options.sshConfig.username, + }, + sshDebugOn: options.sshDebugOn, + connectionProfile: options.connectionProfile, + discoveryOptions: options.discoveryOptions, + eventHandlerOptions: options.eventHandlerOptions, + supportedIdentity: options.supportedIdentity, + vaultConfig: options.vaultConfig, + webSocketConfig: options.webSocketConfig, + signCallback: options.signCallback, + pluginRegistry: createPluginRegistry( + options.pluginRegistryOptions, + options.logLevel, + ), + logLevel: options.logLevel, + }; + + return fabricOptions; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validatePluginRegistryOptions.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validatePluginRegistryOptions.ts new file mode 100644 index 0000000000..67afa3f1e1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/bridges-config-validating-functions/validatePluginRegistryOptions.ts @@ -0,0 +1,123 @@ +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { isLogLevelDesc } from "../validateSatpLogLevel"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; + +export interface KeychainBackendEntry { + keychainEntry: string; + keychainEntryValue: string; +} + +export interface KeychainOptionsJSON { + instanceId: string; + keychainId: string; + logLevel?: LogLevelDesc; + backend?: KeychainBackendEntry[]; + contractName?: string; + contractString?: string; +} + +export interface PluginRegistryOptionsJSON { + logLevel?: LogLevelDesc; + plugins?: KeychainOptionsJSON[]; +} + +// Type guard for the KeychainBackendEntry +function isKeychainBackendEntry(obj: unknown): obj is KeychainBackendEntry { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "keychainEntry" in obj && + typeof objRecord.keychainEntry === "string" && + "keychainEntryValue" in obj && + typeof objRecord.keychainEntryValue === "string" + ); +} + +// Type guard for an array of KeychainBackendEntry +function isKeychainBackendEntryArray( + input: unknown, +): input is Array { + return Array.isArray(input) && input.every(isKeychainBackendEntry); +} + +// Type guard for KeychainOptionsJSON +function isKeychainOptionsJSON(obj: unknown): obj is KeychainOptionsJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + "instanceId" in obj && + typeof objRecord.instanceId === "string" && + "keychainId" in obj && + typeof objRecord.keychainId === "string" && + (!("logLevel" in obj) || isLogLevelDesc(objRecord.logLevel)) && + (!("backend" in obj) || isKeychainBackendEntryArray(objRecord.backend)) && + (!("contractName" in obj) || typeof objRecord.contractName === "string") && + (!("contractString" in obj) || typeof objRecord.contractString === "string") + ); +} + +// Type guard for an array of KeychainOptionsJSON +function isKeychainOptionsJSONArray( + input: unknown, +): input is Array { + return Array.isArray(input) && input.every(isKeychainOptionsJSON); +} + +// Type guard for PluginRegistryOptionsJSON +export function isPluginRegistryOptionsJSON( + obj: unknown, +): obj is PluginRegistryOptionsJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + (!("logLevel" in obj) || isLogLevelDesc(objRecord.logLevel)) && + (!("plugins" in obj) || isKeychainOptionsJSONArray(objRecord.plugins)) + ); +} + +type KeyValuePair = [string, string]; + +// Function to create PluginRegistry from PluginRegistryOptionsJSON +export function createPluginRegistry( + pluginRegistryOptions?: PluginRegistryOptionsJSON, + logLevel?: LogLevelDesc, +): PluginRegistry { + if ( + pluginRegistryOptions === undefined || + pluginRegistryOptions.plugins === undefined + ) { + return new PluginRegistry(); + } + + const plugins: PluginKeychainMemory[] = []; + pluginRegistryOptions.plugins.forEach(async (pluginJSON) => { + const entryValuesArray: KeyValuePair[] = []; + pluginJSON.backend?.forEach((entry) => { + entryValuesArray.push([entry.keychainEntry, entry.keychainEntryValue]); + }); + const backend: Map = new Map(entryValuesArray); + const newPluginKeychainMemory = new PluginKeychainMemory({ + instanceId: pluginJSON.instanceId, + keychainId: pluginJSON.keychainId, + logLevel, + backend, + }); + if (pluginJSON.contractName && pluginJSON.contractString) { + await newPluginKeychainMemory.set( + pluginJSON.contractName, + pluginJSON.contractString, + ); + } + plugins.push(newPluginKeychainMemory); + }); + return new PluginRegistry({ + plugins: plugins, + }); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateKeyPairJSON.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateKeyPairJSON.ts new file mode 100644 index 0000000000..e05d7db305 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateKeyPairJSON.ts @@ -0,0 +1,32 @@ +interface keyPairJSON { + privateKey: string; + publicKey: string; +} + +// Type guard for the keyPairJSON +export function iskeyPairJSON(obj: unknown): obj is keyPairJSON { + return ( + typeof obj === "object" && + obj !== null && + "privateKey" in obj && + typeof (obj as Record).privateKey === "string" && + "publicKey" in obj && + typeof (obj as Record).publicKey === "string" + ); +} + +export function validateSatpKeyPairJSON(opts: { + readonly configValue: unknown; +}): keyPairJSON | undefined { + if (!opts || !opts.configValue) { + return; + } + + if (!iskeyPairJSON(opts.configValue)) { + throw new TypeError( + `Invalid config.gatewayKeyPair: ${JSON.stringify(opts.configValue)}.` + + ` Expected a keyPair object with 'publicKey' and 'privateKey' string fields.`, + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpBridgesConfig.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpBridgesConfig.ts new file mode 100644 index 0000000000..a1291f0482 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpBridgesConfig.ts @@ -0,0 +1,126 @@ +import { SupportedChain } from "../core/types"; +import { + BesuConfig, + EthereumConfig, + FabricConfig, + NetworkConfig, +} from "../types/blockchain-interaction"; +import { isSupportedChain } from "./validateSatpGatewayIdentity"; +import { isFabricConfigJSON } from "./bridges-config-validating-functions/validateFabricConfig"; +import { createFabricOptions } from "./bridges-config-validating-functions/validateFabricOptions"; +import { isBesuConfigJSON } from "./bridges-config-validating-functions/validateBesuConfig"; +import { createBesuOptions } from "./bridges-config-validating-functions/validateBesuOptions"; +import { isEthereumConfigJSON } from "./bridges-config-validating-functions/validateEthereumConfig"; +import { createEthereumOptions } from "./bridges-config-validating-functions/validateEthereumOptions"; +import { createBungeeOptions } from "./bridges-config-validating-functions/validateBungeeOptions"; + +export interface NetworkConfigJSON { + network: SupportedChain; +} + +// Type guard for NetworkConfigJSON +function isNetworkConfigJSON(obj: unknown): obj is NetworkConfigJSON { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + if (!("network" in obj) || !isSupportedChain(objRecord.network)) { + return false; + } + return ( + isFabricConfigJSON(objRecord) || + isBesuConfigJSON(objRecord) || + isEthereumConfigJSON(objRecord) + ); +} + +// Type guard for an array of NetworkConfigJSON +function isNetworkConfigJSONArray( + input: unknown, +): input is Array { + return Array.isArray(input) && input.every(isNetworkConfigJSON); +} + +export function validateSatpBridgesConfig(opts: { + readonly configValue: unknown; +}): Array { + if (!opts || !opts.configValue) { + return []; + } + + if (!isNetworkConfigJSONArray(opts.configValue)) { + throw new TypeError( + "Invalid config.bridgesConfig: " + JSON.stringify(opts.configValue), + ); + } + + const bridgesConfigParsed: NetworkConfig[] = []; + opts.configValue.forEach((config) => { + if (isFabricConfigJSON(config)) { + console.log("Validating FabricConfig BungeeOptions..."); + const bungeeOptions = createBungeeOptions(config.bungeeOptions); + console.log("FabricConfig BungeeOptions is valid."); + console.log("Validating FabricConfig Options..."); + const fabricOptions = createFabricOptions(config.options); + console.log("FabricConfig Options is valid."); + + const fabricConfig: FabricConfig = { + network: config.network, + signingCredential: config.signingCredential, + channelName: config.channelName, + contractName: config.contractName, + options: fabricOptions, + bungeeOptions: bungeeOptions, + fabricAssets: config.fabricAssets, + claimFormat: config.claimFormat, + }; + + bridgesConfigParsed.push(fabricConfig); + } else if (isBesuConfigJSON(config)) { + console.log("Validating BesuConfig BungeeOptions..."); + const bungeeOptions = createBungeeOptions(config.bungeeOptions); + console.log("BesuConfig BungeeOptions is valid."); + console.log("Validating BesuConfig Options..."); + const besuOptions = createBesuOptions(config.options); + console.log("BesuConfig Options is valid."); + + const besuConfig: BesuConfig = { + network: config.network, + keychainId: config.keychainId, + signingCredential: config.signingCredential, + contractName: config.contractName, + contractAddress: config.contractAddress, + gas: config.gas, + options: besuOptions, + bungeeOptions: bungeeOptions, + besuAssets: config.besuAssets, + claimFormat: config.claimFormat, + }; + + bridgesConfigParsed.push(besuConfig); + } else if (isEthereumConfigJSON(config)) { + console.log("Validating EthereumConfig BungeeOptions..."); + const bungeeOptions = createBungeeOptions(config.bungeeOptions); + console.log("EthereumConfig BungeeOptions is valid."); + console.log("Validating EthereumConfig Options..."); + const besuOptions = createEthereumOptions(config.options); + console.log("EthereumConfig Options is valid."); + + const ethereumConfig: EthereumConfig = { + network: config.network, + keychainId: config.keychainId, + signingCredential: config.signingCredential, + contractName: config.contractName, + contractAddress: config.contractAddress, + gas: config.gas, + options: besuOptions, + bungeeOptions: bungeeOptions, + ethereumAssets: config.ethereumAssets, + claimFormat: config.claimFormat, + }; + + bridgesConfigParsed.push(ethereumConfig); + } + }); + return bridgesConfigParsed; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpCounterPartyGateways.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpCounterPartyGateways.ts new file mode 100644 index 0000000000..a2e3a05cc7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpCounterPartyGateways.ts @@ -0,0 +1,26 @@ +import { GatewayIdentity } from "../core/types"; +import { isGatewayIdentity } from "./validateSatpGatewayIdentity"; + +// Type guard for an array of GatewayIdentity +function isGatewayIdentityArray( + input: unknown, +): input is Array { + return Array.isArray(input) && input.every(isGatewayIdentity); +} + +export function validateSatpCounterPartyGateways(opts: { + readonly configValue: unknown; +}): GatewayIdentity[] { + if ( + !opts || + !opts.configValue || + typeof opts.configValue !== "object" || + !isGatewayIdentityArray(opts.configValue) + ) { + throw new TypeError( + "Invalid config.counterPartyGateways: " + + JSON.stringify(opts.configValue), + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnableOpenAPI.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnableOpenAPI.ts new file mode 100644 index 0000000000..6a1fd68f26 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnableOpenAPI.ts @@ -0,0 +1,14 @@ +export function validateSatpEnableOpenAPI(opts: { + readonly configValue: unknown; +}): boolean { + if (!opts || !opts.configValue) { + return true; + } + + if (typeof opts.configValue !== "boolean") { + throw new TypeError( + `Invalid config.enableOpenAPI: ${opts.configValue}. Expected a boolean`, + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnvironment.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnvironment.ts new file mode 100644 index 0000000000..cc81ee7736 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpEnvironment.ts @@ -0,0 +1,17 @@ +export function validateSatpEnvironment(opts: { + readonly configValue: unknown; +}): "development" | "production" { + if (!opts || !opts.configValue) { + return "development"; + } + + if ( + typeof opts.configValue !== "string" || + (opts.configValue !== "development" && opts.configValue !== "production") + ) { + throw new TypeError( + `Invalid config.environment: ${opts.configValue}. Expected "development" or "production"`, + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpGatewayIdentity.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpGatewayIdentity.ts new file mode 100644 index 0000000000..7db5bb3a8f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpGatewayIdentity.ts @@ -0,0 +1,103 @@ +import { + Address, + CurrentDrafts, + DraftVersions, + GatewayIdentity, + SupportedChain, +} from "../core/types"; + +// Type guard for Address +function isAddress(input: unknown): input is Address { + if (typeof input !== "string") { + return false; + } + + if (input.startsWith("http://") || input.startsWith("https://")) { + return true; + } + + const ipv4Pattern = /^(\d{1,3}\.){3}\d{1,3}$/; + if (ipv4Pattern.test(input)) { + const octets = input.split(".").map(Number); + return octets.every((octet) => octet >= 0 && octet <= 255); + } + return false; +} + +// Type guard for DraftVersions +function isDraftVersions(obj: unknown): obj is DraftVersions { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return Object.values(CurrentDrafts).every( + (draft) => typeof objRecord[draft] === "string", + ); +} + +// Type guard for an array of DraftVersions +function isPrivacyDraftVersionsArray( + input: unknown, +): input is Array { + return Array.isArray(input) && input.every(isDraftVersions); +} + +// Type guard for SupportedChain +export function isSupportedChain(obj: unknown): obj is SupportedChain { + return ( + typeof obj === "string" && + obj !== null && + Object.values(SupportedChain).includes(obj as SupportedChain) + ); +} + +// Type guard for an array of SupportedChain +function isSupportedChainArray(input: unknown): input is Array { + return Array.isArray(input) && input.every(isSupportedChain); +} + +// Type guard for GatewayIdentity +export function isGatewayIdentity(obj: unknown): obj is GatewayIdentity { + return ( + typeof obj === "object" && + obj !== null && + "id" in obj && + typeof (obj as Record).id === "string" && + "version" in obj && + isPrivacyDraftVersionsArray((obj as Record).version) && + "supportedDLTs" in obj && + isSupportedChainArray((obj as Record).supportedDLTs) && + (!("pubKey" in obj) || + typeof (obj as Record).pubKey === "string") && + (!("name" in obj) || + typeof (obj as Record).name === "string") && + (!("proofID" in obj) || + typeof (obj as Record).proofID === "string") && + (!("gatewayServerPort" in obj) || + typeof (obj as Record).gatewayServerPort === "number") && + (!("gatewayClientPort" in obj) || + typeof (obj as Record).gatewayClientPort === "number") && + (!("gatewayOpenAPIPort" in obj) || + typeof (obj as Record).gatewayOpenAPIPort === + "number") && + (!("gatewayUIPort" in obj) || + typeof (obj as Record).gatewayUIPort === "number") && + (!("address" in obj) || isAddress((obj as Record).address)) + ); +} + +export function validateSatpGatewayIdentity(opts: { + readonly configValue: unknown; +}): GatewayIdentity { + if ( + !opts || + !opts.configValue || + typeof opts.configValue !== "object" || + !isGatewayIdentity(opts.configValue) + ) { + throw new TypeError( + "Invalid config.gid: " + JSON.stringify(opts.configValue), + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpLogLevel.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpLogLevel.ts new file mode 100644 index 0000000000..855969b342 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpLogLevel.ts @@ -0,0 +1,30 @@ +import { LogLevelDesc } from "@hyperledger/cactus-common"; + +// Type guard for LogLevelDesc +export function isLogLevelDesc(input: unknown): input is LogLevelDesc { + if (typeof input === "number") { + return Number.isInteger(input) && input >= 0 && input <= 5; + } + if (typeof input === "string") { + const normalizedInput = input.toUpperCase(); + return ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "SILENT"].includes( + normalizedInput, + ); + } + return false; +} + +export function validateSatpLogLevel(opts: { + readonly configValue: unknown; +}): LogLevelDesc { + if (!opts || !opts.configValue) { + return "INFO"; + } + + if (!isLogLevelDesc(opts.configValue)) { + throw new TypeError( + `Invalid config.logLevel: ${JSON.stringify(opts.configValue)}. Valid levels are: TRACE, DEBUG, INFO, WARN, ERROR, SILENT`, + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpMergePolicies.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpMergePolicies.ts new file mode 100644 index 0000000000..122132e5f5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpMergePolicies.ts @@ -0,0 +1,17 @@ +import { + IMergePolicyValue, + isMergePolicyValueArray, +} from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-merging/merge-policies"; + +export function validateSatpMergePolicies(opts: { + readonly configValue: unknown; +}): Array { + if (!opts || !opts.configValue) { + return []; + } + + if (!isMergePolicyValueArray(opts.configValue)) { + throw new TypeError(`Invalid config.mergePolicies: ${opts.configValue}.`); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpPrivacyPolicies.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpPrivacyPolicies.ts new file mode 100644 index 0000000000..fd14657464 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpPrivacyPolicies.ts @@ -0,0 +1,17 @@ +import { + IPrivacyPolicyValue, + isPrivacyPolicyValueArray, +} from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/view-creation/privacy-policies"; + +export function validateSatpPrivacyPolicies(opts: { + readonly configValue: unknown; +}): Array { + if (!opts || !opts.configValue) { + return []; + } + + if (!isPrivacyPolicyValueArray(opts.configValue)) { + throw new TypeError(`Invalid config.privacyPolicies: ${opts.configValue}.`); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpValidationOptions.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpValidationOptions.ts new file mode 100644 index 0000000000..c4f78373a6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/config-validating-functions/validateSatpValidationOptions.ts @@ -0,0 +1,74 @@ +import { ValidatorOptions } from "class-validator"; + +interface ValidationError { + target?: boolean; + value?: boolean; +} + +// Type guard for strings[] +function isStringArray(input: unknown): input is string[] { + return ( + Array.isArray(input) && input.every((item) => typeof item === "string") + ); +} + +// Type guard for ValidationError +function isValidationError(obj: unknown): obj is ValidationError { + if (typeof obj !== "object" || obj === null) { + return false; + } + const objRecord = obj as Record; + return ( + (!("target" in obj) || typeof objRecord.target === "boolean") && + (!("value" in obj) || typeof objRecord.value === "boolean") + ); +} + +// Type guard for ValidatorOptions +function isValidatorOptions(obj: unknown): obj is ValidatorOptions { + if (typeof obj !== "object" || obj === null) { + return false; + } + + const objRecord = obj as Record; + + return ( + (!("enableDebugMessages" in obj) || + typeof objRecord.enableDebugMessages === "boolean") && + (!("skipUndefinedProperties" in obj) || + typeof objRecord.skipUndefinedProperties === "boolean") && + (!("skipNullProperties" in obj) || + typeof objRecord.skipNullProperties === "boolean") && + (!("skipMissingProperties" in obj) || + typeof objRecord.skipMissingProperties === "boolean") && + (!("whitelist" in obj) || typeof objRecord.whitelist === "boolean") && + (!("forbidNonWhitelisted" in obj) || + typeof objRecord.forbidNonWhitelisted === "boolean") && + (!("groups" in obj) || isStringArray(objRecord.groups)) && + (!("always" in obj) || typeof objRecord.always === "boolean") && + (!("strictGroups" in obj) || typeof objRecord.strictGroups === "boolean") && + (!("dismissDefaultMessages" in obj) || + typeof objRecord.dismissDefaultMessages === "boolean") && + (!("validationError" in obj) || + isValidationError(objRecord.validationError)) && + (!("forbidUnknownValues" in obj) || + typeof objRecord.forbidUnknownValues === "boolean") && + (!("stopAtFirstError" in obj) || + typeof objRecord.stopAtFirstError === "boolean") + ); +} + +export function validateSatpValidationOptions(opts: { + readonly configValue: unknown; +}): ValidatorOptions { + if (!opts || !opts.configValue) { + return {}; + } + + if (!isValidatorOptions(opts.configValue)) { + throw new TypeError( + `Invalid config.validationOptions: ${opts.configValue}.`, + ); + } + return opts.configValue; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts index 176b8a960d..805f2c6760 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/constants.ts @@ -3,3 +3,6 @@ export const DEFAULT_PORT_GATEWAY_CLIENT = DEFAULT_PORT_GATEWAY_SERVER + 1; export const DEFAULT_PORT_GATEWAY_UI = DEFAULT_PORT_GATEWAY_SERVER + 2; export const DEFAULT_PORT_GATEWAY_API = 4010; export const SATP_VERSION = "v02"; +export const SATP_CORE_VERSION = "v02"; +export const SATP_ARCHITETURE_VERSION = "v02"; +export const SATP_CRASH_VERSION = "v02"; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts index fd1538c74a..79dba6cf99 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage0-handler.ts @@ -100,6 +100,7 @@ export class Stage0SATPHandler implements SATPHandler { return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToCreateMessageError(fnTag, "NewSessionResponse", error); } } @@ -139,6 +140,7 @@ export class Stage0SATPHandler implements SATPHandler { return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToCreateMessageError(fnTag, "NewSessionResponse", error); } } @@ -188,6 +190,7 @@ export class Stage0SATPHandler implements SATPHandler { return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "NewSessionRequest", error); } } @@ -228,6 +231,7 @@ export class Stage0SATPHandler implements SATPHandler { return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "PreSATPTransferRequest", error); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts index 4f059edc34..7e0490d722 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage1-handler.ts @@ -95,6 +95,7 @@ export class Stage1SATPHandler implements SATPHandler { } return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "TransferProposalRequest", error); } } @@ -134,6 +135,7 @@ export class Stage1SATPHandler implements SATPHandler { } return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "TransferCommenceResponse", error); } } @@ -181,6 +183,7 @@ export class Stage1SATPHandler implements SATPHandler { } return requestTransferProposal; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "TransferProposalRequest", error); } } @@ -218,6 +221,7 @@ export class Stage1SATPHandler implements SATPHandler { return requestTransferCommence; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "TransferCommenceRequest", error); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts index cdff4b874f..e5f89b03e6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage2-handler.ts @@ -87,6 +87,7 @@ export class Stage2SATPHandler implements SATPHandler { } return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError( fnTag, "LockAssertionImplementation", @@ -138,6 +139,7 @@ export class Stage2SATPHandler implements SATPHandler { } return request; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "LockAssertionRequest", error); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts index 571f3a403c..bf3a484ed6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-handlers/stage3-handler.ts @@ -92,6 +92,7 @@ export class Stage3SATPHandler implements SATPHandler { return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "CommitPreparationRequest", error); } } @@ -135,6 +136,7 @@ export class Stage3SATPHandler implements SATPHandler { return message; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError( fnTag, "CommitFinalAssertionRequest", @@ -165,6 +167,7 @@ export class Stage3SATPHandler implements SATPHandler { return new Empty({}); } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "TransferCompleteRequest", error); } } @@ -219,6 +222,7 @@ export class Stage3SATPHandler implements SATPHandler { } return request; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "CommitPreparationRequest", error); } } @@ -257,6 +261,7 @@ export class Stage3SATPHandler implements SATPHandler { } return request; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError( fnTag, "CommitFinalAssertionRequest", @@ -294,6 +299,7 @@ export class Stage3SATPHandler implements SATPHandler { } return request; } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "TransferCompleteRequest", error); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts index f8a3d485b0..f84684b64d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage0-client-service.ts @@ -324,6 +324,7 @@ export class Stage0ClientService extends SATPService { sign(this.Signer, sessionData.senderWrapAssertionClaim.receipt), ); } catch (error) { + this.logger.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "WrapToken"); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts index f15d675bd4..a72238b5e7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage2-client-service.ts @@ -241,6 +241,7 @@ export class Stage2ClientService extends SATPService { sign(this.Signer, sessionData.lockAssertionClaim.receipt), ); } catch (error) { + this.logger.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "LockAsset"); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts index 99169f647a..1d6db94301 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage3-client-service.ts @@ -504,6 +504,7 @@ export class Stage3ClientService extends SATPService { sign(this.Signer, sessionData.burnAssertionClaim.receipt), ); } catch (error) { + this.logger.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "BurnAsset"); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts index 8c0f103db5..f2bcf7b36e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage0-server-service.ts @@ -405,6 +405,7 @@ export class Stage0ServerService extends SATPService { sign(this.Signer, sessionData.receiverWrapAssertionClaim.receipt), ); } catch (error) { + this.Log.debug(`Crash in ${fnTag}`, error); throw new Error(`${fnTag}, Failed to process Wrap Asset ${error}`); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts index b898d5eba5..1b4681f5dd 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage3-server-service.ts @@ -435,6 +435,7 @@ export class Stage3ServerService extends SATPService { sign(this.Signer, sessionData.mintAssertionClaim.receipt), ); } catch (error) { + this.logger.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "MintAsset"); } } @@ -491,6 +492,7 @@ export class Stage3ServerService extends SATPService { sign(this.Signer, sessionData.assignmentAssertionClaim.receipt), ); } catch (error) { + this.logger.debug(`Crash in ${fnTag}`, error); throw new FailedToProcessError(fnTag, "AssignAsset"); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts index 536c407b44..c505dec979 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gol/satp-bridges-manager.ts @@ -53,7 +53,7 @@ export class SATPBridgesManager { bridge = new FabricBridge(bridgeConfig as FabricConfig, this.level); break; case SupportedChain.BESU: - bridge = new BesuBridge(bridgeConfig as BesuConfig); + bridge = new BesuBridge(bridgeConfig as BesuConfig, this.level); break; case SupportedChain.EVM: bridge = new EthereumBridge(bridgeConfig as EthereumConfig); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts index 1b830bb5ed..5f02d4d2ae 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts @@ -1,63 +1,140 @@ #!/usr/bin/env node -import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; +import { LoggerProvider } from "@hyperledger/cactus-common"; import { SATPGateway, SATPGatewayConfig } from "./plugin-satp-hermes-gateway"; -import { SupportedChain, DraftVersions, CurrentDrafts } from "./core/types"; -import dotenv from "dotenv"; +import fs from "fs-extra"; -export async function launchGateway(env?: NodeJS.ProcessEnv): Promise { - dotenv.config(); +import { validateSatpGatewayIdentity } from "./config-validating-functions/validateSatpGatewayIdentity"; +import { validateSatpCounterPartyGateways } from "./config-validating-functions/validateSatpCounterPartyGateways"; +import { validateSatpLogLevel } from "./config-validating-functions/validateSatpLogLevel"; +import { validateSatpEnvironment } from "./config-validating-functions/validateSatpEnvironment"; +import { validateSatpEnableOpenAPI } from "./config-validating-functions/validateSatpEnableOpenAPI"; +import { validateSatpValidationOptions } from "./config-validating-functions/validateSatpValidationOptions"; +import { validateSatpPrivacyPolicies } from "./config-validating-functions/validateSatpPrivacyPolicies"; +import { validateSatpMergePolicies } from "./config-validating-functions/validateSatpMergePolicies"; +import { validateSatpKeyPairJSON } from "./config-validating-functions/validateKeyPairJSON"; +import { validateSatpBridgesConfig } from "./config-validating-functions/validateSatpBridgesConfig"; +import path from "path"; - const logLevel: LogLevelDesc = - (env?.SATP_LOG_LEVEL as LogLevelDesc) || "INFO"; +export async function launchGateway(): Promise { const logger = LoggerProvider.getOrCreate({ - level: logLevel, + level: "DEBUG", label: "SATP-Gateway", }); - // Parse the version string into DraftVersions object - const parseVersion = (versionString: string): DraftVersions => { - const [Core, Architecture, Crash] = versionString.split(","); - return { - [CurrentDrafts.Core]: Core, - [CurrentDrafts.Architecture]: Architecture, - [CurrentDrafts.Crash]: Crash, - }; - }; + logger.debug("Checking for configuration file..."); + let configFilePath: string | undefined; + + const possiblePaths = [ + "/opt/cacti/satp-hermes/gateway-config.json", + "/gateway-config.json", + path.join(process.cwd(), "gateway-config.json"), + ]; + + for (const path of possiblePaths) { + if (fs.existsSync(path)) { + configFilePath = path; + logger.debug(`Found gateway-config.json at: ${path}`); + break; + } + } + + if (!configFilePath) { + throw new Error( + `Could not find gateway-config.json in any of the expected locations: ${possiblePaths.join(", ")}`, + ); + } + + logger.debug(`Reading configuration from: ${configFilePath}`); + const config = await fs.readJson(configFilePath); + logger.debug(`Configuration read OK`); + + // validating gateway-config.json + + logger.debug("Validating SATP Gateway Identity..."); + const gid = validateSatpGatewayIdentity({ + configValue: config.gid, + }); + logger.debug("Valid SATP Gateway Identity"); + + logger.debug("Validating SATP Counter Party Gateways..."); + const counterPartyGateways = validateSatpCounterPartyGateways({ + configValue: config.counterPartyGateways, + }); + logger.debug("Valid SATP Counter Party Gateways"); + + logger.debug("Validating SATP Log Level..."); + const logLevel = validateSatpLogLevel({ + configValue: config.logLevel, + }); + logger.debug("SATP Log Level is valid."); + + logger.debug("Validating SATP Environment..."); + const environment = validateSatpEnvironment({ + configValue: config.environment, + }); + logger.debug("SATP Environment is valid."); + + logger.debug("Validating SATP Enable OpenAPI..."); + const enableOpenAPI = validateSatpEnableOpenAPI({ + configValue: config.enableOpenAPI, + }); + logger.debug("SATP Enable OpenAPI is valid."); + + logger.debug("Validating SATP Validation Options..."); + const validationOptions = validateSatpValidationOptions({ + configValue: config.validationOptions, + }); + logger.debug("SATP Validation Options is valid."); + + logger.debug("Validating SATP Privacy Policies..."); + const privacyPolicies = validateSatpPrivacyPolicies({ + configValue: config.validationOptions, + }); + logger.debug("SATP Privacy Policies is valid."); + privacyPolicies.forEach((p, i) => + logger.debug("Privacy Policy #%d => %o", i, p), + ); + + logger.debug("Validating SATP Merge Policies..."); + const mergePolicies = validateSatpMergePolicies({ + configValue: config.mergePolicies, + }); + logger.debug("SATP Merge Policies is valid."); + mergePolicies.forEach((p, i) => logger.debug("Merge Policy #%d => %o", i, p)); + + logger.debug("Validating SATP KeyPair..."); + const keyPair = validateSatpKeyPairJSON({ + configValue: config.gatewayKeyPair, + }); + logger.debug("SATP KeyPair is valid."); + + logger.debug("Validating SATP Bridges Config..."); + const bridgesConfig = validateSatpBridgesConfig({ + configValue: config.bridgesConfig, + }); + logger.debug("SATP Bridges Config is valid."); + logger.debug("Creating SATPGatewayConfig..."); const gatewayConfig: SATPGatewayConfig = { - gid: { - id: env?.SATP_GATEWAY_ID || "", - name: env?.SATP_GATEWAY_NAME, - version: env?.SATP_GATEWAY_VERSION - ? [parseVersion(env.SATP_GATEWAY_VERSION)] - : [], - supportedDLTs: - env?.SATP_SUPPORTED_DLTS?.split(",").map( - (dlt) => dlt as SupportedChain, - ) || [], - proofID: env?.SATP_PROOF_ID, - gatewayServerPort: parseInt(env?.SATP_GATEWAY_SERVER_PORT || "0", 10), - gatewayClientPort: parseInt(env?.SATP_GATEWAY_CLIENT_PORT || "0", 10), - gatewayOpenAPIPort: parseInt(env?.DEFAULT_PORT_GATEWAY_API || "0", 10), - address: env?.SATP_GATEWAY_ADDRESS as - | `http://${string}` - | `https://${string}` - | undefined, - }, - counterPartyGateways: JSON.parse(env?.SATP_COUNTER_PARTY_GATEWAYS || "[]"), + gid, + counterPartyGateways, logLevel, - keyPair: { - privateKey: Buffer.from(env?.SATP_PRIVATE_KEY || "", "hex"), - publicKey: Buffer.from(env?.SATP_PUBLIC_KEY || "", "hex"), - }, - environment: - (env?.SATP_NODE_ENV as "development" | "production") || "development", - enableOpenAPI: env?.SATP_ENABLE_OPEN_API === "true", - validationOptions: JSON.parse(env?.SATP_VALIDATION_OPTIONS || "{}"), - privacyPolicies: JSON.parse(env?.SATP_PRIVACY_POLICIES || "[]"), - mergePolicies: JSON.parse(env?.SATP_MERGE_POLICIES || "[]"), + keyPair: + keyPair === undefined + ? undefined + : { + publicKey: Buffer.from(keyPair.publicKey, "hex"), + privateKey: Buffer.from(keyPair.privateKey, "hex"), + }, + environment, + enableOpenAPI, + validationOptions, + privacyPolicies, + mergePolicies, + bridgesConfig, }; + logger.debug("SATPGatewayConfig created successfully"); const gateway = new SATPGateway(gatewayConfig); try { @@ -72,5 +149,5 @@ export async function launchGateway(env?: NodeJS.ProcessEnv): Promise { } if (require.main === module) { - launchGateway(process.env); + launchGateway(); } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index 38ed98a4b7..48e54902e7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -17,8 +17,6 @@ import { Contains, } from "class-validator"; -import path from "path"; - import { SATPGatewayConfig, GatewayIdentity, @@ -36,6 +34,9 @@ import { DEFAULT_PORT_GATEWAY_API, DEFAULT_PORT_GATEWAY_CLIENT, DEFAULT_PORT_GATEWAY_SERVER, + SATP_ARCHITETURE_VERSION, + SATP_CORE_VERSION, + SATP_CRASH_VERSION, } from "./core/constants"; import { bufArray2HexStr } from "./gateway-utils"; import { @@ -43,7 +44,6 @@ import { IRemoteLogRepository, } from "./repository/interfaces/repository"; import { BLODispatcher, BLODispatcherOptions } from "./blo/dispatcher"; -import fs from "fs"; import swaggerUi, { JsonObject } from "swagger-ui-express"; import { IPluginWebService, @@ -56,6 +56,9 @@ import { } from "./gol/satp-bridges-manager"; import bodyParser from "body-parser"; import cors from "cors"; + +import * as OAS from "../json/openapi-blo-bundled.json"; + export class SATPGateway implements IPluginWebService, ICactusPlugin { // todo more checks; example port from config is between 3000 and 9000 @IsDefined() @@ -170,11 +173,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { this.BLODispatcher = new BLODispatcher(dispatcherOps); this.OAPIServerEnabled = this.config.enableOpenAPI ?? true; - const specPath = path.join(__dirname, "../json/openapi-blo-bundled.json"); - this.OAS = JSON.parse(fs.readFileSync(specPath, "utf8")); - if (!this.OAS) { - this.logger.warn("Error loading OAS"); - } + this.OAS = OAS; } /* ICactus Plugin methods */ @@ -274,19 +273,16 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { name: id, version: [ { - Core: "v02", - Architecture: "v02", - Crash: "v02", + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, }, ], - supportedDLTs: [ - SupportedChain.FABRIC, - SupportedChain.BESU, - SupportedChain.EVM, - ], + supportedDLTs: [], proofID: "mockProofID1", gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, + gatewayOpenAPIPort: DEFAULT_PORT_GATEWAY_API, address: "http://localhost", }; } else { @@ -307,19 +303,15 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { if (!pluginOptions.gid.version) { pluginOptions.gid.version = [ { - Core: "v02", - Architecture: "v02", - Crash: "v02", + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, }, ]; } if (!pluginOptions.gid.supportedDLTs) { - pluginOptions.gid.supportedDLTs = [ - SupportedChain.FABRIC, - SupportedChain.BESU, - SupportedChain.EVM, - ]; + pluginOptions.gid.supportedDLTs = []; } if (!pluginOptions.gid.proofID) { @@ -337,23 +329,40 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { if (!pluginOptions.gid.gatewayOpenAPIPort) { pluginOptions.gid.gatewayOpenAPIPort = DEFAULT_PORT_GATEWAY_API; } + } - if (!pluginOptions.logLevel) { - pluginOptions.logLevel = "DEBUG"; - } + if (!pluginOptions.counterPartyGateways) { + pluginOptions.counterPartyGateways = []; + } - if (!pluginOptions.environment) { - pluginOptions.environment = "development"; - } + if (!pluginOptions.logLevel) { + pluginOptions.logLevel = "DEBUG"; + } - if (!pluginOptions.enableOpenAPI) { - pluginOptions.enableOpenAPI = true; - } + if (!pluginOptions.environment) { + pluginOptions.environment = "development"; + } - if (!pluginOptions.validationOptions) { - // do nothing - } + if (!pluginOptions.enableOpenAPI) { + pluginOptions.enableOpenAPI = true; + } + + if (!pluginOptions.validationOptions) { + pluginOptions.validationOptions = {}; + } + + if (!pluginOptions.privacyPolicies) { + pluginOptions.privacyPolicies = []; } + + if (!pluginOptions.mergePolicies) { + pluginOptions.mergePolicies = []; + } + + if (!pluginOptions.bridgesConfig) { + pluginOptions.bridgesConfig = []; + } + return pluginOptions; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/health-check-endpoint.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/health-check-endpoint.ts new file mode 100644 index 0000000000..63b416d61f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/health-check-endpoint.ts @@ -0,0 +1,79 @@ +import type { Express, Request, Response } from "express"; +import { + IEndpointAuthzOptions, + IExpressRequestHandler, + IWebServiceEndpoint, +} from "@hyperledger/cactus-core-api"; +import { + Checks, + Logger, + LoggerProvider, + IAsyncProvider, +} from "@hyperledger/cactus-common"; +import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; +import { IRequestOptions } from "../core/types"; + +export class HealthCheckEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "HealthCheckEndpointV1"; + private readonly log: Logger; + + public get className(): string { + return HealthCheckEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IRequestOptions) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + Checks.truthy(options.dispatcher, `${fnTag} arg options.connector`); + const level = "INFO"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getPath(): string { + return "/api/v1/@hyperledger/cactus-plugin-satp-hermes/healthcheck"; + } + + public getVerbLowerCase(): string { + return "get"; + } + + public getOperationId(): string { + return "HealthCheck"; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + // TODO: make this an injectable dependency in the constructor + return { + get: async () => ({ + isProtected: false, + requiredRoles: [], + }), + }; + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async handleRequest(req: Request, res: Response): Promise { + const reqTag = `${this.getPath()}`; + this.log.debug(reqTag); + try { + res.status(200).json({ status: "OK" }); + } catch (ex) { + this.log.error(`Crash while serving ${reqTag}`, ex); + res.status(500).json({ + message: "Internal Server Error", + error: ex?.stack || ex?.message, + }); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts index 54766843c0..dff6467ebc 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/gateway-init-startup.test.ts @@ -18,6 +18,11 @@ import { ShutdownHook, SupportedChain, } from "./../../../main/typescript/core/types"; +import { + DEFAULT_PORT_GATEWAY_API, + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_SERVER, +} from "../../../main/typescript/core/constants"; const logLevel: LogLevelDesc = "DEBUG"; const logger = LoggerProvider.getOrCreate({ @@ -58,12 +63,10 @@ describe("SATPGateway initialization", () => { Crash: "v02", }, ]); - expect(identity.supportedDLTs).toEqual([ - SupportedChain.FABRIC, - SupportedChain.BESU, - ]); - expect(identity.proofID).toBe("mockProofID1"); - expect(identity.gatewayServerPort).toBe(3010); + expect(identity.supportedDLTs).toEqual([]); + expect(identity.gatewayServerPort).toBe(DEFAULT_PORT_GATEWAY_SERVER); + expect(identity.gatewayClientPort).toBe(DEFAULT_PORT_GATEWAY_CLIENT); + expect(identity.gatewayOpenAPIPort).toBe(DEFAULT_PORT_GATEWAY_API); expect(identity.address).toBe("http://localhost"); }); @@ -214,12 +217,10 @@ describe("SATPGateway startup", () => { Crash: "v02", }, ]); - expect(identity.supportedDLTs).toEqual([ - SupportedChain.FABRIC, - SupportedChain.BESU, - ]); - expect(identity.proofID).toBe("mockProofID1"); - expect(identity.gatewayClientPort).toBe(3011); + expect(identity.supportedDLTs).toEqual([]); + expect(identity.gatewayServerPort).toBe(DEFAULT_PORT_GATEWAY_SERVER); + expect(identity.gatewayClientPort).toBe(DEFAULT_PORT_GATEWAY_CLIENT); + expect(identity.gatewayOpenAPIPort).toBe(DEFAULT_PORT_GATEWAY_API); expect(identity.address).toBe("http://localhost"); }); @@ -281,8 +282,8 @@ describe("SATPGateway startup", () => { ], supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], proofID: "mockProofID10", - gatewayClientPort: 3010, - gatewayServerPort: 3011, + gatewayServerPort: 13010, + gatewayClientPort: 13011, gatewayOpenAPIPort: 4010, address: "http://localhost", }, @@ -291,7 +292,8 @@ describe("SATPGateway startup", () => { expect(gateway).toBeInstanceOf(SATPGateway); const identity = gateway.Identity; - expect(identity.gatewayClientPort).toBe(3010); + expect(identity.gatewayServerPort).toBe(13010); + expect(identity.gatewayClientPort).toBe(13011); expect(identity.address).toBe("http://localhost"); await gateway.startup(); await gateway.shutdown(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-dockerization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-dockerization.test.ts new file mode 100644 index 0000000000..509a5e0ca8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-1-gateway-dockerization.test.ts @@ -0,0 +1,1305 @@ +import { randomUUID as uuidv4 } from "node:crypto"; +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +// import { v4 as internalIpV4 } from "internal-ip"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, + ConnectionProfile, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; + +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + SATPGatewayRunner, + ISATPGatewayRunnerConstructorOptions, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + BesuConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { Account } from "web3-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { TransactRequest, Asset } from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { createClient } from "../test-utils"; +import { + DEFAULT_PORT_GATEWAY_API, + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_SERVER, + SATP_CORE_VERSION, + SATP_ARCHITETURE_VERSION, + SATP_CRASH_VERSION, +} from "../../../main/typescript/core/constants"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let fabricServer: Server; + +let besuLedger: BesuTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeBesuOptions: IPluginBungeeHermesOptions; + +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let keychainPluginBridge: PluginKeychainMemory; +let keychainEntryKeyBridge: string; +let keychainEntryValueBridge: string; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; + +let besuOptionsKeychainEntryValue: string; +let besuOptionsKeychainEntryKey: string; + +let discoveryOptions: DiscoveryOptions; + +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +let gatewayRunner: SATPGatewayRunner; + +afterAll(async () => { + await gatewayRunner.stop(); + await gatewayRunner.destroy(); + await besuLedger.stop(); + await besuLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + // currently not used due to GatewayRunner being in NetworkMode: "host" + // const lanIp = await internalIpV4(); + // if (!lanIp) { + // throw new Error(`LAN IP falsy. internal-ip package failed.`); + // } + + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel: "INFO", + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile: ConnectionProfile = + await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile: ConnectionProfile = + await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + keychainEntryKeyBridge = "bridge1"; + keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValueBridge: ", keychainEntryValueBridge); + + keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + discoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + pluginOptionsFabricBridge = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup besu ledger + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + // rpcApiHttpHost = rpcApiHttpHost.replace("127.0.0.1", lanIp); + + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + // rpcApiWsHost = rpcApiWsHost.replace("127.0.0.1", lanIp); + + console.log("test - rpcApiHttpHost:"); + console.log(rpcApiHttpHost); + console.log("test - rpcApiWsHost:"); + console.log(rpcApiWsHost); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + besuOptionsKeychainEntryValue = besuKeyPair.privateKey; + besuOptionsKeychainEntryKey = uuidv4(); + + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([ + [besuOptionsKeychainEntryKey, besuOptionsKeychainEntryValue], + ]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([ + [besuOptionsKeychainEntryKey, besuOptionsKeychainEntryValue], + ]), + logLevel, + }); + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeBesuOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + network: SupportedChain.BESU, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + claimFormat: ClaimFormat.DEFAULT, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); +describe("SATPGateway sending a token from Besu to Fabric", () => { + it("should realize a transfer", async () => { + const address: Address = `http://localhost`; + + // gateway setup: + const gatewayIdentity = { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.BESU], + proofID: "mockProofID10", + address, + gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, + gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, + gatewayOpenAPIPort: DEFAULT_PORT_GATEWAY_API, + } as GatewayIdentity; + + // besuConfig Json object setup: + const besuPluginRegistryOptionsJSON = { + plugins: [ + { + instanceId: keychainPlugin1.getInstanceId(), + keychainId: keychainPlugin1.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: besuOptionsKeychainEntryKey, + keychainEntryValue: besuOptionsKeychainEntryValue, + }, + ], + contractName: erc20TokenContract, + contractString: await keychainPlugin1.get(erc20TokenContract), + }, + { + instanceId: keychainPlugin2.getInstanceId(), + keychainId: keychainPlugin2.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: besuOptionsKeychainEntryKey, + keychainEntryValue: besuOptionsKeychainEntryValue, + }, + ], + contractName: contractNameWrapper, + contractString: await keychainPlugin2.get(contractNameWrapper), + }, + ], + }; + + const besuOptionsJSON = { + instanceId: besuOptions.instanceId, + rpcApiHttpHost: besuOptions.rpcApiHttpHost, + rpcApiWsHost: besuOptions.rpcApiWsHost, + pluginRegistryOptions: besuPluginRegistryOptionsJSON, + logLevel: besuOptions.logLevel, + }; + + const besuBungeeOptionsJSON = { + keyPair: { + privateKey: Buffer.from( + pluginBungeeBesuOptions.keyPair!.privateKey, + ).toString("hex"), + publicKey: Buffer.from( + pluginBungeeBesuOptions.keyPair!.publicKey, + ).toString("hex"), + }, + instanceId: pluginBungeeBesuOptions.instanceId, + logLevel: pluginBungeeBesuOptions.logLevel, + }; + + const besuConfigJSON = { + network: besuConfig.network, + keychainId: besuConfig.keychainId, + signingCredential: besuConfig.signingCredential, + contractName: besuConfig.contractName, + contractAddress: besuConfig.contractAddress, + gas: besuConfig.gas, + options: besuOptionsJSON, + bungeeOptions: besuBungeeOptionsJSON, + claimFormat: besuConfig.claimFormat, + }; + + // fabricConfig Json object setup: + const fabricPluginRegistryOptionsJSON = { + plugins: [ + { + instanceId: keychainPluginBridge.getInstanceId(), + keychainId: keychainPluginBridge.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: keychainEntryKeyBridge, + keychainEntryValue: keychainEntryValueBridge, + }, + { + keychainEntry: "some-other-entry-key", + keychainEntryValue: "some-other-entry-value", + }, + ], + }, + ], + }; + + const fabricOptionsJSON = { + instanceId: pluginOptionsFabricBridge.instanceId, + dockerBinary: pluginOptionsFabricBridge.dockerBinary, + peerBinary: pluginOptionsFabricBridge.peerBinary, + goBinary: pluginOptionsFabricBridge.goBinary, + pluginRegistryOptions: fabricPluginRegistryOptionsJSON, + cliContainerEnv: pluginOptionsFabricBridge.cliContainerEnv, + sshConfig: pluginOptionsFabricBridge.sshConfig, + logLevel: pluginOptionsFabricBridge.logLevel, + connectionProfile: pluginOptionsFabricBridge.connectionProfile, + discoveryOptions: pluginOptionsFabricBridge.discoveryOptions, + eventHandlerOptions: pluginOptionsFabricBridge.eventHandlerOptions, + }; + + const fabricBungeeOptionsJSON = { + keyPair: { + privateKey: Buffer.from( + pluginBungeeFabricOptions.keyPair!.privateKey, + ).toString("hex"), + publicKey: Buffer.from( + pluginBungeeFabricOptions.keyPair!.publicKey, + ).toString("hex"), + }, + instanceId: pluginBungeeFabricOptions.instanceId, + logLevel: pluginBungeeFabricOptions.logLevel, + }; + + const fabricConfigJSON = { + network: fabricConfig.network, + signingCredential: fabricConfig.signingCredential, + channelName: fabricConfig.channelName, + contractName: fabricConfig.contractName, + options: fabricOptionsJSON, + bungeeOptions: fabricBungeeOptionsJSON, + claimFormat: fabricConfig.claimFormat, + }; + + // gateway configuration setup: + const jsonObject = { + gid: gatewayIdentity, + logLevel: "DEBUG", + counterPartyGateways: [], //only knows itself + environment: "development", + enableOpenAPI: true, + bridgesConfig: [besuConfigJSON, fabricConfigJSON], + }; + + const configDir = path.join(__dirname, "gateway-info/config"); + if (!fs.existsSync(configDir)) { + fs.mkdirSync(configDir, { recursive: true }); + } + const configFile = path.join(configDir, "gateway-config.json"); + fs.writeFileSync(configFile, JSON.stringify(jsonObject, null, 2)); + + expect(fs.existsSync(configFile)).toBe(true); + + // gateway outputLogFile and errorLogFile setup: + const logDir = path.join(__dirname, "gateway-info/logs"); + if (!fs.existsSync(logDir)) { + fs.mkdirSync(logDir, { recursive: true }); + } + const outputLogFile = path.join(logDir, "gateway-logs-output.log"); + const errorLogFile = path.join(logDir, "gateway-logs-error.log"); + + // Clear any existing logs + fs.writeFileSync(outputLogFile, ""); + fs.writeFileSync(errorLogFile, ""); + + expect(fs.existsSync(outputLogFile)).toBe(true); + expect(fs.existsSync(errorLogFile)).toBe(true); + + // gatewayRunner setup: + const gatewayRunnerOptions: ISATPGatewayRunnerConstructorOptions = { + containerImageVersion: "2024-10-30T19-54-20-dev-5e06263e0", + containerImageName: "ghcr.io/hyperledger/cacti-satp-hermes-gateway", + logLevel, + emitContainerLogs: true, + configFile, + outputLogFile, + errorLogFile, + }; + gatewayRunner = new SATPGatewayRunner(gatewayRunnerOptions); + console.log("starting gatewayRunner..."); + await gatewayRunner.start(); + console.log("gatewayRunner started sucessfully"); + + const sourceAsset: Asset = { + owner: firstHighNetWorthAccount, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const receiverAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.BESU, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + originatorPubkey: assigneeEthAccount.address, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + receiverAsset, + }; + + const port = await gatewayRunner.getHostPort(DEFAULT_PORT_GATEWAY_API); + + const transactionApiClient = createClient( + "TransactionApi", + address, + port, + log, + ); + const adminApi = createClient("AdminApi", address, port, log); + + const res = await transactionApiClient.transact(req); + log.info(res?.data.statusResponse); + + const sessions = await adminApi.getSessionIds({}); + expect(sessions.data).toBeTruthy(); + expect(sessions.data.length).toBe(1); + expect(sessions.data[0]).toBe(res.data.sessionID); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + invocationType: EthContractInvocationType.Call, + contractAddress: assetContractAddress, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + console.log( + `Balance Besu Owner Account: ${responseBalanceOwner.callOutput}`, + ); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + invocationType: EthContractInvocationType.Call, + contractAddress: assetContractAddress, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + console.log( + `Balance Besu Bridge Account: ${responseBalanceBridge.callOutput}`, + ); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + console.log( + `Balance Fabric Bridge Account: ${responseBalance1.data.functionOutput}`, + ); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + console.log( + `Balance Fabric Owner Account: ${responseBalance2.data.functionOutput}`, + ); + log.info("Amount was transfer correctly to the Owner account"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-dockerization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-dockerization.test.ts new file mode 100644 index 0000000000..1f6dc3d255 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-end-to-end-transfer-2-gateways-dockerization.test.ts @@ -0,0 +1,1439 @@ +import { randomUUID as uuidv4 } from "node:crypto"; +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +// import { v4 as internalIpV4 } from "internal-ip"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, + ConnectionProfile, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; + +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + BesuTestLedger, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + SATPGatewayRunner, + ISATPGatewayRunnerConstructorOptions, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + BesuConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { Account } from "web3-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { TransactRequest, Asset } from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { createClient } from "../test-utils"; +import { + DEFAULT_PORT_GATEWAY_API, + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_SERVER, + SATP_CORE_VERSION, + SATP_ARCHITETURE_VERSION, + SATP_CRASH_VERSION, +} from "../../../main/typescript/core/constants"; +import { bufArray2HexStr } from "../../../main/typescript/gateway-utils"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let fabricServer: Server; + +let besuLedger: BesuTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeBesuOptions: IPluginBungeeHermesOptions; + +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let keychainInstanceId: string; +let keychainId: string; +let keychainEntryKey: string; +let keychainEntryValue: string; + +let keychainPluginBridge: PluginKeychainMemory; +let keychainEntryKeyBridge: string; +let keychainEntryValueBridge: string; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; + +let besuOptionsKeychainEntryValue: string; +let besuOptionsKeychainEntryKey: string; + +let discoveryOptions: DiscoveryOptions; + +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +let gatewayRunner1: SATPGatewayRunner; +let gatewayRunner2: SATPGatewayRunner; + +afterAll(async () => { + await gatewayRunner1.stop(); + await gatewayRunner1.destroy(); + await gatewayRunner2.stop(); + await gatewayRunner2.destroy(); + await besuLedger.stop(); + await besuLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + // currently not used due to GatewayRunner being in NetworkMode: "host" + // const lanIp = await internalIpV4(); + // if (!lanIp) { + // throw new Error(`LAN IP falsy. internal-ip package failed.`); + // } + + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel: "INFO", + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile: ConnectionProfile = + await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile: ConnectionProfile = + await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + keychainInstanceId = uuidv4(); + keychainId = uuidv4(); + keychainEntryKey = "user1"; + keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + keychainEntryKeyBridge = "bridge1"; + keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValueBridge: ", keychainEntryValueBridge); + + keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + discoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + pluginOptionsFabricBridge = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup besu ledger + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + // rpcApiHttpHost = rpcApiHttpHost.replace("127.0.0.1", lanIp); + + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + // rpcApiWsHost = rpcApiWsHost.replace("127.0.0.1", lanIp); + + console.log("test - rpcApiHttpHost:"); + console.log(rpcApiHttpHost); + console.log("test - rpcApiWsHost:"); + console.log(rpcApiWsHost); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + besuOptionsKeychainEntryValue = besuKeyPair.privateKey; + besuOptionsKeychainEntryKey = uuidv4(); + + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([ + [besuOptionsKeychainEntryKey, besuOptionsKeychainEntryValue], + ]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([ + [besuOptionsKeychainEntryKey, besuOptionsKeychainEntryValue], + ]), + logLevel, + }); + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeBesuOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + network: SupportedChain.BESU, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeBesuOptions, + gas: 999999999999999, + claimFormat: ClaimFormat.DEFAULT, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); +describe("SATPGateway sending a token from Besu to Fabric", () => { + it("should realize a transfer", async () => { + // besuConfig Json object setup: + const besuPluginRegistryOptionsJSON = { + plugins: [ + { + instanceId: keychainPlugin1.getInstanceId(), + keychainId: keychainPlugin1.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: besuOptionsKeychainEntryKey, + keychainEntryValue: besuOptionsKeychainEntryValue, + }, + ], + contractName: erc20TokenContract, + contractString: await keychainPlugin1.get(erc20TokenContract), + }, + { + instanceId: keychainPlugin2.getInstanceId(), + keychainId: keychainPlugin2.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: besuOptionsKeychainEntryKey, + keychainEntryValue: besuOptionsKeychainEntryValue, + }, + ], + contractName: contractNameWrapper, + contractString: await keychainPlugin2.get(contractNameWrapper), + }, + ], + }; + + const besuOptionsJSON = { + instanceId: besuOptions.instanceId, + rpcApiHttpHost: besuOptions.rpcApiHttpHost, + rpcApiWsHost: besuOptions.rpcApiWsHost, + pluginRegistryOptions: besuPluginRegistryOptionsJSON, + logLevel: besuOptions.logLevel, + }; + + const besuBungeeOptionsJSON = { + keyPair: { + privateKey: Buffer.from( + pluginBungeeBesuOptions.keyPair!.privateKey, + ).toString("hex"), + publicKey: Buffer.from( + pluginBungeeBesuOptions.keyPair!.publicKey, + ).toString("hex"), + }, + instanceId: pluginBungeeBesuOptions.instanceId, + logLevel: pluginBungeeBesuOptions.logLevel, + }; + + const besuConfigJSON = { + network: besuConfig.network, + keychainId: besuConfig.keychainId, + signingCredential: besuConfig.signingCredential, + contractName: besuConfig.contractName, + contractAddress: besuConfig.contractAddress, + gas: besuConfig.gas, + options: besuOptionsJSON, + bungeeOptions: besuBungeeOptionsJSON, + claimFormat: besuConfig.claimFormat, + }; + + // fabricConfig Json object setup: + const fabricPluginRegistryOptionsJSON = { + plugins: [ + { + instanceId: keychainPluginBridge.getInstanceId(), + keychainId: keychainPluginBridge.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: keychainEntryKeyBridge, + keychainEntryValue: keychainEntryValueBridge, + }, + { + keychainEntry: "some-other-entry-key", + keychainEntryValue: "some-other-entry-value", + }, + ], + }, + ], + }; + + const fabricOptionsJSON = { + instanceId: pluginOptionsFabricBridge.instanceId, + dockerBinary: pluginOptionsFabricBridge.dockerBinary, + peerBinary: pluginOptionsFabricBridge.peerBinary, + goBinary: pluginOptionsFabricBridge.goBinary, + pluginRegistryOptions: fabricPluginRegistryOptionsJSON, + cliContainerEnv: pluginOptionsFabricBridge.cliContainerEnv, + sshConfig: pluginOptionsFabricBridge.sshConfig, + logLevel: pluginOptionsFabricBridge.logLevel, + connectionProfile: pluginOptionsFabricBridge.connectionProfile, + discoveryOptions: pluginOptionsFabricBridge.discoveryOptions, + eventHandlerOptions: pluginOptionsFabricBridge.eventHandlerOptions, + }; + + const fabricBungeeOptionsJSON = { + keyPair: { + privateKey: Buffer.from( + pluginBungeeFabricOptions.keyPair!.privateKey, + ).toString("hex"), + publicKey: Buffer.from( + pluginBungeeFabricOptions.keyPair!.publicKey, + ).toString("hex"), + }, + instanceId: pluginBungeeFabricOptions.instanceId, + logLevel: pluginBungeeFabricOptions.logLevel, + }; + + const fabricConfigJSON = { + network: fabricConfig.network, + signingCredential: fabricConfig.signingCredential, + channelName: fabricConfig.channelName, + contractName: fabricConfig.contractName, + options: fabricOptionsJSON, + bungeeOptions: fabricBungeeOptionsJSON, + claimFormat: fabricConfig.claimFormat, + }; + + // gatewayIds setup: + const gateway1KeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const gateway2KeyPair = Secp256k1Keys.generateKeyPairsBuffer(); + const address: Address = `http://localhost`; + + const gatewayIdentity1 = { + id: "mockID-1", + name: "CustomGateway", + version: [ + { + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address, + gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, + gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, + gatewayOpenAPIPort: DEFAULT_PORT_GATEWAY_API, + } as GatewayIdentity; + + const gatewayIdentity2 = { + id: "mockID-2", + name: "CustomGateway", + version: [ + { + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + } as GatewayIdentity; + + // configFile setup for gateway1: + console.log("Creating gatewayJSON1..."); + const gatewayJSON1 = { + gid: gatewayIdentity1, + logLevel: "DEBUG", + gatewayKeyPair: { + privateKey: Buffer.from(gateway1KeyPair.privateKey).toString("hex"), + publicKey: Buffer.from(gateway1KeyPair.publicKey).toString("hex"), + }, + counterPartyGateways: [ + { + id: "mockID-2", + name: "CustomGateway", + pubKey: bufArray2HexStr(gateway2KeyPair.publicKey), + version: [ + { + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + }, + ], + environment: "development", + enableOpenAPI: true, + bridgesConfig: [besuConfigJSON], + }; + + // configFile setup for gateway2: + console.log("Creating gatewayJSON2..."); + const gatewayJSON2 = { + gid: gatewayIdentity2, + logLevel: "DEBUG", + gatewayKeyPair: { + privateKey: Buffer.from(gateway2KeyPair.privateKey).toString("hex"), + publicKey: Buffer.from(gateway2KeyPair.publicKey).toString("hex"), + }, + counterPartyGateways: [ + { + id: "mockID-1", + name: "CustomGateway", + pubKey: bufArray2HexStr(gateway1KeyPair.publicKey), + version: [ + { + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address, + gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, + gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, + gatewayOpenAPIPort: DEFAULT_PORT_GATEWAY_API, + }, + ], + environment: "development", + enableOpenAPI: true, + bridgesConfig: [fabricConfigJSON], + }; + + // gateway 1 configuration setup: + const configDir1 = path.join(__dirname, "gateway-info/config/gateway-1"); + if (!fs.existsSync(configDir1)) { + fs.mkdirSync(configDir1, { recursive: true }); + } + const configFile1 = path.join(configDir1, "gateway-1-config.json"); + console.log("Creating gateway-1-config.json..."); + fs.writeFileSync(configFile1, JSON.stringify(gatewayJSON1, null, 2)); + expect(fs.existsSync(configFile1)).toBe(true); + + // gateway 2 configuration setup: + const configDir2 = path.join(__dirname, "gateway-info/config/gateway-2"); + if (!fs.existsSync(configDir2)) { + fs.mkdirSync(configDir2, { recursive: true }); + } + const configFile2 = path.join(configDir2, "gateway-2-config.json"); + console.log("Creating gateway-2-config.json..."); + fs.writeFileSync(configFile2, JSON.stringify(gatewayJSON2, null, 2)); + expect(fs.existsSync(configFile2)).toBe(true); + + // gateway 1 outputLogFile and errorLogFile setup: + const logDir1 = path.join(__dirname, "gateway-info/logs/gateway-1"); + if (!fs.existsSync(logDir1)) { + fs.mkdirSync(logDir1, { recursive: true }); + } + const outputLogFile1 = path.join(logDir1, "gateway-logs-output.log"); + const errorLogFile1 = path.join(logDir1, "gateway-logs-error.log"); + // Clear any existing logs + fs.writeFileSync(outputLogFile1, ""); + fs.writeFileSync(errorLogFile1, ""); + // existance check + expect(fs.existsSync(outputLogFile1)).toBe(true); + expect(fs.existsSync(errorLogFile1)).toBe(true); + + // gateway 2 outputLogFile and errorLogFile setup: + const logDir2 = path.join(__dirname, "gateway-info/logs/gateway-2"); + if (!fs.existsSync(logDir2)) { + fs.mkdirSync(logDir2, { recursive: true }); + } + const outputLogFile2 = path.join(logDir2, "gateway-logs-output.log"); + const errorLogFile2 = path.join(logDir2, "gateway-logs-error.log"); + // Clear any existing logs + fs.writeFileSync(outputLogFile2, ""); + fs.writeFileSync(errorLogFile2, ""); + // existance check + expect(fs.existsSync(outputLogFile2)).toBe(true); + expect(fs.existsSync(errorLogFile2)).toBe(true); + + // gatewayRunner1 setup: + const gatewayRunnerOptions1: ISATPGatewayRunnerConstructorOptions = { + containerImageVersion: "2024-10-30T19-54-20-dev-5e06263e0", + containerImageName: "ghcr.io/hyperledger/cacti-satp-hermes-gateway", + logLevel, + emitContainerLogs: true, + configFile: configFile1, + outputLogFile: outputLogFile1, + errorLogFile: errorLogFile1, + serverPort: gatewayIdentity1.gatewayServerPort, + clientPort: gatewayIdentity1.gatewayClientPort, + apiPort: gatewayIdentity1.gatewayOpenAPIPort, + }; + + // gatewayRunner2 setup: + const gatewayRunnerOptions2: ISATPGatewayRunnerConstructorOptions = { + containerImageVersion: "2024-10-30T19-54-20-dev-5e06263e0", + containerImageName: "ghcr.io/hyperledger/cacti-satp-hermes-gateway", + logLevel, + emitContainerLogs: true, + configFile: configFile2, + outputLogFile: outputLogFile2, + errorLogFile: errorLogFile2, + serverPort: gatewayIdentity2.gatewayServerPort, + clientPort: gatewayIdentity2.gatewayClientPort, + apiPort: gatewayIdentity2.gatewayOpenAPIPort, + }; + + gatewayRunner1 = new SATPGatewayRunner(gatewayRunnerOptions1); + gatewayRunner2 = new SATPGatewayRunner(gatewayRunnerOptions2); + + console.log("starting gatewayRunner1..."); + await gatewayRunner1.start(); + console.log("gatewayRunner1 started sucessfully"); + console.log("starting gatewayRunner2..."); + await gatewayRunner2.start(); + console.log("gatewayRunner2 started sucessfully"); + + const sourceAsset: Asset = { + owner: firstHighNetWorthAccount, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const receiverAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.BESU, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + originatorPubkey: assigneeEthAccount.address, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + receiverAsset, + }; + + const port = await gatewayRunner1.getHostPort(DEFAULT_PORT_GATEWAY_API); + + const transactionApiClient = createClient( + "TransactionApi", + address, + port, + log, + ); + const adminApi = createClient("AdminApi", address, port, log); + + const res = await transactionApiClient.transact(req); + log.info(res?.data.statusResponse); + + const sessions = await adminApi.getSessionIds({}); + expect(sessions.data).toBeTruthy(); + expect(sessions.data.length).toBe(1); + expect(sessions.data[0]).toBe(res.data.sessionID); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + invocationType: EthContractInvocationType.Call, + contractAddress: assetContractAddress, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + console.log( + `Balance Besu Owner Account: ${responseBalanceOwner.callOutput}`, + ); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + invocationType: EthContractInvocationType.Call, + contractAddress: assetContractAddress, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + console.log( + `Balance Besu Bridge Account: ${responseBalanceBridge.callOutput}`, + ); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + console.log( + `Balance Fabric Bridge Account: ${responseBalance1.data.functionOutput}`, + ); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + console.log( + `Balance Fabric Owner Account: ${responseBalance2.data.functionOutput}`, + ); + log.info("Amount was transfer correctly to the Owner account"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-dockerization.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-dockerization.test.ts new file mode 100644 index 0000000000..8ee38f4c63 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-dockerization.test.ts @@ -0,0 +1,1263 @@ +import { randomUUID as uuidv4 } from "node:crypto"; +import "jest-extended"; + +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +// import { v4 as internalIpV4 } from "internal-ip"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { + ChainCodeProgrammingLanguage, + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + FileBase64, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FabricContractInvocationType, + ConnectionProfile, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import http, { Server } from "http"; +import fs from "fs-extra"; +import { + GethTestLedger, + WHALE_ACCOUNT_ADDRESS, +} from "@hyperledger/cactus-test-geth-ledger"; +import { + pruneDockerAllIfGithubAction, + Containers, + FabricTestLedgerV1, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + SATPGatewayRunner, + ISATPGatewayRunnerConstructorOptions, +} from "@hyperledger/cactus-test-tooling"; +import bodyParser from "body-parser"; +import express from "express"; +import { DiscoveryOptions, X509Identity } from "fabric-network"; +import { AddressInfo } from "net"; +import path from "path"; +import { + EthereumConfig, + FabricConfig, +} from "../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import SATPContract from "../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { TransactRequest, Asset } from "../../../main/typescript"; +import { + Address, + GatewayIdentity, + SupportedChain, +} from "../../../main/typescript/core/types"; +import FabricSATPInteraction from "../../../test/typescript/fabric/satp-erc20-interact.json"; +import BesuSATPInteraction from "../../solidity/satp-erc20-interact.json"; +import { createClient } from "../test-utils"; +import { + DEFAULT_PORT_GATEWAY_API, + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_SERVER, + SATP_CORE_VERSION, + SATP_ARCHITETURE_VERSION, + SATP_CRASH_VERSION, +} from "../../../main/typescript/core/constants"; +import { ClaimFormat } from "../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { + EthContractInvocationType, + IPluginLedgerConnectorEthereumOptions, + PluginLedgerConnectorEthereum, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-ethereum"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let fabricServer: Server; + +let ethereumLedger: GethTestLedger; + +let fabricLedger: FabricTestLedgerV1; +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +let configFabric: Configuration; +let fabricChannelName: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +let clientId: string; +let fabricConfig: FabricConfig; +let pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions; +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; + +let testing_connector: PluginLedgerConnectorEthereum; +let bridgeEthAccount: string; +const ETH_ASSET_ID = uuidv4(); +let assetContractAddress: string; +let wrapperContractAddress: string; +let satpContractName: string; + +let pluginBungeeEthOptions: IPluginBungeeHermesOptions; + +let ethereumConfig: EthereumConfig; +let ethereumOptions: IPluginLedgerConnectorEthereumOptions; + +let keychainPluginBridge: PluginKeychainMemory; +let keychainEntryKeyBridge: string; +let keychainEntryValueBridge: string; + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; + +let ethOptionsKeychainEntryValue: string; +let ethOptionsKeychainEntryKey: string; + +let discoveryOptions: DiscoveryOptions; + +let fabricUser: X509Identity; + +let apiClient: FabricApi; + +const SATPContract1 = { + contractName: "SATPContract", + abi: SATPContract.abi, + bytecode: SATPContract.bytecode.object, +}; +const SATPWrapperContract1 = { + contractName: "SATPWrapperContract", + abi: SATPWrapperContract.abi, + bytecode: SATPWrapperContract.bytecode.object, +}; + +let gatewayRunner: SATPGatewayRunner; + +afterAll(async () => { + await gatewayRunner.stop(); + await gatewayRunner.destroy(); + await ethereumLedger.stop(); + await ethereumLedger.destroy(); + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + // currently not used due to GatewayRunner being in NetworkMode: "host" + // const lanIp = await internalIpV4(); + // if (!lanIp) { + // throw new Error(`LAN IP falsy. internal-ip package failed.`); + // } + + { + const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; + const containerImageVersion = "2023-07-27-2a8c48ed6"; + ethereumLedger = new GethTestLedger({ + containerImageName, + containerImageVersion, + }); + await ethereumLedger.start(); + + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel: "INFO", + }); + + await fabricLedger.start(); + + log.info("Both Ledgers started successfully"); + } + + { + // setup fabric ledger + const connectionProfile: ConnectionProfile = + await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile: ConnectionProfile = + await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + fabricUser = userIdentity; + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + keychainEntryKeyBridge = "bridge1"; + keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValueBridge: ", keychainEntryValueBridge); + + keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + discoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + const fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + const satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId: fabricChannelName, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + pluginOptionsFabricBridge = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + network: SupportedChain.FABRIC, + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + claimFormat: ClaimFormat.DEFAULT, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } + + { + //setup ethereum ledger + rpcApiHttpHost = await ethereumLedger.getRpcApiHttpHost(); + + bridgeEthAccount = await ethereumLedger.newEthPersonalAccount(); + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + ethOptionsKeychainEntryValue = "test"; + ethOptionsKeychainEntryKey = bridgeEthAccount; + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([ + [ethOptionsKeychainEntryKey, ethOptionsKeychainEntryValue], + ]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([ + [ethOptionsKeychainEntryKey, ethOptionsKeychainEntryValue], + ]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract1)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract1), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + ethereumOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorEthereum(ethereumOptions); + pluginRegistry.add(testing_connector); + + const deployOutSATPContract = await testing_connector.deployContract({ + contract: { + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + }, + constructorArgs: [WHALE_ACCOUNT_ADDRESS, ETH_ASSET_ID], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + const deployOutWrapperContract = await testing_connector.deployContract({ + contract: { + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + }, + constructorArgs: [bridgeEthAccount], + web3SigningCredential: { + ethAccount: bridgeEthAccount, + secret: "test", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeEthOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + pluginRegistry: new PluginRegistry(), + logLevel, + }; + + ethereumConfig = { + network: SupportedChain.EVM, + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount, + secret: "test", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: ethereumOptions, + bungeeOptions: pluginBungeeEthOptions, + gas: 5000000, + claimFormat: ClaimFormat.DEFAULT, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } + + const responseMint = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [WHALE_ACCOUNT_ADDRESS, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); +}); + +describe("SATPGateway sending a token from Ethereum to Fabric", () => { + it("should realize a transfer", async () => { + const address: Address = `http://localhost`; + + // gateway setup: + const gatewayIdentity = { + id: "mockID", + name: "CustomGateway", + version: [ + { + Core: SATP_CORE_VERSION, + Architecture: SATP_ARCHITETURE_VERSION, + Crash: SATP_CRASH_VERSION, + }, + ], + supportedDLTs: [SupportedChain.FABRIC, SupportedChain.EVM], + proofID: "mockProofID10", + address, + gatewayClientPort: DEFAULT_PORT_GATEWAY_CLIENT, + gatewayServerPort: DEFAULT_PORT_GATEWAY_SERVER, + gatewayOpenAPIPort: DEFAULT_PORT_GATEWAY_API, + } as GatewayIdentity; + + // ethereumConfig Json object setup: + const ethPluginRegistryOptionsJSON = { + plugins: [ + { + instanceId: keychainPlugin1.getInstanceId(), + keychainId: keychainPlugin1.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: ethOptionsKeychainEntryKey, + keychainEntryValue: ethOptionsKeychainEntryValue, + }, + ], + contractName: erc20TokenContract, + contractString: await keychainPlugin1.get(erc20TokenContract), + }, + { + instanceId: keychainPlugin2.getInstanceId(), + keychainId: keychainPlugin2.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: ethOptionsKeychainEntryKey, + keychainEntryValue: ethOptionsKeychainEntryValue, + }, + ], + contractName: contractNameWrapper, + contractString: await keychainPlugin2.get(contractNameWrapper), + }, + ], + }; + + const ethereumOptionsJSON = { + instanceId: ethereumOptions.instanceId, + rpcApiHttpHost: ethereumOptions.rpcApiHttpHost, + rpcApiWsHost: ethereumOptions.rpcApiWsHost, + pluginRegistryOptions: ethPluginRegistryOptionsJSON, + logLevel: ethereumOptions.logLevel, + }; + + const ethBungeeOptionsJSON = { + keyPair: { + privateKey: Buffer.from( + pluginBungeeEthOptions.keyPair!.privateKey, + ).toString("hex"), + publicKey: Buffer.from( + pluginBungeeEthOptions.keyPair!.publicKey, + ).toString("hex"), + }, + instanceId: pluginBungeeEthOptions.instanceId, + logLevel: pluginBungeeEthOptions.logLevel, + }; + + const ethereumConfigJSON = { + network: ethereumConfig.network, + keychainId: ethereumConfig.keychainId, + signingCredential: ethereumConfig.signingCredential, + contractName: ethereumConfig.contractName, + contractAddress: ethereumConfig.contractAddress, + gas: ethereumConfig.gas, + options: ethereumOptionsJSON, + bungeeOptions: ethBungeeOptionsJSON, + claimFormat: ethereumConfig.claimFormat, + }; + + // fabricConfig Json object setup: + const fabricPluginRegistryOptionsJSON = { + plugins: [ + { + instanceId: keychainPluginBridge.getInstanceId(), + keychainId: keychainPluginBridge.getKeychainId(), + logLevel, + backend: [ + { + keychainEntry: keychainEntryKeyBridge, + keychainEntryValue: keychainEntryValueBridge, + }, + { + keychainEntry: "some-other-entry-key", + keychainEntryValue: "some-other-entry-value", + }, + ], + }, + ], + }; + + const fabricOptionsJSON = { + instanceId: pluginOptionsFabricBridge.instanceId, + dockerBinary: pluginOptionsFabricBridge.dockerBinary, + peerBinary: pluginOptionsFabricBridge.peerBinary, + goBinary: pluginOptionsFabricBridge.goBinary, + pluginRegistryOptions: fabricPluginRegistryOptionsJSON, + cliContainerEnv: pluginOptionsFabricBridge.cliContainerEnv, + sshConfig: pluginOptionsFabricBridge.sshConfig, + logLevel: pluginOptionsFabricBridge.logLevel, + connectionProfile: pluginOptionsFabricBridge.connectionProfile, + discoveryOptions: pluginOptionsFabricBridge.discoveryOptions, + eventHandlerOptions: pluginOptionsFabricBridge.eventHandlerOptions, + }; + + const fabricBungeeOptionsJSON = { + keyPair: { + privateKey: Buffer.from( + pluginBungeeFabricOptions.keyPair!.privateKey, + ).toString("hex"), + publicKey: Buffer.from( + pluginBungeeFabricOptions.keyPair!.publicKey, + ).toString("hex"), + }, + instanceId: pluginBungeeFabricOptions.instanceId, + logLevel: pluginBungeeFabricOptions.logLevel, + }; + + const fabricConfigJSON = { + network: fabricConfig.network, + signingCredential: fabricConfig.signingCredential, + channelName: fabricConfig.channelName, + contractName: fabricConfig.contractName, + options: fabricOptionsJSON, + bungeeOptions: fabricBungeeOptionsJSON, + claimFormat: fabricConfig.claimFormat, + }; + + // gateway configuration setup: + const jsonObject = { + gid: gatewayIdentity, + logLevel: "DEBUG", + counterPartyGateways: [], //only knows itself + environment: "development", + enableOpenAPI: true, + bridgesConfig: [ethereumConfigJSON, fabricConfigJSON], + }; + + const configDir = path.join(__dirname, "gateway-info/config"); + if (!fs.existsSync(configDir)) { + fs.mkdirSync(configDir, { recursive: true }); + } + const configFile = path.join(configDir, "gateway-config.json"); + fs.writeFileSync(configFile, JSON.stringify(jsonObject, null, 2)); + + expect(fs.existsSync(configFile)).toBe(true); + + // gateway outputLogFile and errorLogFile setup: + const logDir = path.join(__dirname, "gateway-info/logs"); + if (!fs.existsSync(logDir)) { + fs.mkdirSync(logDir, { recursive: true }); + } + const outputLogFile = path.join(logDir, "gateway-logs-output.log"); + const errorLogFile = path.join(logDir, "gateway-logs-error.log"); + + // Clear any existing logs + fs.writeFileSync(outputLogFile, ""); + fs.writeFileSync(errorLogFile, ""); + + expect(fs.existsSync(outputLogFile)).toBe(true); + expect(fs.existsSync(errorLogFile)).toBe(true); + + //TODO: when ready, change to official hyperledger image + // -- for now use your local image (the name might be different) + // gatewayRunner setup: + const gatewayRunnerOptions: ISATPGatewayRunnerConstructorOptions = { + containerImageVersion: "latest", + containerImageName: "cactus-plugin-satp-hermes-satp-hermes-gateway", + logLevel, + emitContainerLogs: true, + configFile, + outputLogFile, + errorLogFile, + }; + gatewayRunner = new SATPGatewayRunner(gatewayRunnerOptions); + console.log("starting gatewayRunner..."); + await gatewayRunner.start(true); + console.log("gatewayRunner started sucessfully"); + + const sourceAsset: Asset = { + owner: WHALE_ACCOUNT_ADDRESS, + ontology: JSON.stringify(BesuSATPInteraction), + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + }; + const receiverAsset: Asset = { + owner: clientId, + ontology: JSON.stringify(FabricSATPInteraction), + contractName: satpContractName, + mspId: fabricUser.mspId, + channelName: fabricChannelName, + }; + const req: TransactRequest = { + contextID: "mockContext", + fromDLTNetworkID: SupportedChain.EVM, + toDLTNetworkID: SupportedChain.FABRIC, + fromAmount: "100", + toAmount: "1", + originatorPubkey: WHALE_ACCOUNT_ADDRESS, + beneficiaryPubkey: fabricUser.credentials.certificate, + sourceAsset, + receiverAsset, + }; + + const port = await gatewayRunner.getHostPort(DEFAULT_PORT_GATEWAY_API); + + const transactionApiClient = createClient( + "TransactionApi", + address, + port, + log, + ); + const adminApi = createClient("AdminApi", address, port, log); + + const res = await transactionApiClient.transact(req); + log.info(res?.data.statusResponse); + + const sessions = await adminApi.getSessionIds({}); + expect(sessions.data).toBeTruthy(); + expect(sessions.data.length).toBe(1); + expect(sessions.data[0]).toBe(res.data.sessionID); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [WHALE_ACCOUNT_ADDRESS], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe(BigInt(0)); + log.info("Amount was transfer correctly from the Owner account"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contract: { + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + }, + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + web3SigningCredential: { + ethAccount: WHALE_ACCOUNT_ADDRESS, + secret: "", + type: Web3SigningCredentialType.GethKeychainPassword, + }, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe(BigInt(0)); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [BRIDGE_ID], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("1"); + log.info("Amount was transfer correctly to the Owner account"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts index de8975ab02..359be80132 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/satp-ethereum-fabric-transfer-1-gateway-with-bungee.test.ts @@ -912,7 +912,7 @@ beforeAll(async () => { // }; } }); -describe("SATPGateway sending a token from Besu to Fabric", () => { +describe("SATPGateway sending a token from Ethereum to Fabric", () => { it("should realize a transfer", async () => { //setup satp gateway const factoryOptions: IPluginFactoryOptions = { diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/SATPGatewayRunner-instantiation.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/SATPGatewayRunner-instantiation.test.ts new file mode 100644 index 0000000000..7d88a46375 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/SATPGatewayRunner-instantiation.test.ts @@ -0,0 +1,63 @@ +import "jest-extended"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; +import { + ISATPGatewayRunnerConstructorOptions, + pruneDockerAllIfGithubAction, + SATPGatewayRunner, +} from "@hyperledger/cactus-test-tooling"; +import { + DEFAULT_PORT_GATEWAY_API, + DEFAULT_PORT_GATEWAY_CLIENT, + DEFAULT_PORT_GATEWAY_SERVER, +} from "../../../main/typescript/core/constants"; + +const testCase = "Instantiate SATP Gateway Runner"; +const logLevel: LogLevelDesc = "TRACE"; + +describe(testCase, () => { + let gatewayRunner: SATPGatewayRunner; + + const gatewayRunnerOptions: ISATPGatewayRunnerConstructorOptions = { + containerImageVersion: "2024-10-30T19-54-20-dev-5e06263e0", + containerImageName: "ghcr.io/hyperledger/cacti-satp-hermes-gateway", + serverPort: DEFAULT_PORT_GATEWAY_SERVER, + clientPort: DEFAULT_PORT_GATEWAY_CLIENT, + apiPort: DEFAULT_PORT_GATEWAY_API, + logLevel, + emitContainerLogs: true, + }; + + beforeAll(async () => { + const pruning = pruneDockerAllIfGithubAction({ logLevel }); + await expect(pruning).toResolve(); + }); + + afterAll(async () => { + await gatewayRunner.stop(); + await gatewayRunner.destroy(); + await pruneDockerAllIfGithubAction({ logLevel }); + }); + + test(testCase, async () => { + gatewayRunner = new SATPGatewayRunner(gatewayRunnerOptions); + + await gatewayRunner.start(); + expect(gatewayRunner).toBeTruthy(); + expect(gatewayRunner.getContainer()).toBeTruthy(); + + const serverHost = await gatewayRunner.getServerHost(); + expect(serverHost).toBeTruthy(); + expect(serverHost).toMatch(/^http:\/\/localhost:\d+$/); + console.log(serverHost); + + const clientHost = await gatewayRunner.getClientHost(); + expect(clientHost).toBeTruthy(); + expect(clientHost).toMatch(/^http:\/\/localhost:\d+$/); + console.log(clientHost); + + const apiHost = await gatewayRunner.getApiHost(); + expect(apiHost).toBeTruthy(); + expect(apiHost).toMatch(/^http:\/\/localhost:\d+$/); + console.log(apiHost); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/supervisord.conf b/packages/cactus-plugin-satp-hermes/supervisord.conf new file mode 100644 index 0000000000..65e81504b9 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/supervisord.conf @@ -0,0 +1,16 @@ +[supervisord] +logfile=/opt/cacti/satp-hermes/log/supervisord.log +logfile_maxbytes=50MB +logfile_backups=10 +loglevel=info +user=root + +[program:satp-gateway] +command=/usr/local/bin/node index.js +autostart=true +stderr_logfile=/opt/cacti/satp-hermes/log/satp-gateway-error.log +stderr_logfile_maxbytes=10MB +stderr_logfile_backups=5 +stdout_logfile=/opt/cacti/satp-hermes/log/satp-gateway-output.log +stdout_logfile_maxbytes=10MB +stdout_logfile_backups=5 diff --git a/packages/cactus-test-tooling/src/main/typescript/public-api.ts b/packages/cactus-test-tooling/src/main/typescript/public-api.ts index 6054d279b0..768b86294e 100755 --- a/packages/cactus-test-tooling/src/main/typescript/public-api.ts +++ b/packages/cactus-test-tooling/src/main/typescript/public-api.ts @@ -8,6 +8,11 @@ export { BESU_TEST_LEDGER_OPTIONS_JOI_SCHEMA, } from "./besu/besu-test-ledger"; +export { + SATPGatewayRunner, + ISATPGatewayRunnerConstructorOptions, +} from "./satp-runner/satp-gateway-runner"; + export { BesuMpTestLedger, IBesuMpTestLedgerOptions, diff --git a/packages/cactus-test-tooling/src/main/typescript/satp-runner/satp-gateway-runner.ts b/packages/cactus-test-tooling/src/main/typescript/satp-runner/satp-gateway-runner.ts new file mode 100644 index 0000000000..0598f850fc --- /dev/null +++ b/packages/cactus-test-tooling/src/main/typescript/satp-runner/satp-gateway-runner.ts @@ -0,0 +1,320 @@ +import Docker, { Container, ContainerInfo } from "dockerode"; +import Joi from "joi"; +import { EventEmitter } from "events"; +import { + LogLevelDesc, + Logger, + LoggerProvider, + Bools, +} from "@hyperledger/cactus-common"; +import { ITestLedger } from "../i-test-ledger"; +import { Containers } from "../common/containers"; + +export interface ISATPGatewayRunnerConstructorOptions { + containerImageVersion?: string; + containerImageName?: string; + serverPort?: number; + clientPort?: number; + apiPort?: number; + logLevel?: LogLevelDesc; + emitContainerLogs?: boolean; + configFile?: string; + outputLogFile?: string; + errorLogFile?: string; + knexDir?: string; +} + +export const SATP_GATEWAY_RUNNER_DEFAULT_OPTIONS = Object.freeze({ + containerImageVersion: "2024-10-30T19-54-20-dev-5e06263e0", + containerImageName: "ghcr.io/hyperledger/cacti-satp-hermes-gateway", + serverPort: 3010, + clientPort: 3011, + apiPort: 4010, +}); + +export const SATP_GATEWAY_RUNNER_OPTIONS_JOI_SCHEMA: Joi.Schema = + Joi.object().keys({ + containerImageVersion: Joi.string().min(1).required(), + containerImageName: Joi.string().min(1).required(), + serverPort: Joi.number() + .integer() + .positive() + .min(1024) + .max(65535) + .required(), + clientPort: Joi.number() + .integer() + .positive() + .min(1024) + .max(65535) + .required(), + apiPort: Joi.number().integer().positive().min(1024).max(65535).required(), + }); + +export class SATPGatewayRunner implements ITestLedger { + public readonly containerImageVersion: string; + public readonly containerImageName: string; + public readonly serverPort: number; + public readonly clientPort: number; + public readonly apiPort: number; + public readonly emitContainerLogs: boolean; + public readonly configFile?: string; + public readonly outputLogFile?: string; + public readonly errorLogFile?: string; + public readonly knexDir?: string; + + private readonly log: Logger; + private container: Container | undefined; + private containerId: string | undefined; + + constructor( + public readonly options: ISATPGatewayRunnerConstructorOptions = {}, + ) { + if (!options) { + throw new TypeError(`SATPGatewayRunner#ctor options was falsy.`); + } + this.containerImageVersion = + options.containerImageVersion || + SATP_GATEWAY_RUNNER_DEFAULT_OPTIONS.containerImageVersion; + this.containerImageName = + options.containerImageName || + SATP_GATEWAY_RUNNER_DEFAULT_OPTIONS.containerImageName; + this.serverPort = + options.serverPort || SATP_GATEWAY_RUNNER_DEFAULT_OPTIONS.serverPort; + this.clientPort = + options.clientPort || SATP_GATEWAY_RUNNER_DEFAULT_OPTIONS.clientPort; + this.apiPort = + options.apiPort || SATP_GATEWAY_RUNNER_DEFAULT_OPTIONS.apiPort; + this.configFile = options.configFile; + this.outputLogFile = options.outputLogFile; + this.errorLogFile = options.errorLogFile; + this.knexDir = options.knexDir; + + this.emitContainerLogs = Bools.isBooleanStrict(options.emitContainerLogs) + ? (options.emitContainerLogs as boolean) + : true; + + this.validateConstructorOptions(); + const label = "satp-gateway-runner"; + const level = options.logLevel || "INFO"; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getContainer(): Container { + const fnTag = "SATPGatewayRunner#getContainer()"; + if (!this.container) { + throw new Error(`${fnTag} container not yet started by this instance.`); + } else { + return this.container; + } + } + + public getContainerImageName(): string { + return `${this.containerImageName}:${this.containerImageVersion}`; + } + + public async getServerHost(): Promise { + const hostPort = await this.getHostPort(this.serverPort); + this.log.debug(`getServerHost: ${hostPort}`); + return `http://localhost:${hostPort}`; + } + + public async getClientHost(): Promise { + const hostPort = await this.getHostPort(this.clientPort); + this.log.debug(`getClientHost: ${hostPort}`); + return `http://localhost:${hostPort}`; + } + + public async getApiHost(): Promise { + const hostPort = await this.getHostPort(this.apiPort); + this.log.debug(`getApiHost: ${hostPort}`); + return `http://localhost:${hostPort}`; + } + + public async getHostPort(configuredPort: number): Promise { + if (this.container) { + const containerInfo = await this.getContainerInfo(); + if (containerInfo.HostConfig.NetworkMode === "host") { + // When using host network mode, return the configured port + return configuredPort; + } else { + // For other network modes, use the existing logic + return await Containers.getPublicPort(configuredPort, containerInfo); + } + } else { + throw new Error("Container not started"); + } + } + + private createDockerHostConfig(): Docker.HostConfig { + const hostConfig: Docker.HostConfig = { + PublishAllPorts: true, + Binds: [], + NetworkMode: "host", + }; + + if (this.configFile) { + const containerPath = "/opt/cacti/satp-hermes/gateway-config.json"; + hostConfig.Binds!.push(`${this.configFile}:${containerPath}:ro`); + } + + if (this.outputLogFile) { + const containerPath = + "/opt/cacti/satp-hermes/log/satp-gateway-output.log"; + hostConfig.Binds!.push(`${this.outputLogFile}:${containerPath}:rw`); + } + + if (this.errorLogFile) { + const containerPath = "/opt/cacti/satp-hermes/log/satp-gateway-error.log"; + hostConfig.Binds!.push(`${this.errorLogFile}:${containerPath}:rw`); + } + + if (this.knexDir) { + const containerPath = "/opt/cacti/satp-hermes/src/knex/"; + hostConfig.Binds!.push(`${this.knexDir}:${containerPath}:rw`); + } + return hostConfig; + } + + public async start(omitPull = false): Promise { + const imageFqn = this.getContainerImageName(); + + if (this.container) { + await this.container.stop(); + await this.container.remove(); + } + const docker = new Docker(); + + if (!omitPull) { + this.log.debug(`Pulling container image ${imageFqn} ...`); + await Containers.pullImage(imageFqn, {}, "DEBUG"); + this.log.debug(`Pulled ${imageFqn} OK. Starting container...`); + } + + this.log.debug(`Starting container with image: ${imageFqn}...`); + return new Promise((resolve, reject) => { + const hostConfig: Docker.HostConfig = this.createDockerHostConfig(); + + const eventEmitter: EventEmitter = docker.run( + imageFqn, + [], + [], + { + ExposedPorts: { + [`${this.serverPort}/tcp`]: {}, // SERVER_PORT + [`${this.clientPort}/tcp`]: {}, // CLIENT_PORT + [`${this.apiPort}/tcp`]: {}, // API_PORT + }, + HostConfig: hostConfig, + }, + {}, + (err: unknown) => { + if (err) { + reject(err); + } + }, + ); + + eventEmitter.once("start", async (container: Container) => { + this.log.debug(`Started container OK. Waiting for healthcheck...`); + this.container = container; + this.containerId = container.id; + + if (this.emitContainerLogs) { + const fnTag = `[${this.getContainerImageName()}]`; + await Containers.streamLogs({ + container: this.getContainer(), + tag: fnTag, + log: this.log, + }); + } + try { + await this.waitForHealthCheck(); + this.log.debug(`Healthcheck passing OK.`); + resolve(container); + } catch (ex) { + reject(ex); + } + }); + }); + } + + public async waitForHealthCheck(timeoutMs = 60000): Promise { + const fnTag = "SATPGatewayRunner#waitForHealthCheck()"; + const startedAt = Date.now(); + let isHealthy = false; + do { + if (Date.now() >= startedAt + timeoutMs) { + throw new Error(`${fnTag} timed out (${timeoutMs}ms)`); + } + const { Status, State } = await this.getContainerInfo(); + this.log.debug(`ContainerInfo.Status=%o, State=O%`, Status, State); + isHealthy = Status.endsWith("(healthy)"); + if (!isHealthy) { + await new Promise((resolve2) => setTimeout(resolve2, 1000)); + } + } while (!isHealthy); + this.log.debug(`Left waitForHealthCheck`); + } + + public stop(): Promise { + const fnTag = "SATPGatewayRunner#stop()"; + return new Promise((resolve, reject) => { + if (this.container) { + this.container.stop({}, (err: unknown, result: unknown) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + return reject(new Error(`${fnTag} Container was not running.`)); + } + }); + } + + public destroy(): Promise { + const fnTag = "SATPGatewayRunner#destroy()"; + if (this.container) { + return this.container.remove(); + } else { + const ex = new Error(`${fnTag} Container not found, nothing to destroy.`); + return Promise.reject(ex); + } + } + + public async getContainerInfo(): Promise { + const docker = new Docker(); + const containerInfos = await docker.listContainers({}); + + let aContainerInfo; + if (this.containerId !== undefined) { + aContainerInfo = containerInfos.find((ci) => ci.Id === this.containerId); + } + + if (aContainerInfo) { + return aContainerInfo; + } else { + throw new Error( + `SATPGatewayRunner#getContainerInfo() no container with ID "${this.containerId}"`, + ); + } + } + + private validateConstructorOptions(): void { + const validationResult = SATP_GATEWAY_RUNNER_OPTIONS_JOI_SCHEMA.validate({ + containerImageVersion: this.containerImageVersion, + containerImageName: this.containerImageName, + serverPort: this.serverPort, + clientPort: this.clientPort, + apiPort: this.apiPort, + }); + + if (validationResult.error) { + throw new Error( + `SATPGatewayRunner#ctor ${validationResult.error.annotate()}`, + ); + } + } +} diff --git a/yarn.lock b/yarn.lock index d94fd29224..eb5ad4bedf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10917,6 +10917,7 @@ __metadata: "@types/swagger-ui-express": "npm:4.1.6" "@types/tape": "npm:4.13.4" "@types/uuid": "npm:10.0.0" + "@vercel/ncc": "npm:0.38.1" axios: "npm:1.7.7" bignumber.js: "npm:9.1.2" bn.js: "npm:5.2.1" @@ -10935,6 +10936,8 @@ __metadata: grpc-tools: "npm:1.12.4" grpc_tools_node_protoc_ts: "npm:5.3.3" hardhat: "npm:2.22.5" + internal-ip: "npm:6.2.0" + jsonc: "npm:2.0.0" knex: "npm:2.4.0" kubo-rpc-client: "npm:3.0.1" make-dir-cli: "npm:3.1.0" @@ -10947,6 +10950,7 @@ __metadata: sqlite3: "npm:5.1.5" swagger-cli: "npm:4.0.4" swagger-ui-express: "npm:5.0.0" + ts-node: "npm:10.9.1" typescript: "npm:5.5.2" typescript-optional: "npm:2.0.1" uuid: "npm:10.0.0" @@ -30710,7 +30714,7 @@ __metadata: languageName: node linkType: hard -"fast-safe-stringify@npm:2.1.1, fast-safe-stringify@npm:^2.0.7, fast-safe-stringify@npm:^2.1.1": +"fast-safe-stringify@npm:2.1.1, fast-safe-stringify@npm:^2.0.6, fast-safe-stringify@npm:^2.0.7, fast-safe-stringify@npm:^2.1.1": version: 2.1.1 resolution: "fast-safe-stringify@npm:2.1.1" checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 @@ -37781,6 +37785,20 @@ __metadata: languageName: node linkType: hard +"jsonc@npm:2.0.0": + version: 2.0.0 + resolution: "jsonc@npm:2.0.0" + dependencies: + fast-safe-stringify: "npm:^2.0.6" + graceful-fs: "npm:^4.1.15" + mkdirp: "npm:^0.5.1" + parse-json: "npm:^4.0.0" + strip-bom: "npm:^4.0.0" + strip-json-comments: "npm:^3.0.1" + checksum: 10/a4d3052bea15baad31e95b8a8be5f0ddcd7f710cd0426e41efb1325a476605a27f7489706c52d96eeaa9295b543382afa5633e43cfef5e5756d70ae2a40091b4 + languageName: node + linkType: hard + "jsonfile@npm:^2.1.0": version: 2.4.0 resolution: "jsonfile@npm:2.4.0" @@ -51387,7 +51405,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 From 28964260ee233b0e2b0d2db0b22f950dc7126279 Mon Sep 17 00:00:00 2001 From: Rafael Belchior Date: Sat, 9 Nov 2024 03:29:05 +0200 Subject: [PATCH 45/49] squash!(satp-hermes): rebase with main Signed-off-by: Rafael Belchior --- .../package.json | 24 +- .../package.json | 83 +- .../package.json | 20 +- .../package.json | 6 +- .../src/main/typescript/sign-utils.ts | 7 +- .../web-services/watch-blocks-v1-endpoint.ts | 91 +- ...eploy-and-invoke-using-keychain-v1.test.ts | 6 +- .../cactus-plugin-satp-hermes/package.json | 14 +- yarn.lock | 18598 ++++++---------- 9 files changed, 6919 insertions(+), 11930 deletions(-) diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index 08466846b4..2624084552 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -70,18 +70,18 @@ }, "dependencies": { "@foundry-rs/hardhat-forge": "0.1.17", - "@hyperledger/cactus-api-client": "2.0.0-rc.7", - "@hyperledger/cactus-cmd-api-server": "2.0.0-rc.7", - "@hyperledger/cactus-common": "2.0.0-rc.7", - "@hyperledger/cactus-core": "2.0.0-rc.7", - "@hyperledger/cactus-core-api": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-satp-hermes": "2.0.0-rc.7", - "@hyperledger/cactus-test-tooling": "2.0.0-rc.7", + "@hyperledger/cactus-api-client": "2.0.0", + "@hyperledger/cactus-cmd-api-server": "2.0.0", + "@hyperledger/cactus-common": "2.0.0", + "@hyperledger/cactus-core": "2.0.0", + "@hyperledger/cactus-core-api": "2.0.0", + "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0", + "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0", + "@hyperledger/cactus-plugin-satp-hermes": "2.0.0", + "@hyperledger/cactus-test-tooling": "2.0.0", "@openzeppelin/contracts": "5.0.2", "@openzeppelin/contracts-upgradeable": "4.9.6", "async-exit-hook": "2.0.1", diff --git a/packages/cacti-plugin-weaver-driver-fabric/package.json b/packages/cacti-plugin-weaver-driver-fabric/package.json index 7aad5f2c61..f050e68b96 100644 --- a/packages/cacti-plugin-weaver-driver-fabric/package.json +++ b/packages/cacti-plugin-weaver-driver-fabric/package.json @@ -14,47 +14,48 @@ "bugs": { "url": "https://github.com/hyperledger-cacti/cacti/issues" }, - { - "name": "Venkatraman Ramakrishna", - "email": "vramakr2@in.ibm.com", - "url": "https://researcher.watson.ibm.com/researcher/view.php?person=in-vramakr2" + "contributors": [ + { + "name": "Venkatraman Ramakrishna", + "email": "vramakr2@in.ibm.com", + "url": "https://researcher.watson.ibm.com/researcher/view.php?person=in-vramakr2" + }, + { + "name": "Sandeep Nishad", + "email": "sandeep.nishad1@ibm.com", + "url": "https://github.com/sandeepnRES" + }, + { + "name": "Krishnasuri Narayanam", + "email": "knaraya3@in.ibm.com", + "url": "https://research.ibm.com/people/krishnasuri-narayanam" + } + ], + "main": "dist/lib/main/typescript/index.js", + "module": "dist/lib/main/typescript/index.js", + "types": "dist/lib/main/typescript/index.d.ts", + "files": [ + "dist/*" + ], + "scripts": { + "build": "cd src/main/typescript && make build", + "build-image": "cd src/main/typescript && make build-image", + "build-image-local": "cd src/main/typescript && make build-image-local", + "build-local": "cd src/main/typescript && make build-local", + "clean": "cd src/main/typescript && make clean", + "clean-local": "cd src/main/typescript && make clean-local", + "publish": "cd src/main/typescript && make push-image && make push-image-latest", + "postpublish": "cd src/main/typescript && make push-image-latest", + "watch": "npm-watch" + }, + "engines": { + "node": ">=18", + "npm": ">=8" }, - { - "name": "Sandeep Nishad", - "email": "sandeep.nishad1@ibm.com", - "url": "https://github.com/sandeepnRES" + "publishConfig": { + "access": "public" }, - { - "name": "Krishnasuri Narayanam", - "email": "knaraya3@in.ibm.com", - "url": "https://research.ibm.com/people/krishnasuri-narayanam" - } - ], - "main": "dist/lib/main/typescript/index.js", - "module": "dist/lib/main/typescript/index.js", - "types": "dist/lib/main/typescript/index.d.ts", - "files": [ - "dist/*" - ], - "scripts": { - "build": "cd src/main/typescript && make build", - "build-image": "cd src/main/typescript && make build-image", - "build-image-local": "cd src/main/typescript && make build-image-local", - "build-local": "cd src/main/typescript && make build-local", - "clean": "cd src/main/typescript && make clean", - "clean-local": "cd src/main/typescript && make clean-local", - "publish": "cd src/main/typescript && make push-image && make push-image-latest", - "postpublish": "cd src/main/typescript && make push-image-latest", - "watch": "npm-watch" - }, - "engines": { - "node": ">=18", - "npm": ">=8" - }, - "publishConfig": { - "access": "public" - }, - "browserMinified": "dist/cacti-weaver-driver-fabric.web.umd.min.js", - "mainMinified": "dist/cacti-weaver-driver-fabric.node.umd.min.js", - "watch": {} + "browserMinified": "dist/cacti-weaver-driver-fabric.web.umd.min.js", + "mainMinified": "dist/cacti-weaver-driver-fabric.node.umd.min.js", + "watch": {} } diff --git a/packages/cactus-plugin-ccmodel-hephaestus/package.json b/packages/cactus-plugin-ccmodel-hephaestus/package.json index a8012b10da..4f06a2036d 100644 --- a/packages/cactus-plugin-ccmodel-hephaestus/package.json +++ b/packages/cactus-plugin-ccmodel-hephaestus/package.json @@ -1,6 +1,6 @@ { "name": "@hyperledger/cactus-plugin-ccmodel-hephaestus", - "version": "2.0.0-rc.7", + "version": "2.0.0", "description": "A web service plugin that provides management capabilities on cross-chain transactions visualization.", "keywords": [ "Hyperledger", @@ -62,12 +62,12 @@ "webpack:prod:web": "webpack --env=prod --target=web --config ../../webpack.config.js" }, "dependencies": { - "@hyperledger/cactus-common": "2.0.0-rc.7", - "@hyperledger/cactus-core": "2.0.0-rc.7", - "@hyperledger/cactus-core-api": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0-rc.7", - "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.7", + "@hyperledger/cactus-common": "2.0.0", + "@hyperledger/cactus-core": "2.0.0", + "@hyperledger/cactus-core-api": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", "express": "4.21.0", "run-time-error-cjs": "1.4.0", "rxjs": "7.8.1", @@ -75,9 +75,9 @@ "uuid": "10.0.0" }, "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "2.0.0-rc.7", - "@hyperledger/cactus-test-geth-ledger": "2.0.0-rc.7", - "@hyperledger/cactus-test-tooling": "2.0.0-rc.7", + "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", + "@hyperledger/cactus-test-geth-ledger": "2.0.0", + "@hyperledger/cactus-test-tooling": "2.0.0", "@types/express": "5.0.0", "@types/uuid": "10.0.0", "body-parser": "1.20.3", diff --git a/packages/cactus-plugin-ledger-connector-ethereum/package.json b/packages/cactus-plugin-ledger-connector-ethereum/package.json index bdec5a792b..4c1b066f4f 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/package.json +++ b/packages/cactus-plugin-ledger-connector-ethereum/package.json @@ -82,9 +82,9 @@ "sanitize-html": "2.12.1", "socket.io-client-fixed-types": "4.5.4", "typescript-optional": "2.0.1", - "web3": "4.14.0", - "web3-eth": "4.10.0", - "web3-eth-contract": "4.7.0" + "web3": "4.4.0", + "web3-eth": "4.4.0", + "web3-eth-contract": "4.2.0" }, "devDependencies": { "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts index 0c9a163268..7156331980 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts +++ b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/sign-utils.ts @@ -32,13 +32,16 @@ export function signTransaction( | FeeMarketEIP1559Transaction | BlobEIP4844Transaction; } { - let chainConfiguration = new Common({ chain: Chain.Mainnet }); + let chainConfiguration = new Common({ + chain: Chain.Mainnet, + hardfork: "istanbul", + }); if (customChainInfo) { chainConfiguration = Common.custom(customChainInfo); } const transaction = TransactionFactory.fromTxData(txData, { - common: chainConfiguration, + common: chainConfiguration as any, }); if (privateKey.toLowerCase().startsWith("0x")) { privateKey = privateKey.slice(2); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts index cb94cce4c5..2a0a8786a6 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts +++ b/packages/cactus-plugin-ledger-connector-ethereum/src/main/typescript/web-services/watch-blocks-v1-endpoint.ts @@ -5,7 +5,7 @@ */ import Web3, { BlockHeaderOutput, FMT_BYTES, FMT_NUMBER } from "web3"; -import { NewHeadsSubscription } from "web3-eth"; +import { NewHeadsSubscription, RegisteredSubscription } from "web3-eth"; import type { Socket as SocketIoSocket } from "socket.io"; import { @@ -21,10 +21,7 @@ import { WatchBlocksV1, Web3Transaction, } from "../generated/openapi/typescript-axios"; -import { - ConvertWeb3ReturnToString, - Web3StringReturnFormat, -} from "../types/util-types"; +import { ConvertWeb3ReturnToString } from "../types/util-types"; const DEFAULT_HTTP_POLL_INTERVAL = 1000 * 5; // 5 seconds const LAST_SEEN_LATEST_BLOCK = -1; // must be negative number, will be replaced with latest block in code @@ -337,7 +334,7 @@ export class WatchBlocksV1SubscriptionEndpoint extends WatchBlocksV1Endpoint { } public async subscribe() { - const { socket, log, web3, isGetBlockData } = this; + const { socket, log, isGetBlockData } = this; log.info(`${WatchBlocksV1.Subscribe} [WS Subscription] => ${socket.id}`); if (this.isSubscribed) { @@ -352,46 +349,54 @@ export class WatchBlocksV1SubscriptionEndpoint extends WatchBlocksV1Endpoint { await this.emitAllSinceLastSeenBlock(); log.debug("Subscribing to Web3 new block headers event..."); - this.newBlocksSubscription = await web3.eth.subscribe( - "newBlockHeaders", - undefined, - Web3StringReturnFormat, - ); - - this.newBlocksSubscription.on("data", async (blockHeader) => { - try { - log.debug("newBlockHeaders:", blockHeader); - - if (typeof blockHeader.number === undefined) { - throw new Error( - `Missing block number in received block header (number: ${blockHeader.number}, hash: ${blockHeader.hash})`, - ); - } - const blockNumber = Number(blockHeader.number); - if (blockNumber - this.lastSeenBlock > 2) { - log.info( - `Detected missing blocks since latest one (blockNumber: ${blockNumber}, lastSeenBlock: ${this.lastSeenBlock})`, - ); - await this.emitAllSinceLastSeenBlock(); - } + const options = { + subscription: "newBlockHeaders" as keyof RegisteredSubscription, + parameters: {}, + formatter: (data: BlockHeaderOutput) => data, + }; - let next: WatchBlocksV1Progress; - if (isGetBlockData) { - next = await this.getFullBlockProgress(blockNumber); - } else { - next = await this.headerDataToBlockProgress(blockHeader); + this.newBlocksSubscription = (await this.web3.eth.subscribe( + options.subscription, + options.parameters, + )) as unknown as NewHeadsSubscription; + + this.newBlocksSubscription?.on( + "data", + async (blockHeader: BlockHeaderOutput) => { + try { + log.debug("newBlockHeaders:", blockHeader); + + if (blockHeader.number === undefined || blockHeader.number === null) { + throw new Error( + `Missing block number in received block header (number: ${blockHeader.number}, hash: ${blockHeader.hash})`, + ); + } + const blockNumber = Number(blockHeader.number); + if (blockNumber - this.lastSeenBlock > 2) { + log.info( + `Detected missing blocks since latest one (blockNumber: ${blockNumber}, lastSeenBlock: ${this.lastSeenBlock})`, + ); + await this.emitAllSinceLastSeenBlock(); + } + + let next: WatchBlocksV1Progress; + if (isGetBlockData) { + next = await this.getFullBlockProgress(blockNumber); + } else { + next = await this.headerDataToBlockProgress(blockHeader); + } + + socket.emit(WatchBlocksV1.Next, next); + + this.lastSeenBlock = blockNumber; + } catch (error) { + log.warn("Error when parsing subscribed block data:", error); } + }, + ); - socket.emit(WatchBlocksV1.Next, next); - - this.lastSeenBlock = blockNumber; - } catch (error) { - log.warn("Error when parsing subscribed block data:", error); - } - }); - - this.newBlocksSubscription.on("error", async (error) => { - console.log("Error when subscribing to new block header: ", error); + this.newBlocksSubscription?.on("error", async (error: Error) => { + log.error("Error when subscribing to new block header: ", error); socket.emit(WatchBlocksV1.Error, safeStringifyException(error)); await this.unsubscribe(); }); diff --git a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts index 70f4f4dda7..716ce55de5 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-ethereum/src/test/typescript/integration/geth-contract-deploy-and-invoke-using-keychain-v1.test.ts @@ -19,6 +19,7 @@ import { v4 as uuidV4 } from "uuid"; import { AddressInfo } from "net"; import { Server as SocketIoServer } from "socket.io"; import Web3, { HexString } from "web3"; +import { Address } from "@ethereumjs/util"; import { LogLevelDesc, @@ -49,6 +50,7 @@ import { signTransaction, } from "../../../main/typescript/public-api"; import { K_CACTI_ETHEREUM_TOTAL_TX_COUNT } from "../../../main/typescript/prometheus-exporter/metrics"; +import { AddressLike } from "ethers"; const containerImageName = "ghcr.io/hyperledger/cacti-geth-all-in-one"; const containerImageVersion = "2023-07-27-2a8c48ed6"; @@ -351,11 +353,11 @@ describe("Ethereum contract deploy and invoke using keychain tests", () => { test("invoke Web3SigningCredentialType.None", async () => { const testEthAccount2 = web3.eth.accounts.create(); - + const address = Address.fromString(testEthAccount2.address); const value = 10e6; const { serializedTransactionHex } = signTransaction( { - to: testEthAccount2.address, + to: address, value, maxPriorityFeePerGas: 0, maxFeePerGas: 0x40000000, diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index ac4c67511d..5c2cbef961 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -6,6 +6,7 @@ "Interoperability", "Distributed Ledger Technology", "IETF", + "Hyperledger Cacti", "Secure Asset Transfer Protocol" ], "repository": { @@ -87,21 +88,22 @@ } }, "dependencies": { + "@bufbuild/protobuf": "1.10.0", + "@connectrpc/connect": "1.3.0", + "@connectrpc/connect-express": "1.3.0", + "@connectrpc/connect-node": "1.3.0", + "@connectrpc/protoc-gen-connect-es": "1.3.0", "@hyperledger/cactus-cmd-api-server": "2.0.0", "@hyperledger/cactus-common": "2.0.0", "@hyperledger/cactus-core": "2.0.0", "@hyperledger/cactus-core-api": "2.0.0", + "@hyperledger/cactus-plugin-bungee-hermes": "2.0.0", "@hyperledger/cactus-plugin-keychain-memory": "2.0.0", "@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0", + "@hyperledger/cactus-plugin-ledger-connector-ethereum": "2.0.0", "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0", "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0", "@hyperledger/cactus-test-tooling": "2.0.0", - "@connectrpc/connect": "1.3.0", - "@connectrpc/connect-express": "1.3.0", - "@connectrpc/connect-node": "1.3.0", - "@connectrpc/protoc-gen-connect-es": "1.3.0", - "@bufbuild/protobuf": "1.10.0", - "@hyperledger/cactus-plugin-bungee-hermes": "2.0.0", "axios": "1.7.7", "bignumber.js": "9.1.2", "bn.js": "5.2.1", diff --git a/yarn.lock b/yarn.lock index eb5ad4bedf..9f2e1d3c7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,7 +5,7 @@ __metadata: version: 8 cacheKey: 10 -"@2060.io/ffi-napi@npm:4.0.8, @2060.io/ffi-napi@npm:^4.0.8": +"@2060.io/ffi-napi@npm:4.0.8": version: 4.0.8 resolution: "@2060.io/ffi-napi@npm:4.0.8" dependencies: @@ -20,6 +20,21 @@ __metadata: languageName: node linkType: hard +"@2060.io/ffi-napi@npm:^4.0.8": + version: 4.0.9 + resolution: "@2060.io/ffi-napi@npm:4.0.9" + dependencies: + "@2060.io/ref-napi": "npm:^3.0.6" + debug: "npm:^4.1.1" + get-uv-event-loop-napi-h: "npm:^1.0.5" + node-addon-api: "npm:^3.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.2.1" + ref-struct-di: "npm:^1.1.0" + checksum: 10/41693b703542c44212e0d83cab2b668bb1131591aabbe7efceab619b11b4b1f915f99a743b8bd4c684e631ccef3aa1b01e991aebc56e92e0e6564dcc85faeeec + languageName: node + linkType: hard + "@2060.io/ref-napi@npm:3.0.6, @2060.io/ref-napi@npm:^3.0.6": version: 3.0.6 resolution: "@2060.io/ref-napi@npm:3.0.6" @@ -33,13 +48,6 @@ __metadata: languageName: node linkType: hard -"@aashutoshrathi/word-wrap@npm:^1.2.3": - version: 1.2.6 - resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" - checksum: 10/6eebd12a5cd03cee38fcb915ef9f4ea557df6a06f642dfc7fe8eb4839eb5c9ca55a382f3604d52c14200b0c214c12af5e1f23d2a6d8e23ef2d016b105a9d6c0a - languageName: node - linkType: hard - "@adobe/css-tools@npm:^4.0.1": version: 4.4.0 resolution: "@adobe/css-tools@npm:4.4.0" @@ -69,9 +77,9 @@ __metadata: linkType: hard "@adraffy/ens-normalize@npm:^1.8.8": - version: 1.9.4 - resolution: "@adraffy/ens-normalize@npm:1.9.4" - checksum: 10/d9f88a52cb1809aaa32d2e3f92f8c59f408d62b93d64bbe3178ffffb3c1e197813e35769327a74bdf93fb4b7cb6b5f245b93d7284b077b28f3cbed482fe2fe24 + version: 1.11.0 + resolution: "@adraffy/ens-normalize@npm:1.11.0" + checksum: 10/abef75f21470ea43dd6071168e092d2d13e38067e349e76186c78838ae174a46c3e18ca50921d05bea6ec3203074147c9e271f8cb6531d1c2c0e146f3199ddcb languageName: node linkType: hard @@ -82,7 +90,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:2.2.1, @ampproject/remapping@npm:^2.2.0": +"@ampproject/remapping@npm:2.2.1": version: 2.2.1 resolution: "@ampproject/remapping@npm:2.2.1" dependencies: @@ -92,7 +100,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:2.3.0": +"@ampproject/remapping@npm:2.3.0, @ampproject/remapping@npm:^2.2.0": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" dependencies: @@ -102,15 +110,6 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.1.0": - version: 2.1.2 - resolution: "@ampproject/remapping@npm:2.1.2" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.0" - checksum: 10/2151b1fd8149e9e288fa16c02699d74e6020baf3fe3154d2bd933e59db7a03076567e28493d1408ffa162d67880a2b9e0a9bbc64f3bb4af22a7cce2fdb4c345d - languageName: node - linkType: hard - "@angular-builders/common@npm:1.0.2": version: 1.0.2 resolution: "@angular-builders/common@npm:1.0.2" @@ -155,7 +154,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/architect@npm:0.1602.1, @angular-devkit/architect@npm:>=0.1600.0 < 0.1700.0": +"@angular-devkit/architect@npm:0.1602.1": version: 0.1602.1 resolution: "@angular-devkit/architect@npm:0.1602.1" dependencies: @@ -165,7 +164,27 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/architect@npm:0.1703.8, @angular-devkit/architect@npm:>=0.1700.0 < 0.1800.0": +"@angular-devkit/architect@npm:0.1602.16, @angular-devkit/architect@npm:>=0.1600.0 < 0.1700.0": + version: 0.1602.16 + resolution: "@angular-devkit/architect@npm:0.1602.16" + dependencies: + "@angular-devkit/core": "npm:16.2.16" + rxjs: "npm:7.8.1" + checksum: 10/2144a5a6aa7c62c5d051e9fa12c05480e2b47aaf812cd1e07d6ee0a2c8e6ae2e02cea2707780ea897167e1616d2d901d29504d4bc188473afbfc57daa9eb9e5c + languageName: node + linkType: hard + +"@angular-devkit/architect@npm:0.1703.11, @angular-devkit/architect@npm:>=0.1700.0 < 0.1800.0": + version: 0.1703.11 + resolution: "@angular-devkit/architect@npm:0.1703.11" + dependencies: + "@angular-devkit/core": "npm:17.3.11" + rxjs: "npm:7.8.1" + checksum: 10/e1ff9a789cc965c19ee75ff054bca9e2065eef49f4cb96359bbfd4cc91d2eb6921b312402fbc1d17149fca4e866506e2461074c72c2b0dc65c7cd30366f339a8 + languageName: node + linkType: hard + +"@angular-devkit/architect@npm:0.1703.8": version: 0.1703.8 resolution: "@angular-devkit/architect@npm:0.1703.8" dependencies: @@ -175,7 +194,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/build-angular@npm:16.2.1, @angular-devkit/build-angular@npm:^16.0.0": +"@angular-devkit/build-angular@npm:16.2.1": version: 16.2.1 resolution: "@angular-devkit/build-angular@npm:16.2.1" dependencies: @@ -282,7 +301,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/build-angular@npm:17.3.8, @angular-devkit/build-angular@npm:^17.0.0": +"@angular-devkit/build-angular@npm:17.3.8": version: 17.3.8 resolution: "@angular-devkit/build-angular@npm:17.3.8" dependencies: @@ -394,6 +413,225 @@ __metadata: languageName: node linkType: hard +"@angular-devkit/build-angular@npm:^16.0.0": + version: 16.2.16 + resolution: "@angular-devkit/build-angular@npm:16.2.16" + dependencies: + "@ampproject/remapping": "npm:2.2.1" + "@angular-devkit/architect": "npm:0.1602.16" + "@angular-devkit/build-webpack": "npm:0.1602.16" + "@angular-devkit/core": "npm:16.2.16" + "@babel/core": "npm:7.22.9" + "@babel/generator": "npm:7.22.9" + "@babel/helper-annotate-as-pure": "npm:7.22.5" + "@babel/helper-split-export-declaration": "npm:7.22.6" + "@babel/plugin-proposal-async-generator-functions": "npm:7.20.7" + "@babel/plugin-transform-async-to-generator": "npm:7.22.5" + "@babel/plugin-transform-runtime": "npm:7.22.9" + "@babel/preset-env": "npm:7.22.9" + "@babel/runtime": "npm:7.22.6" + "@babel/template": "npm:7.22.5" + "@discoveryjs/json-ext": "npm:0.5.7" + "@ngtools/webpack": "npm:16.2.16" + "@vitejs/plugin-basic-ssl": "npm:1.0.1" + ansi-colors: "npm:4.1.3" + autoprefixer: "npm:10.4.14" + babel-loader: "npm:9.1.3" + babel-plugin-istanbul: "npm:6.1.1" + browserslist: "npm:^4.21.5" + chokidar: "npm:3.5.3" + copy-webpack-plugin: "npm:11.0.0" + critters: "npm:0.0.20" + css-loader: "npm:6.8.1" + esbuild: "npm:0.18.17" + esbuild-wasm: "npm:0.18.17" + fast-glob: "npm:3.3.1" + guess-parser: "npm:0.4.22" + https-proxy-agent: "npm:5.0.1" + inquirer: "npm:8.2.4" + jsonc-parser: "npm:3.2.0" + karma-source-map-support: "npm:1.4.0" + less: "npm:4.1.3" + less-loader: "npm:11.1.0" + license-webpack-plugin: "npm:4.0.2" + loader-utils: "npm:3.2.1" + magic-string: "npm:0.30.1" + mini-css-extract-plugin: "npm:2.7.6" + mrmime: "npm:1.0.1" + open: "npm:8.4.2" + ora: "npm:5.4.1" + parse5-html-rewriting-stream: "npm:7.0.0" + picomatch: "npm:2.3.1" + piscina: "npm:4.0.0" + postcss: "npm:8.4.31" + postcss-loader: "npm:7.3.3" + resolve-url-loader: "npm:5.0.0" + rxjs: "npm:7.8.1" + sass: "npm:1.64.1" + sass-loader: "npm:13.3.2" + semver: "npm:7.5.4" + source-map-loader: "npm:4.0.1" + source-map-support: "npm:0.5.21" + terser: "npm:5.19.2" + text-table: "npm:0.2.0" + tree-kill: "npm:1.2.2" + tslib: "npm:2.6.1" + vite: "npm:4.5.5" + webpack: "npm:5.94.0" + webpack-dev-middleware: "npm:6.1.2" + webpack-dev-server: "npm:4.15.1" + webpack-merge: "npm:5.9.0" + webpack-subresource-integrity: "npm:5.1.0" + peerDependencies: + "@angular/compiler-cli": ^16.0.0 + "@angular/localize": ^16.0.0 + "@angular/platform-server": ^16.0.0 + "@angular/service-worker": ^16.0.0 + jest: ^29.5.0 + jest-environment-jsdom: ^29.5.0 + karma: ^6.3.0 + ng-packagr: ^16.0.0 + protractor: ^7.0.0 + tailwindcss: ^2.0.0 || ^3.0.0 + typescript: ">=4.9.3 <5.2" + dependenciesMeta: + esbuild: + optional: true + peerDependenciesMeta: + "@angular/localize": + optional: true + "@angular/platform-server": + optional: true + "@angular/service-worker": + optional: true + jest: + optional: true + jest-environment-jsdom: + optional: true + karma: + optional: true + ng-packagr: + optional: true + protractor: + optional: true + tailwindcss: + optional: true + checksum: 10/3ec8cd96d2cc4f662548710e49bcbf4bad681417eadaaca221312162e51ca8ee4cad449adb4d40eb8da74313678cecf57c20059f30499affe6272b351e29200f + languageName: node + linkType: hard + +"@angular-devkit/build-angular@npm:^17.0.0": + version: 17.3.11 + resolution: "@angular-devkit/build-angular@npm:17.3.11" + dependencies: + "@ampproject/remapping": "npm:2.3.0" + "@angular-devkit/architect": "npm:0.1703.11" + "@angular-devkit/build-webpack": "npm:0.1703.11" + "@angular-devkit/core": "npm:17.3.11" + "@babel/core": "npm:7.24.0" + "@babel/generator": "npm:7.23.6" + "@babel/helper-annotate-as-pure": "npm:7.22.5" + "@babel/helper-split-export-declaration": "npm:7.22.6" + "@babel/plugin-transform-async-generator-functions": "npm:7.23.9" + "@babel/plugin-transform-async-to-generator": "npm:7.23.3" + "@babel/plugin-transform-runtime": "npm:7.24.0" + "@babel/preset-env": "npm:7.24.0" + "@babel/runtime": "npm:7.24.0" + "@discoveryjs/json-ext": "npm:0.5.7" + "@ngtools/webpack": "npm:17.3.11" + "@vitejs/plugin-basic-ssl": "npm:1.1.0" + ansi-colors: "npm:4.1.3" + autoprefixer: "npm:10.4.18" + babel-loader: "npm:9.1.3" + babel-plugin-istanbul: "npm:6.1.1" + browserslist: "npm:^4.21.5" + copy-webpack-plugin: "npm:11.0.0" + critters: "npm:0.0.22" + css-loader: "npm:6.10.0" + esbuild: "npm:0.20.1" + esbuild-wasm: "npm:0.20.1" + fast-glob: "npm:3.3.2" + http-proxy-middleware: "npm:2.0.7" + https-proxy-agent: "npm:7.0.4" + inquirer: "npm:9.2.15" + jsonc-parser: "npm:3.2.1" + karma-source-map-support: "npm:1.4.0" + less: "npm:4.2.0" + less-loader: "npm:11.1.0" + license-webpack-plugin: "npm:4.0.2" + loader-utils: "npm:3.2.1" + magic-string: "npm:0.30.8" + mini-css-extract-plugin: "npm:2.8.1" + mrmime: "npm:2.0.0" + open: "npm:8.4.2" + ora: "npm:5.4.1" + parse5-html-rewriting-stream: "npm:7.0.0" + picomatch: "npm:4.0.1" + piscina: "npm:4.4.0" + postcss: "npm:8.4.35" + postcss-loader: "npm:8.1.1" + resolve-url-loader: "npm:5.0.0" + rxjs: "npm:7.8.1" + sass: "npm:1.71.1" + sass-loader: "npm:14.1.1" + semver: "npm:7.6.0" + source-map-loader: "npm:5.0.0" + source-map-support: "npm:0.5.21" + terser: "npm:5.29.1" + tree-kill: "npm:1.2.2" + tslib: "npm:2.6.2" + undici: "npm:6.11.1" + vite: "npm:5.1.8" + watchpack: "npm:2.4.0" + webpack: "npm:5.94.0" + webpack-dev-middleware: "npm:6.1.2" + webpack-dev-server: "npm:4.15.1" + webpack-merge: "npm:5.10.0" + webpack-subresource-integrity: "npm:5.1.0" + peerDependencies: + "@angular/compiler-cli": ^17.0.0 + "@angular/localize": ^17.0.0 + "@angular/platform-server": ^17.0.0 + "@angular/service-worker": ^17.0.0 + "@web/test-runner": ^0.18.0 + browser-sync: ^3.0.2 + jest: ^29.5.0 + jest-environment-jsdom: ^29.5.0 + karma: ^6.3.0 + ng-packagr: ^17.0.0 + protractor: ^7.0.0 + tailwindcss: ^2.0.0 || ^3.0.0 + typescript: ">=5.2 <5.5" + dependenciesMeta: + esbuild: + optional: true + peerDependenciesMeta: + "@angular/localize": + optional: true + "@angular/platform-server": + optional: true + "@angular/service-worker": + optional: true + "@web/test-runner": + optional: true + browser-sync: + optional: true + jest: + optional: true + jest-environment-jsdom: + optional: true + karma: + optional: true + ng-packagr: + optional: true + protractor: + optional: true + tailwindcss: + optional: true + checksum: 10/39cf1baf9957ffcf274b20b67fe78cbce555e6ca44c8ef6389082e8c9c847649e77c9c10150a525a6b205a9b62b02b66feef6e4d3e8dd4c4e7ac290e9f33cd23 + languageName: node + linkType: hard + "@angular-devkit/build-webpack@npm:0.1602.1": version: 0.1602.1 resolution: "@angular-devkit/build-webpack@npm:0.1602.1" @@ -407,6 +645,32 @@ __metadata: languageName: node linkType: hard +"@angular-devkit/build-webpack@npm:0.1602.16": + version: 0.1602.16 + resolution: "@angular-devkit/build-webpack@npm:0.1602.16" + dependencies: + "@angular-devkit/architect": "npm:0.1602.16" + rxjs: "npm:7.8.1" + peerDependencies: + webpack: ^5.30.0 + webpack-dev-server: ^4.0.0 + checksum: 10/178efeafee8dd1dae818dd3ddfc83611b3433fa34ab1d5a07c8f6bdd0a003f48ea3ea33f3cde04f4e2d359f3caac1d689686582486c0ec9231a3313459e5e50c + languageName: node + linkType: hard + +"@angular-devkit/build-webpack@npm:0.1703.11": + version: 0.1703.11 + resolution: "@angular-devkit/build-webpack@npm:0.1703.11" + dependencies: + "@angular-devkit/architect": "npm:0.1703.11" + rxjs: "npm:7.8.1" + peerDependencies: + webpack: ^5.30.0 + webpack-dev-server: ^4.0.0 + checksum: 10/104ba657723d554c9582b18c6e4d9a0286336b201b16344fb5efdc9caf3acc7075e3627ca84d8fbfee6de8ddc7934f70fa723d8f7b2dab02a35cc4379d5903e6 + languageName: node + linkType: hard + "@angular-devkit/build-webpack@npm:0.1703.8": version: 0.1703.8 resolution: "@angular-devkit/build-webpack@npm:0.1703.8" @@ -420,7 +684,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/core@npm:16.2.1, @angular-devkit/core@npm:^16.0.0": +"@angular-devkit/core@npm:16.2.1": version: 16.2.1 resolution: "@angular-devkit/core@npm:16.2.1" dependencies: @@ -439,7 +703,45 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/core@npm:17.3.8, @angular-devkit/core@npm:^17.0.0, @angular-devkit/core@npm:^17.1.0": +"@angular-devkit/core@npm:16.2.16, @angular-devkit/core@npm:^16.0.0": + version: 16.2.16 + resolution: "@angular-devkit/core@npm:16.2.16" + dependencies: + ajv: "npm:8.12.0" + ajv-formats: "npm:2.1.1" + jsonc-parser: "npm:3.2.0" + picomatch: "npm:2.3.1" + rxjs: "npm:7.8.1" + source-map: "npm:0.7.4" + peerDependencies: + chokidar: ^3.5.2 + peerDependenciesMeta: + chokidar: + optional: true + checksum: 10/f46d2b5539e044e3c72d5a104f0c961777710b0e7e3984397384820c3507a18e42b73f4494bebfa7e9e5281a34869d93c30da1b869eb0e12b9cdf2b3549d94a0 + languageName: node + linkType: hard + +"@angular-devkit/core@npm:17.3.11, @angular-devkit/core@npm:^17.0.0, @angular-devkit/core@npm:^17.1.0": + version: 17.3.11 + resolution: "@angular-devkit/core@npm:17.3.11" + dependencies: + ajv: "npm:8.12.0" + ajv-formats: "npm:2.1.1" + jsonc-parser: "npm:3.2.1" + picomatch: "npm:4.0.1" + rxjs: "npm:7.8.1" + source-map: "npm:0.7.4" + peerDependencies: + chokidar: ^3.5.2 + peerDependenciesMeta: + chokidar: + optional: true + checksum: 10/eb9a9ea1383cea8e55a8a0686b7c79790a2b4600a9250b2b826af527e5c1f3dbffb14d6a19b899d4c414f8e2723df71608c2f06612e895b553b5777174c207d2 + languageName: node + linkType: hard + +"@angular-devkit/core@npm:17.3.8": version: 17.3.8 resolution: "@angular-devkit/core@npm:17.3.8" dependencies: @@ -458,7 +760,7 @@ __metadata: languageName: node linkType: hard -"@angular-devkit/schematics@npm:16.2.1, @angular-devkit/schematics@npm:^16.0.0": +"@angular-devkit/schematics@npm:16.2.1": version: 16.2.1 resolution: "@angular-devkit/schematics@npm:16.2.1" dependencies: @@ -471,6 +773,19 @@ __metadata: languageName: node linkType: hard +"@angular-devkit/schematics@npm:16.2.16, @angular-devkit/schematics@npm:^16.0.0": + version: 16.2.16 + resolution: "@angular-devkit/schematics@npm:16.2.16" + dependencies: + "@angular-devkit/core": "npm:16.2.16" + jsonc-parser: "npm:3.2.0" + magic-string: "npm:0.30.1" + ora: "npm:5.4.1" + rxjs: "npm:7.8.1" + checksum: 10/047a3b7cc640161f29174d5fa974f25618e7603904802fcbb9369a28f4b0839bce66d3ad5a87d8b874a9610487d98fe75cdb40b52693f912d12ba3974e17917f + languageName: node + linkType: hard + "@angular-devkit/schematics@npm:17.3.8": version: 17.3.8 resolution: "@angular-devkit/schematics@npm:17.3.8" @@ -817,13 +1132,13 @@ __metadata: linkType: hard "@apidevtools/json-schema-ref-parser@npm:^11.6.2": - version: 11.6.4 - resolution: "@apidevtools/json-schema-ref-parser@npm:11.6.4" + version: 11.7.2 + resolution: "@apidevtools/json-schema-ref-parser@npm:11.7.2" dependencies: "@jsdevtools/ono": "npm:^7.1.3" "@types/json-schema": "npm:^7.0.15" js-yaml: "npm:^4.1.0" - checksum: 10/66ab61d49d29915d7a95f452d753f5fccdc26e565262864cf3a44b838b25d8bca1961d0b285b119d1daa44321f606ddf22ee2090a49a5af5e7d348dc63c916e0 + checksum: 10/8e80207c28aad234d3710fcfcf307691000bfbda40edb2ea4fdaf8158d026eb2b15a6471076490c2f40304df5b7bdd4be33d9979acef6cbfaf459b8bd1d79bf2 languageName: node linkType: hard @@ -920,11 +1235,11 @@ __metadata: linkType: hard "@apollo/usage-reporting-protobuf@npm:^4.0.0": - version: 4.1.0 - resolution: "@apollo/usage-reporting-protobuf@npm:4.1.0" + version: 4.1.1 + resolution: "@apollo/usage-reporting-protobuf@npm:4.1.1" dependencies: "@apollo/protobufjs": "npm:1.2.7" - checksum: 10/cbc57707ab8fb6daa2b5e86f20df4697db569e497060865a43993e1fdc0aae5c747507789f1d3eb17ff2367de9f018fa72347dcdcfc9fe8d2a9058351b0b6f44 + checksum: 10/07679e0058d0f67200bcbb05405697d4052dd6d921b8ed717878d75c60efe5af4dd1c387f9e72be17d050967b3c334ee3eab8954c4dc40aed0f1013eb30fb251 languageName: node linkType: hard @@ -1246,65 +1561,57 @@ __metadata: linkType: hard "@azure/abort-controller@npm:^1.0.0": - version: 1.0.4 - resolution: "@azure/abort-controller@npm:1.0.4" + version: 1.1.0 + resolution: "@azure/abort-controller@npm:1.1.0" dependencies: - tslib: "npm:^2.0.0" - checksum: 10/961855736b70f0576346d77537ceb49e1ad7808dd1b287dac732046a7e93f1dba9ebd9cda3bd1bad1a8d1ff1835601b12636a44443e169e2b6353404895f1b39 - languageName: node - linkType: hard - -"@azure/core-asynciterator-polyfill@npm:^1.0.0": - version: 1.0.2 - resolution: "@azure/core-asynciterator-polyfill@npm:1.0.2" - checksum: 10/ccdad3bcf3f670e0b4f52e421cd1566368dce36ea4b3cb18a9b554c14ea0c1436868cb55e774b2377307dcb222e4eb3777b48e97249157c612e9c24654a56d16 + tslib: "npm:^2.2.0" + checksum: 10/1efe8735cfe6411f42ab9dda86be627073e0e3345a89bd5d0560175523ab3939db2c82fd17965a49fc70513377866539c91a5c73c871b5a0d771329ffae87dda languageName: node linkType: hard -"@azure/core-auth@npm:^1.3.0": - version: 1.3.2 - resolution: "@azure/core-auth@npm:1.3.2" +"@azure/abort-controller@npm:^2.0.0": + version: 2.1.2 + resolution: "@azure/abort-controller@npm:2.1.2" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/e0e1311d91375cd3fb1d8d24ef5ee4c987b226b894dc247f640db73c7339ee8c86c145fac411d64bc59665929b15ed1587a9b6b439cc058807183ffe7cf71817 + tslib: "npm:^2.6.2" + checksum: 10/484e34a8121e5815f764af4da1c8b51d4713106e43f1c44e59671773ffff52da066780821c7633cf601668daa1181a57a1c88f57854d60b62ecc5560f9c52932 languageName: node linkType: hard -"@azure/core-auth@npm:^1.4.0, @azure/core-auth@npm:^1.5.0": - version: 1.5.0 - resolution: "@azure/core-auth@npm:1.5.0" +"@azure/core-auth@npm:^1.3.0, @azure/core-auth@npm:^1.4.0, @azure/core-auth@npm:^1.5.0, @azure/core-auth@npm:^1.8.0": + version: 1.9.0 + resolution: "@azure/core-auth@npm:1.9.0" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-util": "npm:^1.1.0" - tslib: "npm:^2.2.0" - checksum: 10/07d93f672e9381c40c2c71ddbd9bbf9f0c6f617acd51ecf7d3481373076cb13921788512c5c5a8ad42ff3c1c9e610d56e0f6e02198924f4a3ec3b958b2dffc9f + "@azure/abort-controller": "npm:^2.0.0" + "@azure/core-util": "npm:^1.11.0" + tslib: "npm:^2.6.2" + checksum: 10/d1ae2847fddfad752b5f4092a3cbe7ad5809bc5c510447809b5e678abc3fc280af629c5155d2100f37ca8f43f88d7d3ea78279f98bd9f7eb44ec492f6cdbbe35 languageName: node linkType: hard "@azure/core-client@npm:^1.4.0": - version: 1.7.3 - resolution: "@azure/core-client@npm:1.7.3" + version: 1.9.2 + resolution: "@azure/core-client@npm:1.9.2" dependencies: - "@azure/abort-controller": "npm:^1.0.0" + "@azure/abort-controller": "npm:^2.0.0" "@azure/core-auth": "npm:^1.4.0" "@azure/core-rest-pipeline": "npm:^1.9.1" "@azure/core-tracing": "npm:^1.0.0" - "@azure/core-util": "npm:^1.0.0" + "@azure/core-util": "npm:^1.6.1" "@azure/logger": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/8564d001b3edddb394b0a1a9590864748899aa512a4a12945cdc7e187dfd8a998acb98fd66ce3b830eda6e54f89107aea4f70aa7fd885b8bee1d9e14d4cb7150 + tslib: "npm:^2.6.2" + checksum: 10/0358b8245bf23943914eb77384955c994bf3ef84f862234cb3e261f9c602a9f4717beedafd48d1da902b15f3464a4211540976fabb4569039fac8e0d41e59ef1 languageName: node linkType: hard "@azure/core-http@npm:^2.0.0": - version: 2.2.4 - resolution: "@azure/core-http@npm:2.2.4" + version: 2.3.2 + resolution: "@azure/core-http@npm:2.3.2" dependencies: "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-asynciterator-polyfill": "npm:^1.0.0" "@azure/core-auth": "npm:^1.3.0" "@azure/core-tracing": "npm:1.0.0-preview.13" + "@azure/core-util": "npm:^1.1.1" "@azure/logger": "npm:^1.0.0" "@types/node-fetch": "npm:^2.5.0" "@types/tunnel": "npm:^0.0.3" @@ -1315,64 +1622,45 @@ __metadata: tslib: "npm:^2.2.0" tunnel: "npm:^0.0.6" uuid: "npm:^8.3.0" - xml2js: "npm:^0.4.19" - checksum: 10/9b7155799c1cf286281a7ef3bd858e81f46e3f0cfa9d9ac2a393a1acee8a98c39308e23f033291b76acfb38e75c079441831b76ecc84e8848f8e49dcae4ba3e1 + xml2js: "npm:^0.5.0" + checksum: 10/5ba2408705532b7c0a4f0446081fdb80e7a69326f30ba847640366cb568ecc096a027fcd4842d00fe06e3dcd65f99cd44731d927d670b66e13248482e7034b77 languageName: node linkType: hard "@azure/core-lro@npm:^2.0.0": - version: 2.2.3 - resolution: "@azure/core-lro@npm:2.2.3" + version: 2.7.2 + resolution: "@azure/core-lro@npm:2.7.2" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-tracing": "npm:1.0.0-preview.13" + "@azure/abort-controller": "npm:^2.0.0" + "@azure/core-util": "npm:^1.2.0" "@azure/logger": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/626dbe74ad4044e95c29f901df6aae1e68461d07648767d4210630ecc4a4277fba0d867f2c4bf0b7ca76260ceada906b3ac6dc64057a2bbcb35ec8cafa06d35c + tslib: "npm:^2.6.2" + checksum: 10/73b4e1d74afc0dc647914db3a79b6212b653d853f6ff7105eb6e19ab2f7af11cef99d6388b3125179c8872db819930ac0ab9768b07c06a3033dd22fa546f8a09 languageName: node linkType: hard "@azure/core-paging@npm:^1.1.1": - version: 1.2.1 - resolution: "@azure/core-paging@npm:1.2.1" - dependencies: - "@azure/core-asynciterator-polyfill": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/3f5abeca2b73b0d9b0ac78ac525a022db847695bb0a35226b82899fcfedd9d3dcb4cbe4f9fe91f8a99bbc6d74fc5a91c8b7972e823ff591b30b7549a96cccec1 - languageName: node - linkType: hard - -"@azure/core-rest-pipeline@npm:^1.1.0": - version: 1.5.0 - resolution: "@azure/core-rest-pipeline@npm:1.5.0" + version: 1.6.2 + resolution: "@azure/core-paging@npm:1.6.2" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.3.0" - "@azure/core-tracing": "npm:1.0.0-preview.13" - "@azure/logger": "npm:^1.0.0" - form-data: "npm:^4.0.0" - http-proxy-agent: "npm:^4.0.1" - https-proxy-agent: "npm:^5.0.0" - tslib: "npm:^2.2.0" - uuid: "npm:^8.3.0" - checksum: 10/dc4664bb699904f3819c767d978d419d3fb38faf6f647fac6b4001466a4e1587e9115dc39ccc423943315c08d7fb7eaf06f6a4a35e67c18247d0da346ef22963 + tslib: "npm:^2.6.2" + checksum: 10/fb1d4c4fcd5705dbcd2332724d0ead324b988a874bfe739483cf65056b8ad5567aaa5ae02f4d0467c71c3be035bbd15682fe0d8f6e47043a66903d439593f5b8 languageName: node linkType: hard -"@azure/core-rest-pipeline@npm:^1.9.1": - version: 1.12.1 - resolution: "@azure/core-rest-pipeline@npm:1.12.1" +"@azure/core-rest-pipeline@npm:^1.1.0, @azure/core-rest-pipeline@npm:^1.9.1": + version: 1.17.0 + resolution: "@azure/core-rest-pipeline@npm:1.17.0" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - "@azure/core-auth": "npm:^1.4.0" + "@azure/abort-controller": "npm:^2.0.0" + "@azure/core-auth": "npm:^1.8.0" "@azure/core-tracing": "npm:^1.0.1" - "@azure/core-util": "npm:^1.3.0" + "@azure/core-util": "npm:^1.9.0" "@azure/logger": "npm:^1.0.0" - form-data: "npm:^4.0.0" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - tslib: "npm:^2.2.0" - checksum: 10/1cd652745d2ace10733b94b24e2ca5dabb2aa2ff39f2a676f7451aff543fce97a3667175f1aa3d2b66ff25665118c8373116919295879b527fa1b4c4042b5962 + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.0" + tslib: "npm:^2.6.2" + checksum: 10/88b79c37e0bf822002745013084d01eb104809186fb56633b046fad35eec64fcccceaa3b2e5bc10a5c15425d723101ee73f885c5a57f074ca993d15f9df25b9c languageName: node linkType: hard @@ -1387,21 +1675,21 @@ __metadata: linkType: hard "@azure/core-tracing@npm:^1.0.0, @azure/core-tracing@npm:^1.0.1": - version: 1.0.1 - resolution: "@azure/core-tracing@npm:1.0.1" + version: 1.2.0 + resolution: "@azure/core-tracing@npm:1.2.0" dependencies: - tslib: "npm:^2.2.0" - checksum: 10/13305f936d695d465df4f66bc259bf261ea81511d8c40f983b1aa198d04107342f210f5710ee53140cc6a5a4655af4e6a1b8aac3835632e1afc85ad40a097490 + tslib: "npm:^2.6.2" + checksum: 10/5d63ffc8f6361545b55b108b2898cda2b424db1a533d11a56890d53ba3b385e9be8f50cfd48a21b897351e1f4bbc56ede14d57187ea927d4489637fc93ebe615 languageName: node linkType: hard -"@azure/core-util@npm:^1.0.0, @azure/core-util@npm:^1.1.0, @azure/core-util@npm:^1.3.0": - version: 1.5.0 - resolution: "@azure/core-util@npm:1.5.0" +"@azure/core-util@npm:^1.1.1, @azure/core-util@npm:^1.11.0, @azure/core-util@npm:^1.2.0, @azure/core-util@npm:^1.3.0, @azure/core-util@npm:^1.6.1, @azure/core-util@npm:^1.9.0": + version: 1.11.0 + resolution: "@azure/core-util@npm:1.11.0" dependencies: - "@azure/abort-controller": "npm:^1.0.0" - tslib: "npm:^2.2.0" - checksum: 10/2dd97919d37f7c89ddaaf85ee58f298a1f8cf5cfc43c2c8bf2645752186f3e7627937307e1907b5c2d28c12aa285534c552d3019fc33a07520926fac66cee4d8 + "@azure/abort-controller": "npm:^2.0.0" + tslib: "npm:^2.6.2" + checksum: 10/16d39f4ed9e224c190f0ffcb040b4f0a9723946b4312784a7a2a227cf2c56cd68328ce28fa05d1109c2e88bb5b34af159264c854e876f182461976a65fa1b5e5 languageName: node linkType: hard @@ -1443,38 +1731,38 @@ __metadata: linkType: hard "@azure/logger@npm:^1.0.0": - version: 1.0.3 - resolution: "@azure/logger@npm:1.0.3" + version: 1.1.4 + resolution: "@azure/logger@npm:1.1.4" dependencies: - tslib: "npm:^2.2.0" - checksum: 10/35115b374a17b6f06370deb0348d40290ba92eec8526402f622f93cb794c763fb027f675c10658a8122cca15792e8545d8dea2d1c000e10b0d6c7e27106b2abc + tslib: "npm:^2.6.2" + checksum: 10/18bae2dcb0e6812a968282b87a6f9d6423533eeadea036b3e77856ce133d8286f4bb866a376d9f2882a88c55b25ff56a96f1a51fb1f1dd57856b937b42bcf46d languageName: node linkType: hard "@azure/msal-browser@npm:^3.11.1": - version: 3.17.0 - resolution: "@azure/msal-browser@npm:3.17.0" + version: 3.27.0 + resolution: "@azure/msal-browser@npm:3.27.0" dependencies: - "@azure/msal-common": "npm:14.12.0" - checksum: 10/0ff3c7e8abfdc2eed9cf22b72bae413d2e251025113789fec82564f4badfda7812a3d954029ffdbfa1aba48dcf4b2040ee6322d9125326e9aa1ed31f8ac08839 + "@azure/msal-common": "npm:14.16.0" + checksum: 10/2c691afed699424202052d8bde8f8ef65ef8fd1eb2f364605fc0b3a7c123bc2f49579a53e4006a8645ef3663b94bb70033bff3ef7c16682a43228a52afef3a1f languageName: node linkType: hard -"@azure/msal-common@npm:14.12.0": - version: 14.12.0 - resolution: "@azure/msal-common@npm:14.12.0" - checksum: 10/5a0905beae17e20d66b352425dfd86d41ddf402f3c2c324aacf0590844e61c2c13ed439c3c63a1d7b4d3861b8d885ed11b7f257373facefe8fa3dc63455ee9c2 +"@azure/msal-common@npm:14.16.0": + version: 14.16.0 + resolution: "@azure/msal-common@npm:14.16.0" + checksum: 10/1f650b00636cd657b93601a12f495cbc9c35b4ed06197468e24e86ed7a0227f9be8003186d8b00abe12532f26b8002811f553ade76fe2cb57a8e62b827b0152c languageName: node linkType: hard "@azure/msal-node@npm:^2.9.2": - version: 2.9.2 - resolution: "@azure/msal-node@npm:2.9.2" + version: 2.16.0 + resolution: "@azure/msal-node@npm:2.16.0" dependencies: - "@azure/msal-common": "npm:14.12.0" + "@azure/msal-common": "npm:14.16.0" jsonwebtoken: "npm:^9.0.0" uuid: "npm:^8.3.0" - checksum: 10/0cbaa209291a300515ab94883b9920ba7fa66b11e34428214e46384c3ab12c6e159904ed0a3190e2babf6509780f855f8c4345c07af9bafca0a94d68ff838ba5 + checksum: 10/4ccedacc69beebc78d996aa7085506df96be6fa93112cfffdec7869f19f7391ea360e40a2389d1eaf48d188f14d61396cf05d7cd8d5f9201f17c580d42a5e0a7 languageName: node linkType: hard @@ -1487,112 +1775,21 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/code-frame@npm:7.16.7" - dependencies: - "@babel/highlight": "npm:^7.16.7" - checksum: 10/db2f7faa31bc2c9cf63197b481b30ea57147a5fc1a6fab60e5d6c02cdfbf6de8e17b5121f99917b3dabb5eeb572da078312e70697415940383efc140d4e0808b - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.8.3": - version: 7.22.13 - resolution: "@babel/code-frame@npm:7.22.13" - dependencies: - "@babel/highlight": "npm:^7.22.13" - chalk: "npm:^2.4.2" - checksum: 10/bf6ae6ba3a510adfda6a211b4a89b0f1c98ca1352b745c077d113f3b568141e0d44ce750b9ac2a80143ba5c8c4080c50fcfc1aa11d86e194ea6785f62520eb5a - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/code-frame@npm:7.18.6" - dependencies: - "@babel/highlight": "npm:^7.18.6" - checksum: 10/195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/code-frame@npm:7.22.10" - dependencies: - "@babel/highlight": "npm:^7.22.10" - chalk: "npm:^2.4.2" - checksum: 10/53620d831c8f2230a7d2fbe833c01c071740a642317c960d45cda9b0b2d0492e152e00ab45aad8b55329ba5de647354b95f42b546fb905c0b7acf78d3f2d3ecd - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/code-frame@npm:7.22.5" - dependencies: - "@babel/highlight": "npm:^7.22.5" - checksum: 10/b1ac7de75859699a9118c5247f489cc943d8d041339323904cd8140592993762f50abc14bc49b6703cb8a94b1aa90d6df2599625825e7ae470c9283b4a6170aa - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/code-frame@npm:7.23.5" - dependencies: - "@babel/highlight": "npm:^7.23.4" - chalk: "npm:^2.4.2" - checksum: 10/44e58529c9d93083288dc9e649c553c5ba997475a7b0758cc3ddc4d77b8a7d985dbe78cc39c9bbc61f26d50af6da1ddf0a3427eae8cc222a9370619b671ed8f5 - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/code-frame@npm:7.24.7" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.22.5, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0, @babel/code-frame@npm:^7.8.3": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" dependencies: - "@babel/highlight": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" picocolors: "npm:^1.0.0" - checksum: 10/4812e94885ba7e3213d49583a155fdffb05292330f0a9b2c41b49288da70cf3c746a3fda0bf1074041a6d741c33f8d7be24be5e96f41ef77395eeddc5c9ff624 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.16.4, @babel/compat-data@npm:^7.17.0": - version: 7.17.0 - resolution: "@babel/compat-data@npm:7.17.0" - checksum: 10/ca06df56c156640395ce16cb66038f570724ae86bdf35cfd71e928a4e1771c46fa8804ff78a7404c380c8b4ab6a85912bbf068e8f3c26d4e2aa2380ec8d60b92 + checksum: 10/db2c2122af79d31ca916755331bb4bac96feb2b334cdaca5097a6b467fdd41963b89b14b6836a14f083de7ff887fc78fa1b3c10b14e743d33e12dbfe5ee3d223 languageName: node linkType: hard -"@babel/compat-data@npm:^7.18.8": - version: 7.18.8 - resolution: "@babel/compat-data@npm:7.18.8" - checksum: 10/85d41394bf6892f74e339f5356e855167ffe443e0daccdafdbe0b189fa5238d7180dc50b0b7e55c376544a9cd63f341d99492a7774091beb9ee1382e85ca22d3 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/compat-data@npm:7.22.5" - checksum: 10/18eb983dd250d94b4c794dd332bf80c4d2af147636991f214df19f15531fb6e405763f9bfec90de51dbbc368b9542bfd4f775cab74427adae0e80830cf0686dd - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/compat-data@npm:7.22.9" - checksum: 10/6797f59857917e57e1765811e4f48371f2bc6063274be012e380e83cbc1a4f7931d616c235df56404134aa4bb4775ee61f7b382688314e1b625a4d51caabd734 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/compat-data@npm:7.23.5" - checksum: 10/088f14f646ecbddd5ef89f120a60a1b3389a50a9705d44603dca77662707d0175a5e0e0da3943c3298f1907a4ab871468656fbbf74bb7842cd8b0686b2c19736 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/compat-data@npm:7.24.8" - checksum: 10/6989b8a61782d9c6c7a1fc58b4efd4fb68e5f5a5b6be3463a3de3752f39a30d21438b8b4485c18cb6b8d7f29e07f79d79639caa08737fae57838e81d7da055c0 +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9, @babel/compat-data@npm:^7.23.5, @babel/compat-data@npm:^7.25.9, @babel/compat-data@npm:^7.26.0": + version: 7.26.2 + resolution: "@babel/compat-data@npm:7.26.2" + checksum: 10/ed9eed6b62ce803ef4a320b1dac76b0302abbb29c49dddf96f3e3207d9717eb34e299a8651bb1582e9c3346ead74b6d595ffced5b3dae718afa08b18741f8402 languageName: node linkType: hard @@ -1642,7 +1839,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:7.23.9, @babel/core@npm:^7.23.5": +"@babel/core@npm:7.23.9": version: 7.23.9 resolution: "@babel/core@npm:7.23.9" dependencies: @@ -1688,109 +1885,40 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0": - version: 7.23.2 - resolution: "@babel/core@npm:7.23.2" +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.16.0, @babel/core@npm:^7.23.5, @babel/core@npm:^7.23.9, @babel/core@npm:^7.5.5, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5, @babel/core@npm:^7.8.0": + version: 7.26.0 + resolution: "@babel/core@npm:7.26.0" dependencies: "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-module-transforms": "npm:^7.23.0" - "@babel/helpers": "npm:^7.23.2" - "@babel/parser": "npm:^7.23.0" - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" + "@babel/code-frame": "npm:^7.26.0" + "@babel/generator": "npm:^7.26.0" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-module-transforms": "npm:^7.26.0" + "@babel/helpers": "npm:^7.26.0" + "@babel/parser": "npm:^7.26.0" + "@babel/template": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.26.0" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 10/b69d7008695b2ac7a3a2db83c5c712fbb79f7031c4480f6351cde327930e38873003d1d021059b729a1d0cb48093f1d384c64269b78f6189f50051fe4f64dc2d - languageName: node - linkType: hard - -"@babel/core@npm:^7.11.1, @babel/core@npm:^7.16.0, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": - version: 7.22.11 - resolution: "@babel/core@npm:7.22.11" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.10" - "@babel/generator": "npm:^7.22.10" - "@babel/helper-compilation-targets": "npm:^7.22.10" - "@babel/helper-module-transforms": "npm:^7.22.9" - "@babel/helpers": "npm:^7.22.11" - "@babel/parser": "npm:^7.22.11" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.11" - "@babel/types": "npm:^7.22.11" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/3d46373e7ce9731f7160329ecf5fb1fcf2b3614e05514ad4eb2004f4a528c424d95c1f780cc7b17a59a5ad7e564947e15538a6c324cc4490b6f70b078d04599f - languageName: node - linkType: hard - -"@babel/core@npm:^7.11.6": - version: 7.18.9 - resolution: "@babel/core@npm:7.18.9" - dependencies: - "@ampproject/remapping": "npm:^2.1.0" - "@babel/code-frame": "npm:^7.18.6" - "@babel/generator": "npm:^7.18.9" - "@babel/helper-compilation-targets": "npm:^7.18.9" - "@babel/helper-module-transforms": "npm:^7.18.9" - "@babel/helpers": "npm:^7.18.9" - "@babel/parser": "npm:^7.18.9" - "@babel/template": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.9" - "@babel/types": "npm:^7.18.9" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.1" - semver: "npm:^6.3.0" - checksum: 10/ebd9a458562ff3981c761bc69ac34e50d9b717dd6128c34f30097d1958439dc24b128a45cdff1ff2453fc65157e0edb3707848c4f95bc45e587e9fec4d0e3e05 - languageName: node - linkType: hard - -"@babel/core@npm:^7.12.3, @babel/core@npm:^7.5.5, @babel/core@npm:^7.7.5": - version: 7.17.5 - resolution: "@babel/core@npm:7.17.5" - dependencies: - "@ampproject/remapping": "npm:^2.1.0" - "@babel/code-frame": "npm:^7.16.7" - "@babel/generator": "npm:^7.17.3" - "@babel/helper-compilation-targets": "npm:^7.16.7" - "@babel/helper-module-transforms": "npm:^7.16.7" - "@babel/helpers": "npm:^7.17.2" - "@babel/parser": "npm:^7.17.3" - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.17.3" - "@babel/types": "npm:^7.17.0" - convert-source-map: "npm:^1.7.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.1.2" - semver: "npm:^6.3.0" - checksum: 10/1e45d498ca92fded7fcaff555a55ac2391385be307f83cf1994312c114303bdcab553c2b0b2e4201ec8e2f033f8eb3f5f9c46e496a98c93be02da11343a69393 + checksum: 10/65767bfdb1f02e80d3af4f138066670ef8fdd12293de85ef151758a901c191c797e86d2e99b11c4cdfca33c72385ecaf38bbd7fa692791ec44c77763496b9b93 languageName: node linkType: hard "@babel/eslint-parser@npm:^7.16.3": - version: 7.22.15 - resolution: "@babel/eslint-parser@npm:7.22.15" + version: 7.25.9 + resolution: "@babel/eslint-parser@npm:7.25.9" dependencies: "@nicolo-ribaudo/eslint-scope-5-internals": "npm:5.1.1-v1" eslint-visitor-keys: "npm:^2.1.0" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.11.0 - eslint: ^7.5.0 || ^8.0.0 - checksum: 10/daaac4a15125d139f1036015ab282a3742ee5cec3d1c281696a4960bdbc96664c15edd4c6ce2dcf3c24f7521ef9a1b7ad170a741b19a75c33e92df4b9924797a + eslint: ^7.5.0 || ^8.0.0 || ^9.0.0 + checksum: 10/ebb68d80b1fa2b964ad1147cc610e0c69b224e620419a885ba5abc996740523bee636a0d447fc29a0d495dbce5fa0246737b25e9e679cca6c5797fdac5176378 languageName: node linkType: hard @@ -1818,7 +1946,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.22.9, @babel/generator@npm:^7.22.9": +"@babel/generator@npm:7.22.9": version: 7.22.9 resolution: "@babel/generator@npm:7.22.9" dependencies: @@ -1830,7 +1958,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.23.6, @babel/generator@npm:^7.23.6": +"@babel/generator@npm:7.23.6": version: 7.23.6 resolution: "@babel/generator@npm:7.23.6" dependencies: @@ -1842,77 +1970,20 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.17.3, @babel/generator@npm:^7.7.2": - version: 7.17.3 - resolution: "@babel/generator@npm:7.17.3" - dependencies: - "@babel/types": "npm:^7.17.0" - jsesc: "npm:^2.5.1" - source-map: "npm:^0.5.0" - checksum: 10/9a102a87b4e477aace1febc89a3692faf09c442015f24c3dffc1f54691498a73bd97a9eda9120be5626ede62728e15f7942ce841ff96c5b464703c701a7ab82a - languageName: node - linkType: hard - -"@babel/generator@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/generator@npm:7.18.9" - dependencies: - "@babel/types": "npm:^7.18.9" - "@jridgewell/gen-mapping": "npm:^0.3.2" - jsesc: "npm:^2.5.1" - checksum: 10/cd19e568724c6389f75c64c178f72bafcbb97af1de0412eecacf5431401b81714521530d98914640dbb096d8ba5a829f09a6cb91ce81fd30fd75d9dace0a00ed - languageName: node - linkType: hard - -"@babel/generator@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/generator@npm:7.22.10" +"@babel/generator@npm:^7.22.5, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0, @babel/generator@npm:^7.4.0, @babel/generator@npm:^7.7.2": + version: 7.26.2 + resolution: "@babel/generator@npm:7.26.2" dependencies: - "@babel/types": "npm:^7.22.10" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/b0df0265694a4baa8e824f1c065769ebd83678a78b5ef16bc75b8471e27d17f7a68d3658d8ce401d3fbbe8bc2e4e9f1d9506c89931d3fc125ff32dfdea1c0f7e - languageName: node - linkType: hard - -"@babel/generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/generator@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/56849bc15d130fe8b31f5c4cccda00aaa6005cb1a2b40cdf7754cf4905d804e41468a25b5b95f07059820926873039066ed1cb82f92cf7bf76a72c853274d1f7 - languageName: node - linkType: hard - -"@babel/generator@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/generator@npm:7.23.0" - dependencies: - "@babel/types": "npm:^7.23.0" - "@jridgewell/gen-mapping": "npm:^0.3.2" - "@jridgewell/trace-mapping": "npm:^0.3.17" - jsesc: "npm:^2.5.1" - checksum: 10/bd1598bd356756065d90ce26968dd464ac2b915c67623f6f071fb487da5f9eb454031a380e20e7c9a7ce5c4a49d23be6cb9efde404952b0b3f3c0c3a9b73d68a - languageName: node - linkType: hard - -"@babel/generator@npm:^7.4.0": - version: 7.25.6 - resolution: "@babel/generator@npm:7.25.6" - dependencies: - "@babel/types": "npm:^7.25.6" + "@babel/parser": "npm:^7.26.2" + "@babel/types": "npm:^7.26.0" "@jridgewell/gen-mapping": "npm:^0.3.5" "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^2.5.1" - checksum: 10/541e4fbb6ea7806f44232d70f25bf09dee9a57fe43d559e375536870ca5261ebb4647fec3af40dcbb3325ea2a49aff040e12a4e6f88609eaa88f10c4e27e31f8 + jsesc: "npm:^3.0.2" + checksum: 10/71ace82b5b07a554846a003624bfab93275ccf73cdb9f1a37a4c1094bf9dc94bb677c67e8b8c939dbd6c5f0eda2e8f268aa2b0d9c3b9511072565660e717e045 languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:7.22.5, @babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.22.5": +"@babel/helper-annotate-as-pure@npm:7.22.5": version: 7.22.5 resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" dependencies: @@ -1921,266 +1992,71 @@ __metadata: languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/d235be963fed5d48a8a4cfabc41c3f03fad6a947810dbcab9cebed7f819811457e10d99b4b2e942ad71baa7ee8e3cd3f5f38a4e4685639ddfddb7528d9a07179 - languageName: node - linkType: hard - -"@babel/helper-annotate-as-pure@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/a9017bfc1c4e9f2225b967fbf818004703de7cf29686468b54002ffe8d6b56e0808afa20d636819fcf3a34b89ba72f52c11bdf1d69f303928ee10d92752cad95 - languageName: node - linkType: hard - -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/d753acac62399fc6dd354cf1b9441bde0c331c2fe792a4c14904c5e5eafc3cac79478f6aa038e8a51c1148b0af6710a2e619855e4b5d54497ac972eaffed5884 - languageName: node - linkType: hard - -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/3ddff45d1e086c9c6dcef53ef46521a0c11ddb09fe3ab42dca5af6bb1b1703895a9f4f8056f49fdf53c2dbf6e5cf1ddb4baf17d7e3766c63f051ab8d60a919ee - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-compilation-targets@npm:7.16.7" - dependencies: - "@babel/compat-data": "npm:^7.16.4" - "@babel/helper-validator-option": "npm:^7.16.7" - browserslist: "npm:^4.17.5" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/87cd35911856e03fa45a0593a36e5f20bec745dbb2f82e0689dc09f4607a13c225d9295e26e7bf44b178f323a3bccad0c025be7e7c32564bcd0a08b2e9ab727d - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-compilation-targets@npm:7.18.9" - dependencies: - "@babel/compat-data": "npm:^7.18.8" - "@babel/helper-validator-option": "npm:^7.18.6" - browserslist: "npm:^4.20.2" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/74f9cff2925a19c8a7ce9c7b6e79257cf6f22a6dd6d8448d28fd3682a399af4cedfaad43ae2108b5c7a439b4b50f094737fb199c5345a9dba03f8113df742225 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.22.10, @babel/helper-compilation-targets@npm:^7.22.6": - version: 7.22.10 - resolution: "@babel/helper-compilation-targets@npm:7.22.10" - dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.5" - browserslist: "npm:^4.21.9" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/974085237b34b3d5e7eb0ec62454e1855fce3e5285cdd9461f01e0058ffaefab2491305be2b218f6e9a0f3f1e7f3edcb2067932a9f5545c39c6a9079328e5931 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-compilation-targets@npm:7.22.15" +"@babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.15" - browserslist: "npm:^4.21.9" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/9706decaa1591cf44511b6f3447eb9653b50ca3538215fe2e5387a8598c258c062f4622da5b95e61f0415706534deee619bbf53a2889f9bd967949b8f6024e0e + "@babel/types": "npm:^7.25.9" + checksum: 10/41edda10df1ae106a9b4fe617bf7c6df77db992992afd46192534f5cff29f9e49a303231733782dd65c5f9409714a529f215325569f14282046e9d3b7a1ffb6c languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-compilation-targets@npm:7.22.5" +"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.25.9" dependencies: - "@babel/compat-data": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - browserslist: "npm:^4.21.3" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/aff56630b85481d7fa1f268fecc6f70df30c06df5073ea72cd422caccb957a0504f119d9681952f7f7b024f27117dc5e9147a48cc0046c2d84856eae92bfae03 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-compilation-targets@npm:7.22.9" - dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.5" - browserslist: "npm:^4.21.9" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/779510e4c2036fa9880c0ed7b77ce84e5926093e216dffa0044f31a146f0daae363c00d1cdda2250788edc8d6457b9bce6245c51d9f4161bb51e053c12c4b478 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/helper-compilation-targets@npm:7.23.6" - dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-validator-option": "npm:^7.23.5" - browserslist: "npm:^4.22.2" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/e1bb465b3b0155702d82cfef09e3813e87a6d777cdd2c513796861eac14953340491eafea1d4109278bf4ceb48b54074c45758f042c0544d00c498090bee5a6f languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.24.7, @babel/helper-compilation-targets@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-compilation-targets@npm:7.24.8" +"@babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.5, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.22.9, @babel/helper-compilation-targets@npm:^7.23.6, @babel/helper-compilation-targets@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-compilation-targets@npm:7.25.9" dependencies: - "@babel/compat-data": "npm:^7.24.8" - "@babel/helper-validator-option": "npm:^7.24.8" - browserslist: "npm:^4.23.1" + "@babel/compat-data": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + browserslist: "npm:^4.24.0" lru-cache: "npm:^5.1.1" semver: "npm:^6.3.1" - checksum: 10/3489280d07b871af565b32f9b11946ff9a999fac0db9bec5df960760f6836c7a4b52fccb9d64229ccce835d37a43afb85659beb439ecedde04dcea7eb062a143 + checksum: 10/8053fbfc21e8297ab55c8e7f9f119e4809fa7e505268691e1bedc2cf5e7a5a7de8c60ad13da2515378621b7601c42e101d2d679904da395fa3806a1edef6b92e languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-create-class-features-plugin@npm:7.22.15" +"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.15" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-member-expression-to-functions": "npm:^7.25.9" + "@babel/helper-optimise-call-expression": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/000d29f1df397b7fdcb97ad0e9a442781787e5cb0456a9b8da690d13e03549a716bf74348029d3bd3fa4837b35d143a535cad1006f9d552063799ecdd96df672 + checksum: 10/d1d47a7b5fd317c6cb1446b0e4f4892c19ddaa69ea0229f04ba8bea5f273fc8168441e7114ad36ff919f2d310f97310cec51adc79002e22039a7e1640ccaf248 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.22.11, @babel/helper-create-class-features-plugin@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/helper-create-class-features-plugin@npm:7.22.11" +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + regexpu-core: "npm:^6.1.1" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/53f77935602f330a1334ae61a681ab50778ea35dbe85b04ddf95cd39f49b3da84632b8986caa97e25ccad07b23a72a2c819bd60c902d16e140a3f970aef18708 + checksum: 10/bc2b6a365ddf490c416661833dbf4430ae0c66132acccb5ce257e82026dd9db54da788bfbdcb7e0032aa0cba965cb1be169b1e1fb2c8c029b81625da4963f6b9 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/helper-create-class-features-plugin@npm:7.24.8" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.8" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/a779c5356fcc4881e807d85d973fd37e99e773fe95837b0f6582ca9a89331f84e5f26b0b6aa9a101181325b73cf3f54081d178b657a79819b8abadc53b0ea8ec - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.16.7": - version: 7.17.0 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.17.0" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.16.7" - regexpu-core: "npm:^5.0.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/de60946279ce46ab64f07e2c93d981ace72625afeee1b5807af5007499f88ccbf4729f3aa421db5c4bc17b24cb5d9e0a79ce1dd7237dc1f21f65f7d66676de6c - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.5" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/a6c2583918a0b4b66f23a7209ea9f430fc346360376684788c08c13fb31a1a55be6d0f1acd597f2689831045d31aadaee6e45e1f18d819b9088e900928512581 - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/dd7238af30ea6b26a627192422822ae810873fd899150dd8d4348eb107045721a849abcfa2bd04f917493784a93724b8caf6994c31afd16f9347a8a9b9862425 - languageName: node - linkType: hard - -"@babel/helper-define-polyfill-provider@npm:^0.4.2": - version: 0.4.2 - resolution: "@babel/helper-define-polyfill-provider@npm:0.4.2" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/6383a34af4048957e46366fa7e6228b61e140955a707f8af7b69c26b2b780880db164d08b6de9420f6ec5a0ee01eb23aa5d78a4b141f2b65b3670e71906471bf - languageName: node - linkType: hard - -"@babel/helper-define-polyfill-provider@npm:^0.4.3": - version: 0.4.3 - resolution: "@babel/helper-define-polyfill-provider@npm:0.4.3" +"@babel/helper-define-polyfill-provider@npm:^0.4.4": + version: 0.4.4 + resolution: "@babel/helper-define-polyfill-provider@npm:0.4.4" dependencies: "@babel/helper-compilation-targets": "npm:^7.22.6" "@babel/helper-plugin-utils": "npm:^7.22.5" @@ -2189,7 +2065,7 @@ __metadata: resolve: "npm:^1.14.2" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/9ab9d6a2cfaffc44f8b7ad661b642b03f31597282557686b7f4c64f67acd3c5844d4eac028e63d238819bcec0549ddef7dc0539d10966ace96f4c61e97b33138 + checksum: 10/16c312e40ecf2ead81f3ab7275387079071012d2363022c04cf16d56fe0d781185f3a517b928f4556c716ae45e0567b817b636d5cd2fee8fb2ce2b18a04c5bcd languageName: node linkType: hard @@ -2223,37 +2099,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-environment-visitor@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/c03a10105d9ebd1fe632a77356b2e6e2f3c44edba9a93b0dc3591b6a66bd7a2e323dd9502f9ce96fc6401234abff1907aa877b6674f7826b61c953f7c8204bbe - languageName: node - linkType: hard - -"@babel/helper-environment-visitor@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-environment-visitor@npm:7.18.9" - checksum: 10/b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 - languageName: node - linkType: hard - -"@babel/helper-environment-visitor@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-environment-visitor@npm:7.22.20" - checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 - languageName: node - linkType: hard - -"@babel/helper-environment-visitor@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-environment-visitor@npm:7.22.5" - checksum: 10/248532077d732a34cd0844eb7b078ff917c3a8ec81a7f133593f71a860a582f05b60f818dc5049c2212e5baa12289c27889a4b81d56ef409b4863db49646c4b1 - languageName: node - linkType: hard - -"@babel/helper-environment-visitor@npm:^7.24.7": +"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.20": version: 7.24.7 resolution: "@babel/helper-environment-visitor@npm:7.24.7" dependencies: @@ -2262,445 +2108,102 @@ __metadata: languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-function-name@npm:7.22.5" +"@babel/helper-member-expression-to-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" dependencies: - "@babel/template": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/6d02e304a45fe2a64d69dfa5b4fdfd6d68e08deb32b0a528e7b99403d664e9207e6b856787a8ff3f420e77d15987ac1de4eb869906e6ed764b67b07c804d20ba - languageName: node - linkType: hard - -"@babel/helper-function-name@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-function-name@npm:7.23.0" - dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.23.0" - checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d - languageName: node - linkType: hard - -"@babel/helper-function-name@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-function-name@npm:7.24.7" - dependencies: - "@babel/template": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/2ceb3d9b2b35a0fc4100fc06ed7be3bc38f03ff0bf128ff0edbc0cc7dd842967b1496fc70b5c616c747d7711c2b87e7d025c8888f48740631d6148a9d3614f85 - languageName: node - linkType: hard - -"@babel/helper-hoist-variables@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-hoist-variables@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc - languageName: node - linkType: hard - -"@babel/helper-hoist-variables@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-hoist-variables@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/6cfdcf2289cd12185dcdbdf2435fa8d3447b797ac75851166de9fc8503e2fd0021db6baf8dfbecad3753e582c08e6a3f805c8d00cbed756060a877d705bd8d8d - languageName: node - linkType: hard - -"@babel/helper-member-expression-to-functions@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-member-expression-to-functions@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10/2f10bd39605539d5a30580d8da7e24d90788960cd22c93e640dfd95f8edf5c9d9d2f664e4dfc08a3cf2f14c4976178b638db7433321a20e8f90c33968e4465c6 - languageName: node - linkType: hard - -"@babel/helper-member-expression-to-functions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-member-expression-to-functions@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/bb51f195c17d8d98ca5fda630fed436643d27f094f3c936f670b43cb05865f192900f455ffb730c8d4310702b2211996a90354fd55ae8659b096bc6c75d36ec5 + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/ef8cc1c1e600b012b312315f843226545a1a89f25d2f474ce2503fd939ca3f8585180f291a3a13efc56cf13eddc1d41a3a040eae9a521838fd59a6d04cc82490 languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.24.7, @babel/helper-member-expression-to-functions@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-member-expression-to-functions@npm:7.24.8" +"@babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.16.7, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.22.5, @babel/helper-module-imports@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-module-imports@npm:7.25.9" dependencies: - "@babel/traverse": "npm:^7.24.8" - "@babel/types": "npm:^7.24.8" - checksum: 10/ac878761cfd0a46c081cda0da75cc186f922cf16e8ecdd0c4fb6dca4330d9fe4871b41a9976224cf9669c9e7fe0421b5c27349f2e99c125fa0be871b327fa770 - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.10.4, @babel/helper-module-imports@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-module-imports@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/d8296447c0cdc3c02417ba32864da3374e53bd2763a6c404aae118987c222c47238d9d1f4fd2a88250a85e0a68eff38d878c491b00c56d9bd20e809f91eb41b4 - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-module-imports@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/f48cb485be7cad70c3fdcbc1d6d104732565288fe5dd38575be4b6dd577aa606a0e7553078cebf91bea5182e1b059bcc5b6882cd1f8ccb9013d6c76b6ff136ff - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-module-imports@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10/75b0d510271c2d220c426ec1174666febbe8ce520e66f99f87e8944acddaf5d1e88167fe500a1c8e46a770a5cb916e566d3b514ec0af6cbdac93089ed8200716 - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-module-imports@npm:7.22.15" - dependencies: - "@babel/types": "npm:^7.22.15" - checksum: 10/5ecf9345a73b80c28677cfbe674b9f567bb0d079e37dcba9055e36cb337db24ae71992a58e1affa9d14a60d3c69907d30fe1f80aea105184501750a58d15c81c - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-module-imports@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/df8bfb2bb18413aa151ecd63b7d5deb0eec102f924f9de6bc08022ced7ed8ca7fed914562d2f6fa5b59b74a5d6e255dc35612b2bc3b8abf361e13f61b3704770 + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/e090be5dee94dda6cd769972231b21ddfae988acd76b703a480ac0c96f3334557d70a965bf41245d6ee43891e7571a8b400ccf2b2be5803351375d0f4e5bcf08 languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.16.7": - version: 7.17.6 - resolution: "@babel/helper-module-transforms@npm:7.17.6" +"@babel/helper-module-transforms@npm:^7.22.5, @babel/helper-module-transforms@npm:^7.22.9, @babel/helper-module-transforms@npm:^7.23.3, @babel/helper-module-transforms@npm:^7.25.9, @babel/helper-module-transforms@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/helper-module-transforms@npm:7.26.0" dependencies: - "@babel/helper-environment-visitor": "npm:^7.16.7" - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/helper-simple-access": "npm:^7.16.7" - "@babel/helper-split-export-declaration": "npm:^7.16.7" - "@babel/helper-validator-identifier": "npm:^7.16.7" - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.17.3" - "@babel/types": "npm:^7.17.0" - checksum: 10/548455e05142a1def4bbfc946c1be12241a99628a2c3e25a12ec81db49a62e494c47719c7d4aa5091b73ffac0a3e2b442731ed188ff53506c93e49e9d10db82d - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-module-transforms@npm:7.18.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.18.9" - "@babel/helper-module-imports": "npm:^7.18.6" - "@babel/helper-simple-access": "npm:^7.18.6" - "@babel/helper-split-export-declaration": "npm:^7.18.6" - "@babel/helper-validator-identifier": "npm:^7.18.6" - "@babel/template": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.9" - "@babel/types": "npm:^7.18.9" - checksum: 10/2e64d723405071946ab3019cfde1bdf95d98a2a220802a782a920b3ce3fe7ab92caf81d11b2b7722cdb5fd0c9f428ff3b33b86478bde39520e886fefe0b67e6d - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-module-transforms@npm:7.22.5" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/1ebe1e0458f7eaaf085953888df4311ca1a2cdac15a656c63a7f9c5ecd003993cf3eb41ad1545d0e41039955f8d2f8fa64747a9419ae32bbf5bea532a51fa9f4 - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-module-transforms@npm:7.22.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/80244f45e3f665305f8cf9412ee2efe44d1d30c201f869ceb0e87f9cddbbff06ebfed1dbe122a40875404867b747e7df73c0825c93765c108bcf2e86d2ef8b9b - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-module-transforms@npm:7.23.0" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/d72fe444f7b6c5aadaac8f393298d603eedd48e5dead67273a48e5c83a677cbccbd8a12a06c5bf5d97924666083279158a4bd0e799d28b86cbbfacba9e41f598 - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/helper-module-transforms@npm:7.23.3" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-simple-access": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/helper-validator-identifier": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/583fa580f8e50e6f45c4f46aa76a8e49c2528deb84e25f634d66461b9a0e2420e13979b0a607b67aef67eaf8db8668eb9edc038b4514b16e3879fe09e8fd294b - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.24.7, @babel/helper-module-transforms@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-module-transforms@npm:7.24.8" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-simple-access": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/912ad994da126c3150d8f8702030380849608094a7a352523ffa8e697080da9358d63af2582d38902c929839f394bbc6f1ae4921ba132ba3f65f27f0696aa2c7 - languageName: node - linkType: hard - -"@babel/helper-optimise-call-expression@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c - languageName: node - linkType: hard - -"@babel/helper-optimise-call-expression@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/da7a7f2d1bb1be4cffd5fa820bd605bc075c7dd014e0458f608bb6f34f450fe9412c8cea93e788227ab396e0e02c162d7b1db3fbcb755a6360e354c485d61df0 - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.16.7 - resolution: "@babel/helper-plugin-utils@npm:7.16.7" - checksum: 10/d08dd86554a186c2538547cd537552e4029f704994a9201d41d82015c10ed7f58f9036e8d1527c3760f042409163269d308b0b3706589039c5f1884619c6d4ce - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-plugin-utils@npm:7.22.5" - checksum: 10/ab220db218089a2aadd0582f5833fd17fa300245999f5f8784b10f5a75267c4e808592284a29438a0da365e702f05acb369f99e1c915c02f9f9210ec60eab8ea - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.20.2": - version: 7.20.2 - resolution: "@babel/helper-plugin-utils@npm:7.20.2" - checksum: 10/7bd5be752998e8bfa616e6fbf1fd8f1a7664039a435d5da11cfd97a320b6eb58e28156f4789b2da242a53ed45994d04632b2e19684c1209e827522a07f0cd022 - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-plugin-utils@npm:7.24.8" - checksum: 10/adbc9fc1142800a35a5eb0793296924ee8057fe35c61657774208670468a9fbfbb216f2d0bc46c680c5fefa785e5ff917cc1674b10bd75cdf9a6aa3444780630 - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.5" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-wrap-function": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/1e51dcff1c22e97ea3d22034b77788048eb6d8c6860325bd7a1046b7a7135730cefd93b5c96fd9839d76031095d5ffb6f0cd6ee90a5d69a4c7de980d7f4623d9 - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.20" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-wrap-function": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/2fe6300a6f1b58211dffa0aed1b45d4958506d096543663dba83bd9251fe8d670fa909143a65b45e72acb49e7e20fbdb73eae315d9ddaced467948c3329986e7 - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.22.9": - version: 7.22.17 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.17" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-wrap-function": "npm:^7.22.17" + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/59307e623d00b6f5fa7f974e29081b2243e3f7bc3a89df331e8c1f8815d83f97bd092404a28b8bef5299028e3259450b5a943f34e1b32c7c55350436d218ab13 + checksum: 10/9841d2a62f61ad52b66a72d08264f23052d533afc4ce07aec2a6202adac0bfe43014c312f94feacb3291f4c5aafe681955610041ece2c276271adce3f570f2f5 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-remap-async-to-generator@npm:7.24.7" +"@babel/helper-optimise-call-expression@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-wrap-function": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/4b7c925e71811902c8aa57904044921027eae10ac9b5b029df491ed4abc1ea18b450a7923fd0feb1248ae37703889e72b6c27f2a0e2d5811103c7655c49ad355 + "@babel/types": "npm:^7.25.9" + checksum: 10/f09d0ad60c0715b9a60c31841b3246b47d67650c512ce85bbe24a3124f1a4d66377df793af393273bc6e1015b0a9c799626c48e53747581c1582b99167cc65dc languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-replace-supers@npm:7.22.20" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-member-expression-to-functions": "npm:^7.22.15" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/617666f57b0f94a2f430ee66b67c8f6fa94d4c22400f622947580d8f3638ea34b71280af59599ed4afbb54ae6e2bdd4f9083fe0e341184a4bb0bd26ef58d3017 +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.25.9, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.25.9 + resolution: "@babel/helper-plugin-utils@npm:7.25.9" + checksum: 10/e347d87728b1ab10b6976d46403941c8f9008c045ea6d99997a7ffca7b852dc34b6171380f7b17edf94410e0857ff26f3a53d8618f11d73744db86e8ca9b8c64 languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-replace-supers@npm:7.22.5" +"@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.22.20, @babel/helper-remap-async-to-generator@npm:^7.22.5, @babel/helper-remap-async-to-generator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-remap-async-to-generator@npm:7.25.9" dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/da219df60dfd7b22ad5dd514112a8fc93d5f916821fe4cc7fdb5c5d24b2efed478974363af9142b23b7fc1e15de5b0d9ce8431a13e28dabf335a8a5eec4fa223 - languageName: node - linkType: hard - -"@babel/helper-replace-supers@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-replace-supers@npm:7.22.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-member-expression-to-functions": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-wrap-function": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/b5a740a95f12250b67afe30574ad60fa44175db92441658c6c3e8f473fcb8f8eaffd24fdad436cdfa1beee21b470d1190d64a0bb97b444525ca952e6cc081dc9 + checksum: 10/ea37ad9f8f7bcc27c109963b8ebb9d22bac7a5db2a51de199cb560e251d5593fe721e46aab2ca7d3e7a24b0aa4aff0eaf9c7307af9c2fd3a1d84268579073052 languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-replace-supers@npm:7.24.7" +"@babel/helper-replace-supers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-replace-supers@npm:7.25.9" dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.7" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" + "@babel/helper-member-expression-to-functions": "npm:^7.25.9" + "@babel/helper-optimise-call-expression": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/18b7c3709819d008a14953e885748f3e197537f131d8f7ae095fec245506d854ff40b236edb1754afb6467f795aa90ae42a1d961a89557702249bacfc3fdad19 - languageName: node - linkType: hard - -"@babel/helper-simple-access@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-simple-access@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/8d22c46c5ec2ead0686c4d5a3d1d12b5190c59be676bfe0d9d89df62b437b51d1a3df2ccfb8a77dded2e585176ebf12986accb6d45a18cff229eef3b10344f4b - languageName: node - linkType: hard - -"@babel/helper-simple-access@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-simple-access@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10/37cd36eef199e0517845763c1e6ff6ea5e7876d6d707a6f59c9267c547a50aa0e84260ba9285d49acfaf2cfa0a74a772d92967f32ac1024c961517d40b6c16a5 - languageName: node - linkType: hard - -"@babel/helper-simple-access@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-simple-access@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/7d5430eecf880937c27d1aed14245003bd1c7383ae07d652b3932f450f60bfcf8f2c1270c593ab063add185108d26198c69d1aca0e6fb7c6fdada4bcf72ab5b7 + checksum: 10/8ebf787016953e4479b99007bac735c9c860822fafc51bc3db67bc53814539888797238c81fa8b948b6da897eb7b1c1d4f04df11e501a7f0596b356be02de2ab languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-simple-access@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/5083e190186028e48fc358a192e4b93ab320bd016103caffcfda81302a13300ccce46c9cd255ae520c25d2a6a9b47671f93e5fe5678954a2329dc0a685465c49 - languageName: node - linkType: hard - -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" +"@babel/helper-simple-access@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-simple-access@npm:7.25.9" dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/a16a6cfa5e8ac7144e856bcdaaf0022cf5de028fc0c56ce21dd664a6e900999a4285c587a209f2acf9de438c0d60bfb497f5f34aa34cbaf29da3e2f8d8d7feb7 languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.24.7" +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0, @babel/helper-skip-transparent-expression-wrappers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.9" dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/784a6fdd251a9a7e42ccd04aca087ecdab83eddc60fda76a2950e00eb239cc937d3c914266f0cc476298b52ac3f44ffd04c358e808bd17552a7e008d75494a77 + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/fdbb5248932198bc26daa6abf0d2ac42cab9c2dbb75b7e9f40d425c8f28f09620b886d40e7f9e4e08ffc7aaa2cefe6fc2c44be7c20e81f7526634702fb615bdc languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:7.22.6, @babel/helper-split-export-declaration@npm:^7.22.6": +"@babel/helper-split-export-declaration@npm:7.22.6": version: 7.22.6 resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: @@ -2709,298 +2212,45 @@ __metadata: languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-split-export-declaration@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10/e10aaf135465c55114627951b79115f24bc7af72ecbb58d541d66daf1edaee5dde7cae3ec8c3639afaf74526c03ae3ce723444e3b5b3dc77140c456cd84bcaa1 +"@babel/helper-string-parser@npm:^7.18.10, @babel/helper-string-parser@npm:^7.24.7, @babel/helper-string-parser@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-string-parser@npm:7.25.9" + checksum: 10/c28656c52bd48e8c1d9f3e8e68ecafd09d949c57755b0d353739eb4eae7ba4f7e67e92e4036f1cd43378cc1397a2c943ed7bcaf5949b04ab48607def0258b775 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-split-export-declaration@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10/c6d3dede53878f6be1d869e03e9ffbbb36f4897c7cc1527dc96c56d127d834ffe4520a6f7e467f5b6f3c2843ea0e81a7819d66ae02f707f6ac057f3d57943a2b +"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.24.7, @babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10/3f9b649be0c2fd457fa1957b694b4e69532a668866b8a0d81eabfa34ba16dbf3107b39e0e7144c55c3c652bf773ec816af8df4a61273a2bb4eb3145ca9cf478e languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-split-export-declaration@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/d10e05a02f49c1f7c578cea63d2ac55356501bbf58856d97ac9bfde4957faee21ae97c7f566aa309e38a256eef58b58e5b670a7f568b362c00e93dfffe072650 +"@babel/helper-validator-option@npm:^7.22.5, @babel/helper-validator-option@npm:^7.23.5, @babel/helper-validator-option@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-option@npm:7.25.9" + checksum: 10/9491b2755948ebbdd68f87da907283698e663b5af2d2b1b02a2765761974b1120d5d8d49e9175b167f16f72748ffceec8c9cf62acfbee73f4904507b246e2b3d languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-split-export-declaration@npm:7.24.7" +"@babel/helper-wrap-function@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-wrap-function@npm:7.25.9" dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/ff04a3071603c87de0d6ee2540b7291ab36305b329bd047cdbb6cbd7db335a12f9a77af1cf708779f75f13c4d9af46093c00b34432e50b2411872c658d1a2e5e - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.18.10, @babel/helper-string-parser@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-string-parser@npm:7.24.8" - checksum: 10/6d1bf8f27dd725ce02bdc6dffca3c95fb9ab8a06adc2edbd9c1c9d68500274230d1a609025833ed81981eff560045b6b38f7b4c6fb1ab19fc90e5004e3932535 - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/helper-string-parser@npm:7.19.4" - checksum: 10/05d428ed8111a2393a69f5ac2f075554d8d61ed3ffc885b62a1829ef25c2eaa7c53e69d0d35e658c995755dc916aeb4c8c04fe51391758ea4b86c931111ebbc2 - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-string-parser@npm:7.22.5" - checksum: 10/7f275a7f1a9504da06afc33441e219796352a4a3d0288a961bc14d1e30e06833a71621b33c3e60ee3ac1ff3c502d55e392bcbc0665f6f9d2629809696fab7cdd - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/helper-string-parser@npm:7.23.4" - checksum: 10/c352082474a2ee1d2b812bd116a56b2e8b38065df9678a32a535f151ec6f58e54633cc778778374f10544b930703cca6ddf998803888a636afa27e2658068a9c - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-string-parser@npm:7.24.7" - checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-validator-identifier@npm:7.16.7" - checksum: 10/42b9b56c3543ded08992e8c118cb017dbde258895bd6a2e69186cb98f4f5811cd94ceedf4b5ace4877e7be07a7280aa9b9de65d1cb416064a1e0e1fd5a89fcca - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-identifier@npm:7.18.6" - checksum: 10/9386e19302aefeadcb02f1e5593e43c40adef5ed64746ee338c3772a0a423f6f339f5547bc898b5bfa904e2b4b994c020ab1fb4fe108b696ac74ebb3e4c83663 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.19.1": - version: 7.19.1 - resolution: "@babel/helper-validator-identifier@npm:7.19.1" - checksum: 10/30ecd53b7276970d59d65e68e147ea885f8812e50d06a59315dd1f12dc41467d29d6c56bf1fd02e91100f939cba378815b2c19f5d3604331a153aed9efcbd2a9 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-validator-identifier@npm:7.22.15" - checksum: 10/4c142549ab5a1235c638d89b52b612a32a123ae19b7da70708385b1e2522530b3c90c85e38604dc6a5fee6a7928b447edacd55176f48a70e103d232eb0da31e5 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 10/df882d2675101df2d507b95b195ca2f86a3ef28cb711c84f37e79ca23178e13b9f0d8b522774211f51e40168bf5142be4c1c9776a150cddb61a0d5bf3e95750b + "@babel/template": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/988dcf49159f1c920d6b9486762a93767a6e84b5e593a6342bc235f3e47cc1cb0c048d8fca531a48143e6b7fce1ff12ddbf735cf5f62cb2f07192cf7c27b89cf languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-validator-identifier@npm:7.22.5" - checksum: 10/12cb7d4535b3f8d109a446f7bef08d20eebe94fd97b534cd415c936ab342e9634edc5c99961af976bd78bcae6e6ec4b2ab8483d0da2ac5926fbe9f7dd9ab28ab - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-validator-identifier@npm:7.24.7" - checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-validator-option@npm:7.16.7" - checksum: 10/c5ccc451911883cc9f12125d47be69434f28094475c1b9d2ada7c3452e6ac98a1ee8ddd364ca9e3f9855fcdee96cdeafa32543ebd9d17fee7a1062c202e80570 - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-option@npm:7.18.6" - checksum: 10/f9cc6eb7cc5d759c5abf006402180f8d5e4251e9198197428a97e05d65eb2f8ae5a0ce73b1dfd2d35af41d0eb780627a64edf98a4e71f064eeeacef8de58f2cf - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-validator-option@npm:7.22.15" - checksum: 10/68da52b1e10002a543161494c4bc0f4d0398c8fdf361d5f7f4272e95c45d5b32d974896d44f6a0ea7378c9204988879d73613ca683e13bd1304e46d25ff67a8d - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-validator-option@npm:7.22.5" - checksum: 10/bbeca8a85ee86990215c0424997438b388b8d642d69b9f86c375a174d3cdeb270efafd1ff128bc7a1d370923d13b6e45829ba8581c027620e83e3a80c5c414b3 - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/helper-validator-option@npm:7.23.5" - checksum: 10/537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-validator-option@npm:7.24.8" - checksum: 10/a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.22.17": - version: 7.22.17 - resolution: "@babel/helper-wrap-function@npm:7.22.17" - dependencies: - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.22.17" - checksum: 10/6057749399199e12421c6bb1fa1ed0b669b9848aac213dd25d1d3bb7fe54569b71ca3ffc54220fe87dd1c9cc7137b78627f5ae79807d10779dbf1aa70310b2b2 - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-wrap-function@npm:7.22.20" +"@babel/helpers@npm:^7.22.5, @babel/helpers@npm:^7.22.6, @babel/helpers@npm:^7.23.9, @babel/helpers@npm:^7.24.0, @babel/helpers@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/helpers@npm:7.26.0" dependencies: - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.22.19" - checksum: 10/b22e4666dec3d401bdf8ebd01d448bb3733617dae5aa6fbd1b684a22a35653cca832edd876529fd139577713b44fb89b4f5e52b7315ab218620f78b8a8ae23de - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-wrap-function@npm:7.22.5" - dependencies: - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" - checksum: 10/70f225615aad1756ea44f1121ec78633200fa00b82e46aa7e5211b7c36f7984d57cc2a2aea8852eaacd5044b1d1cbd2b20d0c371e42096aec19733cb95001096 - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-wrap-function@npm:7.24.7" - dependencies: - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/1c248accfbb09a891293840506e3fbfc807b524abf16fc32115a6e73f760387d2dc7935282b48caa281c8033bf93dc80eca7649250524cfb95da8643771bca02 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.17.2": - version: 7.17.2 - resolution: "@babel/helpers@npm:7.17.2" - dependencies: - "@babel/template": "npm:^7.16.7" - "@babel/traverse": "npm:^7.17.0" - "@babel/types": "npm:^7.17.0" - checksum: 10/02c8b0b5f1e37bd4e1fc2505ab7925ebdf3a86e31e6e56f7dc34dee5ed7cd559d42c07b7776ccfcd80412f14b596e2e70b1edc211d8b0e6e59125db0af320201 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helpers@npm:7.18.9" - dependencies: - "@babel/template": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.9" - "@babel/types": "npm:^7.18.9" - checksum: 10/8949183b2e8d73c923fe38041e1e37815529e5a4fc2bbccf5917d86bc1b286bc8bf140b0576b2994cd6db16757d871801554a1fd6cd698f091fe133b1a430d5f - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.22.11": - version: 7.22.11 - resolution: "@babel/helpers@npm:7.22.11" - dependencies: - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.11" - "@babel/types": "npm:^7.22.11" - checksum: 10/5af97344f666418150354cf28a7946ba772bac604add51f1e9547d4e4d5301466cd3bbd37bb0e099884807587523da6f8b19e53bc3d40a7f1e8340711a0d5452 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/helpers@npm:7.22.15" - dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.22.15" - "@babel/types": "npm:^7.22.15" - checksum: 10/ed7344bee94a4c8712b5fe69d2f8fd6e921283ae13028bf8dbce7c14ee687d732d7f091e7f24b238035034d1fdff6254340c89dcc7368e15af1d92df7554dc2e - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/helpers@npm:7.22.6" - dependencies: - "@babel/template": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.6" - "@babel/types": "npm:^7.22.5" - checksum: 10/c7c5876476321c979f2c15086e526e3424121829a3abd52a79a5a886008b251e1fcb5ea6e498eca3204e5f1d2455804bf9eb87b7478a535449805acc9dbce190 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/helpers@npm:7.23.2" - dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" - checksum: 10/d66d949d41513f19e62e43a9426e283d46bc9a3c72f1e3dd136568542382edd411047403458aaa0ae3adf7c14d23e0e9a1126092bb56e72ba796a6dd7e4c082a - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/helpers@npm:7.23.9" - dependencies: - "@babel/template": "npm:^7.23.9" - "@babel/traverse": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - checksum: 10/dd56daac8bbd7ed174bb00fd185926fd449e591d9a00edaceb7ac6edbdd7a8db57e2cb365b4fafda382201752789ced2f7ae010f667eab0f198a4571cda4d2c5 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.24.0": - version: 7.24.8 - resolution: "@babel/helpers@npm:7.24.8" - dependencies: - "@babel/template": "npm:^7.24.7" - "@babel/types": "npm:^7.24.8" - checksum: 10/61c08a2baa87382a87c7110e9b5574c782603e247b7e6267769ee0e8b7b54b70ff05f16466f05bb318622b7ac28e79b449edff565abf5adcb1adb1b0f42fee9c + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.26.0" + checksum: 10/fd4757f65d10b64cfdbf4b3adb7ea6ffff9497c53e0786452f495d1f7794da7e0898261b4db65e1c62bbb9a360d7d78a1085635c23dfc3af2ab6dcba06585f86 languageName: node linkType: hard @@ -3015,84 +2265,6 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.16.7": - version: 7.16.10 - resolution: "@babel/highlight@npm:7.16.10" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10/1f1bdd752a90844f4efc22166a46303fb651ba0fd75a06daba3ebae2575ab3edc1da9827c279872a3aaf305f50a18473c5fa1966752726a2b253065fd4c0745e - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/highlight@npm:7.18.6" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.18.6" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10/92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/highlight@npm:7.22.10" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.5" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - checksum: 10/faea6aa09ea7bc02d4d51aabdd1303b00aa2587933a08310d7502f29140bc8bcb32a74387d81dc08e97edd04f891e266623b90043ea4502e052dcbfd7e423a3c - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.22.13": - version: 7.22.13 - resolution: "@babel/highlight@npm:7.22.13" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.5" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - checksum: 10/cb6053267f6485c7e315bad437829d8e9e6df5d29d02c23318199f45b4ac8bf256ed41d70445314041e51fad446a511017b8e6a140993cd2edd748c39bf8d351 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/highlight@npm:7.22.5" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.5" - chalk: "npm:^2.0.0" - js-tokens: "npm:^4.0.0" - checksum: 10/ff59305c0184648c9cb042638e9d2d184c12df2a112c71359268a982e7ab65cd5236f392ee8eb722a3bf5b5bd155954fdc7b5aacb6b2b1cd5e38dafcbe63cc57 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/highlight@npm:7.23.4" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.20" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - checksum: 10/62fef9b5bcea7131df4626d009029b1ae85332042f4648a4ce6e740c3fd23112603c740c45575caec62f260c96b11054d3be5987f4981a5479793579c3aac71f - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/highlight@npm:7.24.7" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.7" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10/69b73f38cdd4f881b09b939a711e76646da34f4834f4ce141d7a49a6bb1926eab1c594148970a8aa9360398dff800f63aade4e81fafdd7c8d8a8489ea93bfec1 - languageName: node - linkType: hard - "@babel/parser@npm:7.0.0-beta.51": version: 7.0.0-beta.51 resolution: "@babel/parser@npm:7.0.0-beta.51" @@ -3111,7 +2283,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:7.24.7, @babel/parser@npm:^7.21.8": +"@babel/parser@npm:7.24.7": version: 7.24.7 resolution: "@babel/parser@npm:7.24.7" bin: @@ -3120,137 +2292,73 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.7, @babel/parser@npm:^7.17.3": - version: 7.17.3 - resolution: "@babel/parser@npm:7.17.3" - bin: - parser: ./bin/babel-parser.js - checksum: 10/2d45750cdf0565842a1210928534f73dacfbfd3c45be6e85961e34e8c7d74643721f802d331fad3bfdcc783fb5ab8703432e43c9e7b460588ec6ee26242793be - languageName: node - linkType: hard - -"@babel/parser@npm:^7.18.6, @babel/parser@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/parser@npm:7.18.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10/5f1c4151e264207dfaed09daa23eaa41920a2a2e1423ca7f4f34adcc9008e220a229e1640889f03f882e6c85f1b12daed965a0a11ab6ff726cbba97871142bec - languageName: node - linkType: hard - -"@babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.11, @babel/parser@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/parser@npm:7.23.0" - bin: - parser: ./bin/babel-parser.js - checksum: 10/201641e068f8cca1ff12b141fcba32d7ccbabc586961bd1b85ae89d9695867f84d57fc2e1176dc4981fd28e5e97ca0e7c32cd688bd5eabb641a302abc0cb5040 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.22.15, @babel/parser@npm:^7.22.5": - version: 7.22.16 - resolution: "@babel/parser@npm:7.22.16" - bin: - parser: ./bin/babel-parser.js - checksum: 10/220df7dc0dbe8bc73540e66123f9c45ae3e5db40738fc1e97579205364240bed3e9724fc737c0828f9d46c96ce9b23728314f598e5bf8a62566ccef539d15bdf - languageName: node - linkType: hard - -"@babel/parser@npm:^7.22.7": - version: 7.22.7 - resolution: "@babel/parser@npm:7.22.7" - bin: - parser: ./bin/babel-parser.js - checksum: 10/f420f89ea8e5803a44f76a57630002ca5721fbde719c10ac4eaebf1d01fad102447cd90a7721c97b1176bde33ec9bc2b68fe8c7d541668dc6610727ba79c8862 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/parser@npm:7.23.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10/727a7a807100f6a26df859e2f009c4ddbd0d3363287b45daa50bd082ccd0d431d0c4d0e610a91f806e04a1918726cd0f5a0592c9b902a815337feed12e1cafd9 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/parser@npm:7.24.8" - bin: - parser: ./bin/babel-parser.js - checksum: 10/e44b8327da46e8659bc9fb77f66e2dc4364dd66495fb17d046b96a77bf604f0446f1e9a89cf2f011d78fc3f5cdfbae2e9e0714708e1c985988335683b2e781ef - languageName: node - linkType: hard - -"@babel/parser@npm:^7.25.0, @babel/parser@npm:^7.4.3": - version: 7.25.6 - resolution: "@babel/parser@npm:7.25.6" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.8, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.22.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.4.3": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" dependencies: - "@babel/types": "npm:^7.25.6" + "@babel/types": "npm:^7.26.0" bin: parser: ./bin/babel-parser.js - checksum: 10/830aab72116aa14eb8d61bfa8f9d69fc8f3a43d909ce993cb4350ae14d3af1a2f740a54410a22d821c48a253263643dfecbc094f9608e6a70ce9ff3c0bbfe91a + checksum: 10/8baee43752a3678ad9f9e360ec845065eeee806f1fdc8e0f348a8a0e13eef0959dabed4a197c978896c493ea205c804d0a1187cc52e4a1ba017c7935bab4983d languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.15" +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/8910ca21a7ec7c06f7b247d4b86c97c5aa15ef321518f44f6f490c5912fdf82c605aaa02b90892e375d82ccbedeadfdeadd922c1b836c9dd4c596871bf654753 + checksum: 10/3c23ef34e3fd7da3578428cb488180ab6b7b96c9c141438374b6d87fa814d87de099f28098e5fc64726c19193a1da397e4d2351d40b459bcd2489993557e2c74 languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.24.7" +"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/f0e0e9bdcf5479f8c5b4494353dc64dee37205e5ffd30920e649e75537a8f795cdcf32dfb40a00e908469a5d61cf62806bc359294cb2a6f2e604bf4efe086301 + checksum: 10/d3e14ab1cb9cb50246d20cab9539f2fbd1e7ef1ded73980c8ad7c0561b4d5e0b144d362225f0976d47898e04cbd40f2000e208b0913bd788346cf7791b96af91 languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.22.15" +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.5, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.23.3, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.22.15" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10/fbefedc0da014c37f1a50a8094ce7dbbf2181ae93243f23d6ecba2499b5b20196c2124d6a4dfe3e9e0125798e80593103e456352a4beb4e5c6f7c75efb80fdac + "@babel/core": ^7.0.0 + checksum: 10/a9d1ee3fd100d3eb6799a2f2bbd785296f356c531d75c9369f71541811fa324270258a374db103ce159156d006da2f33370330558d0133e6f7584152c34997ca languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.7" +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.22.5, @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.23.3, @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.13.0 - checksum: 10/887f1b8bd0ef61206ece47919fda78a32eef35da31c0d95ab8d7adc8b4722534dc5177c86c8d6d81bcf4343f3c08c6adab2b46cfd2bea8e33c6c04e51306f9cc + checksum: 10/5b298b28e156f64de51cdb03a2c5b80c7f978815ef1026f3ae8b9fc48d28bf0a83817d8fbecb61ef8fb94a7201f62cca5103cc6e7b9e8f28e38f766d7905b378 languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.24.7" +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.23.7, @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.25.9" dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/ad63317eb72ca7e160394e9223768b1f826287eaf65297f2794d0203510225f20dd9858bce217af4a050754abf94565841617b45b35a2de355c4e2bba546b39c + checksum: 10/cb893e5deb9312a0120a399835b6614a016c036714de7123c8edabccc56a09c4455016e083c5c4dd485248546d4e5e55fc0e9132b3c3a9bd16abf534138fe3f2 languageName: node linkType: hard @@ -3281,17 +2389,15 @@ __metadata: linkType: hard "@babel/plugin-proposal-decorators@npm:^7.16.4": - version: 7.23.2 - resolution: "@babel/plugin-proposal-decorators@npm:7.23.2" + version: 7.25.9 + resolution: "@babel/plugin-proposal-decorators@npm:7.25.9" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.20" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/plugin-syntax-decorators": "npm:^7.22.10" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-syntax-decorators": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/392440bad262e54246ee22da4c50774cd72cda4b62818a94b99e13cbb6e06f074a8858d0253909990fa680d94e434ff194383bfe5481c82a866408b091cb9307 + checksum: 10/f564de219ace3980cd679c719738390c02e2e6f562b330bfb941fab94c128bcb2b30e9970e1aae82d3b908703e162e4a62fb9269c7e9fb4bad83d0a56cdb41af languageName: node linkType: hard @@ -3311,1568 +2417,960 @@ __metadata: version: 7.18.6 resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" dependencies: - "@babel/helper-plugin-utils": "npm:^7.18.6" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f370ea584c55bf4040e1f78c80b4eeb1ce2e6aaa74f87d1a48266493c33931d0b6222d8cee3a082383d6bb648ab8d6b7147a06f974d3296ef3bc39c7851683ec - languageName: node - linkType: hard - -"@babel/plugin-proposal-object-rest-spread@npm:^7.5.5": - version: 7.17.3 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.17.3" - dependencies: - "@babel/compat-data": "npm:^7.17.0" - "@babel/helper-compilation-targets": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6fdb79f8ac80098a96e8570ca4302d3759e28be536f4763df87a81e3f0d8e5fc573a351f2cfbbd80893156c7644cd7f14928907eefe7b3d6f1d298e329991c63 - languageName: node - linkType: hard - -"@babel/plugin-proposal-optional-chaining@npm:^7.16.0": - version: 7.21.0 - resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.20.0" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/522cd133aff5c94c0ef36ff83c64f03deee183815da68b65b6950e81972ace3b514e032df07ea76d0f9ec8cc7a49578092907adfa17fccb4612117557c04a882 - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-methods@npm:^7.16.0": - version: 7.18.6 - resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/22d8502ee96bca99ad2c8393e8493e2b8d4507576dd054490fd8201a36824373440106f5b098b6d821b026c7e72b0424ff4aeca69ed5f42e48f029d3a156d5ad - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": - version: 7.21.0-placeholder-for-preset-env.2 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fab70f399aa869275690ec6c7cedb4ef361d4e8b6f55c3d7b04bfee61d52fb93c87cec2c65d73cddbaca89fb8ef5ec0921fce675c9169d9d51f18305ab34e78a - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:^7.16.7": - version: 7.21.11 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.11" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.18.6" - "@babel/helper-create-class-features-plugin": "npm:^7.21.0" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f803b5e1de0cb7c53f0d7f70bfbf57f2b3a20d95c19f8f2710719c4938149b490ee14d2d0c2f8316080823f0943c6cb8668fa8c139420e7bc7f80a66bfd50fff - languageName: node - linkType: hard - -"@babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": - version: 7.16.7 - resolution: "@babel/plugin-proposal-unicode-property-regex@npm:7.16.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2b8a33713d456183f0b7d011011e7bd932c08cc06216399a7b2015ab39284b511993dc10a89bbb15d1d728e6a2ef42ca08c3202619aa148cbd48052422ea3995 - languageName: node - linkType: hard - -"@babel/plugin-syntax-async-generators@npm:^7.8.4": - version: 7.8.4 - resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 - languageName: node - linkType: hard - -"@babel/plugin-syntax-bigint@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": - version: 7.12.13 - resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.12.13" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-static-block@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 - languageName: node - linkType: hard - -"@babel/plugin-syntax-decorators@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/plugin-syntax-decorators@npm:7.22.10" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/983caa82f5a9cbb55196cd9ff3a6e2cf11e6eba5c11fc5fecb4ef7229ca05af08a5eeab0c668e5cd9fae62c01b038ec1906ced09fd7cb6dde94f0b8824e231c6 - languageName: node - linkType: hard - -"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd - languageName: node - linkType: hard - -"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/85740478be5b0de185228e7814451d74ab8ce0a26fcca7613955262a26e99e8e15e9da58f60c754b84515d4c679b590dbd3f2148f0f58025f4ae706f1c5a5d4a - languageName: node - linkType: hard - -"@babel/plugin-syntax-flow@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-flow@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/84c8c40fcfe8e78cecdd6fb90e8f97f419e3f3b27a33de8324ae97d5ce1b87cdd98a636fa21a68d4d2c37c7d63f3a279bb84b6956b849921affed6b806b6ffe7 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2b8b5572db04a7bef1e6cd20debf447e4eef7cb012616f5eceb8fa3e23ce469b8f76ee74fd6d1e158ba17a8f58b0aec579d092fb67c5a30e83ccfbc5754916c1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bd065cd73ae3dbe69e6f9167aa605da3df77d69bbad2ede95e4aa9e7af7744d5bc1838b928c77338ca62df7691a7adf6e608279be50c18e4b3c70cf77e3013d7 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/197b3c5ea2a9649347f033342cb222ab47f4645633695205c0250c6bf2af29e643753b8bb24a2db39948bef08e7c540babfd365591eb57fc110cb30b425ffc47 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/22fc50bd85a491bb8d22065f330a41f60d66f2f2d7a1deb73e80c8a4b5d7a42a092a03f8da18800650eca0fc14585167cc4e5c9fab351f0d390d1592347162ae - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b - languageName: node - linkType: hard - -"@babel/plugin-syntax-json-strings@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/plugin-syntax-jsx@npm:7.16.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cd9b0e53c50e8ddb0afaf0f42e0b221a94e4f59aee32a591364266a31195c48cac5fef288d02c1c935686bda982d2e0f1ed61cceb995fc9f6fb09ef5ebecdd2b - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-jsx@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/8829d30c2617ab31393d99cec2978e41f014f4ac6f01a1cecf4c4dd8320c3ec12fdc3ce121126b2d8d32f6887e99ca1a0bad53dedb1e6ad165640b92b24980ce - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.7.2": - version: 7.21.4 - resolution: "@babel/plugin-syntax-jsx@npm:7.21.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.20.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bb7309402a1d4e155f32aa0cf216e1fa8324d6c4cfd248b03280028a015a10e46b6efd6565f515f8913918a3602b39255999c06046f7d4b8a5106be2165d724a - languageName: node - linkType: hard - -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 - languageName: node - linkType: hard - -"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 - languageName: node - linkType: hard - -"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 - languageName: node - linkType: hard - -"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda - languageName: node - linkType: hard - -"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": - version: 7.14.5 - resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-typescript@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/8ab7718fbb026d64da93681a57797d60326097fd7cb930380c8bffd9eb101689e90142c760a14b51e8e69c88a73ba3da956cb4520a3b0c65743aee5c71ef360a - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.7.2": - version: 7.16.7 - resolution: "@babel/plugin-syntax-typescript@npm:7.16.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/661e636060609ede9a402e22603b01784c21fabb0a637e65f561c8159351fe0130bbc11fdefe31902107885e3332fc34d95eb652ac61d3f61f2d61f5da20609e - languageName: node - linkType: hard - -"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/35abb6c57062802c7ce8bd96b2ef2883e3124370c688bbd67609f7d2453802fb73944df8808f893b6c67de978eb2bcf87bbfe325e46d6f39b5fcb09ece11d01a - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6720173645826046878015c579c2ca9d93cdba79a2832f0180f5cf147d9817c85bf9c8338b16d6bdaa71f87809b7a194a6902e6c82ec00b6354aca6b40abe5e6 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:7.23.9": - version: 7.23.9 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d402494087a6b803803eb5ab46b837aab100a04c4c5148e38bfa943ea1bbfc1ecfb340f1ced68972564312d3580f550c125f452372e77607a558fbbaf98c31c0 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.22.10": - version: 7.23.2 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.2" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e1abae0edcda7304d7c17702ac25a127578791b89c4f767d60589249fa3e50ec33f8c9ff39d3d8d41f00b29947654eaddd4fd586e04c4d598122db745fab2868 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.22.7": - version: 7.22.15 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.22.15" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.9" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fad98786b446ce63bde0d14a221e2617eef5a7bbca62b49d96f16ab5e1694521234cfba6145b830fbf9af16d60a8a3dbf148e8694830bd91796fe333b0599e73 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.23.9": - version: 7.24.7 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.24.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-remap-async-to-generator": "npm:^7.24.7" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cf0a4b5ffc6d7f3f3bf12d4792535e8a46332714211326fd5058a6e45988891ee402b26cb9cc6c7121b2c8283ebd160e431827f885bdfa51d6127f934bd9ba7f - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:7.22.5, @babel/plugin-transform-async-to-generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.22.5" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b95f23f99dcb379a9f0a1c2a3bbea3f8dc0e1b16dc1ac8b484fe378370169290a7a63d520959a9ba1232837cf74a80e23f6facbe14fd42a3cda6d3c2d7168e62 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-remap-async-to-generator": "npm:^7.22.20" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2e9d9795d4b3b3d8090332104e37061c677f29a1ce65bcbda4099a32d243e5d9520270a44bbabf0fb1fb40d463bd937685b1a1042e646979086c546d55319c3c - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-remap-async-to-generator": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b2041d9d50b09afef983c4f1dece63fdfc5a8e4646e42591db398bc4322958434d60b3cb0f5d0f9f9dbdad8577e8a1a33ba9859aacc3004bf6d25d094d20193f - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/416b1341858e8ca4e524dee66044735956ced5f478b2c3b9bc11ec2285b0c25d7dbb96d79887169eb938084c95d0a89338c8b2fe70d473bd9dc92e5d9db1732c - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/33e2fb9f24c11889b2bacbe9c3625f738edafc2136c8206598e0422664267ec5ca9422cb4563cc42039ccfc333fb42ce5f8513382e56c5b02f934005d0d6e8ff - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.22.10": - version: 7.23.0 - resolution: "@babel/plugin-transform-block-scoping@npm:7.23.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9f60c71a0b72c7bdc0734ab363cf8ad40c4366456d9429ab3f2caedf6566c12f1ae8190478827222e93c60855b6c746a2c0e24381646fe7220d4666c332dc090 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-block-scoping@npm:7.22.15" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fecbcbfa657670ed09016fe9b7fbc97d96eec186dbacf280dd170161d7cfa6f03f80dcf46d2fb8e840ebbcaab34414b2f71ca9af1caa25e403c0a0b956ca4f37 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-block-scoping@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9656e7bb0673279e18d9f9408027786f1b20d657e2cc106456e0bd7826bd12d81813299adbef2b2a5837b05740f2295fe8fb62389122d38c9e961b3005270777 - languageName: node - linkType: hard - -"@babel/plugin-transform-class-properties@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-class-properties@npm:7.22.5" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.18.6" + "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/b830152dfc2ff2f647f0abe76e6251babdfbef54d18c4b2c73a6bf76b1a00050a5d998dac80dc901a48514e95604324943a9dd39317073fe0928b559e0e0c579 + checksum: 10/f370ea584c55bf4040e1f78c80b4eeb1ce2e6aaa74f87d1a48266493c33931d0b6222d8cee3a082383d6bb648ab8d6b7147a06f974d3296ef3bc39c7851683ec languageName: node linkType: hard -"@babel/plugin-transform-class-properties@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-class-properties@npm:7.24.7" +"@babel/plugin-proposal-object-rest-spread@npm:^7.5.5": + version: 7.20.7 + resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/compat-data": "npm:^7.20.5" + "@babel/helper-compilation-targets": "npm:^7.20.7" + "@babel/helper-plugin-utils": "npm:^7.20.2" + "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" + "@babel/plugin-transform-parameters": "npm:^7.20.7" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/1c6f645dd3889257028f27bfbb04526ac7676763a923fc8203aa79aa5232820e0201cb858c73b684b1922327af10304121ac013c7b756876d54560a9c1a7bc79 + checksum: 10/cb0f8f2ff98d7bb64ee91c28b20e8ab15d9bc7043f0932cbb9e51e1bbfb623b12f206a1171e070299c9cf21948c320b710d6d72a42f68a5bfd2702354113a1c5 languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-class-static-block@npm:7.22.11" +"@babel/plugin-proposal-optional-chaining@npm:^7.16.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.11" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" + "@babel/helper-plugin-utils": "npm:^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.20.0" + "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10/69f040506fad66f1c6918d288d0e0edbc5c8a07c8b4462c1184ad2f9f08995d68b057126c213871c0853ae0c72afc60ec87492049dfacb20902e32346a448bcb + "@babel/core": ^7.0.0-0 + checksum: 10/522cd133aff5c94c0ef36ff83c64f03deee183815da68b65b6950e81972ace3b514e032df07ea76d0f9ec8cc7a49578092907adfa17fccb4612117557c04a882 languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-class-static-block@npm:7.24.7" +"@babel/plugin-proposal-private-methods@npm:^7.16.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" + "@babel/helper-create-class-features-plugin": "npm:^7.18.6" + "@babel/helper-plugin-utils": "npm:^7.18.6" peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10/00b4d35788bcfefb56b6a1d3506ca23f11dd55d4bb5a34eb70397c06283dc7f596cd9d40995c4a6cb897b45ad220de211f854e7a030a05e26a307c8f56b6ba4b + "@babel/core": ^7.0.0-0 + checksum: 10/22d8502ee96bca99ad2c8393e8493e2b8d4507576dd054490fd8201a36824373440106f5b098b6d821b026c7e72b0424ff4aeca69ed5f42e48f029d3a156d5ad languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.22.6": - version: 7.22.15 - resolution: "@babel/plugin-transform-classes@npm:7.22.15" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-environment-visitor": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-optimise-call-expression": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.9" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - globals: "npm:^11.1.0" +"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": + version: 7.21.0-placeholder-for-preset-env.2 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/21d7a171055634b4c407e42fc99ef340bde70d5582d47f7bcdc9781d09b3736607d346f56c3abb1e8b9b62516e1af25ab9023a295be0c347c963d6a20f74b55f + checksum: 10/fab70f399aa869275690ec6c7cedb4ef361d4e8b6f55c3d7b04bfee61d52fb93c87cec2c65d73cddbaca89fb8ef5ec0921fce675c9169d9d51f18305ab34e78a languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.23.8": - version: 7.24.8 - resolution: "@babel/plugin-transform-classes@npm:7.24.8" +"@babel/plugin-proposal-private-property-in-object@npm:^7.16.7": + version: 7.21.11 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.11" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-compilation-targets": "npm:^7.24.8" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-replace-supers": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - globals: "npm:^11.1.0" + "@babel/helper-annotate-as-pure": "npm:^7.18.6" + "@babel/helper-create-class-features-plugin": "npm:^7.21.0" + "@babel/helper-plugin-utils": "npm:^7.20.2" + "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/3d586018691423ed1fbcb4589cc29001226c96e5e060932bf99379568c684a4a230cca7871e7c825335336ef0326066ba6e3bf5e6d0209425b0f5ceeda3eaed2 + checksum: 10/f803b5e1de0cb7c53f0d7f70bfbf57f2b3a20d95c19f8f2710719c4938149b490ee14d2d0c2f8316080823f0943c6cb8668fa8c139420e7bc7f80a66bfd50fff languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-computed-properties@npm:7.22.5" +"@babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": + version: 7.18.6 + resolution: "@babel/plugin-proposal-unicode-property-regex@npm:7.18.6" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/template": "npm:^7.22.5" + "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" + "@babel/helper-plugin-utils": "npm:^7.18.6" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/a3efa8de19e4c52f01a99301d864819a7997a7845044d9cef5b67b0fb1e5e3e610ecc23053a8b5cf8fe40fcad93c15a586eaeffd22b89eeaa038339c37919661 + checksum: 10/a8575ecb7ff24bf6c6e94808d5c84bb5a0c6dd7892b54f09f4646711ba0ee1e1668032b3c43e3e1dfec2c5716c302e851ac756c1645e15882d73df6ad21ae951 languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-computed-properties@npm:7.24.7" +"@babel/plugin-syntax-async-generators@npm:^7.8.4": + version: 7.8.4 + resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/fecf3c770b2dd8e70be6da12d4dd0273de9d8ef4d0f46be98d56fddb3a451932cdc9bb81de3057c9acb903e05ece657886cc31886d5762afa7b0a256db0f791e + checksum: 10/7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/plugin-transform-destructuring@npm:7.22.10" +"@babel/plugin-syntax-bigint@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/36cec1b8e3ecfc77753fe31698cc2441678ee4f70cf042202c3589a3b0079b04934f2d7d2f1c3d811ce6e3b2fe68fa1f4b6b6910555250987fce209d841cc686 + checksum: 10/3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-destructuring@npm:7.22.15" +"@babel/plugin-syntax-class-properties@npm:^7.12.13": + version: 7.12.13 + resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.12.13" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6d2c12376e48d4e78752e9def38ff107a99a25efca35c10f78704b6eafa4d39ca0c0f2f0ebbb67498cca63963dd9c525cb7622efdc31ac3f93771fa04e80dcca + checksum: 10/24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.23.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-destructuring@npm:7.24.8" +"@babel/plugin-syntax-class-static-block@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" + "@babel/helper-plugin-utils": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/e3bba0bb050592615fbf062ea07ae94f99e9cf22add006eaa66ed672d67ff7051b578a5ea68a7d79f9184fb3c27c65333d86b0b8ea04f9810bcccbeea2ffbe76 + checksum: 10/3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.5.0": - version: 7.17.3 - resolution: "@babel/plugin-transform-destructuring@npm:7.17.3" +"@babel/plugin-syntax-decorators@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-syntax-decorators@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5d5701d9f0d5276b1f16455bdf521698da33613f8f653832bdc216fda4a3187c2111f7a3743fef46d0a1651546420bbf5d9066316cf9e799a89307729f3cc8d0 + checksum: 10/e22e85c0a780b9c10619996d8e9fdb5f151869e53ce2b82ea05a52d393a1dbfda82e5896e9a75775a78ca7f91bca3b7d6864bec401ae1e9dc2b490dc044cad8d languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.22.5" +"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/409b658d11e3082c8f69e9cdef2d96e4d6d11256f005772425fb230cc48fd05945edbfbcb709dab293a1a2f01f9c8a5bb7b4131e632b23264039d9f95864b453 + checksum: 10/ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.7" +"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.8.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/51b75638748f6e5adab95b711d3365b8d7757f881c178946618a43b15063ec1160b07f4aa3b116bf3f1e097a88226a01db4cae2c5c4aad4c71fe5568828a03f5 + checksum: 10/85740478be5b0de185228e7814451d74ab8ce0a26fcca7613955262a26e99e8e15e9da58f60c754b84515d4c679b590dbd3f2148f0f58025f4ae706f1c5a5d4a languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.4.4": - version: 7.16.7 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.16.7" +"@babel/plugin-syntax-flow@npm:^7.25.9": + version: 7.26.0 + resolution: "@babel/plugin-syntax-flow@npm:7.26.0" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/554570dddfd5bfd87ab307be520f69a3d4ed2d2db677c165971b400d4c96656d0c165b318e69f1735612dcd12e04c0ee257697dc26800e8a572ca73bc05fa0f4 + checksum: 10/fdc0d0a7b512e00d933e12cf93c785ea4645a193f4b539230b7601cfaa8c704410199318ce9ea14e5fca7d13e9027822f7d81a7871d3e854df26b6af04cc3c6c languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.22.5" +"@babel/plugin-syntax-import-assertions@npm:^7.22.5, @babel/plugin-syntax-import-assertions@npm:^7.23.3, @babel/plugin-syntax-import-assertions@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.26.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/bb1280fbabaab6fab2ede585df34900712698210a3bd413f4df5bae6d8c24be36b496c92722ae676a7a67d060a4624f4d6c23b923485f906bfba8773c69f55b4 + checksum: 10/b58f2306df4a690ca90b763d832ec05202c50af787158ff8b50cdf3354359710bce2e1eb2b5135fcabf284756ac8eadf09ca74764aa7e76d12a5cac5f6b21e67 languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.7" +"@babel/plugin-syntax-import-attributes@npm:^7.22.5, @babel/plugin-syntax-import-attributes@npm:^7.23.3, @babel/plugin-syntax-import-attributes@npm:^7.24.7, @babel/plugin-syntax-import-attributes@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.26.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/4284d8fe058c838f80d594bace1380ce02995fa9a271decbece59c40815bc2f7e715807dcbe4d5da8b444716e6d05cc6d79771f500fb044cd0dd00ce4324b619 + checksum: 10/c122aa577166c80ee67f75aebebeef4150a132c4d3109d25d7fc058bf802946f883e330f20b78c1d3e3a5ada631c8780c263d2d01b5dbaecc69efefeedd42916 languageName: node linkType: hard -"@babel/plugin-transform-dynamic-import@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.22.11" +"@babel/plugin-syntax-import-meta@npm:^7.10.4": + version: 7.10.4 + resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/78fc9c532210bf9e8f231747f542318568ac360ee6c27e80853962c984283c73da3f8f8aebe83c2096090a435b356b092ed85de617a156cbe0729d847632be45 + checksum: 10/166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b languageName: node linkType: hard -"@babel/plugin-transform-dynamic-import@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.7" +"@babel/plugin-syntax-json-strings@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/e949c02aa57098d916eb6edcbef0f3f7d62640f37e1a061b0692523964e081f8182f2c4292173b4dbea4edb8d146e65d6a20ce4b6b5f8c33be34bd846ae114ea + checksum: 10/bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.22.5" +"@babel/plugin-syntax-jsx@npm:^7.25.9, @babel/plugin-syntax-jsx@npm:^7.7.2": + version: 7.25.9 + resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/f2d660c1b1d51ad5fec1cd5ad426a52187204068c4158f8c4aa977b31535c61b66898d532603eef21c15756827be8277f724c869b888d560f26d7fe848bb5eae + checksum: 10/bb609d1ffb50b58f0c1bac8810d0e46a4f6c922aa171c458f3a19d66ee545d36e782d3bffbbc1fed0dc65a558bdce1caf5279316583c0fff5a2c1658982a8563 languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": + version: 7.10.4 + resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/014b211f73a524ee98441541ddc4f6b067eefcf94d509e99074a45ea8c3f3ad0e36cab6f5f96666ac05b747a21fa6fda949aa25153656bb2821545a4b302e0d4 + checksum: 10/aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 languageName: node linkType: hard -"@babel/plugin-transform-export-namespace-from@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.22.11" +"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/73af5883a321ed56a4bfd43c8a7de0164faebe619287706896fc6ee2f7a4e69042adaa1338c0b8b4bdb9f7e5fdceb016fb1d40694cb43ca3b8827429e8aac4bf + checksum: 10/87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 languageName: node linkType: hard -"@babel/plugin-transform-export-namespace-from@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.7" +"@babel/plugin-syntax-numeric-separator@npm:^7.10.4": + version: 7.10.4 + resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/d59d21945d2fd1ead914bb21f909f75b70ebe0e7627c2b1326ce500babca4c8e4a2513af6899d92e06e87186c61ee5087209345f5102fb4ff5a0e47e7b159a2c + checksum: 10/01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 languageName: node linkType: hard -"@babel/plugin-transform-flow-strip-types@npm:^7.16.0": - version: 7.22.5 - resolution: "@babel/plugin-transform-flow-strip-types@npm:7.22.5" +"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-flow": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/0657042178061517cd5641a9a5eed1251aa1d8cf93a4111568ae663773854a1e8f6af167ecae042237d261389751dc5ee32ba12a15e65e41af29d04150005cab + checksum: 10/fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-for-of@npm:7.22.15" +"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/d6ac155fcc8dc3d37a092325e5b7df738a7a953c4a47520c0c02fbc30433e6a5ac38197690845ebb931870af958ac95d36132d5accf41ed4bb0765a7618371fc + checksum: 10/910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.23.6": - version: 7.24.7 - resolution: "@babel/plugin-transform-for-of@npm:7.24.7" +"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/ea471ad1345f1153f7f72f1f084e74f48dc349272ca1b2d8710b841b015c9861d673e12c3c98d42ab3c640cb6ab88bb9a8da1f4ca9c57a8f71f00815fa23ecef + checksum: 10/eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-function-name@npm:7.22.5" +"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.5" - "@babel/helper-function-name": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/cff3b876357999cb8ae30e439c3ec6b0491a53b0aa6f722920a4675a6dd5b53af97a833051df4b34791fe5b3dd326ccf769d5c8e45b322aa50ee11a660b17845 + checksum: 10/b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-function-name@npm:7.24.7" +"@babel/plugin-syntax-top-level-await@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/9d4dcffea45acd255fed4a97e372ada234579f9bae01a4d0ced657091f159edf1635ff2a666508a08f8e59390def09ae6ce8372679faad894aa6f3247728ebe1 + checksum: 10/bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e languageName: node linkType: hard -"@babel/plugin-transform-json-strings@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-json-strings@npm:7.22.11" +"@babel/plugin-syntax-typescript@npm:^7.25.9, @babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.25.9 + resolution: "@babel/plugin-syntax-typescript@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/50665e5979e66358c50e90a26db53c55917f78175127ac2fa05c7888d156d418ffb930ec0a109353db0a7c5f57c756ce01bfc9825d24cbfd2b3ec453f2ed8cba + checksum: 10/0e9821e8ba7d660c36c919654e4144a70546942ae184e85b8102f2322451eae102cbfadbcadd52ce077a2b44b400ee52394c616feab7b5b9f791b910e933fd33 languageName: node linkType: hard -"@babel/plugin-transform-json-strings@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-json-strings@npm:7.24.7" +"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" + "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" + "@babel/helper-plugin-utils": "npm:^7.18.6" peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5549dc97fc2d429a089d14ccfd51d8b3ba23c39b79edfe6d754e804fb1d50e6a4c070e73550be514a919c4db1553d8e6f7406178d68756b5959afe025a602cb2 + "@babel/core": ^7.0.0 + checksum: 10/a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-literals@npm:7.22.5" +"@babel/plugin-transform-arrow-functions@npm:^7.22.5, @babel/plugin-transform-arrow-functions@npm:^7.23.3, @babel/plugin-transform-arrow-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/ec37cc2ffb32667af935ab32fe28f00920ec8a1eb999aa6dc6602f2bebd8ba205a558aeedcdccdebf334381d5c57106c61f52332045730393e73410892a9735b + checksum: 10/c29f081224859483accf55fb4d091db2aac0dcd0d7954bac5ca889030cc498d3f771aa20eb2e9cd8310084ec394d85fa084b97faf09298b6bc9541182b3eb5bb languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-literals@npm:7.24.7" +"@babel/plugin-transform-async-generator-functions@npm:7.23.9": + version: 7.23.9 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-remap-async-to-generator": "npm:^7.22.20" + "@babel/plugin-syntax-async-generators": "npm:^7.8.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/bf341a5a0ffb5129670ac9a14ea53b67bd1d3d0e13173ce7ac2d4184c4b405d33f67df68c59a2e94a895bf80269ec1df82c011d9ddb686f9f08a40c37b881177 + checksum: 10/d402494087a6b803803eb5ab46b837aab100a04c4c5148e38bfa943ea1bbfc1ecfb340f1ced68972564312d3580f550c125f452372e77607a558fbbaf98c31c0 languageName: node linkType: hard -"@babel/plugin-transform-logical-assignment-operators@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.22.11" +"@babel/plugin-transform-async-generator-functions@npm:^7.22.7, @babel/plugin-transform-async-generator-functions@npm:^7.23.9, @babel/plugin-transform-async-generator-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-remap-async-to-generator": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/c664e9798e85afa7f92f07b867682dee7392046181d82f5d21bae6f2ca26dfe9c8375cdc52b7483c3fc09a983c1989f60eff9fbc4f373b0c0a74090553d05739 + checksum: 10/99306c44a4a791abd51a56d89fa61c4cfe805a58e070c7fb1cbf950886778a6c8c4f25a92d231f91da1746d14a338436073fd83038e607f03a2a98ac5340406b languageName: node linkType: hard -"@babel/plugin-transform-logical-assignment-operators@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.7" +"@babel/plugin-transform-async-to-generator@npm:7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.22.5" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" + "@babel/helper-module-imports": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-remap-async-to-generator": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/e39581cf1f9a43330b8340177c618fdb3232deb03faab1937819ef39327660a1fe94fd0ec2f66d1f5b5f98acba68871a77a9931588011c13dded3d7094ecc9de + checksum: 10/b95f23f99dcb379a9f0a1c2a3bbea3f8dc0e1b16dc1ac8b484fe378370169290a7a63d520959a9ba1232837cf74a80e23f6facbe14fd42a3cda6d3c2d7168e62 languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.22.5" +"@babel/plugin-transform-async-to-generator@npm:7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.23.3" dependencies: + "@babel/helper-module-imports": "npm:^7.22.15" "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-remap-async-to-generator": "npm:^7.22.20" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/ec4b0e07915ddd4fda0142fd104ee61015c208608a84cfa13643a95d18760b1dc1ceb6c6e0548898b8c49e5959a994e46367260176dbabc4467f729b21868504 + checksum: 10/2e9d9795d4b3b3d8090332104e37061c677f29a1ce65bcbda4099a32d243e5d9520270a44bbabf0fb1fb40d463bd937685b1a1042e646979086c546d55319c3c languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.7" +"@babel/plugin-transform-async-to-generator@npm:^7.22.5, @babel/plugin-transform-async-to-generator@npm:^7.23.3, @babel/plugin-transform-async-to-generator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-remap-async-to-generator": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/837b60ea42fc69a430c8f7fb124247ba009ff6d93187a521fe9f83556fe124715bd46533b1684a3e139f272849a14d1d4faf3397bde13714f99ce0938526ea6f + checksum: 10/b3ad50fb93c171644d501864620ed23952a46648c4df10dc9c62cc9ad08031b66bd272cfdd708faeee07c23b6251b16f29ce0350473e4c79f0c32178d38ce3a6 languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-modules-amd@npm:7.22.5" +"@babel/plugin-transform-block-scoped-functions@npm:^7.22.5, @babel/plugin-transform-block-scoped-functions@npm:^7.23.3, @babel/plugin-transform-block-scoped-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.25.9" dependencies: - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5453f829205f6c918cc74d66946c9bf9544869f961d72a9934b4370049bf72a9b0ac089b64389be5172b217858c5353ec3479a18ab14cebb23329d708f6fc1ab + checksum: 10/bf31896556b33a80f017af3d445ceb532ec0f5ca9d69bc211a963ac92514d172d5c24c5ac319f384d9dfa7f1a4d8dc23032c2fe3e74f98a59467ecd86f7033ae languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-amd@npm:7.24.7" +"@babel/plugin-transform-block-scoping@npm:^7.22.5, @babel/plugin-transform-block-scoping@npm:^7.23.4, @babel/plugin-transform-block-scoping@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-block-scoping@npm:7.25.9" dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/66465ffba49af7a7b7a62995eb58f591ecd23ab42b0c67f8a70020177b3789d2a379bd6cbb68cbd09a69fd75c38a91f5a09ea70f5c8347bf4c6ea81caa0f6c6b + checksum: 10/89dcdd7edb1e0c2f44e3c568a8ad8202e2574a8a8308248550a9391540bc3f5c9fbd8352c60ae90769d46f58d3ab36f2c3a0fbc1c3620813d92ff6fccdfa79c8 languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.22.11": - version: 7.23.0 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.0" +"@babel/plugin-transform-class-properties@npm:^7.22.5, @babel/plugin-transform-class-properties@npm:^7.23.3, @babel/plugin-transform-class-properties@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-class-properties@npm:7.25.9" dependencies: - "@babel/helper-module-transforms": "npm:^7.23.0" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/65085c8f2578b0c272b3969b78e54430ea3217fca8de7a21ded845a74ddf2d97aee284559da102d826fcb8aed5a79d09536a6e4610d868f539d7bc382eb319ff + checksum: 10/a8d69e2c285486b63f49193cbcf7a15e1d3a5f632c1c07d7a97f65306df7f554b30270b7378dde143f8b557d1f8f6336c643377943dec8ec405e4cd11e90b9ea languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.22.5" +"@babel/plugin-transform-class-static-block@npm:^7.22.5, @babel/plugin-transform-class-static-block@npm:^7.23.4, @babel/plugin-transform-class-static-block@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-transform-class-static-block@npm:7.26.0" dependencies: - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-simple-access": "npm:^7.22.5" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bf8bcc7a0f28f1fb2bfad3e65a50e6aee54998917caf89c68fc871d1831808a74ae7563b8a37485da03a583a9bd1211c30b667bb366c3161a22c6105962ab5f8 + "@babel/core": ^7.12.0 + checksum: 10/60cba3f125a7bc4f90706af0a011697c7ffd2eddfba336ed6f84c5f358c44c3161af18b0202475241a96dee7964d96dd3a342f46dbf85b75b38bb789326e1766 languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.23.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.8" +"@babel/plugin-transform-classes@npm:^7.22.6, @babel/plugin-transform-classes@npm:^7.23.8, @babel/plugin-transform-classes@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-classes@npm:7.25.9" dependencies: - "@babel/helper-module-transforms": "npm:^7.24.8" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-simple-access": "npm:^7.24.7" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + globals: "npm:^11.1.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/18e5d229767c7b5b6ff0cbf1a8d2d555965b90201839d0ac2dc043b56857624ea344e59f733f028142a8c1d54923b82e2a0185694ef36f988d797bfbaf59819c + checksum: 10/1914ebe152f35c667fba7bf17ce0d9d0f33df2fb4491990ce9bb1f9ec5ae8cbd11d95b0dc371f7a4cc5e7ce4cf89467c3e34857302911fc6bfb6494a77f7b37e languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.22.11" +"@babel/plugin-transform-computed-properties@npm:^7.22.5, @babel/plugin-transform-computed-properties@npm:^7.23.3, @babel/plugin-transform-computed-properties@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-computed-properties@npm:7.25.9" dependencies: - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-module-transforms": "npm:^7.22.9" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/beccd37144e8c482da83282ee1ac8b605a188b9b3ddc5dbf99425a1a4e470158a3792c91cccdfb19fbd046436c42b63bb7432a60a83f7c3b50999f5f6a18819a + checksum: 10/aa1a9064d6a9d3b569b8cae6972437315a38a8f6553ee618406da5122500a06c2f20b9fa93aeed04dd895923bf6f529c09fc79d4be987ec41785ceb7d2203122 languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.23.9": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.24.7" +"@babel/plugin-transform-destructuring@npm:^7.22.5, @babel/plugin-transform-destructuring@npm:^7.23.3, @babel/plugin-transform-destructuring@npm:^7.25.9, @babel/plugin-transform-destructuring@npm:^7.5.0": + version: 7.25.9 + resolution: "@babel/plugin-transform-destructuring@npm:7.25.9" dependencies: - "@babel/helper-hoist-variables": "npm:^7.24.7" - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/14f0ed1a252a2a04e075cd9051b809e33cd45374a2495dc0a428517893b8e951819acc8343c61d348c51ba54e42660bc93990a77aa3460d16a1c21d52d9c2cf1 + checksum: 10/51b24fbead910ad0547463b2d214dd08076b22a66234b9f878b8bac117603dd23e05090ff86e9ffc373214de23d3e5bf1b095fe54cce2ca16b010264d90cf4f5 languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-modules-umd@npm:7.22.5" +"@babel/plugin-transform-dotall-regex@npm:^7.22.5, @babel/plugin-transform-dotall-regex@npm:^7.23.3, @babel/plugin-transform-dotall-regex@npm:^7.25.9, @babel/plugin-transform-dotall-regex@npm:^7.4.4": + version: 7.25.9 + resolution: "@babel/plugin-transform-dotall-regex@npm:7.25.9" dependencies: - "@babel/helper-module-transforms": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/b955d066c68b60c1179bfb0b744e2fad32dbe86d0673bd94637439cfe425d1e3ff579bd47a417233609aac1624f4fe69915bee73e6deb2af6188fda8aaa5db63 + checksum: 10/8bdf1bb9e6e3a2cc8154ae88a3872faa6dc346d6901994505fb43ac85f858728781f1219f40b67f7bb0687c507450236cb7838ac68d457e65637f98500aa161b languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-umd@npm:7.24.7" +"@babel/plugin-transform-duplicate-keys@npm:^7.22.5, @babel/plugin-transform-duplicate-keys@npm:^7.23.3, @babel/plugin-transform-duplicate-keys@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-duplicate-keys@npm:7.25.9" dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/cef9c8917b3c35c3b6cb424dc2e6f74016122f1d25c196e2c7e51eb080d95e96c5d34966c0d5b9d4e17b8e60d455a97ed271317ed104e0e70bff159830a59678 + checksum: 10/10dbb87bc09582416f9f97ca6c40563655abf33e3fd0fee25eeaeff28e946a06651192112a2bc2b18c314a638fa15c55b8365a677ef67aa490848cefdc57e1d8 languageName: node linkType: hard -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.22.5" +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.25.9" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/3ee564ddee620c035b928fdc942c5d17e9c4b98329b76f9cefac65c111135d925eb94ed324064cd7556d4f5123beec79abea1d4b97d1c8a2a5c748887a2eb623 + checksum: 10/f7233cf596be8c6843d31951afaf2464a62a610cb89c72c818c044765827fab78403ab8a7d3a6386f838c8df574668e2a48f6c206b1d7da965aff9c6886cb8e6 languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-new-target@npm:7.22.5" +"@babel/plugin-transform-dynamic-import@npm:^7.22.5, @babel/plugin-transform-dynamic-import@npm:^7.23.4, @babel/plugin-transform-dynamic-import@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-dynamic-import@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6b72112773487a881a1d6ffa680afde08bad699252020e86122180ee7a88854d5da3f15d9bca3331cf2e025df045604494a8208a2e63b486266b07c14e2ffbf3 + checksum: 10/aaca1ccda819be9b2b85af47ba08ddd2210ff2dbea222f26e4cd33f97ab020884bf81a66197e50872721e9daf36ceb5659502c82199884ea74d5d75ecda5c58b languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-new-target@npm:7.24.7" +"@babel/plugin-transform-exponentiation-operator@npm:^7.22.5, @babel/plugin-transform-exponentiation-operator@npm:^7.23.3, @babel/plugin-transform-exponentiation-operator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/91b6a7439b7622f80dc755ddfb9ab083355bedc0b2af18e7c7a948faed14467599609331c8d59cfab4273640e3fc36e4cd02ad5b6dcb4a428f5a8baefc507acc + checksum: 10/57e1bb4135dd16782fe84b49dd360cce8f9bf5f62eb10424dcdaf221e54a8bacdf50f2541c5ac01dea9f833a6c628613d71be915290938a93454389cba4de06b languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.22.11" +"@babel/plugin-transform-export-namespace-from@npm:^7.22.5, @babel/plugin-transform-export-namespace-from@npm:^7.23.4, @babel/plugin-transform-export-namespace-from@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/167babecc8b8fe70796a7b7d34af667ebbf43da166c21689502e5e8cc93180b7a85979c77c9f64b7cce431b36718bd0a6df9e5e0ffea4ae22afb22cfef886372 + checksum: 10/4dfe8df86c5b1d085d591290874bb2d78a9063090d71567ed657a418010ad333c3f48af2c974b865f53bbb718987a065f89828d43279a7751db1a56c9229078d languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" +"@babel/plugin-transform-flow-strip-types@npm:^7.16.0": + version: 7.25.9 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-syntax-flow": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/113cd24b6ce4d0a8e54ad9324428244942ce752a3fd38f8b615c3a786641ec18a00a01b662fe4cbebf369358f5904a975bbde0a977b839f2438b16f0d7d1dd36 + checksum: 10/a3ffc76bbc922720debe973bccb501ccbda0d6d32d80c9efd599ab1b683fd72cae3198975d8609b37070fc32f921a9eb7d2db17b7b719395468773be41011822 languageName: node linkType: hard -"@babel/plugin-transform-numeric-separator@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.22.11" +"@babel/plugin-transform-for-of@npm:^7.22.5, @babel/plugin-transform-for-of@npm:^7.23.6, @babel/plugin-transform-for-of@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-for-of@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/af064d06a4a041767ec396a5f258103f64785df290e038bba9f0ef454e6c914f2ac45d862bbdad8fac2c7ad47fa4e95356f29053c60c100a0160b02a995fe2a3 + checksum: 10/63a2db7fe06c2e3f5fc1926f478dac66a5f7b3eaeb4a0ffae577e6f3cb3d822cb1ed2ed3798f70f5cb1aa06bc2ad8bcd1f557342f5c425fd83c37a8fc1cfd2ba languageName: node linkType: hard -"@babel/plugin-transform-numeric-separator@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.24.7" +"@babel/plugin-transform-function-name@npm:^7.22.5, @babel/plugin-transform-function-name@npm:^7.23.3, @babel/plugin-transform-function-name@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-function-name@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/dc5bb0534889d207b1da125635471c42da61a4a4e9e68855f24b1cd04ccdcf8325b2c29112e719913c2097242e7e62d660e0fea2a46f3a9a983c9d02a0ec7a04 + checksum: 10/a8d7c8d019a6eb57eab5ca1be3e3236f175557d55b1f3b11f8ad7999e3fbb1cf37905fd8cb3a349bffb4163a558e9f33b63f631597fdc97c858757deac1b2fd7 languageName: node linkType: hard -"@babel/plugin-transform-object-rest-spread@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.22.15" +"@babel/plugin-transform-json-strings@npm:^7.22.5, @babel/plugin-transform-json-strings@npm:^7.23.4, @babel/plugin-transform-json-strings@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-json-strings@npm:7.25.9" dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.22.15" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/04b9f4bbabf4bbd019b47c60b294d873fe5d2f6063628a5b311d88da9e81b0a8622756dd42c7030359925479b7a3cd743dee46e73d84e03afd907d8cfd44ddea + checksum: 10/e2498d84761cfd05aaea53799933d55af309c9d6204e66b38778792d171e4d1311ad34f334259a3aa3407dd0446f6bd3e390a1fcb8ce2e42fe5aabed0e41bee1 languageName: node linkType: hard -"@babel/plugin-transform-object-rest-spread@npm:^7.24.0": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.24.7" +"@babel/plugin-transform-literals@npm:^7.22.5, @babel/plugin-transform-literals@npm:^7.23.3, @babel/plugin-transform-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-literals@npm:7.25.9" dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/d586995dc3396bbf8fb75b84f0a3548d923e4c3500bb414641a7fe30762a4ffd82987887fece6381f600d8de2da1e3310fc9a725271724d35f9020fcd5d4b2a3 + checksum: 10/3cca75823a38aab599bc151b0fa4d816b5e1b62d6e49c156aa90436deb6e13649f5505973151a10418b64f3f9d1c3da53e38a186402e0ed7ad98e482e70c0c14 languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-object-super@npm:7.22.5" +"@babel/plugin-transform-logical-assignment-operators@npm:^7.22.5, @babel/plugin-transform-logical-assignment-operators@npm:^7.23.4, @babel/plugin-transform-logical-assignment-operators@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-replace-supers": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/b71887877d74cb64dbccb5c0324fa67e31171e6a5311991f626650e44a4083e5436a1eaa89da78c0474fb095d4ec322d63ee778b202d33aa2e4194e1ed8e62d7 + checksum: 10/8c6febb4ac53852314d28b5e2c23d5dbbff7bf1e57d61f9672e0d97531ef7778b3f0ad698dcf1179f5486e626c77127508916a65eb846a89e98a92f70ed3537b languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-super@npm:7.24.7" +"@babel/plugin-transform-member-expression-literals@npm:^7.22.5, @babel/plugin-transform-member-expression-literals@npm:^7.23.3, @babel/plugin-transform-member-expression-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-member-expression-literals@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/382739a017972d7126416b958ea81b4b950b6275414908a54bfef6aeed9b9fcc6c8d247db3a1134b09a3b355a60039670ce41ee41c626f8acec70f49c3c8d2a6 + checksum: 10/db92041ae87b8f59f98b50359e0bb172480f6ba22e5e76b13bdfe07122cbf0daa9cd8ad2e78dcb47939938fed88ad57ab5989346f64b3a16953fc73dea3a9b1f languageName: node linkType: hard -"@babel/plugin-transform-optional-catch-binding@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.22.11" +"@babel/plugin-transform-modules-amd@npm:^7.22.5, @babel/plugin-transform-modules-amd@npm:^7.23.3, @babel/plugin-transform-modules-amd@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-amd@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/f17abd90e1de67c84d63afea29c8021c74abb2794d3a6eeafb0bbe7372d3db32aefca386e392116ec63884537a4a2815d090d26264d259bacc08f6e3ed05294c + checksum: 10/75d34c6e709a23bcfa0e06f722c9a72b1d9ac3e7d72a07ef54a943d32f65f97cbbf0e387d874eb9d9b4c8d33045edfa8e8441d0f8794f3c2b9f1d71b928acf2c languageName: node linkType: hard -"@babel/plugin-transform-optional-catch-binding@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.7" +"@babel/plugin-transform-modules-commonjs@npm:^7.22.5, @babel/plugin-transform-modules-commonjs@npm:^7.23.3, @babel/plugin-transform-modules-commonjs@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-simple-access": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/605ae3764354e83f73c1e6430bac29e308806abcce8d1369cf69e4921771ff3592e8f60ba60c15990070d79b8d8740f0841069d64b466b3ce8a8c43e9743da7e + checksum: 10/a7390ca999373ccdef91075f274d1ace3a5cb79f9b9118ed6f76e94867ed454cf798a6f312ce2c4cdc1e035a25d810d754e4cb2e4d866acb4219490f3585de60 languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.22.10": - version: 7.23.0 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.23.0" +"@babel/plugin-transform-modules-systemjs@npm:^7.22.5, @babel/plugin-transform-modules-systemjs@npm:^7.23.9, @babel/plugin-transform-modules-systemjs@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/fb1103c6489b91df06c483a97fc12515c2f3840f573cbecb27959307c0a838fdd1502a34ada43805c4fb7f7dab3d1c0d1ab8428775d098af6778a7b00f494c27 + checksum: 10/03145aa89b7c867941a03755216cfb503df6d475a78df84849a157fa5f2fcc17ba114a968d0579ae34e7c61403f35d1ba5d188fdfb9ad05f19354eb7605792f9 languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.22.15, @babel/plugin-transform-optional-chaining@npm:^7.22.6": - version: 7.22.15 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.22.15" +"@babel/plugin-transform-modules-umd@npm:^7.22.5, @babel/plugin-transform-modules-umd@npm:^7.23.3, @babel/plugin-transform-modules-umd@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-umd@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6e7b35f2c673363d0fc78290b816b2a3996ad1201616bf4b52da20dda9f37d05c05c0c815b52cb65523b3160d4fdc7ffe0022629f2cb07135482ca57e42ce311 + checksum: 10/47d03485fedac828832d9fee33b3b982a6db8197e8651ceb5d001890e276150b5a7ee3e9780749e1ba76453c471af907a159108832c24f93453dd45221788e97 languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.24.7": - version: 7.24.8 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.8" +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5, @babel/plugin-transform-named-capturing-groups-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/1f873fb9d86c280b64dfe5ebc59244b459b717ed72a7682da2386db3d9e11fc9d831cfc2e11d37262b4325a7a0e3ccbccfb8cd0b944caf199d3c9e03fff7b0af + "@babel/core": ^7.0.0 + checksum: 10/434346ba05cf74e3f4704b3bdd439287b95cd2a8676afcdc607810b8c38b6f4798cd69c1419726b2e4c7204e62e4a04d31b0360e91ca57a930521c9211e07789 languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/plugin-transform-parameters@npm:7.16.7" +"@babel/plugin-transform-new-target@npm:^7.22.5, @babel/plugin-transform-new-target@npm:^7.23.3, @babel/plugin-transform-new-target@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-new-target@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/000fabb790d9f744cf39674eed804bb312e493d3c38dcc474c6b212cfc3068b3e320d871049dff5c460b6521e7ef88b6bdff54d8cc5dfae77cb7ae5a7733433e + checksum: 10/07bb3a09028ee7b8e8ede6e6390e3b3aecc5cf9adb2fc5475ff58036c552b8a3f8e63d4c43211a60545f3307cdc15919f0e54cb5455d9546daed162dc54ff94e languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.22.15, @babel/plugin-transform-parameters@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/plugin-transform-parameters@npm:7.22.15" +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.5, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.23.4, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/fa9f2340fe48b88c344ff38cd86318f61e48bedafdc567a1607106a1c3a65c0db845792f406b1320f89745192fe1ae6739b0bc4eb646ff60cd797ca85752d462 + checksum: 10/26e03b1c2c0408cc300e46d8f8cb639653ff3a7b03456d0d8afbb53c44f33a89323f51d99991dade3a5676921119bbdf869728bb7911799b5ef99ffafa2cdd24 languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-parameters@npm:7.24.7" +"@babel/plugin-transform-numeric-separator@npm:^7.22.5, @babel/plugin-transform-numeric-separator@npm:^7.23.4, @babel/plugin-transform-numeric-separator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-numeric-separator@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/41ff6bda926fabfb2e5d90b70621f279330691bed92009297340a8e776cfe9c3f2dda6afbc31dd3cbdccdfa9a5c57f2046e3ccc84f963c3797356df003d1703a + checksum: 10/0528ef041ed88e8c3f51624ee87b8182a7f246fe4013f0572788e0727d20795b558f2b82e3989b5dd416cbd339500f0d88857de41b6d3b6fdacb1d5344bcc5b1 languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-private-methods@npm:7.22.5" +"@babel/plugin-transform-object-rest-spread@npm:^7.22.5, @babel/plugin-transform-object-rest-spread@npm:^7.24.0, @babel/plugin-transform-object-rest-spread@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.25.9" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-transform-parameters": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/321479b4fcb6d3b3ef622ab22fd24001e43d46e680e8e41324c033d5810c84646e470f81b44cbcbef5c22e99030784f7cac92f1829974da7a47a60a7139082c3 + checksum: 10/a157ac5af2721090150858f301d9c0a3a0efb8ef66b90fce326d6cc0ae45ab97b6219b3e441bf8d72a2287e95eb04dd6c12544da88ea2345e70b3fac2c0ac9e2 languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-private-methods@npm:7.24.7" +"@babel/plugin-transform-object-super@npm:^7.22.5, @babel/plugin-transform-object-super@npm:^7.23.3, @babel/plugin-transform-object-super@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-object-super@npm:7.25.9" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5338df2aae53c43e6a7ea0c44f20a1100709778769c7e42d4901a61945c3200ba0e7fca83832f48932423a68528219fbea233cb5b8741a2501fdecbacdc08292 + checksum: 10/1817b5d8b80e451ae1ad9080cca884f4f16df75880a158947df76a2ed8ab404d567a7dce71dd8051ef95f90fbe3513154086a32aba55cc76027f6cbabfbd7f98 languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.22.5": - version: 7.22.11 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.22.11" +"@babel/plugin-transform-optional-catch-binding@npm:^7.22.5, @babel/plugin-transform-optional-catch-binding@npm:^7.23.4, @babel/plugin-transform-optional-catch-binding@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.11" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/b00623d107069c91a164d5cf7486c0929a4ee3023fcddbc8844e21b5e66f369271e1aa51921c7d87b80d9927bc75d63afcfe4d577872457ddb0443a5b86bacca + checksum: 10/b46a8d1e91829f3db5c252583eb00d05a779b4660abeea5500fda0f8ffa3584fd18299443c22f7fddf0ed9dfdb73c782c43b445dc468d4f89803f2356963b406 languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.23.4": - version: 7.24.7 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.7" +"@babel/plugin-transform-optional-chaining@npm:^7.22.6, @babel/plugin-transform-optional-chaining@npm:^7.23.4, @babel/plugin-transform-optional-chaining@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/a23ee18340818e292abfcb98b1086a188c81d640b1045e6809e9a3e8add78f9cb26607774de4ed653cbecd4277965dc4f4f1affc3504682209bb2a65fd4251f8 + checksum: 10/bc838a499fd9892e163b8bc9bfbc4bf0b28cc3232ee0a6406ae078257c8096518f871d09b4a32c11f4a2d6953c3bc1984619ef748f7ad45aed0b0d9689a8eb36 languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-property-literals@npm:7.22.5" +"@babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.22.5, @babel/plugin-transform-parameters@npm:^7.23.3, @babel/plugin-transform-parameters@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-parameters@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/796176a3176106f77fcb8cd04eb34a8475ce82d6d03a88db089531b8f0453a2fb8b0c6ec9a52c27948bc0ea478becec449893741fc546dfc3930ab927e3f9f2e + checksum: 10/014009a1763deb41fe9f0dbca2c4489ce0ac83dd87395f488492e8eb52399f6c883d5bd591bae3b8836f2460c3937fcebd07e57dce1e0bfe30cdbc63fdfc9d3a languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-property-literals@npm:7.24.7" +"@babel/plugin-transform-private-methods@npm:^7.22.5, @babel/plugin-transform-private-methods@npm:^7.23.3, @babel/plugin-transform-private-methods@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-private-methods@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/71708890fe007d45ad7a130150a2ba1fea0205f575b925ca2e1bb65018730636a68e65c634a474e5b658378d72871c337c953560009c081a645e088769bf168a + checksum: 10/6e3671b352c267847c53a170a1937210fa8151764d70d25005e711ef9b21969aaf422acc14f9f7fb86bc0e4ec43e7aefcc0ad9196ae02d262ec10f509f126a58 languageName: node linkType: hard -"@babel/plugin-transform-react-constant-elements@npm:^7.12.1": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-constant-elements@npm:7.22.5" +"@babel/plugin-transform-private-property-in-object@npm:^7.22.5, @babel/plugin-transform-private-property-in-object@npm:^7.23.4, @babel/plugin-transform-private-property-in-object@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-private-property-in-object@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/0f2fc4d0a4025975f6cb4e1e80be1fe2e14546d86341beed8dbbbf9357b56908574e89476bd693431966c15b31f9c30f735636232058cf7812ca46b687d053be + checksum: 10/aa45bb5669b610afa763d774a4b5583bb60ce7d38e4fd2dedfd0703e73e25aa560e6c6124e155aa90b101601743b127d9e5d3eb00989a7e4b4ab9c2eb88475ba languageName: node linkType: hard -"@babel/plugin-transform-react-display-name@npm:^7.16.0, @babel/plugin-transform-react-display-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-display-name@npm:7.22.5" +"@babel/plugin-transform-property-literals@npm:^7.22.5, @babel/plugin-transform-property-literals@npm:^7.23.3, @babel/plugin-transform-property-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-property-literals@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/a12bfd1e4e93055efca3ace3c34722571bda59d9740dca364d225d9c6e3ca874f134694d21715c42cc63d79efd46db9665bd4a022998767f9245f1e29d5d204d + checksum: 10/436046ab07d54a9b44a384eeffec701d4e959a37a7547dda72e069e751ca7ff753d1782a8339e354b97c78a868b49ea97bf41bf5a44c6d7a3c0a05ad40eeb49c languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-development@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx-development@npm:7.22.5" +"@babel/plugin-transform-react-constant-elements@npm:^7.12.1": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-constant-elements@npm:7.25.9" dependencies: - "@babel/plugin-transform-react-jsx": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/36bc3ff0b96bb0ef4723070a50cfdf2e72cfd903a59eba448f9fe92fea47574d6f22efd99364413719e1f3fb3c51b6c9b2990b87af088f8486a84b2a5f9e4560 + checksum: 10/d5843135107486c34320c4174fcd69e57335cc99a333a1d702a805675b22001be7f1b42b060faa745fd12af2c97f3825978ccbc94d12491e6b31b5c3b7c4632e languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-self@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3" +"@babel/plugin-transform-react-display-name@npm:^7.16.0, @babel/plugin-transform-react-display-name@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-display-name@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/882bf56bc932d015c2d83214133939ddcf342e5bcafa21f1a93b19f2e052145115e1e0351730897fd66e5f67cad7875b8a8d81ceb12b6e2a886ad0102cb4eb1f + checksum: 10/dc7affde0ed98e40f629ee92a2fc44fbd8008aabda1ddb3f5bd2632699d3289b08dff65b26cf3b89dab46397ec440f453d19856bbb3a9a83df5b4ac6157c5c39 languageName: node linkType: hard -"@babel/plugin-transform-react-jsx-source@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-react-jsx-source@npm:7.23.3" +"@babel/plugin-transform-react-jsx-development@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx-development@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/plugin-transform-react-jsx": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/92287fb797e522d99bdc77eaa573ce79ff0ad9f1cf4e7df374645e28e51dce0adad129f6f075430b129b5bac8dad843f65021970e12e992d6d6671f0d65bb1e0 + checksum: 10/537d38369537f1eb56041c4b770bc0733fde1801a7f5ffef40a1217ea448f33ee2fa8e6098a58a82fd00e432c1b9426a66849496da419020c9eca3b1b1a23779 languageName: node linkType: hard -"@babel/plugin-transform-react-jsx@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-jsx@npm:7.22.5" +"@babel/plugin-transform-react-jsx-self@npm:^7.23.3": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-module-imports": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-jsx": "npm:^7.22.5" - "@babel/types": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6be5db99b170c937c71fbe68dc64804bb041729d2f95b376ab5e7bc51c34a790f28753b14384160e87cabacf5e1b1aa3379a1a430a60b1fd6b031ba58955f5a6 + checksum: 10/41c833cd7f91b1432710f91b1325706e57979b2e8da44e83d86312c78bbe96cd9ef778b4e79e4e17ab25fa32c72b909f2be7f28e876779ede28e27506c41f4ae languageName: node linkType: hard -"@babel/plugin-transform-react-jsx@npm:^7.3.0": - version: 7.17.3 - resolution: "@babel/plugin-transform-react-jsx@npm:7.17.3" +"@babel/plugin-transform-react-jsx-source@npm:^7.23.3": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.16.7" - "@babel/helper-module-imports": "npm:^7.16.7" - "@babel/helper-plugin-utils": "npm:^7.16.7" - "@babel/plugin-syntax-jsx": "npm:^7.16.7" - "@babel/types": "npm:^7.17.0" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/d3de8c08858d8c79ecc5ee26c65567f3a187529bd936951d673454226154889c67aa634a79dd8b80e0b8e6119eed46e7432402095201bb5cce8007de73d8c333 + checksum: 10/a3e0e5672e344e9d01fb20b504fe29a84918eaa70cec512c4d4b1b035f72803261257343d8e93673365b72c371f35cf34bb0d129720bf178a4c87812c8b9c662 languageName: node linkType: hard -"@babel/plugin-transform-react-pure-annotations@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.22.5" +"@babel/plugin-transform-react-jsx@npm:^7.25.9, @babel/plugin-transform-react-jsx@npm:^7.3.0": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-syntax-jsx": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/092021c4f404e267002099ec20b3f12dd730cb90b0d83c5feed3dc00dbe43b9c42c795a18e7c6c7d7bddea20c7dd56221b146aec81b37f2e7eb5137331c61120 + checksum: 10/eb179ecdf0ae19aed254105cf78fbac35f9983f51ed04b7b67c863a4820a70a879bd5da250ac518321f86df20eac010e53e3411c8750c386d51da30e4814bfb6 languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.22.10, @babel/plugin-transform-regenerator@npm:^7.22.5": - version: 7.22.10 - resolution: "@babel/plugin-transform-regenerator@npm:7.22.10" +"@babel/plugin-transform-react-pure-annotations@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - regenerator-transform: "npm:^0.15.2" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/e13678d62d6fa96f11cb8b863f00e8693491e7adc88bfca3f2820f80cbac8336e7dec3a596eee6a1c4663b7ececc3564f2cd7fb44ed6d4ce84ac2bb7f39ecc6e + checksum: 10/9995c0fc7c25d3aaaa0ce84233de02eab2564ea111d0813ec5baa538eb21520402879cc787ad1ad4c2061b99cebc3beb09910e64c9592e8ccb42ae62d9e4fd9a languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-regenerator@npm:7.24.7" +"@babel/plugin-transform-regenerator@npm:^7.22.5, @babel/plugin-transform-regenerator@npm:^7.23.3, @babel/plugin-transform-regenerator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-regenerator@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" regenerator-transform: "npm:^0.15.2" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/70fa2bb36d3e2ce69a25c7227da8ad92307ab7b50cb6dfcc4dc5ce8f1cc79b0fcf997292a1cb3b4ae7cb136f515d1b2c3fb78c927bdba8d719794430403eb0c6 + checksum: 10/1c09e8087b476c5967282c9790fb8710e065eda77c60f6cb5da541edd59ded9d003d96f8ef640928faab4a0b35bf997673499a194973da4f0c97f0935807a482 languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-reserved-words@npm:7.22.5" +"@babel/plugin-transform-regexp-modifiers@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-transform-regexp-modifiers@npm:7.26.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3ffd7dbc425fe8132bfec118b9817572799cab1473113a635d25ab606c1f5a2341a636c04cf6b22df3813320365ed5a965b5eeb3192320a10e4cc2c137bd8bfc + "@babel/core": ^7.0.0 + checksum: 10/726deca486bbd4b176f8a966eb0f4aabc19d9def3b8dabb8b3a656778eca0df1fda3f3c92b213aa5a184232fdafd5b7bd73b4e24ca4345c498ef6baff2bda4e1 languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-reserved-words@npm:7.24.7" +"@babel/plugin-transform-reserved-words@npm:^7.22.5, @babel/plugin-transform-reserved-words@npm:^7.23.3, @babel/plugin-transform-reserved-words@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-reserved-words@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/64a2669671bb97c3dee3830a82c3e932fe6e02d56a4053c6ee4453d317b5f436d3d44907fbb0f4fbd8a56ebee34f6aee250e49743b7243d14d00c069215f3113 + checksum: 10/8beda04481b25767acbd1f6b9ef7b3a9c12fbd9dcb24df45a6ad120e1dc4b247c073db60ac742f9093657d6d8c050501fc0606af042f81a3bb6a3ff862cddc47 languageName: node linkType: hard @@ -4909,238 +3407,136 @@ __metadata: linkType: hard "@babel/plugin-transform-runtime@npm:^7.16.4": - version: 7.23.2 - resolution: "@babel/plugin-transform-runtime@npm:7.23.2" - dependencies: - "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" - babel-plugin-polyfill-corejs2: "npm:^0.4.6" - babel-plugin-polyfill-corejs3: "npm:^0.8.5" - babel-plugin-polyfill-regenerator: "npm:^0.5.3" + version: 7.25.9 + resolution: "@babel/plugin-transform-runtime@npm:7.25.9" + dependencies: + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + babel-plugin-polyfill-corejs2: "npm:^0.4.10" + babel-plugin-polyfill-corejs3: "npm:^0.10.6" + babel-plugin-polyfill-regenerator: "npm:^0.6.1" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/536c444c494a43c1de4eec8297242199a7e778a82f64a8203a15bec46af17757ad59b520ee1fb414a03100ae743b8a2ca8527b6c0e4cc3e05be9ac1361260a44 - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a5ac902c56ea8effa99f681340ee61bac21094588f7aef0bc01dff98246651702e677552fa6d10e548c4ac22a3ffad047dd2f8c8f0540b68316c2c203e56818b - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c68c2be965007e0cb6667daa209bc0af877cab4b327ef2e21b2114c38554243c3f7fdcc5b03679b20f72a26d966aa646af771f3165c882067e85a3887647f028 - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-spread@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/f9fd247b3fa8953416c8808c124c3a5db5cd697abbf791aae0143a0587fff6b386045f94c62bcd1b6783a1fd275629cc194f25f6c0aafc9f05f12a56fd5f94bf - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-spread@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/76e2c8544129d727d5a698e2a67d74e438bc35df843adb5f769316ec432c5e1bbb4128123a95b2fe8ef0aec7b26d87efe81d64326291c77ad757ff184d38448a - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/63b2c575e3e7f96c32d52ed45ee098fb7d354b35c2223b8c8e76840b32cc529ee0c0ceb5742fd082e56e91e3d82842a367ce177e82b05039af3d602c9627a729 - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3b9a99ae043ef363c81bfb097fa7a553fcf7c7d9fddc13dd2b47b3b2e45cf2741a9ca78cfe55f463983b043b365f0f8452f2d5eaadbdea20e6d6de50c16bed25 - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-template-literals@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/27e9bb030654cb425381c69754be4abe6a7c75b45cd7f962cd8d604b841b2f0fb7b024f2efc1c25cc53f5b16d79d5e8cfc47cacbdaa983895b3aeefa3e7e24ff - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-template-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ecf05a8511176d5570cb0d481577a407a4e8a9a430f86522d809e0ac2c823913e854ef9e2a1c83c0bd7c12489d82e1b48fabb52e697e80d6a6962125197593ca + checksum: 10/d8d4f04a47cfc1a6103ecee8604750ba2184cd947ee1696cdc363639f0d4a3848839e20f0ca63511af9ad6742f7dd813cca5b2640353f7b0816bbc17ff0e9e88 languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.22.5" +"@babel/plugin-transform-shorthand-properties@npm:^7.22.5, @babel/plugin-transform-shorthand-properties@npm:^7.23.3, @babel/plugin-transform-shorthand-properties@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-shorthand-properties@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/82a53a63ffc3010b689ca9a54e5f53b2718b9f4b4a9818f36f9b7dba234f38a01876680553d2716a645a61920b5e6e4aaf8d4a0064add379b27ca0b403049512 + checksum: 10/f774995d58d4e3a992b732cf3a9b8823552d471040e280264dd15e0735433d51b468fef04d75853d061309389c66bda10ce1b298297ce83999220eb0ad62741d languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.23.3": - version: 7.24.8 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.8" +"@babel/plugin-transform-spread@npm:^7.22.5, @babel/plugin-transform-spread@npm:^7.23.3, @babel/plugin-transform-spread@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-spread@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5f113fed94b694ec4a40a27b8628ce736cfa172b69fcffa2833c9a41895032127f3daeea552e94fdb4a3ce4e8cd51de67a670ab87a1f447a0cf55c9cb2d7ed11 + checksum: 10/fe72c6545267176cdc9b6f32f30f9ced37c1cafa1290e4436b83b8f377b4f1c175dad404228c96e3efdec75da692f15bfb9db2108fcd9ad260bc9968778ee41e languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.22.11": - version: 7.22.11 - resolution: "@babel/plugin-transform-typescript@npm:7.22.11" +"@babel/plugin-transform-sticky-regex@npm:^7.22.5, @babel/plugin-transform-sticky-regex@npm:^7.23.3, @babel/plugin-transform-sticky-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-sticky-regex@npm:7.25.9" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.22.11" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-typescript": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/4404bf514cc9d24602e0a15cef699d29645d92d1b4359d70a1037c6b88fa201c6042c79f06e5f3519250b2856621b278da7af1fcbf5b2aada9373de67e688970 + checksum: 10/7454b00844dbe924030dd15e2b3615b36e196500c4c47e98dabc6b37a054c5b1038ecd437e910aabf0e43bf56b973cb148d3437d50f6e2332d8309568e3e979b languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.22.10, @babel/plugin-transform-unicode-escapes@npm:^7.22.5": - version: 7.22.10 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.10" +"@babel/plugin-transform-template-literals@npm:^7.22.5, @babel/plugin-transform-template-literals@npm:^7.23.3, @babel/plugin-transform-template-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-template-literals@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/807f40ed1324c8cb107c45358f1903384ca3f0ef1d01c5a3c5c9b271c8d8eec66936a3dcc8d75ddfceea9421420368c2e77ae3adef0a50557e778dfe296bf382 + checksum: 10/92eb1d6e2d95bd24abbb74fa7640d02b66ff6214e0bb616d7fda298a7821ce15132a4265d576a3502a347a3c9e94b6c69ed265bb0784664592fa076785a3d16a languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.7" +"@babel/plugin-transform-typeof-symbol@npm:^7.22.5, @babel/plugin-transform-typeof-symbol@npm:^7.23.3, @babel/plugin-transform-typeof-symbol@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6b8bca3495acedc89e880942de7b83c263fb5b4c9599594dcf3923e2128ae25f1f4725a295fe101027f75d8ef081ef28319296adf274b5022e57039e42836103 + checksum: 10/3ae240358f0b0cd59f8610d6c59d395c216fd1bab407f7de58b86d592f030fb42b4d18e2456a29bee4a2ff014c4c1e3404c8ae64462b1155d1c053b2f9d73438 languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.22.5" +"@babel/plugin-transform-typescript@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-typescript@npm:7.25.9" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/plugin-syntax-typescript": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/2495e5f663cb388e3d888b4ba3df419ac436a5012144ac170b622ddfc221f9ea9bdba839fa2bc0185cb776b578030666406452ec7791cbf0e7a3d4c88ae9574c + checksum: 10/91e2ec805f89a813e0bf9cf42dffb767f798429e983af3e2f919885a2826b10f29223dd8b40ccc569eb61858d3273620e82e14431603a893e4a7f9b4c1a3a3cf languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.7" +"@babel/plugin-transform-unicode-escapes@npm:^7.22.5, @babel/plugin-transform-unicode-escapes@npm:^7.23.3, @babel/plugin-transform-unicode-escapes@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.25.9" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/c0c284bbbdead7e17e059d72e1b288f86b0baacc410398ef6c6c703fe4326b069e68515ccb84359601315cd8e888f9226731d00624b7c6959b1c0853f072b61f + checksum: 10/f138cbee539963fb3da13f684e6f33c9f7495220369ae12a682b358f1e25ac68936825562c38eae87f01ac9992b2129208b35ec18533567fc805ce5ed0ffd775 languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.22.5" +"@babel/plugin-transform-unicode-property-regex@npm:^7.22.5, @babel/plugin-transform-unicode-property-regex@npm:^7.23.3, @babel/plugin-transform-unicode-property-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.25.9" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6b5d1404c8c623b0ec9bd436c00d885a17d6a34f3f2597996343ddb9d94f6379705b21582dfd4cec2c47fd34068872e74ab6b9580116c0566b3f9447e2a7fa06 + checksum: 10/201f6f46c1beb399e79aa208b94c5d54412047511795ce1e790edcd189cef73752e6a099fdfc01b3ad12205f139ae344143b62f21f44bbe02338a95e8506a911 languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.7" +"@babel/plugin-transform-unicode-regex@npm:^7.22.5, @babel/plugin-transform-unicode-regex@npm:^7.23.3, @babel/plugin-transform-unicode-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.9" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/b545310d0d592d75566b9cd158f4b8951e34d07d839656789d179b39b3fd92b32bd387cdfaf33a93e636609f3bfb9bb03d41f3e43be598116c9c6c80cc3418c4 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-sets-regex@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.22.5" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.22.5" - "@babel/helper-plugin-utils": "npm:^7.22.5" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/c042070f980b139547f8b0179efbc049ac5930abec7fc26ed7a41d89a048d8ab17d362200e204b6f71c3c20d6991a0e74415e1a412a49adc8131c2a40c04822e + checksum: 10/e8baae867526e179467c6ef5280d70390fa7388f8763a19a27c21302dd59b121032568be080749514b097097ceb9af716bf4b90638f1b3cf689aa837ba20150f languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.23.3": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.7" +"@babel/plugin-transform-unicode-sets-regex@npm:^7.22.5, @babel/plugin-transform-unicode-sets-regex@npm:^7.23.3, @babel/plugin-transform-unicode-sets-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.9" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/183b72d5987dc93f9971667ce3f26d28b0e1058e71b129733dd9d5282aecba4c062b67c9567526780d2defd2bfbf950ca58d8306dc90b2761fd1e960d867ddb7 + checksum: 10/4445ef20de687cb4dcc95169742a8d9013d680aa5eee9186d8e25875bbfa7ee5e2de26a91177ccf70b1db518e36886abcd44750d28db5d7a9539f0efa6839f4b languageName: node linkType: hard @@ -5325,92 +3721,81 @@ __metadata: linkType: hard "@babel/preset-env@npm:^7.11.0, @babel/preset-env@npm:^7.12.1, @babel/preset-env@npm:^7.16.4": - version: 7.22.10 - resolution: "@babel/preset-env@npm:7.22.10" - dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-compilation-targets": "npm:^7.22.10" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.22.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.22.5" + version: 7.26.0 + resolution: "@babel/preset-env@npm:7.26.0" + dependencies: + "@babel/compat-data": "npm:^7.26.0" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.25.9" + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.25.9" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.25.9" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.25.9" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.25.9" "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.22.5" - "@babel/plugin-syntax-import-attributes": "npm:^7.22.5" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" + "@babel/plugin-syntax-import-assertions": "npm:^7.26.0" + "@babel/plugin-syntax-import-attributes": "npm:^7.26.0" "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.22.5" - "@babel/plugin-transform-async-generator-functions": "npm:^7.22.10" - "@babel/plugin-transform-async-to-generator": "npm:^7.22.5" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.22.5" - "@babel/plugin-transform-block-scoping": "npm:^7.22.10" - "@babel/plugin-transform-class-properties": "npm:^7.22.5" - "@babel/plugin-transform-class-static-block": "npm:^7.22.5" - "@babel/plugin-transform-classes": "npm:^7.22.6" - "@babel/plugin-transform-computed-properties": "npm:^7.22.5" - "@babel/plugin-transform-destructuring": "npm:^7.22.10" - "@babel/plugin-transform-dotall-regex": "npm:^7.22.5" - "@babel/plugin-transform-duplicate-keys": "npm:^7.22.5" - "@babel/plugin-transform-dynamic-import": "npm:^7.22.5" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.22.5" - "@babel/plugin-transform-export-namespace-from": "npm:^7.22.5" - "@babel/plugin-transform-for-of": "npm:^7.22.5" - "@babel/plugin-transform-function-name": "npm:^7.22.5" - "@babel/plugin-transform-json-strings": "npm:^7.22.5" - "@babel/plugin-transform-literals": "npm:^7.22.5" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.22.5" - "@babel/plugin-transform-member-expression-literals": "npm:^7.22.5" - "@babel/plugin-transform-modules-amd": "npm:^7.22.5" - "@babel/plugin-transform-modules-commonjs": "npm:^7.22.5" - "@babel/plugin-transform-modules-systemjs": "npm:^7.22.5" - "@babel/plugin-transform-modules-umd": "npm:^7.22.5" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.22.5" - "@babel/plugin-transform-new-target": "npm:^7.22.5" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.22.5" - "@babel/plugin-transform-numeric-separator": "npm:^7.22.5" - "@babel/plugin-transform-object-rest-spread": "npm:^7.22.5" - "@babel/plugin-transform-object-super": "npm:^7.22.5" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.22.5" - "@babel/plugin-transform-optional-chaining": "npm:^7.22.10" - "@babel/plugin-transform-parameters": "npm:^7.22.5" - "@babel/plugin-transform-private-methods": "npm:^7.22.5" - "@babel/plugin-transform-private-property-in-object": "npm:^7.22.5" - "@babel/plugin-transform-property-literals": "npm:^7.22.5" - "@babel/plugin-transform-regenerator": "npm:^7.22.10" - "@babel/plugin-transform-reserved-words": "npm:^7.22.5" - "@babel/plugin-transform-shorthand-properties": "npm:^7.22.5" - "@babel/plugin-transform-spread": "npm:^7.22.5" - "@babel/plugin-transform-sticky-regex": "npm:^7.22.5" - "@babel/plugin-transform-template-literals": "npm:^7.22.5" - "@babel/plugin-transform-typeof-symbol": "npm:^7.22.5" - "@babel/plugin-transform-unicode-escapes": "npm:^7.22.10" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.22.5" - "@babel/plugin-transform-unicode-regex": "npm:^7.22.5" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.22.5" + "@babel/plugin-transform-arrow-functions": "npm:^7.25.9" + "@babel/plugin-transform-async-generator-functions": "npm:^7.25.9" + "@babel/plugin-transform-async-to-generator": "npm:^7.25.9" + "@babel/plugin-transform-block-scoped-functions": "npm:^7.25.9" + "@babel/plugin-transform-block-scoping": "npm:^7.25.9" + "@babel/plugin-transform-class-properties": "npm:^7.25.9" + "@babel/plugin-transform-class-static-block": "npm:^7.26.0" + "@babel/plugin-transform-classes": "npm:^7.25.9" + "@babel/plugin-transform-computed-properties": "npm:^7.25.9" + "@babel/plugin-transform-destructuring": "npm:^7.25.9" + "@babel/plugin-transform-dotall-regex": "npm:^7.25.9" + "@babel/plugin-transform-duplicate-keys": "npm:^7.25.9" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.25.9" + "@babel/plugin-transform-dynamic-import": "npm:^7.25.9" + "@babel/plugin-transform-exponentiation-operator": "npm:^7.25.9" + "@babel/plugin-transform-export-namespace-from": "npm:^7.25.9" + "@babel/plugin-transform-for-of": "npm:^7.25.9" + "@babel/plugin-transform-function-name": "npm:^7.25.9" + "@babel/plugin-transform-json-strings": "npm:^7.25.9" + "@babel/plugin-transform-literals": "npm:^7.25.9" + "@babel/plugin-transform-logical-assignment-operators": "npm:^7.25.9" + "@babel/plugin-transform-member-expression-literals": "npm:^7.25.9" + "@babel/plugin-transform-modules-amd": "npm:^7.25.9" + "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" + "@babel/plugin-transform-modules-systemjs": "npm:^7.25.9" + "@babel/plugin-transform-modules-umd": "npm:^7.25.9" + "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.25.9" + "@babel/plugin-transform-new-target": "npm:^7.25.9" + "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.25.9" + "@babel/plugin-transform-numeric-separator": "npm:^7.25.9" + "@babel/plugin-transform-object-rest-spread": "npm:^7.25.9" + "@babel/plugin-transform-object-super": "npm:^7.25.9" + "@babel/plugin-transform-optional-catch-binding": "npm:^7.25.9" + "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" + "@babel/plugin-transform-parameters": "npm:^7.25.9" + "@babel/plugin-transform-private-methods": "npm:^7.25.9" + "@babel/plugin-transform-private-property-in-object": "npm:^7.25.9" + "@babel/plugin-transform-property-literals": "npm:^7.25.9" + "@babel/plugin-transform-regenerator": "npm:^7.25.9" + "@babel/plugin-transform-regexp-modifiers": "npm:^7.26.0" + "@babel/plugin-transform-reserved-words": "npm:^7.25.9" + "@babel/plugin-transform-shorthand-properties": "npm:^7.25.9" + "@babel/plugin-transform-spread": "npm:^7.25.9" + "@babel/plugin-transform-sticky-regex": "npm:^7.25.9" + "@babel/plugin-transform-template-literals": "npm:^7.25.9" + "@babel/plugin-transform-typeof-symbol": "npm:^7.25.9" + "@babel/plugin-transform-unicode-escapes": "npm:^7.25.9" + "@babel/plugin-transform-unicode-property-regex": "npm:^7.25.9" + "@babel/plugin-transform-unicode-regex": "npm:^7.25.9" + "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.9" "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - "@babel/types": "npm:^7.22.10" - babel-plugin-polyfill-corejs2: "npm:^0.4.5" - babel-plugin-polyfill-corejs3: "npm:^0.8.3" - babel-plugin-polyfill-regenerator: "npm:^0.5.2" - core-js-compat: "npm:^3.31.0" + babel-plugin-polyfill-corejs2: "npm:^0.4.10" + babel-plugin-polyfill-corejs3: "npm:^0.10.6" + babel-plugin-polyfill-regenerator: "npm:^0.6.1" + core-js-compat: "npm:^3.38.1" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/887cc41e6df54342ffb41b42248f584b2f220e653fc70c683e3d7cc1aa6964b9694d7d6846694647e681f440cd7f2e4454c8a9ee5bce3f523c2e22a99278f2fd + checksum: 10/a7a80314f845deea713985a6316361c476621c76cfe5c6c28e8b9558f01634b49bbfdd3581ef94b5d6cff5c2b8830468aa53a73f5b5c1224db2dfea5db7e676f languageName: node linkType: hard @@ -5428,8 +3813,8 @@ __metadata: linkType: hard "@babel/preset-modules@npm:^0.1.5": - version: 0.1.5 - resolution: "@babel/preset-modules@npm:0.1.5" + version: 0.1.6 + resolution: "@babel/preset-modules@npm:0.1.6" dependencies: "@babel/helper-plugin-utils": "npm:^7.0.0" "@babel/plugin-proposal-unicode-property-regex": "npm:^7.4.4" @@ -5437,50 +3822,43 @@ __metadata: "@babel/types": "npm:^7.4.4" esutils: "npm:^2.0.2" peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/41583c17748890ad4950ae90ae38bd3f9d56268adc6c3d755839000a72963bda0db448296e4e74069a63567ae5f71f42d4a6dd1672386124bf0897f77c411870 + "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 + checksum: 10/339f1e3bbe28439a8b2c70b66505345df6171b42b5842fa28aa47b710176273feeead2f919085fd2cd4dd20628a573bca5e929f0fad48f6cb42df7ce5f05dd1c languageName: node linkType: hard "@babel/preset-react@npm:^7.12.5, @babel/preset-react@npm:^7.16.0": - version: 7.22.5 - resolution: "@babel/preset-react@npm:7.22.5" + version: 7.25.9 + resolution: "@babel/preset-react@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-transform-react-display-name": "npm:^7.22.5" - "@babel/plugin-transform-react-jsx": "npm:^7.22.5" - "@babel/plugin-transform-react-jsx-development": "npm:^7.22.5" - "@babel/plugin-transform-react-pure-annotations": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-transform-react-display-name": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx-development": "npm:^7.25.9" + "@babel/plugin-transform-react-pure-annotations": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/7c78b1bca3f2de9cb863b50cf0a5378d5e80b1b2e7573b9daabf09c0517d197aa7ff7fcd7daeb4a51e148743ab5dbd24c7b34422c86a256baf0e10e13400fe98 + checksum: 10/3c9daf47cf51568d96984d21b9f83992590c0e91f16a333f999100bb3c2c200730cde6806ed37fd2c999e0a63becefc881740b8f765b5a4aff4efc674e3e4197 languageName: node linkType: hard "@babel/preset-typescript@npm:^7.16.0": - version: 7.22.11 - resolution: "@babel/preset-typescript@npm:7.22.11" + version: 7.26.0 + resolution: "@babel/preset-typescript@npm:7.26.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/helper-validator-option": "npm:^7.22.5" - "@babel/plugin-syntax-jsx": "npm:^7.22.5" - "@babel/plugin-transform-modules-commonjs": "npm:^7.22.11" - "@babel/plugin-transform-typescript": "npm:^7.22.11" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-syntax-jsx": "npm:^7.25.9" + "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" + "@babel/plugin-transform-typescript": "npm:^7.25.9" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/b5da0fb7dbaf191bc32dae0eba4d89c8999e53ab22055c762f97fff5172c97c7ff784353abcc7145d611773da5e36b7cd491f6e0ef7fa82dcb2315b74be4ad0a - languageName: node - linkType: hard - -"@babel/regjsgen@npm:^0.8.0": - version: 0.8.0 - resolution: "@babel/regjsgen@npm:0.8.0" - checksum: 10/c57fb730b17332b7572574b74364a77d70faa302a281a62819476fa3b09822974fd75af77aea603ad77378395be64e81f89f0e800bf86cbbf21652d49ce12ee8 + checksum: 10/81a60826160163a3daae017709f42147744757b725b50c9024ef3ee5a402ee45fd2e93eaecdaaa22c81be91f7940916249cfb7711366431cfcacc69c95878c03 languageName: node linkType: hard -"@babel/runtime@npm:7.22.6, @babel/runtime@npm:^7.6.3, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:7.22.6": version: 7.22.6 resolution: "@babel/runtime@npm:7.22.6" dependencies: @@ -5498,57 +3876,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": - version: 7.23.2 - resolution: "@babel/runtime@npm:7.23.2" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/abdcbdd590c7e31762e1bdab94dd466823c8bcedd3ff2fde85eeb94dac7cccaef151ac37c428bda7018ededd27c9a82b4dfeb621f978ad934232475a902f8e3a - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/runtime@npm:7.23.9" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/9a520fe1bf72249f7dd60ff726434251858de15cccfca7aa831bd19d0d3fb17702e116ead82724659b8da3844977e5e13de2bae01eb8a798f2823a669f122be6 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.25.6": - version: 7.25.6 - resolution: "@babel/runtime@npm:7.25.6" +"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.25.6, @babel/runtime@npm:^7.26.0, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.3, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": + version: 7.26.0 + resolution: "@babel/runtime@npm:7.26.0" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/0c4134734deb20e1005ffb9165bf342e1074576621b246d8e5e41cc7cb315a885b7d98950fbf5c63619a2990a56ae82f444d35fe8c4691a0b70c2fe5673667dc - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.4.4": - version: 7.22.10 - resolution: "@babel/runtime@npm:7.22.10" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/88bba6dfdfd6f6e9365199397146a0dd5d04409e7142a0df95125a198eb76c83fd0a52c117aba50f9a61db2f0186780574c071ea48010e5ffa1f157585c8c950 - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.7.6": - version: 7.25.7 - resolution: "@babel/runtime@npm:7.25.7" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10/73411fe0f1bff3a962586cef05b30f49e554b6563767e6d84f7d79d605b2c20e7fc3df291a3aebef69043181a8f893afdab9e6672557a5c2d08b9377d6f678cd - languageName: node - linkType: hard - -"@babel/runtime@npm:^7.8.4": - version: 7.17.2 - resolution: "@babel/runtime@npm:7.17.2" - dependencies: - regenerator-runtime: "npm:^0.13.4" - checksum: 10/a59e74f2a5cb4c788145a43e488b735e7cd583bb97fabe52eebbc34a3c4687182647468b2567152cd69927631ffb45f013db9bb04f057c5410f18cf521335140 + checksum: 10/9f4ea1c1d566c497c052d505587554e782e021e6ccd302c2ad7ae8291c8e16e3f19d4a7726fb64469e057779ea2081c28b7dbefec6d813a22f08a35712c0f699 languageName: node linkType: hard @@ -5564,7 +3897,7 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:7.22.5, @babel/template@npm:^7.22.5": +"@babel/template@npm:7.22.5": version: 7.22.5 resolution: "@babel/template@npm:7.22.5" dependencies: @@ -5575,87 +3908,29 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.16.7, @babel/template@npm:^7.3.3": - version: 7.16.7 - resolution: "@babel/template@npm:7.16.7" - dependencies: - "@babel/code-frame": "npm:^7.16.7" - "@babel/parser": "npm:^7.16.7" - "@babel/types": "npm:^7.16.7" - checksum: 10/f35836a8cd53663508bc5e0b13e7fe3d646197fc1baa74c21d3a713c0c91d39fe6f6c5be8ec1ec139b3d0a00443ab1b8cc7ddf88c6ceb6f9fcf7ea0ae7594eca - languageName: node - linkType: hard - -"@babel/template@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/template@npm:7.18.6" - dependencies: - "@babel/code-frame": "npm:^7.18.6" - "@babel/parser": "npm:^7.18.6" - "@babel/types": "npm:^7.18.6" - checksum: 10/6b57edbe71168d82e05198d03e7be2e234c6f438789f26d09e3b05f010faf5cc51c352c99e09aa8e915ac4b084b1f7609a21617b4a9304baab857edeea456128 - languageName: node - linkType: hard - -"@babel/template@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/template@npm:7.22.15" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/parser": "npm:^7.22.15" - "@babel/types": "npm:^7.22.15" - checksum: 10/21e768e4eed4d1da2ce5d30aa51db0f4d6d8700bc1821fec6292587df7bba2fe1a96451230de8c64b989740731888ebf1141138bfffb14cacccf4d05c66ad93f - languageName: node - linkType: hard - -"@babel/template@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/template@npm:7.23.9" - dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/parser": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - checksum: 10/1b011ba9354dc2e646561d54b6862e0df51760e6179faadd79be05825b0b6da04911e4e192df943f1766748da3037fd8493615b38707f7cadb0cf0c96601c170 - languageName: node - linkType: hard - -"@babel/template@npm:^7.24.0, @babel/template@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/template@npm:7.24.7" - dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/parser": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/5975d404ef51cf379515eb0f80b115981d0b9dff5539e53a47516644abb8c83d7559f5b083eb1d4977b20d8359ebb2f911ccd4f729143f8958fdc465f976d843 - languageName: node - linkType: hard - -"@babel/template@npm:^7.4.0": - version: 7.25.0 - resolution: "@babel/template@npm:7.25.0" +"@babel/template@npm:^7.22.5, @babel/template@npm:^7.23.9, @babel/template@npm:^7.24.0, @babel/template@npm:^7.25.9, @babel/template@npm:^7.3.3, @babel/template@npm:^7.4.0": + version: 7.25.9 + resolution: "@babel/template@npm:7.25.9" dependencies: - "@babel/code-frame": "npm:^7.24.7" - "@babel/parser": "npm:^7.25.0" - "@babel/types": "npm:^7.25.0" - checksum: 10/07ebecf6db8b28244b7397628e09c99e7a317b959b926d90455c7253c88df3677a5a32d1501d9749fe292a263ff51a4b6b5385bcabd5dadd3a48036f4d4949e0 + "@babel/code-frame": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/e861180881507210150c1335ad94aff80fd9e9be6202e1efa752059c93224e2d5310186ddcdd4c0f0b0fc658ce48cb47823f15142b5c00c8456dde54f5de80b2 languageName: node linkType: hard "@babel/traverse@npm:>=7.23.2": - version: 7.23.2 - resolution: "@babel/traverse@npm:7.23.2" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.0" - "@babel/types": "npm:^7.23.0" - debug: "npm:^4.1.0" + version: 7.25.9 + resolution: "@babel/traverse@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/generator": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10/e4fcb8f8395804956df4ae1301230a14b6eb35b74a7058a0e0b40f6f4be7281e619e6dafe400e833d4512da5d61cf17ea177d04b00a8f7cf3d8d69aff83ca3d8 + checksum: 10/7431614d76d4a053e429208db82f2846a415833f3d9eb2e11ef72eeb3c64dfd71f4a4d983de1a4a047b36165a1f5a64de8ca2a417534cc472005c740ffcb9c6a languageName: node linkType: hard @@ -5681,7 +3956,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:7.24.7, @babel/types@npm:^7.18.2": +"@babel/types@npm:7.24.7": version: 7.24.7 resolution: "@babel/types@npm:7.24.7" dependencies: @@ -5692,122 +3967,20 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": - version: 7.17.0 - resolution: "@babel/types@npm:7.17.0" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.18.2, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.0, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.26.0 + resolution: "@babel/types@npm:7.26.0" dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/535ccef360d0c74e2bb685050f3a45e6ab30f66c740bbdd0858148ed502043f1ae2006a9d0269ac3b7356b690091ae313efd912e408bc0198d80a14b2a6f1537 - languageName: node - linkType: hard - -"@babel/types@npm:^7.12.6, @babel/types@npm:^7.22.11, @babel/types@npm:^7.22.19, @babel/types@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/types@npm:7.23.0" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 10/ca5b896a26c91c5672254725c4c892a35567d2122afc47bd5331d1611a7f9230c19fc9ef591a5a6f80bf0d80737e104a9ac205c96447c74bee01d4319db58001 - languageName: node - linkType: hard - -"@babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/types@npm:7.18.9" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.18.6" - to-fast-properties: "npm:^2.0.0" - checksum: 10/a45958594383c7bf8050e550a0ec08f50485c218dbac1afae8583fccf5cf7893ce2861f6056a8f35c4bd024acdd2a69231b8493c78c41334ce083246ff8965db - languageName: node - linkType: hard - -"@babel/types@npm:^7.20.7": - version: 7.21.4 - resolution: "@babel/types@npm:7.21.4" - dependencies: - "@babel/helper-string-parser": "npm:^7.19.4" - "@babel/helper-validator-identifier": "npm:^7.19.1" - to-fast-properties: "npm:^2.0.0" - checksum: 10/3070d1e15ef263961d23766400badb60e2e87b0384cb259f824793ab37375e21e1a7e54952fea82d198b9e6195d99f7d690ebc9b46d8b14fd157d316aca502dc - languageName: node - linkType: hard - -"@babel/types@npm:^7.22.10": - version: 7.22.10 - resolution: "@babel/types@npm:7.22.10" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - to-fast-properties: "npm:^2.0.0" - checksum: 10/b11f8d13f3418276df654b5276443f95742484c3c83e74f90f92bff01315118507a082edf1e74903b284106447660c31e5f29678730f647fb25e766ce47c56f0 - languageName: node - linkType: hard - -"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.17": - version: 7.22.17 - resolution: "@babel/types@npm:7.22.17" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.15" - to-fast-properties: "npm:^2.0.0" - checksum: 10/fafeea0d9a4a887da78790189bda4bcb139713673fb47a75abf6d09ca3f2d370ff011fd2f4ba6d31ae841aae2dfb18b141d8722edeb274e6e9af8cd4325b264b - languageName: node - linkType: hard - -"@babel/types@npm:^7.22.5, @babel/types@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/types@npm:7.22.5" - dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" - "@babel/helper-validator-identifier": "npm:^7.22.5" - to-fast-properties: "npm:^2.0.0" - checksum: 10/7f7edffe7e13dbd26a182677575ca7451bc234ce43b93dc49d27325306748628019e7753e6b5619ae462ea0d7e5ce2c0cc24092d53b592642ea89542037748b5 - languageName: node - linkType: hard - -"@babel/types@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/types@npm:7.23.6" - dependencies: - "@babel/helper-string-parser": "npm:^7.23.4" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 10/07e70bb94d30b0231396b5e9a7726e6d9227a0a62e0a6830c0bd3232f33b024092e3d5a7d1b096a65bbf2bb43a9ab4c721bf618e115bfbb87b454fa060f88cbf - languageName: node - linkType: hard - -"@babel/types@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/types@npm:7.23.9" - dependencies: - "@babel/helper-string-parser": "npm:^7.23.4" - "@babel/helper-validator-identifier": "npm:^7.22.20" - to-fast-properties: "npm:^2.0.0" - checksum: 10/bed9634e5fd0f9dc63c84cfa83316c4cb617192db9fedfea464fca743affe93736d7bf2ebf418ee8358751a9d388e303af87a0c050cb5d87d5870c1b0154f6cb - languageName: node - linkType: hard - -"@babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/types@npm:7.24.8" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/29b080b2753c22ee5e2455ff767a971443245d945dea4d1b3130e036dcdf0949a89539a581753c68d03d2f2f2325244ee0f91fb83dabee1cbac5db5246838137 + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10/40780741ecec886ed9edae234b5eb4976968cc70d72b4e5a40d55f83ff2cc457de20f9b0f4fe9d858350e43dab0ea496e7ef62e2b2f08df699481a76df02cd6e languageName: node linkType: hard -"@babel/types@npm:^7.25.0, @babel/types@npm:^7.25.6, @babel/types@npm:^7.4.0": - version: 7.25.6 - resolution: "@babel/types@npm:7.25.6" - dependencies: - "@babel/helper-string-parser": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10/7b54665e1b51f525fe0f451efdd9fe7a4a6dfba3fd4956c3530bc77336b66ffe3d78c093796ed044119b5d213176af7cf326f317a2057c538d575c6cefcb3562 +"@balena/dockerignore@npm:^1.0.2": + version: 1.0.2 + resolution: "@balena/dockerignore@npm:1.0.2" + checksum: 10/13d654fdd725008577d32e721c720275bdc48f72bce612326363d5bed449febbed856c517a0b23c7c40d87cb531e63432804550b4ecc13e365d26fee38fb6c8a languageName: node linkType: hard @@ -5891,14 +4064,14 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protobuf@npm:1.10.0": +"@bufbuild/protobuf@npm:1.10.0, @bufbuild/protobuf@npm:^1.6.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": version: 1.10.0 resolution: "@bufbuild/protobuf@npm:1.10.0" checksum: 10/1f120f72bbb40dd3d0f8c73f1474b001cfb9be09c38b7b0292e35fec98c5184a3db380a6feff7626fb3fff108c8a8aa7fc8cfea14904dc0a1174a01c8e637cc6 languageName: node linkType: hard -"@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": +"@bufbuild/protobuf@npm:1.8.0": version: 1.8.0 resolution: "@bufbuild/protobuf@npm:1.8.0" checksum: 10/f91d60ff1609c023466500e99312d2e92ac09c163d615c315fa25d9e50f1e9b76a3a9cac776786a3dd5c5065bb7061bf29388587e2a1d27306f68ed98e57a892 @@ -5922,7 +4095,7 @@ __metadata: languageName: node linkType: hard -"@bufbuild/protoplugin@npm:1.8.0, @bufbuild/protoplugin@npm:^1.7.2": +"@bufbuild/protoplugin@npm:1.8.0": version: 1.8.0 resolution: "@bufbuild/protoplugin@npm:1.8.0" dependencies: @@ -5933,6 +4106,17 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protoplugin@npm:^1.6.0, @bufbuild/protoplugin@npm:^1.7.2": + version: 1.10.0 + resolution: "@bufbuild/protoplugin@npm:1.10.0" + dependencies: + "@bufbuild/protobuf": "npm:1.10.0" + "@typescript/vfs": "npm:^1.4.0" + typescript: "npm:4.5.2" + checksum: 10/829a6d64076a16d7a89e732be39f1988b52b8babee215d91a5f692e0e6ac3e2b58ea4012bd7707c3cef4b6952cfcc36076b646aa09ed68888aedb2fb004d659f + languageName: node + linkType: hard + "@chainsafe/as-sha256@npm:^0.3.1": version: 0.3.1 resolution: "@chainsafe/as-sha256@npm:0.3.1" @@ -6038,78 +4222,78 @@ __metadata: languageName: node linkType: hard -"@commitlint/config-validator@npm:^17.6.7": - version: 17.6.7 - resolution: "@commitlint/config-validator@npm:17.6.7" +"@commitlint/config-validator@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/config-validator@npm:17.8.1" dependencies: - "@commitlint/types": "npm:^17.4.4" + "@commitlint/types": "npm:^17.8.1" ajv: "npm:^8.11.0" - checksum: 10/e13e512ce9dc788f7ce1c84faf4d2e2d4d3b7c4dc18a7982ecbfc33faa5fe977793efdb868e228061d34ea8825cbbed5fc9e8e69fd5e4f0c0c08f60e21a9214e + checksum: 10/487051cc36a82ba50f217dfd26721f4fa26d8c4206ee5cb0debd2793aa950280f3ca5bd1a8738e9c71ca8508b58548918b43169c21219ca4cb67f5dcd1e49d9f languageName: node linkType: hard -"@commitlint/ensure@npm:^17.6.7": - version: 17.6.7 - resolution: "@commitlint/ensure@npm:17.6.7" +"@commitlint/ensure@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/ensure@npm:17.8.1" dependencies: - "@commitlint/types": "npm:^17.4.4" + "@commitlint/types": "npm:^17.8.1" lodash.camelcase: "npm:^4.3.0" lodash.kebabcase: "npm:^4.1.1" lodash.snakecase: "npm:^4.1.1" lodash.startcase: "npm:^4.4.0" lodash.upperfirst: "npm:^4.3.1" - checksum: 10/1ffdce807dbb303e8fa215511a965375abeea2702f64b4f1c4d7823f1e231cb343e82c97633d12d3c89b4f71d2eaf28169db08b4f1d3b052c26c942f4b9d9380 + checksum: 10/a4a5d3071df0e52dad0293c649c236f070c4fcd3380f11747a6f9b06b036adea281e557d117156e31313fbe18a7d71bf06e05e92776adbde7867190e1735bc43 languageName: node linkType: hard -"@commitlint/execute-rule@npm:^17.4.0": - version: 17.4.0 - resolution: "@commitlint/execute-rule@npm:17.4.0" - checksum: 10/17d8e56ab00bd45fdecb0ed33186d2020ce261250d6a516204b6509610b75af8c930e7226b1111af3de298db32a7e4d0ba2c9cc7ed67db5ba5159eeed634f067 +"@commitlint/execute-rule@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/execute-rule@npm:17.8.1" + checksum: 10/73354b5605931a71f727ee0262a5509277e92f134e2d704d44eafe4da7acb1cd2c7d084dcf8096cc0ac7ce83b023cc0ae8f79b17487b132ccc2e0b3920105a11 languageName: node linkType: hard "@commitlint/format@npm:^17.4.4": - version: 17.4.4 - resolution: "@commitlint/format@npm:17.4.4" + version: 17.8.1 + resolution: "@commitlint/format@npm:17.8.1" dependencies: - "@commitlint/types": "npm:^17.4.4" + "@commitlint/types": "npm:^17.8.1" chalk: "npm:^4.1.0" - checksum: 10/832d9641129f2da8d32389b4a47db59d41eb1adfab742723972cad64b833c4af9e253f96757b27664fedae61644dd4c01d21f775773b45b604bd7f93b23a27d2 + checksum: 10/0481e4d49196c942d7723a1abd352c3c884ceb9f434fb4e64bfab71bc264e9b7c643a81069f20d2a035fca70261a472508d73b1a60fe378c60534ca6301408b6 languageName: node linkType: hard -"@commitlint/is-ignored@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/is-ignored@npm:17.7.0" +"@commitlint/is-ignored@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/is-ignored@npm:17.8.1" dependencies: - "@commitlint/types": "npm:^17.4.4" + "@commitlint/types": "npm:^17.8.1" semver: "npm:7.5.4" - checksum: 10/aa0b695d6e7bee5e732f96a2ff383347ff476eb48f9d3b4ed75b098cafa27e56da15563833d3cf4e1268fc26819180cd8b5bdc322b087073a63bc94f699944b2 + checksum: 10/26eb2f1a84a774625f3f6fe4fa978c57d81028ee6a6925ab3fb02981ac395f9584ab4a71af59c3f2ac84a06c775e3f52683c033c565d86271a7aa99c2eb6025c languageName: node linkType: hard "@commitlint/lint@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/lint@npm:17.7.0" + version: 17.8.1 + resolution: "@commitlint/lint@npm:17.8.1" dependencies: - "@commitlint/is-ignored": "npm:^17.7.0" - "@commitlint/parse": "npm:^17.7.0" - "@commitlint/rules": "npm:^17.7.0" - "@commitlint/types": "npm:^17.4.4" - checksum: 10/922b644584a0e69e4d8fdde863b4d11d068d42cacaf7121f748041928aba5200154f16986ff512f83bef6f65855b0aff7c8e3e83457898614cc3ac5596e2a487 + "@commitlint/is-ignored": "npm:^17.8.1" + "@commitlint/parse": "npm:^17.8.1" + "@commitlint/rules": "npm:^17.8.1" + "@commitlint/types": "npm:^17.8.1" + checksum: 10/437ee2b060625c38f453bb8ff2474c455120bbfcfa78287e3111a992df792846e9ad5047ce138c2160d56f87b9ec378b69311c33bd5c972b8f433cc19a854df9 languageName: node linkType: hard "@commitlint/load@npm:^17.7.1": - version: 17.7.1 - resolution: "@commitlint/load@npm:17.7.1" - dependencies: - "@commitlint/config-validator": "npm:^17.6.7" - "@commitlint/execute-rule": "npm:^17.4.0" - "@commitlint/resolve-extends": "npm:^17.6.7" - "@commitlint/types": "npm:^17.4.4" - "@types/node": "npm:20.4.7" + version: 17.8.1 + resolution: "@commitlint/load@npm:17.8.1" + dependencies: + "@commitlint/config-validator": "npm:^17.8.1" + "@commitlint/execute-rule": "npm:^17.8.1" + "@commitlint/resolve-extends": "npm:^17.8.1" + "@commitlint/types": "npm:^17.8.1" + "@types/node": "npm:20.5.1" chalk: "npm:^4.1.0" cosmiconfig: "npm:^8.0.0" cosmiconfig-typescript-loader: "npm:^4.0.0" @@ -6118,91 +4302,104 @@ __metadata: lodash.uniq: "npm:^4.5.0" resolve-from: "npm:^5.0.0" ts-node: "npm:^10.8.1" - typescript: "npm:^4.6.4 || ^5.0.0" - checksum: 10/8d0e56b49a0e4dec7e8e28a2c6bc7ce985e6b8e10274aa20d0e3f6c2465fc9082d18f91bbe5c336594ebabcc4dc9668fdeaa039ef5bbfaf26ca0be423461ef61 + typescript: "npm:^4.6.4 || ^5.2.2" + checksum: 10/5a9a9f0d4621a4cc61c965c3adc88d04ccac40640b022bb3bbad70ed4435bb0c103647a2e29e37fc3d68021dae041c937bee611fe2e5461bebe997640f4f626b languageName: node linkType: hard -"@commitlint/message@npm:^17.4.2": - version: 17.4.2 - resolution: "@commitlint/message@npm:17.4.2" - checksum: 10/55b6cfeb57f7c9f913e18821aa4d972a6b6faa78c62741390996151f99554396f6df68ccfee86c163d24d8c27a4dbbcb50ef03c2972ab0a7a21d89daa2f9a519 +"@commitlint/message@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/message@npm:17.8.1" + checksum: 10/ee3ca9bf02828ea322becba47c67f7585aa3fd22b197eab69679961e67e3c7bdf56f6ef41cb3b831b521af7dabd305eb5d7ee053c8294531cc8ca64dbbff82fc languageName: node linkType: hard -"@commitlint/parse@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/parse@npm:17.7.0" +"@commitlint/parse@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/parse@npm:17.8.1" dependencies: - "@commitlint/types": "npm:^17.4.4" + "@commitlint/types": "npm:^17.8.1" conventional-changelog-angular: "npm:^6.0.0" conventional-commits-parser: "npm:^4.0.0" - checksum: 10/d70d53932576fa30c078099fe9ab00190298ed6aec696648633ab16eb80386e0c1b407c44eb7c548b598573c260ed1bfa890dd8134166d28811f66ed436efbea + checksum: 10/5322ae049b43a329761063b6e698714593d84d874147ced6290c8d88a9ebea2ba8c660a5815392a731377ac26fbf6b215bb9b87d84d8b49cb47fa1c62d228b24 languageName: node linkType: hard "@commitlint/read@npm:^17.5.1": - version: 17.5.1 - resolution: "@commitlint/read@npm:17.5.1" + version: 17.8.1 + resolution: "@commitlint/read@npm:17.8.1" dependencies: - "@commitlint/top-level": "npm:^17.4.0" - "@commitlint/types": "npm:^17.4.4" + "@commitlint/top-level": "npm:^17.8.1" + "@commitlint/types": "npm:^17.8.1" fs-extra: "npm:^11.0.0" git-raw-commits: "npm:^2.0.11" minimist: "npm:^1.2.6" - checksum: 10/62ee4f7a47b22a8571ae313bca36b418805a248f4986557f38f06317c44b6d18072889f95e7bc22bbb33a2f2b08236f74596ff28e3dbd0894249477a9df367c3 + checksum: 10/122f1842cb8b87b2c447383095420d077dcae6fbb4f871f8b05fa088f99d95d18a8c6675be2eb3e67bf7ff47a9990764261e3eebc5e474404f14e3379f48df42 languageName: node linkType: hard -"@commitlint/resolve-extends@npm:^17.6.7": - version: 17.6.7 - resolution: "@commitlint/resolve-extends@npm:17.6.7" +"@commitlint/resolve-extends@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/resolve-extends@npm:17.8.1" dependencies: - "@commitlint/config-validator": "npm:^17.6.7" - "@commitlint/types": "npm:^17.4.4" + "@commitlint/config-validator": "npm:^17.8.1" + "@commitlint/types": "npm:^17.8.1" import-fresh: "npm:^3.0.0" lodash.mergewith: "npm:^4.6.2" resolve-from: "npm:^5.0.0" resolve-global: "npm:^1.0.0" - checksum: 10/3717b4ccef6e46136f8d4a4b8d78d57184b4331401db07e27f89acb049a3903035bb2b0dbd4c07e3cdcc402cbe693b365c244a0da3df47e0f74cbf3ba76be9ec + checksum: 10/c6fb7d3f263b876ff805396abad27bc514b1a69dcc634903c28782f4f3932eddc37221daa3264a45a5b82d28aa17a57c7bab4830c6efae741cc875f137366608 languageName: node linkType: hard -"@commitlint/rules@npm:^17.7.0": - version: 17.7.0 - resolution: "@commitlint/rules@npm:17.7.0" +"@commitlint/rules@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/rules@npm:17.8.1" dependencies: - "@commitlint/ensure": "npm:^17.6.7" - "@commitlint/message": "npm:^17.4.2" - "@commitlint/to-lines": "npm:^17.4.0" - "@commitlint/types": "npm:^17.4.4" + "@commitlint/ensure": "npm:^17.8.1" + "@commitlint/message": "npm:^17.8.1" + "@commitlint/to-lines": "npm:^17.8.1" + "@commitlint/types": "npm:^17.8.1" execa: "npm:^5.0.0" - checksum: 10/bc6af55cb8fab82baac450f87e02fa51d91f44855aadced92d74d05f9af99ccfd90b08c67355b53ca6b4b45f386854bcf52e1a4e5bc003665f4873e785eb7c70 + checksum: 10/b284514a4b8dad6bcbbc91c7548d69d0bbe9fcbdb241c15f5f9da413e8577c19d11190f1d709b38487c49dc874359bd9d0b72ab39f91cce06191e4ddaf8ec84d languageName: node linkType: hard -"@commitlint/to-lines@npm:^17.4.0": - version: 17.4.0 - resolution: "@commitlint/to-lines@npm:17.4.0" - checksum: 10/841f90f606238e145ab4ba02940662d511fc04fe553619900152a8542170fe664031b95d820ffaeb8864d4851344278e662ef29637d763fc19fd828e0f8d139b +"@commitlint/to-lines@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/to-lines@npm:17.8.1" + checksum: 10/ff175c202c89537301f32b6e13ebe6919ac782a6e109cb5f6136566d71555a54f6574caf4d674d3409d32fdea1b4a28518837632ca05c7557d4f18f339574e62 languageName: node linkType: hard -"@commitlint/top-level@npm:^17.4.0": - version: 17.4.0 - resolution: "@commitlint/top-level@npm:17.4.0" +"@commitlint/top-level@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/top-level@npm:17.8.1" dependencies: find-up: "npm:^5.0.0" - checksum: 10/14cd77e982d2dd7989718dafdbf7a2168a5fb387005e0686c2dfa9ffc36bb9a749e5d80a151884459e4d8c88564339688dca26e9c711abe043beeb3f30c3dfd6 + checksum: 10/25c8a6f4026c705a5ad4d9358eae7558734f549623da1c5f44cba8d6bc495f20d3ad05418febb8dca4f6b63f40bf44763007a14ab7209c435566843be114e7fc languageName: node linkType: hard -"@commitlint/types@npm:^17.4.4": - version: 17.4.4 - resolution: "@commitlint/types@npm:17.4.4" +"@commitlint/types@npm:^17.4.4, @commitlint/types@npm:^17.8.1": + version: 17.8.1 + resolution: "@commitlint/types@npm:17.8.1" dependencies: chalk: "npm:^4.1.0" - checksum: 10/03c52429052d161710896d198000196bd2e60be0fd71459b22133dd83dee43e8d05ea8ee703c8369823bc40f77a54881b80d8aa4368ac52aea7f30fb234b73d2 + checksum: 10/a4cfa8c417aa0209694b96da04330282e41150caae1e1d0cec596ea34e3ce15afb84b3263abe5b89758ec1f3f71a9de0ee2d593df66db17b283127dd5e7cd6ac + languageName: node + linkType: hard + +"@connectrpc/connect-express@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/connect-express@npm:1.3.0" + dependencies: + "@types/express": "npm:^4.17.18" + peerDependencies: + "@bufbuild/protobuf": ^1.4.2 + "@connectrpc/connect": 1.3.0 + "@connectrpc/connect-node": 1.3.0 + checksum: 10/581495391477e2b8a2738bdc34dbf45a245d26cb4943a5b3d1813d80ae4f11d85e0d0f01d95e408e7b1cb7812a873218428d6b0cde9fc643747f06e8b7205627 languageName: node linkType: hard @@ -6231,6 +4428,18 @@ __metadata: languageName: node linkType: hard +"@connectrpc/connect-node@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/connect-node@npm:1.3.0" + dependencies: + undici: "npm:^5.28.2" + peerDependencies: + "@bufbuild/protobuf": ^1.4.2 + "@connectrpc/connect": 1.3.0 + checksum: 10/34b4903220881b39128bc31c79a0a006cb44c7cb9074fd0d77e853ff016f51c2a131811421c971c01210d4329068026c278cf64d349f2eb38126d0604710816a + languageName: node + linkType: hard + "@connectrpc/connect-node@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect-node@npm:1.4.0" @@ -6253,6 +4462,15 @@ __metadata: languageName: node linkType: hard +"@connectrpc/connect@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/connect@npm:1.3.0" + peerDependencies: + "@bufbuild/protobuf": ^1.4.2 + checksum: 10/7707d97ee6e4a83cc03371b1da1709c103f0338e85b2fbf49813053d96114818d34831b1c11715cc9badcc3ce5d4c9fbc423af4b6a8efa953bf0ef76cdc6e50d + languageName: node + linkType: hard + "@connectrpc/connect@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/connect@npm:1.4.0" @@ -6262,6 +4480,26 @@ __metadata: languageName: node linkType: hard +"@connectrpc/protoc-gen-connect-es@npm:1.3.0": + version: 1.3.0 + resolution: "@connectrpc/protoc-gen-connect-es@npm:1.3.0" + dependencies: + "@bufbuild/protobuf": "npm:^1.6.0" + "@bufbuild/protoplugin": "npm:^1.6.0" + peerDependencies: + "@bufbuild/protoc-gen-es": ^1.6.0 + "@connectrpc/connect": 1.3.0 + peerDependenciesMeta: + "@bufbuild/protoc-gen-es": + optional: true + "@connectrpc/connect": + optional: true + bin: + protoc-gen-connect-es: bin/protoc-gen-connect-es + checksum: 10/23a17bef378ac2fa414fb35fe50a7630134946a086f75f9201c5d0c3631f32e61445628b0420eac7353e88193e170059969bc83bad96a9f43cb98db30243aa1c + languageName: node + linkType: hard + "@connectrpc/protoc-gen-connect-es@npm:1.4.0": version: 1.4.0 resolution: "@connectrpc/protoc-gen-connect-es@npm:1.4.0" @@ -6382,107 +4620,107 @@ __metadata: linkType: hard "@cspell/dict-ada@npm:^4.0.2": - version: 4.0.2 - resolution: "@cspell/dict-ada@npm:4.0.2" - checksum: 10/31b0f0f6b9b324e8d3be4074302ddc9a7e968833d79c0a9f7899de9138b386bd6dcad3f63afdb1d42e87838bba5881c7b7f2b0916621fb1e64c7fdb6a572afe5 + version: 4.0.5 + resolution: "@cspell/dict-ada@npm:4.0.5" + checksum: 10/fbcbbd734464c86209e25775bec0674c8f81f9d0472aac637336ed92d4a45b84a03b229bb87de027c8d96333e702842568b84d1fc016b67855c3bfe836cebbb7 languageName: node linkType: hard "@cspell/dict-aws@npm:^4.0.2": - version: 4.0.2 - resolution: "@cspell/dict-aws@npm:4.0.2" - checksum: 10/7f784f0a054f4d142a22e94d411d6383b5bbba8b1d77952d45664a3bf35626926a0b8057293663287e6c53655c7dd32c6348905ecceb2970056e1cc5cf962e11 + version: 4.0.7 + resolution: "@cspell/dict-aws@npm:4.0.7" + checksum: 10/db675ae4dc2e6e27f8e5ea3e4c1383ab9ad3d8db8ab7b51c33b0632aea308c35b02b80412c2b834fbc0c43f9c4e18fec83b9191c1cea4dfc666edf46fb6dd15d languageName: node linkType: hard "@cspell/dict-bash@npm:^4.1.3": - version: 4.1.3 - resolution: "@cspell/dict-bash@npm:4.1.3" - checksum: 10/4ba66c76c144d4c7ea1dd0fb92dfb0d7fd1e43a106a73fc7e9010b4a5c276aa4ef791c7161f56bf911356e3667ba043ee63271c1ffc485d9f8712553770e3ea9 + version: 4.1.8 + resolution: "@cspell/dict-bash@npm:4.1.8" + checksum: 10/754c91dbf74f01859a790b8690bf92cc7e633e9d40234f8a7185c12356d54b67d86e0a269c1f4aa6ae0d73462371882245395e6442e759d14b51838035b0ada7 languageName: node linkType: hard "@cspell/dict-companies@npm:^3.1.2": - version: 3.1.2 - resolution: "@cspell/dict-companies@npm:3.1.2" - checksum: 10/58a95faba7cf7397530064ab9fc29aea0b5a95c5d4c31abd2abd0537f344705c71112a50ae61a1c026078dd1ca2e4433164eee1761cd05bfae4b25a75161ba4f + version: 3.1.7 + resolution: "@cspell/dict-companies@npm:3.1.7" + checksum: 10/921a66f9ea71334bae1ab6dee083d291fdb8474c818c2ebe4eae94372d5cb12f3f2ca0e430d5203fc2c13a219522badb13d3cc89d28d8a68c8de664ee1be5054 languageName: node linkType: hard "@cspell/dict-cpp@npm:^5.1.10": - version: 5.1.19 - resolution: "@cspell/dict-cpp@npm:5.1.19" - checksum: 10/f49912cdb783e403c114721ac1f2dc429206450d4eb6062d53796c7f566c5e644f68ba367a0ff9e501ab872f7d3d70d08102a492daca53ae4cb77ff2bb21c857 + version: 5.1.23 + resolution: "@cspell/dict-cpp@npm:5.1.23" + checksum: 10/21098127234c51e8348e26b2e5beb56aade798138c14c42598167bc0c727aef9f44c46adbd85fe8bef54f8233623e7458dd34324ee111efd99fa95589a520df5 languageName: node linkType: hard "@cspell/dict-cryptocurrencies@npm:^5.0.0": - version: 5.0.0 - resolution: "@cspell/dict-cryptocurrencies@npm:5.0.0" - checksum: 10/116e7f117b59ea4c9fa7ae1c3b47fc963e050448d43e059fb93731a256881ee262420edd5b9701ffe88af3d5e95b0337fc99b4dde1b0283ee0aaed45b23e281e + version: 5.0.3 + resolution: "@cspell/dict-cryptocurrencies@npm:5.0.3" + checksum: 10/00d9e3e7df52c43a3551f047537218d1452e2de45f676a05d6fee0336d0c578eea0e20867e4df1036735ff3fa6485df331d280d064b2f2c339b9c96f0d43a9a2 languageName: node linkType: hard "@cspell/dict-csharp@npm:^4.0.2": - version: 4.0.2 - resolution: "@cspell/dict-csharp@npm:4.0.2" - checksum: 10/d2ecb2aada51c5f0d6d557fd4f0c6eddb5b299e0955e066c49cd2afe96a1c6fe0afde699fdb885dd3183603a1efbd1d793b6a490b8d039256445b4b154b7375b + version: 4.0.5 + resolution: "@cspell/dict-csharp@npm:4.0.5" + checksum: 10/ff0fa46889e7a32b636890166ec5ee6957affa1a6657e5f3a037a1a0fa043853e4df6b153f08496d55c13000d9de469be9e6cbbabfee04d74a41e7d6ff8b0726 languageName: node linkType: hard "@cspell/dict-css@npm:^4.0.12": - version: 4.0.12 - resolution: "@cspell/dict-css@npm:4.0.12" - checksum: 10/da812243c92ef07082334d512561606f178e003fa50324332c322655fab0982ed1bea055d75a348b37cea71fbe652224dcfff14dc445d26530cfa3c491b2b324 + version: 4.0.16 + resolution: "@cspell/dict-css@npm:4.0.16" + checksum: 10/6cf9b7f16516afd0964bcf55c21aa054368021f17f03cb8e6b740a792ba76399cc10fba9b2a80fc6cd4866988c66bdbba6620e7335b3453f843d669a9a07a06e languageName: node linkType: hard "@cspell/dict-dart@npm:^2.0.3": - version: 2.0.3 - resolution: "@cspell/dict-dart@npm:2.0.3" - checksum: 10/66bfcfa029baacd0b14b3ff5b6ab7597cf9459f77185d88b25123b42a4babb66df6786806843f1b6506c335326100599a2e1db6e6104e66bd021ede9ccb3cec4 + version: 2.2.4 + resolution: "@cspell/dict-dart@npm:2.2.4" + checksum: 10/d9e8b12feafafb3bda4f3e27fdec41e46ad08ccff0efbafb33c284310135989730b0ac6616c5c2cf33447da4c1b8970b8d84ce029cbf7bed95aafd75172fbf15 languageName: node linkType: hard -"@cspell/dict-data-science@npm:^2.0.1": - version: 2.0.1 - resolution: "@cspell/dict-data-science@npm:2.0.1" - checksum: 10/1ae8e71161a02e8ee1bfed86bc815b81ae3eaeb9476fea4bc3c41556c525657123bac85fc2789bdbe18e444f9629fe8a1e69fd78a99f89b42edfa3211098a588 +"@cspell/dict-data-science@npm:^2.0.5": + version: 2.0.5 + resolution: "@cspell/dict-data-science@npm:2.0.5" + checksum: 10/4e31a81a273073c54a0bb14b2bb6bba117fabdf07b09f08c46cbf997122022f5c997dcb1317357a24555864539767f5e60e45d960816c8853d0646001a54d5e4 languageName: node linkType: hard "@cspell/dict-django@npm:^4.1.0": - version: 4.1.0 - resolution: "@cspell/dict-django@npm:4.1.0" - checksum: 10/d64b830ab761f3610ca5eb81b06447c91a64b988bc3e40bac214fc611de498fa019e1cd76f6f21254ad2d3bfaeb3d10248481f0a02711d6a3ed715df062b2ba6 + version: 4.1.3 + resolution: "@cspell/dict-django@npm:4.1.3" + checksum: 10/561f7bcde0cad0c40c978b7ffbc11576afd966e30644444a2a0bce42670232a7d683f11497727eb02da317a269dbf3d7e859eb5cd780f9f4e8931bd3cbbb5233 languageName: node linkType: hard "@cspell/dict-docker@npm:^1.1.7": - version: 1.1.7 - resolution: "@cspell/dict-docker@npm:1.1.7" - checksum: 10/307f8b5132edca7cd291ba0ab6ed88f8787df984d6a42401b12a0da1ecb935d50af3a108ede885ce5bede96c445acdc88bb9ea8396de151c565a90a3bf66853e + version: 1.1.11 + resolution: "@cspell/dict-docker@npm:1.1.11" + checksum: 10/ecd7b59d4bd39aead48fca2e3e18cc867d5d7488b3a5a0aa38afac82856fef66627b0ccc8e7e45f857cd3d0292445b711a054d1bde7e11d325ff6ec92e1e29f8 languageName: node linkType: hard "@cspell/dict-dotnet@npm:^5.0.2": - version: 5.0.2 - resolution: "@cspell/dict-dotnet@npm:5.0.2" - checksum: 10/319c6ed2793ad9f5ab01b2a7a3fa7280edd762714ff109dfafc24b397bc7ba7e8917cf8c68dd2d124eb11a7b7f60e677b1fd36d3610733b3f32668f966902ebd + version: 5.0.8 + resolution: "@cspell/dict-dotnet@npm:5.0.8" + checksum: 10/bdbfcf59faeba1f8473cdfad837d3fdde79c3877e67a66bcd040efb7ceacdbadcbbc0e7cb5cac4d82a9030f03e899c9c78e20bd0cfabbdbbd69d5bc345344891 languageName: node linkType: hard "@cspell/dict-elixir@npm:^4.0.3": - version: 4.0.3 - resolution: "@cspell/dict-elixir@npm:4.0.3" - checksum: 10/f084449b2de5a2fa08076ac699c6073beaa4bb43796a662d681ea8fe5cba31f9efe718f3f98ef432ba75d4ea574316de34ab8422f79f4f2022cfddee7a7b8653 + version: 4.0.6 + resolution: "@cspell/dict-elixir@npm:4.0.6" + checksum: 10/2bfd8d9ed8d3fcb88693fa51b091161a191a9c64d0591b04aac304571a2e61a57e829aa096e5a694dcfe4f4c9c0f1a265701a322e6fdff27711b17fe5af5508d languageName: node linkType: hard "@cspell/dict-en-common-misspellings@npm:^2.0.3": - version: 2.0.3 - resolution: "@cspell/dict-en-common-misspellings@npm:2.0.3" - checksum: 10/8ea5f6843635089a82f135ca4302b8ed0c208254cda83b56fa72a72a30ee983452a1abaf003f5ccf76a8f1faf9596da91dfe4441f2bbd00145b305a2e501311e + version: 2.0.7 + resolution: "@cspell/dict-en-common-misspellings@npm:2.0.7" + checksum: 10/cb5f4aba22ce657f0b6b09bc1039c10b02bb97d19fc2872dcd1e3abdcc7211f52b15961a8f1480847beac54a8871e3a98316e1759e3f71daba41d9b4fd4f147f languageName: node linkType: hard @@ -6494,263 +4732,263 @@ __metadata: linkType: hard "@cspell/dict-en_us@npm:^4.3.23": - version: 4.3.23 - resolution: "@cspell/dict-en_us@npm:4.3.23" - checksum: 10/d1c9a5b599ab13a9fe572b240e473b87945bd95ffbe9d39b66da2938b3902dc84448a1ce120c99b22bdcad0e0547523f1d92f027ea38ed8d5902441bbb0c0c53 + version: 4.3.27 + resolution: "@cspell/dict-en_us@npm:4.3.27" + checksum: 10/ab336ab9157421599530db2b39ccba8933f2cb59ffdc4a63cb77d4612566d92b77e538a394e044219811cba1b70d4d3c3ed5ad321f00cac1a2bef392c41c875e languageName: node linkType: hard "@cspell/dict-filetypes@npm:^3.0.4": - version: 3.0.4 - resolution: "@cspell/dict-filetypes@npm:3.0.4" - checksum: 10/d5e8e46f9caf40c895326c7557f42c0648458717f79d9f41f145170dbe36ec9e21dea322117a92a6a904385dfb3efd0dd63a349edf705c6cc4255861f8b97cce + version: 3.0.8 + resolution: "@cspell/dict-filetypes@npm:3.0.8" + checksum: 10/28fcdd35167340571fdd156d3d9d4400dc27234f070c55ce0f851db4d1c853523d7c60f6b8f357571584bb704a83d33ec0723840b069602983a561fc89d0c9e2 languageName: node linkType: hard "@cspell/dict-fonts@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-fonts@npm:4.0.0" - checksum: 10/894a31f3df8e3a43a3dcf13e1706eb94cb5e83bd6d2aa26b0e9fc79c2de304eb5e9118eec4dff6a673e2a3243c842ca694c8e0f3c0ad78301004f983acf53832 + version: 4.0.3 + resolution: "@cspell/dict-fonts@npm:4.0.3" + checksum: 10/00f478e78f306be8e34937de85c7343cde2ff58ddf3e71a930c454a69e4ccfacdd7e7cdc6d735cca20357d64c9d37ed973790c6d7fd162ac4456f621038e5733 languageName: node linkType: hard "@cspell/dict-fsharp@npm:^1.0.1": - version: 1.0.1 - resolution: "@cspell/dict-fsharp@npm:1.0.1" - checksum: 10/ce0df20704bf95d1fe434d2889cc764279cbce2b057fc5247be1ccaf7a8cc57372de3da2cdab6643b3df5221119716929b2e2aaad3f60533dcf0bd3c7d892fab + version: 1.0.4 + resolution: "@cspell/dict-fsharp@npm:1.0.4" + checksum: 10/b45a4dbe6ada11c739add65fd891f6cddc15c7b56e749d4d2cfed21a8e65844c65cfd208939cccd9e7f4bc9aa7d52eb790f939dda788440f4af7bcd401435ff3 languageName: node linkType: hard "@cspell/dict-fullstack@npm:^3.1.8": - version: 3.1.8 - resolution: "@cspell/dict-fullstack@npm:3.1.8" - checksum: 10/c0f178e751f0e4779600749d5f77e313e33362ba6d4737d3969f64ca272200bb8cc94dd10cccc18de58e60223b46a39247c5e4ca1d5eda768a1d08c1725fb9e7 + version: 3.2.3 + resolution: "@cspell/dict-fullstack@npm:3.2.3" + checksum: 10/85aa42f640b1e592d4813e1466fd86826c706908f4c1b5e9f55ac44a5d255d665f4dafbad359b77b9ffe16e2f25db9c7c9901a74ddcba332776688a6d203765c languageName: node linkType: hard "@cspell/dict-gaming-terms@npm:^1.0.5": - version: 1.0.5 - resolution: "@cspell/dict-gaming-terms@npm:1.0.5" - checksum: 10/25d50653ed5e940f9302cc5536c37a20854bb274dec9302d73c5349e51ec623d33d99e4fe283e3b30e70f452063361fbc4cae7dc603232fa82004262f37d0f50 + version: 1.0.8 + resolution: "@cspell/dict-gaming-terms@npm:1.0.8" + checksum: 10/4e7dff5baf3b04d5ae5b978e9571805d79a0c8ad9a8a25e606bdd1fa3b287d291b52eefaa1bd8764c9897811e1c2dda7e8e3e17d6b84cfe3bdf8ab4c1f882d61 languageName: node linkType: hard "@cspell/dict-git@npm:^3.0.0": - version: 3.0.0 - resolution: "@cspell/dict-git@npm:3.0.0" - checksum: 10/97b6da58c93108bae0867515f790d84728f0bce580cc8ad6f0f5f63b2c81eaf6d084d543d99b693ff4d7fbea2413ff068c3e4811fc107820d243da2c06d381fa + version: 3.0.3 + resolution: "@cspell/dict-git@npm:3.0.3" + checksum: 10/4bff7e8e61d7877c409be088b9ade37e59f6689d31b1a44b3fa2fa98721900b4c16d707af427e7d464e67562f8d0cef24c5d97d7dbc1ba5349846007f7b8cf9e languageName: node linkType: hard "@cspell/dict-golang@npm:^6.0.9": - version: 6.0.9 - resolution: "@cspell/dict-golang@npm:6.0.9" - checksum: 10/4ce7fc8f1a925eb3c4a2a2a2ae4d75be79e698d2f6cd90ff549892705687011a190b9aabc8bb5c2c7616d24f42a3264121ad8ae056a844937984d301fa7cd90f + version: 6.0.16 + resolution: "@cspell/dict-golang@npm:6.0.16" + checksum: 10/9ff4e93947fdd91bf83c8bd433799ed7c976651d718b47e1f2cc4407818fa54b32b0e868e993ec7b4ba949bbc68b09ddc39d90e18df926682a82825e12602e74 languageName: node linkType: hard "@cspell/dict-google@npm:^1.0.1": - version: 1.0.1 - resolution: "@cspell/dict-google@npm:1.0.1" - checksum: 10/4e2975c76e661884defdce928847f6babd3e0e296867540cf37ca56623854f97f74e225d668116b904d572574915c8c723f17171f1d00847bb877e1eae375e7d + version: 1.0.4 + resolution: "@cspell/dict-google@npm:1.0.4" + checksum: 10/56141456be4057a9ddc538f568324a45b606e31c5eb485cd4a365c0b24f7ed02be4a91fc68bafaabb86b55fe7ef2bbf6f78febe766c784b9b040c243d2cd81a9 languageName: node linkType: hard "@cspell/dict-haskell@npm:^4.0.1": - version: 4.0.1 - resolution: "@cspell/dict-haskell@npm:4.0.1" - checksum: 10/cfb51e415b60c5eb266a5782d0a4b19a37f1389b9b018d1bbb2ff4358bd739af1f76f68f26a138d4b4bd0ab67146d6eb9032fc3d3c212695237c134e05339c79 + version: 4.0.4 + resolution: "@cspell/dict-haskell@npm:4.0.4" + checksum: 10/210205f6d9f5ac8db25f669fe4f22689c5c67b29322eb669d36f9bed59cd425ff5a4870926051766353647f1a8b98fb05d6ca9ad9b5353d5cd0067ac653ee529 languageName: node linkType: hard "@cspell/dict-html-symbol-entities@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-html-symbol-entities@npm:4.0.0" - checksum: 10/79f05f9080f39dbde703980eb587ed6624b8fc2f5cedc297327bc1b9b7e6022a7c382e6013149b1afe00609b96003ab5c8d18d378979f76f336ab626317183f4 + version: 4.0.3 + resolution: "@cspell/dict-html-symbol-entities@npm:4.0.3" + checksum: 10/0cef821bf2400a3f8b0d3c94eb8c5de531cbf3ed409d95faf5aaa7f272774ab1e6fa0f315c0902cc661d81bf52075f134b7687bec9c9f1184d176517b3781671 languageName: node linkType: hard "@cspell/dict-html@npm:^4.0.5": - version: 4.0.5 - resolution: "@cspell/dict-html@npm:4.0.5" - checksum: 10/8801b7f77910f6a269efc652c88ecc3299cabedec03566ad6fb661845fdf9a4950bd7a2cdd1216dde982eddc9caf9ec00c6917ac90707fabb7686d02b30b0a5c + version: 4.0.10 + resolution: "@cspell/dict-html@npm:4.0.10" + checksum: 10/5e1b7a847fb8fddc9c0bc4feab8d5b55a8e9e63ab7e146951a42a62fb0901aefee6101bb386b48d254b112460cdf624455a146687c71f00778a6100a2cd9daff languageName: node linkType: hard "@cspell/dict-java@npm:^5.0.7": - version: 5.0.7 - resolution: "@cspell/dict-java@npm:5.0.7" - checksum: 10/c33b5e69c7eb03d6416a5a9a6971e69374167967a380dbc91062d8143e249c9595fcc26f9163112ff36d3b8dbca23eed2025b48e086c622eb6bb450f755087ef + version: 5.0.10 + resolution: "@cspell/dict-java@npm:5.0.10" + checksum: 10/1b79cb1ac86587a9c769f7d3b1ff9da6eb1f921da0e6e177660796c163fc25faafb1a9a4fe9ab4c956c69ac76b426f9ac97d6330c6e3d57a3798213b642cb66f languageName: node linkType: hard "@cspell/dict-julia@npm:^1.0.1": - version: 1.0.1 - resolution: "@cspell/dict-julia@npm:1.0.1" - checksum: 10/4cce630dddb7579b3750875af43f40fb4e6019fe6ab30791b160b71a677c17e2c6e227d54555193255b43dd08a1f1fab500a82012d9831ccca923c4f8791b976 + version: 1.0.4 + resolution: "@cspell/dict-julia@npm:1.0.4" + checksum: 10/aa871c6af3cb613f1bd6c02c4166595a3bfc67d388bb2238838d60c3b97946595502b0e66fd61ff2fa033d7093c6a9dec61b6c7e9650bcdd2f7315bc72eed0d2 languageName: node linkType: hard "@cspell/dict-k8s@npm:^1.0.5": - version: 1.0.5 - resolution: "@cspell/dict-k8s@npm:1.0.5" - checksum: 10/d7a251e44412ff7d337dabe20deedd5bb9553e2825f81a7c01788aa80dbae99a24c57cc6f686d9a249bcfbd0436248d1814b8c786425a3b20a7e189b1019775f + version: 1.0.9 + resolution: "@cspell/dict-k8s@npm:1.0.9" + checksum: 10/0c0457ae8cb8227a0de0a70b9d7626e27c28e0504bef37a9cc8f1ac81ce059cbd56cbcfe2cbcf62965aff639b88422544ae365257f16372ba1c5d91393b29232 languageName: node linkType: hard "@cspell/dict-latex@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-latex@npm:4.0.0" - checksum: 10/7e7a520196d143d0a3185689d09d84bf1e23b5328dfc78187c4e4ab264bd49c3dd695eb92f8d582583e5bc26bcab4ed0976b310b56a000af81d88a7acdea7f8c + version: 4.0.3 + resolution: "@cspell/dict-latex@npm:4.0.3" + checksum: 10/9dbe412991e5323d8feca08c3fc13c3afb0b330c7c41df71ef19032d988f0bf2469e00ac7595b25c26f4962fcba03efa2eab86c3246d92dc6f86bade03d94528 languageName: node linkType: hard "@cspell/dict-lorem-ipsum@npm:^4.0.0": - version: 4.0.0 - resolution: "@cspell/dict-lorem-ipsum@npm:4.0.0" - checksum: 10/d3575fb7b9684480192d2cd647484312c555f3d1215d6b35371b70de3ecde4273010e5916cc2d130ff1e1223a1a49f75825651671a76d3dabdec98acf67a3902 + version: 4.0.3 + resolution: "@cspell/dict-lorem-ipsum@npm:4.0.3" + checksum: 10/701a7a3dd92833133671d538e581040ba51022ed658dc19f43cfa9c51e3deaf42f1e50aa52dee945ce5bf375bd9e1253958aaa74a41ed3583680994788cf6939 languageName: node linkType: hard "@cspell/dict-lua@npm:^4.0.3": - version: 4.0.3 - resolution: "@cspell/dict-lua@npm:4.0.3" - checksum: 10/eee20135a4f0620302c5feeb50485f59af93c24b64eb2081a9e2096a106ce33ae565d6d92607582b44c9f17c8a091d82fbcb443ebae9b77f8512b0d66a703c3b + version: 4.0.6 + resolution: "@cspell/dict-lua@npm:4.0.6" + checksum: 10/d570ef7c57c4ca3737ad7a2fc94ab35b74e85828ee95a39ed9db539549809d755afb1d359d39800ebbbd53394871d84a6bf079cb28df25cb69d74fe32a96e627 languageName: node linkType: hard "@cspell/dict-makefile@npm:^1.0.0": - version: 1.0.0 - resolution: "@cspell/dict-makefile@npm:1.0.0" - checksum: 10/f0cac4caf31e27accd5df5e0c2f53097cccbbd085126c4b4ecc08be2a32bd7f89fe6b052e9eae4ec99843175cafa94561868271fb53c5389f27cc078565b5123 + version: 1.0.3 + resolution: "@cspell/dict-makefile@npm:1.0.3" + checksum: 10/6eb38812bd99d23511f1077548704bc4857de82e0f852e707b23789dbfc980b65b4b383431617eb4e0f76372a1e80697a50e21f4980e4d077b50ad52edb6d99c languageName: node linkType: hard "@cspell/dict-monkeyc@npm:^1.0.6": - version: 1.0.6 - resolution: "@cspell/dict-monkeyc@npm:1.0.6" - checksum: 10/3d174203af5c12e515e0bdcc7b43a75cc8f5ef097db65249773f386e063febbfe6a47c39414fc52e0970e7dde1f0b32bc5fc0e586761f1e0cd082f1bce0e7572 + version: 1.0.9 + resolution: "@cspell/dict-monkeyc@npm:1.0.9" + checksum: 10/a7e35ac707c313e379080ccc2dce1842f05f49c0321cc2aad9858a3802b67c5c2aef9c395c261c68856e52148bc7422110859dfdb58ceb747afa46433217b045 languageName: node linkType: hard "@cspell/dict-node@npm:^5.0.1": - version: 5.0.1 - resolution: "@cspell/dict-node@npm:5.0.1" - checksum: 10/553d09eb7a0ec6eb1d5be85b7fb34fb88c9f87712708982a289f67157068a5e69e0e7e46321c17c9d9c2e57d1e442399fa0f96bc2916221eddcc6519c96b0105 + version: 5.0.5 + resolution: "@cspell/dict-node@npm:5.0.5" + checksum: 10/bb19c9953aa3558ac798ca05e35b0f0a36683e27cc8b5630282abbab609aeed7805c96085b7cce3b4cc0c2d66ac51b11f27d38bbaec5380d00c0b91959fffff0 languageName: node linkType: hard "@cspell/dict-npm@npm:^5.0.16": - version: 5.0.16 - resolution: "@cspell/dict-npm@npm:5.0.16" - checksum: 10/ec77d0e297e6a50b1889a15332771c6605997bb1c4a8d9f0528ded69ea993fae449f303f4bca04c4cd56c24ad4151feb67b64cfade58aa21c81d80e1b0474b32 + version: 5.1.11 + resolution: "@cspell/dict-npm@npm:5.1.11" + checksum: 10/ac52b7c024bc48bd50cf4208d4d1c5d646445c31041f6f277c462b561cd1d0e7ae6431035f3c8bca3c2c593bc68ecf4888b961452efe5b5187eba5c0e44c62f0 languageName: node linkType: hard "@cspell/dict-php@npm:^4.0.8": - version: 4.0.8 - resolution: "@cspell/dict-php@npm:4.0.8" - checksum: 10/245c46db2d387044b9d9cfa6de4eb46b5a8cbbb33a0875c171c75230db599af5d8592165a618c849e99610f2c173564a6867c5475a2dbc5bbdea437bcb2b569b + version: 4.0.13 + resolution: "@cspell/dict-php@npm:4.0.13" + checksum: 10/0435e752e0a1fe1ff902d31a6a194f400a8544fb155388450c8de600fff03696399e3b262376bdd6ba6eeddf0bf3315c33d87822757d3db21162e82b2ff1d3e6 languageName: node linkType: hard "@cspell/dict-powershell@npm:^5.0.4": - version: 5.0.4 - resolution: "@cspell/dict-powershell@npm:5.0.4" - checksum: 10/13aa687130db6330a86f7b9cd1f7be9046ac3102aa96be9c71e130639fc3eff9b0a1ad45914bcaa497af2d628e2d3bc8babf02d6b657fd18d88fddc412ec4fec + version: 5.0.13 + resolution: "@cspell/dict-powershell@npm:5.0.13" + checksum: 10/6f351153d9fc4baa9ea5e8c1867408b6879f3326f7863b7f34b1e6b8ee79df1c7a1659f7b8cae57bba2cb7fba1c45f83e341b978fb6db08a4ae2714fd75c3019 languageName: node linkType: hard "@cspell/dict-public-licenses@npm:^2.0.7": - version: 2.0.7 - resolution: "@cspell/dict-public-licenses@npm:2.0.7" - checksum: 10/7bbd067668499c45bad9eb8e3dae598bc5635e6035160bff7343b87cd31e419387e704fa290d0e23903fff6c80b65838ebe5638e2951dc5d9214df9b98b60ce2 + version: 2.0.11 + resolution: "@cspell/dict-public-licenses@npm:2.0.11" + checksum: 10/6b8741a360abd6eaaf4eb58a20628dfc96b281fc0c2b11c304ee67f328f653977bddcc55bcef3d09a3fb4a12cc92e09c66b61e2b4ef389aaf83b214967d4e4d4 languageName: node linkType: hard "@cspell/dict-python@npm:^4.2.1": - version: 4.2.1 - resolution: "@cspell/dict-python@npm:4.2.1" + version: 4.2.12 + resolution: "@cspell/dict-python@npm:4.2.12" dependencies: - "@cspell/dict-data-science": "npm:^2.0.1" - checksum: 10/f0941bcfd518a3c63c68d8ed08304b98142e90e3b445b12ab4b13ce23508b573e323f4a5136bde2cd610f99814963e119b8b06c0d91fc5808e1a7c29a804cce4 + "@cspell/dict-data-science": "npm:^2.0.5" + checksum: 10/f58a511c4afeb4997bd207583c18875cd523115af8806f143e09084431b2ec6b5abe35d6f0875428b6e56e99a6f5a369fa6ad4d77f2336da0f2a1726d010fb72 languageName: node linkType: hard "@cspell/dict-r@npm:^2.0.1": - version: 2.0.1 - resolution: "@cspell/dict-r@npm:2.0.1" - checksum: 10/fe85939ad4c8ada34284a673918be711cca60b6d6f1c48ee98602c27905228dfbaea3462a350094633032c1d6b6bba9548df7019e0b21673cf1cf887c57ca228 + version: 2.0.4 + resolution: "@cspell/dict-r@npm:2.0.4" + checksum: 10/4840051d591fd817913726d38b720405f3cde0cb7f19d4a480e313aa33150fa35b7314e211c16c5aadd65dfc5cadf51a462ffd1349b59743f3d68498fa1a207b languageName: node linkType: hard "@cspell/dict-ruby@npm:^5.0.2": - version: 5.0.2 - resolution: "@cspell/dict-ruby@npm:5.0.2" - checksum: 10/c2006bcc808448b1eef146eb4b6b74388113c50334206191a9fe5817fb13669482ecd114f7bbd397562ad2e19a9683266ff396f48c6ce282f6445c2cfa8e82c7 + version: 5.0.7 + resolution: "@cspell/dict-ruby@npm:5.0.7" + checksum: 10/cdd1a7e15e4fb0e46f731ce13e76c35bea9529b22b80c61ea6f5b09ea9e217fa78de62c67337c9948a179137cf6b7c616a20afb29030134f7a774964419b0307 languageName: node linkType: hard "@cspell/dict-rust@npm:^4.0.4": - version: 4.0.4 - resolution: "@cspell/dict-rust@npm:4.0.4" - checksum: 10/7ff86c4f172bf039ff1264f4736d9638d0792ab39ff5fc48812831241d622040f6591a3d9f630325537b0a4913e242bea14005ec3d2e3c167f933fe1416e0caa + version: 4.0.9 + resolution: "@cspell/dict-rust@npm:4.0.9" + checksum: 10/1421dbdb9e4e8c13ba1d12f1b637cb4d83b152fe21be4b1c878ec3078f2485f5913566573b5a8b54df50e4b6446cc4dcf8cb9b4cddc0bcdbd7fe461be1595c99 languageName: node linkType: hard "@cspell/dict-scala@npm:^5.0.2": - version: 5.0.2 - resolution: "@cspell/dict-scala@npm:5.0.2" - checksum: 10/c07bda723929f8b01ae0575af3d05ffffee9ed7523e0658a22d533cf287dd564d11bf16062a1692fb06c3aff2d519d07c7c2c3e5662ced8af1194b31b352af51 + version: 5.0.6 + resolution: "@cspell/dict-scala@npm:5.0.6" + checksum: 10/f0c2f4613d29c27d7384bfe8963e97e962c28119991b6eacb2d70e189ddefa8d990f22e76f26738cd0ecb4fb923d5a29049dfb482fe97b307e8e0d0a7fdb8d73 languageName: node linkType: hard "@cspell/dict-software-terms@npm:^3.4.9": - version: 3.4.9 - resolution: "@cspell/dict-software-terms@npm:3.4.9" - checksum: 10/2fc21d7fefbd0269b760d2f634b22d6e54bd71dd3c03d96b59931fd1ef0c7380b6596e578621f907823eb8423bbdd297f56d8eaa150f2bbb23ed0559656c7523 + version: 3.4.10 + resolution: "@cspell/dict-software-terms@npm:3.4.10" + checksum: 10/f5bdee39e463d279e4f907cc7771342ab97f330d088b07acb2fc53747e98a2403dd249bdd5303a23fe61cd54029099a0ae83c63fdd3c8085a6f0b131ad001012 languageName: node linkType: hard "@cspell/dict-sql@npm:^2.1.3": - version: 2.1.3 - resolution: "@cspell/dict-sql@npm:2.1.3" - checksum: 10/a435812cc697d4c453f11efa49962992150702518e49808381ea34548b8a8ed81432a10cca36682007912b013c28e9ce3c6c183341c6cde58c8af0eef25cddc3 + version: 2.1.8 + resolution: "@cspell/dict-sql@npm:2.1.8" + checksum: 10/39be58da739ebedca501a020ebe22d86d3e34a4ebff1054672a3d9155b88da9fd13136fffae209fff8b0f333b3f591c86225d07e8a82ce5189e33c96fac464d8 languageName: node linkType: hard "@cspell/dict-svelte@npm:^1.0.2": - version: 1.0.2 - resolution: "@cspell/dict-svelte@npm:1.0.2" - checksum: 10/5b42989bc6743a26ca5172cc23ebc1449d930695b10c908376048ce1835bf57fef7a0004f02ec5e43219f24a97f154e125041df470441199a045ed0be9e654fc + version: 1.0.5 + resolution: "@cspell/dict-svelte@npm:1.0.5" + checksum: 10/8bc4553b898435f2c40806b08d5eaf13b2055034458a9fc3c4e0f1e63fa7f96c8f85a166c33276780faa89b848eb4c385d4a4262c89abb4cb54c80b8c23ce56b languageName: node linkType: hard "@cspell/dict-swift@npm:^2.0.1": - version: 2.0.1 - resolution: "@cspell/dict-swift@npm:2.0.1" - checksum: 10/0bbb106266205c5f5e12886a73ebf0db2078bab1bdd2e1f304fe28445cd72d847a4c5072bf4fe8f9e8cdb4bc69d52fffec0806aea19ea9b64b7a87c67ee01175 + version: 2.0.4 + resolution: "@cspell/dict-swift@npm:2.0.4" + checksum: 10/319ba9b69a0058ff565215f0cd37cba4f6048cf1c83c5d0b4ae73b742d763171ada9eb2fc1407f88bf55c6c33314cd38e273017bdaa458a426bea169ac3e9aa5 languageName: node linkType: hard "@cspell/dict-terraform@npm:^1.0.0": - version: 1.0.2 - resolution: "@cspell/dict-terraform@npm:1.0.2" - checksum: 10/68b4ab50ebb6087520c977a87d1307135d7d91084bc13975573e34beeed9cfd75ec87ecac221a6afa48d0e28d7058ade14f13ef7e625e295aaad7218d1abbae1 + version: 1.0.6 + resolution: "@cspell/dict-terraform@npm:1.0.6" + checksum: 10/713cf31e9e9ec1d1f6d2b834365b770200c718f02b19494b3482e03d3c84c9a5d185072e148d6fa3a72f21e326545587563e603f4eb821f7b07e11a1d91a88bb languageName: node linkType: hard "@cspell/dict-typescript@npm:^3.1.5": - version: 3.1.5 - resolution: "@cspell/dict-typescript@npm:3.1.5" - checksum: 10/9e99aa7c849133fcab6d16864045b512be3f0b89c76caf31234fcc6edf818e06e2af4087f576e5837e209dc0bdc1d1379d6752bac48aab517e0661c0e4eeff58 + version: 3.1.11 + resolution: "@cspell/dict-typescript@npm:3.1.11" + checksum: 10/44dd3a49197c04b0e13b808fff1f884eabd2500ed571fd9e99a7d630b3266bbe1e77a56fb46f52daf744dd41dc872e5bfc18c04bd91ecfd75d037666f2cce251 languageName: node linkType: hard "@cspell/dict-vue@npm:^3.0.0": - version: 3.0.0 - resolution: "@cspell/dict-vue@npm:3.0.0" - checksum: 10/4db58b1d6f9be1a523a35678877f2cca2bb04548b136ec5ec4e7186500978dbc32cc8747ced80ade3cad3acc3c80eb23afe980679165810f8f8f26802e952e2f + version: 3.0.3 + resolution: "@cspell/dict-vue@npm:3.0.3" + checksum: 10/20b1b93e6ec178f6e07924f0df4c938b3ee3e72fb9f1572b221ae5f2a6786e0823b2e1080c27c41d1c73a99364e695d26806a619da6fcd17aae572dc3c04c721 languageName: node linkType: hard @@ -6777,22 +5015,6 @@ __metadata: languageName: node linkType: hard -"@cspotcode/source-map-consumer@npm:0.8.0": - version: 0.8.0 - resolution: "@cspotcode/source-map-consumer@npm:0.8.0" - checksum: 10/dfe1399712e4d54e1d53b0c7782f929647ff8675c37ae7637ce2ffdbcc8bad06fea969bcbec6147e7ea70a89257cfc86695a3702c1946a1c334454480937b966 - languageName: node - linkType: hard - -"@cspotcode/source-map-support@npm:0.7.0": - version: 0.7.0 - resolution: "@cspotcode/source-map-support@npm:0.7.0" - dependencies: - "@cspotcode/source-map-consumer": "npm:0.8.0" - checksum: 10/d58b31640c4b1438c0caf8ed7eb46647674c042a625919660d9fb2d76f3621875520082934bae88ef54a75d53e8f9cafb506160bb02403a19e7155aa5f4ac59b - languageName: node - linkType: hard - "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -6803,9 +5025,9 @@ __metadata: linkType: hard "@csstools/normalize.css@npm:*": - version: 12.0.0 - resolution: "@csstools/normalize.css@npm:12.0.0" - checksum: 10/d3c3ebeba561da21e2fc62425356dc3d9cc976f23f258d7c8d40343b97385ee243c0688effce6fd37ab4b8ef59793e1d3447749b3b1c9f500df7dfb87a1b4e24 + version: 12.1.1 + resolution: "@csstools/normalize.css@npm:12.1.1" + checksum: 10/aa4d1b9a77c1ecba0a60e11371d944615c64b465abfb6fe7aea237d8bebd34dc47036f2570d7038a8633755ebd3ed09ec02326fbb7570b5bf7b80aa142c0ef4b languageName: node linkType: hard @@ -7014,15 +5236,15 @@ __metadata: linkType: hard "@digitalcredentials/jsonld-signatures@npm:^9.3.1": - version: 9.3.2 - resolution: "@digitalcredentials/jsonld-signatures@npm:9.3.2" + version: 9.4.0 + resolution: "@digitalcredentials/jsonld-signatures@npm:9.4.0" dependencies: "@digitalbazaar/security-context": "npm:^1.0.0" "@digitalcredentials/jsonld": "npm:^6.0.0" fast-text-encoding: "npm:^1.0.3" isomorphic-webcrypto: "npm:^2.3.8" serialize-error: "npm:^8.0.1" - checksum: 10/025b6146e3758c0a66c9f4364ea1ee6bc006021f5fa6bd83e6bae4389f5c3b2e52415b93a6846a7fecfb1df7b59291b8d66ed96125f98135f70803324a6d1eaf + checksum: 10/e4e37596b477619197a65f5376f1bcf15dc5cd5e28ad288d26bc0917f445b6a3909c822ed814428bd16c0b73c1ba352d4e82c886d8b618af1f2b45a7f5def43a languageName: node linkType: hard @@ -7071,53 +5293,33 @@ __metadata: languageName: node linkType: hard -"@discoveryjs/json-ext@npm:0.5.7": +"@discoveryjs/json-ext@npm:0.5.7, @discoveryjs/json-ext@npm:^0.5.0": version: 0.5.7 resolution: "@discoveryjs/json-ext@npm:0.5.7" checksum: 10/b95682a852448e8ef50d6f8e3b7ba288aab3fd98a2bafbe46881a3db0c6e7248a2debe9e1ee0d4137c521e4743ca5bbcb1c0765c9d7b3e0ef53231506fec42b4 languageName: node linkType: hard -"@discoveryjs/json-ext@npm:^0.5.0": - version: 0.5.6 - resolution: "@discoveryjs/json-ext@npm:0.5.6" - checksum: 10/61f84f6098f5ae31128e98ff0e9415d1af4c2b61fcfb01a23800e2863a0a2a08ddc187a2152d68b7f4dcff6982f60f4e684bddda1edbbc55775ba9af58ca160b - languageName: node - linkType: hard - "@emotion/babel-plugin@npm:^11.11.0": - version: 11.11.0 - resolution: "@emotion/babel-plugin@npm:11.11.0" + version: 11.12.0 + resolution: "@emotion/babel-plugin@npm:11.12.0" dependencies: "@babel/helper-module-imports": "npm:^7.16.7" "@babel/runtime": "npm:^7.18.3" - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/serialize": "npm:^1.1.2" + "@emotion/hash": "npm:^0.9.2" + "@emotion/memoize": "npm:^0.9.0" + "@emotion/serialize": "npm:^1.2.0" babel-plugin-macros: "npm:^3.1.0" convert-source-map: "npm:^1.5.0" escape-string-regexp: "npm:^4.0.0" find-root: "npm:^1.1.0" source-map: "npm:^0.5.7" stylis: "npm:4.2.0" - checksum: 10/8de017666838fc06b1a961d7a49b4e6dc0c83dbb064ea33512bae056594f0811a87e3242ef90fa2aa49fc080fab1cc7af536e7aee9398eaca7a1fc020d2dd527 - languageName: node - linkType: hard - -"@emotion/cache@npm:^11.11.0": - version: 11.11.0 - resolution: "@emotion/cache@npm:11.11.0" - dependencies: - "@emotion/memoize": "npm:^0.8.1" - "@emotion/sheet": "npm:^1.2.2" - "@emotion/utils": "npm:^1.2.1" - "@emotion/weak-memoize": "npm:^0.3.1" - stylis: "npm:4.2.0" - checksum: 10/ef29756247dafb87168b4ffb76ee60feb06b8a1016323ecb1d3ba8aed3f4300ca10049bedbfe83aa11e0d81e616c328002a9d50020ebb3af6e4f5337a785c1fe + checksum: 10/fe6f4522ea2b61ef4214dd0b0f3778aad9c18434b47e50ae5091af226526bf305455c313065826a090682520c9462c151d4df62ec128f14671d3125afc05b148 languageName: node linkType: hard -"@emotion/cache@npm:^11.13.1": +"@emotion/cache@npm:^11.11.0, @emotion/cache@npm:^11.13.1": version: 11.13.1 resolution: "@emotion/cache@npm:11.13.1" dependencies: @@ -7130,35 +5332,19 @@ __metadata: languageName: node linkType: hard -"@emotion/hash@npm:^0.9.1": - version: 0.9.1 - resolution: "@emotion/hash@npm:0.9.1" - checksum: 10/716e17e48bf9047bf9383982c071de49f2615310fb4e986738931776f5a823bc1f29c84501abe0d3df91a3803c80122d24e28b57351bca9e01356ebb33d89876 +"@emotion/hash@npm:^0.9.2": + version: 0.9.2 + resolution: "@emotion/hash@npm:0.9.2" + checksum: 10/379bde2830ccb0328c2617ec009642321c0e009a46aa383dfbe75b679c6aea977ca698c832d225a893901f29d7b3eef0e38cf341f560f6b2b56f1ff23c172387 languageName: node linkType: hard -"@emotion/is-prop-valid@npm:^1.2.1": - version: 1.2.1 - resolution: "@emotion/is-prop-valid@npm:1.2.1" - dependencies: - "@emotion/memoize": "npm:^0.8.1" - checksum: 10/fe231c472d38b3bbe519bcc9a5585cd41c45604147f3a065e333caf0f695d668aa21bc4229e657c1b6ea7398e096899e6ad54662548c73f11f6ba594aebd76a1 - languageName: node - linkType: hard - -"@emotion/is-prop-valid@npm:^1.2.2": - version: 1.2.2 - resolution: "@emotion/is-prop-valid@npm:1.2.2" +"@emotion/is-prop-valid@npm:^1.2.1, @emotion/is-prop-valid@npm:^1.2.2": + version: 1.3.1 + resolution: "@emotion/is-prop-valid@npm:1.3.1" dependencies: - "@emotion/memoize": "npm:^0.8.1" - checksum: 10/0fa3960abfbe845d40cc230ab8c9408e1f33d3c03b321980359911c7212133cdcb0344d249e9dab23342b304567eece7a10ec44b986f7230e0640ba00049dceb - languageName: node - linkType: hard - -"@emotion/memoize@npm:^0.8.1": - version: 0.8.1 - resolution: "@emotion/memoize@npm:0.8.1" - checksum: 10/a19cc01a29fcc97514948eaab4dc34d8272e934466ed87c07f157887406bc318000c69ae6f813a9001c6a225364df04249842a50e692ef7a9873335fbcc141b0 + "@emotion/memoize": "npm:^0.9.0" + checksum: 10/abbc5c7bf4017415da5b06067fc0b4771d1f22cf94ec37fd54c07b3bd1bcffbda2405ca686e7ee64a9cfc51461262b712f724850e838775347a949f72949ad03 languageName: node linkType: hard @@ -7211,49 +5397,16 @@ __metadata: languageName: node linkType: hard -"@emotion/serialize@npm:^1.1.2": - version: 1.1.2 - resolution: "@emotion/serialize@npm:1.1.2" - dependencies: - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/unitless": "npm:^0.8.1" - "@emotion/utils": "npm:^1.2.1" - csstype: "npm:^3.0.2" - checksum: 10/71ed270ee4e9678d6d1c541cb111f8247aef862a28729e511f7036f22b12822e976b5843f5829a1c2a7b959a9728dcac831f39de3084664725eba1345a03b4a0 - languageName: node - linkType: hard - -"@emotion/serialize@npm:^1.1.3": - version: 1.1.3 - resolution: "@emotion/serialize@npm:1.1.3" - dependencies: - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/unitless": "npm:^0.8.1" - "@emotion/utils": "npm:^1.2.1" - csstype: "npm:^3.0.2" - checksum: 10/48d88923663273ae70359bc1a1f30454136716cbe0ddd9664be08e257ce56acedab911f125b627627358e37c9f450bbac3ea09b534ef42f9f67325d47b1e2a7b - languageName: node - linkType: hard - -"@emotion/serialize@npm:^1.1.4": - version: 1.1.4 - resolution: "@emotion/serialize@npm:1.1.4" +"@emotion/serialize@npm:^1.1.2, @emotion/serialize@npm:^1.1.3, @emotion/serialize@npm:^1.1.4, @emotion/serialize@npm:^1.2.0, @emotion/serialize@npm:^1.3.2": + version: 1.3.2 + resolution: "@emotion/serialize@npm:1.3.2" dependencies: - "@emotion/hash": "npm:^0.9.1" - "@emotion/memoize": "npm:^0.8.1" - "@emotion/unitless": "npm:^0.8.1" - "@emotion/utils": "npm:^1.2.1" + "@emotion/hash": "npm:^0.9.2" + "@emotion/memoize": "npm:^0.9.0" + "@emotion/unitless": "npm:^0.10.0" + "@emotion/utils": "npm:^1.4.1" csstype: "npm:^3.0.2" - checksum: 10/11fc4f960226778e9a5f86310b739703986d13b2de3e89a16d788126ce312b2c8c174a2947c9bfc80cb124b331c36feeac44193f81150616d94b1ba19a92d70a - languageName: node - linkType: hard - -"@emotion/sheet@npm:^1.2.2": - version: 1.2.2 - resolution: "@emotion/sheet@npm:1.2.2" - checksum: 10/cc46b20ef7273dc28de889927ae1498f854be2890905745fcc3154fbbacaa54df1e28c3d89ff3339c2022782c78933f51955bb950d105d5a219576db1eadfb7a + checksum: 10/ead557c1ff19d917ef8169c02738ef36f0851fbfdf0bf69a543045bddea3b7281dc8252ee466cc5fb44ed27d1e61280ff943bb60a2c04158751fb07b3457cc93 languageName: node linkType: hard @@ -7304,30 +5457,23 @@ __metadata: languageName: node linkType: hard -"@emotion/unitless@npm:^0.8.1": - version: 0.8.1 - resolution: "@emotion/unitless@npm:0.8.1" - checksum: 10/918f73c46ac0b7161e3c341cc07d651ce87e31ab1695e74b12adb7da6bb98dfbff8c69cf68a4e40d9eb3d820ca055dc1267aeb3007927ce88f98b885bf729b63 +"@emotion/unitless@npm:^0.10.0": + version: 0.10.0 + resolution: "@emotion/unitless@npm:0.10.0" + checksum: 10/6851c16edce01c494305f43b2cad7a26b939a821131b7c354e49b8e3b012c8810024755b0f4a03ef51117750309e55339825a97bd10411fb3687e68904769106 languageName: node linkType: hard "@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": - version: 1.0.1 - resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" + version: 1.1.0 + resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.1.0" peerDependencies: react: ">=16.8.0" - checksum: 10/7d7ead9ba3f615510f550aea67815281ec5a5487de55aafc250f820317afc1fd419bd9e9e27602a0206ec5c152f13dc6130bccad312c1036706c584c65d66ef7 - languageName: node - linkType: hard - -"@emotion/utils@npm:^1.2.1": - version: 1.2.1 - resolution: "@emotion/utils@npm:1.2.1" - checksum: 10/472fa529c64a13edff80aa11698092e8841c1ffb5001c739d84eb9d0fdd6d8e1cd1848669310578ccfa6383b8601132eca54f8749fca40af85d21fdfc9b776c4 + checksum: 10/33a10f44a873b3f5ccd2a1a3d13c2f34ed628f5a2be1ccf28540a86535a14d3a930afcbef209d48346a22ec60ff48f43c86ee9c846b9480d23a55a17145da66c languageName: node linkType: hard -"@emotion/utils@npm:^1.4.0": +"@emotion/utils@npm:^1.2.1, @emotion/utils@npm:^1.4.0, @emotion/utils@npm:^1.4.1": version: 1.4.1 resolution: "@emotion/utils@npm:1.4.1" checksum: 10/95e56fc0c9e05cf01a96268f0486ce813f1109a8653d2f575c67df9e8765d9c1b2daf09ad1ada67d933efbb08ca7990228e14b210c713daf90156b4869abe6a7 @@ -7876,44 +6022,20 @@ __metadata: linkType: hard "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" + version: 4.4.1 + resolution: "@eslint-community/eslint-utils@npm:4.4.1" dependencies: - eslint-visitor-keys: "npm:^3.3.0" + eslint-visitor-keys: "npm:^3.4.3" peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10/8d70bcdcd8cd279049183aca747d6c2ed7092a5cf0cf5916faac1ef37ffa74f0c245c2a3a3d3b9979d9dfdd4ca59257b4c5621db699d637b847a2c5e02f491c2 + checksum: 10/ae92a11412674329b4bd38422518601ec9ceae28e251104d1cad83715da9d38e321f68c817c39b64e66d0af7d98df6f9a10ad2dc638911254b47fb8932df00ef languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1": - version: 4.6.2 - resolution: "@eslint-community/regexpp@npm:4.6.2" - checksum: 10/59ea2fa13a70996a8cebbd5a9f4499c92bceeff872286ef2fb34948fcfb9d3467692371d9cc116e7d613f2c18086a1c8337c9d461ccdf213f0dc47f6f6d2fbb6 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.6.1": - version: 4.9.1 - resolution: "@eslint-community/regexpp@npm:4.9.1" - checksum: 10/8f1ba51fa5dedd93f01623382d006c838a436aaea85561c7e540b15600988350843bf746a60e2aaefa79ee4904c9dc0a2f3f00e025b162112c76520ffb34805d - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^2.1.2": - version: 2.1.2 - resolution: "@eslint/eslintrc@npm:2.1.2" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10/fa25638f2666cac6810f98ee7d0f4b912f191806467c1b40d72bac759fffef0b3357f12a1869817286837b258e4de3517e0c7408520e156ca860fc53a1fbaed9 +"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": + version: 4.12.1 + resolution: "@eslint-community/regexpp@npm:4.12.1" + checksum: 10/c08f1dd7dd18fbb60bdd0d85820656d1374dd898af9be7f82cb00451313402a22d5e30569c150315b4385907cdbca78c22389b2a72ab78883b3173be317620cc languageName: node linkType: hard @@ -7934,13 +6056,6 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.48.0": - version: 8.48.0 - resolution: "@eslint/js@npm:8.48.0" - checksum: 10/55f6c58b046772c2bcb479366e23d9bd6fe9a32e2143729a593b6482d134debfb90bf49186ebd5884dcbab27c29f0baa2a47a3239afbae3622561eb82deed193 - languageName: node - linkType: hard - "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -7948,6 +6063,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:8.57.1": + version: 8.57.1 + resolution: "@eslint/js@npm:8.57.1" + checksum: 10/7562b21be10c2adbfa4aa5bb2eccec2cb9ac649a3569560742202c8d1cb6c931ce634937a2f0f551e078403a1c1285d6c2c0aa345dafc986149665cd69fe8b59 + languageName: node + linkType: hard + "@ethereumjs/common@npm:2.5.0": version: 2.5.0 resolution: "@ethereumjs/common@npm:2.5.0" @@ -7958,7 +6080,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.6.4": +"@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.5.0, @ethereumjs/common@npm:^2.6.4": version: 2.6.5 resolution: "@ethereumjs/common@npm:2.6.5" dependencies: @@ -7968,7 +6090,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:4.0.0, @ethereumjs/common@npm:^4.0.0": +"@ethereumjs/common@npm:4.0.0": version: 4.0.0 resolution: "@ethereumjs/common@npm:4.0.0" dependencies: @@ -7978,13 +6100,12 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^2.5.0": - version: 2.6.4 - resolution: "@ethereumjs/common@npm:2.6.4" +"@ethereumjs/common@npm:^4.0.0": + version: 4.4.0 + resolution: "@ethereumjs/common@npm:4.4.0" dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.4" - checksum: 10/2dcd913e298c234ceb8d23aab9cb4ad5e6e14d426cf8c331ccf053cc68c70532c42d24ca86d4897321421b44126decd9738597bb634d86d69442ec9efa9f3725 + "@ethereumjs/util": "npm:^9.1.0" + checksum: 10/dd5cc78575a762b367601f94d6af7e36cb3a5ecab45eec0c1259c433e755a16c867753aa88f331e3963791a18424ad0549682a3a6a0a160640fe846db6ce8014 languageName: node linkType: hard @@ -7997,16 +6118,7 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/rlp@npm:^5.0.0": - version: 5.0.0 - resolution: "@ethereumjs/rlp@npm:5.0.0" - bin: - rlp: bin/rlp - checksum: 10/ed2478580489f0adbb037b8c054b178ab2f22e0b1417470fb6659e655436a3a5c9762030f29c5ab64db6a902911fcad92eeaebdfe59d0561a6ecc149d1a42f06 - languageName: node - linkType: hard - -"@ethereumjs/rlp@npm:^5.0.2": +"@ethereumjs/rlp@npm:^5.0.0, @ethereumjs/rlp@npm:^5.0.2": version: 5.0.2 resolution: "@ethereumjs/rlp@npm:5.0.2" bin: @@ -8063,18 +6175,13 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/util@npm:^9.0.0": - version: 9.0.0 - resolution: "@ethereumjs/util@npm:9.0.0" +"@ethereumjs/util@npm:^9.0.0, @ethereumjs/util@npm:^9.1.0": + version: 9.1.0 + resolution: "@ethereumjs/util@npm:9.1.0" dependencies: - "@ethereumjs/rlp": "npm:^5.0.0" - ethereum-cryptography: "npm:^2.1.2" - peerDependencies: - c-kzg: ^2.1.0 - peerDependenciesMeta: - c-kzg: - optional: true - checksum: 10/a7d15ef4bda52141f9aeab7fe23fc49cd280f89127c8b7868a36681765b66b28a258e9d47b15356d6506632679becfe0c7733f9daf6dd2b6d26acda5f79a8ce8 + "@ethereumjs/rlp": "npm:^5.0.2" + ethereum-cryptography: "npm:^2.2.1" + checksum: 10/4e22c4081c63eebb808eccd54f7f91cd3407f4cac192da5f30a0d6983fe07d51f25e6a9d08624f1376e604bb7dce574aafcf0fbf0becf42f62687c11e710ac41 languageName: node linkType: hard @@ -8095,7 +6202,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": +"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abi@npm:5.7.0" dependencies: @@ -8112,23 +6219,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:^5.1.2": - version: 5.5.0 - resolution: "@ethersproject/abi@npm:5.5.0" - dependencies: - "@ethersproject/address": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/constants": "npm:^5.5.0" - "@ethersproject/hash": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/strings": "npm:^5.5.0" - checksum: 10/bd1e112b198a39b062f94e70ec62be07829a2d3c607488d613315de5efdb6e8fed9bb988a5161174dc0daee8034bb4ddd7e30e03668b4486189d46dd257ca674 - languageName: node - linkType: hard - "@ethersproject/abstract-provider@npm:5.7.0, @ethersproject/abstract-provider@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abstract-provider@npm:5.7.0" @@ -8144,21 +6234,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abstract-provider@npm:^5.5.0": - version: 5.5.1 - resolution: "@ethersproject/abstract-provider@npm:5.5.1" - dependencies: - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/networks": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/transactions": "npm:^5.5.0" - "@ethersproject/web": "npm:^5.5.0" - checksum: 10/0668055c01a130dee9c6f5d43bb901e54bd4430dd158ea01730038e35a2b9d1f8feb76738628ee884a44f11cf4de1612e303bad908bde39f0d0def8ea228d043 - languageName: node - linkType: hard - "@ethersproject/abstract-signer@npm:5.7.0, @ethersproject/abstract-signer@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abstract-signer@npm:5.7.0" @@ -8172,20 +6247,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abstract-signer@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/abstract-signer@npm:5.5.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - checksum: 10/e29b49a0e8ce6d61873fe7de310288e498e2be3db9205b384bc098ad67fe46364750b64cdd6df6ce0a6090b5aac5e5d05e07f2737ba8ce14ed97080d2ea4fddb - languageName: node - linkType: hard - -"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5.7.0": +"@ethersproject/address@npm:5.7.0, @ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/address@npm:5.7.0" dependencies: @@ -8198,19 +6260,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/address@npm:^5.0.4, @ethersproject/address@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/address@npm:5.5.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/rlp": "npm:^5.5.0" - checksum: 10/b38c4efd61434f720b33f4a398f5ddbc8a1234bbfccb6895ef73b3f7c27b2e0af4a874769a76e31c48659701800fa50d177fa3adf547094aca31c510adf1b11c - languageName: node - linkType: hard - "@ethersproject/base64@npm:5.7.0, @ethersproject/base64@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/base64@npm:5.7.0" @@ -8220,15 +6269,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/base64@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/base64@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - checksum: 10/563991f6fc8bed96f04b99578de0126296ba48d8df283bcd811668191365ba533c9b46f85cd9b1ea9ee017e786d515ea7b592de8d6374609be05785469c1af74 - languageName: node - linkType: hard - "@ethersproject/basex@npm:5.7.0, @ethersproject/basex@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/basex@npm:5.7.0" @@ -8239,7 +6279,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bignumber@npm:5.7.0, @ethersproject/bignumber@npm:^5.7.0": +"@ethersproject/bignumber@npm:5.7.0, @ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/bignumber@npm:5.7.0" dependencies: @@ -8250,18 +6290,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bignumber@npm:^5.0.7, @ethersproject/bignumber@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/bignumber@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - bn.js: "npm:^4.11.9" - checksum: 10/3da18cee3138de4c3d1293c6067c387597dccc4326fffa1594ae40d98cd5fb83d116ab3730b671254ba07dfe488089fc762cb5d409e6d4d0962cae6ff7156c18 - languageName: node - linkType: hard - -"@ethersproject/bytes@npm:5.7.0, @ethersproject/bytes@npm:^5.7.0": +"@ethersproject/bytes@npm:5.7.0, @ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/bytes@npm:5.7.0" dependencies: @@ -8270,16 +6299,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/bytes@npm:^5.0.4, @ethersproject/bytes@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/bytes@npm:5.5.0" - dependencies: - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/f5ce43064f516b34d1365b6f89761094e432647fbea6c97de960f7ca84ffc97254c48bbe310c4b493738a49a707a18748094f7cff2400fc0d20608a503d50bd6 - languageName: node - linkType: hard - -"@ethersproject/constants@npm:5.7.0, @ethersproject/constants@npm:^5.7.0": +"@ethersproject/constants@npm:5.7.0, @ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/constants@npm:5.7.0" dependencies: @@ -8288,15 +6308,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/constants@npm:^5.0.4, @ethersproject/constants@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/constants@npm:5.5.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.5.0" - checksum: 10/20519ec5abcbff6d2a7f1260f58b33e1c472abdfb2ee3d5428d08091484fed572f8f873b1cb0410f9248f92512016bbf680324f9f2a537b5f65413a6a1359fd3 - languageName: node - linkType: hard - "@ethersproject/contracts@npm:5.7.0": version: 5.7.0 resolution: "@ethersproject/contracts@npm:5.7.0" @@ -8315,7 +6326,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hash@npm:5.7.0, @ethersproject/hash@npm:^5.7.0": +"@ethersproject/hash@npm:5.7.0, @ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/hash@npm:5.7.0" dependencies: @@ -8332,22 +6343,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/hash@npm:5.5.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.5.0" - "@ethersproject/address": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/strings": "npm:^5.5.0" - checksum: 10/d6bf33bb96a76f35357f026632c52e931da1f47d1a257c35a5e7714bd5b8af78fc297b4f5ab85565fd3c6993c75bc59dd91c5e59f419b1e1c6d86c4c5f8c0886 - languageName: node - linkType: hard - "@ethersproject/hdnode@npm:5.7.0, @ethersproject/hdnode@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/hdnode@npm:5.7.0" @@ -8389,7 +6384,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.7.0": +"@ethersproject/keccak256@npm:5.7.0, @ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/keccak256@npm:5.7.0" dependencies: @@ -8399,30 +6394,13 @@ __metadata: languageName: node linkType: hard -"@ethersproject/keccak256@npm:^5.0.3, @ethersproject/keccak256@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/keccak256@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - js-sha3: "npm:0.8.0" - checksum: 10/587590c8448f3e1db52320d4fecc807d94a8ee83253110c076c7f8ce3b3127f7fd56c302f1ee80e6bc2764a4949a490ee5143344fabfad2a65020dc2f5896a85 - languageName: node - linkType: hard - -"@ethersproject/logger@npm:5.7.0, @ethersproject/logger@npm:^5.7.0": +"@ethersproject/logger@npm:5.7.0, @ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/logger@npm:5.7.0" checksum: 10/683a939f467ae7510deedc23d7611d0932c3046137f5ffb92ba1e3c8cd9cf2fbbaa676b660c248441a0fa9143783137c46d6e6d17d676188dd5a6ef0b72dd091 languageName: node linkType: hard -"@ethersproject/logger@npm:^5.0.5, @ethersproject/logger@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/logger@npm:5.5.0" - checksum: 10/84269c2221ae03fc11f0017f6fe3b6ad2c29e11ed09b1182511379e9f40ff22dd09043c0bff995f82e37849f21e2eafa5e8a2b4e25a81b9f4f805432d9d6914c - languageName: node - linkType: hard - "@ethersproject/networks@npm:5.7.1, @ethersproject/networks@npm:^5.7.0": version: 5.7.1 resolution: "@ethersproject/networks@npm:5.7.1" @@ -8432,15 +6410,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/networks@npm:^5.5.0": - version: 5.5.2 - resolution: "@ethersproject/networks@npm:5.5.2" - dependencies: - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/09626f4d0a67b543462c19e4afaa12f422165eb3b6ba3b2e289c1cb49e508486887934447bbd53f276d6d532bff8a096cc53142b26df3f6a9c95597e0862da72 - languageName: node - linkType: hard - "@ethersproject/pbkdf2@npm:5.7.0, @ethersproject/pbkdf2@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/pbkdf2@npm:5.7.0" @@ -8451,7 +6420,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/properties@npm:5.7.0, @ethersproject/properties@npm:^5.7.0": +"@ethersproject/properties@npm:5.7.0, @ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/properties@npm:5.7.0" dependencies: @@ -8460,15 +6429,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/properties@npm:^5.0.3, @ethersproject/properties@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/properties@npm:5.5.0" - dependencies: - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/d395a534f0a7009920b8a3c095a838088b190f84ba07a7263e3e3c4857dcdf3933560dc9fcfd6c7fa0456c00b5dfc988b8999e1286157178715069c78209408a - languageName: node - linkType: hard - "@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" @@ -8517,16 +6477,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/rlp@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/rlp@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/046c3e53fdb6aec68d11f961738d34aae5cf60220ce7f3774d20e2742c2912c49a72671905507ce510bc45d55c9341e6dd117d3c984a0dc8a750074497852967 - languageName: node - linkType: hard - "@ethersproject/sha2@npm:5.7.0, @ethersproject/sha2@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/sha2@npm:5.7.0" @@ -8552,20 +6502,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/signing-key@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/signing-key@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - bn.js: "npm:^4.11.9" - elliptic: "npm:6.5.4" - hash.js: "npm:1.1.7" - checksum: 10/3c426346bceb73d799f508d61fcebcc5459c42a3eba6292fa11ea7520b849609cb4c29d7aa9f8f9b1cda967b672725d298f1f7c616176eecb7a793d9fa81af1b - languageName: node - linkType: hard - "@ethersproject/solidity@npm:5.7.0": version: 5.7.0 resolution: "@ethersproject/solidity@npm:5.7.0" @@ -8580,7 +6516,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/strings@npm:5.7.0, @ethersproject/strings@npm:^5.7.0": +"@ethersproject/strings@npm:5.7.0, @ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/strings@npm:5.7.0" dependencies: @@ -8591,18 +6527,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/strings@npm:^5.0.4, @ethersproject/strings@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/strings@npm:5.5.0" - dependencies: - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/constants": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - checksum: 10/dd3d601a91ad65049d994bd19e72aa179dfba31d001e8667c82fa7c3f6ae26774cbbc35428f744f397e154918641ff4db10e3e5b49dac9ea8e08807441d5b168 - languageName: node - linkType: hard - -"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": +"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.0.0-beta.135, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/transactions@npm:5.7.0" dependencies: @@ -8619,23 +6544,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/transactions@npm:^5.0.0-beta.135, @ethersproject/transactions@npm:^5.5.0": - version: 5.5.0 - resolution: "@ethersproject/transactions@npm:5.5.0" - dependencies: - "@ethersproject/address": "npm:^5.5.0" - "@ethersproject/bignumber": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/constants": "npm:^5.5.0" - "@ethersproject/keccak256": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/rlp": "npm:^5.5.0" - "@ethersproject/signing-key": "npm:^5.5.0" - checksum: 10/f92868be223abcdbf29ae698162cba4168169f4acd7751fe911dbfe455a7d667d2bf731bbb02c667672ea70694a453d7d95de7b2e8d622b79e8208c326d18e53 - languageName: node - linkType: hard - "@ethersproject/units@npm:5.7.0": version: 5.7.0 resolution: "@ethersproject/units@npm:5.7.0" @@ -8683,19 +6591,6 @@ __metadata: languageName: node linkType: hard -"@ethersproject/web@npm:^5.5.0": - version: 5.5.1 - resolution: "@ethersproject/web@npm:5.5.1" - dependencies: - "@ethersproject/base64": "npm:^5.5.0" - "@ethersproject/bytes": "npm:^5.5.0" - "@ethersproject/logger": "npm:^5.5.0" - "@ethersproject/properties": "npm:^5.5.0" - "@ethersproject/strings": "npm:^5.5.0" - checksum: 10/3cf4e9726578ea2460c01a5b59969782265cf41e0c5c52f04270c313c87d50766864bdd64a3b022c50c16b0e26c76a4729d33253ac76b5d11f5fb3bd815a0541 - languageName: node - linkType: hard - "@ethersproject/wordlists@npm:5.7.0, @ethersproject/wordlists@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/wordlists@npm:5.7.0" @@ -8721,9 +6616,9 @@ __metadata: linkType: hard "@fastify/busboy@npm:^2.0.0": - version: 2.0.0 - resolution: "@fastify/busboy@npm:2.0.0" - checksum: 10/6a2366d06b82aac1069b8323792f76f7a8fca02533cb3745fcd218d8f0f953dc4dbef057287237414658cd43f8dede0846ef33398999e3dbe54ddaeefec71c0a + version: 2.1.1 + resolution: "@fastify/busboy@npm:2.1.1" + checksum: 10/2bb8a7eca8289ed14c9eb15239bc1019797454624e769b39a0b90ed204d032403adc0f8ed0d2aef8a18c772205fa7808cf5a1b91f21c7bfc7b6032150b1062c5 languageName: node linkType: hard @@ -8769,41 +6664,41 @@ __metadata: languageName: node linkType: hard -"@floating-ui/core@npm:^1.0.0": - version: 1.6.0 - resolution: "@floating-ui/core@npm:1.6.0" +"@floating-ui/core@npm:^1.6.0": + version: 1.6.8 + resolution: "@floating-ui/core@npm:1.6.8" dependencies: - "@floating-ui/utils": "npm:^0.2.1" - checksum: 10/d6a47cacde193cd8ccb4c268b91ccc4ca254dffaec6242b07fd9bcde526044cc976d27933a7917f9a671de0a0e27f8d358f46400677dbd0c8199de293e9746e1 + "@floating-ui/utils": "npm:^0.2.8" + checksum: 10/87d52989c3d2cc80373bc153b7a40814db3206ce7d0b2a2bdfb63e2ff39ffb8b999b1b0ccf28e548000ebf863bf16e2bed45eab4c4d287a5dbe974ef22368d82 languageName: node linkType: hard -"@floating-ui/dom@npm:^1.6.1": - version: 1.6.3 - resolution: "@floating-ui/dom@npm:1.6.3" +"@floating-ui/dom@npm:^1.0.0": + version: 1.6.12 + resolution: "@floating-ui/dom@npm:1.6.12" dependencies: - "@floating-ui/core": "npm:^1.0.0" - "@floating-ui/utils": "npm:^0.2.0" - checksum: 10/83e97076c7a5f55c3506f574bc53f03d38bed6eb8181920c8733076889371e287e9ae6f28c520a076967759b9b6ff425362832a5cdf16a999069530dbb9cce53 + "@floating-ui/core": "npm:^1.6.0" + "@floating-ui/utils": "npm:^0.2.8" + checksum: 10/5c8e5fdcd3843140a606ab6dc6c12ad740f44e66b898966ef877393faaede0bbe14586e1049e2c2f08856437da8847e884a2762e78275fefa65a5a9cd71e580d languageName: node linkType: hard "@floating-ui/react-dom@npm:^2.0.8": - version: 2.0.8 - resolution: "@floating-ui/react-dom@npm:2.0.8" + version: 2.1.2 + resolution: "@floating-ui/react-dom@npm:2.1.2" dependencies: - "@floating-ui/dom": "npm:^1.6.1" + "@floating-ui/dom": "npm:^1.0.0" peerDependencies: react: ">=16.8.0" react-dom: ">=16.8.0" - checksum: 10/e57b2a498aecf8de0ec28adf434257fca7893bd9bd7e78b63ac98c63b29b9fc086fc175630154352f3610f5c4a0d329823837f4f6c235cc0459fde6417065590 + checksum: 10/2a67dc8499674e42ff32c7246bded185bb0fdd492150067caf9568569557ac4756a67787421d8604b0f241e5337de10762aee270d9aeef106d078a0ff13596c4 languageName: node linkType: hard -"@floating-ui/utils@npm:^0.2.0, @floating-ui/utils@npm:^0.2.1": - version: 0.2.1 - resolution: "@floating-ui/utils@npm:0.2.1" - checksum: 10/33c9ab346e7b05c5a1e6a95bc902aafcfc2c9d513a147e2491468843bd5607531b06d0b9aa56aa491cbf22a6c2495c18ccfc4c0344baec54a689a7bb8e4898d6 +"@floating-ui/utils@npm:^0.2.8": + version: 0.2.8 + resolution: "@floating-ui/utils@npm:0.2.8" + checksum: 10/3e3ea3b2de06badc4baebdf358b3dbd77ccd9474a257a6ef237277895943db2acbae756477ec64de65a2a1436d94aea3107129a1feeef6370675bf2b161c1abc languageName: node linkType: hard @@ -8986,13 +6881,13 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:1.11.1": - version: 1.11.1 - resolution: "@grpc/grpc-js@npm:1.11.1" +"@grpc/grpc-js@npm:1.11.2": + version: 1.11.2 + resolution: "@grpc/grpc-js@npm:1.11.2" dependencies: "@grpc/proto-loader": "npm:^0.7.13" "@js-sdsl/ordered-map": "npm:^4.4.2" - checksum: 10/28fb8d0bbccc0a8f9f73899e6f982e5e762e8f0c009eb9234d4067021f96896479be76463f8a02b80d13ecfd52817ae6d0a189f6cfe22fd32df0505bf577a720 + checksum: 10/05bc4bbc9907017e723de7c3a776a07155b522c1a56f68cc89655eeee3f72f00f4c31584e908c250495344f384d9528c18a44db0976783fd17e338a563df6f84 languageName: node linkType: hard @@ -9006,6 +6901,16 @@ __metadata: languageName: node linkType: hard +"@grpc/grpc-js@npm:^1.10.9": + version: 1.12.2 + resolution: "@grpc/grpc-js@npm:1.12.2" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/0d0556da8515704b5e722b86097e04693d8c71ba286a076270a96e1ac3a4950e87559c718cc2875d3fcaa6cb8e07d0cc6b1db2673b8940829dfe8b75197844dd + languageName: node + linkType: hard + "@grpc/grpc-js@npm:~1.7.3": version: 1.7.3 resolution: "@grpc/grpc-js@npm:1.7.3" @@ -9016,27 +6921,17 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:~1.9.0": - version: 1.9.6 - resolution: "@grpc/grpc-js@npm:1.9.6" - dependencies: - "@grpc/proto-loader": "npm:^0.7.8" - "@types/node": "npm:>=12.12.47" - checksum: 10/8ece98f3c35448d7aeb63437576f30cfae22958d51991cfdddfcd57cf11a3bad6381aded55187c3fc4d3100c69e803b4bc698a31ffb1334438f65f43da4dfd99 - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:~1.9.6": - version: 1.9.9 - resolution: "@grpc/grpc-js@npm:1.9.9" +"@grpc/grpc-js@npm:~1.9.0, @grpc/grpc-js@npm:~1.9.6": + version: 1.9.15 + resolution: "@grpc/grpc-js@npm:1.9.15" dependencies: "@grpc/proto-loader": "npm:^0.7.8" "@types/node": "npm:>=12.12.47" - checksum: 10/80f9d8eac4dc46fa18fc81dbb06e6a1af11e61935be696a9f6434795ed899600fa8f1dc315711526c6600d57ad5472e502dee74a274ce01a0699d8c8efef2827 + checksum: 10/edd45c5970046ebb1bb54856f22a41186742c77dfb7e5182ca615f690f1a320af3abeef553d8924812d56911157a04882c7d264c2de64f326f8df7d473c47b2a languageName: node linkType: hard -"@grpc/proto-loader@npm:0.7.13, @grpc/proto-loader@npm:^0.7.13": +"@grpc/proto-loader@npm:0.7.13, @grpc/proto-loader@npm:^0.7.0, @grpc/proto-loader@npm:^0.7.13, @grpc/proto-loader@npm:^0.7.8": version: 0.7.13 resolution: "@grpc/proto-loader@npm:0.7.13" dependencies: @@ -9050,43 +6945,7 @@ __metadata: languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.0": - version: 0.7.7 - resolution: "@grpc/proto-loader@npm:0.7.7" - dependencies: - "@types/long": "npm:^4.0.1" - lodash.camelcase: "npm:^4.3.0" - long: "npm:^4.0.0" - protobufjs: "npm:^7.0.0" - yargs: "npm:^17.7.2" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/0f9401c43f419bd1e2dea50f3bef37406ae55b3c55786c61995caf9bf1d8c53e9cd0df2721f6abaee0a23a470f1937a6d05b635b0800a306a147806c1ede8b3a - languageName: node - linkType: hard - -"@grpc/proto-loader@npm:^0.7.8": - version: 0.7.10 - resolution: "@grpc/proto-loader@npm:0.7.10" - dependencies: - lodash.camelcase: "npm:^4.3.0" - long: "npm:^5.0.0" - protobufjs: "npm:^7.2.4" - yargs: "npm:^17.7.2" - bin: - proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 10/1fdc0b10480614cecc4bf52578756cbf59ec75f1bea37452947125eff81cd3ceabba04606247ed8361f97bcd00d147ca4118abc22b046cc0541cb749671b97d9 - languageName: node - linkType: hard - -"@hapi/hoek@npm:^9.0.0": - version: 9.2.1 - resolution: "@hapi/hoek@npm:9.2.1" - checksum: 10/dd1268451a5072b005233da5b1d13d9e2d232b22ca44526275dc8d21992a5669221ec6c0706adc4341f85e24ca0fd6988b727e356b9c436128ab4e336593c35d - languageName: node - linkType: hard - -"@hapi/hoek@npm:^9.3.0": +"@hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.3.0": version: 9.3.0 resolution: "@hapi/hoek@npm:9.3.0" checksum: 10/ad83a223787749f3873bce42bd32a9a19673765bf3edece0a427e138859ff729469e68d5fdf9ff6bbee6fb0c8e21bab61415afa4584f527cfc40b59ea1957e70 @@ -9102,17 +6961,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.10": - version: 0.11.11 - resolution: "@humanwhocodes/config-array@npm:0.11.11" - dependencies: - "@humanwhocodes/object-schema": "npm:^1.2.1" - debug: "npm:^4.1.1" - minimatch: "npm:^3.0.5" - checksum: 10/4aad64bc4c68ec99a72c91ad9a8a9070e8da47e8fc4f51eefa2eaf56f4b0cae17dfc3ff82eb9268298f687b5bb3b68669ff542203c77bcd400dc27924d56cad6 - languageName: node - linkType: hard - "@humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" @@ -9124,6 +6972,17 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/config-array@npm:^0.13.0": + version: 0.13.0 + resolution: "@humanwhocodes/config-array@npm:0.13.0" + dependencies: + "@humanwhocodes/object-schema": "npm:^2.0.3" + debug: "npm:^4.3.1" + minimatch: "npm:^3.0.5" + checksum: 10/524df31e61a85392a2433bf5d03164e03da26c03d009f27852e7dcfdafbc4a23f17f021dacf88e0a7a9fe04ca032017945d19b57a16e2676d9114c22a53a9d11 + languageName: node + linkType: hard + "@humanwhocodes/module-importer@npm:^1.0.1": version: 1.0.1 resolution: "@humanwhocodes/module-importer@npm:1.0.1" @@ -9131,17 +6990,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^1.2.1": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: 10/b48a8f87fcd5fdc4ac60a31a8bf710d19cc64556050575e6a35a4a48a8543cf8cde1598a65640ff2cdfbfd165b38f9db4fa3782bea7848eb585cc3db824002e6 - languageName: node - linkType: hard - -"@humanwhocodes/object-schema@npm:^2.0.2": - version: 2.0.2 - resolution: "@humanwhocodes/object-schema@npm:2.0.2" - checksum: 10/ef915e3e2f34652f3d383b28a9a99cfea476fa991482370889ab14aac8ecd2b38d47cc21932526c6d949da0daf4a4a6bf629d30f41b0caca25e146819cbfa70e +"@humanwhocodes/object-schema@npm:^2.0.2, @humanwhocodes/object-schema@npm:^2.0.3": + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 languageName: node linkType: hard @@ -9601,6 +7453,21 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-api-client@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-api-client@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-consortium-manual": "npm:2.0.0-rc.7" + jsonwebtoken: "npm:9.0.0" + rxjs: "npm:7.8.1" + socket.io-client-fixed-types: "npm:4.5.4" + checksum: 10/5af636a87238d7ecbc4da0e19f71354f33e0545858f1af99b94756523da4bbbe2c417c718b7d4d1145b3c44c88e6b5b82af531a1bea348c9407e5978935a2965 + languageName: node + linkType: hard + "@hyperledger/cactus-cmd-api-server@npm:2.0.0, @hyperledger/cactus-cmd-api-server@workspace:packages/cactus-cmd-api-server": version: 0.0.0-use.local resolution: "@hyperledger/cactus-cmd-api-server@workspace:packages/cactus-cmd-api-server" @@ -9680,6 +7547,54 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-cmd-api-server@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-cmd-api-server@npm:2.0.0-rc.7" + dependencies: + "@bufbuild/protobuf": "npm:1.10.0" + "@connectrpc/connect": "npm:1.4.0" + "@connectrpc/connect-express": "npm:1.4.0" + "@connectrpc/connect-fastify": "npm:1.4.0" + "@connectrpc/connect-node": "npm:1.4.0" + "@grpc/grpc-js": "npm:1.11.2" + "@grpc/proto-loader": "npm:0.7.13" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + "@thream/socketio-jwt": "npm:2.1.1" + async-exit-hook: "npm:2.0.1" + axios: "npm:1.7.7" + bluebird: "npm:3.7.2" + body-parser: "npm:1.20.3" + compression: "npm:1.7.4" + convict: "npm:6.2.4" + convict-format-with-validator: "npm:6.2.0" + cors: "npm:2.8.5" + express: "npm:4.20.0" + express-http-proxy: "npm:1.6.2" + express-jwt: "npm:8.4.1" + express-openapi-validator: "npm:5.2.0" + express-rate-limit: "npm:6.7.0" + fastify: "npm:4.26.2" + fs-extra: "npm:11.2.0" + google-protobuf: "npm:3.21.4" + jose: "npm:4.15.5" + json-stable-stringify: "npm:1.0.2" + lmify: "npm:0.3.0" + node-forge: "npm:1.3.0" + prom-client: "npm:15.1.3" + run-time-error-cjs: "npm:1.4.0" + rxjs: "npm:7.8.1" + safe-stable-stringify: "npm:2.4.3" + semver: "npm:7.6.2" + socket.io: "npm:4.6.2" + socket.io-client-fixed-types: "npm:4.5.4" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + checksum: 10/b2da3c309ce21b72790de8d22243f29cff81b00bddb7393c5bbcf573382f19ce16aa08496b751c8460640291bb6d043644df8c129b7da57f55aa24a4560f2f89 + languageName: node + linkType: hard + "@hyperledger/cactus-common-example-server@npm:2.0.0, @hyperledger/cactus-common-example-server@workspace:examples/cactus-common-example-server": version: 0.0.0-use.local resolution: "@hyperledger/cactus-common-example-server@workspace:examples/cactus-common-example-server" @@ -9760,6 +7675,23 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-common@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-common@npm:2.0.0-rc.7" + dependencies: + fast-safe-stringify: "npm:2.1.1" + json-stable-stringify: "npm:1.0.1" + key-encoder: "npm:2.0.3" + loglevel: "npm:1.7.1" + loglevel-plugin-prefix: "npm:0.8.4" + run-time-error-cjs: "npm:1.4.0" + sanitize-html: "npm:2.12.1" + secp256k1: "npm:4.0.3" + sha3: "npm:2.1.4" + checksum: 10/bafc8cd90feead17503d3d4fc486c181ce1ea7b464aae6a1dfbaf3b2c8dc44ef2e27ac7f27aa2216fbba0f67a66a581019a64ce9eb89b1882a9a14e76bb049e5 + languageName: node + linkType: hard + "@hyperledger/cactus-core-api@npm:2.0.0, @hyperledger/cactus-core-api@workspace:packages/cactus-core-api": version: 0.0.0-use.local resolution: "@hyperledger/cactus-core-api@workspace:packages/cactus-core-api" @@ -9786,6 +7718,21 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-core-api@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-core-api@npm:2.0.0-rc.7" + dependencies: + "@grpc/grpc-js": "npm:1.11.2" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + ajv: "npm:8.17.1" + ajv-draft-04: "npm:1.0.0" + ajv-formats: "npm:3.0.1" + axios: "npm:1.7.7" + google-protobuf: "npm:3.21.4" + checksum: 10/12bb6d9eb77a7ca0b80aefec6f740672e172e6c02b840c9ad1756b8411be8b2cd0ee63fd5d2a3c5699f6ef7ecc3b3ec9eec854659ebec507362646131836e0e0 + languageName: node + linkType: hard + "@hyperledger/cactus-core@npm:2.0.0, @hyperledger/cactus-core@workspace:packages/cactus-core": version: 0.0.0-use.local resolution: "@hyperledger/cactus-core@workspace:packages/cactus-core" @@ -9809,6 +7756,25 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-core@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-core@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + body-parser: "npm:1.20.3" + express: "npm:4.20.0" + express-jwt-authz: "npm:2.4.1" + express-openapi-validator: "npm:5.2.0" + http-errors: "npm:2.0.0" + http-errors-enhanced-cjs: "npm:2.0.1" + run-time-error-cjs: "npm:1.4.0" + safe-stable-stringify: "npm:2.4.3" + typescript-optional: "npm:2.0.1" + checksum: 10/adf674bc37907c2b1adad5090b4cee5bbfd5ddcf0d9bcc80560793a667033b636a4ad06a991c86a0f10109995da51289724db06a669348270cf528002632e418 + languageName: node + linkType: hard + "@hyperledger/cactus-example-carbon-accounting-backend@workspace:examples/cactus-example-carbon-accounting-backend": version: 0.0.0-use.local resolution: "@hyperledger/cactus-example-carbon-accounting-backend@workspace:examples/cactus-example-carbon-accounting-backend" @@ -9912,10 +7878,49 @@ __metadata: languageName: unknown linkType: soft -"@hyperledger/cactus-example-cbdc-bridging-backend@npm:2.0.0-rc.7, @hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend": +"@hyperledger/cactus-example-cbdc-bridging-backend@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-example-cbdc-bridging-backend@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-api-client": "npm:2.0.0-rc.7" + "@hyperledger/cactus-cmd-api-server": "npm:2.0.0-rc.7" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-ledger-connector-xdai": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-object-store-ipfs": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-satp-hermes": "npm:2.0.0-rc.7" + "@hyperledger/cactus-test-tooling": "npm:2.0.0-rc.7" + "@openzeppelin/contracts": "npm:4.9.6" + "@openzeppelin/contracts-upgradeable": "npm:4.9.6" + async-exit-hook: "npm:2.0.1" + axios: "npm:1.7.7" + crypto-js: "npm:4.2.0" + dotenv: "npm:16.0.1" + fabric-network: "npm:2.2.20" + fs-extra: "npm:11.2.0" + knex: "npm:2.5.1" + kubo-rpc-client: "npm:3.0.1" + nyc: "npm:13.1.0" + openapi-types: "npm:12.1.3" + sqlite3: "npm:5.1.5" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + web3-core: "npm:1.10.1" + web3-utils: "npm:1.10.1" + checksum: 10/fd62bf56f3c323d67f9a1558cf51a28d47720d5a5a2be62a40ff9b6e9e1926da6a92311c3cad8c6feceb2989ec765a9c76a9e32fcca936c8411f89631967482b + languageName: node + linkType: hard + +"@hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend": version: 0.0.0-use.local resolution: "@hyperledger/cactus-example-cbdc-bridging-backend@workspace:examples/cactus-example-cbdc-bridging-backend" dependencies: + "@apidevtools/swagger-cli": "npm:4.0.4" + "@foundry-rs/hardhat-forge": "npm:0.1.17" "@hyperledger/cactus-api-client": "npm:2.0.0" "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" "@hyperledger/cactus-common": "npm:2.0.0" @@ -9928,22 +7933,27 @@ __metadata: "@hyperledger/cactus-plugin-object-store-ipfs": "npm:2.0.0" "@hyperledger/cactus-plugin-satp-hermes": "npm:2.0.0" "@hyperledger/cactus-test-tooling": "npm:2.0.0" - "@openzeppelin/contracts": "npm:4.9.6" + "@openzeppelin/contracts": "npm:5.0.2" "@openzeppelin/contracts-upgradeable": "npm:4.9.6" "@types/crypto-js": "npm:4.1.1" "@types/cucumber": "npm:4.0.4" "@types/express": "npm:5.0.0" "@types/express-jwt": "npm:6.0.2" - "@types/fs-extra": "npm:11.0.4" + "@types/fs-extra": "npm:9.0.13" "@types/node": "npm:18.11.9" - "@types/uuid": "npm:10.0.0" + "@types/swagger-ui-express": "npm:4.1.6" + "@types/uuid": "npm:9.0.8" async-exit-hook: "npm:2.0.1" axios: "npm:1.7.7" + body-parser: "npm:1.20.3" + cors: "npm:2.8.5" crypto-js: "npm:4.2.0" cucumber: "npm:5.0.3" - dotenv: "npm:16.0.1" + dotenv: "npm:16.4.5" + ethereum-abi-types-generator: "npm:1.3.4" + express: "npm:4.21.0" fabric-network: "npm:2.2.20" - fs-extra: "npm:11.2.0" + fs-extra: "npm:10.1.0" hardhat: "npm:2.17.2" http-status-codes: "npm:2.1.4" jose: "npm:4.15.5" @@ -9953,11 +7963,12 @@ __metadata: nyc: "npm:13.1.0" openapi-types: "npm:12.1.3" remix-tests: "npm:0.1.34" + socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" swagger-cli: "npm:4.0.4" ts-node: "npm:10.9.2" typescript-optional: "npm:2.0.1" - uuid: "npm:10.0.0" + uuid: "npm:9.0.1" web3-core: "npm:1.10.1" web3-utils: "npm:1.10.1" webpack: "npm:^5.94.0" @@ -10175,7 +8186,7 @@ __metadata: languageName: unknown linkType: soft -"@hyperledger/cactus-plugin-bungee-hermes@npm:2.0.0-rc.7, @hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes": +"@hyperledger/cactus-plugin-bungee-hermes@npm:2.0.0, @hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-bungee-hermes@workspace:packages/cactus-plugin-bungee-hermes" dependencies: @@ -10212,6 +8223,34 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-ccmodel-hephaestus@workspace:packages/cactus-plugin-ccmodel-hephaestus": + version: 0.0.0-use.local + resolution: "@hyperledger/cactus-plugin-ccmodel-hephaestus@workspace:packages/cactus-plugin-ccmodel-hephaestus" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0" + "@hyperledger/cactus-core": "npm:2.0.0" + "@hyperledger/cactus-core-api": "npm:2.0.0" + "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" + "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" + "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" + "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" + "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0" + "@hyperledger/cactus-test-tooling": "npm:2.0.0" + "@types/express": "npm:5.0.0" + "@types/uuid": "npm:10.0.0" + body-parser: "npm:1.20.3" + express: "npm:4.21.0" + fabric-network: "npm:2.2.20" + run-time-error-cjs: "npm:1.4.0" + rxjs: "npm:7.8.1" + socket.io: "npm:4.6.2" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + web3: "npm:1.6.1" + web3-core: "npm:1.6.1" + languageName: unknown + linkType: soft + "@hyperledger/cactus-plugin-consortium-manual@npm:2.0.0, @hyperledger/cactus-plugin-consortium-manual@workspace:packages/cactus-plugin-consortium-manual": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-consortium-manual@workspace:packages/cactus-plugin-consortium-manual" @@ -10233,6 +8272,25 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-consortium-manual@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-consortium-manual@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + body-parser: "npm:1.20.3" + express: "npm:4.20.0" + jose: "npm:4.15.5" + json-stable-stringify: "npm:1.0.1" + prom-client: "npm:15.1.3" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + checksum: 10/ebca6b107897ef321322415ecbe7173f0294db6ff09575c8a148a44fe53182c0cc794ca584836e4998d27634f35f4b4fd762fe2ae02fd952f63755b92445e5fa + languageName: node + linkType: hard + "@hyperledger/cactus-plugin-htlc-coordinator-besu@workspace:extensions/cactus-plugin-htlc-coordinator-besu": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-htlc-coordinator-besu@workspace:extensions/cactus-plugin-htlc-coordinator-besu" @@ -10424,6 +8482,24 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-keychain-memory@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-keychain-memory@npm:2.0.0-rc.7" + dependencies: + "@bufbuild/protobuf": "npm:1.10.0" + "@connectrpc/connect": "npm:1.4.0" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + express: "npm:4.20.0" + prom-client: "npm:15.1.3" + rxjs: "npm:7.8.1" + uuid: "npm:10.0.0" + checksum: 10/bc644527271a60de8d9227274129423fd77c30d3dfb71c55f644b2621ba2f56ea13b7c722931889b13223d1da9e390b172196c254d4409ba45689d2c4c9af085 + languageName: node + linkType: hard + "@hyperledger/cactus-plugin-keychain-vault@npm:2.0.0, @hyperledger/cactus-plugin-keychain-vault@workspace:packages/cactus-plugin-keychain-vault": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-keychain-vault@workspace:packages/cactus-plugin-keychain-vault" @@ -10533,6 +8609,36 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-ledger-connector-besu@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-ledger-connector-besu@npm:2.0.0-rc.7" + dependencies: + "@grpc/grpc-js": "npm:1.11.2" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + express: "npm:4.20.0" + google-protobuf: "npm:3.21.4" + http-errors: "npm:2.0.0" + http-errors-enhanced-cjs: "npm:2.0.1" + joi: "npm:17.13.3" + openapi-types: "npm:12.1.3" + prom-client: "npm:15.1.3" + run-time-error-cjs: "npm:1.4.0" + rxjs: "npm:7.8.1" + socket.io-client-fixed-types: "npm:4.5.4" + typescript-optional: "npm:2.0.1" + web3: "npm:1.6.1" + web3-core: "npm:1.6.1" + web3-eth: "npm:1.6.1" + web3-eth-contract: "npm:1.6.1" + web3-utils: "npm:1.6.1" + web3js-quorum: "npm:22.4.0" + checksum: 10/44a8002558abc6d1d54179b30ca6e7c10efe9d143d45aff7958a1d2ff8c242c24725a7ad85d3eaf9be8d3d0a0f6f6e6fbf882f2fecb81a48e7b82cda924e7571 + languageName: node + linkType: hard + "@hyperledger/cactus-plugin-ledger-connector-cdl@workspace:packages/cactus-plugin-ledger-connector-cdl": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-ledger-connector-cdl@workspace:packages/cactus-plugin-ledger-connector-cdl" @@ -10617,10 +8723,10 @@ __metadata: socket.io-client-fixed-types: "npm:4.5.4" typescript-optional: "npm:2.0.1" uuid: "npm:10.0.0" - web3: "npm:4.14.0" - web3-eth: "npm:4.10.0" + web3: "npm:4.4.0" + web3-eth: "npm:4.4.0" web3-eth-accounts: "npm:4.1.1" - web3-eth-contract: "npm:4.7.0" + web3-eth-contract: "npm:4.2.0" bin: cacti-ethereum-connector-status: dist/lib/scripts/get-ethereum-connector-status.js languageName: unknown @@ -10685,6 +8791,48 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-ledger-connector-fabric@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-ledger-connector-fabric@npm:2.0.0-rc.7" + dependencies: + "@fidm/x509": "npm:1.2.1" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + bl: "npm:6.0.14" + bn.js: "npm:4.12.0" + elliptic: "npm:6.5.7" + express: "npm:4.20.0" + fabric-ca-client: "npm:2.5.0-snapshot.23" + fabric-common: "npm:2.5.0-snapshot.23" + fabric-network: "npm:2.5.0-snapshot.23" + fabric-protos: "npm:2.5.0-snapshot.23" + fast-safe-stringify: "npm:2.1.1" + form-data: "npm:4.0.0" + http-status-codes: "npm:2.1.4" + jsrsasign: "npm:11.0.0" + long: "npm:5.2.3" + multer: "npm:1.4.5-lts.1" + ngo: "npm:2.7.0" + node-ssh: "npm:13.1.0" + node-vault: "npm:0.9.22" + openapi-types: "npm:12.1.3" + prom-client: "npm:15.1.3" + run-time-error-cjs: "npm:1.4.0" + rxjs: "npm:7.8.1" + sanitize-filename: "npm:1.6.3" + sanitize-html: "npm:2.12.1" + secp256k1: "npm:4.0.3" + socket.io-client-fixed-types: "npm:4.5.4" + temp: "npm:0.9.4" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + ws-identity-client: "npm:1.0.2" + checksum: 10/a21c55cb8cf12f5c40a9272028d9208c1f8273a6411c6465dd2a3c6d298318f4c69912ffe2c6256dd5cc9882f51e37d84bc68904e312d396b9f4dcea29c34ce4 + languageName: node + linkType: hard + "@hyperledger/cactus-plugin-ledger-connector-iroha2@npm:2.0.0, @hyperledger/cactus-plugin-ledger-connector-iroha2@workspace:packages/cactus-plugin-ledger-connector-iroha2": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-ledger-connector-iroha2@workspace:packages/cactus-plugin-ledger-connector-iroha2" @@ -10808,6 +8956,28 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-ledger-connector-xdai@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-ledger-connector-xdai@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + express: "npm:4.20.0" + joi: "npm:17.13.3" + openapi-types: "npm:12.1.3" + prom-client: "npm:15.1.3" + run-time-error-cjs: "npm:1.4.0" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + web3: "npm:1.6.1" + web3-eth-contract: "npm:1.6.1" + web3-utils: "npm:1.6.1" + checksum: 10/ba33fc5d8d92c7eb8947334c46c2a17e5e0232e920b19325f353c8fb882580ea7cba1d2036aff7fb1ad1c88437e9958bd87a0980bfb2d4d2f6fc8953ec0edbf5 + languageName: node + linkType: hard + "@hyperledger/cactus-plugin-object-store-ipfs@npm:2.0.0, @hyperledger/cactus-plugin-object-store-ipfs@workspace:extensions/cactus-plugin-object-store-ipfs": version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-object-store-ipfs@workspace:extensions/cactus-plugin-object-store-ipfs" @@ -10833,6 +9003,21 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-object-store-ipfs@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-object-store-ipfs@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + run-time-error-cjs: "npm:1.4.0" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + checksum: 10/d1e171d2ba7fefe37801c74d7f40be442f6c079348753ebe633065d222aa0daa385923b2003ef1d3e1351549cde16d2f64c04d94ac49bbe0e905fbdea889156a + languageName: node + linkType: hard + "@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" @@ -10899,15 +9084,28 @@ __metadata: version: 0.0.0-use.local resolution: "@hyperledger/cactus-plugin-satp-hermes@workspace:packages/cactus-plugin-satp-hermes" dependencies: + "@apidevtools/swagger-cli": "npm:4.0.4" + "@bufbuild/buf": "npm:1.30.0" + "@bufbuild/protobuf": "npm:1.10.0" + "@bufbuild/protoc-gen-es": "npm:1.8.0" + "@connectrpc/connect": "npm:1.3.0" + "@connectrpc/connect-express": "npm:1.3.0" + "@connectrpc/connect-node": "npm:1.3.0" + "@connectrpc/protoc-gen-connect-es": "npm:1.3.0" + "@grpc/proto-loader": "npm:0.7.13" "@hyperledger/cactus-cmd-api-server": "npm:2.0.0" "@hyperledger/cactus-common": "npm:2.0.0" "@hyperledger/cactus-core": "npm:2.0.0" "@hyperledger/cactus-core-api": "npm:2.0.0" + "@hyperledger/cactus-plugin-bungee-hermes": "npm:2.0.0" "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0" "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0" + "@hyperledger/cactus-plugin-ledger-connector-ethereum": "npm:2.0.0" "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0" "@hyperledger/cactus-plugin-object-store-ipfs": "npm:2.0.0" + "@hyperledger/cactus-test-geth-ledger": "npm:2.0.0-rc.7" "@hyperledger/cactus-test-tooling": "npm:2.0.0" + "@quobix/vacuum": "npm:0.9.16" "@types/body-parser": "npm:1.19.4" "@types/crypto-js": "npm:4.0.1" "@types/express": "npm:5.0.0" @@ -10959,6 +9157,34 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-satp-hermes@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-plugin-satp-hermes@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-cmd-api-server": "npm:2.0.0-rc.7" + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core": "npm:2.0.0-rc.7" + "@hyperledger/cactus-core-api": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-keychain-memory": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0-rc.7" + "@hyperledger/cactus-plugin-object-store-ipfs": "npm:2.0.0-rc.7" + "@hyperledger/cactus-test-tooling": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + crypto-js: "npm:4.2.0" + fs-extra: "npm:11.2.0" + knex: "npm:2.4.0" + secp256k1: "npm:4.0.3" + socket.io: "npm:4.6.2" + sqlite3: "npm:5.1.5" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + web3: "npm:1.6.1" + web3-utils: "npm:1.6.1" + checksum: 10/e9e9f93c1387b7f2d7d66008b52a85f935379f4286d9a243443def2900e061b694241302fbcfa75081a885dc239f68903667a1937c049454fd1cd54a4b0b6908 + languageName: node + linkType: hard + "@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" @@ -11010,6 +9236,21 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-test-geth-ledger@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-test-geth-ledger@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + "@hyperledger/cactus-test-tooling": "npm:2.0.0-rc.7" + dockerode: "npm:3.3.0" + internal-ip: "npm:6.2.0" + run-time-error-cjs: "npm:1.4.0" + web3: "npm:4.0.3" + web3-eth-accounts: "npm:4.0.3" + checksum: 10/9583e0735c08ce0ace967a64f4fbd7636a9643abe3b87e914181b7e68ad416f9e08d838b7de7a2ce46a958f7c434c9c3db967e127fd5894d7dbc26f419a86ae1 + languageName: node + linkType: hard + "@hyperledger/cactus-test-plugin-consortium-manual@workspace:packages/cactus-test-plugin-consortium-manual": version: 0.0.0-use.local resolution: "@hyperledger/cactus-test-plugin-consortium-manual@workspace:packages/cactus-test-plugin-consortium-manual" @@ -11195,6 +9436,42 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-test-tooling@npm:2.0.0-rc.7": + version: 2.0.0-rc.7 + resolution: "@hyperledger/cactus-test-tooling@npm:2.0.0-rc.7" + dependencies: + "@hyperledger/cactus-common": "npm:2.0.0-rc.7" + axios: "npm:1.7.7" + compare-versions: "npm:3.6.0" + dockerode: "npm:3.3.0" + elliptic: "npm:6.5.7" + execa: "npm:5.1.1" + fabric-ca-client: "npm:2.5.0-snapshot.23" + fabric-network: "npm:2.5.0-snapshot.23" + fs-extra: "npm:11.2.0" + internal-ip: "npm:6.2.0" + is-port-reachable: "npm:3.0.0" + joi: "npm:17.13.3" + js-yaml: "npm:4.1.0" + keycloak-admin: "npm:1.14.22" + lodash: "npm:4.17.21" + node-forge: "npm:1.3.0" + node-ssh: "npm:13.1.0" + p-retry: "npm:4.6.1" + run-time-error-cjs: "npm:1.4.0" + socket.io: "npm:4.6.2" + socket.io-client-fixed-types: "npm:4.5.4" + tar-stream: "npm:2.2.0" + temp: "npm:0.9.4" + typescript-optional: "npm:2.0.1" + uuid: "npm:10.0.0" + web3: "npm:1.6.1" + web3-core: "npm:1.6.1" + web3-utils: "npm:1.6.1" + checksum: 10/60cd17f6124ad9f7006013681086bb464d928641cd5e64d80845b61de9458358645b9759e810ed48e049989a104fa2c665fc3d718ecb0076fb1d3672a7f931c8 + languageName: node + linkType: hard + "@hyperledger/cactus-test-verifier-client@workspace:packages/cactus-test-verifier-client": version: 0.0.0-use.local resolution: "@hyperledger/cactus-test-verifier-client@workspace:packages/cactus-test-verifier-client" @@ -11464,9 +9741,9 @@ __metadata: linkType: hard "@inquirer/figures@npm:^1.0.3": - version: 1.0.3 - resolution: "@inquirer/figures@npm:1.0.3" - checksum: 10/fa5c46527580c64ba151e1399f91772670f5f59e47045a3d2366188ed4cab1b63b7fb2a6d40d340f622cb174ca6dd3d5e22b962811c00548f9a9b4024b105dce + version: 1.0.7 + resolution: "@inquirer/figures@npm:1.0.7" + checksum: 10/ce896860de9d822a7c2a212667bcfd0f04cf2ce86d9a2411cc9c077bb59cd61732cb5f72ac66e88d52912466eec433f005bf8a25efa658f41e1a32f3977080bd languageName: node linkType: hard @@ -11599,31 +9876,31 @@ __metadata: linkType: hard "@ipld/dag-cbor@npm:^9.0.0": - version: 9.0.6 - resolution: "@ipld/dag-cbor@npm:9.0.6" + version: 9.2.2 + resolution: "@ipld/dag-cbor@npm:9.2.2" dependencies: cborg: "npm:^4.0.0" - multiformats: "npm:^12.0.1" - checksum: 10/f2ed6fe867dd5b4ea9b36af6e2658f6f3edc8758c7132c5974cf5eddcea46e2b6025032e9fbc878f7615a8e2f1c5d1176327f8d32a255bbe0b2a8a07db3753bd + multiformats: "npm:^13.1.0" + checksum: 10/71b464313f745e4c0b62fbfd2f257f526b87dba8e007246239b44d121ca82c453adf4f659d9036140dc0a485307727ce0a8749fbda0f648d950c9ccdf496bd97 languageName: node linkType: hard "@ipld/dag-json@npm:^10.0.0": - version: 10.1.5 - resolution: "@ipld/dag-json@npm:10.1.5" + version: 10.2.3 + resolution: "@ipld/dag-json@npm:10.2.3" dependencies: cborg: "npm:^4.0.0" - multiformats: "npm:^12.0.1" - checksum: 10/6f06e4e45aaf57d655d8684ace717b0ba9fe8f455aeb6ec82f706d55e65052fb57a5c2e64794ac4430b07b32c8c283b9f45acc31ab366fe7a899d0f34419c297 + multiformats: "npm:^13.1.0" + checksum: 10/8f8dc8824ffab56ca23563c11a61a6cc66250ab93311a0291add5acf322ea91b7d357e6254d6d41dddb5a7ea57c3cab949357b5b5c650bf6710c3d840ddb97a0 languageName: node linkType: hard "@ipld/dag-pb@npm:^4.0.0": - version: 4.0.6 - resolution: "@ipld/dag-pb@npm:4.0.6" + version: 4.1.3 + resolution: "@ipld/dag-pb@npm:4.1.3" dependencies: - multiformats: "npm:^12.0.1" - checksum: 10/49b3f98e53d4459ea53462a3c29dddaeb02e0217a4bab32615059ca66eef0a7a631a5a994bebc818372409b23d7f356bf43f0d36bff451cd9e7f8a4b8e3745f1 + multiformats: "npm:^13.1.0" + checksum: 10/a43ca5353b660171ead44497422c0f2445d6dd1fb9d653be2a73bda9c55753e080af65931116798f4696913aea81663a0d25f4eaeeab9426ddd038e7ace08a55 languageName: node linkType: hard @@ -11728,7 +10005,7 @@ __metadata: languageName: node linkType: hard -"@istanbuljs/schema@npm:^0.1.2": +"@istanbuljs/schema@npm:^0.1.2, @istanbuljs/schema@npm:^0.1.3": version: 0.1.3 resolution: "@istanbuljs/schema@npm:0.1.3" checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b @@ -11763,17 +10040,17 @@ __metadata: languageName: node linkType: hard -"@jest/console@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/console@npm:29.6.2" +"@jest/console@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/console@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" chalk: "npm:^4.0.0" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" + jest-message-util: "npm:^29.7.0" + jest-util: "npm:^29.7.0" slash: "npm:^3.0.0" - checksum: 10/8a11314aef8b85912f72952a89b50605a117b60b133a52abb247748392220db836923e5251e23650abdf6c1a373cb7e5267683249a9e83ba63f8700e66874ba4 + checksum: 10/4a80c750e8a31f344233cb9951dee9b77bf6b89377cb131f8b3cde07ff218f504370133a5963f6a786af4d2ce7f85642db206ff7a15f99fe58df4c38ac04899e languageName: node linkType: hard @@ -11818,36 +10095,36 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/core@npm:29.6.2" +"@jest/core@npm:^29.6.2, @jest/core@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/core@npm:29.7.0" dependencies: - "@jest/console": "npm:^29.6.2" - "@jest/reporters": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/console": "npm:^29.7.0" + "@jest/reporters": "npm:^29.7.0" + "@jest/test-result": "npm:^29.7.0" + "@jest/transform": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" ansi-escapes: "npm:^4.2.1" chalk: "npm:^4.0.0" ci-info: "npm:^3.2.0" exit: "npm:^0.1.2" graceful-fs: "npm:^4.2.9" - jest-changed-files: "npm:^29.5.0" - jest-config: "npm:^29.6.2" - jest-haste-map: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-regex-util: "npm:^29.4.3" - jest-resolve: "npm:^29.6.2" - jest-resolve-dependencies: "npm:^29.6.2" - jest-runner: "npm:^29.6.2" - jest-runtime: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" - jest-watcher: "npm:^29.6.2" + jest-changed-files: "npm:^29.7.0" + jest-config: "npm:^29.7.0" + jest-haste-map: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-regex-util: "npm:^29.6.3" + jest-resolve: "npm:^29.7.0" + jest-resolve-dependencies: "npm:^29.7.0" + jest-runner: "npm:^29.7.0" + jest-runtime: "npm:^29.7.0" + jest-snapshot: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + jest-validate: "npm:^29.7.0" + jest-watcher: "npm:^29.7.0" micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.6.2" + pretty-format: "npm:^29.7.0" slash: "npm:^3.0.0" strip-ansi: "npm:^6.0.0" peerDependencies: @@ -11855,7 +10132,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 10/08e3560504e491a73433cc626b3519fd90e44aa584a8faf524a93e5e563ee3433239e6612a82af98360a9d26a08aabd147325d74055ae4c25282d2df7cbe0660 + checksum: 10/ab6ac2e562d083faac7d8152ec1cc4eccc80f62e9579b69ed40aedf7211a6b2d57024a6cd53c4e35fd051c39a236e86257d1d99ebdb122291969a0a04563b51e languageName: node linkType: hard @@ -11871,34 +10148,34 @@ __metadata: languageName: node linkType: hard -"@jest/environment@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/environment@npm:29.6.2" +"@jest/environment@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/environment@npm:29.7.0" dependencies: - "@jest/fake-timers": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/fake-timers": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" - jest-mock: "npm:^29.6.2" - checksum: 10/46860767a55f7982a092f31bca24be39e3a12be148dd0bbab7249dd82ce914f154f59b59aae375c661727cd5552ab769cd21e2e845288cea448e966a0c36a0c3 + jest-mock: "npm:^29.7.0" + checksum: 10/90b5844a9a9d8097f2cf107b1b5e57007c552f64315da8c1f51217eeb0a9664889d3f145cdf8acf23a84f4d8309a6675e27d5b059659a004db0ea9546d1c81a8 languageName: node linkType: hard -"@jest/expect-utils@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/expect-utils@npm:29.6.2" +"@jest/expect-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect-utils@npm:29.7.0" dependencies: - jest-get-type: "npm:^29.4.3" - checksum: 10/5ad8884dafa9320ff454f5898d5f79d540f3cbab86aa8b0260351081094bcbcd6bb056e4fc6aac1147f0ec3dda634b8b3491abc0035cdc28a71ff9ded8aad359 + jest-get-type: "npm:^29.6.3" + checksum: 10/ef8d379778ef574a17bde2801a6f4469f8022a46a5f9e385191dc73bb1fc318996beaed4513fbd7055c2847227a1bed2469977821866534593a6e52a281499ee languageName: node linkType: hard -"@jest/expect@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/expect@npm:29.6.2" +"@jest/expect@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect@npm:29.7.0" dependencies: - expect: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - checksum: 10/2beed96e3d24945a72aa2ae4843c99f4c631564569258fdde6746fae3efcbfbff96dbf92ed28d6531299bd12b2766075bacaaae88ebf84b99316e77151b43a9f + expect: "npm:^29.7.0" + jest-snapshot: "npm:^29.7.0" + checksum: 10/fea6c3317a8da5c840429d90bfe49d928e89c9e89fceee2149b93a11b7e9c73d2f6e4d7cdf647163da938fc4e2169e4490be6bae64952902bc7a701033fd4880 languageName: node linkType: hard @@ -11916,17 +10193,17 @@ __metadata: languageName: node linkType: hard -"@jest/fake-timers@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/fake-timers@npm:29.6.2" +"@jest/fake-timers@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/fake-timers@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" "@sinonjs/fake-timers": "npm:^10.0.2" "@types/node": "npm:*" - jest-message-util: "npm:^29.6.2" - jest-mock: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - checksum: 10/4a9f402bc3be311b8d7de2672c93fe97bf0726a67c7f5170ff7aa718ae333655b35177a08182a6e3920bdee5b2ec66c806b866a34641eee1ad8d01534b7fcad2 + jest-message-util: "npm:^29.7.0" + jest-mock: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + checksum: 10/9b394e04ffc46f91725ecfdff34c4e043eb7a16e1d78964094c9db3fde0b1c8803e45943a980e8c740d0a3d45661906de1416ca5891a538b0660481a3a828c27 languageName: node linkType: hard @@ -11941,15 +10218,15 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/globals@npm:29.6.2" +"@jest/globals@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/globals@npm:29.7.0" dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/expect": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - jest-mock: "npm:^29.6.2" - checksum: 10/aa4a54f19cc025205bc696546940e1fe9c752c2d4d825852088aa76d44677ebba1ec66fabb78e615480cff23a06a70b5a3f893ab5163d901cdfa0d2267870b10 + "@jest/environment": "npm:^29.7.0" + "@jest/expect": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" + jest-mock: "npm:^29.7.0" + checksum: 10/97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 languageName: node linkType: hard @@ -11991,15 +10268,15 @@ __metadata: languageName: node linkType: hard -"@jest/reporters@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/reporters@npm:29.6.2" +"@jest/reporters@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/reporters@npm:29.7.0" dependencies: "@bcoe/v8-coverage": "npm:^0.2.3" - "@jest/console": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/console": "npm:^29.7.0" + "@jest/test-result": "npm:^29.7.0" + "@jest/transform": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@jridgewell/trace-mapping": "npm:^0.3.18" "@types/node": "npm:*" chalk: "npm:^4.0.0" @@ -12008,13 +10285,13 @@ __metadata: glob: "npm:^7.1.3" graceful-fs: "npm:^4.2.9" istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-instrument: "npm:^5.1.0" + istanbul-lib-instrument: "npm:^6.0.0" istanbul-lib-report: "npm:^3.0.0" istanbul-lib-source-maps: "npm:^4.0.0" istanbul-reports: "npm:^3.1.3" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-worker: "npm:^29.6.2" + jest-message-util: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + jest-worker: "npm:^29.7.0" slash: "npm:^3.0.0" string-length: "npm:^4.0.1" strip-ansi: "npm:^6.0.0" @@ -12024,7 +10301,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 10/7579c1cc2e2ef50e8ed57fef33574ea46fce74b807a5bfa3704140f9e9009f60c0699ccf5400caefee95bcb1713a3550d8734123860444b53828c9657e8b7241 + checksum: 10/a17d1644b26dea14445cedd45567f4ba7834f980be2ef74447204e14238f121b50d8b858fde648083d2cd8f305f81ba434ba49e37a5f4237a6f2a61180cc73dc languageName: node linkType: hard @@ -12037,21 +10314,12 @@ __metadata: languageName: node linkType: hard -"@jest/schemas@npm:^29.4.3": - version: 29.4.3 - resolution: "@jest/schemas@npm:29.4.3" - dependencies: - "@sinclair/typebox": "npm:^0.25.16" - checksum: 10/ac754e245c19dc39e10ebd41dce09040214c96a4cd8efa143b82148e383e45128f24599195ab4f01433adae4ccfbe2db6574c90db2862ccd8551a86704b5bebd - languageName: node - linkType: hard - -"@jest/schemas@npm:^29.6.0": - version: 29.6.0 - resolution: "@jest/schemas@npm:29.6.0" +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" dependencies: "@sinclair/typebox": "npm:^0.27.8" - checksum: 10/c00511c69cf89138a7d974404d3a5060af375b5a52b9c87215d91873129b382ca11c1ff25bd6d605951404bb381ddce5f8091004a61e76457da35db1f5c51365 + checksum: 10/910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 languageName: node linkType: hard @@ -12066,14 +10334,14 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^29.6.0": - version: 29.6.0 - resolution: "@jest/source-map@npm:29.6.0" +"@jest/source-map@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/source-map@npm:29.6.3" dependencies: "@jridgewell/trace-mapping": "npm:^0.3.18" callsites: "npm:^3.0.0" graceful-fs: "npm:^4.2.9" - checksum: 10/9c6c40387410bb70b2fae8124287fc28f6bdd1b2d7f24348e8611e1bb638b404518228a4ce64a582365b589c536ae8e7ebab0126cef59a87874b71061d19783b + checksum: 10/bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb languageName: node linkType: hard @@ -12101,15 +10369,15 @@ __metadata: languageName: node linkType: hard -"@jest/test-result@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/test-result@npm:29.6.2" +"@jest/test-result@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-result@npm:29.7.0" dependencies: - "@jest/console": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/console": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/istanbul-lib-coverage": "npm:^2.0.0" collect-v8-coverage: "npm:^1.0.0" - checksum: 10/68e9f639c74524ef10b9b8fc059872fa789f677ffb823f3f285d09b34d0ebc9ddb349625fe11cc3c54d41df625adce29b7a6152f8bbe99b7b3151ab533be3a64 + checksum: 10/c073ab7dfe3c562bff2b8fee6cc724ccc20aa96bcd8ab48ccb2aa309b4c0c1923a9e703cea386bd6ae9b71133e92810475bb9c7c22328fc63f797ad3324ed189 languageName: node linkType: hard @@ -12125,15 +10393,15 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/test-sequencer@npm:29.6.2" +"@jest/test-sequencer@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-sequencer@npm:29.7.0" dependencies: - "@jest/test-result": "npm:^29.6.2" + "@jest/test-result": "npm:^29.7.0" graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" + jest-haste-map: "npm:^29.7.0" slash: "npm:^3.0.0" - checksum: 10/81ca00ddcdbe10c4999efe9d751930eabfcc9aa4219e3491d47c11ff86c9d69e757315ae3d4eaf09d5456c3841d579a9eab65f21b09037e05ee60e198e869275 + checksum: 10/4420c26a0baa7035c5419b0892ff8ffe9a41b1583ec54a10db3037cd46a7e29dd3d7202f8aa9d376e9e53be5f8b1bc0d16e1de6880a6d319b033b01dc4c8f639 languageName: node linkType: hard @@ -12160,26 +10428,26 @@ __metadata: languageName: node linkType: hard -"@jest/transform@npm:^29.6.2": - version: 29.6.2 - resolution: "@jest/transform@npm:29.6.2" +"@jest/transform@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/transform@npm:29.7.0" dependencies: "@babel/core": "npm:^7.11.6" - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" "@jridgewell/trace-mapping": "npm:^0.3.18" babel-plugin-istanbul: "npm:^6.1.1" chalk: "npm:^4.0.0" convert-source-map: "npm:^2.0.0" fast-json-stable-stringify: "npm:^2.1.0" graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" - jest-regex-util: "npm:^29.4.3" - jest-util: "npm:^29.6.2" + jest-haste-map: "npm:^29.7.0" + jest-regex-util: "npm:^29.6.3" + jest-util: "npm:^29.7.0" micromatch: "npm:^4.0.4" pirates: "npm:^4.0.4" slash: "npm:^3.0.0" write-file-atomic: "npm:^4.0.2" - checksum: 10/ab1759672e460bdcc2950ab6fcc2509b40c87d022164492363553ebb5efb0ce67a1721c0aaf5dd00370d20771cb234360bd03635d72354b0fd3e959355becbd7 + checksum: 10/30f42293545ab037d5799c81d3e12515790bb58513d37f788ce32d53326d0d72ebf5b40f989e6896739aa50a5f77be44686e510966370d58511d5ad2637c68c1 languageName: node linkType: hard @@ -12210,31 +10478,17 @@ __metadata: languageName: node linkType: hard -"@jest/types@npm:^29.5.0": - version: 29.5.0 - resolution: "@jest/types@npm:29.5.0" +"@jest/types@npm:^29.6.1, @jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" dependencies: - "@jest/schemas": "npm:^29.4.3" + "@jest/schemas": "npm:^29.6.3" "@types/istanbul-lib-coverage": "npm:^2.0.0" "@types/istanbul-reports": "npm:^3.0.0" "@types/node": "npm:*" "@types/yargs": "npm:^17.0.8" chalk: "npm:^4.0.0" - checksum: 10/910a134cd1c2cd7d74dfcf9981c2f1a6c1d9772edecb7738947b059c4e0bb843a0d26a3c7dfff112f2fc4a473ecc18679edda498416f0048a8d181ff43a08bee - languageName: node - linkType: hard - -"@jest/types@npm:^29.6.1": - version: 29.6.1 - resolution: "@jest/types@npm:29.6.1" - dependencies: - "@jest/schemas": "npm:^29.6.0" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10/f6264fb0fc60efcb95adf3c4b30be6433aae75769b4f90d09de35fb19c65f7184d6c227a75f5b9e0054368d4fbf5cc4b397f9756d9a59eee25f3247d2e020f93 + checksum: 10/f74bf512fd09bbe2433a2ad460b04668b7075235eea9a0c77d6a42222c10a79b9747dc2b2a623f140ed40d6865a2ed8f538f3cbb75169120ea863f29a7ed76cd languageName: node linkType: hard @@ -12245,29 +10499,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.0": - version: 0.3.3 - resolution: "@jridgewell/gen-mapping@npm:0.3.3" - dependencies: - "@jridgewell/set-array": "npm:^1.0.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/072ace159c39ab85944bdabe017c3de15c5e046a4a4a772045b00ff05e2ebdcfa3840b88ae27e897d473eb4d4845b37be3c78e28910c779f5aeeeae2fb7f0cc2 - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.2 - resolution: "@jridgewell/gen-mapping@npm:0.3.2" - dependencies: - "@jridgewell/set-array": "npm:^1.0.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/7ba0070be1aeda7d7694b09d847c3b95879409b26559b9d7e97a88ec94b838fb380df43ae328ee2d2df4d79e75d7afe6ba315199d18d79aa20839ebdfb739420 - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.5": +"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5": version: 0.3.5 resolution: "@jridgewell/gen-mapping@npm:0.3.5" dependencies: @@ -12278,34 +10510,13 @@ __metadata: languageName: node linkType: hard -"@jridgewell/resolve-uri@npm:3.1.0": - version: 3.1.0 - resolution: "@jridgewell/resolve-uri@npm:3.1.0" - checksum: 10/320ceb37af56953757b28e5b90c34556157676d41e3d0a3ff88769274d62373582bb0f0276a4f2d29c3f4fdd55b82b8be5731f52d391ad2ecae9b321ee1c742d - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.0.3": - version: 3.0.5 - resolution: "@jridgewell/resolve-uri@npm:3.0.5" - checksum: 10/66da0c14dfaebd3481ac363306eefa45aca6779f8635df7337b97c18873853a7e2946d79104fad3e2ab832fe438ebabcaa2091e55e069a81b35001fa6738f532 - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.1.0": +"@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": version: 3.1.2 resolution: "@jridgewell/resolve-uri@npm:3.1.2" checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.0.1": - version: 1.1.2 - resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: 10/69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e - languageName: node - linkType: hard - "@jridgewell/set-array@npm:^1.2.1": version: 1.2.1 resolution: "@jridgewell/set-array@npm:1.2.1" @@ -12314,33 +10525,19 @@ __metadata: linkType: hard "@jridgewell/source-map@npm:^0.3.3": - version: 0.3.5 - resolution: "@jridgewell/source-map@npm:0.3.5" + version: 0.3.6 + resolution: "@jridgewell/source-map@npm:0.3.6" dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.0" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10/73838ac43235edecff5efc850c0d759704008937a56b1711b28c261e270fe4bf2dc06d0b08663aeb1ab304f81f6de4f5fb844344403cf53ba7096967a9953cae - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:1.4.14": - version: 1.4.14 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" - checksum: 10/26e768fae6045481a983e48aa23d8fcd23af5da70ebd74b0649000e815e7fbb01ea2bc088c9176b3fffeb9bec02184e58f46125ef3320b30eaa1f4094cfefa38 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.4.11 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.11" - checksum: 10/591ca7f7884a51643e713b1b623c6c7d751bdc78d61b6cda1dcf7de1287e7f0530514c3f2c7d443273ddc8687637a95cd19f5d8986b32e2349d0f7310623df40 + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + checksum: 10/0a9aca9320dc9044014ba0ef989b3a8411b0d778895553e3b7ca2ac0a75a20af4a5ad3f202acfb1879fa40466036a4417e1d5b38305baed8b9c1ebe6e4b3e7f5 languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": - version: 1.4.15 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" - checksum: 10/89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15, @jridgewell/sourcemap-codec@npm:^1.5.0": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd languageName: node linkType: hard @@ -12354,37 +10551,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.0": - version: 0.3.4 - resolution: "@jridgewell/trace-mapping@npm:0.3.4" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10/2f47f796000ddb956b8fc43b60515594adfba867747d982da83dac0790147027902486ebc997e78944ca7531b0fc091ce8a105f9a863fba3fffa79b1a976fee6 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18": - version: 0.3.18 - resolution: "@jridgewell/trace-mapping@npm:0.3.18" - dependencies: - "@jridgewell/resolve-uri": "npm:3.1.0" - "@jridgewell/sourcemap-codec": "npm:1.4.14" - checksum: 10/f4fabdddf82398a797bcdbb51c574cd69b383db041a6cae1a6a91478681d6aab340c01af655cfd8c6e01cde97f63436a1445f08297cdd33587621cf05ffa0d55 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.17": - version: 0.3.17 - resolution: "@jridgewell/trace-mapping@npm:0.3.17" - dependencies: - "@jridgewell/resolve-uri": "npm:3.1.0" - "@jridgewell/sourcemap-codec": "npm:1.4.14" - checksum: 10/790d439c9b271d9fc381dc4a837393ab942920245efedd5db20f65a665c0f778637fa623573337d3241ff784ffdb6724bbadf7fa2b61666bcd4884064b02f113 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.9": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -12394,16 +10561,6 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.13 - resolution: "@jridgewell/trace-mapping@npm:0.3.13" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10/b563ad016492becc14ec1df0edc0276087049df6974d95594ec2e5215d8ec241159d7f4aecb4e2197154732ba97982988e9accbaf496bc365fbb4506b67929f9 - languageName: node - linkType: hard - "@js-sdsl/ordered-map@npm:^4.4.2": version: 4.4.2 resolution: "@js-sdsl/ordered-map@npm:4.4.2" @@ -12428,8 +10585,8 @@ __metadata: linkType: hard "@jsonjoy.com/json-pack@npm:^1.0.3": - version: 1.0.4 - resolution: "@jsonjoy.com/json-pack@npm:1.0.4" + version: 1.1.0 + resolution: "@jsonjoy.com/json-pack@npm:1.1.0" dependencies: "@jsonjoy.com/base64": "npm:^1.1.1" "@jsonjoy.com/util": "npm:^1.1.2" @@ -12437,16 +10594,16 @@ __metadata: thingies: "npm:^1.20.0" peerDependencies: tslib: 2 - checksum: 10/dd749e7c4610db4ab7d53d9df6d8465b9805e560eda9c60dac4435b50a30710d39e975887104021a11d91c12fdf9c1752f0b0c63580a1b6b1b12854633cfea39 + checksum: 10/cd2776085ad56b470cd53137880b87c2503b07781756c50f1e9f40dd909abeba130a6144d203fcf605ec03dee4cd19bb3424169c8cb588f90a3f06939994c64e languageName: node linkType: hard -"@jsonjoy.com/util@npm:^1.1.2": - version: 1.2.0 - resolution: "@jsonjoy.com/util@npm:1.2.0" +"@jsonjoy.com/util@npm:^1.1.2, @jsonjoy.com/util@npm:^1.3.0": + version: 1.5.0 + resolution: "@jsonjoy.com/util@npm:1.5.0" peerDependencies: tslib: 2 - checksum: 10/6af58b3d34266f1f8e4f953668f163ef1028a5d372a90391bd238c2ea637e0ea3792b18b99162b8ec072af35baebe0e947d9eedd702ad942e697ed419f1e54eb + checksum: 10/5b370183700cb40af52841294ba99c3dfb3dcb7fe2a122e15c737eb908d11392d314b75518874c7d631092bb29658ebe298d174b05baeb1adeb33884b9aa33cf languageName: node linkType: hard @@ -12481,9 +10638,9 @@ __metadata: linkType: hard "@leichtgewicht/ip-codec@npm:^2.0.1": - version: 2.0.4 - resolution: "@leichtgewicht/ip-codec@npm:2.0.4" - checksum: 10/3c7ffb0afb86c731a02813aa4370da27eac037abf8a15fce211226c11b644610382c8eca7efadace9471ee1959afe72fc1d43a62227d974b9fca8eae8b8d2124 + version: 2.0.5 + resolution: "@leichtgewicht/ip-codec@npm:2.0.5" + checksum: 10/cb98c608392abe59457a14e00134e7dfa57c0c9b459871730cd4e907bb12b834cbd03e08ad8663fea9e486f260da7f1293ccd9af0376bf5524dd8536192f248c languageName: node linkType: hard @@ -12613,7 +10770,7 @@ __metadata: languageName: node linkType: hard -"@lerna-lite/npmlog@npm:3.7.0, @lerna-lite/npmlog@npm:^3.7.0": +"@lerna-lite/npmlog@npm:3.7.0": version: 3.7.0 resolution: "@lerna-lite/npmlog@npm:3.7.0" dependencies: @@ -12630,6 +10787,23 @@ __metadata: languageName: node linkType: hard +"@lerna-lite/npmlog@npm:^3.7.0": + version: 3.10.0 + resolution: "@lerna-lite/npmlog@npm:3.10.0" + dependencies: + aproba: "npm:^2.0.0" + color-support: "npm:^1.1.3" + console-control-strings: "npm:^1.1.0" + has-unicode: "npm:^2.0.1" + set-blocking: "npm:^2.0.0" + signal-exit: "npm:^4.1.0" + string-width: "npm:^7.2.0" + strip-ansi: "npm:^7.1.0" + wide-align: "npm:^1.1.5" + checksum: 10/db7e1567405bdb6bc22e08b7b410f43a1e79a86528a141d1baf64dba6013dbaf0d2a099a6cd80766a8856306430ce94dde35391663626582706fe49671a1acea + languageName: node + linkType: hard + "@lerna-lite/profiler@npm:3.7.0": version: 3.7.0 resolution: "@lerna-lite/profiler@npm:3.7.0" @@ -12811,22 +10985,6 @@ __metadata: languageName: node linkType: hard -"@libp2p/interface@npm:^0.1.1": - version: 0.1.3 - resolution: "@libp2p/interface@npm:0.1.3" - dependencies: - "@multiformats/multiaddr": "npm:^12.1.5" - abortable-iterator: "npm:^5.0.1" - it-pushable: "npm:^3.2.0" - it-stream-types: "npm:^2.0.1" - multiformats: "npm:^12.0.1" - p-defer: "npm:^4.0.0" - race-signal: "npm:^1.0.0" - uint8arraylist: "npm:^2.4.3" - checksum: 10/1344de067be903623b4b11667435fff0ed2869be941dcc7882004220f787039d50c8ea947abea45ba66d1265f4edb3a60c8fa345f641cfd06b9e1c62675eef2d - languageName: node - linkType: hard - "@libp2p/interfaces@npm:^3.0.0, @libp2p/interfaces@npm:^3.2.0": version: 3.3.2 resolution: "@libp2p/interfaces@npm:3.3.2" @@ -12868,7 +11026,7 @@ __metadata: languageName: node linkType: hard -"@ljharb/through@npm:^2.3.12": +"@ljharb/through@npm:^2.3.12, @ljharb/through@npm:^2.3.9": version: 2.3.13 resolution: "@ljharb/through@npm:2.3.13" dependencies: @@ -12877,13 +11035,6 @@ __metadata: languageName: node linkType: hard -"@ljharb/through@npm:^2.3.9": - version: 2.3.9 - resolution: "@ljharb/through@npm:2.3.9" - checksum: 10/e767600d91fde814ee1742ec0dc3181ca82cd01e030c234246d30b86e60717401fed739f900196bd0b69222e3655fc6c0271eec954a43ace55795fc20711e292 - languageName: node - linkType: hard - "@lukeed/csprng@npm:^1.0.0": version: 1.1.0 resolution: "@lukeed/csprng@npm:1.1.0" @@ -12946,16 +11097,16 @@ __metadata: linkType: hard "@mui/core-downloads-tracker@npm:^5.15.15": - version: 5.15.15 - resolution: "@mui/core-downloads-tracker@npm:5.15.15" - checksum: 10/3e99a04e03f66d5fa5f0c23cdce0f9fa2331ba08c99a75dc2347ccaa1c6ed520153e04aaeb0d613c9dca099a3e6242558a6284c33d93f95cc65e3243b17860bc + version: 5.16.7 + resolution: "@mui/core-downloads-tracker@npm:5.16.7" + checksum: 10/b65c48ba2bf6bba6435ba9f2d6c33db0c8a85b3ff7599136a9682b72205bec76470ab5ed5e6e625d5bd012ed9bcbc641ed677548be80d217c9fb5d0435567062 languageName: node linkType: hard "@mui/core-downloads-tracker@npm:^6.1.1": - version: 6.1.3 - resolution: "@mui/core-downloads-tracker@npm:6.1.3" - checksum: 10/e8b3bc8cce8dd3497c2d27a2e15ab989489011a1c85aedb634f4a20b71412d01f12d15a59a9824861022f12625b208e7da17a1e5d9a7e57b458ed4c82a8032eb + version: 6.1.6 + resolution: "@mui/core-downloads-tracker@npm:6.1.6" + checksum: 10/c09af6c9888756ae4bef802ef6fe9a23504731d6181790fdcb3ff41a6c936ef1fc0a1afe28320f4696bdc136ddefea4f89b230f0ee4e47e294dcdec8293d5d07 languageName: node linkType: hard @@ -12965,9 +11116,9 @@ __metadata: dependencies: "@babel/runtime": "npm:^7.23.9" peerDependencies: - "@mui/material": ^6.1.1 - "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 - react: ^17.0.0 || ^18.0.0 || ^19.0.0 + "@mui/material": ^5.0.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 peerDependenciesMeta: "@types/react": optional: true @@ -13034,21 +11185,20 @@ __metadata: clsx: "npm:^2.1.0" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" - react-is: "npm:^18.3.1" + react-is: "npm:^18.2.0" react-transition-group: "npm:^4.4.5" peerDependencies: "@emotion/react": ^11.5.0 "@emotion/styled": ^11.3.0 - "@mui/material-pigment-css": ^6.1.1 - "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 - react: ^17.0.0 || ^18.0.0 || ^19.0.0 - react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 peerDependenciesMeta: "@emotion/react": optional: true "@emotion/styled": optional: true - "@mui/material-pigment-css": + "@types/react": optional: true checksum: 10/e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b languageName: node @@ -13090,12 +11240,12 @@ __metadata: languageName: node linkType: hard -"@mui/private-theming@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/private-theming@npm:5.15.14" +"@mui/private-theming@npm:^5.16.6": + version: 5.16.6 + resolution: "@mui/private-theming@npm:5.16.6" dependencies: "@babel/runtime": "npm:^7.23.9" - "@mui/utils": "npm:^5.15.14" + "@mui/utils": "npm:^5.16.6" prop-types: "npm:^15.8.1" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 @@ -13103,16 +11253,16 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/6a14311ed53ee4adccfe0ba93275b43773d22fdd10c0d4ba680b9368fc0616a5e0f38f29d2080bcd7e4ed79123047e5f245c403d3fd822e960a97762be65218d + checksum: 10/3a7ba9fc5c2f0c8311b5ecadd967e5529ce43c1c5682bfc88d4fe37efdac75e986dd33a45cfecea9561370ad5be659dc32e457e1aff31b861ac93ddd1172a720 languageName: node linkType: hard -"@mui/private-theming@npm:^6.1.1": - version: 6.1.1 - resolution: "@mui/private-theming@npm:6.1.1" +"@mui/private-theming@npm:^6.1.6": + version: 6.1.6 + resolution: "@mui/private-theming@npm:6.1.6" dependencies: - "@babel/runtime": "npm:^7.25.6" - "@mui/utils": "npm:^6.1.1" + "@babel/runtime": "npm:^7.26.0" + "@mui/utils": "npm:^6.1.6" prop-types: "npm:^15.8.1" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -13120,13 +11270,13 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/93b9c2bc5602124ae207bc9d0a305efceabfec2d4227db243a9fa25f9bb693a13caf9181293372279682715dcf5fcb04ea56f4b3c4905c96dd3c691a8394bb13 + checksum: 10/b79c7d130925f91be863700c442936b51e27c102535e3502005328c30fad11ffa9f80240b213b2094107f9240d3836b583a6e4a98337a912b558d144fd6e29b4 languageName: node linkType: hard -"@mui/styled-engine@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/styled-engine@npm:5.15.14" +"@mui/styled-engine@npm:^5.16.6": + version: 5.16.6 + resolution: "@mui/styled-engine@npm:5.16.6" dependencies: "@babel/runtime": "npm:^7.23.9" "@emotion/cache": "npm:^11.11.0" @@ -13141,16 +11291,17 @@ __metadata: optional: true "@emotion/styled": optional: true - checksum: 10/2a5e03bb20502aef94cfb908898c50abb769192deb32d7f4237039683ce5266104cdc4055a7f0a8342aa62447d52b7439a4f2d0dda0fa6709c227c3621468cab + checksum: 10/8e241269c2f95038102f4b6b44eda71f5dd5c2e99c5a5902fe41778f609ae83c75ca8c77f94aaf61f07c7275d0d333e53ae9d9ea7a7a402602ec594045c30be3 languageName: node linkType: hard -"@mui/styled-engine@npm:^6.1.1": - version: 6.1.1 - resolution: "@mui/styled-engine@npm:6.1.1" +"@mui/styled-engine@npm:^6.1.6": + version: 6.1.6 + resolution: "@mui/styled-engine@npm:6.1.6" dependencies: - "@babel/runtime": "npm:^7.25.6" + "@babel/runtime": "npm:^7.26.0" "@emotion/cache": "npm:^11.13.1" + "@emotion/serialize": "npm:^1.3.2" "@emotion/sheet": "npm:^1.4.0" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" @@ -13163,19 +11314,19 @@ __metadata: optional: true "@emotion/styled": optional: true - checksum: 10/1520c4762539468edb1669ca84c965741dc403a93aec12cdb70b5d5a9dbcc2f4531306de344bb56ad9c68c7be4acdfe9d3372f4021203007dcc6a503f3fbc6e3 + checksum: 10/0506a3d771d117d0c422c74295cf19338b00030f98707082e7c87b48931587a194a12eb5ff899407d37cb4c130c93b936731e874be938c3883993ad28baa13c9 languageName: node linkType: hard "@mui/system@npm:^5.15.15": - version: 5.15.15 - resolution: "@mui/system@npm:5.15.15" + version: 5.16.7 + resolution: "@mui/system@npm:5.16.7" dependencies: "@babel/runtime": "npm:^7.23.9" - "@mui/private-theming": "npm:^5.15.14" - "@mui/styled-engine": "npm:^5.15.14" - "@mui/types": "npm:^7.2.14" - "@mui/utils": "npm:^5.15.14" + "@mui/private-theming": "npm:^5.16.6" + "@mui/styled-engine": "npm:^5.16.6" + "@mui/types": "npm:^7.2.15" + "@mui/utils": "npm:^5.16.6" clsx: "npm:^2.1.0" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" @@ -13191,19 +11342,19 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10/90a84ad0bc1b401b6e53b13fe9cfe8a34668e84885d391abf5ab80b3cd0f37370be25cb40af253cdd468746386282fed24964315933fcb28d2d6e62de0db7bf1 + checksum: 10/736d8a7e22b6682fa791caad485462914f0f395043e168e4a09067a2d4f3e3320a6b33fa764b85244bd648d016ec7b539a6d5dfab45302e45f377c64d9c342ca languageName: node linkType: hard "@mui/system@npm:^6.1.1": - version: 6.1.1 - resolution: "@mui/system@npm:6.1.1" + version: 6.1.6 + resolution: "@mui/system@npm:6.1.6" dependencies: - "@babel/runtime": "npm:^7.25.6" - "@mui/private-theming": "npm:^6.1.1" - "@mui/styled-engine": "npm:^6.1.1" - "@mui/types": "npm:^7.2.17" - "@mui/utils": "npm:^6.1.1" + "@babel/runtime": "npm:^7.26.0" + "@mui/private-theming": "npm:^6.1.6" + "@mui/styled-engine": "npm:^6.1.6" + "@mui/types": "npm:^7.2.19" + "@mui/utils": "npm:^6.1.6" clsx: "npm:^2.1.1" csstype: "npm:^3.1.3" prop-types: "npm:^15.8.1" @@ -13219,59 +11370,49 @@ __metadata: optional: true "@types/react": optional: true - checksum: 10/64f61f9f91b6af3bc923fcfa806dc94b3909f92d56e373d0e8724614a9980a0bbab9bc843214e33a3465fa6efbb05f63c18bf74b32a71e86930464cfecbe856e + checksum: 10/00e55bcff7228fa668fe517f74deeb22fa57155f3c181617519e729b36fc7ffb9d1aac7450c33f36456d78fdd369e5ffda6747d459569848915fd69c0b39a8d9 languageName: node linkType: hard -"@mui/types@npm:^7.2.14": - version: 7.2.14 - resolution: "@mui/types@npm:7.2.14" - peerDependencies: - "@types/react": ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/b10cca8f63ea522be4f7c185acd1f4d031947e53824cbf9dc5649c165bcfa8a2749e83fd0bd1809b8e2698f58638ab2b4ce03550095989189d14434ea5c6c0b6 - languageName: node - linkType: hard - -"@mui/types@npm:^7.2.17": - version: 7.2.17 - resolution: "@mui/types@npm:7.2.17" +"@mui/types@npm:^7.2.14, @mui/types@npm:^7.2.15, @mui/types@npm:^7.2.17, @mui/types@npm:^7.2.19": + version: 7.2.19 + resolution: "@mui/types@npm:7.2.19" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 peerDependenciesMeta: "@types/react": optional: true - checksum: 10/de21ecd69e4fe22738f1437d7084747c07a1e88f6fbdea5a2927594c587aaf8cac7bd67118b8749a8c7a6f45875b937d4a20b43f531773cdfd870445a4237893 + checksum: 10/a23bc280c0722527ce5e264b0dcb44271441e4016eb2285acc1f0d236cf78c73ecc3ec7abba81876c2eadf45b905b55eb26e0e824ea6afc233efce2ef5a34f7d languageName: node linkType: hard -"@mui/utils@npm:^5.15.14": - version: 5.15.14 - resolution: "@mui/utils@npm:5.15.14" +"@mui/utils@npm:^5.15.14, @mui/utils@npm:^5.16.6": + version: 5.16.6 + resolution: "@mui/utils@npm:5.16.6" dependencies: "@babel/runtime": "npm:^7.23.9" - "@types/prop-types": "npm:^15.7.11" + "@mui/types": "npm:^7.2.15" + "@types/prop-types": "npm:^15.7.12" + clsx: "npm:^2.1.1" prop-types: "npm:^15.8.1" - react-is: "npm:^18.2.0" + react-is: "npm:^18.3.1" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 react: ^17.0.0 || ^18.0.0 peerDependenciesMeta: "@types/react": optional: true - checksum: 10/b3cbe2d0aa7ec65969752dababc39fc6e0b8bb1a9cf8b9bac42ca40e3dd3eaa59b79765bd259019318acc7421d64b9f421bc67e776a581d7c9da6a1c0c50bfbc + checksum: 10/214bc3e9fe49579c5aee264477c802e5f5ced3473cafb1ed0aacd63db223e2668a08fb1f7304e70ea0511f68200dd80c3b49cc58050c7b0962228758a003371d languageName: node linkType: hard -"@mui/utils@npm:^6.1.1": - version: 6.1.1 - resolution: "@mui/utils@npm:6.1.1" +"@mui/utils@npm:^6.1.1, @mui/utils@npm:^6.1.6": + version: 6.1.6 + resolution: "@mui/utils@npm:6.1.6" dependencies: - "@babel/runtime": "npm:^7.25.6" - "@mui/types": "npm:^7.2.17" - "@types/prop-types": "npm:^15.7.12" + "@babel/runtime": "npm:^7.26.0" + "@mui/types": "npm:^7.2.19" + "@types/prop-types": "npm:^15.7.13" clsx: "npm:^2.1.1" prop-types: "npm:^15.8.1" react-is: "npm:^18.3.1" @@ -13281,7 +11422,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10/11555b8595ba8f215d3e90c36ea992c17f7901465f10a992b7c7d90596bac25f0ea4f07c9a9d9cd64015828cc6b9c3dedaf5d39a039e75ab252a3d097022bbcb + checksum: 10/0af3d8b03ccfce126f05e1ffa8a01ab993a6e9c0255142c6427e4f8f208083173a3ca71a2c00b687e8cb1c4f97f2c51e1eb8fd593cc0e51a6e32f8bd5590f7c6 languageName: node linkType: hard @@ -13292,12 +11433,27 @@ __metadata: languageName: node linkType: hard +"@multiformats/dns@npm:^1.0.3": + version: 1.0.6 + resolution: "@multiformats/dns@npm:1.0.6" + dependencies: + "@types/dns-packet": "npm:^5.6.5" + buffer: "npm:^6.0.3" + dns-packet: "npm:^5.6.1" + hashlru: "npm:^2.3.0" + p-queue: "npm:^8.0.1" + progress-events: "npm:^1.0.0" + uint8arrays: "npm:^5.0.2" + checksum: 10/ebe1568d1102c508e5016539dc5c51742cb90433e55f6509890096c412b48e2eb026cbe1a8b7b748821d311d1add37ca392759d76c9f96a802c70e74f9c3317f + languageName: node + linkType: hard + "@multiformats/multiaddr-to-uri@npm:^9.0.1": - version: 9.0.7 - resolution: "@multiformats/multiaddr-to-uri@npm:9.0.7" + version: 9.0.8 + resolution: "@multiformats/multiaddr-to-uri@npm:9.0.8" dependencies: "@multiformats/multiaddr": "npm:^12.0.0" - checksum: 10/39fe64f9e0817d0ba92e6baf3d57b6535d53e497dac6a0aa5d94c89924fb0a899b7ad8f6e20fb775c294d1b8e3e986259af7a58a9b97384d6d984c53397b21ad + checksum: 10/7f95203ddbb710584905f018a72d688b16572cc6e96093feba790de8ecc8a177e9d4fb1cdac3ed454913ec8cf28189c06d6bbb789f1d331a7aec4189fc1c8a85 languageName: node linkType: hard @@ -13315,18 +11471,17 @@ __metadata: languageName: node linkType: hard -"@multiformats/multiaddr@npm:^12.0.0, @multiformats/multiaddr@npm:^12.1.3, @multiformats/multiaddr@npm:^12.1.5": - version: 12.1.7 - resolution: "@multiformats/multiaddr@npm:12.1.7" +"@multiformats/multiaddr@npm:^12.0.0, @multiformats/multiaddr@npm:^12.1.3": + version: 12.3.1 + resolution: "@multiformats/multiaddr@npm:12.3.1" dependencies: "@chainsafe/is-ip": "npm:^2.0.1" "@chainsafe/netmask": "npm:^2.0.0" - "@libp2p/interface": "npm:^0.1.1" - dns-over-http-resolver: "npm:^2.1.0" - multiformats: "npm:^12.0.1" + "@multiformats/dns": "npm:^1.0.3" + multiformats: "npm:^13.0.0" uint8-varint: "npm:^2.0.1" - uint8arrays: "npm:^4.0.2" - checksum: 10/b2575e785462c2b98a958f0fe3e12772757d9614defa30a4a3baaa1e843bf0859db4147d7d18f2039852a6b01443b644b63723412cae9449c714a918e41b7bd2 + uint8arrays: "npm:^5.0.0" + checksum: 10/59d5a6f7857d4f85a466d2ecfddfdfa00a526abd59bbf393bc05ae9cf4105d4a65ffe985aa9df88ac2377abe080c2296cf8a5c2eb2465dff942381a49434996c languageName: node linkType: hard @@ -13406,6 +11561,28 @@ __metadata: languageName: node linkType: hard +"@ngtools/webpack@npm:16.2.16": + version: 16.2.16 + resolution: "@ngtools/webpack@npm:16.2.16" + peerDependencies: + "@angular/compiler-cli": ^16.0.0 + typescript: ">=4.9.3 <5.2" + webpack: ^5.54.0 + checksum: 10/0cbf3559ce280409ecd07cc420591cca9e5ec9b4cb9a15b66ea48cad2e9abb62560affd40a016af53b8494dcc6a2f4810c91f709661653d55915a2eb1379b3d4 + languageName: node + linkType: hard + +"@ngtools/webpack@npm:17.3.11": + version: 17.3.11 + resolution: "@ngtools/webpack@npm:17.3.11" + peerDependencies: + "@angular/compiler-cli": ^17.0.0 + typescript: ">=5.2 <5.5" + webpack: ^5.54.0 + checksum: 10/fc293373bfb8edea70b6670394d3a9efabc0df4c5ecb1769a22e960084e88ed92f0a282c3517c55bc8a62cca86626920c08266dc192688e6fef35dc8b370af09 + languageName: node + linkType: hard + "@ngtools/webpack@npm:17.3.8": version: 17.3.8 resolution: "@ngtools/webpack@npm:17.3.8" @@ -13426,15 +11603,6 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": - version: 1.1.0 - resolution: "@noble/curves@npm:1.1.0" - dependencies: - "@noble/hashes": "npm:1.3.1" - checksum: 10/7028e3f19a4a2a601f9159e5423f51ae86ab231bed79a6e40649b063e1ed7f55f5da0475f1377bd2c5a8e5fc485af9ce0549ad89da6b983d6af48e5d0a2041ca - languageName: node - linkType: hard - "@noble/curves@npm:1.2.0": version: 1.2.0 resolution: "@noble/curves@npm:1.2.0" @@ -13444,12 +11612,21 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.4.2, @noble/curves@npm:~1.4.0": + version: 1.4.2 + resolution: "@noble/curves@npm:1.4.2" + dependencies: + "@noble/hashes": "npm:1.4.0" + checksum: 10/f433a2e8811ae345109388eadfa18ef2b0004c1f79417553241db4f0ad0d59550be6298a4f43d989c627e9f7551ffae6e402a4edf0173981e6da95fc7cab5123 + languageName: node + linkType: hard + "@noble/curves@npm:^1.3.0": - version: 1.3.0 - resolution: "@noble/curves@npm:1.3.0" + version: 1.6.0 + resolution: "@noble/curves@npm:1.6.0" dependencies: - "@noble/hashes": "npm:1.3.3" - checksum: 10/f3cbdd1af00179e30146eac5539e6df290228fb857a7a8ba36d1a772cbe59288a2ca83d06f175d3446ef00db3a80d7fd8b8347f7de9c2d4d5bf3865d8bb78252 + "@noble/hashes": "npm:1.5.0" + checksum: 10/9090b5a020b7e38c7b6d21506afaacd0c7557129d716a174334c1efc36385bf3ca6de16a543c216db58055e019c6a6c3bea8d9c0b79386e6bacff5c4c6b438a9 languageName: node linkType: hard @@ -13474,13 +11651,6 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.1, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": - version: 1.3.1 - resolution: "@noble/hashes@npm:1.3.1" - checksum: 10/39474bab7e7813dbbfd8750476f48046d3004984e161fcd4333e40ca823f07b069010b35a20246e5b4ac20858e29913172a4d69720fd1e93620f7bedb70f9b72 - languageName: node - linkType: hard - "@noble/hashes@npm:1.3.2": version: 1.3.2 resolution: "@noble/hashes@npm:1.3.2" @@ -13488,10 +11658,17 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.3": - version: 1.3.3 - resolution: "@noble/hashes@npm:1.3.3" - checksum: 10/1025ddde4d24630e95c0818e63d2d54ee131b980fe113312d17ed7468bc18f54486ac86c907685759f8a7e13c2f9b9e83ec7b67d1cc20836f36b5e4a65bb102d +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:~1.4.0": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: 10/e156e65794c473794c52fa9d06baf1eb20903d0d96719530f523cc4450f6c721a957c544796e6efd0197b2296e7cd70efeb312f861465e17940a3e3c7e0febc6 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.5.0, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:^1.4.0": + version: 1.5.0 + resolution: "@noble/hashes@npm:1.5.0" + checksum: 10/da7fc7af52af7afcf59810a7eea6155075464ff462ffda2572dc6d57d53e2669b1ea2ec774e814f6273f1697e567f28d36823776c9bf7068cba2a2855140f26e languageName: node linkType: hard @@ -13801,97 +11978,71 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1" - conditions: os=linux & cpu=arm64 & libc=glibc +"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.2" + checksum: 10/cf241ad2577741ccaaf0e5f723409c3d6e005d46f7a6eeceff17dcdbef1bc3bf603f859b23f3adb827a7e221f55fec781efd6153b52c05e3a85ba7d9fa5121c0 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1" - conditions: os=linux & cpu=arm64 & libc=musl +"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.2" + checksum: 10/ff85471f3c0a6463896b1da1d433c174bd1b5f09976a9f678ab063baabe883c4f7fdaadc69d46050bf9c50b596b0f1f38d05e689e703386644a533350a2439f0 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1" - conditions: os=linux & cpu=x64 & libc=glibc +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.2" + checksum: 10/e0e0a8b7b5e81f002fd4e775bcb5035564c08b9c19cc2a99011d0ae691ec22278df343d054d76b9e2eff32b552defa3c63a6f9038996269e8f5b30ea9e07cb15 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1" - conditions: os=linux & cpu=x64 & libc=musl +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.2" + checksum: 10/1e8371db027c379fc9c3470cfdfe0913b32371317052c082b3c1338a569f1171f243d5df999bc5416799c342dda62145dcbce21c8d56eb7033bb31c470af5418 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1" - conditions: os=win32 & cpu=arm64 +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.2" + checksum: 10/63e9703975b784ad1ff64a44415ae4ab8fef64b776b7235d5e9bcf756cd636cf95e305b74d14072ffb541f5605151933476784f1afbb1e65b081b33860e9fcde languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1" - conditions: os=win32 & cpu=ia32 +"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.2" + checksum: 10/4c51615931ba8bd2ce144489f91fc0f1872def8f283253de50e6598945305f0b2655788ca03974e696046755c7db763c9457609908384ee91e649ee1899e4457 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1" - conditions: os=win32 & cpu=x64 +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.2" + checksum: 10/1a645168510776e469245e61e0139d6509632ba608806b78545b026725e423752987cd3f30b5924893260b9bf6fa106db1e5b69bf77e7e7133d1c3bef0fd1ffa languageName: node linkType: hard "@nomicfoundation/solidity-analyzer@npm:^0.1.0": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.1" - dependencies: - "@nomicfoundation/solidity-analyzer-darwin-arm64": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-darwin-x64": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-freebsd-x64": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-musl": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": "npm:0.1.1" - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "npm:0.1.1" + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.2" + dependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64": "npm:0.1.2" + "@nomicfoundation/solidity-analyzer-darwin-x64": "npm:0.1.2" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "npm:0.1.2" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "npm:0.1.2" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "npm:0.1.2" + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "npm:0.1.2" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "npm:0.1.2" dependenciesMeta: "@nomicfoundation/solidity-analyzer-darwin-arm64": optional: true "@nomicfoundation/solidity-analyzer-darwin-x64": optional: true - "@nomicfoundation/solidity-analyzer-freebsd-x64": - optional: true "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": optional: true "@nomicfoundation/solidity-analyzer-linux-arm64-musl": @@ -13900,13 +12051,9 @@ __metadata: optional: true "@nomicfoundation/solidity-analyzer-linux-x64-musl": optional: true - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": - optional: true - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": - optional: true "@nomicfoundation/solidity-analyzer-win32-x64-msvc": optional: true - checksum: 10/a3b3b557f911791b26a352d4e11abf5cbac427de33fda7d70fda043f1994a7f63f542c1752e6415a82c5452625470ba4fbf040e7d87dddd1aa3366e79b3dc2c6 + checksum: 10/e86f4c82420e44b22bdf9419c944c0e64f199c71dd539e350dc80ecaf0a9852068a0701a11885f2e460abb731568e5f19949ac403383a5466d12625799237c4e languageName: node linkType: hard @@ -13934,20 +12081,21 @@ __metadata: linkType: hard "@npmcli/agent@npm:^2.0.0": - version: 2.1.1 - resolution: "@npmcli/agent@npm:2.1.1" + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" dependencies: + agent-base: "npm:^7.1.0" http-proxy-agent: "npm:^7.0.0" https-proxy-agent: "npm:^7.0.1" lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.1" - checksum: 10/3b0e613ae75766ed3919066d826a3a204f091b5274243a52d68924322ab7678997803ea8a48073ded1de072b53d83022e4cbd8c531d1559b3c9ce87fac054db0 + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a languageName: node linkType: hard "@npmcli/arborist@npm:^7.5.3": - version: 7.5.3 - resolution: "@npmcli/arborist@npm:7.5.3" + version: 7.5.4 + resolution: "@npmcli/arborist@npm:7.5.4" dependencies: "@isaacs/string-locale-compare": "npm:^1.1.0" "@npmcli/fs": "npm:^3.1.1" @@ -13986,7 +12134,7 @@ __metadata: walk-up-path: "npm:^3.0.1" bin: arborist: bin/index.js - checksum: 10/e149df712a2396f59e348ff32d763f62bbdf576f3976110f47b10cd912a91cce76c83f859bb0f97f4ca5273f15a270df54a702190753772f3539a3f10307b6ed + checksum: 10/b77170754f419171e5ca2abfb679a9c811443e2b67036916a62eda81fd069f12c98186941cd73a0d36c2ec76cda638b43ceeb4c5fae39de1bb9df825432f3ef7 languageName: node linkType: hard @@ -14001,25 +12149,16 @@ __metadata: linkType: hard "@npmcli/fs@npm:^2.1.0": - version: 2.1.0 - resolution: "@npmcli/fs@npm:2.1.0" + version: 2.1.2 + resolution: "@npmcli/fs@npm:2.1.2" dependencies: "@gar/promisify": "npm:^1.1.3" semver: "npm:^7.3.5" - checksum: 10/1fe97efb5c1250c5986b46b6c8256b1eab8159a6d50fc8ace9f90937b3195541272faf77f18bdbf5eeb89bab68332c7846ac5ab9337e6099e63c6007388ebe84 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^3.1.0": - version: 3.1.0 - resolution: "@npmcli/fs@npm:3.1.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10/f3a7ab3a31de65e42aeb6ed03ed035ef123d2de7af4deb9d4a003d27acc8618b57d9fb9d259fe6c28ca538032a028f37337264388ba27d26d37fff7dde22476e + checksum: 10/c5d4dfee80de2236e1e4ed595d17e217aada72ebd8215183fc46096fa010f583dd2aaaa486758de7cc0b89440dbc31cfe8b276269d75d47af35c716e896f78ec languageName: node linkType: hard -"@npmcli/fs@npm:^3.1.1": +"@npmcli/fs@npm:^3.1.0, @npmcli/fs@npm:^3.1.1": version: 3.1.1 resolution: "@npmcli/fs@npm:3.1.1" dependencies: @@ -14029,8 +12168,8 @@ __metadata: linkType: hard "@npmcli/git@npm:^4.0.0": - version: 4.0.4 - resolution: "@npmcli/git@npm:4.0.4" + version: 4.1.0 + resolution: "@npmcli/git@npm:4.1.0" dependencies: "@npmcli/promise-spawn": "npm:^6.0.0" lru-cache: "npm:^7.4.4" @@ -14040,39 +12179,28 @@ __metadata: promise-retry: "npm:^2.0.1" semver: "npm:^7.3.5" which: "npm:^3.0.0" - checksum: 10/98e656d198ecf987816c926ca6d8797554ddb8d2da4b018bac6e240ff3ad25e63f947b797a2b19144d4adbcd38eaf78cf2ab684459c36df73117c00352d0e2a9 + checksum: 10/33512ce12758d67c0322eca25019c4d5ef03e83f5829e09a05389af485bab216cc4df408b8eba98f2d12c119c6dff84f0d8ff25a1ac5d8a46184e55ae8f53754 languageName: node linkType: hard "@npmcli/git@npm:^5.0.0": - version: 5.0.3 - resolution: "@npmcli/git@npm:5.0.3" + version: 5.0.8 + resolution: "@npmcli/git@npm:5.0.8" dependencies: "@npmcli/promise-spawn": "npm:^7.0.0" + ini: "npm:^4.1.3" lru-cache: "npm:^10.0.1" npm-pick-manifest: "npm:^9.0.0" - proc-log: "npm:^3.0.0" + proc-log: "npm:^4.0.0" promise-inflight: "npm:^1.0.1" promise-retry: "npm:^2.0.1" semver: "npm:^7.3.5" which: "npm:^4.0.0" - checksum: 10/cf2216c5e6e2ef30eac135b9f6fdc3c999253c2778e9af38d5acda73af10c3f20b2fbf834521ea3e874e27633854c7fd32ba36162ba1dcaa5f67d19438059626 + checksum: 10/e6f94175fb9dde13d84849b29b32ffb4c4df968822cc85df2aebfca13bf8ca76f33b1d281911f5bcddc95bccba2f9e795669c736a38de4d9c76efb5047ffb4fb languageName: node linkType: hard -"@npmcli/installed-package-contents@npm:^2.0.1": - version: 2.0.2 - resolution: "@npmcli/installed-package-contents@npm:2.0.2" - dependencies: - npm-bundled: "npm:^3.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - bin: - installed-package-contents: lib/index.js - checksum: 10/4598a97e3d6e4c8602157d9ac47723071f09662852add0f275af62d1038d8e44d0c5ff9afa05358ba3ca7e100c860d679964be0a163add6ea028dc72d31f0af1 - languageName: node - linkType: hard - -"@npmcli/installed-package-contents@npm:^2.1.0": +"@npmcli/installed-package-contents@npm:^2.0.1, @npmcli/installed-package-contents@npm:^2.1.0": version: 2.1.0 resolution: "@npmcli/installed-package-contents@npm:2.1.0" dependencies: @@ -14085,14 +12213,14 @@ __metadata: linkType: hard "@npmcli/map-workspaces@npm:^3.0.2": - version: 3.0.3 - resolution: "@npmcli/map-workspaces@npm:3.0.3" + version: 3.0.6 + resolution: "@npmcli/map-workspaces@npm:3.0.6" dependencies: "@npmcli/name-from-folder": "npm:^2.0.0" - glob: "npm:^9.3.1" - minimatch: "npm:^7.4.2" + glob: "npm:^10.2.2" + minimatch: "npm:^9.0.0" read-package-json-fast: "npm:^3.0.0" - checksum: 10/d2718ca70fa7c0300062443e55168982045a77fac0e31d68e995d7b4aa255e2fd45ffe4116507dbc5741043c4135997acc18fd3e7b21abc67bbe57d130893776 + checksum: 10/b364b155991a4ff85db5ea5b9f809ab65936350fc36fe1e51d5ab8cd479bba57e69f02e17215c0e2126e383074c2987c268d8e589aacd26c9962e028f4da98f2 languageName: node linkType: hard @@ -14120,12 +12248,12 @@ __metadata: linkType: hard "@npmcli/move-file@npm:^2.0.0": - version: 2.0.0 - resolution: "@npmcli/move-file@npm:2.0.0" + version: 2.0.1 + resolution: "@npmcli/move-file@npm:2.0.1" dependencies: mkdirp: "npm:^1.0.4" rimraf: "npm:^3.0.2" - checksum: 10/1388777b507b0c592d53f41b9d182e1a8de7763bc625fc07999b8edbc22325f074e5b3ec90af79c89d6987fdb2325bc66d59f483258543c14a43661621f841b0 + checksum: 10/52dc02259d98da517fae4cb3a0a3850227bdae4939dda1980b788a7670636ca2b4a01b58df03dd5f65c1e3cb70c50fa8ce5762b582b3f499ec30ee5ce1fd9380 languageName: node linkType: hard @@ -14143,37 +12271,7 @@ __metadata: languageName: node linkType: hard -"@npmcli/package-json@npm:^5.0.0": - version: 5.0.0 - resolution: "@npmcli/package-json@npm:5.0.0" - dependencies: - "@npmcli/git": "npm:^5.0.0" - glob: "npm:^10.2.2" - hosted-git-info: "npm:^7.0.0" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^6.0.0" - proc-log: "npm:^3.0.0" - semver: "npm:^7.5.3" - checksum: 10/bb907e934e96dae3d3aa26aa45cbaa87b318cb64c4aaaacfa3596b1ca5147ad1b51c3281eb529df12116a163d33ca99f48c4593b0c168e38412dfbf2c5cced72 - languageName: node - linkType: hard - -"@npmcli/package-json@npm:^5.1.0": - version: 5.2.0 - resolution: "@npmcli/package-json@npm:5.2.0" - dependencies: - "@npmcli/git": "npm:^5.0.0" - glob: "npm:^10.2.2" - hosted-git-info: "npm:^7.0.0" - json-parse-even-better-errors: "npm:^3.0.0" - normalize-package-data: "npm:^6.0.0" - proc-log: "npm:^4.0.0" - semver: "npm:^7.5.3" - checksum: 10/c3d2218877bfc005bca3b7a11f53825bf16a68811b8e8ed0c9b219cceb8e8e646d70efab8c5d6decbd8007f286076468b3f456dab4d41d648aff73a5f3a6fce2 - languageName: node - linkType: hard - -"@npmcli/package-json@npm:^5.2.0": +"@npmcli/package-json@npm:^5.0.0, @npmcli/package-json@npm:^5.1.0, @npmcli/package-json@npm:^5.2.0": version: 5.2.1 resolution: "@npmcli/package-json@npm:5.2.1" dependencies: @@ -14198,11 +12296,11 @@ __metadata: linkType: hard "@npmcli/promise-spawn@npm:^7.0.0": - version: 7.0.0 - resolution: "@npmcli/promise-spawn@npm:7.0.0" + version: 7.0.2 + resolution: "@npmcli/promise-spawn@npm:7.0.2" dependencies: which: "npm:^4.0.0" - checksum: 10/6bda8e0cd007d34799b49fa20bc70eeb3fcac03aaecd021207b39e9b253511c5e5a0586345ae7726a8e34e49dbfd5927fcc7b5793273f4a995701687210c9614 + checksum: 10/94cbbbeeb20342026c3b68fc8eb09e1600b7645d4e509f2588ef5ea7cff977eb01e628cc8e014595d04a6af4b4bc5c467c950a8135920f39f7c7b57fba43f4e9 languageName: node linkType: hard @@ -14230,15 +12328,15 @@ __metadata: linkType: hard "@npmcli/run-script@npm:^6.0.0": - version: 6.0.0 - resolution: "@npmcli/run-script@npm:6.0.0" + version: 6.0.2 + resolution: "@npmcli/run-script@npm:6.0.2" dependencies: "@npmcli/node-gyp": "npm:^3.0.0" "@npmcli/promise-spawn": "npm:^6.0.0" node-gyp: "npm:^9.0.0" read-package-json-fast: "npm:^3.0.0" which: "npm:^3.0.0" - checksum: 10/e9230124fdb53ae9decfb47c2f3ef3b71f52339e38d636f792bd3cd867928591d647478eabe6d11accca7057c8e30fbbb5f1cfae0821488aa464c726f4431fcc + checksum: 10/9b22c4c53d4b2e014e7f990cf2e1d32d1830c5629d37a4ee56011bcdfb51424ca8dc3fb3fa550b4abe7e8f0efdd68468d733b754db371b06a5dd300663cf13a2 languageName: node linkType: hard @@ -14350,12 +12448,12 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-request-log@npm:^5.1.0": - version: 5.3.0 - resolution: "@octokit/plugin-request-log@npm:5.3.0" +"@octokit/plugin-request-log@npm:^5.3.1": + version: 5.3.1 + resolution: "@octokit/plugin-request-log@npm:5.3.1" peerDependencies: "@octokit/core": ">=6" - checksum: 10/8c918b14f0687e8a3d9c7c81ef1092a49de07681940cc1aee0aeb7e3dd8ac64f69af5d65932eec32f6db4af3dca80541ad3bb13ac0fa44af3e2340ed91909272 + checksum: 10/a27e163282c8d0ba8feee4d3cbbd1b62e1aa89a892877f7a9876fc17ddde3e1e1af922e6664221a0cabae99b8a7a2a5215b9ec2ee5222edb50e06298e99022b0 languageName: node linkType: hard @@ -14380,14 +12478,14 @@ __metadata: linkType: hard "@octokit/request@npm:^9.0.0": - version: 9.1.1 - resolution: "@octokit/request@npm:9.1.1" + version: 9.1.3 + resolution: "@octokit/request@npm:9.1.3" dependencies: "@octokit/endpoint": "npm:^10.0.0" "@octokit/request-error": "npm:^6.0.1" "@octokit/types": "npm:^13.1.0" universal-user-agent: "npm:^7.0.2" - checksum: 10/aef47d85751c387c6ef29e70b3b86c9033fc7940361092c80728f7e99cc0ba54ddd00bbecb4422e50df78744600cfb8a1a2bc6916c5b6440677aa8ebd6b9b291 + checksum: 10/b445f263157a2c608d8cfa89162be5f5d39551607d0ec973c3fdf9d3fd3753e33861c4e34942f5dbf47576ac91a99238ed482f2d6c6af3f9070e0b190b3f07a2 languageName: node linkType: hard @@ -14397,22 +12495,13 @@ __metadata: dependencies: "@octokit/core": "npm:^6.1.2" "@octokit/plugin-paginate-rest": "npm:^11.0.0" - "@octokit/plugin-request-log": "npm:^5.1.0" + "@octokit/plugin-request-log": "npm:^5.3.1" "@octokit/plugin-rest-endpoint-methods": "npm:^13.0.0" checksum: 10/f67fbb1b3e9568f352933c55703cd33354183e48710a146f6a1c5930419006d2d97c08f5b0a29a56fffc9e53f01b34bae2681a577f604172f4331644b85a9779 languageName: node linkType: hard -"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0": - version: 13.5.0 - resolution: "@octokit/types@npm:13.5.0" - dependencies: - "@octokit/openapi-types": "npm:^22.2.0" - checksum: 10/d2aeebc1d8684c4e950f054a52b484e898b72d9f5f8433bcf010161716eea20d1132820d922212f19557a8f147354f2674d1a27b22941308b7c298bdd2674ffa - languageName: node - linkType: hard - -"@octokit/types@npm:^13.6.0, @octokit/types@npm:^13.6.1": +"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.6.0, @octokit/types@npm:^13.6.1": version: 13.6.1 resolution: "@octokit/types@npm:13.6.1" dependencies: @@ -14447,14 +12536,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/api@npm:^1.0.1": - version: 1.0.4 - resolution: "@opentelemetry/api@npm:1.0.4" - checksum: 10/3e1535e26fb3c690c478379fd6262c4a3fe6887c9e100b17afbecf952a51dc1e3079a4e450c2e27368ab4f0673820195bf43eda0e8da530aaffa04032cae008b - languageName: node - linkType: hard - -"@opentelemetry/api@npm:^1.4.0": +"@opentelemetry/api@npm:^1.0.1, @opentelemetry/api@npm:^1.4.0": version: 1.9.0 resolution: "@opentelemetry/api@npm:1.9.0" checksum: 10/a607f0eef971893c4f2ee2a4c2069aade6ec3e84e2a1f5c2aac19f65c5d9eeea41aa72db917c1029faafdd71789a1a040bdc18f40d63690e22ccae5d7070f194 @@ -14482,14 +12564,14 @@ __metadata: languageName: node linkType: hard -"@peculiar/asn1-schema@npm:^2.3.6": - version: 2.3.8 - resolution: "@peculiar/asn1-schema@npm:2.3.8" +"@peculiar/asn1-schema@npm:^2.3.13, @peculiar/asn1-schema@npm:^2.3.8": + version: 2.3.13 + resolution: "@peculiar/asn1-schema@npm:2.3.13" dependencies: asn1js: "npm:^3.0.5" pvtsutils: "npm:^1.3.5" tslib: "npm:^2.6.2" - checksum: 10/da349985cff73ae7ea52b6b66c6b4b339a768d5eb9164ad03e73c30985ec0a1c94849b323a826b00a049d7de3840368f77bebe84193205a77565cdfdac6ed524 + checksum: 10/3d2bf7d40023f3cb7a1b3aa6060bcec39fc92a2e5a91c3b6611ea7d760103049e51fe4aef1e762010612314aa79f2071626ed31b3050155ec7f501d89745e3bd languageName: node linkType: hard @@ -14503,15 +12585,15 @@ __metadata: linkType: hard "@peculiar/webcrypto@npm:^1.0.22": - version: 1.4.3 - resolution: "@peculiar/webcrypto@npm:1.4.3" + version: 1.5.0 + resolution: "@peculiar/webcrypto@npm:1.5.0" dependencies: - "@peculiar/asn1-schema": "npm:^2.3.6" + "@peculiar/asn1-schema": "npm:^2.3.8" "@peculiar/json-schema": "npm:^1.1.12" - pvtsutils: "npm:^1.3.2" - tslib: "npm:^2.5.0" - webcrypto-core: "npm:^1.7.7" - checksum: 10/548f5e32badcfdb02c903ca240daccac5d87ba841e436bd6d30e5455ced22917146130dab21afb718568ea935d6b04dc66fb33a4b6ab652dd868abff81e74a81 + pvtsutils: "npm:^1.3.5" + tslib: "npm:^2.6.2" + webcrypto-core: "npm:^1.8.0" + checksum: 10/a6658390c37b1d386f46066e796985eb56f6f86a772e1373c364ec9a8257adf8623f156596613d2828b489e2b5f32f9d2b0820289b4981646001cba7d21ae2f6 languageName: node linkType: hard @@ -14530,17 +12612,15 @@ __metadata: linkType: hard "@pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": - version: 0.5.11 - resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.11" + version: 0.5.15 + resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.15" dependencies: - ansi-html-community: "npm:^0.0.8" - common-path-prefix: "npm:^3.0.0" + ansi-html: "npm:^0.0.9" core-js-pure: "npm:^3.23.3" error-stack-parser: "npm:^2.0.6" - find-up: "npm:^5.0.0" html-entities: "npm:^2.1.0" loader-utils: "npm:^2.0.4" - schema-utils: "npm:^3.0.0" + schema-utils: "npm:^4.2.0" source-map: "npm:^0.7.3" peerDependencies: "@types/webpack": 4.x || 5.x @@ -14548,7 +12628,7 @@ __metadata: sockjs-client: ^1.4.0 type-fest: ">=0.17.0 <5.0.0" webpack: ">=4.43.0 <6.0.0" - webpack-dev-server: 3.x || 4.x + webpack-dev-server: 3.x || 4.x || 5.x webpack-hot-middleware: 2.x webpack-plugin-serve: 0.x || 1.x peerDependenciesMeta: @@ -14564,7 +12644,7 @@ __metadata: optional: true webpack-plugin-serve: optional: true - checksum: 10/ee7eff63ef930c8ec37b341d12f180598a5173938a5b8d1d7c53306eab10b3f3f23adcba4824e5a93ddcd0cf185a90baa0b6f483f27a320dd86ad61941940eb6 + checksum: 10/d8c978654c4c6873edc3336bca87d359d3a7f32571e8404af8a3defd0e515aa34d9dc8324a9157d0220d72fb8a6a350660301c2757df964f845422a898714bc7 languageName: node linkType: hard @@ -14841,83 +12921,83 @@ __metadata: languageName: node linkType: hard -"@polkadot/wasm-bridge@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-bridge@npm:7.3.2" +"@polkadot/wasm-bridge@npm:7.4.1": + version: 7.4.1 + resolution: "@polkadot/wasm-bridge@npm:7.4.1" dependencies: - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" + "@polkadot/wasm-util": "npm:7.4.1" + tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" "@polkadot/x-randomvalues": "*" - checksum: 10/8d8afa55d9f14043fb9e414b356d6ba4aa0ccc52219b8022fc86a5ea5be569dea34383b461528069996f5399011db6060ceff158227606d95ab779717ea25f5f + checksum: 10/b1d687ff433974cb34e54539b69209b569c4faf818e3cf376601d76acacc946bd56e5c06b18f0720dd1f63454f8e74f65bc37f259c7fca35d58623d27154b033 languageName: node linkType: hard -"@polkadot/wasm-crypto-asmjs@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto-asmjs@npm:7.3.2" +"@polkadot/wasm-crypto-asmjs@npm:7.4.1": + version: 7.4.1 + resolution: "@polkadot/wasm-crypto-asmjs@npm:7.4.1" dependencies: - tslib: "npm:^2.6.2" + tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - checksum: 10/b8c0c7b3a1e5b4b07b0d4fbec51ae19c529c8a943c0b3c4631490e05f5cc61fa352e7eaf7a9fabeb49ab2e40760ff584346a929e67f6eece82134c13963e6c4b + checksum: 10/68df2338bff14c0331d62871b66e31cea1005eac8f136c294074f7350d4c342bba17a7edd3cc9aecb2ae63dad4e927422e7be562c446bb2b7ff1a6af17bb8eee languageName: node linkType: hard -"@polkadot/wasm-crypto-init@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto-init@npm:7.3.2" +"@polkadot/wasm-crypto-init@npm:7.4.1": + version: 7.4.1 + resolution: "@polkadot/wasm-crypto-init@npm:7.4.1" dependencies: - "@polkadot/wasm-bridge": "npm:7.3.2" - "@polkadot/wasm-crypto-asmjs": "npm:7.3.2" - "@polkadot/wasm-crypto-wasm": "npm:7.3.2" - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" + "@polkadot/wasm-bridge": "npm:7.4.1" + "@polkadot/wasm-crypto-asmjs": "npm:7.4.1" + "@polkadot/wasm-crypto-wasm": "npm:7.4.1" + "@polkadot/wasm-util": "npm:7.4.1" + tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" "@polkadot/x-randomvalues": "*" - checksum: 10/94b950c01f20c2ce98e2e8bfd3dc94fdcdc095a2b3d609c5de3db3bc9e403871ff08479d7eac1d2e4d048b9375e82dafb5bfab3d9d86988ec4afc41e7539d0af + checksum: 10/d12c791214301419d94f5b374b443addc59c45e155f67b9503db4fe72866fa92e040ce8764f6dd8b4ce95005d4508a83efe832c6df4c946b7f14c18d28e8f0c1 languageName: node linkType: hard -"@polkadot/wasm-crypto-wasm@npm:7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto-wasm@npm:7.3.2" +"@polkadot/wasm-crypto-wasm@npm:7.4.1": + version: 7.4.1 + resolution: "@polkadot/wasm-crypto-wasm@npm:7.4.1" dependencies: - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" + "@polkadot/wasm-util": "npm:7.4.1" + tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - checksum: 10/f984db1bf121827b8a39b2f18d838958dfcedb901037a382a5b67126dc20a9c1cec4f3dd8f9ccc2ccd5a5f259d9f2b62df2f03d55cf83185f84709c1b87c5673 + checksum: 10/22cd4e5d734bc08f6707d25cf43c9b75af335ee39284bf43dced0c72abd1300c7ebc3e956c3ce175db59655ed4fd1c37fc652c7851ee308de0bdf65331f7ba67 languageName: node linkType: hard "@polkadot/wasm-crypto@npm:^7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-crypto@npm:7.3.2" - dependencies: - "@polkadot/wasm-bridge": "npm:7.3.2" - "@polkadot/wasm-crypto-asmjs": "npm:7.3.2" - "@polkadot/wasm-crypto-init": "npm:7.3.2" - "@polkadot/wasm-crypto-wasm": "npm:7.3.2" - "@polkadot/wasm-util": "npm:7.3.2" - tslib: "npm:^2.6.2" + version: 7.4.1 + resolution: "@polkadot/wasm-crypto@npm:7.4.1" + dependencies: + "@polkadot/wasm-bridge": "npm:7.4.1" + "@polkadot/wasm-crypto-asmjs": "npm:7.4.1" + "@polkadot/wasm-crypto-init": "npm:7.4.1" + "@polkadot/wasm-crypto-wasm": "npm:7.4.1" + "@polkadot/wasm-util": "npm:7.4.1" + tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" "@polkadot/x-randomvalues": "*" - checksum: 10/ec0bf040388890b0d268ca94d2311bbb27a45b46b4f5812a2a478c1fea3c747878244535280b9c38bf2a65b9b4533bf4f9fddbc4c715d167940e6d951fef146b + checksum: 10/7fbb38c15217965066904dfa007dafc835ed828c0a33ef6621f772fdd50b634aa0862118713e5bf564dc17891f3e3a6f09a589b447ba4e39f2e9847a0f5383be languageName: node linkType: hard -"@polkadot/wasm-util@npm:7.3.2, @polkadot/wasm-util@npm:^7.3.2": - version: 7.3.2 - resolution: "@polkadot/wasm-util@npm:7.3.2" +"@polkadot/wasm-util@npm:7.4.1, @polkadot/wasm-util@npm:^7.3.2": + version: 7.4.1 + resolution: "@polkadot/wasm-util@npm:7.4.1" dependencies: - tslib: "npm:^2.6.2" + tslib: "npm:^2.7.0" peerDependencies: "@polkadot/util": "*" - checksum: 10/4b19f59aaca5c62933c5b355116a0fcd8dfa03b3e13f2b4c8491058f6d29fd030c956dee3f1c0821da981b874741c9ea62840c179369afb1a358a22216e5ff3c + checksum: 10/08effda106378716954267cb268035a37d2c0a8c1db2e6f617ccd7b4f1e410342b4ff1c26db95b828aeb23e2b5512ca72f389055d717c54fda00e97fba89462a languageName: node linkType: hard @@ -15088,21 +13168,21 @@ __metadata: linkType: hard "@redocly/ajv@npm:^8.11.0": - version: 8.11.0 - resolution: "@redocly/ajv@npm:8.11.0" + version: 8.11.2 + resolution: "@redocly/ajv@npm:8.11.2" dependencies: fast-deep-equal: "npm:^3.1.1" json-schema-traverse: "npm:^1.0.0" require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/ec2fca2c08715e5618c498ce55884f7703e296deebf93675e3c9ad124caf5fe36f4da04be6729575f80a75e3d09295f7072ce066ed58393ced289e43dd6eabd8 + uri-js-replace: "npm:^1.0.1" + checksum: 10/75d6d8bcc2ca79d0e818d2dbc8ec1bc1b2dc64036b6fccddaa20b547b0c06e4d0317101a5c7b736ecf94f16e7324ca4cc81a4d31de3c9fc4a0826a5f65a6a5b7 languageName: node linkType: hard "@redocly/config@npm:^0.6.0": - version: 0.6.0 - resolution: "@redocly/config@npm:0.6.0" - checksum: 10/bde6c0f32e85bf70d7645fccd5332ddee6a4bbb07893bd61cd3c8067eee7b339edb1c1de3cb8b1bbd982ba461ac6e70837a4b9eafb20993cc0fd44dd8e500312 + version: 0.6.3 + resolution: "@redocly/config@npm:0.6.3" + checksum: 10/0d5df7024882ae6c525a8b7cdfcaf43964d3aded7970193bcaaaf19ef7bad2029c9315f113922899c485a7c8c69d758c4daa5bf7d6093597144de4476ee7fd98 languageName: node linkType: hard @@ -15125,8 +13205,8 @@ __metadata: linkType: hard "@redux-saga/core@npm:^1.0.0": - version: 1.2.3 - resolution: "@redux-saga/core@npm:1.2.3" + version: 1.3.0 + resolution: "@redux-saga/core@npm:1.3.0" dependencies: "@babel/runtime": "npm:^7.6.3" "@redux-saga/deferred": "npm:^1.2.1" @@ -15134,9 +13214,8 @@ __metadata: "@redux-saga/is": "npm:^1.1.3" "@redux-saga/symbols": "npm:^1.1.3" "@redux-saga/types": "npm:^1.2.1" - redux: "npm:^4.0.4" typescript-tuple: "npm:^2.2.1" - checksum: 10/9398033da1da4fcf8f6d3b0b0bd9901bd1530cca437023a8e9aba0b7616e246c801ab2a836dd8b2181ff38d2857896a962a35304d9902e77e1dec5079b9d9851 + checksum: 10/a310a31dda8a9dc6ff9e35e14d4a6439af9dcce48470e66feab31141b6f3647b6325d8d6533893f14bb5b9c950104ef5ad17e87328f48239cccb8103ef5cac1b languageName: node linkType: hard @@ -15245,122 +13324,143 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.18.1" +"@rollup/rollup-android-arm-eabi@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.24.4" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-android-arm64@npm:4.18.1" +"@rollup/rollup-android-arm64@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-android-arm64@npm:4.24.4" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-darwin-arm64@npm:4.18.1" +"@rollup/rollup-darwin-arm64@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-darwin-arm64@npm:4.24.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-darwin-x64@npm:4.18.1" +"@rollup/rollup-darwin-x64@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-darwin-x64@npm:4.24.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.1" +"@rollup/rollup-freebsd-arm64@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.24.4" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-x64@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-freebsd-x64@npm:4.24.4" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.24.4" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.1" +"@rollup/rollup-linux-arm-musleabihf@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.24.4" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.1" +"@rollup/rollup-linux-arm64-gnu@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.24.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.1" +"@rollup/rollup-linux-arm64-musl@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.24.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.1" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.24.4" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.1" +"@rollup/rollup-linux-riscv64-gnu@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.24.4" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.1" +"@rollup/rollup-linux-s390x-gnu@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.24.4" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.1" +"@rollup/rollup-linux-x64-gnu@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.24.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.1" +"@rollup/rollup-linux-x64-musl@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.24.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.1" +"@rollup/rollup-win32-arm64-msvc@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.24.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.1" +"@rollup/rollup-win32-ia32-msvc@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.24.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.18.1": - version: 4.18.1 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.1" +"@rollup/rollup-win32-x64-msvc@npm:4.24.4": + version: 4.24.4 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.24.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard +"@rtsao/scc@npm:^1.1.0": + version: 1.1.0 + resolution: "@rtsao/scc@npm:1.1.0" + checksum: 10/17d04adf404e04c1e61391ed97bca5117d4c2767a76ae3e879390d6dec7b317fcae68afbf9e98badee075d0b64fa60f287729c4942021b4d19cd01db77385c01 + languageName: node + linkType: hard + "@rushstack/eslint-patch@npm:^1.1.0": - version: 1.3.3 - resolution: "@rushstack/eslint-patch@npm:1.3.3" - checksum: 10/411c93510a00f0a52ba88f03810ca72ff09809102aeac5fd74dfd3c99afde06158ac94e24f5262bf437cdd7ac6b0dd03335b1e96ce795fe079f968f6c81d09a1 + version: 1.10.4 + resolution: "@rushstack/eslint-patch@npm:1.10.4" + checksum: 10/fa14a091cc800e1fac75c03112db03eaebbdc2de6e1532ed7702e106c3ce0cbf9b896794d885d455b225e9cc696a5e10c7bfb803d00774461d691e7a39915fc7 languageName: node linkType: hard @@ -15394,13 +13494,20 @@ __metadata: linkType: hard "@scale-codec/util@npm:^1.1.1": - version: 1.1.1 - resolution: "@scale-codec/util@npm:1.1.1" - checksum: 10/ea5de2dea649880843a787d5b40da5903f798ed42149599d913019ffd5a2240dfec2928101a95dd019e954134989f37bd3681f70d34d7424de2538614ae598b0 + version: 1.1.2 + resolution: "@scale-codec/util@npm:1.1.2" + checksum: 10/a06c860b46562c5cc49b1a7783c095b495401a6b5703b6412c6e1c6b1a89a4299e26699b393d88f77a6fb07efd4c1d3abf575830d4ef94289352df45546f00d0 languageName: node linkType: hard -"@schematics/angular@npm:16.2.1, @schematics/angular@npm:^16.0.0": +"@scarf/scarf@npm:=1.4.0": + version: 1.4.0 + resolution: "@scarf/scarf@npm:1.4.0" + checksum: 10/1b39a18fa29e91cfbc134c588e20c5f01a1b21ec4473614123801155b48378e9c3bf72adaca8c67e433ae951ab653268e9502cc5733230d8927532f74a6b89c9 + languageName: node + linkType: hard + +"@schematics/angular@npm:16.2.1": version: 16.2.1 resolution: "@schematics/angular@npm:16.2.1" dependencies: @@ -15422,17 +13529,21 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:^1.1.5": - version: 1.1.5 - resolution: "@scure/base@npm:1.1.5" - checksum: 10/543fa9991c6378b6a0d5ab7f1e27b30bb9c1e860d3ac81119b4213cfdf0ad7b61be004e06506e89de7ce0cec9391c17f5c082bb34c3b617a2ee6a04129f52481 +"@schematics/angular@npm:^16.0.0": + version: 16.2.16 + resolution: "@schematics/angular@npm:16.2.16" + dependencies: + "@angular-devkit/core": "npm:16.2.16" + "@angular-devkit/schematics": "npm:16.2.16" + jsonc-parser: "npm:3.2.0" + checksum: 10/2533616ffa64fac2d601bd76d23ca0ee272964b764562afc1bd00833ce577f271f8d2afd9cf4e0baf91ac92186739556f24a67482caba4c2acbc5bfc09cd6ef2 languageName: node linkType: hard -"@scure/base@npm:~1.1.0": - version: 1.1.1 - resolution: "@scure/base@npm:1.1.1" - checksum: 10/9aaa525ac25215cbe1bde00733a2fd25e99f03793aa1fd2961c567bb62b60c8a3a485a7cb5d748c41604fca79d149de19b05e64449b770c0a04b9ae38d0b5b2b +"@scure/base@npm:^1.1.5, @scure/base@npm:~1.1.0, @scure/base@npm:~1.1.6": + version: 1.1.9 + resolution: "@scure/base@npm:1.1.9" + checksum: 10/f0ab7f687bbcdee2a01377fe3cd808bf63977999672751295b6a92625d5322f4754a96d40f6bd579bc367aad48ecf8a4e6d0390e70296e6ded1076f52adb16bb languageName: node linkType: hard @@ -15447,14 +13558,14 @@ __metadata: languageName: node linkType: hard -"@scure/bip32@npm:1.3.1": - version: 1.3.1 - resolution: "@scure/bip32@npm:1.3.1" +"@scure/bip32@npm:1.4.0": + version: 1.4.0 + resolution: "@scure/bip32@npm:1.4.0" dependencies: - "@noble/curves": "npm:~1.1.0" - "@noble/hashes": "npm:~1.3.1" - "@scure/base": "npm:~1.1.0" - checksum: 10/0595955374dfa54a60adfa33d4793fd8b27230e962aaceb5bb5fcf8ccbb935184aa2c45154ec9bdfb26a1877b2ae0a8e4808c9a5464d4ffd971120740b816def + "@noble/curves": "npm:~1.4.0" + "@noble/hashes": "npm:~1.4.0" + "@scure/base": "npm:~1.1.6" + checksum: 10/6cd5062d902564d9e970597ec8b1adacb415b2eadfbb95aee1a1a0480a52eb0de4d294d3753aa8b48548064c9795ed108d348a31a8ce3fc88785377bb12c63b9 languageName: node linkType: hard @@ -15468,13 +13579,13 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.2.1": - version: 1.2.1 - resolution: "@scure/bip39@npm:1.2.1" +"@scure/bip39@npm:1.3.0": + version: 1.3.0 + resolution: "@scure/bip39@npm:1.3.0" dependencies: - "@noble/hashes": "npm:~1.3.0" - "@scure/base": "npm:~1.1.0" - checksum: 10/2ea368bbed34d6b1701c20683bf465e147f231a9e37e639b8c82f585d6f978bb0f3855fca7ceff04954ae248b3e313f5d322d0210614fb7acb402739415aaf31 + "@noble/hashes": "npm:~1.4.0" + "@scure/base": "npm:~1.1.6" + checksum: 10/7d71fd58153de22fe8cd65b525f6958a80487bc9d0fbc32c71c328aeafe41fa259f989d2f1e0fa4fdfeaf83b8fcf9310d52ed9862987e46c2f2bfb9dd8cf9fc1 languageName: node linkType: hard @@ -15567,10 +13678,55 @@ __metadata: languageName: node linkType: hard -"@shikijs/core@npm:1.9.0": - version: 1.9.0 - resolution: "@shikijs/core@npm:1.9.0" - checksum: 10/ec07699742f0561ab4d2fb07715397183cbed23ca42e082b14e9e5f85eb7f8647897f69698d003d8c6a1b8682da0af77861b3a2f78d366eef7581bae4415142c +"@shikijs/core@npm:1.22.2": + version: 1.22.2 + resolution: "@shikijs/core@npm:1.22.2" + dependencies: + "@shikijs/engine-javascript": "npm:1.22.2" + "@shikijs/engine-oniguruma": "npm:1.22.2" + "@shikijs/types": "npm:1.22.2" + "@shikijs/vscode-textmate": "npm:^9.3.0" + "@types/hast": "npm:^3.0.4" + hast-util-to-html: "npm:^9.0.3" + checksum: 10/c5203e1cbef8e159fc4ef4556b350dc055d9d15af57cb12ea699c94ecd603e58f7000e106fd5d103e1a1c8d1cc975cd7c573e9bacaa01f7e5eaa05b921d1ee38 + languageName: node + linkType: hard + +"@shikijs/engine-javascript@npm:1.22.2": + version: 1.22.2 + resolution: "@shikijs/engine-javascript@npm:1.22.2" + dependencies: + "@shikijs/types": "npm:1.22.2" + "@shikijs/vscode-textmate": "npm:^9.3.0" + oniguruma-to-js: "npm:0.4.3" + checksum: 10/162f089f7ec7bc8e6877e1047bdf339a7446b7407ad0bffcb4b7372263ae5aae0be429f1c87054326be79d4e1bbe55849c010ea4aa499e83816ce009e490938b + languageName: node + linkType: hard + +"@shikijs/engine-oniguruma@npm:1.22.2": + version: 1.22.2 + resolution: "@shikijs/engine-oniguruma@npm:1.22.2" + dependencies: + "@shikijs/types": "npm:1.22.2" + "@shikijs/vscode-textmate": "npm:^9.3.0" + checksum: 10/924fff6c3d0e464ab2bde326076535fc1f98c0c90ceba1811b89f25c7b9df36a0fbec509b2859f5e2097e29f8087e90fa6b951fa8183d44c1abaa21a49c71e9e + languageName: node + linkType: hard + +"@shikijs/types@npm:1.22.2": + version: 1.22.2 + resolution: "@shikijs/types@npm:1.22.2" + dependencies: + "@shikijs/vscode-textmate": "npm:^9.3.0" + "@types/hast": "npm:^3.0.4" + checksum: 10/bba6e4d8ef76fae30e9c298539e6b6b4f82360d894352fc54882531e71b5f5c490a1a49ae83d4133a0de85c7d58ec678c6ceb5f5f5d012cd09a289d8845b1737 + languageName: node + linkType: hard + +"@shikijs/vscode-textmate@npm:^9.3.0": + version: 9.3.0 + resolution: "@shikijs/vscode-textmate@npm:9.3.0" + checksum: 10/4cd3400976559de75a8c96d49b373b8113ec986dd69baaf12d49efde6d9cc88861189b05ee016ce9016803a9cc3bbac4917193088088834d9c6155f43d452d13 languageName: node linkType: hard @@ -15699,13 +13855,6 @@ __metadata: languageName: node linkType: hard -"@sinclair/typebox@npm:^0.25.16": - version: 0.25.24 - resolution: "@sinclair/typebox@npm:0.25.24" - checksum: 10/d415546153478befa3c8386a4723e3061ac065867c7e22fe0374d36091991676d231e5381e66daa0ed21639217c6c80e0d6224a9c89aaac269e58b82b2f4a2f4 - languageName: node - linkType: hard - "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -15720,7 +13869,7 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^4.6.0": +"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": version: 4.6.0 resolution: "@sindresorhus/is@npm:4.6.0" checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 @@ -15728,9 +13877,9 @@ __metadata: linkType: hard "@sindresorhus/is@npm:^5.2.0": - version: 5.5.2 - resolution: "@sindresorhus/is@npm:5.5.2" - checksum: 10/d8f7abae42a38236ecfc3a1bdc26956ce7302b2992a002349f42e34c1b017a588d2eee70bf3444d7753d5c4055a9bc85b3d7a5965c34a16d5281972ce3094f83 + version: 5.6.0 + resolution: "@sindresorhus/is@npm:5.6.0" + checksum: 10/b077c325acec98e30f7d86df158aaba2e7af2acb9bb6a00fda4b91578539fbff4ecebe9b934e24fec0e6950de3089d89d79ec02d9062476b20ce185be0e01bd6 languageName: node linkType: hard @@ -15741,7 +13890,7 @@ __metadata: languageName: node linkType: hard -"@sinonjs/commons@npm:^1, @sinonjs/commons@npm:^1.0.2, @sinonjs/commons@npm:^1.3.0": +"@sinonjs/commons@npm:^1, @sinonjs/commons@npm:^1.0.2, @sinonjs/commons@npm:^1.3.0, @sinonjs/commons@npm:^1.7.0": version: 1.8.6 resolution: "@sinonjs/commons@npm:1.8.6" dependencies: @@ -15750,30 +13899,21 @@ __metadata: languageName: node linkType: hard -"@sinonjs/commons@npm:^1.7.0": - version: 1.8.3 - resolution: "@sinonjs/commons@npm:1.8.3" - dependencies: - type-detect: "npm:4.0.8" - checksum: 10/910720ef0a5465474a593b4f48d39b67ca7f1a3962475e85d67ed8a13194e3c16b9bfe21081b51c66b631d649376fce0efd5a7c74066d3fe6fcda2729829af1f - languageName: node - linkType: hard - -"@sinonjs/commons@npm:^2.0.0": - version: 2.0.0 - resolution: "@sinonjs/commons@npm:2.0.0" +"@sinonjs/commons@npm:^3.0.0": + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" dependencies: type-detect: "npm:4.0.8" - checksum: 10/bd6b44957077cd99067dcf401e80ed5ea03ba930cba2066edbbfe302d5fc973a108db25c0ae4930ee53852716929e4c94fa3b8a1510a51ac6869443a139d1e3d + checksum: 10/a0af217ba7044426c78df52c23cedede6daf377586f3ac58857c565769358ab1f44ebf95ba04bbe38814fba6e316ca6f02870a009328294fc2c555d0f85a7117 languageName: node linkType: hard "@sinonjs/fake-timers@npm:^10.0.2": - version: 10.0.2 - resolution: "@sinonjs/fake-timers@npm:10.0.2" + version: 10.3.0 + resolution: "@sinonjs/fake-timers@npm:10.3.0" dependencies: - "@sinonjs/commons": "npm:^2.0.0" - checksum: 10/f7b47a290426d545894774c946c39877de6d6b3645e46d7d4dc99b9fc869c513791fb5be2496e877472fa630df0b61fc05b12a150bbdca606651a41ec3d5da2d + "@sinonjs/commons": "npm:^3.0.0" + checksum: 10/78155c7bd866a85df85e22028e046b8d46cf3e840f72260954f5e3ed5bd97d66c595524305a6841ffb3f681a08f6e5cef572a2cce5442a8a232dc29fb409b83e languageName: node linkType: hard @@ -15815,23 +13955,16 @@ __metadata: linkType: hard "@sinonjs/text-encoding@npm:^0.7.1": - version: 0.7.2 - resolution: "@sinonjs/text-encoding@npm:0.7.2" - checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 - languageName: node - linkType: hard - -"@socket.io/base64-arraybuffer@npm:~1.0.2": - version: 1.0.2 - resolution: "@socket.io/base64-arraybuffer@npm:1.0.2" - checksum: 10/fa3e58c7581643d0557969cd3bece20e198596df77968ff29ede6be329d488e65104bef900e68a67f39d8855abfa59baa2b08d96fb856504bd01cbdd8f52249c + version: 0.7.3 + resolution: "@sinonjs/text-encoding@npm:0.7.3" + checksum: 10/f0cc89bae36e7ce159187dece7800b78831288f1913e9ae8cf8a878da5388232d2049740f6f4a43ec4b43b8ad1beb55f919f45eb9a577adb4a2a6eacb27b25fc languageName: node linkType: hard "@socket.io/component-emitter@npm:~3.1.0": - version: 3.1.0 - resolution: "@socket.io/component-emitter@npm:3.1.0" - checksum: 10/db069d95425b419de1514dffe945cc439795f6a8ef5b9465715acf5b8b50798e2c91b8719cbf5434b3fe7de179d6cdcd503c277b7871cb3dd03febb69bdd50fa + version: 3.1.2 + resolution: "@socket.io/component-emitter@npm:3.1.2" + checksum: 10/89888f00699eb34e3070624eb7b8161fa29f064aeb1389a48f02195d55dd7c52a504e52160016859f6d6dffddd54324623cdd47fd34b3d46f9ed96c18c456edc languageName: node linkType: hard @@ -15923,9 +14056,9 @@ __metadata: linkType: hard "@stellar/js-xdr@npm:^3.1.1": - version: 3.1.1 - resolution: "@stellar/js-xdr@npm:3.1.1" - checksum: 10/3bc8ee3f1611b55938ef0249b7a90b3d689177d45b4c8c24c5562b8fe32372148f7544a0aab67776f4c7b95aef8cb0f97606b86ec800bb087302ff404cb8ccbc + version: 3.1.2 + resolution: "@stellar/js-xdr@npm:3.1.2" + checksum: 10/96b5c52088bb2f2cc11a04ee1766ceb9431bdb0195058b9bc8d60cd1459772c2be6a9aa1bf69ba8b7589cfaf71beef96890e60d7fd7de0332c11ae1917f95440 languageName: node linkType: hard @@ -15971,21 +14104,12 @@ __metadata: languageName: node linkType: hard -"@stencil/core@npm:^4.0.3, @stencil/core@npm:^4.19.2": - version: 4.19.2 - resolution: "@stencil/core@npm:4.19.2" - bin: - stencil: bin/stencil - checksum: 10/9e188af9988e9068368e8e512f3146833b1241f2aee562d2aecb4654cec6bacd5b76c80ea8e4c47322d9586186211cefaf93fd4525a729103fa95bd2e4cbb602 - languageName: node - linkType: hard - -"@stencil/core@npm:^4.1.0": - version: 4.2.0 - resolution: "@stencil/core@npm:4.2.0" +"@stencil/core@npm:^4.0.3, @stencil/core@npm:^4.1.0, @stencil/core@npm:^4.19.2": + version: 4.22.2 + resolution: "@stencil/core@npm:4.22.2" bin: stencil: bin/stencil - checksum: 10/5d85d492371a5c526d5a44e6bb019b3de400c88be360ef39b087d859de8639e7f1759ad5e2ce090f20684f0f000abd4405a5d25e5370716a9f7af1116ca2b8ff + checksum: 10/0d519f028cf9b8c70d05dff9aca8bcf7baf10706b061ddd047b9f24d04a65f3a88e8ac45cb3a3a00153f72d226fba98c65965104060539661416d6034ed0fb72 languageName: node linkType: hard @@ -16008,9 +14132,9 @@ __metadata: linkType: hard "@substrate/ss58-registry@npm:^1.44.0": - version: 1.46.0 - resolution: "@substrate/ss58-registry@npm:1.46.0" - checksum: 10/464d1f0b3bb382f8ae1f5037ac66c53534a44c95edffa19183ae40012f1c5e5532d9f9ce307b6ac84d0775ae16493353a27d2db31d61133a1677ed904c37f30e + version: 1.51.0 + resolution: "@substrate/ss58-registry@npm:1.51.0" + checksum: 10/34eb21292f543a8be7c62ad3bcdae89d61c8a51e35a0be4687b6b4e955b5180a90a7691a9e6779f7509f8dfcfdfa372d8278087a9668521b9c501adb85c915b6 languageName: node linkType: hard @@ -16225,6 +14349,15 @@ __metadata: languageName: node linkType: hard +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" + dependencies: + defer-to-connect: "npm:^2.0.0" + checksum: 10/c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 + languageName: node + linkType: hard + "@szmarczak/http-timer@npm:^5.0.1": version: 5.0.1 resolution: "@szmarczak/http-timer@npm:5.0.1" @@ -16365,84 +14498,84 @@ __metadata: languageName: node linkType: hard -"@truffle/abi-utils@npm:^1.0.2": - version: 1.0.2 - resolution: "@truffle/abi-utils@npm:1.0.2" +"@truffle/abi-utils@npm:^1.0.3": + version: 1.0.3 + resolution: "@truffle/abi-utils@npm:1.0.3" dependencies: change-case: "npm:3.0.2" fast-check: "npm:3.1.1" web3-utils: "npm:1.10.0" - checksum: 10/f992d7b495f9c1806e5eddae545b5acb51f4a1ce24c2b2ddd84382d258c226bceeeefb38c9af3dcdf5aa018f8c18795a632497a02b3a21d9975a4361d6e3208a + checksum: 10/9e1ee820f9654e85a8a4a39e714d9b8dc9bffb6b5a035b5d869b4264eaf96b8e260fd43f378e704b962794235f534fca155dc4512e19266a0184debad2e0ddc5 languageName: node linkType: hard "@truffle/blockchain-utils@npm:^0.1.8": - version: 0.1.8 - resolution: "@truffle/blockchain-utils@npm:0.1.8" - checksum: 10/094070d27d68ab63f4fe1bdc61917089f6a5a8ba6e1f92330b0684c38410aea907a3781aaada26d0c283cef7b32812ae690e89a696c98ede0624d86f3d993b5e + version: 0.1.9 + resolution: "@truffle/blockchain-utils@npm:0.1.9" + checksum: 10/4f7acfc00b29ae6830eb60563e58e1fef3d2480fc4bf426781b3cf40e1a6387bf05fef15e0ac851f7c10e586515db0fa370ac2dbeffa396e735d665738831663 languageName: node linkType: hard -"@truffle/code-utils@npm:^3.0.3": - version: 3.0.3 - resolution: "@truffle/code-utils@npm:3.0.3" +"@truffle/code-utils@npm:^3.0.4": + version: 3.0.4 + resolution: "@truffle/code-utils@npm:3.0.4" dependencies: cbor: "npm:^5.2.0" - checksum: 10/6b255595568ab8e5bee8ab771f4bbd69df940d8b2c246b619874462520cbee30fab0f7ccb181be7cec2866c1fb240f42bd4aa160beb1a791ea499a0d12b9fde3 + checksum: 10/de43fd9acb2396601d17c35177e9f0bae41b3f7e2ff1036f72215d755a8bd826d439f0768535af158e8874a0ad0adff6efcb1b6ba94ad43dab36028e99e16d35 languageName: node linkType: hard -"@truffle/codec@npm:^0.17.2": - version: 0.17.2 - resolution: "@truffle/codec@npm:0.17.2" +"@truffle/codec@npm:^0.17.3": + version: 0.17.3 + resolution: "@truffle/codec@npm:0.17.3" dependencies: - "@truffle/abi-utils": "npm:^1.0.2" - "@truffle/compile-common": "npm:^0.9.7" + "@truffle/abi-utils": "npm:^1.0.3" + "@truffle/compile-common": "npm:^0.9.8" big.js: "npm:^6.0.3" bn.js: "npm:^5.1.3" cbor: "npm:^5.2.0" debug: "npm:^4.3.1" lodash: "npm:^4.17.21" - semver: "npm:7.5.2" + semver: "npm:^7.5.4" utf8: "npm:^3.0.0" web3-utils: "npm:1.10.0" - checksum: 10/9332dc23da32f97afbbf5289e0c3d9f2e706efb69cfdf7fa923aa3d938c133d34a174dc8e17a6c5abeaa715afc43f87045edffc943c6ffbbc5df5da90863a6a2 + checksum: 10/72c947458ce49b564bd7ed355fb9083dbcb1812c5efc30570b67e61ed40a8d8b7250021bbae29d2806d8c1ac2c334470b8170869803b137b1eca49b28f2689ee languageName: node linkType: hard -"@truffle/compile-common@npm:^0.9.7": - version: 0.9.7 - resolution: "@truffle/compile-common@npm:0.9.7" +"@truffle/compile-common@npm:^0.9.8": + version: 0.9.8 + resolution: "@truffle/compile-common@npm:0.9.8" dependencies: - "@truffle/error": "npm:^0.2.1" + "@truffle/error": "npm:^0.2.2" colors: "npm:1.4.0" - checksum: 10/9e9eed52403f1684d73b22eb871775d981a3029d10499e7241166ac34c656c7acf7bd13c946e1c2c8276dc30c2a787a4e975de3891ef3cd7ffc059d682d9a4c4 + checksum: 10/ef35664ad1dd09463934c9dd980f04cbd0ac3076355a5c3cbfdeecacd8d9a81443edeede54329834022cd75ee241e954a93eef4f3a6935ad404a361889f89672 languageName: node linkType: hard -"@truffle/config@npm:^1.3.59": - version: 1.3.59 - resolution: "@truffle/config@npm:1.3.59" +"@truffle/config@npm:^1.3.61": + version: 1.3.61 + resolution: "@truffle/config@npm:1.3.61" dependencies: - "@truffle/error": "npm:^0.2.1" - "@truffle/events": "npm:^0.1.24" - "@truffle/provider": "npm:^0.3.11" + "@truffle/error": "npm:^0.2.2" + "@truffle/events": "npm:^0.1.25" + "@truffle/provider": "npm:^0.3.13" conf: "npm:^10.1.2" debug: "npm:^4.3.1" find-up: "npm:^2.1.0" lodash: "npm:^4.17.21" original-require: "npm:^1.0.1" - checksum: 10/c365378ed339f80865ed318740f33e6091981087f340859d617038ca3eb78cc08672595100c9af9a8688962f4790f3c273b53b812e219188723c982f8df8886c + checksum: 10/b37d42f1ac6ce6327449f3d63ce74b230286c59383ab673c75469e1bf4ee6ed623d65160a0a3623eb02da772553bc1d1a387efe1188a0f3ae67293231f0bf8e1 languageName: node linkType: hard "@truffle/contract-schema@npm:^3.4.15": - version: 3.4.15 - resolution: "@truffle/contract-schema@npm:3.4.15" + version: 3.4.16 + resolution: "@truffle/contract-schema@npm:3.4.16" dependencies: ajv: "npm:^6.10.0" debug: "npm:^4.3.1" - checksum: 10/2106f34097effd7ee38ca9007345e59231772c14a5bd657e6e0dcdcd6d53f426945bb56f478ddbeef1c6d99fabb278cde70e8e6d03d5b4290cd7921fdf18eefb + checksum: 10/61f696ea7cfb05f64f8991039f7ec505523999dfc118e27ed18679f55e2da860e7fc9b1bf6763925d14f66c1aa6c05ef0ace966bdb192519adfe288a9d7a13d1 languageName: node linkType: hard @@ -16468,51 +14601,51 @@ __metadata: languageName: node linkType: hard -"@truffle/dashboard-message-bus-client@npm:^0.1.11": - version: 0.1.11 - resolution: "@truffle/dashboard-message-bus-client@npm:0.1.11" +"@truffle/dashboard-message-bus-client@npm:^0.1.12": + version: 0.1.12 + resolution: "@truffle/dashboard-message-bus-client@npm:0.1.12" dependencies: - "@truffle/dashboard-message-bus-common": "npm:^0.1.6" - "@truffle/promise-tracker": "npm:^0.1.6" - axios: "npm:1.2.4" + "@truffle/dashboard-message-bus-common": "npm:^0.1.7" + "@truffle/promise-tracker": "npm:^0.1.7" + axios: "npm:1.5.0" debug: "npm:^4.3.1" delay: "npm:^5.0.0" isomorphic-ws: "npm:^4.0.1" node-abort-controller: "npm:^3.0.1" tiny-typed-emitter: "npm:^2.1.0" ws: "npm:^7.2.0" - checksum: 10/a7b58497459561c35c6d9fb8e6c9cbef3cd81266bc33147a07028107c6f541c6401d4b1404a515e88db7b85ac3de343b21788563aaf58273c4064f8ce7773fe1 + checksum: 10/ed83dc2509dac1ed3198f1050fa42d5308c985116e64f71c63d70687fa86f1d35b7c3ccbe3593d18ac3021c7c9de1d669e9b5de7f751da81a1fbc6b10f63a128 languageName: node linkType: hard -"@truffle/dashboard-message-bus-common@npm:^0.1.6": - version: 0.1.6 - resolution: "@truffle/dashboard-message-bus-common@npm:0.1.6" - checksum: 10/e985217d874754d1ede8bc16df797d3caac83287c7a1d6ce3a44e78740ed30c0718b807dd8c31ad002a2b413e24eeb320d53cd3faf23af6a136d7e2ab945bc5b +"@truffle/dashboard-message-bus-common@npm:^0.1.7": + version: 0.1.7 + resolution: "@truffle/dashboard-message-bus-common@npm:0.1.7" + checksum: 10/f1adcbd542f4b3c25c920ae4dabd694870c0754469e6a309bacc035aa23d242c542eda33bac8250121c457fdf38b35396d0bf9730e7cc8f132b80ca460adf425 languageName: node linkType: hard "@truffle/db-loader@npm:^0.2.33": - version: 0.2.33 - resolution: "@truffle/db-loader@npm:0.2.33" + version: 0.2.36 + resolution: "@truffle/db-loader@npm:0.2.36" dependencies: - "@truffle/db": "npm:^2.0.33" + "@truffle/db": "npm:^2.0.36" dependenciesMeta: "@truffle/db": optional: true - checksum: 10/90863196d2cd5273c4b8f709049dda69dc4302496dcd576f678e8b924519202429414f8df7eb7c7a4a17ffdc936561d070a187ca8f0192e96bd6a41c09aa1380 + checksum: 10/a39fb6c454d192590227b94d4a23a03b55133edb2e86ce17b19c27aa8b834252544225be0e9f1f99c4b246ab20eaeec27ebf71ce8ef1549fdffb315ab60fdb16 languageName: node linkType: hard -"@truffle/db@npm:^2.0.33": - version: 2.0.33 - resolution: "@truffle/db@npm:2.0.33" +"@truffle/db@npm:^2.0.33, @truffle/db@npm:^2.0.36": + version: 2.0.36 + resolution: "@truffle/db@npm:2.0.36" dependencies: "@graphql-tools/delegate": "npm:^8.4.3" "@graphql-tools/schema": "npm:^8.3.1" - "@truffle/abi-utils": "npm:^1.0.2" - "@truffle/code-utils": "npm:^3.0.3" - "@truffle/config": "npm:^1.3.59" + "@truffle/abi-utils": "npm:^1.0.3" + "@truffle/code-utils": "npm:^3.0.4" + "@truffle/config": "npm:^1.3.61" abstract-leveldown: "npm:^7.2.0" apollo-server: "npm:^3.11.0" debug: "npm:^4.3.1" @@ -16527,32 +14660,32 @@ __metadata: pouchdb-debug: "npm:^7.1.1" pouchdb-find: "npm:^7.0.0" web3-utils: "npm:1.10.0" - checksum: 10/9dfdedf657864a1cb7d5e9a053aa392eac006095369a2b9a8f16c3cb0b558b609e7b818b301b970f11d8c16b1e87291f8d5a4e3b55b8af59f1ddaf6e1927e8e1 + checksum: 10/d3d9cd5a6a51d41edcc6410e600531bcf23cded9bdd3b986b095c97bfd2c878fca769028231843ebd9d212c491d9563d8d8851b8f662df4b35bfd9b409922b69 languageName: node linkType: hard "@truffle/debug-utils@npm:^6.0.56": - version: 6.0.56 - resolution: "@truffle/debug-utils@npm:6.0.56" + version: 6.0.57 + resolution: "@truffle/debug-utils@npm:6.0.57" dependencies: - "@truffle/codec": "npm:^0.17.2" + "@truffle/codec": "npm:^0.17.3" "@trufflesuite/chromafi": "npm:^3.0.0" bn.js: "npm:^5.1.3" chalk: "npm:^2.4.2" debug: "npm:^4.3.1" highlightjs-solidity: "npm:^2.0.6" - checksum: 10/84499d1b552acd32178e8292565567801a2f60f928e755e8bee66943776e7fc0ce6d97787ed2c50364cc2d9f240216447590eab87a7d5bb718d56b835498beec + checksum: 10/83e9b039b1ee700bd84e0dcffb978dc12ec93e632663343ca8ca36b09d692b576b6060583c6a241dcb88d9df5bbd11f26e3e0ecc968baaec375ecda028ed8645 languageName: node linkType: hard "@truffle/debugger@npm:^12.1.2": - version: 12.1.2 - resolution: "@truffle/debugger@npm:12.1.2" + version: 12.1.5 + resolution: "@truffle/debugger@npm:12.1.5" dependencies: "@ensdomains/ensjs": "npm:^2.1.0" - "@truffle/abi-utils": "npm:^1.0.2" - "@truffle/codec": "npm:^0.17.2" - "@truffle/source-map-utils": "npm:^1.3.118" + "@truffle/abi-utils": "npm:^1.0.3" + "@truffle/codec": "npm:^0.17.3" + "@truffle/source-map-utils": "npm:^1.3.119" bn.js: "npm:^5.1.3" debug: "npm:^4.3.1" json-pointer: "npm:^0.6.1" @@ -16561,83 +14694,83 @@ __metadata: redux: "npm:^3.7.2" redux-saga: "npm:1.0.0" reselect-tree: "npm:^1.3.7" - semver: "npm:7.5.2" + semver: "npm:^7.5.4" web3: "npm:1.10.0" web3-eth-abi: "npm:1.10.0" - checksum: 10/fac92369f2d2dee8d21d962c0066e71094e4f8b711c0779f64f30ec7f5c6a026eb9454e3f4c78a163a325479ff213fa61caa6ab4075eff7e3bd00cadc90b1909 + checksum: 10/6e5470379d37c71e5734b22a1109179554160f72538c7ca44be4551dc8d6f69ea99541442b4d7d40f48b8acfe6c322f78ba1e8ce0b3d8b20e6107e9c2c2fd816 languageName: node linkType: hard -"@truffle/error@npm:^0.2.1": - version: 0.2.1 - resolution: "@truffle/error@npm:0.2.1" - checksum: 10/2a7967786fc30aac4b18522f64295511358e952759314c766e5722fc21b3561b0a9177d0346ebca83e9c8d454950aa48b4efe6dffef7b9219ba2d2f1b09de0e8 +"@truffle/error@npm:^0.2.1, @truffle/error@npm:^0.2.2": + version: 0.2.2 + resolution: "@truffle/error@npm:0.2.2" + checksum: 10/1f2b982e58ee84510b59dd5bba8cbb21a42cb24a58ef46334f43433f3c3586ade5575846965f6fe069b0bf59f3a36134f8792f3b78eb0f4e72b8cb2ad8e323e2 languageName: node linkType: hard -"@truffle/events@npm:^0.1.24": - version: 0.1.24 - resolution: "@truffle/events@npm:0.1.24" +"@truffle/events@npm:^0.1.25": + version: 0.1.25 + resolution: "@truffle/events@npm:0.1.25" dependencies: - "@truffle/dashboard-message-bus-client": "npm:^0.1.11" - "@truffle/spinners": "npm:^0.2.4" + "@truffle/dashboard-message-bus-client": "npm:^0.1.12" + "@truffle/spinners": "npm:^0.2.5" debug: "npm:^4.3.1" emittery: "npm:^0.4.1" web3-utils: "npm:1.10.0" - checksum: 10/8837840e239c6a0aac84316a0ca285e7414466eb0f9bbacc3d17247f3521fd794ec6cddf50c1b2a10b77a95a7732cfaa057e53ed4e21fbb4786a0deb5ba64b1c + checksum: 10/2b7f70d8d20789a685aa7afca8a301ac2ee7f756f21e3761e9e27aa2339dcc9928f1077a033d697a69980a56c4323e89427e35233dbd34f2e1b92401ed92a0b1 languageName: node linkType: hard -"@truffle/interface-adapter@npm:^0.5.35": - version: 0.5.35 - resolution: "@truffle/interface-adapter@npm:0.5.35" +"@truffle/interface-adapter@npm:^0.5.35, @truffle/interface-adapter@npm:^0.5.37": + version: 0.5.37 + resolution: "@truffle/interface-adapter@npm:0.5.37" dependencies: bn.js: "npm:^5.1.3" ethers: "npm:^4.0.32" web3: "npm:1.10.0" - checksum: 10/91b0222e80ff7d29b4913740c6ec9d3b4a81c03faf949b6c107d923faf510a9058d1a4aa0bc07b7aedf3a826d7f6d1b311e7b0903e45ae0777e98cba8653e98b + checksum: 10/72489204a2ed6dd6add1926684bb0de9ac5afe7aeea772c161926b8f46634f1f95fd51d8ee8d021f9a50721a0ba2993a6c1b8c37fcd1f07f071a29706bf56a06 languageName: node linkType: hard -"@truffle/promise-tracker@npm:^0.1.6": - version: 0.1.6 - resolution: "@truffle/promise-tracker@npm:0.1.6" - checksum: 10/63c98bbd25c96ebb09d453960534ada50c04a21723cd1ded59cd8ea41f67b26fde5c5b66f31110ef3d94774973bfb3f276fc71c214c8d4f56c2a49918ffba27d +"@truffle/promise-tracker@npm:^0.1.7": + version: 0.1.7 + resolution: "@truffle/promise-tracker@npm:0.1.7" + checksum: 10/992b049bec33a21b57109b63abfeeedcf0e5d19634a1ab16805f76aa86d8b89098b0cf772a70c530147b87b7315243b844143cf26ccc7e8c484995434a3ea5e8 languageName: node linkType: hard -"@truffle/provider@npm:^0.3.11": - version: 0.3.11 - resolution: "@truffle/provider@npm:0.3.11" +"@truffle/provider@npm:^0.3.13": + version: 0.3.13 + resolution: "@truffle/provider@npm:0.3.13" dependencies: - "@truffle/error": "npm:^0.2.1" - "@truffle/interface-adapter": "npm:^0.5.35" + "@truffle/error": "npm:^0.2.2" + "@truffle/interface-adapter": "npm:^0.5.37" debug: "npm:^4.3.1" web3: "npm:1.10.0" - checksum: 10/4ec4327189b9464fad6206c54d2e456ebdab1cf6431d389bcb6e7d8244ba355805af829bd6eb2a6fbcd59b90eb8593c666a76cfcd6e6f659f70a987fe01ded64 + checksum: 10/34aa0ef45c2110dacb97c5b459afcc01694832f2a4641f971e25765631df018cf47f7651f00f49ce5d9fe2cc8efb4ed36a04fc80bf67ad474af0f341003d4a2b languageName: node linkType: hard -"@truffle/source-map-utils@npm:^1.3.118": - version: 1.3.118 - resolution: "@truffle/source-map-utils@npm:1.3.118" +"@truffle/source-map-utils@npm:^1.3.119": + version: 1.3.119 + resolution: "@truffle/source-map-utils@npm:1.3.119" dependencies: - "@truffle/code-utils": "npm:^3.0.3" - "@truffle/codec": "npm:^0.17.2" + "@truffle/code-utils": "npm:^3.0.4" + "@truffle/codec": "npm:^0.17.3" debug: "npm:^4.3.1" json-pointer: "npm:^0.6.1" node-interval-tree: "npm:^1.3.3" web3-utils: "npm:1.10.0" - checksum: 10/428cf7b8863ba33b8aa3959a9ad4ba194280bdf81885219d119ab12f112b2b3f8eb2edd97688054b43c07e7bcb23ff9491cab4f4468e85d1ae642874141ace8a + checksum: 10/5b23e0d3ee39598763ce123be711d5a966bc6045edb47bf17be4a054ea5476649614926c83646dde9e519a8bfaf26cf1ebcaf63cbec8f813f7de0dae1a95ee37 languageName: node linkType: hard -"@truffle/spinners@npm:^0.2.4": - version: 0.2.4 - resolution: "@truffle/spinners@npm:0.2.4" +"@truffle/spinners@npm:^0.2.5": + version: 0.2.5 + resolution: "@truffle/spinners@npm:0.2.5" dependencies: "@trufflesuite/spinnies": "npm:^0.1.1" - checksum: 10/89864e5df98f68fb9bef4e6a602f08e56684e2c96b6a876bf8c76713a2f8c69cdbe5f28076dbb5783c49826fc7142c96561c58133c6562d3596257573f195948 + checksum: 10/8736855e77b3b33f46ee8aa23cfa166c06a857d06c9a1e734857fb490be90f197e42f83cd490d3827731c7ab08b81640ce7366f530dc019919b6571149cf297a languageName: node linkType: hard @@ -16702,30 +14835,30 @@ __metadata: linkType: hard "@tsconfig/node10@npm:^1.0.7": - version: 1.0.8 - resolution: "@tsconfig/node10@npm:1.0.8" - checksum: 10/b8d5fffbc6b17ef64ef74f7fdbccee02a809a063ade785c3648dae59406bc207f70ea2c4296f92749b33019fa36a5ae716e42e49cc7f1bbf0fd147be0d6b970a + version: 1.0.11 + resolution: "@tsconfig/node10@npm:1.0.11" + checksum: 10/51fe47d55fe1b80ec35e6e5ed30a13665fd3a531945350aa74a14a1e82875fb60b350c2f2a5e72a64831b1b6bc02acb6760c30b3738b54954ec2dea82db7a267 languageName: node linkType: hard "@tsconfig/node12@npm:^1.0.7": - version: 1.0.9 - resolution: "@tsconfig/node12@npm:1.0.9" - checksum: 10/a01b2400ab3582b86b589c6d31dcd0c0656f333adecde85d6d7d4086adb059808b82692380bb169546d189bf771ae21d02544a75b57bd6da4a5dd95f8567bec9 + version: 1.0.11 + resolution: "@tsconfig/node12@npm:1.0.11" + checksum: 10/5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a languageName: node linkType: hard "@tsconfig/node14@npm:^1.0.0": - version: 1.0.1 - resolution: "@tsconfig/node14@npm:1.0.1" - checksum: 10/976345e896c0f059867f94f8d0f6ddb8b1844fb62bf36b727de8a9a68f024857e5db97ed51d3325e23e0616a5e48c034ff51a8d595b3fe7e955f3587540489be + version: 1.0.3 + resolution: "@tsconfig/node14@npm:1.0.3" + checksum: 10/19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d languageName: node linkType: hard "@tsconfig/node16@npm:^1.0.2": - version: 1.0.2 - resolution: "@tsconfig/node16@npm:1.0.2" - checksum: 10/ca94d3639714672bbfd55f03521d3f56bb6a25479bd425da81faf21f13e1e9d15f40f97377dedbbf477a5841c5b0c8f4cd1b391f33553d750b9202c54c2c07aa + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 10/202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff languageName: node linkType: hard @@ -16764,11 +14897,11 @@ __metadata: linkType: hard "@types/accepts@npm:^1.3.5": - version: 1.3.5 - resolution: "@types/accepts@npm:1.3.5" + version: 1.3.7 + resolution: "@types/accepts@npm:1.3.7" dependencies: "@types/node": "npm:*" - checksum: 10/3984edd631d9e308ef10286454a05e2388812a740d404abf93522a3bc3d10032ae6a60816e8cc4ae1bc96367db39e543d3ef862944cea53d1eea48be1f624fc2 + checksum: 10/7678cf74976e16093aff6e6f9755826faf069ac1e30179276158ce46ea246348ff22ca6bdd46cef08428881337d9ceefbf00bab08a7731646eb9fc9449d6a1e7 languageName: node linkType: hard @@ -16795,7 +14928,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:*, @types/babel__core@npm:^7.20.5": +"@types/babel__core@npm:*, @types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.20.5": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -16808,66 +14941,31 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.0.0": - version: 7.20.2 - resolution: "@types/babel__core@npm:7.20.2" - dependencies: - "@babel/parser": "npm:^7.20.7" - "@babel/types": "npm:^7.20.7" - "@types/babel__generator": "npm:*" - "@types/babel__template": "npm:*" - "@types/babel__traverse": "npm:*" - checksum: 10/78aede009117ff6c95ef36db19e27ad15ecdcb5cfc9ad57d43caa5d2f44127105691a3e6e8d1806fd305484db8a74fdec5640e88da452c511f6351353f7ac0c8 - languageName: node - linkType: hard - -"@types/babel__core@npm:^7.1.14": - version: 7.1.18 - resolution: "@types/babel__core@npm:7.1.18" - dependencies: - "@babel/parser": "npm:^7.1.0" - "@babel/types": "npm:^7.0.0" - "@types/babel__generator": "npm:*" - "@types/babel__template": "npm:*" - "@types/babel__traverse": "npm:*" - checksum: 10/7921d75d42eed69b9ba9fc282490216ab77a6bcf93681ed8a9da77f9ba2912c973667e9d706e6e012673e713b36c4e3654ecd25057736346e6c794f25d309a87 - languageName: node - linkType: hard - "@types/babel__generator@npm:*": - version: 7.6.4 - resolution: "@types/babel__generator@npm:7.6.4" + version: 7.6.8 + resolution: "@types/babel__generator@npm:7.6.8" dependencies: "@babel/types": "npm:^7.0.0" - checksum: 10/34f361a0d54a0d85ea4c4b5122c4025a5738fe6795361c85f07a4f8f9add383de640e8611edeeb8339db8203c2d64bff30be266bdcfe3cf777c19e8d34f9cebc + checksum: 10/b53c215e9074c69d212402990b0ca8fa57595d09e10d94bda3130aa22b55d796e50449199867879e4ea0ee968f3a2099e009cfb21a726a53324483abbf25cd30 languageName: node linkType: hard "@types/babel__template@npm:*": - version: 7.4.1 - resolution: "@types/babel__template@npm:7.4.1" + version: 7.4.4 + resolution: "@types/babel__template@npm:7.4.4" dependencies: "@babel/parser": "npm:^7.1.0" "@babel/types": "npm:^7.0.0" - checksum: 10/649fe8b42c2876be1fd28c6ed9b276f78152d5904ec290b6c861d9ef324206e0a5c242e8305c421ac52ecf6358fa7e32ab7a692f55370484825c1df29b1596ee - languageName: node - linkType: hard - -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.14.2 - resolution: "@types/babel__traverse@npm:7.14.2" - dependencies: - "@babel/types": "npm:^7.3.0" - checksum: 10/daa949c48570f7ccc1dc0fad6d660244257de7110bae5a151842d4dac6ac90c6e0f476c8d7ac0a5a856fa34cb5f0c3299784da25a07eb79d5a9d75c7e4c68655 + checksum: 10/d7a02d2a9b67e822694d8e6a7ddb8f2b71a1d6962dfd266554d2513eefbb205b33ca71a0d163b1caea3981ccf849211f9964d8bd0727124d18ace45aa6c9ae29 languageName: node linkType: hard -"@types/babel__traverse@npm:^7.0.4": - version: 7.20.1 - resolution: "@types/babel__traverse@npm:7.20.1" +"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.4, @types/babel__traverse@npm:^7.0.6": + version: 7.20.6 + resolution: "@types/babel__traverse@npm:7.20.6" dependencies: "@babel/types": "npm:^7.20.7" - checksum: 10/8f18d1488adf296f50d01e2386797c56a607cde2cfc3c7c55cea34d760aed9386c81ea808a151a0efb11d99e0083c138c5733d3f214471a30abed055bede39d8 + checksum: 10/63d13a3789aa1e783b87a8b03d9fb2c2c90078de7782422feff1631b8c2a25db626e63a63ac5a1465d47359201c73069dacb4b52149d17c568187625da3064ae languageName: node linkType: hard @@ -16878,7 +14976,16 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:*, @types/bn.js@npm:5.1.0, @types/bn.js@npm:^5.1.0": +"@types/bn.js@npm:*, @types/bn.js@npm:^5.1.0, @types/bn.js@npm:^5.1.1, @types/bn.js@npm:^5.1.5": + version: 5.1.6 + resolution: "@types/bn.js@npm:5.1.6" + dependencies: + "@types/node": "npm:*" + checksum: 10/db565b5a2af59b09459d74441153bf23a0e80f1fb2d070330786054e7ce1a7285dc40afcd8f289426c61a83166bdd70814f70e2d439744686aac5d3ea75daf13 + languageName: node + linkType: hard + +"@types/bn.js@npm:5.1.0": version: 5.1.0 resolution: "@types/bn.js@npm:5.1.0" dependencies: @@ -16896,25 +15003,17 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:^5.1.1": - version: 5.1.1 - resolution: "@types/bn.js@npm:5.1.1" - dependencies: - "@types/node": "npm:*" - checksum: 10/cf2c45833e67ecfc45e5336151965a47857431640b61708b6e4dc81d88ed53585c9b30be59abbbee609cdf7a63828e5b8a58c1a27eb4306e5cb7ddd9bad46650 - languageName: node - linkType: hard - -"@types/bn.js@npm:^5.1.5": - version: 5.1.5 - resolution: "@types/bn.js@npm:5.1.5" +"@types/body-parser@npm:*": + version: 1.19.5 + resolution: "@types/body-parser@npm:1.19.5" dependencies: + "@types/connect": "npm:*" "@types/node": "npm:*" - checksum: 10/9719330c86aeae0a6a447c974cf0f853ba3660ede20de61f435b03d699e30e6d8b35bf71a8dc9fdc8317784438e83177644ba068ed653d0ae0106e1ecbfe289e + checksum: 10/1e251118c4b2f61029cc43b0dc028495f2d1957fe8ee49a707fb940f86a9bd2f9754230805598278fe99958b49e9b7e66eec8ef6a50ab5c1f6b93e1ba2aaba82 languageName: node linkType: hard -"@types/body-parser@npm:*, @types/body-parser@npm:1.19.2": +"@types/body-parser@npm:1.19.2": version: 1.19.2 resolution: "@types/body-parser@npm:1.19.2" dependencies: @@ -16944,7 +15043,7 @@ __metadata: languageName: node linkType: hard -"@types/bonjour@npm:^3.5.13": +"@types/bonjour@npm:^3.5.13, @types/bonjour@npm:^3.5.9": version: 3.5.13 resolution: "@types/bonjour@npm:3.5.13" dependencies: @@ -16953,16 +15052,7 @@ __metadata: languageName: node linkType: hard -"@types/bonjour@npm:^3.5.9": - version: 3.5.10 - resolution: "@types/bonjour@npm:3.5.10" - dependencies: - "@types/node": "npm:*" - checksum: 10/bfcadb042a41b124c4e3de4925e3be6d35b78f93f27c4535d5ff86980dc0f8bc407ed99b9b54528952dc62834d5a779392f7a12c2947dd19330eb05a6bcae15a - languageName: node - linkType: hard - -"@types/cacheable-request@npm:^6.0.2": +"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": version: 6.0.3 resolution: "@types/cacheable-request@npm:6.0.3" dependencies: @@ -16975,16 +15065,18 @@ __metadata: linkType: hard "@types/caseless@npm:*": - version: 0.12.2 - resolution: "@types/caseless@npm:0.12.2" - checksum: 10/8bd3c34109d528364ee231813538ff17afaa3bc62cd079172e8c1e3dceda9e912ae7cae442008bb6e4dff0d57d8b24f44bbb07b8539bdf4efdb30f3c476eb450 + version: 0.12.5 + resolution: "@types/caseless@npm:0.12.5" + checksum: 10/f6a3628add76d27005495914c9c3873a93536957edaa5b69c63b46fe10b4649a6fecf16b676c1695f46aab851da47ec6047dcf3570fa8d9b6883492ff6d074e0 languageName: node linkType: hard "@types/chai@npm:*": - version: 5.0.0 - resolution: "@types/chai@npm:5.0.0" - checksum: 10/a6c03aa6b6d59ad40ddb48d07807690efb874628c15b9d89c17d97045a9305a487933398c1e5b5f94087b1a6a9a67a7c828eb9b635104526fd25bb5f9d4c4175 + version: 5.0.1 + resolution: "@types/chai@npm:5.0.1" + dependencies: + "@types/deep-eql": "npm:*" + checksum: 10/0f829d4f4be06d6a32c9d89ac08c356df89bafc4b923d8b7fd56cf78d681f5fddfe7aa3391b747f076c57129428f4df694026f344ad3bf8bda65e2ca50c0fd37 languageName: node linkType: hard @@ -17004,17 +15096,7 @@ __metadata: languageName: node linkType: hard -"@types/connect-history-api-fallback@npm:^1.3.5": - version: 1.3.5 - resolution: "@types/connect-history-api-fallback@npm:1.3.5" - dependencies: - "@types/express-serve-static-core": "npm:*" - "@types/node": "npm:*" - checksum: 10/464d06e5ab00f113fa89978633d5eb00d225aeb4ebbadc07f6f3bc337aa7cbfcd74957b2a539d6d47f2e128e956a17819973ec7ae62ade2e16e367a6c38b8d3a - languageName: node - linkType: hard - -"@types/connect-history-api-fallback@npm:^1.5.4": +"@types/connect-history-api-fallback@npm:^1.3.5, @types/connect-history-api-fallback@npm:^1.5.4": version: 1.5.4 resolution: "@types/connect-history-api-fallback@npm:1.5.4" dependencies: @@ -17025,11 +15107,11 @@ __metadata: linkType: hard "@types/connect@npm:*": - version: 3.4.35 - resolution: "@types/connect@npm:3.4.35" + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" dependencies: "@types/node": "npm:*" - checksum: 10/fe81351470f2d3165e8b12ce33542eef89ea893e36dd62e8f7d72566dfb7e448376ae962f9f3ea888547ce8b55a40020ca0e01d637fab5d99567673084542641 + checksum: 10/7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 languageName: node linkType: hard @@ -17066,28 +15148,37 @@ __metadata: linkType: hard "@types/copy-webpack-plugin@npm:^10.1.0": - version: 10.1.0 - resolution: "@types/copy-webpack-plugin@npm:10.1.0" + version: 10.1.3 + resolution: "@types/copy-webpack-plugin@npm:10.1.3" dependencies: copy-webpack-plugin: "npm:*" - checksum: 10/c5012e9725beb34bc07ca47f5861ee0770f0c76fe04e8878142ba5d12aa91c6d330ec777378eb65ff5fbb5f05863a2b1b935318db0f3f2e754c126b181645adf + checksum: 10/cb04aa3a8e510fda03a9d9cc7f027a5e238b6b177862ed4e40f40567150975aef47c75232a220e98a101b05dd3a1f650ffcb7500a810aea1ebbae4d756d8e519 languageName: node linkType: hard "@types/cordova@npm:latest": - version: 0.0.34 - resolution: "@types/cordova@npm:0.0.34" - checksum: 10/028946904cd28a0fcf38885cc801124fd0f2e521d0e990a2a8f3261802eaeffa6bf29d3d3ca6405ceee5d22cfbd5dd5087807e46fc57dbf150bd677ffee5d9e8 + version: 11.0.3 + resolution: "@types/cordova@npm:11.0.3" + checksum: 10/fb0eb0c614bb83ce886050f84feb1ae47efc469d4c091c74a64c7f99f65f75973ab4055328dacdaccb3fefed8ff57b95a9c220536418e71f1fe961bf6b5e68a1 languageName: node linkType: hard -"@types/cors@npm:2.8.12, @types/cors@npm:^2.8.12": +"@types/cors@npm:2.8.12": version: 2.8.12 resolution: "@types/cors@npm:2.8.12" checksum: 10/8c45f112c7d1d2d831b4b266f2e6ed33a1887a35dcbfe2a18b28370751fababb7cd045e745ef84a523c33a25932678097bf79afaa367c6cb3fa0daa7a6438257 languageName: node linkType: hard +"@types/cors@npm:^2.8.12": + version: 2.8.17 + resolution: "@types/cors@npm:2.8.17" + dependencies: + "@types/node": "npm:*" + checksum: 10/469bd85e29a35977099a3745c78e489916011169a664e97c4c3d6538143b0a16e4cc72b05b407dc008df3892ed7bf595f9b7c0f1f4680e169565ee9d64966bde + languageName: node + linkType: hard + "@types/crypto-js@npm:4.0.1": version: 4.0.1 resolution: "@types/crypto-js@npm:4.0.1" @@ -17121,7 +15212,7 @@ __metadata: languageName: node linkType: hard -"@types/debug@npm:4.1.12": +"@types/debug@npm:4.1.12, @types/debug@npm:^4.1.7": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" dependencies: @@ -17139,22 +15230,29 @@ __metadata: languageName: node linkType: hard -"@types/debug@npm:^4.1.7": - version: 4.1.7 - resolution: "@types/debug@npm:4.1.7" +"@types/deep-eql@npm:*": + version: 4.0.2 + resolution: "@types/deep-eql@npm:4.0.2" + checksum: 10/249a27b0bb22f6aa28461db56afa21ec044fa0e303221a62dff81831b20c8530502175f1a49060f7099e7be06181078548ac47c668de79ff9880241968d43d0c + languageName: node + linkType: hard + +"@types/dns-packet@npm:^5.6.5": + version: 5.6.5 + resolution: "@types/dns-packet@npm:5.6.5" dependencies: - "@types/ms": "npm:*" - checksum: 10/0a7b89d8ed72526858f0b61c6fd81f477853e8c4415bb97f48b1b5545248d2ae389931680b94b393b993a7cfe893537a200647d93defe6d87159b96812305adc + "@types/node": "npm:*" + checksum: 10/ebca4215607b24bfcb46ac89553d71f923009e81b09541e0c79b4837f18e6d0053b955ac23b267e37fbbb4ec36b653f3be1fd3788c62c5201d9689bcd5172c2a languageName: node linkType: hard "@types/docker-modem@npm:*": - version: 3.0.2 - resolution: "@types/docker-modem@npm:3.0.2" + version: 3.0.6 + resolution: "@types/docker-modem@npm:3.0.6" dependencies: "@types/node": "npm:*" "@types/ssh2": "npm:*" - checksum: 10/1f23db30e6e9bdd4c6d6e43572fb7ac7251d106a1906a9f3faabac393897712a5a9cd5a471baedc0ac8055dab3f48eda331f41a1e2c7c6bbe3c7f433e039151c + checksum: 10/cc58e8189f6ec5a2b8ca890207402178a97ddac8c80d125dc65d8ab29034b5db736de15e99b91b2d74e66d14e26e73b6b8b33216613dd15fd3aa6b82c11a83ed languageName: node linkType: hard @@ -17168,7 +15266,7 @@ __metadata: languageName: node linkType: hard -"@types/elliptic@npm:6.4.14, @types/elliptic@npm:^6.4.9": +"@types/elliptic@npm:6.4.14": version: 6.4.14 resolution: "@types/elliptic@npm:6.4.14" dependencies: @@ -17186,6 +15284,15 @@ __metadata: languageName: node linkType: hard +"@types/elliptic@npm:^6.4.9": + version: 6.4.18 + resolution: "@types/elliptic@npm:6.4.18" + dependencies: + "@types/bn.js": "npm:*" + checksum: 10/06493e18167a581fa48d3c0f7034b9ad107993610767d5251ae2788be4bc5bdeda292d9ae18bbf366faa4a492eb669fc31060392f79bd5fdccb4efbd729ae66a + languageName: node + linkType: hard + "@types/escape-html@npm:1.0.1": version: 1.0.1 resolution: "@types/escape-html@npm:1.0.1" @@ -17193,33 +15300,33 @@ __metadata: languageName: node linkType: hard -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.3 - resolution: "@types/eslint-scope@npm:3.7.3" +"@types/eslint-scope@npm:^3.7.3, @types/eslint-scope@npm:^3.7.7": + version: 3.7.7 + resolution: "@types/eslint-scope@npm:3.7.7" dependencies: "@types/eslint": "npm:*" "@types/estree": "npm:*" - checksum: 10/6772b05e1b92003d1f295e81bc847a61f4fbe8ddab77ffa49e84ed3f9552513bdde677eb53ef167753901282857dd1d604d9f82eddb34a233495932b2dc3dc17 + checksum: 10/e2889a124aaab0b89af1bab5959847c5bec09809209255de0e63b9f54c629a94781daa04adb66bffcdd742f5e25a17614fb933965093c0eea64aacda4309380e languageName: node linkType: hard "@types/eslint@npm:*": - version: 8.4.1 - resolution: "@types/eslint@npm:8.4.1" + version: 9.6.1 + resolution: "@types/eslint@npm:9.6.1" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: 10/5053fbe6573bd3d5e598c7a6ec11b5df02894bd4e1848361b9f10da83d8210b3d4605d50669da21ae53dd3948cb8173bd68ac9d32c4de992dafc640a0cfa7cfe + checksum: 10/719fcd255760168a43d0e306ef87548e1e15bffe361d5f4022b0f266575637acc0ecb85604ac97879ee8ae83c6a6d0613b0ed31d0209ddf22a0fe6d608fc56fe languageName: node linkType: hard "@types/eslint@npm:^7.29.0 || ^8.4.1": - version: 8.44.2 - resolution: "@types/eslint@npm:8.44.2" + version: 8.56.12 + resolution: "@types/eslint@npm:8.56.12" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: 10/9fe07d4fba1ab9d53d0da404c5774c056deb4bb37a3712a11d35f40ec4389d5d8cc46f19387cf79a3054754e1b71f5dbb796ee6f7411449e9f2399aff8a94def + checksum: 10/bd998b5d3f98ac430ec8db6223f1cff1820774c1e72eabda05463256875d97065fd357fba7379dd25e6bfbeb73296f28faff6f4dcbc320f890bb49b09087644d languageName: node linkType: hard @@ -17232,10 +15339,10 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*": - version: 0.0.51 - resolution: "@types/estree@npm:0.0.51" - checksum: 10/b566c7a3fc8a81ca3d9e00a717e90b8f5d567e2476b4f6d76a20ec6da33ec28165b8f989ed8dd0c9df41405199777ec36a4f85f32a347fbc6c3f696a3128b6e7 +"@types/estree@npm:*, @types/estree@npm:1.0.6, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5, @types/estree@npm:^1.0.6": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10/9d35d475095199c23e05b431bcdd1f6fec7380612aed068b14b2a08aa70494de8a9026765a5a91b1073f636fb0368f6d8973f518a31391d519e20c59388ed88d languageName: node linkType: hard @@ -17246,20 +15353,6 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:1.0.5, @types/estree@npm:^1.0.5": - version: 1.0.5 - resolution: "@types/estree@npm:1.0.5" - checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 - languageName: node - linkType: hard - -"@types/estree@npm:^1.0.0": - version: 1.0.1 - resolution: "@types/estree@npm:1.0.1" - checksum: 10/f252569c002506c61ad913e778aa69415908078c46c78c901ccad77bc66cd34f1e1b9babefb8ff0d27c07a15fb0824755edd7bb3fa7ea828f32ae0fe5faa9962 - languageName: node - linkType: hard - "@types/express-http-proxy@npm:1.6.2": version: 1.6.2 resolution: "@types/express-http-proxy@npm:1.6.2" @@ -17279,14 +15372,15 @@ __metadata: languageName: node linkType: hard -"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18": - version: 4.17.28 - resolution: "@types/express-serve-static-core@npm:4.17.28" +"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^5.0.0": + version: 5.0.1 + resolution: "@types/express-serve-static-core@npm:5.0.1" dependencies: "@types/node": "npm:*" "@types/qs": "npm:*" "@types/range-parser": "npm:*" - checksum: 10/ee96644c3c3c9a69b27ad11fa27500dd16fe296137d5ccb1cac0d5a3c98648adf29f898d9102524068228545d8ec51373b13ba7bcc654f13f3c130c9762bea67 + "@types/send": "npm:*" + checksum: 10/9bccbf4c927a877e4fe60f9664737ec6ac39d4d906dbb2c8d00f67849bb0968833573c48602b5e77d3e0129fd1bdbe0eae08e68485f028ebf8c557806caa3377 languageName: node linkType: hard @@ -17301,26 +15395,15 @@ __metadata: languageName: node linkType: hard -"@types/express-serve-static-core@npm:^4.17.33": - version: 4.17.33 - resolution: "@types/express-serve-static-core@npm:4.17.33" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - checksum: 10/47ee1b46be710ae6451a2e658e2eab75f4affe874b0d156a31e792db0ddb35184ac7b35be926eb23424cc45f6e0d3dbacc86ac5d63a3c988d8235aedb1143841 - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:^5.0.0": - version: 5.0.0 - resolution: "@types/express-serve-static-core@npm:5.0.0" +"@types/express-serve-static-core@npm:^4.17.18, @types/express-serve-static-core@npm:^4.17.33": + version: 4.19.6 + resolution: "@types/express-serve-static-core@npm:4.19.6" dependencies: "@types/node": "npm:*" "@types/qs": "npm:*" "@types/range-parser": "npm:*" "@types/send": "npm:*" - checksum: 10/fc40cdeae61113d8b2335f4b0f9334a7a64388a0931f2e98f8fc9bdadd0b13b501a70da14c256ae4aa140db49bd2eff75a99a683266d561e62540784a61dc489 + checksum: 10/a2e00b6c5993f0dd63ada2239be81076fe0220314b9e9fde586e8946c9c09ce60f9a2dd0d74410ee2b5fd10af8c3e755a32bb3abf134533e2158142488995455 languageName: node linkType: hard @@ -17333,15 +15416,15 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:*": - version: 4.17.13 - resolution: "@types/express@npm:4.17.13" +"@types/express@npm:*, @types/express@npm:5.0.0": + version: 5.0.0 + resolution: "@types/express@npm:5.0.0" dependencies: "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.18" + "@types/express-serve-static-core": "npm:^5.0.0" "@types/qs": "npm:*" "@types/serve-static": "npm:*" - checksum: 10/20783f6b8a0eec68d06c9478fd55bfe98ff747485316b585b3d637ca472811a1a2664b12b4b5014dc4127a2ed32c6856268228bafb2ed7840baf2a23662a1def + checksum: 10/45b199ab669caa33e6badafeebf078e277ea95042309d325a04b1ec498f33d33fd5a4ae9c8e358342367b178fe454d7323c5dfc8002bf27070b210a2c6cc11f0 languageName: node linkType: hard @@ -17357,43 +15440,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:5.0.0": - version: 5.0.0 - resolution: "@types/express@npm:5.0.0" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^5.0.0" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/45b199ab669caa33e6badafeebf078e277ea95042309d325a04b1ec498f33d33fd5a4ae9c8e358342367b178fe454d7323c5dfc8002bf27070b210a2c6cc11f0 - languageName: node - linkType: hard - -"@types/express@npm:^4.17.13": - version: 4.17.17 - resolution: "@types/express@npm:4.17.17" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/e2959a5fecdc53f8a524891a16e66dfc330ee0519e89c2579893179db686e10cfa6079a68e0fb8fd00eedbcaf3eabfd10916461939f3bc02ef671d848532c37e - languageName: node - linkType: hard - -"@types/express@npm:^4.17.15": - version: 4.17.20 - resolution: "@types/express@npm:4.17.20" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10/7dba63831c61102397cb8dfc2a8b71bb85d93760958c43292cbd7962ba44e8978c998e47226b152d103c0a7492e2bfb2174c1f20805ddad796c7854973c8ebf9 - languageName: node - linkType: hard - -"@types/express@npm:^4.17.18, @types/express@npm:^4.17.21": +"@types/express@npm:^4.17.13, @types/express@npm:^4.17.15, @types/express@npm:^4.17.18, @types/express@npm:^4.17.21": version: 4.17.21 resolution: "@types/express@npm:4.17.21" dependencies: @@ -17424,7 +15471,17 @@ __metadata: languageName: node linkType: hard -"@types/glob@npm:*, @types/glob@npm:^7.1.1": +"@types/glob@npm:*": + version: 8.1.0 + resolution: "@types/glob@npm:8.1.0" + dependencies: + "@types/minimatch": "npm:^5.1.2" + "@types/node": "npm:*" + checksum: 10/9101f3a9061e40137190f70626aa0e202369b5ec4012c3fabe6f5d229cce04772db9a94fa5a0eb39655e2e4ad105c38afbb4af56a56c0996a8c7d4fc72350e3d + languageName: node + linkType: hard + +"@types/glob@npm:^7.1.1": version: 7.2.0 resolution: "@types/glob@npm:7.2.0" dependencies: @@ -17441,21 +15498,21 @@ __metadata: languageName: node linkType: hard -"@types/graceful-fs@npm:^4.1.2": - version: 4.1.6 - resolution: "@types/graceful-fs@npm:4.1.6" +"@types/graceful-fs@npm:^4.1.2, @types/graceful-fs@npm:^4.1.3": + version: 4.1.9 + resolution: "@types/graceful-fs@npm:4.1.9" dependencies: "@types/node": "npm:*" - checksum: 10/c3070ccdc9ca0f40df747bced1c96c71a61992d6f7c767e8fd24bb6a3c2de26e8b84135ede000b7e79db530a23e7e88dcd9db60eee6395d0f4ce1dae91369dd4 + checksum: 10/79d746a8f053954bba36bd3d94a90c78de995d126289d656fb3271dd9f1229d33f678da04d10bce6be440494a5a73438e2e363e92802d16b8315b051036c5256 languageName: node linkType: hard -"@types/graceful-fs@npm:^4.1.3": - version: 4.1.5 - resolution: "@types/graceful-fs@npm:4.1.5" +"@types/hast@npm:^3.0.0, @types/hast@npm:^3.0.4": + version: 3.0.4 + resolution: "@types/hast@npm:3.0.4" dependencies: - "@types/node": "npm:*" - checksum: 10/d076bb61f45d0fc42dee496ef8b1c2f8742e15d5e47e90e20d0243386e426c04d4efd408a48875ab432f7960b4ce3414db20ed0fbbfc7bcc89d84e574f6e045a + "@types/unist": "npm:*" + checksum: 10/732920d81bb7605895776841b7658b4d8cc74a43a8fa176017cc0fb0ecc1a4c82a2b75a4fe6b71aa262b649d3fb62858c6789efa3793ea1d40269953af96ecb5 languageName: node linkType: hard @@ -17466,24 +15523,17 @@ __metadata: languageName: node linkType: hard -"@types/http-cache-semantics@npm:*": - version: 4.0.3 - resolution: "@types/http-cache-semantics@npm:4.0.3" - checksum: 10/d9859ba19513836eaea48d15c392c1a55bd45db8a6488dd024e78a6f2afff3437c09ecaec1546c2e2c8de7464f43ce49cd5784494950427507ecaaad8f4c83ac - languageName: node - linkType: hard - -"@types/http-cache-semantics@npm:^4.0.1": - version: 4.0.1 - resolution: "@types/http-cache-semantics@npm:4.0.1" - checksum: 10/d059bf8a15d5163cc60da51ba00d17620507f968d0b792cd55f62043016344a5f0e1aa94fa411089d41114035fcd0ea656f968bda7eabb6663a97787e3445a1c +"@types/http-cache-semantics@npm:*, @types/http-cache-semantics@npm:^4.0.2": + version: 4.0.4 + resolution: "@types/http-cache-semantics@npm:4.0.4" + checksum: 10/a59566cff646025a5de396d6b3f44a39ab6a74f2ed8150692e0f31cc52f3661a68b04afe3166ebe0d566bd3259cb18522f46e949576d5204781cd6452b7fe0c5 languageName: node linkType: hard -"@types/http-errors@npm:*": - version: 2.0.1 - resolution: "@types/http-errors@npm:2.0.1" - checksum: 10/3bb0c50b0a652e679a84c30cd0340d696c32ef6558518268c238840346c077f899315daaf1c26c09c57ddd5dc80510f2a7f46acd52bf949e339e35ed3ee9654f +"@types/http-errors@npm:*, @types/http-errors@npm:2.0.4": + version: 2.0.4 + resolution: "@types/http-errors@npm:2.0.4" + checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 languageName: node linkType: hard @@ -17501,19 +15551,12 @@ __metadata: languageName: node linkType: hard -"@types/http-errors@npm:2.0.4": - version: 2.0.4 - resolution: "@types/http-errors@npm:2.0.4" - checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 - languageName: node - linkType: hard - "@types/http-proxy@npm:^1.17.8": - version: 1.17.9 - resolution: "@types/http-proxy@npm:1.17.9" + version: 1.17.15 + resolution: "@types/http-proxy@npm:1.17.15" dependencies: "@types/node": "npm:*" - checksum: 10/48075c535a5d4805feca388a539b4dcb80666963499018918584aefb4f7806c2c86b0c289bb0f1d96539816d90d702b7c2167e68c3ebe858725e598a1c3c05d2 + checksum: 10/fa86d5397c021f6c824d1143a206009bfb64ff703da32fb30f6176c603daf6c24ce3a28daf26b3945c94dd10f9d76f07ea7a6a2c3e9b710e00ff42da32e08dea languageName: node linkType: hard @@ -17546,37 +15589,37 @@ __metadata: linkType: hard "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": - version: 2.0.4 - resolution: "@types/istanbul-lib-coverage@npm:2.0.4" - checksum: 10/a25d7589ee65c94d31464c16b72a9dc81dfa0bea9d3e105ae03882d616e2a0712a9c101a599ec482d297c3591e16336962878cb3eb1a0a62d5b76d277a890ce7 + version: 2.0.6 + resolution: "@types/istanbul-lib-coverage@npm:2.0.6" + checksum: 10/3feac423fd3e5449485afac999dcfcb3d44a37c830af898b689fadc65d26526460bedb889db278e0d4d815a670331796494d073a10ee6e3a6526301fe7415778 languageName: node linkType: hard "@types/istanbul-lib-report@npm:*": - version: 3.0.0 - resolution: "@types/istanbul-lib-report@npm:3.0.0" + version: 3.0.3 + resolution: "@types/istanbul-lib-report@npm:3.0.3" dependencies: "@types/istanbul-lib-coverage": "npm:*" - checksum: 10/f121dcac8a6b8184f3cab97286d8d519f1937fa8620ada5dbc43b699d602b8be289e4a4bccbd6ee1aade6869d3c9fb68bf04c6fdca8c5b0c4e7e314c31c7900a + checksum: 10/b91e9b60f865ff08cb35667a427b70f6c2c63e88105eadd29a112582942af47ed99c60610180aa8dcc22382fa405033f141c119c69b95db78c4c709fbadfeeb4 languageName: node linkType: hard "@types/istanbul-reports@npm:^3.0.0": - version: 3.0.1 - resolution: "@types/istanbul-reports@npm:3.0.1" + version: 3.0.4 + resolution: "@types/istanbul-reports@npm:3.0.4" dependencies: "@types/istanbul-lib-report": "npm:*" - checksum: 10/f1ad54bc68f37f60b30c7915886b92f86b847033e597f9b34f2415acdbe5ed742fa559a0a40050d74cdba3b6a63c342cac1f3a64dba5b68b66a6941f4abd7903 + checksum: 10/93eb18835770b3431f68ae9ac1ca91741ab85f7606f310a34b3586b5a34450ec038c3eed7ab19266635499594de52ff73723a54a72a75b9f7d6a956f01edee95 languageName: node linkType: hard "@types/jest@npm:*": - version: 29.5.10 - resolution: "@types/jest@npm:29.5.10" + version: 29.5.14 + resolution: "@types/jest@npm:29.5.14" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: 10/f31cdc9cf840a3bc2230148bb5cba1e0369e3180ae75d85804038905300dd8cfa1d989a4dbbd909633c04568d0c1a9251b2ee5c4197309ec033403dd2a08ea42 + checksum: 10/59ec7a9c4688aae8ee529316c43853468b6034f453d08a2e1064b281af9c81234cec986be796288f1bbb29efe943bc950e70c8fa8faae1e460d50e3cf9760f9b languageName: node linkType: hard @@ -17623,41 +15666,13 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.8": - version: 7.0.9 - resolution: "@types/json-schema@npm:7.0.9" - checksum: 10/7ceb41e396240aa69ae15c02ffbb6548ea2bb2f845a7378c711c7c908a9a8438a0330f3135f1ccb6e82e334b9e2ec5b94fb57a1435f2b15362d38e9d5109e5ea - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.12": - version: 7.0.12 - resolution: "@types/json-schema@npm:7.0.12" - checksum: 10/7a72ba9cb7d2b45d7bb032e063c9eeb1ce4102d62551761e84c91f99f8273ba5aaffd34be835869456ec7c40761b4389009d9e777c0020a7227ca0f5e3238e94 - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.15": +"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.4, @types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 languageName: node linkType: hard -"@types/json-schema@npm:^7.0.4, @types/json-schema@npm:^7.0.5": - version: 7.0.13 - resolution: "@types/json-schema@npm:7.0.13" - checksum: 10/24000f93d34b3848053b8eb36bbbcfb6b465f691d61186ddac9596b6f1fb105ae84a8be63c0c0f3b6d8f7eb6f891f6cdf3c34910aefc756a1971164c4262de1a - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.9": - version: 7.0.11 - resolution: "@types/json-schema@npm:7.0.11" - checksum: 10/e50864a93f4dcb9de64c0c605d836f5416341c824d7a8cde1aa15a5fc68bed44b33cdcb2e04e5098339e9121848378f2d0cc5b124dec41c89203c6f67d6f344a - languageName: node - linkType: hard - "@types/json-stable-stringify@npm:1.0.33": version: 1.0.33 resolution: "@types/json-stable-stringify@npm:1.0.33" @@ -17680,11 +15695,11 @@ __metadata: linkType: hard "@types/jsonfile@npm:*": - version: 6.1.3 - resolution: "@types/jsonfile@npm:6.1.3" + version: 6.1.4 + resolution: "@types/jsonfile@npm:6.1.4" dependencies: "@types/node": "npm:*" - checksum: 10/3f2d0060a567f78b5d666971d5371e72f37294cbfc19069912c76ba9585d209ceb5aac421658f2b3ab922f96b8df53081e9f51d09aef34f2b4882b813a0e0c38 + checksum: 10/309fda20eb5f1cf68f2df28931afdf189c5e7e6bec64ac783ce737bb98908d57f6f58757ad5da9be37b815645a6f914e2d4f3ac66c574b8fe1ba6616284d0e97 languageName: node linkType: hard @@ -17716,11 +15731,11 @@ __metadata: linkType: hard "@types/jsonwebtoken@npm:^9": - version: 9.0.1 - resolution: "@types/jsonwebtoken@npm:9.0.1" + version: 9.0.7 + resolution: "@types/jsonwebtoken@npm:9.0.7" dependencies: "@types/node": "npm:*" - checksum: 10/3eaaaf2a372464e88ebc550cc9ac93f067fa615545b348b8488cf57972ff7a2e12977d5766ee45c1dfcce6df8bd333dc3f810f2727934c78edc0048e644a2f52 + checksum: 10/4c0cffc488ba200765b50004de5e046c55360121a91ad9520d904e303cdd217b3f77b51b6ba8b9cbdd03d73876d546cbd0d9992d6e205d97decba918aee5b395 languageName: node linkType: hard @@ -17768,10 +15783,10 @@ __metadata: languageName: node linkType: hard -"@types/long@npm:^4.0.0, @types/long@npm:^4.0.1": - version: 4.0.1 - resolution: "@types/long@npm:4.0.1" - checksum: 10/6eed014270e35eda86f56c9156222cb09945b6e31e0e47e0e5d186a72fa199cb6a55e89aa7c9b44d83f189eb8f4b6b153a0b717f92b2a93e291b79b130ded76b +"@types/long@npm:^4.0.0": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: 10/68afa05fb20949d88345876148a76f6ccff5433310e720db51ac5ca21cb8cc6714286dbe04713840ddbd25a8b56b7a23aa87d08472fabf06463a6f2ed4967707 languageName: node linkType: hard @@ -17791,6 +15806,15 @@ __metadata: languageName: node linkType: hard +"@types/mdast@npm:^4.0.0": + version: 4.0.4 + resolution: "@types/mdast@npm:4.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10/efe3ec11b9ee0015a396c4fb4cd1b6f31b51b8ae9783c59560e6fc0bf6c2fa1dcc7fccaf45fa09a6c8b3397fab9dc8d431433935cae3835caa70a18f7fc775f8 + languageName: node + linkType: hard + "@types/methods@npm:^1.1.4": version: 1.1.4 resolution: "@types/methods@npm:1.1.4" @@ -17798,34 +15822,41 @@ __metadata: languageName: node linkType: hard -"@types/mime@npm:*": - version: 3.0.1 - resolution: "@types/mime@npm:3.0.1" - checksum: 10/4040fac73fd0cea2460e29b348c1a6173da747f3a87da0dbce80dd7a9355a3d0e51d6d9a401654f3e5550620e3718b5a899b2ec1debf18424e298a2c605346e7 +"@types/mime@npm:^1": + version: 1.3.5 + resolution: "@types/mime@npm:1.3.5" + checksum: 10/e29a5f9c4776f5229d84e525b7cd7dd960b51c30a0fb9a028c0821790b82fca9f672dab56561e2acd9e8eed51d431bde52eafdfef30f643586c4162f1aecfc78 languageName: node linkType: hard -"@types/mime@npm:^1": - version: 1.3.2 - resolution: "@types/mime@npm:1.3.2" - checksum: 10/0493368244cced1a69cb791b485a260a422e6fcc857782e1178d1e6f219f1b161793e9f87f5fae1b219af0f50bee24fcbe733a18b4be8fdd07a38a8fb91146fd +"@types/minimatch@npm:*, @types/minimatch@npm:^5.1.2": + version: 5.1.2 + resolution: "@types/minimatch@npm:5.1.2" + checksum: 10/94db5060d20df2b80d77b74dd384df3115f01889b5b6c40fa2dfa27cfc03a68fb0ff7c1f2a0366070263eb2e9d6bfd8c87111d4bc3ae93c3f291297c1bf56c85 languageName: node linkType: hard -"@types/minimatch@npm:*, @types/minimatch@npm:^3.0.3, @types/minimatch@npm:^3.0.4": +"@types/minimatch@npm:^3.0.3, @types/minimatch@npm:^3.0.4": version: 3.0.5 resolution: "@types/minimatch@npm:3.0.5" checksum: 10/c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 languageName: node linkType: hard -"@types/minimist@npm:1.2.2, @types/minimist@npm:^1.2.0, @types/minimist@npm:^1.2.2": +"@types/minimist@npm:1.2.2": version: 1.2.2 resolution: "@types/minimist@npm:1.2.2" checksum: 10/b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d languageName: node linkType: hard +"@types/minimist@npm:^1.2.0, @types/minimist@npm:^1.2.2": + version: 1.2.5 + resolution: "@types/minimist@npm:1.2.5" + checksum: 10/477047b606005058ab0263c4f58097136268007f320003c348794f74adedc3166ffc47c80ec3e94687787f2ab7f4e72c468223946e79892cf0fd9e25e9970a90 + languageName: node + linkType: hard + "@types/morgan@npm:1.9.1": version: 1.9.1 resolution: "@types/morgan@npm:1.9.1" @@ -17836,9 +15867,9 @@ __metadata: linkType: hard "@types/ms@npm:*": - version: 0.7.31 - resolution: "@types/ms@npm:0.7.31" - checksum: 10/6647b295fb2a5b8347c35efabaaed1777221f094be9941d387b4bf11df0eeacb3f8a4e495b8b66ce0e4c00593bc53ab5fc25f01ebb274cd989a834ae578099de + version: 0.7.34 + resolution: "@types/ms@npm:0.7.34" + checksum: 10/f38d36e7b6edecd9badc9cf50474159e9da5fa6965a75186cceaf883278611b9df6669dc3a3cc122b7938d317b68a9e3d573d316fcb35d1be47ec9e468c6bd8a languageName: node linkType: hard @@ -17852,11 +15883,11 @@ __metadata: linkType: hard "@types/multer@npm:^1.4.11": - version: 1.4.11 - resolution: "@types/multer@npm:1.4.11" + version: 1.4.12 + resolution: "@types/multer@npm:1.4.12" dependencies: "@types/express": "npm:*" - checksum: 10/5abbc9a8b0d7bb817a52429c52f052152ebe2fb212e7138359c0c0b9207486ef7b1e54f65915c968300a0874cee546dbfc850415584fc9d14eff2b27bb926e7f + checksum: 10/3d2b32da58ddd67f972d4ef1021492f78d65f33f936b6fb25dd461bb6cc7b03bfd1de1a11562c4310680dac8054e4398038db51767a0ffbf1fe62457b3706e95 languageName: node linkType: hard @@ -17881,12 +15912,12 @@ __metadata: linkType: hard "@types/node-fetch@npm:^2.5.0": - version: 2.6.1 - resolution: "@types/node-fetch@npm:2.6.1" + version: 2.6.11 + resolution: "@types/node-fetch@npm:2.6.11" dependencies: "@types/node": "npm:*" - form-data: "npm:^3.0.0" - checksum: 10/088cd7de89383f18f21c7dc176f9613f946f7281757c9bb217224b5ee114a46a27a662ea0ae3b59ddf8b7a705066dec8e5109c23ff3c97892abadd9e9974cab2 + form-data: "npm:^4.0.0" + checksum: 10/c416df8f182ec3826278ea42557fda08f169a48a05e60722d9c8edd4e5b2076ae281c6b6601ad406035b7201f885b0257983b61c26b3f9eb0f41192a807b5de5 languageName: node linkType: hard @@ -17926,10 +15957,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0": - version: 17.0.32 - resolution: "@types/node@npm:17.0.32" - checksum: 10/fb3ef1c19f7134b1e54b3167e6de1b981b9db39ed9efa91767a0d8cc06cc3e64364a3d111a192cbba451bb4c273054e2203aa5784acd19e84e65be99c2741506 +"@types/node@npm:*, @types/node@npm:>=10.0.0, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0, @types/node@npm:^22.6.0": + version: 22.9.0 + resolution: "@types/node@npm:22.9.0" + dependencies: + undici-types: "npm:~6.19.8" + checksum: 10/a7df3426891868b0f5fb03e46aeddd8446178233521c624a44531c92a040cf08a82d8235f7e1e02af731fd16984665d4d71f3418caf9c2788313b10f040d615d languageName: node linkType: hard @@ -17947,6 +15980,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:18.18.2": + version: 18.18.2 + resolution: "@types/node@npm:18.18.2" + checksum: 10/7585ed0c8ff6f6e8e78564c3b2def30d8c3a2c88fb63fb04b832b3b96497ff2609081154348cbb8906d81e3434c54ac61bf3aba4be66b4aeccc0c63aa4dca6be + languageName: node + linkType: hard + "@types/node@npm:18.19.0": version: 18.19.0 resolution: "@types/node@npm:18.19.0" @@ -17956,10 +15996,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:20.4.7": - version: 20.4.7 - resolution: "@types/node@npm:20.4.7" - checksum: 10/63c43283caeaf854853b2a1717754ebb094ea15cd9bb7b93a0a49cc5f5f533d6125986effec1e9bb5d8150c353c76a516bdecc7a74aba20bfde6a78e59952845 +"@types/node@npm:20.5.1": + version: 20.5.1 + resolution: "@types/node@npm:20.5.1" + checksum: 10/e91034ba7eda82171dff73d3b30f584941400a5611b45d73a4d8159dc1fc309d4f1a423fbe84fd22d1ba7833383ee299c81ace6fab035c17affd0f4f0cbe7a89 languageName: node linkType: hard @@ -17977,37 +16017,16 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^18.0.0": - version: 18.18.5 - resolution: "@types/node@npm:18.18.5" - checksum: 10/a7363aab9f402290799d3e2696fbc70c76a8a65e2354f72b8f399c38edc346f600066f8ac59dde985cfc64160cfeb63ed7fc917aecdfe7ec469345d3ce029bda - languageName: node - linkType: hard - -"@types/node@npm:^18.11.18": - version: 18.17.4 - resolution: "@types/node@npm:18.17.4" - checksum: 10/1cd48b497af7cd6f0fcb3e31bebdc9aaef92178e1888e8842dcadda096f9e133535813e1de0efd981c3314fb3fde5988509d98dfbcec6bd4064467212e7bf878 - languageName: node - linkType: hard - -"@types/node@npm:^22.6.0": - version: 22.6.0 - resolution: "@types/node@npm:22.6.0" +"@types/node@npm:^18.0.0, @types/node@npm:^18.11.18": + version: 18.19.64 + resolution: "@types/node@npm:18.19.64" dependencies: - undici-types: "npm:~6.19.2" - checksum: 10/91f5609de4c3ea5878b550ddcd623395fa16d504839dd9ebf625d2a786d1d157a69bd8fecb7cfc89317d9d1680cbb499d006122706fe7bbea328c583870a2458 - languageName: node - linkType: hard - -"@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1": - version: 2.4.1 - resolution: "@types/normalize-package-data@npm:2.4.1" - checksum: 10/e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5 + undici-types: "npm:~5.26.4" + checksum: 10/c6383d4f6f3b3f1d48234b2e71e20d1ead4ac4ee31bbca7ef8719eedd1e79a425b35952d4b1ba3eff0a4e3eebd37b8a6e85e9af3bb88aa7b3fdae9cb66630820 languageName: node linkType: hard -"@types/normalize-package-data@npm:^2.4.3": +"@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1, @types/normalize-package-data@npm:^2.4.3": version: 2.4.4 resolution: "@types/normalize-package-data@npm:2.4.4" checksum: 10/65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 @@ -18015,18 +16034,18 @@ __metadata: linkType: hard "@types/oauth@npm:*": - version: 0.9.1 - resolution: "@types/oauth@npm:0.9.1" + version: 0.9.6 + resolution: "@types/oauth@npm:0.9.6" dependencies: "@types/node": "npm:*" - checksum: 10/cd83c34b2f2de2815fbbd763f1a8f7816711d5e35a0830f94d51186500a32f49471bcbdf3dc2b59796aea7d57677e11385920ff99b7a0ca3b37cc4a03f6423ed + checksum: 10/6e1d42585a77b73c607be3c50c25d6f7f772fc1f3927c2ea10c9955b4ba118dfe6cc7303538e68cd53ffe6f133cf8b8c61f703a37023175c5bbb218460732147 languageName: node linkType: hard "@types/parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "@types/parse-json@npm:4.0.0" - checksum: 10/4df9de98150d2978afc2161482a3a8e6617883effba3223324f079de97ba7eabd7d84b90ced11c3f82b0c08d4a8383f678c9f73e9c41258f769b3fa234a2bb4f + version: 4.0.2 + resolution: "@types/parse-json@npm:4.0.2" + checksum: 10/5bf62eec37c332ad10059252fc0dab7e7da730764869c980b0714777ad3d065e490627be9f40fc52f238ffa3ac4199b19de4127196910576c2fe34dd47c7a470 languageName: node linkType: hard @@ -18061,7 +16080,16 @@ __metadata: languageName: node linkType: hard -"@types/passport@npm:*, @types/passport@npm:1.0.7": +"@types/passport@npm:*": + version: 1.0.17 + resolution: "@types/passport@npm:1.0.17" + dependencies: + "@types/express": "npm:*" + checksum: 10/3db90645d58d928796dd8e9c328dec8040b71a43f3691d42a08fb4779efcbfc7dccc43ea612066a961a41be0869800096d52fd8aaa71518a89aa4483f67f5914 + languageName: node + linkType: hard + +"@types/passport@npm:1.0.7": version: 1.0.7 resolution: "@types/passport@npm:1.0.7" dependencies: @@ -18071,11 +16099,11 @@ __metadata: linkType: hard "@types/pbkdf2@npm:^3.0.0": - version: 3.1.0 - resolution: "@types/pbkdf2@npm:3.1.0" + version: 3.1.2 + resolution: "@types/pbkdf2@npm:3.1.2" dependencies: "@types/node": "npm:*" - checksum: 10/d15024b1957c21cf3b8887329d9bd8dfde754cf13a09d76ae25f1391cfc62bb8b8d7b760773c5dbaa748172fba8b3e0c3dbe962af6ccbd69b76df12a48dfba40 + checksum: 10/bebe1e596cbbe5f7d2726a58859e61986c5a42459048e29cb7f2d4d764be6bbb0844572fd5d70ca8955a8a17e8b4ed80984fc4903e165d9efb8807a3fbb051aa languageName: node linkType: hard @@ -18091,9 +16119,9 @@ __metadata: linkType: hard "@types/phoenix@npm:^1.5.4": - version: 1.6.0 - resolution: "@types/phoenix@npm:1.6.0" - checksum: 10/715d9b9c6e57d6cd32e2260bf51301954a7ec346d51e091de3c579314c9eb6f0d69a8d43b7aae49a0aa280982765fb8c2cce6109a38ca5db3e82697547d0f3db + version: 1.6.5 + resolution: "@types/phoenix@npm:1.6.5" + checksum: 10/b87416393159f0ba2812875fc2721914a3284cde8b1f263dfcd46f4149dae7f4efc2bfa062d558c8bbfb7ae2a9d802487b0dd4744ff08799386cbc49c19368f0 languageName: node linkType: hard @@ -18104,21 +16132,7 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:*": - version: 15.7.4 - resolution: "@types/prop-types@npm:15.7.4" - checksum: 10/ef6e1899e59b876c273811b1bd845022fc66d5a3d11cb38a25b6c566b30514ae38fe20a40f67622f362a4f4f7f9224e22d8da101cff3d6e97e11d7b4c307cfc1 - languageName: node - linkType: hard - -"@types/prop-types@npm:^15.7.11": - version: 15.7.11 - resolution: "@types/prop-types@npm:15.7.11" - checksum: 10/7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54 - languageName: node - linkType: hard - -"@types/prop-types@npm:^15.7.12": +"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.12, @types/prop-types@npm:^15.7.13": version: 15.7.13 resolution: "@types/prop-types@npm:15.7.13" checksum: 10/8935cad87c683c665d09a055919d617fe951cb3b2d5c00544e3a913f861a2bd8d2145b51c9aa6d2457d19f3107ab40784c40205e757232f6a80cc8b1c815513c @@ -18126,16 +16140,16 @@ __metadata: linkType: hard "@types/q@npm:^1.5.1": - version: 1.5.5 - resolution: "@types/q@npm:1.5.5" - checksum: 10/37bb27dbd602650577052a3c1ee749b0d027caa6ff06ea307f3f2012ee64fa5740e9bf5fe548c8377f319797a5ecb28a602fb2be977339bc9e035f42d91601a3 + version: 1.5.8 + resolution: "@types/q@npm:1.5.8" + checksum: 10/eaa21cd2cf562956433937e728301ee8c63fe6dd91718cd4a1005744ec5a70c4ebe8e45e26af83ecbe45aa12ef0bf1646e42dac868780d1f3a99044547035706 languageName: node linkType: hard "@types/qs@npm:*": - version: 6.9.7 - resolution: "@types/qs@npm:6.9.7" - checksum: 10/7fd6f9c25053e9b5bb6bc9f9f76c1d89e6c04f7707a7ba0e44cc01f17ef5284adb82f230f542c2d5557d69407c9a40f0f3515e8319afd14e1e16b5543ac6cdba + version: 6.9.17 + resolution: "@types/qs@npm:6.9.17" + checksum: 10/fc3beda0be70e820ddabaa361e8dfec5e09b482b8f6cf1515615479a027dd06cd5ba0ffbd612b654c2605523f45f484c8905a475623d6cd0c4cadcf5d0c517f5 languageName: node linkType: hard @@ -18147,13 +16161,13 @@ __metadata: linkType: hard "@types/range-parser@npm:*": - version: 1.2.4 - resolution: "@types/range-parser@npm:1.2.4" - checksum: 10/b7c0dfd5080a989d6c8bb0b6750fc0933d9acabeb476da6fe71d8bdf1ab65e37c136169d84148034802f48378ab94e3c37bb4ef7656b2bec2cb9c0f8d4146a95 + version: 1.2.7 + resolution: "@types/range-parser@npm:1.2.7" + checksum: 10/95640233b689dfbd85b8c6ee268812a732cf36d5affead89e806fe30da9a430767af8ef2cd661024fd97e19d61f3dec75af2df5e80ec3bea000019ab7028629a languageName: node linkType: hard -"@types/react-dom@npm:18.2.17, @types/react-dom@npm:^18.0.0": +"@types/react-dom@npm:18.2.17": version: 18.2.17 resolution: "@types/react-dom@npm:18.2.17" dependencies: @@ -18171,16 +16185,16 @@ __metadata: languageName: node linkType: hard -"@types/react-transition-group@npm:^4.4.10": - version: 4.4.10 - resolution: "@types/react-transition-group@npm:4.4.10" +"@types/react-dom@npm:^18.0.0": + version: 18.3.1 + resolution: "@types/react-dom@npm:18.3.1" dependencies: "@types/react": "npm:*" - checksum: 10/b429f3bd54d9aea6c0395943ce2dda6b76fb458e902365bd91fd99bf72064fb5d59e2b74e78d10f2871908501d350da63e230d81bda2b616c967cab8dc51bd16 + checksum: 10/33f9ba79b26641ddf00a8699c30066b7e3573ab254e97475bf08f82fab83a6d3ce8d4ebad86afeb49bb8df3374390a9ba93125cece33badc4b3e8f7eac3c84d8 languageName: node linkType: hard -"@types/react-transition-group@npm:^4.4.11": +"@types/react-transition-group@npm:^4.4.10, @types/react-transition-group@npm:^4.4.11": version: 4.4.11 resolution: "@types/react-transition-group@npm:4.4.11" dependencies: @@ -18190,13 +16204,12 @@ __metadata: linkType: hard "@types/react@npm:*": - version: 18.2.21 - resolution: "@types/react@npm:18.2.21" + version: 18.3.12 + resolution: "@types/react@npm:18.3.12" dependencies: "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 10/7b315e2b14da1cd895719ba957fd71a0a8a35300fd76689d0268ed9afd8065a56b4fdcd1306871e3e16706dd3ecd706a846af74caca8fcad88052469cf0d83a1 + checksum: 10/c9bbdfeacd5347d2240e0d2cb5336bc57dbc1b9ff557b6c4024b49df83419e4955553518169d3736039f1b62608e15b35762a6c03d49bd86e33add4b43b19033 languageName: node linkType: hard @@ -18222,13 +16235,13 @@ __metadata: linkType: hard "@types/react@npm:^17.0.52": - version: 17.0.62 - resolution: "@types/react@npm:17.0.62" + version: 17.0.83 + resolution: "@types/react@npm:17.0.83" dependencies: "@types/prop-types": "npm:*" - "@types/scheduler": "npm:*" + "@types/scheduler": "npm:^0.16" csstype: "npm:^3.0.2" - checksum: 10/62cff105fef4270c4ad0d1a1ff9bf6dfb1f2d4e25ad9d20202e82e9748d1a660790dc94240621a9994273b80050e6481e13533ad7e1f8522f5c839f88955d273 + checksum: 10/0abf5c8ccf8ee03e28ff7cd077e7759f4a65c4694a23f6a2b6574e2ea2a3a8e7f6d6a5802e847454091a006d4b4ebc8a485ada74fbfc3cf19c7221171b1538ab languageName: node linkType: hard @@ -18243,12 +16256,12 @@ __metadata: linkType: hard "@types/readable-stream@npm:^4.0.0": - version: 4.0.14 - resolution: "@types/readable-stream@npm:4.0.14" + version: 4.0.18 + resolution: "@types/readable-stream@npm:4.0.18" dependencies: "@types/node": "npm:*" safe-buffer: "npm:~5.1.1" - checksum: 10/5ec03edfc96653866d45c6dca54c16f890e7d1bf9ab837f520d056bd55de257a2c177ba9ba8831dae9ded73887ed4fd31320e5a6bb3b4304bf88ca59519b68c0 + checksum: 10/930d05ec58f03c0a2041fa827ac3274c3d433276576521408be0a4677d9e74d87db073a3ee80904d98b9b4541260615e7ec60bb2e44c03425ed178f81ff4ed5c languageName: node linkType: hard @@ -18265,14 +16278,14 @@ __metadata: linkType: hard "@types/request@npm:^2.48.8": - version: 2.48.11 - resolution: "@types/request@npm:2.48.11" + version: 2.48.12 + resolution: "@types/request@npm:2.48.12" dependencies: "@types/caseless": "npm:*" "@types/node": "npm:*" "@types/tough-cookie": "npm:*" form-data: "npm:^2.5.0" - checksum: 10/50212efbe4916edb78758f6cbf8f5ff5417e3271f526fcc6be01004582c588a699c8e0c91cdb8c8c06244d3a10ca9febf9fcb9f487799c76223ff77ecd2782a9 + checksum: 10/a7b3f9f14cacc18fe235bb8e57eff1232a04bd3fa3dad29371f24a5d96db2cd295a0c8b6b34ed7efa3efbbcff845febb02c9635cd68c54811c947ea66ae22090 languageName: node linkType: hard @@ -18286,11 +16299,11 @@ __metadata: linkType: hard "@types/responselike@npm:^1.0.0": - version: 1.0.2 - resolution: "@types/responselike@npm:1.0.2" + version: 1.0.3 + resolution: "@types/responselike@npm:1.0.3" dependencies: "@types/node": "npm:*" - checksum: 10/ff1767e947eb7d49849e4566040453efcd894888e85b398f7f8cb731552f303f26aceda573b680a142b77ec5fb6c79535d9c6d047d9f936c386dbf3863d2ae17 + checksum: 10/6ac4b35723429b11b117e813c7acc42c3af8b5554caaf1fc750404c1ae59f9b7376bc69b9e9e194a5a97357a597c2228b7173d317320f0360d617b6425212f58 languageName: node linkType: hard @@ -18309,9 +16322,9 @@ __metadata: linkType: hard "@types/retry@npm:^0.12.0": - version: 0.12.1 - resolution: "@types/retry@npm:0.12.1" - checksum: 10/5f46b2556053655f78262bb33040dc58417c900457cc63ff37d6c35349814471453ef511af0cec76a540c601296cd2b22f64bab1ab649c0dacc0223765ba876c + version: 0.12.5 + resolution: "@types/retry@npm:0.12.5" + checksum: 10/3fb6bf91835ca0eb2987567d6977585235a7567f8aeb38b34a8bb7bbee57ac050ed6f04b9998cda29701b8c893f5dfe315869bc54ac17e536c9235637fe351a2 languageName: node linkType: hard @@ -18334,13 +16347,20 @@ __metadata: linkType: hard "@types/scheduler@npm:*": - version: 0.16.2 - resolution: "@types/scheduler@npm:0.16.2" - checksum: 10/b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc + version: 0.23.0 + resolution: "@types/scheduler@npm:0.23.0" + checksum: 10/874d753aa65c17760dfc460a91e6df24009bde37bfd427a031577b30262f7770c1b8f71a21366c7dbc76111967384cf4090a31d65315155180ef14bd7acccb32 + languageName: node + linkType: hard + +"@types/scheduler@npm:^0.16": + version: 0.16.8 + resolution: "@types/scheduler@npm:0.16.8" + checksum: 10/6c091b096daa490093bf30dd7947cd28e5b2cd612ec93448432b33f724b162587fed9309a0acc104d97b69b1d49a0f3fc755a62282054d62975d53d7fd13472d languageName: node linkType: hard -"@types/secp256k1@npm:4.0.3, @types/secp256k1@npm:^4.0.1": +"@types/secp256k1@npm:4.0.3": version: 4.0.3 resolution: "@types/secp256k1@npm:4.0.3" dependencies: @@ -18349,6 +16369,15 @@ __metadata: languageName: node linkType: hard +"@types/secp256k1@npm:^4.0.1": + version: 4.0.6 + resolution: "@types/secp256k1@npm:4.0.6" + dependencies: + "@types/node": "npm:*" + checksum: 10/211f823be990b55612e604d620acf0dc3bc942d3836bdd8da604269effabc86d98161e5947487b4e4e128f9180fc1682daae2f89ea7a4d9648fdfe52fba365fc + languageName: node + linkType: hard + "@types/seedrandom@npm:3.0.1": version: 3.0.1 resolution: "@types/seedrandom@npm:3.0.1" @@ -18364,9 +16393,9 @@ __metadata: linkType: hard "@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": - version: 7.5.0 - resolution: "@types/semver@npm:7.5.0" - checksum: 10/8fbfbf79e9c14c3c20160a42145a146cba44d9763d0fac78358b394dc36e41bc2590bc4f0129c6fcbbc9b30f12ea1ba821bfe84b29dc80897f315cc7dd251393 + version: 7.5.8 + resolution: "@types/semver@npm:7.5.8" + checksum: 10/3496808818ddb36deabfe4974fd343a78101fa242c4690044ccdc3b95dcf8785b494f5d628f2f47f38a702f8db9c53c67f47d7818f2be1b79f2efb09692e1178 languageName: node linkType: hard @@ -18380,16 +16409,7 @@ __metadata: languageName: node linkType: hard -"@types/serve-index@npm:^1.9.1": - version: 1.9.1 - resolution: "@types/serve-index@npm:1.9.1" - dependencies: - "@types/express": "npm:*" - checksum: 10/026f3995fb500f6df7c3fe5009e53bad6d739e20b84089f58ebfafb2f404bbbb6162bbe33f72d2f2af32d5b8d3799c8e179793f90d9ed5871fb8591190bb6056 - languageName: node - linkType: hard - -"@types/serve-index@npm:^1.9.4": +"@types/serve-index@npm:^1.9.1, @types/serve-index@npm:^1.9.4": version: 1.9.4 resolution: "@types/serve-index@npm:1.9.4" dependencies: @@ -18398,28 +16418,7 @@ __metadata: languageName: node linkType: hard -"@types/serve-static@npm:*": - version: 1.13.10 - resolution: "@types/serve-static@npm:1.13.10" - dependencies: - "@types/mime": "npm:^1" - "@types/node": "npm:*" - checksum: 10/62b4e79cb049a5ed81789e2cdd8b91e289eb03b08130c249d74c8fd6d32840cffc6b50384c1ccd2ef0ecf306fe1188634fd9a8bce4339acd4bcc19ed16b2a0c3 - languageName: node - linkType: hard - -"@types/serve-static@npm:^1.13.10": - version: 1.15.2 - resolution: "@types/serve-static@npm:1.15.2" - dependencies: - "@types/http-errors": "npm:*" - "@types/mime": "npm:*" - "@types/node": "npm:*" - checksum: 10/d5f8f5aaa765be6417aa3f2ebe36591f4e9d2d8a7480edf7d3db041427420fd565cb921fc021271098dd2afafce2b443fc0d978faa3ae21a2a58ebde7d525e9e - languageName: node - linkType: hard - -"@types/serve-static@npm:^1.15.5": +"@types/serve-static@npm:*, @types/serve-static@npm:^1.13.10, @types/serve-static@npm:^1.15.5": version: 1.15.7 resolution: "@types/serve-static@npm:1.15.7" dependencies: @@ -18466,16 +16465,7 @@ __metadata: languageName: node linkType: hard -"@types/sockjs@npm:^0.3.33": - version: 0.3.33 - resolution: "@types/sockjs@npm:0.3.33" - dependencies: - "@types/node": "npm:*" - checksum: 10/b9bbb2b5c5ead2fb884bb019f61a014e37410bddd295de28184e1b2e71ee6b04120c5ba7b9954617f0bdf962c13d06249ce65004490889c747c80d3f628ea842 - languageName: node - linkType: hard - -"@types/sockjs@npm:^0.3.36": +"@types/sockjs@npm:^0.3.33, @types/sockjs@npm:^0.3.36": version: 0.3.36 resolution: "@types/sockjs@npm:0.3.36" dependencies: @@ -18491,7 +16481,16 @@ __metadata: languageName: node linkType: hard -"@types/ssh2-streams@npm:*, @types/ssh2-streams@npm:0.1.9": +"@types/ssh2-streams@npm:*": + version: 0.1.12 + resolution: "@types/ssh2-streams@npm:0.1.12" + dependencies: + "@types/node": "npm:*" + checksum: 10/377bfff70e6c13e42f7bf832209c916b9a80491bba611c21f4cbdc8c9f99553794e5583ee933fd02bb1b056dd9b97433195452f119104f592a5a2440806f3087 + languageName: node + linkType: hard + +"@types/ssh2-streams@npm:0.1.9": version: 0.1.9 resolution: "@types/ssh2-streams@npm:0.1.9" dependencies: @@ -18500,13 +16499,12 @@ __metadata: languageName: node linkType: hard -"@types/ssh2@npm:*": - version: 0.5.51 - resolution: "@types/ssh2@npm:0.5.51" +"@types/ssh2@npm:*, @types/ssh2@npm:^1.11.9": + version: 1.15.1 + resolution: "@types/ssh2@npm:1.15.1" dependencies: - "@types/node": "npm:*" - "@types/ssh2-streams": "npm:*" - checksum: 10/730aade59a7a79078d9ab620c29b8be488b117d998571522a5264718c00e68179c23ed9fc7d652a813f16544ecf7f4f2167a1a6ed1f4345571061febac74ee5d + "@types/node": "npm:^18.11.18" + checksum: 10/fe6c7d54c1064584cc9fa60104d415f6e6ca908604e8ebd0965997cc7e5f59c0674908476e2dd84999af7df3214976982fec21cf6d5267eb88e0ce773b8e815c languageName: node linkType: hard @@ -18530,30 +16528,22 @@ __metadata: languageName: node linkType: hard -"@types/ssh2@npm:^1.11.9": - version: 1.11.13 - resolution: "@types/ssh2@npm:1.11.13" - dependencies: - "@types/node": "npm:^18.11.18" - checksum: 10/424b25e0f81c37ce9f10ceef35a3fbb08dcc3c16a4bf1fecabd1ac84d14d335d772acb61fa2aaaa7c183d98c66acb6bb9f0496ec0196ccbbff30e50e6c1cda4b - languageName: node - linkType: hard - "@types/stack-utils@npm:^2.0.0": - version: 2.0.1 - resolution: "@types/stack-utils@npm:2.0.1" - checksum: 10/205fdbe3326b7046d7eaf5e494d8084f2659086a266f3f9cf00bccc549c8e36e407f88168ad4383c8b07099957ad669f75f2532ed4bc70be2b037330f7bae019 + version: 2.0.3 + resolution: "@types/stack-utils@npm:2.0.3" + checksum: 10/72576cc1522090fe497337c2b99d9838e320659ac57fa5560fcbdcbafcf5d0216c6b3a0a8a4ee4fdb3b1f5e3420aa4f6223ab57b82fef3578bec3206425c6cf5 languageName: node linkType: hard "@types/superagent@npm:*": - version: 8.1.4 - resolution: "@types/superagent@npm:8.1.4" + version: 8.1.9 + resolution: "@types/superagent@npm:8.1.9" dependencies: "@types/cookiejar": "npm:^2.1.5" "@types/methods": "npm:^1.1.4" "@types/node": "npm:*" - checksum: 10/06ec4510ca396b73f8271a14c62bbbe8aef80991531bcc4eb1ef7de3e6ac88e677050fbf7da16d8838f9e57d55a20d9a308824adf99b4382849eaae47f0e7035 + form-data: "npm:^4.0.0" + checksum: 10/6d9687b0bc3d693b900ef76000b02437a70879c3219b28606879c086d786bb1e48429813e72e32dd0aafc94c053a78a2aa8be67c45bc8e6b968ca62d6d5cc554 languageName: node linkType: hard @@ -18593,11 +16583,12 @@ __metadata: linkType: hard "@types/tape@npm:*": - version: 4.13.2 - resolution: "@types/tape@npm:4.13.2" + version: 5.6.4 + resolution: "@types/tape@npm:5.6.4" dependencies: "@types/node": "npm:*" - checksum: 10/c45331cf1098ad3b7aa128b43aef2b2cc6a26f3690c1b5df8ab10009323acb155258d52d5502544a25c103353170d23d084d695410b22110376e11a7a190ecd6 + "@types/through": "npm:*" + checksum: 10/5f41c97bfbef1882efcf16f2335f34f16d1df7bf6045d36ba7b5a416f3364f132000dd2c2c2ba69c152656b7e6a8d9e74fbbec348af426e165f4aa8860ab3eeb languageName: node linkType: hard @@ -18639,18 +16630,18 @@ __metadata: linkType: hard "@types/through@npm:*": - version: 0.0.30 - resolution: "@types/through@npm:0.0.30" + version: 0.0.33 + resolution: "@types/through@npm:0.0.33" dependencies: "@types/node": "npm:*" - checksum: 10/9578470db0b527c26e246a1220ae9bffc6bf47f20f89c54aac467c083ab1f7e16c00d9a7b4bb6cb4e2dfae465027270827e5908a6236063f6214625e50585d78 + checksum: 10/fd0b73f873a64ed5366d1d757c42e5dbbb2201002667c8958eda7ca02fff09d73de91360572db465ee00240c32d50c6039ea736d8eca374300f9664f93e8da39 languageName: node linkType: hard "@types/tough-cookie@npm:*": - version: 4.0.1 - resolution: "@types/tough-cookie@npm:4.0.1" - checksum: 10/795178f8ba0155ff7f7449101c0cb2f38922b9981c504baa8b132defd98c189dd8d17a861e8123c4430423e8b71e1380735a69111e55611461a22e8ba2657415 + version: 4.0.5 + resolution: "@types/tough-cookie@npm:4.0.5" + checksum: 10/01fd82efc8202670865928629697b62fe9bf0c0dcbc5b1c115831caeb073a2c0abb871ff393d7df1ae94ea41e256cb87d2a5a91fd03cdb1b0b4384e08d4ee482 languageName: node linkType: hard @@ -18662,9 +16653,9 @@ __metadata: linkType: hard "@types/trusted-types@npm:^2.0.2": - version: 2.0.3 - resolution: "@types/trusted-types@npm:2.0.3" - checksum: 10/4794804bc4a4a173d589841b6d26cf455ff5dc4f3e704e847de7d65d215f2e7043d8757e4741ce3a823af3f08260a8d04a1a6e9c5ec9b20b7b04586956a6b005 + version: 2.0.7 + resolution: "@types/trusted-types@npm:2.0.7" + checksum: 10/8e4202766a65877efcf5d5a41b7dd458480b36195e580a3b1085ad21e948bc417d55d6f8af1fd2a7ad008015d4117d5fdfe432731157da3c68678487174e4ba3 languageName: node linkType: hard @@ -18687,9 +16678,16 @@ __metadata: linkType: hard "@types/underscore@npm:*": - version: 1.11.15 - resolution: "@types/underscore@npm:1.11.15" - checksum: 10/5a9c262566551f61744e066d33578c0fad1139c2d5314ed77a8f867487a6d7dd18616f32df4c605070fbd569b942c6d2c083be9f9ae649f41a562b52812b06be + version: 1.13.0 + resolution: "@types/underscore@npm:1.13.0" + checksum: 10/938a6a0a878ce108046601a7cceeec9870428cc565a0c6d7891b7ad39e7570f1f75a1c02bf81baf23c7c7948ef0693d00ccd1a8e05894a52fed4c584a4b7172e + languageName: node + linkType: hard + +"@types/unist@npm:*, @types/unist@npm:^3.0.0": + version: 3.0.3 + resolution: "@types/unist@npm:3.0.3" + checksum: 10/96e6453da9e075aaef1dc22482463898198acdc1eeb99b465e65e34303e2ec1e3b1ed4469a9118275ec284dc98019f63c3f5d49422f0e4ac707e5ab90fb3b71a languageName: node linkType: hard @@ -18707,20 +16705,13 @@ __metadata: languageName: node linkType: hard -"@types/validator@npm:^13.11.8": +"@types/validator@npm:^13.11.8, @types/validator@npm:^13.7.10": version: 13.12.2 resolution: "@types/validator@npm:13.12.2" checksum: 10/564f60cfe112b45e1d747245d1f80db999bbc372b2b6a1c5454441b02c3d6bffbfff4365a10c3cd7874197f14ca5779b435794c7600bdcb541da948405a3b21a languageName: node linkType: hard -"@types/validator@npm:^13.7.10": - version: 13.11.7 - resolution: "@types/validator@npm:13.11.7" - checksum: 10/5935d363a9a6099ee6a2100ae3be46d9d1f113dbea16e03b627b48b2f746f01100535febc564d215a7054dd9a632ec0cda10ecd6a75d088e3e38834290fb76f6 - languageName: node - linkType: hard - "@types/web3@npm:1.0.19": version: 1.0.19 resolution: "@types/web3@npm:1.0.19" @@ -18752,8 +16743,8 @@ __metadata: linkType: hard "@types/webpack@npm:^4": - version: 4.41.39 - resolution: "@types/webpack@npm:4.41.39" + version: 4.41.40 + resolution: "@types/webpack@npm:4.41.40" dependencies: "@types/node": "npm:*" "@types/tapable": "npm:^1" @@ -18761,7 +16752,7 @@ __metadata: "@types/webpack-sources": "npm:*" anymatch: "npm:^3.0.0" source-map: "npm:^0.6.0" - checksum: 10/95a4bb66ac5a11e90a515967a01e532efc13504837865824430c5a6fe9e854c0bf650e8c95ba54207bf79e115bbb996fb9f34e5dd99e02e42586d49c9f075b93 + checksum: 10/5451ac1e34d679650eaf005739af74416e556b3c7044cdbb7f380f44d65701ae8186a1bd79e52ef305504e04c7b80412a138ec04ebcee1aa69917da5d9aecf11 languageName: node linkType: hard @@ -18772,7 +16763,7 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:8.5.3, @types/ws@npm:^8.2.2": +"@types/ws@npm:8.5.3": version: 8.5.3 resolution: "@types/ws@npm:8.5.3" dependencies: @@ -18781,30 +16772,12 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:^8.5.10": - version: 8.5.12 - resolution: "@types/ws@npm:8.5.12" - dependencies: - "@types/node": "npm:*" - checksum: 10/d8a3ddfb5ff8fea992a043113579d61ac1ea21e8464415af9e2b01b205ed19d817821ad64ca1b3a90062d1df1c23b0f586d8351d25ca6728844df99a74e8f76d - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.4": - version: 8.5.8 - resolution: "@types/ws@npm:8.5.8" - dependencies: - "@types/node": "npm:*" - checksum: 10/5f33608d1afa38236f0c0c6e153555d94d8ff74f54a21d1c062f4a93f0cb8c1aaecd6f11f0dd9a41774f79b1c56235aaccaad290e57f69350ccc9bd47c63b040 - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.5": - version: 8.5.5 - resolution: "@types/ws@npm:8.5.5" +"@types/ws@npm:^8.2.2, @types/ws@npm:^8.5.10, @types/ws@npm:^8.5.4, @types/ws@npm:^8.5.5": + version: 8.5.13 + resolution: "@types/ws@npm:8.5.13" dependencies: "@types/node": "npm:*" - checksum: 10/b2d7da5bd469c2ff1ddcfba1da33a556dc02c539e727001e7dc7b4182935154143e96a101cc091686acefb4e115c8ee38111c6634934748b8dd2db0c851c50ab + checksum: 10/21369beafa75c91ae3b00d3a2671c7408fceae1d492ca2abd5ac7c8c8bf4596d513c1599ebbddeae82c27c4a2d248976d0d714c4b3d34362b2ae35b964e2e637 languageName: node linkType: hard @@ -18818,9 +16791,9 @@ __metadata: linkType: hard "@types/yargs-parser@npm:*": - version: 20.2.1 - resolution: "@types/yargs-parser@npm:20.2.1" - checksum: 10/08b67730b36ec5af0b429d8bd7cd2cd7d5586ec9fd7f9f935a64bc4e1235eae63054b40ec648705462d81472b0ffbd67a5854e0d38311d9e4c5b6009dfe3d3fd + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: 10/a794eb750e8ebc6273a51b12a0002de41343ffe46befef460bdbb57262d187fdf608bc6615b7b11c462c63c3ceb70abe2564c8dd8ee0f7628f38a314f74a9b9b languageName: node linkType: hard @@ -18834,29 +16807,20 @@ __metadata: linkType: hard "@types/yargs@npm:^16.0.0": - version: 16.0.6 - resolution: "@types/yargs@npm:16.0.6" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10/a1908b4344d34b918bb99b6157b3ee87f8441dc6d697c7787b779374d9118f69d979a93a44eec134ff20f25479d1fa460caac3d5a8e66e4af09c2cb261d2352d - languageName: node - linkType: hard - -"@types/yargs@npm:^17.0.2": - version: 17.0.8 - resolution: "@types/yargs@npm:17.0.8" + version: 16.0.9 + resolution: "@types/yargs@npm:16.0.9" dependencies: "@types/yargs-parser": "npm:*" - checksum: 10/3c062686a4741a9b53b75c9d602e366c34f49e372453028e526b9c576686b322bea0682cb086547b66c99c72ee3fe48df793e8bf0a86e168cda044c5b9107529 + checksum: 10/8f31cbfcd5c3ac67c27e26026d8b9af0c37770fb2421b661939ba06d136f5a4fa61528a5d0f495d5802fbf1d9244b499e664d8d884e3eb3c36d556fb7c278f18 languageName: node linkType: hard -"@types/yargs@npm:^17.0.8": - version: 17.0.10 - resolution: "@types/yargs@npm:17.0.10" +"@types/yargs@npm:^17.0.2, @types/yargs@npm:^17.0.8": + version: 17.0.33 + resolution: "@types/yargs@npm:17.0.33" dependencies: "@types/yargs-parser": "npm:*" - checksum: 10/cfe94e8ba50364e08d7b3ecb10a7c153762d0e56c571079538bb06b306638d1045e395fc5a745b94519e73798779c761fa386ec13c82306a62349f64d7b9eec1 + checksum: 10/16f6681bf4d99fb671bf56029141ed01db2862e3db9df7fc92d8bea494359ac96a1b4b1c35a836d1e95e665fb18ad753ab2015fc0db663454e8fd4e5d5e2ef91 languageName: node linkType: hard @@ -19186,15 +17150,17 @@ __metadata: linkType: hard "@typescript/vfs@npm:^1.4.0": - version: 1.5.0 - resolution: "@typescript/vfs@npm:1.5.0" + version: 1.6.0 + resolution: "@typescript/vfs@npm:1.6.0" dependencies: debug: "npm:^4.1.1" - checksum: 10/9a60cfd4e4ef37f69558e7e8a0c4633f86aae969a4c1193435bfdf80eb9573d23850b65621631d07e2f9699a2d7351ae6d9caa46080595314bde03c2c63443dd + peerDependencies: + typescript: "*" + checksum: 10/58b79ceb5db9e8dc374d6e7348866c62f2a80664bccda7064e823a0a7a7b05c71cff06e5d27ca2ef56b3cec84c3631cec9cd6fed49ea0ccc6ace812f8c318b37 languageName: node linkType: hard -"@ungap/structured-clone@npm:^1.2.0": +"@ungap/structured-clone@npm:^1.0.0, @ungap/structured-clone@npm:^1.2.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 @@ -19264,318 +17230,211 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-core@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-core@npm:3.3.7" +"@vue/compiler-core@npm:3.5.12": + version: 3.5.12 + resolution: "@vue/compiler-core@npm:3.5.12" dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/shared": "npm:3.3.7" + "@babel/parser": "npm:^7.25.3" + "@vue/shared": "npm:3.5.12" + entities: "npm:^4.5.0" estree-walker: "npm:^2.0.2" - source-map-js: "npm:^1.0.2" - checksum: 10/846c6a3c68fc66ab7b1e59b69e75fb753e5bec91dfbb74878bc5f689d28eb34bb2a7f5e71ad32772d33587302a6d36a0c1e297699f2e29e0d2c60bff77e3de2e + source-map-js: "npm:^1.2.0" + checksum: 10/287ca30a8e018f438775cdb93fca191e841e359c646a89a0788237e2af2840b04e6fcea8aea00f09b81ca96c16bcab00a53124916d07fb5c1c598dba4a6c560b languageName: node linkType: hard -"@vue/compiler-dom@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-dom@npm:3.3.7" +"@vue/compiler-dom@npm:3.5.12": + version: 3.5.12 + resolution: "@vue/compiler-dom@npm:3.5.12" dependencies: - "@vue/compiler-core": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - checksum: 10/e00decdd66acfab90f4aa9d545bb29bdf4512d2be728a65724dd0f28afbc7bdd2355fa8b83b0616cfcdbb8a5706e362c9717a1fc7776d8445faa37e6f71f332c + "@vue/compiler-core": "npm:3.5.12" + "@vue/shared": "npm:3.5.12" + checksum: 10/7578e7e729f44fd0903cd468255d1d50fe9774073a7f5cb0a5bf4352495712454e3b698abe5b29829cf1b56267162f7e73397979e4dcc472e855192cb2c96008 languageName: node linkType: hard "@vue/compiler-sfc@npm:^3.3.4": - version: 3.3.7 - resolution: "@vue/compiler-sfc@npm:3.3.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/compiler-core": "npm:3.3.7" - "@vue/compiler-dom": "npm:3.3.7" - "@vue/compiler-ssr": "npm:3.3.7" - "@vue/reactivity-transform": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" + version: 3.5.12 + resolution: "@vue/compiler-sfc@npm:3.5.12" + dependencies: + "@babel/parser": "npm:^7.25.3" + "@vue/compiler-core": "npm:3.5.12" + "@vue/compiler-dom": "npm:3.5.12" + "@vue/compiler-ssr": "npm:3.5.12" + "@vue/shared": "npm:3.5.12" estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.5" - postcss: "npm:^8.4.31" - source-map-js: "npm:^1.0.2" - checksum: 10/4f7fb03126a539fe745e3b07aae25a639dd3525c909b526f2f9a0b96862a1d4722d11f923921714fe6b604f9a0b9cdcbb723070909f6c65b4a42333ee8bb2c12 + magic-string: "npm:^0.30.11" + postcss: "npm:^8.4.47" + source-map-js: "npm:^1.2.0" + checksum: 10/5b2fdbbf381dc684054bcfb7b0945154de658b56b618b2e1637abecd47e070976848a0bfcb2fa0698bab077f0d79ba638f2ec1d180652ca160352c72cf7e6fb3 languageName: node linkType: hard -"@vue/compiler-ssr@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/compiler-ssr@npm:3.3.7" +"@vue/compiler-ssr@npm:3.5.12": + version: 3.5.12 + resolution: "@vue/compiler-ssr@npm:3.5.12" dependencies: - "@vue/compiler-dom": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - checksum: 10/d675dc71d87d3dad423c53077326af74c0c315feeecb8e74fb4320a9fa4bae632d70a130a72f512fdc389ff27ccee5f64af0a6a5eb88aded9ebb48e9db770492 + "@vue/compiler-dom": "npm:3.5.12" + "@vue/shared": "npm:3.5.12" + checksum: 10/25b11070503f5380341d37889aa8729987f3884cdda3a01c95323ee41a00f233c6dd7439618b2389dcaa339341776e7bd21780e3416c1ec1fddee45f13f254a7 languageName: node linkType: hard -"@vue/reactivity-transform@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/reactivity-transform@npm:3.3.7" - dependencies: - "@babel/parser": "npm:^7.23.0" - "@vue/compiler-core": "npm:3.3.7" - "@vue/shared": "npm:3.3.7" - estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.5" - checksum: 10/674c308a8db8627a62049b89e8a55581a35486c6c57ee88ef8c3bd40a3729bd52cf7fd2de61b9fa1d75479da4ccd45e9656e4fd5736686adc978fcfe7b471109 +"@vue/shared@npm:3.5.12": + version: 3.5.12 + resolution: "@vue/shared@npm:3.5.12" + checksum: 10/abe229a09a9513f484a03a8c0e63b90949d9fccf64203c1ad510628305e1fdc0e9d064174df88299409a9fbf0c142e4fbcc0a5449f10728fb12d7e10d825abc5 languageName: node linkType: hard -"@vue/shared@npm:3.3.7": - version: 3.3.7 - resolution: "@vue/shared@npm:3.3.7" - checksum: 10/c3d746757fc254897b701a0ecc2dec5bb61e8a0ca7aae86ba7288ab2a7a89cbf6afd79c5ec9a47cf484db65c3c3ad100882c440023d8928be6aa087a71391153 - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/ast@npm:1.11.6" - dependencies: - "@webassemblyjs/helper-numbers": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - checksum: 10/4c1303971ccd5188731c9b01073d9738333f37b946a48c4e049f7b788706cdc66f473cd6f3e791423a94c52a3b2230d070007930d29bccbce238b23835839f3c - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/ast@npm:1.12.1" +"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.11.5, @webassemblyjs/ast@npm:^1.12.1": + version: 1.14.1 + resolution: "@webassemblyjs/ast@npm:1.14.1" dependencies: - "@webassemblyjs/helper-numbers": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - checksum: 10/a775b0559437ae122d14fec0cfe59fdcaf5ca2d8ff48254014fd05d6797e20401e0f1518e628f9b06819aa085834a2534234977f9608b3f2e51f94b6e8b0bc43 - languageName: node - linkType: hard - -"@webassemblyjs/floating-point-hex-parser@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6" - checksum: 10/29b08758841fd8b299c7152eda36b9eb4921e9c584eb4594437b5cd90ed6b920523606eae7316175f89c20628da14326801090167cc7fbffc77af448ac84b7e2 + "@webassemblyjs/helper-numbers": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + checksum: 10/f83e6abe38057f5d87c1fb356513a371a8b43c9b87657f2790741a66b1ef8ecf958d1391bc42f27c5fb33f58ab8286a38ea849fdd21f433cd4df1307424bab45 languageName: node linkType: hard -"@webassemblyjs/helper-api-error@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-api-error@npm:1.11.6" - checksum: 10/e8563df85161096343008f9161adb138a6e8f3c2cc338d6a36011aa55eabb32f2fd138ffe63bc278d009ada001cc41d263dadd1c0be01be6c2ed99076103689f +"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" + checksum: 10/e866ec8433f4a70baa511df5e8f2ebcd6c24f4e2cc6274c7c5aabe2bcce3459ea4680e0f35d450e1f3602acf3913b6b8e4f15069c8cfd34ae8609fb9a7d01795 languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.6" - checksum: 10/b14d0573bf680d22b2522e8a341ec451fddd645d1f9c6bd9012ccb7e587a2973b86ab7b89fe91e1c79939ba96095f503af04369a3b356c8023c13a5893221644 +"@webassemblyjs/helper-api-error@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" + checksum: 10/48b5df7fd3095bb252f59a139fe2cbd999a62ac9b488123e9a0da3906ad8a2f2da7b2eb21d328c01a90da987380928706395c2897d1f3ed9e2125b6d75a920d0 languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" - checksum: 10/1d8705daa41f4d22ef7c6d422af4c530b84d69d0c253c6db5adec44d511d7caa66837803db5b1addcea611a1498fd5a67d2cf318b057a916283ae41ffb85ba8a +"@webassemblyjs/helper-buffer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" + checksum: 10/9690afeafa5e765a34620aa6216e9d40f9126d4e37e9726a2594bf60cab6b211ef20ab6670fd3c4449dd4a3497e69e49b2b725c8da0fb213208c7f45f15f5d5b languageName: node linkType: hard -"@webassemblyjs/helper-numbers@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-numbers@npm:1.11.6" +"@webassemblyjs/helper-numbers@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" dependencies: - "@webassemblyjs/floating-point-hex-parser": "npm:1.11.6" - "@webassemblyjs/helper-api-error": "npm:1.11.6" + "@webassemblyjs/floating-point-hex-parser": "npm:1.13.2" + "@webassemblyjs/helper-api-error": "npm:1.13.2" "@xtuc/long": "npm:4.2.2" - checksum: 10/9ffd258ad809402688a490fdef1fd02222f20cdfe191c895ac215a331343292164e5033dbc0347f0f76f2447865c0b5c2d2e3304ee948d44f7aa27857028fd08 + checksum: 10/e4c7d0b09811e1cda8eec644a022b560b28f4e974f50195375ccd007df5ee48a922a6dcff5ac40b6a8ec850d56d0ea6419318eee49fec7819ede14e90417a6a4 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6" - checksum: 10/4ebf03e9c1941288c10e94e0f813f413f972bfaa1f09be2cc2e5577f300430906b61aa24d52f5ef2f894e8e24e61c6f7c39871d7e3d98bc69460e1b8e00bb20b +"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" + checksum: 10/3edd191fff7296df1ef3b023bdbe6cb5ea668f6386fd197ccfce46015c6f2a8cc9763cfb86503a0b94973ad27996645afff2252ee39a236513833259a47af6ed languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-buffer": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.11.6" - checksum: 10/38a615ab3d55f953daaf78b69f145e2cc1ff5288ab71715d1a164408b735c643a87acd7e7ba3e9633c5dd965439a45bb580266b05a06b22ff678d6c013514108 - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-section@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" +"@webassemblyjs/helper-wasm-section@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - checksum: 10/e91e6b28114e35321934070a2db8973a08a5cd9c30500b817214c683bbf5269ed4324366dd93ad83bf2fba0d671ac8f39df1c142bf58f70c57a827eeba4a3d2f + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + checksum: 10/6b73874f906532512371181d7088460f767966f26309e836060c5a8e4e4bfe6d523fb5f4c034b34aa22ebb1192815f95f0e264298769485c1f0980fdd63ae0ce languageName: node linkType: hard -"@webassemblyjs/ieee754@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/ieee754@npm:1.11.6" +"@webassemblyjs/ieee754@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/ieee754@npm:1.13.2" dependencies: "@xtuc/ieee754": "npm:^1.2.0" - checksum: 10/13574b8e41f6ca39b700e292d7edf102577db5650fe8add7066a320aa4b7a7c09a5056feccac7a74eb68c10dea9546d4461412af351f13f6b24b5f32379b49de + checksum: 10/d7e3520baa37a7309fa7db4d73d69fb869878853b1ebd4b168821bd03fcc4c0e1669c06231315b0039035d9a7a462e53de3ad982da4a426a4b0743b5888e8673 languageName: node linkType: hard -"@webassemblyjs/leb128@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/leb128@npm:1.11.6" +"@webassemblyjs/leb128@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/leb128@npm:1.13.2" dependencies: "@xtuc/long": "npm:4.2.2" - checksum: 10/ec3b72db0e7ce7908fe08ec24395bfc97db486063824c0edc580f0973a4cfbadf30529569d9c7db663a56513e45b94299cca03be9e1992ea3308bb0744164f3d - languageName: node - linkType: hard - -"@webassemblyjs/utf8@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/utf8@npm:1.11.6" - checksum: 10/361a537bd604101b320a5604c3c96d1038d83166f1b9fb86cedadc7e81bae54c3785ae5d90bf5b1842f7da08194ccaf0f44a64fcca0cbbd6afe1a166196986d6 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-edit@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-buffer": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/helper-wasm-section": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.11.6" - "@webassemblyjs/wasm-opt": "npm:1.11.6" - "@webassemblyjs/wasm-parser": "npm:1.11.6" - "@webassemblyjs/wast-printer": "npm:1.11.6" - checksum: 10/c168bfc6d0cdd371345f36f95a4766d098a96ccc1257e6a6e3a74d987a5c4f2ddd2244a6aecfa5d032a47d74ed2c3b579e00a314d31e4a0b76ad35b31cdfa162 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-edit@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/helper-wasm-section": "npm:1.12.1" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - "@webassemblyjs/wasm-opt": "npm:1.12.1" - "@webassemblyjs/wasm-parser": "npm:1.12.1" - "@webassemblyjs/wast-printer": "npm:1.12.1" - checksum: 10/5678ae02dbebba2f3a344e25928ea5a26a0df777166c9be77a467bfde7aca7f4b57ef95587e4bd768a402cdf2fddc4c56f0a599d164cdd9fe313520e39e18137 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-gen@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/f91903506ce50763592863df5d80ffee80f71a1994a882a64cdb83b5e44002c715f1ef1727d8ccb0692d066af34d3d4f5e59e8f7a4e2eeb2b7c32692ac44e363 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-gen@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" - dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/ec45bd50e86bc9856f80fe9af4bc1ae5c98fb85f57023d11dff2b670da240c47a7b1b9b6c89755890314212bd167cf3adae7f1157216ddffb739a4ce589fc338 + checksum: 10/3a10542c86807061ec3230bac8ee732289c852b6bceb4b88ebd521a12fbcecec7c432848284b298154f28619e2746efbed19d6904aef06c49ef20a0b85f650cf languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.6" - dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-buffer": "npm:1.11.6" - "@webassemblyjs/wasm-gen": "npm:1.11.6" - "@webassemblyjs/wasm-parser": "npm:1.11.6" - checksum: 10/e0cfeea381ecbbd0ca1616e9a08974acfe7fc81f8a16f9f2d39f565dc51784dd7043710b6e972f9968692d273e32486b9a8a82ca178d4bd520b2d5e2cf28234d +"@webassemblyjs/utf8@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/utf8@npm:1.13.2" + checksum: 10/27885e5d19f339501feb210867d69613f281eda695ac508f04d69fa3398133d05b6870969c0242b054dc05420ed1cc49a64dea4fe0588c18d211cddb0117cc54 languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" +"@webassemblyjs/wasm-edit@npm:^1.11.5, @webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-buffer": "npm:1.12.1" - "@webassemblyjs/wasm-gen": "npm:1.12.1" - "@webassemblyjs/wasm-parser": "npm:1.12.1" - checksum: 10/21f25ae109012c49bb084e09f3b67679510429adc3e2408ad3621b2b505379d9cce337799a7919ef44db64e0d136833216914aea16b0d4856f353b9778e0cdb7 + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/helper-wasm-section": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-opt": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + "@webassemblyjs/wast-printer": "npm:1.14.1" + checksum: 10/c62c50eadcf80876713f8c9f24106b18cf208160ab842fcb92060fd78c37bf37e7fcf0b7cbf1afc05d230277c2ce0f3f728432082c472dd1293e184a95f9dbdd languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.6, @webassemblyjs/wasm-parser@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.6" +"@webassemblyjs/wasm-gen@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@webassemblyjs/helper-api-error": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/6995e0b7b8ebc52b381459c6a555f87763dcd3975c4a112407682551e1c73308db7af23385972a253dceb5af94e76f9c97cb861e8239b5ed1c3e79b95d8e2097 + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10/6085166b0987d3031355fe17a4f9ef0f412e08098d95454059aced2bd72a4c3df2bc099fa4d32d640551fc3eca1ac1a997b44432e46dc9d84642688e42c17ed4 languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" +"@webassemblyjs/wasm-opt@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" - "@webassemblyjs/helper-api-error": "npm:1.11.6" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.11.6" - "@webassemblyjs/ieee754": "npm:1.11.6" - "@webassemblyjs/leb128": "npm:1.11.6" - "@webassemblyjs/utf8": "npm:1.11.6" - checksum: 10/f7311685b76c3e1def2abea3488be1e77f06ecd8633143a6c5c943ca289660952b73785231bb76a010055ca64645227a4bc79705c26ab7536216891b6bb36320 + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + checksum: 10/fa5d1ef8d2156e7390927f938f513b7fb4440dd6804b3d6c8622b7b1cf25a3abf1a5809f615896d4918e04b27b52bc3cbcf18faf2d563cb563ae0a9204a492db languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wast-printer@npm:1.11.6" +"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.11.5, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.11.6" - "@xtuc/long": "npm:4.2.2" - checksum: 10/fd45fd0d693141d678cc2f6ff2d3a0d7a8884acb1c92fb0c63cf43b7978e9560be04118b12792638a39dd185640453510229e736f3049037d0c361f6435f2d5f + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-api-error": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10/07d9805fda88a893c984ed93d5a772d20d671e9731358ab61c6c1af8e0e58d1c42fc230c18974dfddebc9d2dd7775d514ba4d445e70080b16478b4b16c39c7d9 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.12.1": - version: 1.12.1 - resolution: "@webassemblyjs/wast-printer@npm:1.12.1" +"@webassemblyjs/wast-printer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wast-printer@npm:1.14.1" dependencies: - "@webassemblyjs/ast": "npm:1.12.1" + "@webassemblyjs/ast": "npm:1.14.1" "@xtuc/long": "npm:4.2.2" - checksum: 10/1a6a4b6bc4234f2b5adbab0cb11a24911b03380eb1cab6fb27a2250174a279fdc6aa2f5a9cf62dd1f6d4eb39f778f488e8ff15b9deb0670dee5c5077d46cf572 + checksum: 10/cef09aad2fcd291bfcf9efdae2ea1e961a1ba0f925d1d9dcdd8c746d32fbaf431b6d26a0241699c0e39f82139018aa720b4ceb84ac6f4c78f13072747480db69 languageName: node linkType: hard @@ -19699,20 +17558,13 @@ __metadata: languageName: node linkType: hard -"abab@npm:^2.0.3, abab@npm:^2.0.6": +"abab@npm:^2.0.3, abab@npm:^2.0.5, abab@npm:^2.0.6": version: 2.0.6 resolution: "abab@npm:2.0.6" checksum: 10/ebe95d7278999e605823fc515a3b05d689bc72e7f825536e73c95ebf621636874c6de1b749b3c4bf866b96ccd4b3a2802efa313d0e45ad51a413c8c73247db20 languageName: node linkType: hard -"abab@npm:^2.0.5": - version: 2.0.5 - resolution: "abab@npm:2.0.5" - checksum: 10/92deff85d54efe307bbe2ea824741f6ef429181751968e3eb55279be6072b3ffaa2100978eb72a9f55c1220f7117c65651e37f2631ea1e25a763e5e687800706 - languageName: node - linkType: hard - "abbrev@npm:1, abbrev@npm:^1.0.0": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -19749,24 +17601,14 @@ __metadata: languageName: node linkType: hard -"abortable-iterator@npm:^5.0.1": - version: 5.0.1 - resolution: "abortable-iterator@npm:5.0.1" - dependencies: - get-iterator: "npm:^2.0.0" - it-stream-types: "npm:^2.0.1" - checksum: 10/05b9e2601ae4e03ea2038f55013b8dfa074f3c7fa898cbc996107f99098b4c8338c8efececa36a953ef75cd8e4af7859b152d98c14b4472a6c79307fe94d369e - languageName: node - linkType: hard - "abortcontroller-polyfill@npm:^1.7.3, abortcontroller-polyfill@npm:^1.7.5": - version: 1.7.5 - resolution: "abortcontroller-polyfill@npm:1.7.5" - checksum: 10/aac398f7fc076235fe731adaffd2c319fe6c1527af8ca561890242d5396351350e0705726478778dc90326a69a4c044890c156fe867cba7f3ffeb670f8665a51 + version: 1.7.6 + resolution: "abortcontroller-polyfill@npm:1.7.6" + checksum: 10/71d9a380270be5ade5d5aca6cddd08ebd94e3ad2b10a3bcfe179b8c8b6234c426c8a9ab316c5238b52d21edd086417d9c8679b6f1b981f976960ff1d09175c4c languageName: node linkType: hard -"abstract-level@npm:1.0.3, abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": +"abstract-level@npm:1.0.3": version: 1.0.3 resolution: "abstract-level@npm:1.0.3" dependencies: @@ -19781,6 +17623,21 @@ __metadata: languageName: node linkType: hard +"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3, abstract-level@npm:^1.0.4": + version: 1.0.4 + resolution: "abstract-level@npm:1.0.4" + dependencies: + buffer: "npm:^6.0.3" + catering: "npm:^2.1.0" + is-buffer: "npm:^2.0.5" + level-supports: "npm:^4.0.0" + level-transcoder: "npm:^1.0.1" + module-error: "npm:^1.0.1" + queue-microtask: "npm:^1.2.3" + checksum: 10/8edf4cf55b7b66b653296f53a643bcf1501074be099d8c44351595cd33f769b7b2aed216d5fffe1c99ebea4acf14f5ae093e98baa60ea1d236ea8a3387350ebb + languageName: node + linkType: hard + "abstract-leveldown@npm:7.2.0, abstract-leveldown@npm:^7.2.0": version: 7.2.0 resolution: "abstract-leveldown@npm:7.2.0" @@ -19864,7 +17721,7 @@ __metadata: languageName: node linkType: hard -"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.8": +"accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" dependencies: @@ -19874,16 +17731,6 @@ __metadata: languageName: node linkType: hard -"accepts@npm:~1.3.4, accepts@npm:~1.3.5": - version: 1.3.7 - resolution: "accepts@npm:1.3.7" - dependencies: - mime-types: "npm:~2.1.24" - negotiator: "npm:0.6.2" - checksum: 10/599aa3cc775a2b4fb393f666be41ba7f3da4f46ba8bb422908a68042d3d59ef71f1631f1657b22842fe53f4cd562fc02f8bb42cfde6af0cec3a9b1f9508843cc - languageName: node - linkType: hard - "acorn-globals@npm:^6.0.0": version: 6.0.0 resolution: "acorn-globals@npm:6.0.0" @@ -19938,9 +17785,11 @@ __metadata: linkType: hard "acorn-walk@npm:^8.1.1": - version: 8.2.0 - resolution: "acorn-walk@npm:8.2.0" - checksum: 10/e69f7234f2adfeb16db3671429a7c80894105bd7534cb2032acf01bb26e6a847952d11a062d071420b43f8d82e33d2e57f26fe87d9cce0853e8143d8910ff1de + version: 8.3.4 + resolution: "acorn-walk@npm:8.3.4" + dependencies: + acorn: "npm:^8.11.0" + checksum: 10/871386764e1451c637bb8ab9f76f4995d408057e9909be6fb5ad68537ae3375d85e6a6f170b98989f44ab3ff6c74ad120bc2779a3d577606e7a0cd2b4efcaf77 languageName: node linkType: hard @@ -19971,21 +17820,12 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.2.4, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.10.0 - resolution: "acorn@npm:8.10.0" - bin: - acorn: bin/acorn - checksum: 10/522310c20fdc3c271caed3caf0f06c51d61cb42267279566edd1d58e83dbc12eebdafaab666a0f0be1b7ad04af9c6bc2a6f478690a9e6391c3c8b165ada917dd - languageName: node - linkType: hard - -"acorn@npm:^8.4.1, acorn@npm:^8.7.1": - version: 8.8.2 - resolution: "acorn@npm:8.8.2" +"acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.2.4, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" bin: acorn: bin/acorn - checksum: 10/b4e77d56d24d3e11a45d9ac8ae661b4e14a4af04ae33edbf1e6bf910887e5bb352cc60e9ea06a0944880e6b658f58c095d3b54e88e1921cb9319608b51085dd7 + checksum: 10/6df29c35556782ca9e632db461a7f97947772c6c1d5438a81f0c873a3da3a792487e83e404d1c6c25f70513e91aa18745f6eafb1fcc3a43ecd1920b21dd173d2 languageName: node linkType: hard @@ -20057,23 +17897,21 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" dependencies: debug: "npm:^4.3.4" - checksum: 10/f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 languageName: node linkType: hard "agentkeepalive@npm:^4.1.3, agentkeepalive@npm:^4.2.1": - version: 4.2.1 - resolution: "agentkeepalive@npm:4.2.1" + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" dependencies: - debug: "npm:^4.1.0" - depd: "npm:^1.1.2" humanize-ms: "npm:^1.2.1" - checksum: 10/63961cba1afa26d708da94159f3b9428d46fdc137b783fbc399b848e750c5e28c97d96839efa8cb3c2d11ecd12dd411298c00d164600212f660e8c55369c9e55 + checksum: 10/dd210ba2a2e2482028f027b1156789744aadbfd773a6c9dd8e4e8001930d5af82382abe19a69240307b1d8003222ce6b0542935038313434b900e351914fc15f languageName: node linkType: hard @@ -20088,12 +17926,12 @@ __metadata: linkType: hard "aggregate-error@npm:^4.0.0": - version: 4.0.0 - resolution: "aggregate-error@npm:4.0.0" + version: 4.0.1 + resolution: "aggregate-error@npm:4.0.1" dependencies: clean-stack: "npm:^4.0.0" indent-string: "npm:^5.0.0" - checksum: 10/586397769e25fc5c2da5995c736f11ba83adf0bbc5f72c7101ea38e795458fd7b497f672318119218b4d3b1f8b8d3001417cebe9de55b5467af5cbcbff4befa3 + checksum: 10/bb3ffdfd13447800fff237c2cba752c59868ee669104bb995dfbbe0b8320e967d679e683dabb640feb32e4882d60258165cde0baafc4cd467cc7d275a13ad6b5 languageName: node linkType: hard @@ -20164,7 +18002,7 @@ __metadata: languageName: node linkType: hard -"ajv-keywords@npm:^5.0.0, ajv-keywords@npm:^5.1.0": +"ajv-keywords@npm:^5.1.0": version: 5.1.0 resolution: "ajv-keywords@npm:5.1.0" dependencies: @@ -20175,7 +18013,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.12.0, ajv@npm:^8.11.0, ajv@npm:^8.6.0, ajv@npm:^8.6.3": +"ajv@npm:8.12.0": version: 8.12.0 resolution: "ajv@npm:8.12.0" dependencies: @@ -20187,7 +18025,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.17.1, ajv@npm:^8.10.0, ajv@npm:^8.14.0, ajv@npm:^8.9.0": +"ajv@npm:8.17.1, ajv@npm:^8.0.0, ajv@npm:^8.10.0, ajv@npm:^8.11.0, ajv@npm:^8.14.0, ajv@npm:^8.6.0, ajv@npm:^8.6.3, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -20221,7 +18059,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.11.0, ajv@npm:^6.12.2, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.10.0, ajv@npm:^6.12.2, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -20233,30 +18071,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.0": - version: 8.10.0 - resolution: "ajv@npm:8.10.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/19f265a0895d1156cb13cb22a973cfce5587718b56c7e0141d8d60c1e7a016eb698aecffca158e06d2bac6d199d86c803a7ad686ba61a38e50a9e2e93894209b - languageName: node - linkType: hard - -"ajv@npm:^8.8.0": - version: 8.11.0 - resolution: "ajv@npm:8.11.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/aa0dfd6cebdedde8e77747e84e7b7c55921930974b8547f54b4156164ff70445819398face32dafda4bd4c61bbc7513d308d4c2bf769f8ea6cb9c8449f9faf54 - languageName: node - linkType: hard - "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -20266,14 +18080,14 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:4.1.1, ansi-colors@npm:^4.1.1": +"ansi-colors@npm:4.1.1": version: 4.1.1 resolution: "ansi-colors@npm:4.1.1" checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 languageName: node linkType: hard -"ansi-colors@npm:4.1.3, ansi-colors@npm:^4.1.3": +"ansi-colors@npm:4.1.3, ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: 10/43d6e2fc7b1c6e4dc373de708ee76311ec2e0433e7e8bd3194e7ff123ea6a747428fc61afdcf5969da5be3a5f0fd054602bec56fc0ebe249ce2fcde6e649e3c2 @@ -20321,6 +18135,15 @@ __metadata: languageName: node linkType: hard +"ansi-html@npm:>=0.0.8": + version: 0.0.9 + resolution: "ansi-html@npm:0.0.9" + bin: + ansi-html: bin/ansi-html + checksum: 10/3e83fae364d323d9c453f74a21aa29da68ae152e996c66de45a49a445ea362c4e2e9abce0069558239ff23e3d6ae73b5d27993d631382aa83d85f44b687e0aa1 + languageName: node + linkType: hard + "ansi-regex@npm:^2.0.0": version: 2.1.1 resolution: "ansi-regex@npm:2.1.1" @@ -20350,9 +18173,9 @@ __metadata: linkType: hard "ansi-regex@npm:^6.0.1": - version: 6.0.1 - resolution: "ansi-regex@npm:6.0.1" - checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + version: 6.1.0 + resolution: "ansi-regex@npm:6.1.0" + checksum: 10/495834a53b0856c02acd40446f7130cb0f8284f4a39afdab20d5dc42b2e198b1196119fe887beed8f9055c4ff2055e3b2f6d4641d0be018cdfb64fedf6fc1aac languageName: node linkType: hard @@ -20423,7 +18246,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.0.0": +"anymatch@npm:^3.0.0, anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": version: 3.1.3 resolution: "anymatch@npm:3.1.3" dependencies: @@ -20433,16 +18256,6 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": - version: 3.1.2 - resolution: "anymatch@npm:3.1.2" - dependencies: - normalize-path: "npm:^3.0.0" - picomatch: "npm:^2.0.4" - checksum: 10/985163db2292fac9e5a1e072bf99f1b5baccf196e4de25a0b0b81865ebddeb3b3eb4480734ef0a2ac8c002845396b91aa89121f5b84f93981a4658164a9ec6e9 - languageName: node - linkType: hard - "apexcharts@npm:3.45.2": version: 3.45.2 resolution: "apexcharts@npm:3.45.2" @@ -20486,7 +18299,7 @@ __metadata: languageName: node linkType: hard -"apollo-server-core@npm:^3.12.0": +"apollo-server-core@npm:^3.13.0": version: 3.13.0 resolution: "apollo-server-core@npm:3.13.0" dependencies: @@ -20537,9 +18350,9 @@ __metadata: languageName: node linkType: hard -"apollo-server-express@npm:^3.12.0": - version: 3.12.0 - resolution: "apollo-server-express@npm:3.12.0" +"apollo-server-express@npm:^3.13.0": + version: 3.13.0 + resolution: "apollo-server-express@npm:3.13.0" dependencies: "@types/accepts": "npm:^1.3.5" "@types/body-parser": "npm:1.19.2" @@ -20547,7 +18360,7 @@ __metadata: "@types/express": "npm:4.17.14" "@types/express-serve-static-core": "npm:4.17.31" accepts: "npm:^1.3.5" - apollo-server-core: "npm:^3.12.0" + apollo-server-core: "npm:^3.13.0" apollo-server-types: "npm:^3.8.0" body-parser: "npm:^1.19.0" cors: "npm:^2.8.5" @@ -20555,7 +18368,7 @@ __metadata: peerDependencies: express: ^4.17.1 graphql: ^15.3.0 || ^16.0.0 - checksum: 10/93bbf8967d3addb01bf1821a6db83c390f56380db46160aedfa1dc25200503915aa58cea6022bf582ab45fd30788340a1b9578175059b837eebbc8e7acf313f2 + checksum: 10/0699c87d7016e31c1a3c30bc790820e32337d6269439b7817388459d5001ca018556005ec7982a7c414898ec5122b384be102eac5df70fd2df703989eb9d2ab5 languageName: node linkType: hard @@ -20585,16 +18398,16 @@ __metadata: linkType: hard "apollo-server@npm:^3.11.0": - version: 3.12.0 - resolution: "apollo-server@npm:3.12.0" + version: 3.13.0 + resolution: "apollo-server@npm:3.13.0" dependencies: "@types/express": "npm:4.17.14" - apollo-server-core: "npm:^3.12.0" - apollo-server-express: "npm:^3.12.0" + apollo-server-core: "npm:^3.13.0" + apollo-server-express: "npm:^3.13.0" express: "npm:^4.17.1" peerDependencies: graphql: ^15.3.0 || ^16.0.0 - checksum: 10/94aa09fb908840dc56e014c3dec178272555c0e2c73b7b22e030e67b2e6ed46c3c49a0fd542a89cc63c9c11ef390b288546d0ac59623fb220301f0bae93b88f7 + checksum: 10/85d271f4abf78545f018df72a337a47980dc6fe70fcb2a632b66ccb42d33713830d6a96e31ac52ac8bca6188bd4e56215a57cc0783190fa6f2a5554a8368709b languageName: node linkType: hard @@ -20664,12 +18477,12 @@ __metadata: linkType: hard "are-we-there-yet@npm:^3.0.0": - version: 3.0.0 - resolution: "are-we-there-yet@npm:3.0.0" + version: 3.0.1 + resolution: "are-we-there-yet@npm:3.0.1" dependencies: delegates: "npm:^1.0.0" readable-stream: "npm:^3.6.0" - checksum: 10/7266eee19d0be9dd8e58b63cfb1e1ad45945125fac1e75f00237b55960891bf3bb0be291757a8d9dcf1dbfacfb3802d3eb3f9a064084a6a70a61fe0571f9318f + checksum: 10/390731720e1bf9ed5d0efc635ea7df8cbc4c90308b0645a932f06e8495a0bf1ecc7987d3b97e805f62a17d6c4b634074b25200aa4d149be2a7b17250b9744bc4 languageName: node linkType: hard @@ -20719,12 +18532,10 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.0.0, aria-query@npm:^5.1.3": - version: 5.3.0 - resolution: "aria-query@npm:5.3.0" - dependencies: - dequal: "npm:^2.0.3" - checksum: 10/c3e1ed127cc6886fea4732e97dd6d3c3938e64180803acfb9df8955517c4943760746ffaf4020ce8f7ffaa7556a3b5f85c3769a1f5ca74a1288e02d042f9ae4e +"aria-query@npm:^5.0.0, aria-query@npm:^5.3.2": + version: 5.3.2 + resolution: "aria-query@npm:5.3.2" + checksum: 10/b2fe9bc98bd401bc322ccb99717c1ae2aaf53ea0d468d6e7aebdc02fac736e4a99b46971ee05b783b08ade23c675b2d8b60e4a1222a95f6e27bc4d2a0bfdcc03 languageName: node linkType: hard @@ -20758,17 +18569,7 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "array-buffer-byte-length@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - is-array-buffer: "npm:^3.0.1" - checksum: 10/044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.1": +"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -20799,13 +18600,6 @@ __metadata: languageName: node linkType: hard -"array-flatten@npm:^2.1.2": - version: 2.1.2 - resolution: "array-flatten@npm:2.1.2" - checksum: 10/e8988aac1fbfcdaae343d08c9a06a6fddd2c6141721eeeea45c3cf523bf4431d29a46602929455ed548c7a3e0769928cdc630405427297e7081bd118fdec9262 - languageName: node - linkType: hard - "array-from@npm:^2.1.1": version: 2.1.1 resolution: "array-from@npm:2.1.1" @@ -20820,29 +18614,17 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.6": - version: 3.1.6 - resolution: "array-includes@npm:3.1.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - get-intrinsic: "npm:^1.1.3" - is-string: "npm:^1.0.7" - checksum: 10/a7168bd16821ec76b95a8f50f73076577a7cbd6c762452043d2b978c8a5fa4afe4f98a025d6f1d5c971b8d0b440b4ee73f6a57fc45382c858b8e17c275015428 - languageName: node - linkType: hard - -"array-includes@npm:^3.1.7": - version: 3.1.7 - resolution: "array-includes@npm:3.1.7" +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.7, array-includes@npm:^3.1.8": + version: 3.1.8 + resolution: "array-includes@npm:3.1.8" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" is-string: "npm:^1.0.7" - checksum: 10/856a8be5d118967665936ad33ff3b07adfc50b06753e596e91fb80c3da9b8c022e92e3cc6781156d6ad95db7109b9f603682c7df2d6a529ed01f7f6b39a4a360 + checksum: 10/290b206c9451f181fb2b1f79a3bf1c0b66bb259791290ffbada760c79b284eef6f5ae2aeb4bcff450ebc9690edd25732c4c73a3c2b340fcc0f4563aed83bf488 languageName: node linkType: hard @@ -20892,27 +18674,15 @@ __metadata: linkType: hard "array.prototype.every@npm:^1.1.4": - version: 1.1.4 - resolution: "array.prototype.every@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - is-string: "npm:^1.0.7" - checksum: 10/1c036bfbdc51aa364d0a98cda80f794c11e56414a3c8e51c89ac30b21faff93dbe860cf4394267b09686ecd3fff046a399ecd4524491a5f6a81db08f8852bccb - languageName: node - linkType: hard - -"array.prototype.filter@npm:^1.0.3": - version: 1.0.3 - resolution: "array.prototype.filter@npm:1.0.3" + version: 1.1.6 + resolution: "array.prototype.every@npm:1.1.6" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-array-method-boxes-properly: "npm:^1.0.0" + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.0" + es-object-atoms: "npm:^1.0.0" is-string: "npm:^1.0.7" - checksum: 10/3da2189afb00f95559cc73fc3c50f17a071a65bb705c0b2f2e2a2b2142781215b622442368c8b4387389b6ab251adf09ad347f9a8a4cf29d24404cc5ea1e295c + checksum: 10/0c6828ae93bc12329a5cd47698e44b85b97df2483a6849036124a6f4ab9e8caad3df74014ad4055b7e72ee59ccd32efa21b2aa375cfe939d055ca2037a638170 languageName: node linkType: hard @@ -20929,45 +18699,35 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.2": - version: 1.2.2 - resolution: "array.prototype.findlastindex@npm:1.2.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.1.3" - checksum: 10/a97b6dad48ac27bccb1a062c1d9dec6726bcedf34d6be2ee7b9ed9a8db519df6d278b8011c2d6c49ed70802488f23ab10c0142606ef58e48dbc0a035a810318e - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.4 - resolution: "array.prototype.findlastindex@npm:1.2.4" +"array.prototype.findlast@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlast@npm:1.2.5" dependencies: - call-bind: "npm:^1.0.5" + call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" + es-abstract: "npm:^1.23.2" es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" es-shim-unscopables: "npm:^1.0.2" - checksum: 10/12d7de8da619065b9d4c40550d11c13f2fbbc863c4270ef01d022f49ef16fbe9022441ee9d60b1e952853c661dd4b3e05c21e4348d4631c6d93ddf802a252296 + checksum: 10/7dffcc665aa965718ad6de7e17ac50df0c5e38798c0a5bf9340cf24feb8594df6ec6f3fcbe714c1577728a1b18b5704b15669474b27bceeca91ef06ce2a23c31 languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.1": - version: 1.3.1 - resolution: "array.prototype.flat@npm:1.3.1" +"array.prototype.findlastindex@npm:^1.2.3, array.prototype.findlastindex@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/787bd3e93887b1c12cfed018864cb819a4fe361728d4aadc7b401b0811cf923121881cca369557432529ffa803a463f01e37eaa4b52e4c13bc574c438cd615cb + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/7c5c821f357cd53ab6cc305de8086430dd8d7a2485db87b13f843e868055e9582b1fd338f02338f67fc3a1603ceaf9610dd2a470b0b506f9d18934780f95b246 languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.2": +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flat@npm:1.3.2" dependencies: @@ -20979,18 +18739,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.1": - version: 1.3.1 - resolution: "array.prototype.flatmap@npm:1.3.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/f1f3d8e0610afce06a8622295b4843507dfc2fbbd2c2b2a8d541d9f42871747393c3099d630a3f8266ca086b97b089687db64cd86b6eb7e270ebc8f767eec9fc - languageName: node - linkType: hard - "array.prototype.flatmap@npm:^1.3.2": version: 1.3.2 resolution: "array.prototype.flatmap@npm:1.3.2" @@ -21004,42 +18752,30 @@ __metadata: linkType: hard "array.prototype.reduce@npm:^1.0.6": - version: 1.0.6 - resolution: "array.prototype.reduce@npm:1.0.6" + version: 1.0.7 + resolution: "array.prototype.reduce@npm:1.0.7" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" es-array-method-boxes-properly: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" is-string: "npm:^1.0.7" - checksum: 10/991989a3edb9716a3e3c6feb67a09abc8317e42535f1560156784e920f521418fff43abec57d14684015ef2d3f134830962b47b3d0be0c8a5dd68d8d7c65b9c1 - languageName: node - linkType: hard - -"array.prototype.tosorted@npm:^1.1.1": - version: 1.1.1 - resolution: "array.prototype.tosorted@npm:1.1.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.1.3" - checksum: 10/23e86074d0dda9260aaa137ec45ae5a8196916ee3f256e41665381f120fdb5921bd84ad93eeba8d0234e5cd355093049585167ba2307fde340e5cee15b12415d + checksum: 10/3a4fa56cf5843d821e97680861c8edfdfe6684a7f7cd1145ed611b5fa611fd62d1b149a438ae24ae884c843876a6539b67fbcacdd3276f89731eee9415dc9012 languageName: node linkType: hard -"arraybuffer.prototype.slice@npm:^1.0.1": - version: 1.0.1 - resolution: "arraybuffer.prototype.slice@npm:1.0.1" +"array.prototype.tosorted@npm:^1.1.4": + version: 1.1.4 + resolution: "array.prototype.tosorted@npm:1.1.4" dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - get-intrinsic: "npm:^1.2.1" - is-array-buffer: "npm:^3.0.2" - is-shared-array-buffer: "npm:^1.0.2" - checksum: 10/e3e9b2a3e988ebfeddce4c7e8f69df730c9e48cb04b0d40ff0874ce3d86b3d1339dd520ffde5e39c02610bc172ecfbd4bc93324b1cabd9554c44a56b131ce0ce + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.3" + es-errors: "npm:^1.3.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/874694e5d50e138894ff5b853e639c29b0aa42bbd355acda8e8e9cd337f1c80565f21edc15e8c727fa4c0877fd9d8783c575809e440cc4d2d19acaa048bf967d languageName: node linkType: hard @@ -21105,7 +18841,7 @@ __metadata: languageName: node linkType: hard -"asn1.js@npm:^5.0.1, asn1.js@npm:^5.2.0": +"asn1.js@npm:^5.0.1": version: 5.4.1 resolution: "asn1.js@npm:5.4.1" dependencies: @@ -21117,7 +18853,7 @@ __metadata: languageName: node linkType: hard -"asn1@npm:^0.2.4, asn1@npm:^0.2.6, asn1@npm:~0.2.3": +"asn1@npm:^0.2.6, asn1@npm:~0.2.3": version: 0.2.6 resolution: "asn1@npm:0.2.6" dependencies: @@ -21126,7 +18862,7 @@ __metadata: languageName: node linkType: hard -"asn1js@npm:^3.0.1, asn1js@npm:^3.0.5": +"asn1js@npm:^3.0.5": version: 3.0.5 resolution: "asn1js@npm:3.0.5" dependencies: @@ -21145,14 +18881,15 @@ __metadata: linkType: hard "assert@npm:^2.0.0": - version: 2.0.0 - resolution: "assert@npm:2.0.0" + version: 2.1.0 + resolution: "assert@npm:2.1.0" dependencies: - es6-object-assign: "npm:^1.1.0" - is-nan: "npm:^1.2.1" - object-is: "npm:^1.0.1" - util: "npm:^0.12.0" - checksum: 10/5bd5e80a0dc5fce9ac812254ad39bcec8c224878705e5021a1a0ae84e2c30b980f90584ef544a5f6b1cd79edb002e80972367731260dac723c7a6f76e0fcd2ea + call-bind: "npm:^1.0.2" + is-nan: "npm:^1.3.2" + object-is: "npm:^1.1.5" + object.assign: "npm:^4.1.4" + util: "npm:^0.12.5" + checksum: 10/6b9d813c8eef1c0ac13feac5553972e4bd180ae16000d4eb5c0ded2489188737c75a5aacefc97a985008b37502f62fe1bad34da1a7481a54bbfabec3964c8aa7 languageName: node linkType: hard @@ -21188,10 +18925,10 @@ __metadata: languageName: node linkType: hard -"ast-types-flow@npm:^0.0.7": - version: 0.0.7 - resolution: "ast-types-flow@npm:0.0.7" - checksum: 10/663b90e99b56ee2d7f736a6b6fff8b3c5404f28fa1860bb8d83ee5a9bff9e687520d0d6d9db6edff5a34fd4d3c0c11a3beb1cf75e43c9a880cca04371cc99808 +"ast-types-flow@npm:^0.0.8": + version: 0.0.8 + resolution: "ast-types-flow@npm:0.0.8" + checksum: 10/85a1c24af4707871c27cfe456bd2ff7fcbe678f3d1c878ac968c9557735a171a17bdcc8c8f903ceab3fc3c49d5b3da2194e6ab0a6be7fec0e133fa028f21ba1b languageName: node linkType: hard @@ -21250,7 +18987,7 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.6.0, async@npm:^2.6.1": +"async@npm:^2.0.1, async@npm:^2.1.2, async@npm:^2.4.0, async@npm:^2.6.0, async@npm:^2.6.1, async@npm:^2.6.4": version: 2.6.4 resolution: "async@npm:2.6.4" dependencies: @@ -21259,43 +18996,13 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.0.0": - version: 3.2.4 - resolution: "async@npm:3.2.4" - checksum: 10/bebb5dc2258c45b83fa1d3be179ae0eb468e1646a62d443c8d60a45e84041b28fccebe1e2d1f234bfc3dcad44e73dcdbf4ba63d98327c9f6556e3dbd47c2ae8b - languageName: node - linkType: hard - -"async@npm:^3.1.0": +"async@npm:^3.0.0, async@npm:^3.1.0, async@npm:^3.2.3": version: 3.2.6 resolution: "async@npm:3.2.6" checksum: 10/cb6e0561a3c01c4b56a799cc8bab6ea5fef45f069ab32500b6e19508db270ef2dffa55e5aed5865c5526e9907b1f8be61b27530823b411ffafb5e1538c86c368 languageName: node linkType: hard -"async@npm:^3.2.3": - version: 3.2.3 - resolution: "async@npm:3.2.3" - checksum: 10/1265841be4f461fb17a8ed1c6ac1d427c57b33fea999cefdcee588f08f218886fd41d48da6943e4dca6a8ccd76d4536b6901a28927588ff671ce0ed61ac415a2 - languageName: node - linkType: hard - -"async@npm:~1.0.0": - version: 1.0.0 - resolution: "async@npm:1.0.0" - checksum: 10/c5a0ece08e65afd77f8f94ccf67350dec41fe99022794396e938b10350c9399fd8ff37d3a91d8333d15d6b96bfc5bec16d92da866aa43af8114989c037e9fb74 - languageName: node - linkType: hard - -"asynciterator.prototype@npm:^1.0.0": - version: 1.0.0 - resolution: "asynciterator.prototype@npm:1.0.0" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10/e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -21377,31 +19084,24 @@ __metadata: linkType: hard "autoprefixer@npm:^10.4.13": - version: 10.4.15 - resolution: "autoprefixer@npm:10.4.15" + version: 10.4.20 + resolution: "autoprefixer@npm:10.4.20" dependencies: - browserslist: "npm:^4.21.10" - caniuse-lite: "npm:^1.0.30001520" - fraction.js: "npm:^4.2.0" + browserslist: "npm:^4.23.3" + caniuse-lite: "npm:^1.0.30001646" + fraction.js: "npm:^4.3.7" normalize-range: "npm:^0.1.2" - picocolors: "npm:^1.0.0" + picocolors: "npm:^1.0.1" postcss-value-parser: "npm:^4.2.0" peerDependencies: postcss: ^8.1.0 bin: autoprefixer: bin/autoprefixer - checksum: 10/99ab82461d33bb79318dbf26c76d207eab8bf98680d8981aeddf7af4208fd57579b4c68dcf576b1d1baba8bd5410665b9406eac468f8119bd42e11b9ff0074b7 + checksum: 10/d3c4b562fc4af2393623a0207cc336f5b9f94c4264ae1c316376904c279702ce2b12dc3f27205f491195d1e29bb52ffc269970ceb0f271f035fadee128a273f7 languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.5": - version: 1.0.5 - resolution: "available-typed-arrays@npm:1.0.5" - checksum: 10/4d4d5e86ea0425696f40717882f66a570647b94ac8d273ddc7549a9b61e5da099e149bf431530ccbd776bd74e02039eb8b5edf426e3e2211ee61af16698a9064 - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.6, available-typed-arrays@npm:^1.0.7": +"available-typed-arrays@npm:^1.0.7": version: 1.0.7 resolution: "available-typed-arrays@npm:1.0.7" dependencies: @@ -21445,36 +19145,34 @@ __metadata: linkType: hard "aws4@npm:^1.8.0": - version: 1.11.0 - resolution: "aws4@npm:1.11.0" - checksum: 10/54886f07b3f9555f7f3ae9fb2aef7abbac302e892263ec4d9901f4502e667bb302a0639672f6bc8453033102ddd2512b79886a7de417dc0c24ecce003a888297 + version: 1.13.2 + resolution: "aws4@npm:1.13.2" + checksum: 10/290b9f84facbad013747725bfd8b4c42d0b3b04b5620d8418f0219832ef95a7dc597a4af7b1589ae7fce18bacde96f40911c3cda36199dd04d9f8e01f72fa50a languageName: node linkType: hard -"axe-core@npm:^4.6.2": - version: 4.7.2 - resolution: "axe-core@npm:4.7.2" - checksum: 10/1b94fcbe203296fc7174992a3d70dbcd477d88b933afa045aaffa1704fe63d8da8945e4b38fc576f9c7384abeb353e2d6607ab54d25b5c90b255ef2244bda29a +"axe-core@npm:^4.10.0": + version: 4.10.2 + resolution: "axe-core@npm:4.10.2" + checksum: 10/a69423b2ff16c15922c4ea7cf9cc5112728a2817bbe0f2cc212248d648885ffd1ba554e3a341dfc289cd9e67fc0d06f333b5c6837c5c38ca6652507381216fc1 languageName: node linkType: hard "axios@npm:>=0.27.2": - version: 1.7.2 - resolution: "axios@npm:1.7.2" + version: 1.7.7 + resolution: "axios@npm:1.7.7" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f + checksum: 10/7f875ea13b9298cd7b40fd09985209f7a38d38321f1118c701520939de2f113c4ba137832fe8e3f811f99a38e12c8225481011023209a77b0c0641270e20cde1 languageName: node linkType: hard -"axobject-query@npm:^3.1.1": - version: 3.2.1 - resolution: "axobject-query@npm:3.2.1" - dependencies: - dequal: "npm:^2.0.3" - checksum: 10/675af2548ed4ece75ad6d50cc0473cfdec7579eac77ec9861e7088d03ffb171aa697b70d2877423bee2ce16460ef62c698c6442a105612cc015719e8ea06b0bd +"axobject-query@npm:^4.1.0": + version: 4.1.0 + resolution: "axobject-query@npm:4.1.0" + checksum: 10/e275dea9b673f71170d914f2d2a18be5d57d8d29717b629e7fedd907dcc2ebdc7a37803ff975874810bd423f222f299c020d28fde40a146f537448bf6bfecb6e languageName: node linkType: hard @@ -21525,20 +19223,20 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.6.2": - version: 29.6.2 - resolution: "babel-jest@npm:29.6.2" +"babel-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "babel-jest@npm:29.7.0" dependencies: - "@jest/transform": "npm:^29.6.2" + "@jest/transform": "npm:^29.7.0" "@types/babel__core": "npm:^7.1.14" babel-plugin-istanbul: "npm:^6.1.1" - babel-preset-jest: "npm:^29.5.0" + babel-preset-jest: "npm:^29.6.3" chalk: "npm:^4.0.0" graceful-fs: "npm:^4.2.9" slash: "npm:^3.0.0" peerDependencies: "@babel/core": ^7.8.0 - checksum: 10/d1860f1c0ede72c3c246906e7ded535e25b1f8b4ac39a74e6d555ec7dd5f0ae7541cf0bc172588f9fed4a11a64eed9eda9688d23403577b36a9e97dc609b9b0a + checksum: 10/8a0953bd813b3a8926008f7351611055548869e9a53dd36d6e7e96679001f71e65fd7dbfe253265c3ba6a4e630dc7c845cf3e78b17d758ef1880313ce8fba258 languageName: node linkType: hard @@ -21556,17 +19254,17 @@ __metadata: linkType: hard "babel-loader@npm:^8.2.3": - version: 8.3.0 - resolution: "babel-loader@npm:8.3.0" + version: 8.4.1 + resolution: "babel-loader@npm:8.4.1" dependencies: find-cache-dir: "npm:^3.3.1" - loader-utils: "npm:^2.0.0" + loader-utils: "npm:^2.0.4" make-dir: "npm:^3.1.0" schema-utils: "npm:^2.6.5" peerDependencies: "@babel/core": ^7.0.0 webpack: ">=2" - checksum: 10/e775e96f605f10d68adc693403ccda2470e856cc52e6017f3621c17dade003d0fc53facfce7b4ada02273a1c0a6a48167f798cc81b73110585d74bf890b39bd5 + checksum: 10/b54ae3796a351e5b5186cd7a8d53a902b679a33a187424c2858e385850142139a4343524c9fddd0eb4356250e51e67e47a9efeef79d01e132976c406212cba1d languageName: node linkType: hard @@ -21595,15 +19293,15 @@ __metadata: languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^29.5.0": - version: 29.5.0 - resolution: "babel-plugin-jest-hoist@npm:29.5.0" +"babel-plugin-jest-hoist@npm:^29.6.3": + version: 29.6.3 + resolution: "babel-plugin-jest-hoist@npm:29.6.3" dependencies: "@babel/template": "npm:^7.3.3" "@babel/types": "npm:^7.3.3" "@types/babel__core": "npm:^7.1.14" "@types/babel__traverse": "npm:^7.0.6" - checksum: 10/18066c177da855f478178bd2a48fa1c131d31f15c04af8c732bb4c7eb5c952fde8ac9b11133e5ddd5b74aed92c6a833fbfde51cc5dec1f7169bf865b548da680 + checksum: 10/9bfa86ec4170bd805ab8ca5001ae50d8afcb30554d236ba4a7ffc156c1a92452e220e4acbd98daefc12bf0216fccd092d0a2efed49e7e384ec59e0597a926d65 languageName: node linkType: hard @@ -21627,33 +19325,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.4": - version: 0.4.5 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.5" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.4.2" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/75552d49f7d874e2e9a082d19e3ce9cc95998abadbdc589e5af7de64f5088059863eb194989cfcfefc99623925c46e273bd49333f6aae58f6fff59696279132b - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.4.5, babel-plugin-polyfill-corejs2@npm:^0.4.6": - version: 0.4.6 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.6" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.4.3" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/736b1bb8e570be029f941a374c769972af870c96b5c324a5387c6b6994aabdad045ce560c530038c8626f02ec70f711ad7445f2572c32ba81fa0e13402cc23f8 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.4.8": +"babel-plugin-polyfill-corejs2@npm:^0.4.10, babel-plugin-polyfill-corejs2@npm:^0.4.4, babel-plugin-polyfill-corejs2@npm:^0.4.8": version: 0.4.11 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.11" dependencies: @@ -21666,27 +19338,27 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.8.2": - version: 0.8.3 - resolution: "babel-plugin-polyfill-corejs3@npm:0.8.3" +"babel-plugin-polyfill-corejs3@npm:^0.10.6": + version: 0.10.6 + resolution: "babel-plugin-polyfill-corejs3@npm:0.10.6" dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.2" - core-js-compat: "npm:^3.31.0" + "@babel/helper-define-polyfill-provider": "npm:^0.6.2" + core-js-compat: "npm:^3.38.0" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/95e57300341c52b4954b8c8d9d7dd6f9a5bd26f3ac6f67180f146398e5ea5ec5a8496a79d222e147a3e61b698ce4176677a194397ac9887bfa8072d2d7e4e29c + checksum: 10/360ac9054a57a18c540059dc627ad5d84d15f79790cb3d84d19a02eec7188c67d08a07db789c3822d6f5df22d918e296d1f27c4055fec2e287d328f09ea8a78a languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.8.3, babel-plugin-polyfill-corejs3@npm:^0.8.5": - version: 0.8.5 - resolution: "babel-plugin-polyfill-corejs3@npm:0.8.5" +"babel-plugin-polyfill-corejs3@npm:^0.8.2": + version: 0.8.7 + resolution: "babel-plugin-polyfill-corejs3@npm:0.8.7" dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.3" - core-js-compat: "npm:^3.32.2" + "@babel/helper-define-polyfill-provider": "npm:^0.4.4" + core-js-compat: "npm:^3.33.1" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/5c2ac3615bd064f294a0b36bf6a1939995ec510173602e317fb18b1c015d31f46e2dd885faa3376e4da22785a515e5ba37e069f0008e5eea830d2fe3b0e66a27 + checksum: 10/defbc6de3d309c9639dd31223b5011707fcc0384037ac5959a1aefe16eb314562e1c1e5cfbce0af14a220d639ef92dfe5baf66664e9e6054656aca2841677622 languageName: node linkType: hard @@ -21702,36 +19374,25 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.5.1, babel-plugin-polyfill-regenerator@npm:^0.5.2": - version: 0.5.2 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.2" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/d962200f604016a9a09bc9b4aaf60a3db7af876bb65bcefaeac04d44ac9d9ec4037cf24ce117760cc141d7046b6394c7eb0320ba9665cb4a2ee64df2be187c93 - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.5.3": - version: 0.5.3 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.3" +"babel-plugin-polyfill-regenerator@npm:^0.5.1, babel-plugin-polyfill-regenerator@npm:^0.5.5": + version: 0.5.5 + resolution: "babel-plugin-polyfill-regenerator@npm:0.5.5" dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.4.3" + "@babel/helper-define-polyfill-provider": "npm:^0.5.0" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/2bb546582cda1870d19e646a7183baeb2cccd56e0ef3e4eaeabd28e120daf17cb87399194a9ccdcf32506bcaa68d23e73440fc8ab990a7a0f8c5a77c12d5d4bc + checksum: 10/3a9b4828673b23cd648dcfb571eadcd9d3fadfca0361d0a7c6feeb5a30474e92faaa49f067a6e1c05e49b6a09812879992028ff3ef3446229ff132d6e1de7eb6 languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.5.5": - version: 0.5.5 - resolution: "babel-plugin-polyfill-regenerator@npm:0.5.5" +"babel-plugin-polyfill-regenerator@npm:^0.6.1": + version: 0.6.2 + resolution: "babel-plugin-polyfill-regenerator@npm:0.6.2" dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.5.0" + "@babel/helper-define-polyfill-provider": "npm:^0.6.2" peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10/3a9b4828673b23cd648dcfb571eadcd9d3fadfca0361d0a7c6feeb5a30474e92faaa49f067a6e1c05e49b6a09812879992028ff3ef3446229ff132d6e1de7eb6 + checksum: 10/150233571072b6b3dfe946242da39cba8587b7f908d1c006f7545fc88b0e3c3018d445739beb61e7a75835f0c2751dbe884a94ff9b245ec42369d9267e0e1b3f languageName: node linkType: hard @@ -21743,24 +19404,27 @@ __metadata: linkType: hard "babel-preset-current-node-syntax@npm:^1.0.0": - version: 1.0.1 - resolution: "babel-preset-current-node-syntax@npm:1.0.1" + version: 1.1.0 + resolution: "babel-preset-current-node-syntax@npm:1.1.0" dependencies: "@babel/plugin-syntax-async-generators": "npm:^7.8.4" "@babel/plugin-syntax-bigint": "npm:^7.8.3" - "@babel/plugin-syntax-class-properties": "npm:^7.8.3" - "@babel/plugin-syntax-import-meta": "npm:^7.8.3" + "@babel/plugin-syntax-class-properties": "npm:^7.12.13" + "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" + "@babel/plugin-syntax-import-attributes": "npm:^7.24.7" + "@babel/plugin-syntax-import-meta": "npm:^7.10.4" "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.8.3" + "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" + "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/94561959cb12bfa80867c9eeeace7c3d48d61707d33e55b4c3fdbe82fc745913eb2dbfafca62aef297421b38aadcb58550e5943f50fbcebbeefd70ce2bed4b74 + checksum: 10/46331111ae72b7121172fd9e6a4a7830f651ad44bf26dbbf77b3c8a60a18009411a3eacb5e72274004290c110371230272109957d5224d155436b4794ead2f1b languageName: node linkType: hard @@ -21776,15 +19440,15 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^29.5.0": - version: 29.5.0 - resolution: "babel-preset-jest@npm:29.5.0" +"babel-preset-jest@npm:^29.6.3": + version: 29.6.3 + resolution: "babel-preset-jest@npm:29.6.3" dependencies: - babel-plugin-jest-hoist: "npm:^29.5.0" + babel-plugin-jest-hoist: "npm:^29.6.3" babel-preset-current-node-syntax: "npm:^1.0.0" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/5566ca2762766c9319b4973d018d2fa08c0fcf6415c72cc54f4c8e7199e851ea8f5e6c6730f03ed7ed44fc8beefa959dd15911f2647dee47c615ff4faeddb1ad + checksum: 10/aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb languageName: node linkType: hard @@ -21837,11 +19501,11 @@ __metadata: linkType: hard "base-x@npm:^3.0.2, base-x@npm:^3.0.8": - version: 3.0.9 - resolution: "base-x@npm:3.0.9" + version: 3.0.10 + resolution: "base-x@npm:3.0.10" dependencies: safe-buffer: "npm:^5.0.1" - checksum: 10/957101d6fd09e1903e846fd8f69fd7e5e3e50254383e61ab667c725866bec54e5ece5ba49ce385128ae48f9ec93a26567d1d5ebb91f4d56ef4a9cc0d5a5481e8 + checksum: 10/52307739559e81d9980889de2359cb4f816cc0eb9a463028fa3ab239ab913d9044a1b47b4520f98e68453df32a457b8ba58b8d0ee7e757fc3fb971f3fa7a1482 languageName: node linkType: hard @@ -21945,14 +19609,15 @@ __metadata: linkType: hard "bfj@npm:^7.0.2": - version: 7.0.2 - resolution: "bfj@npm:7.0.2" + version: 7.1.0 + resolution: "bfj@npm:7.1.0" dependencies: - bluebird: "npm:^3.5.5" - check-types: "npm:^11.1.1" + bluebird: "npm:^3.7.2" + check-types: "npm:^11.2.3" hoopy: "npm:^0.1.4" + jsonpath: "npm:^1.1.1" tryer: "npm:^1.0.1" - checksum: 10/e1040fe6aec2afeb6f6c5231bbbc055616fa99c23c5249c7d20a2919507a69d8fd4d82d2245eca5ee08cbfcd3e70ce817328b8a20acda69af4638f1c11343bc7 + checksum: 10/efe4ca2ce43ef279c0ced8538d7de452bae6d8a552c5a72561c66aa6983aa8e448202af848b63518562750bddbb13af20b026c87633324c38499a044ec965eab languageName: node linkType: hard @@ -21964,9 +19629,9 @@ __metadata: linkType: hard "big-integer@npm:^1.6.51": - version: 1.6.51 - resolution: "big-integer@npm:1.6.51" - checksum: 10/c7a12640901906d6f6b6bdb42a4eaba9578397b6d9a0dd090cf001ec813ff2bfcd441e364068ea0416db6175d2615f8ed19cff7d1a795115bf7c92d44993f991 + version: 1.6.52 + resolution: "big-integer@npm:1.6.52" + checksum: 10/4bc6ae152a96edc9f95020f5fc66b13d26a9ad9a021225a9f0213f7e3dc44269f423aa8c42e19d6ac4a63bb2b22140b95d10be8f9ca7a6d9aa1b22b330d1f514 languageName: node linkType: hard @@ -21978,20 +19643,20 @@ __metadata: linkType: hard "big.js@npm:^6.0.3": - version: 6.2.1 - resolution: "big.js@npm:6.2.1" - checksum: 10/1d4b621451de712cab20464a26f22b2eee5e7daf0ee88c49dfbfa76061ec37cff2257751e8c3fc183c231bcffac2f006e33af930d8f49b03c758890080b76ada + version: 6.2.2 + resolution: "big.js@npm:6.2.2" + checksum: 10/018af3e572780b41536a987c3fc3636efe7d05671e8bf4a6bd22b62316e32f57abfc0fc849732adfd81b00b249f873a5a107e01ab5aa4fc3d42c181cc821bf47 languageName: node linkType: hard "bigint-crypto-utils@npm:^3.0.23": - version: 3.2.2 - resolution: "bigint-crypto-utils@npm:3.2.2" - checksum: 10/e7a3ccd915003f755da94ec709ca42a0aa58e018ff4af2c3381c7ba75b7fab569b7e143bc8ebe7c0ad315713d4987ac076035fcd8223c9fc6dcfba9363f200c4 + version: 3.3.0 + resolution: "bigint-crypto-utils@npm:3.3.0" + checksum: 10/94d10ac9db66b093c7c2beace833ac167b57188c8ac784a7e207ea4f585cf9c2066e5d1f5a1b26cb6ccb7f7be8e38687c79f049b87df07cfdc7bd484aee2390d languageName: node linkType: hard -"bignumber.js@npm:9.1.2, bignumber.js@npm:^9.1.2": +"bignumber.js@npm:9.1.2, bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1, bignumber.js@npm:^9.1.2": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" checksum: 10/d89b8800a987225d2c00dcbf8a69dc08e92aa0880157c851c287b307d31ceb2fc2acb0c62c3e3a3d42b6c5fcae9b004035f13eb4386e56d529d7edac18d5c9d8 @@ -22005,13 +19670,6 @@ __metadata: languageName: node linkType: hard -"bignumber.js@npm:^9.0.0, bignumber.js@npm:^9.0.1": - version: 9.0.2 - resolution: "bignumber.js@npm:9.0.2" - checksum: 10/d270e73abb79a9beffd1347139266c08b9c022f91c5613226ec16a3eba240fabcbc7c597bbecbb43300038c9d94e3674a269784feac0f5b17c8d0b2b17940798 - languageName: node - linkType: hard - "bin-links@npm:^4.0.4": version: 4.0.4 resolution: "bin-links@npm:4.0.4" @@ -22025,9 +19683,9 @@ __metadata: linkType: hard "binary-extensions@npm:^2.0.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: 10/ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 languageName: node linkType: hard @@ -22047,10 +19705,22 @@ __metadata: languageName: node linkType: hard -"bintrees@npm:1.0.1": - version: 1.0.1 - resolution: "bintrees@npm:1.0.1" - checksum: 10/b314eed4540921916c4435e5d9ac90162f64c9fb7b82c26a33fd609a4b9a4cb98a7f4077c622e73d10b0a61a82094088454cecca209f3b7ceb5466ed4cde8a61 +"bintrees@npm:1.0.2": + version: 1.0.2 + resolution: "bintrees@npm:1.0.2" + checksum: 10/071896cea5ea5413316c8436e95799444c208630d5c539edd8a7089fc272fc5d3634aa4a2e4847b28350dda1796162e14a34a0eda53108cc5b3c2ff6a036c1fa + languageName: node + linkType: hard + +"bl@npm:6.0.14": + version: 6.0.14 + resolution: "bl@npm:6.0.14" + dependencies: + "@types/readable-stream": "npm:^4.0.0" + buffer: "npm:^6.0.3" + inherits: "npm:^2.0.4" + readable-stream: "npm:^4.2.0" + checksum: 10/36e96324729b056fc9763121e3688912d465bc7afec2e13a53b858658cbddf4e8a9f6d8ffc4a684a930f3b4e544424ed65c181a3044b3ad49411f6d92e4fe953 languageName: node linkType: hard @@ -22097,28 +19767,35 @@ __metadata: linkType: hard "blakejs@npm:^1.1.0": - version: 1.1.1 - resolution: "blakejs@npm:1.1.1" - checksum: 10/dbda7da6e0ad9bc3cfda1e7763da08ad29a0e7677318236308f0402fd9d692d4a0585f23a04d41b84e42644459cc04c8f9f35c3e89ef6017aca6c4ee775b239b + version: 1.2.1 + resolution: "blakejs@npm:1.2.1" + checksum: 10/0638b1bd058b21892633929c43005aa6a4cc4b2ac5b338a146c3c076622f1b360795bd7a4d1f077c9b01863ed2df0c1504a81c5b520d164179120434847e6cd7 languageName: node linkType: hard "blob-to-it@npm:^2.0.0": - version: 2.0.4 - resolution: "blob-to-it@npm:2.0.4" + version: 2.0.7 + resolution: "blob-to-it@npm:2.0.7" dependencies: browser-readablestream-to-it: "npm:^2.0.0" - checksum: 10/1d88f3eb07ee00033acf25a8787e3271b627d7fbad32df4f1cf6bd7257808e7c7e22854c2e55a1658937995414e1e5fa7e40e954b0606845ee3731ff022938c3 + checksum: 10/16889bb0acd4585f596a3f1b883cd3de4196628493c9c0dcf43f912f0d5dd13d745017fc56ec1bb848b760a95df331f9c0e0d243b781e3d7ab843c3ef4c4cc68 languageName: node linkType: hard -"bluebird@npm:3.7.2, bluebird@npm:^3.4.1, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.5.5": +"bluebird@npm:3.7.2, bluebird@npm:^3.4.1, bluebird@npm:^3.5.0, bluebird@npm:^3.5.2, bluebird@npm:^3.7.2": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 languageName: node linkType: hard +"bluebird@npm:^2.6.2": + version: 2.11.0 + resolution: "bluebird@npm:2.11.0" + checksum: 10/f8271257f248f3a95caa3b54a99c96c91132f6d62c2b2aa367bc63bab6e3b9a240ae6a95d893f70715ef52647af9d4e4afe0a04267c31c94cc5873d2add96a3b + languageName: node + linkType: hard + "bn.js@npm:4.11.6": version: 4.11.6 resolution: "bn.js@npm:4.11.6" @@ -22133,41 +19810,14 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:5.2.1, bn.js@npm:^5.1.3, bn.js@npm:^5.2.1": +"bn.js@npm:5.2.1, bn.js@npm:^5.1.2, bn.js@npm:^5.1.3, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" checksum: 10/7a7e8764d7a6e9708b8b9841b2b3d6019cc154d2fc23716d0efecfe1e16921b7533c6f7361fb05471eab47986c4aa310c270f88e3507172104632ac8df2cfd84 languageName: node linkType: hard -"bn.js@npm:^5.0.0, bn.js@npm:^5.1.2, bn.js@npm:^5.2.0": - version: 5.2.0 - resolution: "bn.js@npm:5.2.0" - checksum: 10/37052dad02242b70e21f59b52642d67521d160239964a7f5653d86d856f9c4936aee229a66b69e6864e020f41e934ede9ddd0f873b23cffee42c132163558c2a - languageName: node - linkType: hard - -"body-parser@npm:1.20.1": - version: 1.20.1 - resolution: "body-parser@npm:1.20.1" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.4" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.1" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/5f8d128022a2fb8b6e7990d30878a0182f300b70e46b3f9d358a9433ad6275f0de46add6d63206da3637c01c3b38b6111a7480f7e7ac2e9f7b989f6133fe5510 - languageName: node - linkType: hard - -"body-parser@npm:1.20.3": +"body-parser@npm:1.20.3, body-parser@npm:^1.10.0, body-parser@npm:^1.16.0, body-parser@npm:^1.18.2, body-parser@npm:^1.19.0": version: 1.20.3 resolution: "body-parser@npm:1.20.3" dependencies: @@ -22187,59 +19837,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:^1.10.0, body-parser@npm:^1.18.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/3cf171b82190cf91495c262b073e425fc0d9e25cc2bf4540d43f7e7bbca27d6a9eae65ca367b6ef3993eea261159d9d2ab37ce444e8979323952e12eb3df319a - languageName: node - linkType: hard - -"body-parser@npm:^1.16.0, body-parser@npm:^1.19.0": - version: 1.20.0 - resolution: "body-parser@npm:1.20.0" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.4" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.10.3" - raw-body: "npm:2.5.1" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10/63fe82c27fdacac51d26665c3d13d4c6e48d1c3e9efe1fbc0fd18801aa9a598ab1023b09298ae4b3d0a7598d55902d793f7fa1b5551da99c16eabfed9b022a51 - languageName: node - linkType: hard - -"bonjour-service@npm:^1.0.11": - version: 1.1.1 - resolution: "bonjour-service@npm:1.1.1" - dependencies: - array-flatten: "npm:^2.1.2" - dns-equal: "npm:^1.0.0" - fast-deep-equal: "npm:^3.1.3" - multicast-dns: "npm:^7.2.5" - checksum: 10/60a14328dff846a66ae5cddbba4f2e2845a4b3cf62f64d93b57808e08e5e1a8e8c4454e37e0e289741706b359a343444ba132957bf53be9e8f5eaebdebb06306 - languageName: node - linkType: hard - -"bonjour-service@npm:^1.2.1": +"bonjour-service@npm:^1.0.11, bonjour-service@npm:^1.2.1": version: 1.2.1 resolution: "bonjour-service@npm:1.2.1" dependencies: @@ -22283,7 +19881,7 @@ __metadata: languageName: node linkType: hard -"boxen@npm:^5.0.0, boxen@npm:^5.1.2": +"boxen@npm:^5.1.2": version: 5.1.2 resolution: "boxen@npm:5.1.2" dependencies: @@ -22361,9 +19959,9 @@ __metadata: linkType: hard "browser-readablestream-to-it@npm:^2.0.0": - version: 2.0.4 - resolution: "browser-readablestream-to-it@npm:2.0.4" - checksum: 10/7d3f5694a18a71b0cc0db37521b2ab806458cbf3aa5639bab681f328255cd22246a39d3973adb7774f3104a3c28b2fa7e54767ad5d03082c58b5dd4e6068cd2a + version: 2.0.7 + resolution: "browser-readablestream-to-it@npm:2.0.7" + checksum: 10/22baaf32f6a41230c58ad6946ed042e324029d384f210ab501168c80d5dc0fe2c2fe2ab26c8577f5555c66d51e19787d91b0c6f59fe92fa73ee9a10a7bc699b8 languageName: node linkType: hard @@ -22374,7 +19972,7 @@ __metadata: languageName: node linkType: hard -"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": +"browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": version: 1.2.0 resolution: "browserify-aes@npm:1.2.0" dependencies: @@ -22388,7 +19986,7 @@ __metadata: languageName: node linkType: hard -"browserify-cipher@npm:^1.0.0": +"browserify-cipher@npm:^1.0.0, browserify-cipher@npm:^1.0.1": version: 1.0.1 resolution: "browserify-cipher@npm:1.0.1" dependencies: @@ -22423,16 +20021,17 @@ __metadata: linkType: hard "browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": - version: 4.1.0 - resolution: "browserify-rsa@npm:4.1.0" + version: 4.1.1 + resolution: "browserify-rsa@npm:4.1.1" dependencies: - bn.js: "npm:^5.0.0" - randombytes: "npm:^2.0.1" - checksum: 10/155f0c135873efc85620571a33d884aa8810e40176125ad424ec9d85016ff105a07f6231650914a760cca66f29af0494087947b7be34880dd4599a0cd3c38e54 + bn.js: "npm:^5.2.1" + randombytes: "npm:^2.1.0" + safe-buffer: "npm:^5.2.1" + checksum: 10/62ae0da60e49e8d5dd3b0922119b6edee94ebfa3a184211c804024b3a75f9dab31a1d124cc0545ed050e273f0325c2fd7aba6a51e44ba6f726fceae3210ddade languageName: node linkType: hard -"browserify-sign@npm:^4.0.0": +"browserify-sign@npm:^4.0.0, browserify-sign@npm:^4.2.3": version: 4.2.3 resolution: "browserify-sign@npm:4.2.3" dependencies: @@ -22459,102 +20058,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.0.0, browserslist@npm:^4.18.1, browserslist@npm:^4.21.4, browserslist@npm:^4.22.1": - version: 4.22.1 - resolution: "browserslist@npm:4.22.1" +"browserslist@npm:^4.0.0, browserslist@npm:^4.14.5, browserslist@npm:^4.18.1, browserslist@npm:^4.21.10, browserslist@npm:^4.21.4, browserslist@npm:^4.21.5, browserslist@npm:^4.23.0, browserslist@npm:^4.23.3, browserslist@npm:^4.24.0, browserslist@npm:^4.24.2": + version: 4.24.2 + resolution: "browserslist@npm:4.24.2" dependencies: - caniuse-lite: "npm:^1.0.30001541" - electron-to-chromium: "npm:^1.4.535" - node-releases: "npm:^2.0.13" - update-browserslist-db: "npm:^1.0.13" + caniuse-lite: "npm:^1.0.30001669" + electron-to-chromium: "npm:^1.5.41" + node-releases: "npm:^2.0.18" + update-browserslist-db: "npm:^1.1.1" bin: browserslist: cli.js - checksum: 10/4a515168e0589c7b1ccbf13a93116ce0418cc5e65d228ec036022cf0e08773fdfb732e2abbf1e1188b96d19ecd4dd707504e75b6d393cba2782fc7d6a7fdefe8 - languageName: node - linkType: hard - -"browserslist@npm:^4.14.5, browserslist@npm:^4.17.5, browserslist@npm:^4.20.2": - version: 4.20.3 - resolution: "browserslist@npm:4.20.3" - dependencies: - caniuse-lite: "npm:^1.0.30001332" - electron-to-chromium: "npm:^1.4.118" - escalade: "npm:^3.1.1" - node-releases: "npm:^2.0.3" - picocolors: "npm:^1.0.0" - bin: - browserslist: cli.js - checksum: 10/63e285ae2d19aca763616a48b3ad48dc84fb896038faa3a85bcfed801411ed783fd166bdbf5f4af0d11494ea1b6632aa390a4ba32ce92249bd627f4563c88cd0 - languageName: node - linkType: hard - -"browserslist@npm:^4.21.10": - version: 4.21.10 - resolution: "browserslist@npm:4.21.10" - dependencies: - caniuse-lite: "npm:^1.0.30001517" - electron-to-chromium: "npm:^1.4.477" - node-releases: "npm:^2.0.13" - update-browserslist-db: "npm:^1.0.11" - bin: - browserslist: cli.js - checksum: 10/cdb9272433994393a995235720c304e8c7123b4994b02fc0b24ca0f483db482c4f85fe8b40995aa6193d47d781e5535cf5d0efe96e465d2af42058fb3251b13a - languageName: node - linkType: hard - -"browserslist@npm:^4.21.3, browserslist@npm:^4.21.5": - version: 4.21.5 - resolution: "browserslist@npm:4.21.5" - dependencies: - caniuse-lite: "npm:^1.0.30001449" - electron-to-chromium: "npm:^1.4.284" - node-releases: "npm:^2.0.8" - update-browserslist-db: "npm:^1.0.10" - bin: - browserslist: cli.js - checksum: 10/560ec095ab4fa878f611ddf29038193d3a40ce69282dd15e633bcb9523fa25122e566d34192ab45e261a637d768884e7318cb3545533720469ee8f10d10c3298 - languageName: node - linkType: hard - -"browserslist@npm:^4.21.9": - version: 4.21.9 - resolution: "browserslist@npm:4.21.9" - dependencies: - caniuse-lite: "npm:^1.0.30001503" - electron-to-chromium: "npm:^1.4.431" - node-releases: "npm:^2.0.12" - update-browserslist-db: "npm:^1.0.11" - bin: - browserslist: cli.js - checksum: 10/f015dd3d97e9eadcc13aaaf03b4a78a071874eee1cf756a2361191c0888f238dd0ddf1b92c20d072ecd1834d9a51e5a6361f5efaf966728da6a5daaf95b37eb3 - languageName: node - linkType: hard - -"browserslist@npm:^4.22.2": - version: 4.22.2 - resolution: "browserslist@npm:4.22.2" - dependencies: - caniuse-lite: "npm:^1.0.30001565" - electron-to-chromium: "npm:^1.4.601" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10/e3590793db7f66ad3a50817e7b7f195ce61e029bd7187200244db664bfbe0ac832f784e4f6b9c958aef8ea4abe001ae7880b7522682df521f4bc0a5b67660b5e - languageName: node - linkType: hard - -"browserslist@npm:^4.23.0, browserslist@npm:^4.23.1": - version: 4.23.2 - resolution: "browserslist@npm:4.23.2" - dependencies: - caniuse-lite: "npm:^1.0.30001640" - electron-to-chromium: "npm:^1.4.820" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.1.0" - bin: - browserslist: cli.js - checksum: 10/326a98b1c39bcc9a99b197f15790dc28e122b1aead3257c837421899377ac96239123f26868698085b3d9be916d72540602738e1f857e86a387e810af3fda6e5 + checksum: 10/f8a9d78bbabe466c57ffd5c50a9e5582a5df9aa68f43078ca62a9f6d0d6c70ba72eca72d0a574dbf177cf55cdca85a46f7eb474917a47ae5398c66f8b76f7d1c languageName: node linkType: hard @@ -22720,12 +20234,12 @@ __metadata: linkType: hard "bufferutil@npm:^4.0.1": - version: 4.0.6 - resolution: "bufferutil@npm:4.0.6" + version: 4.0.8 + resolution: "bufferutil@npm:4.0.8" dependencies: node-gyp: "npm:latest" node-gyp-build: "npm:^4.3.0" - checksum: 10/8d82cda2e68bf531af03d5ba2997ec96e1c3aed1f5315f2d74d452b9dcaab24287348639e849deaae841be7dee68073cd566bb8b32729c3b79878965cb546988 + checksum: 10/d9337badc960a19d5a031db5de47159d7d8a11b6bab399bdfbf464ffa9ecd2972fef19bb61a7d2827e0c55f912c20713e12343386b86cb013f2b99c2324ab6a3 languageName: node linkType: hard @@ -22757,15 +20271,6 @@ __metadata: languageName: node linkType: hard -"builtins@npm:^5.0.0": - version: 5.0.1 - resolution: "builtins@npm:5.0.1" - dependencies: - semver: "npm:^7.0.0" - checksum: 10/90136fa0ba98b7a3aea33190b1262a5297164731efb6a323b0231acf60cc2ea0b2b1075dbf107038266b8b77d6045fa9631d1c3f90efc1c594ba61218fbfbb4c - languageName: node - linkType: hard - "bundle-name@npm:^4.1.0": version: 4.1.0 resolution: "bundle-name@npm:4.1.0" @@ -22775,7 +20280,7 @@ __metadata: languageName: node linkType: hard -"busboy@npm:^1.0.0, busboy@npm:^1.6.0": +"busboy@npm:^1.0.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" dependencies: @@ -22785,9 +20290,9 @@ __metadata: linkType: hard "byte-size@npm:^8.1.1": - version: 8.1.1 - resolution: "byte-size@npm:8.1.1" - checksum: 10/eacd83b5f39b4b35115160201553150c3c085473ddb1e788d0f4ee22a2f3461470de5732eef8d7874efbbd883b7ae1277190b579128060e616d606ff419fe1e0 + version: 8.2.1 + resolution: "byte-size@npm:8.2.1" + checksum: 10/0056c264613341e0363d3d215bde6f7bbae3cbc54bea7e696ce27e66234a4b73895fa300a281adf63fd4f2a26b3d7df700c3e4308dd328656614b7b88d5ca385 languageName: node linkType: hard @@ -22832,8 +20337,8 @@ __metadata: linkType: hard "cacache@npm:^16.1.0": - version: 16.1.0 - resolution: "cacache@npm:16.1.0" + version: 16.1.3 + resolution: "cacache@npm:16.1.3" dependencies: "@npmcli/fs": "npm:^2.1.0" "@npmcli/move-file": "npm:^2.0.0" @@ -22852,40 +20357,19 @@ __metadata: rimraf: "npm:^3.0.2" ssri: "npm:^9.0.0" tar: "npm:^6.1.11" - unique-filename: "npm:^1.1.1" - checksum: 10/5a84a79db11204cd6827bfa5e05c72d512ed091b77df772988f8df1eea4aaa879e30e38093d10db1267ed2d0cb9cafe31c64ad7f55074dca52e4cb5dca204382 + unique-filename: "npm:^2.0.0" + checksum: 10/a14524d90e377ee691d63a81173b33c473f8bc66eb299c64290b58e1d41b28842397f8d6c15a01b4c57ca340afcec019ae112a45c2f67a79f76130d326472e92 languageName: node linkType: hard "cacache@npm:^17.0.0": - version: 17.0.5 - resolution: "cacache@npm:17.0.5" - dependencies: - "@npmcli/fs": "npm:^3.1.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^9.3.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^4.0.0" - minipass-collect: "npm:^1.0.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - promise-inflight: "npm:^1.0.1" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10/ef7ca5227ba340911884dd2cde0eb207c671e0afe8327fca70bd469bb7358b93eb7642743084e547ce4afd5c6323e444d9e55ec7724a2004d42e1b576e48420b - languageName: node - linkType: hard - -"cacache@npm:^18.0.0": - version: 18.0.0 - resolution: "cacache@npm:18.0.0" + version: 17.1.4 + resolution: "cacache@npm:17.1.4" dependencies: "@npmcli/fs": "npm:^3.1.0" fs-minipass: "npm:^3.0.0" glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" + lru-cache: "npm:^7.7.1" minipass: "npm:^7.0.3" minipass-collect: "npm:^1.0.2" minipass-flush: "npm:^1.0.5" @@ -22894,13 +20378,13 @@ __metadata: ssri: "npm:^10.0.0" tar: "npm:^6.1.11" unique-filename: "npm:^3.0.0" - checksum: 10/b71fefe97b9799a863dc48ac79da2bd57a724ff0922fddd3aef4f3b70395ba00d1ef9547a0594d3d6d3cd57aeaeaf4d938c54f89695053eb2198cf8758b47511 + checksum: 10/6e26c788bc6a18ff42f4d4f97db30d5c60a5dfac8e7c10a03b0307a92cf1b647570547cf3cd96463976c051eb9c7258629863f156e224c82018862c1a8ad0e70 languageName: node linkType: hard -"cacache@npm:^18.0.3": - version: 18.0.3 - resolution: "cacache@npm:18.0.3" +"cacache@npm:^18.0.0, cacache@npm:^18.0.3": + version: 18.0.4 + resolution: "cacache@npm:18.0.4" dependencies: "@npmcli/fs": "npm:^3.1.0" fs-minipass: "npm:^3.0.0" @@ -22914,7 +20398,7 @@ __metadata: ssri: "npm:^10.0.0" tar: "npm:^6.1.11" unique-filename: "npm:^3.0.0" - checksum: 10/d4c161f071524bb636334b8cf94780c014e29c180a886b8184da8f2f44d2aca88d5664797c661e9f74bdbd34697c2f231ed7c24c256cecbb0a0563ad1ada2219 + checksum: 10/ca2f7b2d3003f84d362da9580b5561058ccaecd46cba661cbcff0375c90734b610520d46b472a339fd032d91597ad6ed12dde8af81571197f3c9772b5d35b104 languageName: node linkType: hard @@ -22935,6 +20419,13 @@ __metadata: languageName: node linkType: hard +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 10/618a8b3eea314060e74cb3285a6154e8343c244a34235acf91cfe626ee0705c24e3cd11e4b1a7b3900bd749ee203ae65afe13adf610c8ab173e99d4a208faf75 + languageName: node + linkType: hard + "cacheable-lookup@npm:^6.0.4": version: 6.1.0 resolution: "cacheable-lookup@npm:6.1.0" @@ -22950,17 +20441,17 @@ __metadata: linkType: hard "cacheable-request@npm:^10.2.8": - version: 10.2.12 - resolution: "cacheable-request@npm:10.2.12" + version: 10.2.14 + resolution: "cacheable-request@npm:10.2.14" dependencies: - "@types/http-cache-semantics": "npm:^4.0.1" + "@types/http-cache-semantics": "npm:^4.0.2" get-stream: "npm:^6.0.1" http-cache-semantics: "npm:^4.1.1" - keyv: "npm:^4.5.2" + keyv: "npm:^4.5.3" mimic-response: "npm:^4.0.0" normalize-url: "npm:^8.0.0" responselike: "npm:^3.0.0" - checksum: 10/abc1541f80e0995a52cfc6197ad12d2a910363c7342815a88f1606b767d81d5ccb43b8f1ba5a16180f3bf939b28f9b07dff22d346572d343f50a908813118e0b + checksum: 10/102f454ac68eb66f99a709c5cf65e90ed89f1b9269752578d5a08590b3986c3ea47a5d9dff208fe7b65855a29da129a2f23321b88490106898e0ba70b807c912 languageName: node linkType: hard @@ -23029,28 +20520,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": - version: 1.0.2 - resolution: "call-bind@npm:1.0.2" - dependencies: - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.0.2" - checksum: 10/ca787179c1cbe09e1697b56ad499fd05dc0ae6febe5081d728176ade699ea6b1589240cb1ff1fe11fcf9f61538c1af60ad37e8eb2ceb4ef21cd6085dfd3ccedd - languageName: node - linkType: hard - -"call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": - version: 1.0.5 - resolution: "call-bind@npm:1.0.5" - dependencies: - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.1" - set-function-length: "npm:^1.1.1" - checksum: 10/246d44db6ef9bbd418828dbd5337f80b46be4398d522eded015f31554cbb2ea33025b0203b75c7ab05a1a255b56ef218880cca1743e4121e306729f9e414da39 - languageName: node - linkType: hard - -"call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": version: 1.0.7 resolution: "call-bind@npm:1.0.7" dependencies: @@ -23190,9 +20660,9 @@ __metadata: linkType: hard "camelize@npm:^1.0.0": - version: 1.0.0 - resolution: "camelize@npm:1.0.0" - checksum: 10/ad285ffc909e43fc0e973bebd269c063657c5b69344def478896b0d4a6d64643af1908b0455f50d1fe8ef0ea7591a8a649086f20eae0de4c7e1f8e1cdf5c552f + version: 1.0.1 + resolution: "camelize@npm:1.0.1" + checksum: 10/0e147b4299ac6363c50050716aadfae42831257ec56ce54773ffd2a94a88abb2e2540c5ccc38345e8a39963105b76d86cb24477165a36b78c9958fb304513db3 languageName: node linkType: hard @@ -23208,59 +20678,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001520": - version: 1.0.30001524 - resolution: "caniuse-lite@npm:1.0.30001524" - checksum: 10/381e0bbaeb2a60f1fcd10c17d233c17826a2af933dfc68fa8e315c6ae08b6b56d316e7fa07b039912aac8d8b2b07fb8188edbbdd29dffacb3860e0013548c445 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001332": - version: 1.0.30001340 - resolution: "caniuse-lite@npm:1.0.30001340" - checksum: 10/d1c6583f15e32b847f27d5482e900021deec37c864b988147aa242e4859fbfd20a4f83b2e13001e7808e9701dc30a510fcae03619218488c4c5d09b981efce6f - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001449": - version: 1.0.30001474 - resolution: "caniuse-lite@npm:1.0.30001474" - checksum: 10/14bfb222e51b302069f4051904600fc33263bcf7c5fb9a9b0e5ec2df90636841cb529e1e3368ef19c2ab9f441586fc6a44d8234bde23004f3bd3a8fac827dcb5 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001517": - version: 1.0.30001532 - resolution: "caniuse-lite@npm:1.0.30001532" - checksum: 10/3be6aae89a588f1111eec0cd9d3125f24a5bb2a9ca2b2ead5a3bee529b85f32b01fd5aa751f292d18da0941948288187ff558b2ca199dac37fed18fba25047ec - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001503": - version: 1.0.30001510 - resolution: "caniuse-lite@npm:1.0.30001510" - checksum: 10/7d999b0bd93b32ff53b9c8ce0d904c18ed7b2b688406f541f7e9fcd1bade8ac1338a24c7a9845a1985edb56dd473948a90c2546166304a0880376bc47f4e1ac0 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001541": - version: 1.0.30001549 - resolution: "caniuse-lite@npm:1.0.30001549" - checksum: 10/515ea123e5249075566a602e2c6a3239e16283d3cd4b78daf4fa86569c450ea6eec8a1c2d2cc33e3d554fa37b3a203306dc8423fee635ec04a86b2a9164dbbf2 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001565": - version: 1.0.30001579 - resolution: "caniuse-lite@npm:1.0.30001579" - checksum: 10/2cd0c02e5d66b09888743ad2b624dbde697ace5c76b55bfd6065ea033f6abea8ac3f5d3c9299c042f91b396e2141b49bc61f5e17086dc9ba3a866cc6790134c0 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001591, caniuse-lite@npm:^1.0.30001640": - version: 1.0.30001642 - resolution: "caniuse-lite@npm:1.0.30001642" - checksum: 10/8d80ea82be453ae0fdfea8766d82740a4945c1b99189650f29bfc458d4e235d7e99027a8f8bc5a4228d8c4457ba896315284b0703f300353ad5f09d8e693de10 +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001591, caniuse-lite@npm:^1.0.30001646, caniuse-lite@npm:^1.0.30001669": + version: 1.0.30001679 + resolution: "caniuse-lite@npm:1.0.30001679" + checksum: 10/4de6424465e904a9bb2913ab75916a3d24f47babd9419e49742fb786c2bf5c84124a78e8bd4ba5ebde899b3d2dbce12229ca543938f8acc4823f7c4aec71d93a languageName: node linkType: hard @@ -23331,11 +20752,18 @@ __metadata: linkType: hard "cborg@npm:^4.0.0": - version: 4.0.3 - resolution: "cborg@npm:4.0.3" + version: 4.2.6 + resolution: "cborg@npm:4.2.6" bin: cborg: lib/bin.js - checksum: 10/d5f08ea88ccb01d6fb31eede395200a7f05cfd5c9872f166f85cba603c8b3684c12d919059d16d2d0eb000cd3adcf3ccd9a47e51835840c5f8e3dc77378cefbd + checksum: 10/56657cfdd42ff004f24fcf60973356245e6551ab87f710f58fc989d4225becd00f9d79e1ef21d57e37f4c08a988c5210443230eec72675c9fd73533d461e174d + languageName: node + linkType: hard + +"ccount@npm:^2.0.0": + version: 2.0.1 + resolution: "ccount@npm:2.0.1" + checksum: 10/48193dada54c9e260e0acf57fc16171a225305548f9ad20d5471e0f7a8c026aedd8747091dccb0d900cde7df4e4ddbd235df0d8de4a64c71b12f0d3303eeafd4 languageName: node linkType: hard @@ -23491,6 +20919,20 @@ __metadata: languageName: node linkType: hard +"character-entities-html4@npm:^2.0.0": + version: 2.1.0 + resolution: "character-entities-html4@npm:2.1.0" + checksum: 10/7034aa7c7fa90309667f6dd50499c8a760c3d3a6fb159adb4e0bada0107d194551cdbad0714302f62d06ce4ed68565c8c2e15fdef2e8f8764eb63fa92b34b11d + languageName: node + linkType: hard + +"character-entities-legacy@npm:^3.0.0": + version: 3.0.0 + resolution: "character-entities-legacy@npm:3.0.0" + checksum: 10/7582af055cb488b626d364b7d7a4e46b06abd526fb63c0e4eb35bcb9c9799cc4f76b39f34fdccef2d1174ac95e53e9ab355aae83227c1a2505877893fce77731 + languageName: node + linkType: hard + "chardet@npm:^0.4.0": version: 0.4.2 resolution: "chardet@npm:0.4.2" @@ -23506,16 +20948,18 @@ __metadata: linkType: hard "check-error@npm:^1.0.2": - version: 1.0.2 - resolution: "check-error@npm:1.0.2" - checksum: 10/011e74b2eac49bd42c5610f15d6949d982e7ec946247da0276278a90e7476e6b88d25d3c605a4115d5e3575312e1f5a11e91c82290c8a47ca275c92f5d0981db + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 languageName: node linkType: hard -"check-types@npm:^11.1.1": - version: 11.2.2 - resolution: "check-types@npm:11.2.2" - checksum: 10/a741fc4748d1923b0ff11003aab3fc18eaa8d8b6b3d5e93d21796fc6355f95557b9acc6189fe9e2411efe8724313b3123ba0bc1d728c0db30791c3b8a894a38a +"check-types@npm:^11.2.3": + version: 11.2.3 + resolution: "check-types@npm:11.2.3" + checksum: 10/557e119fa018d7de4e873ada0a6c8917a0f6e0955dc19293396405f5292cfcfe190457557f4cc422e6845d715ef6bbb1d0ab9198ff6735dd96ac50e3ef1e2424 languageName: node linkType: hard @@ -23543,21 +20987,25 @@ __metadata: linkType: hard "cheerio@npm:^1.0.0-rc.2": - version: 1.0.0-rc.12 - resolution: "cheerio@npm:1.0.0-rc.12" + version: 1.0.0 + resolution: "cheerio@npm:1.0.0" dependencies: cheerio-select: "npm:^2.1.0" dom-serializer: "npm:^2.0.0" domhandler: "npm:^5.0.3" - domutils: "npm:^3.0.1" - htmlparser2: "npm:^8.0.1" - parse5: "npm:^7.0.0" + domutils: "npm:^3.1.0" + encoding-sniffer: "npm:^0.2.0" + htmlparser2: "npm:^9.1.0" + parse5: "npm:^7.1.2" parse5-htmlparser2-tree-adapter: "npm:^7.0.0" - checksum: 10/812fed61aa4b669bbbdd057d0d7f73ba4649cabfd4fc3a8f1d5c7499e4613b430636102716369cbd6bbed8f1bdcb06387ae8342289fb908b2743184775f94f18 + parse5-parser-stream: "npm:^7.1.2" + undici: "npm:^6.19.5" + whatwg-mimetype: "npm:^4.0.0" + checksum: 10/b535070add0f86b0a1f234274ad3ffb2c1c375c05b322d8057e89c3c797b3b4d2f05826c34a04df218bec9abf21b9f0d0bd71974a8dfe28b943fb87ab0170c38 languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.0.0, chokidar@npm:^3.3.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": +"chokidar@npm:3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -23576,7 +21024,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.6.0": +"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.0.0, chokidar@npm:^3.3.0, chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3, chokidar@npm:^3.6.0": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -23610,9 +21058,9 @@ __metadata: linkType: hard "chrome-trace-event@npm:^1.0.2": - version: 1.0.3 - resolution: "chrome-trace-event@npm:1.0.3" - checksum: 10/b5fbdae5bf00c96fa3213de919f2b2617a942bfcb891cdf735fbad2a6f4f3c25d42e3f2b1703328619d352c718b46b9e18999fd3af7ef86c26c91db6fae1f0da + version: 1.0.4 + resolution: "chrome-trace-event@npm:1.0.4" + checksum: 10/1762bed739774903bf5915fe3045c3120fc3c7f7d929d88e566447ea38944937a6370ccb687278318c43c24f837ad22dac780bed67c066336815557b8cf558c6 languageName: node linkType: hard @@ -23624,9 +21072,9 @@ __metadata: linkType: hard "ci-info@npm:^3.1.1, ci-info@npm:^3.2.0": - version: 3.3.0 - resolution: "ci-info@npm:3.3.0" - checksum: 10/8adea555a4f92e4f80f5e58e63277b349efa439dabfc6e2ca3773126f3fea7699f3546ff931f996a08f9905b2f6a7fc4d671a0c549cfedab7369e35aa0723b00 + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 10/75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397 languageName: node linkType: hard @@ -23637,6 +21085,27 @@ __metadata: languageName: node linkType: hard +"cidr-regex@npm:4.0.3": + version: 4.0.3 + resolution: "cidr-regex@npm:4.0.3" + dependencies: + ip-regex: "npm:^5.0.0" + checksum: 10/d26f9168c2c380a136ac3af6379959d6140c61e08adafed276ed50e9e0d55c129c6ac7c1629e2c676bca9a030d927fbc4a45355e90d10ebcca30a97e8f17011d + languageName: node + linkType: hard + +"cidr-tools@npm:^6.4.1": + version: 6.4.2 + resolution: "cidr-tools@npm:6.4.2" + dependencies: + cidr-regex: "npm:4.0.3" + ip-bigint: "npm:7.3.0" + ip-regex: "npm:5.0.0" + string-natural-compare: "npm:3.0.1" + checksum: 10/7f9687a1f0f0e61911621349eb85c32f09314cd096faf1c37295e9f5ef3fc092797792302b08534c9ed367a699b8672d8db47c89ebfcd362efd63b30c2d14268 + languageName: node + linkType: hard + "cids@npm:^0.7.1": version: 0.7.5 resolution: "cids@npm:0.7.5" @@ -23668,9 +21137,9 @@ __metadata: linkType: hard "cjs-module-lexer@npm:^1.0.0": - version: 1.2.2 - resolution: "cjs-module-lexer@npm:1.2.2" - checksum: 10/f80f84bfdcc53379cc18e25ea3c0cdb4595c142b8e28df304f5c88f38202e1bccf13e845401593656781f79fb43273e1d402d6187d0eeee8dca5ddecee1dcad4 + version: 1.4.1 + resolution: "cjs-module-lexer@npm:1.4.1" + checksum: 10/6e830a1e00a34d416949bbc1924f3e8da65cef4a6a09e2b7fa35722e2d1c34bf378d3baca987b698d1cbc3eb83e44b044039b4e82755c96f30e0f03d1d227637 languageName: node linkType: hard @@ -23723,8 +21192,8 @@ __metadata: linkType: hard "classic-level@npm:^1.2.0": - version: 1.3.0 - resolution: "classic-level@npm:1.3.0" + version: 1.4.1 + resolution: "classic-level@npm:1.4.1" dependencies: abstract-level: "npm:^1.0.2" catering: "npm:^2.1.0" @@ -23732,16 +21201,16 @@ __metadata: napi-macros: "npm:^2.2.2" node-gyp: "npm:latest" node-gyp-build: "npm:^4.3.0" - checksum: 10/b2d07a5932a09bdf0a5b27e662154888c85edd59d75816c7e60960dacadbc7553daa9f5efb58d2575b3eae0540d504ef71d49f438744366626762a0ddefe5cc5 + checksum: 10/11f9362301477cb5cf3b147e5846754e0e4296231e265145101403f4a5cb797a685b6a9b6b4c880a42b05772f846a222a5a7a563262ca15b5ca03e25e9a805db languageName: node linkType: hard "clean-css@npm:^5.2.2": - version: 5.3.2 - resolution: "clean-css@npm:5.3.2" + version: 5.3.3 + resolution: "clean-css@npm:5.3.3" dependencies: source-map: "npm:~0.6.0" - checksum: 10/efd9efbf400f38a12f99324bad5359bdd153211b048721e4d4ddb629a88865dff3012dca547a14bdd783d78ccf064746e39fd91835546a08e2d811866aff0857 + checksum: 10/2db1ae37b384c8ff0a06a12bfa80f56cc02b4abcaaf340db98c0ae88a61dd67c856653fd8135ace6eb0ec13aeab3089c425d2e4238d2a2ad6b6917e6ccc74729 languageName: node linkType: hard @@ -23753,11 +21222,11 @@ __metadata: linkType: hard "clean-stack@npm:^4.0.0": - version: 4.1.0 - resolution: "clean-stack@npm:4.1.0" + version: 4.2.0 + resolution: "clean-stack@npm:4.2.0" dependencies: escape-string-regexp: "npm:5.0.0" - checksum: 10/56fdca7a67a61528676eaddce35442824700b674cf882150ac416824966f65b5e15d4ea02d1d47f4d16ad50213718c1f00ae0f6cca46aeec3fd761b49cf7204f + checksum: 10/373f656a31face5c615c0839213b9b542a0a48057abfb1df66900eab4dc2a5c6097628e4a0b5aa559cdfc4e66f8a14ea47be9681773165a44470ef5fb8ccc172 languageName: node linkType: hard @@ -23805,17 +21274,10 @@ __metadata: languageName: node linkType: hard -"cli-spinners@npm:^2.2.0": - version: 2.9.0 - resolution: "cli-spinners@npm:2.9.0" - checksum: 10/457497ccef70eec3f1d0825e4a3396ba43f6833a4900c2047c0efe2beecb1c0df476949ea378bcb6595754f7508e28ae943eeb30bbda807f59f547b270ec334c - languageName: node - linkType: hard - -"cli-spinners@npm:^2.5.0": - version: 2.6.1 - resolution: "cli-spinners@npm:2.6.1" - checksum: 10/3e2dc5df72cf02120bebe256881fc8e3ec49867e5023d39f1e7340d7da57964f5236f4c75e568aa9dea6460b56f7a6d5870b89453c743c6c15e213cb52be2122 +"cli-spinners@npm:^2.2.0, cli-spinners@npm:^2.5.0": + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 10/a0a863f442df35ed7294424f5491fa1756bd8d2e4ff0c8736531d886cec0ece4d85e8663b77a5afaf1d296e3cbbebff92e2e99f52bbea89b667cbe789b994794 languageName: node linkType: hard @@ -23962,6 +21424,15 @@ __metadata: languageName: node linkType: hard +"clone-regexp@npm:^3.0.0": + version: 3.0.0 + resolution: "clone-regexp@npm:3.0.0" + dependencies: + is-regexp: "npm:^3.0.0" + checksum: 10/cb254bd47ce0aac55771c888211e796b5e2a2ed974d0a7020e4e3805eca597fd19b85a7bcbf2250d319f12626a09c0e4db120e02ce49fec81a61bcd208474651 + languageName: node + linkType: hard + "clone-response@npm:^1.0.2": version: 1.0.3 resolution: "clone-response@npm:1.0.3" @@ -23992,14 +21463,7 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^2.1.0": - version: 2.1.0 - resolution: "clsx@npm:2.1.0" - checksum: 10/2e0ce7c3b6803d74fc8147c408f88e79245583202ac14abd9691e2aebb9f312de44270b79154320d10bb7804a9197869635d1291741084826cff20820f31542b - languageName: node - linkType: hard - -"clsx@npm:^2.1.1": +"clsx@npm:^2.1.0, clsx@npm:^2.1.1": version: 2.1.1 resolution: "clsx@npm:2.1.1" checksum: 10/cdfb57fa6c7649bbff98d9028c2f0de2f91c86f551179541cf784b1cfdc1562dcb951955f46d54d930a3879931a980e32a46b598acaea274728dbe068deca919 @@ -24007,9 +21471,9 @@ __metadata: linkType: hard "cmd-shim@npm:^6.0.0": - version: 6.0.1 - resolution: "cmd-shim@npm:6.0.1" - checksum: 10/d0718e4a49265a9195ced19f662a77569ce5939145451125bdc8bb302781f15564ade92f6c49e231f9d0bb6f3d71db1a2d0a50af940490eb324e152325039541 + version: 6.0.3 + resolution: "cmd-shim@npm:6.0.3" + checksum: 10/791c9779cf57deae978ef24daf7e49e7fdb2070cc273aa7d691ed258a660ad3861edbc9f39daa2b6e5f72a64526b6812c04f08becc54402618b99946ccad7d71 languageName: node linkType: hard @@ -24048,9 +21512,9 @@ __metadata: linkType: hard "collect-v8-coverage@npm:^1.0.0": - version: 1.0.1 - resolution: "collect-v8-coverage@npm:1.0.1" - checksum: 10/85b26945ab9b8e15077f877a4a5bc91d836480c600bac4cd0a0e8be8515583fdfc393ccff049ff3e9f46cac39e5295af049209f3c484f30a028056cc5dd1fe8a + version: 1.0.2 + resolution: "collect-v8-coverage@npm:1.0.2" + checksum: 10/30ea7d5c9ee51f2fdba4901d4186c5b7114a088ef98fd53eda3979da77eed96758a2cae81cc6d97e239aaea6065868cf908b24980663f7b7e96aa291b3e12fa4 languageName: node linkType: hard @@ -24097,12 +21561,12 @@ __metadata: linkType: hard "color-string@npm:^1.6.0": - version: 1.9.0 - resolution: "color-string@npm:1.9.0" + version: 1.9.1 + resolution: "color-string@npm:1.9.1" dependencies: color-name: "npm:^1.0.0" simple-swizzle: "npm:^0.2.2" - checksum: 10/6e347b463aa8e40eb193d6ee21ef501c88dad9c20c4607f5394f3b3c4ce40d828c87a35ac4acdc94696d8dae00a04cb30f0bc73f001ccc812f1d58dccaf26591 + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd languageName: node linkType: hard @@ -24146,14 +21610,7 @@ __metadata: languageName: node linkType: hard -"colorette@npm:^2.0.10, colorette@npm:^2.0.16": - version: 2.0.16 - resolution: "colorette@npm:2.0.16" - checksum: 10/8501db5750d3b8f0935bdc9e999cbd6b6420b5c127a8c0bd41aaf252fe3f6636ff3a5c51e6dc8e12692e0b96ee3d28a4dfd0f89a86ef167a5728d4c926b67f31 - languageName: node - linkType: hard - -"colorette@npm:^2.0.14": +"colorette@npm:^2.0.10, colorette@npm:^2.0.14, colorette@npm:^2.0.16": version: 2.0.20 resolution: "colorette@npm:2.0.20" checksum: 10/0b8de48bfa5d10afc160b8eaa2b9938f34a892530b2f7d7897e0458d9535a066e3998b49da9d21161c78225b272df19ae3a64d6df28b4c9734c0e55bbd02406f @@ -24203,6 +21660,13 @@ __metadata: languageName: node linkType: hard +"comma-separated-tokens@npm:^2.0.0": + version: 2.0.3 + resolution: "comma-separated-tokens@npm:2.0.3" + checksum: 10/e3bf9e0332a5c45f49b90e79bcdb4a7a85f28d6a6f0876a94f1bb9b2bfbdbbb9292aac50e1e742d8c0db1e62a0229a106f57917e2d067fca951d81737651700d + languageName: node + linkType: hard + "command-exists@npm:^1.2.8, command-exists@npm:^1.2.9": version: 1.2.9 resolution: "command-exists@npm:1.2.9" @@ -24260,9 +21724,9 @@ __metadata: linkType: hard "commander@npm:^9.1.0": - version: 9.2.0 - resolution: "commander@npm:9.2.0" - checksum: 10/db4855c6cd7694d4117e17ec353c7fcc678695e008e12dd5cd45ebaf3fd15607a476df690bf658c7a20a661743580fb0150c825087d773847a24392891e7b4bc + version: 9.5.0 + resolution: "commander@npm:9.5.0" + checksum: 10/41c49b3d0f94a1fbeb0463c85b13f15aa15a9e0b4d5e10a49c0a1d58d4489b549d62262b052ae0aa6cfda53299bee487bfe337825df15e342114dde543f82906 languageName: node linkType: hard @@ -24331,21 +21795,14 @@ __metadata: languageName: node linkType: hard -"component-emitter@npm:^1.2.1": - version: 1.3.0 - resolution: "component-emitter@npm:1.3.0" - checksum: 10/dfc1ec2e7aa2486346c068f8d764e3eefe2e1ca0b24f57506cd93b2ae3d67829a7ebd7cc16e2bf51368fac2f45f78fcff231718e40b1975647e4a86be65e1d05 - languageName: node - linkType: hard - -"component-emitter@npm:^1.3.0": +"component-emitter@npm:^1.2.1, component-emitter@npm:^1.3.0": version: 1.3.1 resolution: "component-emitter@npm:1.3.1" checksum: 10/94550aa462c7bd5a61c1bc480e28554aa306066930152d1b1844a0dd3845d4e5db7e261ddec62ae184913b3e59b55a2ad84093b9d3596a8f17c341514d6c483d languageName: node linkType: hard -"compressible@npm:~2.0.16": +"compressible@npm:~2.0.16, compressible@npm:~2.0.18": version: 2.0.18 resolution: "compressible@npm:2.0.18" dependencies: @@ -24354,7 +21811,7 @@ __metadata: languageName: node linkType: hard -"compression@npm:1.7.4, compression@npm:^1.7.4": +"compression@npm:1.7.4": version: 1.7.4 resolution: "compression@npm:1.7.4" dependencies: @@ -24369,6 +21826,21 @@ __metadata: languageName: node linkType: hard +"compression@npm:^1.7.4": + version: 1.7.5 + resolution: "compression@npm:1.7.5" + dependencies: + bytes: "npm:3.1.2" + compressible: "npm:~2.0.18" + debug: "npm:2.6.9" + negotiator: "npm:~0.6.4" + on-headers: "npm:~1.0.2" + safe-buffer: "npm:5.2.1" + vary: "npm:~1.1.2" + checksum: 10/c69cf6da151db6f9db2e242b6a0039ad41975ee886c385cff2920c5f8f7050678e0ee9a021437af033536c451791de529de376851b8d31fee42ca2d6adca03f0 + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -24443,20 +21915,6 @@ __metadata: languageName: node linkType: hard -"configstore@npm:^5.0.1": - version: 5.0.1 - resolution: "configstore@npm:5.0.1" - dependencies: - dot-prop: "npm:^5.2.0" - graceful-fs: "npm:^4.1.2" - make-dir: "npm:^3.0.0" - unique-string: "npm:^2.0.0" - write-file-atomic: "npm:^3.0.0" - xdg-basedir: "npm:^4.0.0" - checksum: 10/60ef65d493b63f96e14b11ba7ec072fdbf3d40110a94fb7199d1c287761bdea5c5244e76b2596325f30c1b652213aa75de96ea20afd4a5f82065e61ea090988e - languageName: node - linkType: hard - "confusing-browser-globals@npm:^1.0.11": version: 1.0.11 resolution: "confusing-browser-globals@npm:1.0.11" @@ -24545,20 +22003,13 @@ __metadata: languageName: node linkType: hard -"content-type@npm:^1.0.5, content-type@npm:~1.0.5": +"content-type@npm:^1.0.5, content-type@npm:~1.0.4, content-type@npm:~1.0.5": version: 1.0.5 resolution: "content-type@npm:1.0.5" checksum: 10/585847d98dc7fb8035c02ae2cb76c7a9bd7b25f84c447e5ed55c45c2175e83617c8813871b4ee22f368126af6b2b167df655829007b21aa10302873ea9c62662 languageName: node linkType: hard -"content-type@npm:~1.0.4": - version: 1.0.4 - resolution: "content-type@npm:1.0.4" - checksum: 10/5ea85c5293475c0cdf2f84e2c71f0519ced565840fb8cbda35997cb67cc45b879d5b9dbd37760c4041ca7415a3687f8a5f2f87b556b2aaefa49c0f3436a346d4 - languageName: node - linkType: hard - "conventional-changelog-angular@npm:^6.0.0": version: 6.0.0 resolution: "conventional-changelog-angular@npm:6.0.0" @@ -24678,19 +22129,17 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 +"convert-hrtime@npm:^5.0.0": + version: 5.0.0 + resolution: "convert-hrtime@npm:5.0.0" + checksum: 10/5245ad1ac6dd57b2d87624ae0eeac1d2a74812a6631208c09368bef787a28e7dbfa736cddaa9c8a0c425cb240437ea506afec7b9684ff617004d06a551f26c87 languageName: node linkType: hard -"convert-source-map@npm:^1.5.1, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": - version: 1.8.0 - resolution: "convert-source-map@npm:1.8.0" - dependencies: - safe-buffer: "npm:~5.1.1" - checksum: 10/985d974a2d33e1a2543ada51c93e1ba2f73eaed608dc39f229afc78f71dcc4c8b7d7c684aa647e3c6a3a204027444d69e53e169ce94e8d1fa8d7dee80c9c8fed +"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.5.1, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 languageName: node linkType: hard @@ -24768,14 +22217,7 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: 10/aae7911ddc5f444a9025fbd979ad1b5d60191011339bce48e555cb83343d0f98b865ff5c4d71fecdfb8555a5cafdc65632f6fce172f32aaf6936830a883a0380 - languageName: node - linkType: hard - -"cookie@npm:0.6.0, cookie@npm:^0.6.0": +"cookie@npm:0.6.0": version: 0.6.0 resolution: "cookie@npm:0.6.0" checksum: 10/c1f8f2ea7d443b9331680598b0ae4e6af18a618c37606d1bbdc75bec8361cce09fe93e727059a673f2ba24467131a9fb5a4eec76bb1b149c1b3e1ccb268dc583 @@ -24789,13 +22231,20 @@ __metadata: languageName: node linkType: hard -"cookie@npm:^0.4.1, cookie@npm:~0.4.1": +"cookie@npm:^0.4.1": version: 0.4.2 resolution: "cookie@npm:0.4.2" checksum: 10/2e1de9fdedca54881eab3c0477aeb067f281f3155d9cfee9d28dfb252210d09e85e9d175c0a60689661feb9e35e588515352f2456bc1f8e8db4267e05fd70137 languageName: node linkType: hard +"cookie@npm:^0.7.0, cookie@npm:~0.7.2": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10/24b286c556420d4ba4e9bc09120c9d3db7d28ace2bd0f8ccee82422ce42322f73c8312441271e5eefafbead725980e5996cc02766dbb89a90ac7f5636ede608f + languageName: node + linkType: hard + "cookiejar@npm:^2.1.1, cookiejar@npm:^2.1.2": version: 2.1.4 resolution: "cookiejar@npm:2.1.4" @@ -24851,44 +22300,19 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.31.0": - version: 3.32.1 - resolution: "core-js-compat@npm:3.32.1" - dependencies: - browserslist: "npm:^4.21.10" - checksum: 10/e01f29cd369d4c2ba690a591e1613b167126afd10c44af4e260da1348394262f5b78c727cff864c342e328b2bf2522acad9afdcc783bc14ceb66bc18b0bf931d - languageName: node - linkType: hard - -"core-js-compat@npm:^3.32.2": - version: 3.33.0 - resolution: "core-js-compat@npm:3.33.0" +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1, core-js-compat@npm:^3.34.0, core-js-compat@npm:^3.38.0, core-js-compat@npm:^3.38.1": + version: 3.39.0 + resolution: "core-js-compat@npm:3.39.0" dependencies: - browserslist: "npm:^4.22.1" - checksum: 10/b1a5f7aab1c6ac0efd86c1412a5b27fb372c4e52c4b8f2c80b05216385125c4de30e4c36e4bcc6bfeec917a56e7736c87fab6a301ff8faaa1ae4acf81643fc9a - languageName: node - linkType: hard - -"core-js-compat@npm:^3.34.0": - version: 3.37.1 - resolution: "core-js-compat@npm:3.37.1" - dependencies: - browserslist: "npm:^4.23.0" - checksum: 10/30c6fdbd9ff179cc53951814689b8aabec106e5de6cddfa7a7feacc96b66d415b8eebcf5ec8f7c68ef35c552fe7d39edb8b15b1ce0f27379a272295b6e937061 - languageName: node - linkType: hard - -"core-js-pure@npm:^3.0.1": - version: 3.38.1 - resolution: "core-js-pure@npm:3.38.1" - checksum: 10/7dfd59bf3a09277056ac2ef87e49b49d77340952e99ee12b3e1e53bf7e1f34a8ee1fb6026f286b1ba29957f5728664430ccd1ff86983c7ae5fa411d4da74d3de + browserslist: "npm:^4.24.2" + checksum: 10/82d5fcb54087f1fc174283c2d30b62908edc828537574f95bb49a5b7f235bcc88ba43f37dbe470c47e17fd9bc01cbc1db905062fd96ba65ff1a03c235f288aca languageName: node linkType: hard -"core-js-pure@npm:^3.23.3": - version: 3.32.1 - resolution: "core-js-pure@npm:3.32.1" - checksum: 10/6ebd41c95cf5da8e032f9c9100360196c5e2af8b0c074a6e151c96e6390329814e87ad737bc44566990928d9af73304252112b6c15d3f43784473d0260bbe0f4 +"core-js-pure@npm:^3.0.1, core-js-pure@npm:^3.23.3": + version: 3.39.0 + resolution: "core-js-pure@npm:3.39.0" + checksum: 10/43922b14f9c928ec958fc444e70cfb429a21e3f842f03f67810faf29a99780fec20dc688f65ab3780d2b8a2f1ae8287464ec5adb396826e0374a4f2907b4b383 languageName: node linkType: hard @@ -24900,9 +22324,9 @@ __metadata: linkType: hard "core-js@npm:^3.19.2": - version: 3.32.1 - resolution: "core-js@npm:3.32.1" - checksum: 10/8d76615ef67f2cf8d2af05e4ec8e5663c941a461c97ff3f53eca6b4ab6fb765ef1b88509827b510963044aa122153f25c3073f3de7fcad06cc1b3f6c06a725c3 + version: 3.39.0 + resolution: "core-js@npm:3.39.0" + checksum: 10/a3d34e669783dfc878e545f1983f60d9ff48a3867cd1d7ff8839b849e053002a208c7c14a5ca354b8e0b54982901e2f83dc87c3d9b95de0a94b4071d1c74e5f6 languageName: node linkType: hard @@ -24942,7 +22366,7 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:7.0.1, cosmiconfig@npm:^7.0.1": +"cosmiconfig@npm:7.0.1": version: 7.0.1 resolution: "cosmiconfig@npm:7.0.1" dependencies: @@ -24968,7 +22392,7 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:^7.0.0, cosmiconfig@npm:^7.1.0": +"cosmiconfig@npm:^7.0.0, cosmiconfig@npm:^7.0.1, cosmiconfig@npm:^7.1.0": version: 7.1.0 resolution: "cosmiconfig@npm:7.1.0" dependencies: @@ -24982,8 +22406,8 @@ __metadata: linkType: hard "cosmiconfig@npm:^8.0.0, cosmiconfig@npm:^8.2.0": - version: 8.3.5 - resolution: "cosmiconfig@npm:8.3.5" + version: 8.3.6 + resolution: "cosmiconfig@npm:8.3.6" dependencies: import-fresh: "npm:^3.3.0" js-yaml: "npm:^4.1.0" @@ -24994,7 +22418,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/f1963997fb42bc9c3d1b7d553b72ca48f58deb2ea1bb7736930aa7255b876179f35a74dffaa0a95b9d5d7a830b04d592bc34173baad14b8084933a49a873971d + checksum: 10/91d082baca0f33b1c085bf010f9ded4af43cbedacba8821da0fb5667184d0a848addc52c31fadd080007f904a555319c238cf5f4c03e6d58ece2e4876b2e73d6 languageName: node linkType: hard @@ -25027,24 +22451,14 @@ __metadata: languageName: node linkType: hard -"cpu-features@npm:0.0.2": - version: 0.0.2 - resolution: "cpu-features@npm:0.0.2" - dependencies: - nan: "npm:^2.14.1" - node-gyp: "npm:latest" - checksum: 10/f39e11d1898025f98da7e51945b1095d58e2a16ff0c1835de95ecfb4ca60d3427667b38094ccf021cca8c5df69a05a4bba29aae8344426af3e06daf06ce0bbf4 - languageName: node - linkType: hard - -"cpu-features@npm:~0.0.8": - version: 0.0.8 - resolution: "cpu-features@npm:0.0.8" +"cpu-features@npm:~0.0.10": + version: 0.0.10 + resolution: "cpu-features@npm:0.0.10" dependencies: buildcheck: "npm:~0.0.6" - nan: "npm:^2.17.0" + nan: "npm:^2.19.0" node-gyp: "npm:latest" - checksum: 10/0fa7071a671c847bf7742e0843a7cb89b4f422a162632a49363d6065e7e8b08c07e3ddaa0d523fe66d06625a5848b8c96bc5f0aa31ab7ef95442dc9abae49c23 + checksum: 10/941b828ffe77582b2bdc03e894c913e2e2eeb5c6043ccb01338c34446d026f6888dc480ecb85e684809f9c3889d245f3648c7907eb61a92bdfc6aed039fcda8d languageName: node linkType: hard @@ -25076,19 +22490,7 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": - version: 1.2.1 - resolution: "crc-32@npm:1.2.1" - dependencies: - exit-on-epipe: "npm:~1.0.1" - printj: "npm:~1.3.1" - bin: - crc32: bin/crc32.njs - checksum: 10/20349ff0e7f73c1fed382f5b572522767681f241820382df601c5e61eda365b525e0fe87d58182c07d563557b67bde526b42bfcb907b25359c0f3f56ccf34e80 - languageName: node - linkType: hard - -"crc-32@npm:^1.2.2": +"crc-32@npm:^1.2.0, crc-32@npm:^1.2.2": version: 1.2.2 resolution: "crc-32@npm:1.2.2" bin: @@ -25109,7 +22511,7 @@ __metadata: languageName: node linkType: hard -"create-ecdh@npm:^4.0.0": +"create-ecdh@npm:^4.0.0, create-ecdh@npm:^4.0.4": version: 4.0.4 resolution: "create-ecdh@npm:4.0.4" dependencies: @@ -25146,6 +22548,23 @@ __metadata: languageName: node linkType: hard +"create-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "create-jest@npm:29.7.0" + dependencies: + "@jest/types": "npm:^29.6.3" + chalk: "npm:^4.0.0" + exit: "npm:^0.1.2" + graceful-fs: "npm:^4.2.9" + jest-config: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + prompts: "npm:^2.0.1" + bin: + create-jest: bin/create-jest.js + checksum: 10/847b4764451672b4174be4d5c6d7d63442ec3aa5f3de52af924e4d996d87d7801c18e125504f25232fc75840f6625b3ac85860fac6ce799b5efae7bdcaf4a2b7 + languageName: node + linkType: hard + "create-require@npm:^1.1.0": version: 1.1.1 resolution: "create-require@npm:1.1.1" @@ -25202,7 +22621,7 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.0.6, cross-fetch@npm:^3.1.0, cross-fetch@npm:^3.1.5": +"cross-fetch@npm:^3.0.6, cross-fetch@npm:^3.1.0, cross-fetch@npm:^3.1.4, cross-fetch@npm:^3.1.5": version: 3.1.8 resolution: "cross-fetch@npm:3.1.8" dependencies: @@ -25211,15 +22630,6 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.1.4": - version: 3.1.5 - resolution: "cross-fetch@npm:3.1.5" - dependencies: - node-fetch: "npm:2.6.7" - checksum: 10/5d101a3b1e6cb172f0e5e8168cbc927eeff2ef915f33ceef50fed85441df870e1fdff195b56eca36fae8b78ddba5d8e913b8927f73d11b19d27e96301438cd30 - languageName: node - linkType: hard - "cross-fetch@npm:^4.0.0": version: 4.0.0 resolution: "cross-fetch@npm:4.0.0" @@ -25229,7 +22639,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:7.0.3, cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -25274,9 +22684,20 @@ __metadata: languageName: node linkType: hard +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": + version: 7.0.5 + resolution: "cross-spawn@npm:7.0.5" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/c95062469d4bdbc1f099454d01c0e77177a3733012d41bf907a71eb8d22d2add43b5adf6a0a14ef4e7feaf804082714d6c262ef4557a1c480b86786c120d18e2 + languageName: node + linkType: hard + "crypto-addr-codec@npm:^0.1.7": - version: 0.1.7 - resolution: "crypto-addr-codec@npm:0.1.7" + version: 0.1.8 + resolution: "crypto-addr-codec@npm:0.1.8" dependencies: base-x: "npm:^3.0.8" big-integer: "npm:1.6.36" @@ -25285,11 +22706,11 @@ __metadata: ripemd160-min: "npm:0.0.6" safe-buffer: "npm:^5.2.0" sha3: "npm:^2.1.1" - checksum: 10/57bb8bdba342bd6a3b16a49a421fe0edb9b0b52d7695385baabf55a2ed91cb61ec90b5436921885fc78a30f75ceaa2569bcf953f6d8b532ea8323f70b4ae806c + checksum: 10/cb086919331ae0acb2f1ace78ea81c1f400ecea8b9f2fc680f8e2be1475b62a90ec09643ca07c90a37097c1c9eaf0705c5cadfb5010ec96dc7d6bb1b2b80188a languageName: node linkType: hard -"crypto-browserify@npm:3.12.0, crypto-browserify@npm:^3.12.0": +"crypto-browserify@npm:3.12.0": version: 3.12.0 resolution: "crypto-browserify@npm:3.12.0" dependencies: @@ -25308,6 +22729,26 @@ __metadata: languageName: node linkType: hard +"crypto-browserify@npm:^3.12.0": + version: 3.12.1 + resolution: "crypto-browserify@npm:3.12.1" + dependencies: + browserify-cipher: "npm:^1.0.1" + browserify-sign: "npm:^4.2.3" + create-ecdh: "npm:^4.0.4" + create-hash: "npm:^1.2.0" + create-hmac: "npm:^1.1.7" + diffie-hellman: "npm:^5.0.3" + hash-base: "npm:~3.0.4" + inherits: "npm:^2.0.4" + pbkdf2: "npm:^3.1.2" + public-encrypt: "npm:^4.0.3" + randombytes: "npm:^2.1.0" + randomfill: "npm:^1.0.4" + checksum: 10/13da0b5f61b3e8e68fcbebf0394f2b2b4d35a0d0ba6ab762720c13391d3697ea42735260a26328a6a3d872be7d4cb5abe98a7a8f88bc93da7ba59b993331b409 + languageName: node + linkType: hard + "crypto-js@npm:4.2.0, crypto-js@npm:^4.2.0": version: 4.2.0 resolution: "crypto-js@npm:4.2.0" @@ -25522,7 +22963,7 @@ __metadata: languageName: node linkType: hard -"css-loader@npm:6.8.1, css-loader@npm:^6.5.1": +"css-loader@npm:6.8.1": version: 6.8.1 resolution: "css-loader@npm:6.8.1" dependencies: @@ -25540,6 +22981,30 @@ __metadata: languageName: node linkType: hard +"css-loader@npm:^6.5.1": + version: 6.11.0 + resolution: "css-loader@npm:6.11.0" + dependencies: + icss-utils: "npm:^5.1.0" + postcss: "npm:^8.4.33" + postcss-modules-extract-imports: "npm:^3.1.0" + postcss-modules-local-by-default: "npm:^4.0.5" + postcss-modules-scope: "npm:^3.2.0" + postcss-modules-values: "npm:^4.0.0" + postcss-value-parser: "npm:^4.2.0" + semver: "npm:^7.5.4" + peerDependencies: + "@rspack/core": 0.x || 1.x + webpack: ^5.0.0 + peerDependenciesMeta: + "@rspack/core": + optional: true + webpack: + optional: true + checksum: 10/9e3665509f6786d46683de5c5f5c4bdd4aa62396b4017b41dbbb41ea5ada4012c80ee1e3302b79b504bc24da7fa69e3552d99006cecc953e0d9eef4a3053b929 + languageName: node + linkType: hard + "css-loader@npm:^7.1.2": version: 7.1.2 resolution: "css-loader@npm:7.1.2" @@ -25687,9 +23152,9 @@ __metadata: linkType: hard "cssdb@npm:^7.1.0": - version: 7.7.1 - resolution: "cssdb@npm:7.7.1" - checksum: 10/2e24443084b9d38bcceae91ed6d2d47f2c6726ea55e653f258b880b509f1ad66d63a013385e43dcd5189899904a918b7b31ef236d831c1d7f3707c9441a1d711 + version: 7.11.2 + resolution: "cssdb@npm:7.11.2" + checksum: 10/234e15ff8b09083d67b4fb1d97dc619f5a328bc559f9633eb312dc4020d9af0a1a57b5813de0868af0e93d2d327e9f684243a9933e1ac863d21e291c2ea6ebc9 languageName: node linkType: hard @@ -25802,14 +23267,7 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.0.2": - version: 3.0.10 - resolution: "csstype@npm:3.0.10" - checksum: 10/0c731ca8305004cc64abac17798e654e89b21ebd1ad68a7dff48084743c29cc22aed268341998d88d9b39f8f91ed61b0083e93a6105d7776eb1650efcc417c5b - languageName: node - linkType: hard - -"csstype@npm:^3.1.3": +"csstype@npm:^3.0.2, csstype@npm:^3.1.3": version: 3.1.3 resolution: "csstype@npm:3.1.3" checksum: 10/f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade @@ -25887,17 +23345,7 @@ __metadata: languageName: node linkType: hard -"d@npm:1, d@npm:^1.0.1": - version: 1.0.1 - resolution: "d@npm:1.0.1" - dependencies: - es5-ext: "npm:^0.10.50" - type: "npm:^1.0.1" - checksum: 10/1296e3f92e646895681c1cb564abd0eb23c29db7d62c5120a279e84e98915499a477808e9580760f09e3744c0ed7ac8f7cff98d096ba9770754f6ef0f1c97983 - languageName: node - linkType: hard - -"d@npm:^1.0.2": +"d@npm:1, d@npm:^1.0.1, d@npm:^1.0.2": version: 1.0.2 resolution: "d@npm:1.0.2" dependencies: @@ -26013,26 +23461,21 @@ __metadata: linkType: hard "date-fns@npm:^2.16.1": - version: 2.28.0 - resolution: "date-fns@npm:2.28.0" - checksum: 10/2d99e884f7dc020971a394deef35cc4a2685cdf6c99585a79d64d271eb639e0e483f17948ec06c2820b01cc662b6e76b7be2aa3d671d530444447bf836cd40f8 + version: 2.30.0 + resolution: "date-fns@npm:2.30.0" + dependencies: + "@babel/runtime": "npm:^7.21.0" + checksum: 10/70b3e8ea7aaaaeaa2cd80bd889622a4bcb5d8028b4de9162cbcda359db06e16ff6e9309e54eead5341e71031818497f19aaf9839c87d1aba1e27bb4796e758a9 languageName: node linkType: hard -"date-format@npm:^4.0.14": +"date-format@npm:^4.0.14, date-format@npm:^4.0.3": version: 4.0.14 resolution: "date-format@npm:4.0.14" checksum: 10/6b07fd1df247439c53b71244e3468b93e6dfebb5d409b9328dd7b7e9ed0d2e875018e20fb1a95ae6b677dea708ec06aaa5058a7a5faa1a7f649338aabf04991a languageName: node linkType: hard -"date-format@npm:^4.0.3": - version: 4.0.3 - resolution: "date-format@npm:4.0.3" - checksum: 10/5f5ea388dc211e8e5cab515b72b5b6fa071d42d029bdc8cc71a7f8a2d25726c3128a49d9ad78474d1b1ba39f83fe9837e431d0bfc8de5941f850d06cf5841eb5 - languageName: node - linkType: hard - "debounce-fn@npm:^4.0.0": version: 4.0.0 resolution: "debounce-fn@npm:4.0.0" @@ -26067,7 +23510,19 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.1, debug@npm:~4.3.2": +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:~4.3.1, debug@npm:~4.3.2, debug@npm:~4.3.4": + version: 4.3.7 + resolution: "debug@npm:4.3.7" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/71168908b9a78227ab29d5d25fe03c5867750e31ce24bf2c44a86efc5af041758bb56569b0a3d48a9b5344c00a24a777e6f4100ed6dfd9534a42c1dde285125a + languageName: node + linkType: hard + +"debug@npm:4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -26079,7 +23534,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4.3.5, debug@npm:~4.3.4": +"debug@npm:4.3.5": version: 4.3.5 resolution: "debug@npm:4.3.5" dependencies: @@ -26091,7 +23546,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.0.1, debug@npm:^3.1.0, debug@npm:^3.2.6, debug@npm:^3.2.7": +"debug@npm:^3.0.1, debug@npm:^3.1.0, debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -26100,25 +23555,13 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.5": - version: 4.3.6 - resolution: "debug@npm:4.3.6" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10/d3adb9af7d57a9e809a68f404490cf776122acca16e6359a2702c0f462e510e91f9765c07f707b8ab0d91e03bad57328f3256f5082631cefb5393d0394d50fb7 - languageName: node - linkType: hard - "decamelize-keys@npm:^1.1.0": - version: 1.1.0 - resolution: "decamelize-keys@npm:1.1.0" + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" dependencies: decamelize: "npm:^1.1.0" map-obj: "npm:^1.0.0" - checksum: 10/968813219ec20e167b01294cdc0eb754a8b4dc979fda6989f498d9a483822efd341683aeb09a3f3c50bf974211bc4779c39d792e19cfafc6fc2e6e5d9343850c + checksum: 10/71d5898174f17a8d2303cecc98ba0236e842948c4d042a8180d5e749be8442220bca2d16dd93bebd7b49e86c807814273212e4da0fae67be7c58c282ff76057a languageName: node linkType: hard @@ -26157,7 +23600,7 @@ __metadata: languageName: node linkType: hard -"decompress-response@npm:^3.2.0, decompress-response@npm:^3.3.0": +"decompress-response@npm:^3.3.0": version: 3.3.0 resolution: "decompress-response@npm:3.3.0" dependencies: @@ -26245,19 +23688,7 @@ __metadata: languageName: node linkType: hard -"dedent@npm:^1.0.0": - version: 1.5.1 - resolution: "dedent@npm:1.5.1" - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - checksum: 10/fc00a8bc3dfb7c413a778dc40ee8151b6c6ff35159d641f36ecd839c1df5c6e0ec5f4992e658c82624a1a62aaecaffc23b9c965ceb0bbf4d698bfc16469ac27d - languageName: node - linkType: hard - -"dedent@npm:^1.5.3": +"dedent@npm:^1.0.0, dedent@npm:^1.5.3": version: 1.5.3 resolution: "dedent@npm:1.5.3" peerDependencies: @@ -26270,15 +23701,15 @@ __metadata: linkType: hard "deep-eql@npm:^4.1.2": - version: 4.1.3 - resolution: "deep-eql@npm:4.1.3" + version: 4.1.4 + resolution: "deep-eql@npm:4.1.4" dependencies: type-detect: "npm:^4.0.0" - checksum: 10/12ce93ae63de187e77b076d3d51bfc28b11f98910a22c18714cce112791195e86a94f97788180994614b14562a86c9763f67c69f785e4586f806b5df39bf9301 + checksum: 10/f04f4d581f044a824a6322fe4f68fbee4d6780e93fc710cd9852cbc82bfc7010df00f0e05894b848abbe14dc3a25acac44f424e181ae64d12f2ab9d0a875a5ef languageName: node linkType: hard -"deep-equal@npm:^2.0.5": +"deep-equal@npm:^2.0.5, deep-equal@npm:^2.2.2": version: 2.2.3 resolution: "deep-equal@npm:2.2.3" dependencies: @@ -26304,32 +23735,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:^2.2.2": - version: 2.2.2 - resolution: "deep-equal@npm:2.2.2" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.1" - is-arguments: "npm:^1.1.1" - is-array-buffer: "npm:^3.0.2" - is-date-object: "npm:^1.0.5" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - isarray: "npm:^2.0.5" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.0" - side-channel: "npm:^1.0.4" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 10/883cb8b3cf10d387ce8fb191f7d7b46b48022e00810074c5629053953aa3be5c5890dd40d30d31d27fb140af9a541c06c852ab5d28f76b07095c9d28e3c4b04f - languageName: node - linkType: hard - "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -26344,17 +23749,17 @@ __metadata: languageName: node linkType: hard -"deepmerge-ts@npm:^5.1.0": - version: 5.1.0 - resolution: "deepmerge-ts@npm:5.1.0" - checksum: 10/0f615ccfb27b93a286abc315d7d1ec171f1befe9c511c2799ca7184c11fc6a6f29f5368d446c6885338de0d95cf6cb66a5ff4c55141a1265012730bd69408cf9 +"deepmerge-ts@npm:^7.1.0": + version: 7.1.3 + resolution: "deepmerge-ts@npm:7.1.3" + checksum: 10/255388a44be0b8f32516fe7f4dd13a3ff6be60ddecaf4458bce1734e5c36d79042387e022d7b6bed69ddf6f42494210e317c477cd83e83681473c1ff4bda5fd0 languageName: node linkType: hard "deepmerge@npm:^4.2.2": - version: 4.2.2 - resolution: "deepmerge@npm:4.2.2" - checksum: 10/0e58ed14f530d08f9b996cfc3a41b0801691620235bc5e1883260e3ed1c1b4a1dfb59f865770e45d5dfb1d7ee108c4fc10c2f85e822989d4123490ea90be2545 + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 languageName: node linkType: hard @@ -26384,6 +23789,15 @@ __metadata: languageName: node linkType: hard +"default-gateway@npm:^7.2.2": + version: 7.2.2 + resolution: "default-gateway@npm:7.2.2" + dependencies: + execa: "npm:^7.1.1" + checksum: 10/4798ca44536674728496f786abfacec6038b7fd01ee158dae6a84b9e18cee62b1d9a28bce563cbe27ac3d889a9408c03aa8f10c0cb0d766b635d34c0bb9c42b4 + languageName: node + linkType: hard + "default-require-extensions@npm:^1.0.0": version: 1.0.0 resolution: "default-require-extensions@npm:1.0.0" @@ -26403,20 +23817,20 @@ __metadata: linkType: hard "default-require-extensions@npm:^3.0.0": - version: 3.0.0 - resolution: "default-require-extensions@npm:3.0.0" + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" dependencies: strip-bom: "npm:^4.0.0" - checksum: 10/0b5bdb6786ebb0ff6ef55386f37c8d221963fbbd3009588fe71032c85ca16da05eff2ad01bfe9bfc8bac5ce95a18f66b38c50d454482e3e9d2de1142424a3e7c + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 languageName: node linkType: hard "defaults@npm:^1.0.3": - version: 1.0.3 - resolution: "defaults@npm:1.0.3" + version: 1.0.4 + resolution: "defaults@npm:1.0.4" dependencies: clone: "npm:^1.0.2" - checksum: 10/96e2112da6553d376afd5265ea7cbdb2a3b45535965d71ab8bb1da10c8126d168fdd5268799625324b368356d21ba2a7b3d4ec50961f11a47b7feb9de3d4413e + checksum: 10/3a88b7a587fc076b84e60affad8b85245c01f60f38fc1d259e7ac1d89eb9ce6abb19e27215de46b98568dd5bc48471730b327637e6f20b0f1bc85cf00440c80a languageName: node linkType: hard @@ -26427,7 +23841,7 @@ __metadata: languageName: node linkType: hard -"defer-to-connect@npm:^2.0.1": +"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": version: 2.0.1 resolution: "defer-to-connect@npm:2.0.1" checksum: 10/8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b @@ -26472,18 +23886,7 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": - version: 1.1.1 - resolution: "define-data-property@npm:1.1.1" - dependencies: - get-intrinsic: "npm:^1.2.1" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/5573c8df96b5857408cad64d9b91b69152e305ce4b06218e5f49b59c6cafdbb90a8bd8a0bb83c7bc67a8d479c04aa697063c9bc28d849b7282f9327586d6bc7b - languageName: node - linkType: hard - -"define-data-property@npm:^1.1.2": +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": version: 1.1.4 resolution: "define-data-property@npm:1.1.4" dependencies: @@ -26508,26 +23911,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3": - version: 1.1.3 - resolution: "define-properties@npm:1.1.3" - dependencies: - object-keys: "npm:^1.0.12" - checksum: 10/33125cafaf4de2c9934cfba20e0a45bccc53fa6d85370a48c0b5a9a0c76c7d0497a5fdf01bc5c1186cb61f2747f19f43520ca6fdd37b4d0290f552c6747e0a17 - languageName: node - linkType: hard - -"define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": - version: 1.2.0 - resolution: "define-properties@npm:1.2.0" - dependencies: - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10/e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 - languageName: node - linkType: hard - -"define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -26677,7 +24061,7 @@ __metadata: languageName: node linkType: hard -"depd@npm:^1.1.0, depd@npm:^1.1.2, depd@npm:~1.1.2": +"depd@npm:^1.1.0, depd@npm:~1.1.2": version: 1.1.2 resolution: "depd@npm:1.1.2" checksum: 10/2ed6966fc14463a9e85451db330ab8ba041efed0b9a1a472dbfc6fbf2f82bab66491915f996b25d8517dddc36c8c74e24c30879b34877f3c4410733444a51d1d @@ -26705,7 +24089,7 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.3": +"dequal@npm:^2.0.0": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 10/6ff05a7561f33603df87c45e389c9ac0a95e3c056be3da1a0c4702149e3a7f6fe5ffbb294478687ba51a9e95f3a60e8b6b9005993acd79c292c7d15f71964b6b @@ -26713,12 +24097,12 @@ __metadata: linkType: hard "des.js@npm:^1.0.0": - version: 1.0.1 - resolution: "des.js@npm:1.0.1" + version: 1.1.0 + resolution: "des.js@npm:1.1.0" dependencies: inherits: "npm:^2.0.1" minimalistic-assert: "npm:^1.0.0" - checksum: 10/f8eed334f85228d0cd985e3299c9e65ab70f6b82852f4dfb3eb2614ec7927ece262fed172daca02b57899388477046739225663739e54185d90cc5e5c10b4e11 + checksum: 10/d35fc82b5a0b2127b12699212e90b54ddd8134e0cf8d27a8c30507ed3572aa574ab71800cbb473769128a52dcf21acc3271c5c359508a5aa772e990df3b1a698 languageName: node linkType: hard @@ -26750,7 +24134,7 @@ __metadata: languageName: node linkType: hard -"detect-indent@npm:^7.0.0": +"detect-indent@npm:^7.0.0, detect-indent@npm:^7.0.1": version: 7.0.1 resolution: "detect-indent@npm:7.0.1" checksum: 10/cbf3f0b1c3c881934ca94428e1179b26ab2a587e0d719031d37a67fb506d49d067de54ff057cb1e772e75975fed5155c01cd4518306fee60988b1486e3fc7768 @@ -26758,9 +24142,9 @@ __metadata: linkType: hard "detect-libc@npm:^2.0.0": - version: 2.0.1 - resolution: "detect-libc@npm:2.0.1" - checksum: 10/f41b3d8c726127cc010c78bf4cdb6fda20a1a0731ae9fc34698e3b9887d82e19f249f4dc997b423f930d5be0c3ee05dc7fe6c2473dd058856c6b0700eb3e0dc6 + version: 2.0.3 + resolution: "detect-libc@npm:2.0.3" + checksum: 10/b4ea018d623e077bd395f168a9e81db77370dde36a5b01d067f2ad7989924a81d31cb547ff764acb2aa25d50bb7fdde0b0a93bec02212b0cb430621623246d39 languageName: node linkType: hard @@ -26874,6 +24258,15 @@ __metadata: languageName: node linkType: hard +"devlop@npm:^1.0.0": + version: 1.1.0 + resolution: "devlop@npm:1.1.0" + dependencies: + dequal: "npm:^2.0.0" + checksum: 10/3cc5f903d02d279d6dc4aa71ab6ed9898b9f4d1f861cc5421ce7357893c21b9520de78afb203c92bd650a6977ad0ca98195453a0707a39958cf5fea3b0a8ddd8 + languageName: node + linkType: hard + "did-resolver@npm:^4.0.0, did-resolver@npm:^4.1.0": version: 4.1.0 resolution: "did-resolver@npm:4.1.0" @@ -26895,10 +24288,10 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^29.4.3": - version: 29.4.3 - resolution: "diff-sequences@npm:29.4.3" - checksum: 10/2287b259400513332d757f921eeda7c740863a919a00bd1d1b22ab2532b3e763538c404aec0953a813bbe33e660cbc77d0742875d6674d8dc5bc31d74ec88cc1 +"diff-sequences@npm:^29.6.3": + version: 29.6.3 + resolution: "diff-sequences@npm:29.6.3" + checksum: 10/179daf9d2f9af5c57ad66d97cb902a538bcf8ed64963fa7aa0c329b3de3665ce2eb6ffdc2f69f29d445fa4af2517e5e55e5b6e00c00a9ae4f43645f97f7078cb languageName: node linkType: hard @@ -26930,7 +24323,7 @@ __metadata: languageName: node linkType: hard -"diffie-hellman@npm:^5.0.0": +"diffie-hellman@npm:^5.0.0, diffie-hellman@npm:^5.0.3": version: 5.0.3 resolution: "diffie-hellman@npm:5.0.3" dependencies: @@ -26957,43 +24350,36 @@ __metadata: languageName: node linkType: hard -"dns-equal@npm:^1.0.0": - version: 1.0.0 - resolution: "dns-equal@npm:1.0.0" - checksum: 10/c4f55af6f13536de39ebcfa15f504a5678d4fc2cf37b76fd41e73aa46dbd1fa596c9468c0c929aeb248ec443cb217fde949942c513312acf93c76cf783276617 - languageName: node - linkType: hard - "dns-over-http-resolver@npm:^2.1.0": - version: 2.1.2 - resolution: "dns-over-http-resolver@npm:2.1.2" + version: 2.1.3 + resolution: "dns-over-http-resolver@npm:2.1.3" dependencies: debug: "npm:^4.3.1" native-fetch: "npm:^4.0.2" receptacle: "npm:^1.3.2" undici: "npm:^5.12.0" - checksum: 10/bdefd7873ebf2a86752d17b4abc1388451aa894c76c06e231bf1e6e33168f8ac71417c6d6e84e1323a3749ce08f3670f81a160bed761e639dd0f5d3952a3f0b7 + checksum: 10/26064fbc911051c4b7820cb4e0159c4dfdfe2cf959a6ab9a1e51baea36e7e25d5e622edf501ce404490091d6515d1db11cabff523900e910a980b6957386435d languageName: node linkType: hard -"dns-packet@npm:^5.2.2": - version: 5.5.0 - resolution: "dns-packet@npm:5.5.0" +"dns-packet@npm:^5.2.2, dns-packet@npm:^5.6.1": + version: 5.6.1 + resolution: "dns-packet@npm:5.6.1" dependencies: "@leichtgewicht/ip-codec": "npm:^2.0.1" - checksum: 10/5726c63b83a085ecd9b4a2bd0434a69b500aec30ed9aaf51cc3ff270081e2543a6fc096edcba88905ee5f6b304c5ab5e4139fdbcbc777d35cabe74e34378c295 + checksum: 10/ef5496dd5a906e22ed262cbe1a6f5d532c0893c4f1884a7aa37d4d0d8b8376a2b43f749aab087c8bb1354d67b40444f7fca8de4017b161a4cea468543061aed3 languageName: node linkType: hard "docker-modem@npm:^3.0.0": - version: 3.0.3 - resolution: "docker-modem@npm:3.0.3" + version: 3.0.8 + resolution: "docker-modem@npm:3.0.8" dependencies: debug: "npm:^4.1.1" readable-stream: "npm:^3.5.0" split-ca: "npm:^1.0.1" - ssh2: "npm:^1.4.0" - checksum: 10/266030d49961a82810152150b13be459490eabb00ca319786930a31ca4a0491bf1ea89ac43b7972a7dbc807e1f73b92bb482be0682247cbf1180b58b80fc08d7 + ssh2: "npm:^1.11.0" + checksum: 10/a731d057b3da5a9da3dd9aff7e25bc33f2d29f3e0af947bd823d1361350071afb5b7cb0582af5bf012b08fca356520685bcff87bfcba08e85725576b32f264a2 languageName: node linkType: hard @@ -27008,12 +24394,13 @@ __metadata: linkType: hard "dockerode@npm:^3.3.1": - version: 3.3.1 - resolution: "dockerode@npm:3.3.1" + version: 3.3.5 + resolution: "dockerode@npm:3.3.5" dependencies: + "@balena/dockerignore": "npm:^1.0.2" docker-modem: "npm:^3.0.0" tar-fs: "npm:~2.0.1" - checksum: 10/7bf4c06a2f63b6afaf8000355cca6c89f142a7dbb61a92efb8b0947adc277b9e85e642b9b8ee51d6c2a2d6d8d115088afb852c6055a22562eb39d9f40aabc874 + checksum: 10/1748e8d96f88fe71bb165a4c05726904937f5863b69eaeb4a3c1bb3bbf66940c7bef13b349ff757dc43664b4367611aab76f35c1ba468f07dcbaba567e6acd88 languageName: node linkType: hard @@ -27082,13 +24469,13 @@ __metadata: linkType: hard "dom-serializer@npm:^1.0.1": - version: 1.3.2 - resolution: "dom-serializer@npm:1.3.2" + version: 1.4.1 + resolution: "dom-serializer@npm:1.4.1" dependencies: domelementtype: "npm:^2.0.1" domhandler: "npm:^4.2.0" entities: "npm:^2.0.0" - checksum: 10/102ea83664e4943977a83a76b37a626b81491498d93b64f80cc45abc0e86cc0feec6fbaa98dba0750fd1005712a4449bc3de491a2032ba7befdfd18e42bcb349 + checksum: 10/53b217bcfed4a0f90dd47f34f239b1c81fff53ffa39d164d722325817fdb554903b145c2d12c8421ce0df7d31c1b180caf7eacd3c86391dd925f803df8027dcc languageName: node linkType: hard @@ -27111,9 +24498,9 @@ __metadata: linkType: hard "domain-browser@npm:^4.19.0": - version: 4.22.0 - resolution: "domain-browser@npm:4.22.0" - checksum: 10/3ffbaf0cae8da717698d472ca85ab52f96c538fe1fe85e5eb3351d4e7af52423ce096b8a0c51bb318e1c9ccf9c2e94b3b0f68e5923ad0aa0c623a32b641ed11c + version: 4.23.0 + resolution: "domain-browser@npm:4.23.0" + checksum: 10/56d5a969ed330a16aa6f03f26e7ba3b98e07c7ce4a77d08f987e9e424f1deca009070ed9bd24011d9b863499dcba95de4d679bba77aef346ee23230e570ab9cf languageName: node linkType: hard @@ -27124,14 +24511,7 @@ __metadata: languageName: node linkType: hard -"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0": - version: 2.2.0 - resolution: "domelementtype@npm:2.2.0" - checksum: 10/24cb386198640cd58aa36f8c987f2ea61859929106d06ffcc8f547e70cb2ed82a6dc56dcb8252b21fba1f1ea07df6e4356d60bfe57f77114ca1aed6828362629 - languageName: node - linkType: hard - -"domelementtype@npm:^2.3.0": +"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0, domelementtype@npm:^2.3.0": version: 2.3.0 resolution: "domelementtype@npm:2.3.0" checksum: 10/ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 @@ -27147,16 +24527,7 @@ __metadata: languageName: node linkType: hard -"domhandler@npm:^4.0.0, domhandler@npm:^4.2.0": - version: 4.3.0 - resolution: "domhandler@npm:4.3.0" - dependencies: - domelementtype: "npm:^2.2.0" - checksum: 10/9f158c0af1307176cbca5de9a18e4a514156710dd732de306efbe4b923b8ac8f49b61b19ff0db3dcc8969e865e5abcfcb281fe1f637926dc62125da8961a088a - languageName: node - linkType: hard - -"domhandler@npm:^4.3.1": +"domhandler@npm:^4.0.0, domhandler@npm:^4.2.0, domhandler@npm:^4.3.1": version: 4.3.1 resolution: "domhandler@npm:4.3.1" dependencies: @@ -27165,7 +24536,7 @@ __metadata: languageName: node linkType: hard -"domhandler@npm:^5.0.1, domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": +"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": version: 5.0.3 resolution: "domhandler@npm:5.0.3" dependencies: @@ -27195,14 +24566,14 @@ __metadata: languageName: node linkType: hard -"domutils@npm:^3.0.1": - version: 3.0.1 - resolution: "domutils@npm:3.0.1" +"domutils@npm:^3.0.1, domutils@npm:^3.1.0": + version: 3.1.0 + resolution: "domutils@npm:3.1.0" dependencies: dom-serializer: "npm:^2.0.0" domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.1" - checksum: 10/c0031e4bf89bf701c552c6aa7937262351ae863d5bb0395ebae9cdb23eb3de0077343ca0ddfa63861d98c31c02bbabe4c6e0e11be87b04a090a4d5dbb75197dc + domhandler: "npm:^5.0.3" + checksum: 10/9a169a6e57ac4c738269a73ab4caf785114ed70e46254139c1bbc8144ac3102aacb28a6149508395ae34aa5d6a40081f4fa5313855dc8319c6d8359866b6dfea languageName: node linkType: hard @@ -27225,7 +24596,7 @@ __metadata: languageName: node linkType: hard -"dot-prop@npm:^5.1.0, dot-prop@npm:^5.2.0": +"dot-prop@npm:^5.1.0": version: 5.3.0 resolution: "dot-prop@npm:5.3.0" dependencies: @@ -27257,6 +24628,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:16.0.1": + version: 16.0.1 + resolution: "dotenv@npm:16.0.1" + checksum: 10/4b530b0cc1ecfbff93ce4641fb7bbcd5731a54c3acfbdbd00283073ec3f0cbff8e93946a68eaa6fa8ece33d442555e6a61a01da8fffb553d20838ba079bf1a20 + languageName: node + linkType: hard + "dotenv@npm:16.0.3": version: 16.0.3 resolution: "dotenv@npm:16.0.3" @@ -27332,14 +24710,14 @@ __metadata: linkType: hard "duplexify@npm:^4.0.0": - version: 4.1.2 - resolution: "duplexify@npm:4.1.2" + version: 4.1.3 + resolution: "duplexify@npm:4.1.3" dependencies: end-of-stream: "npm:^1.4.1" inherits: "npm:^2.0.3" readable-stream: "npm:^3.1.1" - stream-shift: "npm:^1.0.0" - checksum: 10/eeb4f362defa4da0b2474d853bc4edfa446faeb1bde76819a68035632c118de91f6a58e6fe05c84f6e6de2548f8323ec8473aa9fe37332c99e4d77539747193e + stream-shift: "npm:^1.0.2" + checksum: 10/b44b98ba0ffac3a658b4b1bf877219e996db288c5ae6f3dc55ca9b2cbef7df60c10eabfdd947f3d73a623eb9975a74a66d6d61e6f26bff90155315adb362aa77 languageName: node linkType: hard @@ -27410,77 +24788,35 @@ __metadata: linkType: hard "ejs@npm:^3.1.6": - version: 3.1.9 - resolution: "ejs@npm:3.1.9" + version: 3.1.10 + resolution: "ejs@npm:3.1.10" dependencies: jake: "npm:^10.8.5" bin: ejs: bin/cli.js - checksum: 10/71f56d37540d2c2d71701f0116710c676f75314a3e997ef8b83515d5d4d2b111c5a72725377caeecb928671bacb84a0d38135f345904812e989847057d59f21a + checksum: 10/a9cb7d7cd13b7b1cd0be5c4788e44dd10d92f7285d2f65b942f33e127230c054f99a42db4d99f766d8dbc6c57e94799593ee66a14efd7c8dd70c4812bf6aa384 languageName: node linkType: hard "electron-fetch@npm:^1.7.2": - version: 1.7.4 - resolution: "electron-fetch@npm:1.7.4" + version: 1.9.1 + resolution: "electron-fetch@npm:1.9.1" dependencies: encoding: "npm:^0.1.13" - checksum: 10/194823297aedc30cc4d4e653110b7e21d4db3a543ae846a1405318a04b34eb1471eed112eacfaef183c7f47ce89389dea73c6b6122fa2ea8b7f12329773f2e9c + checksum: 10/f2c54541e6434f3b428bb05d6f207beeecfb8822009fa4e21b33f695959f3d2bb5f8ca0a6353f9941e8c0193e575ac63a03fb208783a5e4ace9dba68c18d0510 languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.118": - version: 1.4.137 - resolution: "electron-to-chromium@npm:1.4.137" - checksum: 10/3e0bbd1faaa654efcc13214245cbee8c51178e8c4f3bfdb1a458bc933fe2d3794b9992c627f73f5fbf131f9f0268ba8dfbba1198efbfc868821fa071fbc17d57 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.284": - version: 1.4.351 - resolution: "electron-to-chromium@npm:1.4.351" - checksum: 10/24e83251330f3a14f7e58c1272da8f4337e9ebbc818fbaa1ef543ad6550d1bbf48a2fc3c0caa8a7cb8f6778b832ec40091f15b924cdba1d442e7d9f351ae7abd - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.431": - version: 1.4.447 - resolution: "electron-to-chromium@npm:1.4.447" - checksum: 10/96930b29c58f1ba5db97c1537a8dd84eecc4040f612a47c96b92d0981decd74a9588d0ca5a27e4a4bdf18b34db1f11ea18d5ecf44484ae14e9f7d20682eaa0ab - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.477": - version: 1.4.513 - resolution: "electron-to-chromium@npm:1.4.513" - checksum: 10/13f79eb6fbe18feba45e79283f119d098d58f08774e881ed9f41ac0d0b161457da08717c8705a0bf694147876331bfd0a0e0f49c5ffd6ab0303aa4cf70aa7188 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.535": - version: 1.4.556 - resolution: "electron-to-chromium@npm:1.4.556" - checksum: 10/b5edf73fa95d5a9d2dceb66c77e5893656d2af938065416dc7d3d5dbb91d6e661a314d069d10cdc4f78adbb8c74eea1a0d6d9012c36415d4418046c6f407cbef - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.601": - version: 1.4.640 - resolution: "electron-to-chromium@npm:1.4.640" - checksum: 10/75cfe02be2e2b0c7f53e8d97e9d3cd0d8959a4e861f7bf944abace94f9872b9e31128ca3140f657b8b886b919d46f7af03efaf0d8bd8b9a4b48e3212fdd2ec01 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.4.820": - version: 1.4.827 - resolution: "electron-to-chromium@npm:1.4.827" - checksum: 10/7fa44aeebc5548874d33e417579d998d8e9a3d7b07fae22429ee7de5866c73b3158d56969146df3dcf44a222dcd91972ee786d0427f461e0c98bff79e408e782 +"electron-to-chromium@npm:^1.5.41": + version: 1.5.55 + resolution: "electron-to-chromium@npm:1.5.55" + checksum: 10/0e1dabaf7056a886902c5fd4b681b98e633575183c213cd912a9f8e55c100458e2fa399864f93bc82a696679c6b05f5781e4ded787644e44e3f3fce7e3e23cdb languageName: node linkType: hard "elliptic@npm:>=6.5.7": - version: 6.5.7 - resolution: "elliptic@npm:6.5.7" + version: 6.6.0 + resolution: "elliptic@npm:6.6.0" dependencies: bn.js: "npm:^4.11.9" brorand: "npm:^1.1.0" @@ -27489,7 +24825,7 @@ __metadata: inherits: "npm:^2.0.4" minimalistic-assert: "npm:^1.0.1" minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10/fbad1fad0a5cc07df83f80cc1f7a784247ef59075194d3e340eaeb2f4dd594825ee24c7e9b0cf279c9f1982efe610503bb3139737926428c4821d4fca1bcf348 + checksum: 10/27575b0403e010e5d7e7a131fcadce6a7dd1ae82ccb24cc7c20b275d32ab1cb7ecb6a070225795df08407441dc8c7a32efd986596d48d1d6846f64ff8f094af7 languageName: node linkType: hard @@ -27529,9 +24865,9 @@ __metadata: linkType: hard "emoji-regex@npm:^10.3.0": - version: 10.3.0 - resolution: "emoji-regex@npm:10.3.0" - checksum: 10/b9b084ebe904f13bb4b66ee4c29fb41a7a4a1165adcc33c1ce8056c0194b882cc91ebdc782f1a779b5d7ea7375c5064643a7734893d7c657b44c5c6b9d7bf1e7 + version: 10.4.0 + resolution: "emoji-regex@npm:10.4.0" + checksum: 10/76bb92c5bcf0b6980d37e535156231e4a9d0aa6ab3b9f5eabf7690231d5aa5d5b8e516f36e6804cbdd0f1c23dfef2a60c40ab7bb8aedd890584281a565b97c50 languageName: node linkType: hard @@ -27609,6 +24945,16 @@ __metadata: languageName: node linkType: hard +"encoding-sniffer@npm:^0.2.0": + version: 0.2.0 + resolution: "encoding-sniffer@npm:0.2.0" + dependencies: + iconv-lite: "npm:^0.6.3" + whatwg-encoding: "npm:^3.1.1" + checksum: 10/fe61a759dbef4d94ddc6f4fa645459897f4275eba04f0135d0459099b5f62fbba8a7ae57d23c9ec9b118c4c39ce056b51f1b8e62ad73a8ab365699448d655f4c + languageName: node + linkType: hard + "encoding@npm:^0.1.12, encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -27650,70 +24996,38 @@ __metadata: linkType: hard "engine.io-parser@npm:~5.0.3": - version: 5.0.3 - resolution: "engine.io-parser@npm:5.0.3" - dependencies: - "@socket.io/base64-arraybuffer": "npm:~1.0.2" - checksum: 10/2d20b041378d612c0038a71a323d2baa26c594cbee1c2d0f7f0fb737f5273e8a8ec46348bdb5c9c613e3451a48dc9e36a2dba206865239f082fed3404b6d1da4 + version: 5.0.7 + resolution: "engine.io-parser@npm:5.0.7" + checksum: 10/c5cf6efc572f9c7231c67c69946e2cdd8e3dc870f692ddae73e62794915719ee0fd4cd3973349ef30c2f957111c7b7eebe0b61fef9e1d9f9634fb58fafbd05f2 languageName: node linkType: hard "engine.io-parser@npm:~5.2.1": - version: 5.2.1 - resolution: "engine.io-parser@npm:5.2.1" - checksum: 10/31f16fd1d64d6c3997f910606a0a8b143a86da98b06346ba7970e9bdf25cc8485caf69b4939dc5a829b312c7db5dbbdcc1fe3787b105bcc175e61b9d37a7e687 + version: 5.2.3 + resolution: "engine.io-parser@npm:5.2.3" + checksum: 10/eb0023fff5766e7ae9d59e52d92df53fea06d472cfd7b52e5d2c36b4c1dbf78cab5fde1052bcb3d4bb85bdb5aee10ae85d8a1c6c04676dac0c6cdf16bcba6380 languageName: node linkType: hard "engine.io@npm:>=6.4.2": - version: 6.5.3 - resolution: "engine.io@npm:6.5.3" + version: 6.6.2 + resolution: "engine.io@npm:6.6.2" dependencies: "@types/cookie": "npm:^0.4.1" "@types/cors": "npm:^2.8.12" "@types/node": "npm:>=10.0.0" accepts: "npm:~1.3.4" base64id: "npm:2.0.0" - cookie: "npm:~0.4.1" + cookie: "npm:~0.7.2" cors: "npm:~2.8.5" debug: "npm:~4.3.1" engine.io-parser: "npm:~5.2.1" - ws: "npm:~8.11.0" - checksum: 10/50e022f94d6417be00d0ab4b70b57fe6b0f597a73c7fdf7e2b7570e0ce65d3e94caadebca759155fdf66a6812159b068afb88fd56655d5fa71d43933c9985c81 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.0.0": - version: 5.12.0 - resolution: "enhanced-resolve@npm:5.12.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/ea5b49a0641827c6a083eaa3a625f953f4bd4e8f015bf70b9fb8cf60a35aaeb44e567df2da91ed28efaea3882845016e1d22a3152c2fdf773ea14f39cbe3d8a9 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.14.1": - version: 5.17.0 - resolution: "enhanced-resolve@npm:5.17.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/8f7bf71537d78e7d20a27363793f2c9e13ec44800c7c7830364a448f80a44994aa19d64beecefa1ab49e4de6f7fbe18cc0931dc449c115f02918ff5fcbe7705f - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.15.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10/180c3f2706f9117bf4dc7982e1df811dad83a8db075723f299245ef4488e0cad7e96859c5f0e410682d28a4ecd4da021ec7d06265f7e4eb6eed30c69ca5f7d3e + ws: "npm:~8.17.1" + checksum: 10/381c0a715362bebf32c95f0e4247899b53ff9f8c0074b03f88748cf17635a02948ea3eca27905df37130bc963747c0d286acc78c757e6fc085fe8b8e17d76e01 languageName: node linkType: hard -"enhanced-resolve@npm:^5.17.1": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.14.1, enhanced-resolve@npm:^5.15.0, enhanced-resolve@npm:^5.17.1": version: 5.17.1 resolution: "enhanced-resolve@npm:5.17.1" dependencies: @@ -27723,7 +25037,7 @@ __metadata: languageName: node linkType: hard -"enquirer@npm:2.3.6, enquirer@npm:^2.3.0, enquirer@npm:^2.3.6": +"enquirer@npm:2.3.6": version: 2.3.6 resolution: "enquirer@npm:2.3.6" dependencies: @@ -27732,6 +25046,16 @@ __metadata: languageName: node linkType: hard +"enquirer@npm:^2.3.0, enquirer@npm:^2.3.6": + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" + dependencies: + ansi-colors: "npm:^4.1.1" + strip-ansi: "npm:^6.0.1" + checksum: 10/b3726486cd98f0d458a851a03326a2a5dd4d84f37ff94ff2a2960c915e0fc865865da3b78f0877dc36ac5c1189069eca603e82ec63d5bc6b0dd9985bf6426d7a + languageName: node + linkType: hard + "entities@npm:^2.0.0": version: 2.2.0 resolution: "entities@npm:2.2.0" @@ -27739,10 +25063,10 @@ __metadata: languageName: node linkType: hard -"entities@npm:^4.2.0, entities@npm:^4.3.0, entities@npm:^4.4.0": - version: 4.4.0 - resolution: "entities@npm:4.4.0" - checksum: 10/b627cb900e901cc7817037b83bf993a1cbf6a64850540f7526af7bcf9c7d09ebc671198e6182cfae4680f733799e2852e6a1c46aa62ff36eb99680057a038df5 +"entities@npm:^4.2.0, entities@npm:^4.3.0, entities@npm:^4.4.0, entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 languageName: node linkType: hard @@ -27761,11 +25085,11 @@ __metadata: linkType: hard "envinfo@npm:^7.7.3": - version: 7.8.1 - resolution: "envinfo@npm:7.8.1" + version: 7.14.0 + resolution: "envinfo@npm:7.14.0" bin: envinfo: dist/cli.js - checksum: 10/e7a2d71c7dfe398a4ffda0e844e242d2183ef2627f98e74e4cd71edd2af691c8707a2b34aacef92538c27b3daf9a360d32202f33c0a9f27f767c4e1c6ba8b522 + checksum: 10/0d9d711f2b6ae02dec89dd768a3390acbcb99ac50d07f20e635a8d2db68447703476db535483592d1ed4656c3d36eee4883032d71a5118c917b4973e2d4fa027 languageName: node linkType: hard @@ -27819,173 +25143,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.2, es-abstract@npm:^1.22.1": - version: 1.22.1 - resolution: "es-abstract@npm:1.22.1" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - arraybuffer.prototype.slice: "npm:^1.0.1" - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-set-tostringtag: "npm:^2.0.1" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.5" - get-intrinsic: "npm:^1.2.1" - get-symbol-description: "npm:^1.0.0" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.2" - is-callable: "npm:^1.2.7" - is-negative-zero: "npm:^2.0.2" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.10" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.12.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.0" - safe-array-concat: "npm:^1.0.0" - safe-regex-test: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.7" - string.prototype.trimend: "npm:^1.0.6" - string.prototype.trimstart: "npm:^1.0.6" - typed-array-buffer: "npm:^1.0.0" - typed-array-byte-length: "npm:^1.0.0" - typed-array-byte-offset: "npm:^1.0.0" - typed-array-length: "npm:^1.0.4" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.10" - checksum: 10/bd6c243a128ea1cb97cdd11c433a1f712b607b66bb2d40b42e4a4e4c746e679d3c168b59614fefed4bc3b0d7abc106ad202e8f417739371a151b9189d75af72a - languageName: node - linkType: hard - -"es-abstract@npm:^1.18.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1": - version: 1.19.1 - resolution: "es-abstract@npm:1.19.1" - dependencies: - call-bind: "npm:^1.0.2" - es-to-primitive: "npm:^1.2.1" - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.1.1" - get-symbol-description: "npm:^1.0.0" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.2" - internal-slot: "npm:^1.0.3" - is-callable: "npm:^1.2.4" - is-negative-zero: "npm:^2.0.1" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.1" - is-string: "npm:^1.0.7" - is-weakref: "npm:^1.0.1" - object-inspect: "npm:^1.11.0" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.2" - string.prototype.trimend: "npm:^1.0.4" - string.prototype.trimstart: "npm:^1.0.4" - unbox-primitive: "npm:^1.0.1" - checksum: 10/39d31c7dea477bd0fc89404e4beb3b008832e8c56426a448e5c44577929063037824130ea12f6273012b6d744b49c0ba11d7696fc8eb55731f2444d86a8a8e14 - languageName: node - linkType: hard - -"es-abstract@npm:^1.20.4, es-abstract@npm:^1.21.2": - version: 1.21.2 - resolution: "es-abstract@npm:1.21.2" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-set-tostringtag: "npm:^2.0.1" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.5" - get-intrinsic: "npm:^1.2.0" - get-symbol-description: "npm:^1.0.0" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.2" - is-callable: "npm:^1.2.7" - is-negative-zero: "npm:^2.0.2" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.10" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.12.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.4.3" - safe-regex-test: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.7" - string.prototype.trimend: "npm:^1.0.6" - string.prototype.trimstart: "npm:^1.0.6" - typed-array-length: "npm:^1.0.4" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.9" - checksum: 10/2e1d6922c9a03d90f5a45fa56574a14f9436d9711ed424ace23ae87f79d0190dbffda1c0564980f6048dc2348f0390427a1fbae309fdb16a9ed42cd5c79dce6e - languageName: node - linkType: hard - -"es-abstract@npm:^1.22.3": - version: 1.22.5 - resolution: "es-abstract@npm:1.22.5" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - arraybuffer.prototype.slice: "npm:^1.0.3" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.7" - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - es-to-primitive: "npm:^1.2.1" - function.prototype.name: "npm:^1.1.6" - get-intrinsic: "npm:^1.2.4" - get-symbol-description: "npm:^1.0.2" - globalthis: "npm:^1.0.3" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.1" - internal-slot: "npm:^1.0.7" - is-array-buffer: "npm:^3.0.4" - is-callable: "npm:^1.2.7" - is-negative-zero: "npm:^2.0.3" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.3" - is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.13" - is-weakref: "npm:^1.0.2" - object-inspect: "npm:^1.13.1" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.5" - regexp.prototype.flags: "npm:^1.5.2" - safe-array-concat: "npm:^1.1.0" - safe-regex-test: "npm:^1.0.3" - string.prototype.trim: "npm:^1.2.8" - string.prototype.trimend: "npm:^1.0.7" - string.prototype.trimstart: "npm:^1.0.7" - typed-array-buffer: "npm:^1.0.2" - typed-array-byte-length: "npm:^1.0.1" - typed-array-byte-offset: "npm:^1.0.2" - typed-array-length: "npm:^1.0.5" - unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.14" - checksum: 10/33bba7be636a6c56d836bb7d8860d2082deb02903c906cf31a93840302ac42c731b6d4f6393c1d112fa46c8778b2c1282e7833d206fe5e88e803dab1c8afefed - languageName: node - linkType: hard - -"es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2": +"es-abstract@npm:^1.17.2, es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -28055,7 +25213,7 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.0.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5 @@ -28079,25 +25237,26 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.12": - version: 1.0.15 - resolution: "es-iterator-helpers@npm:1.0.15" +"es-iterator-helpers@npm:^1.1.0": + version: 1.2.0 + resolution: "es-iterator-helpers@npm:1.2.0" dependencies: - asynciterator.prototype: "npm:^1.0.0" - call-bind: "npm:^1.0.2" + call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.1" - es-set-tostringtag: "npm:^2.0.1" - function-bind: "npm:^1.1.1" - get-intrinsic: "npm:^1.2.1" - globalthis: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.0" - has-proto: "npm:^1.0.1" + es-abstract: "npm:^1.23.3" + es-errors: "npm:^1.3.0" + es-set-tostringtag: "npm:^2.0.3" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + globalthis: "npm:^1.0.4" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - iterator.prototype: "npm:^1.1.2" - safe-array-concat: "npm:^1.0.1" - checksum: 10/78535c00c49d81df603e650886d3806f3cd8d288e2c07703cfb145725753a3d2df19bff9feeb14cd1baed02252d1f85c4bbc922c8db02841722ab3ec02e78339 + internal-slot: "npm:^1.0.7" + iterator.prototype: "npm:^1.1.3" + safe-array-concat: "npm:^1.1.2" + checksum: 10/a4159e36c6bae03d4b636894fff2ff1acfcedc16c622939298b00adf4d2da6356ad92f682cc75c037a012a4b06adb903f67dfdfd05bac61847e9b763de2acbcb languageName: node linkType: hard @@ -28109,9 +25268,9 @@ __metadata: linkType: hard "es-module-lexer@npm:^1.2.1": - version: 1.3.0 - resolution: "es-module-lexer@npm:1.3.0" - checksum: 10/dee2af09669d05282db987839681ea1917ce31ce4a2364cc9eb598675344c5c709895e7e782db87794065a6f3af054552e2cf42ccadcaec4c9fc0cbc4898f193 + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: 10/f29c7c97a58eb17640dcbd71bd6ef754ad4f58f95c3073894573d29dae2cad43ecd2060d97ed5b866dfb7804d5590fb7de1d2c5339a5fceae8bd60b580387fc5 languageName: node linkType: hard @@ -28124,17 +25283,6 @@ __metadata: languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.1": - version: 2.0.1 - resolution: "es-set-tostringtag@npm:2.0.1" - dependencies: - get-intrinsic: "npm:^1.1.3" - has: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.0" - checksum: 10/ec416a12948cefb4b2a5932e62093a7cf36ddc3efd58d6c58ca7ae7064475ace556434b869b0bbeb0c365f1032a8ccd577211101234b69837ad83ad204fff884 - languageName: node - linkType: hard - "es-set-tostringtag@npm:^2.0.3": version: 2.0.3 resolution: "es-set-tostringtag@npm:2.0.3" @@ -28146,16 +25294,7 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0": - version: 1.0.0 - resolution: "es-shim-unscopables@npm:1.0.0" - dependencies: - has: "npm:^1.0.3" - checksum: 10/ac2db2c70d253cf83bebcdc974d185239e205ca18af743efd3b656bac00cabfee2358a050b18b63b46972dab5cfa10ef3f2597eb3a8d4d6d9417689793665da6 - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.2": +"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -28175,7 +25314,7 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:^0.10.64, es5-ext@npm:~0.10.14, es5-ext@npm:~0.10.46": +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.62, es5-ext@npm:^0.10.63, es5-ext@npm:^0.10.64, es5-ext@npm:~0.10.14, es5-ext@npm:~0.10.46": version: 0.10.64 resolution: "es5-ext@npm:0.10.64" dependencies: @@ -28219,13 +25358,6 @@ __metadata: languageName: node linkType: hard -"es6-object-assign@npm:^1.1.0": - version: 1.1.0 - resolution: "es6-object-assign@npm:1.1.0" - checksum: 10/396c30376c89e91b5435f177ff83ba0d5ba265e3583cbaaa3bce185df08bf87db58c6d5d84600634280cbf35f8f342569b6ab776d728a12e177e5db82f5b6e2f - languageName: node - linkType: hard - "es6-promise@npm:^4.1.1, es6-promise@npm:^4.2.8": version: 4.2.8 resolution: "es6-promise@npm:4.2.8" @@ -28247,17 +25379,7 @@ __metadata: languageName: node linkType: hard -"es6-symbol@npm:^3.0.2, es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": - version: 3.1.3 - resolution: "es6-symbol@npm:3.1.3" - dependencies: - d: "npm:^1.0.1" - ext: "npm:^1.1.2" - checksum: 10/b404e5ecae1a076058aa2ba2568d87e2cb4490cb1130784b84e7b4c09c570b487d4f58ed685a08db8d350bd4916500dd3d623b26e6b3520841d30d2ebb152f8d - languageName: node - linkType: hard - -"es6-symbol@npm:~3.1.1": +"es6-symbol@npm:^3.0.2, es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3, es6-symbol@npm:~3.1.1": version: 3.1.4 resolution: "es6-symbol@npm:3.1.4" dependencies: @@ -28534,24 +25656,10 @@ __metadata: languageName: node linkType: hard -"escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: 10/afa618e73362576b63f6ca83c975456621095a1ed42ff068174e3f5cea48afc422814dda548c96e6ebb5333e7265140c7292abcc81bbd6ccb1757d50d3a4e182 - languageName: node - linkType: hard - -"escalade@npm:^3.1.2": - version: 3.1.2 - resolution: "escalade@npm:3.1.2" - checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 - languageName: node - linkType: hard - -"escape-goat@npm:^2.0.0": - version: 2.1.1 - resolution: "escape-goat@npm:2.1.1" - checksum: 10/ce05c70c20dd7007b60d2d644b625da5412325fdb57acf671ba06cb2ab3cd6789e2087026921a05b665b0a03fadee2955e7fc0b9a67da15a6551a980b260eba7 +"escalade@npm:^3.1.1, escalade@npm:^3.2.0": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10/9d7169e3965b2f9ae46971afa392f6e5a25545ea30f2e2dd99c9b0a95a3f52b5653681a84f5b2911a413ddad2d7a93d3514165072f349b5ffc59c75a899970d6 languageName: node linkType: hard @@ -28590,6 +25698,25 @@ __metadata: languageName: node linkType: hard +"escodegen@npm:^1.8.1": + version: 1.14.3 + resolution: "escodegen@npm:1.14.3" + dependencies: + esprima: "npm:^4.0.1" + estraverse: "npm:^4.2.0" + esutils: "npm:^2.0.2" + optionator: "npm:^0.8.1" + source-map: "npm:~0.6.1" + dependenciesMeta: + source-map: + optional: true + bin: + escodegen: bin/escodegen.js + esgenerate: bin/esgenerate.js + checksum: 10/70f095ca9393535f9f1c145ef99dc0b3ff14cca6bc4a79d90ff3352f90c3f2e07f75af6d6c05174ea67c45271f75e80dd440dd7d04ed2cf44c9452c3042fa84a + languageName: node + linkType: hard + "escodegen@npm:^2.0.0": version: 2.1.0 resolution: "escodegen@npm:2.1.0" @@ -28701,7 +25828,7 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.3.7, eslint-import-resolver-node@npm:^0.3.9": +"eslint-import-resolver-node@npm:^0.3.9": version: 0.3.9 resolution: "eslint-import-resolver-node@npm:0.3.9" dependencies: @@ -28712,27 +25839,15 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.0.0": - version: 2.9.0 - resolution: "eslint-module-utils@npm:2.9.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10/13e001c96a6ce8d3d7ad6798c9b86351820c9c4a9abc5a152e84b838d7937a781471b0128ee690d18def226741fc96e8c5cff78c059bdcafe9ab8625777fcf2a - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.8.0": - version: 2.8.0 - resolution: "eslint-module-utils@npm:2.8.0" +"eslint-module-utils@npm:^2.0.0, eslint-module-utils@npm:^2.12.0, eslint-module-utils@npm:^2.8.0": + version: 2.12.0 + resolution: "eslint-module-utils@npm:2.12.0" dependencies: debug: "npm:^3.2.7" peerDependenciesMeta: eslint: optional: true - checksum: 10/a9a7ed93eb858092e3cdc797357d4ead2b3ea06959b0eada31ab13862d46a59eb064b9cb82302214232e547980ce33618c2992f6821138a4934e65710ed9cc29 + checksum: 10/dd27791147eca17366afcb83f47d6825b6ce164abb256681e5de4ec1d7e87d8605641eb869298a0dbc70665e2446dbcc2f40d3e1631a9475dd64dd23d4ca5dee languageName: node linkType: hard @@ -28790,29 +25905,31 @@ __metadata: linkType: hard "eslint-plugin-import@npm:^2.25.3": - version: 2.28.1 - resolution: "eslint-plugin-import@npm:2.28.1" + version: 2.31.0 + resolution: "eslint-plugin-import@npm:2.31.0" dependencies: - array-includes: "npm:^3.1.6" - array.prototype.findlastindex: "npm:^1.2.2" - array.prototype.flat: "npm:^1.3.1" - array.prototype.flatmap: "npm:^1.3.1" + "@rtsao/scc": "npm:^1.1.0" + array-includes: "npm:^3.1.8" + array.prototype.findlastindex: "npm:^1.2.5" + array.prototype.flat: "npm:^1.3.2" + array.prototype.flatmap: "npm:^1.3.2" debug: "npm:^3.2.7" doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.7" - eslint-module-utils: "npm:^2.8.0" - has: "npm:^1.0.3" - is-core-module: "npm:^2.13.0" + eslint-import-resolver-node: "npm:^0.3.9" + eslint-module-utils: "npm:^2.12.0" + hasown: "npm:^2.0.2" + is-core-module: "npm:^2.15.1" is-glob: "npm:^4.0.3" minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.6" - object.groupby: "npm:^1.0.0" - object.values: "npm:^1.1.6" + object.fromentries: "npm:^2.0.8" + object.groupby: "npm:^1.0.3" + object.values: "npm:^1.2.0" semver: "npm:^6.3.1" - tsconfig-paths: "npm:^3.14.2" + string.prototype.trimend: "npm:^1.0.8" + tsconfig-paths: "npm:^3.15.0" peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10/707dc97f06b12b0f3f91d5248dcea91bcd6a72c1168249a3ba177dd1ab6f31de9d5db829705236207a6ae79ad99a7a03efdfddb4a703da3a85530f9cc7401b2f + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + checksum: 10/6b76bd009ac2db0615d9019699d18e2a51a86cb8c1d0855a35fb1b418be23b40239e6debdc6e8c92c59f1468ed0ea8d7b85c817117a113d5cc225be8a02ad31c languageName: node linkType: hard @@ -28854,28 +25971,27 @@ __metadata: linkType: hard "eslint-plugin-jsx-a11y@npm:^6.5.1": - version: 6.7.1 - resolution: "eslint-plugin-jsx-a11y@npm:6.7.1" + version: 6.10.2 + resolution: "eslint-plugin-jsx-a11y@npm:6.10.2" dependencies: - "@babel/runtime": "npm:^7.20.7" - aria-query: "npm:^5.1.3" - array-includes: "npm:^3.1.6" - array.prototype.flatmap: "npm:^1.3.1" - ast-types-flow: "npm:^0.0.7" - axe-core: "npm:^4.6.2" - axobject-query: "npm:^3.1.1" + aria-query: "npm:^5.3.2" + array-includes: "npm:^3.1.8" + array.prototype.flatmap: "npm:^1.3.2" + ast-types-flow: "npm:^0.0.8" + axe-core: "npm:^4.10.0" + axobject-query: "npm:^4.1.0" damerau-levenshtein: "npm:^1.0.8" emoji-regex: "npm:^9.2.2" - has: "npm:^1.0.3" - jsx-ast-utils: "npm:^3.3.3" - language-tags: "npm:=1.0.5" + hasown: "npm:^2.0.2" + jsx-ast-utils: "npm:^3.3.5" + language-tags: "npm:^1.0.9" minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.6" - object.fromentries: "npm:^2.0.6" - semver: "npm:^6.3.0" + object.fromentries: "npm:^2.0.8" + safe-regex-test: "npm:^1.0.3" + string.prototype.includes: "npm:^2.0.1" peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10/b7eb451304dc27c9552649a716be1de3b5d577f39e53f6da6a2dac084b84b349b0224be3020439f99c2b3bf417a13c5591326f1ce6af8d74f1cb5d5d95c4222b + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 + checksum: 10/388550798548d911e2286d530a29153ca00434a06fcfc0e31e0dda46a5e7960005e532fb29ce1ccbf1e394a3af3e5cf70c47ca43778861eacc5e3ed799adb79c languageName: node linkType: hard @@ -28947,37 +26063,39 @@ __metadata: linkType: hard "eslint-plugin-react-hooks@npm:^4.3.0": - version: 4.6.0 - resolution: "eslint-plugin-react-hooks@npm:4.6.0" + version: 4.6.2 + resolution: "eslint-plugin-react-hooks@npm:4.6.2" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 10/3c63134e056a6d98d66e2c475c81f904169db817e89316d14e36269919e31f4876a2588aa0e466ec8ef160465169c627fe823bfdaae7e213946584e4a165a3ac + checksum: 10/5a0680941f34e70cf505bcb6082df31a3e445d193ee95a88ff3483041eb944f4cefdaf7e81b0eb1feb4eeceee8c7c6ddb8a2a6e8c4c0388514a42e16ac7b7a69 languageName: node linkType: hard "eslint-plugin-react@npm:^7.27.1": - version: 7.33.2 - resolution: "eslint-plugin-react@npm:7.33.2" + version: 7.37.2 + resolution: "eslint-plugin-react@npm:7.37.2" dependencies: - array-includes: "npm:^3.1.6" - array.prototype.flatmap: "npm:^1.3.1" - array.prototype.tosorted: "npm:^1.1.1" + array-includes: "npm:^3.1.8" + array.prototype.findlast: "npm:^1.2.5" + array.prototype.flatmap: "npm:^1.3.2" + array.prototype.tosorted: "npm:^1.1.4" doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.12" + es-iterator-helpers: "npm:^1.1.0" estraverse: "npm:^5.3.0" + hasown: "npm:^2.0.2" jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.6" - object.fromentries: "npm:^2.0.6" - object.hasown: "npm:^1.1.2" - object.values: "npm:^1.1.6" + object.entries: "npm:^1.1.8" + object.fromentries: "npm:^2.0.8" + object.values: "npm:^1.2.0" prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.4" + resolve: "npm:^2.0.0-next.5" semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.8" + string.prototype.matchall: "npm:^4.0.11" + string.prototype.repeat: "npm:^1.0.0" peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10/cb8c5dd5859cace330e24b7d74b9c652c0d93ef1d87957261fe1ac2975c27c918d0d5dc607f25aba4972ce74d04456f4f93883a16ac10cd598680d047fc3495d + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + checksum: 10/df2f7ab198018d3378f305a8a5ceceebc9bd31f019fc7567a2ef9c77789dc8a6a2c3c3957f8b0805f26c11c02f9f86c972e02cd0eda12f4d0370526c11f8a9a3 languageName: node linkType: hard @@ -29078,14 +26196,7 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": - version: 3.4.1 - resolution: "eslint-visitor-keys@npm:3.4.1" - checksum: 10/92641e7ccde470065aa2931161a6a053690a54aae35ae08f38e376ecfd7c012573c542b37a3baecf921eb951fd57943411392f464c2b8f3399adee4723a1369f - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b @@ -29205,16 +26316,17 @@ __metadata: linkType: hard "eslint@npm:^8.3.0": - version: 8.48.0 - resolution: "eslint@npm:8.48.0" + version: 8.57.1 + resolution: "eslint@npm:8.57.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.2" - "@eslint/js": "npm:8.48.0" - "@humanwhocodes/config-array": "npm:^0.11.10" + "@eslint/eslintrc": "npm:^2.1.4" + "@eslint/js": "npm:8.57.1" + "@humanwhocodes/config-array": "npm:^0.13.0" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" + "@ungap/structured-clone": "npm:^1.2.0" ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" cross-spawn: "npm:^7.0.2" @@ -29247,7 +26359,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 10/43ba3a939aa9203b2d98de9aa242262f10dd242eba6f9f72d17cd9ba8a82085441ffa8b93e017aae0561d52d3bcf49fde3afda4d25b4f95ff4e7274dc911474a + checksum: 10/5504fa24879afdd9f9929b2fbfc2ee9b9441a3d464efd9790fbda5f05738858530182029f13323add68d19fec749d3ab4a70320ded091ca4432b1e9cc4ed104c languageName: node linkType: hard @@ -29336,6 +26448,16 @@ __metadata: languageName: node linkType: hard +"esprima@npm:1.2.2": + version: 1.2.2 + resolution: "esprima@npm:1.2.2" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/7ed9274abb1fed861354239f0da8fa3ec6592617ad0fd2aab16b0beb0425137c46f05c82faa0de89b3bb3d704054815c2657658c7e221b1fb550e88c237eefd2 + languageName: node + linkType: hard + "esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -29347,11 +26469,11 @@ __metadata: linkType: hard "esquery@npm:^1.0.0, esquery@npm:^1.4.2": - version: 1.5.0 - resolution: "esquery@npm:1.5.0" + version: 1.6.0 + resolution: "esquery@npm:1.6.0" dependencies: estraverse: "npm:^5.1.0" - checksum: 10/e65fcdfc1e0ff5effbf50fb4f31ea20143ae5df92bb2e4953653d8d40aa4bc148e0d06117a592ce4ea53eeab1dafdfded7ea7e22a5be87e82d73757329a1b01d + checksum: 10/c587fb8ec9ed83f2b1bc97cf2f6854cc30bf784a79d62ba08c6e358bf22280d69aee12827521cf38e69ae9761d23fb7fde593ce315610f85655c139d99b05e5a languageName: node linkType: hard @@ -29474,11 +26596,11 @@ __metadata: linkType: hard "ethereum-bloom-filters@npm:^1.0.6": - version: 1.0.10 - resolution: "ethereum-bloom-filters@npm:1.0.10" + version: 1.2.0 + resolution: "ethereum-bloom-filters@npm:1.2.0" dependencies: - js-sha3: "npm:^0.8.0" - checksum: 10/dc4191c5d810db864ace106886f340b541bf03f1ad3249459ac630cab9c191f1e45c03e935887cca903cca884326e3ac97acfef0a083c7e1a004108f5991f9ba + "@noble/hashes": "npm:^1.4.0" + checksum: 10/86556762d0dff5d90e67fb5c76202b1258dc7de19f1dd537a339cf199094df0fc9f0f69a15bd2d6fe672a3ba4615b2493e53c72230b724d10c0d2daae7363936 languageName: node linkType: hard @@ -29517,15 +26639,15 @@ __metadata: languageName: node linkType: hard -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": - version: 2.1.2 - resolution: "ethereum-cryptography@npm:2.1.2" +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2, ethereum-cryptography@npm:^2.2.1": + version: 2.2.1 + resolution: "ethereum-cryptography@npm:2.2.1" dependencies: - "@noble/curves": "npm:1.1.0" - "@noble/hashes": "npm:1.3.1" - "@scure/bip32": "npm:1.3.1" - "@scure/bip39": "npm:1.2.1" - checksum: 10/78983d01ac95047158ec03237ba318152b2c707ccc6a44225da11c72ed6ca575ca0c1630eaf9878fc82fe26272d6624939ef6f020cc89ddddfb941a7393ab909 + "@noble/curves": "npm:1.4.2" + "@noble/hashes": "npm:1.4.0" + "@scure/bip32": "npm:1.4.0" + "@scure/bip39": "npm:1.3.0" + checksum: 10/ab123bbfe843500ac2d645ce9edc4bc814962ffb598db6bf8bf01fbecac656e6c81ff4cf2472f1734844bbcbad2bf658d8b699cb7248d768e0f06ae13ecf43b8 languageName: node linkType: hard @@ -29628,20 +26750,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.4": - version: 7.1.4 - resolution: "ethereumjs-util@npm:7.1.4" - dependencies: - "@types/bn.js": "npm:^5.1.0" - bn.js: "npm:^5.1.2" - create-hash: "npm:^1.1.2" - ethereum-cryptography: "npm:^0.1.3" - rlp: "npm:^2.2.4" - checksum: 10/811aa8e1498e8a503eef14cd035076af83f6dddd065d503075bbb65c873256bf57ac8c668789919567d4833c132f04d0e181a2fc5e9ed7dee38858535faa3dde - languageName: node - linkType: hard - -"ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.0.10, ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -29959,6 +27068,23 @@ __metadata: languageName: node linkType: hard +"execa@npm:^7.1.1": + version: 7.2.0 + resolution: "execa@npm:7.2.0" + dependencies: + cross-spawn: "npm:^7.0.3" + get-stream: "npm:^6.0.1" + human-signals: "npm:^4.3.0" + is-stream: "npm:^3.0.0" + merge-stream: "npm:^2.0.0" + npm-run-path: "npm:^5.1.0" + onetime: "npm:^6.0.0" + signal-exit: "npm:^3.0.7" + strip-final-newline: "npm:^3.0.0" + checksum: 10/473feff60f9d4dbe799225948de48b5158c1723021d19c4b982afe37bcd111ae84e1b4c9dfe967fae5101b0894b1a62e4dd564a286dfa3e46d7b0cfdbf7fe62b + languageName: node + linkType: hard + "execa@npm:^8.0.1": version: 8.0.1 resolution: "execa@npm:8.0.1" @@ -29983,13 +27109,6 @@ __metadata: languageName: node linkType: hard -"exit-on-epipe@npm:~1.0.1": - version: 1.0.1 - resolution: "exit-on-epipe@npm:1.0.1" - checksum: 10/b180aa277aec5bef2609b34e5876061f421a1f81bf343beb213c4d60b382ddcb6b83012833f0ba329d6bc38042685c8d89b1c52ea495b9b6327948ea80627398 - languageName: node - linkType: hard - "exit@npm:^0.1.2": version: 0.1.2 resolution: "exit@npm:0.1.2" @@ -30049,17 +27168,16 @@ __metadata: languageName: node linkType: hard -"expect@npm:^29.0.0, expect@npm:^29.6.2": - version: 29.6.2 - resolution: "expect@npm:29.6.2" +"expect@npm:^29.0.0, expect@npm:^29.7.0": + version: 29.7.0 + resolution: "expect@npm:29.7.0" dependencies: - "@jest/expect-utils": "npm:^29.6.2" - "@types/node": "npm:*" - jest-get-type: "npm:^29.4.3" - jest-matcher-utils: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - checksum: 10/304472c4c63fc89accdf32a6817c62945efbcb3d536347dd49bc793dfc91f73fd9661411e0cc919f483ef309be589e33dd5bc9a27b55a5d88ae99009ad0df8f7 + "@jest/expect-utils": "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + jest-matcher-utils: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + checksum: 10/63f97bc51f56a491950fb525f9ad94f1916e8a014947f8d8445d3847a665b5471b768522d659f5e865db20b6c2033d2ac10f35fcbd881a4d26407a4f6f18451a languageName: node linkType: hard @@ -30089,13 +27207,13 @@ __metadata: linkType: hard "expo-random@npm:*": - version: 13.5.0 - resolution: "expo-random@npm:13.5.0" + version: 14.0.1 + resolution: "expo-random@npm:14.0.1" dependencies: base64-js: "npm:^1.3.0" peerDependencies: expo: "*" - checksum: 10/702476765cf3ad87f85be8c0a334304a080e3a9d840d03ecb7ad2edf3cbce8cadabe91d980d1d18a85543048365e26361ca387460cf91d9a7d566b240ac0e9cd + checksum: 10/1b55e1d13e13c8eb23558248675f70756deb2f1f1bb6a542d1039135daaa7a9c4d5f7e8d478a450371d3d75cc32574aa21006aa4581783eba02055f9bed483e1 languageName: node linkType: hard @@ -30198,9 +27316,9 @@ __metadata: languageName: node linkType: hard -"express@npm:4.21.0": - version: 4.21.0 - resolution: "express@npm:4.21.0" +"express@npm:4.20.0": + version: 4.20.0 + resolution: "express@npm:4.20.0" dependencies: accepts: "npm:~1.3.8" array-flatten: "npm:1.1.1" @@ -30214,7 +27332,7 @@ __metadata: encodeurl: "npm:~2.0.0" escape-html: "npm:~1.0.3" etag: "npm:~1.8.1" - finalhandler: "npm:1.3.1" + finalhandler: "npm:1.2.0" fresh: "npm:0.5.2" http-errors: "npm:2.0.0" merge-descriptors: "npm:1.0.3" @@ -30223,60 +27341,60 @@ __metadata: parseurl: "npm:~1.3.3" path-to-regexp: "npm:0.1.10" proxy-addr: "npm:~2.0.7" - qs: "npm:6.13.0" + qs: "npm:6.11.0" range-parser: "npm:~1.2.1" safe-buffer: "npm:5.2.1" send: "npm:0.19.0" - serve-static: "npm:1.16.2" + serve-static: "npm:1.16.0" setprototypeof: "npm:1.2.0" statuses: "npm:2.0.1" type-is: "npm:~1.6.18" utils-merge: "npm:1.0.1" vary: "npm:~1.1.2" - checksum: 10/3b1ee5bc5b1bd996f688702519cebc9b63a24e506965f6e1773268238cfa2c24ffdb38cc3fcb4fde66f77de1c0bebd9ee058dad06bb9c6f084b525f3c09164d3 + checksum: 10/4131f566cf8f6d1611475d5ff5d0dbc5c628ad8b525aa2aa2b3da9a23a041efcce09ede10b8a31315b0258ac4e53208a009fd7669ee1eb385936a0d54adb3cde languageName: node linkType: hard -"express@npm:^4.10.6, express@npm:^4.14.0, express@npm:^4.17.1, express@npm:^4.17.3": - version: 4.18.2 - resolution: "express@npm:4.18.2" +"express@npm:4.21.0": + version: 4.21.0 + resolution: "express@npm:4.21.0" dependencies: accepts: "npm:~1.3.8" array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.1" + body-parser: "npm:1.20.3" content-disposition: "npm:0.5.4" content-type: "npm:~1.0.4" - cookie: "npm:0.5.0" + cookie: "npm:0.6.0" cookie-signature: "npm:1.0.6" debug: "npm:2.6.9" depd: "npm:2.0.0" - encodeurl: "npm:~1.0.2" + encodeurl: "npm:~2.0.0" escape-html: "npm:~1.0.3" etag: "npm:~1.8.1" - finalhandler: "npm:1.2.0" + finalhandler: "npm:1.3.1" fresh: "npm:0.5.2" http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.1" + merge-descriptors: "npm:1.0.3" methods: "npm:~1.1.2" on-finished: "npm:2.4.1" parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.7" + path-to-regexp: "npm:0.1.10" proxy-addr: "npm:~2.0.7" - qs: "npm:6.11.0" + qs: "npm:6.13.0" range-parser: "npm:~1.2.1" safe-buffer: "npm:5.2.1" - send: "npm:0.18.0" - serve-static: "npm:1.15.0" + send: "npm:0.19.0" + serve-static: "npm:1.16.2" setprototypeof: "npm:1.2.0" statuses: "npm:2.0.1" type-is: "npm:~1.6.18" utils-merge: "npm:1.0.1" vary: "npm:~1.1.2" - checksum: 10/869ae89ed6ff4bed7b373079dc58e5dddcf2915a2669b36037ff78c99d675ae930e5fe052b35c24f56557d28a023bb1cbe3e2f2fb87eaab96a1cedd7e597809d + checksum: 10/3b1ee5bc5b1bd996f688702519cebc9b63a24e506965f6e1773268238cfa2c24ffdb38cc3fcb4fde66f77de1c0bebd9ee058dad06bb9c6f084b525f3c09164d3 languageName: node linkType: hard -"express@npm:^4.16.3, express@npm:^4.19.2": +"express@npm:^4.10.6, express@npm:^4.14.0, express@npm:^4.16.3, express@npm:^4.17.1, express@npm:^4.17.3, express@npm:^4.19.2": version: 4.21.1 resolution: "express@npm:4.21.1" dependencies: @@ -30315,15 +27433,6 @@ __metadata: languageName: node linkType: hard -"ext@npm:^1.1.2": - version: 1.6.0 - resolution: "ext@npm:1.6.0" - dependencies: - type: "npm:^2.5.0" - checksum: 10/8a72d4d062dcb4803278250cfb4221628d91acd5e569faf4e78c17814aa6686632c3bd1378d822b20630719731c0af19acb729d4f0fc7eebaabcd22fe28bb800 - languageName: node - linkType: hard - "ext@npm:^1.7.0": version: 1.7.0 resolution: "ext@npm:1.7.0" @@ -30589,9 +27698,9 @@ __metadata: linkType: hard "fast-diff@npm:^1.1.2": - version: 1.2.0 - resolution: "fast-diff@npm:1.2.0" - checksum: 10/f62419b3d770f201d51c3ee8c4443b752b3ba2d548a6639026b7e09a08203ed2699a8d1fe21efcb8c5186135002d5d2916c12a687cac63785626456a92915adc + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: 10/9e57415bc69cd6efcc720b3b8fe9fdaf42dcfc06f86f0f45378b1fa512598a8aac48aa3928c8751d58e2f01bb4ba4f07e4f3d9bc0d57586d45f1bd1e872c6cde languageName: node linkType: hard @@ -30603,13 +27712,13 @@ __metadata: linkType: hard "fast-fifo@npm:^1.0.0": - version: 1.1.0 - resolution: "fast-fifo@npm:1.1.0" - checksum: 10/895f4c9873a4d5059dfa244aa0dde2b22ee563fd673d85b638869715f92244f9d6469bc0873bcb40554d28c51cbc7590045718462cfda1da503b1c6985815209 + version: 1.3.2 + resolution: "fast-fifo@npm:1.3.2" + checksum: 10/6bfcba3e4df5af7be3332703b69a7898a8ed7020837ec4395bb341bd96cc3a6d86c3f6071dd98da289618cf2234c70d84b2a6f09a33dd6f988b1ff60d8e54275 languageName: node linkType: hard -"fast-glob@npm:3.3.1, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.5, fast-glob@npm:^3.3.0": +"fast-glob@npm:3.3.1": version: 3.3.1 resolution: "fast-glob@npm:3.3.1" dependencies: @@ -30622,7 +27731,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:3.3.2, fast-glob@npm:^3.3.2": +"fast-glob@npm:3.3.2, fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -30635,19 +27744,6 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": - version: 3.2.11 - resolution: "fast-glob@npm:3.2.11" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10/6b736d92a47f27218a85bf184a4ccab9f707398f86711bf84d730243b10a999a85f79afc526133c044ebebfcb42a68d09f769fdbedcc00680ddd56e56a56483a - languageName: node - linkType: hard - "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -30655,18 +27751,6 @@ __metadata: languageName: node linkType: hard -"fast-json-stringify@npm:^2.7.10": - version: 2.7.13 - resolution: "fast-json-stringify@npm:2.7.13" - dependencies: - ajv: "npm:^6.11.0" - deepmerge: "npm:^4.2.2" - rfdc: "npm:^1.2.0" - string-similarity: "npm:^4.0.1" - checksum: 10/c9c9f4cd7313b242ba313d77d7a5eff086889aec7f018459c770231c170e311dc0d3f7977a9705b83cd92d4091274e4fa750c43992653ebd6551660fb617154b - languageName: node - linkType: hard - "fast-json-stringify@npm:^5.7.0, fast-json-stringify@npm:^5.8.0": version: 5.16.1 resolution: "fast-json-stringify@npm:5.16.1" @@ -30714,7 +27798,7 @@ __metadata: languageName: node linkType: hard -"fast-safe-stringify@npm:2.1.1, fast-safe-stringify@npm:^2.0.6, fast-safe-stringify@npm:^2.0.7, fast-safe-stringify@npm:^2.1.1": +"fast-safe-stringify@npm:2.1.1, fast-safe-stringify@npm:^2.0.6, fast-safe-stringify@npm:^2.0.7": version: 2.1.1 resolution: "fast-safe-stringify@npm:2.1.1" checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 @@ -30736,16 +27820,40 @@ __metadata: linkType: hard "fast-uri@npm:^3.0.1": - version: 3.0.1 - resolution: "fast-uri@npm:3.0.1" - checksum: 10/e8ee4712270de0d29eb0fbf41ffad0ac80952e8797be760e8bb62c4707f08f50a86fe2d7829681ca133c07d6eb4b4a75389a5fc36674c5b254a3ac0891a68fc7 + version: 3.0.3 + resolution: "fast-uri@npm:3.0.3" + checksum: 10/92487c75848b03edc45517fca0148287d342c30818ce43d556391db774d8e01644fb6964315a3336eec5a90f301b218b21f71fb9b2528ba25757435a20392c95 languageName: node linkType: hard "fastest-levenshtein@npm:^1.0.12": - version: 1.0.12 - resolution: "fastest-levenshtein@npm:1.0.12" - checksum: 10/e1a013698dd1d302c7a78150130c7d50bb678c2c2f8839842a796d66cc7cdf50ea6b3d7ca930b0c8e7e8c2cd84fea8ab831023b382f7aab6922c318c1451beab + version: 1.0.16 + resolution: "fastest-levenshtein@npm:1.0.16" + checksum: 10/ee85d33b5cef592033f70e1c13ae8624055950b4eb832435099cd56aa313d7f251b873bedbc06a517adfaff7b31756d139535991e2406967438e03a1bf1b008e + languageName: node + linkType: hard + +"fastify@npm:4.26.2": + version: 4.26.2 + resolution: "fastify@npm:4.26.2" + dependencies: + "@fastify/ajv-compiler": "npm:^3.5.0" + "@fastify/error": "npm:^3.4.0" + "@fastify/fast-json-stringify-compiler": "npm:^4.3.0" + abstract-logging: "npm:^2.0.1" + avvio: "npm:^8.3.0" + fast-content-type-parse: "npm:^1.1.0" + fast-json-stringify: "npm:^5.8.0" + find-my-way: "npm:^8.0.0" + light-my-request: "npm:^5.11.0" + pino: "npm:^8.17.0" + process-warning: "npm:^3.0.0" + proxy-addr: "npm:^2.0.7" + rfdc: "npm:^1.3.0" + secure-json-parse: "npm:^2.7.0" + semver: "npm:^7.5.4" + toad-cache: "npm:^3.3.0" + checksum: 10/24ee6b1496bf0c3b6b266edef6654c547ea54ffe3a17a98afd0f2a8e7a69e0fea2b58eaebb81388fa36d20032e239e656fbfdfac539b4758483a438250f791ff languageName: node linkType: hard @@ -30773,7 +27881,7 @@ __metadata: languageName: node linkType: hard -"fastq@npm:^1.17.1": +"fastq@npm:^1.17.1, fastq@npm:^1.6.0": version: 1.17.1 resolution: "fastq@npm:1.17.1" dependencies: @@ -30782,15 +27890,6 @@ __metadata: languageName: node linkType: hard -"fastq@npm:^1.6.0": - version: 1.13.0 - resolution: "fastq@npm:1.13.0" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10/0902cb9b81accf34e5542612c8a1df6c6ea47674f85bcc9cdc38795a28b53e4a096f751cfcf4fb25d2ea42fee5447499ba6cf5af5d0209297e1d1fd4dd551bb6 - languageName: node - linkType: hard - "faye-websocket@npm:^0.11.3": version: 0.11.4 resolution: "faye-websocket@npm:0.11.4" @@ -30801,11 +27900,11 @@ __metadata: linkType: hard "fb-watchman@npm:^2.0.0": - version: 2.0.1 - resolution: "fb-watchman@npm:2.0.1" + version: 2.0.2 + resolution: "fb-watchman@npm:2.0.2" dependencies: bser: "npm:2.1.1" - checksum: 10/9a03efc7d41ce3ca3d799d63505a1f7312caddf4e7737d39f2165bfe4872cbd4b87eccc9e6c57229ea08f14b4d7187896da31a7270b8da7a4aaa8fba2d3d1c42 + checksum: 10/4f95d336fb805786759e383fd7fff342ceb7680f53efcc0ef82f502eb479ce35b98e8b207b6dfdfeea0eba845862107dc73813775fc6b56b3098c6e90a2dad77 languageName: node linkType: hard @@ -30819,9 +27918,9 @@ __metadata: linkType: hard "fecha@npm:^4.2.0": - version: 4.2.1 - resolution: "fecha@npm:4.2.1" - checksum: 10/6cf959d41a4c68d5b3296d9621e0d5b7c8ee6a5ea51f11b468742a5533b74d635dd12d2edafae0b29c9df060d4d650d1c30d415a14bdaae8fc1b5c836451fbb8 + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 languageName: node linkType: hard @@ -31206,12 +28305,13 @@ __metadata: linkType: hard "flat-cache@npm:^3.0.4": - version: 3.0.4 - resolution: "flat-cache@npm:3.0.4" + version: 3.2.0 + resolution: "flat-cache@npm:3.2.0" dependencies: - flatted: "npm:^3.1.0" + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.3" rimraf: "npm:^3.0.2" - checksum: 10/9fe5d0cb97c988e3b25242e71346965fae22757674db3fca14206850af2efa3ca3b04a3ba0eba8d5e20fd8a3be80a2e14b1c2917e70ffe1acb98a8c3327e4c9f + checksum: 10/02381c6ece5e9fa5b826c9bbea481d7fd77645d96e4b0b1395238124d581d10e56f17f723d897b6d133970f7a57f0fab9148cbbb67237a0a0ffe794ba60c0c70 languageName: node linkType: hard @@ -31234,21 +28334,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.1.0, flatted@npm:^3.2.4": - version: 3.2.5 - resolution: "flatted@npm:3.2.5" - checksum: 10/eed01f72ad0317561e4d6187f7408dc391f7849d9cd6700520ce06155d1859539b6899afdfefc815ce51ec48f97d1015350287c541b5302a49581cf25cec1cd2 - languageName: node - linkType: hard - -"flatted@npm:^3.2.7": - version: 3.2.7 - resolution: "flatted@npm:3.2.7" - checksum: 10/427633049d55bdb80201c68f7eb1cbd533e03eac541f97d3aecab8c5526f12a20ccecaeede08b57503e772c769e7f8680b37e8d482d1e5f8d7e2194687f9ea35 - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": +"flatted@npm:^3.2.4, flatted@npm:^3.2.7, flatted@npm:^3.2.9": version: 3.3.1 resolution: "flatted@npm:3.3.1" checksum: 10/7b8376061d5be6e0d3658bbab8bde587647f68797cf6bfeae9dea0e5137d9f27547ab92aaff3512dd9d1299086a6d61be98e9d48a56d17531b634f77faadbc49 @@ -31277,12 +28363,12 @@ __metadata: linkType: hard "follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.15.6": - version: 1.15.6 - resolution: "follow-redirects@npm:1.15.6" + version: 1.15.9 + resolution: "follow-redirects@npm:1.15.9" peerDependenciesMeta: debug: optional: true - checksum: 10/70c7612c4cab18e546e36b991bbf8009a1a41cf85354afe04b113d1117569abf760269409cb3eb842d9f7b03d62826687086b081c566ea7b1e6613cf29030bf7 + checksum: 10/e3ab42d1097e90d28b913903841e6779eb969b62a64706a3eb983e894a5db000fbd89296f45f08885a0e54cd558ef62e81be1165da9be25a6c44920da10f424c languageName: node linkType: hard @@ -31318,13 +28404,6 @@ __metadata: languageName: node linkType: hard -"foreach@npm:^2.0.5": - version: 2.0.5 - resolution: "foreach@npm:2.0.5" - checksum: 10/3962224ad3343019aab128cbfd11ba8e17ef8a67de09d2b217651f097a038294dcf641e07ebeae2b715e1a5e81bd212ebacae323950a3c28bc340a4c5955c032 - languageName: node - linkType: hard - "foreground-child@npm:^1.5.3, foreground-child@npm:^1.5.6": version: 1.5.6 resolution: "foreground-child@npm:1.5.6" @@ -31346,12 +28425,12 @@ __metadata: linkType: hard "foreground-child@npm:^3.1.0": - version: 3.1.1 - resolution: "foreground-child@npm:3.1.1" + version: 3.3.0 + resolution: "foreground-child@npm:3.3.0" dependencies: cross-spawn: "npm:^7.0.0" signal-exit: "npm:^4.0.1" - checksum: 10/087edd44857d258c4f73ad84cb8df980826569656f2550c341b27adf5335354393eec24ea2fabd43a253233fb27cee177ebe46bd0b7ea129c77e87cb1e9936fb + checksum: 10/e3a60480f3a09b12273ce2c5fcb9514d98dd0e528f58656a1b04680225f918d60a2f81f6a368f2f3b937fcee9cfc0cbf16f1ad9a0bc6a3a6e103a84c9a90087e languageName: node linkType: hard @@ -31414,7 +28493,7 @@ __metadata: languageName: node linkType: hard -"form-data@npm:4.0.0, form-data@npm:^4.0.0": +"form-data@npm:4.0.0": version: 4.0.0 resolution: "form-data@npm:4.0.0" dependencies: @@ -31426,24 +28505,36 @@ __metadata: linkType: hard "form-data@npm:^2.5.0": - version: 2.5.1 - resolution: "form-data@npm:2.5.1" + version: 2.5.2 + resolution: "form-data@npm:2.5.2" dependencies: asynckit: "npm:^0.4.0" combined-stream: "npm:^1.0.6" mime-types: "npm:^2.1.12" - checksum: 10/2e2e5e927979ba3623f9b4c4bcc939275fae3f2dea9dafc8db3ca656a3d75476605de2c80f0e6f1487987398e056f0b4c738972d6e1edd83392d5686d0952eed + safe-buffer: "npm:^5.2.1" + checksum: 10/ef602e52f0bfcc8f8c346b8783f6dbd2fb271596788d42cf929dddaa50bd61e97da21f01464b4524e77872682264765e53c75ac1ab1466ea23f5c96de585faff languageName: node linkType: hard "form-data@npm:^3.0.0": - version: 3.0.1 - resolution: "form-data@npm:3.0.1" + version: 3.0.2 + resolution: "form-data@npm:3.0.2" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + mime-types: "npm:^2.1.12" + checksum: 10/b8d71d7149de5881c6c8ac75c03ac2e809b1b729399320cc41f59a63043fa34b95dfef5259212d6d902abb4916af48a7ca60ad5c035806ba8e3c7843dbaf3057 + languageName: node + linkType: hard + +"form-data@npm:^4.0.0": + version: 4.0.1 + resolution: "form-data@npm:4.0.1" dependencies: asynckit: "npm:^0.4.0" combined-stream: "npm:^1.0.8" mime-types: "npm:^2.1.12" - checksum: 10/944b40ff63b9cb1ca7a97e70f72104c548e0b0263e3e817e49919015a0d687453086259b93005389896dbffd3777cccea2e67c51f4e827590e5979b14ff91bf7 + checksum: 10/6adb1cff557328bc6eb8a68da205f9ae44ab0e88d4d9237aaf91eed591ffc64f77411efb9016af7d87f23d0a038c45a788aa1c6634e51175c4efa36c2bc53774 languageName: node linkType: hard @@ -31495,14 +28586,7 @@ __metadata: languageName: node linkType: hard -"fraction.js@npm:^4.2.0": - version: 4.2.0 - resolution: "fraction.js@npm:4.2.0" - checksum: 10/8f8e3c02a4d10cd03bae5c036c02ef0bd1a50be69ac56e5b9b25025ff07466c1d2288f383fb613ecec583e77bcfd586dee2d932f40e588c910bf55c5103014ab - languageName: node - linkType: hard - -"fraction.js@npm:^4.3.7": +"fraction.js@npm:^4.2.0, fraction.js@npm:^4.3.7": version: 4.3.7 resolution: "fraction.js@npm:4.3.7" checksum: 10/bb5ebcdeeffcdc37b68ead3bdfc244e68de188e0c64e9702197333c72963b95cc798883ad16adc21588088b942bca5b6a6ff4aeb1362d19f6f3b629035dc15f5 @@ -31556,7 +28640,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:10.1.0, fs-extra@npm:^10.1.0": +"fs-extra@npm:10.1.0, fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" dependencies: @@ -31567,7 +28651,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:11.2.0, fs-extra@npm:^11.2.0": +"fs-extra@npm:11.2.0, fs-extra@npm:^11.0.0, fs-extra@npm:^11.2.0": version: 11.2.0 resolution: "fs-extra@npm:11.2.0" dependencies: @@ -31591,28 +28675,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^10.0.0": - version: 10.0.1 - resolution: "fs-extra@npm:10.0.1" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/81c8f5668f8c00a94c22910c7deadbb5a68621a36efa64cc483bcb6e96c74a1e86bb1ed338855c54ec8ed778c54762e187912d668a59bffc06d1f0c1ef3b26c4 - languageName: node - linkType: hard - -"fs-extra@npm:^11.0.0": - version: 11.1.1 - resolution: "fs-extra@npm:11.1.1" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/c4e9fabf9762a70d1403316b7faa899f3d3303c8afa765b891c2210fdeba368461e04ae1203920b64ef6a7d066a39ab8cef2160b5ce8d1011bb4368688cd9bb7 - languageName: node - linkType: hard - "fs-extra@npm:^4.0.2": version: 4.0.3 resolution: "fs-extra@npm:4.0.3" @@ -31687,18 +28749,18 @@ __metadata: linkType: hard "fs-minipass@npm:^3.0.0": - version: 3.0.1 - resolution: "fs-minipass@npm:3.0.1" + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" dependencies: - minipass: "npm:^4.0.0" - checksum: 10/c6c0a7b976aa6ba86ae2f4b03fe633fd07b03191453b56045af75299fd6fa669da2de0771defcbb20ea0e4e9ac3afbd411ae3de0a2af18e4ee09586be930375c + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f languageName: node linkType: hard "fs-monkey@npm:^1.0.4": - version: 1.0.4 - resolution: "fs-monkey@npm:1.0.4" - checksum: 10/9944223c25e62e176cbb9b0f9e0ee1697a1676419529e948ec013b49156863411a09b45671b56267d3118c867d3a0d5c08225845160a6148861cc16fc1eec79e + version: 1.0.6 + resolution: "fs-monkey@npm:1.0.6" + checksum: 10/a0502a23aa0b467f671cd5c7f989ff48611cce1f23deb8f6924862b49234ff37de6828f739a4f2c1acf8f20e80cb426bf6a9d135c401f3df1e7089b7de04c815 languageName: node linkType: hard @@ -31709,17 +28771,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": - version: 2.3.2 - resolution: "fsevents@npm:2.3.2" - dependencies: - node-gyp: "npm:latest" - checksum: 10/6b5b6f5692372446ff81cf9501c76e3e0459a4852b3b5f1fc72c103198c125a6b8c72f5f166bdd76ffb2fca261e7f6ee5565daf80dca6e571e55bcc589cc1256 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@npm:~2.3.3": +"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -31729,16 +28781,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": - version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": +"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -31747,13 +28790,6 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: 10/d83f2968030678f0b8c3f2183d63dcd969344eb8b55b4eb826a94ccac6de8b87c95bebffda37a6386c74f152284eb02956ff2c496897f35d32bdc2628ac68ac5 - languageName: node - linkType: hard - "function-bind@npm:^1.1.2": version: 1.1.2 resolution: "function-bind@npm:1.1.2" @@ -31768,15 +28804,10 @@ __metadata: languageName: node linkType: hard -"function.prototype.name@npm:^1.1.5": - version: 1.1.5 - resolution: "function.prototype.name@npm:1.1.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.0" - functions-have-names: "npm:^1.2.2" - checksum: 10/5d426e5a38ac41747bcfce6191e0ec818ed18678c16cfc36b5d1ca87f56ff98c4ce958ee2c1ea2a18dc3da989844a37b1065311e2d2ae4cf12da8f82418b686b +"function-timeout@npm:^0.1.0": + version: 0.1.1 + resolution: "function-timeout@npm:0.1.1" + checksum: 10/26a05935fde5abf8168f13f2a9d8d8930d12cd076dd694a55d425b3c124384a9d5bf4e254710684addd20749f42268e349acbc333ab7c9622b863a89d392f999 languageName: node linkType: hard @@ -31799,7 +28830,7 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": +"functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" checksum: 10/0ddfd3ed1066a55984aaecebf5419fbd9344a5c38dd120ffb0739fac4496758dcf371297440528b115e4367fc46e3abc86a2cc0ff44612181b175ae967a11a05 @@ -31891,25 +28922,26 @@ __metadata: languageName: node linkType: hard -"gaxios@npm:^6.0.0": - version: 6.1.1 - resolution: "gaxios@npm:6.1.1" +"gaxios@npm:^6.0.0, gaxios@npm:^6.1.1": + version: 6.7.1 + resolution: "gaxios@npm:6.7.1" dependencies: extend: "npm:^3.0.2" https-proxy-agent: "npm:^7.0.1" is-stream: "npm:^2.0.0" node-fetch: "npm:^2.6.9" - checksum: 10/ee16e6f61fccda89f00e6fc2dcd1205fb398a5629350a18aa2db84abb8794ef62de5e7f88d8a7f86d27fe2a996b2739d1cad0020b23999e533d925231919e1b3 + uuid: "npm:^9.0.1" + checksum: 10/c85599162208884eadee91215ebbfa1faa412551df4044626cb561300e15193726e8f23d63b486533e066dadad130f58ed872a23acab455238d8d48b531a0695 languageName: node linkType: hard -"gcp-metadata@npm:^6.0.0": - version: 6.0.0 - resolution: "gcp-metadata@npm:6.0.0" +"gcp-metadata@npm:^6.1.0": + version: 6.1.0 + resolution: "gcp-metadata@npm:6.1.0" dependencies: gaxios: "npm:^6.0.0" json-bigint: "npm:^1.0.0" - checksum: 10/c6bfc054828de3cf4f180479867fe5d34c2065cdd14321677c468f8c6e98b83f00b638b3eeb61dd3207f2e4cf83988aa34c2d3835c61a9b307f377b3ebae36f2 + checksum: 10/a0d12a9cb7499fdb9de0fff5406aa220310c1326b80056be8d9b747aae26414f99d14bd795c0ec52ef7d0473eef9d61bb657b8cd3d8186c8a84c4ddbff025fe9 languageName: node linkType: hard @@ -31970,9 +29002,9 @@ __metadata: linkType: hard "get-east-asian-width@npm:^1.0.0": - version: 1.2.0 - resolution: "get-east-asian-width@npm:1.2.0" - checksum: 10/c9b280e7c7c67fb89fa17e867c4a9d1c9f1321aba2a9ee27bff37fb6ca9552bccda328c70a80c1f83a0e39ba1b7e3427e60f47823402d19e7a41b83417ec047a + version: 1.3.0 + resolution: "get-east-asian-width@npm:1.3.0" + checksum: 10/8e8e779eb28701db7fdb1c8cab879e39e6ae23f52dadd89c8aed05869671cee611a65d4f8557b83e981428623247d8bc5d0c7a4ef3ea7a41d826e73600112ad8 languageName: node linkType: hard @@ -31983,64 +29015,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2": - version: 1.1.2 - resolution: "get-intrinsic@npm:1.1.2" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - checksum: 10/0364e4d4538486672d3125ca6e3e3ce30f1ac0eebfbaed1ffb27f588697a49b9d8ccf9e9fc30b915663942f5c24063cfd81008d13d02c9358f72b3c70b4c74f4 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": - version: 1.1.1 - resolution: "get-intrinsic@npm:1.1.1" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.1" - checksum: 10/7143f5407b000473f4b62717a79628dc151aa622eadac682da0ea3d377fc45839b3ea203d0956d72f6cc8c1f6ae0dcd47fb4bd970647ba5234f9e11679f86cb5 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0": - version: 1.2.0 - resolution: "get-intrinsic@npm:1.2.0" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - checksum: 10/f57c5fe67a96adace4f8e80c288728bcd0ccfdc82c9cc53e4a5ef1ec857b5f7ef4b1c289e39649b1df226bace81103630bf7e128c821f82cd603450036e54f97 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.1": - version: 1.2.1 - resolution: "get-intrinsic@npm:1.2.1" - dependencies: - function-bind: "npm:^1.1.1" - has: "npm:^1.0.3" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - checksum: 10/aee631852063f8ad0d4a374970694b5c17c2fb5c92bd1929476d7eb8798ce7aebafbf9a34022c05fd1adaa2ce846d5877a627ce1986f81fc65adf3b81824bd54 - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.2": - version: 1.2.2 - resolution: "get-intrinsic@npm:1.2.2" - dependencies: - function-bind: "npm:^1.1.2" - has-proto: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.0" - checksum: 10/aa96db4f809734d26d49b59bc8669d73a0ae792da561514e987735573a1dfaede516cd102f217a078ea2b42d4c4fb1f83d487932cb15d49826b726cc9cd4470b - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -32060,13 +29035,6 @@ __metadata: languageName: node linkType: hard -"get-iterator@npm:^2.0.0": - version: 2.0.1 - resolution: "get-iterator@npm:2.0.1" - checksum: 10/353baac51f5e335c19cb734cbf0401d7c47deeac9d375e2939fed646fe52db2912d61ed2a60112050cf4687080817d159ec938803e48e03cd602edd489a116f2 - languageName: node - linkType: hard - "get-own-enumerable-property-symbols@npm:^3.0.0": version: 3.0.2 resolution: "get-own-enumerable-property-symbols@npm:3.0.2" @@ -32154,16 +29122,6 @@ __metadata: languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/7e5f298afe0f0872747dce4a949ce490ebc5d6dd6aefbbe5044543711c9b19a4dfaebdbc627aee99e1299d58a435b2fbfa083458c1d58be6dc03a3bada24d359 - languageName: node - linkType: hard - "get-symbol-description@npm:^1.0.2": version: 1.0.2 resolution: "get-symbol-description@npm:1.0.2" @@ -32290,11 +29248,11 @@ __metadata: linkType: hard "git-url-parse@npm:^14.0.0": - version: 14.0.0 - resolution: "git-url-parse@npm:14.0.0" + version: 14.1.0 + resolution: "git-url-parse@npm:14.1.0" dependencies: git-up: "npm:^7.0.0" - checksum: 10/c19430947895676c59ce472d534c88e5d2d9f443e6b6e4deaa8ad9ad921ded6c27a996b219503775c37fbb90f4a3c02a5f106f14b61286386f9e5098dff7d634 + checksum: 10/3bbf1182cd5a57c5ba2bd2c722f7391b771edb7d8bd37e060e25bd48b4f2a444bc5b5709fee0075f058a51b1233a65e4124b53715b5e091b34586b9a263ae2c3 languageName: node linkType: hard @@ -32345,7 +29303,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.0.6, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": +"glob@npm:7.2.0": version: 7.2.0 resolution: "glob@npm:7.2.0" dependencies: @@ -32359,39 +29317,9 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2": - version: 10.3.4 - resolution: "glob@npm:10.3.4" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.0.3" - minimatch: "npm:^9.0.1" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry: "npm:^1.10.1" - bin: - glob: dist/cjs/src/bin.js - checksum: 10/6375721bcd0c615fe4c1d61faaf9eb93e15d428f26bac6e85739221a84659b42601b2a085b20915142c0eb3d8a7155914884ff80f145d8c9f2397c8b771b8b60 - languageName: node - linkType: hard - -"glob@npm:^10.3.10": - version: 10.3.10 - resolution: "glob@npm:10.3.10" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.3.5" - minimatch: "npm:^9.0.1" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry: "npm:^1.10.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10/38bdb2c9ce75eb5ed168f309d4ed05b0798f640b637034800a6bf306f39d35409bf278b0eaaffaec07591085d3acb7184a201eae791468f0f617771c2486a6a8 - languageName: node - linkType: hard - -"glob@npm:^10.4.2": - version: 10.4.2 - resolution: "glob@npm:10.4.2" +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.2": + version: 10.4.5 + resolution: "glob@npm:10.4.5" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^3.1.2" @@ -32401,11 +29329,11 @@ __metadata: path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10/e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 + checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac languageName: node linkType: hard -"glob@npm:^7.0.3, glob@npm:^7.1.2, glob@npm:^7.2.3": +"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.0.5, glob@npm:^7.0.6, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -32419,21 +29347,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.1": - version: 8.0.1 - resolution: "glob@npm:8.0.1" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^5.0.1" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10/b69c95a2019ef186ba4dfa7a8c5382b901fd81caf66ab71a474a94f34d46f2b9ce81ba3099d4f3a3689a9a0b2fa74757d0793e110f27f62a35356209c5b65107 - languageName: node - linkType: hard - -"glob@npm:^8.1.0": +"glob@npm:^8.0.1, glob@npm:^8.1.0": version: 8.1.0 resolution: "glob@npm:8.1.0" dependencies: @@ -32446,18 +29360,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^9.3.0, glob@npm:^9.3.1": - version: 9.3.4 - resolution: "glob@npm:9.3.4" - dependencies: - fs.realpath: "npm:^1.0.0" - minimatch: "npm:^8.0.2" - minipass: "npm:^4.2.4" - path-scurry: "npm:^1.6.1" - checksum: 10/6943df605ece77a1669145306500fb1421c51bf66b23a40e79dab676532d0954fa49256142ed7d47fd043dd97bb1841e1be475752b483d64448ccd913f25f928 - languageName: node - linkType: hard - "global-directory@npm:^4.0.1": version: 4.0.1 resolution: "global-directory@npm:4.0.1" @@ -32476,15 +29378,6 @@ __metadata: languageName: node linkType: hard -"global-dirs@npm:^3.0.0": - version: 3.0.0 - resolution: "global-dirs@npm:3.0.0" - dependencies: - ini: "npm:2.0.0" - checksum: 10/953c17cf14bf6ee0e2100ae82a0d779934eed8a3ec5c94a7a4f37c5b3b592c31ea015fb9a15cf32484de13c79f4a814f3015152f3e1d65976cfbe47c1bfe4a88 - languageName: node - linkType: hard - "global-modules@npm:^1.0.0": version: 1.0.0 resolution: "global-modules@npm:1.0.0" @@ -32547,11 +29440,11 @@ __metadata: linkType: hard "globals@npm:^13.19.0": - version: 13.21.0 - resolution: "globals@npm:13.21.0" + version: 13.24.0 + resolution: "globals@npm:13.24.0" dependencies: type-fest: "npm:^0.20.2" - checksum: 10/98ce947dc413e6c8feed236f980dee4bc8d9f4b29790e27bccb277d385fac5d77146e1f9c244c6609aca1d109101642e663caf88c0ba6bff0b069ea82d571441 + checksum: 10/62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e languageName: node linkType: hard @@ -32562,12 +29455,13 @@ __metadata: languageName: node linkType: hard -"globalthis@npm:^1.0.2, globalthis@npm:^1.0.3": - version: 1.0.3 - resolution: "globalthis@npm:1.0.3" +"globalthis@npm:^1.0.3, globalthis@npm:^1.0.4": + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" dependencies: - define-properties: "npm:^1.1.3" - checksum: 10/45ae2f3b40a186600d0368f2a880ae257e8278b4c7704f0417d6024105ad7f7a393661c5c2fa1334669cd485ea44bc883a08fdd4516df2428aec40c99f52aa89 + define-properties: "npm:^1.2.1" + gopd: "npm:^1.0.1" + checksum: 10/1f1fd078fb2f7296306ef9dd51019491044ccf17a59ed49d375b576ca108ff37e47f3d29aead7add40763574a992f16a5367dd1e2173b8634ef18556ab719ac4 languageName: node linkType: hard @@ -32615,20 +29509,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^13.1.1": - version: 13.1.1 - resolution: "globby@npm:13.1.1" - dependencies: - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.11" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^4.0.0" - checksum: 10/cbf1a949aa5543c52ef00054ec29582bacdb2639eda79993da83fc8ac4f51d94c90018cd3ee50b22b76d357575c75bb9a9746ab010b8e0dd0f2bab7544154538 - languageName: node - linkType: hard - -"globby@npm:^13.1.2": +"globby@npm:^13.1.1, globby@npm:^13.1.2": version: 13.2.2 resolution: "globby@npm:13.2.2" dependencies: @@ -32727,18 +29608,17 @@ __metadata: languageName: node linkType: hard -"google-auth-library@npm:^9.0.0": - version: 9.1.0 - resolution: "google-auth-library@npm:9.1.0" +"google-auth-library@npm:^9.0.0, google-auth-library@npm:^9.3.0": + version: 9.14.2 + resolution: "google-auth-library@npm:9.14.2" dependencies: base64-js: "npm:^1.3.0" ecdsa-sig-formatter: "npm:^1.0.11" - gaxios: "npm:^6.0.0" - gcp-metadata: "npm:^6.0.0" + gaxios: "npm:^6.1.1" + gcp-metadata: "npm:^6.1.0" gtoken: "npm:^7.0.0" jws: "npm:^4.0.0" - lru-cache: "npm:^6.0.0" - checksum: 10/5b273bdc7629d3d0dbb78449b9ce5c9edaa35e6d22b6c4fc86b797de8b6c34b8e3cf73c36e3b1fb0517ecf13a8970e89da4172453d031e492ca2729f035d1d31 + checksum: 10/141c760ec6188bed607daf98406957b84c59fda41ea9893573fbccc4098221a4cf054c90cc95058068bb4ae039ac5d542fa57f057d6d29721e23e2718e5914c3 languageName: node linkType: hard @@ -32762,21 +29642,22 @@ __metadata: linkType: hard "google-gax@npm:^4.0.3": - version: 4.0.4 - resolution: "google-gax@npm:4.0.4" + version: 4.4.1 + resolution: "google-gax@npm:4.4.1" dependencies: - "@grpc/grpc-js": "npm:~1.9.0" - "@grpc/proto-loader": "npm:^0.7.0" + "@grpc/grpc-js": "npm:^1.10.9" + "@grpc/proto-loader": "npm:^0.7.13" "@types/long": "npm:^4.0.0" abort-controller: "npm:^3.0.0" duplexify: "npm:^4.0.0" - google-auth-library: "npm:^9.0.0" - node-fetch: "npm:^2.6.1" + google-auth-library: "npm:^9.3.0" + node-fetch: "npm:^2.7.0" object-hash: "npm:^3.0.0" - proto3-json-serializer: "npm:^2.0.0" - protobufjs: "npm:7.2.5" - retry-request: "npm:^6.0.0" - checksum: 10/4dd17ba8a78108565c4b5dc1c8149d34cdfdf1ccdeadcaba8385e0caaa39d7c0cb1d3ecc7c7239e3cbed10d669ca895ebf2666c091cab523f0e5ebe60f72e301 + proto3-json-serializer: "npm:^2.0.2" + protobufjs: "npm:^7.3.2" + retry-request: "npm:^7.0.0" + uuid: "npm:^9.0.1" + checksum: 10/c569e603b9191a1036b01daf442fbcc786c14c66abf7cc8d7451d396ee7d7ae1f52f7c020b22410b6e82e71807a6000bef582c7fb6e4faf9ff19b93f498cfdf0 languageName: node linkType: hard @@ -32831,7 +29712,7 @@ __metadata: languageName: node linkType: hard -"got@npm:9.6.0, got@npm:^9.6.0": +"got@npm:9.6.0": version: 9.6.0 resolution: "got@npm:9.6.0" dependencies: @@ -32850,6 +29731,25 @@ __metadata: languageName: node linkType: hard +"got@npm:^11.8.5": + version: 11.8.6 + resolution: "got@npm:11.8.6" + dependencies: + "@sindresorhus/is": "npm:^4.0.0" + "@szmarczak/http-timer": "npm:^4.0.5" + "@types/cacheable-request": "npm:^6.0.1" + "@types/responselike": "npm:^1.0.0" + cacheable-lookup: "npm:^5.0.3" + cacheable-request: "npm:^7.0.2" + decompress-response: "npm:^6.0.0" + http2-wrapper: "npm:^1.0.0-beta.5.2" + lowercase-keys: "npm:^2.0.0" + p-cancelable: "npm:^2.0.0" + responselike: "npm:^2.0.0" + checksum: 10/a30c74029d81bd5fe50dea1a0c970595d792c568e188ff8be254b5bc11e6158d1b014570772d4a30d0a97723e7dd34e7c8cc1a2f23018f60aece3070a7a5c2a5 + languageName: node + linkType: hard + "got@npm:^12.6.0": version: 12.6.1 resolution: "got@npm:12.6.1" @@ -32869,36 +29769,7 @@ __metadata: languageName: node linkType: hard -"got@npm:^7.1.0": - version: 7.1.0 - resolution: "got@npm:7.1.0" - dependencies: - decompress-response: "npm:^3.2.0" - duplexer3: "npm:^0.1.4" - get-stream: "npm:^3.0.0" - is-plain-obj: "npm:^1.1.0" - is-retry-allowed: "npm:^1.0.0" - is-stream: "npm:^1.0.0" - isurl: "npm:^1.0.0-alpha5" - lowercase-keys: "npm:^1.0.0" - p-cancelable: "npm:^0.3.0" - p-timeout: "npm:^1.1.1" - safe-buffer: "npm:^5.0.1" - timed-out: "npm:^4.0.0" - url-parse-lax: "npm:^1.0.0" - url-to-options: "npm:^1.0.1" - checksum: 10/b72514add3b716cbc9e4c0ff16c10e093c08167e1b91caca177c3a967b8a397ac2a6c12665fd0150ef56d1c746bc466b04469714f125a4f5eea1e77435d6704a - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": - version: 4.2.9 - resolution: "graceful-fs@npm:4.2.9" - checksum: 10/4bcf2de4f1108a928dd64d5e894b833cba634b2e82729c0e57f327d384bf15098e4706639f3045e587e845afed06bae52e70916f74a42db5a56e9ca44f6c2fd1 - languageName: node - linkType: hard - -"graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11": +"graceful-fs@npm:^4.1.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 @@ -32924,9 +29795,9 @@ __metadata: linkType: hard "graphql@npm:^15.3.0": - version: 15.8.0 - resolution: "graphql@npm:15.8.0" - checksum: 10/f8d830287a9028d6779b59c437e0ade63a713b47521b02b60316df1761b805b1a7ce03be88053d224b7f78f5d1d1a786d287ab229cd158b42ebeea9e86daaba5 + version: 15.9.0 + resolution: "graphql@npm:15.9.0" + checksum: 10/ce1f50672bcb369395d07a47048bcbb429ed1ce06dbcafb7a0999df791cb7aa7206be21497907973dbc8a01df3cd7f632f43c583f248538f186f5adfa1a0d1c5 languageName: node linkType: hard @@ -32955,12 +29826,12 @@ __metadata: linkType: hard "gtoken@npm:^7.0.0": - version: 7.0.1 - resolution: "gtoken@npm:7.0.1" + version: 7.1.0 + resolution: "gtoken@npm:7.1.0" dependencies: gaxios: "npm:^6.0.0" jws: "npm:^4.0.0" - checksum: 10/0400ba81af8d2a5b630fd1fd4d748999b4091ee4c5ee52991826e72cd33e5d5373d4e29218c8cad18c81bea75966087415d5ba222165864e8a89d2d130802e71 + checksum: 10/640392261e55c9242137a81a4af8feb053b57061762cedddcbb6a0d62c2314316161808ac2529eea67d06d69fdc56d82361af50f2d840a04a87ea29e124d7382 languageName: node linkType: hard @@ -32998,7 +29869,7 @@ __metadata: languageName: node linkType: hard -"handlebars@npm:4.7.7, handlebars@npm:^4.0.3, handlebars@npm:^4.7.7": +"handlebars@npm:4.7.7": version: 4.7.7 resolution: "handlebars@npm:4.7.7" dependencies: @@ -33016,6 +29887,24 @@ __metadata: languageName: node linkType: hard +"handlebars@npm:^4.0.3, handlebars@npm:^4.7.7": + version: 4.7.8 + resolution: "handlebars@npm:4.7.8" + dependencies: + minimist: "npm:^1.2.5" + neo-async: "npm:^2.6.2" + source-map: "npm:^0.6.1" + uglify-js: "npm:^3.1.4" + wordwrap: "npm:^1.0.0" + dependenciesMeta: + uglify-js: + optional: true + bin: + handlebars: bin/handlebars + checksum: 10/bd528f4dd150adf67f3f857118ef0fa43ff79a153b1d943fa0a770f2599e38b25a7a0dbac1a3611a4ec86970fd2325a81310fb788b5c892308c9f8743bd02e11 + languageName: node + linkType: hard + "har-schema@npm:^2.0.0": version: 2.0.0 resolution: "har-schema@npm:2.0.0" @@ -33183,14 +30072,7 @@ __metadata: languageName: node linkType: hard -"has-bigints@npm:^1.0.1": - version: 1.0.1 - resolution: "has-bigints@npm:1.0.1" - checksum: 10/44ab55868174470065d2e0f8f6def1c990d12b82162a8803c679699fa8a39f966e336f2a33c185092fe8aea7e8bf2e85f1c26add5f29d98f2318bd270096b183 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.2": +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": version: 1.0.2 resolution: "has-bigints@npm:1.0.2" checksum: 10/4e0426c900af034d12db14abfece02ce7dbf53f2022d28af1a97913ff4c07adb8799476d57dc44fbca0e07d1dbda2a042c2928b1f33d3f09c15de0640a7fb81b @@ -33198,12 +30080,12 @@ __metadata: linkType: hard "has-dynamic-import@npm:^2.0.1": - version: 2.0.1 - resolution: "has-dynamic-import@npm:2.0.1" + version: 2.1.0 + resolution: "has-dynamic-import@npm:2.1.0" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/518f474357cc77118682eafae93ee63007f1d8a580b14cb815088bd407e7e8d1c27b47147b5fba6af47c3181b45fbfd3d7cf57704be723f4ef9f922bc334415c + call-bind: "npm:^1.0.5" + get-intrinsic: "npm:^1.2.2" + checksum: 10/11a36cb1148786df1830722f226af28d9ec92b2a8a5374a9775348b855b3dba7a81eff54b7ddc551f05722cad1e643f5c28cff51e72ea032a40d7010c5e7fa6b languageName: node linkType: hard @@ -33235,16 +30117,7 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0": - version: 1.0.0 - resolution: "has-property-descriptors@npm:1.0.0" - dependencies: - get-intrinsic: "npm:^1.1.1" - checksum: 10/a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": version: 1.0.2 resolution: "has-property-descriptors@npm:1.0.2" dependencies: @@ -33253,60 +30126,21 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "has-proto@npm:1.0.1" - checksum: 10/eab2ab0ed1eae6d058b9bbc4c1d99d2751b29717be80d02fd03ead8b62675488de0c7359bc1fdd4b87ef6fd11e796a9631ad4d7452d9324fdada70158c2e5be7 - languageName: node - linkType: hard - -"has-proto@npm:^1.0.3": +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": version: 1.0.3 resolution: "has-proto@npm:1.0.3" checksum: 10/0b67c2c94e3bea37db3e412e3c41f79d59259875e636ba471e94c009cdfb1fa82bf045deeffafc7dbb9c148e36cae6b467055aaa5d9fad4316e11b41e3ba551a languageName: node linkType: hard -"has-symbol-support-x@npm:^1.4.1": - version: 1.4.2 - resolution: "has-symbol-support-x@npm:1.4.2" - checksum: 10/c6ea5f3a8114e70f5b1ee260c2140ebc2146253aa955d35100d5525a8e841680f5fbbaaaf03f45a3c28082f7037860e6f240af9e9f891a66f20e2115222fbba6 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": - version: 1.0.2 - resolution: "has-symbols@npm:1.0.2" - checksum: 10/3d8b4f3c7d9e1535a1ba969035234e20d127519447ce6252be615fae55201119ef557f629328699385ca3e992f1d480e19fe2a850088bd98044d0d9f10199b70 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.3": +"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" checksum: 10/464f97a8202a7690dadd026e6d73b1ceeddd60fe6acfd06151106f050303eaa75855aaa94969df8015c11ff7c505f196114d22f7386b4a471038da5874cf5e9b languageName: node linkType: hard -"has-to-string-tag-x@npm:^1.2.0": - version: 1.4.1 - resolution: "has-to-string-tag-x@npm:1.4.1" - dependencies: - has-symbol-support-x: "npm:^1.4.1" - checksum: 10/9ef3fe5e79a7265aaff14f117417a67f46edfcb7c93af8a897613941a669009062cf8eae15496e531c688227dd46524e6b51c5c2f88ed578276a7f9b4242781e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-tostringtag@npm:1.0.0" - dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10/95546e7132efc895a9ae64a8a7cf52588601fc3d52e0304ed228f336992cdf0baaba6f3519d2655e560467db35a1ed79f6420c286cc91a13aa0647a31ed92570 - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.1, has-tostringtag@npm:^1.0.2": +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -33361,29 +30195,13 @@ __metadata: languageName: node linkType: hard -"has-yarn@npm:^2.1.0": - version: 2.1.0 - resolution: "has-yarn@npm:2.1.0" - checksum: 10/5eb1d0bb8518103d7da24532bdbc7124ffc6d367b5d3c10840b508116f2f1bcbcf10fd3ba843ff6e2e991bdf9969fd862d42b2ed58aade88343326c950b7e7f7 - languageName: node - linkType: hard - -"has@npm:^1.0.1": +"has@npm:^1.0.1, has@npm:^1.0.3": version: 1.0.4 resolution: "has@npm:1.0.4" checksum: 10/c245f332fe78c7b6b8753857240ac12b3286f995f656a33c77e0f5baab7d0157e6ddb1c34940ffd2bffc51f75ede50cd8b29ff65c13e336376aca8cf3df58043 languageName: node linkType: hard -"has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: "npm:^1.1.1" - checksum: 10/a449f3185b1d165026e8d25f6a8c3390bd25c201ff4b8c1aaf948fc6a5fcfd6507310b8c00c13a3325795ea9791fcc3d79d61eafa313b5750438fc19183df57b - languageName: node - linkType: hard - "hash-base@npm:^3.0.0": version: 3.1.0 resolution: "hash-base@npm:3.1.0" @@ -33395,7 +30213,7 @@ __metadata: languageName: node linkType: hard -"hash-base@npm:~3.0": +"hash-base@npm:~3.0, hash-base@npm:~3.0.4": version: 3.0.4 resolution: "hash-base@npm:3.0.4" dependencies: @@ -33435,30 +30253,47 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0": - version: 2.0.0 - resolution: "hasown@npm:2.0.0" +"hashlru@npm:^2.3.0": + version: 2.3.0 + resolution: "hashlru@npm:2.3.0" + checksum: 10/38b3559e6fb9d19fa731edc52d8d7e72cd378f708dcb01cecd4a6ba0c52f06d7d06d6277249f5c43d9915d8dda9be31adad768a379eef188db213c3f2b09278d + languageName: node + linkType: hard + +"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" dependencies: function-bind: "npm:^1.1.2" - checksum: 10/c330f8d93f9d23fe632c719d4db3d698ef7d7c367d51548b836069e06a90fa9151e868c8e67353cfe98d67865bf7354855db28fa36eb1b18fa5d4a3f4e7f1c90 + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a languageName: node linkType: hard -"hasown@npm:^2.0.1": - version: 2.0.1 - resolution: "hasown@npm:2.0.1" +"hast-util-to-html@npm:^9.0.3": + version: 9.0.3 + resolution: "hast-util-to-html@npm:9.0.3" dependencies: - function-bind: "npm:^1.1.2" - checksum: 10/b7f9107387ee68abed88e965c2b99e868b5e0e9d289db1ddd080706ffafb69533b4f538b0e6362585bae8d6cbd080249f65e79702f74c225990f66d6106be3f6 + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + hast-util-whitespace: "npm:^3.0.0" + html-void-elements: "npm:^3.0.0" + mdast-util-to-hast: "npm:^13.0.0" + property-information: "npm:^6.0.0" + space-separated-tokens: "npm:^2.0.0" + stringify-entities: "npm:^4.0.0" + zwitch: "npm:^2.0.4" + checksum: 10/cdf860be567137d045490b0f27590bcafc7032f0725a84667e8950d7bf2ce175d0dfc635b7ce05f3a8d1963ac4c74cae4d93513047429aad909222decdb2f7d1 languageName: node linkType: hard -"hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" +"hast-util-whitespace@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-whitespace@npm:3.0.0" dependencies: - function-bind: "npm:^1.1.2" - checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + "@types/hast": "npm:^3.0.0" + checksum: 10/8c7e9eeb8131fc18702f3a42623eb6b0b09d470347aa8badacac70e6d91f79657ab8c6b57c4c6fee3658cff405fac30e816d1cdfb3ed1fbf6045d0a4555cf4d4 languageName: node linkType: hard @@ -33583,16 +30418,7 @@ __metadata: languageName: node linkType: hard -"hosted-git-info@npm:^7.0.0": - version: 7.0.1 - resolution: "hosted-git-info@npm:7.0.1" - dependencies: - lru-cache: "npm:^10.0.1" - checksum: 10/5f740ecf3c70838e27446ff433a9a9a583de8747f7b661390b373ad12ca47edb937136e79999a4f953d0953079025a11df173f1fd9f7d52b0277b2fb9433e1c7 - languageName: node - linkType: hard - -"hosted-git-info@npm:^7.0.2": +"hosted-git-info@npm:^7.0.0, hosted-git-info@npm:^7.0.2": version: 7.0.2 resolution: "hosted-git-info@npm:7.0.2" dependencies: @@ -33622,21 +30448,7 @@ __metadata: languageName: node linkType: hard -"html-entities@npm:^2.1.0": - version: 2.4.0 - resolution: "html-entities@npm:2.4.0" - checksum: 10/646f2f19214bad751e060ceef4df98520654a1d0cd631b55d45504df2f0aaf8a14d8c0a5a4f92b353be298774d856157ac2d04a031d78889c9011892078ca157 - languageName: node - linkType: hard - -"html-entities@npm:^2.3.2": - version: 2.3.3 - resolution: "html-entities@npm:2.3.3" - checksum: 10/24f6b77ce234e263f3d44530de2356e67c313c8ba7e5f6e02c16dcea3a950711d8820afb320746d57b8dae61fde7aaaa7f60017b706fa4bce8624ba3c29ad316 - languageName: node - linkType: hard - -"html-entities@npm:^2.4.0": +"html-entities@npm:^2.1.0, html-entities@npm:^2.3.2, html-entities@npm:^2.4.0": version: 2.5.2 resolution: "html-entities@npm:2.5.2" checksum: 10/4ec12ebdf2d5ba8192c68e1aef3c1e4a4f36b29246a0a88464fe278a54517d0196d3489af46a3145c7ecacb4fc5fd50497be19eb713b810acab3f0efcf36fdc2 @@ -33667,24 +30479,16 @@ __metadata: languageName: node linkType: hard -"html-webpack-plugin@npm:^5.5.0": - version: 5.5.3 - resolution: "html-webpack-plugin@npm:5.5.3" - dependencies: - "@types/html-minifier-terser": "npm:^6.0.0" - html-minifier-terser: "npm:^6.0.2" - lodash: "npm:^4.17.21" - pretty-error: "npm:^4.0.0" - tapable: "npm:^2.0.0" - peerDependencies: - webpack: ^5.20.0 - checksum: 10/01d302a434e3db9f0e2db370f06300fb613de0fb8bdcafd4693e44c2528b8608621e5e7ca5d8302446db3f20c5f8875f1f675926d469b13ebab139954d241055 +"html-void-elements@npm:^3.0.0": + version: 3.0.0 + resolution: "html-void-elements@npm:3.0.0" + checksum: 10/59be397525465a7489028afa064c55763d9cccd1d7d9f630cca47137317f0e897a9ca26cef7e745e7cff1abc44260cfa407742b243a54261dfacd42230e94fce languageName: node linkType: hard -"html-webpack-plugin@npm:^5.6.0": - version: 5.6.0 - resolution: "html-webpack-plugin@npm:5.6.0" +"html-webpack-plugin@npm:^5.5.0, html-webpack-plugin@npm:^5.6.0": + version: 5.6.3 + resolution: "html-webpack-plugin@npm:5.6.3" dependencies: "@types/html-minifier-terser": "npm:^6.0.0" html-minifier-terser: "npm:^6.0.2" @@ -33699,7 +30503,7 @@ __metadata: optional: true webpack: optional: true - checksum: 10/d651f3a88a7c932c72c6a30f0fdd610b49a864a69f1ddb34562c750f1602ea471e27fd8fc32c01adadd484b38fa6b74f055d1ccce26e5f8fcf814ee0d398a121 + checksum: 10/fd2bf1ac04823526c8b609555d027b38b9d61b4ba9f5c8116a37cc6b62d5b86cab1f478616e8c5344fee13663d2566f5c470c66265ecb1e9574dc38d0459889d languageName: node linkType: hard @@ -33727,15 +30531,15 @@ __metadata: languageName: node linkType: hard -"htmlparser2@npm:^8.0.1": - version: 8.0.1 - resolution: "htmlparser2@npm:8.0.1" +"htmlparser2@npm:^9.1.0": + version: 9.1.0 + resolution: "htmlparser2@npm:9.1.0" dependencies: domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.2" - domutils: "npm:^3.0.1" - entities: "npm:^4.3.0" - checksum: 10/f891041c331ef7ef300f1e8f0e6756d663cf8096f8a343a1bf474e7a5ce34fe7cd71b9dfb0227277f7de2007e847ef2a447e8b48eab592d6f3631aae18301d22 + domhandler: "npm:^5.0.3" + domutils: "npm:^3.1.0" + entities: "npm:^4.5.0" + checksum: 10/6352fa2a5495781fa9a02c9049908334cd068ff36d753870d30cd13b841e99c19646717567a2f9e9c44075bbe43d364e102f9d013a731ce962226d63746b794f languageName: node linkType: hard @@ -33793,9 +30597,9 @@ __metadata: linkType: hard "http-parser-js@npm:>=0.5.1": - version: 0.5.5 - resolution: "http-parser-js@npm:0.5.5" - checksum: 10/4a003119986a2213b7abbb51f3c0979d68e982052d7ca4f8d9b4414ca7ffd7113747f37179fe5f983592f05bc8d8a9e191e1aa301bacf86e14264b16e869cd30 + version: 0.5.8 + resolution: "http-parser-js@npm:0.5.8" + checksum: 10/2a78a567ee6366dae0129d819b799dce1f95ec9732c5ab164a78ee69804ffb984abfa0660274e94e890fc54af93546eb9f12b6d10edbaed017e2d41c29b7cf29 languageName: node linkType: hard @@ -33822,16 +30626,16 @@ __metadata: linkType: hard "http-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "http-proxy-agent@npm:7.0.0" + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" dependencies: agent-base: "npm:^7.1.0" debug: "npm:^4.3.4" - checksum: 10/dbaaf3d9f3fc4df4a5d7ec45d456ec50f575240b557160fa63427b447d1f812dd7fe4a4f17d2e1ba003d231f07edf5a856ea6d91cb32d533062ff20a7803ccac + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 languageName: node linkType: hard -"http-proxy-middleware@npm:2.0.6, http-proxy-middleware@npm:^2.0.3": +"http-proxy-middleware@npm:2.0.6": version: 2.0.6 resolution: "http-proxy-middleware@npm:2.0.6" dependencies: @@ -33849,6 +30653,24 @@ __metadata: languageName: node linkType: hard +"http-proxy-middleware@npm:2.0.7, http-proxy-middleware@npm:^2.0.3": + version: 2.0.7 + resolution: "http-proxy-middleware@npm:2.0.7" + dependencies: + "@types/http-proxy": "npm:^1.17.8" + http-proxy: "npm:^1.18.1" + is-glob: "npm:^4.0.1" + is-plain-obj: "npm:^3.0.0" + micromatch: "npm:^4.0.2" + peerDependencies: + "@types/express": ^4.17.13 + peerDependenciesMeta: + "@types/express": + optional: true + checksum: 10/4a51bf612b752ad945701995c1c029e9501c97e7224c0cf3f8bf6d48d172d6a8f2b57c20fec469534fdcac3aa8a6f332224a33c6b0d7f387aa2cfff9b67216fd + languageName: node + linkType: hard + "http-proxy@npm:^1.18.1": version: 1.18.1 resolution: "http-proxy@npm:1.18.1" @@ -33897,13 +30719,23 @@ __metadata: languageName: node linkType: hard +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: "npm:^5.1.1" + resolve-alpn: "npm:^1.0.0" + checksum: 10/8097ee2699440c2e64bda52124990cc5b0fb347401c7797b1a0c1efd5a0f79a4ebaa68e8a6ac3e2dde5f09460c1602764da6da2412bad628ed0a3b0ae35e72d4 + languageName: node + linkType: hard + "http2-wrapper@npm:^2.1.10": - version: 2.2.0 - resolution: "http2-wrapper@npm:2.2.0" + version: 2.2.1 + resolution: "http2-wrapper@npm:2.2.1" dependencies: quick-lru: "npm:^5.1.1" resolve-alpn: "npm:^1.2.0" - checksum: 10/f02842f0db16a265426baa1b0eed708c3e0bcf9abc64b943712d2a06df9221564490c4f62cea1df9ff767dba9a4afc13e8e47fa41b526bea7d62f0ceb49c5fa7 + checksum: 10/e7a5ac6548318e83fc0399cd832cdff6bbf902b165d211cad47a56ee732922e0aa1107246dd884b12532a1c4649d27c4d44f2480911c65202e93c90bde8fa29d languageName: node linkType: hard @@ -33914,7 +30746,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:5.0.1": +"https-proxy-agent@npm:5.0.1, https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -33934,23 +30766,13 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^5.0.0": - version: 5.0.0 - resolution: "https-proxy-agent@npm:5.0.0" - dependencies: - agent-base: "npm:6" - debug: "npm:4" - checksum: 10/517037badcbbe30757a9a88aaf5e8c198d31aa0b1e9c0a49a0053ab8e812809242218cc9ea1929171f74d95ae1ec89782ba471ffc3709b8910e91d1761f5f1a6 - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.1": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" +"https-proxy-agent@npm:^7.0.0, https-proxy-agent@npm:^7.0.1": + version: 7.0.5 + resolution: "https-proxy-agent@npm:7.0.5" dependencies: agent-base: "npm:^7.0.2" debug: "npm:4" - checksum: 10/9ec844f78fd643608239c9c3f6819918631df5cd3e17d104cc507226a39b5d4adda9d790fc9fd63ac0d2bb8a761b2f9f60faa80584a9bf9d7f2e8c5ed0acd330 + checksum: 10/6679d46159ab3f9a5509ee80c3a3fc83fba3a920a5e18d32176c3327852c3c00ad640c0c4210a8fd70ea3c4a6d3a1b375bf01942516e7df80e2646bdc77658ab languageName: node linkType: hard @@ -33968,6 +30790,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^4.3.0": + version: 4.3.1 + resolution: "human-signals@npm:4.3.1" + checksum: 10/fa59894c358fe9f2b5549be2fb083661d5e1dff618d3ac70a49ca73495a72e873fbf6c0878561478e521e17d498292746ee391791db95ffe5747bfb5aef8765b + languageName: node + linkType: hard + "human-signals@npm:^5.0.0": version: 5.0.0 resolution: "human-signals@npm:5.0.0" @@ -34009,7 +30838,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": +"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" dependencies: @@ -34080,21 +30909,12 @@ __metadata: languageName: node linkType: hard -"ignore-walk@npm:^6.0.0": - version: 6.0.2 - resolution: "ignore-walk@npm:6.0.2" - dependencies: - minimatch: "npm:^7.4.2" - checksum: 10/ec3bd6f5bb413ed56204875eb3d097a46415408cbd9b828002214f35674b9e5f7b708faafa510df7ea462d12112add8d6df402f742fefcc47abc18fe8817354b - languageName: node - linkType: hard - -"ignore-walk@npm:^6.0.4": - version: 6.0.4 - resolution: "ignore-walk@npm:6.0.4" +"ignore-walk@npm:^6.0.0, ignore-walk@npm:^6.0.4": + version: 6.0.5 + resolution: "ignore-walk@npm:6.0.5" dependencies: minimatch: "npm:^9.0.0" - checksum: 10/a56c3f929bb0890ffb6e87dfaca7d5ce97f9e179fd68d49711edea55760aaee367cea3845d7620689b706249053c4b1805e21158f6751c7333f9b2ffb3668272 + checksum: 10/08757abff4dabca4f9f005f9a6cb6684e0c460a1e08c50319460ac13002de0ba8bbde6ad1f4477fefb264135d6253d1268339c18292f82485fcce576af0539d9 languageName: node linkType: hard @@ -34105,17 +30925,10 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.1, ignore@npm:^5.2.0": - version: 5.2.0 - resolution: "ignore@npm:5.2.0" - checksum: 10/30283f05fb7d867ee0e08faebb3e69caba2c6c55092042cd061eac1b37a3e78db72bfcfbb08b3598999344fba3d93a9c693b5401da5faaecc0fb7c2dce87beb4 - languageName: node - linkType: hard - -"ignore@npm:^5.1.9, ignore@npm:^5.2.4": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 10/4f7caf5d2005da21a382d4bd1d2aa741a3bed51de185c8562dd7f899a81a620ac4fd0619b06f7029a38ae79e4e4c134399db3bd0192c703c3ef54bb82df3086c +"ignore@npm:^5.1.1, ignore@npm:^5.1.9, ignore@npm:^5.2.0, ignore@npm:^5.2.4": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 languageName: node linkType: hard @@ -34150,9 +30963,9 @@ __metadata: linkType: hard "immutable@npm:^4.0.0, immutable@npm:^4.0.0-rc.12": - version: 4.0.0 - resolution: "immutable@npm:4.0.0" - checksum: 10/bc8e3f46a539ca060531d3e94bb691a75b3acf75abbe856cb1c3365f7cff2c12f51bdd0ec428ce7fc6283ee5d284867dbfcb08baf12e08242185cdb13f4ad151 + version: 4.3.7 + resolution: "immutable@npm:4.3.7" + checksum: 10/37d963c5050f03ae5f3714ba7a43d469aa482051087f4c65d673d1501c309ea231d87480c792e19fa85e2eaf965f76af5d0aa92726505f3cfe4af91619dfb80b languageName: node linkType: hard @@ -34166,22 +30979,15 @@ __metadata: languageName: node linkType: hard -"import-lazy@npm:^2.1.0": - version: 2.1.0 - resolution: "import-lazy@npm:2.1.0" - checksum: 10/05294f3b9dd4971d3a996f0d2f176410fb6745d491d6e73376429189f5c1c3d290548116b2960a7cf3e89c20cdf11431739d1d2d8c54b84061980795010e803a - languageName: node - linkType: hard - "import-local@npm:^3.0.2, import-local@npm:^3.1.0": - version: 3.1.0 - resolution: "import-local@npm:3.1.0" + version: 3.2.0 + resolution: "import-local@npm:3.2.0" dependencies: pkg-dir: "npm:^4.2.0" resolve-cwd: "npm:^3.0.0" bin: import-local-fixture: fixtures/cli.js - checksum: 10/bfcdb63b5e3c0e245e347f3107564035b128a414c4da1172a20dc67db2504e05ede4ac2eee1252359f78b0bfd7b19ef180aec427c2fce6493ae782d73a04cddd + checksum: 10/0b0b0b412b2521739fbb85eeed834a3c34de9bc67e670b3d0b86248fc460d990a7b116ad056c084b87a693ef73d1f17268d6a5be626bb43c998a8b1c8a230004 languageName: node linkType: hard @@ -34276,13 +31082,6 @@ __metadata: languageName: node linkType: hard -"ini@npm:2.0.0, ini@npm:^2.0.0": - version: 2.0.0 - resolution: "ini@npm:2.0.0" - checksum: 10/04e24ba05c4f6947e15560824e153b4610bceea2f5a3ab68651d221a4aab3c77d4e3e90a917ebc8bf5ad71a30a8575de56c39d6b4c4b1375a28016b9f3625f9d - languageName: node - linkType: hard - "ini@npm:4.1.1": version: 4.1.1 resolution: "ini@npm:4.1.1" @@ -34304,6 +31103,20 @@ __metadata: languageName: node linkType: hard +"ini@npm:^2.0.0": + version: 2.0.0 + resolution: "ini@npm:2.0.0" + checksum: 10/04e24ba05c4f6947e15560824e153b4610bceea2f5a3ab68651d221a4aab3c77d4e3e90a917ebc8bf5ad71a30a8575de56c39d6b4c4b1375a28016b9f3625f9d + languageName: node + linkType: hard + +"ini@npm:^4.1.3": + version: 4.1.3 + resolution: "ini@npm:4.1.3" + checksum: 10/f536b414d1442e5b233429e2b56efcdb354109b2d65ddd489e5939d8f0f5ad23c88aa2b19c92987249d0dd63ba8192e9aeb1a02b0459549c5a9ff31acd729a5d + languageName: node + linkType: hard + "ink@npm:^3.2.0": version: 3.2.0 resolution: "ink@npm:3.2.0" @@ -34508,13 +31321,12 @@ __metadata: linkType: hard "interface-datastore@npm:^8.2.0": - version: 8.2.5 - resolution: "interface-datastore@npm:8.2.5" + version: 8.3.1 + resolution: "interface-datastore@npm:8.3.1" dependencies: - interface-store: "npm:^5.0.0" - nanoid: "npm:^4.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/34eeac161928075133af02eba9b3c807ed40a0ec6e3699fc9a2f5006ff3c97a049d68f15d2d7f91eaa802680ede0e6e3827a6042eba8110ce6adb0f514e4d310 + interface-store: "npm:^6.0.0" + uint8arrays: "npm:^5.1.0" + checksum: 10/23ff57c1c9fc1ceb0bf147921a6e56f07972f537cd7340a84406c68d44244981ddf1b411677ee9ee7710f9c9f5aaf0b1cfe08fe1de15ffb2333f84814f870a7b languageName: node linkType: hard @@ -34525,22 +31337,22 @@ __metadata: languageName: node linkType: hard -"interface-store@npm:^5.0.0": - version: 5.1.4 - resolution: "interface-store@npm:5.1.4" - checksum: 10/6088314f34839a442c7dec6307adfa92460d91ff62d06fcf3c8abe1d78642f5621588ce54a0bbc7972df525a06339707e52a23c9cf4701dd14ef2f8890bae9d0 +"interface-store@npm:^6.0.0": + version: 6.0.2 + resolution: "interface-store@npm:6.0.2" + checksum: 10/4689c1476061efb2c0ef4b1eccf70c8cba48eec2acf8f8bab189ef14466f45d2f0d57c2622bcdfde229249c629ccd69ea9c16c20d706f049d6a1e4a7841fac39 languageName: node linkType: hard "internal-ip@npm:*": - version: 7.0.0 - resolution: "internal-ip@npm:7.0.0" + version: 8.0.0 + resolution: "internal-ip@npm:8.0.0" dependencies: - default-gateway: "npm:^6.0.3" - ipaddr.js: "npm:^2.0.1" - is-ip: "npm:^3.1.0" - p-event: "npm:^4.2.0" - checksum: 10/058fafe81a7e4d2466474361b74fd712d986f553def881c7dff51fd7eb98573d03c44cab047dddf41473252406e66fa20ed23f6a1b76962b090eee26a22854b6 + cidr-tools: "npm:^6.4.1" + default-gateway: "npm:^7.2.2" + is-ip: "npm:^5.0.0" + p-event: "npm:^5.0.1" + checksum: 10/f37e83fb887887003291ad704f54abb2c97c4e87f8e9680aa02e608d3983d68d76ee93e2ac8d0c7344b93b28a214e6e297053052d689fc9f8a071b1aa3183df0 languageName: node linkType: hard @@ -34556,29 +31368,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" - dependencies: - get-intrinsic: "npm:^1.1.0" - has: "npm:^1.0.3" - side-channel: "npm:^1.0.4" - checksum: 10/1c6d22f7977b325e51387191a992a553bf7c380db548a32c09bbb4563a799d739d3ef629841234290a032dc555ca7e89178e8a35404dad77b55f2676be8a1ba2 - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": - version: 1.0.5 - resolution: "internal-slot@npm:1.0.5" - dependencies: - get-intrinsic: "npm:^1.2.0" - has: "npm:^1.0.3" - side-channel: "npm:^1.0.4" - checksum: 10/e2eb5b348e427957dd4092cb57b9374a2cbcabbf61e5e5b4d99cb68eeaae29394e8efd79f23dc2b1831253346f3c16b82010737b84841225e934d80d04d68643 - languageName: node - linkType: hard - -"internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -34661,16 +31451,7 @@ __metadata: languageName: node linkType: hard -"ionicons@npm:^7.0.0": - version: 7.1.2 - resolution: "ionicons@npm:7.1.2" - dependencies: - "@stencil/core": "npm:^2.18.0" - checksum: 10/6201c77cd63f6808b43a807f1995a293d6b7587babdee1c8e1d8e9cfaadd5aa9635b1e4d6b35149173b9d14cf570c03d327f7d6d57b8b7b18d415ff66df2a3f9 - languageName: node - linkType: hard - -"ionicons@npm:^7.2.2": +"ionicons@npm:^7.0.0, ionicons@npm:^7.2.2": version: 7.4.0 resolution: "ionicons@npm:7.4.0" dependencies: @@ -34679,24 +31460,34 @@ __metadata: languageName: node linkType: hard -"ip-regex@npm:^4.0.0": - version: 4.3.0 - resolution: "ip-regex@npm:4.3.0" - checksum: 10/7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08 +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c languageName: node linkType: hard -"ip@npm:^1.1.5": - version: 1.1.5 - resolution: "ip@npm:1.1.5" - checksum: 10/40a00572cf06b53f4c7b7fe6270a8427ef4c6c0820a380f9f1eb48a323eb09c7dbd16245b472cf5a2d083911d0deae4d712b6e6c88b346fa274e8ce07756a7d6 +"ip-bigint@npm:7.3.0": + version: 7.3.0 + resolution: "ip-bigint@npm:7.3.0" + checksum: 10/ad235be9ef9a2133aa40f1c91b573ecbefdaebcd8154e55ff03fa6882a3b3e9ad7ff37f20dcad29cab87179b6c0e652664802ce90f5aa6ab4fcf7a70160e7863 languageName: node linkType: hard -"ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: 10/1270b11e534a466fb4cf4426cbcc3a907c429389f7f4e4e3b288b42823562e88d6a509ceda8141a507de147ca506141f745005c0aa144569d94cf24a54eb52bc +"ip-regex@npm:5.0.0, ip-regex@npm:^5.0.0": + version: 5.0.0 + resolution: "ip-regex@npm:5.0.0" + checksum: 10/4098b2df89c015f1484a5946e733ec126af8c1828719d90e09f04af23ce487e1a852670e4d3f51b0dc6dfbaf7d8bfab23fd7893ca60e69833da99b7b1ee3623b + languageName: node + linkType: hard + +"ip-regex@npm:^4.0.0": + version: 4.3.0 + resolution: "ip-regex@npm:4.3.0" + checksum: 10/7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08 languageName: node linkType: hard @@ -34707,14 +31498,7 @@ __metadata: languageName: node linkType: hard -"ipaddr.js@npm:^2.0.1": - version: 2.0.1 - resolution: "ipaddr.js@npm:2.0.1" - checksum: 10/b809f60af0473f1452480b05a2cec8270284290d18d2778df522d08e0b6d0db21b84f5bf4949190f3c728794d3eef36bfaeff14a1e1acf6045553f4532b119de - languageName: node - linkType: hard - -"ipaddr.js@npm:^2.1.0": +"ipaddr.js@npm:^2.0.1, ipaddr.js@npm:^2.1.0": version: 2.2.0 resolution: "ipaddr.js@npm:2.2.0" checksum: 10/9e1cdd9110b3bca5d910ab70d7fb1933e9c485d9b92cb14ef39f30c412ba3fe02a553921bf696efc7149cc653453c48ccf173adb996ec27d925f1f340f872986 @@ -34801,21 +31585,12 @@ __metadata: languageName: node linkType: hard -"is-accessor-descriptor@npm:^0.1.6": - version: 0.1.6 - resolution: "is-accessor-descriptor@npm:0.1.6" - dependencies: - kind-of: "npm:^3.0.2" - checksum: 10/3d629a086a9585bc16a83a8e8a3416f400023301855cafb7ccc9a1d63145b7480f0ad28877dcc2cce09492c4ec1c39ef4c071996f24ee6ac626be4217b8ffc8a - languageName: node - linkType: hard - -"is-accessor-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-accessor-descriptor@npm:1.0.0" +"is-accessor-descriptor@npm:^1.0.1": + version: 1.0.1 + resolution: "is-accessor-descriptor@npm:1.0.1" dependencies: - kind-of: "npm:^6.0.0" - checksum: 10/8e475968e9b22f9849343c25854fa24492dbe8ba0dea1a818978f9f1b887339190b022c9300d08c47fe36f1b913d70ce8cbaca00369c55a56705fdb7caed37fe + hasown: "npm:^2.0.0" + checksum: 10/df0d1da1a320e57c594e6f9b52dab8a6bece6dc90e51689d05ac8e5247164aa3eb3e9c66b37027bebfc0ea5fcce6d9503dbc41dccd82f4b57add79a307735365 languageName: node linkType: hard @@ -34829,18 +31604,7 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": - version: 3.0.2 - resolution: "is-array-buffer@npm:3.0.2" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.0" - is-typed-array: "npm:^1.1.10" - checksum: 10/dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.4": +"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" dependencies: @@ -34915,14 +31679,7 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.4": - version: 1.2.4 - resolution: "is-callable@npm:1.2.4" - checksum: 10/4e3d8c08208475e74a4108a9dc44dbcb74978782e38a1d1b55388342a4824685765d95917622efa2ca1483f7c4dbec631dd979cbb3ebd239f57a75c83a46d99f - languageName: node - linkType: hard - -"is-callable@npm:^1.2.7": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 10/48a9297fb92c99e9df48706241a189da362bff3003354aea4048bd5f7b2eb0d823cd16d0a383cece3d76166ba16d85d9659165ac6fcce1ac12e6c649d66dbdb9 @@ -34960,66 +31717,21 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.11.0": - version: 2.12.0 - resolution: "is-core-module@npm:2.12.0" +"is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1, is-core-module@npm:^2.15.1, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": + version: 2.15.1 + resolution: "is-core-module@npm:2.15.1" dependencies: - has: "npm:^1.0.3" - checksum: 10/c1585e0695ad4f01ce67189c85ffc27b487c6b23f80f319c27f057f9724f8926c62baf53743bd77a717a0491c86eeb1a07b065e332672a1325872abf16e0cdbc + hasown: "npm:^2.0.2" + checksum: 10/77316d5891d5743854bcef2cd2f24c5458fb69fbc9705c12ca17d54a2017a67d0693bbf1ba8c77af376c0eef6bf6d1b27a4ab08e4db4e69914c3789bdf2ceec5 languageName: node linkType: hard -"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.1": - version: 2.13.1 - resolution: "is-core-module@npm:2.13.1" +"is-data-descriptor@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-descriptor@npm:1.0.1" dependencies: hasown: "npm:^2.0.0" - checksum: 10/d53bd0cc24b0a0351fb4b206ee3908f71b9bbf1c47e9c9e14e5f06d292af1663704d2abd7e67700d6487b2b7864e0d0f6f10a1edf1892864bdffcb197d1845a2 - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0": - version: 2.13.0 - resolution: "is-core-module@npm:2.13.0" - dependencies: - has: "npm:^1.0.3" - checksum: 10/55ccb5ccd208a1e088027065ee6438a99367e4c31c366b52fbaeac8fa23111cd17852111836d904da604801b3286d38d3d1ffa6cd7400231af8587f021099dc6 - languageName: node - linkType: hard - -"is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": - version: 2.8.1 - resolution: "is-core-module@npm:2.8.1" - dependencies: - has: "npm:^1.0.3" - checksum: 10/80b33fbd450c3b7070a8ea101b730a8ae0aee326bb665cdb067220edbc98fb847d1294f8ded036d5b022827fb8d3e6fcf30313a601785c5d902db7660f6cd7b1 - languageName: node - linkType: hard - -"is-core-module@npm:^2.9.0": - version: 2.12.1 - resolution: "is-core-module@npm:2.12.1" - dependencies: - has: "npm:^1.0.3" - checksum: 10/35d5f90c95f7c737d287121e924bdfcad0a47b33efd7f89c58e9ab3810b43b1f1d377b641797326bde500e47edf5a7bf74a464e0c336a5c7e827b13fa41b57af - languageName: node - linkType: hard - -"is-data-descriptor@npm:^0.1.4": - version: 0.1.4 - resolution: "is-data-descriptor@npm:0.1.4" - dependencies: - kind-of: "npm:^3.0.2" - checksum: 10/5c622e078ba933a78338ae398a3d1fc5c23332b395312daf4f74bab4afb10d061cea74821add726cb4db8b946ba36217ee71a24fe71dd5bca4632edb7f6aad87 - languageName: node - linkType: hard - -"is-data-descriptor@npm:^1.0.0": - version: 1.0.0 - resolution: "is-data-descriptor@npm:1.0.0" - dependencies: - kind-of: "npm:^6.0.0" - checksum: 10/b8b1f13a535800a9f35caba2743b2cfd1e76312c0f94248c333d3b724d6ac6e07f06011e8b00eb2442f27dfc8fb71faf3dd52ced6bee41bb836be3df5d7811ee + checksum: 10/49b36e903b31623b0c5b416e182e366810ef97a3a19ab0e6cd501eb5599112680b7d9e768b07a84fb52aa2510a92b3eb51a3e18ce8d5f7978a49f4b50e6ec6dd languageName: node linkType: hard @@ -35042,24 +31754,22 @@ __metadata: linkType: hard "is-descriptor@npm:^0.1.0": - version: 0.1.6 - resolution: "is-descriptor@npm:0.1.6" + version: 0.1.7 + resolution: "is-descriptor@npm:0.1.7" dependencies: - is-accessor-descriptor: "npm:^0.1.6" - is-data-descriptor: "npm:^0.1.4" - kind-of: "npm:^5.0.0" - checksum: 10/b946ba842187c2784a5a0d67bd0e0271b14678f4fdce7d2295dfda9201f3408f55f56e11e5e66bfa4d2b9d45655b6105ad872ad7d37fb63f582587464fd414d7 + is-accessor-descriptor: "npm:^1.0.1" + is-data-descriptor: "npm:^1.0.1" + checksum: 10/38783182c3d83f839a9fa3e87b4d6de11fa9639833ed98993ea51aea2296b2da155121956e148695a738228871d1057c5f963d0b1c857bb8a4a38d8dd9ceeb56 languageName: node linkType: hard "is-descriptor@npm:^1.0.0, is-descriptor@npm:^1.0.2": - version: 1.0.2 - resolution: "is-descriptor@npm:1.0.2" + version: 1.0.3 + resolution: "is-descriptor@npm:1.0.3" dependencies: - is-accessor-descriptor: "npm:^1.0.0" - is-data-descriptor: "npm:^1.0.0" - kind-of: "npm:^6.0.2" - checksum: 10/e68059b333db331d5ea68cb367ce12fc6810853ced0e2221e6747143bbdf223dee73ebe8f331bafe04e34fdbe3da584b6af3335e82eabfaa33d5026efa33ca34 + is-accessor-descriptor: "npm:^1.0.1" + is-data-descriptor: "npm:^1.0.1" + checksum: 10/b940d04d93adaffb749b3ca7f7f6d73dd3c5582b674f372513ecb5511a8a3f3ff4a24f4c1161cb10e48fe4886f9e84c09fa71785def27905ca8df1197e563dc6 languageName: node linkType: hard @@ -35089,9 +31799,9 @@ __metadata: linkType: hard "is-electron@npm:^2.2.0": - version: 2.2.1 - resolution: "is-electron@npm:2.2.1" - checksum: 10/06e569aa933a737d418489bb9ca081af62eceb714d4c3d553ad2497610e35494be6dddd010c4e29890c7dd9d0481c2e3e1e9097af9d19df1c52dd5be747d80a0 + version: 2.2.2 + resolution: "is-electron@npm:2.2.2" + checksum: 10/de5aa8bd8d72c96675b8d0f93fab4cc21f62be5440f65bc05c61338ca27bd851a64200f31f1bf9facbaa01b3dbfed7997b2186741d84b93b63e0aff1db6a9494 languageName: node linkType: hard @@ -35232,16 +31942,6 @@ __metadata: languageName: node linkType: hard -"is-installed-globally@npm:^0.4.0": - version: 0.4.0 - resolution: "is-installed-globally@npm:0.4.0" - dependencies: - global-dirs: "npm:^3.0.0" - is-path-inside: "npm:^3.0.2" - checksum: 10/5294d21c82cb9beedd693ce1dfb12117c4db36d6e35edc9dc6bf06cb300d23c96520d1bfb063386b054268ae3d7255c3f09393b52218cc26ace99b217bf37c93 - languageName: node - linkType: hard - "is-interactive@npm:^1.0.0": version: 1.0.0 resolution: "is-interactive@npm:1.0.0" @@ -35258,6 +31958,16 @@ __metadata: languageName: node linkType: hard +"is-ip@npm:^5.0.0": + version: 5.0.1 + resolution: "is-ip@npm:5.0.1" + dependencies: + ip-regex: "npm:^5.0.0" + super-regex: "npm:^0.2.0" + checksum: 10/86dcac321f05e7ca0bdd2061cec022d3bfe2328fdb1a4fd2d0e7fbdb8689b1223c31ae1c4681faff9ef202816c8fe99ef6b4145a990583b494e530ee6bdeafb9 + languageName: node + linkType: hard + "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -35274,10 +31984,10 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.1, is-map@npm:^2.0.2": - version: 2.0.2 - resolution: "is-map@npm:2.0.2" - checksum: 10/60ba910f835f2eacb1fdf5b5a6c60fe1c702d012a7673e6546992bcc0c873f62ada6e13d327f9e48f1720d49c152d6cdecae1fa47a261ef3d247c3ce6f0e1d39 +"is-map@npm:^2.0.2, is-map@npm:^2.0.3": + version: 2.0.3 + resolution: "is-map@npm:2.0.3" + checksum: 10/8de7b41715b08bcb0e5edb0fb9384b80d2d5bcd10e142188f33247d19ff078abaf8e9b6f858e2302d8d05376a26a55cd23a3c9f8ab93292b02fcd2cc9e4e92bb languageName: node linkType: hard @@ -35308,7 +32018,7 @@ __metadata: languageName: node linkType: hard -"is-nan@npm:^1.2.1": +"is-nan@npm:^1.3.2": version: 1.3.2 resolution: "is-nan@npm:1.3.2" dependencies: @@ -35325,13 +32035,6 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.1, is-negative-zero@npm:^2.0.2": - version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: 10/edbec1a9e6454d68bf595a114c3a72343d2d0be7761d8173dae46c0b73d05bb8fe9398c85d121e7794a66467d2f40b4a610b0be84cd804262d234fc634c86131 - languageName: node - linkType: hard - "is-negative-zero@npm:^2.0.3": version: 2.0.3 resolution: "is-negative-zero@npm:2.0.3" @@ -35346,19 +32049,12 @@ __metadata: languageName: node linkType: hard -"is-npm@npm:^5.0.0": - version: 5.0.0 - resolution: "is-npm@npm:5.0.0" - checksum: 10/9baff02b0c69a3d3c79b162cb2f9e67fb40ef6d172c16601b2e2471c21e9a4fa1fc9885a308d7bc6f3a3cd2a324c27fa0bf284c133c3349bb22571ab70d041cc - languageName: node - linkType: hard - "is-number-object@npm:^1.0.4": - version: 1.0.6 - resolution: "is-number-object@npm:1.0.6" + version: 1.0.7 + resolution: "is-number-object@npm:1.0.7" dependencies: has-tostringtag: "npm:^1.0.0" - checksum: 10/d848fdc0fc69e30866b87fcaae17a3e68a8be669073ab3bf9a578c29106a2d5084089a2e7bc40819ec55eac94a52d9e20d735e7bfd3a46202b17199e555f91fa + checksum: 10/8700dcf7f602e0a9625830541345b8615d04953655acbf5c6d379c58eb1af1465e71227e95d501343346e1d49b6f2d53cbc166b1fc686a7ec19151272df582f9 languageName: node linkType: hard @@ -35392,13 +32088,6 @@ __metadata: languageName: node linkType: hard -"is-object@npm:^1.0.1": - version: 1.0.2 - resolution: "is-object@npm:1.0.2" - checksum: 10/db53971751c50277f0ed31d065d93038d23cb9785090ab5c8070a903cf5bab16cdb18f05b8855599ad87ec19eb4c85afa05980bcda77dd4a8482120b6348c73c - languageName: node - linkType: hard - "is-object@npm:~0.1.2": version: 0.1.2 resolution: "is-object@npm:0.1.2" @@ -35413,7 +32102,7 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": +"is-path-inside@npm:^3.0.3": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 @@ -35448,7 +32137,7 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^4.0.0": +"is-plain-obj@npm:^4.0.0, is-plain-obj@npm:^4.1.0": version: 4.1.0 resolution: "is-plain-obj@npm:4.1.0" checksum: 10/6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce @@ -35530,6 +32219,13 @@ __metadata: languageName: node linkType: hard +"is-regexp@npm:^3.0.0": + version: 3.1.0 + resolution: "is-regexp@npm:3.1.0" + checksum: 10/d39dbd9892f0a25d01ee1a8e650c3f2e045bf7b1fa87eafb50b31dd29342869aa9135fd372628202254398956bf7f4b62094bdda39283ec2a9bb749fbb7f427c + languageName: node + linkType: hard + "is-relative-path@npm:^1.0.2": version: 1.0.2 resolution: "is-relative-path@npm:1.0.2" @@ -35544,13 +32240,6 @@ __metadata: languageName: node linkType: hard -"is-retry-allowed@npm:^1.0.0": - version: 1.2.0 - resolution: "is-retry-allowed@npm:1.2.0" - checksum: 10/50d700a89ae31926b1c91b3eb0104dbceeac8790d8b80d02f5c76d9a75c2056f1bb24b5268a8a018dead606bddf116b2262e5ac07401eb8b8783b266ed22558d - languageName: node - linkType: hard - "is-root@npm:^2.1.0": version: 2.1.0 resolution: "is-root@npm:2.1.0" @@ -35558,30 +32247,14 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.1, is-set@npm:^2.0.2": - version: 2.0.2 - resolution: "is-set@npm:2.0.2" - checksum: 10/d89e82acdc7760993474f529e043f9c4a1d63ed4774d21cc2e331d0e401e5c91c27743cd7c889137028f6a742234759a4bd602368fbdbf0b0321994aefd5603f - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.1": - version: 1.0.1 - resolution: "is-shared-array-buffer@npm:1.0.1" - checksum: 10/ddb03381c5b6a468ddfbe0340506b3a18abc3525b4695f06683261d8febb5b69a51dc277f6835d440f765432fd5e666fbbfaae91051adc77b74babadcdb755d4 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "is-shared-array-buffer@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10/23d82259d6cd6dbb7c4ff3e4efeff0c30dbc6b7f88698498c17f9821cb3278d17d2b6303a5341cbd638ab925a28f3f086a6c79b3df70ac986cc526c725d43b4f +"is-set@npm:^2.0.2, is-set@npm:^2.0.3": + version: 2.0.3 + resolution: "is-set@npm:2.0.3" + checksum: 10/5685df33f0a4a6098a98c72d94d67cad81b2bc72f1fb2091f3d9283c4a1c582123cd709145b02a9745f0ce6b41e3e43f1c944496d1d74d4ea43358be61308669 languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.3": +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": version: 1.0.3 resolution: "is-shared-array-buffer@npm:1.0.3" dependencies: @@ -35599,7 +32272,7 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^1.0.0, is-stream@npm:^1.1.0": +"is-stream@npm:^1.1.0": version: 1.1.0 resolution: "is-stream@npm:1.1.0" checksum: 10/351aa77c543323c4e111204482808cfad68d2e940515949e31ccd0b010fc13d5fba4b9c230e4887fd24284713040f43e542332fbf172f6b9944b7d62e389c0ec @@ -35663,20 +32336,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": - version: 1.1.10 - resolution: "is-typed-array@npm:1.1.10" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - checksum: 10/2392b2473bbc994f5c30d6848e32bab3cab6c80b795aaec3020baf5419ff7df38fc11b3a043eb56d50f842394c578dbb204a7a29398099f895cf111c5b27f327 - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.13": +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.3": version: 1.1.13 resolution: "is-typed-array@npm:1.1.13" dependencies: @@ -35685,19 +32345,6 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.7": - version: 1.1.8 - resolution: "is-typed-array@npm:1.1.8" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-abstract: "npm:^1.18.5" - foreach: "npm:^2.0.5" - has-tostringtag: "npm:^1.0.0" - checksum: 10/3b7d1a365dea95cfbd1b3822261b9b399b76d3170e94b8d1c65e5aa2dc53a965086030b31488ad06e62898e7afef7057e93f710ac62fdb0655efef97cd88e48e - languageName: node - linkType: hard - "is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" @@ -35742,14 +32389,14 @@ __metadata: languageName: node linkType: hard -"is-weakmap@npm:^2.0.1": - version: 2.0.1 - resolution: "is-weakmap@npm:2.0.1" - checksum: 10/289fa4e8ba1bdda40ca78481266f6925b7c46a85599e6a41a77010bf91e5a24dfb660db96863bbf655ecdbda0ab517204d6a4e0c151dbec9d022c556321f3776 +"is-weakmap@npm:^2.0.2": + version: 2.0.2 + resolution: "is-weakmap@npm:2.0.2" + checksum: 10/a7b7e23206c542dcf2fa0abc483142731788771527e90e7e24f658c0833a0d91948a4f7b30d78f7a65255a48512e41a0288b778ba7fc396137515c12e201fd11 languageName: node linkType: hard -"is-weakref@npm:^1.0.1, is-weakref@npm:^1.0.2": +"is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" dependencies: @@ -35758,13 +32405,13 @@ __metadata: languageName: node linkType: hard -"is-weakset@npm:^2.0.1": - version: 2.0.2 - resolution: "is-weakset@npm:2.0.2" +"is-weakset@npm:^2.0.3": + version: 2.0.3 + resolution: "is-weakset@npm:2.0.3" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/8f2ddb9639716fd7936784e175ea1183c5c4c05274c34f34f6a53175313cb1c9c35a8b795623306995e2f7cc8f25aa46302f15a2113e51c5052d447be427195c + call-bind: "npm:^1.0.7" + get-intrinsic: "npm:^1.2.4" + checksum: 10/40159582ff1b44fc40085f631baf19f56479b05af2faede65b4e6a0b6acab745c13fd070e35b475aafd8a1ee50879ba5a3f1265125b46bebdb446b6be1f62165 languageName: node linkType: hard @@ -35800,13 +32447,6 @@ __metadata: languageName: node linkType: hard -"is-yarn-global@npm:^0.3.0": - version: 0.3.0 - resolution: "is-yarn-global@npm:0.3.0" - checksum: 10/bca013d65fee2862024c9fbb3ba13720ffca2fe750095174c1c80922fdda16402b5c233f5ac9e265bc12ecb5446e7b7f519a32d9541788f01d4d44e24d2bf481 - languageName: node - linkType: hard - "is@npm:~0.2.6": version: 0.2.7 resolution: "is@npm:0.2.7" @@ -35946,10 +32586,10 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.0.0-alpha.1, istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.0 - resolution: "istanbul-lib-coverage@npm:3.2.0" - checksum: 10/31621b84ad29339242b63d454243f558a7958ee0b5177749bacf1f74be7d95d3fd93853738ef7eebcddfaf3eab014716e51392a8dbd5aa1bdc1b15c2ebc53c24 +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 languageName: node linkType: hard @@ -36023,34 +32663,32 @@ __metadata: linkType: hard "istanbul-lib-instrument@npm:^5.0.4, istanbul-lib-instrument@npm:^5.1.0": - version: 5.1.0 - resolution: "istanbul-lib-instrument@npm:5.1.0" + version: 5.2.1 + resolution: "istanbul-lib-instrument@npm:5.2.1" dependencies: "@babel/core": "npm:^7.12.3" "@babel/parser": "npm:^7.14.7" "@istanbuljs/schema": "npm:^0.1.2" istanbul-lib-coverage: "npm:^3.2.0" semver: "npm:^6.3.0" - checksum: 10/7447ba3f8049f331d5b4a1c450183e88c2fdad044149ad0d9830f71bc8da90d841c393b830bc33237ae75122c3b0e03ca845701873d6c51690bc25caa1f13a94 + checksum: 10/bbc4496c2f304d799f8ec22202ab38c010ac265c441947f075c0f7d46bd440b45c00e46017cf9053453d42182d768b1d6ed0e70a142c95ab00df9843aa5ab80e languageName: node linkType: hard -"istanbul-lib-processinfo@npm:^2.0.2": - version: 2.0.2 - resolution: "istanbul-lib-processinfo@npm:2.0.2" +"istanbul-lib-instrument@npm:^6.0.0": + version: 6.0.3 + resolution: "istanbul-lib-instrument@npm:6.0.3" dependencies: - archy: "npm:^1.0.0" - cross-spawn: "npm:^7.0.0" - istanbul-lib-coverage: "npm:^3.0.0-alpha.1" - make-dir: "npm:^3.0.0" - p-map: "npm:^3.0.0" - rimraf: "npm:^3.0.0" - uuid: "npm:^3.3.3" - checksum: 10/40efb26ea9d96a4c7571a70cf657ff7dc3e9fde3863020c3086c482bd8851320b127cc0a7e80e403a70e26b2b88579b007ca1a15af6ed351db6d4ec63fc2792d + "@babel/core": "npm:^7.23.9" + "@babel/parser": "npm:^7.23.9" + "@istanbuljs/schema": "npm:^0.1.3" + istanbul-lib-coverage: "npm:^3.2.0" + semver: "npm:^7.5.4" + checksum: 10/aa5271c0008dfa71b6ecc9ba1e801bf77b49dc05524e8c30d58aaf5b9505e0cd12f25f93165464d4266a518c5c75284ecb598fbd89fec081ae77d2c9d3327695 languageName: node linkType: hard -"istanbul-lib-processinfo@npm:^2.0.3": +"istanbul-lib-processinfo@npm:^2.0.2, istanbul-lib-processinfo@npm:^2.0.3": version: 2.0.3 resolution: "istanbul-lib-processinfo@npm:2.0.3" dependencies: @@ -36088,13 +32726,13 @@ __metadata: linkType: hard "istanbul-lib-report@npm:^3.0.0": - version: 3.0.0 - resolution: "istanbul-lib-report@npm:3.0.0" + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" dependencies: istanbul-lib-coverage: "npm:^3.0.0" - make-dir: "npm:^3.0.0" + make-dir: "npm:^4.0.0" supports-color: "npm:^7.1.0" - checksum: 10/06b37952e9cb0fe419a37c7f3d74612a098167a9eb0e5264228036e78b42ca5226501e8130738b5306d94bae2ea068ca674080d4af959992523d84aacff67728 + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 languageName: node linkType: hard @@ -36154,22 +32792,12 @@ __metadata: linkType: hard "istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3": - version: 3.1.4 - resolution: "istanbul-reports@npm:3.1.4" + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" dependencies: html-escaper: "npm:^2.0.0" istanbul-lib-report: "npm:^3.0.0" - checksum: 10/b720f7ff87a37e1500e001913e781395b96cc6ca4d475e01da2ec78d1571435ded4b1b31fb53ef8d760bc5fa691b2b6b647bcb4c1238f6aaf58b261d47510c93 - languageName: node - linkType: hard - -"isurl@npm:^1.0.0-alpha5": - version: 1.0.0 - resolution: "isurl@npm:1.0.0" - dependencies: - has-to-string-tag-x: "npm:^1.2.0" - is-object: "npm:^1.0.1" - checksum: 10/28a96e019269d57015fa5869f19dda5a3ed1f7b21e3e0c4ff695419bd0541547db352aa32ee4a3659e811a177b0e37a5bc1a036731e71939dd16b59808ab92bd + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa languageName: node linkType: hard @@ -36225,12 +32853,12 @@ __metadata: languageName: node linkType: hard -"it-pushable@npm:^3.0.0, it-pushable@npm:^3.2.0": - version: 3.2.1 - resolution: "it-pushable@npm:3.2.1" +"it-pushable@npm:^3.0.0": + version: 3.2.3 + resolution: "it-pushable@npm:3.2.3" dependencies: p-defer: "npm:^4.0.0" - checksum: 10/ec94087c5e5823695ade9b02ae0982c32331e71d00b8c3405843e9fec104e47b70dfae78d1e8e25ecea00316f1e4c0d144bbcf37fe84689a0203f4a612965b8c + checksum: 10/173e031e9cba9493d21ad9823f070c7b665ce711fdb41bbe6451c20bef4b9bb0bfefa41020a2d2fe39f7eb979dd87c4d91f235bfa39869b5f6eecec9debb15b7 languageName: node linkType: hard @@ -36241,13 +32869,6 @@ __metadata: languageName: node linkType: hard -"it-stream-types@npm:^2.0.1": - version: 2.0.1 - resolution: "it-stream-types@npm:2.0.1" - checksum: 10/06193e2f7c7a9e9c1cea430884e24fd769670c2ddc897bf7a3e424bd048fa1f8da280ee3c1c404fdab5667f434002b2f45d5ff5cebdccbc41ca1516a0ae11907 - languageName: node - linkType: hard - "it-to-stream@npm:^1.0.0": version: 1.0.0 resolution: "it-to-stream@npm:1.0.0" @@ -36269,16 +32890,16 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.2": - version: 1.1.2 - resolution: "iterator.prototype@npm:1.1.2" +"iterator.prototype@npm:^1.1.3": + version: 1.1.3 + resolution: "iterator.prototype@npm:1.1.3" dependencies: define-properties: "npm:^1.2.1" get-intrinsic: "npm:^1.2.1" has-symbols: "npm:^1.0.3" reflect.getprototypeof: "npm:^1.0.4" set-function-name: "npm:^2.0.1" - checksum: 10/b5013967ad8f28c9ca1be8e159eb10f591b8e46deae87476fe39d668c04374fe9158c815e8b6d2f45885b0a3fd842a8ba13f497ec762b3a0eff49bec278670b1 + checksum: 10/1a2a508d3baac121b76c834404ff552d1bb96a173b1d74ff947b2c5763840c0b1e5be01be7e2183a19b08e99e38729812668ff1f23b35f6655a366017bc32519 languageName: node linkType: hard @@ -36291,48 +32912,22 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.0.3": - version: 2.3.3 - resolution: "jackspeak@npm:2.3.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/a4c7c1a3ffea90bbcaa2f7a0d2885861e94138982aef0ced8efd299b32ccb69645b49d27f5e3e81c57005002674dd7e2b5d08a4287e9110534e512ada53557b2 - languageName: node - linkType: hard - -"jackspeak@npm:^2.3.5": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/6e6490d676af8c94a7b5b29b8fd5629f21346911ebe2e32931c2a54210134408171c24cee1a109df2ec19894ad04a429402a8438cbf5cc2794585d35428ace76 - languageName: node - linkType: hard - "jackspeak@npm:^3.1.2": - version: 3.4.0 - resolution: "jackspeak@npm:3.4.0" + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" dependencies: "@isaacs/cliui": "npm:^8.0.2" "@pkgjs/parseargs": "npm:^0.11.0" dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 10/5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 languageName: node linkType: hard "jake@npm:^10.8.5": - version: 10.8.7 - resolution: "jake@npm:10.8.7" + version: 10.9.2 + resolution: "jake@npm:10.9.2" dependencies: async: "npm:^3.2.3" chalk: "npm:^4.0.2" @@ -36340,7 +32935,7 @@ __metadata: minimatch: "npm:^3.1.2" bin: jake: bin/cli.js - checksum: 10/ad1cfe398836df4e6962954e5095597c21c5af1ea5a4182f6adf0869df8aca467a2eeca7869bf44f47120f4dd4ea52589d16050d295c87a5906c0d744775acc3 + checksum: 10/3be324708f99f031e0aec49ef8fd872eb4583cbe8a29a0c875f554f6ac638ee4ea5aa759bb63723fd54f77ca6d7db851eaa78353301734ed3700db9cb109a0cd languageName: node linkType: hard @@ -36355,13 +32950,14 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^29.5.0": - version: 29.5.0 - resolution: "jest-changed-files@npm:29.5.0" +"jest-changed-files@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-changed-files@npm:29.7.0" dependencies: execa: "npm:^5.0.0" + jest-util: "npm:^29.7.0" p-limit: "npm:^3.1.0" - checksum: 10/6e337b09dca173dc60d53a1c880817ef31f91c6ddc23d93fabb7e714d4388857332c76e7a7fc627bf150e3fba0b70ba968912f86934bd176ca0dc66883303122 + checksum: 10/3d93742e56b1a73a145d55b66e96711fbf87ef89b96c2fab7cfdfba8ec06612591a982111ca2b712bb853dbc16831ec8b43585a2a96b83862d6767de59cbf83d languageName: node linkType: hard @@ -36392,31 +32988,31 @@ __metadata: languageName: node linkType: hard -"jest-circus@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-circus@npm:29.6.2" +"jest-circus@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-circus@npm:29.7.0" dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/expect": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/environment": "npm:^29.7.0" + "@jest/expect": "npm:^29.7.0" + "@jest/test-result": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" chalk: "npm:^4.0.0" co: "npm:^4.6.0" dedent: "npm:^1.0.0" is-generator-fn: "npm:^2.0.0" - jest-each: "npm:^29.6.2" - jest-matcher-utils: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-runtime: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - jest-util: "npm:^29.6.2" + jest-each: "npm:^29.7.0" + jest-matcher-utils: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-runtime: "npm:^29.7.0" + jest-snapshot: "npm:^29.7.0" + jest-util: "npm:^29.7.0" p-limit: "npm:^3.1.0" - pretty-format: "npm:^29.6.2" + pretty-format: "npm:^29.7.0" pure-rand: "npm:^6.0.0" slash: "npm:^3.0.0" stack-utils: "npm:^2.0.3" - checksum: 10/985034d5182adba11cfb667db9f0264c305cdfc9e7a61a42fb35ad981ce4d8b8499751e0af682e170b143e112827503fa15eea90d87129fb27940c9483b5ced1 + checksum: 10/716a8e3f40572fd0213bcfc1da90274bf30d856e5133af58089a6ce45089b63f4d679bd44e6be9d320e8390483ebc3ae9921981993986d21639d9019b523123d languageName: node linkType: hard @@ -36448,20 +33044,19 @@ __metadata: linkType: hard "jest-cli@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-cli@npm:29.6.2" + version: 29.7.0 + resolution: "jest-cli@npm:29.7.0" dependencies: - "@jest/core": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/core": "npm:^29.7.0" + "@jest/test-result": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" chalk: "npm:^4.0.0" + create-jest: "npm:^29.7.0" exit: "npm:^0.1.2" - graceful-fs: "npm:^4.2.9" import-local: "npm:^3.0.2" - jest-config: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" - prompts: "npm:^2.0.1" + jest-config: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + jest-validate: "npm:^29.7.0" yargs: "npm:^17.3.1" peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -36470,7 +33065,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 10/64393941163b1f8969fe7eb91d4d2c209880d709c446fc4c9ae9d69c50553eb83fe50e7a18967587dc324eb0168ee7fbe330115c902cc2a37aac0fb214317a23 + checksum: 10/6cc62b34d002c034203065a31e5e9a19e7c76d9e8ef447a6f70f759c0714cb212c6245f75e270ba458620f9c7b26063cd8cf6cd1f7e3afd659a7cc08add17307 languageName: node linkType: hard @@ -36511,30 +33106,30 @@ __metadata: languageName: node linkType: hard -"jest-config@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-config@npm:29.6.2" +"jest-config@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-config@npm:29.7.0" dependencies: "@babel/core": "npm:^7.11.6" - "@jest/test-sequencer": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" - babel-jest: "npm:^29.6.2" + "@jest/test-sequencer": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" + babel-jest: "npm:^29.7.0" chalk: "npm:^4.0.0" ci-info: "npm:^3.2.0" deepmerge: "npm:^4.2.2" glob: "npm:^7.1.3" graceful-fs: "npm:^4.2.9" - jest-circus: "npm:^29.6.2" - jest-environment-node: "npm:^29.6.2" - jest-get-type: "npm:^29.4.3" - jest-regex-util: "npm:^29.4.3" - jest-resolve: "npm:^29.6.2" - jest-runner: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" + jest-circus: "npm:^29.7.0" + jest-environment-node: "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + jest-regex-util: "npm:^29.6.3" + jest-resolve: "npm:^29.7.0" + jest-runner: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + jest-validate: "npm:^29.7.0" micromatch: "npm:^4.0.4" parse-json: "npm:^5.2.0" - pretty-format: "npm:^29.6.2" + pretty-format: "npm:^29.7.0" slash: "npm:^3.0.0" strip-json-comments: "npm:^3.1.1" peerDependencies: @@ -36545,7 +33140,7 @@ __metadata: optional: true ts-node: optional: true - checksum: 10/c0cff6578c2efd2b6918568a0848e2138e122debcc81843f7ffd27a2ed761a09a9ed10f424c021a47a083e54701711c7590388a52e57d1fcaeb074db03527a01 + checksum: 10/6bdf570e9592e7d7dd5124fc0e21f5fe92bd15033513632431b211797e3ab57eaa312f83cc6481b3094b72324e369e876f163579d60016677c117ec4853cf02b languageName: node linkType: hard @@ -36561,15 +33156,15 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^29.0.0, jest-diff@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-diff@npm:29.6.2" +"jest-diff@npm:^29.0.0, jest-diff@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-diff@npm:29.7.0" dependencies: chalk: "npm:^4.0.0" - diff-sequences: "npm:^29.4.3" - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.6.2" - checksum: 10/8c66d29afbb64b4cb1c0daa7c20a7838b32ec16e989f7767f7088b466bfa64d7a501b3f8592c6ab148dde19645740cb868a18b29b992eb72517842287c03144e + diff-sequences: "npm:^29.6.3" + jest-get-type: "npm:^29.6.3" + pretty-format: "npm:^29.7.0" + checksum: 10/6f3a7eb9cd9de5ea9e5aa94aed535631fa6f80221832952839b3cb59dd419b91c20b73887deb0b62230d06d02d6b6cf34ebb810b88d904bb4fe1e2e4f0905c98 languageName: node linkType: hard @@ -36582,12 +33177,12 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-docblock@npm:29.4.3" +"jest-docblock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-docblock@npm:29.7.0" dependencies: detect-newline: "npm:^3.0.0" - checksum: 10/fd6bb0b6c60a1d87ade37b8bd8404c64518dc42357f256eeb8cb3f313eb00c138645d602ba7c57059a3de4a6570f12ab1234cb3d2d7a9b948d9dfa255e85b1d2 + checksum: 10/8d48818055bc96c9e4ec2e217a5a375623c0d0bfae8d22c26e011074940c202aa2534a3362294c81d981046885c05d304376afba9f2874143025981148f3e96d languageName: node linkType: hard @@ -36604,16 +33199,16 @@ __metadata: languageName: node linkType: hard -"jest-each@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-each@npm:29.6.2" +"jest-each@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-each@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.4.3" - jest-util: "npm:^29.6.2" - pretty-format: "npm:^29.6.2" - checksum: 10/04c21926df07c7468d3ab1a9a6e142de1802c353f755c26e8100081bbc4fa121aa1ba8ce8d2c8770e1410dfe5172bbfad0d1f77116038c9aeabbd93e9b00a12a + jest-get-type: "npm:^29.6.3" + jest-util: "npm:^29.7.0" + pretty-format: "npm:^29.7.0" + checksum: 10/bd1a077654bdaa013b590deb5f7e7ade68f2e3289180a8c8f53bc8a49f3b40740c0ec2d3a3c1aee906f682775be2bebbac37491d80b634d15276b0aa0f2e3fda languageName: node linkType: hard @@ -36646,17 +33241,17 @@ __metadata: languageName: node linkType: hard -"jest-environment-node@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-environment-node@npm:29.6.2" +"jest-environment-node@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-environment-node@npm:29.7.0" dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/fake-timers": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/environment": "npm:^29.7.0" + "@jest/fake-timers": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" - jest-mock: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - checksum: 10/60e7a134424ced4e2a7e41b54687154cbcf5e282432968c3caedb52c269e1b4e250020ceedec383babaa31d25deee47475277100ed239cac7afbdb297f9b9af3 + jest-mock: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + checksum: 10/9cf7045adf2307cc93aed2f8488942e39388bff47ec1df149a997c6f714bfc66b2056768973770d3f8b1bf47396c19aa564877eb10ec978b952c6018ed1bd637 languageName: node linkType: hard @@ -36682,10 +33277,10 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-get-type@npm:29.4.3" - checksum: 10/6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce +"jest-get-type@npm:^29.0.0, jest-get-type@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-get-type@npm:29.6.3" + checksum: 10/88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205 languageName: node linkType: hard @@ -36713,26 +33308,26 @@ __metadata: languageName: node linkType: hard -"jest-haste-map@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-haste-map@npm:29.6.2" +"jest-haste-map@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-haste-map@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" "@types/graceful-fs": "npm:^4.1.3" "@types/node": "npm:*" anymatch: "npm:^3.0.3" fb-watchman: "npm:^2.0.0" fsevents: "npm:^2.3.2" graceful-fs: "npm:^4.2.9" - jest-regex-util: "npm:^29.4.3" - jest-util: "npm:^29.6.2" - jest-worker: "npm:^29.6.2" + jest-regex-util: "npm:^29.6.3" + jest-util: "npm:^29.7.0" + jest-worker: "npm:^29.7.0" micromatch: "npm:^4.0.4" walker: "npm:^1.0.8" dependenciesMeta: fsevents: optional: true - checksum: 10/855d2c94979ad0795d5ef31cc81ccf40d2c2f6abd63de34a89e8b12e6b1cf7b9ae875f7479b783b7a2e9f55502ad1d241d483c103bed85a75c2b10eaafea3634 + checksum: 10/8531b42003581cb18a69a2774e68c456fb5a5c3280b1b9b77475af9e346b6a457250f9d756bfeeae2fe6cbc9ef28434c205edab9390ee970a919baddfa08bb85 languageName: node linkType: hard @@ -36771,13 +33366,13 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-leak-detector@npm:29.6.2" +"jest-leak-detector@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-leak-detector@npm:29.7.0" dependencies: - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.6.2" - checksum: 10/e00152acdba8aa8f9334775b77375947508051c34646fbeb702275da2b6ac6145f8cad6d5893112e76484d00fa8c0b4fd71b78ab0b4ef34950f5b6a84f37ae67 + jest-get-type: "npm:^29.6.3" + pretty-format: "npm:^29.7.0" + checksum: 10/e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 languageName: node linkType: hard @@ -36793,15 +33388,15 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-matcher-utils@npm:29.6.2" +"jest-matcher-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-matcher-utils@npm:29.7.0" dependencies: chalk: "npm:^4.0.0" - jest-diff: "npm:^29.6.2" - jest-get-type: "npm:^29.4.3" - pretty-format: "npm:^29.6.2" - checksum: 10/38dc3f71620745054246fb31e1979587fb241d3a2ecea1f325dbcba6503653d7e2482c6deffa99d661b9da2f093c7713d6977fd2a6b8f57537875745049088ed + jest-diff: "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + pretty-format: "npm:^29.7.0" + checksum: 10/981904a494299cf1e3baed352f8a3bd8b50a8c13a662c509b6a53c31461f94ea3bfeffa9d5efcfeb248e384e318c87de7e3baa6af0f79674e987482aa189af40 languageName: node linkType: hard @@ -36839,20 +33434,20 @@ __metadata: languageName: node linkType: hard -"jest-message-util@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-message-util@npm:29.6.2" +"jest-message-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-message-util@npm:29.7.0" dependencies: "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" "@types/stack-utils": "npm:^2.0.0" chalk: "npm:^4.0.0" graceful-fs: "npm:^4.2.9" micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.6.2" + pretty-format: "npm:^29.7.0" slash: "npm:^3.0.0" stack-utils: "npm:^2.0.3" - checksum: 10/a0e972367f12894dd0bcda2c2cd540607a6884315a411757b2e136eb54a53b54675f2e632b58a121e253bb456cfa564a9e10d5b7238b46de190095de78e445ba + checksum: 10/31d53c6ed22095d86bab9d14c0fa70c4a92c749ea6ceece82cf30c22c9c0e26407acdfbdb0231435dc85a98d6d65ca0d9cbcd25cd1abb377fe945e843fb770b9 languageName: node linkType: hard @@ -36866,26 +33461,26 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-mock@npm:29.6.2" +"jest-mock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-mock@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" - jest-util: "npm:^29.6.2" - checksum: 10/b2cd0e61d22d2bcbaefb167e177977e37a28176f0b54717c068b655da18679db4daa9762d478bf5a347819a89e082a68b3f1f53a4da22401521668424a6d6bac + jest-util: "npm:^29.7.0" + checksum: 10/ae51d1b4f898724be5e0e52b2268a68fcd876d9b20633c864a6dd6b1994cbc48d62402b0f40f3a1b669b30ebd648821f086c26c08ffde192ced951ff4670d51c languageName: node linkType: hard "jest-pnp-resolver@npm:^1.2.2": - version: 1.2.2 - resolution: "jest-pnp-resolver@npm:1.2.2" + version: 1.2.3 + resolution: "jest-pnp-resolver@npm:1.2.3" peerDependencies: jest-resolve: "*" peerDependenciesMeta: jest-resolve: optional: true - checksum: 10/bd85dcc0e76e0eb0c3d56382ec140f08d25ff4068cda9d0e360bb78fb176cb726d0beab82dc0e8694cafd09f55fee7622b8bcb240afa5fad301f4ed3eebb4f47 + checksum: 10/db1a8ab2cb97ca19c01b1cfa9a9c8c69a143fde833c14df1fab0766f411b1148ff0df878adea09007ac6a2085ec116ba9a996a6ad104b1e58c20adbf88eed9b2 languageName: node linkType: hard @@ -36903,10 +33498,10 @@ __metadata: languageName: node linkType: hard -"jest-regex-util@npm:^29.4.3": - version: 29.4.3 - resolution: "jest-regex-util@npm:29.4.3" - checksum: 10/96fc7fc28cd4dd73a63c13a526202c4bd8b351d4e5b68b1a2a2c88da3308c2a16e26feaa593083eb0bac38cca1aa9dd05025412e7de013ba963fb8e66af22b8a +"jest-regex-util@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-regex-util@npm:29.6.3" + checksum: 10/0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a languageName: node linkType: hard @@ -36921,13 +33516,13 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-resolve-dependencies@npm:29.6.2" +"jest-resolve-dependencies@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve-dependencies@npm:29.7.0" dependencies: - jest-regex-util: "npm:^29.4.3" - jest-snapshot: "npm:^29.6.2" - checksum: 10/f66441b6f2e61c7ab6a00c42f43c42716ce7dca21a5e90bef1a442baf4c7c73445ed06c64442c1f3c933bd96e99fd754e1f9f944ff59d93fb9958270f4a00f40 + jest-regex-util: "npm:^29.6.3" + jest-snapshot: "npm:^29.7.0" + checksum: 10/1e206f94a660d81e977bcfb1baae6450cb4a81c92e06fad376cc5ea16b8e8c6ea78c383f39e95591a9eb7f925b6a1021086c38941aa7c1b8a6a813c2f6e93675 languageName: node linkType: hard @@ -36949,20 +33544,20 @@ __metadata: languageName: node linkType: hard -"jest-resolve@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-resolve@npm:29.6.2" +"jest-resolve@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve@npm:29.7.0" dependencies: chalk: "npm:^4.0.0" graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" + jest-haste-map: "npm:^29.7.0" jest-pnp-resolver: "npm:^1.2.2" - jest-util: "npm:^29.6.2" - jest-validate: "npm:^29.6.2" + jest-util: "npm:^29.7.0" + jest-validate: "npm:^29.7.0" resolve: "npm:^1.20.0" resolve.exports: "npm:^2.0.0" slash: "npm:^3.0.0" - checksum: 10/3b42d596cef79966bef8e10435fc0ba1699db9f00b694f2017c55051e12528253e829eaf34eef06065737c5a7a79013e48b546379126ad3687354ee62d6e1a16 + checksum: 10/faa466fd9bc69ea6c37a545a7c6e808e073c66f46ab7d3d8a6ef084f8708f201b85d5fe1799789578b8b47fa1de47b9ee47b414d1863bc117a49e032ba77b7c7 languageName: node linkType: hard @@ -36995,32 +33590,32 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-runner@npm:29.6.2" +"jest-runner@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runner@npm:29.7.0" dependencies: - "@jest/console": "npm:^29.6.2" - "@jest/environment": "npm:^29.6.2" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/console": "npm:^29.7.0" + "@jest/environment": "npm:^29.7.0" + "@jest/test-result": "npm:^29.7.0" + "@jest/transform": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" chalk: "npm:^4.0.0" emittery: "npm:^0.13.1" graceful-fs: "npm:^4.2.9" - jest-docblock: "npm:^29.4.3" - jest-environment-node: "npm:^29.6.2" - jest-haste-map: "npm:^29.6.2" - jest-leak-detector: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-resolve: "npm:^29.6.2" - jest-runtime: "npm:^29.6.2" - jest-util: "npm:^29.6.2" - jest-watcher: "npm:^29.6.2" - jest-worker: "npm:^29.6.2" + jest-docblock: "npm:^29.7.0" + jest-environment-node: "npm:^29.7.0" + jest-haste-map: "npm:^29.7.0" + jest-leak-detector: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-resolve: "npm:^29.7.0" + jest-runtime: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + jest-watcher: "npm:^29.7.0" + jest-worker: "npm:^29.7.0" p-limit: "npm:^3.1.0" source-map-support: "npm:0.5.13" - checksum: 10/378600bec4017b101986ce5a4df7a3a6926f9b24667a4c8cd7e0cf0f38076e1148b25000a2bd3c37b789fe1823ab949b0ffbd6ec250a7bf8fb371533bef2d81e + checksum: 10/9d8748a494bd90f5c82acea99be9e99f21358263ce6feae44d3f1b0cd90991b5df5d18d607e73c07be95861ee86d1cbab2a3fc6ca4b21805f07ac29d47c1da1e languageName: node linkType: hard @@ -37054,33 +33649,33 @@ __metadata: languageName: node linkType: hard -"jest-runtime@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-runtime@npm:29.6.2" - dependencies: - "@jest/environment": "npm:^29.6.2" - "@jest/fake-timers": "npm:^29.6.2" - "@jest/globals": "npm:^29.6.2" - "@jest/source-map": "npm:^29.6.0" - "@jest/test-result": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" +"jest-runtime@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runtime@npm:29.7.0" + dependencies: + "@jest/environment": "npm:^29.7.0" + "@jest/fake-timers": "npm:^29.7.0" + "@jest/globals": "npm:^29.7.0" + "@jest/source-map": "npm:^29.6.3" + "@jest/test-result": "npm:^29.7.0" + "@jest/transform": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" chalk: "npm:^4.0.0" cjs-module-lexer: "npm:^1.0.0" collect-v8-coverage: "npm:^1.0.0" glob: "npm:^7.1.3" graceful-fs: "npm:^4.2.9" - jest-haste-map: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-mock: "npm:^29.6.2" - jest-regex-util: "npm:^29.4.3" - jest-resolve: "npm:^29.6.2" - jest-snapshot: "npm:^29.6.2" - jest-util: "npm:^29.6.2" + jest-haste-map: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-mock: "npm:^29.7.0" + jest-regex-util: "npm:^29.6.3" + jest-resolve: "npm:^29.7.0" + jest-snapshot: "npm:^29.7.0" + jest-util: "npm:^29.7.0" slash: "npm:^3.0.0" strip-bom: "npm:^4.0.0" - checksum: 10/2f2a1b9cac3019f5b752bb9abf42d1d58cce0b4780399b87c480c74e01b62460bf2f624fdc7288decfe706a99f67f49e9bdc905bb28e0ace2305ee03ae0d886a + checksum: 10/59eb58eb7e150e0834a2d0c0d94f2a0b963ae7182cfa6c63f2b49b9c6ef794e5193ef1634e01db41420c36a94cefc512cdd67a055cd3e6fa2f41eaf0f82f5a20 languageName: node linkType: hard @@ -37124,31 +33719,31 @@ __metadata: languageName: node linkType: hard -"jest-snapshot@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-snapshot@npm:29.6.2" +"jest-snapshot@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-snapshot@npm:29.7.0" dependencies: "@babel/core": "npm:^7.11.6" "@babel/generator": "npm:^7.7.2" "@babel/plugin-syntax-jsx": "npm:^7.7.2" "@babel/plugin-syntax-typescript": "npm:^7.7.2" "@babel/types": "npm:^7.3.3" - "@jest/expect-utils": "npm:^29.6.2" - "@jest/transform": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/expect-utils": "npm:^29.7.0" + "@jest/transform": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" babel-preset-current-node-syntax: "npm:^1.0.0" chalk: "npm:^4.0.0" - expect: "npm:^29.6.2" + expect: "npm:^29.7.0" graceful-fs: "npm:^4.2.9" - jest-diff: "npm:^29.6.2" - jest-get-type: "npm:^29.4.3" - jest-matcher-utils: "npm:^29.6.2" - jest-message-util: "npm:^29.6.2" - jest-util: "npm:^29.6.2" + jest-diff: "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + jest-matcher-utils: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-util: "npm:^29.7.0" natural-compare: "npm:^1.4.0" - pretty-format: "npm:^29.6.2" + pretty-format: "npm:^29.7.0" semver: "npm:^7.5.3" - checksum: 10/d9412eeea378ba070b9a67a161bb65b1b1038106dce8849c9e8266d4688dc8739063c9acd2d011f02f0f2cce2ff4e709be89c0657b03b89150fe7bdae769ec1c + checksum: 10/cb19a3948256de5f922d52f251821f99657339969bf86843bd26cf3332eae94883e8260e3d2fba46129a27c3971c1aa522490e460e16c7fad516e82d10bbf9f8 languageName: node linkType: hard @@ -37180,31 +33775,17 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^29.0.0": - version: 29.5.0 - resolution: "jest-util@npm:29.5.0" +"jest-util@npm:^29.0.0, jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.5.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" chalk: "npm:^4.0.0" ci-info: "npm:^3.2.0" graceful-fs: "npm:^4.2.9" picomatch: "npm:^2.2.3" - checksum: 10/27ae6fc6221d29b31df9c071f190e0e27a9caaeca04ee1ce03f5c925ec8abf594fcf0cb57bdcb93149381415ff1f8198157332b0c76f3592065b7c3fdb35fca1 - languageName: node - linkType: hard - -"jest-util@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-util@npm:29.6.2" - dependencies: - "@jest/types": "npm:^29.6.1" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10/95d510b7bbac6976c71bf9c8f2e861cdc6c47dca0a70c470ebce6fa2afef3fecd73772efdffc04e7aad89602ab388c2f1ee1cb27c505210d767f0731da65c13b + checksum: 10/30d58af6967e7d42bd903ccc098f3b4d3859ed46238fbc88d4add6a3f10bea00c226b93660285f058bc7a65f6f9529cf4eb80f8d4707f79f9e3a23686b4ab8f3 languageName: node linkType: hard @@ -37222,17 +33803,17 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-validate@npm:29.6.2" +"jest-validate@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-validate@npm:29.7.0" dependencies: - "@jest/types": "npm:^29.6.1" + "@jest/types": "npm:^29.6.3" camelcase: "npm:^6.2.0" chalk: "npm:^4.0.0" - jest-get-type: "npm:^29.4.3" + jest-get-type: "npm:^29.6.3" leven: "npm:^3.1.0" - pretty-format: "npm:^29.6.2" - checksum: 10/90ca8e977743a9bacfb2ef647f48c67c692543feacb4ae40235086df7e28bdef1180196d43dfc92074d8c7c807ab0877c4974a91baed4206c8b773fe2b2298ec + pretty-format: "npm:^29.7.0" + checksum: 10/8ee1163666d8eaa16d90a989edba2b4a3c8ab0ffaa95ad91b08ca42b015bfb70e164b247a5b17f9de32d096987cada63ed8491ab82761bfb9a28bc34b27ae161 languageName: node linkType: hard @@ -37284,19 +33865,19 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-watcher@npm:29.6.2" +"jest-watcher@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-watcher@npm:29.7.0" dependencies: - "@jest/test-result": "npm:^29.6.2" - "@jest/types": "npm:^29.6.1" + "@jest/test-result": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" ansi-escapes: "npm:^4.2.1" chalk: "npm:^4.0.0" emittery: "npm:^0.13.1" - jest-util: "npm:^29.6.2" + jest-util: "npm:^29.7.0" string-length: "npm:^4.0.1" - checksum: 10/dbba1872ef7d2874569b7e3397e2426d16487d3802acdfce836ed995709feac739a74b27f81711346e2bdb9e64f998df590b2e80de5db863d496ac35e41f1ad7 + checksum: 10/4f616e0345676631a7034b1d94971aaa719f0cd4a6041be2aa299be437ea047afd4fe05c48873b7963f5687a2f6c7cbf51244be8b14e313b97bfe32b1e127e55 languageName: node linkType: hard @@ -37333,15 +33914,15 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^29.6.2": - version: 29.6.2 - resolution: "jest-worker@npm:29.6.2" +"jest-worker@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" dependencies: "@types/node": "npm:*" - jest-util: "npm:^29.6.2" + jest-util: "npm:^29.7.0" merge-stream: "npm:^2.0.0" supports-color: "npm:^8.0.0" - checksum: 10/7564896d0e61fdd202652c1ce17e1c20ef01dcbf313471dd83e687efa424e82745cc4d7ebf19ba8342327fa62971107c0e507a654e0041f310b4d53bee82584f + checksum: 10/364cbaef00d8a2729fc760227ad34b5e60829e0869bd84976bdfbd8c0d0f9c2f22677b3e6dd8afa76ed174765351cd12bae3d4530c62eefb3791055127ca9745 languageName: node linkType: hard @@ -37382,16 +33963,7 @@ __metadata: languageName: node linkType: hard -"jiti@npm:^1.18.2": - version: 1.20.0 - resolution: "jiti@npm:1.20.0" - bin: - jiti: bin/jiti.js - checksum: 10/c4e59419dcf5599e599602c6c6bd0b3e19748c0bce886887cc91542ea085ef11f69a25dbda2b0ac7af8085afda34eef89ac6e9311949a01839c52a9af4352ec2 - languageName: node - linkType: hard - -"jiti@npm:^1.20.0": +"jiti@npm:^1.18.2, jiti@npm:^1.20.0, jiti@npm:^1.21.0": version: 1.21.6 resolution: "jiti@npm:1.21.6" bin: @@ -37435,9 +34007,9 @@ __metadata: linkType: hard "js-sdsl@npm:^4.1.4": - version: 4.4.0 - resolution: "js-sdsl@npm:4.4.0" - checksum: 10/529d29cf54906b3987a51962e81b112333010be2cac740497dad10048da85839f5ec8d9f0338d6866d93cccf999100ae4d7e81fddaa85e24cb23f2e0c5766c09 + version: 4.4.2 + resolution: "js-sdsl@npm:4.4.2" + checksum: 10/806ab7aea38c15c323c6993b65abfad559d35de7d41ad1e2bf21498f1d4961ef863ac14cecbe667be3ada565dafe7a701096a6f49a275c5190eb1a1732430226 languageName: node linkType: hard @@ -37506,6 +34078,13 @@ __metadata: languageName: node linkType: hard +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + "jsbn@npm:~0.1.0": version: 0.1.1 resolution: "jsbn@npm:0.1.1" @@ -37562,12 +34141,12 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:~0.5.0": - version: 0.5.0 - resolution: "jsesc@npm:0.5.0" +"jsesc@npm:^3.0.2, jsesc@npm:~3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" bin: jsesc: bin/jsesc - checksum: 10/fab949f585c71e169c5cbe00f049f20de74f067081bbd64a55443bad1c71e1b5a5b448f2359bf2fe06f5ed7c07e2e4a9101843b01c823c30b6afc11f5bfaf724 + checksum: 10/8e5a7de6b70a8bd71f9cb0b5a7ade6a73ae6ab55e697c74cc997cede97417a3a65ed86c36f7dd6125fe49766e8386c845023d9e213916ca92c9dfdd56e2babf3 languageName: node linkType: hard @@ -37608,14 +34187,7 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^3.0.0": - version: 3.0.0 - resolution: "json-parse-even-better-errors@npm:3.0.0" - checksum: 10/f1970b5220c7fa23d888565510752c3d5e863f93668a202fcaa719739fa41485dfc6a1db212f702ebd3c873851cc067aebc2917e3f79763cae2fdb95046f38f3 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^3.0.2": +"json-parse-even-better-errors@npm:^3.0.0, json-parse-even-better-errors@npm:^3.0.2": version: 3.0.2 resolution: "json-parse-even-better-errors@npm:3.0.2" checksum: 10/6f04ea6c9ccb783630a59297959247e921cc90b917b8351197ca7fd058fccc7079268fd9362be21ba876fc26aa5039369dd0a2280aae49aae425784794a94927 @@ -37691,7 +34263,7 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify@npm:1.0.2, json-stable-stringify@npm:^1.0.1": +"json-stable-stringify@npm:1.0.2": version: 1.0.2 resolution: "json-stable-stringify@npm:1.0.2" dependencies: @@ -37700,7 +34272,7 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify@npm:^1.0.0": +"json-stable-stringify@npm:^1.0.0, json-stable-stringify@npm:^1.0.1": version: 1.1.1 resolution: "json-stable-stringify@npm:1.1.1" dependencies: @@ -37735,7 +34307,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:2.2.3, json5@npm:^2.2.0, json5@npm:^2.2.2, json5@npm:^2.2.3": +"json5@npm:2.2.3, json5@npm:^2.1.1, json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -37755,15 +34327,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.1, json5@npm:^2.1.2, json5@npm:^2.2.1": - version: 2.2.2 - resolution: "json5@npm:2.2.2" - bin: - json5: lib/cli.js - checksum: 10/b95425711d180dbe2b48d62b581fa2899fe66731bf20f5a7e278567a44b2d5111e82f9ae382c07251a616065c919255ab5ad7851cc446eee6a8bc8e539348086 - languageName: node - linkType: hard - "jsonc-parser@npm:3.2.0": version: 3.2.0 resolution: "jsonc-parser@npm:3.2.0" @@ -37779,9 +34342,9 @@ __metadata: linkType: hard "jsonc-parser@npm:^3.0.0": - version: 3.0.0 - resolution: "jsonc-parser@npm:3.0.0" - checksum: 10/30747660fe34a1abc9b749b7381f5750c0283bedaf8b806f8d0984111e67729476cd4d31529b86b5d85a148d30bb62b8f65dc43e681750b38020fbe5b6c0ea1a + version: 3.3.1 + resolution: "jsonc-parser@npm:3.3.1" + checksum: 10/9b0dc391f20b47378f843ef1e877e73ec652a5bdc3c5fa1f36af0f119a55091d147a86c1ee86a232296f55c929bba174538c2bf0312610e0817a22de131cc3f4 languageName: node linkType: hard @@ -37836,20 +34399,13 @@ __metadata: languageName: node linkType: hard -"jsonify@npm:^0.0.1": +"jsonify@npm:^0.0.1, jsonify@npm:~0.0.0": version: 0.0.1 resolution: "jsonify@npm:0.0.1" checksum: 10/7b86b6f4518582ff1d8b7624ed6c6277affd5246445e864615dbdef843a4057ac58587684faf129ea111eeb80e01c15f0a4d9d03820eb3f3985fa67e81b12398 languageName: node linkType: hard -"jsonify@npm:~0.0.0": - version: 0.0.0 - resolution: "jsonify@npm:0.0.0" - checksum: 10/dc738debf7cc7ebbff2024f07fe089c43f1de48ac68b5ec23aa257e133aaf45a5d3e147a17eac51339a0e1ac6b956a7aad0a18f4e4ce7f583acbadc99c43a566 - languageName: node - linkType: hard - "jsonparse@npm:^1.2.0, jsonparse@npm:^1.3.1": version: 1.3.1 resolution: "jsonparse@npm:1.3.1" @@ -37857,6 +34413,17 @@ __metadata: languageName: node linkType: hard +"jsonpath@npm:^1.1.1": + version: 1.1.1 + resolution: "jsonpath@npm:1.1.1" + dependencies: + esprima: "npm:1.2.2" + static-eval: "npm:2.0.2" + underscore: "npm:1.12.1" + checksum: 10/aa6c2fea9c05eeba4a37870cbbcf30c20de5211d0fd967786b6c59b8546c9f80182328ee2428daf989c8d5c6e6bf97fed28eefc790144258b1238707c30706eb + languageName: node + linkType: hard + "jsonpointer@npm:^5.0.0": version: 5.0.1 resolution: "jsonpointer@npm:5.0.1" @@ -37895,9 +34462,9 @@ __metadata: linkType: hard "jsrsasign@npm:>=11.0.0": - version: 11.0.0 - resolution: "jsrsasign@npm:11.0.0" - checksum: 10/f317f4aa48ea646f3330e6cc9459df4a1891b01848b87f3a1a55b0fa6e7731e90f0d1682954db81c4e39f0db8732d01ea7743e593bc12e79b99cd8e88ea6fc18 + version: 11.1.0 + resolution: "jsrsasign@npm:11.1.0" + checksum: 10/fb46eb8d08634be64a20629da500925c23aea1d6a802e3a528eb3ac647bd3fa1b75070a4bf3425cb3492cb813b3a8b88d097a26225ff78c5ebec28791ddf9016 languageName: node linkType: hard @@ -37908,7 +34475,7 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" dependencies: @@ -37921,9 +34488,9 @@ __metadata: linkType: hard "junk@npm:^4.0.0": - version: 4.0.0 - resolution: "junk@npm:4.0.0" - checksum: 10/af79841fbdc0f3a8ec328a4bf68381013c7f52a78821184855a4b19ef95713edb3c30cd144c6393e6159e1b7dfb76b3f682dc983aafb54e52ff321ab1b4a9983 + version: 4.0.1 + resolution: "junk@npm:4.0.1" + checksum: 10/4f0c94c0b2e46172284d9eaeb57bf1b784d86d218dbc673a1c8e08ef3443d03164238eb067591d0ad9f2c76a6ad012aeb618bb8135a2f0f26a6da931058e131b languageName: node linkType: hard @@ -37999,7 +34566,7 @@ __metadata: languageName: node linkType: hard -"keccak@npm:3.0.2, keccak@npm:^3.0.0": +"keccak@npm:3.0.2": version: 3.0.2 resolution: "keccak@npm:3.0.2" dependencies: @@ -38011,15 +34578,15 @@ __metadata: languageName: node linkType: hard -"keccak@npm:^3.0.2": - version: 3.0.3 - resolution: "keccak@npm:3.0.3" +"keccak@npm:^3.0.0, keccak@npm:^3.0.2": + version: 3.0.4 + resolution: "keccak@npm:3.0.4" dependencies: node-addon-api: "npm:^2.0.0" node-gyp: "npm:latest" node-gyp-build: "npm:^4.2.0" readable-stream: "npm:^3.6.0" - checksum: 10/30c652c39e935132eb92300eca974fad1f4ec4aed4c6e2f21d774b06001d07e24117dd46ef1494272f5674f7f11d5e7a8ee50c7bf8d87bb3895aa60607c4aabc + checksum: 10/45478bb0a57e44d0108646499b8360914b0fbc8b0e088f1076659cb34faaa9eb829c40f6dd9dadb3460bb86cc33153c41fed37fe5ce09465a60e71e78c23fa55 languageName: node linkType: hard @@ -38069,7 +34636,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.0.0, keyv@npm:^4.5.4": +"keyv@npm:^4.0.0, keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -38078,15 +34645,6 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.2": - version: 4.5.3 - resolution: "keyv@npm:4.5.3" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10/2c96e345ecee2c7bf8876b368190b0067308b8da080c1462486fbe71a5b863242c350f1507ddad8f373c5d886b302c42f491de4d3be725071c6743a2f1188ff2 - languageName: node - linkType: hard - "kind-of@npm:^3.0.2, kind-of@npm:^3.0.3": version: 3.2.2 resolution: "kind-of@npm:3.2.2" @@ -38105,14 +34663,7 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^5.0.0": - version: 5.1.0 - resolution: "kind-of@npm:5.1.0" - checksum: 10/acf7cc73881f27629f700a80de77ff7fe4abc9430eac7ddb09117f75126e578ee8d7e44c4dacb6a9e802d5d881abf007ee6af3cfbe55f8b5cf0a7fdc49a02aa3 - languageName: node - linkType: hard - -"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": +"kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": version: 6.0.3 resolution: "kind-of@npm:6.0.3" checksum: 10/5873d303fb36aad875b7538798867da2ae5c9e328d67194b0162a3659a627d22f742fc9c4ae95cd1704132a24b00cae5041fc00c0f6ef937dc17080dc4dbb962 @@ -38138,14 +34689,7 @@ __metadata: languageName: node linkType: hard -"klona@npm:^2.0.4": - version: 2.0.5 - resolution: "klona@npm:2.0.5" - checksum: 10/27cc78ea2dab88da6671b5a19c60215c30ed1e1f8ba3dc900a1beb88d1f8dba815a5d5a61306cd4982330bc6f5db3e3d5d2410556a3a225428341bb6482f90ae - languageName: node - linkType: hard - -"klona@npm:^2.0.5": +"klona@npm:^2.0.4, klona@npm:^2.0.5": version: 2.0.6 resolution: "klona@npm:2.0.6" checksum: 10/ed7e2c9af58cb646e758e60b75dec24bf72466066290f78c515a2bae23a06fa280f11ff3210c43b94a18744954aa5358f9d46583d5e4c36da073ecc3606355c4 @@ -38323,42 +34867,23 @@ __metadata: languageName: node linkType: hard -"language-subtag-registry@npm:~0.3.2": - version: 0.3.22 - resolution: "language-subtag-registry@npm:0.3.22" - checksum: 10/5591f4abd775d1ab5945355a5ba894327d2d94c900607bdb69aac1bc5bb921dbeeeb5f616df95e8c0ae875501d19c1cfa0e852ece822121e95048deb34f2b4d2 - languageName: node - linkType: hard - -"language-tags@npm:=1.0.5": - version: 1.0.5 - resolution: "language-tags@npm:1.0.5" - dependencies: - language-subtag-registry: "npm:~0.3.2" - checksum: 10/2161292ddae73ff2f5a15fd2d753b21096b81324337dff4ad78d702c63210d5beb18892cd53a3455ee6e88065807c8e285e82c40503678951d2071d101a473b4 - languageName: node - linkType: hard - -"latest-version@npm:^5.1.0": - version: 5.1.0 - resolution: "latest-version@npm:5.1.0" - dependencies: - package-json: "npm:^6.3.0" - checksum: 10/fbc72b071eb66c40f652441fd783a9cca62f08bf42433651937f078cd9ef94bf728ec7743992777826e4e89305aef24f234b515e6030503a2cbee7fc9bdc2c0f +"language-subtag-registry@npm:^0.3.20": + version: 0.3.23 + resolution: "language-subtag-registry@npm:0.3.23" + checksum: 10/fe13ed74ab9f862db8e5747b98cc9aa08d52a19f85b5cdb4975cd364c8539bd2da3380e4560d2dbbd728ec33dff8a4b4421fcb2e5b1b1bdaa21d16f91a54d0d4 languageName: node linkType: hard -"launch-editor@npm:^2.6.0": - version: 2.6.0 - resolution: "launch-editor@npm:2.6.0" +"language-tags@npm:^1.0.9": + version: 1.0.9 + resolution: "language-tags@npm:1.0.9" dependencies: - picocolors: "npm:^1.0.0" - shell-quote: "npm:^1.7.3" - checksum: 10/48e4230643e8fdb5c14c11314706d58d9f3fbafe2606be3d6e37da1918ad8bfe39dd87875c726a1b59b9f4da99d87ec3e36d4c528464f0b820f9e91e5cb1c02d + language-subtag-registry: "npm:^0.3.20" + checksum: 10/d3a7c14b694e67f519153d6df6cb200681648d38d623c3bfa9d6a66a5ec5493628acb88e9df5aceef3cf1902ab263a205e7d59ee4cf1d6bb67e707b83538bd6d languageName: node linkType: hard -"launch-editor@npm:^2.6.1": +"launch-editor@npm:^2.6.0, launch-editor@npm:^2.6.1": version: 2.9.1 resolution: "launch-editor@npm:2.9.1" dependencies: @@ -38754,7 +35279,7 @@ __metadata: languageName: node linkType: hard -"level@npm:8.0.0, level@npm:^8.0.0": +"level@npm:8.0.0": version: 8.0.0 resolution: "level@npm:8.0.0" dependencies: @@ -38764,6 +35289,17 @@ __metadata: languageName: node linkType: hard +"level@npm:^8.0.0": + version: 8.0.1 + resolution: "level@npm:8.0.1" + dependencies: + abstract-level: "npm:^1.0.4" + browser-level: "npm:^1.0.1" + classic-level: "npm:^1.2.0" + checksum: 10/a9c6d1fc50e30b2cc80b3c975b34de0eb12daab7fb4f8a546a28303705a45685340a904544fcd32e9a380fae7c62474ebd9cdb0108021ddbc7b88dd9c913f126 + languageName: node + linkType: hard + "leveldown@npm:5.6.0, leveldown@npm:^5.4.0": version: 5.6.0 resolution: "leveldown@npm:5.6.0" @@ -38896,17 +35432,10 @@ __metadata: languageName: node linkType: hard -"libphonenumber-js@npm:^1.10.14": - version: 1.10.49 - resolution: "libphonenumber-js@npm:1.10.49" - checksum: 10/0d6e60564cc3cae9b94ee77207e7889335f07ae1a4da908943e27b123b291d93ee79e7c9c6c9b8a9a1a53d7abbb6c78d52f13e19f1406acfe6a94d38bc196f94 - languageName: node - linkType: hard - -"libphonenumber-js@npm:^1.10.53": - version: 1.11.11 - resolution: "libphonenumber-js@npm:1.11.11" - checksum: 10/c39de6d5922fef7ccdf09a11eb1da5b7d372afb20f6c5a3659e855ddd1ddc07bcc1162dfa021ba4d37fc971a087a6bde00fe9bfc904c2cd42d809d2d5a0d74ae +"libphonenumber-js@npm:^1.10.14, libphonenumber-js@npm:^1.10.53": + version: 1.11.14 + resolution: "libphonenumber-js@npm:1.11.14" + checksum: 10/44433ddcd1f542b68a417c33e1b3ca4f9bb06c1fd8f2f1cd1683472072e12157f2d88d8eb3624a806a1ed1c1012c9f159934f764e7b6ff736c6d17010a7c03d5 languageName: node linkType: hard @@ -38965,23 +35494,30 @@ __metadata: linkType: hard "light-my-request@npm:^5.11.0": - version: 5.13.0 - resolution: "light-my-request@npm:5.13.0" + version: 5.14.0 + resolution: "light-my-request@npm:5.14.0" dependencies: - cookie: "npm:^0.6.0" + cookie: "npm:^0.7.0" process-warning: "npm:^3.0.0" set-cookie-parser: "npm:^2.4.1" - checksum: 10/29407ecd0fcc240fbc4ac53457247e7f796962aaa228e9c5057bb4a7d84fda4f14eaaf39212f2dbfe0869b78a2a42ec82ec4a597a181b9ee19ac23a636c0160d + checksum: 10/ba6efe4dcd96dda3c4a2569d5adf16797fa43dfc365ac6a2386d587c728e5e66a37af5960d511613a8623f73538f9c6adb85b3b506b073a34725660136ffeb37 languageName: node linkType: hard -"lilconfig@npm:^2.0.3, lilconfig@npm:^2.0.5, lilconfig@npm:^2.1.0": +"lilconfig@npm:^2.0.3, lilconfig@npm:^2.1.0": version: 2.1.0 resolution: "lilconfig@npm:2.1.0" checksum: 10/b1314a2e55319013d5e7d7d08be39015829d2764a1eaee130129545d40388499d81b1c31b0f9b3417d4db12775a88008b72ec33dd06e0184cf7503b32ca7cc0b languageName: node linkType: hard +"lilconfig@npm:^3.0.0": + version: 3.1.2 + resolution: "lilconfig@npm:3.1.2" + checksum: 10/8058403850cfad76d6041b23db23f730e52b6c17a8c28d87b90766639ca0ee40c748a3e85c2d7bd133d572efabff166c4b015e5d25e01fd666cb4b13cfada7f0 + languageName: node + linkType: hard + "lines-and-columns@npm:^1.1.6": version: 1.2.4 resolution: "lines-and-columns@npm:1.2.4" @@ -38990,9 +35526,9 @@ __metadata: linkType: hard "lines-and-columns@npm:^2.0.3": - version: 2.0.3 - resolution: "lines-and-columns@npm:2.0.3" - checksum: 10/b5bb0d6ee2f82ae834ceddc9251af2060c30db476673e9c817c34c00bed58e0c5d90a6866b64afe7bdcb2c5eb1b418a5b1ee631d2592dc8ff381540901fa4da6 + version: 2.0.4 + resolution: "lines-and-columns@npm:2.0.4" + checksum: 10/81ac2f943f5428a46bd4ea2561c74ba674a107d8e6cc70cd317d16892a36ff3ba0dc6e599aca8b6f8668d26c85288394c6edf7a40e985ca843acab3701b80d4c languageName: node linkType: hard @@ -39094,13 +35630,13 @@ __metadata: linkType: hard "loader-runner@npm:^4.2.0": - version: 4.2.0 - resolution: "loader-runner@npm:4.2.0" - checksum: 10/89a648e0418f23edf2f310bf74a8adb0710548e8d8d47040def081e1b822bdc27b664b796ce43ceb7921fa56485e1f5046417e425714730dc6ea4242e7a176fa + version: 4.3.0 + resolution: "loader-runner@npm:4.3.0" + checksum: 10/555ae002869c1e8942a0efd29a99b50a0ce6c3296efea95caf48f00d7f6f7f659203ed6613688b6181aa81dc76de3e65ece43094c6dffef3127fe1a84d973cd3 languageName: node linkType: hard -"loader-utils@npm:3.2.1, loader-utils@npm:^3.2.0": +"loader-utils@npm:3.2.1": version: 3.2.1 resolution: "loader-utils@npm:3.2.1" checksum: 10/177f5bb9b4c651263714fcd1b50682c1367b06893462529f510287775f9e461ca27a41bf364c8dffa9cd74ed9e8b1fdb30c03a526f6bcf12573bdc1a1644d086 @@ -39118,6 +35654,13 @@ __metadata: languageName: node linkType: hard +"loader-utils@npm:^3.2.0": + version: 3.3.1 + resolution: "loader-utils@npm:3.3.1" + checksum: 10/3f994a948ded4248569773f065b1f6d7c95da059888c8429153e203f9bdadfb1691ca517f9eac6548a8af2fe5c724a8e09cbb79f665db4209426606a57ec7650 + languageName: node + linkType: hard + "locate-path@npm:^2.0.0": version: 2.0.0 resolution: "locate-path@npm:2.0.0" @@ -39501,20 +36044,7 @@ __metadata: languageName: node linkType: hard -"logform@npm:^2.3.2, logform@npm:^2.4.0": - version: 2.4.0 - resolution: "logform@npm:2.4.0" - dependencies: - "@colors/colors": "npm:1.5.0" - fecha: "npm:^4.2.0" - ms: "npm:^2.1.1" - safe-stable-stringify: "npm:^2.3.1" - triple-beam: "npm:^1.3.0" - checksum: 10/6f24e316b00e05cc90e4f5641345edb2f1c566805ff5bed0ec4a61fb1f4240e983a6c21d7d6d8ca604a33193b89a321154e8ceec86dc43fa48a988765e5ca453 - languageName: node - linkType: hard - -"logform@npm:^2.6.0, logform@npm:^2.6.1": +"logform@npm:^2.4.0, logform@npm:^2.6.0, logform@npm:^2.6.1": version: 2.6.1 resolution: "logform@npm:2.6.1" dependencies: @@ -39542,13 +36072,20 @@ __metadata: languageName: node linkType: hard -"loglevel@npm:1.8.1, loglevel@npm:^1.6.8": +"loglevel@npm:1.8.1": version: 1.8.1 resolution: "loglevel@npm:1.8.1" checksum: 10/36a786082a7e4f1d962de330122291da3a102b88dbde81a45eb92a045c38b0903783958ba39dce641440c0413da303410e7f2565f897bccad828853bd5974c86 languageName: node linkType: hard +"loglevel@npm:^1.6.8": + version: 1.9.2 + resolution: "loglevel@npm:1.9.2" + checksum: 10/6153d8db308323f7ee20130bc40309e7a976c30a10379d8666b596d9c6441965c3e074c8d7ee3347fe5cfc059c0375b6f3e8a10b93d5b813cc5547f5aa412a29 + languageName: node + linkType: hard + "lolex@npm:^2.7.5": version: 2.7.5 resolution: "lolex@npm:2.7.5" @@ -39591,11 +36128,11 @@ __metadata: linkType: hard "loupe@npm:^2.3.1": - version: 2.3.6 - resolution: "loupe@npm:2.3.6" + version: 2.3.7 + resolution: "loupe@npm:2.3.7" dependencies: - get-func-name: "npm:^2.0.0" - checksum: 10/8e695f3c99d9670d524767bc2bcbf799444b865d1d05e974d6dc53d72863c2ce9990103f311f89f04019f064e5ae7bbe70f3fba030a57d65aacfb951aad34d9f + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 languageName: node linkType: hard @@ -39652,17 +36189,10 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.1 - resolution: "lru-cache@npm:10.0.1" - checksum: 10/5bb91a97a342a41fd049c3494b44d9e21a7d4843f9284d0a0b26f00bb0e436f1f627d0641c78f88be16b86b4231546c5ee4f284733fb530c7960f0bcd7579026 - languageName: node - linkType: hard - -"lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": - version: 10.3.0 - resolution: "lru-cache@npm:10.3.0" - checksum: 10/37e921aedbd1f4062475d9fa6760391fa7adfaaee3a5a6cbedd1d6d0b46705c14012312c1edb2b13f119eae6584a48f73c158d118828d42475b44a7abf7d05ab +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a languageName: node linkType: hard @@ -39694,7 +36224,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^7.14.1, lru-cache@npm:^7.4.4, lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": +"lru-cache@npm:^7.4.4, lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": version: 7.18.3 resolution: "lru-cache@npm:7.18.3" checksum: 10/6029ca5aba3aacb554e919d7ef804fffd4adfc4c83db00fac8248c7c78811fb6d4b6f70f7fd9d55032b3823446546a007edaa66ad1f2377ae833bd983fac5d98 @@ -39730,9 +36260,9 @@ __metadata: linkType: hard "luxon@npm:^3.3.0": - version: 3.4.4 - resolution: "luxon@npm:3.4.4" - checksum: 10/c14164bc338987349075a08e63ea3ff902866735f7f5553a355b27be22667919765ff96fde4d3413d0e9a0edc4ff9e2e74ebcb8f86eae0ce8b14b27330d87d6e + version: 3.5.0 + resolution: "luxon@npm:3.5.0" + checksum: 10/48f86e6c1c96815139f8559456a3354a276ba79bcef0ae0d4f2172f7652f3ba2be2237b0e103b8ea0b79b47715354ac9fac04eb1db3485dcc72d5110491dd47f languageName: node linkType: hard @@ -39800,12 +36330,12 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.5": - version: 0.30.5 - resolution: "magic-string@npm:0.30.5" +"magic-string@npm:^0.30.11": + version: 0.30.12 + resolution: "magic-string@npm:0.30.12" dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 10/c8a6b25f813215ca9db526f3a407d6dc0bf35429c2b8111d6f1c2cf6cf6afd5e2d9f9cd189416a0e3959e20ecd635f73639f9825c73de1074b29331fe36ace59 + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10/98016180a52b28efc1362152b45671067facccdaead6b70c1c14c566cba98491bc2e1336474b0996397730dca24400e85649da84d3da62b2560ed03c067573e6 languageName: node linkType: hard @@ -39896,30 +36426,7 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^11.0.0, make-fetch-happen@npm:^11.0.1": - version: 11.0.3 - resolution: "make-fetch-happen@npm:11.0.3" - dependencies: - agentkeepalive: "npm:^4.2.1" - cacache: "npm:^17.0.0" - http-cache-semantics: "npm:^4.1.1" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - is-lambda: "npm:^1.0.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^4.0.0" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - socks-proxy-agent: "npm:^7.0.0" - ssri: "npm:^10.0.0" - checksum: 10/5436d221af82e5fa9b7ddee8b797f822904ba96082d70d8ae2d375e03e75e838ce9e643521ecf840d9f10ccae9fe317d46256654fe1044f349d8a10c6f98b539 - languageName: node - linkType: hard - -"make-fetch-happen@npm:^11.0.3, make-fetch-happen@npm:^11.1.1": +"make-fetch-happen@npm:^11.0.0, make-fetch-happen@npm:^11.0.1, make-fetch-happen@npm:^11.1.1": version: 11.1.1 resolution: "make-fetch-happen@npm:11.1.1" dependencies: @@ -39942,26 +36449,7 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.0": - version: 13.0.0 - resolution: "make-fetch-happen@npm:13.0.0" - dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" - http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10/ded5a91a02b76381b06a4ec4d5c1d23ebbde15d402b3c3e4533b371dac7e2f7ca071ae71ae6dae72aa261182557b7b1b3fd3a705b39252dc17f74fa509d3e76f - languageName: node - linkType: hard - -"make-fetch-happen@npm:^13.0.1": +"make-fetch-happen@npm:^13.0.0, make-fetch-happen@npm:^13.0.1": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" dependencies: @@ -40112,6 +36600,23 @@ __metadata: languageName: node linkType: hard +"mdast-util-to-hast@npm:^13.0.0": + version: 13.2.0 + resolution: "mdast-util-to-hast@npm:13.2.0" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@ungap/structured-clone": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + trim-lines: "npm:^3.0.0" + unist-util-position: "npm:^5.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + checksum: 10/b17ee338f843af31a1c7a2ebf0df6f0b41c9380b7119a63ab521d271df665456578e1234bb7617883e8d860fe878038dcf2b76ab2f21e0f7451215a096d26cce + languageName: node + linkType: hard + "mdn-data@npm:2.0.14": version: 2.0.14 resolution: "mdn-data@npm:2.0.14" @@ -40205,14 +36710,14 @@ __metadata: linkType: hard "memfs@npm:^4.6.0": - version: 4.9.3 - resolution: "memfs@npm:4.9.3" + version: 4.14.0 + resolution: "memfs@npm:4.14.0" dependencies: "@jsonjoy.com/json-pack": "npm:^1.0.3" - "@jsonjoy.com/util": "npm:^1.1.2" + "@jsonjoy.com/util": "npm:^1.3.0" tree-dump: "npm:^1.0.1" tslib: "npm:^2.0.0" - checksum: 10/0fb971420ac005e8c1e66a3c8ad97c22195374ca869ca7d9dcef45b6bc944e98df079fa30e6ff5a1fb9d0559e1afa2d47662671e3a2ff7be985896485cdb37be + checksum: 10/d1a5a38fb8e97cbdff012e47d05c92852484f37a03e9c57b252fdc180c4ffe35ee7ec83acea3be8950e1f13f9152db4d5478124b43f9673f4653e741ba26d584 languageName: node linkType: hard @@ -40234,27 +36739,7 @@ __metadata: languageName: node linkType: hard -"meow@npm:^10.0.0, meow@npm:^10.1.2": - version: 10.1.2 - resolution: "meow@npm:10.1.2" - dependencies: - "@types/minimist": "npm:^1.2.2" - camelcase-keys: "npm:^7.0.0" - decamelize: "npm:^5.0.0" - decamelize-keys: "npm:^1.1.0" - hard-rejection: "npm:^2.1.0" - minimist-options: "npm:4.1.0" - normalize-package-data: "npm:^3.0.2" - read-pkg-up: "npm:^8.0.0" - redent: "npm:^4.0.0" - trim-newlines: "npm:^4.0.2" - type-fest: "npm:^1.2.2" - yargs-parser: "npm:^20.2.9" - checksum: 10/b7cf32ac7d858e9d5e55ba70768f0d13c71be6d6167c1000ce795e4963be5fdddd6bbc6958bb1b392149140dd6c07409cd8a394d297cdbfcc45d428f2c102292 - languageName: node - linkType: hard - -"meow@npm:^10.1.3": +"meow@npm:^10.0.0, meow@npm:^10.1.2, meow@npm:^10.1.3": version: 10.1.5 resolution: "meow@npm:10.1.5" dependencies: @@ -40300,13 +36785,6 @@ __metadata: languageName: node linkType: hard -"merge-descriptors@npm:1.0.1": - version: 1.0.1 - resolution: "merge-descriptors@npm:1.0.1" - checksum: 10/5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26 - languageName: node - linkType: hard - "merge-descriptors@npm:1.0.3, merge-descriptors@npm:^1.0.1": version: 1.0.3 resolution: "merge-descriptors@npm:1.0.3" @@ -40409,6 +36887,48 @@ __metadata: languageName: node linkType: hard +"micromark-util-character@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-util-character@npm:2.1.0" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/089fe853c2bede2a48fd73d977910fa657c3cf6649eddcd300557a975c6c7f1c73030d01724a483ff1dc69a0d3ac28b43b2ba4210f5ea6414807cdcd0c2fa63c + languageName: node + linkType: hard + +"micromark-util-encode@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-encode@npm:2.0.0" + checksum: 10/853a3f33fce72aaf4ffa60b7f2b6fcfca40b270b3466e1b96561b02185d2bd8c01dd7948bc31a24ac014f4cc854e545ca9a8e9cf7ea46262f9d24c9e88551c66 + languageName: node + linkType: hard + +"micromark-util-sanitize-uri@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-sanitize-uri@npm:2.0.0" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-encode: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/7d10622f5a2bb058dda6d2e95b2735c43fdf8daa4f88a0863bc90eef6598f8e10e3df98e034341fcbc090d8021c53501308c463c49d3fe91f41eb64b5bf2766e + languageName: node + linkType: hard + +"micromark-util-symbol@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-symbol@npm:2.0.0" + checksum: 10/8c662644c326b384f02a5269974d843d400930cf6f5d6a8e6db1743fc8933f5ecc125b4203ad4ebca25447f5d23eb7e5bf1f75af34570c3fdd925cb618752fcd + languageName: node + linkType: hard + +"micromark-util-types@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-types@npm:2.0.0" + checksum: 10/b88e0eefd4b7c8d86b54dbf4ed0094ef56a3b0c7774d040bd5c8146b8e4e05b1026bbf1cd9308c8fcd05ecdc0784507680c8cee9888a4d3c550e6e574f7aef62 + languageName: node + linkType: hard + "micromatch@npm:^2.3.11": version: 2.3.11 resolution: "micromatch@npm:2.3.11" @@ -40451,33 +36971,13 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.0, micromatch@npm:^4.0.4": - version: 4.0.4 - resolution: "micromatch@npm:4.0.4" - dependencies: - braces: "npm:^3.0.1" - picomatch: "npm:^2.2.3" - checksum: 10/c499da5aad38f3ba1a32a73a81f3dd9b631e12492133c503c14ce59aa5c631159c08f2c43d3a7e0ea3955c7921d41b7b97e662360fe3b28b2cfb0923949c176d - languageName: node - linkType: hard - -"micromatch@npm:^4.0.2, micromatch@npm:^4.0.5": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" - dependencies: - braces: "npm:^3.0.2" - picomatch: "npm:^2.3.1" - checksum: 10/a749888789fc15cac0e03273844dbd749f9f8e8d64e70c564bcf06a033129554c789bb9e30d7566d7ff6596611a08e58ac12cf2a05f6e3c9c47c50c4c7e12fa2 - languageName: node - linkType: hard - -"micromatch@npm:^4.0.7": - version: 4.0.7 - resolution: "micromatch@npm:4.0.7" +"micromatch@npm:^4.0.0, micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5, micromatch@npm:^4.0.7": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" dependencies: braces: "npm:^3.0.3" picomatch: "npm:^2.3.1" - checksum: 10/a11ed1cb67dcbbe9a5fc02c4062cf8bb0157d73bf86956003af8dcfdf9b287f9e15ec0f6d6925ff6b8b5b496202335e497b01de4d95ef6cf06411bc5e5c474a0 + checksum: 10/6bf2a01672e7965eb9941d1f02044fad2bd12486b5553dc1116ff24c09a8723157601dc992e74c911d896175918448762df3b3fd0a6b61037dd1a9766ddfbf58 languageName: node linkType: hard @@ -40493,13 +36993,20 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2": +"mime-db@npm:1.52.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" checksum: 10/54bb60bf39e6f8689f6622784e668a3d7f8bed6b0d886f5c3c446cb3284be28b30bf707ed05d0fe44a036f8469976b2629bbea182684977b084de9da274694d7 languageName: node linkType: hard +"mime-db@npm:>= 1.43.0 < 2": + version: 1.53.0 + resolution: "mime-db@npm:1.53.0" + checksum: 10/82409c568a20254cc67a763a25e581d2213e1ef5d070a0af805239634f8a655f5d8a15138200f5f81c5b06fc6623d27f6168c612d447642d59e37eb7f20f7412 + languageName: node + linkType: hard + "mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" @@ -40592,7 +37099,7 @@ __metadata: languageName: node linkType: hard -"mini-css-extract-plugin@npm:2.7.6, mini-css-extract-plugin@npm:^2.4.5": +"mini-css-extract-plugin@npm:2.7.6": version: 2.7.6 resolution: "mini-css-extract-plugin@npm:2.7.6" dependencies: @@ -40615,6 +37122,18 @@ __metadata: languageName: node linkType: hard +"mini-css-extract-plugin@npm:^2.4.5": + version: 2.9.2 + resolution: "mini-css-extract-plugin@npm:2.9.2" + dependencies: + schema-utils: "npm:^4.0.0" + tapable: "npm:^2.2.1" + peerDependencies: + webpack: ^5.0.0 + checksum: 10/db6ddb8ba56affa1a295b57857d66bad435d36e48e1f95c75d16fadd6c70e3ba33e8c4141c3fb0e22b4d875315b41c4f58550c6ac73b50bdbe429f768297e3ff + languageName: node + linkType: hard + "minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": version: 1.0.1 resolution: "minimalistic-assert@npm:1.0.1" @@ -40674,7 +37193,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^7.4.2, minimatch@npm:^7.4.6": +"minimatch@npm:^7.4.6": version: 7.4.6 resolution: "minimatch@npm:7.4.6" dependencies: @@ -40683,16 +37202,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^8.0.2": - version: 8.0.4 - resolution: "minimatch@npm:8.0.4" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/aef05598ee565e1013bc8a10f53410ac681561f901c1a084b8ecfd016c9ed919f58f4bbd5b63e05643189dfb26e8106a84f0e1ff12e4a263aa37e1cae7ce9828 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -40753,8 +37263,8 @@ __metadata: linkType: hard "minipass-fetch@npm:^2.0.3": - version: 2.1.0 - resolution: "minipass-fetch@npm:2.1.0" + version: 2.1.2 + resolution: "minipass-fetch@npm:2.1.2" dependencies: encoding: "npm:^0.1.13" minipass: "npm:^3.1.6" @@ -40763,22 +37273,22 @@ __metadata: dependenciesMeta: encoding: optional: true - checksum: 10/33b6927ef8a4516e27878e1e9966a6dee5c2efb844584b39712a8c222cf7cc586ae00c09897ce3b21e77b6600ad4c7503f8bd732ef1a8bf98137f18c45c6d6c4 + checksum: 10/8cfc589563ae2a11eebbf79121ef9a526fd078fca949ed3f1e4a51472ca4a4aad89fcea1738982ce9d7d833116ecc9c6ae9ebbd844832a94e3f4a3d4d1b9d3b9 languageName: node linkType: hard "minipass-fetch@npm:^3.0.0": - version: 3.0.1 - resolution: "minipass-fetch@npm:3.0.1" + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" dependencies: encoding: "npm:^0.1.13" - minipass: "npm:^4.0.0" + minipass: "npm:^7.0.3" minipass-sized: "npm:^1.0.3" minizlib: "npm:^2.1.2" dependenciesMeta: encoding: optional: true - checksum: 10/8af4555abeea05832c76469b7340c4895f60d955173db89df3374f45c97322c7f56093a94d3d5d0c66c97cb52983bb465a5801a551d17d13c0dff46746996172 + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 languageName: node linkType: hard @@ -40792,12 +37302,12 @@ __metadata: linkType: hard "minipass-json-stream@npm:^1.0.1": - version: 1.0.1 - resolution: "minipass-json-stream@npm:1.0.1" + version: 1.0.2 + resolution: "minipass-json-stream@npm:1.0.2" dependencies: jsonparse: "npm:^1.3.1" minipass: "npm:^3.0.0" - checksum: 10/3c65482c630b063c3fa86c853f324a50d9484f2eb6c3034f9c86c0b22f44181668848088f2c869cc764f8a9b8adc8f617f93762cd9d11521f563b8a71c5b815d + checksum: 10/e9df9d28bcbd87f8c134facd8c51a528ec4614a47d50a8f122ac6b666b45f4d35efa5109ccfc180c8911672bf1e146e6b20b4a459b0ea906a5ce887617b51942 languageName: node linkType: hard @@ -40829,16 +37339,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^3.0.0, minipass@npm:^3.1.0, minipass@npm:^3.1.1, minipass@npm:^3.1.3, minipass@npm:^3.1.5, minipass@npm:^3.1.6": - version: 3.1.6 - resolution: "minipass@npm:3.1.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10/464654ae469c4f25b2f3d6e7bd6e65615b90b68cdfd0148e69ce039b199a778b689f2a552bfa4d3a81812d914d0b48a3a49715b50dcc1eba96bba3bed21f428a - languageName: node - linkType: hard - -"minipass@npm:^3.3.4": +"minipass@npm:^3.0.0, minipass@npm:^3.1.0, minipass@npm:^3.1.1, minipass@npm:^3.1.3, minipass@npm:^3.1.5, minipass@npm:^3.1.6, minipass@npm:^3.3.4": version: 3.3.6 resolution: "minipass@npm:3.3.6" dependencies: @@ -40847,13 +37348,6 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^4.0.0, minipass@npm:^4.0.2, minipass@npm:^4.2.4": - version: 4.2.5 - resolution: "minipass@npm:4.2.5" - checksum: 10/0b0bf5910acc856f8fedbf5ac2567cc80dfdea99916f949c336c2ad52340a73b0bf48773a8a90b8ae2c79a415d9444f6e3a99915847577b1a5277f1235098056 - languageName: node - linkType: hard - "minipass@npm:^5.0.0": version: 5.0.0 resolution: "minipass@npm:5.0.0" @@ -40861,14 +37355,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": - version: 7.0.3 - resolution: "minipass@npm:7.0.3" - checksum: 10/04d72c8a437de54a024f3758ff17c0226efb532ef37dbdaca1ea6039c7b9b1704e612abbd2e3a0d2c825c64eb0a9ab266c843baa71d18ad1a279baecee28ed97 - languageName: node - linkType: hard - -"minipass@npm:^7.1.2": +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 @@ -40920,12 +37407,12 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:*, mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" +"mkdirp@npm:*": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" bin: - mkdirp: bin/cmd.js - checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + mkdirp: dist/cjs/src/bin.js + checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba languageName: node linkType: hard @@ -40940,6 +37427,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + "mnemonist@npm:^0.38.0": version: 0.38.5 resolution: "mnemonist@npm:0.38.5" @@ -41013,34 +37509,33 @@ __metadata: linkType: hard "mocha@npm:^10.0.0": - version: 10.2.0 - resolution: "mocha@npm:10.2.0" + version: 10.8.2 + resolution: "mocha@npm:10.8.2" dependencies: - ansi-colors: "npm:4.1.1" - browser-stdout: "npm:1.3.1" - chokidar: "npm:3.5.3" - debug: "npm:4.3.4" - diff: "npm:5.0.0" - escape-string-regexp: "npm:4.0.0" - find-up: "npm:5.0.0" - glob: "npm:7.2.0" - he: "npm:1.2.0" - js-yaml: "npm:4.1.0" - log-symbols: "npm:4.1.0" - minimatch: "npm:5.0.1" - ms: "npm:2.1.3" - nanoid: "npm:3.3.3" - serialize-javascript: "npm:6.0.0" - strip-json-comments: "npm:3.1.1" - supports-color: "npm:8.1.1" - workerpool: "npm:6.2.1" - yargs: "npm:16.2.0" - yargs-parser: "npm:20.2.4" - yargs-unparser: "npm:2.0.0" + ansi-colors: "npm:^4.1.3" + browser-stdout: "npm:^1.3.1" + chokidar: "npm:^3.5.3" + debug: "npm:^4.3.5" + diff: "npm:^5.2.0" + escape-string-regexp: "npm:^4.0.0" + find-up: "npm:^5.0.0" + glob: "npm:^8.1.0" + he: "npm:^1.2.0" + js-yaml: "npm:^4.1.0" + log-symbols: "npm:^4.1.0" + minimatch: "npm:^5.1.6" + ms: "npm:^2.1.3" + serialize-javascript: "npm:^6.0.2" + strip-json-comments: "npm:^3.1.1" + supports-color: "npm:^8.1.1" + workerpool: "npm:^6.5.1" + yargs: "npm:^16.2.0" + yargs-parser: "npm:^20.2.9" + yargs-unparser: "npm:^2.0.0" bin: _mocha: bin/_mocha mocha: bin/mocha.js - checksum: 10/f7362898ae65e8fe716cfe62fd014b432d100c9611aaf5abe85ed14efcbfdd82f3bdf32c44bccf00c9059a264c7e8d93a69dd5b830652109052a92beffb7ea35 + checksum: 10/903bbffcb195ef9d36b27db54e3462c5486de1397289e0953735b3530397a139336c452bcf5188c663496c660d2285bbb6c7213290d36d536ad647b6145cb917 languageName: node linkType: hard @@ -41233,9 +37728,16 @@ __metadata: linkType: hard "multiformats@npm:^12.0.1": - version: 12.1.2 - resolution: "multiformats@npm:12.1.2" - checksum: 10/245cb2e88c17a9dec9072b4cb0d4a854a735ad84261a914429c4b1f20c30d9534e55d8e3d123317f08edd137f2c2ff3ad16fd69b50c16788395b13becc48d70d + version: 12.1.3 + resolution: "multiformats@npm:12.1.3" + checksum: 10/b89ec581fc2b0fc567ca2b5450cc3f0f9ad56adf01b7b9780d07981d5177532be3296b22c1e415e0f17c6c6ddb9beece4ae2e14b79edfc5f3deacbd319a37516 + languageName: node + linkType: hard + +"multiformats@npm:^13.0.0, multiformats@npm:^13.1.0": + version: 13.3.1 + resolution: "multiformats@npm:13.3.1" + checksum: 10/2e529613d457590dffe212a658546f313c7c7296d240d952d2baee7ce0abb227116d784f05cf4d238ef0db7d72ad2c3d04ea3c6b9bfd20db805a092024ce8d7e languageName: node linkType: hard @@ -41293,6 +37795,15 @@ __metadata: languageName: node linkType: hard +"mustache@npm:^4.2.0": + version: 4.2.0 + resolution: "mustache@npm:4.2.0" + bin: + mustache: bin/mustache + checksum: 10/6e668bd5803255ab0779c3983b9412b5c4f4f90e822230e0e8f414f5449ed7a137eed29430e835aa689886f663385cfe05f808eb34b16e1f3a95525889b05cd3 + languageName: node + linkType: hard + "mute-stream@npm:0.0.5": version: 0.0.5 resolution: "mute-stream@npm:0.0.5" @@ -41332,30 +37843,12 @@ __metadata: languageName: node linkType: hard -"nan@npm:^2.11.1": - version: 2.18.0 - resolution: "nan@npm:2.18.0" - dependencies: - node-gyp: "npm:latest" - checksum: 10/5520e22c64e2b5b495b1d765d6334c989b848bbe1502fec89c5857cabcc7f9f0474563377259e7574bff1c8a041d3b90e9ffa1f5e15502ffddee7b2550cc26a0 - languageName: node - linkType: hard - -"nan@npm:^2.14.1, nan@npm:^2.15.0": - version: 2.15.0 - resolution: "nan@npm:2.15.0" - dependencies: - node-gyp: "npm:latest" - checksum: 10/1a5a53bea35ce2844f85c7d276d358fa131c6e60ee88bcb104b61596254963892378a54b7b65365ad1fe048b4c1aeeabf6e3966a2b293f68fb53a4f91b4337fc - languageName: node - linkType: hard - -"nan@npm:^2.17.0": - version: 2.17.0 - resolution: "nan@npm:2.17.0" +"nan@npm:^2.11.1, nan@npm:^2.15.0, nan@npm:^2.19.0, nan@npm:^2.20.0": + version: 2.22.0 + resolution: "nan@npm:2.22.0" dependencies: node-gyp: "npm:latest" - checksum: 10/bba1efee2475afb0cce154300b554863fb4bb0a683a28f5d0fa7390794b3b4381356aabeab6472c70651d9c8a2830e7595963f3ec0aa2008e5c4d83dbeb820fa + checksum: 10/ab165ba910e549fcc21fd561a33f534d86e81ae36c97b1019dcfe506b09692ff867c97794a54b49c9a83b8b485f529f0f58d24966c3a11863c97dc70814f4d50 languageName: node linkType: hard @@ -41374,13 +37867,13 @@ __metadata: linkType: hard "nano@npm:>=10.0.0": - version: 10.1.2 - resolution: "nano@npm:10.1.2" + version: 10.1.4 + resolution: "nano@npm:10.1.4" dependencies: - axios: "npm:^1.2.2" - node-abort-controller: "npm:^3.0.1" - qs: "npm:^6.11.0" - checksum: 10/99258b309744ee3cb8f2f557a709fd744740ddf37d2433d7dbc83fb1eeecc80f96b9f75628d567c1e658dfac9d51c7e4c26dc19bc802fad221752c8c2df67483 + axios: "npm:^1.7.4" + node-abort-controller: "npm:^3.1.1" + qs: "npm:^6.13.0" + checksum: 10/0f289cc8ab4f290daaa68a6de8569f456e1a83d9b5ba2715712099493c562848e30798d178a403fdba867c77c1c5b7ca2205804e72b996ca4eee534022494a9a languageName: node linkType: hard @@ -41393,21 +37886,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.1.20": - version: 3.3.1 - resolution: "nanoid@npm:3.3.1" - bin: - nanoid: bin/nanoid.cjs - checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 - languageName: node - linkType: hard - -"nanoid@npm:^3.3.6": - version: 3.3.6 - resolution: "nanoid@npm:3.3.6" +"nanoid@npm:^3.1.20, nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" bin: nanoid: bin/nanoid.cjs - checksum: 10/67235c39d1bc05851383dadde5cf77ae1c90c2a1d189e845c7f20f646f0488d875ad5f5226bbba072a88cebbb085a3f784a6673117daf785bdf614a852550362 + checksum: 10/ac1eb60f615b272bccb0e2b9cd933720dad30bf9708424f691b8113826bb91aca7e9d14ef5d9415a6ba15c266b37817256f58d8ce980c82b0ba3185352565679 languageName: node linkType: hard @@ -41493,44 +37977,43 @@ __metadata: linkType: hard "nconf@npm:^0.12.0": - version: 0.12.0 - resolution: "nconf@npm:0.12.0" + version: 0.12.1 + resolution: "nconf@npm:0.12.1" dependencies: async: "npm:^3.0.0" ini: "npm:^2.0.0" secure-keys: "npm:^1.0.0" yargs: "npm:^16.1.1" - checksum: 10/6bd712eb28cdc6adc1a0a65fa65032058aaca027aafff56eb2624e49a35034fc65434f8d9a56dce70f5126919e58c078e522959ff74dfc78779672521a3ba958 + checksum: 10/4170c83004ec4c7f2809c2125dcc01aaf0b9decdc28f63a42f66e5c87ecaa24c8509d80a1fbe7f28ff16244731640d53ca0488f038ad1bfeb9c707d139c11a4f languageName: node linkType: hard "needle@npm:^3.1.0": - version: 3.2.0 - resolution: "needle@npm:3.2.0" + version: 3.3.1 + resolution: "needle@npm:3.3.1" dependencies: - debug: "npm:^3.2.6" iconv-lite: "npm:^0.6.3" sax: "npm:^1.2.4" bin: needle: bin/needle - checksum: 10/65ec7c7166a054bfcce667bed87e38c1a0b1f493f89f6852658c61575b5f736d4d55a476a96bd90c0c3c3b0233aef5431ef2d4ce1c536eff6a5c6f0b4f95e6b9 + checksum: 10/31925ec72b93ffd1f5614a4f381878e7c31f1838cd36055aa4148c49a3a9d16429987fc64b509538f61fccbb49aac9ec2e91b1ed028aafb16f943f1993097d96 languageName: node linkType: hard -"negotiator@npm:0.6.2": - version: 0.6.2 - resolution: "negotiator@npm:0.6.2" - checksum: 10/eaf267fedd6503c98beee76e1a0388a04c185d9acb70c1ad206f212849392ad63d6beccea5813f0ac1ace79c16b113d2b89734af28554a0bece9a274b5a02628 - languageName: node - linkType: hard - -"negotiator@npm:0.6.3, negotiator@npm:^0.6.2, negotiator@npm:^0.6.3": +"negotiator@npm:0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 languageName: node linkType: hard +"negotiator@npm:^0.6.2, negotiator@npm:^0.6.3, negotiator@npm:~0.6.4": + version: 0.6.4 + resolution: "negotiator@npm:0.6.4" + checksum: 10/d98c04a136583afd055746168f1067d58ce4bfe6e4c73ca1d339567f81ea1f7e665b5bd1e81f4771c67b6c2ea89b21cb2adaea2b16058c7dc31317778f931dab + languageName: node + linkType: hard + "neo-async@npm:^2.6.0, neo-async@npm:^2.6.2": version: 2.6.2 resolution: "neo-async@npm:2.6.2" @@ -41539,9 +38022,9 @@ __metadata: linkType: hard "nested-error-stacks@npm:^2.0.0, nested-error-stacks@npm:^2.1.0": - version: 2.1.0 - resolution: "nested-error-stacks@npm:2.1.0" - checksum: 10/206ee736f9eb83489cc093d43e7d3024255ec93c66a31eaee58ca14d5ad9d925d813494725dcf5dec264e70cd8430167b7f82a2d00b0dd099f83c78d9ca650fd + version: 2.1.1 + resolution: "nested-error-stacks@npm:2.1.1" + checksum: 10/5f452fad75db8480b4db584e1602894ff5977f8bf3d2822f7ba5cb7be80e89adf1fffa34dada3347ef313a4288850b4486eb0635b315c32bdfb505577e8880e3 languageName: node linkType: hard @@ -41655,26 +38138,26 @@ __metadata: linkType: hard "nock@npm:^13.3.1": - version: 13.5.4 - resolution: "nock@npm:13.5.4" + version: 13.5.5 + resolution: "nock@npm:13.5.5" dependencies: debug: "npm:^4.1.0" json-stringify-safe: "npm:^5.0.1" propagate: "npm:^2.0.0" - checksum: 10/75bad391bae4efb81b742734af5f2d87309cd93d3ca6b78372fd37946d78ccb254d79104676619866915e6734abfc1b00fee2aa42073a4843ca3c746aad35a4d + checksum: 10/c19d7bf9654db056357a22b00127bb5606c1bbdff188a5b6c469825e580e31cd0cb0701bce8dd8b4876dbbd36a145fdb681fd69fd59308d6db4923ce8ab2439e languageName: node linkType: hard "node-abi@npm:^3.3.0": - version: 3.67.0 - resolution: "node-abi@npm:3.67.0" + version: 3.71.0 + resolution: "node-abi@npm:3.71.0" dependencies: semver: "npm:^7.3.5" - checksum: 10/fe47dfd9a0770d300ce1dd9b527441e691cba077c19fdbcb304796a5bc182f8cbe40933f2a013127b98a32bd6d06e0efa2b5f76ca38d791d44f83307920bafac + checksum: 10/0a1cef5106c43d67f9f8a911b0c9d5ee08971eda002ba466606c8e6164964456f5211f37966717efc3d5d49bae32f0cf9290254b1286bf71f0ba158a4f8a9846 languageName: node linkType: hard -"node-abort-controller@npm:^3.0.1": +"node-abort-controller@npm:^3.0.1, node-abort-controller@npm:^3.1.1": version: 3.1.1 resolution: "node-abort-controller@npm:3.1.1" checksum: 10/0a2cdb7ec0aeaf3cb31e1ca0e192f5add48f1c5c9c9ed822129f9dddbd9432f69b7425982f94ce803c56a2104884530aa67cd57696e5774b2e5b8ec2f58de042 @@ -41708,6 +38191,15 @@ __metadata: languageName: node linkType: hard +"node-addon-api@npm:^5.0.0": + version: 5.1.0 + resolution: "node-addon-api@npm:5.1.0" + dependencies: + node-gyp: "npm:latest" + checksum: 10/595f59ffb4630564f587c502119cbd980d302e482781021f3b479f5fc7e41cf8f2f7280fdc2795f32d148e4f3259bd15043c52d4a3442796aa6f1ae97b959636 + languageName: node + linkType: hard + "node-cache@npm:^5.1.2": version: 5.1.2 resolution: "node-cache@npm:5.1.2" @@ -41724,7 +38216,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:2.6.7, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": +"node-fetch@npm:2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" dependencies: @@ -41738,7 +38230,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:2.7.0, node-fetch@npm:^2.6.6, node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9": +"node-fetch@npm:2.7.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.6, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9, node-fetch@npm:^2.7.0": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: @@ -41762,20 +38254,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.12": - version: 2.6.12 - resolution: "node-fetch@npm:2.6.12" - dependencies: - whatwg-url: "npm:^5.0.0" - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10/370ed4d906edad9709a81b54a0141d37d2973a27dc80c723d8ac14afcec6dc67bc6c70986a96992b64ec75d08159cc4b65ce6aa9063941168ea5ac73b24df9f8 - languageName: node - linkType: hard - "node-fetch@npm:^3.2.10, node-fetch@npm:^3.3.2": version: 3.3.2 resolution: "node-fetch@npm:3.3.2" @@ -41805,36 +38283,14 @@ __metadata: languageName: node linkType: hard -"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0": - version: 4.3.0 - resolution: "node-gyp-build@npm:4.3.0" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10/673bd8f12694cc226747333fc181a7288e32dc96e88067bccb9ae3969ed1459fe461f85ad76d0ec8566ec1ae75c179e7a6667b0094cc78c9431ecfc95b5c24aa - languageName: node - linkType: hard - -"node-gyp-build@npm:^4.2.1": - version: 4.6.1 - resolution: "node-gyp-build@npm:4.6.1" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10/79b948377492ae8e1aa1c18071661e6020c11f8847d5ce822abd67ec02bee5b21715b1b4861041d2b40d16633824476735bc9a60e81c82c49e715d55ee29b206 - languageName: node - linkType: hard - -"node-gyp-build@npm:^4.8.0": - version: 4.8.0 - resolution: "node-gyp-build@npm:4.8.0" +"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.2.1, node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0, node-gyp-build@npm:^4.8.0": + version: 4.8.2 + resolution: "node-gyp-build@npm:4.8.2" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: 10/80f410ab412df38e84171d3634a5716b6c6f14ecfa4eb971424d289381fb76f8bcbe1b666419ceb2c81060e558fd7c6d70cc0f60832bcca6a1559098925d9657 + checksum: 10/e3a365eed7a2d950864a1daa34527588c16fe43ae189d0aeb8fd1dfec91ba42a0e1b499322bff86c2832029fec4f5901bf26e32005e1e17a781dcd5177b6a657 languageName: node linkType: hard @@ -41869,9 +38325,9 @@ __metadata: languageName: node linkType: hard -"node-gyp@npm:^10.0.0": - version: 10.0.1 - resolution: "node-gyp@npm:10.0.1" +"node-gyp@npm:^10.0.0, node-gyp@npm:latest": + version: 10.2.0 + resolution: "node-gyp@npm:10.2.0" dependencies: env-paths: "npm:^2.2.0" exponential-backoff: "npm:^3.1.1" @@ -41879,45 +38335,25 @@ __metadata: graceful-fs: "npm:^4.2.6" make-fetch-happen: "npm:^13.0.0" nopt: "npm:^7.0.0" - proc-log: "npm:^3.0.0" + proc-log: "npm:^4.1.0" semver: "npm:^7.3.5" - tar: "npm:^6.1.2" + tar: "npm:^6.2.1" which: "npm:^4.0.0" bin: node-gyp: bin/node-gyp.js - checksum: 10/578cf0c821f258ce4b6ebce4461eca4c991a4df2dee163c0624f2fe09c7d6d37240be4942285a0048d307230248ee0b18382d6623b9a0136ce9533486deddfa8 + checksum: 10/41773093b1275751dec942b985982fd4e7a69b88cae719b868babcef3880ee6168aaec8dcaa8cd0b9fa7c84873e36cc549c6cac6a124ee65ba4ce1f1cc108cfe languageName: node linkType: hard "node-gyp@npm:^9.0.0": - version: 9.3.1 - resolution: "node-gyp@npm:9.3.1" - dependencies: - env-paths: "npm:^2.2.0" - glob: "npm:^7.1.4" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^10.0.3" - nopt: "npm:^6.0.0" - npmlog: "npm:^6.0.0" - rimraf: "npm:^3.0.2" - semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^2.0.2" - bin: - node-gyp: bin/node-gyp.js - checksum: 10/e9345b22be0a3256af87a16ba9604362cd8e4db304e67e71dd83bb8e573f3fdbaf69e359b5af572a14a98730cc3e1813679444ee029093d2a2f38ba3cac4ed7e - languageName: node - linkType: hard - -"node-gyp@npm:latest": - version: 9.4.0 - resolution: "node-gyp@npm:9.4.0" + version: 9.4.1 + resolution: "node-gyp@npm:9.4.1" dependencies: env-paths: "npm:^2.2.0" exponential-backoff: "npm:^3.1.1" glob: "npm:^7.1.4" graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^11.0.3" + make-fetch-happen: "npm:^10.0.3" nopt: "npm:^6.0.0" npmlog: "npm:^6.0.0" rimraf: "npm:^3.0.2" @@ -41926,7 +38362,7 @@ __metadata: which: "npm:^2.0.2" bin: node-gyp: bin/node-gyp.js - checksum: 10/458317127c63877365f227b18ef2362b013b7f8440b35ae722935e61b31e6b84ec0e3625ab07f90679e2f41a1d5a7df6c4049fdf8e7b3c81fcf22775147b47ac + checksum: 10/329b109b138e48cb0416a6bca56e171b0e479d6360a548b80f06eced4bef3cf37652a3d20d171c20023fb18d996bd7446a49d4297ddb59fc48100178a92f432d languageName: node linkType: hard @@ -42007,38 +38443,10 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.12": - version: 2.0.12 - resolution: "node-releases@npm:2.0.12" - checksum: 10/5b376582d1e348132aeb2c7c14990ca2d6d8687bd57fec912fd7f4e09abb44464fc72503ab2a29804613a7654d7a18f45a69506d249f79dba48fb1258df75c0b - languageName: node - linkType: hard - -"node-releases@npm:^2.0.13": - version: 2.0.13 - resolution: "node-releases@npm:2.0.13" - checksum: 10/c9bb813aab2717ff8b3015ecd4c7c5670a5546e9577699a7c84e8d69230cd3b1ce8f863f8e9b50f18b19a5ffa4b9c1a706bbbfe4c378de955fedbab04488a338 - languageName: node - linkType: hard - -"node-releases@npm:^2.0.14": - version: 2.0.14 - resolution: "node-releases@npm:2.0.14" - checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 - languageName: node - linkType: hard - -"node-releases@npm:^2.0.3": - version: 2.0.4 - resolution: "node-releases@npm:2.0.4" - checksum: 10/b32d6c2032c7b169ae3938b416fc50f123f5bd577d54a79b2ae201febf27b22846b01c803dd35ac8689afe840f8ba4e5f7154723db629b80f359836b6707b92f - languageName: node - linkType: hard - -"node-releases@npm:^2.0.8": - version: 2.0.10 - resolution: "node-releases@npm:2.0.10" - checksum: 10/d784ecde25696a15d449c4433077f5cce620ed30a1656c4abf31282bfc691a70d9618bae6868d247a67914d1be5cc4fde22f65a05f4398cdfb92e0fc83cadfbc +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: 10/241e5fa9556f1c12bafb83c6c3e94f8cf3d8f2f8f904906ecef6e10bcaa1d59aa61212d4651bec70052015fc54bd3fdcdbe7fc0f638a17e6685aa586c076ec4e languageName: node linkType: hard @@ -42066,7 +38474,19 @@ __metadata: languageName: node linkType: hard -"node-vault@npm:*, node-vault@npm:0.9.22": +"node-vault@npm:*": + version: 0.10.2 + resolution: "node-vault@npm:0.10.2" + dependencies: + debug: "npm:^4.3.4" + mustache: "npm:^4.2.0" + postman-request: "npm:^2.88.1-postman.33" + tv4: "npm:^1.3.0" + checksum: 10/240e99d1759fb3f01debbfdba7e52b6631227f07755b7a846ec93157aa316216ace266d0e33c74fad81aa86273ad617245d229c96fa29cca9a7edb481eaee0dc + languageName: node + linkType: hard + +"node-vault@npm:0.9.22": version: 0.9.22 resolution: "node-vault@npm:0.9.22" dependencies: @@ -42079,7 +38499,7 @@ __metadata: languageName: node linkType: hard -"nodemon@npm:2.0.22": +"nodemon@npm:2.0.22, nodemon@npm:^2.0.7": version: 2.0.22 resolution: "nodemon@npm:2.0.22" dependencies: @@ -42099,26 +38519,6 @@ __metadata: languageName: node linkType: hard -"nodemon@npm:^2.0.7": - version: 2.0.15 - resolution: "nodemon@npm:2.0.15" - dependencies: - chokidar: "npm:^3.5.2" - debug: "npm:^3.2.7" - ignore-by-default: "npm:^1.0.1" - minimatch: "npm:^3.0.4" - pstree.remy: "npm:^1.1.8" - semver: "npm:^5.7.1" - supports-color: "npm:^5.5.0" - touch: "npm:^3.1.0" - undefsafe: "npm:^2.0.5" - update-notifier: "npm:^5.1.0" - bin: - nodemon: bin/nodemon.js - checksum: 10/98f9a1af1d5dd302d0113ee93405b620205c45341e35614397f86f3034900664e551684b3ede8285d9969e09805873538e4cab2fcedb4a485f8df01890a22a69 - languageName: node - linkType: hard - "nofilter@npm:^1.0.4": version: 1.0.4 resolution: "nofilter@npm:1.0.4" @@ -42155,18 +38555,7 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.1.0 - resolution: "nopt@npm:7.1.0" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10/92d6e425bb18c422ddace4c284ab9c3dc6f50df03902e0030afff33a4aebe5ab6f80bf77b1cdc70adde266678f96f87de4939e211f2e2573904fe5daffbc9d61 - languageName: node - linkType: hard - -"nopt@npm:^7.2.1": +"nopt@npm:^7.0.0, nopt@npm:^7.2.1": version: 7.2.1 resolution: "nopt@npm:7.2.1" dependencies: @@ -42177,17 +38566,6 @@ __metadata: languageName: node linkType: hard -"nopt@npm:~1.0.10": - version: 1.0.10 - resolution: "nopt@npm:1.0.10" - dependencies: - abbrev: "npm:1" - bin: - nopt: ./bin/nopt.js - checksum: 10/4f01ad1e144883a190d70bd6003f26e2f3a899230fe1b0f3310e43779c61cab5ae0063a9209912cd52fc4c552b266b38173853aa9abe27ecb04acbdfdca2e9fc - languageName: node - linkType: hard - "normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" @@ -42224,19 +38602,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^6.0.0": - version: 6.0.0 - resolution: "normalize-package-data@npm:6.0.0" - dependencies: - hosted-git-info: "npm:^7.0.0" - is-core-module: "npm:^2.8.1" - semver: "npm:^7.3.5" - validate-npm-package-license: "npm:^3.0.4" - checksum: 10/e31e31a2ebaef93ef107feb9408f105044eeae9cb7d0d4619544ab2323cd4b15ca648b0d558ac29db2fece161c7b8658206bb27ebe9340df723f7174b3e2759d - languageName: node - linkType: hard - -"normalize-package-data@npm:^6.0.1": +"normalize-package-data@npm:^6.0.0, normalize-package-data@npm:^6.0.1": version: 6.0.2 resolution: "normalize-package-data@npm:6.0.2" dependencies: @@ -42285,43 +38651,34 @@ __metadata: linkType: hard "normalize-url@npm:^8.0.0": - version: 8.0.0 - resolution: "normalize-url@npm:8.0.0" - checksum: 10/4347d6ee39d9e1e7138c9e7c0b459c1e07304d9cd7c62d92c1ca01ed1f0c5397b292079fe7cfa953f469722ae150eec82e14b97e2175af39ede0b58f99ef8cac + version: 8.0.1 + resolution: "normalize-url@npm:8.0.1" + checksum: 10/ae392037584fc5935b663ae4af475351930a1fc39e107956cfac44f42d5127eec2d77d9b7b12ded4696ca78103bafac5b6206a0ea8673c7bffecbe13544fcc5a languageName: node linkType: hard "npm-bundled@npm:^3.0.0": - version: 3.0.0 - resolution: "npm-bundled@npm:3.0.0" + version: 3.0.1 + resolution: "npm-bundled@npm:3.0.1" dependencies: npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/704fce20114d36d665c20edc56d3f9f7778c52ca1cd48731ec31f65af9e65805f9308ca7ed9e5a6bd9fe22327a63aa5d83a8c5aaee0c715e5047de1fa659e8bf + checksum: 10/113c9a35526d9a563694e9bda401dbda592f664fa146d365028bef1e3bfdc2a7b60ac9315a727529ef7e8e8d80b8d9e217742ccc2808e0db99c2204a3e33a465 languageName: node linkType: hard -"npm-install-checks@npm:^6.0.0": - version: 6.1.0 - resolution: "npm-install-checks@npm:6.1.0" - dependencies: - semver: "npm:^7.1.1" - checksum: 10/efbb4deac45bfe18ab8f619801f736f675ee9f80a60eeafc9fbf8f4657816b67d8e1b1a8dc50d47ee4226727f96e111974a752c4861e1aef1cc2e2ed70581e7c - languageName: node - linkType: hard - -"npm-install-checks@npm:^6.2.0": - version: 6.2.0 - resolution: "npm-install-checks@npm:6.2.0" +"npm-install-checks@npm:^6.0.0, npm-install-checks@npm:^6.2.0": + version: 6.3.0 + resolution: "npm-install-checks@npm:6.3.0" dependencies: semver: "npm:^7.1.1" - checksum: 10/2f91f71e07111ef89c6f4ad37b89933322567be51ca3a4ec5e972cc5edbc8d1ac6059f3b8904d2bab9893df1567366230eda3d0fe3bcf0de610c48f3f57f17a8 + checksum: 10/6c20dadb878a0d2f1f777405217b6b63af1299d0b43e556af9363ee6eefaa98a17dfb7b612a473a473e96faf7e789c58b221e0d8ffdc1d34903c4f71618df3b4 languageName: node linkType: hard "npm-normalize-package-bin@npm:^3.0.0": - version: 3.0.0 - resolution: "npm-normalize-package-bin@npm:3.0.0" - checksum: 10/6a34886c150b0f5302aad52a9446e5c939aa14eeb462323e75681517b36c6b9eaef83e1f5bc2d7e5154b3b752cbce81bed05e290db3f1f7edf857cbb895e35c0 + version: 3.0.1 + resolution: "npm-normalize-package-bin@npm:3.0.1" + checksum: 10/de416d720ab22137a36292ff8a333af499ea0933ef2320a8c6f56a73b0f0448227fec4db5c890d702e26d21d04f271415eab6580b5546456861cc0c19498a4bf languageName: node linkType: hard @@ -42337,7 +38694,7 @@ __metadata: languageName: node linkType: hard -"npm-package-arg@npm:11.0.1, npm-package-arg@npm:^11.0.0": +"npm-package-arg@npm:11.0.1": version: 11.0.1 resolution: "npm-package-arg@npm:11.0.1" dependencies: @@ -42349,15 +38706,15 @@ __metadata: languageName: node linkType: hard -"npm-package-arg@npm:^11.0.2": - version: 11.0.2 - resolution: "npm-package-arg@npm:11.0.2" +"npm-package-arg@npm:^11.0.0, npm-package-arg@npm:^11.0.2": + version: 11.0.3 + resolution: "npm-package-arg@npm:11.0.3" dependencies: hosted-git-info: "npm:^7.0.0" proc-log: "npm:^4.0.0" semver: "npm:^7.3.5" validate-npm-package-name: "npm:^5.0.0" - checksum: 10/ce4c51900a73aadb408c9830c38a61b1930e1ab08509ec5ebbcf625ad14326ee33b014df289c942039bd28071ab17e813368f68d26a4ccad0eb6e9928f8ad03c + checksum: 10/bacc863907edf98940286edc2fd80327901c1e8b34426d538cdc708ed66bc6567f06d742d838eaf35db6804347bb4ba56ca9cef032c4b52743b33e7a22a2678e languageName: node linkType: hard @@ -42370,16 +38727,7 @@ __metadata: languageName: node linkType: hard -"npm-packlist@npm:^8.0.0": - version: 8.0.0 - resolution: "npm-packlist@npm:8.0.0" - dependencies: - ignore-walk: "npm:^6.0.0" - checksum: 10/64bd475183761903e766c8c0a2008cd2b7564e841f3681930020c75cb92929b2331f9de7768530eb7c2b5f45fdf9b9febf4cdfb7b8f6279b95a1fb9d93fadc6b - languageName: node - linkType: hard - -"npm-packlist@npm:^8.0.2": +"npm-packlist@npm:^8.0.0, npm-packlist@npm:^8.0.2": version: 8.0.2 resolution: "npm-packlist@npm:8.0.2" dependencies: @@ -42388,7 +38736,7 @@ __metadata: languageName: node linkType: hard -"npm-pick-manifest@npm:8.0.1, npm-pick-manifest@npm:^8.0.0": +"npm-pick-manifest@npm:8.0.1": version: 8.0.1 resolution: "npm-pick-manifest@npm:8.0.1" dependencies: @@ -42400,7 +38748,7 @@ __metadata: languageName: node linkType: hard -"npm-pick-manifest@npm:9.0.0, npm-pick-manifest@npm:^9.0.0": +"npm-pick-manifest@npm:9.0.0": version: 9.0.0 resolution: "npm-pick-manifest@npm:9.0.0" dependencies: @@ -42412,30 +38760,42 @@ __metadata: languageName: node linkType: hard -"npm-pick-manifest@npm:^9.0.1": - version: 9.0.1 - resolution: "npm-pick-manifest@npm:9.0.1" +"npm-pick-manifest@npm:^8.0.0": + version: 8.0.2 + resolution: "npm-pick-manifest@npm:8.0.2" + dependencies: + npm-install-checks: "npm:^6.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + npm-package-arg: "npm:^10.0.0" + semver: "npm:^7.3.5" + checksum: 10/3f10a34e12cbb576edb694562a32730c6c0244b2929b91202d1be62ece76bc8b282dc7e9535d313d598963f8e3d06d19973611418a191fe3102be149a8fa0910 + languageName: node + linkType: hard + +"npm-pick-manifest@npm:^9.0.0, npm-pick-manifest@npm:^9.0.1": + version: 9.1.0 + resolution: "npm-pick-manifest@npm:9.1.0" dependencies: npm-install-checks: "npm:^6.0.0" npm-normalize-package-bin: "npm:^3.0.0" npm-package-arg: "npm:^11.0.0" semver: "npm:^7.3.5" - checksum: 10/870053b63c8765a5d22df3aabcf09505342dd30398c68e15a57cc32e9da629c361b12285d72bd0bac100786623d2f2dc5ced16270f39dda7c14660fae677590e + checksum: 10/e759e4fe4076da9169cf522964a80bbc096d50cd24c8c44b50b44706c4479bd9d9d018fbdb76c6ea0c6037e012e07c6c917a1ecaa7ae1a1169cddfae1c0f24b6 languageName: node linkType: hard "npm-registry-fetch@npm:^14.0.0": - version: 14.0.3 - resolution: "npm-registry-fetch@npm:14.0.3" + version: 14.0.5 + resolution: "npm-registry-fetch@npm:14.0.5" dependencies: make-fetch-happen: "npm:^11.0.0" - minipass: "npm:^4.0.0" + minipass: "npm:^5.0.0" minipass-fetch: "npm:^3.0.0" minipass-json-stream: "npm:^1.0.1" minizlib: "npm:^2.1.2" npm-package-arg: "npm:^10.0.0" proc-log: "npm:^3.0.0" - checksum: 10/0332e0e7a1798d897b5525a208136a4f74146038804b058c966b482650d6c4941706fb731a70a64e1c51fa720e0c791d6d3244c00d1026d957df08e0112a7233 + checksum: 10/63026b22d6a6afe5cb3a02dca96db783b88d3acc68be94f3485f25a5e4932800fdeff08145a77b35b8f61987033346462d4b3e710c0729a9735357ff97596062 languageName: node linkType: hard @@ -42447,6 +38807,7 @@ __metadata: make-fetch-happen: "npm:^13.0.0" minipass: "npm:^7.0.2" minipass-fetch: "npm:^3.0.0" + minipass-json-stream: "npm:^1.0.1" minizlib: "npm:^2.1.2" npm-package-arg: "npm:^11.0.0" proc-log: "npm:^4.0.0" @@ -42530,11 +38891,11 @@ __metadata: linkType: hard "npm-run-path@npm:^5.1.0": - version: 5.1.0 - resolution: "npm-run-path@npm:5.1.0" + version: 5.3.0 + resolution: "npm-run-path@npm:5.3.0" dependencies: path-key: "npm:^4.0.0" - checksum: 10/dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 + checksum: 10/ae8e7a89da9594fb9c308f6555c73f618152340dcaae423e5fb3620026fefbec463618a8b761920382d666fa7a2d8d240b6fe320e8a6cdd54dc3687e2b659d25 languageName: node linkType: hard @@ -42601,9 +38962,9 @@ __metadata: linkType: hard "nwsapi@npm:^2.2.0": - version: 2.2.7 - resolution: "nwsapi@npm:2.2.7" - checksum: 10/22c002080f0297121ad138aba5a6509e724774d6701fe2c4777627bd939064ecd9e1b6dc1c2c716bb7ca0b9f16247892ff2f664285202ac7eff6ec9543725320 + version: 2.2.13 + resolution: "nwsapi@npm:2.2.13" + checksum: 10/f7f30a236f2ee513ea8042f1a987481dc2b900167c47f7163882f0fcfe7ccb57b5c8daaf2c91008dc20a204fcd79e050aee25001433ad99990bbed5a8c74121c languageName: node linkType: hard @@ -42748,45 +39109,24 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.10.3, object-inspect@npm:^1.13.1": - version: 1.13.1 - resolution: "object-inspect@npm:1.13.1" - checksum: 10/92f4989ed83422d56431bc39656d4c780348eb15d397ce352ade6b7fec08f973b53744bd41b94af021901e61acaf78fcc19e65bf464ecc0df958586a672700f0 - languageName: node - linkType: hard - -"object-inspect@npm:^1.11.0": - version: 1.12.0 - resolution: "object-inspect@npm:1.12.0" - checksum: 10/f13b824784749ac2d40d62a4c2a60df13fd57a221968efe1d686565ef71713b56b82e01b57bc2588d6b2ab124c342f130a2d0304c14a79f7fabe01bfa327515b - languageName: node - linkType: hard - -"object-inspect@npm:^1.12.3": - version: 1.12.3 - resolution: "object-inspect@npm:1.12.3" - checksum: 10/532b0036f0472f561180fac0d04fe328ee01f57637624c83fb054f81b5bfe966cdf4200612a499ed391a7ca3c46b20a0bc3a55fc8241d944abe687c556a32b39 +"object-inspect@npm:^1.10.3, object-inspect@npm:^1.12.3, object-inspect@npm:^1.13.1": + version: 1.13.2 + resolution: "object-inspect@npm:1.13.2" + checksum: 10/7ef65583b6397570a17c56f0c1841e0920e83900f2c94638927abb7b81ac08a19c7aae135bd9dcca96208cac0c7332b4650fb927f027b0cf92d71df2990d0561 languageName: node linkType: hard -"object-inspect@npm:^1.9.0": - version: 1.12.2 - resolution: "object-inspect@npm:1.12.2" - checksum: 10/aa11100d45fa919b36448347d4f7c8a78b0247886881db56a2026b512c4042a9749e64894519b00a4db8c6e2b713a965b5ceaa3b59324aeb3da007c54a33bc58 - languageName: node - linkType: hard - -"object-is@npm:^1.0.1, object-is@npm:^1.1.5": - version: 1.1.5 - resolution: "object-is@npm:1.1.5" +"object-is@npm:^1.1.5": + version: 1.1.6 + resolution: "object-is@npm:1.1.6" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/75365aff5da4bebad5d20efd9f9a7a13597e603f5eb03d89da8f578c3f3937fe01c6cb5fce86c0611c48795c0841401fd37c943821db0de703c7b30a290576ad + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + checksum: 10/4f6f544773a595da21c69a7531e0e1d6250670f4e09c55f47eb02c516035cfcb1b46ceb744edfd3ecb362309dbccb6d7f88e43bf42e4d4595ac10a329061053a languageName: node linkType: hard -"object-keys@npm:^1.0.12, object-keys@npm:^1.1.1": +"object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" checksum: 10/3d81d02674115973df0b7117628ea4110d56042e5326413e4b4313f0bcdf7dd78d4a3acef2c831463fa3796a66762c49daef306f4a0ea1af44877d7086d73bde @@ -42827,7 +39167,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.0.4, object.assign@npm:^4.1.5": +"object.assign@npm:^4.0.4, object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -42839,77 +39179,30 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.2": - version: 4.1.2 - resolution: "object.assign@npm:4.1.2" - dependencies: - call-bind: "npm:^1.0.0" - define-properties: "npm:^1.1.3" - has-symbols: "npm:^1.0.1" - object-keys: "npm:^1.1.1" - checksum: 10/83fdff0208e5ea616aa59880add9c0cd08e58532d5bb010630a4695002f467e0a08f0f53d062ae33593ecf0fff42147b019be7fb17f2153264c37f8f4b85dfaa - languageName: node - linkType: hard - -"object.assign@npm:^4.1.4": - version: 4.1.4 - resolution: "object.assign@npm:4.1.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - has-symbols: "npm:^1.0.3" - object-keys: "npm:^1.1.1" - checksum: 10/fd82d45289df0a952d772817622ecbaeb4ec933d3abb53267aede083ee38f6a395af8fadfbc569ee575115b0b7c9b286e7cfb2b7a2557b1055f7acbce513bc29 - languageName: node - linkType: hard - -"object.entries@npm:^1.1.6": - version: 1.1.7 - resolution: "object.entries@npm:1.1.7" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/03f0bd0f23a8626c94429d15abf26ccda7723f08cd26be2c09c72d436765f8c7468605b5476ca58d4a7cec1ec7eca5be496dbd938fd4236b77ed6d05a8680048 - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.6": - version: 2.0.6 - resolution: "object.fromentries@npm:2.0.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/e8b813647cbc6505750cdff8b3978bb341492707a5f1df4129e2d8a904b31692e225eff92481ae5916be3bde3c2eff1d0e8a6730921ca7f4eed60bc15a70cb35 - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.7": - version: 2.0.7 - resolution: "object.fromentries@npm:2.0.7" +"object.entries@npm:^1.1.8": + version: 1.1.8 + resolution: "object.entries@npm:1.1.8" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/1bfbe42a51f8d84e417d193fae78e4b8eebb134514cdd44406480f8e8a0e075071e0717635d8e3eccd50fec08c1d555fe505c38804cbac0808397187653edd59 + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/2301918fbd1ee697cf6ff7cd94f060c738c0a7d92b22fd24c7c250e9b593642c9707ad2c44d339303c1439c5967d8964251cdfc855f7f6ec55db2dd79e8dc2a7 languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.1.0": - version: 2.1.7 - resolution: "object.getownpropertydescriptors@npm:2.1.7" +"object.fromentries@npm:^2.0.7, object.fromentries@npm:^2.0.8": + version: 2.0.8 + resolution: "object.fromentries@npm:2.0.8" dependencies: - array.prototype.reduce: "npm:^1.0.6" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - safe-array-concat: "npm:^1.0.0" - checksum: 10/c99e0f66873e7e5a4ffb3b4465ef57d139d2a232b26ea72571ab90069442db39a1b10c0f7ea228c8aab721437f39dbc97a73158bb68b892706a3d18b277a9bc7 + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + checksum: 10/5b2e80f7af1778b885e3d06aeb335dcc86965e39464671adb7167ab06ac3b0f5dd2e637a90d8ebd7426d69c6f135a4753ba3dd7d0fe2a7030cf718dcb910fd92 languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.1.6": +"object.getownpropertydescriptors@npm:^2.1.0, object.getownpropertydescriptors@npm:^2.1.6": version: 2.1.8 resolution: "object.getownpropertydescriptors@npm:2.1.8" dependencies: @@ -42924,38 +39217,14 @@ __metadata: languageName: node linkType: hard -"object.groupby@npm:^1.0.0": - version: 1.0.0 - resolution: "object.groupby@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.21.2" - get-intrinsic: "npm:^1.2.1" - checksum: 10/8233fa5288744dd6ea22050d96bb3f59c5acf85ab32ed758821ff82f276dda76b1bb1b9220a52432673476dff361a06ddcfff6d7d859135ff3c1c89b8c844b3e - languageName: node - linkType: hard - -"object.groupby@npm:^1.0.1": - version: 1.0.2 - resolution: "object.groupby@npm:1.0.2" +"object.groupby@npm:^1.0.1, object.groupby@npm:^1.0.3": + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" dependencies: - array.prototype.filter: "npm:^1.0.3" - call-bind: "npm:^1.0.5" + call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.0.0" - checksum: 10/07c1bea1772c45f7967a63358a683ef7b0bd99cabe0563e6fee3e8acc061cc5984d2f01a46472ebf10b2cb439298c46776b2134550dce457fd7240baaaa4f592 - languageName: node - linkType: hard - -"object.hasown@npm:^1.1.2": - version: 1.1.3 - resolution: "object.hasown@npm:1.1.3" - dependencies: - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/735679729c25a4e0d3713adf5df9861d862f0453e87ada4d991b75cd4225365dec61a08435e1127f42c9cc1adfc8e952fa5dca75364ebda6539dadf4721dc9c4 + es-abstract: "npm:^1.23.2" + checksum: 10/44cb86dd2c660434be65f7585c54b62f0425b0c96b5c948d2756be253ef06737da7e68d7106e35506ce4a44d16aa85a413d11c5034eb7ce5579ec28752eb42d0 languageName: node linkType: hard @@ -42978,32 +39247,21 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.1.0, object.values@npm:^1.1.7": - version: 1.1.7 - resolution: "object.values@npm:1.1.7" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/20ab42c0bbf984405c80e060114b18cf5d629a40a132c7eac4fb79c5d06deb97496311c19297dcf9c61f45c2539cd4c7f7c5d6230e51db360ff297bbc9910162 - languageName: node - linkType: hard - -"object.values@npm:^1.1.6": - version: 1.1.6 - resolution: "object.values@npm:1.1.6" +"object.values@npm:^1.1.0, object.values@npm:^1.1.6, object.values@npm:^1.1.7, object.values@npm:^1.2.0": + version: 1.2.0 + resolution: "object.values@npm:1.2.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/adea807c90951df34eb2f5c6a90ab5624e15c71f0b3a3e422db16933c9f4e19551d10649fffcb4adcac01d86d7c14a64bfb500d8f058db5a52976150a917f6eb + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/db2e498019c354428c5dd30d02980d920ac365b155fce4dcf63eb9433f98ccf0f72624309e182ce7cc227c95e45d474e1d483418e60de2293dd23fa3ebe34903 languageName: node linkType: hard "obliterator@npm:^2.0.0": - version: 2.0.2 - resolution: "obliterator@npm:2.0.2" - checksum: 10/170a5665593efa9b6c549d549f3b73bcef7262290badb743ffd3821f839a555b059f84cdd173ee36880038a98aa95e9e1f860c95af19687aaff4b5315fe38140 + version: 2.0.4 + resolution: "obliterator@npm:2.0.4" + checksum: 10/5a49ce3736aa9c8ae536e14e556e347b225c71215d3d3e0b191da0386284a804b9e22c09780645f2cea3981d4cecefaa394f59f4ffd6167fe6c2f2401777e1ae languageName: node linkType: hard @@ -43114,6 +39372,15 @@ __metadata: languageName: node linkType: hard +"oniguruma-to-js@npm:0.4.3": + version: 0.4.3 + resolution: "oniguruma-to-js@npm:0.4.3" + dependencies: + regex: "npm:^4.3.2" + checksum: 10/af64a77f4e428c2652387014596138c51bd61d67b0bbe957cd10ff73b4ec14567701ff9286342ab804cfa00486a9a0ff189da8391721c21c898ea8e26b62e74f + languageName: node + linkType: hard + "ono@npm:^7.1.3": version: 7.1.3 resolution: "ono@npm:7.1.3" @@ -43123,7 +39390,7 @@ __metadata: languageName: node linkType: hard -"open@npm:8.4.2, open@npm:^8.0.0, open@npm:^8.4.0": +"open@npm:8.4.2, open@npm:^8.0.0, open@npm:^8.0.9, open@npm:^8.4.0": version: 8.4.2 resolution: "open@npm:8.4.2" dependencies: @@ -43146,17 +39413,6 @@ __metadata: languageName: node linkType: hard -"open@npm:^8.0.9": - version: 8.4.0 - resolution: "open@npm:8.4.0" - dependencies: - define-lazy-prop: "npm:^2.0.0" - is-docker: "npm:^2.1.1" - is-wsl: "npm:^2.2.0" - checksum: 10/ccb8760068b48e277868423cdf21f4f4e5682ec86dbc3a5cf1c34ef0e8b49721ad98b3f001b4eb2cbd7df7921f84551ec5b9fecace3b3eced3e46dca1c785f03 - languageName: node - linkType: hard - "openapi-types@npm:12.1.3": version: 12.1.3 resolution: "openapi-types@npm:12.1.3" @@ -43180,7 +39436,7 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.8.2": +"optionator@npm:^0.8.1, optionator@npm:^0.8.2": version: 0.8.3 resolution: "optionator@npm:0.8.3" dependencies: @@ -43195,16 +39451,16 @@ __metadata: linkType: hard "optionator@npm:^0.9.3": - version: 0.9.3 - resolution: "optionator@npm:0.9.3" + version: 0.9.4 + resolution: "optionator@npm:0.9.4" dependencies: - "@aashutoshrathi/word-wrap": "npm:^1.2.3" deep-is: "npm:^0.1.3" fast-levenshtein: "npm:^2.0.6" levn: "npm:^0.4.1" prelude-ls: "npm:^1.2.1" type-check: "npm:^0.4.0" - checksum: 10/fa28d3016395974f7fc087d6bbf0ac7f58ac3489f4f202a377e9c194969f329a7b88c75f8152b33fb08794a30dcd5c079db6bb465c28151357f113d80bbf67da + word-wrap: "npm:^1.2.5" + checksum: 10/a8398559c60aef88d7f353a4f98dcdff6090a4e70f874c827302bf1213d9106a1c4d5fcb68dacb1feb3c30a04c4102f41047aa55d4c576b863d6fc876e001af6 languageName: node linkType: hard @@ -43315,13 +39571,6 @@ __metadata: languageName: node linkType: hard -"p-cancelable@npm:^0.3.0": - version: 0.3.0 - resolution: "p-cancelable@npm:0.3.0" - checksum: 10/2b27639be8f7f8718f2854c1711f713c296db00acc4675975b1531ecb6253da197304b4a211a330a8e54e754d28d4b3f7feecb48f0566dd265e3ba6745cd4148 - languageName: node - linkType: hard - "p-cancelable@npm:^1.0.0": version: 1.1.0 resolution: "p-cancelable@npm:1.1.0" @@ -43329,6 +39578,13 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^2.0.0": + version: 2.1.1 + resolution: "p-cancelable@npm:2.1.1" + checksum: 10/7f1b64db17fc54acf359167d62898115dcf2a64bf6b3b038e4faf36fc059e5ed762fb9624df8ed04b25bee8de3ab8d72dea9879a2a960cd12e23c420a4aca6ed + languageName: node + linkType: hard + "p-cancelable@npm:^3.0.0": version: 3.0.0 resolution: "p-cancelable@npm:3.0.0" @@ -43351,9 +39607,9 @@ __metadata: linkType: hard "p-defer@npm:^4.0.0": - version: 4.0.0 - resolution: "p-defer@npm:4.0.0" - checksum: 10/646c9e86e62d2299ee9e8722b9857c9a2918afb8626c4eaf072d956de0d5b33c1cb132e5754516c923fc691eb33aa216755e168f848b045c1279186c8e2d852f + version: 4.0.1 + resolution: "p-defer@npm:4.0.1" + checksum: 10/a561e7b581b76e6dce8ae763b4980004dbc795781de327d0b760e5341f035b0fa2c14e892a66d6d8122e2e114815a26f5ad154061374df84f88e75405ea4b0bb languageName: node linkType: hard @@ -43366,6 +39622,15 @@ __metadata: languageName: node linkType: hard +"p-event@npm:^5.0.1": + version: 5.0.1 + resolution: "p-event@npm:5.0.1" + dependencies: + p-timeout: "npm:^5.0.2" + checksum: 10/755a737e3d4fe912772daaa7262f7f3a4b45e3dbcfb0212a3a913c2db47b0981ddc2e9b1c5ec5fbbfb0cb622ce5b67bc04751ec8ced7e340398107e536d5aab2 + languageName: node + linkType: hard + "p-fifo@npm:^1.0.0": version: 1.0.0 resolution: "p-fifo@npm:1.0.0" @@ -43443,11 +39708,11 @@ __metadata: linkType: hard "p-limit@npm:^6.0.0": - version: 6.0.0 - resolution: "p-limit@npm:6.0.0" + version: 6.1.0 + resolution: "p-limit@npm:6.1.0" dependencies: yocto-queue: "npm:^1.1.1" - checksum: 10/395b82eb776dbfdfba8171ae1d60f94a0ee19cd682182a152f915c60f674d0519688dffe9b7a3f6fa8ba0b6ec7c6b115c6f64a5d6ad5ddfd250362629d77c450 + checksum: 10/9670cb4426d77c20a477cad0e44e8207248381135650f5b9bfe039c9d93566cd4b05cfc557fe60f2db88c799991c7edc6be436255d287a87a605ee604a71cd91 languageName: node linkType: hard @@ -43514,16 +39779,7 @@ __metadata: languageName: node linkType: hard -"p-map@npm:^5.1.0, p-map@npm:^5.3.0": - version: 5.3.0 - resolution: "p-map@npm:5.3.0" - dependencies: - aggregate-error: "npm:^4.0.0" - checksum: 10/8d1e782e89057f8b058352f00b10641f966ba1ae1119789e37229bf910ce5dd7b78079e38c60e42a45f9bd24b8a894736646f0f35105bac2462a2e0cd53a73e4 - languageName: node - linkType: hard - -"p-map@npm:^5.5.0": +"p-map@npm:^5.1.0, p-map@npm:^5.3.0, p-map@npm:^5.5.0": version: 5.5.0 resolution: "p-map@npm:5.5.0" dependencies: @@ -43594,15 +39850,6 @@ __metadata: languageName: node linkType: hard -"p-timeout@npm:^1.1.1": - version: 1.2.1 - resolution: "p-timeout@npm:1.2.1" - dependencies: - p-finally: "npm:^1.0.0" - checksum: 10/65a456f49cca1328774a6bfba61aac98d854b36df9153c2887f82f078d4399e9a30463be8a479871c22ed350a23b34a66ff303ca652b9d81ed4ff5260ac660d2 - languageName: node - linkType: hard - "p-timeout@npm:^3.0.0, p-timeout@npm:^3.1.0": version: 3.2.0 resolution: "p-timeout@npm:3.2.0" @@ -43612,10 +39859,17 @@ __metadata: languageName: node linkType: hard +"p-timeout@npm:^5.0.2": + version: 5.1.0 + resolution: "p-timeout@npm:5.1.0" + checksum: 10/f5cd4e17301ff1ff1d8dbf2817df0ad88c6bba99349fc24d8d181827176ad4f8aca649190b8a5b1a428dfd6ddc091af4606835d3e0cb0656e04045da5c9e270c + languageName: node + linkType: hard + "p-timeout@npm:^6.1.2": - version: 6.1.2 - resolution: "p-timeout@npm:6.1.2" - checksum: 10/ca3ede368d792bd86fcfa4e133220536382225d31e5f62e2cedb8280df267b25f6684aa0056b22e8aa538cc85014b310058d8fdddeb0a1ff363093d56e87ac3a + version: 6.1.3 + resolution: "p-timeout@npm:6.1.3" + checksum: 10/f4ecc8986323a156f80ec5d13b46f644a7fc1dc31bf840d499c24c95528448203b20040e02c2fe19d5f50b8fcf955636adccec551e83ad7c95cc35c235361dcd languageName: node linkType: hard @@ -43667,21 +39921,9 @@ __metadata: linkType: hard "package-json-from-dist@npm:^1.0.0": - version: 1.0.0 - resolution: "package-json-from-dist@npm:1.0.0" - checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea - languageName: node - linkType: hard - -"package-json@npm:^6.3.0": - version: 6.5.0 - resolution: "package-json@npm:6.5.0" - dependencies: - got: "npm:^9.6.0" - registry-auth-token: "npm:^4.0.0" - registry-url: "npm:^5.0.0" - semver: "npm:^6.2.0" - checksum: 10/adb8e49f352ea0d71a4d351732c3870d57f21e6f3921d69a83dd9ef04b45cdb0a035495826fbe9fb2cb9a7e521484404b7d527c181133867b126588efa1996c6 + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 10/58ee9538f2f762988433da00e26acc788036914d57c71c246bf0be1b60cdbd77dd60b6a3e1a30465f0b248aeb80079e0b34cb6050b1dfa18c06953bb1cbc7602 languageName: node linkType: hard @@ -43835,20 +40077,7 @@ __metadata: languageName: node linkType: hard -"parse-asn1@npm:^5.0.0": - version: 5.1.6 - resolution: "parse-asn1@npm:5.1.6" - dependencies: - asn1.js: "npm:^5.2.0" - browserify-aes: "npm:^1.0.0" - evp_bytestokey: "npm:^1.0.0" - pbkdf2: "npm:^3.0.3" - safe-buffer: "npm:^5.1.1" - checksum: 10/4e9ec3bd59df66fcb9d272c801e7dbafd2511dc5a559bcd346b9e228f72e47a6d4d081e8c71340a107bca3a8049975c08cd9270c2de122098e3174122ec39228 - languageName: node - linkType: hard - -"parse-asn1@npm:^5.1.7": +"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.7": version: 5.1.7 resolution: "parse-asn1@npm:5.1.7" dependencies: @@ -43873,14 +40102,7 @@ __metadata: languageName: node linkType: hard -"parse-duration@npm:^1.0.0": - version: 1.0.2 - resolution: "parse-duration@npm:1.0.2" - checksum: 10/1e7eb9e6e040ce63c6deb92c182d93ad521e45672ba3eb5187f646358923f94baf546c28b5d46d72b6d38ed2c418acc00e7c9b768905fa51a491c7e09d3d9a03 - languageName: node - linkType: hard - -"parse-duration@npm:^1.0.2": +"parse-duration@npm:^1.0.0, parse-duration@npm:^1.0.2": version: 1.1.0 resolution: "parse-duration@npm:1.1.0" checksum: 10/c26ab1e3fdf1dc4b7006e87a82fd33c7dbee3116413a59369bbc3b160a8e7ed88616852c4c3dde23b7a857e270cb18fccf629ff52220803194239f8e092774a9 @@ -43900,9 +40122,9 @@ __metadata: linkType: hard "parse-headers@npm:^2.0.0": - version: 2.0.4 - resolution: "parse-headers@npm:2.0.4" - checksum: 10/d3d49061992dad48dcca07f4e9f0f6e76e790e744874fdd800afba3eca6aa6e0496af587201133af2503ca733e00eab463029998191f3e12ef23b4186a146ca2 + version: 2.0.5 + resolution: "parse-headers@npm:2.0.5" + checksum: 10/210b13bc0f99cf6f1183896f01de164797ac35b2720c9f1c82a3e2ceab256f87b9048e8e16a14cfd1b75448771f8379cd564bd1674a179ab0168c90005d4981b languageName: node linkType: hard @@ -43938,15 +40160,15 @@ __metadata: linkType: hard "parse-json@npm:^7.0.0": - version: 7.1.0 - resolution: "parse-json@npm:7.1.0" + version: 7.1.1 + resolution: "parse-json@npm:7.1.1" dependencies: "@babel/code-frame": "npm:^7.21.4" error-ex: "npm:^1.3.2" json-parse-even-better-errors: "npm:^3.0.0" lines-and-columns: "npm:^2.0.3" type-fest: "npm:^3.8.0" - checksum: 10/bf9bc646e8b8cb9ae638988a303bf09866c13d2829c2ff75ee87c27631dac06d0d6e81913f8824c3c4586015bf3f0a6fee1dece168b37932d175ef0709e8860a + checksum: 10/187275c7ac097dcfb3c7420bca2399caa4da33bcd5d5aac3604bda0e2b8eee4df61cc26aa0d79fab97f0d67bf42d41d332baa9f9f56ad27636ad785f1ae639e5 languageName: node linkType: hard @@ -44019,12 +40241,21 @@ __metadata: linkType: hard "parse5-htmlparser2-tree-adapter@npm:^7.0.0": - version: 7.0.0 - resolution: "parse5-htmlparser2-tree-adapter@npm:7.0.0" + version: 7.1.0 + resolution: "parse5-htmlparser2-tree-adapter@npm:7.1.0" + dependencies: + domhandler: "npm:^5.0.3" + parse5: "npm:^7.0.0" + checksum: 10/75910af9137451e9c53e1e0d712f7393f484e89e592b1809ee62ad6cedd61b98daeaa5206ff5d9f06778002c91fac311afedde4880e1916fdb44fa71199dae73 + languageName: node + linkType: hard + +"parse5-parser-stream@npm:^7.1.2": + version: 7.1.2 + resolution: "parse5-parser-stream@npm:7.1.2" dependencies: - domhandler: "npm:^5.0.2" parse5: "npm:^7.0.0" - checksum: 10/23dbe45fdd338fe726cf5c55b236e1f403aeb0c1b926e18ab8ef0aa580980a25f8492d160fe2ed0ec906c3c8e38b51e68ef5620a3b9460d9458ea78946a3f7c0 + checksum: 10/75b232d460bce6bd0e35012750a78ef034f40ccf550b7c6cec3122395af6b4553202ad3663ad468cf537ead5a2e13b6727670395fd0ff548faccad1dc2dc93cf languageName: node linkType: hard @@ -44044,12 +40275,12 @@ __metadata: languageName: node linkType: hard -"parse5@npm:^7.0.0": - version: 7.1.2 - resolution: "parse5@npm:7.1.2" +"parse5@npm:^7.0.0, parse5@npm:^7.1.2": + version: 7.2.1 + resolution: "parse5@npm:7.2.1" dependencies: - entities: "npm:^4.4.0" - checksum: 10/3c86806bb0fb1e9a999ff3a4c883b1ca243d99f45a619a0898dbf021a95a0189ed955c31b07fe49d342b54e814f33f2c9d7489198e8630dacd5477d413ec5782 + entities: "npm:^4.5.0" + checksum: 10/fd1a8ad1540d871e1ad6ca9bf5b67e30280886f1ce4a28052c0cb885723aa984d8cb1ec3da998349a6146960c8a84aa87b1a42600eb3b94495c7303476f2f88e languageName: node linkType: hard @@ -44182,16 +40413,6 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.1": - version: 1.10.1 - resolution: "path-scurry@npm:1.10.1" - dependencies: - lru-cache: "npm:^9.1.1 || ^10.0.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10/eebfb8304fef1d4f7e1486df987e4fd77413de4fce16508dea69fcf8eb318c09a6b15a7a2f4c22877cec1cb7ecbd3071d18ca9de79eeece0df874a00f1f0bdc8 - languageName: node - linkType: hard - "path-scurry@npm:^1.11.1": version: 1.11.1 resolution: "path-scurry@npm:1.11.1" @@ -44202,16 +40423,6 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.6.1": - version: 1.6.3 - resolution: "path-scurry@npm:1.6.3" - dependencies: - lru-cache: "npm:^7.14.1" - minipass: "npm:^4.0.2" - checksum: 10/95cb56ba7dc84995f821f5be48c139113aceaeda0835a761e23fae17fbb64145e8f1b50070ea25137f4cbd745ce81d89a7070292c66a7a8f68cb369ce6052d0a - languageName: node - linkType: hard - "path-to-regexp@npm:0.1.10": version: 0.1.10 resolution: "path-to-regexp@npm:0.1.10" @@ -44219,13 +40430,6 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.1.7": - version: 0.1.7 - resolution: "path-to-regexp@npm:0.1.7" - checksum: 10/701c99e1f08e3400bea4d701cf6f03517474bb1b608da71c78b1eb261415b645c5670dfae49808c89e12cea2dccd113b069f040a80de012da0400191c6dbd1c8 - languageName: node - linkType: hard - "path-to-regexp@npm:3.2.0": version: 3.2.0 resolution: "path-to-regexp@npm:3.2.0" @@ -44234,18 +40438,18 @@ __metadata: linkType: hard "path-to-regexp@npm:^1.7.0": - version: 1.8.0 - resolution: "path-to-regexp@npm:1.8.0" + version: 1.9.0 + resolution: "path-to-regexp@npm:1.9.0" dependencies: isarray: "npm:0.0.1" - checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + checksum: 10/67f0f4823f7aab356523d93a83f9f8222bdd119fa0b27a8f8b587e8e6c9825294bb4ccd16ae619def111ff3fe5d15ff8f658cdd3b0d58b9c882de6fd15bc1b76 languageName: node linkType: hard "path-to-regexp@npm:^6.2.2": - version: 6.2.2 - resolution: "path-to-regexp@npm:6.2.2" - checksum: 10/f7d11c1a9e02576ce0294f4efdc523c11b73894947afdf7b23a0d0f7c6465d7a7772166e770ddf1495a8017cc0ee99e3e8a15ed7302b6b948b89a6dd4eea895e + version: 6.3.0 + resolution: "path-to-regexp@npm:6.3.0" + checksum: 10/6822f686f01556d99538b350722ef761541ec0ce95ca40ce4c29e20a5b492fe8361961f57993c71b2418de12e604478dcf7c430de34b2c31a688363a7a944d9c languageName: node linkType: hard @@ -44317,7 +40521,7 @@ __metadata: languageName: node linkType: hard -"pg-connection-string@npm:2.5.0, pg-connection-string@npm:^2.5.0": +"pg-connection-string@npm:2.5.0": version: 2.5.0 resolution: "pg-connection-string@npm:2.5.0" checksum: 10/a6f3a068f7c9416a5b33a326811caf0dfaaee045c225b7c628b4c9b4e9a2b25bdd12a21e4c48940e1000ea223a4e608ca122d2ff3dd08c8b1db0fc9f5705133a @@ -44331,6 +40535,13 @@ __metadata: languageName: node linkType: hard +"pg-connection-string@npm:^2.5.0": + version: 2.7.0 + resolution: "pg-connection-string@npm:2.7.0" + checksum: 10/68015a8874b7ca5dad456445e4114af3d2602bac2fdb8069315ecad0ff9660ec93259b9af7186606529ac4f6f72a06831e6f20897a689b16cc7fda7ca0e247fd + languageName: node + linkType: hard + "pg-int8@npm:1.0.1": version: 1.0.1 resolution: "pg-int8@npm:1.0.1" @@ -44339,18 +40550,18 @@ __metadata: linkType: hard "pg-pool@npm:^3.5.2": - version: 3.6.0 - resolution: "pg-pool@npm:3.6.0" + version: 3.7.0 + resolution: "pg-pool@npm:3.7.0" peerDependencies: pg: ">=8.0" - checksum: 10/74b893cec3ef2b8062cddfa616dfa2a2ee4c0e340959fd9055fee470e095ea2df0e2dd13bbe31a630741300ed53191bd3177d077c0a29c4b74e630c00e856c63 + checksum: 10/a07a4f9e26eec9d7ac3597dc7b3469c62983edff9a321dbb7acbe1bbc7f5e9b2d33438e277d4cf8145071f3d63c7ebdc287a539fd69dfb8cdddb15b33eefe1a2 languageName: node linkType: hard "pg-protocol@npm:*, pg-protocol@npm:^1.5.0": - version: 1.6.0 - resolution: "pg-protocol@npm:1.6.0" - checksum: 10/995864cc2a8517368b84697c753caff769a4db292eda66f96d9eec46e3aa84737cd0b0fe171aca9d7d4b4a4c46bb25bd399713cb1027a5bf8f38adea0b4284f4 + version: 1.7.0 + resolution: "pg-protocol@npm:1.7.0" + checksum: 10/ffffdf74426c9357b57050f1c191e84447c0e8b2a701b3ab302ac7dd0eb27b862d92e5e3b2d38876a1051de83547eb9165d6a58b3a8e90bb050dae97f9993d54 languageName: node linkType: hard @@ -44396,17 +40607,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: 10/a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 - languageName: node - linkType: hard - -"picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1, picocolors@npm:^1.1.0": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10/e1cf46bf84886c79055fdfa9dcb3e4711ad259949e3565154b004b260cd356c5d54b31a1437ce9782624bf766272fe6b0154f5f0c744fb7af5d454d2b60db045 languageName: node linkType: hard @@ -44496,6 +40700,22 @@ __metadata: languageName: node linkType: hard +"pino-abstract-transport@npm:^2.0.0": + version: 2.0.0 + resolution: "pino-abstract-transport@npm:2.0.0" + dependencies: + split2: "npm:^4.0.0" + checksum: 10/e5699ecb06c7121055978e988e5cecea5b6892fc2589c64f1f86df5e7386bbbfd2ada268839e911b021c6b3123428aed7c6be3ac7940eee139556c75324c7e83 + languageName: node + linkType: hard + +"pino-std-serializers@npm:^6.0.0": + version: 6.2.2 + resolution: "pino-std-serializers@npm:6.2.2" + checksum: 10/a00cdff4e1fbc206da9bed047e6dc400b065f43e8b4cef1635b0192feab0e8f932cdeb0faaa38a5d93d2e777ba4cda939c2ed4c1a70f6839ff25f9aef97c27ff + languageName: node + linkType: hard + "pino-std-serializers@npm:^7.0.0": version: 7.0.0 resolution: "pino-std-serializers@npm:7.0.0" @@ -44503,14 +40723,35 @@ __metadata: languageName: node linkType: hard -"pino@npm:^9.0.0": - version: 9.4.0 - resolution: "pino@npm:9.4.0" +"pino@npm:^8.17.0": + version: 8.21.0 + resolution: "pino@npm:8.21.0" dependencies: atomic-sleep: "npm:^1.0.0" fast-redact: "npm:^3.1.1" on-exit-leak-free: "npm:^2.1.0" pino-abstract-transport: "npm:^1.2.0" + pino-std-serializers: "npm:^6.0.0" + process-warning: "npm:^3.0.0" + quick-format-unescaped: "npm:^4.0.3" + real-require: "npm:^0.2.0" + safe-stable-stringify: "npm:^2.3.1" + sonic-boom: "npm:^3.7.0" + thread-stream: "npm:^2.6.0" + bin: + pino: bin.js + checksum: 10/5a054eab533ab91b20f63497b86070f0a6b40e4688cde9de66d23e03d6046c4e95d69c3f526dea9f30bcbc5874c7fbf0f91660cded4753946fd02261ca8ac340 + languageName: node + linkType: hard + +"pino@npm:^9.0.0": + version: 9.5.0 + resolution: "pino@npm:9.5.0" + dependencies: + atomic-sleep: "npm:^1.0.0" + fast-redact: "npm:^3.1.1" + on-exit-leak-free: "npm:^2.1.0" + pino-abstract-transport: "npm:^2.0.0" pino-std-serializers: "npm:^7.0.0" process-warning: "npm:^4.0.0" quick-format-unescaped: "npm:^4.0.3" @@ -44520,24 +40761,17 @@ __metadata: thread-stream: "npm:^3.0.0" bin: pino: bin.js - checksum: 10/1c730c216052bab277cab619da8fb9ef916fd29c7aee66e0a6e0c089cb41713df6a9071517755e3bef0ca3160629fd85d22c8f9d277e41ce332c91999e073146 + checksum: 10/e2dba79524be133e2a0800ad0424bbf2c4c94c46f028a81e514d40951666f3dcec76c582fd5ce6f6155df0f5a9d6d0257924fdf043fe285236d36c76509a59dd languageName: node linkType: hard -"pirates@npm:^4.0.1": +"pirates@npm:^4.0.1, pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" checksum: 10/d02dda76f4fec1cbdf395c36c11cf26f76a644f9f9a1bfa84d3167d0d3154d5289aacc72677aa20d599bb4a6937a471de1b65c995e2aea2d8687cbcd7e43ea5f languageName: node linkType: hard -"pirates@npm:^4.0.4": - version: 4.0.5 - resolution: "pirates@npm:4.0.5" - checksum: 10/3728bae0cf6c18c3d25f5449ee8c5bc1a6a83bca688abe0e1654ce8c069bfd408170397cef133ed9ec8b0faeb4093c5c728d0e72ab7b3385256cd87008c40364 - languageName: node - linkType: hard - "piscina@npm:4.0.0": version: 4.0.0 resolution: "piscina@npm:4.0.0" @@ -44565,7 +40799,7 @@ __metadata: languageName: node linkType: hard -"pkcs11js@npm:1.3.1, pkcs11js@npm:^1.3.0": +"pkcs11js@npm:1.3.1, pkcs11js@npm:^1.0.6, pkcs11js@npm:^1.3.0": version: 1.3.1 resolution: "pkcs11js@npm:1.3.1" dependencies: @@ -44575,16 +40809,6 @@ __metadata: languageName: node linkType: hard -"pkcs11js@npm:^1.0.6": - version: 1.3.0 - resolution: "pkcs11js@npm:1.3.0" - dependencies: - nan: "npm:^2.15.0" - node-gyp: "npm:latest" - checksum: 10/7a5abea57625b9c5bc437fd9d11b15600ef7366a0989a60068cdd1ffcceaed922726c33fa08477f27ea45071a4ccf2885ea29c83583977d3783e4bd6888116d7 - languageName: node - linkType: hard - "pkg-conf@npm:^2.0.0, pkg-conf@npm:^2.1.0": version: 2.1.0 resolution: "pkg-conf@npm:2.1.0" @@ -45070,11 +41294,11 @@ __metadata: linkType: hard "postcss-load-config@npm:^4.0.1": - version: 4.0.1 - resolution: "postcss-load-config@npm:4.0.1" + version: 4.0.2 + resolution: "postcss-load-config@npm:4.0.2" dependencies: - lilconfig: "npm:^2.0.5" - yaml: "npm:^2.1.1" + lilconfig: "npm:^3.0.0" + yaml: "npm:^2.3.4" peerDependencies: postcss: ">=8.0.9" ts-node: ">=9.0.0" @@ -45083,7 +41307,7 @@ __metadata: optional: true ts-node: optional: true - checksum: 10/d841565bc3638ae4b6854d3046904e054e76fca0aea5cf3e730b47e171e3e0a041ffc5f9b7348b18ea59c5d1e315944fa657b1cf9c573eecb053117b0d31eb8d + checksum: 10/e2c2ed9b7998a5b123e1ce0c124daf6504b1454c67dcc1c8fdbcc5ffb2597b7de245e3ac34f63afc928d3fd3260b1e36492ebbdb01a9ff63f16b3c8b7b925d1b languageName: node linkType: hard @@ -45234,16 +41458,7 @@ __metadata: languageName: node linkType: hard -"postcss-modules-extract-imports@npm:^3.0.0": - version: 3.0.0 - resolution: "postcss-modules-extract-imports@npm:3.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/8d68bb735cef4d43f9cdc1053581e6c1c864860b77fcfb670372b39c5feeee018dc5ddb2be4b07fef9bcd601edded4262418bbaeaf1bd4af744446300cebe358 - languageName: node - linkType: hard - -"postcss-modules-extract-imports@npm:^3.1.0": +"postcss-modules-extract-imports@npm:^3.0.0, postcss-modules-extract-imports@npm:^3.1.0": version: 3.1.0 resolution: "postcss-modules-extract-imports@npm:3.1.0" peerDependencies: @@ -45252,20 +41467,7 @@ __metadata: languageName: node linkType: hard -"postcss-modules-local-by-default@npm:^4.0.3": - version: 4.0.3 - resolution: "postcss-modules-local-by-default@npm:4.0.3" - dependencies: - icss-utils: "npm:^5.0.0" - postcss-selector-parser: "npm:^6.0.2" - postcss-value-parser: "npm:^4.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/4f671d77cb6a025c8be09540fea00ce2d3dbf3375a3a15b48f927325c7418d7c3c87a83bacbf81c5de6ef8bd1660d5f6f2542b98de5877355a23b739379f8c79 - languageName: node - linkType: hard - -"postcss-modules-local-by-default@npm:^4.0.4, postcss-modules-local-by-default@npm:^4.0.5": +"postcss-modules-local-by-default@npm:^4.0.3, postcss-modules-local-by-default@npm:^4.0.4, postcss-modules-local-by-default@npm:^4.0.5": version: 4.0.5 resolution: "postcss-modules-local-by-default@npm:4.0.5" dependencies: @@ -45278,18 +41480,7 @@ __metadata: languageName: node linkType: hard -"postcss-modules-scope@npm:^3.0.0": - version: 3.0.0 - resolution: "postcss-modules-scope@npm:3.0.0" - dependencies: - postcss-selector-parser: "npm:^6.0.4" - peerDependencies: - postcss: ^8.1.0 - checksum: 10/cc36b8111c6160a1c21ca0e82de9daf0147be95f3b5403aedd83bcaee44ee425cb62b77f677fc53d0c8d51f7981018c1c8f0a4ad3d6f0138b09326ac48c2b297 - languageName: node - linkType: hard - -"postcss-modules-scope@npm:^3.1.1, postcss-modules-scope@npm:^3.2.0": +"postcss-modules-scope@npm:^3.0.0, postcss-modules-scope@npm:^3.1.1, postcss-modules-scope@npm:^3.2.0": version: 3.2.0 resolution: "postcss-modules-scope@npm:3.2.0" dependencies: @@ -45312,13 +41503,13 @@ __metadata: linkType: hard "postcss-nested@npm:^6.0.1": - version: 6.0.1 - resolution: "postcss-nested@npm:6.0.1" + version: 6.2.0 + resolution: "postcss-nested@npm:6.2.0" dependencies: - postcss-selector-parser: "npm:^6.0.11" + postcss-selector-parser: "npm:^6.1.1" peerDependencies: postcss: ^8.2.14 - checksum: 10/02aaac682f599879fae6aab3210aee59b8b5bde3ba242527f6fd103726955b74ffa05c2b765920be5f403e758045582534d11b1e19add01586c19743ed99e3fe + checksum: 10/d7f6ba6bfd03d42f84689a0630d4e393c421bb53723f16fe179a840f03ed17763b0fe494458577d2a015e857e0ec27c7e194909ffe209ee5f0676aec39737317 languageName: node linkType: hard @@ -45612,33 +41803,13 @@ __metadata: languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.10": - version: 6.0.10 - resolution: "postcss-selector-parser@npm:6.0.10" - dependencies: - cssesc: "npm:^3.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/f8ad9beb764a64b51a8027650e745a44ed7198f0b968b823db9563a54990924bcf9eb6fb59fbbb7eb05a89b2b6a24b81b2b7d60ecadda15b04a0024c7663f436 - languageName: node - linkType: hard - -"postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.5, postcss-selector-parser@npm:^6.0.9": - version: 6.0.13 - resolution: "postcss-selector-parser@npm:6.0.13" - dependencies: - cssesc: "npm:^3.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/e779aa1f8ca9ee45d562400aac6109a2bccc59559b6e15adec8bc2a71d395ca563a378fd68f6a61963b4ef2ca190e0c0486e6dc6c41d755f3b82dd6e480e6941 - languageName: node - linkType: hard - -"postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4": - version: 6.0.9 - resolution: "postcss-selector-parser@npm:6.0.9" +"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.0.5, postcss-selector-parser@npm:^6.0.9, postcss-selector-parser@npm:^6.1.1": + version: 6.1.2 + resolution: "postcss-selector-parser@npm:6.1.2" dependencies: cssesc: "npm:^3.0.0" util-deprecate: "npm:^1.0.2" - checksum: 10/e9b18ed7b8d23f83ffe39bb76e5689f28ec07a501c70c81e078fbcded6c31b54ad952476e33d25b47050f5a1f1b2310745c30f3649a984e45ea973e443551c6d + checksum: 10/190034c94d809c115cd2f32ee6aade84e933450a43ec3899c3e78e7d7b33efd3a2a975bb45d7700b6c5b196c06a7d9acf3f1ba6f1d87032d9675a29d8bca1dd3 languageName: node linkType: hard @@ -45686,13 +41857,13 @@ __metadata: linkType: hard "postcss@npm:>=8.4.31": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" + version: 8.4.47 + resolution: "postcss@npm:8.4.47" dependencies: - nanoid: "npm:^3.3.6" - picocolors: "npm:^1.0.0" - source-map-js: "npm:^1.0.2" - checksum: 10/1a6653e72105907377f9d4f2cd341d8d90e3fde823a5ddea1e2237aaa56933ea07853f0f2758c28892a1d70c53bbaca200eb8b80f8ed55f13093003dbec5afa0 + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.1.0" + source-map-js: "npm:^1.2.1" + checksum: 10/f2b50ba9b6fcb795232b6bb20de7cdc538c0025989a8ed9c4438d1960196ba3b7eaff41fdb1a5c701b3504651ea87aeb685577707f0ae4d6ce6f3eae5df79a81 languageName: node linkType: hard @@ -45726,6 +41897,43 @@ __metadata: languageName: node linkType: hard +"postman-request@npm:^2.88.1-postman.33": + version: 2.88.1-postman.8-beta.1 + resolution: "postman-request@npm:2.88.1-postman.8-beta.1" + dependencies: + aws-sign2: "npm:~0.7.0" + aws4: "npm:^1.8.0" + caseless: "npm:~0.12.0" + combined-stream: "npm:~1.0.6" + extend: "npm:~3.0.2" + forever-agent: "npm:~0.6.1" + form-data: "npm:~2.3.2" + har-validator: "npm:~5.1.3" + http-signature: "npm:~1.2.0" + is-typedarray: "npm:~1.0.0" + isstream: "npm:~0.1.2" + json-stringify-safe: "npm:~5.0.1" + mime-types: "npm:~2.1.19" + oauth-sign: "npm:~0.9.0" + performance-now: "npm:^2.1.0" + postman-url-encoder: "npm:1.0.1" + qs: "npm:~6.5.2" + safe-buffer: "npm:^5.1.2" + stream-length: "npm:^1.0.2" + tough-cookie: "npm:~2.5.0" + tunnel-agent: "npm:^0.6.0" + uuid: "npm:^3.3.2" + checksum: 10/ffae2656cef5788d11a95bfaad192902163d2270c85864b8b6d870683534e02d1dc1a430057aa2c3dc1848e6e9f2aa505a5fbed3f096b47ec44151bd2ba7de9f + languageName: node + linkType: hard + +"postman-url-encoder@npm:1.0.1": + version: 1.0.1 + resolution: "postman-url-encoder@npm:1.0.1" + checksum: 10/cb82028850f6ceb3acb6671c47eda66a37c632aee4cb2d26f515db6f07ac50fa5f4e4623db5fe902feeb4108dc6ce739f6b7f0af9df34709463ba6ab6e29c350 + languageName: node + linkType: hard + "pouchdb-abstract-mapreduce@npm:7.3.1": version: 7.3.1 resolution: "pouchdb-abstract-mapreduce@npm:7.3.1" @@ -46006,13 +42214,6 @@ __metadata: languageName: node linkType: hard -"prepend-http@npm:^1.0.1": - version: 1.0.4 - resolution: "prepend-http@npm:1.0.4" - checksum: 10/01e7baf4ad38af02257b99098543469332fc42ae50df33d97a124bf8172295907352fa6138c9b1610c10c6dd0847ca736e53fda736387cc5cf8fcffe96b47f29 - languageName: node - linkType: hard - "prepend-http@npm:^2.0.0": version: 2.0.0 resolution: "prepend-http@npm:2.0.0" @@ -46087,14 +42288,14 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.6.2": - version: 29.6.2 - resolution: "pretty-format@npm:29.6.2" +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" dependencies: - "@jest/schemas": "npm:^29.6.0" + "@jest/schemas": "npm:^29.6.3" ansi-styles: "npm:^5.0.0" react-is: "npm:^18.0.0" - checksum: 10/5db1faf52552341e5026fd72f847d88116b08f758ef904f1635415b53ec2a193a0114fdede9f55a2c1174fa6eca896531f860db6f208c5698a52a5c354bb6f8d + checksum: 10/dea96bc83c83cd91b2bfc55757b6b2747edcaac45b568e46de29deee80742f17bc76fe8898135a70d904f4928eafd8bb693cd1da4896e8bdd3c5e82cadf1d2bb languageName: node linkType: hard @@ -46107,15 +42308,6 @@ __metadata: languageName: node linkType: hard -"printj@npm:~1.3.1": - version: 1.3.1 - resolution: "printj@npm:1.3.1" - bin: - printj: bin/printj.njs - checksum: 10/03eef7fdf05741db9aa7d6306d3c556bb433c6874a425875fca2ee71c1a8fc224f113b76498960ac193d80c16c51d2211fc75981a9b9f6349181c47f8d8d7cfd - languageName: node - linkType: hard - "proc-log@npm:^3.0.0": version: 3.0.0 resolution: "proc-log@npm:3.0.0" @@ -46174,6 +42366,13 @@ __metadata: languageName: node linkType: hard +"progress-events@npm:^1.0.0": + version: 1.0.1 + resolution: "progress-events@npm:1.0.1" + checksum: 10/21e8ba984e6c6f6764279fabdf7b34d8110c1720757360fc8cad56b1622e67857fe543619652b64cee51a880a2a4a5febdcb4ff86e4c2969ed90048e2264f42f + languageName: node + linkType: hard + "progress@npm:^1.1.8": version: 1.1.8 resolution: "progress@npm:1.1.8" @@ -46206,9 +42405,9 @@ __metadata: linkType: hard "promise-call-limit@npm:^3.0.1": - version: 3.0.1 - resolution: "promise-call-limit@npm:3.0.1" - checksum: 10/f1b3c4d3a9c5482ce27ec5f40311e1389adb9bb10c16166e61c96d29ab22c701691d5225bf6745a162858f45dfb46cc82275fd09e7aa57846fc446c7855c2f06 + version: 3.0.2 + resolution: "promise-call-limit@npm:3.0.2" + checksum: 10/e1e2d57658bd57574959bd89733958f4e6940a6a5788d2f380a81f62f5660f88f93a7dd9f9eb3d09dc7c4927387e25c00ca941a3bdfce8fb050987d2d0ffe59a languageName: node linkType: hard @@ -46273,6 +42472,13 @@ __metadata: languageName: node linkType: hard +"property-information@npm:^6.0.0": + version: 6.5.0 + resolution: "property-information@npm:6.5.0" + checksum: 10/fced94f3a09bf651ad1824d1bdc8980428e3e480e6d01e98df6babe2cc9d45a1c52eee9a7736d2006958f9b394eb5964dedd37e23038086ddc143fc2fd5e426c + languageName: node + linkType: hard + "proto-list@npm:~1.2.1": version: 1.2.4 resolution: "proto-list@npm:1.2.4" @@ -46289,18 +42495,18 @@ __metadata: languageName: node linkType: hard -"proto3-json-serializer@npm:^2.0.0": - version: 2.0.0 - resolution: "proto3-json-serializer@npm:2.0.0" +"proto3-json-serializer@npm:^2.0.0, proto3-json-serializer@npm:^2.0.2": + version: 2.0.2 + resolution: "proto3-json-serializer@npm:2.0.2" dependencies: - protobufjs: "npm:^7.0.0" - checksum: 10/7b961ca4e5dc30c82e3d6d093a785c4bdfd28f704e145f7ceadd295024372651d9e627195dd330634e2f0a6b55847384288d1b9c47d2a7367abc097c18bd2c1f + protobufjs: "npm:^7.2.5" + checksum: 10/d588337f9a24a94ac14a456261af48ea07e6d0a8a00faebb0b689e79e83925383b9d3ea713184d6336d0bb743dd803f188710e3e8fbfb316586cd1e3f7862a56 languageName: node linkType: hard "protobufjs@npm:>=7.2.5": - version: 7.2.5 - resolution: "protobufjs@npm:7.2.5" + version: 7.4.0 + resolution: "protobufjs@npm:7.4.0" dependencies: "@protobufjs/aspromise": "npm:^1.1.2" "@protobufjs/base64": "npm:^1.1.2" @@ -46314,7 +42520,7 @@ __metadata: "@protobufjs/utf8": "npm:^1.1.0" "@types/node": "npm:>=13.7.0" long: "npm:^5.0.0" - checksum: 10/6c5aa62b61dff843f585f3acd9cb7a82d566de2dbf167a300b39afee91b04298c4b4aec61354b7c00308b40596f5f3f4b07d6246cfb4ee0abeaea25101033315 + checksum: 10/408423506610f70858d7593632f4a6aa4f05796c90fd632be9b9252457c795acc71aa6d3b54bb7f48a890141728fee4ca3906723ccea6c202ad71f21b3879b8b languageName: node linkType: hard @@ -46335,12 +42541,13 @@ __metadata: linkType: hard "protons-runtime@npm:^5.0.0": - version: 5.2.0 - resolution: "protons-runtime@npm:5.2.0" + version: 5.5.0 + resolution: "protons-runtime@npm:5.5.0" dependencies: + uint8-varint: "npm:^2.0.2" uint8arraylist: "npm:^2.4.3" - uint8arrays: "npm:^4.0.6" - checksum: 10/c0ac8ba366fa0ff09c3efcc86642956e4fe8e968a809af3ed77630f78e5a2f7f986ffd41b628d8f25832338e8c8e3855b72c8213edd1d955091d264e2e9d79f8 + uint8arrays: "npm:^5.0.1" + checksum: 10/ce31ed658c33f4e2c38102000434a778563ce91cfba1e6e1dcbf4fa7a2a9110cd8f4cecb7076a925e03aaac4e43f649b282c2f7cdeac2f6e723e0a0660c721db languageName: node linkType: hard @@ -46382,13 +42589,6 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.33": - version: 1.8.0 - resolution: "psl@npm:1.8.0" - checksum: 10/5f62a8eca06cb4a017983d15b92b0d38dc8699d637eabc8cb482c59b4106c9760f59cc8afabcb8bb7b98f0322907680d8f0f59226386fffab5248d180bc04578 - languageName: node - linkType: hard - "pstree.remy@npm:^1.1.8": version: 1.1.8 resolution: "pstree.remy@npm:1.1.8" @@ -46396,7 +42596,7 @@ __metadata: languageName: node linkType: hard -"public-encrypt@npm:^4.0.0": +"public-encrypt@npm:^4.0.0, public-encrypt@npm:^4.0.3": version: 4.0.3 resolution: "public-encrypt@npm:4.0.3" dependencies: @@ -46411,12 +42611,12 @@ __metadata: linkType: hard "pump@npm:^3.0.0": - version: 3.0.0 - resolution: "pump@npm:3.0.0" + version: 3.0.2 + resolution: "pump@npm:3.0.2" dependencies: end-of-stream: "npm:^1.1.0" once: "npm:^1.3.1" - checksum: 10/e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 + checksum: 10/e0c4216874b96bd25ddf31a0b61a5613e26cc7afa32379217cf39d3915b0509def3565f5f6968fafdad2894c8bbdbd67d340e84f3634b2a29b950cffb6442d9f languageName: node linkType: hard @@ -46441,19 +42641,17 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^2.0.0, punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.1.1 - resolution: "punycode@npm:2.1.1" - checksum: 10/939daa010c2cacebdb060c40ecb52fef0a739324a66f7fffe0f94353a1ee83e3b455e9032054c4a0c4977b0a28e27086f2171c392832b59a01bd948fd8e20914 +"punycode@npm:^1.4.1": + version: 1.4.1 + resolution: "punycode@npm:1.4.1" + checksum: 10/af2700dde1a116791ff8301348ff344c47d6c224e875057237d1b5112035655fb07a6175cfdb8bf0e3a8cdfd2dc82b3a622e0aefd605566c0e949a6d0d1256a4 languageName: node linkType: hard -"pupa@npm:^2.1.1": - version: 2.1.1 - resolution: "pupa@npm:2.1.1" - dependencies: - escape-goat: "npm:^2.0.0" - checksum: 10/49529e50372ffdb0cccf0efa0f3b3cb0a2c77805d0d9cc2725bd2a0f6bb414631e61c93a38561b26be1259550b7bb6c2cb92315aa09c8bf93f3bdcb49f2b2fb7 +"punycode@npm:^2.0.0, punycode@npm:^2.1.0, punycode@npm:^2.1.1": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 languageName: node linkType: hard @@ -46465,9 +42663,9 @@ __metadata: linkType: hard "pure-rand@npm:^6.0.0": - version: 6.0.2 - resolution: "pure-rand@npm:6.0.2" - checksum: 10/d33f92dbac58eba65e851046905379ddd32b0af11daa49187bf2b44c4da6e5685cdcd8775388a3c706c126dcdb19bdcc0f736a0c432de25d68d21a762ff5f572 + version: 6.1.0 + resolution: "pure-rand@npm:6.1.0" + checksum: 10/256aa4bcaf9297256f552914e03cbdb0039c8fe1db11fa1e6d3f80790e16e563eb0a859a1e61082a95e224fc0c608661839439f8ecc6a3db4e48d46d99216ee4 languageName: node linkType: hard @@ -46494,15 +42692,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.10.3": - version: 6.10.3 - resolution: "qs@npm:6.10.3" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 10/73d07bfd77f07bec3750dca5e6d165cba0c87ce3e4688bb26e5e462e725ab1289ecdb69164b0b4a4d1b913e2a3ae6b22acbb8b2feb5c8f31bd76f2380f3dc23d - languageName: node - linkType: hard - "qs@npm:6.11.0": version: 6.11.0 resolution: "qs@npm:6.11.0" @@ -46512,7 +42701,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.13.0": +"qs@npm:6.13.0, qs@npm:^6.12.3, qs@npm:^6.13.0, qs@npm:^6.9.4": version: 6.13.0 resolution: "qs@npm:6.13.0" dependencies: @@ -46521,15 +42710,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.11.0, qs@npm:^6.9.4": - version: 6.11.2 - resolution: "qs@npm:6.11.2" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 10/f2321d0796664d0f94e92447ccd3bdfd6b6f3a50b6b762aa79d7f5b1ea3a7a9f94063ba896b82bc2a877ed6a7426d4081e4f16568fdb04f0ee188cca9d8505b4 - languageName: node - linkType: hard - "qs@npm:~6.5.2": version: 6.5.3 resolution: "qs@npm:6.5.3" @@ -46586,13 +42766,6 @@ __metadata: languageName: node linkType: hard -"querystringify@npm:^2.1.1": - version: 2.2.0 - resolution: "querystringify@npm:2.2.0" - checksum: 10/46ab16f252fd892fc29d6af60966d338cdfeea68a231e9457631ffd22d67cec1e00141e0a5236a2eb16c0d7d74175d9ec1d6f963660c6f2b1c2fc85b194c5680 - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -46628,13 +42801,6 @@ __metadata: languageName: node linkType: hard -"race-signal@npm:^1.0.0": - version: 1.0.1 - resolution: "race-signal@npm:1.0.1" - checksum: 10/d872525af9228f198bf02cb8ecef222639aefe1e63af51c01b5b47aa936b1561556daa90b2503d98e030703873ffd9d5dba2525acfccc64b0abfd3a1fe1c0161 - languageName: node - linkType: hard - "raf@npm:^3.4.1": version: 3.4.1 resolution: "raf@npm:3.4.1" @@ -46653,7 +42819,7 @@ __metadata: languageName: node linkType: hard -"randomfill@npm:^1.0.3": +"randomfill@npm:^1.0.3, randomfill@npm:^1.0.4": version: 1.0.4 resolution: "randomfill@npm:1.0.4" dependencies: @@ -46670,19 +42836,7 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.5.1": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10/280bedc12db3490ecd06f740bdcf66093a07535374b51331242382c0e130bb273ebb611b7bc4cba1b4b4e016cc7b1f4b05a6df885a6af39c2bc3b94c02291c84 - languageName: node - linkType: hard - -"raw-body@npm:2.5.2": +"raw-body@npm:2.5.2, raw-body@npm:^2.3.0, raw-body@npm:^2.4.1": version: 2.5.2 resolution: "raw-body@npm:2.5.2" dependencies: @@ -46694,18 +42848,6 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:^2.3.0, raw-body@npm:^2.4.1": - version: 2.5.0 - resolution: "raw-body@npm:2.5.0" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10/69be6cc3a29241aa70c1e00a9e82388054abe6686d3d4e0d82759c9402ee818095d37be478c0d5034a2d12f7d91342062767d7169da7a7f4b24a954b99ff493d - languageName: node - linkType: hard - "rc@npm:^1.2.7, rc@npm:^1.2.8": version: 1.2.8 resolution: "rc@npm:1.2.8" @@ -46846,21 +42988,7 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^18.0.0": - version: 18.1.0 - resolution: "react-is@npm:18.1.0" - checksum: 10/fe09c86d5e12a8531bf3e748660f3dffbe900a6da0b488c7efaf0a866e16b74ecc1b0011b0960b13594f8719f39f87a987c0c85edff0b2d3e2f14b87e7230ad2 - languageName: node - linkType: hard - -"react-is@npm:^18.2.0": - version: 18.2.0 - resolution: "react-is@npm:18.2.0" - checksum: 10/200cd65bf2e0be7ba6055f647091b725a45dd2a6abef03bf2380ce701fd5edccee40b49b9d15edab7ac08a762bf83cb4081e31ec2673a5bfb549a36ba21570df - languageName: node - linkType: hard - -"react-is@npm:^18.3.1": +"react-is@npm:^18.0.0, react-is@npm:^18.2.0, react-is@npm:^18.3.1": version: 18.3.1 resolution: "react-is@npm:18.3.1" checksum: 10/d5f60c87d285af24b1e1e7eaeb123ec256c3c8bdea7061ab3932e3e14685708221bf234ec50b21e10dd07f008f1b966a2730a0ce4ff67905b3872ff2042aec22 @@ -46908,9 +43036,9 @@ __metadata: linkType: hard "react-refresh@npm:^0.14.0": - version: 0.14.0 - resolution: "react-refresh@npm:0.14.0" - checksum: 10/75941262ce3ed4fc79b52492943fd59692f29b84f30f3822713b7e920f28e85c62a4386f85cbfbaea95ed62d3e74209f0a0bb065904b7ab2f166a74ac3812e2a + version: 0.14.2 + resolution: "react-refresh@npm:0.14.2" + checksum: 10/512abf97271ab8623486061be04b608c39d932e3709f9af1720b41573415fa4993d0009fa5138b6705b60a98f4102f744d4e26c952b14f41a0e455521c6be4cc languageName: node linkType: hard @@ -47099,14 +43227,14 @@ __metadata: linkType: hard "read-package-json@npm:^6.0.0": - version: 6.0.1 - resolution: "read-package-json@npm:6.0.1" + version: 6.0.4 + resolution: "read-package-json@npm:6.0.4" dependencies: - glob: "npm:^9.3.0" + glob: "npm:^10.2.2" json-parse-even-better-errors: "npm:^3.0.0" normalize-package-data: "npm:^5.0.0" npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/a583eedfc708d4492af2f6b817b9bdcc252e8aac5169bd4a7c5950cb3bd4af7f360d67d7d7bea8638a44d0188eab40ff7b7ef0b3a63b91e6039a0719b82c531e + checksum: 10/2c72fc86745ffd303177ec1490a809fb916d36720cec145900ec92ca5dd159d6f096dd7842ad92dfa01eeea5509e076960a5395e8d5ce31984a4e9070018915a languageName: node linkType: hard @@ -47233,7 +43361,7 @@ __metadata: languageName: node linkType: hard -"read-pkg@npm:^9.0.0": +"read-pkg@npm:^9.0.1": version: 9.0.1 resolution: "read-pkg@npm:9.0.1" dependencies: @@ -47258,7 +43386,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:2 || 3, readable-stream@npm:^3.6.2": +"readable-stream@npm:2 || 3, readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -47269,18 +43397,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": - version: 3.6.0 - resolution: "readable-stream@npm:3.6.0" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10/b80b3e6a7fafb1c79de7db541de357f4a5ee73bd70c21672f5a7c840d27bb27bdb0151e7ba2fd82c4a888df22ce0c501b0d9f3e4dfe51688876701c437d59536 - languageName: node - linkType: hard - -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.1.4, readable-stream@npm:^2.3.6, readable-stream@npm:^2.3.8": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.1, readable-stream@npm:^2.1.4, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:^2.3.8": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -47295,22 +43412,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.1, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5": - version: 2.3.7 - resolution: "readable-stream@npm:2.3.7" - dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.3" - isarray: "npm:~1.0.0" - process-nextick-args: "npm:~2.0.0" - safe-buffer: "npm:~5.1.1" - string_decoder: "npm:~1.1.1" - util-deprecate: "npm:~1.0.1" - checksum: 10/d04c677c1705e3fc6283d45859a23f4c05243d0c0f1fc08cb8f995b4d69f0eb7f38ec0ec102f0ee20535c5d999ee27449f40aa2edf6bf30c24d0cc8f8efeb6d7 - languageName: node - linkType: hard - -"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0": +"readable-stream@npm:^4.0.0, readable-stream@npm:^4.2.0, readable-stream@npm:^4.5.2": version: 4.5.2 resolution: "readable-stream@npm:4.5.2" dependencies: @@ -47464,15 +43566,6 @@ __metadata: languageName: node linkType: hard -"redux@npm:^4.0.4": - version: 4.2.1 - resolution: "redux@npm:4.2.1" - dependencies: - "@babel/runtime": "npm:^7.9.2" - checksum: 10/371e4833b671193303a7dea7803c8fdc8e0d566740c78f580e0a3b77b4161da25037626900a2205a5d616117fa6ad09a4232e5a110bd437186b5c6355a041750 - languageName: node - linkType: hard - "ref-array-di@npm:1.2.2, ref-array-di@npm:^1.2.2": version: 1.2.2 resolution: "ref-array-di@npm:1.2.2" @@ -47494,13 +43587,20 @@ __metadata: languageName: node linkType: hard -"reflect-metadata@npm:0.1.13, reflect-metadata@npm:^0.1.13, reflect-metadata@npm:^0.1.2": +"reflect-metadata@npm:0.1.13": version: 0.1.13 resolution: "reflect-metadata@npm:0.1.13" checksum: 10/732570da35d2d96f8fdd5aac60fb263aa92f6512eaded5962b052bd9e90f22a9dec5aaf0d7ff4bfe97646c9530e8444e8435c2d80b24d0bdf938b5d47f6f5b83 languageName: node linkType: hard +"reflect-metadata@npm:^0.1.13, reflect-metadata@npm:^0.1.2": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + "reflect-metadata@npm:^0.2.0": version: 0.2.2 resolution: "reflect-metadata@npm:0.2.2" @@ -47509,34 +43609,26 @@ __metadata: linkType: hard "reflect.getprototypeof@npm:^1.0.4": - version: 1.0.4 - resolution: "reflect.getprototypeof@npm:1.0.4" + version: 1.0.6 + resolution: "reflect.getprototypeof@npm:1.0.6" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.1" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" globalthis: "npm:^1.0.3" which-builtin-type: "npm:^1.1.3" - checksum: 10/52ff881f62a9cb4acdd7f9a8f4ac88234056c4a6b1ed570c249cc085de5c313249b90251d16eb8e58302b82ae697eec19dde16ff62949f6b87f035a3a26dc5df + checksum: 10/518f6457e4bb470c9b317d239c62d4b4a05678b7eae4f1c3f4332fad379b3ea6d2d8999bfad448547fdba8fb77e4725cfe8c6440d0168ff387f16b4f19f759ad languageName: node linkType: hard -"regenerate-unicode-properties@npm:^10.0.1": - version: 10.0.1 - resolution: "regenerate-unicode-properties@npm:10.0.1" - dependencies: - regenerate: "npm:^1.4.2" - checksum: 10/448dcfa5e0a965e8ccad19c693333f790a379d5d4cf83c887bc6fa53e6c25a4af64c6d00a05d56a5374f3b878fbdecaf5c49c7b64af84e93b4a57c178f2c20b5 - languageName: node - linkType: hard - -"regenerate-unicode-properties@npm:^10.1.0": - version: 10.1.0 - resolution: "regenerate-unicode-properties@npm:10.1.0" +"regenerate-unicode-properties@npm:^10.2.0": + version: 10.2.0 + resolution: "regenerate-unicode-properties@npm:10.2.0" dependencies: regenerate: "npm:^1.4.2" - checksum: 10/25b268659898955ad105267b4efba20e361e27b233670694b683728a2800314bec3053918d3bf71b0604376fd76fe9bc9c6f80379cfb6d1e209a58de44101aac + checksum: 10/9150eae6fe04a8c4f2ff06077396a86a98e224c8afad8344b1b656448e89e84edcd527e4b03aa5476774129eb6ad328ed684f9c1459794a935ec0cc17ce14329 languageName: node linkType: hard @@ -47554,7 +43646,7 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.4, regenerator-runtime@npm:^0.13.9": +"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.9": version: 0.13.11 resolution: "regenerator-runtime@npm:0.13.11" checksum: 10/d493e9e118abef5b099c78170834f18540c4933cedf9bfabc32d3af94abfb59a7907bd7950259cbab0a929ebca7db77301e8024e5121e6482a82f78283dfd20c @@ -47562,9 +43654,9 @@ __metadata: linkType: hard "regenerator-runtime@npm:^0.14.0": - version: 0.14.0 - resolution: "regenerator-runtime@npm:0.14.0" - checksum: 10/6c19495baefcf5fbb18a281b56a97f0197b5f219f42e571e80877f095320afac0bdb31dab8f8186858e6126950068c3f17a1226437881e3e70446ea66751897c + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 10/5db3161abb311eef8c45bcf6565f4f378f785900ed3945acf740a9888c792f75b98ecb77f0775f3bf95502ff423529d23e94f41d80c8256e8fa05ed4b07cf471 languageName: node linkType: hard @@ -47597,43 +43689,28 @@ __metadata: linkType: hard "regex-parser@npm:^2.2.11": - version: 2.2.11 - resolution: "regex-parser@npm:2.2.11" - checksum: 10/78200331ec0cc372302d287a4946c38681eb5fe435453fca572cb53cac0ba579e5eb3b9e25eac24c0c80a555fb3ea7a637814a35da1e9bc88e8819110ae5de24 - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0": - version: 1.5.0 - resolution: "regexp.prototype.flags@npm:1.5.0" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - functions-have-names: "npm:^1.2.3" - checksum: 10/c8229ec3f59f8312248268009cb9bf9145a3982117f747499b994e8efb378ac8b62e812fd88df75225d53cb4879d2bb2fe47b2a50776cba076d8ff71fc0b1629 + version: 2.3.0 + resolution: "regex-parser@npm:2.3.0" + checksum: 10/d82c81bc27db096d93cf3daf1f3bb679784aedac4f4f2841cf976747bbe5bed5bb2e1bf7cda16a95773029282fd910962d47f2c6f229e756e53db4782b79eef7 languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.1": - version: 1.5.1 - resolution: "regexp.prototype.flags@npm:1.5.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - set-function-name: "npm:^2.0.0" - checksum: 10/3fa5610b8e411bbc3a43ddfd13162f3a817beb43155fbd8caa24d4fd0ce2f431a8197541808772a5a06e5946cebfb68464c827827115bde0d11720a92fe2981a +"regex@npm:^4.3.2": + version: 4.4.0 + resolution: "regex@npm:4.4.0" + checksum: 10/0a32dcf2913287f5225a48aff11d26423711734307135c4dde489e71be35939b0d1fc253ddb9d81549e27451a4346a6401e87c10b1f4567fb928ad67279fbe31 languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.2": - version: 1.5.2 - resolution: "regexp.prototype.flags@npm:1.5.2" +"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": + version: 1.5.3 + resolution: "regexp.prototype.flags@npm:1.5.3" dependencies: - call-bind: "npm:^1.0.6" + call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" es-errors: "npm:^1.3.0" - set-function-name: "npm:^2.0.1" - checksum: 10/9fffc01da9c4e12670ff95bc5204364615fcc12d86fc30642765af908675678ebb0780883c874b2dbd184505fb52fa603d80073ecf69f461ce7f56b15d10be9c + set-function-name: "npm:^2.0.2" + checksum: 10/fe17bc4eebbc72945aaf9dd059eb7784a5ca453a67cc4b5b3e399ab08452c9a05befd92063e2c52e7b24d9238c60031656af32dd57c555d1ba6330dbf8c23b43 languageName: node linkType: hard @@ -47651,78 +43728,35 @@ __metadata: languageName: node linkType: hard -"regexpu-core@npm:^5.0.1": - version: 5.0.1 - resolution: "regexpu-core@npm:5.0.1" - dependencies: - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.0.1" - regjsgen: "npm:^0.6.0" - regjsparser: "npm:^0.8.2" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.0.0" - checksum: 10/f88ccf13a31fdd700c4d2039c18eaac65162f3eeace36a75d5a1487ca92c4e460b267c7efc9e2b04422be1035b84fc2e6e8171b6370f2c94cd5e52e2bf763c71 - languageName: node - linkType: hard - -"regexpu-core@npm:^5.3.1": - version: 5.3.2 - resolution: "regexpu-core@npm:5.3.2" +"regexpu-core@npm:^6.1.1": + version: 6.1.1 + resolution: "regexpu-core@npm:6.1.1" dependencies: - "@babel/regjsgen": "npm:^0.8.0" regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.1.0" - regjsparser: "npm:^0.9.1" + regenerate-unicode-properties: "npm:^10.2.0" + regjsgen: "npm:^0.8.0" + regjsparser: "npm:^0.11.0" unicode-match-property-ecmascript: "npm:^2.0.0" unicode-match-property-value-ecmascript: "npm:^2.1.0" - checksum: 10/ed0d7c66d84c633fbe8db4939d084c780190eca11f6920807dfb8ebac59e2676952cd8f2008d9c86ae8cf0463ea5fd12c5cff09ef2ce7d51ee6b420a5eb4d177 - languageName: node - linkType: hard - -"registry-auth-token@npm:^4.0.0": - version: 4.2.1 - resolution: "registry-auth-token@npm:4.2.1" - dependencies: - rc: "npm:^1.2.8" - checksum: 10/d1a5c28c0b1ebe0702d758ea7d000bf26cfc48982321dded81f5681a9e5c1f46368b847f210e7eed34db9c57fdf655bd536a14b2e94d2ba070e6503d6594b19c + checksum: 10/6a7ffb42781cacedd7df3c47c72e2d725401a699855be94a37ece5e29d3f25ab3abdd81d73f2d9d32ebc4d41bd25e3c3cc21e5284203faf19e60943adc55252d languageName: node linkType: hard -"registry-url@npm:^5.0.0": - version: 5.1.0 - resolution: "registry-url@npm:5.1.0" - dependencies: - rc: "npm:^1.2.8" - checksum: 10/bcea86c84a0dbb66467b53187fadebfea79017cddfb4a45cf27530d7275e49082fe9f44301976eb0164c438e395684bcf3dae4819b36ff9d1640d8cc60c73df9 - languageName: node - linkType: hard - -"regjsgen@npm:^0.6.0": - version: 0.6.0 - resolution: "regjsgen@npm:0.6.0" - checksum: 10/bb260bd786748fe44a03b9249b5d9dc2e56e911e8b2b3f75b58fea755f26d4ec378e7ef78880d57008263595ea143940b4a0c4566e28196b96542be3408bfe8e - languageName: node - linkType: hard - -"regjsparser@npm:^0.8.2": - version: 0.8.4 - resolution: "regjsparser@npm:0.8.4" - dependencies: - jsesc: "npm:~0.5.0" - bin: - regjsparser: bin/parser - checksum: 10/b60919be93fa2d0877ec7c5bd87279f8779b83cfa1333b04bae657c2f91e7937060ed992da8a27180be0d657a81996bb76d308f91ed2d9e762332d511c105e7d +"regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "regjsgen@npm:0.8.0" + checksum: 10/b930f03347e4123c917d7b40436b4f87f625b8dd3e705b447ddd44804e4616c3addb7453f0902d6e914ab0446c30e816e445089bb641a4714237fe8141a0ef9d languageName: node linkType: hard -"regjsparser@npm:^0.9.1": - version: 0.9.1 - resolution: "regjsparser@npm:0.9.1" +"regjsparser@npm:^0.11.0": + version: 0.11.2 + resolution: "regjsparser@npm:0.11.2" dependencies: - jsesc: "npm:~0.5.0" + jsesc: "npm:~3.0.2" bin: regjsparser: bin/parser - checksum: 10/be7757ef76e1db10bf6996001d1021048b5fb12f5cb470a99b8cf7f3ff943f0f0e2291c0dcdbb418b458ddc4ac10e48680a822b69ef487a0284c8b6b77beddc3 + checksum: 10/8075eb76d6cde8a3f188696eb18ebf229376944d35e3043f73b889a15156cf539f2801941a5630433060512cbcb2f92f6a194fac44f2e0f1497517e12aa565b3 languageName: node linkType: hard @@ -48061,7 +44095,7 @@ __metadata: languageName: node linkType: hard -"resolve-alpn@npm:^1.2.0": +"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": version: 1.2.1 resolution: "resolve-alpn@npm:1.2.1" checksum: 10/744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec @@ -48222,7 +44256,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:1.22.8, resolve@npm:^1.19.0, resolve@npm:^1.22.0, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.3.3": +"resolve@npm:1.22.8, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.22.4, resolve@npm:^1.3.2, resolve@npm:^1.3.3, resolve@npm:^1.9.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -48235,42 +44269,16 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.3.2, resolve@npm:^1.9.0": - version: 1.22.0 - resolution: "resolve@npm:1.22.0" - dependencies: - is-core-module: "npm:^2.8.1" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/b2f7405d3092f8bb537105b364378698dd0e7428dd3e76a3f00424cdc0bf8a1d85c3f5dab036fd04154e29c8fc221a591697ec699eb1cbd37d9a628b8bb7ccf5 - languageName: node - linkType: hard - -"resolve@npm:^1.1.7, resolve@npm:^1.22.4": - version: 1.22.4 - resolution: "resolve@npm:1.22.4" +"resolve@npm:^2.0.0-next.4, resolve@npm:^2.0.0-next.5": + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" dependencies: is-core-module: "npm:^2.13.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10/5634f87e72888b139a7cb544213504cc0c6dcd82c6f67ce810b4ca6b3367ddb2aeed5f21c9bb6cd8f3115f0b7e6c0980ef25eeb0dcbd188d9590bb5c84d2d253 - languageName: node - linkType: hard - -"resolve@npm:^2.0.0-next.4": - version: 2.0.0-next.4 - resolution: "resolve@npm:2.0.0-next.4" - dependencies: - is-core-module: "npm:^2.9.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/20d5293f5015aa0b65c488ee365f9dfc30b954b04f9074425a6fb738d78fa63825a82ba8574b7ee200af7ebd5e98c41786831d1d4c1612da3cd063980dfa06a3 + checksum: 10/2d6fd28699f901744368e6f2032b4268b4c7b9185fd8beb64f68c93ac6b22e52ae13560ceefc96241a665b985edf9ffd393ae26d2946a7d3a07b7007b7d51e79 languageName: node linkType: hard @@ -48296,7 +44304,8 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.3.3#optional!builtin": +? "resolve@patch:resolve@npm%3A1.22.8#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.3.2#optional!builtin, resolve@patch:resolve@npm%3A^1.3.3#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin" +: version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -48309,42 +44318,16 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.3.2#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": - version: 1.22.0 - resolution: "resolve@patch:resolve@npm%3A1.22.0#optional!builtin::version=1.22.0&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.8.1" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/cb53ccafb067fb04989dbff2ce7186d03f4a55b7283eab91b545d614b336dc509faa5c71210ce77ab1a4b0f7de4ffbccc170febcbeef40bf5a09b9ddb05bf447 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": - version: 1.22.4 - resolution: "resolve@patch:resolve@npm%3A1.22.4#optional!builtin::version=1.22.4&hash=c3c19d" +"resolve@patch:resolve@npm%3A^2.0.0-next.4#optional!builtin, resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" dependencies: is-core-module: "npm:^2.13.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10/13262490c7b0ac54f6397f1d45ee139ebd2e431781e2ff0d9c27bf41648a349a90bc23a3ab2768f0f821efdd2cba08fb85f21288fc0cc01718c03557fbd285bc - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^2.0.0-next.4#optional!builtin": - version: 2.0.0-next.4 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#optional!builtin::version=2.0.0-next.4&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.9.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/27bff19d8219385bb1e271066317e553cff18daa2a19db9598d94ae444417ef3f5aec19e86927872d6cb241d02649cfb35a4c0d9d10ef2afa6325bce8bc8d903 + checksum: 10/05fa778de9d0347c8b889eb7a18f1f06bf0f801b0eb4610b4871a4b2f22e220900cf0ad525e94f990bb8d8921c07754ab2122c0c225ab4cdcea98f36e64fa4c2 languageName: node linkType: hard @@ -48426,25 +44409,14 @@ __metadata: languageName: node linkType: hard -"retry-request@npm:^6.0.0": - version: 6.0.0 - resolution: "retry-request@npm:6.0.0" - dependencies: - debug: "npm:^4.1.1" - extend: "npm:^3.0.2" - checksum: 10/b7e6fa4a201bf285d4439e3d921837e73d0e48c5f17395cbe9f7de040f7d58c204e9bdc88e4b5ec847ff736be3a67ac56e092ee32a5af03c35e4d7f12a1dc1d8 - languageName: node - linkType: hard - "retry-request@npm:^7.0.0": - version: 7.0.1 - resolution: "retry-request@npm:7.0.1" + version: 7.0.2 + resolution: "retry-request@npm:7.0.2" dependencies: "@types/request": "npm:^2.48.8" - debug: "npm:^4.1.1" extend: "npm:^3.0.2" teeny-request: "npm:^9.0.0" - checksum: 10/8c03623ece258886d67d43f21d140f4766d71c27f9fbae492d9aea2f0b5c4e0f0c89177c6f27a71489d5461b612814141ffaca43c136a77fb1d75f204ea5df88 + checksum: 10/8f4c927d41dd575fc460aad7b762fb0a33542097201c3c1a31529ad17fa8af3ac0d2a45bf4a2024d079913e9c2dd431566070fe33321c667ac87ebb400de5917 languageName: node linkType: hard @@ -48479,9 +44451,9 @@ __metadata: linkType: hard "rfdc@npm:^1.2.0, rfdc@npm:^1.3.0": - version: 1.3.0 - resolution: "rfdc@npm:1.3.0" - checksum: 10/76dedd9700cdf132947fde7ce1a8838c9cbb7f3e8f9188af0aaf97194cce745f42094dd2cf547426934cc83252ee2c0e432b2e0222a4415ab0db32de82665c69 + version: 1.4.1 + resolution: "rfdc@npm:1.4.1" + checksum: 10/2f3d11d3d8929b4bfeefc9acb03aae90f971401de0add5ae6c5e38fec14f0405e6a4aad8fdb76344bfdd20c5193110e3750cbbd28ba86d73729d222b6cf4a729 languageName: node linkType: hard @@ -48547,16 +44519,13 @@ __metadata: linkType: hard "roarr@npm:^7.0.4": - version: 7.11.0 - resolution: "roarr@npm:7.11.0" + version: 7.21.1 + resolution: "roarr@npm:7.21.1" dependencies: - boolean: "npm:^3.1.4" - fast-json-stringify: "npm:^2.7.10" fast-printf: "npm:^1.6.9" - fast-safe-stringify: "npm:^2.1.1" - globalthis: "npm:^1.0.2" + safe-stable-stringify: "npm:^2.4.3" semver-compare: "npm:^1.0.0" - checksum: 10/91e45877efc6113e3c9c97b0890cec79ccf9cbed497fda4b8f355174e8c10526a96989e6083fafd618962a9c1639ca372e74e99f107102aca4c8f0a465f483e2 + checksum: 10/304f358b26ae22b5e50e36243d30c52fef04bf7aa781ff38aa87e65ffcb12ea4b78477e964cf1f4f19dd91e05cda5bdd86235e03f98fba05f4d1591277736a66 languageName: node linkType: hard @@ -48575,8 +44544,8 @@ __metadata: linkType: hard "rollup@npm:^2.43.1": - version: 2.79.1 - resolution: "rollup@npm:2.79.1" + version: 2.79.2 + resolution: "rollup@npm:2.79.2" dependencies: fsevents: "npm:~2.3.2" dependenciesMeta: @@ -48584,31 +44553,33 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10/df087b701304432f30922bbee5f534ab189aa6938bd383b5686c03147e0d00cd1789ea10a462361326ce6b6ebe448ce272ad3f3cc40b82eeb3157df12f33663c - languageName: node - linkType: hard - -"rollup@npm:^4.13.0": - version: 4.18.1 - resolution: "rollup@npm:4.18.1" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.18.1" - "@rollup/rollup-android-arm64": "npm:4.18.1" - "@rollup/rollup-darwin-arm64": "npm:4.18.1" - "@rollup/rollup-darwin-x64": "npm:4.18.1" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.18.1" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.18.1" - "@rollup/rollup-linux-arm64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-arm64-musl": "npm:4.18.1" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.18.1" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-s390x-gnu": "npm:4.18.1" - "@rollup/rollup-linux-x64-gnu": "npm:4.18.1" - "@rollup/rollup-linux-x64-musl": "npm:4.18.1" - "@rollup/rollup-win32-arm64-msvc": "npm:4.18.1" - "@rollup/rollup-win32-ia32-msvc": "npm:4.18.1" - "@rollup/rollup-win32-x64-msvc": "npm:4.18.1" - "@types/estree": "npm:1.0.5" + checksum: 10/095ba0a82811b1866a76d826987743278db0a87c45092656986bfff490326b66187d5f9ff0c24cf8d5682bc470aa00c36654e0044d6b6335ac0c1201b8280880 + languageName: node + linkType: hard + +"rollup@npm:^4.20.0": + version: 4.24.4 + resolution: "rollup@npm:4.24.4" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.24.4" + "@rollup/rollup-android-arm64": "npm:4.24.4" + "@rollup/rollup-darwin-arm64": "npm:4.24.4" + "@rollup/rollup-darwin-x64": "npm:4.24.4" + "@rollup/rollup-freebsd-arm64": "npm:4.24.4" + "@rollup/rollup-freebsd-x64": "npm:4.24.4" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.24.4" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.24.4" + "@rollup/rollup-linux-arm64-gnu": "npm:4.24.4" + "@rollup/rollup-linux-arm64-musl": "npm:4.24.4" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.24.4" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.24.4" + "@rollup/rollup-linux-s390x-gnu": "npm:4.24.4" + "@rollup/rollup-linux-x64-gnu": "npm:4.24.4" + "@rollup/rollup-linux-x64-musl": "npm:4.24.4" + "@rollup/rollup-win32-arm64-msvc": "npm:4.24.4" + "@rollup/rollup-win32-ia32-msvc": "npm:4.24.4" + "@rollup/rollup-win32-x64-msvc": "npm:4.24.4" + "@types/estree": "npm:1.0.6" fsevents: "npm:~2.3.2" dependenciesMeta: "@rollup/rollup-android-arm-eabi": @@ -48619,6 +44590,10 @@ __metadata: optional: true "@rollup/rollup-darwin-x64": optional: true + "@rollup/rollup-freebsd-arm64": + optional: true + "@rollup/rollup-freebsd-x64": + optional: true "@rollup/rollup-linux-arm-gnueabihf": optional: true "@rollup/rollup-linux-arm-musleabihf": @@ -48647,7 +44622,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10/7a5f110d216e8599dc3cb11cf570316d989abae00785d99c2bcb6027287fe60d2eaed70e457d88a036622e7fc67e8db6e730d3c784aa90a258bd4c020676ad44 + checksum: 10/a8ffde17d7cd5d9eaaf91bb025de83329b034771254d34b977df3f294e0992f6d89a444a0c8e9d73c8721d60cedf5be32fa8bd6f157874700bb8043c61ca660a languageName: node linkType: hard @@ -48770,43 +44745,7 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-array-concat@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.0" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10/f43cb98fe3b566327d0c09284de2b15fb85ae964a89495c1b1a5d50c7c8ed484190f4e5e71aacc167e16231940079b326f2c0807aea633d47cc7322f40a6b57f - languageName: node - linkType: hard - -"safe-array-concat@npm:^1.0.1": - version: 1.0.1 - resolution: "safe-array-concat@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10/44f073d85ca12458138e6eff103ac63cec619c8261b6579bd2fa3ae7b6516cf153f02596d68e40c5bbe322a29c930017800efff652734ddcb8c0f33b2a71f89c - languageName: node - linkType: hard - -"safe-array-concat@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-array-concat@npm:1.1.0" - dependencies: - call-bind: "npm:^1.0.5" - get-intrinsic: "npm:^1.2.2" - has-symbols: "npm:^1.0.3" - isarray: "npm:^2.0.5" - checksum: 10/41ac35ce46c44e2e8637b1805b0697d5269507779e3082b7afb92c01605fd73ab813bbc799510c56e300cfc941b1447fd98a338205db52db7fd1322ab32d7c9f - languageName: node - linkType: hard - -"safe-array-concat@npm:^1.1.2": +"safe-array-concat@npm:^1.0.0, safe-array-concat@npm:^1.1.2": version: 1.1.2 resolution: "safe-array-concat@npm:1.1.2" dependencies: @@ -48832,17 +44771,6 @@ __metadata: languageName: node linkType: hard -"safe-regex-test@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-regex-test@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - is-regex: "npm:^1.1.4" - checksum: 10/c7248dfa07891aa634c8b9c55da696e246f8589ca50e7fd14b22b154a106e83209ddf061baf2fa45ebfbd485b094dc7297325acfc50724de6afe7138451b42a9 - languageName: node - linkType: hard - "safe-regex-test@npm:^1.0.3": version: 1.0.3 resolution: "safe-regex-test@npm:1.0.3" @@ -48879,20 +44807,13 @@ __metadata: languageName: node linkType: hard -"safe-stable-stringify@npm:2.5.0": +"safe-stable-stringify@npm:2.5.0, safe-stable-stringify@npm:^2.3.1, safe-stable-stringify@npm:^2.4.3": version: 2.5.0 resolution: "safe-stable-stringify@npm:2.5.0" checksum: 10/2697fa186c17c38c3ca5309637b4ac6de2f1c3d282da27cd5e1e3c88eca0fb1f9aea568a6aabdf284111592c8782b94ee07176f17126031be72ab1313ed46c5c languageName: node linkType: hard -"safe-stable-stringify@npm:^2.3.1": - version: 2.3.1 - resolution: "safe-stable-stringify@npm:2.3.1" - checksum: 10/8a6ed4e5fb80694970f1939538518c44a59c71c74305e12b5964cbe3850636212eddac881da1f676b0232015213676e07750fe75bc402afbfe29851c8b52381e - languageName: node - linkType: hard - "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -49049,7 +44970,14 @@ __metadata: languageName: node linkType: hard -"sax@npm:>=0.6.0, sax@npm:^1.2.4, sax@npm:~1.2.4": +"sax@npm:>=0.6.0, sax@npm:^1.2.4": + version: 1.4.1 + resolution: "sax@npm:1.4.1" + checksum: 10/b1c784b545019187b53a0c28edb4f6314951c971e2963a69739c6ce222bfbc767e54d320e689352daba79b7d5e06d22b5d7113b99336219d6e93718e2f99d335 + languageName: node + linkType: hard + +"sax@npm:~1.2.4": version: 1.2.4 resolution: "sax@npm:1.2.4" checksum: 10/09b79ff6dc09689a24323352117c94593c69db348997b2af0edbd82fa08aba47d778055bf9616b57285bb73d25d790900c044bf631a8f10c8252412e3f3fe5dd @@ -49091,16 +45019,7 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10/0c4557aa37bafca44ff21dc0ea7c92e2dbcb298bc62eae92b29a39b029134f02fb23917d6ebc8b1fa536b4184934314c20d8864d156a9f6357f3398aaf7bfda8 - languageName: node - linkType: hard - -"scheduler@npm:^0.23.2": +"scheduler@npm:^0.23.0, scheduler@npm:^0.23.2": version: 0.23.2 resolution: "scheduler@npm:0.23.2" dependencies: @@ -49131,7 +45050,7 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^3.0.0, schema-utils@npm:^3.2.0": +"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.1, schema-utils@npm:^3.2.0": version: 3.3.0 resolution: "schema-utils@npm:3.3.0" dependencies: @@ -49142,30 +45061,7 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^3.1.1": - version: 3.1.1 - resolution: "schema-utils@npm:3.1.1" - dependencies: - "@types/json-schema": "npm:^7.0.8" - ajv: "npm:^6.12.5" - ajv-keywords: "npm:^3.5.2" - checksum: 10/cfcf991f108797719d8054281272cf508543d6e092e273129fca84d569baafa5344bc23ec98cf2274943f6ed69851ced4fd0ae24471601f3f4d69c00fac47be6 - languageName: node - linkType: hard - -"schema-utils@npm:^4.0.0": - version: 4.0.0 - resolution: "schema-utils@npm:4.0.0" - dependencies: - "@types/json-schema": "npm:^7.0.9" - ajv: "npm:^8.8.0" - ajv-formats: "npm:^2.1.1" - ajv-keywords: "npm:^5.0.0" - checksum: 10/b1bbf840a608be6a2475a3955ff8f7c8fc7be6cdd63154ee26a487530e2b7b557b316f21797b9fe63e8e612b0c377c42c6096e281993ddbda0134fd312ce449c - languageName: node - linkType: hard - -"schema-utils@npm:^4.2.0": +"schema-utils@npm:^4.0.0, schema-utils@npm:^4.2.0": version: 4.2.0 resolution: "schema-utils@npm:4.2.0" dependencies: @@ -49203,7 +45099,7 @@ __metadata: languageName: node linkType: hard -"secp256k1@npm:4.0.3, secp256k1@npm:^4.0.1": +"secp256k1@npm:4.0.3": version: 4.0.3 resolution: "secp256k1@npm:4.0.3" dependencies: @@ -49215,6 +45111,18 @@ __metadata: languageName: node linkType: hard +"secp256k1@npm:^4.0.1": + version: 4.0.4 + resolution: "secp256k1@npm:4.0.4" + dependencies: + elliptic: "npm:^6.5.7" + node-addon-api: "npm:^5.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.2.0" + checksum: 10/45000f348c853df7c1e2b67c48efb062ae78c0620ab1a5cfb02fa20d3aad39c641f4e7a18b3de3b54a7c0cc1e0addeb8ecd9d88bc332e92df17a92b60c36122a + languageName: node + linkType: hard + "secure-json-parse@npm:^2.7.0": version: 2.7.0 resolution: "secure-json-parse@npm:2.7.0" @@ -49255,16 +45163,7 @@ __metadata: languageName: node linkType: hard -"selfsigned@npm:^2.1.1": - version: 2.1.1 - resolution: "selfsigned@npm:2.1.1" - dependencies: - node-forge: "npm:^1" - checksum: 10/6005206e0d005448274aceceaded5195b944f67a42b72d212a6169d2e5f4bdc87c15a3fe45732c544db8c7175702091aaf95403ad6632585294a6ec8cca63638 - languageName: node - linkType: hard - -"selfsigned@npm:^2.4.1": +"selfsigned@npm:^2.1.1, selfsigned@npm:^2.4.1": version: 2.4.1 resolution: "selfsigned@npm:2.4.1" dependencies: @@ -49288,15 +45187,6 @@ __metadata: languageName: node linkType: hard -"semver-diff@npm:^3.1.1": - version: 3.1.1 - resolution: "semver-diff@npm:3.1.1" - dependencies: - semver: "npm:^6.3.0" - checksum: 10/8bbe5a5d7add2d5e51b72314a9215cd294d71f41cdc2bf6bd59ee76411f3610b576172896f1d191d0d7294cb9f2f847438d2ee158adacc0c224dca79052812fe - languageName: node - linkType: hard - "semver-parser@npm:4.1.4": version: 4.1.4 resolution: "semver-parser@npm:4.1.4" @@ -49305,13 +45195,11 @@ __metadata: linkType: hard "semver@npm:>=7.5.2": - version: 7.5.4 - resolution: "semver@npm:7.5.4" - dependencies: - lru-cache: "npm:^6.0.0" + version: 7.6.3 + resolution: "semver@npm:7.6.3" bin: semver: bin/semver.js - checksum: 10/985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac + checksum: 10/36b1fbe1a2b6f873559cd57b238f1094a053dbfd997ceeb8757d79d1d2089c56d1321b9f1069ce263dc64cfa922fa1d2ad566b39426fe1ac6c723c1487589e10 languageName: node linkType: hard @@ -49394,7 +45282,7 @@ __metadata: languageName: node linkType: hard -"serialize-javascript@npm:6.0.0, serialize-javascript@npm:^6.0.0": +"serialize-javascript@npm:6.0.0": version: 6.0.0 resolution: "serialize-javascript@npm:6.0.0" dependencies: @@ -49412,16 +45300,7 @@ __metadata: languageName: node linkType: hard -"serialize-javascript@npm:^6.0.1": - version: 6.0.1 - resolution: "serialize-javascript@npm:6.0.1" - dependencies: - randombytes: "npm:^2.1.0" - checksum: 10/f756b1ff34b655b2183c64dd6683d28d4d9b9a80284b264cac9fd421c73890491eafd6c5c2bbe93f1f21bf78b572037c5a18d24b044c317ee1c9dc44d22db94c - languageName: node - linkType: hard - -"serialize-javascript@npm:^6.0.2": +"serialize-javascript@npm:^6.0.0, serialize-javascript@npm:^6.0.1, serialize-javascript@npm:^6.0.2": version: 6.0.2 resolution: "serialize-javascript@npm:6.0.2" dependencies: @@ -49445,15 +45324,15 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:1.15.0": - version: 1.15.0 - resolution: "serve-static@npm:1.15.0" +"serve-static@npm:1.16.0": + version: 1.16.0 + resolution: "serve-static@npm:1.16.0" dependencies: encodeurl: "npm:~1.0.2" escape-html: "npm:~1.0.3" parseurl: "npm:~1.3.3" send: "npm:0.18.0" - checksum: 10/699b2d4c29807a51d9b5e0f24955346911437aebb0178b3c4833ad30d3eca93385ff9927254f5c16da345903cad39d9cd4a532198c95a5129cc4ed43911b15a4 + checksum: 10/29a01f67e8c64a359d49dd0c46bc95bb4aa99781f97845dccbf0c8cd0284c5fd79ad7fb9433a36fac4b6c58b577d3eab314a379142412413b8b5cd73be3cd551 languageName: node linkType: hard @@ -49490,46 +45369,35 @@ __metadata: linkType: hard "set-cookie-parser@npm:^2.4.1": - version: 2.7.0 - resolution: "set-cookie-parser@npm:2.7.0" - checksum: 10/5c0a197c022d614b3168efbb27a1e81c6eb97a07f1502780648be7483a6bada38c4e516f3d168769e7e3e819d431efdf7b659dcb450196bb7e2594e6a11a2dd7 - languageName: node - linkType: hard - -"set-function-length@npm:^1.1.1": - version: 1.1.1 - resolution: "set-function-length@npm:1.1.1" - dependencies: - define-data-property: "npm:^1.1.1" - get-intrinsic: "npm:^1.2.1" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/745ed1d7dc69a6185e0820082fe73838ab3dfd01e75cce83a41e4c1d68bbf34bc5fb38f32ded542ae0b557536b5d2781594499b5dcd19e7db138e06292a76c7b + version: 2.7.1 + resolution: "set-cookie-parser@npm:2.7.1" + checksum: 10/c92b1130032693342bca13ea1b1bc93967ab37deec4387fcd8c2a843c0ef2fd9a9f3df25aea5bb3976cd05a91c2cf4632dd6164d6e1814208fb7d7e14edd42b4 languageName: node linkType: hard "set-function-length@npm:^1.2.1": - version: 1.2.1 - resolution: "set-function-length@npm:1.2.1" + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" dependencies: - define-data-property: "npm:^1.1.2" + define-data-property: "npm:^1.1.4" es-errors: "npm:^1.3.0" function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.3" + get-intrinsic: "npm:^1.2.4" gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.1" - checksum: 10/9ab1d200149574ab27c1a7acae56d6235e02568fc68655fe8afe63e4e02ccad3c27665f55c32408bd1ff40705939dbb7539abfb9c3a07fda27ecad1ab9e449f5 + has-property-descriptors: "npm:^1.0.2" + checksum: 10/505d62b8e088468917ca4e3f8f39d0e29f9a563b97dbebf92f4bd2c3172ccfb3c5b8e4566d5fcd00784a00433900e7cb8fbc404e2dbd8c3818ba05bb9d4a8a6d languageName: node linkType: hard -"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": - version: 2.0.1 - resolution: "set-function-name@npm:2.0.1" +"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": + version: 2.0.2 + resolution: "set-function-name@npm:2.0.2" dependencies: - define-data-property: "npm:^1.0.1" + define-data-property: "npm:^1.1.4" + es-errors: "npm:^1.3.0" functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + has-property-descriptors: "npm:^1.0.2" + checksum: 10/c7614154a53ebf8c0428a6c40a3b0b47dac30587c1a19703d1b75f003803f73cdfa6a93474a9ba678fa565ef5fbddc2fae79bca03b7d22ab5fd5163dbe571a74 languageName: node linkType: hard @@ -49656,14 +45524,7 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.6.1": - version: 1.7.3 - resolution: "shell-quote@npm:1.7.3" - checksum: 10/0ab00c37c84ea3ac13d5f0d45c6850701254fd1d6653d0604a48973ba3911ad0dd9f414672253a01f68fe48bb651a7138317ed4543b75ce4192c1d610e453d4c - languageName: node - linkType: hard - -"shell-quote@npm:^1.7.3, shell-quote@npm:^1.8.1": +"shell-quote@npm:^1.6.1, shell-quote@npm:^1.7.3, shell-quote@npm:^1.8.1": version: 1.8.1 resolution: "shell-quote@npm:1.8.1" checksum: 10/af19ab5a1ec30cb4b2f91fd6df49a7442d5c4825a2e269b3712eded10eedd7f9efeaab96d57829880733fc55bcdd8e9b1d8589b4befb06667c731d08145e274d @@ -49697,26 +45558,20 @@ __metadata: linkType: hard "shiki@npm:^1.9.0": - version: 1.9.0 - resolution: "shiki@npm:1.9.0" - dependencies: - "@shikijs/core": "npm:1.9.0" - checksum: 10/ce5648b4e1a5e5e81e54e01ec9dc94cf324530f460058f29f1e5e464dbf096fee2194fbef38b29128a747f783f9134531991316b01ed168f65d0617dabf84c33 - languageName: node - linkType: hard - -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" + version: 1.22.2 + resolution: "shiki@npm:1.22.2" dependencies: - call-bind: "npm:^1.0.0" - get-intrinsic: "npm:^1.0.2" - object-inspect: "npm:^1.9.0" - checksum: 10/c4998d9fc530b0e75a7fd791ad868fdc42846f072734f9080ff55cc8dc7d3899abcda24fd896aa6648c3ab7021b4bb478073eb4f44dfd55bce9714bc1a7c5d45 + "@shikijs/core": "npm:1.22.2" + "@shikijs/engine-javascript": "npm:1.22.2" + "@shikijs/engine-oniguruma": "npm:1.22.2" + "@shikijs/types": "npm:1.22.2" + "@shikijs/vscode-textmate": "npm:^9.3.0" + "@types/hast": "npm:^3.0.4" + checksum: 10/5da1925609662cc773a807c3e9223805dc3323eaf2081aaf6633f3c20846485cab1429601f0a8a4a4aab83c80382b5b03ea9c94edffd3db968ab68de2484315c languageName: node linkType: hard -"side-channel@npm:^1.0.6": +"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": version: 1.0.6 resolution: "side-channel@npm:1.0.6" dependencies: @@ -50047,13 +45902,13 @@ __metadata: linkType: hard "socks-proxy-agent@npm:^6.0.0": - version: 6.1.1 - resolution: "socks-proxy-agent@npm:6.1.1" + version: 6.2.1 + resolution: "socks-proxy-agent@npm:6.2.1" dependencies: agent-base: "npm:^6.0.2" - debug: "npm:^4.3.1" - socks: "npm:^2.6.1" - checksum: 10/53fb7d34bf3e5ed9cf4de73bf5c18b351d75c4a8757a0c0e384c2a7c86adf688e5f5e8f72eee7bc6c01ff619458f621ccf9d172bc986adb05f10fa0c9599c39e + debug: "npm:^4.3.3" + socks: "npm:^2.6.2" + checksum: 10/554749ba3bdba0742ec36493a907261c116dd0dafcd618ea5babdfc90ce5a5ae648d4ee4d2e26e7184afd854973d282372ce0af63e1fc6412bb9fa1a2b1f2d45 languageName: node linkType: hard @@ -50068,44 +45923,33 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^8.0.1": - version: 8.0.2 - resolution: "socks-proxy-agent@npm:8.0.2" +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" dependencies: - agent-base: "npm:^7.0.2" + agent-base: "npm:^7.1.1" debug: "npm:^4.3.4" - socks: "npm:^2.7.1" - checksum: 10/ea727734bd5b2567597aa0eda14149b3b9674bb44df5937bbb9815280c1586994de734d965e61f1dd45661183d7b41f115fb9e432d631287c9063864cfcc2ecc + socks: "npm:^2.8.3" + checksum: 10/c8e7c2b398338b49a0a0f4d2bae5c0602aeeca6b478b99415927b6c5db349ca258448f2c87c6958ebf83eea17d42cbc5d1af0bfecb276cac10b9658b0f07f7d7 languageName: node linkType: hard -"socks@npm:^2.6.1, socks@npm:^2.6.2": - version: 2.6.2 - resolution: "socks@npm:2.6.2" +"socks@npm:^2.6.2, socks@npm:^2.8.3": + version: 2.8.3 + resolution: "socks@npm:2.8.3" dependencies: - ip: "npm:^1.1.5" + ip-address: "npm:^9.0.5" smart-buffer: "npm:^4.2.0" - checksum: 10/820232ddaeb847ef33312c429fb51aae03e1b774917f189ef491048bb4c4d7742924064f72d7730e3aa08a3ddb6cc2bdcd5949d34c35597e4f6a66eefd994f14 - languageName: node - linkType: hard - -"socks@npm:^2.7.1": - version: 2.7.1 - resolution: "socks@npm:2.7.1" - dependencies: - ip: "npm:^2.0.0" - smart-buffer: "npm:^4.2.0" - checksum: 10/5074f7d6a13b3155fa655191df1c7e7a48ce3234b8ccf99afa2ccb56591c195e75e8bb78486f8e9ea8168e95a29573cbaad55b2b5e195160ae4d2ea6811ba833 + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb languageName: node linkType: hard "sodium-native@npm:^4.0.10": - version: 4.1.1 - resolution: "sodium-native@npm:4.1.1" + version: 4.3.0 + resolution: "sodium-native@npm:4.3.0" dependencies: - node-gyp: "npm:latest" node-gyp-build: "npm:^4.8.0" - checksum: 10/cb30564f07c55b2a7f8016b4df16fd2b0ede10981c6d0b4dfe20ef884f702d55884d2128f22da1ffe9a378aec43a4f0c5539aadf23c4fd3fabc5d05ead1301d2 + checksum: 10/90f38ba3b0b883e2530f1b190cf5863bd33e58200f58eaef696c040d9ed34ed0f5efed484e4ee672304005eec2fceaae24c92e7bd8ca00c0cdd6587d7c99273f languageName: node linkType: hard @@ -50197,21 +46041,30 @@ __metadata: languageName: node linkType: hard +"sonic-boom@npm:^3.7.0": + version: 3.8.1 + resolution: "sonic-boom@npm:3.8.1" + dependencies: + atomic-sleep: "npm:^1.0.0" + checksum: 10/e03c9611e43fa81132cd2ce0fe4eb7fbcf19db267e9dec20dc6c586f82465c9c906e91a02f72150c740463ad9335536ea2131850307aaa6686d1fb5d4cc4be3e + languageName: node + linkType: hard + "sonic-boom@npm:^4.0.1": - version: 4.1.0 - resolution: "sonic-boom@npm:4.1.0" + version: 4.2.0 + resolution: "sonic-boom@npm:4.2.0" dependencies: atomic-sleep: "npm:^1.0.0" - checksum: 10/7d42eb31a79e5927f268217b13206ab39c135c95f5e4b9a68745d9f4fdede0c291216c7594947028a7fdcf850342aa3bc49d0f5211618bfeff06dccdbc1bdb4e + checksum: 10/385ef7fb5ea5976c1d2a1fef0b6df8df6b7caba8696d2d67f689d60c05e3ea2d536752ce7e1c69b9fad844635f1036d07c446f8e8149f5c6a80e0040a455b310 languageName: node linkType: hard "sort-keys@npm:^5.0.0": - version: 5.0.0 - resolution: "sort-keys@npm:5.0.0" + version: 5.1.0 + resolution: "sort-keys@npm:5.1.0" dependencies: is-plain-obj: "npm:^4.0.0" - checksum: 10/9c0b7a468312075be03770b260b2cc0e5d55149025e564edaed41c9ff619199698aad6712a6fe4bbc75c541efb081276ac6bbd4cf2723d742f272f7a8fe354f5 + checksum: 10/d14936082b2fd1efbddb42c1f7ece39acf8c2e54e4bc65b92ee634ffc7a4a955bdfb334f28ce1273c947611c11f8a73711d147dc43922172a782eb4d71b8c3a2 languageName: node linkType: hard @@ -50245,10 +46098,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2": - version: 1.0.2 - resolution: "source-map-js@npm:1.0.2" - checksum: 10/38e2d2dd18d2e331522001fc51b54127ef4a5d473f53b1349c5cca2123562400e0986648b52e9407e348eaaed53bce49248b6e2641e6d793ca57cb2c360d6d51 +"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0, source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10/ff9d8c8bf096d534a5b7707e0382ef827b4dd360a577d3f34d2b9f48e12c9d230b5747974ee7c607f0df65113732711bb701fe9ece3c7edbd43cb2294d707df3 languageName: node linkType: hard @@ -50384,6 +46237,13 @@ __metadata: languageName: node linkType: hard +"space-separated-tokens@npm:^2.0.0": + version: 2.0.2 + resolution: "space-separated-tokens@npm:2.0.2" + checksum: 10/202e97d7ca1ba0758a0aa4fe226ff98142073bcceeff2da3aad037968878552c3bbce3b3231970025375bbba5aee00c5b8206eda408da837ab2dc9c0f26be990 + languageName: node + linkType: hard + "spark-md5@npm:3.0.2": version: 3.0.2 resolution: "spark-md5@npm:3.0.2" @@ -50392,9 +46252,9 @@ __metadata: linkType: hard "spawn-command@npm:^0.0.2-1": - version: 0.0.2-1 - resolution: "spawn-command@npm:0.0.2-1" - checksum: 10/f59fd2f16c8ffe46afda588134697ba4f1e2032b216baf7c134a66a0b3d48df323ee46c367f273eb7f7bb8c68b8296ca6b49aac6530cedb4b6785302d238c411 + version: 0.0.2 + resolution: "spawn-command@npm:0.0.2" + checksum: 10/f13e8c3c63abd4a0b52fb567eba5f7940d480c5ed3ec61781d38a1850f179b1196c39e6efa2bbd301f82c1bf1cd7807abc8fbd8fc8e44bcaa3975a124c0d1657 languageName: node linkType: hard @@ -50427,19 +46287,19 @@ __metadata: linkType: hard "spdx-correct@npm:^3.0.0": - version: 3.1.1 - resolution: "spdx-correct@npm:3.1.1" + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" dependencies: spdx-expression-parse: "npm:^3.0.0" spdx-license-ids: "npm:^3.0.0" - checksum: 10/688e028c3ca6090d1b516272a2dd60b30f163cbf166295ac4b8078fd74f524365cd996e2b18cabdaa41647aa806e117604aa3b3216f69076a554999913d09d47 + checksum: 10/cc2e4dbef822f6d12142116557d63f5facf3300e92a6bd24e907e4865e17b7e1abd0ee6b67f305cae6790fc2194175a24dc394bfcc01eea84e2bdad728e9ae9a languageName: node linkType: hard "spdx-exceptions@npm:^2.1.0": - version: 2.3.0 - resolution: "spdx-exceptions@npm:2.3.0" - checksum: 10/cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10/bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 languageName: node linkType: hard @@ -50454,9 +46314,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.11 - resolution: "spdx-license-ids@npm:3.0.11" - checksum: 10/aed256585883aef483590e15d8352b6b787f01cc7e3e120e10457383d574b2cd314d8325854f5f831733ee2e257a6010a57adc93fc166648cc3bc9ab7cd1ea6b + version: 3.0.20 + resolution: "spdx-license-ids@npm:3.0.20" + checksum: 10/30e566ea74b04232c64819d1f5313c00d92e9c73d054541650331fc794499b3bcc4991bcd90fa3c2fc4d040006f58f63104706255266e87a9d452e6574afc60c languageName: node linkType: hard @@ -50531,17 +46391,17 @@ __metadata: languageName: node linkType: hard -"split2@npm:^4.0.0": +"split2@npm:^4.0.0, split2@npm:^4.1.0": version: 4.2.0 resolution: "split2@npm:4.2.0" checksum: 10/09bbefc11bcf03f044584c9764cd31a252d8e52cea29130950b26161287c11f519807c5e54bd9e5804c713b79c02cefe6a98f4688630993386be353e03f534ab languageName: node linkType: hard -"split2@npm:^4.1.0": - version: 4.1.0 - resolution: "split2@npm:4.1.0" - checksum: 10/9d2dea7f2b2b788e2921b16ca4dd4e4ecaf334e401ce28c6cbf6efd66f22400e8df68b297a9d5b8ea6d1cba4d31647c45cdc5e4b4c6c3c7b01095dd35ab50dc9 +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb languageName: node linkType: hard @@ -50573,40 +46433,23 @@ __metadata: linkType: hard "ssh2@npm:^1.11.0": - version: 1.14.0 - resolution: "ssh2@npm:1.14.0" + version: 1.16.0 + resolution: "ssh2@npm:1.16.0" dependencies: asn1: "npm:^0.2.6" bcrypt-pbkdf: "npm:^1.0.2" - cpu-features: "npm:~0.0.8" - nan: "npm:^2.17.0" + cpu-features: "npm:~0.0.10" + nan: "npm:^2.20.0" dependenciesMeta: cpu-features: optional: true nan: optional: true - checksum: 10/95f1114f26a6b5bfb94c14de1513e37207bcffb096e8b315faa2b31539e7c8f98071e6fc0e3fd709d685b55ebc74b0206edc6ae5a4df833991641f02fdc863e2 + checksum: 10/0951c22d9c5a0e3b89a8e5ae890ebcbce9f1f94dbed37d1490e4e48e26bc8b074fa81f202ee57b708e31b5f33033f4c870b92047f4f02b6bc26c32225b01d84c languageName: node linkType: hard -"ssh2@npm:^1.4.0": - version: 1.6.0 - resolution: "ssh2@npm:1.6.0" - dependencies: - asn1: "npm:^0.2.4" - bcrypt-pbkdf: "npm:^1.0.2" - cpu-features: "npm:0.0.2" - nan: "npm:^2.15.0" - dependenciesMeta: - cpu-features: - optional: true - nan: - optional: true - checksum: 10/954acc2e9315774127610c029f9967d07157ab8ba26902b5c9964b3957d2e3d6cfc7a12817c5463056010721408884738314b71470b70f213580d2a0877f595f - languageName: node - linkType: hard - -"sshpk@npm:1.17.0, sshpk@npm:^1.7.0": +"sshpk@npm:1.17.0": version: 1.17.0 resolution: "sshpk@npm:1.17.0" dependencies: @@ -50627,16 +46470,28 @@ __metadata: languageName: node linkType: hard -"ssri@npm:^10.0.0": - version: 10.0.2 - resolution: "ssri@npm:10.0.2" +"sshpk@npm:^1.7.0": + version: 1.18.0 + resolution: "sshpk@npm:1.18.0" dependencies: - minipass: "npm:^4.0.0" - checksum: 10/1e6cc97576946bd1ea8f65339b77fa4374a3f8f87b3555d06da1d2140929558bf16c4018b504aeb1419325a9c87c1f4319ea64bea71cdc7a11f24863aa84f8d6 + asn1: "npm:~0.2.3" + assert-plus: "npm:^1.0.0" + bcrypt-pbkdf: "npm:^1.0.0" + dashdash: "npm:^1.12.0" + ecc-jsbn: "npm:~0.1.1" + getpass: "npm:^0.1.1" + jsbn: "npm:~0.1.0" + safer-buffer: "npm:^2.0.2" + tweetnacl: "npm:~0.14.0" + bin: + sshpk-conv: bin/sshpk-conv + sshpk-sign: bin/sshpk-sign + sshpk-verify: bin/sshpk-verify + checksum: 10/858339d43e3c6b6a848772a66f69442ce74f1a37655d9f35ba9d1f85329499ff0000af9f8ab83dbb39ad24c0c370edabe0be1e39863f70c6cded9924b8458c34 languageName: node linkType: hard -"ssri@npm:^10.0.6": +"ssri@npm:^10.0.0, ssri@npm:^10.0.6": version: 10.0.6 resolution: "ssri@npm:10.0.6" dependencies: @@ -50655,11 +46510,11 @@ __metadata: linkType: hard "ssri@npm:^9.0.0": - version: 9.0.0 - resolution: "ssri@npm:9.0.0" + version: 9.0.1 + resolution: "ssri@npm:9.0.1" dependencies: minipass: "npm:^3.1.1" - checksum: 10/9c72209233884792189e861cc2d83674a0358ce87b6b96d0329c588938c3c4bdb1e7cd8289516e36cdfdc2a21d5a93556ce993d712b5ca6cca397a8c3ae5151d + checksum: 10/7638a61e91432510718e9265d48d0438a17d53065e5184f1336f234ef6aa3479663942e41e97df56cda06bb24d9d0b5ef342c10685add3cac7267a82d7fa6718 languageName: node linkType: hard @@ -50693,7 +46548,7 @@ __metadata: languageName: node linkType: hard -"stack-utils@npm:^2.0.2": +"stack-utils@npm:^2.0.2, stack-utils@npm:^2.0.3, stack-utils@npm:^2.0.4": version: 2.0.6 resolution: "stack-utils@npm:2.0.6" dependencies: @@ -50702,15 +46557,6 @@ __metadata: languageName: node linkType: hard -"stack-utils@npm:^2.0.3, stack-utils@npm:^2.0.4": - version: 2.0.5 - resolution: "stack-utils@npm:2.0.5" - dependencies: - escape-string-regexp: "npm:^2.0.0" - checksum: 10/a6d64e5dd24d321289ebefdff2e210ece75fdf20dbcdb702b86da1f7b730743fae3e9337adae4a5cc00d4970d748ff758387df3ea7c71c45b466c43c7359bc00 - languageName: node - linkType: hard - "stackframe@npm:^1.3.4": version: 1.3.4 resolution: "stackframe@npm:1.3.4" @@ -50779,6 +46625,15 @@ __metadata: languageName: node linkType: hard +"static-eval@npm:2.0.2": + version: 2.0.2 + resolution: "static-eval@npm:2.0.2" + dependencies: + escodegen: "npm:^1.8.1" + checksum: 10/2e2faf1b23bad5d9d5b2407b18945c7b97f8706b6d65f06bb3583a2d4fd1994cf5890c5779a1bfa2a02905dc860e077e4f045d7413d289d8993f605758f8992f + languageName: node + linkType: hard + "static-extend@npm:^0.1.1": version: 0.1.2 resolution: "static-extend@npm:0.1.2" @@ -50885,6 +46740,15 @@ __metadata: languageName: node linkType: hard +"stream-length@npm:^1.0.2": + version: 1.0.2 + resolution: "stream-length@npm:1.0.2" + dependencies: + bluebird: "npm:^2.6.2" + checksum: 10/676c8c4eb86c9a3398096bc9c809cd9a61bb6a10f6d731ded1d350a93c49d2496d9a9b0185308b84accc4d97d4e37cecd0b9bc3b3928fa66310821eec1e2fb65 + languageName: node + linkType: hard + "stream-meter@npm:^1.0.4": version: 1.0.4 resolution: "stream-meter@npm:1.0.4" @@ -50894,10 +46758,10 @@ __metadata: languageName: node linkType: hard -"stream-shift@npm:^1.0.0": - version: 1.0.1 - resolution: "stream-shift@npm:1.0.1" - checksum: 10/59b82b44b29ec3699b5519a49b3cedcc6db58c72fb40c04e005525dfdcab1c75c4e0c180b923c380f204bed78211b9bad8faecc7b93dece4d004c3f6ec75737b +"stream-shift@npm:^1.0.2": + version: 1.0.3 + resolution: "stream-shift@npm:1.0.3" + checksum: 10/a24c0a3f66a8f9024bd1d579a533a53be283b4475d4e6b4b3211b964031447bdf6532dd1f3c2b0ad66752554391b7c62bd7ca4559193381f766534e723d50242 languageName: node linkType: hard @@ -50919,18 +46783,7 @@ __metadata: languageName: node linkType: hard -"streamroller@npm:^3.0.2": - version: 3.0.2 - resolution: "streamroller@npm:3.0.2" - dependencies: - date-format: "npm:^4.0.3" - debug: "npm:^4.1.1" - fs-extra: "npm:^10.0.0" - checksum: 10/89a49dd4e755d4f2806ebce45f3d329a67e9829ba1cd4ea4897e2cfbcb7245efe676a301a3fbd8081a2a248d07f0dca448a1b64e2540bb8297a9d45bbe71656f - languageName: node - linkType: hard - -"streamroller@npm:^3.1.5": +"streamroller@npm:^3.0.2, streamroller@npm:^3.1.5": version: 3.1.5 resolution: "streamroller@npm:3.1.5" dependencies: @@ -50996,7 +46849,7 @@ __metadata: languageName: node linkType: hard -"string-natural-compare@npm:^3.0.1": +"string-natural-compare@npm:3.0.1, string-natural-compare@npm:^3.0.1": version: 3.0.1 resolution: "string-natural-compare@npm:3.0.1" checksum: 10/bc1fd0ee196466489e121bbe11844094ddcdee5a687dca9dbb18ba2ace73b1f6c96c9b448df2dfed0879b781b6b12e329ca1c1fc0a86d70b00c7823b76109b1e @@ -51010,13 +46863,6 @@ __metadata: languageName: node linkType: hard -"string-similarity@npm:^4.0.1": - version: 4.0.4 - resolution: "string-similarity@npm:4.0.4" - checksum: 10/53365fe64d4958e88951f0016b2174aaea330f762f522be6081bae4cac3e3396f723c8ec4091c0b0e266129652ead5dde3683c31d3a07ff1b6aa35057de28b1b - languageName: node - linkType: hard - "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -51082,57 +46928,60 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.6, string.prototype.matchall@npm:^4.0.8": - version: 4.0.10 - resolution: "string.prototype.matchall@npm:4.0.10" +"string.prototype.includes@npm:^2.0.1": + version: 2.0.1 + resolution: "string.prototype.includes@npm:2.0.1" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.5" - regexp.prototype.flags: "npm:^1.5.0" - set-function-name: "npm:^2.0.0" - side-channel: "npm:^1.0.4" - checksum: 10/0f7a1a7f91790cd45f804039a16bc6389c8f4f25903e648caa3eea080b019a5c7b0cac2ca83976646140c2332b159042140bf389f23675609d869dd52450cddc + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.3" + checksum: 10/939a5447e4a99a86f29cc97fa24f358e5071f79e34746de4c7eb2cd736ed626ad24870a1e356f33915b3b352bb87f7e4d1cebc15d1e1aaae0923777e21b1b28b languageName: node linkType: hard -"string.prototype.padend@npm:^3.0.0": - version: 3.1.3 - resolution: "string.prototype.padend@npm:3.1.3" +"string.prototype.matchall@npm:^4.0.11, string.prototype.matchall@npm:^4.0.6": + version: 4.0.11 + resolution: "string.prototype.matchall@npm:4.0.11" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.19.1" - checksum: 10/ae99a99c9ee78d0b5a76a0f5913fa9a43a911794937748df821565b1ae37279603fe718aa1954e9034681cc20ae75d9d9f8af02a15a796d92b81d9bcb637b879 + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + gopd: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.7" + regexp.prototype.flags: "npm:^1.5.2" + set-function-name: "npm:^2.0.2" + side-channel: "npm:^1.0.6" + checksum: 10/a902ff4500f909f2a08e55cc5ab1ffbbc905f603b36837674370ee3921058edd0392147e15891910db62a2f31ace2adaf065eaa3bc6e9810bdbc8ca48e05a7b5 languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.7": - version: 1.2.7 - resolution: "string.prototype.trim@npm:1.2.7" +"string.prototype.padend@npm:^3.0.0": + version: 3.1.6 + resolution: "string.prototype.padend@npm:3.1.6" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/a1b795bdb4b4b7d9399e99771e8a36493a30cf18095b0e8b36bcb211aad42dc59186c9a833c774f7a70429dbd3862818133d7e0da1547a0e9f0e1ebddf995635 + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + checksum: 10/52cebc58a0252ef45dd0fec3ee4e8655bcc8b6c07b4956c5965542316f5ab3a38ca8d1d06e9804979828fba9de61e59294fe23f64e5d413ac40963a4d4969c19 languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.8": - version: 1.2.8 - resolution: "string.prototype.trim@npm:1.2.8" +"string.prototype.repeat@npm:^1.0.0": + version: 1.0.0 + resolution: "string.prototype.repeat@npm:1.0.0" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/9301f6cb2b6c44f069adde1b50f4048915985170a20a1d64cf7cb2dc53c5cd6b9525b92431f1257f894f94892d6c4ae19b5aa7f577c3589e7e51772dffc9d5a4 + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.17.5" + checksum: 10/4b1bd91b75fa8fdf0541625184ebe80e445a465ce4253c19c3bccd633898005dadae0f74b85ae72662a53aafb8035bf48f8f5c0755aec09bc106a7f13959d05e languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.9": +"string.prototype.trim@npm:^1.2.7, string.prototype.trim@npm:^1.2.9": version: 1.2.9 resolution: "string.prototype.trim@npm:1.2.9" dependencies: @@ -51144,38 +46993,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.4": - version: 1.0.4 - resolution: "string.prototype.trimend@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/5733b0f9801276387be136f1591883fc1b6371e263533d7797dc6178916a98bd9f632870f25e58a827ed028c17003b70e37650e80fc6703af6883cb2f3b0c1b3 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.6": - version: 1.0.6 - resolution: "string.prototype.trimend@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/3893db9267e0b8a16658c3947738536e90c400a9b7282de96925d4e210174cfe66c59d6b7eb5b4a9aaa78ef7f5e46afb117e842d93112fbd105c8d19206d8092 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimend@npm:1.0.7" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/3f0d3397ab9bd95cd98ae2fe0943bd3e7b63d333c2ab88f1875cf2e7c958c75dc3355f6fe19ee7c8fca28de6f39f2475e955e103821feb41299a2764a7463ffa - languageName: node - linkType: hard - "string.prototype.trimend@npm:^1.0.8": version: 1.0.8 resolution: "string.prototype.trimend@npm:1.0.8" @@ -51187,38 +47004,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.4": - version: 1.0.4 - resolution: "string.prototype.trimstart@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10/18e0b7362c51f566a3de095c4bab953174897f6cebe92826234f04d2744b0fdb25095c74661e0c15776d1338d64965be0a4f9c8be8851ee15b827c63a5280fdb - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.6": - version: 1.0.6 - resolution: "string.prototype.trimstart@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.4" - es-abstract: "npm:^1.20.4" - checksum: 10/05e2cd06fa5311b17f5b2c7af0a60239fa210f4bb07bbcfce4995215dce330e2b1dd2d8030d371f46252ab637522e14b6e9a78384e8515945b72654c14261d54 - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimstart@npm:1.0.7" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - checksum: 10/6e594d3a61b127d243b8be1312e9f78683abe452cfe0bcafa3e0dc62ad6f030ccfb64d87ed3086fb7cb540fda62442c164d237cc5cc4d53c6e3eb659c29a0aeb - languageName: node - linkType: hard - "string.prototype.trimstart@npm:^1.0.8": version: 1.0.8 resolution: "string.prototype.trimstart@npm:1.0.8" @@ -51255,6 +47040,16 @@ __metadata: languageName: node linkType: hard +"stringify-entities@npm:^4.0.0": + version: 4.0.4 + resolution: "stringify-entities@npm:4.0.4" + dependencies: + character-entities-html4: "npm:^2.0.0" + character-entities-legacy: "npm:^3.0.0" + checksum: 10/42bd2f37528795a7b4386bd39dc4699515fb0f0b8c418a6bb29ae205ce66eaff9e8801a2bee65b8049c918c9475a71c7e5911f6a88c19f1d84ebdcba3d881a2d + languageName: node + linkType: hard + "stringify-object@npm:3.3.0, stringify-object@npm:^3.2.1, stringify-object@npm:^3.3.0": version: 3.3.0 resolution: "stringify-object@npm:3.3.0" @@ -51440,11 +47235,11 @@ __metadata: linkType: hard "style-loader@npm:^3.3.1": - version: 3.3.3 - resolution: "style-loader@npm:3.3.3" + version: 3.3.4 + resolution: "style-loader@npm:3.3.4" peerDependencies: webpack: ^5.0.0 - checksum: 10/6c13d5075b5a5d69602215a242ef157460766e6e8a2e48276eb5da5b9852716910b48b3f120d492bbc7cd825dfa940b35fc84e1a9ab2a8792fd8d568b6b3e87a + checksum: 10/2dd2a77d4fc689e1f73836ed7653830cb4e628af0b2979dcf6f31524c72bf44fca4bac8aebe62df95a5f9be19bea18f952a2cfcaaeff32c524c4402226d9c58f languageName: node linkType: hard @@ -51500,12 +47295,12 @@ __metadata: linkType: hard "sucrase@npm:^3.32.0": - version: 3.34.0 - resolution: "sucrase@npm:3.34.0" + version: 3.35.0 + resolution: "sucrase@npm:3.35.0" dependencies: "@jridgewell/gen-mapping": "npm:^0.3.2" commander: "npm:^4.0.0" - glob: "npm:7.1.6" + glob: "npm:^10.3.10" lines-and-columns: "npm:^1.1.6" mz: "npm:^2.7.0" pirates: "npm:^4.0.1" @@ -51513,7 +47308,18 @@ __metadata: bin: sucrase: bin/sucrase sucrase-node: bin/sucrase-node - checksum: 10/b64d154a7a7eaa4b39668c3124bd08cd505f683d36ac4fb94def6491fb3af155b24b6e41b55011e38582e7d59c440af79ffba8709f3da78aeedf2f07b6d51d84 + checksum: 10/bc601558a62826f1c32287d4fdfa4f2c09fe0fec4c4d39d0e257fd9116d7d6227a18309721d4185ec84c9dc1af0d5ec0e05a42a337fbb74fc293e068549aacbe + languageName: node + linkType: hard + +"super-regex@npm:^0.2.0": + version: 0.2.0 + resolution: "super-regex@npm:0.2.0" + dependencies: + clone-regexp: "npm:^3.0.0" + function-timeout: "npm:^0.1.0" + time-span: "npm:^5.1.0" + checksum: 10/fdcf1d5163a37c8a4aad890ff33dcafaf080cb001768a7dfa160d77e8148e1e6c03f685b2726d6aa6f4567ea7b64e08d60de844737d4c782cea2acb905f86267 languageName: node linkType: hard @@ -51745,9 +47551,11 @@ __metadata: linkType: hard "swagger-ui-dist@npm:>=5.0.0": - version: 5.17.14 - resolution: "swagger-ui-dist@npm:5.17.14" - checksum: 10/b9e62d7ecb64e837849252c9f82af654b26cae60ebd551cff96495d826166d3ed866ebae40f22a2c61d307330151945d79d995e50659ae17eea6cf4ece788f9d + version: 5.18.2 + resolution: "swagger-ui-dist@npm:5.18.2" + dependencies: + "@scarf/scarf": "npm:=1.4.0" + checksum: 10/041438c4e5aa2e5add73e0d8d2ba89e9946206d65c8bf3ada5d1de44c2bea49d82d864614c9b23c00661350e44e822e8513dcac0ea4bc421375f0a88e54f7e54 languageName: node linkType: hard @@ -51773,21 +47581,21 @@ __metadata: linkType: hard "swarm-js@npm:^0.1.40": - version: 0.1.40 - resolution: "swarm-js@npm:0.1.40" + version: 0.1.42 + resolution: "swarm-js@npm:0.1.42" dependencies: bluebird: "npm:^3.5.0" buffer: "npm:^5.0.5" eth-lib: "npm:^0.1.26" fs-extra: "npm:^4.0.2" - got: "npm:^7.1.0" + got: "npm:^11.8.5" mime-types: "npm:^2.1.16" mkdirp-promise: "npm:^5.0.1" mock-fs: "npm:^4.1.0" setimmediate: "npm:^1.0.5" tar: "npm:^4.0.2" xhr-request: "npm:^1.0.1" - checksum: 10/c7e8cea8eb266411cb3f4324c6a07a60b7cdb6cab86ac2dae34c2e69a161e7aa9b2e4e61b4005b5f8d277abb9c519e69072cb388a024a7fa32313197c06cbd4a + checksum: 10/341bcfef6daadc1904ea87b1781f10dc99ec14e33c9a9041e43e9617dcc3b7d632230e1baf2fafecb8e10e63c2e4eeb7cce7c85592dc0cf0dde935f49c77050b languageName: node linkType: hard @@ -51851,28 +47659,28 @@ __metadata: linkType: hard "tablemark@npm:^3.0.0": - version: 3.0.0 - resolution: "tablemark@npm:3.0.0" + version: 3.1.0 + resolution: "tablemark@npm:3.1.0" dependencies: sentence-case: "npm:^3.0.4" split-text-to-chunks: "npm:^1.0.0" - checksum: 10/1e819d7e1ad268743543778b5a1aec559113bf91098e220997fddccd207fd779d8ab216ff86d2180bb780841a23ef3f84f59bbc493d41cd5badff1246a04a8de + checksum: 10/96c6e196e16240d4a6ba998d8509e68e8ae16b41b2ebe4a36f294cfa57350c381caedfcaf544a9d6d52476487aefbf36cc53934ff5378e9b2d1812058dba4e86 languageName: node linkType: hard "tailwindcss@npm:^3.0.2": - version: 3.3.3 - resolution: "tailwindcss@npm:3.3.3" + version: 3.4.14 + resolution: "tailwindcss@npm:3.4.14" dependencies: "@alloc/quick-lru": "npm:^5.2.0" arg: "npm:^5.0.2" chokidar: "npm:^3.5.3" didyoumean: "npm:^1.2.2" dlv: "npm:^1.1.3" - fast-glob: "npm:^3.2.12" + fast-glob: "npm:^3.3.0" glob-parent: "npm:^6.0.2" is-glob: "npm:^4.0.3" - jiti: "npm:^1.18.2" + jiti: "npm:^1.21.0" lilconfig: "npm:^2.1.0" micromatch: "npm:^4.0.5" normalize-path: "npm:^3.0.0" @@ -51889,13 +47697,13 @@ __metadata: bin: tailwind: lib/cli.js tailwindcss: lib/cli.js - checksum: 10/bc47f40cc33aca95fb9d523ecef0a450241e51d2259c354ac283c6a06c4dcd7edd1ffbd6f065fc496390ff3ab4dd8349c968b10cce7e11e0bde101705fa0f4f1 + checksum: 10/2b75b697d4859ce813947b043edf19ed61f80321914743a00ba883f327016e4f7f9414823b6ccffeb1359524335c47933d970da5ce2158329f43e9a89d934eb0 languageName: node linkType: hard "tap-mocha-reporter@npm:^5.0.3": - version: 5.0.3 - resolution: "tap-mocha-reporter@npm:5.0.3" + version: 5.0.4 + resolution: "tap-mocha-reporter@npm:5.0.4" dependencies: color-support: "npm:^1.1.0" debug: "npm:^4.1.1" @@ -51907,7 +47715,7 @@ __metadata: unicode-length: "npm:^2.0.2" bin: tap-mocha-reporter: index.js - checksum: 10/3635e40e1ebd36ab6893f72d7914107bfc372b6da5a2827051e7762df8941ca33a6995416c5d9dca829d14153dca98424c2272de932af9ca5e813d402c863643 + checksum: 10/a88f424b65c50381817bf16ea13f26bced5cd32ce30beeec0659b0589d72a9ee5b40532b25b1f409458d25324a438bb98e72db6d7a4f830993dd1fdf49694846 languageName: node linkType: hard @@ -51924,16 +47732,7 @@ __metadata: languageName: node linkType: hard -"tap-yaml@npm:^1.0.0": - version: 1.0.0 - resolution: "tap-yaml@npm:1.0.0" - dependencies: - yaml: "npm:^1.5.0" - checksum: 10/052263ae0d957b049ac4c1acfe44b48ad988dbae7c3e84ae7095329edeb4437cadf8fc53c5b7c44b28881866edc76858e8f2100443bf8af2583c480d2310e533 - languageName: node - linkType: hard - -"tap-yaml@npm:^1.0.2": +"tap-yaml@npm:^1.0.0, tap-yaml@npm:^1.0.2": version: 1.0.2 resolution: "tap-yaml@npm:1.0.2" dependencies: @@ -52114,21 +47913,7 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.0.2, tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.1.11 - resolution: "tar@npm:6.1.11" - dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^3.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10/0e6789e66475922b8e0d1ee648cb26e0ede9a0635284269ca71b2d8acd507bc59ad5557032f0192f8ff22680b50cb66792b56f0240f484fe0d7d8cef81c1b959 - languageName: node - linkType: hard - -"tar@npm:^6.2.1": +"tar@npm:^6.0.2, tar@npm:^6.1.11, tar@npm:^6.1.2, tar@npm:^6.2.1": version: 6.2.1 resolution: "tar@npm:6.2.1" dependencies: @@ -52159,11 +47944,11 @@ __metadata: linkType: hard "tdigest@npm:^0.1.1": - version: 0.1.1 - resolution: "tdigest@npm:0.1.1" + version: 0.1.2 + resolution: "tdigest@npm:0.1.2" dependencies: - bintrees: "npm:1.0.1" - checksum: 10/0d42dad78444ff25d391db424ff756a67090d1b9e550cb9f55a7a6aeb1905e115c0c439ca158eb9781b462954f9688f59f49a4bb141d0b1b62aacde94579cbb0 + bintrees: "npm:1.0.2" + checksum: 10/45be99fa52dab74b8edafe150e473cdc45aa1352c75ed516a39905f350a08c3175f6555598111042c3677ba042d7e3cae6b5ce4c663fe609bc634f326aabc9d6 languageName: node linkType: hard @@ -52235,29 +48020,7 @@ __metadata: languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.2.5, terser-webpack-plugin@npm:^5.3.7": - version: 5.3.9 - resolution: "terser-webpack-plugin@npm:5.3.9" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.17" - jest-worker: "npm:^27.4.5" - schema-utils: "npm:^3.1.1" - serialize-javascript: "npm:^6.0.1" - terser: "npm:^5.16.8" - peerDependencies: - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - checksum: 10/339737a407e034b7a9d4a66e31d84d81c10433e41b8eae2ca776f0e47c2048879be482a9aa08e8c27565a2a949bc68f6e07f451bf4d9aa347dd61b3d000f5353 - languageName: node - linkType: hard - -"terser-webpack-plugin@npm:^5.3.10": +"terser-webpack-plugin@npm:^5.2.5, terser-webpack-plugin@npm:^5.3.10, terser-webpack-plugin@npm:^5.3.7": version: 5.3.10 resolution: "terser-webpack-plugin@npm:5.3.10" dependencies: @@ -52307,37 +48070,9 @@ __metadata: languageName: node linkType: hard -"terser@npm:^5.0.0, terser@npm:^5.10.0": - version: 5.22.0 - resolution: "terser@npm:5.22.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/e5407f9a143e7f9306f1b585b16dbb03df19b93318b55a26b542e12b74cc792dcf6961d9a2cab6778b20d7b591f498c200376d282a300cf9999ca40bccbc047c - languageName: node - linkType: hard - -"terser@npm:^5.16.8": - version: 5.19.4 - resolution: "terser@npm:5.19.4" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10/8439034db1f4827bb475ae284a122bdaebdd484cb368d64d5bc1d799081c58f47525621a619b7ec6cdded3a43ae8f9a0ac93702c68e827a13a475a562558787c - languageName: node - linkType: hard - -"terser@npm:^5.26.0": - version: 5.31.2 - resolution: "terser@npm:5.31.2" +"terser@npm:^5.0.0, terser@npm:^5.10.0, terser@npm:^5.26.0": + version: 5.36.0 + resolution: "terser@npm:5.36.0" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -52345,7 +48080,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10/dab8d0a7e2845f14535433795aa8dcf1b80a33e75749f5dbd67ee97aa66c1dec37191afa46dd88dad8472c9ff0bf16a812dd4388cb30d8675a6a95a7ead0421b + checksum: 10/52e641419f79d7ccdecd136b9a8e0b03f93cfe3b53cce556253aaabc347d3f2af1745419b9e622abc95d592084dc76e57774b8f9e68d29d543f4dd11c044daf4 languageName: node linkType: hard @@ -52447,6 +48182,15 @@ __metadata: languageName: node linkType: hard +"thread-stream@npm:^2.6.0": + version: 2.7.0 + resolution: "thread-stream@npm:2.7.0" + dependencies: + real-require: "npm:^0.2.0" + checksum: 10/03e743a2ccb2af5fa695d2e4369113336ee9b9f09c4453d50a222cbb4ae3af321bff658e0e5bf8bfbce9d7f5a7bf6262d12a2a365e160f4e76380ec624d32e7b + languageName: node + linkType: hard + "thread-stream@npm:^3.0.0": version: 3.1.0 resolution: "thread-stream@npm:3.1.0" @@ -52503,6 +48247,15 @@ __metadata: languageName: node linkType: hard +"time-span@npm:^5.1.0": + version: 5.1.0 + resolution: "time-span@npm:5.1.0" + dependencies: + convert-hrtime: "npm:^5.0.0" + checksum: 10/949c45fcb873f2d26fda3db1b7f7161ce65206f6e94a7c6c9bf3a5a07a373570dba57ca5c1f816efa6326adbc3f9e93bb6ef19a7a220f4259a917e1192d49418 + languageName: node + linkType: hard + "time-stamp@npm:^2.0.0": version: 2.2.0 resolution: "time-stamp@npm:2.2.0" @@ -52510,7 +48263,7 @@ __metadata: languageName: node linkType: hard -"timed-out@npm:^4.0.0, timed-out@npm:^4.0.1": +"timed-out@npm:^4.0.1": version: 4.0.1 resolution: "timed-out@npm:4.0.1" checksum: 10/d52648e5fc0ebb0cae1633737a1db1b7cb464d5d43d754bd120ddebd8067a1b8f42146c250d8cfb9952183b7b0f341a99fc71b59c52d659218afae293165004f @@ -52552,6 +48305,24 @@ __metadata: languageName: node linkType: hard +"tldts-core@npm:^6.1.59": + version: 6.1.59 + resolution: "tldts-core@npm:6.1.59" + checksum: 10/0a3ed78384409aeb33e41d186f273ee423574f33947301746178fd9cdd5f730c647cbc27ef40b214a16101169d3f8b92384231064021887f1f25b6d70ac72aaf + languageName: node + linkType: hard + +"tldts@npm:^6.1.32": + version: 6.1.59 + resolution: "tldts@npm:6.1.59" + dependencies: + tldts-core: "npm:^6.1.59" + bin: + tldts: bin/cli.js + checksum: 10/c460c79fd110cf8fdac68fe4c084c4fb11c8a541880fc74c812189cf5d42bb16abe4acdaebd2d5dbff172cd87a2678b7f4a80cccf8b9e72d2378885b1a80a2c8 + languageName: node + linkType: hard + "tls-browserify@npm:0.2.2": version: 0.2.2 resolution: "tls-browserify@npm:0.2.2" @@ -52650,25 +48421,20 @@ __metadata: linkType: hard "touch@npm:^3.1.0": - version: 3.1.0 - resolution: "touch@npm:3.1.0" - dependencies: - nopt: "npm:~1.0.10" + version: 3.1.1 + resolution: "touch@npm:3.1.1" bin: - nodetouch: ./bin/nodetouch.js - checksum: 10/ece1d9693fbc9b73d8a6d902537b787b5685ac1aeab7562857c50e6671415a73c985055393442b518f4ac37b85c3e7a3e6c36af71142fed13b8bb04fb6664936 + nodetouch: bin/nodetouch.js + checksum: 10/853e763a1f4903302c5654ed353f84ad85baf757dac62c2d37ab67e0477cfd271e8c64771fcfad42310aff7c9d284ddb435ee5ca13ff36d0f3693fedd8e971d1 languageName: node linkType: hard "tough-cookie@npm:>=4.1.3": - version: 4.1.3 - resolution: "tough-cookie@npm:4.1.3" + version: 5.0.0 + resolution: "tough-cookie@npm:5.0.0" dependencies: - psl: "npm:^1.1.33" - punycode: "npm:^2.1.1" - universalify: "npm:^0.2.0" - url-parse: "npm:^1.5.3" - checksum: 10/cf148c359b638a7069fc3ba9a5257bdc9616a6948a98736b92c3570b3f8401cf9237a42bf716878b656f372a1fb65b74dd13a46ccff8eceba14ffd053d33f72a + tldts: "npm:^6.1.32" + checksum: 10/a98d3846ed386e399e8b470c1eb08a6a296944246eabc55c9fe79d629bd2cdaa62f5a6572f271fe0060987906bd20468d72a219a3b4cbe51086bea48d2d677b6 languageName: node linkType: hard @@ -52747,6 +48513,13 @@ __metadata: languageName: node linkType: hard +"trim-lines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-lines@npm:3.0.1" + checksum: 10/7a1325e4ce8ff7e9e52007600e9c9862a166d0db1f1cf0c9357e359e410acab1278fcd91cc279dfa5123fc37b69f080de02f471e91dbbc61b155b9ca92597929 + languageName: node + linkType: hard + "trim-newlines@npm:^3.0.0": version: 3.0.1 resolution: "trim-newlines@npm:3.0.1" @@ -52755,9 +48528,9 @@ __metadata: linkType: hard "trim-newlines@npm:^4.0.2": - version: 4.0.2 - resolution: "trim-newlines@npm:4.0.2" - checksum: 10/1eef206eb77361856dff0b827e5811baf64574bb21e81b7ad643fe321c5c19b0a452dd83e9afc31206993fcff9bb90a379925d7b5915f887de1ca7da5b57933a + version: 4.1.1 + resolution: "trim-newlines@npm:4.1.1" + checksum: 10/5b09f8e329e8f33c1111ef26906332ba7ba7248cde3e26fc054bb3d69f2858bf5feedca9559c572ff91f33e52977c28e0d41c387df6a02a633cbb8c2d8238627 languageName: node linkType: hard @@ -52769,16 +48542,16 @@ __metadata: linkType: hard "triple-beam@npm:^1.3.0": - version: 1.3.0 - resolution: "triple-beam@npm:1.3.0" - checksum: 10/7d7b77d8625fb252c126c24984a68de462b538a8fcd1de2abd0a26421629cf3527d48e23b3c2264f08f4a6c3bc40a478a722176f4d7b6a1acc154cb70c359f2b + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 languageName: node linkType: hard "trivial-deferred@npm:^1.0.1": - version: 1.0.1 - resolution: "trivial-deferred@npm:1.0.1" - checksum: 10/1615081f03df8e36c4c6f648597f02df50144fd81ccdcd0c8ba67b1c2a5f9f344d90a3983caf9927f866983064c4c26854fef637a8f3672ccfdff92039519763 + version: 1.1.2 + resolution: "trivial-deferred@npm:1.1.2" + checksum: 10/1c1a45036b6c863ffe3272ac13b4256ba5f1fd43532bbb329fe9b8ead442a7eeedb6b818849517889084d09c9e8a14766051621354a31335bd7cdd4658564705 languageName: node linkType: hard @@ -52826,11 +48599,11 @@ __metadata: linkType: hard "ts-api-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "ts-api-utils@npm:1.0.1" + version: 1.4.0 + resolution: "ts-api-utils@npm:1.4.0" peerDependencies: typescript: ">=4.2.0" - checksum: 10/8b16fa5645442854fbaef83c57beec8daf0326b24576efe744d85bb3851241b8deac2df424ebe73c0bb7d5bfaac6bccbb554222b788f9fdf90998d164f38d640 + checksum: 10/b2020d5da55e28dc9dd32fb94730a4f6caefbd8e103029b6b6de5f15d18873067d734f64761c424c78ad1393a2b99d82b5a9fd34d663c12243acca7d3439090b languageName: node linkType: hard @@ -52912,7 +48685,7 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:10.9.1, ts-node@npm:^10.8.1": +"ts-node@npm:10.9.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1" dependencies: @@ -52950,7 +48723,7 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:10.9.2, ts-node@npm:^10.9.2": +"ts-node@npm:10.9.2, ts-node@npm:^10.0.0, ts-node@npm:^10.8.1, ts-node@npm:^10.9.2": version: 10.9.2 resolution: "ts-node@npm:10.9.2" dependencies: @@ -53008,55 +48781,6 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:^10.0.0": - version: 10.5.0 - resolution: "ts-node@npm:10.5.0" - dependencies: - "@cspotcode/source-map-support": "npm:0.7.0" - "@tsconfig/node10": "npm:^1.0.7" - "@tsconfig/node12": "npm:^1.0.7" - "@tsconfig/node14": "npm:^1.0.0" - "@tsconfig/node16": "npm:^1.0.2" - acorn: "npm:^8.4.1" - acorn-walk: "npm:^8.1.1" - arg: "npm:^4.1.0" - create-require: "npm:^1.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - v8-compile-cache-lib: "npm:^3.0.0" - yn: "npm:3.1.1" - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10/39e500985f54a2cb9ed2d7e1b535a34edf1701c72ebe0a1da102bfad3c01632043441f2703bf243510d33b0a15fa5ff2e2d3dbcea56b0748dfffb677c7970c7b - languageName: node - linkType: hard - -"tsconfig-paths@npm:^3.14.2": - version: 3.14.2 - resolution: "tsconfig-paths@npm:3.14.2" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10/17f23e98612a60cf23b80dc1d3b7b840879e41fcf603868fc3618a30f061ac7b463ef98cad8c28b68733b9bfe0cc40ffa2bcf29e94cf0d26e4f6addf7ac8527d - languageName: node - linkType: hard - "tsconfig-paths@npm:^3.15.0": version: 3.15.0 resolution: "tsconfig-paths@npm:3.15.0" @@ -53087,14 +48811,14 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.4.0, tslib@npm:^2.3.0": +"tslib@npm:2.4.0": version: 2.4.0 resolution: "tslib@npm:2.4.0" checksum: 10/d8379e68b36caf082c1905ec25d17df8261e1d68ddc1abfd6c91158a064f6e4402039ae7c02cf4c81d12e3a2a2c7cd8ea2f57b233eb80136a2e3e7279daf2911 languageName: node linkType: hard -"tslib@npm:2.5.0, tslib@npm:^2.4.0": +"tslib@npm:2.5.0": version: 2.5.0 resolution: "tslib@npm:2.5.0" checksum: 10/ea556fbdf396fe15dbd45e242754e86e7c36e0dce8644404a7c8a81ae1e940744dc639569aeca1ae370a7f804d82872f3fd8564eb23be9adb7618201d0314dac @@ -53108,7 +48832,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.6.2, tslib@npm:^2.5.0, tslib@npm:^2.5.3, tslib@npm:^2.6.1, tslib@npm:^2.6.2": +"tslib@npm:2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 10/bd26c22d36736513980091a1e356378e8b662ded04204453d353a7f34a4c21ed0afc59b5f90719d4ba756e581a162ecbf93118dc9c6be5acf70aa309188166ca @@ -53122,17 +48846,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.2.0": - version: 2.3.1 - resolution: "tslib@npm:2.3.1" - checksum: 10/5e7de59ed9f2b705b399bda28326b7c3e7526deb48bbe1716e2e17fbd4cecbb610253d09c7b8fd0a6e76cfed9304e2e608cdb81bb1ee812d69e5089d1a94c71a - languageName: node - linkType: hard - -"tslib@npm:^2.0.3": - version: 2.6.0 - resolution: "tslib@npm:2.6.0" - checksum: 10/52360693c62761f902e1946b350188be6505de297068b33421cb26bedd99591203a74cb2a49e1f43f0922d59b1fb3499fe5cfe61a61ca65a1743d5c92c69720a +"tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.0, tslib@npm:^2.4.0, tslib@npm:^2.5.3, tslib@npm:^2.6.1, tslib@npm:^2.6.2, tslib@npm:^2.7.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10/3e2e043d5c2316461cb54e5c7fe02c30ef6dccb3384717ca22ae5c6b5bc95232a6241df19c622d9c73b809bea33b187f6dbc73030963e29950c2141bc32a79f7 languageName: node linkType: hard @@ -53267,7 +48984,7 @@ __metadata: languageName: node linkType: hard -"tv4@npm:^1.2.7": +"tv4@npm:^1.2.7, tv4@npm:^1.3.0": version: 1.3.0 resolution: "tv4@npm:1.3.0" checksum: 10/2b11f89805ad1a34ab1aab27117ab97de4c67c49f6b02e88d35c38c713df15eaeff69e3a30f9696a0ea1b678df625925a3114ed9e7c32429a9061062f3568762 @@ -53313,13 +49030,20 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8": +"type-detect@npm:4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d languageName: node linkType: hard +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8": + version: 4.1.0 + resolution: "type-detect@npm:4.1.0" + checksum: 10/e363bf0352427a79301f26a7795a27718624c49c576965076624eb5495d87515030b207217845f7018093adcbe169b2d119bb9b7f1a31a92bfbb1ab9639ca8dd + languageName: node + linkType: hard + "type-fest@npm:^0.12.0": version: 0.12.0 resolution: "type-fest@npm:0.12.0" @@ -53397,24 +49121,10 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^4.2.0": - version: 4.3.1 - resolution: "type-fest@npm:4.3.1" - checksum: 10/67ec9bd6fd1b1c5e7361d5ffad639607f60a3d497ff9fa7b1359b9e4c6b08a8f31f1cb0328e633f640adc2b8f692b35719efc328af0aea1d816828e4195519ae - languageName: node - linkType: hard - -"type-fest@npm:^4.6.0": - version: 4.8.3 - resolution: "type-fest@npm:4.8.3" - checksum: 10/90e440347c542282b0a92bb181fb30af529be6d6820dd7ec6141309f2ca143855a8fbca18969623b19bc15a3dcce6000af19f97cae81a39fbd2638c15a06d078 - languageName: node - linkType: hard - -"type-fest@npm:^4.7.1": - version: 4.21.0 - resolution: "type-fest@npm:4.21.0" - checksum: 10/a4dc074b25239fff4062495c58554dcec15845622d753092d2bf24fc3b1c49f85805ed74f151976d666056ff122b3a5a988e85226575b7fbbc8e92d2db210137 +"type-fest@npm:^4.2.0, type-fest@npm:^4.23.0, type-fest@npm:^4.6.0, type-fest@npm:^4.7.1": + version: 4.26.1 + resolution: "type-fest@npm:4.26.1" + checksum: 10/b82676194f80af228cb852e320d2ea8381c89d667d2e4d9f2bdfc8f254bccc039c7741a90c53617a4de0c9fdca8265ed18eb0888cd628f391c5c381c33a9f94b languageName: node linkType: hard @@ -53428,35 +49138,10 @@ __metadata: languageName: node linkType: hard -"type@npm:^1.0.1": - version: 1.2.0 - resolution: "type@npm:1.2.0" - checksum: 10/b4d4b27d1926028be45fc5baaca205896e2a1fe9e5d24dc892046256efbe88de6acd0149e7353cd24dad596e1483e48ec60b0912aa47ca078d68cdd198b09885 - languageName: node - linkType: hard - -"type@npm:^2.5.0": - version: 2.6.0 - resolution: "type@npm:2.6.0" - checksum: 10/2b82a05d963dac5a20c71adf50c2fef21b7bda248959e5316dd08fdb7b60644d1f34c399274334ad5b2f23dfea96c5f2b07bcb014fda200db35a160938f0a19b - languageName: node - linkType: hard - "type@npm:^2.7.2": - version: 2.7.2 - resolution: "type@npm:2.7.2" - checksum: 10/602f1b369fba60687fa4d0af6fcfb814075bcaf9ed3a87637fb384d9ff849e2ad15bc244a431f341374562e51a76c159527ffdb1f1f24b0f1f988f35a301c41d - languageName: node - linkType: hard - -"typed-array-buffer@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-buffer@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + version: 2.7.3 + resolution: "type@npm:2.7.3" + checksum: 10/82e99e7795b3de3ecfe685680685e79a77aea515fad9f60b7c55fbf6d43a5c360b1e6e9443354ec8906b38cdf5325829c69f094cb7cd2a1238e85bef9026dc04 languageName: node linkType: hard @@ -53471,18 +49156,6 @@ __metadata: languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-length@npm:1.0.0" - dependencies: - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - has-proto: "npm:^1.0.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/6f376bf5d988f00f98ccee41fd551cafc389095a2a307c18fab30f29da7d1464fc3697139cf254cda98b4128bbcb114f4b557bbabdc6d9c2e5039c515b31decf - languageName: node - linkType: hard - "typed-array-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "typed-array-byte-length@npm:1.0.1" @@ -53496,19 +49169,6 @@ __metadata: languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-offset@npm:1.0.0" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - has-proto: "npm:^1.0.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/2d81747faae31ca79f6c597dc18e15ae3d5b7e97f7aaebce3b31f46feeb2a6c1d6c92b9a634d901c83731ffb7ec0b74d05c6ff56076f5ae39db0cd19b16a3f92 - languageName: node - linkType: hard - "typed-array-byte-offset@npm:^1.0.2": version: 1.0.2 resolution: "typed-array-byte-offset@npm:1.0.2" @@ -53523,31 +49183,6 @@ __metadata: languageName: node linkType: hard -"typed-array-length@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-length@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - is-typed-array: "npm:^1.1.9" - checksum: 10/0444658acc110b233176cb0b7689dcb828b0cfa099ab1d377da430e8553b6fdcdce882360b7ffe9ae085b6330e1d39383d7b2c61574d6cd8eef651d3e4a87822 - languageName: node - linkType: hard - -"typed-array-length@npm:^1.0.5": - version: 1.0.5 - resolution: "typed-array-length@npm:1.0.5" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-proto: "npm:^1.0.3" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - checksum: 10/f9a0da99c41880b44e2c5e5d0d01515c2a6e0f54b10c594151804f013272d837df3b67ea84d7304ecfbab2c10d99c3372168bf3a4bd295abf13ac5a72f93054a - languageName: node - linkType: hard - "typed-array-length@npm:^1.0.6": version: 1.0.6 resolution: "typed-array-length@npm:1.0.6" @@ -53661,33 +49296,13 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.6.4 || ^5.0.0": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/d65e50eb849bd21ff8677e5b9447f9c6e74777e346afd67754934264dcbf4bd59e7d2473f6062d9a015d66bd573311166357e3eb07fea0b52859cf9bb2b58555 - languageName: node - linkType: hard - -"typescript@npm:^5.0.4, typescript@npm:^5.4.4": - version: 5.5.3 - resolution: "typescript@npm:5.5.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/11a867312419ed497929aafd2f1d28b2cd41810a5eb6c6e9e169559112e9ea073d681c121a29102e67cd4478d0a4ae37a306a5800f3717f59c4337e6a9bd5e8d - languageName: node - linkType: hard - -"typescript@npm:^5.6.2": - version: 5.6.2 - resolution: "typescript@npm:5.6.2" +"typescript@npm:^4.6.4 || ^5.2.2, typescript@npm:^5.0.4, typescript@npm:^5.4.4, typescript@npm:^5.6.2": + version: 5.6.3 + resolution: "typescript@npm:5.6.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/f95365d4898f357823e93d334ecda9fcade54f009b397c7d05b7621cd9e865981033cf89ccde0f3e3a7b73b1fdbae18e92bc77db237b43e912f053fef0f9a53b + checksum: 10/c328e418e124b500908781d9f7b9b93cf08b66bf5936d94332b463822eea2f4e62973bfb3b8a745fdc038785cb66cf59d1092bac3ec2ac6a3e5854687f7833f1 languageName: node linkType: hard @@ -53711,33 +49326,13 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^4.6.4 || ^5.0.0#optional!builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/f79cc2ba802c94c2b78dbb00d767a10adb67368ae764709737dc277273ec148aa4558033a03ce901406b35fddf4eac46dabc94a1e1d12d2587e2b9cfe5707b4a - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.4.4#optional!builtin": - version: 5.5.3 - resolution: "typescript@patch:typescript@npm%3A5.5.3#optional!builtin::version=5.5.3&hash=379a07" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/7cf7acb78a80f749b82842f2ffe01e90e7b3e709a6f4268588e0b7599c41dca1059be217f47778fe1a380bfaf60933021ef20d002c426d4d7745e1b36c11467b - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": - version: 5.6.2 - resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=379a07" +"typescript@patch:typescript@npm%3A^4.6.4 || ^5.2.2#optional!builtin, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.4.4#optional!builtin, typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": + version: 5.6.3 + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=379a07" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/060a7349adf698477b411be4ace470aee6c2c1bd99917fdf5d33697c17ec55c64fe724eb10399387530b50e9913b41528dd8bfcca0a5fc8f8bac63fbb4580a2e + checksum: 10/dc4bec403cd33a204b655b1152a096a08e7bad2c931cb59ef8ff26b6f2aa541bf98f09fc157958a60c921b1983a8dde9a85b692f9de60fa8f574fd131e3ae4dd languageName: node linkType: hard @@ -53749,11 +49344,11 @@ __metadata: linkType: hard "uglify-js@npm:^3.1.4": - version: 3.15.1 - resolution: "uglify-js@npm:3.15.1" + version: 3.19.3 + resolution: "uglify-js@npm:3.19.3" bin: uglifyjs: bin/uglifyjs - checksum: 10/32c2ea5d66b74c6c2b8000c1cf472b50985d5ec85d9e93fc771b8d3c961eac45a59c7549d3b4a0b6a4e39e7282928d00aeec46d01081172ccb62f02987d99213 + checksum: 10/6b9639c1985d24580b01bb0ab68e78de310d38eeba7db45bec7850ab4093d8ee464d80ccfaceda9c68d1c366efbee28573b52f95e69ac792354c145acd380b11 languageName: node linkType: hard @@ -53766,43 +49361,40 @@ __metadata: languageName: node linkType: hard -"uint8-varint@npm:^2.0.1": - version: 2.0.1 - resolution: "uint8-varint@npm:2.0.1" +"uint8-varint@npm:^2.0.1, uint8-varint@npm:^2.0.2": + version: 2.0.4 + resolution: "uint8-varint@npm:2.0.4" dependencies: uint8arraylist: "npm:^2.0.0" - uint8arrays: "npm:^4.0.2" - checksum: 10/9ac2965077974dc1819228d618d4ce6c59f7bddecb0f94e00a212157471f30b927b608d1bf675a1521dbc5e94381169e6bafe3497191ae19a5d31b8d8deb9cea + uint8arrays: "npm:^5.0.0" + checksum: 10/51b5984b0d699d820c255f6cd8fa68628f50b8a09f5f063fa8b22438038e56505ab92445ee2da82966c20bcd5751886c2df8a21708014a3b9b32e871e8869caf languageName: node linkType: hard "uint8arraylist@npm:^2.0.0, uint8arraylist@npm:^2.1.2, uint8arraylist@npm:^2.4.3": - version: 2.4.3 - resolution: "uint8arraylist@npm:2.4.3" + version: 2.4.8 + resolution: "uint8arraylist@npm:2.4.8" dependencies: - uint8arrays: "npm:^4.0.2" - checksum: 10/35deb6d3eebce9a12e75fac7dcea83183049f157cb08c5249e1a2594443b7358fff64af99d5787f7e6cce537d5bb54d797307c2223a466601304bfc42c4bead7 + uint8arrays: "npm:^5.0.1" + checksum: 10/0f4dbffa21de25104e28058440c2ab20691cf5bf894a2032bd6e50b6b6480c7194521af2f6ec0d22855510e952afb0e486e5d95d050856a9a3990a5d276b7c7d languageName: node linkType: hard -"uint8arrays@npm:^4.0.2, uint8arrays@npm:^4.0.3, uint8arrays@npm:^4.0.6": - version: 4.0.6 - resolution: "uint8arrays@npm:4.0.6" +"uint8arrays@npm:^4.0.2, uint8arrays@npm:^4.0.3": + version: 4.0.10 + resolution: "uint8arrays@npm:4.0.10" dependencies: multiformats: "npm:^12.0.1" - checksum: 10/476e6857be579c598cf778407dd9af11c6e2719e3d1ac21ce176c28d13f5021fcedb46194465ee2b362c84791610784c8a22c0c20195d9d0f42efcf64b9d32a2 + checksum: 10/7a22a718a413b87d13faa90d031b1d0f83a14d7a18f763a507935e85a3e01caabf2386986d7b01c6090a91fbf013dbc6b3bd4f9ef48a0753e2b5d529797d0e00 languageName: node linkType: hard -"unbox-primitive@npm:^1.0.1": - version: 1.0.1 - resolution: "unbox-primitive@npm:1.0.1" +"uint8arrays@npm:^5.0.0, uint8arrays@npm:^5.0.1, uint8arrays@npm:^5.0.2, uint8arrays@npm:^5.1.0": + version: 5.1.0 + resolution: "uint8arrays@npm:5.1.0" dependencies: - function-bind: "npm:^1.1.1" - has-bigints: "npm:^1.0.1" - has-symbols: "npm:^1.0.2" - which-boxed-primitive: "npm:^1.0.2" - checksum: 10/16aacdfc555545a89ddc678f136029ead18215f6843b9b707ab383cdc2f739efc34470b6b79c36ce7d376432f75b65b4ecb437d20f97196ba9d4683db0425ea3 + multiformats: "npm:^13.0.0" + checksum: 10/6c9cd1c1519cdf20d4c4e3715b4ee1acf730636409528ea54e77c4d9aa6e7f70aacd86d735f7c8a9902a9181cc3b37fa048590978e2fb90a98fa1dc39465c1af languageName: node linkType: hard @@ -53835,6 +49427,13 @@ __metadata: languageName: node linkType: hard +"underscore@npm:>=1.13.2": + version: 1.13.7 + resolution: "underscore@npm:1.13.7" + checksum: 10/1ce3368dbe73d1e99678fa5d341a9682bd27316032ad2de7883901918f0f5d50e80320ccc543f53c1862ab057a818abc560462b5f83578afe2dd8dd7f779766c + languageName: node + linkType: hard + "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -53842,6 +49441,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.19.8": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70 + languageName: node + linkType: hard + "undici@npm:6.11.1": version: 6.11.1 resolution: "undici@npm:6.11.1" @@ -53856,25 +49462,7 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.12.0": - version: 5.26.3 - resolution: "undici@npm:5.26.3" - dependencies: - "@fastify/busboy": "npm:^2.0.0" - checksum: 10/7280135e89c6f96f17f02fa99b8dcf5c64511d36de31b5cea0e1a858c8a16f07ea22aba524d5b8f574e9341a543d295aebb20cb715545829f2e959329149a638 - languageName: node - linkType: hard - -"undici@npm:^5.14.0": - version: 5.21.2 - resolution: "undici@npm:5.21.2" - dependencies: - busboy: "npm:^1.6.0" - checksum: 10/6b6eb88b5e1e36edb61aacd654d3595411ff5b86ae5a3dc2c325c726ff0388feebb7d1de76d9c4693e7a77b33adcbd2d25e778068bf745084e1fb1a4ebfeeb4e - languageName: node - linkType: hard - -"undici@npm:^5.28.3": +"undici@npm:^5.12.0, undici@npm:^5.14.0, undici@npm:^5.28.2, undici@npm:^5.28.3": version: 5.28.4 resolution: "undici@npm:5.28.4" dependencies: @@ -53883,20 +49471,26 @@ __metadata: languageName: node linkType: hard +"undici@npm:^6.19.5": + version: 6.20.1 + resolution: "undici@npm:6.20.1" + checksum: 10/68604b53754a95ec89d52efc08fe3e70e333997300c9a5b69f2b6496f1f0f568b2e35adec6442985a7b1d2f7a5648ef5062d1736e4d68082d473cb82177674bc + languageName: node + linkType: hard + "unicode-canonical-property-names-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" - checksum: 10/39be078afd014c14dcd957a7a46a60061bc37c4508ba146517f85f60361acf4c7539552645ece25de840e17e293baa5556268d091ca6762747fdd0c705001a45 + version: 2.0.1 + resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.1" + checksum: 10/3c3dabdb1d22aef4904399f9e810d0b71c0b12b3815169d96fac97e56d5642840c6071cf709adcace2252bc6bb80242396c2ec74b37224eb015c5f7aca40bad7 languageName: node linkType: hard "unicode-length@npm:^2.0.2": - version: 2.0.2 - resolution: "unicode-length@npm:2.0.2" + version: 2.1.0 + resolution: "unicode-length@npm:2.1.0" dependencies: punycode: "npm:^2.0.0" - strip-ansi: "npm:^3.0.1" - checksum: 10/767ef3f4752f4db80a904bd7229d96d9bb697f45a9646b2cf06322ed8e3d0c17f32b6a46b44258aa9eeb7d0b217faf92c4d9d945c6ed8f708d0406358a1a3e1c + checksum: 10/236b008a549599fb698395756c982450c3fbe6859940e53c84da8b4e98dd49f7009478e23704397c02a708a2a64e25b60feb6b81bf6130c801122ee864267c17 languageName: node linkType: hard @@ -53910,24 +49504,17 @@ __metadata: languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.0.0" - checksum: 10/a99f100f416ec013d94dfdb4216b3f766a9aa661b1c9fdb0d32cdb449a97832741719421606216341525c5a4cda09a8c8b6578553bc023b135b3e7eae205cb53 - languageName: node - linkType: hard - "unicode-match-property-value-ecmascript@npm:^2.1.0": - version: 2.1.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" - checksum: 10/06661bc8aba2a60c7733a7044f3e13085808939ad17924ffd4f5222a650f88009eb7c09481dc9c15cfc593d4ad99bd1cde8d54042733b335672591a81c52601c + version: 2.2.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.2.0" + checksum: 10/9fd53c657aefe5d3cb8208931b4c34fbdb30bb5aa9a6c6bf744e2f3036f00b8889eeaf30cb55a873b76b6ee8b5801ea770e1c49b3352141309f58f0ebb3011d8 languageName: node linkType: hard "unicode-property-aliases-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-property-aliases-ecmascript@npm:2.0.0" - checksum: 10/dda4d39128cbbede2ac60fbb85493d979ec65913b8a486bf7cb7a375a2346fa48cbf9dc6f1ae23376e7e8e684c2b411434891e151e865a661b40a85407db51d0 + version: 2.1.0 + resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" + checksum: 10/243524431893649b62cc674d877bd64ef292d6071dd2fd01ab4d5ad26efbc104ffcd064f93f8a06b7e4ec54c172bf03f6417921a0d8c3a9994161fe1f88f815b languageName: node linkType: hard @@ -53966,6 +49553,15 @@ __metadata: languageName: node linkType: hard +"unique-filename@npm:^2.0.0": + version: 2.0.1 + resolution: "unique-filename@npm:2.0.1" + dependencies: + unique-slug: "npm:^3.0.0" + checksum: 10/807acf3381aff319086b64dc7125a9a37c09c44af7620bd4f7f3247fcd5565660ac12d8b80534dcbfd067e6fe88a67e621386dd796a8af828d1337a8420a255f + languageName: node + linkType: hard + "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" @@ -53984,6 +49580,15 @@ __metadata: languageName: node linkType: hard +"unique-slug@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-slug@npm:3.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/26fc5bc209a875956dd5e84ca39b89bc3be777b112504667c35c861f9547df95afc80439358d836b878b6d91f6ee21fe5ba1a966e9ec2e9f071ddf3fd67d45ee + languageName: node + linkType: hard + "unique-slug@npm:^4.0.0": version: 4.0.0 resolution: "unique-slug@npm:4.0.0" @@ -54002,6 +49607,54 @@ __metadata: languageName: node linkType: hard +"unist-util-is@npm:^6.0.0": + version: 6.0.0 + resolution: "unist-util-is@npm:6.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/edd6a93fb2255addf4b9eeb304c1da63c62179aef793169dd64ab955cf2f6814885fe25f95f8105893e3562dead348af535718d7a84333826e0491c04bf42511 + languageName: node + linkType: hard + +"unist-util-position@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-position@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/89d4da00e74618d7562ac7ac288961df9bcd4ccca6df3b5a90650f018eceb6b95de6e771e88bdbef46cc9d96861d456abe57b7ad1108921e0feb67c6292aa29d + languageName: node + linkType: hard + +"unist-util-stringify-position@npm:^4.0.0": + version: 4.0.0 + resolution: "unist-util-stringify-position@npm:4.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/d15c88aca7a31902d95d5b5355bbe09583cf6f6ff6e59e134ef76c76d3c30bc1021f2d7ea5b7897c6d0858ed5f3770c1b19de9c78274f50d72f95a0d05f1af71 + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^6.0.0": + version: 6.0.1 + resolution: "unist-util-visit-parents@npm:6.0.1" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10/645b3cbc5e923bc692b1eb1a9ca17bffc5aabc25e6090ff3f1489bff8effd1890b28f7a09dc853cb6a7fa0da8581bfebc9b670a68b53c4c086cb9610dfd37701 + languageName: node + linkType: hard + +"unist-util-visit@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-visit@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + unist-util-visit-parents: "npm:^6.0.0" + checksum: 10/f2bbde23641e9ade7640358c06ddeec0f38342322eb8e7819d9ee380b0f859d25d084dde22bf63db0280b3b2f36575f15aa1d6c23acf276c91c2493cf799e3b0 + languageName: node + linkType: hard + "universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": version: 7.0.2 resolution: "universal-user-agent@npm:7.0.2" @@ -54016,17 +49669,10 @@ __metadata: languageName: node linkType: hard -"universalify@npm:^0.2.0": - version: 0.2.0 - resolution: "universalify@npm:0.2.0" - checksum: 10/e86134cb12919d177c2353196a4cc09981524ee87abf621f7bc8d249dbbbebaec5e7d1314b96061497981350df786e4c5128dbf442eba104d6e765bc260678b5 - languageName: node - linkType: hard - "universalify@npm:^2.0.0": - version: 2.0.0 - resolution: "universalify@npm:2.0.0" - checksum: 10/2406a4edf4a8830aa6813278bab1f953a8e40f2f63a37873ffa9a3bc8f9745d06cc8e88f3572cb899b7e509013f7f6fcc3e37e8a6d914167a5381d8440518c44 + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 10/ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 languageName: node linkType: hard @@ -54068,81 +49714,17 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.10": - version: 1.0.10 - resolution: "update-browserslist-db@npm:1.0.10" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - browserslist-lint: cli.js - checksum: 10/2c88096ca99918efc77a514458c4241b3f2a8e7882aa91b97251231240c30c71e82cb2043aaf12e40eba6bebda3369010e180a58bc11bbd0bca29094945c31cb - languageName: node - linkType: hard - -"update-browserslist-db@npm:^1.0.11": - version: 1.0.11 - resolution: "update-browserslist-db@npm:1.0.11" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10/cc1c7a38d15413046bea28ff3c7668a7cb6b4a53d83e8089fa960efd896deb6d1a9deffc2beb8dc0506186a352c8d19804efe5ec7eeb401037e14cf3ea5363f8 - languageName: node - linkType: hard - -"update-browserslist-db@npm:^1.0.13": - version: 1.0.13 - resolution: "update-browserslist-db@npm:1.0.13" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10/9074b4ef34d2ed931f27d390aafdd391ee7c45ad83c508e8fed6aaae1eb68f81999a768ed8525c6f88d4001a4fbf1b8c0268f099d0e8e72088ec5945ac796acf - languageName: node - linkType: hard - -"update-browserslist-db@npm:^1.1.0": - version: 1.1.0 - resolution: "update-browserslist-db@npm:1.1.0" +"update-browserslist-db@npm:^1.1.1": + version: 1.1.1 + resolution: "update-browserslist-db@npm:1.1.1" dependencies: - escalade: "npm:^3.1.2" - picocolors: "npm:^1.0.1" + escalade: "npm:^3.2.0" + picocolors: "npm:^1.1.0" peerDependencies: browserslist: ">= 4.21.0" bin: update-browserslist-db: cli.js - checksum: 10/d70b9efeaf4601aadb1a4f6456a7a5d9118e0063d995866b8e0c5e0cf559482671dab6ce7b079f9536b06758a344fbd83f974b965211e1c6e8d1958540b0c24c - languageName: node - linkType: hard - -"update-notifier@npm:^5.1.0": - version: 5.1.0 - resolution: "update-notifier@npm:5.1.0" - dependencies: - boxen: "npm:^5.0.0" - chalk: "npm:^4.1.0" - configstore: "npm:^5.0.1" - has-yarn: "npm:^2.1.0" - import-lazy: "npm:^2.1.0" - is-ci: "npm:^2.0.0" - is-installed-globally: "npm:^0.4.0" - is-npm: "npm:^5.0.0" - is-yarn-global: "npm:^0.3.0" - latest-version: "npm:^5.1.0" - pupa: "npm:^2.1.1" - semver: "npm:^7.3.4" - semver-diff: "npm:^3.1.1" - xdg-basedir: "npm:^4.0.0" - checksum: 10/9df39e2d4f2e59ea788c719baaacf3d2bdde09d065f00319d52c0af255990e15f98ba40c115fb6246b6b2d5468685f36955ae0679c0b7fec834892fe7db4cab2 + checksum: 10/7678dd8609750588d01aa7460e8eddf2ff9d16c2a52fb1811190e0d056390f1fdffd94db3cf8fb209cf634ab4fa9407886338711c71cc6ccade5eeb22b093734 languageName: node linkType: hard @@ -54171,6 +49753,13 @@ __metadata: languageName: node linkType: hard +"uri-js-replace@npm:^1.0.1": + version: 1.0.1 + resolution: "uri-js-replace@npm:1.0.1" + checksum: 10/9c6761023a66eea5c7ff75127e3ea733a64362e4fd232203f627ace86d5f170dc69eda80449e3457448591b8a11e566e29cc0746da6392c9f8de4d5911f57e51 + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -54208,15 +49797,6 @@ __metadata: languageName: node linkType: hard -"url-parse-lax@npm:^1.0.0": - version: 1.0.0 - resolution: "url-parse-lax@npm:1.0.0" - dependencies: - prepend-http: "npm:^1.0.1" - checksum: 10/03316acff753845329652258c16d1688765ee34f7d242a94dadf9ff6e43ea567ec062cec7aa27c37f76f2c57f95e0660695afff32fb97b527591c7340a3090fa - languageName: node - linkType: hard - "url-parse-lax@npm:^3.0.0": version: 3.0.0 resolution: "url-parse-lax@npm:3.0.0" @@ -54226,16 +49806,6 @@ __metadata: languageName: node linkType: hard -"url-parse@npm:^1.5.3": - version: 1.5.10 - resolution: "url-parse@npm:1.5.10" - dependencies: - querystringify: "npm:^2.1.1" - requires-port: "npm:^1.0.0" - checksum: 10/c9e96bc8c5b34e9f05ddfeffc12f6aadecbb0d971b3cc26015b58d5b44676a99f50d5aeb1e5c9e61fa4d49961ae3ab1ae997369ed44da51b2f5ac010d188e6ad - languageName: node - linkType: hard - "url-set-query@npm:^1.0.0": version: 1.0.0 resolution: "url-set-query@npm:1.0.0" @@ -54250,13 +49820,6 @@ __metadata: languageName: node linkType: hard -"url-to-options@npm:^1.0.1": - version: 1.0.1 - resolution: "url-to-options@npm:1.0.1" - checksum: 10/20e59f4578525fb0d30ffc22b13b5aa60bc9e57cefd4f5842720f5b57211b6dec54abeae2d675381ac4486fd1a2e987f1318725dea996e503ff89f8c8ce2c17e - languageName: node - linkType: hard - "url@npm:0.10.3": version: 0.10.3 resolution: "url@npm:0.10.3" @@ -54268,12 +49831,12 @@ __metadata: linkType: hard "url@npm:^0.11.0": - version: 0.11.0 - resolution: "url@npm:0.11.0" + version: 0.11.4 + resolution: "url@npm:0.11.4" dependencies: - punycode: "npm:1.3.2" - querystring: "npm:0.2.0" - checksum: 10/beec744c7ade6ef178fd631e2fe70110c5c53f9e7caea5852703214bfcbf03fd136b98b3b6f4a08bd2420a76f569cbc10c2a86ade7f836ac7d9ff27ed62d8d2d + punycode: "npm:^1.4.1" + qs: "npm:^6.12.3" + checksum: 10/e787d070f0756518b982a4653ef6cdf4d9030d8691eee2d483344faf2b530b71d302287fa63b292299455fea5075c502a5ad5f920cb790e95605847f957a65e4 languageName: node linkType: hard @@ -54313,19 +49876,19 @@ __metadata: linkType: hard "utf-8-validate@npm:^5.0.2": - version: 5.0.8 - resolution: "utf-8-validate@npm:5.0.8" + version: 5.0.10 + resolution: "utf-8-validate@npm:5.0.10" dependencies: node-gyp: "npm:latest" node-gyp-build: "npm:^4.3.0" - checksum: 10/d7ab0fd3c5ee1d12c651e16e939f90e787517fc98ab934968c566cf26a112ba1da075962c6a7d9e3e6f5a29638ef87498e938ad39b08730f5b77866fe7cde2c2 + checksum: 10/b89cbc13b4badad04828349ebb7aa2ab1edcb02b46ab12ce0ba5b2d6886d684ad4e93347819e3c8d36224c8742422d2dca69f5cc16c72ae4d7eeecc0c5cb544b languageName: node linkType: hard "utf8-byte-length@npm:^1.0.1": - version: 1.0.4 - resolution: "utf8-byte-length@npm:1.0.4" - checksum: 10/f188ca076ec094d58e7009fcc32623c5830c7f0f3e15802bfa4fdd1e759454a481fc4ac05e0fa83b7736e77af628a9ee0e57dcc89683d688fde3811473e42143 + version: 1.0.5 + resolution: "utf8-byte-length@npm:1.0.5" + checksum: 10/168edff8f7baca974b5bfb5256cebd57deaef8fbf2d0390301dd1009da52de64774d62f088254c94021e372147b6c938aa82f2318a3a19f9ebd21e48b7f40029 languageName: node linkType: hard @@ -54377,21 +49940,7 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.0, util@npm:^0.12.4": - version: 0.12.4 - resolution: "util@npm:0.12.4" - dependencies: - inherits: "npm:^2.0.3" - is-arguments: "npm:^1.0.4" - is-generator-function: "npm:^1.0.7" - is-typed-array: "npm:^1.1.3" - safe-buffer: "npm:^5.1.2" - which-typed-array: "npm:^1.1.2" - checksum: 10/8287e2fdff2a98997a3436663535856e6be76ca1c7b6ed167b89a3dd6fbaf6934338ca2e34a189bcd6c6cf415680d20472381ac681bff07d33ef98c6f7126296 - languageName: node - linkType: hard - -"util@npm:^0.12.5": +"util@npm:^0.12.0, util@npm:^0.12.4, util@npm:^0.12.5": version: 0.12.5 resolution: "util@npm:0.12.5" dependencies: @@ -54461,7 +50010,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^3.3.2, uuid@npm:^3.3.3": +"uuid@npm:^3.3.2": version: 3.4.0 resolution: "uuid@npm:3.4.0" bin: @@ -54470,13 +50019,6 @@ __metadata: languageName: node linkType: hard -"v8-compile-cache-lib@npm:^3.0.0": - version: 3.0.0 - resolution: "v8-compile-cache-lib@npm:3.0.0" - checksum: 10/90cfbe591c47e0b69c3ddf6b224dd3cfd4e00e67aedd71c35896d5edf72312410cf223230048176a93d6621c78c00e38b9f62edbe125b2454484a84f3092f7e7 - languageName: node - linkType: hard - "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1" @@ -54496,13 +50038,13 @@ __metadata: linkType: hard "v8-to-istanbul@npm:^9.0.1": - version: 9.1.0 - resolution: "v8-to-istanbul@npm:9.1.0" + version: 9.3.0 + resolution: "v8-to-istanbul@npm:9.3.0" dependencies: "@jridgewell/trace-mapping": "npm:^0.3.12" "@types/istanbul-lib-coverage": "npm:^2.0.1" - convert-source-map: "npm:^1.6.0" - checksum: 10/95811ff2f17a31432c3fc7b3027b7e8c2c6ca5e60a7811c5050ce51920ab2b80df29feb04c52235bbfdaa9a6809acd5a5dd9668292e98c708617c19e087c3f68 + convert-source-map: "npm:^2.0.0" + checksum: 10/fb1d70f1176cb9dc46cabbb3fd5c52c8f3e8738b61877b6e7266029aed0870b04140e3f9f4550ac32aebcfe1d0f38b0bac57e1e8fb97d68fec82f2b416148166 languageName: node linkType: hard @@ -54517,29 +50059,13 @@ __metadata: linkType: hard "validate-npm-package-name@npm:^5.0.0": - version: 5.0.0 - resolution: "validate-npm-package-name@npm:5.0.0" - dependencies: - builtins: "npm:^5.0.0" - checksum: 10/5342a994986199b3c28e53a8452a14b2bb5085727691ea7aa0d284a6606b127c371e0925ae99b3f1ef7cc7d2c9de75f52eb61a3d1cc45e39bca1e3a9444cbb4e - languageName: node - linkType: hard - -"validator@npm:^13.6.0": - version: 13.7.0 - resolution: "validator@npm:13.7.0" - checksum: 10/c317ec88358a170d9fe3fa47e7f5367b37f41791a5460227aaaa11580c3c9bd27f16b8e0ce47d558e2d7ab318d7ad4d3980f05e2509f0fdc9f89b2e2ae860150 - languageName: node - linkType: hard - -"validator@npm:^13.7.0": - version: 13.11.0 - resolution: "validator@npm:13.11.0" - checksum: 10/4bf094641eb71729c06a42d669840e7189597ba655a8264adabac9bf03f95cd6fde5fbc894b0a13ee861bd4a852f56d2afdc9391aeaeb3fc0f9633a974140e12 + version: 5.0.1 + resolution: "validate-npm-package-name@npm:5.0.1" + checksum: 10/0d583a1af23aeffea7748742cf22b6802458736fb8b60323ba5949763824d46f796474b0e1b9206beb716f9d75269e19dbd7795d6b038b29d561be95dd827381 languageName: node linkType: hard -"validator@npm:^13.9.0": +"validator@npm:^13.6.0, validator@npm:^13.7.0, validator@npm:^13.9.0": version: 13.12.0 resolution: "validator@npm:13.12.0" checksum: 10/db6eb0725e2b67d60d30073ae8573982713b5903195d031dc3c7db7e82df8b74e8c13baef8e2106d146d979599fd61a06cde1fec5c148e4abd53d52817ff0fd9 @@ -54603,6 +50129,26 @@ __metadata: languageName: node linkType: hard +"vfile-message@npm:^4.0.0": + version: 4.0.2 + resolution: "vfile-message@npm:4.0.2" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-stringify-position: "npm:^4.0.0" + checksum: 10/1a5a72bf4945a7103750a3001bd979088ce42f6a01efa8590e68b2425e1afc61ddc5c76f2d3c4a7053b40332b24c09982b68743223e99281158fe727135719fc + languageName: node + linkType: hard + +"vfile@npm:^6.0.0": + version: 6.0.3 + resolution: "vfile@npm:6.0.3" + dependencies: + "@types/unist": "npm:^3.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/a5a85293c9eb8787aa42e180edaef00c13199a493d6ed82fecf13ab29a68526850788e22434d77808ea6b17a74e03ff899b9b4711df5b9eee75afcddd7c2e1fb + languageName: node + linkType: hard + "visit-values@npm:^2.0.0": version: 2.0.0 resolution: "visit-values@npm:2.0.0" @@ -54611,18 +50157,19 @@ __metadata: linkType: hard "vite@npm:>4.5.1": - version: 5.3.3 - resolution: "vite@npm:5.3.3" + version: 5.4.10 + resolution: "vite@npm:5.4.10" dependencies: esbuild: "npm:^0.21.3" fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.39" - rollup: "npm:^4.13.0" + postcss: "npm:^8.4.43" + rollup: "npm:^4.20.0" peerDependencies: "@types/node": ^18.0.0 || >=20.0.0 less: "*" lightningcss: ^1.21.0 sass: "*" + sass-embedded: "*" stylus: "*" sugarss: "*" terser: ^5.4.0 @@ -54638,6 +50185,8 @@ __metadata: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -54646,7 +50195,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10/e7a094cefedad9e204b715588502118e07d1b9c00c617f55b810169181907f55144f0a82f650995d6a74f12e3695fca65afc348b475b91a81dcbd0274d30a088 + checksum: 10/5d4a427d585d6f9114fc383114f707dca46408f54b221709e5eb6b0c16e0b4dec4baf908a7db9a8f1e5b16e64b655900ac14629abe61c698cbe296115c65ed8a languageName: node linkType: hard @@ -54719,7 +50268,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:2.4.0, watchpack@npm:^2.4.0": +"watchpack@npm:2.4.0": version: 2.4.0 resolution: "watchpack@npm:2.4.0" dependencies: @@ -54729,7 +50278,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.4.1": +"watchpack@npm:^2.4.0, watchpack@npm:^2.4.1": version: 2.4.2 resolution: "watchpack@npm:2.4.2" dependencies: @@ -54768,9 +50317,9 @@ __metadata: linkType: hard "web-streams-polyfill@npm:^3.0.3": - version: 3.2.1 - resolution: "web-streams-polyfill@npm:3.2.1" - checksum: 10/08fcf97b7883c1511dd3da794f50e9bde75a660884783baaddb2163643c21a94086f394dc4bd20dff0f55c98d98d60c4bea05a5809ef5005bdf835b63ada8900 + version: 3.3.3 + resolution: "web-streams-polyfill@npm:3.3.3" + checksum: 10/8e7e13501b3834094a50abe7c0b6456155a55d7571312b89570012ef47ec2a46d766934768c50aabad10a9c30dd764a407623e8bfcc74fcb58495c29130edea9 languageName: node linkType: hard @@ -55249,7 +50798,7 @@ __metadata: languageName: node linkType: hard -"web3-core@npm:4.1.1, web3-core@npm:^4.0.3, web3-core@npm:^4.1.1": +"web3-core@npm:4.1.1": version: 4.1.1 resolution: "web3-core@npm:4.1.1" dependencies: @@ -55268,46 +50817,7 @@ __metadata: languageName: node linkType: hard -"web3-core@npm:^4.3.0": - version: 4.3.0 - resolution: "web3-core@npm:4.3.0" - dependencies: - web3-errors: "npm:^1.1.3" - web3-eth-iban: "npm:^4.0.7" - web3-providers-http: "npm:^4.1.0" - web3-providers-ipc: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - dependenciesMeta: - web3-providers-ipc: - optional: true - checksum: 10/843dd58068672f94313bb56632050be64671afcdb2d0fc7861f6d1db8cc1856e4d6ad7822000b8f6658b4f6dcd94e4cc0dc53f6c9aeb250aedd1367e3652423f - languageName: node - linkType: hard - -"web3-core@npm:^4.3.2": - version: 4.3.2 - resolution: "web3-core@npm:4.3.2" - dependencies: - web3-errors: "npm:^1.1.4" - web3-eth-accounts: "npm:^4.1.0" - web3-eth-iban: "npm:^4.0.7" - web3-providers-http: "npm:^4.1.0" - web3-providers-ipc: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.0" - web3-validator: "npm:^2.0.3" - dependenciesMeta: - web3-providers-ipc: - optional: true - checksum: 10/270351475dcb1438022be1edaee8efe59a9eb976ab61ca10c0b9512b4abab6d5976fe720daab6924a495179702f2008856f19788de272e6a039cb96e0a6184e7 - languageName: node - linkType: hard - -"web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.5.1, web3-core@npm:^4.6.0, web3-core@npm:^4.7.0": +"web3-core@npm:^4.0.3, web3-core@npm:^4.1.1, web3-core@npm:^4.3.2, web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.6.0, web3-core@npm:^4.7.0": version: 4.7.0 resolution: "web3-core@npm:4.7.0" dependencies: @@ -55327,61 +50837,7 @@ __metadata: languageName: node linkType: hard -"web3-errors@npm:^1.0.2": - version: 1.0.2 - resolution: "web3-errors@npm:1.0.2" - dependencies: - web3-types: "npm:^1.0.2" - checksum: 10/e878e464eeabcd128704c031f4ce9652af3fff826ae5c3c8c10955ddf49f7ac3187ca6724eb9561582440c34cca36f0c99f60dff02f23ab1ed4229ab2fadd9a5 - languageName: node - linkType: hard - -"web3-errors@npm:^1.1.1": - version: 1.1.1 - resolution: "web3-errors@npm:1.1.1" - dependencies: - web3-types: "npm:^1.1.1" - checksum: 10/0f565b44a459d33899d623faac1f49d14f9cbdd9e626ef11c3def21bdbfeb651de903fe1119eae585f27064570a1de4881b1f4f5e9267b492de88788c1c3b09b - languageName: node - linkType: hard - -"web3-errors@npm:^1.1.2": - version: 1.1.2 - resolution: "web3-errors@npm:1.1.2" - dependencies: - web3-types: "npm:^1.2.0" - checksum: 10/9070740a08c57a539c1f0281546450c8b7129724ddde3f8a34855c01f1e1e689b58eb3ec3639bc505539b15e9355cd3e6548ee2b5ddeeeda79ce4af2d8e556ab - languageName: node - linkType: hard - -"web3-errors@npm:^1.1.3": - version: 1.1.3 - resolution: "web3-errors@npm:1.1.3" - dependencies: - web3-types: "npm:^1.3.0" - checksum: 10/3c55ec64e1e9aa0883a894fc18c88b53a6880ab40172ed413334cf1cad34e589ee306f057be00322e3b538d86d420bcfc9571de3a382497fcc87160c52e20713 - languageName: node - linkType: hard - -"web3-errors@npm:^1.1.4": - version: 1.1.4 - resolution: "web3-errors@npm:1.1.4" - dependencies: - web3-types: "npm:^1.3.1" - checksum: 10/b0773a7df2338efc624963e55719894386303703ce393e5ce677fef0c7b4a5293556530386577010f1086a9fa7534346b83c4fc014e79c1107950e20a047b2f2 - languageName: node - linkType: hard - -"web3-errors@npm:^1.2.0": - version: 1.2.0 - resolution: "web3-errors@npm:1.2.0" - dependencies: - web3-types: "npm:^1.6.0" - checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d - languageName: node - linkType: hard - -"web3-errors@npm:^1.3.0": +"web3-errors@npm:^1.0.2, web3-errors@npm:^1.1.1, web3-errors@npm:^1.1.2, web3-errors@npm:^1.1.3, web3-errors@npm:^1.1.4, web3-errors@npm:^1.2.0, web3-errors@npm:^1.3.0": version: 1.3.0 resolution: "web3-errors@npm:1.3.0" dependencies: @@ -55466,55 +50922,16 @@ __metadata: languageName: node linkType: hard -"web3-eth-abi@npm:^4.0.3, web3-eth-abi@npm:^4.1.1": - version: 4.1.1 - resolution: "web3-eth-abi@npm:4.1.1" - dependencies: - "@ethersproject/abi": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/0764149e73ca3eae0c525ba813529aa6e452050eaad72880da26ea83f66b47a5f95ead75ba1048aeb621b4398bfa5703fcac1192f6c38ae7e7028a5e6da53f89 - languageName: node - linkType: hard - -"web3-eth-abi@npm:^4.1.4": - version: 4.1.4 - resolution: "web3-eth-abi@npm:4.1.4" - dependencies: - abitype: "npm:0.7.1" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/66fad9b39e18b8d41231f5ce00ca75522025c7eacbfd734e9d08a8214ce33b7732569a93cbb37a43fedd1c22503bc27006abbdfcdcf53726cde8e5c9dfa84044 - languageName: node - linkType: hard - -"web3-eth-abi@npm:^4.2.0": - version: 4.2.0 - resolution: "web3-eth-abi@npm:4.2.0" - dependencies: - abitype: "npm:0.7.1" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - web3-utils: "npm:^4.1.1" - web3-validator: "npm:^2.0.4" - checksum: 10/df903dad3b41932a60504d7c532c515b47bb44bd2d338118633ecc69ffe74122fe0346fc6047cdd623eae3c9382b2fabe41156115cfafa4701616bba6577a6dd - languageName: node - linkType: hard - -"web3-eth-abi@npm:^4.2.3, web3-eth-abi@npm:^4.3.0": - version: 4.3.0 - resolution: "web3-eth-abi@npm:4.3.0" +"web3-eth-abi@npm:^4.0.3, web3-eth-abi@npm:^4.1.1, web3-eth-abi@npm:^4.2.0, web3-eth-abi@npm:^4.4.0": + version: 4.4.0 + resolution: "web3-eth-abi@npm:4.4.0" dependencies: abitype: "npm:0.7.1" web3-errors: "npm:^1.3.0" - web3-types: "npm:^1.8.1" + web3-types: "npm:^1.9.0" web3-utils: "npm:^4.3.2" web3-validator: "npm:^2.0.6" - checksum: 10/e490ad7142ae14c2def2b596551b54e83727af76a96ee4854e236cd19477028960eb944af258c42efc4646fc0b685ae4f3b3f2e0c4c75e15bfc346fc05c1ff6e + checksum: 10/e55859ac1deec4d75f113c247ac1987aa8142a88f0b7c2488df5de5e00a45e7b3e4f601e685ff35b8c0bdd7495baa84ce3fac89e00ca86beae8857e46af78e0c languageName: node linkType: hard @@ -55626,7 +51043,7 @@ __metadata: languageName: node linkType: hard -"web3-eth-accounts@npm:4.1.1, web3-eth-accounts@npm:^4.1.1": +"web3-eth-accounts@npm:4.1.1": version: 4.1.1 resolution: "web3-eth-accounts@npm:4.1.1" dependencies: @@ -55641,48 +51058,18 @@ __metadata: languageName: node linkType: hard -"web3-eth-accounts@npm:^4.0.3, web3-eth-accounts@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-accounts@npm:4.0.5" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/37e9e2d909544e3d9b8b9bf3168365cd068653b18880cb65835c9b2a3acefc885ecb18de52ead56f7a3663b33a6bb58d19e4e9fc21f2618cd9cb262a355a7dc1 - languageName: node - linkType: hard - -"web3-eth-accounts@npm:^4.1.0": - version: 4.1.0 - resolution: "web3-eth-accounts@npm:4.1.0" - dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/2048b3d1211593a44921a7cf200a2a407d82f832eae5751aa3b193012f4c084038814878c9423988636435f9b41967769a854ab643fb7d3cda8d898ad070be26 - languageName: node - linkType: hard - -"web3-eth-accounts@npm:^4.2.1": - version: 4.2.1 - resolution: "web3-eth-accounts@npm:4.2.1" +"web3-eth-accounts@npm:^4.0.3, web3-eth-accounts@npm:^4.0.5, web3-eth-accounts@npm:^4.1.1, web3-eth-accounts@npm:^4.2.1, web3-eth-accounts@npm:^4.3.0": + version: 4.3.0 + resolution: "web3-eth-accounts@npm:4.3.0" dependencies: "@ethereumjs/rlp": "npm:^4.0.1" crc-32: "npm:^1.2.2" ethereum-cryptography: "npm:^2.0.0" web3-errors: "npm:^1.3.0" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" + web3-types: "npm:^1.9.0" + web3-utils: "npm:^4.3.2" web3-validator: "npm:^2.0.6" - checksum: 10/a19a2bad97ed9cc7a82af6ce6acba906f3ed8829116bda1dcd72dd4ee7e31d332239f7464cfa89f053dffcef857fc284777474571e68878dbc2377057f9ea329 + checksum: 10/ad636a6d1deed2e19c1fbe693a8550792daf0be08b73a57a505d736ce7ed92453852b721df8172c243b67c9513562b2fc91a8099cae429da81059056fda66161 languageName: node linkType: hard @@ -55766,7 +51153,7 @@ __metadata: languageName: node linkType: hard -"web3-eth-contract@npm:4.2.0, web3-eth-contract@npm:^4.2.0": +"web3-eth-contract@npm:4.2.0": version: 4.2.0 resolution: "web3-eth-contract@npm:4.2.0" dependencies: @@ -55781,49 +51168,19 @@ __metadata: languageName: node linkType: hard -"web3-eth-contract@npm:4.7.0, web3-eth-contract@npm:^4.5.0, web3-eth-contract@npm:^4.7.0": - version: 4.7.0 - resolution: "web3-eth-contract@npm:4.7.0" +"web3-eth-contract@npm:^4.0.3, web3-eth-contract@npm:^4.0.5, web3-eth-contract@npm:^4.2.0, web3-eth-contract@npm:^4.5.0": + version: 4.7.1 + resolution: "web3-eth-contract@npm:4.7.1" dependencies: "@ethereumjs/rlp": "npm:^5.0.2" - web3-core: "npm:^4.5.1" + web3-core: "npm:^4.7.0" web3-errors: "npm:^1.3.0" - web3-eth: "npm:^4.8.2" - web3-eth-abi: "npm:^4.2.3" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" + web3-eth: "npm:^4.11.0" + web3-eth-abi: "npm:^4.4.0" + web3-types: "npm:^1.9.0" + web3-utils: "npm:^4.3.2" web3-validator: "npm:^2.0.6" - checksum: 10/1ae62530fdf1389aa896af527c028e3c39ca16e2318e010d07e6b7d421abb8b1c6a6dbe834d3317098a29a6c8ad47f057d17e1c9602dc0060b689c331c3ce440 - languageName: node - linkType: hard - -"web3-eth-contract@npm:^4.0.3, web3-eth-contract@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-contract@npm:4.0.5" - dependencies: - web3-core: "npm:^4.1.1" - web3-errors: "npm:^1.1.1" - web3-eth: "npm:^4.1.1" - web3-eth-abi: "npm:^4.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/6629b627afa26ea9f083812ddeca1db869ce76dc26deaa4e503785bc5b1dc26967ce4682a2ac03a59fe54b2212442cb93f5c544552cefe3457d78248c1f4f75d - languageName: node - linkType: hard - -"web3-eth-contract@npm:^4.1.2": - version: 4.1.2 - resolution: "web3-eth-contract@npm:4.1.2" - dependencies: - web3-core: "npm:^4.3.0" - web3-errors: "npm:^1.1.3" - web3-eth: "npm:^4.3.1" - web3-eth-abi: "npm:^4.1.4" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/85a819cb47bd66aab8410ccd6a2d74220b5ba37435b3771ed61a772a6cce234d823a0ed4a2d1e46605d92de4c85bc54c91273258bfb5d47239d7359c155fc791 + checksum: 10/7ea11676efc8219ce3ffe61f2a5c95ab6e1d7428223df673259d0b443608b7676a0fc268f2f05b4c88a1f976bea1989245a889c4ce1be50a243e0e56fcad07a2 languageName: node linkType: hard @@ -55907,41 +51264,7 @@ __metadata: languageName: node linkType: hard -"web3-eth-ens@npm:^4.0.3, web3-eth-ens@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-ens@npm:4.0.5" - dependencies: - "@adraffy/ens-normalize": "npm:^1.8.8" - web3-core: "npm:^4.1.1" - web3-errors: "npm:^1.1.1" - web3-eth: "npm:^4.1.1" - web3-eth-contract: "npm:^4.0.5" - web3-net: "npm:^4.0.5" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/5d47d5f0388e4f4930f1f82a1d249e770cbbe9f8b2d52621afebd904902bdc603f1e6876bec9bd57f6fd121a42fe90804eaf02270b551f9a986b0c3874e697be - languageName: node - linkType: hard - -"web3-eth-ens@npm:^4.0.8": - version: 4.0.8 - resolution: "web3-eth-ens@npm:4.0.8" - dependencies: - "@adraffy/ens-normalize": "npm:^1.8.8" - web3-core: "npm:^4.3.0" - web3-errors: "npm:^1.1.3" - web3-eth: "npm:^4.3.1" - web3-eth-contract: "npm:^4.1.2" - web3-net: "npm:^4.0.7" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/592762e556bc161c0fd7859c8d5f4785f9269f8a62e49aceca5f6d490856ffa8d94130b52907f19199ae0ca758aac3e81531b8847ca57e6abe39ce89ef8a1069 - languageName: node - linkType: hard - -"web3-eth-ens@npm:^4.4.0": +"web3-eth-ens@npm:^4.0.3, web3-eth-ens@npm:^4.0.5, web3-eth-ens@npm:^4.0.8": version: 4.4.0 resolution: "web3-eth-ens@npm:4.4.0" dependencies: @@ -56018,19 +51341,7 @@ __metadata: languageName: node linkType: hard -"web3-eth-iban@npm:^4.0.3, web3-eth-iban@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-iban@npm:4.0.5" - dependencies: - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/76861f57a117c13e89c220555f1a98139098e8c9438c58bba1dd3b2bd2bc652212f50007c05c75b36dd382f41fdef9c4d5eaa0bee1df4f115ff0c22a0ba67dc2 - languageName: node - linkType: hard - -"web3-eth-iban@npm:^4.0.7": +"web3-eth-iban@npm:^4.0.3, web3-eth-iban@npm:^4.0.5, web3-eth-iban@npm:^4.0.7": version: 4.0.7 resolution: "web3-eth-iban@npm:4.0.7" dependencies: @@ -56112,35 +51423,7 @@ __metadata: languageName: node linkType: hard -"web3-eth-personal@npm:^4.0.3, web3-eth-personal@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-eth-personal@npm:4.0.5" - dependencies: - web3-core: "npm:^4.1.1" - web3-eth: "npm:^4.1.1" - web3-rpc-methods: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - web3-validator: "npm:^2.0.1" - checksum: 10/a8acc4a8a20284a3b7741ff785fb751db5c7484148638b91ec7196854ab799a502a119815b4c808380d0b716b2ed0c5b0ed1d4b55407b1d845e4e8feba8958ac - languageName: node - linkType: hard - -"web3-eth-personal@npm:^4.0.8": - version: 4.0.8 - resolution: "web3-eth-personal@npm:4.0.8" - dependencies: - web3-core: "npm:^4.3.0" - web3-eth: "npm:^4.3.1" - web3-rpc-methods: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/6e9ab6298a3469e37bcf8930136673b3eff3ac95a763b5b924cda0861326508a12902c9b53d443057ea9c64b12b0b1ed9b66f3a0031b74746605010880d0fc7c - languageName: node - linkType: hard - -"web3-eth-personal@npm:^4.1.0": +"web3-eth-personal@npm:^4.0.3, web3-eth-personal@npm:^4.0.5, web3-eth-personal@npm:^4.0.8": version: 4.1.0 resolution: "web3-eth-personal@npm:4.1.0" dependencies: @@ -56254,7 +51537,7 @@ __metadata: languageName: node linkType: hard -"web3-eth@npm:4.1.1, web3-eth@npm:^4.0.3, web3-eth@npm:^4.1.1": +"web3-eth@npm:4.1.1": version: 4.1.1 resolution: "web3-eth@npm:4.1.1" dependencies: @@ -56273,45 +51556,7 @@ __metadata: languageName: node linkType: hard -"web3-eth@npm:4.10.0, web3-eth@npm:^4.10.0, web3-eth@npm:^4.8.0, web3-eth@npm:^4.8.2, web3-eth@npm:^4.9.0": - version: 4.10.0 - resolution: "web3-eth@npm:4.10.0" - dependencies: - setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.7.0" - web3-errors: "npm:^1.3.0" - web3-eth-abi: "npm:^4.3.0" - web3-eth-accounts: "npm:^4.2.1" - web3-net: "npm:^4.1.0" - web3-providers-ws: "npm:^4.0.8" - web3-rpc-methods: "npm:^1.3.0" - web3-types: "npm:^1.8.1" - web3-utils: "npm:^4.3.2" - web3-validator: "npm:^2.0.6" - checksum: 10/9dcbce05e160cde8148f2ad9919c56e0ad242beb05c2a013219a7d7ab697f5ca7e3c55089d27bdff50c28eebc36a9e1ae4b8b40c57432bdf5a200ace46d8cdc8 - languageName: node - linkType: hard - -"web3-eth@npm:^4.3.1": - version: 4.3.1 - resolution: "web3-eth@npm:4.3.1" - dependencies: - setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.3.0" - web3-errors: "npm:^1.1.3" - web3-eth-abi: "npm:^4.1.4" - web3-eth-accounts: "npm:^4.1.0" - web3-net: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.7" - web3-rpc-methods: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/b6f09521dd029b6576bb67f0e6e92687236e4101a99030fb72949bbf384aa32db00a9fe6404e3827ceafc1e205d1b0c57a83edd0c82cc9da78c9dc7c13b3121a - languageName: node - linkType: hard - -"web3-eth@npm:^4.4.0": +"web3-eth@npm:4.4.0": version: 4.4.0 resolution: "web3-eth@npm:4.4.0" dependencies: @@ -56330,6 +51575,25 @@ __metadata: languageName: node linkType: hard +"web3-eth@npm:^4.0.3, web3-eth@npm:^4.1.1, web3-eth@npm:^4.11.0, web3-eth@npm:^4.4.0, web3-eth@npm:^4.8.0, web3-eth@npm:^4.9.0": + version: 4.11.0 + resolution: "web3-eth@npm:4.11.0" + dependencies: + setimmediate: "npm:^1.0.5" + web3-core: "npm:^4.7.0" + web3-errors: "npm:^1.3.0" + web3-eth-abi: "npm:^4.4.0" + web3-eth-accounts: "npm:^4.3.0" + web3-net: "npm:^4.1.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.9.0" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/2bdbf15899f52b86970f6aff3b3591499108a1fde516aaf5020887bbda5d5fabf7c379f94eaaeba242f6314df785bb76a40721ec752b11f8255949783f466095 + languageName: node + linkType: hard + "web3-net@npm:1.10.0": version: 1.10.0 resolution: "web3-net@npm:1.10.0" @@ -56385,31 +51649,7 @@ __metadata: languageName: node linkType: hard -"web3-net@npm:^4.0.3, web3-net@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-net@npm:4.0.5" - dependencies: - web3-core: "npm:^4.1.1" - web3-rpc-methods: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/2677a235402f7c500c3008a01c6e64eb692aa7be7270c3911fd37e57dcde073de6c576de24aa12fc56bd07029cd49ed59703b446c68e05304db69ea2908d01c3 - languageName: node - linkType: hard - -"web3-net@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-net@npm:4.0.7" - dependencies: - web3-core: "npm:^4.3.0" - web3-rpc-methods: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - checksum: 10/b013fbbddfb53b872b74443ca3098ec63831f7d65455aadb73c4fc6953c38714b8c84918228229e81a2a3e4bdaf1583f745d2e4937f7f2cc2a97fa60a5f27202 - languageName: node - linkType: hard - -"web3-net@npm:^4.1.0": +"web3-net@npm:^4.0.3, web3-net@npm:^4.0.5, web3-net@npm:^4.0.7, web3-net@npm:^4.1.0": version: 4.1.0 resolution: "web3-net@npm:4.1.0" dependencies: @@ -56489,31 +51729,7 @@ __metadata: languageName: node linkType: hard -"web3-providers-http@npm:^4.0.3, web3-providers-http@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-providers-http@npm:4.0.5" - dependencies: - cross-fetch: "npm:^3.1.5" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/758ef1041cfbaf562918c1a3cbe9617c27c70fb3d95ad2e86e77a1e6ac6ce79042e9cef7ed405a46e44cd2029333d7fdb030a19fb093b515e33cc3667d0626d4 - languageName: node - linkType: hard - -"web3-providers-http@npm:^4.1.0": - version: 4.1.0 - resolution: "web3-providers-http@npm:4.1.0" - dependencies: - cross-fetch: "npm:^4.0.0" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - checksum: 10/d98d3cedd8caadb7f6f8ab6faa74d6f42be5808e729a93d815771fb7287f9fffa9ecdc047dceaac783a329c63947f006bca758f2241dc57070aefb62cdb0f2dc - languageName: node - linkType: hard - -"web3-providers-http@npm:^4.2.0": +"web3-providers-http@npm:^4.0.3, web3-providers-http@npm:^4.0.5, web3-providers-http@npm:^4.1.0, web3-providers-http@npm:^4.2.0": version: 4.2.0 resolution: "web3-providers-http@npm:4.2.0" dependencies: @@ -56585,18 +51801,7 @@ __metadata: languageName: node linkType: hard -"web3-providers-ipc@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-providers-ipc@npm:4.0.5" - dependencies: - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - checksum: 10/74f2a610241a288eb9f5a1dd6c6073ec46db83899fbad0bad95b5a37e4a05274c59fac3ce0346ba0b8a1cd7ab0b1281785c8a8f2cd87b1a21e261c76264e0b51 - languageName: node - linkType: hard - -"web3-providers-ipc@npm:^4.0.7": +"web3-providers-ipc@npm:^4.0.5, web3-providers-ipc@npm:^4.0.7": version: 4.0.7 resolution: "web3-providers-ipc@npm:4.0.7" dependencies: @@ -56673,35 +51878,7 @@ __metadata: languageName: node linkType: hard -"web3-providers-ws@npm:^4.0.3, web3-providers-ws@npm:^4.0.5": - version: 4.0.5 - resolution: "web3-providers-ws@npm:4.0.5" - dependencies: - "@types/ws": "npm:8.5.3" - isomorphic-ws: "npm:^5.0.0" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - web3-utils: "npm:^4.0.5" - ws: "npm:^8.8.1" - checksum: 10/6723f8045ba7f76c62e46a6140c30af537a97b0c651711974155b008fc80a4acc7ca8a9e6c89df7489958f8d25577ac077d976fcc26ab3f6f73f243784712502 - languageName: node - linkType: hard - -"web3-providers-ws@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-providers-ws@npm:4.0.7" - dependencies: - "@types/ws": "npm:8.5.3" - isomorphic-ws: "npm:^5.0.0" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - ws: "npm:^8.8.1" - checksum: 10/ceb2da6a1534bd2f6d60533777b0b1e35de9947d07a856be64499aedbe3ba48f744ab6196dcaf60f252e2a1a7939680dcc15db656f10afe39a17282a89f9d575 - languageName: node - linkType: hard - -"web3-providers-ws@npm:^4.0.8": +"web3-providers-ws@npm:^4.0.3, web3-providers-ws@npm:^4.0.5, web3-providers-ws@npm:^4.0.7, web3-providers-ws@npm:^4.0.8": version: 4.0.8 resolution: "web3-providers-ws@npm:4.0.8" dependencies: @@ -56715,40 +51892,7 @@ __metadata: languageName: node linkType: hard -"web3-rpc-methods@npm:^1.0.2, web3-rpc-methods@npm:^1.1.1": - version: 1.1.1 - resolution: "web3-rpc-methods@npm:1.1.1" - dependencies: - web3-core: "npm:^4.1.1" - web3-types: "npm:^1.1.1" - web3-validator: "npm:^2.0.1" - checksum: 10/694a1a4b97902b9d9129f14d58dacb5138ec94d57c27f76a6f39afa515d84badf71746aa58471858e643bbb70fb40c060ea3a3763e9d76e18324983b7d6623ea - languageName: node - linkType: hard - -"web3-rpc-methods@npm:^1.1.3": - version: 1.1.3 - resolution: "web3-rpc-methods@npm:1.1.3" - dependencies: - web3-core: "npm:^4.3.0" - web3-types: "npm:^1.3.0" - web3-validator: "npm:^2.0.3" - checksum: 10/c5f946b6c3253bb692c962aaf142f37d365b80b39311386b8629ead8fa42dade6c219800673344f96c741fafcdecbbd03dfcb23b896c11f6b756ff1d0410a8fb - languageName: node - linkType: hard - -"web3-rpc-methods@npm:^1.1.4": - version: 1.1.4 - resolution: "web3-rpc-methods@npm:1.1.4" - dependencies: - web3-core: "npm:^4.3.2" - web3-types: "npm:^1.3.1" - web3-validator: "npm:^2.0.3" - checksum: 10/326e059f6f4255511e700abb2329927e3b20be6f17cc3304266fd9282a4e6eff8dc1d73dbbb9c48019b2ab412b456d0bf5b590c05e0dd5629e014500303ed06c - languageName: node - linkType: hard - -"web3-rpc-methods@npm:^1.3.0": +"web3-rpc-methods@npm:^1.0.2, web3-rpc-methods@npm:^1.1.1, web3-rpc-methods@npm:^1.1.4, web3-rpc-methods@npm:^1.3.0": version: 1.3.0 resolution: "web3-rpc-methods@npm:1.3.0" dependencies: @@ -56759,20 +51903,6 @@ __metadata: languageName: node linkType: hard -"web3-rpc-providers@npm:^1.0.0-rc.2": - version: 1.0.0-rc.2 - resolution: "web3-rpc-providers@npm:1.0.0-rc.2" - dependencies: - web3-errors: "npm:^1.3.0" - web3-providers-http: "npm:^4.2.0" - web3-providers-ws: "npm:^4.0.8" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" - web3-validator: "npm:^2.0.6" - checksum: 10/8f1fb9a798cec61f245e6e13b796f1b43231d7bd5eb0db8b5b636b4e2facc75ee1453541237f057292ec7ecdb56ba284c29734cd17ea010c27c5580d6edea787 - languageName: node - linkType: hard - "web3-shh@npm:1.10.0": version: 1.10.0 resolution: "web3-shh@npm:1.10.0" @@ -56833,59 +51963,10 @@ __metadata: languageName: node linkType: hard -"web3-types@npm:^1.0.2": - version: 1.0.2 - resolution: "web3-types@npm:1.0.2" - checksum: 10/a7177f234f65925b758866b5e791614c920d211ee96b76bbb9ac8fccd98754043a016d970656186e34827b21557194b28b0457e55bb94ed39ef478a29708255b - languageName: node - linkType: hard - -"web3-types@npm:^1.1.1": - version: 1.1.1 - resolution: "web3-types@npm:1.1.1" - checksum: 10/46c497edefb621734d98d303f92edda8117c8c1a35afdb89e6964dca0894fb81a0ae557a1277ec323f043ffc42b54eabe70618798364c19245ed6ac4e4841423 - languageName: node - linkType: hard - -"web3-types@npm:^1.2.0": - version: 1.2.0 - resolution: "web3-types@npm:1.2.0" - checksum: 10/f2877350e9c70fe62d5331bda434d3662b507f64236108ca179e2b184d33449e4fb94a29007689cf952733b13f382684376cf7486870ef46feb6fd259a2b9c0e - languageName: node - linkType: hard - -"web3-types@npm:^1.3.0": - version: 1.3.0 - resolution: "web3-types@npm:1.3.0" - checksum: 10/a79bc1d5ed870cdf06d09f4dee1bc9bbcfb81cdea812808216f6555cc0f9704f3d73ebaa1622d2817e929b76a5adf435fff97ff1faf8a6332dc53545aa17f764 - languageName: node - linkType: hard - -"web3-types@npm:^1.3.1": - version: 1.3.1 - resolution: "web3-types@npm:1.3.1" - checksum: 10/f4495471915e66de9dcc1a21095339707e9b0569a799f8347efac324c95fc54322c16e208a0b478a986d6ee2188dc3299898c5125d51664e46d860acd84fe2cc - languageName: node - linkType: hard - -"web3-types@npm:^1.5.0": - version: 1.5.0 - resolution: "web3-types@npm:1.5.0" - checksum: 10/e0146bb69db33303d2e20113b4ccb59696a0f47e4dffb8c49ad96b19e9712a30a881def3771bad8de1fa3ea864b0ebb661cb4907edfaeb5af81abac97ed89d6b - languageName: node - linkType: hard - -"web3-types@npm:^1.6.0": - version: 1.6.0 - resolution: "web3-types@npm:1.6.0" - checksum: 10/9eac2082080c7f73777f57d688041ed4938b0943ff0ece7113c220bd85ddd7ce1191969302bbfbe31464907639270fc54d8e5cd7a7f200262ede81516dda39f9 - languageName: node - linkType: hard - -"web3-types@npm:^1.7.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1": - version: 1.8.1 - resolution: "web3-types@npm:1.8.1" - checksum: 10/e64f7e59806e1875e34a1daaa34e98043fcaebfd2fc96ab9948789129e8da73e812de62f63cf32c347c202d6ba40121f87516b183bb7074f27331fc7f90a46d9 +"web3-types@npm:^1.0.2, web3-types@npm:^1.1.1, web3-types@npm:^1.2.0, web3-types@npm:^1.3.0, web3-types@npm:^1.3.1, web3-types@npm:^1.5.0, web3-types@npm:^1.6.0, web3-types@npm:^1.7.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1, web3-types@npm:^1.9.0": + version: 1.9.0 + resolution: "web3-types@npm:1.9.0" + checksum: 10/3df9e02cedfbf0480e1bcfaccc4d6046d10115548e373f1a1231f925000702c65b0475467a904a854cfbe70cf940f94629e9ce93304a6f91b6f64e1a86418f7b languageName: node linkType: hard @@ -56994,7 +52075,7 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:4.3.0, web3-utils@npm:^4.0.3, web3-utils@npm:^4.0.5, web3-utils@npm:^4.0.7, web3-utils@npm:^4.1.0, web3-utils@npm:^4.1.1, web3-utils@npm:^4.2.3": +"web3-utils@npm:4.3.0": version: 4.3.0 resolution: "web3-utils@npm:4.3.0" dependencies: @@ -57007,7 +52088,7 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.1, web3-utils@npm:^4.3.2": +"web3-utils@npm:^4.0.3, web3-utils@npm:^4.0.5, web3-utils@npm:^4.0.7, web3-utils@npm:^4.1.1, web3-utils@npm:^4.2.3, web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.1, web3-utils@npm:^4.3.2": version: 4.3.2 resolution: "web3-utils@npm:4.3.2" dependencies: @@ -57046,59 +52127,7 @@ __metadata: languageName: node linkType: hard -"web3-validator@npm:^2.0.1": - version: 2.0.1 - resolution: "web3-validator@npm:2.0.1" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.1" - web3-types: "npm:^1.1.1" - zod: "npm:^3.21.4" - checksum: 10/cec9e9194d9a6f6647123488f5cdbad711231543935be585e4c536980462908cedd73092616d5e54b39353079e028b07505a2b5955cdde057ac1dd5c7160101c - languageName: node - linkType: hard - -"web3-validator@npm:^2.0.3": - version: 2.0.3 - resolution: "web3-validator@npm:2.0.3" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - zod: "npm:^3.21.4" - checksum: 10/47186254edb56e196367a7957eee1fc4b926e7053521c63fa55d8b22c9ed402165b48adddf6f173014efaaab8859a709fc5642f8ceba5ba60fba0006f795ee76 - languageName: node - linkType: hard - -"web3-validator@npm:^2.0.4": - version: 2.0.4 - resolution: "web3-validator@npm:2.0.4" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.3.1" - zod: "npm:^3.21.4" - checksum: 10/64e8126debf507afd029c2f54ee5dfd829f0cb5c47ecad6a99b254bd0132e71ba02f1191098b514debd2df07ac3bac9254c8058b98af3138e242defac7224378 - languageName: node - linkType: hard - -"web3-validator@npm:^2.0.5": - version: 2.0.5 - resolution: "web3-validator@npm:2.0.5" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - util: "npm:^0.12.5" - web3-errors: "npm:^1.1.4" - web3-types: "npm:^1.5.0" - zod: "npm:^3.21.4" - checksum: 10/d6aa3366d6fc7227f9451de300ea5a1370570ae52c1bb32dfe827e37a6acbb4b66fc9d6fd106c348f9041968a3824700174ef0a4c250e122e1b448f570c320bf - languageName: node - linkType: hard - -"web3-validator@npm:^2.0.6": +"web3-validator@npm:^2.0.1, web3-validator@npm:^2.0.3, web3-validator@npm:^2.0.4, web3-validator@npm:^2.0.5, web3-validator@npm:^2.0.6": version: 2.0.6 resolution: "web3-validator@npm:2.0.6" dependencies: @@ -57219,31 +52248,6 @@ __metadata: languageName: node linkType: hard -"web3@npm:4.14.0": - version: 4.14.0 - resolution: "web3@npm:4.14.0" - dependencies: - web3-core: "npm:^4.7.0" - web3-errors: "npm:^1.3.0" - web3-eth: "npm:^4.10.0" - web3-eth-abi: "npm:^4.3.0" - web3-eth-accounts: "npm:^4.2.1" - web3-eth-contract: "npm:^4.7.0" - web3-eth-ens: "npm:^4.4.0" - web3-eth-iban: "npm:^4.0.7" - web3-eth-personal: "npm:^4.1.0" - web3-net: "npm:^4.1.0" - web3-providers-http: "npm:^4.2.0" - web3-providers-ws: "npm:^4.0.8" - web3-rpc-methods: "npm:^1.3.0" - web3-rpc-providers: "npm:^1.0.0-rc.2" - web3-types: "npm:^1.8.1" - web3-utils: "npm:^4.3.2" - web3-validator: "npm:^2.0.6" - checksum: 10/cd8db8ace62c73b7c9ae4a1e1eaec99d8c107295e75e1e6fe770c52bcce919ef17c1d84b835d33c595ac72972207f23ae5cbdcb5382656709cc91db82437fc07 - languageName: node - linkType: hard - "web3@npm:4.4.0": version: 4.4.0 resolution: "web3@npm:4.4.0" @@ -57298,16 +52302,16 @@ __metadata: languageName: node linkType: hard -"webcrypto-core@npm:^1.7.7": - version: 1.7.7 - resolution: "webcrypto-core@npm:1.7.7" +"webcrypto-core@npm:^1.8.0": + version: 1.8.1 + resolution: "webcrypto-core@npm:1.8.1" dependencies: - "@peculiar/asn1-schema": "npm:^2.3.6" + "@peculiar/asn1-schema": "npm:^2.3.13" "@peculiar/json-schema": "npm:^1.1.12" - asn1js: "npm:^3.0.1" - pvtsutils: "npm:^1.3.2" - tslib: "npm:^2.4.0" - checksum: 10/e87ac59d7d05c2aa96117c8f589e99ec9556dfc9ff3cd7fe9464de32e60ed6ff237cdfd35ed53c93546dd0d548bab67b244be381e97b162fe87b6d826e8765ae + asn1js: "npm:^3.0.5" + pvtsutils: "npm:^1.3.5" + tslib: "npm:^2.7.0" + checksum: 10/1a03144cb0b34433da0ebff79b1f8b81a17e4edee32614ae310af2b92e97cec24fcf82319a457798fa2c2259808d9cdaecda186655e4ec2616adf8669ffa505c languageName: node linkType: hard @@ -57412,8 +52416,8 @@ __metadata: linkType: hard "webpack-dev-middleware@npm:>=6.1.2": - version: 7.2.1 - resolution: "webpack-dev-middleware@npm:7.2.1" + version: 7.4.2 + resolution: "webpack-dev-middleware@npm:7.4.2" dependencies: colorette: "npm:^2.0.10" memfs: "npm:^4.6.0" @@ -57426,11 +52430,11 @@ __metadata: peerDependenciesMeta: webpack: optional: true - checksum: 10/e1fa9b40cba7b954f901b085cdded62df6f3c10d1d4e24d4850bd35ebe3dcfb18e7159e6579d6ac854e8e3611e5895aaf45ea1f3e29da2287659d36f0cb614d1 + checksum: 10/608d101b82081a5bc6c0237f9945e14a8eefce1664c10877f3feb0042710f6c8b4288b07986505f791302d81b3c51180f679b97c91c3cdabd3fd0687a464ca1c languageName: node linkType: hard -"webpack-dev-server@npm:4.15.1, webpack-dev-server@npm:^4.6.0": +"webpack-dev-server@npm:4.15.1": version: 4.15.1 resolution: "webpack-dev-server@npm:4.15.1" dependencies: @@ -57477,6 +52481,53 @@ __metadata: languageName: node linkType: hard +"webpack-dev-server@npm:^4.6.0": + version: 4.15.2 + resolution: "webpack-dev-server@npm:4.15.2" + dependencies: + "@types/bonjour": "npm:^3.5.9" + "@types/connect-history-api-fallback": "npm:^1.3.5" + "@types/express": "npm:^4.17.13" + "@types/serve-index": "npm:^1.9.1" + "@types/serve-static": "npm:^1.13.10" + "@types/sockjs": "npm:^0.3.33" + "@types/ws": "npm:^8.5.5" + ansi-html-community: "npm:^0.0.8" + bonjour-service: "npm:^1.0.11" + chokidar: "npm:^3.5.3" + colorette: "npm:^2.0.10" + compression: "npm:^1.7.4" + connect-history-api-fallback: "npm:^2.0.0" + default-gateway: "npm:^6.0.3" + express: "npm:^4.17.3" + graceful-fs: "npm:^4.2.6" + html-entities: "npm:^2.3.2" + http-proxy-middleware: "npm:^2.0.3" + ipaddr.js: "npm:^2.0.1" + launch-editor: "npm:^2.6.0" + open: "npm:^8.0.9" + p-retry: "npm:^4.5.0" + rimraf: "npm:^3.0.2" + schema-utils: "npm:^4.0.0" + selfsigned: "npm:^2.1.1" + serve-index: "npm:^1.9.1" + sockjs: "npm:^0.3.24" + spdy: "npm:^4.0.2" + webpack-dev-middleware: "npm:^5.3.4" + ws: "npm:^8.13.0" + peerDependencies: + webpack: ^4.37.0 || ^5.0.0 + peerDependenciesMeta: + webpack: + optional: true + webpack-cli: + optional: true + bin: + webpack-dev-server: bin/webpack-dev-server.js + checksum: 10/86ca4fb49d2a264243b2284c6027a9a91fd7d47737bbb4096e873be8a3f8493a9577b1535d7cc84de1ee991da7da97686c85788ccac547b0f5cf5c7686aacee9 + languageName: node + linkType: hard + "webpack-dev-server@npm:^5.1.0": version: 5.1.0 resolution: "webpack-dev-server@npm:5.1.0" @@ -57534,7 +52585,7 @@ __metadata: languageName: node linkType: hard -"webpack-merge@npm:5.10.0": +"webpack-merge@npm:5.10.0, webpack-merge@npm:^5.7.3": version: 5.10.0 resolution: "webpack-merge@npm:5.10.0" dependencies: @@ -57555,16 +52606,6 @@ __metadata: languageName: node linkType: hard -"webpack-merge@npm:^5.7.3": - version: 5.8.0 - resolution: "webpack-merge@npm:5.8.0" - dependencies: - clone-deep: "npm:^4.0.1" - wildcard: "npm:^2.0.0" - checksum: 10/c22812671a93d938bed21c02461d0efb0a7ec0b0f5e7cf28853b2c428a9ad947a26076e97243b1d9cb1cc5a3f92f24e467fc442f03f6e583d082bb3f3f460baf - languageName: node - linkType: hard - "webpack-sources@npm:^1.4.3": version: 1.4.3 resolution: "webpack-sources@npm:1.4.3" @@ -57607,7 +52648,7 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5.88.2, webpack@npm:^5.64.4": +"webpack@npm:5.88.2": version: 5.88.2 resolution: "webpack@npm:5.88.2" dependencies: @@ -57681,7 +52722,43 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5.95.0, webpack@npm:^5.94.0": +"webpack@npm:5.94.0": + version: 5.94.0 + resolution: "webpack@npm:5.94.0" + dependencies: + "@types/estree": "npm:^1.0.5" + "@webassemblyjs/ast": "npm:^1.12.1" + "@webassemblyjs/wasm-edit": "npm:^1.12.1" + "@webassemblyjs/wasm-parser": "npm:^1.12.1" + acorn: "npm:^8.7.1" + acorn-import-attributes: "npm:^1.9.5" + browserslist: "npm:^4.21.10" + chrome-trace-event: "npm:^1.0.2" + enhanced-resolve: "npm:^5.17.1" + es-module-lexer: "npm:^1.2.1" + eslint-scope: "npm:5.1.1" + events: "npm:^3.2.0" + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.2.11" + json-parse-even-better-errors: "npm:^2.3.1" + loader-runner: "npm:^4.2.0" + mime-types: "npm:^2.1.27" + neo-async: "npm:^2.6.2" + schema-utils: "npm:^3.2.0" + tapable: "npm:^2.1.1" + terser-webpack-plugin: "npm:^5.3.10" + watchpack: "npm:^2.4.1" + webpack-sources: "npm:^3.2.3" + peerDependenciesMeta: + webpack-cli: + optional: true + bin: + webpack: bin/webpack.js + checksum: 10/648449c5fbbb0839814116e3b2b044ac6c75a7ba272435155ddeb1e64dfaa2f8079be3adfbb691f648b69900756ce0f6fb73beab0ced3cf5e0fd46868b4593a6 + languageName: node + linkType: hard + +"webpack@npm:5.95.0": version: 5.95.0 resolution: "webpack@npm:5.95.0" dependencies: @@ -57717,6 +52794,42 @@ __metadata: languageName: node linkType: hard +"webpack@npm:^5.64.4, webpack@npm:^5.94.0": + version: 5.96.1 + resolution: "webpack@npm:5.96.1" + dependencies: + "@types/eslint-scope": "npm:^3.7.7" + "@types/estree": "npm:^1.0.6" + "@webassemblyjs/ast": "npm:^1.12.1" + "@webassemblyjs/wasm-edit": "npm:^1.12.1" + "@webassemblyjs/wasm-parser": "npm:^1.12.1" + acorn: "npm:^8.14.0" + browserslist: "npm:^4.24.0" + chrome-trace-event: "npm:^1.0.2" + enhanced-resolve: "npm:^5.17.1" + es-module-lexer: "npm:^1.2.1" + eslint-scope: "npm:5.1.1" + events: "npm:^3.2.0" + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.2.11" + json-parse-even-better-errors: "npm:^2.3.1" + loader-runner: "npm:^4.2.0" + mime-types: "npm:^2.1.27" + neo-async: "npm:^2.6.2" + schema-utils: "npm:^3.2.0" + tapable: "npm:^2.1.1" + terser-webpack-plugin: "npm:^5.3.10" + watchpack: "npm:^2.4.1" + webpack-sources: "npm:^3.2.3" + peerDependenciesMeta: + webpack-cli: + optional: true + bin: + webpack: bin/webpack.js + checksum: 10/d3419ffd198252e1d0301bd0c072cee93172f3e47937c745aa8202691d2f5d529d4ba4a1965d1450ad89a1bcd3c1f70ae09e57232b0d01dd38d69c1060e964d5 + languageName: node + linkType: hard + "websocket-driver@npm:>=0.5.1, websocket-driver@npm:^0.7.4": version: 0.7.4 resolution: "websocket-driver@npm:0.7.4" @@ -57736,16 +52849,16 @@ __metadata: linkType: hard "websocket@npm:^1.0.32, websocket@npm:^1.0.34": - version: 1.0.34 - resolution: "websocket@npm:1.0.34" + version: 1.0.35 + resolution: "websocket@npm:1.0.35" dependencies: bufferutil: "npm:^4.0.1" debug: "npm:^2.2.0" - es5-ext: "npm:^0.10.50" + es5-ext: "npm:^0.10.63" typedarray-to-buffer: "npm:^3.1.5" utf-8-validate: "npm:^5.0.2" yaeti: "npm:^0.0.6" - checksum: 10/b72e3dcc3fa92b4a4511f0df89b25feed6ab06979cb9e522d2736f09855f4bf7588d826773b9405fcf3f05698200eb55ba9da7ef333584653d4912a5d3b13c18 + checksum: 10/c05a80c536de7befadc530e5134947f7cc000493038ab78e3ed03080bb873b4ecedf95ea4e7087e6a98d04f02f31723bd98ec67f85e9159525a769b5a478fa8d languageName: node linkType: hard @@ -57777,10 +52890,19 @@ __metadata: languageName: node linkType: hard +"whatwg-encoding@npm:^3.1.1": + version: 3.1.1 + resolution: "whatwg-encoding@npm:3.1.1" + dependencies: + iconv-lite: "npm:0.6.3" + checksum: 10/bbef815eb67f91487c7f2ef96329743f5fd8357d7d62b1119237d25d41c7e452dff8197235b2d3c031365a17f61d3bb73ca49d0ed1582475aa4a670815e79534 + languageName: node + linkType: hard + "whatwg-fetch@npm:^3.6.2": - version: 3.6.19 - resolution: "whatwg-fetch@npm:3.6.19" - checksum: 10/257b130a06bc0fca4e3f15cb4a7b7822d12b7493c6743353e3a107b62ef2716f77fae35b4c81b4b8630e221aca30ea5b9770969db762d63336108f57bee9f963 + version: 3.6.20 + resolution: "whatwg-fetch@npm:3.6.20" + checksum: 10/2b4ed92acd6a7ad4f626a6cb18b14ec982bbcaf1093e6fe903b131a9c6decd14d7f9c9ca3532663c2759d1bdf01d004c77a0adfb2716a5105465c20755a8c57c languageName: node linkType: hard @@ -57798,6 +52920,13 @@ __metadata: languageName: node linkType: hard +"whatwg-mimetype@npm:^4.0.0": + version: 4.0.0 + resolution: "whatwg-mimetype@npm:4.0.0" + checksum: 10/894a618e2d90bf444b6f309f3ceb6e58cf21b2beaa00c8b333696958c4076f0c7b30b9d33413c9ffff7c5832a0a0c8569e5bb347ef44beded72aeefd0acd62e8 + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -57844,11 +52973,11 @@ __metadata: linkType: hard "which-builtin-type@npm:^1.1.3": - version: 1.1.3 - resolution: "which-builtin-type@npm:1.1.3" + version: 1.1.4 + resolution: "which-builtin-type@npm:1.1.4" dependencies: - function.prototype.name: "npm:^1.1.5" - has-tostringtag: "npm:^1.0.0" + function.prototype.name: "npm:^1.1.6" + has-tostringtag: "npm:^1.0.2" is-async-function: "npm:^2.0.0" is-date-object: "npm:^1.0.5" is-finalizationregistry: "npm:^1.0.2" @@ -57857,21 +52986,21 @@ __metadata: is-weakref: "npm:^1.0.2" isarray: "npm:^2.0.5" which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 10/d7823c4a6aa4fc8183eb572edd9f9ee2751e5f3ba2ccd5b298cc163f720df0f02ee1a5291d18ca8a41d48144ef40007ff6a64e6f5e7c506527086c7513a5f673 + which-collection: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10/c0cdb9b004e7a326f4ce54c75b19658a3bec73601a71dd7e2d9538accb3e781b546b589c3f306caf5e7429ac1c8019028d5e662e2860f03603354105b8247c83 languageName: node linkType: hard -"which-collection@npm:^1.0.1": - version: 1.0.1 - resolution: "which-collection@npm:1.0.1" +"which-collection@npm:^1.0.1, which-collection@npm:^1.0.2": + version: 1.0.2 + resolution: "which-collection@npm:1.0.2" dependencies: - is-map: "npm:^2.0.1" - is-set: "npm:^2.0.1" - is-weakmap: "npm:^2.0.1" - is-weakset: "npm:^2.0.1" - checksum: 10/85c95fcf92df7972ce66bed879e53d9dc752a30ef08e1ca4696df56bcf1c302e3b9965a39b04a20fa280a997fad6c170eb0b4d62435569b7f6c0bc7be910572b + is-map: "npm:^2.0.3" + is-set: "npm:^2.0.3" + is-weakmap: "npm:^2.0.2" + is-weakset: "npm:^2.0.3" + checksum: 10/674bf659b9bcfe4055f08634b48a8588e879161b9fefed57e9ec4ff5601e4d50a05ccd76cf10f698ef5873784e5df3223336d56c7ce88e13bcf52ebe582fc8d7 languageName: node linkType: hard @@ -57883,52 +53012,13 @@ __metadata: linkType: hard "which-module@npm:^2.0.0": - version: 2.0.0 - resolution: "which-module@npm:2.0.0" - checksum: 10/e3e46c9c84475bff773b9e5bbf48ffa1749bc45669c56ffc874ae4a520627a259e10f16ca67c1a1338edce7a002af86c40a036dcb13ad45c18246939997fa006 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.10": - version: 1.1.11 - resolution: "which-typed-array@npm:1.1.11" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - checksum: 10/bc9e8690e71d6c64893c9d88a7daca33af45918861003013faf77574a6a49cc6194d32ca7826e90de341d2f9ef3ac9e3acbe332a8ae73cadf07f59b9c6c6ecad - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.13": - version: 1.1.13 - resolution: "which-typed-array@npm:1.1.13" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.4" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - checksum: 10/605e3e10b7118af904a0e79d0d50b95275102f06ec902734024989cd71354929f7acee50de43529d3baf5858e2e4eb32c75e6ebd226c888ad976d8140e4a3e71 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.14": - version: 1.1.14 - resolution: "which-typed-array@npm:1.1.14" - dependencies: - available-typed-arrays: "npm:^1.0.6" - call-bind: "npm:^1.0.5" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.1" - checksum: 10/56253d2c9d6b41b8a4af96d8c2751bac5508906bd500cdcd0dc5301fb082de0391a4311ab21258bc8d2609ed593f422c1a66f0020fcb3a1e97f719bc928b9018 + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be languageName: node linkType: hard -"which-typed-array@npm:^1.1.15": +"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: @@ -57941,34 +53031,6 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.2": - version: 1.1.7 - resolution: "which-typed-array@npm:1.1.7" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - es-abstract: "npm:^1.18.5" - foreach: "npm:^2.0.5" - has-tostringtag: "npm:^1.0.0" - is-typed-array: "npm:^1.1.7" - checksum: 10/de60e1cd0b686b553196e523aa37f9016f7507b72d57c8a05b01515fc06f7daea9f577b82e9ca837678818502483420369d81646cf81a5bf3439a0ee032b2067 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.9": - version: 1.1.9 - resolution: "which-typed-array@npm:1.1.9" - dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - is-typed-array: "npm:^1.1.10" - checksum: 10/90ef760a09dcffc479138a6bc77fd2933a81a41d531f4886ae212f6edb54a0645a43a6c24de2c096aea910430035ac56b3d22a06f3d64e5163fa178d0f24e08e - languageName: node - linkType: hard - "which@npm:2.0.2, which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -57992,13 +53054,13 @@ __metadata: linkType: hard "which@npm:^3.0.0": - version: 3.0.0 - resolution: "which@npm:3.0.0" + version: 3.0.1 + resolution: "which@npm:3.0.1" dependencies: isexe: "npm:^2.0.0" bin: node-which: bin/which.js - checksum: 10/fdcf3cadab414e60b86c6836e7ac9de9273561a8926f57cbc28641b602a771527239ee4d47f2689ed255666f035ba0a0d72390986cc0c4e45344491adc7d0eeb + checksum: 10/adf720fe9d84be2d9190458194f814b5e9015ae4b88711b150f30d0f4d0b646544794b86f02c7ebeec1db2029bc3e83a7ff156f542d7521447e5496543e26890 languageName: node linkType: hard @@ -58032,9 +53094,9 @@ __metadata: linkType: hard "wildcard@npm:^2.0.0": - version: 2.0.0 - resolution: "wildcard@npm:2.0.0" - checksum: 10/56d4f8be540918ab3a676f0e57c9cac1d13009dc9974dbdc751a073bf71ec080376697eded083e8a8f86fcb3479135bfa9d4489e25e6c748666d3a53ee096d24 + version: 2.0.1 + resolution: "wildcard@npm:2.0.1" + checksum: 10/e0c60a12a219e4b12065d1199802d81c27b841ed6ad6d9d28240980c73ceec6f856771d575af367cbec2982d9ae7838759168b551776577f155044f5a5ba843c languageName: node linkType: hard @@ -58047,25 +53109,14 @@ __metadata: languageName: node linkType: hard -"winston-transport@npm:^4.5.0": - version: 4.5.0 - resolution: "winston-transport@npm:4.5.0" - dependencies: - logform: "npm:^2.3.2" - readable-stream: "npm:^3.6.0" - triple-beam: "npm:^1.3.0" - checksum: 10/3184b7f29fa97aac5b75ff680100656116aff8d164c09bc7459c9b7cb1ce47d02254caf96c2293791ec175c0e76e5ff59b5ed1374733e0b46248cf4f68a182fc - languageName: node - linkType: hard - -"winston-transport@npm:^4.7.0": - version: 4.7.1 - resolution: "winston-transport@npm:4.7.1" +"winston-transport@npm:^4.5.0, winston-transport@npm:^4.7.0": + version: 4.8.0 + resolution: "winston-transport@npm:4.8.0" dependencies: logform: "npm:^2.6.1" - readable-stream: "npm:^3.6.2" + readable-stream: "npm:^4.5.2" triple-beam: "npm:^1.3.0" - checksum: 10/bc48c921ec9b4a71c1445bf274aa6b00c01089a6c26fc0b19534f8a32fa2710c6766c9e6db53a23492c20772934025d312dd9fb08df157ccb6579ad6b9dae9a7 + checksum: 10/930bdc0ec689d5c4f07a262721da80440336f64739d0ce33db801c7142b4fca5be8ef71b725b670bac609de8b6bce405e5c5f84d355f5176a611209b476cee18 languageName: node linkType: hard @@ -58089,22 +53140,22 @@ __metadata: linkType: hard "winston@npm:^2.4.5": - version: 2.4.5 - resolution: "winston@npm:2.4.5" + version: 2.4.7 + resolution: "winston@npm:2.4.7" dependencies: - async: "npm:~1.0.0" + async: "npm:^2.6.4" colors: "npm:1.0.x" cycle: "npm:1.0.x" eyes: "npm:0.1.x" isstream: "npm:0.1.x" stack-trace: "npm:0.0.x" - checksum: 10/bfc15087e4f524c5c91a739a8c6c700c00f5dd7ea34a3d5773186adc8865b8bc3c0cf81510d762668b22dab25ab31438d14844e8163c4bcbd2c568852d7fdc42 + checksum: 10/44665f99bb1b1f290fc48879cd3bf635d0821ad70e90cdec0911a79b4ffd4f62ae4afa4764b27766e6a4ff60e911611047fd3f10b21d395eb0e3da33086d6c73 languageName: node linkType: hard -"winston@npm:^3.0.0": - version: 3.14.2 - resolution: "winston@npm:3.14.2" +"winston@npm:^3.0.0, winston@npm:^3.3.3": + version: 3.16.0 + resolution: "winston@npm:3.16.0" dependencies: "@colors/colors": "npm:^1.6.0" "@dabh/diagnostics": "npm:^2.0.2" @@ -58117,25 +53168,7 @@ __metadata: stack-trace: "npm:0.0.x" triple-beam: "npm:^1.3.0" winston-transport: "npm:^4.7.0" - checksum: 10/ba818714606175f27c38c42b22913e65f17987a0c8c41bcc73d55f3be8d70d629313f45e312ec02eea7bf074f9abee3f228746140245eb5258487c4161f3a798 - languageName: node - linkType: hard - -"winston@npm:^3.3.3": - version: 3.6.0 - resolution: "winston@npm:3.6.0" - dependencies: - "@dabh/diagnostics": "npm:^2.0.2" - async: "npm:^3.2.3" - is-stream: "npm:^2.0.0" - logform: "npm:^2.4.0" - one-time: "npm:^1.0.0" - readable-stream: "npm:^3.4.0" - safe-stable-stringify: "npm:^2.3.1" - stack-trace: "npm:0.0.x" - triple-beam: "npm:^1.3.0" - winston-transport: "npm:^4.5.0" - checksum: 10/ba8f828b06c5495163e675f39b74e1618e299e8a9a718ef537ee9ac0affc8a94ab40986253f78876c7f25993829ea5b40d6c94769f089b886045e35d3916786d + checksum: 10/cacec5268a965dcd3752bfe223d36eb003ac86b0cabc3d794521dfa6f937f78c86c8da84a53956c0f32169a55b438f6db0ee2aa028d57a2bcd69e1895a2e9d97 languageName: node linkType: hard @@ -58477,17 +53510,7 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^5.0.0": - version: 5.0.0 - resolution: "write-file-atomic@npm:5.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^3.0.7" - checksum: 10/65fe29118d15f53e8fd3736149f0862c7e586244ce6a3d98ec867f3a35e234fab703e26cbce7232c9aa17f1d6e1e4b9650bcd7fb322e02dff75559a2a97f77b1 - languageName: node - linkType: hard - -"write-file-atomic@npm:^5.0.1": +"write-file-atomic@npm:^5.0.0, write-file-atomic@npm:^5.0.1": version: 5.0.1 resolution: "write-file-atomic@npm:5.0.1" dependencies: @@ -58509,16 +53532,28 @@ __metadata: languageName: node linkType: hard +"write-json-file@npm:^6.0.0": + version: 6.0.0 + resolution: "write-json-file@npm:6.0.0" + dependencies: + detect-indent: "npm:^7.0.1" + is-plain-obj: "npm:^4.1.0" + sort-keys: "npm:^5.0.0" + write-file-atomic: "npm:^5.0.1" + checksum: 10/a53a5c9a20bf91fdf953074ecce633f8d0b2aaa5df1570ee1d31ddb88f48a0b1893563dc3ca9c8446298e640bf5591ed8530bab85a969e416e56cba03997ec06 + languageName: node + linkType: hard + "write-package@npm:^7.0.1": - version: 7.0.1 - resolution: "write-package@npm:7.0.1" + version: 7.1.0 + resolution: "write-package@npm:7.1.0" dependencies: - deepmerge-ts: "npm:^5.1.0" - read-pkg: "npm:^9.0.0" + deepmerge-ts: "npm:^7.1.0" + read-pkg: "npm:^9.0.1" sort-keys: "npm:^5.0.0" - type-fest: "npm:^4.6.0" - write-json-file: "npm:^5.0.0" - checksum: 10/e4ac07ff5d240bf1eaa2dd587bfa2bdb13092ba2d36989edff2db197947ba0b573227c1f11f4b3c7dc1fc4431a97bd5fa9810e14136e9405cdcc8945ebe70263 + type-fest: "npm:^4.23.0" + write-json-file: "npm:^6.0.0" + checksum: 10/5d20fe92d295635addca5e8d352642d2be13c4e9a15c5d1af5a56635bf6c3bde34fee8c1b26de4546fcc0ef149601a7f7602e4525182e327edb750bc9b7b9d24 languageName: node linkType: hard @@ -58585,13 +53620,6 @@ __metadata: languageName: node linkType: hard -"xdg-basedir@npm:^4.0.0": - version: 4.0.0 - resolution: "xdg-basedir@npm:4.0.0" - checksum: 10/0073d5b59a37224ed3a5ac0dd2ec1d36f09c49f0afd769008a6e9cd3cd666bd6317bd1c7ce2eab47e1de285a286bad11a9b038196413cd753b79770361855f3c - languageName: node - linkType: hard - "xdg-basedir@npm:^5.1.0": version: 5.1.0 resolution: "xdg-basedir@npm:5.1.0" @@ -58690,14 +53718,14 @@ __metadata: linkType: hard "xss@npm:^1.0.8": - version: 1.0.14 - resolution: "xss@npm:1.0.14" + version: 1.0.15 + resolution: "xss@npm:1.0.15" dependencies: commander: "npm:^2.20.3" cssfilter: "npm:0.0.10" bin: xss: bin/xss - checksum: 10/dc97acaee35e5ed453fe5628841daf7b4aba5ed26b31ff4eadf831f42cded1ddebc218ff0db1d6a73e301bfada8a5236fec0c234233d66a20ecc319da542b357 + checksum: 10/074ad54babac9dd5107466dbf30d3b871dbedae1f8e7b8f4e3b76d60da8b92bd0f66f18ccd26b8524545444ef784b78c526cee089a907aa904f83c8b8d7958f6 languageName: node linkType: hard @@ -58797,26 +53825,19 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^1.10.0, yaml@npm:^1.10.2, yaml@npm:^1.5.0, yaml@npm:^1.7.2": +"yaml@npm:^1.10.0, yaml@npm:^1.10.2, yaml@npm:^1.7.2": version: 1.10.2 resolution: "yaml@npm:1.10.2" checksum: 10/e088b37b4d4885b70b50c9fa1b7e54bd2e27f5c87205f9deaffd1fb293ab263d9c964feadb9817a7b129a5bf30a06582cb08750f810568ecc14f3cdbabb79cb3 languageName: node linkType: hard -"yaml@npm:^2.1.1": - version: 2.3.3 - resolution: "yaml@npm:2.3.3" - checksum: 10/3b1a974b9d3672c671d47099a41c0de77b7ff978d0849aa55a095587486e82cd072321d19f2b4c791a367f766310b5a82dff098839b0f4ddcbbbe477f82dfb07 - languageName: node - linkType: hard - -"yaml@npm:^2.4.5": - version: 2.4.5 - resolution: "yaml@npm:2.4.5" +"yaml@npm:^2.3.4, yaml@npm:^2.4.5": + version: 2.6.0 + resolution: "yaml@npm:2.6.0" bin: yaml: bin.mjs - checksum: 10/b09bf5a615a65276d433d76b8e34ad6b4c0320b85eb3f1a39da132c61ae6e2ff34eff4624e6458d96d49566c93cf43408ba5e568218293a8c6541a2006883f64 + checksum: 10/f4369f667c7626c216ea81b5840fe9b530cdae4cff2d84d166ec1239e54bf332dbfac4a71bf60d121f8e85e175364a4e280a520292269b6cf9d074368309adf9 languageName: node linkType: hard @@ -58893,7 +53914,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.7.2": +"yargs@npm:17.7.2, yargs@npm:^17.0.0, yargs@npm:^17.1.1, yargs@npm:^17.2.1, yargs@npm:^17.3.1, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: @@ -58927,51 +53948,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.0.0, yargs@npm:^17.1.1": - version: 17.3.1 - resolution: "yargs@npm:17.3.1" - dependencies: - cliui: "npm:^7.0.2" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.0.0" - checksum: 10/7bb96c62cd56f1290d8a411ddb848f3af147773199c8653be5ee940ddd042391d7e61b0911a98ab6b3d74a92fff52694f4ed246333accf0523c201a2a6649e2f - languageName: node - linkType: hard - -"yargs@npm:^17.2.1": - version: 17.5.0 - resolution: "yargs@npm:17.5.0" - dependencies: - cliui: "npm:^7.0.2" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.0.0" - checksum: 10/a642e2e3873e601a65cb841da100219ba237ea6ac1e7073e596baedfb33890588a0049f57fd81384319b4ad2065c0b0c0ac4334b9dd813ee58c4dfc0fa433b5c - languageName: node - linkType: hard - -"yargs@npm:^17.3.1": - version: 17.5.1 - resolution: "yargs@npm:17.5.1" - dependencies: - cliui: "npm:^7.0.2" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.0.0" - checksum: 10/2453d52e3403ca86ca9c4279a90da3cbc351b50c7a13cc259bebf2d396530800e53261d9d9c7e2d4b7c049aa16c770f2553bdb04d52c2dbb37271d6cecbdcf2a - languageName: node - linkType: hard - "yargs@npm:^4.7.1": version: 4.8.1 resolution: "yargs@npm:4.8.1" @@ -59025,14 +54001,7 @@ __metadata: languageName: node linkType: hard -"yocto-queue@npm:^1.0.0": - version: 1.0.0 - resolution: "yocto-queue@npm:1.0.0" - checksum: 10/2cac84540f65c64ccc1683c267edce396b26b1e931aa429660aefac8fbe0188167b7aee815a3c22fa59a28a58d898d1a2b1825048f834d8d629f4c2a5d443801 - languageName: node - linkType: hard - -"yocto-queue@npm:^1.1.1": +"yocto-queue@npm:^1.0.0, yocto-queue@npm:^1.1.1": version: 1.1.1 resolution: "yocto-queue@npm:1.1.1" checksum: 10/f2e05b767ed3141e6372a80af9caa4715d60969227f38b1a4370d60bffe153c9c5b33a862905609afc9b375ec57cd40999810d20e5e10229a204e8bde7ef255c @@ -59056,9 +54025,9 @@ __metadata: linkType: hard "zod@npm:>=3.22.3": - version: 3.22.4 - resolution: "zod@npm:3.22.4" - checksum: 10/73622ca36a916f785cf528fe612a884b3e0f183dbe6b33365a7d0fc92abdbedf7804c5e2bd8df0a278e1472106d46674281397a3dd800fa9031dc3429758c6ac + version: 3.23.8 + resolution: "zod@npm:3.23.8" + checksum: 10/846fd73e1af0def79c19d510ea9e4a795544a67d5b34b7e1c4d0425bf6bfd1c719446d94cdfa1721c1987d891321d61f779e8236fde517dc0e524aa851a6eff1 languageName: node linkType: hard @@ -59077,3 +54046,10 @@ __metadata: checksum: 10/ae4d677cf390e68205cf0573b3ef424f551ecaa6d197928d455f16114a8336cd74673c16c6738abc11ef5796fd30f464f8959c3b1527ce64ca2190475076c3b6 languageName: node linkType: hard + +"zwitch@npm:^2.0.4": + version: 2.0.4 + resolution: "zwitch@npm:2.0.4" + checksum: 10/f22ec5fc2d5f02c423c93d35cdfa83573a3a3bd98c66b927c368ea4d0e7252a500df2a90a6b45522be536a96a73404393c958e945fdba95e6832c200791702b6 + languageName: node + linkType: hard From 30760ecf055fce4e5d758c26e65ee1d518546053 Mon Sep 17 00:00:00 2001 From: Yogesh01000100 Date: Tue, 20 Aug 2024 21:08:54 +0000 Subject: [PATCH 46/49] feat: add crash recovery and knex config for production Signed-off-by: Yogesh01000100 chore(satp-hermes): improve DB management Signed-off-by: Rafael Belchior chore(satp-hermes): crash recovery architecture Signed-off-by: Rafael Belchior fix(recovery): enhance crash recovery and rollback implementation Signed-off-by: Yogesh01000100 refactor(recovery): consolidate logic and improve SATP message handling Signed-off-by: Yogesh01000100 feat(recovery): add rollback implementations Signed-off-by: Yogesh01000100 fix: correct return types and inits Signed-off-by: Yogesh01000100 Co-authored-by: Rafael Belchior --- .../docker-compose.yaml | 17 + .../cactus-plugin-satp-hermes/package.json | 19 +- .../src/knex/knexfile-remote.ts | 17 +- .../src/knex/knexfile.ts | 22 +- .../20220331132128_create_logs_table.js | 15 - .../20220331132128_create_logs_table.ts | 16 + ...20240130234303_create_remote_logs_table.js | 13 - ...20240130234303_create_remote_logs_table.ts | 14 + .../seeds/1724235145_create_dummy_entries.ts | 35 ++ .../proto/cacti/satp/v02/crash_recovery.proto | 68 +++ .../src/main/typescript/blo/dispatcher.ts | 2 + .../blo/recover/recover-handler-service.ts | 2 + .../blo/recover/rollback-handler-service.ts | 2 + .../typescript/core/recovery/crash-manager.ts | 380 ++++++++++++++ .../core/recovery/crash-recovery-handler.ts | 232 +++++++++ .../typescript/core/recovery/crash-utils.ts | 96 ++++ .../rollback/rollback-strategy-factory.ts | 62 +++ .../rollback/stage0-rollback-strategy.ts | 74 +++ .../rollback/stage1-rollback-strategy.ts | 83 +++ .../rollback/stage2-rollback-strategy.ts | 81 +++ .../rollback/stage3-rollback-strategy.ts | 82 +++ .../generated/SATPWrapperContract.ts | 110 ++-- .../cacti/satp/v02/crash_recovery_connect.ts | 50 ++ .../proto/cacti/satp/v02/crash_recovery_pb.ts | 489 ++++++++++++++++++ .../typescript/plugin-satp-hermes-gateway.ts | 21 +- yarn.lock | 57 +- 26 files changed, 1964 insertions(+), 95 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/docker-compose.yaml delete mode 100644 packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.js create mode 100644 packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.ts delete mode 100644 packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.js create mode 100644 packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/knex/seeds/1724235145_create_dummy_entries.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/recover-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/rollback-handler-service.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts diff --git a/packages/cactus-plugin-satp-hermes/docker-compose.yaml b/packages/cactus-plugin-satp-hermes/docker-compose.yaml new file mode 100644 index 0000000000..831c4d3089 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/docker-compose.yaml @@ -0,0 +1,17 @@ +version: '3.8' +services: + db: + image: postgres:13 + environment: + POSTGRES_DB: ${DB_NAME} + POSTGRES_USER: ${DB_USER} + POSTGRES_PASSWORD: ${DB_PASSWORD} + POSTGRES_HOST: ${DB_HOST} + PGPORT: ${DB_PORT} + ports: + - "${DB_PORT}:5432" + volumes: + - pgdata:/var/lib/postgresql/data + +volumes: + pgdata: diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 5c2cbef961..7a926ac664 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -80,7 +80,19 @@ "pretsc": "npm run generate-sdk", "start-gateway": "node ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js", "tsc": "tsc --project ./tsconfig.json", - "watch": "tsc --build --watch" + "watch": "tsc --build --watch", + "forge": "forge build ./src/solidity/*.sol --out ./src/solidity/generated", + "forge:test": "forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated", + "forge:all": "run-s 'forge' 'forge:test'", + "db:setup": "bash -c 'npm run db:destroy || true && run-s db:start db:migrate db:seed'", + "db:destroy": "docker-compose down -v && npm run db:cleanup", + "db:start": "docker-compose up -d", + "db:stop": "docker-compose down", + "db:reset": "run-s db:destroy db:start db:migrate db:seed", + "db:migrate": "knex migrate:latest --knexfile src/knex/knexfile.js", + "db:migrate:production": "knex migrate:latest --env production --knexfile src/knex/knexfile.ts", + "db:seed": "knex seed:run --knexfile src/knex/knexfile.ts", + "db:cleanup": "find src/knex/data -name '.dev-*.sqlite3' -delete" }, "jest": { "moduleNameMapper": { @@ -125,7 +137,7 @@ "kubo-rpc-client": "3.0.1", "npm-run-all": "4.1.5", "openzeppelin-solidity": "3.4.2", - "safe-stable-stringify": "2.5.0", + "pg": "^8.8.0", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", @@ -148,6 +160,7 @@ "@types/fs-extra": "11.0.4", "@types/google-protobuf": "3.15.5", "@types/node": "18.18.2", + "@types/pg": "8.6.5", "@types/swagger-ui-express": "4.1.6", "@types/tape": "4.13.4", "@types/uuid": "10.0.0", @@ -198,4 +211,4 @@ "runOnChangeOnly": true } } -} +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts b/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts index d2a2e41600..19e25e4048 100644 --- a/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts +++ b/packages/cactus-plugin-satp-hermes/src/knex/knexfile-remote.ts @@ -1,7 +1,9 @@ import path from "path"; import { v4 as uuidv4 } from "uuid"; +import dotenv from "dotenv"; + +dotenv.config({ path: path.resolve(__dirname, "../../.env") }); -// default configuration for knex module.exports = { development: { client: "sqlite3", @@ -13,4 +15,17 @@ module.exports = { }, useNullAsDefault: true, }, + production: { + client: "pg", + connection: { + host: process.env.DB_HOST, + port: process.env.DB_PORT, + user: process.env.DB_USER, + password: process.env.DB_PASSWORD, + database: process.env.DB_NAME, + }, + migrations: { + directory: path.resolve(__dirname, "migrations"), + }, + }, }; diff --git a/packages/cactus-plugin-satp-hermes/src/knex/knexfile.ts b/packages/cactus-plugin-satp-hermes/src/knex/knexfile.ts index 47c34e0875..3c0722fd4c 100644 --- a/packages/cactus-plugin-satp-hermes/src/knex/knexfile.ts +++ b/packages/cactus-plugin-satp-hermes/src/knex/knexfile.ts @@ -1,16 +1,34 @@ import path from "path"; import { v4 as uuidv4 } from "uuid"; +import dotenv from "dotenv"; + +dotenv.config({ path: path.resolve(__dirname, "../../.env") }); -// default configuration for knex module.exports = { development: { client: "sqlite3", connection: { - filename: path.resolve(__dirname, ".dev-" + uuidv4() + ".sqlite3"), + filename: path.join(__dirname, "data", "/.dev-" + uuidv4() + ".sqlite3"), }, migrations: { directory: path.resolve(__dirname, "migrations"), }, + seeds: { + directory: path.resolve(__dirname, "seeds"), + }, useNullAsDefault: true, }, + production: { + client: "pg", + connection: { + host: process.env.DB_HOST, + port: process.env.DB_PORT, + user: process.env.DB_USER, + password: process.env.DB_PASSWORD, + database: process.env.DB_NAME, + }, + migrations: { + directory: path.resolve(__dirname, "migrations"), + }, + }, }; diff --git a/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.js b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.js deleted file mode 100644 index 94c6d8712f..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.js +++ /dev/null @@ -1,15 +0,0 @@ -exports.up = async (knex) => { - return await knex.schema.createTable("logs", function (table) { - table.string("sessionID").notNullable(); - table.string("type").notNullable(); - table.string("key").notNullable(); - table.string("operation").notNullable(); - table.string("timestamp").notNullable(); - table.string("data").notNullable(); - table.primary("key"); - }); -}; - -exports.down = async (knex) => { - return await knex.schema.dropTable("logs"); -}; diff --git a/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.ts b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.ts new file mode 100644 index 0000000000..cbccd81720 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20220331132128_create_logs_table.ts @@ -0,0 +1,16 @@ +import { Knex } from "knex"; + +export function up(knex: Knex): Knex.SchemaBuilder { + return knex.schema.createTable("logs", (table) => { + table.string("sessionID").notNullable(); + table.string("type").notNullable(); + table.string("key").notNullable().primary(); + table.string("operation").notNullable(); + table.string("timestamp").notNullable(); + table.string("data").notNullable(); + }); +} + +export function down(knex: Knex): Knex.SchemaBuilder { + return knex.schema.dropTable("logs"); +} diff --git a/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.js b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.js deleted file mode 100644 index 50625d7833..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.js +++ /dev/null @@ -1,13 +0,0 @@ -exports.up = async (knex) => { - return await knex.schema.createTable("remote-logs", function (table) { - table.string("key").notNullable(); - table.string("hash").notNullable(); - table.string("signature").notNullable(); - table.string("signerPubKey").notNullable(); - table.primary("key"); - }); -}; - -exports.down = async (knex) => { - return await knex.schema.dropTable("remote-logs"); -}; diff --git a/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.ts b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.ts new file mode 100644 index 0000000000..7b51ef32c1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/knex/migrations/20240130234303_create_remote_logs_table.ts @@ -0,0 +1,14 @@ +import { Knex } from "knex"; + +export async function up(knex: Knex): Promise { + return knex.schema.createTable("remote-logs", (table) => { + table.string("hash").notNullable(); + table.string("signature").notNullable(); + table.string("signerPubKey").notNullable(); + table.string("key").notNullable().primary(); + }); +} + +export async function down(knex: Knex): Promise { + return knex.schema.dropTable("remote-logs"); +} diff --git a/packages/cactus-plugin-satp-hermes/src/knex/seeds/1724235145_create_dummy_entries.ts b/packages/cactus-plugin-satp-hermes/src/knex/seeds/1724235145_create_dummy_entries.ts new file mode 100644 index 0000000000..6958544a30 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/knex/seeds/1724235145_create_dummy_entries.ts @@ -0,0 +1,35 @@ +// 20240821000000_seed_dev_logs.ts + +import { Knex } from "knex"; + +export async function seed(knex: Knex): Promise { + // Check if we're in the development environment + if (process.env.NODE_ENV !== "development") { + console.log("Skipping seed: Not in development environment"); + return; + } + + // Function to clear table if it exists + async function clearTableIfExists(tableName: string) { + if (await knex.schema.hasTable(tableName)) { + await knex(tableName).del(); + console.log(`Cleared existing entries from ${tableName}`); + } else { + console.log(`Table ${tableName} does not exist, skipping clear`); + } + } + + // Clear existing entries if tables exist + await clearTableIfExists("logs"); + await clearTableIfExists("remote-logs"); + + // Insert a single deterministic log entry + await knex("logs").insert({ + sessionID: "test-session-001", + type: "info", + key: "test-log-001", + operation: "create", + timestamp: "2024-08-21T12:00:00Z", + data: JSON.stringify({ message: "This is a test log entry" }), + }); +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto index 7f6f71c15c..2b3abdb061 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto @@ -9,5 +9,73 @@ service CrashRecovery { // util RPCs // step RPCs + rpc RecoverV2Message (RecoverMessage) returns (RecoverUpdateMessage); + rpc RecoverV2UpdateMessage (RecoverUpdateMessage) returns (RecoverSuccessMessage); + rpc RecoverV2SuccessMessage (RecoverSuccessMessage) returns (google.protobuf.Empty) {}; + rpc RollbackV2Message (RollbackMessage) returns (RollbackAckMessage); + rpc RollbackV2AckMessage (RollbackAckMessage) returns (google.protobuf.Empty) {}; +} + +message RecoverMessage { + string sessionId = 1; + string messageType = 2; + string satpPhase = 3; + int32 sequenceNumber = 4; + bool isBackup = 5; + string newIdentityPublicKey = 6; + int64 lastEntryTimestamp = 7; + string senderSignature = 8; +} + +message RecoverUpdateMessage { + string sessionId = 1; + string messageType = 2; + string hashRecoverMessage = 3; + repeated LocalLog recoveredLogs = 4; + string senderSignature = 5; +} + +message RecoverSuccessMessage { + string sessionId = 1; + string messageType = 2; + string hashRecoverUpdateMessage = 3; + bool success = 4; + repeated string entriesChanged = 5; + string senderSignature = 6; +} + +message RollbackMessage { + string sessionId = 1; + string messageType = 2; + bool success = 3; + repeated string actionsPerformed = 4; + repeated string proofs = 5; + string senderSignature = 6; +} +message RollbackAckMessage { + string sessionId = 1; + string messageType = 2; + bool success = 3; + repeated string actionsPerformed = 4; + repeated string proofs = 5; + string senderSignature = 6; } + +message LocalLog { + string key=1; + string sessionId=2; + string data=3; + string type=4; + string operation=5; + string timestamp=6; +} + +message RollbackLogEntry { + string session_id = 1; + string stage = 2; + string timestamp = 3; + string action = 4; // action performed during rollback + string status = 5; // status of rollback (e.g., SUCCESS, FAILED) + string details = 6; // Additional details or metadata about the rollback +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts index 20be0488cd..9d0d76e372 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/dispatcher.ts @@ -170,6 +170,8 @@ export class BLODispatcher { const res = Array.from(await this.manager.getSessions().keys()); return res; } + + // TODO implement recovery handlers // get channel by caller; give needed client from orchestrator to handler to call // for all channels, find session id on request // TODO implement handlers GetAudit, Transact, Cancel, Routes diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/recover-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/recover-handler-service.ts new file mode 100644 index 0000000000..79173614d6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/recover-handler-service.ts @@ -0,0 +1,2 @@ +// handler to allow a user application to communicate a gateway it crashed and needs to be recovered. It "forces" and update of status with a counterparty gateway +// TODO update the spec with a RecoverForce message that is handled by this handler diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/rollback-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/rollback-handler-service.ts new file mode 100644 index 0000000000..edd6a04073 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/recover/rollback-handler-service.ts @@ -0,0 +1,2 @@ +// handler to allow a user application to force a rollback +// TODO update the spec with RollbackForce message that is handled by this handler diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts new file mode 100644 index 0000000000..90f6984602 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts @@ -0,0 +1,380 @@ +import { + Logger, + LoggerProvider, + Checks, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; +import { CrashRecoveryHandler } from "./crash-recovery-handler"; +import { SATPSession } from "../satp-session"; +import { + RollbackState, + RollbackStrategy, + RollbackStrategyFactory, +} from "./rollback/rollback-strategy-factory"; +import { CrashRecoveryService } from "./crash-utils"; +import { KnexLocalLogRepository as LocalLogRepository } from "../../repository/knex-local-log-repository"; +import { ILocalLogRepository } from "../../repository/interfaces/repository"; +import { Knex } from "knex"; +import { SATPBridgeConfig, LocalLog } from "../types"; +import { SessionType } from "../session-utils"; + +enum CrashStatus { + IN_RECOVERY = "IN_RECOVERY", + RECOVERED = "RECOVERED", + NO_CRASH = "NO_CRASH", +} + +class CrashOccurrence { + constructor( + public status: CrashStatus, + public time: Date, + public lastUpdate: Date, + ) {} +} + +export interface ICrashRecoveryManagerOptions { + logLevel?: LogLevelDesc; + instanceId: string; + knexConfig?: Knex.Config; + bridgeConfig: SATPBridgeConfig; +} + +export class CrashRecoveryManager { + public static readonly CLASS_NAME = "CrashRecoveryManager"; + private readonly log: Logger; + private readonly instanceId: string; + private sessions: Map; + private crashRecoveryHandler: CrashRecoveryHandler; + private factory: RollbackStrategyFactory; + private logRepository: ILocalLogRepository; + + constructor(public readonly options: ICrashRecoveryManagerOptions) { + const fnTag = `${CrashRecoveryManager.CLASS_NAME}#constructor()`; + Checks.truthy(options, `${fnTag} arg options`); + + const level = this.options.logLevel || "DEBUG"; + const label = this.className; + this.log = LoggerProvider.getOrCreate({ level, label }); + this.instanceId = options.instanceId; + this.sessions = new Map(); + this.log.info(`Instantiated ${this.className} OK`); + this.factory = new RollbackStrategyFactory(options.bridgeConfig); + this.logRepository = new LocalLogRepository(options.knexConfig); + const crashRecoveryServiceOptions = { + logLevel: this.options.logLevel, + instanceId: this.instanceId, + loggerOptions: { + label: "CrashRecoveryService", + level: this.options.logLevel || "DEBUG", + }, + logRepository: this.logRepository, + }; + this.crashRecoveryHandler = new CrashRecoveryHandler({ + loggerOptions: { + label: "CrashRecoveryHandler", + level: "DEBUG", + }, + crashService: new CrashRecoveryService(crashRecoveryServiceOptions), + sessions: this.sessions, + logRepository: this.logRepository, + }); + } + + get className(): string { + return CrashRecoveryManager.CLASS_NAME; + } + + public async init(): Promise { + this.sessions = await this.getSessions(); + } + + // todo read from local log to get session data + /*private async getSessions(): Map { + const sessionMap = new Map(); + try { + const allSessions = await this.logRepository.readLogsNotProofs(); + allSessions.forEach((log) => { + const sessionData = new SessionData(); + sessionData.id = log.sessionID; + + sessionMap.set(log.sessionID, sessionData); + }); + } catch (error) { + this.log.error(`Error initializing sessions: ${error}`); + } + + return sessionMap; + }*/ + + private async getSessions(): Promise> { + const sessionMap = new Map(); + + try { + const allLogs = await this.logRepository.readLogsNotProofs(); + + for (const log of allLogs) { + const sessionId = log.sessionID; + + let sessionData = sessionMap.get(sessionId); + if (!sessionData) { + sessionData = new SessionData(); + sessionData.id = sessionId; + sessionMap.set(sessionId, sessionData); + } + + try { + const logEntry = JSON.parse(log.data); + + Object.assign(sessionData, logEntry); + + if (logEntry.sequenceNumber !== undefined) { + sessionData.lastSequenceNumber = logEntry.sequenceNumber; + } + } catch (error) { + this.log.error( + `Error parsing log data for session ${sessionId}: ${error}`, + ); + } + } + } catch (error) { + this.log.error(`Error initializing sessions: ${error}`); + } + + return sessionMap; + } + + // todo create util functoin that retrieves sessionid and checks if it is valid; i believe it is implemented in the satp services, refactor making it reusable + private async checkCrash(session: SATPSession): Promise { + // todo implement crash check - check logs and understsands if there was a crash; might use timouts, etc + + const fnTag = `${this.className}#checkCrash()`; + + // check the logs and from the timeout logic make out + try { + session.verify( + fnTag, + session.hasClientSessionData() + ? SessionType.CLIENT + : SessionType.SERVER, + ); + const lastLog = await this.logRepository.readLastestLog( + session.getSessionId(), + ); + if (lastLog && lastLog.operation !== "COMPLETED") { + this.log.debug( + `${fnTag} Crash detected for session ${session.getSessionId()}`, + ); + return CrashStatus.IN_RECOVERY; + } + + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + + const logTimestamp = Number(lastLog.timestamp); + const currentTime = new Date().getTime(); + const timeDifference = currentTime - logTimestamp; + + if (timeDifference > Number(sessionData.maxTimeout)) { + this.log.warn( + `${fnTag} Timeout exceeded for session ID: ${session.getSessionId()}`, + ); + return CrashStatus.IN_RECOVERY; + } + + this.log.info( + `${fnTag} No crash detected for session ID: ${session.getSessionId()}`, + ); + return CrashStatus.NO_CRASH; + } catch (error) { + this.log.error(`${fnTag} Error detecting crash: ${error}`); + return CrashStatus.NO_CRASH; + } + } + + public async checkAndResolveCrash(sessionId: SATPSession): Promise { + const fnTag = `${this.className}#checkAndResolveCrash()`; + this.log.info(`${fnTag} Checking crash status for session ${sessionId}`); + + try { + const sessionData = sessionId.hasClientSessionData() + ? sessionId.getClientSessionData() + : sessionId.getServerSessionData(); + + if (!sessionData) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + + let attempts = 0; + let crashOccurrence: CrashOccurrence | undefined; + + while (attempts < BigInt(sessionData.maxRetries)) { + const crashStatus = await this.checkCrash(sessionId); + + if (crashStatus === CrashStatus.IN_RECOVERY) { + this.log.info( + `${fnTag} Crash detected. Attempting recovery for session ${sessionId}`, + ); + + if (!crashOccurrence) { + crashOccurrence = new CrashOccurrence( + CrashStatus.IN_RECOVERY, + new Date(), + new Date(), + ); + } else { + crashOccurrence.lastUpdate = new Date(); + } + + await this.handleRecovery(sessionId); + this.log.info(`${fnTag} Recovery successful.`); + + crashOccurrence.status = CrashStatus.RECOVERED; + + return true; + } + attempts++; + this.log.info( + `${fnTag} Retry attempt ${attempts} for session ${sessionId}`, + ); + } + + this.log.warn(`${fnTag} All retries exhausted. Initiating rollback.`); + await this.initiateRollback(sessionId, true); + return false; + } catch (error) { + this.log.error(`${fnTag} Error during crash resolution: ${error}`); + return false; + } + } + + public async handleRecovery(session: SATPSession): Promise { + const fnTag = `${this.className}#handleRecovery()`; + + try { + if (session.hasServerSessionData()) { + this.log.info( + `${fnTag} Initiating recovery as a server for session ID: ${session.getSessionId()}`, + ); + } else if (session.hasClientSessionData()) { + this.log.info( + `${fnTag} Initiating recovery as a client for session ID: ${session.getSessionId()}`, + ); + } else { + throw new Error( + `${fnTag} Neither client nor server session data is available for session ID: ${session.getSessionId()}`, + ); + } + + const recoverMessage = + await this.crashRecoveryHandler.sendRecover(session); + const recoverUpdateMessage = + await this.crashRecoveryHandler.sendRecoverUpdate(recoverMessage); + await this.crashRecoveryHandler.sendRecoverSuccess(recoverUpdateMessage); + + this.log.info( + `${fnTag} Recovery handled successfully for session ID: ${session.getSessionId()}`, + ); + } catch (error) { + this.log.error( + `${fnTag} Error during recovery process for session ID: ${session.getSessionId()} - ${error}`, + ); + throw new Error( + `Recovery failed for session ID: ${session.getSessionId()}`, + ); + } + } + + public async initiateRollback( + session: SATPSession, + forceRollback?: boolean, + ): Promise { + const fnTag = `CrashRecoveryManager#initiateRollback()`; + this.log.info( + `${fnTag} Initiating rollback for session ${session.getSessionId()}`, + ); + + try { + // Implement check for rollback (needs to read logs, etc) OR we assume that at satp handler/service layer this check is done and rollback is good to do + + const sessionLog: LocalLog = await this.logRepository.readLastestLog( + session.getSessionId(), + ); + + let shouldRollback = false; + if (sessionLog.operation !== "COMPLETED") { + shouldRollback = true; + } + + if (forceRollback || shouldRollback) { + // send bridge manager and possibly others to factory + const strategy = this.factory.createStrategy(session); + const rollbackState = await this.executeRollback(strategy, session); + + if (rollbackState) { + const cleanupSuccess = await this.performCleanup( + strategy, + session, + rollbackState, + ); + return cleanupSuccess; + } else { + this.log.error( + `${fnTag} Rollback execution failed for session ${session.getSessionId()}`, + ); + return false; + } + } else { + this.log.info( + `${fnTag} Rollback not needed for session ${session.getSessionId()}`, + ); + return true; + } + } catch (error) { + this.log.error(`${fnTag} Error during rollback initiation: ${error}`); + return false; + } + } + + private async executeRollback( + strategy: RollbackStrategy, + session: SATPSession, + ): Promise { + const fnTag = `CrashRecoveryManager#executeRollback`; + this.log.debug( + `${fnTag} Executing rollback strategy for session ${session.getSessionId()}`, + ); + + try { + return await strategy.execute(session); + } catch (error) { + this.log.error(`${fnTag} Error executing rollback strategy: ${error}`); + } + } + + private async performCleanup( + strategy: RollbackStrategy, + session: SATPSession, + state: RollbackState, + ): Promise { + const fnTag = `CrashRecoveryManager#performCleanup`; + this.log.debug( + `${fnTag} Performing cleanup after rollback for session ${session.getSessionId()}`, + ); + + try { + const updatedState = await strategy.cleanup(session, state); + + // TODO: Handle the updated state, perhaps update session data or perform additional actions + this.log.info( + `${fnTag} Cleanup completed. Updated state: ${JSON.stringify(updatedState)}`, + ); + + return true; + } catch (error) { + this.log.error(`${fnTag} Error during cleanup: ${error}`); + return false; + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts new file mode 100644 index 0000000000..a8af8ceafb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts @@ -0,0 +1,232 @@ +import { ConnectRouter } from "@connectrpc/connect"; +import { CrashRecovery } from "../../generated/proto/cacti/satp/v02/crash_recovery_connect"; +import { + RecoverMessage, + RecoverUpdateMessage, + RecoverSuccessMessage, + RollbackMessage, + RollbackAckMessage, +} from "../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { CrashRecoveryService } from "./crash-utils"; +import { + Logger, + LoggerProvider, + ILoggerOptions, +} from "@hyperledger/cactus-common"; +import { Empty } from "@bufbuild/protobuf"; +import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; +import { SATPSession } from "../satp-session"; +import { ILocalLogRepository } from "../../repository/interfaces/repository"; + +interface HandlerOptions { + crashService: CrashRecoveryService; + loggerOptions: ILoggerOptions; + sessions: Map; + logRepository: ILocalLogRepository; +} + +export class CrashRecoveryHandler { + public static readonly CLASS_NAME = "CrashRecoveryHandler"; + private sessions: Map; + private service: CrashRecoveryService; + private logger: Logger; + private logRepository: ILocalLogRepository; + + constructor(ops: HandlerOptions) { + this.sessions = ops.sessions; + this.service = ops.crashService; + this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); + this.logger.trace(`Initialized ${CrashRecoveryHandler.CLASS_NAME}`); + this.logRepository = ops.logRepository; + } + + getHandlerIdentifier(): string { + return CrashRecoveryHandler.CLASS_NAME; + } + + public get Log(): Logger { + return this.logger; + } + + private generateKey(): string { + //todo: key generation logic + return "key"; + } + + async sendRecover(req: SATPSession): Promise { + const fnTag = `${this.getHandlerIdentifier()}#sendRecover`; + try { + this.Log.debug(`${fnTag}, Recover V2 Message...`); + + const sessionId = req.getSessionId(); + const sessionData = this.sessions.get(sessionId); + if (!sessionData) { + throw new Error(`${fnTag}, Session not found`); + } + + const recoverMessage = new RecoverMessage({ + sessionId: sessionId, + messageType: "Recover", + satpPhase: "phase", + sequenceNumber: Number(sessionData.lastSequenceNumber), + isBackup: false, + newIdentityPublicKey: "", + lastEntryTimestamp: sessionData.lastSequenceNumber, + senderSignature: "", + }); + + const updateMessage = + this.service.createRecoverUpdateMessage(recoverMessage); + + const logEntry = { + sessionID: sessionId, + type: "RECOVER", + key: "key", // generateKey(), + operation: "RECOVER_MESSAGE_SENT", + timestamp: new Date().toISOString(), + data: "", + }; + + await this.logRepository.create(logEntry); + return updateMessage; + } catch (error) { + throw new Error(`${fnTag}, Failed to process RecoverV2Message ${error}`); + } + } + + async sendRecoverUpdate( + req: RecoverUpdateMessage, + ): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRecoverUpdateMessage()`; + try { + this.Log.debug(`${fnTag}, Handling Recover Update Message...`); + + const sessionData = this.sessions.get(req.sessionId); + if (!sessionData) { + throw new Error( + `${fnTag}, session data not found for ID: ${req.sessionId}`, + ); + } + + const successMessage = this.service.createRecoverSuccessMessage(req); + + this.Log.debug(`${fnTag}, Recover Success Message created`); + const logEntry = { + sessionID: req.sessionId, + type: "RECOVER_UPDATE", + key: "key", // generateKey(), + operation: "RECOVER_UPDATE_MESSAGE_SENT", + timestamp: new Date().toISOString(), + data: "", + }; + + await this.logRepository.create(logEntry); + + return successMessage; + } catch (error) { + throw new Error( + `${fnTag}, Error handling Recover Update Message: ${error}`, + ); + } + } + + async sendRecoverSuccess(req: RecoverSuccessMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRecoverSuccessMessage()`; + try { + this.Log.debug(`${fnTag}, Handling Recover Success Message...`); + + const session = this.sessions.get(req.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + + this.Log.debug(`${fnTag}, Session recovery successfully completed`); + const logEntry = { + sessionID: req.sessionId, + type: "RECOVER_SUCCESS", + key: "key", // generateKey(), + operation: "RECOVER_SUCCESS_MESSAGE_SENT", + timestamp: new Date().toISOString(), + data: "", + }; + + await this.logRepository.create(logEntry); + + return new Empty(); + } catch (error) { + throw new Error( + `${fnTag}, Error handling Recover Success Message: ${error}`, + ); + } + } + + async sendRollback(req: RollbackMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRollbackMessage()`; + try { + this.Log.debug(`${fnTag}, Handling Rollback Message...`); + + const session = this.sessions.get(req.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + + const ackMessage = this.service.createRollbackAckMessage(req); + + this.Log.debug(`${fnTag}, Rollback Ack Message created`); + const logEntry = { + sessionID: req.sessionId, + type: "ROLLBACK", + key: "key", //generateKey(), + operation: "ROLLBACK_MESSAGE_SENT", + timestamp: new Date().toISOString(), + data: "", + }; + + await this.logRepository.create(logEntry); + + return ackMessage; + } catch (error) { + throw new Error(`${fnTag}, Error handling Rollback Message: ${error}`); + } + } + + async sendRollbackAck(req: RollbackAckMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRollbackAckMessage()`; + try { + this.Log.debug(`${fnTag}, Handling Rollback Ack Message...`); + + const session = this.sessions.get(req.sessionId); + if (!session) { + throw new Error(`${fnTag}, Session not found`); + } + + this.Log.debug(`${fnTag}, Rollback successfully acknowledged`); + const logEntry = { + sessionID: req.sessionId, + type: "ROLLBACK_", + key: "key", //generateKey(), + operation: "ROLLBACK_", + timestamp: new Date().toISOString(), + data: "", + }; + + await this.logRepository.create(logEntry); + + return new Empty(); + } catch (error) { + throw new Error( + `${fnTag}, Error handling Rollback Ack Message: ${error}`, + ); + } + } + + setupRouter(router: ConnectRouter): void { + router.service(CrashRecovery, { + recoverV2Message: this.sendRecover, + recoverV2UpdateMessage: this.sendRecoverUpdate, + recoverV2SuccessMessage: this.sendRecoverSuccess, + rollbackV2Message: this.sendRollback, + rollbackV2AckMessage: this.sendRollbackAck, + }); + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts new file mode 100644 index 0000000000..4a73a8635b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts @@ -0,0 +1,96 @@ +import { + Logger, + ILoggerOptions, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { + RecoverMessage, + RecoverUpdateMessage, + RecoverSuccessMessage, + RollbackMessage, + RollbackAckMessage, +} from "../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { ILocalLogRepository } from "../../repository/interfaces/repository"; + +interface ICrashRecoveryServiceOptions { + loggerOptions: ILoggerOptions; + logRepository: ILocalLogRepository; +} + +export class CrashRecoveryService { + private readonly logger: Logger; + private readonly logRepository: ILocalLogRepository; + + constructor(options: ICrashRecoveryServiceOptions) { + this.logger = LoggerProvider.getOrCreate(options.loggerOptions); + this.logRepository = options.logRepository; + } + + async createRecoverUpdateMessage( + request: RecoverMessage, + ): Promise { + this.logger.debug("Creating RecoverUpdateMessage..."); + const recoveredLogs = + await this.logRepository.readLogsMoreRecentThanTimestamp( + request.lastEntryTimestamp.toString(), + ); + + return new RecoverUpdateMessage({ + sessionId: request.sessionId, + messageType: "urn:ietf:SATP-2pc:msgtype:recover-msg", + hashRecoverMessage: "", + recoveredLogs: recoveredLogs, + senderSignature: "", + }); + } + + createRecoverSuccessMessage( + request: RecoverUpdateMessage, + ): RecoverSuccessMessage { + this.logger.debug("Creating RecoverSuccessMessage..."); + return new RecoverSuccessMessage({ + sessionId: request.sessionId, + messageType: "urn:ietf:SATP-2pc:msgtype:recover-update-msg", + hashRecoverUpdateMessage: "", + success: true, + entriesChanged: [], + senderSignature: "", + }); + } + + createRollbackAckMessage(request: RollbackMessage): RollbackAckMessage { + this.logger.debug("Creating RollbackAckMessage..."); + return new RollbackAckMessage({ + sessionId: request.sessionId, + messageType: "urn:ietf:SATP-2pc:msgtype:rollback-msg", + success: true, + actionsPerformed: [], + proofs: [], + senderSignature: "", + }); + } + + async sendRecoverMessage( + message: RecoverMessage, + ): Promise { + this.logger.debug("Sending RecoverMessage..."); + const updateMessage = await this.createRecoverUpdateMessage(message); + return updateMessage; + } + + async sendRecoverUpdateMessage( + message: RecoverUpdateMessage, + ): Promise { + this.logger.debug("Sending RecoverUpdateMessage..."); + const successMessage = this.createRecoverSuccessMessage(message); + return successMessage; + } + + async sendRollbackMessage( + message: RollbackMessage, + ): Promise { + this.logger.debug("Sending RollbackMessage..."); + const ackMessage = this.createRollbackAckMessage(message); + return ackMessage; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts new file mode 100644 index 0000000000..901d2194be --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts @@ -0,0 +1,62 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPSession } from "../../satp-session"; +import { Stage0RollbackStrategy } from "./stage0-rollback-strategy"; +import { Stage1RollbackStrategy } from "./stage1-rollback-strategy"; +import { Stage2RollbackStrategy } from "./stage2-rollback-strategy"; +import { Stage3RollbackStrategy } from "./stage3-rollback-strategy"; +import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; +import { SATPBridgeConfig } from "../../types"; + +export interface RollbackState { + currentStage: string; + // todo add rollback state + // placeholder, should import RollbackLogEntry from protos. + // RollbackLogEntry in spec = RollbackState in code + rollbackLogEntry: RollbackLogEntry; +} + +export interface RollbackStrategy { + execute(session: SATPSession): Promise; + // todo do we want to return any information? + cleanup(session: SATPSession, state: RollbackState): Promise; +} + +export class RollbackStrategyFactory { + private log: Logger; + private bridgeManager: SATPBridgeManager; + + constructor(config: SATPBridgeConfig) { + this.log = LoggerProvider.getOrCreate({ label: "RollbackStrategyFactory" }); + this.bridgeManager = new SATPBridgeManager(config); + } + + // todo add bridge manager and possibly others so each strategy can connect to satp bridge + createStrategy(session: SATPSession): RollbackStrategy { + const fnTag = "RollbackStrategyFactory#createStrategy"; + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData()! + : session.getServerSessionData()!; + const rollbackLogEntry = new RollbackLogEntry(); + + if (!sessionData.hashes) { + this.log.debug(`${fnTag} Creating Stage0RollbackStrategy`); + return new Stage0RollbackStrategy(rollbackLogEntry); + } else if ( + !sessionData.hashes.stage2 || + Object.keys(sessionData.hashes.stage2).length === 0 + ) { + this.log.debug(`${fnTag} Creating Stage1RollbackStrategy`); + return new Stage1RollbackStrategy(this.bridgeManager, rollbackLogEntry); + } else if ( + !sessionData.hashes.stage3 || + Object.keys(sessionData.hashes.stage3).length === 0 + ) { + this.log.debug(`${fnTag} Creating Stage2RollbackStrategy`); + return new Stage2RollbackStrategy(this.bridgeManager, rollbackLogEntry); + } else { + this.log.debug(`${fnTag} Creating Stage3RollbackStrategy`); + return new Stage3RollbackStrategy(this.bridgeManager, rollbackLogEntry); + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts new file mode 100644 index 0000000000..fd2b5ec709 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts @@ -0,0 +1,74 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPSession } from "../../satp-session"; +import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; +import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; + +export class Stage0RollbackStrategy implements RollbackStrategy { + private log: Logger; + private rollbackLogEntry: RollbackLogEntry; + + constructor(logEntry: RollbackLogEntry) { + this.log = LoggerProvider.getOrCreate({ label: "Stage0RollbackStrategy" }); + this.rollbackLogEntry = logEntry; + } + + // return a rollback state in all strategies + async execute(session: SATPSession): Promise { + const fnTag = "Stage0RollbackStrategy#execute"; + this.log.info(`${fnTag} Executing rollback for Stage 0`); + + // check session exists + if (!session) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + try { + // TODO record the rollback on the log. Implement RollbackLogEntry + this.log.debug("Persisting rollback log entry"); + + this.rollbackLogEntry.sessionId = session.getSessionId(); + this.rollbackLogEntry.stage = "Stage0"; + this.rollbackLogEntry.timestamp = Date.now().toString(); + this.rollbackLogEntry.action = ""; + this.rollbackLogEntry.status = "SUCCESS"; + this.rollbackLogEntry.details = ""; + + this.log.info(`Successfully rolled back Stage 0`); + + const state: RollbackState = { + currentStage: "Stage0", + rollbackLogEntry: this.rollbackLogEntry, + }; + await this.rollbackLogs.create(state); // todo: log for the rollbackentry + + return state; + } catch (error) { + this.log.error(`Failed to rollback Stage 0: ${error}`); + + this.rollbackLogEntry.sessionId = session.getSessionId(); + this.rollbackLogEntry.stage = "Stage0"; + this.rollbackLogEntry.timestamp = Date.now().toString(); + this.rollbackLogEntry.action = ""; + this.rollbackLogEntry.status = "FAILURE"; + this.rollbackLogEntry.details = ""; + + const state: RollbackState = { + currentStage: "Stage0", + rollbackLogEntry: this.rollbackLogEntry, + }; + await this.rollbackLogs.create(state); // todo: implement the correct log support + return state; + } + } + + async cleanup(session: SATPSession): Promise { + const fnTag = "Stage0RollbackStrategy#cleanup"; + // for stage 0, do nothing + const state: RollbackState = { + currentStage: "Stage0", + }; + if (!session) { + this.log.error(`${fnTag} Session not found`); + } + return state; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts new file mode 100644 index 0000000000..bd50d4ca1e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts @@ -0,0 +1,83 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPSession } from "../../satp-session"; +import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; +import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; + +export class Stage1RollbackStrategy implements RollbackStrategy { + private log: Logger; + private bridgeManager: SATPBridgeManager; + private rollbackLogEntry: RollbackLogEntry; + + constructor(bridgeManager: SATPBridgeManager, logEntry: RollbackLogEntry) { + this.log = LoggerProvider.getOrCreate({ label: "Stage1RollbackStrategy" }); + this.bridgeManager = bridgeManager; + this.rollbackLogEntry = logEntry; + } + + async execute(session: SATPSession): Promise { + const fnTag = "Stage1RollbackStrategy#execute"; + this.log.info(`${fnTag} Executing rollback for Stage 1`); + + if (!session) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + + try { + // TODO: Implement Stage 1 specific rollback logic + + // TODO: Record the rollback on the log. Implement RollbackLogEntry + + const receipt = await this.bridgeManager.unwrapAsset("assetId"); + + this.log.info(`${fnTag}, Asset unlocked: ${receipt}`); + + this.rollbackLogEntry.sessionId = session.getSessionId(); + this.rollbackLogEntry.stage = "Stage1"; + this.rollbackLogEntry.timestamp = Date.now().toString(); + this.rollbackLogEntry.action = "UNWRAP"; + this.rollbackLogEntry.status = "SUCCESS"; + this.rollbackLogEntry.details = ""; + + this.log.debug("Persisting rollback log entry"); + + this.log.info(`Successfully rolled back Stage 1`); + + const state: RollbackState = { + currentStage: "Stage1", + rollbackLogEntry: this.rollbackLogEntry, + }; + + await this.rollbackLogs.create(state); // todo: log support + return state; + } catch (error) { + this.log.error(`Failed to rollback Stage 1: ${error}`); + return false; + } + } + + async cleanup( + session: SATPSession, + state: RollbackState, + ): Promise { + const fnTag = "Stage1RollbackStrategy#cleanup"; + this.log.info(`${fnTag} Cleaning up after Stage 1 rollback`); + + if (!session) { + this.log.error(`${fnTag} Session not found`); + return state; + } + + try { + // TODO: Implement Stage 1 specific cleanup logic + + state.currentStage = "Stage1"; + // TODO: Update other state properties as needed + + return state; + } catch (error) { + this.log.error(`${fnTag} Cleanup failed: ${error}`); + return state; + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts new file mode 100644 index 0000000000..261e13384c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts @@ -0,0 +1,81 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPSession } from "../../satp-session"; +import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; +import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; + +export class Stage2RollbackStrategy implements RollbackStrategy { + private log: Logger; + private bridgeManager: SATPBridgeManager; + private rollbackLogEntry: RollbackLogEntry; + + constructor(bridgeManager: SATPBridgeManager, logEntry: RollbackLogEntry) { + this.log = LoggerProvider.getOrCreate({ label: "Stage2RollbackStrategy" }); + this.bridgeManager = bridgeManager; + this.rollbackLogEntry = logEntry; + } + + async execute(session: SATPSession): Promise { + const fnTag = "Stage2RollbackStrategy#execute"; + this.log.info(`${fnTag} Executing rollback for Stage 2`); + + if (!session) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + + try { + // TODO: Implement Stage 2 specific rollback logic + + // TODO: Record the rollback on the log. Implement RollbackLogEntry + this.log.debug("Persisting rollback log entry"); + + const receipt = await this.bridgeManager.unlockAsset("assetId", Number()); + + this.log.info(`${fnTag}, Asset unlocked: ${receipt}`); + this.rollbackLogEntry.sessionId = session.getSessionId(); + this.rollbackLogEntry.stage = "Stage2"; + this.rollbackLogEntry.timestamp = Date.now().toString(); + this.rollbackLogEntry.action = "UNLOCK"; + this.rollbackLogEntry.status = "SUCCESS"; + this.rollbackLogEntry.details = ""; + + this.log.info(`Successfully rolled back Stage 2`); + + const state: RollbackState = { + currentStage: "Stage2", + rollbackLogEntry: this.rollbackLogEntry, + }; + + await this.rollbackLogs.create(state); // todo: log support + return state; + } catch (error) { + this.log.error(`Failed to rollback Stage 2: ${error}`); + return false; + } + } + + async cleanup( + session: SATPSession, + state: RollbackState, + ): Promise { + const fnTag = "Stage2RollbackStrategy#cleanup"; + this.log.info(`${fnTag} Cleaning up after Stage 2 rollback`); + + if (!session) { + this.log.error(`${fnTag} Session not found`); + return state; + } + + try { + // TODO: Implement Stage 2 specific cleanup logic + + state.currentStage = "Stage2"; + // TODO: Update other state properties as needed + + return state; + } catch (error) { + this.log.error(`${fnTag} Cleanup failed: ${error}`); + return state; + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts new file mode 100644 index 0000000000..1bf35232c4 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts @@ -0,0 +1,82 @@ +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPSession } from "../../satp-session"; +import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; +import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; + +export class Stage3RollbackStrategy implements RollbackStrategy { + private log: Logger; + private bridgeManager: SATPBridgeManager; + private rollbackLogEntry: RollbackLogEntry; + + constructor(bridgeManager: SATPBridgeManager, logEntry: RollbackLogEntry) { + this.log = LoggerProvider.getOrCreate({ label: "Stage3RollbackStrategy" }); + this.bridgeManager = bridgeManager; + this.rollbackLogEntry = logEntry; + } + + async execute(session: SATPSession): Promise { + const fnTag = "Stage3RollbackStrategy#execute"; + this.log.info(`${fnTag} Executing rollback for Stage 3`); + + if (!session) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + + try { + // TODO: Implement Stage 3 specific rollback logic + + // TODO: Record the rollback on the log. Implement RollbackLogEntry + + const receipt = await this.bridgeManager.burnAsset("assetId", Number()); + + this.log.info(`${fnTag}, Asset unlocked: ${receipt}`); + + this.rollbackLogEntry.sessionId = session.getSessionId(); + this.rollbackLogEntry.stage = "Stage3"; + this.rollbackLogEntry.timestamp = Date.now().toString(); + this.rollbackLogEntry.action = "BURN"; + this.rollbackLogEntry.status = "SUCCESS"; + this.rollbackLogEntry.details = ""; + + this.log.debug("Persisting rollback log entry"); + + this.log.info(`Successfully rolled back Stage 3`); + const state: RollbackState = { + currentStage: "Stage3", + rollbackLogEntry: this.rollbackLogEntry, + }; + + await this.rollbackLogs.create(state); // todo: log support + return state; + } catch (error) { + this.log.error(`Failed to rollback Stage 3: ${error}`); + return false; + } + } + + async cleanup( + session: SATPSession, + state: RollbackState, + ): Promise { + const fnTag = "Stage3RollbackStrategy#cleanup"; + this.log.info(`${fnTag} Cleaning up after Stage 3 rollback`); + + if (!session) { + this.log.error(`${fnTag} Session not found`); + return state; + } + + try { + // TODO: Implement Stage 3 specific cleanup logic + + state.currentStage = "Stage3"; + // TODO: Update other state properties as needed + + return state; + } catch (error) { + this.log.error(`${fnTag} Cleanup failed: ${error}`); + return state; + } + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts index 74b5cfc08c..4ae4af7732 100755 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/SATPWrapperContract.ts @@ -1,12 +1,12 @@ -import BN from 'bn.js'; -import BigNumber from 'bignumber.js'; +import BN from "bn.js"; +import BigNumber from "bignumber.js"; import { PromiEvent, TransactionReceipt, EventResponse, EventData, Web3ContractContext, -} from 'ethereum-abi-types-generator'; +} from "ethereum-abi-types-generator"; export interface CallOptions { from?: string; @@ -31,12 +31,12 @@ export interface MethodPayableReturnContext { send(options: SendOptions): PromiEvent; send( options: SendOptions, - callback: (error: Error, result: any) => void + callback: (error: Error, result: any) => void, ): PromiEvent; estimateGas(options: EstimateGasOptions): Promise; estimateGas( options: EstimateGasOptions, - callback: (error: Error, result: any) => void + callback: (error: Error, result: any) => void, ): Promise; encodeABI(): string; } @@ -46,7 +46,7 @@ export interface MethodConstantReturnContext { call(options: CallOptions): Promise; call( options: CallOptions, - callback: (error: Error, result: TCallReturn) => void + callback: (error: Error, result: TCallReturn) => void, ): Promise; encodeABI(): string; } @@ -60,60 +60,60 @@ export type ContractContext = Web3ContractContext< SATPWrapperContractEvents >; export type SATPWrapperContractEvents = - | 'Assign' - | 'Burn' - | 'Changed' - | 'Lock' - | 'Mint' - | 'OwnershipTransferred' - | 'Unlock' - | 'Unwrap' - | 'Wrap'; + | "Assign" + | "Burn" + | "Changed" + | "Lock" + | "Mint" + | "OwnershipTransferred" + | "Unlock" + | "Unwrap" + | "Wrap"; export interface SATPWrapperContractEventsContext { Assign( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Burn( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Changed( parameters: { filter?: { id?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Lock( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Mint( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; OwnershipTransferred( parameters: { @@ -122,57 +122,57 @@ export interface SATPWrapperContractEventsContext { newOwner?: string | string[]; }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Unlock( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Unwrap( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; Wrap( parameters: { filter?: { tokenId?: string | string[] }; fromBlock?: number; - toBlock?: 'latest' | number; + toBlock?: "latest" | number; topics?: string[]; }, - callback?: (error: Error, event: EventData) => void + callback?: (error: Error, event: EventData) => void, ): EventResponse; } export type SATPWrapperContractMethodNames = - | 'new' - | 'assign' - | 'bridge_address' - | 'burn' - | 'getAllAssetsIDs' - | 'getToken' - | 'lock' - | 'mint' - | 'owner' - | 'renounceOwnership' - | 'tokens' - | 'tokensInteractions' - | 'transferOwnership' - | 'unlock' - | 'unwrap' - | 'wrap' - | 'wrap'; + | "new" + | "assign" + | "bridge_address" + | "burn" + | "getAllAssetsIDs" + | "getToken" + | "lock" + | "mint" + | "owner" + | "renounceOwnership" + | "tokens" + | "tokensInteractions" + | "transferOwnership" + | "unlock" + | "unwrap" + | "wrap" + | "wrap"; export interface TokenResponse { contractAddress: string; tokenType: string; @@ -243,7 +243,7 @@ export interface SATPWrapperContract { * Type: constructor * @param _bridge_address Type: address, Indexed: false */ - 'new'(_bridge_address: string): MethodReturnContext; + "new"(_bridge_address: string): MethodReturnContext; /** * Payable: false * Constant: false @@ -256,7 +256,7 @@ export interface SATPWrapperContract { assign( tokenId: string, receiver_account: string, - amount: string + amount: string, ): MethodReturnContext; /** * Payable: false @@ -339,7 +339,7 @@ export interface SATPWrapperContract { */ tokensInteractions( parameter0: string, - parameter1: string | number + parameter1: string | number, ): MethodConstantReturnContext; /** * Payable: false @@ -382,7 +382,7 @@ export interface SATPWrapperContract { tokenType: string | number, tokenId: string, owner: string, - interactions: InteractionsRequest[] + interactions: InteractionsRequest[], ): MethodReturnContext; /** * Payable: false @@ -398,6 +398,6 @@ export interface SATPWrapperContract { contractAddress: string, tokenType: string | number, tokenId: string, - owner: string + owner: string, ): MethodReturnContext; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts index de4bca5b35..73ef2d5e66 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_connect.ts @@ -3,6 +3,9 @@ /* eslint-disable */ // @ts-nocheck +import { RecoverMessage, RecoverSuccessMessage, RecoverUpdateMessage, RollbackAckMessage, RollbackMessage } from "./crash_recovery_pb.js"; +import { Empty, MethodKind } from "@bufbuild/protobuf"; + /** * TODO: Rollback and crash-recovery related * @@ -13,6 +16,53 @@ export const CrashRecovery = { typeName: "cacti.satp.v02.crash.CrashRecovery", methods: { + /** + * step RPCs + * + * @generated from rpc cacti.satp.v02.crash.CrashRecovery.RecoverV2Message + */ + recoverV2Message: { + name: "RecoverV2Message", + I: RecoverMessage, + O: RecoverUpdateMessage, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.crash.CrashRecovery.RecoverV2UpdateMessage + */ + recoverV2UpdateMessage: { + name: "RecoverV2UpdateMessage", + I: RecoverUpdateMessage, + O: RecoverSuccessMessage, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.crash.CrashRecovery.RecoverV2SuccessMessage + */ + recoverV2SuccessMessage: { + name: "RecoverV2SuccessMessage", + I: RecoverSuccessMessage, + O: Empty, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.crash.CrashRecovery.RollbackV2Message + */ + rollbackV2Message: { + name: "RollbackV2Message", + I: RollbackMessage, + O: RollbackAckMessage, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc cacti.satp.v02.crash.CrashRecovery.RollbackV2AckMessage + */ + rollbackV2AckMessage: { + name: "RollbackV2AckMessage", + I: RollbackAckMessage, + O: Empty, + kind: MethodKind.Unary, + }, } } as const; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts new file mode 100644 index 0000000000..a3943ab64e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts @@ -0,0 +1,489 @@ +// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated from file cacti/satp/v02/crash_recovery.proto (package cacti.satp.v02.crash, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; + +/** + * @generated from message cacti.satp.v02.crash.RecoverMessage + */ +export class RecoverMessage extends Message { + /** + * @generated from field: string sessionId = 1; + */ + sessionId = ""; + + /** + * @generated from field: string messageType = 2; + */ + messageType = ""; + + /** + * @generated from field: string satpPhase = 3; + */ + satpPhase = ""; + + /** + * @generated from field: int32 sequenceNumber = 4; + */ + sequenceNumber = 0; + + /** + * @generated from field: bool isBackup = 5; + */ + isBackup = false; + + /** + * @generated from field: string newIdentityPublicKey = 6; + */ + newIdentityPublicKey = ""; + + /** + * @generated from field: int64 lastEntryTimestamp = 7; + */ + lastEntryTimestamp = protoInt64.zero; + + /** + * @generated from field: string senderSignature = 8; + */ + senderSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RecoverMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "messageType", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "satpPhase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "sequenceNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 5, name: "isBackup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "newIdentityPublicKey", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "lastEntryTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 8, name: "senderSignature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RecoverMessage { + return new RecoverMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RecoverMessage { + return new RecoverMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RecoverMessage { + return new RecoverMessage().fromJsonString(jsonString, options); + } + + static equals(a: RecoverMessage | PlainMessage | undefined, b: RecoverMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(RecoverMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.crash.RecoverUpdateMessage + */ +export class RecoverUpdateMessage extends Message { + /** + * @generated from field: string sessionId = 1; + */ + sessionId = ""; + + /** + * @generated from field: string messageType = 2; + */ + messageType = ""; + + /** + * @generated from field: string hashRecoverMessage = 3; + */ + hashRecoverMessage = ""; + + /** + * @generated from field: repeated cacti.satp.v02.crash.LocalLog recoveredLogs = 4; + */ + recoveredLogs: LocalLog[] = []; + + /** + * @generated from field: string senderSignature = 5; + */ + senderSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RecoverUpdateMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "messageType", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "hashRecoverMessage", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "recoveredLogs", kind: "message", T: LocalLog, repeated: true }, + { no: 5, name: "senderSignature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RecoverUpdateMessage { + return new RecoverUpdateMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RecoverUpdateMessage { + return new RecoverUpdateMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RecoverUpdateMessage { + return new RecoverUpdateMessage().fromJsonString(jsonString, options); + } + + static equals(a: RecoverUpdateMessage | PlainMessage | undefined, b: RecoverUpdateMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(RecoverUpdateMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.crash.RecoverSuccessMessage + */ +export class RecoverSuccessMessage extends Message { + /** + * @generated from field: string sessionId = 1; + */ + sessionId = ""; + + /** + * @generated from field: string messageType = 2; + */ + messageType = ""; + + /** + * @generated from field: string hashRecoverUpdateMessage = 3; + */ + hashRecoverUpdateMessage = ""; + + /** + * @generated from field: bool success = 4; + */ + success = false; + + /** + * @generated from field: repeated string entriesChanged = 5; + */ + entriesChanged: string[] = []; + + /** + * @generated from field: string senderSignature = 6; + */ + senderSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RecoverSuccessMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "messageType", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "hashRecoverUpdateMessage", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "success", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "entriesChanged", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 6, name: "senderSignature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RecoverSuccessMessage { + return new RecoverSuccessMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RecoverSuccessMessage { + return new RecoverSuccessMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RecoverSuccessMessage { + return new RecoverSuccessMessage().fromJsonString(jsonString, options); + } + + static equals(a: RecoverSuccessMessage | PlainMessage | undefined, b: RecoverSuccessMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(RecoverSuccessMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.crash.RollbackMessage + */ +export class RollbackMessage extends Message { + /** + * @generated from field: string sessionId = 1; + */ + sessionId = ""; + + /** + * @generated from field: string messageType = 2; + */ + messageType = ""; + + /** + * @generated from field: bool success = 3; + */ + success = false; + + /** + * @generated from field: repeated string actionsPerformed = 4; + */ + actionsPerformed: string[] = []; + + /** + * @generated from field: repeated string proofs = 5; + */ + proofs: string[] = []; + + /** + * @generated from field: string senderSignature = 6; + */ + senderSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RollbackMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "messageType", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "success", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "actionsPerformed", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "proofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 6, name: "senderSignature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RollbackMessage { + return new RollbackMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RollbackMessage { + return new RollbackMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RollbackMessage { + return new RollbackMessage().fromJsonString(jsonString, options); + } + + static equals(a: RollbackMessage | PlainMessage | undefined, b: RollbackMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(RollbackMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.crash.RollbackAckMessage + */ +export class RollbackAckMessage extends Message { + /** + * @generated from field: string sessionId = 1; + */ + sessionId = ""; + + /** + * @generated from field: string messageType = 2; + */ + messageType = ""; + + /** + * @generated from field: bool success = 3; + */ + success = false; + + /** + * @generated from field: repeated string actionsPerformed = 4; + */ + actionsPerformed: string[] = []; + + /** + * @generated from field: repeated string proofs = 5; + */ + proofs: string[] = []; + + /** + * @generated from field: string senderSignature = 6; + */ + senderSignature = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RollbackAckMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "messageType", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "success", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "actionsPerformed", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "proofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 6, name: "senderSignature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RollbackAckMessage { + return new RollbackAckMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RollbackAckMessage { + return new RollbackAckMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RollbackAckMessage { + return new RollbackAckMessage().fromJsonString(jsonString, options); + } + + static equals(a: RollbackAckMessage | PlainMessage | undefined, b: RollbackAckMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(RollbackAckMessage, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.crash.LocalLog + */ +export class LocalLog extends Message { + /** + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: string sessionId = 2; + */ + sessionId = ""; + + /** + * @generated from field: string data = 3; + */ + data = ""; + + /** + * @generated from field: string type = 4; + */ + type = ""; + + /** + * @generated from field: string operation = 5; + */ + operation = ""; + + /** + * @generated from field: string timestamp = 6; + */ + timestamp = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.LocalLog"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "operation", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LocalLog { + return new LocalLog().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LocalLog { + return new LocalLog().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LocalLog { + return new LocalLog().fromJsonString(jsonString, options); + } + + static equals(a: LocalLog | PlainMessage | undefined, b: LocalLog | PlainMessage | undefined): boolean { + return proto3.util.equals(LocalLog, a, b); + } +} + +/** + * @generated from message cacti.satp.v02.crash.RollbackLogEntry + */ +export class RollbackLogEntry extends Message { + /** + * @generated from field: string session_id = 1; + */ + sessionId = ""; + + /** + * @generated from field: string stage = 2; + */ + stage = ""; + + /** + * @generated from field: string timestamp = 3; + */ + timestamp = ""; + + /** + * action performed during rollback + * + * @generated from field: string action = 4; + */ + action = ""; + + /** + * status of rollback (e.g., SUCCESS, FAILED) + * + * @generated from field: string status = 5; + */ + status = ""; + + /** + * Additional details or metadata about the rollback + * + * @generated from field: string details = 6; + */ + details = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RollbackLogEntry"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "stage", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "action", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "details", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RollbackLogEntry { + return new RollbackLogEntry().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RollbackLogEntry { + return new RollbackLogEntry().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RollbackLogEntry { + return new RollbackLogEntry().fromJsonString(jsonString, options); + } + + static equals(a: RollbackLogEntry | PlainMessage | undefined, b: RollbackLogEntry | PlainMessage | undefined): boolean { + return proto3.util.equals(RollbackLogEntry, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index 48e54902e7..732f6e84a2 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -55,6 +55,11 @@ import { SATPBridgesManager, } from "./gol/satp-bridges-manager"; import bodyParser from "body-parser"; +import { + CrashOcurrence, + CrashRecoveryManager, + ICrashRecoveryManagerOptions, +} from "./core/recovery/crash-manager"; import cors from "cors"; import * as OAS from "../json/openapi-blo-bundled.json"; @@ -95,6 +100,7 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { public localRepository?: ILocalLogRepository; public remoteRepository?: IRemoteLogRepository; private readonly shutdownHooks: ShutdownHook[]; + private readonly crashManager: CrashRecoveryManager; constructor(public readonly options: SATPGatewayConfig) { const fnTag = `${this.className}#constructor()`; @@ -173,7 +179,20 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { this.BLODispatcher = new BLODispatcher(dispatcherOps); this.OAPIServerEnabled = this.config.enableOpenAPI ?? true; - this.OAS = OAS; + const specPath = path.join(__dirname, "../json/openapi-blo-bundled.json"); + this.OAS = JSON.parse(fs.readFileSync(specPath, "utf8")); + if (!this.OAS) { + this.logger.warn("Error loading OAS"); + } + + // After setup, initialize crash manager and check if we crashed; + const crashOptions: ICrashRecoveryManagerOptions = { + instanceId: this.instanceId, + logLevel: this.config.logLevel, + bridgeConfig: SATPBridgeConfig, + }; + this.crashManager = new CrashRecoveryManager(crashOptions); + this.crashManager.checkAndResolveCrash(); } /* ICactus Plugin methods */ diff --git a/yarn.lock b/yarn.lock index 9f2e1d3c7d..d9b8477a47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9112,6 +9112,7 @@ __metadata: "@types/fs-extra": "npm:11.0.4" "@types/google-protobuf": "npm:3.15.5" "@types/node": "npm:18.18.2" + "@types/pg": "npm:8.6.5" "@types/swagger-ui-express": "npm:4.1.6" "@types/tape": "npm:4.13.4" "@types/uuid": "npm:10.0.0" @@ -9141,6 +9142,7 @@ __metadata: make-dir-cli: "npm:3.1.0" npm-run-all: "npm:4.1.5" openzeppelin-solidity: "npm:3.4.2" + pg: "npm:^8.8.0" protobufjs: "npm:7.2.5" safe-stable-stringify: "npm:2.5.0" secp256k1: "npm:4.0.3" @@ -40521,17 +40523,24 @@ __metadata: languageName: node linkType: hard -"pg-connection-string@npm:2.5.0": +"pg-cloudflare@npm:^1.1.1": + version: 1.1.1 + resolution: "pg-cloudflare@npm:1.1.1" + checksum: 10/45ca0c7926967ec9e66a9efc73ca57e3e933671b541bc774631a02ce683e7f658d0a4e881119b3f61486f38e344ae1b008d3a20eb5e21701c5fa8ff8382c5538 + languageName: node + linkType: hard + +"pg-connection-string@npm:2.5.0, pg-connection-string@npm:^2.5.0": version: 2.5.0 resolution: "pg-connection-string@npm:2.5.0" checksum: 10/a6f3a068f7c9416a5b33a326811caf0dfaaee045c225b7c628b4c9b4e9a2b25bdd12a21e4c48940e1000ea223a4e608ca122d2ff3dd08c8b1db0fc9f5705133a languageName: node linkType: hard -"pg-connection-string@npm:2.6.1": - version: 2.6.1 - resolution: "pg-connection-string@npm:2.6.1" - checksum: 10/882344a47e1ecf3a91383e0809bf2ac48facea97fcec0358d6e060e1cbcb8737acde419b4c86f05da4ce4a16634ee50fff1d2bb787d73b52ccbfde697243ad8a +"pg-connection-string@npm:^2.6.4": + version: 2.6.4 + resolution: "pg-connection-string@npm:2.6.4" + checksum: 10/2c1d2ac1add1f93076f1594d217a0980f79add05dc48de6363e1c550827c78a6ee3e3b5420da9c54858f6b678cdb348aed49732ee68158b6cdb70f1d1c748cf9 languageName: node linkType: hard @@ -40558,6 +40567,15 @@ __metadata: languageName: node linkType: hard +"pg-pool@npm:^3.6.2": + version: 3.6.2 + resolution: "pg-pool@npm:3.6.2" + peerDependencies: + pg: ">=8.0" + checksum: 10/d5ccefb9a4913c737e07106ada841c7d8f2b110b02ef6b4cee198e1e7e758bac43cb3b6df7646e25858b9fe300db00f2f349868296fbd4b3b4c99c15906d1596 + languageName: node + linkType: hard + "pg-protocol@npm:*, pg-protocol@npm:^1.5.0": version: 1.7.0 resolution: "pg-protocol@npm:1.7.0" @@ -40565,6 +40583,13 @@ __metadata: languageName: node linkType: hard +"pg-protocol@npm:^1.6.1": + version: 1.6.1 + resolution: "pg-protocol@npm:1.6.1" + checksum: 10/9af672208adae8214f55f5b4597c4699ab9946205a99863d3e2bb8d024fdab16711457b539bc366cc29040218aa87508cf61294b76d288f48881b973d9117bd6 + languageName: node + linkType: hard + "pg-types@npm:^2.1.0, pg-types@npm:^2.2.0": version: 2.2.0 resolution: "pg-types@npm:2.2.0" @@ -40598,6 +40623,28 @@ __metadata: languageName: node linkType: hard +"pg@npm:^8.8.0": + version: 8.12.0 + resolution: "pg@npm:8.12.0" + dependencies: + pg-cloudflare: "npm:^1.1.1" + pg-connection-string: "npm:^2.6.4" + pg-pool: "npm:^3.6.2" + pg-protocol: "npm:^1.6.1" + pg-types: "npm:^2.1.0" + pgpass: "npm:1.x" + peerDependencies: + pg-native: ">=3.0.1" + dependenciesMeta: + pg-cloudflare: + optional: true + peerDependenciesMeta: + pg-native: + optional: true + checksum: 10/ce39af0e85d42bf5fc8dcc02c57b38d4cb203fea937688509a77c0b005a54d4821e5e5963a5663934d76994eab42381698f08a44e21544b4545fd9d142dcfd12 + languageName: node + linkType: hard + "pgpass@npm:1.x": version: 1.0.5 resolution: "pgpass@npm:1.0.5" From eaac8fd098975b1ab9c6cd6ae8046781e3509d35 Mon Sep 17 00:00:00 2001 From: Yogesh01000100 Date: Mon, 14 Oct 2024 19:33:25 +0000 Subject: [PATCH 47/49] fix: add unit tests and resolve rollbackstate Signed-off-by: Yogesh01000100 --- .../cactus-plugin-satp-hermes/package.json | 5 +- .../proto/cacti/satp/v02/crash_recovery.proto | 10 + .../typescript/core/recovery/crash-manager.ts | 243 +++++++------ .../core/recovery/crash-recovery-handler.ts | 176 ++++----- .../typescript/core/recovery/crash-utils.ts | 38 +- .../rollback/rollback-strategy-factory.ts | 45 ++- .../rollback/stage0-rollback-strategy.ts | 97 ++--- .../rollback/stage1-rollback-strategy.ts | 123 +++++-- .../rollback/stage2-rollback-strategy.ts | 122 +++++-- .../rollback/stage3-rollback-strategy.ts | 122 +++++-- .../proto/cacti/satp/v02/common/health_pb.ts | 2 +- .../proto/cacti/satp/v02/common/message_pb.ts | 2 +- .../proto/cacti/satp/v02/common/session_pb.ts | 2 +- .../proto/cacti/satp/v02/crash_recovery_pb.ts | 79 +++- .../proto/cacti/satp/v02/stage_0_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_1_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_2_pb.ts | 2 +- .../proto/cacti/satp/v02/stage_3_pb.ts | 2 +- .../proto/cacti/satp/v02/view/bungee_pb.ts | 2 +- .../typescript/plugin-satp-hermes-gateway.ts | 5 +- .../typescript/unit/recovery/logging.test.ts | 340 ++++++++++++++++++ .../typescript/unit/recovery/services.test.ts | 158 ++++++++ .../unit/recovery/start-gateway.test.ts | 90 +++++ yarn.lock | 7 + 24 files changed, 1235 insertions(+), 441 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/start-gateway.test.ts diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index 7a926ac664..b1057964fe 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -81,9 +81,6 @@ "start-gateway": "node ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js", "tsc": "tsc --project ./tsconfig.json", "watch": "tsc --build --watch", - "forge": "forge build ./src/solidity/*.sol --out ./src/solidity/generated", - "forge:test": "forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated", - "forge:all": "run-s 'forge' 'forge:test'", "db:setup": "bash -c 'npm run db:destroy || true && run-s db:start db:migrate db:seed'", "db:destroy": "docker-compose down -v && npm run db:cleanup", "db:start": "docker-compose up -d", @@ -137,7 +134,7 @@ "kubo-rpc-client": "3.0.1", "npm-run-all": "4.1.5", "openzeppelin-solidity": "3.4.2", - "pg": "^8.8.0", + "pg": "^8.13.0", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto index 2b3abdb061..d94d083b05 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto @@ -78,4 +78,14 @@ message RollbackLogEntry { string action = 4; // action performed during rollback string status = 5; // status of rollback (e.g., SUCCESS, FAILED) string details = 6; // Additional details or metadata about the rollback +} + +message RollbackState { + string session_id = 1; + string current_stage = 2; + int32 steps_remaining = 3; + repeated RollbackLogEntry rollback_log_entries = 4; + string estimated_time_to_completion = 5; + string status = 6; // Overall status (e.g., IN_PROGRESS, COMPLETED, FAILED) + string details = 7; // Additional metadata or information } \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts index 90f6984602..93c7ac2d52 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts @@ -8,7 +8,6 @@ import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session import { CrashRecoveryHandler } from "./crash-recovery-handler"; import { SATPSession } from "../satp-session"; import { - RollbackState, RollbackStrategy, RollbackStrategyFactory, } from "./rollback/rollback-strategy-factory"; @@ -16,13 +15,20 @@ import { CrashRecoveryService } from "./crash-utils"; import { KnexLocalLogRepository as LocalLogRepository } from "../../repository/knex-local-log-repository"; import { ILocalLogRepository } from "../../repository/interfaces/repository"; import { Knex } from "knex"; -import { SATPBridgeConfig, LocalLog } from "../types"; +import { + RecoverMessage, + RecoverSuccessMessage, + RecoverUpdateMessage, + RollbackState, +} from "../../generated/proto/cacti/satp/v02/crash_recovery_pb"; import { SessionType } from "../session-utils"; +import { ISATPBridgesOptions } from "../../gol/satp-bridges-manager"; -enum CrashStatus { +export enum CrashStatus { IN_RECOVERY = "IN_RECOVERY", RECOVERED = "RECOVERED", NO_CRASH = "NO_CRASH", + ERROR = "ERROR", } class CrashOccurrence { @@ -37,7 +43,7 @@ export interface ICrashRecoveryManagerOptions { logLevel?: LogLevelDesc; instanceId: string; knexConfig?: Knex.Config; - bridgeConfig: SATPBridgeConfig; + bridgeConfig: ISATPBridgesOptions; } export class CrashRecoveryManager { @@ -59,8 +65,11 @@ export class CrashRecoveryManager { this.instanceId = options.instanceId; this.sessions = new Map(); this.log.info(`Instantiated ${this.className} OK`); - this.factory = new RollbackStrategyFactory(options.bridgeConfig); this.logRepository = new LocalLogRepository(options.knexConfig); + this.factory = new RollbackStrategyFactory( + options.bridgeConfig, + this.logRepository, + ); const crashRecoveryServiceOptions = { logLevel: this.options.logLevel, instanceId: this.instanceId, @@ -85,72 +94,39 @@ export class CrashRecoveryManager { return CrashRecoveryManager.CLASS_NAME; } - public async init(): Promise { - this.sessions = await this.getSessions(); - } - - // todo read from local log to get session data - /*private async getSessions(): Map { - const sessionMap = new Map(); - try { - const allSessions = await this.logRepository.readLogsNotProofs(); - allSessions.forEach((log) => { - const sessionData = new SessionData(); - sessionData.id = log.sessionID; - - sessionMap.set(log.sessionID, sessionData); - }); - } catch (error) { - this.log.error(`Error initializing sessions: ${error}`); - } - - return sessionMap; - }*/ - - private async getSessions(): Promise> { - const sessionMap = new Map(); + public async recoverSessions() { + const fnTag = `${this.className}#recoverSessions()`; try { const allLogs = await this.logRepository.readLogsNotProofs(); - for (const log of allLogs) { const sessionId = log.sessionID; + this.log.info(`${fnTag}, recovering session: ${sessionId}`); - let sessionData = sessionMap.get(sessionId); - if (!sessionData) { - sessionData = new SessionData(); - sessionData.id = sessionId; - sessionMap.set(sessionId, sessionData); + if (log == undefined || log.data == undefined) { + throw new Error(`${fnTag}, invalid log}`); } try { - const logEntry = JSON.parse(log.data); - - Object.assign(sessionData, logEntry); - - if (logEntry.sequenceNumber !== undefined) { - sessionData.lastSequenceNumber = logEntry.sequenceNumber; - } + const logEntry: SessionData = JSON.parse(log.data); + this.sessions.set(sessionId, logEntry); } catch (error) { this.log.error( - `Error parsing log data for session ${sessionId}: ${error}`, + `Error parsing log data for session Id: ${sessionId}: ${error}`, ); } } } catch (error) { this.log.error(`Error initializing sessions: ${error}`); } - - return sessionMap; } - // todo create util functoin that retrieves sessionid and checks if it is valid; i believe it is implemented in the satp services, refactor making it reusable private async checkCrash(session: SATPSession): Promise { - // todo implement crash check - check logs and understsands if there was a crash; might use timouts, etc - const fnTag = `${this.className}#checkCrash()`; + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); - // check the logs and from the timeout logic make out try { session.verify( fnTag, @@ -158,27 +134,25 @@ export class CrashRecoveryManager { ? SessionType.CLIENT : SessionType.SERVER, ); + const lastLog = await this.logRepository.readLastestLog( session.getSessionId(), ); - if (lastLog && lastLog.operation !== "COMPLETED") { + + if (lastLog && lastLog.operation !== "done") { this.log.debug( - `${fnTag} Crash detected for session ${session.getSessionId()}`, + `${fnTag} Crash detected for session ID: ${session.getSessionId()} last log operation: ${lastLog.operation}`, ); return CrashStatus.IN_RECOVERY; } - const sessionData = session.hasClientSessionData() - ? session.getClientSessionData() - : session.getServerSessionData(); - - const logTimestamp = Number(lastLog.timestamp); + const logTimestamp = new Date(lastLog?.timestamp ?? 0).getTime(); const currentTime = new Date().getTime(); const timeDifference = currentTime - logTimestamp; if (timeDifference > Number(sessionData.maxTimeout)) { this.log.warn( - `${fnTag} Timeout exceeded for session ID: ${session.getSessionId()}`, + `${fnTag} Timeout exceeded by ${timeDifference} ms for session ID: ${session.getSessionId()}`, ); return CrashStatus.IN_RECOVERY; } @@ -188,34 +162,31 @@ export class CrashRecoveryManager { ); return CrashStatus.NO_CRASH; } catch (error) { - this.log.error(`${fnTag} Error detecting crash: ${error}`); - return CrashStatus.NO_CRASH; + this.log.error(`${fnTag} Error occured !`); + return CrashStatus.ERROR; } } - public async checkAndResolveCrash(sessionId: SATPSession): Promise { + public async checkAndResolveCrash(session: SATPSession): Promise { const fnTag = `${this.className}#checkAndResolveCrash()`; - this.log.info(`${fnTag} Checking crash status for session ${sessionId}`); - try { - const sessionData = sessionId.hasClientSessionData() - ? sessionId.getClientSessionData() - : sessionId.getServerSessionData(); + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); - if (!sessionData) { - throw new Error(`${fnTag}, session data is not correctly initialized`); - } + if (!sessionData) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + try { let attempts = 0; let crashOccurrence: CrashOccurrence | undefined; while (attempts < BigInt(sessionData.maxRetries)) { - const crashStatus = await this.checkCrash(sessionId); + const crashStatus = await this.checkCrash(session); if (crashStatus === CrashStatus.IN_RECOVERY) { - this.log.info( - `${fnTag} Crash detected. Attempting recovery for session ${sessionId}`, - ); + this.log.info(`${fnTag} Crash detected! Attempting recovery`); if (!crashOccurrence) { crashOccurrence = new CrashOccurrence( @@ -227,55 +198,90 @@ export class CrashRecoveryManager { crashOccurrence.lastUpdate = new Date(); } - await this.handleRecovery(sessionId); - this.log.info(`${fnTag} Recovery successful.`); - - crashOccurrence.status = CrashStatus.RECOVERED; - - return true; + const status = await this.handleRecovery(session); + if (status) { + crashOccurrence.status = CrashStatus.RECOVERED; + this.log.info( + `${fnTag} Recovery successful for sessionID: ${session.getSessionId()}`, + ); + return; + } } attempts++; this.log.info( - `${fnTag} Retry attempt ${attempts} for session ${sessionId}`, + `${fnTag} Retry attempt ${attempts} for sessionID: ${session.getSessionId()}`, ); } - - this.log.warn(`${fnTag} All retries exhausted. Initiating rollback.`); - await this.initiateRollback(sessionId, true); - return false; + if (attempts != 0) { + this.log.warn(`${fnTag} All retries exhausted ! Initiating Rollback`); + const rollBackStatus = await this.initiateRollback(session, true); + if (rollBackStatus) { + this.log.info( + `${fnTag} rollback was success: ${session.getSessionId()}`, + ); + } else { + this.log.error( + `${fnTag} rollback failed ! ${session.getSessionId()}`, + ); + } + } } catch (error) { this.log.error(`${fnTag} Error during crash resolution: ${error}`); - return false; } } - public async handleRecovery(session: SATPSession): Promise { + public async handleRecovery(session: SATPSession): Promise { const fnTag = `${this.className}#handleRecovery()`; + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + if (!sessionData) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + try { - if (session.hasServerSessionData()) { - this.log.info( - `${fnTag} Initiating recovery as a server for session ID: ${session.getSessionId()}`, + this.log.info( + `${fnTag} Initiating recovery for session ID: ${session.getSessionId()}`, + ); + + const recoverMessage = new RecoverMessage({ + sessionId: session.getSessionId(), + messageType: "urn:ietf:SATP-2pc:msgtype:recover-msg", + satpPhase: "sessionData.hashes?.stage0", //todo: get phase info + sequenceNumber: Number(sessionData.lastSequenceNumber), + isBackup: false, + newIdentityPublicKey: "", + lastEntryTimestamp: sessionData.lastSequenceNumber, + senderSignature: "", + }); + + const recoverUpdateMessage = + await this.crashRecoveryHandler.handleRecover(recoverMessage); + + const response = await this.processRecoverUpdate(recoverUpdateMessage); + + if (response) { + const recoverSuccessMessage = new RecoverSuccessMessage({ + sessionId: session.getSessionId(), + messageType: "urn:ietf:SATP-2pc:msgtype:recover-success-msg", + hashRecoverUpdateMessage: "", + success: true, + entriesChanged: [], + senderSignature: "", + }); + + await this.crashRecoveryHandler.handleRecoverSuccess( + recoverSuccessMessage, ); - } else if (session.hasClientSessionData()) { + this.log.info( - `${fnTag} Initiating recovery as a client for session ID: ${session.getSessionId()}`, + `${fnTag} Recovery handled successfully for session ID: ${session.getSessionId()}`, ); + return true; } else { - throw new Error( - `${fnTag} Neither client nor server session data is available for session ID: ${session.getSessionId()}`, - ); + return false; } - - const recoverMessage = - await this.crashRecoveryHandler.sendRecover(session); - const recoverUpdateMessage = - await this.crashRecoveryHandler.sendRecoverUpdate(recoverMessage); - await this.crashRecoveryHandler.sendRecoverSuccess(recoverUpdateMessage); - - this.log.info( - `${fnTag} Recovery handled successfully for session ID: ${session.getSessionId()}`, - ); } catch (error) { this.log.error( `${fnTag} Error during recovery process for session ID: ${session.getSessionId()} - ${error}`, @@ -286,29 +292,34 @@ export class CrashRecoveryManager { } } + private processRecoverUpdate( + message: RecoverUpdateMessage, + ): Promise { + this.log.debug("Message received: ", message.messageType); + // get the logs from counterparty gateway and sync with current session + this.log.debug(`Session processed & updated with RecoverUpdateMessage`); + + return Promise.resolve(true); + } + public async initiateRollback( session: SATPSession, forceRollback?: boolean, ): Promise { const fnTag = `CrashRecoveryManager#initiateRollback()`; + + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + if (!sessionData) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } this.log.info( `${fnTag} Initiating rollback for session ${session.getSessionId()}`, ); try { - // Implement check for rollback (needs to read logs, etc) OR we assume that at satp handler/service layer this check is done and rollback is good to do - - const sessionLog: LocalLog = await this.logRepository.readLastestLog( - session.getSessionId(), - ); - - let shouldRollback = false; - if (sessionLog.operation !== "COMPLETED") { - shouldRollback = true; - } - - if (forceRollback || shouldRollback) { - // send bridge manager and possibly others to factory + if (forceRollback) { const strategy = this.factory.createStrategy(session); const rollbackState = await this.executeRollback(strategy, session); diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts index a8af8ceafb..3872e66e48 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts @@ -15,8 +15,8 @@ import { } from "@hyperledger/cactus-common"; import { Empty } from "@bufbuild/protobuf"; import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; -import { SATPSession } from "../satp-session"; import { ILocalLogRepository } from "../../repository/interfaces/repository"; +import { getSatpLogKey } from "../../gateway-utils"; interface HandlerOptions { crashService: CrashRecoveryService; @@ -27,16 +27,16 @@ interface HandlerOptions { export class CrashRecoveryHandler { public static readonly CLASS_NAME = "CrashRecoveryHandler"; - private sessions: Map; + public sessions: Map; private service: CrashRecoveryService; - private logger: Logger; + private log: Logger; private logRepository: ILocalLogRepository; constructor(ops: HandlerOptions) { this.sessions = ops.sessions; this.service = ops.crashService; - this.logger = LoggerProvider.getOrCreate(ops.loggerOptions); - this.logger.trace(`Initialized ${CrashRecoveryHandler.CLASS_NAME}`); + this.log = LoggerProvider.getOrCreate(ops.loggerOptions); + this.log.trace(`Initialized ${CrashRecoveryHandler.CLASS_NAME}`); this.logRepository = ops.logRepository; } @@ -44,189 +44,137 @@ export class CrashRecoveryHandler { return CrashRecoveryHandler.CLASS_NAME; } - public get Log(): Logger { - return this.logger; - } - - private generateKey(): string { - //todo: key generation logic - return "key"; - } + async handleRecover(req: RecoverMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRecover`; + this.log.debug(`${fnTag}, handling RecoverMessage: ${JSON.stringify(req)}`); - async sendRecover(req: SATPSession): Promise { - const fnTag = `${this.getHandlerIdentifier()}#sendRecover`; try { - this.Log.debug(`${fnTag}, Recover V2 Message...`); - - const sessionId = req.getSessionId(); - const sessionData = this.sessions.get(sessionId); + const sessionData = this.sessions.get(req.sessionId); if (!sessionData) { throw new Error(`${fnTag}, Session not found`); } - const recoverMessage = new RecoverMessage({ - sessionId: sessionId, - messageType: "Recover", - satpPhase: "phase", - sequenceNumber: Number(sessionData.lastSequenceNumber), - isBackup: false, - newIdentityPublicKey: "", - lastEntryTimestamp: sessionData.lastSequenceNumber, - senderSignature: "", - }); - - const updateMessage = - this.service.createRecoverUpdateMessage(recoverMessage); + const updateMessage = await this.service.createRecoverUpdateMessage(req); + this.log.debug(`${fnTag}, Created RecoverUpdateMessage`); const logEntry = { - sessionID: sessionId, + sessionID: req.sessionId, type: "RECOVER", - key: "key", // generateKey(), - operation: "RECOVER_MESSAGE_SENT", + key: getSatpLogKey(req.sessionId, "RECOVER", "init"), + operation: "init", timestamp: new Date().toISOString(), - data: "", + data: JSON.stringify(sessionData), }; await this.logRepository.create(logEntry); return updateMessage; } catch (error) { - throw new Error(`${fnTag}, Failed to process RecoverV2Message ${error}`); + this.log.error(`${fnTag}, Failed to handle RecoverMessage: ${error}`); + throw error; } } - async sendRecoverUpdate( - req: RecoverUpdateMessage, - ): Promise { - const fnTag = `${this.getHandlerIdentifier()}#handleRecoverUpdateMessage()`; - try { - this.Log.debug(`${fnTag}, Handling Recover Update Message...`); + async handleRecoverSuccess(req: RecoverSuccessMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRecoverSuccess`; + this.log.debug(`${fnTag}, Handling RecoverSuccessMessage`); + try { const sessionData = this.sessions.get(req.sessionId); if (!sessionData) { - throw new Error( - `${fnTag}, session data not found for ID: ${req.sessionId}`, - ); - } - - const successMessage = this.service.createRecoverSuccessMessage(req); - - this.Log.debug(`${fnTag}, Recover Success Message created`); - const logEntry = { - sessionID: req.sessionId, - type: "RECOVER_UPDATE", - key: "key", // generateKey(), - operation: "RECOVER_UPDATE_MESSAGE_SENT", - timestamp: new Date().toISOString(), - data: "", - }; - - await this.logRepository.create(logEntry); - - return successMessage; - } catch (error) { - throw new Error( - `${fnTag}, Error handling Recover Update Message: ${error}`, - ); - } - } - - async sendRecoverSuccess(req: RecoverSuccessMessage): Promise { - const fnTag = `${this.getHandlerIdentifier()}#handleRecoverSuccessMessage()`; - try { - this.Log.debug(`${fnTag}, Handling Recover Success Message...`); - - const session = this.sessions.get(req.sessionId); - if (!session) { throw new Error(`${fnTag}, Session not found`); } - this.Log.debug(`${fnTag}, Session recovery successfully completed`); const logEntry = { sessionID: req.sessionId, type: "RECOVER_SUCCESS", - key: "key", // generateKey(), + key: getSatpLogKey(req.sessionId, "RECOVER_SUCCESS", "init"), operation: "RECOVER_SUCCESS_MESSAGE_SENT", timestamp: new Date().toISOString(), - data: "", + data: JSON.stringify(sessionData), }; await this.logRepository.create(logEntry); - return new Empty(); } catch (error) { - throw new Error( - `${fnTag}, Error handling Recover Success Message: ${error}`, + this.log.error( + `${fnTag}, Error handling RecoverSuccessMessage: ${error}`, ); + throw error; } } - async sendRollback(req: RollbackMessage): Promise { - const fnTag = `${this.getHandlerIdentifier()}#handleRollbackMessage()`; - try { - this.Log.debug(`${fnTag}, Handling Rollback Message...`); + async handleRollback(req: RollbackMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRollback`; + this.log.debug(`${fnTag}, Handling RollbackMessage`); - const session = this.sessions.get(req.sessionId); - if (!session) { + try { + const sessionData = this.sessions.get(req.sessionId); + if (!sessionData) { throw new Error(`${fnTag}, Session not found`); } const ackMessage = this.service.createRollbackAckMessage(req); - this.Log.debug(`${fnTag}, Rollback Ack Message created`); const logEntry = { sessionID: req.sessionId, type: "ROLLBACK", - key: "key", //generateKey(), + key: getSatpLogKey(req.sessionId, "ROLLBACK", "init"), operation: "ROLLBACK_MESSAGE_SENT", timestamp: new Date().toISOString(), - data: "", + data: JSON.stringify(sessionData), }; await this.logRepository.create(logEntry); - return ackMessage; } catch (error) { - throw new Error(`${fnTag}, Error handling Rollback Message: ${error}`); + this.log.error(`${fnTag}, Error handling RollbackMessage: ${error}`); + throw error; } } - async sendRollbackAck(req: RollbackAckMessage): Promise { - const fnTag = `${this.getHandlerIdentifier()}#handleRollbackAckMessage()`; - try { - this.Log.debug(`${fnTag}, Handling Rollback Ack Message...`); + async handleRollbackAck(req: RollbackAckMessage): Promise { + const fnTag = `${this.getHandlerIdentifier()}#handleRollbackAck`; + this.log.debug(`${fnTag}, Handling RollbackAckMessage`); - const session = this.sessions.get(req.sessionId); - if (!session) { + try { + const sessionData = this.sessions.get(req.sessionId); + if (!sessionData) { throw new Error(`${fnTag}, Session not found`); } - this.Log.debug(`${fnTag}, Rollback successfully acknowledged`); const logEntry = { sessionID: req.sessionId, - type: "ROLLBACK_", - key: "key", //generateKey(), - operation: "ROLLBACK_", + type: "ROLLBACK_ACK", + key: getSatpLogKey(req.sessionId, "ROLLBACK_ACK", "init"), + operation: "ROLLBACK_ACK", timestamp: new Date().toISOString(), - data: "", + data: JSON.stringify(sessionData), }; await this.logRepository.create(logEntry); - return new Empty(); } catch (error) { - throw new Error( - `${fnTag}, Error handling Rollback Ack Message: ${error}`, - ); + this.log.error(`${fnTag}, Error handling RollbackAckMessage: ${error}`); + throw error; } } setupRouter(router: ConnectRouter): void { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; router.service(CrashRecovery, { - recoverV2Message: this.sendRecover, - recoverV2UpdateMessage: this.sendRecoverUpdate, - recoverV2SuccessMessage: this.sendRecoverSuccess, - rollbackV2Message: this.sendRollback, - rollbackV2AckMessage: this.sendRollbackAck, + async recoverV2Message(req) { + return await that.handleRecover(req); + }, + async recoverV2SuccessMessage(req) { + return await that.handleRecoverSuccess(req); + }, + async rollbackV2Message(req) { + return await that.handleRollback(req); + }, + async rollbackV2AckMessage(req) { + return await that.handleRollbackAck(req); + }, }); } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts index 4a73a8635b..77982d857a 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts @@ -6,7 +6,6 @@ import { import { RecoverMessage, RecoverUpdateMessage, - RecoverSuccessMessage, RollbackMessage, RollbackAckMessage, } from "../../generated/proto/cacti/satp/v02/crash_recovery_pb"; @@ -18,48 +17,33 @@ interface ICrashRecoveryServiceOptions { } export class CrashRecoveryService { - private readonly logger: Logger; + private readonly log: Logger; private readonly logRepository: ILocalLogRepository; constructor(options: ICrashRecoveryServiceOptions) { - this.logger = LoggerProvider.getOrCreate(options.loggerOptions); + this.log = LoggerProvider.getOrCreate(options.loggerOptions); this.logRepository = options.logRepository; } async createRecoverUpdateMessage( request: RecoverMessage, ): Promise { - this.logger.debug("Creating RecoverUpdateMessage..."); + this.log.debug("Creating RecoverUpdateMessage..."); const recoveredLogs = await this.logRepository.readLogsMoreRecentThanTimestamp( request.lastEntryTimestamp.toString(), ); - return new RecoverUpdateMessage({ sessionId: request.sessionId, - messageType: "urn:ietf:SATP-2pc:msgtype:recover-msg", + messageType: "urn:ietf:SATP-2pc:msgtype:recover-update-msg", hashRecoverMessage: "", recoveredLogs: recoveredLogs, senderSignature: "", }); } - createRecoverSuccessMessage( - request: RecoverUpdateMessage, - ): RecoverSuccessMessage { - this.logger.debug("Creating RecoverSuccessMessage..."); - return new RecoverSuccessMessage({ - sessionId: request.sessionId, - messageType: "urn:ietf:SATP-2pc:msgtype:recover-update-msg", - hashRecoverUpdateMessage: "", - success: true, - entriesChanged: [], - senderSignature: "", - }); - } - createRollbackAckMessage(request: RollbackMessage): RollbackAckMessage { - this.logger.debug("Creating RollbackAckMessage..."); + this.log.debug("Creating RollbackAckMessage..."); return new RollbackAckMessage({ sessionId: request.sessionId, messageType: "urn:ietf:SATP-2pc:msgtype:rollback-msg", @@ -73,23 +57,15 @@ export class CrashRecoveryService { async sendRecoverMessage( message: RecoverMessage, ): Promise { - this.logger.debug("Sending RecoverMessage..."); + this.log.debug("Sending RecoverMessage..."); const updateMessage = await this.createRecoverUpdateMessage(message); return updateMessage; } - async sendRecoverUpdateMessage( - message: RecoverUpdateMessage, - ): Promise { - this.logger.debug("Sending RecoverUpdateMessage..."); - const successMessage = this.createRecoverSuccessMessage(message); - return successMessage; - } - async sendRollbackMessage( message: RollbackMessage, ): Promise { - this.logger.debug("Sending RollbackMessage..."); + this.log.debug("Sending RollbackMessage..."); const ackMessage = this.createRollbackAckMessage(message); return ackMessage; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts index 901d2194be..54f432d8d3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts @@ -4,17 +4,19 @@ import { Stage0RollbackStrategy } from "./stage0-rollback-strategy"; import { Stage1RollbackStrategy } from "./stage1-rollback-strategy"; import { Stage2RollbackStrategy } from "./stage2-rollback-strategy"; import { Stage3RollbackStrategy } from "./stage3-rollback-strategy"; -import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; -import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; -import { SATPBridgeConfig } from "../../types"; +import { + ISATPBridgesOptions, + SATPBridgesManager, +} from "../../../gol/satp-bridges-manager"; +import { RollbackState } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { ILocalLogRepository } from "../../../repository/interfaces/repository"; -export interface RollbackState { +/*export interface RollbackState { currentStage: string; // todo add rollback state // placeholder, should import RollbackLogEntry from protos. // RollbackLogEntry in spec = RollbackState in code - rollbackLogEntry: RollbackLogEntry; -} +}*/ export interface RollbackStrategy { execute(session: SATPSession): Promise; @@ -24,39 +26,48 @@ export interface RollbackStrategy { export class RollbackStrategyFactory { private log: Logger; - private bridgeManager: SATPBridgeManager; + private bridgesManager: SATPBridgesManager; + private logRepository: ILocalLogRepository; - constructor(config: SATPBridgeConfig) { + constructor(options: ISATPBridgesOptions, localLog: ILocalLogRepository) { this.log = LoggerProvider.getOrCreate({ label: "RollbackStrategyFactory" }); - this.bridgeManager = new SATPBridgeManager(config); + this.bridgesManager = new SATPBridgesManager(options); + this.logRepository = localLog; } - // todo add bridge manager and possibly others so each strategy can connect to satp bridge createStrategy(session: SATPSession): RollbackStrategy { const fnTag = "RollbackStrategyFactory#createStrategy"; const sessionData = session.hasClientSessionData() - ? session.getClientSessionData()! - : session.getServerSessionData()!; - const rollbackLogEntry = new RollbackLogEntry(); + ? session.getClientSessionData() + : session.getServerSessionData(); if (!sessionData.hashes) { this.log.debug(`${fnTag} Creating Stage0RollbackStrategy`); - return new Stage0RollbackStrategy(rollbackLogEntry); + return new Stage0RollbackStrategy(this.logRepository); } else if ( !sessionData.hashes.stage2 || Object.keys(sessionData.hashes.stage2).length === 0 ) { this.log.debug(`${fnTag} Creating Stage1RollbackStrategy`); - return new Stage1RollbackStrategy(this.bridgeManager, rollbackLogEntry); + return new Stage1RollbackStrategy( + this.bridgesManager, + this.logRepository, + ); } else if ( !sessionData.hashes.stage3 || Object.keys(sessionData.hashes.stage3).length === 0 ) { this.log.debug(`${fnTag} Creating Stage2RollbackStrategy`); - return new Stage2RollbackStrategy(this.bridgeManager, rollbackLogEntry); + return new Stage2RollbackStrategy( + this.bridgesManager, + this.logRepository, + ); } else { this.log.debug(`${fnTag} Creating Stage3RollbackStrategy`); - return new Stage3RollbackStrategy(this.bridgeManager, rollbackLogEntry); + return new Stage3RollbackStrategy( + this.bridgesManager, + this.logRepository, + ); } } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts index fd2b5ec709..b449821866 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage0-rollback-strategy.ts @@ -1,74 +1,87 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPSession } from "../../satp-session"; -import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; -import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { RollbackStrategy } from "./rollback-strategy-factory"; +import { + RollbackLogEntry, + RollbackState, +} from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { ILocalLogRepository } from "../../../repository/interfaces/repository"; export class Stage0RollbackStrategy implements RollbackStrategy { private log: Logger; - private rollbackLogEntry: RollbackLogEntry; + private logRepository: ILocalLogRepository; - constructor(logEntry: RollbackLogEntry) { + constructor(localLog: ILocalLogRepository) { this.log = LoggerProvider.getOrCreate({ label: "Stage0RollbackStrategy" }); - this.rollbackLogEntry = logEntry; + this.logRepository = localLog; } - // return a rollback state in all strategies async execute(session: SATPSession): Promise { const fnTag = "Stage0RollbackStrategy#execute"; this.log.info(`${fnTag} Executing rollback for Stage 0`); - // check session exists if (!session) { throw new Error(`${fnTag}, session data is not correctly initialized`); } + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + + if (!sessionData) { + throw new Error(`${fnTag}, session data is not correctly initialized`); + } + const rollbackState = new RollbackState({ + sessionId: session.getSessionId(), + currentStage: String(sessionData.hashes?.stage0), + stepsRemaining: 0, + rollbackLogEntries: [], + estimatedTimeToCompletion: "0", + status: "IN_PROGRESS", + details: "", + }); try { - // TODO record the rollback on the log. Implement RollbackLogEntry - this.log.debug("Persisting rollback log entry"); + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: session.getSessionId(), + stage: String(sessionData.hashes?.stage0), + timestamp: new Date().toISOString(), + action: "NO_ACTION_REQUIRED", + status: "SUCCESS", + details: "", + }); - this.rollbackLogEntry.sessionId = session.getSessionId(); - this.rollbackLogEntry.stage = "Stage0"; - this.rollbackLogEntry.timestamp = Date.now().toString(); - this.rollbackLogEntry.action = ""; - this.rollbackLogEntry.status = "SUCCESS"; - this.rollbackLogEntry.details = ""; + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.status = "COMPLETED"; + rollbackState.details = "Rollback of Stage 0 completed successfully"; - this.log.info(`Successfully rolled back Stage 0`); + this.log.info(`${fnTag} Rollback of Stage 0 completed successfully`); - const state: RollbackState = { - currentStage: "Stage0", - rollbackLogEntry: this.rollbackLogEntry, - }; - await this.rollbackLogs.create(state); // todo: log for the rollbackentry + //await this.logRepository.create(logEntry); - return state; + return rollbackState; } catch (error) { - this.log.error(`Failed to rollback Stage 0: ${error}`); + this.log.error(`${fnTag} Error during rollback of Stage 0: ${error}`); - this.rollbackLogEntry.sessionId = session.getSessionId(); - this.rollbackLogEntry.stage = "Stage0"; - this.rollbackLogEntry.timestamp = Date.now().toString(); - this.rollbackLogEntry.action = ""; - this.rollbackLogEntry.status = "FAILURE"; - this.rollbackLogEntry.details = ""; + rollbackState.status = "FAILED"; + rollbackState.details = `Rollback of Stage 0 failed: ${error}`; - const state: RollbackState = { - currentStage: "Stage0", - rollbackLogEntry: this.rollbackLogEntry, - }; - await this.rollbackLogs.create(state); // todo: implement the correct log support - return state; + return rollbackState; } } async cleanup(session: SATPSession): Promise { const fnTag = "Stage0RollbackStrategy#cleanup"; - // for stage 0, do nothing - const state: RollbackState = { + this.log.info(`${fnTag} Cleanup not required for Stage 0`); + + const rollbackState = new RollbackState({ + sessionId: session.getSessionId(), currentStage: "Stage0", - }; - if (!session) { - this.log.error(`${fnTag} Session not found`); - } - return state; + stepsRemaining: 0, + rollbackLogEntries: [], + estimatedTimeToCompletion: "", + status: "", + details: "", + }); + + return rollbackState; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts index bd50d4ca1e..fbce7a40f7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage1-rollback-strategy.ts @@ -1,58 +1,107 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPSession } from "../../satp-session"; -import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; -import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; -import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; +import { RollbackStrategy } from "./rollback-strategy-factory"; +import { + RollbackLogEntry, + RollbackState, +} from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { ILocalLogRepository } from "../../../repository/interfaces/repository"; export class Stage1RollbackStrategy implements RollbackStrategy { private log: Logger; - private bridgeManager: SATPBridgeManager; - private rollbackLogEntry: RollbackLogEntry; + private bridgesManager: SATPBridgesManager; + private logRepository: ILocalLogRepository; - constructor(bridgeManager: SATPBridgeManager, logEntry: RollbackLogEntry) { + constructor( + bridgeManager: SATPBridgesManager, + localLog: ILocalLogRepository, + ) { this.log = LoggerProvider.getOrCreate({ label: "Stage1RollbackStrategy" }); - this.bridgeManager = bridgeManager; - this.rollbackLogEntry = logEntry; + this.bridgesManager = bridgeManager; + this.logRepository = localLog; } async execute(session: SATPSession): Promise { const fnTag = "Stage1RollbackStrategy#execute"; this.log.info(`${fnTag} Executing rollback for Stage 1`); - if (!session) { + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + + if (!sessionData) { throw new Error(`${fnTag}, session data is not correctly initialized`); } - try { - // TODO: Implement Stage 1 specific rollback logic - - // TODO: Record the rollback on the log. Implement RollbackLogEntry - - const receipt = await this.bridgeManager.unwrapAsset("assetId"); - - this.log.info(`${fnTag}, Asset unlocked: ${receipt}`); - - this.rollbackLogEntry.sessionId = session.getSessionId(); - this.rollbackLogEntry.stage = "Stage1"; - this.rollbackLogEntry.timestamp = Date.now().toString(); - this.rollbackLogEntry.action = "UNWRAP"; - this.rollbackLogEntry.status = "SUCCESS"; - this.rollbackLogEntry.details = ""; - - this.log.debug("Persisting rollback log entry"); - - this.log.info(`Successfully rolled back Stage 1`); + const rollbackState = new RollbackState({ + sessionId: session.getSessionId(), + currentStage: String(sessionData.hashes?.stage1), + stepsRemaining: 0, + rollbackLogEntries: [], + estimatedTimeToCompletion: "", + status: "IN_PROGRESS", + details: "", + }); + + const network = sessionData.senderGatewayNetworkId; + + if (!network) { + throw new Error( + `${fnTag}: Unable to determine network from session data.`, + ); + } - const state: RollbackState = { - currentStage: "Stage1", - rollbackLogEntry: this.rollbackLogEntry, - }; + const bridgeManager = this.bridgesManager.getBridge(network); - await this.rollbackLogs.create(state); // todo: log support - return state; + try { + const assetId = sessionData.senderAsset?.tokenId; + + if (!assetId) { + throw new Error(`${fnTag}: Asset ID is undefined`); + } + + this.log.info(`${fnTag}, Asset Id: ${assetId}`); + + await bridgeManager.unwrapAsset(assetId); + + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: session.getSessionId(), + stage: String(sessionData.hashes?.stage1), + timestamp: new Date().toISOString(), + action: "UNWRAP_ASSET", + status: "SUCCESS", + details: "", + }); + + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.stepsRemaining = 0; + rollbackState.status = "COMPLETED"; + rollbackState.estimatedTimeToCompletion = "0"; + rollbackState.details = "Rollback of Stage 1 completed successfully"; + + this.log.info( + `${fnTag} Successfully rolled back Stage 1 for session ${session.getSessionId}`, + ); + //await this.logRepository.create(logEntry); + return rollbackState; } catch (error) { - this.log.error(`Failed to rollback Stage 1: ${error}`); - return false; + this.log.error(`${fnTag} Failed to rollback Stage 1: ${error}`); + + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: sessionData.id, + stage: String(sessionData.hashes?.stage1), + timestamp: new Date().toISOString(), + action: "UNWRAP_ASSET", + status: "FAILED", + details: "", + }); + + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.status = "FAILED"; + rollbackState.details = `Rollback of Stage 1 failed: ${error}`; + + return rollbackState; } } @@ -71,7 +120,7 @@ export class Stage1RollbackStrategy implements RollbackStrategy { try { // TODO: Implement Stage 1 specific cleanup logic - state.currentStage = "Stage1"; + //state.currentStage = ""; // TODO: Update other state properties as needed return state; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts index 261e13384c..35dcea9e38 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage2-rollback-strategy.ts @@ -1,56 +1,110 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPSession } from "../../satp-session"; -import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; -import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; -import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; +import { RollbackStrategy } from "./rollback-strategy-factory"; +import { + RollbackLogEntry, + RollbackState, +} from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { ILocalLogRepository } from "../../../repository/interfaces/repository"; export class Stage2RollbackStrategy implements RollbackStrategy { private log: Logger; - private bridgeManager: SATPBridgeManager; - private rollbackLogEntry: RollbackLogEntry; + private bridgesManager: SATPBridgesManager; + private logRepository: ILocalLogRepository; - constructor(bridgeManager: SATPBridgeManager, logEntry: RollbackLogEntry) { + constructor( + bridgeManager: SATPBridgesManager, + localLog: ILocalLogRepository, + ) { this.log = LoggerProvider.getOrCreate({ label: "Stage2RollbackStrategy" }); - this.bridgeManager = bridgeManager; - this.rollbackLogEntry = logEntry; + this.bridgesManager = bridgeManager; + this.logRepository = localLog; } async execute(session: SATPSession): Promise { const fnTag = "Stage2RollbackStrategy#execute"; this.log.info(`${fnTag} Executing rollback for Stage 2`); - if (!session) { + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + + if (!sessionData) { throw new Error(`${fnTag}, session data is not correctly initialized`); } + const network = sessionData.senderGatewayNetworkId; - try { - // TODO: Implement Stage 2 specific rollback logic - - // TODO: Record the rollback on the log. Implement RollbackLogEntry - this.log.debug("Persisting rollback log entry"); - - const receipt = await this.bridgeManager.unlockAsset("assetId", Number()); - - this.log.info(`${fnTag}, Asset unlocked: ${receipt}`); - this.rollbackLogEntry.sessionId = session.getSessionId(); - this.rollbackLogEntry.stage = "Stage2"; - this.rollbackLogEntry.timestamp = Date.now().toString(); - this.rollbackLogEntry.action = "UNLOCK"; - this.rollbackLogEntry.status = "SUCCESS"; - this.rollbackLogEntry.details = ""; + if (!network) { + throw new Error( + `${fnTag}: Unable to determine network from session data.`, + ); + } - this.log.info(`Successfully rolled back Stage 2`); + const bridgeManager = this.bridgesManager.getBridge(network); - const state: RollbackState = { - currentStage: "Stage2", - rollbackLogEntry: this.rollbackLogEntry, - }; + const rollbackState = new RollbackState({ + sessionId: session.getSessionId(), + currentStage: String(sessionData.hashes?.stage2), + stepsRemaining: 1, + rollbackLogEntries: [], + estimatedTimeToCompletion: "0", + status: "IN_PROGRESS", + details: "", + }); - await this.rollbackLogs.create(state); // todo: log support - return state; + try { + const assetId = sessionData.senderAsset?.tokenId; + const amount = sessionData.senderAsset?.amount; + if (!assetId) { + throw new Error(`${fnTag}: Asset ID is undefined`); + } + + if (!amount) { + throw new Error(`${fnTag}, Amount is missing`); + } + + this.log.info(`${fnTag} Asset Id: ${assetId} amount: ${amount}`); + + await bridgeManager.unlockAsset(assetId, Number(amount)); + + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: session.getSessionId(), + stage: String(sessionData.hashes?.stage2), + timestamp: new Date().toISOString(), + action: "UNLOCK_ASSET", + status: "SUCCESS", + details: "", + }); + + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.stepsRemaining = 1; + rollbackState.status = "COMPLETED"; + rollbackState.estimatedTimeToCompletion = "0"; + rollbackState.details = "Rollback of Stage 2 completed successfully"; + + this.log.info( + `${fnTag} Successfully rolled back Stage 2 for session ${session.getSessionId()}`, + ); + //await this.logRepository.create(logEntry); + return rollbackState; } catch (error) { - this.log.error(`Failed to rollback Stage 2: ${error}`); - return false; + this.log.error(`${fnTag} Failed to rollback Stage 2: ${error}`); + + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: session.getSessionId(), + stage: String(sessionData.hashes?.stage2), + timestamp: new Date().toISOString(), + action: "UNLOCK_ASSET", + status: "FAILED", + details: "", + }); + + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.status = "FAILED"; + rollbackState.details = `Rollback of Stage 2 failed: ${error}`; + + return rollbackState; } } @@ -69,7 +123,7 @@ export class Stage2RollbackStrategy implements RollbackStrategy { try { // TODO: Implement Stage 2 specific cleanup logic - state.currentStage = "Stage2"; + //state.currentStage = "Stage2"; // TODO: Update other state properties as needed return state; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts index 1bf35232c4..1e0507ca10 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/stage3-rollback-strategy.ts @@ -1,57 +1,111 @@ import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; import { SATPSession } from "../../satp-session"; -import { RollbackState, RollbackStrategy } from "./rollback-strategy-factory"; -import { RollbackLogEntry } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; -import { SATPBridgeManager } from "../../stage-services/satp-bridge/satp-bridge-manager"; +import { RollbackStrategy } from "./rollback-strategy-factory"; +import { + RollbackLogEntry, + RollbackState, +} from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; +import { SATPBridgesManager } from "../../../gol/satp-bridges-manager"; +import { ILocalLogRepository } from "../../../repository/interfaces/repository"; export class Stage3RollbackStrategy implements RollbackStrategy { private log: Logger; - private bridgeManager: SATPBridgeManager; - private rollbackLogEntry: RollbackLogEntry; + private bridgesManager: SATPBridgesManager; + private logRepository: ILocalLogRepository; - constructor(bridgeManager: SATPBridgeManager, logEntry: RollbackLogEntry) { + constructor( + bridgeManager: SATPBridgesManager, + localLog: ILocalLogRepository, + ) { this.log = LoggerProvider.getOrCreate({ label: "Stage3RollbackStrategy" }); - this.bridgeManager = bridgeManager; - this.rollbackLogEntry = logEntry; + this.bridgesManager = bridgeManager; + this.logRepository = localLog; } async execute(session: SATPSession): Promise { const fnTag = "Stage3RollbackStrategy#execute"; this.log.info(`${fnTag} Executing rollback for Stage 3`); - if (!session) { + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + + if (!sessionData) { throw new Error(`${fnTag}, session data is not correctly initialized`); } - try { - // TODO: Implement Stage 3 specific rollback logic - - // TODO: Record the rollback on the log. Implement RollbackLogEntry - - const receipt = await this.bridgeManager.burnAsset("assetId", Number()); + const network = sessionData.senderGatewayNetworkId; - this.log.info(`${fnTag}, Asset unlocked: ${receipt}`); - - this.rollbackLogEntry.sessionId = session.getSessionId(); - this.rollbackLogEntry.stage = "Stage3"; - this.rollbackLogEntry.timestamp = Date.now().toString(); - this.rollbackLogEntry.action = "BURN"; - this.rollbackLogEntry.status = "SUCCESS"; - this.rollbackLogEntry.details = ""; + if (!network) { + throw new Error( + `${fnTag}: Unable to determine network from session data.`, + ); + } - this.log.debug("Persisting rollback log entry"); + const bridgeManager = this.bridgesManager.getBridge(network); - this.log.info(`Successfully rolled back Stage 3`); - const state: RollbackState = { - currentStage: "Stage3", - rollbackLogEntry: this.rollbackLogEntry, - }; + const rollbackState = new RollbackState({ + sessionId: session.getSessionId(), + currentStage: String(sessionData.hashes?.stage3), + stepsRemaining: 2, + rollbackLogEntries: [], + estimatedTimeToCompletion: "", + status: "IN_PROGRESS", + details: "", + }); - await this.rollbackLogs.create(state); // todo: log support - return state; + try { + const assetId = sessionData.senderAsset?.tokenId; + const amount = sessionData.senderAsset?.amount; + if (!assetId) { + throw new Error(`${fnTag}: Asset ID is undefined`); + } + + if (!amount) { + throw new Error(`${fnTag}, Amount is missing`); + } + + this.log.info(`${fnTag} Asset Id: ${assetId} amount: ${amount}`); + + await bridgeManager.burnAsset(assetId, Number(amount)); + + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: session.getSessionId(), + stage: String(sessionData.hashes?.stage0), + timestamp: new Date().toISOString(), + action: "BURN_ASSET", + status: "SUCCESS", + details: "", + }); + + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.stepsRemaining = 2; + rollbackState.status = "COMPLETED"; + rollbackState.estimatedTimeToCompletion = "0"; + rollbackState.details = "Rollback of Stage 3 completed successfully"; + + this.log.info( + `${fnTag} Successfully rolled back Stage 3 for session ${session.getSessionId()}`, + ); + //await this.logRepository.create(logEntry); + return rollbackState; } catch (error) { - this.log.error(`Failed to rollback Stage 3: ${error}`); - return false; + this.log.error(`${fnTag} Failed to rollback Stage 3: ${error}`); + + const rollbackLogEntry = new RollbackLogEntry({ + sessionId: session.getSessionId(), + stage: String(sessionData.hashes?.stage3), + timestamp: new Date().toISOString(), + action: "BURN_ASSET", + status: "FAILED", + details: `Error burning asset: ${error}`, + }); + + rollbackState.rollbackLogEntries.push(rollbackLogEntry); + rollbackState.status = "FAILED"; + rollbackState.details = `Rollback of Stage 3 failed: ${error}`; + + return rollbackState; } } @@ -70,7 +124,7 @@ export class Stage3RollbackStrategy implements RollbackStrategy { try { // TODO: Implement Stage 3 specific cleanup logic - state.currentStage = "Stage3"; + //state.currentStage = ""; // TODO: Update other state properties as needed return state; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts index 6ef53cb139..06f94e0ab6 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/health_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/common/health.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts index 55811b3d25..0b4f0af56b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/message_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/common/message.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index 23b33c82ad..29c9d725f3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/common/session.proto (package cacti.satp.v02.common, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts index a3943ab64e..b4659aa2e8 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/crash_recovery.proto (package cacti.satp.v02.crash, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -487,3 +487,80 @@ export class RollbackLogEntry extends Message { } } +/** + * @generated from message cacti.satp.v02.crash.RollbackState + */ +export class RollbackState extends Message { + /** + * @generated from field: string session_id = 1; + */ + sessionId = ""; + + /** + * @generated from field: string current_stage = 2; + */ + currentStage = ""; + + /** + * @generated from field: int32 steps_remaining = 3; + */ + stepsRemaining = 0; + + /** + * @generated from field: repeated cacti.satp.v02.crash.RollbackLogEntry rollback_log_entries = 4; + */ + rollbackLogEntries: RollbackLogEntry[] = []; + + /** + * @generated from field: string estimated_time_to_completion = 5; + */ + estimatedTimeToCompletion = ""; + + /** + * Overall status (e.g., IN_PROGRESS, COMPLETED, FAILED) + * + * @generated from field: string status = 6; + */ + status = ""; + + /** + * Additional metadata or information + * + * @generated from field: string details = 7; + */ + details = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "cacti.satp.v02.crash.RollbackState"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "current_stage", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "steps_remaining", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 4, name: "rollback_log_entries", kind: "message", T: RollbackLogEntry, repeated: true }, + { no: 5, name: "estimated_time_to_completion", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "details", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RollbackState { + return new RollbackState().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RollbackState { + return new RollbackState().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RollbackState { + return new RollbackState().fromJsonString(jsonString, options); + } + + static equals(a: RollbackState | PlainMessage | undefined, b: RollbackState | PlainMessage | undefined): boolean { + return proto3.util.equals(RollbackState, a, b); + } +} + diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts index 9a74c55890..cacc514805 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_0_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_0.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts index ed70ded73b..e40e13871f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_1_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_1.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts index fc39e916dc..2dcddb32d3 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_2.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts index 59d65e98f9..5e64da5a95 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_3_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/stage_3.proto (package cacti.satp.v02, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts index 03e37d7dd7..e3147a8629 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/view/bungee_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" // @generated from file cacti/satp/v02/view/bungee.proto (package cacti.satp.v02.view.bungee, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts index 732f6e84a2..aea4092100 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway.ts @@ -56,7 +56,7 @@ import { } from "./gol/satp-bridges-manager"; import bodyParser from "body-parser"; import { - CrashOcurrence, + //CrashOcurrence, CrashRecoveryManager, ICrashRecoveryManagerOptions, } from "./core/recovery/crash-manager"; @@ -189,10 +189,9 @@ export class SATPGateway implements IPluginWebService, ICactusPlugin { const crashOptions: ICrashRecoveryManagerOptions = { instanceId: this.instanceId, logLevel: this.config.logLevel, - bridgeConfig: SATPBridgeConfig, + bridgeConfig: bridgesManagerOptions, }; this.crashManager = new CrashRecoveryManager(crashOptions); - this.crashManager.checkAndResolveCrash(); } /* ICactus Plugin methods */ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts new file mode 100644 index 0000000000..a7f643a1df --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -0,0 +1,340 @@ +import "jest-extended"; +import { + CrashRecoveryManager, + CrashStatus, +} from "../../../../main/typescript/core/recovery/crash-manager"; +import { LogLevelDesc, Secp256k1Keys } from "@hyperledger/cactus-common"; +import { ICrashRecoveryManagerOptions } from "../../../../main/typescript/core/recovery/crash-manager"; +import knex from "knex"; +import { + LocalLog, + SupportedChain, +} from "../../../../main/typescript/core/types"; +import { + Asset, + CredentialProfile, + LockType, + SignatureAlgorithm, +} from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { v4 as uuidv4 } from "uuid"; +import { SessionData } from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/session_pb"; +import { SATP_VERSION } from "../../../../main/typescript/core/constants"; +import { SATPSession } from "../../../../main/typescript/core/satp-session"; +import { knexClientConnection } from "../../knex.config"; +import { getSatpLogKey } from "../../../../main/typescript/gateway-utils"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; + +const logLevel: LogLevelDesc = "DEBUG"; + +let mockSession: SATPSession; +const keyPairs = Secp256k1Keys.generateKeyPairsBuffer(); +const sessionId = uuidv4(); + +const createMockSession = (maxTimeout: string, maxRetries: string) => { + const mockSession = new SATPSession({ + contextID: "MOCK_CONTEXT_ID", + server: false, + client: true, + }); + + const sessionData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + sessionData.id = sessionId; + sessionData.maxTimeout = maxTimeout; + sessionData.maxRetries = maxRetries; + sessionData.version = SATP_VERSION; + sessionData.clientGatewayPubkey = Buffer.from(keyPairs.publicKey).toString( + "hex", + ); + sessionData.serverGatewayPubkey = sessionData.clientGatewayPubkey; + sessionData.originatorPubkey = "MOCK_ORIGINATOR_PUBKEY"; + sessionData.beneficiaryPubkey = "MOCK_BENEFICIARY_PUBKEY"; + sessionData.digitalAssetId = "MOCK_DIGITAL_ASSET_ID"; + sessionData.assetProfileId = "MOCK_ASSET_PROFILE_ID"; + sessionData.receiverGatewayOwnerId = "MOCK_RECEIVER_GATEWAY_OWNER_ID"; + sessionData.recipientGatewayNetworkId = SupportedChain.FABRIC; + sessionData.senderGatewayOwnerId = "MOCK_SENDER_GATEWAY_OWNER_ID"; + sessionData.senderGatewayNetworkId = SupportedChain.BESU; + sessionData.signatureAlgorithm = SignatureAlgorithm.RSA; + sessionData.lockType = LockType.FAUCET; + sessionData.lockExpirationTime = BigInt(1000); + sessionData.credentialProfile = CredentialProfile.X509; + sessionData.loggingProfile = "MOCK_LOGGING_PROFILE"; + sessionData.accessControlProfile = "MOCK_ACCESS_CONTROL_PROFILE"; + sessionData.resourceUrl = "MOCK_RESOURCE_URL"; + sessionData.lockAssertionExpiration = BigInt(99999); + sessionData.receiverContractOntology = "MOCK_RECEIVER_CONTRACT_ONTOLOGY"; + sessionData.senderContractOntology = "MOCK_SENDER_CONTRACT_ONTOLOGY"; + sessionData.sourceLedgerAssetId = "MOCK_SOURCE_LEDGER_ASSET_ID"; + sessionData.senderAsset = new Asset(); + sessionData.senderAsset.tokenId = "MOCK_TOKEN_ID"; + sessionData.senderAsset.tokenType = TokenType.ERC20; + sessionData.senderAsset.amount = BigInt(0); + sessionData.senderAsset.owner = "MOCK_SENDER_ASSET_OWNER"; + sessionData.senderAsset.ontology = "MOCK_SENDER_ASSET_ONTOLOGY"; + sessionData.senderAsset.contractName = "MOCK_SENDER_ASSET_CONTRACT_NAME"; + sessionData.senderAsset.contractAddress = + "MOCK_SENDER_ASSET_CONTRACT_ADDRESS"; + sessionData.receiverAsset = new Asset(); + + sessionData.receiverAsset.tokenType = TokenType.ERC20; + sessionData.receiverAsset.amount = BigInt(0); + sessionData.receiverAsset.owner = "MOCK_RECEIVER_ASSET_OWNER"; + sessionData.receiverAsset.ontology = "MOCK_RECEIVER_ASSET_ONTOLOGY"; + sessionData.receiverAsset.contractName = "MOCK_RECEIVER_ASSET_CONTRACT_NAME"; + sessionData.receiverAsset.mspId = "MOCK_RECEIVER_ASSET_MSP_ID"; + sessionData.receiverAsset.channelName = "MOCK_CHANNEL_ID"; + + return mockSession; +}; +let crashManager: CrashRecoveryManager; + +beforeAll(async () => { + const knexInstance = knex(knexClientConnection); + await knexInstance.migrate.latest(); + + const crashManagerOptions: ICrashRecoveryManagerOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + knexConfig: knexClientConnection, + bridgeConfig: { + logLevel: logLevel, + networks: [], + supportedDLTs: [SupportedChain.BESU, SupportedChain.FABRIC], + }, + }; + + crashManager = new CrashRecoveryManager(crashManagerOptions); +}); + +afterEach(() => { + jest.clearAllMocks(); +}); + +describe("CrashRecoveryManager Tests", () => { + it("should reconstruct session by fetching logs", async () => { + mockSession = createMockSession("1000", "3"); + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + // load sample log in database + const key = getSatpLogKey(sessionId, "type", "operation"); + const mockLogEntry: LocalLog = { + sessionID: sessionId, + type: "type", + key: key, + operation: "operation", + timestamp: new Date().toISOString(), + data: JSON.stringify(testData), + }; + const mockLogRepository = crashManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + await crashManager.recoverSessions(); + + expect(crashManager["sessions"].has(sessionId)).toBeTrue(); + + const recoveredSession = crashManager["sessions"].get(sessionId); + + expect(recoveredSession).toBeDefined(); + + if (recoveredSession) { + const parsedSessionData: SessionData = JSON.parse(mockLogEntry.data); + expect(recoveredSession).toEqual(parsedSessionData); + } + }); + + it("should invoke handleRecovery when crash is initially detected", async () => { + mockSession = createMockSession("1000", "3"); + + const handleRecoverySpy = jest + .spyOn(crashManager, "handleRecovery") + .mockImplementation(async () => true); + + jest + .spyOn(crashManager as any, "checkCrash") + .mockImplementation(() => Promise.resolve(CrashStatus.IN_RECOVERY)); + + await crashManager.checkAndResolveCrash(mockSession); + + expect(handleRecoverySpy).toHaveBeenCalled(); + + handleRecoverySpy.mockRestore(); + }); + + it("should invoke initiateRollback when recovery attempts are exhausted", async () => { + mockSession = createMockSession("1000", "3"); + + const handleRecoverySpy = jest + .spyOn(crashManager, "handleRecovery") + .mockImplementation(async () => false); + + const initiateRollbackSpy = jest + .spyOn(crashManager, "initiateRollback") + .mockImplementation(async () => true); + + jest + .spyOn(crashManager as any, "checkCrash") + .mockImplementation(() => Promise.resolve(CrashStatus.IN_RECOVERY)); + + await crashManager.checkAndResolveCrash(mockSession); + + expect(handleRecoverySpy).toHaveBeenCalled(); + expect(initiateRollbackSpy).toHaveBeenCalled(); + + handleRecoverySpy.mockRestore(); + initiateRollbackSpy.mockRestore(); + }); + + it("should detect crash based on incomplete operation in logs", async () => { + mockSession = createMockSession("10000", "3"); + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const handleRecoverySpy = jest + .spyOn(crashManager, "handleRecovery") + .mockImplementation(async () => true); + + const key = getSatpLogKey(sessionId, "type", "init"); + + const mockLogEntry: LocalLog = { + sessionID: sessionId, + type: "type", + key: key, + operation: "init", // operation!=done + timestamp: new Date().toISOString(), + data: JSON.stringify(testData), + }; + + const mockLogRepository = crashManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + + await crashManager.checkAndResolveCrash(mockSession); + + expect(handleRecoverySpy).toHaveBeenCalled(); + + handleRecoverySpy.mockRestore(); + }); + + it("should detect crash based on session timeout", async () => { + mockSession = createMockSession("1000", "3"); // timeout of 1 sec + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const handleRecoverySpy = jest + .spyOn(crashManager, "handleRecovery") + .mockImplementation(async () => true); + + const key = getSatpLogKey(sessionId, "type", "done"); + + const pastTime = new Date(Date.now() - 10000).toISOString(); + + const mockLogEntry: LocalLog = { + sessionID: sessionId, + type: "type", + key: key, + operation: "done", + timestamp: pastTime, + data: JSON.stringify(testData), + }; + + const mockLogRepository = crashManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + + await crashManager.checkAndResolveCrash(mockSession); + + expect(handleRecoverySpy).toHaveBeenCalled(); + + handleRecoverySpy.mockRestore(); + }); + + it("should detect crash based on incomplete operation in logs and initiate rollback when recovery fails", async () => { + mockSession = createMockSession("10000", "3"); + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const handleRecoverySpy = jest + .spyOn(crashManager, "handleRecovery") + .mockImplementation(async () => false); + + const handleInitiateRollBackSpy = jest + .spyOn(crashManager, "initiateRollback") + .mockImplementation(async () => true); + + const key = getSatpLogKey(sessionId, "type3", "init"); + + const mockLogEntry: LocalLog = { + sessionID: sessionId, + type: "type3", + key: key, + operation: "init", // operation!=done + timestamp: new Date().toISOString(), + data: JSON.stringify(testData), + }; + + const mockLogRepository = crashManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + + await crashManager.checkAndResolveCrash(mockSession); + + expect(handleRecoverySpy).toHaveBeenCalled(); + expect(handleInitiateRollBackSpy).toHaveBeenCalled(); + + handleRecoverySpy.mockRestore(); + handleInitiateRollBackSpy.mockRestore(); + }); + + it("should detect crash based on session timeout and initiate rollback when recovery fails", async () => { + mockSession = createMockSession("1000", "3"); // timeout of 1 sec + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const handleRecoverySpy = jest + .spyOn(crashManager, "handleRecovery") + .mockImplementation(async () => false); + + const handleInitiateRollBackSpy = jest + .spyOn(crashManager, "initiateRollback") + .mockImplementation(async () => true); + + const key = getSatpLogKey(sessionId, "type1", "done"); + + const pastTime = new Date(Date.now() - 10000).toISOString(); + + const mockLogEntry: LocalLog = { + sessionID: sessionId, + type: "type1", + key: key, + operation: "done", + timestamp: pastTime, + data: JSON.stringify(testData), + }; + + const mockLogRepository = crashManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + + await crashManager.checkAndResolveCrash(mockSession); + + expect(handleRecoverySpy).toHaveBeenCalled(); + expect(handleInitiateRollBackSpy).toHaveBeenCalled(); + + handleRecoverySpy.mockRestore(); + handleInitiateRollBackSpy.mockRestore(); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts new file mode 100644 index 0000000000..706d87a74d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts @@ -0,0 +1,158 @@ +import "jest-extended"; +import { LogLevelDesc, Secp256k1Keys } from "@hyperledger/cactus-common"; +import { + CrashRecoveryManager, + ICrashRecoveryManagerOptions, +} from "../../../../main/typescript/core/recovery/crash-manager"; +import knex from "knex"; +import { SATPSession } from "../../../../main/typescript/core/satp-session"; +import { knexClientConnection } from "../../knex.config"; +import { SupportedChain } from "../../../../main/typescript/core/types"; +import { + Asset, + CredentialProfile, + LockType, + SignatureAlgorithm, +} from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { SATP_VERSION } from "../../../../main/typescript/core/constants"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import { v4 as uuidv4 } from "uuid"; +import { getSatpLogKey } from "../../../../main/typescript/gateway-utils"; + +const logLevel: LogLevelDesc = "DEBUG"; +const keyPairs = Secp256k1Keys.generateKeyPairsBuffer(); + +let crashRecoveryManager: CrashRecoveryManager; +let mockSession: SATPSession; +const sessionId = uuidv4(); +const createMockSession = () => { + const mockSession = new SATPSession({ + contextID: "MOCK_CONTEXT_ID", + server: false, + client: true, + }); + + const sessionData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + sessionData.id = sessionId; + sessionData.version = SATP_VERSION; + sessionData.clientGatewayPubkey = Buffer.from(keyPairs.publicKey).toString( + "hex", + ); + sessionData.serverGatewayPubkey = sessionData.clientGatewayPubkey; + sessionData.originatorPubkey = "MOCK_ORIGINATOR_PUBKEY"; + sessionData.beneficiaryPubkey = "MOCK_BENEFICIARY_PUBKEY"; + sessionData.digitalAssetId = "MOCK_DIGITAL_ASSET_ID"; + sessionData.assetProfileId = "MOCK_ASSET_PROFILE_ID"; + sessionData.receiverGatewayOwnerId = "MOCK_RECEIVER_GATEWAY_OWNER_ID"; + sessionData.recipientGatewayNetworkId = SupportedChain.FABRIC; + sessionData.senderGatewayOwnerId = "MOCK_SENDER_GATEWAY_OWNER_ID"; + sessionData.senderGatewayNetworkId = SupportedChain.BESU; + sessionData.signatureAlgorithm = SignatureAlgorithm.RSA; + sessionData.lockType = LockType.FAUCET; + sessionData.lockExpirationTime = BigInt(1000); + sessionData.credentialProfile = CredentialProfile.X509; + sessionData.loggingProfile = "MOCK_LOGGING_PROFILE"; + sessionData.accessControlProfile = "MOCK_ACCESS_CONTROL_PROFILE"; + sessionData.resourceUrl = "MOCK_RESOURCE_URL"; + sessionData.lockAssertionExpiration = BigInt(99999); + sessionData.receiverContractOntology = "MOCK_RECEIVER_CONTRACT_ONTOLOGY"; + sessionData.senderContractOntology = "MOCK_SENDER_CONTRACT_ONTOLOGY"; + sessionData.sourceLedgerAssetId = "MOCK_SOURCE_LEDGER_ASSET_ID"; + sessionData.senderAsset = new Asset(); + sessionData.senderAsset.tokenId = "MOCK_TOKEN_ID"; + sessionData.senderAsset.tokenType = TokenType.ERC20; + sessionData.senderAsset.amount = BigInt(0); + sessionData.senderAsset.owner = "MOCK_SENDER_ASSET_OWNER"; + sessionData.senderAsset.ontology = "MOCK_SENDER_ASSET_ONTOLOGY"; + sessionData.senderAsset.contractName = "MOCK_SENDER_ASSET_CONTRACT_NAME"; + sessionData.senderAsset.contractAddress = + "MOCK_SENDER_ASSET_CONTRACT_ADDRESS"; + sessionData.receiverAsset = new Asset(); + + sessionData.receiverAsset.tokenType = TokenType.ERC20; + sessionData.receiverAsset.amount = BigInt(0); + sessionData.receiverAsset.owner = "MOCK_RECEIVER_ASSET_OWNER"; + sessionData.receiverAsset.ontology = "MOCK_RECEIVER_ASSET_ONTOLOGY"; + sessionData.receiverAsset.contractName = "MOCK_RECEIVER_ASSET_CONTRACT_NAME"; + sessionData.receiverAsset.mspId = "MOCK_RECEIVER_ASSET_MSP_ID"; + sessionData.receiverAsset.channelName = "MOCK_CHANNEL_ID"; + + return mockSession; +}; + +beforeAll(async () => { + const knexInstance = knex(knexClientConnection); + await knexInstance.migrate.latest(); + const crashManagerOptions: ICrashRecoveryManagerOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + knexConfig: knexClientConnection, + bridgeConfig: { + logLevel: logLevel, + networks: [], + supportedDLTs: [SupportedChain.BESU, SupportedChain.FABRIC], + }, + }; + + crashRecoveryManager = new CrashRecoveryManager(crashManagerOptions); +}); + +describe("Crash Recovery Services Testing", () => { + it("handle reover function test", async () => { + mockSession = createMockSession(); + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const key = getSatpLogKey(sessionId, "type", "operation"); + const mockLogEntry = { + sessionID: sessionId, + type: "type", + key: key, + operation: "operation", + timestamp: new Date().toISOString(), + data: JSON.stringify(testData), + }; + + const mockLogRepository = crashRecoveryManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + await crashRecoveryManager.recoverSessions(); + + const result = await crashRecoveryManager.handleRecovery(mockSession); + expect(result).toBe(true); + }); + + /*it("intitiate rollback function test", async () => { + mockSession = createMockSession(); + + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const key = getSatpLogKey(sessionId, "type1", "operation1"); + const mockLogEntry = { + sessionID: sessionId, + type: "type1", + key: key, + operation: "operation1", + timestamp: new Date().toISOString(), + data: JSON.stringify(testData), + }; + + const mockLogRepository = crashRecoveryManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + await crashRecoveryManager.recoverSessions(); + + const result = await crashRecoveryManager.initiateRollback( + mockSession, + true, + ); + expect(result).toBe(true); + });*/ +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/start-gateway.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/start-gateway.test.ts new file mode 100644 index 0000000000..020670e50f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/start-gateway.test.ts @@ -0,0 +1,90 @@ +import "jest-extended"; +import { LoggerProvider, LogLevelDesc } from "@hyperledger/cactus-common"; +import { + SATPGateway, + SATPGatewayConfig, +} from "../../../../main/typescript/plugin-satp-hermes-gateway"; +import { PluginFactorySATPGateway } from "../../../../main/typescript/factory/plugin-factory-gateway-orchestrator"; +import { + IPluginFactoryOptions, + PluginImportType, +} from "@hyperledger/cactus-core-api"; +import { + SupportedChain, + Address, +} from "../../../../main/typescript/core/types"; + +const logLevel: LogLevelDesc = "DEBUG"; +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "gateway-test", +}); + +describe("SATPGateway tests", () => { + it("should initialize two gateways and test their interaction", async () => { + const factoryOptions: IPluginFactoryOptions = { + pluginImportType: PluginImportType.Local, + }; + + const factory = new PluginFactorySATPGateway(factoryOptions); + const gatewayIdentity1 = { + id: "mockID-1", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.BESU], + proofID: "mockProofID10", + address: "http://localhost" as Address, + }; + + const gatewayIdentity2 = { + id: "mockID-2", + name: "CustomGateway", + version: [ + { + Core: "v02", + Architecture: "v02", + Crash: "v02", + }, + ], + supportedDLTs: [SupportedChain.FABRIC], + proofID: "mockProofID11", + address: "http://localhost" as Address, + gatewayServerPort: 3110, + gatewayClientPort: 3111, + gatewayOpenAPIPort: 4110, + }; + + const options1: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity1, + counterPartyGateways: [gatewayIdentity2], + bridgesConfig: [], + }; + + const options2: SATPGatewayConfig = { + logLevel: "DEBUG", + gid: gatewayIdentity2, + counterPartyGateways: [gatewayIdentity1], + bridgesConfig: [], + }; + const gateway1 = await factory.create(options1); + expect(gateway1).toBeInstanceOf(SATPGateway); + await gateway1.startup(); + + const gateway2 = await factory.create(options2); + expect(gateway2).toBeInstanceOf(SATPGateway); + + await gateway2.startup(); + + log.info("gateway test!"); + + await gateway1.shutdown(); + await gateway2.shutdown(); + }); +}); diff --git a/yarn.lock b/yarn.lock index d9b8477a47..160c1bbe5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40537,6 +40537,13 @@ __metadata: languageName: node linkType: hard +"pg-connection-string@npm:2.6.1": + version: 2.6.1 + resolution: "pg-connection-string@npm:2.6.1" + checksum: 10/882344a47e1ecf3a91383e0809bf2ac48facea97fcec0358d6e060e1cbcb8737acde419b4c86f05da4ce4a16634ee50fff1d2bb787d73b52ccbfde697243ad8a + languageName: node + linkType: hard + "pg-connection-string@npm:^2.6.4": version: 2.6.4 resolution: "pg-connection-string@npm:2.6.4" From 5ce06a8dd85b3085fa16001dc1fc70642a165c82 Mon Sep 17 00:00:00 2001 From: Yogesh01000100 Date: Sun, 3 Nov 2024 19:08:30 +0000 Subject: [PATCH 48/49] feat: add function processing logs from g2 Signed-off-by: Yogesh01000100 --- .../cactus-plugin-satp-hermes/package.json | 2 +- .../proto/cacti/satp/v02/crash_recovery.proto | 12 ++--- .../typescript/core/recovery/crash-manager.ts | 45 +++++++++++++++-- .../typescript/core/recovery/crash-utils.ts | 7 ++- .../rollback/rollback-strategy-factory.ts | 7 --- .../proto/cacti/satp/v02/crash_recovery_pb.ts | 36 ++++++------- .../repository/interfaces/repository.ts | 2 + .../repository/knex-local-log-repository.ts | 10 ++++ .../typescript/unit/recovery/logging.test.ts | 36 +++++++++++++ .../typescript/unit/recovery/services.test.ts | 2 +- yarn.lock | 50 ++++++++----------- 11 files changed, 138 insertions(+), 71 deletions(-) diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index b1057964fe..b07941a044 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -208,4 +208,4 @@ "runOnChangeOnly": true } } -} \ No newline at end of file +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto index d94d083b05..9447da1491 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/crash_recovery.proto @@ -63,12 +63,12 @@ message RollbackAckMessage { } message LocalLog { - string key=1; - string sessionId=2; - string data=3; - string type=4; - string operation=5; - string timestamp=6; + string sessionID = 1; + string type = 2; + string key = 3; + string operation = 4; + string timestamp = 5; + string data = 6; } message RollbackLogEntry { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts index 93c7ac2d52..ffb51baff0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts @@ -292,14 +292,49 @@ export class CrashRecoveryManager { } } - private processRecoverUpdate( + private async processRecoverUpdate( message: RecoverUpdateMessage, ): Promise { - this.log.debug("Message received: ", message.messageType); - // get the logs from counterparty gateway and sync with current session - this.log.debug(`Session processed & updated with RecoverUpdateMessage`); + const fnTag = `${this.className}#processRecoverUpdate()`; + try { + const sessionId = message.sessionId; + const recoveredLogs = message.recoveredLogs; + + if (!recoveredLogs || recoveredLogs.length === 0) { + this.log.warn(`${fnTag} No recovered logs to process.`); + return true; + } + + for (const logEntry of recoveredLogs) { + await this.logRepository.create(logEntry); + } + + const allLogs = await this.logRepository.readLogsBySessionId(sessionId); + + if (!allLogs || allLogs.length === 0) { + this.log.error(`${fnTag} No logs found for session ID: ${sessionId}`); + return false; + } + + let reconstructedSessionData = new SessionData(); - return Promise.resolve(true); + for (const logEntry of allLogs) { + const data = JSON.parse(logEntry.data); + reconstructedSessionData = data; + this.sessions.set(sessionId, reconstructedSessionData); + } + + this.log.info( + `${fnTag} Session data successfully reconstructed for session ID: ${sessionId}`, + ); + + return true; + } catch (error) { + this.log.error( + `${fnTag} Error processing RecoverUpdateMessage: ${error}`, + ); + return false; + } } public async initiateRollback( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts index 77982d857a..95faa5c18e 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-utils.ts @@ -29,10 +29,9 @@ export class CrashRecoveryService { request: RecoverMessage, ): Promise { this.log.debug("Creating RecoverUpdateMessage..."); - const recoveredLogs = - await this.logRepository.readLogsMoreRecentThanTimestamp( - request.lastEntryTimestamp.toString(), - ); + const recoveredLogs = await this.logRepository.fetchLogsFromSequence( + request.sessionId, + ); return new RecoverUpdateMessage({ sessionId: request.sessionId, messageType: "urn:ietf:SATP-2pc:msgtype:recover-update-msg", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts index 54f432d8d3..3b187cf212 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/rollback/rollback-strategy-factory.ts @@ -11,13 +11,6 @@ import { import { RollbackState } from "../../../generated/proto/cacti/satp/v02/crash_recovery_pb"; import { ILocalLogRepository } from "../../../repository/interfaces/repository"; -/*export interface RollbackState { - currentStage: string; - // todo add rollback state - // placeholder, should import RollbackLogEntry from protos. - // RollbackLogEntry in spec = RollbackState in code -}*/ - export interface RollbackStrategy { execute(session: SATPSession): Promise; // todo do we want to return any information? diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts index b4659aa2e8..92fae720f0 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb.ts @@ -352,34 +352,34 @@ export class RollbackAckMessage extends Message { */ export class LocalLog extends Message { /** - * @generated from field: string key = 1; + * @generated from field: string sessionID = 1; */ - key = ""; + sessionID = ""; /** - * @generated from field: string sessionId = 2; + * @generated from field: string type = 2; */ - sessionId = ""; + type = ""; /** - * @generated from field: string data = 3; + * @generated from field: string key = 3; */ - data = ""; + key = ""; /** - * @generated from field: string type = 4; + * @generated from field: string operation = 4; */ - type = ""; + operation = ""; /** - * @generated from field: string operation = 5; + * @generated from field: string timestamp = 5; */ - operation = ""; + timestamp = ""; /** - * @generated from field: string timestamp = 6; + * @generated from field: string data = 6; */ - timestamp = ""; + data = ""; constructor(data?: PartialMessage) { super(); @@ -389,12 +389,12 @@ export class LocalLog extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cacti.satp.v02.crash.LocalLog"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "operation", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "sessionID", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "operation", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "timestamp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): LocalLog { diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts index 8d1524398f..22c41fb4cf 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/interfaces/repository.ts @@ -15,6 +15,8 @@ export interface ILocalLogRepository extends IRepository { readLastestLog(sessionID: string): Promise; create(log: LocalLog): Promise; deleteBySessionId(log: string): any; + fetchLogsFromSequence(id: string): Promise; + readLogsBySessionId(sessionId: string): Promise; destroy(): any; reset(): any; } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts index e5a71a4d9c..c9c2c90977 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/repository/knex-local-log-repository.ts @@ -54,6 +54,16 @@ export class KnexLocalLogRepository implements ILocalLogRepository { .groupBy("sessionID"); } + fetchLogsFromSequence(sessionId: string): Promise { + return this.getLogsTable().where("sessionID", sessionId); + } + + readLogsBySessionId(sessionId: string): Promise { + return this.getLogsTable() + .where({ sessionID: sessionId }) + .orderBy("timestamp", "asc"); + } + async reset() { await this.database.migrate.rollback(); await this.database.migrate.latest(); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index a7f643a1df..8aa6ba3902 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -23,6 +23,7 @@ import { SATPSession } from "../../../../main/typescript/core/satp-session"; import { knexClientConnection } from "../../knex.config"; import { getSatpLogKey } from "../../../../main/typescript/gateway-utils"; import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import { RecoverUpdateMessage } from "../../../../main/typescript/generated/proto/cacti/satp/v02/crash_recovery_pb"; const logLevel: LogLevelDesc = "DEBUG"; @@ -86,6 +87,7 @@ const createMockSession = (maxTimeout: string, maxRetries: string) => { sessionData.receiverAsset.contractName = "MOCK_RECEIVER_ASSET_CONTRACT_NAME"; sessionData.receiverAsset.mspId = "MOCK_RECEIVER_ASSET_MSP_ID"; sessionData.receiverAsset.channelName = "MOCK_CHANNEL_ID"; + sessionData.lastSequenceNumber = BigInt(4); return mockSession; }; @@ -337,4 +339,38 @@ describe("CrashRecoveryManager Tests", () => { handleRecoverySpy.mockRestore(); handleInitiateRollBackSpy.mockRestore(); }); + + it("should process recovered logs and reconstruct SessionData", async () => { + const mockSession = createMockSession("1000", "3"); + const testData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const recoveredLogs: LocalLog[] = [ + { + sessionID: sessionId, + type: "type_1", + key: getSatpLogKey(sessionId, "type_1", "init"), + operation: "init", + timestamp: new Date().toISOString(), + data: JSON.stringify(testData), + }, + ]; + + const recoverUpdateMessage = { + sessionId: sessionId, + messageType: "urn:ietf:SATP-2pc:msgtype:recover-update-msg", + hashRecoverMessage: "", + recoveredLogs: recoveredLogs, + senderSignature: "", + } as RecoverUpdateMessage; + + const result = + await crashManager["processRecoverUpdate"](recoverUpdateMessage); + + expect(result).toBeTrue(); + + const reconstructedSessionData = crashManager["sessions"].get(sessionId); + expect(reconstructedSessionData).toBeDefined(); + }); }); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts index 706d87a74d..e121e7a702 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/services.test.ts @@ -101,7 +101,7 @@ beforeAll(async () => { }); describe("Crash Recovery Services Testing", () => { - it("handle reover function test", async () => { + it("handle recover function test", async () => { mockSession = createMockSession(); const testData = mockSession.hasClientSessionData() diff --git a/yarn.lock b/yarn.lock index 160c1bbe5f..19f3e80e6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9142,9 +9142,8 @@ __metadata: make-dir-cli: "npm:3.1.0" npm-run-all: "npm:4.1.5" openzeppelin-solidity: "npm:3.4.2" - pg: "npm:^8.8.0" + pg: "npm:^8.13.0" protobufjs: "npm:7.2.5" - safe-stable-stringify: "npm:2.5.0" secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" @@ -40544,14 +40543,7 @@ __metadata: languageName: node linkType: hard -"pg-connection-string@npm:^2.6.4": - version: 2.6.4 - resolution: "pg-connection-string@npm:2.6.4" - checksum: 10/2c1d2ac1add1f93076f1594d217a0980f79add05dc48de6363e1c550827c78a6ee3e3b5420da9c54858f6b678cdb348aed49732ee68158b6cdb70f1d1c748cf9 - languageName: node - linkType: hard - -"pg-connection-string@npm:^2.5.0": +"pg-connection-string@npm:^2.7.0": version: 2.7.0 resolution: "pg-connection-string@npm:2.7.0" checksum: 10/68015a8874b7ca5dad456445e4114af3d2602bac2fdb8069315ecad0ff9660ec93259b9af7186606529ac4f6f72a06831e6f20897a689b16cc7fda7ca0e247fd @@ -40574,12 +40566,12 @@ __metadata: languageName: node linkType: hard -"pg-pool@npm:^3.6.2": - version: 3.6.2 - resolution: "pg-pool@npm:3.6.2" +"pg-pool@npm:^3.7.0": + version: 3.7.0 + resolution: "pg-pool@npm:3.7.0" peerDependencies: pg: ">=8.0" - checksum: 10/d5ccefb9a4913c737e07106ada841c7d8f2b110b02ef6b4cee198e1e7e758bac43cb3b6df7646e25858b9fe300db00f2f349868296fbd4b3b4c99c15906d1596 + checksum: 10/a07a4f9e26eec9d7ac3597dc7b3469c62983edff9a321dbb7acbe1bbc7f5e9b2d33438e277d4cf8145071f3d63c7ebdc287a539fd69dfb8cdddb15b33eefe1a2 languageName: node linkType: hard @@ -40590,10 +40582,10 @@ __metadata: languageName: node linkType: hard -"pg-protocol@npm:^1.6.1": - version: 1.6.1 - resolution: "pg-protocol@npm:1.6.1" - checksum: 10/9af672208adae8214f55f5b4597c4699ab9946205a99863d3e2bb8d024fdab16711457b539bc366cc29040218aa87508cf61294b76d288f48881b973d9117bd6 +"pg-protocol@npm:^1.7.0": + version: 1.7.0 + resolution: "pg-protocol@npm:1.7.0" + checksum: 10/ffffdf74426c9357b57050f1c191e84447c0e8b2a701b3ab302ac7dd0eb27b862d92e5e3b2d38876a1051de83547eb9165d6a58b3a8e90bb050dae97f9993d54 languageName: node linkType: hard @@ -40630,14 +40622,14 @@ __metadata: languageName: node linkType: hard -"pg@npm:^8.8.0": - version: 8.12.0 - resolution: "pg@npm:8.12.0" +"pg@npm:^8.13.0": + version: 8.13.1 + resolution: "pg@npm:8.13.1" dependencies: pg-cloudflare: "npm:^1.1.1" - pg-connection-string: "npm:^2.6.4" - pg-pool: "npm:^3.6.2" - pg-protocol: "npm:^1.6.1" + pg-connection-string: "npm:^2.7.0" + pg-pool: "npm:^3.7.0" + pg-protocol: "npm:^1.7.0" pg-types: "npm:^2.1.0" pgpass: "npm:1.x" peerDependencies: @@ -40648,7 +40640,7 @@ __metadata: peerDependenciesMeta: pg-native: optional: true - checksum: 10/ce39af0e85d42bf5fc8dcc02c57b38d4cb203fea937688509a77c0b005a54d4821e5e5963a5663934d76994eab42381698f08a44e21544b4545fd9d142dcfd12 + checksum: 10/542aa49fcb37657cf5f779b4a31fe6eb336e683445ecca38e267eeb0ca85d873ffe51f04794f9f9e184187e9f74bf7895e932a0fa9507132ac0dfc76c7c73451 languageName: node linkType: hard @@ -44861,10 +44853,10 @@ __metadata: languageName: node linkType: hard -"safe-stable-stringify@npm:2.5.0, safe-stable-stringify@npm:^2.3.1, safe-stable-stringify@npm:^2.4.3": - version: 2.5.0 - resolution: "safe-stable-stringify@npm:2.5.0" - checksum: 10/2697fa186c17c38c3ca5309637b4ac6de2f1c3d282da27cd5e1e3c88eca0fb1f9aea568a6aabdf284111592c8782b94ee07176f17126031be72ab1313ed46c5c +"safe-stable-stringify@npm:^2.3.1": + version: 2.3.1 + resolution: "safe-stable-stringify@npm:2.3.1" + checksum: 10/8a6ed4e5fb80694970f1939538518c44a59c71c74305e12b5964cbe3850636212eddac881da1f676b0232015213676e07750fe75bc402afbfe29851c8b52381e languageName: node linkType: hard From cb24d53a31aeb84573943c6a27e9412e9f61f1c9 Mon Sep 17 00:00:00 2001 From: Yogesh01000100 Date: Fri, 15 Nov 2024 11:38:56 +0000 Subject: [PATCH 49/49] feat: add cron schedule for periodic crash checks Signed-off-by: Yogesh01000100 --- .../cactus-plugin-satp-hermes/package.json | 3 + .../typescript/core/recovery/crash-manager.ts | 139 ++++++++++------ .../core/recovery/crash-recovery-handler.ts | 7 +- .../src/main/typescript/core/satp-session.ts | 23 +++ .../typescript/unit/recovery/cron.test.ts | 156 ++++++++++++++++++ .../typescript/unit/recovery/logging.test.ts | 6 +- yarn.lock | 26 +++ 7 files changed, 302 insertions(+), 58 deletions(-) create mode 100644 packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/cron.test.ts diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index b07941a044..214ae92c2b 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -132,9 +132,11 @@ "jsonc": "2.0.0", "knex": "2.4.0", "kubo-rpc-client": "3.0.1", + "node-cron": "3.0.2", "npm-run-all": "4.1.5", "openzeppelin-solidity": "3.4.2", "pg": "^8.13.0", + "safe-stable-stringify": "2.5.0", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", @@ -157,6 +159,7 @@ "@types/fs-extra": "11.0.4", "@types/google-protobuf": "3.15.5", "@types/node": "18.18.2", + "@types/node-cron": "3.0.11", "@types/pg": "8.6.5", "@types/swagger-ui-express": "4.1.6", "@types/tape": "4.13.4", diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts index ffb51baff0..617e885b82 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-manager.ts @@ -23,6 +23,7 @@ import { } from "../../generated/proto/cacti/satp/v02/crash_recovery_pb"; import { SessionType } from "../session-utils"; import { ISATPBridgesOptions } from "../../gol/satp-bridges-manager"; +import cron from "node-cron"; export enum CrashStatus { IN_RECOVERY = "IN_RECOVERY", @@ -50,7 +51,7 @@ export class CrashRecoveryManager { public static readonly CLASS_NAME = "CrashRecoveryManager"; private readonly log: Logger; private readonly instanceId: string; - private sessions: Map; + private sessions: Map; private crashRecoveryHandler: CrashRecoveryHandler; private factory: RollbackStrategyFactory; private logRepository: ILocalLogRepository; @@ -63,7 +64,7 @@ export class CrashRecoveryManager { const label = this.className; this.log = LoggerProvider.getOrCreate({ level, label }); this.instanceId = options.instanceId; - this.sessions = new Map(); + this.sessions = new Map(); this.log.info(`Instantiated ${this.className} OK`); this.logRepository = new LocalLogRepository(options.knexConfig); this.factory = new RollbackStrategyFactory( @@ -103,67 +104,39 @@ export class CrashRecoveryManager { const sessionId = log.sessionID; this.log.info(`${fnTag}, recovering session: ${sessionId}`); - if (log == undefined || log.data == undefined) { - throw new Error(`${fnTag}, invalid log}`); + if (!log || !log.data) { + throw new Error(`${fnTag}, invalid log`); } try { - const logEntry: SessionData = JSON.parse(log.data); - this.sessions.set(sessionId, logEntry); + const sessionData: SessionData = JSON.parse(log.data); + const satpSession = SATPSession.fromSessionData(sessionData); + this.sessions.set(sessionId, satpSession); } catch (error) { this.log.error( `Error parsing log data for session Id: ${sessionId}: ${error}`, ); } } + this.detectCrash(); } catch (error) { this.log.error(`Error initializing sessions: ${error}`); } } - private async checkCrash(session: SATPSession): Promise { - const fnTag = `${this.className}#checkCrash()`; - const sessionData = session.hasClientSessionData() - ? session.getClientSessionData() - : session.getServerSessionData(); - - try { - session.verify( - fnTag, - session.hasClientSessionData() - ? SessionType.CLIENT - : SessionType.SERVER, - ); - - const lastLog = await this.logRepository.readLastestLog( - session.getSessionId(), - ); - - if (lastLog && lastLog.operation !== "done") { - this.log.debug( - `${fnTag} Crash detected for session ID: ${session.getSessionId()} last log operation: ${lastLog.operation}`, - ); - return CrashStatus.IN_RECOVERY; - } - - const logTimestamp = new Date(lastLog?.timestamp ?? 0).getTime(); - const currentTime = new Date().getTime(); - const timeDifference = currentTime - logTimestamp; - - if (timeDifference > Number(sessionData.maxTimeout)) { - this.log.warn( - `${fnTag} Timeout exceeded by ${timeDifference} ms for session ID: ${session.getSessionId()}`, - ); - return CrashStatus.IN_RECOVERY; - } + private detectCrash() { + const fnTag = `${this.className}#startCrashDetectionCron()`; + cron.schedule("*/10 * * * * *", async () => { + this.log.debug(`${fnTag} Running crash detection cron job.`); + // helper function + await this.checkAndResolveCrashes(); + }); + this.log.info(`${fnTag} Crash detection cron job scheduled.`); + } - this.log.info( - `${fnTag} No crash detected for session ID: ${session.getSessionId()}`, - ); - return CrashStatus.NO_CRASH; - } catch (error) { - this.log.error(`${fnTag} Error occured !`); - return CrashStatus.ERROR; + public async checkAndResolveCrashes(): Promise { + for (const session of this.sessions.values()) { + await this.checkAndResolveCrash(session); } } @@ -212,16 +185,16 @@ export class CrashRecoveryManager { `${fnTag} Retry attempt ${attempts} for sessionID: ${session.getSessionId()}`, ); } - if (attempts != 0) { - this.log.warn(`${fnTag} All retries exhausted ! Initiating Rollback`); + if (attempts !== 0) { + this.log.warn(`${fnTag} All retries exhausted! Initiating Rollback`); const rollBackStatus = await this.initiateRollback(session, true); if (rollBackStatus) { this.log.info( - `${fnTag} rollback was success: ${session.getSessionId()}`, + `${fnTag} Rollback was successful for sessionID: ${session.getSessionId()}`, ); } else { this.log.error( - `${fnTag} rollback failed ! ${session.getSessionId()}`, + `${fnTag} Rollback failed for sessionID: ${session.getSessionId()}`, ); } } @@ -230,6 +203,52 @@ export class CrashRecoveryManager { } } + private async checkCrash(session: SATPSession): Promise { + const fnTag = `${this.className}#checkCrash()`; + const sessionData = session.hasClientSessionData() + ? session.getClientSessionData() + : session.getServerSessionData(); + + try { + session.verify( + fnTag, + session.hasClientSessionData() + ? SessionType.CLIENT + : SessionType.SERVER, + ); + + const lastLog = await this.logRepository.readLastestLog( + session.getSessionId(), + ); + + if (lastLog && lastLog.operation !== "done") { + this.log.debug( + `${fnTag} Crash detected for session ID: ${session.getSessionId()}, last log operation: ${lastLog.operation}`, + ); + return CrashStatus.IN_RECOVERY; + } + + const logTimestamp = new Date(lastLog?.timestamp ?? 0).getTime(); + const currentTime = new Date().getTime(); + const timeDifference = currentTime - logTimestamp; + + if (timeDifference > Number(sessionData.maxTimeout)) { + this.log.warn( + `${fnTag} Timeout exceeded by ${timeDifference} ms for session ID: ${session.getSessionId()}`, + ); + return CrashStatus.IN_RECOVERY; + } + + this.log.info( + `${fnTag} No crash detected for session ID: ${session.getSessionId()}`, + ); + return CrashStatus.NO_CRASH; + } catch (error) { + this.log.error(`${fnTag} Error occurred during crash check: ${error}`); + return CrashStatus.ERROR; + } + } + public async handleRecovery(session: SATPSession): Promise { const fnTag = `${this.className}#handleRecovery()`; @@ -316,12 +335,23 @@ export class CrashRecoveryManager { return false; } - let reconstructedSessionData = new SessionData(); + let reconstructedSessionData: SessionData | undefined; for (const logEntry of allLogs) { const data = JSON.parse(logEntry.data); reconstructedSessionData = data; - this.sessions.set(sessionId, reconstructedSessionData); + + if (reconstructedSessionData) { + // Reconstruct SATPSession from SessionData + const satpSession = SATPSession.fromSessionData( + reconstructedSessionData, + ); + this.sessions.set(sessionId, satpSession); + } else { + this.log.error( + `${fnTag} Reconstructed session data is undefined for session ID: ${sessionId}`, + ); + } } this.log.info( @@ -396,6 +426,7 @@ export class CrashRecoveryManager { return await strategy.execute(session); } catch (error) { this.log.error(`${fnTag} Error executing rollback strategy: ${error}`); + return undefined; } } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts index 3872e66e48..3c67fb087b 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/recovery/crash-recovery-handler.ts @@ -14,20 +14,21 @@ import { ILoggerOptions, } from "@hyperledger/cactus-common"; import { Empty } from "@bufbuild/protobuf"; -import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; +//import { SessionData } from "../../generated/proto/cacti/satp/v02/common/session_pb"; import { ILocalLogRepository } from "../../repository/interfaces/repository"; import { getSatpLogKey } from "../../gateway-utils"; +import { SATPSession } from "../satp-session"; interface HandlerOptions { crashService: CrashRecoveryService; loggerOptions: ILoggerOptions; - sessions: Map; + sessions: Map; logRepository: ILocalLogRepository; } export class CrashRecoveryHandler { public static readonly CLASS_NAME = "CrashRecoveryHandler"; - public sessions: Map; + public sessions: Map; private service: CrashRecoveryService; private log: Logger; private logRepository: ILocalLogRepository; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts index 47b5fd5ae9..0b189008f7 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/satp-session.ts @@ -128,6 +128,29 @@ export class SATPSession { return this.clientSessionData; } + public static fromSessionData(sessionData: SessionData): SATPSession { + // Determine if it's a client or server session based on the presence of gateway pubkeys + const isServer = sessionData.serverGatewayPubkey !== ""; + const isClient = sessionData.clientGatewayPubkey !== ""; + + const session = new SATPSession({ + contextID: sessionData.transferContextId, + sessionID: sessionData.id, + server: isServer, + client: isClient, + }); + + // Assign the sessionData to the appropriate property + if (isServer) { + session.serverSessionData = sessionData; + } + if (isClient) { + session.clientSessionData = sessionData; + } + + return session; + } + public createSessionData( type: SessionType, sessionId: string, diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/cron.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/cron.test.ts new file mode 100644 index 0000000000..55168e48dd --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/cron.test.ts @@ -0,0 +1,156 @@ +import "jest-extended"; +import { CrashRecoveryManager } from "../../../../main/typescript/core/recovery/crash-manager"; +import { LogLevelDesc, Secp256k1Keys } from "@hyperledger/cactus-common"; +import { ICrashRecoveryManagerOptions } from "../../../../main/typescript/core/recovery/crash-manager"; +import knex from "knex"; +import { + LocalLog, + SupportedChain, +} from "../../../../main/typescript/core/types"; +import { + Asset, + CredentialProfile, + LockType, + SignatureAlgorithm, +} from "../../../../main/typescript/generated/proto/cacti/satp/v02/common/message_pb"; +import { v4 as uuidv4 } from "uuid"; +import { SATP_VERSION } from "../../../../main/typescript/core/constants"; +import { SATPSession } from "../../../../main/typescript/core/satp-session"; +import { knexClientConnection } from "../../knex.config"; +import { getSatpLogKey } from "../../../../main/typescript/gateway-utils"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; + +const logLevel: LogLevelDesc = "DEBUG"; + +let mockSession: SATPSession; +const keyPairs = Secp256k1Keys.generateKeyPairsBuffer(); +const sessionId = uuidv4(); + +const createMockSession = (maxTimeout: string, maxRetries: string) => { + const mockSession = new SATPSession({ + contextID: "MOCK_CONTEXT_ID", + server: false, + client: true, + }); + + const sessionData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + sessionData.id = sessionId; + sessionData.maxTimeout = maxTimeout; + sessionData.maxRetries = maxRetries; + sessionData.version = SATP_VERSION; + sessionData.clientGatewayPubkey = Buffer.from(keyPairs.publicKey).toString( + "hex", + ); + sessionData.serverGatewayPubkey = sessionData.clientGatewayPubkey; + sessionData.originatorPubkey = "MOCK_ORIGINATOR_PUBKEY"; + sessionData.beneficiaryPubkey = "MOCK_BENEFICIARY_PUBKEY"; + sessionData.digitalAssetId = "MOCK_DIGITAL_ASSET_ID"; + sessionData.assetProfileId = "MOCK_ASSET_PROFILE_ID"; + sessionData.receiverGatewayOwnerId = "MOCK_RECEIVER_GATEWAY_OWNER_ID"; + sessionData.recipientGatewayNetworkId = SupportedChain.FABRIC; + sessionData.senderGatewayOwnerId = "MOCK_SENDER_GATEWAY_OWNER_ID"; + sessionData.senderGatewayNetworkId = SupportedChain.BESU; + sessionData.signatureAlgorithm = SignatureAlgorithm.RSA; + sessionData.lockType = LockType.FAUCET; + sessionData.lockExpirationTime = BigInt(1000); + sessionData.credentialProfile = CredentialProfile.X509; + sessionData.loggingProfile = "MOCK_LOGGING_PROFILE"; + sessionData.accessControlProfile = "MOCK_ACCESS_CONTROL_PROFILE"; + sessionData.resourceUrl = "MOCK_RESOURCE_URL"; + sessionData.lockAssertionExpiration = BigInt(99999); + sessionData.receiverContractOntology = "MOCK_RECEIVER_CONTRACT_ONTOLOGY"; + sessionData.senderContractOntology = "MOCK_SENDER_CONTRACT_ONTOLOGY"; + sessionData.sourceLedgerAssetId = "MOCK_SOURCE_LEDGER_ASSET_ID"; + sessionData.senderAsset = new Asset(); + sessionData.senderAsset.tokenId = "MOCK_TOKEN_ID"; + sessionData.senderAsset.tokenType = TokenType.ERC20; + sessionData.senderAsset.amount = BigInt(0); + sessionData.senderAsset.owner = "MOCK_SENDER_ASSET_OWNER"; + sessionData.senderAsset.ontology = "MOCK_SENDER_ASSET_ONTOLOGY"; + sessionData.senderAsset.contractName = "MOCK_SENDER_ASSET_CONTRACT_NAME"; + sessionData.senderAsset.contractAddress = + "MOCK_SENDER_ASSET_CONTRACT_ADDRESS"; + sessionData.receiverAsset = new Asset(); + + sessionData.receiverAsset.tokenType = TokenType.ERC20; + sessionData.receiverAsset.amount = BigInt(0); + sessionData.receiverAsset.owner = "MOCK_RECEIVER_ASSET_OWNER"; + sessionData.receiverAsset.ontology = "MOCK_RECEIVER_ASSET_ONTOLOGY"; + sessionData.receiverAsset.contractName = "MOCK_RECEIVER_ASSET_CONTRACT_NAME"; + sessionData.receiverAsset.mspId = "MOCK_RECEIVER_ASSET_MSP_ID"; + sessionData.receiverAsset.channelName = "MOCK_CHANNEL_ID"; + sessionData.lastSequenceNumber = BigInt(4); + + return mockSession; +}; +let crashManager: CrashRecoveryManager; + +beforeAll(async () => { + const knexInstance = knex(knexClientConnection); + await knexInstance.migrate.latest(); + + const crashManagerOptions: ICrashRecoveryManagerOptions = { + instanceId: uuidv4(), + logLevel: logLevel, + knexConfig: knexClientConnection, + bridgeConfig: { + logLevel: logLevel, + networks: [], + supportedDLTs: [SupportedChain.BESU, SupportedChain.FABRIC], + }, + }; + + crashManager = new CrashRecoveryManager(crashManagerOptions); +}); + +afterEach(() => { + jest.clearAllMocks(); + jest.useRealTimers(); +}); + +describe("CrashRecoveryManager Tests", () => { + it("should trigger checkAndResolveCrashes via cron schedule every 10 seconds for 30 seconds", async () => { + jest.useFakeTimers(); + + mockSession = createMockSession("10000", "3"); + const sessionData = mockSession.hasClientSessionData() + ? mockSession.getClientSessionData() + : mockSession.getServerSessionData(); + + const sessionId = sessionData.id; + const key = getSatpLogKey(sessionId, "type", "operation"); + const mockLogEntry: LocalLog = { + sessionID: sessionId, + type: "type", + key: key, + operation: "operation", + timestamp: new Date().toISOString(), + data: JSON.stringify(sessionData), + }; + const mockLogRepository = crashManager["logRepository"]; + + await mockLogRepository.create(mockLogEntry); + + const mockCheckAndResolveCrash = jest + .spyOn(CrashRecoveryManager.prototype, "checkAndResolveCrash") + .mockImplementation(() => Promise.resolve()); + + await crashManager.recoverSessions(); + + for (let i = 1; i <= 3; i++) { + jest.advanceTimersByTime(10000); + await Promise.resolve(); + } + + expect(mockCheckAndResolveCrash).toHaveBeenCalledTimes(3); + expect(mockCheckAndResolveCrash).toHaveBeenCalledWith( + expect.any(SATPSession), + ); + + mockCheckAndResolveCrash.mockRestore(); + jest.useRealTimers(); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index 8aa6ba3902..7fc34246c3 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -146,7 +146,11 @@ describe("CrashRecoveryManager Tests", () => { if (recoveredSession) { const parsedSessionData: SessionData = JSON.parse(mockLogEntry.data); - expect(recoveredSession).toEqual(parsedSessionData); + const sessionData = recoveredSession.hasClientSessionData() + ? recoveredSession.getClientSessionData() + : recoveredSession.getServerSessionData(); + + expect(sessionData).toEqual(parsedSessionData); } }); diff --git a/yarn.lock b/yarn.lock index 19f3e80e6a..047a1f590a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9112,6 +9112,7 @@ __metadata: "@types/fs-extra": "npm:11.0.4" "@types/google-protobuf": "npm:3.15.5" "@types/node": "npm:18.18.2" + "@types/node-cron": "npm:3.0.11" "@types/pg": "npm:8.6.5" "@types/swagger-ui-express": "npm:4.1.6" "@types/tape": "npm:4.13.4" @@ -9140,10 +9141,12 @@ __metadata: knex: "npm:2.4.0" kubo-rpc-client: "npm:3.0.1" make-dir-cli: "npm:3.1.0" + node-cron: "npm:3.0.2" npm-run-all: "npm:4.1.5" openzeppelin-solidity: "npm:3.4.2" pg: "npm:^8.13.0" protobufjs: "npm:7.2.5" + safe-stable-stringify: "npm:2.5.0" secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" @@ -15892,6 +15895,13 @@ __metadata: languageName: node linkType: hard +"@types/node-cron@npm:3.0.11": + version: 3.0.11 + resolution: "@types/node-cron@npm:3.0.11" + checksum: 10/a73f69bcca52a5f3b1671cfb00a8e4a1d150d0aef36a611564a2f94e66b6981bade577e267ceeeca6fcee241768902d55eb8cf3a81f9ef4ed767a23112fdb16d + languageName: node + linkType: hard + "@types/node-fetch@npm:2.6.2": version: 2.6.2 resolution: "@types/node-fetch@npm:2.6.2" @@ -38210,6 +38220,15 @@ __metadata: languageName: node linkType: hard +"node-cron@npm:3.0.2": + version: 3.0.2 + resolution: "node-cron@npm:3.0.2" + dependencies: + uuid: "npm:8.3.2" + checksum: 10/71d4ce22425d0f2a7bd9753149da475317725f6890d5a55e5e43a97062456faeda984d55c17aee9699552460525cee948662fb75124065810e4038b2f56a9d32 + languageName: node + linkType: hard + "node-domexception@npm:^1.0.0": version: 1.0.0 resolution: "node-domexception@npm:1.0.0" @@ -44853,6 +44872,13 @@ __metadata: languageName: node linkType: hard +"safe-stable-stringify@npm:2.5.0": + version: 2.5.0 + resolution: "safe-stable-stringify@npm:2.5.0" + checksum: 10/2697fa186c17c38c3ca5309637b4ac6de2f1c3d282da27cd5e1e3c88eca0fb1f9aea568a6aabdf284111592c8782b94ee07176f17126031be72ab1313ed46c5c + languageName: node + linkType: hard + "safe-stable-stringify@npm:^2.3.1": version: 2.3.1 resolution: "safe-stable-stringify@npm:2.3.1"